diff --git a/CHANGELOG.md b/CHANGELOG.md index b5f3666..90200a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.3.0 + +* Remove Tizen 4.0/5.0 bindings. + ## 0.2.7 * Update the Dart SDK constraint. diff --git a/README.md b/README.md index 8708e37..53ee9db 100644 --- a/README.md +++ b/README.md @@ -12,14 +12,14 @@ To use this package, add `ffi` and `tizen_interop` as dependencies in your `pubs ```yaml dependencies: ffi: ^2.0.1 - tizen_interop: ^0.2.7 + tizen_interop: ^0.3.0 ``` Then, import `package:ffi/ffi.dart` and `package:tizen_interop/[TIZEN_VERSION]/tizen.dart` in your Dart code. ```dart import 'package:ffi/ffi.dart'; -import 'package:tizen_interop/4.0/tizen.dart'; +import 'package:tizen_interop/5.5/tizen.dart'; ``` ### Examples @@ -84,143 +84,143 @@ This package provides bindings for the following APIs of the Tizen [IoT-Headed]( > **Note**: UI and WebView related APIs are not included. -| Category | Sub category | Tizen 4.0 | Tizen 5.0 | Tizen 5.5 | Tizen 6.0 | Tizen 6.5 | Tizen 7.0 | Tizen 8.0 | -|-|-|:-:|:-:|:-:|:-:|:-:|:-:|:-:| -| Account | Account Manager | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | FIDO Client | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Account Manager | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | OAuth 2.0 | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Sync Manager | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| Application Framework | Application | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Alarm | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | App Common | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | App Control | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | App Control URI | | | | | ✔ | ✔ | ✔ | -| | Event | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Internationalization | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Job scheduler | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Preference | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Resource Manager | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Application Manager | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| Category | Sub category | Tizen 5.5 | Tizen 6.0 | Tizen 6.5 | Tizen 7.0 | Tizen 8.0 | +|-|-|:-:|:-:|:-:|:-:|:-:| +| Account | Account Manager | ✔ | ✔ | ✔ | ✔ | ✔ | +| | FIDO Client | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Account Manager | ✔ | ✔ | ✔ | ✔ | ✔ | +| | OAuth 2.0 | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Sync Manager | ✔ | ✔ | ✔ | ✔ | ✔ | +| Application Framework | Application | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Alarm | ✔ | ✔ | ✔ | ✔ | ✔ | +| | App Common | ✔ | ✔ | ✔ | ✔ | ✔ | +| | App Control | ✔ | ✔ | ✔ | ✔ | ✔ | +| | App Control URI | | | ✔ | ✔ | ✔ | +| | Event | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Internationalization | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Job scheduler | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Preference | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Resource Manager | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Application Manager | ✔ | ✔ | ✔ | ✔ | ✔ | | | Attach panel | -| | Badge | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Bundle | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Cion | | | | | ✔ | ✔ | ✔ | +| | Badge | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Bundle | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Cion | | | ✔ | ✔ | ✔ | | | Component Based Application | | | Component Manager | -| | Data Control | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Message Port | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Notification | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Notification EX | | | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Package Manager | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | RPC Port | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Service Application | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Shortcut | ✔ | ✔ | ✔ | ✔ | ✔ | | | +| | Data Control | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Message Port | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Notification | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Notification EX | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Package Manager | ✔ | ✔ | ✔ | ✔ | ✔ | +| | RPC Port | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Service Application | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Shortcut | ✔ | ✔ | ✔ | | | | | Widget | -| Base | Common Error | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| Base | Common Error | ✔ | ✔ | ✔ | ✔ | ✔ | | | Utils | -| Content | Download | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | MIME Type | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Media Content | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| Context | Activity Recognition | | ✔ | ✔ | ✔ | | | | -| | Contextual History | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Contextual Trigger | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Gesture Recognition | | ✔ | ✔ | ✔ | | | | -| Location | Geofence Manager | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Location Manager | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| Content | Download | ✔ | ✔ | ✔ | ✔ | ✔ | +| | MIME Type | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Media Content | ✔ | ✔ | ✔ | ✔ | ✔ | +| Context | Activity Recognition | ✔ | ✔ | | | | +| | Contextual History | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Contextual Trigger | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Gesture Recognition | ✔ | ✔ | | | | +| Location | Geofence Manager | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Location Manager | ✔ | ✔ | ✔ | ✔ | ✔ | | | Maps Service | -| Machine Learning | Pipeline | | | | | ✔ | ✔ | ✔ | -| | Service | | | | | | ✔ | ✔ | -| | Single | | | | | ✔ | ✔ | ✔ | -| | Trainer | | | | | ✔ | ✔ | ✔ | -| Messaging | Email | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Messages | ✔ | | | | | | | -| | Push | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| Multimedia | Audio I/O | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Camera | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Image Util | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Media Codec | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Media Controller | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Media Demuxer | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Media Muxer | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Media Streamer | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Media Tool | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Media Vision | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Media Editor | | | | | | ✔ | ✔ | -| | Metadata Editor | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Metadata Extractor | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Player | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Radio | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Recorder | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Screen Mirroring | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Sound Manager | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Sound Pool | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | StreamRecorder | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Thumbnail Util | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Tone Player | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Video Util | ✔ | | | | | | | -| | WAV Player | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | WebRTC | | | | | ✔ | ✔ | ✔ | -| Network | Application Service Platform | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Bluetooth | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Connection | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | DNSSD | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | HTTP | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Intelligent Network Monitoring | | | ✔ | ✔ | ✔ | ✔ | ✔ | -| | IoTCon | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | MTP | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | SSDP | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Smart Traffic Control | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Smartcard | ✔ | | | | | | | -| | SoftAP | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| Machine Learning | Pipeline | | | ✔ | ✔ | ✔ | +| | Service | | | | ✔ | ✔ | +| | Single | | | ✔ | ✔ | ✔ | +| | Trainer | | | ✔ | ✔ | ✔ | +| Messaging | Email | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Messages | | | | | | +| | Push | ✔ | ✔ | ✔ | ✔ | ✔ | +| Multimedia | Audio I/O | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Camera | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Image Util | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Media Codec | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Media Controller | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Media Demuxer | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Media Muxer | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Media Streamer | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Media Tool | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Media Vision | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Media Editor | | | | ✔ | ✔ | +| | Metadata Editor | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Metadata Extractor | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Player | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Radio | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Recorder | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Screen Mirroring | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Sound Manager | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Sound Pool | ✔ | ✔ | ✔ | ✔ | ✔ | +| | StreamRecorder | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Thumbnail Util | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Tone Player | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Video Util | | | | | | +| | WAV Player | ✔ | ✔ | ✔ | ✔ | ✔ | +| | WebRTC | | | ✔ | ✔ | ✔ | +| Network | Application Service Platform | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Bluetooth | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Connection | ✔ | ✔ | ✔ | ✔ | ✔ | +| | DNSSD | ✔ | ✔ | ✔ | ✔ | ✔ | +| | HTTP | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Intelligent Network Monitoring | ✔ | ✔ | ✔ | ✔ | ✔ | +| | IoTCon | ✔ | ✔ | ✔ | ✔ | ✔ | +| | MTP | ✔ | ✔ | ✔ | ✔ | ✔ | +| | SSDP | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Smart Traffic Control | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Smartcard | | | | | | +| | SoftAP | ✔ | ✔ | ✔ | ✔ | ✔ | | | User Awareness | -| | VPN Service | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Wi-Fi | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Wi-Fi Direct | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| Security | CSR | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Device Certificate Manager | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Device Policy Manager | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Key Manager | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Privacy Privilege Manager | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Privilege Info | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | YACA | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| Social | Calendar | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Contacts | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Phonenumber utils | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| System | Device | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| | VPN Service | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Wi-Fi | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Wi-Fi Direct | ✔ | ✔ | ✔ | ✔ | ✔ | +| Security | CSR | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Device Certificate Manager | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Device Policy Manager | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Key Manager | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Privacy Privilege Manager | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Privilege Info | ✔ | ✔ | ✔ | ✔ | ✔ | +| | YACA | ✔ | ✔ | ✔ | ✔ | ✔ | +| Social | Calendar | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Contacts | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Phonenumber utils | ✔ | ✔ | ✔ | ✔ | ✔ | +| System | Device | ✔ | ✔ | ✔ | ✔ | ✔ | | | Diagnostics | | | | ✔ | ✔ | ✔ | ✔ | -| | Dlog | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Feedback | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Media key | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Monitor | | | | | | ✔ | ✔ | -| | Peripheral IO | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Runtime information | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Sensor | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Storage | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | System Information | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | System Settings | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | T-trace | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | USB Host | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Update Control | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| Telephony | Telephony Information | ✔ | | | | | | | -| UI | Clipboard History Manager | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | +| | Dlog | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Feedback | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Media key | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Monitor | | | | ✔ | ✔ | +| | Peripheral IO | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Runtime information | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Sensor | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Storage | ✔ | ✔ | ✔ | ✔ | ✔ | +| | System Information | ✔ | ✔ | ✔ | ✔ | ✔ | +| | System Settings | ✔ | ✔ | ✔ | ✔ | ✔ | +| | T-trace | ✔ | ✔ | ✔ | ✔ | ✔ | +| | USB Host | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Update Control | ✔ | ✔ | ✔ | ✔ | ✔ | +| Telephony | Telephony Information | | | | | | +| UI | Clipboard History Manager | ✔ | ✔ | ✔ | ✔ | | | | DALi | | | EFL | -| | External Output Manager | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| | External Output Manager | ✔ | ✔ | ✔ | ✔ | ✔ | | | Minicontrol | -| | TBM Surface | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| | TBM Surface | ✔ | ✔ | ✔ | ✔ | ✔ | | | Tizen WS Shell | | | UI View Manager | -| UIX | Autofill | | | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Input Method | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Input Method Manager | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Multi assistant | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | STT | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | STT Engine | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| UIX | Autofill | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Input Method | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Input Method Manager | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Multi assistant | ✔ | ✔ | ✔ | ✔ | ✔ | +| | STT | ✔ | ✔ | ✔ | ✔ | ✔ | +| | STT Engine | ✔ | ✔ | ✔ | ✔ | ✔ | | | Sticker | -| | TTS | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | TTS Engine | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Voice control | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| | TTS | ✔ | ✔ | ✔ | ✔ | ✔ | +| | TTS Engine | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Voice control | ✔ | ✔ | ✔ | ✔ | ✔ | | | Voice control elementary | -| | Voice control engine | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| | Voice control manager | | | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Voice control engine | ✔ | ✔ | ✔ | ✔ | ✔ | +| | Voice control manager | ✔ | ✔ | ✔ | ✔ | ✔ | diff --git a/configs/4.0/entrypoints.h b/configs/4.0/entrypoints.h deleted file mode 100644 index 82e48ba..0000000 --- a/configs/4.0/entrypoints.h +++ /dev/null @@ -1,141 +0,0 @@ -#define __GLIBC_USE - -// Application Framework -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Base -#include -#include - -// Content -#include -#include -#include - -// Messaging -#include -#include - -// Multimedia -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Network -#include -#include -#include -#include -#include -#include -#include -#include - -// Security -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Social -#include -#include -#include - -// System -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Telephony -#include - -// UI -#include -#include -#include - -// UIX -#include -#include -#include -#include -#include -#include -#include diff --git a/configs/4.0/ffigen.yaml b/configs/4.0/ffigen.yaml deleted file mode 100644 index 8c2159c..0000000 --- a/configs/4.0/ffigen.yaml +++ /dev/null @@ -1,113 +0,0 @@ -preamble: | - // Copyright 2021 Samsung Electronics Co., Ltd. All rights reserved. - // Use of this source code is governed by a BSD-style license that can be - // found in the LICENSE file. - - // ignore_for_file: type=lint, unused_element, unused_field - -name: 'Tizen40Native' -description: 'Dart bindings for Tizen native APIs.' -output: '../../lib/src/bindings/4.0/generated_bindings.dart' - -llvm-path: - - '/usr/lib/llvm-12' - -headers: - entry-points: - - 'entrypoints.h' - include-directives: - - '**/bundle.h' - - '**/inputmethod.h' - - '**/inputmethod_manager.h' - - '**/mtp.h' - - '**/peripheral_io.h' - - '**/privilege_information.h' - - '**/smartcard.h' - - '**/stte.h' - - '**/stt.h' - - '**/tbm_surface.h' - - '**/tizen_error.h' - - '**/tizen.h' - - '**/trace.h' - - '**/ttse.h' - - '**/tts.h' - - '**/usb_host.h' - - '**/voice_control.h' - - '**/appcore-agent/*.h' - - '**/appfw/*.h' - - '**/badge/*.h' - - '**/calendar-service2/*.h' - - '**/cbhm/*.h' - - '**/ckm/ckmc/*.h' - - '**/contacts-svc/*.h' - - '**/content/*.h' - - '**/csr/*.h' - - '**/device/*.h' - - '**/dlog/*.h' - - '**/dpm/*.h' - - '**/eom/*.h' - - '**/feedback/*.h' - - '**/iotcon/*.h' - - '**/media/*.h' - - '**/media-content/*.h' - - '**/messaging/*.h' - - '**/metadata-editor/*.h' - - '**/network/*.h' - - '**/notification/*.h' - - '**/nsd/*.h' - - '**/phonenumber-utils/*.h' - - '**/privacy-privilege-manager/*.h' - - '**/sensor/*.h' - - '**/shortcut/*.h' - - '**/storage/*.h' - - '**/system/*.h' - - '**/telephony/*.h' - - '**/web/*.h' - - '**/yaca/*.h' - -compiler-opts: - - '-m32' - - '-Wno-incomplete-setjmp-declaration' - - '-I./rootstraps/4.0/usr/include/' - - '-I./rootstraps/4.0/usr/include/appcore-agent/' - - '-I./rootstraps/4.0/usr/include/appfw/' - - '-I./rootstraps/4.0/usr/include/badge/' - - '-I./rootstraps/4.0/usr/include/calendar-service2/' - - '-I./rootstraps/4.0/usr/include/cbhm/' - - '-I./rootstraps/4.0/usr/include/ckm/' - - '-I./rootstraps/4.0/usr/include/contacts-svc/' - - '-I./rootstraps/4.0/usr/include/content/' - - '-I./rootstraps/4.0/usr/include/csr/' - - '-I./rootstraps/4.0/usr/include/dlog/' - - '-I./rootstraps/4.0/usr/include/eom/' - - '-I./rootstraps/4.0/usr/include/feedback/' - - '-I./rootstraps/4.0/usr/include/iotcon/' - - '-I./rootstraps/4.0/usr/include/media/' - - '-I./rootstraps/4.0/usr/include/media-content/' - - '-I./rootstraps/4.0/usr/include/messaging/' - - '-I./rootstraps/4.0/usr/include/metadata-editor/' - - '-I./rootstraps/4.0/usr/include/network/' - - '-I./rootstraps/4.0/usr/include/notification/' - - '-I./rootstraps/4.0/usr/include/nsd/' - - '-I./rootstraps/4.0/usr/include/phonenumber-utils/' - - '-I./rootstraps/4.0/usr/include/privacy-privilege-manager/' - - '-I./rootstraps/4.0/usr/include/sensor/' - - '-I./rootstraps/4.0/usr/include/shortcut/' - - '-I./rootstraps/4.0/usr/include/storage/' - - '-I./rootstraps/4.0/usr/include/system/' - - '-I./rootstraps/4.0/usr/include/telephony/' - - '-I./rootstraps/4.0/usr/include/web/' - - '-I./rootstraps/4.0/usr/include/yaca/' - - # include EFL directories - - '-I./rootstraps/4.0/usr/include/ecore-imf-1/' - - '-I./rootstraps/4.0/usr/include/efl-1/' - - '-I./rootstraps/4.0/usr/include/eina-1/' - - '-I./rootstraps/4.0/usr/include/eina-1/eina/' - - '-I./rootstraps/4.0/usr/include/emile-1/' - - '-I./rootstraps/4.0/usr/include/eo-1/' - - '-I./rootstraps/4.0/usr/include/evas-1/' - -enums: - rename: - '_+(.*)': '$1' diff --git a/configs/4.0/symgen.yaml b/configs/4.0/symgen.yaml deleted file mode 100644 index 4626509..0000000 --- a/configs/4.0/symgen.yaml +++ /dev/null @@ -1,91 +0,0 @@ -preamble: | - // Copyright 2021 Samsung Electronics Co., Ltd. All rights reserved. - // Use of this source code is governed by a BSD-style license that can be - // found in the LICENSE file. - -name: 'tizen40Symbols' -output: 'lib/src/bindings/4.0/generated_symbols.dart' -library-path: 'rootstraps/4.0/usr/lib' - -target-libraries: - - libcapi-appfw-application.so.0 # Applicatoin Framework / Application - - libcapi-appfw-alarm.so.0 # Application Framework / Application / Alarm - - libcapi-appfw-app-common.so.0 # Application Framework / Application / App Common, Resource Manager - - libcapi-appfw-app-control.so.0 # Application Framework / Application / App Control - - libcapi-appfw-event.so.0 # Application Framework / Application / Event - - libcapi-appfw-preference.so.0 # Application Framework / Application / Preference - - libcapi-appfw-app-manager.so.0 # Application Framework / Application Manager - - libbadge.so.0 # Application Framework / Badge - - libbundle.so.0 # Application Framework / Bundle - - libdata-control.so.0 # Application Framework / Data Control - - libmessage-port.so.1 # Application Framework / Message Port - - libnotification.so.0 # Application Framework / Notification - - libcapi-appfw-package-manager.so.0 # Application Framework / Package Manager - - libappcore-agent.so.1 # Application Framework / Service Application - - libshortcut.so.0 # Application Framework / Shortcut - - libcapi-base-common.so.0 # Base / Common Error - - libcapi-web-url-download.so.0 # Content / Download - - libcapi-content-mime-type.so.0 # Content / Mime Type - - libcapi-content-media-content.so.0 # Content / Media Content - - libcapi-messaging-email.so.0 # Messaging / Email - - libcapi-messaging-messages.so.0 # Messaging / Messages - - libcapi-media-audio-io.so.0 # Multimedia / Audio I/O - - libcapi-media-camera.so.0 # Multimedia / Camera - - libcapi-media-codec.so.0 # Multimedia / Media Codec - - libcapi-media-controller.so.0 # Multimedia / Media Controller - - libcapi-mediademuxer.so.0 # Multimedia / Media Demuxer - - libcapi-mediamuxer.so.0 # Multimedia / Media Muxer - - libcapi-media-streamer.so.0 # Multimedia / Media Streamer - - libcapi-media-tool.so.0 # Multimedia / Media Tool - - libcapi-media-vision.so.0 # Multimedia / Media Vision - - libcapi-media-metadata-editor.so # Multimedia / Metadata Editor - - libcapi-media-metadata-extractor.so # Multimedia / Metadata Extractor - - libcapi-media-player.so.0 # Multimedia / Player - - libcapi-media-recorder.so.0 # Multimedia / Recorder - - libcapi-media-sound-manager.so.0 # Multimedia / Sound Manager - - libcapi-media-sound-pool.so.0 # Multimedia / Sound Pool - - libcapi-media-streamrecorder.so.0 # Multimedia / StreamRecorder - - libcapi-media-thumbnail-util.so # Multimedia / Thumbnail Util - - libcapi-media-tone-player.so.0 # Multimedia / Tone Player - - libcapi-media-video-util.so.0 # Multimedia / Video Util - - libcapi-media-wav-player.so.0 # Multimedia / WAV Player - - libcapi-network-bluetooth.so.0 # Network / Bluetooth - - libcapi-network-connection.so.1 # Network / Connection - - libnsd-dns-sd.so.0 # Network / DNSSD - - libiotcon.so.0 # Network / IoTCon - - libcapi-network-mtp.so.1 # Network / MTP - - libnsd-ssdp.so.0 # Network / SSDP - - libcapi-network-smartcard.so.0 # Network / Smartcard - - libcapi-network-wifi-manager.so.1 # Network / WI-Fi Manager - - libcsr-client.so.2 # Security / CSR - - libdpm.so.0 # Security / Device Policy Manager - - libkey-manager-client.so.1 # Security / Key Manager Client - - libcapi-privacy-privilege-manager.so.0 # Security / Privacy Privilege Manager - - libprivilege-info.so.1 # Security / Privilege Info - - libyaca.so.0 # Security / YACA - - libcalendar-service2.so.0 # Social / Calendar - - libcontacts-service2.so.0 # Social / Contacts - - libphonenumber-utils.so.0 # Social / Phonenumber utils - - libcapi-system-device.so.0 # System / Device - - libdlog.so.0 # System / Dlog - - libfeedback.so.0 # System / Feedback - - libcapi-system-media-key.so.0 # System / Media key - - libcapi-system-peripheral-io.so.0 # System / Peripheral IO - - libcapi-system-runtime-info.so.0 # System / Runtime information - - libcapi-system-sensor.so.0 # System / Sensor - - libstorage.so.0.1 # System / Storage - - libcapi-system-info.so.0 # System / System Information - - libcapi-system-system-settings.so.0 # System / System Settings - - libttrace.so.1 # System / T-trace - - libcapi-system-usbhost.so.0 # System / USB Host - - libcapi-telephony.so.0 # Telephony / Telephony Information - - libcbhm.so.1 # UI / Clipboard History Manager - - libeom.so.0 # UI / External Output Manager - - libtbm.so.1 # UI / TBM Surface - - libcapi-ui-inputmethod.so.0 # UIX / Input Method - - libcapi-ui-inputmethod-manager.so.0 # UIX / Input Method Manager - - libstt.so # UIX / STT - - libstt_engine.so # UIX / STT Engine - - libtts.so # UIX / TTS - - libtts_engine.so # UIX / TTS Engine - - libvc.so # UIX / Voice control diff --git a/configs/5.0/entrypoints.h b/configs/5.0/entrypoints.h deleted file mode 100644 index 39dd315..0000000 --- a/configs/5.0/entrypoints.h +++ /dev/null @@ -1,172 +0,0 @@ -#define __GLIBC_USE - -// Account -#include -#include -#include -#include -#include -#include -#include - -// Application Framework -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Base -#include -#include - -// Content -#include -#include -#include - -// Context -#include -#include -#include -#include - -// Location -#include -#include - -// Messaging -#include -#include - -// Multimedia -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Network -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Security -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Social -#include -#include -#include - -// System -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// UI -#include -#include -#include - -// UIX -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include diff --git a/configs/5.0/ffigen.yaml b/configs/5.0/ffigen.yaml deleted file mode 100644 index 4538b22..0000000 --- a/configs/5.0/ffigen.yaml +++ /dev/null @@ -1,135 +0,0 @@ -preamble: | - // Copyright 2021 Samsung Electronics Co., Ltd. All rights reserved. - // Use of this source code is governed by a BSD-style license that can be - // found in the LICENSE file. - - // ignore_for_file: type=lint, unused_element, unused_field - -name: 'Tizen50Native' -description: 'Dart bindings for Tizen native APIs.' -output: '../../lib/src/bindings/5.0/generated_bindings.dart' - -llvm-path: - - '/usr/lib/llvm-12' - -headers: - entry-points: - - 'entrypoints.h' - include-directives: - - '**/account.h' - - '**/bundle.h' - - '**/fido.h' - - '**/fido_uaf_authenticator.h' - - '**/fido_uaf_client.h' - - '**/inputmethod.h' - - '**/inputmethod_manager.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' - - '**/trace.h' - - '**/ttse.h' - - '**/tts.h' - - '**/usb_host.h' - - '**/vce.h' - - '**/voice_control.h' - - '**/vpn_service.h' - - '**/appcore-agent/*.h' - - '**/appfw/*.h' - - '**/asp/*.h' - - '**/badge/*.h' - - '**/calendar-service2/*.h' - - '**/cbhm/*.h' - - '**/ckm/ckmc/*.h' - - '**/contacts-svc/*.h' - - '**/content/*.h' - - '**/context-service/*.h' - - '**/csr/*.h' - - '**/device/*.h' - - '**/device-certificate-manager/*.h' - - '**/dlog/*.h' - - '**/dpm/*.h' - - '**/eom/*.h' - - '**/feedback/*.h' - - '**/geofence/*.h' - - '**/iotcon/*.h' - - '**/location/*.h' - - '**/media/*.h' - - '**/media-content/*.h' - - '**/messaging/*.h' - - '**/metadata-editor/*.h' - - '**/network/*.h' - - '**/notification/*.h' - - '**/nsd/*.h' - - '**/phonenumber-utils/*.h' - - '**/privacy-privilege-manager/*.h' - - '**/rpc-port/*.h' - - '**/sensor/*.h' - - '**/shortcut/*.h' - - '**/storage/*.h' - - '**/system/*.h' - - '**/web/*.h' - - '**/wifi-direct/*.h' - - '**/yaca/*.h' - -compiler-opts: - - '-m32' - - '-Wno-incomplete-setjmp-declaration' - - '-I./rootstraps/5.0/usr/include/' - - '-I./rootstraps/5.0/usr/include/appcore-agent/' - - '-I./rootstraps/5.0/usr/include/appfw/' - - '-I./rootstraps/5.0/usr/include/asp/' - - '-I./rootstraps/5.0/usr/include/badge/' - - '-I./rootstraps/5.0/usr/include/calendar-service2/' - - '-I./rootstraps/5.0/usr/include/cbhm/' - - '-I./rootstraps/5.0/usr/include/ckm/' - - '-I./rootstraps/5.0/usr/include/contacts-svc/' - - '-I./rootstraps/5.0/usr/include/content/' - - '-I./rootstraps/5.0/usr/include/context-service/' - - '-I./rootstraps/5.0/usr/include/csr/' - - '-I./rootstraps/5.0/usr/include/device-certificate-manager/' - - '-I./rootstraps/5.0/usr/include/dlog/' - - '-I./rootstraps/5.0/usr/include/eom/' - - '-I./rootstraps/5.0/usr/include/feedback/' - - '-I./rootstraps/5.0/usr/include/geofence/' - - '-I./rootstraps/5.0/usr/include/iotcon/' - - '-I./rootstraps/5.0/usr/include/location/' - - '-I./rootstraps/5.0/usr/include/media/' - - '-I./rootstraps/5.0/usr/include/media-content/' - - '-I./rootstraps/5.0/usr/include/messaging/' - - '-I./rootstraps/5.0/usr/include/metadata-editor/' - - '-I./rootstraps/5.0/usr/include/network/' - - '-I./rootstraps/5.0/usr/include/notification/' - - '-I./rootstraps/5.0/usr/include/nsd/' - - '-I./rootstraps/5.0/usr/include/phonenumber-utils/' - - '-I./rootstraps/5.0/usr/include/privacy-privilege-manager/' - - '-I./rootstraps/5.0/usr/include/rpc-port/' - - '-I./rootstraps/5.0/usr/include/sensor/' - - '-I./rootstraps/5.0/usr/include/shortcut/' - - '-I./rootstraps/5.0/usr/include/storage/' - - '-I./rootstraps/5.0/usr/include/system/' - - '-I./rootstraps/5.0/usr/include/web/' - - '-I./rootstraps/5.0/usr/include/wifi-direct/' - - '-I./rootstraps/5.0/usr/include/yaca/' - - # include EFL directories - - '-I./rootstraps/5.0/usr/include/ecore-imf-1/' - - '-I./rootstraps/5.0/usr/include/efl-1/' - - '-I./rootstraps/5.0/usr/include/eina-1/' - - '-I./rootstraps/5.0/usr/include/eina-1/eina/' - - '-I./rootstraps/5.0/usr/include/emile-1/' - - '-I./rootstraps/5.0/usr/include/eo-1/' - - '-I./rootstraps/5.0/usr/include/evas-1/' - -enums: - rename: - '_+(.*)': '$1' diff --git a/configs/5.0/symgen.yaml b/configs/5.0/symgen.yaml deleted file mode 100644 index c52603f..0000000 --- a/configs/5.0/symgen.yaml +++ /dev/null @@ -1,111 +0,0 @@ -preamble: | - // Copyright 2021 Samsung Electronics Co., Ltd. All rights reserved. - // Use of this source code is governed by a BSD-style license that can be - // found in the LICENSE file. - -name: 'tizen50Symbols' -output: 'lib/src/bindings/5.0/generated_symbols.dart' -library-path: 'rootstraps/5.0/usr/lib' - -target-libraries: - - libaccounts-svc.so.0 # Account / Account Manager - - libfido-client.so.0 # Account / FIDO Client - - liboauth2.so.0 # Account / OAuth 2.0 - - libcore-sync-client.so.1 # Account / Sync Manager - - libcapi-appfw-application.so.0 # Applicatoin Framework / Application - - libcapi-appfw-alarm.so.0 # Application Framework / Application / Alarm - - libcapi-appfw-app-common.so.0 # Application Framework / Application / App Common, Resource Manager - - libcapi-appfw-app-control.so.0 # Application Framework / Application / App Control - - libcapi-appfw-event.so.0 # Application Framework / Application / Event - - libcapi-appfw-job-scheduler.so.0 # Application Framework / Application / Job scheduler - - libcapi-appfw-preference.so.0 # Application Framework / Application / Preference - - libcapi-appfw-app-manager.so.0 # Application Framework / Application Manager - - libbadge.so.0 # Application Framework / Badge - - libbundle.so.0 # Application Framework / Bundle - - libdata-control.so.0 # Application Framework / Data Control - - libmessage-port.so.1 # Application Framework / Message Port - - libnotification.so.0 # Application Framework / Notification - - libcapi-appfw-package-manager.so.0 # Application Framework / Package Manager - - librpc-port.so.1 # Application Framework / RPC Port - - libappcore-agent.so.1 # Application Framework / Service Application - - libshortcut.so.0 # Application Framework / Shortcut - - libcapi-base-common.so.0 # Base / Common Error - - libcapi-web-url-download.so.0 # Content / Download - - libcapi-content-mime-type.so.0 # Content / Mime Type - - libcapi-content-media-content.so.0 # Content / Media Content - - libcapi-context-motion.so.2 # Context / Activity Recognition, Gesture Recognition - - libcapi-context.so.1 # Context / Contextual History, Contextual Trigger - - libcapi-geofence-manager.so.0 # Location / Geofence Manager - - libcapi-location-manager.so.0 # Location / Location Manager - - libcapi-messaging-email.so.0 # Messaging / Email - - libpush.so.0 # Messaging / Push - - libcapi-media-audio-io.so.0 # Multimedia / Audio I/O - - libcapi-media-camera.so.0 # Multimedia / Camera - - libcapi-media-image-util.so.0 # Multimedia / Image Util - - libcapi-media-codec.so.0 # Multimedia / Media Codec - - libcapi-media-controller.so.0 # Multimedia / Media Controller - - libcapi-mediademuxer.so.0 # Multimedia / Media Demuxer - - libcapi-mediamuxer.so.0 # Multimedia / Media Muxer - - libcapi-media-streamer.so.0 # Multimedia / Media Streamer - - libcapi-media-tool.so.0 # Multimedia / Media Tool - - libcapi-media-vision.so.0 # Multimedia / Media Vision - - libcapi-media-metadata-editor.so # Multimedia / Metadata Editor - - libcapi-media-metadata-extractor.so # Multimedia / Metadata Extractor - - libcapi-media-player.so.0 # Multimedia / Player - - libcapi-media-radio.so.0 # Multimeida / Radio - - libcapi-media-recorder.so.0 # Multimedia / Recorder - - libcapi-media-screen-mirroring.so.0 # Multimedia / Screen Mirroring - - libcapi-media-sound-manager.so.0 # Multimedia / Sound Manager - - libcapi-media-sound-pool.so.0 # Multimedia / Sound Pool - - libcapi-media-streamrecorder.so.0 # Multimedia / StreamRecorder - - libcapi-media-thumbnail-util.so # Multimedia / Thumbnail Util - - libcapi-media-tone-player.so.0 # Multimedia / Tone Player - - libcapi-media-wav-player.so.0 # Multimedia / WAV Player - - libasp.so.0 # Network / Application Service Platform - - libcapi-network-bluetooth.so.0 # Network / Bluetooth - - libcapi-network-connection.so.1 # Network / Connection - - libnsd-dns-sd.so.0 # Network / DNSSD - - libcapi-network-http.so.0.1.0 # Network / HTTP - - libiotcon.so.0 # Network / IoTCon - - libcapi-network-mtp.so.1 # Network / MTP - - libnsd-ssdp.so.0 # Network / SSDP - - libcapi-network-stc.so.0 # Network / Smart Traffic Control - - libcapi-network-softap.so.0.1.0 # Network / SoftAP - - libcapi-vpnsvc.so.1 # Network / VPN Service - - libcapi-network-wifi-manager.so.1 # Network / WI-Fi Manager - - libwifi-direct.so.1 # Network / Wi-Fi Direct - - libcsr-client.so.2 # Security / CSR - - libdevice-certificate-manager.so.2.0 # Security / Device Certificate Manager - - libdpm.so.0 # Security / Device Policy Manager - - libkey-manager-client.so.1 # Security / Key Manager Client - - libcapi-privacy-privilege-manager.so.0 # Security / Privacy Privilege Manager - - libprivilege-info.so.1 # Security / Privilege Info - - libyaca.so.0 # Security / YACA - - libcalendar-service2.so.0 # Social / Calendar - - libcontacts-service2.so.0 # Social / Contacts - - libphonenumber-utils.so.0 # Social / Phonenumber utils - - libcapi-system-device.so.0 # System / Device - - libdlog.so.0 # System / Dlog - - libfeedback.so.0 # System / Feedback - - libcapi-system-media-key.so.0 # System / Media key - - libcapi-system-peripheral-io.so.0 # System / Peripheral IO - - libcapi-system-runtime-info.so.0 # System / Runtime information - - libcapi-system-sensor.so.0 # System / Sensor - - libstorage.so.0.1 # System / Storage - - libcapi-system-info.so.0 # System / System Information - - libcapi-system-system-settings.so.0 # System / System Settings - - libttrace.so.1 # System / T-trace - - libcapi-system-usbhost.so.0 # System / USB Host - - libupdate-control.so.1 # System / Update Control - - libcbhm.so.1 # UI / Clipboard History Manager - - libeom.so.0 # UI / External Output Manager - - libtbm.so.1 # UI / TBM Surface - - libcapi-ui-inputmethod.so.0 # UIX / Input Method - - libcapi-ui-inputmethod-manager.so.0 # UIX / Input Method Manager - - libma.so # UIX / Multi assistant - - libstt.so # UIX / STT - - libstt_engine.so # UIX / STT Engine - - libtts.so # UIX / TTS - - libtts_engine.so # UIX / TTS Engine - - libvc.so # UIX / Voice control - - libvc_engine.so # UIX / Voice control engine \ No newline at end of file diff --git a/example/tizen/tizen-manifest.xml b/example/tizen/tizen-manifest.xml index 48b5a67..6ce5b85 100644 --- a/example/tizen/tizen-manifest.xml +++ b/example/tizen/tizen-manifest.xml @@ -1,5 +1,5 @@ - + diff --git a/lib/4.0/tizen.dart b/lib/4.0/tizen.dart deleted file mode 100644 index 89ff690..0000000 --- a/lib/4.0/tizen.dart +++ /dev/null @@ -1,12 +0,0 @@ -library tizen_interop; - -import '../../src/bindings/4.0/generated_bindings.dart'; -import '../../src/bindings/4.0/generated_symbols.dart'; -import '../../src/lookup_provider.dart'; - -export '../../src/bindings/4.0/generated_bindings.dart'; -export '../../src/extensions.dart'; - -Tizen40Native? _tizen; -Tizen40Native get tizen => - _tizen ??= Tizen40Native.fromLookup(LookupProvider(tizen40Symbols).lookup); diff --git a/lib/5.0/tizen.dart b/lib/5.0/tizen.dart deleted file mode 100644 index ea62aa2..0000000 --- a/lib/5.0/tizen.dart +++ /dev/null @@ -1,12 +0,0 @@ -library tizen_interop; - -import '../../src/bindings/5.0/generated_bindings.dart'; -import '../../src/bindings/5.0/generated_symbols.dart'; -import '../../src/lookup_provider.dart'; - -export '../../src/bindings/5.0/generated_bindings.dart'; -export '../../src/extensions.dart'; - -Tizen50Native? _tizen; -Tizen50Native get tizen => - _tizen ??= Tizen50Native.fromLookup(LookupProvider(tizen50Symbols).lookup); diff --git a/lib/src/bindings/4.0/generated_bindings.dart b/lib/src/bindings/4.0/generated_bindings.dart deleted file mode 100644 index 623d074..0000000 --- a/lib/src/bindings/4.0/generated_bindings.dart +++ /dev/null @@ -1,156881 +0,0 @@ -// Copyright 2021 Samsung Electronics Co., Ltd. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// ignore_for_file: type=lint, unused_element, unused_field - -// AUTO GENERATED FILE, DO NOT EDIT. -// -// Generated by `package:ffigen`. -import 'dart:ffi' as ffi; - -/// Dart bindings for Tizen native APIs. -class Tizen40Native { - /// Holds the symbol lookup function. - final ffi.Pointer Function(String symbolName) - _lookup; - - /// The symbols are looked up in [dynamicLibrary]. - Tizen40Native(ffi.DynamicLibrary dynamicLibrary) - : _lookup = dynamicLibrary.lookup; - - /// The symbols are looked up with [lookup]. - Tizen40Native.fromLookup( - ffi.Pointer Function(String symbolName) - lookup) - : _lookup = lookup; - - /// @brief Gets the last error code in the thread. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @details This function retrieves the last error code which is set by set_last_result() - /// @return One of #tizen_error_e - /// @see #tizen_error_e - /// @see set_last_result() - int get_last_result() { - return _get_last_result(); - } - - late final _get_last_resultPtr = - _lookup>('get_last_result'); - late final _get_last_result = - _get_last_resultPtr.asFunction(); - - /// @brief Sets the last error code to be returned in the thread. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] err The error code to be returned - /// @see #tizen_error_e - /// @see get_last_result() - void set_last_result( - int err, - ) { - return _set_last_result( - err, - ); - } - - late final _set_last_resultPtr = - _lookup>( - 'set_last_result'); - late final _set_last_result = - _set_last_resultPtr.asFunction(); - - /// @brief Gets the message for given the error code. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remark This function returns a static pointer; subsequent calls will overwrite it. - /// @param[in] err The error value to be returned - /// @return The error's message - /// @see #tizen_error_e - /// - /// @code - /// char* errMsg; - /// location_manager_h location_handle; - /// int result = location_manager_create(LOCATION_METHOD_GPS, &location_handle); - /// - /// if (LOCATIONS_ERROR_NONE != result) { - /// errMsg = get_error_message(result); - /// dlog_print(DLOG_INFO, "MyTag", "%s", errMsg); - /// } - /// @endcode - ffi.Pointer get_error_message( - int err, - ) { - return _get_error_message( - err, - ); - } - - late final _get_error_messagePtr = - _lookup Function(ffi.Int)>>( - 'get_error_message'); - late final _get_error_message = - _get_error_messagePtr.asFunction Function(int)>(); - - /// @brief Creates an app_control handle. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The @a app_control must be released using app_control_destroy(). - /// @param[out] app_control The app_control handle to be newly created on success - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_control_destroy() - int app_control_create( - ffi.Pointer app_control, - ) { - return _app_control_create( - app_control, - ); - } - - late final _app_control_createPtr = - _lookup)>>( - 'app_control_create'); - late final _app_control_create = _app_control_createPtr - .asFunction)>(); - - /// @brief Destroys the app_control handle and releases all its resources. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_control The app_control handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_control_create() - int app_control_destroy( - app_control_h app_control, - ) { - return _app_control_destroy( - app_control, - ); - } - - late final _app_control_destroyPtr = - _lookup>( - 'app_control_destroy'); - late final _app_control_destroy = - _app_control_destroyPtr.asFunction(); - - /// @brief Sets the operation to be performed. - /// - /// @details The @a operation is the mandatory information for the launch request. - /// If the operation is not specified, #APP_CONTROL_OPERATION_DEFAULT is used for the launch request. - /// If the operation is #APP_CONTROL_OPERATION_DEFAULT, the package information is mandatory to explicitly launch the application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_control The app_control handle - /// @param[in] operation The operation to be performed (if the @a operation is @c NULL, it clears the previous value) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see app_control_get_operation() - /// @see APP_CONTROL_OPERATION_DEFAULT - /// @see APP_CONTROL_OPERATION_EDIT - /// @see APP_CONTROL_OPERATION_VIEW - /// @see APP_CONTROL_OPERATION_PICK - /// @see APP_CONTROL_OPERATION_CREATE_CONTENT - /// @see APP_CONTROL_OPERATION_CALL - /// @see APP_CONTROL_OPERATION_SEND - /// @see APP_CONTROL_OPERATION_SEND_TEXT - /// @see APP_CONTROL_OPERATION_DIAL - /// @see APP_CONTROL_OPERATION_SEARCH - int app_control_set_operation( - app_control_h app_control, - ffi.Pointer operation, - ) { - return _app_control_set_operation( - app_control, - operation, - ); - } - - late final _app_control_set_operationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, - ffi.Pointer)>>('app_control_set_operation'); - late final _app_control_set_operation = _app_control_set_operationPtr - .asFunction)>(); - - /// @brief Gets the operation to be performed. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The @a operation must be released using free(). - /// @param[in] app_control The app_control handle - /// @param[out] operation The operation to be performed - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_control_set_operation() - int app_control_get_operation( - app_control_h app_control, - ffi.Pointer> operation, - ) { - return _app_control_get_operation( - app_control, - operation, - ); - } - - late final _app_control_get_operationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - app_control_h, ffi.Pointer>)>>( - 'app_control_get_operation'); - late final _app_control_get_operation = - _app_control_get_operationPtr.asFunction< - int Function(app_control_h, ffi.Pointer>)>(); - - /// @brief Sets the URI of the data. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks Since Tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, if the parameter @a uri is started with 'file://' and it is a regular file in this application's data path which can be obtained by calling the app_get_data_path() function, it will be shared to the callee application. Framework will grant a temporary permission to the callee application for this file and revoke it when the callee application is terminated. The callee application can just read it. - /// @param[in] app_control The app_control handle - /// @param[in] uri The URI of the data this app_control is operating on (if the @a uri is @c NULL, it clears the previous value) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see app_control_get_uri() - int app_control_set_uri( - app_control_h app_control, - ffi.Pointer uri, - ) { - return _app_control_set_uri( - app_control, - uri, - ); - } - - late final _app_control_set_uriPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - app_control_h, ffi.Pointer)>>('app_control_set_uri'); - late final _app_control_set_uri = _app_control_set_uriPtr - .asFunction)>(); - - /// @brief Gets the URI of the data. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The @a uri must be released using free(). - /// @param[in] app_control The app_control handle - /// @param[out] uri The URI of the data this app_control is operating on - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_control_set_uri() - int app_control_get_uri( - app_control_h app_control, - ffi.Pointer> uri, - ) { - return _app_control_get_uri( - app_control, - uri, - ); - } - - late final _app_control_get_uriPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, - ffi.Pointer>)>>('app_control_get_uri'); - late final _app_control_get_uri = _app_control_get_uriPtr.asFunction< - int Function(app_control_h, ffi.Pointer>)>(); - - /// @brief Sets the explicit MIME type of the data. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_control The app_control handle - /// @param[in] mime The explicit MIME type of the data this app_control is operating on (if the @a mime is @c NULL, it clears the previous value) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see app_control_get_mime() - int app_control_set_mime( - app_control_h app_control, - ffi.Pointer mime, - ) { - return _app_control_set_mime( - app_control, - mime, - ); - } - - late final _app_control_set_mimePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - app_control_h, ffi.Pointer)>>('app_control_set_mime'); - late final _app_control_set_mime = _app_control_set_mimePtr - .asFunction)>(); - - /// @brief Gets the explicit MIME type of the data. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The @a uri must be released using free(). - /// @param[in] app_control The app_control handle - /// @param[out] mime The explicit MIME type of the data this app_control is operating on - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_control_set_mime() - int app_control_get_mime( - app_control_h app_control, - ffi.Pointer> mime, - ) { - return _app_control_get_mime( - app_control, - mime, - ); - } - - late final _app_control_get_mimePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, - ffi.Pointer>)>>('app_control_get_mime'); - late final _app_control_get_mime = _app_control_get_mimePtr.asFunction< - int Function(app_control_h, ffi.Pointer>)>(); - - /// @brief Sets the explicit category. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_control The app_control handle - /// @param[in] category The explicit category (if the @a category is @c NULL, it clears the previous value) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see app_control_get_category() - int app_control_set_category( - app_control_h app_control, - ffi.Pointer category, - ) { - return _app_control_set_category( - app_control, - category, - ); - } - - late final _app_control_set_categoryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, - ffi.Pointer)>>('app_control_set_category'); - late final _app_control_set_category = _app_control_set_categoryPtr - .asFunction)>(); - - /// @brief Gets the explicit category. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The @a category must be released using free(). - /// @param[in] app_control The app_control handle - /// @param[out] category The explicit category - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_control_set_category() - int app_control_get_category( - app_control_h app_control, - ffi.Pointer> category, - ) { - return _app_control_get_category( - app_control, - category, - ); - } - - late final _app_control_get_categoryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, - ffi.Pointer>)>>('app_control_get_category'); - late final _app_control_get_category = - _app_control_get_categoryPtr.asFunction< - int Function(app_control_h, ffi.Pointer>)>(); - - /// @brief Sets the ID of the application to explicitly launch. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_control The app_control handle - /// @param[in] app_id The ID of the application to explicitly launch (if the @a app_id is @c NULL, it clears the previous value) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_control_get_app_id() - int app_control_set_app_id( - app_control_h app_control, - ffi.Pointer app_id, - ) { - return _app_control_set_app_id( - app_control, - app_id, - ); - } - - late final _app_control_set_app_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - app_control_h, ffi.Pointer)>>('app_control_set_app_id'); - late final _app_control_set_app_id = _app_control_set_app_idPtr - .asFunction)>(); - - /// @brief Gets the ID of the application to explicitly launch. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The @a app_id must be released with free(). - /// @param[in] app_control The app_control handle - /// @param[out] app_id The ID of the application to explicitly launch - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_control_set_app_id() - int app_control_get_app_id( - app_control_h app_control, - ffi.Pointer> app_id, - ) { - return _app_control_get_app_id( - app_control, - app_id, - ); - } - - late final _app_control_get_app_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, - ffi.Pointer>)>>('app_control_get_app_id'); - late final _app_control_get_app_id = _app_control_get_app_idPtr.asFunction< - int Function(app_control_h, ffi.Pointer>)>(); - - /// @brief Adds extra data to the app_control. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The function replaces any existing value for the given key. - /// @remarks The function returns #APP_CONTROL_ERROR_INVALID_PARAMETER if @a key or @a value is a zero-length string. - /// @remarks The function returns #APP_CONTROL_ERROR_KEY_REJECTED if the application tries to use the same key with the system-defined key. - /// @param[in] app_control The app_control handle - /// @param[in] key The name of the extra data - /// @param[in] value The value associated with the given key - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_KEY_REJECTED Key not available - /// @see app_control_add_extra_data_array() - /// @see app_control_remove_extra_data() - /// @see app_control_get_extra_data() - int app_control_add_extra_data( - app_control_h app_control, - ffi.Pointer key, - ffi.Pointer value, - ) { - return _app_control_add_extra_data( - app_control, - key, - value, - ); - } - - late final _app_control_add_extra_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, ffi.Pointer, - ffi.Pointer)>>('app_control_add_extra_data'); - late final _app_control_add_extra_data = - _app_control_add_extra_dataPtr.asFunction< - int Function( - app_control_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Adds the extra data array to the app_control. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The function replaces any existing value for the given key. - /// @remarks The function returns #APP_CONTROL_ERROR_INVALID_PARAMETER if @a key is a zero-length string. - /// @remarks The function returns #APP_CONTROL_ERROR_KEY_REJECTED if the application tries to use the same key with the system-defined key. - /// @param[in] app_control The app_control handle - /// @param[in] key The name of the extra data - /// @param[in] value The array value associated with the given key - /// @param[in] length The length of the array - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_KEY_REJECTED Key not available - /// @see app_control_add_extra_data() - /// @see app_control_remove_extra_data() - /// @see app_control_get_extra_data() - int app_control_add_extra_data_array( - app_control_h app_control, - ffi.Pointer key, - ffi.Pointer> value, - int length, - ) { - return _app_control_add_extra_data_array( - app_control, - key, - value, - length, - ); - } - - late final _app_control_add_extra_data_arrayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - app_control_h, - ffi.Pointer, - ffi.Pointer>, - ffi.Int)>>('app_control_add_extra_data_array'); - late final _app_control_add_extra_data_array = - _app_control_add_extra_data_arrayPtr.asFunction< - int Function(app_control_h, ffi.Pointer, - ffi.Pointer>, int)>(); - - /// @brief Removes the extra data from the app_control. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_control The app_control handle - /// @param[in] key The name of the extra data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_KEY_NOT_FOUND Specified key not found - /// @retval #APP_CONTROL_ERROR_KEY_REJECTED Key not available - /// @see app_control_add_extra_data() - /// @see app_control_add_extra_data_array() - /// @see app_control_get_extra_data() - int app_control_remove_extra_data( - app_control_h app_control, - ffi.Pointer key, - ) { - return _app_control_remove_extra_data( - app_control, - key, - ); - } - - late final _app_control_remove_extra_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, - ffi.Pointer)>>('app_control_remove_extra_data'); - late final _app_control_remove_extra_data = _app_control_remove_extra_dataPtr - .asFunction)>(); - - /// @brief Gets the extra data from the app_control. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The @a value must be released using free(). - /// @remarks The function returns #APP_CONTROL_ERROR_INVALID_DATA_TYPE if @a value is of array data type. - /// @param[in] app_control The app_control handle - /// @param[in] key The name of the extra data - /// @param[out] value The value associated with the given key - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_KEY_NOT_FOUND Specified key not found - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #APP_CONTROL_ERROR_INVALID_DATA_TYPE Invalid data type - /// @retval #APP_CONTROL_ERROR_KEY_REJECTED Key not available - /// @see app_control_add_extra_data() - /// @see app_control_add_extra_data_array() - /// @see app_control_get_extra_data() - /// @see app_control_remove_extra_data() - /// @see app_control_foreach_extra_data() - int app_control_get_extra_data( - app_control_h app_control, - ffi.Pointer key, - ffi.Pointer> value, - ) { - return _app_control_get_extra_data( - app_control, - key, - value, - ); - } - - late final _app_control_get_extra_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, ffi.Pointer, - ffi.Pointer>)>>( - 'app_control_get_extra_data'); - late final _app_control_get_extra_data = - _app_control_get_extra_dataPtr.asFunction< - int Function(app_control_h, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets the extra data array from the app_control. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The @a value must be released using free(). - /// @remarks The function returns #APP_CONTROL_ERROR_INVALID_DATA_TYPE if @a value is not of array data type. - /// @param[in] app_control The app_control handle - /// @param[in] key The name of the extra data - /// @param[out] value The array value associated with the given key - /// @param[out] length The length of the array - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_KEY_NOT_FOUND Specified key not found - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #APP_CONTROL_ERROR_INVALID_DATA_TYPE Invalid data type - /// @retval #APP_CONTROL_ERROR_KEY_REJECTED Key not available - /// @see app_control_add_extra_data() - /// @see app_control_add_extra_data_array() - /// @see app_control_remove_extra_data() - /// @see app_control_foreach_extra_data() - int app_control_get_extra_data_array( - app_control_h app_control, - ffi.Pointer key, - ffi.Pointer>> value, - ffi.Pointer length, - ) { - return _app_control_get_extra_data_array( - app_control, - key, - value, - length, - ); - } - - late final _app_control_get_extra_data_arrayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - app_control_h, - ffi.Pointer, - ffi.Pointer>>, - ffi.Pointer)>>('app_control_get_extra_data_array'); - late final _app_control_get_extra_data_array = - _app_control_get_extra_data_arrayPtr.asFunction< - int Function( - app_control_h, - ffi.Pointer, - ffi.Pointer>>, - ffi.Pointer)>(); - - /// @brief Checks whether the extra data associated with the given @a key is of array data type. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_control The app_control handle - /// @param[in] key The name of the extra data - /// @param[out] array If @c true the extra data is of array data type, - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see app_control_add_extra_data() - /// @see app_control_add_extra_data_array() - /// @see app_control_remove_extra_data() - /// @see app_control_foreach_extra_data() - int app_control_is_extra_data_array( - app_control_h app_control, - ffi.Pointer key, - ffi.Pointer array, - ) { - return _app_control_is_extra_data_array( - app_control, - key, - array, - ); - } - - late final _app_control_is_extra_data_arrayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, ffi.Pointer, - ffi.Pointer)>>('app_control_is_extra_data_array'); - late final _app_control_is_extra_data_array = - _app_control_is_extra_data_arrayPtr.asFunction< - int Function( - app_control_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Retrieves all extra data contained in app_control. - /// @details This function calls app_control_extra_data_cb() once for each key-value pair for extra data contained in app_control. \n - /// If the app_control_extra_data_cb() callback function returns @c false, then iteration will be finished. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_control The app_control handle - /// @param[in] callback The iteration callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @post This function invokes app_control_extra_data_cb(). - /// @see app_control_extra_data_cb() - int app_control_foreach_extra_data( - app_control_h app_control, - app_control_extra_data_cb callback, - ffi.Pointer user_data, - ) { - return _app_control_foreach_extra_data( - app_control, - callback, - user_data, - ); - } - - late final _app_control_foreach_extra_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, app_control_extra_data_cb, - ffi.Pointer)>>('app_control_foreach_extra_data'); - late final _app_control_foreach_extra_data = - _app_control_foreach_extra_dataPtr.asFunction< - int Function(app_control_h, app_control_extra_data_cb, - ffi.Pointer)>(); - - /// @brief Retrieves all applications that can be launched to handle the given app_control request. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_control The app_control handle - /// @param[in] callback The iteration callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Success - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @post This function invokes app_control_app_matched_cb(). - /// @see app_control_app_matched_cb() - int app_control_foreach_app_matched( - app_control_h app_control, - app_control_app_matched_cb callback, - ffi.Pointer user_data, - ) { - return _app_control_foreach_app_matched( - app_control, - callback, - user_data, - ); - } - - late final _app_control_foreach_app_matchedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, app_control_app_matched_cb, - ffi.Pointer)>>('app_control_foreach_app_matched'); - late final _app_control_foreach_app_matched = - _app_control_foreach_app_matchedPtr.asFunction< - int Function(app_control_h, app_control_app_matched_cb, - ffi.Pointer)>(); - - /// @brief Sends the launch request. - /// - /// @details The operation is mandatory information for the launch request. \n - /// If the operation is not specified, #APP_CONTROL_OPERATION_DEFAULT is used by default. - /// If the operation is #APP_CONTROL_OPERATION_DEFAULT, the application ID is mandatory to explicitly launch the application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/appmanager.launch - /// @remarks The function returns #APP_CONTROL_ERROR_LAUNCH_REJECTED if the operation value is #APP_CONTROL_OPERATION_LAUNCH_ON_EVENT which is only for handling the event from the platform or other application, refer to the @a Event module. - /// @remarks Since Tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, the launch request of the service application over out of packages is restricted by the platform. Also, implicit launch requests are NOT delivered to service applications since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. To launch a service application, an explicit launch request with application ID given by the app_control_set_app_id() must be sent. - /// @param[in] app_control The app_control handle - /// @param[in] callback The callback function to be called when the reply is delivered - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #APP_CONTROL_ERROR_APP_NOT_FOUND The application to run the given launch request is not found - /// @retval #APP_CONTROL_ERROR_LAUNCH_REJECTED The application cannot be launched in current context - /// @retval #APP_CONTROL_ERROR_LAUNCH_FAILED Failed to launch the application - /// @retval #APP_CONTROL_ERROR_TIMED_OUT Failed due to timeout. The application that handles @a app_control may be busy - /// @retval #APP_CONTROL_ERROR_PERMISSION_DENIED Permission denied - /// @post If the launch request is sent for the result, the result will come back through the app_control_reply_cb() from the callee application. Additional replies may be delivered on the app_control_enable_app_started_result_event() called. - /// @see app_control_reply_to_launch_request() - /// @see app_control_reply_cb() - /// @see app_control_enable_app_started_result_event() - int app_control_send_launch_request( - app_control_h app_control, - app_control_reply_cb callback, - ffi.Pointer user_data, - ) { - return _app_control_send_launch_request( - app_control, - callback, - user_data, - ); - } - - late final _app_control_send_launch_requestPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, app_control_reply_cb, - ffi.Pointer)>>('app_control_send_launch_request'); - late final _app_control_send_launch_request = - _app_control_send_launch_requestPtr.asFunction< - int Function( - app_control_h, app_control_reply_cb, ffi.Pointer)>(); - - /// @brief Sends the terminate request to the application that is launched by app_control. This API is only effective for some applications that are provided by default for handling platform default app_controls. You are not allowed to terminate other general applications using this API. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks Since Tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, this API can be used to terminate sub-applications which were launched as group mode by the caller application. - /// Once callee application is being terminated by this API, other applications which were launched by the callee application as a group mode will be terminated as well. - /// @param[in] app_control The app_control handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_PERMISSION_DENIED Permission denied - /// @see app_control_send_launch_request() - /// @see app_control_set_launch_mode() - int app_control_send_terminate_request( - app_control_h app_control, - ) { - return _app_control_send_terminate_request( - app_control, - ); - } - - late final _app_control_send_terminate_requestPtr = - _lookup>( - 'app_control_send_terminate_request'); - late final _app_control_send_terminate_request = - _app_control_send_terminate_requestPtr - .asFunction(); - - /// @brief Replies to the launch request sent by the caller. - /// @details If the caller application sent the launch request to receive the result, the callee application can return the result back to the caller. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The function is not allowed to send reply #APP_CONTROL_RESULT_APP_STARTED as @a result which is reserved for platform developers. - /// @param[in] reply The app_control handle in which the results of the callee are contained - /// @param[in] request The app_control handle sent by the caller - /// @param[in] result The result code of the launch request - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_control_send_launch_request() - int app_control_reply_to_launch_request( - app_control_h reply, - app_control_h request, - int result, - ) { - return _app_control_reply_to_launch_request( - reply, - request, - result, - ); - } - - late final _app_control_reply_to_launch_requestPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, app_control_h, - ffi.Int32)>>('app_control_reply_to_launch_request'); - late final _app_control_reply_to_launch_request = - _app_control_reply_to_launch_requestPtr - .asFunction(); - - /// @brief Creates and returns a copy of the given app_control handle. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks A newly created app_control should be destroyed by calling the app_control_destroy() if it is no longer needed. - /// - /// @param[out] clone If successful, a newly created app_control handle will be returned - /// @param[in] app_control The app_control handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_control_destroy() - int app_control_clone( - ffi.Pointer clone, - app_control_h app_control, - ) { - return _app_control_clone( - clone, - app_control, - ); - } - - late final _app_control_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, app_control_h)>>('app_control_clone'); - late final _app_control_clone = _app_control_clonePtr - .asFunction, app_control_h)>(); - - /// @brief Gets the application ID of the caller from the launch request. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The @a app_control must be the launch request from app_control_cb(). - /// @remarks This function returns #APP_CONTROL_ERROR_INVALID_PARAMETER if the given app_control is not the launch request. - /// @remarks The @a id must be released using free(). - /// @param[in] app_control The app_control handle from app_control_cb() - /// @param[out] id The application ID of the caller - /// @return @a 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - int app_control_get_caller( - app_control_h app_control, - ffi.Pointer> id, - ) { - return _app_control_get_caller( - app_control, - id, - ); - } - - late final _app_control_get_callerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, - ffi.Pointer>)>>('app_control_get_caller'); - late final _app_control_get_caller = _app_control_get_callerPtr.asFunction< - int Function(app_control_h, ffi.Pointer>)>(); - - /// @brief Checks whether the caller is requesting a reply from the launch request. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The @a app_control must be the launch request from app_control_cb(). - /// @remarks This function returns #APP_CONTROL_ERROR_INVALID_PARAMETER if the given app_control is not the launch request. - /// @param[in] app_control The app_control handle from app_control_cb() - /// @param[out] requested If @c true a reply is requested by the caller, - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - int app_control_is_reply_requested( - app_control_h app_control, - ffi.Pointer requested, - ) { - return _app_control_is_reply_requested( - app_control, - requested, - ); - } - - late final _app_control_is_reply_requestedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, - ffi.Pointer)>>('app_control_is_reply_requested'); - late final _app_control_is_reply_requested = - _app_control_is_reply_requestedPtr - .asFunction)>(); - - /// @brief Sets the launch mode of the application. - /// - /// @details This function allows the callee application to be launched as a group or as a single mode. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks Although launch_mode were set as #APP_CONTROL_LAUNCH_MODE_GROUP, the callee application would be launched as a single mode if the manifest file of callee application defined the launch mode as "single". - /// This function can just set the preference of the caller application to launch an application. - /// @remarks Sub-applications which were launched as a group mode always have own process. - /// - /// @param[in] app_control The app_control handle - /// @param[in] mode The launch mode of the application - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see app_control_set_launch_mode() - /// @see app_control_launch_mode_e - int app_control_set_launch_mode( - app_control_h app_control, - int mode, - ) { - return _app_control_set_launch_mode( - app_control, - mode, - ); - } - - late final _app_control_set_launch_modePtr = - _lookup>( - 'app_control_set_launch_mode'); - late final _app_control_set_launch_mode = _app_control_set_launch_modePtr - .asFunction(); - - /// @brief Gets the launch mode of the application. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks Since Tizen 3.0, if launch mode is not set in the caller application control, - /// the function returns the #APP_CONTROL_LAUNCH_MODE_SINGLE launch mode. - /// @param[in] app_control The app_control handle - /// @param[out] mode The launch mode of the application - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see app_control_get_launch_mode() - /// @see app_control_launch_mode_e - int app_control_get_launch_mode( - app_control_h app_control, - ffi.Pointer mode, - ) { - return _app_control_get_launch_mode( - app_control, - mode, - ); - } - - late final _app_control_get_launch_modePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, - ffi.Pointer)>>('app_control_get_launch_mode'); - late final _app_control_get_launch_mode = _app_control_get_launch_modePtr - .asFunction)>(); - - /// @brief Enables an additional launch result event on the launch request. - /// - /// @details The function allows to receive the #APP_CONTROL_RESULT_APP_STARTED event on\n - /// application get launched by the app_control. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks app_control_reply_cb() will be called on the APP_CONTROL_RESULT_APP_STARTED event received. - /// @param[in] app_control The app_control handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see app_control_send_launch_request() - /// @see #APP_CONTROL_RESULT_APP_STARTED - int app_control_enable_app_started_result_event( - app_control_h app_control, - ) { - return _app_control_enable_app_started_result_event( - app_control, - ); - } - - late final _app_control_enable_app_started_result_eventPtr = - _lookup>( - 'app_control_enable_app_started_result_event'); - late final _app_control_enable_app_started_result_event = - _app_control_enable_app_started_result_eventPtr - .asFunction(); - - /// @brief Gets the low memory status from the given event info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] event_info The system event info - /// @param[out] status The low memory status - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_ERROR_INVALID_CONTEXT Invalid event context - /// @see app_event_info_h - /// @see app_event_low_memory_status_e - int app_event_get_low_memory_status( - app_event_info_h event_info, - ffi.Pointer status, - ) { - return _app_event_get_low_memory_status( - event_info, - status, - ); - } - - late final _app_event_get_low_memory_statusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_event_info_h, - ffi.Pointer)>>('app_event_get_low_memory_status'); - late final _app_event_get_low_memory_status = - _app_event_get_low_memory_statusPtr - .asFunction)>(); - - /// @brief Gets the low battery status from given event info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] event_info The system event info - /// @param[out] status The low battery status - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_ERROR_INVALID_CONTEXT Invalid event context - /// @see app_event_info_h - /// @see app_event_low_battery_status_e - int app_event_get_low_battery_status( - app_event_info_h event_info, - ffi.Pointer status, - ) { - return _app_event_get_low_battery_status( - event_info, - status, - ); - } - - late final _app_event_get_low_battery_statusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_event_info_h, - ffi.Pointer)>>('app_event_get_low_battery_status'); - late final _app_event_get_low_battery_status = - _app_event_get_low_battery_statusPtr - .asFunction)>(); - - /// @brief Gets the language from the given event info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks @a lang must be released using free(). - /// @param[in] event_info The system event info - /// @param[out] lang The language changed - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_ERROR_INVALID_CONTEXT Invalid event context - /// @see app_event_info_h - int app_event_get_language( - app_event_info_h event_info, - ffi.Pointer> lang, - ) { - return _app_event_get_language( - event_info, - lang, - ); - } - - late final _app_event_get_languagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_event_info_h, - ffi.Pointer>)>>('app_event_get_language'); - late final _app_event_get_language = _app_event_get_languagePtr.asFunction< - int Function(app_event_info_h, ffi.Pointer>)>(); - - /// @brief Gets the region format from the given event info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks @a region must be released using free(). - /// @param[in] event_info The system event info - /// @param[out] region The region format changed - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_ERROR_INVALID_CONTEXT Invalid event context - /// @see app_event_info_h - int app_event_get_region_format( - app_event_info_h event_info, - ffi.Pointer> region, - ) { - return _app_event_get_region_format( - event_info, - region, - ); - } - - late final _app_event_get_region_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - app_event_info_h, ffi.Pointer>)>>( - 'app_event_get_region_format'); - late final _app_event_get_region_format = - _app_event_get_region_formatPtr.asFunction< - int Function(app_event_info_h, ffi.Pointer>)>(); - - /// @brief Gets the device orientation from the given event info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] event_info The system event info - /// @param[out] orientation The device orientation changed - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_ERROR_INVALID_CONTEXT Invalid event context - /// @see app_event_info_h - /// @see app_device_orientation_e - int app_event_get_device_orientation( - app_event_info_h event_info, - ffi.Pointer orientation, - ) { - return _app_event_get_device_orientation( - event_info, - orientation, - ); - } - - late final _app_event_get_device_orientationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_event_info_h, - ffi.Pointer)>>('app_event_get_device_orientation'); - late final _app_event_get_device_orientation = - _app_event_get_device_orientationPtr - .asFunction)>(); - - /// @brief Gets the suspended state of the application from the given event info. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks The application should not use any asynchronous operations in #APP_SUSPENDED_STATE_WILL_ENTER event. - /// Because applications will be changed to suspended state just after #APP_SUSPENDED_STATE_WILL_ENTER, asynchronous calls are not guaranteed to work properly. - /// @param[in] event_info The handle for getting the suspended state - /// @param[out] state The suspended state of the application - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_ERROR_INVALID_CONTEXT Invalid event context - int app_event_get_suspended_state( - app_event_info_h event_info, - ffi.Pointer state, - ) { - return _app_event_get_suspended_state( - event_info, - state, - ); - } - - late final _app_event_get_suspended_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_event_info_h, - ffi.Pointer)>>('app_event_get_suspended_state'); - late final _app_event_get_suspended_state = _app_event_get_suspended_statePtr - .asFunction)>(); - - /// @brief Gets the ID of the application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks @a id must be released using free(). - /// @param[out] id The ID of the application - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_ERROR_INVALID_CONTEXT The application is launched illegally, not launched by the launch system - /// @retval #APP_ERROR_OUT_OF_MEMORY Out of memory - int app_get_id( - ffi.Pointer> id, - ) { - return _app_get_id( - id, - ); - } - - late final _app_get_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>)>>('app_get_id'); - late final _app_get_id = _app_get_idPtr - .asFunction>)>(); - - /// @brief Gets the localized name of the application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks @a name must be released using free(). - /// @param[out] name The name of the application - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_ERROR_INVALID_CONTEXT The application is launched illegally, not launched by the launch system - /// @retval #APP_ERROR_OUT_OF_MEMORY Out of memory - int app_get_name( - ffi.Pointer> name, - ) { - return _app_get_name( - name, - ); - } - - late final _app_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>)>>('app_get_name'); - late final _app_get_name = _app_get_namePtr - .asFunction>)>(); - - /// @brief Gets the version of the application package. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks @a version must be released using free(). - /// @param[out] version The version of the application - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_ERROR_INVALID_CONTEXT The application is launched illegally, not launched by the launch system - /// @retval #APP_ERROR_OUT_OF_MEMORY Out of memory - int app_get_version( - ffi.Pointer> version, - ) { - return _app_get_version( - version, - ); - } - - late final _app_get_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>)>>('app_get_version'); - late final _app_get_version = _app_get_versionPtr - .asFunction>)>(); - - /// @brief Gets the absolute path to the application's data directory which is used to store private data of the application. - /// @details An application can read and write its own files in the application's data directory. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The returned path should be released. - /// @return The absolute path to the application's data directory, @n - /// otherwise a null pointer if the memory is insufficient - ffi.Pointer app_get_data_path() { - return _app_get_data_path(); - } - - late final _app_get_data_pathPtr = - _lookup Function()>>( - 'app_get_data_path'); - late final _app_get_data_path = - _app_get_data_pathPtr.asFunction Function()>(); - - /// @brief Gets the absolute path to the application's cache directory which is used to store temporary data of the application. - /// @details An application can read and write its own files in the application's cache directory. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The returned path should be released. @n - /// The files stored in the application's cache directory can be removed by setting application or platform while the application is running. - /// @return The absolute path to the application's cache directory, @n - /// otherwise a null pointer if the memory is insufficient - ffi.Pointer app_get_cache_path() { - return _app_get_cache_path(); - } - - late final _app_get_cache_pathPtr = - _lookup Function()>>( - 'app_get_cache_path'); - late final _app_get_cache_path = - _app_get_cache_pathPtr.asFunction Function()>(); - - /// @brief Gets the absolute path to the application resource directory. The resource files are delivered with the application package. - /// @details An application can only read its own files in the application's resource directory. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The returned path should be released. - /// @return The absolute path to the application's resource directory, @n - /// otherwise a null pointer if the memory is insufficient - ffi.Pointer app_get_resource_path() { - return _app_get_resource_path(); - } - - late final _app_get_resource_pathPtr = - _lookup Function()>>( - 'app_get_resource_path'); - late final _app_get_resource_path = - _app_get_resource_pathPtr.asFunction Function()>(); - - /// @brief Gets the absolute path to the application's shared data directory which is used to share data with other applications. - /// @details An application can read and write its own files in the application's shared data directory and others can only read the files. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/appdir.shareddata - /// @remarks The returned path should be released. @n - /// Since Tizen 3.0, an application that want to use shared/data directory must declare http://tizen.org/privilege/appdir.shareddata privilege. If the application doesn't declare the privilege, the framework will not create shared/data directory for the application. - /// Carefully consider the privacy implications when deciding whether to use the shared/data directory, since the application cannot control access to this directory by other applications. - /// If you want to share files with other applications, consider passing path via @ref CAPI_APP_CONTROL_MODULE API. - /// The @ref CAPI_APP_CONTROL_MODULE API supports giving permission to other applications by passing path via app_control. @n - /// The specific error code can be obtained using the get_last_result(). Error codes are described in Exception section. - /// - /// @return The absolute path to the application's shared data directory, @n - /// otherwise a null pointer if the memory is insufficient. It will return NULL for applications with api-version 3.0 or later, and set #APP_ERROR_PERMISSION_DENIED if the application does not declare the shareddata privilege. - /// @exception APP_ERROR_NONE Success - /// @exception APP_ERROR_OUT_OF_MEMORY Out of memory - /// @exception APP_ERROR_PERMISSION_DENIED Permission denied - ffi.Pointer app_get_shared_data_path() { - return _app_get_shared_data_path(); - } - - late final _app_get_shared_data_pathPtr = - _lookup Function()>>( - 'app_get_shared_data_path'); - late final _app_get_shared_data_path = _app_get_shared_data_pathPtr - .asFunction Function()>(); - - /// @brief Gets the absolute path to the application's shared resource directory which is used to share resources with other applications. - /// @details An application can read its own files in the application's shared resource directory, and others can only read the files. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The returned path should be released. - /// @return The absolute path to the application's shared resource directory, @n - /// otherwise a null pointer if the memory is insufficient - ffi.Pointer app_get_shared_resource_path() { - return _app_get_shared_resource_path(); - } - - late final _app_get_shared_resource_pathPtr = - _lookup Function()>>( - 'app_get_shared_resource_path'); - late final _app_get_shared_resource_path = _app_get_shared_resource_pathPtr - .asFunction Function()>(); - - /// @brief Gets the absolute path to the application's shared trusted directory which is used to share data with a family of trusted applications. - /// @details An application can read and write its own files in the application's shared trusted directory - /// and the family applications signed with the same certificate can read and write the files in the shared trusted directory. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The returned path should be released. - /// @return The absolute path to the application's shared trusted directory, @n - /// otherwise a null pointer if the memory is insufficient - ffi.Pointer app_get_shared_trusted_path() { - return _app_get_shared_trusted_path(); - } - - late final _app_get_shared_trusted_pathPtr = - _lookup Function()>>( - 'app_get_shared_trusted_path'); - late final _app_get_shared_trusted_path = _app_get_shared_trusted_pathPtr - .asFunction Function()>(); - - /// @brief Gets the absolute path to the application's external data directory which is used to store data of the application. - /// @details An application can read and write its own files in the application's external data directory. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The returned path should be released. @n - /// The important files stored in the application's external data directory should be encrypted because they can be exported via the external sdcard. - /// To access the path returned by this function requires the privilege - /// that is "http://tizen.org/privilege/externalstorage.appdata". - /// @return The absolute path to the application's external data directory, @n - /// otherwise a null pointer if the memory is insufficient - ffi.Pointer app_get_external_data_path() { - return _app_get_external_data_path(); - } - - late final _app_get_external_data_pathPtr = - _lookup Function()>>( - 'app_get_external_data_path'); - late final _app_get_external_data_path = _app_get_external_data_pathPtr - .asFunction Function()>(); - - /// @brief Gets the absolute path to the application's external cache directory which is used to store temporary data of the application. - /// @details An application can read and write its own files in the application's external cache directory. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The returned path should be released. @n - /// The files stored in the application's external cache directory can be removed by - /// setting application while the application is running. @n - /// The important files stored in the application's external cache directory should be - /// encrypted because they can be exported via the external sdcard. - /// To access the path returned by this function requires the privilege - /// that is "http://tizen.org/privilege/externalstorage.appdata". - /// @return The absolute path to the application's external cache directory, @n - /// otherwise a null pointer if the memory is insufficient - ffi.Pointer app_get_external_cache_path() { - return _app_get_external_cache_path(); - } - - late final _app_get_external_cache_pathPtr = - _lookup Function()>>( - 'app_get_external_cache_path'); - late final _app_get_external_cache_path = _app_get_external_cache_pathPtr - .asFunction Function()>(); - - /// @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. - /// @brief Gets the absolute path to the application's external shared data directory which is used to share data with other applications. - /// @details An application can read and write its own files in the application's external shared data directory, and others can only read the files. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specified @a path should be released. - /// To access the path returned by this function requires the privilege - /// that is "http://tizen.org/privilege/externalstorage.appdata". - /// The function may not work as intended in certain devices due to some implementation issues. - /// @return The absolute path to the application's external shared data directory, @n - /// otherwise a null pointer if the memory is insufficient - ffi.Pointer app_get_external_shared_data_path() { - return _app_get_external_shared_data_path(); - } - - late final _app_get_external_shared_data_pathPtr = - _lookup Function()>>( - 'app_get_external_shared_data_path'); - late final _app_get_external_shared_data_path = - _app_get_external_shared_data_pathPtr - .asFunction Function()>(); - - /// @brief Gets the absolute path to the application's TEP(Tizen Expansion Package) directory. The resource files are delivered with the expansion package. - /// @details An application can only read its own files in the application's TEP(Tizen Expansion Package) directory. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks The returned path should be released. - /// @return The absolute path to the application's TEP(Tizen Expansion Package) directory, @n - /// otherwise a null pointer if the memory is insufficient - ffi.Pointer app_get_tep_resource_path() { - return _app_get_tep_resource_path(); - } - - late final _app_get_tep_resource_pathPtr = - _lookup Function()>>( - 'app_get_tep_resource_path'); - late final _app_get_tep_resource_path = _app_get_tep_resource_pathPtr - .asFunction Function()>(); - - /// @brief Gets the localized translation for the specified string. - /// - /// @details If a translation is not found in the localization file(.po file), @a message is returned. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks Do not free the returned value. - /// - /// @param[in] message The string to be translated - /// @return The localized translation for the given @a message on success, - /// otherwise the given @a message - ffi.Pointer i18n_get_text( - ffi.Pointer message, - ) { - return _i18n_get_text( - message, - ); - } - - late final _i18n_get_textPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('i18n_get_text'); - late final _i18n_get_text = _i18n_get_textPtr - .asFunction Function(ffi.Pointer)>(); - - /// @brief Gets the current device orientation. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @return The current device orientation - int app_get_device_orientation() { - return _app_get_device_orientation(); - } - - late final _app_get_device_orientationPtr = - _lookup>( - 'app_get_device_orientation'); - late final _app_get_device_orientation = - _app_get_device_orientationPtr.asFunction(); - - /// @brief Runs the application's main loop until ui_app_exit() is called. - /// @details This function is the main entry point of the Tizen application. - /// The app_create_cb() callback function is called to initialize the application before the main loop of application starts up. - /// After the app_create_cb() callback function returns true, the main loop starts up and the app_control_cb() callback function is subsequently called. - /// If the app_create_cb() callback function returns false, the main loop doesn't start up and app_terminate_cb() callback function is called. - /// This main loop supports event handling for the Ecore Main Loop. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] argc The argument count - /// @param[in] argv The argument vector - /// @param[in] callback The set of callback functions to handle application lifecycle events - /// @param[in] user_data The user data to be passed to the callback functions - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_ERROR_INVALID_CONTEXT The application is launched illegally, not launched by the launch system - /// @retval #APP_ERROR_ALREADY_RUNNING The main loop already started - /// @see app_create_cb() - /// @see app_terminate_cb() - /// @see app_pause_cb() - /// @see app_resume_cb() - /// @see app_control_cb() - /// @see ui_app_exit() - /// @see #ui_app_lifecycle_callback_s - int ui_app_main( - int argc, - ffi.Pointer> argv, - ffi.Pointer callback, - ffi.Pointer user_data, - ) { - return _ui_app_main( - argc, - argv, - callback, - user_data, - ); - } - - late final _ui_app_mainPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>>('ui_app_main'); - late final _ui_app_main = _ui_app_mainPtr.asFunction< - int Function(int, ffi.Pointer>, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Exits the main loop of application. - /// @details The main loop of application stops and app_terminate_cb() is invoked. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @see ui_app_main() - /// @see app_terminate_cb() - void ui_app_exit() { - return _ui_app_exit(); - } - - late final _ui_app_exitPtr = - _lookup>('ui_app_exit'); - late final _ui_app_exit = _ui_app_exitPtr.asFunction(); - - /// @brief Adds the system event handler. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[out] event_handler The event handler - /// @param[in] event_type The system event type - /// @param[in] callback The callback function - /// @param[in] user_data The user data to be passed to the callback functions - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_event_type_e - /// @see app_event_cb - /// @see ui_app_remove_event_handler - int ui_app_add_event_handler( - ffi.Pointer event_handler, - int event_type, - app_event_cb callback, - ffi.Pointer user_data, - ) { - return _ui_app_add_event_handler( - event_handler, - event_type, - callback, - user_data, - ); - } - - late final _ui_app_add_event_handlerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - app_event_cb, - ffi.Pointer)>>('ui_app_add_event_handler'); - late final _ui_app_add_event_handler = - _ui_app_add_event_handlerPtr.asFunction< - int Function(ffi.Pointer, int, app_event_cb, - ffi.Pointer)>(); - - /// @brief Removes registered event handler. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] event_handler The event handler - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @see ui_app_add_event_handler - int ui_app_remove_event_handler( - app_event_handler_h event_handler, - ) { - return _ui_app_remove_event_handler( - event_handler, - ); - } - - late final _ui_app_remove_event_handlerPtr = - _lookup>( - 'ui_app_remove_event_handler'); - late final _ui_app_remove_event_handler = _ui_app_remove_event_handlerPtr - .asFunction(); - - /// @brief Creates a bundle object. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @return The bundle object - /// @retval @c NULL - Failure - /// @exception BUNDLE_ERROR_NONE Success - /// @exception BUNDLE_ERROR_OUT_OF_MEMORY Out of memory - /// @see bundle_free() - /// - /// @code - /// #include - /// bundle *b = bundle_create(); // Create a new bundle object - /// bundle_free(b); // Free the bundle - /// @endcode - ffi.Pointer bundle_create() { - return _bundle_create(); - } - - late final _bundle_createPtr = - _lookup Function()>>( - 'bundle_create'); - late final _bundle_create = - _bundle_createPtr.asFunction Function()>(); - - /// @brief Frees the given bundle object with key-value pairs in it. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] b The bundle object to be freed - /// @return The operation result - /// @retval BUNDLE_ERROR_NONE Success - /// @retval BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre @a b must be a valid bundle object. - /// @see bundle_create() - /// - /// @code - /// #include - /// bundle *b = bundle_create(); // Create a new bundle object - /// bundle_free(b); // Free the bundle - /// @endcode - int bundle_free( - ffi.Pointer b, - ) { - return _bundle_free( - b, - ); - } - - late final _bundle_freePtr = - _lookup)>>( - 'bundle_free'); - late final _bundle_free = - _bundle_freePtr.asFunction)>(); - - /// @brief Adds a strings array type key-value pair into a given bundle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] b The bundle object - /// @param[in] key The key - /// @param[in] str_array The string type value; if @c NULL, an empty array is created; you can change an item with - /// @param[in] len The length of the array - /// @return The operation result - /// @retval BUNDLE_ERROR_NONE Success - /// @retval BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval BUNDLE_ERROR_KEY_EXISTS Key already exists - /// @retval BUNDLE_ERROR_OUT_OF_MEMORY Out of memory - /// @pre @a b must be a valid bundle object. - /// @see bundle_get_str_array() - /// - /// @code - /// #include - /// char *sa = {"aaa", "bbb", "ccc"}; // String array of length 3 - /// bundle *b = bundle_create(); - /// bundle_add_str_array(b, "foo", sa, 3); // Add a key-value pair - /// bundle_free(b); - /// @endcode - int bundle_add_str_array( - ffi.Pointer b, - ffi.Pointer key, - ffi.Pointer> str_array, - int len, - ) { - return _bundle_add_str_array( - b, - key, - str_array, - len, - ); - } - - late final _bundle_add_str_arrayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Int)>>('bundle_add_str_array'); - late final _bundle_add_str_array = _bundle_add_str_arrayPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, int)>(); - - /// @brief Deletes a key-value object with the given key. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] b The bundle object - /// @param[in] key The given key - /// @return The operation result - /// @retval BUNDLE_ERROR_NONE Success - /// @retval BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval BUNDLE_ERROR_KEY_NOT_AVAILABLE Key not available - /// @pre @a b must be a valid bundle object. - /// - /// @code - /// #include - /// bundle *b = bundle_create(); // Create a new bundle object - /// bundle_add_str(b, "foo_key", "bar_val"); // Add a key-value pair - /// bundle_del(b, "foo_key"); // Delete "foo_key" from b - /// - /// bundle_free(b); - /// @endcode - int bundle_del( - ffi.Pointer b, - ffi.Pointer key, - ) { - return _bundle_del( - b, - key, - ); - } - - late final _bundle_delPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('bundle_del'); - late final _bundle_del = _bundle_delPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Gets a string array from a given key. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You MUST NOT free or modify the returned string. \n - /// The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] b The bundle object - /// @param[in] key The key - /// @param[out] len The array length - /// @return The pointer to the array of strings - /// @retval @c NULL - Key not found - /// @exception BUNDLE_ERROR_NONE Success - /// @exception BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception BUNDLE_ERROR_KEY_NOT_AVAILABLE Key not available - /// @pre @a b must be a valid bundle object. - /// @see bundle_add_str_array() - /// - /// @code - /// #include - /// bundle *b = bundle_create(); - /// char *sa = {"aaa", "bbb", "ccc"}; // String array of length 3 - /// bundle_add_str_array(b, "foo", sa, 3); // Add a key-value pair - /// - /// char **str_array = NULL; - /// int len_str_array = 0; - /// - /// str_array=bundle_get_str_array(b, "foo", &len_str_array); - /// // str_array = {"aaa", "bbb", "ccc"}, and len_str_array = 3 - /// - /// bundle_free(b); - /// @endcode - ffi.Pointer> bundle_get_str_array( - ffi.Pointer b, - ffi.Pointer key, - ffi.Pointer len, - ) { - return _bundle_get_str_array( - b, - key, - len, - ); - } - - late final _bundle_get_str_arrayPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer> Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('bundle_get_str_array'); - late final _bundle_get_str_array = _bundle_get_str_arrayPtr.asFunction< - ffi.Pointer> Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the number of bundle items. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] b The bundle object - /// @return The number of bundle items - /// @pre @a b must be a valid bundle object. - /// - /// @code - /// #include - /// bundle *b = bundle_create(); // Create a new bundle object - /// bundle_add_str(b, "key1", "val1"); // Add a key-value pair - /// int count = bundle_get_count(b); // count = 1 - /// bundle_add_str(b, "key2", "val2"); // Add another key-value pair - /// count = bundle_get_count(b); // count = 2 - /// - /// bundle_free(b); - /// @endcode - int bundle_get_count( - ffi.Pointer b, - ) { - return _bundle_get_count( - b, - ); - } - - late final _bundle_get_countPtr = - _lookup)>>( - 'bundle_get_count'); - late final _bundle_get_count = - _bundle_get_countPtr.asFunction)>(); - - /// @brief Gets the type of the value with a given key. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] b A bundle - /// @param[in] key A key in the bundle - /// @return The type of a key in @a b - /// @exception BUNDLE_ERROR_NONE Success - /// @exception BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception BUNDLE_ERROR_KEY_NOT_AVAILABLE Key not available - /// @pre @a b must be a valid bundle object. - /// @see bundle_type_t - int bundle_get_type( - ffi.Pointer b, - ffi.Pointer key, - ) { - return _bundle_get_type( - b, - key, - ); - } - - late final _bundle_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('bundle_get_type'); - late final _bundle_get_type = _bundle_get_typePtr - .asFunction, ffi.Pointer)>(); - - /// @brief Duplicates a given bundle object. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] b_from The bundle object to be duplicated - /// @return The new bundle object - /// @retval @c NULL - Failure - /// @exception BUNDLE_ERROR_NONE Success - /// @exception BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre @a b must be a valid bundle object. - /// - /// @code - /// #include - /// bundle *b = bundle_create(); // Create a new bundle object - /// bundle_add_str(b, "foo_key", "bar_val"); // Add a key-value pair - /// bundle *b_dup = bundle_dup(b); // Duplicate b - /// - /// bundle_free(b); - /// bundle_free(b_dup); - /// @endcode - ffi.Pointer bundle_dup( - ffi.Pointer b_from, - ) { - return _bundle_dup( - b_from, - ); - } - - late final _bundle_dupPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('bundle_dup'); - late final _bundle_dup = _bundle_dupPtr - .asFunction Function(ffi.Pointer)>(); - - /// @brief Iterates a callback function for each key-value pair in a given bundle. - /// @details Supports all types of values. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. \n - /// This function supports all types. - /// @param[in] b The bundle object - /// @param[in] iter The iteration callback function - /// @param[in] user_data The data for the callback function - /// @exception BUNDLE_ERROR_NONE Success - /// @exception BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre @a b must be a valid bundle object. - /// @see bundle_keyval_get_type() - /// @see bundle_keyval_type_is_array() - /// @see bundle_keyval_get_basic_val() - /// @see bundle_keyval_get_array_val() - /// - /// @code - /// #include - /// #include - /// void - /// sample_cb(const char *key, const int type, const bundle_keyval_t *kv, void *user_data) - /// { - /// void *basic_val = NULL; - /// size_t basic_size = 0; - /// void **array_val = NULL; - /// int array_len = 0; - /// size_t *array_elem_size = NULL; - /// - /// printf("Key:%s, Type:%d\n", key, type); - /// if (bundle_keyval_type_is_array(kv)) { - /// bundle_keyval_get_array_val(kv, &array_val, &array_len, &array_elem_size); - /// // Do something - /// } - /// else { - /// bundle_keyval_get_basic_val(kv, &basic_val, &basic_size); - /// // Do something - /// } - /// } - /// - /// int main(void) - /// { - /// bundle *b = bundle_create(); // Create a new bundle object - /// bundle_add_str(b, "k1", "v1"); // Add a key-value pair - /// bundle_add_byte(b, "k2", "v2", 3); // Add a key-value pair - /// char *s_arr[] = {"abc", "bcd", "cde"}; - /// bundle_add_str_array(b, "k3", s_arr, 3); // Add a key-value pair - /// bundle_foreach(b, sample_cb, NULL); // Iterate sample_cb() for each key/value - /// - /// return 0; - /// } - /// @endcode - void bundle_foreach( - ffi.Pointer b, - bundle_iterator_t iter, - ffi.Pointer user_data, - ) { - return _bundle_foreach( - b, - iter, - user_data, - ); - } - - late final _bundle_foreachPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, bundle_iterator_t, - ffi.Pointer)>>('bundle_foreach'); - late final _bundle_foreach = _bundle_foreachPtr.asFunction< - void Function( - ffi.Pointer, bundle_iterator_t, ffi.Pointer)>(); - - /// @brief Gets the type of a key-value pair. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] kv A bundle_keyval_t object - /// @return The type of @a kv - /// @retval @c -1 - Failure - /// @exception BUNDLE_ERROR_NONE Success - /// @exception BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre @a kv must be a valid bundle_keyval_t object. - /// @see bundle_foreach() - int bundle_keyval_get_type( - ffi.Pointer kv, - ) { - return _bundle_keyval_get_type( - kv, - ); - } - - late final _bundle_keyval_get_typePtr = _lookup< - ffi.NativeFunction)>>( - 'bundle_keyval_get_type'); - late final _bundle_keyval_get_type = _bundle_keyval_get_typePtr - .asFunction)>(); - - /// @brief Determines whether the type of a key-value pair is an array. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] kv A bundle_keyval_t object - /// @return The operation result - /// @retval @c 1 - @a kv is an array - /// @retval @c 0 - @a kv is not an array - /// @exception BUNDLE_ERROR_NONE Success - /// @exception BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre @a kv must be a valid bundle_keyval_t object. - /// @see bundle_foreach() - int bundle_keyval_type_is_array( - ffi.Pointer kv, - ) { - return _bundle_keyval_type_is_array( - kv, - ); - } - - late final _bundle_keyval_type_is_arrayPtr = _lookup< - ffi.NativeFunction)>>( - 'bundle_keyval_type_is_array'); - late final _bundle_keyval_type_is_array = _bundle_keyval_type_is_arrayPtr - .asFunction)>(); - - /// @brief Gets the value and size of the value from a key-value pair of basic type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must not free @a val. - /// @param[in] kv A bundle_keyval_t object - /// @param[out] val The value - /// @param[out] size The size of @a val - /// @return The operation result - /// @retval BUNDLE_ERROR_NONE Success - /// @retval BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre @a kv must be a valid bundle_keyval_t object. - /// @post @a val and @a size are set. - /// @see bundle_foreach() - int bundle_keyval_get_basic_val( - ffi.Pointer kv, - ffi.Pointer> val, - ffi.Pointer size, - ) { - return _bundle_keyval_get_basic_val( - kv, - val, - size, - ); - } - - late final _bundle_keyval_get_basic_valPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('bundle_keyval_get_basic_val'); - late final _bundle_keyval_get_basic_val = - _bundle_keyval_get_basic_valPtr.asFunction< - int Function(ffi.Pointer, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Gets the value array, length of the array, and size of each array item. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] kv A bundle_keyval_t object - /// @param[out] array_val The array pointer of values - /// @param[out] array_len The length of @a array_val - /// @param[out] array_element_size The array of size of each array element - /// @return The operation result - /// @retval BUNDLE_ERROR_NONE Success - /// @retval BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre @a kv must be a valid bundle_keyval_t object. - /// @post @a array_val, @a array_len, @a array_item_size are set. - /// @see bundle_foreach() - int bundle_keyval_get_array_val( - ffi.Pointer kv, - ffi.Pointer>> array_val, - ffi.Pointer array_len, - ffi.Pointer> array_element_size, - ) { - return _bundle_keyval_get_array_val( - kv, - array_val, - array_len, - array_element_size, - ); - } - - late final _bundle_keyval_get_array_valPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>>, - ffi.Pointer, - ffi.Pointer>)>>( - 'bundle_keyval_get_array_val'); - late final _bundle_keyval_get_array_val = - _bundle_keyval_get_array_valPtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer>>, - ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Encodes a bundle to the bundle_raw format (uses base64 format). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] b The bundle object - /// @param[out] r The returned bundle_raw data(byte data) - /// @a r MUST BE FREED by free(r) - /// @param[out] len The size of @a r (in bytes) - /// @return The size of the raw data - /// @retval BUNDLE_ERROR_NONE Success - /// @retval BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre @a b must be a valid bundle object. - /// - /// @code - /// #include - /// bundle *b = bundle_create(); // Create a new bundle object - /// bundle_add_str(b, "foo_key", "bar_val"); // Add a key-value pair - /// bundle_raw *r; - /// int len; - /// bundle_encode(b, &r, &len); // Encode b - /// - /// bundle_free(b); - /// @endcode - int bundle_encode( - ffi.Pointer b, - ffi.Pointer> r, - ffi.Pointer len, - ) { - return _bundle_encode( - b, - r, - len, - ); - } - - late final _bundle_encodePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('bundle_encode'); - late final _bundle_encode = _bundle_encodePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Deserializes bundle_raw and gets the bundle object. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] r The bundle_raw data to be converted to bundle object - /// @param[in] len The size of @a r - /// @return The bundle object - /// @retval @c NULL - Failure - /// @exception BUNDLE_ERROR_NONE Success - /// @exception BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre @a b must be a valid bundle object. - /// - /// @code - /// #include - /// bundle *b = bundle_create(); // Create a new bundle object - /// bundle_add_str(b, "foo_key", "bar_val"); // Add a key-value pair - /// - /// bundle_raw *encoded_b; - /// int len; - /// bundle_encode(b, &encoded_b, &len); // Encode b - /// - /// bundle *b_dup; - /// b_dup = bundle_decode(encoded_b, len); // Decoded bundle object - /// - /// bundle_free(b); - /// free(encoded_b); - /// bundle_free(b_dup); - /// @endcode - ffi.Pointer bundle_decode( - ffi.Pointer r, - int len, - ) { - return _bundle_decode( - r, - len, - ); - } - - late final _bundle_decodePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Int)>>('bundle_decode'); - late final _bundle_decode = _bundle_decodePtr - .asFunction Function(ffi.Pointer, int)>(); - - /// @brief Adds a string type key-value pair into a bundle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] b The bundle object - /// @param[in] key The key - /// @param[in] str The string type value - /// @return The operation result - /// @retval BUNDLE_ERROR_NONE Success - /// @retval BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval BUNDLE_ERROR_KEY_EXISTS Key already exists - /// @retval BUNDLE_ERROR_OUT_OF_MEMORY Out of memory - /// @pre @a b must be a valid bundle object. - /// @see bundle_get_str() - /// @code - /// #include - /// bundle *b = bundle_create(); // Create a new bundle object - /// bundle_add_str(b, "foo", "bar"); // Add a key-value pair - /// - /// bundle_free(b); - /// @endcode - int bundle_add_str( - ffi.Pointer b, - ffi.Pointer key, - ffi.Pointer str, - ) { - return _bundle_add_str( - b, - key, - str, - ); - } - - late final _bundle_add_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('bundle_add_str'); - late final _bundle_add_str = _bundle_add_strPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Adds a byte type key-value pair into a bundle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] b The bundle object - /// @param[in] key The key - /// @param[in] byte The string type value - /// @param[in] size The size of @a byte - /// @return The operation result - /// @retval BUNDLE_ERROR_NONE Success - /// @retval BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval BUNDLE_ERROR_KEY_EXISTS Key already exists - /// @retval BUNDLE_ERROR_OUT_OF_MEMORY Out of memory - /// @pre @a b must be a valid bundle object. - /// @see bundle_get_byte() - /// - /// @code - /// #include - /// bundle *b = bundle_create(); // Create a new bundle object - /// bundle_add_byte(b, "foo", "bar\0", 4); // Add a key-value pair - /// - /// int number = 12345; - /// bundle_add_byte(b, "number", &number, sizeof(int)); - /// - /// bundle_free(b); - /// @endcode - int bundle_add_byte( - ffi.Pointer b, - ffi.Pointer key, - ffi.Pointer byte, - int size, - ) { - return _bundle_add_byte( - b, - key, - byte, - size, - ); - } - - late final _bundle_add_bytePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Size)>>('bundle_add_byte'); - late final _bundle_add_byte = _bundle_add_bytePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - /// @brief Gets the string value with the given key. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must not free str. - /// @param[in] b The bundle object - /// @param[in] key The key - /// @param[out] str The returned value - /// @return The operation result - /// @retval BUNDLE_ERROR_NONE Success - /// @retval BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval BUNDLE_ERROR_KEY_NOT_AVAILABLE Key not available - /// @pre @a b must be a valid bundle object. - /// @see bundle_add_str() - /// - /// @code - /// #include - /// bundle *b = bundle_create(); // Create a new bundle object - /// bundle_add_str(b, "foo_key", "bar_val"); // Add a key-value pair - /// - /// char *v = NULL; - /// bundle_get_str(b, "foo_key", &v); // v = "bar_val" - /// - /// bundle_free(b); // After freeing b, v becomes a dangling pointer - /// v = NULL; - /// @endcode - int bundle_get_str( - ffi.Pointer b, - ffi.Pointer key, - ffi.Pointer> str, - ) { - return _bundle_get_str( - b, - key, - str, - ); - } - - late final _bundle_get_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('bundle_get_str'); - late final _bundle_get_str = _bundle_get_strPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets the byte value with the given key. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must not free @a byte. - /// @param[in] b The bundle object - /// @param[in] key The key - /// @param[out] byte The returned value - /// @param[out] size The size of the byte - /// @return The operation result - /// @retval BUNDLE_ERROR_NONE Success - /// @retval BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval BUNDLE_ERROR_KEY_NOT_AVAILABLE Key not available - /// @pre @a b must be a valid bundle object. - /// @see bundle_add_byte() - /// - /// @code - /// #include - /// bundle *b = bundle_create(); // Create a new bundle object - /// bundle_add_byte(b, "foo", "bar\0", 4); // Add a string to the bundle - /// int number = 12345; - /// bundle_add_byte(b, "number", (const void**)&number, sizeof(int)); // Add an integer to the bundle - /// - /// unsigned char *v = NULL; - /// size_t v_size; - /// bundle_get_byte(b, "foo", (void**)&v, &v_size); // v = "bar\0" - /// int *n = NULL; - /// size_t n_size; - /// bundle_get_byte(b, "number", (void**)&n, &n_size); // number = 12345 - /// - /// bundle_free(b); // After freeing b, v and n become a dangling pointer - /// @endcode - int bundle_get_byte( - ffi.Pointer b, - ffi.Pointer key, - ffi.Pointer> byte, - ffi.Pointer size, - ) { - return _bundle_get_byte( - b, - key, - byte, - size, - ); - } - - late final _bundle_get_bytePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('bundle_get_byte'); - late final _bundle_get_byte = _bundle_get_bytePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Shows a toast popup window with given message. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] message The messages to be posted - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #NOTIFICATION_ERROR_FROM_DBUS Error from DBus - /// @see #notification_error_e - int notification_status_message_post( - ffi.Pointer message, - ) { - return _notification_status_message_post( - message, - ); - } - - late final _notification_status_message_postPtr = - _lookup)>>( - 'notification_status_message_post'); - late final _notification_status_message_post = - _notification_status_message_postPtr - .asFunction)>(); - - /// @brief Sets an absolute path for an image file to display on the notification view. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] type The notification image type - /// @param[in] image_path The image file full path - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Notification handle should be created by notification_create(). - /// @see #notification_image_type_e - /// @see notification_create() - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) - /// return; - /// - /// noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, APP_IMAGE_FULL_PATH); - /// if (noti_err != NOTIFICATION_ERROR_NONE) { - /// notification_free(noti); - /// return; - /// } - /// } - /// @endcode - int notification_set_image( - notification_h noti, - int type, - ffi.Pointer image_path, - ) { - return _notification_set_image( - noti, - type, - image_path, - ); - } - - late final _notification_set_imagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Int32, - ffi.Pointer)>>('notification_set_image'); - late final _notification_set_image = _notification_set_imagePtr - .asFunction)>(); - - /// @brief Gets the absolute path of an image file. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @remarks Do not free @a image_path. It will be freed when notification_free() is called. - /// @param[in] noti Notification handle - /// @param[in] type Notification image type - /// @param[out] image_path Image file full path - /// @return NOTIFICATION_ERROR_NONE on success, - /// other value on failure - /// @retval NOTIFICATION_ERROR_NONE Success - /// @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Notification handle should be created by notification_create(). - /// @see #notification_image_type_e - /// @see notification_create() - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// char *image_path = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti_err = notification_get_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, &image_path); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// } - /// @endcode - int notification_get_image( - notification_h noti, - int type, - ffi.Pointer> image_path, - ) { - return _notification_get_image( - noti, - type, - image_path, - ); - } - - late final _notification_get_imagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Int32, - ffi.Pointer>)>>('notification_get_image'); - late final _notification_get_image = _notification_get_imagePtr.asFunction< - int Function(notification_h, int, ffi.Pointer>)>(); - - /// @brief Sets a timestamp. - /// @details If input_time is @c 0, time information is taken from the current time. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] input_time The input time. If you want the time stamp to not be shown, set this as NOTIFICATION_DO_NOT_SHOW_TIME_STAMP - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Notification handle should be created by notification_create(). - /// @see notification_create() - /// @see NOTIFICATION_DO_NOT_SHOW_TIME_STAMP - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) - /// return; - /// - /// noti_err = notification_set_time(noti, time(NULL)); - /// if (noti_err != NOTIFICATION_ERROR_NONE) { - /// notification_free(noti); - /// return; - /// } - /// } - /// @endcode - int notification_set_time( - notification_h noti, - int input_time, - ) { - return _notification_set_time( - noti, - input_time, - ); - } - - late final _notification_set_timePtr = - _lookup>( - 'notification_set_time'); - late final _notification_set_time = - _notification_set_timePtr.asFunction(); - - /// @brief Gets a timestamp. - /// @details If ret_time is @c 0, time information is not set before. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[out] ret_time The return time value - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Notification handle should be created by notification_create(). - /// @see notification_create() - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// time_t ret_time; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti_err = notification_get_time(noti, &ret_time); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// } - /// @endcode - int notification_get_time( - notification_h noti, - ffi.Pointer ret_time, - ) { - return _notification_get_time( - noti, - ret_time, - ); - } - - late final _notification_get_timePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - notification_h, ffi.Pointer)>>('notification_get_time'); - late final _notification_get_time = _notification_get_timePtr - .asFunction)>(); - - /// @brief Gets an insertion timestamp of the notification. - /// @details If ret_time is @c 0, this notification data is not inserted before. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[out] ret_time The return time value - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// time_t ret_time; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti_err = notification_get_insert_time(noti, &ret_time); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// } - /// @endcode - int notification_get_insert_time( - notification_h noti, - ffi.Pointer ret_time, - ) { - return _notification_get_insert_time( - noti, - ret_time, - ); - } - - late final _notification_get_insert_timePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, - ffi.Pointer)>>('notification_get_insert_time'); - late final _notification_get_insert_time = _notification_get_insert_timePtr - .asFunction)>(); - - /// @brief Sets the text to display on the notification view. - /// @details Sets title, content string. If the text is formatted data (only %d, %f, %s are supported), type - value pair should be set. - /// If %d, the type #NOTIFICATION_VARIABLE_TYPE_INT and the value is an integer. - /// If %f, the type #NOTIFICATION_VARIABLE_TYPE_DOUBLE and the value is a double. - /// If %s, the type #NOTIFICATION_VARIABLE_TYPE_STRING and the value is a string. - /// If the type is #NOTIFICATION_VARIABLE_TYPE_COUNT, notification count is displaying with text. - /// If the value is #NOTIFICATION_COUNT_POS_LEFT, count is displayed at the left of the text. - /// If the value is #NOTIFICATION_COUNT_POS_IN, count is displayed in the text when text has %d format. - /// If the value is #NOTIFICATION_COUNT_POS_RIGHT, count is displayed at the right of the text. - /// Variable parameters should be terminated #NOTIFICATION_VARIABLE_TYPE_NONE. - /// - /// Note that You can display the translated contents according to the language of the system. - /// The application must supply a String KEY as the fourth argument to support localization. - /// If the language on the system changes, the contents of the notification are also translated. - /// - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] type The notification text type - /// @param[in] text The basic text - /// @param[in] key The text key for localization - /// @param[in] args_type The variable parameter that type - value pair - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre notification handle should be created by notification_create(). - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) - /// return; - /// - /// noti_err = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, - /// "I'm Title", "IDS_APP_BODY_IM_TITLE", NOTIFICATION_VARIABLE_TYPE_NONE); - /// if (noti_err != NOTIFICATION_ERROR_NONE) { - /// notification_free(noti); - /// return; - /// } - /// } - /// @endcode - int notification_set_text( - notification_h noti, - int type, - ffi.Pointer text, - ffi.Pointer key, - int args_type, - ) { - return _notification_set_text( - noti, - type, - text, - key, - args_type, - ); - } - - late final _notification_set_textPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Int32, ffi.Pointer, - ffi.Pointer, ffi.Int)>>('notification_set_text'); - late final _notification_set_text = _notification_set_textPtr.asFunction< - int Function(notification_h, int, ffi.Pointer, - ffi.Pointer, int)>(); - - /// @brief Gets the text from the notification handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] type The notification text type - /// @param[out] text The notification text - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// char *text = NULL; - /// - /// noti_err = notification_get_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, &text); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_get_text( - notification_h noti, - int type, - ffi.Pointer> text, - ) { - return _notification_get_text( - noti, - type, - text, - ); - } - - late final _notification_get_textPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Int32, - ffi.Pointer>)>>('notification_get_text'); - late final _notification_get_text = _notification_get_textPtr.asFunction< - int Function(notification_h, int, ffi.Pointer>)>(); - - /// @brief Sets the timestamp to display on the notification view. - /// @details The timestamp will be converted to a formatted string and it will be displayed on the set text area. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] type The notification text type - /// @param[in] time The timestamp - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Notification handle should be created by notification_create(). - int notification_set_time_to_text( - notification_h noti, - int type, - int time, - ) { - return _notification_set_time_to_text( - noti, - type, - time, - ); - } - - late final _notification_set_time_to_textPtr = _lookup< - ffi - .NativeFunction>( - 'notification_set_time_to_text'); - late final _notification_set_time_to_text = _notification_set_time_to_textPtr - .asFunction(); - - /// @brief Gets the timestamp from the notification handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] type The notification text type - /// @param[in] time The pointer of time stamp - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Notification handle should be created by notification_create(). - int notification_get_time_from_text( - notification_h noti, - int type, - ffi.Pointer time, - ) { - return _notification_get_time_from_text( - noti, - type, - time, - ); - } - - late final _notification_get_time_from_textPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Int32, - ffi.Pointer)>>('notification_get_time_from_text'); - late final _notification_get_time_from_text = - _notification_get_time_from_textPtr - .asFunction)>(); - - /// @brief Sets the sound type for the notification. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] type The notification sound type - /// @param[in] path The user sound file path - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti_err = notification_set_sound(noti, NOTIFICATION_SOUND_TYPE_DEFAULT, NULL); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_set_sound( - notification_h noti, - int type, - ffi.Pointer path, - ) { - return _notification_set_sound( - noti, - type, - path, - ); - } - - late final _notification_set_soundPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Int32, - ffi.Pointer)>>('notification_set_sound'); - late final _notification_set_sound = _notification_set_soundPtr - .asFunction)>(); - - /// @brief Gets the sound type from the notification handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[out] type The notification sound type - /// @param[out] path The user sound file path - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// notification_sound_type_e type = NOTIFICATION_SOUND_TYPE_NONE; - /// - /// noti_err = notification_get_sound(noti, &type, NULL); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_get_sound( - notification_h noti, - ffi.Pointer type, - ffi.Pointer> path, - ) { - return _notification_get_sound( - noti, - type, - path, - ); - } - - late final _notification_get_soundPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Pointer, - ffi.Pointer>)>>('notification_get_sound'); - late final _notification_get_sound = _notification_get_soundPtr.asFunction< - int Function(notification_h, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Sets the vibration type for the notification. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] type The notification vibration type - /// @param[in] path The user vibration file path - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti_err = notification_set_vibration(noti, NOTIFICATION_VIBRATION_TYPE_DEFAULT, NULL); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_set_vibration( - notification_h noti, - int type, - ffi.Pointer path, - ) { - return _notification_set_vibration( - noti, - type, - path, - ); - } - - late final _notification_set_vibrationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Int32, - ffi.Pointer)>>('notification_set_vibration'); - late final _notification_set_vibration = _notification_set_vibrationPtr - .asFunction)>(); - - /// @brief Gets the vibrate type from the notification handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[out] type The notification sound type - /// @param[out] path The user vibration file path - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// notification_vibration_type_e type = NOTIFICATION_VIBRATION_TYPE_NONE; - /// - /// noti_err = notification_get_vibration(noti, &type, NULL); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_get_vibration( - notification_h noti, - ffi.Pointer type, - ffi.Pointer> path, - ) { - return _notification_get_vibration( - noti, - type, - path, - ); - } - - late final _notification_get_vibrationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Pointer, - ffi.Pointer>)>>( - 'notification_get_vibration'); - late final _notification_get_vibration = - _notification_get_vibrationPtr.asFunction< - int Function(notification_h, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Sets the LED displaying option. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] operation The LED notification operation - /// @param[in] led_argb The notification LED color - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti_err = notification_set_led(noti, NOTIFICATION_LED_OP_ON, NULL); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_set_led( - notification_h noti, - int operation, - int led_argb, - ) { - return _notification_set_led( - noti, - operation, - led_argb, - ); - } - - late final _notification_set_ledPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - notification_h, ffi.Int32, ffi.Int)>>('notification_set_led'); - late final _notification_set_led = _notification_set_ledPtr - .asFunction(); - - /// @brief Gets the LED displaying option from the notification handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[out] operation The LED notification operation - /// @param[out] led_argb The notification LED color - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// notification_led_type_e type = NOTIFICATION_LED_OP_OFF; - /// - /// noti_err = notification_get_led(noti, &type, NULL); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_get_led( - notification_h noti, - ffi.Pointer operation, - ffi.Pointer led_argb, - ) { - return _notification_get_led( - noti, - operation, - led_argb, - ); - } - - late final _notification_get_ledPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Pointer, - ffi.Pointer)>>('notification_get_led'); - late final _notification_get_led = _notification_get_ledPtr.asFunction< - int Function( - notification_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the time period of flashing the LED. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] on_ms The time for turning on the LED - /// @param[in] off_ms The time for turning off the LED - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti_err = notification_set_led_time_period(noti, 100, 100); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_set_led_time_period( - notification_h noti, - int on_ms, - int off_ms, - ) { - return _notification_set_led_time_period( - noti, - on_ms, - off_ms, - ); - } - - late final _notification_set_led_time_periodPtr = _lookup< - ffi - .NativeFunction>( - 'notification_set_led_time_period'); - late final _notification_set_led_time_period = - _notification_set_led_time_periodPtr - .asFunction(); - - /// @brief Gets the time period of flashing the LED from the notification handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[out] on_ms The time for turning on the LED - /// @param[out] off_ms The time for turning on the LED - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// int led_on_ms = 0; - /// int led_off_ms = 0; - /// - /// noti_err = notification_get_led_time_period(noti, &led_on_ms, &led_off_ms); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_get_led_time_period( - notification_h noti, - ffi.Pointer on_ms, - ffi.Pointer off_ms, - ) { - return _notification_get_led_time_period( - noti, - on_ms, - off_ms, - ); - } - - late final _notification_get_led_time_periodPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Pointer, - ffi.Pointer)>>('notification_get_led_time_period'); - late final _notification_get_led_time_period = - _notification_get_led_time_periodPtr.asFunction< - int Function( - notification_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the launch option for a notification. - /// @details When notification data selected in display application, application launched by app_control_send_launch_request with app_control handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] type Launching option type - /// @param[in] option App Control handler - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// app_control_h app_control = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// // Do something - /// - /// app_control_create(&app_control); - /// app_control_set_app_id(app_control, "org.tizen.app"); - /// - /// // Do something - /// - /// noti_err = notification_set_launch_option(noti, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, (void *)app_control); - /// if (noti_err != NOTIFICATION_ERROR_NONE) { - /// app_control_destroy(app_control); - /// notification_free(noti); - /// return; - /// } - /// - /// app_control_destroy(app_control); - /// } - /// @endcode - int notification_set_launch_option( - notification_h noti, - int type, - ffi.Pointer option, - ) { - return _notification_set_launch_option( - noti, - type, - option, - ); - } - - late final _notification_set_launch_optionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Int32, - ffi.Pointer)>>('notification_set_launch_option'); - late final _notification_set_launch_option = - _notification_set_launch_optionPtr.asFunction< - int Function(notification_h, int, ffi.Pointer)>(); - - /// @brief Gets the launch option from the notification handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @remarks You must release @a app_control using app_control_destroy(). - /// @param[in] noti The notification handle - /// @param[in] type Launching option type - /// @param[out] option The pointer of App Control handler - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// app_control_h app_control = NULL; - /// app_control_create(&app_control); - /// - /// // Do something - /// - /// noti_err = notification_get_launch_option(noti, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, (void *)&app_control); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// } - /// @endcode - int notification_get_launch_option( - notification_h noti, - int type, - ffi.Pointer option, - ) { - return _notification_get_launch_option( - noti, - type, - option, - ); - } - - late final _notification_get_launch_optionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Int32, - ffi.Pointer)>>('notification_get_launch_option'); - late final _notification_get_launch_option = - _notification_get_launch_optionPtr.asFunction< - int Function(notification_h, int, ffi.Pointer)>(); - - /// @brief Sets the handler for a specific event. - /// @details When some event occurs on notification, application launched by app_control_send_launch_request with app_control handle. \n - /// Setting event handler of a button means that the notification will show the button. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] noti The notification handle - /// @param[in] event_type Event type - /// @param[in] event_handler App control handle - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @see #notification_event_type_e - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// app_control_h app_control = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// // Do something - /// - /// app_control_create(&app_control); - /// app_control_set_app_id(app_control, "org.tizen.app"); - /// - /// // Do something - /// - /// noti_err = notification_set_event_handler(noti, NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_1, app_control); - /// if (noti_err != NOTIFICATION_ERROR_NONE) { - /// app_control_destroy(app_control); - /// notification_free(noti); - /// return; - /// } - /// - /// app_control_destroy(app_control); - /// } - /// @endcode - int notification_set_event_handler( - notification_h noti, - int event_type, - app_control_h event_handler, - ) { - return _notification_set_event_handler( - noti, - event_type, - event_handler, - ); - } - - late final _notification_set_event_handlerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Int32, - app_control_h)>>('notification_set_event_handler'); - late final _notification_set_event_handler = - _notification_set_event_handlerPtr - .asFunction(); - - /// @brief Gets the event handler of a specific event. - /// @remarks You must release @a app_control using app_control_destroy(). - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] noti The notification handle - /// @param[in] event_type Launching option type - /// @param[out] event_handler The handler of App Control - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @see #notification_event_type_e - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// app_control_h app_control = NULL; - /// app_control_create(&app_control); - /// - /// // Do something - /// - /// noti_err = notification_get_event_handler(noti, NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_1, &app_control); - /// if (noti_err != NOTIFICATION_ERROR_NONE) { - /// notification_free(noti); - /// return; - /// } - /// } - /// @endcode - int notification_get_event_handler( - notification_h noti, - int event_type, - ffi.Pointer event_handler, - ) { - return _notification_get_event_handler( - noti, - event_type, - event_handler, - ); - } - - late final _notification_get_event_handlerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Int32, - ffi.Pointer)>>('notification_get_event_handler'); - late final _notification_get_event_handler = - _notification_get_event_handlerPtr.asFunction< - int Function(notification_h, int, ffi.Pointer)>(); - - /// @brief Sets the property of the notification. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] flags The property with | operation - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// bundle *b = NULL; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) - /// return; - /// - /// noti_err = notification_set_property(noti, NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE | NOTIFICATION_PROP_DISABLE_APP_LAUNCH); - /// if (noti_err != NOTIFICATION_ERROR_NONE) { - /// notification_free(noti); - /// return; - /// } - /// } - /// @endcode - int notification_set_property( - notification_h noti, - int flags, - ) { - return _notification_set_property( - noti, - flags, - ); - } - - late final _notification_set_propertyPtr = - _lookup>( - 'notification_set_property'); - late final _notification_set_property = _notification_set_propertyPtr - .asFunction(); - - /// @brief Gets the property of the notification from the notification handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[out] flags The notification property - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// int flags = 0; - /// - /// noti_err = notification_get_property(noti, &flags); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_get_property( - notification_h noti, - ffi.Pointer flags, - ) { - return _notification_get_property( - noti, - flags, - ); - } - - late final _notification_get_propertyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, - ffi.Pointer)>>('notification_get_property'); - late final _notification_get_property = _notification_get_propertyPtr - .asFunction)>(); - - /// @brief Sets applications to display the notification. - /// @details All display application is enabled(NOTIFICATION_DISPLAY_APP_ALL) if you do not call this API. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] applist The with | operation - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// bundle *b = NULL; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) - /// return; - /// - /// noti_err = notification_set_display_applist(noti, NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY | - /// NOTIFICATION_DISPLAY_APP_TICKER | NOTIFICATION_DISPLAY_APP_INDICATOR); - /// if (noti_err != NOTIFICATION_ERROR_NONE) { - /// notification_free(noti); - /// return; - /// } - /// } - /// @endcode - int notification_set_display_applist( - notification_h noti, - int applist, - ) { - return _notification_set_display_applist( - noti, - applist, - ); - } - - late final _notification_set_display_applistPtr = - _lookup>( - 'notification_set_display_applist'); - late final _notification_set_display_applist = - _notification_set_display_applistPtr - .asFunction(); - - /// @brief Gets the application list displaying the notification from the notification handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[out] applist The display application list - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// int applist = 0; - /// - /// noti_err = notification_get_display_applist(noti, &applist); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_get_display_applist( - notification_h noti, - ffi.Pointer applist, - ) { - return _notification_get_display_applist( - noti, - applist, - ); - } - - late final _notification_get_display_applistPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, - ffi.Pointer)>>('notification_get_display_applist'); - late final _notification_get_display_applist = - _notification_get_display_applistPtr - .asFunction)>(); - - /// @brief Sets the initial size for the ongoing type. - /// @details After notification_post() call, the size is not updated. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] size The double type size - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) - /// return; - /// - /// noti_err = notification_set_size(noti, 0.0); - /// if (noti_err != NOTIFICATION_ERROR_NONE) { - /// notification_free(noti); - /// return; - /// } - /// } - /// @endcode - int notification_set_size( - notification_h noti, - double size, - ) { - return _notification_set_size( - noti, - size, - ); - } - - late final _notification_set_sizePtr = - _lookup>( - 'notification_set_size'); - late final _notification_set_size = _notification_set_sizePtr - .asFunction(); - - /// @brief Gets the progress size. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[out] size The progress size - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// double size = 0.0; - /// - /// noti_err = notification_get_size(noti, &size); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// } - /// @endcode - int notification_get_size( - notification_h noti, - ffi.Pointer size, - ) { - return _notification_get_size( - noti, - size, - ); - } - - late final _notification_get_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, - ffi.Pointer)>>('notification_get_size'); - late final _notification_get_size = _notification_get_sizePtr - .asFunction)>(); - - /// @brief Sets the initial progress for the ongoing type. - /// @details After the notification_post() call, the progress is not updated. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] percentage The progress percentage - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) - /// return; - /// - /// noti_err = notification_set_progress(noti, 0.0); - /// if (noti_err != NOTIFICATION_ERROR_NONE) { - /// notification_free(noti); - /// return; - /// } - /// } - /// @endcode - int notification_set_progress( - notification_h noti, - double percentage, - ) { - return _notification_set_progress( - noti, - percentage, - ); - } - - late final _notification_set_progressPtr = - _lookup>( - 'notification_set_progress'); - late final _notification_set_progress = _notification_set_progressPtr - .asFunction(); - - /// @brief Gets the progress from the notification handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @remarks At the end of the operation, the progress should be @c 1.0. - /// @param[in] noti The notification handle - /// @param[out] percentage The progress percentage - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// double percentage = 0.0; - /// - /// noti_err = notification_get_progress(noti, &percentage); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_get_progress( - notification_h noti, - ffi.Pointer percentage, - ) { - return _notification_get_progress( - noti, - percentage, - ); - } - - late final _notification_get_progressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, - ffi.Pointer)>>('notification_get_progress'); - late final _notification_get_progress = _notification_get_progressPtr - .asFunction)>(); - - /// @brief Sets the layout of the notification view. - /// @details Caller can set displaying layout of notification. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] layout The type of layout - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @see #notification_ly_type_e - int notification_set_layout( - notification_h noti, - int layout, - ) { - return _notification_set_layout( - noti, - layout, - ); - } - - late final _notification_set_layoutPtr = - _lookup>( - 'notification_set_layout'); - late final _notification_set_layout = _notification_set_layoutPtr - .asFunction(); - - /// @brief Gets the layout of the notification view from the notification handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[out] layout The type of layout - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @see #notification_ly_type_e - int notification_get_layout( - notification_h noti, - ffi.Pointer layout, - ) { - return _notification_get_layout( - noti, - layout, - ); - } - - late final _notification_get_layoutPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, - ffi.Pointer)>>('notification_get_layout'); - late final _notification_get_layout = _notification_get_layoutPtr - .asFunction)>(); - - /// @brief Gets the type of a notification. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[out] type The notification type - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// notification_type_e type; - /// - /// noti_err = notification_get_type(noti, &type); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// } - /// @endcode - int notification_get_type( - notification_h noti, - ffi.Pointer type, - ) { - return _notification_get_type( - noti, - type, - ); - } - - late final _notification_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, - ffi.Pointer)>>('notification_get_type'); - late final _notification_get_type = _notification_get_typePtr - .asFunction)>(); - - /// @brief Updates notification data. - /// @details The updated notification will appear in the notification area. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[in] noti The notification handle that is created by notification_create() - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @retval #NOTIFICATION_ERROR_NOT_EXIST_ID Priv ID does not exist - /// @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti_err = notification_update(NULL); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// } - /// @endcode - int notification_update( - notification_h noti, - ) { - return _notification_update( - noti, - ); - } - - late final _notification_updatePtr = - _lookup>( - 'notification_update'); - late final _notification_update = - _notification_updatePtr.asFunction(); - - /// @brief Deletes a notification with the given handle. - /// @details notification_delete() removes notification data from database and notification_free() releases memory of notification data. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[in] noti The notification handle - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @retval NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// // Do something - /// - /// noti_err = notification_delete(noti); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_delete( - notification_h noti, - ) { - return _notification_delete( - noti, - ); - } - - late final _notification_deletePtr = - _lookup>( - 'notification_delete'); - late final _notification_delete = - _notification_deletePtr.asFunction(); - - /// @brief Creates internal structure data and returns a notification handle. - /// @details Available type is #NOTIFICATION_TYPE_NOTI and #NOTIFICATION_TYPE_ONGOING. - /// #NOTIFICATION_TYPE_NOTI is remaining notification data even if device is restarted. - /// #NOTIFICATION_TYPE_ONGOING can display progress on a notification with #NOTIFICATION_LY_ONGOING_PROGRESS layout. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] type The notification type - /// @return Notification handle(notification_h) on success, - /// otherwise @c NULL on failure - /// @retval notification_h Success - /// @retval NULL Failure - /// @exception #NOTIFICATION_ERROR_NONE Success - /// @exception #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @exception #NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory - /// @exception #NOTIFICATION_ERROR_IO_ERROR I/O error - /// @see #notification_type_e - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) - /// return; - /// - /// // Do something - /// - /// } - /// @endcode - notification_h notification_create( - int type, - ) { - return _notification_create( - type, - ); - } - - late final _notification_createPtr = - _lookup>( - 'notification_create'); - late final _notification_create = - _notification_createPtr.asFunction(); - - /// @brief Creates a notification clone. - /// @details Newly created notification handle is returned. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @remarks This cloned notification handle should be freed using notification_free(). - /// @param[in] noti The notification handle - /// @param[out] clone The newly created notification handle that has same with input @a noti - /// @return #NOTIFICATION_ERROR_NONE if success, - /// otherwise any other value if failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @see #notification_type_e - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// notification_h clone = NULL; - /// - /// notification_clone(noti, &clone); - /// - /// // Do something - /// - /// } - /// @endcode - int notification_clone( - notification_h noti, - ffi.Pointer clone, - ) { - return _notification_clone( - noti, - clone, - ); - } - - late final _notification_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, - ffi.Pointer)>>('notification_clone'); - late final _notification_clone = _notification_clonePtr - .asFunction)>(); - - /// @brief Frees the internal structure data of a notification handle. - /// @details Internal data of a notification handle is released. Data of the inserted notification is not deleted. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Notification handle should be created by notification_create(). - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) - /// return; - /// - /// // Do something - /// - /// noti_err = notification_free(noti); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_free( - notification_h noti, - ) { - return _notification_free( - noti, - ); - } - - late final _notification_freePtr = - _lookup>( - 'notification_free'); - late final _notification_free = - _notification_freePtr.asFunction(); - - /// @brief Sets the tag of the notification handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti Notification handle - /// @param[in] tag Tag for loading notification handle - /// @return #NOTIFICATION_ERROR_NONE on success, - /// other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @see notification_get_tag() - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) - /// return; - /// - /// // Do something - /// - /// noti_err = notification_set_tag(noti, tag); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_set_tag( - notification_h noti, - ffi.Pointer tag, - ) { - return _notification_set_tag( - noti, - tag, - ); - } - - late final _notification_set_tagPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - notification_h, ffi.Pointer)>>('notification_set_tag'); - late final _notification_set_tag = _notification_set_tagPtr - .asFunction)>(); - - /// @brief Gets the tag of the notification handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti Notification handle - /// @param[out] tag Tag for loading notification handle - /// @return #NOTIFICATION_ERROR_NONE on success, - /// other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @see notification_set_tag() - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// const char *tag = NULL; - /// - /// // Do something - /// - /// noti_err = notification_get_tag(noti, &tag); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_get_tag( - notification_h noti, - ffi.Pointer> tag, - ) { - return _notification_get_tag( - noti, - tag, - ); - } - - late final _notification_get_tagPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, - ffi.Pointer>)>>('notification_get_tag'); - late final _notification_get_tag = _notification_get_tagPtr.asFunction< - int Function(notification_h, ffi.Pointer>)>(); - - /// @brief Loads a notification from the notification's database with the tag. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] tag Tag for loading notification handle - /// @return Notification handle(notification_h) on success, - /// NULL on failure - /// @retval notification_h Success - /// @retval NULL Failure - /// @exception #NOTIFICATION_ERROR_NONE Success - /// @exception #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @exception #NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory - /// @exception #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @see #notification_type_e - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// - /// noti = notification_load_by_tag(tag); - /// if (noti == NULL) - /// return; - /// - /// // Do something - /// - /// } - /// @endcode - notification_h notification_load_by_tag( - ffi.Pointer tag, - ) { - return _notification_load_by_tag( - tag, - ); - } - - late final _notification_load_by_tagPtr = _lookup< - ffi.NativeFunction)>>( - 'notification_load_by_tag'); - late final _notification_load_by_tag = _notification_load_by_tagPtr - .asFunction)>(); - - /// @brief Deletes all notifications of the given type. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[in] type Notification type - /// @return #NOTIFICATION_ERROR_NONE if success, - /// other value if failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti_err = notification_delete_all(NOTIFICATION_TYPE_NOTI); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_delete_all( - int type, - ) { - return _notification_delete_all( - type, - ); - } - - late final _notification_delete_allPtr = - _lookup>( - 'notification_delete_all'); - late final _notification_delete_all = - _notification_delete_allPtr.asFunction(); - - /// @brief Posts a notification. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[in] noti Notification handle - /// @return #NOTIFICATION_ERROR_NONE if success, - /// other value if failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @pre Notification handle should be created by notification_create(). - /// @post notification_free(). - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti_err = notification_post(noti); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_post( - notification_h noti, - ) { - return _notification_post( - noti, - ); - } - - late final _notification_postPtr = - _lookup>( - 'notification_post'); - late final _notification_post = - _notification_postPtr.asFunction(); - - /// @brief Gets the package name of the notification. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] noti Notification handle - /// @param[out] pkgname The package name of the notification - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval NOTIFICATION_ERROR_NONE Success - /// @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// char *pkgname = NULL; - /// - /// // Do something - /// - /// noti_err = notification_get_pkgname(noti, &pkgname); - /// - /// if (noti_err != NOTIFICATION_ERROR_NONE) { - /// notification_free(noti); - /// return; - /// } - /// } - /// @endcode - int notification_get_pkgname( - notification_h noti, - ffi.Pointer> pkgname, - ) { - return _notification_get_pkgname( - noti, - pkgname, - ); - } - - late final _notification_get_pkgnamePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, - ffi.Pointer>)>>('notification_get_pkgname'); - late final _notification_get_pkgname = - _notification_get_pkgnamePtr.asFunction< - int Function(notification_h, ffi.Pointer>)>(); - - /// @brief Adds a button on the notification. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] noti Notification handle - /// @param[in] button_index Button index - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval NOTIFICATION_ERROR_NONE Success - /// @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// char *pkgname = NULL; - /// - /// // Do something - /// - /// noti_err = notification_add_button(noti, NOTIFICATION_BUTTON_1); - /// - /// if (noti_err != NOTIFICATION_ERROR_NONE) { - /// notification_free(noti); - /// return; - /// } - /// } - /// @endcode - int notification_add_button( - notification_h noti, - int button_index, - ) { - return _notification_add_button( - noti, - button_index, - ); - } - - late final _notification_add_buttonPtr = - _lookup>( - 'notification_add_button'); - late final _notification_add_button = _notification_add_buttonPtr - .asFunction(); - - /// @brief Removes a button on the notification. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] noti Notification handle - /// @param[in] button_index Button index - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval NOTIFICATION_ERROR_NONE Success - /// @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// char *pkgname = NULL; - /// - /// // Do something - /// - /// noti_err = notification_remove_button(noti, NOTIFICATION_BUTTON_1); - /// - /// if (noti_err != NOTIFICATION_ERROR_NONE) { - /// notification_free(noti); - /// return; - /// } - /// } - /// @endcode - int notification_remove_button( - notification_h noti, - int button_index, - ) { - return _notification_remove_button( - noti, - button_index, - ); - } - - late final _notification_remove_buttonPtr = - _lookup>( - 'notification_remove_button'); - late final _notification_remove_button = _notification_remove_buttonPtr - .asFunction(); - - /// @brief Sets the 'auto remove' option of the active notification. - /// @details The 'auto remove' option lets the active notification be removed several seconds after it shows. Default value is true. - /// @remarks When 'auto_remove' is set as false, the active notification will not be removed - /// as long as the user removes the active notification or the app which posted the active notification removes the active notification. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] noti Notification handle - /// @param[in] auto_remove Auto remove option - /// @return #NOTIFICATION_ERROR_NONE On success, - /// other value if failure - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @see #notification_h - /// @see #notification_get_auto_remove - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// // Do something - /// - /// noti_err = notification_set_auto_remove(noti, false); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_set_auto_remove( - notification_h noti, - bool auto_remove, - ) { - return _notification_set_auto_remove( - noti, - auto_remove, - ); - } - - late final _notification_set_auto_removePtr = - _lookup>( - 'notification_set_auto_remove'); - late final _notification_set_auto_remove = _notification_set_auto_removePtr - .asFunction(); - - /// @brief Gets the 'auto remove' option of the active notification. - /// @details The 'auto remove' option lets the active notification be removed several seconds after it shows. Default value is true. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] noti Notification handle - /// @param[out] auto_remove Auto remove option - /// @return #NOTIFICATION_ERROR_NONE On success, other value on failure - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @see #notification_h - /// @see #notification_get_auto_remove - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// bool auto_remove; - /// - /// // Do something - /// - /// noti_err = notification_get_auto_remove(noti, &auto_remove); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_get_auto_remove( - notification_h noti, - ffi.Pointer auto_remove, - ) { - return _notification_get_auto_remove( - noti, - auto_remove, - ); - } - - late final _notification_get_auto_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, - ffi.Pointer)>>('notification_get_auto_remove'); - late final _notification_get_auto_remove = _notification_get_auto_removePtr - .asFunction)>(); - - /// @brief Saves a notification template to the notification database. - /// @details An application can save the created notification as a template for later reuse. - /// If the template has the same name as a saved one, the saved template will be overwritten. - /// A saved template can be loaded only by the application which saved it. - /// All templates are removed when the application package is uninstalled. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @remarks The number of templates is limited to 10. - /// When you try to add more than 10 templates, #NOTIFICATION_ERROR_MAX_EXCEEDED will be returned. - /// @param[in] noti Notification handle - /// @param[in] template_name Template name - /// @return #NOTIFICATION_ERROR_NONE On success, other value on failure - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #NOTIFICATION_ERROR_IO_ERROR I/O error - /// @retval #NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The Permission denied - /// @retval #NOTIFICATION_ERROR_MAX_EXCEEDED Max notification count exceeded - /// @see #notification_h - /// @see notification_create_from_template() - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// notification_h noti = NULL; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) - /// return; - /// - /// // add the content you want to use for the template. - /// - /// noti_err = notification_save_as_template(noti, "CALL_ACCEPT"); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = notification_free(noti); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// } - /// @endcode - int notification_save_as_template( - notification_h noti, - ffi.Pointer template_name, - ) { - return _notification_save_as_template( - noti, - template_name, - ); - } - - late final _notification_save_as_templatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, - ffi.Pointer)>>('notification_save_as_template'); - late final _notification_save_as_template = _notification_save_as_templatePtr - .asFunction)>(); - - /// @brief Loads a notification template from the notification database. - /// @details An application can load a saved template and post it. - /// An application can load only templates that it has saved. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @remarks The returned handle should be destroyed using notification_free(). - /// The specific error code can be obtained using get_last_result(). - /// Error codes are described in the Exception section. - /// If an invalid template name is given, the result will be set to #NOTIFICATION_ERROR_FROM_DB. - /// @param[in] template_name Template name - /// @return Notification handle on success, NULL on failure - /// @exception #NOTIFICATION_ERROR_NONE Success - /// @exception #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @exception #NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory - /// @exception #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @exception #NOTIFICATION_ERROR_FROM_DB Error from DB query - /// @see #notification_h - /// @see notification_save_as_template() - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// - /// noti = notification_create_from_template("CALL_ACCEPT"); - /// if (noti == NULL) - /// return; - /// - /// } - /// @endcode - notification_h notification_create_from_template( - ffi.Pointer template_name, - ) { - return _notification_create_from_template( - template_name, - ); - } - - late final _notification_create_from_templatePtr = _lookup< - ffi.NativeFunction)>>( - 'notification_create_from_template'); - late final _notification_create_from_template = - _notification_create_from_templatePtr - .asFunction)>(); - - /// @brief Gets notification block state. - /// @details The user can set the notification block state in settings. - /// The block state indicates whether or not notifications can be posted. - /// Additionally only notifications to the notification panel are - /// allowed in "Do not disturb mode". Sound, Vibrate and - /// Active/Instant notifications are blocked. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[out] state Notification block state - /// @return #NOTIFICATION_ERROR_NONE On success, other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #NOTIFICATION_ERROR_OUT_OF_MEMORY out of memory - /// @retval #NOTIFICATION_ERROR_IO_ERROR I/O Error - /// @retval #NOTIFICATION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #NOTIFICATION_ERROR_SERVICE_NOT_READY No response from notification service - /// @see #notification_block_state_e - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// notification_block_state_e state; - /// - /// // Do something - /// - /// noti_err = notification_get_noti_block_state(&state); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_get_noti_block_state( - ffi.Pointer state, - ) { - return _notification_get_noti_block_state( - state, - ); - } - - late final _notification_get_noti_block_statePtr = - _lookup)>>( - 'notification_get_noti_block_state'); - late final _notification_get_noti_block_state = - _notification_get_noti_block_statePtr - .asFunction)>(); - - /// @brief Sets a text input box to reply directly on the notification. - /// @details When you add a text input to the active notification, the notification UI will show a text input with a button. - /// So, the user can enter any text and press the button to confirm the text as a input. - /// You can edit some UI component that is related to the text input. - /// First, you can add placeholder text to guide the user using notification_set_text() with #NOTIFICATION_TEXT_TYPE_TEXT_INPUT_PLACEHOLDER type. - /// You also can edit button for the text input. - /// For setting just a text to the button, you can set the text using notification_set_text() with #NOTIFICATION_TEXT_TYPE_TEXT_INPUT_BUTTON type. - /// If you want to show image button, you can set an image for the button using notification_set_image() with #NOTIFICATION_IMAGE_TYPE_TEXT_INPUT_BUTTON type. - /// - /// Note that you should set an app_control for handling the event for user input using notification_set_event_handler(). - /// #NOTIFICATION_EVENT_TYPE_CLICK_ON_TEXT_INPUT_BUTTON is the event type for the text input. - /// You can get the text the user enters in the app_control handle that is passed as a result of the event. - /// The app_control will contain APP_CONTROL_DATA_TEXT key, so you can get the text using app_control_get_extra_data() using APP_CONTROL_DATA_TEXT key. - /// The value will contain the text user enters. - /// - /// Note that you are able to make the switching button to the text input box. - /// You have to set the app_control which you will set in a text input box to the switching button. - /// Refer to the second sample code. - /// @since_tizen 3.0 - /// @param[in] noti Notification handle - /// @param[in] text_input_max_length The maximum value which can be inputted - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// notification_h noti = NULL; - /// app_control = NULL; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) - /// return; - /// - /// noti_err = notification_set_text_input(noti, 160); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = notification_set_text(noti, - /// NOTIFICATION_TEXT_TYPE_TEXT_INPUT_PLACEHOLDER, - /// "Text message", - /// NULL, - /// NOTIFICATION_VARIABLE_TYPE_NONE); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = notification_set_text(noti, - /// NOTIFICATION_TEXT_TYPE_TEXT_INPUT_BUTTON, - /// "SEND", - /// NULL, - /// NOTIFICATION_VARIABLE_TYPE_NONE); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = notification_set_display_applist(noti, - /// NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY | NOTIFICATION_DISPLAY_APP_ACTIVE); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// // Do something - /// - /// noti_err = app_control_create(&app_control); - /// if (noti_err != APP_CONTROL_ERROR_NONE) - /// return; - /// - /// noti_err = app_control_set_app_id(app_control, appid); - /// if (noti_err != APP_CONTROL_ERROR_NONE) - /// return; - /// - /// noti_err = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT); - /// if (noti_err != APP_CONTROL_ERROR_NONE) - /// return; - /// - /// noti_err = notification_set_event_handler(noti, - /// NOTIFICATION_EVENT_TYPE_CLICK_ON_TEXT_INPUT_BUTTON, - /// app_control); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = app_control_destroy(app_control); - /// if (noti_err != APP_CONTROL_ERROR_NONE) - /// return; - /// - /// noti_err = notification_post(noti); - /// if(noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// - /// - /// { - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// notification_h noti = NULL; - /// app_control = NULL; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) { - /// return; - /// } - /// - /// noti_err = notification_set_text_input(noti, 160); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = notification_set_text(noti, - /// NOTIFICATION_TEXT_TYPE_TEXT_INPUT_PLACEHOLDER, - /// "Text message", - /// NULL, - /// NOTIFICATION_VARIABLE_TYPE_NONE); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = notification_set_text(noti, - /// NOTIFICATION_TEXT_TYPE_TEXT_INPUT_BUTTON, - /// "SEND", - /// NULL, - /// NOTIFICATION_VARIABLE_TYPE_NONE); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = notification_add_button(notification, NOTIFICATION_BUTTON_1); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = notification_set_text(notification, - /// NOTIFICATION_TEXT_TYPE_BUTTON_1, - /// "reply", - /// NULL, - /// NOTIFICATION_VARIABLE_TYPE_NONE); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = notification_set_display_applist(noti, - /// NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY | NOTIFICATION_DISPLAY_APP_ACTIVE); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// // Do something - /// - /// noti_err = app_control_create(&app_control); - /// if (noti_err != APP_CONTROL_ERROR_NONE) - /// return; - /// - /// noti_err = app_control_set_app_id(app_control, appid); - /// if (noti_err != APP_CONTROL_ERROR_NONE) - /// return; - /// - /// noti_err = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT); - /// if (noti_err != APP_CONTROL_ERROR_NONE) - /// return; - /// - /// noti_err = notification_set_event_handler(notification, - /// NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_1, - /// app_control); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = notification_set_event_handler(noti, - /// NOTIFICATION_EVENT_TYPE_CLICK_ON_TEXT_INPUT_BUTTON, - /// app_control); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = app_control_destroy(app_control); - /// if (noti_err != APP_CONTROL_ERROR_NONE) - /// return; - /// - /// noti_err = notification_post(noti); - /// if(noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// } - /// @endcode - int notification_set_text_input( - notification_h noti, - int text_input_max_length, - ) { - return _notification_set_text_input( - noti, - text_input_max_length, - ); - } - - late final _notification_set_text_inputPtr = - _lookup>( - 'notification_set_text_input'); - late final _notification_set_text_input = _notification_set_text_inputPtr - .asFunction(); - - /// @brief Sets the image height for the extended notification. - /// @details The image is shown under the notification's text. The application can set the image height. - /// The image is modified to fit into the height set by this function. - /// The image can be scaled down and/or cropped. - /// If @a height is 0, the default value is used. The default height depends on the screen size. - /// @since_tizen 4.0 - /// @param[in] noti The notification handle - /// @param[in] height The image height - /// @return #NOTIFICATION_ERROR_NONE On success, - /// otherwise a negative error value - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @see notification_get_extension_image_size() - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) - /// return; - /// - /// noti_err = notification_set_text(noti, - /// NOTIFICATION_TEXT_TYPE_CONTENT_EXTENTION, - /// "message", - /// NULL, - /// NOTIFICATION_VARIABLE_TYPE_NONE); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = notification_set_image(noti, - /// NOTIFICATION_IMAGE_TYPE_EXTENTION, - /// image_path); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = notification_set_layout(noti, NOTIFICATION_LY_EXTENTION); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = notification_set_extension_image_size(noti, 20); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// // Do something - /// } - /// @endcode - int notification_set_extension_image_size( - notification_h noti, - int height, - ) { - return _notification_set_extension_image_size( - noti, - height, - ); - } - - late final _notification_set_extension_image_sizePtr = - _lookup>( - 'notification_set_extension_image_size'); - late final _notification_set_extension_image_size = - _notification_set_extension_image_sizePtr - .asFunction(); - - /// @brief Gets the image height for the extended notification. - /// @since_tizen 4.0 - /// @param[in] noti The notification handle - /// @param[out] height The image height - /// @return #NOTIFICATION_ERROR_NONE On success, otherwise a negative error value - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @see notification_set_extension_image_size() - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// int height; - /// - /// // Do something - /// - /// noti_err = notification_get_extension_image_size(noti, &height); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// } - /// @endcode - int notification_get_extension_image_size( - notification_h noti, - ffi.Pointer height, - ) { - return _notification_get_extension_image_size( - noti, - height, - ); - } - - late final _notification_get_extension_image_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, - ffi.Pointer)>>('notification_get_extension_image_size'); - late final _notification_get_extension_image_size = - _notification_get_extension_image_sizePtr - .asFunction)>(); - - /// @brief Sets an alarm to be triggered after a specific time. - /// @details The alarm will first go off @a delay seconds later and then will go off every certain amount of time defined using @a period seconds. To cancel the alarm, call alarm_cancel() with @a alarm_id. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @remarks If the application is uninstalled after setting an alarm, the alarm is cancelled automatically. - /// If the operation of @a app_control is not specified, #APP_CONTROL_OPERATION_DEFAULT is used for the launch request. - /// If the operation of @a app_control is #APP_CONTROL_OPERATION_DEFAULT, the package information is mandatory to explicitly launch the application. - /// Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, this api does not support exact period and delay for minimizing the wakeups of the device. The system can adjust when the alarm expires. - /// If you want to trigger an alarm exactly, see @see alarm_schedule_once_after_delay() - /// Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif If @a app_control is specified with service-application, the application is only allowed to run on which has Background Category. - /// Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif If the appid of @a app_control is not specified, this api is not allowed. In other words, the explicit @a app_control is only allowed. - /// - /// @param[in] app_control The destination app_control to perform a specific task when the alarm is triggered - /// @param[in] delay The amount of time before the first execution (in seconds). Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, Although this is inexact, the alarm will not fire before this time - /// @param[in] period The amount of time between subsequent alarms (in seconds). Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, This value does not guarantee the accuracy. The actual interval is calculated by the OS. The minimum value is 600sec - /// @param[out] alarm_id The alarm ID that uniquely identifies an alarm - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_INVALID_TIME Triggered time is invalid - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @retval #ALARM_ERROR_NOT_PERMITTED_APP @a app_control is not permitted - /// @see alarm_cancel() - /// @see alarm_cancel_all() - /// @see alarm_get_scheduled_date() - /// @see alarm_get_scheduled_period() - /// @see alarm_schedule_once_after_delay() - int alarm_schedule_after_delay( - app_control_h app_control, - int delay, - int period, - ffi.Pointer alarm_id, - ) { - return _alarm_schedule_after_delay( - app_control, - delay, - period, - alarm_id, - ); - } - - late final _alarm_schedule_after_delayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, ffi.Int, ffi.Int, - ffi.Pointer)>>('alarm_schedule_after_delay'); - late final _alarm_schedule_after_delay = - _alarm_schedule_after_delayPtr.asFunction< - int Function(app_control_h, int, int, ffi.Pointer)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. [Use alarm_schedule_once_at_date() instead] - /// @brief Sets an alarm to be triggered at a specific time. - /// @details The @a date describes the time of the first occurrence. - /// If @a period is bigger than @c 0, the alarm will be scheduled after the @a period time. - /// If @a period is set to @c 0, the alarm will go off just once without repetition. - /// To cancel the alarm, call alarm_cancel() with @a alarm_id. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @remarks If application is uninstalled after setting an alarm, the alarm is cancelled automatically. - /// If the operation of @a app_control is not specified, #APP_CONTROL_OPERATION_DEFAULT is used for the launch request. - /// If the operation of @a app_control is #APP_CONTROL_OPERATION_DEFAULT, the package information is mandatory to explicitly launch the application. - /// - /// @param[in] app_control The destination app_control to perform specific work when the alarm is triggered - /// @param[in] date The first active alarm time - /// @param[in] period The amount of time between subsequent alarms(in second) - /// @param[out] alarm_id The alarm ID that uniquely identifies an alarm - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_INVALID_DATE Triggered date is invalid - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_cancel() - /// @see alarm_cancel_all() - /// @see alarm_get_scheduled_date() - /// @see alarm_get_scheduled_period() - int alarm_schedule_at_date( - app_control_h app_control, - ffi.Pointer date, - int period, - ffi.Pointer alarm_id, - ) { - return _alarm_schedule_at_date( - app_control, - date, - period, - alarm_id, - ); - } - - late final _alarm_schedule_at_datePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, ffi.Pointer, ffi.Int, - ffi.Pointer)>>('alarm_schedule_at_date'); - late final _alarm_schedule_at_date = _alarm_schedule_at_datePtr.asFunction< - int Function( - app_control_h, ffi.Pointer, int, ffi.Pointer)>(); - - /// @brief Sets an alarm to be triggered after a specific time. - /// @details The alarm will go off @a delay seconds later. To cancel the alarm, call alarm_cancel() with @a alarm_id. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @remarks If the application is uninstalled after setting an alarm, the alarm is cancelled automatically. - /// If the operation of @a app_control is not specified, #APP_CONTROL_OPERATION_DEFAULT is used for the launch request. - /// If the operation of @a app_control is #APP_CONTROL_OPERATION_DEFAULT, the package information is mandatory to explicitly launch the application. - /// If the appid of @a app_control is not specified, this api is not allowed. In other words, the explicit @a app_control is only allowed. - /// The @a app_control only supports UI application with this api. If @a app_control is not UI application, #ALARM_ERROR_NOT_PERMITTED_APP returned. - /// When the alarm is expired, Alarm Manager will turn on LCD to prohibit background jobs. - /// - /// @param[in] app_control The destination app_control to perform a specific task when the alarm is triggered - /// @param[in] delay The amount of time before the execution (in seconds) - /// @param[out] alarm_id The alarm ID that uniquely identifies an alarm - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_INVALID_TIME Triggered time is invalid - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @retval #ALARM_ERROR_NOT_PERMITTED_APP @a app_control is not permitted. @a app_control for UI application is only permitted. - /// @see alarm_cancel() - /// @see alarm_cancel_all() - /// @see alarm_get_scheduled_date() - int alarm_schedule_once_after_delay( - app_control_h app_control, - int delay, - ffi.Pointer alarm_id, - ) { - return _alarm_schedule_once_after_delay( - app_control, - delay, - alarm_id, - ); - } - - late final _alarm_schedule_once_after_delayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, ffi.Int, - ffi.Pointer)>>('alarm_schedule_once_after_delay'); - late final _alarm_schedule_once_after_delay = - _alarm_schedule_once_after_delayPtr - .asFunction)>(); - - /// @brief Sets an alarm to be triggered at a specific time. - /// @details The @a date describes the time of the first occurrence. To cancel the alarm, call alarm_cancel() with @a alarm_id. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @remarks If application is uninstalled after setting an alarm, the alarm is cancelled automatically. - /// If the operation of @a app_control is not specified, #APP_CONTROL_OPERATION_DEFAULT is used for the launch request. - /// If the operation of @a app_control is #APP_CONTROL_OPERATION_DEFAULT, the package information is mandatory to explicitly launch the application. - /// If the appid of @a app_control is not specified, this api is not allowed. In other words, the explicit @a app_control is only allowed. - /// The @a app_control only supports UI application with this api. If @a app_control is not UI application, #ALARM_ERROR_NOT_PERMITTED_APP returned. - /// When the alarm is expired, Alarm Manager will turn on LCD to prohibit background jobs. - /// - /// @param[in] app_control The destination app_control to perform specific work when the alarm is triggered - /// @param[in] date The first active alarm time - /// @param[out] alarm_id The alarm ID that uniquely identifies an alarm - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_INVALID_DATE Triggered date is invalid - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @retval #ALARM_ERROR_NOT_PERMITTED_APP @a app_control is not permitted. @a app_control for UI application is only permitted. - /// @see alarm_cancel() - /// @see alarm_cancel_all() - /// @see alarm_get_scheduled_date() - int alarm_schedule_once_at_date( - app_control_h app_control, - ffi.Pointer date, - ffi.Pointer alarm_id, - ) { - return _alarm_schedule_once_at_date( - app_control, - date, - alarm_id, - ); - } - - late final _alarm_schedule_once_at_datePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, ffi.Pointer, - ffi.Pointer)>>('alarm_schedule_once_at_date'); - late final _alarm_schedule_once_at_date = - _alarm_schedule_once_at_datePtr.asFunction< - int Function(app_control_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets an alarm to be triggered periodically, starting at a specific time. - /// @details The @a date describes the time of the first occurrence. - /// @a week_flag is the repeat value of the days of the week. - /// If @a week_flag is #ALARM_WEEK_FLAG_TUESDAY, the alarm will repeat every Tuesday at a specific time. - /// To cancel the alarm, call alarm_cancel() with @a alarm_id. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @remarks If the application is uninstalled after setting an alarm, the alarm is cancelled automatically. - /// If the operation of @a app_control is not specified, #APP_CONTROL_OPERATION_DEFAULT is used for the launch request. - /// If the operation of @a app_control is #APP_CONTROL_OPERATION_DEFAULT, the package information is mandatory to explicitly launch the application. - /// Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, The @a app_control only supports UI application with this api. If @a app_control is not UI application, #ALARM_ERROR_NOT_PERMITTED_APP returned. - /// When the alarm is expired, Alarm Manager will turn on LCD to prohibit background jobs. - /// Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, If the appid of @a app_control is not specified, this api is not allowed. In other words, the explicit @a app_control is only allowed. - /// - /// @param[in] app_control The destination app_control to perform specific work when the alarm is triggered - /// @param[in] date The first active alarm time - /// @param[in] week_flag The day of the week, @a week_flag may be a combination of days, like #ALARM_WEEK_FLAG_TUESDAY | #ALARM_WEEK_FLAG_FRIDAY - /// @param[out] alarm_id The alarm ID that uniquely identifies an alarm - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_INVALID_DATE Triggered date is invalid - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @retval #ALARM_ERROR_NOT_PERMITTED_APP @a app_control is not permitted. @a app_control for UI application is only permitted. - /// @see alarm_cancel() - /// @see alarm_cancel_all() - /// @see alarm_get_scheduled_recurrence_week_flag() - /// @see alarm_get_scheduled_date() - /// @see #alarm_week_flag_e - int alarm_schedule_with_recurrence_week_flag( - app_control_h app_control, - ffi.Pointer date, - int week_flag, - ffi.Pointer alarm_id, - ) { - return _alarm_schedule_with_recurrence_week_flag( - app_control, - date, - week_flag, - alarm_id, - ); - } - - late final _alarm_schedule_with_recurrence_week_flagPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, ffi.Pointer, ffi.Int, - ffi.Pointer)>>( - 'alarm_schedule_with_recurrence_week_flag'); - late final _alarm_schedule_with_recurrence_week_flag = - _alarm_schedule_with_recurrence_week_flagPtr.asFunction< - int Function( - app_control_h, ffi.Pointer, int, ffi.Pointer)>(); - - /// @brief Gets the recurrence days of the week. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.get - /// @remarks If the given @a alarm_id is not obtained by using the alarm_schedule_with_recurrence_week_flag() function, - /// an error (error code #ALARM_ERROR_INVALID_PARAMETER) will occur because this alarm is scheduled with no recurrence. - /// If the operation of @a app_control is not specified, #APP_CONTROL_OPERATION_DEFAULT is used for the launch request. - /// If the operation of @a app_control is #APP_CONTROL_OPERATION_DEFAULT, the package information is mandatory to explicitly launch the application. - /// @param[in] alarm_id The alarm ID returned when the alarm is scheduled - /// @param[out] week_flag The recurrence days of the week, @a week_flag may be a combination of days, like #ALARM_WEEK_FLAG_TUESDAY | #ALARM_WEEK_FLAG_FRIDAY - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_schedule_with_recurrence_week_flag() - /// @see #alarm_week_flag_e - int alarm_get_scheduled_recurrence_week_flag( - int alarm_id, - ffi.Pointer week_flag, - ) { - return _alarm_get_scheduled_recurrence_week_flag( - alarm_id, - week_flag, - ); - } - - late final _alarm_get_scheduled_recurrence_week_flagPtr = _lookup< - ffi.NativeFunction)>>( - 'alarm_get_scheduled_recurrence_week_flag'); - late final _alarm_get_scheduled_recurrence_week_flag = - _alarm_get_scheduled_recurrence_week_flagPtr - .asFunction)>(); - - /// @brief Cancels the alarm with the specific alarm ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @param[in] alarm_id The alarm ID that is cancelled - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_schedule_at_date() - /// @see alarm_schedule_after_delay() - /// @see alarm_schedule_with_recurrence_week_flag() - /// @see alarm_cancel_all() - int alarm_cancel( - int alarm_id, - ) { - return _alarm_cancel( - alarm_id, - ); - } - - late final _alarm_cancelPtr = - _lookup>('alarm_cancel'); - late final _alarm_cancel = _alarm_cancelPtr.asFunction(); - - /// @brief Cancels all scheduled alarms that are registered by the application that calls this API. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_schedule_at_date() - /// @see alarm_schedule_after_delay() - /// @see alarm_schedule_with_recurrence_week_flag() - /// @see alarm_cancel() - int alarm_cancel_all() { - return _alarm_cancel_all(); - } - - late final _alarm_cancel_allPtr = - _lookup>('alarm_cancel_all'); - late final _alarm_cancel_all = - _alarm_cancel_allPtr.asFunction(); - - /// @brief Retrieves the IDs of all registered alarms by invoking a callback once for each scheduled alarm. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.get - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @post This function invokes alarm_registered_alarm_cb() repeatedly for each registered alarm. - /// @see alarm_registered_alarm_cb() - int alarm_foreach_registered_alarm( - alarm_registered_alarm_cb callback, - ffi.Pointer user_data, - ) { - return _alarm_foreach_registered_alarm( - callback, - user_data, - ); - } - - late final _alarm_foreach_registered_alarmPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(alarm_registered_alarm_cb, - ffi.Pointer)>>('alarm_foreach_registered_alarm'); - late final _alarm_foreach_registered_alarm = - _alarm_foreach_registered_alarmPtr.asFunction< - int Function(alarm_registered_alarm_cb, ffi.Pointer)>(); - - /// @brief Gets the scheduled time from the given alarm ID in C standard time struct. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.get - /// @remarks @a date is not needed by the function after the call. - /// @param[in] alarm_id The alarm ID returned when the alarm is scheduled - /// @param[out] date The time value of the next alarm event - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_schedule_at_date() - /// @see alarm_schedule_after_delay() - /// @see alarm_schedule_with_recurrence_week_flag() - int alarm_get_scheduled_date( - int alarm_id, - ffi.Pointer date, - ) { - return _alarm_get_scheduled_date( - alarm_id, - date, - ); - } - - late final _alarm_get_scheduled_datePtr = - _lookup)>>( - 'alarm_get_scheduled_date'); - late final _alarm_get_scheduled_date = _alarm_get_scheduled_datePtr - .asFunction)>(); - - /// @brief Gets the period of time between the recurrent alarms. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.get - /// @remarks If the given @a alarm_id is not obtained by using the alarm_schedule_at_date() or alarm_schedule_after_delay() function, - /// an error (error code #ALARM_ERROR_INVALID_PARAMETER) will occur. - /// @param[in] alarm_id The alarm ID returned when the alarm is scheduled - /// @param[out] period The period of time between recurrent alarms in seconds - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_schedule_at_date() - /// @see alarm_schedule_after_delay() - /// @see alarm_schedule_with_recurrence_week_flag() - int alarm_get_scheduled_period( - int alarm_id, - ffi.Pointer period, - ) { - return _alarm_get_scheduled_period( - alarm_id, - period, - ); - } - - late final _alarm_get_scheduled_periodPtr = _lookup< - ffi.NativeFunction)>>( - 'alarm_get_scheduled_period'); - late final _alarm_get_scheduled_period = _alarm_get_scheduled_periodPtr - .asFunction)>(); - - /// @brief Gets the current system time using C standard time struct. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[out] date The current system time - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - int alarm_get_current_time( - ffi.Pointer date, - ) { - return _alarm_get_current_time( - date, - ); - } - - late final _alarm_get_current_timePtr = - _lookup)>>( - 'alarm_get_current_time'); - late final _alarm_get_current_time = - _alarm_get_current_timePtr.asFunction)>(); - - /// @brief Gets the app_control to be invoked when the alarm is triggered. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.get - /// @remarks The @a app_control must be released using app_control_destroy(). - /// @param[in] alarm_id The alarm ID uniquely identifies an alarm - /// @param[out] app_control The app_control handle to launch when the alarm is triggered - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_schedule_at_date() - /// @see alarm_schedule_after_delay() - /// @see alarm_schedule_with_recurrence_week_flag() - int alarm_get_app_control( - int alarm_id, - ffi.Pointer app_control, - ) { - return _alarm_get_app_control( - alarm_id, - app_control, - ); - } - - late final _alarm_get_app_controlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer)>>('alarm_get_app_control'); - late final _alarm_get_app_control = _alarm_get_app_controlPtr - .asFunction)>(); - - /// @brief Sets global flag in the alarm. - /// @details Sets @a global flag to set/unset alarm globally. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @remarks The @a alarm_id must be id of alarm which will launch global application. - /// The function returns an error (error code #ALARM_ERROR_NOT_PERMITTED_APP) if it is not. - /// Note that the application which is launched by global alarm runs in the user session that is logged in currently. - /// It doesn't run in the session for the user who registers the global alarm. - /// So, if the application uses application's private data for each user to handling the app_control for the alarm, it might not show proper data to the user. - /// Therefore, We recommend to contain all the data for the alarm to the app_control handle for the global alarm. - /// Then, the launched application would be able to use the data to show proper alarm UX to the user. - /// @param[in] alarm_id The alarm ID uniquely identifies an alarm - /// @param[in] global The global flag to set/unset alarm globally - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_NOT_PERMITTED_APP @a alarm_id is not permitted - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_schedule_at_date() - /// @see alarm_schedule_after_delay() - /// @see alarm_schedule_with_recurrence_week_flag() - int alarm_set_global( - int alarm_id, - bool global, - ) { - return _alarm_set_global( - alarm_id, - global, - ); - } - - late final _alarm_set_globalPtr = - _lookup>( - 'alarm_set_global'); - late final _alarm_set_global = - _alarm_set_globalPtr.asFunction(); - - /// @brief Gets whether the alarm will launch global application or not. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.get - /// @param[in] alarm_id The alarm ID uniquely identifies an alarm - /// @param[out] global Whether the alarm will launch global application or not - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_set_global() - int alarm_get_global( - int alarm_id, - ffi.Pointer global, - ) { - return _alarm_get_global( - alarm_id, - global, - ); - } - - late final _alarm_get_globalPtr = _lookup< - ffi.NativeFunction)>>( - 'alarm_get_global'); - late final _alarm_get_global = _alarm_get_globalPtr - .asFunction)>(); - - /// @brief Sets a notification alarm to be triggered at a specific time. - /// @details The @a date describes the time of the alarm occurrence. - /// To cancel the alarm, call alarm_cancel() with @a alarm_id. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @privilege %http://tizen.org/privilege/notification - /// @remarks If application is uninstalled after setting an alarm, the alarm is cancelled automatically. - /// When the alarm goes off, Alarm Manager will turn on LCD to prohibit background jobs. - /// - /// @param[in] noti The notification to be posted when the alarm is triggered - /// @param[in] date The active alarm time - /// @param[out] alarm_id The ID which uniquely identifies the scheduled alarm - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_INVALID_DATE Triggered date is invalid - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_cancel() - /// @see alarm_cancel_all() - /// @see alarm_get_scheduled_date() - int alarm_schedule_noti_once_at_date( - notification_h noti, - ffi.Pointer date, - ffi.Pointer alarm_id, - ) { - return _alarm_schedule_noti_once_at_date( - noti, - date, - alarm_id, - ); - } - - late final _alarm_schedule_noti_once_at_datePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Pointer, - ffi.Pointer)>>('alarm_schedule_noti_once_at_date'); - late final _alarm_schedule_noti_once_at_date = - _alarm_schedule_noti_once_at_datePtr.asFunction< - int Function( - notification_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets a notification alarm to be triggered after a specific delay. - /// @details The alarm will first go off after @a delay seconds. - /// The alarm will then go off every period seconds until canceled. - /// To cancel the alarm, call alarm_cancel() with @a alarm_id. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @privilege %http://tizen.org/privilege/notification - /// @remarks If the application is uninstalled after setting an alarm, the alarm is cancelled automatically. - /// This function is a minimally intrusive way to trigger alarms when precision is not important. - /// The system will adjust the @a delay and @a period requests to suit internal needs; the requests - /// will be treated as minimum values. Note that @a period cannot be less than 600 seconds, if - /// a smaller request is supplied it will be silently adjusted to a request of 600. - /// When the alarm goes off, Alarm Manager will turn on LCD to prohibit background jobs. - /// - /// @param[in] noti The notification to be posted when the alarm is triggered - /// @param[in] delay The amount of time before the first execution (in seconds). - /// @param[in] period The amount of time between subsequent alarms (in seconds). - /// @param[out] alarm_id The ID which uniquely identifies the scheduled alarm - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_INVALID_TIME Triggered time is invalid - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_cancel() - /// @see alarm_cancel_all() - /// @see alarm_get_scheduled_date() - /// @see alarm_get_scheduled_period() - /// @see alarm_schedule_noti_once_after_delay() - int alarm_schedule_noti_after_delay( - notification_h noti, - int delay, - int period, - ffi.Pointer alarm_id, - ) { - return _alarm_schedule_noti_after_delay( - noti, - delay, - period, - alarm_id, - ); - } - - late final _alarm_schedule_noti_after_delayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Int, ffi.Int, - ffi.Pointer)>>('alarm_schedule_noti_after_delay'); - late final _alarm_schedule_noti_after_delay = - _alarm_schedule_noti_after_delayPtr.asFunction< - int Function(notification_h, int, int, ffi.Pointer)>(); - - /// @brief Sets a notification alarm to be triggered after a specific delay. - /// @details The alarm will go off @a delay seconds later. - /// To cancel the alarm, call alarm_cancel() with @a alarm_id. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @privilege %http://tizen.org/privilege/notification - /// @remarks If the application is uninstalled after setting an alarm, the alarm is cancelled automatically. - /// When the alarm goes off, Alarm Manager will turn on LCD to prohibit background jobs. - /// - /// @param[in] noti The notification to be posted when the alarm is triggered - /// @param[in] delay The amount of time before the execution (in seconds) - /// @param[out] alarm_id The ID which uniquely identifies the scheduled alarm - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_INVALID_TIME Triggered time is invalid - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_cancel() - /// @see alarm_cancel_all() - /// @see alarm_get_scheduled_date() - int alarm_schedule_noti_once_after_delay( - notification_h noti, - int delay, - ffi.Pointer alarm_id, - ) { - return _alarm_schedule_noti_once_after_delay( - noti, - delay, - alarm_id, - ); - } - - late final _alarm_schedule_noti_once_after_delayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Int, - ffi.Pointer)>>('alarm_schedule_noti_once_after_delay'); - late final _alarm_schedule_noti_once_after_delay = - _alarm_schedule_noti_once_after_delayPtr.asFunction< - int Function(notification_h, int, ffi.Pointer)>(); - - /// @brief Sets a notification to be triggered periodically, starting at a specific time. - /// @details The @a date describes the time of the first occurrence. - /// @a week_flag describes the day(s) of the week when the notification recurs. - /// If @a week_flag is #ALARM_WEEK_FLAG_TUESDAY, the alarm will repeat every Tuesday at a specific time. - /// If @a week_flag is less than or equal to zero, the alarm is not repeated. - /// To cancel the alarm, call alarm_cancel() with @a alarm_id. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @privilege %http://tizen.org/privilege/notification - /// @remarks If the application is uninstalled after setting an alarm, the alarm is cancelled automatically. - /// - /// @param[in] noti The notification to be posted when the alarm is triggered - /// @param[in] date The first active alarm time - /// @param[in] week_flag The day of the week the notification recurs. @a week_flag may be a combination of days, like #ALARM_WEEK_FLAG_TUESDAY | #ALARM_WEEK_FLAG_FRIDAY - /// @param[out] alarm_id The ID which uniquely identifies the scheduled alarm - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_INVALID_DATE Triggered date is invalid - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_cancel() - /// @see alarm_cancel_all() - /// @see alarm_get_scheduled_recurrence_week_flag() - /// @see alarm_get_scheduled_date() - /// @see #alarm_week_flag_e - int alarm_schedule_noti_with_recurrence_week_flag( - notification_h noti, - ffi.Pointer date, - int week_flag, - ffi.Pointer alarm_id, - ) { - return _alarm_schedule_noti_with_recurrence_week_flag( - noti, - date, - week_flag, - alarm_id, - ); - } - - late final _alarm_schedule_noti_with_recurrence_week_flagPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Pointer, ffi.Int, - ffi.Pointer)>>( - 'alarm_schedule_noti_with_recurrence_week_flag'); - late final _alarm_schedule_noti_with_recurrence_week_flag = - _alarm_schedule_noti_with_recurrence_week_flagPtr.asFunction< - int Function( - notification_h, ffi.Pointer, int, ffi.Pointer)>(); - - /// @brief Gets the notification to be posted when an alarm is triggered. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.get - /// @remarks @a noti must be released using notification_free(). - /// - /// @param[in] alarm_id The ID which uniquely identifies a scheduled alarm - /// @param[out] noti The notification to be posted when the alarm is triggered - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_schedule_noti_once_at_date() - /// @see alarm_schedule_noti_after_delay() - /// @see alarm_schedule_noti_once_after_delay() - /// @see alarm_schedule_noti_with_recurrence_week_flag() - int alarm_get_notification( - int alarm_id, - ffi.Pointer noti, - ) { - return _alarm_get_notification( - alarm_id, - noti, - ); - } - - late final _alarm_get_notificationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer)>>('alarm_get_notification'); - late final _alarm_get_notification = _alarm_get_notificationPtr - .asFunction)>(); - - /// @brief Updates the delay of the registered alarm. - /// @details The @a delay is the time (in seconds) before the alarm's first setting off. - /// The delay is an exact value, see alarm_schedule_once_after_delay() for details. - /// This function can be called for any alarm. - /// If the delay was set before, it will be overwritten. If it was not, it will be set. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @remarks This function can be called only for alarms whose app control launches an UI application. - /// If this condition is not met, #ALARM_ERROR_NOT_PERMITTED_APP is returned. - /// @param[in] alarm_id The ID which uniquely identifies the scheduled alarm - /// @param[in] delay The amount of time before the first execution (in seconds). - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @retval #ALARM_ERROR_NOT_PERMITTED_APP App control does not launch an UI application - int alarm_update_delay( - int alarm_id, - int delay, - ) { - return _alarm_update_delay( - alarm_id, - delay, - ); - } - - late final _alarm_update_delayPtr = - _lookup>( - 'alarm_update_delay'); - late final _alarm_update_delay = - _alarm_update_delayPtr.asFunction(); - - /// @brief Updates the date of the registered alarm. - /// @details The @a date describes the date on which the alarm is set off for the first time. - /// This function can be called for any alarm. - /// If the date was set before, it will be overwritten. If it was not, it will be set. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @remarks This function can be called only for alarms whose app control launches an UI application. - /// If this condition is not met, #ALARM_ERROR_NOT_PERMITTED_APP is returned. - /// @param[in] alarm_id The ID which uniquely identifies the scheduled alarm - /// @param[in] date The time value of the next alarm event - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_INVALID_TIME Triggered time is invalid - /// @retval #ALARM_ERROR_INVALID_DATE Triggered time is invalid - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @retval #ALARM_ERROR_NOT_PERMITTED_APP App control does not launch an UI application - int alarm_update_date( - int alarm_id, - ffi.Pointer date, - ) { - return _alarm_update_date( - alarm_id, - date, - ); - } - - late final _alarm_update_datePtr = - _lookup)>>( - 'alarm_update_date'); - late final _alarm_update_date = - _alarm_update_datePtr.asFunction)>(); - - /// @brief Updates the period of the registered alarm. - /// @details The alarm will then go off every @a period seconds until canceled. - /// This function can be called for any alarm. - /// If the week recurrence flag was set before, it will be removed and the period will be set. - /// If the period was set before, it will be overwritten. If it was not, it will be set. - /// If the @a period argument is 0 and the period was previously set, - /// the period attribute will be cleared and the alarm will be changed to one-time. - /// If the @a period argument is 0 and the period was not set, - /// or the week recurrence flag was set, the alarm will be unchanged. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @param[in] alarm_id The ID which uniquely identifies the scheduled alarm - /// @param[in] period The amount of time between subsequent alarms (in seconds). - /// Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, this - /// value does not guarantee the accuracy. The actual interval - /// is calculated by the OS. The minimum value is 600sec. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - int alarm_update_period( - int alarm_id, - int period, - ) { - return _alarm_update_period( - alarm_id, - period, - ); - } - - late final _alarm_update_periodPtr = - _lookup>( - 'alarm_update_period'); - late final _alarm_update_period = - _alarm_update_periodPtr.asFunction(); - - /// @brief Updates the week recurrence flag of the registered alarm. - /// @details @a week_flag is the repeat value of the days of the week. - /// For example, if @a week_flag is #ALARM_WEEK_FLAG_TUESDAY, the alarm will repeat every - /// Tuesday at a specific time. - /// This function can be called for any alarm. - /// If the period was set before, it will be removed and the week recurrence flag will be set. - /// If the week recurrence flag was set before, it will be overwritten. If it was not, it will be set. - /// If the @a week_flag argument is 0 and the flag was previously set, - /// the flag attribute will be cleared and the alarm will be changed to one-time. - /// If the @a week_flag argument is 0 and the flag was not set, - /// or the period was set, the alarm will be unchanged. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @remarks This function can be called only for alarms whose app control launches an UI application. - /// If this condition is not met, #ALARM_ERROR_NOT_PERMITTED_APP is returned. - /// @param[in] alarm_id The ID which uniquely identifies the scheduled alarm - /// @param[in] week_flag The day of the week, @a week_flag may be a combination - /// of days, like #ALARM_WEEK_FLAG_TUESDAY | #ALARM_WEEK_FLAG_FRIDAY - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @retval #ALARM_ERROR_NOT_PERMITTED_APP App control does not launch an UI application - int alarm_update_week_flag( - int alarm_id, - int week_flag, - ) { - return _alarm_update_week_flag( - alarm_id, - week_flag, - ); - } - - late final _alarm_update_week_flagPtr = - _lookup>( - 'alarm_update_week_flag'); - late final _alarm_update_week_flag = - _alarm_update_week_flagPtr.asFunction(); - - /// @brief Adds the event handler for receiving event-data of interested events. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks If you want to add the privileged event, you MUST declare right privilge first. Unless that, this function returns #EVENT_ERROR_PERMISSION_DENIED. The privileged events are commented on remarks of it's definitions. - /// @param[in] event_name The interested event name - /// @param[in] callback The event callback called when the event occurs - /// @param[in] user_data The user data for passing to callback - /// @param[out] event_handler The event handler - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EVENT_ERROR_NONE Successful - /// @retval #EVENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EVENT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #EVENT_ERROR_IO_ERROR Adding handler failed - /// @retval #EVENT_ERROR_OUT_OF_MEMORY Out of memory - int event_add_event_handler( - ffi.Pointer event_name, - event_cb callback, - ffi.Pointer user_data, - ffi.Pointer event_handler, - ) { - return _event_add_event_handler( - event_name, - callback, - user_data, - event_handler, - ); - } - - late final _event_add_event_handlerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - event_cb, - ffi.Pointer, - ffi.Pointer)>>('event_add_event_handler'); - late final _event_add_event_handler = _event_add_event_handlerPtr.asFunction< - int Function(ffi.Pointer, event_cb, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Removes the registered event handler. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] event_handler The event handler - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EVENT_ERROR_NONE Successful - /// @retval #EVENT_ERROR_INVALID_PARAMETER Invalid parameter - int event_remove_event_handler( - event_handler_h event_handler, - ) { - return _event_remove_event_handler( - event_handler, - ); - } - - late final _event_remove_event_handlerPtr = - _lookup>( - 'event_remove_event_handler'); - late final _event_remove_event_handler = _event_remove_event_handlerPtr - .asFunction(); - - /// @brief Sends the User-Event to receiver applications. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks The format of User-Event's name MUST be "event.{sender's appid}.{user-defined name}", refer to 'The name-format of User-Event' section, If the event_name is invalid, the function returns #EVENT_ERROR_IO_ERROR. - /// @param[in] event_name The event's name to send - /// @param[in] event_data The event's data to send - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EVENT_ERROR_NONE Successful - /// @retval #EVENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EVENT_ERROR_IO_ERROR Sending operation failed - int event_publish_app_event( - ffi.Pointer event_name, - ffi.Pointer event_data, - ) { - return _event_publish_app_event( - event_name, - event_data, - ); - } - - late final _event_publish_app_eventPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('event_publish_app_event'); - late final _event_publish_app_event = _event_publish_app_eventPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Sends the User-Event to trusted receiver-applications. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks The application which has same certification with sender can receive the event. - /// @remarks The format of User-Event's name MUST be "event.{sender's appid}.{user-defined name}", refer to 'The name-format of User-Event' section, If the event_name is invalid, the function returns #EVENT_ERROR_IO_ERROR. - /// @param[in] event_name The event's name to send - /// @param[in] event_data The event's data to send - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EVENT_ERROR_NONE Successful - /// @retval #EVENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EVENT_ERROR_IO_ERROR Sending operation failed - int event_publish_trusted_app_event( - ffi.Pointer event_name, - ffi.Pointer event_data, - ) { - return _event_publish_trusted_app_event( - event_name, - event_data, - ); - } - - late final _event_publish_trusted_app_eventPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('event_publish_trusted_app_event'); - late final _event_publish_trusted_app_event = - _event_publish_trusted_app_eventPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Keeps last User-Event data for receiver applications. - /// - /// @since_tizen 3.0 - /// @remarks The receiver applications will receive this last event data after adding their new handlers via event_add_event_handler() API since the sender application called this API. - /// @remarks If a sender application sends same event via trusted API and non-trusted API, then a trusted receiver will get latest data regardless of trusted or non-trusted, but non-trusted receiver will get the last data only from non-trusted API. - /// @remarks The effect of this API continues during runtime. That means when the sender application process restarts, the sender application needs to call this api again to make the event to keep the last event. - /// @param[in] event_name The event's name to keep last event data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EVENT_ERROR_NONE Successful - /// @retval #EVENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EVENT_ERROR_IO_ERROR Sending operation failed - /// @retval #EVENT_ERROR_OUT_OF_MEMORY Out of memory - int event_keep_last_event_data( - ffi.Pointer event_name, - ) { - return _event_keep_last_event_data( - event_name, - ); - } - - late final _event_keep_last_event_dataPtr = - _lookup)>>( - 'event_keep_last_event_data'); - late final _event_keep_last_event_data = _event_keep_last_event_dataPtr - .asFunction)>(); - - /// @brief Sets an integer value in the preference. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] key The name of the key to modify - /// @param[in] value The new @c int value for the given key - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PREFERENCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - /// @see preference_get_int() - int preference_set_int( - ffi.Pointer key, - int value, - ) { - return _preference_set_int( - key, - value, - ); - } - - late final _preference_set_intPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'preference_set_int'); - late final _preference_set_int = _preference_set_intPtr - .asFunction, int)>(); - - /// @brief Gets an integer value from the preference. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] key The name of the key to retrieve - /// @param[out] value The @c int value for the given key - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PREFERENCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PREFERENCE_ERROR_NO_KEY Required key not available - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - /// @see preference_set_int() - int preference_get_int( - ffi.Pointer key, - ffi.Pointer value, - ) { - return _preference_get_int( - key, - value, - ); - } - - late final _preference_get_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('preference_get_int'); - late final _preference_get_int = _preference_get_intPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Sets a double value in the preference. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] key The name of the key to modify - /// @param[in] value The new @c double value associated with the given key - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PREFERENCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - /// @see preference_get_double() - int preference_set_double( - ffi.Pointer key, - double value, - ) { - return _preference_set_double( - key, - value, - ); - } - - late final _preference_set_doublePtr = _lookup< - ffi - .NativeFunction, ffi.Double)>>( - 'preference_set_double'); - late final _preference_set_double = _preference_set_doublePtr - .asFunction, double)>(); - - /// @brief Gets a double value from the preference. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] key The name of the key to retrieve - /// @param[out] value The @c double value associated with the given key - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PREFERENCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PREFERENCE_ERROR_NO_KEY Required key not available - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - /// @see preference_set_double() - int preference_get_double( - ffi.Pointer key, - ffi.Pointer value, - ) { - return _preference_get_double( - key, - value, - ); - } - - late final _preference_get_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('preference_get_double'); - late final _preference_get_double = _preference_get_doublePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets a string value in the preference. - /// @details It makes a deep copy of the added string value. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] key The name of the key to modify - /// @param[in] value The new @c string value associated with the given key - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PREFERENCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - /// @see preference_get_string() - int preference_set_string( - ffi.Pointer key, - ffi.Pointer value, - ) { - return _preference_set_string( - key, - value, - ); - } - - late final _preference_set_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('preference_set_string'); - late final _preference_set_string = _preference_set_stringPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Gets a string value from the preference. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks @a value must be released using free(). - /// @param[in] key The name of the key to retrieve - /// @param[out] value The @c string value associated with the given key - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PREFERENCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PREFERENCE_ERROR_NO_KEY Required key not available - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - /// @see preference_set_string() - int preference_get_string( - ffi.Pointer key, - ffi.Pointer> value, - ) { - return _preference_get_string( - key, - value, - ); - } - - late final _preference_get_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer>)>>('preference_get_string'); - late final _preference_get_string = _preference_get_stringPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Sets a boolean value in the preference. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] key The name of the key to modify - /// @param[in] value The new @c boolean value associated with the given key - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PREFERENCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - /// @see preference_get_boolean() - int preference_set_boolean( - ffi.Pointer key, - bool value, - ) { - return _preference_set_boolean( - key, - value, - ); - } - - late final _preference_set_booleanPtr = _lookup< - ffi - .NativeFunction, ffi.Bool)>>( - 'preference_set_boolean'); - late final _preference_set_boolean = _preference_set_booleanPtr - .asFunction, bool)>(); - - /// @brief Gets a boolean value from the preference. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] key The name of the key to retrieve - /// @param[out] value The @c boolean value associated with the given key - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PREFERENCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PREFERENCE_ERROR_NO_KEY Required key not available - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - /// @see preference_set_boolean() - int preference_get_boolean( - ffi.Pointer key, - ffi.Pointer value, - ) { - return _preference_get_boolean( - key, - value, - ); - } - - late final _preference_get_booleanPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('preference_get_boolean'); - late final _preference_get_boolean = _preference_get_booleanPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Removes any value with the given @a key from the preference. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] key The name of the key to remove - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PREFERENCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PREFERENCE_ERROR_NO_KEY Required key not available - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - int preference_remove( - ffi.Pointer key, - ) { - return _preference_remove( - key, - ); - } - - late final _preference_removePtr = - _lookup)>>( - 'preference_remove'); - late final _preference_remove = - _preference_removePtr.asFunction)>(); - - /// @brief Checks whether the given @a key exists in the preference. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] key The name of the key to check - /// @param[out] existing If @c true the @a key exists in the preference, - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PREFERENCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - int preference_is_existing( - ffi.Pointer key, - ffi.Pointer existing, - ) { - return _preference_is_existing( - key, - existing, - ); - } - - late final _preference_is_existingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('preference_is_existing'); - late final _preference_is_existing = _preference_is_existingPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Removes all key-value pairs from the preference. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - /// @see preference_remove() - int preference_remove_all() { - return _preference_remove_all(); - } - - late final _preference_remove_allPtr = - _lookup>('preference_remove_all'); - late final _preference_remove_all = - _preference_remove_allPtr.asFunction(); - - /// @brief Registers a callback function to be invoked when value of the given key in the preference changes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] key The name of the key to monitor - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PREFERENCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PREFERENCE_ERROR_NO_KEY Required key not available - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - /// @post preference_changed_cb() will be invoked. - /// @see preference_unset_changed_cb() - /// @see preference_changed_cb() - int preference_set_changed_cb( - ffi.Pointer key, - preference_changed_cb callback, - ffi.Pointer user_data, - ) { - return _preference_set_changed_cb( - key, - callback, - user_data, - ); - } - - late final _preference_set_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, preference_changed_cb, - ffi.Pointer)>>('preference_set_changed_cb'); - late final _preference_set_changed_cb = - _preference_set_changed_cbPtr.asFunction< - int Function(ffi.Pointer, preference_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] key The name of the key to monitor - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PREFERENCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PREFERENCE_ERROR_NO_KEY Required key not available - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - /// @see preference_set_changed_cb() - int preference_unset_changed_cb( - ffi.Pointer key, - ) { - return _preference_unset_changed_cb( - key, - ); - } - - late final _preference_unset_changed_cbPtr = - _lookup)>>( - 'preference_unset_changed_cb'); - late final _preference_unset_changed_cb = _preference_unset_changed_cbPtr - .asFunction)>(); - - /// @brief Retrieves all key-value pairs in the preference by invoking the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] callback The callback function to get key value once for each key-value pair in the preference - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - /// @post This function invokes preference_item_cb() repeatedly to get each key-value pair in the preference. - /// @see preference_item_cb() - int preference_foreach_item( - preference_item_cb callback, - ffi.Pointer user_data, - ) { - return _preference_foreach_item( - callback, - user_data, - ); - } - - late final _preference_foreach_itemPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(preference_item_cb, - ffi.Pointer)>>('preference_foreach_item'); - late final _preference_foreach_item = _preference_foreach_itemPtr - .asFunction)>(); - - /// @brief Creates resource manager and get from db. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks If resource manager already exists, - /// It will just return APP_RESOURCE_ERROR_NONE - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_RESOURCE_ERROR_NONE Successful - /// @retval #APP_RESOURCE_ERROR_IO_ERROR IO Internal I/O Error - /// @retval #APP_RESOURCE_ERROR_OUT_OF_MEMORY Out of memeory - /// @see app_resource_manager_release() - int app_resource_manager_init() { - return _app_resource_manager_init(); - } - - late final _app_resource_manager_initPtr = - _lookup>( - 'app_resource_manager_init'); - late final _app_resource_manager_init = - _app_resource_manager_initPtr.asFunction(); - - /// @brief Converts resource ID to path name - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks If resource manager is not created yet, - /// app_resource_manager_init() will be invoked automatically. - /// Caller should free the returned pointer. - /// @param[in] type Resource type @see app_resource_e - /// @param[in] id Resource ID - /// @param[out] path The name of requested resource on success, otherwise NULL - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_RESOURCE_ERROR_NONE Successful - /// @retval #APP_RESOURCE_ERROR_INVALID_PARAMETER Invalid Parameter - /// @retval #APP_RESOURCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #APP_RESOURCE_ERROR_IO_ERROR Internal I/O Error or failed to find valid resource - /// @see app_resource_manager_init() - int app_resource_manager_get( - int type, - ffi.Pointer id, - ffi.Pointer> path, - ) { - return _app_resource_manager_get( - type, - id, - path, - ); - } - - late final _app_resource_manager_getPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer, - ffi.Pointer>)>>('app_resource_manager_get'); - late final _app_resource_manager_get = - _app_resource_manager_getPtr.asFunction< - int Function(int, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Destroys resource manager. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks Please note that the instance of resource manager should only be released when the application is closing. - /// It is a highly recommended way to improve run-time performance. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_RESOURCE_ERROR_NONE Successful - /// @see app_resource_manager_init() - int app_resource_manager_release() { - return _app_resource_manager_release(); - } - - late final _app_resource_manager_releasePtr = - _lookup>( - 'app_resource_manager_release'); - late final _app_resource_manager_release = - _app_resource_manager_releasePtr.asFunction(); - - /// @brief Destroys the application context handle and releases all its resources. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_context The application context handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see app_manager_foreach_app_context() - /// @see app_manager_get_app_context() - int app_context_destroy( - app_context_h app_context, - ) { - return _app_context_destroy( - app_context, - ); - } - - late final _app_context_destroyPtr = - _lookup>( - 'app_context_destroy'); - late final _app_context_destroy = - _app_context_destroyPtr.asFunction(); - - /// @deprecated Deprecated since 2.3.1. Use app_context_get_app_id() instead. - /// @brief Gets the application ID with the given application context. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a package using free(). - /// @param[in] app_context The application context - /// @param[out] package The application ID of the given application context - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_context_get_package( - app_context_h app_context, - ffi.Pointer> package, - ) { - return _app_context_get_package( - app_context, - package, - ); - } - - late final _app_context_get_packagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_context_h, - ffi.Pointer>)>>('app_context_get_package'); - late final _app_context_get_package = _app_context_get_packagePtr.asFunction< - int Function(app_context_h, ffi.Pointer>)>(); - - /// @brief Gets the application ID with the given application context. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a app_id using free(). - /// @param[in] app_context The application context - /// @param[out] app_id The application ID of the given application context - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_context_get_app_id( - app_context_h app_context, - ffi.Pointer> app_id, - ) { - return _app_context_get_app_id( - app_context, - app_id, - ); - } - - late final _app_context_get_app_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_context_h, - ffi.Pointer>)>>('app_context_get_app_id'); - late final _app_context_get_app_id = _app_context_get_app_idPtr.asFunction< - int Function(app_context_h, ffi.Pointer>)>(); - - /// @brief Gets the process ID with the given application context. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_context The application context - /// @param[out] pid The process ID of the given application context - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int app_context_get_pid( - app_context_h app_context, - ffi.Pointer pid, - ) { - return _app_context_get_pid( - app_context, - pid, - ); - } - - late final _app_context_get_pidPtr = _lookup< - ffi - .NativeFunction)>>( - 'app_context_get_pid'); - late final _app_context_get_pid = _app_context_get_pidPtr - .asFunction)>(); - - /// @brief Gets the package id with the given application context. - /// @since_tizen 3.0 - /// @remarks You must release @a pkg_id using free(). - /// @param[in] app_context The application context - /// @param[out] pkg_id The package ID of the given application context - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_context_get_package_id( - app_context_h app_context, - ffi.Pointer> pkg_id, - ) { - return _app_context_get_package_id( - app_context, - pkg_id, - ); - } - - late final _app_context_get_package_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - app_context_h, ffi.Pointer>)>>( - 'app_context_get_package_id'); - late final _app_context_get_package_id = - _app_context_get_package_idPtr.asFunction< - int Function(app_context_h, ffi.Pointer>)>(); - - /// @brief Gets the application state with the given application context. - /// @since_tizen 3.0 - /// @remarks Note that application's state might be changed after you get app_context. - /// This API just returns the state of application when you get the app_context. - /// @param[in] app_context The application context - /// @param[out] state The application state of the given application context - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int app_context_get_app_state( - app_context_h app_context, - ffi.Pointer state, - ) { - return _app_context_get_app_state( - app_context, - state, - ); - } - - late final _app_context_get_app_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_context_h, - ffi.Pointer)>>('app_context_get_app_state'); - late final _app_context_get_app_state = _app_context_get_app_statePtr - .asFunction)>(); - - /// @brief Checks whether the application with the given application context is terminated. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_context The application context - /// @param[out] terminated @c true if the application is terminated, \n - /// otherwise @c false if the application is running - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int app_context_is_terminated( - app_context_h app_context, - ffi.Pointer terminated, - ) { - return _app_context_is_terminated( - app_context, - terminated, - ); - } - - late final _app_context_is_terminatedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_context_h, - ffi.Pointer)>>('app_context_is_terminated'); - late final _app_context_is_terminated = _app_context_is_terminatedPtr - .asFunction)>(); - - /// @brief Checks whether two application contexts are equal. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] lhs The first application context to compare - /// @param[in] rhs The second application context to compare - /// @param[out] equal @c true if the application contexts are equal, \n - /// otherwise @c false if they are not equal - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int app_context_is_equal( - app_context_h lhs, - app_context_h rhs, - ffi.Pointer equal, - ) { - return _app_context_is_equal( - lhs, - rhs, - equal, - ); - } - - late final _app_context_is_equalPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_context_h, app_context_h, - ffi.Pointer)>>('app_context_is_equal'); - late final _app_context_is_equal = _app_context_is_equalPtr.asFunction< - int Function(app_context_h, app_context_h, ffi.Pointer)>(); - - /// @brief Checks whether the application is running as a sub application of the application group. - /// @since_tizen 3.0 - /// @param[in] app_context The application context - /// @param[out] is_sub_app @c true if the sub application of the group, \n - /// otherwise @c false if the main application of the group - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int app_context_is_sub_app( - app_context_h app_context, - ffi.Pointer is_sub_app, - ) { - return _app_context_is_sub_app( - app_context, - is_sub_app, - ); - } - - late final _app_context_is_sub_appPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - app_context_h, ffi.Pointer)>>('app_context_is_sub_app'); - late final _app_context_is_sub_app = _app_context_is_sub_appPtr - .asFunction)>(); - - /// @brief Clones the application context handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[out] clone The newly created application context handle, if cloning is successful - /// @param[in] app_context The application context - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_context_clone( - ffi.Pointer clone, - app_context_h app_context, - ) { - return _app_context_clone( - clone, - app_context, - ); - } - - late final _app_context_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, app_context_h)>>('app_context_clone'); - late final _app_context_clone = _app_context_clonePtr - .asFunction, app_context_h)>(); - - /// @brief Creates the application information handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_id The application ID - /// @param[out] app_info The application information handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_NO_SUCH_APP The app is not installed - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_manager_foreach_app_info() - /// @see app_manager_get_app_info() - int app_info_create( - ffi.Pointer app_id, - ffi.Pointer app_info, - ) { - return _app_info_create( - app_id, - app_info, - ); - } - - late final _app_info_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('app_info_create'); - late final _app_info_create = _app_info_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys the application information handle and releases all its resources. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_info The application information handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see app_manager_foreach_app_info() - /// @see app_manager_get_app_info() - int app_info_destroy( - app_info_h app_info, - ) { - return _app_info_destroy( - app_info, - ); - } - - late final _app_info_destroyPtr = - _lookup>( - 'app_info_destroy'); - late final _app_info_destroy = - _app_info_destroyPtr.asFunction(); - - /// @brief Gets the application ID with the given application context. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a app_id using free(). - /// @param[in] app_info The application information - /// @param[out] app_id The application ID of the given application context - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_info_get_app_id( - app_info_h app_info, - ffi.Pointer> app_id, - ) { - return _app_info_get_app_id( - app_info, - app_id, - ); - } - - late final _app_info_get_app_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_h, - ffi.Pointer>)>>('app_info_get_app_id'); - late final _app_info_get_app_id = _app_info_get_app_idPtr.asFunction< - int Function(app_info_h, ffi.Pointer>)>(); - - /// @brief Gets the executable path of the application - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a exec path using free(). - /// @param[in] app_info The application information - /// @param[out] exec The executable path of the application - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_info_get_exec( - app_info_h app_info, - ffi.Pointer> exec, - ) { - return _app_info_get_exec( - app_info, - exec, - ); - } - - late final _app_info_get_execPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_h, - ffi.Pointer>)>>('app_info_get_exec'); - late final _app_info_get_exec = _app_info_get_execPtr.asFunction< - int Function(app_info_h, ffi.Pointer>)>(); - - /// @brief Gets the label of the application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a label using free(). - /// @param[in] app_info The application information - /// @param[out] label The label of the application - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_info_get_label( - app_info_h app_info, - ffi.Pointer> label, - ) { - return _app_info_get_label( - app_info, - label, - ); - } - - late final _app_info_get_labelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_h, - ffi.Pointer>)>>('app_info_get_label'); - late final _app_info_get_label = _app_info_get_labelPtr.asFunction< - int Function(app_info_h, ffi.Pointer>)>(); - - /// @brief Gets the localed name of the application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release localed name using free(). - /// @param[in] app_id The application ID - /// @param[in] locale The locale information - /// @param[out] label The localed name of the application - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_info_get_localed_label( - ffi.Pointer app_id, - ffi.Pointer locale, - ffi.Pointer> label, - ) { - return _app_info_get_localed_label( - app_id, - locale, - label, - ); - } - - late final _app_info_get_localed_labelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>( - 'app_info_get_localed_label'); - late final _app_info_get_localed_label = - _app_info_get_localed_labelPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets the absolute path to the icon image. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a path using free(). - /// @param[in] app_info The application information - /// @param[out] path The absolute path to the icon - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_info_get_icon( - app_info_h app_info, - ffi.Pointer> path, - ) { - return _app_info_get_icon( - app_info, - path, - ); - } - - late final _app_info_get_iconPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_h, - ffi.Pointer>)>>('app_info_get_icon'); - late final _app_info_get_icon = _app_info_get_iconPtr.asFunction< - int Function(app_info_h, ffi.Pointer>)>(); - - /// @brief Gets the package name. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a package name using free(). - /// @param[in] app_info The application information - /// @param[out] package The package name - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_info_get_package( - app_info_h app_info, - ffi.Pointer> package, - ) { - return _app_info_get_package( - app_info, - package, - ); - } - - late final _app_info_get_packagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_h, - ffi.Pointer>)>>('app_info_get_package'); - late final _app_info_get_package = _app_info_get_packagePtr.asFunction< - int Function(app_info_h, ffi.Pointer>)>(); - - /// @brief Gets the package type name. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release package @a type name using free(). - /// @param[in] app_info The application information - /// @param[out] type The package type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_info_get_type( - app_info_h app_info, - ffi.Pointer> type, - ) { - return _app_info_get_type( - app_info, - type, - ); - } - - late final _app_info_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_h, - ffi.Pointer>)>>('app_info_get_type'); - late final _app_info_get_type = _app_info_get_typePtr.asFunction< - int Function(app_info_h, ffi.Pointer>)>(); - - /// @brief Gets the application component type. - /// @since_tizen 4.0 - /// @param[in] app_info The application information - /// @param[out] type The application component type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_IO_ERROR I/O error - /// @see #PACKAGE_INFO_PROP_APP_COMPONENT_TYPE - /// @see #app_info_app_component_type_e - int app_info_get_app_component_type( - app_info_h app_info, - ffi.Pointer type, - ) { - return _app_info_get_app_component_type( - app_info, - type, - ); - } - - late final _app_info_get_app_component_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_h, - ffi.Pointer)>>('app_info_get_app_component_type'); - late final _app_info_get_app_component_type = - _app_info_get_app_component_typePtr - .asFunction)>(); - - /// @brief Gets the list of metadata for a particular application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_info The application information - /// @param[in] callback The callback function for list - /// @param[in] user_data The user data to be passed to callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_IO_ERROR I/O error - int app_info_foreach_metadata( - app_info_h app_info, - app_info_metadata_cb callback, - ffi.Pointer user_data, - ) { - return _app_info_foreach_metadata( - app_info, - callback, - user_data, - ); - } - - late final _app_info_foreach_metadataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_h, app_info_metadata_cb, - ffi.Pointer)>>('app_info_foreach_metadata'); - late final _app_info_foreach_metadata = - _app_info_foreach_metadataPtr.asFunction< - int Function( - app_info_h, app_info_metadata_cb, ffi.Pointer)>(); - - /// @brief Checks whether application information is nodisplay. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_info The application information - /// @param[out] nodisplay @c true if the application is nodisplay, \n - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int app_info_is_nodisplay( - app_info_h app_info, - ffi.Pointer nodisplay, - ) { - return _app_info_is_nodisplay( - app_info, - nodisplay, - ); - } - - late final _app_info_is_nodisplayPtr = _lookup< - ffi - .NativeFunction)>>( - 'app_info_is_nodisplay'); - late final _app_info_is_nodisplay = _app_info_is_nodisplayPtr - .asFunction)>(); - - /// @brief Checks whether two application information are equal. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] lhs The first application information to compare - /// @param[in] rhs The second application information to compare - /// @param[out] equal @c true if the application information are equal, \n - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int app_info_is_equal( - app_info_h lhs, - app_info_h rhs, - ffi.Pointer equal, - ) { - return _app_info_is_equal( - lhs, - rhs, - equal, - ); - } - - late final _app_info_is_equalPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_h, app_info_h, - ffi.Pointer)>>('app_info_is_equal'); - late final _app_info_is_equal = _app_info_is_equalPtr.asFunction< - int Function(app_info_h, app_info_h, ffi.Pointer)>(); - - /// @brief Checks whether application is enabled. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_info The application information - /// @param[out] enabled @c true if the application is enabled, \n - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int app_info_is_enabled( - app_info_h app_info, - ffi.Pointer enabled, - ) { - return _app_info_is_enabled( - app_info, - enabled, - ); - } - - late final _app_info_is_enabledPtr = _lookup< - ffi - .NativeFunction)>>( - 'app_info_is_enabled'); - late final _app_info_is_enabled = _app_info_is_enabledPtr - .asFunction)>(); - - /// @brief Checks whether application is launched on booting time. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_info The application information - /// @param[out] onboot @c true if the application is launched on booting time, \n - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int app_info_is_onboot( - app_info_h app_info, - ffi.Pointer onboot, - ) { - return _app_info_is_onboot( - app_info, - onboot, - ); - } - - late final _app_info_is_onbootPtr = _lookup< - ffi - .NativeFunction)>>( - 'app_info_is_onboot'); - late final _app_info_is_onboot = _app_info_is_onbootPtr - .asFunction)>(); - - /// @brief Checks whether application is preloaded. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_info The application information - /// @param[out] preload @c true if the application is preloaded, \n - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int app_info_is_preload( - app_info_h app_info, - ffi.Pointer preload, - ) { - return _app_info_is_preload( - app_info, - preload, - ); - } - - late final _app_info_is_preloadPtr = _lookup< - ffi - .NativeFunction)>>( - 'app_info_is_preload'); - late final _app_info_is_preload = _app_info_is_preloadPtr - .asFunction)>(); - - /// @brief Clones the application information handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[out] clone A newly created application information handle, if successfully cloned - /// @param[in] app_info The application information - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #APP_MANAGER_ERROR_NO_SUCH_APP The app is not installed - int app_info_clone( - ffi.Pointer clone, - app_info_h app_info, - ) { - return _app_info_clone( - clone, - app_info, - ); - } - - late final _app_info_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, app_info_h)>>('app_info_clone'); - late final _app_info_clone = _app_info_clonePtr - .asFunction, app_info_h)>(); - - /// @platform - /// @brief Runs a callback for each category which the given application belongs to. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @param[in] app_info The application information - /// @param[in] callback The callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #APP_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @see app_info_create() - int app_info_foreach_category( - app_info_h app_info, - app_info_category_cb callback, - ffi.Pointer user_data, - ) { - return _app_info_foreach_category( - app_info, - callback, - user_data, - ); - } - - late final _app_info_foreach_categoryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_h, app_info_category_cb, - ffi.Pointer)>>('app_info_foreach_category'); - late final _app_info_foreach_category = - _app_info_foreach_categoryPtr.asFunction< - int Function( - app_info_h, app_info_category_cb, ffi.Pointer)>(); - - /// @brief Creates the application information filter handle from DB. - /// All filter properties will be ANDed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[out] handle The pointer to the application info filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #APP_MANAGER_ERROR_IO_ERROR I/O error - int app_info_filter_create( - ffi.Pointer handle, - ) { - return _app_info_filter_create( - handle, - ); - } - - late final _app_info_filter_createPtr = _lookup< - ffi.NativeFunction)>>( - 'app_info_filter_create'); - late final _app_info_filter_create = _app_info_filter_createPtr - .asFunction)>(); - - /// @brief Destroys the application information filter handle, freeing up all the resources. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] handle The pointer to the application info filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_IO_ERROR I/O error - int app_info_filter_destroy( - app_info_filter_h handle, - ) { - return _app_info_filter_destroy( - handle, - ); - } - - late final _app_info_filter_destroyPtr = - _lookup>( - 'app_info_filter_destroy'); - late final _app_info_filter_destroy = - _app_info_filter_destroyPtr.asFunction(); - - /// @brief Adds a boolean filter property to the filter handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] handle The pointer to the application info filter handle - /// @param[in] property The integer property name - /// @param[in] value The value corresponding to the property - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_IO_ERROR I/O error - int app_info_filter_add_bool( - app_info_filter_h handle, - ffi.Pointer property, - bool value, - ) { - return _app_info_filter_add_bool( - handle, - property, - value, - ); - } - - late final _app_info_filter_add_boolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_filter_h, ffi.Pointer, - ffi.Bool)>>('app_info_filter_add_bool'); - late final _app_info_filter_add_bool = - _app_info_filter_add_boolPtr.asFunction< - int Function(app_info_filter_h, ffi.Pointer, bool)>(); - - /// @brief Adds a string filter property to the filter handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] handle The pointer to the application info filter handle - /// @param[in] property The integer property name - /// @param[in] value The value corresponding to the property - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_IO_ERROR I/O error - int app_info_filter_add_string( - app_info_filter_h handle, - ffi.Pointer property, - ffi.Pointer value, - ) { - return _app_info_filter_add_string( - handle, - property, - value, - ); - } - - late final _app_info_filter_add_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_filter_h, ffi.Pointer, - ffi.Pointer)>>('app_info_filter_add_string'); - late final _app_info_filter_add_string = - _app_info_filter_add_stringPtr.asFunction< - int Function(app_info_filter_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the count of filtered apps. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] handle The pointer to the application info filter handle - /// @param[out] count The pointer to the variable for count - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_IO_ERROR I/O error - int app_info_filter_count_appinfo( - app_info_filter_h handle, - ffi.Pointer count, - ) { - return _app_info_filter_count_appinfo( - handle, - count, - ); - } - - late final _app_info_filter_count_appinfoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_filter_h, - ffi.Pointer)>>('app_info_filter_count_appinfo'); - late final _app_info_filter_count_appinfo = _app_info_filter_count_appinfoPtr - .asFunction)>(); - - /// @brief Executes the user supplied callback function for each application that satisfy the filter conditions. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] handle The pointer to the application info filter handle - /// @param[in] callback The callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_IO_ERROR I/O error - int app_info_filter_foreach_appinfo( - app_info_filter_h handle, - app_info_filter_cb callback, - ffi.Pointer user_data, - ) { - return _app_info_filter_foreach_appinfo( - handle, - callback, - user_data, - ); - } - - late final _app_info_filter_foreach_appinfoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_filter_h, app_info_filter_cb, - ffi.Pointer)>>('app_info_filter_foreach_appinfo'); - late final _app_info_filter_foreach_appinfo = - _app_info_filter_foreach_appinfoPtr.asFunction< - int Function( - app_info_filter_h, app_info_filter_cb, ffi.Pointer)>(); - - /// @brief Creates the application's metadata information filter handle from DB. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[out] handle The pointer to the application metadata info filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #APP_MANAGER_ERROR_IO_ERROR I/O error - int app_info_metadata_filter_create( - ffi.Pointer handle, - ) { - return _app_info_metadata_filter_create( - handle, - ); - } - - late final _app_info_metadata_filter_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'app_info_metadata_filter_create'); - late final _app_info_metadata_filter_create = - _app_info_metadata_filter_createPtr - .asFunction)>(); - - /// @brief Destroys the application's metadata information filter handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] handle The pointer to the application info filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_IO_ERROR I/O error - int app_info_metadata_filter_destroy( - app_info_metadata_filter_h handle, - ) { - return _app_info_metadata_filter_destroy( - handle, - ); - } - - late final _app_info_metadata_filter_destroyPtr = - _lookup>( - 'app_info_metadata_filter_destroy'); - late final _app_info_metadata_filter_destroy = - _app_info_metadata_filter_destroyPtr - .asFunction(); - - /// @brief Adds filter condition for the query API. - /// @details The query will search the entire application metadata information collected from - /// the manifest file of all the installed packages. You can specify value as @c NULL to search based on key only. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] handle The pointer to the application metadata info filter handle - /// @param[in] key The pointer to metadata key - /// @param[in] value The pointer to metadata value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_IO_ERROR I/O error - int app_info_metadata_filter_add( - app_info_metadata_filter_h handle, - ffi.Pointer key, - ffi.Pointer value, - ) { - return _app_info_metadata_filter_add( - handle, - key, - value, - ); - } - - late final _app_info_metadata_filter_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_metadata_filter_h, ffi.Pointer, - ffi.Pointer)>>('app_info_metadata_filter_add'); - late final _app_info_metadata_filter_add = - _app_info_metadata_filter_addPtr.asFunction< - int Function(app_info_metadata_filter_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Executes the filter query. - /// @details The query will search the entire application metadata information collected from - /// the manifest file of all the installed packages. For each application returned by the query, the callback will be called. If callback returns - /// negative value, no more callbacks will be called and API will return. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] handle The pointer to the application metadata info filter handle - /// @param[in] callback The function pointer to callback - /// @param[in] user_data The pointer to user data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_IO_ERROR I/O error - int app_info_metadata_filter_foreach( - app_info_metadata_filter_h handle, - app_info_filter_cb callback, - ffi.Pointer user_data, - ) { - return _app_info_metadata_filter_foreach( - handle, - callback, - user_data, - ); - } - - late final _app_info_metadata_filter_foreachPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_metadata_filter_h, app_info_filter_cb, - ffi.Pointer)>>('app_info_metadata_filter_foreach'); - late final _app_info_metadata_filter_foreach = - _app_info_metadata_filter_foreachPtr.asFunction< - int Function(app_info_metadata_filter_h, app_info_filter_cb, - ffi.Pointer)>(); - - /// @brief Registers a callback function to be invoked when the applications get launched or terminated. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #APP_MANAGER_ERROR_IO_ERROR Internal I/O error - /// @post It will invoke app_manager_app_context_event_cb() when the application is launched or terminated. - /// @see app_manager_unset_app_context_event_cb() - /// @see app_manager_app_context_event_cb() - int app_manager_set_app_context_event_cb( - app_manager_app_context_event_cb callback, - ffi.Pointer user_data, - ) { - return _app_manager_set_app_context_event_cb( - callback, - user_data, - ); - } - - late final _app_manager_set_app_context_event_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_manager_app_context_event_cb, - ffi.Pointer)>>('app_manager_set_app_context_event_cb'); - late final _app_manager_set_app_context_event_cb = - _app_manager_set_app_context_event_cbPtr.asFunction< - int Function( - app_manager_app_context_event_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @see app_manager_app_context_event_cb() - void app_manager_unset_app_context_event_cb() { - return _app_manager_unset_app_context_event_cb(); - } - - late final _app_manager_unset_app_context_event_cbPtr = - _lookup>( - 'app_manager_unset_app_context_event_cb'); - late final _app_manager_unset_app_context_event_cb = - _app_manager_unset_app_context_event_cbPtr.asFunction(); - - /// @brief Retrieves all application contexts of running applications. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_IO_ERROR Internal I/O error - /// @post This function invokes app_manager_app_context_cb() for each application context. - /// @see app_manager_app_context_cb() - /// @remarks In case of ui applications, sub apps in application groups will not be shown. - int app_manager_foreach_app_context( - app_manager_app_context_cb callback, - ffi.Pointer user_data, - ) { - return _app_manager_foreach_app_context( - callback, - user_data, - ); - } - - late final _app_manager_foreach_app_contextPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_manager_app_context_cb, - ffi.Pointer)>>('app_manager_foreach_app_context'); - late final _app_manager_foreach_app_context = - _app_manager_foreach_app_contextPtr.asFunction< - int Function(app_manager_app_context_cb, ffi.Pointer)>(); - - /// @brief Retrieves all application contexts of running applications including sub apps. - /// @details You can iterate all the running application contexts using this API. - /// This API is similar to app_manager_foreach_app_context() except that this API iterates application contexts including sub apps in application groups. - /// @since_tizen 3.0 - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_IO_ERROR Internal I/O error - /// @post This function invokes app_manager_app_context_cb() for each application context. - /// @see app_manager_app_context_cb() - int app_manager_foreach_running_app_context( - app_manager_app_context_cb callback, - ffi.Pointer user_data, - ) { - return _app_manager_foreach_running_app_context( - callback, - user_data, - ); - } - - late final _app_manager_foreach_running_app_contextPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - app_manager_app_context_cb, ffi.Pointer)>>( - 'app_manager_foreach_running_app_context'); - late final _app_manager_foreach_running_app_context = - _app_manager_foreach_running_app_contextPtr.asFunction< - int Function(app_manager_app_context_cb, ffi.Pointer)>(); - - /// @brief Gets the application context for the given ID of the application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This function returns #APP_MANAGER_ERROR_NO_SUCH_APP if the application with the given application ID is not running. \n - /// You must release @a app_context using app_context_destroy(). - /// @param[in] app_id The ID of the application - /// @param[out] app_context The application context of the given application ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #APP_MANAGER_ERROR_NO_SUCH_APP No such application - int app_manager_get_app_context( - ffi.Pointer app_id, - ffi.Pointer app_context, - ) { - return _app_manager_get_app_context( - app_id, - app_context, - ); - } - - late final _app_manager_get_app_contextPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('app_manager_get_app_context'); - late final _app_manager_get_app_context = - _app_manager_get_app_contextPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the ID of the application for the given process ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This function returns #APP_MANAGER_ERROR_NO_SUCH_APP if the application with the given process ID is not valid. \n - /// You must release @a app_id using free(). - /// @param[in] pid The process ID of the application - /// @param[out] app_id The ID of the application - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_manager_get_app_id( - int pid, - ffi.Pointer> app_id, - ) { - return _app_manager_get_app_id( - pid, - app_id, - ); - } - - late final _app_manager_get_app_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(pid_t, - ffi.Pointer>)>>('app_manager_get_app_id'); - late final _app_manager_get_app_id = _app_manager_get_app_idPtr - .asFunction>)>(); - - /// @brief Checks whether the application with the given ID of the application is running. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_id The ID of the application - /// @param[out] running @c true if the application is running, \n - /// otherwise @c false if not running - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int app_manager_is_running( - ffi.Pointer app_id, - ffi.Pointer running, - ) { - return _app_manager_is_running( - app_id, - running, - ); - } - - late final _app_manager_is_runningPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('app_manager_is_running'); - late final _app_manager_is_running = _app_manager_is_runningPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Resumes the application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/appmanager.launch - /// @param[in] app_context The application context - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_APP_NO_RUNNING App is not running - /// @retval #APP_MANAGER_ERROR_REQUEST_FAILED Internal resume error - /// @retval #APP_MANAGER_ERROR_PERMISSION_DENIED Permission denied - int app_manager_resume_app( - app_context_h app_context, - ) { - return _app_manager_resume_app( - app_context, - ); - } - - late final _app_manager_resume_appPtr = - _lookup>( - 'app_manager_resume_app'); - late final _app_manager_resume_app = - _app_manager_resume_appPtr.asFunction(); - - /// @brief Terminates the back ground application.\n - /// UI applications that are in paused state or some service applications could be required to terminate by this API. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/appmanager.kill.bgapp - /// @remarks This function returns after it just sends a request for terminating a background application.\n - /// Platform will decide if the target application could be terminated or not according to the state of the target application. - /// @param[in] app_context The application context - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_REQUEST_FAILED Failed to send terminate request - /// @retval #APP_MANAGER_ERROR_PERMISSION_DENIED Permission denied - int app_manager_request_terminate_bg_app( - app_context_h app_context, - ) { - return _app_manager_request_terminate_bg_app( - app_context, - ); - } - - late final _app_manager_request_terminate_bg_appPtr = - _lookup>( - 'app_manager_request_terminate_bg_app'); - late final _app_manager_request_terminate_bg_app = - _app_manager_request_terminate_bg_appPtr - .asFunction(); - - /// @brief Retrieves all installed applications information. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @post This function invokes app_manager_app_info_cb() for each application information. - /// @see app_manager_app_info_cb() - int app_manager_foreach_app_info( - app_manager_app_info_cb callback, - ffi.Pointer user_data, - ) { - return _app_manager_foreach_app_info( - callback, - user_data, - ); - } - - late final _app_manager_foreach_app_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_manager_app_info_cb, - ffi.Pointer)>>('app_manager_foreach_app_info'); - late final _app_manager_foreach_app_info = - _app_manager_foreach_app_infoPtr.asFunction< - int Function(app_manager_app_info_cb, ffi.Pointer)>(); - - /// @brief Gets the application information for the given application ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a app_info using app_info_destroy(). - /// @param[in] app_id The ID of the application - /// @param[out] app_info The application information for the given application ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #APP_MANAGER_ERROR_NO_SUCH_APP No such application - int app_manager_get_app_info( - ffi.Pointer app_id, - ffi.Pointer app_info, - ) { - return _app_manager_get_app_info( - app_id, - app_info, - ); - } - - late final _app_manager_get_app_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('app_manager_get_app_info'); - late final _app_manager_get_app_info = - _app_manager_get_app_infoPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the absolute path to the shared data directory of the application specified - /// with an application ID. - /// @details An application can only read the files of other application's shared data directory. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specified @a path should be released with free(). @n - /// Since Tizen 3.0, the shared/data directory is supported only for the applications that declare the http://tizen.org/privilege/appdir.shareddata privilege. - /// The function will fail with #APP_MANAGER_ERROR_NOT_SUPPORTED if the privilege is not declared. - /// - /// @param[in] app_id The ID of the application - /// @param[in,out] path The absolute path to the shared data directory of the application - /// specified with the @a app_id - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_NO_SUCH_APP No such application - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #APP_MANAGER_ERROR_NOT_SUPPORTED Not supported - int app_manager_get_shared_data_path( - ffi.Pointer app_id, - ffi.Pointer> path, - ) { - return _app_manager_get_shared_data_path( - app_id, - path, - ); - } - - late final _app_manager_get_shared_data_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer>)>>( - 'app_manager_get_shared_data_path'); - late final _app_manager_get_shared_data_path = - _app_manager_get_shared_data_pathPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Gets the absolute path to the shared resource directory of the application specified - /// with an application ID. - /// @details An application can only read the files of other application's shared resource directory. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specified @a path should be released with free(). - /// - /// @param[in] app_id The ID of the application - /// @param[in,out] path The absolute path to the shared resource directory of the application - /// specified with the @a app_id - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_NO_SUCH_APP No such application - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_manager_get_shared_resource_path( - ffi.Pointer app_id, - ffi.Pointer> path, - ) { - return _app_manager_get_shared_resource_path( - app_id, - path, - ); - } - - late final _app_manager_get_shared_resource_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer>)>>( - 'app_manager_get_shared_resource_path'); - late final _app_manager_get_shared_resource_path = - _app_manager_get_shared_resource_pathPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Gets the absolute path to the shared trusted directory of the application specified - /// with an application ID. - /// @details An application signed with the same certificate can read and write the files of - /// other application's shared trusted directory. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specified @a path should be released with free(). - /// - /// @param[in] app_id The ID of the application - /// @param[in,out] path The absolute path to the shared trusted directory of the application - /// specified with the @a app_id - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_NO_SUCH_APP No such application - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_manager_get_shared_trusted_path( - ffi.Pointer app_id, - ffi.Pointer> path, - ) { - return _app_manager_get_shared_trusted_path( - app_id, - path, - ); - } - - late final _app_manager_get_shared_trusted_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer>)>>( - 'app_manager_get_shared_trusted_path'); - late final _app_manager_get_shared_trusted_path = - _app_manager_get_shared_trusted_pathPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. - /// @brief Gets the absolute path to the shared data directory of the application specified - /// with an application ID. - /// @details An application can only read the files of other application's shared data directory. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specified @a path should be released with free(). - /// @remarks To access the path returned by this function may not work as intended in certain devices due to some implementation issues. - /// - /// @param[in] app_id The ID of the application - /// @param[in,out] path The absolute path to the shared data directory of the application - /// specified with the @a app_id - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_NO_SUCH_APP No such application - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_manager_get_external_shared_data_path( - ffi.Pointer app_id, - ffi.Pointer> path, - ) { - return _app_manager_get_external_shared_data_path( - app_id, - path, - ); - } - - late final _app_manager_get_external_shared_data_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer>)>>( - 'app_manager_get_external_shared_data_path'); - late final _app_manager_get_external_shared_data_path = - _app_manager_get_external_shared_data_pathPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Creates a app manager event handle. - /// @since_tizen 3.0 - /// @remarks You must release @a handle using app_manager_event_destroy(). - /// - /// @param[out] handle The app manager event handle that is newly created on success - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see app_manager_event_destroy() - int app_manager_event_create( - ffi.Pointer handle, - ) { - return _app_manager_event_create( - handle, - ); - } - - late final _app_manager_event_createPtr = _lookup< - ffi - .NativeFunction)>>( - 'app_manager_event_create'); - late final _app_manager_event_create = _app_manager_event_createPtr - .asFunction)>(); - - /// @brief Sets the event to handle to listen. - /// You can combine multiple status using OR operation which you want to listen. - /// @since_tizen 3.0 - /// - /// @param [in] handle The app manager event handle - /// @param [in] status_type The status of the application - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_REQUEST_FAILED Internal error - /// - /// @see app_manager_event_status_type_e - /// @see app_manager_set_event_cb() - int app_manager_event_set_status( - app_manager_event_h handle, - int status_type, - ) { - return _app_manager_event_set_status( - handle, - status_type, - ); - } - - late final _app_manager_event_set_statusPtr = _lookup< - ffi.NativeFunction>( - 'app_manager_event_set_status'); - late final _app_manager_event_set_status = _app_manager_event_set_statusPtr - .asFunction(); - - /// @brief Registers a callback function to be invoked when the app is event has occurred - /// @since_tizen 3.0 - /// @param[in] handle The app manager event handle - /// @param[in] callback The callback function to be registered - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_REQUEST_FAILED Internal error - /// @post app_manager_event_cb() will be invoked. - /// - /// @see app_manager_event_set_status() - /// @see app_manager_event_cb() - /// @see app_manager_unset_event_cb() - int app_manager_set_event_cb( - app_manager_event_h handle, - app_manager_event_cb callback, - ffi.Pointer user_data, - ) { - return _app_manager_set_event_cb( - handle, - callback, - user_data, - ); - } - - late final _app_manager_set_event_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_manager_event_h, app_manager_event_cb, - ffi.Pointer)>>('app_manager_set_event_cb'); - late final _app_manager_set_event_cb = - _app_manager_set_event_cbPtr.asFunction< - int Function(app_manager_event_h, app_manager_event_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen 3.0 - /// - /// @param[in] handle The app manager event handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_REQUEST_FAILED Internal error - /// - /// @see app_manager_event_cb() - /// @see app_manager_set_event_cb() - int app_manager_unset_event_cb( - app_manager_event_h handle, - ) { - return _app_manager_unset_event_cb( - handle, - ); - } - - late final _app_manager_unset_event_cbPtr = - _lookup>( - 'app_manager_unset_event_cb'); - late final _app_manager_unset_event_cb = _app_manager_unset_event_cbPtr - .asFunction(); - - /// @brief Destroys the app manager event handle. - /// @since_tizen 3.0 - /// - /// @param[in] handle The app manager event handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_REQUEST_FAILED Internal error - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see app_manager_event_create() - int app_manager_event_destroy( - app_manager_event_h handle, - ) { - return _app_manager_event_destroy( - handle, - ); - } - - late final _app_manager_event_destroyPtr = - _lookup>( - 'app_manager_event_destroy'); - late final _app_manager_event_destroy = _app_manager_event_destroyPtr - .asFunction(); - - /// @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif Use badge_add instead. - /// @brief Creates a badge for the application itself. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @details Creates new badge to display. - /// @param[in] writable_app_id The id of application which is authorized to change the badge - /// @return #BADGE_ERROR_NONE if success, other value if failure - /// @retval BADGE_ERROR_NONE Success - /// @retval BADGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval BADGE_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval BADGE_ERROR_IO_ERROR Error from I/O - /// @retval BADGE_ERROR_SERVICE_NOT_READY Service is not ready - /// @retval BADGE_ERROR_NOT_SUPPORTED Not supported - /// @see #badge_error_e - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int err = BADGE_ERROR_NONE; - /// - /// err = badge_new(app_id); - /// if (err != BADGE_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int badge_new( - ffi.Pointer writable_app_id, - ) { - return _badge_new( - writable_app_id, - ); - } - - late final _badge_newPtr = - _lookup)>>( - 'badge_new'); - late final _badge_new = - _badge_newPtr.asFunction)>(); - - /// @brief Creates a badge for the application specified by the badge_app_id. - /// @remarks Creating and updating a badge of the other application is allowed only when both applications are signed with the same certificate. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[in] badge_app_id The id of the application for which the badge will be created. This parameter can be null when creating a badge for itself. - /// @return #BADGE_ERROR_NONE If success, other value if failure - /// @retval #BADGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BADGE_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #BADGE_ERROR_IO_ERROR Error from I/O - /// @retval #BADGE_ERROR_SERVICE_NOT_READY Service is not ready - /// @retval #BADGE_ERROR_INVALID_PACKAGE The caller application is not signed with the certificate of the badge_app_id - /// @retval BADGE_ERROR_NOT_SUPPORTED Not supported - /// @see #badge_error_e - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int err = BADGE_ERROR_NONE; - /// - /// err = badge_add("org.tizen.email"); - /// if (err != BADGE_ERROR_NONE) - /// return; - /// } - /// @endcode - int badge_add( - ffi.Pointer badge_app_id, - ) { - return _badge_add( - badge_app_id, - ); - } - - late final _badge_addPtr = - _lookup)>>( - 'badge_add'); - late final _badge_add = - _badge_addPtr.asFunction)>(); - - /// @brief Removes the badge for the designated application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[in] app_id The name of the designated application - /// @return #BADGE_ERROR_NONE if success, other value if failure - /// @retval BADGE_ERROR_NONE Success - /// @retval BADGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval BADGE_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval BADGE_ERROR_IO_ERROR Error from I/O - /// @retval BADGE_ERROR_SERVICE_NOT_READY Service is not ready - /// @retval BADGE_ERROR_NOT_SUPPORTED Not supported - /// @see #badge_error_e - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int err = BADGE_ERROR_NONE; - /// - /// err = badge_remove(app_id); - /// if (err != BADGE_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int badge_remove( - ffi.Pointer app_id, - ) { - return _badge_remove( - app_id, - ); - } - - late final _badge_removePtr = - _lookup)>>( - 'badge_remove'); - late final _badge_remove = - _badge_removePtr.asFunction)>(); - - /// @brief Sets badge count for the designated application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[in] app_id The name of the designated application - /// @param[in] count The count of the badge - /// @return #BADGE_ERROR_NONE if success, other value if failure - /// @retval BADGE_ERROR_NONE Success - /// @retval BADGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval BADGE_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval BADGE_ERROR_IO_ERROR Error from I/O - /// @retval BADGE_ERROR_SERVICE_NOT_READY Service is not ready - /// @retval BADGE_ERROR_NOT_SUPPORTED Not supported - /// @see #badge_error_e - /// @see badge_new() - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int err = BADGE_ERROR_NONE; - /// - /// err = badge_set_count(app_id, 1); - /// if (err != BADGE_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int badge_set_count( - ffi.Pointer app_id, - int count, - ) { - return _badge_set_count( - app_id, - count, - ); - } - - late final _badge_set_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.UnsignedInt)>>('badge_set_count'); - late final _badge_set_count = _badge_set_countPtr - .asFunction, int)>(); - - /// @brief Gets badge count for the designated application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[in] app_id The name of the designated application - /// @param[out] count The count of the badge - /// @return #BADGE_ERROR_NONE if success, other value if failure - /// @retval BADGE_ERROR_NONE Success - /// @retval BADGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval BADGE_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval BADGE_ERROR_FROM_DB Error from DB - /// @retval BADGE_ERROR_ALREADY_EXIST Already exist - /// @retval BADGE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval BADGE_ERROR_NOT_SUPPORTED Not supported - /// @see #badge_error_e - /// @see badge_new() - /// @see badge_set_count() - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int err = BADGE_ERROR_NONE; - /// int count = 0; - /// - /// err = badge_get_count(app_id, &count); - /// if (err != BADGE_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int badge_get_count( - ffi.Pointer app_id, - ffi.Pointer count, - ) { - return _badge_get_count( - app_id, - count, - ); - } - - late final _badge_get_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('badge_get_count'); - late final _badge_get_count = _badge_get_countPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the display option for the designated application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[in] app_id The name of the designated application - /// @param[in] is_display The display option (1 = display, 0 = not display) - /// @return #BADGE_ERROR_NONE if success, other value if failure - /// @retval BADGE_ERROR_NONE Success - /// @retval BADGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval BADGE_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval BADGE_ERROR_IO_ERROR Error from I/O - /// @retval BADGE_ERROR_SERVICE_NOT_READY Service is not ready - /// @retval BADGE_ERROR_NOT_SUPPORTED Not supported - /// @see #badge_error_e - /// @see badge_new() - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int err = BADGE_ERROR_NONE; - /// - /// err = badge_set_display(app_id, 1); - /// if (err != BADGE_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int badge_set_display( - ffi.Pointer app_id, - int is_display, - ) { - return _badge_set_display( - app_id, - is_display, - ); - } - - late final _badge_set_displayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.UnsignedInt)>>('badge_set_display'); - late final _badge_set_display = _badge_set_displayPtr - .asFunction, int)>(); - - /// @brief Gets the display option for the designated application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[in] app_id The name of the designated application - /// @param[out] is_display The display option (1 = display, 0 = not display) - /// @return #BADGE_ERROR_NONE if success, other value if failure - /// @retval BADGE_ERROR_NONE Success - /// @retval BADGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval BADGE_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval BADGE_ERROR_FROM_DB Error from DB - /// @retval BADGE_ERROR_NOT_EXIST Not exist - /// @retval BADGE_ERROR_SERVICE_NOT_READY Service is not ready - /// @retval BADGE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval BADGE_ERROR_NOT_SUPPORTED Not supported - /// @see #badge_error_e - /// @see badge_new() - /// @see badge_set_count() - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int is_display = 0; - /// int err = BADGE_ERROR_NONE; - /// - /// err = badge_get_display(app_id, &is_display); - /// if (err != BADGE_ERROR_NONE) - /// return; - /// } - /// @endcode - int badge_get_display( - ffi.Pointer app_id, - ffi.Pointer is_display, - ) { - return _badge_get_display( - app_id, - is_display, - ); - } - - late final _badge_get_displayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('badge_get_display'); - late final _badge_get_display = _badge_get_displayPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Retrieves all existing badges. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[in] callback The callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return #BADGE_ERROR_NONE if success, other value if failure - /// @retval BADGE_ERROR_NONE Success - /// @retval BADGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval BADGE_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval BADGE_ERROR_FROM_DB Error form DB - /// @retval BADGE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval BADGE_ERROR_NOT_EXIST Not exist - /// @retval BADGE_ERROR_NOT_SUPPORTED Not supported - /// @see #badge_error_e - /// @see badge_foreach_cb() - int badge_foreach( - badge_foreach_cb callback, - ffi.Pointer user_data, - ) { - return _badge_foreach( - callback, - user_data, - ); - } - - late final _badge_foreachPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - badge_foreach_cb, ffi.Pointer)>>('badge_foreach'); - late final _badge_foreach = _badge_foreachPtr - .asFunction)>(); - - /// @brief Registers a callback function to receive badge change event. - /// @remarks Should be used in the homescreen.\n - /// Prospective Clients : Homescreen. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[in] callback The callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return #BADGE_ERROR_NONE if success, other value if failure - /// @retval BADGE_ERROR_NONE Success - /// @retval BADGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval BADGE_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval BADGE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval BADGE_ERROR_NOT_SUPPORTED Not supported - /// @see #badge_error_e - /// @see badge_new() - /// @see badge_remove() - /// @see badge_set_count() - int badge_register_changed_cb( - badge_change_cb callback, - ffi.Pointer user_data, - ) { - return _badge_register_changed_cb( - callback, - user_data, - ); - } - - late final _badge_register_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(badge_change_cb, - ffi.Pointer)>>('badge_register_changed_cb'); - late final _badge_register_changed_cb = _badge_register_changed_cbPtr - .asFunction)>(); - - /// @brief Unregisters a callback function to receive badge change event. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[in] callback The callback function - /// @return #BADGE_ERROR_NONE if success, other value if failure - /// @retval BADGE_ERROR_NONE Success - /// @retval BADGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval BADGE_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval BADGE_ERROR_NOT_EXIST Not exist - /// @retval BADGE_ERROR_NOT_SUPPORTED Not supported - /// @see #badge_error_e - /// @see badge_register_changed_cb() - int badge_unregister_changed_cb( - badge_change_cb callback, - ) { - return _badge_unregister_changed_cb( - callback, - ); - } - - late final _badge_unregister_changed_cbPtr = - _lookup>( - 'badge_unregister_changed_cb'); - late final _badge_unregister_changed_cb = _badge_unregister_changed_cbPtr - .asFunction(); - - /// @brief Moves the cursor to the first position. - /// @since_tizen 2.3 - /// @remarks The following example demonstrates how to use the %data_control_sql_step_first() method: - /// - /// @code - /// - /// void - /// sql_select_response_cb(int request_id, data_control_h provider, result_set_cursor cursor, - /// bool provider_result, const char *error) - /// { - /// char person_name[32] = {0,}; - /// long long person_number = -1; - /// - /// data_control_sql_step_first(cursor); - /// data_control_sql_get_text_data(cursor, 0, person_name); - /// data_control_sql_get_int64_data(cursor, 1, &person_number); - /// printf("The person %s has the number %l", person_name, person_number); - /// } - /// - /// @endcode - /// - /// @param[in] cursor The cursor that navigates the result of the request for the select operation - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_sql_step_first( - result_set_cursor cursor, - ) { - return _data_control_sql_step_first( - cursor, - ); - } - - late final _data_control_sql_step_firstPtr = - _lookup>( - 'data_control_sql_step_first'); - late final _data_control_sql_step_first = _data_control_sql_step_firstPtr - .asFunction(); - - /// @brief Moves the cursor to the last position. - /// @since_tizen 2.3 - /// @remarks The following example demonstrates how to use the %data_control_sql_step_last() method: - /// - /// @code - /// - /// void - /// sql_select_response_cb(int request_id, data_control_h provider, result_set_cursor cursor, - /// bool provider_result, const char *error) - /// { - /// char person_name[32] = {0,}; - /// long long person_number = -1; - /// - /// data_control_sql_step_last(cursor); - /// data_control_sql_get_text_data(cursor, 0, person_name); - /// data_control_sql_get_int64_data(cursor, 1, &person_number); - /// printf("The person %s has the number %l", person_name, person_number); - /// } - /// - /// @endcode - /// - /// @param[in] cursor The cursor that navigates the result of data control select request - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_sql_step_last( - result_set_cursor cursor, - ) { - return _data_control_sql_step_last( - cursor, - ); - } - - late final _data_control_sql_step_lastPtr = - _lookup>( - 'data_control_sql_step_last'); - late final _data_control_sql_step_last = _data_control_sql_step_lastPtr - .asFunction(); - - /// @brief Moves the cursor to the next position. - /// @since_tizen 2.3 - /// @remarks The following example demonstrates how to use the %data_control_sql_step_next() method: - /// - /// @code - /// - /// void - /// sql_select_response_cb(int request_id, data_control_h provider, result_set_cursor cursor, - /// bool provider_result, const char *error) - /// { - /// char person_name[32] = {0,}; - /// long long person_number = -1; - /// while (data_control_sql_step_next(cursor) == DATA_CONTROL_ERROR_NONE) { - /// data_control_sql_get_text_data(cursor, 0, person_name); - /// data_control_sql_get_int64_data(cursor, 1, &person_number); - /// printf("The person %s has the number %l", person_name, person_number); - /// } - /// } - /// - /// @endcode - /// - /// @param[in] cursor The cursor that navigates the result of the request for the select operation - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_sql_step_next( - result_set_cursor cursor, - ) { - return _data_control_sql_step_next( - cursor, - ); - } - - late final _data_control_sql_step_nextPtr = - _lookup>( - 'data_control_sql_step_next'); - late final _data_control_sql_step_next = _data_control_sql_step_nextPtr - .asFunction(); - - /// @brief Moves the cursor to the previous position. - /// @since_tizen 2.3 - /// @param[in] cursor The cursor that navigates the result of the request for the select operation - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_sql_step_previous( - result_set_cursor cursor, - ) { - return _data_control_sql_step_previous( - cursor, - ); - } - - late final _data_control_sql_step_previousPtr = - _lookup>( - 'data_control_sql_step_previous'); - late final _data_control_sql_step_previous = - _data_control_sql_step_previousPtr - .asFunction(); - - /// @brief Gets the number of columns for this cursor. - /// @since_tizen 2.3 - /// @param[in] cursor The cursor that navigates the result of the request for the select operation - /// @return The number of columns in the calling cursor - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_sql_get_column_count( - result_set_cursor cursor, - ) { - return _data_control_sql_get_column_count( - cursor, - ); - } - - late final _data_control_sql_get_column_countPtr = - _lookup>( - 'data_control_sql_get_column_count'); - late final _data_control_sql_get_column_count = - _data_control_sql_get_column_countPtr - .asFunction(); - - /// @brief Gets the name of the column indicated by the specified index. - /// @since_tizen 2.3 - /// @param[in] cursor The cursor that navigates the result of the request for the select operation - /// @param[in] column_index The index of the destination column - /// @param[out] name The name of the destination column. You should provide a buffer for the column name. The limit of column name length is 4096 bytes - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_sql_get_column_name( - result_set_cursor cursor, - int column_index, - ffi.Pointer name, - ) { - return _data_control_sql_get_column_name( - cursor, - column_index, - name, - ); - } - - late final _data_control_sql_get_column_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(result_set_cursor, ffi.Int, - ffi.Pointer)>>('data_control_sql_get_column_name'); - late final _data_control_sql_get_column_name = - _data_control_sql_get_column_namePtr.asFunction< - int Function(result_set_cursor, int, ffi.Pointer)>(); - - /// @brief Gets the size of the data in the column indicated by the specified index. - /// @since_tizen 2.3 - /// @param[in] cursor The cursor that navigates the result of the request for the select operation - /// @param[in] column_index The index of the destination column - /// @return The size of data in the column indicated by the specified index \n - /// If an error is occurred, then a negative value is returned - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_sql_get_column_item_size( - result_set_cursor cursor, - int column_index, - ) { - return _data_control_sql_get_column_item_size( - cursor, - column_index, - ); - } - - late final _data_control_sql_get_column_item_sizePtr = - _lookup>( - 'data_control_sql_get_column_item_size'); - late final _data_control_sql_get_column_item_size = - _data_control_sql_get_column_item_sizePtr - .asFunction(); - - /// @brief Gets the type of the column indicated by the specified index. - /// @since_tizen 2.3 - /// @param[in] cursor The cursor that navigates the result of the request for the select operation - /// @param[in] column_index The index of the destination column - /// @param[out] type The type of the destination column - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_sql_get_column_item_type( - result_set_cursor cursor, - int column_index, - ffi.Pointer type, - ) { - return _data_control_sql_get_column_item_type( - cursor, - column_index, - type, - ); - } - - late final _data_control_sql_get_column_item_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - result_set_cursor, ffi.Int, ffi.Pointer)>>( - 'data_control_sql_get_column_item_type'); - late final _data_control_sql_get_column_item_type = - _data_control_sql_get_column_item_typePtr.asFunction< - int Function(result_set_cursor, int, ffi.Pointer)>(); - - /// @brief Gets a blob data from the column indicated by the specified index. - /// @since_tizen 2.3 - /// @param[in] cursor The cursor that navigates the result of the request for the select operation - /// @param[in] column_index The index of the destination column - /// @param[out] data The blob value obtained from the column - /// @param[out] size The size of the data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_sql_get_blob_data( - result_set_cursor cursor, - int column_index, - ffi.Pointer data, - int size, - ) { - return _data_control_sql_get_blob_data( - cursor, - column_index, - data, - size, - ); - } - - late final _data_control_sql_get_blob_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(result_set_cursor, ffi.Int, ffi.Pointer, - ffi.Int)>>('data_control_sql_get_blob_data'); - late final _data_control_sql_get_blob_data = - _data_control_sql_get_blob_dataPtr.asFunction< - int Function(result_set_cursor, int, ffi.Pointer, int)>(); - - /// @brief Gets an int value from the column indicated by the specified index. - /// @since_tizen 2.3 - /// @param[in] cursor The cursor that navigates the result of the request for the select operation - /// @param[in] column_index The index of the destination column - /// @param[out] data The integer value obtained from the column - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_sql_get_int_data( - result_set_cursor cursor, - int column_index, - ffi.Pointer data, - ) { - return _data_control_sql_get_int_data( - cursor, - column_index, - data, - ); - } - - late final _data_control_sql_get_int_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(result_set_cursor, ffi.Int, - ffi.Pointer)>>('data_control_sql_get_int_data'); - late final _data_control_sql_get_int_data = _data_control_sql_get_int_dataPtr - .asFunction)>(); - - /// @brief Gets a long long value from the column indicated by the specified index. - /// @since_tizen 2.3 - /// @param[in] cursor The cursor that navigates the result of the request for the select operation - /// @param[in] column_index The index of the destination column - /// @param[out] data The 64-bit integer value obtained from the column - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_sql_get_int64_data( - result_set_cursor cursor, - int column_index, - ffi.Pointer data, - ) { - return _data_control_sql_get_int64_data( - cursor, - column_index, - data, - ); - } - - late final _data_control_sql_get_int64_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(result_set_cursor, ffi.Int, - ffi.Pointer)>>('data_control_sql_get_int64_data'); - late final _data_control_sql_get_int64_data = - _data_control_sql_get_int64_dataPtr.asFunction< - int Function(result_set_cursor, int, ffi.Pointer)>(); - - /// @brief Gets a double value from the column indicated by the specified index. - /// @since_tizen 2.3 - /// @param[in] cursor The cursor that navigates the result of the request for the select operation - /// @param[in] column_index The index of the destination column - /// @param[out] data The value obtained from the column as double - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_sql_get_double_data( - result_set_cursor cursor, - int column_index, - ffi.Pointer data, - ) { - return _data_control_sql_get_double_data( - cursor, - column_index, - data, - ); - } - - late final _data_control_sql_get_double_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(result_set_cursor, ffi.Int, - ffi.Pointer)>>('data_control_sql_get_double_data'); - late final _data_control_sql_get_double_data = - _data_control_sql_get_double_dataPtr.asFunction< - int Function(result_set_cursor, int, ffi.Pointer)>(); - - /// @brief Gets a text value from the column indicated by the specified index. - /// @since_tizen 2.3 - /// @param[in] cursor The cursor that navigates the result of the request for the select operation - /// @param[in] column_index The index of the destination column - /// @param[out] data The value obtained from the column as text. You should provide a buffer for the data. You can get the size of data via data_control_sql_get_column_item_size() - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - int data_control_sql_get_text_data( - result_set_cursor cursor, - int column_index, - ffi.Pointer data, - ) { - return _data_control_sql_get_text_data( - cursor, - column_index, - data, - ); - } - - late final _data_control_sql_get_text_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(result_set_cursor, ffi.Int, - ffi.Pointer)>>('data_control_sql_get_text_data'); - late final _data_control_sql_get_text_data = - _data_control_sql_get_text_dataPtr.asFunction< - int Function(result_set_cursor, int, ffi.Pointer)>(); - - /// @brief Gets the n-th bundle from bulk data. - /// @since_tizen 3.0 - /// @remarks The @a data should not be released. \n - /// It will be released when data_control_bulk_data_destroy() is called. - /// @param[in] bulk_data The bulk data handle - /// @param[in] idx The bundle index. Index starts at 0 - /// @param[out] data The n-th bundle. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_bulk_data_add() - /// @see data_control_bulk_data_destroy() - int data_control_bulk_data_get_data( - data_control_bulk_data_h bulk_data, - int idx, - ffi.Pointer> data, - ) { - return _data_control_bulk_data_get_data( - bulk_data, - idx, - data, - ); - } - - late final _data_control_bulk_data_get_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_bulk_data_h, ffi.Int, - ffi.Pointer>)>>( - 'data_control_bulk_data_get_data'); - late final _data_control_bulk_data_get_data = - _data_control_bulk_data_get_dataPtr.asFunction< - int Function(data_control_bulk_data_h, int, - ffi.Pointer>)>(); - - /// @brief Gets the bulk data bundle count. - /// @since_tizen 3.0 - /// @param[in] bulk_data The bulk data handle - /// @param[out] count The bundle count - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_bulk_data_get_count( - data_control_bulk_data_h bulk_data, - ffi.Pointer count, - ) { - return _data_control_bulk_data_get_count( - bulk_data, - count, - ); - } - - late final _data_control_bulk_data_get_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_bulk_data_h, - ffi.Pointer)>>('data_control_bulk_data_get_count'); - late final _data_control_bulk_data_get_count = - _data_control_bulk_data_get_countPtr.asFunction< - int Function(data_control_bulk_data_h, ffi.Pointer)>(); - - /// @brief Adds a bundle to bulk data. - /// @since_tizen 3.0 - /// @remarks The order in which bundles are added is preserved. Bundle indexes start from 0. - /// @param[in] bulk_data The bulk data handle - /// @param[in] data The bundle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_bulk_data_add( - data_control_bulk_data_h bulk_data, - ffi.Pointer data, - ) { - return _data_control_bulk_data_add( - bulk_data, - data, - ); - } - - late final _data_control_bulk_data_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_bulk_data_h, - ffi.Pointer)>>('data_control_bulk_data_add'); - late final _data_control_bulk_data_add = - _data_control_bulk_data_addPtr.asFunction< - int Function(data_control_bulk_data_h, ffi.Pointer)>(); - - /// @brief Creates bulk data. - /// @since_tizen 3.0 - /// @remarks The @a bulk_data should be released using data_control_bulk_data_destroy(). - /// @param[out] bulk_data The bulk data handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_bulk_data_create( - ffi.Pointer bulk_data, - ) { - return _data_control_bulk_data_create( - bulk_data, - ); - } - - late final _data_control_bulk_data_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'data_control_bulk_data_create'); - late final _data_control_bulk_data_create = _data_control_bulk_data_createPtr - .asFunction)>(); - - /// @brief Destroys bulk data. - /// @since_tizen 3.0 - /// @param[in] bulk_data The bulk data handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_bulk_data_destroy( - data_control_bulk_data_h bulk_data, - ) { - return _data_control_bulk_data_destroy( - bulk_data, - ); - } - - late final _data_control_bulk_data_destroyPtr = - _lookup>( - 'data_control_bulk_data_destroy'); - late final _data_control_bulk_data_destroy = - _data_control_bulk_data_destroyPtr - .asFunction(); - - /// @brief Gets the n-th bundle from bulk result data. - /// @since_tizen 3.0 - /// @remarks The @a data should not be released. \n - /// It will be released when data_control_bulk_result_data_destroy() is called. - /// @param[in] result_data The bulk result data handle - /// @param[in] idx The bundle index. Index starts at 0 - /// @param[out] data The n-th bundle - /// @param[out] result Bulk operation result. Possible values and their meaning are defined by the developer. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_bulk_result_data_add() - /// @see data_control_bulk_result_data_destroy() - int data_control_bulk_result_data_get_result_data( - data_control_bulk_result_data_h result_data, - int idx, - ffi.Pointer> data, - ffi.Pointer result, - ) { - return _data_control_bulk_result_data_get_result_data( - result_data, - idx, - data, - result, - ); - } - - late final _data_control_bulk_result_data_get_result_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_bulk_result_data_h, ffi.Int, - ffi.Pointer>, ffi.Pointer)>>( - 'data_control_bulk_result_data_get_result_data'); - late final _data_control_bulk_result_data_get_result_data = - _data_control_bulk_result_data_get_result_dataPtr.asFunction< - int Function(data_control_bulk_result_data_h, int, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Gets the bulk result data bundle count. - /// @since_tizen 3.0 - /// @param[in] result_data The bulk result data handle - /// @param[out] count The bundle count - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_bulk_result_data_get_count( - data_control_bulk_result_data_h result_data, - ffi.Pointer count, - ) { - return _data_control_bulk_result_data_get_count( - result_data, - count, - ); - } - - late final _data_control_bulk_result_data_get_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_bulk_result_data_h, ffi.Pointer)>>( - 'data_control_bulk_result_data_get_count'); - late final _data_control_bulk_result_data_get_count = - _data_control_bulk_result_data_get_countPtr.asFunction< - int Function( - data_control_bulk_result_data_h, ffi.Pointer)>(); - - /// @brief Adds bulk data - /// @since_tizen 3.0 - /// @remarks The order in which bundles are added is preserved. Bundle indexes start from 0. - /// @param[in] result_data The bulk result data handle - /// @param[in] data The bundle - /// @param[in] result Bulk operation result. Possible values and their meaning are defined by the developer. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_bulk_result_data_get_result_data() - int data_control_bulk_result_data_add( - data_control_bulk_result_data_h result_data, - ffi.Pointer data, - int result, - ) { - return _data_control_bulk_result_data_add( - result_data, - data, - result, - ); - } - - late final _data_control_bulk_result_data_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_bulk_result_data_h, ffi.Pointer, - ffi.Int)>>('data_control_bulk_result_data_add'); - late final _data_control_bulk_result_data_add = - _data_control_bulk_result_data_addPtr.asFunction< - int Function( - data_control_bulk_result_data_h, ffi.Pointer, int)>(); - - /// @brief Creates bulk result data. - /// @since_tizen 3.0 - /// @remarks The @a result_data should be released using data_control_bulk_result_data_destroy(). - /// @param[out] result_data The bulk result data handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_bulk_result_data_create( - ffi.Pointer result_data, - ) { - return _data_control_bulk_result_data_create( - result_data, - ); - } - - late final _data_control_bulk_result_data_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'data_control_bulk_result_data_create'); - late final _data_control_bulk_result_data_create = - _data_control_bulk_result_data_createPtr.asFunction< - int Function(ffi.Pointer)>(); - - /// @brief Destroys bulk result data. - /// @since_tizen 3.0 - /// @param[in] result_data The bulk result data handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_bulk_result_data_destroy( - data_control_bulk_result_data_h result_data, - ) { - return _data_control_bulk_result_data_destroy( - result_data, - ); - } - - late final _data_control_bulk_result_data_destroyPtr = _lookup< - ffi - .NativeFunction>( - 'data_control_bulk_result_data_destroy'); - late final _data_control_bulk_result_data_destroy = - _data_control_bulk_result_data_destroyPtr - .asFunction(); - - /// @brief Creates a provider handle. - /// @since_tizen 2.3 - /// - /// @remarks @a provider should be destroyed with data_control_sql_destroy(). - /// The following example demonstrates how to use the %data_control_sql_create() method: - /// - /// @code - /// - /// { - /// const char *provider_id = "http://tizen.org/datacontrol/provider/example"; - /// const char *data_id = "table"; - /// data_control_h provider; - /// int result = 0; - /// - /// result = data_control_sql_create(&provider); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Creating data control provider is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// result = data_control_sql_set_provider_id(provider, provider_id); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Setting providerID is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// result = data_control_sql_set_data_id(provider, data_id); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Setting dataID is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// // Executes some operations - /// - /// result = data_control_sql_destroy(provider); - /// if (result != DATA_CONTROL_ERROR_NONE) - /// LOGE("Destroying data control provider is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// @endcode - /// - /// @param[out] provider The provider handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see data_control_sql_destroy() - int data_control_sql_create( - ffi.Pointer provider, - ) { - return _data_control_sql_create( - provider, - ); - } - - late final _data_control_sql_createPtr = _lookup< - ffi.NativeFunction)>>( - 'data_control_sql_create'); - late final _data_control_sql_create = _data_control_sql_createPtr - .asFunction)>(); - - /// @brief Destroys the provider handle and releases all its resources. - /// @since_tizen 2.3 - /// - /// @remarks When operations of data control are finished, this function must be called to prevent the memory leak. - /// - /// @param[in] provider The provider handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_sql_create() - int data_control_sql_destroy( - data_control_h provider, - ) { - return _data_control_sql_destroy( - provider, - ); - } - - late final _data_control_sql_destroyPtr = - _lookup>( - 'data_control_sql_destroy'); - late final _data_control_sql_destroy = - _data_control_sql_destroyPtr.asFunction(); - - /// @brief Sets the Provider ID. - /// @since_tizen 2.3 - /// - /// @param[in] provider The provider handle - /// @param[in] provider_id The data control provider ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see data_control_sql_get_provider_id() - int data_control_sql_set_provider_id( - data_control_h provider, - ffi.Pointer provider_id, - ) { - return _data_control_sql_set_provider_id( - provider, - provider_id, - ); - } - - late final _data_control_sql_set_provider_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, - ffi.Pointer)>>('data_control_sql_set_provider_id'); - late final _data_control_sql_set_provider_id = - _data_control_sql_set_provider_idPtr - .asFunction)>(); - - /// @brief Gets the Provider ID. - /// @since_tizen 2.3 - /// - /// @remarks You must release @a provider_id using free() after it is used. - /// - /// @param[in] provider The provider handle - /// @param[out] provider_id The data control provider ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see data_control_sql_set_provider_id() - int data_control_sql_get_provider_id( - data_control_h provider, - ffi.Pointer> provider_id, - ) { - return _data_control_sql_get_provider_id( - provider, - provider_id, - ); - } - - late final _data_control_sql_get_provider_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, ffi.Pointer>)>>( - 'data_control_sql_get_provider_id'); - late final _data_control_sql_get_provider_id = - _data_control_sql_get_provider_idPtr.asFunction< - int Function(data_control_h, ffi.Pointer>)>(); - - /// @brief Sets the data ID. - /// @since_tizen 2.3 - /// - /// @param[in] provider The provider handle - /// @param[in] data_id A string for identifying a specific table to operate \n - /// The string consists of one or more components separated by a slash('/') - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see data_control_sql_get_data_id() - /// - /// @code - /// - /// { - /// bundle *b; - /// int ret; - /// - /// // Insert data to Note table - /// ret = data_control_sql_set_data_id(ad->provider_h, "Note"); - /// if (ret != DATA_CONTROL_ERROR_NONE) - /// dlog_print(DLOG_ERROR, LOG_TAG, "setting data id failed with error: %d", ret); - /// - /// b = bundle_create(); - /// bundle_add_str(b, ""TITLE"", "test"); - /// bundle_add_str(b, "CONTENTS", "test contents"); - /// data_control_sql_insert(ad->provider_h, b, &req_id); - /// bundle_free(b); - /// - /// // Insert data to Dictionary table - /// ret = data_control_sql_set_data_id(ad->provider_h, "Dictionary"); - /// if (ret != DATA_CONTROL_ERROR_NONE) - /// dlog_print(DLOG_ERROR, LOG_TAG, "setting data id failed with error: %d", ret); - /// - /// b = bundle_create(); - /// bundle_add_str(b, "WORD", "test"); - /// bundle_add_str(b, "WORD_DESC", "test desc"); - /// data_control_sql_insert(ad->provider_h, b, &req_id); - /// bundle_free(b); - /// } - /// - /// @endcode - int data_control_sql_set_data_id( - data_control_h provider, - ffi.Pointer data_id, - ) { - return _data_control_sql_set_data_id( - provider, - data_id, - ); - } - - late final _data_control_sql_set_data_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, - ffi.Pointer)>>('data_control_sql_set_data_id'); - late final _data_control_sql_set_data_id = _data_control_sql_set_data_idPtr - .asFunction)>(); - - /// @brief Gets the data ID. - /// @since_tizen 2.3 - /// - /// @remarks You must release @a data_id using free() after it is used. - /// - /// @param[in] provider The provider handle - /// @param[out] data_id A string for identifying a specific table to operate \n - /// The string consists of one or more components separated by a slash('/') - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see data_control_sql_set_data_id() - int data_control_sql_get_data_id( - data_control_h provider, - ffi.Pointer> data_id, - ) { - return _data_control_sql_get_data_id( - provider, - data_id, - ); - } - - late final _data_control_sql_get_data_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, ffi.Pointer>)>>( - 'data_control_sql_get_data_id'); - late final _data_control_sql_get_data_id = - _data_control_sql_get_data_idPtr.asFunction< - int Function(data_control_h, ffi.Pointer>)>(); - - /// @brief Registers a callback function for the SQL data control response. - /// @since_tizen 2.3 - /// - /// @remarks The application is notified when a data control response is received from the @a provider. - /// @remarks Only one callback can be registered for each provider id with this API. - /// @remarks If you register multiple callback for same provider id, it will be overwritten by latest one. - /// - /// - /// @param[in] provider The provider handle - /// @param[in] callback The callback function to be called when a response is received - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see data_control_sql_unregister_response_cb() - /// @see data_control_sql_bind_response_cb() - int data_control_sql_register_response_cb( - data_control_h provider, - ffi.Pointer callback, - ffi.Pointer user_data, - ) { - return _data_control_sql_register_response_cb( - provider, - callback, - user_data, - ); - } - - late final _data_control_sql_register_response_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, - ffi.Pointer, - ffi.Pointer)>>('data_control_sql_register_response_cb'); - late final _data_control_sql_register_response_cb = - _data_control_sql_register_response_cbPtr.asFunction< - int Function( - data_control_h, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function in the @a provider. - /// @since_tizen 2.3 - /// - /// @param[in] provider The provider handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see data_control_sql_register_response_cb() - int data_control_sql_unregister_response_cb( - data_control_h provider, - ) { - return _data_control_sql_unregister_response_cb( - provider, - ); - } - - late final _data_control_sql_unregister_response_cbPtr = - _lookup>( - 'data_control_sql_unregister_response_cb'); - late final _data_control_sql_unregister_response_cb = - _data_control_sql_unregister_response_cbPtr - .asFunction(); - - /// @brief Deletes rows of a table owned by the SQL-type data control provider. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// - /// @remarks If you want to use this api, you must add privileges. - /// @remarks If the value is a string, then the value must be wrapped in single quotes, else it does not need to be wrapped in single quotes. - /// @remarks The following example demonstrates how to use the %data_control_sql_delete() method: - /// - /// @code - /// - /// void - /// sql_delete_response_cb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data) - /// { - /// if (provider_result) - /// LOGI(The delete operation is successful"); - /// else - /// LOGI("The delete operation for the request %d is failed. error message: %s", request_id, error); - /// } - /// - /// data_control_sql_response_cb sql_callback; - /// - /// { - /// const char *where = "group = 'friend'"; - /// int result = 0; - /// int req_id = 0; - /// - /// sql_callback.delete_cb = sql_delete_response_cb; - /// result = data_control_sql_register_response_cb(provider, &sql_callback, void *user_data); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Registering the callback function is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// result = data_control_sql_delete(provider, where, &req_id); - /// if (result != DATA_CONTROL_ERROR_NONE) - /// LOGE("Deleting is failed with error: %d", result); - /// else - /// LOGI("req_id is %d", req_id); - /// - /// return result; - /// } - /// - /// @endcode - /// - /// @param[in] provider The provider handle - /// @param[in] where A filter to select the desired rows to delete \n - /// It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue - /// @param[out] request_id The request ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - int data_control_sql_delete( - data_control_h provider, - ffi.Pointer where, - ffi.Pointer request_id, - ) { - return _data_control_sql_delete( - provider, - where, - request_id, - ); - } - - late final _data_control_sql_deletePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, ffi.Pointer, - ffi.Pointer)>>('data_control_sql_delete'); - late final _data_control_sql_delete = _data_control_sql_deletePtr.asFunction< - int Function( - data_control_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Inserts new rows in a table owned by the SQL-type data control provider. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// - /// @remarks If you want to use this api, you must add privileges. - /// @remarks The following example demonstrates how to use the %data_control_sql_insert() method: - /// - /// @code - /// - /// void - /// sql_insert_response_cb(int request_id, data_control_h provider, long long inserted_row_id, - /// bool provider_result, const char *error, void *user_data) - /// { - /// if (provider_result) - /// LOGI("The insert operation is successful"); - /// else - /// LOGI("The insert operation for the request %d is failed. error message: %s", request_id, error); - /// } - /// - /// data_control_sql_response_cb sql_callback; - /// - /// { - /// int result = 0; - /// int req_id = 0; - /// bundle *b = NULL; - /// - /// sql_callback.insert_cb = sql_insert_response_cb; - /// result = data_control_sql_register_response_cb(provider, &sql_callback, void *user_data); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Registering the callback function is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// b = bundle_create(); - /// bundle_add(b, "WORD", "test"); - /// bundle_add(b, "WORD_DESC", "test description"); - /// - /// result = data_control_sql_insert(provider, b, &req_id); - /// if (result != DATA_CONTROL_ERROR_NONE) - /// LOGE("Inserting is failed with error: %d", result); - /// else - /// LOGI("req_id is %d", req_id); - /// - /// bundle_free(b); - /// - /// return result; - /// } - /// - /// @endcode - /// - /// @param[in] provider The provider handle - /// @param[in] insert_data The column-value pairs to insert \n - /// If the value is a string, then the value must be wrapped in single quotes, - /// else it does not need to be wrapped in single quotes - /// @param[out] request_id The request ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument - int data_control_sql_insert( - data_control_h provider, - ffi.Pointer insert_data, - ffi.Pointer request_id, - ) { - return _data_control_sql_insert( - provider, - insert_data, - request_id, - ); - } - - late final _data_control_sql_insertPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, ffi.Pointer, - ffi.Pointer)>>('data_control_sql_insert'); - late final _data_control_sql_insert = _data_control_sql_insertPtr.asFunction< - int Function( - data_control_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Selects the specified columns to be queried. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// - /// @remarks If you want to use this api, you must add privileges. - /// @remarks The following example demonstrates how to use the %data_control_sql_select() method: - /// - /// @code - /// - /// void - /// sql_select_response_cb(int request_id, data_control_h provider, result_set_cursor *enumerator, - /// bool provider_result, const char *error, void *user_data) - /// { - /// if (provider_result) - /// LOGI("The select operation is successful"); - /// else - /// LOGI("The select operation for the request %d is failed. error message: %s", request_id, error); - /// } - /// - /// data_control_sql_response_cb sql_callback; - /// - /// { - /// int result = 0; - /// int req_id = 0; - /// char *column_list[2]; - /// column_list[0] = "WORD"; - /// column_list[1] = "WORD_DESC"; - /// const char *where = "WORD = 'test'"; - /// const char *order = "WORD ASC"; - /// - /// sql_callback.select_cb = sql_select_response_cb; - /// result = data_control_sql_register_response_cb(provider, &sql_callback, void *user_data); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Registering the callback function is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// result = data_control_sql_select(provider, column_list, 2, where, order, &req_id); - /// if (result != DATA_CONTROL_ERROR_NONE) - /// LOGE("Selecting is failed with error: %d", result); - /// else - /// LOGI("req_id is %d", req_id); - /// - /// return result; - /// } - /// - /// @endcode - /// - /// - /// @param[in] provider The provider handle - /// @param[in] column_list The column list to query - /// @param[in] column_count The total number of columns to be queried - /// @param[in] where A filter to select the desired rows \n - /// It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue - /// @param[in] order The sorting order of the rows to query \n - /// It is an SQL 'ORDER BY' clause excluding the 'ORDER BY' itself. - /// @param[out] request_id The request ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - int data_control_sql_select( - data_control_h provider, - ffi.Pointer> column_list, - int column_count, - ffi.Pointer where, - ffi.Pointer order, - ffi.Pointer request_id, - ) { - return _data_control_sql_select( - provider, - column_list, - column_count, - where, - order, - request_id, - ); - } - - late final _data_control_sql_selectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, - ffi.Pointer>, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('data_control_sql_select'); - late final _data_control_sql_select = _data_control_sql_selectPtr.asFunction< - int Function( - data_control_h, - ffi.Pointer>, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Selects the specified columns to be queried, with partition into pages. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// - /// @remarks If you want to use this api, you must add privileges. - /// - /// @param[in] provider The provider handle - /// @param[in] column_list The column list to query - /// @param[in] column_count The total number of columns to be queried - /// @param[in] where A filter to select the desired rows \n - /// It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue - /// @param[in] order The sorting order of the rows to query \n - /// It is an SQL 'ORDER BY' clause excluding the 'ORDER BY' itself - /// @param[in] page_number The page number of the result set \n - /// It starts from @c 1 - /// @param[in] count_per_page The desired maximum count of rows on a page - /// @param[out] request_id The request ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - /// @see data_control_sql_select() - int data_control_sql_select_with_page( - data_control_h provider, - ffi.Pointer> column_list, - int column_count, - ffi.Pointer where, - ffi.Pointer order, - int page_number, - int count_per_page, - ffi.Pointer request_id, - ) { - return _data_control_sql_select_with_page( - provider, - column_list, - column_count, - where, - order, - page_number, - count_per_page, - request_id, - ); - } - - late final _data_control_sql_select_with_pagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, - ffi.Pointer>, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Pointer)>>('data_control_sql_select_with_page'); - late final _data_control_sql_select_with_page = - _data_control_sql_select_with_pagePtr.asFunction< - int Function( - data_control_h, - ffi.Pointer>, - int, - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer)>(); - - /// @brief Updates values of a table owned by the SQL-type data control provider. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// - /// @remarks If you want to use this api, you must add privileges. - /// @remarks The following example demonstrates how to use the %data_control_sql_update() method: - /// - /// @code - /// - /// void - /// sql_update_response_cb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data) - /// { - /// if (provider_result) - /// LOGI("The update operation is successful"); - /// else - /// LOGI("The update operation for the request %d is failed. error message: %s", request_id, error); - /// } - /// - /// data_control_sql_response_cb sql_callback; - /// - /// { - /// int result = 0; - /// int req_id = 0; - /// const char *where = "WORD = 'test'"; - /// bundle *b = NULL; - /// - /// sql_callback.update_cb = sql_update_response_cb; - /// result = data_control_sql_register_response_cb(provider, &sql_callback, void *user_data); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Registering the callback function is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// b = bundle_create(); - /// bundle_add(b, "WORD", "test_new"); - /// - /// result = data_control_sql_update(provider, b, where, &req_id); - /// if (result != DATA_CONTROL_ERROR_NONE) - /// LOGE("Updating is failed with error: %d", result); - /// else - /// LOGI("req_id is %d", req_id); - /// - /// bundle_free(b); - /// - /// return result; - /// } - /// - /// @endcode - /// - /// - /// @param[in] provider The provider handle - /// @param[in] update_data The column-value pairs to update \n - /// If the value is a string, the value must be wrapped in single quotes, - /// else it does not need to be wrapped in single quotes - /// @param[in] where A filter to select the desired rows to update \n - /// It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue - /// @param[out] request_id The request ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument - int data_control_sql_update( - data_control_h provider, - ffi.Pointer update_data, - ffi.Pointer where, - ffi.Pointer request_id, - ) { - return _data_control_sql_update( - provider, - update_data, - where, - request_id, - ); - } - - late final _data_control_sql_updatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('data_control_sql_update'); - late final _data_control_sql_update = _data_control_sql_updatePtr.asFunction< - int Function(data_control_h, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Inserts multiple rows in one request. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// - /// @remarks If you want to use this function, you must add privileges. - /// @remarks The following example demonstrates how to use the %data_control_sql_insert_bulk_data() method: - /// - /// @code - /// - /// void - /// sql_bulk_insert_response_cb(int request_id, data_control_h provider, data_control_bulk_result_data_h bulk_results, - /// bool provider_result, const char *error, void *user_data) - /// { - /// if (provider_result) - /// LOGI("The bulk insert operation is successful"); - /// else - /// LOGI("The bulk insert operation for the request %d is failed. error message: %s", request_id, error); - /// } - /// - /// data_control_sql_response_cb sql_callback; - /// - /// { - /// data_control_bulk_data_h bulk_data; - /// int req_id; - /// bundle *b1; - /// bundle *b2; - /// int result = 0; - /// int req_id = 0; - /// int bulk_count = 0; - /// - /// result = data_control_sql_register_insert_bulk_data_response_cb(provider, sql_bulk_insert_response_cb, user_data); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Registering the callback function is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// b1 = bundle_create(); - /// bundle_add_str(b1, "WORD", "'test'"); - /// bundle_add_str(b1, "WORD_DESC", "'test description'"); - /// b2 = bundle_create(); - /// bundle_add_str(b2, "WORD", "'test2'"); - /// bundle_add_str(b2, "WORD_DESC", "'test2 description'"); - /// - /// data_control_bulk_data_create(&bulk_data); - /// data_control_bulk_data_add(bulk_data, b1); - /// data_control_bulk_data_add(bulk_data, b2); - /// data_control_bulk_data_get_count(bulk_data, &bulk_count); - /// - /// dlog_print(DLOG_INFO, LOG_TAG, "bulk insert count %d ", bulk_count); - /// - /// data_control_sql_insert_bulk_data(provider, bulk_data, &req_id); - /// data_control_bulk_data_destroy(bulk_data); - /// - /// bundle_free(b1); - /// bundle_free(b2); - /// - /// return result; - /// } - /// - /// @endcode - /// - /// @param[in] provider The provider handle - /// @param[in] bulk_data The bulk data handle - /// @param[out] request_id The request ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument - int data_control_sql_insert_bulk_data( - data_control_h provider, - data_control_bulk_data_h bulk_data, - ffi.Pointer request_id, - ) { - return _data_control_sql_insert_bulk_data( - provider, - bulk_data, - request_id, - ); - } - - late final _data_control_sql_insert_bulk_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, data_control_bulk_data_h, - ffi.Pointer)>>('data_control_sql_insert_bulk_data'); - late final _data_control_sql_insert_bulk_data = - _data_control_sql_insert_bulk_dataPtr.asFunction< - int Function(data_control_h, data_control_bulk_data_h, - ffi.Pointer)>(); - - /// @brief Registers an insert bulk data callback for the SQL data control response. - /// The application is notified when a data control response is - /// received from the @a provider. - /// @since_tizen 3.0 - /// - /// @remarks Only one callback can be registered for each provider id with this - /// function. If you call this function multiple times for the same - /// provider id, any previously set callback will be overwritten. - /// - /// @param[in] provider The provider handle - /// @param[in] callback The callback function to be called when a response is received - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see data_control_sql_unregister_insert_bulk_data_response_cb() - /// @see data_control_sql_bind_insert_bulk_data_response_cb() - int data_control_sql_register_insert_bulk_data_response_cb( - data_control_h provider, - data_control_bulk_cb callback, - ffi.Pointer user_data, - ) { - return _data_control_sql_register_insert_bulk_data_response_cb( - provider, - callback, - user_data, - ); - } - - late final _data_control_sql_register_insert_bulk_data_response_cbPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, data_control_bulk_cb, - ffi.Pointer)>>( - 'data_control_sql_register_insert_bulk_data_response_cb'); - late final _data_control_sql_register_insert_bulk_data_response_cb = - _data_control_sql_register_insert_bulk_data_response_cbPtr.asFunction< - int Function( - data_control_h, data_control_bulk_cb, ffi.Pointer)>(); - - /// @brief Unregisters the insert bulk data callback. - /// @since_tizen 3.0 - /// - /// @param[in] provider The provider handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see data_control_sql_register_insert_bulk_data_response_cb() - int data_control_sql_unregister_insert_bulk_data_response_cb( - data_control_h provider, - ) { - return _data_control_sql_unregister_insert_bulk_data_response_cb( - provider, - ); - } - - late final _data_control_sql_unregister_insert_bulk_data_response_cbPtr = - _lookup>( - 'data_control_sql_unregister_insert_bulk_data_response_cb'); - late final _data_control_sql_unregister_insert_bulk_data_response_cb = - _data_control_sql_unregister_insert_bulk_data_response_cbPtr - .asFunction(); - - /// @brief Binds a callback function to the SQL data control response. - /// @details This function is very similar to - /// data_control_sql_register_response_cb(), which can register a - /// callback for a given provider id. Calling - /// data_control_sql_register_response_cb() again overwrites the - /// callback previously set for the provider id, which means that only - /// one callback can be set for a given id. - /// data_control_sql_bind_response_cb() binds a callback to the handle - /// of a provider, which allows registering multiple callbacks for a - /// given provider id. To do that, you can create new #data_control_h - /// for the same provider id and register callback for the - /// #data_control_h. - /// - /// @since_tizen 4.0 - /// @remarks You can bind a callback function to @a provider. If you call this - /// function multiple times for the same handle, any previously set - /// callback will be overwritten. - /// - /// @param[in] provider The provider handle - /// @param[in] callback The callback function to be called - /// when a response is received - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_sql_register_response_cb() - /// @see data_control_sql_unbind_response_cb() - int data_control_sql_bind_response_cb( - data_control_h provider, - ffi.Pointer callback, - ffi.Pointer user_data, - ) { - return _data_control_sql_bind_response_cb( - provider, - callback, - user_data, - ); - } - - late final _data_control_sql_bind_response_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, - ffi.Pointer, - ffi.Pointer)>>('data_control_sql_bind_response_cb'); - late final _data_control_sql_bind_response_cb = - _data_control_sql_bind_response_cbPtr.asFunction< - int Function( - data_control_h, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Unbinds the callback function in the @a provider. - /// @since_tizen 4.0 - /// - /// @param[in] provider The provider handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_sql_bind_response_cb() - int data_control_sql_unbind_response_cb( - data_control_h provider, - ) { - return _data_control_sql_unbind_response_cb( - provider, - ); - } - - late final _data_control_sql_unbind_response_cbPtr = - _lookup>( - 'data_control_sql_unbind_response_cb'); - late final _data_control_sql_unbind_response_cb = - _data_control_sql_unbind_response_cbPtr - .asFunction(); - - /// @brief Binds the insert bulk data callback to the SQL data control response. - /// @details This function is very similar to - /// data_control_sql_register_insert_bulk_data_response_cb(), which can - /// register a callback for a given provider id. Calling - /// data_control_sql_register_insert_bulk_data_response_cb() again - /// overwrites the callback previously set for the provider id, which - /// means that only one callback can be set for a given id. - /// data_control_sql_bind_insert_bulk_data_response_cb() binds a - /// callback to the handle of a provider, which allows registering - /// multiple callbacks for a given provider id. To do that, you can - /// create new #data_control_h for the same provider id and register - /// callback for the #data_control_h. - /// - /// @since_tizen 4.0 - /// @remarks You can bind a callback function to @a provider. If you call this - /// function multiple times for the same handle, any previously set - /// callback will be overwritten. - /// - /// @param[in] provider The provider handle - /// @param[in] callback The callback function to be called - /// when a response is received - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see data_control_sql_register_insert_bulk_data_response_cb() - /// @see data_control_sql_unbind_insert_bulk_data_response_cb() - int data_control_sql_bind_insert_bulk_data_response_cb( - data_control_h provider, - data_control_bulk_cb callback, - ffi.Pointer user_data, - ) { - return _data_control_sql_bind_insert_bulk_data_response_cb( - provider, - callback, - user_data, - ); - } - - late final _data_control_sql_bind_insert_bulk_data_response_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, data_control_bulk_cb, - ffi.Pointer)>>( - 'data_control_sql_bind_insert_bulk_data_response_cb'); - late final _data_control_sql_bind_insert_bulk_data_response_cb = - _data_control_sql_bind_insert_bulk_data_response_cbPtr.asFunction< - int Function( - data_control_h, data_control_bulk_cb, ffi.Pointer)>(); - - /// @brief Unbinds the insert bulk data callback in the @a provider. - /// @since_tizen 4.0 - /// - /// @param[in] provider The provider handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_sql_unbind_insert_bulk_data_response_cb() - int data_control_sql_unbind_insert_bulk_data_response_cb( - data_control_h provider, - ) { - return _data_control_sql_unbind_insert_bulk_data_response_cb( - provider, - ); - } - - late final _data_control_sql_unbind_insert_bulk_data_response_cbPtr = - _lookup>( - 'data_control_sql_unbind_insert_bulk_data_response_cb'); - late final _data_control_sql_unbind_insert_bulk_data_response_cb = - _data_control_sql_unbind_insert_bulk_data_response_cbPtr - .asFunction(); - - /// @brief Gets the handle ID for @a provider. - /// @since_tizen 4.0 - /// - /// @remarks @a handle_id is generated internally and it is unique for each - /// handle. This function can be used in callbacks to know for which - /// handle the callback was called. - /// - /// @param[in] provider The provider handle - /// @param[out] handle_id The handle ID for @a provider - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_sql_get_handle_id( - data_control_h provider, - ffi.Pointer handle_id, - ) { - return _data_control_sql_get_handle_id( - provider, - handle_id, - ); - } - - late final _data_control_sql_get_handle_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, - ffi.Pointer)>>('data_control_sql_get_handle_id'); - late final _data_control_sql_get_handle_id = - _data_control_sql_get_handle_idPtr - .asFunction)>(); - - /// @brief Creates a provider handle. - /// @since_tizen 2.3 - /// @remarks @a provider should be destroyed with data_control_map_destroy(). - /// The following example demonstrates how to use the %data_control_map_create() method. - /// - /// @code - /// - /// { - /// const char *provider_id = "http://tizen.org/datacontrol/provider/example"; - /// const char *data_id = "table"; - /// data_control_h provider; - /// int result = 0; - /// - /// result = data_control_map_create(&provider); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Creating data control provider is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// result = data_control_map_set_provider_id(provider, provider_id); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Setting providerID is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// result = data_control_map_set_data_id(provider, data_id); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Setting dataID is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// // Executes some operations - /// - /// result = data_control_map_destroy(provider); - /// if (result != DATA_CONTROL_ERROR_NONE) - /// LOGE("Destorying data control provider is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// @endcode - /// - /// @param[out] provider The provider handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see data_control_map_destroy() - int data_control_map_create( - ffi.Pointer provider, - ) { - return _data_control_map_create( - provider, - ); - } - - late final _data_control_map_createPtr = _lookup< - ffi.NativeFunction)>>( - 'data_control_map_create'); - late final _data_control_map_create = _data_control_map_createPtr - .asFunction)>(); - - /// @brief Destroys the provider handle and releases all its resources. - /// @since_tizen 2.3 - /// @remarks When operations of data control are finished, this function must be called to prevent memory leak. - /// @param[in] provider The provider handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_map_create() - int data_control_map_destroy( - data_control_h provider, - ) { - return _data_control_map_destroy( - provider, - ); - } - - late final _data_control_map_destroyPtr = - _lookup>( - 'data_control_map_destroy'); - late final _data_control_map_destroy = - _data_control_map_destroyPtr.asFunction(); - - /// @brief Sets the Provider ID. - /// @since_tizen 2.3 - /// @param[in] provider The provider handle - /// @param[in] provider_id The data control provider ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see data_control_map_get_provider_id() - int data_control_map_set_provider_id( - data_control_h provider, - ffi.Pointer provider_id, - ) { - return _data_control_map_set_provider_id( - provider, - provider_id, - ); - } - - late final _data_control_map_set_provider_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, - ffi.Pointer)>>('data_control_map_set_provider_id'); - late final _data_control_map_set_provider_id = - _data_control_map_set_provider_idPtr - .asFunction)>(); - - /// @brief Gets the Provider ID. - /// @since_tizen 2.3 - /// @remarks You must release @a provider_id using free() after it is used. - /// @param[in] provider The provider handle - /// @param[out] provider_id The data control provider ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see data_control_map_set_provider_id() - int data_control_map_get_provider_id( - data_control_h provider, - ffi.Pointer> provider_id, - ) { - return _data_control_map_get_provider_id( - provider, - provider_id, - ); - } - - late final _data_control_map_get_provider_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, ffi.Pointer>)>>( - 'data_control_map_get_provider_id'); - late final _data_control_map_get_provider_id = - _data_control_map_get_provider_idPtr.asFunction< - int Function(data_control_h, ffi.Pointer>)>(); - - /// @brief Sets the Data ID. - /// @since_tizen 2.3 - /// @param[in] provider The provider handle - /// @param[in] data_id A string for identifying a specific table to operate \n - /// The string consists of one or more components separated by a slash('/'). - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see data_control_map_get_data_id() - int data_control_map_set_data_id( - data_control_h provider, - ffi.Pointer data_id, - ) { - return _data_control_map_set_data_id( - provider, - data_id, - ); - } - - late final _data_control_map_set_data_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, - ffi.Pointer)>>('data_control_map_set_data_id'); - late final _data_control_map_set_data_id = _data_control_map_set_data_idPtr - .asFunction)>(); - - /// @brief Gets the data ID. - /// @since_tizen 2.3 - /// @remarks You must release @a data_id using free() after it is used. - /// @param[in] provider The provider handle - /// @param[out] data_id A string for identifying a specific table to operate \n - /// The string consists of one or more components separated by a slash('/'). - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see data_control_map_set_data_id() - int data_control_map_get_data_id( - data_control_h provider, - ffi.Pointer> data_id, - ) { - return _data_control_map_get_data_id( - provider, - data_id, - ); - } - - late final _data_control_map_get_data_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, ffi.Pointer>)>>( - 'data_control_map_get_data_id'); - late final _data_control_map_get_data_id = - _data_control_map_get_data_idPtr.asFunction< - int Function(data_control_h, ffi.Pointer>)>(); - - /// @brief Registers a callback function for the key-value structured data control response. - /// The application is notified when a data control response is received from the @a provider. - /// @since_tizen 2.3 - /// - /// @remarks The application is notified when a data control response is received from the @a provider. - /// @remarks Only one callback can be registered for each provider id with this API. - /// @remarks If you register multiple callback for same provider id, it will be overwritten by latest one. - /// - /// @param[in] provider The provider handle - /// @param[in] callback The callback function to be called when a response is received - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see data_control_map_unregister_response_cb() - /// @see data_control_map_bind_response_cb() - int data_control_map_register_response_cb( - data_control_h provider, - ffi.Pointer callback, - ffi.Pointer user_data, - ) { - return _data_control_map_register_response_cb( - provider, - callback, - user_data, - ); - } - - late final _data_control_map_register_response_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, - ffi.Pointer, - ffi.Pointer)>>('data_control_map_register_response_cb'); - late final _data_control_map_register_response_cb = - _data_control_map_register_response_cbPtr.asFunction< - int Function( - data_control_h, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function in the @a provider. - /// @since_tizen 2.3 - /// @param[in] provider The provider handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_map_register_response_cb() - int data_control_map_unregister_response_cb( - data_control_h provider, - ) { - return _data_control_map_unregister_response_cb( - provider, - ); - } - - late final _data_control_map_unregister_response_cbPtr = - _lookup>( - 'data_control_map_unregister_response_cb'); - late final _data_control_map_unregister_response_cb = - _data_control_map_unregister_response_cbPtr - .asFunction(); - - /// @brief Gets the value list associated with the specified @a key from the key-values map owned by the key-value structured data control provider. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// @remarks If you want to use this api, you must add privileges. - /// @remarks If the length of value list associated with the @a key is larger than 20, this API only returns the first 20 values. - /// @remarks The following example demonstrates how to use the %data_control_map_get() method. - /// - /// @code - /// - /// void - /// map_get_response_cb(int request_id, data_control_h provider, char **result_value_list, - /// int ret_value_count, bool provider_result, const char *error, void *user_data) - /// { - /// if (provider_result) - /// LOGI("The get operation is successful"); - /// else - /// LOGI("The get operation for the request %d is failed. error message: %s", request_id, error); - /// } - /// - /// data_control_map_response_cb map_callback; - /// - /// { - /// int result = 0; - /// int req_id = 0; - /// char *key = "key"; - /// - /// map_callback.get_cb = map_get_response_cb; - /// result = data_control_map_register_response_cb(provider, &map_callback, NULL); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Registering the callback function is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// result = data_control_map_get(provider, key, &req_id); - /// if (result != DATA_CONTROL_ERROR_NONE) - /// LOGE("Getting the value list of the key(%s) is failed with error: %d", key, result); - /// else - /// LOGI("req_id is %d", req_id); - /// - /// return result; - /// } - /// - /// @endcode - /// - /// @param[in] provider The provider handle - /// @param[in] key The key of the value list to obtain - /// @param[out] request_id The request ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - /// @see data_control_map_get_with_page() - int data_control_map_get( - data_control_h provider, - ffi.Pointer key, - ffi.Pointer request_id, - ) { - return _data_control_map_get( - provider, - key, - request_id, - ); - } - - late final _data_control_map_getPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, ffi.Pointer, - ffi.Pointer)>>('data_control_map_get'); - late final _data_control_map_get = _data_control_map_getPtr.asFunction< - int Function( - data_control_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the value list associated with the specified @a key from the key-values map owned by the key-value structured data control provider, with partition into pages. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// - /// @remarks If you want to use this api, you must add privileges. - /// @param[in] provider The provider handle - /// @param[in] key The key of the value list to obtain - /// @param[out] request_id The request ID - /// @param[in] page_number The page number of the value set \n - /// It starts from @c 1. - /// @param[in] count_per_page The desired maximum count of the data items per page - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - /// @see data_control_map_get() - int data_control_map_get_with_page( - data_control_h provider, - ffi.Pointer key, - ffi.Pointer request_id, - int page_number, - int count_per_page, - ) { - return _data_control_map_get_with_page( - provider, - key, - request_id, - page_number, - count_per_page, - ); - } - - late final _data_control_map_get_with_pagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Int)>>('data_control_map_get_with_page'); - late final _data_control_map_get_with_page = - _data_control_map_get_with_pagePtr.asFunction< - int Function(data_control_h, ffi.Pointer, - ffi.Pointer, int, int)>(); - - /// @brief Sets the value associated with the specified @a key to a new value. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// @remarks If you want to use this api, you must add privileges. - /// @remarks The following example demonstrates how to use the %data_control_map_set() method. - /// - /// @code - /// - /// void - /// map_set_response_cb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data) - /// { - /// if (provider_result) - /// LOGI("The set operation is successful"); - /// else - /// LOGI("The set operation for the request %d is failed. error message: %s", request_id, error); - /// } - /// - /// data_control_map_response_cb map_callback; - /// - /// { - /// int result = 0; - /// int req_id = 0; - /// char *key = "key"; - /// char *old_value = "old value"; - /// char *new_value = "new value"; - /// - /// map_callback.set_cb = map_set_response_cb; - /// result = data_control_map_register_response_cb(provider, &map_callback, NULL); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Registering the callback function is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// result = data_control_map_set(provider, key, old_value, new_value, &req_id); - /// if (result != DATA_CONTROL_ERROR_NONE) - /// LOGE("Replacing old_value(%s) with new_value(%s) is failed with error: %d", old_value, new_value, result); - /// else - /// LOGI("req_id is %d", req_id); - /// - /// return result; - /// } - /// - /// @endcode - /// - /// @param[in] provider The provider handle - /// @param[in] key The key of the value to replace - /// @param[in] old_value The value to replace - /// @param[in] new_value The new value that replaces the existing value - /// @param[out] request_id The request ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - int data_control_map_set( - data_control_h provider, - ffi.Pointer key, - ffi.Pointer old_value, - ffi.Pointer new_value, - ffi.Pointer request_id, - ) { - return _data_control_map_set( - provider, - key, - old_value, - new_value, - request_id, - ); - } - - late final _data_control_map_setPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('data_control_map_set'); - late final _data_control_map_set = _data_control_map_setPtr.asFunction< - int Function(data_control_h, ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Adds the @a value associated with the specified @a key to the key-values map owned by the key-value structured data control provider. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// @remarks If you want to use this api, you must add privileges. - /// @remarks The following example demonstrates how to use the %data_control_map_add() method. - /// - /// @code - /// - /// void - /// map_add_response_cb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data) - /// { - /// if (provider_result) - /// LOGI("The add operation is successful"); - /// else - /// LOGI("The add operation for the request %d is failed. error message: %s", request_id, error); - /// } - /// - /// data_control_map_response_cb map_callback; - /// - /// { - /// int result = 0; - /// int req_id = 0; - /// const char *key = "key"; - /// const char *value = "value"; - /// - /// map_callback.add_cb = map_add_response_cb; - /// result = data_control_map_register_response_cb(provider, &map_callback, NULL); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Registering the callback function is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// result = data_control_map_add(provider, key, value, &req_id); - /// if (result != DATA_CONTROL_ERROR_NONE) - /// LOGE("Adding %s-%s pair is failed with error: %d", key, value, result); - /// else - /// LOGI("req_id is %d", req_id); - /// - /// return result; - /// } - /// - /// @endcode - /// - /// @param[in] provider The provider handle - /// @param[in] key The key of the value to add - /// @param[in] value The value to add - /// @param[out] request_id The request ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - int data_control_map_add( - data_control_h provider, - ffi.Pointer key, - ffi.Pointer value, - ffi.Pointer request_id, - ) { - return _data_control_map_add( - provider, - key, - value, - request_id, - ); - } - - late final _data_control_map_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('data_control_map_add'); - late final _data_control_map_add = _data_control_map_addPtr.asFunction< - int Function(data_control_h, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Removes the @a value associated with the specified @a key from the key-values map owned by the key-value structured data control provider. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// @remarks If you want to use this api, you must add privileges. - /// @remarks The following example demonstrates how to use the %data_control_map_remove() method. - /// - /// @code - /// - /// void - /// map_remove_response_cb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data) - /// { - /// if (provider_result) - /// LOGI("The remove operation is successful"); - /// else - /// LOGI("The remove operation for the request %d is failed. error message: %s", request_id, error); - /// } - /// - /// data_control_map_response_cb map_callback; - /// - /// { - /// int result = 0; - /// int req_id = 0; - /// const char *key = "key"; - /// const char *value = "value"; - /// - /// map_callback.remove_cb = map_remove_response_cb; - /// result = data_control_map_register_response_cb(provider, &map_callback, NULL); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Registering the callback function is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// result = data_control_map_remove(provider, key, value, &req_id); - /// if (result != DATA_CONTROL_ERROR_NONE) - /// LOGE("Removing %s-%s pair is failed with error: %d", key, value, result); - /// else - /// LOGI("req_id is %d", req_id); - /// - /// return result; - /// } - /// - /// @endcode - /// - /// @param[in] provider The provider handle - /// @param[in] key The key of the value to remove - /// @param[in] value The value to remove - /// @param[out] request_id The request ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - int data_control_map_remove( - data_control_h provider, - ffi.Pointer key, - ffi.Pointer value, - ffi.Pointer request_id, - ) { - return _data_control_map_remove( - provider, - key, - value, - request_id, - ); - } - - late final _data_control_map_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('data_control_map_remove'); - late final _data_control_map_remove = _data_control_map_removePtr.asFunction< - int Function(data_control_h, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Adds multiple key-value pairs in one request. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// @remarks If you want to use this function, you must add privileges. - /// @remarks The following example demonstrates how to use the %data_control_map_add_bulk_data() method. - /// - /// @code - /// - /// void - /// map_bulk_add_response_cb(int request_id, data_control_h provider, data_control_bulk_result_data_h bulk_results, - /// bool provider_result, const char *error, void *user_data) - /// { - /// if (provider_result) - /// LOGI("The add operation is successful"); - /// else - /// LOGI("The add operation for the request %d is failed. error message: %s", request_id, error); - /// } - /// - /// data_control_map_response_cb map_callback; - /// { - /// data_control_bulk_data_h bulk_data; - /// int req_id; - /// bundle *b1; - /// bundle *b2; - /// int result = 0; - /// int req_id = 0; - /// int count; - /// - /// result = data_control_map_register_add_bulk_data_response_cb(provider, map_bulk_add_response_cb, user_data); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Registering the callback function is failed with error: %d", result); - /// return result; - /// } - /// - /// b1 = bundle_create(); - /// bundle_add_str(b1, "key", "test key"); - /// bundle_add_str(b1, "value", "test value"); - /// b2 = bundle_create(); - /// bundle_add_str(b2, "key", "test key2"); - /// bundle_add_str(b2, "value", "test value2"); - /// - /// data_control_bulk_data_create(&bulk_data); - /// data_control_bulk_data_add(bulk_data, b1); - /// data_control_bulk_data_add(bulk_data, b2); - /// - /// data_control_bulk_data_get_count(bulk_data, &count); - /// dlog_print(DLOG_INFO, LOG_TAG, "bulk add count %d ", count); - /// - /// data_control_map_add_bulk_data(provider, bulk_data, &req_id); - /// data_control_bulk_data_destroy(bulk_data); - /// - /// bundle_free(b1); - /// bundle_free(b2); - /// return result; - /// } - /// - /// @endcode - /// - /// @param[in] provider The provider handle - /// @param[in] bulk_data The bulk data handle - /// @param[out] request_id The request ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument. Bulk data total length cannot exceed 1MB - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - int data_control_map_add_bulk_data( - data_control_h provider, - data_control_bulk_data_h bulk_data, - ffi.Pointer request_id, - ) { - return _data_control_map_add_bulk_data( - provider, - bulk_data, - request_id, - ); - } - - late final _data_control_map_add_bulk_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, data_control_bulk_data_h, - ffi.Pointer)>>('data_control_map_add_bulk_data'); - late final _data_control_map_add_bulk_data = - _data_control_map_add_bulk_dataPtr.asFunction< - int Function(data_control_h, data_control_bulk_data_h, - ffi.Pointer)>(); - - /// @brief Registers an add bulk data callback for the MAP data control response. - /// The application is notified when a data control response is received - /// from the @a provider. - /// @since_tizen 3.0 - /// - /// @remarks Only one callback can be registered for each provider id with this - /// function. If you call this function multiple times for the same - /// provider id, any previously set callback will be overwritten. - /// @param[in] provider The provider handle - /// @param[in] callback The callback function to be called when a response is received - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_map_unregister_add_bulk_data_response_cb() - /// @see data_control_map_bind_add_bulk_data_response_cb() - int data_control_map_register_add_bulk_data_response_cb( - data_control_h provider, - data_control_bulk_cb callback, - ffi.Pointer user_data, - ) { - return _data_control_map_register_add_bulk_data_response_cb( - provider, - callback, - user_data, - ); - } - - late final _data_control_map_register_add_bulk_data_response_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, data_control_bulk_cb, - ffi.Pointer)>>( - 'data_control_map_register_add_bulk_data_response_cb'); - late final _data_control_map_register_add_bulk_data_response_cb = - _data_control_map_register_add_bulk_data_response_cbPtr.asFunction< - int Function( - data_control_h, data_control_bulk_cb, ffi.Pointer)>(); - - /// @brief Unregisters the add bulk data callback. - /// @since_tizen 3.0 - /// @param[in] provider The provider handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_map_register_add_bulk_data_response_cb() - int data_control_map_unregister_add_bulk_data_response_cb( - data_control_h provider, - ) { - return _data_control_map_unregister_add_bulk_data_response_cb( - provider, - ); - } - - late final _data_control_map_unregister_add_bulk_data_response_cbPtr = - _lookup>( - 'data_control_map_unregister_add_bulk_data_response_cb'); - late final _data_control_map_unregister_add_bulk_data_response_cb = - _data_control_map_unregister_add_bulk_data_response_cbPtr - .asFunction(); - - /// @brief Binds a response callback function to a data control provider handle. - /// The application is notified when a data control response is received - /// from the @a provider. - /// @details This function is very similar to - /// data_control_map_register_response_cb(), which can register a - /// callback for a given provider id. Calling - /// data_control_map_register_response_cb() again overwrites the - /// callback previously set for the provider id, which means that only - /// one callback can be set for a given id. - /// data_control_map_bind_response_cb() binds a callback to the handle - /// of a provider, which allows registering multiple callbacks for a - /// given provider id. To do that, you can create new #data_control_h - /// for the same provider id and register callback for the - /// #data_control_h. - /// - /// @since_tizen 4.0 - /// - /// @remarks If you call this function multiple times for the same handle, any - /// previously set callback will be overwritten. - /// - /// @param[in] provider The provider handle - /// @param[in] callback The callback function to be called - /// when a response is received - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_map_register_response_cb() - /// @see data_control_map_unbind_response_cb() - int data_control_map_bind_response_cb( - data_control_h provider, - ffi.Pointer callback, - ffi.Pointer user_data, - ) { - return _data_control_map_bind_response_cb( - provider, - callback, - user_data, - ); - } - - late final _data_control_map_bind_response_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, - ffi.Pointer, - ffi.Pointer)>>('data_control_map_bind_response_cb'); - late final _data_control_map_bind_response_cb = - _data_control_map_bind_response_cbPtr.asFunction< - int Function( - data_control_h, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Unbinds the callback function in the @a provider. - /// @since_tizen 4.0 - /// - /// @param[in] provider The provider handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_bind_map_response_cb() - int data_control_map_unbind_response_cb( - data_control_h provider, - ) { - return _data_control_map_unbind_response_cb( - provider, - ); - } - - late final _data_control_map_unbind_response_cbPtr = - _lookup>( - 'data_control_map_unbind_response_cb'); - late final _data_control_map_unbind_response_cb = - _data_control_map_unbind_response_cbPtr - .asFunction(); - - /// @brief Binds the add bulk data callback to the map data control response. - /// @details This function is very similar to - /// data_control_map_register_add_bulk_data_response_cb(), which can - /// register a callback for a given provider id. Calling - /// data_control_map_register_add_bulk_data_response_cb() again - /// overwrites the callback previously set for the provider id, which - /// means that only one callback can be set for a given id. - /// data_control_map_bind_add_bulk_data_response_cb() binds a - /// callback to the handle of a provider, which allows registering - /// multiple callbacks for a given provider id. To do that, you can - /// create new #data_control_h for the same provider id and register - /// callback for the #data_control_h. - /// - /// @since_tizen 4.0 - /// @remarks If you call this function multiple times for the same handle, - /// any previously set callback will be overwritten. - /// - /// @param[in] provider The provider handle - /// @param[in] callback The callback function to be called - /// when a response is received - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_map_register_add_bulk_data_response_cb() - /// @see data_control_map_unbind_add_bulk_data_response_cb() - int data_control_map_bind_add_bulk_data_response_cb( - data_control_h provider, - data_control_bulk_cb callback, - ffi.Pointer user_data, - ) { - return _data_control_map_bind_add_bulk_data_response_cb( - provider, - callback, - user_data, - ); - } - - late final _data_control_map_bind_add_bulk_data_response_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, data_control_bulk_cb, - ffi.Pointer)>>( - 'data_control_map_bind_add_bulk_data_response_cb'); - late final _data_control_map_bind_add_bulk_data_response_cb = - _data_control_map_bind_add_bulk_data_response_cbPtr.asFunction< - int Function( - data_control_h, data_control_bulk_cb, ffi.Pointer)>(); - - /// @brief Unbinds the add bulk data callback in the @a provider. - /// @since_tizen 4.0 - /// - /// @param[in] provider The provider handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_map_bind_add_bulk_data_response_cb() - int data_control_map_unbind_add_bulk_data_response_cb( - data_control_h provider, - ) { - return _data_control_map_unbind_add_bulk_data_response_cb( - provider, - ); - } - - late final _data_control_map_unbind_add_bulk_data_response_cbPtr = - _lookup>( - 'data_control_map_unbind_add_bulk_data_response_cb'); - late final _data_control_map_unbind_add_bulk_data_response_cb = - _data_control_map_unbind_add_bulk_data_response_cbPtr - .asFunction(); - - /// @brief Gets the handle ID for @a provider. - /// @since_tizen 4.0 - /// - /// @remarks @a handle_id is generated internally and it is unique for each - /// handle. This function can be used in callbacks to know for which - /// handle the callback was called. - /// - /// @param[in] provider The provider handle - /// @param[out] handle_id The handle ID for @a provider - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_map_get_handle_id( - data_control_h provider, - ffi.Pointer handle_id, - ) { - return _data_control_map_get_handle_id( - provider, - handle_id, - ); - } - - late final _data_control_map_get_handle_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, - ffi.Pointer)>>('data_control_map_get_handle_id'); - late final _data_control_map_get_handle_id = - _data_control_map_get_handle_idPtr - .asFunction)>(); - - /// @brief Registers a callback function for the SQL data control request. - /// The provider is notified when a data control request is received from the client applications. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing - /// - /// @param[in] callback The callback function to be called when a data control request is received - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - int data_control_provider_sql_register_cb( - ffi.Pointer callback, - ffi.Pointer user_data, - ) { - return _data_control_provider_sql_register_cb( - callback, - user_data, - ); - } - - late final _data_control_provider_sql_register_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('data_control_provider_sql_register_cb'); - late final _data_control_provider_sql_register_cb = - _data_control_provider_sql_register_cbPtr.asFunction< - int Function(ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Unregisters the SQL data control request callback functions. - /// @since_tizen 2.3 - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - int data_control_provider_sql_unregister_cb() { - return _data_control_provider_sql_unregister_cb(); - } - - late final _data_control_provider_sql_unregister_cbPtr = - _lookup>( - 'data_control_provider_sql_unregister_cb'); - late final _data_control_provider_sql_unregister_cb = - _data_control_provider_sql_unregister_cbPtr.asFunction(); - - /// @brief Registers a callback function for the map data control request. - /// The provider is notified when a data control request is received from the client applications. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing - /// - /// @param[in] callback The callback function to be called when a data control request is received - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - int data_control_provider_map_register_cb( - ffi.Pointer callback, - ffi.Pointer user_data, - ) { - return _data_control_provider_map_register_cb( - callback, - user_data, - ); - } - - late final _data_control_provider_map_register_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('data_control_provider_map_register_cb'); - late final _data_control_provider_map_register_cb = - _data_control_provider_map_register_cbPtr.asFunction< - int Function(ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Unregisters the map data control request callback functions. - /// @since_tizen 2.3 - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - int data_control_provider_map_unregister_cb() { - return _data_control_provider_map_unregister_cb(); - } - - late final _data_control_provider_map_unregister_cbPtr = - _lookup>( - 'data_control_provider_map_unregister_cb'); - late final _data_control_provider_map_unregister_cb = - _data_control_provider_map_unregister_cbPtr.asFunction(); - - /// @brief Gets the application ID which sends the data control request. - /// @since_tizen 2.3 - /// - /// @remarks You must release @a appid using free() after it is used. - /// - /// @param[in] request_id The request ID - /// @param[out] appid The application ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_provider_get_client_appid( - int request_id, - ffi.Pointer> appid, - ) { - return _data_control_provider_get_client_appid( - request_id, - appid, - ); - } - - late final _data_control_provider_get_client_appidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer>)>>( - 'data_control_provider_get_client_appid'); - late final _data_control_provider_get_client_appid = - _data_control_provider_get_client_appidPtr - .asFunction>)>(); - - /// @brief Sends the success result and the result set of the select request to the client application. - /// @since_tizen 2.3 - /// - /// @param[in] request_id The request ID - /// @param[in] db_handle The result DB handle for the result set - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_provider_send_select_result( - int request_id, - ffi.Pointer db_handle, - ) { - return _data_control_provider_send_select_result( - request_id, - db_handle, - ); - } - - late final _data_control_provider_send_select_resultPtr = _lookup< - ffi.NativeFunction)>>( - 'data_control_provider_send_select_result'); - late final _data_control_provider_send_select_result = - _data_control_provider_send_select_resultPtr - .asFunction)>(); - - /// @brief Sends the success result of the insert request and the last inserted row ID to the client application. - /// @since_tizen 2.3 - /// - /// @param[in] request_id The request ID - /// @param[in] row_id The row ID of the database changed by the insert request - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_provider_send_insert_result( - int request_id, - int row_id, - ) { - return _data_control_provider_send_insert_result( - request_id, - row_id, - ); - } - - late final _data_control_provider_send_insert_resultPtr = - _lookup>( - 'data_control_provider_send_insert_result'); - late final _data_control_provider_send_insert_result = - _data_control_provider_send_insert_resultPtr - .asFunction(); - - /// @brief Sends the success result of the update request to the client application. - /// @since_tizen 2.3 - /// - /// @param[in] request_id The request ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_provider_send_update_result( - int request_id, - ) { - return _data_control_provider_send_update_result( - request_id, - ); - } - - late final _data_control_provider_send_update_resultPtr = - _lookup>( - 'data_control_provider_send_update_result'); - late final _data_control_provider_send_update_result = - _data_control_provider_send_update_resultPtr - .asFunction(); - - /// @brief Sends the success result of the delete request to the client application. - /// @since_tizen 2.3 - /// - /// @param[in] request_id The request ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_provider_send_delete_result( - int request_id, - ) { - return _data_control_provider_send_delete_result( - request_id, - ); - } - - late final _data_control_provider_send_delete_resultPtr = - _lookup>( - 'data_control_provider_send_delete_result'); - late final _data_control_provider_send_delete_result = - _data_control_provider_send_delete_resultPtr - .asFunction(); - - /// @brief Sends the provider error message to the client application. - /// @since_tizen 2.3 - /// - /// @param[in] request_id The request ID - /// @param[in] error The provider-defined error message - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_provider_send_error( - int request_id, - ffi.Pointer error, - ) { - return _data_control_provider_send_error( - request_id, - error, - ); - } - - late final _data_control_provider_send_errorPtr = _lookup< - ffi.NativeFunction)>>( - 'data_control_provider_send_error'); - late final _data_control_provider_send_error = - _data_control_provider_send_errorPtr - .asFunction)>(); - - /// @brief Sends the success result of the request for setting, adding, and removing the key-value structured data to the client application. - /// @since_tizen 2.3 - /// - /// @param[in] request_id The request ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_provider_send_map_result( - int request_id, - ) { - return _data_control_provider_send_map_result( - request_id, - ); - } - - late final _data_control_provider_send_map_resultPtr = - _lookup>( - 'data_control_provider_send_map_result'); - late final _data_control_provider_send_map_result = - _data_control_provider_send_map_resultPtr.asFunction(); - - /// @brief Sends the success result of the request for getting the value list to the client application. - /// @since_tizen 2.3 - /// - /// @param[in] request_id The request ID - /// @param[in] value_list The result value list - /// @param[in] value_count The number of the values - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_provider_send_map_get_value_result( - int request_id, - ffi.Pointer> value_list, - int value_count, - ) { - return _data_control_provider_send_map_get_value_result( - request_id, - value_list, - value_count, - ); - } - - late final _data_control_provider_send_map_get_value_resultPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer>, - ffi.Int)>>('data_control_provider_send_map_get_value_result'); - late final _data_control_provider_send_map_get_value_result = - _data_control_provider_send_map_get_value_resultPtr.asFunction< - int Function(int, ffi.Pointer>, int)>(); - - /// @brief Creates SQL INSERT statement. - /// - /// @since_tizen 2.3 - /// - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] provider The provider handle - /// @param[in] insert_map The column-value pairs to insert - /// - /// @return The SQL INSERT statement on success, - /// otherwise NULL - /// @exception DATA_CONTROL_ERROR_NONE Success - /// @exception DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @exception DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - ffi.Pointer data_control_provider_create_insert_statement( - data_control_h provider, - ffi.Pointer insert_map, - ) { - return _data_control_provider_create_insert_statement( - provider, - insert_map, - ); - } - - late final _data_control_provider_create_insert_statementPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - data_control_h, ffi.Pointer)>>( - 'data_control_provider_create_insert_statement'); - late final _data_control_provider_create_insert_statement = - _data_control_provider_create_insert_statementPtr.asFunction< - ffi.Pointer Function( - data_control_h, ffi.Pointer)>(); - - /// @brief Creates SQL DELETE statement. - /// - /// @since_tizen 2.3 - /// - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] provider The provider handle - /// @param[in] where A filter to select the desired rows to delete \n - /// Pass @c NULL if all rows need to be deleted - /// - /// @return The SQL DELETE statement on success, - /// otherwise NULL - /// @exception DATA_CONTROL_ERROR_NONE Success - /// @exception DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @exception DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - ffi.Pointer data_control_provider_create_delete_statement( - data_control_h provider, - ffi.Pointer where, - ) { - return _data_control_provider_create_delete_statement( - provider, - where, - ); - } - - late final _data_control_provider_create_delete_statementPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - data_control_h, ffi.Pointer)>>( - 'data_control_provider_create_delete_statement'); - late final _data_control_provider_create_delete_statement = - _data_control_provider_create_delete_statementPtr.asFunction< - ffi.Pointer Function( - data_control_h, ffi.Pointer)>(); - - /// @brief Creates SQL UPDATE statement. - /// - /// @since_tizen 2.3 - /// - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] provider The provider handle - /// @param[in] update_map The column-value pairs to update - /// @param[in] where A filter to select the desired rows to update - /// - /// @return The SQL UPDATE statement on success, - /// otherwise NULL - /// @exception DATA_CONTROL_ERROR_NONE Success - /// @exception DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @exception DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - ffi.Pointer data_control_provider_create_update_statement( - data_control_h provider, - ffi.Pointer update_map, - ffi.Pointer where, - ) { - return _data_control_provider_create_update_statement( - provider, - update_map, - where, - ); - } - - late final _data_control_provider_create_update_statementPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - data_control_h, ffi.Pointer, ffi.Pointer)>>( - 'data_control_provider_create_update_statement'); - late final _data_control_provider_create_update_statement = - _data_control_provider_create_update_statementPtr.asFunction< - ffi.Pointer Function( - data_control_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Creates SQL SELECT statement. - /// - /// @since_tizen 2.3 - /// - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] provider The provider handle - /// @param[in] column_list The column names to query \n - /// Pass @c NULL if all columns need to be selected - /// @param[in] column_count The total number of columns to be queried - /// @param[in] where A filter to select the desired rows - /// @param[in] order The sorting order of rows to query - /// - /// @return The SQL SELECT statement on success, - /// otherwise NULL - /// @exception DATA_CONTROL_ERROR_NONE Success - /// @exception DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @exception DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - ffi.Pointer data_control_provider_create_select_statement( - data_control_h provider, - ffi.Pointer> column_list, - int column_count, - ffi.Pointer where, - ffi.Pointer order, - ) { - return _data_control_provider_create_select_statement( - provider, - column_list, - column_count, - where, - order, - ); - } - - late final _data_control_provider_create_select_statementPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - data_control_h, - ffi.Pointer>, - ffi.Int, - ffi.Pointer, - ffi.Pointer)>>( - 'data_control_provider_create_select_statement'); - late final _data_control_provider_create_select_statement = - _data_control_provider_create_select_statementPtr.asFunction< - ffi.Pointer Function( - data_control_h, - ffi.Pointer>, - int, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Checks whether the given provider ID matches the provider handle's provider ID. - /// - /// @since_tizen 2.3 - /// - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] provider The provider handle - /// @param[in] provider_id The provider ID to be compared with handle's provider ID - /// - /// @return @c true if the provider_id matches, - /// otherwise @c false if it does not match - /// @exception DATA_CONTROL_ERROR_NONE Success - /// @exception DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @exception DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - bool data_control_provider_match_provider_id( - data_control_h provider, - ffi.Pointer provider_id, - ) { - return _data_control_provider_match_provider_id( - provider, - provider_id, - ); - } - - late final _data_control_provider_match_provider_idPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(data_control_h, ffi.Pointer)>>( - 'data_control_provider_match_provider_id'); - late final _data_control_provider_match_provider_id = - _data_control_provider_match_provider_idPtr - .asFunction)>(); - - /// @brief Checks whether the given data ID matches the provider handle's data ID. - /// - /// @since_tizen 2.3 - /// - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] provider The provider handle - /// @param[in] data_id The data ID to be compared with handle's data ID - /// - /// @return @c true if the @a data_id matches, - /// otherwise @c false if it does not match - /// @exception DATA_CONTROL_ERROR_NONE Success - /// @exception DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @exception DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - bool data_control_provider_match_data_id( - data_control_h provider, - ffi.Pointer data_id, - ) { - return _data_control_provider_match_data_id( - provider, - data_id, - ); - } - - late final _data_control_provider_match_data_idPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(data_control_h, - ffi.Pointer)>>('data_control_provider_match_data_id'); - late final _data_control_provider_match_data_id = - _data_control_provider_match_data_idPtr - .asFunction)>(); - - /// @brief Sends a data change notification to consumer applications which have successfully added a data change callback. - /// @details If the function is successful, data_control_data_change_cb() callback will be called under certain conditions. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing - /// - /// @param[in] provider Target provider handle - /// @param[in] type Changed data type - /// @param[in] data Customized information about changed data - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre The consumer should call data_control_add_data_change_cb() to receive data change notifications - /// @see data_control_data_change_cb() - /// @see data_control_add_data_change_cb() - int data_control_provider_send_data_change_noti( - data_control_h provider, - int type, - ffi.Pointer data, - ) { - return _data_control_provider_send_data_change_noti( - provider, - type, - data, - ); - } - - late final _data_control_provider_send_data_change_notiPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, ffi.Int32, ffi.Pointer)>>( - 'data_control_provider_send_data_change_noti'); - late final _data_control_provider_send_data_change_noti = - _data_control_provider_send_data_change_notiPtr - .asFunction)>(); - - /// @brief Adds a consumer filter for the data changed callback addition process. - /// @since_tizen 3.0 - /// @remarks If the provider does not add any filters by calling this function, all requests to add a data change callback will be granted. \n - /// If filters are added, and at least one filter returns false for a consumer application, the application will not be able to add data change callbacks. - /// - /// @param[in] callback Consumer filter callback, filtering consumers which try to add data changed callback - /// @param[in] user_data The user data to be passed to the list_cb function - /// @param[out] callback_id Added callback ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_provider_data_change_consumer_filter_cb() - int data_control_provider_add_data_change_consumer_filter_cb( - data_control_provider_data_change_consumer_filter_cb callback, - ffi.Pointer user_data, - ffi.Pointer callback_id, - ) { - return _data_control_provider_add_data_change_consumer_filter_cb( - callback, - user_data, - callback_id, - ); - } - - late final _data_control_provider_add_data_change_consumer_filter_cbPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_provider_data_change_consumer_filter_cb, - ffi.Pointer, - ffi.Pointer)>>( - 'data_control_provider_add_data_change_consumer_filter_cb'); - late final _data_control_provider_add_data_change_consumer_filter_cb = - _data_control_provider_add_data_change_consumer_filter_cbPtr.asFunction< - int Function(data_control_provider_data_change_consumer_filter_cb, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Removes a consumer filter for the data changed callback addition process. - /// @since_tizen 3.0 - /// - /// @param[in] callback_id Target callback ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_provider_remove_data_change_consumer_filter_cb( - int callback_id, - ) { - return _data_control_provider_remove_data_change_consumer_filter_cb( - callback_id, - ); - } - - late final _data_control_provider_remove_data_change_consumer_filter_cbPtr = - _lookup>( - 'data_control_provider_remove_data_change_consumer_filter_cb'); - late final _data_control_provider_remove_data_change_consumer_filter_cb = - _data_control_provider_remove_data_change_consumer_filter_cbPtr - .asFunction(); - - /// @brief Retrieves ids of all applications which receive data change notifications from a given provider. - /// @details This function calls data_control_provider_data_change_consumer_cb() once for each provider's notification target consumer id. \n - /// If the data_control_provider_data_change_consumer_cb() callback function returns @c false, then iteration will be finished. - /// @since_tizen 3.0 - /// - /// @param[in] provider Target provider handle - /// @param[in] list_cb The iteration callback function - /// @param[in] user_data The user data to be passed to the list_cb function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @post This function invokes data_control_provider_data_change_consumer_cb(). - /// @see data_control_provider_data_change_consumer_cb() - int data_control_provider_foreach_data_change_consumer( - data_control_h provider, - data_control_provider_data_change_consumer_cb list_cb, - ffi.Pointer user_data, - ) { - return _data_control_provider_foreach_data_change_consumer( - provider, - list_cb, - user_data, - ); - } - - late final _data_control_provider_foreach_data_change_consumerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, - data_control_provider_data_change_consumer_cb, - ffi.Pointer)>>( - 'data_control_provider_foreach_data_change_consumer'); - late final _data_control_provider_foreach_data_change_consumer = - _data_control_provider_foreach_data_change_consumerPtr.asFunction< - int Function( - data_control_h, - data_control_provider_data_change_consumer_cb, - ffi.Pointer)>(); - - /// @brief Sends the result of the bulk insert request to the client application. - /// @since_tizen 3.0 - /// - /// @param[in] request_id The request ID - /// @param[in] bulk_results The bulk add result for each data - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_provider_send_bulk_insert_result( - int request_id, - data_control_bulk_result_data_h bulk_results, - ) { - return _data_control_provider_send_bulk_insert_result( - request_id, - bulk_results, - ); - } - - late final _data_control_provider_send_bulk_insert_resultPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, data_control_bulk_result_data_h)>>( - 'data_control_provider_send_bulk_insert_result'); - late final _data_control_provider_send_bulk_insert_result = - _data_control_provider_send_bulk_insert_resultPtr - .asFunction(); - - /// @brief Sends the result of the bulk add request to the client application. - /// @since_tizen 3.0 - /// - /// @param[in] request_id The request ID - /// @param[in] bulk_results The bulk add result for each data - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_provider_send_map_bulk_add_result( - int request_id, - data_control_bulk_result_data_h bulk_results, - ) { - return _data_control_provider_send_map_bulk_add_result( - request_id, - bulk_results, - ); - } - - late final _data_control_provider_send_map_bulk_add_resultPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, data_control_bulk_result_data_h)>>( - 'data_control_provider_send_map_bulk_add_result'); - late final _data_control_provider_send_map_bulk_add_result = - _data_control_provider_send_map_bulk_add_resultPtr - .asFunction(); - - /// @brief Registers a callback for the SQL bulk data request. - /// @details The provider is notified when a data control request is received from the client applications. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing - /// - /// @param[in] callback The callback function to be called when a data control request is received - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - int data_control_provider_sql_register_insert_bulk_data_request_cb( - data_control_provider_bulk_cb callback, - ffi.Pointer user_data, - ) { - return _data_control_provider_sql_register_insert_bulk_data_request_cb( - callback, - user_data, - ); - } - - late final _data_control_provider_sql_register_insert_bulk_data_request_cbPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_provider_bulk_cb, ffi.Pointer)>>( - 'data_control_provider_sql_register_insert_bulk_data_request_cb'); - late final _data_control_provider_sql_register_insert_bulk_data_request_cb = - _data_control_provider_sql_register_insert_bulk_data_request_cbPtr - .asFunction< - int Function( - data_control_provider_bulk_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback for the SQL bulk data request. - /// @since_tizen 3.0 - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @see data_control_provider_sql_register_insert_bulk_data_request_cb() - int data_control_provider_sql_unregister_insert_bulk_data_request_cb() { - return _data_control_provider_sql_unregister_insert_bulk_data_request_cb(); - } - - late final _data_control_provider_sql_unregister_insert_bulk_data_request_cbPtr = - _lookup>( - 'data_control_provider_sql_unregister_insert_bulk_data_request_cb'); - late final _data_control_provider_sql_unregister_insert_bulk_data_request_cb = - _data_control_provider_sql_unregister_insert_bulk_data_request_cbPtr - .asFunction(); - - /// @brief Registers a callback for the MAP bulk data request. - /// @details The provider is notified when a data control request is received from the client applications. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing - /// - /// @param[in] callback The callback function to be called when a data control request is received - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - int data_control_provider_map_register_add_bulk_data_request_cb( - data_control_provider_bulk_cb callback, - ffi.Pointer user_data, - ) { - return _data_control_provider_map_register_add_bulk_data_request_cb( - callback, - user_data, - ); - } - - late final _data_control_provider_map_register_add_bulk_data_request_cbPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_provider_bulk_cb, ffi.Pointer)>>( - 'data_control_provider_map_register_add_bulk_data_request_cb'); - late final _data_control_provider_map_register_add_bulk_data_request_cb = - _data_control_provider_map_register_add_bulk_data_request_cbPtr - .asFunction< - int Function( - data_control_provider_bulk_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback for the MAP bulk data request. - /// @since_tizen 3.0 - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @see data_control_provider_map_register_add_bulk_data_request_cb() - int data_control_provider_map_unregister_add_bulk_data_request_cb() { - return _data_control_provider_map_unregister_add_bulk_data_request_cb(); - } - - late final _data_control_provider_map_unregister_add_bulk_data_request_cbPtr = - _lookup>( - 'data_control_provider_map_unregister_add_bulk_data_request_cb'); - late final _data_control_provider_map_unregister_add_bulk_data_request_cb = - _data_control_provider_map_unregister_add_bulk_data_request_cbPtr - .asFunction(); - - /// @brief Asynchronously adds a data changed callback, which is called whenever the provider's data is changed. - /// @details The function attempts to add the callback asynchronously and calls result_callback to inform about the result of the attempt. \n - /// If the function is successful, result_callback will be called. \n - /// The provider will call any filters which were added for the callback addition process. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// @remarks If you want to use this function, you must add privileges. - /// @param[in] provider Target provider handle - /// @param[in] callback The callback function to be called when consumer receives data change notification - /// @param[in] user_data The user data to be passed to the callback function - /// @param[in] result_callback The callback function to be called when consumer receives add data change callback process result - /// @param[in] result_cb_user_data The user data to be passed to the result_callback function - /// @param[out] callback_id Added callback ID, it can be used to remove the callback - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - /// @see data_control_data_change_cb() - /// @see data_control_add_callback_result_cb() - /// @see data_control_provider_add_data_change_consumer_filter_cb() - int data_control_add_data_change_cb( - data_control_h provider, - data_control_data_change_cb callback, - ffi.Pointer user_data, - data_control_add_callback_result_cb result_callback, - ffi.Pointer result_cb_user_data, - ffi.Pointer callback_id, - ) { - return _data_control_add_data_change_cb( - provider, - callback, - user_data, - result_callback, - result_cb_user_data, - callback_id, - ); - } - - late final _data_control_add_data_change_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, - data_control_data_change_cb, - ffi.Pointer, - data_control_add_callback_result_cb, - ffi.Pointer, - ffi.Pointer)>>('data_control_add_data_change_cb'); - late final _data_control_add_data_change_cb = - _data_control_add_data_change_cbPtr.asFunction< - int Function( - data_control_h, - data_control_data_change_cb, - ffi.Pointer, - data_control_add_callback_result_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Removes data change callback function. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// @remarks If you want to use this function, you must add privileges. - /// @param[in] provider Target provider handle - /// @param[in] callback_id Target callback ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - int data_control_remove_data_change_cb( - data_control_h provider, - int callback_id, - ) { - return _data_control_remove_data_change_cb( - provider, - callback_id, - ); - } - - late final _data_control_remove_data_change_cbPtr = - _lookup>( - 'data_control_remove_data_change_cb'); - late final _data_control_remove_data_change_cb = - _data_control_remove_data_change_cbPtr - .asFunction(); - - /// @brief Registers the local message port. - /// @details If the message port name is already registered, the previous local message port ID returns and the callback function is changed. \n - /// Multiple message ports can be registered. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specified callback is called only in the main thread. - /// @param[in] local_port The name of the local message port - /// @param[in] callback The callback function to be called when a message is received - /// @param[in] user_data The user data to be passed to the callback function - /// @return A local message port ID on success, - /// otherwise a negative error value - /// @retval #MESSAGE_PORT_ERROR_INVALID_PARAMETER The specified @a local_port or @a callback is NULL - /// @retval #MESSAGE_PORT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval MESSAGE_PORT_ERROR_IO_ERROR Internal I/O error - /// @see message_port_unregister_local_port() - int message_port_register_local_port( - ffi.Pointer local_port, - message_port_message_cb callback, - ffi.Pointer user_data, - ) { - return _message_port_register_local_port( - local_port, - callback, - user_data, - ); - } - - late final _message_port_register_local_portPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, message_port_message_cb, - ffi.Pointer)>>('message_port_register_local_port'); - late final _message_port_register_local_port = - _message_port_register_local_portPtr.asFunction< - int Function(ffi.Pointer, message_port_message_cb, - ffi.Pointer)>(); - - /// @brief Registers the trusted local message port. - /// @details If the message port name is already registered, the previous local message port ID returns and the callback function is changed. @n - /// It allows communications only if the applications are signed with the same certificate, which is uniquely assigned to the developer. @n - /// Multiple message ports can be registered. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specified callback is called only in the main thread. - /// @param[in] trusted_local_port The name of the trusted local message port - /// @param[in] callback The callback function to be called when a trusted message is received - /// @param[in] user_data The user data to be passed to the callback function - /// @return A trusted local message port ID on success, - /// otherwise a negative error value - /// @retval #MESSAGE_PORT_ERROR_INVALID_PARAMETER The specified @a trusted_local_port or @a callback is NULL - /// @retval #MESSAGE_PORT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGE_PORT_ERROR_IO_ERROR Internal I/O error - /// @see message_port_unregister_trusted_local_port() - int message_port_register_trusted_local_port( - ffi.Pointer trusted_local_port, - message_port_trusted_message_cb callback, - ffi.Pointer user_data, - ) { - return _message_port_register_trusted_local_port( - trusted_local_port, - callback, - user_data, - ); - } - - late final _message_port_register_trusted_local_portPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - message_port_trusted_message_cb, ffi.Pointer)>>( - 'message_port_register_trusted_local_port'); - late final _message_port_register_trusted_local_port = - _message_port_register_trusted_local_portPtr.asFunction< - int Function(ffi.Pointer, message_port_trusted_message_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the local message port. - /// @details This method unregisters the callback function with the specified local port ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] local_port_id The local message port ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGE_PORT_ERROR_NONE Successful - /// @retval #MESSAGE_PORT_ERROR_INVALID_PARAMETER The specified @a local_port_id is not positive - /// @retval #MESSAGE_PORT_ERROR_PORT_NOT_FOUND The specified @a local_port_id cannot be found - /// @retval #MESSAGE_PORT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGE_PORT_ERROR_IO_ERROR Internal I/O error - /// @see message_port_register_local_port() - int message_port_unregister_local_port( - int local_port_id, - ) { - return _message_port_unregister_local_port( - local_port_id, - ); - } - - late final _message_port_unregister_local_portPtr = - _lookup>( - 'message_port_unregister_local_port'); - late final _message_port_unregister_local_port = - _message_port_unregister_local_portPtr.asFunction(); - - /// @brief Registers the trusted local message port. - /// @details This method unregisters the callback function with the specified local port ID. @n - /// It allows communications only if the applications are signed with the same certificate, which is uniquely assigned to the developer. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] trusted_local_port_id The trusted local message port ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGE_PORT_ERROR_NONE Successful - /// @retval #MESSAGE_PORT_ERROR_INVALID_PARAMETER The specified @a trusted_local_port_id is not positive - /// @retval #MESSAGE_PORT_ERROR_PORT_NOT_FOUND The specified @a trusted_local_port_id cannot be found - /// @retval #MESSAGE_PORT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGE_PORT_ERROR_IO_ERROR Internal I/O error - /// @see message_port_register_trusted_local_port() - int message_port_unregister_trusted_local_port( - int trusted_local_port_id, - ) { - return _message_port_unregister_trusted_local_port( - trusted_local_port_id, - ); - } - - late final _message_port_unregister_trusted_local_portPtr = - _lookup>( - 'message_port_unregister_trusted_local_port'); - late final _message_port_unregister_trusted_local_port = - _message_port_unregister_trusted_local_portPtr - .asFunction(); - - /// @brief Checks whether the message port of a remote application is registered. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If this function returns a negative error value, the out parameter @a exist will not be changed. - /// @param[in] remote_app_id The ID of the remote application - /// @param[in] remote_port The name of the remote message port - /// @param[out] exist If @c true, the message port of the remote application exists; - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGE_PORT_ERROR_NONE Successful - /// @retval #MESSAGE_PORT_ERROR_INVALID_PARAMETER The specified @a remote_app_id or @a remote_port is NULL - /// @retval #MESSAGE_PORT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGE_PORT_ERROR_IO_ERROR Internal I/O error - int message_port_check_remote_port( - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - ffi.Pointer exist, - ) { - return _message_port_check_remote_port( - remote_app_id, - remote_port, - exist, - ); - } - - late final _message_port_check_remote_portPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('message_port_check_remote_port'); - late final _message_port_check_remote_port = - _message_port_check_remote_portPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Checks whether the trusted message port of a remote application is registered. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If this function returns a negative error value, the out parameter @a exist will not be changed. - /// @param[in] remote_app_id The ID of the remote application - /// @param[in] remote_port The name of the remote message port - /// @param[out] exist If @c true, the message port of the remote application exists; - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGE_PORT_ERROR_NONE Successful - /// @retval #MESSAGE_PORT_ERROR_INVALID_PARAMETER The specified @a remote_app_id or @a remote_port is @c NULL - /// @retval #MESSAGE_PORT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGE_PORT_ERROR_CERTIFICATE_NOT_MATCH The remote application is not signed with the same certificate - /// @retval #MESSAGE_PORT_ERROR_IO_ERROR Internal I/O error - int message_port_check_trusted_remote_port( - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - ffi.Pointer exist, - ) { - return _message_port_check_trusted_remote_port( - remote_app_id, - remote_port, - exist, - ); - } - - late final _message_port_check_trusted_remote_portPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>( - 'message_port_check_trusted_remote_port'); - late final _message_port_check_trusted_remote_port = - _message_port_check_trusted_remote_portPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Sends a message to the message port of a remote application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks @a message must be released with bundle_free() after sending the message. - /// @param[in] remote_app_id The ID of the remote application - /// @param[in] remote_port The name of the remote message port - /// @param[in] message The message to be passed to the remote application, the recommended message size is under 4KB - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGE_PORT_ERROR_NONE Successful - /// @retval #MESSAGE_PORT_ERROR_INVALID_PARAMETER The specified @a remote_app_id, @a remote_port or @a message is NULL - /// @retval #MESSAGE_PORT_ERROR_PORT_NOT_FOUND The message port of the remote application cannot be found - /// @retval #MESSAGE_PORT_ERROR_MAX_EXCEEDED The size of message has exceeded the maximum limit - /// @retval #MESSAGE_PORT_ERROR_RESOURCE_UNAVAILABLE Resource temporarily unavailable - /// @retval #MESSAGE_PORT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGE_PORT_ERROR_IO_ERROR Internal I/O error - /// @post It invokes message_port_message_cb() on the remote application. - /// @see message_port_message_cb() - /// @see message_port_register_local_port() - /// @see message_port_unregister_local_port() - /// - /// @code - /// #include - /// bundle *b = bundle_create(); - /// bundle_add(b, "key1", "value1"); - /// bundle_add(b, "key2", "value2"); - /// int ret = message_port_send_message("0123456789.BasicApp", "BasicAppPort", b); - /// bundle_free(b); - /// @endcode - int message_port_send_message( - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - ffi.Pointer message, - ) { - return _message_port_send_message( - remote_app_id, - remote_port, - message, - ); - } - - late final _message_port_send_messagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('message_port_send_message'); - late final _message_port_send_message = - _message_port_send_messagePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Sends a trusted message to the message port of a remote application. - /// @details This method allows communication only if the applications are signed with the same certificate, which is uniquely assigned to the developer. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a message using bundle_free() after sending the message. - /// @param[in] remote_app_id The ID of the remote application - /// @param[in] remote_port The name of the remote message port - /// @param[in] message The message to be passed to the remote application, the recommended message size is under 4KB - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGE_PORT_ERROR_NONE Successful - /// @retval #MESSAGE_PORT_ERROR_INVALID_PARAMETER The specified @a remote_app_id, @a remote_port or @a message is @c NULL - /// @retval #MESSAGE_PORT_ERROR_PORT_NOT_FOUND The message port of the remote application cannot be found - /// @retval #MESSAGE_PORT_ERROR_CERTIFICATE_NOT_MATCH The remote application is not signed with the same certificate - /// @retval #MESSAGE_PORT_ERROR_MAX_EXCEEDED The size of the message has exceeded the maximum limit - /// @retval #MESSAGE_PORT_ERROR_RESOURCE_UNAVAILABLE Resource is temporarily unavailable - /// @retval #MESSAGE_PORT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGE_PORT_ERROR_IO_ERROR Internal I/O error - /// @post It invokes message_port_trusted_message_cb() on the remote application. - /// @see message_port_trusted_message_cb() - /// @see message_port_register_trusted_local_port() - /// @see message_port_unregister_trusted_local_port() - int message_port_send_trusted_message( - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - ffi.Pointer message, - ) { - return _message_port_send_trusted_message( - remote_app_id, - remote_port, - message, - ); - } - - late final _message_port_send_trusted_messagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('message_port_send_trusted_message'); - late final _message_port_send_trusted_message = - _message_port_send_trusted_messagePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Sends a message with local port information to the message port of a remote application. - /// @details This method is used for bidirectional communication. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a message using bundle_free() after sending the message. - /// @param[in] remote_app_id The ID of the remote application - /// @param[in] remote_port The name of the remote message port - /// @param[in] message The message to be passed to the remote application, the recommended message size is under 4KB - /// @param[in] local_port_id The message port ID returned by message_port_register_local_port() or message_port_register_trusted_local_port() - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGE_PORT_ERROR_NONE Successful - /// @retval #MESSAGE_PORT_ERROR_INVALID_PARAMETER The specified @a remote_app_id, @a remote_port or @a message is @c NULL and - /// The specified @a local_port_id is not positive - /// @retval #MESSAGE_PORT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGE_PORT_ERROR_PORT_NOT_FOUND The port of the local or remote application cannot be found - /// @retval #MESSAGE_PORT_ERROR_MAX_EXCEEDED The size of the message has exceeded the maximum limit - /// @retval #MESSAGE_PORT_ERROR_IO_ERROR Internal I/O error - /// @post It invokes message_port_message_cb() on the remote application. - /// @see message_port_message_cb() - /// @see message_port_register_local_port() - /// @see message_port_unregister_local_port() - /// - /// @code - /// #include - /// - /// static void message_port_receive_cb(int local_port_id, const char *remote_app_id, const char *remote_port, bundle *message) {} - /// - /// int - /// main(int argc, char *argv[]) - /// { - /// bundle *b = bundle_create(); - /// bundle_add(b, "key1", "value1"); - /// bundle_add(b, "key2", "value2"); - /// - /// int local_port_id = message_port_register_local_port("HelloPort", message_port_receive_cb); - /// - /// int ret = message_port_send_message_with_local_port("0123456789.BasicApp", "BasicAppPort", b, local_port_id); - /// - /// bundle_free(b); - /// } - /// @endcode - int message_port_send_message_with_local_port( - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - ffi.Pointer message, - int local_port_id, - ) { - return _message_port_send_message_with_local_port( - remote_app_id, - remote_port, - message, - local_port_id, - ); - } - - late final _message_port_send_message_with_local_portPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int)>>('message_port_send_message_with_local_port'); - late final _message_port_send_message_with_local_port = - _message_port_send_message_with_local_portPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - /// @brief Sends a trusted message with local port information to the message port of a remote application. - /// @details This method is used for bidirectional communication. @n - /// It allows communications only if the applications are signed with the same certificate, which is uniquely assigned to the developer. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You muse release @a message using bundle_free() after sending the message. - /// @param[in] remote_app_id The ID of the remote application - /// @param[in] remote_port The name of the remote message port - /// @param[in] message The message to be passed to the remote application, the recommended message size is under 4KB - /// @param[in] local_port_id The message port ID returned by message_port_register_local_port() or message_port_register_trusted_local_port() - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGE_PORT_ERROR_NONE Successful - /// @retval #MESSAGE_PORT_ERROR_INVALID_PARAMETER The specified @a remote_app_id, @a remote_port or @a message is @c NULL and - /// specified @a local_port_id is not positive - /// @retval #MESSAGE_PORT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGE_PORT_ERROR_PORT_NOT_FOUND The port of the local or remote application cannot be found - /// @retval #MESSAGE_PORT_ERROR_CERTIFICATE_NOT_MATCH The remote application is not signed with the same certificate - /// @retval #MESSAGE_PORT_ERROR_MAX_EXCEEDED The size of the message has exceeded the maximum limit - /// @retval #MESSAGE_PORT_ERROR_IO_ERROR Internal I/O error - /// @post It invokes message_port_trusted_message_cb() on the remote application. - /// @see message_port_trusted_message_cb() - /// @see message_port_register_trusted_local_port() - /// @see message_port_unregister_trusted_local_port() - int message_port_send_trusted_message_with_local_port( - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - ffi.Pointer message, - int local_port_id, - ) { - return _message_port_send_trusted_message_with_local_port( - remote_app_id, - remote_port, - message, - local_port_id, - ); - } - - late final _message_port_send_trusted_message_with_local_portPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int)>>('message_port_send_trusted_message_with_local_port'); - late final _message_port_send_trusted_message_with_local_port = - _message_port_send_trusted_message_with_local_portPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - /// @brief Adds a callback called when a remote port is registered. - /// @details When remote port is registered, @a registered_cb function is called. - /// Each added callback has its own separate watcher. - /// @since_tizen 4.0 - /// @remarks The specified callback is called only in the main thread. - /// @param[in] remote_app_id The ID of the remote application - /// @param[in] remote_port The name of the remote message port - /// @param[in] trusted_remote_port Indicates whether remote port is trusted - /// @param[in] registered_cb The callback function to be called - /// when remote port is registered - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] watcher_id The ID of the watcher which is monitoring the remote port - /// registration events - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGE_PORT_ERROR_INVALID_PARAMETER The specified @a remote_app_id or @a remote_port - /// or @a registered_cb is NULL - /// @retval #MESSAGE_PORT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGE_PORT_ERROR_IO_ERROR Internal I/O error - /// @see message_port_registration_event_cb() - /// @see message_port_add_unregistered_cb() - /// @see message_port_remove_registration_event_cb() - int message_port_add_registered_cb( - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - bool trusted_remote_port, - message_port_registration_event_cb registered_cb, - ffi.Pointer user_data, - ffi.Pointer watcher_id, - ) { - return _message_port_add_registered_cb( - remote_app_id, - remote_port, - trusted_remote_port, - registered_cb, - user_data, - watcher_id, - ); - } - - late final _message_port_add_registered_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - message_port_registration_event_cb, - ffi.Pointer, - ffi.Pointer)>>('message_port_add_registered_cb'); - late final _message_port_add_registered_cb = - _message_port_add_registered_cbPtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - bool, - message_port_registration_event_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Adds a callback called when a remote port is unregistered. - /// @details When the remote port is unregistered, @a unregistered_cb function is called. - /// Each added callback has its own separate watcher. - /// @remarks The specified callback is called only in the main thread. - /// @since_tizen 4.0 - /// @param[in] remote_app_id The ID of the remote application - /// @param[in] remote_port The name of the remote message port - /// @param[in] trusted_remote_port Indicates whether remote port is trusted - /// @param[in] unregistered_cb The callback function to be called - /// when remote port is unregistered - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] watcher_id The ID of the watcher which is monitoring the remote port - /// unregistration events - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGE_PORT_ERROR_INVALID_PARAMETER The specified @a remote_app_id or @a remote_port - /// or @a unregistered_cb is NULL - /// @retval #MESSAGE_PORT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGE_PORT_ERROR_IO_ERROR Internal I/O error - /// @see message_port_registration_event_cb() - /// @see message_port_add_registered_cb() - /// @see message_port_remove_registration_event_cb() - int message_port_add_unregistered_cb( - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - bool trusted_remote_port, - message_port_registration_event_cb unregistered_cb, - ffi.Pointer user_data, - ffi.Pointer watcher_id, - ) { - return _message_port_add_unregistered_cb( - remote_app_id, - remote_port, - trusted_remote_port, - unregistered_cb, - user_data, - watcher_id, - ); - } - - late final _message_port_add_unregistered_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - message_port_registration_event_cb, - ffi.Pointer, - ffi.Pointer)>>('message_port_add_unregistered_cb'); - late final _message_port_add_unregistered_cb = - _message_port_add_unregistered_cbPtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - bool, - message_port_registration_event_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Removes the registration/unregistration callback associated with the given watcher. - /// @since_tizen 4.0 - /// @param[in] watcher_id The ID of watcher which is monitoring remote port - /// registration/unregistration events - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGE_PORT_ERROR_INVALID_PARAMETER The specified @a watcher_id is not correct - /// @retval #MESSAGE_PORT_ERROR_IO_ERROR Internal I/O error - /// @see message_port_registration_event_cb() - /// @see message_port_add_registered_cb() - /// @see message_port_add_unregistered_cb() - int message_port_remove_registration_event_cb( - int watcher_id, - ) { - return _message_port_remove_registration_event_cb( - watcher_id, - ); - } - - late final _message_port_remove_registration_event_cbPtr = - _lookup>( - 'message_port_remove_registration_event_cb'); - late final _message_port_remove_registration_event_cb = - _message_port_remove_registration_event_cbPtr - .asFunction(); - - /// @brief Retrieves all application IDs of each package. - /// @since_tizen 2.3 - /// @param[in] package_info The package info handle - /// @param[in] comp_type The application component type - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE No such package - /// @post This function invokes package_info_app_cb() repeatedly for each package. - /// @see package_info_app_cb() - int package_info_foreach_app_from_package( - package_info_h package_info, - int comp_type, - package_info_app_cb callback, - ffi.Pointer user_data, - ) { - return _package_info_foreach_app_from_package( - package_info, - comp_type, - callback, - user_data, - ); - } - - late final _package_info_foreach_app_from_packagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, ffi.Int32, package_info_app_cb, - ffi.Pointer)>>('package_info_foreach_app_from_package'); - late final _package_info_foreach_app_from_package = - _package_info_foreach_app_from_packagePtr.asFunction< - int Function(package_info_h, int, package_info_app_cb, - ffi.Pointer)>(); - - /// @brief Destroys the package information handle and releases all its resources. - /// @since_tizen 2.3 - /// @param[in] package_info The package information handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see package_manager_foreach_package_info() - /// @see package_manager_get_package_info() - int package_info_destroy( - package_info_h package_info, - ) { - return _package_info_destroy( - package_info, - ); - } - - late final _package_info_destroyPtr = - _lookup>( - 'package_info_destroy'); - late final _package_info_destroy = - _package_info_destroyPtr.asFunction(); - - /// @brief Gets the package name. - /// @since_tizen 2.3 - /// @remarks You must release @a package using free(). - /// @param[in] package_info The package information - /// @param[out] package The package name - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int package_info_get_package( - package_info_h package_info, - ffi.Pointer> package, - ) { - return _package_info_get_package( - package_info, - package, - ); - } - - late final _package_info_get_packagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, - ffi.Pointer>)>>('package_info_get_package'); - late final _package_info_get_package = - _package_info_get_packagePtr.asFunction< - int Function(package_info_h, ffi.Pointer>)>(); - - /// @brief Gets the main application ID of the package. - /// @since_tizen 4.0 - /// @remarks You must release @a main_app_id using free(). - /// @param[in] package_info The package information - /// @param[out] main_app_id The main application ID of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_info_get_main_app_id( - package_info_h package_info, - ffi.Pointer> main_app_id, - ) { - return _package_info_get_main_app_id( - package_info, - main_app_id, - ); - } - - late final _package_info_get_main_app_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_info_h, ffi.Pointer>)>>( - 'package_info_get_main_app_id'); - late final _package_info_get_main_app_id = - _package_info_get_main_app_idPtr.asFunction< - int Function(package_info_h, ffi.Pointer>)>(); - - /// @brief Gets the label of the package. - /// @since_tizen 2.3 - /// @remarks You must release @a label using free(). - /// @param[in] package_info The package information - /// @param[out] label The label of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_info_get_label( - package_info_h package_info, - ffi.Pointer> label, - ) { - return _package_info_get_label( - package_info, - label, - ); - } - - late final _package_info_get_labelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, - ffi.Pointer>)>>('package_info_get_label'); - late final _package_info_get_label = _package_info_get_labelPtr.asFunction< - int Function(package_info_h, ffi.Pointer>)>(); - - /// @brief Gets the absolute path to the icon image. - /// @since_tizen 2.3 - /// @remarks You must release @a path using free(). - /// @param[in] package_info The package information - /// @param[out] path The path of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_info_get_icon( - package_info_h package_info, - ffi.Pointer> path, - ) { - return _package_info_get_icon( - package_info, - path, - ); - } - - late final _package_info_get_iconPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, - ffi.Pointer>)>>('package_info_get_icon'); - late final _package_info_get_icon = _package_info_get_iconPtr.asFunction< - int Function(package_info_h, ffi.Pointer>)>(); - - /// @brief Gets the version of the package. - /// @since_tizen 2.3 - /// @remarks You must release @a version using free(). - /// @param[in] package_info The package information - /// @param[out] version The version of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_info_get_version( - package_info_h package_info, - ffi.Pointer> version, - ) { - return _package_info_get_version( - package_info, - version, - ); - } - - late final _package_info_get_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, - ffi.Pointer>)>>('package_info_get_version'); - late final _package_info_get_version = - _package_info_get_versionPtr.asFunction< - int Function(package_info_h, ffi.Pointer>)>(); - - /// @brief Gets the type of the package. - /// @since_tizen 2.3 - /// @remarks You must release @a type using free(). - /// @param[in] package_info The package information - /// @param[out] type The type of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_info_get_type( - package_info_h package_info, - ffi.Pointer> type, - ) { - return _package_info_get_type( - package_info, - type, - ); - } - - late final _package_info_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, - ffi.Pointer>)>>('package_info_get_type'); - late final _package_info_get_type = _package_info_get_typePtr.asFunction< - int Function(package_info_h, ffi.Pointer>)>(); - - /// @brief Gets the installed storage for the given package. - /// @since_tizen 2.3 - /// @param[in] package_info The package information - /// @param[out] storage The installed storage - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int package_info_get_installed_storage( - package_info_h package_info, - ffi.Pointer storage, - ) { - return _package_info_get_installed_storage( - package_info, - storage, - ); - } - - late final _package_info_get_installed_storagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, - ffi.Pointer)>>('package_info_get_installed_storage'); - late final _package_info_get_installed_storage = - _package_info_get_installed_storagePtr - .asFunction)>(); - - /// @brief Gets the root path of the package. - /// @since_tizen 2.3 - /// @remarks You must release @a path using free(). - /// @param[in] package_info The package information - /// @param[out] path The root path of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_info_get_root_path( - package_info_h package_info, - ffi.Pointer> path, - ) { - return _package_info_get_root_path( - package_info, - path, - ); - } - - late final _package_info_get_root_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_info_h, ffi.Pointer>)>>( - 'package_info_get_root_path'); - late final _package_info_get_root_path = - _package_info_get_root_pathPtr.asFunction< - int Function(package_info_h, ffi.Pointer>)>(); - - /// @platform - /// @brief Gets the name of the TEP(Tizen Expansion Package). - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @remarks Name must be released using free(). - /// @param[in] package_info The package information - /// @param[out] name The name of the tep - /// @return 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR Severe system error - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - int package_info_get_tep_name( - package_info_h package_info, - ffi.Pointer> name, - ) { - return _package_info_get_tep_name( - package_info, - name, - ); - } - - late final _package_info_get_tep_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_info_h, ffi.Pointer>)>>( - 'package_info_get_tep_name'); - late final _package_info_get_tep_name = - _package_info_get_tep_namePtr.asFunction< - int Function(package_info_h, ffi.Pointer>)>(); - - /// @brief Checks whether the package is system package. - /// @since_tizen 2.3 - /// @param[in] package_info The package information - /// @param[out] system @c true if the package is system package, - /// otherwise @c false if the package is not system package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_info_is_system_package( - package_info_h package_info, - ffi.Pointer system, - ) { - return _package_info_is_system_package( - package_info, - system, - ); - } - - late final _package_info_is_system_packagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, - ffi.Pointer)>>('package_info_is_system_package'); - late final _package_info_is_system_package = - _package_info_is_system_packagePtr - .asFunction)>(); - - /// @brief Checks whether the package is removable. - /// @since_tizen 2.3 - /// @param[in] package_info The package information - /// @param[out] removable The removable info of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR IO error - int package_info_is_removable_package( - package_info_h package_info, - ffi.Pointer removable, - ) { - return _package_info_is_removable_package( - package_info, - removable, - ); - } - - late final _package_info_is_removable_packagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, - ffi.Pointer)>>('package_info_is_removable_package'); - late final _package_info_is_removable_package = - _package_info_is_removable_packagePtr - .asFunction)>(); - - /// @brief Checks whether the package is preloaded. - /// @since_tizen 2.3 - /// @param[in] package_info The package information - /// @param[out] preload The preload info of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_info_is_preload_package( - package_info_h package_info, - ffi.Pointer preload, - ) { - return _package_info_is_preload_package( - package_info, - preload, - ); - } - - late final _package_info_is_preload_packagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, - ffi.Pointer)>>('package_info_is_preload_package'); - late final _package_info_is_preload_package = - _package_info_is_preload_packagePtr - .asFunction)>(); - - /// @brief Checks whether two package information is equal. - /// @since_tizen 2.3 - /// @param[in] lhs The first package information to be compared - /// @param[in] rhs The second package information to be compared - /// @param[out] equal @c true if the package information are equal, - /// otherwise @c false if package information are not equal - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Database error occurred - int package_info_is_equal( - package_info_h lhs, - package_info_h rhs, - ffi.Pointer equal, - ) { - return _package_info_is_equal( - lhs, - rhs, - equal, - ); - } - - late final _package_info_is_equalPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, package_info_h, - ffi.Pointer)>>('package_info_is_equal'); - late final _package_info_is_equal = _package_info_is_equalPtr.asFunction< - int Function(package_info_h, package_info_h, ffi.Pointer)>(); - - /// @brief Checks whether the package info is accessible for the given package. - /// @since_tizen 2.3 - /// @param[in] package_info The package information - /// @param[out] accessible @c true if the package info is accessible, - /// otherwise @c false if the package info is not accessible - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int package_info_is_accessible( - package_info_h package_info, - ffi.Pointer accessible, - ) { - return _package_info_is_accessible( - package_info, - accessible, - ); - } - - late final _package_info_is_accessiblePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, - ffi.Pointer)>>('package_info_is_accessible'); - late final _package_info_is_accessible = _package_info_is_accessiblePtr - .asFunction)>(); - - /// @brief Gets the installed time for the given package. - /// @details If the package was updated, the @a installed_time represents updated time. - /// So, the meaning of 'installed time' corresponds with 'last modified time'. - /// @since_tizen 4.0 - /// @param[in] package_info The package information - /// @param[out] installed_time The integer value of time_t type for installed time - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Database error occurred - int package_info_get_installed_time( - package_info_h package_info, - ffi.Pointer installed_time, - ) { - return _package_info_get_installed_time( - package_info, - installed_time, - ); - } - - late final _package_info_get_installed_timePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, - ffi.Pointer)>>('package_info_get_installed_time'); - late final _package_info_get_installed_time = - _package_info_get_installed_timePtr - .asFunction)>(); - - /// @brief Clones the package information handle. - /// @since_tizen 2.3 - /// @param[out] clone The newly created package information handle - /// @param[in] package_info The package information - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE The package is not installed - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int package_info_clone( - ffi.Pointer clone, - package_info_h package_info, - ) { - return _package_info_clone( - clone, - package_info, - ); - } - - late final _package_info_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - package_info_h)>>('package_info_clone'); - late final _package_info_clone = _package_info_clonePtr - .asFunction, package_info_h)>(); - - /// @brief Gets the package information for the given package - /// @since_tizen 2.3 - /// @remarks You must release @a package_info using package_info_destroy(). - /// @param[in] package The ID of the package - /// @param[out] package_info The package information for the given package ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE The package is not installed - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int package_info_create( - ffi.Pointer package, - ffi.Pointer package_info, - ) { - return _package_info_create( - package, - package_info, - ); - } - - late final _package_info_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('package_info_create'); - late final _package_info_create = _package_info_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Retrieves certification information of the package. - /// @since_tizen 2.3 - /// @param[in] package_info The package information - /// @param[in] callback The iteration callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_info_foreach_cert_info( - package_info_h package_info, - package_info_cert_info_cb callback, - ffi.Pointer user_data, - ) { - return _package_info_foreach_cert_info( - package_info, - callback, - user_data, - ); - } - - late final _package_info_foreach_cert_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, package_info_cert_info_cb, - ffi.Pointer)>>('package_info_foreach_cert_info'); - late final _package_info_foreach_cert_info = - _package_info_foreach_cert_infoPtr.asFunction< - int Function(package_info_h, package_info_cert_info_cb, - ffi.Pointer)>(); - - /// @brief Retrieves privilege information of the package. - /// @since_tizen 2.3 - /// @param[in] package_info The package information - /// @param[in] callback The iteration callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_info_foreach_privilege_info( - package_info_h package_info, - package_info_privilege_info_cb callback, - ffi.Pointer user_data, - ) { - return _package_info_foreach_privilege_info( - package_info, - callback, - user_data, - ); - } - - late final _package_info_foreach_privilege_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, package_info_privilege_info_cb, - ffi.Pointer)>>('package_info_foreach_privilege_info'); - late final _package_info_foreach_privilege_info = - _package_info_foreach_privilege_infoPtr.asFunction< - int Function(package_info_h, package_info_privilege_info_cb, - ffi.Pointer)>(); - - /// @brief Gets the package update information for the given package. - /// @since_tizen 4.0 - /// @remarks You must release @a info using package_info_updateinfo_destroy(). - /// @param[in] pkgid The ID of the package - /// @param[out] info The package update information for the given package ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE The package is not installed - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Database error occurred - /// @see package_info_updateinfo_destroy() - int package_info_updateinfo_create( - ffi.Pointer pkgid, - ffi.Pointer info, - ) { - return _package_info_updateinfo_create( - pkgid, - info, - ); - } - - late final _package_info_updateinfo_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>( - 'package_info_updateinfo_create'); - late final _package_info_updateinfo_create = - _package_info_updateinfo_createPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the package name. - /// @since_tizen 4.0 - /// @remarks You must release @a package using free(). - /// @param[in] info The package update information - /// @param[out] package The package name - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Internal I/O error occured - int package_info_updateinfo_get_pkgid( - package_updateinfo_h info, - ffi.Pointer> package, - ) { - return _package_info_updateinfo_get_pkgid( - info, - package, - ); - } - - late final _package_info_updateinfo_get_pkgidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_updateinfo_h, ffi.Pointer>)>>( - 'package_info_updateinfo_get_pkgid'); - late final _package_info_updateinfo_get_pkgid = - _package_info_updateinfo_get_pkgidPtr.asFunction< - int Function( - package_updateinfo_h, ffi.Pointer>)>(); - - /// @brief Gets the update version of package. - /// @since_tizen 4.0 - /// @remarks You must release @a version using free(). - /// @param[in] info The package update information - /// @param[out] version The package update version - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Internal I/O error occured - int package_info_updateinfo_get_version( - package_updateinfo_h info, - ffi.Pointer> version, - ) { - return _package_info_updateinfo_get_version( - info, - version, - ); - } - - late final _package_info_updateinfo_get_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_updateinfo_h, ffi.Pointer>)>>( - 'package_info_updateinfo_get_version'); - late final _package_info_updateinfo_get_version = - _package_info_updateinfo_get_versionPtr.asFunction< - int Function( - package_updateinfo_h, ffi.Pointer>)>(); - - /// @brief Gets the update type of package. - /// @since_tizen 4.0 - /// @param[in] info The package update information - /// @param[out] type The package update type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Internal I/O error occured - int package_info_updateinfo_get_type( - package_updateinfo_h info, - ffi.Pointer type, - ) { - return _package_info_updateinfo_get_type( - info, - type, - ); - } - - late final _package_info_updateinfo_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_updateinfo_h, - ffi.Pointer)>>('package_info_updateinfo_get_type'); - late final _package_info_updateinfo_get_type = - _package_info_updateinfo_get_typePtr.asFunction< - int Function(package_updateinfo_h, ffi.Pointer)>(); - - /// @brief Destroys the package update information handle and releases all its resources. - /// @since_tizen 4.0 - /// @param[in] info The package update information handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see package_info_updateinfo_create() - int package_info_updateinfo_destroy( - package_updateinfo_h info, - ) { - return _package_info_updateinfo_destroy( - info, - ); - } - - late final _package_info_updateinfo_destroyPtr = - _lookup>( - 'package_info_updateinfo_destroy'); - late final _package_info_updateinfo_destroy = - _package_info_updateinfo_destroyPtr - .asFunction(); - - /// @brief Retrieve update information of all packages and invoke callback for each of it. - /// @since_tizen 4.0 - /// @param[in] callback The iteration callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_info_updateinfo_foreach_info( - package_info_updateinfo_cb callback, - ffi.Pointer user_data, - ) { - return _package_info_updateinfo_foreach_info( - callback, - user_data, - ); - } - - late final _package_info_updateinfo_foreach_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_updateinfo_cb, - ffi.Pointer)>>('package_info_updateinfo_foreach_info'); - late final _package_info_updateinfo_foreach_info = - _package_info_updateinfo_foreach_infoPtr.asFunction< - int Function(package_info_updateinfo_cb, ffi.Pointer)>(); - - /// @brief Creates a package manager handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.info - /// @remarks You must release @a manager using package_manager_destroy(). - /// @param[out] manager The package manager handle that is newly created on success - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Internal I/O error - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @see package_manager_destroy() - int package_manager_create( - ffi.Pointer manager, - ) { - return _package_manager_create( - manager, - ); - } - - late final _package_manager_createPtr = _lookup< - ffi.NativeFunction)>>( - 'package_manager_create'); - late final _package_manager_create = _package_manager_createPtr - .asFunction)>(); - - /// @brief Destroys the package manager handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] manager The package manager handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see package_manager_create() - int package_manager_destroy( - package_manager_h manager, - ) { - return _package_manager_destroy( - manager, - ); - } - - late final _package_manager_destroyPtr = - _lookup>( - 'package_manager_destroy'); - late final _package_manager_destroy = - _package_manager_destroyPtr.asFunction(); - - /// @brief Sets the event status of the package when the package is installed, uninstalled, or updated. - /// @details You can combine multiple status using OR operation which you want to listen. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param [in] manager The package manager handle - /// @param [in] status_type The status of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Internal I/O error - /// @see package_manager_status_type_e - /// @see package_manager_set_event_cb() - int package_manager_set_event_status( - package_manager_h manager, - int status_type, - ) { - return _package_manager_set_event_status( - manager, - status_type, - ); - } - - late final _package_manager_set_event_statusPtr = - _lookup>( - 'package_manager_set_event_status'); - late final _package_manager_set_event_status = - _package_manager_set_event_statusPtr - .asFunction(); - - /// @brief Registers a callback function to be invoked when the package is installed, uninstalled, or updated. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.info - /// @param[in] manager The package manager handle - /// @param[in] callback The callback function to be registered - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @post package_manager_event_cb() will be invoked. - /// @see package_manager_set_event_status() - /// @see package_manager_event_cb() - /// @see package_manager_unset_event_cb() - int package_manager_set_event_cb( - package_manager_h manager, - package_manager_event_cb callback, - ffi.Pointer user_data, - ) { - return _package_manager_set_event_cb( - manager, - callback, - user_data, - ); - } - - late final _package_manager_set_event_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_manager_h, package_manager_event_cb, - ffi.Pointer)>>('package_manager_set_event_cb'); - late final _package_manager_set_event_cb = - _package_manager_set_event_cbPtr.asFunction< - int Function(package_manager_h, package_manager_event_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] manager The package manager handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see package_manager_event_cb() - /// @see package_manager_set_event_cb() - int package_manager_unset_event_cb( - package_manager_h manager, - ) { - return _package_manager_unset_event_cb( - manager, - ); - } - - late final _package_manager_unset_event_cbPtr = - _lookup>( - 'package_manager_unset_event_cb'); - late final _package_manager_unset_event_cb = - _package_manager_unset_event_cbPtr - .asFunction(); - - /// @brief Retrieves all package information of installed packages. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.info - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @post This function invokes package_manager_package_info_cb() repeatedly for each package information. - /// @see package_manager_package_info_cb() - int package_manager_foreach_package_info( - package_manager_package_info_cb callback, - ffi.Pointer user_data, - ) { - return _package_manager_foreach_package_info( - callback, - user_data, - ); - } - - late final _package_manager_foreach_package_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_manager_package_info_cb, - ffi.Pointer)>>('package_manager_foreach_package_info'); - late final _package_manager_foreach_package_info = - _package_manager_foreach_package_infoPtr.asFunction< - int Function( - package_manager_package_info_cb, ffi.Pointer)>(); - - /// @brief Gets the package ID for the given app ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.info - /// @param[in] app_id The ID of the application - /// @param[out] package_id The ID of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - int package_manager_get_package_id_by_app_id( - ffi.Pointer app_id, - ffi.Pointer> package_id, - ) { - return _package_manager_get_package_id_by_app_id( - app_id, - package_id, - ); - } - - late final _package_manager_get_package_id_by_app_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer>)>>( - 'package_manager_get_package_id_by_app_id'); - late final _package_manager_get_package_id_by_app_id = - _package_manager_get_package_id_by_app_idPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Gets the package information for the given package. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.info - /// @remarks You must release @a package_info using package_info_destroy(). - /// @param[in] package_id The ID of the package - /// @param[out] package_info The package information for the given package ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Database error occurred - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - int package_manager_get_package_info( - ffi.Pointer package_id, - ffi.Pointer package_info, - ) { - return _package_manager_get_package_info( - package_id, - package_info, - ); - } - - late final _package_manager_get_package_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>( - 'package_manager_get_package_info'); - late final _package_manager_get_package_info = - _package_manager_get_package_infoPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Compares whether two package certifications are matched. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] lhs_package_id The first package ID to compare - /// @param[in] rhs_package_id The second package ID to compare - /// @param[out] compare_result @c 0 if the certification information are matched, - /// otherwise the compared result - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Database error occurred - int package_manager_compare_package_cert_info( - ffi.Pointer lhs_package_id, - ffi.Pointer rhs_package_id, - ffi.Pointer compare_result, - ) { - return _package_manager_compare_package_cert_info( - lhs_package_id, - rhs_package_id, - compare_result, - ); - } - - late final _package_manager_compare_package_cert_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>( - 'package_manager_compare_package_cert_info'); - late final _package_manager_compare_package_cert_info = - _package_manager_compare_package_cert_infoPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Compares whether two app certifications are matched. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] lhs_app_id The first app ID to compare - /// @param[in] rhs_app_id The second app ID to compare - /// @param[out] compare_result @c 0 if the certification information are matched, - /// otherwise the compared result - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Database error occurred - int package_manager_compare_app_cert_info( - ffi.Pointer lhs_app_id, - ffi.Pointer rhs_app_id, - ffi.Pointer compare_result, - ) { - return _package_manager_compare_app_cert_info( - lhs_app_id, - rhs_app_id, - compare_result, - ); - } - - late final _package_manager_compare_app_cert_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>( - 'package_manager_compare_app_cert_info'); - late final _package_manager_compare_app_cert_info = - _package_manager_compare_app_cert_infoPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Checks whether the package is preloaded by @a app_id. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.info - /// @param[in] app_id The ID of the application - /// @param[out] preload The preload info of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - int package_manager_is_preload_package_by_app_id( - ffi.Pointer app_id, - ffi.Pointer preload, - ) { - return _package_manager_is_preload_package_by_app_id( - app_id, - preload, - ); - } - - late final _package_manager_is_preload_package_by_app_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>>( - 'package_manager_is_preload_package_by_app_id'); - late final _package_manager_is_preload_package_by_app_id = - _package_manager_is_preload_package_by_app_idPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the package permission type by @a app_id. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.info - /// @param[in] app_id The ID of the application - /// @param[out] permission_type The package permission type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - int package_manager_get_permission_type( - ffi.Pointer app_id, - ffi.Pointer permission_type, - ) { - return _package_manager_get_permission_type( - app_id, - permission_type, - ); - } - - late final _package_manager_get_permission_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('package_manager_get_permission_type'); - late final _package_manager_get_permission_type = - _package_manager_get_permission_typePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Clears the application's internal and external cache directory, asynchronously. - /// @details All files stored in the cache directory of the application specified with the package ID are removed. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.clearcache - /// @param[in] package_id The package ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE No such package - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR Severe system error - int package_manager_clear_cache_dir( - ffi.Pointer package_id, - ) { - return _package_manager_clear_cache_dir( - package_id, - ); - } - - late final _package_manager_clear_cache_dirPtr = - _lookup)>>( - 'package_manager_clear_cache_dir'); - late final _package_manager_clear_cache_dir = - _package_manager_clear_cache_dirPtr - .asFunction)>(); - - /// @platform - /// @brief Clears all applications' internal and external cache directory, asynchronously. - /// @details All files stored in the cache directory of each application are removed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE No such package - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR Severe system error - int package_manager_clear_all_cache_dir() { - return _package_manager_clear_all_cache_dir(); - } - - late final _package_manager_clear_all_cache_dirPtr = - _lookup>( - 'package_manager_clear_all_cache_dir'); - late final _package_manager_clear_all_cache_dir = - _package_manager_clear_all_cache_dirPtr.asFunction(); - - /// @platform - /// @brief Clears internal and external data directories used by applications in the given package. - /// @details All files stored in data directories used by applications in the package specified with the @a package_id are removed. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @param[in] package_id The package ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE No such package - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR Severe system error - int package_manager_clear_data_dir( - ffi.Pointer package_id, - ) { - return _package_manager_clear_data_dir( - package_id, - ); - } - - late final _package_manager_clear_data_dirPtr = - _lookup)>>( - 'package_manager_clear_data_dir'); - late final _package_manager_clear_data_dir = - _package_manager_clear_data_dirPtr - .asFunction)>(); - - /// @brief Gets the package size information, asynchronously. - /// @details The package size info is asynchronously obtained by the callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.info - /// @param[in] package_id The package ID - /// @param[in] callback The asynchronous callback function to get the package size information - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE No such package - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR Severe system error - int package_manager_get_package_size_info( - ffi.Pointer package_id, - package_manager_size_info_receive_cb callback, - ffi.Pointer user_data, - ) { - return _package_manager_get_package_size_info( - package_id, - callback, - user_data, - ); - } - - late final _package_manager_get_package_size_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - package_manager_size_info_receive_cb, - ffi.Pointer)>>('package_manager_get_package_size_info'); - late final _package_manager_get_package_size_info = - _package_manager_get_package_size_infoPtr.asFunction< - int Function(ffi.Pointer, - package_manager_size_info_receive_cb, ffi.Pointer)>(); - - /// @platform - /// @brief Gets the total package size information, asynchronously. - /// @details The total package size info is asynchronously obtained by the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.info - /// @param[in] callback The asynchronous callback function to get the total package size information - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE No such package - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR Severe system error - int package_manager_get_total_package_size_info( - package_manager_total_size_info_receive_cb callback, - ffi.Pointer user_data, - ) { - return _package_manager_get_total_package_size_info( - callback, - user_data, - ); - } - - late final _package_manager_get_total_package_size_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_manager_total_size_info_receive_cb, - ffi.Pointer)>>( - 'package_manager_get_total_package_size_info'); - late final _package_manager_get_total_package_size_info = - _package_manager_get_total_package_size_infoPtr.asFunction< - int Function(package_manager_total_size_info_receive_cb, - ffi.Pointer)>(); - - /// @brief Creates the package information filter handle from db. - /// @details The filtered result will be based on AND operation of all added filter properties. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.info - /// @param[out] handle Pointer to the package info filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @post package_manager_filter_destroy() - /// @see package_manager_filter_add_bool() - /// @see package_manager_filter_foreach_pkginfo() - int package_manager_filter_create( - ffi.Pointer handle, - ) { - return _package_manager_filter_create( - handle, - ); - } - - late final _package_manager_filter_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'package_manager_filter_create'); - late final _package_manager_filter_create = _package_manager_filter_createPtr - .asFunction)>(); - - /// @brief This API destroys the package information filter handle freeing up all the resources - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] handle Pointer to the package info filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @pre package_manager_filter_create() - /// @see package_manager_filter_count() - /// @see package_manager_filter_foreach_package_info() - int package_manager_filter_destroy( - package_manager_filter_h handle, - ) { - return _package_manager_filter_destroy( - handle, - ); - } - - late final _package_manager_filter_destroyPtr = - _lookup>( - 'package_manager_filter_destroy'); - late final _package_manager_filter_destroy = - _package_manager_filter_destroyPtr - .asFunction(); - - /// @brief This API adds a boolean filter property to the filter handle - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] handle Pointer to the package info filter handle - /// @param[in] property boolean property name - /// @param[in] value value corresponding to the property - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @pre package_manager_filter_create() - /// @post package_manager_filter_destroy() - /// @see package_manager_filter_count() - /// @see package_manager_filter_foreach_package_info() - int package_manager_filter_add_bool( - package_manager_filter_h handle, - ffi.Pointer property, - bool value, - ) { - return _package_manager_filter_add_bool( - handle, - property, - value, - ); - } - - late final _package_manager_filter_add_boolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_manager_filter_h, ffi.Pointer, - ffi.Bool)>>('package_manager_filter_add_bool'); - late final _package_manager_filter_add_bool = - _package_manager_filter_add_boolPtr.asFunction< - int Function( - package_manager_filter_h, ffi.Pointer, bool)>(); - - /// @brief This API counts the package that satisfy the filter conditions - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.info - /// @param[in] handle Pointer to the package info filter handle - /// @param[out] count Pointer to store the count value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @pre package_manager_filter_create() - /// @post package_manager_filter_destroy() - /// @see package_manager_filter_foreach_package_info() - int package_manager_filter_count( - package_manager_filter_h handle, - ffi.Pointer count, - ) { - return _package_manager_filter_count( - handle, - count, - ); - } - - late final _package_manager_filter_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_manager_filter_h, - ffi.Pointer)>>('package_manager_filter_count'); - late final _package_manager_filter_count = - _package_manager_filter_countPtr.asFunction< - int Function(package_manager_filter_h, ffi.Pointer)>(); - - /// @brief This API executes the user supplied callback function for each package that satisfy the filter conditions - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.info - /// @param[in] handle Pointer to the package info filter handle - /// @param[in] callback callback function - /// @param[in] user_data user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @pre package_manager_filter_create() - /// @post package_manager_filter_destroy() - /// @post This function invokes package_manager_package_info_cb() repeatedly for each package information. - /// @see package_manager_package_info_cb() - /// @see package_manager_filter_count() - int package_manager_filter_foreach_package_info( - package_manager_filter_h handle, - package_manager_package_info_cb callback, - ffi.Pointer user_data, - ) { - return _package_manager_filter_foreach_package_info( - handle, - callback, - user_data, - ); - } - - late final _package_manager_filter_foreach_package_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_manager_filter_h, - package_manager_package_info_cb, ffi.Pointer)>>( - 'package_manager_filter_foreach_package_info'); - late final _package_manager_filter_foreach_package_info = - _package_manager_filter_foreach_package_infoPtr.asFunction< - int Function(package_manager_filter_h, - package_manager_package_info_cb, ffi.Pointer)>(); - - /// @platform - /// @brief Generates request for getting License, asynchronously. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @remarks You must release @a req_data and @a license_url by yourself. - /// @param[in] resp_data The response data string of the purchase request - /// @param[out] req_data License request data - /// @param[out] license_url License acquisition url data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Internal I/O error - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @post package_manager_drm_register_license - int package_manager_drm_generate_license_request( - ffi.Pointer resp_data, - ffi.Pointer> req_data, - ffi.Pointer> license_url, - ) { - return _package_manager_drm_generate_license_request( - resp_data, - req_data, - license_url, - ); - } - - late final _package_manager_drm_generate_license_requestPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>>( - 'package_manager_drm_generate_license_request'); - late final _package_manager_drm_generate_license_request = - _package_manager_drm_generate_license_requestPtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>(); - - /// @platform - /// @brief Registers encrypted license, asynchronously. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @param[in] resp_data The response data string of the rights request - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Internal I/O error - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @pre package_manager_drm_generate_license_request - int package_manager_drm_register_license( - ffi.Pointer resp_data, - ) { - return _package_manager_drm_register_license( - resp_data, - ); - } - - late final _package_manager_drm_register_licensePtr = - _lookup)>>( - 'package_manager_drm_register_license'); - late final _package_manager_drm_register_license = - _package_manager_drm_register_licensePtr - .asFunction)>(); - - /// @platform - /// @brief Decrypts contents which is encrypted, asynchronously. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @param[in] drm_file_path DRM file path - /// @param[in] decrypted_file_path Decrypted file path - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Internal I/O error - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - int package_manager_drm_decrypt_package( - ffi.Pointer drm_file_path, - ffi.Pointer decrypted_file_path, - ) { - return _package_manager_drm_decrypt_package( - drm_file_path, - decrypted_file_path, - ); - } - - late final _package_manager_drm_decrypt_packagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('package_manager_drm_decrypt_package'); - late final _package_manager_drm_decrypt_package = - _package_manager_drm_decrypt_packagePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Retrieves data size from given handle - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] handle Package size info handle - /// @param[out] data_size Data size will be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int package_size_info_get_data_size( - package_size_info_h handle, - ffi.Pointer data_size, - ) { - return _package_size_info_get_data_size( - handle, - data_size, - ); - } - - late final _package_size_info_get_data_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_size_info_h, - ffi.Pointer)>>('package_size_info_get_data_size'); - late final _package_size_info_get_data_size = - _package_size_info_get_data_sizePtr.asFunction< - int Function(package_size_info_h, ffi.Pointer)>(); - - /// @brief Retrieves cache size from given handle - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] handle Package size info handle - /// @param[out] cache_size Cache size will be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int package_size_info_get_cache_size( - package_size_info_h handle, - ffi.Pointer cache_size, - ) { - return _package_size_info_get_cache_size( - handle, - cache_size, - ); - } - - late final _package_size_info_get_cache_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_size_info_h, - ffi.Pointer)>>('package_size_info_get_cache_size'); - late final _package_size_info_get_cache_size = - _package_size_info_get_cache_sizePtr.asFunction< - int Function(package_size_info_h, ffi.Pointer)>(); - - /// @brief Retrieves application size from given handle - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] handle Package size info handle - /// @param[out] app_size App size will be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int package_size_info_get_app_size( - package_size_info_h handle, - ffi.Pointer app_size, - ) { - return _package_size_info_get_app_size( - handle, - app_size, - ); - } - - late final _package_size_info_get_app_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_size_info_h, - ffi.Pointer)>>('package_size_info_get_app_size'); - late final _package_size_info_get_app_size = - _package_size_info_get_app_sizePtr.asFunction< - int Function(package_size_info_h, ffi.Pointer)>(); - - /// @brief Retrieves external data size from given handle - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] handle Package size info handle - /// @param[out] ext_data_size External data size will be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int package_size_info_get_external_data_size( - package_size_info_h handle, - ffi.Pointer ext_data_size, - ) { - return _package_size_info_get_external_data_size( - handle, - ext_data_size, - ); - } - - late final _package_size_info_get_external_data_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_size_info_h, ffi.Pointer)>>( - 'package_size_info_get_external_data_size'); - late final _package_size_info_get_external_data_size = - _package_size_info_get_external_data_sizePtr.asFunction< - int Function(package_size_info_h, ffi.Pointer)>(); - - /// @brief Retrieves external cache size from given handle - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] handle Package size info handle - /// @param[out] ext_cache_size External cache size will be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int package_size_info_get_external_cache_size( - package_size_info_h handle, - ffi.Pointer ext_cache_size, - ) { - return _package_size_info_get_external_cache_size( - handle, - ext_cache_size, - ); - } - - late final _package_size_info_get_external_cache_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_size_info_h, ffi.Pointer)>>( - 'package_size_info_get_external_cache_size'); - late final _package_size_info_get_external_cache_size = - _package_size_info_get_external_cache_sizePtr.asFunction< - int Function(package_size_info_h, ffi.Pointer)>(); - - /// @brief Retrieves external application size from given handle - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] handle Package size info handle - /// @param[out] ext_app_size External app size will be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int package_size_info_get_external_app_size( - package_size_info_h handle, - ffi.Pointer ext_app_size, - ) { - return _package_size_info_get_external_app_size( - handle, - ext_app_size, - ); - } - - late final _package_size_info_get_external_app_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_size_info_h, ffi.Pointer)>>( - 'package_size_info_get_external_app_size'); - late final _package_size_info_get_external_app_size = - _package_size_info_get_external_app_sizePtr.asFunction< - int Function(package_size_info_h, ffi.Pointer)>(); - - /// @platform - /// @brief Creates a request handle to the package manager. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a request using package_manager_request_destroy(). - /// @param[out] request The request handle that is newly created on success - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Internal I/O error - /// @see package_manager_request_destroy() - int package_manager_request_create( - ffi.Pointer request, - ) { - return _package_manager_request_create( - request, - ); - } - - late final _package_manager_request_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'package_manager_request_create'); - late final _package_manager_request_create = - _package_manager_request_createPtr - .asFunction)>(); - - /// @platform - /// @brief Destroys the request handle to the package manager. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] request The request handle to the package manager - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see package_manager_request_create() - int package_manager_request_destroy( - package_manager_request_h request, - ) { - return _package_manager_request_destroy( - request, - ); - } - - late final _package_manager_request_destroyPtr = - _lookup>( - 'package_manager_request_destroy'); - late final _package_manager_request_destroy = - _package_manager_request_destroyPtr - .asFunction(); - - /// @platform - /// @brief Registers a callback function to be invoked when the progress of the request changes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.info - /// @param[in] request The request handle - /// @param[in] callback The callback function to be registered - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @post package_manager_request_event_cb() will be invoked. - /// @see package_manager_request_event_cb() - /// @see package_manager_request_unset_event_cb() - int package_manager_request_set_event_cb( - package_manager_request_h request, - package_manager_request_event_cb callback, - ffi.Pointer user_data, - ) { - return _package_manager_request_set_event_cb( - request, - callback, - user_data, - ); - } - - late final _package_manager_request_set_event_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_manager_request_h, - package_manager_request_event_cb, - ffi.Pointer)>>('package_manager_request_set_event_cb'); - late final _package_manager_request_set_event_cb = - _package_manager_request_set_event_cbPtr.asFunction< - int Function(package_manager_request_h, - package_manager_request_event_cb, ffi.Pointer)>(); - - /// @platform - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] request The request handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see package_manager_request_event_cb() - /// @see package_manager_request_set_event_cb() - int package_manager_request_unset_event_cb( - package_manager_request_h request, - ) { - return _package_manager_request_unset_event_cb( - request, - ); - } - - late final _package_manager_request_unset_event_cbPtr = - _lookup>( - 'package_manager_request_unset_event_cb'); - late final _package_manager_request_unset_event_cb = - _package_manager_request_unset_event_cbPtr - .asFunction(); - - /// @platform - /// @brief Sets the type of the package to install, uninstall, or update. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] request The request handle - /// @param[in] type The type of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int package_manager_request_set_type( - package_manager_request_h request, - ffi.Pointer type, - ) { - return _package_manager_request_set_type( - request, - type, - ); - } - - late final _package_manager_request_set_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_manager_request_h, - ffi.Pointer)>>('package_manager_request_set_type'); - late final _package_manager_request_set_type = - _package_manager_request_set_typePtr.asFunction< - int Function(package_manager_request_h, ffi.Pointer)>(); - - /// @platform - /// @brief Sets the mode of the request. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] request The request handle - /// @param[in] mode The mode of the request - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int package_manager_request_set_mode( - package_manager_request_h request, - int mode, - ) { - return _package_manager_request_set_mode( - request, - mode, - ); - } - - late final _package_manager_request_set_modePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_manager_request_h, - ffi.Int32)>>('package_manager_request_set_mode'); - late final _package_manager_request_set_mode = - _package_manager_request_set_modePtr - .asFunction(); - - /// @platform - /// @brief Sets the path of TEP file to the request. The TEP file that is set will be installed when the package is installed. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @param[in] request The request handle - /// @param[in] tep_path The TEP path to set. If this is NULL on update, installed TEP will be removed. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR Severe system error - int package_manager_request_set_tep( - package_manager_request_h request, - ffi.Pointer tep_path, - ) { - return _package_manager_request_set_tep( - request, - tep_path, - ); - } - - late final _package_manager_request_set_tepPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_manager_request_h, - ffi.Pointer)>>('package_manager_request_set_tep'); - late final _package_manager_request_set_tep = - _package_manager_request_set_tepPtr.asFunction< - int Function(package_manager_request_h, ffi.Pointer)>(); - - /// @platform - /// @brief Installs the package located at the given path, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @param[in] request The request handle - /// @param[in] path The absolute path to the package to be installed - /// @param[out] id The ID of the request to the package manager - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @see package_manager_request_uninstall() - int package_manager_request_install( - package_manager_request_h request, - ffi.Pointer path, - ffi.Pointer id, - ) { - return _package_manager_request_install( - request, - path, - id, - ); - } - - late final _package_manager_request_installPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_manager_request_h, ffi.Pointer, - ffi.Pointer)>>('package_manager_request_install'); - late final _package_manager_request_install = - _package_manager_request_installPtr.asFunction< - int Function(package_manager_request_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @platform - /// @brief Installs the package located at the given path, asynchronously. - /// @details The progress of the request is asynchronously received by the callback function. - /// The @a callback is the individual callback only called for the current API call. - /// The @a callback is the only callback called, even if another callback was set for this request - /// with package_manager_request_set_event_cb(). - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @param[in] request The request handle - /// @param[in] path The absolute path to the package to be installed - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] id The ID of the request to the package manager - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - int package_manager_request_install_with_cb( - package_manager_request_h request, - ffi.Pointer path, - package_manager_request_event_cb callback, - ffi.Pointer user_data, - ffi.Pointer id, - ) { - return _package_manager_request_install_with_cb( - request, - path, - callback, - user_data, - id, - ); - } - - late final _package_manager_request_install_with_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_manager_request_h, - ffi.Pointer, - package_manager_request_event_cb, - ffi.Pointer, - ffi.Pointer)>>( - 'package_manager_request_install_with_cb'); - late final _package_manager_request_install_with_cb = - _package_manager_request_install_with_cbPtr.asFunction< - int Function( - package_manager_request_h, - ffi.Pointer, - package_manager_request_event_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @platform - /// @brief Uninstalls the package with the given name, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @param[in] request The request handle - /// @param[in] name The name of the package to be uninstalled - /// @param[out] id The ID of the request to the package manager - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - int package_manager_request_uninstall( - package_manager_request_h request, - ffi.Pointer name, - ffi.Pointer id, - ) { - return _package_manager_request_uninstall( - request, - name, - id, - ); - } - - late final _package_manager_request_uninstallPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_manager_request_h, ffi.Pointer, - ffi.Pointer)>>('package_manager_request_uninstall'); - late final _package_manager_request_uninstall = - _package_manager_request_uninstallPtr.asFunction< - int Function(package_manager_request_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @platform - /// @brief Uninstalls the package with the given name, asynchronously. - /// @details The progress of the request is asynchronously received by the callback function. - /// The @a callback is the individual callback only called for the current API call. - /// The @a callback is the only callback called, even if another callback was set for this request - /// with package_manager_request_set_event_cb(). - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @param[in] request The request handle - /// @param[in] name The name of the package to be uninstalled - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] id The ID of the request to the package manager - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - int package_manager_request_uninstall_with_cb( - package_manager_request_h request, - ffi.Pointer name, - package_manager_request_event_cb callback, - ffi.Pointer user_data, - ffi.Pointer id, - ) { - return _package_manager_request_uninstall_with_cb( - request, - name, - callback, - user_data, - id, - ); - } - - late final _package_manager_request_uninstall_with_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_manager_request_h, - ffi.Pointer, - package_manager_request_event_cb, - ffi.Pointer, - ffi.Pointer)>>( - 'package_manager_request_uninstall_with_cb'); - late final _package_manager_request_uninstall_with_cb = - _package_manager_request_uninstall_with_cbPtr.asFunction< - int Function( - package_manager_request_h, - ffi.Pointer, - package_manager_request_event_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @platform - /// @brief Moves the package from SD card to the internal memory and vice versa, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @param[in] request The request handle - /// @param[in] name The name of the package to be moved - /// @param[in] move_type The move type [enum package_manager_move_type_e], [external to internal/internal to external] - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - int package_manager_request_move( - package_manager_request_h request, - ffi.Pointer name, - int move_type, - ) { - return _package_manager_request_move( - request, - name, - move_type, - ); - } - - late final _package_manager_request_movePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_manager_request_h, ffi.Pointer, - ffi.Int32)>>('package_manager_request_move'); - late final _package_manager_request_move = - _package_manager_request_movePtr.asFunction< - int Function( - package_manager_request_h, ffi.Pointer, int)>(); - - /// @platform - /// @brief Moves the package from SD card to the internal memory and vice versa, asynchronously. - /// @details The progress of the request is asynchronously received by the callback function. - /// The @a callback is the individual callback only called for the current API call. - /// The @a callback is the only callback called, even if another callback was set for this request - /// with package_manager_request_set_event_cb(). - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @param[in] request The request handle - /// @param[in] name The name of the package to be moved - /// @param[in] move_type The move type [enum package_manager_move_type_e], [external to internal/internal to external] - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] id The ID of the request to the package manager - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - int package_manager_request_move_with_cb( - package_manager_request_h request, - ffi.Pointer name, - int move_type, - package_manager_request_event_cb callback, - ffi.Pointer user_data, - ffi.Pointer id, - ) { - return _package_manager_request_move_with_cb( - request, - name, - move_type, - callback, - user_data, - id, - ); - } - - late final _package_manager_request_move_with_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_manager_request_h, - ffi.Pointer, - ffi.Int32, - package_manager_request_event_cb, - ffi.Pointer, - ffi.Pointer)>>('package_manager_request_move_with_cb'); - late final _package_manager_request_move_with_cb = - _package_manager_request_move_with_cbPtr.asFunction< - int Function( - package_manager_request_h, - ffi.Pointer, - int, - package_manager_request_event_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @platform - /// @brief Creates a package update info request. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @remarks You must release @a pkg_updateinfo_req using package_manager_updateinfo_request_destroy(). - /// @param[out] pkg_updateinfo_req The package update info request handle that is newly created on success - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @see package_manager_updateinfo_request_destroy() - int package_manager_updateinfo_request_create( - ffi.Pointer pkg_updateinfo_req, - ) { - return _package_manager_updateinfo_request_create( - pkg_updateinfo_req, - ); - } - - late final _package_manager_updateinfo_request_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'package_manager_updateinfo_request_create'); - late final _package_manager_updateinfo_request_create = - _package_manager_updateinfo_request_createPtr.asFunction< - int Function(ffi.Pointer)>(); - - /// @brief Sets the package ID to the package update info request. - /// @since_tizen 4.0 - /// @param[in] pkg_updateinfo_req The update info request handle - /// @param[in] pkgid The package ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see package_manager_updateinfo_request_create() - int package_manager_updateinfo_set_pkgid( - package_updateinfo_request_h pkg_updateinfo_req, - ffi.Pointer pkgid, - ) { - return _package_manager_updateinfo_set_pkgid( - pkg_updateinfo_req, - pkgid, - ); - } - - late final _package_manager_updateinfo_set_pkgidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_updateinfo_request_h, - ffi.Pointer)>>('package_manager_updateinfo_set_pkgid'); - late final _package_manager_updateinfo_set_pkgid = - _package_manager_updateinfo_set_pkgidPtr.asFunction< - int Function(package_updateinfo_request_h, ffi.Pointer)>(); - - /// @brief Sets the package version to the package update info request. - /// @since_tizen 4.0 - /// @param[in] pkg_updateinfo_req The update info request handle - /// @param[in] version The package version - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see package_manager_updateinfo_request_create() - int package_manager_updateinfo_set_version( - package_updateinfo_request_h pkg_updateinfo_req, - ffi.Pointer version, - ) { - return _package_manager_updateinfo_set_version( - pkg_updateinfo_req, - version, - ); - } - - late final _package_manager_updateinfo_set_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_updateinfo_request_h, ffi.Pointer)>>( - 'package_manager_updateinfo_set_version'); - late final _package_manager_updateinfo_set_version = - _package_manager_updateinfo_set_versionPtr.asFunction< - int Function(package_updateinfo_request_h, ffi.Pointer)>(); - - /// @brief Sets the package update type to the package update info request. - /// @since_tizen 4.0 - /// @param[in] pkg_updateinfo_req The update info request handle - /// @param[in] type The package update type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see package_manager_updateinfo_request_create() - /// @see package_updateinfo_type_e - int package_manager_updateinfo_set_type( - package_updateinfo_request_h pkg_updateinfo_req, - int type, - ) { - return _package_manager_updateinfo_set_type( - pkg_updateinfo_req, - type, - ); - } - - late final _package_manager_updateinfo_set_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_updateinfo_request_h, - ffi.Int32)>>('package_manager_updateinfo_set_type'); - late final _package_manager_updateinfo_set_type = - _package_manager_updateinfo_set_typePtr - .asFunction(); - - /// @brief Request to register package update info in platform. - /// @since_tizen 4.0 - /// @param[in] pkg_updateinfo_req The update info request handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR Severe system error - /// @see package_manager_updateinfo_request_create() - /// @see package_manager_updateinfo_request_destroy() - int package_manager_updateinfo_request_register( - package_updateinfo_request_h pkg_updateinfo_req, - ) { - return _package_manager_updateinfo_request_register( - pkg_updateinfo_req, - ); - } - - late final _package_manager_updateinfo_request_registerPtr = _lookup< - ffi.NativeFunction>( - 'package_manager_updateinfo_request_register'); - late final _package_manager_updateinfo_request_register = - _package_manager_updateinfo_request_registerPtr - .asFunction(); - - /// @brief Destroys the package update info request. - /// @since_tizen 4.0 - /// @param[in] pkg_updateinfo_req The update info request handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see package_manager_updateinfo_request_create() - int package_manager_updateinfo_request_destroy( - package_updateinfo_request_h pkg_updateinfo_req, - ) { - return _package_manager_updateinfo_request_destroy( - pkg_updateinfo_req, - ); - } - - late final _package_manager_updateinfo_request_destroyPtr = _lookup< - ffi.NativeFunction>( - 'package_manager_updateinfo_request_destroy'); - late final _package_manager_updateinfo_request_destroy = - _package_manager_updateinfo_request_destroyPtr - .asFunction(); - - /// @brief Request to unregister update info in platform for given package id. - /// @since_tizen 4.0 - /// @param[in] pkg_updateinfo_req The update info request handle - /// @param[in] pkgid The package id to request unregister update info - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR Severe system error - int package_manager_updateinfo_request_unregister( - package_updateinfo_request_h pkg_updateinfo_req, - ffi.Pointer pkgid, - ) { - return _package_manager_updateinfo_request_unregister( - pkg_updateinfo_req, - pkgid, - ); - } - - late final _package_manager_updateinfo_request_unregisterPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_updateinfo_request_h, ffi.Pointer)>>( - 'package_manager_updateinfo_request_unregister'); - late final _package_manager_updateinfo_request_unregister = - _package_manager_updateinfo_request_unregisterPtr.asFunction< - int Function(package_updateinfo_request_h, ffi.Pointer)>(); - - /// @brief Request to unregister update info of all packages in platform. - /// @since_tizen 4.0 - /// @param[in] pkg_updateinfo_req The update info request handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR Severe system error - int package_manager_updateinfo_request_unregister_all( - package_updateinfo_request_h pkg_updateinfo_req, - ) { - return _package_manager_updateinfo_request_unregister_all( - pkg_updateinfo_req, - ); - } - - late final _package_manager_updateinfo_request_unregister_allPtr = _lookup< - ffi.NativeFunction>( - 'package_manager_updateinfo_request_unregister_all'); - late final _package_manager_updateinfo_request_unregister_all = - _package_manager_updateinfo_request_unregister_allPtr - .asFunction(); - - /// @brief Creates the package archive information for the given package. - /// @since_tizen 4.0 - /// @remarks If the given path is relevant to media storage, the privilege - /// http://tizen.org/privilege/mediastorage is needed. - /// @remarks If the given path is relevant to external storage, the privilege - /// http://tizen.org/privilege/externalstorage is needed. - /// @remarks You must release @a archive_info - /// using package_archive_info_destroy(). - /// @param[in] path The path of the package - /// @param[out] archive_info The package archive information for - /// the given package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Internal I/O error - /// @see package_archive_info_destroy() - int package_archive_info_create( - ffi.Pointer path, - ffi.Pointer archive_info, - ) { - return _package_archive_info_create( - path, - archive_info, - ); - } - - late final _package_archive_info_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>( - 'package_archive_info_create'); - late final _package_archive_info_create = - _package_archive_info_createPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys the package archive information handle. - /// @since_tizen 4.0 - /// @param[in] archive_info The package archive information handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see package_archive_info_create() - int package_archive_info_destroy( - package_archive_info_h archive_info, - ) { - return _package_archive_info_destroy( - archive_info, - ); - } - - late final _package_archive_info_destroyPtr = - _lookup>( - 'package_archive_info_destroy'); - late final _package_archive_info_destroy = _package_archive_info_destroyPtr - .asFunction(); - - /// @brief Gets the package name. - /// @since_tizen 4.0 - /// @remarks You must release @a package using free(). - /// @param[in] archive_info The package archive information - /// @param[out] package The package name - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int package_archive_info_get_package( - package_archive_info_h archive_info, - ffi.Pointer> package, - ) { - return _package_archive_info_get_package( - archive_info, - package, - ); - } - - late final _package_archive_info_get_packagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_archive_info_h, ffi.Pointer>)>>( - 'package_archive_info_get_package'); - late final _package_archive_info_get_package = - _package_archive_info_get_packagePtr.asFunction< - int Function( - package_archive_info_h, ffi.Pointer>)>(); - - /// @brief Gets the type of the package. - /// @since_tizen 4.0 - /// @remarks You must release @a type using free(). - /// @param[in] archive_info The package archive information - /// @param[out] type The type of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int package_archive_info_get_type( - package_archive_info_h archive_info, - ffi.Pointer> type, - ) { - return _package_archive_info_get_type( - archive_info, - type, - ); - } - - late final _package_archive_info_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_archive_info_h, ffi.Pointer>)>>( - 'package_archive_info_get_type'); - late final _package_archive_info_get_type = - _package_archive_info_get_typePtr.asFunction< - int Function( - package_archive_info_h, ffi.Pointer>)>(); - - /// @brief Gets the version of the package. - /// @since_tizen 4.0 - /// @remarks You must release @a version using free(). - /// @param[in] archive_info The package archive information - /// @param[out] version The version of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int package_archive_info_get_version( - package_archive_info_h archive_info, - ffi.Pointer> version, - ) { - return _package_archive_info_get_version( - archive_info, - version, - ); - } - - late final _package_archive_info_get_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_archive_info_h, ffi.Pointer>)>>( - 'package_archive_info_get_version'); - late final _package_archive_info_get_version = - _package_archive_info_get_versionPtr.asFunction< - int Function( - package_archive_info_h, ffi.Pointer>)>(); - - /// @brief Gets the API version of the package. - /// @since_tizen 4.0 - /// @remarks You must release @a api_version using free(). - /// @param[in] archive_info The package archive information - /// @param[out] api_version The API version of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int package_archive_info_get_api_version( - package_archive_info_h archive_info, - ffi.Pointer> api_version, - ) { - return _package_archive_info_get_api_version( - archive_info, - api_version, - ); - } - - late final _package_archive_info_get_api_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_archive_info_h, ffi.Pointer>)>>( - 'package_archive_info_get_api_version'); - late final _package_archive_info_get_api_version = - _package_archive_info_get_api_versionPtr.asFunction< - int Function( - package_archive_info_h, ffi.Pointer>)>(); - - /// @brief Gets the description of the package. - /// @since_tizen 4.0 - /// @remarks You must release @a description using free(). - /// @param[in] archive_info The package archive information - /// @param[out] description The description of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_archive_info_get_description( - package_archive_info_h archive_info, - ffi.Pointer> description, - ) { - return _package_archive_info_get_description( - archive_info, - description, - ); - } - - late final _package_archive_info_get_descriptionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_archive_info_h, ffi.Pointer>)>>( - 'package_archive_info_get_description'); - late final _package_archive_info_get_description = - _package_archive_info_get_descriptionPtr.asFunction< - int Function( - package_archive_info_h, ffi.Pointer>)>(); - - /// @brief Gets the label of the package. - /// @since_tizen 4.0 - /// @remarks You must release @a label using free(). - /// @param[in] archive_info The package archive information - /// @param[out] label The label of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_archive_info_get_label( - package_archive_info_h archive_info, - ffi.Pointer> label, - ) { - return _package_archive_info_get_label( - archive_info, - label, - ); - } - - late final _package_archive_info_get_labelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_archive_info_h, ffi.Pointer>)>>( - 'package_archive_info_get_label'); - late final _package_archive_info_get_label = - _package_archive_info_get_labelPtr.asFunction< - int Function( - package_archive_info_h, ffi.Pointer>)>(); - - /// @brief Gets the author of the package. - /// @since_tizen 4.0 - /// @remarks You must release @a author using free(). - /// @param[in] archive_info The package archive information - /// @param[out] author The author of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_archive_info_get_author( - package_archive_info_h archive_info, - ffi.Pointer> author, - ) { - return _package_archive_info_get_author( - archive_info, - author, - ); - } - - late final _package_archive_info_get_authorPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_archive_info_h, ffi.Pointer>)>>( - 'package_archive_info_get_author'); - late final _package_archive_info_get_author = - _package_archive_info_get_authorPtr.asFunction< - int Function( - package_archive_info_h, ffi.Pointer>)>(); - - /// @brief Gets the raw icon of the package. - /// @since_tizen 4.0 - /// @remarks You must release @a icon using free(). - /// @param[in] archive_info The package archive information - /// @param[out] icon The raw icon of the package - /// @param[out] icon_size The size of the icon - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_archive_info_get_icon( - package_archive_info_h archive_info, - ffi.Pointer> icon, - ffi.Pointer icon_size, - ) { - return _package_archive_info_get_icon( - archive_info, - icon, - icon_size, - ); - } - - late final _package_archive_info_get_iconPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_archive_info_h, - ffi.Pointer>, - ffi.Pointer)>>('package_archive_info_get_icon'); - late final _package_archive_info_get_icon = - _package_archive_info_get_iconPtr.asFunction< - int Function( - package_archive_info_h, - ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Adds the system event handler - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The service application can handle low memory event, low battery event, language setting changed event and region format changed event. - /// @param[out] handler The event handler - /// @param[in] event_type The system event type - /// @param[in] callback The callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_event_type_e - /// @see app_event_cb - /// @see service_app_remove_event_handler - int service_app_add_event_handler( - ffi.Pointer handler, - int event_type, - app_event_cb callback, - ffi.Pointer user_data, - ) { - return _service_app_add_event_handler( - handler, - event_type, - callback, - user_data, - ); - } - - late final _service_app_add_event_handlerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - app_event_cb, - ffi.Pointer)>>('service_app_add_event_handler'); - late final _service_app_add_event_handler = - _service_app_add_event_handlerPtr.asFunction< - int Function(ffi.Pointer, int, app_event_cb, - ffi.Pointer)>(); - - /// @brief Removes registered event handler - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] event_handler The event handler - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @see service_app_add_event_handler - int service_app_remove_event_handler( - app_event_handler_h event_handler, - ) { - return _service_app_remove_event_handler( - event_handler, - ); - } - - late final _service_app_remove_event_handlerPtr = - _lookup>( - 'service_app_remove_event_handler'); - late final _service_app_remove_event_handler = - _service_app_remove_event_handlerPtr - .asFunction(); - - /// @brief Runs the main loop of the application until service_app_exit() is called. - /// @details This function is the main entry point of the Tizen service application. - /// This main loop supports event handling for the GMainLoop and the Ecore Main Loop. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] argc The argument count - /// @param[in] argv The argument vector - /// @param[in] callback The set of callback functions to handle application events - /// @param[in] user_data The user data to be passed to the callback functions - /// @return @c 0 on success, - /// otherwise a negative error value. - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_ERROR_INVALID_CONTEXT The application is launched illegally, not launched by the launch system. - /// @retval #APP_ERROR_ALREADY_RUNNING The main loop has already started - /// @see service_app_create_cb() - /// @see service_app_terminate_cb() - /// @see service_app_control_cb() - /// @see service_app_exit() - /// @see #service_app_lifecycle_callback_s - int service_app_main( - int argc, - ffi.Pointer> argv, - ffi.Pointer callback, - ffi.Pointer user_data, - ) { - return _service_app_main( - argc, - argv, - callback, - user_data, - ); - } - - late final _service_app_mainPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>>('service_app_main'); - late final _service_app_main = _service_app_mainPtr.asFunction< - int Function( - int, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Exits the main loop of the application. - /// @details The main loop of the application stops and service_app_terminate_cb() is invoked. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @see service_app_main() - /// @see service_app_terminate_cb() - void service_app_exit() { - return _service_app_exit(); - } - - late final _service_app_exitPtr = - _lookup>('service_app_exit'); - late final _service_app_exit = - _service_app_exitPtr.asFunction(); - - /// @brief Adds a shortcut to home, asynchronously. - /// @since_tizen 2.3 - /// @remarks If a homescreen does not support this feature, you will get a proper error code.\n - /// Application must check the return value of this function.\n - /// Application must check the return status from the callback function.\n - /// Application should set the callback function to get the result of this request. - /// @privlevel public - /// @privilege %http://tizen.org/privilege/shortcut - /// @param[in] name The name of the created shortcut icon - /// @param[in] type The type of shortcuts - /// @param[in] uri The specific information for delivering to the viewer for creating a shortcut - /// @param[in] icon The absolute path of an icon file - /// @param[in] allow_duplicate @c 1 if it accepts the duplicated shortcut, - /// otherwise @c 0 - /// @param[in] result_cb The address of the callback function that is called when the result comes back from the viewer - /// @param[in] data The callback data that is used in the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SHORTCUT_ERROR_NONE Successful - /// @retval #SHORTCUT_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SHORTCUT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SHORTCUT_ERROR_IO_ERROR I/O Error - /// @retval #SHORTCUT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SHORTCUT_ERROR_NOT_SUPPORTED Not supported - /// @retval #SHORTCUT_ERROR_RESOURCE_BUSY Device or resource busy - /// @retval #SHORTCUT_ERROR_NO_SPACE There is no space to add a new shortcut - /// @retval #SHORTCUT_ERROR_EXIST Shortcut is already exist - /// @retval #SHORTCUT_ERROR_FAULT Unrecoverable error - /// @retval #SHORTCUT_ERROR_COMM Connection not established or communication problem - /// @pre You have to prepare the callback function. - /// @post You have to check the return status from the callback function which is passed by the argument. - /// @see result_cb_t - /// @par Example - /// @code - /// #include - /// #include - /// static int result_cb(int ret, int pid, void *data) - /// { - /// if (ret < 0) - /// dlog_print("Failed to add a shortcut: %s\n", perror(ret)); - /// - /// dlog_print("Processed by the %d\n", pid); - /// return 0; - /// } - /// - /// static int app_create(void *data) - /// { - /// char* data_path = app_get_data_path(); - /// int path_len = strlen(data_path)+10; - /// char * path = malloc(path_len); - /// memset(path, 0, path_len); - /// strncat(path, data_path, path_len); - /// strncat(path, "Friend.jpg", path_len); - /// - /// shortcut_add_to_home("With friends", LAUNCH_BY_URI, "gallery:0000-0000", path, 0, result_cb, NULL); - /// free(path); - /// - /// return 0; - /// } - /// @endcode - int shortcut_add_to_home( - ffi.Pointer name, - int type, - ffi.Pointer uri, - ffi.Pointer icon, - int allow_duplicate, - result_cb_t result_cb, - ffi.Pointer data, - ) { - return _shortcut_add_to_home( - name, - type, - uri, - icon, - allow_duplicate, - result_cb, - data, - ); - } - - late final _shortcut_add_to_homePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - result_cb_t, - ffi.Pointer)>>('shortcut_add_to_home'); - late final _shortcut_add_to_home = _shortcut_add_to_homePtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer, - ffi.Pointer, int, result_cb_t, ffi.Pointer)>(); - - /// @brief Adds a widget to home, asynchronously. - /// @since_tizen 2.4 - /// @remarks If a homescreen does not support this feature, you will get a proper error code.\n - /// Application must check the return value of this function.\n - /// Application must check the return status from the callback function.\n - /// Application should set the callback function to get the result of this request. - /// @privlevel public - /// @privilege %http://tizen.org/privilege/shortcut - /// @param[in] name The name of the created widget which will be shown when the widget is not prepared - /// @param[in] size The size of widget - /// @param[in] widget_id Widget ID - /// @param[in] icon The absolute path of an icon file which will be shown when the widget is not prepared - /// @param[in] period The Update period in seconds - /// @param[in] allow_duplicate @c 1 if it accepts the duplicated widget, - /// otherwise @c 0 - /// @param[in] result_cb The address of the callback function that is called when the result comes back from the viewer - /// @param[in] data The callback data that is used in the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SHORTCUT_ERROR_NONE Successful - /// @retval #SHORTCUT_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SHORTCUT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SHORTCUT_ERROR_IO_ERROR I/O Error - /// @retval #SHORTCUT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SHORTCUT_ERROR_NOT_SUPPORTED Not supported - /// @retval #SHORTCUT_ERROR_FAULT Unrecoverable error - /// @retval #SHORTCUT_ERROR_COMM Connection not established or communication problem - /// @pre You have to prepare the callback function. - /// @post You have to check the return status from the callback function which is passed by the argument. - /// @see result_cb_t - /// @see shortcut_widget_size_e - /// @par Example - /// @code - /// #include - /// #include - /// #include - /// - /// #define TIZEN_PATH_MAX 1024 - /// static int result_cb(int ret, int pid, void *data) - /// { - /// if (ret < 0) - /// dlog_print("Failed to add a widget: %s\n", perror(ret)); - /// - /// dlog_print("Processed by the %d\n", pid); - /// - /// return 0; - /// } - /// - /// static int app_create(void *data) - /// { - /// char *image_root = NULL; - /// char image_path[TIZEN_PATH_MAX] = {0,}; - /// - /// storage_get_directory(STORAGE_TYPE_INTERNAL, STORAGE_DIRECTORY_IMAGES, &image_root); - /// snprintf(image_path, TIZEN_PATH_MAX, "%s/alter_icon.png", image_root); - /// - /// shortcut_add_to_home_widget("alter_name", WIDGET_SIZE_1x1, "org.tizen.testwidget", - /// image_path, -1.0f, 0, result_cb, NULL); - /// - /// return 0; - /// } - /// @endcode - int shortcut_add_to_home_widget( - ffi.Pointer name, - int size, - ffi.Pointer widget_id, - ffi.Pointer icon, - double period, - int allow_duplicate, - result_cb_t result_cb, - ffi.Pointer data, - ) { - return _shortcut_add_to_home_widget( - name, - size, - widget_id, - icon, - period, - allow_duplicate, - result_cb, - data, - ); - } - - late final _shortcut_add_to_home_widgetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ffi.Int, - result_cb_t, - ffi.Pointer)>>('shortcut_add_to_home_widget'); - late final _shortcut_add_to_home_widget = - _shortcut_add_to_home_widgetPtr.asFunction< - int Function( - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - double, - int, - result_cb_t, - ffi.Pointer)>(); - - /// @brief Removes a shortcut from home, asynchronously. - /// @details If the callback function registered for a widget, the shortcut deletion is possible. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/shortcut - /// @param[in] name The name of the created shortcut icon - /// @param[in] result_cb The address of the callback function that is called when the result comes back from the viewer - /// @param[in] user_data The callback data that is used in the callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #SHORTCUT_ERROR_NONE Successful - /// @retval #SHORTCUT_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SHORTCUT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SHORTCUT_ERROR_IO_ERROR I/O Error - /// @retval #SHORTCUT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SHORTCUT_ERROR_COMM Connection not established or communication problem - /// @retval #SHORTCUT_ERROR_NOT_SUPPORTED Not supported - /// @pre You have to prepare the callback function. - /// @post You have to check the return status from the callback function which is passed by the argument. - /// @see result_cb_t - /// @par Example - /// @code - /// #include - /// - /// int result_cb(int ret, void *data) - /// { - /// if (ret < 0) - /// dlog_print("Failed to remove a shortcut: %d\n", ret); - /// - /// return 0; - /// } - /// - /// { - /// int result; - /// - /// result = shortcut_remove_from_home("shortcut_name", result_cb, NULL); - /// if (result != SHORTCUT_ERROR_NONE) { - /// dlog_print("Failed to remove a shortcut: %d\n", result); - /// return result; - /// } - /// } - /// - /// @endcode - int shortcut_remove_from_home( - ffi.Pointer name, - result_cb_t result_cb, - ffi.Pointer user_data, - ) { - return _shortcut_remove_from_home( - name, - result_cb, - user_data, - ); - } - - late final _shortcut_remove_from_homePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, result_cb_t, - ffi.Pointer)>>('shortcut_remove_from_home'); - late final _shortcut_remove_from_home = - _shortcut_remove_from_homePtr.asFunction< - int Function( - ffi.Pointer, result_cb_t, ffi.Pointer)>(); - - /// @brief Gets the preset list of shortcut template from the installed package, synchronously. - /// @since_tizen 2.4 - /// @remarks If a homescreen does not support this feature, you will get a proper error code.\n - /// Application must check the return value of this function.\n - /// Application must check the return status from the callback function.\n - /// Application should set the callback function to get the result of this request. - /// @privlevel public - /// @privilege %http://tizen.org/privilege/shortcut - /// @param[in] package_name The package name - /// @param[in] list_cb The callback function to get the shortcut item information - /// @param[in] data The callback data that is used in the callback function - /// @return The return type (int) - /// @retval @c N Number of items (call count of the callback function) - /// @retval #SHORTCUT_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SHORTCUT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SHORTCUT_ERROR_IO_ERROR I/O Error - /// @retval #SHORTCUT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SHORTCUT_ERROR_FAULT Unrecoverable error - /// @retval #SHORTCUT_ERROR_COMM Connection not established or communication problem - /// @retval #SHORTCUT_ERROR_NOT_SUPPORTED Not supported - /// @pre You have to prepare the callback function. - /// @post You have to check the return status from the callback function which is passed by the argument. - int shortcut_get_list( - ffi.Pointer package_name, - shortcut_list_cb list_cb, - ffi.Pointer data, - ) { - return _shortcut_get_list( - package_name, - list_cb, - data, - ); - } - - late final _shortcut_get_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, shortcut_list_cb, - ffi.Pointer)>>('shortcut_get_list'); - late final _shortcut_get_list = _shortcut_get_listPtr.asFunction< - int Function( - ffi.Pointer, shortcut_list_cb, ffi.Pointer)>(); - - /// @brief Registers a callback function to listen requests from applications. - /// @since_tizen 2.4 - /// @remarks Should be used in the homescreen.\n - /// Should check the return value of this function. - /// Prospective Clients: Homescreen. - /// @privlevel public - /// @privilege %http://tizen.org/privilege/shortcut - /// - /// @param[in] request_cb The callback function pointer that is invoked when add_to_home is requested - /// @param[in] data The callback data to deliver to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SHORTCUT_ERROR_NONE Successful - /// @retval #SHORTCUT_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SHORTCUT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SHORTCUT_ERROR_IO_ERROR I/O Error - /// @retval #SHORTCUT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SHORTCUT_ERROR_COMM Connection not established or communication problem - /// @retval #SHORTCUT_ERROR_NOT_SUPPORTED Not supported - /// @pre You have to prepare a callback function. - /// @post If a request is sent from the application, the registered callback will be invoked. - /// @see request_cb_t - /// @see shortcut_error_e - int shortcut_set_request_cb( - shortcut_request_cb request_cb, - ffi.Pointer data, - ) { - return _shortcut_set_request_cb( - request_cb, - data, - ); - } - - late final _shortcut_set_request_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(shortcut_request_cb, - ffi.Pointer)>>('shortcut_set_request_cb'); - late final _shortcut_set_request_cb = _shortcut_set_request_cbPtr - .asFunction)>(); - - /// @brief Unregisters a callback for the shortcut request. - /// @since_tizen 3.0 - /// @remarks The specific error code can be obtained using the gat_last_result() method. Error codes are described in Exception section. - /// @privlevel public - /// @privilege %http://tizen.org/privilege/shortcut - /// @return None - /// @exception #SHORTCUT_ERROR_NONE Successful - /// @exception #SHORTCUT_ERROR_NOT_SUPPORTED Not supported - /// @exception #SHORTCUT_ERROR_PERMISSION_DENIED Permission denied - /// @see shortcut_set_request_cb - /// @see get_last_result() - void shortcut_unset_request_cb() { - return _shortcut_unset_request_cb(); - } - - late final _shortcut_unset_request_cbPtr = - _lookup>( - 'shortcut_unset_request_cb'); - late final _shortcut_unset_request_cb = - _shortcut_unset_request_cbPtr.asFunction(); - - /// @brief Registers the callback function to listen the remove requests from applications. - /// @remarks Should be used in the homescreen.\n - /// Should check the return value of this function. - /// Prospective Clients: Homescreen. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/shortcut - /// @param[in] remove_cb The callback function pointer that is invoked when remove_from_home is requested - /// @param[in] data The callback data to deliver to the callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #SHORTCUT_ERROR_NONE Successful - /// @retval #SHORTCUT_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SHORTCUT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SHORTCUT_ERROR_IO_ERROR I/O Error - /// @retval #SHORTCUT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SHORTCUT_ERROR_COMM Connection not established or communication problem - /// @retval #SHORTCUT_ERROR_NOT_SUPPORTED Not supported - /// @pre You have to prepare a callback function. - /// @post If a request is sent from the application, the registered callback will be invoked. - /// @see remove_cb_t - /// @see shortcut_error_e - int shortcut_set_remove_cb( - shortcut_remove_cb remove_cb, - ffi.Pointer data, - ) { - return _shortcut_set_remove_cb( - remove_cb, - data, - ); - } - - late final _shortcut_set_remove_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(shortcut_remove_cb, - ffi.Pointer)>>('shortcut_set_remove_cb'); - late final _shortcut_set_remove_cb = _shortcut_set_remove_cbPtr - .asFunction)>(); - - /// @brief Unregisters a callback for the shortcut remove. - /// @since_tizen 3.0 - /// @remarks The specific error code can be obtained using the gat_last_result() method. Error codes are described in Exception section. - /// @privlevel public - /// @privilege %http://tizen.org/privilege/shortcut - /// @return None - /// @exception #SHORTCUT_ERROR_NONE Successful - /// @exception #SHORTCUT_ERROR_NOT_SUPPORTED Not supported - /// @exception #SHORTCUT_ERROR_PERMISSION_DENIED Permission denied - /// @see shortcut_set_remove_cb - /// @see get_last_result() - void shortcut_unset_remove_cb() { - return _shortcut_unset_remove_cb(); - } - - late final _shortcut_unset_remove_cbPtr = - _lookup>( - 'shortcut_unset_remove_cb'); - late final _shortcut_unset_remove_cb = - _shortcut_unset_remove_cbPtr.asFunction(); - - /// @brief Creates a new download request and return its download ID. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks The @a download_id is released with download_destroy() by client. - /// - /// @param[out] download_id The download ID that is newly created on success - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_IO_ERROR Internal I/O error - /// @retval #DOWNLOAD_ERROR_QUEUE_FULL Download server queue is full - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @post The download state will be #DOWNLOAD_STATE_READY. - /// - /// @see download_destroy() - int download_create( - ffi.Pointer download_id, - ) { - return _download_create( - download_id, - ); - } - - late final _download_createPtr = - _lookup)>>( - 'download_create'); - late final _download_create = - _download_createPtr.asFunction)>(); - - /// @brief Unloads all data concerning a download ID from memory. - /// - /// @details After calling this API, a download ID is existed at DB in certain time. - /// Within that time, it is able to use the other API with the download ID. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// - /// @remarks If #DOWNLOAD_ERROR_ID_NOT_FOUND is returned, it means that the download ID is completely removed from DB. - /// - /// @param[in] download_id The download ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_create() - int download_destroy( - int download_id, - ) { - return _download_destroy( - download_id, - ); - } - - late final _download_destroyPtr = - _lookup>( - 'download_destroy'); - late final _download_destroy = - _download_destroyPtr.asFunction(); - - /// @brief Sets the URL to download. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks This function should be called before downloading (see download_start()). - /// - /// @param[in] download_id The download ID - /// @param[in] url The URL to download \n - /// If @a url is @c NULL, it clears the previous value. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state must be #DOWNLOAD_STATE_READY, #DOWNLOAD_STATE_FAILED, or #DOWNLOAD_STATE_CANCELED. - /// - /// @see download_get_url() - int download_set_url( - int download_id, - ffi.Pointer url, - ) { - return _download_set_url( - download_id, - url, - ); - } - - late final _download_set_urlPtr = _lookup< - ffi.NativeFunction)>>( - 'download_set_url'); - late final _download_set_url = _download_set_urlPtr - .asFunction)>(); - - /// @brief Gets the URL to download. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks You must release @a url using free(). - /// - /// @param[in] download_id The download ID - /// @param[out] url The URL to download - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_set_url() - int download_get_url( - int download_id, - ffi.Pointer> url, - ) { - return _download_get_url( - download_id, - url, - ); - } - - late final _download_get_urlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, - ffi.Pointer>)>>('download_get_url'); - late final _download_get_url = _download_get_urlPtr - .asFunction>)>(); - - /// @brief Sets the allowed network type for the downloaded file. - /// - /// @details The file can be downloaded only under the allowed network. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks This function should be called before downloading (see download_start()). - /// - /// @param[in] download_id The download ID - /// @param[in] net_type The network type that the client prefers - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state must be #DOWNLOAD_STATE_READY, #DOWNLOAD_STATE_FAILED, or #DOWNLOAD_STATE_CANCELED. - /// - /// @see download_get_network_type() - /// @see #download_network_type_e - int download_set_network_type( - int download_id, - int net_type, - ) { - return _download_set_network_type( - download_id, - net_type, - ); - } - - late final _download_set_network_typePtr = - _lookup>( - 'download_set_network_type'); - late final _download_set_network_type = - _download_set_network_typePtr.asFunction(); - - /// @brief Gets the network type for the downloaded file. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @param[in] download_id The download ID - /// @param[out] net_type The network type that is defined by client - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_set_network_type() - /// @see #download_network_type_e - int download_get_network_type( - int download_id, - ffi.Pointer net_type, - ) { - return _download_get_network_type( - download_id, - net_type, - ); - } - - late final _download_get_network_typePtr = _lookup< - ffi - .NativeFunction)>>( - 'download_get_network_type'); - late final _download_get_network_type = _download_get_network_typePtr - .asFunction)>(); - - /// @brief Sets the destination for the downloaded file. - /// - /// @details The file will be downloaded to the specified destination. - /// The downloaded file is saved to an auto-generated file name in the destination. - /// If the destination is not specified, the file will be downloaded to default storage (see the @ref CAPI_SYSTEM_STORAGE_MODULE API). - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks This function should be called before downloading (see download_start()). - /// - /// @param[in] download_id The download ID - /// @param[in] path The absolute path to the downloaded file \n - /// If @a path is @c NULL, it clears the previous value. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state must be #DOWNLOAD_STATE_READY, #DOWNLOAD_STATE_FAILED, or #DOWNLOAD_STATE_CANCELED. - /// - /// @see download_get_destination() - int download_set_destination( - int download_id, - ffi.Pointer path, - ) { - return _download_set_destination( - download_id, - path, - ); - } - - late final _download_set_destinationPtr = _lookup< - ffi.NativeFunction)>>( - 'download_set_destination'); - late final _download_set_destination = _download_set_destinationPtr - .asFunction)>(); - - /// @brief Gets the destination path for the downloaded file. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks You must release @a path using free(). - /// - /// @param[in] download_id The download ID - /// @param[out] path The absolute path to the downloaded file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_set_destination() - int download_get_destination( - int download_id, - ffi.Pointer> path, - ) { - return _download_get_destination( - download_id, - path, - ); - } - - late final _download_get_destinationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, - ffi.Pointer>)>>('download_get_destination'); - late final _download_get_destination = _download_get_destinationPtr - .asFunction>)>(); - - /// @brief Sets the name for the downloaded file. - /// - /// @details The file will be saved in the specified destination with the given file name. - /// If the file name is not specified, the downloaded file will be saved with an auto-generated file name in the destination. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks This function should be called before downloading (see download_start()). - /// - /// @param[in] download_id The download ID - /// @param[in] file_name The file name for the downloaded file \n - /// If @a name is @c NULL it clears the previous value. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state must be #DOWNLOAD_STATE_READY, #DOWNLOAD_STATE_FAILED, or #DOWNLOAD_STATE_CANCELED. - /// - /// @see download_get_file_name() - int download_set_file_name( - int download_id, - ffi.Pointer file_name, - ) { - return _download_set_file_name( - download_id, - file_name, - ); - } - - late final _download_set_file_namePtr = _lookup< - ffi.NativeFunction)>>( - 'download_set_file_name'); - late final _download_set_file_name = _download_set_file_namePtr - .asFunction)>(); - - /// @brief Gets the name of the downloaded file set previously by download_set_file_name(). - /// - /// @details If the name is not set, @c NULL is returned. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks You must release @a file_name using free(). - /// - /// @param[in] download_id The download ID - /// @param[out] file_name The file name which is set by user - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_set_file_name() - int download_get_file_name( - int download_id, - ffi.Pointer> file_name, - ) { - return _download_get_file_name( - download_id, - file_name, - ); - } - - late final _download_get_file_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, - ffi.Pointer>)>>('download_get_file_name'); - late final _download_get_file_name = _download_get_file_namePtr - .asFunction>)>(); - - /// @brief Gets the absolute path to save the downloaded file. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks This function returns #DOWNLOAD_ERROR_INVALID_STATE if the download is not completed. - /// You must release @a path using free(). - /// - /// @param[in] download_id The download ID - /// @param[out] path The absolute path to the downloaded file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The download state must be #DOWNLOAD_STATE_COMPLETED. - /// - /// @see download_set_file_name() - /// @see download_set_destination() - int download_get_downloaded_file_path( - int download_id, - ffi.Pointer> path, - ) { - return _download_get_downloaded_file_path( - download_id, - path, - ); - } - - late final _download_get_downloaded_file_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer>)>>( - 'download_get_downloaded_file_path'); - late final _download_get_downloaded_file_path = - _download_get_downloaded_file_pathPtr - .asFunction>)>(); - - /// @brief Gets the MIME type of the downloaded content. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks This function returns #DOWNLOAD_ERROR_INVALID_STATE if the download has not been started. - /// You must release @a mime_type using free(). - /// - /// @param[in] download_id The download ID - /// @param[out] mime_type The MIME type of the downloaded file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_set_file_name() - /// @see download_set_destination() - /// @see download_get_downloaded_file_path() - int download_get_mime_type( - int download_id, - ffi.Pointer> mime_type, - ) { - return _download_get_mime_type( - download_id, - mime_type, - ); - } - - late final _download_get_mime_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, - ffi.Pointer>)>>('download_get_mime_type'); - late final _download_get_mime_type = _download_get_mime_typePtr - .asFunction>)>(); - - /// @brief Enables or disables auto download. - /// @details If this option is enabled, - /// the previous downloading item is restarted automatically as soon as the download daemon is restarted. - /// The download progress continues after the client process is terminated. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks The client should call download_set_notification() and download_set_notification_extra_param() after calling this API. - /// If it is not done, the user will not receive the download result in case the client process is not alive. \n - /// The default value is @c false. - /// - /// @param[in] download_id The download ID - /// @param[in] enable Set @c true to enable auto download, - /// otherwise set @c false to disable auto download - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state must be #DOWNLOAD_STATE_READY, #DOWNLOAD_STATE_FAILED, or #DOWNLOAD_STATE_CANCELED. - /// - /// @see download_get_auto_download() - /// @see download_set_notification() - /// @see download_set_notification_extra_param() - int download_set_auto_download( - int download_id, - bool enable, - ) { - return _download_set_auto_download( - download_id, - enable, - ); - } - - late final _download_set_auto_downloadPtr = - _lookup>( - 'download_set_auto_download'); - late final _download_set_auto_download = - _download_set_auto_downloadPtr.asFunction(); - - /// @brief Checks whether auto download is enabled. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @param[in] download_id The download ID - /// @param[out] enable @c true if auto download is enabled, - /// otherwise @c false if auto download is disabled - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_set_auto_download() - int download_get_auto_download( - int download_id, - ffi.Pointer enable, - ) { - return _download_get_auto_download( - download_id, - enable, - ); - } - - late final _download_get_auto_downloadPtr = _lookup< - ffi.NativeFunction)>>( - 'download_get_auto_download'); - late final _download_get_auto_download = _download_get_auto_downloadPtr - .asFunction)>(); - - /// @brief Adds a HTTP header field to the download request. - /// - /// @details The given HTTP header field will be included with the HTTP request of the download request. - /// For more information, see HTTP/1.1: HTTP Message Headers. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks This function should be called before downloading (see download_start()). - /// This function replaces any existing value for the given key. - /// This function returns #DOWNLOAD_ERROR_INVALID_PARAMETER if @a field or @a value is a zero-length string. - /// - /// @param[in] download_id The download ID - /// @param[in] field The name of the HTTP header field - /// @param[in] value The value associated with given field - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state - /// @retval #DOWNLOAD_ERROR_IO_ERROR Internal I/O error - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state must be #DOWNLOAD_STATE_READY, #DOWNLOAD_STATE_FAILED, or #DOWNLOAD_STATE_CANCELED. - /// - /// @see download_get_http_header_field() - /// @see download_remove_http_header_field() - int download_add_http_header_field( - int download_id, - ffi.Pointer field, - ffi.Pointer value, - ) { - return _download_add_http_header_field( - download_id, - field, - value, - ); - } - - late final _download_add_http_header_fieldPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, - ffi.Pointer)>>('download_add_http_header_field'); - late final _download_add_http_header_field = - _download_add_http_header_fieldPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets a value associated with a given HTTP header field from the download. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks This function returns #DOWNLOAD_ERROR_INVALID_PARAMETER if @a field is zero-length string. - /// You must release @a value using free(). - /// - /// @param[in] download_id The download ID - /// @param[in] field The name of the HTTP header field - /// @param[out] value The value associated with given field - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state - /// @retval #DOWNLOAD_ERROR_FIELD_NOT_FOUND Specified field not found - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_add_http_header_field() - /// @see download_remove_http_header_field() - int download_get_http_header_field( - int download_id, - ffi.Pointer field, - ffi.Pointer> value, - ) { - return _download_get_http_header_field( - download_id, - field, - value, - ); - } - - late final _download_get_http_header_fieldPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, - ffi.Pointer>)>>( - 'download_get_http_header_field'); - late final _download_get_http_header_field = - _download_get_http_header_fieldPtr.asFunction< - int Function(int, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets all the HTTP header fields added to the download request. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks You must release @a value using free(). - /// - /// @param[in] download_id The download ID - /// @param[out] fields The array of the HTTP header fields - /// @param[out] length The number of the HTTP header fields - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_add_http_header_field() - /// @see download_remove_http_header_field() - int download_get_http_header_field_list( - int download_id, - ffi.Pointer>> fields, - ffi.Pointer length, - ) { - return _download_get_http_header_field_list( - download_id, - fields, - length, - ); - } - - late final _download_get_http_header_field_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer>>, - ffi.Pointer)>>('download_get_http_header_field_list'); - late final _download_get_http_header_field_list = - _download_get_http_header_field_listPtr.asFunction< - int Function(int, ffi.Pointer>>, - ffi.Pointer)>(); - - /// @brief Removes a given HTTP header field from the download. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks This function should be called before downloading (see download_start()). - /// This function returns #DOWNLOAD_ERROR_INVALID_PARAMETER if field is zero-length string. - /// - /// @param[in] download_id The download ID - /// @param[in] field The name of the HTTP header field - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state - /// @retval #DOWNLOAD_ERROR_FIELD_NOT_FOUND Specified field not found - /// @retval #DOWNLOAD_ERROR_IO_ERROR Internal I/O error - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state must be #DOWNLOAD_STATE_READY, #DOWNLOAD_STATE_FAILED, or #DOWNLOAD_STATE_CANCELED. - /// - /// @see download_add_http_header_field() - /// @see download_get_http_header_field() - int download_remove_http_header_field( - int download_id, - ffi.Pointer field, - ) { - return _download_remove_http_header_field( - download_id, - field, - ); - } - - late final _download_remove_http_header_fieldPtr = _lookup< - ffi.NativeFunction)>>( - 'download_remove_http_header_field'); - late final _download_remove_http_header_field = - _download_remove_http_header_fieldPtr - .asFunction)>(); - - /// @brief Registers a callback function to be invoked when a download state is changed. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks This function should be called before downloading (see download_start()). - /// - /// @param[in] download_id The download ID - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @post download_state_changed_cb() will be invoked. - /// - /// @see download_unset_state_changed_cb() - /// @see download_state_changed_cb() - int download_set_state_changed_cb( - int download_id, - download_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _download_set_state_changed_cb( - download_id, - callback, - user_data, - ); - } - - late final _download_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, download_state_changed_cb, - ffi.Pointer)>>('download_set_state_changed_cb'); - late final _download_set_state_changed_cb = - _download_set_state_changed_cbPtr.asFunction< - int Function( - int, download_state_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the download state change callback function. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks This function should be called before downloading (see download_start()). - /// - /// @param[in] download_id The download ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_set_state_changed_cb() - /// @see download_state_changed_cb() - int download_unset_state_changed_cb( - int download_id, - ) { - return _download_unset_state_changed_cb( - download_id, - ); - } - - late final _download_unset_state_changed_cbPtr = - _lookup>( - 'download_unset_state_changed_cb'); - late final _download_unset_state_changed_cb = - _download_unset_state_changed_cbPtr.asFunction(); - - /// @brief Registers a callback function to be invoked when progress of the download changes. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks This function should be called before downloading (see download_start()). - /// - /// @param[in] download_id The download ID - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @post download_progress_cb() will be invoked. - /// - /// @see download_unset_progress_cb() - /// @see download_progress_cb() - int download_set_progress_cb( - int download_id, - download_progress_cb callback, - ffi.Pointer user_data, - ) { - return _download_set_progress_cb( - download_id, - callback, - user_data, - ); - } - - late final _download_set_progress_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, download_progress_cb, - ffi.Pointer)>>('download_set_progress_cb'); - late final _download_set_progress_cb = - _download_set_progress_cbPtr.asFunction< - int Function(int, download_progress_cb, ffi.Pointer)>(); - - /// @brief Unregisters the download progress change callback function. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks This function should be called before downloading (see download_start()). - /// - /// @param[in] download_id The download ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_set_progress_cb() - /// @see download_progress_cb() - int download_unset_progress_cb( - int download_id, - ) { - return _download_unset_progress_cb( - download_id, - ); - } - - late final _download_unset_progress_cbPtr = - _lookup>( - 'download_unset_progress_cb'); - late final _download_unset_progress_cb = - _download_unset_progress_cbPtr.asFunction(); - - /// @brief Starts or resumes the download, asynchronously. - /// - /// @details This function starts to download the current URL, or resumes the download if paused. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks The URL is the mandatory information to start the download. - /// @remarks It should call download_set_progress_cb() and download_set_state_changed_cb() again - /// after the client process is restarted or download_destroy() is called. - /// - /// @param[in] download_id The download ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state - /// @retval #DOWNLOAD_ERROR_IO_ERROR Internal I/O error - /// @retval #DOWNLOAD_ERROR_INVALID_URL Invalid URL - /// @retval #DOWNLOAD_ERROR_INVALID_DESTINATION Invalid destination - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_QUEUE_FULL Download server queue is full - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The download state must be #DOWNLOAD_STATE_READY, #DOWNLOAD_STATE_PAUSED, #DOWNLOAD_STATE_CANCELED, or #DOWNLOAD_STATE_FAILED. - /// @post The download state will be #DOWNLOAD_STATE_QUEUED or #DOWNLOAD_STATE_DOWNLOADING. - /// - /// @see download_set_url() - /// @see download_pause() - /// @see download_cancel() - int download_start( - int download_id, - ) { - return _download_start( - download_id, - ); - } - - late final _download_startPtr = - _lookup>('download_start'); - late final _download_start = - _download_startPtr.asFunction(); - - /// @brief Pauses the download, asynchronously. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks The paused download can be restarted with download_start() or cancelled with download_cancel(). - /// - /// @param[in] download_id The download ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state - /// @retval #DOWNLOAD_ERROR_IO_ERROR Internal I/O error - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The download state must be #DOWNLOAD_STATE_DOWNLOADING. - /// @post The download state will be #DOWNLOAD_STATE_PAUSED. - /// - /// @see download_start() - /// @see download_cancel() - int download_pause( - int download_id, - ) { - return _download_pause( - download_id, - ); - } - - late final _download_pausePtr = - _lookup>('download_pause'); - late final _download_pause = - _download_pausePtr.asFunction(); - - /// @brief Cancels the download, asynchronously. - /// - /// @details This function cancels the running download and its state will be #DOWNLOAD_STATE_READY. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks The canceled download can be restarted with download_start(). - /// - /// @param[in] download_id The download ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state - /// @retval #DOWNLOAD_ERROR_IO_ERROR Internal I/O error - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The download state must be #DOWNLOAD_STATE_QUEUED, #DOWNLOAD_STATE_DOWNLOADING, or #DOWNLOAD_STATE_PAUSED. - /// @post The download state will be #DOWNLOAD_STATE_CANCELED. - /// - /// @see download_start() - int download_cancel( - int download_id, - ) { - return _download_cancel( - download_id, - ); - } - - late final _download_cancelPtr = - _lookup>('download_cancel'); - late final _download_cancel = - _download_cancelPtr.asFunction(); - - /// @brief Gets the current state of the download. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @param[in] download_id The download ID - /// @param[out] state The current state of the download - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see #download_state_e - int download_get_state( - int download_id, - ffi.Pointer state, - ) { - return _download_get_state( - download_id, - state, - ); - } - - late final _download_get_statePtr = _lookup< - ffi - .NativeFunction)>>( - 'download_get_state'); - late final _download_get_state = _download_get_statePtr - .asFunction)>(); - - /// @brief Gets the full path of the temporary file to store downloaded content. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @param[in] download_id The download ID - /// @param[out] temp_path The full path of temporary file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The download state must be one of the states after #DOWNLOAD_STATE_DOWNLOADING. - /// - /// @see download_set_state_changed_cb() - /// @see download_unset_state_changed_cb() - /// @see download_start() - int download_get_temp_path( - int download_id, - ffi.Pointer> temp_path, - ) { - return _download_get_temp_path( - download_id, - temp_path, - ); - } - - late final _download_get_temp_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, - ffi.Pointer>)>>('download_get_temp_path'); - late final _download_get_temp_path = _download_get_temp_pathPtr - .asFunction>)>(); - - /// @brief Sets the directory path of the temporary file used in the previous download request. - /// @details This is only useful when resuming download to make HTTP request header at the client side. - /// Otherwise, the path should be ignored internally. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks If the etag value is not present in the download database, it is useless to set the temporary path. \n - /// When resuming download, the data is attached at the end of this temporary file. - /// - /// @param[in] download_id The download ID - /// @param[out] path The full path of temporary file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state must be #DOWNLOAD_STATE_READY, #DOWNLOAD_STATE_FAILED, or #DOWNLOAD_STATE_CANCELED. - /// - /// @see download_get_etag() - int download_set_temp_file_path( - int download_id, - ffi.Pointer path, - ) { - return _download_set_temp_file_path( - download_id, - path, - ); - } - - late final _download_set_temp_file_pathPtr = _lookup< - ffi.NativeFunction)>>( - 'download_set_temp_file_path'); - late final _download_set_temp_file_path = _download_set_temp_file_pathPtr - .asFunction)>(); - - /// @brief Gets the content name of downloaded file. - /// - /// @details This can be defined with reference of HTTP response header data. - /// The content name can be received when HTTP response header is received. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @param[in] download_id The download ID - /// @param[out] content_name The content name for displaying to user - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The download state must be one of the states after #DOWNLOAD_STATE_DOWNLOADING. - /// - /// @see download_set_state_changed_cb() - /// @see download_unset_state_changed_cb() - /// @see download_start() - int download_get_content_name( - int download_id, - ffi.Pointer> content_name, - ) { - return _download_get_content_name( - download_id, - content_name, - ); - } - - late final _download_get_content_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer>)>>( - 'download_get_content_name'); - late final _download_get_content_name = _download_get_content_namePtr - .asFunction>)>(); - - /// @brief Gets the total size of downloaded content. - /// - /// @details This information is received from the server. If the server does not send the total size of the content, @a content_size is set to zero. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @param[in] download_id The download ID - /// @param[out] content_size The content size for displaying to user - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The download state must be one of the states after #DOWNLOAD_STATE_DOWNLOADING. - /// - /// @see download_set_state_changed_cb() - /// @see download_unset_state_changed_cb() - /// @see download_start() - int download_get_content_size( - int download_id, - ffi.Pointer content_size, - ) { - return _download_get_content_size( - download_id, - content_size, - ); - } - - late final _download_get_content_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, - ffi.Pointer)>>('download_get_content_size'); - late final _download_get_content_size = _download_get_content_sizePtr - .asFunction)>(); - - /// @brief Gets an error value when the download fails. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @param[in] download_id The download ID - /// @param[out] error The error value - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The download state must be #DOWNLOAD_STATE_FAILED. - /// @pre The download state must be #DOWNLOAD_STATE_CANCELED. - /// - /// @see download_set_state_changed_cb() - /// @see download_unset_state_changed_cb() - /// @see download_start() - /// @see download_error_e - int download_get_error( - int download_id, - ffi.Pointer error, - ) { - return _download_get_error( - download_id, - error, - ); - } - - late final _download_get_errorPtr = _lookup< - ffi - .NativeFunction)>>( - 'download_get_error'); - late final _download_get_error = _download_get_errorPtr - .asFunction)>(); - - /// @brief Gets a HTTP status code when a download error occurs. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @param[in] download_id The download ID - /// @param[out] HTTP_status The HTTP status code defined in RFC 2616 - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The download state must be #DOWNLOAD_STATE_FAILED. - /// - /// @see download_set_download_status_cb() - /// @see download_unset_download_status_cb() - /// @see download_start() - int download_get_http_status( - int download_id, - ffi.Pointer HTTP_status, - ) { - return _download_get_http_status( - download_id, - HTTP_status, - ); - } - - late final _download_get_http_statusPtr = _lookup< - ffi.NativeFunction)>>( - 'download_get_http_status'); - late final _download_get_http_status = _download_get_http_statusPtr - .asFunction)>(); - - /// @brief Sets an app control handle to register notification messages. - /// @details Three types of notification message can be posted: completion, failed and ongoing type. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks When the notification message is clicked, the action to take is decided by the app control handle. \n - /// If the app control handle is not set, the following default operation is executed when the notification message is clicked: \n - /// 1) download completed state - the viewer application is executed according to extension name of downloaded content, \n - /// 2) download failed state and ongoing state - the client application is executed. \n - /// This function should be called before starting the download. \n - /// The app control handle MUST BE FREED by the client when it is not used any more. - /// - /// @param[in] download_id The download ID - /// @param[in] type The enumeration type \n - /// See #download_notification_app_control_type_e. - /// @param[in] handle The app control handle pointer value - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state must be #DOWNLOAD_STATE_READY, #DOWNLOAD_STATE_FAILED, or #DOWNLOAD_STATE_CANCELED. - /// - /// @see download_set_notification_type() - /// @see download_get_notification_app_control() - int download_set_notification_app_control( - int download_id, - int type, - app_control_h handle, - ) { - return _download_set_notification_app_control( - download_id, - type, - handle, - ); - } - - late final _download_set_notification_app_controlPtr = _lookup< - ffi - .NativeFunction>( - 'download_set_notification_app_control'); - late final _download_set_notification_app_control = - _download_set_notification_app_controlPtr - .asFunction(); - - /// @brief Gets the app control handle (used previously to register notification messages) which is set by download_set_notification_app_control(). - /// - /// @details When the notification message is clicked, the action is decided by the app control handle. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks The app control handle MUST BE FREED by the client when it is not used any more. - /// - /// @param[in] download_id The download ID - /// @param[in] type The enumeration type \n - /// See #download_notification_app_control_type_e. - /// @param[out] handle The app control handle pointer value - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_NO_DATA The app control handle has not been set - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_set_notification_app_control() - int download_get_notification_app_control( - int download_id, - int type, - ffi.Pointer handle, - ) { - return _download_get_notification_app_control( - download_id, - type, - handle, - ); - } - - late final _download_get_notification_app_controlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Int32, ffi.Pointer)>>( - 'download_get_notification_app_control'); - late final _download_get_notification_app_control = - _download_get_notification_app_controlPtr - .asFunction)>(); - - /// @brief Sets the title of a notification. - /// - /// @details When registering a notification, the title is displayed in the title area of the notification message. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @param[in] download_id The download ID - /// @param[in] title The title for displaying to user - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre If a notification option is not enabled, this title is not shown to user. - /// - /// @see download_set_notification_type() - /// @see download_get_notification_title() - int download_set_notification_title( - int download_id, - ffi.Pointer title, - ) { - return _download_set_notification_title( - download_id, - title, - ); - } - - late final _download_set_notification_titlePtr = _lookup< - ffi.NativeFunction)>>( - 'download_set_notification_title'); - late final _download_set_notification_title = - _download_set_notification_titlePtr - .asFunction)>(); - - /// @brief Gets the title of the notification set by download_set_notification_title(). - /// - /// @details When registering a notification, the title is displayed in the title area of the notification message. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @param[in] download_id The download ID - /// @param[out] title The title for displaying to user - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_NO_DATA The title has not been set - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre It can get the title value before calling this API. - /// - /// @see download_set_notification_title() - int download_get_notification_title( - int download_id, - ffi.Pointer> title, - ) { - return _download_get_notification_title( - download_id, - title, - ); - } - - late final _download_get_notification_titlePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer>)>>( - 'download_get_notification_title'); - late final _download_get_notification_title = - _download_get_notification_titlePtr - .asFunction>)>(); - - /// @brief Sets the description of a notification. - /// - /// @details When registering a notification, the description is displayed in the description area of the notification message. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @param[in] download_id The download ID - /// @param[in] description The description for displaying to user - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre If the notification option is not enabled, this description is not shown to user. - /// - /// @see download_set_notification_type() - /// @see download_get_notification_description() - int download_set_notification_description( - int download_id, - ffi.Pointer description, - ) { - return _download_set_notification_description( - download_id, - description, - ); - } - - late final _download_set_notification_descriptionPtr = _lookup< - ffi.NativeFunction)>>( - 'download_set_notification_description'); - late final _download_set_notification_description = - _download_set_notification_descriptionPtr - .asFunction)>(); - - /// @brief Gets the description of a notification set by download_set_notification_description(). - /// - /// @details When registering a notification, the description is displayed in the description area of the notification message. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @param[in] download_id The download ID - /// @param[out] description The description for displaying to user - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_NO_DATA The description has not been set - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre It can get the title value before calling this API. - /// - /// @see download_set_notification_description() - int download_get_notification_description( - int download_id, - ffi.Pointer> description, - ) { - return _download_get_notification_description( - download_id, - description, - ); - } - - late final _download_get_notification_descriptionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer>)>>( - 'download_get_notification_description'); - late final _download_get_notification_description = - _download_get_notification_descriptionPtr - .asFunction>)>(); - - /// @brief Sets an option value to register notification messages. - /// @details Three types of notification message can be posted: completion, failed and ongoing type. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks When the notification message is clicked, the action to take is decided by the app control handle (set by download_set_notification_app_control()). \n - /// If the app control is not set, the following default operation is executed when the notification message is clicked: \n - /// 1) download completed state - the viewer application is executed according to extension name of downloaded content, \n - /// 2) download failed state and ongoing state - the client application is executed. \n - /// The default type is #DOWNLOAD_NOTIFICATION_TYPE_NONE. \n - /// This function should be called before starting the download. - /// - /// @param[in] download_id The download ID - /// @param[in] type The enumeration type \n - /// See #download_notification_type_e. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state must be #DOWNLOAD_STATE_READY, #DOWNLOAD_STATE_FAILED, or #DOWNLOAD_STATE_CANCELED. - /// - /// @see download_set_notification_app_control() - /// @see download_get_notification_type() - int download_set_notification_type( - int download_id, - int type, - ) { - return _download_set_notification_type( - download_id, - type, - ); - } - - late final _download_set_notification_typePtr = - _lookup>( - 'download_set_notification_type'); - late final _download_set_notification_type = - _download_set_notification_typePtr.asFunction(); - - /// @brief Gets an option value to register notification messages set by download_set_notification_type(). - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks When the notification message is clicked, the action is decided by the app control from download_set_notification_app_control(). \n - /// The default type is #DOWNLOAD_NOTIFICATION_TYPE_NONE. - /// - /// @param[in] download_id The download ID - /// @param[out] type The enumeration type \n - /// See #download_notification_type_e. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_set_notification_type() - int download_get_notification_type( - int download_id, - ffi.Pointer type, - ) { - return _download_get_notification_type( - download_id, - type, - ); - } - - late final _download_get_notification_typePtr = _lookup< - ffi - .NativeFunction)>>( - 'download_get_notification_type'); - late final _download_get_notification_type = - _download_get_notification_typePtr - .asFunction)>(); - - /// @brief Gets an etag value from the HTTP response header when making a HTTP request for resume. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks The etag value is available or not depending on the web server. \n - /// After download is started, it can get the etag value. - /// - /// @param[in] download_id The download ID - /// @param[out] etag The etag value - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_set_temp_file_path() - int download_get_etag( - int download_id, - ffi.Pointer> etag, - ) { - return _download_get_etag( - download_id, - etag, - ); - } - - late final _download_get_etagPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, - ffi.Pointer>)>>('download_get_etag'); - late final _download_get_etag = _download_get_etagPtr - .asFunction>)>(); - - /// @brief Gets the MIME type for the given file extension. - /// - /// @remarks The @a mime_type must be released with free() by you. - /// @param[in] file_extension The file extension without the leading dot ('.') - /// @param[out] mime_type The MIME type for the given file extension \n - /// The MIME type is 'application/octet-stream' if the given file extension is not associated with specific file formats - /// @return 0 on success, otherwise a negative error value. - /// @retval #MIME_TYPE_ERROR_NONE Successful - /// @retval #MIME_TYPE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MIME_TYPE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MIME_TYPE_ERROR_IO_ERROR Internal I/O error - /// @see mime_type_get_file_extension() - int mime_type_get_mime_type( - ffi.Pointer file_extension, - ffi.Pointer> mime_type, - ) { - return _mime_type_get_mime_type( - file_extension, - mime_type, - ); - } - - late final _mime_type_get_mime_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer>)>>('mime_type_get_mime_type'); - late final _mime_type_get_mime_type = _mime_type_get_mime_typePtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Gets the file extensions for the given MIME type. - /// - /// @remarks The @a file_extension must be released with free() by you. - /// @param[in] mime_type The MIME type - /// @param[out] file_extension The array of file extension without the leading dot ('.') - /// @param[out] length The length of the array of file extension or zero if there is none - /// @return 0 on success, otherwise a negative error value. - /// @retval #MIME_TYPE_ERROR_NONE Successful - /// @retval #MIME_TYPE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MIME_TYPE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MIME_TYPE_ERROR_IO_ERROR Internal I/O error - /// @see mime_type_get_mime_type() - int mime_type_get_file_extension( - ffi.Pointer mime_type, - ffi.Pointer>> file_extension, - ffi.Pointer length, - ) { - return _mime_type_get_file_extension( - mime_type, - file_extension, - length, - ); - } - - late final _mime_type_get_file_extensionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>>, - ffi.Pointer)>>('mime_type_get_file_extension'); - late final _mime_type_get_file_extension = - _mime_type_get_file_extensionPtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer>>, - ffi.Pointer)>(); - - /// @brief Gets the MIME type for the given data. - /// - /// @since_tizen 4.0 - /// @remarks The @a mime_type must be released with free() by you. - /// @param[in] data The stream of file data - /// @param[in] len The length of data - /// @param[out] mime_type The MIME type for the given file extension \n - /// The MIME type is 'application/octet-stream' if the given file extension is not associated with specific file formats - /// @return 0 on success, otherwise a negative error value. - /// @retval #MIME_TYPE_ERROR_NONE Successful - /// @retval #MIME_TYPE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MIME_TYPE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MIME_TYPE_ERROR_IO_ERROR Internal I/O error - int mime_type_get_mime_type_for_data( - ffi.Pointer data, - int len, - ffi.Pointer> mime_type, - ) { - return _mime_type_get_mime_type_for_data( - data, - len, - mime_type, - ); - } - - late final _mime_type_get_mime_type_for_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, - ffi.Pointer>)>>( - 'mime_type_get_mime_type_for_data'); - late final _mime_type_get_mime_type_for_data = - _mime_type_get_mime_type_for_dataPtr.asFunction< - int Function(ffi.Pointer, int, - ffi.Pointer>)>(); - - /// @brief Gets the MIME type for the given file path. - /// - /// @since_tizen 4.0 - /// @remarks The @a mime_type must be released with free() by you. - /// @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage. - /// @remarks http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. - /// @param[in] file_path The path of target file - /// @param[out] mime_type The MIME type for the given file extension \n - /// The MIME type is 'application/octet-stream' if the given file extension is not associated with specific file formats - /// @return 0 on success, otherwise a negative error value. - /// @retval #MIME_TYPE_ERROR_NONE Successful - /// @retval #MIME_TYPE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MIME_TYPE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MIME_TYPE_ERROR_IO_ERROR Internal I/O error - /// @retval #MIME_TYPE_ERROR_PERMISSION_DENIED Permission denined - int mime_type_get_mime_type_for_file( - ffi.Pointer file_path, - ffi.Pointer> mime_type, - ) { - return _mime_type_get_mime_type_for_file( - file_path, - mime_type, - ); - } - - late final _mime_type_get_mime_type_for_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer>)>>( - 'mime_type_get_mime_type_for_file'); - late final _mime_type_get_mime_type_for_file = - _mime_type_get_mime_type_for_filePtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Gets the icon name for the given MIME type. - /// - /// @since_tizen 4.0 - /// @remarks The @a icon must be released with free() by you. - /// @param[in] mime_type The MIME type - /// @param[out] icon The icon name for the given MIME type - /// @return 0 on success, otherwise a negative error value. - /// @retval #MIME_TYPE_ERROR_NONE Successful - /// @retval #MIME_TYPE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MIME_TYPE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MIME_TYPE_ERROR_IO_ERROR Internal I/O error - /// @see mime_type_get_mime_type() - int mime_type_get_icon( - ffi.Pointer mime_type, - ffi.Pointer> icon, - ) { - return _mime_type_get_icon( - mime_type, - icon, - ); - } - - late final _mime_type_get_iconPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer>)>>('mime_type_get_icon'); - late final _mime_type_get_icon = _mime_type_get_iconPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Gets the generic icon name for the given MIME type. - /// - /// @since_tizen 4.0 - /// @remarks The @a generic_icon must be released with free() by you. - /// @param[in] mime_type The MIME type - /// @param[out] generic_icon The generic icon name for the given MIME type - /// @return 0 on success, otherwise a negative error value. - /// @retval #MIME_TYPE_ERROR_NONE Successful - /// @retval #MIME_TYPE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MIME_TYPE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MIME_TYPE_ERROR_IO_ERROR Internal I/O error - /// @see mime_type_get_mime_type() - int mime_type_get_generic_icon( - ffi.Pointer mime_type, - ffi.Pointer> generic_icon, - ) { - return _mime_type_get_generic_icon( - mime_type, - generic_icon, - ); - } - - late final _mime_type_get_generic_iconPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer>)>>( - 'mime_type_get_generic_icon'); - late final _mime_type_get_generic_icon = - _mime_type_get_generic_iconPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Clones the audio metadata. - /// @details This function copies the audio metadata handle from a source to destination. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release the destination handle using audio_meta_destroy(). - /// - /// @param[out] dst The destination handle to the audio metadata - /// @param[in] src The source handle to the audio metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see audio_meta_destroy() - int audio_meta_clone( - ffi.Pointer dst, - audio_meta_h src, - ) { - return _audio_meta_clone( - dst, - src, - ); - } - - late final _audio_meta_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, audio_meta_h)>>('audio_meta_clone'); - late final _audio_meta_clone = _audio_meta_clonePtr - .asFunction, audio_meta_h)>(); - - /// @brief Destroys the audio metadata. - /// @details This function frees all resources related to the audio metadata handle. This handle - /// no longer can be used to perform any operation. A new handle has to - /// be created before the next use. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] audio The audio metadata handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre Get a copy of audio metadata handle handle by calling audio_meta_clone(). - /// - /// @see audio_meta_clone() - int audio_meta_destroy( - audio_meta_h audio, - ) { - return _audio_meta_destroy( - audio, - ); - } - - late final _audio_meta_destroyPtr = - _lookup>( - 'audio_meta_destroy'); - late final _audio_meta_destroy = - _audio_meta_destroyPtr.asFunction(); - - /// @brief Gets the ID of the media of the given audio metadata. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a media_id using free(). - /// - /// @param[in] audio The audio metadata handle - /// @param[out] media_id The ID of the audio - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int audio_meta_get_media_id( - audio_meta_h audio, - ffi.Pointer> media_id, - ) { - return _audio_meta_get_media_id( - audio, - media_id, - ); - } - - late final _audio_meta_get_media_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_meta_h, - ffi.Pointer>)>>('audio_meta_get_media_id'); - late final _audio_meta_get_media_id = _audio_meta_get_media_idPtr.asFunction< - int Function(audio_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the album of the given audio metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no album info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a album using free(). - /// - /// @param[in] audio The audio metadata handle - /// @param[out] album The album of the audio metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int audio_meta_get_album( - audio_meta_h audio, - ffi.Pointer> album, - ) { - return _audio_meta_get_album( - audio, - album, - ); - } - - late final _audio_meta_get_albumPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_meta_h, - ffi.Pointer>)>>('audio_meta_get_album'); - late final _audio_meta_get_album = _audio_meta_get_albumPtr.asFunction< - int Function(audio_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the artist of the given audio metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no artist info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a artist using free(). - /// - /// @param[in] audio The audio metadata handle - /// @param[out] artist The artist of the audio metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int audio_meta_get_artist( - audio_meta_h audio, - ffi.Pointer> artist, - ) { - return _audio_meta_get_artist( - audio, - artist, - ); - } - - late final _audio_meta_get_artistPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_meta_h, - ffi.Pointer>)>>('audio_meta_get_artist'); - late final _audio_meta_get_artist = _audio_meta_get_artistPtr.asFunction< - int Function(audio_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the album artist of the given audio metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no album artist info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a album_artist using free(). - /// - /// @param[in] audio The audio metadata handle - /// @param[out] album_artist The album artist of the audio metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int audio_meta_get_album_artist( - audio_meta_h audio, - ffi.Pointer> album_artist, - ) { - return _audio_meta_get_album_artist( - audio, - album_artist, - ); - } - - late final _audio_meta_get_album_artistPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - audio_meta_h, ffi.Pointer>)>>( - 'audio_meta_get_album_artist'); - late final _audio_meta_get_album_artist = - _audio_meta_get_album_artistPtr.asFunction< - int Function(audio_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the genre of the given audio metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no genre info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a genre using free(). - /// - /// @param[in] audio The audio metadata handle - /// @param[out] genre The genre of the audio metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int audio_meta_get_genre( - audio_meta_h audio, - ffi.Pointer> genre, - ) { - return _audio_meta_get_genre( - audio, - genre, - ); - } - - late final _audio_meta_get_genrePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_meta_h, - ffi.Pointer>)>>('audio_meta_get_genre'); - late final _audio_meta_get_genre = _audio_meta_get_genrePtr.asFunction< - int Function(audio_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the composer of the given audio metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no composer info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a composer using free(). - /// - /// @param[in] audio The audio metadata handle - /// @param[out] composer The composer of the audio metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int audio_meta_get_composer( - audio_meta_h audio, - ffi.Pointer> composer, - ) { - return _audio_meta_get_composer( - audio, - composer, - ); - } - - late final _audio_meta_get_composerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_meta_h, - ffi.Pointer>)>>('audio_meta_get_composer'); - late final _audio_meta_get_composer = _audio_meta_get_composerPtr.asFunction< - int Function(audio_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the year of the given audio metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no year info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a year using free(). - /// - /// @param[in] audio The audio metadata handle - /// @param[out] year The year of the audio metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int audio_meta_get_year( - audio_meta_h audio, - ffi.Pointer> year, - ) { - return _audio_meta_get_year( - audio, - year, - ); - } - - late final _audio_meta_get_yearPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_meta_h, - ffi.Pointer>)>>('audio_meta_get_year'); - late final _audio_meta_get_year = _audio_meta_get_yearPtr.asFunction< - int Function(audio_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the recorded date of the given audio metadata. - /// @details The recorded date is got from audio file's metadata. Some formats like mp4 use UTC and the rest can be different. \n - /// So, please refer to the format specification if needed. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a recorded_date using free(). - /// - /// @param[in] audio The audio metadata handle - /// @param[out] recorded_date The recorded date of the audio metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int audio_meta_get_recorded_date( - audio_meta_h audio, - ffi.Pointer> recorded_date, - ) { - return _audio_meta_get_recorded_date( - audio, - recorded_date, - ); - } - - late final _audio_meta_get_recorded_datePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - audio_meta_h, ffi.Pointer>)>>( - 'audio_meta_get_recorded_date'); - late final _audio_meta_get_recorded_date = - _audio_meta_get_recorded_datePtr.asFunction< - int Function(audio_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the copyright notice of the given audio metadata. - /// @details If the media content has no copyright info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a copyright using free(). - /// - /// @param[in] audio The audio metadata handle - /// @param[out] copyright The copyright of the audio metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int audio_meta_get_copyright( - audio_meta_h audio, - ffi.Pointer> copyright, - ) { - return _audio_meta_get_copyright( - audio, - copyright, - ); - } - - late final _audio_meta_get_copyrightPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_meta_h, - ffi.Pointer>)>>('audio_meta_get_copyright'); - late final _audio_meta_get_copyright = - _audio_meta_get_copyrightPtr.asFunction< - int Function(audio_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the track number of the given audio metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no track info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a track_num using free(). - /// - /// @param[in] audio The audio metadata handle - /// @param[out] track_num The audio track number of the audio metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int audio_meta_get_track_num( - audio_meta_h audio, - ffi.Pointer> track_num, - ) { - return _audio_meta_get_track_num( - audio, - track_num, - ); - } - - late final _audio_meta_get_track_numPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_meta_h, - ffi.Pointer>)>>('audio_meta_get_track_num'); - late final _audio_meta_get_track_num = - _audio_meta_get_track_numPtr.asFunction< - int Function(audio_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the bitrate of the given audio metadata in bitrate per second. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] audio The audio metadata handle - /// @param[out] bit_rate The audio bitrate in bit per second [bps] - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int audio_meta_get_bit_rate( - audio_meta_h audio, - ffi.Pointer bit_rate, - ) { - return _audio_meta_get_bit_rate( - audio, - bit_rate, - ); - } - - late final _audio_meta_get_bit_ratePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - audio_meta_h, ffi.Pointer)>>('audio_meta_get_bit_rate'); - late final _audio_meta_get_bit_rate = _audio_meta_get_bit_ratePtr - .asFunction)>(); - - /// @brief Gets bit per sample of the given audio metadata. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param [in] audio The handle to the audio metadata - /// @param [out] bitpersample The audio bit per sample - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int audio_meta_get_bitpersample( - audio_meta_h audio, - ffi.Pointer bitpersample, - ) { - return _audio_meta_get_bitpersample( - audio, - bitpersample, - ); - } - - late final _audio_meta_get_bitpersamplePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_meta_h, - ffi.Pointer)>>('audio_meta_get_bitpersample'); - late final _audio_meta_get_bitpersample = _audio_meta_get_bitpersamplePtr - .asFunction)>(); - - /// @brief Gets the sample rate of the given audio metadata. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] audio The audio metadata handle - /// @param[out] sample_rate The audio sample rate[hz] - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int audio_meta_get_sample_rate( - audio_meta_h audio, - ffi.Pointer sample_rate, - ) { - return _audio_meta_get_sample_rate( - audio, - sample_rate, - ); - } - - late final _audio_meta_get_sample_ratePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_meta_h, - ffi.Pointer)>>('audio_meta_get_sample_rate'); - late final _audio_meta_get_sample_rate = _audio_meta_get_sample_ratePtr - .asFunction)>(); - - /// @brief Gets the channel of the given audio metadata. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] audio The audio metadata handle - /// @param[out] channel The channel of the audio - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int audio_meta_get_channel( - audio_meta_h audio, - ffi.Pointer channel, - ) { - return _audio_meta_get_channel( - audio, - channel, - ); - } - - late final _audio_meta_get_channelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - audio_meta_h, ffi.Pointer)>>('audio_meta_get_channel'); - late final _audio_meta_get_channel = _audio_meta_get_channelPtr - .asFunction)>(); - - /// @brief Gets the track duration of the given audio metadata. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] audio The audio metadata handle - /// @param[out] duration The audio file duration - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int audio_meta_get_duration( - audio_meta_h audio, - ffi.Pointer duration, - ) { - return _audio_meta_get_duration( - audio, - duration, - ); - } - - late final _audio_meta_get_durationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - audio_meta_h, ffi.Pointer)>>('audio_meta_get_duration'); - late final _audio_meta_get_duration = _audio_meta_get_durationPtr - .asFunction)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - /// This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application. - /// @brief Gets the number of times the given audio has been played. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] audio The audio metadata handle - /// @param[out] played_count The counter of the audio played - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int audio_meta_get_played_count( - audio_meta_h audio, - ffi.Pointer played_count, - ) { - return _audio_meta_get_played_count( - audio, - played_count, - ); - } - - late final _audio_meta_get_played_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_meta_h, - ffi.Pointer)>>('audio_meta_get_played_count'); - late final _audio_meta_get_played_count = _audio_meta_get_played_countPtr - .asFunction)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - /// This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application. - /// @brief Gets the last played time parameter of the audio. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] audio The audio metadata handle - /// @param[out] played_time The last played time of the audio - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int audio_meta_get_played_time( - audio_meta_h audio, - ffi.Pointer played_time, - ) { - return _audio_meta_get_played_time( - audio, - played_time, - ); - } - - late final _audio_meta_get_played_timePtr = _lookup< - ffi - .NativeFunction)>>( - 'audio_meta_get_played_time'); - late final _audio_meta_get_played_time = _audio_meta_get_played_timePtr - .asFunction)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - /// This function does not guarantee independence of the played position value between applications. It is recommended that the value is managed by the application. - /// @brief Gets the played position parameter of the audio. - /// @details This function returns the elapsed playback position parameter of the audio as a period - /// starting from the beginning of the track. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] audio The audio metadata handle - /// @param[out] played_position The elapsed time of the audio - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int audio_meta_get_played_position( - audio_meta_h audio, - ffi.Pointer played_position, - ) { - return _audio_meta_get_played_position( - audio, - played_position, - ); - } - - late final _audio_meta_get_played_positionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_meta_h, - ffi.Pointer)>>('audio_meta_get_played_position'); - late final _audio_meta_get_played_position = - _audio_meta_get_played_positionPtr - .asFunction)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - /// This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application. - /// @brief Sets the played count of the audio. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] audio The audio metadata handle - /// @param[in] played_count The played count of the audio - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int audio_meta_set_played_count( - audio_meta_h audio, - int played_count, - ) { - return _audio_meta_set_played_count( - audio, - played_count, - ); - } - - late final _audio_meta_set_played_countPtr = - _lookup>( - 'audio_meta_set_played_count'); - late final _audio_meta_set_played_count = _audio_meta_set_played_countPtr - .asFunction(); - - /// @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - /// This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application. - /// @brief Sets the last played time of the audio. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] audio The audio metadata handle - /// @param[in] played_time The last played time of the audio - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int audio_meta_set_played_time( - audio_meta_h audio, - int played_time, - ) { - return _audio_meta_set_played_time( - audio, - played_time, - ); - } - - late final _audio_meta_set_played_timePtr = - _lookup>( - 'audio_meta_set_played_time'); - late final _audio_meta_set_played_time = _audio_meta_set_played_timePtr - .asFunction(); - - /// @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - /// This function does not guarantee independence of the played position value between applications. It is recommended that the value is managed by the application. - /// @brief Sets the played position of the audio. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks It is NOT recommended to use this attribute for your application-specific purpose because this attribute can be overwritten by other applications (even 0). - /// - /// @param[in] audio The audio metadata handle - /// @param[in] played_position The played position of the audio - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int audio_meta_set_played_position( - audio_meta_h audio, - int played_position, - ) { - return _audio_meta_set_played_position( - audio, - played_position, - ); - } - - late final _audio_meta_set_played_positionPtr = - _lookup>( - 'audio_meta_set_played_position'); - late final _audio_meta_set_played_position = - _audio_meta_set_played_positionPtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. Related setter functions are deprecated, therefore this function is not needed anymore. - /// @brief Updates an audio metadata with modified attributes in the media database. - /// @details The function updates the given audio meta in the media database. The function should be called after any change in audio attributes, to be updated to the media - /// database. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @remarks Do not call this function in callback function of foreach function like media_info_foreach_media_from_db(). - /// - /// @param[in] audio The audio metadata handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int audio_meta_update_to_db( - audio_meta_h audio, - ) { - return _audio_meta_update_to_db( - audio, - ); - } - - late final _audio_meta_update_to_dbPtr = - _lookup>( - 'audio_meta_update_to_db'); - late final _audio_meta_update_to_db = - _audio_meta_update_to_dbPtr.asFunction(); - - /// @brief Creates a media filter handle. - /// @details This function creates a media filter handle. The handle can be - /// used to get the filtered information based on filter properties i.e. offset, count, condition for searching and order. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release the @a filter handle using media_info_filter_destroy(). - /// - /// @param[out] filter A handle to the media filter - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see media_filter_destroy() - int media_filter_create( - ffi.Pointer filter, - ) { - return _media_filter_create( - filter, - ); - } - - late final _media_filter_createPtr = - _lookup)>>( - 'media_filter_create'); - late final _media_filter_create = - _media_filter_createPtr.asFunction)>(); - - /// @brief Destroys a media filter handle. - /// @details The function frees all resources related to the media filter handle. The filter - /// handle no longer can be used to perform any operation. A new filter handle - /// has to be created before the next usage. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The handle to the media filter - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_filter_create() - int media_filter_destroy( - filter_h filter, - ) { - return _media_filter_destroy( - filter, - ); - } - - late final _media_filter_destroyPtr = - _lookup>( - 'media_filter_destroy'); - late final _media_filter_destroy = - _media_filter_destroyPtr.asFunction(); - - /// @brief Sets the media filter offset and count. - /// @details This function sets the @a offset and @a count for the given filter used to limit number of items returned. - /// For example, if you set the @a offset as @c 10 and @a count as @c 5, then only searched data from @c 10 to @c 14 will be returned when the filter is used with foreach functions. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The handle to the media filter - /// @param[in] offset The start position of the given filter (Starting from zero) - /// @param[in] count The number of items to be searched with respect to the offset - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_filter_create() - /// @see media_filter_destroy() - int media_filter_set_offset( - filter_h filter, - int offset, - int count, - ) { - return _media_filter_set_offset( - filter, - offset, - count, - ); - } - - late final _media_filter_set_offsetPtr = - _lookup>( - 'media_filter_set_offset'); - late final _media_filter_set_offset = _media_filter_set_offsetPtr - .asFunction(); - - /// @brief Sets the @a condition for the given @a filter. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The handle to the media filter - /// @param[in] condition The condition which is used WHERE clause on a query - /// @param[in] collate_type The collate type for comparing two strings - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_filter_create() - /// @see media_filter_destroy() - int media_filter_set_condition( - filter_h filter, - ffi.Pointer condition, - int collate_type, - ) { - return _media_filter_set_condition( - filter, - condition, - collate_type, - ); - } - - late final _media_filter_set_conditionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filter_h, ffi.Pointer, - ffi.Int32)>>('media_filter_set_condition'); - late final _media_filter_set_condition = _media_filter_set_conditionPtr - .asFunction, int)>(); - - /// @brief Sets the media filter content @a order and order keyword i.e. either descending or ascending. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The handle to the media filter - /// @param[in] order_type The search order type - /// @param[in] order_keyword The search order keyword - /// @param[in] collate_type The collate type for comparing two strings - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_filter_create() - /// @see media_filter_destroy() - int media_filter_set_order( - filter_h filter, - int order_type, - ffi.Pointer order_keyword, - int collate_type, - ) { - return _media_filter_set_order( - filter, - order_type, - order_keyword, - collate_type, - ); - } - - late final _media_filter_set_orderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filter_h, ffi.Int32, ffi.Pointer, - ffi.Int32)>>('media_filter_set_order'); - late final _media_filter_set_order = _media_filter_set_orderPtr - .asFunction, int)>(); - - /// @brief Sets the @a storage id for the given @a filter. - /// @details You can use this API when you want to search items only in the specific storage - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] filter The handle to the media filter - /// @param[in] storage_id The storage_id for browsing or searching - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_filter_create() - /// @see media_filter_destroy() - int media_filter_set_storage( - filter_h filter, - ffi.Pointer storage_id, - ) { - return _media_filter_set_storage( - filter, - storage_id, - ); - } - - late final _media_filter_set_storagePtr = _lookup< - ffi - .NativeFunction)>>( - 'media_filter_set_storage'); - late final _media_filter_set_storage = _media_filter_set_storagePtr - .asFunction)>(); - - /// @brief Gets the @a offset and @a count for the given @a filter used to limit the number of items returned. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The handle to the media filter - /// @param[out] offset The start position of the given filter (Starting from zero) - /// @param[out] count The number of items to be searched with respect to the offset - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_filter_create() - /// @see media_filter_destroy() - int media_filter_get_offset( - filter_h filter, - ffi.Pointer offset, - ffi.Pointer count, - ) { - return _media_filter_get_offset( - filter, - offset, - count, - ); - } - - late final _media_filter_get_offsetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filter_h, ffi.Pointer, - ffi.Pointer)>>('media_filter_get_offset'); - late final _media_filter_get_offset = _media_filter_get_offsetPtr.asFunction< - int Function(filter_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the @a condition for the given @a filter. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a condition using free(). - /// - /// @param[in] filter The handle to the media info filter - /// @param[out] condition The condition which is used WHERE clause on a query - /// @param[out] collate_type The collate type for comparing two strings - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_filter_create() - /// @see media_filter_destroy() - int media_filter_get_condition( - filter_h filter, - ffi.Pointer> condition, - ffi.Pointer collate_type, - ) { - return _media_filter_get_condition( - filter, - condition, - collate_type, - ); - } - - late final _media_filter_get_conditionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filter_h, ffi.Pointer>, - ffi.Pointer)>>('media_filter_get_condition'); - late final _media_filter_get_condition = - _media_filter_get_conditionPtr.asFunction< - int Function(filter_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Gets the media filter's content @a order and order keyword i.e. either descending or ascending. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a order_keyword using free(). - /// - /// @param[in] filter The handle to the media filter - /// @param[out] order_type The search order type - /// @param[out] order_keyword The search order keyword - /// @param[out] collate_type The collate type for comparing two strings - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_filter_create() - /// @see media_filter_destroy() - int media_filter_get_order( - filter_h filter, - ffi.Pointer order_type, - ffi.Pointer> order_keyword, - ffi.Pointer collate_type, - ) { - return _media_filter_get_order( - filter, - order_type, - order_keyword, - collate_type, - ); - } - - late final _media_filter_get_orderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - filter_h, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('media_filter_get_order'); - late final _media_filter_get_order = _media_filter_get_orderPtr.asFunction< - int Function(filter_h, ffi.Pointer, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Get the @a storage id for given @a filter. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks You must release @a storage_id using free(). - /// - /// @param[in] filter The handle to media info filter - /// @param[out] storage_id The storage_id which is used in filter - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_filter_create() - /// @see media_filter_destroy() - int media_filter_get_storage( - filter_h filter, - ffi.Pointer> storage_id, - ) { - return _media_filter_get_storage( - filter, - storage_id, - ); - } - - late final _media_filter_get_storagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filter_h, - ffi.Pointer>)>>('media_filter_get_storage'); - late final _media_filter_get_storage = _media_filter_get_storagePtr - .asFunction>)>(); - - /// @brief Gets the count of folder for the passed @a filter from the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The handle to filter \n - /// To allow searching over different content types, you should use #filter_h. - /// @param[out] folder_count The count of the media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_folder_get_folder_count_from_db( - filter_h filter, - ffi.Pointer folder_count, - ) { - return _media_folder_get_folder_count_from_db( - filter, - folder_count, - ); - } - - late final _media_folder_get_folder_count_from_dbPtr = _lookup< - ffi.NativeFunction)>>( - 'media_folder_get_folder_count_from_db'); - late final _media_folder_get_folder_count_from_db = - _media_folder_get_folder_count_from_dbPtr - .asFunction)>(); - - /// @brief Iterates through available media folders with optional @a filter from the media database. - /// @details This function gets the media folder meeting the given @a filter. - /// The @a callback function will be invoked for every retrieved - /// folder. If @c NULL is passed to the @a filter, no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks Do not call updating DB fuction like media_folder_update_to_db() in your callback function, your callback function is invoked as inline function.\n - /// So, your callback function is in read state in SQLite. When you are in read state, sometimes you do not update DB. \n - /// We do not recommend you call updating DB function in callback of foreach function. - /// - /// @param[in] filter The handle to the media folder filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @pre A filter handle has to be created by calling media_filter_create(). - /// @post This function invokes media_folder_cb(). - /// - /// @see media_content_connect() - /// @see media_folder_cb() - /// @see media_filter_create() - int media_folder_foreach_folder_from_db( - filter_h filter, - media_folder_cb callback, - ffi.Pointer user_data, - ) { - return _media_folder_foreach_folder_from_db( - filter, - callback, - user_data, - ); - } - - late final _media_folder_foreach_folder_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filter_h, media_folder_cb, - ffi.Pointer)>>('media_folder_foreach_folder_from_db'); - late final _media_folder_foreach_folder_from_db = - _media_folder_foreach_folder_from_dbPtr.asFunction< - int Function(filter_h, media_folder_cb, ffi.Pointer)>(); - - /// @brief Gets the count of media files for the passed @a filter in the given @a folder from the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] folder_id The ID of the media folder - /// @param[in] filter The filter of the media content - /// @param[out] media_count The count of media folder items - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_folder_get_media_count_from_db( - ffi.Pointer folder_id, - filter_h filter, - ffi.Pointer media_count, - ) { - return _media_folder_get_media_count_from_db( - folder_id, - filter, - media_count, - ); - } - - late final _media_folder_get_media_count_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, filter_h, - ffi.Pointer)>>('media_folder_get_media_count_from_db'); - late final _media_folder_get_media_count_from_db = - _media_folder_get_media_count_from_dbPtr.asFunction< - int Function( - ffi.Pointer, filter_h, ffi.Pointer)>(); - - /// @brief Iterates through the media files with an optional @a filter in the given @a folder from the media database. - /// @details This function gets all media files associated with the given folder and - /// meeting desired filter option and calls @a callback for - /// every retrieved media item. If @c NULL is passed to the @a filter, no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks Do not call updating DB function like media_info_update_to_db(), media_info_refresh_metadata_to_db(), audio_meta_update_to_db(), image_meta_update_to_db() and video_meta_update_to_db() in your callback function, - /// your callback function is invoked as inline function. \n - /// So, your callback function is in read state in SQLite. When you are in read state, sometimes you do not update DB. \n - /// We do not recommend you call updating DB function in callback of foreach function. - /// - /// @param[in] folder_id The ID of the media folder - /// @param[in] filter The handle to the media info filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_info_cb(). - /// - /// @see #media_info_cb - /// @see media_content_connect() - /// @see media_filter_create() - int media_folder_foreach_media_from_db( - ffi.Pointer folder_id, - filter_h filter, - media_info_cb callback, - ffi.Pointer user_data, - ) { - return _media_folder_foreach_media_from_db( - folder_id, - filter, - callback, - user_data, - ); - } - - late final _media_folder_foreach_media_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, filter_h, media_info_cb, - ffi.Pointer)>>('media_folder_foreach_media_from_db'); - late final _media_folder_foreach_media_from_db = - _media_folder_foreach_media_from_dbPtr.asFunction< - int Function(ffi.Pointer, filter_h, media_info_cb, - ffi.Pointer)>(); - - /// @brief Clones the media folder. - /// @details This function copies the media folder handle from a source to - /// destination. There is no media_folder_create() function. The media_folder_h is created internally and available through - /// media folder foreach function such as media_folder_foreach_folder_from_db(). To use this handle outside of these foreach functions, - /// use this function. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The destination handle must be released with media_folder_destroy(). - /// - /// @param[out] dst The destination handle to the media folder - /// @param[in] src The source handle to the media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_folder_destroy() - /// @see media_folder_foreach_folder_from_db() - int media_folder_clone( - ffi.Pointer dst, - media_folder_h src, - ) { - return _media_folder_clone( - dst, - src, - ); - } - - late final _media_folder_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - media_folder_h)>>('media_folder_clone'); - late final _media_folder_clone = _media_folder_clonePtr - .asFunction, media_folder_h)>(); - - /// @brief Destroys the media folder. - /// @details The function frees all resources related to the folder handle. This handle - /// no longer can be used to perform any operation. A new handle has to - /// be created before the next use. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] folder The handle to the media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre A copy of the media folder handle created by calling media_folder_clone(). - /// - /// @see media_folder_clone() - int media_folder_destroy( - media_folder_h folder, - ) { - return _media_folder_destroy( - folder, - ); - } - - late final _media_folder_destroyPtr = - _lookup>( - 'media_folder_destroy'); - late final _media_folder_destroy = - _media_folder_destroyPtr.asFunction(); - - /// @brief Gets the media folder ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a folder_id using free(). - /// - /// @param[in] folder The handle to the media folder - /// @param[out] folder_id The ID of the media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_folder_get_folder_id( - media_folder_h folder, - ffi.Pointer> folder_id, - ) { - return _media_folder_get_folder_id( - folder, - folder_id, - ); - } - - late final _media_folder_get_folder_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_folder_h, ffi.Pointer>)>>( - 'media_folder_get_folder_id'); - late final _media_folder_get_folder_id = - _media_folder_get_folder_idPtr.asFunction< - int Function(media_folder_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Gets the parent folder ID. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks You must release @a parent_folder_id using free(). - /// - /// @param[in] folder The handle to the media folder - /// @param[out] parent_folder_id The ID of the upper media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_folder_get_parent_folder_id( - media_folder_h folder, - ffi.Pointer> parent_folder_id, - ) { - return _media_folder_get_parent_folder_id( - folder, - parent_folder_id, - ); - } - - late final _media_folder_get_parent_folder_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_folder_h, ffi.Pointer>)>>( - 'media_folder_get_parent_folder_id'); - late final _media_folder_get_parent_folder_id = - _media_folder_get_parent_folder_idPtr.asFunction< - int Function(media_folder_h, ffi.Pointer>)>(); - - /// @brief Gets the absolute path to the media folder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a path using free(). - /// - /// @param[in] folder The handle to the media folder - /// @param[out] path The path of the media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_folder_get_path( - media_folder_h folder, - ffi.Pointer> path, - ) { - return _media_folder_get_path( - folder, - path, - ); - } - - late final _media_folder_get_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_folder_h, - ffi.Pointer>)>>('media_folder_get_path'); - late final _media_folder_get_path = _media_folder_get_pathPtr.asFunction< - int Function(media_folder_h, ffi.Pointer>)>(); - - /// @brief Gets the media folder name. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a folder_name using free(). - /// - /// @param[in] folder The handle to the media folder - /// @param[out] folder_name The name of the media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_folder_get_name( - media_folder_h folder, - ffi.Pointer> folder_name, - ) { - return _media_folder_get_name( - folder, - folder_name, - ); - } - - late final _media_folder_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_folder_h, - ffi.Pointer>)>>('media_folder_get_name'); - late final _media_folder_get_name = _media_folder_get_namePtr.asFunction< - int Function(media_folder_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Gets the modified date of the folder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] folder The handle to the media folder - /// @param[out] date The modified date of the folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_folder_get_modified_time( - media_folder_h folder, - ffi.Pointer date, - ) { - return _media_folder_get_modified_time( - folder, - date, - ); - } - - late final _media_folder_get_modified_timePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_folder_h, - ffi.Pointer)>>('media_folder_get_modified_time'); - late final _media_folder_get_modified_time = - _media_folder_get_modified_timePtr - .asFunction)>(); - - /// @brief Gets the folder storage type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] folder The handle to the media folder - /// @param[out] storage_type The storage type of the media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_folder_get_storage_type( - media_folder_h folder, - ffi.Pointer storage_type, - ) { - return _media_folder_get_storage_type( - folder, - storage_type, - ); - } - - late final _media_folder_get_storage_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_folder_h, - ffi.Pointer)>>('media_folder_get_storage_type'); - late final _media_folder_get_storage_type = _media_folder_get_storage_typePtr - .asFunction)>(); - - /// @brief Gets the storage id of the folder. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks You must release @a storage_id using free(). - /// - /// @param[in] folder The handle to the media folder - /// @param[out] storage_id The storage id of the media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_folder_get_storage_id( - media_folder_h folder, - ffi.Pointer> storage_id, - ) { - return _media_folder_get_storage_id( - folder, - storage_id, - ); - } - - late final _media_folder_get_storage_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_folder_h, ffi.Pointer>)>>( - 'media_folder_get_storage_id'); - late final _media_folder_get_storage_id = - _media_folder_get_storage_idPtr.asFunction< - int Function(media_folder_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. \n - /// This function does not guarantee order independence between applications. It is recommended that the viewing order is managed by the application. - /// - /// @brief Gets the folder viewing order. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] folder The handle to the media folder - /// @param[out] order The viewing order of the media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_folder_update_to_db() - int media_folder_get_order( - media_folder_h folder, - ffi.Pointer order, - ) { - return _media_folder_get_order( - folder, - order, - ); - } - - late final _media_folder_get_orderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_folder_h, ffi.Pointer)>>('media_folder_get_order'); - late final _media_folder_get_order = _media_folder_get_orderPtr - .asFunction)>(); - - /// @brief Gets the media folder from the media database. - /// - /// @details This function creates a new media folder handle from the media database by the given @a folder_id. - /// Media folder will be created, which is filled with folder information. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a folder using media_folder_destroy(). - /// - /// @param[in] folder_id The ID of the media folder - /// @param[out] folder The media folder handle associated with the folder ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_folder_destroy() - int media_folder_get_folder_from_db( - ffi.Pointer folder_id, - ffi.Pointer folder, - ) { - return _media_folder_get_folder_from_db( - folder_id, - folder, - ); - } - - late final _media_folder_get_folder_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('media_folder_get_folder_from_db'); - late final _media_folder_get_folder_from_db = - _media_folder_get_folder_from_dbPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. Use media_content_scan_folder() or media_info_move_to_db() instead. - /// @brief Sets the folder name. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] folder The handle to the media folder - /// @param[in] name The name of the media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - int media_folder_set_name( - media_folder_h folder, - ffi.Pointer name, - ) { - return _media_folder_set_name( - folder, - name, - ); - } - - late final _media_folder_set_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_folder_h, ffi.Pointer)>>('media_folder_set_name'); - late final _media_folder_set_name = _media_folder_set_namePtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. \n - /// This function does not guarantee order independence between applications. It is recommended that the viewing order is managed by the application. - /// @brief Sets the folder viewing order. - /// @details If you set the order value for each folder, you can sort in ascending or descending order as the set order values using the filter. \n - /// Moreover, more detailed settings are possible when used with the filter. \n - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks If you don't set the order value, the order value will be set default value. Default is 0. \n - /// If you don't use the filter, the set order value does not effect the folder viewing order. - /// - /// @param[in] folder The handle to the media folder - /// @param[in] order The viewing order of the media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_folder_set_order( - media_folder_h folder, - int order, - ) { - return _media_folder_set_order( - folder, - order, - ); - } - - late final _media_folder_set_orderPtr = - _lookup>( - 'media_folder_set_order'); - late final _media_folder_set_order = _media_folder_set_orderPtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. Related setter functions are deprecated, therefore this function is not needed anymore. - /// @brief Updates the media folder to the media database. - /// - /// @details The function updates the given media folder in the media database. The function should be called after any change in folder attributes, to be updated to the media - /// database. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @param[in] folder The handle to the media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_folder_destroy() - int media_folder_update_to_db( - media_folder_h folder, - ) { - return _media_folder_update_to_db( - folder, - ); - } - - late final _media_folder_update_to_dbPtr = - _lookup>( - 'media_folder_update_to_db'); - late final _media_folder_update_to_db = - _media_folder_update_to_dbPtr.asFunction(); - - /// @brief Clones the image metadata. - /// @details The function copies the image metadata handle from a source to destination. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The destination handle must be released with image_meta_destroy(). - /// - /// @param[out] dst The destination handle to the image metadata - /// @param[in] src The source handle to the image metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see image_meta_destroy() - int image_meta_clone( - ffi.Pointer dst, - image_meta_h src, - ) { - return _image_meta_clone( - dst, - src, - ); - } - - late final _image_meta_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, image_meta_h)>>('image_meta_clone'); - late final _image_meta_clone = _image_meta_clonePtr - .asFunction, image_meta_h)>(); - - /// @brief Destroys the image metadata. - /// @details The function frees all resources related to the image metadata handle. This handle - /// no longer can be used to perform any operation. A new handle has to - /// be created before next usage. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] image The image metadata handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre Get a copy of image_meta handle by calling image_meta_clone(). - /// - /// @see image_meta_clone() - int image_meta_destroy( - image_meta_h image, - ) { - return _image_meta_destroy( - image, - ); - } - - late final _image_meta_destroyPtr = - _lookup>( - 'image_meta_destroy'); - late final _image_meta_destroy = - _image_meta_destroyPtr.asFunction(); - - /// @brief Gets the ID of an image. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] image The image metadata handle - /// @param[out] media_id The ID of an image - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int image_meta_get_media_id( - image_meta_h image, - ffi.Pointer> media_id, - ) { - return _image_meta_get_media_id( - image, - media_id, - ); - } - - late final _image_meta_get_media_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(image_meta_h, - ffi.Pointer>)>>('image_meta_get_media_id'); - late final _image_meta_get_media_id = _image_meta_get_media_idPtr.asFunction< - int Function(image_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the image width in pixels. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] image The image metadata handle - /// @param[out] width The image width in pixels - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int image_meta_get_width( - image_meta_h image, - ffi.Pointer width, - ) { - return _image_meta_get_width( - image, - width, - ); - } - - late final _image_meta_get_widthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - image_meta_h, ffi.Pointer)>>('image_meta_get_width'); - late final _image_meta_get_width = _image_meta_get_widthPtr - .asFunction)>(); - - /// @brief Gets the image height in pixels. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] image The image metadata handle - /// @param[out] height The image height in pixels - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int image_meta_get_height( - image_meta_h image, - ffi.Pointer height, - ) { - return _image_meta_get_height( - image, - height, - ); - } - - late final _image_meta_get_heightPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - image_meta_h, ffi.Pointer)>>('image_meta_get_height'); - late final _image_meta_get_height = _image_meta_get_heightPtr - .asFunction)>(); - - /// @brief Gets the image orientation. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] image The image metadata handle - /// @param[out] orientation The image orientation - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int image_meta_get_orientation( - image_meta_h image, - ffi.Pointer orientation, - ) { - return _image_meta_get_orientation( - image, - orientation, - ); - } - - late final _image_meta_get_orientationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(image_meta_h, - ffi.Pointer)>>('image_meta_get_orientation'); - late final _image_meta_get_orientation = _image_meta_get_orientationPtr - .asFunction)>(); - - /// @brief Gets the image creation time. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] image The image metadata handle - /// @param[out] date_taken The time, when image was taken (in seconds, since the Epoch) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int image_meta_get_date_taken( - image_meta_h image, - ffi.Pointer> date_taken, - ) { - return _image_meta_get_date_taken( - image, - date_taken, - ); - } - - late final _image_meta_get_date_takenPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - image_meta_h, ffi.Pointer>)>>( - 'image_meta_get_date_taken'); - late final _image_meta_get_date_taken = - _image_meta_get_date_takenPtr.asFunction< - int Function(image_meta_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Gets the burst shot ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a burst_id using free(). - /// - /// @param[in] image The image metadata handle - /// @param[out] burst_id The ID of burst shot\ n - /// If @a burst_id is @c NULL, this is not burst shot - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int image_meta_get_burst_id( - image_meta_h image, - ffi.Pointer> burst_id, - ) { - return _image_meta_get_burst_id( - image, - burst_id, - ); - } - - late final _image_meta_get_burst_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(image_meta_h, - ffi.Pointer>)>>('image_meta_get_burst_id'); - late final _image_meta_get_burst_id = _image_meta_get_burst_idPtr.asFunction< - int Function(image_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the exposure time from exif. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks @a exposure time must be released with free() by you. - /// - /// @param[in] image The image metadata handle - /// @param[out] exposure_time The value of exposure_time, getting from exif - /// - /// @return 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int image_meta_get_exposure_time( - image_meta_h image, - ffi.Pointer> exposure_time, - ) { - return _image_meta_get_exposure_time( - image, - exposure_time, - ); - } - - late final _image_meta_get_exposure_timePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - image_meta_h, ffi.Pointer>)>>( - 'image_meta_get_exposure_time'); - late final _image_meta_get_exposure_time = - _image_meta_get_exposure_timePtr.asFunction< - int Function(image_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the fnumber from exif. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] image The image metadata handle - /// @param[out] fnumber The value of fnumber, getting from exif - /// - /// @return 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int image_meta_get_fnumber( - image_meta_h image, - ffi.Pointer fnumber, - ) { - return _image_meta_get_fnumber( - image, - fnumber, - ); - } - - late final _image_meta_get_fnumberPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(image_meta_h, - ffi.Pointer)>>('image_meta_get_fnumber'); - late final _image_meta_get_fnumber = _image_meta_get_fnumberPtr - .asFunction)>(); - - /// @brief Gets the iso from exif. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] image The image metadata handle - /// @param[out] iso The value of iso, getting from exif - /// - /// @return 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int image_meta_get_iso( - image_meta_h image, - ffi.Pointer iso, - ) { - return _image_meta_get_iso( - image, - iso, - ); - } - - late final _image_meta_get_isoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - image_meta_h, ffi.Pointer)>>('image_meta_get_iso'); - late final _image_meta_get_iso = _image_meta_get_isoPtr - .asFunction)>(); - - /// @brief Gets the model from exif. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks @a model must be released with free() by you. - /// - /// @param[in] image The image metadata handle - /// @param[out] model The value of model, getting from exif - /// - /// @return 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int image_meta_get_model( - image_meta_h image, - ffi.Pointer> model, - ) { - return _image_meta_get_model( - image, - model, - ); - } - - late final _image_meta_get_modelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(image_meta_h, - ffi.Pointer>)>>('image_meta_get_model'); - late final _image_meta_get_model = _image_meta_get_modelPtr.asFunction< - int Function(image_meta_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Checks whether the media is a burst shot image. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] image The image metadata handle - /// @param[out] is_burst_shot @c true if the media is a burst shot image, - /// otherwise @c false if the media is not a burst shot image - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int image_meta_is_burst_shot( - image_meta_h image, - ffi.Pointer is_burst_shot, - ) { - return _image_meta_is_burst_shot( - image, - is_burst_shot, - ); - } - - late final _image_meta_is_burst_shotPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(image_meta_h, - ffi.Pointer)>>('image_meta_is_burst_shot'); - late final _image_meta_is_burst_shot = _image_meta_is_burst_shotPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. This data cannot be saved to the file. - /// @brief Sets an orientation of the image. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] image The image metadata handle - /// @param[in] orientation The image orientation - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int image_meta_set_orientation( - image_meta_h image, - int orientation, - ) { - return _image_meta_set_orientation( - image, - orientation, - ); - } - - late final _image_meta_set_orientationPtr = - _lookup>( - 'image_meta_set_orientation'); - late final _image_meta_set_orientation = _image_meta_set_orientationPtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. Related setter functions are deprecated, therefore this function is not needed anymore. - /// @brief Updates the image to the media database. - /// - /// @details The function updates the given image meta in the media database. \n - /// The function should be called after any change in image attributes, to be updated to the media database. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @remarks Do not call this function in callback function of foreach function like media_info_foreach_media_from_db(). - /// - /// @param[in] image The handle to the image - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int image_meta_update_to_db( - image_meta_h image, - ) { - return _image_meta_update_to_db( - image, - ); - } - - late final _image_meta_update_to_dbPtr = - _lookup>( - 'image_meta_update_to_db'); - late final _image_meta_update_to_db = - _image_meta_update_to_dbPtr.asFunction(); - - /// @brief Inserts the content file into the media database. - /// @details In general, you can use this API to insert content files into the media database. \n - /// You can use media_content_scan_file()/media_content_scan_folder() API instead of this API. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write \n - /// %http://tizen.org/privilege/mediastorage \n - /// %http://tizen.org/privilege/externalstorage - /// - /// @remarks You must release the handle using media_info_destroy(). \n - /// You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n - /// If you want to access only internal storage by using this API, you should add privilege http://tizen.org/privilege/mediastorage. \n - /// Or if you want to access only external storage by using this API, you should add privilege http://tizen.org/privilege/externalstorage. \n - /// If you can access both storage, you must add all privilege. - /// @remarks Since 4.0, this function is related to the following feature:\n - /// %http://tizen.org/feature/content.scanning.others\n - /// If this feature is not suppported on the device, MEDIA_CONTENT_TYPE_OTHERS type file is not scanned. - /// - /// @param[in] path The path of the content file to add - /// @param[out] info The handle of the inserted content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_content_scan_file() - /// @see media_content_scan_folder() - int media_info_insert_to_db( - ffi.Pointer path, - ffi.Pointer info, - ) { - return _media_info_insert_to_db( - path, - info, - ); - } - - late final _media_info_insert_to_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('media_info_insert_to_db'); - late final _media_info_insert_to_db = _media_info_insert_to_dbPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Inserts content files into the media database, asynchronously. - /// @details This function can insert multiple content files into the media database. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write \n - /// %http://tizen.org/privilege/mediastorage \n - /// %http://tizen.org/privilege/externalstorage - /// - /// @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n - /// If you want to access only internal storage by using this API, you should add privilege http://tizen.org/privilege/mediastorage. \n - /// Or if you want to access only external storage by using this API, you should add privilege http://tizen.org/privilege/externalstorage. \n - /// If you can access both storage, you must add all privilege. - /// @remarks Since 4.0, this function is related to the following feature:\n - /// %http://tizen.org/feature/content.scanning.others\n - /// If this feature is not suppported on the device, MEDIA_CONTENT_TYPE_OTHERS type file is not scanned. - /// - /// @param[in] path_array The path array of the content files to add - /// @param[in] array_length The length of the array - /// @param[in] callback The callback to be invoked when media items inserted completely - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_insert_completed_cb() - int media_info_insert_batch_to_db( - ffi.Pointer> path_array, - int array_length, - media_insert_completed_cb callback, - ffi.Pointer user_data, - ) { - return _media_info_insert_batch_to_db( - path_array, - array_length, - callback, - user_data, - ); - } - - late final _media_info_insert_batch_to_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>, - ffi.UnsignedInt, - media_insert_completed_cb, - ffi.Pointer)>>('media_info_insert_batch_to_db'); - late final _media_info_insert_batch_to_db = - _media_info_insert_batch_to_dbPtr.asFunction< - int Function(ffi.Pointer>, int, - media_insert_completed_cb, ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Inserts the burst shot images into the media database, asynchronously. - /// @details This function inserts burst images into the media database. - /// media_insert_burst_shot_completed_cb() will be called when insertion to media database is finished. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write \n - /// %http://tizen.org/privilege/mediastorage \n - /// %http://tizen.org/privilege/externalstorage - /// - /// @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n - /// If you want to access only internal storage with this API, you should add privilege http://tizen.org/privilege/mediastorage. \n - /// Or if you want to access only external storage with this API, you should add privilege http://tizen.org/privilege/externalstorage. \n - /// If you can access both storage, you must add all privilege. - /// - /// @param[in] path_array The path array of the burst shot images to add - /// @param[in] array_length The length of the array - /// @param[in] callback The callback to be invoked when the images are inserted completely - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_insert_burst_shot_completed_cb() - int media_info_insert_burst_shot_to_db( - ffi.Pointer> path_array, - int array_length, - media_insert_burst_shot_completed_cb callback, - ffi.Pointer user_data, - ) { - return _media_info_insert_burst_shot_to_db( - path_array, - array_length, - callback, - user_data, - ); - } - - late final _media_info_insert_burst_shot_to_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>, - ffi.UnsignedInt, - media_insert_burst_shot_completed_cb, - ffi.Pointer)>>('media_info_insert_burst_shot_to_db'); - late final _media_info_insert_burst_shot_to_db = - _media_info_insert_burst_shot_to_dbPtr.asFunction< - int Function(ffi.Pointer>, int, - media_insert_burst_shot_completed_cb, ffi.Pointer)>(); - - /// @brief Deletes the media information from the media database. - /// @details This function only remove media information in the media database. \n - /// You can use media_content_scan_file()/media_content_scan_folder() API instead of this API if file is removed from the file system. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @param[in] media_id The media ID. It can get from media info handle. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_content_scan_file() - /// @see media_content_scan_folder() - int media_info_delete_from_db( - ffi.Pointer media_id, - ) { - return _media_info_delete_from_db( - media_id, - ); - } - - late final _media_info_delete_from_dbPtr = - _lookup)>>( - 'media_info_delete_from_db'); - late final _media_info_delete_from_db = _media_info_delete_from_dbPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Deletes media information that meets the conditions of the filter from the media database. - /// @details This function can delete multiple media information from the media database. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @param[in] filter The filter handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_filter_create() - int media_info_delete_batch_from_db( - filter_h filter, - ) { - return _media_info_delete_batch_from_db( - filter, - ); - } - - late final _media_info_delete_batch_from_dbPtr = - _lookup>( - 'media_info_delete_batch_from_db'); - late final _media_info_delete_batch_from_db = - _media_info_delete_batch_from_dbPtr.asFunction(); - - /// @brief Destroys media info. - /// @details The function frees all resources related to the media info handle. This handle - /// can no longer be used to perform any operation. New media info handle has to - /// be created before the next usage. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre Get copy of media_info handle by calling media_info_clone(). - /// - /// @see media_info_clone() - int media_info_destroy( - media_info_h media, - ) { - return _media_info_destroy( - media, - ); - } - - late final _media_info_destroyPtr = - _lookup>( - 'media_info_destroy'); - late final _media_info_destroy = - _media_info_destroyPtr.asFunction(); - - /// @brief Clones the media info handle. - /// - /// @details This function copies the media info handle from a source to the destination. - /// There is no media_info_create() function. The media_info_h is created internally and - /// available through media info foreach function such as media_info_foreach_media_from_db() or media_info_insert_to_db(). - /// To use this handle outside of these foreach functions, use this function. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release the destination handle using media_info_destroy(). - /// - /// @param[out] dst The destination handle to the media info - /// @param[in] src The source handle to media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_info_destroy() - /// @see media_album_foreach_media_from_db() - /// @see media_playlist_foreach_media_from_db() - /// @see media_group_foreach_media_from_db() - /// @see media_tag_foreach_media_from_db() - /// @see media_info_foreach_media_from_db() - /// @see media_info_insert_to_db() - /// @see media_folder_foreach_media_from_db() - int media_info_clone( - ffi.Pointer dst, - media_info_h src, - ) { - return _media_info_clone( - dst, - src, - ); - } - - late final _media_info_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, media_info_h)>>('media_info_clone'); - late final _media_info_clone = _media_info_clonePtr - .asFunction, media_info_h)>(); - - /// @brief Gets the count of media info for the passed @a filter from the media database. - /// @details If @c NULL is passed to the @a filter, then no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// - /// @param[in] filter The handle to filter - /// @param[out] media_count The count of media - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_filter_create() - int media_info_get_media_count_from_db( - filter_h filter, - ffi.Pointer media_count, - ) { - return _media_info_get_media_count_from_db( - filter, - media_count, - ); - } - - late final _media_info_get_media_count_from_dbPtr = _lookup< - ffi.NativeFunction)>>( - 'media_info_get_media_count_from_db'); - late final _media_info_get_media_count_from_db = - _media_info_get_media_count_from_dbPtr - .asFunction)>(); - - /// @brief Iterates through media info from the media database. - /// @details This function gets all media info handles meeting the given @a filter. - /// The @a callback function will be invoked for every retrieved media info. - /// If @c NULL is passed to the @a filter, then no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks Do not call updating DB function like media_info_update_to_db(), media_info_refresh_metadata_to_db(), audio_meta_update_to_db(), image_meta_update_to_db() and video_meta_update_to_db() in your callback function, - /// your callback function is invoked as inline function. - /// So, your callback function is in read state in SQLite. When you are in read state, sometimes you do not update DB. - /// We do not recommend you call updating DB function in callback of foreach function. - /// - /// @param[in] filter The media info handle filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_info_cb(). - /// - /// @see media_content_connect() - /// @see #media_info_cb - /// @see media_filter_create() - int media_info_foreach_media_from_db( - filter_h filter, - media_info_cb callback, - ffi.Pointer user_data, - ) { - return _media_info_foreach_media_from_db( - filter, - callback, - user_data, - ); - } - - late final _media_info_foreach_media_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filter_h, media_info_cb, - ffi.Pointer)>>('media_info_foreach_media_from_db'); - late final _media_info_foreach_media_from_db = - _media_info_foreach_media_from_dbPtr.asFunction< - int Function(filter_h, media_info_cb, ffi.Pointer)>(); - - /// @brief Gets the count of media tags for the passed @a filter in the given @a media_id from the media database. - /// @details If @c NULL is passed to the @a filter, then no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media_id The ID of the media info - /// @param[in] filter The handle to the media filter - /// @param[out] tag_count The count of the media tag - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_filter_create() - int media_info_get_tag_count_from_db( - ffi.Pointer media_id, - filter_h filter, - ffi.Pointer tag_count, - ) { - return _media_info_get_tag_count_from_db( - media_id, - filter, - tag_count, - ); - } - - late final _media_info_get_tag_count_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, filter_h, - ffi.Pointer)>>('media_info_get_tag_count_from_db'); - late final _media_info_get_tag_count_from_db = - _media_info_get_tag_count_from_dbPtr.asFunction< - int Function( - ffi.Pointer, filter_h, ffi.Pointer)>(); - - /// @brief Iterates through the media tag in the given media info from the media database. - /// @details This function gets all the media tags associated with the given @a media_id and calls @a callback for every retrieved media tag. \n - /// If @c NULL is passed to the @a filter, then no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media_id The ID of the media info - /// @param[in] filter The handle to the media filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_tag_cb(). - /// - /// @see media_content_connect() - /// @see #media_tag_cb - /// @see media_filter_create() - int media_info_foreach_tag_from_db( - ffi.Pointer media_id, - filter_h filter, - media_tag_cb callback, - ffi.Pointer user_data, - ) { - return _media_info_foreach_tag_from_db( - media_id, - filter, - callback, - user_data, - ); - } - - late final _media_info_foreach_tag_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, filter_h, media_tag_cb, - ffi.Pointer)>>('media_info_foreach_tag_from_db'); - late final _media_info_foreach_tag_from_db = - _media_info_foreach_tag_from_dbPtr.asFunction< - int Function(ffi.Pointer, filter_h, media_tag_cb, - ffi.Pointer)>(); - - /// @brief Gets the number of bookmarks for the passed @a filter in the given media ID from the media database. - /// @details If @c NULL is passed to the @a filter, then no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media_id The ID of the media info - /// @param[in] filter The handle to the media filter - /// @param[out] bookmark_count The count of the media tag - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_filter_create() - int media_info_get_bookmark_count_from_db( - ffi.Pointer media_id, - filter_h filter, - ffi.Pointer bookmark_count, - ) { - return _media_info_get_bookmark_count_from_db( - media_id, - filter, - bookmark_count, - ); - } - - late final _media_info_get_bookmark_count_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, filter_h, - ffi.Pointer)>>('media_info_get_bookmark_count_from_db'); - late final _media_info_get_bookmark_count_from_db = - _media_info_get_bookmark_count_from_dbPtr.asFunction< - int Function( - ffi.Pointer, filter_h, ffi.Pointer)>(); - - /// @brief Iterates through the media bookmark in the given media info from the media database. - /// @details This function gets all media bookmarks associated with the given media and calls @a callback for every retrieved media bookmark. - /// If @c NULL is passed to the @a filter, then no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media_id The ID of the media info - /// @param[in] filter The handle to the media filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_bookmark_cb(). - /// - /// @see media_content_connect() - /// @see media_bookmark_cb() - /// @see media_filter_create() - int media_info_foreach_bookmark_from_db( - ffi.Pointer media_id, - filter_h filter, - media_bookmark_cb callback, - ffi.Pointer user_data, - ) { - return _media_info_foreach_bookmark_from_db( - media_id, - filter, - callback, - user_data, - ); - } - - late final _media_info_foreach_bookmark_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, filter_h, media_bookmark_cb, - ffi.Pointer)>>('media_info_foreach_bookmark_from_db'); - late final _media_info_foreach_bookmark_from_db = - _media_info_foreach_bookmark_from_dbPtr.asFunction< - int Function(ffi.Pointer, filter_h, media_bookmark_cb, - ffi.Pointer)>(); - - /// @brief Gets the number of face for the passed @a media_id from the media database. - /// @details If @c NULL is passed to the @a filter, then no filtering is applied. - /// - /// @since_tizen 3.0 - /// - /// @param[in] media_id media id - /// @param[in] filter The handle to the media filter - /// @param[out] face_count The count of media face - /// - /// @return 0 on success, otherwise a negative error value. - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @see media_content_connect() - /// @see media_filter_create() - int media_info_get_face_count_from_db( - ffi.Pointer media_id, - filter_h filter, - ffi.Pointer face_count, - ) { - return _media_info_get_face_count_from_db( - media_id, - filter, - face_count, - ); - } - - late final _media_info_get_face_count_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, filter_h, - ffi.Pointer)>>('media_info_get_face_count_from_db'); - late final _media_info_get_face_count_from_db = - _media_info_get_face_count_from_dbPtr.asFunction< - int Function( - ffi.Pointer, filter_h, ffi.Pointer)>(); - - /// @brief Iterates through the media files with optional @a media_id in the given @a face @a face from the media database. - /// @details This function gets all media face info associated with the given media id and - /// meeting desired filter option and calls @a callback for - /// every retrieved media face info. If NULL is passed to the @a filter, no filtering is applied. - /// - /// @since_tizen 3.0 - /// - /// @param [in] media_id media id - /// @param[in] filter The handle to the media filter - /// @param [in] callback The callback function to invoke - /// @param [in] user_data The user data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value. - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @see media_content_connect() - /// @see media_filter_create() - int media_info_foreach_face_from_db( - ffi.Pointer media_id, - filter_h filter, - media_face_cb callback, - ffi.Pointer user_data, - ) { - return _media_info_foreach_face_from_db( - media_id, - filter, - callback, - user_data, - ); - } - - late final _media_info_foreach_face_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, filter_h, media_face_cb, - ffi.Pointer)>>('media_info_foreach_face_from_db'); - late final _media_info_foreach_face_from_db = - _media_info_foreach_face_from_dbPtr.asFunction< - int Function(ffi.Pointer, filter_h, media_face_cb, - ffi.Pointer)>(); - - /// @brief Gets the image metadata handle for a given media info - /// @details This function returns an image metadata handle retrieved from the media info. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release the @a image handle using image_meta_destroy(). - /// - /// @param[in] media The media info handle - /// @param[out] image A handle to image metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see image_meta_destroy() - int media_info_get_image( - media_info_h media, - ffi.Pointer image, - ) { - return _media_info_get_image( - media, - image, - ); - } - - late final _media_info_get_imagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_get_image'); - late final _media_info_get_image = _media_info_get_imagePtr - .asFunction)>(); - - /// @brief Gets a video metadata handle for a given media info. - /// @details This function returns a video metadata handle retrieved from the media info handle. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release the @a video handle using video_meta_destroy(). - /// - /// @param[in] media The media info handle - /// @param[out] video A handle to the video meta - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see video_meta_destroy() - int media_info_get_video( - media_info_h media, - ffi.Pointer video, - ) { - return _media_info_get_video( - media, - video, - ); - } - - late final _media_info_get_videoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_get_video'); - late final _media_info_get_video = _media_info_get_videoPtr - .asFunction)>(); - - /// @brief Gets an audio metadata handle for a given media info. - /// @details This function returns an audio metadata handle retrieved from the media info handle. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release the @a audio handle using audio_meta_destroy(). - /// - /// @param[in] media The media info handle - /// @param[out] audio A handle to the audio meta - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see audio_meta_destroy() - int media_info_get_audio( - media_info_h media, - ffi.Pointer audio, - ) { - return _media_info_get_audio( - media, - audio, - ); - } - - late final _media_info_get_audioPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_get_audio'); - late final _media_info_get_audio = _media_info_get_audioPtr - .asFunction)>(); - - /// @brief Gets the media ID - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[out] media_id The media ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_media_id( - media_info_h media, - ffi.Pointer> media_id, - ) { - return _media_info_get_media_id( - media, - media_id, - ); - } - - late final _media_info_get_media_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer>)>>('media_info_get_media_id'); - late final _media_info_get_media_id = _media_info_get_media_idPtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @brief Gets the full path of the content file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a path using free(). - /// - /// @param[in] media The media info handle - /// @param[out] path The full path of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_file_path( - media_info_h media, - ffi.Pointer> path, - ) { - return _media_info_get_file_path( - media, - path, - ); - } - - late final _media_info_get_file_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer>)>>('media_info_get_file_path'); - late final _media_info_get_file_path = - _media_info_get_file_pathPtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @brief Gets the file name including the extension of the content file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a name using free(). - /// - /// @param[in] media The media info handle - /// @param[out] name The file name including the extension of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_display_name( - media_info_h media, - ffi.Pointer> name, - ) { - return _media_info_get_display_name( - media, - name, - ); - } - - late final _media_info_get_display_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer>)>>( - 'media_info_get_display_name'); - late final _media_info_get_display_name = - _media_info_get_display_namePtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @brief Gets the content type of the content file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[out] type The content type of the content file (#media_content_type_e) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see #media_content_type_e - int media_info_get_media_type( - media_info_h media, - ffi.Pointer type, - ) { - return _media_info_get_media_type( - media, - type, - ); - } - - late final _media_info_get_media_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_get_media_type'); - late final _media_info_get_media_type = _media_info_get_media_typePtr - .asFunction)>(); - - /// @brief Gets the MIME type of the content file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a mime_type using free(). - /// - /// @param[in] media The media info handle - /// @param[out] mime_type The MIME type of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_mime_type( - media_info_h media, - ffi.Pointer> mime_type, - ) { - return _media_info_get_mime_type( - media, - mime_type, - ); - } - - late final _media_info_get_mime_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer>)>>('media_info_get_mime_type'); - late final _media_info_get_mime_type = - _media_info_get_mime_typePtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @brief Gets the content file size. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[out] size The content file size - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_size( - media_info_h media, - ffi.Pointer size, - ) { - return _media_info_get_size( - media, - size, - ); - } - - late final _media_info_get_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_get_size'); - late final _media_info_get_size = _media_info_get_sizePtr.asFunction< - int Function(media_info_h, ffi.Pointer)>(); - - /// @brief Gets the added time of the content file. - /// @details The added time refers to the time that content file was first added to media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[out] added_time The added time to the media database - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_added_time( - media_info_h media, - ffi.Pointer added_time, - ) { - return _media_info_get_added_time( - media, - added_time, - ); - } - - late final _media_info_get_added_timePtr = _lookup< - ffi - .NativeFunction)>>( - 'media_info_get_added_time'); - late final _media_info_get_added_time = _media_info_get_added_timePtr - .asFunction)>(); - - /// @brief Gets the modified time of the content file. - /// @details The modified time refers to the last modification time provided by the file system. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[out] time The last modification time of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_modified_time( - media_info_h media, - ffi.Pointer time, - ) { - return _media_info_get_modified_time( - media, - time, - ); - } - - late final _media_info_get_modified_timePtr = _lookup< - ffi - .NativeFunction)>>( - 'media_info_get_modified_time'); - late final _media_info_get_modified_time = _media_info_get_modified_timePtr - .asFunction)>(); - - /// @brief Gets the timeline of content file. - /// @details If the content file has the creation time information (like Content recored date or Image creation date), that value is timeline. \n - /// Otherwise, timeline value is the same as modified time. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[out] time The timeline of content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_timeline( - media_info_h media, - ffi.Pointer time, - ) { - return _media_info_get_timeline( - media, - time, - ); - } - - late final _media_info_get_timelinePtr = _lookup< - ffi - .NativeFunction)>>( - 'media_info_get_timeline'); - late final _media_info_get_timeline = _media_info_get_timelinePtr - .asFunction)>(); - - /// @brief Gets the thumbnail path of content file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a path using free(). \n - /// If the thumbnail extraction for the given media has not been requested yet, this API returns NULL. To create a thumbnail, you should use media_info_create_thumbnail() API. \n - /// Since 3.0, this function returns an empty string if media_info_create_thumbnail() has failed to create a thumbnail for the given media. - /// - /// @param[in] media The media info handle - /// @param[out] path The thumbnail path - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_thumbnail_path( - media_info_h media, - ffi.Pointer> path, - ) { - return _media_info_get_thumbnail_path( - media, - path, - ); - } - - late final _media_info_get_thumbnail_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer>)>>( - 'media_info_get_thumbnail_path'); - late final _media_info_get_thumbnail_path = - _media_info_get_thumbnail_pathPtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @brief Gets the description of content file. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media info has no description, the method returns empty string. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a description using free(). - /// - /// @param[in] media The media info handle - /// @param[out] description The description of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_description( - media_info_h media, - ffi.Pointer> description, - ) { - return _media_info_get_description( - media, - description, - ); - } - - late final _media_info_get_descriptionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer>)>>( - 'media_info_get_description'); - late final _media_info_get_description = - _media_info_get_descriptionPtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @brief Gets the longitude of content file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[out] longitude The longitude of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_longitude( - media_info_h media, - ffi.Pointer longitude, - ) { - return _media_info_get_longitude( - media, - longitude, - ); - } - - late final _media_info_get_longitudePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_get_longitude'); - late final _media_info_get_longitude = _media_info_get_longitudePtr - .asFunction)>(); - - /// @brief Gets the latitude of content file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[out] latitude The latitude of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_latitude( - media_info_h media, - ffi.Pointer latitude, - ) { - return _media_info_get_latitude( - media, - latitude, - ); - } - - late final _media_info_get_latitudePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_get_latitude'); - late final _media_info_get_latitude = _media_info_get_latitudePtr - .asFunction)>(); - - /// @brief Gets the altitude of content file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[out] altitude The altitude of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_altitude( - media_info_h media, - ffi.Pointer altitude, - ) { - return _media_info_get_altitude( - media, - altitude, - ); - } - - late final _media_info_get_altitudePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_get_altitude'); - late final _media_info_get_altitude = _media_info_get_altitudePtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Gets the weather of content file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[out] weather The weather of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_weather( - media_info_h media, - ffi.Pointer> weather, - ) { - return _media_info_get_weather( - media, - weather, - ); - } - - late final _media_info_get_weatherPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer>)>>('media_info_get_weather'); - late final _media_info_get_weather = _media_info_get_weatherPtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @brief Gets the rating of content file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[out] rating The rating of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_rating( - media_info_h media, - ffi.Pointer rating, - ) { - return _media_info_get_rating( - media, - rating, - ); - } - - late final _media_info_get_ratingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer)>>('media_info_get_rating'); - late final _media_info_get_rating = _media_info_get_ratingPtr - .asFunction)>(); - - /// @brief Gets the favorite status of content file which User set. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[out] favorite @c true if content file is set as favorite, - /// otherwise @c false if content file is not set as favorite - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_info_set_favorite() - int media_info_get_favorite( - media_info_h media, - ffi.Pointer favorite, - ) { - return _media_info_get_favorite( - media, - favorite, - ); - } - - late final _media_info_get_favoritePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer)>>('media_info_get_favorite'); - late final _media_info_get_favorite = _media_info_get_favoritePtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Gets the author of content file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a author using free(). - /// - /// @param[in] media The media info handle - /// @param[out] author The author of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_author( - media_info_h media, - ffi.Pointer> author, - ) { - return _media_info_get_author( - media, - author, - ); - } - - late final _media_info_get_authorPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer>)>>('media_info_get_author'); - late final _media_info_get_author = _media_info_get_authorPtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Gets the provider of content file which User set. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a provider using free(). - /// - /// @param[in] media The media info handle - /// @param[out] provider The provider of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_info_set_provider() - int media_info_get_provider( - media_info_h media, - ffi.Pointer> provider, - ) { - return _media_info_get_provider( - media, - provider, - ); - } - - late final _media_info_get_providerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer>)>>('media_info_get_provider'); - late final _media_info_get_provider = _media_info_get_providerPtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. Redundant, use media_info_get_display_name() instead. - /// @brief Gets the content name of content file which User set. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a content_name using free(). - /// - /// @param[in] media The media info handle - /// @param[out] content_name The content name of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_info_set_content_name() - int media_info_get_content_name( - media_info_h media, - ffi.Pointer> content_name, - ) { - return _media_info_get_content_name( - media, - content_name, - ); - } - - late final _media_info_get_content_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer>)>>( - 'media_info_get_content_name'); - late final _media_info_get_content_name = - _media_info_get_content_namePtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @brief Gets the title of content file. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the content file has no title, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a title using free(). - /// - /// @param[in] media The media info handle - /// @param[out] title The title of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_title( - media_info_h media, - ffi.Pointer> title, - ) { - return _media_info_get_title( - media, - title, - ); - } - - late final _media_info_get_titlePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer>)>>('media_info_get_title'); - late final _media_info_get_title = _media_info_get_titlePtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Gets the category of content file which User set. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a category using free(). - /// - /// @param[in] media The media info handle - /// @param[out] category The category of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_info_set_category() - int media_info_get_category( - media_info_h media, - ffi.Pointer> category, - ) { - return _media_info_get_category( - media, - category, - ); - } - - late final _media_info_get_categoryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer>)>>('media_info_get_category'); - late final _media_info_get_category = _media_info_get_categoryPtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Gets the location tag of content file which User set. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a location_tag using free(). - /// - /// @param[in] media The media info handle - /// @param[out] location_tag The location of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_info_set_location_tag() - int media_info_get_location_tag( - media_info_h media, - ffi.Pointer> location_tag, - ) { - return _media_info_get_location_tag( - media, - location_tag, - ); - } - - late final _media_info_get_location_tagPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer>)>>( - 'media_info_get_location_tag'); - late final _media_info_get_location_tag = - _media_info_get_location_tagPtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Gets the age_rating of content file which User set. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a age_rating using free(). - /// - /// @param[in] media The media info handle - /// @param[out] age_rating The age rating of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_info_set_age_rating() - int media_info_get_age_rating( - media_info_h media, - ffi.Pointer> age_rating, - ) { - return _media_info_get_age_rating( - media, - age_rating, - ); - } - - late final _media_info_get_age_ratingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer>)>>( - 'media_info_get_age_rating'); - late final _media_info_get_age_rating = - _media_info_get_age_ratingPtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. Use media_tag_insert_to_db() instead. - /// @brief Gets the keyword of content file which User set. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a keyword using free(). - /// - /// @param[in] media The media info handle - /// @param[out] keyword The keyword of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_info_set_keyword() - int media_info_get_keyword( - media_info_h media, - ffi.Pointer> keyword, - ) { - return _media_info_get_keyword( - media, - keyword, - ); - } - - late final _media_info_get_keywordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer>)>>('media_info_get_keyword'); - late final _media_info_get_keyword = _media_info_get_keywordPtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @brief Gets the storage id of content file. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks You must release @a storage_id using free(). - /// - /// @param[in] media The media info handle - /// @param[out] storage_id The storage id of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_storage_id( - media_info_h media, - ffi.Pointer> storage_id, - ) { - return _media_info_get_storage_id( - media, - storage_id, - ); - } - - late final _media_info_get_storage_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer>)>>( - 'media_info_get_storage_id'); - late final _media_info_get_storage_id = - _media_info_get_storage_idPtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @brief Checks whether the media is protected via DRM. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[out] is_drm @c true if media is DRM media, - /// otherwise @c false if media is not DRM media - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_is_drm( - media_info_h media, - ffi.Pointer is_drm, - ) { - return _media_info_is_drm( - media, - is_drm, - ); - } - - late final _media_info_is_drmPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer)>>('media_info_is_drm'); - late final _media_info_is_drm = _media_info_is_drmPtr - .asFunction)>(); - - /// @brief Checks whether the content file is 360 content. - /// @since_tizen 3.0 - /// - /// @param[in] media The media info handle - /// @param[out] is_360 @c true if media is 360 content, - /// otherwise @c false if media is not 360 content - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_is_360_content( - media_info_h media, - ffi.Pointer is_360, - ) { - return _media_info_is_360_content( - media, - is_360, - ); - } - - late final _media_info_is_360_contentPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_is_360_content'); - late final _media_info_is_360_content = _media_info_is_360_contentPtr - .asFunction)>(); - - /// @brief Gets the storage type of content file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[out] storage_type The storage type of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_storage_type( - media_info_h media, - ffi.Pointer storage_type, - ) { - return _media_info_get_storage_type( - media, - storage_type, - ); - } - - late final _media_info_get_storage_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_get_storage_type'); - late final _media_info_get_storage_type = _media_info_get_storage_typePtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. \n - /// This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application. - /// @brief Gets number which represents how many times given content has been played. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param [in] media The handle to media info - /// @param [out] played_count The counter of content played - /// - /// @return 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_played_count( - media_info_h media, - ffi.Pointer played_count, - ) { - return _media_info_get_played_count( - media, - played_count, - ); - } - - late final _media_info_get_played_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_get_played_count'); - late final _media_info_get_played_count = _media_info_get_played_countPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. \n - /// This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application. - /// @brief Gets the content's played time parameter. - /// @details Function returns content's elapsed playback time parameter as period - /// starting from the beginning of the track. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param [in] media The handle to media info - /// @param [out] played_time The elapsed time of the content - /// - /// @return 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_played_time( - media_info_h media, - ffi.Pointer played_time, - ) { - return _media_info_get_played_time( - media, - played_time, - ); - } - - late final _media_info_get_played_timePtr = _lookup< - ffi - .NativeFunction)>>( - 'media_info_get_played_time'); - late final _media_info_get_played_time = _media_info_get_played_timePtr - .asFunction)>(); - - /// @brief Gets the media info from the media database. - /// - /// @details This function creates a new media handle from the media database by the given @a media_id. - /// Media info will be created and filled with information. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a media using media_tag_destroy(). - /// - /// @param[in] media_id The ID of media info - /// @param[out] media The media handle associated with the media ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_info_destroy() - int media_info_get_media_from_db( - ffi.Pointer media_id, - ffi.Pointer media, - ) { - return _media_info_get_media_from_db( - media_id, - media, - ); - } - - late final _media_info_get_media_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('media_info_get_media_from_db'); - late final _media_info_get_media_from_db = - _media_info_get_media_from_dbPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. \n - /// This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application. - /// @brief Increments the played count to content meta handle. - /// @details You can increase the played(opened) count of the content file. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param [in] media The handle to media info - /// - /// @return 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db() - int media_info_increase_played_count( - media_info_h media, - ) { - return _media_info_increase_played_count( - media, - ); - } - - late final _media_info_increase_played_countPtr = - _lookup>( - 'media_info_increase_played_count'); - late final _media_info_increase_played_count = - _media_info_increase_played_countPtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. \n - /// This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application. - /// @brief Sets the played time to content meta handle. - /// @details You can set the latest played(opened) time of the content file. the latest played time to be set the current time on the system. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param [in] media The handle to media info - /// - /// @return 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db() - int media_info_set_played_time( - media_info_h media, - ) { - return _media_info_set_played_time( - media, - ); - } - - late final _media_info_set_played_timePtr = - _lookup>( - 'media_info_set_played_time'); - late final _media_info_set_played_time = - _media_info_set_played_timePtr.asFunction(); - - /// @deprecated Deprecated since 4.0. Redundant, use media_info_move_to_db() instead. - /// @brief Sets the file name including the extension of the content file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[in] display_name The file name including the extension of the content file. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db(). - int media_info_set_display_name( - media_info_h media, - ffi.Pointer display_name, - ) { - return _media_info_set_display_name( - media, - display_name, - ); - } - - late final _media_info_set_display_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_set_display_name'); - late final _media_info_set_display_name = _media_info_set_display_namePtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. This data cannot be saved to the file. - /// @brief Sets the description of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[in] description The description of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db(). - int media_info_set_description( - media_info_h media, - ffi.Pointer description, - ) { - return _media_info_set_description( - media, - description, - ); - } - - late final _media_info_set_descriptionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_set_description'); - late final _media_info_set_description = _media_info_set_descriptionPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. This data cannot be saved to the file. - /// @brief Sets the longitude of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[in] longitude The longitude of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db(). - int media_info_set_longitude( - media_info_h media, - double longitude, - ) { - return _media_info_set_longitude( - media, - longitude, - ); - } - - late final _media_info_set_longitudePtr = - _lookup>( - 'media_info_set_longitude'); - late final _media_info_set_longitude = _media_info_set_longitudePtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. This data cannot be saved to the file. - /// @brief Sets the latitude of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[in] latitude The latitude of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db(). - int media_info_set_latitude( - media_info_h media, - double latitude, - ) { - return _media_info_set_latitude( - media, - latitude, - ); - } - - late final _media_info_set_latitudePtr = - _lookup>( - 'media_info_set_latitude'); - late final _media_info_set_latitude = _media_info_set_latitudePtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. This data cannot be saved to the file. - /// @brief Sets the altitude of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[in] altitude The altitude of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db(). - int media_info_set_altitude( - media_info_h media, - double altitude, - ) { - return _media_info_set_altitude( - media, - altitude, - ); - } - - late final _media_info_set_altitudePtr = - _lookup>( - 'media_info_set_altitude'); - late final _media_info_set_altitude = _media_info_set_altitudePtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. This data cannot be saved to the file. - /// @brief Sets the weather of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[in] weather The weather of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db(). - int media_info_set_weather( - media_info_h media, - ffi.Pointer weather, - ) { - return _media_info_set_weather( - media, - weather, - ); - } - - late final _media_info_set_weatherPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer)>>('media_info_set_weather'); - late final _media_info_set_weather = _media_info_set_weatherPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. This data cannot be saved to the file. - /// @brief Sets the rating of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[in] rating The rating of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db(). - int media_info_set_rating( - media_info_h media, - int rating, - ) { - return _media_info_set_rating( - media, - rating, - ); - } - - late final _media_info_set_ratingPtr = - _lookup>( - 'media_info_set_rating'); - late final _media_info_set_rating = - _media_info_set_ratingPtr.asFunction(); - - /// @brief Sets the favorite of media info. - /// @details This function can mark favorite of the media. If set to @c true, this fuction record the time of the change moment. \n - /// So, If you use it in order parameter, you can sort the order of the time was a favorite. \n - /// Or, if you use it in condition parameter, you can get the result of the favorite media. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[in] favorite Set @c true to set the media info as favorite, - /// otherwise set @c false to not set the media info as favorite - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_set_favorite( - media_info_h media, - bool favorite, - ) { - return _media_info_set_favorite( - media, - favorite, - ); - } - - late final _media_info_set_favoritePtr = - _lookup>( - 'media_info_set_favorite'); - late final _media_info_set_favorite = _media_info_set_favoritePtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. This data cannot be saved to the file. - /// @brief Sets the author of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[in] author The author of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_set_author( - media_info_h media, - ffi.Pointer author, - ) { - return _media_info_set_author( - media, - author, - ); - } - - late final _media_info_set_authorPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer)>>('media_info_set_author'); - late final _media_info_set_author = _media_info_set_authorPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. This data cannot be saved to the file. - /// @brief Sets the provider of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[in] provider The provider of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_set_provider( - media_info_h media, - ffi.Pointer provider, - ) { - return _media_info_set_provider( - media, - provider, - ); - } - - late final _media_info_set_providerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer)>>('media_info_set_provider'); - late final _media_info_set_provider = _media_info_set_providerPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. Redundant, use media_info_move_to_db() instead. - /// @brief Sets the content name of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[in] content_name The content name of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db() - int media_info_set_content_name( - media_info_h media, - ffi.Pointer content_name, - ) { - return _media_info_set_content_name( - media, - content_name, - ); - } - - late final _media_info_set_content_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_set_content_name'); - late final _media_info_set_content_name = _media_info_set_content_namePtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. This data cannot be saved to the file. - /// @brief Sets the category of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[in] category The category of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db() - int media_info_set_category( - media_info_h media, - ffi.Pointer category, - ) { - return _media_info_set_category( - media, - category, - ); - } - - late final _media_info_set_categoryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer)>>('media_info_set_category'); - late final _media_info_set_category = _media_info_set_categoryPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. This data cannot be saved to the file. - /// @brief Sets the location tag of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[in] location_tag The location of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db() - int media_info_set_location_tag( - media_info_h media, - ffi.Pointer location_tag, - ) { - return _media_info_set_location_tag( - media, - location_tag, - ); - } - - late final _media_info_set_location_tagPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_set_location_tag'); - late final _media_info_set_location_tag = _media_info_set_location_tagPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. This data cannot be saved to the file. - /// @brief Sets the age rating of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[in] age_rating The age rating of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db() - int media_info_set_age_rating( - media_info_h media, - ffi.Pointer age_rating, - ) { - return _media_info_set_age_rating( - media, - age_rating, - ); - } - - late final _media_info_set_age_ratingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_set_age_rating'); - late final _media_info_set_age_rating = _media_info_set_age_ratingPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. Use media_tag_insert_to_db() instead. - /// @brief Sets the keyword of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[in] keyword The keyword of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db() - int media_info_set_keyword( - media_info_h media, - ffi.Pointer keyword, - ) { - return _media_info_set_keyword( - media, - keyword, - ); - } - - late final _media_info_set_keywordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer)>>('media_info_set_keyword'); - late final _media_info_set_keyword = _media_info_set_keywordPtr - .asFunction)>(); - - /// @brief Updates the media info to the media database. - /// - /// @details The function updates the given media info in the media database. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @remarks The function should be called after any change in media, to be updated to the media - /// database. For example, after using media_info_set_favorite() - /// for setting the name of the media, the media_info_update_to_db() function should be called so as to update - /// the given media info attributes in the media database. - /// - /// @param[in] media The media info handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_info_set_favorite() - /// @see media_info_set_provider() - /// @see media_info_set_category() - /// @see media_info_set_location_tag() - /// @see media_info_set_age_rating() - int media_info_update_to_db( - media_info_h media, - ) { - return _media_info_update_to_db( - media, - ); - } - - late final _media_info_update_to_dbPtr = - _lookup>( - 'media_info_update_to_db'); - late final _media_info_update_to_db = - _media_info_update_to_dbPtr.asFunction(); - - /// @deprecated Deprecated since 4.0. Use media_content_scan_file() instead. - /// @brief Refreshes the media metadata to the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write \n - /// %http://tizen.org/privilege/mediastorage \n - /// %http://tizen.org/privilege/externalstorage - /// - /// @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n - /// If you want to access only internal storage by using this API, you should add privilege http://tizen.org/privilege/mediastorage. \n - /// Or if you want to access only external storage by using this API, you should add privilege http://tizen.org/privilege/externalstorage. \n - /// If you can access both storage, you should add all privilege. - /// - /// @param[in] media_id The ID of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_info_refresh_metadata_to_db( - ffi.Pointer media_id, - ) { - return _media_info_refresh_metadata_to_db( - media_id, - ); - } - - late final _media_info_refresh_metadata_to_dbPtr = - _lookup)>>( - 'media_info_refresh_metadata_to_db'); - late final _media_info_refresh_metadata_to_db = - _media_info_refresh_metadata_to_dbPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. This data cannot be saved to the file. - /// @brief Sets the added time of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The media info handle - /// @param[in] added_time The added time of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db() - int media_info_set_added_time( - media_info_h media, - int added_time, - ) { - return _media_info_set_added_time( - media, - added_time, - ); - } - - late final _media_info_set_added_timePtr = - _lookup>( - 'media_info_set_added_time'); - late final _media_info_set_added_time = _media_info_set_added_timePtr - .asFunction(); - - /// @brief Moves the media info to the given destination path in the media database. - /// @details After moving or renaming a file in the filesystem, call this function to update the database. \n - /// If the source path and destination path are the same, then this API does nothing. - /// If you want to refresh media information, you should use media_content_scan_file() API. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write \n - /// %http://tizen.org/privilege/mediastorage \n - /// %http://tizen.org/privilege/externalstorage - /// - /// @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n - /// If you want to access only internal storage by using this API, you should add privilege http://tizen.org/privilege/mediastorage. \n - /// Or if you want to access only external storage by using this API, you should add privilege http://tizen.org/privilege/externalstorage. \n - /// If you can access both storage, you should add all privilege. \n - /// This API does not support USB storage. - /// - /// @param[in] media The media info handle - /// @param[in] dst_path The path of destination - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter (Especially, if the request is duplicated, this error returns.) - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_content_scan_folder() - int media_info_move_to_db( - media_info_h media, - ffi.Pointer dst_path, - ) { - return _media_info_move_to_db( - media, - dst_path, - ); - } - - late final _media_info_move_to_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer)>>('media_info_move_to_db'); - late final _media_info_move_to_db = _media_info_move_to_dbPtr - .asFunction)>(); - - /// @brief Creates a thumbnail file for the given media, asynchronously. - /// @details This function creates an thumbnail file for given media item and calls @a callback for completion of creating the thumbnail. - /// If a thumbnail already exists for the given media, then the path of thumbnail will be returned in callback function. \n - /// Since 3.0, a thumbnail is not automatically extracted during media scanning. \n - /// Therefore, if there exists no thumbnail for the given media, you MUST call this function to create a thumbnail. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @remarks If you want to destroy media handle before callback invoked, you must cancel thumbnail request by using media_info_cancel_thumbnail() \n - /// Since 3.0, if creation of a thumbnail is failed, empty string will be passed through media_thumbnail_completed_cb(). - /// Items in external storage except MMC not supported. - /// - /// @param[in] media The media info handle - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_info_create_thumbnail( - media_info_h media, - media_thumbnail_completed_cb callback, - ffi.Pointer user_data, - ) { - return _media_info_create_thumbnail( - media, - callback, - user_data, - ); - } - - late final _media_info_create_thumbnailPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, media_thumbnail_completed_cb, - ffi.Pointer)>>('media_info_create_thumbnail'); - late final _media_info_create_thumbnail = - _media_info_create_thumbnailPtr.asFunction< - int Function(media_info_h, media_thumbnail_completed_cb, - ffi.Pointer)>(); - - /// @brief Cancels the creation of thumbnail file for the given media. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @remarks If you request cancel for the already thumbnail created media, this API return MEDIA_CONTENT_ERROR_INVALID_OPERATION - /// - /// @param[in] media The media info handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @see media_content_connect() - int media_info_cancel_thumbnail( - media_info_h media, - ) { - return _media_info_cancel_thumbnail( - media, - ); - } - - late final _media_info_cancel_thumbnailPtr = - _lookup>( - 'media_info_cancel_thumbnail'); - late final _media_info_cancel_thumbnail = - _media_info_cancel_thumbnailPtr.asFunction(); - - /// @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE - /// @brief Starts face detection for the given image, asynchronously. - /// @details This function detects faces for given image item and calls the given callback function when the detection is completed. \n - /// The given callback function is called when the detection is completed. \n - /// To obtain the detected faces, call the media_info_foreach_face_from_db() function. - /// - /// @since_tizen 3.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write \n - /// %http://tizen.org/privilege/mediastorage - /// - /// @remarks If you want to destroy the media handle before callback invoked, you must cancel the face detection request by using media_info_cancel_face_detection(). \n - /// If face detection fails, the @a face_count argument in media_face_detection_completed_cb() will be set to 0. - /// Media items in external storage are not supported, with the exception of MMC items. - /// - /// @param[in] media The media info handle - /// @param[in] callback The callback function to be invoked when detection is completed - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_info_cancel_face_detection() - int media_info_start_face_detection( - media_info_h media, - media_face_detection_completed_cb callback, - ffi.Pointer user_data, - ) { - return _media_info_start_face_detection( - media, - callback, - user_data, - ); - } - - late final _media_info_start_face_detectionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, media_face_detection_completed_cb, - ffi.Pointer)>>('media_info_start_face_detection'); - late final _media_info_start_face_detection = - _media_info_start_face_detectionPtr.asFunction< - int Function(media_info_h, media_face_detection_completed_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE - /// @brief Cancels face detection of image for the given media. - /// @details This function cancels face detection for given media item. \n - /// If you cancel face detection request before callback is invoked, the callback registered by media_info_start_face_detection() API will not be invoked. - /// - /// @since_tizen 3.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @remarks If face detection is already done when you request the cancellation, this API return MEDIA_CONTENT_ERROR_INVALID_OPERATION - /// - /// @param[in] media The media info handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_info_start_face_detection() - int media_info_cancel_face_detection( - media_info_h media, - ) { - return _media_info_cancel_face_detection( - media, - ); - } - - late final _media_info_cancel_face_detectionPtr = - _lookup>( - 'media_info_cancel_face_detection'); - late final _media_info_cancel_face_detection = - _media_info_cancel_face_detectionPtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. Use media_info_insert_to_db() instead. - /// @brief Creates the media info handle. - /// @details If the information about the file that is already known, you can use this API to generate empty handler. - /// @since_tizen 3.0 - /// - /// - /// @privilege %http://tizen.org/privilege/mediastorage \n - /// %http://tizen.org/privilege/externalstorage - /// - /// @remarks If you want to access only internal storage with this API, you should add privilege http://tizen.org/privilege/mediastorage. \n - /// Or if you want to access only external storage with this API, you should add privilege http://tizen.org/privilege/externalstorage. \n - /// If you can access both storage, you must add all privilege. - /// - /// @param[in] path The path to create the media info handle - /// @param[out] media The media info handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see media_info_destroy() - int media_info_create( - ffi.Pointer path, - ffi.Pointer media, - ) { - return _media_info_create( - path, - media, - ); - } - - late final _media_info_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('media_info_create'); - late final _media_info_create = _media_info_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. Use media_info_insert_to_db() instead. - /// @brief Inserts media info to database with media info data. - /// @since_tizen 3.0 - /// - /// @remarks You must release @a info using media_info_destroy(). - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @param[in] media The media info handle to be inserted - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - int media_info_insert_to_db_with_data( - media_info_h media, - ) { - return _media_info_insert_to_db_with_data( - media, - ); - } - - late final _media_info_insert_to_db_with_dataPtr = - _lookup>( - 'media_info_insert_to_db_with_data'); - late final _media_info_insert_to_db_with_data = - _media_info_insert_to_db_with_dataPtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. - /// @brief Sets the title of media info handle. - /// @since_tizen 3.0 - /// - /// @param[in] media The media info handle - /// @param[in] title The title of media info handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_set_title( - media_info_h media, - ffi.Pointer title, - ) { - return _media_info_set_title( - media, - title, - ); - } - - late final _media_info_set_titlePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer)>>('media_info_set_title'); - late final _media_info_set_title = _media_info_set_titlePtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Sets the album of media info handle. - /// @since_tizen 3.0 - /// - /// @param[in] media The media info handle - /// @param[in] album The album of media info handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_set_album( - media_info_h media, - ffi.Pointer album, - ) { - return _media_info_set_album( - media, - album, - ); - } - - late final _media_info_set_albumPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer)>>('media_info_set_album'); - late final _media_info_set_album = _media_info_set_albumPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Sets the artist of media info handle. - /// @since_tizen 3.0 - /// - /// @param[in] media The media info handle - /// @param[in] artist The artist of media info handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_set_artist( - media_info_h media, - ffi.Pointer artist, - ) { - return _media_info_set_artist( - media, - artist, - ); - } - - late final _media_info_set_artistPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer)>>('media_info_set_artist'); - late final _media_info_set_artist = _media_info_set_artistPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Sets the genre of media info handle. - /// @since_tizen 3.0 - /// - /// @param[in] media The media info handle - /// @param[in] genre The genre of media info handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_set_genre( - media_info_h media, - ffi.Pointer genre, - ) { - return _media_info_set_genre( - media, - genre, - ); - } - - late final _media_info_set_genrePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer)>>('media_info_set_genre'); - late final _media_info_set_genre = _media_info_set_genrePtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Sets the recorded date of media info handle. - /// @since_tizen 3.0 - /// - /// @param[in] media The media info handle - /// @param[in] recorded_date The recorded date of media info handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_set_recorded_date( - media_info_h media, - ffi.Pointer recorded_date, - ) { - return _media_info_set_recorded_date( - media, - recorded_date, - ); - } - - late final _media_info_set_recorded_datePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_set_recorded_date'); - late final _media_info_set_recorded_date = _media_info_set_recorded_datePtr - .asFunction)>(); - - /// @brief Inserts a new tag in the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @remarks The created tag handle must be released using media_tag_destroy(). - /// - /// @param[in] tag_name The tag name to be inserted - /// @param[out] tag The created handle to the media tag - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_tag_delete_from_db() - /// @see media_tag_destroy() - int media_tag_insert_to_db( - ffi.Pointer tag_name, - ffi.Pointer tag, - ) { - return _media_tag_insert_to_db( - tag_name, - tag, - ); - } - - late final _media_tag_insert_to_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('media_tag_insert_to_db'); - late final _media_tag_insert_to_db = _media_tag_insert_to_dbPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Deletes a given tag from the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @param[in] tag_id The ID of media tag - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_tag_insert_to_db() - int media_tag_delete_from_db( - int tag_id, - ) { - return _media_tag_delete_from_db( - tag_id, - ); - } - - late final _media_tag_delete_from_dbPtr = - _lookup>( - 'media_tag_delete_from_db'); - late final _media_tag_delete_from_db = - _media_tag_delete_from_dbPtr.asFunction(); - - /// @brief Gets the count of the tag for the passed @a filter from the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The handle to the filter - /// @param[out] tag_count The count of the media tag - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_tag_get_tag_count_from_db( - filter_h filter, - ffi.Pointer tag_count, - ) { - return _media_tag_get_tag_count_from_db( - filter, - tag_count, - ); - } - - late final _media_tag_get_tag_count_from_dbPtr = _lookup< - ffi.NativeFunction)>>( - 'media_tag_get_tag_count_from_db'); - late final _media_tag_get_tag_count_from_db = - _media_tag_get_tag_count_from_dbPtr - .asFunction)>(); - - /// @brief Iterates through tags from the media database. - /// @details This function gets all tags meeting a desired @a filter - /// and calls a registered callback function for every retrieved tag. - /// If @c NULL is passed to the @a filter, no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The tag filter handle - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_tag_cb(). - /// - /// @see media_content_connect() - /// @see #media_tag_cb - /// @see media_filter_create() - int media_tag_foreach_tag_from_db( - filter_h filter, - media_tag_cb callback, - ffi.Pointer user_data, - ) { - return _media_tag_foreach_tag_from_db( - filter, - callback, - user_data, - ); - } - - late final _media_tag_foreach_tag_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filter_h, media_tag_cb, - ffi.Pointer)>>('media_tag_foreach_tag_from_db'); - late final _media_tag_foreach_tag_from_db = - _media_tag_foreach_tag_from_dbPtr.asFunction< - int Function(filter_h, media_tag_cb, ffi.Pointer)>(); - - /// @brief Gets the number of media files for the passed @a filter in the given @a tag from the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] tag_id The ID of the media tag - /// @param[in] filter The handle to the media filter - /// @param[out] media_count The count of media items - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_tag_get_media_count_from_db( - int tag_id, - filter_h filter, - ffi.Pointer media_count, - ) { - return _media_tag_get_media_count_from_db( - tag_id, - filter, - media_count, - ); - } - - late final _media_tag_get_media_count_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, filter_h, - ffi.Pointer)>>('media_tag_get_media_count_from_db'); - late final _media_tag_get_media_count_from_db = - _media_tag_get_media_count_from_dbPtr - .asFunction)>(); - - /// @brief Iterates through media items for a given tag from the media database. - /// @details This function gets all media items associated with a given tag and - /// meeting a desired @a filter and calls a registered callback function for - /// every retrieved media item. If @c NULL is passed to the @a filter, no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] tag_id The ID of the media tag - /// @param[in] filter The handle to the media filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_info_cb(). - /// - /// @see media_content_connect() - /// @see media_info_cb() - /// @see media_filter_create() - int media_tag_foreach_media_from_db( - int tag_id, - filter_h filter, - media_info_cb callback, - ffi.Pointer user_data, - ) { - return _media_tag_foreach_media_from_db( - tag_id, - filter, - callback, - user_data, - ); - } - - late final _media_tag_foreach_media_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, filter_h, media_info_cb, - ffi.Pointer)>>('media_tag_foreach_media_from_db'); - late final _media_tag_foreach_media_from_db = - _media_tag_foreach_media_from_dbPtr.asFunction< - int Function(int, filter_h, media_info_cb, ffi.Pointer)>(); - - /// @brief Clones the media tag. - /// @details This function copies the media tag handle from a source to destination. - /// There is no media_tag_create() function. The media_tag_h is created internally and available through media tag foreach function - /// such as media_tag_foreach_tag_from_db(). - /// To use this handle outside of these foreach functions, use this function. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release the destination handle using media_tag_destroy(). - /// - /// @param[out] dst The destination handle to the media tag - /// @param[in] src The source handle to the media tag - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_tag_destroy() - int media_tag_clone( - ffi.Pointer dst, - media_tag_h src, - ) { - return _media_tag_clone( - dst, - src, - ); - } - - late final _media_tag_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, media_tag_h)>>('media_tag_clone'); - late final _media_tag_clone = _media_tag_clonePtr - .asFunction, media_tag_h)>(); - - /// @brief Destroys the media tag. - /// @details This function frees all resources related to the tag handle. The tag handle can no longer - /// be used for any operation. A new tag handle has to be created before next usage. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] tag The media tag handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre A copy of the media tag handle created by calling media_tag_clone() or media_tag_insert_to_db(). - /// - /// @see media_tag_clone() - /// @see media_tag_insert_to_db() - int media_tag_destroy( - media_tag_h tag, - ) { - return _media_tag_destroy( - tag, - ); - } - - late final _media_tag_destroyPtr = - _lookup>( - 'media_tag_destroy'); - late final _media_tag_destroy = - _media_tag_destroyPtr.asFunction(); - - /// @brief Gets the media tag ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] tag The media tag handle - /// @param[out] tag_id The ID of the media tag - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_tag_get_tag_id( - media_tag_h tag, - ffi.Pointer tag_id, - ) { - return _media_tag_get_tag_id( - tag, - tag_id, - ); - } - - late final _media_tag_get_tag_idPtr = _lookup< - ffi - .NativeFunction)>>( - 'media_tag_get_tag_id'); - late final _media_tag_get_tag_id = _media_tag_get_tag_idPtr - .asFunction)>(); - - /// @brief Gets the tag name. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a tag_name using free(). - /// - /// @param[in] tag The media tag handle - /// @param[out] tag_name The name of the tag - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_tag_get_name( - media_tag_h tag, - ffi.Pointer> tag_name, - ) { - return _media_tag_get_name( - tag, - tag_name, - ); - } - - late final _media_tag_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_tag_h, - ffi.Pointer>)>>('media_tag_get_name'); - late final _media_tag_get_name = _media_tag_get_namePtr.asFunction< - int Function(media_tag_h, ffi.Pointer>)>(); - - /// @brief Gets the media tag from the media database. - /// - /// @details This function creates a new media tag handle from the media database by the given @a tag_id. - /// Media tag will be created and will be filled with tag information. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a folder using media_tag_destroy(). - /// - /// @param[in] tag_id The ID of the media tag - /// @param[out] tag The media tag handle associated with the tag ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_tag_destroy() - int media_tag_get_tag_from_db( - int tag_id, - ffi.Pointer tag, - ) { - return _media_tag_get_tag_from_db( - tag_id, - tag, - ); - } - - late final _media_tag_get_tag_from_dbPtr = _lookup< - ffi - .NativeFunction)>>( - 'media_tag_get_tag_from_db'); - late final _media_tag_get_tag_from_db = _media_tag_get_tag_from_dbPtr - .asFunction)>(); - - /// @brief Adds a new media info to the tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] tag The media tag handle - /// @param[in] media_id The ID to the media info which is added - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post media_tag_update_to_db() - /// - /// @see media_content_connect() - /// @see media_tag_remove_media() - int media_tag_add_media( - media_tag_h tag, - ffi.Pointer media_id, - ) { - return _media_tag_add_media( - tag, - media_id, - ); - } - - late final _media_tag_add_mediaPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_tag_h, ffi.Pointer)>>('media_tag_add_media'); - late final _media_tag_add_media = _media_tag_add_mediaPtr - .asFunction)>(); - - /// @brief Removes the media info from the given tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] tag The media tag handle - /// @param[in] media_id The ID to the media info which is removed - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post media_tag_update_to_db() - /// - /// @see media_content_connect() - /// @see media_tag_add_media() - int media_tag_remove_media( - media_tag_h tag, - ffi.Pointer media_id, - ) { - return _media_tag_remove_media( - tag, - media_id, - ); - } - - late final _media_tag_remove_mediaPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_tag_h, ffi.Pointer)>>('media_tag_remove_media'); - late final _media_tag_remove_media = _media_tag_remove_mediaPtr - .asFunction)>(); - - /// @brief Sets the name of the tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] tag The media tag handle - /// @param[in] tag_name The name of the media tag - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @post media_tag_update_to_db() - int media_tag_set_name( - media_tag_h tag, - ffi.Pointer tag_name, - ) { - return _media_tag_set_name( - tag, - tag_name, - ); - } - - late final _media_tag_set_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_tag_h, ffi.Pointer)>>('media_tag_set_name'); - late final _media_tag_set_name = _media_tag_set_namePtr - .asFunction)>(); - - /// @brief Updates the media tag to the media database. - /// - /// @details The function updates the given media tag in the media database. The function should be called after any change in tag attributes, to be updated to the media - /// database. For example, after using media_tag_set_name() for setting the name of the tag, the media_tag_update_to_db() function should be called so as to update - /// the given tag attributes in the media database. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @param[in] tag The media tag handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_tag_destroy() - /// @see media_tag_add_media() - /// @see media_tag_remove_media() - /// @see media_tag_set_name() - int media_tag_update_to_db( - media_tag_h tag, - ) { - return _media_tag_update_to_db( - tag, - ); - } - - late final _media_tag_update_to_dbPtr = - _lookup>( - 'media_tag_update_to_db'); - late final _media_tag_update_to_db = - _media_tag_update_to_dbPtr.asFunction(); - - /// @brief Clones the video metadata. - /// @details This function copies the video metadata handle from a source to destination. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release the destination handle using video_meta_destroy(). - /// - /// @param[out] dst The destination handle to the video metadata - /// @param[in] src The source handle to the video metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see video_meta_destroy() - int video_meta_clone( - ffi.Pointer dst, - video_meta_h src, - ) { - return _video_meta_clone( - dst, - src, - ); - } - - late final _video_meta_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, video_meta_h)>>('video_meta_clone'); - late final _video_meta_clone = _video_meta_clonePtr - .asFunction, video_meta_h)>(); - - /// @brief Destroys the video metadata. - /// @details This function frees all resources related to the video metadata handle. This handle - /// no longer can be used to perform any operation. A new handle has to - /// be created before the next use. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] video The video metadata handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre Get copy of video metadata handle by calling video_meta_clone(). - /// - /// @see video_meta_clone() - int video_meta_destroy( - video_meta_h video, - ) { - return _video_meta_destroy( - video, - ); - } - - late final _video_meta_destroyPtr = - _lookup>( - 'video_meta_destroy'); - late final _video_meta_destroy = - _video_meta_destroyPtr.asFunction(); - - /// @brief Gets the ID of the media of the given video metadata. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a media_id using free(). - /// - /// @param[in] video The video metadata handle - /// @param[out] media_id The ID of the video - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int video_meta_get_media_id( - video_meta_h video, - ffi.Pointer> media_id, - ) { - return _video_meta_get_media_id( - video, - media_id, - ); - } - - late final _video_meta_get_media_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(video_meta_h, - ffi.Pointer>)>>('video_meta_get_media_id'); - late final _video_meta_get_media_id = _video_meta_get_media_idPtr.asFunction< - int Function(video_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the album of the given video metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no album info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a album using free(). - /// - /// @param[in] video The video metadata handle - /// @param[out] album The album of the video metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int video_meta_get_album( - video_meta_h video, - ffi.Pointer> album, - ) { - return _video_meta_get_album( - video, - album, - ); - } - - late final _video_meta_get_albumPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(video_meta_h, - ffi.Pointer>)>>('video_meta_get_album'); - late final _video_meta_get_album = _video_meta_get_albumPtr.asFunction< - int Function(video_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the artist of the given video metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no artist info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a artist using free(). - /// - /// @param[in] video The video metadata handle - /// @param[out] artist The artist of the video metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int video_meta_get_artist( - video_meta_h video, - ffi.Pointer> artist, - ) { - return _video_meta_get_artist( - video, - artist, - ); - } - - late final _video_meta_get_artistPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(video_meta_h, - ffi.Pointer>)>>('video_meta_get_artist'); - late final _video_meta_get_artist = _video_meta_get_artistPtr.asFunction< - int Function(video_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the video album artist. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no album artist info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a album_artist using free(). - /// - /// @param[in] video The video metadata handle - /// @param[out] album_artist The album artist of the video metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int video_meta_get_album_artist( - video_meta_h video, - ffi.Pointer> album_artist, - ) { - return _video_meta_get_album_artist( - video, - album_artist, - ); - } - - late final _video_meta_get_album_artistPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - video_meta_h, ffi.Pointer>)>>( - 'video_meta_get_album_artist'); - late final _video_meta_get_album_artist = - _video_meta_get_album_artistPtr.asFunction< - int Function(video_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the genre of the given video metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no genre info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a genre using free(). - /// - /// @param[in] video The video metadata handle - /// @param[out] genre The genre of the video metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int video_meta_get_genre( - video_meta_h video, - ffi.Pointer> genre, - ) { - return _video_meta_get_genre( - video, - genre, - ); - } - - late final _video_meta_get_genrePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(video_meta_h, - ffi.Pointer>)>>('video_meta_get_genre'); - late final _video_meta_get_genre = _video_meta_get_genrePtr.asFunction< - int Function(video_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the composer of the given video metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no composer info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a composer using free(). - /// - /// @param[in] video The video metadata handle - /// @param[out] composer The composer of the video metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int video_meta_get_composer( - video_meta_h video, - ffi.Pointer> composer, - ) { - return _video_meta_get_composer( - video, - composer, - ); - } - - late final _video_meta_get_composerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(video_meta_h, - ffi.Pointer>)>>('video_meta_get_composer'); - late final _video_meta_get_composer = _video_meta_get_composerPtr.asFunction< - int Function(video_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the year of the given video metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no year info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a year using free(). - /// - /// @param[in] video The video metadata handle - /// @param[out] year The year of the video metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int video_meta_get_year( - video_meta_h video, - ffi.Pointer> year, - ) { - return _video_meta_get_year( - video, - year, - ); - } - - late final _video_meta_get_yearPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(video_meta_h, - ffi.Pointer>)>>('video_meta_get_year'); - late final _video_meta_get_year = _video_meta_get_yearPtr.asFunction< - int Function(video_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the recorded date of the video. - /// @details The recorded date is got from video file's metadata. Some formats like mp4 use UTC and the rest can be different. \n - /// So, please refer to the format specification if needed. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a recorded_date using free(). - /// - /// @param[in] video The video metadata handle - /// @param[out] recorded_date The recorded date of the video metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int video_meta_get_recorded_date( - video_meta_h video, - ffi.Pointer> recorded_date, - ) { - return _video_meta_get_recorded_date( - video, - recorded_date, - ); - } - - late final _video_meta_get_recorded_datePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - video_meta_h, ffi.Pointer>)>>( - 'video_meta_get_recorded_date'); - late final _video_meta_get_recorded_date = - _video_meta_get_recorded_datePtr.asFunction< - int Function(video_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the copyright notice of the given video metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no copyright info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a copyright using free(). - /// - /// @param[in] video The video metadata handle - /// @param[out] copyright The copyright of the video metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int video_meta_get_copyright( - video_meta_h video, - ffi.Pointer> copyright, - ) { - return _video_meta_get_copyright( - video, - copyright, - ); - } - - late final _video_meta_get_copyrightPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(video_meta_h, - ffi.Pointer>)>>('video_meta_get_copyright'); - late final _video_meta_get_copyright = - _video_meta_get_copyrightPtr.asFunction< - int Function(video_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the track number of the given video metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no track info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a track_num using free(). - /// - /// @param[in] video The video metadata handle - /// @param[out] track_num The track number of the video metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int video_meta_get_track_num( - video_meta_h video, - ffi.Pointer> track_num, - ) { - return _video_meta_get_track_num( - video, - track_num, - ); - } - - late final _video_meta_get_track_numPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(video_meta_h, - ffi.Pointer>)>>('video_meta_get_track_num'); - late final _video_meta_get_track_num = - _video_meta_get_track_numPtr.asFunction< - int Function(video_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the bitrate of the given video metadata in bitrate per second. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] video The video metadata handle - /// @param[out] bit_rate The video bit rate in bit per second [bps] - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int video_meta_get_bit_rate( - video_meta_h video, - ffi.Pointer bit_rate, - ) { - return _video_meta_get_bit_rate( - video, - bit_rate, - ); - } - - late final _video_meta_get_bit_ratePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - video_meta_h, ffi.Pointer)>>('video_meta_get_bit_rate'); - late final _video_meta_get_bit_rate = _video_meta_get_bit_ratePtr - .asFunction)>(); - - /// @brief Gets the track duration of the given video metadata. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] video The video metadata handle - /// @param[out] duration The video duration in milliseconds - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int video_meta_get_duration( - video_meta_h video, - ffi.Pointer duration, - ) { - return _video_meta_get_duration( - video, - duration, - ); - } - - late final _video_meta_get_durationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - video_meta_h, ffi.Pointer)>>('video_meta_get_duration'); - late final _video_meta_get_duration = _video_meta_get_durationPtr - .asFunction)>(); - - /// @brief Gets the width of the given video metadata. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] video The video metadata handle - /// @param[out] width The video width in pixels - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int video_meta_get_width( - video_meta_h video, - ffi.Pointer width, - ) { - return _video_meta_get_width( - video, - width, - ); - } - - late final _video_meta_get_widthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - video_meta_h, ffi.Pointer)>>('video_meta_get_width'); - late final _video_meta_get_width = _video_meta_get_widthPtr - .asFunction)>(); - - /// @brief Gets the height of the given video metadata. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] video The video metadata handle - /// @param[out] height The video height in pixels - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int video_meta_get_height( - video_meta_h video, - ffi.Pointer height, - ) { - return _video_meta_get_height( - video, - height, - ); - } - - late final _video_meta_get_heightPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - video_meta_h, ffi.Pointer)>>('video_meta_get_height'); - late final _video_meta_get_height = _video_meta_get_heightPtr - .asFunction)>(); - - /// @brief Gets the rotation of the given video metadata. - /// @since_tizen 4.0 - /// - /// @param[in] video The video metadata handle - /// @param[out] rotation The clockwise rotation angle of the video in degrees (can be returned from 0 to less than 360) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int video_meta_get_rotation( - video_meta_h video, - ffi.Pointer rotation, - ) { - return _video_meta_get_rotation( - video, - rotation, - ); - } - - late final _video_meta_get_rotationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - video_meta_h, ffi.Pointer)>>('video_meta_get_rotation'); - late final _video_meta_get_rotation = _video_meta_get_rotationPtr - .asFunction)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - /// This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application. - /// @brief Gets the played count of the video. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] video The video metadata handle - /// @param[out] played_count The counter of the video played - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int video_meta_get_played_count( - video_meta_h video, - ffi.Pointer played_count, - ) { - return _video_meta_get_played_count( - video, - played_count, - ); - } - - late final _video_meta_get_played_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(video_meta_h, - ffi.Pointer)>>('video_meta_get_played_count'); - late final _video_meta_get_played_count = _video_meta_get_played_countPtr - .asFunction)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - /// This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application. - /// @brief Gets the last played time parameter of the video. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] video The video metadata handle - /// @param[out] played_time The last played time of the video - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int video_meta_get_played_time( - video_meta_h video, - ffi.Pointer played_time, - ) { - return _video_meta_get_played_time( - video, - played_time, - ); - } - - late final _video_meta_get_played_timePtr = _lookup< - ffi - .NativeFunction)>>( - 'video_meta_get_played_time'); - late final _video_meta_get_played_time = _video_meta_get_played_timePtr - .asFunction)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - /// This function does not guarantee independence of the played position value between applications. It is recommended that the value is managed by the application. - /// @brief Gets the played position parameter of the video. - /// @details This function returns the elapsed playback position parameter of the video as period - /// starting from the beginning of the movie. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] video The video metadata handle - /// @param[out] played_position The elapsed time of the video - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int video_meta_get_played_position( - video_meta_h video, - ffi.Pointer played_position, - ) { - return _video_meta_get_played_position( - video, - played_position, - ); - } - - late final _video_meta_get_played_positionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(video_meta_h, - ffi.Pointer)>>('video_meta_get_played_position'); - late final _video_meta_get_played_position = - _video_meta_get_played_positionPtr - .asFunction)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - /// This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application. - /// @brief Sets the played count of the video. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] video The video metadata handle - /// @param[in] played_count The number of played - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int video_meta_set_played_count( - video_meta_h video, - int played_count, - ) { - return _video_meta_set_played_count( - video, - played_count, - ); - } - - late final _video_meta_set_played_countPtr = - _lookup>( - 'video_meta_set_played_count'); - late final _video_meta_set_played_count = _video_meta_set_played_countPtr - .asFunction(); - - /// @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - /// This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application. - /// @brief Sets the last played time of the video. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] video The video metadata handle - /// @param[in] played_time The last played time of the video - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int video_meta_set_played_time( - video_meta_h video, - int played_time, - ) { - return _video_meta_set_played_time( - video, - played_time, - ); - } - - late final _video_meta_set_played_timePtr = - _lookup>( - 'video_meta_set_played_time'); - late final _video_meta_set_played_time = _video_meta_set_played_timePtr - .asFunction(); - - /// @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - /// This function does not guarantee independence of the played position value between applications. It is recommended that the value is managed by the application. - /// @brief Sets the played position of the video. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks It is NOT recommended to use this attribute for your application-specific purpose because this attribute can be overwritten by other applications (even 0). - /// - /// @param[in] video The video metadata handle - /// @param[in] played_position The position from the beginning of the video (in milliseconds) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int video_meta_set_played_position( - video_meta_h video, - int played_position, - ) { - return _video_meta_set_played_position( - video, - played_position, - ); - } - - late final _video_meta_set_played_positionPtr = - _lookup>( - 'video_meta_set_played_position'); - late final _video_meta_set_played_position = - _video_meta_set_played_positionPtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. Related setter functions are deprecated, therefore this function is not needed anymore. - /// @brief Updates an video metadata with modified attributes in the media database. - /// @details The function updates the given video meta in the media database. The function should be called after any change in video attributes, to be updated to the media - /// database. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @remarks Do not call this function in callback function of foreach function like media_info_foreach_media_from_db(). - /// - /// @param[in] video The video metadata handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int video_meta_update_to_db( - video_meta_h video, - ) { - return _video_meta_update_to_db( - video, - ); - } - - late final _video_meta_update_to_dbPtr = - _lookup>( - 'video_meta_update_to_db'); - late final _video_meta_update_to_db = - _video_meta_update_to_dbPtr.asFunction(); - - /// @brief Gets the number of the album for the passed @a filter from the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The media filter handle - /// @param[out] album_count The count of the media album - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_album_get_album_count_from_db( - filter_h filter, - ffi.Pointer album_count, - ) { - return _media_album_get_album_count_from_db( - filter, - album_count, - ); - } - - late final _media_album_get_album_count_from_dbPtr = _lookup< - ffi.NativeFunction)>>( - 'media_album_get_album_count_from_db'); - late final _media_album_get_album_count_from_db = - _media_album_get_album_count_from_dbPtr - .asFunction)>(); - - /// @brief Iterates through the media album with optional @a filter from the media database. - /// @details This function gets all media album handles meeting the given filter. - /// The callback function will be invoked for every retrieved media album. - /// If @c NULL is passed to the filter, no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The media filter handle - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_album_cb(). - /// - /// @see #media_album_cb - /// @see media_content_connect() - /// @see media_filter_create() - int media_album_foreach_album_from_db( - filter_h filter, - media_album_cb callback, - ffi.Pointer user_data, - ) { - return _media_album_foreach_album_from_db( - filter, - callback, - user_data, - ); - } - - late final _media_album_foreach_album_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filter_h, media_album_cb, - ffi.Pointer)>>('media_album_foreach_album_from_db'); - late final _media_album_foreach_album_from_db = - _media_album_foreach_album_from_dbPtr.asFunction< - int Function(filter_h, media_album_cb, ffi.Pointer)>(); - - /// @brief Gets the number of media info for the given album present in the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] album_id The ID of the media album - /// @param[in] filter The media filter handle - /// @param[out] media_count The count of the album - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_album_get_media_count_from_db( - int album_id, - filter_h filter, - ffi.Pointer media_count, - ) { - return _media_album_get_media_count_from_db( - album_id, - filter, - media_count, - ); - } - - late final _media_album_get_media_count_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, filter_h, - ffi.Pointer)>>('media_album_get_media_count_from_db'); - late final _media_album_get_media_count_from_db = - _media_album_get_media_count_from_dbPtr - .asFunction)>(); - - /// @brief Iterates through the media files with an optional @a filter in the given media album from the media database. - /// @details This function gets all media files associated with the given media album and - /// meeting desired filter option and calls @a callback for - /// every retrieved media info. If @c NULL is passed to the @a filter, no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] album_id The ID of the media album - /// @param[in] filter The media filter handle - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_info_cb(). - /// - /// @see #media_info_cb - /// @see media_content_connect() - /// @see media_filter_create() - int media_album_foreach_media_from_db( - int album_id, - filter_h filter, - media_info_cb callback, - ffi.Pointer user_data, - ) { - return _media_album_foreach_media_from_db( - album_id, - filter, - callback, - user_data, - ); - } - - late final _media_album_foreach_media_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, filter_h, media_info_cb, - ffi.Pointer)>>('media_album_foreach_media_from_db'); - late final _media_album_foreach_media_from_db = - _media_album_foreach_media_from_dbPtr.asFunction< - int Function(int, filter_h, media_info_cb, ffi.Pointer)>(); - - /// @brief Destroys the album handle. - /// @details This function frees all resources related to the album handle. This handle - /// can no longer be used to perform any operation. A new handle has to - /// be created before the next use. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] album The media album handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre Get copy of album handle by calling media_album_clone(). - /// - /// @see media_album_clone() - int media_album_destroy( - media_album_h album, - ) { - return _media_album_destroy( - album, - ); - } - - late final _media_album_destroyPtr = - _lookup>( - 'media_album_destroy'); - late final _media_album_destroy = - _media_album_destroyPtr.asFunction(); - - /// @brief Clones a media album. - /// @details This function copies the media album handle from a source to - /// destination. There is no media_album_create() function. The media_album_h is created internally and available through - /// media album foreach function such as media_album_foreach_album_from_db(). To use this handle outside of these foreach functions, - /// use this function. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release the destination handle using media_album_destroy(). - /// - /// @param[in] src The source handle to the media album - /// @param[out] dst The destination handle to the media album - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see media_album_destroy() - /// @see media_album_foreach_album_from_db() - int media_album_clone( - ffi.Pointer dst, - media_album_h src, - ) { - return _media_album_clone( - dst, - src, - ); - } - - late final _media_album_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, media_album_h)>>('media_album_clone'); - late final _media_album_clone = _media_album_clonePtr - .asFunction, media_album_h)>(); - - /// @brief Gets the ID of the album. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] album The media album handle - /// @param[out] album_id The media album ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_album_foreach_album_from_db() - int media_album_get_album_id( - media_album_h album, - ffi.Pointer album_id, - ) { - return _media_album_get_album_id( - album, - album_id, - ); - } - - late final _media_album_get_album_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_album_h, - ffi.Pointer)>>('media_album_get_album_id'); - late final _media_album_get_album_id = _media_album_get_album_idPtr - .asFunction)>(); - - /// @brief Gets the name of the album. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a album_name using free(). - /// - /// @param[in] album The media album handle - /// @param[out] album_name The name of the media album handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_album_get_name( - media_album_h album, - ffi.Pointer> album_name, - ) { - return _media_album_get_name( - album, - album_name, - ); - } - - late final _media_album_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_album_h, - ffi.Pointer>)>>('media_album_get_name'); - late final _media_album_get_name = _media_album_get_namePtr.asFunction< - int Function(media_album_h, ffi.Pointer>)>(); - - /// @brief Gets the name of the artist from the given album. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a artist using free(). - /// - /// @param[in] album The media album handle - /// @param[out] artist The name of the media artist - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_album_get_artist( - media_album_h album, - ffi.Pointer> artist, - ) { - return _media_album_get_artist( - album, - artist, - ); - } - - late final _media_album_get_artistPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_album_h, - ffi.Pointer>)>>('media_album_get_artist'); - late final _media_album_get_artist = _media_album_get_artistPtr.asFunction< - int Function(media_album_h, ffi.Pointer>)>(); - - /// @brief Gets the album art path from the album. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a album_art using free(). - /// - /// @param[in] album The media album handle - /// @param[out] album_art The path of the media album_art - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_album_get_album_art( - media_album_h album, - ffi.Pointer> album_art, - ) { - return _media_album_get_album_art( - album, - album_art, - ); - } - - late final _media_album_get_album_artPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_album_h, ffi.Pointer>)>>( - 'media_album_get_album_art'); - late final _media_album_get_album_art = - _media_album_get_album_artPtr.asFunction< - int Function(media_album_h, ffi.Pointer>)>(); - - /// @brief Gets the media album from the media database. - /// - /// @details This function creates a new media album handle from the media database by the given @a album_id. - /// Media album will be created and will be filled with the album information. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a folder using media_album_destroy(). - /// - /// @param[in] album_id The ID of the media album - /// @param[out] album The album handle associated with the album ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_album_destroy() - int media_album_get_album_from_db( - int album_id, - ffi.Pointer album, - ) { - return _media_album_get_album_from_db( - album_id, - album, - ); - } - - late final _media_album_get_album_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, - ffi.Pointer)>>('media_album_get_album_from_db'); - late final _media_album_get_album_from_db = _media_album_get_album_from_dbPtr - .asFunction)>(); - - /// @brief Gets the number of the group for the passed @a filter from the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The media filter handle - /// @param[in] group The type of the media group - /// @param[out] group_count The count of the media group - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_group_get_group_count_from_db( - filter_h filter, - int group, - ffi.Pointer group_count, - ) { - return _media_group_get_group_count_from_db( - filter, - group, - group_count, - ); - } - - late final _media_group_get_group_count_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filter_h, ffi.Int32, - ffi.Pointer)>>('media_group_get_group_count_from_db'); - late final _media_group_get_group_count_from_db = - _media_group_get_group_count_from_dbPtr - .asFunction)>(); - - /// @brief Iterates through the media group with an optional @a filter from the media database. - /// @details This function gets names of media group meeting the given filter. - /// The callback function will be invoked for every retrieved media group. - /// If @c NULL is passed to the filter, no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The media filter handle - /// @param[in] group The type of the media group - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_group_cb(). - /// - /// @see #media_group_cb - /// @see media_content_connect() - /// @see media_filter_create() - int media_group_foreach_group_from_db( - filter_h filter, - int group, - media_group_cb callback, - ffi.Pointer user_data, - ) { - return _media_group_foreach_group_from_db( - filter, - group, - callback, - user_data, - ); - } - - late final _media_group_foreach_group_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filter_h, ffi.Int32, media_group_cb, - ffi.Pointer)>>('media_group_foreach_group_from_db'); - late final _media_group_foreach_group_from_db = - _media_group_foreach_group_from_dbPtr.asFunction< - int Function(filter_h, int, media_group_cb, ffi.Pointer)>(); - - /// @brief Gets the count of the media info for the given media group present in the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] group_name The name of the media group - /// @param[in] group The type of the media group - /// @param[in] filter The media filter handle - /// @param[out] media_count The count of the media - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_group_get_media_count_from_db( - ffi.Pointer group_name, - int group, - filter_h filter, - ffi.Pointer media_count, - ) { - return _media_group_get_media_count_from_db( - group_name, - group, - filter, - media_count, - ); - } - - late final _media_group_get_media_count_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int32, filter_h, - ffi.Pointer)>>('media_group_get_media_count_from_db'); - late final _media_group_get_media_count_from_db = - _media_group_get_media_count_from_dbPtr.asFunction< - int Function( - ffi.Pointer, int, filter_h, ffi.Pointer)>(); - - /// @brief Iterates through the media files with an optional @a filter in the given @a group from the media database. - /// @details This function gets all media files associated with the given group and - /// meeting desired filter option and calls @a callback for - /// every retrieved media info. If @c NULL is passed to the @a filter, no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] group_name The name of the media group - /// @param[in] group The type of the media group - /// @param[in] filter The media filter handle - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_info_cb(). - /// - /// @see media_info_cb() - /// @see media_content_connect() - /// @see media_filter_create() - int media_group_foreach_media_from_db( - ffi.Pointer group_name, - int group, - filter_h filter, - media_info_cb callback, - ffi.Pointer user_data, - ) { - return _media_group_foreach_media_from_db( - group_name, - group, - filter, - callback, - user_data, - ); - } - - late final _media_group_foreach_media_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - filter_h, - media_info_cb, - ffi.Pointer)>>('media_group_foreach_media_from_db'); - late final _media_group_foreach_media_from_db = - _media_group_foreach_media_from_dbPtr.asFunction< - int Function(ffi.Pointer, int, filter_h, media_info_cb, - ffi.Pointer)>(); - - /// @brief Gets the number of playlists for the passed @a filter from the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The handle to the filter - /// @param[out] playlist_count The count of the media playlist - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_playlist_get_playlist_count_from_db( - filter_h filter, - ffi.Pointer playlist_count, - ) { - return _media_playlist_get_playlist_count_from_db( - filter, - playlist_count, - ); - } - - late final _media_playlist_get_playlist_count_from_dbPtr = _lookup< - ffi.NativeFunction)>>( - 'media_playlist_get_playlist_count_from_db'); - late final _media_playlist_get_playlist_count_from_db = - _media_playlist_get_playlist_count_from_dbPtr - .asFunction)>(); - - /// @brief Iterates through the media playlists with an optional @a filter from the media database. - /// @details This function gets all media playlists meeting the given filter. - /// The callback function will be invoked for every retrieved media playlist. - /// If @c NULL is passed to the filter, no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The handle to the audio filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_playlist_cb(). - /// - /// @see media_playlist_cb() - /// @see media_content_connect() - /// @see media_filter_create() - int media_playlist_foreach_playlist_from_db( - filter_h filter, - media_playlist_cb callback, - ffi.Pointer user_data, - ) { - return _media_playlist_foreach_playlist_from_db( - filter, - callback, - user_data, - ); - } - - late final _media_playlist_foreach_playlist_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - filter_h, media_playlist_cb, ffi.Pointer)>>( - 'media_playlist_foreach_playlist_from_db'); - late final _media_playlist_foreach_playlist_from_db = - _media_playlist_foreach_playlist_from_dbPtr.asFunction< - int Function(filter_h, media_playlist_cb, ffi.Pointer)>(); - - /// @brief Gets the number of the media info for the given playlist present in the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] playlist_id The ID of the media playlist - /// @param[in] filter The media filter handle - /// @param[out] media_count The number of media items - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_playlist_get_media_count_from_db( - int playlist_id, - filter_h filter, - ffi.Pointer media_count, - ) { - return _media_playlist_get_media_count_from_db( - playlist_id, - filter, - media_count, - ); - } - - late final _media_playlist_get_media_count_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, filter_h, - ffi.Pointer)>>('media_playlist_get_media_count_from_db'); - late final _media_playlist_get_media_count_from_db = - _media_playlist_get_media_count_from_dbPtr - .asFunction)>(); - - /// @brief Iterates through the media files with an optional @a filter in the given audio playlist from the media database. - /// @details This function gets all media files associated with the given media playlist and - /// meeting desired filter option and calls @a callback for - /// every retrieved media info. If @c NULL is passed to the @a filter, no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] playlist_id The ID of the media playlist - /// @param[in] filter The audio filter handle - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_info_cb(). - /// - /// @see media_info_cb() - /// @see media_content_connect() - /// @see media_filter_create() - int media_playlist_foreach_media_from_db( - int playlist_id, - filter_h filter, - playlist_member_cb callback, - ffi.Pointer user_data, - ) { - return _media_playlist_foreach_media_from_db( - playlist_id, - filter, - callback, - user_data, - ); - } - - late final _media_playlist_foreach_media_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, filter_h, playlist_member_cb, - ffi.Pointer)>>('media_playlist_foreach_media_from_db'); - late final _media_playlist_foreach_media_from_db = - _media_playlist_foreach_media_from_dbPtr.asFunction< - int Function( - int, filter_h, playlist_member_cb, ffi.Pointer)>(); - - /// @brief Inserts a new playlist with the given name into the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @remarks You must release the created handle using media_playlist_destroy(). - /// - /// @param[in] name The name of the inserted playlist - /// @param[out] playlist A created handle to media playlist - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_playlist_delete_from_db() - int media_playlist_insert_to_db( - ffi.Pointer name, - ffi.Pointer playlist, - ) { - return _media_playlist_insert_to_db( - name, - playlist, - ); - } - - late final _media_playlist_insert_to_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('media_playlist_insert_to_db'); - late final _media_playlist_insert_to_db = - _media_playlist_insert_to_dbPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Deletes the given playlist from the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @param[in] playlist_id The ID of media playlist - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_playlist_insert_to_db() - int media_playlist_delete_from_db( - int playlist_id, - ) { - return _media_playlist_delete_from_db( - playlist_id, - ); - } - - late final _media_playlist_delete_from_dbPtr = - _lookup>( - 'media_playlist_delete_from_db'); - late final _media_playlist_delete_from_db = - _media_playlist_delete_from_dbPtr.asFunction(); - - /// @brief Gets the media playlist from the media database. - /// - /// @details This function creates a new media playlist handle from the media database by the given @a playlist_id. - /// The media playlist will be created and will be filled with the playlist information. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a playlist using media_playlist_destroy(). - /// - /// @param[in] playlist_id The ID of the media playlist - /// @param[out] playlist The media playlist handle associated with the playlist ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_playlist_destroy() - int media_playlist_get_playlist_from_db( - int playlist_id, - ffi.Pointer playlist, - ) { - return _media_playlist_get_playlist_from_db( - playlist_id, - playlist, - ); - } - - late final _media_playlist_get_playlist_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer)>>( - 'media_playlist_get_playlist_from_db'); - late final _media_playlist_get_playlist_from_db = - _media_playlist_get_playlist_from_dbPtr - .asFunction)>(); - - /// @brief Destroys a playlist handle. - /// @details This function frees all resources related to the playlist handle. This - /// handle no longer can be used to perform any operation. A new handle has to - /// be created before next usage. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] playlist The media playlist handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre Get a copy of playlist handle by calling media_playlist_clone() or media_playlist_insert_to_db(). - /// - /// @see media_playlist_clone() - int media_playlist_destroy( - media_playlist_h playlist, - ) { - return _media_playlist_destroy( - playlist, - ); - } - - late final _media_playlist_destroyPtr = - _lookup>( - 'media_playlist_destroy'); - late final _media_playlist_destroy = - _media_playlist_destroyPtr.asFunction(); - - /// @brief Clones a playlist handle. - /// @details This function copies the media playlist handle from a source to - /// destination. There is no media_playlist_create() function. The media_playlist_h is created internally and available through - /// media playlist foreach function such as media_playlist_foreach_playlist_from_db(). - /// To use this handle outside of these foreach functions, use this function. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The destination handle must be released using media_playlist_destroy(). - /// - /// @param[in] src The source handle of a media playlist - /// @param[out] dst The destination handle to a media playlist - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see media_playlist_destroy() - /// @see media_playlist_foreach_playlist_from_db() - int media_playlist_clone( - ffi.Pointer dst, - media_playlist_h src, - ) { - return _media_playlist_clone( - dst, - src, - ); - } - - late final _media_playlist_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - media_playlist_h)>>('media_playlist_clone'); - late final _media_playlist_clone = _media_playlist_clonePtr.asFunction< - int Function(ffi.Pointer, media_playlist_h)>(); - - /// @brief Gets the media playlist ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] playlist The media playlist handle - /// @param[out] playlist_id The ID of the media playlist - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_playlist_get_playlist_id( - media_playlist_h playlist, - ffi.Pointer playlist_id, - ) { - return _media_playlist_get_playlist_id( - playlist, - playlist_id, - ); - } - - late final _media_playlist_get_playlist_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_playlist_h, - ffi.Pointer)>>('media_playlist_get_playlist_id'); - late final _media_playlist_get_playlist_id = - _media_playlist_get_playlist_idPtr - .asFunction)>(); - - /// @brief Gets a name of the playlist. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a playlist_name using free(). - /// - /// @param[in] playlist The media playlist handle - /// @param[out] playlist_name The playlist name - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_playlist_get_name( - media_playlist_h playlist, - ffi.Pointer> playlist_name, - ) { - return _media_playlist_get_name( - playlist, - playlist_name, - ); - } - - late final _media_playlist_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_playlist_h, - ffi.Pointer>)>>('media_playlist_get_name'); - late final _media_playlist_get_name = _media_playlist_get_namePtr.asFunction< - int Function(media_playlist_h, ffi.Pointer>)>(); - - /// @brief Sets the name of the playlist. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] playlist The media playlist handle - /// @param[in] playlist_name The name of the media playlist - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @post media_playlist_update_to_db() - int media_playlist_set_name( - media_playlist_h playlist, - ffi.Pointer playlist_name, - ) { - return _media_playlist_set_name( - playlist, - playlist_name, - ); - } - - late final _media_playlist_set_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_playlist_h, - ffi.Pointer)>>('media_playlist_set_name'); - late final _media_playlist_set_name = _media_playlist_set_namePtr - .asFunction)>(); - - /// @brief Gets a thumbnail path of the playlist. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a path using free(). - /// - /// @param[in] playlist The media playlist handle - /// @param[out] path The path of the thumbnail - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_playlist_get_thumbnail_path( - media_playlist_h playlist, - ffi.Pointer> path, - ) { - return _media_playlist_get_thumbnail_path( - playlist, - path, - ); - } - - late final _media_playlist_get_thumbnail_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_playlist_h, ffi.Pointer>)>>( - 'media_playlist_get_thumbnail_path'); - late final _media_playlist_get_thumbnail_path = - _media_playlist_get_thumbnail_pathPtr.asFunction< - int Function(media_playlist_h, ffi.Pointer>)>(); - - /// @brief Sets the thumbnail path of the playlist. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] playlist The media playlist handle - /// @param[in] path The path of the thumbnail - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @post media_playlist_update_to_db() - int media_playlist_set_thumbnail_path( - media_playlist_h playlist, - ffi.Pointer path, - ) { - return _media_playlist_set_thumbnail_path( - playlist, - path, - ); - } - - late final _media_playlist_set_thumbnail_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_playlist_h, - ffi.Pointer)>>('media_playlist_set_thumbnail_path'); - late final _media_playlist_set_thumbnail_path = - _media_playlist_set_thumbnail_pathPtr - .asFunction)>(); - - /// @brief Sets the playing order in the playlist. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] playlist The media playlist handle - /// @param[in] playlist_member_id The playlist member ID - /// @param[in] play_order The playing order - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @post media_playlist_update_to_db() - int media_playlist_set_play_order( - media_playlist_h playlist, - int playlist_member_id, - int play_order, - ) { - return _media_playlist_set_play_order( - playlist, - playlist_member_id, - play_order, - ); - } - - late final _media_playlist_set_play_orderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_playlist_h, ffi.Int, - ffi.Int)>>('media_playlist_set_play_order'); - late final _media_playlist_set_play_order = _media_playlist_set_play_orderPtr - .asFunction(); - - /// @brief Adds a new media info to the playlist. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] playlist The media playlist handle - /// @param[in] media_id The ID to the media info which is added - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post media_playlist_update_to_db() - /// - /// @see media_content_connect() - /// @see media_playlist_remove_media() - int media_playlist_add_media( - media_playlist_h playlist, - ffi.Pointer media_id, - ) { - return _media_playlist_add_media( - playlist, - media_id, - ); - } - - late final _media_playlist_add_mediaPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_playlist_h, - ffi.Pointer)>>('media_playlist_add_media'); - late final _media_playlist_add_media = _media_playlist_add_mediaPtr - .asFunction)>(); - - /// @brief Removes the playlist members related with the media from the given playlist. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] playlist The media playlist handle - /// @param[in] playlist_member_id The playlist member ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post media_playlist_update_to_db() - /// - /// @see media_content_connect() - /// @see media_playlist_add_media() - int media_playlist_remove_media( - media_playlist_h playlist, - int playlist_member_id, - ) { - return _media_playlist_remove_media( - playlist, - playlist_member_id, - ); - } - - late final _media_playlist_remove_mediaPtr = - _lookup>( - 'media_playlist_remove_media'); - late final _media_playlist_remove_media = _media_playlist_remove_mediaPtr - .asFunction(); - - /// @brief Gets the played order of the playlist. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] playlist The media playlist handle - /// @param[in] playlist_member_id The playlist member ID - /// @param[out] play_order The played order - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_playlist_get_play_order( - media_playlist_h playlist, - int playlist_member_id, - ffi.Pointer play_order, - ) { - return _media_playlist_get_play_order( - playlist, - playlist_member_id, - play_order, - ); - } - - late final _media_playlist_get_play_orderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_playlist_h, ffi.Int, - ffi.Pointer)>>('media_playlist_get_play_order'); - late final _media_playlist_get_play_order = _media_playlist_get_play_orderPtr - .asFunction)>(); - - /// @brief Updates the media playlist to the media database. - /// - /// @details The function updates the given media playlist in the media database. - /// The function should be called after any change in the playlist, to be updated to the media database. - /// For example, after using media_playlist_set_name() for setting the name of the playlist, the - /// media_playlist_update_to_db() function should be called so as to update - /// the given playlist attributes in the media database. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @param[in] playlist The media playlist handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_playlist_destroy() - /// @see media_playlist_add_media() - /// @see media_playlist_remove_media() - /// @see media_playlist_set_name() - /// @see media_playlist_set_play_order() - int media_playlist_update_to_db( - media_playlist_h playlist, - ) { - return _media_playlist_update_to_db( - playlist, - ); - } - - late final _media_playlist_update_to_dbPtr = - _lookup>( - 'media_playlist_update_to_db'); - late final _media_playlist_update_to_db = _media_playlist_update_to_dbPtr - .asFunction(); - - /// @brief Imports the playlist from m3u playlist file. - /// @details This api reads a playlist from the m3u playlist file and insert into the db. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage. \n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n - /// This api does not support the file of extended m3u playlist. - /// - /// @param[in] playlist_name The name of the playlist to save - /// @param[in] path The path to import the playlist file - /// @param[out] playlist The media playlist handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - int media_playlist_import_from_file( - ffi.Pointer playlist_name, - ffi.Pointer path, - ffi.Pointer playlist, - ) { - return _media_playlist_import_from_file( - playlist_name, - path, - playlist, - ); - } - - late final _media_playlist_import_from_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>( - 'media_playlist_import_from_file'); - late final _media_playlist_import_from_file = - _media_playlist_import_from_filePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Exports the playlist to m3u playlist file. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage. \n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n - /// - /// @param[in] playlist The media playlist handle - /// @param[in] path path The path to export the playlist - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - int media_playlist_export_to_file( - media_playlist_h playlist, - ffi.Pointer path, - ) { - return _media_playlist_export_to_file( - playlist, - path, - ); - } - - late final _media_playlist_export_to_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_playlist_h, - ffi.Pointer)>>('media_playlist_export_to_file'); - late final _media_playlist_export_to_file = _media_playlist_export_to_filePtr - .asFunction)>(); - - /// @brief Inserts a new bookmark in media on the specified time offset to the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @param[in] media_id The media ID - /// @param[in] time The bookmark time offset (in seconds) - /// @param[in] thumbnail_path The thumbnail path of video bookmark\ n - /// If the media type is audio, then thumbnail is null. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_bookmark_delete_from_db() - int media_bookmark_insert_to_db( - ffi.Pointer media_id, - int time, - ffi.Pointer thumbnail_path, - ) { - return _media_bookmark_insert_to_db( - media_id, - time, - thumbnail_path, - ); - } - - late final _media_bookmark_insert_to_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, time_t, - ffi.Pointer)>>('media_bookmark_insert_to_db'); - late final _media_bookmark_insert_to_db = - _media_bookmark_insert_to_dbPtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer)>(); - - /// @brief Removes a media bookmark from the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @param[in] bookmark_id The ID of media bookmark - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_bookmark_insert_to_db() - int media_bookmark_delete_from_db( - int bookmark_id, - ) { - return _media_bookmark_delete_from_db( - bookmark_id, - ); - } - - late final _media_bookmark_delete_from_dbPtr = - _lookup>( - 'media_bookmark_delete_from_db'); - late final _media_bookmark_delete_from_db = - _media_bookmark_delete_from_dbPtr.asFunction(); - - /// @brief Gets the number of bookmarks with an optional filter from the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The handle to the media filter - /// @param[out] bookmark_count The count of the media bookmark - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_bookmark_get_bookmark_count_from_db( - filter_h filter, - ffi.Pointer bookmark_count, - ) { - return _media_bookmark_get_bookmark_count_from_db( - filter, - bookmark_count, - ); - } - - late final _media_bookmark_get_bookmark_count_from_dbPtr = _lookup< - ffi.NativeFunction)>>( - 'media_bookmark_get_bookmark_count_from_db'); - late final _media_bookmark_get_bookmark_count_from_db = - _media_bookmark_get_bookmark_count_from_dbPtr - .asFunction)>(); - - /// @brief Iterates through the bookmarks with an optional filter from the media database. - /// @details This function gets all bookmarks associated with the given filter and calls @a callback for every retrieved media bookmark. - /// If @c NULL is passed to the @a filter, then no filtering is applied. - /// @since_tizen 4.0 - /// - /// @param[in] filter The handle to the bookmark filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_bookmark_cb(). - /// - /// @see media_content_connect() - /// @see media_bookmark_cb() - /// @see media_filter_create() - int media_bookmark_foreach_bookmark_from_db( - filter_h filter, - media_bookmark_cb callback, - ffi.Pointer user_data, - ) { - return _media_bookmark_foreach_bookmark_from_db( - filter, - callback, - user_data, - ); - } - - late final _media_bookmark_foreach_bookmark_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - filter_h, media_bookmark_cb, ffi.Pointer)>>( - 'media_bookmark_foreach_bookmark_from_db'); - late final _media_bookmark_foreach_bookmark_from_db = - _media_bookmark_foreach_bookmark_from_dbPtr.asFunction< - int Function(filter_h, media_bookmark_cb, ffi.Pointer)>(); - - /// @brief Clones a media bookmark. - /// @details This function copies the media bookmark handle from a source to destination. There is no media_bookmark_create() function. - /// The media_bookmark_h is created internally and available through media bookmark foreach function such as media_info_foreach_bookmark_from_db(). - /// To use this handle outside of these foreach functions, use this function. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The destination handle must be released using media_bookmark_destroy(). - /// - /// @param[out] dst The destination handle to media bookmark - /// @param[in] src The source handle to media bookmark - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see media_bookmark_destroy() - /// @see media_info_foreach_bookmark_from_db() - int media_bookmark_clone( - ffi.Pointer dst, - media_bookmark_h src, - ) { - return _media_bookmark_clone( - dst, - src, - ); - } - - late final _media_bookmark_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - media_bookmark_h)>>('media_bookmark_clone'); - late final _media_bookmark_clone = _media_bookmark_clonePtr.asFunction< - int Function(ffi.Pointer, media_bookmark_h)>(); - - /// @brief Destroys a media bookmark. - /// @details This function frees all the resources related to the bookmark handle. This handle - /// no longer can be used to perform any operation. A new handle has to - /// be created before the next use. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] bookmark The handle to media bookmark - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre Get copy of bookmark handle by calling media_bookmark_clone(). - /// - /// @see media_bookmark_clone() - int media_bookmark_destroy( - media_bookmark_h bookmark, - ) { - return _media_bookmark_destroy( - bookmark, - ); - } - - late final _media_bookmark_destroyPtr = - _lookup>( - 'media_bookmark_destroy'); - late final _media_bookmark_destroy = - _media_bookmark_destroyPtr.asFunction(); - - /// @brief Gets the bookmark ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] bookmark The handle to media bookmark - /// @param[out] bookmark_id The media bookmark ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_bookmark_get_bookmark_id( - media_bookmark_h bookmark, - ffi.Pointer bookmark_id, - ) { - return _media_bookmark_get_bookmark_id( - bookmark, - bookmark_id, - ); - } - - late final _media_bookmark_get_bookmark_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_bookmark_h, - ffi.Pointer)>>('media_bookmark_get_bookmark_id'); - late final _media_bookmark_get_bookmark_id = - _media_bookmark_get_bookmark_idPtr - .asFunction)>(); - - /// @brief Gets the bookmark time marked parameter. - /// @details This function returns time offset in seconds from beginning of the movie on which bookmark - /// was placed. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] bookmark The handle to media bookmark - /// @param[out] marked_time The bookmark time offset (in seconds) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_bookmark_get_marked_time( - media_bookmark_h bookmark, - ffi.Pointer marked_time, - ) { - return _media_bookmark_get_marked_time( - bookmark, - marked_time, - ); - } - - late final _media_bookmark_get_marked_timePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_bookmark_h, - ffi.Pointer)>>('media_bookmark_get_marked_time'); - late final _media_bookmark_get_marked_time = - _media_bookmark_get_marked_timePtr - .asFunction)>(); - - /// @brief Gets the media bookmark thumbnail. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a path using free(). - /// - /// @param[in] bookmark The handle to media bookmark - /// @param[out] path The thumbnail path of media bookmark - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_bookmark_get_thumbnail_path( - media_bookmark_h bookmark, - ffi.Pointer> path, - ) { - return _media_bookmark_get_thumbnail_path( - bookmark, - path, - ); - } - - late final _media_bookmark_get_thumbnail_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_bookmark_h, ffi.Pointer>)>>( - 'media_bookmark_get_thumbnail_path'); - late final _media_bookmark_get_thumbnail_path = - _media_bookmark_get_thumbnail_pathPtr.asFunction< - int Function(media_bookmark_h, ffi.Pointer>)>(); - - /// @brief Gets the media bookmark name which user set. - /// @since_tizen 4.0 - /// - /// @remarks You must release @a name using free(). - /// - /// @param[in] bookmark The handle to media bookmark - /// @param[out] name The name of media bookmark. If name was not set, empty string is returned. - /// If User set bookmark name to NULL, name will be empty string also. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_bookmark_get_name( - media_bookmark_h bookmark, - ffi.Pointer> name, - ) { - return _media_bookmark_get_name( - bookmark, - name, - ); - } - - late final _media_bookmark_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_bookmark_h, - ffi.Pointer>)>>('media_bookmark_get_name'); - late final _media_bookmark_get_name = _media_bookmark_get_namePtr.asFunction< - int Function(media_bookmark_h, ffi.Pointer>)>(); - - /// @brief Sets the media bookmark name. - /// @since_tizen 4.0 - /// - /// @param[in] bookmark The handle to media bookmark - /// @param[in] name The name of media bookmark. Can be NULL, empty or non-empty string. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @post media_bookmark_update_to_db() - int media_bookmark_set_name( - media_bookmark_h bookmark, - ffi.Pointer name, - ) { - return _media_bookmark_set_name( - bookmark, - name, - ); - } - - late final _media_bookmark_set_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_bookmark_h, - ffi.Pointer)>>('media_bookmark_set_name'); - late final _media_bookmark_set_name = _media_bookmark_set_namePtr - .asFunction)>(); - - /// @brief Updates bookmark information to the media database. - /// @details The function updates the given bookmark meta in the media database. \n - /// The function should be called after any change in bookmark attributes, to be updated to the media database. \n - /// For example, after using media_bookmark_set_name() for setting the name of the bookmark, \n - /// the media_bookmark_update_to_db() function should be called so as to update the given bookmark attributes in the media database. - /// @since_tizen 4.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @remarks Do not call this function in callback function of foreach function like media_info_foreach_bookmark_from_db(). - /// @param[in] bookmark The handle to media bookmark - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied when Application has no privilege - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_bookmark_set_name() - int media_bookmark_update_to_db( - media_bookmark_h bookmark, - ) { - return _media_bookmark_update_to_db( - bookmark, - ); - } - - late final _media_bookmark_update_to_dbPtr = - _lookup>( - 'media_bookmark_update_to_db'); - late final _media_bookmark_update_to_db = _media_bookmark_update_to_dbPtr - .asFunction(); - - /// @brief Gets media storage from database. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks You must release the handle using media_storage_destroy(). \n - /// - /// @param[in] storage_id The storage id to get media storage info - /// @param[out] storage The media storage handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_storage_get_storage_info_from_db( - ffi.Pointer storage_id, - ffi.Pointer storage, - ) { - return _media_storage_get_storage_info_from_db( - storage_id, - storage, - ); - } - - late final _media_storage_get_storage_info_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>( - 'media_storage_get_storage_info_from_db'); - late final _media_storage_get_storage_info_from_db = - _media_storage_get_storage_info_from_dbPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the count of media storage for the passed @a filter from the media database. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] filter The handle to filter - /// @param[out] storage_count The count of storage - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_storage_get_storage_count_from_db( - filter_h filter, - ffi.Pointer storage_count, - ) { - return _media_storage_get_storage_count_from_db( - filter, - storage_count, - ); - } - - late final _media_storage_get_storage_count_from_dbPtr = _lookup< - ffi.NativeFunction)>>( - 'media_storage_get_storage_count_from_db'); - late final _media_storage_get_storage_count_from_db = - _media_storage_get_storage_count_from_dbPtr - .asFunction)>(); - - /// @brief Iterates through media storage from the media database. - /// @details This function gets all media storage handles meeting the given @a filter. - /// The @a callback function will be invoked for every retrieved media storage. - /// If @c NULL is passed to the @a filter, then no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] filter The media storage handle filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_storage_destroy(). - /// - /// @see media_content_connect() - /// @see media_storage_destroy() - int media_storage_foreach_storage_from_db( - filter_h filter, - media_storage_cb callback, - ffi.Pointer user_data, - ) { - return _media_storage_foreach_storage_from_db( - filter, - callback, - user_data, - ); - } - - late final _media_storage_foreach_storage_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filter_h, media_storage_cb, - ffi.Pointer)>>('media_storage_foreach_storage_from_db'); - late final _media_storage_foreach_storage_from_db = - _media_storage_foreach_storage_from_dbPtr.asFunction< - int Function(filter_h, media_storage_cb, ffi.Pointer)>(); - - /// @brief Gets the count of media files for the passed @a filter in the given @a storage from the media database. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] storage_id The ID of the media storage - /// @param[in] filter The filter of the media content - /// @param[out] media_count The count of media storage items - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_storage_get_media_count_from_db( - ffi.Pointer storage_id, - filter_h filter, - ffi.Pointer media_count, - ) { - return _media_storage_get_media_count_from_db( - storage_id, - filter, - media_count, - ); - } - - late final _media_storage_get_media_count_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, filter_h, - ffi.Pointer)>>('media_storage_get_media_count_from_db'); - late final _media_storage_get_media_count_from_db = - _media_storage_get_media_count_from_dbPtr.asFunction< - int Function( - ffi.Pointer, filter_h, ffi.Pointer)>(); - - /// @brief Iterates through the media files with an optional @a filter in the given @a storage from the media database. - /// @details This function gets all media files associated with the given storage and - /// meeting desired filter option and calls @a callback for - /// every retrieved media item. If @c NULL is passed to the @a filter, no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks Do not call updating DB function like media_info_update_to_db(), media_info_refresh_metadata_to_db(), audio_meta_update_to_db(), image_meta_update_to_db() and video_meta_update_to_db() in your callback function, - /// your callback function is invoked as inline function. \n - /// So, your callback function is in read state in SQLite. When you are in read state, sometimes you do not update DB. \n - /// We do not recommend you call updating DB function in callback of foreach function. - /// - /// @param[in] storage_id The ID of the media storage - /// @param[in] filter The handle to the media info filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_info_cb(). - /// - /// @see #media_info_cb - /// @see media_content_connect() - /// @see media_filter_create() - int media_storage_foreach_media_from_db( - ffi.Pointer storage_id, - filter_h filter, - media_info_cb callback, - ffi.Pointer user_data, - ) { - return _media_storage_foreach_media_from_db( - storage_id, - filter, - callback, - user_data, - ); - } - - late final _media_storage_foreach_media_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, filter_h, media_info_cb, - ffi.Pointer)>>('media_storage_foreach_media_from_db'); - late final _media_storage_foreach_media_from_db = - _media_storage_foreach_media_from_dbPtr.asFunction< - int Function(ffi.Pointer, filter_h, media_info_cb, - ffi.Pointer)>(); - - /// @brief Destroys media storage handle. - /// @details The function frees all resources related to the media storage handle. This handle - /// can no longer be used to perform any operation. New media storage handle has to - /// be created before the next usage. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] storage The media storage handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre Get copy of media_storage_h handle by calling media_storage_clone(). - /// - /// @see media_storage_clone() - int media_storage_destroy( - media_storage_h storage, - ) { - return _media_storage_destroy( - storage, - ); - } - - late final _media_storage_destroyPtr = - _lookup>( - 'media_storage_destroy'); - late final _media_storage_destroy = - _media_storage_destroyPtr.asFunction(); - - /// @brief Clones the media storage handle. - /// - /// @details This function copies the media storage handle from a source to the destination. - /// There is no media_storage_create() function. The media_storage_h is created internally and - /// available through media storage foreach function such as media_storage_foreach_storage_from_db(). - /// To use this handle outside of these foreach functions, use this function. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks You must release the destination handle using media_storage_destroy(). - /// - /// @param[out] dst The destination handle to the media storage - /// @param[in] src The source handle to media storage - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_storage_destroy() - /// @see media_storage_foreach_storage_from_db() - /// @see media_storage_get_storage_info_from_db() - int media_storage_clone( - ffi.Pointer dst, - media_storage_h src, - ) { - return _media_storage_clone( - dst, - src, - ); - } - - late final _media_storage_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - media_storage_h)>>('media_storage_clone'); - late final _media_storage_clone = _media_storage_clonePtr.asFunction< - int Function(ffi.Pointer, media_storage_h)>(); - - /// @brief Gets the storage id of media storage. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks You must release @a storage_id using free(). - /// - /// @param[in] storage The media storage handle - /// @param[out] storage_id The storage id of the media storage - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_storage_get_id( - media_storage_h storage, - ffi.Pointer> storage_id, - ) { - return _media_storage_get_id( - storage, - storage_id, - ); - } - - late final _media_storage_get_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_storage_h, - ffi.Pointer>)>>('media_storage_get_id'); - late final _media_storage_get_id = _media_storage_get_idPtr.asFunction< - int Function(media_storage_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Gets the storage name of media storage. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks You must release @a storage_name using free(). - /// If the requested storage is not the cloud storage, this API returns NULL. - /// - /// @param[in] storage The media storage handle - /// @param[out] storage_name The storage name of the media storage - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_storage_get_name( - media_storage_h storage, - ffi.Pointer> storage_name, - ) { - return _media_storage_get_name( - storage, - storage_name, - ); - } - - late final _media_storage_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_storage_h, - ffi.Pointer>)>>('media_storage_get_name'); - late final _media_storage_get_name = _media_storage_get_namePtr.asFunction< - int Function(media_storage_h, ffi.Pointer>)>(); - - /// @brief Gets the storage path of media storage. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks You must release @a storage_path using free(). - /// - /// @param[in] storage The media storage handle - /// @param[out] storage_path The storage path of the media storage - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_storage_get_path( - media_storage_h storage, - ffi.Pointer> storage_path, - ) { - return _media_storage_get_path( - storage, - storage_path, - ); - } - - late final _media_storage_get_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_storage_h, - ffi.Pointer>)>>('media_storage_get_path'); - late final _media_storage_get_path = _media_storage_get_pathPtr.asFunction< - int Function(media_storage_h, ffi.Pointer>)>(); - - /// @brief Gets the storage type of media storage. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] storage The media storage handle - /// @param[out] storage_type The storage type of the media storage - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_storage_get_type( - media_storage_h storage, - ffi.Pointer storage_type, - ) { - return _media_storage_get_type( - storage, - storage_type, - ); - } - - late final _media_storage_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_storage_h, - ffi.Pointer)>>('media_storage_get_type'); - late final _media_storage_get_type = _media_storage_get_typePtr - .asFunction)>(); - - /// @brief Clones the face handle. - /// @details This function copies the face handle from a source to - /// destination. There is no media_face_create() function. The media_face_h is created internally and available through - /// media face foreach function such as media_face_foreach_face_from_db(). To use this handle outside of these foreach functions, - /// use this function. - /// - /// @since_tizen 3.0 - /// @remark The destination handle must be released with media_event_destroy() by you. - /// - /// @param [in] src The source face handle - /// @param [out] dst A destination face handle - /// - /// @return 0 on success, otherwise a negative error value. - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see media_face_destroy() - /// @see media_face_foreach_face_from_db() - int media_face_clone( - ffi.Pointer dst, - media_face_h src, - ) { - return _media_face_clone( - dst, - src, - ); - } - - late final _media_face_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, media_face_h)>>('media_face_clone'); - late final _media_face_clone = _media_face_clonePtr - .asFunction, media_face_h)>(); - - /// @brief Destroys the face handle. - /// @details Function frees all resources related to face handle. This - /// handle no longer can be used to perform any operation. New handle has to - /// be created before next usage. - /// - /// @since_tizen 3.0 - /// - /// @param [in] face The face handle - /// - /// @return 0 on success, otherwise a negative error value. - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_face_clone() - /// - /// @pre Get copy of face handle by calling media_face_clone() or Get face handle by calling media_info_foreach_face_from_db() - int media_face_destroy( - media_face_h face, - ) { - return _media_face_destroy( - face, - ); - } - - late final _media_face_destroyPtr = - _lookup>( - 'media_face_destroy'); - late final _media_face_destroy = - _media_face_destroyPtr.asFunction(); - - /// @brief Gets the face id from the face handle. - /// - /// @since_tizen 3.0 - /// - /// @remarks You must release @a face_id using free(). - /// - /// @param [in] face The face handle - /// @param [out] face_id The uuid of the face handle - /// - /// @return 0 on success, otherwise a negative error value. - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_face_get_face_id( - media_face_h face, - ffi.Pointer> face_id, - ) { - return _media_face_get_face_id( - face, - face_id, - ); - } - - late final _media_face_get_face_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_face_h, - ffi.Pointer>)>>('media_face_get_face_id'); - late final _media_face_get_face_id = _media_face_get_face_idPtr.asFunction< - int Function(media_face_h, ffi.Pointer>)>(); - - /// @brief Gets the media uuid from the face handle. - /// - /// @since_tizen 3.0 - /// - /// @remarks You must release @a media_id using free(). - /// - /// @param [in] face The face handle - /// @param [out] media_id The media uuid of the face handle - /// - /// @return 0 on success, otherwise a negative error value. - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_face_get_media_id( - media_face_h face, - ffi.Pointer> media_id, - ) { - return _media_face_get_media_id( - face, - media_id, - ); - } - - late final _media_face_get_media_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_face_h, - ffi.Pointer>)>>('media_face_get_media_id'); - late final _media_face_get_media_id = _media_face_get_media_idPtr.asFunction< - int Function(media_face_h, ffi.Pointer>)>(); - - /// @brief Gets the face's rectangle from the face handle. - /// @details This API can get the face's rectangle information. returned rectangle information includes the orientation value. - /// - /// @since_tizen 3.0 - /// - /// @param [in] face The face handle - /// @param [out] rect_x The x position of face of the face handle - /// @param [out] rect_y The y position of face of the face handle - /// @param [out] rect_w The width of face of the face handle - /// @param [out] rect_h The height of face of the face handle - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_face_get_face_rect( - media_face_h face, - ffi.Pointer rect_x, - ffi.Pointer rect_y, - ffi.Pointer rect_w, - ffi.Pointer rect_h, - ) { - return _media_face_get_face_rect( - face, - rect_x, - rect_y, - rect_w, - rect_h, - ); - } - - late final _media_face_get_face_rectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_face_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('media_face_get_face_rect'); - late final _media_face_get_face_rect = - _media_face_get_face_rectPtr.asFunction< - int Function( - media_face_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the orientation from the face handle. - /// @details This API can get the orientation value from the original image. - /// - /// @since_tizen 3.0 - /// - /// @param [in] face The face handle - /// @param [out] orientation The orientation of the face handle - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_face_get_orientation( - media_face_h face, - ffi.Pointer orientation, - ) { - return _media_face_get_orientation( - face, - orientation, - ); - } - - late final _media_face_get_orientationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_face_h, - ffi.Pointer)>>('media_face_get_orientation'); - late final _media_face_get_orientation = _media_face_get_orientationPtr - .asFunction)>(); - - /// @brief Gets the tag from the face handle. - /// - /// @since_tizen 3.0 - /// - /// @remarks You must release @a tag using free(). - /// - /// @param [in] face The face handle - /// @param [out] tag The tag of the face handle - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_face_get_tag( - media_face_h face, - ffi.Pointer> tag, - ) { - return _media_face_get_tag( - face, - tag, - ); - } - - late final _media_face_get_tagPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_face_h, - ffi.Pointer>)>>('media_face_get_tag'); - late final _media_face_get_tag = _media_face_get_tagPtr.asFunction< - int Function(media_face_h, ffi.Pointer>)>(); - - /// @brief Creates the face handle. - /// - /// @since_tizen 3.0 - /// - /// @param [in] media_id The media uuid to create the face handle - /// @param [out] face The face handle - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_face_destroy() - int media_face_create( - ffi.Pointer media_id, - ffi.Pointer face, - ) { - return _media_face_create( - media_id, - face, - ); - } - - late final _media_face_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('media_face_create'); - late final _media_face_create = _media_face_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the face rectangle of the face handle - /// - /// @since_tizen 3.0 - /// - /// @param[in] face The face handle - /// @param[in] rect_x The integer to set as a position x of face rectangle - /// @param[in] rect_y The integer to set as a position y of face rectangle - /// @param[in] rect_w The integer to set as a width of face rectangle - /// @param[in] rect_h The integer to set as a height of face rectangle - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_face_insert_to_db() - /// @post media_face_update_to_db() - int media_face_set_face_rect( - media_face_h face, - int rect_x, - int rect_y, - int rect_w, - int rect_h, - ) { - return _media_face_set_face_rect( - face, - rect_x, - rect_y, - rect_w, - rect_h, - ); - } - - late final _media_face_set_face_rectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_face_h, ffi.UnsignedInt, ffi.UnsignedInt, - ffi.UnsignedInt, ffi.UnsignedInt)>>('media_face_set_face_rect'); - late final _media_face_set_face_rect = _media_face_set_face_rectPtr - .asFunction(); - - /// @brief Sets the orientation of the face handle - /// @details This API may set the value of the original image orientation. - /// - /// @since_tizen 3.0 - /// - /// @param[in] face The face handle - /// @param[in] orientation The integer to set as an orientation - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_face_insert_to_db() - /// @post media_face_update_to_db() - int media_face_set_orientation( - media_face_h face, - int orientation, - ) { - return _media_face_set_orientation( - face, - orientation, - ); - } - - late final _media_face_set_orientationPtr = - _lookup>( - 'media_face_set_orientation'); - late final _media_face_set_orientation = _media_face_set_orientationPtr - .asFunction(); - - /// @brief Sets the tag of the face handle. - /// - /// @since_tizen 3.0 - /// - /// @param [in] face The face handle - /// @param [in] tag The tag of the face handle - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @post media_face_insert_to_db() - /// @post media_face_update_to_db() - int media_face_set_tag( - media_face_h face, - ffi.Pointer tag, - ) { - return _media_face_set_tag( - face, - tag, - ); - } - - late final _media_face_set_tagPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_face_h, ffi.Pointer)>>('media_face_set_tag'); - late final _media_face_set_tag = _media_face_set_tagPtr - .asFunction)>(); - - /// @brief Inserts a new face in the media database. - /// @since_tizen 3.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @remarks The created tag handle must be released using media_tag_destroy(). - /// - /// @param [in] face The face handle - /// - /// @return 0 on success, otherwise a negative error value. - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// - /// @see media_content_connect() - /// @see media_face_destroy() - /// @see media_face_set_xxx() - int media_face_insert_to_db( - media_face_h face, - ) { - return _media_face_insert_to_db( - face, - ); - } - - late final _media_face_insert_to_dbPtr = - _lookup>( - 'media_face_insert_to_db'); - late final _media_face_insert_to_db = - _media_face_insert_to_dbPtr.asFunction(); - - /// @brief Updates the face details to the media database. - /// - /// @details The function updates the given media face in the media database. The function should be called after any change in face, to be updated to the media - /// database. For example, after using media_face_set_orientation() for setting the orientation of the face, media_face_update_to_db() function should be called so as to update - /// the given face attributes in the media database. - /// @since_tizen 3.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @param[in] face The face handle to update - /// - /// @return 0 on success, otherwise a negative error value. - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_face_destroy() - /// @see media_face_set_xxx() - int media_face_update_to_db( - media_face_h face, - ) { - return _media_face_update_to_db( - face, - ); - } - - late final _media_face_update_to_dbPtr = - _lookup>( - 'media_face_update_to_db'); - late final _media_face_update_to_db = - _media_face_update_to_dbPtr.asFunction(); - - /// @brief Deletes the face with given face uuid from the media database. - /// - /// @since_tizen 3.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @param [in] face_id The id of media face - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @see media_content_connect() - int media_face_delete_from_db( - ffi.Pointer face_id, - ) { - return _media_face_delete_from_db( - face_id, - ); - } - - late final _media_face_delete_from_dbPtr = - _lookup)>>( - 'media_face_delete_from_db'); - late final _media_face_delete_from_db = _media_face_delete_from_dbPtr - .asFunction)>(); - - /// @brief Gets the number of media faces with an optional filter from the media database. - /// @since_tizen 4.0 - /// - /// @param[in] filter The handle to the face filter - /// @param[out] face_count The count of the media faces - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_filter_create() - int media_face_get_face_count_from_db( - filter_h filter, - ffi.Pointer face_count, - ) { - return _media_face_get_face_count_from_db( - filter, - face_count, - ); - } - - late final _media_face_get_face_count_from_dbPtr = _lookup< - ffi.NativeFunction)>>( - 'media_face_get_face_count_from_db'); - late final _media_face_get_face_count_from_db = - _media_face_get_face_count_from_dbPtr - .asFunction)>(); - - /// @brief Iterates through the faces with an optional filter from the media database. - /// @details This function gets all faces associated with the given filter and calls @a callback for every retrieved media face. - /// If @c NULL is passed to the @a filter, then no filtering is applied. - /// @since_tizen 4.0 - /// - /// @param[in] filter The handle to the face filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_face_cb(). - /// - /// @see media_content_connect() - /// @see media_face_cb() - /// @see media_filter_create() - int media_face_foreach_face_from_db( - filter_h filter, - media_face_cb callback, - ffi.Pointer user_data, - ) { - return _media_face_foreach_face_from_db( - filter, - callback, - user_data, - ); - } - - late final _media_face_foreach_face_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filter_h, media_face_cb, - ffi.Pointer)>>('media_face_foreach_face_from_db'); - late final _media_face_foreach_face_from_db = - _media_face_foreach_face_from_dbPtr.asFunction< - int Function(filter_h, media_face_cb, ffi.Pointer)>(); - - /// @brief Connects to the media content service. - /// @details Any media content related function call should be invoked after this function call. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed - /// - /// @post media_content_disconnect() - /// - /// @see media_content_disconnect() - int media_content_connect() { - return _media_content_connect(); - } - - late final _media_content_connectPtr = - _lookup>('media_content_connect'); - late final _media_content_connect = - _media_content_connectPtr.asFunction(); - - /// @brief Disconnects from the media content service. - /// @details This function closes connection to the media content service. Any further media content related operation - /// cannot be performed after this function is called. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed - /// - /// @pre media_content_connect() - /// - /// @see media_content_connect() - int media_content_disconnect() { - return _media_content_disconnect(); - } - - late final _media_content_disconnectPtr = - _lookup>( - 'media_content_disconnect'); - late final _media_content_disconnect = - _media_content_disconnectPtr.asFunction(); - - /// @brief Requests to scan a media file. - /// @details This function requests to scan a media file to the media server. - /// If media file is not registered to DB yet, that media file information will be added to the media DB. If it is already registered to the DB, then this tries to refresh information. \n - /// If requested file does not exist on file system, information of the media file will be removed from the media DB. \n - /// If file information does not exist in DB, this API will be return #MEDIA_CONTENT_ERROR_INVALID_PARAMETER. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write \n - /// %http://tizen.org/privilege/mediastorage \n - /// %http://tizen.org/privilege/externalstorage - /// - /// @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n - /// If you want to access only internal storage by using this API, you should add privilege http://tizen.org/privilege/mediastorage. \n - /// Or if you want to access only external storage by using this API, you should add privilege http://tizen.org/privilege/externalstorage. \n - /// If you can access both storage, you must add all privilege. - /// @remarks Since 4.0, this function is related to the following feature:\n - /// %http://tizen.org/feature/content.scanning.others\n - /// If this feature is not suppported on the device, MEDIA_CONTENT_TYPE_OTHERS type file is not scanned. - /// - /// @param[in] path The file path - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @see media_content_connect() - int media_content_scan_file( - ffi.Pointer path, - ) { - return _media_content_scan_file( - path, - ); - } - - late final _media_content_scan_filePtr = - _lookup)>>( - 'media_content_scan_file'); - late final _media_content_scan_file = _media_content_scan_filePtr - .asFunction)>(); - - /// @brief Requests to scan a media folder, asynchronously. - /// @details This function requests to scan a media folder to the media server with given completed callback function. - /// media_scan_completed_cb() function will be called when the scanning is finished. - /// The sub folders are also scanned, if there are sub folders in that folder. \n - /// If any folder must not be scanned, a blank file ".scan_ignore" has to be created in that folder. - /// After adding or removing a folder from the filesystem, call this function on its source location - /// (this will add or remove an entry from the database). \n - /// After moving or renaming a folder in the filesystem, call this function on its source location - /// (this will remove an entry from the database) and call this function again on its destination location - /// (this will add a new entry to the database).\n - /// Alternatively, you can call this API on any parent of source location and on any parent of destination location.\n - /// You can also call the function once, on a folder which is a parent of both source and destination.\n - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write \n - /// %http://tizen.org/privilege/mediastorage \n - /// %http://tizen.org/privilege/externalstorage - /// - /// @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n - /// If you want to access only internal storage by using this API, you should add privilege http://tizen.org/privilege/mediastorage. \n - /// Or if you want to access only external storage by using this API, you should add privilege http://tizen.org/privilege/externalstorage. \n - /// If you can access both storage, you must add all privilege. - /// - /// @param[in] path The folder path - /// @param[in] is_recursive Set @c true to scan recursively subdirectories, - /// otherwise @c false to scan only the current directory - /// @param[in] callback The callback to be invoked when the scanning is finished - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @see media_scan_completed_cb() - /// @see media_content_connect() - int media_content_scan_folder( - ffi.Pointer path, - bool is_recursive, - media_scan_completed_cb callback, - ffi.Pointer user_data, - ) { - return _media_content_scan_folder( - path, - is_recursive, - callback, - user_data, - ); - } - - late final _media_content_scan_folderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Bool, - media_scan_completed_cb, - ffi.Pointer)>>('media_content_scan_folder'); - late final _media_content_scan_folder = - _media_content_scan_folderPtr.asFunction< - int Function(ffi.Pointer, bool, media_scan_completed_cb, - ffi.Pointer)>(); - - /// @brief Requests to cancel the media folder scanning. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] path The folder path - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre media_content_scan_folder() - int media_content_cancel_scan_folder( - ffi.Pointer path, - ) { - return _media_content_cancel_scan_folder( - path, - ); - } - - late final _media_content_cancel_scan_folderPtr = - _lookup)>>( - 'media_content_cancel_scan_folder'); - late final _media_content_cancel_scan_folder = - _media_content_cancel_scan_folderPtr - .asFunction)>(); - - /// @deprecated Deprecated since 3.0. Use media_content_add_db_updated_cb() instead. - /// @brief Subscribes notifications of the media DB change. - /// @details This function subscribes notifications of the media DB change which are published by the media server or other apps. - /// media_content_db_update_cb() function will be called when notification of the media DB change is subscribed. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] callback The callback to be invoked when the scanning is finished - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see media_content_db_update_cb() - /// @see media_content_unset_db_updated_cb() - int media_content_set_db_updated_cb( - media_content_db_update_cb callback, - ffi.Pointer user_data, - ) { - return _media_content_set_db_updated_cb( - callback, - user_data, - ); - } - - late final _media_content_set_db_updated_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_content_db_update_cb, - ffi.Pointer)>>('media_content_set_db_updated_cb'); - late final _media_content_set_db_updated_cb = - _media_content_set_db_updated_cbPtr.asFunction< - int Function(media_content_db_update_cb, ffi.Pointer)>(); - - /// @deprecated Deprecated since 3.0. Use media_content_remove_db_updated_cb() instead. - /// @brief Unsubscribes notifications of the media DB change. - /// @details This function unsubscribes notifications of the media DB change which are published by the media server or other apps. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// - /// @pre media_content_set_db_updated_cb() - /// - /// @see media_content_set_db_updated_cb() - int media_content_unset_db_updated_cb() { - return _media_content_unset_db_updated_cb(); - } - - late final _media_content_unset_db_updated_cbPtr = - _lookup>( - 'media_content_unset_db_updated_cb'); - late final _media_content_unset_db_updated_cb = - _media_content_unset_db_updated_cbPtr.asFunction(); - - /// @brief Subscribes notifications of the media DB change. - /// @details This function subscribes notifications of the media DB change which are published by the media server or other apps. \n - /// media_content_db_update_cb() function will be called when notification of the media DB change is subscribed. \n - /// Using this API, multiple callback is possible to register in one process. - /// - /// @since_tizen 3.0 - /// - /// @remarks To release the registered callback, you must use media_content_remove_db_updated_cb() API. \n - /// media_content_unset_db_updated_cb() API can not release the callbacks added by this API. \n - /// If you set the same callback that you previously added, this API returns MEDIA_CONTENT_ERROR_INVALID_OPERATION error. \n - /// - /// @param[in] callback The callback to be invoked when the scanning is finished - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] noti_handle The handle to db updated notification - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see media_content_db_update_cb() - /// @see media_content_remove_db_updated_cb() - int media_content_add_db_updated_cb( - media_content_db_update_cb callback, - ffi.Pointer user_data, - ffi.Pointer noti_handle, - ) { - return _media_content_add_db_updated_cb( - callback, - user_data, - noti_handle, - ); - } - - late final _media_content_add_db_updated_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_content_db_update_cb, - ffi.Pointer, ffi.Pointer)>>( - 'media_content_add_db_updated_cb'); - late final _media_content_add_db_updated_cb = - _media_content_add_db_updated_cbPtr.asFunction< - int Function(media_content_db_update_cb, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Unsubscribes notifications of the media DB change. - /// @details This function unsubscribes notifications of the media DB change which are published by the media server or other apps. - /// - /// @since_tizen 3.0 - /// - /// @param[in] noti_handle The handle to db updated notification - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre media_content_add_db_updated_cb() - /// - /// @see media_content_add_db_updated_cb() - int media_content_remove_db_updated_cb( - media_content_noti_h noti_handle, - ) { - return _media_content_remove_db_updated_cb( - noti_handle, - ); - } - - late final _media_content_remove_db_updated_cbPtr = - _lookup>( - 'media_content_remove_db_updated_cb'); - late final _media_content_remove_db_updated_cb = - _media_content_remove_db_updated_cbPtr - .asFunction(); - - /// @brief Creates an email message handle for sending an email message. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/email - /// @remarks You must release @a email using email_destroy_message(). - /// @param[out] email A handle to the email message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EMAILS_ERROR_NONE Successful - /// @retval #EMAILS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #EMAILS_ERROR_ACCOUNT_NOT_FOUND Email account not found - /// @retval #EMAILS_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #EMAILS_ERROR_NOT_SUPPORTED Not supported - /// @pre At least one email account should be set up on the device. - /// @see email_destroy_message() - int email_create_message( - ffi.Pointer email, - ) { - return _email_create_message( - email, - ); - } - - late final _email_create_messagePtr = - _lookup)>>( - 'email_create_message'); - late final _email_create_message = - _email_create_messagePtr.asFunction)>(); - - /// @brief Destroys the email message handle and releases all its resources. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] email The handle to the email message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EMAILS_ERROR_NONE Successful - /// @retval #EMAILS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EMAILS_ERROR_OPERATION_FAILED Operation failed - /// @retval #EMAILS_ERROR_NOT_SUPPORTED Not supported - /// @see email_create_message() - int email_destroy_message( - email_h email, - ) { - return _email_destroy_message( - email, - ); - } - - late final _email_destroy_messagePtr = - _lookup>( - 'email_destroy_message'); - late final _email_destroy_message = - _email_destroy_messagePtr.asFunction(); - - /// @brief Sets a subject of the email message. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/email - /// @param[in] email The handle to the email message - /// @param[in] subject The subject of the email message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EMAILS_ERROR_NONE Successful - /// @retval #EMAILS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EMAILS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #EMAILS_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #EMAILS_ERROR_NOT_SUPPORTED Not supported - /// @pre An email message handle is created using email_create_message(). - /// @see email_create_message() - int email_set_subject( - email_h email, - ffi.Pointer subject, - ) { - return _email_set_subject( - email, - subject, - ); - } - - late final _email_set_subjectPtr = _lookup< - ffi.NativeFunction)>>( - 'email_set_subject'); - late final _email_set_subject = _email_set_subjectPtr - .asFunction)>(); - - /// @brief Populates a body of the email message. - /// @details Email message body means the text data to be delivered. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediastorage - /// @param[in] email The handle to the email message - /// @param[in] body The message body - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EMAILS_ERROR_NONE Successful - /// @retval #EMAILS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EMAILS_ERROR_OPERATION_FAILED Operation failed - /// @retval #EMAILS_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #EMAILS_ERROR_NOT_SUPPORTED Not supported - /// @pre An email message handle is created using email_create_message(). - /// @see email_create_message() - int email_set_body( - email_h email, - ffi.Pointer body, - ) { - return _email_set_body( - email, - body, - ); - } - - late final _email_set_bodyPtr = _lookup< - ffi.NativeFunction)>>( - 'email_set_body'); - late final _email_set_body = _email_set_bodyPtr - .asFunction)>(); - - /// @brief Adds a recipient to the email message. - /// @details The email API supports sending an email message to multiple recipients. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks Email address should be in standard format (as described in - /// Internet standards RFC 5321 and RFC 5322). - /// @param[in] email The handle to the email message - /// @param[in] type The recipient type - /// @param[in] address The recipient email address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EMAILS_ERROR_NONE Successful - /// @retval #EMAILS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EMAILS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #EMAILS_ERROR_NOT_SUPPORTED Not supported - /// @pre An email message handle is created using email_create_message(). - /// @see email_create_message() - /// @see email_remove_all_recipients() - int email_add_recipient( - email_h email, - int type, - ffi.Pointer address, - ) { - return _email_add_recipient( - email, - type, - address, - ); - } - - late final _email_add_recipientPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(email_h, ffi.Int32, - ffi.Pointer)>>('email_add_recipient'); - late final _email_add_recipient = _email_add_recipientPtr - .asFunction)>(); - - /// @brief Removes all recipients for the email message. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] email The handle to the email message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EMAILS_ERROR_NONE Successful - /// @retval #EMAILS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EMAILS_ERROR_NOT_SUPPORTED Not supported - /// @pre An email message handle is created using email_create_message(). - /// @see email_add_recipient() - int email_remove_all_recipients( - email_h email, - ) { - return _email_remove_all_recipients( - email, - ); - } - - late final _email_remove_all_recipientsPtr = - _lookup>( - 'email_remove_all_recipients'); - late final _email_remove_all_recipients = - _email_remove_all_recipientsPtr.asFunction(); - - /// @brief Adds a file as an attachment to the email message. - /// @details It should be used to add a file to the attachment list - /// of the email message. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks The maximum attachment file size is 10MB. - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. - /// @param[in] email The handle to the email message - /// @param[in] filepath The absolute full path of the file to be attached - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EMAILS_ERROR_NONE Successful - /// @retval #EMAILS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EMAILS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #EMAILS_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #EMAILS_ERROR_NOT_SUPPORTED Not supported - /// @pre An email message handle is created using email_create_message(). - /// @see email_remove_all_attachments() - int email_add_attach( - email_h email, - ffi.Pointer filepath, - ) { - return _email_add_attach( - email, - filepath, - ); - } - - late final _email_add_attachPtr = _lookup< - ffi.NativeFunction)>>( - 'email_add_attach'); - late final _email_add_attach = _email_add_attachPtr - .asFunction)>(); - - /// @brief Clears all attachments of the email message. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] email The handle to the email message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EMAILS_ERROR_NONE Successful - /// @retval #EMAILS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EMAILS_ERROR_NOT_SUPPORTED Not supported - /// @pre An email message handle is created using email_create_message(). - /// @see email_create_message() - /// @see email_add_attach() - int email_remove_all_attachments( - email_h email, - ) { - return _email_remove_all_attachments( - email, - ); - } - - late final _email_remove_all_attachmentsPtr = - _lookup>( - 'email_remove_all_attachments'); - late final _email_remove_all_attachments = - _email_remove_all_attachmentsPtr.asFunction(); - - /// @brief Saves the email message at outbox. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/email - /// @param[in] email The handle to the email message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EMAILS_ERROR_NONE Successful - /// @retval #EMAILS_ERROR_COMMUNICATION_WITH_SERVER_FAILED Communication with server failed. - /// @retval #EMAILS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EMAILS_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #EMAILS_ERROR_NOT_SUPPORTED Not supported - /// @pre An email message handle is created using email_create_message(). - /// @see email_create_message() - /// @see email_add_recipient() - /// @see email_set_body() - /// @see email_save_message - int email_save_message( - email_h email, - ) { - return _email_save_message( - email, - ); - } - - late final _email_save_messagePtr = - _lookup>( - 'email_save_message'); - late final _email_save_message = - _email_save_messagePtr.asFunction(); - - /// @brief Sends the email message. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks In order to check whether sending a message succeeds, - /// you should register email_message_sent_cb() using email_set_message_sent_cb(). - /// @param[in] email The handle to the email message - /// @param[in] save_to_sentbox Set to @c true to save the message in the sentbox, - /// otherwise set to @c false to not save the message in the sentbox - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EMAILS_ERROR_NONE Successful - /// @retval #EMAILS_ERROR_COMMUNICATION_WITH_SERVER_FAILED Communication with server failed - /// @retval #EMAILS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EMAILS_ERROR_NOT_SUPPORTED Not supported - /// @pre An email message is stored using email_save_message(). - /// @see email_save_message() - /// @see email_set_message_sent_cb() - int email_send_message( - email_h email, - bool save_to_sentbox, - ) { - return _email_send_message( - email, - save_to_sentbox, - ); - } - - late final _email_send_messagePtr = - _lookup>( - 'email_send_message'); - late final _email_send_message = - _email_send_messagePtr.asFunction(); - - /// @brief Registers a callback function to be invoked when an email message is sent. - /// @details You will be notified when sending a message finishes and check whether it succeeds using this function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] email The handle to the email message - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EMAILS_ERROR_NONE Successful - /// @retval #EMAILS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EMAILS_ERROR_NOT_SUPPORTED Not supported - /// @post It will invoke email_message_sent_cb(). - /// @see email_message_sent_cb() - /// @see email_unset_message_sent_cb() - /// @see email_send_message() - int email_set_message_sent_cb( - email_h email, - email_message_sent_cb callback, - ffi.Pointer user_data, - ) { - return _email_set_message_sent_cb( - email, - callback, - user_data, - ); - } - - late final _email_set_message_sent_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(email_h, email_message_sent_cb, - ffi.Pointer)>>('email_set_message_sent_cb'); - late final _email_set_message_sent_cb = - _email_set_message_sent_cbPtr.asFunction< - int Function( - email_h, email_message_sent_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] msg The handle to the email message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EMAILS_ERROR_NONE Successful - /// @retval #EMAILS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EMAILS_ERROR_NOT_SUPPORTED Not supported - /// @see email_message_sent_cb() - /// @see email_set_message_sent_cb() - /// @see email_send_message() - int email_unset_message_sent_cb( - email_h msg, - ) { - return _email_unset_message_sent_cb( - msg, - ); - } - - late final _email_unset_message_sent_cbPtr = - _lookup>( - 'email_unset_message_sent_cb'); - late final _email_unset_message_sent_cb = - _email_unset_message_sent_cbPtr.asFunction(); - - /// @brief Opens a handle for the messaging service. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/message.read - /// @remarks You must release @a service using messages_close_service(). - /// @param[out] service The message service handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_SERVER_NOT_READY Server is not ready - /// @retval #MESSAGES_ERROR_COMMUNICATION_WITH_SERVER_FAILED Communication with server failed - /// @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @see messages_close_service() - int messages_open_service( - ffi.Pointer service, - ) { - return _messages_open_service( - service, - ); - } - - late final _messages_open_servicePtr = _lookup< - ffi - .NativeFunction)>>( - 'messages_open_service'); - late final _messages_open_service = _messages_open_servicePtr - .asFunction)>(); - - /// @brief Closes a handle for the messaging service. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/message.read - /// @param[in] service The message service handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_COMMUNICATION_WITH_SERVER_FAILED Communication with server failed - /// @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @see messages_open_service() - int messages_close_service( - messages_service_h service, - ) { - return _messages_close_service( - service, - ); - } - - late final _messages_close_servicePtr = - _lookup>( - 'messages_close_service'); - late final _messages_close_service = - _messages_close_servicePtr.asFunction(); - - /// @brief Creates a message handle. - /// @since_tizen 2.3 - /// @remarks You must release @a msg using messages_destroy_message(). - /// @param[in] type The message type (#MESSAGES_TYPE_SMS or #MESSAGES_TYPE_MMS) \n - /// If @a type is #MESSAGES_TYPE_UNKNOWN, #MESSAGES_ERROR_INVALID_PARAMETER occurs - /// @param[out] msg The message handle that is newly created if successful - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @see messages_destroy_message() - int messages_create_message( - int type, - ffi.Pointer msg, - ) { - return _messages_create_message( - type, - msg, - ); - } - - late final _messages_create_messagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, - ffi.Pointer)>>('messages_create_message'); - late final _messages_create_message = _messages_create_messagePtr - .asFunction)>(); - - /// @brief Destroys a message handle and releases all its resources. - /// @since_tizen 2.3 - /// @param[in] msg The message handle to destroy - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @see messages_create_message() - int messages_destroy_message( - messages_message_h msg, - ) { - return _messages_destroy_message( - msg, - ); - } - - late final _messages_destroy_messagePtr = - _lookup>( - 'messages_destroy_message'); - late final _messages_destroy_message = _messages_destroy_messagePtr - .asFunction(); - - /// @brief Adds the message to message database. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/message.write - /// @param[in] service The message service handle - /// @param[in] msg The message handle - /// @param[out] msg_id The message ID of added message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_OPERATION_FAILED Messaging operation failed - /// @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @see messages_create_message() - int messages_add_message( - messages_service_h service, - messages_message_h msg, - ffi.Pointer msg_id, - ) { - return _messages_add_message( - service, - msg, - msg_id, - ); - } - - late final _messages_add_messagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(messages_service_h, messages_message_h, - ffi.Pointer)>>('messages_add_message'); - late final _messages_add_message = _messages_add_messagePtr.asFunction< - int Function( - messages_service_h, messages_message_h, ffi.Pointer)>(); - - /// @brief Gets the message ID of the message. - /// @since_tizen 2.3 - /// @param[in] msg The message handle - /// @param[out] msg_id The message ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_OPERATION_FAILED Messaging operation failed - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @see messages_search_message_by_id() - int messages_get_message_id( - messages_message_h msg, - ffi.Pointer msg_id, - ) { - return _messages_get_message_id( - msg, - msg_id, - ); - } - - late final _messages_get_message_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(messages_message_h, - ffi.Pointer)>>('messages_get_message_id'); - late final _messages_get_message_id = _messages_get_message_idPtr - .asFunction)>(); - - /// @brief Sets the SIM ID of the sending message. - /// @since_tizen 2.3 - /// @param[in] msg The message handle - /// @param[in] sim_id The SIM ID to send message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_OPERATION_FAILED Messaging operation failed - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @see messages_get_sim_id() - int messages_set_sim_id( - messages_message_h msg, - int sim_id, - ) { - return _messages_set_sim_id( - msg, - sim_id, - ); - } - - late final _messages_set_sim_idPtr = _lookup< - ffi.NativeFunction>( - 'messages_set_sim_id'); - late final _messages_set_sim_id = _messages_set_sim_idPtr - .asFunction(); - - /// @brief Gets the SIM ID of the message. - /// @since_tizen 2.3 - /// @param[in] msg The message handle - /// @param[out] sim_id The SIM ID of message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_OPERATION_FAILED Messaging operation failed - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @see messages_set_sim_id() - int messages_get_sim_id( - messages_message_h msg, - ffi.Pointer sim_id, - ) { - return _messages_get_sim_id( - msg, - sim_id, - ); - } - - late final _messages_get_sim_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(messages_message_h, - ffi.Pointer)>>('messages_get_sim_id'); - late final _messages_get_sim_id = _messages_get_sim_idPtr - .asFunction)>(); - - /// @brief Sets the message box type of the message. - /// @since_tizen 3.0 - /// @param[in] msg The message handle - /// @param[in] mbox The message box type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - int messages_set_mbox_type( - messages_message_h msg, - int mbox, - ) { - return _messages_set_mbox_type( - msg, - mbox, - ); - } - - late final _messages_set_mbox_typePtr = _lookup< - ffi.NativeFunction>( - 'messages_set_mbox_type'); - late final _messages_set_mbox_type = _messages_set_mbox_typePtr - .asFunction(); - - /// @brief Gets the message box type of the message. - /// @since_tizen 2.3 - /// @param[in] msg The message handle - /// @param[out] mbox The message box type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - int messages_get_mbox_type( - messages_message_h msg, - ffi.Pointer mbox, - ) { - return _messages_get_mbox_type( - msg, - mbox, - ); - } - - late final _messages_get_mbox_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(messages_message_h, - ffi.Pointer)>>('messages_get_mbox_type'); - late final _messages_get_mbox_type = _messages_get_mbox_typePtr - .asFunction)>(); - - /// @brief Gets the destination port of the message. - /// @since_tizen 2.3 - /// @param[in] msg The message handle - /// @param[out] port The destination port of the message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @see messages_add_sms_listening_port() - int messages_get_message_port( - messages_message_h msg, - ffi.Pointer port, - ) { - return _messages_get_message_port( - msg, - port, - ); - } - - late final _messages_get_message_portPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(messages_message_h, - ffi.Pointer)>>('messages_get_message_port'); - late final _messages_get_message_port = _messages_get_message_portPtr - .asFunction)>(); - - /// @brief Gets the type of the message. - /// @since_tizen 2.3 - /// @param[in] msg The message handle - /// @param[out] type The message type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - int messages_get_message_type( - messages_message_h msg, - ffi.Pointer type, - ) { - return _messages_get_message_type( - msg, - type, - ); - } - - late final _messages_get_message_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(messages_message_h, - ffi.Pointer)>>('messages_get_message_type'); - late final _messages_get_message_type = _messages_get_message_typePtr - .asFunction)>(); - - /// @brief Adds an recipient's address(phone number) to the message. - /// @details The maximum number of recipients per message is 10. - /// @since_tizen 2.3 - /// @param[in] msg The message handle - /// @param[in] address The recipient's address to receive a message \n - /// The maximum length of @a address is @c 254. - /// @param[in] type The recipient's type of the @a address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @see messages_get_address() - /// @see messages_remove_all_addresses() - int messages_add_address( - messages_message_h msg, - ffi.Pointer address, - int type, - ) { - return _messages_add_address( - msg, - address, - type, - ); - } - - late final _messages_add_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(messages_message_h, ffi.Pointer, - ffi.Int32)>>('messages_add_address'); - late final _messages_add_address = _messages_add_addressPtr.asFunction< - int Function(messages_message_h, ffi.Pointer, int)>(); - - /// @brief Gets the total number of recipients in the message. - /// @since_tizen 2.3 - /// @param[in] msg The message handle - /// @param[out] count The total number of recipients - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @see messages_add_address() - /// @see messages_remove_all_addresses() - int messages_get_address_count( - messages_message_h msg, - ffi.Pointer count, - ) { - return _messages_get_address_count( - msg, - count, - ); - } - - late final _messages_get_address_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(messages_message_h, - ffi.Pointer)>>('messages_get_address_count'); - late final _messages_get_address_count = _messages_get_address_countPtr - .asFunction)>(); - - /// @brief Gets a recipient's address with specified index. - /// @since_tizen 2.3 - /// @remarks You must release @a address using free(). - /// @param[in] msg The message handle - /// @param[in] index The zero-based index of an address to receive a message - /// @param[out] address The recipient's address with specified index - /// @param[out] type The recipient's type of the @a address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @see messages_add_address() - /// @see messages_remove_all_addresses() - int messages_get_address( - messages_message_h msg, - int index, - ffi.Pointer> address, - ffi.Pointer type, - ) { - return _messages_get_address( - msg, - index, - address, - type, - ); - } - - late final _messages_get_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - messages_message_h, - ffi.Int, - ffi.Pointer>, - ffi.Pointer)>>('messages_get_address'); - late final _messages_get_address = _messages_get_addressPtr.asFunction< - int Function(messages_message_h, int, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Removes all recipients in the message. - /// @since_tizen 2.3 - /// @param[in] msg The message handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @see messages_add_address() - /// @see messages_get_address() - int messages_remove_all_addresses( - messages_message_h msg, - ) { - return _messages_remove_all_addresses( - msg, - ); - } - - late final _messages_remove_all_addressesPtr = - _lookup>( - 'messages_remove_all_addresses'); - late final _messages_remove_all_addresses = _messages_remove_all_addressesPtr - .asFunction(); - - /// @brief Sets the text of the message. - /// @since_tizen 2.3 - /// @param[in] msg The message handle - /// @param[in] text The text of the message \n - /// The maximum length of @a text is @c 1530 - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @see messages_get_text() - int messages_set_text( - messages_message_h msg, - ffi.Pointer text, - ) { - return _messages_set_text( - msg, - text, - ); - } - - late final _messages_set_textPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - messages_message_h, ffi.Pointer)>>('messages_set_text'); - late final _messages_set_text = _messages_set_textPtr - .asFunction)>(); - - /// @brief Gets the text of the message. - /// @since_tizen 2.3 - /// @remarks You must release @a text using free(). - /// @param[in] msg The message handle - /// @param[out] text The text of the message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @see messages_set_text() - int messages_get_text( - messages_message_h msg, - ffi.Pointer> text, - ) { - return _messages_get_text( - msg, - text, - ); - } - - late final _messages_get_textPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(messages_message_h, - ffi.Pointer>)>>('messages_get_text'); - late final _messages_get_text = _messages_get_textPtr.asFunction< - int Function(messages_message_h, ffi.Pointer>)>(); - - /// @brief Sets the time of the message. - /// @since_tizen 3.0 - /// @param[in] msg The message handle - /// @param[in] time The time of the message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - int messages_set_time( - messages_message_h msg, - int time, - ) { - return _messages_set_time( - msg, - time, - ); - } - - late final _messages_set_timePtr = - _lookup>( - 'messages_set_time'); - late final _messages_set_time = - _messages_set_timePtr.asFunction(); - - /// @brief Gets the time of the message. - /// @since_tizen 2.3 - /// @param[in] msg The message handle - /// @param[out] time The time of the message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - int messages_get_time( - messages_message_h msg, - ffi.Pointer time, - ) { - return _messages_get_time( - msg, - time, - ); - } - - late final _messages_get_timePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - messages_message_h, ffi.Pointer)>>('messages_get_time'); - late final _messages_get_time = _messages_get_timePtr - .asFunction)>(); - - /// @brief Sends the message to all recipients. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/message.write - /// @param[in] service The message service handle - /// @param[in] msg The message handle - /// @param[in] save_to_sentbox Set to @c true to save the message in the sentbox, - /// otherwise set to @c false to not save the message in the sentbox - /// @param[in] callback The callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_SENDING_FAILED Sending message failed - /// @retval #MESSAGES_ERROR_OPERATION_FAILED Messaging operation failed - /// @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @see messages_sent_cb() - int messages_send_message( - messages_service_h service, - messages_message_h msg, - bool save_to_sentbox, - messages_sent_cb callback, - ffi.Pointer user_data, - ) { - return _messages_send_message( - service, - msg, - save_to_sentbox, - callback, - user_data, - ); - } - - late final _messages_send_messagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - messages_service_h, - messages_message_h, - ffi.Bool, - messages_sent_cb, - ffi.Pointer)>>('messages_send_message'); - late final _messages_send_message = _messages_send_messagePtr.asFunction< - int Function(messages_service_h, messages_message_h, bool, - messages_sent_cb, ffi.Pointer)>(); - - /// @brief Gets the message count in the specific message box. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/message.read - /// @param[in] service The message service handle - /// @param[in] mbox The message box type - /// @param[in] type The message type \n - /// If @a type is #MESSAGES_TYPE_UNKNOWN, all SMS and MMS messages are counted - /// @param[out] count The number of messages - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_OPERATION_FAILED Messaging operation failed - /// @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - int messages_get_message_count( - messages_service_h service, - int mbox, - int type, - ffi.Pointer count, - ) { - return _messages_get_message_count( - service, - mbox, - type, - count, - ); - } - - late final _messages_get_message_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(messages_service_h, ffi.Int32, ffi.Int32, - ffi.Pointer)>>('messages_get_message_count'); - late final _messages_get_message_count = - _messages_get_message_countPtr.asFunction< - int Function(messages_service_h, int, int, ffi.Pointer)>(); - - /// @brief Searches for messages. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/message.read - /// @remarks You must release @a message_array using messages_free_message_array(). - /// @param[in] service The message service handle - /// @param[in] mbox The message box type - /// @param[in] type The message type \n - /// If @a type is #MESSAGES_TYPE_UNKNOWN, all SMS and MMS messages are searched - /// @param[in] keyword The keyword search in the text and subject - /// @param[in] address The recipient address - /// @param[in] offset The start position (base @c 0) - /// @param[in] limit The maximum amount of messages to get \n - /// In case of @c 0, this method passes to the callback all searched messages - /// @param[out] message_array The array of the message handle - /// @param[out] length The number of messages of the @a message_array - /// @param[out] total The count of the messages that have been retrieved as a result without applying @a limit and @a offset \n - /// The value can be used to calculate the total number of page views for the searched messages \n - /// For example, if the count of message search is @c 50 and the limit is @c 20, then using this value, you can notice the total page is @c 3 - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGES_ERROR_OPERATION_FAILED Messaging operation failed - /// @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @see messages_free_message_array() - int messages_search_message( - messages_service_h service, - int mbox, - int type, - ffi.Pointer keyword, - ffi.Pointer address, - int offset, - int limit, - ffi.Pointer> message_array, - ffi.Pointer length, - ffi.Pointer total, - ) { - return _messages_search_message( - service, - mbox, - type, - keyword, - address, - offset, - limit, - message_array, - length, - total, - ); - } - - late final _messages_search_messagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - messages_service_h, - ffi.Int32, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>>('messages_search_message'); - late final _messages_search_message = _messages_search_messagePtr.asFunction< - int Function( - messages_service_h, - int, - int, - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Searches a message with the given message ID. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/message.read - /// @remarks You must release @a msg using messages_destroy_message(). - /// @param[in] service The message service handle - /// @param[in] msg_id The message ID - /// @param[out] msg The message handle that is newly created if successful - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @see messages_get_message_id() - int messages_search_message_by_id( - messages_service_h service, - int msg_id, - ffi.Pointer msg, - ) { - return _messages_search_message_by_id( - service, - msg_id, - msg, - ); - } - - late final _messages_search_message_by_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(messages_service_h, ffi.Int, - ffi.Pointer)>>( - 'messages_search_message_by_id'); - late final _messages_search_message_by_id = - _messages_search_message_by_idPtr.asFunction< - int Function( - messages_service_h, int, ffi.Pointer)>(); - - /// @brief Frees the message array. - /// @since_tizen 2.3 - /// @param[in] message_array The array of the message handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @see messages_search_message() - int messages_free_message_array( - ffi.Pointer message_array, - ) { - return _messages_free_message_array( - message_array, - ); - } - - late final _messages_free_message_arrayPtr = _lookup< - ffi - .NativeFunction)>>( - 'messages_free_message_array'); - late final _messages_free_message_array = _messages_free_message_arrayPtr - .asFunction)>(); - - /// @brief Retrieves the searched messages by invoking the given callback function iteratively. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/message.read - /// @param[in] service The message service handle - /// @param[in] mbox The message box type - /// @param[in] type The message type \n - /// If @a type is #MESSAGES_TYPE_UNKNOWN, all SMS and MMS messages are searched - /// @param[in] keyword The keyword search in the text and subject - /// @param[in] address The recipient address - /// @param[in] offset The start position (base 0) - /// @param[in] limit The maximum amount of messages to get \n - /// In case of @c 0, this method passes to the callback all searched messages - /// @param[in] callback The callback function to get a message - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGES_ERROR_OPERATION_FAILED Messaging operation failed - /// @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @post It invokes messages_search_cb(). - /// @see messages_search_cb() - int messages_foreach_message( - messages_service_h service, - int mbox, - int type, - ffi.Pointer keyword, - ffi.Pointer address, - int offset, - int limit, - messages_search_cb callback, - ffi.Pointer user_data, - ) { - return _messages_foreach_message( - service, - mbox, - type, - keyword, - address, - offset, - limit, - callback, - user_data, - ); - } - - late final _messages_foreach_messagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - messages_service_h, - ffi.Int32, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Int, - messages_search_cb, - ffi.Pointer)>>('messages_foreach_message'); - late final _messages_foreach_message = - _messages_foreach_messagePtr.asFunction< - int Function( - messages_service_h, - int, - int, - ffi.Pointer, - ffi.Pointer, - int, - int, - messages_search_cb, - ffi.Pointer)>(); - - /// @brief Registers a callback to be invoked when an incoming message is received. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/message.read - /// @param[in] service The message service handle - /// @param[in] callback The callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_OPERATION_FAILED Messaging operation failed - /// @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @post It will invoke messages_incoming_cb(). - /// @see messages_unset_message_incoming_cb() - /// @see messages_incoming_cb() - int messages_set_message_incoming_cb( - messages_service_h service, - messages_incoming_cb callback, - ffi.Pointer user_data, - ) { - return _messages_set_message_incoming_cb( - service, - callback, - user_data, - ); - } - - late final _messages_set_message_incoming_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(messages_service_h, messages_incoming_cb, - ffi.Pointer)>>('messages_set_message_incoming_cb'); - late final _messages_set_message_incoming_cb = - _messages_set_message_incoming_cbPtr.asFunction< - int Function(messages_service_h, messages_incoming_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/message.write - /// @param[in] service The message service handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @see messages_set_message_incoming_cb() - /// @see messages_incoming_cb() - int messages_unset_message_incoming_cb( - messages_service_h service, - ) { - return _messages_unset_message_incoming_cb( - service, - ); - } - - late final _messages_unset_message_incoming_cbPtr = - _lookup>( - 'messages_unset_message_incoming_cb'); - late final _messages_unset_message_incoming_cb = - _messages_unset_message_incoming_cbPtr - .asFunction(); - - /// @brief Adds an additional listening port for the incoming SMS messages. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/message.read - /// @param[in] service The message service handle - /// @param[in] port The listening port for the SMS messages - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @see messages_set_message_incoming_cb() - /// @see messages_get_message_port() - int messages_add_sms_listening_port( - messages_service_h service, - int port, - ) { - return _messages_add_sms_listening_port( - service, - port, - ); - } - - late final _messages_add_sms_listening_portPtr = _lookup< - ffi.NativeFunction>( - 'messages_add_sms_listening_port'); - late final _messages_add_sms_listening_port = - _messages_add_sms_listening_portPtr - .asFunction(); - - /// @brief Sets the subject of the message. - /// @since_tizen 2.3 - /// @param[in] msg The message handle - /// @param[in] subject The subject of the message \n - /// The maximum length of @a subject is @c 120 - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @pre @a msg is created as a #MESSAGES_TYPE_MMS. - /// @see messages_mms_get_subject() - int messages_mms_set_subject( - messages_message_h msg, - ffi.Pointer subject, - ) { - return _messages_mms_set_subject( - msg, - subject, - ); - } - - late final _messages_mms_set_subjectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(messages_message_h, - ffi.Pointer)>>('messages_mms_set_subject'); - late final _messages_mms_set_subject = _messages_mms_set_subjectPtr - .asFunction)>(); - - /// @brief Gets the subject of the message. - /// @since_tizen 2.3 - /// @remarks You must release @a subject using free(). - /// @param[in] msg The message handle - /// @param[out] subject The subject of the message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @pre @a msg is created as a #MESSAGES_TYPE_MMS. - /// @see messages_mms_set_subject() - int messages_mms_get_subject( - messages_message_h msg, - ffi.Pointer> subject, - ) { - return _messages_mms_get_subject( - msg, - subject, - ); - } - - late final _messages_mms_get_subjectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(messages_message_h, - ffi.Pointer>)>>('messages_mms_get_subject'); - late final _messages_mms_get_subject = - _messages_mms_get_subjectPtr.asFunction< - int Function( - messages_message_h, ffi.Pointer>)>(); - - /// @brief Adds the attachment to the MMS message. - /// @since_tizen 2.3 - /// @param[in] msg The message handle - /// @param[in] type The attachment type - /// @param[in] path The file path to attach \n - /// The maximum length of @a path is @c 1024 - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @pre @a msg is created as a #MESSAGES_TYPE_MMS. - /// @see messages_mms_get_attachment() - /// @see messages_mms_get_attachment_count() - /// @see messages_mms_remove_all_attachments() - int messages_mms_add_attachment( - messages_message_h msg, - int type, - ffi.Pointer path, - ) { - return _messages_mms_add_attachment( - msg, - type, - path, - ); - } - - late final _messages_mms_add_attachmentPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(messages_message_h, ffi.Int32, - ffi.Pointer)>>('messages_mms_add_attachment'); - late final _messages_mms_add_attachment = - _messages_mms_add_attachmentPtr.asFunction< - int Function(messages_message_h, int, ffi.Pointer)>(); - - /// @brief Gets the file path of the attachment with the specified index. - /// @since_tizen 2.3 - /// @remarks You must release @a path using free(). - /// @param[in] msg The message handle - /// @param[in] index The zero-based index of the attachment - /// @param[out] type The attachment type - /// @param[out] path The file path to attach - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @pre @a msg is created as a #MESSAGES_TYPE_MMS. - /// @see messages_mms_add_attachment() - /// @see messages_mms_get_attachment_count() - /// @see messages_mms_remove_all_attachments() - int messages_mms_get_attachment( - messages_message_h msg, - int index, - ffi.Pointer type, - ffi.Pointer> path, - ) { - return _messages_mms_get_attachment( - msg, - index, - type, - path, - ); - } - - late final _messages_mms_get_attachmentPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(messages_message_h, ffi.Int, - ffi.Pointer, ffi.Pointer>)>>( - 'messages_mms_get_attachment'); - late final _messages_mms_get_attachment = - _messages_mms_get_attachmentPtr.asFunction< - int Function(messages_message_h, int, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets the attachment with the specified index. - /// @since_tizen 2.3 - /// @param[in] msg The message handle - /// @param[out] count The total number of attachments - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @pre @a msg is created as a #MESSAGES_TYPE_MMS. - /// @see messages_mms_add_attachment() - /// @see messages_mms_get_attachment() - /// @see messages_mms_remove_all_attachments() - int messages_mms_get_attachment_count( - messages_message_h msg, - ffi.Pointer count, - ) { - return _messages_mms_get_attachment_count( - msg, - count, - ); - } - - late final _messages_mms_get_attachment_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(messages_message_h, - ffi.Pointer)>>('messages_mms_get_attachment_count'); - late final _messages_mms_get_attachment_count = - _messages_mms_get_attachment_countPtr - .asFunction)>(); - - /// @brief Removes all attachments to the MMS message. - /// @since_tizen 2.3 - /// @param[in] msg The message handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - /// @pre @a msg is created as a #MESSAGES_TYPE_MMS. - /// @see messages_mms_add_attachment() - /// @see messages_mms_get_attachment() - /// @see messages_mms_get_attachment_count() - int messages_mms_remove_all_attachments( - messages_message_h msg, - ) { - return _messages_mms_remove_all_attachments( - msg, - ); - } - - late final _messages_mms_remove_all_attachmentsPtr = - _lookup>( - 'messages_mms_remove_all_attachments'); - late final _messages_mms_remove_all_attachments = - _messages_mms_remove_all_attachmentsPtr - .asFunction(); - - /// @brief Registers a callback to be invoked when an WAP Push message is received. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/message.read - /// @param[in] service The message service handle - /// @param[in] app_id The "X-WAP-Application-ID" to indicate a destination WAP Push application ID - /// @param[in] callback The callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - int messages_push_add_incoming_cb( - messages_service_h service, - ffi.Pointer app_id, - messages_push_incoming_cb callback, - ffi.Pointer user_data, - ) { - return _messages_push_add_incoming_cb( - service, - app_id, - callback, - user_data, - ); - } - - late final _messages_push_add_incoming_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - messages_service_h, - ffi.Pointer, - messages_push_incoming_cb, - ffi.Pointer)>>('messages_push_add_incoming_cb'); - late final _messages_push_add_incoming_cb = - _messages_push_add_incoming_cbPtr.asFunction< - int Function(messages_service_h, ffi.Pointer, - messages_push_incoming_cb, ffi.Pointer)>(); - - /// @brief Unregisters the WAP push incoming callback function. - /// @since_tizen 2.3 - /// @param[in] service The message service handle - /// @param[in] app_id The "X-WAP-Application-ID" to indicate a destination WAP Push application ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - int messages_push_remove_incoming_cb( - messages_service_h service, - ffi.Pointer app_id, - ) { - return _messages_push_remove_incoming_cb( - service, - app_id, - ); - } - - late final _messages_push_remove_incoming_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(messages_service_h, - ffi.Pointer)>>('messages_push_remove_incoming_cb'); - late final _messages_push_remove_incoming_cb = - _messages_push_remove_incoming_cbPtr.asFunction< - int Function(messages_service_h, ffi.Pointer)>(); - - /// @brief Registers an application to the mapping table of the WAP Push service. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/message.write - /// @param[in] service The message service handle - /// @param[in] content_type The MIME content type of the content - /// @param[in] app_id The "X-WAP-Application-ID" to indicate a destination WAP Push application ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - int messages_push_register( - messages_service_h service, - ffi.Pointer content_type, - ffi.Pointer app_id, - ) { - return _messages_push_register( - service, - content_type, - app_id, - ); - } - - late final _messages_push_registerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(messages_service_h, ffi.Pointer, - ffi.Pointer)>>('messages_push_register'); - late final _messages_push_register = _messages_push_registerPtr.asFunction< - int Function( - messages_service_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief De-registers an application from the mapping table of the WAP Push service. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/message.write - /// @param[in] service The message service handle - /// @param[in] content_type The MIME content type of the content - /// @param[in] app_id The "X-WAP-Application-ID" to indicate a destination WAP Push application ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - int messages_push_deregister( - messages_service_h service, - ffi.Pointer content_type, - ffi.Pointer app_id, - ) { - return _messages_push_deregister( - service, - content_type, - app_id, - ); - } - - late final _messages_push_deregisterPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(messages_service_h, ffi.Pointer, - ffi.Pointer)>>('messages_push_deregister'); - late final _messages_push_deregister = - _messages_push_deregisterPtr.asFunction< - int Function(messages_service_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Re-registers an application to the mapping table of the WAP Push service. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/message.write - /// @param[in] service The message service handle - /// @param[in] content_type An element of the composite key for searching registered entry \n - /// The MIME content type of the content - /// @param[in] app_id The composite key for searching mapping information \n - /// The "X-WAP-Application-ID" to indicate a destination WAP Push application ID - /// @param[in] dst_content_type The MIME content type of the content - /// @param[in] dst_app_id The "X-WAP-Application-ID" to indicate a destination WAP Push application ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGES_ERROR_NONE Successful - /// @retval #MESSAGES_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MESSAGES_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #MESSAGES_ERROR_NOT_SUPPORTED Not supported - int messages_push_reregister( - messages_service_h service, - ffi.Pointer content_type, - ffi.Pointer app_id, - ffi.Pointer dst_content_type, - ffi.Pointer dst_app_id, - ) { - return _messages_push_reregister( - service, - content_type, - app_id, - dst_content_type, - dst_app_id, - ); - } - - late final _messages_push_reregisterPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - messages_service_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('messages_push_reregister'); - late final _messages_push_reregister = - _messages_push_reregisterPtr.asFunction< - int Function( - messages_service_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the maximum volume level supported for a particular sound type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] type The sound type - /// @param[out] max The maximum volume level - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see sound_manager_set_volume() - /// @see sound_manager_get_volume() - int sound_manager_get_max_volume( - int type, - ffi.Pointer max, - ) { - return _sound_manager_get_max_volume( - type, - max, - ); - } - - late final _sound_manager_get_max_volumePtr = _lookup< - ffi - .NativeFunction)>>( - 'sound_manager_get_max_volume'); - late final _sound_manager_get_max_volume = _sound_manager_get_max_volumePtr - .asFunction)>(); - - /// @brief Sets the volume level specified for a particular sound type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/volume.set - /// @param[in] type The sound type - /// @param[in] volume The volume level to be set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_get_max_volume() - /// @see sound_manager_get_volume() - int sound_manager_set_volume( - int type, - int volume, - ) { - return _sound_manager_set_volume( - type, - volume, - ); - } - - late final _sound_manager_set_volumePtr = - _lookup>( - 'sound_manager_set_volume'); - late final _sound_manager_set_volume = - _sound_manager_set_volumePtr.asFunction(); - - /// @brief Gets the volume level specified for a particular sound type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] type The sound type - /// @param[out] volume The current volume level - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_get_max_volume() - /// @see sound_manager_set_volume() - int sound_manager_get_volume( - int type, - ffi.Pointer volume, - ) { - return _sound_manager_get_volume( - type, - volume, - ); - } - - late final _sound_manager_get_volumePtr = _lookup< - ffi - .NativeFunction)>>( - 'sound_manager_get_volume'); - late final _sound_manager_get_volume = _sound_manager_get_volumePtr - .asFunction)>(); - - /// @deprecated Deprecated since 3.0. - /// @brief Sets the type of the sound being currently played. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] type The sound type to set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_get_current_sound_type() - /// @see sound_manager_unset_current_sound_type() - int sound_manager_set_current_sound_type( - int type, - ) { - return _sound_manager_set_current_sound_type( - type, - ); - } - - late final _sound_manager_set_current_sound_typePtr = - _lookup>( - 'sound_manager_set_current_sound_type'); - late final _sound_manager_set_current_sound_type = - _sound_manager_set_current_sound_typePtr.asFunction(); - - /// @brief Gets the type of the sound being currently played. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[out] type The current sound type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_NO_PLAYING_SOUND No playing sound - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - int sound_manager_get_current_sound_type( - ffi.Pointer type, - ) { - return _sound_manager_get_current_sound_type( - type, - ); - } - - late final _sound_manager_get_current_sound_typePtr = - _lookup)>>( - 'sound_manager_get_current_sound_type'); - late final _sound_manager_get_current_sound_type = - _sound_manager_get_current_sound_typePtr - .asFunction)>(); - - /// @deprecated Deprecated since 3.0. - /// @brief Unsets the type of the sound being currently played. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_set_current_sound_type() - /// @see sound_manager_get_current_sound_type() - int sound_manager_unset_current_sound_type() { - return _sound_manager_unset_current_sound_type(); - } - - late final _sound_manager_unset_current_sound_typePtr = - _lookup>( - 'sound_manager_unset_current_sound_type'); - late final _sound_manager_unset_current_sound_type = - _sound_manager_unset_current_sound_typePtr.asFunction(); - - /// @deprecated Deprecated since 3.0. Use sound_manager_add_volume_changed_cb() instead. - /// @brief Registers a callback function to be invoked when the volume level is changed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] callback Callback function to indicate change in volume - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @post sound_manager_volume_changed_cb() will be invoked. - /// @see sound_manager_unset_volume_changed_cb() - /// @see sound_manager_volume_changed_cb() - int sound_manager_set_volume_changed_cb( - sound_manager_volume_changed_cb callback, - ffi.Pointer user_data, - ) { - return _sound_manager_set_volume_changed_cb( - callback, - user_data, - ); - } - - late final _sound_manager_set_volume_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_manager_volume_changed_cb, - ffi.Pointer)>>('sound_manager_set_volume_changed_cb'); - late final _sound_manager_set_volume_changed_cb = - _sound_manager_set_volume_changed_cbPtr.asFunction< - int Function( - sound_manager_volume_changed_cb, ffi.Pointer)>(); - - /// @deprecated Deprecated since 3.0. Use sound_manager_remove_volume_changed_cb() instead. - /// @brief Unregisters the volume change callback. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @return 0 on success, otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_set_volume_changed_cb() - int sound_manager_unset_volume_changed_cb() { - return _sound_manager_unset_volume_changed_cb(); - } - - late final _sound_manager_unset_volume_changed_cbPtr = - _lookup>( - 'sound_manager_unset_volume_changed_cb'); - late final _sound_manager_unset_volume_changed_cb = - _sound_manager_unset_volume_changed_cbPtr.asFunction(); - - /// @brief Adds a callback function to be invoked when the volume level is changed. - /// @since_tizen 3.0 - /// @param[in] callback Callback function to indicate change in volume - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] id The callback id - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @post sound_manager_volume_changed_cb() will be invoked. - /// @see sound_manager_remove_volume_changed_cb() - /// @see sound_manager_volume_changed_cb() - int sound_manager_add_volume_changed_cb( - sound_manager_volume_changed_cb callback, - ffi.Pointer user_data, - ffi.Pointer id, - ) { - return _sound_manager_add_volume_changed_cb( - callback, - user_data, - id, - ); - } - - late final _sound_manager_add_volume_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - sound_manager_volume_changed_cb, - ffi.Pointer, - ffi.Pointer)>>('sound_manager_add_volume_changed_cb'); - late final _sound_manager_add_volume_changed_cb = - _sound_manager_add_volume_changed_cbPtr.asFunction< - int Function(sound_manager_volume_changed_cb, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Removes the volume change callback. - /// @since_tizen 3.0 - /// @param[in] id The id of the callback to remove - /// @return 0 on success, otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_add_volume_changed_cb() - int sound_manager_remove_volume_changed_cb( - int id, - ) { - return _sound_manager_remove_volume_changed_cb( - id, - ); - } - - late final _sound_manager_remove_volume_changed_cbPtr = - _lookup>( - 'sound_manager_remove_volume_changed_cb'); - late final _sound_manager_remove_volume_changed_cb = - _sound_manager_remove_volume_changed_cbPtr - .asFunction(); - - /// @brief Creates a handle for stream information. - /// @since_tizen 3.0 - /// - /// @remarks The registered callback is issued in the internal thread of the sound manager.\n - /// Do not call this function within sound_stream_focus_state_changed_cb() or sound_stream_focus_state_watch_cb(),\n - /// otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned.\n - /// To apply the stream policy according to this stream information, this handle should be passed to other APIs\n - /// related to playback or recording.(e.g. player, wav-player, audio-io, etc.) - /// - /// @param[in] stream_type The type of stream - /// @param[in] callback The focus state change callback function (optional, this can be NULL) - /// @param[in] user_data The user data to be passed to the callback function (optional, this can be NULL) - /// @param[out] stream_info The handle of stream information - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_destroy_stream_information() - /// @see sound_manager_add_device_for_stream_routing() - /// @see sound_manager_remove_device_for_stream_routing() - /// @see sound_manager_remove_all_devices_for_stream_routing() - /// @see sound_manager_apply_stream_routing() - /// @see sound_manager_acquire_focus() - /// @see sound_manager_destroy_focus() - /// @see sound_manager_get_focus_state() - int sound_manager_create_stream_information( - int stream_type, - sound_stream_focus_state_changed_cb callback, - ffi.Pointer user_data, - ffi.Pointer stream_info, - ) { - return _sound_manager_create_stream_information( - stream_type, - callback, - user_data, - stream_info, - ); - } - - late final _sound_manager_create_stream_informationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, sound_stream_focus_state_changed_cb, - ffi.Pointer, ffi.Pointer)>>( - 'sound_manager_create_stream_information'); - late final _sound_manager_create_stream_information = - _sound_manager_create_stream_informationPtr.asFunction< - int Function(int, sound_stream_focus_state_changed_cb, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys the handle for stream information. - /// @since_tizen 3.0 - /// - /// @remarks Do not call this function within sound_stream_focus_state_changed_cb() or sound_stream_focus_state_watch_cb(),\n - /// otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned. - /// - /// @param[in] stream_info The handle of stream information - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_create_stream_information() - /// @see sound_manager_add_device_for_stream_routing() - /// @see sound_manager_remove_device_for_stream_routing() - /// @see sound_manager_remove_all_devices_for_stream_routing() - /// @see sound_manager_apply_stream_routing() - /// @see sound_manager_acquire_focus() - /// @see sound_manager_destroy_focus() - /// @see sound_manager_get_focus_state() - int sound_manager_destroy_stream_information( - sound_stream_info_h stream_info, - ) { - return _sound_manager_destroy_stream_information( - stream_info, - ); - } - - late final _sound_manager_destroy_stream_informationPtr = - _lookup>( - 'sound_manager_destroy_stream_information'); - late final _sound_manager_destroy_stream_information = - _sound_manager_destroy_stream_informationPtr - .asFunction(); - - /// @brief Gets the sound type of the stream information. - /// @since_tizen 3.0 - /// - /// @remarks In case of a @a stream_info made with #SOUND_STREAM_TYPE_EMERGENCY, it'll return #SOUND_MANAGER_ERROR_NO_DATA.\n - /// The reason is that there is no #sound_type_e matched with this @a stream_info. - /// - /// @param[in] stream_info The handle of stream information - /// @param[out] sound_type The sound type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_NO_DATA No data - /// @pre Call sound_manager_create_stream_information() before calling this function. - /// @see sound_manager_create_stream_information() - /// @see sound_manager_set_volume() - /// @see sound_manager_get_max_volume() - /// @see sound_manager_get_volume() - int sound_manager_get_sound_type( - sound_stream_info_h stream_info, - ffi.Pointer sound_type, - ) { - return _sound_manager_get_sound_type( - stream_info, - sound_type, - ); - } - - late final _sound_manager_get_sound_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_stream_info_h, - ffi.Pointer)>>('sound_manager_get_sound_type'); - late final _sound_manager_get_sound_type = _sound_manager_get_sound_typePtr - .asFunction)>(); - - /// @brief Adds the device to the stream information for the stream routing. - /// @since_tizen 3.0 - /// - /// @remarks Use sound_manager_get_device_list() and sound_manager_get_next_device() to get the device.\n - /// #SOUND_MANAGER_ERROR_POLICY could be returned according to the stream type of the @a stream_info.\n - /// The available types of the @a stream_info for this function are #SOUND_STREAM_TYPE_VOIP and #SOUND_STREAM_TYPE_MEDIA_EXTERNAL_ONLY. - /// - /// @param[in] stream_info The handle of stream information - /// @param[in] device The device item from sound_device_list_h - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_POLICY Noncompliance with the sound system policy - /// @pre Call sound_manager_create_stream_information() before calling this function. - /// @post You can apply this setting by calling sound_manager_apply_stream_routing(). - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - /// @see sound_manager_remove_device_for_stream_routing() - /// @see sound_manager_remove_all_devices_for_stream_routing() - /// @see sound_manager_apply_stream_routing() - int sound_manager_add_device_for_stream_routing( - sound_stream_info_h stream_info, - sound_device_h device, - ) { - return _sound_manager_add_device_for_stream_routing( - stream_info, - device, - ); - } - - late final _sound_manager_add_device_for_stream_routingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_stream_info_h, - sound_device_h)>>('sound_manager_add_device_for_stream_routing'); - late final _sound_manager_add_device_for_stream_routing = - _sound_manager_add_device_for_stream_routingPtr - .asFunction(); - - /// @brief Removes the device from the stream information for the stream routing. - /// @since_tizen 3.0 - /// - /// @remarks Use sound_manager_get_device_list() and sound_manager_get_next_device() to get the device.\n - /// - /// @param[in] stream_info The handle of stream information - /// @param[in] device The device item from sound_device_list_h - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Call sound_manager_create_stream_information() and sound_manager_add_device_for_stream_routing() before calling this function. - /// @post You can apply this setting by calling sound_manager_apply_stream_routing(). - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - /// @see sound_manager_add_device_for_stream_routing() - /// @see sound_manager_remove_all_devices_for_stream_routing() - /// @see sound_manager_apply_stream_routing() - int sound_manager_remove_device_for_stream_routing( - sound_stream_info_h stream_info, - sound_device_h device, - ) { - return _sound_manager_remove_device_for_stream_routing( - stream_info, - device, - ); - } - - late final _sound_manager_remove_device_for_stream_routingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_stream_info_h, sound_device_h)>>( - 'sound_manager_remove_device_for_stream_routing'); - late final _sound_manager_remove_device_for_stream_routing = - _sound_manager_remove_device_for_stream_routingPtr - .asFunction(); - - /// @brief Removes all devices from the stream information for the stream routing. - /// @since_tizen 4.0 - /// - /// @param[in] stream_info The handle of stream information - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_POLICY Noncompliance with the sound system policy - /// @pre Call sound_manager_create_stream_information() before calling this function. - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - /// @see sound_manager_add_device_for_stream_routing() - /// @see sound_manager_remove_device_for_stream_routing() - /// @see sound_manager_apply_stream_routing() - int sound_manager_remove_all_devices_for_stream_routing( - sound_stream_info_h stream_info, - ) { - return _sound_manager_remove_all_devices_for_stream_routing( - stream_info, - ); - } - - late final _sound_manager_remove_all_devices_for_stream_routingPtr = - _lookup>( - 'sound_manager_remove_all_devices_for_stream_routing'); - late final _sound_manager_remove_all_devices_for_stream_routing = - _sound_manager_remove_all_devices_for_stream_routingPtr - .asFunction(); - - /// @brief Applies the stream routing. - /// @since_tizen 3.0 - /// - /// @remarks If the stream has not been made yet, this setting will be applied when the stream starts to play.\n - /// - /// @param[in] stream_info The handle of stream information - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_STATE Invalid state - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @pre Call sound_manager_create_stream_information() and sound_manager_add_device_for_stream_routing() before calling this function. - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - /// @see sound_manager_add_device_for_stream_routing() - /// @see sound_manager_remove_device_for_stream_routing() - /// @see sound_manager_remove_all_devices_for_stream_routing() - int sound_manager_apply_stream_routing( - sound_stream_info_h stream_info, - ) { - return _sound_manager_apply_stream_routing( - stream_info, - ); - } - - late final _sound_manager_apply_stream_routingPtr = - _lookup>( - 'sound_manager_apply_stream_routing'); - late final _sound_manager_apply_stream_routing = - _sound_manager_apply_stream_routingPtr - .asFunction(); - - /// @brief Acquires the stream focus. - /// @since_tizen 3.0 - /// - /// @remarks Do not call this function within sound_stream_focus_state_changed_cb() or sound_stream_focus_state_watch_cb(),\n - /// otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned. Since 4.0, it is allowed and does not return the error. - /// - /// @param[in] stream_info The handle of stream information - /// @param[in] focus_mask The focus mask that user wants to acquire - /// @param[in] sound_behavior The requesting sound behavior, values of #sound_behavior_e combined with bitwise 'or' - /// @param[in] extra_info The extra information for this request (optional, this can be NULL) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_INVALID_STATE Invalid state - /// @retval #SOUND_MANAGER_ERROR_POLICY Noncompliance with the sound system policy - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @pre Call sound_manager_create_stream_information() with its parameter for sound_stream_focus_state_changed_cb\n - /// before calling this function. - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - /// @see sound_manager_acquire_focus_all() - /// @see sound_manager_release_focus() - /// @see sound_manager_release_focus_all() - /// @see sound_manager_get_focus_state() - int sound_manager_acquire_focus( - sound_stream_info_h stream_info, - int focus_mask, - int sound_behavior, - ffi.Pointer extra_info, - ) { - return _sound_manager_acquire_focus( - stream_info, - focus_mask, - sound_behavior, - extra_info, - ); - } - - late final _sound_manager_acquire_focusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_stream_info_h, ffi.Int32, ffi.Int, - ffi.Pointer)>>('sound_manager_acquire_focus'); - late final _sound_manager_acquire_focus = - _sound_manager_acquire_focusPtr.asFunction< - int Function(sound_stream_info_h, int, int, ffi.Pointer)>(); - - /// @brief Releases the acquired stream focus. - /// @since_tizen 3.0 - /// - /// @remarks Do not call this function within sound_stream_focus_state_changed_cb() or sound_stream_focus_state_watch_cb(),\n - /// otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned. Since 4.0, it is allowed and does not return the error. - /// - /// @param[in] stream_info The handle of stream information - /// @param[in] focus_mask The focus mask that user wants to release - /// @param[in] sound_behavior The requesting sound behavior, values of #sound_behavior_e combined with bitwise 'or' - /// @param[in] extra_info The extra information for this request (optional, this can be NULL) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_INVALID_STATE Invalid state - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @pre Call sound_manager_create_stream_information() and sound_manager_acquire_focus() before calling this function. - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - /// @see sound_manager_acquire_focus() - /// @see sound_manager_acquire_focus_all() - /// @see sound_manager_release_focus_all() - /// @see sound_manager_get_focus_state() - int sound_manager_release_focus( - sound_stream_info_h stream_info, - int focus_mask, - int sound_behavior, - ffi.Pointer extra_info, - ) { - return _sound_manager_release_focus( - stream_info, - focus_mask, - sound_behavior, - extra_info, - ); - } - - late final _sound_manager_release_focusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_stream_info_h, ffi.Int32, ffi.Int, - ffi.Pointer)>>('sound_manager_release_focus'); - late final _sound_manager_release_focus = - _sound_manager_release_focusPtr.asFunction< - int Function(sound_stream_info_h, int, int, ffi.Pointer)>(); - - /// @brief Acquires all the stream focuses. - /// @since_tizen 4.0 - /// - /// @remarks This function does not return error even though one or all of focuses have already been acquired.\n - /// Use sound_manager_get_focus_state() to get acquired focus state if it returns #SOUND_MANAGER_ERROR_POLICY. - /// - /// @param[in] stream_info The handle of stream information - /// @param[in] sound_behavior The requesting sound behavior, values of #sound_behavior_e combined with bitwise 'or' - /// @param[in] extra_info The extra information for this request (optional, this can be NULL) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_POLICY Noncompliance with the sound system policy - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @pre Call sound_manager_create_stream_information() with its parameter for sound_stream_focus_state_changed_cb\n - /// before calling this function. - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - /// @see sound_manager_acquire_focus() - /// @see sound_manager_release_focus() - /// @see sound_manager_release_focus_all() - /// @see sound_manager_get_focus_state() - int sound_manager_acquire_focus_all( - sound_stream_info_h stream_info, - int sound_behavior, - ffi.Pointer extra_info, - ) { - return _sound_manager_acquire_focus_all( - stream_info, - sound_behavior, - extra_info, - ); - } - - late final _sound_manager_acquire_focus_allPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_stream_info_h, ffi.Int, - ffi.Pointer)>>('sound_manager_acquire_focus_all'); - late final _sound_manager_acquire_focus_all = - _sound_manager_acquire_focus_allPtr.asFunction< - int Function(sound_stream_info_h, int, ffi.Pointer)>(); - - /// @brief Releases all the acquired stream focuses. - /// @since_tizen 4.0 - /// - /// @remarks This function does not return error even though one or all of focuses have already been released. - /// - /// @param[in] stream_info The handle of stream information - /// @param[in] sound_behavior The requesting sound behavior, values of #sound_behavior_e combined with bitwise 'or' - /// @param[in] extra_info The extra information for this request (optional, this can be NULL) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_POLICY Noncompliance with the sound system policy - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @pre Call sound_manager_create_stream_information(), sound_manager_acquire_focus() and sound_manager_acquire_focus_all()\n - /// before calling this function. - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - /// @see sound_manager_acquire_focus() - /// @see sound_manager_acquire_focus_all() - /// @see sound_manager_release_focus() - /// @see sound_manager_get_focus_state() - int sound_manager_release_focus_all( - sound_stream_info_h stream_info, - int sound_behavior, - ffi.Pointer extra_info, - ) { - return _sound_manager_release_focus_all( - stream_info, - sound_behavior, - extra_info, - ); - } - - late final _sound_manager_release_focus_allPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_stream_info_h, ffi.Int, - ffi.Pointer)>>('sound_manager_release_focus_all'); - late final _sound_manager_release_focus_all = - _sound_manager_release_focus_allPtr.asFunction< - int Function(sound_stream_info_h, int, ffi.Pointer)>(); - - /// @brief Gets the state of focus. - /// @since_tizen 3.0 - /// @param[in] stream_info The handle of stream information - /// @param[out] state_for_playback The state of playback focus - /// @param[out] state_for_recording The state of recording focus - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Call sound_manager_create_stream_information() before calling this function. - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - /// @see sound_manager_acquire_focus() - /// @see sound_manager_release_focus() - int sound_manager_get_focus_state( - sound_stream_info_h stream_info, - ffi.Pointer state_for_playback, - ffi.Pointer state_for_recording, - ) { - return _sound_manager_get_focus_state( - stream_info, - state_for_playback, - state_for_recording, - ); - } - - late final _sound_manager_get_focus_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_stream_info_h, ffi.Pointer, - ffi.Pointer)>>('sound_manager_get_focus_state'); - late final _sound_manager_get_focus_state = - _sound_manager_get_focus_statePtr.asFunction< - int Function(sound_stream_info_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Sets auto focus reacquisition property. - /// @since_tizen 3.0 - /// - /// @remarks The focus reacquisition is set as default. - /// If you don't want to reacquire the focus you've lost automatically, disable the focus reacquisition setting by using this function and vice versa. - /// - /// @param[in] stream_info The handle of stream information - /// @param[in] enable The auto focus reacquisition property to set : (@c true = enable, @c false = disable) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Call sound_manager_create_stream_information() before calling this function. - /// @see sound_manager_create_stream_information() - int sound_manager_set_focus_reacquisition( - sound_stream_info_h stream_info, - bool enable, - ) { - return _sound_manager_set_focus_reacquisition( - stream_info, - enable, - ); - } - - late final _sound_manager_set_focus_reacquisitionPtr = _lookup< - ffi.NativeFunction>( - 'sound_manager_set_focus_reacquisition'); - late final _sound_manager_set_focus_reacquisition = - _sound_manager_set_focus_reacquisitionPtr - .asFunction(); - - /// @brief Gets auto focus reacquisition property. - /// @since_tizen 3.0 - /// - /// @remarks The default value is true. - /// - /// @param[in] stream_info The handle of stream information - /// @param[out] enabled The value of focus auto reacquisition property : (@c true = enabled, @c false = disabled) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Call sound_manager_create_stream_information() before calling this function. - /// @see sound_manager_create_stream_information() - int sound_manager_get_focus_reacquisition( - sound_stream_info_h stream_info, - ffi.Pointer enabled, - ) { - return _sound_manager_get_focus_reacquisition( - stream_info, - enabled, - ); - } - - late final _sound_manager_get_focus_reacquisitionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_stream_info_h, - ffi.Pointer)>>('sound_manager_get_focus_reacquisition'); - late final _sound_manager_get_focus_reacquisition = - _sound_manager_get_focus_reacquisitionPtr.asFunction< - int Function(sound_stream_info_h, ffi.Pointer)>(); - - /// @brief Delivers focuses to another stream information. - /// @since_tizen 4.0 - /// - /// @remarks This function does not affect any invocation of sound_stream_focus_state_changed_cb() or\n - /// sound_stream_focus_state_watch_cb(). Do not call this function within sound_stream_focus_state_changed_cb() or\n - /// sound_stream_focus_state_watch_cb(), otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned. - /// - /// @param[in] source The source handle of stream information which has focuses - /// @param[in] destination The destination handle of stream information which will receive focuses - /// @param[in] focus_mask The focus mask to deliver - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_INVALID_STATE Invalid state - /// @retval #SOUND_MANAGER_ERROR_POLICY Noncompliance with the sound system policy - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @pre Call sound_manager_create_stream_information(), sound_manager_acquire_focus() and sound_manager_acquire_focus_all()\n - /// before calling this function. - /// @see sound_manager_create_stream_information() - /// @see sound_manager_acquire_focus() - /// @see sound_manager_acquire_focus_all() - int sound_manager_deliver_focus( - sound_stream_info_h source, - sound_stream_info_h destination, - int focus_mask, - ) { - return _sound_manager_deliver_focus( - source, - destination, - focus_mask, - ); - } - - late final _sound_manager_deliver_focusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_stream_info_h, sound_stream_info_h, - ffi.Int32)>>('sound_manager_deliver_focus'); - late final _sound_manager_deliver_focus = - _sound_manager_deliver_focusPtr.asFunction< - int Function(sound_stream_info_h, sound_stream_info_h, int)>(); - - /// @brief Checks if the stream information is using the device. - /// @since_tizen 3.0 - /// - /// @param[in] stream_info The handle of stream information - /// @param[in] device The device item - /// @param[out] is_on Whether the stream info is using the device or not : (@c true = use, @c false = not use) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_get_device_list() - /// @see sound_manager_get_next_device() - /// @see sound_manager_get_prev_device() - /// @see sound_manager_get_device_type() - /// @see sound_manager_get_device_io_direction() - /// @see sound_manager_get_device_id() - /// @see sound_manager_get_device_name() - /// @see sound_manager_free_device_list() - int sound_manager_is_stream_on_device( - sound_stream_info_h stream_info, - sound_device_h device, - ffi.Pointer is_on, - ) { - return _sound_manager_is_stream_on_device( - stream_info, - device, - is_on, - ); - } - - late final _sound_manager_is_stream_on_devicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_stream_info_h, sound_device_h, - ffi.Pointer)>>('sound_manager_is_stream_on_device'); - late final _sound_manager_is_stream_on_device = - _sound_manager_is_stream_on_devicePtr.asFunction< - int Function( - sound_stream_info_h, sound_device_h, ffi.Pointer)>(); - - /// @brief Gets the current device type for media playback stream. - /// @since_tizen 3.0 - /// - /// @param[out] device_type The output device type that a media playback stream can go out - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_NO_DATA No data - /// @see sound_manager_get_device_type() - /// @see sound_manager_get_device_io_direction() - /// @see sound_manager_get_device_id() - /// @see sound_manager_get_device_name() - int sound_manager_get_current_media_playback_device_type( - ffi.Pointer device_type, - ) { - return _sound_manager_get_current_media_playback_device_type( - device_type, - ); - } - - late final _sound_manager_get_current_media_playback_device_typePtr = - _lookup)>>( - 'sound_manager_get_current_media_playback_device_type'); - late final _sound_manager_get_current_media_playback_device_type = - _sound_manager_get_current_media_playback_device_typePtr - .asFunction)>(); - - /// @brief Gets the reason for the current acquired playback focus. - /// @since_tizen 3.0 - /// - /// @remarks If there is no acquired playback focus in this system, it'll return #SOUND_MANAGER_ERROR_NO_DATA.\n - /// Do not call this function within sound_stream_focus_state_changed_cb() or sound_stream_focus_state_watch_cb(),\n - /// otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned.\n - /// The @a extra_info should be released using free(). - /// - /// @param[out] acquired_by The reason for the current acquired playback focus - /// @param[out] sound_behavior The requested sound behavior that should be followed, values of #sound_behavior_e combined with bitwise 'or' - /// @param[out] extra_info The extra information of the acquired playback focus (optional, this can be NULL) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_NO_DATA No data - /// @see sound_manager_get_current_recording_focus() - int sound_manager_get_current_playback_focus( - ffi.Pointer acquired_by, - ffi.Pointer sound_behavior, - ffi.Pointer> extra_info, - ) { - return _sound_manager_get_current_playback_focus( - acquired_by, - sound_behavior, - extra_info, - ); - } - - late final _sound_manager_get_current_playback_focusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>( - 'sound_manager_get_current_playback_focus'); - late final _sound_manager_get_current_playback_focus = - _sound_manager_get_current_playback_focusPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets the reason for the current acquired recording focus. - /// @since_tizen 3.0 - /// - /// @remarks If there is no acquired recording focus in this system, it'll return #SOUND_MANAGER_ERROR_NO_DATA.\n - /// Do not call this function within sound_stream_focus_state_changed_cb() or sound_stream_focus_state_watch_cb(),\n - /// otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned.\n - /// The @a extra_info should be released using free(). - /// - /// @param[out] acquired_by The reason for the current acquired recording focus - /// @param[out] sound_behavior The requested sound behavior that should be followed, values of #sound_behavior_e combined with bitwise 'or' - /// @param[out] extra_info The extra information of the acquired recording focus (optional, this can be NULL) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_NO_DATA No data - /// @see sound_manager_get_current_playback_focus() - int sound_manager_get_current_recording_focus( - ffi.Pointer acquired_by, - ffi.Pointer sound_behavior, - ffi.Pointer> extra_info, - ) { - return _sound_manager_get_current_recording_focus( - acquired_by, - sound_behavior, - extra_info, - ); - } - - late final _sound_manager_get_current_recording_focusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>( - 'sound_manager_get_current_recording_focus'); - late final _sound_manager_get_current_recording_focus = - _sound_manager_get_current_recording_focusPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Registers the watch callback function to be invoked when the focus state for each sound stream type is changed regardless of the process. - /// @since_tizen 3.0 - /// - /// @remarks The registered callback is invoked by the internal thread of the sound manager.\n - /// Do not call this function within sound_stream_focus_state_changed_cb() or sound_stream_focus_state_watch_cb(),\n - /// otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned. - /// - /// @param[in] focus_mask The focus mask that user wants to watch - /// @param[in] callback The focus state change watch callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] id The focus state change watch callback id - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_remove_focus_state_watch_cb() - int sound_manager_add_focus_state_watch_cb( - int focus_mask, - sound_stream_focus_state_watch_cb callback, - ffi.Pointer user_data, - ffi.Pointer id, - ) { - return _sound_manager_add_focus_state_watch_cb( - focus_mask, - callback, - user_data, - id, - ); - } - - late final _sound_manager_add_focus_state_watch_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - sound_stream_focus_state_watch_cb, - ffi.Pointer, - ffi.Pointer)>>('sound_manager_add_focus_state_watch_cb'); - late final _sound_manager_add_focus_state_watch_cb = - _sound_manager_add_focus_state_watch_cbPtr.asFunction< - int Function(int, sound_stream_focus_state_watch_cb, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Unregisters the focus state change watch callback. - /// @since_tizen 3.0 - /// - /// @remarks Do not call this function within sound_stream_focus_state_changed_cb() or sound_stream_focus_state_watch_cb(),\n - /// otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned. - /// - /// @param[in] id The focus state change watch callback id - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_add_focus_state_watch_cb() - int sound_manager_remove_focus_state_watch_cb( - int id, - ) { - return _sound_manager_remove_focus_state_watch_cb( - id, - ); - } - - late final _sound_manager_remove_focus_state_watch_cbPtr = - _lookup>( - 'sound_manager_remove_focus_state_watch_cb'); - late final _sound_manager_remove_focus_state_watch_cb = - _sound_manager_remove_focus_state_watch_cbPtr - .asFunction(); - - /// @deprecated Deprecated since 3.0. Use sound_manager_create_stream_information() instead. - /// @brief Sets the application's sound session type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] type The session type to set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @retval #SOUND_MANAGER_ERROR_POLICY Noncompliance with the sound system policy - /// @see sound_manager_get_session_type() - /// @see sound_manager_set_media_session_option() - /// @see sound_manager_get_media_session_option() - /// @see sound_manager_set_media_session_resumption_option() - /// @see sound_manager_get_media_session_resumption_option() - /// @see sound_manager_set_voip_session_mode() - /// @see sound_manager_get_voip_session_mode() - int sound_manager_set_session_type( - int type, - ) { - return _sound_manager_set_session_type( - type, - ); - } - - late final _sound_manager_set_session_typePtr = - _lookup>( - 'sound_manager_set_session_type'); - late final _sound_manager_set_session_type = - _sound_manager_set_session_typePtr.asFunction(); - - /// @deprecated Deprecated since 3.0. - /// @brief Gets the application's sound session type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] type The session type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see sound_manager_set_session_type() - /// @see sound_manager_set_media_session_option() - /// @see sound_manager_get_media_session_option() - /// @see sound_manager_set_media_session_resumption_option() - /// @see sound_manager_get_media_session_resumption_option() - /// @see sound_manager_set_voip_session_mode() - /// @see sound_manager_get_voip_session_mode() - int sound_manager_get_session_type( - ffi.Pointer type, - ) { - return _sound_manager_get_session_type( - type, - ); - } - - late final _sound_manager_get_session_typePtr = - _lookup)>>( - 'sound_manager_get_session_type'); - late final _sound_manager_get_session_type = - _sound_manager_get_session_typePtr - .asFunction)>(); - - /// @deprecated Deprecated since 3.0. Use sound_manager_create_stream_information() instead. - /// @brief Sets the media sound session option. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] s_option The session option for starting - /// @param[in] d_option The session option for during play - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_POLICY Noncompliance with the sound system policy - /// @see sound_manager_set_session_type() - /// @see sound_manager_get_session_type() - /// @see sound_manager_get_media_session_option() - /// @see sound_manager_set_media_session_resumption_option() - /// @see sound_manager_get_media_session_resumption_option() - int sound_manager_set_media_session_option( - int s_option, - int d_option, - ) { - return _sound_manager_set_media_session_option( - s_option, - d_option, - ); - } - - late final _sound_manager_set_media_session_optionPtr = - _lookup>( - 'sound_manager_set_media_session_option'); - late final _sound_manager_set_media_session_option = - _sound_manager_set_media_session_optionPtr - .asFunction(); - - /// @deprecated Deprecated since 3.0. Use sound_manager_create_stream_information() instead. - /// @brief Gets the media sound session option. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[out] s_option The session option for starting - /// @param[out] d_option The session option for during play - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_POLICY Noncompliance with the sound system policy - /// @see sound_manager_set_session_type() - /// @see sound_manager_get_session_type() - /// @see sound_manager_set_media_session_option() - /// @see sound_manager_set_media_session_resumption_option() - /// @see sound_manager_get_media_session_resumption_option() - int sound_manager_get_media_session_option( - ffi.Pointer s_option, - ffi.Pointer d_option, - ) { - return _sound_manager_get_media_session_option( - s_option, - d_option, - ); - } - - late final _sound_manager_get_media_session_optionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>( - 'sound_manager_get_media_session_option'); - late final _sound_manager_get_media_session_option = - _sound_manager_get_media_session_optionPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @deprecated Deprecated since 3.0. Use sound_manager_create_stream_information() instead. - /// @brief Sets the media sound session resumption option. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] option The session resumption option - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_POLICY Noncompliance with the sound system policy - /// @see sound_manager_set_session_type() - /// @see sound_manager_get_session_type() - /// @see sound_manager_set_media_session_option() - /// @see sound_manager_get_media_session_option() - /// @see sound_manager_get_media_session_resumption_option() - int sound_manager_set_media_session_resumption_option( - int option, - ) { - return _sound_manager_set_media_session_resumption_option( - option, - ); - } - - late final _sound_manager_set_media_session_resumption_optionPtr = - _lookup>( - 'sound_manager_set_media_session_resumption_option'); - late final _sound_manager_set_media_session_resumption_option = - _sound_manager_set_media_session_resumption_optionPtr - .asFunction(); - - /// @deprecated Deprecated since 3.0. Use sound_manager_create_stream_information() instead. - /// @brief Gets the media sound session resumption option. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[out] option The session resumption option - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_POLICY Noncompliance with the sound system policy - /// @see sound_manager_set_session_type() - /// @see sound_manager_get_session_type() - /// @see sound_manager_set_media_session_option() - /// @see sound_manager_get_media_session_option() - /// @see sound_manager_set_media_session_resumption_option() - int sound_manager_get_media_session_resumption_option( - ffi.Pointer option, - ) { - return _sound_manager_get_media_session_resumption_option( - option, - ); - } - - late final _sound_manager_get_media_session_resumption_optionPtr = - _lookup)>>( - 'sound_manager_get_media_session_resumption_option'); - late final _sound_manager_get_media_session_resumption_option = - _sound_manager_get_media_session_resumption_optionPtr - .asFunction)>(); - - /// @deprecated Deprecated since 3.0. Use sound_manager_create_stream_information() instead. - /// @brief Sets the mode of the voip sound session. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mode The voip session mode - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @retval #SOUND_MANAGER_ERROR_POLICY Noncompliance with the sound system policy - /// @pre Call sound_manager_set_session_type(#SOUND_SESSION_TYPE_VOIP) before calling this function. - /// @see sound_manager_set_session_type() - /// @see sound_manager_get_session_type() - /// @see sound_manager_get_voip_session_mode() - int sound_manager_set_voip_session_mode( - int mode, - ) { - return _sound_manager_set_voip_session_mode( - mode, - ); - } - - late final _sound_manager_set_voip_session_modePtr = - _lookup>( - 'sound_manager_set_voip_session_mode'); - late final _sound_manager_set_voip_session_mode = - _sound_manager_set_voip_session_modePtr.asFunction(); - - /// @deprecated Deprecated since 3.0. Use sound_manager_create_stream_information() instead. - /// @brief Gets the mode of the voip sound session. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[out] mode The voip session mode - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @retval #SOUND_MANAGER_ERROR_POLICY Noncompliance with the sound system policy - /// @pre Call sound_manager_set_session_type(#SOUND_SESSION_TYPE_VOIP) before calling this function. - /// @see sound_manager_set_session_type() - /// @see sound_manager_get_session_type() - /// @see sound_manager_set_voip_session_mode() - int sound_manager_get_voip_session_mode( - ffi.Pointer mode, - ) { - return _sound_manager_get_voip_session_mode( - mode, - ); - } - - late final _sound_manager_get_voip_session_modePtr = - _lookup)>>( - 'sound_manager_get_voip_session_mode'); - late final _sound_manager_get_voip_session_mode = - _sound_manager_get_voip_session_modePtr - .asFunction)>(); - - /// @deprecated Deprecated since 3.0. Use sound_manager_create_stream_information() instead. - /// @brief Registers a callback function to be invoked when the sound session being played was interrupted. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] callback The interrupted callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_POLICY Noncompliance with the sound system policy - /// @post sound_session_interrupted_cb() will be invoked. - /// @see sound_manager_unset_session_interrupted_cb() - /// @see sound_session_interrupted_cb() - int sound_manager_set_session_interrupted_cb( - sound_session_interrupted_cb callback, - ffi.Pointer user_data, - ) { - return _sound_manager_set_session_interrupted_cb( - callback, - user_data, - ); - } - - late final _sound_manager_set_session_interrupted_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - sound_session_interrupted_cb, ffi.Pointer)>>( - 'sound_manager_set_session_interrupted_cb'); - late final _sound_manager_set_session_interrupted_cb = - _sound_manager_set_session_interrupted_cbPtr.asFunction< - int Function(sound_session_interrupted_cb, ffi.Pointer)>(); - - /// @deprecated Deprecated since 3.0. - /// @brief Unregisters the callback function which is called when the sound session being played is interrupted. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @return 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_set_session_interrupted_cb() - int sound_manager_unset_session_interrupted_cb() { - return _sound_manager_unset_session_interrupted_cb(); - } - - late final _sound_manager_unset_session_interrupted_cbPtr = - _lookup>( - 'sound_manager_unset_session_interrupted_cb'); - late final _sound_manager_unset_session_interrupted_cb = - _sound_manager_unset_session_interrupted_cbPtr - .asFunction(); - - /// @deprecated Deprecated since 3.0. Use sound_manager_get_device_list() instead. - /// @brief Gets the list consisting of connected devices. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks @a Calling this API will deallocate previously obtained list and each item.\n - /// Use sound_manager_get_next_device() to get the first node of the list. - /// - /// @param[in] device_mask The mask value - /// @param[out] device_list The list of connected devices - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_NO_DATA No data - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_get_next_device() - /// @see sound_manager_get_prev_device() - /// @see sound_manager_get_device_type() - /// @see sound_manager_get_device_io_direction() - /// @see sound_manager_get_device_id() - /// @see sound_manager_get_device_name() - int sound_manager_get_current_device_list( - int device_mask, - ffi.Pointer device_list, - ) { - return _sound_manager_get_current_device_list( - device_mask, - device_list, - ); - } - - late final _sound_manager_get_current_device_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer)>>( - 'sound_manager_get_current_device_list'); - late final _sound_manager_get_current_device_list = - _sound_manager_get_current_device_listPtr - .asFunction)>(); - - /// @brief Gets the list consisting of connected devices. - /// @since_tizen 3.0 - /// - /// @remarks @a device_list should be freed using sound_manager_free_device_list().\n - /// Use sound_manager_get_next_device() to get the first node of the list. - /// - /// @param[in] device_mask The mask values of #sound_device_mask_e combined with bitwise 'or' - /// @param[out] device_list The list of connected devices - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_NO_DATA No data - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_get_next_device() - /// @see sound_manager_get_prev_device() - /// @see sound_manager_get_device_type() - /// @see sound_manager_get_device_io_direction() - /// @see sound_manager_get_device_id() - /// @see sound_manager_get_device_name() - /// @see sound_manager_free_device_list() - int sound_manager_get_device_list( - int device_mask, - ffi.Pointer device_list, - ) { - return _sound_manager_get_device_list( - device_mask, - device_list, - ); - } - - late final _sound_manager_get_device_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer)>>( - 'sound_manager_get_device_list'); - late final _sound_manager_get_device_list = _sound_manager_get_device_listPtr - .asFunction)>(); - - /// @brief Frees device list and each item of list. - /// @since_tizen 3.0 - /// - /// @remarks This function will deallocate not only device list itself but also each item. - /// - /// @param[in] device_list The device list got with sound_manager_get_device_list. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// - /// @see sound_manager_get_device_list() - /// @see sound_manager_get_next_device() - /// @see sound_manager_get_prev_device() - /// @see sound_manager_get_device_type() - /// @see sound_manager_get_device_io_direction() - /// @see sound_manager_get_device_id() - /// @see sound_manager_get_device_name() - int sound_manager_free_device_list( - sound_device_list_h device_list, - ) { - return _sound_manager_free_device_list( - device_list, - ); - } - - late final _sound_manager_free_device_listPtr = - _lookup>( - 'sound_manager_free_device_list'); - late final _sound_manager_free_device_list = - _sound_manager_free_device_listPtr - .asFunction(); - - /// @brief Gets the next item of the device list. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] device_list The list of connected devices - /// @param[out] device The device item - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_NO_DATA No data - /// @see sound_manager_get_device_list() - /// @see sound_manager_get_prev_device() - /// @see sound_manager_get_device_type() - /// @see sound_manager_get_device_io_direction() - /// @see sound_manager_get_device_id() - /// @see sound_manager_get_device_name() - /// @see sound_manager_free_device_list() - int sound_manager_get_next_device( - sound_device_list_h device_list, - ffi.Pointer device, - ) { - return _sound_manager_get_next_device( - device_list, - device, - ); - } - - late final _sound_manager_get_next_devicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_device_list_h, - ffi.Pointer)>>('sound_manager_get_next_device'); - late final _sound_manager_get_next_device = - _sound_manager_get_next_devicePtr.asFunction< - int Function(sound_device_list_h, ffi.Pointer)>(); - - /// @brief Gets the previous item of the device list. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] device_list The list of connected devices - /// @param[out] device The device item - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_NO_DATA No data - /// @see sound_manager_get_device_list() - /// @see sound_manager_get_next_device() - /// @see sound_manager_get_device_type() - /// @see sound_manager_get_device_io_direction() - /// @see sound_manager_get_device_id() - /// @see sound_manager_get_device_name() - /// @see sound_manager_free_device_list() - int sound_manager_get_prev_device( - sound_device_list_h device_list, - ffi.Pointer device, - ) { - return _sound_manager_get_prev_device( - device_list, - device, - ); - } - - late final _sound_manager_get_prev_devicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_device_list_h, - ffi.Pointer)>>('sound_manager_get_prev_device'); - late final _sound_manager_get_prev_device = - _sound_manager_get_prev_devicePtr.asFunction< - int Function(sound_device_list_h, ffi.Pointer)>(); - - /// @brief Gets the type of the device. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] device The device item - /// @param[out] type The type of the device - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see sound_manager_get_device_list() - /// @see sound_manager_get_next_device() - /// @see sound_manager_get_prev_device() - /// @see sound_manager_get_device_io_direction() - /// @see sound_manager_get_device_id() - /// @see sound_manager_get_device_name() - /// @see sound_manager_free_device_list() - int sound_manager_get_device_type( - sound_device_h device, - ffi.Pointer type, - ) { - return _sound_manager_get_device_type( - device, - type, - ); - } - - late final _sound_manager_get_device_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_device_h, - ffi.Pointer)>>('sound_manager_get_device_type'); - late final _sound_manager_get_device_type = _sound_manager_get_device_typePtr - .asFunction)>(); - - /// @brief Gets the io direction of the device. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] device The device item - /// @param[out] io_direction The io direction of the device - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see sound_manager_get_device_list() - /// @see sound_manager_get_next_device() - /// @see sound_manager_get_prev_device() - /// @see sound_manager_get_device_type() - /// @see sound_manager_get_device_id() - /// @see sound_manager_get_device_name() - /// @see sound_manager_free_device_list() - int sound_manager_get_device_io_direction( - sound_device_h device, - ffi.Pointer io_direction, - ) { - return _sound_manager_get_device_io_direction( - device, - io_direction, - ); - } - - late final _sound_manager_get_device_io_directionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_device_h, ffi.Pointer)>>( - 'sound_manager_get_device_io_direction'); - late final _sound_manager_get_device_io_direction = - _sound_manager_get_device_io_directionPtr - .asFunction)>(); - - /// @brief Gets the id of the device. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] device The device item - /// @param[out] id The id of the device - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see sound_manager_get_device_list() - /// @see sound_manager_get_next_device() - /// @see sound_manager_get_prev_device() - /// @see sound_manager_get_device_type() - /// @see sound_manager_get_device_io_direction() - /// @see sound_manager_get_device_name() - /// @see sound_manager_free_device_list() - int sound_manager_get_device_id( - sound_device_h device, - ffi.Pointer id, - ) { - return _sound_manager_get_device_id( - device, - id, - ); - } - - late final _sound_manager_get_device_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_device_h, - ffi.Pointer)>>('sound_manager_get_device_id'); - late final _sound_manager_get_device_id = _sound_manager_get_device_idPtr - .asFunction)>(); - - /// @brief Gets the name of the device. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] device The device item - /// @param[out] name The name of the device - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_get_device_list() - /// @see sound_manager_get_next_device() - /// @see sound_manager_get_prev_device() - /// @see sound_manager_get_device_type() - /// @see sound_manager_get_device_io_direction() - /// @see sound_manager_get_device_id() - /// @see sound_manager_free_device_list() - int sound_manager_get_device_name( - sound_device_h device, - ffi.Pointer> name, - ) { - return _sound_manager_get_device_name( - device, - name, - ); - } - - late final _sound_manager_get_device_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - sound_device_h, ffi.Pointer>)>>( - 'sound_manager_get_device_name'); - late final _sound_manager_get_device_name = - _sound_manager_get_device_namePtr.asFunction< - int Function(sound_device_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Gets the state of the device. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] device The device item - /// @param[out] state The state of the device - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see sound_manager_get_device_list() - /// @see sound_manager_get_next_device() - /// @see sound_manager_get_prev_device() - /// @see sound_manager_get_device_type() - /// @see sound_manager_get_device_io_direction() - /// @see sound_manager_get_device_id() - /// @see sound_manager_get_device_name() - /// @see sound_manager_free_device_list() - int sound_manager_get_device_state( - sound_device_h device, - ffi.Pointer state, - ) { - return _sound_manager_get_device_state( - device, - state, - ); - } - - late final _sound_manager_get_device_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_device_h, - ffi.Pointer)>>('sound_manager_get_device_state'); - late final _sound_manager_get_device_state = - _sound_manager_get_device_statePtr - .asFunction)>(); - - /// @deprecated Deprecated since 3.0. Use sound_manager_add_device_connection_changed_cb() instead. - /// @brief Registers a callback function to be invoked when the state of connection of a sound device was changed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The initial state of sound devices connected is deactivated. - /// - /// @param[in] device_mask The mask value - /// @param[in] callback The interrupted callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @post sound_device_connected_cb() will be invoked. - /// @see sound_manager_unset_device_connected_cb() - /// @see sound_device_connected_cb() - int sound_manager_set_device_connected_cb( - int device_mask, - sound_device_connected_cb callback, - ffi.Pointer user_data, - ) { - return _sound_manager_set_device_connected_cb( - device_mask, - callback, - user_data, - ); - } - - late final _sound_manager_set_device_connected_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, sound_device_connected_cb, - ffi.Pointer)>>('sound_manager_set_device_connected_cb'); - late final _sound_manager_set_device_connected_cb = - _sound_manager_set_device_connected_cbPtr.asFunction< - int Function( - int, sound_device_connected_cb, ffi.Pointer)>(); - - /// @deprecated Deprecated since 3.0. Use sound_manager_remove_device_connection_changed_cb() instead. - /// @brief Unregisters the callback function which is called when the state of connection of a sound device was changed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_set_device_connected_cb() - int sound_manager_unset_device_connected_cb() { - return _sound_manager_unset_device_connected_cb(); - } - - late final _sound_manager_unset_device_connected_cbPtr = - _lookup>( - 'sound_manager_unset_device_connected_cb'); - late final _sound_manager_unset_device_connected_cb = - _sound_manager_unset_device_connected_cbPtr.asFunction(); - - /// @brief Adds a callback function to be invoked when the connection state of a sound device was changed. - /// @since_tizen 3.0 - /// - /// @param[in] device_mask Device masks for which changes should be tracked, values of #sound_device_mask_e combined with bitwise 'or' - /// @param[in] callback The device connection state changed callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] id The callback id - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @post sound_device_connected_cb() will be invoked. - /// @see sound_manager_remove_device_connection_changed_cb() - /// @see sound_device_connection_changed_cb() - int sound_manager_add_device_connection_changed_cb( - int device_mask, - sound_device_connection_changed_cb callback, - ffi.Pointer user_data, - ffi.Pointer id, - ) { - return _sound_manager_add_device_connection_changed_cb( - device_mask, - callback, - user_data, - id, - ); - } - - late final _sound_manager_add_device_connection_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, sound_device_connection_changed_cb, - ffi.Pointer, ffi.Pointer)>>( - 'sound_manager_add_device_connection_changed_cb'); - late final _sound_manager_add_device_connection_changed_cb = - _sound_manager_add_device_connection_changed_cbPtr.asFunction< - int Function(int, sound_device_connection_changed_cb, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Removes a callback function invoked when the connection of a sound device was changed. - /// @since_tizen 3.0 - /// - /// @param[in] id The id of the callback to remove - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_add_device_connection_changed_cb() - int sound_manager_remove_device_connection_changed_cb( - int id, - ) { - return _sound_manager_remove_device_connection_changed_cb( - id, - ); - } - - late final _sound_manager_remove_device_connection_changed_cbPtr = - _lookup>( - 'sound_manager_remove_device_connection_changed_cb'); - late final _sound_manager_remove_device_connection_changed_cb = - _sound_manager_remove_device_connection_changed_cbPtr - .asFunction(); - - /// @deprecated Deprecated since 3.0. Use sound_manager_add_device_state_changed_cb() instead. - /// @brief Registers a callback function to be invoked when the information of a sound device was changed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] device_mask The mask value - /// @param[in] callback The interrupted callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @post sound_device_information_changed_cb() will be invoked. - /// @see sound_manager_unset_device_information_changed_cb() - /// @see sound_device_information_changed_cb() - int sound_manager_set_device_information_changed_cb( - int device_mask, - sound_device_information_changed_cb callback, - ffi.Pointer user_data, - ) { - return _sound_manager_set_device_information_changed_cb( - device_mask, - callback, - user_data, - ); - } - - late final _sound_manager_set_device_information_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, sound_device_information_changed_cb, - ffi.Pointer)>>( - 'sound_manager_set_device_information_changed_cb'); - late final _sound_manager_set_device_information_changed_cb = - _sound_manager_set_device_information_changed_cbPtr.asFunction< - int Function(int, sound_device_information_changed_cb, - ffi.Pointer)>(); - - /// @deprecated Deprecated since 3.0. Use sound_manager_remove_device_state_changed_cb() instead. - /// @brief Unregisters the callback function which is called when the information of a sound device was changed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_set_device_information_changed_cb() - int sound_manager_unset_device_information_changed_cb() { - return _sound_manager_unset_device_information_changed_cb(); - } - - late final _sound_manager_unset_device_information_changed_cbPtr = - _lookup>( - 'sound_manager_unset_device_information_changed_cb'); - late final _sound_manager_unset_device_information_changed_cb = - _sound_manager_unset_device_information_changed_cbPtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. - /// @brief Adds a callback function to be invoked when the state of a sound device was changed. - /// @since_tizen 3.0 - /// - /// @param[in] device_mask Device masks for which changes should be tracked, values of #sound_device_mask_e combined with bitwise 'or' - /// @param[in] callback The device state changed callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] id The callback id - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @post sound_device_state_changed_cb() will be invoked. - /// @see sound_manager_remove_device_state_changed_cb() - /// @see sound_device_state_connected_cb() - int sound_manager_add_device_state_changed_cb( - int device_mask, - sound_device_state_changed_cb callback, - ffi.Pointer user_data, - ffi.Pointer id, - ) { - return _sound_manager_add_device_state_changed_cb( - device_mask, - callback, - user_data, - id, - ); - } - - late final _sound_manager_add_device_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, sound_device_state_changed_cb, - ffi.Pointer, ffi.Pointer)>>( - 'sound_manager_add_device_state_changed_cb'); - late final _sound_manager_add_device_state_changed_cb = - _sound_manager_add_device_state_changed_cbPtr.asFunction< - int Function(int, sound_device_state_changed_cb, - ffi.Pointer, ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Removes a callback function invoked when the state of a sound device was changed. - /// @since_tizen 3.0 - /// - /// @param[in] id The id of the callback to remove - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_add_device_state_changed_cb() - int sound_manager_remove_device_state_changed_cb( - int id, - ) { - return _sound_manager_remove_device_state_changed_cb( - id, - ); - } - - late final _sound_manager_remove_device_state_changed_cbPtr = - _lookup>( - 'sound_manager_remove_device_state_changed_cb'); - late final _sound_manager_remove_device_state_changed_cb = - _sound_manager_remove_device_state_changed_cbPtr - .asFunction(); - - /// @brief Creates an audio device instance and returns an input handle to record PCM (pulse-code modulation) data. - /// - /// @details This function is used for audio input initialization. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// - /// @remarks @a input must be released using audio_in_destroy(). - /// - /// @param[in] sample_rate The audio sample rate in 8000[Hz] ~ 48000[Hz] - /// @param[in] channel The audio channel type (mono or stereo) - /// @param[in] type The type of audio sample (8- or 16-bit) - /// @param[out] input An audio input handle is created on success - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_PERMISSION_DENIED Permission denied - /// @retval #AUDIO_IO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #AUDIO_IO_ERROR_DEVICE_NOT_OPENED Device not opened - /// @retval #AUDIO_IO_ERROR_SOUND_POLICY Sound policy error - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// - /// @post The state will be #AUDIO_IO_STATE_IDLE.\n - /// audio_in_set_sound_stream_info() is recommended to be called after this API. - /// @see audio_in_destroy() - int audio_in_create( - int sample_rate, - int channel, - int type, - ffi.Pointer input, - ) { - return _audio_in_create( - sample_rate, - channel, - type, - input, - ); - } - - late final _audio_in_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Int32, ffi.Int32, - ffi.Pointer)>>('audio_in_create'); - late final _audio_in_create = _audio_in_createPtr - .asFunction)>(); - - /// @deprecated Deprecated since 3.0. Use sound_manager_create_stream_information() instead. - /// @brief Creates an audio loopback device instance and returns an input handle to record PCM (pulse-code modulation) data. - /// - /// @details This function is used for audio loopback input initialization. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// - /// @remarks @a input must be released using audio_in_destroy(). - /// - /// @param[in] sample_rate The audio sample rate in 8000[Hz] ~ 48000[Hz] - /// @param[in] channel The audio channel type, mono, or stereo - /// @param[in] type The type of audio sample (8- or 16-bit) - /// @param[out] input An audio input handle will be created, if successful - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_PERMISSION_DENIED Permission denied - /// @retval #AUDIO_IO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #AUDIO_IO_ERROR_DEVICE_NOT_OPENED Device not opened - /// @retval #AUDIO_IO_ERROR_SOUND_POLICY Sound policy error - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// - /// @see audio_in_destroy() - int audio_in_create_loopback( - int sample_rate, - int channel, - int type, - ffi.Pointer input, - ) { - return _audio_in_create_loopback( - sample_rate, - channel, - type, - input, - ); - } - - late final _audio_in_create_loopbackPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Int32, ffi.Int32, - ffi.Pointer)>>('audio_in_create_loopback'); - late final _audio_in_create_loopback = _audio_in_create_loopbackPtr - .asFunction)>(); - - /// @brief Releases the audio input handle and all its resources associated with an audio stream. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] input The handle to the audio input to destroy - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_DEVICE_NOT_CLOSED Device not closed - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// - /// @see audio_in_create() - int audio_in_destroy( - audio_in_h input, - ) { - return _audio_in_destroy( - input, - ); - } - - late final _audio_in_destroyPtr = - _lookup>( - 'audio_in_destroy'); - late final _audio_in_destroy = - _audio_in_destroyPtr.asFunction(); - - /// @brief Sets the sound stream information to the audio input. - /// - /// @since_tizen 3.0 - /// - /// @remarks @a the sound stream information includes audio routing and volume type. - /// For more details, you can refer to @ref CAPI_MEDIA_SOUND_MANAGER_MODULE - /// System, Alarm, Notification, Emergency, Voice Information, Ringtone VOIP and Ringtone Call stream types are not supported in this API. - /// - /// @param[in] input The handle to the audio input - /// @param[in] stream_info The handle of stream information - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED_TYPE Not supported stream type - /// - /// @pre The state should be #AUDIO_IO_STATE_IDLE.\n - /// Call audio_in_create() before calling this function. - /// @post Call audio_in_prepare() after calling this function. - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - int audio_in_set_sound_stream_info( - audio_in_h input, - sound_stream_info_h stream_info, - ) { - return _audio_in_set_sound_stream_info( - input, - stream_info, - ); - } - - late final _audio_in_set_sound_stream_infoPtr = _lookup< - ffi - .NativeFunction>( - 'audio_in_set_sound_stream_info'); - late final _audio_in_set_sound_stream_info = - _audio_in_set_sound_stream_infoPtr - .asFunction(); - - /// @brief Prepares the audio input for reading audio data by starting buffering of audio data from the device. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] input The handle to the audio input - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// @retval #AUDIO_IO_ERROR_DEVICE_POLICY_RESTRICTION Device policy restriction - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @post The state will be #AUDIO_IO_STATE_RUNNING. - /// @see audio_in_unprepare() - int audio_in_prepare( - audio_in_h input, - ) { - return _audio_in_prepare( - input, - ); - } - - late final _audio_in_preparePtr = - _lookup>( - 'audio_in_prepare'); - late final _audio_in_prepare = - _audio_in_preparePtr.asFunction(); - - /// @brief Unprepares the audio input. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] input The handle to the audio input - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @post The state will be #AUDIO_IO_STATE_IDLE. - /// @see audio_in_prepare() - int audio_in_unprepare( - audio_in_h input, - ) { - return _audio_in_unprepare( - input, - ); - } - - late final _audio_in_unpreparePtr = - _lookup>( - 'audio_in_unprepare'); - late final _audio_in_unprepare = - _audio_in_unpreparePtr.asFunction(); - - /// @brief Pauses buffering of audio data from the device. - /// - /// @since_tizen 3.0 - /// - /// @param[in] input The handle to the audio input - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @pre The state should be #AUDIO_IO_STATE_RUNNING. - /// @post The state will be #AUDIO_IO_STATE_PAUSED. - /// @see audio_in_resume() - int audio_in_pause( - audio_in_h input, - ) { - return _audio_in_pause( - input, - ); - } - - late final _audio_in_pausePtr = - _lookup>( - 'audio_in_pause'); - late final _audio_in_pause = - _audio_in_pausePtr.asFunction(); - - /// @brief Resumes buffering audio data from the device. - /// - /// @since_tizen 3.0 - /// - /// @param[in] input The handle to the audio input - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @pre The state should be #AUDIO_IO_STATE_PAUSED. - /// @post The state will be #AUDIO_IO_STATE_RUNNING. - /// @see audio_in_pause() - int audio_in_resume( - audio_in_h input, - ) { - return _audio_in_resume( - input, - ); - } - - late final _audio_in_resumePtr = - _lookup>( - 'audio_in_resume'); - late final _audio_in_resume = - _audio_in_resumePtr.asFunction(); - - /// @brief Flushes and discards buffered audio data from the input stream. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] input The handle to the audio input - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @pre The state should be #AUDIO_IO_STATE_RUNNING or #AUDIO_IO_STATE_PAUSED. - int audio_in_flush( - audio_in_h input, - ) { - return _audio_in_flush( - input, - ); - } - - late final _audio_in_flushPtr = - _lookup>( - 'audio_in_flush'); - late final _audio_in_flush = - _audio_in_flushPtr.asFunction(); - - /// @brief Reads audio data from the audio input buffer. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] input The handle to the audio input - /// @param[out] buffer The PCM buffer address - /// @param[in] length The length of the PCM data buffer (in bytes) - /// @return The number of read bytes on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_BUFFER Invalid buffer pointer - /// @retval #AUDIO_IO_ERROR_SOUND_POLICY Sound policy error - /// @retval #AUDIO_IO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state should be #AUDIO_IO_STATE_RUNNING. - int audio_in_read( - audio_in_h input, - ffi.Pointer buffer, - int length, - ) { - return _audio_in_read( - input, - buffer, - length, - ); - } - - late final _audio_in_readPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_in_h, ffi.Pointer, - ffi.UnsignedInt)>>('audio_in_read'); - late final _audio_in_read = _audio_in_readPtr - .asFunction, int)>(); - - /// @brief Gets the size to be allocated for the audio input buffer. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] input The handle to the audio input - /// @param[out] size The buffer size (in bytes, the maximum size is 1 MB) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// @see audio_in_read() - int audio_in_get_buffer_size( - audio_in_h input, - ffi.Pointer size, - ) { - return _audio_in_get_buffer_size( - input, - size, - ); - } - - late final _audio_in_get_buffer_sizePtr = _lookup< - ffi - .NativeFunction)>>( - 'audio_in_get_buffer_size'); - late final _audio_in_get_buffer_size = _audio_in_get_buffer_sizePtr - .asFunction)>(); - - /// @brief Gets the sample rate of the audio input data stream. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] input The handle to the audio input - /// @param[out] sample_rate The audio sample rate in Hertz (8000 ~ 48000) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - int audio_in_get_sample_rate( - audio_in_h input, - ffi.Pointer sample_rate, - ) { - return _audio_in_get_sample_rate( - input, - sample_rate, - ); - } - - late final _audio_in_get_sample_ratePtr = _lookup< - ffi - .NativeFunction)>>( - 'audio_in_get_sample_rate'); - late final _audio_in_get_sample_rate = _audio_in_get_sample_ratePtr - .asFunction)>(); - - /// @brief Gets the channel type of the audio input data stream. - /// - /// @details The audio channel type defines whether the audio is mono or stereo. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] input The handle to the audio input - /// @param[out] channel The audio channel type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - int audio_in_get_channel( - audio_in_h input, - ffi.Pointer channel, - ) { - return _audio_in_get_channel( - input, - channel, - ); - } - - late final _audio_in_get_channelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - audio_in_h, ffi.Pointer)>>('audio_in_get_channel'); - late final _audio_in_get_channel = _audio_in_get_channelPtr - .asFunction)>(); - - /// @brief Gets the sample audio format (8-bit or 16-bit) of the audio input data stream. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] input The handle to the audio input - /// @param[out] type The audio sample type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - int audio_in_get_sample_type( - audio_in_h input, - ffi.Pointer type, - ) { - return _audio_in_get_sample_type( - input, - type, - ); - } - - late final _audio_in_get_sample_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - audio_in_h, ffi.Pointer)>>('audio_in_get_sample_type'); - late final _audio_in_get_sample_type = _audio_in_get_sample_typePtr - .asFunction)>(); - - /// @deprecated Deprecated since 3.0. Use sound_manager_create_stream_information() instead. - /// @brief Registers a callback function to be invoked when the audio input handle is interrupted or the interrupt is completed. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] input The handle to the audio input - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// @post audio_io_interrupted_cb() will be invoked. - /// - /// @see audio_in_unset_interrupted_cb() - /// @see audio_io_interrupted_cb() - int audio_in_set_interrupted_cb( - audio_in_h input, - audio_io_interrupted_cb callback, - ffi.Pointer user_data, - ) { - return _audio_in_set_interrupted_cb( - input, - callback, - user_data, - ); - } - - late final _audio_in_set_interrupted_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_in_h, audio_io_interrupted_cb, - ffi.Pointer)>>('audio_in_set_interrupted_cb'); - late final _audio_in_set_interrupted_cb = - _audio_in_set_interrupted_cbPtr.asFunction< - int Function( - audio_in_h, audio_io_interrupted_cb, ffi.Pointer)>(); - - /// @deprecated Deprecated since 3.0 - /// @brief Unregisters the callback function. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] input The handle to the audio input - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// - /// @see audio_in_set_interrupted_cb() - int audio_in_unset_interrupted_cb( - audio_in_h input, - ) { - return _audio_in_unset_interrupted_cb( - input, - ); - } - - late final _audio_in_unset_interrupted_cbPtr = - _lookup>( - 'audio_in_unset_interrupted_cb'); - late final _audio_in_unset_interrupted_cb = - _audio_in_unset_interrupted_cbPtr.asFunction(); - - /// @deprecated Deprecated since 3.0 - /// @brief Ignores session for input. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] input The handle to the audio input - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - int audio_in_ignore_session( - audio_in_h input, - ) { - return _audio_in_ignore_session( - input, - ); - } - - late final _audio_in_ignore_sessionPtr = - _lookup>( - 'audio_in_ignore_session'); - late final _audio_in_ignore_session = - _audio_in_ignore_sessionPtr.asFunction(); - - /// @brief Sets an asynchronous(event) callback function to handle recording PCM (pulse-code modulation) data. - /// - /// @details @a callback will be called when you can read a PCM data. - /// It might cause dead lock if change the state of audio handle in callback. - /// (ex: audio_in_destroy, audio_in_prepare, audio_in_unprepare) - /// Recommend to use as a VOIP only. - /// Recommend not to hold callback too long.(it affects latency) - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks @a input must be created using audio_in_create(). - /// - /// @param[in] input An audio input handle - /// @param[in] callback notify stream callback when user can read data (#audio_in_stream_cb) - /// @param[in] user_data user data to be retrieved when callback is called - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #AUDIO_IO_ERROR_DEVICE_NOT_OPENED Device not opened - /// @retval #AUDIO_IO_ERROR_SOUND_POLICY Sound policy error - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// - /// @see audio_out_set_stream_cb() - int audio_in_set_stream_cb( - audio_in_h input, - audio_in_stream_cb callback, - ffi.Pointer user_data, - ) { - return _audio_in_set_stream_cb( - input, - callback, - user_data, - ); - } - - late final _audio_in_set_stream_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_in_h, audio_in_stream_cb, - ffi.Pointer)>>('audio_in_set_stream_cb'); - late final _audio_in_set_stream_cb = _audio_in_set_stream_cbPtr.asFunction< - int Function(audio_in_h, audio_in_stream_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] input The handle to the audio input - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// - /// @see audio_in_set_interrupted_cb() - int audio_in_unset_stream_cb( - audio_in_h input, - ) { - return _audio_in_unset_stream_cb( - input, - ); - } - - late final _audio_in_unset_stream_cbPtr = - _lookup>( - 'audio_in_unset_stream_cb'); - late final _audio_in_unset_stream_cb = - _audio_in_unset_stream_cbPtr.asFunction(); - - /// @brief peek from audio in buffer - /// - /// @details This function works correctly only with read, write callback. Otherwise it won't operate as intended. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks @a Works only in asynchronous(event) mode. This will just retrieve buffer pointer from audio in buffer. Drop after use. - /// - /// @param[in] input The handle to the audio input - /// @param[out] buffer start buffer pointer of peeked audio in data - /// @param[out] length amount of audio in data to be peeked - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @pre The state should be #AUDIO_IO_STATE_RUNNING. - /// @see audio_in_drop() - int audio_in_peek( - audio_in_h input, - ffi.Pointer> buffer, - ffi.Pointer length, - ) { - return _audio_in_peek( - input, - buffer, - length, - ); - } - - late final _audio_in_peekPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_in_h, ffi.Pointer>, - ffi.Pointer)>>('audio_in_peek'); - late final _audio_in_peek = _audio_in_peekPtr.asFunction< - int Function(audio_in_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief drop peeked audio buffer. - /// - /// @details This function works correctly only with read, write callback. Otherwise it won't operate as intended. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks @a Works only in asynchronous(event) mode. This will remove audio in data from actual stream buffer. Use this if peeked data is not needed anymore. - /// - /// @param[in] input The handle to the audio input - /// @return 0 on success, otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @pre The state should be #AUDIO_IO_STATE_RUNNING. - /// @see audio_in_peek() - int audio_in_drop( - audio_in_h input, - ) { - return _audio_in_drop( - input, - ); - } - - late final _audio_in_dropPtr = - _lookup>( - 'audio_in_drop'); - late final _audio_in_drop = - _audio_in_dropPtr.asFunction(); - - /// @brief Sets the state changed callback function to the audio input handle. - /// - /// @since_tizen 3.0 - /// - /// @remarks @a input must be created using audio_in_create(). - /// - /// @param[in] input The audio input handle - /// @param[in] callback the state changed callback called when the state of the handle is changed (#audio_in_state_changed_cb) - /// @param[in] user_data user data to be retrieved when callback is called - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// - /// @see audio_in_unset_state_changed_cb() - int audio_in_set_state_changed_cb( - audio_in_h input, - audio_in_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _audio_in_set_state_changed_cb( - input, - callback, - user_data, - ); - } - - late final _audio_in_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_in_h, audio_in_state_changed_cb, - ffi.Pointer)>>('audio_in_set_state_changed_cb'); - late final _audio_in_set_state_changed_cb = - _audio_in_set_state_changed_cbPtr.asFunction< - int Function( - audio_in_h, audio_in_state_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the state changed callback function of the audio input handle. - /// - /// @since_tizen 3.0 - /// - /// @param[in] input The handle to the audio input - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// - /// @see audio_in_set_state_changed_cb() - int audio_in_unset_state_changed_cb( - audio_in_h input, - ) { - return _audio_in_unset_state_changed_cb( - input, - ); - } - - late final _audio_in_unset_state_changed_cbPtr = - _lookup>( - 'audio_in_unset_state_changed_cb'); - late final _audio_in_unset_state_changed_cb = - _audio_in_unset_state_changed_cbPtr - .asFunction(); - - /// @deprecated Deprecated since 3.0. Use audio_out_create_new() instead. - /// @brief Creates an audio device instance and returns an output handle to play PCM (pulse-code modulation) data. - /// - /// @details This function is used for audio output initialization. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks @a output must be released by audio_out_destroy(). - /// - /// @param[in] sample_rate The audio sample rate in 8000[Hz] ~ 48000[Hz] - /// @param[in] channel The audio channel type (mono or stereo) - /// @param[in] type The type of audio sample (8-bit or 16-bit) - /// @param[in] sound_type The type of sound (#sound_type_e) - /// @param[out] output An audio output handle is created on success - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #AUDIO_IO_ERROR_DEVICE_NOT_OPENED Device not opened - /// @retval #AUDIO_IO_ERROR_SOUND_POLICY Sound policy error - /// - /// @see audio_out_destroy() - int audio_out_create( - int sample_rate, - int channel, - int type, - int sound_type, - ffi.Pointer output, - ) { - return _audio_out_create( - sample_rate, - channel, - type, - sound_type, - output, - ); - } - - late final _audio_out_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Int32, ffi.Int32, ffi.Int32, - ffi.Pointer)>>('audio_out_create'); - late final _audio_out_create = _audio_out_createPtr - .asFunction)>(); - - /// @brief Creates an audio device instance and returns an output handle to play PCM (pulse-code modulation) data. - /// - /// @details This function is used for audio output initialization. - /// - /// @since_tizen 3.0 - /// - /// @remarks @a output must be released by audio_out_destroy(). - /// It is recommended to call audio_out_set_sound_stream_info() after this API. - /// - /// @param[in] sample_rate The audio sample rate in 8000[Hz] ~ 48000[Hz] - /// @param[in] channel The audio channel type (mono or stereo) - /// @param[in] type The type of audio sample (8-bit or 16-bit) - /// @param[out] output An audio output handle is created on success - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #AUDIO_IO_ERROR_DEVICE_NOT_OPENED Device not opened - /// @retval #AUDIO_IO_ERROR_SOUND_POLICY Sound policy error - /// - /// @post The state will be #AUDIO_IO_STATE_IDLE.\n - /// audio_out_set_sound_stream_info() is recommended to be called after this API. - /// @see audio_out_destroy() - int audio_out_create_new( - int sample_rate, - int channel, - int type, - ffi.Pointer output, - ) { - return _audio_out_create_new( - sample_rate, - channel, - type, - output, - ); - } - - late final _audio_out_create_newPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Int32, ffi.Int32, - ffi.Pointer)>>('audio_out_create_new'); - late final _audio_out_create_new = _audio_out_create_newPtr - .asFunction)>(); - - /// @brief Releases the audio output handle, along with all its resources. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] output The handle to the audio output to destroy - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #AUDIO_IO_ERROR_DEVICE_NOT_CLOSED Device not closed - /// - /// @see audio_out_create() - int audio_out_destroy( - audio_out_h output, - ) { - return _audio_out_destroy( - output, - ); - } - - late final _audio_out_destroyPtr = - _lookup>( - 'audio_out_destroy'); - late final _audio_out_destroy = - _audio_out_destroyPtr.asFunction(); - - /// @brief Sets the sound stream information to the audio output. - /// - /// @since_tizen 3.0 - /// - /// @remarks @a the sound stream information includes audio routing and volume type. - /// For more details, you can refer to @ref CAPI_MEDIA_SOUND_MANAGER_MODULE - /// Voice Recognition and Loopback stream types are not supported in this API. - /// - /// @param[in] output The handle to the audio output - /// @param[in] stream_info The handle of stream information - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED_TYPE Not supported stream type - /// - /// @pre The state should be #AUDIO_IO_STATE_IDLE.\n - /// Call audio_out_create_new() before calling this function. - /// @post Call audio_out_prepare() after calling this function. - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - int audio_out_set_sound_stream_info( - audio_out_h output, - sound_stream_info_h stream_info, - ) { - return _audio_out_set_sound_stream_info( - output, - stream_info, - ); - } - - late final _audio_out_set_sound_stream_infoPtr = _lookup< - ffi - .NativeFunction>( - 'audio_out_set_sound_stream_info'); - late final _audio_out_set_sound_stream_info = - _audio_out_set_sound_stream_infoPtr - .asFunction(); - - /// @brief Prepares the audio output for playback, this must be called before audio_out_write(). - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] output The handle to the audio output - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @post The state will be #AUDIO_IO_STATE_RUNNING. - /// @see audio_out_unprepare() - int audio_out_prepare( - audio_out_h output, - ) { - return _audio_out_prepare( - output, - ); - } - - late final _audio_out_preparePtr = - _lookup>( - 'audio_out_prepare'); - late final _audio_out_prepare = - _audio_out_preparePtr.asFunction(); - - /// @brief Unprepares the audio output. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] output The handle to the audio output - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @post The state will be #AUDIO_IO_STATE_IDLE. - /// @see audio_out_prepare() - int audio_out_unprepare( - audio_out_h output, - ) { - return _audio_out_unprepare( - output, - ); - } - - late final _audio_out_unpreparePtr = - _lookup>( - 'audio_out_unprepare'); - late final _audio_out_unprepare = - _audio_out_unpreparePtr.asFunction(); - - /// @brief Pauses feeding of audio data to the device. - /// - /// @since_tizen 3.0 - /// - /// @param[in] output The handle to the audio output - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @pre The state should be #AUDIO_IO_STATE_RUNNING. - /// @post The state will be #AUDIO_IO_STATE_PAUSED. - /// @see audio_out_resume() - int audio_out_pause( - audio_out_h output, - ) { - return _audio_out_pause( - output, - ); - } - - late final _audio_out_pausePtr = - _lookup>( - 'audio_out_pause'); - late final _audio_out_pause = - _audio_out_pausePtr.asFunction(); - - /// @brief Resumes feeding of audio data to the device. - /// - /// @since_tizen 3.0 - /// - /// @param[in] output The handle to the audio output - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @pre The state should be #AUDIO_IO_STATE_PAUSED. - /// @post The state will be #AUDIO_IO_STATE_RUNNING. - /// @see audio_out_pause() - int audio_out_resume( - audio_out_h output, - ) { - return _audio_out_resume( - output, - ); - } - - late final _audio_out_resumePtr = - _lookup>( - 'audio_out_resume'); - late final _audio_out_resume = - _audio_out_resumePtr.asFunction(); - - /// @brief Drains buffered audio data from the output stream. - /// - /// @details This function waits until drains stream buffer completely. (e.g end of playback) - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] output The handle to the audio output - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @pre The state should be #AUDIO_IO_STATE_RUNNING or #AUDIO_IO_STATE_PAUSED. - /// @see audio_out_flush() - int audio_out_drain( - audio_out_h output, - ) { - return _audio_out_drain( - output, - ); - } - - late final _audio_out_drainPtr = - _lookup>( - 'audio_out_drain'); - late final _audio_out_drain = - _audio_out_drainPtr.asFunction(); - - /// @brief Flushes and discards buffered audio data from the output stream. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] output The handle to the audio output - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @pre The state should be #AUDIO_IO_STATE_RUNNING or #AUDIO_IO_STATE_PAUSED. - /// @see audio_out_drain() - int audio_out_flush( - audio_out_h output, - ) { - return _audio_out_flush( - output, - ); - } - - late final _audio_out_flushPtr = - _lookup>( - 'audio_out_flush'); - late final _audio_out_flush = - _audio_out_flushPtr.asFunction(); - - /// @brief Starts writing the audio data to the device. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] output The handle to the audio output - /// @param[in,out] buffer The PCM buffer address - /// @param[in] length The length of the PCM buffer (in bytes) - /// @return The written data size on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_BUFFER Invalid buffer pointer - /// @retval #AUDIO_IO_ERROR_SOUND_POLICY Sound policy error - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @pre The state should be #AUDIO_IO_STATE_RUNNING. - int audio_out_write( - audio_out_h output, - ffi.Pointer buffer, - int length, - ) { - return _audio_out_write( - output, - buffer, - length, - ); - } - - late final _audio_out_writePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_out_h, ffi.Pointer, - ffi.UnsignedInt)>>('audio_out_write'); - late final _audio_out_write = _audio_out_writePtr - .asFunction, int)>(); - - /// @brief Gets the size to be allocated for the audio output buffer. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] output The handle to the audio output - /// @param[out] size The suggested buffer size (in bytes, the maximum size is 1 MB) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see audio_out_write() - int audio_out_get_buffer_size( - audio_out_h output, - ffi.Pointer size, - ) { - return _audio_out_get_buffer_size( - output, - size, - ); - } - - late final _audio_out_get_buffer_sizePtr = _lookup< - ffi - .NativeFunction)>>( - 'audio_out_get_buffer_size'); - late final _audio_out_get_buffer_size = _audio_out_get_buffer_sizePtr - .asFunction)>(); - - /// @brief Gets the sample rate of the audio output data stream. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] output The handle to the audio output - /// @param[out] sample_rate The audio sample rate in Hertz (8000 ~ 48000) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - int audio_out_get_sample_rate( - audio_out_h output, - ffi.Pointer sample_rate, - ) { - return _audio_out_get_sample_rate( - output, - sample_rate, - ); - } - - late final _audio_out_get_sample_ratePtr = _lookup< - ffi - .NativeFunction)>>( - 'audio_out_get_sample_rate'); - late final _audio_out_get_sample_rate = _audio_out_get_sample_ratePtr - .asFunction)>(); - - /// @brief Gets the channel type of the audio output data stream. - /// - /// @details The audio channel type defines whether the audio is mono or stereo. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] output The handle to the audio output - /// @param[out] channel The audio channel type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - int audio_out_get_channel( - audio_out_h output, - ffi.Pointer channel, - ) { - return _audio_out_get_channel( - output, - channel, - ); - } - - late final _audio_out_get_channelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - audio_out_h, ffi.Pointer)>>('audio_out_get_channel'); - late final _audio_out_get_channel = _audio_out_get_channelPtr - .asFunction)>(); - - /// @brief Gets the sample audio format (8-bit or 16-bit) of the audio output data stream. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] output The handle to the audio output - /// @param[out] type The audio sample type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - int audio_out_get_sample_type( - audio_out_h output, - ffi.Pointer type, - ) { - return _audio_out_get_sample_type( - output, - type, - ); - } - - late final _audio_out_get_sample_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_out_h, - ffi.Pointer)>>('audio_out_get_sample_type'); - late final _audio_out_get_sample_type = _audio_out_get_sample_typePtr - .asFunction)>(); - - /// @brief Gets the sound type supported by the audio output device. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] output The handle to the audio output - /// @param[out] type The sound type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - int audio_out_get_sound_type( - audio_out_h output, - ffi.Pointer type, - ) { - return _audio_out_get_sound_type( - output, - type, - ); - } - - late final _audio_out_get_sound_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_out_h, - ffi.Pointer)>>('audio_out_get_sound_type'); - late final _audio_out_get_sound_type = _audio_out_get_sound_typePtr - .asFunction)>(); - - /// @deprecated Deprecated since 3.0. Use sound_manager_create_stream_information() instead. - /// @brief Registers a callback function to be invoked when the audio output handle is interrupted or the interrupt is completed. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] output The handle to the audio output - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_OPERATION Invalid operation - /// - /// @post audio_io_interrupted_cb() will be invoked. - /// @see audio_out_unset_interrupted_cb() - /// @see audio_io_interrupted_cb() - int audio_out_set_interrupted_cb( - audio_out_h output, - audio_io_interrupted_cb callback, - ffi.Pointer user_data, - ) { - return _audio_out_set_interrupted_cb( - output, - callback, - user_data, - ); - } - - late final _audio_out_set_interrupted_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_out_h, audio_io_interrupted_cb, - ffi.Pointer)>>('audio_out_set_interrupted_cb'); - late final _audio_out_set_interrupted_cb = - _audio_out_set_interrupted_cbPtr.asFunction< - int Function( - audio_out_h, audio_io_interrupted_cb, ffi.Pointer)>(); - - /// @deprecated Deprecated since 3.0 - /// @brief Unregisters the callback function. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] output The handle to the audio output - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see audio_out_set_interrupted_cb() - int audio_out_unset_interrupted_cb( - audio_out_h output, - ) { - return _audio_out_unset_interrupted_cb( - output, - ); - } - - late final _audio_out_unset_interrupted_cbPtr = - _lookup>( - 'audio_out_unset_interrupted_cb'); - late final _audio_out_unset_interrupted_cb = - _audio_out_unset_interrupted_cbPtr - .asFunction(); - - /// @deprecated Deprecated since 3.0 - /// @brief Ignores session for output. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] output The handle to the audio output - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_OPERATION Invalid operation - int audio_out_ignore_session( - audio_out_h output, - ) { - return _audio_out_ignore_session( - output, - ); - } - - late final _audio_out_ignore_sessionPtr = - _lookup>( - 'audio_out_ignore_session'); - late final _audio_out_ignore_session = - _audio_out_ignore_sessionPtr.asFunction(); - - /// @brief Sets an asynchronous(event) callback function to handle playing PCM (pulse-code modulation) data. - /// - /// @details @a callback will be called when you can write a PCM data. - /// It might cause dead lock if change the state of audio handle in callback. - /// (ex: audio_out_destroy, audio_out_prepare, audio_out_unprepare) - /// Recommend to use as a VOIP only. - /// Recommend not to hold callback too long.(it affects latency) - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks @a output must be created using audio_out_create(). - /// - /// @param[in] output An audio output handle - /// @param[in] callback notify stream callback when user can write data (#audio_out_stream_cb) - /// @param[in] user_data user data to be retrieved when callback is called - /// @return 0 on success, otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #AUDIO_IO_ERROR_DEVICE_NOT_OPENED Device not opened - /// @retval #AUDIO_IO_ERROR_SOUND_POLICY Sound policy error - /// - /// @see audio_out_unset_stream_cb() - int audio_out_set_stream_cb( - audio_out_h output, - audio_out_stream_cb callback, - ffi.Pointer user_data, - ) { - return _audio_out_set_stream_cb( - output, - callback, - user_data, - ); - } - - late final _audio_out_set_stream_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_out_h, audio_out_stream_cb, - ffi.Pointer)>>('audio_out_set_stream_cb'); - late final _audio_out_set_stream_cb = _audio_out_set_stream_cbPtr.asFunction< - int Function(audio_out_h, audio_out_stream_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] output The handle to the audio output - /// @return 0 on success, otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see audio_out_set_stream_cb() - int audio_out_unset_stream_cb( - audio_out_h output, - ) { - return _audio_out_unset_stream_cb( - output, - ); - } - - late final _audio_out_unset_stream_cbPtr = - _lookup>( - 'audio_out_unset_stream_cb'); - late final _audio_out_unset_stream_cb = - _audio_out_unset_stream_cbPtr.asFunction(); - - /// @brief Sets the state changed callback function to the audio output handle. - /// - /// @since_tizen 3.0 - /// - /// @remarks @a input must be created using audio_out_create_new(). - /// - /// @param[in] output The audio output handle - /// @param[in] callback the state changed callback called when the state of the handle is changed (#audio_out_state_changed_cb) - /// @param[in] user_data user data to be retrieved when callback is called - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see audio_out_unset_state_changed_cb() - int audio_out_set_state_changed_cb( - audio_out_h output, - audio_out_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _audio_out_set_state_changed_cb( - output, - callback, - user_data, - ); - } - - late final _audio_out_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_out_h, audio_out_state_changed_cb, - ffi.Pointer)>>('audio_out_set_state_changed_cb'); - late final _audio_out_set_state_changed_cb = - _audio_out_set_state_changed_cbPtr.asFunction< - int Function(audio_out_h, audio_out_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the state changed callback function of the audio output handle. - /// - /// @since_tizen 3.0 - /// - /// @param[in] output The handle to the audio output - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see audio_out_set_state_changed_cb() - int audio_out_unset_state_changed_cb( - audio_out_h output, - ) { - return _audio_out_unset_state_changed_cb( - output, - ); - } - - late final _audio_out_unset_state_changed_cbPtr = - _lookup>( - 'audio_out_unset_state_changed_cb'); - late final _audio_out_unset_state_changed_cb = - _audio_out_unset_state_changed_cbPtr - .asFunction(); - - /// @brief Creates a media format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @details It creates media format. and reference count will be set to 1 - /// For destroying media_format_h handle, use media_format_unref(). - /// @param[out] fmt allocated media_format_h - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_ref() - /// @see media_format_unref() - int media_format_create( - ffi.Pointer fmt, - ) { - return _media_format_create( - fmt, - ); - } - - late final _media_format_createPtr = _lookup< - ffi.NativeFunction)>>( - 'media_format_create'); - late final _media_format_create = _media_format_createPtr - .asFunction)>(); - - /// @brief Gets format type of media format. - /// @since_tizen 3.0 - /// @param[in] fmt The media_format_h to get format type - /// @param[out] formattype The media_format_type_e, ex) MEDIA_FORMAT_AUDIO - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - int media_format_get_type( - media_format_h fmt, - ffi.Pointer formattype, - ) { - return _media_format_get_type( - fmt, - formattype, - ); - } - - late final _media_format_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_format_h, - ffi.Pointer)>>('media_format_get_type'); - late final _media_format_get_type = _media_format_get_typePtr - .asFunction)>(); - - /// @brief Gets container MIME type of media format. - /// @since_tizen 3.0 - /// @param[in] fmt The media_format_h to get container mime type - /// @param[out] mimetype The media_format_mimetype_e, ex) MEDIA_FORMAT_CONTAINER_MP4 - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_set_container_mime() - int media_format_get_container_mime( - media_format_h fmt, - ffi.Pointer mimetype, - ) { - return _media_format_get_container_mime( - fmt, - mimetype, - ); - } - - late final _media_format_get_container_mimePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_format_h, - ffi.Pointer)>>('media_format_get_container_mime'); - late final _media_format_get_container_mime = - _media_format_get_container_mimePtr - .asFunction)>(); - - /// @brief Gets text track information of media format. - /// @since_tizen 3.0 - /// @param[in] fmt The media_format_h to get text information - /// @param[out] mimetype The media_format_mimetype_e, ex) MEDIA_FORMAT_TEXT_MP4 - /// @param[out] type The media_format_text_type_e - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_set_text_mime() - int media_format_get_text_info( - media_format_h fmt, - ffi.Pointer mimetype, - ffi.Pointer type, - ) { - return _media_format_get_text_info( - fmt, - mimetype, - type, - ); - } - - late final _media_format_get_text_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_format_h, ffi.Pointer, - ffi.Pointer)>>('media_format_get_text_info'); - late final _media_format_get_text_info = - _media_format_get_text_infoPtr.asFunction< - int Function(media_format_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets video information of media format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @details returns mimetype, width, height, average bps, max bps of this media format. - /// @param[in] fmt media_format_h to get video information - /// @param[out] mimetype media_format_mimetype_e , ex) MEDIA_FORMAT_H264_HP - /// @param[out] width width of the video - /// @param[out] height height of the video - /// @param[out] avg_bps average bps of the video - /// @param[out] max_bps max bps of the video - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_set_video_mime() - /// @see media_format_set_video_width() - /// @see media_format_set_video_height() - /// @see media_format_set_video_avg_bps() - /// @see media_format_set_video_max_bps() - int media_format_get_video_info( - media_format_h fmt, - ffi.Pointer mimetype, - ffi.Pointer width, - ffi.Pointer height, - ffi.Pointer avg_bps, - ffi.Pointer max_bps, - ) { - return _media_format_get_video_info( - fmt, - mimetype, - width, - height, - avg_bps, - max_bps, - ); - } - - late final _media_format_get_video_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_format_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('media_format_get_video_info'); - late final _media_format_get_video_info = - _media_format_get_video_infoPtr.asFunction< - int Function( - media_format_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets audio information of media format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @details returns mimetype, channels, height, samplerate bps, max bps of this media format. - /// @param[in] fmt media_format_h to get audio information - /// @param[out] mimetype media_format_mimetype_e , ex) MEDIA_FORMAT_PCM - /// @param[out] channel channel of the audio - /// @param[out] samplerate sampling rate of the audio - /// @param[out] bit bit resolution of the audio - /// @param[out] avg_bps average bps of the audio - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_set_audio_mime() - /// @see media_format_set_audio_channel() - /// @see media_format_set_audio_samplerate() - /// @see media_format_set_audio_bit() - /// @see media_format_set_audio_avg_bps() - int media_format_get_audio_info( - media_format_h fmt, - ffi.Pointer mimetype, - ffi.Pointer channel, - ffi.Pointer samplerate, - ffi.Pointer bit, - ffi.Pointer avg_bps, - ) { - return _media_format_get_audio_info( - fmt, - mimetype, - channel, - samplerate, - bit, - avg_bps, - ); - } - - late final _media_format_get_audio_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_format_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('media_format_get_audio_info'); - late final _media_format_get_audio_info = - _media_format_get_audio_infoPtr.asFunction< - int Function( - media_format_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets audio aac type of media format. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] fmt media_format_h to get audio information - /// @param[out] is_adts AAC ADTS flag of the audio - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_set_audio_aac_type() - int media_format_get_audio_aac_type( - media_format_h fmt, - ffi.Pointer is_adts, - ) { - return _media_format_get_audio_aac_type( - fmt, - is_adts, - ); - } - - late final _media_format_get_audio_aac_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_format_h, - ffi.Pointer)>>('media_format_get_audio_aac_type'); - late final _media_format_get_audio_aac_type = - _media_format_get_audio_aac_typePtr - .asFunction)>(); - - /// @brief Gets audio aac header type of media format. - /// @since_tizen 3.0 - /// @param[in] fmt The media_format_h to get audio information - /// @param[out] aac_header_type The media_format_aac_header_type_e, ex) MEDIA_FORMAT_AAC_HEADER_ADTS - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_set_audio_aac_header_type() - int media_format_get_audio_aac_header_type( - media_format_h fmt, - ffi.Pointer aac_header_type, - ) { - return _media_format_get_audio_aac_header_type( - fmt, - aac_header_type, - ); - } - - late final _media_format_get_audio_aac_header_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_format_h, ffi.Pointer)>>( - 'media_format_get_audio_aac_header_type'); - late final _media_format_get_audio_aac_header_type = - _media_format_get_audio_aac_header_typePtr - .asFunction)>(); - - /// @brief Gets video frame rate of media format. - /// @since_tizen 3.0 - /// @param[in] fmt The media_format_h to get - /// @param[out] frame_rate The video frame rate - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - int media_format_get_video_frame_rate( - media_format_h fmt, - ffi.Pointer frame_rate, - ) { - return _media_format_get_video_frame_rate( - fmt, - frame_rate, - ); - } - - late final _media_format_get_video_frame_ratePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_format_h, - ffi.Pointer)>>('media_format_get_video_frame_rate'); - late final _media_format_get_video_frame_rate = - _media_format_get_video_frame_ratePtr - .asFunction)>(); - - /// @brief Sets container MIME type of media format. - /// @since_tizen 3.0 - /// @param[in] fmt The media_format_h to set - /// @param[in] mimetype The media_format_mimetype_e, ex) MEDIA_FORMAT_MP4 - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_container_mime() - int media_format_set_container_mime( - media_format_h fmt, - int mimetype, - ) { - return _media_format_set_container_mime( - fmt, - mimetype, - ); - } - - late final _media_format_set_container_mimePtr = - _lookup>( - 'media_format_set_container_mime'); - late final _media_format_set_container_mime = - _media_format_set_container_mimePtr - .asFunction(); - - /// @brief Sets text MIME type of media format. - /// @since_tizen 3.0 - /// @param[in] fmt The media_format_h to set - /// @param[in] mimetype The media_format_mimetype_e, ex) MEDIA_FORMAT_TEXT* - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_text_info() - int media_format_set_text_mime( - media_format_h fmt, - int mimetype, - ) { - return _media_format_set_text_mime( - fmt, - mimetype, - ); - } - - late final _media_format_set_text_mimePtr = - _lookup>( - 'media_format_set_text_mime'); - late final _media_format_set_text_mime = _media_format_set_text_mimePtr - .asFunction(); - - /// @brief Sets text type of media format. - /// @since_tizen 3.0 - /// @param[in] fmt The media_format_h to set - /// @param[in] type The text type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_text_info() - int media_format_set_text_type( - media_format_h fmt, - int type, - ) { - return _media_format_set_text_type( - fmt, - type, - ); - } - - late final _media_format_set_text_typePtr = - _lookup>( - 'media_format_set_text_type'); - late final _media_format_set_text_type = _media_format_set_text_typePtr - .asFunction(); - - /// @brief Sets video MIME type of media format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] fmt media_format_h to set - /// @param[in] mimetype media_format_mimetype_e , ex) MEDIA_FORMAT_H264_HP - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_video() - int media_format_set_video_mime( - media_format_h fmt, - int mimetype, - ) { - return _media_format_set_video_mime( - fmt, - mimetype, - ); - } - - late final _media_format_set_video_mimePtr = - _lookup>( - 'media_format_set_video_mime'); - late final _media_format_set_video_mime = _media_format_set_video_mimePtr - .asFunction(); - - /// @brief Sets video width of media format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] fmt media_format_h to set - /// @param[in] width width of the video - /// @pre must set video MIME type by media_format_set_video_mime() - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_video() - int media_format_set_video_width( - media_format_h fmt, - int width, - ) { - return _media_format_set_video_width( - fmt, - width, - ); - } - - late final _media_format_set_video_widthPtr = - _lookup>( - 'media_format_set_video_width'); - late final _media_format_set_video_width = _media_format_set_video_widthPtr - .asFunction(); - - /// @brief Sets video height of media format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] fmt media_format_h to set - /// @param[in] height height of the video - /// @pre must set video MIME type by media_format_set_video_mime() - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_video() - int media_format_set_video_height( - media_format_h fmt, - int height, - ) { - return _media_format_set_video_height( - fmt, - height, - ); - } - - late final _media_format_set_video_heightPtr = - _lookup>( - 'media_format_set_video_height'); - late final _media_format_set_video_height = _media_format_set_video_heightPtr - .asFunction(); - - /// @brief Sets video avg_bps of media format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] fmt media_format_h to set - /// @param[in] avg_bps average bps of the video - /// @pre must set video MIME type by media_format_set_video_mime() - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_video() - int media_format_set_video_avg_bps( - media_format_h fmt, - int avg_bps, - ) { - return _media_format_set_video_avg_bps( - fmt, - avg_bps, - ); - } - - late final _media_format_set_video_avg_bpsPtr = - _lookup>( - 'media_format_set_video_avg_bps'); - late final _media_format_set_video_avg_bps = - _media_format_set_video_avg_bpsPtr - .asFunction(); - - /// @brief Sets video max_bps of media format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] fmt media_format_h to set - /// @param[in] max_bps max bps of the video - /// @pre must set video MIME type by media_format_set_video_mime() - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_video() - int media_format_set_video_max_bps( - media_format_h fmt, - int max_bps, - ) { - return _media_format_set_video_max_bps( - fmt, - max_bps, - ); - } - - late final _media_format_set_video_max_bpsPtr = - _lookup>( - 'media_format_set_video_max_bps'); - late final _media_format_set_video_max_bps = - _media_format_set_video_max_bpsPtr - .asFunction(); - - /// @brief Sets video frame rate of media format. - /// @since_tizen 3.0 - /// @param[in] fmt The media_format_h to set - /// @param[in] frame_rate The video frame rate - /// @pre must set video MIME type by media_format_set_video_mime() - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - int media_format_set_video_frame_rate( - media_format_h fmt, - int frame_rate, - ) { - return _media_format_set_video_frame_rate( - fmt, - frame_rate, - ); - } - - late final _media_format_set_video_frame_ratePtr = - _lookup>( - 'media_format_set_video_frame_rate'); - late final _media_format_set_video_frame_rate = - _media_format_set_video_frame_ratePtr - .asFunction(); - - /// @brief Sets audio MIME type of media format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] fmt media_format_h to set audio information - /// @param[in] mimetype media_format_mimetype_e , ex) MEDIA_FORMAT_PCM - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_audio() - int media_format_set_audio_mime( - media_format_h fmt, - int mimetype, - ) { - return _media_format_set_audio_mime( - fmt, - mimetype, - ); - } - - late final _media_format_set_audio_mimePtr = - _lookup>( - 'media_format_set_audio_mime'); - late final _media_format_set_audio_mime = _media_format_set_audio_mimePtr - .asFunction(); - - /// @brief Sets audio channel of media format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] fmt media_format_h to set audio information - /// @param[in] channel channel of the audio - /// @pre must set audio MIME type by media_format_set_audio_mime() - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_audio() - int media_format_set_audio_channel( - media_format_h fmt, - int channel, - ) { - return _media_format_set_audio_channel( - fmt, - channel, - ); - } - - late final _media_format_set_audio_channelPtr = - _lookup>( - 'media_format_set_audio_channel'); - late final _media_format_set_audio_channel = - _media_format_set_audio_channelPtr - .asFunction(); - - /// @brief Sets audio samplerate of media format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] fmt media_format_h to set - /// @param[in] samplerate sampling rate of the audio - /// @pre must set audio MIME type by media_format_set_audio_mime() - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_audio() - int media_format_set_audio_samplerate( - media_format_h fmt, - int samplerate, - ) { - return _media_format_set_audio_samplerate( - fmt, - samplerate, - ); - } - - late final _media_format_set_audio_sampleratePtr = - _lookup>( - 'media_format_set_audio_samplerate'); - late final _media_format_set_audio_samplerate = - _media_format_set_audio_sampleratePtr - .asFunction(); - - /// @brief Sets audio bit of media format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @details Sets audio bit resolution of this media format - /// @param[in] fmt media_format_h to set - /// @param[in] bit bit of the audio - /// @pre must set audio MIME type by media_format_set_audio_mime() - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_audio() - int media_format_set_audio_bit( - media_format_h fmt, - int bit, - ) { - return _media_format_set_audio_bit( - fmt, - bit, - ); - } - - late final _media_format_set_audio_bitPtr = - _lookup>( - 'media_format_set_audio_bit'); - late final _media_format_set_audio_bit = _media_format_set_audio_bitPtr - .asFunction(); - - /// @brief Sets audio avg_bps of media format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] fmt media_format_h to set - /// @param[in] avg_bps avg_bps of the audio - /// @pre must set audio MIME type by media_format_set_audio_mime() - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_audio() - int media_format_set_audio_avg_bps( - media_format_h fmt, - int avg_bps, - ) { - return _media_format_set_audio_avg_bps( - fmt, - avg_bps, - ); - } - - late final _media_format_set_audio_avg_bpsPtr = - _lookup>( - 'media_format_set_audio_avg_bps'); - late final _media_format_set_audio_avg_bps = - _media_format_set_audio_avg_bpsPtr - .asFunction(); - - /// @brief Sets audio aac type of media format. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @details Sets audio aac data type of this media format - /// @param[in] fmt media_format_h to set - /// @param[in] is_adts aac adts flag of the audio - /// @pre must set audio MIME type by media_format_set_audio_mime() - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_audio_aac_type() - int media_format_set_audio_aac_type( - media_format_h fmt, - bool is_adts, - ) { - return _media_format_set_audio_aac_type( - fmt, - is_adts, - ); - } - - late final _media_format_set_audio_aac_typePtr = - _lookup>( - 'media_format_set_audio_aac_type'); - late final _media_format_set_audio_aac_type = - _media_format_set_audio_aac_typePtr - .asFunction(); - - /// @brief Sets audio aac header type of media format. - /// @since_tizen 3.0 - /// @param[in] fmt The media_format_h to get audio information - /// @param[in] aac_header_type The media_format_aac_header_type_e, ex) MEDIA_FORMAT_AAC_HEADER_ADTS - /// @pre must set audio MIME type by media_format_set_audio_mime() - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_audio_aac_header_type() - int media_format_set_audio_aac_header_type( - media_format_h fmt, - int aac_header_type, - ) { - return _media_format_set_audio_aac_header_type( - fmt, - aac_header_type, - ); - } - - late final _media_format_set_audio_aac_header_typePtr = - _lookup>( - 'media_format_set_audio_aac_header_type'); - late final _media_format_set_audio_aac_header_type = - _media_format_set_audio_aac_header_typePtr - .asFunction(); - - /// @brief Increase reference count of media_format_h object. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @details increase ref_count of media_format_h - /// @param[in] fmt exist media_format_h - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_unref() - int media_format_ref( - media_format_h fmt, - ) { - return _media_format_ref( - fmt, - ); - } - - late final _media_format_refPtr = - _lookup>( - 'media_format_ref'); - late final _media_format_ref = - _media_format_refPtr.asFunction(); - - /// @brief Decrease reference count of media_format_h object. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] fmt exist media_format_h - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_ref() - int media_format_unref( - media_format_h fmt, - ) { - return _media_format_unref( - fmt, - ); - } - - late final _media_format_unrefPtr = - _lookup>( - 'media_format_unref'); - late final _media_format_unref = - _media_format_unrefPtr.asFunction(); - - /// @brief Check whether the media_format_h is writable or not. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] fmt exist media_format_h - /// @param[out] is_writable if ref_count is 1, return true. if not, return false - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - int media_format_is_writable( - media_format_h fmt, - ffi.Pointer is_writable, - ) { - return _media_format_is_writable( - fmt, - is_writable, - ); - } - - late final _media_format_is_writablePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_format_h, - ffi.Pointer)>>('media_format_is_writable'); - late final _media_format_is_writable = _media_format_is_writablePtr - .asFunction)>(); - - /// @brief Returns a writable copy of media_format_h. - /// @details If there is only one reference count on fmt, the caller must be the owner, - /// and so this function will return the object unchanged. - /// while, if there is more than one reference count on the object, a new object will be returned. - /// The caller will own a reference to the returned object. - /// In a nutshell, this function unrefs the fmt and refs the out_fmt returned. - /// Don't access fmt after calling this function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If a new object is returned, it will not have its own copy of extra data. - /// The new object's extra data object will be the original object's extra data. - /// @param[in] fmt exist media_format_h , don't access it after calling this function - /// @param[out] out_fmt new copied media_format_h, the caller is owner of this object - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - int media_format_make_writable( - media_format_h fmt, - ffi.Pointer out_fmt, - ) { - return _media_format_make_writable( - fmt, - out_fmt, - ); - } - - late final _media_format_make_writablePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_format_h, - ffi.Pointer)>>('media_format_make_writable'); - late final _media_format_make_writable = _media_format_make_writablePtr - .asFunction)>(); - - /// @brief Sets extra data of media format. - /// @details The user can set data that media format does not support. - /// @since_tizen 4.0 - /// @remarks The application is responsible for freeing @a extra_data. - /// For description of extra data behavior upon making an object writable, - /// see the description of media_format_make_writable(). - /// @param[in] fmt The media format handle - /// @param[in] extra_data The extra data to set - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @see media_format_get_extra() - int media_format_set_extra( - media_format_h fmt, - ffi.Pointer extra_data, - ) { - return _media_format_set_extra( - fmt, - extra_data, - ); - } - - late final _media_format_set_extraPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_format_h, - ffi.Pointer)>>('media_format_set_extra'); - late final _media_format_set_extra = _media_format_set_extraPtr - .asFunction)>(); - - /// @brief Gets extra data of media format. - /// @details The user can get extra data which user sets value via media_format_set_extra(). - /// @since_tizen 4.0 - /// @remarks The application is responsible for freeing @a extra_data. - /// For description of extra data behavior upon making an object writable, - /// see the description of media_format_make_writable(). - /// @param[in] fmt The media format handle - /// @param[out] extra_data The extra data to get - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @see media_format_set_extra() - int media_format_get_extra( - media_format_h fmt, - ffi.Pointer> extra_data, - ) { - return _media_format_get_extra( - fmt, - extra_data, - ); - } - - late final _media_format_get_extraPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_format_h, - ffi.Pointer>)>>('media_format_get_extra'); - late final _media_format_get_extra = _media_format_get_extraPtr.asFunction< - int Function(media_format_h, ffi.Pointer>)>(); - - /// @brief Queries surface format list and number of format supported by the system. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release the formats using free(). - /// - /// @param[out] formats The format array which the system can support \n - /// This pointer has to be freed by user. - /// @param[out] num The number of formats - /// - /// @return #TBM_SURFACE_ERROR_NONE if this function succeeds, - /// otherwise an error status value - /// - /// @retval #TBM_SURFACE_ERROR_NONE Success - /// @retval #TBM_SURFACE_ERROR_INVALID_OPERATION Invalid operation - /// - /// @par Example - /// @code - /// #include - /// - /// uint32_t *formats; - /// uint32_t format_num; - /// int ret, i; - /// tbm_surface_error_e tse; - /// - /// tse = tbm_surface_query_formats (&formats, &format_num)) - /// - /// for( i = 0 ; i < format_num ; i++) - /// { - /// if (formats[i] == TBM_FORMAT_RGB332) - /// { - /// .... - /// - /// free (formats); - /// @endcode - int tbm_surface_query_formats( - ffi.Pointer> formats, - ffi.Pointer num, - ) { - return _tbm_surface_query_formats( - formats, - num, - ); - } - - late final _tbm_surface_query_formatsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, - ffi.Pointer)>>('tbm_surface_query_formats'); - late final _tbm_surface_query_formats = - _tbm_surface_query_formatsPtr.asFunction< - int Function( - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Creates the tbm_surface. - /// @details This function creates the tbm_surface with the given width, height, and format. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remark The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// - /// @param[in] width The width of surface - /// @param[in] height The height of surface - /// @param[in] format The format of surface - /// - /// @return #tbm_surface_h on success, - /// otherwise @c NULL - /// - /// @retval #tbm_surface_h The TBM surface handle - /// - /// @exception #TBM_SURFACE_ERROR_NONE Success - /// @exception #TBM_SURFACE_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #TBM_SURFACE_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see tbm_surface_destroy() - /// - /// @par Example - /// @code - /// #include - /// - /// tbm_surface_h surface; - /// - /// surface = tbm_surface_create (128, 128, TBM_FORMAT_RGB332); - /// - /// ... - /// - /// tbm_surface_destroy (surface); - /// @endcode - tbm_surface_h tbm_surface_create( - int width, - int height, - int format, - ) { - return _tbm_surface_create( - width, - height, - format, - ); - } - - late final _tbm_surface_createPtr = _lookup< - ffi.NativeFunction< - tbm_surface_h Function( - ffi.Int, ffi.Int, tbm_format)>>('tbm_surface_create'); - late final _tbm_surface_create = _tbm_surface_createPtr - .asFunction(); - - /// @brief Destroys the tbm_surface. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] surface The #tbm_surface_h - /// - /// @return #TBM_SURFACE_ERROR_NONE on success, - /// otherwise an error status value - /// - /// @retval #TBM_SURFACE_ERROR_NONE Success - /// @retval #TBM_SURFACE_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see tbm_surface_create() - /// - /// @par Example - /// @code - /// #include - /// - /// tbm_surface_h surface; - /// - /// surface = tbm_surface_create (128, 128, TBM_FORMAT_RGB332); - /// - /// ... - /// - /// tbm_surface_destroy (surface); - /// @endcode - int tbm_surface_destroy( - tbm_surface_h surface, - ) { - return _tbm_surface_destroy( - surface, - ); - } - - late final _tbm_surface_destroyPtr = - _lookup>( - 'tbm_surface_destroy'); - late final _tbm_surface_destroy = - _tbm_surface_destroyPtr.asFunction(); - - /// @brief Maps the tbm_surface according to the access option. - /// @details After mapping tbm_surface, the information of tbm_surface is assigned in #tbm_surface_info_s struct. \n - /// The information of tbm_surface has width, height, format, bpp, size, number of planes and information of planes. \n - /// The information of planes has stride, offset, size and pointer of plane. \n - /// #TBM_SURF_OPTION_READ indicates access option to read. \n - /// #TBM_SURF_OPTION_WRITE indicates access option to write. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] surface The #tbm_surface_h - /// @param[in] opt The option to access the tbm_surface - /// @param[out] info The information of the tbm_surface - /// - /// @return #TBM_SURFACE_ERROR_NONE on success, - /// otherwise an error status value - /// - /// @retval #TBM_SURFACE_ERROR_NONE Success - /// @retval #TBM_SURFACE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TBM_SURFACE_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see tbm_surface_unmap(); - /// - /// @par Example - /// @code - /// #include - /// - /// tbm_surface_h surface; - /// tbm_surface_info_s info; - /// int ret; - /// - /// surface = tbm_surface_create (128, 128, TBM_FORMAT_RGB332); - /// ret = tbm_surface_map (surface, TBM_SURF_OPTION_WRITE|TBM_SURF_OPTION_READ, &info); - /// - /// ... - /// - /// tbm_surface_unmap (surface); - /// tbm_surface_destroy (surface); - /// @endcode - int tbm_surface_map( - tbm_surface_h surface, - int opt, - ffi.Pointer info, - ) { - return _tbm_surface_map( - surface, - opt, - info, - ); - } - - late final _tbm_surface_mapPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tbm_surface_h, ffi.Int, - ffi.Pointer)>>('tbm_surface_map'); - late final _tbm_surface_map = _tbm_surface_mapPtr.asFunction< - int Function(tbm_surface_h, int, ffi.Pointer)>(); - - /// @brief Unmaps the tbm_surface. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] surface The #tbm_surface_h - /// - /// @return #TBM_SURFACE_ERROR_NONE on success, - /// otherwise an error status value - /// - /// @retval #TBM_SURFACE_ERROR_NONE Success - /// @retval #TBM_SURFACE_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see tbm_surface_map() - /// - /// @par Example - /// @code - /// #include - /// - /// tbm_surface_h surface; - /// tbm_surface_info_s info; - /// int ret; - /// - /// surface = tbm_surface_create (128, 128, TBM_FORMAT_RGB332); - /// ret = tbm_surface_map (surface, TBM_SURF_OPTION_WRITE|TBM_SURF_OPTION_READ, &info); - /// - /// ... - /// - /// tbm_surface_unmap (surface); - /// tbm_surface_destroy (surface); - /// @endcode - int tbm_surface_unmap( - tbm_surface_h surface, - ) { - return _tbm_surface_unmap( - surface, - ); - } - - late final _tbm_surface_unmapPtr = - _lookup>( - 'tbm_surface_unmap'); - late final _tbm_surface_unmap = - _tbm_surface_unmapPtr.asFunction(); - - /// @brief Gets the information of the tbm_surface. - /// @details The information of tbm_surface is assigned in #tbm_surface_info_s struct. \n - /// The information of tbm_surface has width, height, format, bpp, size, number of planes and information of planes. \n - /// The information of planes has stride, offset, size and pointer of plane. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] surface The #tbm_surface_h - /// @param[out] info The information of the tbm_surface - /// - /// @return #TBM_SURFACE_ERROR_NONE on success, - /// otherwise an error status value - /// - /// @retval #TBM_SURFACE_ERROR_NONE Success - /// @retval #TBM_SURFACE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TBM_SURFACE_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see tbm_surface_map() - /// - /// @par Example - /// @code - /// #include - /// - /// tbm_surface_h surface; - /// tbm_surface_info_s info; - /// int ret; - /// - /// surface = tbm_surface_create (128, 128, TBM_FORMAT_RGB332); - /// ret = tbm_surface_get_info (surface, &info); - /// - /// ... - /// - /// tbm_surface_destroy (surface); - /// @endcode - int tbm_surface_get_info( - tbm_surface_h surface, - ffi.Pointer info, - ) { - return _tbm_surface_get_info( - surface, - info, - ); - } - - late final _tbm_surface_get_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tbm_surface_h, - ffi.Pointer)>>('tbm_surface_get_info'); - late final _tbm_surface_get_info = _tbm_surface_get_infoPtr.asFunction< - int Function(tbm_surface_h, ffi.Pointer)>(); - - /// @brief Gets the width of the tbm_surface. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] surface The #tbm_surface_h - /// - /// @return The width of the tbm_surface on success, - /// otherwise an error status value - /// - /// @retval #TBM_SURFACE_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @par Example - /// @code - /// #include - /// - /// tbm_surface_h surface; - /// int width; - /// - /// surface = tbm_surface_create (128, 128, TBM_FORMAT_RGB332); - /// - /// ... - /// - /// width = tbm_surface_get_width (surface); - /// - /// ... - /// - /// tbm_surface_destroy (surface); - /// @endcode - int tbm_surface_get_width( - tbm_surface_h surface, - ) { - return _tbm_surface_get_width( - surface, - ); - } - - late final _tbm_surface_get_widthPtr = - _lookup>( - 'tbm_surface_get_width'); - late final _tbm_surface_get_width = - _tbm_surface_get_widthPtr.asFunction(); - - /// @brief Gets the height of the tbm_surface. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] surface The #tbm_surface_h - /// - /// @return The height of the tbm_surface if this function succeeds, - /// otherwise an error status value - /// - /// @retval #TBM_SURFACE_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @par Example - /// @code - /// #include - /// - /// tbm_surface_h surface; - /// int height; - /// - /// surface = tbm_surface_create (128, 128, TBM_FORMAT_RGB332); - /// - /// ... - /// - /// height = tbm_surface_get_height (surface); - /// - /// ... - /// - /// tbm_surface_destroy (surface); - /// @endcode - int tbm_surface_get_height( - tbm_surface_h surface, - ) { - return _tbm_surface_get_height( - surface, - ); - } - - late final _tbm_surface_get_heightPtr = - _lookup>( - 'tbm_surface_get_height'); - late final _tbm_surface_get_height = - _tbm_surface_get_heightPtr.asFunction(); - - /// @brief Gets the format of the tbm_surface. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remark The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// - /// @param[in] surface The #tbm_surface_h - /// - /// @return The format of the tbm_surface on success, - /// otherwise @c 0 on failure - /// - /// @retval #tbm_format The format of surface - /// - /// @exception #TBM_SURFACE_ERROR_NONE Success - /// @exception #TBM_SURFACE_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @par Example - /// @code - /// #include - /// - /// tbm_surface_s surface; - /// tbm_format format; - /// - /// surface = tbm_surface_create (128, 128, TBM_FORMAT_RGB332); - /// - /// ... - /// - /// format = tbm_surface_get_format (surface); - /// - /// ... - /// - /// tbm_surface_destroy (surface); - /// @endcode - int tbm_surface_get_format( - tbm_surface_h surface, - ) { - return _tbm_surface_get_format( - surface, - ); - } - - late final _tbm_surface_get_formatPtr = - _lookup>( - 'tbm_surface_get_format'); - late final _tbm_surface_get_format = - _tbm_surface_get_formatPtr.asFunction(); - - /// @brief Creates a media packet handle and allocates buffer. - /// @details The buffer will be allocated to heap or tbm_surface. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @c packet must be released by using media_packet_destroy(). - /// @param[in] fmt The allocated #media_format_h by caller - /// @param[in] fcb The media_packet_finalize_cb() to register - /// @param[in] fcb_data The user data to be passed to the media_packet_finalize_cb() function - /// @param[out] packet A new handle for media packet - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre Must have media_format_h instance by media_format_create() - /// @post Must do media_format_unref() - /// - /// @see media_packet_destroy() - /// @see media_packet_finalize_cb() - /// @see media_format_unref() - /// @par Example - /// @code - /// #include - /// - /// { - /// media_format_h fmt; - /// media_packet_h packet; - /// - /// media_format_create(&fmt); - /// media_format_set_video_mime(fmt, MEDIA_FORMAT_H264_HP); - /// media_format_set_video_width(fmt, 640); - /// media_format_set_video_height(fmt, 480); - /// media_format_set_video_avg_bps(fmt, 10000000); - /// media_format_set_video_max_bps(fmt, 15000000); - /// - /// media_packet_create_alloc (fmt, _finalize_callback, fcb_data, &packet); - /// media_format_unref(fmt); - /// - /// ... - /// media_packet_destroy(packet); - /// } - /// - /// int _finalize_callback(media_packet_h packet, int err, void* userdata) - /// { - /// ... - /// return MEDIA_PACKET_FINALIZE; - /// } - /// - /// @endcode - int media_packet_create_alloc( - media_format_h fmt, - media_packet_finalize_cb fcb, - ffi.Pointer fcb_data, - ffi.Pointer packet, - ) { - return _media_packet_create_alloc( - fmt, - fcb, - fcb_data, - packet, - ); - } - - late final _media_packet_create_allocPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_format_h, - media_packet_finalize_cb, - ffi.Pointer, - ffi.Pointer)>>('media_packet_create_alloc'); - late final _media_packet_create_alloc = - _media_packet_create_allocPtr.asFunction< - int Function(media_format_h, media_packet_finalize_cb, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Creates a media packet handle. - /// @details It creates only media packet handle without allocated buffer. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @c packet must be released by using media_packet_destroy(). - /// @param[in] fmt The allocated #media_format_h by caller - /// @param[in] fcb The media_packet_finalize_cb() to register - /// @param[in] fcb_data The user data to be passed to the media_packet_finalize_cb() function - /// @param[out] packet A new handle for media packet - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre Must have media_format_h instance by media_format_create() - /// @post Must do media_format_unref() - /// - /// @see media_packet_destroy() - /// @see media_packet_finalize_cb() - /// @see media_format_unref() - /// @par Example - /// @code - /// #include - /// - /// { - /// media_format_h fmt; - /// media_packet_h packet; - /// - /// media_format_create(&fmt); - /// media_format_set_video_mime(fmt, MEDIA_FORMAT_H264_HP); - /// media_format_set_video_width(fmt, 640); - /// media_format_set_video_height(fmt, 480); - /// media_format_set_video_avg_bps(fmt, 10000000); - /// media_format_set_video_max_bps(fmt, 15000000); - /// - /// media_packet_create (fmt, _finalize_callback, fcb_data, &packet); - /// media_format_unref(fmt); - /// - /// ... - /// media_packet_destroy(packet); - /// } - /// - /// int _finalize_callback(media_packet_h packet, int err, void* userdata) - /// { - /// ... - /// return MEDIA_PACKET_FINALIZE; - /// } - /// - /// @endcode - int media_packet_create( - media_format_h fmt, - media_packet_finalize_cb fcb, - ffi.Pointer fcb_data, - ffi.Pointer packet, - ) { - return _media_packet_create( - fmt, - fcb, - fcb_data, - packet, - ); - } - - late final _media_packet_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_format_h, - media_packet_finalize_cb, - ffi.Pointer, - ffi.Pointer)>>('media_packet_create'); - late final _media_packet_create = _media_packet_createPtr.asFunction< - int Function(media_format_h, media_packet_finalize_cb, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Copies a media packet handle. - /// @details It re-creates only media packet handle with exist media packet handle. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @c new_packet must be released by using media_packet_destroy(). - /// @param[in] org_packet The existing media packet handle - /// @param[in] fcb The media_packet_finalize_cb() to register - /// @param[in] fcb_data The user data to be passed to the media_packet_finalize_cb() function - /// @param[out] new_packet A new handle for media packet - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see media_packet_destroy() - /// @see media_packet_finalize_cb() - int media_packet_copy( - media_packet_h org_packet, - media_packet_finalize_cb fcb, - ffi.Pointer fcb_data, - ffi.Pointer new_packet, - ) { - return _media_packet_copy( - org_packet, - fcb, - fcb_data, - new_packet, - ); - } - - late final _media_packet_copyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_packet_h, - media_packet_finalize_cb, - ffi.Pointer, - ffi.Pointer)>>('media_packet_copy'); - late final _media_packet_copy = _media_packet_copyPtr.asFunction< - int Function(media_packet_h, media_packet_finalize_cb, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Allocates buffer with media packet handle. - /// @details Before using media_packet_alloc(), media packet handle must be exist. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The existing media packet handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see media_packet_create() - /// @see media_packet_destroy() - int media_packet_alloc( - media_packet_h packet, - ) { - return _media_packet_alloc( - packet, - ); - } - - late final _media_packet_allocPtr = - _lookup>( - 'media_packet_alloc'); - late final _media_packet_alloc = - _media_packet_allocPtr.asFunction(); - - /// @brief Creates media packet handle and allocates buffer with #tbm_surface_h. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @c packet must be released by using media_packet_destroy(). - /// @param[in] fmt The allocated #media_format_h by caller - /// @param[in] surface The #tbm_surface_h by caller - /// @param[in] fcb The media_packet_finalize_cb() to register - /// @param[in] fcb_data The user data to be passed to the media_packet_finalize_cb() function - /// @param[out] packet A new handle for media packet - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre Must have media_format_h instance by media_format_create() - /// @post Must do media_format_unref() - /// - /// @see media_packet_destroy() - /// @see media_packet_finalize_cb() - /// @see media_format_unref() - /// @par Example - /// @code - /// #include - /// - /// { - /// media_format_h fmt; - /// media_packet_h packet; - /// - /// media_format_create(&fmt); - /// media_format_set_video_mime(fmt, MEDIA_FORMAT_H264_HP); - /// media_format_set_video_width(fmt, 640); - /// media_format_set_video_height(fmt, 480); - /// media_format_set_video_avg_bps(fmt, 10000000); - /// media_format_set_video_max_bps(fmt, 15000000); - /// - /// media_packet_create_from_tbm_surface (fmt, surface, _finalize_callback, fcb_data, &packet); - /// media_format_unref(fmt); - /// - /// ... - /// media_pacekt_destory(packet); - /// } - /// - /// int _finalize_callback(media_packet_h packet, int err, void* userdata) - /// { - /// ... - /// return MEDIA_PACKET_FINALIZE; - /// } - /// - /// @endcode - int media_packet_create_from_tbm_surface( - media_format_h fmt, - tbm_surface_h surface, - media_packet_finalize_cb fcb, - ffi.Pointer fcb_data, - ffi.Pointer packet, - ) { - return _media_packet_create_from_tbm_surface( - fmt, - surface, - fcb, - fcb_data, - packet, - ); - } - - late final _media_packet_create_from_tbm_surfacePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_format_h, - tbm_surface_h, - media_packet_finalize_cb, - ffi.Pointer, - ffi.Pointer)>>( - 'media_packet_create_from_tbm_surface'); - late final _media_packet_create_from_tbm_surface = - _media_packet_create_from_tbm_surfacePtr.asFunction< - int Function(media_format_h, tbm_surface_h, media_packet_finalize_cb, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Creates media packet handle with already allocated external buffer. - /// @details It does not support video's #MEDIA_FORMAT_RAW type. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks The @c packet must be released by using media_packet_destroy(). - /// @param[in] fmt The allocated #media_format_h by caller - /// @param[in] mem_ptr The memory pointer which is created by external module - /// @param[in] size The buffer size value to set - /// @param[in] fcb The media_packet_finalize_cb() to register - /// @param[in] fcb_data The user data to be passed to the media_packet_finalize_cb() function - /// @param[out] packet A new handle for media packet - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre Must have media_format_h instance by media_format_create() - /// @post Must do media_format_unref() - /// - /// @see media_packet_destroy() - /// @see media_packet_finalize_cb() - /// @see media_format_unref() - /// @par Example - /// @code - /// #include - /// - /// { - /// media_format_h fmt; - /// media_packet_h packet; - /// - /// media_format_create(&fmt); - /// media_format_set_video_mime(fmt, MEDIA_FORMAT_H264_HP); - /// media_format_set_video_width(fmt, 640); - /// media_format_set_video_height(fmt, 480); - /// media_format_set_video_avg_bps(fmt, 10000000); - /// media_format_set_video_max_bps(fmt, 15000000); - /// - /// media_packet_create_from_external_memory (fmt, mem_ptr, size, _finalize_callback, fcb_data, &packet); - /// media_format_unref(fmt); - /// - /// ... - /// media_packet_destroy(packet); - /// } - /// - /// int _finalize_callback(media_packet_h packet, int err, void* userdata) - /// { - /// ... - /// return MEDIA_PACKET_FINALIZE; - /// } - /// - /// @endcode - int media_packet_create_from_external_memory( - media_format_h fmt, - ffi.Pointer mem_ptr, - int size, - media_packet_finalize_cb fcb, - ffi.Pointer fcb_data, - ffi.Pointer packet, - ) { - return _media_packet_create_from_external_memory( - fmt, - mem_ptr, - size, - fcb, - fcb_data, - packet, - ); - } - - late final _media_packet_create_from_external_memoryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_format_h, - ffi.Pointer, - ffi.Uint64, - media_packet_finalize_cb, - ffi.Pointer, - ffi.Pointer)>>( - 'media_packet_create_from_external_memory'); - late final _media_packet_create_from_external_memory = - _media_packet_create_from_external_memoryPtr.asFunction< - int Function( - media_format_h, - ffi.Pointer, - int, - media_packet_finalize_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets #media_format_h of media packet - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] fmt The media format of media packet - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_format_unref() - /// @par Example - /// @code - /// #include - /// - /// { - /// media_format_h* fmt; - /// - /// media_packet_get_format (pakcet, &fmt); - /// .. - /// - /// media_format_unref(fmt); - /// ... - /// } - /// - /// @endcode - int media_packet_get_format( - media_packet_h packet, - ffi.Pointer fmt, - ) { - return _media_packet_get_format( - packet, - fmt, - ); - } - - late final _media_packet_get_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_get_format'); - late final _media_packet_get_format = _media_packet_get_formatPtr - .asFunction)>(); - - /// @brief Sets #media_format_h of media packet - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[in] fmt The #media_format_h to set - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_format_unref() - /// @par Example - /// @code - /// #include - /// - /// { - /// media_format_h fmt; - /// - /// media_packet_set_format (pakcet, fmt); - /// .. - /// - /// media_format_unref(fmt); - /// ... - /// } - /// - /// @endcode - int media_packet_set_format( - media_packet_h packet, - media_format_h fmt, - ) { - return _media_packet_set_format( - packet, - fmt, - ); - } - - late final _media_packet_set_formatPtr = _lookup< - ffi.NativeFunction>( - 'media_packet_set_format'); - late final _media_packet_set_format = _media_packet_set_formatPtr - .asFunction(); - - /// @brief Sets PTS of media packet. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[in] pts The PTS value to set - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_set_pts( - media_packet_h packet, - int pts, - ) { - return _media_packet_set_pts( - packet, - pts, - ); - } - - late final _media_packet_set_ptsPtr = - _lookup>( - 'media_packet_set_pts'); - late final _media_packet_set_pts = - _media_packet_set_ptsPtr.asFunction(); - - /// @brief Sets DTS of media packet handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[in] dts The DTS value to set - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_set_dts( - media_packet_h packet, - int dts, - ) { - return _media_packet_set_dts( - packet, - dts, - ); - } - - late final _media_packet_set_dtsPtr = - _lookup>( - 'media_packet_set_dts'); - late final _media_packet_set_dts = - _media_packet_set_dtsPtr.asFunction(); - - /// @brief Sets PTS of media packet. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[in] duration The duration value to set - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_set_duration( - media_packet_h packet, - int duration, - ) { - return _media_packet_set_duration( - packet, - duration, - ); - } - - late final _media_packet_set_durationPtr = - _lookup>( - 'media_packet_set_duration'); - late final _media_packet_set_duration = _media_packet_set_durationPtr - .asFunction(); - - /// @brief Sets buffer size of media packet. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] size The buffer size value to set - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_set_buffer_size( - media_packet_h packet, - int size, - ) { - return _media_packet_set_buffer_size( - packet, - size, - ); - } - - late final _media_packet_set_buffer_sizePtr = - _lookup>( - 'media_packet_set_buffer_size'); - late final _media_packet_set_buffer_size = _media_packet_set_buffer_sizePtr - .asFunction(); - - /// @brief Gets PTS of media packet. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] pts The PTS value to get - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - int media_packet_get_pts( - media_packet_h packet, - ffi.Pointer pts, - ) { - return _media_packet_get_pts( - packet, - pts, - ); - } - - late final _media_packet_get_ptsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_get_pts'); - late final _media_packet_get_pts = _media_packet_get_ptsPtr - .asFunction)>(); - - /// @brief Gets DTS of media packet - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] dts The DTS value to get - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_get_dts( - media_packet_h packet, - ffi.Pointer dts, - ) { - return _media_packet_get_dts( - packet, - dts, - ); - } - - late final _media_packet_get_dtsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_get_dts'); - late final _media_packet_get_dts = _media_packet_get_dtsPtr - .asFunction)>(); - - /// @brief Gets duration of media packet. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] duration The duration value to get - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_get_duration( - media_packet_h packet, - ffi.Pointer duration, - ) { - return _media_packet_get_duration( - packet, - duration, - ); - } - - late final _media_packet_get_durationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_get_duration'); - late final _media_packet_get_duration = _media_packet_get_durationPtr - .asFunction)>(); - - /// @brief Gets buffer size of media packet. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] size The buffer size value to get - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_get_buffer_size( - media_packet_h packet, - ffi.Pointer size, - ) { - return _media_packet_get_buffer_size( - packet, - size, - ); - } - - late final _media_packet_get_buffer_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_get_buffer_size'); - late final _media_packet_get_buffer_size = _media_packet_get_buffer_sizePtr - .asFunction)>(); - - /// @brief Gets buffer data pointer of media packet. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] data The allocated buffer data pointer - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_get_buffer_data_ptr( - media_packet_h packet, - ffi.Pointer> data, - ) { - return _media_packet_get_buffer_data_ptr( - packet, - data, - ); - } - - late final _media_packet_get_buffer_data_ptrPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_packet_h, ffi.Pointer>)>>( - 'media_packet_get_buffer_data_ptr'); - late final _media_packet_get_buffer_data_ptr = - _media_packet_get_buffer_data_ptrPtr.asFunction< - int Function(media_packet_h, ffi.Pointer>)>(); - - /// @brief Gets TBM surface data of media packet. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] surface The tbm_surface data pointer - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_get_tbm_surface( - media_packet_h packet, - ffi.Pointer surface, - ) { - return _media_packet_get_tbm_surface( - packet, - surface, - ); - } - - late final _media_packet_get_tbm_surfacePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_get_tbm_surface'); - late final _media_packet_get_tbm_surface = _media_packet_get_tbm_surfacePtr - .asFunction)>(); - - /// @brief Sets extra data of media packet. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[in] extra The extra data to set - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_set_extra( - media_packet_h packet, - ffi.Pointer extra, - ) { - return _media_packet_set_extra( - packet, - extra, - ); - } - - late final _media_packet_set_extraPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_set_extra'); - late final _media_packet_set_extra = _media_packet_set_extraPtr - .asFunction)>(); - - /// @brief Gets extra data of media packet. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] extra The extra data to get - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_get_extra( - media_packet_h packet, - ffi.Pointer> extra, - ) { - return _media_packet_get_extra( - packet, - extra, - ); - } - - late final _media_packet_get_extraPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer>)>>('media_packet_get_extra'); - late final _media_packet_get_extra = _media_packet_get_extraPtr.asFunction< - int Function(media_packet_h, ffi.Pointer>)>(); - - /// @brief Checks whether the given media packet is for video. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] is_video @c true if the given media packet is for video, - /// otherwise @c false if the given media packet is not for video - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see media_format_mimetype_e - /// @see media_format_type_e - int media_packet_is_video( - media_packet_h packet, - ffi.Pointer is_video, - ) { - return _media_packet_is_video( - packet, - is_video, - ); - } - - late final _media_packet_is_videoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_packet_h, ffi.Pointer)>>('media_packet_is_video'); - late final _media_packet_is_video = _media_packet_is_videoPtr - .asFunction)>(); - - /// @brief Checks whether the given media packet is for audio. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] is_audio @c true if the given media packet is for audio, - /// otherwise @c false if the given media packet is not for audio - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_mimetype_e - /// @see media_format_type_e - int media_packet_is_audio( - media_packet_h packet, - ffi.Pointer is_audio, - ) { - return _media_packet_is_audio( - packet, - is_audio, - ); - } - - late final _media_packet_is_audioPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_packet_h, ffi.Pointer)>>('media_packet_is_audio'); - late final _media_packet_is_audio = _media_packet_is_audioPtr - .asFunction)>(); - - /// @brief Checks whether the given media packet is for text. - /// @since_tizen 3.0 - /// - /// @param[in] packet The media packet handle - /// @param[out] is_text @c true if the given media packet is for text, - /// otherwise @c false if the given media packet is not for text - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_mimetype_e - /// @see media_format_type_e - int media_packet_is_text( - media_packet_h packet, - ffi.Pointer is_text, - ) { - return _media_packet_is_text( - packet, - is_text, - ); - } - - late final _media_packet_is_textPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_packet_h, ffi.Pointer)>>('media_packet_is_text'); - late final _media_packet_is_text = _media_packet_is_textPtr - .asFunction)>(); - - /// @brief Checks whether the given media packet is encoded type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] is_encoded @c true if the given media packet is encoded, - /// otherwise @c false if the given media packet is not encoded - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see media_format_mimetype_e - /// @see media_format_data_type_e - int media_packet_is_encoded( - media_packet_h packet, - ffi.Pointer is_encoded, - ) { - return _media_packet_is_encoded( - packet, - is_encoded, - ); - } - - late final _media_packet_is_encodedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_is_encoded'); - late final _media_packet_is_encoded = _media_packet_is_encodedPtr - .asFunction)>(); - - /// @brief Checks whether the given media packet is raw type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] is_raw @c true if the given media packet is for raw video, - /// otherwise @c false if the given media packet is not for raw video - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see media_format_mimetype_e - /// @see media_format_data_type_e - int media_packet_is_raw( - media_packet_h packet, - ffi.Pointer is_raw, - ) { - return _media_packet_is_raw( - packet, - is_raw, - ); - } - - late final _media_packet_is_rawPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_packet_h, ffi.Pointer)>>('media_packet_is_raw'); - late final _media_packet_is_raw = _media_packet_is_rawPtr - .asFunction)>(); - - /// @brief Gets #media_buffer_flags_e of media packet. - /// @since_tizen 3.0 - /// - /// @param[in] packet The media packet handle - /// @param[out] flags The media_buffer_flags_e of media packet to get - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see media_buffer_flags_e - /// @see media_packet_unset_flags() - int media_packet_get_flags( - media_packet_h packet, - ffi.Pointer flags, - ) { - return _media_packet_get_flags( - packet, - flags, - ); - } - - late final _media_packet_get_flagsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_get_flags'); - late final _media_packet_get_flags = _media_packet_get_flagsPtr - .asFunction)>(); - - /// @brief Sets #media_buffer_flags_e of media packet. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[in] flags The media_buffer_flags_e of media packet to set - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see media_buffer_flags_e - /// @see media_packet_unset_flags() - int media_packet_set_flags( - media_packet_h packet, - int flags, - ) { - return _media_packet_set_flags( - packet, - flags, - ); - } - - late final _media_packet_set_flagsPtr = - _lookup>( - 'media_packet_set_flags'); - late final _media_packet_set_flags = _media_packet_set_flagsPtr - .asFunction(); - - /// @brief Unsets media_buffer_flags_e of media packet - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[in] flags The media_buffer_flags_e of media packet to unset - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see media_buffer_flags_e - /// @see media_packet_set_flags() - int media_packet_unset_flags( - media_packet_h packet, - int flags, - ) { - return _media_packet_unset_flags( - packet, - flags, - ); - } - - late final _media_packet_unset_flagsPtr = - _lookup>( - 'media_packet_unset_flags'); - late final _media_packet_unset_flags = _media_packet_unset_flagsPtr - .asFunction(); - - /// @brief Checks whether the given media packet is codec data. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] is_codec_config @c true if the given media packet is for codec data, - /// otherwise @c false if the given media packet is not for codec data - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see media_format_mimetype_e - /// @see media_format_data_type_e - int media_packet_is_codec_config( - media_packet_h packet, - ffi.Pointer is_codec_config, - ) { - return _media_packet_is_codec_config( - packet, - is_codec_config, - ); - } - - late final _media_packet_is_codec_configPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_is_codec_config'); - late final _media_packet_is_codec_config = _media_packet_is_codec_configPtr - .asFunction)>(); - - /// @brief Checks whether the given media packet is eos. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] is_eos @c true if the given media packet is for eos, - /// otherwise @c false if the given media packet is not for eos - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see media_format_mimetype_e - /// @see media_format_data_type_e - int media_packet_is_end_of_stream( - media_packet_h packet, - ffi.Pointer is_eos, - ) { - return _media_packet_is_end_of_stream( - packet, - is_eos, - ); - } - - late final _media_packet_is_end_of_streamPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_is_end_of_stream'); - late final _media_packet_is_end_of_stream = _media_packet_is_end_of_streamPtr - .asFunction)>(); - - /// @brief Checks whether the given media packet is sync frame. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] is_sync @c true if the given media packet is for sync frame, - /// otherwise @c false if the given media packet is not for sync frame - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see media_format_mimetype_e - /// @see media_format_data_type_e - int media_packet_is_sync_frame( - media_packet_h packet, - ffi.Pointer is_sync, - ) { - return _media_packet_is_sync_frame( - packet, - is_sync, - ); - } - - late final _media_packet_is_sync_framePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_is_sync_frame'); - late final _media_packet_is_sync_frame = _media_packet_is_sync_framePtr - .asFunction)>(); - - /// @brief Checks whether the allocated buffer is tbm surface or not. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] has_tbm_surface @c true if the given media packet's allocated buffer is tbm surface, - /// otherwise @c false if the given media packet's allocated buffer is not tbm surface - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_has_tbm_surface_buffer( - media_packet_h packet, - ffi.Pointer has_tbm_surface, - ) { - return _media_packet_has_tbm_surface_buffer( - packet, - has_tbm_surface, - ); - } - - late final _media_packet_has_tbm_surface_bufferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_has_tbm_surface_buffer'); - late final _media_packet_has_tbm_surface_buffer = - _media_packet_has_tbm_surface_bufferPtr - .asFunction)>(); - - /// @brief Gets the number of planes from tbm surface in the given media packet. - /// @details Use only if the media_format_h is #MEDIA_FORMAT_RAW and #MEDIA_FORMAT_VIDEO. - /// It means that media_packet_h's buffer is allocated on tbm_surface. - /// If not sure of that, use media_packet_is_video() and media_packet_is_raw() or media_packet_has_tbm_surface_buffer(). - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] num The number of planes from tbm_surface - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_get_number_of_video_planes( - media_packet_h packet, - ffi.Pointer num, - ) { - return _media_packet_get_number_of_video_planes( - packet, - num, - ); - } - - late final _media_packet_get_number_of_video_planesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, ffi.Pointer)>>( - 'media_packet_get_number_of_video_planes'); - late final _media_packet_get_number_of_video_planes = - _media_packet_get_number_of_video_planesPtr - .asFunction)>(); - - /// @brief Gets stride width from tbm surface in the given media packet. - /// @details Use only if the media_format_h is #MEDIA_FORMAT_RAW and #MEDIA_FORMAT_VIDEO. - /// It means that media_packet_h's buffer is allocated on tbm_surface. - /// If not sure of that, use media_packet_is_video() and media_packet_is_raw() or media_packet_has_tbm_surface_buffer(). - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] packet The media packet handle - /// @param[in] plane_idx The plane index value - /// @param[out] stride_width the stride value from tbm_surface - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_get_video_stride_width( - media_packet_h packet, - int plane_idx, - ffi.Pointer stride_width, - ) { - return _media_packet_get_video_stride_width( - packet, - plane_idx, - stride_width, - ); - } - - late final _media_packet_get_video_stride_widthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, ffi.Int, - ffi.Pointer)>>('media_packet_get_video_stride_width'); - late final _media_packet_get_video_stride_width = - _media_packet_get_video_stride_widthPtr.asFunction< - int Function(media_packet_h, int, ffi.Pointer)>(); - - /// @brief Gets stride height from tbm surface in the given media packet. - /// @details Use only if the media_format_h is #MEDIA_FORMAT_RAW and #MEDIA_FORMAT_VIDEO. - /// It means that media_packet_h's buffer is allocated on tbm_surface. - /// If not sure of that, use media_packet_is_video() and media_packet_is_raw() or media_packet_has_tbm_surface_buffer(). - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] packet The media packet handle - /// @param[in] plane_idx The plane index value - /// @param[out] stride_height The stride height value from tbm_surface - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_get_video_stride_height( - media_packet_h packet, - int plane_idx, - ffi.Pointer stride_height, - ) { - return _media_packet_get_video_stride_height( - packet, - plane_idx, - stride_height, - ); - } - - late final _media_packet_get_video_stride_heightPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, ffi.Int, - ffi.Pointer)>>('media_packet_get_video_stride_height'); - late final _media_packet_get_video_stride_height = - _media_packet_get_video_stride_heightPtr.asFunction< - int Function(media_packet_h, int, ffi.Pointer)>(); - - /// @brief Gets plane data pointer from tbm surface in the given media packet. - /// @details Use only if the media_format_h is #MEDIA_FORMAT_RAW and #MEDIA_FORMAT_VIDEO. - /// It means that media_packet_h's buffer is allocated on tbm_surface. - /// If not sure of that, use media_packet_is_video() and media_packet_is_raw() or media_packet_has_tbm_surface_buffer(). - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks The @c plane_data_ptr must not be released by using free(). Note that It is released by media_packet_destory() or tbm_surface_destroy(). - /// @param[in] packet The media packet handle - /// @param[in] plane_idx The plane index value - /// @param[out] plane_data_ptr The plane data pointer from tbm_surface - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_get_video_plane_data_ptr( - media_packet_h packet, - int plane_idx, - ffi.Pointer> plane_data_ptr, - ) { - return _media_packet_get_video_plane_data_ptr( - packet, - plane_idx, - plane_data_ptr, - ); - } - - late final _media_packet_get_video_plane_data_ptrPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, ffi.Int, - ffi.Pointer>)>>( - 'media_packet_get_video_plane_data_ptr'); - late final _media_packet_get_video_plane_data_ptr = - _media_packet_get_video_plane_data_ptrPtr.asFunction< - int Function( - media_packet_h, int, ffi.Pointer>)>(); - - /// @brief Gets codec data and the codec data size of media packet. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] codec_data The codec data to get - /// @param[out] codec_data_size The codec data size to get - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_get_codec_data( - media_packet_h packet, - ffi.Pointer> codec_data, - ffi.Pointer codec_data_size, - ) { - return _media_packet_get_codec_data( - packet, - codec_data, - codec_data_size, - ); - } - - late final _media_packet_get_codec_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, ffi.Pointer>, - ffi.Pointer)>>('media_packet_get_codec_data'); - late final _media_packet_get_codec_data = - _media_packet_get_codec_dataPtr.asFunction< - int Function(media_packet_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Destroys the media packet handle. - /// @details The registered finalize_callback() function will be invoked to destroy the media packet handle. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The handle to media packet to be destroyed - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see media_packet_create_alloc() - /// @see media_packet_create() - /// @see media_packet_copy() - /// @see media_packet_create_from_tbm_surface() - /// @see media_packet_create_from_external_memory() - int media_packet_destroy( - media_packet_h packet, - ) { - return _media_packet_destroy( - packet, - ); - } - - late final _media_packet_destroyPtr = - _lookup>( - 'media_packet_destroy'); - late final _media_packet_destroy = - _media_packet_destroyPtr.asFunction(); - - /// @brief Creates a new camera handle for controlling a camera. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks Multiple handles on a context at the same time are allowed to be created. However, - /// camera cannot guarantee proper operation because of limited resources, such as - /// camera device, audio device, and display device.\n. - /// A @a camera must be released using camera_destroy(). - /// @remarks The privilege %http://tizen.org/privilege/camera is not required since 4.0,\n - /// but it is required in all earlier versions. - /// @param[in] device The hardware camera to access - /// @param[out] camera A newly returned handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CAMERA_ERROR_SOUND_POLICY Sound policy error - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @post If it succeeds, the camera state will be #CAMERA_STATE_CREATED. - /// - /// @see camera_destroy() - int camera_create( - int device, - ffi.Pointer camera, - ) { - return _camera_create( - device, - camera, - ); - } - - late final _camera_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer)>>('camera_create'); - late final _camera_create = - _camera_createPtr.asFunction)>(); - - /// @brief Changes the camera device. - /// - /// @since_tizen 3.0 - /// @remarks This function can be used to change camera device simply without camera_destroy() and camera_create().\n - /// If display reuse hint is set by camera_set_display_reuse_hint() before stopping the preview,\n - /// display handle will be reused and last frame on display can be kept even though camera device is changed. - /// @param[in] camera The handle to the camera - /// @param[in] device The hardware camera to access - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED. - /// @post If it succeeds, the camera attributes and settings will be reset. - /// - /// @see camera_set_display_reuse_hint() - /// @see camera_get_display_reuse_hint() - int camera_change_device( - camera_h camera, - int device, - ) { - return _camera_change_device( - camera, - device, - ); - } - - late final _camera_change_devicePtr = - _lookup>( - 'camera_change_device'); - late final _camera_change_device = - _camera_change_devicePtr.asFunction(); - - /// @brief Destroys the camera handle and releases all its resources. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @see camera_create() - int camera_destroy( - camera_h camera, - ) { - return _camera_destroy( - camera, - ); - } - - late final _camera_destroyPtr = - _lookup>('camera_destroy'); - late final _camera_destroy = - _camera_destroyPtr.asFunction(); - - /// @brief Starts capturing and drawing preview frames on the screen. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/camera - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_SOUND_POLICY Sound policy error - /// @retval #CAMERA_ERROR_RESOURCE_CONFLICT Resource conflict error - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_DEVICE_BUSY The device is being used in another application or is performing other operations - /// @retval #CAMERA_ERROR_DEVICE_NOT_FOUND No camera device - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_CAPTURED.\n - /// You must set the display handle. \n - /// If needed, modify preview FPS(camera_attr_set_preview_fps()), - /// preview resolution(camera_set_preview_resolution()), or preview format(camera_set_preview_format()). - /// @post If it succeeds, the camera state will be #CAMERA_STATE_PREVIEW.\n - /// camera_preview_cb() will be called when preview image data becomes available. - /// - /// @see camera_stop_preview() - /// @see camera_set_display() - /// @see camera_set_preview_cb() - /// @see camera_set_media_packet_preview_cb() - /// @see camera_foreach_supported_preview_resolution() - /// @see camera_set_preview_resolution() - /// @see camera_get_preview_resolution() - /// @see camera_foreach_supported_preview_format() - /// @see camera_set_preview_format() - /// @see camera_get_preview_format() - /// @see camera_attr_foreach_supported_fps() - /// @see camera_attr_set_preview_fps() - /// @see camera_attr_get_preview_fps() - int camera_start_preview( - camera_h camera, - ) { - return _camera_start_preview( - camera, - ); - } - - late final _camera_start_previewPtr = - _lookup>( - 'camera_start_preview'); - late final _camera_start_preview = - _camera_start_previewPtr.asFunction(); - - /// @brief Stops capturing and drawing preview frames. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/camera - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_PREVIEW. - /// @post The camera state will be #CAMERA_STATE_CREATED. - /// @see camera_start_preview() - /// @see camera_unset_preview_cb() - /// @see camera_unset_media_packet_preview_cb() - int camera_stop_preview( - camera_h camera, - ) { - return _camera_stop_preview( - camera, - ); - } - - late final _camera_stop_previewPtr = - _lookup>( - 'camera_stop_preview'); - late final _camera_stop_preview = - _camera_stop_previewPtr.asFunction(); - - /// @brief Starts capturing of still images. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/camera - /// @remarks This function causes the transition of the camera state from #CAMERA_STATE_CAPTURING to #CAMERA_STATE_CAPTURED automatically\n - /// and the corresponding callback function camera_capturing_cb() and camera_capture_completed_cb() will be invoked\n - /// The captured image will be delivered through camera_capturing_cb().\n - /// camera_capture_completed_cb() callback notifies about completion of camera_capturing_cb(). \n - /// The camera's preview should be restarted by calling camera_start_preview(). - /// @param[in] camera The handle to the camera - /// @param[in] capturing_cb The callback for capturing data - /// @param[in] completed_cb The callback for notification of completion - /// @param[in] user_data The user data - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_PREVIEW. \n - /// If needed, modify capture resolution(camera_set_capture_resolution()), - /// capture format(camera_set_capture_format()), or image quality(camera_attr_set_image_quality()). - /// @post If it succeeds the camera state will be #CAMERA_STATE_CAPTURED. - /// - /// @see camera_start_preview() - /// @see camera_start_continuous_capture(); - /// @see camera_foreach_supported_capture_resolution() - /// @see camera_set_capture_resolution() - /// @see camera_get_capture_resolution() - /// @see camera_foreach_supported_capture_format() - /// @see camera_set_capture_format() - /// @see camera_get_capture_format() - /// @see camera_attr_set_image_quality() - /// @see camera_attr_get_image_quality() - int camera_start_capture( - camera_h camera, - camera_capturing_cb capturing_cb, - camera_capture_completed_cb completed_cb, - ffi.Pointer user_data, - ) { - return _camera_start_capture( - camera, - capturing_cb, - completed_cb, - user_data, - ); - } - - late final _camera_start_capturePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - camera_h, - camera_capturing_cb, - camera_capture_completed_cb, - ffi.Pointer)>>('camera_start_capture'); - late final _camera_start_capture = _camera_start_capturePtr.asFunction< - int Function(camera_h, camera_capturing_cb, camera_capture_completed_cb, - ffi.Pointer)>(); - - /// @brief Starts continuously capturing still images. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/camera - /// @remarks If this is not supported zero shutter lag occurs. The capture resolution could be changed to the preview resolution.\n - /// This function causes the transition of the camera state from #CAMERA_STATE_CAPTURING to #CAMERA_STATE_CAPTURED automatically\n - /// and the corresponding callback function camera_capturing_cb() and camera_capture_completed_cb() will be invoked\n - /// Each Captured image will be delivered through camera_capturing_cb().\n - /// The camera_capture_completed_cb() callback notifies about the completion of an entire capture.\n - /// The camera's preview should be restarted by calling camera_start_preview().\n. - /// @param[in] camera The handle to the camera - /// @param[in] count The number of still images - /// @param[in] interval The interval of the capture (millisecond) - /// @param[in] capturing_cb The callback for capturing data - /// @param[in] completed_cb The callback for notification of completion - /// @param[in] user_data The user data - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post If it succeeds the camera state will be #CAMERA_STATE_CAPTURED. - /// - /// @see camera_start_preview() - /// @see camera_start_capture(); - /// @see camera_stop_continuous_capture() - /// @see camera_is_supported_zero_shutter_lag() - int camera_start_continuous_capture( - camera_h camera, - int count, - int interval, - camera_capturing_cb capturing_cb, - camera_capture_completed_cb completed_cb, - ffi.Pointer user_data, - ) { - return _camera_start_continuous_capture( - camera, - count, - interval, - capturing_cb, - completed_cb, - user_data, - ); - } - - late final _camera_start_continuous_capturePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - camera_h, - ffi.Int, - ffi.Int, - camera_capturing_cb, - camera_capture_completed_cb, - ffi.Pointer)>>('camera_start_continuous_capture'); - late final _camera_start_continuous_capture = - _camera_start_continuous_capturePtr.asFunction< - int Function(camera_h, int, int, camera_capturing_cb, - camera_capture_completed_cb, ffi.Pointer)>(); - - /// @brief Aborts continuous capturing. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/camera - /// @remarks The camera state will be changed to #CAMERA_STATE_CAPTURED. - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_PREVIEW. - /// - /// @see camera_start_continuous_capture() - int camera_stop_continuous_capture( - camera_h camera, - ) { - return _camera_stop_continuous_capture( - camera, - ); - } - - late final _camera_stop_continuous_capturePtr = - _lookup>( - 'camera_stop_continuous_capture'); - late final _camera_stop_continuous_capture = - _camera_stop_continuous_capturePtr.asFunction(); - - /// @brief Gets the state of the camera. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] state The current state of the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_create() - /// @see camera_start_preview() - /// @see camera_stop_preview() - /// @see camera_start_capture() - int camera_get_state( - camera_h camera, - ffi.Pointer state, - ) { - return _camera_get_state( - camera, - state, - ); - } - - late final _camera_get_statePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_get_state'); - late final _camera_get_state = _camera_get_statePtr - .asFunction)>(); - - /// @brief Starts camera auto-focusing, asynchronously. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/camera - /// @remarks If continuous status is @c true, the camera continuously tries to focus. - /// @param[in] camera The handle to the camera - /// @param[in] continuous The status of continuous focusing - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_PREVIEW. - /// @post The camera focus state will be #CAMERA_FOCUS_STATE_ONGOING. - /// - /// @see camera_cancel_focusing() - /// @see camera_set_focus_changed_cb() - /// @see camera_focus_changed_cb() - /// @see camera_attr_set_af_mode() - int camera_start_focusing( - camera_h camera, - bool continuous, - ) { - return _camera_start_focusing( - camera, - continuous, - ); - } - - late final _camera_start_focusingPtr = - _lookup>( - 'camera_start_focusing'); - late final _camera_start_focusing = - _camera_start_focusingPtr.asFunction(); - - /// @brief Stops camera auto focusing. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/camera - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_PREVIEW. - /// - /// @see camera_start_focusing() - /// @see camera_focus_changed_cb() - int camera_cancel_focusing( - camera_h camera, - ) { - return _camera_cancel_focusing( - camera, - ); - } - - late final _camera_cancel_focusingPtr = - _lookup>( - 'camera_cancel_focusing'); - late final _camera_cancel_focusing = - _camera_cancel_focusingPtr.asFunction(); - - /// @brief Sets the display handle to show preview images. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This function must be called before previewing (see camera_start_preview()). - /// In Custom ROI display mode, camera_attr_set_display_roi_area() function must be called before calling this function. - /// @param[in] camera The handle to the camera - /// @param[in] type The display type - /// @param[in] display The display handle from #GET_DISPLAY - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED. - /// - /// @see camera_start_preview() - /// @see #GET_DISPLAY - int camera_set_display( - camera_h camera, - int type, - camera_display_h display, - ) { - return _camera_set_display( - camera, - type, - display, - ); - } - - late final _camera_set_displayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - camera_h, ffi.Int32, camera_display_h)>>('camera_set_display'); - late final _camera_set_display = _camera_set_displayPtr - .asFunction(); - - /// @brief Sets the resolution of the preview. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This function should be called before previewing (camera_start_preview()). - /// @param[in] camera The handle to the camera - /// @param[in] width The preview width - /// @param[in] height The preview height - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// - /// @see camera_start_preview() - /// @see camera_get_preview_resolution() - /// @see camera_foreach_supported_preview_resolution() - int camera_set_preview_resolution( - camera_h camera, - int width, - int height, - ) { - return _camera_set_preview_resolution( - camera, - width, - height, - ); - } - - late final _camera_set_preview_resolutionPtr = - _lookup>( - 'camera_set_preview_resolution'); - late final _camera_set_preview_resolution = _camera_set_preview_resolutionPtr - .asFunction(); - - /// @brief Gets the resolution of the preview. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] width The preview width - /// @param[out] height The preview height - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_preview_resolution() - /// @see camera_foreach_supported_preview_resolution() - int camera_get_preview_resolution( - camera_h camera, - ffi.Pointer width, - ffi.Pointer height, - ) { - return _camera_get_preview_resolution( - camera, - width, - height, - ); - } - - late final _camera_get_preview_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Pointer, - ffi.Pointer)>>('camera_get_preview_resolution'); - late final _camera_get_preview_resolution = - _camera_get_preview_resolutionPtr.asFunction< - int Function(camera_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the recommended preview resolution. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks Depending on the capture resolution aspect ratio and display resolution, the recommended preview resolution is determined. - /// @param[in] camera The handle to the camera - /// @param[out] width The preview width - /// @param[out] height The preview height - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_preview_resolution() - /// @see camera_foreach_supported_preview_resolution() - int camera_get_recommended_preview_resolution( - camera_h camera, - ffi.Pointer width, - ffi.Pointer height, - ) { - return _camera_get_recommended_preview_resolution( - camera, - width, - height, - ); - } - - late final _camera_get_recommended_preview_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - camera_h, ffi.Pointer, ffi.Pointer)>>( - 'camera_get_recommended_preview_resolution'); - late final _camera_get_recommended_preview_resolution = - _camera_get_recommended_preview_resolutionPtr.asFunction< - int Function(camera_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Starts face detection. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/camera - /// @remarks This should be called after the preview is started.\n - /// This callback will be invoked when the face is detected in the preview frame.\n - /// Internally it starts continuous focus and focusing on the detected face.\n - /// When face detection is running, the camera_start_focusing(), camera_cancel_focusing(), camera_attr_set_af_mode(), camera_attr_set_af_area(), camera_attr_set_exposure_mode(), and camera_attr_set_whitebalance() settings are ignored.\n - /// If camera_stop_preview() is invoked, face detection is stopped and then preview is resumed using camera_start_preview(), this method should be called again to resume face detection. - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback to notify face detection - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Not preview state - /// @retval #CAMERA_ERROR_INVALID_OPERATION Not supported this feature - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be #CAMERA_STATE_PREVIEW. - /// - /// @see camera_stop_face_detection() - /// @see camera_face_detected_cb() - /// @see camera_is_supported_face_detection() - int camera_start_face_detection( - camera_h camera, - camera_face_detected_cb callback, - ffi.Pointer user_data, - ) { - return _camera_start_face_detection( - camera, - callback, - user_data, - ); - } - - late final _camera_start_face_detectionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_face_detected_cb, - ffi.Pointer)>>('camera_start_face_detection'); - late final _camera_start_face_detection = - _camera_start_face_detectionPtr.asFunction< - int Function( - camera_h, camera_face_detected_cb, ffi.Pointer)>(); - - /// @brief Stops face detection. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/camera - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre This should be called after face detection is started. - /// - /// @see camera_start_face_detection() - /// @see camera_is_supported_face_detection() - int camera_stop_face_detection( - camera_h camera, - ) { - return _camera_stop_face_detection( - camera, - ); - } - - late final _camera_stop_face_detectionPtr = - _lookup>( - 'camera_stop_face_detection'); - late final _camera_stop_face_detection = - _camera_stop_face_detectionPtr.asFunction(); - - /// @brief Gets continuous capture feature's supported state. - /// @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] camera The handle to the camera - /// @return @c true on supported, otherwise false - /// @exception #CAMERA_ERROR_NONE Successful - /// @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - bool camera_is_supported_continuous_capture( - camera_h camera, - ) { - return _camera_is_supported_continuous_capture( - camera, - ); - } - - late final _camera_is_supported_continuous_capturePtr = - _lookup>( - 'camera_is_supported_continuous_capture'); - late final _camera_is_supported_continuous_capture = - _camera_is_supported_continuous_capturePtr - .asFunction(); - - /// @brief Retrieves all supported camera preview resolutions by invoking the callback function once for each supported camera preview resolution. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_supported_preview_resolution_cb() repeatedly to retrieve each supported preview resolution. - /// - /// @see camera_set_preview_resolution() - /// @see camera_get_preview_resolution() - /// @see camera_supported_preview_resolution_cb() - int camera_foreach_supported_preview_resolution( - camera_h camera, - camera_supported_preview_resolution_cb callback, - ffi.Pointer user_data, - ) { - return _camera_foreach_supported_preview_resolution( - camera, - callback, - user_data, - ); - } - - late final _camera_foreach_supported_preview_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_supported_preview_resolution_cb, - ffi.Pointer)>>( - 'camera_foreach_supported_preview_resolution'); - late final _camera_foreach_supported_preview_resolution = - _camera_foreach_supported_preview_resolutionPtr.asFunction< - int Function(camera_h, camera_supported_preview_resolution_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE - /// @brief Sets the display rotation. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This function should be called before previewing (see camera_start_preview()) - /// @param[in] camera The handle to the camera - /// @param[in] rotation The display rotation - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_INVALID_OPERATION Display type is incorrect - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_start_preview() - /// @see camera_get_display_rotation() - int camera_set_display_rotation( - camera_h camera, - int rotation, - ) { - return _camera_set_display_rotation( - camera, - rotation, - ); - } - - late final _camera_set_display_rotationPtr = - _lookup>( - 'camera_set_display_rotation'); - late final _camera_set_display_rotation = - _camera_set_display_rotationPtr.asFunction(); - - /// @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE - /// @brief Gets the display rotation. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] rotation The display rotation - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_display_rotation() - int camera_get_display_rotation( - camera_h camera, - ffi.Pointer rotation, - ) { - return _camera_get_display_rotation( - camera, - rotation, - ); - } - - late final _camera_get_display_rotationPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_get_display_rotation'); - late final _camera_get_display_rotation = _camera_get_display_rotationPtr - .asFunction)>(); - - /// @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE - /// @brief Sets the display flip. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] flip The display flip - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_INVALID_OPERATION Display type is incorrect - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_get_display_flip() - int camera_set_display_flip( - camera_h camera, - int flip, - ) { - return _camera_set_display_flip( - camera, - flip, - ); - } - - late final _camera_set_display_flipPtr = - _lookup>( - 'camera_set_display_flip'); - late final _camera_set_display_flip = - _camera_set_display_flipPtr.asFunction(); - - /// @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE - /// @brief Gets the display flip. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] flip The display flip - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_display_flip() - int camera_get_display_flip( - camera_h camera, - ffi.Pointer flip, - ) { - return _camera_get_display_flip( - camera, - flip, - ); - } - - late final _camera_get_display_flipPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_get_display_flip'); - late final _camera_get_display_flip = _camera_get_display_flipPtr - .asFunction)>(); - - /// @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE - /// @brief Sets the visible property for display. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] visible The display visibility property - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_is_display_visible() - int camera_set_display_visible( - camera_h camera, - bool visible, - ) { - return _camera_set_display_visible( - camera, - visible, - ); - } - - late final _camera_set_display_visiblePtr = - _lookup>( - 'camera_set_display_visible'); - late final _camera_set_display_visible = - _camera_set_display_visiblePtr.asFunction(); - - /// @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE - /// @brief Gets the visible property of display. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] visible @c true if camera display is visible, otherwise @c false - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_display_visible() - int camera_is_display_visible( - camera_h camera, - ffi.Pointer visible, - ) { - return _camera_is_display_visible( - camera, - visible, - ); - } - - late final _camera_is_display_visiblePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_is_display_visible'); - late final _camera_is_display_visible = _camera_is_display_visiblePtr - .asFunction)>(); - - /// @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE - /// @brief Sets the display mode. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] mode The display mode - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_get_display_mode() - int camera_set_display_mode( - camera_h camera, - int mode, - ) { - return _camera_set_display_mode( - camera, - mode, - ); - } - - late final _camera_set_display_modePtr = - _lookup>( - 'camera_set_display_mode'); - late final _camera_set_display_mode = - _camera_set_display_modePtr.asFunction(); - - /// @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE - /// @brief Gets the display mode. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] mode The display mode - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_display_mode() - int camera_get_display_mode( - camera_h camera, - ffi.Pointer mode, - ) { - return _camera_get_display_mode( - camera, - mode, - ); - } - - late final _camera_get_display_modePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_get_display_mode'); - late final _camera_get_display_mode = _camera_get_display_modePtr - .asFunction)>(); - - /// @brief Sets the hint for display reuse. - /// @since_tizen 3.0 - /// @details If the hint is set to true, the display will be reused when the camera device is changed with camera_change_device(). - /// @remarks If the current display type is #CAMERA_DISPLAY_TYPE_NONE, this function will return #CAMERA_ERROR_INVALID_OPERATION. - /// @param[in] camera The handle to the camera - /// @param[in] hint The hint for display reuse; true - reuse the display, false - do not reuse - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_PREVIEW. - /// @see camera_get_display_reuse_hint() - /// @see camera_change_device() - int camera_set_display_reuse_hint( - camera_h camera, - bool hint, - ) { - return _camera_set_display_reuse_hint( - camera, - hint, - ); - } - - late final _camera_set_display_reuse_hintPtr = - _lookup>( - 'camera_set_display_reuse_hint'); - late final _camera_set_display_reuse_hint = _camera_set_display_reuse_hintPtr - .asFunction(); - - /// @brief Gets the hint for display reuse. - /// @since_tizen 3.0 - /// @remarks If the current display type is #CAMERA_DISPLAY_TYPE_NONE, this function will return #CAMERA_ERROR_INVALID_OPERATION. - /// @param[in] camera The handle to the camera - /// @param[out] hint The hint for display reuse; true - reuse the display, false - do not reuse - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_get_display_reuse_hint() - /// @see camera_change_device() - int camera_get_display_reuse_hint( - camera_h camera, - ffi.Pointer hint, - ) { - return _camera_get_display_reuse_hint( - camera, - hint, - ); - } - - late final _camera_get_display_reuse_hintPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_get_display_reuse_hint'); - late final _camera_get_display_reuse_hint = _camera_get_display_reuse_hintPtr - .asFunction)>(); - - /// @brief Sets the resolution of the captured image. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] width The capture width - /// @param[in] height The capture height - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_start_capture() - /// @see camera_get_capture_resolution() - /// @see camera_foreach_supported_capture_resolution() - int camera_set_capture_resolution( - camera_h camera, - int width, - int height, - ) { - return _camera_set_capture_resolution( - camera, - width, - height, - ); - } - - late final _camera_set_capture_resolutionPtr = - _lookup>( - 'camera_set_capture_resolution'); - late final _camera_set_capture_resolution = _camera_set_capture_resolutionPtr - .asFunction(); - - /// @brief Gets the resolution of the captured image. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] width The capture width - /// @param[out] height The capture height - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_capture_resolution() - /// @see camera_foreach_supported_capture_resolution() - int camera_get_capture_resolution( - camera_h camera, - ffi.Pointer width, - ffi.Pointer height, - ) { - return _camera_get_capture_resolution( - camera, - width, - height, - ); - } - - late final _camera_get_capture_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Pointer, - ffi.Pointer)>>('camera_get_capture_resolution'); - late final _camera_get_capture_resolution = - _camera_get_capture_resolutionPtr.asFunction< - int Function(camera_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Retrieves all supported camera captured resolutions by invoking the callback function once for each supported camera capture resolution. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_supported_capture_resolution_cb() repeatedly to retrieve each supported capture resolution. - /// @see camera_set_capture_resolution() - /// @see camera_get_capture_resolution() - /// @see camera_supported_capture_resolution_cb() - int camera_foreach_supported_capture_resolution( - camera_h camera, - camera_supported_capture_resolution_cb callback, - ffi.Pointer user_data, - ) { - return _camera_foreach_supported_capture_resolution( - camera, - callback, - user_data, - ); - } - - late final _camera_foreach_supported_capture_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_supported_capture_resolution_cb, - ffi.Pointer)>>( - 'camera_foreach_supported_capture_resolution'); - late final _camera_foreach_supported_capture_resolution = - _camera_foreach_supported_capture_resolutionPtr.asFunction< - int Function(camera_h, camera_supported_capture_resolution_cb, - ffi.Pointer)>(); - - /// @brief Sets the format of an image to be captured. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This function should be called before capturing (see camera_start_capture()). - /// @param[in] camera The handle to the camera - /// @param[out] format The format of the image to be captured - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_start_capture() - /// @see camera_get_capture_format() - /// @see camera_foreach_supported_capture_format() - int camera_set_capture_format( - camera_h camera, - int format, - ) { - return _camera_set_capture_format( - camera, - format, - ); - } - - late final _camera_set_capture_formatPtr = - _lookup>( - 'camera_set_capture_format'); - late final _camera_set_capture_format = - _camera_set_capture_formatPtr.asFunction(); - - /// @brief Gets the format of the image to be captured. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] format The format of the image to be captured - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_capture_format() - /// @see camera_foreach_supported_capture_format() - int camera_get_capture_format( - camera_h camera, - ffi.Pointer format, - ) { - return _camera_get_capture_format( - camera, - format, - ); - } - - late final _camera_get_capture_formatPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_get_capture_format'); - late final _camera_get_capture_format = _camera_get_capture_formatPtr - .asFunction)>(); - - /// @brief Retrieves all supported camera capture formats by invoking the callback function once for each supported camera capture format. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_supported_capture_format_cb() repeatedly to retrieve each supported capture format. - /// @see camera_set_capture_format() - /// @see camera_get_capture_format() - /// @see camera_supported_capture_format_cb() - int camera_foreach_supported_capture_format( - camera_h camera, - camera_supported_capture_format_cb callback, - ffi.Pointer user_data, - ) { - return _camera_foreach_supported_capture_format( - camera, - callback, - user_data, - ); - } - - late final _camera_foreach_supported_capture_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_supported_capture_format_cb, - ffi.Pointer)>>( - 'camera_foreach_supported_capture_format'); - late final _camera_foreach_supported_capture_format = - _camera_foreach_supported_capture_formatPtr.asFunction< - int Function(camera_h, camera_supported_capture_format_cb, - ffi.Pointer)>(); - - /// @brief Sets the preview data format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This function should be called before previewing (see camera_start_preview()). - /// @param[in] camera The handle to the camera - /// @param[in] format The preview data format - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED. - /// @see camera_start_preview() - /// @see camera_get_preview_format() - /// @see camera_foreach_supported_preview_format() - int camera_set_preview_format( - camera_h camera, - int format, - ) { - return _camera_set_preview_format( - camera, - format, - ); - } - - late final _camera_set_preview_formatPtr = - _lookup>( - 'camera_set_preview_format'); - late final _camera_set_preview_format = - _camera_set_preview_formatPtr.asFunction(); - - /// @brief Gets the format of the preview stream. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] format The preview data format - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_preview_format() - /// @see camera_foreach_supported_preview_format() - int camera_get_preview_format( - camera_h camera, - ffi.Pointer format, - ) { - return _camera_get_preview_format( - camera, - format, - ); - } - - late final _camera_get_preview_formatPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_get_preview_format'); - late final _camera_get_preview_format = _camera_get_preview_formatPtr - .asFunction)>(); - - /// @brief Gets the facing direction of camera module. - /// @since_tizen 3.0 - /// @param[in] camera The handle to the camera - /// @param[out] facing_direction The facing direction of camera module - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - int camera_get_facing_direction( - camera_h camera, - ffi.Pointer facing_direction, - ) { - return _camera_get_facing_direction( - camera, - facing_direction, - ); - } - - late final _camera_get_facing_directionPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_get_facing_direction'); - late final _camera_get_facing_direction = _camera_get_facing_directionPtr - .asFunction)>(); - - /// @brief Gets the camera's flash state. - /// @since_tizen 3.0 - /// @param[in] device The hardware camera to access - /// @param[out] state The current flash state - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @see camera_attr_set_flash_mode() - /// @see camera_attr_get_flash_mode() - int camera_get_flash_state( - int device, - ffi.Pointer state, - ) { - return _camera_get_flash_state( - device, - state, - ); - } - - late final _camera_get_flash_statePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_get_flash_state'); - late final _camera_get_flash_state = _camera_get_flash_statePtr - .asFunction)>(); - - /// @brief Retrieves all supported camera preview formats by invoking the callback function once for each supported camera preview format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_supported_preview_format_cb() repeatedly to retrieve each supported preview format. - /// @see camera_set_preview_format() - /// @see camera_get_preview_format() - /// @see camera_supported_preview_format_cb() - int camera_foreach_supported_preview_format( - camera_h camera, - camera_supported_preview_format_cb callback, - ffi.Pointer user_data, - ) { - return _camera_foreach_supported_preview_format( - camera, - callback, - user_data, - ); - } - - late final _camera_foreach_supported_preview_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_supported_preview_format_cb, - ffi.Pointer)>>( - 'camera_foreach_supported_preview_format'); - late final _camera_foreach_supported_preview_format = - _camera_foreach_supported_preview_formatPtr.asFunction< - int Function(camera_h, camera_supported_preview_format_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE - /// @brief Gets the face detection feature's supported state. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] camera The handle to the camera - /// @return @c true if supported, otherwise @c false - /// @see camera_start_face_detection() - /// @see camera_stop_face_detection() - /// @exception #CAMERA_ERROR_NONE Successful - /// @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - bool camera_is_supported_face_detection( - camera_h camera, - ) { - return _camera_is_supported_face_detection( - camera, - ); - } - - late final _camera_is_supported_face_detectionPtr = - _lookup>( - 'camera_is_supported_face_detection'); - late final _camera_is_supported_face_detection = - _camera_is_supported_face_detectionPtr - .asFunction(); - - /// @brief Gets the zero shutter lag feature's supported state. - /// @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If supporting zero shutter lag, continuous shot can be done with full capture size. \n - /// The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] camera The handle to the camera - /// @return @c true if supported, otherwise @c false - /// @exception #CAMERA_ERROR_NONE Successful - /// @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - bool camera_is_supported_zero_shutter_lag( - camera_h camera, - ) { - return _camera_is_supported_zero_shutter_lag( - camera, - ); - } - - late final _camera_is_supported_zero_shutter_lagPtr = - _lookup>( - 'camera_is_supported_zero_shutter_lag'); - late final _camera_is_supported_zero_shutter_lag = - _camera_is_supported_zero_shutter_lagPtr - .asFunction(); - - /// @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE - /// @brief Gets the camera device count. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If the device supports primary and secondary camera, this returns @c 2. If @c 1 is returned, the device only supports primary camera. - /// @param[in] camera The handle to the camera - /// @param[out] device_count The device count - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - int camera_get_device_count( - camera_h camera, - ffi.Pointer device_count, - ) { - return _camera_get_device_count( - camera, - device_count, - ); - } - - late final _camera_get_device_countPtr = _lookup< - ffi.NativeFunction)>>( - 'camera_get_device_count'); - late final _camera_get_device_count = _camera_get_device_countPtr - .asFunction)>(); - - /// @brief Gets the media packet preview callback feature's supported state. - /// @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] camera The handle to the camera - /// @return @c true if supported, otherwise @c false - /// @exception #CAMERA_ERROR_NONE Successful - /// @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - bool camera_is_supported_media_packet_preview_cb( - camera_h camera, - ) { - return _camera_is_supported_media_packet_preview_cb( - camera, - ); - } - - late final _camera_is_supported_media_packet_preview_cbPtr = - _lookup>( - 'camera_is_supported_media_packet_preview_cb'); - late final _camera_is_supported_media_packet_preview_cb = - _camera_is_supported_media_packet_preview_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be called once per frame when previewing. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This callback does not work in the video recorder mode.\n - /// Before 4.0, the only allowed state for calling this function was #CAMERA_STATE_CREATED.\n - /// Since 4.0, #CAMERA_STATE_PREVIEW has been added as an allowed state,\n - /// so that this function could be called before previewing or even while previewing.\n - /// A registered callback is called on the internal thread of the camera.\n - /// A video frame can be retrieved using a registered callback,\n - /// and the buffer is only available in a registered callback.\n - /// Since tizen 3.0, if you change the buffer in a registered callback,\n - /// it could not be displayed on the device in case of copied buffer.\n - /// and if camera_is_supported_media_packet_preview_cb() returns false,\n - /// it's copied buffer case. - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to be registered - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre Before 4.0 : The camera state must be set to #CAMERA_STATE_CREATED.\n - /// Since 4.0 : The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_start_preview() - /// @see camera_unset_preview_cb() - /// @see camera_preview_cb() - int camera_set_preview_cb( - camera_h camera, - camera_preview_cb callback, - ffi.Pointer user_data, - ) { - return _camera_set_preview_cb( - camera, - callback, - user_data, - ); - } - - late final _camera_set_preview_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_preview_cb, - ffi.Pointer)>>('camera_set_preview_cb'); - late final _camera_set_preview_cb = _camera_set_preview_cbPtr.asFunction< - int Function(camera_h, camera_preview_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_preview_cb() - int camera_unset_preview_cb( - camera_h camera, - ) { - return _camera_unset_preview_cb( - camera, - ); - } - - late final _camera_unset_preview_cbPtr = - _lookup>( - 'camera_unset_preview_cb'); - late final _camera_unset_preview_cb = - _camera_unset_preview_cbPtr.asFunction(); - - /// @brief Registers a media packet callback function to be called once per frame when previewing. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This callback does not work in video recorder mode.\n - /// This function should be called before previewing (see camera_start_preview())\n - /// A registered callback is called on the internal thread of the camera.\n - /// A video frame can be retrieved using a registered callback as a media packet.\n - /// The callback function holds the same buffer that will be drawn on the display device.\n - /// So if you change the media packet in a registered callback, it will be displayed on the device\n - /// and the media packet is available until it's destroyed by media_packet_destroy(). - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to be registered - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera's state should be #CAMERA_STATE_CREATED. - /// @see camera_start_preview() - /// @see camera_unset_media_packet_preview_cb() - /// @see camera_media_packet_preview_cb() - int camera_set_media_packet_preview_cb( - camera_h camera, - camera_media_packet_preview_cb callback, - ffi.Pointer user_data, - ) { - return _camera_set_media_packet_preview_cb( - camera, - callback, - user_data, - ); - } - - late final _camera_set_media_packet_preview_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_media_packet_preview_cb, - ffi.Pointer)>>('camera_set_media_packet_preview_cb'); - late final _camera_set_media_packet_preview_cb = - _camera_set_media_packet_preview_cbPtr.asFunction< - int Function(camera_h, camera_media_packet_preview_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the media packet callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_media_packet_preview_cb() - int camera_unset_media_packet_preview_cb( - camera_h camera, - ) { - return _camera_unset_media_packet_preview_cb( - camera, - ); - } - - late final _camera_unset_media_packet_preview_cbPtr = - _lookup>( - 'camera_unset_media_packet_preview_cb'); - late final _camera_unset_media_packet_preview_cb = - _camera_unset_media_packet_preview_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be called when the camera state changes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function will invoke camera_state_changed_cb() when the camera state changes. - /// @see camera_unset_state_changed_cb() - /// @see camera_state_changed_cb() - int camera_set_state_changed_cb( - camera_h camera, - camera_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _camera_set_state_changed_cb( - camera, - callback, - user_data, - ); - } - - late final _camera_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_state_changed_cb, - ffi.Pointer)>>('camera_set_state_changed_cb'); - late final _camera_set_state_changed_cb = - _camera_set_state_changed_cbPtr.asFunction< - int Function( - camera_h, camera_state_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_state_changed_cb() - int camera_unset_state_changed_cb( - camera_h camera, - ) { - return _camera_unset_state_changed_cb( - camera, - ); - } - - late final _camera_unset_state_changed_cbPtr = - _lookup>( - 'camera_unset_state_changed_cb'); - late final _camera_unset_state_changed_cb = - _camera_unset_state_changed_cbPtr.asFunction(); - - /// @brief Registers a callback function to be called when the camera is interrupted by policy. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_unset_interrupted_cb() - /// @see camera_interrupted_cb() - int camera_set_interrupted_cb( - camera_h camera, - camera_interrupted_cb callback, - ffi.Pointer user_data, - ) { - return _camera_set_interrupted_cb( - camera, - callback, - user_data, - ); - } - - late final _camera_set_interrupted_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_interrupted_cb, - ffi.Pointer)>>('camera_set_interrupted_cb'); - late final _camera_set_interrupted_cb = - _camera_set_interrupted_cbPtr.asFunction< - int Function( - camera_h, camera_interrupted_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_interrupted_cb() - int camera_unset_interrupted_cb( - camera_h camera, - ) { - return _camera_unset_interrupted_cb( - camera, - ); - } - - late final _camera_unset_interrupted_cbPtr = - _lookup>( - 'camera_unset_interrupted_cb'); - late final _camera_unset_interrupted_cb = - _camera_unset_interrupted_cbPtr.asFunction(); - - /// @brief Registers a callback function to be called when the camera interrupt is started by policy. - /// @since_tizen 4.0 - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @see camera_unset_interrupt_started_cb() - /// @see camera_interrupt_started_cb() - int camera_set_interrupt_started_cb( - camera_h camera, - camera_interrupt_started_cb callback, - ffi.Pointer user_data, - ) { - return _camera_set_interrupt_started_cb( - camera, - callback, - user_data, - ); - } - - late final _camera_set_interrupt_started_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_interrupt_started_cb, - ffi.Pointer)>>('camera_set_interrupt_started_cb'); - late final _camera_set_interrupt_started_cb = - _camera_set_interrupt_started_cbPtr.asFunction< - int Function( - camera_h, camera_interrupt_started_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen 4.0 - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @see camera_set_interrupt_started_cb() - int camera_unset_interrupt_started_cb( - camera_h camera, - ) { - return _camera_unset_interrupt_started_cb( - camera, - ); - } - - late final _camera_unset_interrupt_started_cbPtr = - _lookup>( - 'camera_unset_interrupt_started_cb'); - late final _camera_unset_interrupt_started_cb = - _camera_unset_interrupt_started_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be called when the auto-focus state changes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function will invoke camera_focus_changed_cb() when the auto-focus state changes. - /// @see camera_start_focusing() - /// @see camera_cancel_focusing() - /// @see camera_unset_focus_changed_cb() - /// @see camera_focus_changed_cb() - int camera_set_focus_changed_cb( - camera_h camera, - camera_focus_changed_cb callback, - ffi.Pointer user_data, - ) { - return _camera_set_focus_changed_cb( - camera, - callback, - user_data, - ); - } - - late final _camera_set_focus_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_focus_changed_cb, - ffi.Pointer)>>('camera_set_focus_changed_cb'); - late final _camera_set_focus_changed_cb = - _camera_set_focus_changed_cbPtr.asFunction< - int Function( - camera_h, camera_focus_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_focus_changed_cb() - int camera_unset_focus_changed_cb( - camera_h camera, - ) { - return _camera_unset_focus_changed_cb( - camera, - ); - } - - late final _camera_unset_focus_changed_cbPtr = - _lookup>( - 'camera_unset_focus_changed_cb'); - late final _camera_unset_focus_changed_cb = - _camera_unset_focus_changed_cbPtr.asFunction(); - - /// @brief Registers a callback function to be called when an asynchronous operation error occurs. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This callback informs about a critical error situation.\n - /// When this callback is invoked, the user should release the resource and terminate the application.\n - /// In case of errors, one of the following codes will occur:\n - /// #CAMERA_ERROR_DEVICE,\n - /// #CAMERA_ERROR_INVALID_OPERATION,\n - /// #CAMERA_ERROR_OUT_OF_MEMORY. - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function will invoke camera_error_cb() when an asynchronous operation error occurs. - /// - /// @see camera_unset_error_cb() - /// @see camera_error_cb() - int camera_set_error_cb( - camera_h camera, - camera_error_cb callback, - ffi.Pointer user_data, - ) { - return _camera_set_error_cb( - camera, - callback, - user_data, - ); - } - - late final _camera_set_error_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_error_cb, - ffi.Pointer)>>('camera_set_error_cb'); - late final _camera_set_error_cb = _camera_set_error_cbPtr.asFunction< - int Function(camera_h, camera_error_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_error_cb() - int camera_unset_error_cb( - camera_h camera, - ) { - return _camera_unset_error_cb( - camera, - ); - } - - late final _camera_unset_error_cbPtr = - _lookup>( - 'camera_unset_error_cb'); - late final _camera_unset_error_cb = - _camera_unset_error_cbPtr.asFunction(); - - /// @brief Gets the state of camera device. - /// @since_tizen 3.0 - /// @param[in] device The hardware camera type - /// @param[out] state The current state of the device - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - int camera_get_device_state( - int device, - ffi.Pointer state, - ) { - return _camera_get_device_state( - device, - state, - ); - } - - late final _camera_get_device_statePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_get_device_state'); - late final _camera_get_device_state = _camera_get_device_statePtr - .asFunction)>(); - - /// @brief Registers a callback function to be called when the camera device state changes. - /// @since_tizen 3.0 - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] cb_id The id of registered callback - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @post This function will invoke camera_device_state_changed_cb() when the camera device's state changes. - /// @see camera_remove_device_state_changed_cb() - /// @see camera_device_state_changed_cb() - int camera_add_device_state_changed_cb( - camera_device_state_changed_cb callback, - ffi.Pointer user_data, - ffi.Pointer cb_id, - ) { - return _camera_add_device_state_changed_cb( - callback, - user_data, - cb_id, - ); - } - - late final _camera_add_device_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - camera_device_state_changed_cb, - ffi.Pointer, - ffi.Pointer)>>('camera_add_device_state_changed_cb'); - late final _camera_add_device_state_changed_cb = - _camera_add_device_state_changed_cbPtr.asFunction< - int Function(camera_device_state_changed_cb, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen 3.0 - /// @param[in] cb_id The id of registered callback - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @see camera_add_device_state_changed_cb() - int camera_remove_device_state_changed_cb( - int cb_id, - ) { - return _camera_remove_device_state_changed_cb( - cb_id, - ); - } - - late final _camera_remove_device_state_changed_cbPtr = - _lookup>( - 'camera_remove_device_state_changed_cb'); - late final _camera_remove_device_state_changed_cb = - _camera_remove_device_state_changed_cbPtr.asFunction(); - - /// @brief Sets the preview frame rate. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This function should be called before previewing (see camera_start_preview()). - /// @param[in] camera The handle to the camera - /// @param[in] fps The frame rate - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED. - /// @see camera_start_preview() - /// @see camera_attr_get_preview_fps() - /// @see camera_attr_foreach_supported_fps() - int camera_attr_set_preview_fps( - camera_h camera, - int fps, - ) { - return _camera_attr_set_preview_fps( - camera, - fps, - ); - } - - late final _camera_attr_set_preview_fpsPtr = - _lookup>( - 'camera_attr_set_preview_fps'); - late final _camera_attr_set_preview_fps = - _camera_attr_set_preview_fpsPtr.asFunction(); - - /// @brief Gets the frames per second of a preview video stream. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] fps The frames per second of the preview video stream - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_preview_fps() - /// @see camera_attr_foreach_supported_fps() - int camera_attr_get_preview_fps( - camera_h camera, - ffi.Pointer fps, - ) { - return _camera_attr_get_preview_fps( - camera, - fps, - ); - } - - late final _camera_attr_get_preview_fpsPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_get_preview_fps'); - late final _camera_attr_get_preview_fps = _camera_attr_get_preview_fpsPtr - .asFunction)>(); - - /// @brief Retrieves all supported FPS modes by invoking the callback function once for each supported FPS mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_attr_supported_fps_cb() repeatedly to get each supported FPS mode. - /// @see camera_attr_set_preview_fps() - /// @see camera_attr_get_preview_fps() - /// @see camera_attr_supported_fps_cb() - int camera_attr_foreach_supported_fps( - camera_h camera, - camera_attr_supported_fps_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_foreach_supported_fps( - camera, - callback, - user_data, - ); - } - - late final _camera_attr_foreach_supported_fpsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_attr_supported_fps_cb, - ffi.Pointer)>>('camera_attr_foreach_supported_fps'); - late final _camera_attr_foreach_supported_fps = - _camera_attr_foreach_supported_fpsPtr.asFunction< - int Function( - camera_h, camera_attr_supported_fps_cb, ffi.Pointer)>(); - - /// @brief Retrieves all supported FPS modes by invoking the callback function once for each supported FPS mode. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] camera The handle to the camera - /// @param[in] width Required preview resolution's width - /// @param[in] height Required preview resolution's height - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_attr_supported_fps_cb() repeatedly to get each supported FPS mode. - /// @see camera_attr_set_preview_fps() - /// @see camera_attr_get_preview_fps() - /// @see camera_attr_supported_fps_cb() - int camera_attr_foreach_supported_fps_by_resolution( - camera_h camera, - int width, - int height, - camera_attr_supported_fps_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_foreach_supported_fps_by_resolution( - camera, - width, - height, - callback, - user_data, - ); - } - - late final _camera_attr_foreach_supported_fps_by_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Int, ffi.Int, - camera_attr_supported_fps_cb, ffi.Pointer)>>( - 'camera_attr_foreach_supported_fps_by_resolution'); - late final _camera_attr_foreach_supported_fps_by_resolution = - _camera_attr_foreach_supported_fps_by_resolutionPtr.asFunction< - int Function(camera_h, int, int, camera_attr_supported_fps_cb, - ffi.Pointer)>(); - - /// @brief Sets quality of the image. - /// @details The range for image quality is 1 to 100. If @a quality is out of range, #CAMERA_ERROR_INVALID_PARAMETER error occurred. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] quality The quality of image (1 ~ 100) - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_start_preview() - /// @see camera_attr_get_image_quality() - int camera_attr_set_image_quality( - camera_h camera, - int quality, - ) { - return _camera_attr_set_image_quality( - camera, - quality, - ); - } - - late final _camera_attr_set_image_qualityPtr = - _lookup>( - 'camera_attr_set_image_quality'); - late final _camera_attr_set_image_quality = _camera_attr_set_image_qualityPtr - .asFunction(); - - /// @brief Gets the quality of a still image, which is captured. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] quality The quality of the image(1 ~ 100) - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_image_quality() - int camera_attr_get_image_quality( - camera_h camera, - ffi.Pointer quality, - ) { - return _camera_attr_get_image_quality( - camera, - quality, - ); - } - - late final _camera_attr_get_image_qualityPtr = _lookup< - ffi.NativeFunction)>>( - 'camera_attr_get_image_quality'); - late final _camera_attr_get_image_quality = _camera_attr_get_image_qualityPtr - .asFunction)>(); - - /// @brief Gets the bit rate of encoded preview. - /// @since_tizen 3.0 - /// @param[in] camera The handle to the camera - /// @param[out] bitrate The bit rate of encoded preview - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_encoded_preview_bitrate() - int camera_attr_get_encoded_preview_bitrate( - camera_h camera, - ffi.Pointer bitrate, - ) { - return _camera_attr_get_encoded_preview_bitrate( - camera, - bitrate, - ); - } - - late final _camera_attr_get_encoded_preview_bitratePtr = _lookup< - ffi.NativeFunction)>>( - 'camera_attr_get_encoded_preview_bitrate'); - late final _camera_attr_get_encoded_preview_bitrate = - _camera_attr_get_encoded_preview_bitratePtr - .asFunction)>(); - - /// @brief Sets the bit rate of encoded preview. - /// @since_tizen 3.0 - /// @param[in] camera The handle to the camera - /// @param[in] bitrate The bit rate of encoded preview - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_get_encoded_preview_bitrate() - int camera_attr_set_encoded_preview_bitrate( - camera_h camera, - int bitrate, - ) { - return _camera_attr_set_encoded_preview_bitrate( - camera, - bitrate, - ); - } - - late final _camera_attr_set_encoded_preview_bitratePtr = - _lookup>( - 'camera_attr_set_encoded_preview_bitrate'); - late final _camera_attr_set_encoded_preview_bitrate = - _camera_attr_set_encoded_preview_bitratePtr - .asFunction(); - - /// @brief Gets the GOP(Group Of Pictures) interval of encoded preview. - /// @since_tizen 3.0 - /// @param[in] camera The handle to the camera - /// @param[out] interval the GOP interval of encoded preview (millisecond) - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_get_encoded_preview_gop_interval() - int camera_attr_get_encoded_preview_gop_interval( - camera_h camera, - ffi.Pointer interval, - ) { - return _camera_attr_get_encoded_preview_gop_interval( - camera, - interval, - ); - } - - late final _camera_attr_get_encoded_preview_gop_intervalPtr = _lookup< - ffi.NativeFunction)>>( - 'camera_attr_get_encoded_preview_gop_interval'); - late final _camera_attr_get_encoded_preview_gop_interval = - _camera_attr_get_encoded_preview_gop_intervalPtr - .asFunction)>(); - - /// @brief Sets the GOP(Group Of Pictures) interval of encoded preview. - /// @since_tizen 3.0 - /// @param[in] camera The handle to the camera - /// @param[in] interval the GOP interval of encoded preview (millisecond) - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_encoded_preview_gop_interval() - int camera_attr_set_encoded_preview_gop_interval( - camera_h camera, - int interval, - ) { - return _camera_attr_set_encoded_preview_gop_interval( - camera, - interval, - ); - } - - late final _camera_attr_set_encoded_preview_gop_intervalPtr = - _lookup>( - 'camera_attr_set_encoded_preview_gop_interval'); - late final _camera_attr_set_encoded_preview_gop_interval = - _camera_attr_set_encoded_preview_gop_intervalPtr - .asFunction(); - - /// @brief Sets the zoom level. - /// @details The range for the zoom level is received from camera_attr_get_zoom_range(). If @a zoom is out of range, the #CAMERA_ERROR_INVALID_PARAMETER error occurs. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] zoom The zoom level - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_get_zoom() - /// @see camera_attr_get_zoom_range() - int camera_attr_set_zoom( - camera_h camera, - int zoom, - ) { - return _camera_attr_set_zoom( - camera, - zoom, - ); - } - - late final _camera_attr_set_zoomPtr = - _lookup>( - 'camera_attr_set_zoom'); - late final _camera_attr_set_zoom = - _camera_attr_set_zoomPtr.asFunction(); - - /// @brief Gets the zoom level. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] zoom The zoom level - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_zoom() - /// @see camera_attr_get_zoom_range() - int camera_attr_get_zoom( - camera_h camera, - ffi.Pointer zoom, - ) { - return _camera_attr_get_zoom( - camera, - zoom, - ); - } - - late final _camera_attr_get_zoomPtr = _lookup< - ffi.NativeFunction)>>( - 'camera_attr_get_zoom'); - late final _camera_attr_get_zoom = _camera_attr_get_zoomPtr - .asFunction)>(); - - /// @brief Gets the available zoom level. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If the min value is greater than the max value, it means that this feature is not supported. - /// @param[in] camera The handle to the camera - /// @param[out] min The minimum zoom level - /// @param[out] max The maximum zoom level - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_zoom() - /// @see camera_attr_get_zoom() - int camera_attr_get_zoom_range( - camera_h camera, - ffi.Pointer min, - ffi.Pointer max, - ) { - return _camera_attr_get_zoom_range( - camera, - min, - max, - ); - } - - late final _camera_attr_get_zoom_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Pointer, - ffi.Pointer)>>('camera_attr_get_zoom_range'); - late final _camera_attr_get_zoom_range = - _camera_attr_get_zoom_rangePtr.asFunction< - int Function(camera_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the auto focus mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] mode The auto focus mode - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_get_af_mode() - /// @see camera_attr_foreach_supported_af_mode() - /// @see #camera_attr_af_mode_e - int camera_attr_set_af_mode( - camera_h camera, - int mode, - ) { - return _camera_attr_set_af_mode( - camera, - mode, - ); - } - - late final _camera_attr_set_af_modePtr = - _lookup>( - 'camera_attr_set_af_mode'); - late final _camera_attr_set_af_mode = - _camera_attr_set_af_modePtr.asFunction(); - - /// @brief Gets the auto focus mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] mode The auto focus mode - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_foreach_supported_af_mode() - /// @see camera_attr_set_af_mode() - /// @see #camera_attr_af_mode_e - int camera_attr_get_af_mode( - camera_h camera, - ffi.Pointer mode, - ) { - return _camera_attr_get_af_mode( - camera, - mode, - ); - } - - late final _camera_attr_get_af_modePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_get_af_mode'); - late final _camera_attr_get_af_mode = _camera_attr_get_af_modePtr - .asFunction)>(); - - /// @brief Sets auto focus area. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This API is invalid in the #CAMERA_ATTR_AF_NONE mode.\n - /// The coordinates are mapped to preview area. - /// @param[in] camera The handle to the camera - /// @param[in] x The x coordinates of the focus area - /// @param[in] y The y coordinates of the focus area - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_set_af_mode() - /// @see camera_attr_clear_af_area() - int camera_attr_set_af_area( - camera_h camera, - int x, - int y, - ) { - return _camera_attr_set_af_area( - camera, - x, - y, - ); - } - - late final _camera_attr_set_af_areaPtr = - _lookup>( - 'camera_attr_set_af_area'); - late final _camera_attr_set_af_area = _camera_attr_set_af_areaPtr - .asFunction(); - - /// @brief Clears the auto focus area. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The focusing area is set to the center. - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_af_mode() - /// @see camera_attr_set_af_area() - int camera_attr_clear_af_area( - camera_h camera, - ) { - return _camera_attr_clear_af_area( - camera, - ); - } - - late final _camera_attr_clear_af_areaPtr = - _lookup>( - 'camera_attr_clear_af_area'); - late final _camera_attr_clear_af_area = - _camera_attr_clear_af_areaPtr.asFunction(); - - /// @brief Retrieves all supported auto focus modes by invoking the callback function once for each supported auto focus mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_attr_supported_af_mode_cb() to get all the supported auto focus modes. - /// @see camera_attr_set_af_mode() - /// @see camera_attr_get_af_mode() - /// @see camera_attr_supported_af_mode_cb() - int camera_attr_foreach_supported_af_mode( - camera_h camera, - camera_attr_supported_af_mode_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_foreach_supported_af_mode( - camera, - callback, - user_data, - ); - } - - late final _camera_attr_foreach_supported_af_modePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_attr_supported_af_mode_cb, - ffi.Pointer)>>('camera_attr_foreach_supported_af_mode'); - late final _camera_attr_foreach_supported_af_mode = - _camera_attr_foreach_supported_af_modePtr.asFunction< - int Function(camera_h, camera_attr_supported_af_mode_cb, - ffi.Pointer)>(); - - /// @brief Sets the exposure mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] mode The exposure mode - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_get_exposure_mode() - /// @see camera_attr_foreach_supported_exposure_mode() - int camera_attr_set_exposure_mode( - camera_h camera, - int mode, - ) { - return _camera_attr_set_exposure_mode( - camera, - mode, - ); - } - - late final _camera_attr_set_exposure_modePtr = - _lookup>( - 'camera_attr_set_exposure_mode'); - late final _camera_attr_set_exposure_mode = _camera_attr_set_exposure_modePtr - .asFunction(); - - /// @brief Gets the exposure mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] mode The exposure mode - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_exposure_mode() - /// @see camera_attr_foreach_supported_exposure_mode() - int camera_attr_get_exposure_mode( - camera_h camera, - ffi.Pointer mode, - ) { - return _camera_attr_get_exposure_mode( - camera, - mode, - ); - } - - late final _camera_attr_get_exposure_modePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_get_exposure_mode'); - late final _camera_attr_get_exposure_mode = _camera_attr_get_exposure_modePtr - .asFunction)>(); - - /// @brief Retrieves all supported exposure modes by invoking the callback function once for each supported exposure mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_attr_supported_exposure_mode_cb() to get all the supported exposure modes. - /// @see camera_attr_set_exposure_mode() - /// @see camera_attr_get_exposure_mode() - /// @see camera_attr_supported_exposure_mode_cb() - int camera_attr_foreach_supported_exposure_mode( - camera_h camera, - camera_attr_supported_exposure_mode_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_foreach_supported_exposure_mode( - camera, - callback, - user_data, - ); - } - - late final _camera_attr_foreach_supported_exposure_modePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_attr_supported_exposure_mode_cb, - ffi.Pointer)>>( - 'camera_attr_foreach_supported_exposure_mode'); - late final _camera_attr_foreach_supported_exposure_mode = - _camera_attr_foreach_supported_exposure_modePtr.asFunction< - int Function(camera_h, camera_attr_supported_exposure_mode_cb, - ffi.Pointer)>(); - - /// @brief Sets the exposure value. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] value The exposure value - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_get_exposure() - int camera_attr_set_exposure( - camera_h camera, - int value, - ) { - return _camera_attr_set_exposure( - camera, - value, - ); - } - - late final _camera_attr_set_exposurePtr = - _lookup>( - 'camera_attr_set_exposure'); - late final _camera_attr_set_exposure = - _camera_attr_set_exposurePtr.asFunction(); - - /// @brief Gets the exposure value. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] value The exposure value - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_exposure() - int camera_attr_get_exposure( - camera_h camera, - ffi.Pointer value, - ) { - return _camera_attr_get_exposure( - camera, - value, - ); - } - - late final _camera_attr_get_exposurePtr = _lookup< - ffi.NativeFunction)>>( - 'camera_attr_get_exposure'); - late final _camera_attr_get_exposure = _camera_attr_get_exposurePtr - .asFunction)>(); - - /// @brief Gets the available exposure value. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If the min value is greater than the max value, it means that this feature is not supported. - /// @param[in] camera The handle to the camera - /// @param[out] min The minimum exposure value - /// @param[out] max The maximum exposure value - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_exposure() - int camera_attr_get_exposure_range( - camera_h camera, - ffi.Pointer min, - ffi.Pointer max, - ) { - return _camera_attr_get_exposure_range( - camera, - min, - max, - ); - } - - late final _camera_attr_get_exposure_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Pointer, - ffi.Pointer)>>('camera_attr_get_exposure_range'); - late final _camera_attr_get_exposure_range = - _camera_attr_get_exposure_rangePtr.asFunction< - int Function(camera_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the ISO level. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] iso The ISO level - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_get_iso() - /// @see camera_attr_foreach_supported_iso() - int camera_attr_set_iso( - camera_h camera, - int iso, - ) { - return _camera_attr_set_iso( - camera, - iso, - ); - } - - late final _camera_attr_set_isoPtr = - _lookup>( - 'camera_attr_set_iso'); - late final _camera_attr_set_iso = - _camera_attr_set_isoPtr.asFunction(); - - /// @brief Gets the ISO level. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] iso The ISO level - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_iso() - /// @see camera_attr_foreach_supported_iso() - int camera_attr_get_iso( - camera_h camera, - ffi.Pointer iso, - ) { - return _camera_attr_get_iso( - camera, - iso, - ); - } - - late final _camera_attr_get_isoPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_get_iso'); - late final _camera_attr_get_iso = _camera_attr_get_isoPtr - .asFunction)>(); - - /// @brief Retrieves all supported ISO levels by invoking the callback function once for each supported ISO level. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_attr_supported_iso_cb() to get all the supported ISO levels. - /// @see camera_attr_set_iso() - /// @see camera_attr_get_iso() - /// @see camera_attr_supported_iso_cb() - int camera_attr_foreach_supported_iso( - camera_h camera, - camera_attr_supported_iso_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_foreach_supported_iso( - camera, - callback, - user_data, - ); - } - - late final _camera_attr_foreach_supported_isoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_attr_supported_iso_cb, - ffi.Pointer)>>('camera_attr_foreach_supported_iso'); - late final _camera_attr_foreach_supported_iso = - _camera_attr_foreach_supported_isoPtr.asFunction< - int Function( - camera_h, camera_attr_supported_iso_cb, ffi.Pointer)>(); - - /// @brief Sets the theater mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If you want to display the preview image on the external display with the full screen mode, use this function. - /// @param[in] camera The handle to the camera - /// @param[in] mode The mode to change - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre This function is valid only when the external display is connected. - /// @see camera_attr_get_theater_mode() - int camera_attr_set_theater_mode( - camera_h camera, - int mode, - ) { - return _camera_attr_set_theater_mode( - camera, - mode, - ); - } - - late final _camera_attr_set_theater_modePtr = - _lookup>( - 'camera_attr_set_theater_mode'); - late final _camera_attr_set_theater_mode = _camera_attr_set_theater_modePtr - .asFunction(); - - /// @brief Gets the theater mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] mode Current theater mode - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_get_theater_mode() - int camera_attr_get_theater_mode( - camera_h camera, - ffi.Pointer mode, - ) { - return _camera_attr_get_theater_mode( - camera, - mode, - ); - } - - late final _camera_attr_get_theater_modePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_get_theater_mode'); - late final _camera_attr_get_theater_mode = _camera_attr_get_theater_modePtr - .asFunction)>(); - - /// @brief Retrieves all supported theater modes by invoking callback function once for each supported theater modes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_attr_supported_theater_mode_cb() to get all supported theater modes. - /// @see camera_attr_set_theater_mode() - /// @see camera_attr_get_theater_mode() - /// @see camera_attr_supported_theater_mode_cb() - int camera_attr_foreach_supported_theater_mode( - camera_h camera, - camera_attr_supported_theater_mode_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_foreach_supported_theater_mode( - camera, - callback, - user_data, - ); - } - - late final _camera_attr_foreach_supported_theater_modePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_attr_supported_theater_mode_cb, - ffi.Pointer)>>( - 'camera_attr_foreach_supported_theater_mode'); - late final _camera_attr_foreach_supported_theater_mode = - _camera_attr_foreach_supported_theater_modePtr.asFunction< - int Function(camera_h, camera_attr_supported_theater_mode_cb, - ffi.Pointer)>(); - - /// @brief Sets the brightness level. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If the min value is greater than the max value from camera_attr_get_brightness_range(), \n - /// it means that this feature is not supported. - /// @param[in] camera The handle to the camera - /// @param[in] level The brightness level - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_get_brightness() - /// @see camera_attr_get_brightness_range() - int camera_attr_set_brightness( - camera_h camera, - int level, - ) { - return _camera_attr_set_brightness( - camera, - level, - ); - } - - late final _camera_attr_set_brightnessPtr = - _lookup>( - 'camera_attr_set_brightness'); - late final _camera_attr_set_brightness = - _camera_attr_set_brightnessPtr.asFunction(); - - /// @brief Gets the brightness level. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] level The brightness level - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_brightness() - /// @see camera_attr_get_brightness_range() - int camera_attr_get_brightness( - camera_h camera, - ffi.Pointer level, - ) { - return _camera_attr_get_brightness( - camera, - level, - ); - } - - late final _camera_attr_get_brightnessPtr = _lookup< - ffi.NativeFunction)>>( - 'camera_attr_get_brightness'); - late final _camera_attr_get_brightness = _camera_attr_get_brightnessPtr - .asFunction)>(); - - /// @brief Gets the available brightness level. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If the min value is greater than the max value, it means that this feature is not supported. - /// @param[in] camera The handle to the camera - /// @param[out] min The minimum brightness level - /// @param[out] max The maximum brightness level - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_brightness() - /// @see camera_attr_get_brightness() - int camera_attr_get_brightness_range( - camera_h camera, - ffi.Pointer min, - ffi.Pointer max, - ) { - return _camera_attr_get_brightness_range( - camera, - min, - max, - ); - } - - late final _camera_attr_get_brightness_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Pointer, - ffi.Pointer)>>('camera_attr_get_brightness_range'); - late final _camera_attr_get_brightness_range = - _camera_attr_get_brightness_rangePtr.asFunction< - int Function(camera_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the contrast level. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] level The contrast level - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_get_contrast() - /// @see camera_attr_get_contrast_range() - int camera_attr_set_contrast( - camera_h camera, - int level, - ) { - return _camera_attr_set_contrast( - camera, - level, - ); - } - - late final _camera_attr_set_contrastPtr = - _lookup>( - 'camera_attr_set_contrast'); - late final _camera_attr_set_contrast = - _camera_attr_set_contrastPtr.asFunction(); - - /// @brief Gets the contrast level. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] level The contrast level - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_contrast() - /// @see camera_attr_get_contrast_range() - int camera_attr_get_contrast( - camera_h camera, - ffi.Pointer level, - ) { - return _camera_attr_get_contrast( - camera, - level, - ); - } - - late final _camera_attr_get_contrastPtr = _lookup< - ffi.NativeFunction)>>( - 'camera_attr_get_contrast'); - late final _camera_attr_get_contrast = _camera_attr_get_contrastPtr - .asFunction)>(); - - /// @brief Gets the available contrast level. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If the min value is greater than the max value, it means that this feature is not supported. - /// @param[in] camera The handle to the camera - /// @param[out] min The minimum contrast level - /// @param[out] max The maximum contrast level - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_contrast() - /// @see camera_attr_get_contrast() - int camera_attr_get_contrast_range( - camera_h camera, - ffi.Pointer min, - ffi.Pointer max, - ) { - return _camera_attr_get_contrast_range( - camera, - min, - max, - ); - } - - late final _camera_attr_get_contrast_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Pointer, - ffi.Pointer)>>('camera_attr_get_contrast_range'); - late final _camera_attr_get_contrast_range = - _camera_attr_get_contrast_rangePtr.asFunction< - int Function(camera_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the white balance mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] whitebalance The white balance mode - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_foreach_supported_whitebalance() - /// @see camera_attr_get_whitebalance() - int camera_attr_set_whitebalance( - camera_h camera, - int whitebalance, - ) { - return _camera_attr_set_whitebalance( - camera, - whitebalance, - ); - } - - late final _camera_attr_set_whitebalancePtr = - _lookup>( - 'camera_attr_set_whitebalance'); - late final _camera_attr_set_whitebalance = _camera_attr_set_whitebalancePtr - .asFunction(); - - /// @brief Gets the white balance mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] whitebalance The white balance mode - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_foreach_supported_whitebalance() - /// @see camera_attr_set_whitebalance() - int camera_attr_get_whitebalance( - camera_h camera, - ffi.Pointer whitebalance, - ) { - return _camera_attr_get_whitebalance( - camera, - whitebalance, - ); - } - - late final _camera_attr_get_whitebalancePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_get_whitebalance'); - late final _camera_attr_get_whitebalance = _camera_attr_get_whitebalancePtr - .asFunction)>(); - - /// @brief Retrieves all supported white balances by invoking the callback function once for each supported white balance. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_attr_supported_whitebalance_cb() to get all the supported white balances. - /// @see camera_attr_set_whitebalance() - /// @see camera_attr_get_whitebalance() - /// @see camera_attr_supported_whitebalance_cb() - int camera_attr_foreach_supported_whitebalance( - camera_h camera, - camera_attr_supported_whitebalance_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_foreach_supported_whitebalance( - camera, - callback, - user_data, - ); - } - - late final _camera_attr_foreach_supported_whitebalancePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_attr_supported_whitebalance_cb, - ffi.Pointer)>>( - 'camera_attr_foreach_supported_whitebalance'); - late final _camera_attr_foreach_supported_whitebalance = - _camera_attr_foreach_supported_whitebalancePtr.asFunction< - int Function(camera_h, camera_attr_supported_whitebalance_cb, - ffi.Pointer)>(); - - /// @brief Sets the camera effect mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] effect The camera effect mode - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_foreach_supported_effect() - /// @see camera_attr_get_effect() - int camera_attr_set_effect( - camera_h camera, - int effect, - ) { - return _camera_attr_set_effect( - camera, - effect, - ); - } - - late final _camera_attr_set_effectPtr = - _lookup>( - 'camera_attr_set_effect'); - late final _camera_attr_set_effect = - _camera_attr_set_effectPtr.asFunction(); - - /// @brief Gets the camera effect mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] effect The camera effect mode - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_foreach_supported_effect() - /// @see camera_attr_set_effect() - int camera_attr_get_effect( - camera_h camera, - ffi.Pointer effect, - ) { - return _camera_attr_get_effect( - camera, - effect, - ); - } - - late final _camera_attr_get_effectPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_get_effect'); - late final _camera_attr_get_effect = _camera_attr_get_effectPtr - .asFunction)>(); - - /// @brief Retrieves all supported effect modes by invoking the callback function once for each supported effect mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_attr_supported_effect_cb() to get all the supported effect modes. - /// @see camera_attr_set_effect() - /// @see camera_attr_get_effect() - /// @see camera_attr_supported_effect_cb() - int camera_attr_foreach_supported_effect( - camera_h camera, - camera_attr_supported_effect_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_foreach_supported_effect( - camera, - callback, - user_data, - ); - } - - late final _camera_attr_foreach_supported_effectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_attr_supported_effect_cb, - ffi.Pointer)>>('camera_attr_foreach_supported_effect'); - late final _camera_attr_foreach_supported_effect = - _camera_attr_foreach_supported_effectPtr.asFunction< - int Function(camera_h, camera_attr_supported_effect_cb, - ffi.Pointer)>(); - - /// @brief Sets the scene mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] mode The scene mode - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_foreach_supported_scene_mode() - /// @see camera_attr_get_scene_mode() - int camera_attr_set_scene_mode( - camera_h camera, - int mode, - ) { - return _camera_attr_set_scene_mode( - camera, - mode, - ); - } - - late final _camera_attr_set_scene_modePtr = - _lookup>( - 'camera_attr_set_scene_mode'); - late final _camera_attr_set_scene_mode = - _camera_attr_set_scene_modePtr.asFunction(); - - /// @brief Gets the scene mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] mode The scene mode - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_foreach_supported_scene_mode() - /// @see camera_attr_set_scene_mode() - int camera_attr_get_scene_mode( - camera_h camera, - ffi.Pointer mode, - ) { - return _camera_attr_get_scene_mode( - camera, - mode, - ); - } - - late final _camera_attr_get_scene_modePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_get_scene_mode'); - late final _camera_attr_get_scene_mode = _camera_attr_get_scene_modePtr - .asFunction)>(); - - /// @brief Retrieves all supported scene modes by invoking the callback function once for each supported scene mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_attr_supported_scene_mode_cb() to get all the supported scene modes. - /// @see camera_attr_set_scene_mode() - /// @see camera_attr_get_scene_mode() - /// @see camera_attr_supported_scene_mode_cb() - int camera_attr_foreach_supported_scene_mode( - camera_h camera, - camera_attr_supported_scene_mode_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_foreach_supported_scene_mode( - camera, - callback, - user_data, - ); - } - - late final _camera_attr_foreach_supported_scene_modePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_attr_supported_scene_mode_cb, - ffi.Pointer)>>( - 'camera_attr_foreach_supported_scene_mode'); - late final _camera_attr_foreach_supported_scene_mode = - _camera_attr_foreach_supported_scene_modePtr.asFunction< - int Function(camera_h, camera_attr_supported_scene_mode_cb, - ffi.Pointer)>(); - - /// @brief Enables to write EXIF(Exchangeable image file format) tags in a JPEG file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] enable If @c true writing EXIF tags in a JPEG file is enabled, otherwise @c false - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_is_enabled_tag() - int camera_attr_enable_tag( - camera_h camera, - bool enable, - ) { - return _camera_attr_enable_tag( - camera, - enable, - ); - } - - late final _camera_attr_enable_tagPtr = - _lookup>( - 'camera_attr_enable_tag'); - late final _camera_attr_enable_tag = - _camera_attr_enable_tagPtr.asFunction(); - - /// @brief Gets the value that indicates whether writing EXIF(Exchangeable image file format) tags in a JPEG file is enabled. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] enabled If @c true camera information is enabled, otherwise @c false - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_enable_tag() - int camera_attr_is_enabled_tag( - camera_h camera, - ffi.Pointer enabled, - ) { - return _camera_attr_is_enabled_tag( - camera, - enabled, - ); - } - - late final _camera_attr_is_enabled_tagPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_is_enabled_tag'); - late final _camera_attr_is_enabled_tag = _camera_attr_is_enabled_tagPtr - .asFunction)>(); - - /// @brief Sets the camera image description in the EXIF(Exchangeable image file format) tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] description The string with description - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_get_tag_image_description() - int camera_attr_set_tag_image_description( - camera_h camera, - ffi.Pointer description, - ) { - return _camera_attr_set_tag_image_description( - camera, - description, - ); - } - - late final _camera_attr_set_tag_image_descriptionPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_set_tag_image_description'); - late final _camera_attr_set_tag_image_description = - _camera_attr_set_tag_image_descriptionPtr - .asFunction)>(); - - /// @brief Gets the camera image description in EXIF(Exchangeable image file format) tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a description using free(). - /// @param[in] camera The handle to the camera - /// @param[out] description A pointer to a string - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_tag_image_description() - int camera_attr_get_tag_image_description( - camera_h camera, - ffi.Pointer> description, - ) { - return _camera_attr_get_tag_image_description( - camera, - description, - ); - } - - late final _camera_attr_get_tag_image_descriptionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Pointer>)>>( - 'camera_attr_get_tag_image_description'); - late final _camera_attr_get_tag_image_description = - _camera_attr_get_tag_image_descriptionPtr.asFunction< - int Function(camera_h, ffi.Pointer>)>(); - - /// @brief Sets the camera orientation in the EXIF(Exchangeable image file format) tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] orientation The camera orientation - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_get_tag_orientation() - int camera_attr_set_tag_orientation( - camera_h camera, - int orientation, - ) { - return _camera_attr_set_tag_orientation( - camera, - orientation, - ); - } - - late final _camera_attr_set_tag_orientationPtr = - _lookup>( - 'camera_attr_set_tag_orientation'); - late final _camera_attr_set_tag_orientation = - _camera_attr_set_tag_orientationPtr - .asFunction(); - - /// @brief Gets the camera orientation in the EXIF(Exchangeable image file format) tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] orientation The camera orientation - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_tag_orientation() - int camera_attr_get_tag_orientation( - camera_h camera, - ffi.Pointer orientation, - ) { - return _camera_attr_get_tag_orientation( - camera, - orientation, - ); - } - - late final _camera_attr_get_tag_orientationPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_get_tag_orientation'); - late final _camera_attr_get_tag_orientation = - _camera_attr_get_tag_orientationPtr - .asFunction)>(); - - /// @brief Sets the software information in the EXIF(Exchangeable image file format) tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] software The software information tag - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_get_tag_software() - int camera_attr_set_tag_software( - camera_h camera, - ffi.Pointer software, - ) { - return _camera_attr_set_tag_software( - camera, - software, - ); - } - - late final _camera_attr_set_tag_softwarePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_set_tag_software'); - late final _camera_attr_set_tag_software = _camera_attr_set_tag_softwarePtr - .asFunction)>(); - - /// @brief Gets the software information in the EXIF(Exchangeable image file format) tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a software using free(). - /// @param[in] camera The handle to the camera - /// @param[out] software A pointer to a string - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_tag_software() - int camera_attr_get_tag_software( - camera_h camera, - ffi.Pointer> software, - ) { - return _camera_attr_get_tag_software( - camera, - software, - ); - } - - late final _camera_attr_get_tag_softwarePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Pointer>)>>( - 'camera_attr_get_tag_software'); - late final _camera_attr_get_tag_software = _camera_attr_get_tag_softwarePtr - .asFunction>)>(); - - /// @brief Sets the geotag(GPS data) in the EXIF(Exchangeable image file format) tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] latitude The latitude data - /// @param[in] longitude The longitude data - /// @param[in] altitude The altitude data - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_get_geotag() - /// @see camera_attr_remove_geotag() - int camera_attr_set_geotag( - camera_h camera, - double latitude, - double longitude, - double altitude, - ) { - return _camera_attr_set_geotag( - camera, - latitude, - longitude, - altitude, - ); - } - - late final _camera_attr_set_geotagPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Double, ffi.Double, - ffi.Double)>>('camera_attr_set_geotag'); - late final _camera_attr_set_geotag = _camera_attr_set_geotagPtr - .asFunction(); - - /// @brief Gets the geotag(GPS data) in the EXIF(Exchangeable image file format) tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] latitude The latitude data - /// @param[out] longitude The longitude data - /// @param[out] altitude The altitude data - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_geotag() - /// @see camera_attr_remove_geotag() - int camera_attr_get_geotag( - camera_h camera, - ffi.Pointer latitude, - ffi.Pointer longitude, - ffi.Pointer altitude, - ) { - return _camera_attr_get_geotag( - camera, - latitude, - longitude, - altitude, - ); - } - - late final _camera_attr_get_geotagPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - camera_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('camera_attr_get_geotag'); - late final _camera_attr_get_geotag = _camera_attr_get_geotagPtr.asFunction< - int Function(camera_h, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Removes the geotag(GPS data) in the EXIF(Exchangeable image file format) tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_set_geotag() - /// @see camera_attr_get_geotag() - int camera_attr_remove_geotag( - camera_h camera, - ) { - return _camera_attr_remove_geotag( - camera, - ); - } - - late final _camera_attr_remove_geotagPtr = - _lookup>( - 'camera_attr_remove_geotag'); - late final _camera_attr_remove_geotag = - _camera_attr_remove_geotagPtr.asFunction(); - - /// @brief Sets the camera's flash mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, while setting the flash mode, if the flash was preempted by other APIs,\n - /// then this function returns #CAMERA_ERROR_DEVICE_BUSY error. - /// @param[in] camera The handle to the camera - /// @param[in] mode The flash mode - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @retval #CAMERA_ERROR_DEVICE_BUSY The flash was preempted by other API - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_foreach_supported_flash_mode() - /// @see camera_attr_get_flash_mode() - int camera_attr_set_flash_mode( - camera_h camera, - int mode, - ) { - return _camera_attr_set_flash_mode( - camera, - mode, - ); - } - - late final _camera_attr_set_flash_modePtr = - _lookup>( - 'camera_attr_set_flash_mode'); - late final _camera_attr_set_flash_mode = - _camera_attr_set_flash_modePtr.asFunction(); - - /// @brief Gets the camera's flash mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] mode The flash mode - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_foreach_supported_flash_mode() - /// @see camera_attr_set_flash_mode() - int camera_attr_get_flash_mode( - camera_h camera, - ffi.Pointer mode, - ) { - return _camera_attr_get_flash_mode( - camera, - mode, - ); - } - - late final _camera_attr_get_flash_modePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_get_flash_mode'); - late final _camera_attr_get_flash_mode = _camera_attr_get_flash_modePtr - .asFunction)>(); - - /// @brief Retrieves all supported flash modes by invoking the callback function once for each supported flash mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data passed to the callback registration function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_attr_supported_flash_mode_cb() to get all supported flash modes. - /// @see camera_attr_set_flash_mode() - /// @see camera_attr_get_flash_mode() - /// @see camera_attr_supported_flash_mode_cb() - int camera_attr_foreach_supported_flash_mode( - camera_h camera, - camera_attr_supported_flash_mode_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_foreach_supported_flash_mode( - camera, - callback, - user_data, - ); - } - - late final _camera_attr_foreach_supported_flash_modePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_attr_supported_flash_mode_cb, - ffi.Pointer)>>( - 'camera_attr_foreach_supported_flash_mode'); - late final _camera_attr_foreach_supported_flash_mode = - _camera_attr_foreach_supported_flash_modePtr.asFunction< - int Function(camera_h, camera_attr_supported_flash_mode_cb, - ffi.Pointer)>(); - - /// @brief Gets the camera len's orientation angle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] angle The orientation angle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_display_rotation() - int camera_attr_get_lens_orientation( - camera_h camera, - ffi.Pointer angle, - ) { - return _camera_attr_get_lens_orientation( - camera, - angle, - ); - } - - late final _camera_attr_get_lens_orientationPtr = _lookup< - ffi.NativeFunction)>>( - 'camera_attr_get_lens_orientation'); - late final _camera_attr_get_lens_orientation = - _camera_attr_get_lens_orientationPtr - .asFunction)>(); - - /// @brief Sets the stream rotation. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] rotation The stream rotation - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED. - /// @see camera_attr_get_stream_rotation() - int camera_attr_set_stream_rotation( - camera_h camera, - int rotation, - ) { - return _camera_attr_set_stream_rotation( - camera, - rotation, - ); - } - - late final _camera_attr_set_stream_rotationPtr = - _lookup>( - 'camera_attr_set_stream_rotation'); - late final _camera_attr_set_stream_rotation = - _camera_attr_set_stream_rotationPtr - .asFunction(); - - /// @brief Gets the stream rotation. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] rotation The stream rotation - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED. - /// @see camera_attr_set_stream_rotation() - int camera_attr_get_stream_rotation( - camera_h camera, - ffi.Pointer rotation, - ) { - return _camera_attr_get_stream_rotation( - camera, - rotation, - ); - } - - late final _camera_attr_get_stream_rotationPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_get_stream_rotation'); - late final _camera_attr_get_stream_rotation = - _camera_attr_get_stream_rotationPtr - .asFunction)>(); - - /// @brief Retrieves all supported stream rotation modes by invoking callback function once for each supported stream rotation mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_attr_supported_stream_rotation_cb() to get all supported stream rotation mode. - /// @see camera_attr_set_stream_rotation() - /// @see camera_attr_get_stream_rotation() - /// @see camera_attr_supported_stream_rotation_cb() - int camera_attr_foreach_supported_stream_rotation( - camera_h camera, - camera_attr_supported_stream_rotation_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_foreach_supported_stream_rotation( - camera, - callback, - user_data, - ); - } - - late final _camera_attr_foreach_supported_stream_rotationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - camera_h, - camera_attr_supported_stream_rotation_cb, - ffi.Pointer)>>( - 'camera_attr_foreach_supported_stream_rotation'); - late final _camera_attr_foreach_supported_stream_rotation = - _camera_attr_foreach_supported_stream_rotationPtr.asFunction< - int Function(camera_h, camera_attr_supported_stream_rotation_cb, - ffi.Pointer)>(); - - /// @brief Sets the stream flip. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] flip The stream flip - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED. - /// @see camera_attr_set_stream_rotation() - int camera_attr_set_stream_flip( - camera_h camera, - int flip, - ) { - return _camera_attr_set_stream_flip( - camera, - flip, - ); - } - - late final _camera_attr_set_stream_flipPtr = - _lookup>( - 'camera_attr_set_stream_flip'); - late final _camera_attr_set_stream_flip = - _camera_attr_set_stream_flipPtr.asFunction(); - - /// @brief Gets the stream flip. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] flip The stream flip - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED. - /// @see camera_attr_set_stream_rotation() - int camera_attr_get_stream_flip( - camera_h camera, - ffi.Pointer flip, - ) { - return _camera_attr_get_stream_flip( - camera, - flip, - ); - } - - late final _camera_attr_get_stream_flipPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_get_stream_flip'); - late final _camera_attr_get_stream_flip = _camera_attr_get_stream_flipPtr - .asFunction)>(); - - /// @brief Retrieves all supported stream flip modes by invoking callback function once for each supported stream flip mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_attr_supported_stream_flip_cb() to get all supported stream flip mode. - /// @see camera_attr_set_stream_flip() - /// @see camera_attr_get_stream_flip() - /// @see camera_attr_supported_stream_flip_cb() - int camera_attr_foreach_supported_stream_flip( - camera_h camera, - camera_attr_supported_stream_flip_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_foreach_supported_stream_flip( - camera, - callback, - user_data, - ); - } - - late final _camera_attr_foreach_supported_stream_flipPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_attr_supported_stream_flip_cb, - ffi.Pointer)>>( - 'camera_attr_foreach_supported_stream_flip'); - late final _camera_attr_foreach_supported_stream_flip = - _camera_attr_foreach_supported_stream_flipPtr.asFunction< - int Function(camera_h, camera_attr_supported_stream_flip_cb, - ffi.Pointer)>(); - - /// @brief Sets the mode of HDR(High dynamic range) capture. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks Taking multiple pictures at different exposure levels and intelligently stitching them together so that we eventually arrive at a picture that is representative in both dark and bright areas.\n - /// If this attribute is set to @c true. camera_attr_hdr_progress_cb() is invoked during capture.\n - /// If you set #CAMERA_ATTR_HDR_MODE_KEEP_ORIGINAL, the capturing callback is invoked twice. The first callback is delivering origin image data. The second callback is delivering improved image data. - /// @param[in] camera The handle to the camera - /// @param[in] mode The mode of HDR capture - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_get_hdr_mode() - /// @see camera_attr_set_hdr_capture_progress_cb() - /// @see camera_attr_unset_hdr_capture_progress_cb() - /// @see camera_attr_is_supported_hdr_capture() - int camera_attr_set_hdr_mode( - camera_h camera, - int mode, - ) { - return _camera_attr_set_hdr_mode( - camera, - mode, - ); - } - - late final _camera_attr_set_hdr_modePtr = - _lookup>( - 'camera_attr_set_hdr_mode'); - late final _camera_attr_set_hdr_mode = - _camera_attr_set_hdr_modePtr.asFunction(); - - /// @brief Gets the mode of HDR(High dynamic range) capture. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] mode The mode of HDR capture - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_hdr_mode() - /// @see camera_attr_set_hdr_capture_progress_cb() - /// @see camera_attr_unset_hdr_capture_progress_cb() - /// @see camera_attr_is_supported_hdr_capture() - int camera_attr_get_hdr_mode( - camera_h camera, - ffi.Pointer mode, - ) { - return _camera_attr_get_hdr_mode( - camera, - mode, - ); - } - - late final _camera_attr_get_hdr_modePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_get_hdr_mode'); - late final _camera_attr_get_hdr_mode = _camera_attr_get_hdr_modePtr - .asFunction)>(); - - /// @brief Registers a callback function to be called when HDR capture is progressing. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This callback notifies progress of the HDR process. - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data passed to the callback registration function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_hdr_mode() - /// @see camera_attr_get_hdr_mode() - /// @see camera_attr_unset_hdr_capture_progress_cb() - /// @see camera_attr_is_supported_hdr_capture() - int camera_attr_set_hdr_capture_progress_cb( - camera_h camera, - camera_attr_hdr_progress_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_set_hdr_capture_progress_cb( - camera, - callback, - user_data, - ); - } - - late final _camera_attr_set_hdr_capture_progress_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_attr_hdr_progress_cb, - ffi.Pointer)>>( - 'camera_attr_set_hdr_capture_progress_cb'); - late final _camera_attr_set_hdr_capture_progress_cb = - _camera_attr_set_hdr_capture_progress_cbPtr.asFunction< - int Function( - camera_h, camera_attr_hdr_progress_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_hdr_mode() - /// @see camera_attr_get_hdr_mode() - /// @see camera_attr_set_hdr_capture_progress_cb() - /// @see camera_attr_is_supported_hdr_capture() - int camera_attr_unset_hdr_capture_progress_cb( - camera_h camera, - ) { - return _camera_attr_unset_hdr_capture_progress_cb( - camera, - ); - } - - late final _camera_attr_unset_hdr_capture_progress_cbPtr = - _lookup>( - 'camera_attr_unset_hdr_capture_progress_cb'); - late final _camera_attr_unset_hdr_capture_progress_cb = - _camera_attr_unset_hdr_capture_progress_cbPtr - .asFunction(); - - /// @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE - /// @brief Gets the support state of HDR capture. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] camera The handle to the camera - /// @return @c true if supported, otherwise @c false - /// @exception #CAMERA_ERROR_NONE Successful - /// @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @see camera_attr_set_hdr_mode() - /// @see camera_attr_get_hdr_mode() - /// @see camera_attr_set_hdr_capture_progress_cb() - /// @see camera_attr_unset_hdr_capture_progress_cb() - bool camera_attr_is_supported_hdr_capture( - camera_h camera, - ) { - return _camera_attr_is_supported_hdr_capture( - camera, - ); - } - - late final _camera_attr_is_supported_hdr_capturePtr = - _lookup>( - 'camera_attr_is_supported_hdr_capture'); - late final _camera_attr_is_supported_hdr_capture = - _camera_attr_is_supported_hdr_capturePtr - .asFunction(); - - /// @brief Enables/Disables the anti-shake feature. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This feature is used for image capture. - /// @param[in] camera The handle to the camera - /// @param[in] enable If @c true the anti-shake feature is enabled, otherwise @c false - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_is_enabled_anti_shake() - /// @see camera_attr_is_supported_anti_shake() - int camera_attr_enable_anti_shake( - camera_h camera, - bool enable, - ) { - return _camera_attr_enable_anti_shake( - camera, - enable, - ); - } - - late final _camera_attr_enable_anti_shakePtr = - _lookup>( - 'camera_attr_enable_anti_shake'); - late final _camera_attr_enable_anti_shake = _camera_attr_enable_anti_shakePtr - .asFunction(); - - /// @brief Gets the state of the anti-shake feature. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] enabled The state of anti-shake - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_enable_anti_shake() - /// @see camera_attr_is_supported_anti_shake() - int camera_attr_is_enabled_anti_shake( - camera_h camera, - ffi.Pointer enabled, - ) { - return _camera_attr_is_enabled_anti_shake( - camera, - enabled, - ); - } - - late final _camera_attr_is_enabled_anti_shakePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_is_enabled_anti_shake'); - late final _camera_attr_is_enabled_anti_shake = - _camera_attr_is_enabled_anti_shakePtr - .asFunction)>(); - - /// @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE - /// @brief Gets the support state of the anti-shake feature. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] camera The handle to the camera - /// @return @c true if supported, otherwise @c false - /// @exception #CAMERA_ERROR_NONE Successful - /// @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @see camera_attr_enable_anti_shake() - /// @see camera_attr_is_enabled_anti_shake() - bool camera_attr_is_supported_anti_shake( - camera_h camera, - ) { - return _camera_attr_is_supported_anti_shake( - camera, - ); - } - - late final _camera_attr_is_supported_anti_shakePtr = - _lookup>( - 'camera_attr_is_supported_anti_shake'); - late final _camera_attr_is_supported_anti_shake = - _camera_attr_is_supported_anti_shakePtr - .asFunction(); - - /// @brief Enables/Disables the video stabilization feature. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If video stabilization is enabled, zero shutter lag is disabled.\n - /// This feature is used to record a video. - /// @param[in] camera The handle to the camera - /// @param[in] enable If @c true video stabilization is enabled, otherwise @c false - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_is_enabled_video_stabilization() - /// @see camera_attr_is_supported_video_stabilization() - int camera_attr_enable_video_stabilization( - camera_h camera, - bool enable, - ) { - return _camera_attr_enable_video_stabilization( - camera, - enable, - ); - } - - late final _camera_attr_enable_video_stabilizationPtr = - _lookup>( - 'camera_attr_enable_video_stabilization'); - late final _camera_attr_enable_video_stabilization = - _camera_attr_enable_video_stabilizationPtr - .asFunction(); - - /// @brief Gets the state of the video stabilization feature. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] enabled The state of video stabilization - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_enable_video_stabilization() - /// @see camera_attr_is_supported_video_stabilization() - int camera_attr_is_enabled_video_stabilization( - camera_h camera, - ffi.Pointer enabled, - ) { - return _camera_attr_is_enabled_video_stabilization( - camera, - enabled, - ); - } - - late final _camera_attr_is_enabled_video_stabilizationPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_is_enabled_video_stabilization'); - late final _camera_attr_is_enabled_video_stabilization = - _camera_attr_is_enabled_video_stabilizationPtr - .asFunction)>(); - - /// @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE - /// @brief Gets the support state of the video stabilization feature. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] camera The handle to the camera - /// @return @c true if supported, otherwise @c false - /// @exception #CAMERA_ERROR_NONE Successful - /// @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @see camera_attr_enable_video_stabilization() - /// @see camera_attr_is_enabled_video_stabilization() - bool camera_attr_is_supported_video_stabilization( - camera_h camera, - ) { - return _camera_attr_is_supported_video_stabilization( - camera, - ); - } - - late final _camera_attr_is_supported_video_stabilizationPtr = - _lookup>( - 'camera_attr_is_supported_video_stabilization'); - late final _camera_attr_is_supported_video_stabilization = - _camera_attr_is_supported_video_stabilizationPtr - .asFunction(); - - /// @brief Enables/Disables auto contrast. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] enable If @c true auto contrast is enabled, otherwise @c false - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_is_enabled_auto_contrast() - int camera_attr_enable_auto_contrast( - camera_h camera, - bool enable, - ) { - return _camera_attr_enable_auto_contrast( - camera, - enable, - ); - } - - late final _camera_attr_enable_auto_contrastPtr = - _lookup>( - 'camera_attr_enable_auto_contrast'); - late final _camera_attr_enable_auto_contrast = - _camera_attr_enable_auto_contrastPtr - .asFunction(); - - /// @brief Gets the state of auto contrast. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] enabled The state of auto contrast - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_enable_auto_contrast() - int camera_attr_is_enabled_auto_contrast( - camera_h camera, - ffi.Pointer enabled, - ) { - return _camera_attr_is_enabled_auto_contrast( - camera, - enabled, - ); - } - - late final _camera_attr_is_enabled_auto_contrastPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_is_enabled_auto_contrast'); - late final _camera_attr_is_enabled_auto_contrast = - _camera_attr_is_enabled_auto_contrastPtr - .asFunction)>(); - - /// @brief Gets state of support of auto contrast feature. - /// @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] camera The handle to the camera - /// @return true on supported, otherwise false - /// @exception #CAMERA_ERROR_NONE Successful - /// @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @see camera_attr_enable_auto_contrast() - /// @see camera_attr_is_enabled_auto_contrast() - bool camera_attr_is_supported_auto_contrast( - camera_h camera, - ) { - return _camera_attr_is_supported_auto_contrast( - camera, - ); - } - - late final _camera_attr_is_supported_auto_contrastPtr = - _lookup>( - 'camera_attr_is_supported_auto_contrast'); - late final _camera_attr_is_supported_auto_contrast = - _camera_attr_is_supported_auto_contrastPtr - .asFunction(); - - /// @brief Disables shutter sound. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks In some countries, this operation is not permitted. - /// @param[in] camera The handle to the camera - /// @param[in] disable If @c true shutter sound is disabled, otherwise @c false - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_OPERATION Disabling shutter sound is not permitted - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - int camera_attr_disable_shutter_sound( - camera_h camera, - bool disable, - ) { - return _camera_attr_disable_shutter_sound( - camera, - disable, - ); - } - - late final _camera_attr_disable_shutter_soundPtr = - _lookup>( - 'camera_attr_disable_shutter_sound'); - late final _camera_attr_disable_shutter_sound = - _camera_attr_disable_shutter_soundPtr - .asFunction(); - - /// @brief Sets the position to move horizontally. - /// @since_tizen 3.0 - /// @param[in] camera The handle to the camera - /// @param[in] move_type The PTZ(Pan Tilt Zoom) move type - /// @param[in] pan_step The step to move the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_PREVIEW. - /// @see camera_attr_get_pan() - /// @see camera_attr_get_pan_range() - int camera_attr_set_pan( - camera_h camera, - int move_type, - int pan_step, - ) { - return _camera_attr_set_pan( - camera, - move_type, - pan_step, - ); - } - - late final _camera_attr_set_panPtr = _lookup< - ffi.NativeFunction>( - 'camera_attr_set_pan'); - late final _camera_attr_set_pan = - _camera_attr_set_panPtr.asFunction(); - - /// @brief Gets the current position of the camera. - /// @since_tizen 3.0 - /// @param[in] camera The handle to the camera - /// @param[out] pan_step The current horizontal distance from the starting point. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_pan() - /// @see camera_attr_get_pan_range() - int camera_attr_get_pan( - camera_h camera, - ffi.Pointer pan_step, - ) { - return _camera_attr_get_pan( - camera, - pan_step, - ); - } - - late final _camera_attr_get_panPtr = _lookup< - ffi.NativeFunction)>>( - 'camera_attr_get_pan'); - late final _camera_attr_get_pan = _camera_attr_get_panPtr - .asFunction)>(); - - /// @brief Gets lower limit and upper limit for pan position. - /// @since_tizen 3.0 - /// @remarks If the min value is greater than the max value, it means that this feature is not supported. - /// @param[in] camera The handle to the camera - /// @param[out] min The lower limit for pan - /// @param[out] max The upper limit for pan - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_pan() - /// @see camera_attr_get_pan() - int camera_attr_get_pan_range( - camera_h camera, - ffi.Pointer min, - ffi.Pointer max, - ) { - return _camera_attr_get_pan_range( - camera, - min, - max, - ); - } - - late final _camera_attr_get_pan_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Pointer, - ffi.Pointer)>>('camera_attr_get_pan_range'); - late final _camera_attr_get_pan_range = - _camera_attr_get_pan_rangePtr.asFunction< - int Function(camera_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the position to move vertically. - /// @since_tizen 3.0 - /// @param[in] camera The handle to the camera - /// @param[in] move_type The PTZ(Pan Tilt Zoom) move type - /// @param[in] tilt_step The step to move the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_PREVIEW. - /// @see camera_attr_get_tilt() - /// @see camera_attr_get_tilt_range() - int camera_attr_set_tilt( - camera_h camera, - int move_type, - int tilt_step, - ) { - return _camera_attr_set_tilt( - camera, - move_type, - tilt_step, - ); - } - - late final _camera_attr_set_tiltPtr = _lookup< - ffi.NativeFunction>( - 'camera_attr_set_tilt'); - late final _camera_attr_set_tilt = - _camera_attr_set_tiltPtr.asFunction(); - - /// @brief Gets the current position of the camera. - /// @since_tizen 3.0 - /// @param[in] camera The handle to the camera - /// @param[out] tilt_step The current vertical distance from the starting point. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_tilt() - /// @see camera_attr_get_tilt_range() - int camera_attr_get_tilt( - camera_h camera, - ffi.Pointer tilt_step, - ) { - return _camera_attr_get_tilt( - camera, - tilt_step, - ); - } - - late final _camera_attr_get_tiltPtr = _lookup< - ffi.NativeFunction)>>( - 'camera_attr_get_tilt'); - late final _camera_attr_get_tilt = _camera_attr_get_tiltPtr - .asFunction)>(); - - /// @brief Gets lower limit and upper limit for tilt position. - /// @since_tizen 3.0 - /// @remarks If the min value is greater than the max value, it means that this feature is not supported. - /// @param[in] camera The handle to the camera - /// @param[out] min The lower limit for tilt - /// @param[out] max The upper limit for tilt - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_tilt() - /// @see camera_attr_get_tilt() - int camera_attr_get_tilt_range( - camera_h camera, - ffi.Pointer min, - ffi.Pointer max, - ) { - return _camera_attr_get_tilt_range( - camera, - min, - max, - ); - } - - late final _camera_attr_get_tilt_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Pointer, - ffi.Pointer)>>('camera_attr_get_tilt_range'); - late final _camera_attr_get_tilt_range = - _camera_attr_get_tilt_rangePtr.asFunction< - int Function(camera_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the type of PTZ(Pan Tilt Zoom). - /// @since_tizen 3.0 - /// @param[in] camera The handle to the camera - /// @param[in] ptz_type PTZ type - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_PREVIEW. - /// @see camera_attr_get_pan() - /// @see camera_attr_set_pan() - /// @see camera_attr_get_pan_range() - /// @see camera_attr_get_tilt() - /// @see camera_attr_set_tilt() - /// @see camera_attr_get_tilt_range() - /// @see camera_attr_foreach_supported_ptz_type() - int camera_attr_set_ptz_type( - camera_h camera, - int ptz_type, - ) { - return _camera_attr_set_ptz_type( - camera, - ptz_type, - ); - } - - late final _camera_attr_set_ptz_typePtr = - _lookup>( - 'camera_attr_set_ptz_type'); - late final _camera_attr_set_ptz_type = - _camera_attr_set_ptz_typePtr.asFunction(); - - /// @brief Retrieves all supported PTZ(Pan Tilt Zoom) types by invoking callback function once for each supported ptz type. - /// @since_tizen 3.0 - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_attr_supported_ptz_type_cb() to get all supported ptz type. - /// @see camera_attr_set_ptz_type() - int camera_attr_foreach_supported_ptz_type( - camera_h camera, - camera_attr_supported_ptz_type_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_foreach_supported_ptz_type( - camera, - callback, - user_data, - ); - } - - late final _camera_attr_foreach_supported_ptz_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_attr_supported_ptz_type_cb, - ffi.Pointer)>>( - 'camera_attr_foreach_supported_ptz_type'); - late final _camera_attr_foreach_supported_ptz_type = - _camera_attr_foreach_supported_ptz_typePtr.asFunction< - int Function(camera_h, camera_attr_supported_ptz_type_cb, - ffi.Pointer)>(); - - /// @brief Sets the ROI(Region Of Interest) area of display. - /// @since_tizen 3.0 - /// @remarks Before set display ROI area, #CAMERA_DISPLAY_MODE_CUSTOM_ROI should be set with camera_set_display_mode(). - /// The minimum value of width and height are 1. - /// @param[in] camera The handle to the camera - /// @param[in] x X coordinate of area - /// @param[in] y Y coordinate of area - /// @param[in] width Width of area - /// @param[in] height Height of area - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_get_display_roi_area() - int camera_attr_set_display_roi_area( - camera_h camera, - int x, - int y, - int width, - int height, - ) { - return _camera_attr_set_display_roi_area( - camera, - x, - y, - width, - height, - ); - } - - late final _camera_attr_set_display_roi_areaPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Int, ffi.Int, ffi.Int, - ffi.Int)>>('camera_attr_set_display_roi_area'); - late final _camera_attr_set_display_roi_area = - _camera_attr_set_display_roi_areaPtr - .asFunction(); - - /// @brief Gets the ROI(Region Of Interest) area of display. - /// @since_tizen 3.0 - /// @param[in] camera The handle to the camera - /// @param[out] x X coordinate of area - /// @param[out] y Y coordinate of area - /// @param[out] width Width of area - /// @param[out] height Height of area - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_display_roi_area() - int camera_attr_get_display_roi_area( - camera_h camera, - ffi.Pointer x, - ffi.Pointer y, - ffi.Pointer width, - ffi.Pointer height, - ) { - return _camera_attr_get_display_roi_area( - camera, - x, - y, - width, - height, - ); - } - - late final _camera_attr_get_display_roi_areaPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - camera_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('camera_attr_get_display_roi_area'); - late final _camera_attr_get_display_roi_area = - _camera_attr_get_display_roi_areaPtr.asFunction< - int Function(camera_h, ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Creates a media packet pool to handle the media packets. - /// @details It creates a media packet pool instance - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a pool must be released by using packet_pool_destroy(). - /// @param[out] pool The media packet pool handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_OUT_OF_MEMORY Out of memory - int media_packet_pool_create( - ffi.Pointer pool, - ) { - return _media_packet_pool_create( - pool, - ); - } - - late final _media_packet_pool_createPtr = _lookup< - ffi - .NativeFunction)>>( - 'media_packet_pool_create'); - late final _media_packet_pool_create = _media_packet_pool_createPtr - .asFunction)>(); - - /// @brief Sets the media format for the media packet pool. - /// - /// @since_tizen 3.0 - /// - /// @param[in] pool The media packet pool handle - /// @param[in] fmt The #media_format_h allocated by the caller - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre Must have media_format_h instance by media_format_create(). - /// @post Must do media_format_unref(). - int media_packet_pool_set_media_format( - media_packet_pool_h pool, - media_format_h fmt, - ) { - return _media_packet_pool_set_media_format( - pool, - fmt, - ); - } - - late final _media_packet_pool_set_media_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_pool_h, - media_format_h)>>('media_packet_pool_set_media_format'); - late final _media_packet_pool_set_media_format = - _media_packet_pool_set_media_formatPtr - .asFunction(); - - /// @brief Sets the media packet pool size. - /// @details Sets the number of packets to allocate with given parameters. - /// The media packet pool will be allocated with @a min_buffers when media_pacet_pool_allocate() is called. - /// When there are no media packets available, it will be increased to @a max_buffers of given parameter. - /// - /// @since_tizen 3.0 - /// - /// @param[in] pool The allocated pool handle - /// @param[in] min_buffers The minimum number of buffers to allocate - /// @param[in] max_buffers The maximum number of buffers to allocate - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_OUT_OF_MEMORY Out of memory - /// @post After the pool has been configured, it can be allocated with media_packet_pool_allocate(). - /// @see media_packet_pool_get_size() - int media_packet_pool_set_size( - media_packet_pool_h pool, - int min_buffers, - int max_buffers, - ) { - return _media_packet_pool_set_size( - pool, - min_buffers, - max_buffers, - ); - } - - late final _media_packet_pool_set_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_pool_h, ffi.Int, - ffi.Int)>>('media_packet_pool_set_size'); - late final _media_packet_pool_set_size = _media_packet_pool_set_sizePtr - .asFunction(); - - /// @brief Gets the media packet pool size. - /// @details Gets the configuration values from the pool. - /// - /// @since_tizen 3.0 - /// - /// @param[in] pool The allocated pool handle - /// @param[out] min_buffers The minimum number of buffers to allocate - /// @param[out] max_buffers The maximum number of buffers to allocate - /// @param[out] curr_buffers The current number of allocated buffers - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @post After the pool has been configured, it can be allocated with media_packet_pool_allocate(). - /// @see media_packet_pool_set_size() - int media_packet_pool_get_size( - media_packet_pool_h pool, - ffi.Pointer min_buffers, - ffi.Pointer max_buffers, - ffi.Pointer curr_buffers, - ) { - return _media_packet_pool_get_size( - pool, - min_buffers, - max_buffers, - curr_buffers, - ); - } - - late final _media_packet_pool_get_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_packet_pool_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('media_packet_pool_get_size'); - late final _media_packet_pool_get_size = - _media_packet_pool_get_sizePtr.asFunction< - int Function(media_packet_pool_h, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Allocates the media packet pool. - /// @details It will allocate media packets with @a min_buffers which given to media_packet_pool_set_size(). - /// - /// @since_tizen 3.0 - /// - /// @param[in] pool The allocated pool handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION The user set the invalid format with media_packet_pool_set_format() or set the invalid size with media_packet_pool_set_size().\n - /// The user already allocate the pool. - /// @pre media_packet_pool_set_media_format() and media_pool_set_size() should be called before calling media_packet_pool_allocate() - /// @post The pool will be allocated. When the pool is allocated, media_packet_pool_acquire_packet() can be used to retrieve a packet from the pool. - /// @see media_packet_pool_set_media_format() - /// @see media_packet_pool_set_size() - int media_packet_pool_allocate( - media_packet_pool_h pool, - ) { - return _media_packet_pool_allocate( - pool, - ); - } - - late final _media_packet_pool_allocatePtr = - _lookup>( - 'media_packet_pool_allocate'); - late final _media_packet_pool_allocate = _media_packet_pool_allocatePtr - .asFunction(); - - /// @brief Acquires a media packet from the media packet pool. - /// @details It will take a media packet from the queue and block until media packet is released into the pool agaian. - /// When there are no media packets available, it will be increased to @a max_buffers of given parameter. - /// - /// @since_tizen 3.0 - /// - /// @param[in] pool The media packet pool handle - /// @param[out] pkt The media packet handle - /// @param[in] timeout It indicates the millisecond-timeouts to block - /// while waiting for one of acquired packet to be released. - /// If the value of timeout is -1, the pool blocks indefinitely until media packet into the pool. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION The user does not allocate the pool.\n - /// The pool should be allocated with media_packet_pool_allocate() before acquiring media packet from the pool. - /// @retval #MEDIA_PACKET_ERROR_NO_AVAILABLE_PACKET No available packet - /// @see media_pakcet_pool_set_size() - /// @see media_packet_pool_release_packet() - int media_packet_pool_acquire_packet( - media_packet_pool_h pool, - ffi.Pointer pkt, - int timeout, - ) { - return _media_packet_pool_acquire_packet( - pool, - pkt, - timeout, - ); - } - - late final _media_packet_pool_acquire_packetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_pool_h, ffi.Pointer, - ffi.Long)>>('media_packet_pool_acquire_packet'); - late final _media_packet_pool_acquire_packet = - _media_packet_pool_acquire_packetPtr.asFunction< - int Function( - media_packet_pool_h, ffi.Pointer, int)>(); - - /// @brief Releases the media packet to pool. - /// @details Rlease a packet back in the pool. It will put the packet back in the queue. - /// - /// @since_tizen 3.0 - /// - /// @param[in] pool The media packet pool handle - /// @param[in] pkt The packet to release, the pkt should have previously been acquired from the pool with media_packet_pool_acquire_packet() - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION The user releases media packet which is not associated with a given pool. - /// @see media_packet_pool_acquire_packet() - int media_packet_pool_release_packet( - media_packet_pool_h pool, - media_packet_h pkt, - ) { - return _media_packet_pool_release_packet( - pool, - pkt, - ); - } - - late final _media_packet_pool_release_packetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_pool_h, - media_packet_h)>>('media_packet_pool_release_packet'); - late final _media_packet_pool_release_packet = - _media_packet_pool_release_packetPtr - .asFunction(); - - /// @brief Deallocates all the media packets. - /// @details Deallocates the packets allocated with media_packet_pool_allocate(). - /// - /// @since_tizen 3.0 - /// - /// @param[in] pool The media packet pool handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION The user does not release all media packets to the pool. - /// - /// @pre media packet should be released before calling media_packet_pool_deallocate(). - /// @post The pool will be deallocated. media_packet_pool_acquire_packet() calls will return an error. - /// @see media_packet_pool_allocate() - int media_packet_pool_deallocate( - media_packet_pool_h pool, - ) { - return _media_packet_pool_deallocate( - pool, - ); - } - - late final _media_packet_pool_deallocatePtr = - _lookup>( - 'media_packet_pool_deallocate'); - late final _media_packet_pool_deallocate = _media_packet_pool_deallocatePtr - .asFunction(); - - /// @brief Destroys the media packet pool. - /// @details Destroys the media packet pool handle and releases all its resources. - /// - /// @since_tizen 3.0 - /// - /// @param[in] pool The handle to media packet pool to be destroyed - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION The user does not create media packet pool instance, or not deallocate all media packets with media_packet_pool_deallocate(). - /// - /// @see media_packet_pool_create() - int media_packet_pool_destroy( - media_packet_pool_h pool, - ) { - return _media_packet_pool_destroy( - pool, - ); - } - - late final _media_packet_pool_destroyPtr = - _lookup>( - 'media_packet_pool_destroy'); - late final _media_packet_pool_destroy = _media_packet_pool_destroyPtr - .asFunction(); - - /// @brief Creates a mediacodec handle for decoding/encoding - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks you must release @a mediacodec using mediacodec_destroy().\n - /// Although you can create multiple mediacodec handles at the same time, - /// the mediacodec cannot guarantee proper operation because of limited resources, like - /// audio or display device. - /// - /// @param[out] mediacodec A new handle to mediacodec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIACODEC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - int mediacodec_create( - ffi.Pointer mediacodec, - ) { - return _mediacodec_create( - mediacodec, - ); - } - - late final _mediacodec_createPtr = - _lookup)>>( - 'mediacodec_create'); - late final _mediacodec_create = _mediacodec_createPtr - .asFunction)>(); - - /// @brief Destroys the mediacodec handle and releases all its resources. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks To completely shutdown the mediacodec operation, call this function with a valid player handle from any - /// mediacodec - /// - /// @param[in] mediacodec The handle to mediacodec to be destroyed. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIACODEC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - int mediacodec_destroy( - mediacodec_h mediacodec, - ) { - return _mediacodec_destroy( - mediacodec, - ); - } - - late final _mediacodec_destroyPtr = - _lookup>( - 'mediacodec_destroy'); - late final _mediacodec_destroy = - _mediacodec_destroyPtr.asFunction(); - - /// @brief Sets the codec type and decoder/encoder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If this codec is to be used as a decoder, pass the #MEDIACODEC_DECODER flag. - /// If this codec is to be used as an encoder, pass the #MEDIACODEC_ENCODER flag.\n - /// The software codec is used as default setting(#MEDIACODEC_SUPPORT_TYPE_SW) if user doesn't set hardware flag. - /// If user wants to use h/w decoder, user needs to pass the #MEDIACODEC_DECODER | #MEDIACODEC_SUPPORT_TYPE_HW. - /// @param[in] mediacodec The handle of mediacodec - /// @param[in] codec_type The identifier of the codec type of the decoder/encoder - /// @param[in] flags The encoding/decoding scheme, defined by #mediacodec_support_type_e - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIACODEC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIACODEC_ERROR_CODEC_NOT_FOUND Codec not found - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - int mediacodec_set_codec( - mediacodec_h mediacodec, - int codec_type, - int flags, - ) { - return _mediacodec_set_codec( - mediacodec, - codec_type, - flags, - ); - } - - late final _mediacodec_set_codecPtr = _lookup< - ffi - .NativeFunction>( - 'mediacodec_set_codec'); - late final _mediacodec_set_codec = _mediacodec_set_codecPtr - .asFunction(); - - /// @brief Sets the default info for the video decoder - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @param[in] width The width for video decoding. - /// @param[in] height The height for video decoding. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIACODEC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - int mediacodec_set_vdec_info( - mediacodec_h mediacodec, - int width, - int height, - ) { - return _mediacodec_set_vdec_info( - mediacodec, - width, - height, - ); - } - - late final _mediacodec_set_vdec_infoPtr = _lookup< - ffi.NativeFunction>( - 'mediacodec_set_vdec_info'); - late final _mediacodec_set_vdec_info = _mediacodec_set_vdec_infoPtr - .asFunction(); - - /// @brief Sets the default info for the video encoder - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The frame rate is the speed of recording and the speed of playback. - /// If user wants the default setting for ratecontrol, set @a target_bits to @c 0. - /// @param[in] mediacodec The handle to mediacodec - /// @param[in] width The width for video encoding. - /// @param[in] height The height for video encoding. - /// @param[in] fps The frame rate in frames per second. - /// @param[in] target_bits The target bitrates in bits per second.(a unit of kbit) - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIACODEC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - int mediacodec_set_venc_info( - mediacodec_h mediacodec, - int width, - int height, - int fps, - int target_bits, - ) { - return _mediacodec_set_venc_info( - mediacodec, - width, - height, - fps, - target_bits, - ); - } - - late final _mediacodec_set_venc_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediacodec_h, ffi.Int, ffi.Int, ffi.Int, - ffi.Int)>>('mediacodec_set_venc_info'); - late final _mediacodec_set_venc_info = _mediacodec_set_venc_infoPtr - .asFunction(); - - /// @brief Sets the default info for the audio decoder - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @param[in] samplerate The samplerate for audio decoding. - /// @param[in] channel The channels for audio decoding. - /// @param[in] bit The bits resolution for audio decoding. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIACODEC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - int mediacodec_set_adec_info( - mediacodec_h mediacodec, - int samplerate, - int channel, - int bit, - ) { - return _mediacodec_set_adec_info( - mediacodec, - samplerate, - channel, - bit, - ); - } - - late final _mediacodec_set_adec_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediacodec_h, ffi.Int, ffi.Int, - ffi.Int)>>('mediacodec_set_adec_info'); - late final _mediacodec_set_adec_info = _mediacodec_set_adec_infoPtr - .asFunction(); - - /// @brief Sets the default info for the audio encoder - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @param[in] samplerate The samplerate for audio encoding. - /// @param[in] channel The channels for audio encoding. - /// @param[in] bit The bits resolution for audio encoding. - /// @param[in] bitrate The bitrate for audio encoding. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIACODEC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - int mediacodec_set_aenc_info( - mediacodec_h mediacodec, - int samplerate, - int channel, - int bit, - int bitrate, - ) { - return _mediacodec_set_aenc_info( - mediacodec, - samplerate, - channel, - bit, - bitrate, - ); - } - - late final _mediacodec_set_aenc_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediacodec_h, ffi.Int, ffi.Int, ffi.Int, - ffi.Int)>>('mediacodec_set_aenc_info'); - late final _mediacodec_set_aenc_info = _mediacodec_set_aenc_infoPtr - .asFunction(); - - /// @brief Sets the codec type and codec default info via media format. - /// @details Sets the value via media format instead of mediacodec_set_codec(), mediacodec_set_venc_info(), - /// mediacodec_set_vdec_info(), mediacodec_set_aenc_info(), and mediacodec_set_adec_info(). - /// @since_tizen 4.0 - /// @remarks When using the @a format parameter from the output of the media demuxer, you can use media format via media_packet_get_format(). - /// Otherwise, you must set the following values after creating media format. - /// Set the audio or video codec type via media_format_set_video_mime() or media_format_set_audio_mime(). - /// For video decoding, width, height must be set via media_format_set_video_width() and media_format_set_video_height(). - /// For video encoding, width, height, target bitrate, and frame rate must be set via media_format_set_video_avg_bps() and media_format_set_video_frame_rate(). - /// For audio decoding, samplerate, channel, and bit must be set via media_format_set_audio_samplerate(), media_format_set_audio_channel() and media_format_set_audio_bit(). - /// For audio encoding, samplerate, channel, bit, and bitrate must be set via media_format_set_audio_avg_bps().\n - /// If this codec is to be used as a decoder, pass the #MEDIACODEC_DECODER flag. - /// If this codec is to be used as an encoder, pass the #MEDIACODEC_ENCODER flag.\n - /// The software codec is used as default setting (#MEDIACODEC_SUPPORT_TYPE_SW) if user doesn't set hardware flag. - /// If you wants to use h/w decoder, you needs to pass the #MEDIACODEC_DECODER | #MEDIACODEC_SUPPORT_TYPE_HW. - /// @param[in] mediacodec The mediacodec handle - /// @param[in] format The #media_format_h of input data - /// @param[in] flags The encoding/decoding scheme, - /// values of #mediacodec_support_type_e combined with bitwise 'or' - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_CODEC_NOT_FOUND Unsupported codec - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @pre The media format has been created and the required values for configuration have been set. - /// @see media_format_set_video_mime() - /// @see media_format_set_audio_mime() - /// @see media_format_set_video_width() - /// @see media_format_set_video_height() - /// @see media_format_set_video_avg_bps() - /// @see media_format_set_video_frame_rate() - /// @see media_format_set_audio_channel() - /// @see media_format_set_audio_samplerate() - /// @see media_format_set_audio_bit() - /// @see media_format_set_audio_avg_bps() - int mediacodec_configure_from_media_format( - mediacodec_h mediacodec, - media_format_h format, - int flags, - ) { - return _mediacodec_configure_from_media_format( - mediacodec, - format, - flags, - ); - } - - late final _mediacodec_configure_from_media_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediacodec_h, media_format_h, - ffi.Int)>>('mediacodec_configure_from_media_format'); - late final _mediacodec_configure_from_media_format = - _mediacodec_configure_from_media_formatPtr - .asFunction(); - - /// @brief Prepares @a mediacodec for encoding/decoding. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIACODEC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @pre The mediacodec should call mediacodec_set_codec()and mediacodec_set_vdec_info()/mediacodec_set_venc_info() before calling mediacodec_prepare() - /// If the decoder is set by mediacodec_set_codec(), mediacodec_set_vdec_info() should be called. If the encoder is set by - /// mediacodec_set_codec(), mediacodec_set_venc_info() should be called. - int mediacodec_prepare( - mediacodec_h mediacodec, - ) { - return _mediacodec_prepare( - mediacodec, - ); - } - - late final _mediacodec_preparePtr = - _lookup>( - 'mediacodec_prepare'); - late final _mediacodec_prepare = - _mediacodec_preparePtr.asFunction(); - - /// @brief Unprepares @a mediacodec for encoding/decoding. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIACODEC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - int mediacodec_unprepare( - mediacodec_h mediacodec, - ) { - return _mediacodec_unprepare( - mediacodec, - ); - } - - late final _mediacodec_unpreparePtr = - _lookup>( - 'mediacodec_unprepare'); - late final _mediacodec_unprepare = - _mediacodec_unpreparePtr.asFunction(); - - /// @brief Decodes/Encodes a packet. The function passed undecoded/unencoded packet to the input queue and decode/encode a - /// frame sequentially. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @param[in] inbuf The current input format for the decoder/encoder - /// @param[in] timeOutUs The timeout in microseconds. \n - /// The input buffer wait up to "timeOutUs" microseconds. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIACODEC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIACODEC_ERROR_OVERFLOW_INBUFFER Overflow inputbuffer - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - int mediacodec_process_input( - mediacodec_h mediacodec, - media_packet_h inbuf, - int timeOutUs, - ) { - return _mediacodec_process_input( - mediacodec, - inbuf, - timeOutUs, - ); - } - - late final _mediacodec_process_inputPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediacodec_h, media_packet_h, - ffi.Uint64)>>('mediacodec_process_input'); - late final _mediacodec_process_input = _mediacodec_process_inputPtr - .asFunction(); - - /// @brief Gets the decoded or encoded packet from the output queue. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @param[out] outbuf The current output of the decoder/encoder. - /// this function passed decoded/encoded frame to output queue. - /// @param[in] timeOutUs The timeout in microseconds. \n - /// The input buffer wait up to "timeOutUs" microseconds. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIACODEC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - int mediacodec_get_output( - mediacodec_h mediacodec, - ffi.Pointer outbuf, - int timeOutUs, - ) { - return _mediacodec_get_output( - mediacodec, - outbuf, - timeOutUs, - ); - } - - late final _mediacodec_get_outputPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediacodec_h, ffi.Pointer, - ffi.Uint64)>>('mediacodec_get_output'); - late final _mediacodec_get_output = _mediacodec_get_outputPtr.asFunction< - int Function(mediacodec_h, ffi.Pointer, int)>(); - - /// @brief Flushes both input and output buffers. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - int mediacodec_flush_buffers( - mediacodec_h mediacodec, - ) { - return _mediacodec_flush_buffers( - mediacodec, - ); - } - - late final _mediacodec_flush_buffersPtr = - _lookup>( - 'mediacodec_flush_buffers'); - late final _mediacodec_flush_buffers = - _mediacodec_flush_buffersPtr.asFunction(); - - /// @brief set empty buffer callback the media codec for process, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @pre mediacodec_set_input_buffer_used_cb should be called before mediacodec_preare(). - /// @post mediacodec_input_buffer_used_cb will be invoked. - /// @see mediacodec_set_input_buffer_used_cb() - /// @see mediacodec_unset_input_buffer_used_cb() - int mediacodec_set_input_buffer_used_cb( - mediacodec_h mediacodec, - mediacodec_input_buffer_used_cb callback, - ffi.Pointer user_data, - ) { - return _mediacodec_set_input_buffer_used_cb( - mediacodec, - callback, - user_data, - ); - } - - late final _mediacodec_set_input_buffer_used_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediacodec_h, mediacodec_input_buffer_used_cb, - ffi.Pointer)>>('mediacodec_set_input_buffer_used_cb'); - late final _mediacodec_set_input_buffer_used_cb = - _mediacodec_set_input_buffer_used_cbPtr.asFunction< - int Function(mediacodec_h, mediacodec_input_buffer_used_cb, - ffi.Pointer)>(); - - /// @brief unset input buffer used callback the media codec for process, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @see mediacodec_set_input_buffer_used_cb() - int mediacodec_unset_input_buffer_used_cb( - mediacodec_h mediacodec, - ) { - return _mediacodec_unset_input_buffer_used_cb( - mediacodec, - ); - } - - late final _mediacodec_unset_input_buffer_used_cbPtr = - _lookup>( - 'mediacodec_unset_input_buffer_used_cb'); - late final _mediacodec_unset_input_buffer_used_cb = - _mediacodec_unset_input_buffer_used_cbPtr - .asFunction(); - - /// @brief set output buffer available callback the media codec for process, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @pre mediacodec_set_output_buffer_available_cb should be called before mediacodec_preare(). - /// @post mediacodec_output_buffer_available_cb will be invoked. - /// @see mediacodec_set_output_buffer_available_cb() - /// @see mediacodec_unset_output_buffer_available_cb() - int mediacodec_set_output_buffer_available_cb( - mediacodec_h mediacodec, - mediacodec_output_buffer_available_cb callback, - ffi.Pointer user_data, - ) { - return _mediacodec_set_output_buffer_available_cb( - mediacodec, - callback, - user_data, - ); - } - - late final _mediacodec_set_output_buffer_available_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mediacodec_h, - mediacodec_output_buffer_available_cb, - ffi.Pointer)>>( - 'mediacodec_set_output_buffer_available_cb'); - late final _mediacodec_set_output_buffer_available_cb = - _mediacodec_set_output_buffer_available_cbPtr.asFunction< - int Function(mediacodec_h, mediacodec_output_buffer_available_cb, - ffi.Pointer)>(); - - /// @brief unset output buffer available callback the media codec for process, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @see mediacodec_set_output_buffer_available_cb() - int mediacodec_unset_output_buffer_available_cb( - mediacodec_h mediacodec, - ) { - return _mediacodec_unset_output_buffer_available_cb( - mediacodec, - ); - } - - late final _mediacodec_unset_output_buffer_available_cbPtr = - _lookup>( - 'mediacodec_unset_output_buffer_available_cb'); - late final _mediacodec_unset_output_buffer_available_cb = - _mediacodec_unset_output_buffer_available_cbPtr - .asFunction(); - - /// @brief set error callback the media codec for process, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @pre mediacodec_set_error_cb should be called before mediacodec_preare(). - /// @post mediacodec_error_cb will be invoked. - /// @see mediacodec_set_error_cb() - /// @see mediacodec_unset_error_cb() - int mediacodec_set_error_cb( - mediacodec_h mediacodec, - mediacodec_error_cb callback, - ffi.Pointer user_data, - ) { - return _mediacodec_set_error_cb( - mediacodec, - callback, - user_data, - ); - } - - late final _mediacodec_set_error_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediacodec_h, mediacodec_error_cb, - ffi.Pointer)>>('mediacodec_set_error_cb'); - late final _mediacodec_set_error_cb = _mediacodec_set_error_cbPtr.asFunction< - int Function(mediacodec_h, mediacodec_error_cb, ffi.Pointer)>(); - - /// @brief unset error callback the media codec for process, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @see mediacodec_set_error_cb() - int mediacodec_unset_error_cb( - mediacodec_h mediacodec, - ) { - return _mediacodec_unset_error_cb( - mediacodec, - ); - } - - late final _mediacodec_unset_error_cbPtr = - _lookup>( - 'mediacodec_unset_error_cb'); - late final _mediacodec_unset_error_cb = - _mediacodec_unset_error_cbPtr.asFunction(); - - /// @brief set eos callback the media codec for process, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @pre mediacodec_set_eos_cb should be called before mediacodec_preare(). - /// @post mediacodec_eos_cb will be invoked. - /// @see mediacodec_set_eos_cb() - /// @see mediacodec_unset_eos_cb() - int mediacodec_set_eos_cb( - mediacodec_h mediacodec, - mediacodec_eos_cb callback, - ffi.Pointer user_data, - ) { - return _mediacodec_set_eos_cb( - mediacodec, - callback, - user_data, - ); - } - - late final _mediacodec_set_eos_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediacodec_h, mediacodec_eos_cb, - ffi.Pointer)>>('mediacodec_set_eos_cb'); - late final _mediacodec_set_eos_cb = _mediacodec_set_eos_cbPtr.asFunction< - int Function(mediacodec_h, mediacodec_eos_cb, ffi.Pointer)>(); - - /// @brief unset eos callback the media codec for process, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @see mediacodec_set_event_handler_cb() - int mediacodec_unset_eos_cb( - mediacodec_h mediacodec, - ) { - return _mediacodec_unset_eos_cb( - mediacodec, - ); - } - - late final _mediacodec_unset_eos_cbPtr = - _lookup>( - 'mediacodec_unset_eos_cb'); - late final _mediacodec_unset_eos_cb = - _mediacodec_unset_eos_cbPtr.asFunction(); - - /// @brief Registers a callback function to be invoked when the mediacodec needs more data or has enough data. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @pre mediacodec_set_buffer_status_cb should be called before mediacodec_preare(). - /// @post mediacodec_buffer_status_cb will be invoked. - /// @see mediacodec_set_buffer_status_cb() - /// @see mediacodec_unset_buffer_status_cb() - int mediacodec_set_buffer_status_cb( - mediacodec_h mediacodec, - mediacodec_buffer_status_cb callback, - ffi.Pointer user_data, - ) { - return _mediacodec_set_buffer_status_cb( - mediacodec, - callback, - user_data, - ); - } - - late final _mediacodec_set_buffer_status_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediacodec_h, mediacodec_buffer_status_cb, - ffi.Pointer)>>('mediacodec_set_buffer_status_cb'); - late final _mediacodec_set_buffer_status_cb = - _mediacodec_set_buffer_status_cbPtr.asFunction< - int Function(mediacodec_h, mediacodec_buffer_status_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - int mediacodec_unset_buffer_status_cb( - mediacodec_h mediacodec, - ) { - return _mediacodec_unset_buffer_status_cb( - mediacodec, - ); - } - - late final _mediacodec_unset_buffer_status_cbPtr = - _lookup>( - 'mediacodec_unset_buffer_status_cb'); - late final _mediacodec_unset_buffer_status_cb = - _mediacodec_unset_buffer_status_cbPtr - .asFunction(); - - /// @brief Retrieves all supported codecs by invoking callback function once for each supported codecs. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @see mediacodec_foreach_supported_codec() - int mediacodec_foreach_supported_codec( - mediacodec_h mediacodec, - mediacodec_supported_codec_cb callback, - ffi.Pointer user_data, - ) { - return _mediacodec_foreach_supported_codec( - mediacodec, - callback, - user_data, - ); - } - - late final _mediacodec_foreach_supported_codecPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediacodec_h, mediacodec_supported_codec_cb, - ffi.Pointer)>>('mediacodec_foreach_supported_codec'); - late final _mediacodec_foreach_supported_codec = - _mediacodec_foreach_supported_codecPtr.asFunction< - int Function(mediacodec_h, mediacodec_supported_codec_cb, - ffi.Pointer)>(); - - /// @brief Verifies whether encoding can be performed with codec_type or not. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @param[in] codec_type The identifier of the codec type of the encoder. - /// @param[in] encoder Whether the encoder or decoder : (@c true = encoder, @c false = decoder). - /// @param[out] support_type (@c MEDIACODEC_SUPPORT_TYPE_HW = mediacodec can be performed with hardware codec, @c MEDIACODEC_SUPPORT_TYPE_SW = mediacodec can be performed with software codec) - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @code - /// #include - /// mediacodec_h mediacodec; - /// mediacodec_support_type_e type; - /// mediacodec_codec_type_e codec_type = MEDIACODEC_H264; - /// - /// mediacodec_create(&mediacodec); - /// mediacodec_get_supported_type(mediacodec, codec_type, 1, &type); - /// - /// if(type == MEDIACODEC_SUPPORT_TYPE_HW) - /// // only h/w supported - /// else if (type == MEDIACODEC_SUPPORT_TYPE_SW) - /// // only s/w supported - /// else if (type == (MEDIACODEC_SUPPORT_TYPE_HW|MEDIACODEC_SUPPORT_TYPE_SW) - /// // both supported - /// - /// mediacodec_set_codec(mediacodec, codec_type, MEDIACODEC_ENCODER | MEDIACODEC_SUPPORT_TYPE_HW); - /// @endcode - int mediacodec_get_supported_type( - mediacodec_h mediacodec, - int codec_type, - bool encoder, - ffi.Pointer support_type, - ) { - return _mediacodec_get_supported_type( - mediacodec, - codec_type, - encoder, - support_type, - ); - } - - late final _mediacodec_get_supported_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediacodec_h, ffi.Int32, ffi.Bool, - ffi.Pointer)>>('mediacodec_get_supported_type'); - late final _mediacodec_get_supported_type = - _mediacodec_get_supported_typePtr.asFunction< - int Function(mediacodec_h, int, bool, ffi.Pointer)>(); - - /// @brief Gets the media packet pool allocated for recycling media packets. - /// @details The user can get the pool allocated with the number of packets are required to be used in codecs.\n - /// It is recomended to use media packet pool for better stability and performance. - /// @since_tizen 3.0 - /// @remarks The @a pool should be released using media_packet_pool_deallocate() and destroyed using media_packet_pool_destroy(). - /// @param[in] mediacodec The mediacodec handle - /// @param[out] pool The allocated pool handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIACODEC_ERROR_INVALID_OPERATION The user calls mediacodec_get_packet_pool() before calling mediacodec_prepare(). - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @pre mediacodec_get_packet_pool() should be called after calling mediacodec_prepare(). - /// @post If the pool is used, media_packet_pool_deallocate() and media_packet_pool_destroy() should be called. - /// @see media_packet_pool_acquire_packet() - /// @see media_packet_pool_release_packet() - /// @see media_packet_pool_deallocate() - /// @see media_packet_pool_destroy() - int mediacodec_get_packet_pool( - mediacodec_h mediacodec, - ffi.Pointer pool, - ) { - return _mediacodec_get_packet_pool( - mediacodec, - pool, - ); - } - - late final _mediacodec_get_packet_poolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediacodec_h, - ffi.Pointer)>>('mediacodec_get_packet_pool'); - late final _mediacodec_get_packet_pool = - _mediacodec_get_packet_poolPtr.asFunction< - int Function(mediacodec_h, ffi.Pointer)>(); - - /// @brief Creates a media controller server. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a server using mc_server_destroy(). - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[out] server The handle to media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Not enough memory is available - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @see mc_server_destroy() - int mc_server_create( - ffi.Pointer server, - ) { - return _mc_server_create( - server, - ); - } - - late final _mc_server_createPtr = - _lookup)>>( - 'mc_server_create'); - late final _mc_server_create = - _mc_server_createPtr.asFunction)>(); - - /// @brief Sets the playback state to update the latest state info - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param [in] server The handle to media controller server - /// @param [in] state The state to set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY File does not exist - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @post Apply the updated playback information by calling mc_server_update_playback_info(). - /// @see mc_server_create() - /// @see mc_server_destroy() - /// @see mc_server_update_playback_info() - int mc_server_set_playback_state( - mc_server_h server, - int state, - ) { - return _mc_server_set_playback_state( - server, - state, - ); - } - - late final _mc_server_set_playback_statePtr = - _lookup>( - 'mc_server_set_playback_state'); - late final _mc_server_set_playback_state = _mc_server_set_playback_statePtr - .asFunction(); - - /// @brief Sets the playback position to update the latest playback info - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param [in] server The handle to media controller server - /// @param [in] position The position to set in milliseconds - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY File does not exist - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @post Apply the updated playback information by calling mc_server_update_playback_info(). - /// @see mc_server_create() - /// @see mc_server_destroy() - /// @see mc_server_update_playback_info() - int mc_server_set_playback_position( - mc_server_h server, - int position, - ) { - return _mc_server_set_playback_position( - server, - position, - ); - } - - late final _mc_server_set_playback_positionPtr = _lookup< - ffi - .NativeFunction>( - 'mc_server_set_playback_position'); - late final _mc_server_set_playback_position = - _mc_server_set_playback_positionPtr - .asFunction(); - - /// @brief Update the modified playback info - /// @details If this API is called, the updated playback information will be sent to the controller. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param [in] server The handle to media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY File does not exist - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_update_playback_info( - mc_server_h server, - ) { - return _mc_server_update_playback_info( - server, - ); - } - - late final _mc_server_update_playback_infoPtr = - _lookup>( - 'mc_server_update_playback_info'); - late final _mc_server_update_playback_info = - _mc_server_update_playback_infoPtr - .asFunction(); - - /// @brief Sets the metadata to update the latest metadata info - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param [in] server The handle to media controller server - /// @param [in] attribute The key attribute name to set - /// @param [in] value The value of the attribute - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY File does not exist - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @post Apply the updated metadata information by calling mc_server_update_metadata(). - /// @see mc_server_create() - /// @see mc_server_destroy() - /// @see mc_server_update_metadata() - int mc_server_set_metadata( - mc_server_h server, - int attribute, - ffi.Pointer value, - ) { - return _mc_server_set_metadata( - server, - attribute, - value, - ); - } - - late final _mc_server_set_metadataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_server_h, ffi.Int32, - ffi.Pointer)>>('mc_server_set_metadata'); - late final _mc_server_set_metadata = _mc_server_set_metadataPtr - .asFunction)>(); - - /// @brief Update the modified metadata info. - /// @details If this API is called, the updated metadata will be sent to all controllers. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param [in] server The handle to media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY File does not exist - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_update_metadata( - mc_server_h server, - ) { - return _mc_server_update_metadata( - server, - ); - } - - late final _mc_server_update_metadataPtr = - _lookup>( - 'mc_server_update_metadata'); - late final _mc_server_update_metadata = - _mc_server_update_metadataPtr.asFunction(); - - /// @brief Update the modified shuffle mode - /// @details If this API is called, the updated mode information will be sent to all controllers. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param [in] server The handle to media controller server - /// @param [in] mode The shuffle mode to update the latest status - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY File does not exist - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_update_shuffle_mode( - mc_server_h server, - int mode, - ) { - return _mc_server_update_shuffle_mode( - server, - mode, - ); - } - - late final _mc_server_update_shuffle_modePtr = - _lookup>( - 'mc_server_update_shuffle_mode'); - late final _mc_server_update_shuffle_mode = _mc_server_update_shuffle_modePtr - .asFunction(); - - /// @brief Updates the modified repeat mode - /// @details If this API is called, the updated mode information will be sent to all controllers. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param [in] server The handle to media controller server - /// @param [in] mode The repeat mode to update the latest status - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY File does not exist - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_update_repeat_mode( - mc_server_h server, - int mode, - ) { - return _mc_server_update_repeat_mode( - server, - mode, - ); - } - - late final _mc_server_update_repeat_modePtr = - _lookup>( - 'mc_server_update_repeat_mode'); - late final _mc_server_update_repeat_mode = _mc_server_update_repeat_modePtr - .asFunction(); - - /// @brief Sets the callback for receiving playback state command from client. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param [in] server The handle to media controller server - /// @param [in] callback The callback to be invoked when media controller server receives playback command from client. - /// @param [in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_set_playback_state_command_received_cb( - mc_server_h server, - mc_server_playback_state_command_received_cb callback, - ffi.Pointer user_data, - ) { - return _mc_server_set_playback_state_command_received_cb( - server, - callback, - user_data, - ); - } - - late final _mc_server_set_playback_state_command_received_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_server_h, - mc_server_playback_state_command_received_cb, - ffi.Pointer)>>( - 'mc_server_set_playback_state_command_received_cb'); - late final _mc_server_set_playback_state_command_received_cb = - _mc_server_set_playback_state_command_received_cbPtr.asFunction< - int Function( - mc_server_h, - mc_server_playback_state_command_received_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback for receiving playback state command from client. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param [in] server The handle to media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_unset_playback_state_command_received_cb( - mc_server_h server, - ) { - return _mc_server_unset_playback_state_command_received_cb( - server, - ); - } - - late final _mc_server_unset_playback_state_command_received_cbPtr = - _lookup>( - 'mc_server_unset_playback_state_command_received_cb'); - late final _mc_server_unset_playback_state_command_received_cb = - _mc_server_unset_playback_state_command_received_cbPtr - .asFunction(); - - /// @brief Sets the callback for receiving custom command from client. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param [in] server The handle to media controller server - /// @param [in] callback The callback to be invoked when media controller server receives custom command from client. - /// @param [in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_set_custom_command_received_cb( - mc_server_h server, - mc_server_custom_command_received_cb callback, - ffi.Pointer user_data, - ) { - return _mc_server_set_custom_command_received_cb( - server, - callback, - user_data, - ); - } - - late final _mc_server_set_custom_command_received_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_server_h, - mc_server_custom_command_received_cb, - ffi.Pointer)>>( - 'mc_server_set_custom_command_received_cb'); - late final _mc_server_set_custom_command_received_cb = - _mc_server_set_custom_command_received_cbPtr.asFunction< - int Function(mc_server_h, mc_server_custom_command_received_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback for receiving custom command from client. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param [in] server The handle to media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_unset_custom_command_received_cb( - mc_server_h server, - ) { - return _mc_server_unset_custom_command_received_cb( - server, - ); - } - - late final _mc_server_unset_custom_command_received_cbPtr = - _lookup>( - 'mc_server_unset_custom_command_received_cb'); - late final _mc_server_unset_custom_command_received_cb = - _mc_server_unset_custom_command_received_cbPtr - .asFunction(); - - /// @brief Sends a reply for the requested command to the client. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks When server recieve command, this API can be called by mc_server_custom_command_received_cb(). - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param [in] server The handle to media controller server - /// @param [in] client_name The app_id of the media controller client - /// @param [in] result_code The result code of custom command - /// @param [in] data The extra data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @pre mc_server_command_received_cb() - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_send_command_reply( - mc_server_h server, - ffi.Pointer client_name, - int result_code, - ffi.Pointer data, - ) { - return _mc_server_send_command_reply( - server, - client_name, - result_code, - data, - ); - } - - late final _mc_server_send_command_replyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_server_h, ffi.Pointer, ffi.Int, - ffi.Pointer)>>('mc_server_send_command_reply'); - late final _mc_server_send_command_reply = - _mc_server_send_command_replyPtr.asFunction< - int Function( - mc_server_h, ffi.Pointer, int, ffi.Pointer)>(); - - /// @brief Destroys media controller server. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param [in] server The handle to media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #METADATA_EXTRACTOR_ERROR_NONE Successful - /// @retval #METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - int mc_server_destroy( - mc_server_h server, - ) { - return _mc_server_destroy( - server, - ); - } - - late final _mc_server_destroyPtr = - _lookup>( - 'mc_server_destroy'); - late final _mc_server_destroy = - _mc_server_destroyPtr.asFunction(); - - /// @brief Creates a media controller client. - /// @details The media controller client binds the latest media controller server when handlers are created. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @remarks You must release @a client using mc_client_destroy(). - /// - /// @param[out] client The handle to the media controller client - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Not enough memory is available - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @see mc_client_destroy() - int mc_client_create( - ffi.Pointer client, - ) { - return _mc_client_create( - client, - ); - } - - late final _mc_client_createPtr = - _lookup)>>( - 'mc_client_create'); - late final _mc_client_create = - _mc_client_createPtr.asFunction)>(); - - /// @brief Sets the callback for monitoring status of the media controller server. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @details If media controller client call this function, basically the media controller client recieve the callback from all media controller servers. - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param [in] client The handle to the media controller client - /// @param [in] callback The callback to be invoked when the media controller server status is changed - /// @param [in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_set_server_update_cb( - mc_client_h client, - mc_server_state_updated_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_set_server_update_cb( - client, - callback, - user_data, - ); - } - - late final _mc_client_set_server_update_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, mc_server_state_updated_cb, - ffi.Pointer)>>('mc_client_set_server_update_cb'); - late final _mc_client_set_server_update_cb = - _mc_client_set_server_update_cbPtr.asFunction< - int Function(mc_client_h, mc_server_state_updated_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback for monitoring status of the media controller server. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param [in] client The handle to the media controller client - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_unset_server_update_cb( - mc_client_h client, - ) { - return _mc_client_unset_server_update_cb( - client, - ); - } - - late final _mc_client_unset_server_update_cbPtr = - _lookup>( - 'mc_client_unset_server_update_cb'); - late final _mc_client_unset_server_update_cb = - _mc_client_unset_server_update_cbPtr - .asFunction(); - - /// @brief Sets the callback for monitoring playback status of the media controller server. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @details If media controller client call this function, basically the media controller client recieve the callback from all media controller servers. \n - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param [in] client The handle to the media controller client - /// @param [in] callback The callback to be invoked when the playback status is changed - /// @param [in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_set_playback_update_cb( - mc_client_h client, - mc_playback_updated_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_set_playback_update_cb( - client, - callback, - user_data, - ); - } - - late final _mc_client_set_playback_update_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, mc_playback_updated_cb, - ffi.Pointer)>>('mc_client_set_playback_update_cb'); - late final _mc_client_set_playback_update_cb = - _mc_client_set_playback_update_cbPtr.asFunction< - int Function( - mc_client_h, mc_playback_updated_cb, ffi.Pointer)>(); - - /// @brief Unsets the callback for monitoring playback status of the media controller server. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param [in] client The handle to the media controller client - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_unset_playback_update_cb( - mc_client_h client, - ) { - return _mc_client_unset_playback_update_cb( - client, - ); - } - - late final _mc_client_unset_playback_update_cbPtr = - _lookup>( - 'mc_client_unset_playback_update_cb'); - late final _mc_client_unset_playback_update_cb = - _mc_client_unset_playback_update_cbPtr - .asFunction(); - - /// @brief Sets the callback for monitoring metadata status of the media controller server. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @details If media controller client call this function, basically the media controller client recieve the callback from all media controller servers. - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param [in] client The handle to the media controller client - /// @param [in] callback The callback to be invoked when the metadata status is changed - /// @param [in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_set_metadata_update_cb( - mc_client_h client, - mc_metadata_updated_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_set_metadata_update_cb( - client, - callback, - user_data, - ); - } - - late final _mc_client_set_metadata_update_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, mc_metadata_updated_cb, - ffi.Pointer)>>('mc_client_set_metadata_update_cb'); - late final _mc_client_set_metadata_update_cb = - _mc_client_set_metadata_update_cbPtr.asFunction< - int Function( - mc_client_h, mc_metadata_updated_cb, ffi.Pointer)>(); - - /// @brief Unsets the callback for monitoring metadata status of the media controller server. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param [in] client The handle to the media controller client - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_unset_metadata_update_cb( - mc_client_h client, - ) { - return _mc_client_unset_metadata_update_cb( - client, - ); - } - - late final _mc_client_unset_metadata_update_cbPtr = - _lookup>( - 'mc_client_unset_metadata_update_cb'); - late final _mc_client_unset_metadata_update_cb = - _mc_client_unset_metadata_update_cbPtr - .asFunction(); - - /// @brief Sets the callback for monitoring shuffle mode of the media controller server. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @details If media controller client call this function, basically the media controller client recieve the callback from all media controller servers. - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param [in] client The handle to the media controller client - /// @param [in] callback The callback to be invoked when the shuffle mode is changed - /// @param [in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_set_shuffle_mode_update_cb( - mc_client_h client, - mc_shuffle_mode_changed_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_set_shuffle_mode_update_cb( - client, - callback, - user_data, - ); - } - - late final _mc_client_set_shuffle_mode_update_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, mc_shuffle_mode_changed_cb, - ffi.Pointer)>>('mc_client_set_shuffle_mode_update_cb'); - late final _mc_client_set_shuffle_mode_update_cb = - _mc_client_set_shuffle_mode_update_cbPtr.asFunction< - int Function(mc_client_h, mc_shuffle_mode_changed_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback for monitoring shuffle mode of the media controller server. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param [in] client The handle to the media controller client - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_unset_shuffle_mode_update_cb( - mc_client_h client, - ) { - return _mc_client_unset_shuffle_mode_update_cb( - client, - ); - } - - late final _mc_client_unset_shuffle_mode_update_cbPtr = - _lookup>( - 'mc_client_unset_shuffle_mode_update_cb'); - late final _mc_client_unset_shuffle_mode_update_cb = - _mc_client_unset_shuffle_mode_update_cbPtr - .asFunction(); - - /// @brief Sets the callback for monitoring repeat mode of the media controller server. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @details If media controller client call this function, basically the media controller client recieve the callback from all media controller servers. - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param [in] client The handle to the media controller client - /// @param [in] callback The callback to be invoked when the repeat mode is changed - /// @param [in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_set_repeat_mode_update_cb( - mc_client_h client, - mc_repeat_mode_changed_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_set_repeat_mode_update_cb( - client, - callback, - user_data, - ); - } - - late final _mc_client_set_repeat_mode_update_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, mc_repeat_mode_changed_cb, - ffi.Pointer)>>('mc_client_set_repeat_mode_update_cb'); - late final _mc_client_set_repeat_mode_update_cb = - _mc_client_set_repeat_mode_update_cbPtr.asFunction< - int Function( - mc_client_h, mc_repeat_mode_changed_cb, ffi.Pointer)>(); - - /// @brief Unsets the callback for monitoring repeat mode of the media controller server. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param [in] client The handle to the media controller client - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_unset_repeat_mode_update_cb( - mc_client_h client, - ) { - return _mc_client_unset_repeat_mode_update_cb( - client, - ); - } - - late final _mc_client_unset_repeat_mode_update_cbPtr = - _lookup>( - 'mc_client_unset_repeat_mode_update_cb'); - late final _mc_client_unset_repeat_mode_update_cb = - _mc_client_unset_repeat_mode_update_cbPtr - .asFunction(); - - /// @brief Subscribes media controller server for monitoring status. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @details If media controller client subscribe media controller server, \n - /// the media controller client recieve callback from subscribed media controller server. \n - /// If media controller client subscribe media controller server one or more, \n - /// the media controller client can recieve callback from only subscribed media controller server. \n - /// If you want to subscribe for the all media controller server again, \n - /// unset mode update callback and set the callback for the monitoring status again. \n - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param [in] client The handle to the media controller client - /// @param [in] subscription_type The subscription type - /// @param [in] server_name The app_id of the media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Create a media controller client handle by calling mc_client_create() - /// @pre Set the callback for monitoring status of the media controller server - /// @post Unsubscribe the media controller server for monitoring status by calling mc_client_unsubscribe() - /// @see mc_client_create() - /// @see mc_client_unsubscribe() - int mc_client_subscribe( - mc_client_h client, - int subscription_type, - ffi.Pointer server_name, - ) { - return _mc_client_subscribe( - client, - subscription_type, - server_name, - ); - } - - late final _mc_client_subscribePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, ffi.Int32, - ffi.Pointer)>>('mc_client_subscribe'); - late final _mc_client_subscribe = _mc_client_subscribePtr - .asFunction)>(); - - /// @brief Unsubscribes media controller server for monitoring status. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @details If media controller client unsubscribe media controller server, \n - /// the media controller client don't recieve callback from unsubscribed media controller server. \n - /// If media controller client unsubscribe all subscibed media controller server, \n - /// the media controller client don't recieve callback from all media controller server. \n - /// After unset and set update callback function is called again, the media controller client can recieve callback from all media controller servers. \n - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param [in] client The handle to the media controller client - /// @param [in] subscription_type The subscription type - /// @param [in] server_name The app_id of the media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Create a media controller client handle by calling mc_client_create() - /// @pre Subscribe the media controller server for monitoring status by calling mc_client_subscribe() - /// @see mc_client_create() - /// @see mc_client_subscribe() - int mc_client_unsubscribe( - mc_client_h client, - int subscription_type, - ffi.Pointer server_name, - ) { - return _mc_client_unsubscribe( - client, - subscription_type, - server_name, - ); - } - - late final _mc_client_unsubscribePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, ffi.Int32, - ffi.Pointer)>>('mc_client_unsubscribe'); - late final _mc_client_unsubscribe = _mc_client_unsubscribePtr - .asFunction)>(); - - /// @brief Retrieves all subscribed Server. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param [in] client The handle to the media controller client - /// @param [in] subscription_type The subscription type - /// @param [in] callback The callback to be invoked when the list of the subscribed media controller server. - /// @param [in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Create a media controller client handle by calling mc_client_create() - /// @pre Subscribe the media controller server for monitoring status by calling mc_client_subscribe() - /// @see mc_client_create() - /// @see mc_client_subscribe() - int mc_client_foreach_server_subscribed( - mc_client_h client, - int subscription_type, - mc_subscribed_server_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_foreach_server_subscribed( - client, - subscription_type, - callback, - user_data, - ); - } - - late final _mc_client_foreach_server_subscribedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, ffi.Int32, mc_subscribed_server_cb, - ffi.Pointer)>>('mc_client_foreach_server_subscribed'); - late final _mc_client_foreach_server_subscribed = - _mc_client_foreach_server_subscribedPtr.asFunction< - int Function(mc_client_h, int, mc_subscribed_server_cb, - ffi.Pointer)>(); - - /// @brief Gets the playback state. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks You must release @a playback using @c mc_client_destroy_playback(). - /// - /// @param [in] playback The handle to playback - /// @param [out] state The state of the playback - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Sets mc_client_set_playback_update_cb() function to get the state - /// @see mc_client_set_playback_update_cb() - int mc_client_get_playback_state( - mc_playback_h playback, - ffi.Pointer state, - ) { - return _mc_client_get_playback_state( - playback, - state, - ); - } - - late final _mc_client_get_playback_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_playback_h, - ffi.Pointer)>>('mc_client_get_playback_state'); - late final _mc_client_get_playback_state = _mc_client_get_playback_statePtr - .asFunction)>(); - - /// @brief Gets the playback position. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks You must release @a playback using @c mc_client_destroy_playback(). - /// - /// @param [in] playback The handle to playback - /// @param [out] position The position of the playback in milliseconds - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Sets mc_client_set_playback_update_cb() function to get the position - /// @see mc_client_set_playback_update_cb() - int mc_client_get_playback_position( - mc_playback_h playback, - ffi.Pointer position, - ) { - return _mc_client_get_playback_position( - playback, - position, - ); - } - - late final _mc_client_get_playback_positionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_playback_h, ffi.Pointer)>>( - 'mc_client_get_playback_position'); - late final _mc_client_get_playback_position = - _mc_client_get_playback_positionPtr.asFunction< - int Function(mc_playback_h, ffi.Pointer)>(); - - /// @brief Destroys playback - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param [in] playback The handle to playback - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Sets mc_client_set_playback_update_cb() function to create playback - /// @see mc_client_set_playback_update_cb() - int mc_client_destroy_playback( - mc_playback_h playback, - ) { - return _mc_client_destroy_playback( - playback, - ); - } - - late final _mc_client_destroy_playbackPtr = - _lookup>( - 'mc_client_destroy_playback'); - late final _mc_client_destroy_playback = - _mc_client_destroy_playbackPtr.asFunction(); - - /// @brief Gets the metadata. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks You must release @a metadata using @c mc_client_destroy_metadata(). \n - /// And also You must release @a value using free(). - /// If the attribute value of the metadata is empty, return value is NULL. - /// - /// @param [in] metadata The handle to metadata - /// @param [in] attribute The key attribute name to get - /// @param [out] value The value of the attribute - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Sets mc_client_set_metadata_update_cb() function to get the metadata - /// @see mc_client_set_metadata_update_cb() - int mc_client_get_metadata( - mc_metadata_h metadata, - int attribute, - ffi.Pointer> value, - ) { - return _mc_client_get_metadata( - metadata, - attribute, - value, - ); - } - - late final _mc_client_get_metadataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_metadata_h, ffi.Int32, - ffi.Pointer>)>>('mc_client_get_metadata'); - late final _mc_client_get_metadata = _mc_client_get_metadataPtr.asFunction< - int Function(mc_metadata_h, int, ffi.Pointer>)>(); - - /// @brief Destroys metadata - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param [in] metadata The handle to metadata - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Sets mc_client_set_metadata_update_cb() function to create metadata - /// @see mc_client_set_metadata_update_cb() - int mc_client_destroy_metadata( - mc_metadata_h metadata, - ) { - return _mc_client_destroy_metadata( - metadata, - ); - } - - late final _mc_client_destroy_metadataPtr = - _lookup>( - 'mc_client_destroy_metadata'); - late final _mc_client_destroy_metadata = - _mc_client_destroy_metadataPtr.asFunction(); - - /// @brief Gets the latest media controller server info. - /// @details The media controller client will get the most recently updated information by the server. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @remarks If there is no activated media controller server, return value of the server name is NULL. - /// - /// @param [in] client The handle to the media controller client - /// @param [out] server_name The app_id of the latest media controller server - /// @param [out] server_state The state of the latest media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - int mc_client_get_latest_server_info( - mc_client_h client, - ffi.Pointer> server_name, - ffi.Pointer server_state, - ) { - return _mc_client_get_latest_server_info( - client, - server_name, - server_state, - ); - } - - late final _mc_client_get_latest_server_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, ffi.Pointer>, - ffi.Pointer)>>('mc_client_get_latest_server_info'); - late final _mc_client_get_latest_server_info = - _mc_client_get_latest_server_infoPtr.asFunction< - int Function(mc_client_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Gets the latest playback info. - /// @details The media controller client will get the most recently updated information from @a server_name. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @remarks You must release @a playback using @c mc_client_destroy_playback(). \n - /// If there is no playback info, return value of the playback is NULL. - /// - /// @param [in] client The handle to the media controller client - /// @param [in] server_name The app_id of the server to requesting - /// @param [out] playback The handle to playback - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - int mc_client_get_server_playback_info( - mc_client_h client, - ffi.Pointer server_name, - ffi.Pointer playback, - ) { - return _mc_client_get_server_playback_info( - client, - server_name, - playback, - ); - } - - late final _mc_client_get_server_playback_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, ffi.Pointer, - ffi.Pointer)>>( - 'mc_client_get_server_playback_info'); - late final _mc_client_get_server_playback_info = - _mc_client_get_server_playback_infoPtr.asFunction< - int Function(mc_client_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the latest metadata. - /// @details The media controller client will get the most recently updated information from @a server_name. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @remarks You must release @a metadata using @c mc_client_destroy_metadata(). \n - /// If there is no metadata, return value of the metadata is NULL. - /// - /// @param [in] client The handle to the media controller client - /// @param [in] server_name The app_id of the server to requesting - /// @param [out] metadata The handle to metadata - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - int mc_client_get_server_metadata( - mc_client_h client, - ffi.Pointer server_name, - ffi.Pointer metadata, - ) { - return _mc_client_get_server_metadata( - client, - server_name, - metadata, - ); - } - - late final _mc_client_get_server_metadataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, ffi.Pointer, - ffi.Pointer)>>('mc_client_get_server_metadata'); - late final _mc_client_get_server_metadata = - _mc_client_get_server_metadataPtr.asFunction< - int Function(mc_client_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the latest shuffle mode. - /// @details The media controller client will get the most recently updated information from @a server_name. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @remarks If there is no shuffle mode info, return value is #MC_SHUFFLE_MODE_OFF. - /// - /// @param [in] client The handle to the media controller client - /// @param [in] server_name The app_id of the server to requesting - /// @param [out] mode The info of the latest shuffle mode - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - int mc_client_get_server_shuffle_mode( - mc_client_h client, - ffi.Pointer server_name, - ffi.Pointer mode, - ) { - return _mc_client_get_server_shuffle_mode( - client, - server_name, - mode, - ); - } - - late final _mc_client_get_server_shuffle_modePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, ffi.Pointer, - ffi.Pointer)>>('mc_client_get_server_shuffle_mode'); - late final _mc_client_get_server_shuffle_mode = - _mc_client_get_server_shuffle_modePtr.asFunction< - int Function( - mc_client_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the latest repeat mode. - /// @details The media controller client will get the most recently updated information from @a server_name. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @remarks If there is no repeat mode info, return value is #MC_REPEAT_MODE_OFF. - /// - /// @param [in] client The handle to the media controller client - /// @param [in] server_name The app_id of the server to requesting - /// @param [out] mode The info of the latest shuffle mode - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - int mc_client_get_server_repeat_mode( - mc_client_h client, - ffi.Pointer server_name, - ffi.Pointer mode, - ) { - return _mc_client_get_server_repeat_mode( - client, - server_name, - mode, - ); - } - - late final _mc_client_get_server_repeat_modePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, ffi.Pointer, - ffi.Pointer)>>('mc_client_get_server_repeat_mode'); - late final _mc_client_get_server_repeat_mode = - _mc_client_get_server_repeat_modePtr.asFunction< - int Function( - mc_client_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Retrieves all activated Server. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param [in] client The handle to the media controller client - /// @param [in] callback The callback to be invoked when the list of the registered media controller server created completely. - /// @param [in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - int mc_client_foreach_server( - mc_client_h client, - mc_activated_server_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_foreach_server( - client, - callback, - user_data, - ); - } - - late final _mc_client_foreach_serverPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, mc_activated_server_cb, - ffi.Pointer)>>('mc_client_foreach_server'); - late final _mc_client_foreach_server = - _mc_client_foreach_serverPtr.asFunction< - int Function( - mc_client_h, mc_activated_server_cb, ffi.Pointer)>(); - - /// @brief Sends the playback state command to server. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param [in] client The handle to the media controller client - /// @param [in] server_name The app_id of the media controller server - /// @param [in] state The playback state command to send media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_get_server_playback_info() - int mc_client_send_playback_state_command( - mc_client_h client, - ffi.Pointer server_name, - int state, - ) { - return _mc_client_send_playback_state_command( - client, - server_name, - state, - ); - } - - late final _mc_client_send_playback_state_commandPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, ffi.Pointer, - ffi.Int32)>>('mc_client_send_playback_state_command'); - late final _mc_client_send_playback_state_command = - _mc_client_send_playback_state_commandPtr - .asFunction, int)>(); - - /// @brief Sends the custom command to server. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @details If there is the result for comand from server, the media controller client will get the result of the custom command by mc_command_reply_received_cb() callback. - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param [in] client The handle to the media controller client - /// @param [in] server_name The app_id of the media controller server - /// @param [in] command The command to be sent - /// @param [in] data The extra data - /// @param [in] callback The callback to be invoked when the custom command execute completely. - /// @param [in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - int mc_client_send_custom_command( - mc_client_h client, - ffi.Pointer server_name, - ffi.Pointer command, - ffi.Pointer data, - mc_command_reply_received_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_send_custom_command( - client, - server_name, - command, - data, - callback, - user_data, - ); - } - - late final _mc_client_send_custom_commandPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_client_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - mc_command_reply_received_cb, - ffi.Pointer)>>('mc_client_send_custom_command'); - late final _mc_client_send_custom_command = - _mc_client_send_custom_commandPtr.asFunction< - int Function( - mc_client_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - mc_command_reply_received_cb, - ffi.Pointer)>(); - - /// @brief Destroys client. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param [in] client The handle to the media controller client - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #METADATA_EXTRACTOR_ERROR_NONE Successful - /// @retval #METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - int mc_client_destroy( - mc_client_h client, - ) { - return _mc_client_destroy( - client, - ); - } - - late final _mc_client_destroyPtr = - _lookup>( - 'mc_client_destroy'); - late final _mc_client_destroy = - _mc_client_destroyPtr.asFunction(); - - /// @brief Creates a media demuxer handle for demuxing. - /// @since_tizen 3.0 - /// @remarks You must release @a demuxer using mediademuxer_destroy() function. - /// @param[out] demuxer A new handle to media demuxer - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @retval #MEDIADEMUXER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @post The media demuxer state will be #MEDIADEMUXER_STATE_IDLE. - /// @see mediademuxer_destroy() - int mediademuxer_create( - ffi.Pointer demuxer, - ) { - return _mediademuxer_create( - demuxer, - ); - } - - late final _mediademuxer_createPtr = _lookup< - ffi.NativeFunction)>>( - 'mediademuxer_create'); - late final _mediademuxer_create = _mediademuxer_createPtr - .asFunction)>(); - - /// @brief Sets the source path of input stream. - /// @since_tizen 3.0 - /// @remarks The mediastorage privilege(http://tizen.org/privilege/mediastorage) should be added if any video/audio files are used to play located in the internal storage. - /// @remarks The externalstorage privilege(http://tizen.org/privilege/externalstorage) should be added if any video/audio files are used to play located in the external storage. - /// @remarks You must release @a demuxer using mediademuxer_destroy() function. - /// @param[in] demuxer The media demuxer handle - /// @param[in] path The content location, such as the file path - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @retval #MEDIADEMUXER_ERROR_INVALID_PATH Invalid path - /// @pre The media muxer state will be #MEDIADEMUXER_STATE_IDLE by calling mediademuxer_create() function. - int mediademuxer_set_data_source( - mediademuxer_h demuxer, - ffi.Pointer path, - ) { - return _mediademuxer_set_data_source( - demuxer, - path, - ); - } - - late final _mediademuxer_set_data_sourcePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediademuxer_h, - ffi.Pointer)>>('mediademuxer_set_data_source'); - late final _mediademuxer_set_data_source = _mediademuxer_set_data_sourcePtr - .asFunction)>(); - - /// @brief Prepares the media demuxer for demuxing. - /// @since_tizen 3.0 - /// @remark User should call this before mediademuxer_start() function. - /// @param[in] demuxer The media demuxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @pre The media demuxer state should be #MEDIADEMUXER_STATE_IDLE. - /// @pre mediademuxer_set_error_cb should be called before mediademuxer_prepare(). - /// @post The media demuxer state will be #MEDIADEMUXER_STATE_READY. - /// @see mediademuxer_set_data_source() - /// @see mediademuxer_unprepare() - int mediademuxer_prepare( - mediademuxer_h demuxer, - ) { - return _mediademuxer_prepare( - demuxer, - ); - } - - late final _mediademuxer_preparePtr = - _lookup>( - 'mediademuxer_prepare'); - late final _mediademuxer_prepare = - _mediademuxer_preparePtr.asFunction(); - - /// @brief Gets the total track count present in the container stream. - /// @since_tizen 3.0 - /// @param[in] demuxer The media demuxer handle - /// @param[out] count The number of tracks present - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @pre The media demuxer state should be #MEDIADEMUXER_STATE_READY. - /// @see mediademuxer_prepare() - /// @see mediademuxer_select_track() - int mediademuxer_get_track_count( - mediademuxer_h demuxer, - ffi.Pointer count, - ) { - return _mediademuxer_get_track_count( - demuxer, - count, - ); - } - - late final _mediademuxer_get_track_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediademuxer_h, - ffi.Pointer)>>('mediademuxer_get_track_count'); - late final _mediademuxer_get_track_count = _mediademuxer_get_track_countPtr - .asFunction)>(); - - /// @brief Selects the track to be performed. - /// @since_tizen 3.0 - /// @param[in] demuxer The media demuxer handle - /// @param[in] track_index The track index on which is selected for read - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @pre The media demuxer state should be #MEDIADEMUXER_STATE_READY. - /// @see mediademuxer_get_track_count() - /// @see mediademuxer_start() - int mediademuxer_select_track( - mediademuxer_h demuxer, - int track_index, - ) { - return _mediademuxer_select_track( - demuxer, - track_index, - ); - } - - late final _mediademuxer_select_trackPtr = - _lookup>( - 'mediademuxer_select_track'); - late final _mediademuxer_select_track = _mediademuxer_select_trackPtr - .asFunction(); - - /// @brief Starts the media demuxer. - /// @since_tizen 3.0 - /// @remark User should call this before mediademuxer_read_sample() function. - /// @param[in] demuxer The media demuxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @pre The media demuxer state should be #MEDIADEMUXER_STATE_READY. - /// @post The media demuxer state will be #MEDIADEMUXER_STATE_DEMUXING. - /// @see mediademuxer_prepare() - /// @see mediademuxer_get_track_count() - /// @see mediademuxer_select_track() - /// @see mediademuxer_get_track_info() - int mediademuxer_start( - mediademuxer_h demuxer, - ) { - return _mediademuxer_start( - demuxer, - ); - } - - late final _mediademuxer_startPtr = - _lookup>( - 'mediademuxer_start'); - late final _mediademuxer_start = - _mediademuxer_startPtr.asFunction(); - - /// @brief Retrieves the track format of the read sample. - /// @since_tizen 3.0 - /// @remarks The @a format should be released using media_format_unref() function. - /// @param[in] demuxer The media demuxer handle - /// @param[in] track_index The index of the track - /// @param[out] format The media format handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @pre The media demuxer state must be set to #MEDIADEMUXER_STATE_DEMUXING by calling - /// mediademuxer_start() or set to #MEDIADEMUXER_STATE_READY by calling mediademuxer_prepare(). - /// @see mediademuxer_get_track_count() - /// @see mediademuxer_select_track() - /// @see media_format_unref() - /// @see #media_format_h - int mediademuxer_get_track_info( - mediademuxer_h demuxer, - int track_index, - ffi.Pointer format, - ) { - return _mediademuxer_get_track_info( - demuxer, - track_index, - format, - ); - } - - late final _mediademuxer_get_track_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediademuxer_h, ffi.Int, - ffi.Pointer)>>('mediademuxer_get_track_info'); - late final _mediademuxer_get_track_info = - _mediademuxer_get_track_infoPtr.asFunction< - int Function(mediademuxer_h, int, ffi.Pointer)>(); - - /// @brief Reads a frame(sample) of one single track. - /// @since_tizen 3.0 - /// @remark The @a outbuf should be released using media_packet_destroy() function. - /// @remark Once this API is called, user app can call the mediatool APIs to extract - /// side information such as pts, size, duration, flags etc. - /// @param[in] demuxer The media demuxer handle - /// @param[in] track_index The index of track of which data is needed - /// @param[out] outbuf The media packet handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @pre The media demuxer state should be #MEDIADEMUXER_STATE_DEMUXING. - /// @see mediademuxer_start() - /// @see mediademuxer_get_track_info() - /// @see mediademuxer_seek() if need to seek to a particular location - /// @see mediademuxer_unselect_track() - /// @see mediademuxer_stop() - /// @see media_packet_destroy() - /// @see #media_packet_h - int mediademuxer_read_sample( - mediademuxer_h demuxer, - int track_index, - ffi.Pointer outbuf, - ) { - return _mediademuxer_read_sample( - demuxer, - track_index, - outbuf, - ); - } - - late final _mediademuxer_read_samplePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediademuxer_h, ffi.Int, - ffi.Pointer)>>('mediademuxer_read_sample'); - late final _mediademuxer_read_sample = - _mediademuxer_read_samplePtr.asFunction< - int Function(mediademuxer_h, int, ffi.Pointer)>(); - - /// @brief Seeks to a particular instance of time (in milli seconds). - /// @since_tizen 3.0 - /// @remark If mediademuxer_seek() is followed by mediademuxer_read_sample(), outbuf will be the key frame right before the seek position. - /// @param[in] demuxer The media demuxer handle - /// @param[in] pos The value of the new start position - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @pre The media demuxer state should be #MEDIADEMUXER_STATE_DEMUXING. - /// @see mediademuxer_read_sample() - /// @see mediademuxer_stop() - int mediademuxer_seek( - mediademuxer_h demuxer, - int pos, - ) { - return _mediademuxer_seek( - demuxer, - pos, - ); - } - - late final _mediademuxer_seekPtr = - _lookup>( - 'mediademuxer_seek'); - late final _mediademuxer_seek = - _mediademuxer_seekPtr.asFunction(); - - /// @brief Unselects the selected track. - /// @since_tizen 3.0 - /// @param[in] demuxer The media demuxer handle - /// @param[in] track_index The track index to be unselected - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @pre The media demuxer state must be set to #MEDIADEMUXER_STATE_DEMUXING by calling - /// mediademuxer_read_sample() or set to #MEDIADEMUXER_STATE_READY by calling mediademuxer_select_track(). - /// @see mediademuxer_select_track() - /// @see mediademuxer_read_sample() - int mediademuxer_unselect_track( - mediademuxer_h demuxer, - int track_index, - ) { - return _mediademuxer_unselect_track( - demuxer, - track_index, - ); - } - - late final _mediademuxer_unselect_trackPtr = - _lookup>( - 'mediademuxer_unselect_track'); - late final _mediademuxer_unselect_track = _mediademuxer_unselect_trackPtr - .asFunction(); - - /// @brief Stops the media demuxer. - /// @since_tizen 3.0 - /// @remark User can call this if need to stop demuxing if needed. - /// @param[in] demuxer The media demuxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @pre The media demuxer state must be set to #MEDIADEMUXER_STATE_DEMUXING. - /// @post The media demuxer state will be in #MEDIADEMUXER_STATE_READY. - /// @see mediademuxer_start() - /// @see mediademuxer_unprepare() - int mediademuxer_stop( - mediademuxer_h demuxer, - ) { - return _mediademuxer_stop( - demuxer, - ); - } - - late final _mediademuxer_stopPtr = - _lookup>( - 'mediademuxer_stop'); - late final _mediademuxer_stop = - _mediademuxer_stopPtr.asFunction(); - - /// @brief Resets the media demuxer. - /// @since_tizen 3.0 - /// @remarks User should call this before mediademuxer_destroy() function. - /// @param[in] demuxer The media demuxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @pre The media demuxer state should be #MEDIADEMUXER_STATE_READY. - /// @post The media demuxer state will be #MEDIADEMUXER_STATE_IDLE. - /// @see mediademuxer_prepare() - int mediademuxer_unprepare( - mediademuxer_h demuxer, - ) { - return _mediademuxer_unprepare( - demuxer, - ); - } - - late final _mediademuxer_unpreparePtr = - _lookup>( - 'mediademuxer_unprepare'); - late final _mediademuxer_unprepare = - _mediademuxer_unpreparePtr.asFunction(); - - /// @brief Removes the instance of media demuxer and clear all its context memory. - /// @since_tizen 3.0 - /// @param[in] demuxer The media demuxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @pre Create a media demuxer handle by calling mediademuxer_create() function. - /// @post The media demuxer state will be #MEDIADEMUXER_STATE_NONE. - /// @see mediademuxer_create() - int mediademuxer_destroy( - mediademuxer_h demuxer, - ) { - return _mediademuxer_destroy( - demuxer, - ); - } - - late final _mediademuxer_destroyPtr = - _lookup>( - 'mediademuxer_destroy'); - late final _mediademuxer_destroy = - _mediademuxer_destroyPtr.asFunction(); - - /// @brief Gets media demuxer state. - /// @since_tizen 3.0 - /// @param[in] demuxer The media demuxer handle - /// @param[out] state The media demuxer sate - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a media demuxer handle by calling mediademuxer_create() function. - /// @see #mediademuxer_state - int mediademuxer_get_state( - mediademuxer_h demuxer, - ffi.Pointer state, - ) { - return _mediademuxer_get_state( - demuxer, - state, - ); - } - - late final _mediademuxer_get_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediademuxer_h, - ffi.Pointer)>>('mediademuxer_get_state'); - late final _mediademuxer_get_state = _mediademuxer_get_statePtr - .asFunction)>(); - - /// @brief Registers an error callback function to be invoked when an error occurs. - /// @since_tizen 3.0 - /// @param[in] demuxer The media demuxer handle - /// @param[in] callback Callback function pointer - /// @param[in] user_data The user data passed from the code where - /// mediademuxer_set_error_cb() was invoked - /// This data will be accessible from mediademuxer_error_cb() - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @pre Create a media demuxer handle by calling mediademuxer_create() function. - /// @post mediademuxer_error_cb() will be invoked. - /// @see mediademuxer_unset_error_cb() - /// @see mediademuxer_error_cb() - int mediademuxer_set_error_cb( - mediademuxer_h demuxer, - mediademuxer_error_cb callback, - ffi.Pointer user_data, - ) { - return _mediademuxer_set_error_cb( - demuxer, - callback, - user_data, - ); - } - - late final _mediademuxer_set_error_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediademuxer_h, mediademuxer_error_cb, - ffi.Pointer)>>('mediademuxer_set_error_cb'); - late final _mediademuxer_set_error_cb = - _mediademuxer_set_error_cbPtr.asFunction< - int Function( - mediademuxer_h, mediademuxer_error_cb, ffi.Pointer)>(); - - /// @brief Unregisters the error callback function. - /// @since_tizen 3.0 - /// @param[in] demuxer The media demuxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @see mediademuxer_error_cb() - int mediademuxer_unset_error_cb( - mediademuxer_h demuxer, - ) { - return _mediademuxer_unset_error_cb( - demuxer, - ); - } - - late final _mediademuxer_unset_error_cbPtr = - _lookup>( - 'mediademuxer_unset_error_cb'); - late final _mediademuxer_unset_error_cb = _mediademuxer_unset_error_cbPtr - .asFunction(); - - /// @brief Registers an eos callback function to be invoked when an eos occurs. - /// @since_tizen 3.0 - /// @param[in] demuxer The media demuxer handle - /// @param[in] callback Callback function pointer - /// @param[in] user_data The user data passed from the code where - /// mediademuxer_set_eos_cb() was invoked - /// This data will be accessible from mediademuxer_eos_cb() - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @pre Create a media demuxer handle by calling mediademuxer_create() function. - /// @post mediademuxer_eos_cb() will be invoked. - /// @see mediademuxer_unset_eos_cb() - /// @see mediademuxer_eos_cb() - int mediademuxer_set_eos_cb( - mediademuxer_h demuxer, - mediademuxer_eos_cb callback, - ffi.Pointer user_data, - ) { - return _mediademuxer_set_eos_cb( - demuxer, - callback, - user_data, - ); - } - - late final _mediademuxer_set_eos_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediademuxer_h, mediademuxer_eos_cb, - ffi.Pointer)>>('mediademuxer_set_eos_cb'); - late final _mediademuxer_set_eos_cb = _mediademuxer_set_eos_cbPtr.asFunction< - int Function( - mediademuxer_h, mediademuxer_eos_cb, ffi.Pointer)>(); - - /// @brief Unregisters the eos callback function. - /// @since_tizen 3.0 - /// @param[in] demuxer The media demuxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @see mediademuxer_eos_cb() - int mediademuxer_unset_eos_cb( - mediademuxer_h demuxer, - ) { - return _mediademuxer_unset_eos_cb( - demuxer, - ); - } - - late final _mediademuxer_unset_eos_cbPtr = - _lookup>( - 'mediademuxer_unset_eos_cb'); - late final _mediademuxer_unset_eos_cb = - _mediademuxer_unset_eos_cbPtr.asFunction(); - - /// @brief Creates a media muxer handle for muxing. - /// @since_tizen 3.0 - /// @param[out] muxer A new handle to media muxer - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @retval #MEDIAMUXER_ERROR_OUT_OF_MEMORY Allocation Failed, Out of Memory. - /// @post The media muxer state will be #MEDIAMUXER_STATE_IDLE. - /// @see mediamuxer_destroy() - int mediamuxer_create( - ffi.Pointer muxer, - ) { - return _mediamuxer_create( - muxer, - ); - } - - late final _mediamuxer_createPtr = - _lookup)>>( - 'mediamuxer_create'); - late final _mediamuxer_create = _mediamuxer_createPtr - .asFunction)>(); - - /// @brief Sets the sink path of output stream. - /// @since_tizen 3.0 - /// @remarks The mediastorage privilege(http://tizen.org/privilege/mediastorage) should be added if any video/audio files are to be saved in the internal storage. - /// @remarks The externalstorage privilege(http://tizen.org/privilege/externalstorage) should be added if any video/audio files are to be saved in the external storage. - /// @param[in] muxer A new handle to media muxer - /// @param[in] path The location of the output media file, such as the file path - /// This is the path at which the muxed file should be saved. - /// @param[in] format The format of the output media file - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIAMUXER_ERROR_INVALID_PATH Invalid path - /// @pre The media muxer state will be #MEDIAMUXER_STATE_IDLE by calling mediamuxer_create - /// @see #mediamuxer_output_format_e - int mediamuxer_set_data_sink( - mediamuxer_h muxer, - ffi.Pointer path, - int format, - ) { - return _mediamuxer_set_data_sink( - muxer, - path, - format, - ); - } - - late final _mediamuxer_set_data_sinkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediamuxer_h, ffi.Pointer, - ffi.Int32)>>('mediamuxer_set_data_sink'); - late final _mediamuxer_set_data_sink = _mediamuxer_set_data_sinkPtr - .asFunction, int)>(); - - /// @brief Adds the media track of interest to the muxer handle. - /// @since_tizen 3.0 - /// @param[in] muxer The media muxer handle - /// @param[in] media_format The format of media muxer - /// @param[out] track_index The index of the media track - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state - /// @pre The media muxer state must be set to #MEDIAMUXER_STATE_IDLE. - /// @see #media_format_h - /// @see mediamuxer_create() - /// @see mediamuxer_prepare() - int mediamuxer_add_track( - mediamuxer_h muxer, - media_format_h media_format, - ffi.Pointer track_index, - ) { - return _mediamuxer_add_track( - muxer, - media_format, - track_index, - ); - } - - late final _mediamuxer_add_trackPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediamuxer_h, media_format_h, - ffi.Pointer)>>('mediamuxer_add_track'); - late final _mediamuxer_add_track = _mediamuxer_add_trackPtr.asFunction< - int Function(mediamuxer_h, media_format_h, ffi.Pointer)>(); - - /// @brief Prepares the media muxer. - /// @remarks Initiates the necessary parameters. - /// @since_tizen 3.0 - /// @param[in] muxer The media muxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state - /// @pre The media muxer state must be set to #MEDIAMUXER_STATE_IDLE. - /// @post The media muxer state will be #MEDIAMUXER_STATE_READY. - /// @see mediamuxer_create() - /// @see mediamuxer_unprepare() - int mediamuxer_prepare( - mediamuxer_h muxer, - ) { - return _mediamuxer_prepare( - muxer, - ); - } - - late final _mediamuxer_preparePtr = - _lookup>( - 'mediamuxer_prepare'); - late final _mediamuxer_prepare = - _mediamuxer_preparePtr.asFunction(); - - /// @brief Starts the media muxer. - /// @remarks Keeps the muxer ready for writing data. - /// @since_tizen 3.0 - /// @param[in] muxer The media muxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state - /// @pre The media muxer state must be set to #MEDIAMUXER_STATE_READY. - /// @post The media muxer state will be #MEDIAMUXER_STATE_MUXING. - /// @see mediamuxer_prepare() - /// @see mediamuxer_stop() - int mediamuxer_start( - mediamuxer_h muxer, - ) { - return _mediamuxer_start( - muxer, - ); - } - - late final _mediamuxer_startPtr = - _lookup>( - 'mediamuxer_start'); - late final _mediamuxer_start = - _mediamuxer_startPtr.asFunction(); - - /// @brief Writes the media packet of interest to the muxer handle. - /// @since_tizen 3.0 - /// @param[in] muxer The media muxer handle - /// @param[in] track_index The index of the media track - /// @param[in] inbuf The packet of media muxer - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state - /// @pre The media muxer state must be set to #MEDIAMUXER_STATE_READY by calling mediamuxer_prepare() or - /// set to #MEDIAMUXER_STATE_PAUSED by calling mediamuxer_pause(). - /// @post The media muxer state will be #MEDIAMUXER_STATE_MUXING. - /// @see mediamuxer_prepare() - /// @see mediamuxer_close_track() - /// @see mediamuxer_pause() - /// @see #media_packet_h - int mediamuxer_write_sample( - mediamuxer_h muxer, - int track_index, - media_packet_h inbuf, - ) { - return _mediamuxer_write_sample( - muxer, - track_index, - inbuf, - ); - } - - late final _mediamuxer_write_samplePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediamuxer_h, ffi.Int, - media_packet_h)>>('mediamuxer_write_sample'); - late final _mediamuxer_write_sample = _mediamuxer_write_samplePtr - .asFunction(); - - /// @brief Closes the track from further writing of data. - /// @remarks For each added track, user needs to call this API to indicate the end of stream. - /// @since_tizen 3.0 - /// @param[in] muxer The media muxer handle - /// @param[in] track_index the selected track index - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The media muxer state must be set to #MEDIAMUXER_STATE_MUXING. - /// @see mediamuxer_write_sample() - /// @see mediamuxer_pause() - /// @see mediamuxer_unprepare() - /// @see #mediamuxer_error_e - int mediamuxer_close_track( - mediamuxer_h muxer, - int track_index, - ) { - return _mediamuxer_close_track( - muxer, - track_index, - ); - } - - late final _mediamuxer_close_trackPtr = - _lookup>( - 'mediamuxer_close_track'); - late final _mediamuxer_close_track = - _mediamuxer_close_trackPtr.asFunction(); - - /// @brief Pauses the media muxer. - /// @remarks To temporarily disable writing data for muxing. This API pauses a playing muxer - /// If the prior state of the muxer is not in PLAYING, no action will be taken. - /// @since_tizen 3.0 - /// @param[in] muxer The media muxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state - /// @pre The media muxer state must be set to #MEDIAMUXER_STATE_MUXING. - /// @post The media muxer state will be #MEDIAMUXER_STATE_PAUSED. - /// @see mediamuxer_write_sample() - /// @see mediamuxer_resume() - int mediamuxer_pause( - mediamuxer_h muxer, - ) { - return _mediamuxer_pause( - muxer, - ); - } - - late final _mediamuxer_pausePtr = - _lookup>( - 'mediamuxer_pause'); - late final _mediamuxer_pause = - _mediamuxer_pausePtr.asFunction(); - - /// @brief Resumes the media muxer. - /// @remarks Make it ready for any further writing. This API will resume a paused muxer. - /// If the prior state of the muxer is not playing, no action will be taken. - /// @since_tizen 3.0 - /// @param[in] muxer The media muxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state - /// @pre The media muxer state must be set to #MEDIAMUXER_STATE_PAUSED. - /// @post The media muxer state will be #MEDIAMUXER_STATE_MUXING. - /// @see mediamuxer_pause() - int mediamuxer_resume( - mediamuxer_h muxer, - ) { - return _mediamuxer_resume( - muxer, - ); - } - - late final _mediamuxer_resumePtr = - _lookup>( - 'mediamuxer_resume'); - late final _mediamuxer_resume = - _mediamuxer_resumePtr.asFunction(); - - /// @brief Stops the media muxer. - /// @remarks Keeps the muxer ready for writing data. - /// @since_tizen 3.0 - /// @param[in] muxer The media muxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state - /// @pre The media muxer state must be set to #MEDIAMUXER_STATE_MUXING - /// or #MEDIAMUXER_STATE_PAUSED. - /// @post The media muxer state will be #MEDIAMUXER_STATE_READY. - /// @see mediamuxer_start() - /// @see mediamuxer_unprepare() - int mediamuxer_stop( - mediamuxer_h muxer, - ) { - return _mediamuxer_stop( - muxer, - ); - } - - late final _mediamuxer_stopPtr = - _lookup>( - 'mediamuxer_stop'); - late final _mediamuxer_stop = - _mediamuxer_stopPtr.asFunction(); - - /// @brief Unprepares the media muxer. - /// @remarks Unrefs the variables created after calling mediamuxer_prepare(). - /// @since_tizen 3.0 - /// @param[in] muxer The media muxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state - /// @pre The media muxer state must be set to #MEDIAMUXER_STATE_READY or - /// set to #MEDIAMUXER_STATE_PAUSED by calling mediamuxer_pause(). - /// @post The media muxer state will be #MEDIAMUXER_STATE_IDLE. - /// @see mediamuxer_write_sample() - /// @see mediamuxer_pause() - /// @see mediamuxer_destroy() - int mediamuxer_unprepare( - mediamuxer_h muxer, - ) { - return _mediamuxer_unprepare( - muxer, - ); - } - - late final _mediamuxer_unpreparePtr = - _lookup>( - 'mediamuxer_unprepare'); - late final _mediamuxer_unprepare = - _mediamuxer_unpreparePtr.asFunction(); - - /// @brief Removes the instance of media muxer and clear all its context memory. - /// @since_tizen 3.0 - /// @param[in] muxer The media muxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state - /// @pre Create a media muxer handle by calling mediamuxer_create() function. - /// @post The media muxer state will be #MEDIAMUXER_STATE_NONE. - /// @see mediamuxer_create() - int mediamuxer_destroy( - mediamuxer_h muxer, - ) { - return _mediamuxer_destroy( - muxer, - ); - } - - late final _mediamuxer_destroyPtr = - _lookup>( - 'mediamuxer_destroy'); - late final _mediamuxer_destroy = - _mediamuxer_destroyPtr.asFunction(); - - /// @brief Gets media muxer state. - /// @since_tizen 3.0 - /// @param[in] muxer The media muxer handle - /// @param[out] state The media muxer sate - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a media muxer handle by calling mediamuxer_create() function. - /// @see #mediamuxer_state_e - int mediamuxer_get_state( - mediamuxer_h muxer, - ffi.Pointer state, - ) { - return _mediamuxer_get_state( - muxer, - state, - ); - } - - late final _mediamuxer_get_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mediamuxer_h, ffi.Pointer)>>('mediamuxer_get_state'); - late final _mediamuxer_get_state = _mediamuxer_get_statePtr - .asFunction)>(); - - /// @brief Registers a error callback function to be invoked when an error occurs. - /// @since_tizen 3.0 - /// @param[in] muxer The media muxer handle - /// @param[in] callback Callback function pointer - /// @param[in] user_data The user data passed from the code where - /// mediamuxer_set_error_cb() was invoked - /// This data will be accessible from @a mediamuxer_error_cb - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Create a media muxer handle by calling mediamuxer_create() function. - /// @post mediamuxer_error_cb() will be invoked. - /// @see mediamuxer_unset_error_cb() - /// @see mediamuxer_error_cb() - int mediamuxer_set_error_cb( - mediamuxer_h muxer, - mediamuxer_error_cb callback, - ffi.Pointer user_data, - ) { - return _mediamuxer_set_error_cb( - muxer, - callback, - user_data, - ); - } - - late final _mediamuxer_set_error_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediamuxer_h, mediamuxer_error_cb, - ffi.Pointer)>>('mediamuxer_set_error_cb'); - late final _mediamuxer_set_error_cb = _mediamuxer_set_error_cbPtr.asFunction< - int Function(mediamuxer_h, mediamuxer_error_cb, ffi.Pointer)>(); - - /// @brief Unregisters the error callback function. - /// @since_tizen 3.0 - /// @param[in] muxer The media muxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see mediamuxer_error_cb() - int mediamuxer_unset_error_cb( - mediamuxer_h muxer, - ) { - return _mediamuxer_unset_error_cb( - muxer, - ); - } - - late final _mediamuxer_unset_error_cbPtr = - _lookup>( - 'mediamuxer_unset_error_cb'); - late final _mediamuxer_unset_error_cb = - _mediamuxer_unset_error_cbPtr.asFunction(); - - /// @brief Registers an EOS (end of stream) callback function to be invoked when an EOS occurs. - /// @since_tizen 4.0 - /// @param[in] muxer The media muxer handle - /// @param[in] callback Callback function pointer - /// @param[in] user_data The user data passed from the code where - /// mediamuxer_set_eos_cb() was invoked;\n - /// this data will be accessible from mediamuxer_eos_cb() - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state - /// @pre Create a media muxer handle by calling mediamuxer_create() function. - /// @post mediamuxer_eos_cb() will be invoked. - /// @see mediamuxer_unset_eos_cb() - /// @see mediamuxer_eos_cb() - int mediamuxer_set_eos_cb( - mediamuxer_h muxer, - mediamuxer_eos_cb callback, - ffi.Pointer user_data, - ) { - return _mediamuxer_set_eos_cb( - muxer, - callback, - user_data, - ); - } - - late final _mediamuxer_set_eos_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediamuxer_h, mediamuxer_eos_cb, - ffi.Pointer)>>('mediamuxer_set_eos_cb'); - late final _mediamuxer_set_eos_cb = _mediamuxer_set_eos_cbPtr.asFunction< - int Function(mediamuxer_h, mediamuxer_eos_cb, ffi.Pointer)>(); - - /// @brief Unregisters the EOS (end of stream) callback function. - /// @since_tizen 4.0 - /// @param[in] muxer The media muxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state - /// @see mediamuxer_eos_cb() - int mediamuxer_unset_eos_cb( - mediamuxer_h muxer, - ) { - return _mediamuxer_unset_eos_cb( - muxer, - ); - } - - late final _mediamuxer_unset_eos_cbPtr = - _lookup>( - 'mediamuxer_unset_eos_cb'); - late final _mediamuxer_unset_eos_cb = - _mediamuxer_unset_eos_cbPtr.asFunction(); - - /// @brief Registers a error callback function to be invoked when an error occurs. - /// @details Following error codes can be delivered by error callback. - /// #MEDIA_STREAMER_ERROR_INVALID_OPERATION, - /// #MEDIA_STREAMER_ERROR_FILE_NO_SPACE_ON_DEVICE, - /// #MEDIA_STREAMER_ERROR_NOT_SUPPORTED, - /// #MEDIA_STREAMER_ERROR_CONNECTION_FAILED, - /// #MEDIA_STREAMER_ERROR_RESOURCE_CONFLICT - /// @since_tizen 3.0 - /// @param [in] streamer Media streamer handle - /// @param [in] callback Callback function pointer - /// @param [in] user_data The user data passed from the code where - /// media_streamer_set_error_cb() was invoked - /// This data will be accessible from @a media_streamer_error_cb - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a media streamer handle by calling media_streamer_create() function - /// @post media_streamer_error_cb() will be invoked. - /// @see media_streamer_unset_error_cb() - /// @see media_streamer_error_cb() - int media_streamer_set_error_cb( - media_streamer_h streamer, - media_streamer_error_cb callback, - ffi.Pointer user_data, - ) { - return _media_streamer_set_error_cb( - streamer, - callback, - user_data, - ); - } - - late final _media_streamer_set_error_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_h, media_streamer_error_cb, - ffi.Pointer)>>('media_streamer_set_error_cb'); - late final _media_streamer_set_error_cb = - _media_streamer_set_error_cbPtr.asFunction< - int Function(media_streamer_h, media_streamer_error_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the error callback function. - /// @since_tizen 3.0 - /// @param [in] streamer Media streamer handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @see media_streamer_error_cb() - int media_streamer_unset_error_cb( - media_streamer_h streamer, - ) { - return _media_streamer_unset_error_cb( - streamer, - ); - } - - late final _media_streamer_unset_error_cbPtr = - _lookup>( - 'media_streamer_unset_error_cb'); - late final _media_streamer_unset_error_cb = _media_streamer_unset_error_cbPtr - .asFunction(); - - /// @brief Registers a callback that will be triggered after media streamer state is changed. - /// @since_tizen 3.0 - /// @param [in] streamer Media streamer handle - /// @param [in] callback Callback function pointer - /// @param [in] user_data The user data passed from the code - /// where media_streamer_set_state_change_cb() was invoked - /// This data will be accessible from @a media_streamer_state_changed_cb - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a media streamer handle by calling media_streamer_create() function - /// @post media_streamer_state_changed_cb() will be invoked. - /// @see media_streamer_unset_state_change_cb() - /// @see media_streamer_state_change_cb() - int media_streamer_set_state_change_cb( - media_streamer_h streamer, - media_streamer_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _media_streamer_set_state_change_cb( - streamer, - callback, - user_data, - ); - } - - late final _media_streamer_set_state_change_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_h, media_streamer_state_changed_cb, - ffi.Pointer)>>('media_streamer_set_state_change_cb'); - late final _media_streamer_set_state_change_cb = - _media_streamer_set_state_change_cbPtr.asFunction< - int Function(media_streamer_h, media_streamer_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the state changed callback function. - /// @since_tizen 3.0 - /// @param [in] streamer Media streamer handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @see media_streamer_set_state_change_cb() - int media_streamer_unset_state_change_cb( - media_streamer_h streamer, - ) { - return _media_streamer_unset_state_change_cb( - streamer, - ); - } - - late final _media_streamer_unset_state_change_cbPtr = - _lookup>( - 'media_streamer_unset_state_change_cb'); - late final _media_streamer_unset_state_change_cb = - _media_streamer_unset_state_change_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be invoked when the media streamer is interrupted. - /// @since_tizen 3.0 - /// @param[in] streamer Media streamer handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @post media_streamer_interrupted_cb() will be invoked. - /// @see media_streamer_unset_interrupted_cb() - /// @see #media_streamer_interrupted_code_e - int media_streamer_set_interrupted_cb( - media_streamer_h streamer, - media_streamer_interrupted_cb callback, - ffi.Pointer user_data, - ) { - return _media_streamer_set_interrupted_cb( - streamer, - callback, - user_data, - ); - } - - late final _media_streamer_set_interrupted_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_h, media_streamer_interrupted_cb, - ffi.Pointer)>>('media_streamer_set_interrupted_cb'); - late final _media_streamer_set_interrupted_cb = - _media_streamer_set_interrupted_cbPtr.asFunction< - int Function(media_streamer_h, media_streamer_interrupted_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen 3.0 - /// @param[in] streamer Media streamer handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @see media_streamer_set_interrupted_cb() - int media_streamer_unset_interrupted_cb( - media_streamer_h streamer, - ) { - return _media_streamer_unset_interrupted_cb( - streamer, - ); - } - - late final _media_streamer_unset_interrupted_cbPtr = - _lookup>( - 'media_streamer_unset_interrupted_cb'); - late final _media_streamer_unset_interrupted_cb = - _media_streamer_unset_interrupted_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be invoked when buffer underrun or overflow is occurred. - /// @details This function can be called only for MEDIA_STREAMER_NODE_SRC_TYPE_CUSTOM source type - /// @since_tizen 3.0 - /// @remarks This API is used for media stream playback only. - /// @param [in] source Media streamer source node handle - /// @param [in] callback The buffer status callback function to register - /// @param [in] user_data The user data passed from the code where - /// media_streamer_src_set_buffer_status_cb() was invoked - /// This data will be accessible from @a media_streamer_custom_buffer_status_cb() - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a media streamer source node handle by calling media_streamer_node_create_src() function - /// @pre Add created media streamer source node to media streamer by calling media_streamer_node_add() function - /// @post media_streamer_custom_buffer_status_cb() will be invoked. - /// @see media_streamer_src_unset_buffer_status_cb() - /// @see media_streamer_custom_buffer_status_cb() - int media_streamer_src_set_buffer_status_cb( - media_streamer_node_h source, - media_streamer_custom_buffer_status_cb callback, - ffi.Pointer user_data, - ) { - return _media_streamer_src_set_buffer_status_cb( - source, - callback, - user_data, - ); - } - - late final _media_streamer_src_set_buffer_status_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_streamer_node_h, - media_streamer_custom_buffer_status_cb, - ffi.Pointer)>>( - 'media_streamer_src_set_buffer_status_cb'); - late final _media_streamer_src_set_buffer_status_cb = - _media_streamer_src_set_buffer_status_cbPtr.asFunction< - int Function(media_streamer_node_h, - media_streamer_custom_buffer_status_cb, ffi.Pointer)>(); - - /// @brief Unregisters the src buffer status callback function. - /// @since_tizen 3.0 - /// @param [in] source Media streamer source node handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @see media_streamer_src_set_buffer_status_cb() - int media_streamer_src_unset_buffer_status_cb( - media_streamer_node_h source, - ) { - return _media_streamer_src_unset_buffer_status_cb( - source, - ); - } - - late final _media_streamer_src_unset_buffer_status_cbPtr = - _lookup>( - 'media_streamer_src_unset_buffer_status_cb'); - late final _media_streamer_src_unset_buffer_status_cb = - _media_streamer_src_unset_buffer_status_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be called when the custom sink is ready for data processing. - /// @details This function can be called only for MEDIA_STREAMER_NODE_SINK_TYPE_CUSTOM sink type - /// @since_tizen 3.0 - /// @param [in] sink Media streamer sink node handle - /// @param [in] callback Callback function pointer - /// @param [in] user_data The user data passed from the code where - /// media_streamer_sink_set_data_ready_cb() was invoked - /// This data will be accessible from @a media_streamer_sink_data_ready_cb - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a media streamer sink handle by calling media_streamer_node_create_sink() function - /// @pre Add created media streamer sink node to media streamer by calling media_streamer_node_add() function - /// @post media_streamer_sink_data_ready_cb() will be invoked. - /// @see media_streamer_sink_unset_data_ready_cb() - /// @see media_streamer_sink_data_ready_cb() - int media_streamer_sink_set_data_ready_cb( - media_streamer_node_h sink, - media_streamer_sink_data_ready_cb callback, - ffi.Pointer user_data, - ) { - return _media_streamer_sink_set_data_ready_cb( - sink, - callback, - user_data, - ); - } - - late final _media_streamer_sink_set_data_ready_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_streamer_node_h, - media_streamer_sink_data_ready_cb, - ffi.Pointer)>>('media_streamer_sink_set_data_ready_cb'); - late final _media_streamer_sink_set_data_ready_cb = - _media_streamer_sink_set_data_ready_cbPtr.asFunction< - int Function(media_streamer_node_h, media_streamer_sink_data_ready_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the sink data ready callback function. - /// @since_tizen 3.0 - /// @param [in] sink Media streamer sink node handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @see media_streamer_sink_set_data_ready_cb() - int media_streamer_sink_unset_data_ready_cb( - media_streamer_node_h sink, - ) { - return _media_streamer_sink_unset_data_ready_cb( - sink, - ); - } - - late final _media_streamer_sink_unset_data_ready_cbPtr = - _lookup>( - 'media_streamer_sink_unset_data_ready_cb'); - late final _media_streamer_sink_unset_data_ready_cb = - _media_streamer_sink_unset_data_ready_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be called when custom sink detect the end-of-stream. - /// @since_tizen 3.0 - /// @param [in] sink Media streamer sink node handle - /// @param [in] callback Callback function pointer - /// @param [in] user_data The user data passed from the code where - /// media_streamer_sink_set_eos_cb() was invoked. - /// This data will be accessible from @a media_streamer_sink_eos_cb - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a media streamer sink handle by calling media_streamer_node_create_sink() function - /// @pre Add created media streamer sink node to media streamer by calling media_streamer_node_add() function - /// @post media_streamer_sink_eos_cb() will be invoked. - /// @see media_streamer_sink_unset_eos_cb() - /// @see media_streamer_sink_eos_cb() - int media_streamer_sink_set_eos_cb( - media_streamer_node_h sink, - media_streamer_sink_eos_cb callback, - ffi.Pointer user_data, - ) { - return _media_streamer_sink_set_eos_cb( - sink, - callback, - user_data, - ); - } - - late final _media_streamer_sink_set_eos_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_node_h, media_streamer_sink_eos_cb, - ffi.Pointer)>>('media_streamer_sink_set_eos_cb'); - late final _media_streamer_sink_set_eos_cb = - _media_streamer_sink_set_eos_cbPtr.asFunction< - int Function(media_streamer_node_h, media_streamer_sink_eos_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the sink end-of-stream callback function. - /// @since_tizen 3.0 - /// @param [in] sink Media streamer sink node handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @see media_streamer_sink_set_eos_cb() - int media_streamer_sink_unset_eos_cb( - media_streamer_node_h sink, - ) { - return _media_streamer_sink_unset_eos_cb( - sink, - ); - } - - late final _media_streamer_sink_unset_eos_cbPtr = - _lookup>( - 'media_streamer_sink_unset_eos_cb'); - late final _media_streamer_sink_unset_eos_cb = - _media_streamer_sink_unset_eos_cbPtr - .asFunction(); - - /// @brief Creates an instance of media streamer and - /// passes the handle to the caller. - /// @since_tizen 3.0 - /// @remarks You must release @a streamer using media_streamer_destroy() - /// @param [out] streamer Media streamer handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @post The media streamer state will be #MEDIA_STREAMER_STATE_IDLE. - /// @see media_streamer_destroy() - int media_streamer_create( - ffi.Pointer streamer, - ) { - return _media_streamer_create( - streamer, - ); - } - - late final _media_streamer_createPtr = _lookup< - ffi.NativeFunction)>>( - 'media_streamer_create'); - late final _media_streamer_create = _media_streamer_createPtr - .asFunction)>(); - - /// @brief Sets media streamer state to MEDIA_STREAMER_STATE_READY. - /// @since_tizen 3.0 - /// @param [in] streamer Media streamer handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The media streamer state must be set to #MEDIA_STREAMER_STATE_IDLE - /// by calling media_streamer_create() or media_streamer_unprepare(). - /// @pre At least one src and one sink should be added and linked in the streamer - /// by calling media_streamer_node_create_src(), media_streamer_node_create_sink() and media_streamer_node_link(). - /// @post The media streamer state will be #MEDIA_STREAMER_STATE_READY. - /// @see media_streamer_unprepare() - /// @see media_streamer_create() - int media_streamer_prepare( - media_streamer_h streamer, - ) { - return _media_streamer_prepare( - streamer, - ); - } - - late final _media_streamer_preparePtr = - _lookup>( - 'media_streamer_prepare'); - late final _media_streamer_prepare = - _media_streamer_preparePtr.asFunction(); - - /// @brief Sets media streamer state to MEDIA_STREAMER_STATE_IDLE. - /// @details The most recently used media is reset and no longer associated with the media streamer. - /// @since_tizen 3.0 - /// @param [in] streamer Media streamer handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The media streamer state should be higher than #MEDIA_STREAMER_STATE_IDLE. - /// @post The media streamer state will be #MEDIA_STREAMER_STATE_IDLE. - /// @see media_streamer_prepare() - int media_streamer_unprepare( - media_streamer_h streamer, - ) { - return _media_streamer_unprepare( - streamer, - ); - } - - late final _media_streamer_unpreparePtr = - _lookup>( - 'media_streamer_unprepare'); - late final _media_streamer_unprepare = - _media_streamer_unpreparePtr.asFunction(); - - /// @brief Sets media streamer state to MEDIA_STREAMER_STATE_PLAYING. - /// @details Start running the current streamer, or resumes it if paused. - /// @since_tizen 3.0 - /// @param [in] streamer Media streamer handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The media streamer state must be set to #MEDIA_STREAMER_STATE_READY by calling media_streamer_prepare() or - /// set to #MEDIA_STREAMER_STATE_PAUSED by calling media_streamer_pause(). - /// @post The media streamer state will be #MEDIA_STREAMER_STATE_PLAYING. - /// @see media_streamer_create() - /// @see media_streamer_pause() - /// @see media_streamer_stop() - int media_streamer_play( - media_streamer_h streamer, - ) { - return _media_streamer_play( - streamer, - ); - } - - late final _media_streamer_playPtr = - _lookup>( - 'media_streamer_play'); - late final _media_streamer_play = - _media_streamer_playPtr.asFunction(); - - /// @brief Pauses the media streamer. - /// @since_tizen 3.0 - /// @param [in] streamer Media streamer handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The media streamer state must be set to #MEDIA_STREAMER_STATE_PLAYING. - /// @post The media streamer state will be #MEDIA_STREAMER_STATE_READY. - /// @see media_streamer_create() - /// @see media_streamer_play() - int media_streamer_pause( - media_streamer_h streamer, - ) { - return _media_streamer_pause( - streamer, - ); - } - - late final _media_streamer_pausePtr = - _lookup>( - 'media_streamer_pause'); - late final _media_streamer_pause = - _media_streamer_pausePtr.asFunction(); - - /// @brief Stops the media streamer. - /// @since_tizen 3.0 - /// @param [in] streamer Media streamer handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The media streamer state must be set to #MEDIA_STREAMER_STATE_PLAYING by calling media_streamer_play() or - /// set to #MEDIA_STREAMER_STATE_PAUSED by calling media_streamer_pause(). - /// @post The media streamer state will be #MEDIA_STREAMER_STATE_READY. - /// @see media_streamer_create() - /// @see media_streamer_play() - /// @see media_streamer_pause() - int media_streamer_stop( - media_streamer_h streamer, - ) { - return _media_streamer_stop( - streamer, - ); - } - - late final _media_streamer_stopPtr = - _lookup>( - 'media_streamer_stop'); - late final _media_streamer_stop = - _media_streamer_stopPtr.asFunction(); - - /// @brief Destroys media streamer. - /// @since_tizen 3.0 - /// @remark Nodes in streamer will be removed automatically. - /// Don't need to remove nodes by calling media_streamer_node_remove(). - /// If you want to change the node without destroying streamer handle, - /// you can call the media_streamer_node_remove() function - /// after setting the streamer state to MEDIA_STREAMER_STATE_IDLE state. - /// @param [in] streamer Media streamer handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a media streamer handle by calling media_streamer_create() function - /// @post The media streamer state will be #MEDIA_STREAMER_STATE_NONE. - /// @see media_streamer_create() - int media_streamer_destroy( - media_streamer_h streamer, - ) { - return _media_streamer_destroy( - streamer, - ); - } - - late final _media_streamer_destroyPtr = - _lookup>( - 'media_streamer_destroy'); - late final _media_streamer_destroy = - _media_streamer_destroyPtr.asFunction(); - - /// @brief Changes playback position to the defined time value, asynchronously. - /// @since_tizen 3.0 - /// @param [in] streamer Media streamer handle - /// @param [in] time Time in millisecond - /// @param [in] accurate If @c true, it will seek to the accurate position, but this might be considerably slower for some formats, - /// otherwise @c false, it will seek to the nearest keyframe. - /// @param [in] callback The callback function to register - /// @param [in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_STREAMER_ERROR_SEEK_FAILED Seek operation failure - /// @pre The media streamer state must be one of these: #MEDIA_STREAMER_STATE_PAUSED, or #MEDIA_STREAMER_STATE_PLAYING. - /// @post It invokes media_streamer_set_play_position() when seek operation completes, if you set a callback. - /// @see media_streamer_get_play_position() - int media_streamer_set_play_position( - media_streamer_h streamer, - int time, - bool accurate, - media_streamer_position_changed_cb callback, - ffi.Pointer user_data, - ) { - return _media_streamer_set_play_position( - streamer, - time, - accurate, - callback, - user_data, - ); - } - - late final _media_streamer_set_play_positionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_streamer_h, - ffi.Int, - ffi.Bool, - media_streamer_position_changed_cb, - ffi.Pointer)>>('media_streamer_set_play_position'); - late final _media_streamer_set_play_position = - _media_streamer_set_play_positionPtr.asFunction< - int Function(media_streamer_h, int, bool, - media_streamer_position_changed_cb, ffi.Pointer)>(); - - /// @brief Gets the current position in milliseconds. - /// @since_tizen 3.0 - /// @param [in] streamer Media streamer handle - /// @param [out] time The current position in milliseconds - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The media streamer state must be one of these: #MEDIA_STREAMER_STATE_PAUSED, or #MEDIA_STREAMER_STATE_PLAYING. - /// @see media_streamer_set_play_position() - int media_streamer_get_play_position( - media_streamer_h streamer, - ffi.Pointer time, - ) { - return _media_streamer_get_play_position( - streamer, - time, - ); - } - - late final _media_streamer_get_play_positionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_h, - ffi.Pointer)>>('media_streamer_get_play_position'); - late final _media_streamer_get_play_position = - _media_streamer_get_play_positionPtr - .asFunction)>(); - - /// @brief Gets the total running time of the associated media. - /// @since_tizen 3.0 - /// @remarks The streamer's src node type should be MEDIA_STREAMER_NODE_SRC_TYPE_FILE or MEDIA_STREAMER_NODE_SRC_TYPE_HTTP. - /// If not, return value will be MEDIA_STREAMER_ERROR_NONE and duration will be -1. - /// @param [in] streamer Media streamer handle - /// @param [out] duration The duration in milliseconds - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The media streamer state must be one of these: #MEDIA_STREAMER_STATE_PAUSED, or #MEDIA_STREAMER_STATE_PLAYING. - int media_streamer_get_duration( - media_streamer_h streamer, - ffi.Pointer duration, - ) { - return _media_streamer_get_duration( - streamer, - duration, - ); - } - - late final _media_streamer_get_durationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_h, - ffi.Pointer)>>('media_streamer_get_duration'); - late final _media_streamer_get_duration = _media_streamer_get_durationPtr - .asFunction)>(); - - /// @brief Gets media streamer state. - /// @since_tizen 3.0 - /// @param [in] streamer Media streamer handle - /// @param [out] state Media streamer state - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a media streamer handle by calling media_streamer_create() function - /// @see #media_streamer_state_e - int media_streamer_get_state( - media_streamer_h streamer, - ffi.Pointer state, - ) { - return _media_streamer_get_state( - streamer, - state, - ); - } - - late final _media_streamer_get_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_h, - ffi.Pointer)>>('media_streamer_get_state'); - late final _media_streamer_get_state = _media_streamer_get_statePtr - .asFunction)>(); - - /// @brief Creates media streamer source node. - /// @since_tizen 3.0 - /// @remarks The internet privilege(http://tizen.org/privilege/internet) should be added if any URIs are used to play from network. - /// The camera privilege(http://tizen.org/privilege/camera) should be added if the src node handle the camera device. - /// The recorder privilege(http://tizen.org/privilege/recorder) should be added if the src node handle the recorder device. - /// You can release @a source node using media_streamer_node_destroy() function. - /// @param [in] type Media streamer source node type - /// @param [out] src Media streamer source node handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_STREAMER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_STREAMER_ERROR_NOT_SUPPORTED Not supported - /// @see #media_streamer_node_src_type_e - /// @see media_streamer_node_destroy() - int media_streamer_node_create_src( - int type, - ffi.Pointer src, - ) { - return _media_streamer_node_create_src( - type, - src, - ); - } - - late final _media_streamer_node_create_srcPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer)>>( - 'media_streamer_node_create_src'); - late final _media_streamer_node_create_src = - _media_streamer_node_create_srcPtr - .asFunction)>(); - - /// @brief Pushes packet into custom source node. - /// @details This function can be called only for MEDIA_STREAMER_NODE_SRC_TYPE_CUSTOM. - /// @since_tizen 3.0 - /// @param [in] src Media streamer source node handle - /// @param [in] packet Media packet handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_STREAMER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a source node handle by calling media_streamer_node_create_src() function - /// @pre The media streamer state must be set to #MEDIA_STREAMER_STATE_IDLE at least. - /// @see #media_packet_h - int media_streamer_node_push_packet( - media_streamer_node_h src, - media_packet_h packet, - ) { - return _media_streamer_node_push_packet( - src, - packet, - ); - } - - late final _media_streamer_node_push_packetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_node_h, - media_packet_h)>>('media_streamer_node_push_packet'); - late final _media_streamer_node_push_packet = - _media_streamer_node_push_packetPtr - .asFunction(); - - /// @brief Creates media streamer sink node. - /// @since_tizen 3.0 - /// @remarks The internet privilege(http://tizen.org/privilege/internet) should be added if any URIs are used to transmit the output data. - /// You can release @a sink node using media_streamer_node_destroy() - /// @remarks If @a type is #MEDIA_STREAMER_NODE_SINK_TYPE_ADAPTIVE, the HTTP server will be started and the server will be able to transmit the output data to the other device. - /// The application must have an authentication responsibility between a server and client because the data transmission is not secure. - /// @param [in] type Type of sink node to be created - /// @param [out] sink Media streamer sink node handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_STREAMER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_STREAMER_ERROR_NOT_SUPPORTED Not supported - /// @see #media_streamer_node_sink_type_e - /// @see media_streamer_node_destroy() - int media_streamer_node_create_sink( - int type, - ffi.Pointer sink, - ) { - return _media_streamer_node_create_sink( - type, - sink, - ); - } - - late final _media_streamer_node_create_sinkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer)>>( - 'media_streamer_node_create_sink'); - late final _media_streamer_node_create_sink = - _media_streamer_node_create_sinkPtr - .asFunction)>(); - - /// @brief Pulls packet from custom sink node. - /// @details This function can be called only for MEDIA_STREAMER_NODE_SINK_TYPE_CUSTOM - /// @since_tizen 3.0 - /// @param [in] sink Media streamer sink node handle - /// @param [out] packet Media packet handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a sink node handle by calling media_streamer_node_create_sink() function - /// @pre Set media_streamer_data_ready_cb by calling media_streamer_set_data_ready_cb() function. - /// @see #media_packet_h - /// @see media_streamer_node_create_sink() - int media_streamer_node_pull_packet( - media_streamer_node_h sink, - ffi.Pointer packet, - ) { - return _media_streamer_node_pull_packet( - sink, - packet, - ); - } - - late final _media_streamer_node_pull_packetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_node_h, - ffi.Pointer)>>('media_streamer_node_pull_packet'); - late final _media_streamer_node_pull_packet = - _media_streamer_node_pull_packetPtr.asFunction< - int Function(media_streamer_node_h, ffi.Pointer)>(); - - /// @brief Creates media streamer node except MEDIA_STREAMER_NODE_TYPE_SRC and MEDIA_STREAMER_NODE_TYPE_SINK. - /// @details Creates node specific @a type with specific format of input - /// and output data. - /// @since_tizen 3.0 - /// @remarks The node type should not be MEDIA_STREAMER_NODE_TYPE_SRC and MEDIA_STREAMER_NODE_TYPE_SINK. - /// To create src/sink type node, media_streamer_node_create_src()/media_streamer_node_create_sink() should be called. - /// You can release @a node using media_streamer_node_destroy() function - /// @param [in] type Created node type - /// @param [in] in_fmt Media format handle for input data - /// @param [in] out_fmt Media format handle for output data - /// @param [out] node Media streamer node handle to be created - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @see #media_streamer_node_type_e - /// @see #media_format_h - /// @see media_streamer_node_destroy() - int media_streamer_node_create( - int type, - media_format_h in_fmt, - media_format_h out_fmt, - ffi.Pointer node, - ) { - return _media_streamer_node_create( - type, - in_fmt, - out_fmt, - node, - ); - } - - late final _media_streamer_node_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, media_format_h, media_format_h, - ffi.Pointer)>>( - 'media_streamer_node_create'); - late final _media_streamer_node_create = - _media_streamer_node_createPtr.asFunction< - int Function(int, media_format_h, media_format_h, - ffi.Pointer)>(); - - /// @brief Adds node to media streamer. - /// @since_tizen 3.0 - /// @param [in] streamer Media streamer handle - /// @param [in] node Media streamer node handle to be added - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create media streamer handle by calling media_streamer_create() function - /// @pre Create node handle by calling media_streamer_node_create() function - /// @see media_streamer_create() - /// @see media_streamer_node_create() - /// @see media_streamer_node_create_src() - /// @see media_streamer_node_create_sink() - int media_streamer_node_add( - media_streamer_h streamer, - media_streamer_node_h node, - ) { - return _media_streamer_node_add( - streamer, - node, - ); - } - - late final _media_streamer_node_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_h, - media_streamer_node_h)>>('media_streamer_node_add'); - late final _media_streamer_node_add = _media_streamer_node_addPtr - .asFunction(); - - /// @brief Destroys media streamer node. - /// @since_tizen 3.0 - /// @param [in] node Media streamer node handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create node handle by calling media_streamer_node_create() function - /// @pre If the node was added to media streamer, it have to be removed by calling media_streamer_node_remove() function - /// @see media_streamer_node_create() - /// @see media_streamer_node_create_src() - /// @see media_streamer_node_create_sink() - /// @see media_streamer_node_remove() - int media_streamer_node_destroy( - media_streamer_node_h node, - ) { - return _media_streamer_node_destroy( - node, - ); - } - - late final _media_streamer_node_destroyPtr = - _lookup>( - 'media_streamer_node_destroy'); - late final _media_streamer_node_destroy = _media_streamer_node_destroyPtr - .asFunction(); - - /// @brief Removes media streamer node from streamer. - /// @since_tizen 3.0 - /// @remarks To remove node without error posting, the state of streamer should be MEDIA_STREAMER_STATE_IDLE. - /// If the node is linked, it will be unlinked before removing. - /// @param [in] streamer Media streamer handle - /// @param [in] node Media streamer node handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Add node to streamer by calling media_streamer_node_add() function - /// @see media_streamer_node_add() - int media_streamer_node_remove( - media_streamer_h streamer, - media_streamer_node_h node, - ) { - return _media_streamer_node_remove( - streamer, - node, - ); - } - - late final _media_streamer_node_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_h, - media_streamer_node_h)>>('media_streamer_node_remove'); - late final _media_streamer_node_remove = _media_streamer_node_removePtr - .asFunction(); - - /// @brief Links two media streamer nodes. - /// @since_tizen 3.0 - /// @remark Pads are node's input and output, where you can connect other nodes. - /// (src_node) - (sink_node) - /// src_node and sink_node is determined relatively. - /// In case of (A)-(B)-(C), - /// (B) can be sink_node with (A) or (B) can be src_node with (C). - /// However, src type node is always src node and sink type node is always sink node. - /// (A) is src node and can not be sink node at all. - /// (C) is sink node and can not be src node at all. - /// @param [in] src_node Media streamer node handle - /// @param [in] src_pad_name The name of the source pad of the source node - /// @param [in] dest_node The destination media streamer node handle - /// @param [in] sink_pad_name The name of the sink pad of the destination node - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a source node and a destination node handles - /// by calling media_streamer_node_create() function - /// and add the nodes into streamer by calling media_streamer_node_add() function. - /// @see media_streamer_node_create() - /// @see media_streamer_node_add() - int media_streamer_node_link( - media_streamer_node_h src_node, - ffi.Pointer src_pad_name, - media_streamer_node_h dest_node, - ffi.Pointer sink_pad_name, - ) { - return _media_streamer_node_link( - src_node, - src_pad_name, - dest_node, - sink_pad_name, - ); - } - - late final _media_streamer_node_linkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_streamer_node_h, - ffi.Pointer, - media_streamer_node_h, - ffi.Pointer)>>('media_streamer_node_link'); - late final _media_streamer_node_link = - _media_streamer_node_linkPtr.asFunction< - int Function(media_streamer_node_h, ffi.Pointer, - media_streamer_node_h, ffi.Pointer)>(); - - /// @brief Sets media format for pad of media streamer node. - /// @since_tizen 3.0 - /// @param [in] node Media streamer node handle - /// @param [in] pad_name Pad name - /// @param [in] fmt Media format handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a node handle by calling media_streamer_node_createxxx() function - /// @pre Get pad name by calling media_streamer_node_get_pad_name() function - /// @see #media_format_h - int media_streamer_node_set_pad_format( - media_streamer_node_h node, - ffi.Pointer pad_name, - media_format_h fmt, - ) { - return _media_streamer_node_set_pad_format( - node, - pad_name, - fmt, - ); - } - - late final _media_streamer_node_set_pad_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_node_h, ffi.Pointer, - media_format_h)>>('media_streamer_node_set_pad_format'); - late final _media_streamer_node_set_pad_format = - _media_streamer_node_set_pad_formatPtr.asFunction< - int Function( - media_streamer_node_h, ffi.Pointer, media_format_h)>(); - - /// @brief Gets media format for pad of media streamer node. - /// @since_tizen 3.0 - /// @param [in] node Media streamer node handle - /// @param [in] pad_name Pad name - /// @param [out] fmt Media format handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a node handle by calling media_streamer_node_createxxx() function - /// @pre Get pad name by calling media_streamer_node_get_pad_name() function - /// @see #media_format_h - int media_streamer_node_get_pad_format( - media_streamer_node_h node, - ffi.Pointer pad_name, - ffi.Pointer fmt, - ) { - return _media_streamer_node_get_pad_format( - node, - pad_name, - fmt, - ); - } - - late final _media_streamer_node_get_pad_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_node_h, ffi.Pointer, - ffi.Pointer)>>( - 'media_streamer_node_get_pad_format'); - late final _media_streamer_node_get_pad_format = - _media_streamer_node_get_pad_formatPtr.asFunction< - int Function(media_streamer_node_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets name of node pads. - /// @since_tizen 3.0 - /// @remark After using the src_pad_name and sink_pad_name, it have to be free. - /// src_pad_name or sink_pad_name can be null according to the node type. - /// In case of src type node, sink_pad_name will be null. - /// In case of sink type node, src_pad_name will be null. - /// @param [in] node Media streamer node handle - /// @param [out] src_pad_name Array of source pad name - /// @param [out] src_pad_num The number of source pads - /// @param [out] sink_pad_name Array of sink pad name - /// @param [out] sink_pad_num The number of sink pads - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a node handle by calling media_streamer_node_createxxx() function - /// @see media_streamer_node_create() - /// @see media_streamer_node_create_src() - /// @see media_streamer_node_create_sink() - int media_streamer_node_get_pad_name( - media_streamer_node_h node, - ffi.Pointer>> src_pad_name, - ffi.Pointer src_pad_num, - ffi.Pointer>> sink_pad_name, - ffi.Pointer sink_pad_num, - ) { - return _media_streamer_node_get_pad_name( - node, - src_pad_name, - src_pad_num, - sink_pad_name, - sink_pad_num, - ); - } - - late final _media_streamer_node_get_pad_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_streamer_node_h, - ffi.Pointer>>, - ffi.Pointer, - ffi.Pointer>>, - ffi.Pointer)>>('media_streamer_node_get_pad_name'); - late final _media_streamer_node_get_pad_name = - _media_streamer_node_get_pad_namePtr.asFunction< - int Function( - media_streamer_node_h, - ffi.Pointer>>, - ffi.Pointer, - ffi.Pointer>>, - ffi.Pointer)>(); - - /// @brief Sets parameters of node. - /// @details Many parameters can be set at one time all together by using bundle. - /// @since_tizen 3.0 - /// @remarks The mediastorage privilege(http://tizen.org/privilege/mediastorage) should be added if any video/audio files are written in the internal storage devices. - /// The externalstorage privilege(http://tizen.org/privilege/externalstorage) should be added if any video/audio files are written in the external storage devices. - /// @param [in] node Media streamer node handle - /// @param [in] param_list Key value array of media streamer node parameters - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_STREAMER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a node handle by calling media_streamer_node_createXXX() function. - /// @pre Get param list to set by calling media_streamer_node_get_params() function. - /// @see media_streamer_node_create() - /// @see media_streamer_node_create_src() - /// @see media_streamer_node_create_sink() - /// @see media_streamer_node_get_params() - int media_streamer_node_set_params( - media_streamer_node_h node, - ffi.Pointer param_list, - ) { - return _media_streamer_node_set_params( - node, - param_list, - ); - } - - late final _media_streamer_node_set_paramsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_node_h, - ffi.Pointer)>>('media_streamer_node_set_params'); - late final _media_streamer_node_set_params = - _media_streamer_node_set_paramsPtr.asFunction< - int Function(media_streamer_node_h, ffi.Pointer)>(); - - /// @brief Gets node parameter list. - /// @since_tizen 3.0 - /// @remark After using param_list, it have to be free by calling bundle_free() in bundle.h - /// Refer to the "Parameter information of node" in this file to get info. - /// @param [in] node Media streamer node handle - /// @param [out] param_list Key value array of media streamer node parameters - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a node handle by calling media_streamer_node_createXXX() function - /// @post Set params which are needed to set by calling media_streamer_node_set_params() or media_streamer_node_set_param() function. - /// @see media_streamer_node_create() - /// @see media_streamer_src_create() - /// @see media_streamer_sink_create() - /// @see media_streamer_node_set_params() - /// @see media_streamer_node_set_param() - int media_streamer_node_get_params( - media_streamer_node_h node, - ffi.Pointer> param_list, - ) { - return _media_streamer_node_get_params( - node, - param_list, - ); - } - - late final _media_streamer_node_get_paramsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_streamer_node_h, ffi.Pointer>)>>( - 'media_streamer_node_get_params'); - late final _media_streamer_node_get_params = - _media_streamer_node_get_paramsPtr.asFunction< - int Function( - media_streamer_node_h, ffi.Pointer>)>(); - - /// @brief Sets single parameter of node. - /// @details Sets parameter one by one without creating param bundle. - /// @since_tizen 3.0 - /// @remarks The mediastorage privilege(http://tizen.org/privilege/mediastorage) should be added if any video/audio files are written in the internal storage devices. - /// The externalstorage privilege(http://tizen.org/privilege/externalstorage) should be added if any video/audio files are written in the external storage devices. - /// @param [in] node Media streamer node handle - /// @param [in] param_name Param name of node - /// @param [in] param_value Param value of node - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_STREAMER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a node handle by calling media_streamer_node_createXXX() function. - /// @pre Get param list to set by calling media_streamer_node_get_params() function. - /// @see media_streamer_node_create() - /// @see media_streamer_src_create() - /// @see media_streamer_sink_create() - /// @see media_streamer_node_get_params() - /// @see media_streamer_node_get_param() - int media_streamer_node_set_param( - media_streamer_node_h node, - ffi.Pointer param_name, - ffi.Pointer param_value, - ) { - return _media_streamer_node_set_param( - node, - param_name, - param_value, - ); - } - - late final _media_streamer_node_set_paramPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_node_h, ffi.Pointer, - ffi.Pointer)>>('media_streamer_node_set_param'); - late final _media_streamer_node_set_param = - _media_streamer_node_set_paramPtr.asFunction< - int Function(media_streamer_node_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets value of parameter. - /// @details Gets parameter one by one without creating param bundle. - /// @since_tizen 3.0 - /// @param [in] node Media streamer node handle - /// @param [in] param_name Param name of node - /// @param [out] param_value Param value of node - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a node handle by calling media_streamer_node_createXXX() function. - /// @pre Get param list to know the param name by calling media_streamer_node_get_params() function. - /// @see media_streamer_node_create() - /// @see media_streamer_src_create() - /// @see media_streamer_sink_create() - /// @see media_streamer_node_get_params() - /// @see media_streamer_node_set_param() - int media_streamer_node_get_param( - media_streamer_node_h node, - ffi.Pointer param_name, - ffi.Pointer> param_value, - ) { - return _media_streamer_node_get_param( - node, - param_name, - param_value, - ); - } - - late final _media_streamer_node_get_paramPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_node_h, ffi.Pointer, - ffi.Pointer>)>>( - 'media_streamer_node_get_param'); - late final _media_streamer_node_get_param = - _media_streamer_node_get_paramPtr.asFunction< - int Function(media_streamer_node_h, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Creates a source handle. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @remarks You must release @a source by using @ref mv_destroy_source(). - /// @param [out] source A new handle to the source - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_destroy_source() - int mv_create_source( - ffi.Pointer source, - ) { - return _mv_create_source( - source, - ); - } - - late final _mv_create_sourcePtr = - _lookup)>>( - 'mv_create_source'); - late final _mv_create_source = - _mv_create_sourcePtr.asFunction)>(); - - /// @brief Destroys the source handle and releases all its resources. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in] source The handle to the source to be destroyed - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_create_source() - int mv_destroy_source( - mv_source_h source, - ) { - return _mv_destroy_source( - source, - ); - } - - late final _mv_destroy_sourcePtr = - _lookup>( - 'mv_destroy_source'); - late final _mv_destroy_source = - _mv_destroy_sourcePtr.asFunction(); - - /// @brief Fills the media source based on the media packet. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in,out] source The handle to the source - /// @param [in] media_packet The handle to the media packet from which - /// will be filled the source - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Not supported format - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create a source handle by calling @ref mv_create_source() - /// - /// @see mv_create_source() - /// @see mv_destroy_source() - int mv_source_fill_by_media_packet( - mv_source_h source, - media_packet_h media_packet, - ) { - return _mv_source_fill_by_media_packet( - source, - media_packet, - ); - } - - late final _mv_source_fill_by_media_packetPtr = _lookup< - ffi.NativeFunction>( - 'mv_source_fill_by_media_packet'); - late final _mv_source_fill_by_media_packet = - _mv_source_fill_by_media_packetPtr - .asFunction(); - - /// @brief Fills the media source based on the buffer and metadata. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in,out] source The handle to the source - /// @param [in] data_buffer The buffer of image data - /// @param [in] buffer_size The buffer size - /// @param [in] image_width The width of image data - /// @param [in] image_height The height of image data - /// @param [in] image_colorspace The image colorspace - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create a source handle by calling @ref mv_create_source() - /// - /// @see mv_source_clear() - int mv_source_fill_by_buffer( - mv_source_h source, - ffi.Pointer data_buffer, - int buffer_size, - int image_width, - int image_height, - int image_colorspace, - ) { - return _mv_source_fill_by_buffer( - source, - data_buffer, - buffer_size, - image_width, - image_height, - image_colorspace, - ); - } - - late final _mv_source_fill_by_bufferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_source_h, - ffi.Pointer, - ffi.UnsignedInt, - ffi.UnsignedInt, - ffi.UnsignedInt, - ffi.Int32)>>('mv_source_fill_by_buffer'); - late final _mv_source_fill_by_buffer = - _mv_source_fill_by_bufferPtr.asFunction< - int Function(mv_source_h, ffi.Pointer, int, int, - int, int)>(); - - /// @brief Clears the buffer of the media source. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in,out] source The handle to the source - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_source_fill_by_buffer() - int mv_source_clear( - mv_source_h source, - ) { - return _mv_source_clear( - source, - ); - } - - late final _mv_source_clearPtr = - _lookup>( - 'mv_source_clear'); - late final _mv_source_clear = - _mv_source_clearPtr.asFunction(); - - /// @brief Gets buffer of the media source. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @remarks Note that the retrieved buffer will be destroyed when - /// @ref mv_destroy_source() or @ref mv_source_clear() function - /// is called for the @a source. - /// - /// @param [in] source The handle to the source - /// @param [out] data_buffer The buffer of the source - /// @param [out] buffer_size The size of buffer - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_source_get_width() - /// @see mv_source_get_height() - /// @see mv_source_get_colorspace() - int mv_source_get_buffer( - mv_source_h source, - ffi.Pointer> data_buffer, - ffi.Pointer buffer_size, - ) { - return _mv_source_get_buffer( - source, - data_buffer, - buffer_size, - ); - } - - late final _mv_source_get_bufferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_source_h, - ffi.Pointer>, - ffi.Pointer)>>('mv_source_get_buffer'); - late final _mv_source_get_buffer = _mv_source_get_bufferPtr.asFunction< - int Function(mv_source_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Gets height of the media source. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in] source The handle to the source - /// @param [out] image_height The height of an image in the source - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_source_get_width() - /// @see mv_source_get_colorspace() - /// @see mv_source_get_buffer() - int mv_source_get_height( - mv_source_h source, - ffi.Pointer image_height, - ) { - return _mv_source_get_height( - source, - image_height, - ); - } - - late final _mv_source_get_heightPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_source_h, - ffi.Pointer)>>('mv_source_get_height'); - late final _mv_source_get_height = _mv_source_get_heightPtr - .asFunction)>(); - - /// @brief Gets width of the media source. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in] source The handle to the source - /// @param [out] image_width The width of an image in the source - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_source_get_height() - /// @see mv_source_get_colorspace() - /// @see mv_source_get_buffer() - int mv_source_get_width( - mv_source_h source, - ffi.Pointer image_width, - ) { - return _mv_source_get_width( - source, - image_width, - ); - } - - late final _mv_source_get_widthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_source_h, - ffi.Pointer)>>('mv_source_get_width'); - late final _mv_source_get_width = _mv_source_get_widthPtr - .asFunction)>(); - - /// @brief Gets colorspace of the media source. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in] source The handle to the source - /// @param [out] image_colorspace The colorspace of an image in the source - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_source_get_width() - /// @see mv_source_get_height() - /// @see mv_source_get_buffer() - int mv_source_get_colorspace( - mv_source_h source, - ffi.Pointer image_colorspace, - ) { - return _mv_source_get_colorspace( - source, - image_colorspace, - ); - } - - late final _mv_source_get_colorspacePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_source_h, - ffi.Pointer)>>('mv_source_get_colorspace'); - late final _mv_source_get_colorspace = _mv_source_get_colorspacePtr - .asFunction)>(); - - /// @brief Creates the handle to the configuration of engine. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @remarks Available engine configuration attributes can be get by using - /// @ref mv_engine_config_foreach_supported_attribute(). - /// The attributes can be changed by @ref mv_engine_config_h - /// related setters. Default values are used if the attributes - /// are not changed. - /// @param [out] engine_cfg The handle to the engine to be created - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_engine_config_h - /// @see mv_destroy_engine_config() - /// @see mv_engine_config_set_double_attribute() - /// @see mv_engine_config_set_int_attribute() - /// @see mv_engine_config_set_bool_attribute() - /// @see mv_engine_config_set_string_attribute() - /// @see mv_engine_config_get_double_attribute() - /// @see mv_engine_config_get_int_attribute() - /// @see mv_engine_config_get_bool_attribute() - /// @see mv_engine_config_get_string_attribute() - int mv_create_engine_config( - ffi.Pointer engine_cfg, - ) { - return _mv_create_engine_config( - engine_cfg, - ); - } - - late final _mv_create_engine_configPtr = _lookup< - ffi - .NativeFunction)>>( - 'mv_create_engine_config'); - late final _mv_create_engine_config = _mv_create_engine_configPtr - .asFunction)>(); - - /// @brief Destroys the engine configuration handle and releases all its - /// resources. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in] engine_cfg The handle to the engine configuration - /// to be destroyed - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_engine_config_h - /// @see mv_create_engine_config() - int mv_destroy_engine_config( - mv_engine_config_h engine_cfg, - ) { - return _mv_destroy_engine_config( - engine_cfg, - ); - } - - late final _mv_destroy_engine_configPtr = - _lookup>( - 'mv_destroy_engine_config'); - late final _mv_destroy_engine_config = _mv_destroy_engine_configPtr - .asFunction(); - - /// @brief Sets the double attribute to the configuration. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in] engine_cfg Engine configuration for which @a value has - /// to be set - /// @param [in] name String key of the attribute will be used for - /// storing the @a value into configuration - /// dictionary - /// @param [in] value The double value of the attribute - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE Attribute key isn't available - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_engine_config_get_double_attribute() - /// @see mv_engine_config_set_int_attribute() - /// @see mv_engine_config_set_bool_attribute() - /// @see mv_engine_config_set_string_attribute() - int mv_engine_config_set_double_attribute( - mv_engine_config_h engine_cfg, - ffi.Pointer name, - double value, - ) { - return _mv_engine_config_set_double_attribute( - engine_cfg, - name, - value, - ); - } - - late final _mv_engine_config_set_double_attributePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_engine_config_h, ffi.Pointer, - ffi.Double)>>('mv_engine_config_set_double_attribute'); - late final _mv_engine_config_set_double_attribute = - _mv_engine_config_set_double_attributePtr.asFunction< - int Function(mv_engine_config_h, ffi.Pointer, double)>(); - - /// @brief Sets the integer attribute to the configuration. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in] engine_cfg Engine configuration for which @a value has - /// to be set - /// @param [in] name String key of the attribute will be used for - /// storing the @a value into configuration - /// dictionary - /// @param [in] value The integer value of the attribute - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE Attribute key isn't available - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_engine_config_get_int_attribute() - /// @see mv_engine_config_set_double_attribute() - /// @see mv_engine_config_set_bool_attribute() - /// @see mv_engine_config_set_string_attribute() - /// @see mv_barcode_detect_attr_target_e - /// @see mv_barcode_generate_attr_text_e - int mv_engine_config_set_int_attribute( - mv_engine_config_h engine_cfg, - ffi.Pointer name, - int value, - ) { - return _mv_engine_config_set_int_attribute( - engine_cfg, - name, - value, - ); - } - - late final _mv_engine_config_set_int_attributePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_engine_config_h, ffi.Pointer, - ffi.Int)>>('mv_engine_config_set_int_attribute'); - late final _mv_engine_config_set_int_attribute = - _mv_engine_config_set_int_attributePtr.asFunction< - int Function(mv_engine_config_h, ffi.Pointer, int)>(); - - /// @brief Sets the boolean attribute to the configuration. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in] engine_cfg Engine configuration for which @a value has - /// to be set - /// @param [in] name String key of the attribute will be used for - /// storing the @a value into configuration - /// dictionary - /// @param [in] value The boolean value of the attribute - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE Attribute key isn't available - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_engine_config_get_bool_attribute() - /// @see mv_engine_config_set_double_attribute() - /// @see mv_engine_config_set_int_attribute() - /// @see mv_engine_config_set_string_attribute() - int mv_engine_config_set_bool_attribute( - mv_engine_config_h engine_cfg, - ffi.Pointer name, - bool value, - ) { - return _mv_engine_config_set_bool_attribute( - engine_cfg, - name, - value, - ); - } - - late final _mv_engine_config_set_bool_attributePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_engine_config_h, ffi.Pointer, - ffi.Bool)>>('mv_engine_config_set_bool_attribute'); - late final _mv_engine_config_set_bool_attribute = - _mv_engine_config_set_bool_attributePtr.asFunction< - int Function(mv_engine_config_h, ffi.Pointer, bool)>(); - - /// @brief Sets the string attribute to the configuration. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in] engine_cfg Engine configuration for which @a value has - /// to be set - /// @param [in] name String key of the attribute will be used for - /// storing the @a value into configuration - /// dictionary - /// @param [in] value The string value of the attribute - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE Attribute key isn't available - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_engine_config_get_string_attribute() - /// @see mv_engine_config_set_double_attribute() - /// @see mv_engine_config_set_int_attribute() - /// @see mv_engine_config_set_bool_attribute() - int mv_engine_config_set_string_attribute( - mv_engine_config_h engine_cfg, - ffi.Pointer name, - ffi.Pointer value, - ) { - return _mv_engine_config_set_string_attribute( - engine_cfg, - name, - value, - ); - } - - late final _mv_engine_config_set_string_attributePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_engine_config_h, ffi.Pointer, - ffi.Pointer)>>('mv_engine_config_set_string_attribute'); - late final _mv_engine_config_set_string_attribute = - _mv_engine_config_set_string_attributePtr.asFunction< - int Function(mv_engine_config_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the double attribute from the configuration dictionary. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in] engine_cfg Engine configuration from which @a value - /// has to be gotten - /// @param [in] name String key of the attribute will be used for - /// getting the @a value from the - /// configuration dictionary - /// @param [out] value The attribute to be filled with double value - /// from dictionary - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE Attribute key isn't available - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_engine_config_set_double_attribute() - /// @see mv_engine_config_get_int_attribute() - /// @see mv_engine_config_get_bool_attribute() - /// @see mv_engine_config_get_string_attribute() - int mv_engine_config_get_double_attribute( - mv_engine_config_h engine_cfg, - ffi.Pointer name, - ffi.Pointer value, - ) { - return _mv_engine_config_get_double_attribute( - engine_cfg, - name, - value, - ); - } - - late final _mv_engine_config_get_double_attributePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_engine_config_h, ffi.Pointer, - ffi.Pointer)>>( - 'mv_engine_config_get_double_attribute'); - late final _mv_engine_config_get_double_attribute = - _mv_engine_config_get_double_attributePtr.asFunction< - int Function(mv_engine_config_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the integer attribute from the configuration dictionary. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in] engine_cfg Engine configuration from which @a value - /// has to be gotten - /// @param [in] name String key of the attribute will be used for - /// getting the @a value from the - /// configuration dictionary - /// @param [out] value The attribute to be filled with integer value - /// from dictionary - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE Attribute key isn't available - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_engine_config_set_int_attribute() - /// @see mv_engine_config_get_double_attribute() - /// @see mv_engine_config_get_bool_attribute() - /// @see mv_engine_config_get_string_attribute() - /// @see mv_barcode_detect_attr_target_e - /// @see mv_barcode_generate_attr_text_e - int mv_engine_config_get_int_attribute( - mv_engine_config_h engine_cfg, - ffi.Pointer name, - ffi.Pointer value, - ) { - return _mv_engine_config_get_int_attribute( - engine_cfg, - name, - value, - ); - } - - late final _mv_engine_config_get_int_attributePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_engine_config_h, ffi.Pointer, - ffi.Pointer)>>('mv_engine_config_get_int_attribute'); - late final _mv_engine_config_get_int_attribute = - _mv_engine_config_get_int_attributePtr.asFunction< - int Function(mv_engine_config_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the boolean attribute from the configuration dictionary. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in] engine_cfg Engine configuration from which @a value - /// has to be gotten - /// @param [in] name String key of the attribute will be used for - /// getting the @a value from the - /// configuration dictionary - /// @param [out] value The attribute to be filled with boolean value - /// from dictionary - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE Attribute key isn't available - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_engine_config_set_bool_attribute() - /// @see mv_engine_config_get_double_attribute() - /// @see mv_engine_config_get_int_attribute() - /// @see mv_engine_config_get_string_attribute() - int mv_engine_config_get_bool_attribute( - mv_engine_config_h engine_cfg, - ffi.Pointer name, - ffi.Pointer value, - ) { - return _mv_engine_config_get_bool_attribute( - engine_cfg, - name, - value, - ); - } - - late final _mv_engine_config_get_bool_attributePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_engine_config_h, ffi.Pointer, - ffi.Pointer)>>('mv_engine_config_get_bool_attribute'); - late final _mv_engine_config_get_bool_attribute = - _mv_engine_config_get_bool_attributePtr.asFunction< - int Function(mv_engine_config_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the string attribute from the configuration dictionary. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @remarks Function allocates memory required for output @a value, so - /// it has to be removed by the user himself. - /// @param [in] engine_cfg Engine configuration from which @a value - /// has to be gotten - /// @param [in] name String key of the attribute will be used for - /// getting the @a value from the - /// configuration dictionary - /// @param [out] value The attribute to be filled with string value - /// from dictionary - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE Attribute key isn't available - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_engine_config_set_string_attribute() - /// @see mv_engine_config_get_double_attribute() - /// @see mv_engine_config_get_int_attribute() - /// @see mv_engine_config_get_bool_attribute() - int mv_engine_config_get_string_attribute( - mv_engine_config_h engine_cfg, - ffi.Pointer name, - ffi.Pointer> value, - ) { - return _mv_engine_config_get_string_attribute( - engine_cfg, - name, - value, - ); - } - - late final _mv_engine_config_get_string_attributePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_engine_config_h, ffi.Pointer, - ffi.Pointer>)>>( - 'mv_engine_config_get_string_attribute'); - late final _mv_engine_config_get_string_attribute = - _mv_engine_config_get_string_attributePtr.asFunction< - int Function(mv_engine_config_h, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Traverses the list of supported attribute names and types. - /// @details Using this function names of supported attributes can be obtained. - /// Names of the attributes can be used with @ref mv_engine_config_h - /// related getters and setters to get/set appropriate attribute values. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @remarks If @a callback is called zero times after - /// @ref mv_engine_config_foreach_supported_attribute() call, then - /// engine configuration is not supported and setting of attributes will - /// cause no effect. In this case for all Media Vision functions which - /// require @ref mv_engine_config_h handle as in parameter this - /// parameter can be set NULL. - /// @remarks If @a callback is called at least once, then attribute names and - /// types obtained in the @ref mv_supported_attribute_cb callback can be - /// changed after mv_engine_config_h handle creation (with - /// @ref mv_create_engine_config() function) by corresponding setters. - /// Although, if attributes aren't changed by setters, then default - /// values will be used.\n - /// Changing of attribute values will affect internal functionality - /// provided by concrete library underlying Media Vision API. - /// @param [in] callback The iteration callback function - /// @param [in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_NO_DATA Can't determine list of supported attributes - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_engine_config_set_double_attribute() - /// @see mv_engine_config_set_int_attribute() - /// @see mv_engine_config_set_bool_attribute() - /// @see mv_engine_config_set_string_attribute() - /// @see mv_engine_config_get_double_attribute() - /// @see mv_engine_config_get_int_attribute() - /// @see mv_engine_config_get_bool_attribute() - /// @see mv_engine_config_get_string_attribute() - int mv_engine_config_foreach_supported_attribute( - mv_supported_attribute_cb callback, - ffi.Pointer user_data, - ) { - return _mv_engine_config_foreach_supported_attribute( - callback, - user_data, - ); - } - - late final _mv_engine_config_foreach_supported_attributePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_supported_attribute_cb, ffi.Pointer)>>( - 'mv_engine_config_foreach_supported_attribute'); - late final _mv_engine_config_foreach_supported_attribute = - _mv_engine_config_foreach_supported_attributePtr.asFunction< - int Function(mv_supported_attribute_cb, ffi.Pointer)>(); - - /// @brief Detects barcode(s) on source and reads message from it. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in] source The media source handle - /// @param [in] engine_cfg The handle to the configuration of the engine - /// @param [in] roi Region of interest - rectangular area on the - /// @a source which will be used for barcode detection - /// Note that @a roi should be inside area on the - /// @a source. - /// @param [in] detect_cb The callback for result handling - /// @param [in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Not supported format - /// @retval #MEDIA_VISION_ERROR_INTERNAL Internal error - /// - /// @pre Create a source handle by calling @ref mv_create_source() - /// @pre Create an engine configuration handle by calling - /// @ref mv_create_engine_config(), otherwise use NULL - /// - /// @see mv_barcode_detected_cb() - int mv_barcode_detect( - mv_source_h source, - mv_engine_config_h engine_cfg, - mv_rectangle_s roi, - mv_barcode_detected_cb detect_cb, - ffi.Pointer user_data, - ) { - return _mv_barcode_detect( - source, - engine_cfg, - roi, - detect_cb, - user_data, - ); - } - - late final _mv_barcode_detectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_source_h, - mv_engine_config_h, - mv_rectangle_s, - mv_barcode_detected_cb, - ffi.Pointer)>>('mv_barcode_detect'); - late final _mv_barcode_detect = _mv_barcode_detectPtr.asFunction< - int Function(mv_source_h, mv_engine_config_h, mv_rectangle_s, - mv_barcode_detected_cb, ffi.Pointer)>(); - - /// @brief Generates @ref mv_source_h with barcode image. - /// @details Pay attention that for EAN-8 and EAN-13 barcode types the barcode - /// type may be selected automatically and this selection depends on the input - /// message length. Also for QR codes the version may be selected as minimum - /// required to generate QR code with the input message length. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @remarks If the text attribute of engine configuration is set to - /// MV_BARCODE_GENERATE_ATTR_TEXT_VISIBLE, - /// MEDIA_VISION_ERROR_INVALID_OPERATION will be return - /// when @a type is MV_BARCODE_QR - /// - /// @param [in] engine_cfg The handle to the configuration of the engine - /// @param [in] message The message to be encoded in the barcode - /// @param [in] type Type of the barcode to be generated - /// @param [in] qr_enc_mode Encoding mode for the message (only for QR codes; - /// for 1D barcodes set this parameter to - /// @a MV_BARCODE_QR_MODE_UNAVAILABLE) - /// @param [in] qr_ecc Error correction level (only for QR codes; for - /// 1D barcodes set this parameter to - /// @a MV_BARCODE_QR_ECC_UNAVAILABLE) - /// @param [in] qr_version QR code version (for 1D barcodes set this - /// parameter to 0) - /// @param [in, out] image The media source handle which will be used to - /// fill by the buffer with generated image - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_MSG_TOO_LONG Too long or short message - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// @retval #MEDIA_VISION_ERROR_INVALID_DATA Invalid data - /// @retval #MEDIA_VISION_ERROR_INTERNAL Internal error - /// @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre Create an engine configuration handle by calling - /// @ref mv_create_engine_config(), otherwise use NULL - /// - /// @see mv_barcode_generate_image() - int mv_barcode_generate_source( - mv_engine_config_h engine_cfg, - ffi.Pointer message, - int type, - int qr_enc_mode, - int qr_ecc, - int qr_version, - mv_source_h image, - ) { - return _mv_barcode_generate_source( - engine_cfg, - message, - type, - qr_enc_mode, - qr_ecc, - qr_version, - image, - ); - } - - late final _mv_barcode_generate_sourcePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_engine_config_h, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Int32, - ffi.Int, - mv_source_h)>>('mv_barcode_generate_source'); - late final _mv_barcode_generate_source = - _mv_barcode_generate_sourcePtr.asFunction< - int Function(mv_engine_config_h, ffi.Pointer, int, int, int, - int, mv_source_h)>(); - - /// @brief Generates image file with barcode. - /// @details Pay attention that for EAN-8 and EAN-13 barcode types the barcode - /// type may be selected automatically and this selection depends on the input - /// message length. Also for QR codes the version may be selected as minimum - /// required to generate QR code with the input message length. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @remarks If the text attribute of engine configuration is set to - /// MV_BARCODE_GENERATE_ATTR_TEXT_VISIBLE, - /// MEDIA_VISION_ERROR_INVALID_OPERATION will be return - /// when @a type is MV_BARCODE_QR - /// - /// @remarks The mediastorage privilege http://tizen.org/privilege/mediastorage is needed \n - /// if @a image_path is relevant to media storage.\n - /// The externalstorage privilege http://tizen.org/privilege/externalstorage is needed \n - /// if @a image_path is relevant to external storage. - /// @param [in] engine_cfg The handle to the configuration of the engine - /// @param [in] message The message to be encoded in the barcode - /// @param [in] image_width The width of the generated image - /// @param [in] image_height The height of the generated image - /// @param [in] type Type of the barcode to be generated - /// @param [in] qr_enc_mode Encoding mode for the message (only for QR codes; - /// for 1D barcodes set this parameter to - /// @a MV_BARCODE_QR_MODE_UNAVAILABLE) - /// @param [in] qr_ecc Error correction level (only for QR codes; for - /// 1D barcodes set this parameter to - /// @a MV_BARCODE_QR_ECC_UNAVAILABLE) - /// @param [in] qr_version QR code version (for 1D barcodes set this - /// parameter to 0) - /// @param [in] image_path The path to the file that has to be generated - /// @param [in] image_format The format of the output image - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_MSG_TOO_LONG Too long or short message - /// @retval #MEDIA_VISION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// @retval #MEDIA_VISION_ERROR_INVALID_DATA Invalid data - /// @retval #MEDIA_VISION_ERROR_INVALID_PATH Invalid path - /// @retval #MEDIA_VISION_ERROR_INTERNAL Internal error - /// @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre Create an engine configuration handle by calling - /// @ref mv_create_engine_config(), otherwise use NULL - /// - /// @see mv_barcode_generate_source() - int mv_barcode_generate_image( - mv_engine_config_h engine_cfg, - ffi.Pointer message, - int image_width, - int image_height, - int type, - int qr_enc_mode, - int qr_ecc, - int qr_version, - ffi.Pointer image_path, - int image_format, - ) { - return _mv_barcode_generate_image( - engine_cfg, - message, - image_width, - image_height, - type, - qr_enc_mode, - qr_ecc, - qr_version, - image_path, - image_format, - ); - } - - late final _mv_barcode_generate_imagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_engine_config_h, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Int32, - ffi.Int32, - ffi.Int32, - ffi.Int, - ffi.Pointer, - ffi.Int32)>>('mv_barcode_generate_image'); - late final _mv_barcode_generate_image = - _mv_barcode_generate_imagePtr.asFunction< - int Function(mv_engine_config_h, ffi.Pointer, int, int, int, - int, int, int, ffi.Pointer, int)>(); - - /// @brief Performs face detection on the @a source for the @a engine_conf. - /// @details Use this function to launch face detection algorithm configured by - /// @a engine_conf configuration. Each time when mv_face_detect is - /// called, @a detected_cb will receive a set of the detected - /// faces at the media source. - /// - /// @since_tizen 3.0 - /// @param [in] source The handle to the source of the media where faces - /// will be detected - /// @param [in] engine_cfg The handle to the configuration of engine will be - /// used for detecting. If NULL, then default settings - /// will be used. - /// @param [in] detected_cb The callback which will be called for all face - /// locations detected on media source. This callback - /// will receive detecting results - /// @param [in] user_data The user data passed from the code where - /// @ref mv_face_detect() is invoked. This data will - /// be accessible from @a detected_cb callback. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Source colorspace - /// isn't supported - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create a source handle by calling @ref mv_create_source() - /// @post @a detected_cb will be called to process detection results - /// - /// @see mv_face_detected_cb - int mv_face_detect( - mv_source_h source, - mv_engine_config_h engine_cfg, - mv_face_detected_cb detected_cb, - ffi.Pointer user_data, - ) { - return _mv_face_detect( - source, - engine_cfg, - detected_cb, - user_data, - ); - } - - late final _mv_face_detectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_source_h, mv_engine_config_h, mv_face_detected_cb, - ffi.Pointer)>>('mv_face_detect'); - late final _mv_face_detect = _mv_face_detectPtr.asFunction< - int Function(mv_source_h, mv_engine_config_h, mv_face_detected_cb, - ffi.Pointer)>(); - - /// @brief Performs face recognition on the @a source image. - /// @details Use this function to launch face recognition algorithm configured by - /// @a engine_conf configuration using @a recognition_model recognition - /// model. Each time when @ref mv_face_recognize() is called, - /// @a recognized_cb will receive recognition results:\n - /// - Location in the @a source of the face has been recognized; - /// - Label of the face has been recognized; - /// - Confidence of the @a recognition_model that face has been - /// recognized correctly (value from 0.0 to 1.0). - /// - /// @since_tizen 3.0 - /// @remarks Using of untrained or weakly trained recognition models will cause - /// not accurate results even if resulting confidence will be high. - /// Use @ref mv_face_recognition_model_learn() function before - /// @ref mv_face_recognize() call. Best results can be achieved when big - /// set of face image examples were added by - /// @ref mv_face_recognition_model_add() before - /// @ref mv_face_recognition_model_learn() call. - /// @param [in] source The handle to the source of the media to - /// recognize face(s) for - /// @param [in] recognition_model The handle to the model will be used for - /// recognition - /// @param [in] engine_cfg The handle to the configuration of engine - /// will be used for recognition. If NULL, then - /// default settings will be used - /// @param [in] face_location Rectangular box bounding face image on the - /// @a source. If NULL, then full source will be - /// analyzed - /// @param [in] recognized_cb The callback which will be called for the - /// face recognition results on the @a source. - /// @param [in] user_data The user data passed from the code where - /// @ref mv_face_recognize() is invoked. This - /// data will be accessible from @a recognized_cb - /// callback - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Source colorspace - /// isn't supported - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create a source handle by calling @ref mv_create_source() - /// @pre Create a face recognition model handle by calling - /// @ref mv_face_recognition_model_create() - /// @post @a recognized_cb will be called to process recognition results - /// - /// @see mv_face_recognized_cb - int mv_face_recognize( - mv_source_h source, - mv_face_recognition_model_h recognition_model, - mv_engine_config_h engine_cfg, - ffi.Pointer face_location, - mv_face_recognized_cb recognized_cb, - ffi.Pointer user_data, - ) { - return _mv_face_recognize( - source, - recognition_model, - engine_cfg, - face_location, - recognized_cb, - user_data, - ); - } - - late final _mv_face_recognizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_source_h, - mv_face_recognition_model_h, - mv_engine_config_h, - ffi.Pointer, - mv_face_recognized_cb, - ffi.Pointer)>>('mv_face_recognize'); - late final _mv_face_recognize = _mv_face_recognizePtr.asFunction< - int Function( - mv_source_h, - mv_face_recognition_model_h, - mv_engine_config_h, - ffi.Pointer, - mv_face_recognized_cb, - ffi.Pointer)>(); - - /// @brief Performs face tracking on the @a source for the @a tracking_model. - /// @details Use this function to launch face tracking algorithm configured by - /// @a engine_conf configuration using @a tracking_model tracking - /// model. Each time when this function is called, @a tracked_cb - /// will receive updated @a tracking_model, new location determined for - /// the tracked face and model confidence that location is determined - /// correctly. - /// - /// @since_tizen 3.0 - /// @remarks To allow correct tracking @a tracking_model has to be already used - /// in previous tracking process(es) or prepared with - /// @ref mv_face_tracking_model_prepare(). Preparation requires - /// specifying the face location for the @a source on which tracking was - /// started. I.e. @ref mv_face_tracking_model_prepare() function has to - /// be called at least once before this method call. - /// @param [in] source The handle to the source of the media to - /// recognize face for - /// @param [in] tracking_model The handle to the model will be used for - /// tracking - /// @param [in] engine_cfg The handle to the configuration of engine will - /// be used for tracking. If NULL, the default - /// configuration will be used. - /// @param [in] tracked_cb The callback which will be called for tracking - /// event on the @a source where face would be - /// tracked. This callback will receive tracking - /// results - /// @param [in] do_learn The model learning flag. If it is set @c true - /// then model will try to learn (if it supports - /// learning feature), otherwise model will be not - /// learned during the invoking tracking iteration. - /// Learning process improves tracking correctness, - /// but can decrease tracking performance - /// @param [in] user_data The user data passed from the code where - /// @ref mv_face_track() is invoked. This data will - /// be accessible from @a tracked_cb callback - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Source colorspace - /// isn't supported - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create a source handle by calling @ref mv_create_source() - /// @pre Create a face tracking model handle by calling - /// @ref mv_face_tracking_model_create() - /// @post @a tracked_cb will be called to process tracking results - /// - /// @see mv_face_tracked_cb - int mv_face_track( - mv_source_h source, - mv_face_tracking_model_h tracking_model, - mv_engine_config_h engine_cfg, - mv_face_tracked_cb tracked_cb, - bool do_learn, - ffi.Pointer user_data, - ) { - return _mv_face_track( - source, - tracking_model, - engine_cfg, - tracked_cb, - do_learn, - user_data, - ); - } - - late final _mv_face_trackPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_source_h, - mv_face_tracking_model_h, - mv_engine_config_h, - mv_face_tracked_cb, - ffi.Bool, - ffi.Pointer)>>('mv_face_track'); - late final _mv_face_track = _mv_face_trackPtr.asFunction< - int Function(mv_source_h, mv_face_tracking_model_h, mv_engine_config_h, - mv_face_tracked_cb, bool, ffi.Pointer)>(); - - /// @brief Determines eye-blink condition for @a face_location on media @a source. - /// @details Use this function to recognize eye-blink condition for the face - /// bounded by @a face_location at @a source. - /// - /// @since_tizen 3.0 - /// @param [in] source The handle to the source of the media to - /// recognize eye-blink condition for - /// @param [in] engine_cfg The handle to the configuration of engine - /// will be used for eye-blink condition - /// recognition. If NULL, the default configuration - /// will be used. - /// @param [in] face_location The location bounding the face at the @a source - /// @param [in] eye_condition_recognized_cb The callback for processing result - /// of eye-blink condition recognition - /// @param [in] user_data The user data passed from the code where - /// mv_face_eye_condition_recognize() is invoked. - /// This data will be accessible from - /// @a eye_condition_recognized_cb callback. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Source colorspace - /// isn't supported - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create a source handle by calling mv_create_source() - /// - /// @see mv_face_eye_condition_recognized_cb - int mv_face_eye_condition_recognize( - mv_source_h source, - mv_engine_config_h engine_cfg, - mv_rectangle_s face_location, - mv_face_eye_condition_recognized_cb eye_condition_recognized_cb, - ffi.Pointer user_data, - ) { - return _mv_face_eye_condition_recognize( - source, - engine_cfg, - face_location, - eye_condition_recognized_cb, - user_data, - ); - } - - late final _mv_face_eye_condition_recognizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_source_h, - mv_engine_config_h, - mv_rectangle_s, - mv_face_eye_condition_recognized_cb, - ffi.Pointer)>>('mv_face_eye_condition_recognize'); - late final _mv_face_eye_condition_recognize = - _mv_face_eye_condition_recognizePtr.asFunction< - int Function(mv_source_h, mv_engine_config_h, mv_rectangle_s, - mv_face_eye_condition_recognized_cb, ffi.Pointer)>(); - - /// @brief Determines facial expression for @a face_location on media @a source. - /// @details Use this function to determine facial expression for the face - /// bounded by @a face_location at @a source. - /// - /// @since_tizen 3.0 - /// @param [in] source The handle to the source of the media - /// to recognize facial expression for - /// @param [in] engine_cfg The handle to the configuration of - /// engine will be used for expression recognition - /// @param [in] face_location The location bounding the face at the @a source - /// @param [in] expression_recognized_cb The callback for processing result - /// of facial expression determining - /// @param [in] user_data The user data passed from the code where - /// mv_face_facial_expression_recognize() is invoked. - /// This data will be accessible from - /// @a expression_recognized_cb callback. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Source colorspace - /// isn't supported - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create a source handle by calling mv_create_source() - /// @pre Create a face engine configuration handle by calling @ref mv_create_engine_config() - /// - /// @see mv_face_facial_expression_recognized_cb - int mv_face_facial_expression_recognize( - mv_source_h source, - mv_engine_config_h engine_cfg, - mv_rectangle_s face_location, - mv_face_facial_expression_recognized_cb expression_recognized_cb, - ffi.Pointer user_data, - ) { - return _mv_face_facial_expression_recognize( - source, - engine_cfg, - face_location, - expression_recognized_cb, - user_data, - ); - } - - late final _mv_face_facial_expression_recognizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_source_h, - mv_engine_config_h, - mv_rectangle_s, - mv_face_facial_expression_recognized_cb, - ffi.Pointer)>>('mv_face_facial_expression_recognize'); - late final _mv_face_facial_expression_recognize = - _mv_face_facial_expression_recognizePtr.asFunction< - int Function( - mv_source_h, - mv_engine_config_h, - mv_rectangle_s, - mv_face_facial_expression_recognized_cb, - ffi.Pointer)>(); - - /// @brief Creates a face recognition model handle. - /// @details Use this function to create default face recognition model. Creating - /// process is defined by concrete face engine library. After creation - /// recognition model has to be learned with - /// @ref mv_face_recognition_model_learn() function to provide - /// appropriate results of face recognition functionality. Or learned - /// earlier model can be loaded by @ref mv_face_recognition_model_load() - /// function. - /// - /// @since_tizen 3.0 - /// @remarks It can cause incompatibility issues when saved models (see - /// @ref mv_face_recognition_model_save(), - /// @ref mv_face_recognition_model_load() - /// functions documentation) are used in applications for different - /// platforms which use different computer vision libraries underlying - /// this API. - /// @remarks You must release @a recognition_model by using - /// @ref mv_face_recognition_model_destroy() function. - /// @param [out] recognition_model The handle to the recognition model to be - /// created - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @post Model can be loaded from the file after creation. Use - /// @ref mv_face_recognition_model_load() function to load it from file - /// @post Release @a recognition_model by using - /// @ref mv_face_recognition_model_destroy() function when it is not needed - /// anymore - /// - /// @see mv_face_recognition_model_destroy() - int mv_face_recognition_model_create( - ffi.Pointer recognition_model, - ) { - return _mv_face_recognition_model_create( - recognition_model, - ); - } - - late final _mv_face_recognition_model_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'mv_face_recognition_model_create'); - late final _mv_face_recognition_model_create = - _mv_face_recognition_model_createPtr - .asFunction)>(); - - /// @brief Destroys the face recognition model handle and releases all its - /// resources. - /// - /// @since_tizen 3.0 - /// @param [in] recognition_model The handle to the face recognition model to - /// be destroyed - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create recognition model by using @ref mv_face_recognition_model_create() - /// - /// @see mv_face_recognition_model_create() - int mv_face_recognition_model_destroy( - mv_face_recognition_model_h recognition_model, - ) { - return _mv_face_recognition_model_destroy( - recognition_model, - ); - } - - late final _mv_face_recognition_model_destroyPtr = _lookup< - ffi.NativeFunction>( - 'mv_face_recognition_model_destroy'); - late final _mv_face_recognition_model_destroy = - _mv_face_recognition_model_destroyPtr - .asFunction(); - - /// @brief Creates a copy of existed recognition model handle and clones all its - /// resources. - /// - /// @since_tizen 3.0 - /// @remarks Cloning perform not only handle copy, but also copies all internal - /// resources of the model. @a dst must be released using - /// @ref mv_face_recognition_model_destroy(). - /// @param [in] src The handle to the recognition model to be copied - /// @param [out] dst The handle to the copy of existed recognition model - /// specified as @a src - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create face recognition handles by calling - /// @ref mv_face_recognition_model_create() - /// - /// @see mv_face_recognition_model_create() - int mv_face_recognition_model_clone( - mv_face_recognition_model_h src, - ffi.Pointer dst, - ) { - return _mv_face_recognition_model_clone( - src, - dst, - ); - } - - late final _mv_face_recognition_model_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_face_recognition_model_h, - ffi.Pointer)>>( - 'mv_face_recognition_model_clone'); - late final _mv_face_recognition_model_clone = - _mv_face_recognition_model_clonePtr.asFunction< - int Function(mv_face_recognition_model_h, - ffi.Pointer)>(); - - /// @brief Saves recognition model to the file. - /// - /// @since_tizen 3.0 - /// @remarks This function doesn't save face image examples (image itself) added by - /// @ref mv_face_recognition_model_add() function. - /// This examples can be removed by - /// @ref mv_face_recognition_model_reset() function if - /// it is needed to clear the memory. - /// @remarks @a recognition_model is saved to the absolute path directory. - /// Use @ref app_get_data_path for the private app storage path. - /// After model is saved to the file, it can be loaded from this file - /// by @ref mv_face_recognition_model_load() function. - /// @param [in] file_name Name of the path/file to save the model - /// @param [in] recognition_model The handle to the recognition model to be - /// saved to the file - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_VISION_ERROR_INVALID_PATH Invalid path - /// @retval #MEDIA_VISION_ERROR_PERMISSION_DENIED Not permitted - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Not supported model format - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create a face recognition handle by calling - /// @ref mv_face_recognition_model_create() function - /// @post Saved model can be loaded later by calling - /// @ref mv_face_recognition_model_load() function - /// - /// @see mv_face_recognition_model_load() - /// @see mv_face_recognition_model_create() - /// @see app_get_data_path() - int mv_face_recognition_model_save( - ffi.Pointer file_name, - mv_face_recognition_model_h recognition_model, - ) { - return _mv_face_recognition_model_save( - file_name, - recognition_model, - ); - } - - late final _mv_face_recognition_model_savePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - mv_face_recognition_model_h)>>('mv_face_recognition_model_save'); - late final _mv_face_recognition_model_save = - _mv_face_recognition_model_savePtr.asFunction< - int Function(ffi.Pointer, mv_face_recognition_model_h)>(); - - /// @brief Loads recognition model from file. - /// - /// @since_tizen 3.0 - /// @remarks This function doesn't modify the set of face image examples added - /// with @ref mv_face_recognition_model_add() function. - /// Model will be loaded from file without loss of collected examples. - /// If you want to free memory from examples, use - /// @ref mv_face_recognition_model_reset() function. It - /// is recommended to clear the memory if learning algorithm doesn't - /// support reinforcement learning. - /// @remarks @a recognition_model is loaded from the absolute path directory. - /// Use @ref app_get_data_path for the private app storage path. - /// @a recognition_model must be destroyed using - /// @ref mv_face_recognition_model_destroy(). - /// @param [in] file_name Name of path/file to load the model - /// @param [out] recognition_model The handle to the recognition model - /// to be loaded from the file - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_INVALID_PATH Invalid path - /// @retval #MEDIA_VISION_ERROR_PERMISSION_DENIED Not permitted - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Not supported model format - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Recognition model can be preliminary saved with - /// @ref mv_face_recognition_model_save() function - /// - /// @see mv_face_recognition_model_save() - /// @see mv_face_recognition_model_destroy() - /// @see app_get_data_path() - int mv_face_recognition_model_load( - ffi.Pointer file_name, - ffi.Pointer recognition_model, - ) { - return _mv_face_recognition_model_load( - file_name, - recognition_model, - ); - } - - late final _mv_face_recognition_model_loadPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>( - 'mv_face_recognition_model_load'); - late final _mv_face_recognition_model_load = - _mv_face_recognition_model_loadPtr.asFunction< - int Function(ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Adds face image example to be used for face recognition model learning - /// with @ref mv_face_recognition_model_learn(). - /// - /// @since_tizen 3.0 - /// @remarks It is possible to destroy @a source after calling this method. - /// Source isn't used for learning directly. - /// @remarks Face image @a example_location location can be determined using - /// @ref mv_face_detect function. - /// @param [in] source The handle to @a source that contains face - /// image - /// @param [in] recognition_model The handle to the recognition model which - /// could be learned based on example - /// @param [in] example_location The pointer to the rectangular location of - /// the face image at the source image. If NULL, - /// then full image will be analyzed as the face - /// image - /// @param [in] face_label The label that identifies face for which - /// example is adding. Specify the same labels - /// for the face images of a single person when - /// calling this method. Has to be unique for - /// each face - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Source colorspace - /// isn't supported - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create a face recognition handle by calling - /// @ref mv_face_recognition_model_create() function - /// @post When appropriate amount of face image examples is added to the - /// @a recognition_model, this model has to be learned by - /// @ref mv_face_recognition_model_learn() function call. Only after - /// learning of the model it can be used for face recognition with - /// @ref mv_face_recognize() function - /// - /// @see mv_face_recognition_model_reset() - /// @see mv_face_recognition_model_learn() - int mv_face_recognition_model_add( - mv_source_h source, - mv_face_recognition_model_h recognition_model, - ffi.Pointer example_location, - int face_label, - ) { - return _mv_face_recognition_model_add( - source, - recognition_model, - example_location, - face_label, - ); - } - - late final _mv_face_recognition_model_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_source_h, - mv_face_recognition_model_h, - ffi.Pointer, - ffi.Int)>>('mv_face_recognition_model_add'); - late final _mv_face_recognition_model_add = - _mv_face_recognition_model_addPtr.asFunction< - int Function(mv_source_h, mv_face_recognition_model_h, - ffi.Pointer, int)>(); - - /// @brief Removes from @a recognition_model all collected with - /// @ref mv_face_recognition_model_add() function - /// face examples labeled with @a face_label. - /// - /// @since_tizen 3.0 - /// @remarks Be aware that if this function is called before - /// @ref mv_face_recognition_model_learn() function call, all or part of - /// the required for learning data will be lost. It means that face - /// image examples determined by the @a face_label label will be removed - /// from the model and not taken into account when - /// @ref mv_face_recognition_model_learn() will be called next time. - /// @remarks Call of this function will free all the memory has been allocated - /// during previous @ref mv_face_recognition_model_add() - /// calls for the corresponding @a face_label label. - /// @param [in] recognition_model The handle to the recognition model for - /// which face image examples will be reset. - /// @param [in] face_label The label that identifies face for which - /// examples will be removed from the - /// @a recognition_model. If NULL, then all - /// known by @a recognition_model face image - /// examples will be removed - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE Key not available - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_face_recognition_model_add() - /// @see mv_face_recognition_model_learn() - int mv_face_recognition_model_reset( - mv_face_recognition_model_h recognition_model, - ffi.Pointer face_label, - ) { - return _mv_face_recognition_model_reset( - recognition_model, - face_label, - ); - } - - late final _mv_face_recognition_model_resetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_face_recognition_model_h, - ffi.Pointer)>>('mv_face_recognition_model_reset'); - late final _mv_face_recognition_model_reset = - _mv_face_recognition_model_resetPtr.asFunction< - int Function(mv_face_recognition_model_h, ffi.Pointer)>(); - - /// @brief Learns face recognition model. - /// @details Before you start learning process, face recognition models has to be - /// filled with training data - face image examples. These examples has - /// to be provided by - /// @ref mv_face_recognition_model_add() function. - /// Usually, recognition accuracy is increased when number of not - /// identical examples is large. But it depends on the used learning - /// algorithm. - /// - /// @since_tizen 3.0 - /// @remarks Common flow is to collect face examples as much as possible, add - /// them to the recognition model with - /// @ref mv_face_recognition_model_add(), then call - /// @ref mv_face_recognition_model_learn() for this recognition model to - /// learn it (or update the model if updating is supported by the used - /// algorithm). - /// @remarks Selection of the learning algorithm can be performed by setting - /// corresponding attributes for the @a engine_cfg. You can check - /// supported by @a engine_cfg attributes using - /// @ref mv_engine_config_foreach_supported_attribute() function call. - /// By default, Local Binary Patterns Histograms (LBPH) based - /// recognition algorithm will be used. - /// @param [in] engine_cfg The handle to the configuration of - /// engine will be used for learning of the - /// recognition models. If NULL, then - /// default settings will be used - /// @param [in,out] recognition_model The model which will be learned. After - /// learning process these model may be - /// changed, so @ref mv_face_recognize() - /// results may differ before and after - /// method call respectively to the face - /// examples collected for the - /// @a recognition_model - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NO_DATA No data - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create a face engine configuration handle by calling - /// @ref mv_create_engine_config() and set supported parameters if - /// needed. Or just set @a engine_cfg as NULL to learn with default settings - /// @pre Create a face recognition model handles by calling - /// @ref mv_face_recognition_model_create() function - /// @pre Add face image examples to the @a recognition_model by calling - /// @ref mv_face_recognition_model_add() function - /// @post If it is not planned to learn the model again, clear memory by - /// @ref mv_face_recognition_model_reset() function - /// @post When model has been learned, it can be used for face recognition with - /// @ref mv_face_recognize() function - /// - /// @see mv_face_recognition_model_add() - /// @see mv_face_recognition_model_reset() - /// @see mv_face_recognize() - int mv_face_recognition_model_learn( - mv_engine_config_h engine_cfg, - mv_face_recognition_model_h recognition_model, - ) { - return _mv_face_recognition_model_learn( - engine_cfg, - recognition_model, - ); - } - - late final _mv_face_recognition_model_learnPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_engine_config_h, - mv_face_recognition_model_h)>>('mv_face_recognition_model_learn'); - late final _mv_face_recognition_model_learn = - _mv_face_recognition_model_learnPtr.asFunction< - int Function(mv_engine_config_h, mv_face_recognition_model_h)>(); - - /// @brief Queries labels list and number of labels had been learned by the model. - /// - /// @since_tizen 3.0 - /// @remarks @a labels array has to be released using free(). - /// @param [in] recognition_model The handle to the recognition model for - /// which set of the learned labels will be - /// queried - /// @param [out] labels The array which will be filled with labels - /// had been learned by the model - /// @param [out] number_of_labels The number of labels in @a labels array - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Add face image examples with labels to the @a recognition_model by - /// calling the @ref mv_face_recognition_model_add() function - /// @pre Learn the @a recognition_model by labeled examples using - /// @ref mv_face_recognition_model_learn() function - /// @post @a labels array has to be freed in the function invoking code - /// - /// @see mv_face_recognition_model_add() - /// @see mv_face_recognition_model_reset() - /// @see mv_face_recognition_model_learn() - int mv_face_recognition_model_query_labels( - mv_face_recognition_model_h recognition_model, - ffi.Pointer> labels, - ffi.Pointer number_of_labels, - ) { - return _mv_face_recognition_model_query_labels( - recognition_model, - labels, - number_of_labels, - ); - } - - late final _mv_face_recognition_model_query_labelsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_face_recognition_model_h, - ffi.Pointer>, - ffi.Pointer)>>( - 'mv_face_recognition_model_query_labels'); - late final _mv_face_recognition_model_query_labels = - _mv_face_recognition_model_query_labelsPtr.asFunction< - int Function( - mv_face_recognition_model_h, - ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Calls this function to create a face tracking model handle. - /// @details Use this function to create default face tracking model handle. - /// After creation this handle has to be initialized with - /// @ref mv_face_tracking_model_prepare() function to provide - /// appropriate results of face tracking functionality. When handle is - /// prepared, it is possible to use it for tracking on continuous - /// sequence of the sources. Call @ref mv_face_tracking_model_prepare() - /// function each time before starting tracking on the new sequence. - /// The exception is situation when the new sequence is continuation - /// of the previous sequence for which model has been tracked. - /// - /// @since_tizen 3.0 - /// @param [out] tracking_model The pointer to the handle to the tracking - /// model that will be created - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @post Model can be loaded from the file after creation. Use - /// @ref mv_face_tracking_model_load() function to load it from file - /// @post Use @ref mv_face_tracking_model_prepare() function before tracking on - /// the new video or continuous images sequence - /// @post Release @a tracking_model by using - /// @ref mv_face_tracking_model_destroy() function when it is not needed - /// anymore - /// - /// @see mv_face_tracking_model_destroy() - /// @see mv_face_tracking_model_prepare() - /// @see mv_face_tracking_model_load() - int mv_face_tracking_model_create( - ffi.Pointer tracking_model, - ) { - return _mv_face_tracking_model_create( - tracking_model, - ); - } - - late final _mv_face_tracking_model_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'mv_face_tracking_model_create'); - late final _mv_face_tracking_model_create = _mv_face_tracking_model_createPtr - .asFunction)>(); - - /// @brief Calls this function to destroy the face tracking model handle and - /// release all its resources. - /// - /// @since_tizen 3.0 - /// @param [in] tracking_model The handle to the face tracking model that - /// will be destroyed - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create tracking model by using @ref mv_face_tracking_model_create() - /// - /// @see mv_face_tracking_model_create() - int mv_face_tracking_model_destroy( - mv_face_tracking_model_h tracking_model, - ) { - return _mv_face_tracking_model_destroy( - tracking_model, - ); - } - - late final _mv_face_tracking_model_destroyPtr = - _lookup>( - 'mv_face_tracking_model_destroy'); - late final _mv_face_tracking_model_destroy = - _mv_face_tracking_model_destroyPtr - .asFunction(); - - /// @brief Calls this function to initialize tracking model by the location of the - /// face to be tracked. - /// @details This function is usually called once after tracking model is created - /// and each time before tracking is started for the new sequence of - /// sources which is not the direct continuation of the sequence for - /// which tracking has been performed before. But it is allowed to call - /// it between tracking sessions to allow Media Vision start to track - /// more accurately. - /// - /// @since_tizen 3.0 - /// @param [in] tracking_model The handle to the tracking model that will be - /// prepared for tracking on new video or image - /// sequence - /// @param [in] engine_cfg The handle to the configuration of engine - /// will be used for model preparing. If NULL, then - /// default settings will be used. - /// @param [in] source The handle to the source where face @a location - /// is specified. Usually it is the first frame of - /// the video or the first image in the continuous - /// image sequence planned to be used for tracking - /// @param [in] location The quadrangle-shaped location (actually, - /// rectangle can be used) determining position - /// of the face to be tracked on the @a source. If - /// @c NULL, then tracking model will try to find - /// previously tracked face by itself. Don't set - /// NULL when called first time for the tracking - /// model. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create a face tracking model handle by calling - /// @ref mv_face_tracking_model_create() function - /// @pre Create a source handle by calling @ref mv_create_source() function - /// @post When model is prepared, @ref mv_face_track() function can be used to - /// track on the video or continuous image sequence - /// - /// @see mv_face_tracking_model_create() - /// @see mv_face_track() - int mv_face_tracking_model_prepare( - mv_face_tracking_model_h tracking_model, - mv_engine_config_h engine_cfg, - mv_source_h source, - ffi.Pointer location, - ) { - return _mv_face_tracking_model_prepare( - tracking_model, - engine_cfg, - source, - location, - ); - } - - late final _mv_face_tracking_model_preparePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_face_tracking_model_h, - mv_engine_config_h, - mv_source_h, - ffi.Pointer)>>('mv_face_tracking_model_prepare'); - late final _mv_face_tracking_model_prepare = - _mv_face_tracking_model_preparePtr.asFunction< - int Function(mv_face_tracking_model_h, mv_engine_config_h, - mv_source_h, ffi.Pointer)>(); - - /// @brief Calls this function to make a copy of existed tracking model handle and - /// clone all its resources to the copy. - /// - /// @since_tizen 3.0 - /// @remarks Cloning performs not only handle copy, but also copies all internal - /// resources of the model. @a dst must be released using - /// mv_face_tracking_model_destroy(). - /// @param [in] src The handle to the tracking model to be copied - /// @param [out] dst The handle to the copy of existed tracking model - /// specified as @a src - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create face tracking @a src handle by calling - /// @ref mv_face_tracking_model_create() - /// - /// @see mv_face_tracking_model_create() - int mv_face_tracking_model_clone( - mv_face_tracking_model_h src, - ffi.Pointer dst, - ) { - return _mv_face_tracking_model_clone( - src, - dst, - ); - } - - late final _mv_face_tracking_model_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_face_tracking_model_h, - ffi.Pointer)>>( - 'mv_face_tracking_model_clone'); - late final _mv_face_tracking_model_clone = - _mv_face_tracking_model_clonePtr.asFunction< - int Function(mv_face_tracking_model_h, - ffi.Pointer)>(); - - /// @brief Calls this method to save tracking model to the file. - /// - /// @since_tizen 3.0 - /// @remarks @a tracking_model is saved to the absolute path directory. - /// Use @ref app_get_data_path for the private app storage path. - /// After model is saved to the file, it can be loaded from this file - /// with @ref mv_face_tracking_model_load() function. - /// @param [in] file_name Name of the path/file to save the model - /// @param [in] tracking_model The handle to the tracking model to be - /// saved to the file - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_VISION_ERROR_INVALID_PATH Invalid path - /// @retval #MEDIA_VISION_ERROR_PERMISSION_DENIED Not permitted - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Not supported model format - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create a face tracking handle by calling - /// @ref mv_face_tracking_model_create() - /// @post Saved model can be loaded from file using - /// @ref mv_face_tracking_model_load() function - /// - /// @see mv_face_tracking_model_load() - /// @see mv_face_tracking_model_create() - /// @see app_get_data_path() - int mv_face_tracking_model_save( - ffi.Pointer file_name, - mv_face_tracking_model_h tracking_model, - ) { - return _mv_face_tracking_model_save( - file_name, - tracking_model, - ); - } - - late final _mv_face_tracking_model_savePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - mv_face_tracking_model_h)>>('mv_face_tracking_model_save'); - late final _mv_face_tracking_model_save = - _mv_face_tracking_model_savePtr.asFunction< - int Function(ffi.Pointer, mv_face_tracking_model_h)>(); - - /// @brief Calls this method to load a tracking model from file. - /// - /// @since_tizen 3.0 - /// @remarks @a tracking_model is loaded from the absolute path directory. - /// Use @ref app_get_data_path for the private app storage path. - /// @a tracking_model must be destroyed using - /// @ref mv_face_tracking_model_destroy. - /// @param [in] file_name Name of path/file to load the model - /// @param [out] tracking_model The handle to the tracking model to be - /// loaded from file - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_VISION_ERROR_INVALID_PATH Invalid path - /// @retval #MEDIA_VISION_ERROR_PERMISSION_DENIED Not permitted - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Not supported model format - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Models has been saved by @ref mv_face_tracking_model_save() function - /// can be loaded with this function - /// @post After model has been loaded and if further tracking will be performed - /// on the video which is not continuation of the last tracking performed - /// for the model, it is recommended to call - /// @ref mv_face_tracking_model_prepare() function - /// - /// @see mv_face_tracking_model_save() - /// @see mv_face_tracking_model_destroy() - /// @see app_get_data_path() - int mv_face_tracking_model_load( - ffi.Pointer file_name, - ffi.Pointer tracking_model, - ) { - return _mv_face_tracking_model_load( - file_name, - tracking_model, - ); - } - - late final _mv_face_tracking_model_loadPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>( - 'mv_face_tracking_model_load'); - late final _mv_face_tracking_model_load = - _mv_face_tracking_model_loadPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Recognizes the given image objects on the source image. - /// @details Use this function to launch image recognition algorithm configured - /// by @a engine_conf configuration. - /// - /// @since_tizen 3.0 - /// @param [in] source The handle to the source image on which image - /// objects will be recognized - /// @param [in] image_objects The set of handles to the image objects which - /// will be processed as targets of recognition - /// @param [in] number_of_objects The number of image objects - /// @param [in] engine_cfg The handle to the configuration of engine - /// which will be used for recognition. If NULL, - /// then default settings will be used. - /// @param [in] recognized_cb The callback which will be called in order to - /// process recognition result - /// @param [in] user_data The user data to be passed to the - /// @a recognized_cb - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Source colorspace - /// isn't supported - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create a set of image objects using @ref mv_image_object_create() for - /// each of them and construct (fill / load / clone) them on images that - /// will be recognized - /// @pre Create a source handle by calling @ref mv_create_source() and fill - /// by the image for which recognition will be performed - /// @post @a mv_image_recognized_cb will be called to process recognition result - /// @post Release source image by using @ref mv_destroy_source() - /// @post Release image objects by using @ref mv_image_object_destroy() for each - /// handle from @a image_objects set - /// - /// @see mv_image_recognized_cb - /// @see mv_source_h - /// @see mv_create_source() - /// @see mv_destroy_source() - /// @see mv_image_object_h - /// @see mv_image_object_create() - /// @see mv_image_object_destroy() - /// @see mv_engine_config_h - int mv_image_recognize( - mv_source_h source, - ffi.Pointer image_objects, - int number_of_objects, - mv_engine_config_h engine_cfg, - mv_image_recognized_cb recognized_cb, - ffi.Pointer user_data, - ) { - return _mv_image_recognize( - source, - image_objects, - number_of_objects, - engine_cfg, - recognized_cb, - user_data, - ); - } - - late final _mv_image_recognizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_source_h, - ffi.Pointer, - ffi.Int, - mv_engine_config_h, - mv_image_recognized_cb, - ffi.Pointer)>>('mv_image_recognize'); - late final _mv_image_recognize = _mv_image_recognizePtr.asFunction< - int Function(mv_source_h, ffi.Pointer, int, - mv_engine_config_h, mv_image_recognized_cb, ffi.Pointer)>(); - - /// @brief Tracks the given image tracking model on the current frame - /// @details Image tracking on a sequence of frames assumes calling this - /// function for each frame in the correct order. - /// @a tracked_cb will be called for result processing. - /// - /// @since_tizen 3.0 - /// @remarks Tracking algorithm is usually using for recognition of image object - /// on the sequence of images that are organized by time. For example, - /// it may be the sequence of frames from a video stream. - /// @remarks If object is lost during the tracking, system tries to find it - /// further for the following frames. Therefore, tracking will be - /// recovered when object appears again. - /// @remarks Previous calls of @ref mv_image_track() for this - /// @a image_tracking_model will affect on current call - /// @param [in] source The handle to the current image of - /// sequence where image tracking model - /// will be tracked - /// @param [in,out] image_tracking_model The handle to the image tracking model - /// which processed as target of tracking - /// @param [in] engine_cfg The handle to the configuration of - /// engine which will be used for tracking. - /// If NULL, then default settings will be - /// used. - /// @param [in] tracked_cb The callback which will receive - /// tracking results - /// @param [in] user_data The user data to be passed to the - /// @a tracked_cb - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Source colorspace - /// isn't supported - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create image tracking model by calling - /// @ref mv_image_tracking_model_create() and set target by calling - /// @ref mv_image_tracking_model_set_target() - /// @pre Create a source images by calling @ref mv_create_source() for each of - /// them and construct them based on sequence of images for which will be - /// held image tracking - /// @post @a tracked_cb will be called to process tracking result - /// @post Release image tracking model by using - /// @ref mv_image_tracking_model_destroy() - /// - /// @see mv_image_tracked_cb - /// @see mv_source_h - /// @see image_tracking_model_h - /// @see mv_image_tracking_model_create() - /// @see mv_image_tracking_model_set_target() - /// @see mv_image_tracking_model_destroy() - int mv_image_track( - mv_source_h source, - mv_image_tracking_model_h image_tracking_model, - mv_engine_config_h engine_cfg, - mv_image_tracked_cb tracked_cb, - ffi.Pointer user_data, - ) { - return _mv_image_track( - source, - image_tracking_model, - engine_cfg, - tracked_cb, - user_data, - ); - } - - late final _mv_image_trackPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_source_h, - mv_image_tracking_model_h, - mv_engine_config_h, - mv_image_tracked_cb, - ffi.Pointer)>>('mv_image_track'); - late final _mv_image_track = _mv_image_trackPtr.asFunction< - int Function(mv_source_h, mv_image_tracking_model_h, mv_engine_config_h, - mv_image_tracked_cb, ffi.Pointer)>(); - - /// @brief Creates an image object. - /// - /// @since_tizen 3.0 - /// @param [out] image_object A new handle to the image object - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @post Release image object by using @ref mv_image_object_destroy() - /// - /// @see mv_image_object_destroy() - /// @see mv_image_object_h - int mv_image_object_create( - ffi.Pointer image_object, - ) { - return _mv_image_object_create( - image_object, - ); - } - - late final _mv_image_object_createPtr = _lookup< - ffi.NativeFunction)>>( - 'mv_image_object_create'); - late final _mv_image_object_create = _mv_image_object_createPtr - .asFunction)>(); - - /// @brief Destroys the image object. - /// - /// @since_tizen 3.0 - /// @param [in] image_object The handle to the image object to be destroyed - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create image object by using @ref mv_image_object_create() - /// - /// @see mv_image_object_create() - /// @see mv_image_object_h - int mv_image_object_destroy( - mv_image_object_h image_object, - ) { - return _mv_image_object_destroy( - image_object, - ); - } - - late final _mv_image_object_destroyPtr = - _lookup>( - 'mv_image_object_destroy'); - late final _mv_image_object_destroy = - _mv_image_object_destroyPtr.asFunction(); - - /// @brief Fills the image object. - /// @details Extracts data from @a source image which will be needed for - /// recognition of depicted object in @a location. - /// - /// @since_tizen 3.0 - /// @remarks After filling the image object it can be evaluated by - /// @ref mv_image_object_get_recognition_rate(). If recognition rate - /// is too low, try to use another image of object or change - /// configuration parameters (see @ref mv_engine_config_h) and construct - /// the image object again. - /// @param [in,out] image_object The handle to the image object which will be - /// filled and can be recognized in future - /// @param [in] engine_cfg The handle to the configuration of engine - /// which will be used for extract recognition - /// data from @a source. If NULL, then default - /// settings will be used. - /// @param [in] source The source image where image object is depicted - /// @param [in] location The pointer to location of the image object - /// on the source image, or NULL if the object is - /// shown in full - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Source colorspace - /// isn't supported - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create image object by using @ref mv_image_object_create() - /// @post Release image object by using @ref mv_image_object_destroy() - /// - /// @see mv_image_object_h - /// @see mv_image_object_create() - /// @see mv_image_object_get_recognition_rate() - /// @see mv_image_recognize() - /// @see mv_image_object_destroy() - /// @see mv_engine_config_h - int mv_image_object_fill( - mv_image_object_h image_object, - mv_engine_config_h engine_cfg, - mv_source_h source, - ffi.Pointer location, - ) { - return _mv_image_object_fill( - image_object, - engine_cfg, - source, - location, - ); - } - - late final _mv_image_object_fillPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_image_object_h, mv_engine_config_h, mv_source_h, - ffi.Pointer)>>('mv_image_object_fill'); - late final _mv_image_object_fill = _mv_image_object_fillPtr.asFunction< - int Function(mv_image_object_h, mv_engine_config_h, mv_source_h, - ffi.Pointer)>(); - - /// @brief Gets a value that determines how well an image object can be recognized. - /// @details Recognition rate determines how well an image object can be - /// recognized. This value can be from 0 to 1. If the recognition rate - /// is 0 object can not be recognized and the bigger it is the more - /// likely to recognize the object. - /// - /// @since_tizen 3.0 - /// @remarks If recognition rate is too low, try to use another image of object - /// or change some configuration parameters (see @ref mv_engine_config_h) - /// and fill the image object again (see @ref mv_image_object_fill()). - /// @param [in] image_object The handle to the image object which will be - /// evaluated by this function - /// @param [out] recognition_rate A value that determines how well an image - /// object can be recognized, if 0 then object - /// can not be recognized - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create image object by using @ref mv_image_object_create() - /// @post Release image object by using @ref mv_image_object_destroy() - /// - /// @see mv_image_object_h - /// @see mv_image_object_create() - /// @see mv_image_object_fill() - /// @see mv_image_object_destroy() - /// @see mv_engine_config_h - int mv_image_object_get_recognition_rate( - mv_image_object_h image_object, - ffi.Pointer recognition_rate, - ) { - return _mv_image_object_get_recognition_rate( - image_object, - recognition_rate, - ); - } - - late final _mv_image_object_get_recognition_ratePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_image_object_h, ffi.Pointer)>>( - 'mv_image_object_get_recognition_rate'); - late final _mv_image_object_get_recognition_rate = - _mv_image_object_get_recognition_ratePtr.asFunction< - int Function(mv_image_object_h, ffi.Pointer)>(); - - /// @brief Sets a label for the image object. - /// - /// @since_tizen 3.0 - /// @param [in] image_object The handle to the image object for which the label - /// will be assigned - /// @param [in] label The label which will be assigned to the image - /// object - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create image object by using @ref mv_image_object_create() - /// @post Label could be received by using @ref mv_image_object_get_label() - /// @post Release image object by using @ref mv_image_object_destroy() - /// - /// @see mv_image_object_get_label() - /// @see mv_image_object_h - /// @see mv_image_object_create() - /// @see mv_image_object_destroy() - int mv_image_object_set_label( - mv_image_object_h image_object, - int label, - ) { - return _mv_image_object_set_label( - image_object, - label, - ); - } - - late final _mv_image_object_set_labelPtr = - _lookup>( - 'mv_image_object_set_label'); - late final _mv_image_object_set_label = _mv_image_object_set_labelPtr - .asFunction(); - - /// @brief Gets a label of image object. - /// - /// @since_tizen 3.0 - /// @remarks If @a image_object have not a label, this function return - /// MEDIA_VISION_ERROR_NO_DATA value. - /// @param [in] image_object The handle to the image object from which a - /// label will be received - /// @param [out] label The label of image object - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NO_DATA Image object hasn't label - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create image object by using @ref mv_image_object_create() - /// @pre Set label for the image object by using @ref mv_image_object_set_label() - /// @post Release image object by using @ref mv_image_object_destroy() - /// - /// @see mv_image_object_set_label() - /// @see mv_image_object_h - /// @see mv_image_object_create() - /// @see mv_image_object_destroy() - int mv_image_object_get_label( - mv_image_object_h image_object, - ffi.Pointer label, - ) { - return _mv_image_object_get_label( - image_object, - label, - ); - } - - late final _mv_image_object_get_labelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_image_object_h, - ffi.Pointer)>>('mv_image_object_get_label'); - late final _mv_image_object_get_label = _mv_image_object_get_labelPtr - .asFunction)>(); - - /// @brief Clones the image object. - /// - /// @since_tizen 3.0 - /// @remarks @a dst must be released using mv_image_object_destroy(). - /// @param [in] src The handle to the source image object - /// @param [out] dst The handle to the destination image object - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @pre Create image object handles by calling mv_image_object_create() - /// - /// @see mv_image_object_create() - /// @see mv_image_object_destroy() - int mv_image_object_clone( - mv_image_object_h src, - ffi.Pointer dst, - ) { - return _mv_image_object_clone( - src, - dst, - ); - } - - late final _mv_image_object_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_image_object_h, - ffi.Pointer)>>('mv_image_object_clone'); - late final _mv_image_object_clone = _mv_image_object_clonePtr.asFunction< - int Function(mv_image_object_h, ffi.Pointer)>(); - - /// @brief Saves the image object. - /// - /// @since_tizen 3.0 - /// @remarks @a image_object is saved to the absolute path directory. - /// Use @ref app_get_data_path for the private app storage path. - /// @param [in] file_name Name of the file to path/save the image object - /// @param [in] image_object The handle to the image object which will be saved - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_INVALID_PATH Invalid path - /// @retval #MEDIA_VISION_ERROR_PERMISSION_DENIED Not permitted - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create image object handle by calling mv_image_object_create() - /// @post Saved model can be loaded later by calling - /// mv_image_object_load() function - /// - /// @see mv_image_object_create() - /// @see mv_image_object_load() - /// @see mv_image_object_destroy() - int mv_image_object_save( - ffi.Pointer file_name, - mv_image_object_h image_object, - ) { - return _mv_image_object_save( - file_name, - image_object, - ); - } - - late final _mv_image_object_savePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - mv_image_object_h)>>('mv_image_object_save'); - late final _mv_image_object_save = _mv_image_object_savePtr - .asFunction, mv_image_object_h)>(); - - /// @brief Loads an image object from the file. - /// - /// @since_tizen 3.0 - /// @remarks @a image_object is loaded from the absolute path directory. - /// Use @ref app_get_data_path for the private app storage path. - /// @a image_object must be destroyed using - /// @ref mv_image_object_destroy(). - /// @param [in] file_name Name of path/file to load the image object - /// @param [out] image_object The handle to the image object which will be - /// filled - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_INVALID_PATH Invalid path - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_VISION_ERROR_PERMISSION_DENIED Not permitted - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Image object can be preliminary saved with mv_image_object_save() - /// function - /// - /// @see mv_image_object_save() - /// @see mv_image_object_destroy() - int mv_image_object_load( - ffi.Pointer file_name, - ffi.Pointer image_object, - ) { - return _mv_image_object_load( - file_name, - image_object, - ); - } - - late final _mv_image_object_loadPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('mv_image_object_load'); - late final _mv_image_object_load = _mv_image_object_loadPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Creates an image tracking model. - /// - /// @since_tizen 3.0 - /// @param [out] image_tracking_model A new handle to the image tracking model - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @post Release image tracking model by using mv_image_tracking_model_destroy() - /// - /// @see mv_image_tracking_model_destroy() - int mv_image_tracking_model_create( - ffi.Pointer image_tracking_model, - ) { - return _mv_image_tracking_model_create( - image_tracking_model, - ); - } - - late final _mv_image_tracking_model_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'mv_image_tracking_model_create'); - late final _mv_image_tracking_model_create = - _mv_image_tracking_model_createPtr - .asFunction)>(); - - /// @brief Sets target of image tracking model. - /// @details Sets image object which will be tracked by using tracking - /// functionality with @a image_tracking_model. - /// - /// @since_tizen 3.0 - /// @param [in] image_object Image object which will be set - /// as target for tracking - /// @param [in] image_tracking_model Handle to the image tracking model - /// for which will be set a new target - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create image tracking model by calling - /// @ref mv_image_tracking_model_create() - /// @pre Create an image object using @ref mv_image_object_create() and construct - /// (fill / load / clone) it on image that will be tracking - /// @post Release image object by using @ref mv_image_object_destroy() - /// @post Release image tracking model by using - /// @ref mv_image_tracking_model_destroy() - /// - /// @see mv_image_object_h - /// @see mv_image_tracking_model_h - /// @see mv_image_object_create() - /// @see mv_image_object_destroy() - /// @see mv_image_tracking_model_create() - /// @see mv_image_track() - /// @see mv_image_tracking_model_destroy() - int mv_image_tracking_model_set_target( - mv_image_object_h image_object, - mv_image_tracking_model_h image_tracking_model, - ) { - return _mv_image_tracking_model_set_target( - image_object, - image_tracking_model, - ); - } - - late final _mv_image_tracking_model_set_targetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_image_object_h, mv_image_tracking_model_h)>>( - 'mv_image_tracking_model_set_target'); - late final _mv_image_tracking_model_set_target = - _mv_image_tracking_model_set_targetPtr.asFunction< - int Function(mv_image_object_h, mv_image_tracking_model_h)>(); - - /// @brief Destroys the image tracking model. - /// - /// @since_tizen 3.0 - /// @param [in] image_tracking_model The handle to the image tracking model - /// to be destroyed - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create image tracking model by using mv_image_tracking_model_create() - /// - /// @see mv_image_tracking_model_create() - int mv_image_tracking_model_destroy( - mv_image_tracking_model_h image_tracking_model, - ) { - return _mv_image_tracking_model_destroy( - image_tracking_model, - ); - } - - late final _mv_image_tracking_model_destroyPtr = - _lookup>( - 'mv_image_tracking_model_destroy'); - late final _mv_image_tracking_model_destroy = - _mv_image_tracking_model_destroyPtr - .asFunction(); - - /// @brief Refreshes the state of image tracking model. - /// @details Clears moving history and change state to undetected. This function - /// is usually called each time before tracking is started for the new - /// sequence of sources which is not the direct continuation of the - /// sequence for which tracking has been performed before. Tracking - /// algorithm will try to find image by itself. - /// - /// @since_tizen 3.0 - /// @param [in] image_tracking_model The handle to the image tracking model - /// which will be refreshed - /// @param [in] engine_cfg The handle to the configuration of - /// engine which will be used. If NULL, - /// then default settings will be used. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create image tracking model by calling - /// @ref mv_image_tracking_model_create() - /// @post Release image tracking model by using - /// @ref mv_image_tracking_model_destroy() - /// - /// @see mv_image_tracking_model_h - /// @see mv_image_tracking_model_create() - /// @see mv_image_track() - /// @see mv_image_tracking_model_destroy() - int mv_image_tracking_model_refresh( - mv_image_tracking_model_h image_tracking_model, - mv_engine_config_h engine_cfg, - ) { - return _mv_image_tracking_model_refresh( - image_tracking_model, - engine_cfg, - ); - } - - late final _mv_image_tracking_model_refreshPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_image_tracking_model_h, - mv_engine_config_h)>>('mv_image_tracking_model_refresh'); - late final _mv_image_tracking_model_refresh = - _mv_image_tracking_model_refreshPtr.asFunction< - int Function(mv_image_tracking_model_h, mv_engine_config_h)>(); - - /// @brief Clones the image tracking model. - /// - /// @since_tizen 3.0 - /// @remarks @a dst must be released using mv_image_tracking_model_destroy(). - /// @param [in] src The handle to the source image tracking model - /// @param [out] dst The handle to the destination image tracking model - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @pre Create image tracking model handles by calling - /// mv_image_tracking_model_create() - /// - /// @see mv_image_tracking_model_create() - /// @see mv_image_tracking_model_destroy() - int mv_image_tracking_model_clone( - mv_image_tracking_model_h src, - ffi.Pointer dst, - ) { - return _mv_image_tracking_model_clone( - src, - dst, - ); - } - - late final _mv_image_tracking_model_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_image_tracking_model_h, - ffi.Pointer)>>( - 'mv_image_tracking_model_clone'); - late final _mv_image_tracking_model_clone = - _mv_image_tracking_model_clonePtr.asFunction< - int Function(mv_image_tracking_model_h, - ffi.Pointer)>(); - - /// @brief Saves the image tracking model. - /// - /// @since_tizen 3.0 - /// @remarks @a image_tracking_model is saved to the absolute path directory. - /// Use @ref app_get_data_path for the private app storage path. - /// @param [in] file_name Name of path/file to save the model - /// @param [in] image_tracking_model The handle to the image tracking model - /// to be saved - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_INVALID_PATH Invalid path - /// @retval #MEDIA_VISION_ERROR_PERMISSION_DENIED Not permitted - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create image tracking model handle by calling - /// mv_image_tracking_model_create() - /// @post Saved model can be loaded later by calling - /// mv_image_tracking_model_load() function - /// - /// @see mv_image_tracking_model_create() - /// @see mv_image_tracking_model_load() - /// @see mv_image_tracking_model_destroy() - int mv_image_tracking_model_save( - ffi.Pointer file_name, - mv_image_tracking_model_h image_tracking_model, - ) { - return _mv_image_tracking_model_save( - file_name, - image_tracking_model, - ); - } - - late final _mv_image_tracking_model_savePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - mv_image_tracking_model_h)>>('mv_image_tracking_model_save'); - late final _mv_image_tracking_model_save = - _mv_image_tracking_model_savePtr.asFunction< - int Function(ffi.Pointer, mv_image_tracking_model_h)>(); - - /// @brief Loads an image tracking model from the file. - /// - /// @since_tizen 3.0 - /// @remarks @a image_tracking_model is loaded from the absolute path directory. - /// Use @ref app_get_data_path for the private app storage path. - /// @a image_tracking_model must be destroyed using - /// @ref mv_image_tracking_model_destroy. - /// @param [in] file_name Name of path/file to load model - /// @param [out] image_tracking_model The handle to the image tracking - /// model to be filled - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_INVALID_PATH Invalid path - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_VISION_ERROR_PERMISSION_DENIED Not permitted - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Image tracking model handle can be preliminary saved with - /// mv_image_tracking_model_save() function - /// - /// @see mv_image_tracking_model_save() - /// @see mv_image_tracking_model_destroy() - int mv_image_tracking_model_load( - ffi.Pointer file_name, - ffi.Pointer image_tracking_model, - ) { - return _mv_image_tracking_model_load( - file_name, - image_tracking_model, - ); - } - - late final _mv_image_tracking_model_loadPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>( - 'mv_image_tracking_model_load'); - late final _mv_image_tracking_model_load = - _mv_image_tracking_model_loadPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Creates surveillance event trigger handle. - /// - /// @since_tizen 3.0 - /// @remarks List of supported event types can be obtained by - /// @ref mv_surveillance_foreach_supported_event_type function - /// @remarks You must release @a trigger by using - /// @ref mv_surveillance_event_trigger_destroy() - /// @param [in] event_type Name of the event type to be supported by the - /// @a trigger - /// @param [out] trigger A new handle to the event trigger - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_surveillance_event_trigger_destroy() - /// @see mv_surveillance_foreach_supported_event_type() - int mv_surveillance_event_trigger_create( - ffi.Pointer event_type, - ffi.Pointer trigger, - ) { - return _mv_surveillance_event_trigger_create( - event_type, - trigger, - ); - } - - late final _mv_surveillance_event_trigger_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>( - 'mv_surveillance_event_trigger_create'); - late final _mv_surveillance_event_trigger_create = - _mv_surveillance_event_trigger_createPtr.asFunction< - int Function(ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Destroys the surveillance event trigger handle and releases all its - /// resources. - /// - /// @since_tizen 3.0 - /// @param [in] trigger The handle to the event trigger to be destroyed - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_surveillance_event_trigger_create - int mv_surveillance_event_trigger_destroy( - mv_surveillance_event_trigger_h trigger, - ) { - return _mv_surveillance_event_trigger_destroy( - trigger, - ); - } - - late final _mv_surveillance_event_trigger_destroyPtr = _lookup< - ffi - .NativeFunction>( - 'mv_surveillance_event_trigger_destroy'); - late final _mv_surveillance_event_trigger_destroy = - _mv_surveillance_event_trigger_destroyPtr - .asFunction(); - - /// @brief Gets the surveillance event trigger type as character string. - /// - /// @since_tizen 3.0 - /// @remarks The @a event_type should be freed using free() - /// @param [in] trigger The handle to the event trigger - /// @param [out] event_type The pointer to the character string which will be - /// filled by textual name of the event type - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Event trigger has to be created by - /// @ref mv_surveillance_event_trigger_create() function - int mv_surveillance_get_event_trigger_type( - mv_surveillance_event_trigger_h trigger, - ffi.Pointer> event_type, - ) { - return _mv_surveillance_get_event_trigger_type( - trigger, - event_type, - ); - } - - late final _mv_surveillance_get_event_trigger_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_surveillance_event_trigger_h, - ffi.Pointer>)>>( - 'mv_surveillance_get_event_trigger_type'); - late final _mv_surveillance_get_event_trigger_type = - _mv_surveillance_get_event_trigger_typePtr.asFunction< - int Function(mv_surveillance_event_trigger_h, - ffi.Pointer>)>(); - - /// @brief Sets ROI (Region Of Interest) to the event trigger. - /// @details When ROI is set for the event trigger, then event check for this - /// @a triger will be performed only inside the polygonal region - /// determined by @a roi parameter. - /// If this method has been never called for the @a trigger, then event - /// will be checked for the whole input frame (event check is performed - /// for each @ref mv_surveillance_push_source() function call). - /// It is possible to change the ROI between - /// @ref mv_surveillance_push_source() calls. - /// - /// @since_tizen 3.0 - /// @param [in] trigger The handle to the event trigger - /// @param [in] number_of_points The number of ROI points - /// @param [in] roi The input array with ROI points - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Event trigger has to be created by - /// @ref mv_surveillance_event_trigger_create() function - /// - /// @see mv_surveillance_event_trigger_h - /// @see mv_surveillance_get_event_trigger_roi() - int mv_surveillance_set_event_trigger_roi( - mv_surveillance_event_trigger_h trigger, - int number_of_points, - ffi.Pointer roi, - ) { - return _mv_surveillance_set_event_trigger_roi( - trigger, - number_of_points, - roi, - ); - } - - late final _mv_surveillance_set_event_trigger_roiPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_surveillance_event_trigger_h, ffi.Int, - ffi.Pointer)>>( - 'mv_surveillance_set_event_trigger_roi'); - late final _mv_surveillance_set_event_trigger_roi = - _mv_surveillance_set_event_trigger_roiPtr.asFunction< - int Function( - mv_surveillance_event_trigger_h, int, ffi.Pointer)>(); - - /// @brief Gets ROI (Region Of Interest) from the event trigger. - /// - /// @since_tizen 3.0 - /// @remark If @ref mv_surveillance_set_event_trigger_roi() has been never - /// called for @a trigger, then @a number_of_points output value will be - /// zero and @a roi pointer will be not changed. - /// @param [in] trigger The handle to the event trigger - /// @param [out] number_of_points The number of ROI points - /// @param [out] roi The output array with ROI points - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Event trigger has to be created by - /// @ref mv_surveillance_event_trigger_create() function - /// - /// @post Memory for @a roi array must be released - /// - /// @see mv_surveillance_event_trigger_h - /// @see mv_surveillance_set_event_trigger_roi() - int mv_surveillance_get_event_trigger_roi( - mv_surveillance_event_trigger_h trigger, - ffi.Pointer number_of_points, - ffi.Pointer> roi, - ) { - return _mv_surveillance_get_event_trigger_roi( - trigger, - number_of_points, - roi, - ); - } - - late final _mv_surveillance_get_event_trigger_roiPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_surveillance_event_trigger_h, - ffi.Pointer, ffi.Pointer>)>>( - 'mv_surveillance_get_event_trigger_roi'); - late final _mv_surveillance_get_event_trigger_roi = - _mv_surveillance_get_event_trigger_roiPtr.asFunction< - int Function(mv_surveillance_event_trigger_h, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Subscribes @a trigger to process sources pushed from video identified - /// by @a video_stream_id. - /// @details When @a trigger is subscribed, then each time when function - /// @ref mv_surveillance_push_source() is called for @a video_stream_id, - /// event occurrence is checked. If this check is successful, - /// @a callback is invoked. Details on occurred event can be obtained - /// using @ref mv_surveillance_result_h handle from @a callback. - /// - /// @since_tizen 3.0 - /// @remarks Use @ref mv_surveillance_unsubscribe_event_trigger() function for - /// the same @a trigger and @a video_stream_id parameters to stop - /// subscription. - /// @param [in] trigger The handle to the event trigger activating - /// calls of the @a callback function - /// @param [in] video_stream_id The identifier of the video stream for which - /// event trigger activation will be checked - /// @param [in] engine_cfg The engine configuration of the event - /// @param [in] callback Callback to be called each time when event - /// occurrence is detected - /// @param [in] user_data The user data to be passed to the @a callback - /// function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @post @ref mv_surveillance_event_occurred_cb will be called each time - /// @a trigger is activated after @ref mv_surveillance_push_source() call - /// - /// @see mv_surveillance_event_trigger_h - /// @see mv_surveillance_unsubscribe_event_trigger() - /// @see mv_surveillance_push_source() - int mv_surveillance_subscribe_event_trigger( - mv_surveillance_event_trigger_h trigger, - int video_stream_id, - mv_engine_config_h engine_cfg, - mv_surveillance_event_occurred_cb callback, - ffi.Pointer user_data, - ) { - return _mv_surveillance_subscribe_event_trigger( - trigger, - video_stream_id, - engine_cfg, - callback, - user_data, - ); - } - - late final _mv_surveillance_subscribe_event_triggerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_surveillance_event_trigger_h, - ffi.Int, - mv_engine_config_h, - mv_surveillance_event_occurred_cb, - ffi.Pointer)>>( - 'mv_surveillance_subscribe_event_trigger'); - late final _mv_surveillance_subscribe_event_trigger = - _mv_surveillance_subscribe_event_triggerPtr.asFunction< - int Function(mv_surveillance_event_trigger_h, int, mv_engine_config_h, - mv_surveillance_event_occurred_cb, ffi.Pointer)>(); - - /// @brief Unsubscribes @a trigger from the event and stop calling @a callback. - /// - /// @since_tizen 3.0 - /// @remarks To start handling trigger activation use - /// @ref mv_surveillance_subscribe_event_trigger(). - /// @param [in] trigger The handle to the event trigger for which - /// subscription will be stopped - /// @param [in] video_stream_id The identifier of the video source for which - /// subscription will be stopped - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre To stop subscription it has to be created earlier with - /// @ref mv_surveillance_subscribe_event_trigger() function - /// - /// @see mv_surveillance_event_trigger_h - /// @see mv_surveillance_subscribe_event_trigger() - int mv_surveillance_unsubscribe_event_trigger( - mv_surveillance_event_trigger_h trigger, - int video_stream_id, - ) { - return _mv_surveillance_unsubscribe_event_trigger( - trigger, - video_stream_id, - ); - } - - late final _mv_surveillance_unsubscribe_event_triggerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_surveillance_event_trigger_h, - ffi.Int)>>('mv_surveillance_unsubscribe_event_trigger'); - late final _mv_surveillance_unsubscribe_event_trigger = - _mv_surveillance_unsubscribe_event_triggerPtr - .asFunction(); - - /// @brief Pushes source to the surveillance system to detect events. - /// @details mv_surveillance_event_occurred_cb() will be called when any - /// subscribing event detected. - /// - /// @since_tizen 3.0 - /// @remarks @ref mv_surveillance_set_event_trigger_roi() function can be used - /// to specify the polygon region where event can be detected only - /// @param [in] source The handle to the media source - /// @param [in] video_stream_id The identifier of video stream from which - /// @a source is coming - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre To receive surveillance results, some event triggers has to be - /// subscribed by @ref mv_surveillance_subscribe_event_trigger() function - /// before @ref mv_surveillance_push_source() calls - /// @pre Before calling of this method @a source has to be correctly filled. - /// @ref mv_source_fill_by_media_packet(), @ref mv_source_fill_by_buffer() - /// functions can be used to fill @a source - /// - /// @see mv_surveillance_event_trigger_h - /// @see mv_surveillance_event_occurred_cb - /// @see mv_surveillance_subscribe_event_trigger() - /// @see mv_surveillance_unsubscribe_event_trigger() - int mv_surveillance_push_source( - mv_source_h source, - int video_stream_id, - ) { - return _mv_surveillance_push_source( - source, - video_stream_id, - ); - } - - late final _mv_surveillance_push_sourcePtr = - _lookup>( - 'mv_surveillance_push_source'); - late final _mv_surveillance_push_source = _mv_surveillance_push_sourcePtr - .asFunction(); - - /// @brief Starts traversing through list of supported event types. - /// - /// @since_tizen 3.0 - /// @remarks Supported event types and their descriptions can be found in - /// @ref CAPI_MEDIA_VISION_SURVEILLANCE_EVENT_TYPES documentation - /// section - /// @param [in] callback The callback function to be called for each - /// supported event type - /// @param [in] user_data The user data to be passed to the @a callback - /// function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_surveillance_event_type_cb - /// @see mv_surveillance_foreach_event_result_name() - int mv_surveillance_foreach_supported_event_type( - mv_surveillance_event_type_cb callback, - ffi.Pointer user_data, - ) { - return _mv_surveillance_foreach_supported_event_type( - callback, - user_data, - ); - } - - late final _mv_surveillance_foreach_supported_event_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_surveillance_event_type_cb, ffi.Pointer)>>( - 'mv_surveillance_foreach_supported_event_type'); - late final _mv_surveillance_foreach_supported_event_type = - _mv_surveillance_foreach_supported_event_typePtr.asFunction< - int Function(mv_surveillance_event_type_cb, ffi.Pointer)>(); - - /// @brief Starts traversing through list of supported event result value names. - /// - /// @since_tizen 3.0 - /// @remarks Supported event types, event result value names and their - /// descriptions can be found in - /// @ref CAPI_MEDIA_VISION_SURVEILLANCE_EVENT_TYPES documentation - /// section - /// @param [in] event_type The name of the event type for which result value - /// names will be passed to the @a callback. Can be - /// set @c NULL. If set @c NULL then all supported - /// event result value names will be traversed - /// @param [in] callback The callback function to be called for each - /// supported event result value name - /// @param [in] user_data The user data to be passed to the @a callback - /// function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_surveillance_event_result_name_cb - /// @see mv_surveillance_foreach_supported_event_type() - /// @see mv_surveillance_get_result_value() - int mv_surveillance_foreach_event_result_name( - ffi.Pointer event_type, - mv_surveillance_event_result_name_cb callback, - ffi.Pointer user_data, - ) { - return _mv_surveillance_foreach_event_result_name( - event_type, - callback, - user_data, - ); - } - - late final _mv_surveillance_foreach_event_result_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - mv_surveillance_event_result_name_cb, - ffi.Pointer)>>( - 'mv_surveillance_foreach_event_result_name'); - late final _mv_surveillance_foreach_event_result_name = - _mv_surveillance_foreach_event_result_namePtr.asFunction< - int Function(ffi.Pointer, - mv_surveillance_event_result_name_cb, ffi.Pointer)>(); - - /// @brief Gets result value. - /// @details See the output values names in the event types descriptions located - /// in @ref CAPI_MEDIA_VISION_SURVEILLANCE_EVENT_TYPES documentation - /// section. - /// - /// @since_tizen 3.0 - /// @remarks The name can be obtained by - /// @ref mv_surveillance_foreach_event_result_name function - /// @param [in] result The handle to the event result - /// @param [in] name The name of the value to be gotten - /// @param [in, out] value The pointer to variable which will be filled - /// by result value. To find the type of @a value - /// please refer to the - /// @ref CAPI_MEDIA_VISION_SURVEILLANCE_EVENT_TYPES - /// documentation section - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Memory for value has to be allocated - /// - /// @see mv_surveillance_event_trigger_h - /// @see mv_surveillance_event_occurred_cb - /// @see mv_surveillance_subscribe_event_trigger() - /// @see mv_surveillance_unsubscribe_event_trigger() - /// @see mv_surveillance_foreach_supported_event_type() - /// @see mv_surveillance_foreach_event_result_name() - int mv_surveillance_get_result_value( - mv_surveillance_result_h result, - ffi.Pointer name, - ffi.Pointer value, - ) { - return _mv_surveillance_get_result_value( - result, - name, - value, - ); - } - - late final _mv_surveillance_get_result_valuePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_surveillance_result_h, ffi.Pointer, - ffi.Pointer)>>('mv_surveillance_get_result_value'); - late final _mv_surveillance_get_result_value = - _mv_surveillance_get_result_valuePtr.asFunction< - int Function(mv_surveillance_result_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Create metadata - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks You must release @a metadata using metadata_editor_destroy(). - /// - /// @param [in] metadata The handle to metadata - /// @return 0 on success, otherwise a negative error value - /// @retval #METADATA_EDITOR_ERROR_NONE Successful - /// @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Not enough memory is available - /// @see metadata_editor_destroy() - int metadata_editor_create( - ffi.Pointer metadata, - ) { - return _metadata_editor_create( - metadata, - ); - } - - late final _metadata_editor_createPtr = _lookup< - ffi.NativeFunction)>>( - 'metadata_editor_create'); - late final _metadata_editor_create = _metadata_editor_createPtr - .asFunction)>(); - - /// @brief Set file path to read or write metadata - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - /// For example, if you get the specific path by using storage_get_directory(). you should add previlege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. - /// - /// @param [in] metadata The handle to metadata - /// @param [in] path path to read or write metadata - /// @return 0 on success, otherwise a negative error value - /// @retval #METADATA_EDITOR_ERROR_NONE Successful - /// @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EDITOR_ERROR_FILE_EXISTS File not exist - /// @retval #METADATA_EDITOR_ERROR_NOT_SUPPORTED unsupported file type - /// @retval #METADATA_EDITOR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #METADATA_EDITOR_ERROR_OPERATION_FAILED Internal Operation Fail - /// @pre Create metadata handle by calling metadata_editor_create() - /// @see metadata_editor_create(), metadata_editor_destroy() - int metadata_editor_set_path( - metadata_editor_h metadata, - ffi.Pointer path, - ) { - return _metadata_editor_set_path( - metadata, - path, - ); - } - - late final _metadata_editor_set_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(metadata_editor_h, - ffi.Pointer)>>('metadata_editor_set_path'); - late final _metadata_editor_set_path = _metadata_editor_set_pathPtr - .asFunction)>(); - - /// @brief Get the metadata corresponding to the attribute. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks You must release @a value using @c free(). \n - /// If the attribute value of the metadata is empty, return value is NULL. \n - /// In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - /// For example, if you get the specific path by using storage_get_directory(). you should add previlege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. - /// - /// @param [in] metadata The handle to metadata - /// @param [in] attribute key attribute name to get - /// @param [out] value The value of the attribute - /// @return 0 on success, otherwise a negative error value - /// @retval #METADATA_EDITOR_ERROR_NONE Successful - /// @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Not enough memory is available - /// @retval #METADATA_EDITOR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #METADATA_EDITOR_ERROR_OPERATION_FAILED Internal Operation Fail - /// @pre Set path to read or write metadata by calling metadata_editor_set_path() - /// @see metadata_editor_create(), metadata_editor_destroy() - int metadata_editor_get_metadata( - metadata_editor_h metadata, - int attribute, - ffi.Pointer> value, - ) { - return _metadata_editor_get_metadata( - metadata, - attribute, - value, - ); - } - - late final _metadata_editor_get_metadataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(metadata_editor_h, ffi.Int32, - ffi.Pointer>)>>( - 'metadata_editor_get_metadata'); - late final _metadata_editor_get_metadata = - _metadata_editor_get_metadataPtr.asFunction< - int Function( - metadata_editor_h, int, ffi.Pointer>)>(); - - /// @brief Set the attribute of the metadata. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @details This function set the attribute of the metadata for updating the metadata. \n - /// - /// @remarks You must release @a value using @c free(). \n - /// You must call metadata_editor_update_metadata() for applying to the metadata of the media file. if not, you will see the existing metadata when you call metadata_editor_get_metadata(). - /// - /// @param [in] metadata The handle to metadata - /// @param [in] attribute key attribute name to get - /// @param [in] value The value of the attribute - /// @return 0 on success, otherwise a negative error value - /// @retval #METADATA_EDITOR_ERROR_NONE Successful - /// @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Not enough memory is available - /// @retval #METADATA_EDITOR_ERROR_OPERATION_FAILED Internal Operation Fail - /// @pre Set path to read or write metadata by calling metadata_editor_set_path() - /// @see metadata_editor_create(), metadata_editor_update_metadata(), metadata_editor_destroy() - int metadata_editor_set_metadata( - metadata_editor_h metadata, - int attribute, - ffi.Pointer value, - ) { - return _metadata_editor_set_metadata( - metadata, - attribute, - value, - ); - } - - late final _metadata_editor_set_metadataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(metadata_editor_h, ffi.Int32, - ffi.Pointer)>>('metadata_editor_set_metadata'); - late final _metadata_editor_set_metadata = - _metadata_editor_set_metadataPtr.asFunction< - int Function(metadata_editor_h, int, ffi.Pointer)>(); - - /// @brief Update the modified metadata - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @details This function update the metadata in the media file that is modified by metadata_editor_set_metadata(). - /// - /// @remarks In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - /// For example, if you get the specific path by using storage_get_directory(). you should add previlege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. - /// - /// @param [in] metadata The handle to metadata - /// @return 0 on success, otherwise a negative error value - /// @retval #METADATA_EDITOR_ERROR_NONE Successful - /// @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Not enough memory is available - /// @retval #METADATA_EDITOR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #METADATA_EDITOR_ERROR_OPERATION_FAILED Internal Operation Fail - /// @pre Set path to read or write metadata by calling metadata_editor_set_path() - /// @see metadata_editor_create(), metadata_editor_destroy() - int metadata_editor_update_metadata( - metadata_editor_h metadata, - ) { - return _metadata_editor_update_metadata( - metadata, - ); - } - - late final _metadata_editor_update_metadataPtr = - _lookup>( - 'metadata_editor_update_metadata'); - late final _metadata_editor_update_metadata = - _metadata_editor_update_metadataPtr - .asFunction(); - - /// @brief Get the picture in the media file - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks You must release @a picture using @c free(). \n - /// In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - /// For example, if you get the specific path by using storage_get_directory(). you should add previlege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. - /// - /// @param [in] metadata The handle to metadata - /// @param [in] index picture order - /// @param [out] picture encoded picture - /// @param [out] size encoded picture size - /// @param [out] mime_type the mime type of picture - /// @return 0 on success, otherwise a negative error value - /// @retval #METADATA_EDITOR_ERROR_NONE Successful - /// @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Not enough memory is available - /// @retval #METADATA_EDITOR_ERROR_OPERATION_FAILED Internal Operation Fail - /// @retval #METADATA_EDITOR_ERROR_PERMISSION_DENIED Permission denied - /// @pre Set path to read or write metadata by calling metadata_editor_set_path() - /// @see metadata_editor_create(), metadata_editor_destroy() - int metadata_editor_get_picture( - metadata_editor_h metadata, - int index, - ffi.Pointer> picture, - ffi.Pointer size, - ffi.Pointer> mime_type, - ) { - return _metadata_editor_get_picture( - metadata, - index, - picture, - size, - mime_type, - ); - } - - late final _metadata_editor_get_picturePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - metadata_editor_h, - ffi.Int, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>)>>( - 'metadata_editor_get_picture'); - late final _metadata_editor_get_picture = - _metadata_editor_get_picturePtr.asFunction< - int Function( - metadata_editor_h, - int, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Append the picture to the media file - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks You must call metadata_editor_update_metadata() for applying to the metadata of the media file. if not, you will see the existing metadata when you call metadata_editor_get_metadata(). \n - /// Image type of the metadata supports jpeg and png. \n - /// In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - /// For example, if you get the specific path by using storage_get_directory(). you should add previlege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. - /// - /// @param [in] metadata The handle to metadata - /// @param [in] picture_path The path of picture for adding to the metadata - /// @return 0 on success, otherwise a negative error value - /// @retval #METADATA_EDITOR_ERROR_NONE Successful - /// @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Not enough memory is available - /// @retval #METADATA_EDITOR_ERROR_NOT_SUPPORTED unsupported file type - /// @retval #METADATA_EDITOR_ERROR_OPERATION_FAILED Internal Operation Fail - /// @retval #METADATA_EDITOR_ERROR_PERMISSION_DENIED Permission denied - /// @pre Set path to read or write metadata by calling metadata_editor_set_path() - /// @see metadata_editor_create(), metadata_editor_destroy() - int metadata_editor_append_picture( - metadata_editor_h metadata, - ffi.Pointer picture_path, - ) { - return _metadata_editor_append_picture( - metadata, - picture_path, - ); - } - - late final _metadata_editor_append_picturePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(metadata_editor_h, - ffi.Pointer)>>('metadata_editor_append_picture'); - late final _metadata_editor_append_picture = - _metadata_editor_append_picturePtr - .asFunction)>(); - - /// @brief Remove artwork image from media file - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks You must call metadata_editor_update_metadata() for applying to the metadata of the media file. if not, you will see the existing metadata when you call metadata_editor_get_metadata(). \n - /// - /// @param [in] metadata The handle to metadata - /// @param [in] index artwork image order - /// @return 0 on success, otherwise a negative error value - /// @retval #METADATA_EDITOR_ERROR_NONE Successful - /// @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Not enough memory is available - /// @retval #METADATA_EDITOR_ERROR_OPERATION_FAILED Internal Operation Fail - /// @retval #METADATA_EDITOR_ERROR_PERMISSION_DENIED Permission denied - /// @pre Set path to read or write metadata by calling metadata_editor_set_path() - /// @see metadata_editor_create(), metadata_editor_destroy() - int metadata_editor_remove_picture( - metadata_editor_h metadata, - int index, - ) { - return _metadata_editor_remove_picture( - metadata, - index, - ); - } - - late final _metadata_editor_remove_picturePtr = - _lookup>( - 'metadata_editor_remove_picture'); - late final _metadata_editor_remove_picture = - _metadata_editor_remove_picturePtr - .asFunction(); - - /// @brief Destroy metadata - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param [in] metadata The handle to metadata - /// @return 0 on success, otherwise a negative error value - /// @retval #METADATA_EDITOR_ERROR_NONE Successful - /// @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EDITOR_ERROR_OPERATION_FAILED Internal Operation Fail - /// @pre Create metadata handle by calling metadata_editor_create() - /// @see metadata_editor_create() - int metadata_editor_destroy( - metadata_editor_h metadata, - ) { - return _metadata_editor_destroy( - metadata, - ); - } - - late final _metadata_editor_destroyPtr = - _lookup>( - 'metadata_editor_destroy'); - late final _metadata_editor_destroy = - _metadata_editor_destroyPtr.asFunction(); - - /// @brief Creates metadata. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a metadata using metadata_extractor_destroy(). - /// - /// @param[in] metadata The handle to metadata - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #METADATA_EXTRACTOR_ERROR_NONE Successful - /// @retval #METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EXTRACTOR_ERROR_OUT_OF_MEMORY Not enough memory is available - /// @retval #METADATA_EXTRACTOR_ERROR_PERMISSION_DENIED Permission denied - /// - /// @see metadata_extractor_destroy() - int metadata_extractor_create( - ffi.Pointer metadata, - ) { - return _metadata_extractor_create( - metadata, - ); - } - - late final _metadata_extractor_createPtr = _lookup< - ffi - .NativeFunction)>>( - 'metadata_extractor_create'); - late final _metadata_extractor_create = _metadata_extractor_createPtr - .asFunction)>(); - - /// @brief Sets the file path to extract. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param [in] metadata The handle to metadata - /// @param [in] path The path to extract metadata - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #METADATA_EXTRACTOR_ERROR_NONE Successful - /// @retval #METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EXTRACTOR_ERROR_FILE_EXISTS File does not exist - /// @retval #METADATA_EXTRACTOR_ERROR_OPERATION_FAILED Internal operation failed - /// @retval #METADATA_EXTRACTOR_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Create a metadata handle by calling metadata_extractor_create(). - /// @see metadata_extractor_create() - /// @see metadata_extractor_destroy() - int metadata_extractor_set_path( - metadata_extractor_h metadata, - ffi.Pointer path, - ) { - return _metadata_extractor_set_path( - metadata, - path, - ); - } - - late final _metadata_extractor_set_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(metadata_extractor_h, - ffi.Pointer)>>('metadata_extractor_set_path'); - late final _metadata_extractor_set_path = _metadata_extractor_set_pathPtr - .asFunction)>(); - - /// @brief Sets the buffer to extract. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param [in] metadata The handle to metadata - /// @param [in] buffer The buffer to extract metadata - /// @param [in] size The buffer size - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #METADATA_EXTRACTOR_ERROR_NONE Successful - /// @retval #METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EXTRACTOR_ERROR_OPERATION_FAILED Internal operation failed - /// @retval #METADATA_EXTRACTOR_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Create a metadata handle by calling metadata_extractor_create(). - /// @see metadata_extractor_create() - /// @see metadata_extractor_destroy() - int metadata_extractor_set_buffer( - metadata_extractor_h metadata, - ffi.Pointer buffer, - int size, - ) { - return _metadata_extractor_set_buffer( - metadata, - buffer, - size, - ); - } - - late final _metadata_extractor_set_bufferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(metadata_extractor_h, ffi.Pointer, - ffi.Int)>>('metadata_extractor_set_buffer'); - late final _metadata_extractor_set_buffer = - _metadata_extractor_set_bufferPtr.asFunction< - int Function(metadata_extractor_h, ffi.Pointer, int)>(); - - /// @brief Destroys metadata. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param [in] metadata The handle to metadata - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #METADATA_EXTRACTOR_ERROR_NONE Successful - /// @retval #METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EXTRACTOR_ERROR_OPERATION_FAILED Internal operation failed - /// @retval #METADATA_EXTRACTOR_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Create a metadata handle by calling metadata_extractor_create(). - /// @see metadata_extractor_create() - int metadata_extractor_destroy( - metadata_extractor_h metadata, - ) { - return _metadata_extractor_destroy( - metadata, - ); - } - - late final _metadata_extractor_destroyPtr = - _lookup>( - 'metadata_extractor_destroy'); - late final _metadata_extractor_destroy = _metadata_extractor_destroyPtr - .asFunction(); - - /// @brief Gets metadata. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a value using @c free(). \n - /// In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - /// For example, if you get the specific path by using storage_get_directory(). you should add previlege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. - /// - /// @param[in] metadata The handle to metadata - /// @param[in] attribute The key attribute name to get - /// @param[out] value The value of the attribute - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #METADATA_EXTRACTOR_ERROR_NONE Successful - /// @retval #METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EXTRACTOR_ERROR_OUT_OF_MEMORY Not enough memory is available - /// @retval #METADATA_EXTRACTOR_ERROR_OPERATION_FAILED Internal operation failed - /// @retval #METADATA_EXTRACTOR_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Set the path to extract by calling metadata_extractor_set_path(). - /// @see metadata_extractor_create() - /// @see metadata_extractor_destroy() - int metadata_extractor_get_metadata( - metadata_extractor_h metadata, - int attribute, - ffi.Pointer> value, - ) { - return _metadata_extractor_get_metadata( - metadata, - attribute, - value, - ); - } - - late final _metadata_extractor_get_metadataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(metadata_extractor_h, ffi.Int32, - ffi.Pointer>)>>( - 'metadata_extractor_get_metadata'); - late final _metadata_extractor_get_metadata = - _metadata_extractor_get_metadataPtr.asFunction< - int Function( - metadata_extractor_h, int, ffi.Pointer>)>(); - - /// @brief Gets the artwork image in a media file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a artwork and @a artwork_mime using @c free(). \n - /// In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - /// For example, if you get the specific path by using storage_get_directory(). you should add previlege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. - /// - /// @param[in] metadata The handle to metadata - /// @param[out] artwork The encoded artwork image - /// @param[out] size The encoded artwork size - /// @param[out] mime_type The mime type of artwork - /// @return @c 0 on success, otherwise a negative error value - /// - /// @retval #METADATA_EXTRACTOR_ERROR_NONE Successful - /// @retval #METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EXTRACTOR_ERROR_OUT_OF_MEMORY Not enough memory is available - /// @retval #METADATA_EXTRACTOR_ERROR_OPERATION_FAILED Internal operation failed - /// @retval #METADATA_EXTRACTOR_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Set the path to extract by calling metadata_extractor_set_path(). - /// @see metadata_extractor_create() - /// @see metadata_extractor_destroy() - int metadata_extractor_get_artwork( - metadata_extractor_h metadata, - ffi.Pointer> artwork, - ffi.Pointer size, - ffi.Pointer> mime_type, - ) { - return _metadata_extractor_get_artwork( - metadata, - artwork, - size, - mime_type, - ); - } - - late final _metadata_extractor_get_artworkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - metadata_extractor_h, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>)>>( - 'metadata_extractor_get_artwork'); - late final _metadata_extractor_get_artwork = - _metadata_extractor_get_artworkPtr.asFunction< - int Function(metadata_extractor_h, ffi.Pointer>, - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Gets the frame of a video media file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a frame using @c free(). - /// In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - /// For example, if you get the specific path by using storage_get_directory(). you should add previlege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. - /// - /// @param[in] metadata The handle to metadata - /// @param[out] frame The raw frame data in RGB888 - /// @param[out] size The frame data size - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #METADATA_EXTRACTOR_ERROR_NONE Successful - /// @retval #METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EXTRACTOR_ERROR_OUT_OF_MEMORY Not enough memory is available - /// @retval #METADATA_EXTRACTOR_ERROR_OPERATION_FAILED Internal operation failed - /// @retval #METADATA_EXTRACTOR_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Set the path to extract by calling metadata_extractor_set_path(). - /// @see metadata_extractor_create() - /// @see metadata_extractor_destroy() - int metadata_extractor_get_frame( - metadata_extractor_h metadata, - ffi.Pointer> frame, - ffi.Pointer size, - ) { - return _metadata_extractor_get_frame( - metadata, - frame, - size, - ); - } - - late final _metadata_extractor_get_framePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - metadata_extractor_h, - ffi.Pointer>, - ffi.Pointer)>>('metadata_extractor_get_frame'); - late final _metadata_extractor_get_frame = - _metadata_extractor_get_framePtr.asFunction< - int Function(metadata_extractor_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Gets the synclyrics of a media file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a lyrics using @c free(). - /// In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - /// For example, if you get the specific path by using storage_get_directory(). you should add previlege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. - /// - /// @param[in] metadata The handle to metadata - /// @param[in] index The index of time/lyrics to set - /// @param[out] time_stamp The time information of the index - /// @param[out] lyrics The lyrics of the index - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #METADATA_EXTRACTOR_ERROR_NONE Successful - /// @retval #METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EXTRACTOR_ERROR_OPERATION_FAILED Internal operation failed - /// @retval #METADATA_EXTRACTOR_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Set the path to extract by calling metadata_extractor_set_path(). - /// @pre Get the time/lyrics set number by calling metadata_extractor_get_metadata(METADATA_SYNCLYRICS_NUM). - /// @see metadata_extractor_create() - /// @see metadata_extractor_destroy() - int metadata_extractor_get_synclyrics( - metadata_extractor_h metadata, - int index, - ffi.Pointer time_stamp, - ffi.Pointer> lyrics, - ) { - return _metadata_extractor_get_synclyrics( - metadata, - index, - time_stamp, - lyrics, - ); - } - - late final _metadata_extractor_get_synclyricsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - metadata_extractor_h, - ffi.Int, - ffi.Pointer, - ffi.Pointer>)>>( - 'metadata_extractor_get_synclyrics'); - late final _metadata_extractor_get_synclyrics = - _metadata_extractor_get_synclyricsPtr.asFunction< - int Function(metadata_extractor_h, int, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets the frame of a video media. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release @a frame using @c free(). - /// In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - /// For example, if you get the specific path by using storage_get_directory(). you should add previlege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. - /// - /// @param[in] metadata The handle to metadata - /// @param[in] timestamp The timestamp in milliseconds - /// @param[in] is_accurate If @c true the user can get an accurate frame for the given timestamp,\n - /// otherwise @c false if the user can only get the nearest i-frame of the video rapidly - /// @param[out] frame The raw frame data in RGB888 - /// @param[out] size The frame data size - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #METADATA_EXTRACTOR_ERROR_NONE Successful - /// @retval #METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EXTRACTOR_ERROR_OUT_OF_MEMORY Not enough memory is available - /// @retval #METADATA_EXTRACTOR_ERROR_OPERATION_FAILED Internal operation failed - /// @retval #METADATA_EXTRACTOR_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Set the path to extract by calling metadata_extractor_set_path(). - /// @see metadata_extractor_create() - /// @see metadata_extractor_destroy() - int metadata_extractor_get_frame_at_time( - metadata_extractor_h metadata, - int timestamp, - bool is_accurate, - ffi.Pointer> frame, - ffi.Pointer size, - ) { - return _metadata_extractor_get_frame_at_time( - metadata, - timestamp, - is_accurate, - frame, - size, - ); - } - - late final _metadata_extractor_get_frame_at_timePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - metadata_extractor_h, - ffi.UnsignedLong, - ffi.Bool, - ffi.Pointer>, - ffi.Pointer)>>('metadata_extractor_get_frame_at_time'); - late final _metadata_extractor_get_frame_at_time = - _metadata_extractor_get_frame_at_timePtr.asFunction< - int Function(metadata_extractor_h, int, bool, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Creates a player handle for playing multimedia content. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks You must release @a player by using player_destroy().\n - /// Although you can create multiple player handles at the same time, - /// the player cannot guarantee proper operation because of limited resources, such as - /// audio or display device. - /// - /// @param[out] player A new handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_RESOURCE_LIMIT Cannot create more instance due to resource(socket, thread, etc) limitation on system. - /// @post The player state will be #PLAYER_STATE_IDLE. - /// @see player_destroy() - int player_create( - ffi.Pointer player, - ) { - return _player_create( - player, - ); - } - - late final _player_createPtr = - _lookup)>>( - 'player_create'); - late final _player_create = - _player_createPtr.asFunction)>(); - - /// @brief Destroys the media player handle and releases all its resources. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks To completely shutdown player operation, call this function with a valid player handle from any player state. - /// @param[in] player The handle to the media player to be destroyed - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @post The player state will be #PLAYER_STATE_NONE. - /// @see player_create() - int player_destroy( - player_h player, - ) { - return _player_destroy( - player, - ); - } - - late final _player_destroyPtr = - _lookup>('player_destroy'); - late final _player_destroy = - _player_destroyPtr.asFunction(); - - /// @brief Prepares the media player for playback. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks The mediastorage privilege(http://tizen.org/privilege/mediastorage) must be added if any video/audio files are used to play located in the internal storage. - /// @remarks The externalstorage privilege(http://tizen.org/privilege/externalstorage) must be added if any video/audio files are used to play located in the external storage. - /// @remarks The internet privilege(http://tizen.org/privilege/internet) must be added if any URLs are used to play from network. - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_URI Invalid URI - /// @retval #PLAYER_ERROR_NO_SUCH_FILE File not found - /// @retval #PLAYER_ERROR_NOT_SUPPORTED_FILE File not supported - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PLAYER_ERROR_NOT_SUPPORTED_AUDIO_CODEC Not support audio codec format (Since 4.0) - /// @retval #PLAYER_ERROR_NOT_SUPPORTED_VIDEO_CODEC Not support video codec format (Since 4.0) - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). After that, call player_set_uri() to load the media content you want to play. - /// @post The player state will be #PLAYER_STATE_READY. - /// @see player_prepare_async() - /// @see player_unprepare() - /// @see player_set_uri() - int player_prepare( - player_h player, - ) { - return _player_prepare( - player, - ); - } - - late final _player_preparePtr = - _lookup>('player_prepare'); - late final _player_prepare = - _player_preparePtr.asFunction(); - - /// @brief Prepares the media player for playback, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks The mediastorage privilege(http://tizen.org/privilege/mediastorage) must be added if any video/audio files are used to play located in the internal storage. - /// @remarks The externalstorage privilege(http://tizen.org/privilege/externalstorage) must be added if any video/audio files are used to play located in the external storage. - /// @remarks The internet privilege(http://tizen.org/privilege/internet) must be added if any URLs are used to play from network. - /// @param[in] player The handle to the media player - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_URI Invalid URI - /// @retval #PLAYER_ERROR_NO_SUCH_FILE File not found - /// @retval #PLAYER_ERROR_NOT_SUPPORTED_FILE File not supported - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_PERMISSION_DENIED Permission denied - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). After that, call player_set_uri() to load the media content you want to play. - /// @post It invokes player_prepared_cb() when playback is prepared. - /// @see player_prepare() - /// @see player_prepared_cb() - /// @see player_unprepare() - /// @see player_set_uri() - int player_prepare_async( - player_h player, - player_prepared_cb callback, - ffi.Pointer user_data, - ) { - return _player_prepare_async( - player, - callback, - user_data, - ); - } - - late final _player_prepare_asyncPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, player_prepared_cb, - ffi.Pointer)>>('player_prepare_async'); - late final _player_prepare_async = _player_prepare_asyncPtr.asFunction< - int Function(player_h, player_prepared_cb, ffi.Pointer)>(); - - /// @brief Resets the media player. - /// @details The most recently used media is reset and no longer associated with the player. - /// Playback is no longer possible. If you want to use the player again, you must set the data URI and call - /// player_prepare() again. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be higher than #PLAYER_STATE_IDLE. - /// @post The player state will be #PLAYER_STATE_IDLE. - /// @see player_prepare() - int player_unprepare( - player_h player, - ) { - return _player_unprepare( - player, - ); - } - - late final _player_unpreparePtr = - _lookup>( - 'player_unprepare'); - late final _player_unprepare = - _player_unpreparePtr.asFunction(); - - /// @brief Sets the data source (file-path, HTTP or RTSP URI) to use. - /// - /// @details Associates media contents, referred to by the URI, with the player. - /// If the function call is successful, subsequent calls to player_prepare() and player_start() will start playing the media. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks If you use HTTP or RTSP, URI must start with "http://" or "rtsp://". The default protocol is "file://". - /// If you provide an invalid URI, you won't receive an error message until you call player_start(). - /// @remarks This API must be called before calling the player_prepare() or player_prepare_async() to build the player based on the uri information. - /// @remarks The mediastorage privilege(http://tizen.org/privilege/mediastorage) must be added if any video/audio files are used to play located in the internal storage. - /// @remarks The externalstorage privilege(http://tizen.org/privilege/externalstorage) must be added if any video/audio files are used to play located in the external storage. - /// @remarks The internet privilege(http://tizen.org/privilege/internet) must be added if any URLs are used to play from network. - /// - /// @param[in] player The handle to the media player - /// @param[in] uri The content location, such as the file path, the URI of the HTTP or RTSP stream you want to play - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_PERMISSION_DENIED Permission denied - /// @if WEARABLE @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature @endif - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). - /// @see player_set_memory_buffer() - int player_set_uri( - player_h player, - ffi.Pointer uri, - ) { - return _player_set_uri( - player, - uri, - ); - } - - late final _player_set_uriPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer)>>('player_set_uri'); - late final _player_set_uri = _player_set_uriPtr - .asFunction)>(); - - /// @brief Sets memory as the data source. - /// - /// @details Associates media content, cached in memory, with the player. Unlike the case of player_set_uri(), the media resides in memory. - /// If the function call is successful, subsequent calls to player_prepare() and player_start() will start playing the media. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks If you provide an invalid data, you won't receive an error message until you call player_start(). - /// @remarks This API must be called before calling the player_prepare() or player_prepare_async() - /// to build the player based on the data. - /// - /// @param[in] player The handle to the media player - /// @param[in] data The memory pointer of media data - /// @param[in] size The size of media data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). - /// @see player_set_uri() - int player_set_memory_buffer( - player_h player, - ffi.Pointer data, - int size, - ) { - return _player_set_memory_buffer( - player, - data, - size, - ); - } - - late final _player_set_memory_bufferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer, - ffi.Int)>>('player_set_memory_buffer'); - late final _player_set_memory_buffer = _player_set_memory_bufferPtr - .asFunction, int)>(); - - /// @brief Gets the player's current state. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[out] state The current state of the player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see #player_state_e - int player_get_state( - player_h player, - ffi.Pointer state, - ) { - return _player_get_state( - player, - state, - ); - } - - late final _player_get_statePtr = _lookup< - ffi - .NativeFunction)>>( - 'player_get_state'); - late final _player_get_state = _player_get_statePtr - .asFunction)>(); - - /// @brief Sets the player's volume. - /// @details Setting this volume adjusts the player's instance volume, not the system volume. - /// The valid range is from 0 to 1.0, inclusive (1.0 = 100%). Default value is 1.0. - /// To change system volume, use the @ref CAPI_MEDIA_SOUND_MANAGER_MODULE API. - /// Finally, it does not support to set other value into each channel currently. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[in] left The left volume scalar - /// @param[in] right The right volume scalar - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_get_volume() - int player_set_volume( - player_h player, - double left, - double right, - ) { - return _player_set_volume( - player, - left, - right, - ); - } - - late final _player_set_volumePtr = _lookup< - ffi.NativeFunction>( - 'player_set_volume'); - late final _player_set_volume = _player_set_volumePtr - .asFunction(); - - /// @brief Gets the player's current volume factor. - /// @details The range of @a left and @a right is from @c 0 to @c 1.0, inclusive (1.0 = 100%). - /// This function gets the player volume, not the system volume. - /// To get the system volume, use the @ref CAPI_MEDIA_SOUND_MANAGER_MODULE API. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[out] left The current left volume scalar - /// @param[out] right The current right volume scalar - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_set_volume() - int player_get_volume( - player_h player, - ffi.Pointer left, - ffi.Pointer right, - ) { - return _player_get_volume( - player, - left, - right, - ); - } - - late final _player_get_volumePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer, - ffi.Pointer)>>('player_get_volume'); - late final _player_get_volume = _player_get_volumePtr.asFunction< - int Function(player_h, ffi.Pointer, ffi.Pointer)>(); - - /// @deprecated Deprecated since 3.0. Use player_set_sound_stream_info() instead. - /// @brief Sets the player's volume type. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks The default sound type of the player is #SOUND_TYPE_MEDIA. - /// To get the current sound type, use sound_manager_get_current_sound_type(). - /// @remarks If stream_info already exists by calling sound_manager_create_stream_info(), - /// It will return error since 3.0. - /// - /// @param[in] player The handle to the media player - /// @param[in] type The sound type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_SOUND_POLICY Sound policy error - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create(). - /// @see sound_manager_get_current_sound_type() - int player_set_sound_type( - player_h player, - int type, - ) { - return _player_set_sound_type( - player, - type, - ); - } - - late final _player_set_sound_typePtr = - _lookup>( - 'player_set_sound_type'); - late final _player_set_sound_type = - _player_set_sound_typePtr.asFunction(); - - /// @brief Sets the player's sound manager stream information. - /// @since_tizen 3.0 - /// @remarks You can set sound stream information including audio routing and volume type. - /// For more details, please refer to sound_manager.h - /// @remarks This API must be called before calling the player_prepare() or player_prepare_async() - /// to reflect the sound stream information when the player is building. - /// @remarks This function is related to the following feature:\n - /// %http://tizen.org/feature/multimedia.player.stream_info\n - /// If this feature is not supported, the stream_type of the player is fixed to the #SOUND_STREAM_TYPE_MEDIA. - /// @param[in] player The handle to the media player - /// @param[in] stream_info The sound manager info type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create(). - /// @see #sound_stream_info_h - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - /// @par Example - /// @code - /// #include - /// #include - /// ... - /// player_h player = NULL; - /// sound_stream_info_h stream_info = NULL; - /// sound_stream_type_e stream_type = SOUND_STREAM_TYPE_MEDIA; - /// ... - /// sound_manager_create_stream_information (stream_type, _focus_callback, use_data, &stream_info); - /// player_create (&player); - /// player_set_sound_stream_info (player, stream_info); - /// ... - /// player_prepare_async (player, _prepared_cb, udata); - /// ... - /// @endcode - int player_set_sound_stream_info( - player_h player, - sound_stream_info_h stream_info, - ) { - return _player_set_sound_stream_info( - player, - stream_info, - ); - } - - late final _player_set_sound_stream_infoPtr = _lookup< - ffi.NativeFunction>( - 'player_set_sound_stream_info'); - late final _player_set_sound_stream_info = _player_set_sound_stream_infoPtr - .asFunction(); - - /// @brief Sets the audio latency mode. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks The default audio latency mode of the player is #AUDIO_LATENCY_MODE_MID. - /// To get the current audio latency mode, use player_get_audio_latency_mode(). - /// If it's high mode, audio output interval can be increased so, it can keep more audio data to play. - /// But, state transition like pause or resume can be more slower than default(mid) mode. - /// - /// @param[in] player The handle to the media player - /// @param[in] latency_mode The latency mode to be applied to the audio - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see #audio_latency_mode_e - /// @see player_get_audio_latency_mode() - int player_set_audio_latency_mode( - player_h player, - int latency_mode, - ) { - return _player_set_audio_latency_mode( - player, - latency_mode, - ); - } - - late final _player_set_audio_latency_modePtr = - _lookup>( - 'player_set_audio_latency_mode'); - late final _player_set_audio_latency_mode = _player_set_audio_latency_modePtr - .asFunction(); - - /// @brief Gets the current audio latency mode. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[out] latency_mode The latency mode to get from the audio - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see #audio_latency_mode_e - /// @see player_set_audio_latency_mode() - int player_get_audio_latency_mode( - player_h player, - ffi.Pointer latency_mode, - ) { - return _player_get_audio_latency_mode( - player, - latency_mode, - ); - } - - late final _player_get_audio_latency_modePtr = _lookup< - ffi - .NativeFunction)>>( - 'player_get_audio_latency_mode'); - late final _player_get_audio_latency_mode = _player_get_audio_latency_modePtr - .asFunction)>(); - - /// @brief Starts or resumes playback. - /// @details Plays current media content, or resumes play if paused. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks Sound can be mixed with other sounds if you don't control the stream focus in sound-manager module since 3.0.\n - /// You can refer to @ref CAPI_MEDIA_SOUND_MANAGER_MODULE. - /// @remarks Even if you don't set visible to true by calling player_set_display_visible, the video will be shown on #PLAYER_STATE_PLAYING state. - /// - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_CONNECTION_FAILED Network connection failed - /// @retval #PLAYER_ERROR_SOUND_POLICY Sound policy error - /// @pre player_prepare() must be called before calling this function. - /// @pre The player state must be set to #PLAYER_STATE_READY by calling player_prepare() or set to #PLAYER_STATE_PAUSED by calling player_pause(). - /// @post The player state will be #PLAYER_STATE_PLAYING. - /// @post It invokes player_completed_cb() when playback completes, if you set a callback with player_set_completed_cb(). - /// @post It invokes player_pd_message_cb() when progressive download starts or completes, if you set a download path with player_set_progressive_download_path() and a callback with player_set_progressive_download_message_cb(). - /// @see player_prepare() - /// @see player_prepare_async() - /// @see player_stop() - /// @see player_pause() - /// @see player_set_completed_cb() - /// @see player_completed_cb() - /// @see player_set_progressive_download_path() - /// @see player_set_progressive_download_message_cb() - /// @see player_pd_message_cb() - /// @see player_set_display_visible() - int player_start( - player_h player, - ) { - return _player_start( - player, - ); - } - - late final _player_startPtr = - _lookup>('player_start'); - late final _player_start = - _player_startPtr.asFunction(); - - /// @brief Stops playing media content. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid state - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_SOUND_POLICY Sound policy error - /// @pre The player state must be set to #PLAYER_STATE_PLAYING by calling player_start() or set to #PLAYER_STATE_PAUSED by calling player_pause(). - /// @post The player state will be #PLAYER_STATE_READY. - /// @post The downloading will be aborted if you use progressive download. - /// @see player_start() - /// @see player_pause() - int player_stop( - player_h player, - ) { - return _player_stop( - player, - ); - } - - late final _player_stopPtr = - _lookup>('player_stop'); - late final _player_stop = - _player_stopPtr.asFunction(); - - /// @brief Pauses the player. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks You can resume playback using player_start(). - /// - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid state - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_SOUND_POLICY Sound policy error - /// @pre The player state must be set to #PLAYER_STATE_PLAYING. - /// @post The player state will be #PLAYER_STATE_READY. - /// @see player_start() - int player_pause( - player_h player, - ) { - return _player_pause( - player, - ); - } - - late final _player_pausePtr = - _lookup>('player_pause'); - late final _player_pause = - _player_pausePtr.asFunction(); - - /// @brief Sets the seek position for playback, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks This api will trigger the seeking operation on player instance. - /// Normally application need to wait for player_seek_completed_cb() before calling it again. - /// Otherwise it will return PLAYER_ERROR_SEEK_FAILED. - /// Please note that if application is playing external media data via player_set_media_stream_info(), - /// then consecutive calling of this api will always success and no need to wait for player_seek_completed_cb() - /// before next calling of this api.(since_tizen 3.0) - /// @remarks Even if you don't set visible to true by calling player_set_display_visible, - /// the video will be shown when the _seek_completed cb is invoked. - /// @remarks In case of non-seekable content, it will return PLAYER_ERROR_INVALID_OPERATION. - /// If application ignore this error, player will keep playing without changing play position. - /// @param[in] player The handle to the media player - /// @param[in] millisecond The position in milliseconds from the start to the seek point - /// @param[in] accurate If @c true the selected position is returned, but this might be considerably slow, - /// if @c false the nearest key frame position is returned, but this might be faster but less accurate. - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_SEEK_FAILED Seek operation failure - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @post It invokes player_seek_completed_cb() when seek operation completes, if you set a callback. - /// @see player_get_play_position() - int player_set_play_position( - player_h player, - int millisecond, - bool accurate, - player_seek_completed_cb callback, - ffi.Pointer user_data, - ) { - return _player_set_play_position( - player, - millisecond, - accurate, - callback, - user_data, - ); - } - - late final _player_set_play_positionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - player_h, - ffi.Int, - ffi.Bool, - player_seek_completed_cb, - ffi.Pointer)>>('player_set_play_position'); - late final _player_set_play_position = - _player_set_play_positionPtr.asFunction< - int Function(player_h, int, bool, player_seek_completed_cb, - ffi.Pointer)>(); - - /// @brief Gets the current position in milliseconds. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[out] millisecond The current position in milliseconds - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_SEEK_FAILED Seek operation failure - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see player_set_play_position() - int player_get_play_position( - player_h player, - ffi.Pointer millisecond, - ) { - return _player_get_play_position( - player, - millisecond, - ); - } - - late final _player_get_play_positionPtr = _lookup< - ffi.NativeFunction)>>( - 'player_get_play_position'); - late final _player_get_play_position = _player_get_play_positionPtr - .asFunction)>(); - - /// @brief Sets the player's mute status. - /// @details If the mute status is @c true, no sounds are played. - /// If it is @c false, sounds are played at the previously set volume level. - /// Until this function is called, by default the player is not muted. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[in] muted The new mute status: (@c true = mute, @c false = not muted) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see player_is_muted() - int player_set_mute( - player_h player, - bool muted, - ) { - return _player_set_mute( - player, - muted, - ); - } - - late final _player_set_mutePtr = - _lookup>( - 'player_set_mute'); - late final _player_set_mute = - _player_set_mutePtr.asFunction(); - - /// @brief Gets the player's mute status. - /// @details If the mute status is @c true, no sounds are played. - /// If it is @c false, sounds are played at the previously set volume level. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[out] muted The current mute status: (@c true = mute, @c false = not muted) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see player_set_mute() - int player_is_muted( - player_h player, - ffi.Pointer muted, - ) { - return _player_is_muted( - player, - muted, - ); - } - - late final _player_is_mutedPtr = _lookup< - ffi - .NativeFunction)>>( - 'player_is_muted'); - late final _player_is_muted = _player_is_mutedPtr - .asFunction)>(); - - /// @brief Sets the player's looping status. - /// @details If the looping status is @c true, playback automatically restarts upon finishing. - /// If it is @c false, it won't. The default value is @c false. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[in] looping The new looping status: (@c true = looping, @c false = non-looping ) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see player_is_looping() - int player_set_looping( - player_h player, - bool looping, - ) { - return _player_set_looping( - player, - looping, - ); - } - - late final _player_set_loopingPtr = - _lookup>( - 'player_set_looping'); - late final _player_set_looping = - _player_set_loopingPtr.asFunction(); - - /// @brief Gets the player's looping status. - /// @details If the looping status is @c true, playback automatically restarts upon finishing. - /// If it is @c false, it won't. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[out] looping The looping status: (@c true = looping, @c false = non-looping ) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see player_set_looping() - int player_is_looping( - player_h player, - ffi.Pointer looping, - ) { - return _player_is_looping( - player, - looping, - ); - } - - late final _player_is_loopingPtr = _lookup< - ffi - .NativeFunction)>>( - 'player_is_looping'); - late final _player_is_looping = _player_is_loopingPtr - .asFunction)>(); - - /// @brief Sets the video display. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks To get @a display to set, use #GET_DISPLAY(). - /// @remarks We are not supporting changing display. - /// @remarks This API have be called before calling the player_prepare() or player_prepare_async() \n - /// to reflect the display type. - /// @param[in] player The handle to the media player - /// @param[in] type The display type - /// @param[in] display The handle to display - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). - /// @see #player_display_type_e - /// @see player_set_display_mode - /// @see player_set_display_roi_area - /// @see player_set_display_visible - /// @see player_set_display_rotation - int player_set_display( - player_h player, - int type, - player_display_h display, - ) { - return _player_set_display( - player, - type, - display, - ); - } - - late final _player_set_displayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - player_h, ffi.Int32, player_display_h)>>('player_set_display'); - late final _player_set_display = _player_set_displayPtr - .asFunction(); - - /// @brief Registers a media packet video callback function to be called once per frame. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks This function must be called before calling player_prepare() or player_prepare_async().\n - /// A registered callback is called in a separate thread (not in the main loop).\n - /// A video frame can be retrieved using a registered callback as a media packet.\n - /// The callback function holds the same buffer that will be drawn on the display device.\n - /// So if you change the media packet in a registered callback, it will be displayed on the device\n - /// and the media packet is available until it's destroyed by media_packet_destroy().\n - /// The packet have to be destroyed as quickly as possible after rendering the packet\n - /// and all the packets have to be destroyed before player_unprepare() is called.\n - /// @param[in] player The handle to the media player - /// @param[in] callback The callback function to be registered - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid state - /// @pre The player's state must be #PLAYER_STATE_IDLE. And, #PLAYER_DISPLAY_TYPE_NONE must be set by calling player_set_display(). - /// @see player_unset_media_packet_video_frame_decoded_cb - int player_set_media_packet_video_frame_decoded_cb( - player_h player, - player_media_packet_video_decoded_cb callback, - ffi.Pointer user_data, - ) { - return _player_set_media_packet_video_frame_decoded_cb( - player, - callback, - user_data, - ); - } - - late final _player_set_media_packet_video_frame_decoded_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, player_media_packet_video_decoded_cb, - ffi.Pointer)>>( - 'player_set_media_packet_video_frame_decoded_cb'); - late final _player_set_media_packet_video_frame_decoded_cb = - _player_set_media_packet_video_frame_decoded_cbPtr.asFunction< - int Function(player_h, player_media_packet_video_decoded_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The player's state must be #PLAYER_STATE_READY or #PLAYER_STATE_IDLE - /// @see player_set_media_packet_video_frame_decoded_cb() - int player_unset_media_packet_video_frame_decoded_cb( - player_h player, - ) { - return _player_unset_media_packet_video_frame_decoded_cb( - player, - ); - } - - late final _player_unset_media_packet_video_frame_decoded_cbPtr = - _lookup>( - 'player_unset_media_packet_video_frame_decoded_cb'); - late final _player_unset_media_packet_video_frame_decoded_cb = - _player_unset_media_packet_video_frame_decoded_cbPtr - .asFunction(); - - /// @brief Pushes elementary stream to decode audio or video - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @remarks player_set_media_stream_info() must be called before using this API. - /// @remarks The available buffer size can be set by calling player_set_media_stream_buffer_max_size() API. - /// If there is no available buffer space, this api will return error since 3.0. - /// @param[in] player The handle to media player - /// @param[in] packet The media packet to decode - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid state - /// @retval #PLAYER_ERROR_NOT_SUPPORTED_FILE File not supported - /// @retval #PLAYER_ERROR_BUFFER_SPACE No buffer space available (since 3.0) - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation (since 3.0) - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED. - /// @see player_set_media_stream_info() - /// @see player_set_media_stream_buffer_max_size() - int player_push_media_stream( - player_h player, - media_packet_h packet, - ) { - return _player_push_media_stream( - player, - packet, - ); - } - - late final _player_push_media_streamPtr = - _lookup>( - 'player_push_media_stream'); - late final _player_push_media_stream = _player_push_media_streamPtr - .asFunction(); - - /// @brief Sets contents information for media stream - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @remarks AV format must be set before pushing elementary stream with player_push_media_stream(). - /// @remarks This API must be called before calling the player_prepare() or player_prepare_async() - /// to reflect the media information. - /// @remarks AAC can be supported. - /// @remarks H.264 can be supported. - /// @param[in] player The handle to media player - /// @param[in] type The type of target stream - /// @param[in] format The media format to set audio information - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid state - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). - /// @see player_push_media_stream() - int player_set_media_stream_info( - player_h player, - int type, - media_format_h format, - ) { - return _player_set_media_stream_info( - player, - type, - format, - ); - } - - late final _player_set_media_stream_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Int32, - media_format_h)>>('player_set_media_stream_info'); - late final _player_set_media_stream_info = _player_set_media_stream_infoPtr - .asFunction(); - - /// @brief Registers a callback function to be invoked when buffer underrun or overflow is occurred. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @remarks This API is used for media stream playback only. - /// @remarks The callback is called in a separate thread (not in the main loop). - /// @param[in] player The handle to the media player - /// @param[in] type The type of target stream - /// @param[in] callback The buffer status callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). - /// @post player_media_stream_buffer_status_cb() will be invoked. - /// @see player_unset_media_stream_buffer_status_cb() - /// @see player_media_stream_buffer_status_cb() - int player_set_media_stream_buffer_status_cb( - player_h player, - int type, - player_media_stream_buffer_status_cb callback, - ffi.Pointer user_data, - ) { - return _player_set_media_stream_buffer_status_cb( - player, - type, - callback, - user_data, - ); - } - - late final _player_set_media_stream_buffer_status_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - player_h, - ffi.Int32, - player_media_stream_buffer_status_cb, - ffi.Pointer)>>( - 'player_set_media_stream_buffer_status_cb'); - late final _player_set_media_stream_buffer_status_cb = - _player_set_media_stream_buffer_status_cbPtr.asFunction< - int Function(player_h, int, player_media_stream_buffer_status_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the buffer status callback function. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @remarks This API is used for media stream playback only. - /// @param[in] player The handle to the media player - /// @param[in] type The type of target stream - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see player_set_media_stream_buffer_status_cb() - int player_unset_media_stream_buffer_status_cb( - player_h player, - int type, - ) { - return _player_unset_media_stream_buffer_status_cb( - player, - type, - ); - } - - late final _player_unset_media_stream_buffer_status_cbPtr = - _lookup>( - 'player_unset_media_stream_buffer_status_cb'); - late final _player_unset_media_stream_buffer_status_cb = - _player_unset_media_stream_buffer_status_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be invoked when seeking is occurred. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @remarks This API is used for media stream playback only. - /// @remarks The callback is called in a separate thread (not in the main loop). - /// @param[in] player The handle to the media player - /// @param[in] type The type of target stream - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). - /// @post player_media_stream_seek_cb() will be invoked. - /// @see player_unset_media_stream_seek_cb() - /// @see player_media_stream_seek_cb() - int player_set_media_stream_seek_cb( - player_h player, - int type, - player_media_stream_seek_cb callback, - ffi.Pointer user_data, - ) { - return _player_set_media_stream_seek_cb( - player, - type, - callback, - user_data, - ); - } - - late final _player_set_media_stream_seek_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Int32, player_media_stream_seek_cb, - ffi.Pointer)>>('player_set_media_stream_seek_cb'); - late final _player_set_media_stream_seek_cb = - _player_set_media_stream_seek_cbPtr.asFunction< - int Function(player_h, int, player_media_stream_seek_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the seek callback function. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @param[in] player The handle to the media player - /// @param[in] type The type of target stream - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see player_set_media_stream_seek_cb() - int player_unset_media_stream_seek_cb( - player_h player, - int type, - ) { - return _player_unset_media_stream_seek_cb( - player, - type, - ); - } - - late final _player_unset_media_stream_seek_cbPtr = - _lookup>( - 'player_unset_media_stream_seek_cb'); - late final _player_unset_media_stream_seek_cb = - _player_unset_media_stream_seek_cbPtr - .asFunction(); - - /// @brief Sets the max size bytes of buffer. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @remarks This API is used for media stream playback only. - /// @remarks If the buffer level over the max size, player_media_stream_buffer_status_cb() will be invoked with overflow status. - /// @param[in] player The handle to the media player - /// @param[in] type The type of target stream - /// @param[in] max_size The max bytes of buffer, it has to be bigger than zero. (default: 200000) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. (since 3.0) - /// @see player_get_media_stream_buffer_max_size() - /// @see player_media_stream_buffer_status_cb() - int player_set_media_stream_buffer_max_size( - player_h player, - int type, - int max_size, - ) { - return _player_set_media_stream_buffer_max_size( - player, - type, - max_size, - ); - } - - late final _player_set_media_stream_buffer_max_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Int32, ffi.UnsignedLongLong)>>( - 'player_set_media_stream_buffer_max_size'); - late final _player_set_media_stream_buffer_max_size = - _player_set_media_stream_buffer_max_sizePtr - .asFunction(); - - /// @brief Gets the max size bytes of buffer. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @remarks This API is used for media stream playback only. - /// @remarks If the buffer level over the max size, player_media_stream_buffer_status_cb() will be invoked with overflow status. - /// @param[in] player The handle to the media player - /// @param[in] type The type of target stream - /// @param[out] max_size The max bytes of buffer - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see player_set_media_stream_buffer_max_size() - /// @see player_media_stream_buffer_status_cb() - int player_get_media_stream_buffer_max_size( - player_h player, - int type, - ffi.Pointer max_size, - ) { - return _player_get_media_stream_buffer_max_size( - player, - type, - max_size, - ); - } - - late final _player_get_media_stream_buffer_max_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - player_h, ffi.Int32, ffi.Pointer)>>( - 'player_get_media_stream_buffer_max_size'); - late final _player_get_media_stream_buffer_max_size = - _player_get_media_stream_buffer_max_sizePtr.asFunction< - int Function(player_h, int, ffi.Pointer)>(); - - /// @brief Sets the buffer threshold percent of buffer. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @remarks This API is used for media stream playback only. - /// @remarks If the buffer level drops below the percent value, player_media_stream_buffer_status_cb() will be invoked with underrun status. - /// @param[in] player The handle to the media player - /// @param[in] type The type of target stream - /// @param[in] percent The minimum threshold(0~100) of buffer (default: 0) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. (since 3.0) - /// @see player_get_media_stream_buffer_min_threshold() - /// @see player_media_stream_buffer_status_cb() - int player_set_media_stream_buffer_min_threshold( - player_h player, - int type, - int percent, - ) { - return _player_set_media_stream_buffer_min_threshold( - player, - type, - percent, - ); - } - - late final _player_set_media_stream_buffer_min_thresholdPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Int32, ffi.UnsignedInt)>>( - 'player_set_media_stream_buffer_min_threshold'); - late final _player_set_media_stream_buffer_min_threshold = - _player_set_media_stream_buffer_min_thresholdPtr - .asFunction(); - - /// @brief Gets the buffer threshold percent of buffer. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @remarks This API is used for media stream playback only. - /// @remarks If the buffer level drops below the percent value, player_media_stream_buffer_status_cb() will be invoked with underrun status. - /// @param[in] player The handle to the media player - /// @param[in] type The type of target stream - /// @param[out] percent The minimum threshold(0~100) of buffer - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see player_set_media_stream_buffer_min_threshold() - /// @see player_media_stream_buffer_status_cb() - int player_get_media_stream_buffer_min_threshold( - player_h player, - int type, - ffi.Pointer percent, - ) { - return _player_get_media_stream_buffer_min_threshold( - player, - type, - percent, - ); - } - - late final _player_get_media_stream_buffer_min_thresholdPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - player_h, ffi.Int32, ffi.Pointer)>>( - 'player_get_media_stream_buffer_min_threshold'); - late final _player_get_media_stream_buffer_min_threshold = - _player_get_media_stream_buffer_min_thresholdPtr.asFunction< - int Function(player_h, int, ffi.Pointer)>(); - - /// @brief Sets the video display mode. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks If no display is set, no operation is performed. - /// @param[in] player The handle to the media player - /// @param[in] mode The display mode - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid state - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see #player_display_mode_e - /// @see player_set_display() - /// @see player_get_display_mode() - int player_set_display_mode( - player_h player, - int mode, - ) { - return _player_set_display_mode( - player, - mode, - ); - } - - late final _player_set_display_modePtr = - _lookup>( - 'player_set_display_mode'); - late final _player_set_display_mode = - _player_set_display_modePtr.asFunction(); - - /// @brief Gets the video display mode. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks If no display is set, no operation is performed. - /// @param[in] player The handle to the media player - /// @param[out] mode The current display mode - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see #player_display_mode_e - /// @see player_set_display_mode() - int player_get_display_mode( - player_h player, - ffi.Pointer mode, - ) { - return _player_get_display_mode( - player, - mode, - ); - } - - late final _player_get_display_modePtr = _lookup< - ffi - .NativeFunction)>>( - 'player_get_display_mode'); - late final _player_get_display_mode = _player_get_display_modePtr - .asFunction)>(); - - /// @brief Sets the ROI(Region Of Interest) area of display. - /// @since_tizen 3.0 - /// @remarks If no display is set, no operation is performed. - /// @remarks Before set display ROI area, #PLAYER_DISPLAY_MODE_DST_ROI must be set with player_set_display_mode(). - /// The minimum value of width and height are 1. - /// @param[in] player The handle to the media player - /// @param[in] x X coordinate of area - /// @param[in] y Y coordinate of area - /// @param[in] width Width of area - /// @param[in] height Height of area - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @pre display_mode must be set to #PLAYER_DISPLAY_MODE_DST_ROI. - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see player_set_display() - /// @see player_set_display_mode() - int player_set_display_roi_area( - player_h player, - int x, - int y, - int width, - int height, - ) { - return _player_set_display_roi_area( - player, - x, - y, - width, - height, - ); - } - - late final _player_set_display_roi_areaPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Int, ffi.Int, ffi.Int, - ffi.Int)>>('player_set_display_roi_area'); - late final _player_set_display_roi_area = _player_set_display_roi_areaPtr - .asFunction(); - - /// @brief Sets the visibility of the video display - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks If no display is set, no operation is performed. - /// @remarks If you set visible before calling player_set_display, it will be applied on #PLAYER_STATE_READY state. - /// @param[in] player The handle to the media player - /// @param[in] visible The visibility of the display (@c true = visible, @c false = non-visible ) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid state - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see player_set_display() - /// @see player_is_display_visible() - int player_set_display_visible( - player_h player, - bool visible, - ) { - return _player_set_display_visible( - player, - visible, - ); - } - - late final _player_set_display_visiblePtr = - _lookup>( - 'player_set_display_visible'); - late final _player_set_display_visible = - _player_set_display_visiblePtr.asFunction(); - - /// @brief Gets the visibility of the video display. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[out] visible The current visibility of the display (@c true = visible, @c false = non-visible ) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see player_set_display_visible() - int player_is_display_visible( - player_h player, - ffi.Pointer visible, - ) { - return _player_is_display_visible( - player, - visible, - ); - } - - late final _player_is_display_visiblePtr = _lookup< - ffi - .NativeFunction)>>( - 'player_is_display_visible'); - late final _player_is_display_visible = _player_is_display_visiblePtr - .asFunction)>(); - - /// @brief Sets the rotation settings of the video surface display. - /// @details Use this function to change the video orientation to portrait mode. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks If no display is set, no operation is performed. - /// @param[in] player The handle to the media player - /// @param[in] rotation The rotation of the display - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid state - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see #player_display_rotation_e - /// @see player_set_display - /// @see player_get_display_rotation() - int player_set_display_rotation( - player_h player, - int rotation, - ) { - return _player_set_display_rotation( - player, - rotation, - ); - } - - late final _player_set_display_rotationPtr = - _lookup>( - 'player_set_display_rotation'); - late final _player_set_display_rotation = - _player_set_display_rotationPtr.asFunction(); - - /// @brief Gets the rotation of the video surface display. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[out] rotation The current rotation of the display - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see #player_display_rotation_e - /// @see player_set_display_rotation() - int player_get_display_rotation( - player_h player, - ffi.Pointer rotation, - ) { - return _player_get_display_rotation( - player, - rotation, - ); - } - - late final _player_get_display_rotationPtr = _lookup< - ffi - .NativeFunction)>>( - 'player_get_display_rotation'); - late final _player_get_display_rotation = _player_get_display_rotationPtr - .asFunction)>(); - - /// @brief Gets the media content information. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks You must release @a value using @c free(). - /// @remarks The playback type should be local playback or HTTP streaming playback. - /// @param[in] player The handle to the media player - /// @param[in] key The key attribute name to get - /// @param[out] value The value of the key attribute \n - /// It can be an empty string if there is no content information. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_OUT_OF_MEMORY Not enough memory is available - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED. - int player_get_content_info( - player_h player, - int key, - ffi.Pointer> value, - ) { - return _player_get_content_info( - player, - key, - value, - ); - } - - late final _player_get_content_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Int32, - ffi.Pointer>)>>('player_get_content_info'); - late final _player_get_content_info = _player_get_content_infoPtr.asFunction< - int Function(player_h, int, ffi.Pointer>)>(); - - /// @brief Gets the audio and video codec information. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks You must release @a audio_codec and @a video_codec using free(). - /// @remarks The playback type should be local playback or HTTP streaming playback. - /// @param[in] player The handle to the media player - /// @param[out] audio_codec The name of the audio codec \n - /// It can be @c NULL if there is no audio codec. - /// @param[out] video_codec The name of the video codec \n - /// It can be @c NULL if there is no video codec. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED. - int player_get_codec_info( - player_h player, - ffi.Pointer> audio_codec, - ffi.Pointer> video_codec, - ) { - return _player_get_codec_info( - player, - audio_codec, - video_codec, - ); - } - - late final _player_get_codec_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer>, - ffi.Pointer>)>>('player_get_codec_info'); - late final _player_get_codec_info = _player_get_codec_infoPtr.asFunction< - int Function(player_h, ffi.Pointer>, - ffi.Pointer>)>(); - - /// @brief Gets the audio stream information. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks The playback type should be local playback or HTTP streaming playback. - /// @param[in] player The handle to the media player - /// @param[out] sample_rate The audio sample rate [Hz] \n - /// Value can be invalid if there is no audio stream information. - /// @param[out] channel The audio channel (1: mono, 2: stereo) \n - /// Value can be invalid if there is no audio stream information. - /// @param[out] bit_rate The audio bit rate [Hz] \n - /// Value can be invalid if there is no audio stream information. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED. - int player_get_audio_stream_info( - player_h player, - ffi.Pointer sample_rate, - ffi.Pointer channel, - ffi.Pointer bit_rate, - ) { - return _player_get_audio_stream_info( - player, - sample_rate, - channel, - bit_rate, - ); - } - - late final _player_get_audio_stream_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('player_get_audio_stream_info'); - late final _player_get_audio_stream_info = - _player_get_audio_stream_infoPtr.asFunction< - int Function(player_h, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the video stream information. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks The playback type should be local playback or HTTP streaming playback. - /// @param[in] player The handle to the media player - /// @param[out] fps The frame per second of the video \n - /// It can be @c 0 if there is no video stream information. - /// @param[out] bit_rate The video bit rate [Hz] \n - /// It can be an invalid value if there is no video stream information. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED. - int player_get_video_stream_info( - player_h player, - ffi.Pointer fps, - ffi.Pointer bit_rate, - ) { - return _player_get_video_stream_info( - player, - fps, - bit_rate, - ); - } - - late final _player_get_video_stream_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer, - ffi.Pointer)>>('player_get_video_stream_info'); - late final _player_get_video_stream_info = - _player_get_video_stream_infoPtr.asFunction< - int Function(player_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the video display's height and width. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks The playback type should be local playback or HTTP streaming playback. - /// @param[in] player The handle to the media player - /// @param[out] width The width of the video \n - /// Value can be invalid if there is no video or no display is set. - /// @param[out] height The height of the video \n - /// Value can be invalid value if there is no video or no display is set. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED. - int player_get_video_size( - player_h player, - ffi.Pointer width, - ffi.Pointer height, - ) { - return _player_get_video_size( - player, - width, - height, - ); - } - - late final _player_get_video_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer, - ffi.Pointer)>>('player_get_video_size'); - late final _player_get_video_size = _player_get_video_sizePtr.asFunction< - int Function(player_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the album art in the media resource. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks You must not release @a album_art. It will be released by framework when the player is destroyed. - /// @param[in] player The handle to the media player - /// @param[out] album_art The encoded artwork image - /// @param[out] size The encoded artwork size - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED. - int player_get_album_art( - player_h player, - ffi.Pointer> album_art, - ffi.Pointer size, - ) { - return _player_get_album_art( - player, - album_art, - size, - ); - } - - late final _player_get_album_artPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer>, - ffi.Pointer)>>('player_get_album_art'); - late final _player_get_album_art = _player_get_album_artPtr.asFunction< - int Function(player_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Gets the total running time of the associated media. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks The media source is associated with the player, using either player_set_uri() or player_set_memory_buffer(). - /// @remarks The playback type should be local playback or HTTP streaming playback. - /// @param[in] player The handle to the media player - /// @param[out] duration The duration in milliseconds - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED. - /// @see player_set_uri() - /// @see player_set_memory_buffer() - int player_get_duration( - player_h player, - ffi.Pointer duration, - ) { - return _player_get_duration( - player, - duration, - ); - } - - late final _player_get_durationPtr = _lookup< - ffi.NativeFunction)>>( - 'player_get_duration'); - late final _player_get_duration = _player_get_durationPtr - .asFunction)>(); - - /// @brief Gets the number of equalizer bands. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[out] count The number of equalizer bands - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see player_audio_effect_equalizer_is_available() - /// @see player_audio_effect_set_equalizer_band_level() - /// @see player_audio_effect_set_equalizer_all_bands() - int player_audio_effect_get_equalizer_bands_count( - player_h player, - ffi.Pointer count, - ) { - return _player_audio_effect_get_equalizer_bands_count( - player, - count, - ); - } - - late final _player_audio_effect_get_equalizer_bands_countPtr = _lookup< - ffi.NativeFunction)>>( - 'player_audio_effect_get_equalizer_bands_count'); - late final _player_audio_effect_get_equalizer_bands_count = - _player_audio_effect_get_equalizer_bands_countPtr - .asFunction)>(); - - /// @brief Sets the gain set for the given equalizer band. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[in] index The index of the equalizer band to be set - /// @param[in] level The new gain in decibel that is set to the given band [dB] - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see player_audio_effect_equalizer_is_available() - /// @see player_audio_effect_get_equalizer_bands_count() - /// @see player_audio_effect_get_equalizer_level_range() - /// @see player_audio_effect_get_equalizer_band_level() - /// @see player_audio_effect_set_equalizer_all_bands() - int player_audio_effect_set_equalizer_band_level( - player_h player, - int index, - int level, - ) { - return _player_audio_effect_set_equalizer_band_level( - player, - index, - level, - ); - } - - late final _player_audio_effect_set_equalizer_band_levelPtr = - _lookup>( - 'player_audio_effect_set_equalizer_band_level'); - late final _player_audio_effect_set_equalizer_band_level = - _player_audio_effect_set_equalizer_band_levelPtr - .asFunction(); - - /// @brief Gets the gain set for the given equalizer band. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[in] index The index of the requested equalizer band - /// @param[out] level The gain in decibel of the given band [dB] - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see player_audio_effect_equalizer_is_available() - /// @see player_audio_effect_set_equalizer_band_level() - int player_audio_effect_get_equalizer_band_level( - player_h player, - int index, - ffi.Pointer level, - ) { - return _player_audio_effect_get_equalizer_band_level( - player, - index, - level, - ); - } - - late final _player_audio_effect_get_equalizer_band_levelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Int, ffi.Pointer)>>( - 'player_audio_effect_get_equalizer_band_level'); - late final _player_audio_effect_get_equalizer_band_level = - _player_audio_effect_get_equalizer_band_levelPtr - .asFunction)>(); - - /// @brief Sets all bands of the equalizer. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[in] band_levels The list of band levels to be set - /// @param[in] length The length of the band level - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see player_audio_effect_equalizer_is_available() - /// @see player_audio_effect_get_equalizer_bands_count() - /// @see player_audio_effect_get_equalizer_level_range() - /// @see player_audio_effect_set_equalizer_band_level() - int player_audio_effect_set_equalizer_all_bands( - player_h player, - ffi.Pointer band_levels, - int length, - ) { - return _player_audio_effect_set_equalizer_all_bands( - player, - band_levels, - length, - ); - } - - late final _player_audio_effect_set_equalizer_all_bandsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer, - ffi.Int)>>('player_audio_effect_set_equalizer_all_bands'); - late final _player_audio_effect_set_equalizer_all_bands = - _player_audio_effect_set_equalizer_all_bandsPtr - .asFunction, int)>(); - - /// @brief Gets the valid band level range of the equalizer. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[out] min The minimum value to be set [dB] - /// @param[out] max The maximum value to be set [dB] - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see player_audio_effect_equalizer_is_available() - /// @see player_audio_effect_set_equalizer_band_level() - /// @see player_audio_effect_set_equalizer_all_bands() - int player_audio_effect_get_equalizer_level_range( - player_h player, - ffi.Pointer min, - ffi.Pointer max, - ) { - return _player_audio_effect_get_equalizer_level_range( - player, - min, - max, - ); - } - - late final _player_audio_effect_get_equalizer_level_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - player_h, ffi.Pointer, ffi.Pointer)>>( - 'player_audio_effect_get_equalizer_level_range'); - late final _player_audio_effect_get_equalizer_level_range = - _player_audio_effect_get_equalizer_level_rangePtr.asFunction< - int Function(player_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the band frequency of the equalizer. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[in] index The index of the requested equalizer band - /// @param[out] frequency The frequency of the given band [dB] - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see player_audio_effect_equalizer_is_available() - int player_audio_effect_get_equalizer_band_frequency( - player_h player, - int index, - ffi.Pointer frequency, - ) { - return _player_audio_effect_get_equalizer_band_frequency( - player, - index, - frequency, - ); - } - - late final _player_audio_effect_get_equalizer_band_frequencyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Int, ffi.Pointer)>>( - 'player_audio_effect_get_equalizer_band_frequency'); - late final _player_audio_effect_get_equalizer_band_frequency = - _player_audio_effect_get_equalizer_band_frequencyPtr - .asFunction)>(); - - /// @brief Gets the band frequency range of the equalizer. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[in] index The index of the requested equalizer band - /// @param[out] range The frequency range of the given band [dB] - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see player_audio_effect_equalizer_is_available() - int player_audio_effect_get_equalizer_band_frequency_range( - player_h player, - int index, - ffi.Pointer range, - ) { - return _player_audio_effect_get_equalizer_band_frequency_range( - player, - index, - range, - ); - } - - late final _player_audio_effect_get_equalizer_band_frequency_rangePtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Int, ffi.Pointer)>>( - 'player_audio_effect_get_equalizer_band_frequency_range'); - late final _player_audio_effect_get_equalizer_band_frequency_range = - _player_audio_effect_get_equalizer_band_frequency_rangePtr - .asFunction)>(); - - /// @brief Clears the equalizer effect. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see player_audio_effect_equalizer_is_available() - /// @see player_audio_effect_set_equalizer_band_level() - /// @see player_audio_effect_set_equalizer_all_bands() - int player_audio_effect_equalizer_clear( - player_h player, - ) { - return _player_audio_effect_equalizer_clear( - player, - ); - } - - late final _player_audio_effect_equalizer_clearPtr = - _lookup>( - 'player_audio_effect_equalizer_clear'); - late final _player_audio_effect_equalizer_clear = - _player_audio_effect_equalizer_clearPtr - .asFunction(); - - /// @brief Checks whether the custom equalizer effect is available. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[out] available If @c true the specified audio effect is available, - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see player_audio_effect_set_equalizer_band_level() - /// @see player_audio_effect_set_equalizer_all_bands() - int player_audio_effect_equalizer_is_available( - player_h player, - ffi.Pointer available, - ) { - return _player_audio_effect_equalizer_is_available( - player, - available, - ); - } - - late final _player_audio_effect_equalizer_is_availablePtr = _lookup< - ffi - .NativeFunction)>>( - 'player_audio_effect_equalizer_is_available'); - late final _player_audio_effect_equalizer_is_available = - _player_audio_effect_equalizer_is_availablePtr - .asFunction)>(); - - /// @brief Captures the video frame, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be set to #PLAYER_STATE_PLAYING by calling player_start() or set to #PLAYER_STATE_PAUSED by calling player_pause(). - /// @pre Video display type should be set by calling player_set_display() otherwise, audio stream is only processed even though video file is set. - /// @post It invokes player_video_captured_cb() when capture completes, if you set a callback. - /// @see player_video_captured_cb() - int player_capture_video( - player_h player, - player_video_captured_cb callback, - ffi.Pointer user_data, - ) { - return _player_capture_video( - player, - callback, - user_data, - ); - } - - late final _player_capture_videoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, player_video_captured_cb, - ffi.Pointer)>>('player_capture_video'); - late final _player_capture_video = _player_capture_videoPtr.asFunction< - int Function( - player_h, player_video_captured_cb, ffi.Pointer)>(); - - /// @brief Sets the cookie for streaming playback. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks This API must be called before calling the player_prepare() or player_prepare_async() - /// to reflect the cookie information when the streaming connection is set up. - /// @param[in] player The handle to the media player - /// @param[in] cookie The cookie to set - /// @param[in] size The size of the cookie - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). - /// @see player_set_uri() - /// @see player_set_streaming_user_agent() - int player_set_streaming_cookie( - player_h player, - ffi.Pointer cookie, - int size, - ) { - return _player_set_streaming_cookie( - player, - cookie, - size, - ); - } - - late final _player_set_streaming_cookiePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer, - ffi.Int)>>('player_set_streaming_cookie'); - late final _player_set_streaming_cookie = _player_set_streaming_cookiePtr - .asFunction, int)>(); - - /// @brief Sets the streaming user agent for playback. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks This API must be called before calling the player_prepare() or player_prepare_async() - /// to reflect the user agent information when the streaming connection is set up. - /// @param[in] player The handle to the media player - /// @param[in] user_agent The user agent to set - /// @param[in] size The size of the user agent - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). - /// @see player_set_uri() - /// @see player_set_streaming_cookie() - int player_set_streaming_user_agent( - player_h player, - ffi.Pointer user_agent, - int size, - ) { - return _player_set_streaming_user_agent( - player, - user_agent, - size, - ); - } - - late final _player_set_streaming_user_agentPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer, - ffi.Int)>>('player_set_streaming_user_agent'); - late final _player_set_streaming_user_agent = - _player_set_streaming_user_agentPtr - .asFunction, int)>(); - - /// @brief Gets the download progress for streaming playback. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[out] start The starting position in percentage [0, 100] - /// @param[out] current The current position in percentage [0, 100] - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be set to #PLAYER_STATE_PLAYING by calling player_start() or set to #PLAYER_STATE_PAUSED by calling player_pause(). - int player_get_streaming_download_progress( - player_h player, - ffi.Pointer start, - ffi.Pointer current, - ) { - return _player_get_streaming_download_progress( - player, - start, - current, - ); - } - - late final _player_get_streaming_download_progressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer, - ffi.Pointer)>>('player_get_streaming_download_progress'); - late final _player_get_streaming_download_progress = - _player_get_streaming_download_progressPtr.asFunction< - int Function(player_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Registers a callback function to be invoked when the playback is finished. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @post player_completed_cb() will be invoked. - /// @see player_unset_completed_cb() - /// @see player_completed_cb() - /// @see player_start() - int player_set_completed_cb( - player_h player, - player_completed_cb callback, - ffi.Pointer user_data, - ) { - return _player_set_completed_cb( - player, - callback, - user_data, - ); - } - - late final _player_set_completed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, player_completed_cb, - ffi.Pointer)>>('player_set_completed_cb'); - late final _player_set_completed_cb = _player_set_completed_cbPtr.asFunction< - int Function(player_h, player_completed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_set_completed_cb() - int player_unset_completed_cb( - player_h player, - ) { - return _player_unset_completed_cb( - player, - ); - } - - late final _player_unset_completed_cbPtr = - _lookup>( - 'player_unset_completed_cb'); - late final _player_unset_completed_cb = - _player_unset_completed_cbPtr.asFunction(); - - /// @brief Registers a callback function to be invoked when the playback is interrupted or the interrupt is completed. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @post player_interrupted_cb() will be invoked. - /// @see player_unset_interrupted_cb() - /// @see #player_interrupted_code_e - /// @see player_interrupted_cb() - int player_set_interrupted_cb( - player_h player, - player_interrupted_cb callback, - ffi.Pointer user_data, - ) { - return _player_set_interrupted_cb( - player, - callback, - user_data, - ); - } - - late final _player_set_interrupted_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, player_interrupted_cb, - ffi.Pointer)>>('player_set_interrupted_cb'); - late final _player_set_interrupted_cb = - _player_set_interrupted_cbPtr.asFunction< - int Function( - player_h, player_interrupted_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_set_interrupted_cb() - int player_unset_interrupted_cb( - player_h player, - ) { - return _player_unset_interrupted_cb( - player, - ); - } - - late final _player_unset_interrupted_cbPtr = - _lookup>( - 'player_unset_interrupted_cb'); - late final _player_unset_interrupted_cb = - _player_unset_interrupted_cbPtr.asFunction(); - - /// @brief Registers a callback function to be invoked when an error occurs. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @post player_error_cb() will be invoked. - /// @see player_unset_error_cb() - /// @see player_error_cb() - int player_set_error_cb( - player_h player, - player_error_cb callback, - ffi.Pointer user_data, - ) { - return _player_set_error_cb( - player, - callback, - user_data, - ); - } - - late final _player_set_error_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, player_error_cb, - ffi.Pointer)>>('player_set_error_cb'); - late final _player_set_error_cb = _player_set_error_cbPtr.asFunction< - int Function(player_h, player_error_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_set_error_cb() - int player_unset_error_cb( - player_h player, - ) { - return _player_unset_error_cb( - player, - ); - } - - late final _player_unset_error_cbPtr = - _lookup>( - 'player_unset_error_cb'); - late final _player_unset_error_cb = - _player_unset_error_cbPtr.asFunction(); - - /// @brief Registers a callback function to be invoked when there is a change in the buffering status of a media stream. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks The media resource should be streamed over the network. - /// @param[in] player The handle to the media player - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @if WEARABLE @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature @endif - /// @post player_buffering_cb() will be invoked. - /// @see player_unset_buffering_cb() - /// @see player_set_uri() - /// @see player_buffering_cb() - int player_set_buffering_cb( - player_h player, - player_buffering_cb callback, - ffi.Pointer user_data, - ) { - return _player_set_buffering_cb( - player, - callback, - user_data, - ); - } - - late final _player_set_buffering_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, player_buffering_cb, - ffi.Pointer)>>('player_set_buffering_cb'); - late final _player_set_buffering_cb = _player_set_buffering_cbPtr.asFunction< - int Function(player_h, player_buffering_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_set_buffering_cb() - int player_unset_buffering_cb( - player_h player, - ) { - return _player_unset_buffering_cb( - player, - ); - } - - late final _player_unset_buffering_cbPtr = - _lookup>( - 'player_unset_buffering_cb'); - late final _player_unset_buffering_cb = - _player_unset_buffering_cbPtr.asFunction(); - - /// @deprecated Deprecated since 4.0. - /// @brief Sets a path to download, progressively. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks Progressive download will be started when you invoke player_start(). - /// @remarks This API must be called before calling the player_prepare() or player_prepare_async() to reflect the download path when the player is building. - /// @remarks The mediastorage privilege(http://tizen.org/privilege/mediastorage) must be added if any files are used to download and play located in the internal storage. - /// @remarks The externalstorage privilege(http://tizen.org/privilege/externalstorage) must be added if any files are used to download and play located in the external storage. - /// - /// @param[in] player The handle to the media player - /// @param[in] path The absolute path to download - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @if WEARABLE @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature @endif - /// @retval #PLAYER_ERROR_PERMISSION_DENIED Permission denied - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). - /// @see player_set_progressive_download_message_cb() - /// @see player_unset_progressive_download_message_cb() - int player_set_progressive_download_path( - player_h player, - ffi.Pointer path, - ) { - return _player_set_progressive_download_path( - player, - path, - ); - } - - late final _player_set_progressive_download_pathPtr = _lookup< - ffi - .NativeFunction)>>( - 'player_set_progressive_download_path'); - late final _player_set_progressive_download_path = - _player_set_progressive_download_pathPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Gets the status of progressive download. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[out] current The current download position (bytes) - /// @param[out] total_size The total size of the file (bytes) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The progressive download path must be set by calling player_set_progressive_download_path(). - /// @pre The player state must be set to #PLAYER_STATE_PLAYING by calling player_start() or set to #PLAYER_STATE_PAUSED by calling player_pause(). - int player_get_progressive_download_status( - player_h player, - ffi.Pointer current, - ffi.Pointer total_size, - ) { - return _player_get_progressive_download_status( - player, - current, - total_size, - ); - } - - late final _player_get_progressive_download_statusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer, - ffi.Pointer)>>( - 'player_get_progressive_download_status'); - late final _player_get_progressive_download_status = - _player_get_progressive_download_statusPtr.asFunction< - int Function(player_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Registers a callback function to be invoked when progressive download is started or completed. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @if WEARABLE @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature @endif - /// @pre The path to download must be set by calling player_set_progressive_download_path(). - /// @post player_pd_message_cb() will be invoked. - /// @see player_unset_progressive_download_message_cb() - /// @see player_set_progressive_download_path() - int player_set_progressive_download_message_cb( - player_h player, - player_pd_message_cb callback, - ffi.Pointer user_data, - ) { - return _player_set_progressive_download_message_cb( - player, - callback, - user_data, - ); - } - - late final _player_set_progressive_download_message_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - player_h, player_pd_message_cb, ffi.Pointer)>>( - 'player_set_progressive_download_message_cb'); - late final _player_set_progressive_download_message_cb = - _player_set_progressive_download_message_cbPtr.asFunction< - int Function( - player_h, player_pd_message_cb, ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_set_progressive_download_message_cb() - int player_unset_progressive_download_message_cb( - player_h player, - ) { - return _player_unset_progressive_download_message_cb( - player, - ); - } - - late final _player_unset_progressive_download_message_cbPtr = - _lookup>( - 'player_unset_progressive_download_message_cb'); - late final _player_unset_progressive_download_message_cb = - _player_unset_progressive_download_message_cbPtr - .asFunction(); - - /// @brief Sets the playback rate. - /// @details The default value is @c 1.0. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks #PLAYER_ERROR_INVALID_OPERATION occurs when streaming playback. - /// @remarks No operation is performed, if @a rate is @c 0. - /// @remarks The sound is muted, when playback rate is under @c 0.0 and over @c 2.0. - /// @param[in] player The handle to the media player - /// @param[in] rate The playback rate (-5.0x ~ 5.0x) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - int player_set_playback_rate( - player_h player, - double rate, - ) { - return _player_set_playback_rate( - player, - rate, - ); - } - - late final _player_set_playback_ratePtr = - _lookup>( - 'player_set_playback_rate'); - late final _player_set_playback_rate = - _player_set_playback_ratePtr.asFunction(); - - /// @brief Sets a subtitle path. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks Only MicroDVD/SubViewer(*.sub), SAMI(*.smi), and SubRip(*.srt) subtitle formats are supported. - /// @remarks The mediastorage privilege(http://tizen.org/privilege/mediastorage) must be added if any files are used to play located in the internal storage. - /// @remarks The externalstorage privilege(http://tizen.org/privilege/externalstorage) must be added if any files are used to play located in the external storage. - /// @remarks The path value can be @c NULL for reset before calling player_prepare() or player_prepare_async(). - /// - /// @param[in] player The handle to the media player - /// @param[in] path The absolute path of the subtitle file, it can be @c NULL in the #PLAYER_STATE_IDLE state. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PLAYER_ERROR_NO_SUCH_FILE File not found (Since 4.0) - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - int player_set_subtitle_path( - player_h player, - ffi.Pointer path, - ) { - return _player_set_subtitle_path( - player, - path, - ); - } - - late final _player_set_subtitle_pathPtr = _lookup< - ffi - .NativeFunction)>>( - 'player_set_subtitle_path'); - late final _player_set_subtitle_path = _player_set_subtitle_pathPtr - .asFunction)>(); - - /// @brief Registers a callback function to be invoked when a subtitle updates. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks The callback is called in a separate thread (not in the main loop). - /// @param[in] player The handle to the media player - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The subtitle must be set by calling player_set_subtitle_path(). - /// @post player_subtitle_updated_cb() will be invoked. - /// @see player_unset_subtitle_updated_cb() - /// @see player_subtitle_updated_cb() - /// @see player_set_subtitle_path() - int player_set_subtitle_updated_cb( - player_h player, - player_subtitle_updated_cb callback, - ffi.Pointer user_data, - ) { - return _player_set_subtitle_updated_cb( - player, - callback, - user_data, - ); - } - - late final _player_set_subtitle_updated_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, player_subtitle_updated_cb, - ffi.Pointer)>>('player_set_subtitle_updated_cb'); - late final _player_set_subtitle_updated_cb = - _player_set_subtitle_updated_cbPtr.asFunction< - int Function( - player_h, player_subtitle_updated_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_set_subtitle_updated_cb() - int player_unset_subtitle_updated_cb( - player_h player, - ) { - return _player_unset_subtitle_updated_cb( - player, - ); - } - - late final _player_unset_subtitle_updated_cbPtr = - _lookup>( - 'player_unset_subtitle_updated_cb'); - late final _player_unset_subtitle_updated_cb = - _player_unset_subtitle_updated_cbPtr.asFunction(); - - /// @brief Sets the seek position for the subtitle. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif.1 - /// @remarks Only MicroDVD/SubViewer(*.sub), SAMI(*.smi), and SubRip(*.srt) subtitle formats are supported. - /// @param[in] player The handle to the media player - /// @param[in] millisecond The position in milliseconds from the start to the seek point - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The subtitle must be set by calling player_set_subtitle_path(). - /// @pre The player state must be one of #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED. - int player_set_subtitle_position_offset( - player_h player, - int millisecond, - ) { - return _player_set_subtitle_position_offset( - player, - millisecond, - ); - } - - late final _player_set_subtitle_position_offsetPtr = - _lookup>( - 'player_set_subtitle_position_offset'); - late final _player_set_subtitle_position_offset = - _player_set_subtitle_position_offsetPtr - .asFunction(); - - /// @brief Registers a callback function to be invoked when video stream is changed. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @remarks The stream changing is detected just before rendering operation. - /// @remarks The callback is called in a separate thread (not in the main loop). - /// @remarks This API must be called before calling the player_prepare() or player_prepare_async() - /// to reflect the requirement when the player is building. - /// @param[in] player The handle to the media player - /// @param[in] callback The stream changed callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). - /// @post player_video_stream_changed_cb() will be invoked. - /// @see player_unset_video_stream_changed_cb() - /// @see player_video_stream_changed_cb() - int player_set_video_stream_changed_cb( - player_h player, - player_video_stream_changed_cb callback, - ffi.Pointer user_data, - ) { - return _player_set_video_stream_changed_cb( - player, - callback, - user_data, - ); - } - - late final _player_set_video_stream_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, player_video_stream_changed_cb, - ffi.Pointer)>>('player_set_video_stream_changed_cb'); - late final _player_set_video_stream_changed_cb = - _player_set_video_stream_changed_cbPtr.asFunction< - int Function(player_h, player_video_stream_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the video stream changed callback function. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see player_set_video_stream_changed_cb() - int player_unset_video_stream_changed_cb( - player_h player, - ) { - return _player_unset_video_stream_changed_cb( - player, - ); - } - - late final _player_unset_video_stream_changed_cbPtr = - _lookup>( - 'player_unset_video_stream_changed_cb'); - late final _player_unset_video_stream_changed_cb = - _player_unset_video_stream_changed_cbPtr - .asFunction(); - - /// @brief Gets current track index. - /// @details Index starts from 0. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @param[in] player The handle to the media player - /// @param[in] type The type of target stream which is PLAYER_STREAM_TYPE_AUDIO or PLAYER_STREAM_TYPE_TEXT - /// @param[out] index The index of track - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED - int player_get_current_track( - player_h player, - int type, - ffi.Pointer index, - ) { - return _player_get_current_track( - player, - type, - index, - ); - } - - late final _player_get_current_trackPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Int32, - ffi.Pointer)>>('player_get_current_track'); - late final _player_get_current_track = _player_get_current_trackPtr - .asFunction)>(); - - /// @brief Gets language code of a track. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @remarks @a code must be released with @c free() by caller - /// @param[in] player The handle to the media player - /// @param[in] type The type of target stream which is PLAYER_STREAM_TYPE_AUDIO or PLAYER_STREAM_TYPE_TEXT - /// @param[in] index The index of track - /// @param[out] code A language code in ISO 639-1. "und" will be returned if the language is undefined. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED - int player_get_track_language_code( - player_h player, - int type, - int index, - ffi.Pointer> code, - ) { - return _player_get_track_language_code( - player, - type, - index, - code, - ); - } - - late final _player_get_track_language_codePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Int32, ffi.Int, - ffi.Pointer>)>>( - 'player_get_track_language_code'); - late final _player_get_track_language_code = - _player_get_track_language_codePtr.asFunction< - int Function( - player_h, int, int, ffi.Pointer>)>(); - - /// @brief Gets the track count. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @param[in] player The handle to the media player - /// @param[in] type The type of target stream which is PLAYER_STREAM_TYPE_AUDIO or PLAYER_STREAM_TYPE_TEXT - /// @param[out] count The number of track - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED - int player_get_track_count( - player_h player, - int type, - ffi.Pointer count, - ) { - return _player_get_track_count( - player, - type, - count, - ); - } - - late final _player_get_track_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Int32, - ffi.Pointer)>>('player_get_track_count'); - late final _player_get_track_count = _player_get_track_countPtr - .asFunction)>(); - - /// @brief Selects a track to play. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @param[in] player The handle to the media player - /// @param[in] type The type of target stream which is PLAYER_STREAM_TYPE_AUDIO or PLAYER_STREAM_TYPE_TEXT - /// @param[in] index The index of track - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED - /// @see player_get_current_track() - int player_select_track( - player_h player, - int type, - int index, - ) { - return _player_select_track( - player, - type, - index, - ); - } - - late final _player_select_trackPtr = _lookup< - ffi.NativeFunction>( - 'player_select_track'); - late final _player_select_track = - _player_select_trackPtr.asFunction(); - - /// @brief Retrieves all the streaming variant information. - /// @since_tizen 4.0 - /// @remarks This API is used for adaptive streaming(hls/mpeg dash) only. - /// @param[in] player The handle to the media player - /// @param[in] callback The iteration callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED - /// @see player_adaptive_variant_cb - int player_foreach_adaptive_variant( - player_h player, - player_adaptive_variant_cb callback, - ffi.Pointer user_data, - ) { - return _player_foreach_adaptive_variant( - player, - callback, - user_data, - ); - } - - late final _player_foreach_adaptive_variantPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, player_adaptive_variant_cb, - ffi.Pointer)>>('player_foreach_adaptive_variant'); - late final _player_foreach_adaptive_variant = - _player_foreach_adaptive_variantPtr.asFunction< - int Function( - player_h, player_adaptive_variant_cb, ffi.Pointer)>(); - - /// @brief Sets the maximum limit of the streaming variant. - /// @since_tizen 4.0 - /// @remarks This API is used for adaptive streaming(hls/mpeg dash) only. - /// @remarks The bandwidth setting can only be applied if there is no width, height information at streaming variant header. - /// Application can get all the variant information by calling player_foreach_adaptive_variant() function. - /// @remarks If there is no affordable stream for the condition, the minimum bandwidth stream will be selected. - /// @param[in] player The handle to the media player - /// @param[in] bandwidth The max bandwidth limit of the stream variant (default: -1) - /// @param[in] width The max width limit of the stream variant (deafult: -1) - /// @param[in] height The max height limit of the stream variant (deafult: -1) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see player_foreach_adaptive_variant() - /// @see player_get_max_adaptive_variant_limit() - int player_set_max_adaptive_variant_limit( - player_h player, - int bandwidth, - int width, - int height, - ) { - return _player_set_max_adaptive_variant_limit( - player, - bandwidth, - width, - height, - ); - } - - late final _player_set_max_adaptive_variant_limitPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Int, ffi.Int, - ffi.Int)>>('player_set_max_adaptive_variant_limit'); - late final _player_set_max_adaptive_variant_limit = - _player_set_max_adaptive_variant_limitPtr - .asFunction(); - - /// @brief Gets the maximum limit of the streaming variant. - /// @since_tizen 4.0 - /// @remarks This API is used for adaptive streaming(hls/mpeg dash) only. - /// @param[in] player The handle to the media player - /// @param[out] bandwidth The max bandwidth limit of the stream variant (default: -1) - /// @param[out] width The max width limit of the stream variant (deafult: -1) - /// @param[out] height The max height limit of the stream variant (deafult: -1) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see player_foreach_adaptive_variant() - /// @see player_set_max_adaptive_variant_limit() - int player_get_max_adaptive_variant_limit( - player_h player, - ffi.Pointer bandwidth, - ffi.Pointer width, - ffi.Pointer height, - ) { - return _player_get_max_adaptive_variant_limit( - player, - bandwidth, - width, - height, - ); - } - - late final _player_get_max_adaptive_variant_limitPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('player_get_max_adaptive_variant_limit'); - late final _player_get_max_adaptive_variant_limit = - _player_get_max_adaptive_variant_limitPtr.asFunction< - int Function(player_h, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Sets the audio only mode. - /// @details This function is used to disable or enable video rendering during playback. - /// @since_tizen 4.0 - /// @param[in] player The handle to the media player - /// @param[in] audio_only The new audio only status: (@c true = enable audio only, @c false = disable audio only) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of: #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see player_is_audio_only() - int player_set_audio_only( - player_h player, - bool audio_only, - ) { - return _player_set_audio_only( - player, - audio_only, - ); - } - - late final _player_set_audio_onlyPtr = - _lookup>( - 'player_set_audio_only'); - late final _player_set_audio_only = - _player_set_audio_onlyPtr.asFunction(); - - /// @brief Gets the audio only mode status. - /// @since_tizen 4.0 - /// @param[in] player The handle to the media player - /// @param[out] audio_only The current audio only status: (@c true = audio only enabled, @c false = audio only disabled) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The player state must be one of: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see player_set_audio_only() - int player_is_audio_only( - player_h player, - ffi.Pointer audio_only, - ) { - return _player_is_audio_only( - player, - audio_only, - ); - } - - late final _player_is_audio_onlyPtr = _lookup< - ffi - .NativeFunction)>>( - 'player_is_audio_only'); - late final _player_is_audio_only = _player_is_audio_onlyPtr - .asFunction)>(); - - /// @brief Sets the streaming buffering time. - /// @since_tizen 4.0 - /// @param[in] player The handle to the media player - /// @param[in] prebuffer_ms The buffer time to start playback - /// @param[in] rebuffer_ms The buffer time during playback if player enter pause state for buffering. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid state - /// @if WEARABLE @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature @endif - /// @pre The player state must be #PLAYER_STATE_IDLE. - /// @see player_get_streaming_buffering_time() - int player_set_streaming_buffering_time( - player_h player, - int prebuffer_ms, - int rebuffer_ms, - ) { - return _player_set_streaming_buffering_time( - player, - prebuffer_ms, - rebuffer_ms, - ); - } - - late final _player_set_streaming_buffering_timePtr = - _lookup>( - 'player_set_streaming_buffering_time'); - late final _player_set_streaming_buffering_time = - _player_set_streaming_buffering_timePtr - .asFunction(); - - /// @brief Gets the streaming buffering time. - /// @since_tizen 4.0 - /// @param[in] player The handle to the media player - /// @param[in] prebuffer_ms The buffer time to start playback - /// @param[in] rebuffer_ms The buffer time during playback if player enter pause state for buffering. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid state - /// @if WEARABLE @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature @endif - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see player_get_streaming_buffering_time() - int player_get_streaming_buffering_time( - player_h player, - ffi.Pointer prebuffer_ms, - ffi.Pointer rebuffer_ms, - ) { - return _player_get_streaming_buffering_time( - player, - prebuffer_ms, - rebuffer_ms, - ); - } - - late final _player_get_streaming_buffering_timePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer, - ffi.Pointer)>>('player_get_streaming_buffering_time'); - late final _player_get_streaming_buffering_time = - _player_get_streaming_buffering_timePtr.asFunction< - int Function(player_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Creates a recorder handle to record a video. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a recorder using recorder_destroy(). \n - /// The @a camera handle also could be used for capturing images. \n - /// If the camera state was #CAMERA_STATE_CREATED, the preview format will be changed to the recommended preview format for recording. - /// @remarks The created recorder state will be different according to camera state : \n - /// #CAMERA_STATE_CREATED -> #RECORDER_STATE_CREATED\n - /// #CAMERA_STATE_PREVIEW -> #RECORDER_STATE_READY\n - /// #CAMERA_STATE_CAPTURED -> #RECORDER_STATE_READY - /// @remarks The privilege %http://tizen.org/privilege/recorder is not required since 4.0,\n - /// but it is required in all earlier versions. - /// @remarks Since 4.0, It's related to the following feature: %http://tizen.org/feature/media.video_recording \n - /// instead of using %http://tizen.org/feature/microphone - /// @param[in] camera The handle to the camera - /// @param[out] recorder A handle to the recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #RECORDER_ERROR_SOUND_POLICY Sound policy error - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @see camera_create() - /// @see camera_stop_preview() - /// @see recorder_destroy() - int recorder_create_videorecorder( - camera_h camera, - ffi.Pointer recorder, - ) { - return _recorder_create_videorecorder( - camera, - recorder, - ); - } - - late final _recorder_create_videorecorderPtr = _lookup< - ffi - .NativeFunction)>>( - 'recorder_create_videorecorder'); - late final _recorder_create_videorecorder = _recorder_create_videorecorderPtr - .asFunction)>(); - - /// @brief Creates a recorder handle to record an audio. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a recorder using recorder_destroy(). - /// @remarks The privilege %http://tizen.org/privilege/recorder is not required since 4.0,\n - /// but it is required in all earlier versions. - /// @remarks Since 4.0, It's related to the following feature: %http://tizen.org/feature/media.audio_recording \n - /// instead of using %http://tizen.org/feature/microphone - /// @param[out] recorder A handle to the recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #RECORDER_ERROR_SOUND_POLICY Sound policy error - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @post The recorder state will be #RECORDER_STATE_CREATED. - /// @see recorder_destroy() - int recorder_create_audiorecorder( - ffi.Pointer recorder, - ) { - return _recorder_create_audiorecorder( - recorder, - ); - } - - late final _recorder_create_audiorecorderPtr = - _lookup)>>( - 'recorder_create_audiorecorder'); - late final _recorder_create_audiorecorder = _recorder_create_audiorecorderPtr - .asFunction)>(); - - /// @brief Destroys the recorder handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The video recorder's camera handle is not released by this function. - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @pre The recorder state should be #RECORDER_STATE_CREATED. - /// @post The recorder state will be #RECORDER_STATE_NONE. - /// @see camera_destroy() - /// @see recorder_create_videorecorder() - /// @see recorder_create_audiorecorder() - int recorder_destroy( - recorder_h recorder, - ) { - return _recorder_destroy( - recorder, - ); - } - - late final _recorder_destroyPtr = - _lookup>( - 'recorder_destroy'); - late final _recorder_destroy = - _recorder_destroyPtr.asFunction(); - - /// @brief Prepares the media recorder for recording. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks Before calling the function, it is required to properly set audio encoder (recorder_set_audio_encoder()), - /// video encoder(recorder_set_video_encoder()) and file format (recorder_set_file_format()). - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_SOUND_POLICY Sound policy error - /// @retval #RECORDER_ERROR_RESOURCE_CONFLICT Resource conflict error - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state should be #RECORDER_STATE_CREATED by recorder_create_videorecorder(), recorder_create_audiorecorder() or recorder_unprepare(). - /// @post The recorder state will be #RECORDER_STATE_READY. - /// @post If recorder handle is created by recorder_create_videorecorder(), the camera state will be changed to #CAMERA_STATE_PREVIEW. - /// @see recorder_create_videorecorder() - /// @see recorder_create_audiorecorder() - /// @see recorder_unprepare() - /// @see recorder_set_audio_encoder() - /// @see recorder_set_video_encoder() - /// @see recorder_set_file_format() - int recorder_prepare( - recorder_h recorder, - ) { - return _recorder_prepare( - recorder, - ); - } - - late final _recorder_preparePtr = - _lookup>( - 'recorder_prepare'); - late final _recorder_prepare = - _recorder_preparePtr.asFunction(); - - /// @brief Resets the media recorder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state should be #RECORDER_STATE_READY set by recorder_prepare(), recorder_cancel() or recorder_commit(). - /// @post The recorder state will be #RECORDER_STATE_CREATED. - /// @post If the recorder handle is created by recorder_create_videorecorder(), camera state will be changed to #CAMERA_STATE_CREATED. - /// @see recorder_prepare() - /// @see recorder_cancel() - /// @see recorder_commit() - int recorder_unprepare( - recorder_h recorder, - ) { - return _recorder_unprepare( - recorder, - ); - } - - late final _recorder_unpreparePtr = - _lookup>( - 'recorder_unprepare'); - late final _recorder_unprepare = - _recorder_unpreparePtr.asFunction(); - - /// @brief Starts the recording. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks If file path has been set to an existing file, this file is removed automatically and updated by new one. \n - /// In the video recorder, some preview format does not support record mode. It will return #RECORDER_ERROR_INVALID_OPERATION error. \n - /// You should use default preview format or #CAMERA_PIXEL_FORMAT_NV12 in the record mode. \n - /// When you want to record audio or video file, you need to add privilege according to rules below additionally. \n - /// If you want to save contents to internal storage, you should add mediastorage privilege. \n - /// If you want to save contents to external storage, you should add externalstorage privilege. \n - /// The filename should be set before this function is invoked. - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_READY by recorder_prepare() or #RECORDER_STATE_PAUSED by recorder_pause(). \n - /// The filename should be set by recorder_set_filename(). - /// @post The recorder state will be #RECORDER_STATE_RECORDING. - /// @see recorder_pause() - /// @see recorder_commit() - /// @see recorder_cancel() - /// @see recorder_set_audio_encoder() - /// @see recorder_set_filename() - /// @see recorder_set_file_format() - /// @see recorder_recording_status_cb() - /// @see recorder_set_filename() - int recorder_start( - recorder_h recorder, - ) { - return _recorder_start( - recorder, - ); - } - - late final _recorder_startPtr = - _lookup>( - 'recorder_start'); - late final _recorder_start = - _recorder_startPtr.asFunction(); - - /// @brief Pauses the recording. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks Recording can be resumed with recorder_start(). - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_RECORDING. - /// @post The recorder state will be #RECORDER_STATE_PAUSED. - /// @see recorder_pause() - /// @see recorder_commit() - /// @see recorder_cancel() - int recorder_pause( - recorder_h recorder, - ) { - return _recorder_pause( - recorder, - ); - } - - late final _recorder_pausePtr = - _lookup>( - 'recorder_pause'); - late final _recorder_pause = - _recorder_pausePtr.asFunction(); - - /// @brief Stops recording and saves the result. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks When you want to record audio or video file, you need to add privilege according to rules below additionally. \n - /// If you want to save contents to internal storage, you should add mediastorage privilege. \n - /// If you want to save contents to external storage, you should add externalstorage privilege. - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_RECORDING set by recorder_start() or #RECORDER_STATE_PAUSED by recorder_pause(). - /// @post The recorder state will be #RECORDER_STATE_READY. - /// @see recorder_pause() - /// @see recorder_cancel() - /// @see recorder_set_filename() - /// @see recorder_start() - int recorder_commit( - recorder_h recorder, - ) { - return _recorder_commit( - recorder, - ); - } - - late final _recorder_commitPtr = - _lookup>( - 'recorder_commit'); - late final _recorder_commit = - _recorder_commitPtr.asFunction(); - - /// @brief Cancels the recording. - /// @details The recording data is discarded and not written in the recording file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks When you want to record audio or video file, you need to add privilege according to rules below additionally. \n - /// If you want to save contents to internal storage, you should add mediastorage privilege. \n - /// If you want to save contents to external storage, you should add externalstorage privilege. - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_RECORDING set by recorder_start() or #RECORDER_STATE_PAUSED by recorder_pause(). - /// @post The recorder state will be #RECORDER_STATE_READY. - /// @see recorder_pause() - /// @see recorder_commit() - /// @see recorder_cancel() - /// @see recorder_start() - int recorder_cancel( - recorder_h recorder, - ) { - return _recorder_cancel( - recorder, - ); - } - - late final _recorder_cancelPtr = - _lookup>( - 'recorder_cancel'); - late final _recorder_cancel = - _recorder_cancelPtr.asFunction(); - - /// @brief Gets the recorder's current state. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[out] state The current state of the recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - int recorder_get_state( - recorder_h recorder, - ffi.Pointer state, - ) { - return _recorder_get_state( - recorder, - state, - ); - } - - late final _recorder_get_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - recorder_h, ffi.Pointer)>>('recorder_get_state'); - late final _recorder_get_state = _recorder_get_statePtr - .asFunction)>(); - - /// @brief Gets the peak audio input level that was sampled since the last call to this function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks @c 0 dB indicates maximum input level, @c -300 dB indicates minimum input level. - /// @param[in] recorder The handle to the media recorder - /// @param[out] dB The audio input level in dB - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_RECORDING or #RECORDER_STATE_PAUSED. - int recorder_get_audio_level( - recorder_h recorder, - ffi.Pointer dB, - ) { - return _recorder_get_audio_level( - recorder, - dB, - ); - } - - late final _recorder_get_audio_levelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, - ffi.Pointer)>>('recorder_get_audio_level'); - late final _recorder_get_audio_level = _recorder_get_audio_levelPtr - .asFunction)>(); - - /// @brief Sets the file path to record. - /// @details This function sets file path which defines where newly recorded data should be stored. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If the same file already exists in the file system, then old file will be overwritten. - /// @param[in] recorder The handle to the media recorder - /// @param[in] path The recording file path - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY. - /// @see recorder_get_filename() - int recorder_set_filename( - recorder_h recorder, - ffi.Pointer path, - ) { - return _recorder_set_filename( - recorder, - path, - ); - } - - late final _recorder_set_filenamePtr = _lookup< - ffi - .NativeFunction)>>( - 'recorder_set_filename'); - late final _recorder_set_filename = _recorder_set_filenamePtr - .asFunction)>(); - - /// @brief Gets the file path to record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a path using free(). - /// @param[in] recorder The handle to the media recorder - /// @param[out] path The recording file path - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_set_filename() - int recorder_get_filename( - recorder_h recorder, - ffi.Pointer> path, - ) { - return _recorder_get_filename( - recorder, - path, - ); - } - - late final _recorder_get_filenamePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, - ffi.Pointer>)>>('recorder_get_filename'); - late final _recorder_get_filename = _recorder_get_filenamePtr.asFunction< - int Function(recorder_h, ffi.Pointer>)>(); - - /// @brief Sets the file format for recording media stream. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks Since 2.3.1, it could be returned #RECORDER_ERROR_INVALID_OPERATION \n - /// when it's audio recorder and its state is #RECORDER_STATE_READY \n - /// because of checking codec compatibility with current encoder. - /// @param[in] recorder The handle to the media recorder - /// @param[in] format The media file format - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation (Since 2.3.1) - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY (for video recorder only).\n - /// Since 2.3.1, this API also works for audio recorder when its state is #RECORDER_STATE_READY. - /// @see recorder_get_file_format() - /// @see recorder_foreach_supported_file_format() - int recorder_set_file_format( - recorder_h recorder, - int format, - ) { - return _recorder_set_file_format( - recorder, - format, - ); - } - - late final _recorder_set_file_formatPtr = - _lookup>( - 'recorder_set_file_format'); - late final _recorder_set_file_format = - _recorder_set_file_formatPtr.asFunction(); - - /// @brief Gets the file format for recording media stream. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[out] format The media file format - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_set_file_format() - /// @see recorder_foreach_supported_file_format() - int recorder_get_file_format( - recorder_h recorder, - ffi.Pointer format, - ) { - return _recorder_get_file_format( - recorder, - format, - ); - } - - late final _recorder_get_file_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - recorder_h, ffi.Pointer)>>('recorder_get_file_format'); - late final _recorder_get_file_format = _recorder_get_file_formatPtr - .asFunction)>(); - - /// @brief Sets the recorder's sound manager stream information. - /// @since_tizen 3.0 - /// @remarks You can set sound stream information including audio routing. - /// For more details, please refer to @ref CAPI_MEDIA_SOUND_MANAGER_MODULE - /// @param[in] recorder The handle to the media recorder - /// @param[in] stream_info The sound manager info - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY - /// @see #sound_stream_info_h - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - int recorder_set_sound_stream_info( - recorder_h recorder, - sound_stream_info_h stream_info, - ) { - return _recorder_set_sound_stream_info( - recorder, - stream_info, - ); - } - - late final _recorder_set_sound_stream_infoPtr = _lookup< - ffi - .NativeFunction>( - 'recorder_set_sound_stream_info'); - late final _recorder_set_sound_stream_info = - _recorder_set_sound_stream_infoPtr - .asFunction(); - - /// @brief Retrieves all supported file formats by invoking a specific callback for each supported file format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[in] callback The iteration callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post recorder_supported_file_format_cb() will be invoked. - /// @see recorder_get_file_format() - /// @see recorder_set_file_format() - /// @see recorder_supported_file_format_cb() - int recorder_foreach_supported_file_format( - recorder_h recorder, - recorder_supported_file_format_cb callback, - ffi.Pointer user_data, - ) { - return _recorder_foreach_supported_file_format( - recorder, - callback, - user_data, - ); - } - - late final _recorder_foreach_supported_file_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, recorder_supported_file_format_cb, - ffi.Pointer)>>( - 'recorder_foreach_supported_file_format'); - late final _recorder_foreach_supported_file_format = - _recorder_foreach_supported_file_formatPtr.asFunction< - int Function(recorder_h, recorder_supported_file_format_cb, - ffi.Pointer)>(); - - /// @brief Sets the audio codec for encoding an audio stream. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You can get available audio encoders by using recorder_foreach_supported_audio_encoder(). \n - /// If set to #RECORDER_AUDIO_CODEC_DISABLE, the audio track is not created in recording files.\n - /// Since 2.3.1, it could be returned #RECORDER_ERROR_INVALID_OPERATION \n - /// when it's audio recorder and its state is #RECORDER_STATE_READY \n - /// because of checking codec compatibility with current file format. - /// @param[in] recorder The handle to the media recorder - /// @param[in] codec The audio codec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation (Since 2.3.1) - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY. - /// @see recorder_get_audio_encoder() - /// @see recorder_foreach_supported_audio_encoder() - int recorder_set_audio_encoder( - recorder_h recorder, - int codec, - ) { - return _recorder_set_audio_encoder( - recorder, - codec, - ); - } - - late final _recorder_set_audio_encoderPtr = - _lookup>( - 'recorder_set_audio_encoder'); - late final _recorder_set_audio_encoder = _recorder_set_audio_encoderPtr - .asFunction(); - - /// @brief Gets the audio codec for encoding an audio stream. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[out] codec The audio codec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_set_audio_encoder() - /// @see recorder_foreach_supported_audio_encoder() - int recorder_get_audio_encoder( - recorder_h recorder, - ffi.Pointer codec, - ) { - return _recorder_get_audio_encoder( - recorder, - codec, - ); - } - - late final _recorder_get_audio_encoderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, - ffi.Pointer)>>('recorder_get_audio_encoder'); - late final _recorder_get_audio_encoder = _recorder_get_audio_encoderPtr - .asFunction)>(); - - /// @brief Retrieves all supported audio encoders by invoking a specific callback for each supported audio encoder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[in] callback The iteration callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post recorder_supported_audio_encoder_cb() will be invoked. - /// @see recorder_set_audio_encoder() - /// @see recorder_get_audio_encoder() - /// @see recorder_supported_audio_encoder_cb() - int recorder_foreach_supported_audio_encoder( - recorder_h recorder, - recorder_supported_audio_encoder_cb callback, - ffi.Pointer user_data, - ) { - return _recorder_foreach_supported_audio_encoder( - recorder, - callback, - user_data, - ); - } - - late final _recorder_foreach_supported_audio_encoderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, recorder_supported_audio_encoder_cb, - ffi.Pointer)>>( - 'recorder_foreach_supported_audio_encoder'); - late final _recorder_foreach_supported_audio_encoder = - _recorder_foreach_supported_audio_encoderPtr.asFunction< - int Function(recorder_h, recorder_supported_audio_encoder_cb, - ffi.Pointer)>(); - - /// @brief Sets the resolution of the video recording. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This function should be called before recording (recorder_start()). - /// @param[in] recorder The handle to the media recorder - /// @param[in] width The video width - /// @param[in] height The video height - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY. - /// @see recorder_start() - /// @see recorder_get_video_resolution() - /// @see recorder_foreach_supported_video_resolution() - int recorder_set_video_resolution( - recorder_h recorder, - int width, - int height, - ) { - return _recorder_set_video_resolution( - recorder, - width, - height, - ); - } - - late final _recorder_set_video_resolutionPtr = _lookup< - ffi.NativeFunction>( - 'recorder_set_video_resolution'); - late final _recorder_set_video_resolution = _recorder_set_video_resolutionPtr - .asFunction(); - - /// @brief Gets the resolution of the video recording. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[out] width The video width - /// @param[out] height The video height - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_set_video_resolution() - /// @see recorder_foreach_supported_video_resolution() - int recorder_get_video_resolution( - recorder_h recorder, - ffi.Pointer width, - ffi.Pointer height, - ) { - return _recorder_get_video_resolution( - recorder, - width, - height, - ); - } - - late final _recorder_get_video_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, ffi.Pointer, - ffi.Pointer)>>('recorder_get_video_resolution'); - late final _recorder_get_video_resolution = - _recorder_get_video_resolutionPtr.asFunction< - int Function( - recorder_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Retrieves all supported video resolutions by invoking callback function once for each supported video resolution. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[in] foreach_cb The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes recorder_supported_video_resolution_cb() repeatedly to retrieve each supported video resolution. - /// @see recorder_set_video_resolution() - /// @see recorder_get_video_resolution() - /// @see recorder_supported_video_resolution_cb() - int recorder_foreach_supported_video_resolution( - recorder_h recorder, - recorder_supported_video_resolution_cb foreach_cb, - ffi.Pointer user_data, - ) { - return _recorder_foreach_supported_video_resolution( - recorder, - foreach_cb, - user_data, - ); - } - - late final _recorder_foreach_supported_video_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - recorder_h, - recorder_supported_video_resolution_cb, - ffi.Pointer)>>( - 'recorder_foreach_supported_video_resolution'); - late final _recorder_foreach_supported_video_resolution = - _recorder_foreach_supported_video_resolutionPtr.asFunction< - int Function(recorder_h, recorder_supported_video_resolution_cb, - ffi.Pointer)>(); - - /// @brief Sets the video codec for encoding video stream. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You can get available video encoders by using recorder_foreach_supported_video_encoder(). - /// @param[in] recorder The handle to the media recorder - /// @param[in] codec The video codec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY. - /// @see recorder_get_video_encoder() - /// @see recorder_foreach_supported_video_encoder() - int recorder_set_video_encoder( - recorder_h recorder, - int codec, - ) { - return _recorder_set_video_encoder( - recorder, - codec, - ); - } - - late final _recorder_set_video_encoderPtr = - _lookup>( - 'recorder_set_video_encoder'); - late final _recorder_set_video_encoder = _recorder_set_video_encoderPtr - .asFunction(); - - /// @brief Gets the video codec for encoding video stream. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[out] codec The video codec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_set_video_encoder() - /// @see recorder_foreach_supported_video_encoder() - int recorder_get_video_encoder( - recorder_h recorder, - ffi.Pointer codec, - ) { - return _recorder_get_video_encoder( - recorder, - codec, - ); - } - - late final _recorder_get_video_encoderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, - ffi.Pointer)>>('recorder_get_video_encoder'); - late final _recorder_get_video_encoder = _recorder_get_video_encoderPtr - .asFunction)>(); - - /// @brief Retrieves all supported video encoders by invoking a specific callback for each supported video encoder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[in] callback The iteration callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post recorder_supported_video_encoder_cb() will be invoked. - /// @see recorder_set_video_encoder() - /// @see recorder_get_video_encoder() - /// @see recorder_supported_video_encoder_cb() - int recorder_foreach_supported_video_encoder( - recorder_h recorder, - recorder_supported_video_encoder_cb callback, - ffi.Pointer user_data, - ) { - return _recorder_foreach_supported_video_encoder( - recorder, - callback, - user_data, - ); - } - - late final _recorder_foreach_supported_video_encoderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, recorder_supported_video_encoder_cb, - ffi.Pointer)>>( - 'recorder_foreach_supported_video_encoder'); - late final _recorder_foreach_supported_video_encoder = - _recorder_foreach_supported_video_encoderPtr.asFunction< - int Function(recorder_h, recorder_supported_video_encoder_cb, - ffi.Pointer)>(); - - /// @brief Registers the callback function that will be invoked when the recorder state changes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[in] callback The function pointer of user callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post recorder_state_changed_cb() will be invoked. - /// @see recorder_unset_state_changed_cb() - /// @see recorder_state_changed_cb() - int recorder_set_state_changed_cb( - recorder_h recorder, - recorder_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _recorder_set_state_changed_cb( - recorder, - callback, - user_data, - ); - } - - late final _recorder_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, recorder_state_changed_cb, - ffi.Pointer)>>('recorder_set_state_changed_cb'); - late final _recorder_set_state_changed_cb = - _recorder_set_state_changed_cbPtr.asFunction< - int Function( - recorder_h, recorder_state_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_set_state_changed_cb() - int recorder_unset_state_changed_cb( - recorder_h recorder, - ) { - return _recorder_unset_state_changed_cb( - recorder, - ); - } - - late final _recorder_unset_state_changed_cbPtr = - _lookup>( - 'recorder_unset_state_changed_cb'); - late final _recorder_unset_state_changed_cb = - _recorder_unset_state_changed_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be called when the media recorder is interrupted according to a policy. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_unset_interrupted_cb() - /// @see recorder_interrupted_cb() - int recorder_set_interrupted_cb( - recorder_h recorder, - recorder_interrupted_cb callback, - ffi.Pointer user_data, - ) { - return _recorder_set_interrupted_cb( - recorder, - callback, - user_data, - ); - } - - late final _recorder_set_interrupted_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, recorder_interrupted_cb, - ffi.Pointer)>>('recorder_set_interrupted_cb'); - late final _recorder_set_interrupted_cb = - _recorder_set_interrupted_cbPtr.asFunction< - int Function( - recorder_h, recorder_interrupted_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_set_interrupted_cb() - int recorder_unset_interrupted_cb( - recorder_h recorder, - ) { - return _recorder_unset_interrupted_cb( - recorder, - ); - } - - late final _recorder_unset_interrupted_cbPtr = - _lookup>( - 'recorder_unset_interrupted_cb'); - late final _recorder_unset_interrupted_cb = - _recorder_unset_interrupted_cbPtr.asFunction(); - - /// @brief Registers a callback function to be called when the media recorder interrupt is started according to a policy. - /// @since_tizen 4.0 - /// @param[in] recorder The handle to the media recorder - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see recorder_unset_interrupt_started_cb() - /// @see recorder_interrupt_started_cb() - int recorder_set_interrupt_started_cb( - recorder_h recorder, - recorder_interrupt_started_cb callback, - ffi.Pointer user_data, - ) { - return _recorder_set_interrupt_started_cb( - recorder, - callback, - user_data, - ); - } - - late final _recorder_set_interrupt_started_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, recorder_interrupt_started_cb, - ffi.Pointer)>>('recorder_set_interrupt_started_cb'); - late final _recorder_set_interrupt_started_cb = - _recorder_set_interrupt_started_cbPtr.asFunction< - int Function(recorder_h, recorder_interrupt_started_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen 4.0 - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see recorder_set_interrupt_started_cb() - int recorder_unset_interrupt_started_cb( - recorder_h recorder, - ) { - return _recorder_unset_interrupt_started_cb( - recorder, - ); - } - - late final _recorder_unset_interrupt_started_cbPtr = - _lookup>( - 'recorder_unset_interrupt_started_cb'); - late final _recorder_unset_interrupt_started_cb = - _recorder_unset_interrupt_started_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be called when audio stream data is being delivered. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This callback function holds the same buffer that will be recorded. \n - /// Therefore if an user changes the buffer, the result file will have the buffer. \n - /// @remarks The callback is called via internal thread of Frameworks. Therefore do not invoke UI API, recorder_unprepare(), recorder_commit() and recorder_cancel() in callback.\n - /// This callback function to be called in #RECORDER_STATE_RECORDING and #RECORDER_STATE_PAUSED state. - /// - /// @param[in] recorder The handle to the recorder - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state should be #RECORDER_STATE_READY or #RECORDER_STATE_CREATED. - /// @see recorder_unset_audio_stream_cb() - /// @see recorder_audio_stream_cb() - int recorder_set_audio_stream_cb( - recorder_h recorder, - recorder_audio_stream_cb callback, - ffi.Pointer user_data, - ) { - return _recorder_set_audio_stream_cb( - recorder, - callback, - user_data, - ); - } - - late final _recorder_set_audio_stream_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, recorder_audio_stream_cb, - ffi.Pointer)>>('recorder_set_audio_stream_cb'); - late final _recorder_set_audio_stream_cb = - _recorder_set_audio_stream_cbPtr.asFunction< - int Function( - recorder_h, recorder_audio_stream_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_set_audio_stream_cb() - int recorder_unset_audio_stream_cb( - recorder_h recorder, - ) { - return _recorder_unset_audio_stream_cb( - recorder, - ); - } - - late final _recorder_unset_audio_stream_cbPtr = - _lookup>( - 'recorder_unset_audio_stream_cb'); - late final _recorder_unset_audio_stream_cb = - _recorder_unset_audio_stream_cbPtr.asFunction(); - - /// @brief Registers a callback function to be called when muxed stream data is delivered. - /// @since_tizen 4.0 - /// @remarks This callback receives the data that will be recorded, \n - /// but any changes to this data will not affect the recorded file. - /// @param[in] recorder The handle to the recorder - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @pre The recorder state should be #RECORDER_STATE_READY or #RECORDER_STATE_CREATED. - /// @see recorder_unset_muxed_stream_cb() - /// @see recorder_muxed_stream_cb() - int recorder_set_muxed_stream_cb( - recorder_h recorder, - recorder_muxed_stream_cb callback, - ffi.Pointer user_data, - ) { - return _recorder_set_muxed_stream_cb( - recorder, - callback, - user_data, - ); - } - - late final _recorder_set_muxed_stream_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, recorder_muxed_stream_cb, - ffi.Pointer)>>('recorder_set_muxed_stream_cb'); - late final _recorder_set_muxed_stream_cb = - _recorder_set_muxed_stream_cbPtr.asFunction< - int Function( - recorder_h, recorder_muxed_stream_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen 4.0 - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @pre The recorder state should be #RECORDER_STATE_READY or #RECORDER_STATE_CREATED. - /// @see recorder_set_muxed_stream_cb() - int recorder_unset_muxed_stream_cb( - recorder_h recorder, - ) { - return _recorder_unset_muxed_stream_cb( - recorder, - ); - } - - late final _recorder_unset_muxed_stream_cbPtr = - _lookup>( - 'recorder_unset_muxed_stream_cb'); - late final _recorder_unset_muxed_stream_cb = - _recorder_unset_muxed_stream_cbPtr.asFunction(); - - /// @brief Registers a callback function to be invoked when the recording information changes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[in] callback The function pointer of user callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post recorder_recording_status_cb() will be invoked. - /// @see recorder_unset_recording_status_cb() - /// @see recorder_recording_status_cb() - int recorder_set_recording_status_cb( - recorder_h recorder, - recorder_recording_status_cb callback, - ffi.Pointer user_data, - ) { - return _recorder_set_recording_status_cb( - recorder, - callback, - user_data, - ); - } - - late final _recorder_set_recording_status_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, recorder_recording_status_cb, - ffi.Pointer)>>('recorder_set_recording_status_cb'); - late final _recorder_set_recording_status_cb = - _recorder_set_recording_status_cbPtr.asFunction< - int Function(recorder_h, recorder_recording_status_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_set_recording_status_cb() - int recorder_unset_recording_status_cb( - recorder_h recorder, - ) { - return _recorder_unset_recording_status_cb( - recorder, - ); - } - - late final _recorder_unset_recording_status_cbPtr = - _lookup>( - 'recorder_unset_recording_status_cb'); - late final _recorder_unset_recording_status_cb = - _recorder_unset_recording_status_cbPtr - .asFunction(); - - /// @brief Registers the callback function to be run when reached the recording limit. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to media recorder - /// @param[in] callback The function pointer of user callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post recorder_recording_limit_reached_cb() will be invoked. - /// @see recorder_unset_recording_limit_reached_cb() - /// @see recorder_attr_set_size_limit() - /// @see recorder_attr_set_time_limit() - /// @see recorder_recording_limit_reached_cb() - int recorder_set_recording_limit_reached_cb( - recorder_h recorder, - recorder_recording_limit_reached_cb callback, - ffi.Pointer user_data, - ) { - return _recorder_set_recording_limit_reached_cb( - recorder, - callback, - user_data, - ); - } - - late final _recorder_set_recording_limit_reached_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, recorder_recording_limit_reached_cb, - ffi.Pointer)>>( - 'recorder_set_recording_limit_reached_cb'); - late final _recorder_set_recording_limit_reached_cb = - _recorder_set_recording_limit_reached_cbPtr.asFunction< - int Function(recorder_h, recorder_recording_limit_reached_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_set_recording_limit_reached_cb() - int recorder_unset_recording_limit_reached_cb( - recorder_h recorder, - ) { - return _recorder_unset_recording_limit_reached_cb( - recorder, - ); - } - - late final _recorder_unset_recording_limit_reached_cbPtr = - _lookup>( - 'recorder_unset_recording_limit_reached_cb'); - late final _recorder_unset_recording_limit_reached_cb = - _recorder_unset_recording_limit_reached_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be called when an asynchronous operation error occurred. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This callback informs critical error situation.\n - /// When this callback is invoked, user should release the resource and terminate the application. \n - /// These error codes will occur. \n - /// #RECORDER_ERROR_DEVICE \n - /// #RECORDER_ERROR_INVALID_OPERATION \n - /// #RECORDER_ERROR_OUT_OF_MEMORY - /// @param[in] recorder The handle to the recorder - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function will invoke recorder_error_cb() when an asynchronous operation error occur. - /// @see recorder_unset_error_cb() - /// @see recorder_error_cb() - int recorder_set_error_cb( - recorder_h recorder, - recorder_error_cb callback, - ffi.Pointer user_data, - ) { - return _recorder_set_error_cb( - recorder, - callback, - user_data, - ); - } - - late final _recorder_set_error_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, recorder_error_cb, - ffi.Pointer)>>('recorder_set_error_cb'); - late final _recorder_set_error_cb = _recorder_set_error_cbPtr.asFunction< - int Function(recorder_h, recorder_error_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the recorder - /// @return @c on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_set_error_cb() - int recorder_unset_error_cb( - recorder_h recorder, - ) { - return _recorder_unset_error_cb( - recorder, - ); - } - - late final _recorder_unset_error_cbPtr = - _lookup>( - 'recorder_unset_error_cb'); - late final _recorder_unset_error_cb = - _recorder_unset_error_cbPtr.asFunction(); - - /// @brief Gets the state of recorder device. - /// @since_tizen 3.0 - /// @param[in] type The recorder type - /// @param[out] state The current state of the device - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - int recorder_get_device_state( - int type, - ffi.Pointer state, - ) { - return _recorder_get_device_state( - type, - state, - ); - } - - late final _recorder_get_device_statePtr = _lookup< - ffi - .NativeFunction)>>( - 'recorder_get_device_state'); - late final _recorder_get_device_state = _recorder_get_device_statePtr - .asFunction)>(); - - /// @brief Registers a callback function to be called when the recorder device state changes. - /// @since_tizen 3.0 - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] cb_id The id of the registered callback - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @post This function will invoke recorder_device_state_changed_cb() when the recorder device's state changes. - /// @see recorder_remove_device_state_changed_cb() - /// @see recorder_device_state_changed_cb() - int recorder_add_device_state_changed_cb( - recorder_device_state_changed_cb callback, - ffi.Pointer user_data, - ffi.Pointer cb_id, - ) { - return _recorder_add_device_state_changed_cb( - callback, - user_data, - cb_id, - ); - } - - late final _recorder_add_device_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - recorder_device_state_changed_cb, - ffi.Pointer, - ffi.Pointer)>>('recorder_add_device_state_changed_cb'); - late final _recorder_add_device_state_changed_cb = - _recorder_add_device_state_changed_cbPtr.asFunction< - int Function(recorder_device_state_changed_cb, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Unregisters a callback function. - /// @since_tizen 3.0 - /// @param[in] cb_id The id of the registered callback - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @see recorder_add_device_state_changed_cb() - int recorder_remove_device_state_changed_cb( - int cb_id, - ) { - return _recorder_remove_device_state_changed_cb( - cb_id, - ); - } - - late final _recorder_remove_device_state_changed_cbPtr = - _lookup>( - 'recorder_remove_device_state_changed_cb'); - late final _recorder_remove_device_state_changed_cb = - _recorder_remove_device_state_changed_cbPtr - .asFunction(); - - /// @brief Sets the maximum size of a recording file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks After reaching the limitation, the recording data is discarded and not written in the recording file. - /// @param[in] recorder The handle to the media recorder - /// @param[in] kbyte The maximum size of the recording file(KB) \n - /// @c 0 means unlimited recording size. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY. - /// @see recorder_attr_get_size_limit() - /// @see recorder_attr_set_time_limit() - int recorder_attr_set_size_limit( - recorder_h recorder, - int kbyte, - ) { - return _recorder_attr_set_size_limit( - recorder, - kbyte, - ); - } - - late final _recorder_attr_set_size_limitPtr = - _lookup>( - 'recorder_attr_set_size_limit'); - late final _recorder_attr_set_size_limit = _recorder_attr_set_size_limitPtr - .asFunction(); - - /// @brief Gets the maximum size of a recording file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[out] kbyte The maximum size of recording file (KB) \n - /// @c 0 means unlimited recording size. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_attr_set_size_limit() - /// @see recorder_attr_get_time_limit() - int recorder_attr_get_size_limit( - recorder_h recorder, - ffi.Pointer kbyte, - ) { - return _recorder_attr_get_size_limit( - recorder, - kbyte, - ); - } - - late final _recorder_attr_get_size_limitPtr = _lookup< - ffi - .NativeFunction)>>( - 'recorder_attr_get_size_limit'); - late final _recorder_attr_get_size_limit = _recorder_attr_get_size_limitPtr - .asFunction)>(); - - /// @brief Sets the time limit of a recording file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks After reaching the limitation, the recording data is discarded and not written in the recording file. - /// @param[in] recorder The handle to the media recorder - /// @param[in] second The time limit of the recording file (in seconds) \n - /// @c 0 means unlimited recording size. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY. - /// @see recorder_attr_get_time_limit() - /// @see recorder_attr_set_size_limit() - int recorder_attr_set_time_limit( - recorder_h recorder, - int second, - ) { - return _recorder_attr_set_time_limit( - recorder, - second, - ); - } - - late final _recorder_attr_set_time_limitPtr = - _lookup>( - 'recorder_attr_set_time_limit'); - late final _recorder_attr_set_time_limit = _recorder_attr_set_time_limitPtr - .asFunction(); - - /// @brief Gets the time limit of a recording file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[out] second The time limit of the recording file (in seconds) \n - /// @c 0 means unlimited recording time. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_attr_set_time_limit() - /// @see recorder_attr_get_size_limit() - int recorder_attr_get_time_limit( - recorder_h recorder, - ffi.Pointer second, - ) { - return _recorder_attr_get_time_limit( - recorder, - second, - ); - } - - late final _recorder_attr_get_time_limitPtr = _lookup< - ffi - .NativeFunction)>>( - 'recorder_attr_get_time_limit'); - late final _recorder_attr_get_time_limit = _recorder_attr_get_time_limitPtr - .asFunction)>(); - - /// @brief Sets the audio device for recording. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[in] device The type of an audio device - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY (for video recorder only).\n - /// Since 2.3.1, this API also works for audio recorder when its state is #RECORDER_STATE_READY. - /// @see recorder_attr_get_audio_device() - int recorder_attr_set_audio_device( - recorder_h recorder, - int device, - ) { - return _recorder_attr_set_audio_device( - recorder, - device, - ); - } - - late final _recorder_attr_set_audio_devicePtr = - _lookup>( - 'recorder_attr_set_audio_device'); - late final _recorder_attr_set_audio_device = - _recorder_attr_set_audio_devicePtr - .asFunction(); - - /// @brief Gets the audio device for recording. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[out] device The type of an audio device - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_attr_set_audio_device() - int recorder_attr_get_audio_device( - recorder_h recorder, - ffi.Pointer device, - ) { - return _recorder_attr_get_audio_device( - recorder, - device, - ); - } - - late final _recorder_attr_get_audio_devicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, - ffi.Pointer)>>('recorder_attr_get_audio_device'); - late final _recorder_attr_get_audio_device = - _recorder_attr_get_audio_devicePtr - .asFunction)>(); - - /// @brief Sets the sampling rate of an audio stream. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[in] samplerate The sample rate in Hertz - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY (for video recorder only).\n - /// Since 2.3.1, this API also works for audio recorder when its state is #RECORDER_STATE_READY. - /// @see recorder_attr_get_audio_samplerate() - int recorder_attr_set_audio_samplerate( - recorder_h recorder, - int samplerate, - ) { - return _recorder_attr_set_audio_samplerate( - recorder, - samplerate, - ); - } - - late final _recorder_attr_set_audio_sampleratePtr = - _lookup>( - 'recorder_attr_set_audio_samplerate'); - late final _recorder_attr_set_audio_samplerate = - _recorder_attr_set_audio_sampleratePtr - .asFunction(); - - /// @brief Gets the sampling rate of an audio stream. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[out] samplerate The sample rate in Hertz - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_attr_set_audio_samplerate() - int recorder_attr_get_audio_samplerate( - recorder_h recorder, - ffi.Pointer samplerate, - ) { - return _recorder_attr_get_audio_samplerate( - recorder, - samplerate, - ); - } - - late final _recorder_attr_get_audio_sampleratePtr = _lookup< - ffi - .NativeFunction)>>( - 'recorder_attr_get_audio_samplerate'); - late final _recorder_attr_get_audio_samplerate = - _recorder_attr_get_audio_sampleratePtr - .asFunction)>(); - - /// @brief Sets the bitrate of an audio encoder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[in] bitrate The bitrate (for mms : 12200[bps], normal : 288000[bps]) - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY. - /// @see recorder_attr_get_audio_encoder_bitrate() - int recorder_attr_set_audio_encoder_bitrate( - recorder_h recorder, - int bitrate, - ) { - return _recorder_attr_set_audio_encoder_bitrate( - recorder, - bitrate, - ); - } - - late final _recorder_attr_set_audio_encoder_bitratePtr = - _lookup>( - 'recorder_attr_set_audio_encoder_bitrate'); - late final _recorder_attr_set_audio_encoder_bitrate = - _recorder_attr_set_audio_encoder_bitratePtr - .asFunction(); - - /// @brief Sets the bitrate of a video encoder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[in] bitrate The bitrate in bits per second - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY. - /// @see recorder_attr_get_video_encoder_bitrate() - int recorder_attr_set_video_encoder_bitrate( - recorder_h recorder, - int bitrate, - ) { - return _recorder_attr_set_video_encoder_bitrate( - recorder, - bitrate, - ); - } - - late final _recorder_attr_set_video_encoder_bitratePtr = - _lookup>( - 'recorder_attr_set_video_encoder_bitrate'); - late final _recorder_attr_set_video_encoder_bitrate = - _recorder_attr_set_video_encoder_bitratePtr - .asFunction(); - - /// @brief Gets the bitrate of an audio encoder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[out] bitrate The bitrate in bits per second - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_attr_set_audio_encoder_bitrate() - int recorder_attr_get_audio_encoder_bitrate( - recorder_h recorder, - ffi.Pointer bitrate, - ) { - return _recorder_attr_get_audio_encoder_bitrate( - recorder, - bitrate, - ); - } - - late final _recorder_attr_get_audio_encoder_bitratePtr = _lookup< - ffi - .NativeFunction)>>( - 'recorder_attr_get_audio_encoder_bitrate'); - late final _recorder_attr_get_audio_encoder_bitrate = - _recorder_attr_get_audio_encoder_bitratePtr - .asFunction)>(); - - /// @brief Gets the bitrate of a video encoder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[out] bitrate The bitrate in bits per second - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_attr_set_audio_encoder_bitrate() - int recorder_attr_get_video_encoder_bitrate( - recorder_h recorder, - ffi.Pointer bitrate, - ) { - return _recorder_attr_get_video_encoder_bitrate( - recorder, - bitrate, - ); - } - - late final _recorder_attr_get_video_encoder_bitratePtr = _lookup< - ffi - .NativeFunction)>>( - 'recorder_attr_get_video_encoder_bitrate'); - late final _recorder_attr_get_video_encoder_bitrate = - _recorder_attr_get_video_encoder_bitratePtr - .asFunction)>(); - - /// @brief Sets the mute state of a recorder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[in] enable The mute state - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_attr_is_muted() - int recorder_attr_set_mute( - recorder_h recorder, - bool enable, - ) { - return _recorder_attr_set_mute( - recorder, - enable, - ); - } - - late final _recorder_attr_set_mutePtr = - _lookup>( - 'recorder_attr_set_mute'); - late final _recorder_attr_set_mute = - _recorder_attr_set_mutePtr.asFunction(); - - /// @brief Gets the mute state of a recorder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @return @c true if the recorder is not recording any sound, - /// otherwise @c false if the recorder is recording - /// @exception #RECORDER_ERROR_NONE Successful - /// @exception #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @exception #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @see recorder_attr_set_mute() - bool recorder_attr_is_muted( - recorder_h recorder, - ) { - return _recorder_attr_is_muted( - recorder, - ); - } - - late final _recorder_attr_is_mutedPtr = - _lookup>( - 'recorder_attr_is_muted'); - late final _recorder_attr_is_muted = - _recorder_attr_is_mutedPtr.asFunction(); - - /// @brief Sets the recording motion rate. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This attribute is valid only in a video recorder. \n - /// If the rate bigger than @c 0 and smaller than @c 1, video is recorded in a slow motion mode. \n - /// If the rate bigger than @c 1, video is recorded in a fast motion mode (time lapse recording). - /// @remarks Audio data is not recorded. \n - /// To reset slow motion recording, set the rate to @c 1. - /// @param[in] recorder The handle to the media recorder - /// @param[in] rate The recording motion rate \n - /// It is computed with fps. (@c 0>( - 'recorder_attr_set_recording_motion_rate'); - late final _recorder_attr_set_recording_motion_rate = - _recorder_attr_set_recording_motion_ratePtr - .asFunction(); - - /// @brief Gets the recording motion rate. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This attribute is valid only in a video recorder. \n - /// If the rate bigger than @c 0 and smaller than @c 1, video is recorded in a slow motion mode. \n - /// If the rate bigger than @c 1, video is recorded in a fast motion mode (time lapse recording). - /// @remarks Audio data is not recorded. \n - /// To reset slow motion recording, set the rate to @c 1. - /// @param[in] recorder The handle to the media recorder - /// @param[out] rate The recording motion rate \n - /// It is computed with fps. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_attr_set_recording_motion_rate() - int recorder_attr_get_recording_motion_rate( - recorder_h recorder, - ffi.Pointer rate, - ) { - return _recorder_attr_get_recording_motion_rate( - recorder, - rate, - ); - } - - late final _recorder_attr_get_recording_motion_ratePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, ffi.Pointer)>>( - 'recorder_attr_get_recording_motion_rate'); - late final _recorder_attr_get_recording_motion_rate = - _recorder_attr_get_recording_motion_ratePtr - .asFunction)>(); - - /// @brief Sets the number of the audio channel. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This attribute is applied only in RECORDER_STATE_CREATED state. \n - /// For mono recording, setting channel to @c 1. \n - /// For stereo recording, setting channel to @c 2. - /// @param[in] recorder The handle to the media recorder - /// @param[in] channel_count The number of the audio channel - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY (for video recorder only).\n - /// Since 2.3.1, this API also works for audio recorder when its state is #RECORDER_STATE_READY. - /// @see recorder_attr_get_audio_channel() - int recorder_attr_set_audio_channel( - recorder_h recorder, - int channel_count, - ) { - return _recorder_attr_set_audio_channel( - recorder, - channel_count, - ); - } - - late final _recorder_attr_set_audio_channelPtr = - _lookup>( - 'recorder_attr_set_audio_channel'); - late final _recorder_attr_set_audio_channel = - _recorder_attr_set_audio_channelPtr - .asFunction(); - - /// @brief Gets the number of the audio channel. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[out] channel_count The number of the audio channel - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_attr_set_audio_channel() - int recorder_attr_get_audio_channel( - recorder_h recorder, - ffi.Pointer channel_count, - ) { - return _recorder_attr_get_audio_channel( - recorder, - channel_count, - ); - } - - late final _recorder_attr_get_audio_channelPtr = _lookup< - ffi - .NativeFunction)>>( - 'recorder_attr_get_audio_channel'); - late final _recorder_attr_get_audio_channel = - _recorder_attr_get_audio_channelPtr - .asFunction)>(); - - /// @brief Sets the video orientation in a video metadata tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to a media recorder - /// @param[in] orientation The information of the video orientation - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_attr_get_orientation_tag() - int recorder_attr_set_orientation_tag( - recorder_h recorder, - int orientation, - ) { - return _recorder_attr_set_orientation_tag( - recorder, - orientation, - ); - } - - late final _recorder_attr_set_orientation_tagPtr = - _lookup>( - 'recorder_attr_set_orientation_tag'); - late final _recorder_attr_set_orientation_tag = - _recorder_attr_set_orientation_tagPtr - .asFunction(); - - /// @brief Gets the video orientation in a video metadata tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to a media recorder - /// @param[out] orientation The information of the video orientation - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_attr_set_orientation_tag() - int recorder_attr_get_orientation_tag( - recorder_h recorder, - ffi.Pointer orientation, - ) { - return _recorder_attr_get_orientation_tag( - recorder, - orientation, - ); - } - - late final _recorder_attr_get_orientation_tagPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, - ffi.Pointer)>>('recorder_attr_get_orientation_tag'); - late final _recorder_attr_get_orientation_tag = - _recorder_attr_get_orientation_tagPtr - .asFunction)>(); - - /// @brief Creates a sound pool instance that can be used for sound sources - /// loading/unloading. - /// @details Up to 8 sound pools can be created. Several pools can be active - /// at the same time. Streams can be in playing state only when pool is - /// active. Memory is allocated for sound pool. User should aware that - /// creation of more number of pools means more memory is allocated. - /// @since_tizen 4.0 - /// @remarks When pool has been created, pool state is - /// #SOUND_POOL_STATE_INACTIVE. To activate the pool use - /// sound_pool_activate() function. - /// When no longer needed, @a pool should be destroyed with sound_pool_destroy(). - /// - /// @param[out] pool The created sound pool handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER - /// Invalid parameter (@a pool is NULL) - /// @retval #SOUND_POOL_ERROR_OUT_OF_MEMORY - /// Not enough memory to create sound pool - /// @retval #SOUND_POOL_ERROR_INVALID_OPERATION - /// Maximal amount of sound pools is exceeded (maximum 8 pools allowed) - /// - /// @see sound_pool_destroy() - int sound_pool_create( - ffi.Pointer pool, - ) { - return _sound_pool_create( - pool, - ); - } - - late final _sound_pool_createPtr = - _lookup)>>( - 'sound_pool_create'); - late final _sound_pool_create = _sound_pool_createPtr - .asFunction)>(); - - /// @brief Destroys a sound pool and cleans allocated memory. - /// @details Stops all streams and unloads all sources associated with pool. - /// - /// @since_tizen 4.0 - /// @remarks @a pool should be destroyed with sound_pool_destroy(). - /// @param[in] pool The sound pool handle will be destroyed - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER - /// Invalid parameter (@a pool is NULL or corrupted) - /// @retval #SOUND_POOL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre Create sound pool handle by calling sound_pool_create() - /// - /// @see sound_pool_create() - int sound_pool_destroy( - sound_pool_h pool, - ) { - return _sound_pool_destroy( - pool, - ); - } - - late final _sound_pool_destroyPtr = - _lookup>( - 'sound_pool_destroy'); - late final _sound_pool_destroy = - _sound_pool_destroyPtr.asFunction(); - - /// @brief Loads sound source data from a file to the pool. - /// @details After calling this routine the source can be accessed by its @a tag. - /// @since_tizen 4.0 - /// @remarks Input data can be either raw or encoded. - /// Each of loaded sources must have unique @a tag - /// It is synchronous operation. - /// - /// @param[in] pool The sound pool handle - /// @param[in] file_name The name of the file that contains sound data - /// @param[in] tag Unique string that will be used to identify source - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER - /// Invalid parameter (@a pool is NULL or corrupted, @a file_name is - /// NULL, @a tag is NULL or @a tag/@a file_name length is too long) - /// @retval #SOUND_POOL_ERROR_OUT_OF_MEMORY Not enough memory to allocate source - /// @retval #SOUND_POOL_ERROR_NO_SUCH_FILE No file determined by @a file_name - /// @retval #SOUND_POOL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// @post Unload source from the pool by calling sound_pool_unload_source() - /// - /// @see sound_pool_create() - /// @see sound_pool_destroy() - /// @see sound_pool_unload_source() - int sound_pool_load_source_from_file( - sound_pool_h pool, - ffi.Pointer file_name, - ffi.Pointer tag, - ) { - return _sound_pool_load_source_from_file( - pool, - file_name, - tag, - ); - } - - late final _sound_pool_load_source_from_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_pool_h, ffi.Pointer, - ffi.Pointer)>>('sound_pool_load_source_from_file'); - late final _sound_pool_load_source_from_file = - _sound_pool_load_source_from_filePtr.asFunction< - int Function( - sound_pool_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Unloads source from the @a pool. - /// @details Cleans memory. This operation is synchronous. - /// @since_tizen 4.0 - /// @remarks The usage of @a tag name that was associated with unloaded source - /// has no effect. It can be reused as well. - /// - /// @param[in] pool The sound pool handle - /// @param[in] tag Unique string that identifies the source - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER - /// Invalid parameter (@a pool is NULL or corrupted, @a tag is NULL) - /// @retval #SOUND_POOL_ERROR_KEY_NOT_AVAILABLE No sources tagged by @a tag exist - /// in the pool - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// @pre Load source to the pool by calling sound_pool_load_source_from_file() - /// - /// @see sound_pool_create() - /// @see sound_pool_load_source_from_file() - int sound_pool_unload_source( - sound_pool_h pool, - ffi.Pointer tag, - ) { - return _sound_pool_unload_source( - pool, - tag, - ); - } - - late final _sound_pool_unload_sourcePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_pool_h, - ffi.Pointer)>>('sound_pool_unload_source'); - late final _sound_pool_unload_source = _sound_pool_unload_sourcePtr - .asFunction)>(); - - /// @brief Changes the current @a state of a @a pool to #SOUND_POOL_STATE_ACTIVE. - /// @since_tizen 4.0 - /// @remarks When activation is performed, all suspended streams with highest - /// priority in the pool will resume their playback. Paused streams will - /// remain their state. - /// - /// @param[in] pool The sound pool handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted) - /// @retval #SOUND_POOL_ERROR_INVALID_OPERATION Invalid operation or sound pool - /// is already in #SOUND_POOL_STATE_ACTIVE state - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// - /// @see sound_pool_create() - /// @see sound_pool_get_state() - /// @see sound_pool_deactivate() - /// @see sound_pool_state_e - int sound_pool_activate( - sound_pool_h pool, - ) { - return _sound_pool_activate( - pool, - ); - } - - late final _sound_pool_activatePtr = - _lookup>( - 'sound_pool_activate'); - late final _sound_pool_activate = - _sound_pool_activatePtr.asFunction(); - - /// @brief Changes the current @a state of a @a pool to #SOUND_POOL_STATE_INACTIVE. - /// @since_tizen 4.0 - /// @remarks When deactivation is performed, all playing streams in the pool will - /// be suspended (change state to #SOUND_POOL_STREAM_STATE_SUSPENDED). - /// Paused streams will remain in their state. - /// - /// @param[in] pool The sound pool handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted) - /// @retval #SOUND_POOL_ERROR_INVALID_OPERATION Invalid operation or sound pool - /// is already in @c #SOUND_POOL_STATE_INACTIVE state - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// @pre @a pool has to be in #SOUND_POOL_STATE_ACTIVE state - /// - /// @see sound_pool_create() - /// @see sound_pool_get_state() - /// @see sound_pool_activate() - /// @see sound_pool_state_e - int sound_pool_deactivate( - sound_pool_h pool, - ) { - return _sound_pool_deactivate( - pool, - ); - } - - late final _sound_pool_deactivatePtr = - _lookup>( - 'sound_pool_deactivate'); - late final _sound_pool_deactivate = - _sound_pool_deactivatePtr.asFunction(); - - /// @brief Sets the pool's global volume parameter. - /// @details Volume of all streams related to the @a pool will be scaled - /// in accordance to global pool volume parameter - /// (i.e. [stream real volume] = [global volume] * [stream volume], - /// where [stream volume] is the volume parameter of arbitrary stream). - /// - /// @since_tizen 4.0 - /// @param[in] pool The sound pool handle - /// @param[in] volume Pool global volume in 0.0~1.0 range - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted, or @a volume isn't in 0.0~1.0 range) - /// @retval #SOUND_POOL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// - /// @see sound_pool_create() - int sound_pool_set_volume( - sound_pool_h pool, - double volume, - ) { - return _sound_pool_set_volume( - pool, - volume, - ); - } - - late final _sound_pool_set_volumePtr = - _lookup>( - 'sound_pool_set_volume'); - late final _sound_pool_set_volume = _sound_pool_set_volumePtr - .asFunction(); - - /// @brief Gets the pool's global volume parameter. - /// - /// @since_tizen 4.0 - /// @param[in] pool The sound pool handle - /// @param[out] volume Pool global volume in 0.0~1.0 range - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted, or @a volume is NULL) - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// - /// @see sound_pool_create() - int sound_pool_get_volume( - sound_pool_h pool, - ffi.Pointer volume, - ) { - return _sound_pool_get_volume( - pool, - volume, - ); - } - - late final _sound_pool_get_volumePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - sound_pool_h, ffi.Pointer)>>('sound_pool_get_volume'); - late final _sound_pool_get_volume = _sound_pool_get_volumePtr - .asFunction)>(); - - /// @brief Gets the current @a state of @a pool. - /// - /// @since_tizen 4.0 - /// @param[in] pool The sound pool handle - /// @param[out] state Current state of @a pool - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER - /// Invalid parameter (@a pool is NULL or corrupted, @a tag is NULL) - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// - /// @see sound_pool_create() - /// @see sound_pool_state_e - int sound_pool_get_state( - sound_pool_h pool, - ffi.Pointer state, - ) { - return _sound_pool_get_state( - pool, - state, - ); - } - - late final _sound_pool_get_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - sound_pool_h, ffi.Pointer)>>('sound_pool_get_state'); - late final _sound_pool_get_state = _sound_pool_get_statePtr - .asFunction)>(); - - /// @brief Sets the callback for handling sound @a pool state change. - /// - /// @since_tizen 4.0 - /// @param[in] pool The sound pool handle - /// @param[in] callback The callback that will be called after pool state - /// will be changed. @a callback will be called - /// synchronously - /// @param[in] user_data The user data to be passed to the @a callback - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted, or @a callback is NULL) - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// @post Use sound_pool_unset_state_changed_cb() function to unset the - /// @a callback - /// - /// @see sound_pool_create() - /// @see sound_pool_pool_state_change_cb - int sound_pool_set_state_changed_cb( - sound_pool_h pool, - sound_pool_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _sound_pool_set_state_changed_cb( - pool, - callback, - user_data, - ); - } - - late final _sound_pool_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_pool_h, sound_pool_state_changed_cb, - ffi.Pointer)>>('sound_pool_set_state_changed_cb'); - late final _sound_pool_set_state_changed_cb = - _sound_pool_set_state_changed_cbPtr.asFunction< - int Function(sound_pool_h, sound_pool_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback for handling sound @a pool state change. - /// - /// @since_tizen 4.0 - /// @param[in] pool The sound pool handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted) - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// @pre Set state change callback by calling - /// sound_pool_set_state_changed_cb() - /// - /// @see sound_pool_create() - /// @see sound_pool_set_state_changed_cb() - int sound_pool_unset_state_changed_cb( - sound_pool_h pool, - ) { - return _sound_pool_unset_state_changed_cb( - pool, - ); - } - - late final _sound_pool_unset_state_changed_cbPtr = - _lookup>( - 'sound_pool_unset_state_changed_cb'); - late final _sound_pool_unset_state_changed_cb = - _sound_pool_unset_state_changed_cbPtr - .asFunction(); - - /// @brief Plays a source by @a tag. - /// @details Creates stream with @a id that can be used to change parameters and - /// get additional information. - /// Sets stream state to #SOUND_POOL_STREAM_STATE_PLAYING. - /// If a callback is set with sound_pool_stream_play(), and another - /// callback is set with sound_pool_stream_set_state_changed_cb(), - /// the second callback will overwrite the first one. - /// @since_tizen 4.0 - /// @remarks Resultant stream volume will depend on global pool volume. - /// - /// @param[in] pool The sound pool handle - /// @param[in] tag Unique string that identifies source - /// @param[in] loop Number of times stream will be repeated - /// (pass 0 if stream should be repeated continuously) - /// @param[in] volume Stream volume in 0.0~1.0 range - /// @param[in] priority Stream priority (0 = lowest priority). Check - /// sound_pool_stream_set_priority() documentation - /// for details on prioritization rules. - /// @param[in] priority_policy Stream priority policy.\n - /// (#SOUND_POOL_STREAM_PRIORITY_POLICY_MUTE - Mute)\n - /// (#SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED - Suspended)\n - /// If priority_policy is set to Mute, the stream will be - /// playing with mute even in the presence of high priority - /// stream and it will not be Suspended. - /// @param[in] callback The callback that will be called after stream state - /// will be changed, or NULL if this callback call - /// isn't needed. If @a callback is set, then it will - /// be called asynchronously. - /// @param[in] user_data The user data to be passed to the @a callback - /// @param[out] id Unique stream identifier that can be used to - /// change parameters and get additional information - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted, @a tag is NULL, @a volume is out of - /// 0.0~1.0 range, or @a id is NULL) - /// @retval #SOUND_POOL_ERROR_KEY_NOT_AVAILABLE No sources tagged by @a tag exist - /// in the pool - /// @retval #SOUND_POOL_ERROR_OUT_OF_MEMORY Not enough memory to allocate new - /// sound stream - /// @retval #SOUND_POOL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre Create sound pool handle by calling sound_pool_create() - /// @pre Load source to @a pool by calling sound_pool_load_source_from_file() - /// @post When playback is finished normally (i.e. sound_pool_stream_stop() - /// will be not used for stream termination) state will be changed to - /// #SOUND_POOL_STREAM_STATE_FINISHED and memory will be cleared from the - /// stream allocated resources automatically - /// - /// @see sound_pool_create() - /// @see sound_pool_load_source_from_file() - /// @see sound_pool_set_volume() - /// @see sound_pool_get_volume() - int sound_pool_stream_play( - sound_pool_h pool, - ffi.Pointer tag, - int loop, - double volume, - int priority, - int priority_policy, - sound_pool_stream_state_changed_cb callback, - ffi.Pointer user_data, - ffi.Pointer id, - ) { - return _sound_pool_stream_play( - pool, - tag, - loop, - volume, - priority, - priority_policy, - callback, - user_data, - id, - ); - } - - late final _sound_pool_stream_playPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - sound_pool_h, - ffi.Pointer, - ffi.UnsignedInt, - ffi.Float, - ffi.UnsignedInt, - ffi.Int32, - sound_pool_stream_state_changed_cb, - ffi.Pointer, - ffi.Pointer)>>('sound_pool_stream_play'); - late final _sound_pool_stream_play = _sound_pool_stream_playPtr.asFunction< - int Function( - sound_pool_h, - ffi.Pointer, - int, - double, - int, - int, - sound_pool_stream_state_changed_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Pauses a stream by @a id. - /// @details Sets stream state to #SOUND_POOL_STREAM_STATE_PAUSED. - /// @since_tizen 4.0 - /// @remarks Stream state has to be #SOUND_POOL_STREAM_STATE_PLAYING. - /// - /// @param[in] pool The sound pool handle - /// @param[in] id Unique stream identifier - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted) - /// @retval #SOUND_POOL_ERROR_KEY_NOT_AVAILABLE No streams identified by @a id - /// exist in the pool - /// @retval #SOUND_POOL_ERROR_INVALID_OPERATION Invalid operation or stream is in - /// the state which is not allowed for pause operation - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// @pre Load source to @a pool by calling sound_pool_load_source_from_file() - /// @pre Start stream playback by calling sound_pool_stream_play() - /// - /// @see sound_pool_create() - /// @see sound_pool_load_source_from_file() - /// @see sound_pool_stream_play() - int sound_pool_stream_pause( - sound_pool_h pool, - int id, - ) { - return _sound_pool_stream_pause( - pool, - id, - ); - } - - late final _sound_pool_stream_pausePtr = _lookup< - ffi.NativeFunction>( - 'sound_pool_stream_pause'); - late final _sound_pool_stream_pause = - _sound_pool_stream_pausePtr.asFunction(); - - /// @brief Resumes a stream by @a id. - /// @details Sets stream state to #SOUND_POOL_STREAM_STATE_PLAYING. - /// @since_tizen 4.0 - /// @remarks Stream state has to be #SOUND_POOL_STREAM_STATE_PAUSED. - /// - /// @param[in] pool The sound pool handle - /// @param[in] id Unique stream identifier - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted) - /// @retval #SOUND_POOL_ERROR_KEY_NOT_AVAILABLE No streams identified by @a id - /// exist in the pool - /// @retval #SOUND_POOL_ERROR_INVALID_OPERATION Invalid operation or stream is in - /// the state which is not allowed for resume operation - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// @pre Load source to @a pool by calling sound_pool_load_source_from_file() - /// @pre Start stream playback by calling sound_pool_stream_play() - /// @pre Pause stream playback by calling sound_pool_stream_pause() - /// - /// @see sound_pool_create() - /// @see sound_pool_load_source_from_file() - /// @see sound_pool_stream_play() - /// @see sound_pool_stream_pause() - int sound_pool_stream_resume( - sound_pool_h pool, - int id, - ) { - return _sound_pool_stream_resume( - pool, - id, - ); - } - - late final _sound_pool_stream_resumePtr = _lookup< - ffi.NativeFunction>( - 'sound_pool_stream_resume'); - late final _sound_pool_stream_resume = _sound_pool_stream_resumePtr - .asFunction(); - - /// @brief Stops a stream by @a id. - /// @details Sets stream state to #SOUND_POOL_STREAM_STATE_STOPPED. - /// After stream was stopped it can not be resumed and @a id value - /// becomes invalid. Moreover, stream will never gets - /// #SOUND_POOL_STREAM_STATE_FINISHED state as it will be terminated - /// after this function call. - /// - /// @since_tizen 4.0 - /// @param[in] pool The sound pool handle - /// @param[in] id Unique stream identifier - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted) - /// @retval #SOUND_POOL_ERROR_KEY_NOT_AVAILABLE No streams identified by @a id - /// exist in the pool - /// @retval #SOUND_POOL_ERROR_INVALID_OPERATION Invalid operation or stream is in - /// the state which is not allowed for stop operation - /// - /// @pre Create sound pool handle by calling sound_pool_create() - /// @pre Load source to @a pool by calling sound_pool_load_source_from_file() - /// @pre Start stream playback by calling sound_pool_stream_play() - /// - /// @see sound_pool_create() - /// @see sound_pool_load_source_from_file() - /// @see sound_pool_stream_play() - int sound_pool_stream_stop( - sound_pool_h pool, - int id, - ) { - return _sound_pool_stream_stop( - pool, - id, - ); - } - - late final _sound_pool_stream_stopPtr = _lookup< - ffi.NativeFunction>( - 'sound_pool_stream_stop'); - late final _sound_pool_stream_stop = - _sound_pool_stream_stopPtr.asFunction(); - - /// @brief Sets the stream's volume parameters by stream @a id. - /// @since_tizen 4.0 - /// @remarks Resultant stream volume will depend on global pool volume. - /// - /// @param[in] pool The sound pool handle - /// @param[in] id Unique stream identifier - /// @param[in] volume Stream volume in 0.0~1.0 range - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted, or @a volume isn't in 0.0~1.0 range) - /// @retval #SOUND_POOL_ERROR_KEY_NOT_AVAILABLE No streams identified by @a id - /// exist in the pool - /// @retval #SOUND_POOL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// @pre Load source to @a pool by calling sound_pool_load_source_from_file() - /// @pre Start stream playback by calling sound_pool_stream_play() - /// - /// @see sound_pool_create() - /// @see sound_pool_load_source_from_file() - /// @see sound_pool_stream_play() - /// @see sound_pool_set_volume - /// @see sound_pool_get_volume - int sound_pool_stream_set_volume( - sound_pool_h pool, - int id, - double volume, - ) { - return _sound_pool_stream_set_volume( - pool, - id, - volume, - ); - } - - late final _sound_pool_stream_set_volumePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_pool_h, ffi.UnsignedInt, - ffi.Float)>>('sound_pool_stream_set_volume'); - late final _sound_pool_stream_set_volume = _sound_pool_stream_set_volumePtr - .asFunction(); - - /// @brief Gets the stream's volume parameters by stream @a id. - /// - /// @since_tizen 4.0 - /// @param[in] pool The sound pool handle - /// @param[in] id Unique stream identifier - /// @param[out] volume Stream volume in 0.0~1.0 range - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted, or @a volume is NULL) - /// @retval #SOUND_POOL_ERROR_KEY_NOT_AVAILABLE No streams identified by @a id - /// exist in the pool - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// @pre Load source to @a pool by calling sound_pool_load_source_from_file() - /// @pre Start stream playback by calling sound_pool_stream_play() - /// - /// @see sound_pool_create() - /// @see sound_pool_load_source_from_file() - /// @see sound_pool_stream_play() - int sound_pool_stream_get_volume( - sound_pool_h pool, - int id, - ffi.Pointer volume, - ) { - return _sound_pool_stream_get_volume( - pool, - id, - volume, - ); - } - - late final _sound_pool_stream_get_volumePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_pool_h, ffi.UnsignedInt, - ffi.Pointer)>>('sound_pool_stream_get_volume'); - late final _sound_pool_stream_get_volume = _sound_pool_stream_get_volumePtr - .asFunction)>(); - - /// @brief Sets the stream's priority parameter by stream @a id. - /// @since_tizen 4.0 - /// @details The below rules are applicable for streams with priority policy - /// #SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED. - /// Only streams with highest priority in the active Sound Pool can be - /// played. If at least one stream with highest priority enters - /// #SOUND_POOL_STREAM_STATE_PLAYING state, then all streams currently - /// being played with lower priorities will be transferred to the - /// #SOUND_POOL_STREAM_STATE_SUSPENDED state. If there are no more - /// playing streams in a given priority group (group of streams with the - /// same priority), then all previously suspended streams in the group - /// with one level lower priority will be resumed. - /// - /// For example, if we have N suspended streams in 'LOW' group, M - /// suspended streams in 'MEDIUM' group and K playing streams in 'HIGH' - /// group. Then the following rules are valid: When all K streams in HIGH - /// priority group will be finished, paused, or stopped and Sound Pool is - /// in active state, only then M streams from MEDIUM priority group will - /// be resumed. When all M+K streams from HIGH and MEDIUM priority groups - /// are finished, paused or stopped and Sound Pool is in active state, - /// only then N streams from LOW priority group will be resumed. - /// Transferring at least one stream from higher priority group will lead - /// to suspending of all the streams from lower priorities group(s). - /// - /// Priorities don't take any effect in inactive Sound Pools. But after - /// pool activation, all mentioned rules will be applied. - /// - /// If stream priority policy is set to mute - /// #SOUND_POOL_STREAM_PRIORITY_POLICY_MUTE, all above rules are not valid - /// for the stream and it will be played with mute even in the presence - /// of high priority steams. - /// streams. - /// @param[in] pool The sound pool handle - /// @param[in] id Unique stream identifier - /// @param[in] priority Stream priority (0 = lowest priority) - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted) - /// @retval #SOUND_POOL_ERROR_KEY_NOT_AVAILABLE No streams identified by @a id - /// exist in the pool - /// @retval #SOUND_POOL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// @pre Load source to @a pool by calling sound_pool_load_source_from_file() - /// @pre Start stream playback by calling sound_pool_stream_play() - /// - /// @see sound_pool_create() - /// @see sound_pool_load_source_from_file() - /// @see sound_pool_stream_play() - int sound_pool_stream_set_priority( - sound_pool_h pool, - int id, - int priority, - ) { - return _sound_pool_stream_set_priority( - pool, - id, - priority, - ); - } - - late final _sound_pool_stream_set_priorityPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_pool_h, ffi.UnsignedInt, - ffi.UnsignedInt)>>('sound_pool_stream_set_priority'); - late final _sound_pool_stream_set_priority = - _sound_pool_stream_set_priorityPtr - .asFunction(); - - /// @brief Gets the stream's priority parameter by stream @a id. - /// - /// @since_tizen 4.0 - /// @param[in] pool The sound pool handle - /// @param[in] id Unique stream identifier - /// @param[out] priority Stream priority (0 = lowest priority). Check - /// sound_pool_stream_set_priority() documentation - /// for details on prioritization rules. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted, or @a priority is NULL) - /// @retval #SOUND_POOL_ERROR_KEY_NOT_AVAILABLE No streams identified by @a id - /// exist in the pool - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// @pre Load source to @a pool by calling sound_pool_load_source_from_file() - /// @pre Start stream playback by calling sound_pool_stream_play() - /// - /// @see sound_pool_create() - /// @see sound_pool_load_source_from_file() - /// @see sound_pool_stream_play() - int sound_pool_stream_get_priority( - sound_pool_h pool, - int id, - ffi.Pointer priority, - ) { - return _sound_pool_stream_get_priority( - pool, - id, - priority, - ); - } - - late final _sound_pool_stream_get_priorityPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_pool_h, ffi.UnsignedInt, - ffi.Pointer)>>('sound_pool_stream_get_priority'); - late final _sound_pool_stream_get_priority = - _sound_pool_stream_get_priorityPtr.asFunction< - int Function(sound_pool_h, int, ffi.Pointer)>(); - - /// @brief Gets the current @a state of stream by @a id. - /// - /// @since_tizen 4.0 - /// @param[in] pool The sound pool handle - /// @param[in] id Unique stream identifier - /// @param[out] state Current state of stream - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted, or @a state is NULL) - /// @retval #SOUND_POOL_ERROR_KEY_NOT_AVAILABLE No streams identified by @a id - /// exist in the pool - /// - /// @pre Create sound pool handle by calling sound_pool_create() - /// @pre Load source to @a pool by calling sound_pool_load_source_from_file() - /// @pre Start stream playback by calling sound_pool_stream_play() - /// - /// @see sound_pool_create() - /// @see sound_pool_load_source_from_file() - /// @see sound_pool_stream_play() - /// @see sound_pool_stream_state_e - int sound_pool_stream_get_state( - sound_pool_h pool, - int id, - ffi.Pointer state, - ) { - return _sound_pool_stream_get_state( - pool, - id, - state, - ); - } - - late final _sound_pool_stream_get_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_pool_h, ffi.UnsignedInt, - ffi.Pointer)>>('sound_pool_stream_get_state'); - late final _sound_pool_stream_get_state = _sound_pool_stream_get_statePtr - .asFunction)>(); - - /// @brief Creates a streamrecorder handle to record a video or audio - /// @since_tizen 3.0 - /// @remarks You must release @a recorder using streamrecorder_destroy(). - /// @param[out] recorder A handle to the streamrecorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation - int streamrecorder_create( - ffi.Pointer recorder, - ) { - return _streamrecorder_create( - recorder, - ); - } - - late final _streamrecorder_createPtr = _lookup< - ffi.NativeFunction)>>( - 'streamrecorder_create'); - late final _streamrecorder_create = _streamrecorder_createPtr - .asFunction)>(); - - /// @brief Destroys the streamrecorder handle - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @pre The recorder state should be #STREAMRECORDER_STATE_CREATED. - /// @post The recorder state will be #STREAMRECORDER_STATE_NONE. - int streamrecorder_destroy( - streamrecorder_h recorder, - ) { - return _streamrecorder_destroy( - recorder, - ); - } - - late final _streamrecorder_destroyPtr = - _lookup>( - 'streamrecorder_destroy'); - late final _streamrecorder_destroy = - _streamrecorder_destroyPtr.asFunction(); - - /// @brief Prepares the streamrecorder for recording. - /// @since_tizen 3.0 - /// @remarks Before calling the function, it is required to properly set streamrecorder_enable_source_buffer(), - /// audio encoder (streamrecorder_set_audio_encoder()), - /// video encoder(streamrecorder_set_video_encoder()) and file format (streamrecorder_set_file_format()). - /// @param[in] recorder The handle to the streamrecorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @pre The recorder state should be #STREAMRECORDER_STATE_CREATED. \n - /// The streamrecorder_enable_source_buffer() should be invoked before this function. - /// @post The streamrecorder state will be #STREAMRECORDER_STATE_PREPARED - /// @see streamrecorder_unprepare() - /// @see streamrecorder_set_audio_encoder() - /// @see streamrecorder_set_video_encoder() - /// @see streamrecorder_set_file_format() - int streamrecorder_prepare( - streamrecorder_h recorder, - ) { - return _streamrecorder_prepare( - recorder, - ); - } - - late final _streamrecorder_preparePtr = - _lookup>( - 'streamrecorder_prepare'); - late final _streamrecorder_prepare = - _streamrecorder_preparePtr.asFunction(); - - /// @brief Resets the streamrecorder. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @pre The streamrecorder state should be #STREAMRECORDER_STATE_PREPARED set by streamrecorder_prepare(), streamrecorder_cancel() or streamrecorder_commit(). - /// @post The streamrecorder state will be #STREAMRECORDER_STATE_CREATED. - /// @see streamrecorder_prepare() - /// @see streamrecorder_cancel() - /// @see streamrecorder_commit() - int streamrecorder_unprepare( - streamrecorder_h recorder, - ) { - return _streamrecorder_unprepare( - recorder, - ); - } - - late final _streamrecorder_unpreparePtr = - _lookup>( - 'streamrecorder_unprepare'); - late final _streamrecorder_unprepare = - _streamrecorder_unpreparePtr.asFunction(); - - /// @brief Starts the recording. - /// @since_tizen 3.0 - /// @remarks If file path has been set to an existing file, this file is removed automatically and updated by new one. \n - /// When you want to record audio or video file, you need to add privilege according to rules below additionally. \n - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. - /// The filename should be set before this function is invoked. - /// @param[in] recorder The handle to the streamrecorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #STREAMRECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_PREPARED by streamrecorder_prepare() or #STREAMRECORDER_STATE_PAUSED by streamrecorder_pause(). \n - /// The filename should be set by streamrecorder_set_filename(). - /// @post The recorder state will be #STREAMRECORDER_STATE_RECORDING. - /// @see streamrecorder_pause() - /// @see streamrecorder_commit() - /// @see streamrecorder_cancel() - /// @see streamrecorder_set_audio_encoder() - /// @see streamrecorder_set_filename() - /// @see streamrecorder_set_file_format() - /// @see streamrecorder_recording_status_cb() - /// @see streamrecorder_set_filename() - int streamrecorder_start( - streamrecorder_h recorder, - ) { - return _streamrecorder_start( - recorder, - ); - } - - late final _streamrecorder_startPtr = - _lookup>( - 'streamrecorder_start'); - late final _streamrecorder_start = - _streamrecorder_startPtr.asFunction(); - - /// @brief Pauses the recording. - /// @since_tizen 3.0 - /// @remarks Recording can be resumed with streamrecorder_start(). - /// @param[in] recorder The handle to the streamrecorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_RECORDING. - /// @post The streamrecorder state will be #STREAMRECORDER_STATE_PAUSED. - /// @see streamrecorder_pause() - /// @see streamrecorder_commit() - /// @see streamrecorder_cancel() - int streamrecorder_pause( - streamrecorder_h recorder, - ) { - return _streamrecorder_pause( - recorder, - ); - } - - late final _streamrecorder_pausePtr = - _lookup>( - 'streamrecorder_pause'); - late final _streamrecorder_pause = - _streamrecorder_pausePtr.asFunction(); - - /// @brief Stops recording and saves the result. - /// @since_tizen 3.0 - /// @remarks When you want to record audio or video file, you need to add privilege according to rules below additionally. \n - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. - /// @param[in] recorder The handle to the streamrecorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #STREAMRECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_RECORDING set by streamrecorder_start() or #STREAMRECORDER_STATE_PAUSED by streamrecorder_pause(). - /// @post The streamrecorder state will be #STREAMRECORDER_STATE_PREPARED. - /// @see streamrecorder_pause() - /// @see streamrecorder_cancel() - /// @see streamrecorder_set_filename() - /// @see streamrecorder_start() - int streamrecorder_commit( - streamrecorder_h recorder, - ) { - return _streamrecorder_commit( - recorder, - ); - } - - late final _streamrecorder_commitPtr = - _lookup>( - 'streamrecorder_commit'); - late final _streamrecorder_commit = - _streamrecorder_commitPtr.asFunction(); - - /// @brief Cancels the recording. - /// @details The recording data is discarded and not written in the recording file. - /// @since_tizen 3.0 - /// @remarks When you want to record audio or video file, you need to add privilege according to rules below additionally. \n - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. - /// @param[in] recorder The handle to the streamrecorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #STREAMRECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_RECORDING set by streamrecorder_start() or #STREAMRECORDER_STATE_PAUSED by streamrecorder_pause(). - /// @post The streamrecorder state will be #STREAMRECORDER_STATE_PREPARED. - /// @see streamrecorder_pause() - /// @see streamrecorder_commit() - /// @see streamrecorder_cancel() - /// @see streamrecorder_start() - int streamrecorder_cancel( - streamrecorder_h recorder, - ) { - return _streamrecorder_cancel( - recorder, - ); - } - - late final _streamrecorder_cancelPtr = - _lookup>( - 'streamrecorder_cancel'); - late final _streamrecorder_cancel = - _streamrecorder_cancelPtr.asFunction(); - - /// @brief Pushes buffer to StreamRecorder to record audio/video - /// @since_tizen 3.0 - /// @remarks When you want to record audio or video file, you need to add privilege according to rules below additionally. \n - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] inbuf The media packet containing buffer and other associated values - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - int streamrecorder_push_stream_buffer( - streamrecorder_h recorder, - media_packet_h inbuf, - ) { - return _streamrecorder_push_stream_buffer( - recorder, - inbuf, - ); - } - - late final _streamrecorder_push_stream_bufferPtr = _lookup< - ffi - .NativeFunction>( - 'streamrecorder_push_stream_buffer'); - late final _streamrecorder_push_stream_buffer = - _streamrecorder_push_stream_bufferPtr - .asFunction(); - - /// @brief Sets the video source as live buffer to be used for recording - /// @since_tizen 3.0 - /// @remarks if you want to enable video or audio or both recording, call before streamrecorder_prepare() - /// @param[in] recorder A handle to the streamrecorder - /// @param[in] type The type of source input - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @pre The streamrecorder state must be only #STREAMRECORDER_STATE_CREATED - int streamrecorder_enable_source_buffer( - streamrecorder_h recorder, - int type, - ) { - return _streamrecorder_enable_source_buffer( - recorder, - type, - ); - } - - late final _streamrecorder_enable_source_bufferPtr = _lookup< - ffi.NativeFunction>( - 'streamrecorder_enable_source_buffer'); - late final _streamrecorder_enable_source_buffer = - _streamrecorder_enable_source_bufferPtr - .asFunction(); - - /// @brief Gets the streamrecorder's current state. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[out] state The current state of the streamrecorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - int streamrecorder_get_state( - streamrecorder_h recorder, - ffi.Pointer state, - ) { - return _streamrecorder_get_state( - recorder, - state, - ); - } - - late final _streamrecorder_get_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, - ffi.Pointer)>>('streamrecorder_get_state'); - late final _streamrecorder_get_state = _streamrecorder_get_statePtr - .asFunction)>(); - - /// @brief Sets the file path to record. - /// @details This function sets file path which defines where newly recorded data should be stored. - /// @since_tizen 3.0 - /// @remarks If the same file already exists in the file system, then old file will be overwritten. - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] path The recording file path - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n - /// streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_get_filename() - int streamrecorder_set_filename( - streamrecorder_h recorder, - ffi.Pointer path, - ) { - return _streamrecorder_set_filename( - recorder, - path, - ); - } - - late final _streamrecorder_set_filenamePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, - ffi.Pointer)>>('streamrecorder_set_filename'); - late final _streamrecorder_set_filename = _streamrecorder_set_filenamePtr - .asFunction)>(); - - /// @brief Gets the file path to record. - /// @since_tizen 3.0 - /// @remarks You must release @a path using free(). - /// @param[in] recorder The handle to the streamrecorder - /// @param[out] path The recording file path - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_set_filename() - int streamrecorder_get_filename( - streamrecorder_h recorder, - ffi.Pointer> path, - ) { - return _streamrecorder_get_filename( - recorder, - path, - ); - } - - late final _streamrecorder_get_filenamePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - streamrecorder_h, ffi.Pointer>)>>( - 'streamrecorder_get_filename'); - late final _streamrecorder_get_filename = - _streamrecorder_get_filenamePtr.asFunction< - int Function(streamrecorder_h, ffi.Pointer>)>(); - - /// @brief Sets the file format for recording media stream. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] format The media file format - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n - /// streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_get_file_format() - /// @see streamrecorder_foreach_supported_file_format() - int streamrecorder_set_file_format( - streamrecorder_h recorder, - int format, - ) { - return _streamrecorder_set_file_format( - recorder, - format, - ); - } - - late final _streamrecorder_set_file_formatPtr = _lookup< - ffi.NativeFunction>( - 'streamrecorder_set_file_format'); - late final _streamrecorder_set_file_format = - _streamrecorder_set_file_formatPtr - .asFunction(); - - /// @brief Gets the file format for recording media stream. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[out] format The media file format - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_set_file_format() - /// @see streamrecorder_foreach_supported_file_format() - int streamrecorder_get_file_format( - streamrecorder_h recorder, - ffi.Pointer format, - ) { - return _streamrecorder_get_file_format( - recorder, - format, - ); - } - - late final _streamrecorder_get_file_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, - ffi.Pointer)>>('streamrecorder_get_file_format'); - late final _streamrecorder_get_file_format = - _streamrecorder_get_file_formatPtr - .asFunction)>(); - - /// @brief Sets the audio codec for encoding an audio stream. - /// @since_tizen 3.0 - /// @remarks You can get available audio encoders by using streamrecorder_foreach_supported_audio_encoder(). \n - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] codec The audio codec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n - /// streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_get_audio_encoder() - /// @see streamrecorder_foreach_supported_audio_encoder() - int streamrecorder_set_audio_encoder( - streamrecorder_h recorder, - int codec, - ) { - return _streamrecorder_set_audio_encoder( - recorder, - codec, - ); - } - - late final _streamrecorder_set_audio_encoderPtr = _lookup< - ffi.NativeFunction>( - 'streamrecorder_set_audio_encoder'); - late final _streamrecorder_set_audio_encoder = - _streamrecorder_set_audio_encoderPtr - .asFunction(); - - /// @brief Gets the audio codec for encoding an audio stream. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[out] codec The audio codec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @pre The streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_set_audio_encoder() - /// @see streamrecorder_foreach_supported_audio_encoder() - int streamrecorder_get_audio_encoder( - streamrecorder_h recorder, - ffi.Pointer codec, - ) { - return _streamrecorder_get_audio_encoder( - recorder, - codec, - ); - } - - late final _streamrecorder_get_audio_encoderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, - ffi.Pointer)>>('streamrecorder_get_audio_encoder'); - late final _streamrecorder_get_audio_encoder = - _streamrecorder_get_audio_encoderPtr - .asFunction)>(); - - /// @brief Sets the resolution of the video recording. - /// @since_tizen 3.0 - /// @remarks This function should be called before recording (streamrecorder_start()). - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] width The input width - /// @param[in] height The input height - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n - /// streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_start() - /// @see streamrecorder_get_video_resolution() - /// @see streamrecorder_foreach_supported_video_resolution() - int streamrecorder_set_video_resolution( - streamrecorder_h recorder, - int width, - int height, - ) { - return _streamrecorder_set_video_resolution( - recorder, - width, - height, - ); - } - - late final _streamrecorder_set_video_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, ffi.Int, - ffi.Int)>>('streamrecorder_set_video_resolution'); - late final _streamrecorder_set_video_resolution = - _streamrecorder_set_video_resolutionPtr - .asFunction(); - - /// @brief Gets the resolution of the video recording. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[out] width The video width - /// @param[out] height The video height - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @pre The streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_set_video_resolution() - /// @see streamrecorder_foreach_supported_video_resolution() - int streamrecorder_get_video_resolution( - streamrecorder_h recorder, - ffi.Pointer width, - ffi.Pointer height, - ) { - return _streamrecorder_get_video_resolution( - recorder, - width, - height, - ); - } - - late final _streamrecorder_get_video_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, ffi.Pointer, - ffi.Pointer)>>('streamrecorder_get_video_resolution'); - late final _streamrecorder_get_video_resolution = - _streamrecorder_get_video_resolutionPtr.asFunction< - int Function( - streamrecorder_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the video codec for encoding video stream. - /// @since_tizen 3.0 - /// @remarks You can get available video encoders by using recorder_foreach_supported_video_encoder(). - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] codec The video codec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n - /// streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_get_video_encoder() - /// @see streamrecorder_foreach_supported_video_encoder() - int streamrecorder_set_video_encoder( - streamrecorder_h recorder, - int codec, - ) { - return _streamrecorder_set_video_encoder( - recorder, - codec, - ); - } - - late final _streamrecorder_set_video_encoderPtr = _lookup< - ffi.NativeFunction>( - 'streamrecorder_set_video_encoder'); - late final _streamrecorder_set_video_encoder = - _streamrecorder_set_video_encoderPtr - .asFunction(); - - /// @brief Gets the video codec for encoding video stream. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[out] codec The video codec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @pre The streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_set_video_encoder() - /// @see streamrecorder_foreach_supported_video_encoder() - int streamrecorder_get_video_encoder( - streamrecorder_h recorder, - ffi.Pointer codec, - ) { - return _streamrecorder_get_video_encoder( - recorder, - codec, - ); - } - - late final _streamrecorder_get_video_encoderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, - ffi.Pointer)>>('streamrecorder_get_video_encoder'); - late final _streamrecorder_get_video_encoder = - _streamrecorder_get_video_encoderPtr - .asFunction)>(); - - /// @brief Sets the recording frame rate. - /// @since_tizen 3.0 - /// @remarks This function should be called before prepared state. - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] framerate The frame rate for recording - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @see streamrecorder_get_video_framerate() - int streamrecorder_set_video_framerate( - streamrecorder_h recorder, - int framerate, - ) { - return _streamrecorder_set_video_framerate( - recorder, - framerate, - ); - } - - late final _streamrecorder_set_video_frameratePtr = - _lookup>( - 'streamrecorder_set_video_framerate'); - late final _streamrecorder_set_video_framerate = - _streamrecorder_set_video_frameratePtr - .asFunction(); - - /// @brief Gets the recording frame rate. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the camera - /// @param[out] framerate The frame rate for recording that already is set - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see streamrecorder_set_video_framerate() - int streamrecorder_get_video_framerate( - streamrecorder_h recorder, - ffi.Pointer framerate, - ) { - return _streamrecorder_get_video_framerate( - recorder, - framerate, - ); - } - - late final _streamrecorder_get_video_frameratePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, - ffi.Pointer)>>('streamrecorder_get_video_framerate'); - late final _streamrecorder_get_video_framerate = - _streamrecorder_get_video_frameratePtr - .asFunction)>(); - - /// @brief Sets the video source format. - /// @since_tizen 3.0 - /// @remarks This function should be called before prepared state. - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] format The color type of video source - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @see streamrecorder_get_video_source_format() - int streamrecorder_set_video_source_format( - streamrecorder_h recorder, - int format, - ) { - return _streamrecorder_set_video_source_format( - recorder, - format, - ); - } - - late final _streamrecorder_set_video_source_formatPtr = _lookup< - ffi.NativeFunction>( - 'streamrecorder_set_video_source_format'); - late final _streamrecorder_set_video_source_format = - _streamrecorder_set_video_source_formatPtr - .asFunction(); - - /// @brief Gets the video source format. - /// @since_tizen 3.0 - /// @remarks This function should be called before prepared state. - /// @param[in] recorder The handle to the streamrecorder - /// @param[out] format The color type of video source that already is set - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see streamrecorder_set_video_source_format() - int streamrecorder_get_video_source_format( - streamrecorder_h recorder, - ffi.Pointer format, - ) { - return _streamrecorder_get_video_source_format( - recorder, - format, - ); - } - - late final _streamrecorder_get_video_source_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, ffi.Pointer)>>( - 'streamrecorder_get_video_source_format'); - late final _streamrecorder_get_video_source_format = - _streamrecorder_get_video_source_formatPtr - .asFunction)>(); - - /// @brief Sets the maximum size of a recording file. - /// @since_tizen 3.0 - /// @remarks After reaching the limitation, the recording data is discarded and not written in the recording file. - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] type The recording limit type - /// @param[in] limit If limit type is STREAMRECORDER_RECORDING_LIMIT_TYPE_SIZE, the limit value is the maximum size of the recording file(KB), \n - /// otherwise limit value is the maximum time of the recording file (in seconds) \n - /// @c 0 means unlimited recording size or time. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n - /// streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_get_recording_limit() - int streamrecorder_set_recording_limit( - streamrecorder_h recorder, - int type, - int limit, - ) { - return _streamrecorder_set_recording_limit( - recorder, - type, - limit, - ); - } - - late final _streamrecorder_set_recording_limitPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, ffi.Int32, - ffi.Int)>>('streamrecorder_set_recording_limit'); - late final _streamrecorder_set_recording_limit = - _streamrecorder_set_recording_limitPtr - .asFunction(); - - /// @brief Gets the maximum size of a recording file. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] type The recording limit type - /// @param[out] limit If limit type is STREAMRECORDER_RECORDING_LIMIT_TYPE_SIZE, the limit value is the maximum size of the recording file(KB), \n - /// otherwise limit value is the maximum time of the recording file (in seconds) \n - /// @c 0 means unlimited recording size or time. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_set_recording_limit() - int streamrecorder_get_recording_limit( - streamrecorder_h recorder, - int type, - ffi.Pointer limit, - ) { - return _streamrecorder_get_recording_limit( - recorder, - type, - limit, - ); - } - - late final _streamrecorder_get_recording_limitPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, ffi.Int32, - ffi.Pointer)>>('streamrecorder_get_recording_limit'); - late final _streamrecorder_get_recording_limit = - _streamrecorder_get_recording_limitPtr.asFunction< - int Function(streamrecorder_h, int, ffi.Pointer)>(); - - /// @brief Sets the sampling rate of an audio stream. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] samplerate The sample rate in Hertz - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n - /// streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_get_audio_samplerate() - int streamrecorder_set_audio_samplerate( - streamrecorder_h recorder, - int samplerate, - ) { - return _streamrecorder_set_audio_samplerate( - recorder, - samplerate, - ); - } - - late final _streamrecorder_set_audio_sampleratePtr = - _lookup>( - 'streamrecorder_set_audio_samplerate'); - late final _streamrecorder_set_audio_samplerate = - _streamrecorder_set_audio_sampleratePtr - .asFunction(); - - /// @brief Gets the sampling rate of an audio stream. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[out] samplerate The sample rate in Hertz - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_set_audio_samplerate() - int streamrecorder_get_audio_samplerate( - streamrecorder_h recorder, - ffi.Pointer samplerate, - ) { - return _streamrecorder_get_audio_samplerate( - recorder, - samplerate, - ); - } - - late final _streamrecorder_get_audio_sampleratePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, - ffi.Pointer)>>('streamrecorder_get_audio_samplerate'); - late final _streamrecorder_get_audio_samplerate = - _streamrecorder_get_audio_sampleratePtr - .asFunction)>(); - - /// @brief Sets the bitrate of an audio encoder. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] bitrate The bitrate (for mms : 12200[bps], normal : 288000[bps]) - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n - /// streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_get_audio_encoder_bitrate() - int streamrecorder_set_audio_encoder_bitrate( - streamrecorder_h recorder, - int bitrate, - ) { - return _streamrecorder_set_audio_encoder_bitrate( - recorder, - bitrate, - ); - } - - late final _streamrecorder_set_audio_encoder_bitratePtr = - _lookup>( - 'streamrecorder_set_audio_encoder_bitrate'); - late final _streamrecorder_set_audio_encoder_bitrate = - _streamrecorder_set_audio_encoder_bitratePtr - .asFunction(); - - /// @brief Sets the bitrate of a video encoder. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] bitrate The bitrate in bits per second - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n - /// streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_get_video_encoder_bitrate() - int streamrecorder_set_video_encoder_bitrate( - streamrecorder_h recorder, - int bitrate, - ) { - return _streamrecorder_set_video_encoder_bitrate( - recorder, - bitrate, - ); - } - - late final _streamrecorder_set_video_encoder_bitratePtr = - _lookup>( - 'streamrecorder_set_video_encoder_bitrate'); - late final _streamrecorder_set_video_encoder_bitrate = - _streamrecorder_set_video_encoder_bitratePtr - .asFunction(); - - /// @brief Gets the bitrate of an audio encoder. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[out] bitrate The bitrate in bits per second - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_set_audio_encoder_bitrate() - int streamrecorder_get_audio_encoder_bitrate( - streamrecorder_h recorder, - ffi.Pointer bitrate, - ) { - return _streamrecorder_get_audio_encoder_bitrate( - recorder, - bitrate, - ); - } - - late final _streamrecorder_get_audio_encoder_bitratePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, ffi.Pointer)>>( - 'streamrecorder_get_audio_encoder_bitrate'); - late final _streamrecorder_get_audio_encoder_bitrate = - _streamrecorder_get_audio_encoder_bitratePtr - .asFunction)>(); - - /// @brief Gets the bitrate of a video encoder. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[out] bitrate The bitrate in bits per second - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_set_audio_encoder_bitrate() - int streamrecorder_get_video_encoder_bitrate( - streamrecorder_h recorder, - ffi.Pointer bitrate, - ) { - return _streamrecorder_get_video_encoder_bitrate( - recorder, - bitrate, - ); - } - - late final _streamrecorder_get_video_encoder_bitratePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, ffi.Pointer)>>( - 'streamrecorder_get_video_encoder_bitrate'); - late final _streamrecorder_get_video_encoder_bitrate = - _streamrecorder_get_video_encoder_bitratePtr - .asFunction)>(); - - /// @brief Sets the number of the audio channel. - /// @since_tizen 3.0 - /// @remarks This attribute is applied only in STREAMRECORDER_STATE_CREATED state. \n - /// For mono recording, setting channel to @c 1. \n - /// For stereo recording, setting channel to @c 2. - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] channel_count The number of the audio channel - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED.\n - /// streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_get_audio_channel() - int streamrecorder_set_audio_channel( - streamrecorder_h recorder, - int channel_count, - ) { - return _streamrecorder_set_audio_channel( - recorder, - channel_count, - ); - } - - late final _streamrecorder_set_audio_channelPtr = - _lookup>( - 'streamrecorder_set_audio_channel'); - late final _streamrecorder_set_audio_channel = - _streamrecorder_set_audio_channelPtr - .asFunction(); - - /// @brief Gets the number of the audio channel. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[out] channel_count The number of the audio channel - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_set_audio_channel() - int streamrecorder_get_audio_channel( - streamrecorder_h recorder, - ffi.Pointer channel_count, - ) { - return _streamrecorder_get_audio_channel( - recorder, - channel_count, - ); - } - - late final _streamrecorder_get_audio_channelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, - ffi.Pointer)>>('streamrecorder_get_audio_channel'); - late final _streamrecorder_get_audio_channel = - _streamrecorder_get_audio_channelPtr - .asFunction)>(); - - /// @brief Retrieves all supported file formats by invoking a specific callback for each supported file format. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] callback The iteration callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @post streamrecorder_supported_file_format_cb() will be invoked. - /// @see streamrecorder_get_file_format() - /// @see streamrecorder_set_file_format() - /// @see streamrecorder_supported_file_format_cb() - int streamrecorder_foreach_supported_file_format( - streamrecorder_h recorder, - streamrecorder_supported_file_format_cb callback, - ffi.Pointer user_data, - ) { - return _streamrecorder_foreach_supported_file_format( - recorder, - callback, - user_data, - ); - } - - late final _streamrecorder_foreach_supported_file_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - streamrecorder_h, - streamrecorder_supported_file_format_cb, - ffi.Pointer)>>( - 'streamrecorder_foreach_supported_file_format'); - late final _streamrecorder_foreach_supported_file_format = - _streamrecorder_foreach_supported_file_formatPtr.asFunction< - int Function( - streamrecorder_h, - streamrecorder_supported_file_format_cb, - ffi.Pointer)>(); - - /// @brief Retrieves all supported audio encoders by invoking a specific callback for each supported audio encoder. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] callback The iteration callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @post streamrecorder_supported_audio_encoder_cb() will be invoked. - /// @see streamrecorder_set_audio_encoder() - /// @see streamrecorder_get_audio_encoder() - /// @see streamrecorder_supported_audio_encoder_cb() - int streamrecorder_foreach_supported_audio_encoder( - streamrecorder_h recorder, - streamrecorder_supported_audio_encoder_cb callback, - ffi.Pointer user_data, - ) { - return _streamrecorder_foreach_supported_audio_encoder( - recorder, - callback, - user_data, - ); - } - - late final _streamrecorder_foreach_supported_audio_encoderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - streamrecorder_h, - streamrecorder_supported_audio_encoder_cb, - ffi.Pointer)>>( - 'streamrecorder_foreach_supported_audio_encoder'); - late final _streamrecorder_foreach_supported_audio_encoder = - _streamrecorder_foreach_supported_audio_encoderPtr.asFunction< - int Function( - streamrecorder_h, - streamrecorder_supported_audio_encoder_cb, - ffi.Pointer)>(); - - /// @brief Retrieves all supported video encoders by invoking a specific callback for each supported video encoder. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] callback The iteration callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @post streamrecorder_supported_video_encoder_cb() will be invoked. - /// @see streamrecorder_set_video_encoder() - /// @see streamrecorder_get_video_encoder() - /// @see streamrecorder_supported_video_encoder_cb() - int streamrecorder_foreach_supported_video_encoder( - streamrecorder_h recorder, - streamrecorder_supported_video_encoder_cb callback, - ffi.Pointer user_data, - ) { - return _streamrecorder_foreach_supported_video_encoder( - recorder, - callback, - user_data, - ); - } - - late final _streamrecorder_foreach_supported_video_encoderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - streamrecorder_h, - streamrecorder_supported_video_encoder_cb, - ffi.Pointer)>>( - 'streamrecorder_foreach_supported_video_encoder'); - late final _streamrecorder_foreach_supported_video_encoder = - _streamrecorder_foreach_supported_video_encoderPtr.asFunction< - int Function( - streamrecorder_h, - streamrecorder_supported_video_encoder_cb, - ffi.Pointer)>(); - - /// @brief Retrieves all supported video resolutions by invoking callback function once for each supported video resolution. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] foreach_cb The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @post This function invokes streamrecorder_supported_video_resolution_cb() repeatedly to retrieve each supported video resolution. - /// @see streamrecorder_set_video_resolution() - /// @see streamrecorder_get_video_resolution() - /// @see streamrecorder_supported_video_resolution_cb() - int streamrecorder_foreach_supported_video_resolution( - streamrecorder_h recorder, - streamrecorder_supported_video_resolution_cb foreach_cb, - ffi.Pointer user_data, - ) { - return _streamrecorder_foreach_supported_video_resolution( - recorder, - foreach_cb, - user_data, - ); - } - - late final _streamrecorder_foreach_supported_video_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - streamrecorder_h, - streamrecorder_supported_video_resolution_cb, - ffi.Pointer)>>( - 'streamrecorder_foreach_supported_video_resolution'); - late final _streamrecorder_foreach_supported_video_resolution = - _streamrecorder_foreach_supported_video_resolutionPtr.asFunction< - int Function( - streamrecorder_h, - streamrecorder_supported_video_resolution_cb, - ffi.Pointer)>(); - - /// @brief Registers the callback function that will be invoked when the streamrecorder get some notification. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] callback The function pointer of user callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @post streamrecorder_notify_cb() will be invoked. - /// @see streamrecorder_unset_notify_cb() - /// @see streamrecorder_notify_cb() - int streamrecorder_set_notify_cb( - streamrecorder_h recorder, - streamrecorder_notify_cb callback, - ffi.Pointer user_data, - ) { - return _streamrecorder_set_notify_cb( - recorder, - callback, - user_data, - ); - } - - late final _streamrecorder_set_notify_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, streamrecorder_notify_cb, - ffi.Pointer)>>('streamrecorder_set_notify_cb'); - late final _streamrecorder_set_notify_cb = - _streamrecorder_set_notify_cbPtr.asFunction< - int Function(streamrecorder_h, streamrecorder_notify_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see streamrecorder_set_notify_cb() - int streamrecorder_unset_notify_cb( - streamrecorder_h recorder, - ) { - return _streamrecorder_unset_notify_cb( - recorder, - ); - } - - late final _streamrecorder_unset_notify_cbPtr = - _lookup>( - 'streamrecorder_unset_notify_cb'); - late final _streamrecorder_unset_notify_cb = - _streamrecorder_unset_notify_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be invoked when the recording information changes. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] callback The function pointer of user callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @post streamrecorder_recording_status_cb() will be invoked. - /// @see streamrecorder_unset_recording_status_cb() - /// @see streamrecorder_recording_status_cb() - int streamrecorder_set_recording_status_cb( - streamrecorder_h recorder, - streamrecorder_recording_status_cb callback, - ffi.Pointer user_data, - ) { - return _streamrecorder_set_recording_status_cb( - recorder, - callback, - user_data, - ); - } - - late final _streamrecorder_set_recording_status_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, - streamrecorder_recording_status_cb, ffi.Pointer)>>( - 'streamrecorder_set_recording_status_cb'); - late final _streamrecorder_set_recording_status_cb = - _streamrecorder_set_recording_status_cbPtr.asFunction< - int Function(streamrecorder_h, streamrecorder_recording_status_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see streamrecorder_set_recording_status_cb() - int streamrecorder_unset_recording_status_cb( - streamrecorder_h recorder, - ) { - return _streamrecorder_unset_recording_status_cb( - recorder, - ); - } - - late final _streamrecorder_unset_recording_status_cbPtr = - _lookup>( - 'streamrecorder_unset_recording_status_cb'); - late final _streamrecorder_unset_recording_status_cb = - _streamrecorder_unset_recording_status_cbPtr - .asFunction(); - - /// @brief Registers the callback function to be run when reached the recording limit. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to treamrecorder - /// @param[in] callback The function pointer of user callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @post streamrecorder_recording_limit_reached_cb() will be invoked. - /// @see streamrecorder_unset_recording_limit_reached_cb() - /// @see streamrecorder_set_size_limit() - /// @see streamrecorder_set_time_limit() - /// @see streamrecorder_recording_limit_reached_cb() - int streamrecorder_set_recording_limit_reached_cb( - streamrecorder_h recorder, - streamrecorder_recording_limit_reached_cb callback, - ffi.Pointer user_data, - ) { - return _streamrecorder_set_recording_limit_reached_cb( - recorder, - callback, - user_data, - ); - } - - late final _streamrecorder_set_recording_limit_reached_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - streamrecorder_h, - streamrecorder_recording_limit_reached_cb, - ffi.Pointer)>>( - 'streamrecorder_set_recording_limit_reached_cb'); - late final _streamrecorder_set_recording_limit_reached_cb = - _streamrecorder_set_recording_limit_reached_cbPtr.asFunction< - int Function( - streamrecorder_h, - streamrecorder_recording_limit_reached_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see streamrecorder_set_recording_limit_reached_cb() - int streamrecorder_unset_recording_limit_reached_cb( - streamrecorder_h recorder, - ) { - return _streamrecorder_unset_recording_limit_reached_cb( - recorder, - ); - } - - late final _streamrecorder_unset_recording_limit_reached_cbPtr = - _lookup>( - 'streamrecorder_unset_recording_limit_reached_cb'); - late final _streamrecorder_unset_recording_limit_reached_cb = - _streamrecorder_unset_recording_limit_reached_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be called when an asynchronous operation error occurred. - /// @since_tizen 3.0 - /// @remarks This callback informs critical error situation.\n - /// When this callback is invoked, user should release the resource and terminate the application. \n - /// These error codes will occur. \n - /// #STREAMRECORDER_ERROR_INVALID_OPERATION \n - /// #STREAMRECORDER_ERROR_OUT_OF_MEMORY - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @post This function will invoke streamrecorder_error_cb() when an asynchronous operation error occur. - /// @see streamrecorder_unset_error_cb() - /// @see streamrecorder_error_cb() - int streamrecorder_set_error_cb( - streamrecorder_h recorder, - streamrecorder_error_cb callback, - ffi.Pointer user_data, - ) { - return _streamrecorder_set_error_cb( - recorder, - callback, - user_data, - ); - } - - late final _streamrecorder_set_error_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, streamrecorder_error_cb, - ffi.Pointer)>>('streamrecorder_set_error_cb'); - late final _streamrecorder_set_error_cb = - _streamrecorder_set_error_cbPtr.asFunction< - int Function(streamrecorder_h, streamrecorder_error_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @return @c on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see streamrecorder_set_error_cb() - int streamrecorder_unset_error_cb( - streamrecorder_h recorder, - ) { - return _streamrecorder_unset_error_cb( - recorder, - ); - } - - late final _streamrecorder_unset_error_cbPtr = - _lookup>( - 'streamrecorder_unset_error_cb'); - late final _streamrecorder_unset_error_cb = _streamrecorder_unset_error_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be called when asynchronous buffers are consumed. - /// @since_tizen 3.0 - /// @remarks This callback informs to user dealloc buffer.\n - /// When this callback is invoked, user should release the buffer or media packet. \n - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see streamrecorder_unset_buffer_consume_completed_cb() - /// @see streamrecorder_push_stream_buffer() - int streamrecorder_set_buffer_consume_completed_cb( - streamrecorder_h recorder, - streamrecorder_consume_completed_cb callback, - ffi.Pointer user_data, - ) { - return _streamrecorder_set_buffer_consume_completed_cb( - recorder, - callback, - user_data, - ); - } - - late final _streamrecorder_set_buffer_consume_completed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, - streamrecorder_consume_completed_cb, ffi.Pointer)>>( - 'streamrecorder_set_buffer_consume_completed_cb'); - late final _streamrecorder_set_buffer_consume_completed_cb = - _streamrecorder_set_buffer_consume_completed_cbPtr.asFunction< - int Function(streamrecorder_h, streamrecorder_consume_completed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @return @c on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see streamrecorder_set_buffer_consume_completed_cb() - int streamrecorder_unset_buffer_consume_completed_cb( - streamrecorder_h recorder, - ) { - return _streamrecorder_unset_buffer_consume_completed_cb( - recorder, - ); - } - - late final _streamrecorder_unset_buffer_consume_completed_cbPtr = - _lookup>( - 'streamrecorder_unset_buffer_consume_completed_cb'); - late final _streamrecorder_unset_buffer_consume_completed_cb = - _streamrecorder_unset_buffer_consume_completed_cbPtr - .asFunction(); - - /// @brief Creates thumbnail info handle. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a thumb info using thumbnail_util_destroy(). - /// - /// @param[in] thumb The handle to thumbnail info - /// - /// @return @c 0 on success, otherwise a negative error value - /// - /// @retval #THUMBNAIL_UTIL_ERROR_NONE Successful - /// @retval #THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #THUMBNAIL_UTIL_ERROR_OUT_OF_MEMORY Not enough memory is available - /// @retval #THUMBNAIL_UTIL_ERROR_PERMISSION_DENIED Permission denied - /// - /// @see thumbnail_util_destroy() - int thumbnail_util_create( - ffi.Pointer thumb, - ) { - return _thumbnail_util_create( - thumb, - ); - } - - late final _thumbnail_util_createPtr = - _lookup)>>( - 'thumbnail_util_create'); - late final _thumbnail_util_create = _thumbnail_util_createPtr - .asFunction)>(); - - /// @brief Extracts the thumbnail for the given media, asynchronously. - /// @details This function extracts the thumbnail for given media item and calls registered - /// callback function for completion of extracting the thumbnail.\n - /// You can distinguish generated thumbnails by @a request_id. Therefore, the @a request_id must be maintained until the request is completed. \n - /// And the @a request_id is also used to cancel the request. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks You must release @a request_id using free(). \n - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage. \n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n - /// If you don't set the size, the thumbnail size will be set default size. Default size is 320x240. \n - /// Color space of the generated thumbnail is BGRA. \n - /// Since 3.0, http://tizen.org/privilege/content.write privilege is not required. \n - /// - /// @param[in] thumb The thumbnail info handle - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] request_id The request id for the thumbnail extraction request - /// - /// @return @c 0 on success, otherwise a negative error value - /// - /// @retval #THUMBNAIL_UTIL_ERROR_NONE Successful - /// @retval #THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #THUMBNAIL_UTIL_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Create a thumbnail info handle by calling thumbnail_util_create(). \n - /// The content path that you want to generate thumbnail must be set by calling thumbnail_util_set_path(). - /// @post Thumbnail extraction result except canceled is provided by thumbnail_extracted_cb(). - /// @see thumbnail_util_create() - /// @see thumbnail_util_set_path() - /// @see thumbnail_util_set_size() - /// @see thumbnail_extracted_cb() - /// @see thumbnail_util_cancel() - /// @see thumbnail_util_cancel_all() - /// @see thumbnail_util_destroy() - int thumbnail_util_extract( - thumbnail_h thumb, - thumbnail_extracted_cb callback, - ffi.Pointer user_data, - ffi.Pointer> request_id, - ) { - return _thumbnail_util_extract( - thumb, - callback, - user_data, - request_id, - ); - } - - late final _thumbnail_util_extractPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - thumbnail_h, - thumbnail_extracted_cb, - ffi.Pointer, - ffi.Pointer>)>>('thumbnail_util_extract'); - late final _thumbnail_util_extract = _thumbnail_util_extractPtr.asFunction< - int Function(thumbnail_h, thumbnail_extracted_cb, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Sets the path of original media file. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] thumb The thumbnail info handle - /// @param[in] path The path of the original media file - /// - /// @return @c 0 on success, otherwise a negative error value - /// - /// @retval #THUMBNAIL_UTIL_ERROR_NONE Successful - /// @retval #THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #THUMBNAIL_UTIL_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Create a thumbnail info handle by calling thumbnail_util_create(). - /// @see thumbnail_util_create() - /// @see thumbnail_util_set_size() - /// @see thumbnail_util_destroy() - int thumbnail_util_set_path( - thumbnail_h thumb, - ffi.Pointer path, - ) { - return _thumbnail_util_set_path( - thumb, - path, - ); - } - - late final _thumbnail_util_set_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - thumbnail_h, ffi.Pointer)>>('thumbnail_util_set_path'); - late final _thumbnail_util_set_path = _thumbnail_util_set_pathPtr - .asFunction)>(); - - /// @brief Sets the size of thumbnail to be extracted. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks If you don't set the size, the thumbnail size will be set default size. Default size is 320x240. \n - /// If the set width is not a multiple of 8, it can be changed by inner process. the width will be a multiple of 8 greater than the set value. - /// - /// @param[in] thumb The thumbnail info handle - /// @param[in] width The width of the thumbnail - /// @param[in] height The height of the thumbnail - /// - /// @return @c 0 on success, otherwise a negative error value - /// - /// @retval #THUMBNAIL_UTIL_ERROR_NONE Successful - /// @retval #THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #THUMBNAIL_UTIL_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Create a thumbnail info handle by calling thumbnail_util_create(). - /// @see thumbnail_util_create() - /// @see thumbnail_util_set_path() - /// @see thumbnail_util_destroy() - int thumbnail_util_set_size( - thumbnail_h thumb, - int width, - int height, - ) { - return _thumbnail_util_set_size( - thumb, - width, - height, - ); - } - - late final _thumbnail_util_set_sizePtr = _lookup< - ffi.NativeFunction>( - 'thumbnail_util_set_size'); - late final _thumbnail_util_set_size = _thumbnail_util_set_sizePtr - .asFunction(); - - /// @brief Cancels the thumbnail extraction request for the given media. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks If there is no item you want to cancel, this API return MEDIA_CONTENT_ERROR_INVALID_OPERATION - /// - /// @param[in] thumb The media thumbnail info handle - /// @param[in] request_id The generated request id by thumbnail extraction request - /// - /// @return @c 0 on success, otherwise a negative error value - /// - /// @retval #THUMBNAIL_UTIL_ERROR_NONE Successful - /// @retval #THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #THUMBNAIL_UTIL_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre It is available before thumbnail_extracted_cb() is called. - /// @see thumbnail_util_extract() - int thumbnail_util_cancel( - thumbnail_h thumb, - ffi.Pointer request_id, - ) { - return _thumbnail_util_cancel( - thumb, - request_id, - ); - } - - late final _thumbnail_util_cancelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - thumbnail_h, ffi.Pointer)>>('thumbnail_util_cancel'); - late final _thumbnail_util_cancel = _thumbnail_util_cancelPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. Use thumbnail_util_cancel() instead. - /// @brief Cancels all thumbnail extraction requests associated with the given thumbnail info handle. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks If there is no item you want to cancel, this API return MEDIA_CONTENT_ERROR_INVALID_OPERATION - /// - /// @param[in] thumb The media thumbnail info handle - /// - /// @return @c 0 on success, otherwise a negative error value - /// - /// @retval #THUMBNAIL_UTIL_ERROR_NONE Successful - /// @retval #THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #THUMBNAIL_UTIL_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre It is available before thumbnail_extracted_cb() is called. - /// @see thumbnail_util_extract() - int thumbnail_util_cancel_all( - thumbnail_h thumb, - ) { - return _thumbnail_util_cancel_all( - thumb, - ); - } - - late final _thumbnail_util_cancel_allPtr = - _lookup>( - 'thumbnail_util_cancel_all'); - late final _thumbnail_util_cancel_all = - _thumbnail_util_cancel_allPtr.asFunction(); - - /// @brief Destroys thumbnail info handle. - /// @details The function frees all resources related to the thumbnail info handle. This handle - /// can no longer be used to perform any operation. New thumbnail info handle has to - /// be created before the next usage. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] thumb The thumbnail info handle - /// - /// @return @c 0 on success, otherwise a negative error value - /// - /// @retval #THUMBNAIL_UTIL_ERROR_NONE Successful - /// @retval #THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #THUMBNAIL_UTIL_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Create a thumbnail info handle by calling thumbnail_util_create(). - /// @see thumbnail_util_create() - int thumbnail_util_destroy( - thumbnail_h thumb, - ) { - return _thumbnail_util_destroy( - thumb, - ); - } - - late final _thumbnail_util_destroyPtr = - _lookup>( - 'thumbnail_util_destroy'); - late final _thumbnail_util_destroy = - _thumbnail_util_destroyPtr.asFunction(); - - /// @deprecated Deprecated since 3.0. Use tone_player_start_new() instead. - /// @brief Plays a tone. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks Sound can be mixed with other sounds if you don't control the sound session in sound-manager module since 3.0.\n - /// You can refer to @ref CAPI_MEDIA_SOUND_MANAGER_MODULE. - /// - /// @param[in] tone The tone type to play - /// @param[in] type The sound type - /// @param[in] duration_ms The tone duration in milliseconds \n - /// @c -1 indicates an infinite duration. - /// @param[out] id The tone player ID ( can be set to @c NULL ) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TONE_PLAYER_ERROR_NONE Successful - /// @retval #TONE_PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TONE_PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see tone_player_stop() - int tone_player_start( - int tone, - int type, - int duration_ms, - ffi.Pointer id, - ) { - return _tone_player_start( - tone, - type, - duration_ms, - id, - ); - } - - late final _tone_player_startPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Int32, ffi.Int, - ffi.Pointer)>>('tone_player_start'); - late final _tone_player_start = _tone_player_startPtr - .asFunction)>(); - - /// @brief Plays a tone with stream information of sound-manager. - /// - /// @since_tizen 3.0 - /// - /// @remarks Voice Recognition stream type is not supported in this API. - /// - /// @param[in] tone The tone type to play - /// @param[in] stream_info The sound stream information handle - /// @param[in] duration_ms The tone duration in milliseconds \n - /// @c -1 indicates an infinite duration. - /// @param[out] id The tone player ID ( can be set to @c NULL ) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TONE_PLAYER_ERROR_NONE Successful - /// @retval #TONE_PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TONE_PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #TONE_PLAYER_ERROR_NOT_SUPPORTED_TYPE Not supported stream type - /// - /// @see tone_player_stop() - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - int tone_player_start_new( - int tone, - sound_stream_info_h stream_info, - int duration_ms, - ffi.Pointer id, - ) { - return _tone_player_start_new( - tone, - stream_info, - duration_ms, - id, - ); - } - - late final _tone_player_start_newPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, sound_stream_info_h, ffi.Int, - ffi.Pointer)>>('tone_player_start_new'); - late final _tone_player_start_new = _tone_player_start_newPtr.asFunction< - int Function(int, sound_stream_info_h, int, ffi.Pointer)>(); - - /// @brief Stops playing the tone. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] id The tone player ID to stop - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #TONE_PLAYER_ERROR_NONE Successful - /// @retval #TONE_PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TONE_PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see tone_player_start() - int tone_player_stop( - int id, - ) { - return _tone_player_stop( - id, - ); - } - - late final _tone_player_stopPtr = - _lookup>( - 'tone_player_stop'); - late final _tone_player_stop = - _tone_player_stopPtr.asFunction(); - - /// @brief Creates a handle to video util. - /// @since_tizen 2.3 - /// - /// @details This function creates a handle to video util. - /// - /// @remarks You must release the @a video util handle using video_util_destroy().\n - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. - /// - /// @param[out] handle A handle to video util - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #VIDEO_UTIL_ERROR_NONE Successful - /// @retval #VIDEO_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VIDEO_UTIL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #VIDEO_UTIL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VIDEO_UTIL_ERROR_NOT_SUPPORTED Not supported - /// - /// @see video_util_destroy() - int video_util_create( - ffi.Pointer handle, - ) { - return _video_util_create( - handle, - ); - } - - late final _video_util_createPtr = - _lookup)>>( - 'video_util_create'); - late final _video_util_create = _video_util_createPtr - .asFunction)>(); - - /// @brief Destroys a handle to video util. - /// @since_tizen 2.3 - /// - /// @details The function frees all resources related to the video util handle. The video util - /// handle no longer can be used to perform any operation. A new video util handle - /// has to be created before the next usage. - /// - /// @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage.\n - /// - /// @param[in] handle The handle to video util - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #VIDEO_UTIL_ERROR_NONE Successful - /// @retval #VIDEO_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VIDEO_UTIL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VIDEO_UTIL_ERROR_NOT_SUPPORTED Not supported - /// - /// @see video_util_create() - int video_util_destroy( - video_util_h handle, - ) { - return _video_util_destroy( - handle, - ); - } - - late final _video_util_destroyPtr = - _lookup>( - 'video_util_destroy'); - late final _video_util_destroy = - _video_util_destroyPtr.asFunction(); - - /// @brief Sets the video util's file path. - /// @since_tizen 2.3 - /// - /// @details This function sets the source @a path to transcode. - /// - /// @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. - /// - /// @param[in] handle The handle to video util - /// @param[in] path The source file path - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #VIDEO_UTIL_ERROR_NONE Successful - /// @retval #VIDEO_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VIDEO_UTIL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #VIDEO_UTIL_ERROR_NOT_SUPPORTED Not supported - /// - /// @retval #VIDEO_UTIL_ERROR_PERMISSION_DENIED Permission denied - /// - /// @see video_util_create() - /// @see video_util_destroy() - int video_util_set_file_path( - video_util_h handle, - ffi.Pointer path, - ) { - return _video_util_set_file_path( - handle, - path, - ); - } - - late final _video_util_set_file_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(video_util_h, - ffi.Pointer)>>('video_util_set_file_path'); - late final _video_util_set_file_path = _video_util_set_file_pathPtr - .asFunction)>(); - - /// @brief Sets the video util's accurate mode. - /// @since_tizen 2.3 - /// - /// @remarks If you do not set this, the default value is @c false.\n - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. - /// - /// @param[in] handle The handle to video util - /// @param[in] mode Set @c true if the user can get an accurated frame for given the duration in video_util_start_transcoding(), - /// otherwise set @c false if user can only get the nearest i-frame - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #VIDEO_UTIL_ERROR_NONE Successful - /// @retval #VIDEO_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VIDEO_UTIL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VIDEO_UTIL_ERROR_NOT_SUPPORTED Not supported - /// - /// @see video_util_create() - /// @see video_util_destroy() - int video_util_set_accurate_mode( - video_util_h handle, - bool mode, - ) { - return _video_util_set_accurate_mode( - handle, - mode, - ); - } - - late final _video_util_set_accurate_modePtr = - _lookup>( - 'video_util_set_accurate_mode'); - late final _video_util_set_accurate_mode = _video_util_set_accurate_modePtr - .asFunction(); - - /// @brief Sets the video codec for encoding video stream. - /// @since_tizen 2.3 - /// - /// @remarks You can get available list of video codec by using video_util_foreach_supported_video_codec().\n - /// If you do not set this, the default codec is #VIDEO_UTIL_VIDEO_CODEC_MPEG4.\n - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. - /// - /// @param[in] handle The handle to video util - /// @param[in] codec The video codec - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VIDEO_UTIL_ERROR_NONE Successful - /// @retval #VIDEO_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VIDEO_UTIL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VIDEO_UTIL_ERROR_NOT_SUPPORTED_FORMAT Not supported format - /// @retval #VIDEO_UTIL_ERROR_NOT_SUPPORTED Not supported - /// - /// @see video_util_create() - /// @see video_util_destroy() - /// @see video_util_foreach_supported_video_codec() - int video_util_set_video_codec( - video_util_h handle, - int codec, - ) { - return _video_util_set_video_codec( - handle, - codec, - ); - } - - late final _video_util_set_video_codecPtr = - _lookup>( - 'video_util_set_video_codec'); - late final _video_util_set_video_codec = _video_util_set_video_codecPtr - .asFunction(); - - /// @brief Sets the audio codec for encoding audio stream. - /// @since_tizen 2.3 - /// - /// @remarks You can get available list of audio codec by using video_util_foreach_supported_audio_codec().\n - /// If you do not set this, the default codec is #VIDEO_UTIL_AUDIO_CODEC_AAC.\n - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. - /// - /// @param[in] handle The handle to video util - /// @param[in] codec The audio codec - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #VIDEO_UTIL_ERROR_NONE Successful - /// @retval #VIDEO_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VIDEO_UTIL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VIDEO_UTIL_ERROR_NOT_SUPPORTED_FORMAT Not supported format - /// @retval #VIDEO_UTIL_ERROR_NOT_SUPPORTED Not supported - /// - /// @see video_util_create() - /// @see video_util_destroy() - /// @see video_util_foreach_supported_audio_codec() - int video_util_set_audio_codec( - video_util_h handle, - int codec, - ) { - return _video_util_set_audio_codec( - handle, - codec, - ); - } - - late final _video_util_set_audio_codecPtr = - _lookup>( - 'video_util_set_audio_codec'); - late final _video_util_set_audio_codec = _video_util_set_audio_codecPtr - .asFunction(); - - /// @brief Sets the file format for transcoding media stream. - /// @since_tizen 2.3 - /// - /// @remarks You can get available list of media formats by using video_util_foreach_supported_file_format().\n - /// If you do not set this, the default file format is #VIDEO_UTIL_FILE_FORMAT_3GP.\n - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. - /// - /// @param[in] handle The handle to video util - /// @param[in] format The media file format - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #VIDEO_UTIL_ERROR_NONE Successful - /// @retval #VIDEO_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VIDEO_UTIL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VIDEO_UTIL_ERROR_NOT_SUPPORTED Not supported - /// - /// @see video_util_create() - /// @see video_util_destroy() - /// @see video_util_foreach_supported_file_format() - int video_util_set_file_format( - video_util_h handle, - int format, - ) { - return _video_util_set_file_format( - handle, - format, - ); - } - - late final _video_util_set_file_formatPtr = - _lookup>( - 'video_util_set_file_format'); - late final _video_util_set_file_format = _video_util_set_file_formatPtr - .asFunction(); - - /// @brief Sets the resolution(width and height). - /// @since_tizen 2.3 - /// - /// @remarks If you do not set, the default resolution is original size.\n - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. - /// - /// @param[in] handle The handle to video util - /// @param[in] width The media's width \n - /// If the width is 0, it set original size.(minimum value is 128) - /// @param[in] height The media's height \n - /// If the height is 0, it set original size.(minimum value is 96) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #VIDEO_UTIL_ERROR_NONE Successful - /// @retval #VIDEO_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VIDEO_UTIL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VIDEO_UTIL_ERROR_NOT_SUPPORTED Not supported - /// - /// @see video_util_create() - /// @see video_util_destroy() - int video_util_set_resolution( - video_util_h handle, - int width, - int height, - ) { - return _video_util_set_resolution( - handle, - width, - height, - ); - } - - late final _video_util_set_resolutionPtr = _lookup< - ffi.NativeFunction>( - 'video_util_set_resolution'); - late final _video_util_set_resolution = _video_util_set_resolutionPtr - .asFunction(); - - /// @brief Sets the frame rate. - /// @since_tizen 2.3 - /// - /// @remarks If fps is set @c 0, the default is original fps from source.\n - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. - /// - /// @param[in] handle The handle to video util - /// - /// @param[in] fps The frame rate(minimum value is 5, maximum value is 30) - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #VIDEO_UTIL_ERROR_NONE Successful - /// @retval #VIDEO_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VIDEO_UTIL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VIDEO_UTIL_ERROR_NOT_SUPPORTED Not supported - /// - /// @see video_util_create() - /// @see video_util_destroy() - int video_util_set_fps( - video_util_h handle, - int fps, - ) { - return _video_util_set_fps( - handle, - fps, - ); - } - - late final _video_util_set_fpsPtr = - _lookup>( - 'video_util_set_fps'); - late final _video_util_set_fps = - _video_util_set_fpsPtr.asFunction(); - - /// @brief Transcodes the video for given video util handle. - /// @since_tizen 2.3 - /// - /// @details This function starts the transcoding from start time and for given duration.\n - /// #video_util_transcoding_progress_cb() function is called during the video transcoding regularly after some interval.\n - /// #video_util_transcoding_completed_cb() function is called and the transcoded video will be saved at the given output path when transcoding is finished. - /// - /// @remarks If there already exists same file in file system, then old file will be overwritten.\n - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. - /// - /// @param[in] handle The handle to video util - /// @param[in] start The start position to transcode - /// @param[in] duration The duration in seconds \n - /// if duration is @c 0, transcoding happens until end of the video. - /// @param[out] out_path The file path to save - /// @param[in] progress_cb The callback function to be invoked - /// @param[in] completed_cb The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #VIDEO_UTIL_ERROR_NONE Successful - /// @retval #VIDEO_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VIDEO_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// @retval #VIDEO_UTIL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VIDEO_UTIL_ERROR_NOT_SUPPORTED Not supported - /// - /// @see video_util_create() - /// @see video_util_destroy() - /// @see video_util_transcoding_progress_cb() - /// @see video_util_transcoding_completed_cb() - /// @see video_util_get_progress_transcoding() - /// @see video_util_cancel_transcoding() - int video_util_start_transcoding( - video_util_h handle, - int start, - int duration, - ffi.Pointer out_path, - video_util_transcoding_progress_cb progress_cb, - video_util_transcoding_completed_cb completed_cb, - ffi.Pointer user_data, - ) { - return _video_util_start_transcoding( - handle, - start, - duration, - out_path, - progress_cb, - completed_cb, - user_data, - ); - } - - late final _video_util_start_transcodingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - video_util_h, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Pointer, - video_util_transcoding_progress_cb, - video_util_transcoding_completed_cb, - ffi.Pointer)>>('video_util_start_transcoding'); - late final _video_util_start_transcoding = - _video_util_start_transcodingPtr.asFunction< - int Function( - video_util_h, - int, - int, - ffi.Pointer, - video_util_transcoding_progress_cb, - video_util_transcoding_completed_cb, - ffi.Pointer)>(); - - /// @brief Cancels transcoding the video for given video util handle. - /// @since_tizen 2.3 - /// - /// - /// @details This function cancels the transcoding for given video util handle.\n. - /// - /// @remarks If this function is invoked during transcoding, the data transcoded is discard.\n - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. - /// - /// @param[in] handle The handle to video util - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #VIDEO_UTIL_ERROR_NONE Successful - /// @retval #VIDEO_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VIDEO_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// @retval #VIDEO_UTIL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VIDEO_UTIL_ERROR_NOT_SUPPORTED Not supported - /// - /// @see video_util_create() - /// @see video_util_destroy() - /// @see video_util_start_transcoding() - int video_util_cancel_transcoding( - video_util_h handle, - ) { - return _video_util_cancel_transcoding( - handle, - ); - } - - late final _video_util_cancel_transcodingPtr = - _lookup>( - 'video_util_cancel_transcoding'); - late final _video_util_cancel_transcoding = _video_util_cancel_transcodingPtr - .asFunction(); - - /// @brief Retreives the current position and duration of the video transcoding. - /// @since_tizen 2.3 - /// - /// - /// @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage.\n - /// - /// @param[in] handle The handle to video util - /// @param[out] current_position Current position of transcoding - /// @param[out] duration The duration is in seconds.\n - /// If duration is 0, transcoding happens until end of the video - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VIDEO_UTIL_ERROR_NONE Successful - /// @retval #VIDEO_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VIDEO_UTIL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VIDEO_UTIL_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre video_util_start_transcoding(). - /// - /// @see video_util_create() - /// @see video_util_destroy() - int video_util_get_progress_transcoding( - video_util_h handle, - ffi.Pointer current_position, - ffi.Pointer duration, - ) { - return _video_util_get_progress_transcoding( - handle, - current_position, - duration, - ); - } - - late final _video_util_get_progress_transcodingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(video_util_h, ffi.Pointer, - ffi.Pointer)>>( - 'video_util_get_progress_transcoding'); - late final _video_util_get_progress_transcoding = - _video_util_get_progress_transcodingPtr.asFunction< - int Function(video_util_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Retrieves all supported media formats by invoking a specific callback for each supported media format. - /// @since_tizen 2.3 - /// - /// @remarks The callback invocation depends on the codec.\n - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage.\n - /// - /// @param[in] handle The handle to video util - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #VIDEO_UTIL_ERROR_NONE Successful - /// @retval #VIDEO_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VIDEO_UTIL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VIDEO_UTIL_ERROR_NOT_SUPPORTED_FORMAT Not supported format - /// @retval #VIDEO_UTIL_ERROR_NOT_SUPPORTED Not supported - /// @post video_util_supported_file_format_cb() will be invoked. - /// - /// @see video_util_set_file_format() - /// @see video_util_supported_file_format_cb() - int video_util_foreach_supported_file_format( - video_util_h handle, - video_util_supported_file_format_cb callback, - ffi.Pointer user_data, - ) { - return _video_util_foreach_supported_file_format( - handle, - callback, - user_data, - ); - } - - late final _video_util_foreach_supported_file_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(video_util_h, - video_util_supported_file_format_cb, ffi.Pointer)>>( - 'video_util_foreach_supported_file_format'); - late final _video_util_foreach_supported_file_format = - _video_util_foreach_supported_file_formatPtr.asFunction< - int Function(video_util_h, video_util_supported_file_format_cb, - ffi.Pointer)>(); - - /// @brief Retrieves all supported video encoders by invoking a specific callback for each supported video encoder. - /// @since_tizen 2.3 - /// - /// @remarks The callback invocation depends on the file format.\n - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage.\n - /// - /// @param[in] handle The handle to video util - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #VIDEO_UTIL_ERROR_NONE Successful - /// @retval #VIDEO_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VIDEO_UTIL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VIDEO_UTIL_ERROR_NOT_SUPPORTED_FORMAT Not supported format - /// @retval #VIDEO_UTIL_ERROR_NOT_SUPPORTED Not supported - /// @post video_util_supported_video_encoder_cb() will be invoked. - /// @see video_util_set_video_codec() - /// @see video_util_supported_video_encoder_cb() - int video_util_foreach_supported_video_codec( - video_util_h handle, - video_util_supported_video_encoder_cb callback, - ffi.Pointer user_data, - ) { - return _video_util_foreach_supported_video_codec( - handle, - callback, - user_data, - ); - } - - late final _video_util_foreach_supported_video_codecPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - video_util_h, - video_util_supported_video_encoder_cb, - ffi.Pointer)>>( - 'video_util_foreach_supported_video_codec'); - late final _video_util_foreach_supported_video_codec = - _video_util_foreach_supported_video_codecPtr.asFunction< - int Function(video_util_h, video_util_supported_video_encoder_cb, - ffi.Pointer)>(); - - /// @brief Retrieves all supported audio encoders by invoking a specific callback for each supported audio encoder. - /// @since_tizen 2.3 - /// - /// @remarks The callback invocation depends on the file format.\n - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage.\n - /// - /// @param[in] handle The handle to video util - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #VIDEO_UTIL_ERROR_NONE Successful - /// @retval #VIDEO_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VIDEO_UTIL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VIDEO_UTIL_ERROR_NOT_SUPPORTED_FORMAT Not supported format - /// @retval #VIDEO_UTIL_ERROR_NOT_SUPPORTED Not supported - /// @post video_util_supported_audio_encoder_cb() will be invoked. - /// @see video_util_supported_audio_encoder_cb() - int video_util_foreach_supported_audio_codec( - video_util_h handle, - video_util_supported_audio_encoder_cb callback, - ffi.Pointer user_data, - ) { - return _video_util_foreach_supported_audio_codec( - handle, - callback, - user_data, - ); - } - - late final _video_util_foreach_supported_audio_codecPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - video_util_h, - video_util_supported_audio_encoder_cb, - ffi.Pointer)>>( - 'video_util_foreach_supported_audio_codec'); - late final _video_util_foreach_supported_audio_codec = - _video_util_foreach_supported_audio_codecPtr.asFunction< - int Function(video_util_h, video_util_supported_audio_encoder_cb, - ffi.Pointer)>(); - - /// @deprecated Deprecated since 3.0. Use wav_player_start_with_stream_info() instead. - /// @brief Plays a WAV file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks Sound can be mixed with other sounds if you don't control the sound session in sound-manager module since 3.0.\n - /// You can refer to @ref CAPI_MEDIA_SOUND_MANAGER_MODULE. - /// - /// @param[in] path The file path to play - /// @param[in] type The sound type - /// @param[in] callback The callback function to invoke when a WAV file is finished playing - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] id The WAV player ID ( can be set to NULL ) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WAV_PLAYER_ERROR_NONE Successful - /// @retval #WAV_PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WAV_PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WAV_PLAYER_ERROR_FORMAT_NOT_SUPPORTED Not supported format - /// - /// @post It invokes wav_player_playback_completed_cb() when a WAV file has finished playing. - /// @see wav_player_stop() - /// @see wav_player_playback_completed_cb() - int wav_player_start( - ffi.Pointer path, - int type, - wav_player_playback_completed_cb callback, - ffi.Pointer user_data, - ffi.Pointer id, - ) { - return _wav_player_start( - path, - type, - callback, - user_data, - id, - ); - } - - late final _wav_player_startPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - wav_player_playback_completed_cb, - ffi.Pointer, - ffi.Pointer)>>('wav_player_start'); - late final _wav_player_start = _wav_player_startPtr.asFunction< - int Function(ffi.Pointer, int, wav_player_playback_completed_cb, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Plays a WAV file with stream information of sound-manager. - /// @since_tizen 3.0 - /// - /// @remarks Voice Recognition and VOIP stream types are not supported in this API. - /// - /// @param[in] path The file path to play - /// @param[in] stream_info The sound stream information handle - /// @param[in] callback The callback function to be invoked when a WAV file is no longer being played - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] id The WAV player ID (can be set to @c NULL) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WAV_PLAYER_ERROR_NONE Successful - /// @retval #WAV_PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WAV_PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WAV_PLAYER_ERROR_FORMAT_NOT_SUPPORTED Not supported format - /// @retval #WAV_PLAYER_ERROR_NOT_SUPPORTED_TYPE Not supported stream type - /// - /// @post It invokes wav_player_playback_completed_cb() when a WAV file is no longer being played. - /// @see wav_player_stop() - /// @see wav_player_playback_completed_cb() - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - int wav_player_start_new( - ffi.Pointer path, - sound_stream_info_h stream_info, - wav_player_playback_completed_cb callback, - ffi.Pointer user_data, - ffi.Pointer id, - ) { - return _wav_player_start_new( - path, - stream_info, - callback, - user_data, - id, - ); - } - - late final _wav_player_start_newPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - sound_stream_info_h, - wav_player_playback_completed_cb, - ffi.Pointer, - ffi.Pointer)>>('wav_player_start_new'); - late final _wav_player_start_new = _wav_player_start_newPtr.asFunction< - int Function( - ffi.Pointer, - sound_stream_info_h, - wav_player_playback_completed_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Stops playing the WAV file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] id The WAV player ID to stop - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #WAV_PLAYER_ERROR_NONE Successful - /// @retval #WAV_PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WAV_PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see wav_player_start() - int wav_player_stop( - int id, - ) { - return _wav_player_stop( - id, - ); - } - - late final _wav_player_stopPtr = - _lookup>('wav_player_stop'); - late final _wav_player_stop = - _wav_player_stopPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_MODULE - /// @brief Initializes the Bluetooth API. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @remarks This function must be called before Bluetooth API starts. \n - /// You must free all resources of the Bluetooth service by calling bt_deinitialize() if Bluetooth service is no longer needed. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_deinitialize() - int bt_initialize() { - return _bt_initialize(); - } - - late final _bt_initializePtr = - _lookup>('bt_initialize'); - late final _bt_initialize = _bt_initializePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_MODULE - /// @brief Releases all resources of the Bluetooth API. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @remarks This function must be called if Bluetooth API is no longer needed. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Bluetooth API must be initialized with bt_initialize(). - /// - /// @see bt_initialize() - int bt_deinitialize() { - return _bt_deinitialize(); - } - - late final _bt_deinitializePtr = - _lookup>('bt_deinitialize'); - late final _bt_deinitialize = - _bt_deinitializePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_MODULE - /// @brief Gets the specification name for the given UUID. - /// @since_tizen 3.0 - /// - /// @remarks The @a name must be released using free(). - /// - /// @param[in] uuid The UUID - /// @param[out] name The specification name defined at www.bluetooth.com - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_get_uuid() - int bt_get_uuid_name( - ffi.Pointer uuid, - ffi.Pointer> name, - ) { - return _bt_get_uuid_name( - uuid, - name, - ); - } - - late final _bt_get_uuid_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer>)>>('bt_get_uuid_name'); - late final _bt_get_uuid_name = _bt_get_uuid_namePtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Gets the current state of local Bluetooth adapter. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[out] adapter_state The current adapter state - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_initialize() - int bt_adapter_get_state( - ffi.Pointer adapter_state, - ) { - return _bt_adapter_get_state( - adapter_state, - ); - } - - late final _bt_adapter_get_statePtr = - _lookup)>>( - 'bt_adapter_get_state'); - late final _bt_adapter_get_state = _bt_adapter_get_statePtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Gets the address of local Bluetooth adapter. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @remarks The @a local_address must be released with free() by you. - /// - /// @param[out] local_address The device address of local Bluetooth adapter - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @see bt_adapter_get_name() - int bt_adapter_get_address( - ffi.Pointer> local_address, - ) { - return _bt_adapter_get_address( - local_address, - ); - } - - late final _bt_adapter_get_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>)>>('bt_adapter_get_address'); - late final _bt_adapter_get_address = _bt_adapter_get_addressPtr - .asFunction>)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Gets the name of local Bluetooth adapter. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @details Use this function to get the friendly name associated with Bluetooth - /// device, retrieved by the remote Bluetooth devices. - /// - /// @remarks The @a local_name must be released with free() by you. - /// - /// @param[out] local_name The local device name - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// - /// @see bt_adapter_set_name() - int bt_adapter_get_name( - ffi.Pointer> local_name, - ) { - return _bt_adapter_get_name( - local_name, - ); - } - - late final _bt_adapter_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>)>>('bt_adapter_get_name'); - late final _bt_adapter_get_name = _bt_adapter_get_namePtr - .asFunction>)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Sets the name of local Bluetooth adapter. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] local_name The name of the Bluetooth device. \n - /// The maximum length is 248 characters. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @post bt_adapter_name_changed_cb() will be invoked if this function returns #BT_ERROR_NONE. - /// - /// @see bt_adapter_get_name() - /// @see bt_adapter_name_changed_cb() - /// @see bt_adapter_set_name_changed_cb() - /// @see bt_adapter_unset_name_changed_cb() - int bt_adapter_set_name( - ffi.Pointer local_name, - ) { - return _bt_adapter_set_name( - local_name, - ); - } - - late final _bt_adapter_set_namePtr = - _lookup)>>( - 'bt_adapter_set_name'); - late final _bt_adapter_set_name = - _bt_adapter_set_namePtr.asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Gets the visibility mode of local Bluetooth adapter. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[out] mode The visibility mode of the Bluetooth device - /// @param[out] duration The duration until the visibility mode is changed to #BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE (in seconds). - /// @a duration is valid only if @a mode is #BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE. This value can be NULL. - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - int bt_adapter_get_visibility( - ffi.Pointer mode, - ffi.Pointer duration, - ) { - return _bt_adapter_get_visibility( - mode, - duration, - ); - } - - late final _bt_adapter_get_visibilityPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('bt_adapter_get_visibility'); - late final _bt_adapter_get_visibility = _bt_adapter_get_visibilityPtr - .asFunction, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Starts the device discovery, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @details If a device is discovered, bt_adapter_device_discovery_state_changed_cb() will be invoked - /// with #BT_ADAPTER_DEVICE_DISCOVERY_FOUND, and then bt_adapter_device_discovery_state_changed_cb() - /// will be called with #BT_ADAPTER_DEVICE_DISCOVERY_FINISHED in case of the completion or cancellation of the discovery. - /// - /// @remarks To connect to peer Bluetooth device, you need to know its Bluetooth address. \n - /// The device discovery can be stopped by bt_adapter_stop_device_discovery(). - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOW_IN_PROGRESS Operation is now in progress - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @post This function invokes bt_adapter_device_discovery_state_changed_cb(). - /// - /// @see bt_adapter_is_discovering() - /// @see bt_adapter_stop_device_discovery() - /// @see bt_adapter_device_discovery_state_changed_cb() - /// @see bt_adapter_set_device_discovery_state_changed_cb() - /// @see bt_adapter_unset_device_discovery_state_changed_cb() - int bt_adapter_start_device_discovery() { - return _bt_adapter_start_device_discovery(); - } - - late final _bt_adapter_start_device_discoveryPtr = - _lookup>( - 'bt_adapter_start_device_discovery'); - late final _bt_adapter_start_device_discovery = - _bt_adapter_start_device_discoveryPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Stops the device discovery, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @remarks The device discovery process will take 10 ~ 20 seconds to get all the devices in vicinity. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOT_IN_PROGRESS Operation is not in progress - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The device discovery must be in progress with bt_adapter_start_device_discovery(). - /// @post This function invokes bt_adapter_device_discovery_state_changed_cb(). - /// - /// @see bt_adapter_is_discovering() - /// @see bt_adapter_start_device_discovery() - /// @see bt_adapter_set_device_discovery_state_changed_cb() - /// @see bt_adapter_unset_device_discovery_state_changed_cb() - /// @see bt_adapter_device_discovery_state_changed_cb() - int bt_adapter_stop_device_discovery() { - return _bt_adapter_stop_device_discovery(); - } - - late final _bt_adapter_stop_device_discoveryPtr = - _lookup>( - 'bt_adapter_stop_device_discovery'); - late final _bt_adapter_stop_device_discovery = - _bt_adapter_stop_device_discoveryPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Checks for the device discovery is in progress or not. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @remarks If Bluetooth discovery is in progress, other operations are not allowed and - /// you have to either stop the discovery operation, or wait for it to be finished, - /// before performing other operations. - /// - /// @param[out] is_discovering The discovering status: (@c true = in progress , @c false = not in progress ) - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// - /// @see bt_adapter_start_device_discovery() - /// @see bt_adapter_stop_device_discovery() - int bt_adapter_is_discovering( - ffi.Pointer is_discovering, - ) { - return _bt_adapter_is_discovering( - is_discovering, - ); - } - - late final _bt_adapter_is_discoveringPtr = - _lookup)>>( - 'bt_adapter_is_discovering'); - late final _bt_adapter_is_discovering = _bt_adapter_is_discoveringPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Get the service mask from the uuid list. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[in] uuids The UUID list of the device. - /// @param[in] no_of_service The number of the UUID list count. - /// @param[out] service_mask_list Service mask list converted from the given UUID list. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_service_class_t - int bt_device_get_service_mask_from_uuid_list( - ffi.Pointer> uuids, - int no_of_service, - ffi.Pointer service_mask_list, - ) { - return _bt_device_get_service_mask_from_uuid_list( - uuids, - no_of_service, - service_mask_list, - ); - } - - late final _bt_device_get_service_mask_from_uuid_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, ffi.Int, - ffi.Pointer)>>( - 'bt_device_get_service_mask_from_uuid_list'); - late final _bt_device_get_service_mask_from_uuid_list = - _bt_device_get_service_mask_from_uuid_listPtr.asFunction< - int Function(ffi.Pointer>, int, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Retrieves the device information of all bonded devices. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param [in] callback The callback function to invoke - /// @param [in] user_data The user data passed from the foreach function - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @post This function invokes bt_adapter_bonded_device_cb(). - /// - /// @see bt_adapter_bonded_device_cb() - int bt_adapter_foreach_bonded_device( - bt_adapter_bonded_device_cb callback, - ffi.Pointer user_data, - ) { - return _bt_adapter_foreach_bonded_device( - callback, - user_data, - ); - } - - late final _bt_adapter_foreach_bonded_devicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_adapter_bonded_device_cb, - ffi.Pointer)>>('bt_adapter_foreach_bonded_device'); - late final _bt_adapter_foreach_bonded_device = - _bt_adapter_foreach_bonded_devicePtr.asFunction< - int Function(bt_adapter_bonded_device_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Gets the device information of a bonded device. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks The @a device_info must be released with bt_adapter_free_device_info() by you . - /// - /// @param [in] remote_address The address of remote device - /// @param [out] device_info The bonded device information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_BONDED Remote device not bonded - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @post This function invokes bt_adapter_bonded_device_cb(). - /// - /// @see bt_adapter_bonded_device_cb() - int bt_adapter_get_bonded_device_info( - ffi.Pointer remote_address, - ffi.Pointer> device_info, - ) { - return _bt_adapter_get_bonded_device_info( - remote_address, - device_info, - ); - } - - late final _bt_adapter_get_bonded_device_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer>)>>( - 'bt_adapter_get_bonded_device_info'); - late final _bt_adapter_get_bonded_device_info = - _bt_adapter_get_bonded_device_infoPtr.asFunction< - int Function(ffi.Pointer, - ffi.Pointer>)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Frees device info. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param [in] device_info The bonded device information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_adapter_get_bonded_device_info() - int bt_adapter_free_device_info( - ffi.Pointer device_info, - ) { - return _bt_adapter_free_device_info( - device_info, - ); - } - - late final _bt_adapter_free_device_infoPtr = _lookup< - ffi.NativeFunction)>>( - 'bt_adapter_free_device_info'); - late final _bt_adapter_free_device_info = _bt_adapter_free_device_infoPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Checks whether the UUID of service is used or not - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] service_uuid The UUID of service - /// @param[out] used Indicates whether the service is used or not - /// @return true on success, otherwise false. - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_adapter_is_service_used( - ffi.Pointer service_uuid, - ffi.Pointer used, - ) { - return _bt_adapter_is_service_used( - service_uuid, - used, - ); - } - - late final _bt_adapter_is_service_usedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('bt_adapter_is_service_used'); - late final _bt_adapter_is_service_used = _bt_adapter_is_service_usedPtr - .asFunction, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Registers a callback function to be invoked when the Bluetooth adapter state changes. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_adapter_state_changed_cb() will be invoked. - /// - /// @see bt_initialize() - /// @see bt_adapter_state_changed_cb() - /// @see bt_adapter_set_state_changed_cb() - /// @see bt_adapter_unset_state_changed_cb() - int bt_adapter_set_state_changed_cb( - bt_adapter_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_adapter_set_state_changed_cb( - callback, - user_data, - ); - } - - late final _bt_adapter_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_adapter_state_changed_cb, - ffi.Pointer)>>('bt_adapter_set_state_changed_cb'); - late final _bt_adapter_set_state_changed_cb = - _bt_adapter_set_state_changed_cbPtr.asFunction< - int Function(bt_adapter_state_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_initialize() - /// @see bt_adapter_set_state_changed_cb() - int bt_adapter_unset_state_changed_cb() { - return _bt_adapter_unset_state_changed_cb(); - } - - late final _bt_adapter_unset_state_changed_cbPtr = - _lookup>( - 'bt_adapter_unset_state_changed_cb'); - late final _bt_adapter_unset_state_changed_cb = - _bt_adapter_unset_state_changed_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Registers a callback function to be invoked when the name of Bluetooth adapter changes. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_adapter_name_changed_cb() will be invoked. - /// - /// @see bt_initialize() - /// @see bt_adapter_name_changed_cb() - /// @see bt_adapter_unset_name_changed_cb() - int bt_adapter_set_name_changed_cb( - bt_adapter_name_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_adapter_set_name_changed_cb( - callback, - user_data, - ); - } - - late final _bt_adapter_set_name_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_adapter_name_changed_cb, - ffi.Pointer)>>('bt_adapter_set_name_changed_cb'); - late final _bt_adapter_set_name_changed_cb = - _bt_adapter_set_name_changed_cbPtr.asFunction< - int Function(bt_adapter_name_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_initialize() - /// @see bt_adapter_set_name_changed_cb() - int bt_adapter_unset_name_changed_cb() { - return _bt_adapter_unset_name_changed_cb(); - } - - late final _bt_adapter_unset_name_changed_cbPtr = - _lookup>( - 'bt_adapter_unset_name_changed_cb'); - late final _bt_adapter_unset_name_changed_cb = - _bt_adapter_unset_name_changed_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Registers a callback function to be invoked when the visibility mode changes. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_adapter_visibility_mode_changed_cb() will be invoked. - /// - /// @see bt_initialize() - /// @see bt_adapter_visibility_mode_changed_cb() - /// @see bt_adapter_unset_visibility_mode_changed_cb() - int bt_adapter_set_visibility_mode_changed_cb( - bt_adapter_visibility_mode_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_adapter_set_visibility_mode_changed_cb( - callback, - user_data, - ); - } - - late final _bt_adapter_set_visibility_mode_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_adapter_visibility_mode_changed_cb, - ffi.Pointer)>>( - 'bt_adapter_set_visibility_mode_changed_cb'); - late final _bt_adapter_set_visibility_mode_changed_cb = - _bt_adapter_set_visibility_mode_changed_cbPtr.asFunction< - int Function( - bt_adapter_visibility_mode_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_initialize() - /// @see bt_adapter_set_visibility_mode_changed_cb() - int bt_adapter_unset_visibility_mode_changed_cb() { - return _bt_adapter_unset_visibility_mode_changed_cb(); - } - - late final _bt_adapter_unset_visibility_mode_changed_cbPtr = - _lookup>( - 'bt_adapter_unset_visibility_mode_changed_cb'); - late final _bt_adapter_unset_visibility_mode_changed_cb = - _bt_adapter_unset_visibility_mode_changed_cbPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Registers a callback function to be invoked every second - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// until the visibility mode is changed from #BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE - /// to #BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE. - /// @details When you set visibility mode as #BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE, - /// @a callback will be called every second until visibility mode is changed to #BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE. - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized by bt_initialize(). - /// @post bt_adapter_visibility_duration_changed_cb() will be invoked. - /// @see bt_initialize() - /// @see bt_adapter_visibility_duration_changed_cb() - /// @see bt_adapter_unset_visibility_duration_changed_cb() - int bt_adapter_set_visibility_duration_changed_cb( - bt_adapter_visibility_duration_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_adapter_set_visibility_duration_changed_cb( - callback, - user_data, - ); - } - - late final _bt_adapter_set_visibility_duration_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_adapter_visibility_duration_changed_cb, - ffi.Pointer)>>( - 'bt_adapter_set_visibility_duration_changed_cb'); - late final _bt_adapter_set_visibility_duration_changed_cb = - _bt_adapter_set_visibility_duration_changed_cbPtr.asFunction< - int Function(bt_adapter_visibility_duration_changed_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_adapter_set_visibility_duration_changed_cb() - int bt_adapter_unset_visibility_duration_changed_cb() { - return _bt_adapter_unset_visibility_duration_changed_cb(); - } - - late final _bt_adapter_unset_visibility_duration_changed_cbPtr = - _lookup>( - 'bt_adapter_unset_visibility_duration_changed_cb'); - late final _bt_adapter_unset_visibility_duration_changed_cb = - _bt_adapter_unset_visibility_duration_changed_cbPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Registers a callback function to be invoked when the device discovery state changes. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_adapter_device_discovery_state_changed_cb() will be invoked. - /// - /// @see bt_initialize() - /// @see bt_adapter_device_discovery_state_changed_cb() - /// @see bt_adapter_set_device_discovery_state_changed_cb() - /// @see bt_adapter_unset_device_discovery_state_changed_cb() - int bt_adapter_set_device_discovery_state_changed_cb( - bt_adapter_device_discovery_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_adapter_set_device_discovery_state_changed_cb( - callback, - user_data, - ); - } - - late final _bt_adapter_set_device_discovery_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_adapter_device_discovery_state_changed_cb, - ffi.Pointer)>>( - 'bt_adapter_set_device_discovery_state_changed_cb'); - late final _bt_adapter_set_device_discovery_state_changed_cb = - _bt_adapter_set_device_discovery_state_changed_cbPtr.asFunction< - int Function(bt_adapter_device_discovery_state_changed_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_initialize() - /// @see bt_adapter_set_device_discovery_state_changed_cb() - int bt_adapter_unset_device_discovery_state_changed_cb() { - return _bt_adapter_unset_device_discovery_state_changed_cb(); - } - - late final _bt_adapter_unset_device_discovery_state_changed_cbPtr = - _lookup>( - 'bt_adapter_unset_device_discovery_state_changed_cb'); - late final _bt_adapter_unset_device_discovery_state_changed_cb = - _bt_adapter_unset_device_discovery_state_changed_cbPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OOB_MODULE - /// @brief Get the Hash and Randmoizer value, synchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[out] hash The hash value received from the controller - /// @param[out] randomizer The hash value received from the controller - /// @param[out] hash_len The length of the hash value - /// @param[out] randomizer_len The length of the randomizer value - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - int bt_adapter_get_local_oob_data( - ffi.Pointer> hash, - ffi.Pointer> randomizer, - ffi.Pointer hash_len, - ffi.Pointer randomizer_len, - ) { - return _bt_adapter_get_local_oob_data( - hash, - randomizer, - hash_len, - randomizer_len, - ); - } - - late final _bt_adapter_get_local_oob_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>>('bt_adapter_get_local_oob_data'); - late final _bt_adapter_get_local_oob_data = - _bt_adapter_get_local_oob_dataPtr.asFunction< - int Function( - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OOB_MODULE - /// @brief Sets the Hash and Randmoizer value, synchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] remote_address Remote device address - /// @param[in] hash The hash value received from the controller - /// @param[in] randomizer The hash value received from the controller - /// @param[in] hash_len The length of the hash value. Allowed value is 16 - /// @param[in] randomizer_len The length of the randomizer value. Allowed value is 16 - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - int bt_adapter_set_remote_oob_data( - ffi.Pointer remote_address, - ffi.Pointer hash, - ffi.Pointer randomizer, - int hash_len, - int randomizer_len, - ) { - return _bt_adapter_set_remote_oob_data( - remote_address, - hash, - randomizer, - hash_len, - randomizer_len, - ); - } - - late final _bt_adapter_set_remote_oob_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Int)>>('bt_adapter_set_remote_oob_data'); - late final _bt_adapter_set_remote_oob_data = - _bt_adapter_set_remote_oob_dataPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OOB_MODULE - /// @brief Gets the Hash and Randmoizer value, synchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @remarks The @a hash192, randomizer192, hash256 and randomizer256 must be released using free() - /// - /// @param[out] hash192 The hash value derived from the P-192 public key - /// @param[out] randomizer192 The randomizer value associated with the P-192 public key - /// @param[out] hash192_len The length of @a hash192 - /// @param[out] randomizer192_len The length of @a randomizer192 - /// @param[out] hash256 The hash value derived from the P-256 public key - /// @param[out] randomizer256 The randomizer value associated with the P-256 public key - /// @param[out] hash256_len The length of @a hash256 - /// @param[out] randomizer256_len The length of @a randomizer256 - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - int bt_adapter_get_local_oob_ext_data( - ffi.Pointer> hash192, - ffi.Pointer> randomizer192, - ffi.Pointer hash192_len, - ffi.Pointer randomizer192_len, - ffi.Pointer> hash256, - ffi.Pointer> randomizer256, - ffi.Pointer hash256_len, - ffi.Pointer randomizer256_len, - ) { - return _bt_adapter_get_local_oob_ext_data( - hash192, - randomizer192, - hash192_len, - randomizer192_len, - hash256, - randomizer256, - hash256_len, - randomizer256_len, - ); - } - - late final _bt_adapter_get_local_oob_ext_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>>('bt_adapter_get_local_oob_ext_data'); - late final _bt_adapter_get_local_oob_ext_data = - _bt_adapter_get_local_oob_ext_dataPtr.asFunction< - int Function( - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OOB_MODULE - /// @brief Sets the Hash and Randmoizer value, synchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] remote_address Remote device address - /// @param[in] hash192 The P-192 hash value received via OOB from remote device - /// @param[in] randomizer192 The P-192 randomizer value received via OOB from remote device - /// @param[in] hash192_len The length of @a hash192 - /// @param[in] randomizer192_len The length of @a randomizer192 - /// @param[in] hash256 The P-256 hash value received via OOB from remote device - /// @param[in] randomizer256 The P-256 randomizer value received via OOB from remote device - /// @param[in] hash256_len The length of @a hash256 - /// @param[in] randomizer256_len The length of @a randomizer256 - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - int bt_adapter_set_remote_oob_ext_data( - ffi.Pointer remote_address, - ffi.Pointer hash192, - ffi.Pointer randomizer192, - int hash192_len, - int randomizer192_len, - ffi.Pointer hash256, - ffi.Pointer randomizer256, - int hash256_len, - int randomizer256_len, - ) { - return _bt_adapter_set_remote_oob_ext_data( - remote_address, - hash192, - randomizer192, - hash192_len, - randomizer192_len, - hash256, - randomizer256, - hash256_len, - randomizer256_len, - ); - } - - late final _bt_adapter_set_remote_oob_ext_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Int)>>('bt_adapter_set_remote_oob_ext_data'); - late final _bt_adapter_set_remote_oob_ext_data = - _bt_adapter_set_remote_oob_ext_dataPtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer, - ffi.Pointer, - int, - int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OOB_MODULE - /// @brief Deletes the Hash and Randomizer value, synchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] remote_address Remote device address - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - int bt_adapter_remove_remote_oob_data( - ffi.Pointer remote_address, - ) { - return _bt_adapter_remove_remote_oob_data( - remote_address, - ); - } - - late final _bt_adapter_remove_remote_oob_dataPtr = - _lookup)>>( - 'bt_adapter_remove_remote_oob_data'); - late final _bt_adapter_remove_remote_oob_data = - _bt_adapter_remove_remote_oob_dataPtr - .asFunction)>(); - - /// @deprecated Deprecated since 2.3.1 - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Starts the LE device discovery. - /// @since_tizen @if WEARABLE @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @details If a LE device is discovered, bt_adapter_le_device_discovery_state_changed_cb() - /// will be invoked with #BT_ADAPTER_LE_DEVICE_DISCOVERY_FOUND, and then bt_adapter_le_device_discovery_state_changed_cb() - /// will be called with #BT_ADAPTER_LE_DEVICE_DISCOVERY_FINISHED in case of the completion or cancellation of the discovery. - /// - /// @remarks To connect to peer Bluetooth device, you need to know its Bluetooth address. \n - /// The device discovery can be stopped by bt_adapter_le_stop_device_discovery(). - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOW_IN_PROGRESS Operation is now in progress - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @post This function invokes bt_adapter_le_device_discovery_state_changed_cb(). - /// - /// @see bt_adapter_le_is_discovering() - /// @see bt_adapter_le_device_discovery_state_changed_cb() - /// @see bt_adapter_le_set_device_discovery_state_changed_cb() - /// @see bt_adapter_le_unset_device_discovery_state_changed_cb() - int bt_adapter_le_start_device_discovery() { - return _bt_adapter_le_start_device_discovery(); - } - - late final _bt_adapter_le_start_device_discoveryPtr = - _lookup>( - 'bt_adapter_le_start_device_discovery'); - late final _bt_adapter_le_start_device_discovery = - _bt_adapter_le_start_device_discoveryPtr.asFunction(); - - /// @deprecated Deprecated since 2.3.1 - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Stops the LE device discovery, asynchronously. - /// @since_tizen @if WEARABLE @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOT_IN_PROGRESS Operation is not in progress - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The device discovery must be in progress with bt_adapter_le_start_device_discovery(). - /// @post This function invokes bt_adapter_le_device_discovery_state_changed_cb(). - /// - /// @see bt_adapter_le_is_discovering() - /// @see bt_adapter_le_start_device_discovery() - /// @see bt_adapter_le_set_device_discovery_state_changed_cb() - /// @see bt_adapter_le_unset_device_discovery_state_changed_cb() - /// @see bt_adapter_le_device_discovery_state_changed_cb() - int bt_adapter_le_stop_device_discovery() { - return _bt_adapter_le_stop_device_discovery(); - } - - late final _bt_adapter_le_stop_device_discoveryPtr = - _lookup>( - 'bt_adapter_le_stop_device_discovery'); - late final _bt_adapter_le_stop_device_discovery = - _bt_adapter_le_stop_device_discoveryPtr.asFunction(); - - /// @deprecated Deprecated since 2.3.1 - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Checks for the LE device discovery is in progress or not. - /// @since_tizen @if WEARABLE @else 2.3 @endif - /// - /// @remarks If Bluetooth LE discovery is in progress, other operations are not allowed and - /// you have to either stop the LE discovery operation, or wait for it to be finished, - /// before performing other operations. - /// - /// @param[out] is_discovering The discovering status: (@c true = in progress , @c false = not in progress ) - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// - /// @see bt_adapter_le_start_device_discovery() - /// @see bt_adapter_le_stop_device_discovery() - int bt_adapter_le_is_discovering( - ffi.Pointer is_discovering, - ) { - return _bt_adapter_le_is_discovering( - is_discovering, - ); - } - - late final _bt_adapter_le_is_discoveringPtr = - _lookup)>>( - 'bt_adapter_le_is_discovering'); - late final _bt_adapter_le_is_discovering = _bt_adapter_le_is_discoveringPtr - .asFunction)>(); - - /// @deprecated Deprecated since 2.3.1 - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Registers a callback function to be invoked when the LE device discovery state changes. - /// @since_tizen @if WEARABLE @else 2.3 @endif - /// - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_adapter_le_device_discovery_state_changed_cb() will be invoked. - /// - /// @see bt_initialize() - /// @see bt_adapter_le_device_discovery_state_changed_cb() - /// @see bt_adapter_le_unset_device_discovery_state_changed_cb() - int bt_adapter_le_set_device_discovery_state_changed_cb( - bt_adapter_le_device_discovery_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_adapter_le_set_device_discovery_state_changed_cb( - callback, - user_data, - ); - } - - late final _bt_adapter_le_set_device_discovery_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_adapter_le_device_discovery_state_changed_cb, - ffi.Pointer)>>( - 'bt_adapter_le_set_device_discovery_state_changed_cb'); - late final _bt_adapter_le_set_device_discovery_state_changed_cb = - _bt_adapter_le_set_device_discovery_state_changed_cbPtr.asFunction< - int Function(bt_adapter_le_device_discovery_state_changed_cb, - ffi.Pointer)>(); - - /// @deprecated Deprecated since 2.3.1 - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE @else 2.3 @endif - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_initialize() - /// @see bt_adapter_le_set_device_discovery_state_changed_cb() - int bt_adapter_le_unset_device_discovery_state_changed_cb() { - return _bt_adapter_le_unset_device_discovery_state_changed_cb(); - } - - late final _bt_adapter_le_unset_device_discovery_state_changed_cbPtr = - _lookup>( - 'bt_adapter_le_unset_device_discovery_state_changed_cb'); - late final _bt_adapter_le_unset_device_discovery_state_changed_cb = - _bt_adapter_le_unset_device_discovery_state_changed_cbPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Starts the LE scan to find LE advertisement. - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @details If a LE advertisement is found, bt_adapter_le_scan_result_cb() will be invoked. - /// - /// @param[in] cb The callback to report the result of this function - /// @param[in] user_data The user data to be passed when callback is called - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOW_IN_PROGRESS Operation is now in progress - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @post This function invokes bt_adapter_le_scan_result_cb(). - /// - /// @see bt_adapter_le_scan_result_cb() - int bt_adapter_le_start_scan( - bt_adapter_le_scan_result_cb cb, - ffi.Pointer user_data, - ) { - return _bt_adapter_le_start_scan( - cb, - user_data, - ); - } - - late final _bt_adapter_le_start_scanPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_adapter_le_scan_result_cb, - ffi.Pointer)>>('bt_adapter_le_start_scan'); - late final _bt_adapter_le_start_scan = - _bt_adapter_le_start_scanPtr.asFunction< - int Function(bt_adapter_le_scan_result_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Stops the LE scan. - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOT_IN_PROGRESS Operation is not in progress - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The LE scan must be in progress with bt_adapter_le_start_scan(). - /// - /// @see bt_adapter_le_start_scan() - int bt_adapter_le_stop_scan() { - return _bt_adapter_le_stop_scan(); - } - - late final _bt_adapter_le_stop_scanPtr = - _lookup>( - 'bt_adapter_le_stop_scan'); - late final _bt_adapter_le_stop_scan = - _bt_adapter_le_stop_scanPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Gets the service UUID list from the scan result information - /// @since_tizen 2.3.1 - /// - /// @remarks The @a uuids must be iterated as count and each pointed data must be released with free(). - /// Then uuids must be released with free(). \n - /// 16-bit service UUID or 128-bit service UUID is supported. (e.g. 180F, 0000180F-0000-1000-8000-00805F9B34FB) - /// - /// @param[in] info The scan result information - /// @param[in] pkt_type The packet type - /// @param[out] uuids The list of string of the service uuid - /// @param[out] count The count of the service UUIDs - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NO_DATA No data available - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_scan_result_cb() - int bt_adapter_le_get_scan_result_service_uuids( - ffi.Pointer info, - int pkt_type, - ffi.Pointer>> uuids, - ffi.Pointer count, - ) { - return _bt_adapter_le_get_scan_result_service_uuids( - info, - pkt_type, - uuids, - count, - ); - } - - late final _bt_adapter_le_get_scan_result_service_uuidsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Pointer>>, - ffi.Pointer)>>( - 'bt_adapter_le_get_scan_result_service_uuids'); - late final _bt_adapter_le_get_scan_result_service_uuids = - _bt_adapter_le_get_scan_result_service_uuidsPtr.asFunction< - int Function( - ffi.Pointer, - int, - ffi.Pointer>>, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Gets the device name from the scan result information - /// @since_tizen 2.3.1 - /// - /// @remarks The @a name must be released with free() by you. - /// - /// @param[in] info The scan result information - /// @param[in] pkt_type The packet type - /// @param[out] name The device name - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NO_DATA No data available - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_scan_result_cb() - int bt_adapter_le_get_scan_result_device_name( - ffi.Pointer info, - int pkt_type, - ffi.Pointer> name, - ) { - return _bt_adapter_le_get_scan_result_device_name( - info, - pkt_type, - name, - ); - } - - late final _bt_adapter_le_get_scan_result_device_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>( - 'bt_adapter_le_get_scan_result_device_name'); - late final _bt_adapter_le_get_scan_result_device_name = - _bt_adapter_le_get_scan_result_device_namePtr.asFunction< - int Function(ffi.Pointer, - int, ffi.Pointer>)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Gets the transmission power level from the scan result information - /// @since_tizen 2.3.1 - /// - /// @param[in] info The scan result information - /// @param[in] pkt_type The packet type - /// @param[out] power_level The transmission power level in dBm - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NO_DATA No data available - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_scan_result_cb() - int bt_adapter_le_get_scan_result_tx_power_level( - ffi.Pointer info, - int pkt_type, - ffi.Pointer power_level, - ) { - return _bt_adapter_le_get_scan_result_tx_power_level( - info, - pkt_type, - power_level, - ); - } - - late final _bt_adapter_le_get_scan_result_tx_power_levelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>( - 'bt_adapter_le_get_scan_result_tx_power_level'); - late final _bt_adapter_le_get_scan_result_tx_power_level = - _bt_adapter_le_get_scan_result_tx_power_levelPtr.asFunction< - int Function(ffi.Pointer, - int, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Gets the service solicitation UUID list from the scan result information - /// @since_tizen 2.3.1 - /// - /// @remarks The @a uuids must be iterated as count and each pointed data must be released with free(). - /// Then uuids must be released with free(). \n - /// 16-bit service solicitation UUID or 128-bit service solicitation UUID is supported. - /// (e.g. 180F, 0000180F-0000-1000-8000-00805F9B34FB) - /// - /// @param[in] info The scan result information - /// @param[in] pkt_type The packet type - /// @param[out] uuids The list of string of the service solicitation uuid - /// @param[out] count The count of the service UUIDs - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NO_DATA No data available - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_scan_result_cb() - int bt_adapter_le_get_scan_result_service_solicitation_uuids( - ffi.Pointer info, - int pkt_type, - ffi.Pointer>> uuids, - ffi.Pointer count, - ) { - return _bt_adapter_le_get_scan_result_service_solicitation_uuids( - info, - pkt_type, - uuids, - count, - ); - } - - late final _bt_adapter_le_get_scan_result_service_solicitation_uuidsPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Pointer>>, - ffi.Pointer)>>( - 'bt_adapter_le_get_scan_result_service_solicitation_uuids'); - late final _bt_adapter_le_get_scan_result_service_solicitation_uuids = - _bt_adapter_le_get_scan_result_service_solicitation_uuidsPtr.asFunction< - int Function( - ffi.Pointer, - int, - ffi.Pointer>>, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Gets the service data list from the scan result information - /// @since_tizen 2.3.1 - /// - /// @remarks The @a data_list must be released with bt_adapter_le_free_service_data_list() by you . - /// - /// @param[in] info The scan result information - /// @param[in] pkt_type The packet type - /// @param[out] data_list The list of the service data - /// @param[out] count The count of the service data list - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NO_DATA No data available - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_scan_result_cb() - int bt_adapter_le_get_scan_result_service_data_list( - ffi.Pointer info, - int pkt_type, - ffi.Pointer> data_list, - ffi.Pointer count, - ) { - return _bt_adapter_le_get_scan_result_service_data_list( - info, - pkt_type, - data_list, - count, - ); - } - - late final _bt_adapter_le_get_scan_result_service_data_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Pointer>, - ffi.Pointer)>>( - 'bt_adapter_le_get_scan_result_service_data_list'); - late final _bt_adapter_le_get_scan_result_service_data_list = - _bt_adapter_le_get_scan_result_service_data_listPtr.asFunction< - int Function( - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Frees service data list. - /// @since_tizen 2.3.1 - /// - /// @param[in] data_list The list of the service data - /// @param[in] count The count of the service data list - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_adapter_le_get_scan_result_service_data_list() - int bt_adapter_le_free_service_data_list( - ffi.Pointer data_list, - int count, - ) { - return _bt_adapter_le_free_service_data_list( - data_list, - count, - ); - } - - late final _bt_adapter_le_free_service_data_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Int)>>('bt_adapter_le_free_service_data_list'); - late final _bt_adapter_le_free_service_data_list = - _bt_adapter_le_free_service_data_listPtr.asFunction< - int Function(ffi.Pointer, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Gets the appearance from the scan result information - /// @since_tizen 2.3.1 - /// - /// @param[in] info The scan result information - /// @param[in] pkt_type The packet type - /// @param[out] appearance The appearance - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NO_DATA No data available - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_scan_result_cb() - int bt_adapter_le_get_scan_result_appearance( - ffi.Pointer info, - int pkt_type, - ffi.Pointer appearance, - ) { - return _bt_adapter_le_get_scan_result_appearance( - info, - pkt_type, - appearance, - ); - } - - late final _bt_adapter_le_get_scan_result_appearancePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>( - 'bt_adapter_le_get_scan_result_appearance'); - late final _bt_adapter_le_get_scan_result_appearance = - _bt_adapter_le_get_scan_result_appearancePtr.asFunction< - int Function(ffi.Pointer, - int, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Gets the manufacturer data from the scan result information - /// @since_tizen 2.3.1 - /// - /// @remarks The @a manufacturer_data must be released with free() by you. - /// - /// @param[in] info The scan result information - /// @param[in] pkt_type The packet type - /// @param[out] manufacturer_id The manufacturer ID - /// @param[out] manufacturer_data The manufacturer data (byte array) - /// @param[out] manufacturer_data_len The length of manufacturer data - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NO_DATA No data available - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_scan_result_cb() - int bt_adapter_le_get_scan_result_manufacturer_data( - ffi.Pointer info, - int pkt_type, - ffi.Pointer manufacturer_id, - ffi.Pointer> manufacturer_data, - ffi.Pointer manufacturer_data_len, - ) { - return _bt_adapter_le_get_scan_result_manufacturer_data( - info, - pkt_type, - manufacturer_id, - manufacturer_data, - manufacturer_data_len, - ); - } - - late final _bt_adapter_le_get_scan_result_manufacturer_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>( - 'bt_adapter_le_get_scan_result_manufacturer_data'); - late final _bt_adapter_le_get_scan_result_manufacturer_data = - _bt_adapter_le_get_scan_result_manufacturer_dataPtr.asFunction< - int Function( - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Gets iBeacon format's data from the scan result information. - /// @since_tizen 4.0 - /// - /// @remarks The @a ibeacon_info must be released with bt_adapter_le_free_ibeacon_report(). - /// - /// @param[in] info The scan result information - /// @param[in] pkt_type The packet type - /// @param[out] ibeacon_info The iBeacon format's scan result data - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NO_DATA No data available - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_scan_result_cb() - int bt_adapter_le_get_scan_result_ibeacon_report( - ffi.Pointer info, - int pkt_type, - ffi.Pointer> - ibeacon_info, - ) { - return _bt_adapter_le_get_scan_result_ibeacon_report( - info, - pkt_type, - ibeacon_info, - ); - } - - late final _bt_adapter_le_get_scan_result_ibeacon_reportPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Pointer< - ffi.Pointer>)>>( - 'bt_adapter_le_get_scan_result_ibeacon_report'); - late final _bt_adapter_le_get_scan_result_ibeacon_report = - _bt_adapter_le_get_scan_result_ibeacon_reportPtr.asFunction< - int Function( - ffi.Pointer, - int, - ffi.Pointer< - ffi.Pointer>)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Frees iBeacon information. - /// @since_tizen 4.0 - /// - /// @param[in] ibeacon_info The iBeacon format's scan result data - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_adapter_le_get_scan_result_service_data_list() - int bt_adapter_le_free_ibeacon_report( - ffi.Pointer ibeacon_info, - ) { - return _bt_adapter_le_free_ibeacon_report( - ibeacon_info, - ); - } - - late final _bt_adapter_le_free_ibeacon_reportPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer)>>( - 'bt_adapter_le_free_ibeacon_report'); - late final _bt_adapter_le_free_ibeacon_report = - _bt_adapter_le_free_ibeacon_reportPtr.asFunction< - int Function( - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Create advertiser to advertise device's existence or respond to LE scanning request. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[out] advertiser The handle of advertiser - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_destroy_advertiser() - int bt_adapter_le_create_advertiser( - ffi.Pointer advertiser, - ) { - return _bt_adapter_le_create_advertiser( - advertiser, - ); - } - - late final _bt_adapter_le_create_advertiserPtr = _lookup< - ffi.NativeFunction)>>( - 'bt_adapter_le_create_advertiser'); - late final _bt_adapter_le_create_advertiser = - _bt_adapter_le_create_advertiserPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Destroy advertiser. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[out] advertiser The handle of advertiser - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_create_advertiser() - int bt_adapter_le_destroy_advertiser( - bt_advertiser_h advertiser, - ) { - return _bt_adapter_le_destroy_advertiser( - advertiser, - ); - } - - late final _bt_adapter_le_destroy_advertiserPtr = - _lookup>( - 'bt_adapter_le_destroy_advertiser'); - late final _bt_adapter_le_destroy_advertiser = - _bt_adapter_le_destroy_advertiserPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_IPSP_MODULE - /// @brief Initializes the Bluetooth IPSP (Internet Protocol Support Profile) service. - /// @since_tizen 4.0 - /// @param[in] callback The callback called when the initialization is finished - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - int bt_ipsp_initialize( - bt_ipsp_init_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_ipsp_initialize( - callback, - user_data, - ); - } - - late final _bt_ipsp_initializePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_ipsp_init_state_changed_cb, - ffi.Pointer)>>('bt_ipsp_initialize'); - late final _bt_ipsp_initialize = _bt_ipsp_initializePtr.asFunction< - int Function(bt_ipsp_init_state_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_IPSP_MODULE - /// @brief Deinitializes the Bluetooth IPSP (Internet Protocol Support Profile) service. - /// @since_tizen 4.0 - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - int bt_ipsp_deinitialize() { - return _bt_ipsp_deinitialize(); - } - - late final _bt_ipsp_deinitializePtr = - _lookup>('bt_ipsp_deinitialize'); - late final _bt_ipsp_deinitialize = - _bt_ipsp_deinitializePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_IPSP_MODULE - /// @brief Connects to a remote device's IPSP service over LE, asynchronously. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] remote_address The remote address - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @post bt_ipsp_set_connection_state_changed_cb() will be invoked. - /// @see bt_ipsp_set_connection_state_changed_cb() - int bt_ipsp_connect( - ffi.Pointer remote_address, - ) { - return _bt_ipsp_connect( - remote_address, - ); - } - - late final _bt_ipsp_connectPtr = - _lookup)>>( - 'bt_ipsp_connect'); - late final _bt_ipsp_connect = - _bt_ipsp_connectPtr.asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_IPSP_MODULE - /// @brief Disonneicts from a remote device's IPSP service, asynchronously. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] remote_address The remote address - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected by bt_ipsp_connect(). - /// @post bt_ipsp_set_connection_state_changed_cb() will be invoked. - /// @see bt_ipsp_connect() - /// @see bt_ipsp_set_connection_state_changed_cb() - int bt_ipsp_disconnect( - ffi.Pointer remote_address, - ) { - return _bt_ipsp_disconnect( - remote_address, - ); - } - - late final _bt_ipsp_disconnectPtr = - _lookup)>>( - 'bt_ipsp_disconnect'); - late final _bt_ipsp_disconnect = - _bt_ipsp_disconnectPtr.asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_IPSP_MODULE - /// @brief Registers a callback function that will be invoked when the connection state changes. - /// @since_tizen 4.0 - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - int bt_ipsp_set_connection_state_changed_cb( - bt_ipsp_connection_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_ipsp_set_connection_state_changed_cb( - callback, - user_data, - ); - } - - late final _bt_ipsp_set_connection_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_ipsp_connection_state_changed_cb, ffi.Pointer)>>( - 'bt_ipsp_set_connection_state_changed_cb'); - late final _bt_ipsp_set_connection_state_changed_cb = - _bt_ipsp_set_connection_state_changed_cbPtr.asFunction< - int Function( - bt_ipsp_connection_state_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_IPSP_MODULE - /// @brief Unregisters the callback function called when the connection state changes. - /// @since_tizen 4.0 - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - int bt_ipsp_unset_connection_state_changed_cb() { - return _bt_ipsp_unset_connection_state_changed_cb(); - } - - late final _bt_ipsp_unset_connection_state_changed_cbPtr = - _lookup>( - 'bt_ipsp_unset_connection_state_changed_cb'); - late final _bt_ipsp_unset_connection_state_changed_cb = - _bt_ipsp_unset_connection_state_changed_cbPtr - .asFunction(); - - /// @deprecated Deprecated since 2.3.1 - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Set the data to be advertised or responded to scan request from LE scanning device. - /// The maximum advertised or responded data size is 31 bytes - /// including data type and system wide data. - /// @since_tizen @if WEARABLE @else 2.3 @endif - /// - /// @remarks In case the data_type is local name or tx power level, you don't need to input data - /// because the data value is written automatically by system. - /// - /// @param[in] advertiser The handle of advertiser - /// @param[in] pkt_type The packet type - /// @param[in] data_type The data type that is included in packet - /// @param[in] data The data to be advertised or be responded to scan request from LE scanning device, no need in case of LOCAL_NAME or TX_POWER_LEVEL - /// @param[in] data_size The size of data to be set. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_QUOTA_EXCEEDED Quota exceeded - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_clear_advertising_data() - int bt_adapter_le_add_advertising_data( - bt_advertiser_h advertiser, - int pkt_type, - int data_type, - ffi.Pointer data, - int data_size, - ) { - return _bt_adapter_le_add_advertising_data( - advertiser, - pkt_type, - data_type, - data, - data_size, - ); - } - - late final _bt_adapter_le_add_advertising_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_advertiser_h, - ffi.Int32, - ffi.Int32, - ffi.Pointer, - ffi.UnsignedInt)>>('bt_adapter_le_add_advertising_data'); - late final _bt_adapter_le_add_advertising_data = - _bt_adapter_le_add_advertising_dataPtr.asFunction< - int Function( - bt_advertiser_h, int, int, ffi.Pointer, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Add a service UUID to advertise or scan response data. - /// The maximum advertised or responded data size is 31 bytes - /// including data type and system wide data. - /// @since_tizen 2.3.1 - /// - /// @remarks 16-bit UUID or 128-bit UUID is supported. (e.g. 180F, 0000180F-0000-1000-8000-00805F9B34FB) - /// - /// @param[in] advertiser The handle of advertiser - /// @param[in] pkt_type The packet type - /// @param[in] uuid The string of the service UUID. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_QUOTA_EXCEEDED Quota exceeded - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_clear_advertising_data() - int bt_adapter_le_add_advertising_service_uuid( - bt_advertiser_h advertiser, - int pkt_type, - ffi.Pointer uuid, - ) { - return _bt_adapter_le_add_advertising_service_uuid( - advertiser, - pkt_type, - uuid, - ); - } - - late final _bt_adapter_le_add_advertising_service_uuidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_advertiser_h, ffi.Int32, ffi.Pointer)>>( - 'bt_adapter_le_add_advertising_service_uuid'); - late final _bt_adapter_le_add_advertising_service_uuid = - _bt_adapter_le_add_advertising_service_uuidPtr.asFunction< - int Function(bt_advertiser_h, int, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Add a service solicitation UUID to advertise or scan response data. - /// The maximum advertised or responded data size is 31 bytes - /// including data type and system wide data. - /// @since_tizen 2.3.1 - /// - /// @remarks 16-bit service solicitation UUID or 128-bit service solicitation UUID is supported. - /// (e.g. 180F, 0000180F-0000-1000-8000-00805F9B34FB) - /// - /// @param[in] advertiser The handle of advertiser - /// @param[in] pkt_type The packet type - /// @param[in] uuid The string of the service solicitation UUID. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_QUOTA_EXCEEDED Quota exceeded - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_clear_advertising_data() - int bt_adapter_le_add_advertising_service_solicitation_uuid( - bt_advertiser_h advertiser, - int pkt_type, - ffi.Pointer uuid, - ) { - return _bt_adapter_le_add_advertising_service_solicitation_uuid( - advertiser, - pkt_type, - uuid, - ); - } - - late final _bt_adapter_le_add_advertising_service_solicitation_uuidPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_advertiser_h, ffi.Int32, ffi.Pointer)>>( - 'bt_adapter_le_add_advertising_service_solicitation_uuid'); - late final _bt_adapter_le_add_advertising_service_solicitation_uuid = - _bt_adapter_le_add_advertising_service_solicitation_uuidPtr.asFunction< - int Function(bt_advertiser_h, int, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Add service data to advertise or scan response data. - /// The maximum advertised or responded data size is 31 bytes - /// including data type and system wide data. - /// @since_tizen 2.3.1 - /// - /// @remarks 16-bit UUID is supported. (e.g. 180F) - /// - /// @param[in] advertiser The handle of advertiser - /// @param[in] pkt_type The packet type - /// @param[in] uuid 16-bit UUID of the service - /// @param[in] service_data The service data - /// @param[in] service_data_len The data length of service data - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_QUOTA_EXCEEDED Quota exceeded - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_clear_advertising_data() - int bt_adapter_le_add_advertising_service_data( - bt_advertiser_h advertiser, - int pkt_type, - ffi.Pointer uuid, - ffi.Pointer service_data, - int service_data_len, - ) { - return _bt_adapter_le_add_advertising_service_data( - advertiser, - pkt_type, - uuid, - service_data, - service_data_len, - ); - } - - late final _bt_adapter_le_add_advertising_service_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_advertiser_h, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Int)>>('bt_adapter_le_add_advertising_service_data'); - late final _bt_adapter_le_add_advertising_service_data = - _bt_adapter_le_add_advertising_service_dataPtr.asFunction< - int Function(bt_advertiser_h, int, ffi.Pointer, - ffi.Pointer, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets the external appearance of this device to advertise or scan response data. - /// Please refer to the adopted Bluetooth specification for the the appearance. - /// @since_tizen 2.3.1 - /// - /// @param[in] advertiser The handle of advertiser - /// @param[in] pkt_type The packet type - /// @param[in] appearance The external appearance of device - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_QUOTA_EXCEEDED Quota exceeded - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_clear_advertising_data() - int bt_adapter_le_set_advertising_appearance( - bt_advertiser_h advertiser, - int pkt_type, - int appearance, - ) { - return _bt_adapter_le_set_advertising_appearance( - advertiser, - pkt_type, - appearance, - ); - } - - late final _bt_adapter_le_set_advertising_appearancePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_advertiser_h, ffi.Int32, - ffi.Int)>>('bt_adapter_le_set_advertising_appearance'); - late final _bt_adapter_le_set_advertising_appearance = - _bt_adapter_le_set_advertising_appearancePtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Add manufacturer specific data to advertise or scan response data. - /// Please refer to the Bluetooth Assigned Numbers provided by the Bluetooth SIG for a list of existing company identifiers. - /// The maximum advertised or responded data size is 31 bytes - /// including data type and system wide data. - /// @since_tizen 2.3.1 - /// - /// - /// @param[in] advertiser The handle of advertiser - /// @param[in] pkt_type The packet type - /// @param[in] manufacturer_id Manufacturer identifier - /// @param[in] manufacturer_data The manufacturer specific data - /// @param[in] manufacturer_data_len The data length of manufacturer data - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_QUOTA_EXCEEDED Quota exceeded - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_clear_advertising_data() - int bt_adapter_le_add_advertising_manufacturer_data( - bt_advertiser_h advertiser, - int pkt_type, - int manufacturer_id, - ffi.Pointer manufacturer_data, - int manufacturer_data_len, - ) { - return _bt_adapter_le_add_advertising_manufacturer_data( - advertiser, - pkt_type, - manufacturer_id, - manufacturer_data, - manufacturer_data_len, - ); - } - - late final _bt_adapter_le_add_advertising_manufacturer_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_advertiser_h, - ffi.Int32, - ffi.Int, - ffi.Pointer, - ffi.Int)>>('bt_adapter_le_add_advertising_manufacturer_data'); - late final _bt_adapter_le_add_advertising_manufacturer_data = - _bt_adapter_le_add_advertising_manufacturer_dataPtr.asFunction< - int Function( - bt_advertiser_h, int, int, ffi.Pointer, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Set whether the device name should be included in advertise or scan response data. - /// The maximum advertised or responded data size is 31 bytes - /// including data type and system wide data. - /// @since_tizen 2.3.1 - /// - /// @param[in] advertiser The handle of advertiser - /// @param[in] pkt_type The packet type - /// @param[in] include_name Whether the device name should be included - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_QUOTA_EXCEEDED Quota exceeded - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_clear_advertising_data() - int bt_adapter_le_set_advertising_device_name( - bt_advertiser_h advertiser, - int pkt_type, - bool include_name, - ) { - return _bt_adapter_le_set_advertising_device_name( - advertiser, - pkt_type, - include_name, - ); - } - - late final _bt_adapter_le_set_advertising_device_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_advertiser_h, ffi.Int32, - ffi.Bool)>>('bt_adapter_le_set_advertising_device_name'); - late final _bt_adapter_le_set_advertising_device_name = - _bt_adapter_le_set_advertising_device_namePtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Set whether the transmission power level should be included in advertise or scan response data. - /// The maximum advertised or responded data size is 31 bytes - /// including data type and system wide data. - /// @since_tizen 2.3.1 - /// - /// @param[in] advertiser The handle of advertiser - /// @param[in] pkt_type The packet type - /// @param[in] include_tx_power Whether the transmission power level should be included - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_QUOTA_EXCEEDED Quota exceeded - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_clear_advertising_data() - int bt_adapter_le_set_advertising_tx_power_level( - bt_advertiser_h advertiser, - int pkt_type, - bool include_tx_power, - ) { - return _bt_adapter_le_set_advertising_tx_power_level( - advertiser, - pkt_type, - include_tx_power, - ); - } - - late final _bt_adapter_le_set_advertising_tx_power_levelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_advertiser_h, ffi.Int32, - ffi.Bool)>>('bt_adapter_le_set_advertising_tx_power_level'); - late final _bt_adapter_le_set_advertising_tx_power_level = - _bt_adapter_le_set_advertising_tx_power_levelPtr - .asFunction(); - - /// @deprecated Deprecated since 2.3.1 - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Unset the data to be advertised or responded to scan request from LE scanning device. - /// @since_tizen @if WEARABLE @else 2.3 @endif - /// - /// @param[in] advertiser The handle of advertiser - /// @param[in] pkt_type The packet type - /// @param[in] data_type The data type to be removed from selected packet - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_add_advertising_data() - /// @see bt_adapter_le_clear_advertising_data() - int bt_adapter_le_remove_advertising_data( - bt_advertiser_h advertiser, - int pkt_type, - int data_type, - ) { - return _bt_adapter_le_remove_advertising_data( - advertiser, - pkt_type, - data_type, - ); - } - - late final _bt_adapter_le_remove_advertising_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_advertiser_h, ffi.Int32, - ffi.Int32)>>('bt_adapter_le_remove_advertising_data'); - late final _bt_adapter_le_remove_advertising_data = - _bt_adapter_le_remove_advertising_dataPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Clear all data to be advertised or responded to scan request from LE scanning device. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[in] advertiser The handle of advertiser - /// @param[in] pkt_type The packet type to be cleared - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_add_advertising_data() - int bt_adapter_le_clear_advertising_data( - bt_advertiser_h advertiser, - int pkt_type, - ) { - return _bt_adapter_le_clear_advertising_data( - advertiser, - pkt_type, - ); - } - - late final _bt_adapter_le_clear_advertising_dataPtr = - _lookup>( - 'bt_adapter_le_clear_advertising_data'); - late final _bt_adapter_le_clear_advertising_data = - _bt_adapter_le_clear_advertising_dataPtr - .asFunction(); - - /// @deprecated Deprecated since 2.3.1 - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Start advertising with passed advertiser and advertising parameters. - /// @since_tizen @if WEARABLE @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @details Once Bluetooth advertising is started, nearby Bluetooth LE(Low Energy) supported - /// devices can know this device's existence. And one of them can make a connection request, - /// if it is allowed. - /// - /// @param[in] advertiser The handle of advertiser - /// @param[in] adv_params The parameters of advertising \n - /// If NULL is passed, default values which are defined in driver / controller are used. - /// @param[in] cb The callback to report the result of this function - /// @param[in] user_data The user data to be passed when callback is called - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOW_IN_PROGRESS Operation is now in progress - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post This function invokes bt_adapter_le_advertising_state_changed_cb(). - /// - /// @see bt_adapter_le_stop_advertising() - /// @see bt_adapter_le_advertising_state_changed_cb() - int bt_adapter_le_start_advertising( - bt_advertiser_h advertiser, - ffi.Pointer adv_params, - bt_adapter_le_advertising_state_changed_cb cb, - ffi.Pointer user_data, - ) { - return _bt_adapter_le_start_advertising( - advertiser, - adv_params, - cb, - user_data, - ); - } - - late final _bt_adapter_le_start_advertisingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_advertiser_h, - ffi.Pointer, - bt_adapter_le_advertising_state_changed_cb, - ffi.Pointer)>>('bt_adapter_le_start_advertising'); - late final _bt_adapter_le_start_advertising = - _bt_adapter_le_start_advertisingPtr.asFunction< - int Function( - bt_advertiser_h, - ffi.Pointer, - bt_adapter_le_advertising_state_changed_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Stops the advertising. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] advertiser The handle of advertiser - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOT_IN_PROGRESS Operation is not in progress - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The advertising must be going on with bt_adapter_le_start_advertising_new(). - /// @post This function invokes bt_adapter_le_advertising_state_changed_cb(). - /// - /// @see bt_adapter_le_start_advertising_new() - /// @see bt_adapter_le_advertising_state_changed_cb() - int bt_adapter_le_stop_advertising( - bt_advertiser_h advertiser, - ) { - return _bt_adapter_le_stop_advertising( - advertiser, - ); - } - - late final _bt_adapter_le_stop_advertisingPtr = - _lookup>( - 'bt_adapter_le_stop_advertising'); - late final _bt_adapter_le_stop_advertising = - _bt_adapter_le_stop_advertisingPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Start advertising with passed advertiser and advertising parameters. - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @details Once Bluetooth advertising is started, nearby Bluetooth LE(Low Energy) supported - /// devices can know this device's existence. And one of them can make a connection request, - /// if it is allowed. - /// - /// @param[in] advertiser The handle of advertiser - /// @param[in] cb The callback to report the result of this function - /// @param[in] user_data The user data to be passed when callback is called - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOW_IN_PROGRESS Operation is now in progress - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post This function invokes bt_adapter_le_advertising_state_changed_cb(). - /// - /// @see bt_adapter_le_stop_advertising() - /// @see bt_adapter_le_advertising_state_changed_cb() - int bt_adapter_le_start_advertising_new( - bt_advertiser_h advertiser, - bt_adapter_le_advertising_state_changed_cb cb, - ffi.Pointer user_data, - ) { - return _bt_adapter_le_start_advertising_new( - advertiser, - cb, - user_data, - ); - } - - late final _bt_adapter_le_start_advertising_newPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_advertiser_h, - bt_adapter_le_advertising_state_changed_cb, - ffi.Pointer)>>('bt_adapter_le_start_advertising_new'); - late final _bt_adapter_le_start_advertising_new = - _bt_adapter_le_start_advertising_newPtr.asFunction< - int Function( - bt_advertiser_h, - bt_adapter_le_advertising_state_changed_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Set advertising mode to control the advertising power and latency. - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] advertiser The handle of advertiser - /// @param[in] mode The mode of advertising - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOW_IN_PROGRESS Operation is now in progress - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_start_advertising_new() - int bt_adapter_le_set_advertising_mode( - bt_advertiser_h advertiser, - int mode, - ) { - return _bt_adapter_le_set_advertising_mode( - advertiser, - mode, - ); - } - - late final _bt_adapter_le_set_advertising_modePtr = - _lookup>( - 'bt_adapter_le_set_advertising_mode'); - late final _bt_adapter_le_set_advertising_mode = - _bt_adapter_le_set_advertising_modePtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Set whether the advertising type should be connectable or non-connectable - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] advertiser The handle of advertiser - /// @param[in] connectable The type of advertising - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOW_IN_PROGRESS Operation is now in progress - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_start_advertising_new() - int bt_adapter_le_set_advertising_connectable( - bt_advertiser_h advertiser, - bool connectable, - ) { - return _bt_adapter_le_set_advertising_connectable( - advertiser, - connectable, - ); - } - - late final _bt_adapter_le_set_advertising_connectablePtr = - _lookup>( - 'bt_adapter_le_set_advertising_connectable'); - late final _bt_adapter_le_set_advertising_connectable = - _bt_adapter_le_set_advertising_connectablePtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets Bluetooth LE scan mode - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] scan_mode The scan mode - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled - /// @retval #BT_ERROR_INVALID_PARAMETER Parameter is invalid - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// @pre The state of local bluetooth must be #BT_ADAPTER_ENABLED. - /// @pre The bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - int bt_adapter_le_set_scan_mode( - int scan_mode, - ) { - return _bt_adapter_le_set_scan_mode( - scan_mode, - ); - } - - late final _bt_adapter_le_set_scan_modePtr = - _lookup>( - 'bt_adapter_le_set_scan_mode'); - late final _bt_adapter_le_set_scan_mode = - _bt_adapter_le_set_scan_modePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Creates a bond with a remote Bluetooth device, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @remarks A bond can be destroyed by bt_device_destroy_bond().\n - /// The bonding request can be cancelled by bt_device_cancel_bonding(). - /// - /// @param[in] remote_address The address of the remote Bluetooth device with which the bond should be created - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_RESOURCE_BUSY Device or resource busy - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @pre The remote device must be discoverable with bt_adapter_start_device_discovery(). - /// @post This function invokes bt_device_bond_created_cb(). - /// - /// @see bt_adapter_start_device_discovery() - /// @see bt_device_bond_created_cb() - /// @see bt_device_cancel_bonding() - /// @see bt_device_destroy_bond() - /// @see bt_device_set_bond_created_cb() - /// @see bt_device_unset_bond_created_cb() - int bt_device_create_bond( - ffi.Pointer remote_address, - ) { - return _bt_device_create_bond( - remote_address, - ); - } - - late final _bt_device_create_bondPtr = - _lookup)>>( - 'bt_device_create_bond'); - late final _bt_device_create_bond = _bt_device_create_bondPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Cancels the bonding process. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @remarks Use this function when the remote Bluetooth device is not responding to the - /// bond request or you wish to cancel the bonding request. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOT_IN_PROGRESS Operation not in progress - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The creating a bond must be in progress by bt_device_create_bond(). - /// - /// @see bt_device_create_bond() - /// @see bt_device_bond_created_cb() - /// @see bt_device_set_bond_created_cb() - /// @see bt_device_unset_bond_created_cb() - int bt_device_cancel_bonding() { - return _bt_device_cancel_bonding(); - } - - late final _bt_device_cancel_bondingPtr = - _lookup>( - 'bt_device_cancel_bonding'); - late final _bt_device_cancel_bonding = - _bt_device_cancel_bondingPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Destroys the bond, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] remote_address The address of the remote Bluetooth device to remove bonding - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_RESOURCE_BUSY Device or resource busy - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_BONDED Remote device not bonded - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @pre The bond with the remote device must be created with bt_device_create_bond(). - /// @post This function invokes bt_device_bond_destroyed_cb(). - /// - /// @see bt_device_create_bond() - /// @see bt_device_bond_destroyed_cb() - /// @see bt_device_set_bond_destroyed_cb() - /// @see bt_device_unset_bond_destroyed_cb() - int bt_device_destroy_bond( - ffi.Pointer remote_address, - ) { - return _bt_device_destroy_bond( - remote_address, - ); - } - - late final _bt_device_destroy_bondPtr = - _lookup)>>( - 'bt_device_destroy_bond'); - late final _bt_device_destroy_bond = _bt_device_destroy_bondPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Sets an alias for the bonded device. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] remote_address The address of the remote Bluetooth device - /// @param[in] alias The alias of the remote Bluetooth device - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_BONDED Remote device not bonded - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @pre The bond with the remote device must be created with bt_device_create_bond(). - /// - /// @see bt_device_create_bond() - int bt_device_set_alias( - ffi.Pointer remote_address, - ffi.Pointer alias, - ) { - return _bt_device_set_alias( - remote_address, - alias, - ); - } - - late final _bt_device_set_aliasPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('bt_device_set_alias'); - late final _bt_device_set_alias = _bt_device_set_aliasPtr - .asFunction, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Sets the authorization of a bonded device, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @remarks Once a device is authorized, you don't need to receive a confirmation. - /// - /// @param[in] remote_address The address of the remote Bluetooth device to authorize - /// @param[in] authorization_state The Bluetooth authorization state - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_BONDED Remote device not bonded - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @pre The bond with the remote device must be created with bt_device_create_bond(). - /// @post bt_device_authorization_changed_cb() will be invoked. - /// - /// @see bt_device_create_bond() - /// @see bt_device_authorization_changed_cb() - /// @see bt_device_set_authorization_changed_cb() - /// @see bt_device_unset_authorization_changed_cb() - int bt_device_set_authorization( - ffi.Pointer remote_address, - int authorization_state, - ) { - return _bt_device_set_authorization( - remote_address, - authorization_state, - ); - } - - late final _bt_device_set_authorizationPtr = _lookup< - ffi - .NativeFunction, ffi.Int32)>>( - 'bt_device_set_authorization'); - late final _bt_device_set_authorization = _bt_device_set_authorizationPtr - .asFunction, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Starts the search for services supported by the specified device, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @remarks If creating a bond succeeds, which means bt_device_bond_created_cb() is called with result #BT_ERROR_NONE, - /// then you don't need to run this function.\n - /// The service search takes a couple of seconds to complete normally. \n - /// - /// @param[in] remote_address The address of the remote Bluetooth device whose services need to be checked - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_BONDED Remote device not bonded - /// @retval #BT_ERROR_SERVICE_SEARCH_FAILED Service search failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @pre The remote device must be discoverable with bt_adapter_start_device_discovery(). - /// @pre The bond with the remote device must be created with bt_device_create_bond(). - /// @post This function invokes bt_device_service_searched_cb(). - /// - /// @see bt_adapter_start_device_discovery() - /// @see bt_device_create_bond() - /// @see bt_device_bond_created_cb() - /// @see bt_device_service_searched_cb() - /// @see bt_device_set_service_searched_cb() - /// @see bt_device_unset_service_searched_cb() - int bt_device_start_service_search( - ffi.Pointer remote_address, - ) { - return _bt_device_start_service_search( - remote_address, - ); - } - - late final _bt_device_start_service_searchPtr = - _lookup)>>( - 'bt_device_start_service_search'); - late final _bt_device_start_service_search = - _bt_device_start_service_searchPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Gets the connected profiles. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] remote_address The address of the remote device - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @post bt_device_connected_profile() will be invoked. - /// @see bt_device_connected_profile() - int bt_device_foreach_connected_profiles( - ffi.Pointer remote_address, - bt_device_connected_profile callback, - ffi.Pointer user_data, - ) { - return _bt_device_foreach_connected_profiles( - remote_address, - callback, - user_data, - ); - } - - late final _bt_device_foreach_connected_profilesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, bt_device_connected_profile, - ffi.Pointer)>>('bt_device_foreach_connected_profiles'); - late final _bt_device_foreach_connected_profiles = - _bt_device_foreach_connected_profilesPtr.asFunction< - int Function(ffi.Pointer, bt_device_connected_profile, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Gets the profile connected status. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] remote_address The address of the remote device - /// @param[in] bt_profile wish to know bt_profile - /// @param[out] connected_status the connected status - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_BONDED Remote device not bonded - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - int bt_device_is_profile_connected( - ffi.Pointer remote_address, - int bt_profile, - ffi.Pointer connected_status, - ) { - return _bt_device_is_profile_connected( - remote_address, - bt_profile, - connected_status, - ); - } - - late final _bt_device_is_profile_connectedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int32, - ffi.Pointer)>>('bt_device_is_profile_connected'); - late final _bt_device_is_profile_connected = - _bt_device_is_profile_connectedPtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Updates a LE connection mode - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] remote_address The address of the remote Bluetooth device - /// @param[in] mode The LE connection mode - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_device_update_le_connection_mode( - ffi.Pointer remote_address, - int mode, - ) { - return _bt_device_update_le_connection_mode( - remote_address, - mode, - ); - } - - late final _bt_device_update_le_connection_modePtr = _lookup< - ffi - .NativeFunction, ffi.Int32)>>( - 'bt_device_update_le_connection_mode'); - late final _bt_device_update_le_connection_mode = - _bt_device_update_le_connection_modePtr - .asFunction, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Registers a callback function to be invoked when the bond creates. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_device_bond_created_cb() will be invoked. - /// @see bt_initialize() - /// @see bt_device_bond_created_cb() - /// @see bt_device_unset_bond_created_cb() - int bt_device_set_bond_created_cb( - bt_device_bond_created_cb callback, - ffi.Pointer user_data, - ) { - return _bt_device_set_bond_created_cb( - callback, - user_data, - ); - } - - late final _bt_device_set_bond_created_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_device_bond_created_cb, - ffi.Pointer)>>('bt_device_set_bond_created_cb'); - late final _bt_device_set_bond_created_cb = - _bt_device_set_bond_created_cbPtr.asFunction< - int Function(bt_device_bond_created_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_device_set_bond_created_cb() - int bt_device_unset_bond_created_cb() { - return _bt_device_unset_bond_created_cb(); - } - - late final _bt_device_unset_bond_created_cbPtr = - _lookup>( - 'bt_device_unset_bond_created_cb'); - late final _bt_device_unset_bond_created_cb = - _bt_device_unset_bond_created_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Registers a callback function to be invoked when the bond destroys. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_device_bond_destroyed_cb() will be invoked. - /// @see bt_initialize() - /// @see bt_device_bond_destroyed_cb() - /// @see bt_device_unset_bond_destroyed_cb() - int bt_device_set_bond_destroyed_cb( - bt_device_bond_destroyed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_device_set_bond_destroyed_cb( - callback, - user_data, - ); - } - - late final _bt_device_set_bond_destroyed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_device_bond_destroyed_cb, - ffi.Pointer)>>('bt_device_set_bond_destroyed_cb'); - late final _bt_device_set_bond_destroyed_cb = - _bt_device_set_bond_destroyed_cbPtr.asFunction< - int Function(bt_device_bond_destroyed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_device_set_bond_destroyed_cb() - int bt_device_unset_bond_destroyed_cb() { - return _bt_device_unset_bond_destroyed_cb(); - } - - late final _bt_device_unset_bond_destroyed_cbPtr = - _lookup>( - 'bt_device_unset_bond_destroyed_cb'); - late final _bt_device_unset_bond_destroyed_cb = - _bt_device_unset_bond_destroyed_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Registers a callback function to be invoked when the authorization of device changes. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_device_authorization_changed_cb() will be invoked. - /// @see bt_initialize() - /// @see bt_device_authorization_changed_cb() - /// @see bt_device_set_authorization_changed_cb() - /// @see bt_device_unset_authorization_changed_cb() - int bt_device_set_authorization_changed_cb( - bt_device_authorization_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_device_set_authorization_changed_cb( - callback, - user_data, - ); - } - - late final _bt_device_set_authorization_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_device_authorization_changed_cb, ffi.Pointer)>>( - 'bt_device_set_authorization_changed_cb'); - late final _bt_device_set_authorization_changed_cb = - _bt_device_set_authorization_changed_cbPtr.asFunction< - int Function( - bt_device_authorization_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_device_set_authorization_changed_cb() - int bt_device_unset_authorization_changed_cb() { - return _bt_device_unset_authorization_changed_cb(); - } - - late final _bt_device_unset_authorization_changed_cbPtr = - _lookup>( - 'bt_device_unset_authorization_changed_cb'); - late final _bt_device_unset_authorization_changed_cb = - _bt_device_unset_authorization_changed_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Registers a callback function to be invoked when the process of service search finishes. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_device_service_searched_cb() will be invoked. - /// @see bt_initialize() - /// @see bt_device_service_searched_cb() - /// @see bt_device_unset_service_searched_cb() - int bt_device_set_service_searched_cb( - bt_device_service_searched_cb callback, - ffi.Pointer user_data, - ) { - return _bt_device_set_service_searched_cb( - callback, - user_data, - ); - } - - late final _bt_device_set_service_searched_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_device_service_searched_cb, - ffi.Pointer)>>('bt_device_set_service_searched_cb'); - late final _bt_device_set_service_searched_cb = - _bt_device_set_service_searched_cbPtr.asFunction< - int Function(bt_device_service_searched_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_device_set_service_searched_cb() - int bt_device_unset_service_searched_cb() { - return _bt_device_unset_service_searched_cb(); - } - - late final _bt_device_unset_service_searched_cbPtr = - _lookup>( - 'bt_device_unset_service_searched_cb'); - late final _bt_device_unset_service_searched_cb = - _bt_device_unset_service_searched_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Registers a callback function to be invoked when the connection state is changed. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_device_connection_state_changed_cb() will be invoked. - /// @see bt_initialize() - /// @see bt_device_connection_state_changed_cb() - /// @see bt_device_unset_connection_state_changed_cb() - int bt_device_set_connection_state_changed_cb( - bt_device_connection_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_device_set_connection_state_changed_cb( - callback, - user_data, - ); - } - - late final _bt_device_set_connection_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_device_connection_state_changed_cb, - ffi.Pointer)>>( - 'bt_device_set_connection_state_changed_cb'); - late final _bt_device_set_connection_state_changed_cb = - _bt_device_set_connection_state_changed_cbPtr.asFunction< - int Function( - bt_device_connection_state_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Unregisters the callback function to be invoked when the connection state is changed. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_device_set_connection_state_changed_cb() - int bt_device_unset_connection_state_changed_cb() { - return _bt_device_unset_connection_state_changed_cb(); - } - - late final _bt_device_unset_connection_state_changed_cbPtr = - _lookup>( - 'bt_device_unset_connection_state_changed_cb'); - late final _bt_device_unset_connection_state_changed_cb = - _bt_device_unset_connection_state_changed_cbPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE - /// @brief Registers a rfcomm server socket with a specific UUID. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @remarks A socket can be destroyed by bt_socket_destroy_rfcomm(). - /// - /// @param[in] service_uuid The UUID of service to provide - /// @param[out] socket_fd The file descriptor of socket to listen - /// @return 0 on success, otherwise a negative error value. - /// - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// - /// @see bt_socket_listen_and_accept_rfcomm() - /// @see bt_socket_destroy_rfcomm() - int bt_socket_create_rfcomm( - ffi.Pointer service_uuid, - ffi.Pointer socket_fd, - ) { - return _bt_socket_create_rfcomm( - service_uuid, - socket_fd, - ); - } - - late final _bt_socket_create_rfcommPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('bt_socket_create_rfcomm'); - late final _bt_socket_create_rfcomm = _bt_socket_create_rfcommPtr - .asFunction, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE - /// @brief Removes the rfcomm server socket which was created using bt_socket_create_rfcomm(). - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @remarks If callback function bt_socket_connection_state_changed_cb() is set and the remote Bluetooth device is connected, - /// then bt_socket_connection_state_changed_cb() will be called when this function is finished successfully. - /// - /// @param[in] socket_fd The file descriptor of socket (which was created using bt_socket_create_rfcomm()) to destroy - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The socket must be created with bt_socket_create_rfcomm(). - /// @post If callback function bt_socket_connection_state_changed_cb() is set and the remote Bluetooth device is connected, - /// then bt_socket_connection_state_changed_cb() will be called. - /// @see bt_socket_create_rfcomm() - /// @see bt_socket_connection_state_changed_cb() - /// @see bt_socket_set_connection_state_changed_cb() - /// @see bt_socket_unset_connection_state_changed_cb() - int bt_socket_destroy_rfcomm( - int socket_fd, - ) { - return _bt_socket_destroy_rfcomm( - socket_fd, - ); - } - - late final _bt_socket_destroy_rfcommPtr = - _lookup>( - 'bt_socket_destroy_rfcomm'); - late final _bt_socket_destroy_rfcomm = - _bt_socket_destroy_rfcommPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE - /// @brief Starts listening on passed rfcomm socket and accepts connection requests. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @details Pop-up is shown automatically when a RFCOMM connection is requested. - /// bt_socket_connection_state_changed_cb() will be called with - /// #BT_SOCKET_CONNECTED if you click "yes" and connection is finished successfully. - /// @param[in] socket_fd The file descriptor of socket on which start to listen - /// @param[in] max_pending_connections The maximum number of pending connections - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The socket must be created with bt_socket_create_rfcomm(). - /// @post If callback function bt_socket_connection_state_changed_cb() is set, - /// then bt_socket_connection_state_changed_cb() will be called when the remote Bluetooth device is connected. - /// @see bt_socket_create_rfcomm() - /// @see bt_socket_connection_state_changed_cb() - /// @see bt_socket_set_connection_state_changed_cb() - /// @see bt_socket_unset_connection_state_changed_cb() - int bt_socket_listen_and_accept_rfcomm( - int socket_fd, - int max_pending_connections, - ) { - return _bt_socket_listen_and_accept_rfcomm( - socket_fd, - max_pending_connections, - ); - } - - late final _bt_socket_listen_and_accept_rfcommPtr = - _lookup>( - 'bt_socket_listen_and_accept_rfcomm'); - late final _bt_socket_listen_and_accept_rfcomm = - _bt_socket_listen_and_accept_rfcommPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE - /// @brief Connects to a specific RFCOMM based service on a remote Bluetooth device UUID, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @remarks A connection can be disconnected by bt_socket_disconnect_rfcomm(). - /// - /// @param[in] remote_address The address of the remote Bluetooth device - /// @param[in] service_uuid The UUID of service provided by the remote Bluetooth device - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @pre The remote device must be discoverable with bt_adapter_start_device_discovery(). - /// @pre The bond with the remote device must be created with bt_device_create_bond(). - /// @post This function invokes bt_socket_connection_state_changed_cb(). - /// - /// @see bt_device_create_bond() - /// @see bt_adapter_start_device_discovery() - /// @see bt_device_start_service_search() - /// @see bt_socket_disconnect_rfcomm() - /// @see bt_socket_connection_state_changed_cb() - /// @see bt_socket_set_connection_state_changed_cb() - /// @see bt_socket_unset_connection_state_changed_cb() - int bt_socket_connect_rfcomm( - ffi.Pointer remote_address, - ffi.Pointer service_uuid, - ) { - return _bt_socket_connect_rfcomm( - remote_address, - service_uuid, - ); - } - - late final _bt_socket_connect_rfcommPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('bt_socket_connect_rfcomm'); - late final _bt_socket_connect_rfcomm = _bt_socket_connect_rfcommPtr - .asFunction, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE - /// @brief Disconnects the RFCOMM connection with the given file descriptor of connected socket. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] socket_fd The file descriptor of socket to close which was received using bt_socket_connection_state_changed_cb(). - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The connection must be established. - /// - /// @see bt_socket_connection_state_changed_cb() - /// @see bt_socket_set_connection_state_changed_cb() - /// @see bt_socket_unset_connection_state_changed_cb() - int bt_socket_disconnect_rfcomm( - int socket_fd, - ) { - return _bt_socket_disconnect_rfcomm( - socket_fd, - ); - } - - late final _bt_socket_disconnect_rfcommPtr = - _lookup>( - 'bt_socket_disconnect_rfcomm'); - late final _bt_socket_disconnect_rfcomm = - _bt_socket_disconnect_rfcommPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE - /// @brief Sends data to the connected device. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @remark The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// - /// @param[in] socket_fd The file descriptor of connected socket which was received using bt_socket_connection_state_changed_cb() - /// @param[in] data The data to be sent - /// @param[in] length The length of data to be sent - /// - /// @return the number of bytes written (zero indicates nothing was written). - /// @retval On error, -1 is returned, and errno is set appropriately. See write 2 man page. - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// @exception BT_ERROR_PERMISSION_DENIED Permission denied - /// @exception BT_ERROR_AGAIN Resource temporarily unavailable - /// - /// @pre The connection must be established. - /// - /// @see bt_socket_connection_state_changed_cb() - /// @see bt_socket_set_connection_state_changed_cb() - /// @see bt_socket_unset_connection_state_changed_cb() - int bt_socket_send_data( - int socket_fd, - ffi.Pointer data, - int length, - ) { - return _bt_socket_send_data( - socket_fd, - data, - length, - ); - } - - late final _bt_socket_send_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Int)>>('bt_socket_send_data'); - late final _bt_socket_send_data = _bt_socket_send_dataPtr - .asFunction, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE - /// @brief Register a callback function that will be invoked when you receive data. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_socket_data_received_cb() will be invoked. - /// @see bt_initialize() - /// @see bt_socket_data_received_cb() - /// @see bt_socket_set_data_received_cb() - /// @see bt_socket_unset_data_received_cb() - int bt_socket_set_data_received_cb( - bt_socket_data_received_cb callback, - ffi.Pointer user_data, - ) { - return _bt_socket_set_data_received_cb( - callback, - user_data, - ); - } - - late final _bt_socket_set_data_received_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_socket_data_received_cb, - ffi.Pointer)>>('bt_socket_set_data_received_cb'); - late final _bt_socket_set_data_received_cb = - _bt_socket_set_data_received_cbPtr.asFunction< - int Function(bt_socket_data_received_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_socket_data_received_cb() - /// @see bt_socket_set_data_received_cb() - int bt_socket_unset_data_received_cb() { - return _bt_socket_unset_data_received_cb(); - } - - late final _bt_socket_unset_data_received_cbPtr = - _lookup>( - 'bt_socket_unset_data_received_cb'); - late final _bt_socket_unset_data_received_cb = - _bt_socket_unset_data_received_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE - /// @brief Register a callback function that will be invoked when a RFCOMM connection is requested. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_socket_connection_requested_cb() will be invoked. - /// @see bt_initialize() - /// @see bt_socket_unset_connection_requested_cb() - int bt_socket_set_connection_requested_cb( - bt_socket_connection_requested_cb callback, - ffi.Pointer user_data, - ) { - return _bt_socket_set_connection_requested_cb( - callback, - user_data, - ); - } - - late final _bt_socket_set_connection_requested_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_socket_connection_requested_cb, - ffi.Pointer)>>('bt_socket_set_connection_requested_cb'); - late final _bt_socket_set_connection_requested_cb = - _bt_socket_set_connection_requested_cbPtr.asFunction< - int Function( - bt_socket_connection_requested_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_socket_set_connection_requested_cb() - /// @see bt_socket_connection_requested_cb() - int bt_socket_unset_connection_requested_cb() { - return _bt_socket_unset_connection_requested_cb(); - } - - late final _bt_socket_unset_connection_requested_cbPtr = - _lookup>( - 'bt_socket_unset_connection_requested_cb'); - late final _bt_socket_unset_connection_requested_cb = - _bt_socket_unset_connection_requested_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE - /// @brief Register a callback function that will be invoked when the connection state changes. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_socket_connection_state_changed_cb() will be invoked. - /// @see bt_initialize() - /// @see bt_socket_connection_state_changed_cb() - /// @see bt_socket_unset_connection_state_changed_cb() - int bt_socket_set_connection_state_changed_cb( - bt_socket_connection_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_socket_set_connection_state_changed_cb( - callback, - user_data, - ); - } - - late final _bt_socket_set_connection_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_socket_connection_state_changed_cb, - ffi.Pointer)>>( - 'bt_socket_set_connection_state_changed_cb'); - late final _bt_socket_set_connection_state_changed_cb = - _bt_socket_set_connection_state_changed_cbPtr.asFunction< - int Function( - bt_socket_connection_state_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_socket_connection_state_changed_cb() - /// @see bt_socket_set_connection_state_changed_cb() - int bt_socket_unset_connection_state_changed_cb() { - return _bt_socket_unset_connection_state_changed_cb(); - } - - late final _bt_socket_unset_connection_state_changed_cbPtr = - _lookup>( - 'bt_socket_unset_connection_state_changed_cb'); - late final _bt_socket_unset_connection_state_changed_cb = - _bt_socket_unset_connection_state_changed_cbPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_SERVER_MODULE - /// @brief Initializes the Bluetooth OPP server requested by bt_opp_server_connection_requested_cb(). - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @details No popup appears when an OPP connection is requested from a remote device. - /// Instead, @a connection_requested_cb() will be called. - /// At that time, you can call either bt_opp_server_accept() or bt_opp_server_reject(). - /// @remarks This function must be called to start Bluetooth OPP server. \n - /// You must free all resources of the Bluetooth service by calling bt_opp_server_deinitialize() if Bluetooth OPP service is no longer needed. - /// @param[in] destination The destination path - /// @param[in] connection_requested_cb The callback called when an OPP connection is requested - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_RESOURCE_BUSY Device or resource busy - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_opp_server_connection_requested_cb() - /// @see bt_opp_server_deinitialize() - /// @see bt_opp_server_accept() - /// @see bt_opp_server_reject() - int bt_opp_server_initialize_by_connection_request( - ffi.Pointer destination, - bt_opp_server_connection_requested_cb connection_requested_cb, - ffi.Pointer user_data, - ) { - return _bt_opp_server_initialize_by_connection_request( - destination, - connection_requested_cb, - user_data, - ); - } - - late final _bt_opp_server_initialize_by_connection_requestPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - bt_opp_server_connection_requested_cb, - ffi.Pointer)>>( - 'bt_opp_server_initialize_by_connection_request'); - late final _bt_opp_server_initialize_by_connection_request = - _bt_opp_server_initialize_by_connection_requestPtr.asFunction< - int Function(ffi.Pointer, - bt_opp_server_connection_requested_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_SERVER_MODULE - /// @brief Deinitializes the Bluetooth OPP server. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_opp_server_deinitialize() - int bt_opp_server_deinitialize() { - return _bt_opp_server_deinitialize(); - } - - late final _bt_opp_server_deinitializePtr = - _lookup>( - 'bt_opp_server_deinitialize'); - late final _bt_opp_server_deinitialize = - _bt_opp_server_deinitializePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_SERVER_MODULE - /// @brief Accepts the push request from the remote device. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @remarks If you initialize OPP server by bt_opp_server_initialize_by_connection_request(), then name is ignored. - /// You can cancel the pushes by bt_opp_server_cancel_transfer() with transfer_id. - /// @param[in] progress_cb The callback called when a file is being transferred - /// @param[in] finished_cb The callback called when a transfer is finished - /// @param[in] name The name to store. This can be NULL if you initialize OPP server by bt_opp_server_initialize_by_connection_request(). - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] transfer_id The ID of transfer - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOW_IN_PROGRESS Operation now in progress - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_opp_server_reject() - int bt_opp_server_accept( - bt_opp_server_transfer_progress_cb progress_cb, - bt_opp_server_transfer_finished_cb finished_cb, - ffi.Pointer name, - ffi.Pointer user_data, - ffi.Pointer transfer_id, - ) { - return _bt_opp_server_accept( - progress_cb, - finished_cb, - name, - user_data, - transfer_id, - ); - } - - late final _bt_opp_server_acceptPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_opp_server_transfer_progress_cb, - bt_opp_server_transfer_finished_cb, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('bt_opp_server_accept'); - late final _bt_opp_server_accept = _bt_opp_server_acceptPtr.asFunction< - int Function( - bt_opp_server_transfer_progress_cb, - bt_opp_server_transfer_finished_cb, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_SERVER_MODULE - /// @brief Rejects the push request from the remote device. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_opp_server_accept() - int bt_opp_server_reject() { - return _bt_opp_server_reject(); - } - - late final _bt_opp_server_rejectPtr = - _lookup>('bt_opp_server_reject'); - late final _bt_opp_server_reject = - _bt_opp_server_rejectPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_SERVER_MODULE - /// @brief Cancels the transfer. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] transfer_id The ID of transfer - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_opp_server_accept() - int bt_opp_server_cancel_transfer( - int transfer_id, - ) { - return _bt_opp_server_cancel_transfer( - transfer_id, - ); - } - - late final _bt_opp_server_cancel_transferPtr = - _lookup>( - 'bt_opp_server_cancel_transfer'); - late final _bt_opp_server_cancel_transfer = - _bt_opp_server_cancel_transferPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_SERVER_MODULE - /// @brief Sets the destination path of file to be pushed. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] destination The destination path of file to be pushed - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_opp_server_set_destination( - ffi.Pointer destination, - ) { - return _bt_opp_server_set_destination( - destination, - ); - } - - late final _bt_opp_server_set_destinationPtr = - _lookup)>>( - 'bt_opp_server_set_destination'); - late final _bt_opp_server_set_destination = _bt_opp_server_set_destinationPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_CLIENT_MODULE - /// @brief Initializes the Bluetooth OPP client. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks This function must be called before Bluetooth OPP client starts. \n - /// You must free all resources of the Bluetooth service by calling bt_opp_client_deinitialize() - /// if Bluetooth OPP service is no longer needed. - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_RESOURCE_BUSY Device or resource busy - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_opp_client_deinitialize() - int bt_opp_client_initialize() { - return _bt_opp_client_initialize(); - } - - late final _bt_opp_client_initializePtr = - _lookup>( - 'bt_opp_client_initialize'); - late final _bt_opp_client_initialize = - _bt_opp_client_initializePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_CLIENT_MODULE - /// @brief Deinitializes the Bluetooth OPP client. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_opp_client_initialize() - int bt_opp_client_deinitialize() { - return _bt_opp_client_deinitialize(); - } - - late final _bt_opp_client_deinitializePtr = - _lookup>( - 'bt_opp_client_deinitialize'); - late final _bt_opp_client_deinitialize = - _bt_opp_client_deinitializePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_CLIENT_MODULE - /// @brief Adds file to be pushed. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] file The path of file to be pushed - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_opp_client_clear_files() - /// @see bt_opp_client_push_files() - int bt_opp_client_add_file( - ffi.Pointer file, - ) { - return _bt_opp_client_add_file( - file, - ); - } - - late final _bt_opp_client_add_filePtr = - _lookup)>>( - 'bt_opp_client_add_file'); - late final _bt_opp_client_add_file = _bt_opp_client_add_filePtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_CLIENT_MODULE - /// @brief Adds file to be pushed. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_opp_client_add_file() - /// @see bt_opp_client_push_files() - int bt_opp_client_clear_files() { - return _bt_opp_client_clear_files(); - } - - late final _bt_opp_client_clear_filesPtr = - _lookup>( - 'bt_opp_client_clear_files'); - late final _bt_opp_client_clear_files = - _bt_opp_client_clear_filesPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_CLIENT_MODULE - /// @brief Pushes the file to the remote device, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @details At first, bt_opp_client_push_responded_cb() will be called when OPP server responds to the push request. - /// After connection is established, bt_opp_client_push_progress_cb() will be called repeatedly until a file is transferred completely. - /// If you send several files, then bt_opp_client_push_progress_cb() with another file will be called repeatedly until the file is transferred completely. - /// bt_opp_client_push_finished_cb() will be called when the push request is finished. - /// @param[in] remote_address The remote address - /// @param[in] responded_cb The callback called when OPP server responds to the push request - /// @param[in] progress_cb The callback called when each file is being transferred - /// @param[in] finished_cb The callback called when the push request is finished - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOW_IN_PROGRESS Operation now in progress - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_opp_client_initialize() - /// @see bt_opp_client_cancel_push - int bt_opp_client_push_files( - ffi.Pointer remote_address, - bt_opp_client_push_responded_cb responded_cb, - bt_opp_client_push_progress_cb progress_cb, - bt_opp_client_push_finished_cb finished_cb, - ffi.Pointer user_data, - ) { - return _bt_opp_client_push_files( - remote_address, - responded_cb, - progress_cb, - finished_cb, - user_data, - ); - } - - late final _bt_opp_client_push_filesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - bt_opp_client_push_responded_cb, - bt_opp_client_push_progress_cb, - bt_opp_client_push_finished_cb, - ffi.Pointer)>>('bt_opp_client_push_files'); - late final _bt_opp_client_push_files = - _bt_opp_client_push_filesPtr.asFunction< - int Function( - ffi.Pointer, - bt_opp_client_push_responded_cb, - bt_opp_client_push_progress_cb, - bt_opp_client_push_finished_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_CLIENT_MODULE - /// @brief Cancels the push request in progress, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre bt_opp_client_push_files() must be called. - /// @post bt_opp_client_push_finished_cb() will be invoked with result #BT_ERROR_CANCELLED, - /// which is a parameter of bt_opp_client_push_files(). - /// @see bt_opp_client_initialize() - /// @see bt_opp_client_push_files() - int bt_opp_client_cancel_push() { - return _bt_opp_client_cancel_push(); - } - - late final _bt_opp_client_cancel_pushPtr = - _lookup>( - 'bt_opp_client_cancel_push'); - late final _bt_opp_client_cancel_push = - _bt_opp_client_cancel_pushPtr.asFunction(); - - /// @ingroup @if WEARABLE CAPI_NETWORK_BLUETOOTH_HID_HOST_MODULE CAPI @else_NETWORK_BLUETOOTH_HID_MODULE @endif - /// @brief Initializes the Bluetooth HID(Human Interface Device) Host. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks This function must be called before Bluetooth HID Host starts. \n - /// You must free all resources of the Bluetooth service by calling bt_hid_host_deinitialize() - /// if Bluetooth HID Host service is no longer needed. - /// @param[in] connection_cb The callback called when the connection state is changed - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_hid_host_deinitialize() - int bt_hid_host_initialize( - bt_hid_host_connection_state_changed_cb connection_cb, - ffi.Pointer user_data, - ) { - return _bt_hid_host_initialize( - connection_cb, - user_data, - ); - } - - late final _bt_hid_host_initializePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_hid_host_connection_state_changed_cb, - ffi.Pointer)>>('bt_hid_host_initialize'); - late final _bt_hid_host_initialize = _bt_hid_host_initializePtr.asFunction< - int Function( - bt_hid_host_connection_state_changed_cb, ffi.Pointer)>(); - - /// @ingroup @if WEARABLE CAPI_NETWORK_BLUETOOTH_HID_HOST_MODULE CAPI @else_NETWORK_BLUETOOTH_HID_MODULE @endif - /// @brief Deinitializes the Bluetooth HID(Human Interface Device) Host. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth HID service must be initialized with bt_hid_host_initialize(). - /// @see bt_hid_host_initialize() - int bt_hid_host_deinitialize() { - return _bt_hid_host_deinitialize(); - } - - late final _bt_hid_host_deinitializePtr = - _lookup>( - 'bt_hid_host_deinitialize'); - late final _bt_hid_host_deinitialize = - _bt_hid_host_deinitializePtr.asFunction(); - - /// @ingroup @if WEARABLE CAPI_NETWORK_BLUETOOTH_HID_HOST_MODULE CAPI @else_NETWORK_BLUETOOTH_HID_MODULE @endif - /// @brief Connects the remote device with the HID(Human Interface Device) service, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] remote_address The remote address - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The local device must be bonded with the remote device by bt_device_create_bond(). - /// @pre The Bluetooth HID service must be initialized with bt_hid_host_initialize(). - /// @post bt_hid_host_connection_state_changed_cb() will be invoked. - /// @see bt_hid_host_disconnect() - /// @see bt_hid_host_connection_state_changed_cb() - int bt_hid_host_connect( - ffi.Pointer remote_address, - ) { - return _bt_hid_host_connect( - remote_address, - ); - } - - late final _bt_hid_host_connectPtr = - _lookup)>>( - 'bt_hid_host_connect'); - late final _bt_hid_host_connect = - _bt_hid_host_connectPtr.asFunction)>(); - - /// @ingroup @if WEARABLE CAPI_NETWORK_BLUETOOTH_HID_HOST_MODULE CAPI @else_NETWORK_BLUETOOTH_HID_MODULE @endif - /// @brief Disconnects the remote device with the HID(Human Interface Device) service, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] remote_address The remote address - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected by bt_hid_host_connect(). - /// @post bt_hid_host_connection_state_changed_cb() will be invoked. - /// @see bt_hid_host_connect() - /// @see bt_hid_host_connection_state_changed_cb() - int bt_hid_host_disconnect( - ffi.Pointer remote_address, - ) { - return _bt_hid_host_disconnect( - remote_address, - ); - } - - late final _bt_hid_host_disconnectPtr = - _lookup)>>( - 'bt_hid_host_disconnect'); - late final _bt_hid_host_disconnect = _bt_hid_host_disconnectPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE - /// @brief Activates the Bluetooth HID Device role. - /// @since_tizen @if WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @remarks This function must be called to register HID UUID. - /// Only then a remote device is able to identify this one as a HID device. - /// - /// @param[in] callback The callback called when the connection state is changed - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOW_IN_PROGRESS Already activated - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_hid_device_deactivate() - int bt_hid_device_activate( - bt_hid_device_connection_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_hid_device_activate( - callback, - user_data, - ); - } - - late final _bt_hid_device_activatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_hid_device_connection_state_changed_cb, - ffi.Pointer)>>('bt_hid_device_activate'); - late final _bt_hid_device_activate = _bt_hid_device_activatePtr.asFunction< - int Function( - bt_hid_device_connection_state_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE - /// @brief Deactivates the Bluetooth HID Device role. - /// @since_tizen @if WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @remarks This function must be called to deregister the HID UUID. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOT_IN_PROGRESS Not activated - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_hid_device_activate() - int bt_hid_device_deactivate() { - return _bt_hid_device_deactivate(); - } - - late final _bt_hid_device_deactivatePtr = - _lookup>( - 'bt_hid_device_deactivate'); - late final _bt_hid_device_deactivate = - _bt_hid_device_deactivatePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE - /// @brief Initiates the HID device connection with the Device role, asynchronously. - /// @since_tizen @if WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @remarks This function must be called to Initiate the HID device role connection. - /// - /// @param[in] remote_address The remote device's address. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOT_IN_PROGRESS Not activated - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_ALREADY_DONE Already connected - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @pre The local device must be bonded with the remote device by bt_device_create_bond(). - /// @see bt_initialize() - /// @see bt_hid_device_activate() - int bt_hid_device_connect( - ffi.Pointer remote_address, - ) { - return _bt_hid_device_connect( - remote_address, - ); - } - - late final _bt_hid_device_connectPtr = - _lookup)>>( - 'bt_hid_device_connect'); - late final _bt_hid_device_connect = _bt_hid_device_connectPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE - /// @brief Disconnects from the HID Host device, asynchronously. - /// @since_tizen @if WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] remote_address The remote device's address. - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_hid_device_connection_state_changed_cb() - int bt_hid_device_disconnect( - ffi.Pointer remote_address, - ) { - return _bt_hid_device_disconnect( - remote_address, - ); - } - - late final _bt_hid_device_disconnectPtr = - _lookup)>>( - 'bt_hid_device_disconnect'); - late final _bt_hid_device_disconnect = _bt_hid_device_disconnectPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE - /// @brief Sends the mouse event data to the remote device. - /// @since_tizen @if WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] remote_address The remote device's address. - /// @param[in] mouse_data The mouse data to be passed to the remote device. - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The HID connection must be established. - /// @see bt_hid_device_connection_state_changed_cb() - int bt_hid_device_send_mouse_event( - ffi.Pointer remote_address, - ffi.Pointer mouse_data, - ) { - return _bt_hid_device_send_mouse_event( - remote_address, - mouse_data, - ); - } - - late final _bt_hid_device_send_mouse_eventPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>( - 'bt_hid_device_send_mouse_event'); - late final _bt_hid_device_send_mouse_event = - _bt_hid_device_send_mouse_eventPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE - /// @brief Sends the keyboard event data to the remote device. - /// @since_tizen @if WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] remote_address The remote device's address. - /// @param[in] key_data The key data to be passed to the remote device - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The HID connection must be established. - /// @see bt_hid_device_connection_state_changed_cb() - int bt_hid_device_send_key_event( - ffi.Pointer remote_address, - ffi.Pointer key_data, - ) { - return _bt_hid_device_send_key_event( - remote_address, - key_data, - ); - } - - late final _bt_hid_device_send_key_eventPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('bt_hid_device_send_key_event'); - late final _bt_hid_device_send_key_event = - _bt_hid_device_send_key_eventPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE - /// @brief Sets the callback called when the device receives data from the HID Host. - /// @since_tizen @if WEARABLE 3.0 @endif - /// - /// @param[in] callback The callback function to be set when data is received. - /// @param[in] user_data The user data to be passed to the callback. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_hid_device_connection_state_changed_cb() - int bt_hid_device_set_data_received_cb( - bt_hid_device_data_received_cb callback, - ffi.Pointer user_data, - ) { - return _bt_hid_device_set_data_received_cb( - callback, - user_data, - ); - } - - late final _bt_hid_device_set_data_received_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_hid_device_data_received_cb, - ffi.Pointer)>>('bt_hid_device_set_data_received_cb'); - late final _bt_hid_device_set_data_received_cb = - _bt_hid_device_set_data_received_cbPtr.asFunction< - int Function( - bt_hid_device_data_received_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE - /// @brief Unsets the data received callback. - /// @since_tizen @if WEARABLE 3.0 @endif - /// - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_hid_device_connection_state_changed_cb() - int bt_hid_device_unset_data_received_cb() { - return _bt_hid_device_unset_data_received_cb(); - } - - late final _bt_hid_device_unset_data_received_cbPtr = - _lookup>( - 'bt_hid_device_unset_data_received_cb'); - late final _bt_hid_device_unset_data_received_cb = - _bt_hid_device_unset_data_received_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE - /// @brief Responds to reports from the HID Host. - /// @since_tizen @if WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] remote_address The remote device's address. - /// @param[in] header_type The response header type - /// @param[in] param_type The response parameter type - /// @param[in] data The response data - /// @param[in] data_len The length of the response data - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The HID connection must be established. - /// @see bt_hid_device_connection_state_changed_cb() - int bt_hid_device_reply_to_report( - ffi.Pointer remote_address, - int header_type, - int param_type, - ffi.Pointer data, - int data_len, - ) { - return _bt_hid_device_reply_to_report( - remote_address, - header_type, - param_type, - data, - data_len, - ); - } - - late final _bt_hid_device_reply_to_reportPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Pointer, - ffi.UnsignedInt)>>('bt_hid_device_reply_to_report'); - late final _bt_hid_device_reply_to_report = - _bt_hid_device_reply_to_reportPtr.asFunction< - int Function( - ffi.Pointer, int, int, ffi.Pointer, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE - /// @brief Initializes the Bluetooth profiles related with audio. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks This function must be called before Bluetooth profiles related with audio starts. \n - /// You must free all resources of the this service by calling bt_audio_deinitialize() - /// if Bluetooth profiles related with audio service is no longer needed. - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_audio_deinitialize() - int bt_audio_initialize() { - return _bt_audio_initialize(); - } - - late final _bt_audio_initializePtr = - _lookup>('bt_audio_initialize'); - late final _bt_audio_initialize = - _bt_audio_initializePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE - /// @brief Deinitializes the Bluetooth profiles related with audio. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth audio service must be initialized with bt_audio_initialize(). - /// @see bt_audio_initialize() - int bt_audio_deinitialize() { - return _bt_audio_deinitialize(); - } - - late final _bt_audio_deinitializePtr = - _lookup>('bt_audio_deinitialize'); - late final _bt_audio_deinitialize = - _bt_audio_deinitializePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE - /// @brief Connects the remote device with the given audio profile, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @details If you input type as #BT_AUDIO_PROFILE_TYPE_ALL and connection request succeeds, then bt_audio_connection_state_changed_cb() will be called twice - /// when #BT_AUDIO_PROFILE_TYPE_HSP_HFP is connected and #BT_AUDIO_PROFILE_TYPE_A2DP is connected. - /// @param[in] remote_address The remote address - /// @param[in] type The type of audio profile - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth audio service must be initialized with bt_audio_initialize(). - /// @pre The local device must be bonded with the remote device by bt_device_create_bond(). - /// @post bt_audio_connection_state_changed_cb() will be invoked. - /// @see bt_audio_disconnect() - /// @see bt_audio_connection_state_changed_cb() - int bt_audio_connect( - ffi.Pointer remote_address, - int type, - ) { - return _bt_audio_connect( - remote_address, - type, - ); - } - - late final _bt_audio_connectPtr = _lookup< - ffi - .NativeFunction, ffi.Int32)>>( - 'bt_audio_connect'); - late final _bt_audio_connect = _bt_audio_connectPtr - .asFunction, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE - /// @brief Disconnects the remote device with the given audio profile, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @details If you input type as #BT_AUDIO_PROFILE_TYPE_ALL and disconnection request succeeds, then bt_audio_connection_state_changed_cb() will be called twice - /// when #BT_AUDIO_PROFILE_TYPE_HSP_HFP is disconnected and #BT_AUDIO_PROFILE_TYPE_A2DP is disconnected. - /// @param[in] remote_address The remote address - /// @param[in] type The type of audio profile - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected by bt_audio_connect(). - /// @post bt_audio_connection_state_changed_cb() will be invoked. - /// @see bt_audio_connect() - /// @see bt_audio_connection_state_changed_cb() - int bt_audio_disconnect( - ffi.Pointer remote_address, - int type, - ) { - return _bt_audio_disconnect( - remote_address, - type, - ); - } - - late final _bt_audio_disconnectPtr = _lookup< - ffi - .NativeFunction, ffi.Int32)>>( - 'bt_audio_disconnect'); - late final _bt_audio_disconnect = _bt_audio_disconnectPtr - .asFunction, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE - /// @brief Registers a callback function that will be invoked when the connection state is changed. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth audio service must be initialized with bt_audio_initialize(). - /// @see bt_audio_initialize() - /// @see bt_audio_connection_state_changed_cb() - int bt_audio_set_connection_state_changed_cb( - bt_audio_connection_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_audio_set_connection_state_changed_cb( - callback, - user_data, - ); - } - - late final _bt_audio_set_connection_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_audio_connection_state_changed_cb, - ffi.Pointer)>>( - 'bt_audio_set_connection_state_changed_cb'); - late final _bt_audio_set_connection_state_changed_cb = - _bt_audio_set_connection_state_changed_cbPtr.asFunction< - int Function( - bt_audio_connection_state_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE - /// @brief Unregisters a callback function that will be invoked when the connection state is changed. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth audio service must be initialized with bt_audio_initialize(). - /// @see bt_audio_initialize() - /// @see bt_audio_connection_state_changed_cb() - /// @see bt_audio_set_connection_state_changed_cb() - int bt_audio_unset_connection_state_changed_cb() { - return _bt_audio_unset_connection_state_changed_cb(); - } - - late final _bt_audio_unset_connection_state_changed_cbPtr = - _lookup>( - 'bt_audio_unset_connection_state_changed_cb'); - late final _bt_audio_unset_connection_state_changed_cb = - _bt_audio_unset_connection_state_changed_cbPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_TARGET_MODULE - /// @brief Initializes the Bluetooth AVRCP (Audio/Video Remote Control Profile) target service. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @remarks This function must be called before any other AVRCP target functions are called. \n - /// You must free all resources of the this service by calling bt_avrcp_target_deinitialize() - /// if Bluetooth AVRCP service is no longer needed. - /// @param[in] callback The callback function called when the connection state is changed - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_avrcp_target_deinitialize() - int bt_avrcp_target_initialize( - bt_avrcp_target_connection_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_avrcp_target_initialize( - callback, - user_data, - ); - } - - late final _bt_avrcp_target_initializePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_avrcp_target_connection_state_changed_cb, - ffi.Pointer)>>('bt_avrcp_target_initialize'); - late final _bt_avrcp_target_initialize = - _bt_avrcp_target_initializePtr.asFunction< - int Function(bt_avrcp_target_connection_state_changed_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_TARGET_MODULE - /// @brief Deinitializes the Bluetooth AVRCP (Audio/Video Remote Control Profile) target service. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth audio service must be initialized with bt_avrcp_target_initialize(). - /// @see bt_avrcp_target_initialize() - int bt_avrcp_target_deinitialize() { - return _bt_avrcp_target_deinitialize(); - } - - late final _bt_avrcp_target_deinitializePtr = - _lookup>( - 'bt_avrcp_target_deinitialize'); - late final _bt_avrcp_target_deinitialize = - _bt_avrcp_target_deinitializePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_TARGET_MODULE - /// @brief Notifies the equalizer state to the remote device. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] state The state of equalizer - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_target_notify_equalizer_state( - int state, - ) { - return _bt_avrcp_target_notify_equalizer_state( - state, - ); - } - - late final _bt_avrcp_target_notify_equalizer_statePtr = - _lookup>( - 'bt_avrcp_target_notify_equalizer_state'); - late final _bt_avrcp_target_notify_equalizer_state = - _bt_avrcp_target_notify_equalizer_statePtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_TARGET_MODULE - /// @brief Notifies the repeat mode to the remote device. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] mode The repeat mode - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_target_notify_repeat_mode( - int mode, - ) { - return _bt_avrcp_target_notify_repeat_mode( - mode, - ); - } - - late final _bt_avrcp_target_notify_repeat_modePtr = - _lookup>( - 'bt_avrcp_target_notify_repeat_mode'); - late final _bt_avrcp_target_notify_repeat_mode = - _bt_avrcp_target_notify_repeat_modePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_TARGET_MODULE - /// @brief Notifies the shuffle mode to the remote device. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] mode The repeat mode - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_target_notify_shuffle_mode( - int mode, - ) { - return _bt_avrcp_target_notify_shuffle_mode( - mode, - ); - } - - late final _bt_avrcp_target_notify_shuffle_modePtr = - _lookup>( - 'bt_avrcp_target_notify_shuffle_mode'); - late final _bt_avrcp_target_notify_shuffle_mode = - _bt_avrcp_target_notify_shuffle_modePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_TARGET_MODULE - /// @brief Notifies the scan mode to the remote device. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] mode The scan mode - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_target_notify_scan_mode( - int mode, - ) { - return _bt_avrcp_target_notify_scan_mode( - mode, - ); - } - - late final _bt_avrcp_target_notify_scan_modePtr = - _lookup>( - 'bt_avrcp_target_notify_scan_mode'); - late final _bt_avrcp_target_notify_scan_mode = - _bt_avrcp_target_notify_scan_modePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_TARGET_MODULE - /// @brief Notifies the player state to the remote device. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] state The player state - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_target_notify_player_state( - int state, - ) { - return _bt_avrcp_target_notify_player_state( - state, - ); - } - - late final _bt_avrcp_target_notify_player_statePtr = - _lookup>( - 'bt_avrcp_target_notify_player_state'); - late final _bt_avrcp_target_notify_player_state = - _bt_avrcp_target_notify_player_statePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_TARGET_MODULE - /// @brief Notifies the current position of song to the remote device. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] position The current position in milliseconds - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_target_notify_position( - int position, - ) { - return _bt_avrcp_target_notify_position( - position, - ); - } - - late final _bt_avrcp_target_notify_positionPtr = - _lookup>( - 'bt_avrcp_target_notify_position'); - late final _bt_avrcp_target_notify_position = - _bt_avrcp_target_notify_positionPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_TARGET_MODULE - /// @brief Notifies the track to the remote device. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] title The title of track - /// @param[in] artist The artist of track - /// @param[in] album The album of track - /// @param[in] genre The genre of track - /// @param[in] track_num The track number - /// @param[in] total_tracks The number of all tracks - /// @param[in] duration The duration of track in milliseconds - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_target_notify_track( - ffi.Pointer title, - ffi.Pointer artist, - ffi.Pointer album, - ffi.Pointer genre, - int track_num, - int total_tracks, - int duration, - ) { - return _bt_avrcp_target_notify_track( - title, - artist, - album, - genre, - track_num, - total_tracks, - duration, - ); - } - - late final _bt_avrcp_target_notify_trackPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.UnsignedInt, - ffi.UnsignedInt)>>('bt_avrcp_target_notify_track'); - late final _bt_avrcp_target_notify_track = - _bt_avrcp_target_notify_trackPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, int, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Registers a callback function that will be invoked when the equalizer state is changed. (e.g., by a TV remote control or other input devices) - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_unset_equalizer_state_changed_cb() - int bt_avrcp_set_equalizer_state_changed_cb( - bt_avrcp_equalizer_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_avrcp_set_equalizer_state_changed_cb( - callback, - user_data, - ); - } - - late final _bt_avrcp_set_equalizer_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_avrcp_equalizer_state_changed_cb, ffi.Pointer)>>( - 'bt_avrcp_set_equalizer_state_changed_cb'); - late final _bt_avrcp_set_equalizer_state_changed_cb = - _bt_avrcp_set_equalizer_state_changed_cbPtr.asFunction< - int Function( - bt_avrcp_equalizer_state_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Unregisters a callback function that will be invoked when the equalizer state is changed. (e.g., by a TV remote control or other input devices) - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_set_equalizer_state_changed_cb() - int bt_avrcp_unset_equalizer_state_changed_cb() { - return _bt_avrcp_unset_equalizer_state_changed_cb(); - } - - late final _bt_avrcp_unset_equalizer_state_changed_cbPtr = - _lookup>( - 'bt_avrcp_unset_equalizer_state_changed_cb'); - late final _bt_avrcp_unset_equalizer_state_changed_cb = - _bt_avrcp_unset_equalizer_state_changed_cbPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Registers a callback function that will be invoked when the repeat mode is changed. (e.g., by a TV remote control or other input devices) - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_unset_repeat_mode_changed_cb() - int bt_avrcp_set_repeat_mode_changed_cb( - bt_avrcp_repeat_mode_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_avrcp_set_repeat_mode_changed_cb( - callback, - user_data, - ); - } - - late final _bt_avrcp_set_repeat_mode_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_avrcp_repeat_mode_changed_cb, - ffi.Pointer)>>('bt_avrcp_set_repeat_mode_changed_cb'); - late final _bt_avrcp_set_repeat_mode_changed_cb = - _bt_avrcp_set_repeat_mode_changed_cbPtr.asFunction< - int Function( - bt_avrcp_repeat_mode_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Unregisters a callback function that will be invoked when the repeat mode is changed. (e.g., by a TV remote control or other input devices) - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_set_repeat_mode_changed_cb() - int bt_avrcp_unset_repeat_mode_changed_cb() { - return _bt_avrcp_unset_repeat_mode_changed_cb(); - } - - late final _bt_avrcp_unset_repeat_mode_changed_cbPtr = - _lookup>( - 'bt_avrcp_unset_repeat_mode_changed_cb'); - late final _bt_avrcp_unset_repeat_mode_changed_cb = - _bt_avrcp_unset_repeat_mode_changed_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Registers a callback function that will be invoked when the shuffle mode is changed. (e.g., by a TV remote control or other input devices) - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_unset_shuffle_mode_changed_cb() - int bt_avrcp_set_shuffle_mode_changed_cb( - bt_avrcp_shuffle_mode_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_avrcp_set_shuffle_mode_changed_cb( - callback, - user_data, - ); - } - - late final _bt_avrcp_set_shuffle_mode_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_avrcp_shuffle_mode_changed_cb, - ffi.Pointer)>>('bt_avrcp_set_shuffle_mode_changed_cb'); - late final _bt_avrcp_set_shuffle_mode_changed_cb = - _bt_avrcp_set_shuffle_mode_changed_cbPtr.asFunction< - int Function( - bt_avrcp_shuffle_mode_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Unregisters a callback function that will be invoked when the shuffle mode is changed. (e.g., by a TV remote control or other input devices) - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_set_shuffle_mode_changed_cb() - int bt_avrcp_unset_shuffle_mode_changed_cb() { - return _bt_avrcp_unset_shuffle_mode_changed_cb(); - } - - late final _bt_avrcp_unset_shuffle_mode_changed_cbPtr = - _lookup>( - 'bt_avrcp_unset_shuffle_mode_changed_cb'); - late final _bt_avrcp_unset_shuffle_mode_changed_cb = - _bt_avrcp_unset_shuffle_mode_changed_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Registers a callback function that will be invoked when the scan mode is changed. (e.g., by a TV remote control or other input devices) - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_unset_scan_mode_changed_cb() - int bt_avrcp_set_scan_mode_changed_cb( - bt_avrcp_scan_mode_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_avrcp_set_scan_mode_changed_cb( - callback, - user_data, - ); - } - - late final _bt_avrcp_set_scan_mode_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_avrcp_scan_mode_changed_cb, - ffi.Pointer)>>('bt_avrcp_set_scan_mode_changed_cb'); - late final _bt_avrcp_set_scan_mode_changed_cb = - _bt_avrcp_set_scan_mode_changed_cbPtr.asFunction< - int Function(bt_avrcp_scan_mode_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Unregisters a callback function that will be invoked when the scan mode is changed. (e.g., by a TV remote control or other input devices) - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_set_scan_mode_changed_cb() - int bt_avrcp_unset_scan_mode_changed_cb() { - return _bt_avrcp_unset_scan_mode_changed_cb(); - } - - late final _bt_avrcp_unset_scan_mode_changed_cbPtr = - _lookup>( - 'bt_avrcp_unset_scan_mode_changed_cb'); - late final _bt_avrcp_unset_scan_mode_changed_cb = - _bt_avrcp_unset_scan_mode_changed_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Registers a callback function that will be invoked when the song position is changed. (e.g., by a TV remote control or other input devices) - /// @since_tizen 3.0 - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_set_position_changed_cb() - int bt_avrcp_set_position_changed_cb( - bt_avrcp_position_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_avrcp_set_position_changed_cb( - callback, - user_data, - ); - } - - late final _bt_avrcp_set_position_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_avrcp_position_changed_cb, - ffi.Pointer)>>('bt_avrcp_set_position_changed_cb'); - late final _bt_avrcp_set_position_changed_cb = - _bt_avrcp_set_position_changed_cbPtr.asFunction< - int Function(bt_avrcp_position_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Unregisters a callback function that will be invoked when the song position is changed. (e.g., by a TV remote control or other input devices) - /// @since_tizen 3.0 - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_set_position_changed_cb() - int bt_avrcp_unset_position_changed_cb() { - return _bt_avrcp_unset_position_changed_cb(); - } - - late final _bt_avrcp_unset_position_changed_cbPtr = - _lookup>( - 'bt_avrcp_unset_position_changed_cb'); - late final _bt_avrcp_unset_position_changed_cb = - _bt_avrcp_unset_position_changed_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Registers a callback function that will be invoked when the Play status is changed. (e.g., by a TV remote control or other input devices) - /// @since_tizen 3.0 - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_unset_play_status_changed_cb() - int bt_avrcp_set_play_status_changed_cb( - bt_avrcp_play_status_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_avrcp_set_play_status_changed_cb( - callback, - user_data, - ); - } - - late final _bt_avrcp_set_play_status_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_avrcp_play_status_changed_cb, - ffi.Pointer)>>('bt_avrcp_set_play_status_changed_cb'); - late final _bt_avrcp_set_play_status_changed_cb = - _bt_avrcp_set_play_status_changed_cbPtr.asFunction< - int Function( - bt_avrcp_play_status_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Unregisters a callback function that will be invoked when the Play status is changed. (e.g., by a TV remote control or other input devices) - /// @since_tizen 3.0 - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_unset_play_status_changed_cb() - int bt_avrcp_unset_play_status_changed_cb() { - return _bt_avrcp_unset_play_status_changed_cb(); - } - - late final _bt_avrcp_unset_play_status_changed_cbPtr = - _lookup>( - 'bt_avrcp_unset_play_status_changed_cb'); - late final _bt_avrcp_unset_play_status_changed_cb = - _bt_avrcp_unset_play_status_changed_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Registers a callback function that will be invoked when the track metadata is changed. (e.g., by a TV remote control or other input devices) - /// @since_tizen 3.0 - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_unset_track_info_changed_cb() - int bt_avrcp_set_track_info_changed_cb( - bt_avrcp_track_info_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_avrcp_set_track_info_changed_cb( - callback, - user_data, - ); - } - - late final _bt_avrcp_set_track_info_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_avrcp_track_info_changed_cb, - ffi.Pointer)>>('bt_avrcp_set_track_info_changed_cb'); - late final _bt_avrcp_set_track_info_changed_cb = - _bt_avrcp_set_track_info_changed_cbPtr.asFunction< - int Function( - bt_avrcp_track_info_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Unregisters a callback function that will be invoked when the track metadata is changed. (e.g., by a TV remote control or other input devices) - /// @since_tizen 3.0 - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_set_track_info_changed_cb() - int bt_avrcp_unset_track_info_changed_cb() { - return _bt_avrcp_unset_track_info_changed_cb(); - } - - late final _bt_avrcp_unset_track_info_changed_cbPtr = - _lookup>( - 'bt_avrcp_unset_track_info_changed_cb'); - late final _bt_avrcp_unset_track_info_changed_cb = - _bt_avrcp_unset_track_info_changed_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Initializes the Bluetooth AVRCP (Audio/Video Remote Control Profile) controller service. - /// @since_tizen 3.0 - /// @remarks This function must be called before any other AVRCP controller functions are called. \n - /// You must free all resources of the this service by calling bt_avrcp_control_deinitialize() - /// if Bluetooth AVRCP service is no longer needed. - /// @param[in] callback The callback function called when the connection state is changed - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_avrcp_control_deinitialize() - int bt_avrcp_control_initialize( - bt_avrcp_control_connection_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_avrcp_control_initialize( - callback, - user_data, - ); - } - - late final _bt_avrcp_control_initializePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_avrcp_control_connection_state_changed_cb, - ffi.Pointer)>>('bt_avrcp_control_initialize'); - late final _bt_avrcp_control_initialize = - _bt_avrcp_control_initializePtr.asFunction< - int Function(bt_avrcp_control_connection_state_changed_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Deinitializes the Bluetooth AVRCP (Audio/Video Remote Control Profile) controller service. - /// @since_tizen 3.0 - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// @pre The Bluetooth audio service must be initialized with bt_avrcp_control_initialize(). - /// @see bt_avrcp_control_initialize() - int bt_avrcp_control_deinitialize() { - return _bt_avrcp_control_deinitialize(); - } - - late final _bt_avrcp_control_deinitializePtr = - _lookup>( - 'bt_avrcp_control_deinitialize'); - late final _bt_avrcp_control_deinitialize = - _bt_avrcp_control_deinitializePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Connects the AVRCP (Audio/Video Remote Control Profile) target device. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] remote_address The remote address - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// @pre The Bluetooth audio service must be initialized with bt_avrcp_control_initialize(). - /// @see bt_avrcp_control_initialize() - int bt_avrcp_control_connect( - ffi.Pointer remote_address, - ) { - return _bt_avrcp_control_connect( - remote_address, - ); - } - - late final _bt_avrcp_control_connectPtr = - _lookup)>>( - 'bt_avrcp_control_connect'); - late final _bt_avrcp_control_connect = _bt_avrcp_control_connectPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Disconnects from the AVRCP (Audio/Video Remote Control Profile) target device. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] remote_address The remote address - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// @pre The Bluetooth audio service must be initialized with bt_avrcp_control_initialize(). - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_control_connect() - int bt_avrcp_control_disconnect( - ffi.Pointer remote_address, - ) { - return _bt_avrcp_control_disconnect( - remote_address, - ); - } - - late final _bt_avrcp_control_disconnectPtr = - _lookup)>>( - 'bt_avrcp_control_disconnect'); - late final _bt_avrcp_control_disconnect = _bt_avrcp_control_disconnectPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Sends a command to the target device. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] cmd The commands, one of: Play, Pause, Next, Rewind. - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// @pre The Bluetooth audio service must be initialized with bt_avrcp_control_initialize(). - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_control_connect() - int bt_avrcp_control_send_player_command( - int cmd, - ) { - return _bt_avrcp_control_send_player_command( - cmd, - ); - } - - late final _bt_avrcp_control_send_player_commandPtr = - _lookup>( - 'bt_avrcp_control_send_player_command'); - late final _bt_avrcp_control_send_player_command = - _bt_avrcp_control_send_player_commandPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Sends the equalizer state change request to the remote device. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] state The new equalizer state, one of: ON, OFF - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_control_set_equalizer_state( - int state, - ) { - return _bt_avrcp_control_set_equalizer_state( - state, - ); - } - - late final _bt_avrcp_control_set_equalizer_statePtr = - _lookup>( - 'bt_avrcp_control_set_equalizer_state'); - late final _bt_avrcp_control_set_equalizer_state = - _bt_avrcp_control_set_equalizer_statePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Gets the the equalizer state of the remote device. - /// @since_tizen 3.0 - /// @param[out] state The equalizer state, one of: ON, OFF - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_control_get_equalizer_state( - ffi.Pointer state, - ) { - return _bt_avrcp_control_get_equalizer_state( - state, - ); - } - - late final _bt_avrcp_control_get_equalizer_statePtr = - _lookup)>>( - 'bt_avrcp_control_get_equalizer_state'); - late final _bt_avrcp_control_get_equalizer_state = - _bt_avrcp_control_get_equalizer_statePtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Sends the repeat change request to the remote device. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] mode The new repeat mode, one of: OFF, SINGLE, ALL - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_control_set_repeat_mode( - int mode, - ) { - return _bt_avrcp_control_set_repeat_mode( - mode, - ); - } - - late final _bt_avrcp_control_set_repeat_modePtr = - _lookup>( - 'bt_avrcp_control_set_repeat_mode'); - late final _bt_avrcp_control_set_repeat_mode = - _bt_avrcp_control_set_repeat_modePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Gets the repeat state of the remote device. - /// @since_tizen 3.0 - /// @param[out] mode The repeat mode, one of: OFF, SINGLE, ALL - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_control_get_repeat_mode( - ffi.Pointer mode, - ) { - return _bt_avrcp_control_get_repeat_mode( - mode, - ); - } - - late final _bt_avrcp_control_get_repeat_modePtr = - _lookup)>>( - 'bt_avrcp_control_get_repeat_mode'); - late final _bt_avrcp_control_get_repeat_mode = - _bt_avrcp_control_get_repeat_modePtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Sends the shuffle mode change request to the remote device. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] mode The new shuffle mode, one of: OFF, GROUP, ALL - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_control_set_shuffle_mode( - int mode, - ) { - return _bt_avrcp_control_set_shuffle_mode( - mode, - ); - } - - late final _bt_avrcp_control_set_shuffle_modePtr = - _lookup>( - 'bt_avrcp_control_set_shuffle_mode'); - late final _bt_avrcp_control_set_shuffle_mode = - _bt_avrcp_control_set_shuffle_modePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Gets the shuffle mode of the remote device. - /// @since_tizen 3.0 - /// @param[out] mode The shuffle mode, one of: OFF, GROUP, ALL - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_control_get_shuffle_mode( - ffi.Pointer mode, - ) { - return _bt_avrcp_control_get_shuffle_mode( - mode, - ); - } - - late final _bt_avrcp_control_get_shuffle_modePtr = - _lookup)>>( - 'bt_avrcp_control_get_shuffle_mode'); - late final _bt_avrcp_control_get_shuffle_mode = - _bt_avrcp_control_get_shuffle_modePtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Sends the scan mode change request to the remote device. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] mode The new scan mode, one of: OFF, GROUP, ALL - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_control_set_scan_mode( - int mode, - ) { - return _bt_avrcp_control_set_scan_mode( - mode, - ); - } - - late final _bt_avrcp_control_set_scan_modePtr = - _lookup>( - 'bt_avrcp_control_set_scan_mode'); - late final _bt_avrcp_control_set_scan_mode = - _bt_avrcp_control_set_scan_modePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Gets the scan mode of the remote device. - /// @since_tizen 3.0 - /// @param[out] mode The scan mode, one of: OFF, GROUP, ALL - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_control_get_scan_mode( - ffi.Pointer mode, - ) { - return _bt_avrcp_control_get_scan_mode( - mode, - ); - } - - late final _bt_avrcp_control_get_scan_modePtr = - _lookup)>>( - 'bt_avrcp_control_get_scan_mode'); - late final _bt_avrcp_control_get_scan_mode = - _bt_avrcp_control_get_scan_modePtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Gets the position of the song played by the remote device. - /// @since_tizen 3.0 - /// @param[out] position The position, in milliseconds - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_control_get_position( - ffi.Pointer position, - ) { - return _bt_avrcp_control_get_position( - position, - ); - } - - late final _bt_avrcp_control_get_positionPtr = _lookup< - ffi.NativeFunction)>>( - 'bt_avrcp_control_get_position'); - late final _bt_avrcp_control_get_position = _bt_avrcp_control_get_positionPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Gets the play status of the remote device. - /// @since_tizen 3.0 - /// @param[out] status The play status, one of: PLAYING, STOPPED... - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_control_get_play_status( - ffi.Pointer status, - ) { - return _bt_avrcp_control_get_play_status( - status, - ); - } - - late final _bt_avrcp_control_get_play_statusPtr = - _lookup)>>( - 'bt_avrcp_control_get_play_status'); - late final _bt_avrcp_control_get_play_status = - _bt_avrcp_control_get_play_statusPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Gets the metadata of the track played by the remote device. - /// @since_tizen 3.0 - /// @remarks The @a track must be released using bt_avrcp_control_free_track_info() - /// @param[out] track The track metadata. - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_control_get_track_info( - ffi.Pointer> track, - ) { - return _bt_avrcp_control_get_track_info( - track, - ); - } - - late final _bt_avrcp_control_get_track_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer< - ffi.Pointer>)>>( - 'bt_avrcp_control_get_track_info'); - late final _bt_avrcp_control_get_track_info = - _bt_avrcp_control_get_track_infoPtr.asFunction< - int Function( - ffi.Pointer>)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Frees the track metadata. - /// @since_tizen 3.0 - /// @param[in] track The track metadata. - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// @pre track should point to valid metadata address. - /// @see bt_avrcp_control_get_track_info() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_control_free_track_info( - ffi.Pointer track, - ) { - return _bt_avrcp_control_free_track_info( - track, - ); - } - - late final _bt_avrcp_control_free_track_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer)>>( - 'bt_avrcp_control_free_track_info'); - late final _bt_avrcp_control_free_track_info = - _bt_avrcp_control_free_track_infoPtr.asFunction< - int Function(ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HDP_MODULE - /// @brief Registers an application that acts as the @a Sink role of HDP(Health Device Profile). - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @remarks The @a app_id must be released with free() by you. - /// @param[in] data_type The data type of MDEP. This value is defined in ISO/IEEE 11073-20601 spec. - /// For example, pulse oximeter is 0x1004 and blood pressure monitor is 0x1007. - /// @param[out] app_id The ID of application - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @see bt_hdp_unregister_sink_app() - int bt_hdp_register_sink_app( - int data_type, - ffi.Pointer> app_id, - ) { - return _bt_hdp_register_sink_app( - data_type, - app_id, - ); - } - - late final _bt_hdp_register_sink_appPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.UnsignedShort, - ffi.Pointer>)>>('bt_hdp_register_sink_app'); - late final _bt_hdp_register_sink_app = _bt_hdp_register_sink_appPtr - .asFunction>)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HDP_MODULE - /// @brief Unregisters the given application that acts as the @a Sink role of HDP(Health Device Profile). - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] app_id The ID of application - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_hdp_register_sink_app() - int bt_hdp_unregister_sink_app( - ffi.Pointer app_id, - ) { - return _bt_hdp_unregister_sink_app( - app_id, - ); - } - - late final _bt_hdp_unregister_sink_appPtr = - _lookup)>>( - 'bt_hdp_unregister_sink_app'); - late final _bt_hdp_unregister_sink_app = _bt_hdp_unregister_sink_appPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HDP_MODULE - /// @brief Connects the remote device which acts as @a Source role, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] remote_address The remote address - /// @param[in] app_id The ID of application - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Sink role of HDP must be registered with bt_hdp_register_sink_app(). - /// @pre The local device must be bonded with the remote device by bt_device_create_bond(). - /// @post bt_hdp_connected_cb() will be invoked. - /// @see bt_hdp_disconnect() - /// @see bt_hdp_set_connection_state_changed_cb() - /// @see bt_hdp_unset_connection_state_changed_cb() - int bt_hdp_connect_to_source( - ffi.Pointer remote_address, - ffi.Pointer app_id, - ) { - return _bt_hdp_connect_to_source( - remote_address, - app_id, - ); - } - - late final _bt_hdp_connect_to_sourcePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('bt_hdp_connect_to_source'); - late final _bt_hdp_connect_to_source = _bt_hdp_connect_to_sourcePtr - .asFunction, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HDP_MODULE - /// @brief Disconnects the remote device, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] remote_address The remote address - /// @param[in] channel The connected data channel - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @post bt_hdp_disconnected_cb() will be invoked. - /// @see bt_hdp_set_connection_state_changed_cb() - /// @see bt_hdp_unset_connection_state_changed_cb() - int bt_hdp_disconnect( - ffi.Pointer remote_address, - int channel, - ) { - return _bt_hdp_disconnect( - remote_address, - channel, - ); - } - - late final _bt_hdp_disconnectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.UnsignedInt)>>('bt_hdp_disconnect'); - late final _bt_hdp_disconnect = _bt_hdp_disconnectPtr - .asFunction, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HDP_MODULE - /// @brief Sends the data to the remote device. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] channel The connected data channel - /// @param[in] data The data to send - /// @param[in] size The size of data to send (byte) - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_hdp_data_received_cb() - /// @see bt_hdp_set_data_received_cb() - /// @see bt_hdp_unset_data_received_cb() - int bt_hdp_send_data( - int channel, - ffi.Pointer data, - int size, - ) { - return _bt_hdp_send_data( - channel, - data, - size, - ); - } - - late final _bt_hdp_send_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.UnsignedInt, ffi.Pointer, - ffi.UnsignedInt)>>('bt_hdp_send_data'); - late final _bt_hdp_send_data = _bt_hdp_send_dataPtr - .asFunction, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HDP_MODULE - /// @brief Registers a callback function that will be invoked when the connection state is changed. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] connected_cb The callback function called when a connection is established - /// @param[in] disconnected_cb The callback function called when a connection is disconnected - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_hdp_unset_connection_state_changed_cb() - int bt_hdp_set_connection_state_changed_cb( - bt_hdp_connected_cb connected_cb, - bt_hdp_disconnected_cb disconnected_cb, - ffi.Pointer user_data, - ) { - return _bt_hdp_set_connection_state_changed_cb( - connected_cb, - disconnected_cb, - user_data, - ); - } - - late final _bt_hdp_set_connection_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_hdp_connected_cb, bt_hdp_disconnected_cb, - ffi.Pointer)>>( - 'bt_hdp_set_connection_state_changed_cb'); - late final _bt_hdp_set_connection_state_changed_cb = - _bt_hdp_set_connection_state_changed_cbPtr.asFunction< - int Function(bt_hdp_connected_cb, bt_hdp_disconnected_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HDP_MODULE - /// @brief Unregisters a callback function that will be invoked when the connection state is changed. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_hdp_set_connection_state_changed_cb() - int bt_hdp_unset_connection_state_changed_cb() { - return _bt_hdp_unset_connection_state_changed_cb(); - } - - late final _bt_hdp_unset_connection_state_changed_cbPtr = - _lookup>( - 'bt_hdp_unset_connection_state_changed_cb'); - late final _bt_hdp_unset_connection_state_changed_cb = - _bt_hdp_unset_connection_state_changed_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HDP_MODULE - /// @brief Registers a callback function that will be invoked when you receive the data. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_hdp_unset_data_received_cb() - int bt_hdp_set_data_received_cb( - bt_hdp_data_received_cb callback, - ffi.Pointer user_data, - ) { - return _bt_hdp_set_data_received_cb( - callback, - user_data, - ); - } - - late final _bt_hdp_set_data_received_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_hdp_data_received_cb, - ffi.Pointer)>>('bt_hdp_set_data_received_cb'); - late final _bt_hdp_set_data_received_cb = - _bt_hdp_set_data_received_cbPtr.asFunction< - int Function(bt_hdp_data_received_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HDP_MODULE - /// @brief Unregisters a callback function that will be invoked when you receive the data. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_hdp_set_data_received_cb() - int bt_hdp_unset_data_received_cb() { - return _bt_hdp_unset_data_received_cb(); - } - - late final _bt_hdp_unset_data_received_cbPtr = - _lookup>( - 'bt_hdp_unset_data_received_cb'); - late final _bt_hdp_unset_data_received_cb = - _bt_hdp_unset_data_received_cbPtr.asFunction(); - - /// @deprecated Deprecated since 2.3.1. Use bt_gatt_client_foreach_services or bt_gatt_client_get_service instead. - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets the primary services of GATT(Generic Attribute Profile). - /// @since_tizen @if WEARABLE @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] remote_address The address of the remote device - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @post @a callback will be called if there are primary services. - /// @see bt_gatt_primary_service_cb() - int bt_gatt_foreach_primary_services( - ffi.Pointer remote_address, - bt_gatt_primary_service_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_foreach_primary_services( - remote_address, - callback, - user_data, - ); - } - - late final _bt_gatt_foreach_primary_servicesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, bt_gatt_primary_service_cb, - ffi.Pointer)>>('bt_gatt_foreach_primary_services'); - late final _bt_gatt_foreach_primary_services = - _bt_gatt_foreach_primary_servicesPtr.asFunction< - int Function(ffi.Pointer, bt_gatt_primary_service_cb, - ffi.Pointer)>(); - - /// @deprecated Deprecated since 2.3.1. This function call is not required because characteristic discovery is happened automatically. - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Discovers the characteristics in service, asynchronously. - /// @since_tizen @if WEARABLE @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] service The attribute handle of service - /// @param[in] callback The result callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @post @a callback will be called. - /// @see bt_gatt_characteristics_discovered_cb() - int bt_gatt_discover_characteristics( - bt_gatt_attribute_h service, - bt_gatt_characteristics_discovered_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_discover_characteristics( - service, - callback, - user_data, - ); - } - - late final _bt_gatt_discover_characteristicsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_attribute_h, - bt_gatt_characteristics_discovered_cb, - ffi.Pointer)>>('bt_gatt_discover_characteristics'); - late final _bt_gatt_discover_characteristics = - _bt_gatt_discover_characteristicsPtr.asFunction< - int Function(bt_gatt_attribute_h, - bt_gatt_characteristics_discovered_cb, ffi.Pointer)>(); - - /// @deprecated Deprecated since 2.3.1. Use bt_gatt_get_uuid instead. - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets the UUID of service. - /// @since_tizen @if WEARABLE @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @remarks @a uuid must be released with free() by you. - /// @param[in] service The attribute handle of service - /// @param[out] uuid The UUID of service - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - int bt_gatt_get_service_uuid( - bt_gatt_attribute_h service, - ffi.Pointer> uuid, - ) { - return _bt_gatt_get_service_uuid( - service, - uuid, - ); - } - - late final _bt_gatt_get_service_uuidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_attribute_h, - ffi.Pointer>)>>('bt_gatt_get_service_uuid'); - late final _bt_gatt_get_service_uuid = - _bt_gatt_get_service_uuidPtr.asFunction< - int Function( - bt_gatt_attribute_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 2.3.1. Use bt_gatt_service_foreach_included_services or bt_gatt_service_get_included_service instead. - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets the included services in service. - /// @since_tizen @if WEARABLE @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] service The attribute handle of service - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @post @a callback will be called if there are included services. - /// @see bt_gatt_included_service_cb() - int bt_gatt_foreach_included_services( - bt_gatt_attribute_h service, - bt_gatt_included_service_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_foreach_included_services( - service, - callback, - user_data, - ); - } - - late final _bt_gatt_foreach_included_servicesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_attribute_h, bt_gatt_included_service_cb, - ffi.Pointer)>>('bt_gatt_foreach_included_services'); - late final _bt_gatt_foreach_included_services = - _bt_gatt_foreach_included_servicesPtr.asFunction< - int Function(bt_gatt_attribute_h, bt_gatt_included_service_cb, - ffi.Pointer)>(); - - /// @deprecated Deprecated since 2.3.1. Use bt_gatt_client_set_characteristic_value_changed_cb instead. - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Registers a callback function that will be invoked when a characteristic value is changed. - /// @since_tizen @if WEARABLE @else 2.3 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_gatt_unset_characteristic_changed_cb() - int bt_gatt_set_characteristic_changed_cb( - bt_gatt_characteristic_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_set_characteristic_changed_cb( - callback, - user_data, - ); - } - - late final _bt_gatt_set_characteristic_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_characteristic_changed_cb, - ffi.Pointer)>>('bt_gatt_set_characteristic_changed_cb'); - late final _bt_gatt_set_characteristic_changed_cb = - _bt_gatt_set_characteristic_changed_cbPtr.asFunction< - int Function( - bt_gatt_characteristic_changed_cb, ffi.Pointer)>(); - - /// @deprecated Deprecated since 2.3.1. Use bt_gatt_client_unset_characteristic_value_changed_cb instead. - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Unregisters a callback function that will be invoked when a characteristic is changed. - /// @since_tizen @if WEARABLE @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_gatt_set_characteristic_changed_cb() - int bt_gatt_unset_characteristic_changed_cb() { - return _bt_gatt_unset_characteristic_changed_cb(); - } - - late final _bt_gatt_unset_characteristic_changed_cbPtr = - _lookup>( - 'bt_gatt_unset_characteristic_changed_cb'); - late final _bt_gatt_unset_characteristic_changed_cb = - _bt_gatt_unset_characteristic_changed_cbPtr.asFunction(); - - /// @deprecated Deprecated since 2.3.1. Use bt_gatt_client_set_characteristic_value_changed_cb instead. - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Watches all the characteristic value changes of the service. - /// @since_tizen @if WEARABLE @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] service The attribute handle of service - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_gatt_unset_characteristic_changed_cb() - int bt_gatt_watch_characteristic_changes( - bt_gatt_attribute_h service, - ) { - return _bt_gatt_watch_characteristic_changes( - service, - ); - } - - late final _bt_gatt_watch_characteristic_changesPtr = - _lookup>( - 'bt_gatt_watch_characteristic_changes'); - late final _bt_gatt_watch_characteristic_changes = - _bt_gatt_watch_characteristic_changesPtr - .asFunction(); - - /// @deprecated Deprecated since 2.3.1. Use bt_gatt_client_unset_characteristic_value_changed_cb instead. - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Remove watching of all the characteristic value changes of the service. - /// @since_tizen @if WEARABLE @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] service The attribute handle of service - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_gatt_set_characteristic_changed_cb() - int bt_gatt_unwatch_characteristic_changes( - bt_gatt_attribute_h service, - ) { - return _bt_gatt_unwatch_characteristic_changes( - service, - ); - } - - late final _bt_gatt_unwatch_characteristic_changesPtr = - _lookup>( - 'bt_gatt_unwatch_characteristic_changes'); - late final _bt_gatt_unwatch_characteristic_changes = - _bt_gatt_unwatch_characteristic_changesPtr - .asFunction(); - - /// @deprecated Deprecated since 2.3.1. Use bt_gatt_get_value or bt_gatt_get_uuid after bt_gatt_client_read_value instead. - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets the characteristic declaration. - /// @since_tizen @if WEARABLE @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @remarks @a uuid and @a value must be released with free() by you. - /// @param[in] characteristic The attribute handle of characteristic - /// @param[out] uuid The UUID of service - /// @param[out] value The value of characteristic (byte array) - /// @param[out] value_length The length of value - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @see bt_gatt_set_characteristic_value() - int bt_gatt_get_characteristic_declaration( - bt_gatt_attribute_h characteristic, - ffi.Pointer> uuid, - ffi.Pointer> value, - ffi.Pointer value_length, - ) { - return _bt_gatt_get_characteristic_declaration( - characteristic, - uuid, - value, - value_length, - ); - } - - late final _bt_gatt_get_characteristic_declarationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_attribute_h, - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer)>>('bt_gatt_get_characteristic_declaration'); - late final _bt_gatt_get_characteristic_declaration = - _bt_gatt_get_characteristic_declarationPtr.asFunction< - int Function( - bt_gatt_attribute_h, - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer)>(); - - /// @deprecated Deprecated since 2.3.1. Use bt_gatt_set_value and bt_gatt_client_write_value instead. - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Sets the value of characteristic. - /// @since_tizen @if WEARABLE @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] characteristic The attribute handle of characteristic - /// @param[in] value The value of characteristic (byte array) - /// @param[in] value_length The length of value - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @see bt_gatt_get_characteristic_declaration() - int bt_gatt_set_characteristic_value( - bt_gatt_attribute_h characteristic, - ffi.Pointer value, - int value_length, - ) { - return _bt_gatt_set_characteristic_value( - characteristic, - value, - value_length, - ); - } - - late final _bt_gatt_set_characteristic_valuePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_attribute_h, ffi.Pointer, - ffi.Int)>>('bt_gatt_set_characteristic_value'); - late final _bt_gatt_set_characteristic_value = - _bt_gatt_set_characteristic_valuePtr.asFunction< - int Function( - bt_gatt_attribute_h, ffi.Pointer, int)>(); - - /// @deprecated Deprecated since 2.3.1. Use bt_gatt_set_value and bt_gatt_client_write_value instead. - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Sets the value of characteristic request. - /// @since_tizen @if WEARABLE @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] characteristic The attribute handle of characteristic - /// @param[in] value The value of characteristic (byte array) - /// @param[in] value_length The length of value - /// @param[in] callback The result callback - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @see bt_gatt_get_characteristic_declaration() - int bt_gatt_set_characteristic_value_request( - bt_gatt_attribute_h characteristic, - ffi.Pointer value, - int value_length, - bt_gatt_characteristic_write_cb callback, - ) { - return _bt_gatt_set_characteristic_value_request( - characteristic, - value, - value_length, - callback, - ); - } - - late final _bt_gatt_set_characteristic_value_requestPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_attribute_h, - ffi.Pointer, - ffi.Int, - bt_gatt_characteristic_write_cb)>>( - 'bt_gatt_set_characteristic_value_request'); - late final _bt_gatt_set_characteristic_value_request = - _bt_gatt_set_characteristic_value_requestPtr.asFunction< - int Function(bt_gatt_attribute_h, ffi.Pointer, int, - bt_gatt_characteristic_write_cb)>(); - - /// @deprecated Deprecated since 2.3.1. GATT handle clone is not allowed. Instead, all handles for client role must be got from GATT client handle. - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Clones the attribute handle. - /// @since_tizen @if WEARABLE @else 2.3 @endif - /// @remarks @a clone must be released with bt_gatt_destroy_attribute_handle(). - /// @param[out] clone The cloned attribute handle - /// @param[in] origin The origin attribute handle - /// @return 0 on success, otherwise negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_destroy_attribute_handle() - int bt_gatt_clone_attribute_handle( - ffi.Pointer clone, - bt_gatt_attribute_h origin, - ) { - return _bt_gatt_clone_attribute_handle( - clone, - origin, - ); - } - - late final _bt_gatt_clone_attribute_handlePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - bt_gatt_attribute_h)>>('bt_gatt_clone_attribute_handle'); - late final _bt_gatt_clone_attribute_handle = - _bt_gatt_clone_attribute_handlePtr.asFunction< - int Function( - ffi.Pointer, bt_gatt_attribute_h)>(); - - /// @deprecated Deprecated since 2.3.1. GATT handle clone and destroy are not allowed. - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Destroys the attribute handle. - /// @since_tizen @if WEARABLE @else 2.3 @endif - /// @param[in] handle The attribute handle - /// @return 0 on success, otherwise negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_clone_attribute_handle() - int bt_gatt_destroy_attribute_handle( - bt_gatt_attribute_h handle, - ) { - return _bt_gatt_destroy_attribute_handle( - handle, - ); - } - - late final _bt_gatt_destroy_attribute_handlePtr = - _lookup>( - 'bt_gatt_destroy_attribute_handle'); - late final _bt_gatt_destroy_attribute_handle = - _bt_gatt_destroy_attribute_handlePtr - .asFunction(); - - /// @deprecated Deprecated since 2.3.1. Use gatt_client_read_value instead. - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Reads the value of characteristic from remote device. - /// @since_tizen @if WEARABLE @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] char_handle The attribute handle of characteristic - /// @param[in] callback The result callback - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @see bt_gatt_get_characteristic_declaration() - int bt_gatt_read_characteristic_value( - bt_gatt_attribute_h char_handle, - bt_gatt_characteristic_read_cb callback, - ) { - return _bt_gatt_read_characteristic_value( - char_handle, - callback, - ); - } - - late final _bt_gatt_read_characteristic_valuePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_attribute_h, bt_gatt_characteristic_read_cb)>>( - 'bt_gatt_read_characteristic_value'); - late final _bt_gatt_read_characteristic_value = - _bt_gatt_read_characteristic_valuePtr.asFunction< - int Function(bt_gatt_attribute_h, bt_gatt_characteristic_read_cb)>(); - - /// @deprecated Deprecated since 2.3.1. This function call is not required because descriptor discovery is happened automatically. - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Discovers the characteristic descriptors of a characteristic within its definition, asynchronously. - /// @since_tizen @if WEARABLE @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] characteristic_handle The attribute handle of characteristic - /// @param[in] callback The result callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @post @a callback will be called. - /// @see bt_gatt_characteristic_descriptor_discovered_cb() - int bt_gatt_discover_characteristic_descriptor( - bt_gatt_attribute_h characteristic_handle, - bt_gatt_characteristic_descriptor_discovered_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_discover_characteristic_descriptor( - characteristic_handle, - callback, - user_data, - ); - } - - late final _bt_gatt_discover_characteristic_descriptorPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_attribute_h, - bt_gatt_characteristic_descriptor_discovered_cb, - ffi.Pointer)>>( - 'bt_gatt_discover_characteristic_descriptor'); - late final _bt_gatt_discover_characteristic_descriptor = - _bt_gatt_discover_characteristic_descriptorPtr.asFunction< - int Function( - bt_gatt_attribute_h, - bt_gatt_characteristic_descriptor_discovered_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets the value of a characteristic or descriptor's GATT handle. - /// @since_tizen 2.3.1 - /// - /// @remarks @a value must be released using free(). \n - /// When @a gatt_handle is associated with bt_gatt_client_h, bt_gatt_client_read_value() must be used prior to this function \n - /// in order to get the remote device's current value. - /// - /// @param[in] gatt_handle The handle of a characteristic or descriptor - /// @param[out] value The value of @a gatt_handle. It is a byte stream type. - /// @param[out] value_length The length of @a value - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_get_value( - bt_gatt_h gatt_handle, - ffi.Pointer> value, - ffi.Pointer value_length, - ) { - return _bt_gatt_get_value( - gatt_handle, - value, - value_length, - ); - } - - late final _bt_gatt_get_valuePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_h, ffi.Pointer>, - ffi.Pointer)>>('bt_gatt_get_value'); - late final _bt_gatt_get_value = _bt_gatt_get_valuePtr.asFunction< - int Function(bt_gatt_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets the value of a characteristic or descriptor's GATT handle as an integer type. - /// @since_tizen 2.3.1 - /// - /// @remarks This function returns a locally saved value in @a gatt_handle. \n - /// When @a gatt_handle is associated with bt_gatt_client_h, bt_gatt_client_read_value() must be used prior to this function \n - /// in order to get the remote device's current value. - /// - /// @param[in] gatt_handle The handle of a characteristic or descriptor - /// @param[in] type The type of a saved value in @a gatt_handle - /// @param[in] offset The offset from where a value will be read from @a gatt_handle as an integer type - /// @param[out] value The integer type's value of @a gatt_handle - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_get_int_value( - bt_gatt_h gatt_handle, - int type, - int offset, - ffi.Pointer value, - ) { - return _bt_gatt_get_int_value( - gatt_handle, - type, - offset, - value, - ); - } - - late final _bt_gatt_get_int_valuePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_h, ffi.Int32, ffi.Int, - ffi.Pointer)>>('bt_gatt_get_int_value'); - late final _bt_gatt_get_int_value = _bt_gatt_get_int_valuePtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets the value of a characteristic or descriptor's GATT handle as a float type. - /// @since_tizen 2.3.1 - /// - /// @remarks This function returns a locally saved value in @a gatt_handle. \n - /// When @a gatt_handle is associated with bt_gatt_client_h, bt_gatt_client_read_value() must be used prior to this function \n - /// in order to get the remote device's current value. - /// - /// @param[in] gatt_handle The handle of a characteristic or descriptor - /// @param[in] type The type of a saved value in @a gatt_handle - /// @param[in] offset The offset from where a value will be read from @a gatt_handle as an integer type - /// @param[out] value The float type's value of @a gatt_handle - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_get_float_value( - bt_gatt_h gatt_handle, - int type, - int offset, - ffi.Pointer value, - ) { - return _bt_gatt_get_float_value( - gatt_handle, - type, - offset, - value, - ); - } - - late final _bt_gatt_get_float_valuePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_h, ffi.Int32, ffi.Int, - ffi.Pointer)>>('bt_gatt_get_float_value'); - late final _bt_gatt_get_float_value = _bt_gatt_get_float_valuePtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Updates the value of a characteristic or descriptor's GATT handle. - /// @since_tizen 2.3.1 - /// - /// @remarks This function updates a value of @a gatt_handle locally. \n - /// When @a gatt_handle is associated with bt_gatt_client_h, bt_gatt_client_write_value() can be used after this function \n - /// in order to update the remote device's value. \n - /// - /// @param[in] gatt_handle The handle of a characteristic or descriptor - /// @param[in] value The value to be updated - /// @param[in] value_length The length of @a value - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_set_value( - bt_gatt_h gatt_handle, - ffi.Pointer value, - int value_length, - ) { - return _bt_gatt_set_value( - gatt_handle, - value, - value_length, - ); - } - - late final _bt_gatt_set_valuePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_h, ffi.Pointer, ffi.Int)>>('bt_gatt_set_value'); - late final _bt_gatt_set_value = _bt_gatt_set_valuePtr - .asFunction, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Updates the value of a characteristic or descriptor's GATT handle using a integer type's value. - /// @since_tizen 2.3.1 - /// - /// @remarks This function updates a value of @a gatt_handle locally. \n - /// When @a gatt_handle is associated with bt_gatt_client_h, bt_gatt_client_write_value() can be used after this function \n - /// in order to update the remote device's value. \n - /// - /// @param[in] gatt_handle The handle of a characteristic or descriptor - /// @param[in] type @a value will be saved in @a gatt_handle as this type - /// @param[in] value The integer type's value to be updated - /// @param[in] offset The offset from where @a value will be saved in @a gatt_handle - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_set_int_value( - bt_gatt_h gatt_handle, - int type, - int value, - int offset, - ) { - return _bt_gatt_set_int_value( - gatt_handle, - type, - value, - offset, - ); - } - - late final _bt_gatt_set_int_valuePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_h, ffi.Int32, ffi.Int, - ffi.Int)>>('bt_gatt_set_int_value'); - late final _bt_gatt_set_int_value = _bt_gatt_set_int_valuePtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Updates the value of a characteristic or descriptor's GATT handle using a float type's value. - /// @since_tizen 2.3.1 - /// - /// @remarks This function updates a value of @a gatt_handle locally. \n - /// When @a gatt_handle is associated with bt_gatt_client_h, bt_gatt_client_write_value() can be used after this function \n - /// in order to update the remote device's value. \n - /// - /// @param[in] gatt_handle The handle of a characteristic or descriptor - /// @param[in] type @a mantissa and @a exponent will be saved in @a gatt_handle as this type - /// @param[in] mantissa The mantissa of float type's value to be updated - /// @param[in] exponent The exponent of float type's value to be updated - /// @param[in] offset The offset from where @a mantissa and @a exponent will be saved in @a gatt_handle - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_set_float_value( - bt_gatt_h gatt_handle, - int type, - int mantissa, - int exponent, - int offset, - ) { - return _bt_gatt_set_float_value( - gatt_handle, - type, - mantissa, - exponent, - offset, - ); - } - - late final _bt_gatt_set_float_valuePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_h, ffi.Int32, ffi.Int, ffi.Int, - ffi.Int)>>('bt_gatt_set_float_value'); - late final _bt_gatt_set_float_value = _bt_gatt_set_float_valuePtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets the UUID of a service, characteristic or descriptor's GATT handle. - /// @since_tizen 2.3.1 - /// - /// @remarks @a uuid must be released using free(). \n - /// 16-bit UUID or 128-bit UUID is supported. (e.g. 2A19, 00002A19-0000-1000-8000-00805F9B34FB) - /// - /// @param[in] gatt_handle The handle of a service, characteristic or descriptor - /// @param[out] uuid The string of the UUID of @a gatt_handle - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_get_uuid( - bt_gatt_h gatt_handle, - ffi.Pointer> uuid, - ) { - return _bt_gatt_get_uuid( - gatt_handle, - uuid, - ); - } - - late final _bt_gatt_get_uuidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_h, - ffi.Pointer>)>>('bt_gatt_get_uuid'); - late final _bt_gatt_get_uuid = _bt_gatt_get_uuidPtr.asFunction< - int Function(bt_gatt_h, ffi.Pointer>)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets the type of GATT handle. - /// @since_tizen 2.3.1 - /// - /// @param[in] gatt_handle The GATT handle - /// @param[out] gatt_type The type of @a gatt_handle - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_get_type( - bt_gatt_h gatt_handle, - ffi.Pointer gatt_type, - ) { - return _bt_gatt_get_type( - gatt_handle, - gatt_type, - ); - } - - late final _bt_gatt_get_typePtr = _lookup< - ffi - .NativeFunction)>>( - 'bt_gatt_get_type'); - late final _bt_gatt_get_type = _bt_gatt_get_typePtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Gets the GATT client handle which the specified service belongs to. - /// @since_tizen 2.3.1 - /// - /// @remark This function doesn't allocate new memory for GATT client handle. - /// The returned GATT client handle is the same one which was got from bt_gatt_client_create(). - /// So if it is destroyed by bt_gatt_client_destroy(), all related GATT handles are freed also. - /// - /// @param[in] service The service's GATT handle - /// @param[out] client The GATT client handle which @a service belongs to - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_client_create() - int bt_gatt_service_get_client( - bt_gatt_h service, - ffi.Pointer client, - ) { - return _bt_gatt_service_get_client( - service, - client, - ); - } - - late final _bt_gatt_service_get_clientPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_h, - ffi.Pointer)>>('bt_gatt_service_get_client'); - late final _bt_gatt_service_get_client = _bt_gatt_service_get_clientPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets a characteristic's GATT handle which has specific UUID. - /// @since_tizen 2.3.1 - /// - /// @remark The returned GATT handle must not be freed by application. - /// It will be freed when an associated client is destroyed by bt_gatt_client_destroy(). - /// If there are multiple characteristics which have same UUID, only the first matched one will be returned. - /// - /// @param[in] service The service's GATT handle - /// @param[in] uuid The characteristic's GATT handle which has this UUID will be returned if it exists - /// @param[out] characteristic The characteristic's GATT handle which has @a uuid if it exists - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NO_DATA No data available - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_service_get_characteristic( - bt_gatt_h service, - ffi.Pointer uuid, - ffi.Pointer characteristic, - ) { - return _bt_gatt_service_get_characteristic( - service, - uuid, - characteristic, - ); - } - - late final _bt_gatt_service_get_characteristicPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_h, ffi.Pointer, - ffi.Pointer)>>('bt_gatt_service_get_characteristic'); - late final _bt_gatt_service_get_characteristic = - _bt_gatt_service_get_characteristicPtr.asFunction< - int Function( - bt_gatt_h, ffi.Pointer, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Invokes @a callback function on each characteristic that belongs to the specified service. - /// @since_tizen 2.3.1 - /// - /// @param[in] service The service's GATT handle - /// @param[in] callback The function to be invoked on each characteristic - /// @param[in] user_data The user data to be passed to @a callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_foreach_cb() - int bt_gatt_service_foreach_characteristics( - bt_gatt_h service, - bt_gatt_foreach_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_service_foreach_characteristics( - service, - callback, - user_data, - ); - } - - late final _bt_gatt_service_foreach_characteristicsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_h, bt_gatt_foreach_cb, ffi.Pointer)>>( - 'bt_gatt_service_foreach_characteristics'); - late final _bt_gatt_service_foreach_characteristics = - _bt_gatt_service_foreach_characteristicsPtr.asFunction< - int Function(bt_gatt_h, bt_gatt_foreach_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets an included service's GATT handle which has specific UUID. - /// @since_tizen 2.3.1 - /// - /// @remark The returned GATT handle must not be freed by application. - /// It will be freed when an associated client is destroyed by bt_gatt_client_destroy(). - /// If there are multiple included services which have same UUID, only the first matched one will be returned. - /// - /// @param[in] service The service's GATT handle - /// @param[in] uuid The included service's GATT handle which has this UUID will be returned if it exists - /// @param[out] included_service The included service's GATT handle which has @a uuid if it exists - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NO_DATA No data available - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_service_get_included_service( - bt_gatt_h service, - ffi.Pointer uuid, - ffi.Pointer included_service, - ) { - return _bt_gatt_service_get_included_service( - service, - uuid, - included_service, - ); - } - - late final _bt_gatt_service_get_included_servicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_h, ffi.Pointer, - ffi.Pointer)>>('bt_gatt_service_get_included_service'); - late final _bt_gatt_service_get_included_service = - _bt_gatt_service_get_included_servicePtr.asFunction< - int Function( - bt_gatt_h, ffi.Pointer, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Invokes @a callback function on each included service that belongs to the specified service. - /// @since_tizen 2.3.1 - /// - /// @param[in] service The service's GATT handle - /// @param[in] callback The function to be invoked on each included service - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_foreach_cb() - int bt_gatt_service_foreach_included_services( - bt_gatt_h service, - bt_gatt_foreach_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_service_foreach_included_services( - service, - callback, - user_data, - ); - } - - late final _bt_gatt_service_foreach_included_servicesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_h, bt_gatt_foreach_cb, ffi.Pointer)>>( - 'bt_gatt_service_foreach_included_services'); - late final _bt_gatt_service_foreach_included_services = - _bt_gatt_service_foreach_included_servicesPtr.asFunction< - int Function(bt_gatt_h, bt_gatt_foreach_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets the service's GATT handle which the specified characteristic belongs to. - /// @since_tizen 2.3.1 - /// - /// @remark The returned GATT handle must not be freed by application. - /// It will be freed when an associated client is destroyed by bt_gatt_client_destroy(). - /// - /// @param[in] characteristic The characteristic's GATT handle - /// @param[out] service The service's GATT handle which @a characteristic belongs to - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_characteristic_get_service( - bt_gatt_h characteristic, - ffi.Pointer service, - ) { - return _bt_gatt_characteristic_get_service( - characteristic, - service, - ); - } - - late final _bt_gatt_characteristic_get_servicePtr = _lookup< - ffi - .NativeFunction)>>( - 'bt_gatt_characteristic_get_service'); - late final _bt_gatt_characteristic_get_service = - _bt_gatt_characteristic_get_servicePtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets the properties which a characteristic's GATT handle has. - /// @since_tizen 2.3.1 - /// - /// @param[in] characteristic The characteristic's GATT handle - /// @param[out] properties The properties which a characteristic's GATT handle has - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_property_e - int bt_gatt_characteristic_get_properties( - bt_gatt_h characteristic, - ffi.Pointer properties, - ) { - return _bt_gatt_characteristic_get_properties( - characteristic, - properties, - ); - } - - late final _bt_gatt_characteristic_get_propertiesPtr = _lookup< - ffi - .NativeFunction)>>( - 'bt_gatt_characteristic_get_properties'); - late final _bt_gatt_characteristic_get_properties = - _bt_gatt_characteristic_get_propertiesPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets the write type of the specified characteristic. - /// @since_tizen 2.3.1 - /// - /// @param[in] characteristic The characteristic's GATT handle - /// @param[out] write_type The write type of the specified characteristic - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_write_type_e - int bt_gatt_characteristic_get_write_type( - bt_gatt_h characteristic, - ffi.Pointer write_type, - ) { - return _bt_gatt_characteristic_get_write_type( - characteristic, - write_type, - ); - } - - late final _bt_gatt_characteristic_get_write_typePtr = _lookup< - ffi - .NativeFunction)>>( - 'bt_gatt_characteristic_get_write_type'); - late final _bt_gatt_characteristic_get_write_type = - _bt_gatt_characteristic_get_write_typePtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Updates the write type of the specified characteristic. - /// @since_tizen 2.3.1 - /// - /// @param[in] characteristic The characteristic's GATT handle - /// @param[in] write_type The write type to be updated - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_client_write_value() - /// @see bt_gatt_write_type_e - int bt_gatt_characteristic_set_write_type( - bt_gatt_h characteristic, - int write_type, - ) { - return _bt_gatt_characteristic_set_write_type( - characteristic, - write_type, - ); - } - - late final _bt_gatt_characteristic_set_write_typePtr = - _lookup>( - 'bt_gatt_characteristic_set_write_type'); - late final _bt_gatt_characteristic_set_write_type = - _bt_gatt_characteristic_set_write_typePtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets a descriptor's GATT handle which has specific UUID. - /// @since_tizen 2.3.1 - /// - /// @remark The returned GATT handle must not be freed by application. - /// It will be freed when an associated client is destroyed by bt_gatt_client_destroy(). - /// If there are multiple descriptors which have same UUID, only the first matched one will be returned. - /// - /// @param[in] characteristic The characteristic's GATT handle - /// @param[in] uuid The descriptor's GATT handle which has this UUID will be returned if it exists - /// @param[out] descriptor The descriptor's GATT handle which has @a uuid if it exists - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NO_DATA No data available - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_characteristic_get_descriptor( - bt_gatt_h characteristic, - ffi.Pointer uuid, - ffi.Pointer descriptor, - ) { - return _bt_gatt_characteristic_get_descriptor( - characteristic, - uuid, - descriptor, - ); - } - - late final _bt_gatt_characteristic_get_descriptorPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_h, ffi.Pointer, ffi.Pointer)>>( - 'bt_gatt_characteristic_get_descriptor'); - late final _bt_gatt_characteristic_get_descriptor = - _bt_gatt_characteristic_get_descriptorPtr.asFunction< - int Function( - bt_gatt_h, ffi.Pointer, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Invokes @a callback function on each descriptor that belongs to the specified characteristic. - /// @since_tizen 2.3.1 - /// - /// @param[in] characteristic The characteristic's GATT handle - /// @param[in] callback The function to be invoked on each descriptor - /// @param[in] user_data The user data to be passed to @a callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_foreach_cb() - int bt_gatt_characteristic_foreach_descriptors( - bt_gatt_h characteristic, - bt_gatt_foreach_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_characteristic_foreach_descriptors( - characteristic, - callback, - user_data, - ); - } - - late final _bt_gatt_characteristic_foreach_descriptorsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_h, bt_gatt_foreach_cb, ffi.Pointer)>>( - 'bt_gatt_characteristic_foreach_descriptors'); - late final _bt_gatt_characteristic_foreach_descriptors = - _bt_gatt_characteristic_foreach_descriptorsPtr.asFunction< - int Function(bt_gatt_h, bt_gatt_foreach_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets the characteristic's GATT handle which the specified descriptor belongs to. - /// @since_tizen 2.3.1 - /// - /// @remark The returned GATT handle must not be freed by application. - /// It will be freed when an associated client is destroyed by bt_gatt_client_destroy(). - /// - /// @param[in] descriptor The descriptor's GATT handle - /// @param[out] characteristic The characteristic's GATT handle which @a descriptor belongs to - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_descriptor_get_characteristic( - bt_gatt_h descriptor, - ffi.Pointer characteristic, - ) { - return _bt_gatt_descriptor_get_characteristic( - descriptor, - characteristic, - ); - } - - late final _bt_gatt_descriptor_get_characteristicPtr = _lookup< - ffi - .NativeFunction)>>( - 'bt_gatt_descriptor_get_characteristic'); - late final _bt_gatt_descriptor_get_characteristic = - _bt_gatt_descriptor_get_characteristicPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Creates the GATT client handle. - /// @since_tizen 2.3.1 - /// - /// @remark The GATT client handle must be freed by bt_gatt_client_destroy() after use - /// - /// @param[in] remote_address The address of the remote device - /// @param[out] client The created GATT client's handle - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_ALREADY_DONE Operation is already done - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_client_destroy() - int bt_gatt_client_create( - ffi.Pointer remote_address, - ffi.Pointer client, - ) { - return _bt_gatt_client_create( - remote_address, - client, - ); - } - - late final _bt_gatt_client_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('bt_gatt_client_create'); - late final _bt_gatt_client_create = _bt_gatt_client_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Destroys the GATT client's handle. - /// @since_tizen 2.3.1 - /// - /// @remark All related service, characteristic and descriptor's GATT handles are freed also - /// - /// @param[in] client The GATT client's handle - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_client_create() - int bt_gatt_client_destroy( - bt_gatt_client_h client, - ) { - return _bt_gatt_client_destroy( - client, - ); - } - - late final _bt_gatt_client_destroyPtr = - _lookup>( - 'bt_gatt_client_destroy'); - late final _bt_gatt_client_destroy = - _bt_gatt_client_destroyPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Gets the address of remote device. - /// @since_tizen 2.3.1 - /// - /// @param[in] client The created GATT client's handle - /// @param[out] remote_address The address of the remote device which is associated with @a client - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_client_create() - int bt_gatt_client_get_remote_address( - bt_gatt_client_h client, - ffi.Pointer> remote_address, - ) { - return _bt_gatt_client_get_remote_address( - client, - remote_address, - ); - } - - late final _bt_gatt_client_get_remote_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_client_h, ffi.Pointer>)>>( - 'bt_gatt_client_get_remote_address'); - late final _bt_gatt_client_get_remote_address = - _bt_gatt_client_get_remote_addressPtr.asFunction< - int Function(bt_gatt_client_h, ffi.Pointer>)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Reads the value of a characteristic or descriptor from the remote device asynchronously. - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] gatt_handle The GATT handle of a characteristic or descriptor - /// @param[in] callback When a read request is completed, this callback function will be called - /// @param[in] user_data The user data to be passed to @a callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOW_IN_PROGRESS Operation now in progress - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_client_create() - /// @see bt_gatt_client_request_completed_cb() - int bt_gatt_client_read_value( - bt_gatt_h gatt_handle, - bt_gatt_client_request_completed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_client_read_value( - gatt_handle, - callback, - user_data, - ); - } - - late final _bt_gatt_client_read_valuePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_h, bt_gatt_client_request_completed_cb, - ffi.Pointer)>>('bt_gatt_client_read_value'); - late final _bt_gatt_client_read_value = - _bt_gatt_client_read_valuePtr.asFunction< - int Function(bt_gatt_h, bt_gatt_client_request_completed_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Writes the value of a characteristic or descriptor to the remote device asynchronously. - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] gatt_handle The GATT handle of a characteristic or descriptor - /// @param[in] callback When a write request is completed, this callback function will be called - /// @param[in] user_data The user data to be passed to @a callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOW_IN_PROGRESS Operation now in progress - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_client_create() - /// @see bt_gatt_characteristic_set_write_type() - /// @see bt_gatt_set_value() - /// @see bt_gatt_set_int_value() - /// @see bt_gatt_set_float_value() - /// @see bt_gatt_client_request_completed_cb() - int bt_gatt_client_write_value( - bt_gatt_h gatt_handle, - bt_gatt_client_request_completed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_client_write_value( - gatt_handle, - callback, - user_data, - ); - } - - late final _bt_gatt_client_write_valuePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_h, bt_gatt_client_request_completed_cb, - ffi.Pointer)>>('bt_gatt_client_write_value'); - late final _bt_gatt_client_write_value = - _bt_gatt_client_write_valuePtr.asFunction< - int Function(bt_gatt_h, bt_gatt_client_request_completed_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Requests a change of the ATT MTU value. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] client The created GATT client's handle - /// @param[in] mtu The new MTU value - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// @see bt_gatt_client_set_att_mtu_changed_cb() - int bt_gatt_client_request_att_mtu_change( - bt_gatt_client_h client, - int mtu, - ) { - return _bt_gatt_client_request_att_mtu_change( - client, - mtu, - ); - } - - late final _bt_gatt_client_request_att_mtu_changePtr = _lookup< - ffi - .NativeFunction>( - 'bt_gatt_client_request_att_mtu_change'); - late final _bt_gatt_client_request_att_mtu_change = - _bt_gatt_client_request_att_mtu_changePtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Gets the ATT MTU value set for a connection. - /// @since_tizen 4.0 - /// - /// @param[in] client The created GATT client's handle - /// @param[out] mtu The MTU value set for a connection - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_client_get_att_mtu( - bt_gatt_client_h client, - ffi.Pointer mtu, - ) { - return _bt_gatt_client_get_att_mtu( - client, - mtu, - ); - } - - late final _bt_gatt_client_get_att_mtuPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_client_h, - ffi.Pointer)>>('bt_gatt_client_get_att_mtu'); - late final _bt_gatt_client_get_att_mtu = - _bt_gatt_client_get_att_mtuPtr.asFunction< - int Function(bt_gatt_client_h, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Registers a callback function to be invoked when the ATT MTU is changed. - /// @since_tizen 4.0 - /// @param[in] client The created GATT client's handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_device_connection_state_changed_cb() will be invoked. - /// @see bt_initialize() - /// @see bt_gatt_client_request_att_mtu_change() - /// @see bt_gatt_client_unset_att_mtu_changed_cb() - int bt_gatt_client_set_att_mtu_changed_cb( - bt_gatt_client_h client, - bt_gatt_client_att_mtu_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_client_set_att_mtu_changed_cb( - client, - callback, - user_data, - ); - } - - late final _bt_gatt_client_set_att_mtu_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_client_h, bt_gatt_client_att_mtu_changed_cb, - ffi.Pointer)>>('bt_gatt_client_set_att_mtu_changed_cb'); - late final _bt_gatt_client_set_att_mtu_changed_cb = - _bt_gatt_client_set_att_mtu_changed_cbPtr.asFunction< - int Function(bt_gatt_client_h, bt_gatt_client_att_mtu_changed_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Unregisters the callback function to be invoked when the ATT MTU is changed. - /// @since_tizen 4.0 - /// @param[in] client The created GATT client's handle - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_gatt_client_request_att_mtu_change() - /// @see bt_gatt_client_set_att_mtu_changed_cb() - int bt_gatt_client_unset_att_mtu_changed_cb( - bt_gatt_client_h client, - ) { - return _bt_gatt_client_unset_att_mtu_changed_cb( - client, - ); - } - - late final _bt_gatt_client_unset_att_mtu_changed_cbPtr = - _lookup>( - 'bt_gatt_client_unset_att_mtu_changed_cb'); - late final _bt_gatt_client_unset_att_mtu_changed_cb = - _bt_gatt_client_unset_att_mtu_changed_cbPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Registers a callback function to be invoked when the characteristic value is changed on the remote device. - /// @since_tizen 2.3.1 - /// - /// @param[in] characteristic The characteristic's GATT handle - /// @param[in] callback The callback to be invoked when the value is changed and it is informed - /// @param[in] user_data The user data to be passed to @a callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_client_characteristic_value_changed_cb() - /// @see bt_gatt_client_unset_characteristic_value_change() - int bt_gatt_client_set_characteristic_value_changed_cb( - bt_gatt_h characteristic, - bt_gatt_client_characteristic_value_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_client_set_characteristic_value_changed_cb( - characteristic, - callback, - user_data, - ); - } - - late final _bt_gatt_client_set_characteristic_value_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_h, - bt_gatt_client_characteristic_value_changed_cb, - ffi.Pointer)>>( - 'bt_gatt_client_set_characteristic_value_changed_cb'); - late final _bt_gatt_client_set_characteristic_value_changed_cb = - _bt_gatt_client_set_characteristic_value_changed_cbPtr.asFunction< - int Function( - bt_gatt_h, - bt_gatt_client_characteristic_value_changed_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Unregisters a callback function to be invoked when the characteristic value is changed on the remote device. - /// @since_tizen 2.3.1 - /// - /// @param[in] characteristic The characteristic's GATT handle, whose value change will not be informed - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_client_set_characteristic_value_changed_cb() - int bt_gatt_client_unset_characteristic_value_changed_cb( - bt_gatt_h characteristic, - ) { - return _bt_gatt_client_unset_characteristic_value_changed_cb( - characteristic, - ); - } - - late final _bt_gatt_client_unset_characteristic_value_changed_cbPtr = - _lookup>( - 'bt_gatt_client_unset_characteristic_value_changed_cb'); - late final _bt_gatt_client_unset_characteristic_value_changed_cb = - _bt_gatt_client_unset_characteristic_value_changed_cbPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Gets a service's GATT handle which has specific UUID. - /// @since_tizen 2.3.1 - /// - /// @remark The returned GATT handle must not be freed by application. - /// It will be freed when an associated client is destroyed by bt_gatt_client_destroy(). - /// If there are multiple services which have same UUID, only the first matched one will be returned. - /// - /// @param[in] client The GATT client's handle - /// @param[in] uuid The service's GATT handle which has this UUID will be returned if it exists - /// @param[out] service The service's GATT handle which has @a uuid if it exists - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NO_DATA No data available - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_client_get_service( - bt_gatt_client_h client, - ffi.Pointer uuid, - ffi.Pointer service, - ) { - return _bt_gatt_client_get_service( - client, - uuid, - service, - ); - } - - late final _bt_gatt_client_get_servicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_client_h, ffi.Pointer, - ffi.Pointer)>>('bt_gatt_client_get_service'); - late final _bt_gatt_client_get_service = - _bt_gatt_client_get_servicePtr.asFunction< - int Function(bt_gatt_client_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Invokes @a callback function on each service that belongs to the specified GATT client. - /// @since_tizen 2.3.1 - /// - /// @param[in] client The GATT client's handle - /// @param[in] callback The function to be invoked on each service - /// @param[in] user_data The user data to be passed to @a callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_foreach_cb() - int bt_gatt_client_foreach_services( - bt_gatt_client_h client, - bt_gatt_foreach_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_client_foreach_services( - client, - callback, - user_data, - ); - } - - late final _bt_gatt_client_foreach_servicesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_client_h, bt_gatt_foreach_cb, - ffi.Pointer)>>('bt_gatt_client_foreach_services'); - late final _bt_gatt_client_foreach_services = - _bt_gatt_client_foreach_servicesPtr.asFunction< - int Function( - bt_gatt_client_h, bt_gatt_foreach_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Registers a callback function to be invoked when service is changed from a remote device(GATT server). - /// @since_tizen 3.0 - /// - /// @param[in] client The GATT client's handle - /// @param[in] callback The callback to be invoked - /// @param[in] user_data The user data to be passed to @a callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_client_unset_service_changed_cb() - int bt_gatt_client_set_service_changed_cb( - bt_gatt_client_h client, - bt_gatt_client_service_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_client_set_service_changed_cb( - client, - callback, - user_data, - ); - } - - late final _bt_gatt_client_set_service_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_client_h, bt_gatt_client_service_changed_cb, - ffi.Pointer)>>('bt_gatt_client_set_service_changed_cb'); - late final _bt_gatt_client_set_service_changed_cb = - _bt_gatt_client_set_service_changed_cbPtr.asFunction< - int Function(bt_gatt_client_h, bt_gatt_client_service_changed_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Unregisters a callback function - /// @since_tizen 3.0 - /// - /// @param[in] client The GATT client's handle - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_client_set_service_changed_cb() - int bt_gatt_client_unset_service_changed_cb( - bt_gatt_client_h client, - ) { - return _bt_gatt_client_unset_service_changed_cb( - client, - ); - } - - late final _bt_gatt_client_unset_service_changed_cbPtr = - _lookup>( - 'bt_gatt_client_unset_service_changed_cb'); - late final _bt_gatt_client_unset_service_changed_cb = - _bt_gatt_client_unset_service_changed_cbPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Connect to a specific LE based service on a remote bluetooth device address, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @remarks A connection can be disconnected by bt_gatt_disconnect(). - /// - /// @param[in] address The address of the remote Bluetooth device. - /// @param[in] auto_connect The flag of the auto connection. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @pre The remote device must support le connection. - /// @post This function invokes bt_gatt_connection_state_changed_cb(). - /// - /// @see bt_initialize() - /// @see bt_gatt_disconnect() - /// @see bt_gatt_set_connection_state_changed_cb() - /// @see bt_gatt_unset_connection_state_changed_cb() - /// @see bt_gatt_connection_state_changed_cb() - int bt_gatt_connect( - ffi.Pointer address, - bool auto_connect, - ) { - return _bt_gatt_connect( - address, - auto_connect, - ); - } - - late final _bt_gatt_connectPtr = _lookup< - ffi - .NativeFunction, ffi.Bool)>>( - 'bt_gatt_connect'); - late final _bt_gatt_connect = _bt_gatt_connectPtr - .asFunction, bool)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Disconnect to LE connection with the given remote Bluetooth device address, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] address The address of the remote Bluetooth device - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The connection must be established. - /// @post This function invokes bt_gatt_connection_state_changed_cb(). - /// - /// @see bt_initialize() - /// @see bt_gatt_connect() - /// @see bt_gatt_set_connection_state_changed_cb() - /// @see bt_gatt_unset_connection_state_changed_cb() - /// @see bt_gatt_connection_state_changed_cb() - int bt_gatt_disconnect( - ffi.Pointer address, - ) { - return _bt_gatt_disconnect( - address, - ); - } - - late final _bt_gatt_disconnectPtr = - _lookup)>>( - 'bt_gatt_disconnect'); - late final _bt_gatt_disconnect = - _bt_gatt_disconnectPtr.asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Registers a callback function that will be invoked when the connection state is changed. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[in] callback The callback function to register. - /// @param[in] user_data The user data to be passed to the callback function. - /// - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_connect() - /// @see bt_gatt_disconnect() - /// @see bt_gatt_unset_connection_state_changed_cb() - int bt_gatt_set_connection_state_changed_cb( - bt_gatt_connection_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_set_connection_state_changed_cb( - callback, - user_data, - ); - } - - late final _bt_gatt_set_connection_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_connection_state_changed_cb, ffi.Pointer)>>( - 'bt_gatt_set_connection_state_changed_cb'); - late final _bt_gatt_set_connection_state_changed_cb = - _bt_gatt_set_connection_state_changed_cbPtr.asFunction< - int Function( - bt_gatt_connection_state_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Unregisters a callback function that will be invoked when the connection state is changed. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_connect() - /// @see bt_gatt_disconnect() - /// @see bt_gatt_connection_state_changed_cb() - int bt_gatt_unset_connection_state_changed_cb() { - return _bt_gatt_unset_connection_state_changed_cb(); - } - - late final _bt_gatt_unset_connection_state_changed_cbPtr = - _lookup>( - 'bt_gatt_unset_connection_state_changed_cb'); - late final _bt_gatt_unset_connection_state_changed_cb = - _bt_gatt_unset_connection_state_changed_cbPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Destroys the GATT handle of service. - /// @since_tizen 3.0 - /// - /// @param[in] gatt_handle The handle of service - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_service_create() - int bt_gatt_service_destroy( - bt_gatt_h gatt_handle, - ) { - return _bt_gatt_service_destroy( - gatt_handle, - ); - } - - late final _bt_gatt_service_destroyPtr = - _lookup>( - 'bt_gatt_service_destroy'); - late final _bt_gatt_service_destroy = - _bt_gatt_service_destroyPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Destroys the GATT handle of characteristic. - /// @since_tizen 3.0 - /// - /// @param[in] gatt_handle The handle of characteristic - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_characteristic_create() - int bt_gatt_characteristic_destroy( - bt_gatt_h gatt_handle, - ) { - return _bt_gatt_characteristic_destroy( - gatt_handle, - ); - } - - late final _bt_gatt_characteristic_destroyPtr = - _lookup>( - 'bt_gatt_characteristic_destroy'); - late final _bt_gatt_characteristic_destroy = - _bt_gatt_characteristic_destroyPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Destroys the GATT handle of descriptor. - /// @since_tizen 3.0 - /// - /// @param[in] gatt_handle The handle of descriptor - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_descriptor_create() - int bt_gatt_descriptor_destroy( - bt_gatt_h gatt_handle, - ) { - return _bt_gatt_descriptor_destroy( - gatt_handle, - ); - } - - late final _bt_gatt_descriptor_destroyPtr = - _lookup>( - 'bt_gatt_descriptor_destroy'); - late final _bt_gatt_descriptor_destroy = - _bt_gatt_descriptor_destroyPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets the permissions which a characteristic's GATT handle has. - /// @since_tizen 3.0 - /// - /// @remarks The @a permissions can be one or more values of #bt_gatt_permission_e, combined with bitwise 'or'. - /// - /// @param[in] gatt_handle The handle of a characteristic - /// @param[out] permissions The permissions which a characteristic's GATT handle has - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_characteristic_create() - /// @see bt_gatt_permission_e - int bt_gatt_characteristic_get_permissions( - bt_gatt_h gatt_handle, - ffi.Pointer permissions, - ) { - return _bt_gatt_characteristic_get_permissions( - gatt_handle, - permissions, - ); - } - - late final _bt_gatt_characteristic_get_permissionsPtr = _lookup< - ffi - .NativeFunction)>>( - 'bt_gatt_characteristic_get_permissions'); - late final _bt_gatt_characteristic_get_permissions = - _bt_gatt_characteristic_get_permissionsPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets the permissions which a descriptor's GATT handle has. - /// @since_tizen 3.0 - /// - /// @remarks The @a permissions can be one or more values of #bt_gatt_permission_e, combined with bitwise 'or'. - /// - /// @param[in] gatt_handle The handle of a descriptor - /// @param[out] permissions The permissions which a descriptor's GATT handle has - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_descriptor_create() - /// @see bt_gatt_permission_e - int bt_gatt_descriptor_get_permissions( - bt_gatt_h gatt_handle, - ffi.Pointer permissions, - ) { - return _bt_gatt_descriptor_get_permissions( - gatt_handle, - permissions, - ); - } - - late final _bt_gatt_descriptor_get_permissionsPtr = _lookup< - ffi - .NativeFunction)>>( - 'bt_gatt_descriptor_get_permissions'); - late final _bt_gatt_descriptor_get_permissions = - _bt_gatt_descriptor_get_permissionsPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Creates the GATT service. - /// @since_tizen 3.0 - /// - /// @remarks The @a service should be destroyed by using bt_gatt_service_destroy() - /// - /// @param[in] uuid The UUID of the service - /// @param[in] type The type of the service - /// @param[out] service The GATT handle of the created service - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_service_destroy() - int bt_gatt_service_create( - ffi.Pointer uuid, - int type, - ffi.Pointer service, - ) { - return _bt_gatt_service_create( - uuid, - type, - service, - ); - } - - late final _bt_gatt_service_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int32, - ffi.Pointer)>>('bt_gatt_service_create'); - late final _bt_gatt_service_create = _bt_gatt_service_createPtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Adds a characteristic to a specified service. - /// @since_tizen 3.0 - /// - /// @param[in] service The service's GATT handle - /// @param[in] characteristic The characteristic's GATT handle to be added - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_service_create() - /// @see bt_gatt_characteristic_create() - int bt_gatt_service_add_characteristic( - bt_gatt_h service, - bt_gatt_h characteristic, - ) { - return _bt_gatt_service_add_characteristic( - service, - characteristic, - ); - } - - late final _bt_gatt_service_add_characteristicPtr = - _lookup>( - 'bt_gatt_service_add_characteristic'); - late final _bt_gatt_service_add_characteristic = - _bt_gatt_service_add_characteristicPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Adds a service to a specified service as included service. - /// @since_tizen 3.0 - /// - /// @param[in] service The service's GATT handle - /// @param[in] included_service The service's GATT handle to be added as included service - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_service_create() - int bt_gatt_service_add_included_service( - bt_gatt_h service, - bt_gatt_h included_service, - ) { - return _bt_gatt_service_add_included_service( - service, - included_service, - ); - } - - late final _bt_gatt_service_add_included_servicePtr = - _lookup>( - 'bt_gatt_service_add_included_service'); - late final _bt_gatt_service_add_included_service = - _bt_gatt_service_add_included_servicePtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Gets the GATT server handle to which the specified service belongs. - /// @since_tizen 3.0 - /// - /// @remarks The returned Server handle must not be freed by application. - /// - /// @param[in] service The service's GATT handle - /// @param[out] server The GATT server handle to which @a service belongs - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_server_create() - /// @see bt_gatt_service_create() - /// @see bt_gatt_server_register_service() - int bt_gatt_service_get_server( - bt_gatt_h service, - ffi.Pointer server, - ) { - return _bt_gatt_service_get_server( - service, - server, - ); - } - - late final _bt_gatt_service_get_serverPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_h, - ffi.Pointer)>>('bt_gatt_service_get_server'); - late final _bt_gatt_service_get_server = _bt_gatt_service_get_serverPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Creates the GATT characteristic. - /// @since_tizen 3.0 - /// - /// @remarks The @a permissions can be one or more values of #bt_gatt_permission_e, combined with bitwise 'or'. - /// @remarks The @a properties can be one or more values of #bt_gatt_property_e, combined with bitwise 'or'. - /// @remarks The @a characteristic should be destroyed by using bt_gatt_characteristic_destroy(). - /// - /// @param[in] uuid The UUID of the characteristic - /// @param[in] permissions the permissions of the characteristic - /// @param[in] properties The properties of the characteristic - /// @param[in] value The value(byte stream) of the characteristic - /// @param[in] value_length The length of @a value - /// @param[out] characteristic The GATT handle of the created characteristic - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_characteristic_destroy() - int bt_gatt_characteristic_create( - ffi.Pointer uuid, - int permissions, - int properties, - ffi.Pointer value, - int value_length, - ffi.Pointer characteristic, - ) { - return _bt_gatt_characteristic_create( - uuid, - permissions, - properties, - value, - value_length, - characteristic, - ); - } - - late final _bt_gatt_characteristic_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.Pointer)>>('bt_gatt_characteristic_create'); - late final _bt_gatt_characteristic_create = - _bt_gatt_characteristic_createPtr.asFunction< - int Function(ffi.Pointer, int, int, ffi.Pointer, - int, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Adds a descriptor to a specified characteristic. - /// @since_tizen 3.0 - /// - /// @param[in] characteristic The GATT handle of the characteristic - /// @param[in] descriptor The descriptor's GATT handle to be added - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_characteristic_create() - /// @see bt_gatt_descriptor_create() - int bt_gatt_characteristic_add_descriptor( - bt_gatt_h characteristic, - bt_gatt_h descriptor, - ) { - return _bt_gatt_characteristic_add_descriptor( - characteristic, - descriptor, - ); - } - - late final _bt_gatt_characteristic_add_descriptorPtr = - _lookup>( - 'bt_gatt_characteristic_add_descriptor'); - late final _bt_gatt_characteristic_add_descriptor = - _bt_gatt_characteristic_add_descriptorPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Creates the GATT characteristic descriptor. - /// @since_tizen 3.0 - /// - /// @remarks The @a permissions can be one or more values of #bt_gatt_permission_e, combined with bitwise 'or'. - /// @remarks The @a descriptor should be destroyed by using bt_gatt_descriptor_destroy(). - /// - /// @param[in] uuid The UUID of the descriptor - /// @param[in] permissions The permissions of the descriptor - /// @param[in] value The value(byte stream) associated with the descriptor - /// @param[in] value_length The length of @a value - /// @param[out] descriptor The GATT handle of the created characteristic descriptor - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_descriptor_destroy() - int bt_gatt_descriptor_create( - ffi.Pointer uuid, - int permissions, - ffi.Pointer value, - int value_length, - ffi.Pointer descriptor, - ) { - return _bt_gatt_descriptor_create( - uuid, - permissions, - value, - value_length, - descriptor, - ); - } - - late final _bt_gatt_descriptor_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.Pointer)>>('bt_gatt_descriptor_create'); - late final _bt_gatt_descriptor_create = - _bt_gatt_descriptor_createPtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer, int, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Initializes the GATT Server. - /// @since_tizen 3.0 - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @see bt_gatt_server_deinitialize() - int bt_gatt_server_initialize() { - return _bt_gatt_server_initialize(); - } - - late final _bt_gatt_server_initializePtr = - _lookup>( - 'bt_gatt_server_initialize'); - late final _bt_gatt_server_initialize = - _bt_gatt_server_initializePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief DeInitializes the GATT server. - /// @since_tizen 3.0 - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @see bt_gatt_server_initialize() - int bt_gatt_server_deinitialize() { - return _bt_gatt_server_deinitialize(); - } - - late final _bt_gatt_server_deinitializePtr = - _lookup>( - 'bt_gatt_server_deinitialize'); - late final _bt_gatt_server_deinitialize = - _bt_gatt_server_deinitializePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Creates the GATT server's handle. - /// @since_tizen 3.0 - /// - /// @remarks The @a server handle should be destroyed by using bt_gatt_server_destroy() - /// - /// @param[out] server The GATT server's handle - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_server_destroy() - int bt_gatt_server_create( - ffi.Pointer server, - ) { - return _bt_gatt_server_create( - server, - ); - } - - late final _bt_gatt_server_createPtr = _lookup< - ffi.NativeFunction)>>( - 'bt_gatt_server_create'); - late final _bt_gatt_server_create = _bt_gatt_server_createPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Destroys the GATT server's handle. - /// @since_tizen 3.0 - /// - /// @remarks All registered services to GATT server are unregistered - /// - /// @param[in] server The GATT server's handle - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_server_create() - int bt_gatt_server_destroy( - bt_gatt_server_h server, - ) { - return _bt_gatt_server_destroy( - server, - ); - } - - late final _bt_gatt_server_destroyPtr = - _lookup>( - 'bt_gatt_server_destroy'); - late final _bt_gatt_server_destroy = - _bt_gatt_server_destroyPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Registers a callback function to be invoked when a read request for a specified characteristic or descriptor is issued from a remote device(GATT client). - /// @since_tizen 3.0 - /// - /// @param[in] gatt_handle The GATT handle of a characteristic or descriptor - /// @param[in] callback The callback to be invoked - /// @param[in] user_data The user data to be passed to @a callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_server_read_value_requested_cb() - /// @see bt_gatt_server_send_response() - int bt_gatt_server_set_read_value_requested_cb( - bt_gatt_h gatt_handle, - bt_gatt_server_read_value_requested_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_server_set_read_value_requested_cb( - gatt_handle, - callback, - user_data, - ); - } - - late final _bt_gatt_server_set_read_value_requested_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_h, - bt_gatt_server_read_value_requested_cb, - ffi.Pointer)>>( - 'bt_gatt_server_set_read_value_requested_cb'); - late final _bt_gatt_server_set_read_value_requested_cb = - _bt_gatt_server_set_read_value_requested_cbPtr.asFunction< - int Function(bt_gatt_h, bt_gatt_server_read_value_requested_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Registers a callback function to be invoked when the remote device enables or disables the Notification/Indication for particular characteristics. - /// @since_tizen 3.0 - /// - /// @param[in] gatt_handle The GATT handle of a characteristic - /// @param[in] callback The callback to be invoked - /// @param[in] user_data The user data to be passed to @a callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_server_characteristic_notification_state_changed_cb() - int bt_gatt_server_set_characteristic_notification_state_change_cb( - bt_gatt_h gatt_handle, - bt_gatt_server_characteristic_notification_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_server_set_characteristic_notification_state_change_cb( - gatt_handle, - callback, - user_data, - ); - } - - late final _bt_gatt_server_set_characteristic_notification_state_change_cbPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_h, - bt_gatt_server_characteristic_notification_state_changed_cb, - ffi.Pointer)>>( - 'bt_gatt_server_set_characteristic_notification_state_change_cb'); - late final _bt_gatt_server_set_characteristic_notification_state_change_cb = - _bt_gatt_server_set_characteristic_notification_state_change_cbPtr - .asFunction< - int Function( - bt_gatt_h, - bt_gatt_server_characteristic_notification_state_changed_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Registers a callback function to be invoked when a value of a characteristic or descriptor has been changed by a remote device(GATT client)'s request. - /// @since_tizen 3.0 - /// - /// @param[in] gatt_handle The GATT handle of a characteristic or descriptor - /// @param[in] callback The callback to be invoked - /// @param[in] user_data The user data to be passed to @a callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_server_write_value_requested_cb() - int bt_gatt_server_set_write_value_requested_cb( - bt_gatt_h gatt_handle, - bt_gatt_server_write_value_requested_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_server_set_write_value_requested_cb( - gatt_handle, - callback, - user_data, - ); - } - - late final _bt_gatt_server_set_write_value_requested_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_h, - bt_gatt_server_write_value_requested_cb, - ffi.Pointer)>>( - 'bt_gatt_server_set_write_value_requested_cb'); - late final _bt_gatt_server_set_write_value_requested_cb = - _bt_gatt_server_set_write_value_requested_cbPtr.asFunction< - int Function(bt_gatt_h, bt_gatt_server_write_value_requested_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Registers a specified service to the specified GATT server that the local device is hosting. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] server The GATT server that local device is hosting - /// @param[in] service The service, which needs to be registered in @a server - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_ALREADY_DONE Operation is already done - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_server_create() - /// @see bt_gatt_service_create() - /// @see bt_gatt_server_start() - /// @see bt_gatt_server_unregister_service() - int bt_gatt_server_register_service( - bt_gatt_server_h server, - bt_gatt_h service, - ) { - return _bt_gatt_server_register_service( - server, - service, - ); - } - - late final _bt_gatt_server_register_servicePtr = _lookup< - ffi.NativeFunction>( - 'bt_gatt_server_register_service'); - late final _bt_gatt_server_register_service = - _bt_gatt_server_register_servicePtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Unregisters a specified service from the specified GATT server that the local device is hosting. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] server The GATT server that local device is hosting - /// @param[in] service The service, which needs to be unregistered from @a server - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_SERVICE_NOT_FOUND Service not found - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_server_register_service() - int bt_gatt_server_unregister_service( - bt_gatt_server_h server, - bt_gatt_h service, - ) { - return _bt_gatt_server_unregister_service( - server, - service, - ); - } - - late final _bt_gatt_server_unregister_servicePtr = _lookup< - ffi.NativeFunction>( - 'bt_gatt_server_unregister_service'); - late final _bt_gatt_server_unregister_service = - _bt_gatt_server_unregister_servicePtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Unregisters all services from the specified GATT server that the local device is hosting. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] server The GATT server that local device is hosting - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_server_register_service() - int bt_gatt_server_unregister_all_services( - bt_gatt_server_h server, - ) { - return _bt_gatt_server_unregister_all_services( - server, - ); - } - - late final _bt_gatt_server_unregister_all_servicesPtr = - _lookup>( - 'bt_gatt_server_unregister_all_services'); - late final _bt_gatt_server_unregister_all_services = - _bt_gatt_server_unregister_all_servicesPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Registers the application along with the GATT services of the application it is hosting. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_ALREADY_DONE Operation is already done - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_server_initialize() - /// @see bt_gatt_server_create() - /// @see bt_gatt_service_create() - /// @see bt_gatt_server_unregister_service() - int bt_gatt_server_start() { - return _bt_gatt_server_start(); - } - - late final _bt_gatt_server_startPtr = - _lookup>('bt_gatt_server_start'); - late final _bt_gatt_server_start = - _bt_gatt_server_startPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Sends a response to the remote device as a result of a read/write request. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @remarks Until this function is called, a read/write request is not finished. - /// - /// @param[in] request_id The identification of a read/write request - /// @param[in] request_type The request type for read/write - /// @param[in] offset The offset from where a value is read - /// @param[in] resp_status The application error if any occurred or BT_ERROR_NONE for successful. - /// @param[in] value The value to be sent. It will be sent from @a offset. If it is NULL, a requested GATT handle's value will be sent from @a offset. - /// @param[in] value_length Value Length - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_server_read_value_requested_cb() - int bt_gatt_server_send_response( - int request_id, - int request_type, - int offset, - int resp_status, - ffi.Pointer value, - int value_length, - ) { - return _bt_gatt_server_send_response( - request_id, - request_type, - offset, - resp_status, - value, - value_length, - ); - } - - late final _bt_gatt_server_send_responsePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Int32, ffi.Int, ffi.Int, - ffi.Pointer, ffi.Int)>>('bt_gatt_server_send_response'); - late final _bt_gatt_server_send_response = - _bt_gatt_server_send_responsePtr.asFunction< - int Function(int, int, int, int, ffi.Pointer, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Notifies value change of the characteristic to the remote devices which enable a Client Characteristic Configuration Descriptor. - /// @since_tizen 3.0 - /// - /// @param[in] characteristic The characteristic which has a changed value - /// @param[in] callback The function to be invoked on each remote device when a sending operation is done - /// @param[in] device_address Remote device address to send notify or indicate and if set to NULL then notify/indicate all is enabled. - /// @param[in] user_data The user data to be passed to @a callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_server_notification_sent_cb() - int bt_gatt_server_notify_characteristic_changed_value( - bt_gatt_h characteristic, - bt_gatt_server_notification_sent_cb callback, - ffi.Pointer device_address, - ffi.Pointer user_data, - ) { - return _bt_gatt_server_notify_characteristic_changed_value( - characteristic, - callback, - device_address, - user_data, - ); - } - - late final _bt_gatt_server_notify_characteristic_changed_valuePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_h, bt_gatt_server_notification_sent_cb, - ffi.Pointer, ffi.Pointer)>>( - 'bt_gatt_server_notify_characteristic_changed_value'); - late final _bt_gatt_server_notify_characteristic_changed_value = - _bt_gatt_server_notify_characteristic_changed_valuePtr.asFunction< - int Function(bt_gatt_h, bt_gatt_server_notification_sent_cb, - ffi.Pointer, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Gets a service's GATT handle which has specific UUID. - /// @since_tizen 3.0 - /// - /// @remark The returned GATT handle must not be freed by application. - /// It will be freed when an associated server is destroyed by bt_gatt_server_destroy(). - /// If there are multiple services which have same UUID, only the first matched one will be returned. - /// - /// @param[in] server The GATT server's handle - /// @param[in] uuid The service's GATT handle which has this UUID will be returned if it exists - /// @param[out] service The service's GATT handle which has @a uuid if it exists - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NO_DATA No data available - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_server_get_service( - bt_gatt_server_h server, - ffi.Pointer uuid, - ffi.Pointer service, - ) { - return _bt_gatt_server_get_service( - server, - uuid, - service, - ); - } - - late final _bt_gatt_server_get_servicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_server_h, ffi.Pointer, - ffi.Pointer)>>('bt_gatt_server_get_service'); - late final _bt_gatt_server_get_service = - _bt_gatt_server_get_servicePtr.asFunction< - int Function(bt_gatt_server_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Invokes @a callback function on each service that belongs to the specified GATT server. - /// @since_tizen 3.0 - /// - /// @param[in] server The GATT server's handle - /// @param[in] callback The function to be invoked on each service - /// @param[in] user_data The user data to be passed to @a callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_foreach_cb() - int bt_gatt_server_foreach_services( - bt_gatt_server_h server, - bt_gatt_foreach_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_server_foreach_services( - server, - callback, - user_data, - ); - } - - late final _bt_gatt_server_foreach_servicesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_server_h, bt_gatt_foreach_cb, - ffi.Pointer)>>('bt_gatt_server_foreach_services'); - late final _bt_gatt_server_foreach_services = - _bt_gatt_server_foreach_servicesPtr.asFunction< - int Function( - bt_gatt_server_h, bt_gatt_foreach_cb, ffi.Pointer)>(); - - /// @WEARABLE_ONLY - /// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE - /// @brief Initializes the Bluetooth PBAP Client. - /// @details This initialization is necessary to call other PBAP client APIs. - /// @since_tizen 3.0 - /// - /// @remarks This function must be called to initialize Bluetooth PBAP client. You must free all resources of the Bluetooth service - /// by calling bt_pbap_client_deinitialize() if Bluetooth PBAP Client is no longer needed. - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of the local Bluetooth adapter must be #BT_ADAPTER_ENABLED. - /// - /// @see bt_pbap_client_deinitialize() - /// @see bt_pbap_client_connect() - /// @see bt_pbap_client_disconnect() - /// @see bt_pbap_client_get_phone_book_size() - /// @see bt_pbap_client_get_phone_book() - /// @see bt_pbap_client_get_list() - /// @see bt_pbap_client_pull_vcard() - /// @see bt_pbap_client_search_phone_book() - int bt_pbap_client_initialize() { - return _bt_pbap_client_initialize(); - } - - late final _bt_pbap_client_initializePtr = - _lookup>( - 'bt_pbap_client_initialize'); - late final _bt_pbap_client_initialize = - _bt_pbap_client_initializePtr.asFunction(); - - /// @WEARABLE_ONLY - /// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE - /// @brief Deinitializes the Bluetooth PBAP Client. - /// @details This deinitialization must be done to free resources when the PBAP client is not longer needed. - /// @since_tizen 3.0 - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of the local Bluetooth adapter must be #BT_ADAPTER_ENABLED. - /// The PBAP client must be initialized with bt_pbap_client_initialize(). - /// @see bt_pbap_client_deinitialize() - /// @see bt_pbap_client_connect() - /// @see bt_pbap_client_disconnect() - /// @see bt_pbap_client_get_phone_book_size() - /// @see bt_pbap_client_get_phone_book() - /// @see bt_pbap_client_get_list() - /// @see bt_pbap_client_pull_vcard() - /// @see bt_pbap_client_search_phone_book() - int bt_pbap_client_deinitialize() { - return _bt_pbap_client_deinitialize(); - } - - late final _bt_pbap_client_deinitializePtr = - _lookup>( - 'bt_pbap_client_deinitialize'); - late final _bt_pbap_client_deinitialize = - _bt_pbap_client_deinitializePtr.asFunction(); - - /// @WEARABLE_ONLY - /// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE - /// @brief Registers a callback function that will be invoked when the connection state is changed. - /// @since_tizen 3.0 - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The PBAP client must be initialized with bt_pbap_client_initialize(). - /// @see bt_pbap_client_initialize() - int bt_pbap_client_set_connection_state_changed_cb( - bt_pbap_connection_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_pbap_client_set_connection_state_changed_cb( - callback, - user_data, - ); - } - - late final _bt_pbap_client_set_connection_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_pbap_connection_state_changed_cb, ffi.Pointer)>>( - 'bt_pbap_client_set_connection_state_changed_cb'); - late final _bt_pbap_client_set_connection_state_changed_cb = - _bt_pbap_client_set_connection_state_changed_cbPtr.asFunction< - int Function( - bt_pbap_connection_state_changed_cb, ffi.Pointer)>(); - - /// @WEARABLE_ONLY - /// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE - /// @brief Unregisters a callback function that will be invoked when the connection state is changed. - /// @since_tizen 3.0 - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The PBAP client must be initialized with bt_pbap_client_initialize(). - /// @see bt_pbap_client_initialize() - int bt_pbap_client_unset_connection_state_changed_cb() { - return _bt_pbap_client_unset_connection_state_changed_cb(); - } - - late final _bt_pbap_client_unset_connection_state_changed_cbPtr = - _lookup>( - 'bt_pbap_client_unset_connection_state_changed_cb'); - late final _bt_pbap_client_unset_connection_state_changed_cb = - _bt_pbap_client_unset_connection_state_changed_cbPtr - .asFunction(); - - /// @WEARABLE_ONLY - /// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE - /// @brief Connects to PBAP server, asynchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/bluetooth - /// - /// @param[in] address The other device's address - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of the local Bluetooth adapter must be #BT_ADAPTER_ENABLED. - /// @pre The PBAP client must be initialized with bt_pbap_client_initialize(). - /// @pre The local device must be bonded with the remote device by bt_device_create_bond(). - /// @post bt_pbap_connection_state_changed_cb() will be invoked. - /// @see bt_pbap_client_disconnect() - /// @see bt_pbap_client_set_connection_state_changed_cb() - int bt_pbap_client_connect( - ffi.Pointer address, - ) { - return _bt_pbap_client_connect( - address, - ); - } - - late final _bt_pbap_client_connectPtr = - _lookup)>>( - 'bt_pbap_client_connect'); - late final _bt_pbap_client_connect = _bt_pbap_client_connectPtr - .asFunction)>(); - - /// @WEARABLE_ONLY - /// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE - /// @brief Disconnects from PBAP server, asynchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/bluetooth - /// - /// @param[in] address The other device's address - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of the local Bluetooth adapter must be #BT_ADAPTER_ENABLED. - /// @pre The PBAP client must be initialized with bt_pbap_client_initialize(). - /// @pre PBAP connection must be created with bt_pbap_client_connect(). - /// @post bt_pbap_connection_state_changed_cb() will be invoked. - /// @see bt_pbap_client_connect() - /// @see bt_pbap_client_set_connection_state_changed_cb() - int bt_pbap_client_disconnect( - ffi.Pointer address, - ) { - return _bt_pbap_client_disconnect( - address, - ); - } - - late final _bt_pbap_client_disconnectPtr = - _lookup)>>( - 'bt_pbap_client_disconnect'); - late final _bt_pbap_client_disconnect = _bt_pbap_client_disconnectPtr - .asFunction)>(); - - /// @WEARABLE_ONLY - /// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE - /// @brief Gets size of phone book from PBAP server, asynchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/bluetooth - /// - /// @param[in] address The other device's address - /// @param[in] source Source of the phone book (Phone/SIM) - /// @param[in] folder_type Type of folder - /// @param[in] callback The callback function called when PBAP phone book size is returned. - /// @param[in] user_data Data to be passed to the PBAP phone book size callback. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of the local Bluetooth adapter must be #BT_ADAPTER_ENABLED. - /// @pre The PBAP client must be initialized with bt_pbap_client_initialize(). - /// @pre PBAP connection must be created with bt_pbap_client_connect(). - /// - /// @see bt_pbap_client_connect() - int bt_pbap_client_get_phone_book_size( - ffi.Pointer address, - int source, - int folder_type, - bt_pbap_phone_book_size_cb callback, - ffi.Pointer user_data, - ) { - return _bt_pbap_client_get_phone_book_size( - address, - source, - folder_type, - callback, - user_data, - ); - } - - late final _bt_pbap_client_get_phone_book_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Int32, - bt_pbap_phone_book_size_cb, - ffi.Pointer)>>('bt_pbap_client_get_phone_book_size'); - late final _bt_pbap_client_get_phone_book_size = - _bt_pbap_client_get_phone_book_sizePtr.asFunction< - int Function(ffi.Pointer, int, int, - bt_pbap_phone_book_size_cb, ffi.Pointer)>(); - - /// @WEARABLE_ONLY - /// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE - /// @brief Gets all contacts and call logs as vCard from PBAP server, asynchronously. - /// @details The received phone book file will be saved in the platform downloads folder. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/bluetooth - /// http://tizen.org/privilege/mediastorage - /// - /// @param[in] address The other device's address - /// @param[in] source Source of phone book (Phone/SIM) - /// @param[in] folder_type Type of folder - /// @param[in] format The vCard format - /// @param[in] order Specifies which field shall be used to sort vCards. - /// @param[in] offset The number of vCards to be excluded, counting from the beginning - /// @param[in] max_list_count The maximum number of vCards to be fetched - /// @param[in] fields vCard fields to be fetched; one or more #bt_pbap_field_e values combined with bitwise 'or' - /// @param[in] callback The callback function called when PBAP phone book is Pulled. - /// @param[in] user_data Data to be passed to the PBAP phone book pulling callback. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of the local Bluetooth adapter must be #BT_ADAPTER_ENABLED. - /// @pre The PBAP client must be initialized with bt_pbap_client_initialize(). - /// @pre PBAP connection must be created with bt_pbap_client_connect(). - /// - /// @see bt_pbap_client_connect() - int bt_pbap_client_get_phone_book( - ffi.Pointer address, - int source, - int folder_type, - int format, - int order, - int offset, - int max_list_count, - int fields, - bt_pbap_phone_book_received_cb callback, - ffi.Pointer user_data, - ) { - return _bt_pbap_client_get_phone_book( - address, - source, - folder_type, - format, - order, - offset, - max_list_count, - fields, - callback, - user_data, - ); - } - - late final _bt_pbap_client_get_phone_bookPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Int32, - ffi.Int32, - ffi.UnsignedShort, - ffi.UnsignedShort, - ffi.UnsignedInt, - bt_pbap_phone_book_received_cb, - ffi.Pointer)>>('bt_pbap_client_get_phone_book'); - late final _bt_pbap_client_get_phone_book = - _bt_pbap_client_get_phone_bookPtr.asFunction< - int Function(ffi.Pointer, int, int, int, int, int, int, int, - bt_pbap_phone_book_received_cb, ffi.Pointer)>(); - - /// @WEARABLE_ONLY - /// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE - /// @brief Gets contact and call log information from the PBAP server, asynchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/bluetooth - /// - /// @param[in] address The other device's address - /// @param[in] source Source of phone book (Phone/SIM) - /// @param[in] folder_type Type of folder - /// @param[in] order Specifies which field shall be used to sort vCards. - /// @param[in] offset vCards to be excluded from beginning. - /// @param[in] max_list_count Maximum number of vCards to be fetched - /// @param[in] callback The callback function called when PBAP List is returned. - /// @param[in] user_data Data to be passed to the PBAP phone book pulling callback. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of the local Bluetooth adapter must be #BT_ADAPTER_ENABLED. - /// @pre The PBAP client must be initialized with bt_pbap_client_initialize(). - /// @pre PBAP connection must be created with bt_pbap_client_connect(). - /// - /// @see bt_pbap_client_connect() - int bt_pbap_client_get_list( - ffi.Pointer address, - int source, - int folder_type, - int order, - int offset, - int max_list_count, - bt_pbap_list_vcards_cb callback, - ffi.Pointer user_data, - ) { - return _bt_pbap_client_get_list( - address, - source, - folder_type, - order, - offset, - max_list_count, - callback, - user_data, - ); - } - - late final _bt_pbap_client_get_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Int32, - ffi.UnsignedShort, - ffi.UnsignedShort, - bt_pbap_list_vcards_cb, - ffi.Pointer)>>('bt_pbap_client_get_list'); - late final _bt_pbap_client_get_list = _bt_pbap_client_get_listPtr.asFunction< - int Function(ffi.Pointer, int, int, int, int, int, - bt_pbap_list_vcards_cb, ffi.Pointer)>(); - - /// @WEARABLE_ONLY - /// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE - /// @brief Gets the selected contact using the index parameter as vCard from PBAP server, asynchronously. - /// @details The received phone book file will be saved in the platform downloads folder. - /// The @a index value should be equal to the value of the @a index field in the #bt_pbap_vcard_info_s structure, - /// which can be obtained with bt_pbap_client_get_list() or bt_pbap_client_search_phone_book(). - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/bluetooth - /// http://tizen.org/privilege/mediastorage - /// - /// @param[in] address The other device's address - /// @param[in] source Source of phone book (Phone/SIM) - /// @param[in] folder_type Type of folder - /// @param[in] index The handle index of vCard to be fetched - /// @param[in] format Format of vCard - /// @param[in] fields vCard fields to be fetched; one or more #bt_pbap_field_e values combined with bitwise 'or' - /// @param[in] callback The callback function called when PBAP phone book is Pulled. - /// @param[in] user_data Data to be passed to the PBAP phone book Pulling callback. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of the local Bluetooth adapter must be #BT_ADAPTER_ENABLED. - /// @pre The PBAP client must be initialized with bt_pbap_client_initialize(). - /// @pre PBAP connection must be created with bt_pbap_client_connect(). - /// @pre The vCard information (#bt_pbap_vcard_info_s) must be obtained with bt_pbap_client_get_list() or bt_pbap_client_search_phone_book(). - /// @see bt_pbap_client_connect() - /// @see bt_pbap_client_get_list() - /// @see bt_pbap_client_search_phone_book() - int bt_pbap_client_pull_vcard( - ffi.Pointer address, - int source, - int folder_type, - int index, - int format, - int fields, - bt_pbap_phone_book_received_cb callback, - ffi.Pointer user_data, - ) { - return _bt_pbap_client_pull_vcard( - address, - source, - folder_type, - index, - format, - fields, - callback, - user_data, - ); - } - - late final _bt_pbap_client_pull_vcardPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Int, - ffi.Int32, - ffi.UnsignedInt, - bt_pbap_phone_book_received_cb, - ffi.Pointer)>>('bt_pbap_client_pull_vcard'); - late final _bt_pbap_client_pull_vcard = - _bt_pbap_client_pull_vcardPtr.asFunction< - int Function(ffi.Pointer, int, int, int, int, int, - bt_pbap_phone_book_received_cb, ffi.Pointer)>(); - - /// @WEARABLE_ONLY - /// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE - /// @brief Finds and fetches the contact and call log information from the PBAP server, asynchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/bluetooth - /// - /// @param[in] address The other device's address - /// @param[in] source Source of phone book (Phone/SIM) - /// @param[in] folder_type Type of folder - /// @param[in] search_attribute field to be search - /// @param[in] search_value pattern to be searched for - /// @param[in] order Specifies which field shall be used to sort vCards. - /// @param[in] offset vCards to be excluded from beginning. - /// @param[in] max_list_count Maximum number of vCards to be fetched - /// @param[in] callback The callback function called when PBAP List is returned. - /// @param[in] user_data Data to be passed to the PBAP phone book pulling callback. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of the local Bluetooth adapter must be #BT_ADAPTER_ENABLED. - /// @pre The PBAP client must be initialized with bt_pbap_client_initialize(). - /// @pre PBAP connection must be created with bt_pbap_client_connect(). - /// - /// @see bt_pbap_client_connect() - int bt_pbap_client_search_phone_book( - ffi.Pointer address, - int source, - int folder_type, - int search_attribute, - ffi.Pointer search_value, - int order, - int offset, - int max_list_count, - bt_pbap_list_vcards_cb callback, - ffi.Pointer user_data, - ) { - return _bt_pbap_client_search_phone_book( - address, - source, - folder_type, - search_attribute, - search_value, - order, - offset, - max_list_count, - callback, - user_data, - ); - } - - late final _bt_pbap_client_search_phone_bookPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Int32, - ffi.Pointer, - ffi.Int32, - ffi.UnsignedShort, - ffi.UnsignedShort, - bt_pbap_list_vcards_cb, - ffi.Pointer)>>('bt_pbap_client_search_phone_book'); - late final _bt_pbap_client_search_phone_book = - _bt_pbap_client_search_phone_bookPtr.asFunction< - int Function( - ffi.Pointer, - int, - int, - int, - ffi.Pointer, - int, - int, - int, - bt_pbap_list_vcards_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Creates a scan filter to find only LE advertisements which match specific requirements. - /// @details If the filter's attribute is not set, then the filter will accept - /// all values of that attribute. If an attribute is set, the filter - /// will accept only advertisements which match the set attribute. - /// - /// For example, if device name is set with - /// bt_adapter_le_scan_filter_set_device_name(), the filter will accept - /// only advertisements from devices with the given name. If device name - /// is not set, advertisements will be filtered without regard to device - /// names. - /// @since_tizen 4.0 - /// - /// @remarks The @a scan_filter should be destroyed with bt_adapter_le_scan_filter_destroy(). - /// - /// @param[out] scan_filter The scan filter handle - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_scan_filter_destroy() - int bt_adapter_le_scan_filter_create( - ffi.Pointer scan_filter, - ) { - return _bt_adapter_le_scan_filter_create( - scan_filter, - ); - } - - late final _bt_adapter_le_scan_filter_createPtr = _lookup< - ffi.NativeFunction)>>( - 'bt_adapter_le_scan_filter_create'); - late final _bt_adapter_le_scan_filter_create = - _bt_adapter_le_scan_filter_createPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Destroys a scan filter. - /// @since_tizen 4.0 - /// - /// @param[in] scan_filter The scan filter handle - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_scan_filter_create() - int bt_adapter_le_scan_filter_destroy( - bt_scan_filter_h scan_filter, - ) { - return _bt_adapter_le_scan_filter_destroy( - scan_filter, - ); - } - - late final _bt_adapter_le_scan_filter_destroyPtr = - _lookup>( - 'bt_adapter_le_scan_filter_destroy'); - late final _bt_adapter_le_scan_filter_destroy = - _bt_adapter_le_scan_filter_destroyPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets the device address for the advertisements filter. - /// @since_tizen 4.0 - /// - /// @param[in] scan_filter The scan filter handle - /// @param[in] address The device address by which advertisements will be filtered - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_set_device_address( - bt_scan_filter_h scan_filter, - ffi.Pointer address, - ) { - return _bt_adapter_le_scan_filter_set_device_address( - scan_filter, - address, - ); - } - - late final _bt_adapter_le_scan_filter_set_device_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_scan_filter_h, ffi.Pointer)>>( - 'bt_adapter_le_scan_filter_set_device_address'); - late final _bt_adapter_le_scan_filter_set_device_address = - _bt_adapter_le_scan_filter_set_device_addressPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets the device name for the advertisements filter. - /// @details Any previously set value will be overwritten. - /// @since_tizen 4.0 - /// - /// @param[in] scan_filter The scan filter handle - /// @param[in] name The device name by which advertisements will be filtered - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_set_device_name( - bt_scan_filter_h scan_filter, - ffi.Pointer name, - ) { - return _bt_adapter_le_scan_filter_set_device_name( - scan_filter, - name, - ); - } - - late final _bt_adapter_le_scan_filter_set_device_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_scan_filter_h, ffi.Pointer)>>( - 'bt_adapter_le_scan_filter_set_device_name'); - late final _bt_adapter_le_scan_filter_set_device_name = - _bt_adapter_le_scan_filter_set_device_namePtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets the service UUID for the advertisements filter. - /// @details Any previously set value will be overwritten. - /// @since_tizen 4.0 - /// - /// @param[in] scan_filter The scan filter handle - /// @param[in] uuid The service UUID by which advertisements will be filtered - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_set_service_uuid( - bt_scan_filter_h scan_filter, - ffi.Pointer uuid, - ) { - return _bt_adapter_le_scan_filter_set_service_uuid( - scan_filter, - uuid, - ); - } - - late final _bt_adapter_le_scan_filter_set_service_uuidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_scan_filter_h, ffi.Pointer)>>( - 'bt_adapter_le_scan_filter_set_service_uuid'); - late final _bt_adapter_le_scan_filter_set_service_uuid = - _bt_adapter_le_scan_filter_set_service_uuidPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets the service UUID and the mask for the advertisements filter, - /// to use for filtering by partial data. - /// @details Any previously set value will be overwritten. The mask works as follows: - /// For each bit set to 1 in the mask, the corresponding bits in @a uuid - /// and in the filtered data will have to be equal. If the mask bit is set to 0, - /// the corresponding bits will be ignored. - /// @since_tizen 4.0 - /// - /// @remarks The @a mask and the service @a uuid must have equal lengths. - /// - /// @param[in] scan_filter The scan filter handle - /// @param[in] uuid The service UUID by which advertisements will be filtered - /// @param[in] mask The mask to filter advertisements - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_set_service_uuid_with_mask( - bt_scan_filter_h scan_filter, - ffi.Pointer uuid, - ffi.Pointer mask, - ) { - return _bt_adapter_le_scan_filter_set_service_uuid_with_mask( - scan_filter, - uuid, - mask, - ); - } - - late final _bt_adapter_le_scan_filter_set_service_uuid_with_maskPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_scan_filter_h, ffi.Pointer, - ffi.Pointer)>>( - 'bt_adapter_le_scan_filter_set_service_uuid_with_mask'); - late final _bt_adapter_le_scan_filter_set_service_uuid_with_mask = - _bt_adapter_le_scan_filter_set_service_uuid_with_maskPtr.asFunction< - int Function(bt_scan_filter_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets the service solicitation UUID for the advertisements filter. - /// @details Any previously set value will be overwritten. - /// @since_tizen 4.0 - /// - /// @param[in] scan_filter The scan filter handle - /// @param[in] uuid The service solicitation UUID by which advertisements will be filtered - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_set_service_solicitation_uuid( - bt_scan_filter_h scan_filter, - ffi.Pointer uuid, - ) { - return _bt_adapter_le_scan_filter_set_service_solicitation_uuid( - scan_filter, - uuid, - ); - } - - late final _bt_adapter_le_scan_filter_set_service_solicitation_uuidPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_scan_filter_h, ffi.Pointer)>>( - 'bt_adapter_le_scan_filter_set_service_solicitation_uuid'); - late final _bt_adapter_le_scan_filter_set_service_solicitation_uuid = - _bt_adapter_le_scan_filter_set_service_solicitation_uuidPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets the service solicitation UUID and the mask for the advertisements filter, - /// to use for filtering by partial data. - /// @details Any previously set value will be overwritten. The mask works as follows: - /// For each bit set to 1 in the mask, the corresponding bits in @a uuid - /// and in the filtered data will have to be equal. If the mask bit is set to 0, - /// the corresponding bits will be ignored. - /// @since_tizen 4.0 - /// - /// @remarks The @a mask and the service solicitation @a uuid must have equal lengths. - /// - /// @param[in] scan_filter The scan filter handle - /// @param[in] uuid The service solicitation UUID by which advertisements will be filtered - /// @param[in] mask The mask by which advertisements will be filtered - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_set_service_solicitation_uuid_with_mask( - bt_scan_filter_h scan_filter, - ffi.Pointer uuid, - ffi.Pointer mask, - ) { - return _bt_adapter_le_scan_filter_set_service_solicitation_uuid_with_mask( - scan_filter, - uuid, - mask, - ); - } - - late final _bt_adapter_le_scan_filter_set_service_solicitation_uuid_with_maskPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_scan_filter_h, ffi.Pointer, - ffi.Pointer)>>( - 'bt_adapter_le_scan_filter_set_service_solicitation_uuid_with_mask'); - late final _bt_adapter_le_scan_filter_set_service_solicitation_uuid_with_mask = - _bt_adapter_le_scan_filter_set_service_solicitation_uuid_with_maskPtr - .asFunction< - int Function(bt_scan_filter_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets the service data for the advertisements filter. - /// @details Any previously set value will be overwritten. - /// @since_tizen 4.0 - /// - /// @param[in] scan_filter The scan filter handle - /// @param[in] uuid The service UUID by which advertisements will be filtered - /// @param[in] data The service data by which advertisements will be filtered - /// @param[in] data_len The length of the service data - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_set_service_data( - bt_scan_filter_h scan_filter, - ffi.Pointer uuid, - ffi.Pointer data, - int data_len, - ) { - return _bt_adapter_le_scan_filter_set_service_data( - scan_filter, - uuid, - data, - data_len, - ); - } - - late final _bt_adapter_le_scan_filter_set_service_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_scan_filter_h, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt)>>('bt_adapter_le_scan_filter_set_service_data'); - late final _bt_adapter_le_scan_filter_set_service_data = - _bt_adapter_le_scan_filter_set_service_dataPtr.asFunction< - int Function(bt_scan_filter_h, ffi.Pointer, - ffi.Pointer, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets the service data and the mask for the advertisements filter, - /// to use for filtering by partial data. - /// @details Any previously set value will be overwritten. The mask works as follows: - /// For each bit set to 1 in the mask, the corresponding bits in @a data - /// and in the filtered data will have to be equal. If the mask bit is set to 0, - /// the corresponding bits will be ignored. - /// @since_tizen 4.0 - /// - /// @remarks The @a mask and the service @a data must have equal lengths. - /// - /// @param[in] scan_filter The scan filter handle - /// @param[in] uuid The service UUID by which advertisements will be filtered - /// @param[in] data The service data by which advertisements will be filtered - /// @param[in] data_len The length of the service data - /// @param[in] mask The mask by which advertisements will be filtered - /// @param[in] mask_len The length of the mask - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_set_service_data_with_mask( - bt_scan_filter_h scan_filter, - ffi.Pointer uuid, - ffi.Pointer data, - int data_len, - ffi.Pointer mask, - int mask_len, - ) { - return _bt_adapter_le_scan_filter_set_service_data_with_mask( - scan_filter, - uuid, - data, - data_len, - mask, - mask_len, - ); - } - - late final _bt_adapter_le_scan_filter_set_service_data_with_maskPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_scan_filter_h, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.Pointer, - ffi.UnsignedInt)>>( - 'bt_adapter_le_scan_filter_set_service_data_with_mask'); - late final _bt_adapter_le_scan_filter_set_service_data_with_mask = - _bt_adapter_le_scan_filter_set_service_data_with_maskPtr.asFunction< - int Function(bt_scan_filter_h, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets the manufacturer data for the advertisements filter. - /// @details Any previously set value will be overwritten. - /// @since_tizen 4.0 - /// - /// @param[in] scan_filter The scan filter handle - /// @param[in] manufacturer_id The manufacturer ID (0x0000 ~ 0xFFFF) - /// @param[in] data The manufacturer data (byte array) - /// @param[in] data_len The length of the manufacturer data - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_set_manufacturer_data( - bt_scan_filter_h scan_filter, - int manufacturer_id, - ffi.Pointer data, - int data_len, - ) { - return _bt_adapter_le_scan_filter_set_manufacturer_data( - scan_filter, - manufacturer_id, - data, - data_len, - ); - } - - late final _bt_adapter_le_scan_filter_set_manufacturer_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_scan_filter_h, ffi.Int, ffi.Pointer, - ffi.UnsignedInt)>>( - 'bt_adapter_le_scan_filter_set_manufacturer_data'); - late final _bt_adapter_le_scan_filter_set_manufacturer_data = - _bt_adapter_le_scan_filter_set_manufacturer_dataPtr.asFunction< - int Function(bt_scan_filter_h, int, ffi.Pointer, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets the manufacturer data and the mask for the advertisements filter, - /// to use for filtering by partial data. - /// @details Any previously set value will be overwritten. The mask works as follows: - /// For each bit set to 1 in the mask, the corresponding bits in @a data - /// and in the filtered data will have to be equal. If the mask bit is set to 0, - /// the corresponding bits will be ignored. - /// @since_tizen 4.0 - /// - /// @remarks The @a mask and the manufacturer @a data must have equal lengths. - /// - /// @param[in] scan_filter The scan filter handle - /// @param[in] manufacturer_id The manufacturer ID (0x0000 ~ 0xFFFF) - /// @param[in] data The manufacturer data (byte array) - /// @param[in] data_len The length of the manufacturer data - /// @param[in] mask The mask by which advertisements will be filtered - /// @param[in] mask_len The length of the mask - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_set_manufacturer_data_with_mask( - bt_scan_filter_h scan_filter, - int manufacturer_id, - ffi.Pointer data, - int data_len, - ffi.Pointer mask, - int mask_len, - ) { - return _bt_adapter_le_scan_filter_set_manufacturer_data_with_mask( - scan_filter, - manufacturer_id, - data, - data_len, - mask, - mask_len, - ); - } - - late final _bt_adapter_le_scan_filter_set_manufacturer_data_with_maskPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_scan_filter_h, - ffi.Int, - ffi.Pointer, - ffi.UnsignedInt, - ffi.Pointer, - ffi.UnsignedInt)>>( - 'bt_adapter_le_scan_filter_set_manufacturer_data_with_mask'); - late final _bt_adapter_le_scan_filter_set_manufacturer_data_with_mask = - _bt_adapter_le_scan_filter_set_manufacturer_data_with_maskPtr.asFunction< - int Function(bt_scan_filter_h, int, ffi.Pointer, int, - ffi.Pointer, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets the scan filter type for the advertisements filter. - /// @details The filter type is used when searching only for iBeacon or proximity - /// type's advertising data. If the type is not set, LE scanner will - /// search devices as with regard to other filtered attributes. - /// If the type is set, all other attributes set for the filter are ignored. - /// @since_tizen 4.0 - /// - /// @param[in] scan_filter The scan filter handle - /// @param[in] mode The scan filter type - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_set_type( - bt_scan_filter_h scan_filter, - int mode, - ) { - return _bt_adapter_le_scan_filter_set_type( - scan_filter, - mode, - ); - } - - late final _bt_adapter_le_scan_filter_set_typePtr = _lookup< - ffi.NativeFunction>( - 'bt_adapter_le_scan_filter_set_type'); - late final _bt_adapter_le_scan_filter_set_type = - _bt_adapter_le_scan_filter_set_typePtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Registers a scan filter to use for scanning. - /// @details If the filter is registered, it cannot be changed. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @remarks Several scan filters can be registered. If an advertisement passes - /// any of the registered scan filters, it will be included in the results. - /// - /// @param[in] scan_filter The scan filter handle - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOW_IN_PROGRESS Scan is in progress - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_register( - bt_scan_filter_h scan_filter, - ) { - return _bt_adapter_le_scan_filter_register( - scan_filter, - ); - } - - late final _bt_adapter_le_scan_filter_registerPtr = - _lookup>( - 'bt_adapter_le_scan_filter_register'); - late final _bt_adapter_le_scan_filter_register = - _bt_adapter_le_scan_filter_registerPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Unregisters all registered scan filters. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] scan_filter The scan filter handle - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOW_IN_PROGRESS Scan is in progress - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_unregister( - bt_scan_filter_h scan_filter, - ) { - return _bt_adapter_le_scan_filter_unregister( - scan_filter, - ); - } - - late final _bt_adapter_le_scan_filter_unregisterPtr = - _lookup>( - 'bt_adapter_le_scan_filter_unregister'); - late final _bt_adapter_le_scan_filter_unregister = - _bt_adapter_le_scan_filter_unregisterPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Unregisters all registered scan filters. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOW_IN_PROGRESS Scan is in progress - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_unregister_all() { - return _bt_adapter_le_scan_filter_unregister_all(); - } - - late final _bt_adapter_le_scan_filter_unregister_allPtr = - _lookup>( - 'bt_adapter_le_scan_filter_unregister_all'); - late final _bt_adapter_le_scan_filter_unregister_all = - _bt_adapter_le_scan_filter_unregister_allPtr.asFunction(); - - /// @brief Creates a profile handle. - /// @details The profile name, which you get from connection_profile_get_name() - /// will include the keyword you set. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @remarks You must release @a profile using connection_profile_destroy(). - /// @param[in] type The type of profile \n - /// #CONNECTION_PROFILE_TYPE_CELLULAR and #CONNECTION_PROFILE_TYPE_WIFI are supported - /// @param[in] keyword The keyword included in profile name - /// @param[out] profile The handle of the profile - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - /// @see connection_profile_destroy() - /// @see connection_profile_get_name() - int connection_profile_create( - int type, - ffi.Pointer keyword, - ffi.Pointer profile, - ) { - return _connection_profile_create( - type, - keyword, - profile, - ); - } - - late final _connection_profile_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer, - ffi.Pointer)>>('connection_profile_create'); - late final _connection_profile_create = - _connection_profile_createPtr.asFunction< - int Function( - int, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys a profile handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[out] profile The handle to the profile - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @see connection_profile_create() - int connection_profile_destroy( - connection_profile_h profile, - ) { - return _connection_profile_destroy( - profile, - ); - } - - late final _connection_profile_destroyPtr = - _lookup>( - 'connection_profile_destroy'); - late final _connection_profile_destroy = _connection_profile_destroyPtr - .asFunction(); - - /// @brief Clones a profile handle. - /// @since_tizen 2.3 - /// @remarks You must release @a cloned_profile using connection_profile_destroy(). - /// @param[out] cloned_profile The handle of the cloned profile - /// @param[in] origin_profile The handle of the origin profile - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @see connection_profile_destroy() - int connection_profile_clone( - ffi.Pointer cloned_profile, - connection_profile_h origin_profile, - ) { - return _connection_profile_clone( - cloned_profile, - origin_profile, - ); - } - - late final _connection_profile_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - connection_profile_h)>>('connection_profile_clone'); - late final _connection_profile_clone = - _connection_profile_clonePtr.asFunction< - int Function( - ffi.Pointer, connection_profile_h)>(); - - /// @brief Gets the profile ID. - /// @details The separate profiles can have the same name. - /// So, you must use this API instead of connection_profile_get_name() - /// if you want to get the unique identification. - /// In case you create a profile, this value will be determined when you add the profile. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a profile_id using free(). - /// @param[in] profile The profile handle - /// @param[out] profile_id The ID of the profile - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @see connection_profile_get_name() - /// @see connection_add_profile() - int connection_profile_get_id( - connection_profile_h profile, - ffi.Pointer> profile_id, - ) { - return _connection_profile_get_id( - profile, - profile_id, - ); - } - - late final _connection_profile_get_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_profile_h, ffi.Pointer>)>>( - 'connection_profile_get_id'); - late final _connection_profile_get_id = - _connection_profile_get_idPtr.asFunction< - int Function( - connection_profile_h, ffi.Pointer>)>(); - - /// @brief Gets the profile name. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a profile_name using free(). - /// @param[in] profile The profile handle - /// @param[out] profile_name The name of the profile - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @see connection_profile_get_id() - int connection_profile_get_name( - connection_profile_h profile, - ffi.Pointer> profile_name, - ) { - return _connection_profile_get_name( - profile, - profile_name, - ); - } - - late final _connection_profile_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_profile_h, ffi.Pointer>)>>( - 'connection_profile_get_name'); - late final _connection_profile_get_name = - _connection_profile_get_namePtr.asFunction< - int Function( - connection_profile_h, ffi.Pointer>)>(); - - /// @brief Gets the network type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[out] type The type of the profile - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_profile_get_type( - connection_profile_h profile, - ffi.Pointer type, - ) { - return _connection_profile_get_type( - profile, - type, - ); - } - - late final _connection_profile_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, - ffi.Pointer)>>('connection_profile_get_type'); - late final _connection_profile_get_type = _connection_profile_get_typePtr - .asFunction)>(); - - /// @brief Gets the name of the network interface, e.g. eth0 and pdp0. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a interface_name using free(). - /// @param[in] profile The profile handle - /// @param[out] interface_name The name of the network interface - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - int connection_profile_get_network_interface_name( - connection_profile_h profile, - ffi.Pointer> interface_name, - ) { - return _connection_profile_get_network_interface_name( - profile, - interface_name, - ); - } - - late final _connection_profile_get_network_interface_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_profile_h, ffi.Pointer>)>>( - 'connection_profile_get_network_interface_name'); - late final _connection_profile_get_network_interface_name = - _connection_profile_get_network_interface_namePtr.asFunction< - int Function( - connection_profile_h, ffi.Pointer>)>(); - - /// @brief Refreshes the profile information. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @remarks You should call this function in order to get the current information - /// because the profile information can be changed. - /// @param[in] profile The profile handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - int connection_profile_refresh( - connection_profile_h profile, - ) { - return _connection_profile_refresh( - profile, - ); - } - - late final _connection_profile_refreshPtr = - _lookup>( - 'connection_profile_refresh'); - late final _connection_profile_refresh = _connection_profile_refreshPtr - .asFunction(); - - /// @brief Gets the network type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[out] state The state of the profile - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_profile_get_state( - connection_profile_h profile, - ffi.Pointer state, - ) { - return _connection_profile_get_state( - profile, - state, - ); - } - - late final _connection_profile_get_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, - ffi.Pointer)>>('connection_profile_get_state'); - late final _connection_profile_get_state = _connection_profile_get_statePtr - .asFunction)>(); - - /// @brief Gets the IP config type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[out] type The type of the IP config - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_profile_get_ip_config_type( - connection_profile_h profile, - int address_family, - ffi.Pointer type, - ) { - return _connection_profile_get_ip_config_type( - profile, - address_family, - type, - ); - } - - late final _connection_profile_get_ip_config_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_profile_h, ffi.Int32, ffi.Pointer)>>( - 'connection_profile_get_ip_config_type'); - late final _connection_profile_get_ip_config_type = - _connection_profile_get_ip_config_typePtr.asFunction< - int Function(connection_profile_h, int, ffi.Pointer)>(); - - /// @brief Gets the IP address. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a ip_address using free(). - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[out] ip_address The IP address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_profile_get_ip_address( - connection_profile_h profile, - int address_family, - ffi.Pointer> ip_address, - ) { - return _connection_profile_get_ip_address( - profile, - address_family, - ip_address, - ); - } - - late final _connection_profile_get_ip_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int32, - ffi.Pointer>)>>( - 'connection_profile_get_ip_address'); - late final _connection_profile_get_ip_address = - _connection_profile_get_ip_addressPtr.asFunction< - int Function( - connection_profile_h, int, ffi.Pointer>)>(); - - /// @brief Gets the Subnet Mask. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a subnet_mask using free(). - /// This function is supported only for IPv4 address family. - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[out] subnet_mask The subnet mask - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_profile_get_subnet_mask( - connection_profile_h profile, - int address_family, - ffi.Pointer> subnet_mask, - ) { - return _connection_profile_get_subnet_mask( - profile, - address_family, - subnet_mask, - ); - } - - late final _connection_profile_get_subnet_maskPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int32, - ffi.Pointer>)>>( - 'connection_profile_get_subnet_mask'); - late final _connection_profile_get_subnet_mask = - _connection_profile_get_subnet_maskPtr.asFunction< - int Function( - connection_profile_h, int, ffi.Pointer>)>(); - - /// @brief Gets the Gateway address. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a gateway_address using free(). - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[out] gateway_address The gateway address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_profile_get_gateway_address( - connection_profile_h profile, - int address_family, - ffi.Pointer> gateway_address, - ) { - return _connection_profile_get_gateway_address( - profile, - address_family, - gateway_address, - ); - } - - late final _connection_profile_get_gateway_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int32, - ffi.Pointer>)>>( - 'connection_profile_get_gateway_address'); - late final _connection_profile_get_gateway_address = - _connection_profile_get_gateway_addressPtr.asFunction< - int Function( - connection_profile_h, int, ffi.Pointer>)>(); - - /// @brief Gets the DHCP Server address. - /// @since_tizen 4.0 - /// @remarks You must release @a dhcp_server using free(). - /// This function is supported only for IPv4 address family. - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[out] dhcp_server The DHCP Server address - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_profile_get_dhcp_server_address( - connection_profile_h profile, - int address_family, - ffi.Pointer> dhcp_server, - ) { - return _connection_profile_get_dhcp_server_address( - profile, - address_family, - dhcp_server, - ); - } - - late final _connection_profile_get_dhcp_server_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int32, - ffi.Pointer>)>>( - 'connection_profile_get_dhcp_server_address'); - late final _connection_profile_get_dhcp_server_address = - _connection_profile_get_dhcp_server_addressPtr.asFunction< - int Function( - connection_profile_h, int, ffi.Pointer>)>(); - - /// @brief Gets the DHCP lease duration. - /// @since_tizen 4.0 - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[out] dhcp_lease_duration The DHCP lease duration in seconds - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_dhcp_lease_duration( - connection_profile_h profile, - int address_family, - ffi.Pointer dhcp_lease_duration, - ) { - return _connection_profile_get_dhcp_lease_duration( - profile, - address_family, - dhcp_lease_duration, - ); - } - - late final _connection_profile_get_dhcp_lease_durationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_profile_h, ffi.Int32, ffi.Pointer)>>( - 'connection_profile_get_dhcp_lease_duration'); - late final _connection_profile_get_dhcp_lease_duration = - _connection_profile_get_dhcp_lease_durationPtr.asFunction< - int Function(connection_profile_h, int, ffi.Pointer)>(); - - /// @brief Gets the DNS address. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The allowance of the DNS address is @c 2. You must release @a dns_address using free(). - /// @param[in] profile The profile handle - /// @param[in] order The order of DNS address \n - /// It starts from 1, which means first DNS address - /// @param[in] address_family The address family - /// @param[out] dns_address The DNS address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_profile_get_dns_address( - connection_profile_h profile, - int order, - int address_family, - ffi.Pointer> dns_address, - ) { - return _connection_profile_get_dns_address( - profile, - order, - address_family, - dns_address, - ); - } - - late final _connection_profile_get_dns_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int, ffi.Int32, - ffi.Pointer>)>>( - 'connection_profile_get_dns_address'); - late final _connection_profile_get_dns_address = - _connection_profile_get_dns_addressPtr.asFunction< - int Function(connection_profile_h, int, int, - ffi.Pointer>)>(); - - /// @brief Gets the Proxy type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[out] type The type of the proxy - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_profile_get_proxy_type( - connection_profile_h profile, - ffi.Pointer type, - ) { - return _connection_profile_get_proxy_type( - profile, - type, - ); - } - - late final _connection_profile_get_proxy_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, - ffi.Pointer)>>('connection_profile_get_proxy_type'); - late final _connection_profile_get_proxy_type = - _connection_profile_get_proxy_typePtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Gets the Proxy address. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a proxy_address using free(). - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[out] proxy_address The proxy address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_profile_get_proxy_address( - connection_profile_h profile, - int address_family, - ffi.Pointer> proxy_address, - ) { - return _connection_profile_get_proxy_address( - profile, - address_family, - proxy_address, - ); - } - - late final _connection_profile_get_proxy_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int32, - ffi.Pointer>)>>( - 'connection_profile_get_proxy_address'); - late final _connection_profile_get_proxy_address = - _connection_profile_get_proxy_addressPtr.asFunction< - int Function( - connection_profile_h, int, ffi.Pointer>)>(); - - /// @brief Sets the IP config type. - /// @details If you set IP config type to #CONNECTION_IP_CONFIG_TYPE_STATIC, - /// then IP address, Gateway and Subnet mask will be set to the initial value "0.0.0.0". - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[in] type The type of the IP config - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_profile_set_ip_config_type( - connection_profile_h profile, - int address_family, - int type, - ) { - return _connection_profile_set_ip_config_type( - profile, - address_family, - type, - ); - } - - late final _connection_profile_set_ip_config_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int32, - ffi.Int32)>>('connection_profile_set_ip_config_type'); - late final _connection_profile_set_ip_config_type = - _connection_profile_set_ip_config_typePtr - .asFunction(); - - /// @brief Sets the IP address. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a ip_address using free(). - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[in] ip_address The IP address \n - /// If you set this value to @c NULL, then the existing value will be deleted - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @see connection_update_profile() - int connection_profile_set_ip_address( - connection_profile_h profile, - int address_family, - ffi.Pointer ip_address, - ) { - return _connection_profile_set_ip_address( - profile, - address_family, - ip_address, - ); - } - - late final _connection_profile_set_ip_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int32, - ffi.Pointer)>>('connection_profile_set_ip_address'); - late final _connection_profile_set_ip_address = - _connection_profile_set_ip_addressPtr.asFunction< - int Function(connection_profile_h, int, ffi.Pointer)>(); - - /// @brief Sets the Subnet Mask. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a subnet_mask using free(). - /// This function is supported only for IPv4 address family. - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[in] subnet_mask The subnet mask \n - /// If you set this value to @c NULL, then the existing value will be deleted - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @see connection_update_profile() - int connection_profile_set_subnet_mask( - connection_profile_h profile, - int address_family, - ffi.Pointer subnet_mask, - ) { - return _connection_profile_set_subnet_mask( - profile, - address_family, - subnet_mask, - ); - } - - late final _connection_profile_set_subnet_maskPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int32, - ffi.Pointer)>>('connection_profile_set_subnet_mask'); - late final _connection_profile_set_subnet_mask = - _connection_profile_set_subnet_maskPtr.asFunction< - int Function(connection_profile_h, int, ffi.Pointer)>(); - - /// @brief Sets the Gateway address. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a gateway_address using free(). - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[in] gateway_address The gateway address \n - /// If you set this value to @c NULL, then the existing value will be deleted - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @see connection_update_profile() - int connection_profile_set_gateway_address( - connection_profile_h profile, - int address_family, - ffi.Pointer gateway_address, - ) { - return _connection_profile_set_gateway_address( - profile, - address_family, - gateway_address, - ); - } - - late final _connection_profile_set_gateway_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_profile_h, ffi.Int32, ffi.Pointer)>>( - 'connection_profile_set_gateway_address'); - late final _connection_profile_set_gateway_address = - _connection_profile_set_gateway_addressPtr.asFunction< - int Function(connection_profile_h, int, ffi.Pointer)>(); - - /// @brief Sets the DNS address. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The allowance of the DNS address is @c 2. - /// @remarks You must release @a dns_address using free(). - /// @param[in] profile The profile handle - /// @param[in] order The order of the DNS address \n - /// It starts from @c 1, which means first DNS address - /// @param[in] address_family The address family - /// @param[in] dns_address The DNS address \n - /// If you set this value to NULL then the existing value will be deleted - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @see connection_update_profile() - int connection_profile_set_dns_address( - connection_profile_h profile, - int order, - int address_family, - ffi.Pointer dns_address, - ) { - return _connection_profile_set_dns_address( - profile, - order, - address_family, - dns_address, - ); - } - - late final _connection_profile_set_dns_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int, ffi.Int32, - ffi.Pointer)>>('connection_profile_set_dns_address'); - late final _connection_profile_set_dns_address = - _connection_profile_set_dns_addressPtr.asFunction< - int Function( - connection_profile_h, int, int, ffi.Pointer)>(); - - /// @brief Sets the Proxy type. - /// @details If you set the Proxy type to #CONNECTION_PROXY_TYPE_AUTO or - /// #CONNECTION_PROXY_TYPE_MANUAL, then Proxy will be restored. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[in] type The type of the proxy - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @see connection_update_profile() - int connection_profile_set_proxy_type( - connection_profile_h profile, - int type, - ) { - return _connection_profile_set_proxy_type( - profile, - type, - ); - } - - late final _connection_profile_set_proxy_typePtr = _lookup< - ffi - .NativeFunction>( - 'connection_profile_set_proxy_type'); - late final _connection_profile_set_proxy_type = - _connection_profile_set_proxy_typePtr - .asFunction(); - - /// @brief Sets the Proxy address. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a proxy_address using free(). - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[in] proxy_address The proxy address \n - /// If you set this value to @c NULL, then the existing value will be deleted - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @see connection_update_profile() - int connection_profile_set_proxy_address( - connection_profile_h profile, - int address_family, - ffi.Pointer proxy_address, - ) { - return _connection_profile_set_proxy_address( - profile, - address_family, - proxy_address, - ); - } - - late final _connection_profile_set_proxy_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int32, - ffi.Pointer)>>('connection_profile_set_proxy_address'); - late final _connection_profile_set_proxy_address = - _connection_profile_set_proxy_addressPtr.asFunction< - int Function(connection_profile_h, int, ffi.Pointer)>(); - - /// @brief Registers the callback that is called when the state of profile is changed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @post connection_opened_cb() is invoked when the state of profile is changed. - /// @see connection_profile_state_changed_cb() - /// @see connection_profile_unset_state_changed_cb() - int connection_profile_set_state_changed_cb( - connection_profile_h profile, - connection_profile_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _connection_profile_set_state_changed_cb( - profile, - callback, - user_data, - ); - } - - late final _connection_profile_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, - connection_profile_state_changed_cb, ffi.Pointer)>>( - 'connection_profile_set_state_changed_cb'); - late final _connection_profile_set_state_changed_cb = - _connection_profile_set_state_changed_cbPtr.asFunction< - int Function(connection_profile_h, - connection_profile_state_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback that is called when the state of profile is changed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @see connection_profile_state_changed_cb() - /// @see connection_profile_set_state_changed_cb() - int connection_profile_unset_state_changed_cb( - connection_profile_h profile, - ) { - return _connection_profile_unset_state_changed_cb( - profile, - ); - } - - late final _connection_profile_unset_state_changed_cbPtr = - _lookup>( - 'connection_profile_unset_state_changed_cb'); - late final _connection_profile_unset_state_changed_cb = - _connection_profile_unset_state_changed_cbPtr - .asFunction(); - - /// @brief Gets the IPv6 network state. - /// @since_tizen 4.0 - /// @param[in] profile The profile handle - /// @param[out] state The profile state - /// @return 0 on success, otherwise negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_ipv6_state( - connection_profile_h profile, - ffi.Pointer state, - ) { - return _connection_profile_get_ipv6_state( - profile, - state, - ); - } - - late final _connection_profile_get_ipv6_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, - ffi.Pointer)>>('connection_profile_get_ipv6_state'); - late final _connection_profile_get_ipv6_state = - _connection_profile_get_ipv6_statePtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Sets the DNS config type. - /// @since_tizen 4.0 - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[in] type The DNS config type - /// @return 0 on success, otherwise negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_set_dns_config_type( - connection_profile_h profile, - int address_family, - int type, - ) { - return _connection_profile_set_dns_config_type( - profile, - address_family, - type, - ); - } - - late final _connection_profile_set_dns_config_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int32, - ffi.Int32)>>('connection_profile_set_dns_config_type'); - late final _connection_profile_set_dns_config_type = - _connection_profile_set_dns_config_typePtr - .asFunction(); - - /// @brief Gets the DNS config type. - /// @since_tizen 4.0 - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[out] type The DNS config type - /// @return 0 on success, otherwise negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_dns_config_type( - connection_profile_h profile, - int address_family, - ffi.Pointer type, - ) { - return _connection_profile_get_dns_config_type( - profile, - address_family, - type, - ); - } - - late final _connection_profile_get_dns_config_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_profile_h, ffi.Int32, ffi.Pointer)>>( - 'connection_profile_get_dns_config_type'); - late final _connection_profile_get_dns_config_type = - _connection_profile_get_dns_config_typePtr.asFunction< - int Function(connection_profile_h, int, ffi.Pointer)>(); - - /// @brief Gets the network prefix length. - /// @since_tizen 4.0 - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[out] prefix_len The network prefix length \n - /// In case of IPv4, it means netmask length - /// (also called a prefix, e.g. 8, 16, 24, 32) - /// @return 0 on success, otherwise negative error value. - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_prefix_length( - connection_profile_h profile, - int address_family, - ffi.Pointer prefix_len, - ) { - return _connection_profile_get_prefix_length( - profile, - address_family, - prefix_len, - ); - } - - late final _connection_profile_get_prefix_lengthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int32, - ffi.Pointer)>>('connection_profile_get_prefix_length'); - late final _connection_profile_get_prefix_length = - _connection_profile_get_prefix_lengthPtr.asFunction< - int Function(connection_profile_h, int, ffi.Pointer)>(); - - /// @brief Sets the network prefix length. - /// @since_tizen 4.0 - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[in] prefix_len The network prefix length - /// In case of IPv4, it means netmask length - /// (also called a prefix, e.g. 8, 16, 24, 32) - /// @return 0 on success, otherwise negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - /// @see connection_update_profile() - int connection_profile_set_prefix_length( - connection_profile_h profile, - int address_family, - int prefix_len, - ) { - return _connection_profile_set_prefix_length( - profile, - address_family, - prefix_len, - ); - } - - late final _connection_profile_set_prefix_lengthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int32, - ffi.Int)>>('connection_profile_set_prefix_length'); - late final _connection_profile_set_prefix_length = - _connection_profile_set_prefix_lengthPtr - .asFunction(); - - /// @brief Gets the ESSID (Extended Service Set Identifier). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a essid using free(). - /// @param[in] profile The profile handle - /// @param[out] essid The ESSID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_wifi_essid( - connection_profile_h profile, - ffi.Pointer> essid, - ) { - return _connection_profile_get_wifi_essid( - profile, - essid, - ); - } - - late final _connection_profile_get_wifi_essidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_profile_h, ffi.Pointer>)>>( - 'connection_profile_get_wifi_essid'); - late final _connection_profile_get_wifi_essid = - _connection_profile_get_wifi_essidPtr.asFunction< - int Function( - connection_profile_h, ffi.Pointer>)>(); - - /// @brief Gets the BSSID (Basic Service Set Identifier). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a bssid using free(). - /// @param[in] profile The profile handle - /// @param[out] bssid The BSSID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_wifi_bssid( - connection_profile_h profile, - ffi.Pointer> bssid, - ) { - return _connection_profile_get_wifi_bssid( - profile, - bssid, - ); - } - - late final _connection_profile_get_wifi_bssidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_profile_h, ffi.Pointer>)>>( - 'connection_profile_get_wifi_bssid'); - late final _connection_profile_get_wifi_bssid = - _connection_profile_get_wifi_bssidPtr.asFunction< - int Function( - connection_profile_h, ffi.Pointer>)>(); - - /// @brief Gets the RSSI. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[out] rssi The RSSI - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_wifi_rssi( - connection_profile_h profile, - ffi.Pointer rssi, - ) { - return _connection_profile_get_wifi_rssi( - profile, - rssi, - ); - } - - late final _connection_profile_get_wifi_rssiPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, - ffi.Pointer)>>('connection_profile_get_wifi_rssi'); - late final _connection_profile_get_wifi_rssi = - _connection_profile_get_wifi_rssiPtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Gets the frequency (MHz). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[out] frequency The frequency - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_wifi_frequency( - connection_profile_h profile, - ffi.Pointer frequency, - ) { - return _connection_profile_get_wifi_frequency( - profile, - frequency, - ); - } - - late final _connection_profile_get_wifi_frequencyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, - ffi.Pointer)>>('connection_profile_get_wifi_frequency'); - late final _connection_profile_get_wifi_frequency = - _connection_profile_get_wifi_frequencyPtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Gets the max speed (Mbps). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[out] max_speed The max speed - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_wifi_max_speed( - connection_profile_h profile, - ffi.Pointer max_speed, - ) { - return _connection_profile_get_wifi_max_speed( - profile, - max_speed, - ); - } - - late final _connection_profile_get_wifi_max_speedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, - ffi.Pointer)>>('connection_profile_get_wifi_max_speed'); - late final _connection_profile_get_wifi_max_speed = - _connection_profile_get_wifi_max_speedPtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Gets the security mode of Wi-Fi. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[out] type The type of Wi-Fi security - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_wifi_security_type( - connection_profile_h profile, - ffi.Pointer type, - ) { - return _connection_profile_get_wifi_security_type( - profile, - type, - ); - } - - late final _connection_profile_get_wifi_security_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Pointer)>>( - 'connection_profile_get_wifi_security_type'); - late final _connection_profile_get_wifi_security_type = - _connection_profile_get_wifi_security_typePtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Gets the security mode of Wi-Fi. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[out] type The type of Wi-Fi security - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_wifi_encryption_type( - connection_profile_h profile, - ffi.Pointer type, - ) { - return _connection_profile_get_wifi_encryption_type( - profile, - type, - ); - } - - late final _connection_profile_get_wifi_encryption_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Pointer)>>( - 'connection_profile_get_wifi_encryption_type'); - late final _connection_profile_get_wifi_encryption_type = - _connection_profile_get_wifi_encryption_typePtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Checks whether passphrase is required. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This function is not valid if security type is #CONNECTION_WIFI_SECURITY_TYPE_EAP. - /// @param[in] profile The profile handle - /// @param[out] required @c true if a passphrase is required, - /// otherwise @c false if a passphrase is not required - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_is_wifi_passphrase_required( - connection_profile_h profile, - ffi.Pointer required1, - ) { - return _connection_profile_is_wifi_passphrase_required( - profile, - required1, - ); - } - - late final _connection_profile_is_wifi_passphrase_requiredPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Pointer)>>( - 'connection_profile_is_wifi_passphrase_required'); - late final _connection_profile_is_wifi_passphrase_required = - _connection_profile_is_wifi_passphrase_requiredPtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Sets the passphrase of the Wi-Fi WPA. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a passphrase using free(). - /// @param[in] profile The profile handle - /// @param[in] passphrase The passphrase of Wi-Fi security - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - /// @see connection_update_profile() - int connection_profile_set_wifi_passphrase( - connection_profile_h profile, - ffi.Pointer passphrase, - ) { - return _connection_profile_set_wifi_passphrase( - profile, - passphrase, - ); - } - - late final _connection_profile_set_wifi_passphrasePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Pointer)>>( - 'connection_profile_set_wifi_passphrase'); - late final _connection_profile_set_wifi_passphrase = - _connection_profile_set_wifi_passphrasePtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Checks whether the WPS (Wi-Fi Protected Setup) is supported. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If WPS is supported, you can connect the access point with WPS by wifi_connect_with_wps(). - /// @param[in] profile The profile handle - /// @param[out] supported @c true if WPS is supported, - /// otherwise @c false if WPS is not supported - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_is_wifi_wps_supported( - connection_profile_h profile, - ffi.Pointer supported, - ) { - return _connection_profile_is_wifi_wps_supported( - profile, - supported, - ); - } - - late final _connection_profile_is_wifi_wps_supportedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Pointer)>>( - 'connection_profile_is_wifi_wps_supported'); - late final _connection_profile_is_wifi_wps_supported = - _connection_profile_is_wifi_wps_supportedPtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Gets the service type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[out] type The type of the cellular service - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_cellular_service_type( - connection_profile_h profile, - ffi.Pointer type, - ) { - return _connection_profile_get_cellular_service_type( - profile, - type, - ); - } - - late final _connection_profile_get_cellular_service_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Pointer)>>( - 'connection_profile_get_cellular_service_type'); - late final _connection_profile_get_cellular_service_type = - _connection_profile_get_cellular_service_typePtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Gets the APN (access point name). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a apn using free(). - /// @param[in] profile The profile handle - /// @param[out] apn The name of the APN - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_cellular_apn( - connection_profile_h profile, - ffi.Pointer> apn, - ) { - return _connection_profile_get_cellular_apn( - profile, - apn, - ); - } - - late final _connection_profile_get_cellular_apnPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_profile_h, ffi.Pointer>)>>( - 'connection_profile_get_cellular_apn'); - late final _connection_profile_get_cellular_apn = - _connection_profile_get_cellular_apnPtr.asFunction< - int Function( - connection_profile_h, ffi.Pointer>)>(); - - /// @brief Gets the authentication information. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a user_name and @a password using free(). - /// @param[in] profile The profile handle - /// @param[out] type The type of the authentication - /// @param[out] user_name The user name - /// @param[out] password The password - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_cellular_auth_info( - connection_profile_h profile, - ffi.Pointer type, - ffi.Pointer> user_name, - ffi.Pointer> password, - ) { - return _connection_profile_get_cellular_auth_info( - profile, - type, - user_name, - password, - ); - } - - late final _connection_profile_get_cellular_auth_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_profile_h, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>>( - 'connection_profile_get_cellular_auth_info'); - late final _connection_profile_get_cellular_auth_info = - _connection_profile_get_cellular_auth_infoPtr.asFunction< - int Function( - connection_profile_h, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>(); - - /// @brief Gets the home URL. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a home_url using free(). - /// @param[in] profile The profile handle - /// @param[out] home_url The home URL - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_cellular_home_url( - connection_profile_h profile, - ffi.Pointer> home_url, - ) { - return _connection_profile_get_cellular_home_url( - profile, - home_url, - ); - } - - late final _connection_profile_get_cellular_home_urlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_profile_h, ffi.Pointer>)>>( - 'connection_profile_get_cellular_home_url'); - late final _connection_profile_get_cellular_home_url = - _connection_profile_get_cellular_home_urlPtr.asFunction< - int Function( - connection_profile_h, ffi.Pointer>)>(); - - /// @brief Gets the cellular pdn type. - /// @since_tizen 3.0 - /// @param[in] profile The profile handle - /// @param[out] type The cellular pdn type - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not suppported - int connection_profile_get_cellular_pdn_type( - connection_profile_h profile, - ffi.Pointer type, - ) { - return _connection_profile_get_cellular_pdn_type( - profile, - type, - ); - } - - late final _connection_profile_get_cellular_pdn_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Pointer)>>( - 'connection_profile_get_cellular_pdn_type'); - late final _connection_profile_get_cellular_pdn_type = - _connection_profile_get_cellular_pdn_typePtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Gets the cellular roam pdn type. - /// @since_tizen 3.0 - /// @param[in] profile The profile handle - /// @param[out] type The cellular pdn type - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_cellular_roam_pdn_type( - connection_profile_h profile, - ffi.Pointer type, - ) { - return _connection_profile_get_cellular_roam_pdn_type( - profile, - type, - ); - } - - late final _connection_profile_get_cellular_roam_pdn_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Pointer)>>( - 'connection_profile_get_cellular_roam_pdn_type'); - late final _connection_profile_get_cellular_roam_pdn_type = - _connection_profile_get_cellular_roam_pdn_typePtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Checks whether the connection is in roaming state. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[out] is_roaming @c true if the cellular is roaming, - /// otherwise @c false if it is not roaming - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_is_cellular_roaming( - connection_profile_h profile, - ffi.Pointer is_roaming, - ) { - return _connection_profile_is_cellular_roaming( - profile, - is_roaming, - ); - } - - late final _connection_profile_is_cellular_roamingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Pointer)>>( - 'connection_profile_is_cellular_roaming'); - late final _connection_profile_is_cellular_roaming = - _connection_profile_is_cellular_roamingPtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Checks whether the profile is hidden. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[out] is_hidden @c true if the profile is in hidden, - /// otherwise @c false if the profile is not hidden - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_is_cellular_hidden( - connection_profile_h profile, - ffi.Pointer is_hidden, - ) { - return _connection_profile_is_cellular_hidden( - profile, - is_hidden, - ); - } - - late final _connection_profile_is_cellular_hiddenPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, - ffi.Pointer)>>('connection_profile_is_cellular_hidden'); - late final _connection_profile_is_cellular_hidden = - _connection_profile_is_cellular_hiddenPtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Checks whether the profile is editable. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[out] is_editable @c true if the profile is editable, - /// otherwise @c false if the profile is not editable - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_is_cellular_editable( - connection_profile_h profile, - ffi.Pointer is_editable, - ) { - return _connection_profile_is_cellular_editable( - profile, - is_editable, - ); - } - - late final _connection_profile_is_cellular_editablePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Pointer)>>( - 'connection_profile_is_cellular_editable'); - late final _connection_profile_is_cellular_editable = - _connection_profile_is_cellular_editablePtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Checks whether the profile is default. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[out] is_default @c true if the profile is default, - /// otherwise @c false if the profile is not default - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_is_cellular_default( - connection_profile_h profile, - ffi.Pointer is_default, - ) { - return _connection_profile_is_cellular_default( - profile, - is_default, - ); - } - - late final _connection_profile_is_cellular_defaultPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Pointer)>>( - 'connection_profile_is_cellular_default'); - late final _connection_profile_is_cellular_default = - _connection_profile_is_cellular_defaultPtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Sets the service type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[in] service_type The type of cellular service - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - /// @see connection_update_profile() - int connection_profile_set_cellular_service_type( - connection_profile_h profile, - int service_type, - ) { - return _connection_profile_set_cellular_service_type( - profile, - service_type, - ); - } - - late final _connection_profile_set_cellular_service_typePtr = _lookup< - ffi - .NativeFunction>( - 'connection_profile_set_cellular_service_type'); - late final _connection_profile_set_cellular_service_type = - _connection_profile_set_cellular_service_typePtr - .asFunction(); - - /// @brief Sets the APN (Access Point Name). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a spn using free(). - /// @param[in] profile The profile handle - /// @param[in] apn The name of APN - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - /// @see connection_update_profile() - int connection_profile_set_cellular_apn( - connection_profile_h profile, - ffi.Pointer apn, - ) { - return _connection_profile_set_cellular_apn( - profile, - apn, - ); - } - - late final _connection_profile_set_cellular_apnPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, - ffi.Pointer)>>('connection_profile_set_cellular_apn'); - late final _connection_profile_set_cellular_apn = - _connection_profile_set_cellular_apnPtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Sets the Authentication information. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a user_name using free(). - /// @param[in] profile The profile handle - /// @param[in] type The type of the authentication - /// @param[in] user_name The user name - /// @param[in] password The password - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - /// @see connection_update_profile() - int connection_profile_set_cellular_auth_info( - connection_profile_h profile, - int type, - ffi.Pointer user_name, - ffi.Pointer password, - ) { - return _connection_profile_set_cellular_auth_info( - profile, - type, - user_name, - password, - ); - } - - late final _connection_profile_set_cellular_auth_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int32, - ffi.Pointer, ffi.Pointer)>>( - 'connection_profile_set_cellular_auth_info'); - late final _connection_profile_set_cellular_auth_info = - _connection_profile_set_cellular_auth_infoPtr.asFunction< - int Function(connection_profile_h, int, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Sets the home URL. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a home_url using free(). - /// @param[in] profile The profile handle - /// @param[in] home_url The home URL - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - /// @see connection_update_profile() - int connection_profile_set_cellular_home_url( - connection_profile_h profile, - ffi.Pointer home_url, - ) { - return _connection_profile_set_cellular_home_url( - profile, - home_url, - ); - } - - late final _connection_profile_set_cellular_home_urlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Pointer)>>( - 'connection_profile_set_cellular_home_url'); - late final _connection_profile_set_cellular_home_url = - _connection_profile_set_cellular_home_urlPtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Sets the cellular pdn type. - /// @since_tizen 3.0 - /// @param[in] profile The profile handle - /// @param[in] type The cellular pdn type - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_set_cellular_pdn_type( - connection_profile_h profile, - int type, - ) { - return _connection_profile_set_cellular_pdn_type( - profile, - type, - ); - } - - late final _connection_profile_set_cellular_pdn_typePtr = _lookup< - ffi - .NativeFunction>( - 'connection_profile_set_cellular_pdn_type'); - late final _connection_profile_set_cellular_pdn_type = - _connection_profile_set_cellular_pdn_typePtr - .asFunction(); - - /// @brief Sets the cellular roam pdn type. - /// @since_tizen 3.0 - /// @param[in] profile The profile handle - /// @param[in] type The cellular pdn type - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_set_cellular_roam_pdn_type( - connection_profile_h profile, - int type, - ) { - return _connection_profile_set_cellular_roam_pdn_type( - profile, - type, - ); - } - - late final _connection_profile_set_cellular_roam_pdn_typePtr = _lookup< - ffi - .NativeFunction>( - 'connection_profile_set_cellular_roam_pdn_type'); - late final _connection_profile_set_cellular_roam_pdn_type = - _connection_profile_set_cellular_roam_pdn_typePtr - .asFunction(); - - /// @brief Creates a handle for managing data connections. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @remarks You must release @a handle using connection_destroy(). - /// @param[out] connection The connection handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @see connection_destroy() - int connection_create( - ffi.Pointer connection, - ) { - return _connection_create( - connection, - ); - } - - late final _connection_createPtr = - _lookup)>>( - 'connection_create'); - late final _connection_create = _connection_createPtr - .asFunction)>(); - - /// @brief Destroys the connection handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] connection The connection handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @see connection_create() - int connection_destroy( - connection_h connection, - ) { - return _connection_destroy( - connection, - ); - } - - late final _connection_destroyPtr = - _lookup>( - 'connection_destroy'); - late final _connection_destroy = - _connection_destroyPtr.asFunction(); - - /// @brief Gets the type of the current profile for data connection. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] connection The connection handle - /// @param[out] type The type of the network - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_get_type( - connection_h connection, - ffi.Pointer type, - ) { - return _connection_get_type( - connection, - type, - ); - } - - late final _connection_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, ffi.Pointer)>>('connection_get_type'); - late final _connection_get_type = _connection_get_typePtr - .asFunction)>(); - - /// @brief Gets the IP address of the current connection. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a ip_address using free(). - /// @param[in] connection The connection handle - /// @param[in] address_family The address family - /// @param[out] ip_address The pointer to the IP address string - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - int connection_get_ip_address( - connection_h connection, - int address_family, - ffi.Pointer> ip_address, - ) { - return _connection_get_ip_address( - connection, - address_family, - ip_address, - ); - } - - late final _connection_get_ip_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, ffi.Int32, - ffi.Pointer>)>>( - 'connection_get_ip_address'); - late final _connection_get_ip_address = - _connection_get_ip_addressPtr.asFunction< - int Function( - connection_h, int, ffi.Pointer>)>(); - - /// @brief Gets the proxy address of the current connection. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a proxy using free(). - /// @param[in] connection The connection handle - /// @param[in] address_family The address family - /// @param[out] proxy The proxy address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - int connection_get_proxy( - connection_h connection, - int address_family, - ffi.Pointer> proxy, - ) { - return _connection_get_proxy( - connection, - address_family, - proxy, - ); - } - - late final _connection_get_proxyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, ffi.Int32, - ffi.Pointer>)>>('connection_get_proxy'); - late final _connection_get_proxy = _connection_get_proxyPtr.asFunction< - int Function(connection_h, int, ffi.Pointer>)>(); - - /// @brief Gets the MAC address of the Wi-Fi or ethernet. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks @a mac_addr must be released with free() by you. - /// @param[in] connection The handle of the connection - /// @param[in] type The type of current network connection - /// @param[out] mac_addr The MAC address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - int connection_get_mac_address( - connection_h connection, - int type, - ffi.Pointer> mac_addr, - ) { - return _connection_get_mac_address( - connection, - type, - mac_addr, - ); - } - - late final _connection_get_mac_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, ffi.Int32, - ffi.Pointer>)>>( - 'connection_get_mac_address'); - late final _connection_get_mac_address = - _connection_get_mac_addressPtr.asFunction< - int Function( - connection_h, int, ffi.Pointer>)>(); - - /// @brief Gets if the current connection is metered. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] connection The connection handle - /// @param[out] is_metered The value indicating whether it is metered - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_is_metered_network( - connection_h connection, - ffi.Pointer is_metered, - ) { - return _connection_is_metered_network( - connection, - is_metered, - ); - } - - late final _connection_is_metered_networkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, - ffi.Pointer)>>('connection_is_metered_network'); - late final _connection_is_metered_network = _connection_is_metered_networkPtr - .asFunction)>(); - - /// @brief Gets the state of cellular connection. - /// @details The returned state is for the cellular connection state. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] connection The connection handle - /// @param[out] state The state of the cellular connection - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_get_cellular_state( - connection_h connection, - ffi.Pointer state, - ) { - return _connection_get_cellular_state( - connection, - state, - ); - } - - late final _connection_get_cellular_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, - ffi.Pointer)>>('connection_get_cellular_state'); - late final _connection_get_cellular_state = _connection_get_cellular_statePtr - .asFunction)>(); - - /// @brief Gets the state of the Wi-Fi. - /// @details The returned state is for the Wi-Fi connection state. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] connection The connection handle - /// @param[out] state The state of Wi-Fi connection - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_get_wifi_state( - connection_h connection, - ffi.Pointer state, - ) { - return _connection_get_wifi_state( - connection, - state, - ); - } - - late final _connection_get_wifi_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, - ffi.Pointer)>>('connection_get_wifi_state'); - late final _connection_get_wifi_state = _connection_get_wifi_statePtr - .asFunction)>(); - - /// @brief Gets the state of the Ethernet. - /// @details The returned state is for the Ethernet connection state. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] connection The connection handle - /// @param[out] state The state of Ethernet connection - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_get_ethernet_state( - connection_h connection, - ffi.Pointer state, - ) { - return _connection_get_ethernet_state( - connection, - state, - ); - } - - late final _connection_get_ethernet_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, - ffi.Pointer)>>('connection_get_ethernet_state'); - late final _connection_get_ethernet_state = _connection_get_ethernet_statePtr - .asFunction)>(); - - /// @brief Checks for ethernet cable is attached or not. - /// @details The returned state is for the ethernet cable state. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] connection The handle of the connection - /// @param[in] state The state of ethernet cable - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - int connection_get_ethernet_cable_state( - connection_h connection, - ffi.Pointer state, - ) { - return _connection_get_ethernet_cable_state( - connection, - state, - ); - } - - late final _connection_get_ethernet_cable_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, - ffi.Pointer)>>('connection_get_ethernet_cable_state'); - late final _connection_get_ethernet_cable_state = - _connection_get_ethernet_cable_statePtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. Use connection_set_ethernet_cable_state_changed_cb() instead. - /// @brief Registers callback for ethernet cable is plugged [in/out] event. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] connection The handle of connection - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_set_ethernet_cable_state_chaged_cb( - connection_h connection, - connection_ethernet_cable_state_chaged_cb callback, - ffi.Pointer user_data, - ) { - return _connection_set_ethernet_cable_state_chaged_cb( - connection, - callback, - user_data, - ); - } - - late final _connection_set_ethernet_cable_state_chaged_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, - connection_ethernet_cable_state_chaged_cb, - ffi.Pointer)>>( - 'connection_set_ethernet_cable_state_chaged_cb'); - late final _connection_set_ethernet_cable_state_chaged_cb = - _connection_set_ethernet_cable_state_chaged_cbPtr.asFunction< - int Function(connection_h, connection_ethernet_cable_state_chaged_cb, - ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. Use connection_unset_ethernet_cable_state_changed_cb() instead. - /// @brief Unregisters callback for ethernet cable is plugged [in/out] event. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] connection The handle of connection - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_unset_ethernet_cable_state_chaged_cb( - connection_h connection, - ) { - return _connection_unset_ethernet_cable_state_chaged_cb( - connection, - ); - } - - late final _connection_unset_ethernet_cable_state_chaged_cbPtr = - _lookup>( - 'connection_unset_ethernet_cable_state_chaged_cb'); - late final _connection_unset_ethernet_cable_state_chaged_cb = - _connection_unset_ethernet_cable_state_chaged_cbPtr - .asFunction(); - - /// @brief Registers callback for ethernet cable is plugged [in/out] event. - /// @since_tizen 4.0 - /// @param[in] connection The handle of connection - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_set_ethernet_cable_state_changed_cb( - connection_h connection, - connection_ethernet_cable_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _connection_set_ethernet_cable_state_changed_cb( - connection, - callback, - user_data, - ); - } - - late final _connection_set_ethernet_cable_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, - connection_ethernet_cable_state_changed_cb, - ffi.Pointer)>>( - 'connection_set_ethernet_cable_state_changed_cb'); - late final _connection_set_ethernet_cable_state_changed_cb = - _connection_set_ethernet_cable_state_changed_cbPtr.asFunction< - int Function(connection_h, connection_ethernet_cable_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters callback for ethernet cable is plugged [in/out] event. - /// @since_tizen 4.0 - /// @param[in] connection The handle of connection - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_unset_ethernet_cable_state_changed_cb( - connection_h connection, - ) { - return _connection_unset_ethernet_cable_state_changed_cb( - connection, - ); - } - - late final _connection_unset_ethernet_cable_state_changed_cbPtr = - _lookup>( - 'connection_unset_ethernet_cable_state_changed_cb'); - late final _connection_unset_ethernet_cable_state_changed_cb = - _connection_unset_ethernet_cable_state_changed_cbPtr - .asFunction(); - - /// @brief Gets the state of the Bluetooth. - /// @details The returned state is for the Bluetooth connection state. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] connection The connection handle - /// @param[out] state The state of the Bluetooth connection - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_get_bt_state( - connection_h connection, - ffi.Pointer state, - ) { - return _connection_get_bt_state( - connection, - state, - ); - } - - late final _connection_get_bt_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, - ffi.Pointer)>>('connection_get_bt_state'); - late final _connection_get_bt_state = _connection_get_bt_statePtr - .asFunction)>(); - - /// @brief Registers the callback that is called when the type of the current connection is changed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] connection The connection handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_set_type_changed_cb( - connection_h connection, - connection_type_changed_cb callback, - ffi.Pointer user_data, - ) { - return _connection_set_type_changed_cb( - connection, - callback, - user_data, - ); - } - - late final _connection_set_type_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, connection_type_changed_cb, - ffi.Pointer)>>('connection_set_type_changed_cb'); - late final _connection_set_type_changed_cb = - _connection_set_type_changed_cbPtr.asFunction< - int Function(connection_h, connection_type_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback that is called when the type of current connection is changed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] connection The connection handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_unset_type_changed_cb( - connection_h connection, - ) { - return _connection_unset_type_changed_cb( - connection, - ); - } - - late final _connection_unset_type_changed_cbPtr = - _lookup>( - 'connection_unset_type_changed_cb'); - late final _connection_unset_type_changed_cb = - _connection_unset_type_changed_cbPtr - .asFunction(); - - /// @brief Registers the callback that is called when the IP address is changed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] connection The connection handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_set_ip_address_changed_cb( - connection_h connection, - connection_address_changed_cb callback, - ffi.Pointer user_data, - ) { - return _connection_set_ip_address_changed_cb( - connection, - callback, - user_data, - ); - } - - late final _connection_set_ip_address_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, connection_address_changed_cb, - ffi.Pointer)>>('connection_set_ip_address_changed_cb'); - late final _connection_set_ip_address_changed_cb = - _connection_set_ip_address_changed_cbPtr.asFunction< - int Function(connection_h, connection_address_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback that is called when the IP address is changed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] connection The connection handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_unset_ip_address_changed_cb( - connection_h connection, - ) { - return _connection_unset_ip_address_changed_cb( - connection, - ); - } - - late final _connection_unset_ip_address_changed_cbPtr = - _lookup>( - 'connection_unset_ip_address_changed_cb'); - late final _connection_unset_ip_address_changed_cb = - _connection_unset_ip_address_changed_cbPtr - .asFunction(); - - /// @brief Registers the callback that is called when the proxy address is changed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] connection The connection handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_set_proxy_address_changed_cb( - connection_h connection, - connection_address_changed_cb callback, - ffi.Pointer user_data, - ) { - return _connection_set_proxy_address_changed_cb( - connection, - callback, - user_data, - ); - } - - late final _connection_set_proxy_address_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, connection_address_changed_cb, - ffi.Pointer)>>( - 'connection_set_proxy_address_changed_cb'); - late final _connection_set_proxy_address_changed_cb = - _connection_set_proxy_address_changed_cbPtr.asFunction< - int Function(connection_h, connection_address_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback that is called when the proxy address is changed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] connection The connection handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_unset_proxy_address_changed_cb( - connection_h connection, - ) { - return _connection_unset_proxy_address_changed_cb( - connection, - ); - } - - late final _connection_unset_proxy_address_changed_cbPtr = - _lookup>( - 'connection_unset_proxy_address_changed_cb'); - late final _connection_unset_proxy_address_changed_cb = - _connection_unset_proxy_address_changed_cbPtr - .asFunction(); - - /// @brief Adds a new profile which is created by connection_profile_create(). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile - /// @remarks You can only add a profile of the cellular type. - /// @param[in] connection The connection handle - /// @param[in] profile The profile handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_add_profile( - connection_h connection, - connection_profile_h profile, - ) { - return _connection_add_profile( - connection, - profile, - ); - } - - late final _connection_add_profilePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, connection_profile_h)>>('connection_add_profile'); - late final _connection_add_profile = _connection_add_profilePtr - .asFunction(); - - /// @brief Removes an existing profile. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile \n - /// %http://tizen.org/privilege/network.get - /// @remarks This API needs both privileges. - /// @param[in] connection The connection handle - /// @param[in] profile The profile handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_remove_profile( - connection_h connection, - connection_profile_h profile, - ) { - return _connection_remove_profile( - connection, - profile, - ); - } - - late final _connection_remove_profilePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, - connection_profile_h)>>('connection_remove_profile'); - late final _connection_remove_profile = _connection_remove_profilePtr - .asFunction(); - - /// @brief Updates an existing profile. - /// @details When a profile is changed, these changes will be not applied to the - /// Connection Manager immediately. - /// When you call this function, your changes affect the Connection Manager - /// and the existing profile is updated. - /// In addition, the existing profile will be updated if you call connection_open_profile(). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile \n - /// %http://tizen.org/privilege/network.get - /// @remarks This API needs both privileges. - /// @param[in] connection The connection handle - /// @param[in] profile The profile handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - /// @see connection_open_profile() - int connection_update_profile( - connection_h connection, - connection_profile_h profile, - ) { - return _connection_update_profile( - connection, - profile, - ); - } - - late final _connection_update_profilePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, - connection_profile_h)>>('connection_update_profile'); - late final _connection_update_profile = _connection_update_profilePtr - .asFunction(); - - /// @brief Gets a profiles iterator. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @remarks You must release @a profile_iterator using connection_destroy(). - /// @param[in] connection The connection handle - /// @param[in] type The type of the connection iterator - /// @param[out] profile_iterator The iterator of profile - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - int connection_get_profile_iterator( - connection_h connection, - int type, - ffi.Pointer profile_iterator, - ) { - return _connection_get_profile_iterator( - connection, - type, - profile_iterator, - ); - } - - late final _connection_get_profile_iteratorPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, ffi.Int32, - ffi.Pointer)>>( - 'connection_get_profile_iterator'); - late final _connection_get_profile_iterator = - _connection_get_profile_iteratorPtr.asFunction< - int Function( - connection_h, int, ffi.Pointer)>(); - - /// @brief Moves the profile iterator to the next position and gets a profile handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile_iterator The iterator of profile - /// @param[out] profile The profile handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_ITERATOR_END End of iteration - int connection_profile_iterator_next( - connection_profile_iterator_h profile_iterator, - ffi.Pointer profile, - ) { - return _connection_profile_iterator_next( - profile_iterator, - profile, - ); - } - - late final _connection_profile_iterator_nextPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_iterator_h, - ffi.Pointer)>>( - 'connection_profile_iterator_next'); - late final _connection_profile_iterator_next = - _connection_profile_iterator_nextPtr.asFunction< - int Function(connection_profile_iterator_h, - ffi.Pointer)>(); - - /// @brief Checks whether the next element of a profile iterator exists or not. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. - /// Error codes are described in Exception section. - /// @param[in] profile_iterator The iterator of profile - /// @return @c true if next element exists, - /// otherwise @c false if next element doesn't exist - /// @exception #CONNECTION_ERROR_NONE Successful - /// @exception #CONNECTION_ERROR_NOT_SUPPORTED Not supported - /// @see get_last_result() - bool connection_profile_iterator_has_next( - connection_profile_iterator_h profile_iterator, - ) { - return _connection_profile_iterator_has_next( - profile_iterator, - ); - } - - late final _connection_profile_iterator_has_nextPtr = _lookup< - ffi.NativeFunction>( - 'connection_profile_iterator_has_next'); - late final _connection_profile_iterator_has_next = - _connection_profile_iterator_has_nextPtr - .asFunction(); - - /// @brief Destroys a profiles iterator. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile_iterator The iterator of the profile - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - int connection_destroy_profile_iterator( - connection_profile_iterator_h profile_iterator, - ) { - return _connection_destroy_profile_iterator( - profile_iterator, - ); - } - - late final _connection_destroy_profile_iteratorPtr = _lookup< - ffi.NativeFunction>( - 'connection_destroy_profile_iterator'); - late final _connection_destroy_profile_iterator = - _connection_destroy_profile_iteratorPtr - .asFunction(); - - /// @brief Gets the name of the default profile. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @remarks You must release @a profile using connection_profile_destroy(). - /// @param[in] connection The connection handle - /// @param[out] profile The profile handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NO_CONNECTION There is no connection - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - int connection_get_current_profile( - connection_h connection, - ffi.Pointer profile, - ) { - return _connection_get_current_profile( - connection, - profile, - ); - } - - late final _connection_get_current_profilePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, ffi.Pointer)>>( - 'connection_get_current_profile'); - late final _connection_get_current_profile = - _connection_get_current_profilePtr.asFunction< - int Function(connection_h, ffi.Pointer)>(); - - /// @brief Gets the default profile which provides the given cellular service. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @remarks You must release @a profile using connection_profile_destroy(). - /// @param[in] connection The connection handle - /// @param[in] type The type of cellular service \n - /// #CONNECTION_CELLULAR_SERVICE_TYPE_APPLICATION is not permitted - /// @param[out] profile The profile handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_get_default_cellular_service_profile( - connection_h connection, - int type, - ffi.Pointer profile, - ) { - return _connection_get_default_cellular_service_profile( - connection, - type, - profile, - ); - } - - late final _connection_get_default_cellular_service_profilePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, ffi.Int32, ffi.Pointer)>>( - 'connection_get_default_cellular_service_profile'); - late final _connection_get_default_cellular_service_profile = - _connection_get_default_cellular_service_profilePtr.asFunction< - int Function(connection_h, int, ffi.Pointer)>(); - - /// @brief Sets the default profile which provides the given cellular service. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile \n - /// %http://tizen.org/privilege/network.get - /// @remarks This API needs both privileges. - /// @param[in] connection The connection handle - /// @param[in] type The type of cellular service \n - /// Only #CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET and - /// #CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_INTERNET are permitted - /// @param[in] profile The profile handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_set_default_cellular_service_profile( - connection_h connection, - int type, - connection_profile_h profile, - ) { - return _connection_set_default_cellular_service_profile( - connection, - type, - profile, - ); - } - - late final _connection_set_default_cellular_service_profilePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, ffi.Int32, connection_profile_h)>>( - 'connection_set_default_cellular_service_profile'); - late final _connection_set_default_cellular_service_profile = - _connection_set_default_cellular_service_profilePtr - .asFunction(); - - /// @brief Sets the default profile which provides the given cellular service, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile \n - /// %http://tizen.org/privilege/network.get - /// @remarks This API needs both privileges. - /// @param[in] connection The connection handle - /// @param[in] type The type of cellular service \n - /// Only #CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET and - /// #CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_INTERNET are permitted - /// @param[in] profile The profile handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_set_default_cellular_service_profile_async( - connection_h connection, - int type, - connection_profile_h profile, - connection_set_default_cb callback, - ffi.Pointer user_data, - ) { - return _connection_set_default_cellular_service_profile_async( - connection, - type, - profile, - callback, - user_data, - ); - } - - late final _connection_set_default_cellular_service_profile_asyncPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, - ffi.Int32, - connection_profile_h, - connection_set_default_cb, - ffi.Pointer)>>( - 'connection_set_default_cellular_service_profile_async'); - late final _connection_set_default_cellular_service_profile_async = - _connection_set_default_cellular_service_profile_asyncPtr.asFunction< - int Function(connection_h, int, connection_profile_h, - connection_set_default_cb, ffi.Pointer)>(); - - /// @brief Opens a connection of profile, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get - /// @remarks This API needs both privileges. - /// @param[in] connection The connection handle - /// @param[in] profile The profile handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @post connection_opened_cb() will be invoked. - /// @see connection_opened_cb() - /// @see connection_close_profile() - /// @see connection_profile_set_state_changed_cb() - /// @see connection_profile_unset_state_changed_cb() - /// @see connection_profile_state_changed_cb() - int connection_open_profile( - connection_h connection, - connection_profile_h profile, - connection_opened_cb callback, - ffi.Pointer user_data, - ) { - return _connection_open_profile( - connection, - profile, - callback, - user_data, - ); - } - - late final _connection_open_profilePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, - connection_profile_h, - connection_opened_cb, - ffi.Pointer)>>('connection_open_profile'); - late final _connection_open_profile = _connection_open_profilePtr.asFunction< - int Function(connection_h, connection_profile_h, connection_opened_cb, - ffi.Pointer)>(); - - /// @brief Closes a connection of profile. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// @param[in] connection The connection handle - /// @param[in] profile The profile handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @post connection_closed_cb() will be invoked. - /// @see connection_closed_cb() - /// @see connection_open_profile() - /// @see connection_profile_set_state_changed_cb() - /// @see connection_profile_unset_state_changed_cb() - /// @see connection_profile_state_changed_cb() - int connection_close_profile( - connection_h connection, - connection_profile_h profile, - connection_closed_cb callback, - ffi.Pointer user_data, - ) { - return _connection_close_profile( - connection, - profile, - callback, - user_data, - ); - } - - late final _connection_close_profilePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, - connection_profile_h, - connection_closed_cb, - ffi.Pointer)>>('connection_close_profile'); - late final _connection_close_profile = - _connection_close_profilePtr.asFunction< - int Function(connection_h, connection_profile_h, connection_closed_cb, - ffi.Pointer)>(); - - /// @brief Resets the cellular profile. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile \n - /// %http://tizen.org/privilege/network.get - /// @remarks This API needs both privileges. - /// @param[in] connection The connection handle - /// @param[in] type The type of reset - /// @param[in] id The subscriber identity module ID to reset - /// (The sim index starts from 0.) - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - /// @post connection_reset_cb() will be invoked. - int connection_reset_profile( - connection_h connection, - int type, - int id, - connection_reset_cb callback, - ffi.Pointer user_data, - ) { - return _connection_reset_profile( - connection, - type, - id, - callback, - user_data, - ); - } - - late final _connection_reset_profilePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, - ffi.Int32, - ffi.Int, - connection_reset_cb, - ffi.Pointer)>>('connection_reset_profile'); - late final _connection_reset_profile = - _connection_reset_profilePtr.asFunction< - int Function(connection_h, int, int, connection_reset_cb, - ffi.Pointer)>(); - - /// @brief Adds a IPv4 route to the routing table. - /// @details You can get the @a interface_name from - /// connection_profile_get_network_interface_name() of opened profile. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// @param[in] connection The connection handle - /// @param[in] interface_name The name of network interface - /// @param[in] host_address The IP address of the host - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_ALREADY_EXISTS Already exists - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @see connection_profile_get_network_interface_name() - int connection_add_route( - connection_h connection, - ffi.Pointer interface_name, - ffi.Pointer host_address, - ) { - return _connection_add_route( - connection, - interface_name, - host_address, - ); - } - - late final _connection_add_routePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, ffi.Pointer, - ffi.Pointer)>>('connection_add_route'); - late final _connection_add_route = _connection_add_routePtr.asFunction< - int Function( - connection_h, ffi.Pointer, ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. Use connection_remove_route_entry() instead. - /// @brief Removes a IPv4 route from the routing table. - /// @details You can get the @a interface_name from - /// connection_profile_get_network_interface_name() of opened profile. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// @param[in] connection The connection handle - /// @param[in] interface_name The name of network interface - /// @param[in] host_address The IP address of the host - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @see connection_profile_get_network_interface_name() - int connection_remove_route( - connection_h connection, - ffi.Pointer interface_name, - ffi.Pointer host_address, - ) { - return _connection_remove_route( - connection, - interface_name, - host_address, - ); - } - - late final _connection_remove_routePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, ffi.Pointer, - ffi.Pointer)>>('connection_remove_route'); - late final _connection_remove_route = _connection_remove_routePtr.asFunction< - int Function( - connection_h, ffi.Pointer, ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. Use connection_add_route_entry() instead. - /// @brief Adds a IPv6 route to the routing table. - /// @details You can get the @a interface_name from - /// connection_profile_get_network_interface_name() of opened profile. - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// @param[in] connection The connection handle - /// @param[in] interface_name The name of network interface - /// @param[in] host_address The IP address of the host - /// @param[in] gateway The gateway address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_ALREADY_EXISTS Already exists - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @see connection_profile_get_network_interface_name() - int connection_add_route_ipv6( - connection_h connection, - ffi.Pointer interface_name, - ffi.Pointer host_address, - ffi.Pointer gateway, - ) { - return _connection_add_route_ipv6( - connection, - interface_name, - host_address, - gateway, - ); - } - - late final _connection_add_route_ipv6Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('connection_add_route_ipv6'); - late final _connection_add_route_ipv6 = - _connection_add_route_ipv6Ptr.asFunction< - int Function(connection_h, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. Use connection_remove_route_entry() instead. - /// @brief Removes a IPV6 route from the routing table. - /// @details You can get the @a interface_name from - /// connection_profile_get_network_interface_name() of opened profile. - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// @param[in] connection The connection handle - /// @param[in] interface_name The name of network interface - /// @param[in] host_address The IP address of the host - /// @param[in] gateway The gateway address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @see connection_profile_get_network_interface_name() - int connection_remove_route_ipv6( - connection_h connection, - ffi.Pointer interface_name, - ffi.Pointer host_address, - ffi.Pointer gateway, - ) { - return _connection_remove_route_ipv6( - connection, - interface_name, - host_address, - gateway, - ); - } - - late final _connection_remove_route_ipv6Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('connection_remove_route_ipv6'); - late final _connection_remove_route_ipv6 = - _connection_remove_route_ipv6Ptr.asFunction< - int Function(connection_h, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Adds a route to the routing table. - /// @details You can get the @a interface_name from \n - /// connection_profile_get_network_interface_name() of opened profile. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// @param[in] connection The connection handle - /// @param[in] address_family The address family - /// @param[in] interface_name The name of network interface - /// @param[in] host_address The IP address of the host (e.g., single IP address such as - /// 163.152.10.2,192.168.1.2), group's IP address (e.g., 163.152.10.0, 192.168.0.0) - /// is not allowed - /// @param[in] gateway The gateway address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_ALREADY_EXISTS Already exists - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @see connection_profile_get_network_interface_name() - int connection_add_route_entry( - connection_h connection, - int address_family, - ffi.Pointer interface_name, - ffi.Pointer host_address, - ffi.Pointer gateway, - ) { - return _connection_add_route_entry( - connection, - address_family, - interface_name, - host_address, - gateway, - ); - } - - late final _connection_add_route_entryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('connection_add_route_entry'); - late final _connection_add_route_entry = - _connection_add_route_entryPtr.asFunction< - int Function(connection_h, int, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Removes a route from the routing table. - /// @details You can get the @a interface_name from \n - /// connection_profile_get_network_interface_name() of opened profile. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// @param[in] connection The connection handle - /// @param[in] address_family The address family - /// @param[in] interface_name The name of network interface - /// @param[in] host_address The IP address of the host (e.g., single IP address such as - /// 163.152.10.2,192.168.1.2), group's IP address (e.g., 163.152.10.0, 192.168.0.0) - /// is not allowed - /// @param[in] gateway The gateway address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @see connection_profile_get_network_interface_name() - int connection_remove_route_entry( - connection_h connection, - int address_family, - ffi.Pointer interface_name, - ffi.Pointer host_address, - ffi.Pointer gateway, - ) { - return _connection_remove_route_entry( - connection, - address_family, - interface_name, - host_address, - gateway, - ); - } - - late final _connection_remove_route_entryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('connection_remove_route_entry'); - late final _connection_remove_route_entry = - _connection_remove_route_entryPtr.asFunction< - int Function(connection_h, int, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets all IPv6 addresses assigned to the network interface. - /// @since_tizen 4.0 - /// @param[in] connection The connection handle - /// @param[in] connection_type The connection type - /// @param[in] callback The callback to be called for each IPv6 address - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value. - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_foreach_ipv6_address( - connection_h connection, - int connection_type, - connection_ipv6_address_cb callback, - ffi.Pointer user_data, - ) { - return _connection_foreach_ipv6_address( - connection, - connection_type, - callback, - user_data, - ); - } - - late final _connection_foreach_ipv6_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, ffi.Int32, connection_ipv6_address_cb, - ffi.Pointer)>>('connection_foreach_ipv6_address'); - late final _connection_foreach_ipv6_address = - _connection_foreach_ipv6_addressPtr.asFunction< - int Function(connection_h, int, connection_ipv6_address_cb, - ffi.Pointer)>(); - - /// @brief Gets the statistics information. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] connection The connection handle - /// @param[in] connection_type The type of connection \n - /// Only CONNECTION_TYPE_WIFI and CONNECTION_TYPE_CELLULAR are supported - /// @param[in] statistics_type The type of statistics - /// @param[out] size The received data size of the last cellular packet data connection (bytes) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_get_statistics( - connection_h connection, - int connection_type, - int statistics_type, - ffi.Pointer size, - ) { - return _connection_get_statistics( - connection, - connection_type, - statistics_type, - size, - ); - } - - late final _connection_get_statisticsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, ffi.Int32, ffi.Int32, - ffi.Pointer)>>('connection_get_statistics'); - late final _connection_get_statistics = - _connection_get_statisticsPtr.asFunction< - int Function(connection_h, int, int, ffi.Pointer)>(); - - /// @brief Resets the statistics information. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// @param[in] connection The connection handle - /// @param[in] connection_type The type of connection \n - /// Only CONNECTION_TYPE_WIFI and CONNECTION_TYPE_CELLULAR are supported - /// @param[in] statistics_type The type of statistics - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_reset_statistics( - connection_h connection, - int connection_type, - int statistics_type, - ) { - return _connection_reset_statistics( - connection, - connection_type, - statistics_type, - ); - } - - late final _connection_reset_statisticsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, ffi.Int32, - ffi.Int32)>>('connection_reset_statistics'); - late final _connection_reset_statistics = _connection_reset_statisticsPtr - .asFunction(); - - /// @brief Initializes DNSSD. - /// @since_tizen 3.0 - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - int dnssd_initialize() { - return _dnssd_initialize(); - } - - late final _dnssd_initializePtr = - _lookup>('dnssd_initialize'); - late final _dnssd_initialize = - _dnssd_initializePtr.asFunction(); - - /// @brief Deinitializes DNSSD. - /// @since_tizen 3.0 - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_INVALID_OPERATION Invalid Operation - /// @pre DNS-SD service must be initialized by dnssd_initialize(). - int dnssd_deinitialize() { - return _dnssd_deinitialize(); - } - - late final _dnssd_deinitializePtr = - _lookup>('dnssd_deinitialize'); - late final _dnssd_deinitialize = - _dnssd_deinitializePtr.asFunction(); - - /// @brief Creates a DNSSD local service handle. - /// @since_tizen 3.0 - /// @remarks You must release @a dnssd_service using dnssd_destroy_local_service(). - /// @param[in] service_type The DNSSD service type. It is expressed as type - /// followed by protocol, separated by a dot(e.g. "_ftp._tcp"). It - /// must begin with an underscore, followed by 1-15 characters which - /// may be letters, digits, or hyphens. The transport protocol must be - /// "_tcp" or "_udp". New service types should be registered at - /// http://www.dns-sd.org/ServiceTypes.html. - /// @param[out] dnssd_service The DNSSD local handle - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - /// @see dnssd_destroy_local_service() - /// @pre This API needs dnssd_initialize() before use - int dnssd_create_local_service( - ffi.Pointer service_type, - ffi.Pointer dnssd_service, - ) { - return _dnssd_create_local_service( - service_type, - dnssd_service, - ); - } - - late final _dnssd_create_local_servicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('dnssd_create_local_service'); - late final _dnssd_create_local_service = - _dnssd_create_local_servicePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys the DNSSD local service handle. - /// @details Destroying a local service doesn't deregister local service. If - /// local service was registered using dnssd_register_local_service(), - /// then it must be deregistered using dnssd_deregister_local_service() - /// before destroying the local service. - /// @since_tizen 3.0 - /// @remarks You must destroy only local services created using dnssd_create_local_service(). - /// @param[in] dnssd_service The DNSSD local service handle - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - /// @see dnssd_create_local_service() - /// @pre This API needs dnssd_create_local_service() before use. - int dnssd_destroy_local_service( - int dnssd_service, - ) { - return _dnssd_destroy_local_service( - dnssd_service, - ); - } - - late final _dnssd_destroy_local_servicePtr = - _lookup>( - 'dnssd_destroy_local_service'); - late final _dnssd_destroy_local_service = - _dnssd_destroy_local_servicePtr.asFunction(); - - /// @brief Sets the name of DNSSD local service. - /// @details Application should set name after creating local service using - /// dnssd_create_local_service() and before registering the local - /// service using dnssd_register_local_service(). - /// @since_tizen 3.0 - /// @remarks You must pass only local services created using dnssd_create_local_service(). - /// @param[in] local_service The DNSSD local service handle - /// @param[in] service_name The name of DNSSD local service - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - /// @see dnssd_create_local_service() - /// @pre This API needs dnssd_create_local_service() before use. - int dnssd_service_set_name( - int local_service, - ffi.Pointer service_name, - ) { - return _dnssd_service_set_name( - local_service, - service_name, - ); - } - - late final _dnssd_service_set_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(dnssd_service_h, - ffi.Pointer)>>('dnssd_service_set_name'); - late final _dnssd_service_set_name = _dnssd_service_set_namePtr - .asFunction)>(); - - /// @brief Sets the port number of DNSSD local service. - /// @details Application should set port after creating local service using - /// dnssd_create_local_service() and before registering the local - /// service using dnssd_register_local_service(). - /// @since_tizen 3.0 - /// @remarks You must pass only local services created using dnssd_create_local_service(). - /// @param[in] local_service The DNSSD local service handle - /// @param[in] port The port number of DNSSD local service - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - /// @see dnssd_create_local_service() - /// @pre This API needs dnssd_create_local_service() before use. - int dnssd_service_set_port( - int local_service, - int port, - ) { - return _dnssd_service_set_port( - local_service, - port, - ); - } - - late final _dnssd_service_set_portPtr = - _lookup>( - 'dnssd_service_set_port'); - late final _dnssd_service_set_port = - _dnssd_service_set_portPtr.asFunction(); - - /// @brief Adds the TXT record. - /// @details TXT record gives additional information about the service. - /// Some services discovered via dnssd_start_browsing_service() may - /// need more than just IP address and port number to completely - /// identify the service instance. For example, A web server typically - /// has multiple pages, each identified by its own URL. - /// So additional data is stored in a TXT record. Check Section 6 of - /// http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt - /// for details. TXT record of known service types can be found at - /// http://www.dns-sd.org/ServiceTypes.html. TXT record is stored in a - /// structured form using key/value pairs. - /// @since_tizen 3.0 - /// @remarks You must pass only local services created using dnssd_create_local_service(). - /// @param[in] local_service The DNSSD local service handle - /// @param[in] key The key of the TXT record. A null-terminated string which only - /// contains printable ASCII values (0x20-0x7E), excluding '=' (0x3D). - /// Keys should be 9 characters or fewer excluding NULL. Keys are case - /// insensitivie. Keys for known service types can be found at - /// http://www.dns-sd.org/ServiceTypes.html. For details, see section - /// 6.4 of http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt. - /// @param[in] length The length of the value of the TXT record in bytes. The - /// total size of a typical DNS-SD TXT record is intended to be small - /// (upto 200 bytes). For details, see section 6.2 of - /// http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt - /// @param[in] value The value of the TXT record. It can be any binary value. For - /// value that represents textual data, UTF-8 is STRONGLY recommended. - /// For value that represents textual data, value_length should NOT - /// include the terminating null (if any) at the end of the string. If - /// NULL, then "key" will be added with no value. If non-NULL but - /// value_length is zero, then "key=" will be added with empty value. - /// For details see section 6.5 of - /// http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_SERVICE_NOT_RUNNING Service Not Running - /// @retval #DNSSD_ERROR_ALREADY_REGISTERED Already Registered - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - /// @retval #DNSSD_ERROR_OUT_OF_MEMORY Out of Memory - /// @see dnssd_create_local_service() - /// @pre This API needs dnssd_create_local_service() before use. - int dnssd_service_add_txt_record( - int local_service, - ffi.Pointer key, - int length, - ffi.Pointer value, - ) { - return _dnssd_service_add_txt_record( - local_service, - key, - length, - value, - ); - } - - late final _dnssd_service_add_txt_recordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - dnssd_service_h, - ffi.Pointer, - ffi.UnsignedShort, - ffi.Pointer)>>('dnssd_service_add_txt_record'); - late final _dnssd_service_add_txt_record = - _dnssd_service_add_txt_recordPtr.asFunction< - int Function( - int, ffi.Pointer, int, ffi.Pointer)>(); - - /// @brief Removes the TXT record. - /// @since_tizen 3.0 - /// @remarks You must pass only local services created using dnssd_create_local_service(). - /// @param[in] local_service The DNSSD local service handle - /// @param[in] key The key of the TXT record to be removed - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_SERVICE_NOT_RUNNING Service Not Running - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - /// @see dnssd_create_local_service() - /// @see dnssd_service_add_txt_record() - /// @pre This API needs dnssd_create_local_service() before use. - int dnssd_service_remove_txt_record( - int local_service, - ffi.Pointer key, - ) { - return _dnssd_service_remove_txt_record( - local_service, - key, - ); - } - - late final _dnssd_service_remove_txt_recordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(dnssd_service_h, - ffi.Pointer)>>('dnssd_service_remove_txt_record'); - late final _dnssd_service_remove_txt_record = - _dnssd_service_remove_txt_recordPtr - .asFunction)>(); - - /// @brief Sets/updates the DNS resource record. - /// @details If the resource record for the type has been previously added using - /// dnssd_service_set_record(), then the record will be updated. DNS - /// resource record can be set only after local_service is registered - /// using dnssd_register_local_service(). Data is added using - /// dnssd_service_add_txt_record() and then obtained using - /// dnssd_service_get_all_txt_record() to pass here. - /// @since_tizen 3.0 - /// @remarks You must pass only local services created using dnssd_create_local_service(). - /// @param[in] local_service The DNSSD local service handle - /// @param[in] type The resource record type. For details see, RFC 1035 and RFC 2782 - /// @param[in] length The length of the resource record in bytes - /// @param[in] data The data contained in resource record to be added - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_OPERATION_FAILED Operation failed - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_SERVICE_NOT_RUNNING Service Not Running - /// @retval #DNSSD_ERROR_ALREADY_REGISTERED Already Registered - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - /// @retval #DNSSD_ERROR_OUT_OF_MEMORY Out of Memory - /// @see dnssd_create_local_service() - /// @pre This API needs dnssd_create_local_service() before use. - int dnssd_service_set_record( - int local_service, - int type, - int length, - ffi.Pointer data, - ) { - return _dnssd_service_set_record( - local_service, - type, - length, - data, - ); - } - - late final _dnssd_service_set_recordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - dnssd_service_h, - ffi.UnsignedShort, - ffi.UnsignedShort, - ffi.Pointer)>>('dnssd_service_set_record'); - late final _dnssd_service_set_record = _dnssd_service_set_recordPtr - .asFunction)>(); - - /// @brief Unsets the DNS resource record. DNS resource record for the given type - /// must be set using dnssd_service_set_record(). - /// @since_tizen 3.0 - /// @remarks You must pass only local services created using dnssd_create_local_service(). - /// @param[in] local_service The DNSSD local service handle - /// @param[in] type The resource record type. For details, see RFC 1035 and RFC 2782 - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_OPERATION_FAILED Operation failed - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_SERVICE_NOT_RUNNING Service Not Running - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - /// @see dnssd_create_local_service() - /// @pre This API needs dnssd_create_local_service() before use. - int dnssd_service_unset_record( - int local_service, - int type, - ) { - return _dnssd_service_unset_record( - local_service, - type, - ); - } - - late final _dnssd_service_unset_recordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(dnssd_service_h, - ffi.UnsignedShort)>>('dnssd_service_unset_record'); - late final _dnssd_service_unset_record = - _dnssd_service_unset_recordPtr.asFunction(); - - /// @brief Registers the DNSSD local service for publishing. - /// @since_tizen 3.0 - /// @remarks You must pass only local services created using dnssd_create_local_service(). - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] local_service The DNSSD local service handle - /// @param[in] register_cb The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_OPERATION_FAILED Operation failed - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_SERVICE_NOT_RUNNING Service Not Running - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - /// @retval #DNSSD_ERROR_PERMISSION_DENIED Permission Denied - /// @see dnssd_create_local_service() - /// @pre This API needs dnssd_create_local_service() before use. - int dnssd_register_local_service( - int local_service, - dnssd_registered_cb register_cb, - ffi.Pointer user_data, - ) { - return _dnssd_register_local_service( - local_service, - register_cb, - user_data, - ); - } - - late final _dnssd_register_local_servicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(dnssd_service_h, dnssd_registered_cb, - ffi.Pointer)>>('dnssd_register_local_service'); - late final _dnssd_register_local_service = - _dnssd_register_local_servicePtr.asFunction< - int Function(int, dnssd_registered_cb, ffi.Pointer)>(); - - /// @brief Deregisters the DNSSD local service. - /// @since_tizen 3.0 - /// @remarks You must pass only local services registered using dnssd_register_local_service(). - /// @param[in] local_service The DNSSD local service handle - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_SERVICE_NOT_RUNNING Service Not Running - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - /// @see dnssd_create_local_service() - /// @see dnssd_register_local_service() - /// @pre This API needs dnssd_register_local_service() before use. - int dnssd_deregister_local_service( - int local_service, - ) { - return _dnssd_deregister_local_service( - local_service, - ); - } - - late final _dnssd_deregister_local_servicePtr = - _lookup>( - 'dnssd_deregister_local_service'); - late final _dnssd_deregister_local_service = - _dnssd_deregister_local_servicePtr.asFunction(); - - /// @brief Starts browsing the DNSSD remote service. - /// @details found_cb would be called only if there are any services available of - /// service_type provided in the argument. Application will keep - /// browsing for available/unavailable services until it calls - /// dnssd_stop_browsing_service(). - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] service_type The DNSSD service type to browse. It is expressed - /// as type followed by protocol, separated by a dot(e.g. "_ftp._tcp"). - /// It must begin with an underscore, followed by 1-15 characters - /// which may be letters, digits, or hyphens. The transport protocol - /// must be "_tcp" or "_udp". New service types should be registered - /// at http://www.dns-sd.org/ServiceTypes.html - /// @param[out] dnssd_service The DNSSD browse service handle - /// @param[in] found_cb The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_SERVICE_NOT_RUNNING Service Not Running - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - /// @retval #DNSSD_ERROR_PERMISSION_DENIED Permission Denied - /// @pre This API needs dnssd_initialize() before use. - int dnssd_start_browsing_service( - ffi.Pointer service_type, - ffi.Pointer dnssd_service, - dnssd_found_cb found_cb, - ffi.Pointer user_data, - ) { - return _dnssd_start_browsing_service( - service_type, - dnssd_service, - found_cb, - user_data, - ); - } - - late final _dnssd_start_browsing_servicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - dnssd_found_cb, - ffi.Pointer)>>('dnssd_start_browsing_service'); - late final _dnssd_start_browsing_service = - _dnssd_start_browsing_servicePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - dnssd_found_cb, ffi.Pointer)>(); - - /// @brief Stops browsing the DNSSD remote service. - /// @since_tizen 3.0 - /// @param[in] dnssd_service The DNSSD browse service handle returned by - /// dnssd_start_browsing_service() - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_SERVICE_NOT_RUNNING Service Not Running - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - /// @pre This API needs dnssd_start_browsing_service() before use. - int dnssd_stop_browsing_service( - int dnssd_service, - ) { - return _dnssd_stop_browsing_service( - dnssd_service, - ); - } - - late final _dnssd_stop_browsing_servicePtr = - _lookup>( - 'dnssd_stop_browsing_service'); - late final _dnssd_stop_browsing_service = - _dnssd_stop_browsing_servicePtr.asFunction(); - - /// @brief Gets the type of DNSSD local/remote service. - /// @since_tizen 3.0 - /// @remarks You must release @a service_type using free(). - /// @param[in] dnssd_service The DNSSD local/remote service handle - /// @param[out] service_type The type of DNSSD service. It is expressed as type - /// followed by protocol, separated by a dot(e.g. "_ftp._tcp"). It - /// must begin with an underscore, followed by 1-15 characters which - /// may be letters, digits, or hyphens. The transport protocol must be - /// "_tcp" or "_udp". New service types should be registered at - /// http://www.dns-sd.org/ServiceTypes.html - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - int dnssd_service_get_type( - int dnssd_service, - ffi.Pointer> service_type, - ) { - return _dnssd_service_get_type( - dnssd_service, - service_type, - ); - } - - late final _dnssd_service_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(dnssd_service_h, - ffi.Pointer>)>>('dnssd_service_get_type'); - late final _dnssd_service_get_type = _dnssd_service_get_typePtr - .asFunction>)>(); - - /// @brief Gets the name of DNSSD local/remote service. - /// @since_tizen 3.0 - /// @remarks You must release @a service_name using free(). - /// @param[in] dnssd_service The DNSSD local/remote service handle - /// @param[out] service_name The name of DNSSD service - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - int dnssd_service_get_name( - int dnssd_service, - ffi.Pointer> service_name, - ) { - return _dnssd_service_get_name( - dnssd_service, - service_name, - ); - } - - late final _dnssd_service_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(dnssd_service_h, - ffi.Pointer>)>>('dnssd_service_get_name'); - late final _dnssd_service_get_name = _dnssd_service_get_namePtr - .asFunction>)>(); - - /// @brief Gets the IP of DNSSD remote service. - /// @since_tizen 3.0 - /// @remarks You must release @a ip_v4_address, @a ip_v6_address using free(). - /// @param[in] dnssd_service The DNSSD remote service handle - /// @param[out] ip_v4_address The IP version 4 address of DNSSD service. If there - /// is no IPv4 Address, then it would contain NULL and should not be freed - /// @param[out] ip_v6_address The IP version 6 address of DNSSD service. If there - /// is no IPv6 Address, then it would contain NULL and should not be freed - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - int dnssd_service_get_ip( - int dnssd_service, - ffi.Pointer> ip_v4_address, - ffi.Pointer> ip_v6_address, - ) { - return _dnssd_service_get_ip( - dnssd_service, - ip_v4_address, - ip_v6_address, - ); - } - - late final _dnssd_service_get_ipPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(dnssd_service_h, ffi.Pointer>, - ffi.Pointer>)>>('dnssd_service_get_ip'); - late final _dnssd_service_get_ip = _dnssd_service_get_ipPtr.asFunction< - int Function(int, ffi.Pointer>, - ffi.Pointer>)>(); - - /// @brief Gets the port number of DNSSD local/remote service. - /// @since_tizen 3.0 - /// @param[in] dnssd_service The DNSSD service local/remote handle - /// @param[out] port The port number of DNSSD service - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - int dnssd_service_get_port( - int dnssd_service, - ffi.Pointer port, - ) { - return _dnssd_service_get_port( - dnssd_service, - port, - ); - } - - late final _dnssd_service_get_portPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(dnssd_service_h, - ffi.Pointer)>>('dnssd_service_get_port'); - late final _dnssd_service_get_port = _dnssd_service_get_portPtr - .asFunction)>(); - - /// @brief Gets the TXT record. - /// @details TXT record gives additional information about the service. Some - /// services discovered via dnssd_start_browsing_service() may need - /// more than just IP address and port number to completely identify - /// the service instance. For example, a web server typically has - /// multiple pages, each identified by its own URL. So additional data - /// is stored in a TXT record. Check Section 6 of - /// http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt for - /// details. TXT record of known service types can be found at - /// http://www.dns-sd.org/ServiceTypes.html. TXT record is stored in a - /// structured form using key/value pairs. - /// @since_tizen 3.0 - /// @remarks You must release @a value using free(). - /// @param[in] dnssd_service The DNSSD local/remote service handle - /// @param[out] length The length of the value of the TXT record in bytes - /// @param[out] value The value of the TXT record - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #DNSSD_ERROR_SERVICE_NOT_RUNNING Service Not Running - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - int dnssd_service_get_all_txt_record( - int dnssd_service, - ffi.Pointer length, - ffi.Pointer> value, - ) { - return _dnssd_service_get_all_txt_record( - dnssd_service, - length, - value, - ); - } - - late final _dnssd_service_get_all_txt_recordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(dnssd_service_h, ffi.Pointer, - ffi.Pointer>)>>( - 'dnssd_service_get_all_txt_record'); - late final _dnssd_service_get_all_txt_record = - _dnssd_service_get_all_txt_recordPtr.asFunction< - int Function(int, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Creates a new list handle. - /// @since_tizen 3.0 - /// @remarks You must destroy @a list by calling iotcon_list_destroy() if @a list is no longer needed. - /// @param[in] type The type of list - /// @param[out] list A newly allocated list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_list_create( - int type, - ffi.Pointer list, - ) { - return _iotcon_list_create( - type, - list, - ); - } - - late final _iotcon_list_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, ffi.Pointer)>>('iotcon_list_create'); - late final _iotcon_list_create = _iotcon_list_createPtr - .asFunction)>(); - - /// @brief Destroys a list handle. - /// @details Releases a @a list and its internal data. - /// @since_tizen 3.0 - /// @param[in] list The handle to the list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_list_destroy( - iotcon_list_h list, - ) { - return _iotcon_list_destroy( - list, - ); - } - - late final _iotcon_list_destroyPtr = - _lookup>( - 'iotcon_list_destroy'); - late final _iotcon_list_destroy = - _iotcon_list_destroyPtr.asFunction(); - - /// @brief Adds a new element integer value into the list at the given position. - /// @details If @a pos is negative, or is larger than the number of elements in the list, the new value is added on to the end of the list. - /// @since_tizen 3.0 - /// @param[in] list The list handle - /// @param[in] val The new integer value - /// @param[in] pos The position to insert value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_list_add_int( - iotcon_list_h list, - int val, - int pos, - ) { - return _iotcon_list_add_int( - list, - val, - pos, - ); - } - - late final _iotcon_list_add_intPtr = _lookup< - ffi - .NativeFunction>( - 'iotcon_list_add_int'); - late final _iotcon_list_add_int = _iotcon_list_add_intPtr - .asFunction(); - - /// @brief Adds a new element boolean value into the list at the given position. - /// @details If @a pos is negative, or is larger than the number of elements in the list, the new value is added on to the end of the list. - /// @since_tizen 3.0 - /// @param[in] list The list handle - /// @param[in] val The new boolean value - /// @param[in] pos The position to insert value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_list_add_bool( - iotcon_list_h list, - bool val, - int pos, - ) { - return _iotcon_list_add_bool( - list, - val, - pos, - ); - } - - late final _iotcon_list_add_boolPtr = _lookup< - ffi - .NativeFunction>( - 'iotcon_list_add_bool'); - late final _iotcon_list_add_bool = _iotcon_list_add_boolPtr - .asFunction(); - - /// @brief Adds a new element double value into the list at the given position. - /// @details If @a pos is negative, or is larger than the number of elements in the list, the new value is added on to the end of the list. - /// @since_tizen 3.0 - /// @param[in] list The list handle - /// @param[in] val The new double value - /// @param[in] pos The position to insert value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_list_add_double( - iotcon_list_h list, - double val, - int pos, - ) { - return _iotcon_list_add_double( - list, - val, - pos, - ); - } - - late final _iotcon_list_add_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_list_h, ffi.Double, ffi.Int)>>('iotcon_list_add_double'); - late final _iotcon_list_add_double = _iotcon_list_add_doublePtr - .asFunction(); - - /// @brief Adds a new element string value into the list at the given position. - /// @details If @a pos is negative, or is larger than the number of elements in the list, the new value is added on to the end of the list. - /// @since_tizen 3.0 - /// @param[in] list The list handle - /// @param[in] val The new char value - /// @param[in] pos The position to insert value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_list_add_str( - iotcon_list_h list, - ffi.Pointer val, - int pos, - ) { - return _iotcon_list_add_str( - list, - val, - pos, - ); - } - - late final _iotcon_list_add_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, ffi.Pointer, - ffi.Int)>>('iotcon_list_add_str'); - late final _iotcon_list_add_str = _iotcon_list_add_strPtr - .asFunction, int)>(); - - /// @brief Adds a new element byte string value into the list at the given position. - /// @details If @a pos is negative, or is larger than the number of elements in the list, the new value is added on to the end of the list. - /// @since_tizen 3.0 - /// @param[in] list The list handle - /// @param[in] val The new byte string value - /// @param[in] len The length of @a val - /// @param[in] pos The position to insert value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_list_add_byte_str( - iotcon_list_h list, - ffi.Pointer val, - int len, - int pos, - ) { - return _iotcon_list_add_byte_str( - list, - val, - len, - pos, - ); - } - - late final _iotcon_list_add_byte_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, ffi.Pointer, - ffi.Int, ffi.Int)>>('iotcon_list_add_byte_str'); - late final _iotcon_list_add_byte_str = - _iotcon_list_add_byte_strPtr.asFunction< - int Function( - iotcon_list_h, ffi.Pointer, int, int)>(); - - /// @brief Adds a new element list into the list at the given position. - /// @details If @a pos is negative, or is larger than the number of elements in the list, the new value is added on to the end of the list. - /// @since_tizen 3.0 - /// @param[in] list The list handle - /// @param[in] val The new list value - /// @param[in] pos The position to insert value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_list_add_list( - iotcon_list_h list, - iotcon_list_h val, - int pos, - ) { - return _iotcon_list_add_list( - list, - val, - pos, - ); - } - - late final _iotcon_list_add_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_list_h, iotcon_list_h, ffi.Int)>>('iotcon_list_add_list'); - late final _iotcon_list_add_list = _iotcon_list_add_listPtr - .asFunction(); - - /// @brief Adds a new element attributes value into the list at the given position. - /// @details If @a pos is negative, or is larger than the number of elements in the list, the new value is added on to the end of the list. - /// @since_tizen 3.0 - /// @param[in] list The list handle - /// @param[in] val The new attributes value - /// @param[in] pos The position to insert value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_list_add_attributes( - iotcon_list_h list, - iotcon_attributes_h val, - int pos, - ) { - return _iotcon_list_add_attributes( - list, - val, - pos, - ); - } - - late final _iotcon_list_add_attributesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, iotcon_attributes_h, - ffi.Int)>>('iotcon_list_add_attributes'); - late final _iotcon_list_add_attributes = _iotcon_list_add_attributesPtr - .asFunction(); - - /// @brief Gets the integer value at the given position. - /// @details Iterates over the list until it reaches the @a pos-1 position. - /// @since_tizen 3.0 - /// @param[in] list The list handle - /// @param[in] pos The position - /// @param[out] val The integer value to get - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_REPRESENTATION Representation errors - int iotcon_list_get_nth_int( - iotcon_list_h list, - int pos, - ffi.Pointer val, - ) { - return _iotcon_list_get_nth_int( - list, - pos, - val, - ); - } - - late final _iotcon_list_get_nth_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, ffi.Int, - ffi.Pointer)>>('iotcon_list_get_nth_int'); - late final _iotcon_list_get_nth_int = _iotcon_list_get_nth_intPtr - .asFunction)>(); - - /// @brief Gets the boolean value at the given position. - /// @details Iterates over the list until it reaches the @a pos-1 position. - /// @since_tizen 3.0 - /// @param[in] list The list handle - /// @param[in] pos The position - /// @param[out] val The boolean value to get - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_REPRESENTATION Representation errors - int iotcon_list_get_nth_bool( - iotcon_list_h list, - int pos, - ffi.Pointer val, - ) { - return _iotcon_list_get_nth_bool( - list, - pos, - val, - ); - } - - late final _iotcon_list_get_nth_boolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, ffi.Int, - ffi.Pointer)>>('iotcon_list_get_nth_bool'); - late final _iotcon_list_get_nth_bool = _iotcon_list_get_nth_boolPtr - .asFunction)>(); - - /// @brief Gets the double value at the given position. - /// @details Iterates over the list until it reaches the @a pos-1 position. - /// @since_tizen 3.0 - /// @param[in] list The list handle - /// @param[in] pos The position - /// @param[out] val The double value to get - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_REPRESENTATION Representation errors - int iotcon_list_get_nth_double( - iotcon_list_h list, - int pos, - ffi.Pointer val, - ) { - return _iotcon_list_get_nth_double( - list, - pos, - val, - ); - } - - late final _iotcon_list_get_nth_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, ffi.Int, - ffi.Pointer)>>('iotcon_list_get_nth_double'); - late final _iotcon_list_get_nth_double = _iotcon_list_get_nth_doublePtr - .asFunction)>(); - - /// @brief Gets the string value at the given position. - /// @details Iterates over the list until it reaches the @a pos-1 position. - /// @since_tizen 3.0 - /// @remarks @a val must not be released using free(). - /// @param[in] list The list handle - /// @param[in] pos The position - /// @param[out] val The string value to get - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_REPRESENTATION Representation errors - int iotcon_list_get_nth_str( - iotcon_list_h list, - int pos, - ffi.Pointer> val, - ) { - return _iotcon_list_get_nth_str( - list, - pos, - val, - ); - } - - late final _iotcon_list_get_nth_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, ffi.Int, - ffi.Pointer>)>>('iotcon_list_get_nth_str'); - late final _iotcon_list_get_nth_str = _iotcon_list_get_nth_strPtr.asFunction< - int Function(iotcon_list_h, int, ffi.Pointer>)>(); - - /// @brief Gets the string value at the given position. - /// @details Iterates over the list until it reaches the @a pos-1 position. - /// @since_tizen 3.0 - /// @remarks @a val must not be released using free(). - /// @param[in] list The list handle - /// @param[in] pos The position - /// @param[out] val The byte string value to get - /// @param[out] len The length of the @a val - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_REPRESENTATION Representation errors - int iotcon_list_get_nth_byte_str( - iotcon_list_h list, - int pos, - ffi.Pointer> val, - ffi.Pointer len, - ) { - return _iotcon_list_get_nth_byte_str( - list, - pos, - val, - len, - ); - } - - late final _iotcon_list_get_nth_byte_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_list_h, - ffi.Int, - ffi.Pointer>, - ffi.Pointer)>>('iotcon_list_get_nth_byte_str'); - late final _iotcon_list_get_nth_byte_str = - _iotcon_list_get_nth_byte_strPtr.asFunction< - int Function( - iotcon_list_h, - int, - ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Gets the list value at the given position. - /// @details Iterates over the list until it reaches the @a pos-1 position. - /// @since_tizen 3.0 - /// @remarks @a dest must not be released using iotcon_list_destroy(). - /// @param[in] src The list handle - /// @param[in] pos The position - /// @param[out] dest The list value to get - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_REPRESENTATION Representation errors - int iotcon_list_get_nth_list( - iotcon_list_h src, - int pos, - ffi.Pointer dest, - ) { - return _iotcon_list_get_nth_list( - src, - pos, - dest, - ); - } - - late final _iotcon_list_get_nth_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, ffi.Int, - ffi.Pointer)>>('iotcon_list_get_nth_list'); - late final _iotcon_list_get_nth_list = - _iotcon_list_get_nth_listPtr.asFunction< - int Function(iotcon_list_h, int, ffi.Pointer)>(); - - /// @brief Gets the attributes value at the given position. - /// @details Iterates over the list until it reaches the @a pos-1 position. - /// @since_tizen 3.0 - /// @remarks @a attributes must not be released using iotcon_attributes_destroy(). - /// @param[in] list The list handle - /// @param[in] pos The position - /// @param[out] attributes The attributes value to get - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_REPRESENTATION Representation errors - int iotcon_list_get_nth_attributes( - iotcon_list_h list, - int pos, - ffi.Pointer attributes, - ) { - return _iotcon_list_get_nth_attributes( - list, - pos, - attributes, - ); - } - - late final _iotcon_list_get_nth_attributesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_list_h, ffi.Int, ffi.Pointer)>>( - 'iotcon_list_get_nth_attributes'); - late final _iotcon_list_get_nth_attributes = - _iotcon_list_get_nth_attributesPtr.asFunction< - int Function(iotcon_list_h, int, ffi.Pointer)>(); - - /// @brief Removes the value at the given position. - /// @details Iterates over the list until it reaches the @a pos-1 position. - /// @since_tizen 3.0 - /// @param[in] list The list handle - /// @param[in] pos The position to delete - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - int iotcon_list_remove_nth( - iotcon_list_h list, - int pos, - ) { - return _iotcon_list_remove_nth( - list, - pos, - ); - } - - late final _iotcon_list_remove_nthPtr = - _lookup>( - 'iotcon_list_remove_nth'); - late final _iotcon_list_remove_nth = - _iotcon_list_remove_nthPtr.asFunction(); - - /// @brief Gets the type of the list. - /// @details It gets the data type of value related to the @a key in @a attributes. - /// The data type could be one of #iotcon_type_e. - /// @since_tizen 3.0 - /// @param[in] list The list handle - /// @param[out] type The data type of list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_list_get_type( - iotcon_list_h list, - ffi.Pointer type, - ) { - return _iotcon_list_get_type( - list, - type, - ); - } - - late final _iotcon_list_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_list_h, ffi.Pointer)>>('iotcon_list_get_type'); - late final _iotcon_list_get_type = _iotcon_list_get_typePtr - .asFunction)>(); - - /// @brief Gets the number of elements in a list. - /// @since_tizen 3.0 - /// @param[in] list The handle to the list - /// @param[out] length The length of list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_list_get_length( - iotcon_list_h list, - ffi.Pointer length, - ) { - return _iotcon_list_get_length( - list, - length, - ); - } - - late final _iotcon_list_get_lengthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, - ffi.Pointer)>>('iotcon_list_get_length'); - late final _iotcon_list_get_length = _iotcon_list_get_lengthPtr - .asFunction)>(); - - /// @brief Gets all integer values of the given list by invoking the callback function. - /// @details iotcon_list_int_cb() will be called for each child. - /// @since_tizen 3.0 - /// @param[in] list The handle to the list - /// @param[in] cb The callback function to get each integer value - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @post iotcon_list_int_cb() will be called for each item. - /// @see iotcon_list_int_cb() - int iotcon_list_foreach_int( - iotcon_list_h list, - iotcon_list_int_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_list_foreach_int( - list, - cb, - user_data, - ); - } - - late final _iotcon_list_foreach_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, iotcon_list_int_cb, - ffi.Pointer)>>('iotcon_list_foreach_int'); - late final _iotcon_list_foreach_int = _iotcon_list_foreach_intPtr.asFunction< - int Function(iotcon_list_h, iotcon_list_int_cb, ffi.Pointer)>(); - - /// @brief Gets all boolean values of the given list by invoking the callback function. - /// @details iotcon_list_bool_cb() will be called for each child. - /// @since_tizen 3.0 - /// @param[in] list The handle to the list - /// @param[in] cb The callback function to get each boolean value - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @post iotcon_list_bool_cb() will be called for each item. - /// @see iotcon_list_bool_cb() - int iotcon_list_foreach_bool( - iotcon_list_h list, - iotcon_list_bool_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_list_foreach_bool( - list, - cb, - user_data, - ); - } - - late final _iotcon_list_foreach_boolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, iotcon_list_bool_cb, - ffi.Pointer)>>('iotcon_list_foreach_bool'); - late final _iotcon_list_foreach_bool = - _iotcon_list_foreach_boolPtr.asFunction< - int Function( - iotcon_list_h, iotcon_list_bool_cb, ffi.Pointer)>(); - - /// @brief Gets all double values of the given list by invoking the callback function. - /// @details iotcon_list_double_cb() will be called for each child. - /// @since_tizen 3.0 - /// @param[in] list The handle to the list - /// @param[in] cb The callback function to get each double value - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @post iotcon_list_double_cb() will be called for each item. - /// @see iotcon_list_double_cb() - int iotcon_list_foreach_double( - iotcon_list_h list, - iotcon_list_double_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_list_foreach_double( - list, - cb, - user_data, - ); - } - - late final _iotcon_list_foreach_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, iotcon_list_double_cb, - ffi.Pointer)>>('iotcon_list_foreach_double'); - late final _iotcon_list_foreach_double = - _iotcon_list_foreach_doublePtr.asFunction< - int Function( - iotcon_list_h, iotcon_list_double_cb, ffi.Pointer)>(); - - /// @brief Gets all string values of the given list by invoking the callback function. - /// @details iotcon_list_byte_str_cb() will be called for each child. - /// @since_tizen 3.0 - /// @param[in] list The handle to the list - /// @param[in] cb The callback function to get each string value - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @post iotcon_list_byte_str_cb() will be called for each item. - /// @see iotcon_list_byte_str_cb() - int iotcon_list_foreach_byte_str( - iotcon_list_h list, - iotcon_list_byte_str_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_list_foreach_byte_str( - list, - cb, - user_data, - ); - } - - late final _iotcon_list_foreach_byte_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, iotcon_list_byte_str_cb, - ffi.Pointer)>>('iotcon_list_foreach_byte_str'); - late final _iotcon_list_foreach_byte_str = - _iotcon_list_foreach_byte_strPtr.asFunction< - int Function( - iotcon_list_h, iotcon_list_byte_str_cb, ffi.Pointer)>(); - - /// @brief Gets all string values of the given list by invoking the callback function. - /// @details iotcon_list_str_cb() will be called for each child. - /// @since_tizen 3.0 - /// @param[in] list The handle to the list - /// @param[in] cb The callback function to get each string value - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @post iotcon_list_str_cb() will be called for each item. - /// @see iotcon_list_str_cb() - int iotcon_list_foreach_str( - iotcon_list_h list, - iotcon_list_str_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_list_foreach_str( - list, - cb, - user_data, - ); - } - - late final _iotcon_list_foreach_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, iotcon_list_str_cb, - ffi.Pointer)>>('iotcon_list_foreach_str'); - late final _iotcon_list_foreach_str = _iotcon_list_foreach_strPtr.asFunction< - int Function(iotcon_list_h, iotcon_list_str_cb, ffi.Pointer)>(); - - /// @brief Gets all sub lists of the given list by invoking the callback function. - /// @details iotcon_list_list_cb() will be called for each child. - /// @since_tizen 3.0 - /// @param[in] list The handle to the origin list - /// @param[in] cb The callback function to get each sub list - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @post iotcon_list_list_cb() will be called for each item. - /// @see iotcon_list_list_cb() - int iotcon_list_foreach_list( - iotcon_list_h list, - iotcon_list_list_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_list_foreach_list( - list, - cb, - user_data, - ); - } - - late final _iotcon_list_foreach_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, iotcon_list_list_cb, - ffi.Pointer)>>('iotcon_list_foreach_list'); - late final _iotcon_list_foreach_list = - _iotcon_list_foreach_listPtr.asFunction< - int Function( - iotcon_list_h, iotcon_list_list_cb, ffi.Pointer)>(); - - /// @brief Gets all attributes of the given list by invoking the callback function. - /// @details iotcon_list_attributes_cb() will be called for each child. - /// @since_tizen 3.0 - /// @param[in] list The handle to the list - /// @param[in] cb The callback function to get each attributes - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @post iotcon_list_attributes_cb() will be called for each item. - /// @see iotcon_list_attributes_cb() - int iotcon_list_foreach_attributes( - iotcon_list_h list, - iotcon_list_attributes_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_list_foreach_attributes( - list, - cb, - user_data, - ); - } - - late final _iotcon_list_foreach_attributesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, iotcon_list_attributes_cb, - ffi.Pointer)>>('iotcon_list_foreach_attributes'); - late final _iotcon_list_foreach_attributes = - _iotcon_list_foreach_attributesPtr.asFunction< - int Function(iotcon_list_h, iotcon_list_attributes_cb, - ffi.Pointer)>(); - - /// @brief Creates a new query handle. - /// @since_tizen 3.0 - /// @remarks You must destroy @a query by calling iotcon_query_destroy() if @a query is no longer needed. - /// @param[out] query A newly allocated query handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_query_destroy() - /// @see iotcon_query_add() - /// @see iotcon_query_remove() - /// @see iotcon_query_lookup() - int iotcon_query_create( - ffi.Pointer query, - ) { - return _iotcon_query_create( - query, - ); - } - - late final _iotcon_query_createPtr = _lookup< - ffi.NativeFunction)>>( - 'iotcon_query_create'); - late final _iotcon_query_create = _iotcon_query_createPtr - .asFunction)>(); - - /// @brief Destroys a query handle. - /// @since_tizen 3.0 - /// @param[in] query The handle of the query - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_query_create() - /// @see iotcon_query_add() - /// @see iotcon_query_remove() - /// @see iotcon_query_lookup() - int iotcon_query_destroy( - iotcon_query_h query, - ) { - return _iotcon_query_destroy( - query, - ); - } - - late final _iotcon_query_destroyPtr = - _lookup>( - 'iotcon_query_destroy'); - late final _iotcon_query_destroy = - _iotcon_query_destroyPtr.asFunction(); - - /// @brief Gets resource type from the query. - /// @since_tizen 3.0 - /// @remarks @a resource_type must not be released using free(). - /// @a resource_type must start with a lowercase alphabetic character, followed by a sequence - /// of lowercase alphabetic, numeric, ".", or "-" characters, and contains no white space. - /// @param[in] query The handle of the query - /// @param[out] resource_type Found resource type from query - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @see iotcon_query_create() - /// @see iotcon_query_destroy() - /// @see iotcon_query_add() - /// @see iotcon_query_remove() - /// @see iotcon_query_set_resource_type() - int iotcon_query_get_resource_type( - iotcon_query_h query, - ffi.Pointer> resource_type, - ) { - return _iotcon_query_get_resource_type( - query, - resource_type, - ); - } - - late final _iotcon_query_get_resource_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_query_h, ffi.Pointer>)>>( - 'iotcon_query_get_resource_type'); - late final _iotcon_query_get_resource_type = - _iotcon_query_get_resource_typePtr.asFunction< - int Function(iotcon_query_h, ffi.Pointer>)>(); - - /// @brief Gets resource interface from the query. - /// @since_tizen 3.0 - /// @remarks @a resource_iface could be a value such as #IOTCON_INTERFACE_DEFAULT. - /// @remarks @a resource_iface must not be released using free(). - /// @param[in] query The handle of the query - /// @param[out] resource_iface Found resource interface from query - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @see iotcon_query_create() - /// @see iotcon_query_destroy() - /// @see iotcon_query_add() - /// @see iotcon_query_remove() - /// @see iotcon_query_set_interface() - int iotcon_query_get_interface( - iotcon_query_h query, - ffi.Pointer> resource_iface, - ) { - return _iotcon_query_get_interface( - query, - resource_iface, - ); - } - - late final _iotcon_query_get_interfacePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_query_h, ffi.Pointer>)>>( - 'iotcon_query_get_interface'); - late final _iotcon_query_get_interface = - _iotcon_query_get_interfacePtr.asFunction< - int Function(iotcon_query_h, ffi.Pointer>)>(); - - /// @brief Sets the resource type into the query. - /// @since_tizen 3.0 - /// @param[in] query The handle of the query - /// @param[in] resource_type The resource type to set into the query - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_query_create() - /// @see iotcon_query_destroy() - /// @see iotcon_query_add() - /// @see iotcon_query_remove() - /// @see iotcon_query_lookup() - /// @see iotcon_query_get_resource_type() - int iotcon_query_set_resource_type( - iotcon_query_h query, - ffi.Pointer resource_type, - ) { - return _iotcon_query_set_resource_type( - query, - resource_type, - ); - } - - late final _iotcon_query_set_resource_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_query_h, - ffi.Pointer)>>('iotcon_query_set_resource_type'); - late final _iotcon_query_set_resource_type = - _iotcon_query_set_resource_typePtr - .asFunction)>(); - - /// @brief Sets the resource interface into the query. - /// @since_tizen 3.0 - /// @remarks @a resource_iface could be a value such as #IOTCON_INTERFACE_DEFAULT. - /// @param[in] query The handle of the query - /// @param[in] resource_iface The resource interface to add into the query - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_query_create() - /// @see iotcon_query_destroy() - /// @see iotcon_query_add() - /// @see iotcon_query_remove() - /// @see iotcon_query_lookup() - /// @see iotcon_query_get_interface() - int iotcon_query_set_interface( - iotcon_query_h query, - ffi.Pointer resource_iface, - ) { - return _iotcon_query_set_interface( - query, - resource_iface, - ); - } - - late final _iotcon_query_set_interfacePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_query_h, - ffi.Pointer)>>('iotcon_query_set_interface'); - late final _iotcon_query_set_interface = _iotcon_query_set_interfacePtr - .asFunction)>(); - - /// @brief Adds a new key and corresponding value into the query. - /// @since_tizen 3.0 - /// @remarks The full length of query should be less than or equal to 64. - /// @param[in] query The handle of the query - /// @param[in] key The key of the query to insert - /// @param[in] value The string data to insert into the query - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_query_create() - /// @see iotcon_query_destroy() - /// @see iotcon_query_remove() - /// @see iotcon_query_lookup() - int iotcon_query_add( - iotcon_query_h query, - ffi.Pointer key, - ffi.Pointer value, - ) { - return _iotcon_query_add( - query, - key, - value, - ); - } - - late final _iotcon_query_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_query_h, ffi.Pointer, - ffi.Pointer)>>('iotcon_query_add'); - late final _iotcon_query_add = _iotcon_query_addPtr.asFunction< - int Function( - iotcon_query_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Removes the key and its associated value from the query. - /// @since_tizen 3.0 - /// @param[in] query The handle of the query - /// @param[in] key The key of the option to delete - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_query_create() - /// @see iotcon_query_destroy() - /// @see iotcon_query_add() - /// @see iotcon_query_lookup() - int iotcon_query_remove( - iotcon_query_h query, - ffi.Pointer key, - ) { - return _iotcon_query_remove( - query, - key, - ); - } - - late final _iotcon_query_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_query_h, ffi.Pointer)>>('iotcon_query_remove'); - late final _iotcon_query_remove = _iotcon_query_removePtr - .asFunction)>(); - - /// @brief Looks up data at the given key from the query. - /// @since_tizen 3.0 - /// @remarks @a data must not be released using free(). - /// @param[in] query The handle of the query - /// @param[in] key The key of the query to lookup - /// @param[out] data Found data from query - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_query_create() - /// @see iotcon_query_destroy() - /// @see iotcon_query_add() - /// @see iotcon_query_remove() - int iotcon_query_lookup( - iotcon_query_h query, - ffi.Pointer key, - ffi.Pointer> data, - ) { - return _iotcon_query_lookup( - query, - key, - data, - ); - } - - late final _iotcon_query_lookupPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_query_h, ffi.Pointer, - ffi.Pointer>)>>('iotcon_query_lookup'); - late final _iotcon_query_lookup = _iotcon_query_lookupPtr.asFunction< - int Function(iotcon_query_h, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets all data of the query by invoking the callback function. - /// @details iotcon_query_foreach_cb() will be called for each query. \n - /// If iotcon_query_foreach_cb() returns false, iteration will be stopped. - /// @since_tizen 3.0 - /// @param[in] query The handle of the query - /// @param[in] cb The callback function to get data - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @post iotcon_query_foreach_cb() will be called for each query. - /// @see iotcon_query_foreach_cb() - int iotcon_query_foreach( - iotcon_query_h query, - iotcon_query_foreach_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_query_foreach( - query, - cb, - user_data, - ); - } - - late final _iotcon_query_foreachPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_query_h, iotcon_query_foreach_cb, - ffi.Pointer)>>('iotcon_query_foreach'); - late final _iotcon_query_foreach = _iotcon_query_foreachPtr.asFunction< - int Function( - iotcon_query_h, iotcon_query_foreach_cb, ffi.Pointer)>(); - - /// @brief Creates a new attributes handle. - /// @since_tizen 3.0 - /// @remarks You must destroy @a attributes by calling iotcon_attributes_destroy() if @a attributes is no longer needed. - /// @param[out] attributes A newly allocated attributes handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_attributes_destroy() - int iotcon_attributes_create( - ffi.Pointer attributes, - ) { - return _iotcon_attributes_create( - attributes, - ); - } - - late final _iotcon_attributes_createPtr = _lookup< - ffi - .NativeFunction)>>( - 'iotcon_attributes_create'); - late final _iotcon_attributes_create = _iotcon_attributes_createPtr - .asFunction)>(); - - /// @brief Destroys the attributes. - /// @details Releases @a attributes and its internal data. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle to free - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_attributes_create() - int iotcon_attributes_destroy( - iotcon_attributes_h attributes, - ) { - return _iotcon_attributes_destroy( - attributes, - ); - } - - late final _iotcon_attributes_destroyPtr = - _lookup>( - 'iotcon_attributes_destroy'); - late final _iotcon_attributes_destroy = _iotcon_attributes_destroyPtr - .asFunction(); - - /// @brief Clones the attributes handle. - /// @since_tizen 3.0 - /// @remarks You must destroy @a attributes_clone by calling iotcon_attributes_destroy() if @a attributes_clone is no longer needed. - /// @param[in] attributes The attributes handle - /// @param[out] attributes_clone The cloned attributes handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_attributes_create() - /// @see iotcon_attributes_destroy() - int iotcon_attributes_clone( - iotcon_attributes_h attributes, - ffi.Pointer attributes_clone, - ) { - return _iotcon_attributes_clone( - attributes, - attributes_clone, - ); - } - - late final _iotcon_attributes_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, - ffi.Pointer)>>('iotcon_attributes_clone'); - late final _iotcon_attributes_clone = _iotcon_attributes_clonePtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer)>(); - - /// @brief Adds a new key and integer value into the attributes. - /// @details If @a key is already exists, current value will be replaced with new @a val. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[in] val The value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_attributes_add_int( - iotcon_attributes_h attributes, - ffi.Pointer key, - int val, - ) { - return _iotcon_attributes_add_int( - attributes, - key, - val, - ); - } - - late final _iotcon_attributes_add_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Int)>>('iotcon_attributes_add_int'); - late final _iotcon_attributes_add_int = - _iotcon_attributes_add_intPtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, int)>(); - - /// @brief Adds a new key and boolean value into the attributes. - /// @details If @a key is already exists, current value will be replaced with new @a val. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[in] val The value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_attributes_add_bool( - iotcon_attributes_h attributes, - ffi.Pointer key, - bool val, - ) { - return _iotcon_attributes_add_bool( - attributes, - key, - val, - ); - } - - late final _iotcon_attributes_add_boolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Bool)>>('iotcon_attributes_add_bool'); - late final _iotcon_attributes_add_bool = - _iotcon_attributes_add_boolPtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, bool)>(); - - /// @brief Adds a new key and double value into the attributes. - /// @details If @a key is already exists, current value will be replaced with new @a val. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[in] val The value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_attributes_add_double( - iotcon_attributes_h attributes, - ffi.Pointer key, - double val, - ) { - return _iotcon_attributes_add_double( - attributes, - key, - val, - ); - } - - late final _iotcon_attributes_add_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Double)>>('iotcon_attributes_add_double'); - late final _iotcon_attributes_add_double = - _iotcon_attributes_add_doublePtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, double)>(); - - /// @brief Adds a new key and string value into the attributes. - /// @details If @a key is already exists, current value will be replaced with new @a val. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[in] val The value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_attributes_add_str( - iotcon_attributes_h attributes, - ffi.Pointer key, - ffi.Pointer val, - ) { - return _iotcon_attributes_add_str( - attributes, - key, - val, - ); - } - - late final _iotcon_attributes_add_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>>('iotcon_attributes_add_str'); - late final _iotcon_attributes_add_str = - _iotcon_attributes_add_strPtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Adds a new key and byte string value into the attributes. - /// @details If @a key is already exists, current value will be replaced with new @a val. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[in] val The value - /// @param[in] len The length of @a val - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_attributes_add_byte_str( - iotcon_attributes_h attributes, - ffi.Pointer key, - ffi.Pointer val, - int len, - ) { - return _iotcon_attributes_add_byte_str( - attributes, - key, - val, - len, - ); - } - - late final _iotcon_attributes_add_byte_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_attributes_h, - ffi.Pointer, - ffi.Pointer, - ffi.Int)>>('iotcon_attributes_add_byte_str'); - late final _iotcon_attributes_add_byte_str = - _iotcon_attributes_add_byte_strPtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer, int)>(); - - /// @brief Adds a new key and list value into the attributes. - /// @details If @a key already exists, current list will be replaced with new @a list. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[in] list The value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_attributes_add_list( - iotcon_attributes_h attributes, - ffi.Pointer key, - iotcon_list_h list, - ) { - return _iotcon_attributes_add_list( - attributes, - key, - list, - ); - } - - late final _iotcon_attributes_add_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - iotcon_list_h)>>('iotcon_attributes_add_list'); - late final _iotcon_attributes_add_list = - _iotcon_attributes_add_listPtr.asFunction< - int Function( - iotcon_attributes_h, ffi.Pointer, iotcon_list_h)>(); - - /// @brief Adds a new key and attributes value into the attributes. - /// @details If @a key already exists, current attributes will be replaced with new @a src. - /// @since_tizen 3.0 - /// @param[in] dest The attributes handle - /// @param[in] key The key - /// @param[in] src The attributes handle to set newly - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_attributes_add_attributes( - iotcon_attributes_h dest, - ffi.Pointer key, - iotcon_attributes_h src, - ) { - return _iotcon_attributes_add_attributes( - dest, - key, - src, - ); - } - - late final _iotcon_attributes_add_attributesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - iotcon_attributes_h)>>('iotcon_attributes_add_attributes'); - late final _iotcon_attributes_add_attributes = - _iotcon_attributes_add_attributesPtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, - iotcon_attributes_h)>(); - - /// @brief Adds a new key with NULL value into the attributes. - /// @details If @a key already exists, current value will be replaced with NULL. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] key The key to be set NULL - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_attributes_add_null( - iotcon_attributes_h attributes, - ffi.Pointer key, - ) { - return _iotcon_attributes_add_null( - attributes, - key, - ); - } - - late final _iotcon_attributes_add_nullPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, - ffi.Pointer)>>('iotcon_attributes_add_null'); - late final _iotcon_attributes_add_null = _iotcon_attributes_add_nullPtr - .asFunction)>(); - - /// @brief Gets the integer value from the given key. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[out] val The integer value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_attributes_get_int( - iotcon_attributes_h attributes, - ffi.Pointer key, - ffi.Pointer val, - ) { - return _iotcon_attributes_get_int( - attributes, - key, - val, - ); - } - - late final _iotcon_attributes_get_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>>('iotcon_attributes_get_int'); - late final _iotcon_attributes_get_int = - _iotcon_attributes_get_intPtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the boolean value from the given key. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[out] val The boolean value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_attributes_get_bool( - iotcon_attributes_h attributes, - ffi.Pointer key, - ffi.Pointer val, - ) { - return _iotcon_attributes_get_bool( - attributes, - key, - val, - ); - } - - late final _iotcon_attributes_get_boolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>>('iotcon_attributes_get_bool'); - late final _iotcon_attributes_get_bool = - _iotcon_attributes_get_boolPtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the double value from the given key. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[out] val The double value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_attributes_get_double( - iotcon_attributes_h attributes, - ffi.Pointer key, - ffi.Pointer val, - ) { - return _iotcon_attributes_get_double( - attributes, - key, - val, - ); - } - - late final _iotcon_attributes_get_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>>('iotcon_attributes_get_double'); - late final _iotcon_attributes_get_double = - _iotcon_attributes_get_doublePtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the string value from the given key. - /// @since_tizen 3.0 - /// @remarks @a val must not be released using free(). - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[out] val The string value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_attributes_get_str( - iotcon_attributes_h attributes, - ffi.Pointer key, - ffi.Pointer> val, - ) { - return _iotcon_attributes_get_str( - attributes, - key, - val, - ); - } - - late final _iotcon_attributes_get_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer>)>>( - 'iotcon_attributes_get_str'); - late final _iotcon_attributes_get_str = - _iotcon_attributes_get_strPtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets the byte string value from the given key. - /// @since_tizen 3.0 - /// @remarks @a val must not be released using free(). - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[out] val The byte string value - /// @param[out] len The length of @a val - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_attributes_get_byte_str( - iotcon_attributes_h attributes, - ffi.Pointer key, - ffi.Pointer> val, - ffi.Pointer len, - ) { - return _iotcon_attributes_get_byte_str( - attributes, - key, - val, - len, - ); - } - - late final _iotcon_attributes_get_byte_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_attributes_h, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('iotcon_attributes_get_byte_str'); - late final _iotcon_attributes_get_byte_str = - _iotcon_attributes_get_byte_strPtr.asFunction< - int Function( - iotcon_attributes_h, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Gets the list value from the given key. - /// @since_tizen 3.0 - /// @remarks @a list must not be released using iotcon_list_destroy(). - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[out] list The list value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_attributes_get_list( - iotcon_attributes_h attributes, - ffi.Pointer key, - ffi.Pointer list, - ) { - return _iotcon_attributes_get_list( - attributes, - key, - list, - ); - } - - late final _iotcon_attributes_get_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>>('iotcon_attributes_get_list'); - late final _iotcon_attributes_get_list = - _iotcon_attributes_get_listPtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the attributes value from the given key. - /// @since_tizen 3.0 - /// @remarks @a attributes must not be released using iotcon_attributes_destroy(). - /// @param[in] src The attributes handle - /// @param[in] key The key - /// @param[out] dest The attributes value at the key - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_attributes_get_attributes( - iotcon_attributes_h src, - ffi.Pointer key, - ffi.Pointer dest, - ) { - return _iotcon_attributes_get_attributes( - src, - key, - dest, - ); - } - - late final _iotcon_attributes_get_attributesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>>( - 'iotcon_attributes_get_attributes'); - late final _iotcon_attributes_get_attributes = - _iotcon_attributes_get_attributesPtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Checks whether the value of given key is NULL or not. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[out] is_null true if the type of the given key is null, - /// otherwise false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_attributes_is_null( - iotcon_attributes_h attributes, - ffi.Pointer key, - ffi.Pointer is_null, - ) { - return _iotcon_attributes_is_null( - attributes, - key, - is_null, - ); - } - - late final _iotcon_attributes_is_nullPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>>('iotcon_attributes_is_null'); - late final _iotcon_attributes_is_null = - _iotcon_attributes_is_nullPtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Removes the key and its associated value from the attributes. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - int iotcon_attributes_remove( - iotcon_attributes_h attributes, - ffi.Pointer key, - ) { - return _iotcon_attributes_remove( - attributes, - key, - ); - } - - late final _iotcon_attributes_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, - ffi.Pointer)>>('iotcon_attributes_remove'); - late final _iotcon_attributes_remove = _iotcon_attributes_removePtr - .asFunction)>(); - - /// @brief Gets the type of a value at the given key. - /// @details It gets the data type of value related to the @a key in @a attributes. - /// The data type could be one of #iotcon_type_e. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[out] type The data type of value related to the key in attributes handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - int iotcon_attributes_get_type( - iotcon_attributes_h attributes, - ffi.Pointer key, - ffi.Pointer type, - ) { - return _iotcon_attributes_get_type( - attributes, - key, - type, - ); - } - - late final _iotcon_attributes_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>>('iotcon_attributes_get_type'); - late final _iotcon_attributes_get_type = - _iotcon_attributes_get_typePtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Calls a function for each element of attributes. - /// @details iotcon_attributes_cb() will be called for each child. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @post iotcon_attributes_cb() will be called for each child. - /// @see iotcon_attributes_cb() - int iotcon_attributes_foreach( - iotcon_attributes_h attributes, - iotcon_attributes_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_attributes_foreach( - attributes, - cb, - user_data, - ); - } - - late final _iotcon_attributes_foreachPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, iotcon_attributes_cb, - ffi.Pointer)>>('iotcon_attributes_foreach'); - late final _iotcon_attributes_foreach = - _iotcon_attributes_foreachPtr.asFunction< - int Function(iotcon_attributes_h, iotcon_attributes_cb, - ffi.Pointer)>(); - - /// @brief Gets the number of keys in the attributes. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[out] count The number of keys - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_attributes_get_keys_count( - iotcon_attributes_h attributes, - ffi.Pointer count, - ) { - return _iotcon_attributes_get_keys_count( - attributes, - count, - ); - } - - late final _iotcon_attributes_get_keys_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_attributes_h, ffi.Pointer)>>( - 'iotcon_attributes_get_keys_count'); - late final _iotcon_attributes_get_keys_count = - _iotcon_attributes_get_keys_countPtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer)>(); - - /// @brief Creates a new option handle. - /// @since_tizen 3.0 - /// @remarks You must destroy @a options by calling iotcon_options_destroy() if @a options is no longer needed. - /// @param[out] options A newly allocated option handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_options_destroy() - /// @see iotcon_options_add() - /// @see iotcon_options_remove() - /// @see iotcon_options_lookup() - int iotcon_options_create( - ffi.Pointer options, - ) { - return _iotcon_options_create( - options, - ); - } - - late final _iotcon_options_createPtr = _lookup< - ffi.NativeFunction)>>( - 'iotcon_options_create'); - late final _iotcon_options_create = _iotcon_options_createPtr - .asFunction)>(); - - /// @brief Destroys an option handle. - /// @since_tizen 3.0 - /// @param[in] options The handle of the options - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_options_create() - /// @see iotcon_options_add() - /// @see iotcon_options_remove() - /// @see iotcon_options_lookup() - int iotcon_options_destroy( - iotcon_options_h options, - ) { - return _iotcon_options_destroy( - options, - ); - } - - late final _iotcon_options_destroyPtr = - _lookup>( - 'iotcon_options_destroy'); - late final _iotcon_options_destroy = - _iotcon_options_destroyPtr.asFunction(); - - /// @brief Adds a new ID and a corresponding data into the options. - /// @since_tizen 3.0 - /// @remarks iotcon_options_h can have up to 2 options. \n - /// Option ID is always situated between 2048 and 3000. \n - /// Length of option data is less than or equal to 15. - /// @param[in] options The handle of the options - /// @param[in] id The ID of the option to insert - /// @param[in] data The string data to insert into the options - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_options_create() - /// @see iotcon_options_destroy() - /// @see iotcon_options_remove() - /// @see iotcon_options_lookup() - int iotcon_options_add( - iotcon_options_h options, - int id, - ffi.Pointer data, - ) { - return _iotcon_options_add( - options, - id, - data, - ); - } - - late final _iotcon_options_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_options_h, ffi.UnsignedShort, - ffi.Pointer)>>('iotcon_options_add'); - late final _iotcon_options_add = _iotcon_options_addPtr - .asFunction)>(); - - /// @brief Removes the ID and its associated data from the options. - /// @since_tizen 3.0 - /// @param[in] options The handle of the options - /// @param[in] id The ID of the option to delete - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_options_create() - /// @see iotcon_options_destroy() - /// @see iotcon_options_add() - /// @see iotcon_options_lookup() - int iotcon_options_remove( - iotcon_options_h options, - int id, - ) { - return _iotcon_options_remove( - options, - id, - ); - } - - late final _iotcon_options_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_options_h, ffi.UnsignedShort)>>('iotcon_options_remove'); - late final _iotcon_options_remove = _iotcon_options_removePtr - .asFunction(); - - /// @brief Looks up data at the given ID from the options. - /// @since_tizen 3.0 - /// @remarks @a data must not be released using free(). - /// @param[in] options The handle of the options - /// @param[in] id The ID of the option to lookup - /// @param[out] data Found data from options - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_options_create() - /// @see iotcon_options_destroy() - /// @see iotcon_options_add() - /// @see iotcon_options_remove() - int iotcon_options_lookup( - iotcon_options_h options, - int id, - ffi.Pointer> data, - ) { - return _iotcon_options_lookup( - options, - id, - data, - ); - } - - late final _iotcon_options_lookupPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_options_h, ffi.UnsignedShort, - ffi.Pointer>)>>('iotcon_options_lookup'); - late final _iotcon_options_lookup = _iotcon_options_lookupPtr.asFunction< - int Function( - iotcon_options_h, int, ffi.Pointer>)>(); - - /// @brief Gets all data of the options by invoking the callback function. - /// @details iotcon_options_foreach_cb() will be called for each option. \n - /// If iotcon_options_foreach_cb() returns false, iteration will be stopped. - /// @since_tizen 3.0 - /// @param[in] options The handle of the options - /// @param[in] cb The callback function to get data - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @post iotcon_options_foreach_cb() will be called for each option. - /// @see iotcon_options_foreach_cb() - int iotcon_options_foreach( - iotcon_options_h options, - iotcon_options_foreach_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_options_foreach( - options, - cb, - user_data, - ); - } - - late final _iotcon_options_foreachPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_options_h, iotcon_options_foreach_cb, - ffi.Pointer)>>('iotcon_options_foreach'); - late final _iotcon_options_foreach = _iotcon_options_foreachPtr.asFunction< - int Function(iotcon_options_h, iotcon_options_foreach_cb, - ffi.Pointer)>(); - - /// @brief Creates a new Representation handle. - /// @since_tizen 3.0 - /// @remarks You must destroy @a repr by calling iotcon_representation_destroy() if @a repr is no longer needed. - /// @param[out] repr A newly allocated Representation handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_representation_destroy() - int iotcon_representation_create( - ffi.Pointer repr, - ) { - return _iotcon_representation_create( - repr, - ); - } - - late final _iotcon_representation_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'iotcon_representation_create'); - late final _iotcon_representation_create = _iotcon_representation_createPtr - .asFunction)>(); - - /// @brief Destroys a Representation. - /// @details Releases @a Representation and its internal data. - /// @since_tizen 3.0 - /// @param[in] repr The representation handle to free - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_representation_create() - int iotcon_representation_destroy( - iotcon_representation_h repr, - ) { - return _iotcon_representation_destroy( - repr, - ); - } - - late final _iotcon_representation_destroyPtr = - _lookup>( - 'iotcon_representation_destroy'); - late final _iotcon_representation_destroy = _iotcon_representation_destroyPtr - .asFunction(); - - /// @brief Clones from the source Representation. - /// @details Makes a deep copy of a source Representation. - /// @since_tizen 3.0 - /// @remarks You must destroy @a dest by calling iotcon_representation_destroy() if @a dest is no longer needed. - /// @param[in] src Source of Representation to be copied - /// @param[out] dest Clone of a source Representation - /// @return Clone of a source Representation, - /// otherwise NULL on failure - /// @retval iotcon_representation_h Success - /// @retval NULL Failure - int iotcon_representation_clone( - iotcon_representation_h src, - ffi.Pointer dest, - ) { - return _iotcon_representation_clone( - src, - dest, - ); - } - - late final _iotcon_representation_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_representation_h, - ffi.Pointer)>>( - 'iotcon_representation_clone'); - late final _iotcon_representation_clone = - _iotcon_representation_clonePtr.asFunction< - int Function( - iotcon_representation_h, ffi.Pointer)>(); - - /// @brief Appends resource type name. - /// @since_tizen 3.0 - /// @remarks Stored string is replaced with @a uri_path. If @a uri_path is NULL, stored string is set to NULL. - /// @param[in] repr The handle to the Representation - /// @param[in] uri_path The URI of resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_representation_set_uri_path( - iotcon_representation_h repr, - ffi.Pointer uri_path, - ) { - return _iotcon_representation_set_uri_path( - repr, - uri_path, - ); - } - - late final _iotcon_representation_set_uri_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_representation_h, - ffi.Pointer)>>('iotcon_representation_set_uri_path'); - late final _iotcon_representation_set_uri_path = - _iotcon_representation_set_uri_pathPtr.asFunction< - int Function(iotcon_representation_h, ffi.Pointer)>(); - - /// @brief Gets a URI path from the Representation. - /// @since_tizen 3.0 - /// @remarks @a uri_path must not be released using free(). - /// @param[in] repr The Representation handle - /// @param[out] uri_path The URI path to get - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - int iotcon_representation_get_uri_path( - iotcon_representation_h repr, - ffi.Pointer> uri_path, - ) { - return _iotcon_representation_get_uri_path( - repr, - uri_path, - ); - } - - late final _iotcon_representation_get_uri_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_representation_h, - ffi.Pointer>)>>( - 'iotcon_representation_get_uri_path'); - late final _iotcon_representation_get_uri_path = - _iotcon_representation_get_uri_pathPtr.asFunction< - int Function( - iotcon_representation_h, ffi.Pointer>)>(); - - /// @brief Sets resource type list to the Representation. - /// @since_tizen 3.0 - /// @remarks Stored list is replaced with @a types. If @a types is NULL, stored list is set to NULL. - /// @param[in] repr The handle to the Representation - /// @param[in] types The resource type list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_representation_set_resource_types( - iotcon_representation_h repr, - iotcon_resource_types_h types, - ) { - return _iotcon_representation_set_resource_types( - repr, - types, - ); - } - - late final _iotcon_representation_set_resource_typesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_representation_h, iotcon_resource_types_h)>>( - 'iotcon_representation_set_resource_types'); - late final _iotcon_representation_set_resource_types = - _iotcon_representation_set_resource_typesPtr.asFunction< - int Function(iotcon_representation_h, iotcon_resource_types_h)>(); - - /// @brief Gets list of resource type from the Representation. - /// @since_tizen 3.0 - /// @remarks @a types must not be released using iotcon_resource_types_destroy(). - /// @param[in] repr The Representation handle - /// @param[out] types The list of resource types to get - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_representation_get_resource_types( - iotcon_representation_h repr, - ffi.Pointer types, - ) { - return _iotcon_representation_get_resource_types( - repr, - types, - ); - } - - late final _iotcon_representation_get_resource_typesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_representation_h, - ffi.Pointer)>>( - 'iotcon_representation_get_resource_types'); - late final _iotcon_representation_get_resource_types = - _iotcon_representation_get_resource_typesPtr.asFunction< - int Function( - iotcon_representation_h, ffi.Pointer)>(); - - /// @brief Sets list of resource interfaces to the Representation. - /// @since_tizen 3.0 - /// @remarks Stored list is replaced with @a ifaces. If @a ifaces is NULL, stored list is set to NULL. - /// @param[in] repr The Representation handle - /// @param[in] ifaces The list of resource interfaces - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_representation_set_resource_interfaces( - iotcon_representation_h repr, - iotcon_resource_interfaces_h ifaces, - ) { - return _iotcon_representation_set_resource_interfaces( - repr, - ifaces, - ); - } - - late final _iotcon_representation_set_resource_interfacesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_representation_h, iotcon_resource_interfaces_h)>>( - 'iotcon_representation_set_resource_interfaces'); - late final _iotcon_representation_set_resource_interfaces = - _iotcon_representation_set_resource_interfacesPtr.asFunction< - int Function( - iotcon_representation_h, iotcon_resource_interfaces_h)>(); - - /// @brief Gets list of resource interfaces from the Representation. - /// @since_tizen 3.0 - /// @remarks @a ifaces must not be released using iotcon_resource_interfaces_destroy(). - /// @param[in] repr The Representation handle - /// @param[out] ifaces The list of resource interfaces to get - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_representation_get_resource_interfaces( - iotcon_representation_h repr, - ffi.Pointer ifaces, - ) { - return _iotcon_representation_get_resource_interfaces( - repr, - ifaces, - ); - } - - late final _iotcon_representation_get_resource_interfacesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_representation_h, - ffi.Pointer)>>( - 'iotcon_representation_get_resource_interfaces'); - late final _iotcon_representation_get_resource_interfaces = - _iotcon_representation_get_resource_interfacesPtr.asFunction< - int Function(iotcon_representation_h, - ffi.Pointer)>(); - - /// @brief Sets a new attributes handle into the Representation. - /// @since_tizen 3.0 - /// @param[in] repr The Representation handle - /// @param[in] attributes The attributes handle to be set newly - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_representation_set_attributes( - iotcon_representation_h repr, - iotcon_attributes_h attributes, - ) { - return _iotcon_representation_set_attributes( - repr, - attributes, - ); - } - - late final _iotcon_representation_set_attributesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_representation_h, - iotcon_attributes_h)>>('iotcon_representation_set_attributes'); - late final _iotcon_representation_set_attributes = - _iotcon_representation_set_attributesPtr.asFunction< - int Function(iotcon_representation_h, iotcon_attributes_h)>(); - - /// @brief Gets the attributes handle in the Representation. - /// @since_tizen 3.0 - /// @remarks @a attributes must not be released using iotcon_attributes_destroy(). - /// @param[in] repr The Representation handle - /// @param[in] attributes The attributes handle to get - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_representation_get_attributes( - iotcon_representation_h repr, - ffi.Pointer attributes, - ) { - return _iotcon_representation_get_attributes( - repr, - attributes, - ); - } - - late final _iotcon_representation_get_attributesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_representation_h, ffi.Pointer)>>( - 'iotcon_representation_get_attributes'); - late final _iotcon_representation_get_attributes = - _iotcon_representation_get_attributesPtr.asFunction< - int Function( - iotcon_representation_h, ffi.Pointer)>(); - - /// @brief Adds a new child Representation on to the end of the parent Representation. - /// @details Duplicated child Representation is allowed to append. - /// @since_tizen 3.0 - /// @param[in] parent The parent Representation handle - /// @param[in] child The child Representation handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_representation_add_child( - iotcon_representation_h parent, - iotcon_representation_h child, - ) { - return _iotcon_representation_add_child( - parent, - child, - ); - } - - late final _iotcon_representation_add_childPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_representation_h, - iotcon_representation_h)>>('iotcon_representation_add_child'); - late final _iotcon_representation_add_child = - _iotcon_representation_add_childPtr.asFunction< - int Function(iotcon_representation_h, iotcon_representation_h)>(); - - /// @brief Removes a child Representation from parent Representation without freeing. - /// @since_tizen 3.0 - /// @param[in] parent The parent Representation handle - /// @param[in] child The child Representation handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_representation_remove_child( - iotcon_representation_h parent, - iotcon_representation_h child, - ) { - return _iotcon_representation_remove_child( - parent, - child, - ); - } - - late final _iotcon_representation_remove_childPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_representation_h, - iotcon_representation_h)>>('iotcon_representation_remove_child'); - late final _iotcon_representation_remove_child = - _iotcon_representation_remove_childPtr.asFunction< - int Function(iotcon_representation_h, iotcon_representation_h)>(); - - /// @brief Calls a function for each child Representation of parent. - /// @details iotcon_children_cb() will be called for each child. - /// @since_tizen 3.0 - /// @param[in] parent The parent Representation handle - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @post iotcon_children_cb() will be called for each child. - /// @see iotcon_children_cb() - int iotcon_representation_foreach_children( - iotcon_representation_h parent, - iotcon_children_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_representation_foreach_children( - parent, - cb, - user_data, - ); - } - - late final _iotcon_representation_foreach_childrenPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_representation_h, iotcon_children_cb, - ffi.Pointer)>>( - 'iotcon_representation_foreach_children'); - late final _iotcon_representation_foreach_children = - _iotcon_representation_foreach_childrenPtr.asFunction< - int Function(iotcon_representation_h, iotcon_children_cb, - ffi.Pointer)>(); - - /// @brief Gets the number of child Representations in the parent Representation. - /// @since_tizen 3.0 - /// @param[in] parent The parent Representation handle - /// @param[out] count The number of child Representations - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_representation_get_child_count( - iotcon_representation_h parent, - ffi.Pointer count, - ) { - return _iotcon_representation_get_child_count( - parent, - count, - ); - } - - late final _iotcon_representation_get_child_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_representation_h, ffi.Pointer)>>( - 'iotcon_representation_get_child_count'); - late final _iotcon_representation_get_child_count = - _iotcon_representation_get_child_countPtr.asFunction< - int Function( - iotcon_representation_h, ffi.Pointer)>(); - - /// @brief Gets the child Representation at the given position. - /// @details Iterates over the parent until it reaches the @a pos-1 position. - /// @since_tizen 3.0 - /// @remarks @a child must not be released using iotcon_representation_destroy(). - /// @param[in] parent The parent Representation handle - /// @param[in] pos The position of the child Representation - /// @param[out] child The handle to the child Representation - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - int iotcon_representation_get_nth_child( - iotcon_representation_h parent, - int pos, - ffi.Pointer child, - ) { - return _iotcon_representation_get_nth_child( - parent, - pos, - child, - ); - } - - late final _iotcon_representation_get_nth_childPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_representation_h, ffi.Int, - ffi.Pointer)>>( - 'iotcon_representation_get_nth_child'); - late final _iotcon_representation_get_nth_child = - _iotcon_representation_get_nth_childPtr.asFunction< - int Function(iotcon_representation_h, int, - ffi.Pointer)>(); - - /// @brief Creates a new resource types handle. - /// @since_tizen 3.0 - /// @remarks You must destroy @a types by calling iotcon_resource_types_destroy() if @a types is no longer needed. - /// @param[out] types A newly allocated list of resource types handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_resource_types_destroy() - /// @see iotcon_resource_types_add() - /// @see iotcon_resource_types_remove() - /// @see iotcon_resource_types_clone() - int iotcon_resource_types_create( - ffi.Pointer types, - ) { - return _iotcon_resource_types_create( - types, - ); - } - - late final _iotcon_resource_types_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'iotcon_resource_types_create'); - late final _iotcon_resource_types_create = _iotcon_resource_types_createPtr - .asFunction)>(); - - /// @brief Destroys a resource types handle. - /// @since_tizen 3.0 - /// @param[in] types The handle of the resource types - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_resource_types_create() - /// @see iotcon_resource_types_add() - /// @see iotcon_resource_types_remove() - /// @see iotcon_resource_types_clone() - int iotcon_resource_types_destroy( - iotcon_resource_types_h types, - ) { - return _iotcon_resource_types_destroy( - types, - ); - } - - late final _iotcon_resource_types_destroyPtr = - _lookup>( - 'iotcon_resource_types_destroy'); - late final _iotcon_resource_types_destroy = _iotcon_resource_types_destroyPtr - .asFunction(); - - /// @brief Inserts a resource types into the list. - /// @since_tizen 3.0 - /// @remarks The length of @a type should be less than or equal to 61.\n - /// The @a type must start with a lowercase alphabetic character, followed by a sequence - /// of lowercase alphabetic, numeric, ".", or "-" characters, and contains no white space.\n - /// Duplicate strings are not allowed. - /// @param[in] types The handle of the resource types - /// @param[in] type The string data to insert into the resource types (e.g. "org.tizen.light") - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_ALREADY Already done - /// @see iotcon_resource_types_create() - /// @see iotcon_resource_types_destroy() - /// @see iotcon_resource_types_remove() - /// @see iotcon_resource_types_clone() - int iotcon_resource_types_add( - iotcon_resource_types_h types, - ffi.Pointer type, - ) { - return _iotcon_resource_types_add( - types, - type, - ); - } - - late final _iotcon_resource_types_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_types_h, - ffi.Pointer)>>('iotcon_resource_types_add'); - late final _iotcon_resource_types_add = - _iotcon_resource_types_addPtr.asFunction< - int Function(iotcon_resource_types_h, ffi.Pointer)>(); - - /// @brief Deletes a resource types from the list. - /// @since_tizen 3.0 - /// @param[in] types The handle of the resource types - /// @param[in] type The string data to delete from the resource types - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @see iotcon_resource_types_create() - /// @see iotcon_resource_types_destroy() - /// @see iotcon_resource_types_add() - /// @see iotcon_resource_types_clone() - int iotcon_resource_types_remove( - iotcon_resource_types_h types, - ffi.Pointer type, - ) { - return _iotcon_resource_types_remove( - types, - type, - ); - } - - late final _iotcon_resource_types_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_types_h, - ffi.Pointer)>>('iotcon_resource_types_remove'); - late final _iotcon_resource_types_remove = - _iotcon_resource_types_removePtr.asFunction< - int Function(iotcon_resource_types_h, ffi.Pointer)>(); - - /// @brief Gets all of the resource types of the list by invoking the callback function. - /// @details iotcon_resource_types_foreach_cb() will be called for each type. \n - /// If iotcon_resource_types_foreach_cb() returns false, iteration will be stopped. - /// @since_tizen 3.0 - /// @param[in] types The handle of resource types - /// @param[in] cb The callback function to get data - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @post iotcon_resource_types_foreach() will be called for each type. - /// @see iotcon_resource_types_foreach_cb() - int iotcon_resource_types_foreach( - iotcon_resource_types_h types, - iotcon_resource_types_foreach_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_resource_types_foreach( - types, - cb, - user_data, - ); - } - - late final _iotcon_resource_types_foreachPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_resource_types_h, - iotcon_resource_types_foreach_cb, - ffi.Pointer)>>('iotcon_resource_types_foreach'); - late final _iotcon_resource_types_foreach = - _iotcon_resource_types_foreachPtr.asFunction< - int Function(iotcon_resource_types_h, - iotcon_resource_types_foreach_cb, ffi.Pointer)>(); - - /// @brief Clones the resource types handle. - /// @details Makes a deep copy of a source list of resource types. - /// @since_tizen 3.0 - /// @remarks You must @a destroy dest by calling iotcon_resource_types_destroy() if @a dest is no longer needed. - /// @param[in] src The origin handle of the resource types - /// @param[out] dest Clone of a source list of resource types - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_resource_types_create() - /// @see iotcon_resource_types_destroy() - /// @see iotcon_resource_types_add() - /// @see iotcon_resource_types_remove() - int iotcon_resource_types_clone( - iotcon_resource_types_h src, - ffi.Pointer dest, - ) { - return _iotcon_resource_types_clone( - src, - dest, - ); - } - - late final _iotcon_resource_types_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_types_h, - ffi.Pointer)>>( - 'iotcon_resource_types_clone'); - late final _iotcon_resource_types_clone = - _iotcon_resource_types_clonePtr.asFunction< - int Function( - iotcon_resource_types_h, ffi.Pointer)>(); - - /// @brief Creates a new resource interfaces handle. - /// @since_tizen 3.0 - /// @remarks You must destroy @a ifaces by calling iotcon_resource_interfaces_destroy() if @a ifaces is no longer needed. - /// @param[out] ifaces A newly allocated list of resource ifaces handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_resource_interfaces_destroy() - /// @see iotcon_resource_interfaces_add() - /// @see iotcon_resource_interfaces_remove() - /// @see iotcon_resource_interfaces_clone() - int iotcon_resource_interfaces_create( - ffi.Pointer ifaces, - ) { - return _iotcon_resource_interfaces_create( - ifaces, - ); - } - - late final _iotcon_resource_interfaces_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'iotcon_resource_interfaces_create'); - late final _iotcon_resource_interfaces_create = - _iotcon_resource_interfaces_createPtr.asFunction< - int Function(ffi.Pointer)>(); - - /// @brief Destroys a resource ifaces handle. - /// @since_tizen 3.0 - /// @param[in] ifaces The handle of the resource ifaces - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_resource_interfaces_create() - /// @see iotcon_resource_interfaces_add() - /// @see iotcon_resource_interfaces_remove() - /// @see iotcon_resource_interfaces_clone() - int iotcon_resource_interfaces_destroy( - iotcon_resource_interfaces_h ifaces, - ) { - return _iotcon_resource_interfaces_destroy( - ifaces, - ); - } - - late final _iotcon_resource_interfaces_destroyPtr = _lookup< - ffi.NativeFunction>( - 'iotcon_resource_interfaces_destroy'); - late final _iotcon_resource_interfaces_destroy = - _iotcon_resource_interfaces_destroyPtr - .asFunction(); - - /// @brief Inserts a resource iface into the list. - /// @since_tizen 3.0 - /// @remarks @a iface could be a value such as #IOTCON_INTERFACE_DEFAULT. - /// @param[in] ifaces The handle of the resource ifaces - /// @param[in] iface The string data to insert into the resource ifaces - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_ALREADY Already done - /// @see iotcon_resource_interfaces_create() - /// @see iotcon_resource_interfaces_destroy() - /// @see iotcon_resource_interfaces_remove() - /// @see iotcon_resource_interfaces_clone() - int iotcon_resource_interfaces_add( - iotcon_resource_interfaces_h ifaces, - ffi.Pointer iface, - ) { - return _iotcon_resource_interfaces_add( - ifaces, - iface, - ); - } - - late final _iotcon_resource_interfaces_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_interfaces_h, - ffi.Pointer)>>('iotcon_resource_interfaces_add'); - late final _iotcon_resource_interfaces_add = - _iotcon_resource_interfaces_addPtr.asFunction< - int Function(iotcon_resource_interfaces_h, ffi.Pointer)>(); - - /// @brief Deletes a resource iface from the list. - /// @since_tizen 3.0 - /// @remarks @a iface could be a value such as #IOTCON_INTERFACE_DEFAULT. - /// @param[in] ifaces The handle of the resource ifaces - /// @param[in] iface The string data to delete from the resource ifaces - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @see iotcon_resource_interfaces_create() - /// @see iotcon_resource_interfaces_destroy() - /// @see iotcon_resource_interfaces_add() - /// @see iotcon_resource_interfaces_clone() - int iotcon_resource_interfaces_remove( - iotcon_resource_interfaces_h ifaces, - ffi.Pointer iface, - ) { - return _iotcon_resource_interfaces_remove( - ifaces, - iface, - ); - } - - late final _iotcon_resource_interfaces_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_interfaces_h, - ffi.Pointer)>>('iotcon_resource_interfaces_remove'); - late final _iotcon_resource_interfaces_remove = - _iotcon_resource_interfaces_removePtr.asFunction< - int Function(iotcon_resource_interfaces_h, ffi.Pointer)>(); - - /// @brief Gets all of the resource ifaces of the list by invoking the callback function. - /// @details iotcon_resource_interfaces_foreach_cb() will be called for each iface. \n - /// If iotcon_resource_interfaces_foreach_cb() returns false, iteration will be stopped. - /// @since_tizen 3.0 - /// @param[in] ifaces The handle of resource ifaces - /// @param[in] cb The callback function to get data - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @post iotcon_resource_interfaces_foreach() will be called for each iface. - /// @see iotcon_resource_interfaces_foreach_cb() - int iotcon_resource_interfaces_foreach( - iotcon_resource_interfaces_h ifaces, - iotcon_resource_interfaces_foreach_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_resource_interfaces_foreach( - ifaces, - cb, - user_data, - ); - } - - late final _iotcon_resource_interfaces_foreachPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_resource_interfaces_h, - iotcon_resource_interfaces_foreach_cb, - ffi.Pointer)>>('iotcon_resource_interfaces_foreach'); - late final _iotcon_resource_interfaces_foreach = - _iotcon_resource_interfaces_foreachPtr.asFunction< - int Function(iotcon_resource_interfaces_h, - iotcon_resource_interfaces_foreach_cb, ffi.Pointer)>(); - - /// @brief Clones the resource ifaces handle. - /// @details Makes a deep copy of a source list of resource ifaces. - /// @since_tizen 3.0 - /// @remarks You must @a destroy dest by calling iotcon_resource_interfaces_destroy() if @a dest is no longer needed. - /// @param[in] src The origin handle of the resource ifaces - /// @param[out] dest Clone of a source list of resource ifaces - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_resource_interfaces_create() - /// @see iotcon_resource_interfaces_destroy() - /// @see iotcon_resource_interfaces_add() - /// @see iotcon_resource_interfaces_remove() - int iotcon_resource_interfaces_clone( - iotcon_resource_interfaces_h src, - ffi.Pointer dest, - ) { - return _iotcon_resource_interfaces_clone( - src, - dest, - ); - } - - late final _iotcon_resource_interfaces_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_interfaces_h, - ffi.Pointer)>>( - 'iotcon_resource_interfaces_clone'); - late final _iotcon_resource_interfaces_clone = - _iotcon_resource_interfaces_clonePtr.asFunction< - int Function(iotcon_resource_interfaces_h, - ffi.Pointer)>(); - - /// @brief Creates a resource handle and registers the resource in server. - /// @details Registers a resource specified by @a uri_path, @a res_types, @a ifaces which has @a properties in IoTCon server. \n - /// When client finds the registered resource, iotcon_request_handler_cb() will be called automatically. \n - /// @a uri_path format would be relative URI path like '/a/light' \n - /// @a res_types is a list of resource types. Create a iotcon_resource_types_h handle and add types string to it. \n - /// @a ifaces is a list of resource interfaces. Create a iotcon_resource_interfaces_h handle and add interfaces string to it. \n - /// @a policies also can contain multiple policies like IOTCON_RESOURCE_DISCOVERABLE | IOTCON_RESOURCE_OBSERVABLE. \n - /// iotcon_request_handler_cb() will be called when receive CRUD request to the registered resource. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @remarks @a uri_path length must be less than 128. \n - /// You must destroy @a resource by calling iotcon_resource_destroy() if @a resource is no longer needed. - /// @param[in] uri_path The URI path of the resource - /// @param[in] res_types The list of type of the resource - /// @param[in] ifaces The list of interface of the resource - /// @param[in] policies The policies of the resource \n - /// Set of #iotcon_resource_policy_e - /// @param[in] cb The request handler callback function - /// @param[in] user_data The user data to pass to the callback function - /// @param[out] resource_handle The handle of the resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_IOTIVITY IoTivity errors - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @post When the resource receive CRUD request, iotcon_request_handler_cb() will be called. - /// @see iotcon_resource_destroy() - /// @see iotcon_resource_bind_interface() - /// @see iotcon_resource_bind_type() - /// @see iotcon_resource_set_request_handler() - /// @see iotcon_resource_bind_child_resource() - /// @see iotcon_resource_unbind_child_resource() - /// @see iotcon_request_handler_cb() - int iotcon_resource_create( - ffi.Pointer uri_path, - iotcon_resource_types_h res_types, - iotcon_resource_interfaces_h ifaces, - int policies, - iotcon_request_handler_cb cb, - ffi.Pointer user_data, - ffi.Pointer resource_handle, - ) { - return _iotcon_resource_create( - uri_path, - res_types, - ifaces, - policies, - cb, - user_data, - resource_handle, - ); - } - - late final _iotcon_resource_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - iotcon_resource_types_h, - iotcon_resource_interfaces_h, - ffi.Uint8, - iotcon_request_handler_cb, - ffi.Pointer, - ffi.Pointer)>>('iotcon_resource_create'); - late final _iotcon_resource_create = _iotcon_resource_createPtr.asFunction< - int Function( - ffi.Pointer, - iotcon_resource_types_h, - iotcon_resource_interfaces_h, - int, - iotcon_request_handler_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Destroys the resource and releases its data. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @remarks When a normal variable is used, there is only permission denied error. - /// If the errors of this API are not handled, then you must check an application has the privileges for the API. - /// @param[in] resource_handle The handle of the resource to be unregistered - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_resource_create() - /// @see iotcon_resource_bind_interface() - /// @see iotcon_resource_bind_type() - /// @see iotcon_resource_set_request_handler() - /// @see iotcon_resource_bind_child_resource() - /// @see iotcon_resource_unbind_child_resource() - /// @see iotcon_request_handler_cb() - int iotcon_resource_destroy( - iotcon_resource_h resource_handle, - ) { - return _iotcon_resource_destroy( - resource_handle, - ); - } - - late final _iotcon_resource_destroyPtr = - _lookup>( - 'iotcon_resource_destroy'); - late final _iotcon_resource_destroy = - _iotcon_resource_destroyPtr.asFunction(); - - /// @brief Binds an interface to the resource. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @remarks @a iface could be a value such as #IOTCON_INTERFACE_DEFAULT. - /// @param[in] resource The handle of the resource - /// @param[in] iface The interface to be bound to the resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @retval #IOTCON_ERROR_ALREADY Already done - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_resource_create() - /// @see iotcon_resource_destroy() - /// @see iotcon_resource_bind_type() - /// @see iotcon_resource_set_request_handler() - /// @see iotcon_resource_bind_child_resource() - /// @see iotcon_resource_unbind_child_resource() - /// @see iotcon_request_handler_cb() - int iotcon_resource_bind_interface( - iotcon_resource_h resource, - ffi.Pointer iface, - ) { - return _iotcon_resource_bind_interface( - resource, - iface, - ); - } - - late final _iotcon_resource_bind_interfacePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_h, - ffi.Pointer)>>('iotcon_resource_bind_interface'); - late final _iotcon_resource_bind_interface = - _iotcon_resource_bind_interfacePtr - .asFunction)>(); - - /// @brief Binds a type to the resource. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @remarks The length of @a resource_type should be less than or equal to 61.\n - /// The @a resource_type must start with a lowercase alphabetic character, followed by a sequence - /// of lowercase alphabetic, numeric, ".", or "-" characters, and contains no white space. - /// @param[in] resource_handle The handle of the resource - /// @param[in] resource_type The type to be bound to the resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @retval #IOTCON_ERROR_ALREADY Already done - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_resource_create() - /// @see iotcon_resource_destroy() - /// @see iotcon_resource_bind_interface() - /// @see iotcon_resource_set_request_handler() - /// @see iotcon_resource_bind_child_resource() - /// @see iotcon_resource_unbind_child_resource() - /// @see iotcon_request_handler_cb() - int iotcon_resource_bind_type( - iotcon_resource_h resource_handle, - ffi.Pointer resource_type, - ) { - return _iotcon_resource_bind_type( - resource_handle, - resource_type, - ); - } - - late final _iotcon_resource_bind_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_h, - ffi.Pointer)>>('iotcon_resource_bind_type'); - late final _iotcon_resource_bind_type = _iotcon_resource_bind_typePtr - .asFunction)>(); - - /// @brief Sets a request handler to the resource. - /// @details When the resource receive CRUD request, iotcon_request_handler_cb() will be called. - /// @since_tizen 3.0 - /// @remarks Registered callback function will be replaced with the new @a cb. - /// @param[in] resource The handle of the resource - /// @param[in] cb The request handler to be bound to the resource - /// @param[in] user_data The user data to pass to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_resource_create() - /// @see iotcon_resource_destroy() - /// @see iotcon_resource_bind_interface() - /// @see iotcon_resource_bind_type() - /// @see iotcon_resource_bind_child_resource() - /// @see iotcon_resource_unbind_child_resource() - /// @see iotcon_request_handler_cb() - int iotcon_resource_set_request_handler( - iotcon_resource_h resource, - iotcon_request_handler_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_resource_set_request_handler( - resource, - cb, - user_data, - ); - } - - late final _iotcon_resource_set_request_handlerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_h, iotcon_request_handler_cb, - ffi.Pointer)>>('iotcon_resource_set_request_handler'); - late final _iotcon_resource_set_request_handler = - _iotcon_resource_set_request_handlerPtr.asFunction< - int Function(iotcon_resource_h, iotcon_request_handler_cb, - ffi.Pointer)>(); - - /// @brief Binds a child resource into the parent resource. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] parent The handle of the parent resource - /// @param[in] child The handle of the child resource to be added to the parent resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_ALREADY Already done - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_resource_create() - /// @see iotcon_resource_destroy() - /// @see iotcon_resource_bind_interface() - /// @see iotcon_resource_bind_type() - /// @see iotcon_resource_set_request_handler() - /// @see iotcon_resource_unbind_child_resource() - /// @see iotcon_request_handler_cb() - int iotcon_resource_bind_child_resource( - iotcon_resource_h parent, - iotcon_resource_h child, - ) { - return _iotcon_resource_bind_child_resource( - parent, - child, - ); - } - - late final _iotcon_resource_bind_child_resourcePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_h, - iotcon_resource_h)>>('iotcon_resource_bind_child_resource'); - late final _iotcon_resource_bind_child_resource = - _iotcon_resource_bind_child_resourcePtr - .asFunction(); - - /// @brief Unbinds a child resource from the parent resource. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] parent The handle of the parent resource - /// @param[in] child The handle of the child resource to be unbound from the parent resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_resource_create() - /// @see iotcon_resource_destroy() - /// @see iotcon_resource_bind_interface() - /// @see iotcon_resource_bind_type() - /// @see iotcon_resource_set_request_handler() - /// @see iotcon_resource_bind_child_resource() - /// @see iotcon_request_handler_cb() - int iotcon_resource_unbind_child_resource( - iotcon_resource_h parent, - iotcon_resource_h child, - ) { - return _iotcon_resource_unbind_child_resource( - parent, - child, - ); - } - - late final _iotcon_resource_unbind_child_resourcePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_h, - iotcon_resource_h)>>('iotcon_resource_unbind_child_resource'); - late final _iotcon_resource_unbind_child_resource = - _iotcon_resource_unbind_child_resourcePtr - .asFunction(); - - /// @brief Notifies specific clients that resource's attributes have changed. - /// @details If @a observers is @c NULL, the @a msg will notify to all observers. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] resource The handle of the resource - /// @param[in] repr The handle of the representation - /// @param[in] observers The handle of the observers - /// @param[in] qos The quality of service for message transfer - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_REPRESENTATION Representation error - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_remote_resource_observe_cb() - /// @see iotcon_remote_resource_observe_register() - /// @see iotcon_remote_resource_observe_deregister() - /// @see iotcon_observers_create() - /// @see iotcon_observers_destroy() - /// @see iotcon_observers_add() - /// @see iotcon_observers_remove() - int iotcon_resource_notify( - iotcon_resource_h resource, - iotcon_representation_h repr, - iotcon_observers_h observers, - int qos, - ) { - return _iotcon_resource_notify( - resource, - repr, - observers, - qos, - ); - } - - late final _iotcon_resource_notifyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_h, iotcon_representation_h, - iotcon_observers_h, ffi.Int32)>>('iotcon_resource_notify'); - late final _iotcon_resource_notify = _iotcon_resource_notifyPtr.asFunction< - int Function(iotcon_resource_h, iotcon_representation_h, - iotcon_observers_h, int)>(); - - /// @brief Gets the number of child resources of the resource. - /// @since_tizen 3.0 - /// @param[in] resource The handle of the resource - /// @param[out] count The number of child resources - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_resource_get_nth_child() - /// @see iotcon_resource_get_uri_path() - /// @see iotcon_resource_get_types() - /// @see iotcon_resource_get_interfaces() - /// @see iotcon_resource_get_policies() - int iotcon_resource_get_child_count( - iotcon_resource_h resource, - ffi.Pointer count, - ) { - return _iotcon_resource_get_child_count( - resource, - count, - ); - } - - late final _iotcon_resource_get_child_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_resource_h, ffi.Pointer)>>( - 'iotcon_resource_get_child_count'); - late final _iotcon_resource_get_child_count = - _iotcon_resource_get_child_countPtr.asFunction< - int Function(iotcon_resource_h, ffi.Pointer)>(); - - /// @brief Gets the child resource at the given index in the parent resource. - /// @since_tizen 3.0 - /// @remarks @a child must not be released using iotcon_resource_destroy(). - /// @param[in] parent The handle of the parent resource - /// @param[in] index The index of the child resource - /// @param[out] child The child resource at the index - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @see iotcon_resource_get_child_count() - /// @see iotcon_resource_get_uri_path() - /// @see iotcon_resource_get_types() - /// @see iotcon_resource_get_interfaces() - /// @see iotcon_resource_get_policies() - int iotcon_resource_get_nth_child( - iotcon_resource_h parent, - int index, - ffi.Pointer child, - ) { - return _iotcon_resource_get_nth_child( - parent, - index, - child, - ); - } - - late final _iotcon_resource_get_nth_childPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_resource_h, ffi.Int, ffi.Pointer)>>( - 'iotcon_resource_get_nth_child'); - late final _iotcon_resource_get_nth_child = - _iotcon_resource_get_nth_childPtr.asFunction< - int Function( - iotcon_resource_h, int, ffi.Pointer)>(); - - /// @brief Gets an URI path of the resource. - /// @since_tizen 3.0 - /// @remarks @a uri_path must not be released using free(). - /// @param[in] resource The handle of the resource - /// @param[out] uri_path The URI path of the resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_resource_get_child_count() - /// @see iotcon_resource_get_nth_child() - /// @see iotcon_resource_get_types() - /// @see iotcon_resource_get_interfaces() - /// @see iotcon_resource_get_policies() - int iotcon_resource_get_uri_path( - iotcon_resource_h resource, - ffi.Pointer> uri_path, - ) { - return _iotcon_resource_get_uri_path( - resource, - uri_path, - ); - } - - late final _iotcon_resource_get_uri_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_resource_h, ffi.Pointer>)>>( - 'iotcon_resource_get_uri_path'); - late final _iotcon_resource_get_uri_path = - _iotcon_resource_get_uri_pathPtr.asFunction< - int Function( - iotcon_resource_h, ffi.Pointer>)>(); - - /// @brief Gets the list of types in the resource. - /// @since_tizen 3.0 - /// @remarks @a types must not be released using iotcon_resource_types_destroy(). - /// @param[in] resource The handle of the resource - /// @param[out] types The types of the resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_resource_get_child_count() - /// @see iotcon_resource_get_nth_child() - /// @see iotcon_resource_get_uri_path() - /// @see iotcon_resource_get_interfaces() - /// @see iotcon_resource_get_policies() - int iotcon_resource_get_types( - iotcon_resource_h resource, - ffi.Pointer types, - ) { - return _iotcon_resource_get_types( - resource, - types, - ); - } - - late final _iotcon_resource_get_typesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_resource_h, ffi.Pointer)>>( - 'iotcon_resource_get_types'); - late final _iotcon_resource_get_types = - _iotcon_resource_get_typesPtr.asFunction< - int Function( - iotcon_resource_h, ffi.Pointer)>(); - - /// @brief Gets the interfaces of the resource. - /// @since_tizen 3.0 - /// @remarks @a ifaces must not be released using iotcon_resource_interfaces_destroy(). - /// @param[in] resource The handle of the resource - /// @param[out] ifaces The interfaces of the resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_resource_get_child_count() - /// @see iotcon_resource_get_nth_child() - /// @see iotcon_resource_get_uri_path() - /// @see iotcon_resource_get_types() - /// @see iotcon_resource_get_policies() - int iotcon_resource_get_interfaces( - iotcon_resource_h resource, - ffi.Pointer ifaces, - ) { - return _iotcon_resource_get_interfaces( - resource, - ifaces, - ); - } - - late final _iotcon_resource_get_interfacesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_h, - ffi.Pointer)>>( - 'iotcon_resource_get_interfaces'); - late final _iotcon_resource_get_interfaces = - _iotcon_resource_get_interfacesPtr.asFunction< - int Function( - iotcon_resource_h, ffi.Pointer)>(); - - /// @brief Gets the policies in the resource. - /// @details @a policies can contain multiple policies like IOTCON_RESOURCE_DISCOVERABLE | IOTCON_RESOURCE_OBSERVABLE. - /// @since_tizen 3.0 - /// @param[in] resource The handle of the resource - /// @param[out] policies The policies of resource \n - /// Set of #iotcon_resource_policy_e - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_resource_get_child_count() - /// @see iotcon_resource_get_nth_child() - /// @see iotcon_resource_get_uri_path() - /// @see iotcon_resource_get_types() - /// @see iotcon_resource_get_interfaces() - int iotcon_resource_get_policies( - iotcon_resource_h resource, - ffi.Pointer policies, - ) { - return _iotcon_resource_get_policies( - resource, - policies, - ); - } - - late final _iotcon_resource_get_policiesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_h, - ffi.Pointer)>>('iotcon_resource_get_policies'); - late final _iotcon_resource_get_policies = _iotcon_resource_get_policiesPtr - .asFunction)>(); - - /// @brief Creates a lite resource handle and registers the resource in server. - /// @details Registers a resource specified by @a uri_path, @a res_types, @a attributes which have @a properties in IoTCon server. \n - /// When client requests some operations, it send a response to client, automatically.\n - /// The @a policies can contain multiple policies like IOTCON_RESOURCE_DISCOVERABLE | IOTCON_RESOURCE_OBSERVABLE. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @remarks @a uri_path length must be less than 128. \n - /// You must destroy @a resource_handle by calling iotcon_lite_resource_destroy() if @a remote_handle is no longer needed. - /// @param[in] uri_path The URI path of the resource - /// @param[in] res_types The list of type of the resource - /// @param[in] policies The policies of the resource \n - /// Set of #iotcon_resource_policy_e - /// @param[in] attributes The attributes handle to set - /// @param[in] cb The callback function to add into callback list - /// @param[in] user_data The user data to pass to the callback function - /// @param[out] resource_handle The handle of the resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_IOTIVITY IoTivity errors - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_lite_resource_destroy() - int iotcon_lite_resource_create( - ffi.Pointer uri_path, - iotcon_resource_types_h res_types, - int policies, - iotcon_attributes_h attributes, - iotcon_lite_resource_post_request_cb cb, - ffi.Pointer user_data, - ffi.Pointer resource_handle, - ) { - return _iotcon_lite_resource_create( - uri_path, - res_types, - policies, - attributes, - cb, - user_data, - resource_handle, - ); - } - - late final _iotcon_lite_resource_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - iotcon_resource_types_h, - ffi.Uint8, - iotcon_attributes_h, - iotcon_lite_resource_post_request_cb, - ffi.Pointer, - ffi.Pointer)>>( - 'iotcon_lite_resource_create'); - late final _iotcon_lite_resource_create = - _iotcon_lite_resource_createPtr.asFunction< - int Function( - ffi.Pointer, - iotcon_resource_types_h, - int, - iotcon_attributes_h, - iotcon_lite_resource_post_request_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Destroys the resource and releases its data. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @remarks When a normal variable is used, there is only permission denied error. - /// If the errors of this API are not handled, then you must check an application having the privileges for the API. - /// @param[in] resource The handle of the lite resource to be unregistered - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_lite_resource_create() - int iotcon_lite_resource_destroy( - iotcon_lite_resource_h resource, - ) { - return _iotcon_lite_resource_destroy( - resource, - ); - } - - late final _iotcon_lite_resource_destroyPtr = - _lookup>( - 'iotcon_lite_resource_destroy'); - late final _iotcon_lite_resource_destroy = _iotcon_lite_resource_destroyPtr - .asFunction(); - - /// @brief Updates attributes into the lite resource handle. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] resource The handle of the lite resource - /// @param[in] attributes The attributes handle to update - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_lite_resource_get_attributes() - int iotcon_lite_resource_update_attributes( - iotcon_lite_resource_h resource, - iotcon_attributes_h attributes, - ) { - return _iotcon_lite_resource_update_attributes( - resource, - attributes, - ); - } - - late final _iotcon_lite_resource_update_attributesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_lite_resource_h, - iotcon_attributes_h)>>('iotcon_lite_resource_update_attributes'); - late final _iotcon_lite_resource_update_attributes = - _iotcon_lite_resource_update_attributesPtr.asFunction< - int Function(iotcon_lite_resource_h, iotcon_attributes_h)>(); - - /// @brief Gets attributes from the lite resource handle. - /// @since_tizen 3.0 - /// @remarks @a attributes must not be released using iotcon_attributes_destroy(). - /// @param[in] resource The handle of the lite resource - /// @param[out] attributes The attributes handle of the lite resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_lite_resource_update_attributes() - int iotcon_lite_resource_get_attributes( - iotcon_lite_resource_h resource, - ffi.Pointer attributes, - ) { - return _iotcon_lite_resource_get_attributes( - resource, - attributes, - ); - } - - late final _iotcon_lite_resource_get_attributesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_lite_resource_h, ffi.Pointer)>>( - 'iotcon_lite_resource_get_attributes'); - late final _iotcon_lite_resource_get_attributes = - _iotcon_lite_resource_get_attributesPtr.asFunction< - int Function( - iotcon_lite_resource_h, ffi.Pointer)>(); - - /// @brief Creates a response handle. - /// @since_tizen 3.0 - /// @remarks You must destroy @a response by calling iotcon_response_destroy() if @a response is no longer needed. - /// @param[in] request The handle of received request handle - /// @param[out] response Generated response handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @see iotcon_response_destroy() - int iotcon_response_create( - iotcon_request_h request, - ffi.Pointer response, - ) { - return _iotcon_response_create( - request, - response, - ); - } - - late final _iotcon_response_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_request_h, - ffi.Pointer)>>('iotcon_response_create'); - late final _iotcon_response_create = _iotcon_response_createPtr.asFunction< - int Function(iotcon_request_h, ffi.Pointer)>(); - - /// @brief Destroys a response handle. - /// @since_tizen 3.0 - /// @param[in] resp The handle of the response - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_response_create() - int iotcon_response_destroy( - iotcon_response_h resp, - ) { - return _iotcon_response_destroy( - resp, - ); - } - - late final _iotcon_response_destroyPtr = - _lookup>( - 'iotcon_response_destroy'); - late final _iotcon_response_destroy = - _iotcon_response_destroyPtr.asFunction(); - - /// @brief Gets header options of the response. - /// @since_tizen 3.0 - /// @remarks @a options must not be released using iotcon_options_destroy(). - /// @param[in] resp The handle of the response - /// @param[out] options The handle of the header options - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_response_get_representation() - /// @see iotcon_response_get_result() - int iotcon_response_get_options( - iotcon_response_h resp, - ffi.Pointer options, - ) { - return _iotcon_response_get_options( - resp, - options, - ); - } - - late final _iotcon_response_get_optionsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_response_h, - ffi.Pointer)>>('iotcon_response_get_options'); - late final _iotcon_response_get_options = - _iotcon_response_get_optionsPtr.asFunction< - int Function(iotcon_response_h, ffi.Pointer)>(); - - /// @brief Gets representation of the response. - /// @since_tizen 3.0 - /// @remarks @a repr must not be released using iotcon_representation_destroy(). - /// @param[in] resp The handle of the response - /// @param[out] repr The handle of the representation - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data - /// @see iotcon_response_get_options() - /// @see iotcon_response_get_result() - int iotcon_response_get_representation( - iotcon_response_h resp, - ffi.Pointer repr, - ) { - return _iotcon_response_get_representation( - resp, - repr, - ); - } - - late final _iotcon_response_get_representationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_response_h, ffi.Pointer)>>( - 'iotcon_response_get_representation'); - late final _iotcon_response_get_representation = - _iotcon_response_get_representationPtr.asFunction< - int Function( - iotcon_response_h, ffi.Pointer)>(); - - /// @brief Gets result of the response. - /// @since_tizen 3.0 - /// @param[in] resp The handle of the response - /// @param[out] result The result of the response - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_response_get_options() - /// @see iotcon_response_get_representation() - int iotcon_response_get_result( - iotcon_response_h resp, - ffi.Pointer result, - ) { - return _iotcon_response_get_result( - resp, - result, - ); - } - - late final _iotcon_response_get_resultPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_response_h, - ffi.Pointer)>>('iotcon_response_get_result'); - late final _iotcon_response_get_result = _iotcon_response_get_resultPtr - .asFunction)>(); - - /// @brief Sets result into the response. - /// @details The @a result could be one of #iotcon_response_result_e. - /// @since_tizen 3.0 - /// @param[in] resp The handle of the response - /// @param[in] result The result to set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @see iotcon_response_create() - /// @see iotcon_response_destroy() - int iotcon_response_set_result( - iotcon_response_h resp, - int result, - ) { - return _iotcon_response_set_result( - resp, - result, - ); - } - - late final _iotcon_response_set_resultPtr = _lookup< - ffi.NativeFunction>( - 'iotcon_response_set_result'); - late final _iotcon_response_set_result = _iotcon_response_set_resultPtr - .asFunction(); - - /// @brief Sets representation into the response. - /// @since_tizen 3.0 - /// @param[in] resp The handle of the response - /// @param[in] repr The representation of the response - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @see iotcon_response_create() - /// @see iotcon_response_destroy() - int iotcon_response_set_representation( - iotcon_response_h resp, - iotcon_representation_h repr, - ) { - return _iotcon_response_set_representation( - resp, - repr, - ); - } - - late final _iotcon_response_set_representationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_response_h, - iotcon_representation_h)>>('iotcon_response_set_representation'); - late final _iotcon_response_set_representation = - _iotcon_response_set_representationPtr.asFunction< - int Function(iotcon_response_h, iotcon_representation_h)>(); - - /// @brief Sets header options into the response. - /// @since_tizen 3.0 - /// @param[in] resp The handle of the response - /// @param[in] options The header options of the response - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @see iotcon_response_create() - /// @see iotcon_response_destroy() - int iotcon_response_set_options( - iotcon_response_h resp, - iotcon_options_h options, - ) { - return _iotcon_response_set_options( - resp, - options, - ); - } - - late final _iotcon_response_set_optionsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_response_h, - iotcon_options_h)>>('iotcon_response_set_options'); - late final _iotcon_response_set_options = _iotcon_response_set_optionsPtr - .asFunction(); - - /// @brief Sends response for incoming request. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] resp The handle of the response to send - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - int iotcon_response_send( - iotcon_response_h resp, - ) { - return _iotcon_response_send( - resp, - ); - } - - late final _iotcon_response_sendPtr = - _lookup>( - 'iotcon_response_send'); - late final _iotcon_response_send = - _iotcon_response_sendPtr.asFunction(); - - /// @brief Creates a new observers handle. - /// @since_tizen 3.0 - /// @remarks You must destroy @a observers by calling iotcon_observers_destroy() if @a observers is no longer needed. - /// @param[out] observers A newly allocated list of observers handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @see iotcon_observers_destroy() - /// @see iotcon_observers_add() - /// @see iotcon_observers_remove() - int iotcon_observers_create( - ffi.Pointer observers, - ) { - return _iotcon_observers_create( - observers, - ); - } - - late final _iotcon_observers_createPtr = _lookup< - ffi - .NativeFunction)>>( - 'iotcon_observers_create'); - late final _iotcon_observers_create = _iotcon_observers_createPtr - .asFunction)>(); - - /// @brief Destroys a observers handle. - /// @since_tizen 3.0 - /// @param[in] observers The handle of the observers - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_observers_create() - /// @see iotcon_observers_add() - /// @see iotcon_observers_remove() - int iotcon_observers_destroy( - iotcon_observers_h observers, - ) { - return _iotcon_observers_destroy( - observers, - ); - } - - late final _iotcon_observers_destroyPtr = - _lookup>( - 'iotcon_observers_destroy'); - late final _iotcon_observers_destroy = _iotcon_observers_destroyPtr - .asFunction(); - - /// @brief Adds an observers ID into the observers handle. - /// @since_tizen 3.0 - /// @param[in] observers The handle of the observers - /// @param[in] obs_id The ID to be appended to observers - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_observers_create() - /// @see iotcon_observers_destroy() - /// @see iotcon_observers_remove() - int iotcon_observers_add( - iotcon_observers_h observers, - int obs_id, - ) { - return _iotcon_observers_add( - observers, - obs_id, - ); - } - - late final _iotcon_observers_addPtr = _lookup< - ffi.NativeFunction>( - 'iotcon_observers_add'); - late final _iotcon_observers_add = _iotcon_observers_addPtr - .asFunction(); - - /// @brief Removes ID from the observers. - /// @since_tizen 3.0 - /// @param[in] observers observers The handle of the observers - /// @param[in] obs_id The ID to be removed from observers - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_observers_create() - /// @see iotcon_observers_destroy() - /// @see iotcon_observers_add() - int iotcon_observers_remove( - iotcon_observers_h observers, - int obs_id, - ) { - return _iotcon_observers_remove( - observers, - obs_id, - ); - } - - late final _iotcon_observers_removePtr = _lookup< - ffi.NativeFunction>( - 'iotcon_observers_remove'); - late final _iotcon_observers_remove = _iotcon_observers_removePtr - .asFunction(); - - /// @brief Gets host address of the request. - /// @since_tizen 3.0 - /// @remarks @a host_address must not be released using free(). - /// @param[in] request The handle of the request - /// @param[out] host_address The host address of the request - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_request_get_connectivity_type() - /// @see iotcon_request_get_representation() - /// @see iotcon_request_get_request_type() - /// @see iotcon_request_get_options() - /// @see iotcon_request_get_query() - /// @see iotcon_request_get_observe_type() - /// @see iotcon_request_get_observe_id() - int iotcon_request_get_host_address( - iotcon_request_h request, - ffi.Pointer> host_address, - ) { - return _iotcon_request_get_host_address( - request, - host_address, - ); - } - - late final _iotcon_request_get_host_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_request_h, ffi.Pointer>)>>( - 'iotcon_request_get_host_address'); - late final _iotcon_request_get_host_address = - _iotcon_request_get_host_addressPtr.asFunction< - int Function(iotcon_request_h, ffi.Pointer>)>(); - - /// @brief Gets connectivity type of the request. - /// @since_tizen 3.0 - /// @param[in] request The handle of the request - /// @param[out] connectivity_type The connectivity type of the request - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_request_get_host_address() - /// @see iotcon_request_get_representation() - /// @see iotcon_request_get_request_type() - /// @see iotcon_request_get_options() - /// @see iotcon_request_get_query() - /// @see iotcon_request_get_observe_type() - /// @see iotcon_request_get_observe_id() - int iotcon_request_get_connectivity_type( - iotcon_request_h request, - ffi.Pointer connectivity_type, - ) { - return _iotcon_request_get_connectivity_type( - request, - connectivity_type, - ); - } - - late final _iotcon_request_get_connectivity_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_request_h, - ffi.Pointer)>>('iotcon_request_get_connectivity_type'); - late final _iotcon_request_get_connectivity_type = - _iotcon_request_get_connectivity_typePtr - .asFunction)>(); - - /// @brief Gets a representation of the request. - /// @since_tizen 3.0 - /// @remarks @a repr must not be released using iotcon_representation_destroy(). - /// @param[in] request The handle of the request - /// @param[out] repr The representation of the request - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_request_get_host_address() - /// @see iotcon_request_get_connectivity_type() - /// @see iotcon_request_get_request_type() - /// @see iotcon_request_get_options() - /// @see iotcon_request_get_query() - /// @see iotcon_request_get_observe_type() - /// @see iotcon_request_get_observe_id() - int iotcon_request_get_representation( - iotcon_request_h request, - ffi.Pointer repr, - ) { - return _iotcon_request_get_representation( - request, - repr, - ); - } - - late final _iotcon_request_get_representationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_request_h, ffi.Pointer)>>( - 'iotcon_request_get_representation'); - late final _iotcon_request_get_representation = - _iotcon_request_get_representationPtr.asFunction< - int Function( - iotcon_request_h, ffi.Pointer)>(); - - /// @brief Gets type of the request. - /// @details @a type could be one of the #iotcon_request_type_e. - /// @since_tizen 3.0 - /// @param[in] request The handle of the request - /// @param[out] type The types of the request - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_request_get_host_address() - /// @see iotcon_request_get_connectivity_type() - /// @see iotcon_request_get_representation() - /// @see iotcon_request_get_options() - /// @see iotcon_request_get_query() - /// @see iotcon_request_get_observe_type() - /// @see iotcon_request_get_observe_id() - int iotcon_request_get_request_type( - iotcon_request_h request, - ffi.Pointer type, - ) { - return _iotcon_request_get_request_type( - request, - type, - ); - } - - late final _iotcon_request_get_request_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_request_h, - ffi.Pointer)>>('iotcon_request_get_request_type'); - late final _iotcon_request_get_request_type = - _iotcon_request_get_request_typePtr - .asFunction)>(); - - /// @brief Gets options of the request. - /// @since_tizen 3.0 - /// @remarks @a options must not be released using iotcon_options_destroy(). - /// @param[in] request The handle of the request - /// @param[out] options The options of the request - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_request_get_host_address() - /// @see iotcon_request_get_connectivity_type() - /// @see iotcon_request_get_representation() - /// @see iotcon_request_get_request_type() - /// @see iotcon_request_get_query() - /// @see iotcon_request_get_observe_type() - /// @see iotcon_request_get_observe_id() - int iotcon_request_get_options( - iotcon_request_h request, - ffi.Pointer options, - ) { - return _iotcon_request_get_options( - request, - options, - ); - } - - late final _iotcon_request_get_optionsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_request_h, - ffi.Pointer)>>('iotcon_request_get_options'); - late final _iotcon_request_get_options = - _iotcon_request_get_optionsPtr.asFunction< - int Function(iotcon_request_h, ffi.Pointer)>(); - - /// @brief Gets query of the request. - /// @since_tizen 3.0 - /// @remarks @a query must not be released using iotcon_query_destroy(). - /// @param[in] request The handle of the request - /// @param[out] query The query of the request - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_request_get_host_address() - /// @see iotcon_request_get_connectivity_type() - /// @see iotcon_request_get_representation() - /// @see iotcon_request_get_request_type() - /// @see iotcon_request_get_options() - /// @see iotcon_request_get_observe_type() - /// @see iotcon_request_get_observe_id() - int iotcon_request_get_query( - iotcon_request_h request, - ffi.Pointer query, - ) { - return _iotcon_request_get_query( - request, - query, - ); - } - - late final _iotcon_request_get_queryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_request_h, - ffi.Pointer)>>('iotcon_request_get_query'); - late final _iotcon_request_get_query = - _iotcon_request_get_queryPtr.asFunction< - int Function(iotcon_request_h, ffi.Pointer)>(); - - /// @brief Gets observation action of the request. - /// @details The @a observe_type could be one of #iotcon_observe_type_e. - /// @since_tizen 3.0 - /// @param[in] request The handle of the request - /// @param[out] observe_type The observation type of the request - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_request_get_host_address() - /// @see iotcon_request_get_connectivity_type() - /// @see iotcon_request_get_representation() - /// @see iotcon_request_get_request_type() - /// @see iotcon_request_get_options() - /// @see iotcon_request_get_query() - /// @see iotcon_request_get_observe_id() - int iotcon_request_get_observe_type( - iotcon_request_h request, - ffi.Pointer observe_type, - ) { - return _iotcon_request_get_observe_type( - request, - observe_type, - ); - } - - late final _iotcon_request_get_observe_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_request_h, - ffi.Pointer)>>('iotcon_request_get_observe_type'); - late final _iotcon_request_get_observe_type = - _iotcon_request_get_observe_typePtr - .asFunction)>(); - - /// @brief Gets observation ID of the request. - /// @since_tizen 3.0 - /// @param[in] request The handle of the request - /// @param[out] observe_id The ID of the observer - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_request_get_host_address() - /// @see iotcon_request_get_connectivity_type() - /// @see iotcon_request_get_representation() - /// @see iotcon_request_get_request_type() - /// @see iotcon_request_get_options() - /// @see iotcon_request_get_query() - /// @see iotcon_request_get_observe_type() - int iotcon_request_get_observe_id( - iotcon_request_h request, - ffi.Pointer observe_id, - ) { - return _iotcon_request_get_observe_id( - request, - observe_id, - ); - } - - late final _iotcon_request_get_observe_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_request_h, - ffi.Pointer)>>('iotcon_request_get_observe_id'); - late final _iotcon_request_get_observe_id = _iotcon_request_get_observe_idPtr - .asFunction)>(); - - /// @brief Starts presence of a server. - /// @details Use this function to send server's announcements to clients. \n - /// Server can call this function when online for the first time or come back from offline to online. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @remarks If @a time_to_live is 0, server will set default value as 60 seconds. \n - /// If @a time_to_live is very big, server will set maximum value as (60 * 60 * 24) seconds (24 hours). - /// @param[in] time_to_live The interval of announcing presence in seconds - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_stop_presence() - /// @see iotcon_add_presence_cb() - /// @see iotcon_remove_presence_cb() - int iotcon_start_presence( - int time_to_live, - ) { - return _iotcon_start_presence( - time_to_live, - ); - } - - late final _iotcon_start_presencePtr = - _lookup>( - 'iotcon_start_presence'); - late final _iotcon_start_presence = - _iotcon_start_presencePtr.asFunction(); - - /// @brief Stops presence of a server. - /// @details Use this function to stop sending server's announcements to clients. - /// Server can call this function when terminating, entering to offline or out of network. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_start_presence() - /// @see iotcon_add_presence_cb() - /// @see iotcon_remove_presence_cb() - int iotcon_stop_presence() { - return _iotcon_stop_presence(); - } - - late final _iotcon_stop_presencePtr = - _lookup>('iotcon_stop_presence'); - late final _iotcon_stop_presence = - _iotcon_stop_presencePtr.asFunction(); - - /// @brief Sets the device name. - /// @details The function sets the name of the local device (the device calling the function). - /// If the device name is set, clients can get the name using iotcon_device_info_get_property() or iotcon_remote_resource_get_device_name(). - /// @since_tizen 3.0 - /// @remarks @a device_name may not be an empty string. - /// @param[in] device_name The device name - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_IOTIVITY Iotivity errors - /// @see iotcon_get_device_info() - /// @see iotcon_device_info_get_property() - /// @see iotcon_remote_resource_get_device_name() - int iotcon_set_device_name( - ffi.Pointer device_name, - ) { - return _iotcon_set_device_name( - device_name, - ); - } - - late final _iotcon_set_device_namePtr = - _lookup)>>( - 'iotcon_set_device_name'); - late final _iotcon_set_device_name = _iotcon_set_device_namePtr - .asFunction)>(); - - /// @brief Creates a new resource handle. - /// @details Creates a resource proxy object so that iotcon_remote_resource_get(), - /// iotcon_remote_resource_put(), iotcon_remote_resource_post(), - /// iotcon_remote_resource_delete(), iotcon_remote_resource_observe_register(), - /// iotcon_remote_resource_start_caching() and iotcon_remote_resource_start_monitoring() - /// API can be used without discovering the object in advance.\n - /// To use this API, you should provide all of the details required to correctly contact and observe the object.\n - /// If not, you should discover the resource object manually.\n - /// The @a policies can contain multiple policies like IOTCON_RESOURCE_DISCOVERABLE | IOTCON_RESOURCE_OBSERVABLE. - /// @since_tizen 3.0 - /// @remarks You must destroy @a remote_resource by calling iotcon_remote_resource_destroy() if @a remote_resource is no longer needed. - /// @param[in] host_address The host address of the resource - /// @param[in] connectivity_type The connectivity type. Can not use @a IOTCON_CONNECTIVITY_ALL. \n - /// Connectivity type of specific remote resource(It has specific host address, not @a IOTCON_MULTICAST_ADDRESS) is already decided. \n - /// Use specific connectivity type of the remote resource. \n - /// You can refer to the @a iotcon_remote_resource_get_connectivity_type(). - /// @param[in] uri_path The URI path of the resource - /// @param[in] policies The policies of the resource \n - /// Set of #iotcon_resource_policy_e - /// @param[in] resource_types The resource types of the resource. For example, "core.light" - /// @param[in] resource_ifaces The resource interfaces of the resource - /// @param[out] remote_resource Generated resource handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_IOTIVITY IoTivity errors - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @see iotcon_remote_resource_destroy() - /// @see iotcon_remote_resource_clone() - int iotcon_remote_resource_create( - ffi.Pointer host_address, - int connectivity_type, - ffi.Pointer uri_path, - int policies, - iotcon_resource_types_h resource_types, - iotcon_resource_interfaces_h resource_ifaces, - ffi.Pointer remote_resource, - ) { - return _iotcon_remote_resource_create( - host_address, - connectivity_type, - uri_path, - policies, - resource_types, - resource_ifaces, - remote_resource, - ); - } - - late final _iotcon_remote_resource_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Uint8, - iotcon_resource_types_h, - iotcon_resource_interfaces_h, - ffi.Pointer)>>( - 'iotcon_remote_resource_create'); - late final _iotcon_remote_resource_create = - _iotcon_remote_resource_createPtr.asFunction< - int Function( - ffi.Pointer, - int, - ffi.Pointer, - int, - iotcon_resource_types_h, - iotcon_resource_interfaces_h, - ffi.Pointer)>(); - - /// @brief Destroys a resource handle. - /// @since_tizen 3.0 - /// @param[in] resource The handle of the resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_remote_resource_create() - /// @see iotcon_remote_resource_clone() - int iotcon_remote_resource_destroy( - iotcon_remote_resource_h resource, - ) { - return _iotcon_remote_resource_destroy( - resource, - ); - } - - late final _iotcon_remote_resource_destroyPtr = - _lookup>( - 'iotcon_remote_resource_destroy'); - late final _iotcon_remote_resource_destroy = - _iotcon_remote_resource_destroyPtr - .asFunction(); - - /// @brief Clones a clone of a remote resource. - /// @since_tizen 3.0 - /// @remarks You must destroy @a dest by calling iotcon_remote_resource_destroy() if @a dest is no longer needed. - /// @param[in] src The Source of resource - /// @param[out] dest The cloned resource handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_remote_resource_create() - /// @see iotcon_remote_resource_destroy() - int iotcon_remote_resource_clone( - iotcon_remote_resource_h src, - ffi.Pointer dest, - ) { - return _iotcon_remote_resource_clone( - src, - dest, - ); - } - - late final _iotcon_remote_resource_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_remote_resource_h, - ffi.Pointer)>>( - 'iotcon_remote_resource_clone'); - late final _iotcon_remote_resource_clone = - _iotcon_remote_resource_clonePtr.asFunction< - int Function(iotcon_remote_resource_h, - ffi.Pointer)>(); - - /// @brief Registers observe callback on the resource. - /// @details When server sends notification message, iotcon_remote_resource_observe_cb() will be called. - /// The @a observe_policy could be one of #iotcon_observe_policy_e. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] resource The handle of the resource - /// @param[in] observe_policy The type to specify how client wants to observe - /// @param[in] query The query to send to server - /// @param[in] cb The callback function to get notifications from server - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_IOTIVITY IoTivity errors - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @post When the @a resource receive notification message, iotcon_remote_resource_observe_cb() will be called. - /// @see iotcon_remote_resource_observe_cb() - /// @see iotcon_remote_resource_observe_deregister() - /// @see iotcon_resource_notify() - int iotcon_remote_resource_observe_register( - iotcon_remote_resource_h resource, - int observe_policy, - iotcon_query_h query, - iotcon_remote_resource_observe_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_remote_resource_observe_register( - resource, - observe_policy, - query, - cb, - user_data, - ); - } - - late final _iotcon_remote_resource_observe_registerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_remote_resource_h, - ffi.Int32, - iotcon_query_h, - iotcon_remote_resource_observe_cb, - ffi.Pointer)>>( - 'iotcon_remote_resource_observe_register'); - late final _iotcon_remote_resource_observe_register = - _iotcon_remote_resource_observe_registerPtr.asFunction< - int Function(iotcon_remote_resource_h, int, iotcon_query_h, - iotcon_remote_resource_observe_cb, ffi.Pointer)>(); - - /// @brief Deregisters observe callback on the resource. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] resource The handle of the resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_remote_resource_observe_cb() - /// @see iotcon_remote_resource_observe_register() - /// @see iotcon_resource_notify() - int iotcon_remote_resource_observe_deregister( - iotcon_remote_resource_h resource, - ) { - return _iotcon_remote_resource_observe_deregister( - resource, - ); - } - - late final _iotcon_remote_resource_observe_deregisterPtr = - _lookup>( - 'iotcon_remote_resource_observe_deregister'); - late final _iotcon_remote_resource_observe_deregister = - _iotcon_remote_resource_observe_deregisterPtr - .asFunction(); - - /// @brief Gets the attributes of a resource asynchronously. - /// @details When server sends response on get request, iotcon_remote_resource_response_cb() will be called. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] resource The handle of the resource - /// @param[in] query The query to send to server - /// @param[in] cb The callback function - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @post When the client receive get response, iotcon_remote_resource_response_cb() will be called. - /// @see iotcon_remote_resource_response_cb() - /// @see iotcon_set_timeout() - int iotcon_remote_resource_get( - iotcon_remote_resource_h resource, - iotcon_query_h query, - iotcon_remote_resource_response_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_remote_resource_get( - resource, - query, - cb, - user_data, - ); - } - - late final _iotcon_remote_resource_getPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_remote_resource_h, - iotcon_query_h, - iotcon_remote_resource_response_cb, - ffi.Pointer)>>('iotcon_remote_resource_get'); - late final _iotcon_remote_resource_get = - _iotcon_remote_resource_getPtr.asFunction< - int Function(iotcon_remote_resource_h, iotcon_query_h, - iotcon_remote_resource_response_cb, ffi.Pointer)>(); - - /// @brief Puts the representation of a resource asynchronously. - /// @details When server sends response on put request, iotcon_remote_resource_response_cb() will be called. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] resource The handle of the resource - /// @param[in] repr The handle of the representation - /// @param[in] query The query to send to server - /// @param[in] cb The callback function - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @post When the client receive put response, iotcon_remote_resource_response_cb() will be called. - /// @see iotcon_remote_resource_response_cb() - /// @see iotcon_set_timeout() - int iotcon_remote_resource_put( - iotcon_remote_resource_h resource, - iotcon_representation_h repr, - iotcon_query_h query, - iotcon_remote_resource_response_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_remote_resource_put( - resource, - repr, - query, - cb, - user_data, - ); - } - - late final _iotcon_remote_resource_putPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_remote_resource_h, - iotcon_representation_h, - iotcon_query_h, - iotcon_remote_resource_response_cb, - ffi.Pointer)>>('iotcon_remote_resource_put'); - late final _iotcon_remote_resource_put = - _iotcon_remote_resource_putPtr.asFunction< - int Function( - iotcon_remote_resource_h, - iotcon_representation_h, - iotcon_query_h, - iotcon_remote_resource_response_cb, - ffi.Pointer)>(); - - /// @brief Posts on a resource asynchronously. - /// @details When server sends response on post request, iotcon_remote_resource_response_cb() will be called. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] resource The handle of the resource - /// @param[in] repr The handle of the representation - /// @param[in] query The query to send to server - /// @param[in] cb The callback function - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @post When the client receive post response, iotcon_remote_resource_response_cb() will be called. - /// @see iotcon_remote_resource_response_cb() - /// @see iotcon_set_timeout() - int iotcon_remote_resource_post( - iotcon_remote_resource_h resource, - iotcon_representation_h repr, - iotcon_query_h query, - iotcon_remote_resource_response_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_remote_resource_post( - resource, - repr, - query, - cb, - user_data, - ); - } - - late final _iotcon_remote_resource_postPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_remote_resource_h, - iotcon_representation_h, - iotcon_query_h, - iotcon_remote_resource_response_cb, - ffi.Pointer)>>('iotcon_remote_resource_post'); - late final _iotcon_remote_resource_post = - _iotcon_remote_resource_postPtr.asFunction< - int Function( - iotcon_remote_resource_h, - iotcon_representation_h, - iotcon_query_h, - iotcon_remote_resource_response_cb, - ffi.Pointer)>(); - - /// @brief Deletes a resource asynchronously. - /// @details When server sends response on delete request, iotcon_remote_resource_response_cb() will be called. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] resource The handle of the resource - /// @param[in] cb The callback function - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @post When the client receive delete response, iotcon_remote_resource_response_cb() will be called. - /// @see iotcon_remote_resource_response_cb() - /// @see iotcon_set_timeout() - int iotcon_remote_resource_delete( - iotcon_remote_resource_h resource, - iotcon_remote_resource_response_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_remote_resource_delete( - resource, - cb, - user_data, - ); - } - - late final _iotcon_remote_resource_deletePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_remote_resource_h, - iotcon_remote_resource_response_cb, - ffi.Pointer)>>('iotcon_remote_resource_delete'); - late final _iotcon_remote_resource_delete = - _iotcon_remote_resource_deletePtr.asFunction< - int Function(iotcon_remote_resource_h, - iotcon_remote_resource_response_cb, ffi.Pointer)>(); - - /// @brief Starts caching of a remote resource. - /// @details Use this function to start caching the resource's attribute. \n - /// Although, remote resource is not observable, it keeps the representation up-to-date. - /// Because it checks whether representation is changed periodically. \n - /// Therefore, you can get the cached representation even when the remote resource is off-line. - /// The default checking interval is 10 seconds. - /// It can be changed by iotcon_remote_resource_set_checking_interval(). - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] resource The handle of the remote resource to be cached - /// @param[in] cb The callback function to add into callback list - /// @param[in] user_data The user data to pass to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_ALREADY Already done - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_remote_resource_stop_caching() - /// @see iotcon_remote_resource_cached_representation_changed_cb() - int iotcon_remote_resource_start_caching( - iotcon_remote_resource_h resource, - iotcon_remote_resource_cached_representation_changed_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_remote_resource_start_caching( - resource, - cb, - user_data, - ); - } - - late final _iotcon_remote_resource_start_cachingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_remote_resource_h, - iotcon_remote_resource_cached_representation_changed_cb, - ffi.Pointer)>>('iotcon_remote_resource_start_caching'); - late final _iotcon_remote_resource_start_caching = - _iotcon_remote_resource_start_cachingPtr.asFunction< - int Function( - iotcon_remote_resource_h, - iotcon_remote_resource_cached_representation_changed_cb, - ffi.Pointer)>(); - - /// @brief Stops caching of a remote resource. - /// @details Use this function to stop caching the resource's attribute. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] resource The handle of the remote resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_remote_resource_start_caching() - /// @see iotcon_remote_resource_cached_representation_changed_cb() - int iotcon_remote_resource_stop_caching( - iotcon_remote_resource_h resource, - ) { - return _iotcon_remote_resource_stop_caching( - resource, - ); - } - - late final _iotcon_remote_resource_stop_cachingPtr = - _lookup>( - 'iotcon_remote_resource_stop_caching'); - late final _iotcon_remote_resource_stop_caching = - _iotcon_remote_resource_stop_cachingPtr - .asFunction(); - - /// @brief Starts monitoring of a remote resource. - /// @details When remote resource's state is changed, registered callbacks will be called in turn. - /// Although, remote resource does not call iotcon_start_presence(), it knows the state of resource. - /// Because it checks the state of resource, periodically. \n - /// The default checking interval is 10 seconds. - /// It can be changed by iotcon_remote_resource_set_checking_interval(). - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] resource The handle of the remote resource - /// @param[in] cb The callback function to add into callback list - /// @param[in] user_data The user data to pass to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_ALREADY Already done - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_remote_resource_stop_monitoring() - /// @see iotcon_remote_resource_state_changed_cb() - int iotcon_remote_resource_start_monitoring( - iotcon_remote_resource_h resource, - iotcon_remote_resource_state_changed_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_remote_resource_start_monitoring( - resource, - cb, - user_data, - ); - } - - late final _iotcon_remote_resource_start_monitoringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_remote_resource_h, - iotcon_remote_resource_state_changed_cb, - ffi.Pointer)>>( - 'iotcon_remote_resource_start_monitoring'); - late final _iotcon_remote_resource_start_monitoring = - _iotcon_remote_resource_start_monitoringPtr.asFunction< - int Function( - iotcon_remote_resource_h, - iotcon_remote_resource_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Stops monitoring of a remote resource. - /// @details Use this function to stop monitoring the remote resource. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] resource The handle of the remote resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_remote_resource_start_monitoring() - /// @see iotcon_remote_resource_state_changed_cb() - int iotcon_remote_resource_stop_monitoring( - iotcon_remote_resource_h resource, - ) { - return _iotcon_remote_resource_stop_monitoring( - resource, - ); - } - - late final _iotcon_remote_resource_stop_monitoringPtr = - _lookup>( - 'iotcon_remote_resource_stop_monitoring'); - late final _iotcon_remote_resource_stop_monitoring = - _iotcon_remote_resource_stop_monitoringPtr - .asFunction(); - - /// @brief Gets an URI path of the remote resource. - /// @since_tizen 3.0 - /// @remarks @a uri_path must not be released using free(). - /// @param[in] resource The handle of the remote resource - /// @param[out] uri_path The URI path of the remote resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_remote_resource_get_host_address() - /// @see iotcon_remote_resource_get_connectivity_type() - /// @see iotcon_remote_resource_get_device_id() - /// @see iotcon_remote_resource_get_device_name() - /// @see iotcon_remote_resource_get_types() - /// @see iotcon_remote_resource_get_interfaces() - /// @see iotcon_remote_resource_get_policies() - /// @see iotcon_remote_resource_set_options() - int iotcon_remote_resource_get_uri_path( - iotcon_remote_resource_h resource, - ffi.Pointer> uri_path, - ) { - return _iotcon_remote_resource_get_uri_path( - resource, - uri_path, - ); - } - - late final _iotcon_remote_resource_get_uri_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_remote_resource_h, - ffi.Pointer>)>>( - 'iotcon_remote_resource_get_uri_path'); - late final _iotcon_remote_resource_get_uri_path = - _iotcon_remote_resource_get_uri_pathPtr.asFunction< - int Function( - iotcon_remote_resource_h, ffi.Pointer>)>(); - - /// @brief Gets a connectivity type of the remote resource. - /// @since_tizen 3.0 - /// @param[in] resource The handle of the remote resource - /// @param[out] connectivity_type The connectivity type of the remote resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_remote_resource_get_uri_path() - /// @see iotcon_remote_resource_get_host_address() - /// @see iotcon_remote_resource_get_connectivity_type() - /// @see iotcon_remote_resource_get_device_id() - /// @see iotcon_remote_resource_get_device_name() - /// @see iotcon_remote_resource_get_types() - /// @see iotcon_remote_resource_get_interfaces() - /// @see iotcon_remote_resource_get_policies() - /// @see iotcon_remote_resource_set_options() - int iotcon_remote_resource_get_connectivity_type( - iotcon_remote_resource_h resource, - ffi.Pointer connectivity_type, - ) { - return _iotcon_remote_resource_get_connectivity_type( - resource, - connectivity_type, - ); - } - - late final _iotcon_remote_resource_get_connectivity_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_remote_resource_h, ffi.Pointer)>>( - 'iotcon_remote_resource_get_connectivity_type'); - late final _iotcon_remote_resource_get_connectivity_type = - _iotcon_remote_resource_get_connectivity_typePtr.asFunction< - int Function(iotcon_remote_resource_h, ffi.Pointer)>(); - - /// @brief Gets a host address of the remote resource. - /// @since_tizen 3.0 - /// @remarks @a host_address must not be released using free(). - /// @param[in] resource The handle of the remote resource - /// @param[out] host_address The host address of the remote resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_remote_resource_get_connectivity_type() - /// @see iotcon_remote_resource_get_uri_path() - /// @see iotcon_remote_resource_get_device_id() - /// @see iotcon_remote_resource_get_device_name() - /// @see iotcon_remote_resource_get_types() - /// @see iotcon_remote_resource_get_interfaces() - /// @see iotcon_remote_resource_get_policies() - /// @see iotcon_remote_resource_set_options() - int iotcon_remote_resource_get_host_address( - iotcon_remote_resource_h resource, - ffi.Pointer> host_address, - ) { - return _iotcon_remote_resource_get_host_address( - resource, - host_address, - ); - } - - late final _iotcon_remote_resource_get_host_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_remote_resource_h, - ffi.Pointer>)>>( - 'iotcon_remote_resource_get_host_address'); - late final _iotcon_remote_resource_get_host_address = - _iotcon_remote_resource_get_host_addressPtr.asFunction< - int Function( - iotcon_remote_resource_h, ffi.Pointer>)>(); - - /// @brief Gets a device ID of the remote resource. - /// @since_tizen 3.0 - /// @remarks @a device_id must not be released using free().\n - /// If @a resource is created by calling iotcon_remote_resource_create(), you cannot get @a device_id. - /// In this case, the return value of this function is #IOTCON_ERROR_NO_DATA. - /// @param[in] resource The handle of the remote resource - /// @param[out] device_id The device ID of the remote resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @see iotcon_remote_resource_get_uri_path() - /// @see iotcon_remote_resource_get_device_name() - /// @see iotcon_remote_resource_get_host_address() - /// @see iotcon_remote_resource_get_connectivity_type() - /// @see iotcon_remote_resource_get_types() - /// @see iotcon_remote_resource_get_interfaces() - /// @see iotcon_remote_resource_get_policies() - /// @see iotcon_remote_resource_set_options() - int iotcon_remote_resource_get_device_id( - iotcon_remote_resource_h resource, - ffi.Pointer> device_id, - ) { - return _iotcon_remote_resource_get_device_id( - resource, - device_id, - ); - } - - late final _iotcon_remote_resource_get_device_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_remote_resource_h, - ffi.Pointer>)>>( - 'iotcon_remote_resource_get_device_id'); - late final _iotcon_remote_resource_get_device_id = - _iotcon_remote_resource_get_device_idPtr.asFunction< - int Function( - iotcon_remote_resource_h, ffi.Pointer>)>(); - - /// @brief Gets the device name of the remote resource. - /// @since_tizen 3.0 - /// @remarks @a device_name must not be released using free().\n - /// If @a resource is created by calling iotcon_remote_resource_create(), you cannot get @a device_name. - /// In this case, the return value of this function is #IOTCON_ERROR_NO_DATA. - /// @param[in] resource The handle of the remote resource - /// @param[out] device_name The device name of the remote resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @see iotcon_set_device_name() - /// @see iotcon_remote_resource_get_uri_path() - /// @see iotcon_remote_resource_get_device_id() - /// @see iotcon_remote_resource_get_device_name() - /// @see iotcon_remote_resource_get_host_address() - /// @see iotcon_remote_resource_get_connectivity_type() - /// @see iotcon_remote_resource_get_types() - /// @see iotcon_remote_resource_get_interfaces() - /// @see iotcon_remote_resource_get_properties() - /// @see iotcon_remote_resource_set_options() - int iotcon_remote_resource_get_device_name( - iotcon_remote_resource_h resource, - ffi.Pointer> device_name, - ) { - return _iotcon_remote_resource_get_device_name( - resource, - device_name, - ); - } - - late final _iotcon_remote_resource_get_device_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_remote_resource_h, - ffi.Pointer>)>>( - 'iotcon_remote_resource_get_device_name'); - late final _iotcon_remote_resource_get_device_name = - _iotcon_remote_resource_get_device_namePtr.asFunction< - int Function( - iotcon_remote_resource_h, ffi.Pointer>)>(); - - /// @brief Gets resource types of the remote resource. - /// @since_tizen 3.0 - /// @remarks @a types must not be released using iotcon_resource_types_destroy(). - /// @param[in] resource The handle of the remote resource - /// @param[out] types The resource types of the remote resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_remote_resource_get_uri_path() - /// @see iotcon_remote_resource_get_host_address() - /// @see iotcon_remote_resource_get_connectivity_type() - /// @see iotcon_remote_resource_get_device_id() - /// @see iotcon_remote_resource_get_device_name() - /// @see iotcon_remote_resource_get_interfaces() - /// @see iotcon_remote_resource_get_policies() - /// @see iotcon_remote_resource_set_options() - int iotcon_remote_resource_get_types( - iotcon_remote_resource_h resource, - ffi.Pointer types, - ) { - return _iotcon_remote_resource_get_types( - resource, - types, - ); - } - - late final _iotcon_remote_resource_get_typesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_remote_resource_h, - ffi.Pointer)>>( - 'iotcon_remote_resource_get_types'); - late final _iotcon_remote_resource_get_types = - _iotcon_remote_resource_get_typesPtr.asFunction< - int Function(iotcon_remote_resource_h, - ffi.Pointer)>(); - - /// @brief Gets resource interfaces of the remote resource. - /// @since_tizen 3.0 - /// @remarks @a ifaces must not be released using iotcon_resource_interfaces_destroy(). - /// @param[in] resource The handle of the remote resource - /// @param[out] ifaces The resource interfaces of the remote resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_remote_resource_get_uri_path() - /// @see iotcon_remote_resource_get_host_address() - /// @see iotcon_remote_resource_get_connectivity_type() - /// @see iotcon_remote_resource_get_device_id() - /// @see iotcon_remote_resource_get_device_name() - /// @see iotcon_remote_resource_get_types() - /// @see iotcon_remote_resource_get_policies() - /// @see iotcon_remote_resource_set_options() - int iotcon_remote_resource_get_interfaces( - iotcon_remote_resource_h resource, - ffi.Pointer ifaces, - ) { - return _iotcon_remote_resource_get_interfaces( - resource, - ifaces, - ); - } - - late final _iotcon_remote_resource_get_interfacesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_remote_resource_h, - ffi.Pointer)>>( - 'iotcon_remote_resource_get_interfaces'); - late final _iotcon_remote_resource_get_interfaces = - _iotcon_remote_resource_get_interfacesPtr.asFunction< - int Function(iotcon_remote_resource_h, - ffi.Pointer)>(); - - /// @brief Checks whether the remote resource is observable or not. - /// @details The @a policies can contain multiple policies like IOTCON_RESOURCE_DISCOVERABLE | IOTCON_RESOURCE_OBSERVABLE. - /// @since_tizen 3.0 - /// @param[in] resource The handle of the resource - /// @param[out] policies The policies of the resource \n - /// Set of #iotcon_resource_policy_e - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_remote_resource_get_uri_path() - /// @see iotcon_remote_resource_get_host_address() - /// @see iotcon_remote_resource_get_connectivity_type() - /// @see iotcon_remote_resource_get_device_id() - /// @see iotcon_remote_resource_get_device_name() - /// @see iotcon_remote_resource_get_types() - /// @see iotcon_remote_resource_get_interfaces() - /// @see iotcon_remote_resource_set_options() - int iotcon_remote_resource_get_policies( - iotcon_remote_resource_h resource, - ffi.Pointer policies, - ) { - return _iotcon_remote_resource_get_policies( - resource, - policies, - ); - } - - late final _iotcon_remote_resource_get_policiesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_remote_resource_h, - ffi.Pointer)>>('iotcon_remote_resource_get_policies'); - late final _iotcon_remote_resource_get_policies = - _iotcon_remote_resource_get_policiesPtr.asFunction< - int Function(iotcon_remote_resource_h, ffi.Pointer)>(); - - /// @brief Gets options of the remote resource. - /// @since_tizen 3.0 - /// @remarks @a options must not be released using iotcon_options_destroy(). - /// @param[in] resource The handle of the remote resource - /// @param[out] options The handle of the header options - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_remote_resource_get_uri_path() - /// @see iotcon_remote_resource_get_host_address() - /// @see iotcon_remote_resource_get_connectivity_type() - /// @see iotcon_remote_resource_get_device_id() - /// @see iotcon_remote_resource_get_device_name() - /// @see iotcon_remote_resource_get_types() - /// @see iotcon_remote_resource_get_interfaces() - /// @see iotcon_remote_resource_set_options() - /// @see iotcon_remote_resource_get_policies() - int iotcon_remote_resource_get_options( - iotcon_remote_resource_h resource, - ffi.Pointer options, - ) { - return _iotcon_remote_resource_get_options( - resource, - options, - ); - } - - late final _iotcon_remote_resource_get_optionsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_remote_resource_h, ffi.Pointer)>>( - 'iotcon_remote_resource_get_options'); - late final _iotcon_remote_resource_get_options = - _iotcon_remote_resource_get_optionsPtr.asFunction< - int Function( - iotcon_remote_resource_h, ffi.Pointer)>(); - - /// @brief Sets options into the remote resource. - /// @since_tizen 3.0 - /// @param[in] resource The handle of the remote resource - /// @param[in] options The handle of the header options - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_remote_resource_get_uri_path() - /// @see iotcon_remote_resource_get_host_address() - /// @see iotcon_remote_resource_get_connectivity_type() - /// @see iotcon_remote_resource_get_device_id() - /// @see iotcon_remote_resource_get_device_name() - /// @see iotcon_remote_resource_get_types() - /// @see iotcon_remote_resource_get_interfaces() - /// @see iotcon_remote_resource_get_options() - /// @see iotcon_remote_resource_get_policies() - int iotcon_remote_resource_set_options( - iotcon_remote_resource_h resource, - iotcon_options_h options, - ) { - return _iotcon_remote_resource_set_options( - resource, - options, - ); - } - - late final _iotcon_remote_resource_set_optionsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_remote_resource_h, - iotcon_options_h)>>('iotcon_remote_resource_set_options'); - late final _iotcon_remote_resource_set_options = - _iotcon_remote_resource_set_optionsPtr.asFunction< - int Function(iotcon_remote_resource_h, iotcon_options_h)>(); - - /// @brief Gets cached representation from the remote resource. - /// @since_tizen 3.0 - /// @remarks @a representation must not be released using iotcon_representation_destroy(). - /// @param[in] resource The handle of the remote resource - /// @param[out] representation The handle of the representation - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_remote_resource_get_cached_representation( - iotcon_remote_resource_h resource, - ffi.Pointer representation, - ) { - return _iotcon_remote_resource_get_cached_representation( - resource, - representation, - ); - } - - late final _iotcon_remote_resource_get_cached_representationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_remote_resource_h, - ffi.Pointer)>>( - 'iotcon_remote_resource_get_cached_representation'); - late final _iotcon_remote_resource_get_cached_representation = - _iotcon_remote_resource_get_cached_representationPtr.asFunction< - int Function(iotcon_remote_resource_h, - ffi.Pointer)>(); - - /// @brief Gets the checking interval which is using on the monitoring & caching of remote resource. - /// @details This API get the checking interval which is using in the process of monitoring and caching() of remote resource. \n - /// The monitoring and caching will operate "GET method" with the checking interval. - /// Default checking interval is 10 seconds. - /// @since_tizen 3.0 - /// @param[in] resource The handle of the remote resource - /// @param[out] interval Seconds for time interval - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_remote_resource_set_checking_interval() - /// @see iotcon_remote_resource_start_monitoring() - /// @see iotcon_remote_resource_start_caching() - int iotcon_remote_resource_get_checking_interval( - iotcon_remote_resource_h resource, - ffi.Pointer interval, - ) { - return _iotcon_remote_resource_get_checking_interval( - resource, - interval, - ); - } - - late final _iotcon_remote_resource_get_checking_intervalPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_remote_resource_h, ffi.Pointer)>>( - 'iotcon_remote_resource_get_checking_interval'); - late final _iotcon_remote_resource_get_checking_interval = - _iotcon_remote_resource_get_checking_intervalPtr.asFunction< - int Function(iotcon_remote_resource_h, ffi.Pointer)>(); - - /// @brief Sets the checking interval which is using on the monitoring & caching of remote resource. - /// @details This API set the checking interval which is using in the process of monitoring and caching() of remote resource. \n - /// The monitoring and caching will operate "GET method" with the checking interval changed by this function. - /// Default checking interval is 10 seconds. - /// @since_tizen 3.0 - /// @param[in] resource The handle of the remote resource - /// @param[in] interval Seconds for time interval (must be in range from 1 to 3600) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_remote_resource_get_checking_interval() - /// @see iotcon_remote_resource_start_monitoring() - /// @see iotcon_remote_resource_start_caching() - int iotcon_remote_resource_set_checking_interval( - iotcon_remote_resource_h resource, - int interval, - ) { - return _iotcon_remote_resource_set_checking_interval( - resource, - interval, - ); - } - - late final _iotcon_remote_resource_set_checking_intervalPtr = _lookup< - ffi - .NativeFunction>( - 'iotcon_remote_resource_set_checking_interval'); - late final _iotcon_remote_resource_set_checking_interval = - _iotcon_remote_resource_set_checking_intervalPtr - .asFunction(); - - /// @brief Adds callback to a server to receive presence events. - /// @details Request to receive presence to an interested server's resource with @a resource_type. \n - /// If succeeded to subscribe, iotcon_presence_cb() will be invoked when the server sends presence. \n - /// A server sends presence events when adds/removes/alters a resource or start/stop presence. \n - /// @a host_address could be #IOTCON_MULTICAST_ADDRESS for IPv4 multicast. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @remarks The length of @a resource_type should be less than or equal to 61.\n - /// The @a resource_type must start with a lowercase alphabetic character, followed by a sequence - /// of lowercase alphabetic, numeric, ".", or "-" characters, and contains no white space.\n - /// You must destroy @a presence by calling iotcon_unsubscribe_presence() - /// if @a presence is no longer needed. - /// @param[in] host_address The address or addressable name of the server - /// @param[in] connectivity_type The connectivity type - /// @param[in] resource_type A resource type that a client is interested in - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data to pass to the function - /// @param[out] presence_handle The generated presence handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_IOTIVITY IoTivity errors - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @post When the resource receive presence, iotcon_presence_cb() will be called. - /// @see iotcon_start_presence() - /// @see iotcon_stop_presence() - /// @see iotcon_remove_presence_cb() - /// @see iotcon_presence_cb() - int iotcon_add_presence_cb( - ffi.Pointer host_address, - int connectivity_type, - ffi.Pointer resource_type, - iotcon_presence_cb cb, - ffi.Pointer user_data, - ffi.Pointer presence_handle, - ) { - return _iotcon_add_presence_cb( - host_address, - connectivity_type, - resource_type, - cb, - user_data, - presence_handle, - ); - } - - late final _iotcon_add_presence_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - iotcon_presence_cb, - ffi.Pointer, - ffi.Pointer)>>('iotcon_add_presence_cb'); - late final _iotcon_add_presence_cb = _iotcon_add_presence_cbPtr.asFunction< - int Function( - ffi.Pointer, - int, - ffi.Pointer, - iotcon_presence_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Removes callback to a server's presence events. - /// @details Request not to receive server's presence any more. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] presence_handle The presence handle to be unsubscribed - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_start_presence() - /// @see iotcon_stop_presence() - /// @see iotcon_add_presence_cb() - /// @see iotcon_presence_cb() - int iotcon_remove_presence_cb( - iotcon_presence_h presence_handle, - ) { - return _iotcon_remove_presence_cb( - presence_handle, - ); - } - - late final _iotcon_remove_presence_cbPtr = - _lookup>( - 'iotcon_remove_presence_cb'); - late final _iotcon_remove_presence_cb = _iotcon_remove_presence_cbPtr - .asFunction(); - - /// @brief Gets host address from the presence handle. - /// @since_tizen 3.0 - /// @remarks @a host_address must not be released using free(). - /// @param[in] presence The handle of the presence - /// @param[out] host_address The host address of the presence - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_presence_get_connectivity_type() - /// @see iotcon_presence_get_resource_type() - int iotcon_presence_get_host_address( - iotcon_presence_h presence, - ffi.Pointer> host_address, - ) { - return _iotcon_presence_get_host_address( - presence, - host_address, - ); - } - - late final _iotcon_presence_get_host_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_presence_h, ffi.Pointer>)>>( - 'iotcon_presence_get_host_address'); - late final _iotcon_presence_get_host_address = - _iotcon_presence_get_host_addressPtr.asFunction< - int Function( - iotcon_presence_h, ffi.Pointer>)>(); - - /// @brief Gets connectivity type from the presence handle. - /// @details The @a connectivity_type could be one of #iotcon_connectivity_type_e. - /// @since_tizen 3.0 - /// @param[in] presence The handle of the presence - /// @param[out] connectivity_type The connectivity type of the presence - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_presence_get_host_address() - /// @see iotcon_presence_get_resource_type() - int iotcon_presence_get_connectivity_type( - iotcon_presence_h presence, - ffi.Pointer connectivity_type, - ) { - return _iotcon_presence_get_connectivity_type( - presence, - connectivity_type, - ); - } - - late final _iotcon_presence_get_connectivity_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_presence_h, ffi.Pointer)>>( - 'iotcon_presence_get_connectivity_type'); - late final _iotcon_presence_get_connectivity_type = - _iotcon_presence_get_connectivity_typePtr.asFunction< - int Function(iotcon_presence_h, ffi.Pointer)>(); - - /// @brief Gets resource type from the presence handle. - /// @since_tizen 3.0 - /// @remarks @a resource_type must not be released using free(). - /// @param[in] presence The handle of the presence - /// @param[out] resource_type The resource type of the presence - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_presence_get_host_address() - /// @see iotcon_presence_get_connectivity_type() - int iotcon_presence_get_resource_type( - iotcon_presence_h presence, - ffi.Pointer> resource_type, - ) { - return _iotcon_presence_get_resource_type( - presence, - resource_type, - ); - } - - late final _iotcon_presence_get_resource_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_presence_h, ffi.Pointer>)>>( - 'iotcon_presence_get_resource_type'); - late final _iotcon_presence_get_resource_type = - _iotcon_presence_get_resource_typePtr.asFunction< - int Function( - iotcon_presence_h, ffi.Pointer>)>(); - - /// @brief Gets result from the presence response handle. - /// @details The @a result could be one of #iotcon_presence_result_e. - /// @since_tizen 3.0 - /// @param[in] response The handle of the presence response - /// @param[out] result The result code - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_presence_response_get_trigger() - /// @see iotcon_presence_response_get_host_address() - /// @see iotcon_presence_response_get_connectivity_type() - /// @see iotcon_presence_response_get_resource_type() - int iotcon_presence_response_get_result( - iotcon_presence_response_h response, - ffi.Pointer result, - ) { - return _iotcon_presence_response_get_result( - response, - result, - ); - } - - late final _iotcon_presence_response_get_resultPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_presence_response_h, - ffi.Pointer)>>('iotcon_presence_response_get_result'); - late final _iotcon_presence_response_get_result = - _iotcon_presence_response_get_resultPtr.asFunction< - int Function(iotcon_presence_response_h, ffi.Pointer)>(); - - /// @brief Gets trigger from the presence response handle. - /// @details The @a trigger could be one of #iotcon_presence_trigger_e. - /// It is set only if a response result is IOTCON_PRESENCE_OK. - /// @since_tizen 3.0 - /// @param[in] response The handle of the presence response - /// @param[out] trigger The presence trigger value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_presence_response_get_result() - /// @see iotcon_presence_response_get_host_address() - /// @see iotcon_presence_response_get_connectivity_type() - /// @see iotcon_presence_response_get_resource_type() - int iotcon_presence_response_get_trigger( - iotcon_presence_response_h response, - ffi.Pointer trigger, - ) { - return _iotcon_presence_response_get_trigger( - response, - trigger, - ); - } - - late final _iotcon_presence_response_get_triggerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_presence_response_h, - ffi.Pointer)>>('iotcon_presence_response_get_trigger'); - late final _iotcon_presence_response_get_trigger = - _iotcon_presence_response_get_triggerPtr.asFunction< - int Function(iotcon_presence_response_h, ffi.Pointer)>(); - - /// @brief Gets host address from the presence response handle. - /// @since_tizen 3.0 - /// @remarks @a host_address must not be released using free(). - /// @param[in] response The handle of the presence response - /// @param[out] host_address The host address of the presence response - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see iotcon_presence_response_get_result() - /// @see iotcon_presence_response_get_trigger() - /// @see iotcon_presence_response_get_connectivity_type() - /// @see iotcon_presence_response_get_resource_type() - int iotcon_presence_response_get_host_address( - iotcon_presence_response_h response, - ffi.Pointer> host_address, - ) { - return _iotcon_presence_response_get_host_address( - response, - host_address, - ); - } - - late final _iotcon_presence_response_get_host_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_presence_response_h, - ffi.Pointer>)>>( - 'iotcon_presence_response_get_host_address'); - late final _iotcon_presence_response_get_host_address = - _iotcon_presence_response_get_host_addressPtr.asFunction< - int Function(iotcon_presence_response_h, - ffi.Pointer>)>(); - - /// @brief Gets connectivity type from the presence response handle. - /// @details The @a connectivity_type could be one of #iotcon_connectivity_type_e. - /// @since_tizen 3.0 - /// @param[in] response The handle of the presence response - /// @param[out] connectivity_type The connectivity type of the presence response - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_presence_response_get_result() - /// @see iotcon_presence_response_get_trigger() - /// @see iotcon_presence_response_get_host_address() - /// @see iotcon_presence_response_get_resource_type() - int iotcon_presence_response_get_connectivity_type( - iotcon_presence_response_h response, - ffi.Pointer connectivity_type, - ) { - return _iotcon_presence_response_get_connectivity_type( - response, - connectivity_type, - ); - } - - late final _iotcon_presence_response_get_connectivity_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_presence_response_h, ffi.Pointer)>>( - 'iotcon_presence_response_get_connectivity_type'); - late final _iotcon_presence_response_get_connectivity_type = - _iotcon_presence_response_get_connectivity_typePtr.asFunction< - int Function(iotcon_presence_response_h, ffi.Pointer)>(); - - /// @brief Gets resource type from the presence response handle. - /// @since_tizen 3.0 - /// @remarks @a resource_type must not be released using free(). - /// @param[in] response The handle of the presence response - /// @param[out] resource_type The resource type of the presence response - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_presence_response_get_result() - /// @see iotcon_presence_response_get_trigger() - /// @see iotcon_presence_response_get_host_address() - /// @see iotcon_presence_response_get_connectivity_type() - int iotcon_presence_response_get_resource_type( - iotcon_presence_response_h response, - ffi.Pointer> resource_type, - ) { - return _iotcon_presence_response_get_resource_type( - response, - resource_type, - ); - } - - late final _iotcon_presence_response_get_resource_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_presence_response_h, - ffi.Pointer>)>>( - 'iotcon_presence_response_get_resource_type'); - late final _iotcon_presence_response_get_resource_type = - _iotcon_presence_response_get_resource_typePtr.asFunction< - int Function(iotcon_presence_response_h, - ffi.Pointer>)>(); - - /// @brief Finds resources asynchronously. - /// @details Request to find a resource of @a host_address server with @a query.\n - /// @a host_address could be #IOTCON_MULTICAST_ADDRESS for multicast.\n - /// If succeeded to find the resource, iotcon_found_resource_cb() will be invoked with information of the resource. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @remarks @a host_address should be in the format coap://address:port. \n - /// (ex. coaps://[fe80::ae5a:14ff:fe24:b8fe]:12345, or coaps://192.168.1.10:12345)\n - /// @a connectivity_type can be set with extra options. - /// If @a connectivity_type is set without IOTCON_CONNECTIVITY_IPV4_ONLY - /// and IOTCON_CONNECTIVITY_IPV6_ONLY, the resources are discovered by default setting - /// of IoTivity(IPv6 is preferred over IPv4). \n - /// If there are no preference options(PREFER_XXX), resources will reply using each of - /// opened protocol(TCP/UDP). - /// Therefore, you can get remote resource handles which include different host address, - /// but indicates same resource. \n - /// (coaps://192.168.0.2:1234/res/light, coaps+tcp://192.168.0.2/1235/res/light) - /// @a query can be set using specific resource types, or resource interfaces. - /// If @a query is NULL, every resource discovered is listed. - /// @param[in] host_address The address or addressable name of server - /// @param[in] connectivity_type The connectivity type - /// @param[in] query The query specified as a filter for the resource - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @post iotcon_found_resource_cb() will be invoked. - /// @see iotcon_found_resource_cb() - /// @see iotcon_set_timeout() - int iotcon_find_resource( - ffi.Pointer host_address, - int connectivity_type, - iotcon_query_h query, - iotcon_found_resource_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_find_resource( - host_address, - connectivity_type, - query, - cb, - user_data, - ); - } - - late final _iotcon_find_resourcePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - iotcon_query_h, - iotcon_found_resource_cb, - ffi.Pointer)>>('iotcon_find_resource'); - late final _iotcon_find_resource = _iotcon_find_resourcePtr.asFunction< - int Function(ffi.Pointer, int, iotcon_query_h, - iotcon_found_resource_cb, ffi.Pointer)>(); - - /// @brief Finds the device information of remote server asynchronously. - /// @details Request device information to server and pass the information by calling iotcon_device_info_cb(). \n - /// @a host_address could be #IOTCON_MULTICAST_ADDRESS for multicast. \n - /// If succeeded in getting device information, iotcon_device_info_cb() will be invoked with information. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @remarks @a host_address should be in the format coap://address:port. \n - /// (ex. coap://[fe80::ae5a:14ff:fe24:b8fe]:12345, or coap://192.168.1.10:12345) \n - /// @a connectivity_type can be set with extra options. - /// If @a connectivity_type is set without IOTCON_CONNECTIVITY_IPV4_ONLY - /// and IOTCON_CONNECTIVITY_IPV6_ONLY, device informations are discovered by default setting - /// of IoTivity(IPv6 is preferred over IPv4). \n - /// If there are no preference options(PREFER_XXX), it will reply using UDP. - /// @param[in] host_address The host address of remote server - /// @param[in] connectivity_type The connectivity type - /// @param[in] query The query specified as a filter for the device information - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @post iotcon_device_info_cb() will be invoked. - /// @see iotcon_set_device_name() - /// @see iotcon_device_info_cb() - /// @see iotcon_device_info_get_property() - /// @see iotcon_set_timeout() - int iotcon_find_device_info( - ffi.Pointer host_address, - int connectivity_type, - iotcon_query_h query, - iotcon_device_info_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_find_device_info( - host_address, - connectivity_type, - query, - cb, - user_data, - ); - } - - late final _iotcon_find_device_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - iotcon_query_h, - iotcon_device_info_cb, - ffi.Pointer)>>('iotcon_find_device_info'); - late final _iotcon_find_device_info = _iotcon_find_device_infoPtr.asFunction< - int Function(ffi.Pointer, int, iotcon_query_h, - iotcon_device_info_cb, ffi.Pointer)>(); - - /// @brief Gets device properties from the device information handle. - /// @since_tizen 3.0 - /// @remarks @a value must not be released using free(). - /// @param[in] device_info The handle of the device information - /// @param[in] property The properties of the device information - /// @param[out] value The value of the property - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_set_device_name() - /// @see iotcon_device_info_cb() - /// @see iotcon_find_device_info() - int iotcon_device_info_get_property( - iotcon_device_info_h device_info, - int property, - ffi.Pointer> value, - ) { - return _iotcon_device_info_get_property( - device_info, - property, - value, - ); - } - - late final _iotcon_device_info_get_propertyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_device_info_h, ffi.Int32, - ffi.Pointer>)>>( - 'iotcon_device_info_get_property'); - late final _iotcon_device_info_get_property = - _iotcon_device_info_get_propertyPtr.asFunction< - int Function( - iotcon_device_info_h, int, ffi.Pointer>)>(); - - /// @brief Finds the platform information of remote server asynchronously. - /// @details Request platform information to server and pass the information by calling iotcon_platform_info_cb(). \n - /// @a host_address could be #IOTCON_MULTICAST_ADDRESS for multicast. \n - /// If succeeded in getting platform information, iotcon_platform_info_cb() will be invoked with information. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @remarks @a host_address should be in the format coap://address:port. \n - /// (ex. coap://[fe80::ae5a:14ff:fe24:b8fe]:12345, or coap://192.168.1.10:12345) \n - /// @a connectivity_type can be set with extra options. - /// If @a connectivity_type is set without IOTCON_CONNECTIVITY_IPV4_ONLY - /// and IOTCON_CONNECTIVITY_IPV6_ONLY, platform informations are discovered by default setting - /// of IoTivity(IPv6 is preferred over IPv4). \n - /// If there are no preference options(PREFER_XXX), it will reply using UDP. - /// @param[in] host_address The host address of remote server - /// @param[in] connectivity_type The connectivity type - /// @param[in] query The query specified as a filter for the platform information - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @post iotcon_platform_info_cb() will be invoked. - /// @see iotcon_platform_info_cb() - /// @see iotcon_platform_info_get_property() - /// @see iotcon_set_timeout() - int iotcon_find_platform_info( - ffi.Pointer host_address, - int connectivity_type, - iotcon_query_h query, - iotcon_platform_info_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_find_platform_info( - host_address, - connectivity_type, - query, - cb, - user_data, - ); - } - - late final _iotcon_find_platform_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - iotcon_query_h, - iotcon_platform_info_cb, - ffi.Pointer)>>('iotcon_find_platform_info'); - late final _iotcon_find_platform_info = - _iotcon_find_platform_infoPtr.asFunction< - int Function(ffi.Pointer, int, iotcon_query_h, - iotcon_platform_info_cb, ffi.Pointer)>(); - - /// @brief Gets platform properties from the platform information handle. - /// @since_tizen 3.0 - /// @remarks @a value must not be released using free(). - /// @param[in] platform_info The handle of the platform information - /// @param[in] property The properties of the platform information - /// @param[out] value The value of the property - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_platform_info_cb() - /// @see iotcon_find_platform_info() - int iotcon_platform_info_get_property( - iotcon_platform_info_h platform_info, - int property, - ffi.Pointer> value, - ) { - return _iotcon_platform_info_get_property( - platform_info, - property, - value, - ); - } - - late final _iotcon_platform_info_get_propertyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_platform_info_h, ffi.Int32, - ffi.Pointer>)>>( - 'iotcon_platform_info_get_property'); - late final _iotcon_platform_info_get_property = - _iotcon_platform_info_get_propertyPtr.asFunction< - int Function(iotcon_platform_info_h, int, - ffi.Pointer>)>(); - - /// @brief Initializes IoTCon. - /// @details Calls this function to start IoTCon. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @privilege %http://tizen.org/privilege/internet - /// @remarks The @a file_path point to a file for handling secure virtual resources. - /// The file that is CBOR(Concise Binary Object Representation)-format must already exist in @a file_path. - /// We recommend to use application-local file for @a file_path. \n - /// You must call iotcon_deinitialize() if IoTCon API is no longer needed. - /// @param[in] file_path The path of SVR(Secure Virtual Resources) DB - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @see iotcon_deinitialize() - int iotcon_initialize( - ffi.Pointer file_path, - ) { - return _iotcon_initialize( - file_path, - ); - } - - late final _iotcon_initializePtr = - _lookup)>>( - 'iotcon_initialize'); - late final _iotcon_initialize = - _iotcon_initializePtr.asFunction)>(); - - /// @brief Deinitializes IoTCon. - /// @details Frees the resources allocated to IoTCon. - /// @since_tizen 3.0 - /// @remarks This function must be called if IoTCon API is no longer needed. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_initialize() - int iotcon_deinitialize() { - return _iotcon_deinitialize(); - } - - late final _iotcon_deinitializePtr = - _lookup>('iotcon_deinitialize'); - late final _iotcon_deinitialize = - _iotcon_deinitializePtr.asFunction(); - - /// @brief Gets the timeout seconds of asynchronous API. - /// @details This API get the timeout of iotcon_find_device_info(), - /// iotcon_find_platform_info(), iotcon_find_resource(), - /// iotcon_remote_resource_get(), iotcon_remote_resource_put(), - /// iotcon_remote_resource_post() and iotcon_remote_resource_delete(). - /// @since_tizen 3.0 - /// @param[out] timeout_seconds Seconds for timeout - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_set_timeout() - int iotcon_get_timeout( - ffi.Pointer timeout_seconds, - ) { - return _iotcon_get_timeout( - timeout_seconds, - ); - } - - late final _iotcon_get_timeoutPtr = - _lookup)>>( - 'iotcon_get_timeout'); - late final _iotcon_get_timeout = - _iotcon_get_timeoutPtr.asFunction)>(); - - /// @brief Sets the timeout seconds of asynchronous APIs. - /// @details This API set the timeout of iotcon_find_device_info(), - /// iotcon_find_platform_info(), iotcon_find_resource(), - /// iotcon_remote_resource_get(), iotcon_remote_resource_put(), - /// iotcon_remote_resource_post() and iotcon_remote_resource_delete().\n - /// Default timeout interval value is 30. - /// @since_tizen 3.0 - /// @param[in] timeout_seconds Seconds for timeout (must be in range from 1 to 3600) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_get_timeout() - int iotcon_set_timeout( - int timeout_seconds, - ) { - return _iotcon_set_timeout( - timeout_seconds, - ); - } - - late final _iotcon_set_timeoutPtr = - _lookup>( - 'iotcon_set_timeout'); - late final _iotcon_set_timeout = - _iotcon_set_timeoutPtr.asFunction(); - - /// @brief Gets the polling interval(milliseconds) of IoTCon. - /// @details This API gets the polling interval of IoTCon. - /// Default polling interval is 100 milliseconds. - /// @since_tizen 3.0 - /// @param[out] interval Milliseconds for polling interval - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_set_timeout() - int iotcon_polling_get_interval( - ffi.Pointer interval, - ) { - return _iotcon_polling_get_interval( - interval, - ); - } - - late final _iotcon_polling_get_intervalPtr = - _lookup)>>( - 'iotcon_polling_get_interval'); - late final _iotcon_polling_get_interval = _iotcon_polling_get_intervalPtr - .asFunction)>(); - - /// @brief Sets the polling interval(milliseconds) of IoTCon. - /// @details This API sets the polling interval of IoTCon. - /// The closer to 0, the faster it operates. It is invoked immediately for changing the interval. - /// Default polling interval is 100 milliseconds. If you want the faster operation, - /// we recommend you set 10 milliseconds for polling interval. - /// @since_tizen 3.0 - /// @param[in] interval Milliseconds for polling interval (must be in range from 1 to 999) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_polling_get_interval() - int iotcon_polling_set_interval( - int interval, - ) { - return _iotcon_polling_set_interval( - interval, - ); - } - - late final _iotcon_polling_set_intervalPtr = - _lookup>( - 'iotcon_polling_set_interval'); - late final _iotcon_polling_set_interval = - _iotcon_polling_set_intervalPtr.asFunction(); - - /// @brief Invokes a next message from a queue for receiving messages from others immediately. - /// @details This API invokes a next message from a queue for receiving messages from others immediately. \n - /// After calling the API, it continues the polling with existing interval. - /// @since_tizen 3.0 - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @pre iotcon_initialize() should be called to initialize. - int iotcon_polling_invoke() { - return _iotcon_polling_invoke(); - } - - late final _iotcon_polling_invokePtr = - _lookup>('iotcon_polling_invoke'); - late final _iotcon_polling_invoke = - _iotcon_polling_invokePtr.asFunction(); - - /// @brief Adds callback to show pin number which is generated automatically. - /// @details When a provisioning tool tries to register this device using random pin based \n - /// ownership transfer method, it makes pin number which is generated automatically be shown. - /// @since_tizen 3.0 - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_ALREADY Already done - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @pre iotcon_initialize() should be called to initialize. - /// @post When the device is registered by provisioning tool, iotcon_generated_pin_cb() will be called. - /// @see iotcon_remove_generated_pin_cb() - int iotcon_add_generated_pin_cb( - iotcon_generated_pin_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_add_generated_pin_cb( - cb, - user_data, - ); - } - - late final _iotcon_add_generated_pin_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_generated_pin_cb, - ffi.Pointer)>>('iotcon_add_generated_pin_cb'); - late final _iotcon_add_generated_pin_cb = - _iotcon_add_generated_pin_cbPtr.asFunction< - int Function(iotcon_generated_pin_cb, ffi.Pointer)>(); - - /// @brief Removes callback to show pin number which is generated automatically. - /// @details If this function is called, @a cb will be not called anymore. \n - /// For removing @a cb that is used at iotcon_add_generated_pin_cb() should be used. - /// @since_tizen 3.0 - /// @param[in] cb The callback function to invoke - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_add_generated_pin_cb() - int iotcon_remove_generated_pin_cb( - iotcon_generated_pin_cb cb, - ) { - return _iotcon_remove_generated_pin_cb( - cb, - ); - } - - late final _iotcon_remove_generated_pin_cbPtr = - _lookup>( - 'iotcon_remove_generated_pin_cb'); - late final _iotcon_remove_generated_pin_cb = - _iotcon_remove_generated_pin_cbPtr - .asFunction(); - - /// @brief Initializes for using MTP. - /// @since_tizen 3.0 - /// @remarks This function must be called before proceeding any other mtp functions. - /// @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// - /// @see mtp_deinitialize() - int mtp_initialize() { - return _mtp_initialize(); - } - - late final _mtp_initializePtr = - _lookup>('mtp_initialize'); - late final _mtp_initialize = _mtp_initializePtr.asFunction(); - - /// @brief Gets the mtp devices. - /// @since_tizen 3.0 - /// @param [out] mtp_devices The MTP device list - /// @param [out] device_count Length of device list - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// - /// @see mtp_initialize() - int mtp_get_devices( - ffi.Pointer> mtp_devices, - ffi.Pointer device_count, - ) { - return _mtp_get_devices( - mtp_devices, - device_count, - ); - } - - late final _mtp_get_devicesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, - ffi.Pointer)>>('mtp_get_devices'); - late final _mtp_get_devices = _mtp_get_devicesPtr.asFunction< - int Function( - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Gets mtp storages from the given device. - /// @since_tizen 3.0 - /// @remarks The @a mtp_storages should be freed using free(). - /// - /// @param [in] mtp_device The MTP device - /// @param [out] mtp_storages Current mtp storage list - /// @param [out] storage_count Length of storage list - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// - /// @see mtp_get_devices() - int mtp_get_storages( - int mtp_device, - ffi.Pointer> mtp_storages, - ffi.Pointer storage_count, - ) { - return _mtp_get_storages( - mtp_device, - mtp_storages, - storage_count, - ); - } - - late final _mtp_get_storagesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mtp_device_h, - ffi.Pointer>, - ffi.Pointer)>>('mtp_get_storages'); - late final _mtp_get_storages = _mtp_get_storagesPtr.asFunction< - int Function(int, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Gets object handles from the given device and storage. - /// @since_tizen 3.0 - /// @remarks The @a object_handles should be freed using free(). - /// @remarks If the @a parent is 0, it means "root folder" of mtp storage. - /// - /// @param [in] mtp_device The MTP device - /// @param [in] mtp_storage The MTP storage - /// @param [in] file_type The file type what you want - /// @param [in] parent The parent object handle - /// @param [out] object_handles The object handle list - /// @param [out] object_count Length of object handle list - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// - /// @see mtp_get_devices() - /// @see mtp_get_storages() - int mtp_get_object_handles( - int mtp_device, - int mtp_storage, - int file_type, - int parent, - ffi.Pointer> object_handles, - ffi.Pointer object_count, - ) { - return _mtp_get_object_handles( - mtp_device, - mtp_storage, - file_type, - parent, - object_handles, - object_count, - ); - } - - late final _mtp_get_object_handlesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mtp_device_h, - mtp_storage_h, - ffi.Int32, - mtp_object_h, - ffi.Pointer>, - ffi.Pointer)>>('mtp_get_object_handles'); - late final _mtp_get_object_handles = _mtp_get_object_handlesPtr.asFunction< - int Function(int, int, int, int, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Gets object for a given path from object handle. - /// @since_tizen 3.0 - /// @remarks The @a dest_path is host storage path. - /// @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n - /// - /// @param [in] mtp_device The MTP device - /// @param [in] object_handle The object handle - /// @param [in] dest_path The dest path - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_IO_ERROR I/O error - /// @retval #MTP_ERROR_PERMISSION_DENIED Permission denied - /// - /// @see mtp_get_devices() - /// @see mtp_get_object_handles() - int mtp_get_object( - int mtp_device, - int object_handle, - ffi.Pointer dest_path, - ) { - return _mtp_get_object( - mtp_device, - object_handle, - dest_path, - ); - } - - late final _mtp_get_objectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mtp_device_h, mtp_object_h, - ffi.Pointer)>>('mtp_get_object'); - late final _mtp_get_object = _mtp_get_objectPtr - .asFunction)>(); - - /// @brief Gets thumbnail from the given object handle. - /// @since_tizen 3.0 - /// @remarks The @a dest_path is host storage path. - /// @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. - /// - /// @param [in] mtp_device The MTP device - /// @param [in] object_handle The object handle - /// @param [in] dest_path The dest path - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_IO_ERROR I/O error - /// @retval #MTP_ERROR_PERMISSION_DENIED Permission denied - /// - /// @see mtp_get_devices() - /// @see mtp_get_object_handles() - int mtp_get_thumbnail( - int mtp_device, - int object_handle, - ffi.Pointer dest_path, - ) { - return _mtp_get_thumbnail( - mtp_device, - object_handle, - dest_path, - ); - } - - late final _mtp_get_thumbnailPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mtp_device_h, mtp_object_h, - ffi.Pointer)>>('mtp_get_thumbnail'); - late final _mtp_get_thumbnail = _mtp_get_thumbnailPtr - .asFunction)>(); - - /// @brief Adds a callback function for receiving MTP event. - /// @since_tizen 3.0 - /// @remarks You can register multiple callback. \n - /// If you don't want to receive the event, then using the mtp_remove_mtp_event_cb() function to unregister a callback. - /// @remarks If device state is changed, #MTP_EVENT_DEVICE_ADDED or #MTP_EVENT_DEVICE_REMOVED event is occur. \n - /// If storage state is changed, #MTP_EVENT_STORAGE_ADDED or #MTP_EVENT_STORAGE_REMOVED event is occur. \n - /// If object state is changed, #MTP_EVENT_OBJECT_ADDED or #MTP_EVENT_OBJECT_REMOVED event is occur. \n - /// If mtp service is turned off, #MTP_EVENT_TURNED_OFF event is occur. \n - /// - /// @param [in] event_cb The callback - /// @param [in] user_data The user data - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see mtp_remove_mtp_event_cb() - int mtp_add_mtp_event_cb( - mtp_event_cb event_cb, - ffi.Pointer user_data, - ) { - return _mtp_add_mtp_event_cb( - event_cb, - user_data, - ); - } - - late final _mtp_add_mtp_event_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mtp_event_cb, ffi.Pointer)>>('mtp_add_mtp_event_cb'); - late final _mtp_add_mtp_event_cb = _mtp_add_mtp_event_cbPtr - .asFunction)>(); - - /// @brief Removes the callback function. - /// @since_tizen 3.0 - /// - /// @param [in] event_cb The callback - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see mtp_add_mtp_event_cb() - int mtp_remove_mtp_event_cb( - mtp_event_cb event_cb, - ) { - return _mtp_remove_mtp_event_cb( - event_cb, - ); - } - - late final _mtp_remove_mtp_event_cbPtr = - _lookup>( - 'mtp_remove_mtp_event_cb'); - late final _mtp_remove_mtp_event_cb = - _mtp_remove_mtp_event_cbPtr.asFunction(); - - /// @brief Deinitializes MTP operation. - /// @since_tizen 3.0 - /// @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_PERMISSION_DENIED Permission Denied - /// - /// @see mtp_initialize() - int mtp_deinitialize() { - return _mtp_deinitialize(); - } - - late final _mtp_deinitializePtr = - _lookup>('mtp_deinitialize'); - late final _mtp_deinitialize = - _mtp_deinitializePtr.asFunction(); - - /// @brief Gets the manufacturer name of the device information. - /// @since_tizen 3.0 - /// @remarks The @a manufacturer_name should be freed using free(). - /// - /// @param [in] mtp_device The MTP device - /// @param [out] manufacturer_name The manufacturer name of Device information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_CONTROLLER MTP controller error - /// @retval #MTP_ERROR_OUT_OF_MEMORY Memory Allocation failed - /// @retval #MTP_ERROR_NO_DEVICE MTP have not any device - /// - /// @see mtp_get_devices() - int mtp_deviceinfo_get_manufacturer_name( - int mtp_device, - ffi.Pointer> manufacturer_name, - ) { - return _mtp_deviceinfo_get_manufacturer_name( - mtp_device, - manufacturer_name, - ); - } - - late final _mtp_deviceinfo_get_manufacturer_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mtp_device_h, ffi.Pointer>)>>( - 'mtp_deviceinfo_get_manufacturer_name'); - late final _mtp_deviceinfo_get_manufacturer_name = - _mtp_deviceinfo_get_manufacturer_namePtr - .asFunction>)>(); - - /// @brief Gets the model name of the device information. - /// @since_tizen 3.0 - /// @remarks The @a model_name should be freed using free(). - /// - /// @param [in] mtp_device The MTP device - /// @param [out] model_name The model name of Device information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_CONTROLLER MTP controller error - /// @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MTP_ERROR_NO_DEVICE MTP have not any device - /// - /// @see mtp_get_devices() - int mtp_deviceinfo_get_model_name( - int mtp_device, - ffi.Pointer> model_name, - ) { - return _mtp_deviceinfo_get_model_name( - mtp_device, - model_name, - ); - } - - late final _mtp_deviceinfo_get_model_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mtp_device_h, ffi.Pointer>)>>( - 'mtp_deviceinfo_get_model_name'); - late final _mtp_deviceinfo_get_model_name = _mtp_deviceinfo_get_model_namePtr - .asFunction>)>(); - - /// @brief Gets the serial number of the device information. - /// @since_tizen 3.0 - /// @remarks The @a serial_number should be freed using free(). - /// - /// @param [in] mtp_device The MTP device - /// @param [out] serial_number The serial number of Device information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_CONTROLLER MTP controller error - /// @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MTP_ERROR_NO_DEVICE MTP have not any device - /// - /// @see mtp_get_devices() - int mtp_deviceinfo_get_serial_number( - int mtp_device, - ffi.Pointer> serial_number, - ) { - return _mtp_deviceinfo_get_serial_number( - mtp_device, - serial_number, - ); - } - - late final _mtp_deviceinfo_get_serial_numberPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mtp_device_h, ffi.Pointer>)>>( - 'mtp_deviceinfo_get_serial_number'); - late final _mtp_deviceinfo_get_serial_number = - _mtp_deviceinfo_get_serial_numberPtr - .asFunction>)>(); - - /// @brief Gets the device version of the device information. - /// @since_tizen 3.0 - /// @remarks The @a device_version should be freed using free(). - /// - /// @param [in] mtp_device The MTP device - /// @param [out] device_version The device version of Device information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_CONTROLLER MTP controller error - /// @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MTP_ERROR_NO_DEVICE MTP have not any device - /// - /// @see mtp_get_devices() - int mtp_deviceinfo_get_device_version( - int mtp_device, - ffi.Pointer> device_version, - ) { - return _mtp_deviceinfo_get_device_version( - mtp_device, - device_version, - ); - } - - late final _mtp_deviceinfo_get_device_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mtp_device_h, ffi.Pointer>)>>( - 'mtp_deviceinfo_get_device_version'); - late final _mtp_deviceinfo_get_device_version = - _mtp_deviceinfo_get_device_versionPtr - .asFunction>)>(); - - /// @brief Gets the description of the storage information. - /// @since_tizen 3.0 - /// @remarks The @a description should be freed using free(). - /// - /// @param [in] mtp_device The MTP device - /// @param [in] mtp_storage The MTP storage - /// @param [out] description The description of Storage information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_CONTROLLER MTP controller error - /// @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MTP_ERROR_NO_DEVICE MTP have not any device - /// - /// @see mtp_get_storages() - int mtp_storageinfo_get_description( - int mtp_device, - int mtp_storage, - ffi.Pointer> description, - ) { - return _mtp_storageinfo_get_description( - mtp_device, - mtp_storage, - description, - ); - } - - late final _mtp_storageinfo_get_descriptionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mtp_device_h, mtp_storage_h, - ffi.Pointer>)>>( - 'mtp_storageinfo_get_description'); - late final _mtp_storageinfo_get_description = - _mtp_storageinfo_get_descriptionPtr.asFunction< - int Function(int, int, ffi.Pointer>)>(); - - /// @brief Gets the free space of the storage information in bytes. - /// @since_tizen 3.0 - /// - /// @param [in] mtp_device The MTP device - /// @param [in] mtp_storage The MTP storage - /// @param [out] free_space The free space of Storage information (bytes) - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_CONTROLLER MTP controller error - /// @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MTP_ERROR_NO_DEVICE MTP have not any device - /// - /// @see mtp_get_storages() - int mtp_storageinfo_get_free_space( - int mtp_device, - int mtp_storage, - ffi.Pointer free_space, - ) { - return _mtp_storageinfo_get_free_space( - mtp_device, - mtp_storage, - free_space, - ); - } - - late final _mtp_storageinfo_get_free_spacePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mtp_device_h, mtp_storage_h, - ffi.Pointer)>>( - 'mtp_storageinfo_get_free_space'); - late final _mtp_storageinfo_get_free_space = - _mtp_storageinfo_get_free_spacePtr.asFunction< - int Function(int, int, ffi.Pointer)>(); - - /// @brief Gets the max capacity of the storage information in bytes. - /// @since_tizen 3.0 - /// - /// @param [in] mtp_device The MTP device - /// @param [in] mtp_storage The MTP storage - /// @param [out] max_capacity The max capacity of Storage information (bytes) - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_CONTROLLER MTP controller error - /// @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MTP_ERROR_NO_DEVICE MTP have not any device - /// - /// @see mtp_get_storages() - int mtp_storageinfo_get_max_capacity( - int mtp_device, - int mtp_storage, - ffi.Pointer max_capacity, - ) { - return _mtp_storageinfo_get_max_capacity( - mtp_device, - mtp_storage, - max_capacity, - ); - } - - late final _mtp_storageinfo_get_max_capacityPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mtp_device_h, mtp_storage_h, - ffi.Pointer)>>( - 'mtp_storageinfo_get_max_capacity'); - late final _mtp_storageinfo_get_max_capacity = - _mtp_storageinfo_get_max_capacityPtr.asFunction< - int Function(int, int, ffi.Pointer)>(); - - /// @brief Gets the storage type of the storage information. - /// @since_tizen 3.0 - /// - /// @param [in] mtp_device The MTP device - /// @param [in] mtp_storage The MTP storage - /// @param [out] storage_type The storage type of Storage information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_CONTROLLER MTP controller error - /// @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MTP_ERROR_NO_DEVICE MTP have not any device - /// - /// @see mtp_get_storages() - int mtp_storageinfo_get_storage_type( - int mtp_device, - int mtp_storage, - ffi.Pointer storage_type, - ) { - return _mtp_storageinfo_get_storage_type( - mtp_device, - mtp_storage, - storage_type, - ); - } - - late final _mtp_storageinfo_get_storage_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mtp_device_h, mtp_storage_h, - ffi.Pointer)>>('mtp_storageinfo_get_storage_type'); - late final _mtp_storageinfo_get_storage_type = - _mtp_storageinfo_get_storage_typePtr - .asFunction)>(); - - /// @brief Gets the volume identifier of the storage information. - /// @since_tizen 3.0 - /// @remarks The @a volume_identifier should be freed using free(). - /// - /// @param [in] mtp_device The MTP device - /// @param [in] mtp_storage The MTP storage - /// @param [out] volume_identifier The volume identifier of Storage information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_CONTROLLER MTP controller error - /// @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MTP_ERROR_NO_DEVICE MTP have not any device - /// - /// @see mtp_get_object_handles() - int mtp_storageinfo_get_volume_identifier( - int mtp_device, - int mtp_storage, - ffi.Pointer> volume_identifier, - ) { - return _mtp_storageinfo_get_volume_identifier( - mtp_device, - mtp_storage, - volume_identifier, - ); - } - - late final _mtp_storageinfo_get_volume_identifierPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mtp_device_h, mtp_storage_h, - ffi.Pointer>)>>( - 'mtp_storageinfo_get_volume_identifier'); - late final _mtp_storageinfo_get_volume_identifier = - _mtp_storageinfo_get_volume_identifierPtr.asFunction< - int Function(int, int, ffi.Pointer>)>(); - - /// @brief Gets the filename of the object information. - /// @since_tizen 3.0 - /// @remarks The @a file_name should be freed using free(). - /// - /// @param [in] mtp_device The MTP device - /// @param [in] object_handle The object handle - /// @param [out] file_name The file name of Object information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_CONTROLLER MTP controller error - /// @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MTP_ERROR_NO_DEVICE MTP have not any device - /// @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed - /// - /// @see mtp_get_object_handles() - int mtp_objectinfo_get_file_name( - int mtp_device, - int object_handle, - ffi.Pointer> file_name, - ) { - return _mtp_objectinfo_get_file_name( - mtp_device, - object_handle, - file_name, - ); - } - - late final _mtp_objectinfo_get_file_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mtp_device_h, mtp_object_h, - ffi.Pointer>)>>( - 'mtp_objectinfo_get_file_name'); - late final _mtp_objectinfo_get_file_name = _mtp_objectinfo_get_file_namePtr - .asFunction>)>(); - - /// @brief Gets the keywords of the object information. - /// @since_tizen 3.0 - /// @remarks The @a keywords should be freed using free(). - /// @remarks The keywords are separated by comma. - /// - /// @param [in] mtp_device The MTP device - /// @param [in] object_handle The object handle - /// @param [out] keywords The keywords of Object information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_CONTROLLER MTP controller error - /// @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MTP_ERROR_NO_DEVICE MTP have not any device - /// @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed - /// - /// @see mtp_get_object_handles() - int mtp_objectinfo_get_keywords( - int mtp_device, - int object_handle, - ffi.Pointer> keywords, - ) { - return _mtp_objectinfo_get_keywords( - mtp_device, - object_handle, - keywords, - ); - } - - late final _mtp_objectinfo_get_keywordsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mtp_device_h, mtp_object_h, - ffi.Pointer>)>>( - 'mtp_objectinfo_get_keywords'); - late final _mtp_objectinfo_get_keywords = _mtp_objectinfo_get_keywordsPtr - .asFunction>)>(); - - /// @brief Gets the association desc of the object information. - /// @since_tizen 3.0 - /// - /// @param [in] mtp_device The MTP device - /// @param [in] object_handle The object handle - /// @param [out] asso_desc The association description of Object information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_CONTROLLER MTP controller error - /// @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MTP_ERROR_NO_DEVICE MTP have not any device - /// @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed - /// - /// @see mtp_get_object_handles() - int mtp_objectinfo_get_association_desc( - int mtp_device, - int object_handle, - ffi.Pointer asso_desc, - ) { - return _mtp_objectinfo_get_association_desc( - mtp_device, - object_handle, - asso_desc, - ); - } - - late final _mtp_objectinfo_get_association_descPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mtp_device_h, mtp_object_h, - ffi.Pointer)>>('mtp_objectinfo_get_association_desc'); - late final _mtp_objectinfo_get_association_desc = - _mtp_objectinfo_get_association_descPtr - .asFunction)>(); - - /// @brief Gets the association type of the object information. - /// @since_tizen 3.0 - /// - /// @param [in] mtp_device The MTP device - /// @param [in] object_handle The object handle - /// @param [out] asso_type The association type of Object information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_CONTROLLER MTP controller error - /// @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MTP_ERROR_NO_DEVICE MTP have not any device - /// @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed - /// - /// @see mtp_get_object_handles() - int mtp_objectinfo_get_association_type( - int mtp_device, - int object_handle, - ffi.Pointer asso_type, - ) { - return _mtp_objectinfo_get_association_type( - mtp_device, - object_handle, - asso_type, - ); - } - - late final _mtp_objectinfo_get_association_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mtp_device_h, mtp_object_h, - ffi.Pointer)>>('mtp_objectinfo_get_association_type'); - late final _mtp_objectinfo_get_association_type = - _mtp_objectinfo_get_association_typePtr - .asFunction)>(); - - /// @brief Gets the size of the object information. - /// @since_tizen 3.0 - /// - /// @param [in] mtp_device The MTP device - /// @param [in] object_handle The object handle - /// @param [out] size The size of Object information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_CONTROLLER MTP controller error - /// @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MTP_ERROR_NO_DEVICE MTP have not any device - /// @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed - /// - /// @see mtp_get_object_handles() - int mtp_objectinfo_get_size( - int mtp_device, - int object_handle, - ffi.Pointer size, - ) { - return _mtp_objectinfo_get_size( - mtp_device, - object_handle, - size, - ); - } - - late final _mtp_objectinfo_get_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mtp_device_h, mtp_object_h, - ffi.Pointer)>>('mtp_objectinfo_get_size'); - late final _mtp_objectinfo_get_size = _mtp_objectinfo_get_sizePtr - .asFunction)>(); - - /// @brief Gets the parent object handle of the object information. - /// @since_tizen 3.0 - /// - /// @param [in] mtp_device The MTP device - /// @param [in] object_handle The object handle - /// @param [out] parent_object_handle The parent of Object information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_CONTROLLER MTP controller error - /// @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MTP_ERROR_NO_DEVICE MTP have not any device - /// @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed - /// - /// @see mtp_get_object_handles() - int mtp_objectinfo_get_parent_object_handle( - int mtp_device, - int object_handle, - ffi.Pointer parent_object_handle, - ) { - return _mtp_objectinfo_get_parent_object_handle( - mtp_device, - object_handle, - parent_object_handle, - ); - } - - late final _mtp_objectinfo_get_parent_object_handlePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mtp_device_h, mtp_object_h, ffi.Pointer)>>( - 'mtp_objectinfo_get_parent_object_handle'); - late final _mtp_objectinfo_get_parent_object_handle = - _mtp_objectinfo_get_parent_object_handlePtr - .asFunction)>(); - - /// @brief Gets the mtp storage of the object information. - /// @since_tizen 3.0 - /// - /// @param [in] mtp_device The MTP device - /// @param [in] object_handle The object handle - /// @param [out] mtp_storage The MTP storage of Object information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_CONTROLLER MTP controller error - /// @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MTP_ERROR_NO_DEVICE MTP have not any device - /// @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed - /// - /// @see mtp_get_object_handles() - int mtp_objectinfo_get_storage( - int mtp_device, - int object_handle, - ffi.Pointer mtp_storage, - ) { - return _mtp_objectinfo_get_storage( - mtp_device, - object_handle, - mtp_storage, - ); - } - - late final _mtp_objectinfo_get_storagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mtp_device_h, mtp_object_h, - ffi.Pointer)>>('mtp_objectinfo_get_storage'); - late final _mtp_objectinfo_get_storage = _mtp_objectinfo_get_storagePtr - .asFunction)>(); - - /// @brief Gets the object created time of the object information. - /// @since_tizen 3.0 - /// @remarks When interpreted as an absolute time value, \n - /// @a data_created represents the number of seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). - /// - /// @param [in] mtp_device The MTP device - /// @param [in] object_handle The object handle - /// @param [out] date_created The object created time of Object information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_CONTROLLER MTP controller error - /// @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MTP_ERROR_NO_DEVICE MTP have not any device - /// @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed - /// - /// @see mtp_get_object_handles() - int mtp_objectinfo_get_date_created( - int mtp_device, - int object_handle, - ffi.Pointer date_created, - ) { - return _mtp_objectinfo_get_date_created( - mtp_device, - object_handle, - date_created, - ); - } - - late final _mtp_objectinfo_get_date_createdPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mtp_device_h, mtp_object_h, - ffi.Pointer)>>('mtp_objectinfo_get_date_created'); - late final _mtp_objectinfo_get_date_created = - _mtp_objectinfo_get_date_createdPtr - .asFunction)>(); - - /// @brief Gets the object modified time of the object information. - /// @since_tizen 3.0 - /// @remarks When interpreted as an absolute time value, \n - /// @a data_modified represents the number of seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). - /// - /// @param [in] mtp_device The MTP device - /// @param [in] object_handle The object handle - /// @param [out] date_modified The object modified time of Object information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_CONTROLLER MTP controller error - /// @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MTP_ERROR_NO_DEVICE MTP have not any device - /// @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed - /// - /// @see mtp_get_object_handles() - int mtp_objectinfo_get_date_modified( - int mtp_device, - int object_handle, - ffi.Pointer date_modified, - ) { - return _mtp_objectinfo_get_date_modified( - mtp_device, - object_handle, - date_modified, - ); - } - - late final _mtp_objectinfo_get_date_modifiedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mtp_device_h, mtp_object_h, - ffi.Pointer)>>('mtp_objectinfo_get_date_modified'); - late final _mtp_objectinfo_get_date_modified = - _mtp_objectinfo_get_date_modifiedPtr - .asFunction)>(); - - /// @brief Gets the file type of the object information. - /// @since_tizen 3.0 - /// - /// @param [in] mtp_device The MTP device - /// @param [in] object_handle The object handle - /// @param [out] file_type The file type of Object information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_CONTROLLER MTP controller error - /// @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MTP_ERROR_NO_DEVICE MTP have not any device - /// @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed - /// - /// @see mtp_get_object_handles() - int mtp_objectinfo_get_file_type( - int mtp_device, - int object_handle, - ffi.Pointer file_type, - ) { - return _mtp_objectinfo_get_file_type( - mtp_device, - object_handle, - file_type, - ); - } - - late final _mtp_objectinfo_get_file_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mtp_device_h, mtp_object_h, - ffi.Pointer)>>('mtp_objectinfo_get_file_type'); - late final _mtp_objectinfo_get_file_type = _mtp_objectinfo_get_file_typePtr - .asFunction)>(); - - /// @brief Gets the image bit depth of the object information. - /// @since_tizen 3.0 - /// - /// @param [in] mtp_device The MTP device - /// @param [in] object_handle The object handle - /// @param [out] depth The image bit depth of Object information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_CONTROLLER MTP controller error - /// @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MTP_ERROR_NO_DEVICE MTP have not any device - /// @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed - /// - /// @see mtp_get_object_handles() - int mtp_objectinfo_get_image_bit_depth( - int mtp_device, - int object_handle, - ffi.Pointer depth, - ) { - return _mtp_objectinfo_get_image_bit_depth( - mtp_device, - object_handle, - depth, - ); - } - - late final _mtp_objectinfo_get_image_bit_depthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mtp_device_h, mtp_object_h, - ffi.Pointer)>>('mtp_objectinfo_get_image_bit_depth'); - late final _mtp_objectinfo_get_image_bit_depth = - _mtp_objectinfo_get_image_bit_depthPtr - .asFunction)>(); - - /// @brief Gets the image pixel width of the object information. - /// @since_tizen 3.0 - /// - /// @param [in] mtp_device The MTP device - /// @param [in] object_handle The object handle - /// @param [out] width The image pixel width of Object information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_CONTROLLER MTP controller error - /// @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MTP_ERROR_NO_DEVICE MTP have not any device - /// @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed - /// - /// @see mtp_get_object_handles() - int mtp_objectinfo_get_image_pix_width( - int mtp_device, - int object_handle, - ffi.Pointer width, - ) { - return _mtp_objectinfo_get_image_pix_width( - mtp_device, - object_handle, - width, - ); - } - - late final _mtp_objectinfo_get_image_pix_widthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mtp_device_h, mtp_object_h, - ffi.Pointer)>>('mtp_objectinfo_get_image_pix_width'); - late final _mtp_objectinfo_get_image_pix_width = - _mtp_objectinfo_get_image_pix_widthPtr - .asFunction)>(); - - /// @brief Gets the image pixel height of the object information. - /// @since_tizen 3.0 - /// - /// @param [in] mtp_device The MTP device - /// @param [in] object_handle The object handle - /// @param [out] height The image pixel height of Object information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_CONTROLLER MTP controller error - /// @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MTP_ERROR_NO_DEVICE MTP have not any device - /// @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed - /// - /// @see mtp_get_object_handles() - int mtp_objectinfo_get_image_pix_height( - int mtp_device, - int object_handle, - ffi.Pointer height, - ) { - return _mtp_objectinfo_get_image_pix_height( - mtp_device, - object_handle, - height, - ); - } - - late final _mtp_objectinfo_get_image_pix_heightPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mtp_device_h, mtp_object_h, - ffi.Pointer)>>('mtp_objectinfo_get_image_pix_height'); - late final _mtp_objectinfo_get_image_pix_height = - _mtp_objectinfo_get_image_pix_heightPtr - .asFunction)>(); - - /// @brief Gets the thumbnail size of the object information. - /// @since_tizen 3.0 - /// - /// @param [in] mtp_device The MTP device - /// @param [in] object_handle The object handle - /// @param [out] size The thumbnail size of Object information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_CONTROLLER MTP controller error - /// @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MTP_ERROR_NO_DEVICE MTP have not any device - /// @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed - /// - /// @see mtp_get_object_handles() - int mtp_objectinfo_get_thumbnail_size( - int mtp_device, - int object_handle, - ffi.Pointer size, - ) { - return _mtp_objectinfo_get_thumbnail_size( - mtp_device, - object_handle, - size, - ); - } - - late final _mtp_objectinfo_get_thumbnail_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mtp_device_h, mtp_object_h, - ffi.Pointer)>>('mtp_objectinfo_get_thumbnail_size'); - late final _mtp_objectinfo_get_thumbnail_size = - _mtp_objectinfo_get_thumbnail_sizePtr - .asFunction)>(); - - /// @brief Gets the thumbnail file type of the object information. - /// @since_tizen 3.0 - /// - /// @param [in] mtp_device The MTP device - /// @param [in] object_handle The object handle - /// @param [out] file_type The file type of Object information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_CONTROLLER MTP controller error - /// @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MTP_ERROR_NO_DEVICE MTP have not any device - /// @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed - /// - /// @see mtp_get_object_handles() - int mtp_objectinfo_get_thumbnail_file_type( - int mtp_device, - int object_handle, - ffi.Pointer file_type, - ) { - return _mtp_objectinfo_get_thumbnail_file_type( - mtp_device, - object_handle, - file_type, - ); - } - - late final _mtp_objectinfo_get_thumbnail_file_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mtp_device_h, mtp_object_h, ffi.Pointer)>>( - 'mtp_objectinfo_get_thumbnail_file_type'); - late final _mtp_objectinfo_get_thumbnail_file_type = - _mtp_objectinfo_get_thumbnail_file_typePtr - .asFunction)>(); - - /// @brief Gets the thumbnail pixel height of the object information. - /// @since_tizen 3.0 - /// - /// @param [in] mtp_device The MTP device - /// @param [in] object_handle The object handle - /// @param [out] height The thumbnail pixel height of Object information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_CONTROLLER MTP controller error - /// @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MTP_ERROR_NO_DEVICE MTP have not any device - /// @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed - /// - /// @see mtp_get_object_handles() - int mtp_objectinfo_get_thumbnail_pix_height( - int mtp_device, - int object_handle, - ffi.Pointer height, - ) { - return _mtp_objectinfo_get_thumbnail_pix_height( - mtp_device, - object_handle, - height, - ); - } - - late final _mtp_objectinfo_get_thumbnail_pix_heightPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mtp_device_h, mtp_object_h, ffi.Pointer)>>( - 'mtp_objectinfo_get_thumbnail_pix_height'); - late final _mtp_objectinfo_get_thumbnail_pix_height = - _mtp_objectinfo_get_thumbnail_pix_heightPtr - .asFunction)>(); - - /// @brief Gets the thumbnail pixel width of the object information. - /// @since_tizen 3.0 - /// - /// @param [in] mtp_device The MTP device - /// @param [in] object_handle The object handle - /// @param [out] width The thumbnail pixel width of Object information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MTP_ERROR_NONE Successful - /// @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported - /// @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized - /// @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated - /// @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized - /// @retval #MTP_ERROR_COMM_ERROR MTP communication error - /// @retval #MTP_ERROR_CONTROLLER MTP controller error - /// @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MTP_ERROR_NO_DEVICE MTP have not any device - /// @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed - /// - /// @see mtp_get_object_handles() - int mtp_objectinfo_get_thumbnail_pix_width( - int mtp_device, - int object_handle, - ffi.Pointer width, - ) { - return _mtp_objectinfo_get_thumbnail_pix_width( - mtp_device, - object_handle, - width, - ); - } - - late final _mtp_objectinfo_get_thumbnail_pix_widthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mtp_device_h, mtp_object_h, - ffi.Pointer)>>('mtp_objectinfo_get_thumbnail_pix_width'); - late final _mtp_objectinfo_get_thumbnail_pix_width = - _mtp_objectinfo_get_thumbnail_pix_widthPtr - .asFunction)>(); - - /// @brief Initializes SSDP. - /// @since_tizen 3.0 - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #SSDP_ERROR_NONE Successful - /// @retval #SSDP_ERROR_OPERATION_FAILED Operation failed - /// @retval #SSDP_ERROR_NOT_SUPPORTED Not supported - int ssdp_initialize() { - return _ssdp_initialize(); - } - - late final _ssdp_initializePtr = - _lookup>('ssdp_initialize'); - late final _ssdp_initialize = - _ssdp_initializePtr.asFunction(); - - /// @brief Deinitializes SSDP. - /// @since_tizen 3.0 - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #SSDP_ERROR_NONE Successful - /// @retval #SSDP_ERROR_NOT_SUPPORTED Not supported - int ssdp_deinitialize() { - return _ssdp_deinitialize(); - } - - late final _ssdp_deinitializePtr = - _lookup>('ssdp_deinitialize'); - late final _ssdp_deinitialize = - _ssdp_deinitializePtr.asFunction(); - - /// @brief Creates a SSDP local service handle. - /// @since_tizen 3.0 - /// @remarks You must release @a local_service using ssdp_destroy_local_service(). - /// @param[in] target The SSDP local service's target. It may be a device type or a service type specified in UPnP forum (http://upnp.org) - /// @param[out] local_service The SSDP local service handle - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #SSDP_ERROR_NONE Successful - /// @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #SSDP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SSDP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SSDP_ERROR_NOT_SUPPORTED Not supported - /// @see ssdp_destroy_local_service() - /// @pre This API needs ssdp_initialize() before use. - int ssdp_create_local_service( - ffi.Pointer target, - ffi.Pointer local_service, - ) { - return _ssdp_create_local_service( - target, - local_service, - ); - } - - late final _ssdp_create_local_servicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('ssdp_create_local_service'); - late final _ssdp_create_local_service = - _ssdp_create_local_servicePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys the SSDP local service handle. - /// @details You must call ssdp_deregister_local_service() before destroying the local service. - /// @since_tizen 3.0 - /// @param[in] local_service The SSDP local service handle - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #SSDP_ERROR_NONE Successful - /// @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #SSDP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found - /// @retval #SSDP_ERROR_NOT_SUPPORTED Not supported - /// @see ssdp_create_local_service() - int ssdp_destroy_local_service( - int local_service, - ) { - return _ssdp_destroy_local_service( - local_service, - ); - } - - late final _ssdp_destroy_local_servicePtr = - _lookup>( - 'ssdp_destroy_local_service'); - late final _ssdp_destroy_local_service = - _ssdp_destroy_local_servicePtr.asFunction(); - - /// @brief Sets the USN (Unique Service Name) of SSDP local service. The USN format is specified in UPnP forum (http://upnp.org). - /// @since_tizen 3.0 - /// @remarks You must pass only @a unregistered local_service created using ssdp_create_local_service(). - /// If @a local_service is already registered, you cannot set @a usn. - /// @param[in] local_service The SSDP local service handle - /// @param[in] usn The USN of SSDP local service - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #SSDP_ERROR_NONE Successful - /// @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found - /// @retval #SSDP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SSDP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SSDP_ERROR_NOT_SUPPORTED Not supported - int ssdp_service_set_usn( - int local_service, - ffi.Pointer usn, - ) { - return _ssdp_service_set_usn( - local_service, - usn, - ); - } - - late final _ssdp_service_set_usnPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ssdp_service_h, ffi.Pointer)>>('ssdp_service_set_usn'); - late final _ssdp_service_set_usn = _ssdp_service_set_usnPtr - .asFunction)>(); - - /// @brief Sets the URL (Uniform Resource Locator) for description of SSDP local service. See RFC 3986. - /// @since_tizen 3.0 - /// @remarks You must pass only unregistered @a local_service created using ssdp_create_local_service(). - /// If @a local_service is already registered, you cannot set @a url. - /// @param[in] local_service The SSDP local service handle - /// @param[in] url The URL of SSDP local service - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #SSDP_ERROR_NONE Successful - /// @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found - /// @retval #SSDP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SSDP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SSDP_ERROR_NOT_SUPPORTED Not supported - int ssdp_service_set_url( - int local_service, - ffi.Pointer url, - ) { - return _ssdp_service_set_url( - local_service, - url, - ); - } - - late final _ssdp_service_set_urlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ssdp_service_h, ffi.Pointer)>>('ssdp_service_set_url'); - late final _ssdp_service_set_url = _ssdp_service_set_urlPtr - .asFunction)>(); - - /// @brief Gets the target of SSDP service. - /// @since_tizen 3.0 - /// @remarks You must release @a target using free(). - /// @param[in] service The SSDP service handle - /// @param[out] target The target of SSDP service - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #SSDP_ERROR_NONE Successful - /// @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found - /// @retval #SSDP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SSDP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SSDP_ERROR_NOT_SUPPORTED Not supported - int ssdp_service_get_target( - int service, - ffi.Pointer> target, - ) { - return _ssdp_service_get_target( - service, - target, - ); - } - - late final _ssdp_service_get_targetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ssdp_service_h, - ffi.Pointer>)>>('ssdp_service_get_target'); - late final _ssdp_service_get_target = _ssdp_service_get_targetPtr - .asFunction>)>(); - - /// @brief Gets the USN of SSDP service. - /// @since_tizen 3.0 - /// @remarks You must release @a usn using free(). - /// @param[in] service The SSDP service handle - /// @param[out] usn The USN of SSDP service - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #SSDP_ERROR_NONE Successful - /// @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found - /// @retval #SSDP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SSDP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SSDP_ERROR_NOT_SUPPORTED Not supported - int ssdp_service_get_usn( - int service, - ffi.Pointer> usn, - ) { - return _ssdp_service_get_usn( - service, - usn, - ); - } - - late final _ssdp_service_get_usnPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ssdp_service_h, - ffi.Pointer>)>>('ssdp_service_get_usn'); - late final _ssdp_service_get_usn = _ssdp_service_get_usnPtr - .asFunction>)>(); - - /// @brief Gets the URL of SSDP service. - /// @since_tizen 3.0 - /// @remarks You must release @a url using free(). - /// @param[in] service The SSDP service handle - /// @param[out] url The URL of SSDP service - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #SSDP_ERROR_NONE Successful - /// @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found - /// @retval #SSDP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SSDP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SSDP_ERROR_NOT_SUPPORTED Not supported - int ssdp_service_get_url( - int service, - ffi.Pointer> url, - ) { - return _ssdp_service_get_url( - service, - url, - ); - } - - late final _ssdp_service_get_urlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ssdp_service_h, - ffi.Pointer>)>>('ssdp_service_get_url'); - late final _ssdp_service_get_url = _ssdp_service_get_urlPtr - .asFunction>)>(); - - /// @brief Registers the SSDP local service for publishing. - /// @details You must set a USN and a URL of the local service before ssdp_register_local_service() is called. - /// @since_tizen 3.0 - /// @remarks You must pass only local_service created using ssdp_create_local_service(). - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] local_service The SSDP local service handle - /// @param[in] registered_cb The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #SSDP_ERROR_NONE Successful - /// @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found - /// @retval #SSDP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SSDP_ERROR_OPERATION_FAILED Operation failed - /// @retval #SSDP_ERROR_NOT_SUPPORTED Not supported - /// @retval #SSDP_ERROR_SERVICE_ALREADY_REGISTERED Service already registered - /// @retval #SSDP_ERROR_PERMISSION_DENIED Permission Denied - /// @pre This API needs ssdp_service_set_usn() and ssdp_service_set_url() before use. - int ssdp_register_local_service( - int local_service, - ssdp_registered_cb registered_cb, - ffi.Pointer user_data, - ) { - return _ssdp_register_local_service( - local_service, - registered_cb, - user_data, - ); - } - - late final _ssdp_register_local_servicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ssdp_service_h, ssdp_registered_cb, - ffi.Pointer)>>('ssdp_register_local_service'); - late final _ssdp_register_local_service = - _ssdp_register_local_servicePtr.asFunction< - int Function(int, ssdp_registered_cb, ffi.Pointer)>(); - - /// @brief Deregisters the SSDP local service. - /// @since_tizen 3.0 - /// @remarks You must pass only local_service created using ssdp_create_local_service(). - /// @param[in] local_service The SSDP local service handle - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #SSDP_ERROR_NONE Successful - /// @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found - /// @retval #SSDP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SSDP_ERROR_NOT_SUPPORTED Not supported - int ssdp_deregister_local_service( - int local_service, - ) { - return _ssdp_deregister_local_service( - local_service, - ); - } - - late final _ssdp_deregister_local_servicePtr = - _lookup>( - 'ssdp_deregister_local_service'); - late final _ssdp_deregister_local_service = - _ssdp_deregister_local_servicePtr.asFunction(); - - /// @brief Starts browsing the SSDP remote service. - /// @details ssdp_start_browsing_service() keeps browsing services until calling ssdp_stop_browsing_service(). - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] target The target to browse - /// @param[out] ssdp_browser The SSDP browser handle - /// @param[in] found_cb The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #SSDP_ERROR_NONE Successful - /// @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found - /// @retval #SSDP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SSDP_ERROR_OPERATION_FAILED Operation failed - /// @retval #SSDP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SSDP_ERROR_NOT_SUPPORTED Not supported - /// @retval #SSDP_ERROR_PERMISSION_DENIED Permission Denied - int ssdp_start_browsing_service( - ffi.Pointer target, - ffi.Pointer ssdp_browser, - ssdp_found_cb found_cb, - ffi.Pointer user_data, - ) { - return _ssdp_start_browsing_service( - target, - ssdp_browser, - found_cb, - user_data, - ); - } - - late final _ssdp_start_browsing_servicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ssdp_found_cb, - ffi.Pointer)>>('ssdp_start_browsing_service'); - late final _ssdp_start_browsing_service = - _ssdp_start_browsing_servicePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ssdp_found_cb, ffi.Pointer)>(); - - /// @brief Stops browsing the SSDP remote service. - /// @since_tizen 3.0 - /// @param[in] ssdp_browser The SSDP browser handle - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #SSDP_ERROR_NONE Successful - /// @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found - /// @retval #SSDP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SSDP_ERROR_NOT_SUPPORTED Not supported - int ssdp_stop_browsing_service( - int ssdp_browser, - ) { - return _ssdp_stop_browsing_service( - ssdp_browser, - ); - } - - late final _ssdp_stop_browsing_servicePtr = - _lookup>( - 'ssdp_stop_browsing_service'); - late final _ssdp_stop_browsing_service = - _ssdp_stop_browsing_servicePtr.asFunction(); - - /// @brief Initializes smartcard service - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/secureelement - /// @ingroup CAPI_NETWORK_SMARTCARD_SE_SERVICE_MODULE - /// - /// @remarks This function must be called before proceeding any other smartcard function - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #SMARTCARD_ERROR_NONE Successful - /// @retval #SMARTCARD_ERROR_GENERAL A general error occurred - /// @retval #SMARTCARD_ERROR_NOT_SUPPORTED Not supported - /// @retval #SMARTCARD_ERROR_PERMISSION_DENIED Permission denied - /// - /// @see smartcard_deinitialize() - int smartcard_initialize() { - return _smartcard_initialize(); - } - - late final _smartcard_initializePtr = - _lookup>('smartcard_initialize'); - late final _smartcard_initialize = - _smartcard_initializePtr.asFunction(); - - /// @brief Deinitializes smartcard service - /// @details Releases all the resource of the smartcard service - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/secureelement - /// @ingroup CAPI_NETWORK_SMARTCARD_SE_SERVICE_MODULE - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #SMARTCARD_ERROR_NONE Successful - /// @retval #SMARTCARD_ERROR_GENERAL A general error occurred - /// @retval #SMARTCARD_ERROR_NOT_INITIALIZED Smartcard service not initialized - /// @retval #SMARTCARD_ERROR_NOT_SUPPORTED Not supported - /// @retval #SMARTCARD_ERROR_PERMISSION_DENIED Permission denied - /// - /// @see smartcard_initialize() - int smartcard_deinitialize() { - return _smartcard_deinitialize(); - } - - late final _smartcard_deinitializePtr = - _lookup>('smartcard_deinitialize'); - late final _smartcard_deinitialize = - _smartcard_deinitializePtr.asFunction(); - - /// @brief Gets the version of SIMAlliance OpenMobileAPI specification - /// @since_tizen 3.0 - /// @ingroup CAPI_NETWORK_SMARTCARD_SE_SERVICE_MODULE - /// - /// @remarks The @a version must be released using free(). - /// - /// @param [out] version The version of SIMAlliance OpenMobileAPI specification - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #SMARTCARD_ERROR_NONE Successful - /// @retval #SMARTCARD_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SMARTCARD_ERROR_NOT_INITIALIZED Smartcard service not initialized - /// @retval #SMARTCARD_ERROR_NOT_SUPPORTED Not supported - /// @retval #SMARTCARD_ERROR_OUT_OF_MEMORY Out of memory - int smartcard_get_version( - ffi.Pointer> version, - ) { - return _smartcard_get_version( - version, - ); - } - - late final _smartcard_get_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>)>>('smartcard_get_version'); - late final _smartcard_get_version = _smartcard_get_versionPtr - .asFunction>)>(); - - /// @brief Gets the list of available Secure Element readers. - /// @since_tizen 2.3.1 - /// @ingroup CAPI_NETWORK_SMARTCARD_SE_SERVICE_MODULE - /// - /// @remarks readers must be released using free(). - /// - /// @param [out] readers List of readers - /// @param [out] length The number of readers - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #SMARTCARD_ERROR_NONE Successful - /// @retval #SMARTCARD_ERROR_GENERAL A general error occurred - /// @retval #SMARTCARD_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SMARTCARD_ERROR_NOT_INITIALIZED Smartcard service not initialized - /// @retval #SMARTCARD_ERROR_NOT_SUPPORTED Not supported - int smartcard_get_readers( - ffi.Pointer> readers, - ffi.Pointer length, - ) { - return _smartcard_get_readers( - readers, - length, - ); - } - - late final _smartcard_get_readersPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, - ffi.Pointer)>>('smartcard_get_readers'); - late final _smartcard_get_readers = _smartcard_get_readersPtr.asFunction< - int Function(ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Returns the name of the given reader. - /// @since_tizen 2.3.1 - /// @ingroup CAPI_NETWORK_SMARTCARD_READER_MODULE - /// - /// @remarks reader_name must be released using free(). - /// @remarks If the reader is a SIM reader, then its name must be "SIM[Slot]" - /// @remarks If the reader is a SD or micro SD reader, then its name must be "SD[slot]" - /// @remarks If the reader is a embedded SE reader, then its name must be "eSE[slot]" - /// - /// @param [in] reader Handle to the reader - /// @param [out] reader_name The name of reader - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #SMARTCARD_ERROR_NONE Successful - /// @retval #SMARTCARD_ERROR_GENERAL A general error occurred - /// @retval #SMARTCARD_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SMARTCARD_ERROR_NOT_INITIALIZED Smartcard service not initialized - /// @retval #SMARTCARD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see smartcard_get_readers() - int smartcard_reader_get_name( - int reader, - ffi.Pointer> reader_name, - ) { - return _smartcard_reader_get_name( - reader, - reader_name, - ); - } - - late final _smartcard_reader_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer>)>>( - 'smartcard_reader_get_name'); - late final _smartcard_reader_get_name = _smartcard_reader_get_namePtr - .asFunction>)>(); - - /// @brief Checks if a Secure Element is present in the given reader. - /// @since_tizen 2.3.1 - /// @ingroup CAPI_NETWORK_SMARTCARD_READER_MODULE - /// - /// @param [in] reader Handle to the reader - /// @param [out] is_present True or false depending whether a secure element is present in the - /// reader - undefined when an error is returned - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #SMARTCARD_ERROR_NONE Successful - /// @retval #SMARTCARD_ERROR_GENERAL A general error occurred - /// @retval #SMARTCARD_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SMARTCARD_ERROR_NOT_INITIALIZED Smartcard service not initialized - /// @retval #SMARTCARD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see smartcard_get_readers() - int smartcard_reader_is_secure_element_present( - int reader, - ffi.Pointer is_present, - ) { - return _smartcard_reader_is_secure_element_present( - reader, - is_present, - ); - } - - late final _smartcard_reader_is_secure_element_presentPtr = _lookup< - ffi.NativeFunction)>>( - 'smartcard_reader_is_secure_element_present'); - late final _smartcard_reader_is_secure_element_present = - _smartcard_reader_is_secure_element_presentPtr - .asFunction)>(); - - /// @brief Connects to a Secure Element in the given reader. - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/secureelement - /// @ingroup CAPI_NETWORK_SMARTCARD_READER_MODULE - /// - /// @param [in] reader Handle to the reader - /// @param [out] session Handle to the session created for the given reader - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #SMARTCARD_ERROR_NONE Successful - /// @retval #SMARTCARD_ERROR_GENERAL A general error occurred - /// @retval #SMARTCARD_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SMARTCARD_ERROR_IO_ERROR I/O error - /// @retval #SMARTCARD_ERROR_NOT_INITIALIZED Smartcard service not initialized - /// @retval #SMARTCARD_ERROR_NOT_SUPPORTED Not supported - /// @retval #SMARTCARD_ERROR_PERMISSION_DENIED Permission denied - /// - /// @see smartcard_get_readers() - int smartcard_reader_open_session( - int reader, - ffi.Pointer session, - ) { - return _smartcard_reader_open_session( - reader, - session, - ); - } - - late final _smartcard_reader_open_sessionPtr = _lookup< - ffi.NativeFunction)>>( - 'smartcard_reader_open_session'); - late final _smartcard_reader_open_session = _smartcard_reader_open_sessionPtr - .asFunction)>(); - - /// @brief Closes all the sessions opened on the given reader. - /// @details All the channels opened by all these sessions will be closed. - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/secureelement - /// @ingroup CAPI_NETWORK_SMARTCARD_READER_MODULE - /// - /// @param [in] reader Handle to the reader - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #SMARTCARD_ERROR_NONE Successful - /// @retval #SMARTCARD_ERROR_GENERAL A general error occurred - /// @retval #SMARTCARD_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SMARTCARD_ERROR_IO_ERROR I/O error - /// @retval #SMARTCARD_ERROR_NOT_INITIALIZED Smartcard service not initialized - /// @retval #SMARTCARD_ERROR_NOT_SUPPORTED Not supported - /// @retval #SMARTCARD_ERROR_PERMISSION_DENIED Permission denied - /// - /// @see smartcard_get_readers() - int smartcard_reader_close_sessions( - int reader, - ) { - return _smartcard_reader_close_sessions( - reader, - ); - } - - late final _smartcard_reader_close_sessionsPtr = - _lookup>( - 'smartcard_reader_close_sessions'); - late final _smartcard_reader_close_sessions = - _smartcard_reader_close_sessionsPtr.asFunction(); - - /// @brief Sets a callback function for receiving reader event. - /// @since_tizen 3.0 - /// @ingroup CAPI_NETWORK_SMARTCARD_READER_MODULE - /// - /// @param [in] cb The reader event callback - /// @param [in] user_data The user data - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #SMARTCARD_ERROR_NONE Successful - /// @retval #SMARTCARD_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SMARTCARD_ERROR_NOT_INITIALIZED Smartcard service not initialized - /// @retval #SMARTCARD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see smartcard_reader_unset_event_cb() - int smartcard_reader_set_event_cb( - smartcard_reader_event_cb cb, - ffi.Pointer user_data, - ) { - return _smartcard_reader_set_event_cb( - cb, - user_data, - ); - } - - late final _smartcard_reader_set_event_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(smartcard_reader_event_cb, - ffi.Pointer)>>('smartcard_reader_set_event_cb'); - late final _smartcard_reader_set_event_cb = - _smartcard_reader_set_event_cbPtr.asFunction< - int Function(smartcard_reader_event_cb, ffi.Pointer)>(); - - /// @brief Unsets the reader event callback function. - /// @since_tizen 3.0 - /// @ingroup CAPI_NETWORK_SMARTCARD_READER_MODULE - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #SMARTCARD_ERROR_NONE Successful - /// @retval #SMARTCARD_ERROR_NOT_INITIALIZED Smartcard service not initialized - /// @retval #SMARTCARD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see smartcard_reader_set_event_cb() - int smartcard_reader_unset_event_cb() { - return _smartcard_reader_unset_event_cb(); - } - - late final _smartcard_reader_unset_event_cbPtr = - _lookup>( - 'smartcard_reader_unset_event_cb'); - late final _smartcard_reader_unset_event_cb = - _smartcard_reader_unset_event_cbPtr.asFunction(); - - /// @brief Gets the reader that provides the given session. - /// @since_tizen 2.3.1 - /// @ingroup CAPI_NETWORK_SMARTCARD_SESSION_MODULE - /// - /// @param [in] session Handle to the session - /// @param [out] reader Reader handle that provides the given session - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #SMARTCARD_ERROR_NONE Successful - /// @retval #SMARTCARD_ERROR_GENERAL A general error occurred - /// @retval #SMARTCARD_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SMARTCARD_ERROR_NOT_INITIALIZED Smartcard service not initialized - /// @retval #SMARTCARD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see smartcard_reader_open_session() - int smartcard_session_get_reader( - int session, - ffi.Pointer reader, - ) { - return _smartcard_session_get_reader( - session, - reader, - ); - } - - late final _smartcard_session_get_readerPtr = _lookup< - ffi.NativeFunction)>>( - 'smartcard_session_get_reader'); - late final _smartcard_session_get_reader = _smartcard_session_get_readerPtr - .asFunction)>(); - - /// @brief Gets the Answer to Reset(ATR) of this Secure Element. - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/secureelement - /// @ingroup CAPI_NETWORK_SMARTCARD_SESSION_MODULE - /// - /// @remarks atr must be released using free(). - /// @remarks If the Answer to Reset(ATR) for this Secure Element is not available the returned length is set to zero and return value is Success. - /// - /// @param [in] session Handle to the session - /// @param [out] atr Byte array to retrieve the Answer to Reset(ATR) - /// @param [out] length The length of atr - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #SMARTCARD_ERROR_NONE Successful - /// @retval #SMARTCARD_ERROR_GENERAL A general error occurred - /// @retval #SMARTCARD_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SMARTCARD_ERROR_NOT_INITIALIZED Smartcard service not initialized - /// @retval #SMARTCARD_ERROR_NOT_SUPPORTED Not supported - /// @retval #SMARTCARD_ERROR_PERMISSION_DENIED Permission denied - /// - /// @see smartcard_reader_open_session() - int smartcard_session_get_atr( - int session, - ffi.Pointer> atr, - ffi.Pointer length, - ) { - return _smartcard_session_get_atr( - session, - atr, - length, - ); - } - - late final _smartcard_session_get_atrPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer>, - ffi.Pointer)>>('smartcard_session_get_atr'); - late final _smartcard_session_get_atr = - _smartcard_session_get_atrPtr.asFunction< - int Function(int, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Closes the connection with the Secure Element. - /// @details This will close any channels opened by this application with this Secure Element. - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/secureelement - /// @ingroup CAPI_NETWORK_SMARTCARD_SESSION_MODULE - /// - /// @param [in] session handle to the session - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #SMARTCARD_ERROR_NONE Successful - /// @retval #SMARTCARD_ERROR_GENERAL A general error occurred - /// @retval #SMARTCARD_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SMARTCARD_ERROR_IO_ERROR I/O error - /// @retval #SMARTCARD_ERROR_NOT_INITIALIZED Smartcard service not initialized - /// @retval #SMARTCARD_ERROR_NOT_SUPPORTED Not supported - /// @retval #SMARTCARD_ERROR_PERMISSION_DENIED Permission denied - /// - /// @see smartcard_reader_open_session() - int smartcard_session_close( - int session, - ) { - return _smartcard_session_close( - session, - ); - } - - late final _smartcard_session_closePtr = - _lookup>( - 'smartcard_session_close'); - late final _smartcard_session_close = - _smartcard_session_closePtr.asFunction(); - - /// @brief Checks if the given session is closed. - /// @since_tizen 2.3.1 - /// @ingroup CAPI_NETWORK_SMARTCARD_SESSION_MODULE - /// - /// @param [in] session Handle to the session - /// @param [out] is_closed True or false depending on the session state - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #SMARTCARD_ERROR_NONE Successful - /// @retval #SMARTCARD_ERROR_GENERAL A general error occurred - /// @retval #SMARTCARD_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SMARTCARD_ERROR_NOT_INITIALIZED Smartcard service not initialized - /// @retval #SMARTCARD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see smartcard_reader_open_session() - int smartcard_session_is_closed( - int session, - ffi.Pointer is_closed, - ) { - return _smartcard_session_is_closed( - session, - is_closed, - ); - } - - late final _smartcard_session_is_closedPtr = _lookup< - ffi.NativeFunction)>>( - 'smartcard_session_is_closed'); - late final _smartcard_session_is_closed = _smartcard_session_is_closedPtr - .asFunction)>(); - - /// @brief Closes any channel opened on the given session. - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/secureelement - /// @ingroup CAPI_NETWORK_SMARTCARD_SESSION_MODULE - /// - /// @param [in] session Handle to the session - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #SMARTCARD_ERROR_NONE Successful - /// @retval #SMARTCARD_ERROR_GENERAL A general error occurred - /// @retval #SMARTCARD_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SMARTCARD_ERROR_IO_ERROR I/O error - /// @retval #SMARTCARD_ERROR_NOT_INITIALIZED Smartcard service not initialized - /// @retval #SMARTCARD_ERROR_NOT_SUPPORTED Not supported - /// @retval #SMARTCARD_ERROR_PERMISSION_DENIED Permission denied - /// - /// @see smartcard_reader_open_session() - int smartcard_session_close_channels( - int session, - ) { - return _smartcard_session_close_channels( - session, - ); - } - - late final _smartcard_session_close_channelsPtr = - _lookup>( - 'smartcard_session_close_channels'); - late final _smartcard_session_close_channels = - _smartcard_session_close_channelsPtr.asFunction(); - - /// @brief Gets an access to the basic channel, as defined in the ISO/IEC 7816-4 specification (the one that has number 0). - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/secureelement - /// @ingroup CAPI_NETWORK_SMARTCARD_SESSION_MODULE - /// - /// @remarks ex) unsigned char aid[] = {0xA0, 0x00, 0x00, 0x00, 0x63, 0x50, 0x4B, 0x43, 0x53, 0x2D, 0x31, 0x35}; - /// @remarks If the Application ID(AID) is null, it means no Applet is to be selected on this channel and the default Applet is used. - /// @remarks Opening of the basic channel to a specific applet is NOT allowed for UICC. - /// - /// @param [in] session Handle to the session - /// @param [in] aid Byte array containing the Application ID(AID) to be selected on the given channel - /// @param [in] aid_len Size of byte array or 0 when no SELECT should be executed - /// @param [in] P2 P2 byte of the SELECT command if executed - /// @param [out] channel Handle of the basic channel - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #SMARTCARD_ERROR_NONE Successful - /// @retval #SMARTCARD_ERROR_CHANNEL_NOT_AVAILABLE No channel available - /// @retval #SMARTCARD_ERROR_GENERAL A general error occurred - /// @retval #SMARTCARD_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SMARTCARD_ERROR_NO_SUCH_ELEMENT No such element error - /// @retval #SMARTCARD_ERROR_IO_ERROR I/O error - /// @retval #SMARTCARD_ERROR_NOT_INITIALIZED Smartcard service not initialized - /// @retval #SMARTCARD_ERROR_NOT_SUPPORTED Not supported - /// @retval #SMARTCARD_ERROR_PERMISSION_DENIED Permission denied - /// - /// @see smartcard_reader_open_session() - int smartcard_session_open_basic_channel( - int session, - ffi.Pointer aid, - int aid_len, - int P2, - ffi.Pointer channel, - ) { - return _smartcard_session_open_basic_channel( - session, - aid, - aid_len, - P2, - channel, - ); - } - - late final _smartcard_session_open_basic_channelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.UnsignedChar, - ffi.Pointer)>>('smartcard_session_open_basic_channel'); - late final _smartcard_session_open_basic_channel = - _smartcard_session_open_basic_channelPtr.asFunction< - int Function(int, ffi.Pointer, int, int, - ffi.Pointer)>(); - - /// @brief Open a logical channel with the Secure Element, selecting the Applet represented by the given Application ID(AID). - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/secureelement - /// @ingroup CAPI_NETWORK_SMARTCARD_SESSION_MODULE - /// - /// @remarks ex) unsigned char aid[] = {0xA0, 0x00, 0x00, 0x00, 0x63, 0x50, 0x4B, 0x43, 0x53, 0x2D, 0x31, 0x35}; - /// @remarks If the Application ID(AID) is null, it means no Applet is to be selected on this channel and the default Applet is used. - /// - /// @param [in] session Handle to the session - /// @param [in] aid Byte array containing the Application ID(AID) to be selected on the given channel - /// @param [in] aid_len Size of byte array or 0 when no SELECT should be executed - /// @param [in] P2 P2 byte of the SELECT command if executed - /// @param [out] channel Handle of the new logical channel - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #SMARTCARD_ERROR_NONE Successful - /// @retval #SMARTCARD_ERROR_CHANNEL_NOT_AVAILABLE No channel available - /// @retval #SMARTCARD_ERROR_GENERAL A general error occurred - /// @retval #SMARTCARD_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SMARTCARD_ERROR_NO_SUCH_ELEMENT No such element error - /// @retval #SMARTCARD_ERROR_IO_ERROR I/O error - /// @retval #SMARTCARD_ERROR_NOT_INITIALIZED Smartcard service not initialized - /// @retval #SMARTCARD_ERROR_NOT_SUPPORTED Not supported - /// @retval #SMARTCARD_ERROR_PERMISSION_DENIED Permission denied - /// - /// @see smartcard_reader_open_session() - int smartcard_session_open_logical_channel( - int session, - ffi.Pointer aid, - int aid_len, - int P2, - ffi.Pointer channel, - ) { - return _smartcard_session_open_logical_channel( - session, - aid, - aid_len, - P2, - channel, - ); - } - - late final _smartcard_session_open_logical_channelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.UnsignedChar, - ffi.Pointer)>>('smartcard_session_open_logical_channel'); - late final _smartcard_session_open_logical_channel = - _smartcard_session_open_logical_channelPtr.asFunction< - int Function(int, ffi.Pointer, int, int, - ffi.Pointer)>(); - - /// @brief Closes the given channel to the Secure Element. - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/secureelement - /// @ingroup CAPI_NETWORK_SMARTCARD_CHANNEL_MODULE - /// - /// @param [in] channel Handle to the channel - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #SMARTCARD_ERROR_NONE Successful - /// @retval #SMARTCARD_ERROR_GENERAL A general error occurred - /// @retval #SMARTCARD_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SMARTCARD_ERROR_IO_ERROR I/O error - /// @retval #SMARTCARD_ERROR_NOT_INITIALIZED Smartcard service not initialized - /// @retval #SMARTCARD_ERROR_NOT_SUPPORTED Not supported - /// @retval #SMARTCARD_ERROR_PERMISSION_DENIED Permission denied - /// - /// @see smartcard_session_open_basic_channel() - /// @see smartcard_session_open_logical_channel() - int smartcard_channel_close( - int channel, - ) { - return _smartcard_channel_close( - channel, - ); - } - - late final _smartcard_channel_closePtr = - _lookup>( - 'smartcard_channel_close'); - late final _smartcard_channel_close = - _smartcard_channel_closePtr.asFunction(); - - /// @brief Checks if the given channel is the basic channel. - /// @since_tizen 2.3.1 - /// @ingroup CAPI_NETWORK_SMARTCARD_CHANNEL_MODULE - /// - /// @param [in] channel Handle to the channel - /// @param [out] is_basic_channel True or false depending on the channel type - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #SMARTCARD_ERROR_NONE Successful - /// @retval #SMARTCARD_ERROR_GENERAL A general error occurred - /// @retval #SMARTCARD_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SMARTCARD_ERROR_NOT_INITIALIZED Smartcard service not initialized - /// @retval #SMARTCARD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see smartcard_session_open_basic_channel() - /// @see smartcard_session_open_logical_channel() - int smartcard_channel_is_basic_channel( - int channel, - ffi.Pointer is_basic_channel, - ) { - return _smartcard_channel_is_basic_channel( - channel, - is_basic_channel, - ); - } - - late final _smartcard_channel_is_basic_channelPtr = _lookup< - ffi.NativeFunction)>>( - 'smartcard_channel_is_basic_channel'); - late final _smartcard_channel_is_basic_channel = - _smartcard_channel_is_basic_channelPtr - .asFunction)>(); - - /// @brief Checks if the given channel is closed. - /// @since_tizen 2.3.1 - /// @ingroup CAPI_NETWORK_SMARTCARD_CHANNEL_MODULE - /// - /// @param [in] channel Handle to the channel - /// @param [out] is_closed True or false depending on the channel state - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #SMARTCARD_ERROR_NONE Successful - /// @retval #SMARTCARD_ERROR_GENERAL A general error occurred - /// @retval #SMARTCARD_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SMARTCARD_ERROR_NOT_INITIALIZED Smartcard service not initialized - /// @retval #SMARTCARD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see smartcard_session_open_basic_channel() - /// @see smartcard_session_open_logical_channel() - int smartcard_channel_is_closed( - int channel, - ffi.Pointer is_closed, - ) { - return _smartcard_channel_is_closed( - channel, - is_closed, - ); - } - - late final _smartcard_channel_is_closedPtr = _lookup< - ffi.NativeFunction)>>( - 'smartcard_channel_is_closed'); - late final _smartcard_channel_is_closed = _smartcard_channel_is_closedPtr - .asFunction)>(); - - /// @brief Gets the response to the select command. - /// @since_tizen 2.3.1 - /// @ingroup CAPI_NETWORK_SMARTCARD_CHANNEL_MODULE - /// - /// @remarks select_resp must be released using free(). - /// - /// @param [in] channel Handle to the channel - /// @param [out] select_resp Byte array to retrieve the SELECT response - /// @param [out] length The length of select_resp - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #SMARTCARD_ERROR_NONE Successful - /// @retval #SMARTCARD_ERROR_GENERAL A general error occurred - /// @retval #SMARTCARD_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SMARTCARD_ERROR_NOT_INITIALIZED Smartcard service not initialized - /// @retval #SMARTCARD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see smartcard_session_open_basic_channel() - /// @see smartcard_session_open_logical_channel() - int smartcard_channel_get_select_response( - int channel, - ffi.Pointer> select_resp, - ffi.Pointer length, - ) { - return _smartcard_channel_get_select_response( - channel, - select_resp, - length, - ); - } - - late final _smartcard_channel_get_select_responsePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer>, - ffi.Pointer)>>('smartcard_channel_get_select_response'); - late final _smartcard_channel_get_select_response = - _smartcard_channel_get_select_responsePtr.asFunction< - int Function(int, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Gets the session that has opened the given channel. - /// @since_tizen 2.3.1 - /// @ingroup CAPI_NETWORK_SMARTCARD_CHANNEL_MODULE - /// - /// @param [in] channel Handle to the channel - /// @param [out] session Session handle of the given channel - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #SMARTCARD_ERROR_NONE Successful - /// @retval #SMARTCARD_ERROR_GENERAL A general error occurred - /// @retval #SMARTCARD_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SMARTCARD_ERROR_NOT_INITIALIZED Smartcard service not initialized - /// @retval #SMARTCARD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see smartcard_session_open_basic_channel() - /// @see smartcard_session_open_logical_channel() - int smartcard_channel_get_session( - int channel, - ffi.Pointer session, - ) { - return _smartcard_channel_get_session( - channel, - session, - ); - } - - late final _smartcard_channel_get_sessionPtr = _lookup< - ffi.NativeFunction)>>( - 'smartcard_channel_get_session'); - late final _smartcard_channel_get_session = _smartcard_channel_get_sessionPtr - .asFunction)>(); - - /// @brief Transmits an APDU command (as per ISO/IEC 7816-4) to the Secure Element. - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/secureelement - /// @ingroup CAPI_NETWORK_SMARTCARD_CHANNEL_MODULE - /// - /// @remarks resp must be released using free(). - /// @remarks MANAGE_CHANNEL commands are not allowed. - /// @remarks SELECT by DF Name (P1=04) are not allowed. - /// @remarks bytes with channel numbers are de-masked. - /// - /// @param [in] channel Handle to the channel - /// @param [in] cmd Command APDU to be send to the secure element - /// @param [in] cmd_len Size of command APDU - /// @param [out] resp Byte array for the response APDU plus status words - /// @param [out] length The length of resp - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #SMARTCARD_ERROR_NONE Successful - /// @retval #SMARTCARD_ERROR_GENERAL A general error occurred - /// @retval #SMARTCARD_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SMARTCARD_ERROR_ILLEGAL_STATE Illegal state of execution error - /// @retval #SMARTCARD_ERROR_IO_ERROR I/O error - /// @retval #SMARTCARD_ERROR_NOT_INITIALIZED Smartcard service not initialized - /// @retval #SMARTCARD_ERROR_NOT_SUPPORTED Not supported - /// @retval #SMARTCARD_ERROR_PERMISSION_DENIED Permission denied - /// - /// @see smartcard_session_open_basic_channel() - /// @see smartcard_session_open_logical_channel() - int smartcard_channel_transmit( - int channel, - ffi.Pointer cmd, - int cmd_len, - ffi.Pointer> resp, - ffi.Pointer length, - ) { - return _smartcard_channel_transmit( - channel, - cmd, - cmd_len, - resp, - length, - ); - } - - late final _smartcard_channel_transmitPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ffi.Pointer)>>('smartcard_channel_transmit'); - late final _smartcard_channel_transmit = - _smartcard_channel_transmitPtr.asFunction< - int Function( - int, - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Helper function to retrieves the response APDU of the previous transmit() call - /// @since_tizen 2.3.1 - /// @ingroup CAPI_NETWORK_SMARTCARD_CHANNEL_MODULE - /// - /// @remarks resp must be released using free(). - /// - /// @param [in] channel Handle to the channel - /// @param [out] resp Byte array for the response APDU plus status words - /// @param [out] length The length of resp - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #SMARTCARD_ERROR_NONE Successful - /// @retval #SMARTCARD_ERROR_GENERAL A general error occurred - /// @retval #SMARTCARD_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SMARTCARD_ERROR_ILLEGAL_STATE Illegal state of execution error - /// @retval #SMARTCARD_ERROR_NOT_INITIALIZED Smartcard service not initialized - /// @retval #SMARTCARD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see smartcard_session_open_basic_channel() - /// @see smartcard_session_open_logical_channel() - int smartcard_channel_transmit_retrieve_response( - int channel, - ffi.Pointer> resp, - ffi.Pointer length, - ) { - return _smartcard_channel_transmit_retrieve_response( - channel, - resp, - length, - ); - } - - late final _smartcard_channel_transmit_retrieve_responsePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer>, - ffi.Pointer)>>( - 'smartcard_channel_transmit_retrieve_response'); - late final _smartcard_channel_transmit_retrieve_response = - _smartcard_channel_transmit_retrieve_responsePtr.asFunction< - int Function(int, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Performs a selection of the next Applet on the given channel that matches to the partial Application ID(AID) - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/secureelement - /// @ingroup CAPI_NETWORK_SMARTCARD_CHANNEL_MODULE - /// - /// @param [in] channel Handle to the channel - /// @param [out] is_success True or false depending whether another applet with the partial Application ID(AID) - /// could be selected on the given channel - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #SMARTCARD_ERROR_NONE Successful - /// @retval #SMARTCARD_ERROR_GENERAL A general error occurred - /// @retval #SMARTCARD_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SMARTCARD_ERROR_ILLEGAL_STATE Illegal state of execution error - /// @retval #SMARTCARD_ERROR_OPERATION_NOT_SUPPORTED Operation not supported from SE - /// @retval #SMARTCARD_ERROR_IO_ERROR I/O error - /// @retval #SMARTCARD_ERROR_NOT_INITIALIZED Smartcard service not initialized - /// @retval #SMARTCARD_ERROR_NOT_SUPPORTED Not supported - /// @retval #SMARTCARD_ERROR_PERMISSION_DENIED Permission denied - /// - /// @see smartcard_session_open_basic_channel() - /// @see smartcard_session_open_logical_channel() - int smartcard_channel_select_next( - int channel, - ffi.Pointer is_success, - ) { - return _smartcard_channel_select_next( - channel, - is_success, - ); - } - - late final _smartcard_channel_select_nextPtr = _lookup< - ffi.NativeFunction)>>( - 'smartcard_channel_select_next'); - late final _smartcard_channel_select_next = _smartcard_channel_select_nextPtr - .asFunction)>(); - - /// @brief Initializes Wi-Fi. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @remarks You must release @a wifi using wifi_manager_deinitialize(). - /// @param[out] wifi The Wi-Fi handle - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_ALREADY_INITIALIZED Already initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_initialize( - ffi.Pointer wifi, - ) { - return _wifi_manager_initialize( - wifi, - ); - } - - late final _wifi_manager_initializePtr = _lookup< - ffi.NativeFunction)>>( - 'wifi_manager_initialize'); - late final _wifi_manager_initialize = _wifi_manager_initializePtr - .asFunction)>(); - - /// @brief Deinitializes Wi-Fi. - /// @since_tizen 3.0 - /// @param[in] wifi The Wi-Fi handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_deinitialize( - wifi_manager_h wifi, - ) { - return _wifi_manager_deinitialize( - wifi, - ); - } - - late final _wifi_manager_deinitializePtr = - _lookup>( - 'wifi_manager_deinitialize'); - late final _wifi_manager_deinitialize = - _wifi_manager_deinitializePtr.asFunction(); - - /// @brief Activates Wi-Fi asynchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called \n - /// This can be @c NULL if you don't want to get the notification. - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_SECURITY_RESTRICTED Restricted by security system policy - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post wifi_manager_activated_cb() will be invoked. - /// @see wifi_manager_activated_cb() - /// @see wifi_manager_deactivate() - int wifi_manager_activate( - wifi_manager_h wifi, - wifi_manager_activated_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_activate( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_activatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_activated_cb, - ffi.Pointer)>>('wifi_manager_activate'); - late final _wifi_manager_activate = _wifi_manager_activatePtr.asFunction< - int Function( - wifi_manager_h, wifi_manager_activated_cb, ffi.Pointer)>(); - - /// @brief Activates Wi-Fi asynchronously and displays Wi-Fi picker (popup) when Wi-Fi is not automatically connected. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called \n - /// This can be @c NULL if you don't want to get the notification. - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_SECURITY_RESTRICTED Restricted by security system policy - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post wifi_manager_activated_cb() will be invoked. - /// @see wifi_manager_activated_cb() - /// @see wifi_manager_deactivate() - int wifi_manager_activate_with_wifi_picker_tested( - wifi_manager_h wifi, - wifi_manager_activated_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_activate_with_wifi_picker_tested( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_activate_with_wifi_picker_testedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_activated_cb, - ffi.Pointer)>>( - 'wifi_manager_activate_with_wifi_picker_tested'); - late final _wifi_manager_activate_with_wifi_picker_tested = - _wifi_manager_activate_with_wifi_picker_testedPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_activated_cb, - ffi.Pointer)>(); - - /// @brief Deactivates Wi-Fi asynchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called \n - /// This can be @c NULL if you don't want to get the notification. - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post wifi_manager_deactivated_cb() will be invoked. - /// @see wifi_manager_deactivated_cb() - /// @see wifi_manager_activate() - int wifi_manager_deactivate( - wifi_manager_h wifi, - wifi_manager_deactivated_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_deactivate( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_deactivatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_deactivated_cb, - ffi.Pointer)>>('wifi_manager_deactivate'); - late final _wifi_manager_deactivate = _wifi_manager_deactivatePtr.asFunction< - int Function(wifi_manager_h, wifi_manager_deactivated_cb, - ffi.Pointer)>(); - - /// @brief Checks whether Wi-Fi is activated. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] wifi The Wi-Fi handle - /// @param[out] activated @c true if Wi-Fi is activated, - /// otherwise @c false if Wi-Fi is not activated. - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_is_activated( - wifi_manager_h wifi, - ffi.Pointer activated, - ) { - return _wifi_manager_is_activated( - wifi, - activated, - ); - } - - late final _wifi_manager_is_activatedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, - ffi.Pointer)>>('wifi_manager_is_activated'); - late final _wifi_manager_is_activated = _wifi_manager_is_activatedPtr - .asFunction)>(); - - /// @brief Gets the local MAC address. - /// @since_tizen 3.0 - /// @remarks You must release @a mac_address using free(). - /// @param[in] wifi The Wi-Fi handle - /// @param[out] mac_address The MAC address - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_get_mac_address( - wifi_manager_h wifi, - ffi.Pointer> mac_address, - ) { - return _wifi_manager_get_mac_address( - wifi, - mac_address, - ); - } - - late final _wifi_manager_get_mac_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, ffi.Pointer>)>>( - 'wifi_manager_get_mac_address'); - late final _wifi_manager_get_mac_address = - _wifi_manager_get_mac_addressPtr.asFunction< - int Function(wifi_manager_h, ffi.Pointer>)>(); - - /// @brief Gets the name of the network interface. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @remarks You must release @a name using free(). - /// @param[in] wifi The Wi-Fi handle - /// @param[out] name The name of network interface - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_get_network_interface_name( - wifi_manager_h wifi, - ffi.Pointer> name, - ) { - return _wifi_manager_get_network_interface_name( - wifi, - name, - ); - } - - late final _wifi_manager_get_network_interface_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, ffi.Pointer>)>>( - 'wifi_manager_get_network_interface_name'); - late final _wifi_manager_get_network_interface_name = - _wifi_manager_get_network_interface_namePtr.asFunction< - int Function(wifi_manager_h, ffi.Pointer>)>(); - - /// @brief Starts scan asynchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_manager_scan_finished_cb(). - int wifi_manager_scan( - wifi_manager_h wifi, - wifi_manager_scan_finished_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_scan( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_scanPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_scan_finished_cb, - ffi.Pointer)>>('wifi_manager_scan'); - late final _wifi_manager_scan = _wifi_manager_scanPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_scan_finished_cb, - ffi.Pointer)>(); - - /// @brief Gets the Wi-Fi scan state. - /// @since_tizen 4.0 - /// @param[in] wifi The Wi-Fi handle - /// @param[in] scan_state The Wi-Fi scan state - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_get_scan_state( - wifi_manager_h wifi, - ffi.Pointer scan_state, - ) { - return _wifi_manager_get_scan_state( - wifi, - scan_state, - ); - } - - late final _wifi_manager_get_scan_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, - ffi.Pointer)>>('wifi_manager_get_scan_state'); - late final _wifi_manager_get_scan_state = _wifi_manager_get_scan_statePtr - .asFunction)>(); - - /// @brief Starts specific AP scan, asynchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] essid The essid of specific AP - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value. - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_manager_scan_finished_cb(). - int wifi_manager_scan_specific_ap( - wifi_manager_h wifi, - ffi.Pointer essid, - wifi_manager_scan_finished_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_scan_specific_ap( - wifi, - essid, - callback, - user_data, - ); - } - - late final _wifi_manager_scan_specific_apPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, - ffi.Pointer, - wifi_manager_scan_finished_cb, - ffi.Pointer)>>('wifi_manager_scan_specific_ap'); - late final _wifi_manager_scan_specific_ap = - _wifi_manager_scan_specific_apPtr.asFunction< - int Function(wifi_manager_h, ffi.Pointer, - wifi_manager_scan_finished_cb, ffi.Pointer)>(); - - /// @brief Creates a Wi-Fi specific AP scan handle. - /// @since_tizen 4.0 - /// @remarks You must release @a specific_scan using wifi_manager_specific_scan_destroy(). - /// @param[in] wifi The Wi-Fi handle - /// @param[out] specific_scan The Wi-Fi specific AP scan handle - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @pre This function needs a wifi_manager_initialize() call before use. - /// @see wifi_manager_specific_scan_create() - int wifi_manager_specific_scan_create( - wifi_manager_h wifi, - ffi.Pointer specific_scan, - ) { - return _wifi_manager_specific_scan_create( - wifi, - specific_scan, - ); - } - - late final _wifi_manager_specific_scan_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, ffi.Pointer)>>( - 'wifi_manager_specific_scan_create'); - late final _wifi_manager_specific_scan_create = - _wifi_manager_specific_scan_createPtr.asFunction< - int Function( - wifi_manager_h, ffi.Pointer)>(); - - /// @brief Destroys a Wi-Fi specific AP scan handle. - /// @since_tizen 4.0 - /// @param[in] wifi The Wi-Fi handle - /// @param[in] specific_scan The Wi-Fi specific AP scan handle - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @pre This function needs a wifi_manager_initialize() call before use. - /// @see wifi_manager_specific_scan_destroy() - int wifi_manager_specific_scan_destroy( - wifi_manager_h wifi, - wifi_manager_specific_scan_h specific_scan, - ) { - return _wifi_manager_specific_scan_destroy( - wifi, - specific_scan, - ); - } - - late final _wifi_manager_specific_scan_destroyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_specific_scan_h)>>( - 'wifi_manager_specific_scan_destroy'); - late final _wifi_manager_specific_scan_destroy = - _wifi_manager_specific_scan_destroyPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_specific_scan_h)>(); - - /// @brief Sets the SSID of a specific AP scan. - /// @since_tizen 4.0 - /// @param[in] specific_scan The Wi-Fi specific AP scan handle - /// @param[in] essid The SSID of specific AP scan - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_specific_scan_set_ssid() - int wifi_manager_specific_scan_set_ssid( - wifi_manager_specific_scan_h specific_scan, - ffi.Pointer essid, - ) { - return _wifi_manager_specific_scan_set_ssid( - specific_scan, - essid, - ); - } - - late final _wifi_manager_specific_scan_set_ssidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_specific_scan_h, - ffi.Pointer)>>('wifi_manager_specific_scan_set_ssid'); - late final _wifi_manager_specific_scan_set_ssid = - _wifi_manager_specific_scan_set_ssidPtr.asFunction< - int Function(wifi_manager_specific_scan_h, ffi.Pointer)>(); - - /// @brief Sets the channel frequency of a specific AP scan. - /// @since_tizen 4.0 - /// @param[in] specific_scan The Wi-Fi specific AP scan handle - /// @param[in] freq The channel frequency of specific AP scan - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_specific_scan_set_freq() - int wifi_manager_specific_scan_set_freq( - wifi_manager_specific_scan_h specific_scan, - int freq, - ) { - return _wifi_manager_specific_scan_set_freq( - specific_scan, - freq, - ); - } - - late final _wifi_manager_specific_scan_set_freqPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_specific_scan_h, - ffi.Int)>>('wifi_manager_specific_scan_set_freq'); - late final _wifi_manager_specific_scan_set_freq = - _wifi_manager_specific_scan_set_freqPtr - .asFunction(); - - /// @brief Starts multi SSID and multi channel specific scan, asynchronously. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] specific_scan The Wi-Fi specific AP scan handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value. - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_manager_scan_finished_cb(). - int wifi_manager_specific_ap_start_multi_scan( - wifi_manager_h wifi, - wifi_manager_specific_scan_h specific_scan, - wifi_manager_scan_finished_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_specific_ap_start_multi_scan( - wifi, - specific_scan, - callback, - user_data, - ); - } - - late final _wifi_manager_specific_ap_start_multi_scanPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_specific_scan_h, - wifi_manager_scan_finished_cb, ffi.Pointer)>>( - 'wifi_manager_specific_ap_start_multi_scan'); - late final _wifi_manager_specific_ap_start_multi_scan = - _wifi_manager_specific_ap_start_multi_scanPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_specific_scan_h, - wifi_manager_scan_finished_cb, ffi.Pointer)>(); - - /// @brief Connects to the hidden AP, asynchronously. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get \n - /// %http://tizen.org/privilege/network.profile - /// @remarks This function needs all listed privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] essid The ESSID of the hidden AP - /// @param[in] sec_type The security type of the hidden AP - /// @param[in] passphrase The passphrase of the hidden AP - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value. - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @pre This function needs wifi_manager_scan() before use. - /// @post This function invokes wifi_manager_connected_cb(). - int wifi_manager_connect_hidden_ap( - wifi_manager_h wifi, - ffi.Pointer essid, - int sec_type, - ffi.Pointer passphrase, - wifi_manager_connected_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_connect_hidden_ap( - wifi, - essid, - sec_type, - passphrase, - callback, - user_data, - ); - } - - late final _wifi_manager_connect_hidden_apPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - wifi_manager_connected_cb, - ffi.Pointer)>>('wifi_manager_connect_hidden_ap'); - late final _wifi_manager_connect_hidden_ap = - _wifi_manager_connect_hidden_apPtr.asFunction< - int Function( - wifi_manager_h, - ffi.Pointer, - int, - ffi.Pointer, - wifi_manager_connected_cb, - ffi.Pointer)>(); - - /// @brief Gets the handle of the connected access point. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @remarks You must release @a ap using wifi_manager_ap_destroy(). - /// @param[in] wifi The Wi-Fi handle - /// @param[out] ap The access point handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NO_CONNECTION There is no connected AP - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_get_connected_ap( - wifi_manager_h wifi, - ffi.Pointer ap, - ) { - return _wifi_manager_get_connected_ap( - wifi, - ap, - ); - } - - late final _wifi_manager_get_connected_apPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, ffi.Pointer)>>( - 'wifi_manager_get_connected_ap'); - late final _wifi_manager_get_connected_ap = - _wifi_manager_get_connected_apPtr.asFunction< - int Function(wifi_manager_h, ffi.Pointer)>(); - - /// @brief Gets the result of the scan. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_manager_found_ap_cb(). - int wifi_manager_foreach_found_ap( - wifi_manager_h wifi, - wifi_manager_found_ap_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_foreach_found_ap( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_foreach_found_apPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_found_ap_cb, - ffi.Pointer)>>('wifi_manager_foreach_found_ap'); - late final _wifi_manager_foreach_found_ap = - _wifi_manager_foreach_found_apPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_found_ap_cb, - ffi.Pointer)>(); - - /// @brief Gets the result of specific AP scan. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value. - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_manager_found_ap_cb(). - /// @see wifi_manager_scan_specific_ap() - int wifi_manager_foreach_found_specific_ap( - wifi_manager_h wifi, - wifi_manager_found_ap_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_foreach_found_specific_ap( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_foreach_found_specific_apPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_found_ap_cb, - ffi.Pointer)>>( - 'wifi_manager_foreach_found_specific_ap'); - late final _wifi_manager_foreach_found_specific_ap = - _wifi_manager_foreach_found_specific_apPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_found_ap_cb, - ffi.Pointer)>(); - - /// @brief Gets the result of the BSSID scan (i.e. BSSID, ESSID & RSSI). - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_manager_found_ap_cb(). - /// @see wifi_manager_scan_ap() - /// @see wifi_manager_scan_specific_ap() - int wifi_manager_foreach_found_bssid_ap( - wifi_manager_h wifi, - wifi_manager_found_ap_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_foreach_found_bssid_ap( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_foreach_found_bssid_apPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_found_ap_cb, - ffi.Pointer)>>('wifi_manager_foreach_found_bssid_ap'); - late final _wifi_manager_foreach_found_bssid_ap = - _wifi_manager_foreach_found_bssid_apPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_found_ap_cb, - ffi.Pointer)>(); - - /// @brief Connects to the access point asynchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] ap The access point handle - /// @param[in] callback The callback function to be called \n - /// This can be @c NULL if you don't want to get the notification. - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_manager_connected_cb(). - /// @see wifi_manager_connected_cb() - /// @see wifi_manager_connect_by_wps_pbc() - /// @see wifi_manager_connect_by_wps_pin() - /// @see wifi_manager_disconnect() - int wifi_manager_connect( - wifi_manager_h wifi, - wifi_manager_ap_h ap, - wifi_manager_connected_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_connect( - wifi, - ap, - callback, - user_data, - ); - } - - late final _wifi_manager_connectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, - wifi_manager_ap_h, - wifi_manager_connected_cb, - ffi.Pointer)>>('wifi_manager_connect'); - late final _wifi_manager_connect = _wifi_manager_connectPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_ap_h, wifi_manager_connected_cb, - ffi.Pointer)>(); - - /// @brief Disconnects to the access point asynchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] ap The access point handle - /// @param[in] callback The callback function to be called \n - /// This can be @c NULL if you don't want to get the notification. - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_manager_disconnected_cb(). - /// @see wifi_manager_disconnected_cb() - /// @see wifi_manager_connect_by_wps_pbc() - /// @see wifi_manager_connect_by_wps_pin() - /// @see wifi_manager_connect() - int wifi_manager_disconnect( - wifi_manager_h wifi, - wifi_manager_ap_h ap, - wifi_manager_disconnected_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_disconnect( - wifi, - ap, - callback, - user_data, - ); - } - - late final _wifi_manager_disconnectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, - wifi_manager_ap_h, - wifi_manager_disconnected_cb, - ffi.Pointer)>>('wifi_manager_disconnect'); - late final _wifi_manager_disconnect = _wifi_manager_disconnectPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_ap_h, - wifi_manager_disconnected_cb, ffi.Pointer)>(); - - /// @brief Connects to the access point with WPS PBC asynchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] ap The access point handle - /// @param[in] callback The callback function to be called \n - /// This can be NULL if you don't want to get the notification. - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_manager_connected_cb(). - /// @see wifi_manager_connected_cb() - /// @see wifi_manager_connect() - /// @see wifi_manager_disconnect() - /// @see wifi_manager_ap_is_wps_supported() - int wifi_manager_connect_by_wps_pbc( - wifi_manager_h wifi, - wifi_manager_ap_h ap, - wifi_manager_connected_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_connect_by_wps_pbc( - wifi, - ap, - callback, - user_data, - ); - } - - late final _wifi_manager_connect_by_wps_pbcPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, - wifi_manager_ap_h, - wifi_manager_connected_cb, - ffi.Pointer)>>('wifi_manager_connect_by_wps_pbc'); - late final _wifi_manager_connect_by_wps_pbc = - _wifi_manager_connect_by_wps_pbcPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_ap_h, - wifi_manager_connected_cb, ffi.Pointer)>(); - - /// @brief Connects to the access point with WPS PIN asynchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] ap The access point handle - /// @param[in] pin The WPS PIN is a non-NULL string with length greater than 0 and less than or equal to 8 - /// @param[in] callback The callback function to be called (this can be NULL if you don't want to get the notification) - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_manager_connected_cb(). - /// @see wifi_manager_connected_cb() - /// @see wifi_manager_connect() - /// @see wifi_manager_disconnect() - /// @see wifi_manager_ap_is_wps_supported() - int wifi_manager_connect_by_wps_pin( - wifi_manager_h wifi, - wifi_manager_ap_h ap, - ffi.Pointer pin, - wifi_manager_connected_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_connect_by_wps_pin( - wifi, - ap, - pin, - callback, - user_data, - ); - } - - late final _wifi_manager_connect_by_wps_pinPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, - wifi_manager_ap_h, - ffi.Pointer, - wifi_manager_connected_cb, - ffi.Pointer)>>('wifi_manager_connect_by_wps_pin'); - late final _wifi_manager_connect_by_wps_pin = - _wifi_manager_connect_by_wps_pinPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_ap_h, ffi.Pointer, - wifi_manager_connected_cb, ffi.Pointer)>(); - - /// @brief Connects to the access point with WPS PBC without entering SSID. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get \n - /// %http://tizen.org/privilege/network.profile - /// @remarks This function needs all listed privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called \n - /// This can be NULL if you don't want to get the notification. - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_connected_cb(). - /// @see wifi_manager_connected_cb() - /// @see wifi_manager_connect() - /// @see wifi_manager_disconnect() - /// @see wifi_manager_ap_is_wps_supported() - int wifi_manager_connect_by_wps_pbc_without_ssid( - wifi_manager_h wifi, - wifi_manager_connected_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_connect_by_wps_pbc_without_ssid( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_connect_by_wps_pbc_without_ssidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_connected_cb, - ffi.Pointer)>>( - 'wifi_manager_connect_by_wps_pbc_without_ssid'); - late final _wifi_manager_connect_by_wps_pbc_without_ssid = - _wifi_manager_connect_by_wps_pbc_without_ssidPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_connected_cb, - ffi.Pointer)>(); - - /// @brief Connects to the access point with WPS PIN without entering SSID. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get \n - /// %http://tizen.org/privilege/network.profile - /// @remarks This function needs all listed privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] pin The WPS PIN, a non-NULL string with length greater \n - /// than 0 and less than or equal to 8 - /// @param[in] callback The callback function to be called \n - /// This can be NULL if you don't want to get the notification. - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_connected_cb(). - /// @see wifi_manager_connected_cb() - /// @see wifi_manager_connect() - /// @see wifi_manager_disconnect() - /// @see wifi_manager_ap_is_wps_supported() - int wifi_manager_connect_by_wps_pin_without_ssid( - wifi_manager_h wifi, - ffi.Pointer pin, - wifi_manager_connected_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_connect_by_wps_pin_without_ssid( - wifi, - pin, - callback, - user_data, - ); - } - - late final _wifi_manager_connect_by_wps_pin_without_ssidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, ffi.Pointer, - wifi_manager_connected_cb, ffi.Pointer)>>( - 'wifi_manager_connect_by_wps_pin_without_ssid'); - late final _wifi_manager_connect_by_wps_pin_without_ssid = - _wifi_manager_connect_by_wps_pin_without_ssidPtr.asFunction< - int Function(wifi_manager_h, ffi.Pointer, - wifi_manager_connected_cb, ffi.Pointer)>(); - - /// @brief Stops ongoing WPS provisioning / disconnects from the connected access point. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_cancel_wps( - wifi_manager_h wifi, - ) { - return _wifi_manager_cancel_wps( - wifi, - ); - } - - late final _wifi_manager_cancel_wpsPtr = - _lookup>( - 'wifi_manager_cancel_wps'); - late final _wifi_manager_cancel_wps = - _wifi_manager_cancel_wpsPtr.asFunction(); - - /// @brief Deletes the information of a stored access point and disconnects from it if it was connected to. - /// @details If an AP is connected to, then connection information will be stored. - /// This information is used when a connection to that AP is established automatically. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] ap The access point handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_forget_ap( - wifi_manager_h wifi, - wifi_manager_ap_h ap, - ) { - return _wifi_manager_forget_ap( - wifi, - ap, - ); - } - - late final _wifi_manager_forget_apPtr = _lookup< - ffi - .NativeFunction>( - 'wifi_manager_forget_ap'); - late final _wifi_manager_forget_ap = _wifi_manager_forget_apPtr - .asFunction(); - - /// @brief Updates an existing AP. - /// @details When a AP is changed, these changes will be not applied to the Connection Manager immediately. - /// When you call this function, your changes affect the Connection Manager and the existing AP is updated. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] ap The access point handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_update_ap( - wifi_manager_h wifi, - wifi_manager_ap_h ap, - ) { - return _wifi_manager_update_ap( - wifi, - ap, - ); - } - - late final _wifi_manager_update_apPtr = _lookup< - ffi - .NativeFunction>( - 'wifi_manager_update_ap'); - late final _wifi_manager_update_ap = _wifi_manager_update_apPtr - .asFunction(); - - /// @brief Adds the Wi-Fi Vendor Specific Information Element (VSIE) to a specific frame type. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/network.set - /// @remarks @a vsie_str for @a frame_id will be in effect until Wi-Fi is deactivated. - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] frame_id The frame ID for setting VSIE - /// @param[in] vsie_str The VSIE data - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @pre Wi-Fi service must be activated by wifi_manager_activate(). - /// @see wifi_manager_activate() - /// @see wifi_manager_remove_vsie() - /// @see wifi_manager_get_vsie() - int wifi_manager_add_vsie( - wifi_manager_h wifi, - int frame_id, - ffi.Pointer vsie_str, - ) { - return _wifi_manager_add_vsie( - wifi, - frame_id, - vsie_str, - ); - } - - late final _wifi_manager_add_vsiePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, ffi.Int32, - ffi.Pointer)>>('wifi_manager_add_vsie'); - late final _wifi_manager_add_vsie = _wifi_manager_add_vsiePtr - .asFunction)>(); - - /// @brief Gets the Wi-Fi Vendor Specific Information Elements (VSIE) from a specific frame. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/network.get - /// @remarks @a vsie_str must be released with free(). - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] frame_id The frame ID for getting VSIE - /// @param[out] vsie_str The VSIE data - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @pre Wi-Fi service must be activated by wifi_manager_activate() - /// and VSIE for a specific frame must be set with wifi_manager_add_vsie(). - /// @see wifi_manager_activate() - /// @see wifi_manager_remove_vsie() - /// @see wifi_manager_add_vsie() - int wifi_manager_get_vsie( - wifi_manager_h wifi, - int frame_id, - ffi.Pointer> vsie_str, - ) { - return _wifi_manager_get_vsie( - wifi, - frame_id, - vsie_str, - ); - } - - late final _wifi_manager_get_vsiePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, ffi.Int32, - ffi.Pointer>)>>('wifi_manager_get_vsie'); - late final _wifi_manager_get_vsie = _wifi_manager_get_vsiePtr.asFunction< - int Function(wifi_manager_h, int, ffi.Pointer>)>(); - - /// @brief Removes the Wi-Fi Vendor Specific Information Element (VSIE) from specific frame. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/network.set - /// @remarks @a vsie_str for @a frame_id will be in effect until Wi-Fi is deactivated. - /// - /// @param[in] wifi The wifi handle - /// @param[in] frame_id The frame ID for removing VSIE - /// @param[in] vsie_str The VSIE data - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @pre Wi-Fi service must be activated by wifi_manager_activate() - /// and VSIE for a specific frame must be set with wifi_manager_add_vsie(). - /// @see wifi_manager_activate() - /// @see wifi_manager_get_vsie() - /// @see wifi_manager_add_vsie() - int wifi_manager_remove_vsie( - wifi_manager_h wifi, - int frame_id, - ffi.Pointer vsie_str, - ) { - return _wifi_manager_remove_vsie( - wifi, - frame_id, - vsie_str, - ); - } - - late final _wifi_manager_remove_vsiePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, ffi.Int32, - ffi.Pointer)>>('wifi_manager_remove_vsie'); - late final _wifi_manager_remove_vsie = _wifi_manager_remove_vsiePtr - .asFunction)>(); - - /// @brief Gets the connection state. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] wifi The Wi-Fi handle - /// @param[out] connection_state The connection state - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_get_connection_state( - wifi_manager_h wifi, - ffi.Pointer connection_state, - ) { - return _wifi_manager_get_connection_state( - wifi, - connection_state, - ); - } - - late final _wifi_manager_get_connection_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, - ffi.Pointer)>>('wifi_manager_get_connection_state'); - late final _wifi_manager_get_connection_state = - _wifi_manager_get_connection_statePtr - .asFunction)>(); - - /// @brief Registers the callback called when the device state is changed. - /// @since_tizen 3.0 - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_set_device_state_changed_cb( - wifi_manager_h wifi, - wifi_manager_device_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_set_device_state_changed_cb( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_set_device_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, - wifi_manager_device_state_changed_cb, - ffi.Pointer)>>( - 'wifi_manager_set_device_state_changed_cb'); - late final _wifi_manager_set_device_state_changed_cb = - _wifi_manager_set_device_state_changed_cbPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_device_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback called when the device state is changed. - /// @since_tizen 3.0 - /// @param[in] wifi The Wi-Fi handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_unset_device_state_changed_cb( - wifi_manager_h wifi, - ) { - return _wifi_manager_unset_device_state_changed_cb( - wifi, - ); - } - - late final _wifi_manager_unset_device_state_changed_cbPtr = - _lookup>( - 'wifi_manager_unset_device_state_changed_cb'); - late final _wifi_manager_unset_device_state_changed_cb = - _wifi_manager_unset_device_state_changed_cbPtr - .asFunction(); - - /// @brief Registers the callback called when the background scan is finished. - /// @since_tizen 3.0 - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_set_background_scan_cb( - wifi_manager_h wifi, - wifi_manager_scan_finished_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_set_background_scan_cb( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_set_background_scan_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_scan_finished_cb, - ffi.Pointer)>>('wifi_manager_set_background_scan_cb'); - late final _wifi_manager_set_background_scan_cb = - _wifi_manager_set_background_scan_cbPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_scan_finished_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback called when the scan is finished. - /// @since_tizen 3.0 - /// @param[in] wifi The Wi-Fi handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_unset_background_scan_cb( - wifi_manager_h wifi, - ) { - return _wifi_manager_unset_background_scan_cb( - wifi, - ); - } - - late final _wifi_manager_unset_background_scan_cbPtr = - _lookup>( - 'wifi_manager_unset_background_scan_cb'); - late final _wifi_manager_unset_background_scan_cb = - _wifi_manager_unset_background_scan_cbPtr - .asFunction(); - - /// @brief Registers the callback called when the scanning state is changed. - /// @since_tizen 4.0 - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_set_scan_state_changed_cb( - wifi_manager_h wifi, - wifi_manager_scan_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_set_scan_state_changed_cb( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_set_scan_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, - wifi_manager_scan_state_changed_cb, ffi.Pointer)>>( - 'wifi_manager_set_scan_state_changed_cb'); - late final _wifi_manager_set_scan_state_changed_cb = - _wifi_manager_set_scan_state_changed_cbPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_scan_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback called when the scanning state is changed. - /// @since_tizen 4.0 - /// @param[in] wifi The Wi-Fi handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_unset_scan_state_changed_cb( - wifi_manager_h wifi, - ) { - return _wifi_manager_unset_scan_state_changed_cb( - wifi, - ); - } - - late final _wifi_manager_unset_scan_state_changed_cbPtr = - _lookup>( - 'wifi_manager_unset_scan_state_changed_cb'); - late final _wifi_manager_unset_scan_state_changed_cb = - _wifi_manager_unset_scan_state_changed_cbPtr - .asFunction(); - - /// @brief Registers the callback called when the connection state is changed. - /// @since_tizen 3.0 - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_set_connection_state_changed_cb( - wifi_manager_h wifi, - wifi_manager_connection_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_set_connection_state_changed_cb( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_set_connection_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, - wifi_manager_connection_state_changed_cb, - ffi.Pointer)>>( - 'wifi_manager_set_connection_state_changed_cb'); - late final _wifi_manager_set_connection_state_changed_cb = - _wifi_manager_set_connection_state_changed_cbPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_connection_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback called when the connection state is changed. - /// @since_tizen 3.0 - /// @param[in] wifi The Wi-Fi handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_unset_connection_state_changed_cb( - wifi_manager_h wifi, - ) { - return _wifi_manager_unset_connection_state_changed_cb( - wifi, - ); - } - - late final _wifi_manager_unset_connection_state_changed_cbPtr = - _lookup>( - 'wifi_manager_unset_connection_state_changed_cb'); - late final _wifi_manager_unset_connection_state_changed_cb = - _wifi_manager_unset_connection_state_changed_cbPtr - .asFunction(); - - /// @brief Registers callback called when the RSSI of connected Wi-Fi is changed. - /// @since_tizen 3.0 - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_set_rssi_level_changed_cb( - wifi_manager_h wifi, - wifi_manager_rssi_level_changed_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_set_rssi_level_changed_cb( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_set_rssi_level_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, - wifi_manager_rssi_level_changed_cb, ffi.Pointer)>>( - 'wifi_manager_set_rssi_level_changed_cb'); - late final _wifi_manager_set_rssi_level_changed_cb = - _wifi_manager_set_rssi_level_changed_cbPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_rssi_level_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters callback called when the RSSI of connected Wi-Fi is changed. - /// @since_tizen 3.0 - /// @param[in] wifi The Wi-Fi handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_unset_rssi_level_changed_cb( - wifi_manager_h wifi, - ) { - return _wifi_manager_unset_rssi_level_changed_cb( - wifi, - ); - } - - late final _wifi_manager_unset_rssi_level_changed_cbPtr = - _lookup>( - 'wifi_manager_unset_rssi_level_changed_cb'); - late final _wifi_manager_unset_rssi_level_changed_cb = - _wifi_manager_unset_rssi_level_changed_cbPtr - .asFunction(); - - /// @brief Registers a callback called when the Wi-Fi Module state is changed. - /// @since_tizen 4.0 - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_module_state_changed_cb() - /// @see wifi_manager_unset_module_state_changed_cb() - int wifi_manager_set_module_state_changed_cb( - wifi_manager_h wifi, - wifi_manager_module_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_set_module_state_changed_cb( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_set_module_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, - wifi_manager_module_state_changed_cb, - ffi.Pointer)>>( - 'wifi_manager_set_module_state_changed_cb'); - late final _wifi_manager_set_module_state_changed_cb = - _wifi_manager_set_module_state_changed_cbPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_module_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback called when the Wi-Fi Module state is changed. - /// @since_tizen 4.0 - /// @param[in] wifi The Wi-Fi handle - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_module_state_changed_cb() - /// @see wifi_manager_set_module_state_changed_cb() - int wifi_manager_unset_module_state_changed_cb( - wifi_manager_h wifi, - ) { - return _wifi_manager_unset_module_state_changed_cb( - wifi, - ); - } - - late final _wifi_manager_unset_module_state_changed_cbPtr = - _lookup>( - 'wifi_manager_unset_module_state_changed_cb'); - late final _wifi_manager_unset_module_state_changed_cb = - _wifi_manager_unset_module_state_changed_cbPtr - .asFunction(); - - /// @brief Gets the Wi-Fi Module state. - /// @since_tizen 4.0 - /// @param[in] wifi The Wi-Fi handle - /// @param[out] state The Wi-Fi Module state - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_get_module_state( - wifi_manager_h wifi, - ffi.Pointer state, - ) { - return _wifi_manager_get_module_state( - wifi, - state, - ); - } - - late final _wifi_manager_get_module_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, - ffi.Pointer)>>('wifi_manager_get_module_state'); - late final _wifi_manager_get_module_state = _wifi_manager_get_module_statePtr - .asFunction)>(); - - /// @brief Starts BSSID scan asynchronously. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_manager_bssid_scan_finished_cb(). - int wifi_manager_bssid_scan( - wifi_manager_h wifi, - wifi_manager_bssid_scan_finished_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_bssid_scan( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_bssid_scanPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_bssid_scan_finished_cb, - ffi.Pointer)>>('wifi_manager_bssid_scan'); - late final _wifi_manager_bssid_scan = _wifi_manager_bssid_scanPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_bssid_scan_finished_cb, - ffi.Pointer)>(); - - /// @brief Creates the access point handle. - /// @since_tizen 3.0 - /// @remarks You must release @a ap using wifi_manager_ap_destroy(). - /// @param[in] wifi The Wi-Fi handle - /// @param[in] essid The ESSID (Extended Service Set Identifier) should be null-terminated and can be UTF-8 encoded - /// @param[out] ap The access point handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_ap_destroy() - int wifi_manager_ap_create( - wifi_manager_h wifi, - ffi.Pointer essid, - ffi.Pointer ap, - ) { - return _wifi_manager_ap_create( - wifi, - essid, - ap, - ); - } - - late final _wifi_manager_ap_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, ffi.Pointer, - ffi.Pointer)>>('wifi_manager_ap_create'); - late final _wifi_manager_ap_create = _wifi_manager_ap_createPtr.asFunction< - int Function(wifi_manager_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Creates the hidden access point handle. - /// @since_tizen 3.0 - /// @remarks You must release @a ap using wifi_manager_ap_destroy(). - /// @param[in] wifi The Wi-Fi handle - /// @param[in] essid The ESSID (Extended Service Set Identifier) should be null-terminated and can be UTF-8 encoded - /// @param[out] ap The access point handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_ap_destroy() - int wifi_manager_ap_hidden_create( - wifi_manager_h wifi, - ffi.Pointer essid, - ffi.Pointer ap, - ) { - return _wifi_manager_ap_hidden_create( - wifi, - essid, - ap, - ); - } - - late final _wifi_manager_ap_hidden_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, ffi.Pointer, - ffi.Pointer)>>( - 'wifi_manager_ap_hidden_create'); - late final _wifi_manager_ap_hidden_create = - _wifi_manager_ap_hidden_createPtr.asFunction< - int Function(wifi_manager_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Destroys the access point handle. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_ap_create() - int wifi_manager_ap_destroy( - wifi_manager_ap_h ap, - ) { - return _wifi_manager_ap_destroy( - ap, - ); - } - - late final _wifi_manager_ap_destroyPtr = - _lookup>( - 'wifi_manager_ap_destroy'); - late final _wifi_manager_ap_destroy = - _wifi_manager_ap_destroyPtr.asFunction(); - - /// @brief Clones the access point handle. - /// @since_tizen 3.0 - /// @remarks You must release @a cloned_ap using wifi_manager_ap_destroy(). - /// @param[out] cloned_ap The cloned access point handle - /// @param[in] origin The origin access point handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_ap_destroy() - int wifi_manager_ap_clone( - ffi.Pointer cloned_ap, - wifi_manager_ap_h origin, - ) { - return _wifi_manager_ap_clone( - cloned_ap, - origin, - ); - } - - late final _wifi_manager_ap_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - wifi_manager_ap_h)>>('wifi_manager_ap_clone'); - late final _wifi_manager_ap_clone = _wifi_manager_ap_clonePtr.asFunction< - int Function(ffi.Pointer, wifi_manager_ap_h)>(); - - /// @brief Refreshes the access point information. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @remarks You should call this function in order to get the current access point information, because the information can be changed. - /// @param[in] ap The access point handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_refresh( - wifi_manager_ap_h ap, - ) { - return _wifi_manager_ap_refresh( - ap, - ); - } - - late final _wifi_manager_ap_refreshPtr = - _lookup>( - 'wifi_manager_ap_refresh'); - late final _wifi_manager_ap_refresh = - _wifi_manager_ap_refreshPtr.asFunction(); - - /// @brief Gets ESSID (Extended Service Set Identifier). - /// @since_tizen 3.0 - /// @remarks You must release @a essid using free(). - /// @param[in] ap The access point handle - /// @param[out] essid The ESSID - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_essid( - wifi_manager_ap_h ap, - ffi.Pointer> essid, - ) { - return _wifi_manager_ap_get_essid( - ap, - essid, - ); - } - - late final _wifi_manager_ap_get_essidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_ap_h, ffi.Pointer>)>>( - 'wifi_manager_ap_get_essid'); - late final _wifi_manager_ap_get_essid = - _wifi_manager_ap_get_essidPtr.asFunction< - int Function( - wifi_manager_ap_h, ffi.Pointer>)>(); - - /// @brief Gets raw SSID (Service Set Identifier). - /// @since_tizen 4.0 - /// @remarks You must release @a ssid using free(). - /// @param[in] ap The access point handle - /// @param[out] ssid The raw SSID bytes - /// @param[out] ssid_len The raw SSID length - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_raw_ssid( - wifi_manager_ap_h ap, - ffi.Pointer> ssid, - ffi.Pointer ssid_len, - ) { - return _wifi_manager_ap_get_raw_ssid( - ap, - ssid, - ssid_len, - ); - } - - late final _wifi_manager_ap_get_raw_ssidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_ap_h, - ffi.Pointer>, - ffi.Pointer)>>('wifi_manager_ap_get_raw_ssid'); - late final _wifi_manager_ap_get_raw_ssid = - _wifi_manager_ap_get_raw_ssidPtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Gets BSSID (Basic Service Set Identifier). - /// @since_tizen 3.0 - /// @remarks You must release @a bssid using free(). - /// @param[in] ap The access point handle - /// @param[out] bssid The BSSID - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_bssid( - wifi_manager_ap_h ap, - ffi.Pointer> bssid, - ) { - return _wifi_manager_ap_get_bssid( - ap, - bssid, - ); - } - - late final _wifi_manager_ap_get_bssidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_ap_h, ffi.Pointer>)>>( - 'wifi_manager_ap_get_bssid'); - late final _wifi_manager_ap_get_bssid = - _wifi_manager_ap_get_bssidPtr.asFunction< - int Function( - wifi_manager_ap_h, ffi.Pointer>)>(); - - /// @brief Gets the RSSI. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[out] rssi The RSSI value (in dBm) - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_rssi( - wifi_manager_ap_h ap, - ffi.Pointer rssi, - ) { - return _wifi_manager_ap_get_rssi( - ap, - rssi, - ); - } - - late final _wifi_manager_ap_get_rssiPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_get_rssi'); - late final _wifi_manager_ap_get_rssi = _wifi_manager_ap_get_rssiPtr - .asFunction)>(); - - /// @brief Gets the RSSI level. - /// @since_tizen 4.0 - /// @param[in] ap The access point handle - /// @param[out] rssi_level The RSSI level - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_rssi_level( - wifi_manager_ap_h ap, - ffi.Pointer rssi_level, - ) { - return _wifi_manager_ap_get_rssi_level( - ap, - rssi_level, - ); - } - - late final _wifi_manager_ap_get_rssi_levelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_get_rssi_level'); - late final _wifi_manager_ap_get_rssi_level = - _wifi_manager_ap_get_rssi_levelPtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer)>(); - - /// @brief Gets the frequency band (MHz). - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[out] frequency The frequency - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_frequency( - wifi_manager_ap_h ap, - ffi.Pointer frequency, - ) { - return _wifi_manager_ap_get_frequency( - ap, - frequency, - ); - } - - late final _wifi_manager_ap_get_frequencyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_get_frequency'); - late final _wifi_manager_ap_get_frequency = _wifi_manager_ap_get_frequencyPtr - .asFunction)>(); - - /// @brief Gets the max speed (Mbps). - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[out] max_speed The max speed - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_max_speed( - wifi_manager_ap_h ap, - ffi.Pointer max_speed, - ) { - return _wifi_manager_ap_get_max_speed( - ap, - max_speed, - ); - } - - late final _wifi_manager_ap_get_max_speedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_get_max_speed'); - late final _wifi_manager_ap_get_max_speed = _wifi_manager_ap_get_max_speedPtr - .asFunction)>(); - - /// @brief Checks whether the access point is favorite or not. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[out] favorite @c true if access point is favorite, - /// otherwise @c false if access point is not favorite - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_is_favorite( - wifi_manager_ap_h ap, - ffi.Pointer favorite, - ) { - return _wifi_manager_ap_is_favorite( - ap, - favorite, - ); - } - - late final _wifi_manager_ap_is_favoritePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_is_favorite'); - late final _wifi_manager_ap_is_favorite = _wifi_manager_ap_is_favoritePtr - .asFunction)>(); - - /// @brief Checks whether the access point is passpoint or not. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[out] passpoint @c true if access point is passpoint, - /// otherwise @c false if access point is not passpoint. - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_is_passpoint( - wifi_manager_ap_h ap, - ffi.Pointer passpoint, - ) { - return _wifi_manager_ap_is_passpoint( - ap, - passpoint, - ); - } - - late final _wifi_manager_ap_is_passpointPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_is_passpoint'); - late final _wifi_manager_ap_is_passpoint = _wifi_manager_ap_is_passpointPtr - .asFunction)>(); - - /// @brief Gets the connection state. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[out] state The connection state - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_connection_state( - wifi_manager_ap_h ap, - ffi.Pointer state, - ) { - return _wifi_manager_ap_get_connection_state( - ap, - state, - ); - } - - late final _wifi_manager_ap_get_connection_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_get_connection_state'); - late final _wifi_manager_ap_get_connection_state = - _wifi_manager_ap_get_connection_statePtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer)>(); - - /// @brief Gets the config type of IP. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[out] type The type of IP config - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_ip_config_type( - wifi_manager_ap_h ap, - int address_family, - ffi.Pointer type, - ) { - return _wifi_manager_ap_get_ip_config_type( - ap, - address_family, - type, - ); - } - - late final _wifi_manager_ap_get_ip_config_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Pointer)>>('wifi_manager_ap_get_ip_config_type'); - late final _wifi_manager_ap_get_ip_config_type = - _wifi_manager_ap_get_ip_config_typePtr.asFunction< - int Function(wifi_manager_ap_h, int, ffi.Pointer)>(); - - /// @brief Sets the config type of IP. - /// @details If you set IP config type to #WIFI_MANAGER_IP_CONFIG_TYPE_STATIC, - /// then IP address, Gateway and Subnet mask will be set to the initial value "0.0.0.0". - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[in] type The type of IP config - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_update_ap() - int wifi_manager_ap_set_ip_config_type( - wifi_manager_ap_h ap, - int address_family, - int type, - ) { - return _wifi_manager_ap_set_ip_config_type( - ap, - address_family, - type, - ); - } - - late final _wifi_manager_ap_set_ip_config_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Int32)>>('wifi_manager_ap_set_ip_config_type'); - late final _wifi_manager_ap_set_ip_config_type = - _wifi_manager_ap_set_ip_config_typePtr - .asFunction(); - - /// @brief Gets the IP address. - /// @since_tizen 3.0 - /// @remarks You must release @a ip_address using free(). - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[out] ip_address The IP address; this value is for default address \n - /// e.g, IPv6 can have multiple addresses. but you can only obtain a representative address \n - /// if you want to get all IPv6 address, you can use the wifi_manager_ap_foreach_ipv6_address(). - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_ap_foreach_ipv6_address() - int wifi_manager_ap_get_ip_address( - wifi_manager_ap_h ap, - int address_family, - ffi.Pointer> ip_address, - ) { - return _wifi_manager_ap_get_ip_address( - ap, - address_family, - ip_address, - ); - } - - late final _wifi_manager_ap_get_ip_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Pointer>)>>( - 'wifi_manager_ap_get_ip_address'); - late final _wifi_manager_ap_get_ip_address = - _wifi_manager_ap_get_ip_addressPtr.asFunction< - int Function( - wifi_manager_ap_h, int, ffi.Pointer>)>(); - - /// @brief Sets the IP address. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[in] ip_address The IP address; if you set this value to NULL, then the existing value will be deleted - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_update_ap() - int wifi_manager_ap_set_ip_address( - wifi_manager_ap_h ap, - int address_family, - ffi.Pointer ip_address, - ) { - return _wifi_manager_ap_set_ip_address( - ap, - address_family, - ip_address, - ); - } - - late final _wifi_manager_ap_set_ip_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Pointer)>>('wifi_manager_ap_set_ip_address'); - late final _wifi_manager_ap_set_ip_address = - _wifi_manager_ap_set_ip_addressPtr.asFunction< - int Function(wifi_manager_ap_h, int, ffi.Pointer)>(); - - /// @brief Gets all IPv6 addresses assigned to the Wi-Fi interface. - /// @since_tizen 4.0 - /// @param[in] ap The access point handle - /// @param[in] callback The callback to be called for each IPv6 address - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value. - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_foreach_ipv6_address( - wifi_manager_ap_h ap, - wifi_manager_ap_ipv6_address_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_ap_foreach_ipv6_address( - ap, - callback, - user_data, - ); - } - - late final _wifi_manager_ap_foreach_ipv6_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, wifi_manager_ap_ipv6_address_cb, - ffi.Pointer)>>('wifi_manager_ap_foreach_ipv6_address'); - late final _wifi_manager_ap_foreach_ipv6_address = - _wifi_manager_ap_foreach_ipv6_addressPtr.asFunction< - int Function(wifi_manager_ap_h, wifi_manager_ap_ipv6_address_cb, - ffi.Pointer)>(); - - /// @brief Gets the subnet mask. - /// @since_tizen 3.0 - /// @remarks You must release @a subnet_mask using free(). - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[out] subnet_mask The subnet mask - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_subnet_mask( - wifi_manager_ap_h ap, - int address_family, - ffi.Pointer> subnet_mask, - ) { - return _wifi_manager_ap_get_subnet_mask( - ap, - address_family, - subnet_mask, - ); - } - - late final _wifi_manager_ap_get_subnet_maskPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Pointer>)>>( - 'wifi_manager_ap_get_subnet_mask'); - late final _wifi_manager_ap_get_subnet_mask = - _wifi_manager_ap_get_subnet_maskPtr.asFunction< - int Function( - wifi_manager_ap_h, int, ffi.Pointer>)>(); - - /// @brief Sets the subnet mask. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[in] subnet_mask The subnet mask; if you set this value to NULL, then the existing value will be deleted - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_update_ap() - int wifi_manager_ap_set_subnet_mask( - wifi_manager_ap_h ap, - int address_family, - ffi.Pointer subnet_mask, - ) { - return _wifi_manager_ap_set_subnet_mask( - ap, - address_family, - subnet_mask, - ); - } - - late final _wifi_manager_ap_set_subnet_maskPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Pointer)>>('wifi_manager_ap_set_subnet_mask'); - late final _wifi_manager_ap_set_subnet_mask = - _wifi_manager_ap_set_subnet_maskPtr.asFunction< - int Function(wifi_manager_ap_h, int, ffi.Pointer)>(); - - /// @brief Gets the gateway address. - /// @since_tizen 3.0 - /// @remarks You must release @a gateway_address using free(). - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[out] gateway_address The gateway address - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_gateway_address( - wifi_manager_ap_h ap, - int address_family, - ffi.Pointer> gateway_address, - ) { - return _wifi_manager_ap_get_gateway_address( - ap, - address_family, - gateway_address, - ); - } - - late final _wifi_manager_ap_get_gateway_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Pointer>)>>( - 'wifi_manager_ap_get_gateway_address'); - late final _wifi_manager_ap_get_gateway_address = - _wifi_manager_ap_get_gateway_addressPtr.asFunction< - int Function( - wifi_manager_ap_h, int, ffi.Pointer>)>(); - - /// @brief Sets the gateway address. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[in] gateway_address The gateway address \n - /// If you set this value to @c NULL, then the existing value will be deleted. - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_update_ap() - int wifi_manager_ap_set_gateway_address( - wifi_manager_ap_h ap, - int address_family, - ffi.Pointer gateway_address, - ) { - return _wifi_manager_ap_set_gateway_address( - ap, - address_family, - gateway_address, - ); - } - - late final _wifi_manager_ap_set_gateway_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Pointer)>>('wifi_manager_ap_set_gateway_address'); - late final _wifi_manager_ap_set_gateway_address = - _wifi_manager_ap_set_gateway_addressPtr.asFunction< - int Function(wifi_manager_ap_h, int, ffi.Pointer)>(); - - /// @brief Gets the DHCP Server address. - /// @since_tizen 4.0 - /// @remarks You must release @a dhcp_server using g_free(). - /// This function is supported only for IPv4 address family. - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[out] dhcp_server The DHCP server address - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_dhcp_server_address( - wifi_manager_ap_h ap, - int address_family, - ffi.Pointer> dhcp_server, - ) { - return _wifi_manager_ap_get_dhcp_server_address( - ap, - address_family, - dhcp_server, - ); - } - - late final _wifi_manager_ap_get_dhcp_server_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Pointer>)>>( - 'wifi_manager_ap_get_dhcp_server_address'); - late final _wifi_manager_ap_get_dhcp_server_address = - _wifi_manager_ap_get_dhcp_server_addressPtr.asFunction< - int Function( - wifi_manager_ap_h, int, ffi.Pointer>)>(); - - /// @brief Gets the DHCP lease duration. - /// @since_tizen 4.0 - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[out] dhcp_lease_duration The DHCP lease duration in seconds - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_dhcp_lease_duration( - wifi_manager_ap_h ap, - int address_family, - ffi.Pointer dhcp_lease_duration, - ) { - return _wifi_manager_ap_get_dhcp_lease_duration( - ap, - address_family, - dhcp_lease_duration, - ); - } - - late final _wifi_manager_ap_get_dhcp_lease_durationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_ap_h, ffi.Int32, ffi.Pointer)>>( - 'wifi_manager_ap_get_dhcp_lease_duration'); - late final _wifi_manager_ap_get_dhcp_lease_duration = - _wifi_manager_ap_get_dhcp_lease_durationPtr.asFunction< - int Function(wifi_manager_ap_h, int, ffi.Pointer)>(); - - /// @brief Gets the proxy address. - /// @since_tizen 3.0 - /// @remarks You must release @a proxy_address using free(). - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[out] proxy_address The proxy address - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_proxy_address( - wifi_manager_ap_h ap, - int address_family, - ffi.Pointer> proxy_address, - ) { - return _wifi_manager_ap_get_proxy_address( - ap, - address_family, - proxy_address, - ); - } - - late final _wifi_manager_ap_get_proxy_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Pointer>)>>( - 'wifi_manager_ap_get_proxy_address'); - late final _wifi_manager_ap_get_proxy_address = - _wifi_manager_ap_get_proxy_addressPtr.asFunction< - int Function( - wifi_manager_ap_h, int, ffi.Pointer>)>(); - - /// @brief Sets the proxy address. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[in] proxy_address The proxy address \n - /// If you set this value to @c NULL, then the existing value will be deleted. - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_update_ap() - int wifi_manager_ap_set_proxy_address( - wifi_manager_ap_h ap, - int address_family, - ffi.Pointer proxy_address, - ) { - return _wifi_manager_ap_set_proxy_address( - ap, - address_family, - proxy_address, - ); - } - - late final _wifi_manager_ap_set_proxy_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Pointer)>>('wifi_manager_ap_set_proxy_address'); - late final _wifi_manager_ap_set_proxy_address = - _wifi_manager_ap_set_proxy_addressPtr.asFunction< - int Function(wifi_manager_ap_h, int, ffi.Pointer)>(); - - /// @brief Gets the Proxy type. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[out] proxy_type The type of proxy - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_proxy_type( - wifi_manager_ap_h ap, - ffi.Pointer proxy_type, - ) { - return _wifi_manager_ap_get_proxy_type( - ap, - proxy_type, - ); - } - - late final _wifi_manager_ap_get_proxy_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_get_proxy_type'); - late final _wifi_manager_ap_get_proxy_type = - _wifi_manager_ap_get_proxy_typePtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer)>(); - - /// @brief Sets the Proxy address. - /// @details If you set Proxy type to #WIFI_MANAGER_PROXY_TYPE_AUTO or #WIFI_MANAGER_PROXY_TYPE_MANUAL, then Proxy will be restored. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[in] proxy_type The type of proxy - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_update_ap() - int wifi_manager_ap_set_proxy_type( - wifi_manager_ap_h ap, - int proxy_type, - ) { - return _wifi_manager_ap_set_proxy_type( - ap, - proxy_type, - ); - } - - late final _wifi_manager_ap_set_proxy_typePtr = _lookup< - ffi.NativeFunction>( - 'wifi_manager_ap_set_proxy_type'); - late final _wifi_manager_ap_set_proxy_type = - _wifi_manager_ap_set_proxy_typePtr - .asFunction(); - - /// @brief Gets the DNS address. - /// @since_tizen 3.0 - /// @remarks The allowance of DNS address is @c 2.You must release @a dns_address using free(). - /// @param[in] ap The access point handle - /// @param[in] order The order of DNS address; it starts from 1, which means first DNS address - /// @param[in] address_family The address family - /// @param[out] dns_address The DNS address - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_dns_address( - wifi_manager_ap_h ap, - int order, - int address_family, - ffi.Pointer> dns_address, - ) { - return _wifi_manager_ap_get_dns_address( - ap, - order, - address_family, - dns_address, - ); - } - - late final _wifi_manager_ap_get_dns_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int, ffi.Int32, - ffi.Pointer>)>>( - 'wifi_manager_ap_get_dns_address'); - late final _wifi_manager_ap_get_dns_address = - _wifi_manager_ap_get_dns_addressPtr.asFunction< - int Function(wifi_manager_ap_h, int, int, - ffi.Pointer>)>(); - - /// @brief Sets the DNS address. - /// @since_tizen 3.0 - /// @remarks The allowance of DNS address is @c 2 \n - /// @param[in] ap The access point handle - /// @param[in] order The order of DNS address \n - /// It starts from @c 1, which means first DNS address. - /// @param[in] address_family The address family - /// @param[in] dns_address The DNS address \n - /// If you set this value to @c NULL, then the existing value will be deleted. - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_update_ap() - int wifi_manager_ap_set_dns_address( - wifi_manager_ap_h ap, - int order, - int address_family, - ffi.Pointer dns_address, - ) { - return _wifi_manager_ap_set_dns_address( - ap, - order, - address_family, - dns_address, - ); - } - - late final _wifi_manager_ap_set_dns_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int, ffi.Int32, - ffi.Pointer)>>('wifi_manager_ap_set_dns_address'); - late final _wifi_manager_ap_set_dns_address = - _wifi_manager_ap_set_dns_addressPtr.asFunction< - int Function(wifi_manager_ap_h, int, int, ffi.Pointer)>(); - - /// @brief Gets the Wi-Fi security mode. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[out] type The type of Wi-Fi security - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_security_type( - wifi_manager_ap_h ap, - ffi.Pointer type, - ) { - return _wifi_manager_ap_get_security_type( - ap, - type, - ); - } - - late final _wifi_manager_ap_get_security_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_get_security_type'); - late final _wifi_manager_ap_get_security_type = - _wifi_manager_ap_get_security_typePtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer)>(); - - /// @brief Sets the Wi-Fi security mode. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[in] type The type of Wi-Fi security - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_set_security_type( - wifi_manager_ap_h ap, - int type, - ) { - return _wifi_manager_ap_set_security_type( - ap, - type, - ); - } - - late final _wifi_manager_ap_set_security_typePtr = _lookup< - ffi.NativeFunction>( - 'wifi_manager_ap_set_security_type'); - late final _wifi_manager_ap_set_security_type = - _wifi_manager_ap_set_security_typePtr - .asFunction(); - - /// @brief Gets the Wi-Fi encryption type. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[out] type The type of Wi-Fi encryption - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_encryption_type( - wifi_manager_ap_h ap, - ffi.Pointer type, - ) { - return _wifi_manager_ap_get_encryption_type( - ap, - type, - ); - } - - late final _wifi_manager_ap_get_encryption_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_get_encryption_type'); - late final _wifi_manager_ap_get_encryption_type = - _wifi_manager_ap_get_encryption_typePtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer)>(); - - /// @brief Sets the Wi-Fi encryption type. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[in] type The type of Wi-Fi encryption - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_set_encryption_type( - wifi_manager_ap_h ap, - int type, - ) { - return _wifi_manager_ap_set_encryption_type( - ap, - type, - ); - } - - late final _wifi_manager_ap_set_encryption_typePtr = _lookup< - ffi.NativeFunction>( - 'wifi_manager_ap_set_encryption_type'); - late final _wifi_manager_ap_set_encryption_type = - _wifi_manager_ap_set_encryption_typePtr - .asFunction(); - - /// @brief Checks whether the passphrase is required or not. - /// @since_tizen 3.0 - /// @remarks This function is not valid if security type is #WIFI_MANAGER_SECURITY_TYPE_EAP. - /// @param[in] ap The access point handle - /// @param[out] required @c true if passphrase is required, - /// @c false if passphrase is not required. - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_is_passphrase_required( - wifi_manager_ap_h ap, - ffi.Pointer required1, - ) { - return _wifi_manager_ap_is_passphrase_required( - ap, - required1, - ); - } - - late final _wifi_manager_ap_is_passphrase_requiredPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Pointer)>>( - 'wifi_manager_ap_is_passphrase_required'); - late final _wifi_manager_ap_is_passphrase_required = - _wifi_manager_ap_is_passphrase_requiredPtr - .asFunction)>(); - - /// @brief Sets the passphrase. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[in] passphrase The passphrase of access point - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_set_passphrase( - wifi_manager_ap_h ap, - ffi.Pointer passphrase, - ) { - return _wifi_manager_ap_set_passphrase( - ap, - passphrase, - ); - } - - late final _wifi_manager_ap_set_passphrasePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_set_passphrase'); - late final _wifi_manager_ap_set_passphrase = - _wifi_manager_ap_set_passphrasePtr - .asFunction)>(); - - /// @brief Checks whether the WPS(Wi-Fi Protected Setup) is supported or not. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[out] supported @c true if WPS is supported, - /// otherwise @c false is WPS is not supported. - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_connect_by_wps_pbc() - /// @see wifi_manager_connect_by_wps_pin() - int wifi_manager_ap_is_wps_supported( - wifi_manager_ap_h ap, - ffi.Pointer supported, - ) { - return _wifi_manager_ap_is_wps_supported( - ap, - supported, - ); - } - - late final _wifi_manager_ap_is_wps_supportedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_is_wps_supported'); - late final _wifi_manager_ap_is_wps_supported = - _wifi_manager_ap_is_wps_supportedPtr - .asFunction)>(); - - /// @brief Sets the passphrase of EAP. - /// @details You can set one of @a user_name and @a password as @c NULL. - /// In this case, the value of a parameter which is set as @c NULL will be the previous value. - /// But it is not allowed that both @a user_name and @a password are set as @c NULL. - /// @since_tizen 3.0 - /// @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_PEAP or #WIFI_MANAGER_EAP_TYPE_TTLS. - /// @param[in] ap The access point handle - /// @param[in] user_name The user name \n - /// This value can be @c NULL. - /// @param[in] password The password \n - /// This value can be @c NULL. - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_set_eap_passphrase( - wifi_manager_ap_h ap, - ffi.Pointer user_name, - ffi.Pointer password, - ) { - return _wifi_manager_ap_set_eap_passphrase( - ap, - user_name, - password, - ); - } - - late final _wifi_manager_ap_set_eap_passphrasePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Pointer, - ffi.Pointer)>>('wifi_manager_ap_set_eap_passphrase'); - late final _wifi_manager_ap_set_eap_passphrase = - _wifi_manager_ap_set_eap_passphrasePtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the passphrase of EAP. - /// @since_tizen 3.0 - /// @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_PEAP or #WIFI_MANAGER_EAP_TYPE_TTLS. - /// You must release @a user_name using free(). - /// @param[in] ap The access point handle - /// @param[out] user_name The user name - /// @param[out] is_password_set @c true if password is set, - /// otherwise @c false if password is not set. - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_eap_passphrase( - wifi_manager_ap_h ap, - ffi.Pointer> user_name, - ffi.Pointer is_password_set, - ) { - return _wifi_manager_ap_get_eap_passphrase( - ap, - user_name, - is_password_set, - ); - } - - late final _wifi_manager_ap_get_eap_passphrasePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_ap_h, - ffi.Pointer>, - ffi.Pointer)>>('wifi_manager_ap_get_eap_passphrase'); - late final _wifi_manager_ap_get_eap_passphrase = - _wifi_manager_ap_get_eap_passphrasePtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Gets the CA Certificate of EAP. - /// @since_tizen 3.0 - /// @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_TLS. - /// You must release @a file using free(). - /// @param[in] ap The access point handle - /// @param[out] file The file path of CA Certificate - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_eap_ca_cert_file( - wifi_manager_ap_h ap, - ffi.Pointer> file, - ) { - return _wifi_manager_ap_get_eap_ca_cert_file( - ap, - file, - ); - } - - late final _wifi_manager_ap_get_eap_ca_cert_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_ap_h, ffi.Pointer>)>>( - 'wifi_manager_ap_get_eap_ca_cert_file'); - late final _wifi_manager_ap_get_eap_ca_cert_file = - _wifi_manager_ap_get_eap_ca_cert_filePtr.asFunction< - int Function( - wifi_manager_ap_h, ffi.Pointer>)>(); - - /// @brief Sets the CA Certificate of EAP. - /// @since_tizen 3.0 - /// @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_TLS. - /// @param[in] ap The access point handle - /// @param[in] file The file path of CA Certificate - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_set_eap_ca_cert_file( - wifi_manager_ap_h ap, - ffi.Pointer file, - ) { - return _wifi_manager_ap_set_eap_ca_cert_file( - ap, - file, - ); - } - - late final _wifi_manager_ap_set_eap_ca_cert_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_set_eap_ca_cert_file'); - late final _wifi_manager_ap_set_eap_ca_cert_file = - _wifi_manager_ap_set_eap_ca_cert_filePtr - .asFunction)>(); - - /// @brief Gets the Client Certificate of EAP. - /// @since_tizen 3.0 - /// @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_TLS. - /// You must release @a file using free(). - /// @param[in] ap The access point handle - /// @param[out] file The file path of Client Certificate - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_eap_client_cert_file( - wifi_manager_ap_h ap, - ffi.Pointer> file, - ) { - return _wifi_manager_ap_get_eap_client_cert_file( - ap, - file, - ); - } - - late final _wifi_manager_ap_get_eap_client_cert_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_ap_h, ffi.Pointer>)>>( - 'wifi_manager_ap_get_eap_client_cert_file'); - late final _wifi_manager_ap_get_eap_client_cert_file = - _wifi_manager_ap_get_eap_client_cert_filePtr.asFunction< - int Function( - wifi_manager_ap_h, ffi.Pointer>)>(); - - /// @brief Sets the CA Certificate of EAP. - /// @since_tizen 3.0 - /// @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_TLS. - /// @param[in] ap The access point handle - /// @param[in] file The file path of Client Certificate - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_set_eap_client_cert_file( - wifi_manager_ap_h ap, - ffi.Pointer file, - ) { - return _wifi_manager_ap_set_eap_client_cert_file( - ap, - file, - ); - } - - late final _wifi_manager_ap_set_eap_client_cert_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Pointer)>>( - 'wifi_manager_ap_set_eap_client_cert_file'); - late final _wifi_manager_ap_set_eap_client_cert_file = - _wifi_manager_ap_set_eap_client_cert_filePtr - .asFunction)>(); - - /// @brief Gets the private key file of EAP. - /// @since_tizen 3.0 - /// @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_TLS. - /// You must release @a file using free(). - /// @param[in] ap The access point handle - /// @param[out] file The file path of private key - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_eap_private_key_file( - wifi_manager_ap_h ap, - ffi.Pointer> file, - ) { - return _wifi_manager_ap_get_eap_private_key_file( - ap, - file, - ); - } - - late final _wifi_manager_ap_get_eap_private_key_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_ap_h, ffi.Pointer>)>>( - 'wifi_manager_ap_get_eap_private_key_file'); - late final _wifi_manager_ap_get_eap_private_key_file = - _wifi_manager_ap_get_eap_private_key_filePtr.asFunction< - int Function( - wifi_manager_ap_h, ffi.Pointer>)>(); - - /// @brief Sets the private key information of EAP. - /// @since_tizen 3.0 - /// @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_TLS. - /// @param[in] ap The access point handle - /// @param[in] file The file path of private key - /// @param[in] password The password - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_set_eap_private_key_info( - wifi_manager_ap_h ap, - ffi.Pointer file, - ffi.Pointer password, - ) { - return _wifi_manager_ap_set_eap_private_key_info( - ap, - file, - password, - ); - } - - late final _wifi_manager_ap_set_eap_private_key_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Pointer, - ffi.Pointer)>>( - 'wifi_manager_ap_set_eap_private_key_info'); - late final _wifi_manager_ap_set_eap_private_key_info = - _wifi_manager_ap_set_eap_private_key_infoPtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the EAP type of Wi-Fi. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[out] type The type of EAP - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_eap_type( - wifi_manager_ap_h ap, - ffi.Pointer type, - ) { - return _wifi_manager_ap_get_eap_type( - ap, - type, - ); - } - - late final _wifi_manager_ap_get_eap_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_get_eap_type'); - late final _wifi_manager_ap_get_eap_type = _wifi_manager_ap_get_eap_typePtr - .asFunction)>(); - - /// @brief Sets the EAP type of Wi-Fi. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[in] type The type of EAP - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_set_eap_type( - wifi_manager_ap_h ap, - int type, - ) { - return _wifi_manager_ap_set_eap_type( - ap, - type, - ); - } - - late final _wifi_manager_ap_set_eap_typePtr = _lookup< - ffi.NativeFunction>( - 'wifi_manager_ap_set_eap_type'); - late final _wifi_manager_ap_set_eap_type = _wifi_manager_ap_set_eap_typePtr - .asFunction(); - - /// @brief Gets the type of EAP phase2 authentication of Wi-Fi. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[out] type The type of EAP phase2 authentication - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_eap_auth_type( - wifi_manager_ap_h ap, - ffi.Pointer type, - ) { - return _wifi_manager_ap_get_eap_auth_type( - ap, - type, - ); - } - - late final _wifi_manager_ap_get_eap_auth_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_get_eap_auth_type'); - late final _wifi_manager_ap_get_eap_auth_type = - _wifi_manager_ap_get_eap_auth_typePtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer)>(); - - /// @brief Sets the type of EAP phase2 authentication of Wi-Fi. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[in] type The type of EAP phase2 authentication - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_set_eap_auth_type( - wifi_manager_ap_h ap, - int type, - ) { - return _wifi_manager_ap_set_eap_auth_type( - ap, - type, - ); - } - - late final _wifi_manager_ap_set_eap_auth_typePtr = _lookup< - ffi.NativeFunction>( - 'wifi_manager_ap_set_eap_auth_type'); - late final _wifi_manager_ap_set_eap_auth_type = - _wifi_manager_ap_set_eap_auth_typePtr - .asFunction(); - - /// @brief Gets the Wi-Fi disconnect reason from the supplicant. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[out] disconnect_reason The supplicant disconnect reason - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_disconnect_reason( - wifi_manager_ap_h ap, - ffi.Pointer disconnect_reason, - ) { - return _wifi_manager_ap_get_disconnect_reason( - ap, - disconnect_reason, - ); - } - - late final _wifi_manager_ap_get_disconnect_reasonPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Pointer)>>( - 'wifi_manager_ap_get_disconnect_reason'); - late final _wifi_manager_ap_get_disconnect_reason = - _wifi_manager_ap_get_disconnect_reasonPtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer)>(); - - /// @brief Gets the DNS config type. - /// @since_tizen 4.0 - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[out] type The DNS config type - /// @return 0 on success, otherwise negative error value. - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_dns_config_type( - wifi_manager_ap_h ap, - int address_family, - ffi.Pointer type, - ) { - return _wifi_manager_ap_get_dns_config_type( - ap, - address_family, - type, - ); - } - - late final _wifi_manager_ap_get_dns_config_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Pointer)>>('wifi_manager_ap_get_dns_config_type'); - late final _wifi_manager_ap_get_dns_config_type = - _wifi_manager_ap_get_dns_config_typePtr.asFunction< - int Function(wifi_manager_ap_h, int, ffi.Pointer)>(); - - /// @brief Sets the DNS config type. - /// @since_tizen 4.0 - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[in] type The DNS config type - /// @return 0 on success, otherwise negative error value. - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_update_ap() - int wifi_manager_ap_set_dns_config_type( - wifi_manager_ap_h ap, - int address_family, - int type, - ) { - return _wifi_manager_ap_set_dns_config_type( - ap, - address_family, - type, - ); - } - - late final _wifi_manager_ap_set_dns_config_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Int32)>>('wifi_manager_ap_set_dns_config_type'); - late final _wifi_manager_ap_set_dns_config_type = - _wifi_manager_ap_set_dns_config_typePtr - .asFunction(); - - /// @brief Gets the network prefix length. - /// @since_tizen 4.0 - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[out] prefix_len The network prefix length. \n - /// In case of IPv4, it means netmask length \n - /// (also called a prefix, e.g. 8, 16, 24, 32) - /// @return 0 on success, otherwise negative error value. - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_prefix_length( - wifi_manager_ap_h ap, - int address_family, - ffi.Pointer prefix_len, - ) { - return _wifi_manager_ap_get_prefix_length( - ap, - address_family, - prefix_len, - ); - } - - late final _wifi_manager_ap_get_prefix_lengthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Pointer)>>('wifi_manager_ap_get_prefix_length'); - late final _wifi_manager_ap_get_prefix_length = - _wifi_manager_ap_get_prefix_lengthPtr.asFunction< - int Function(wifi_manager_ap_h, int, ffi.Pointer)>(); - - /// @brief Sets the network prefix length. - /// @since_tizen 4.0 - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[in] prefix_len The network prefix length. \n - /// In case of IPv4, it means netmask length \n - /// (also called a prefix, e.g. 8, 16, 24, 32) - /// @return 0 on success, otherwise negative error value. - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_update_ap() - int wifi_manager_ap_set_prefix_length( - wifi_manager_ap_h ap, - int address_family, - int prefix_len, - ) { - return _wifi_manager_ap_set_prefix_length( - ap, - address_family, - prefix_len, - ); - } - - late final _wifi_manager_ap_set_prefix_lengthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Int)>>('wifi_manager_ap_set_prefix_length'); - late final _wifi_manager_ap_set_prefix_length = - _wifi_manager_ap_set_prefix_lengthPtr - .asFunction(); - - /// @brief Gets the error state. - /// @since_tizen 4.0 - /// @param[in] ap The access point handle - /// @param[out] error_state The Wi-Fi connection error state - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_error_state( - wifi_manager_ap_h ap, - ffi.Pointer error_state, - ) { - return _wifi_manager_ap_get_error_state( - ap, - error_state, - ); - } - - late final _wifi_manager_ap_get_error_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_get_error_state'); - late final _wifi_manager_ap_get_error_state = - _wifi_manager_ap_get_error_statePtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer)>(); - - /// @brief Gets the Wi-Fi Association Status Code from the supplicant. - /// @since_tizen 5.0 - /// @param[in] ap The access point handle - /// @param[out] status_code The supplicant Wi-Fi association status code - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_assoc_status_code( - wifi_manager_ap_h ap, - ffi.Pointer status_code, - ) { - return _wifi_manager_ap_get_assoc_status_code( - ap, - status_code, - ); - } - - late final _wifi_manager_ap_get_assoc_status_codePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Pointer)>>( - 'wifi_manager_ap_get_assoc_status_code'); - late final _wifi_manager_ap_get_assoc_status_code = - _wifi_manager_ap_get_assoc_status_codePtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer)>(); - - /// @brief Gets the VSIE result of the AP. - /// @since_tizen 5.0 - /// @remarks You must release @a vsie using free(). - /// - /// @param[in] ap The access point handle - /// @param[out] vsie The vendor specific information element - /// @param[out] length The VSIE length - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_vsie( - wifi_manager_ap_h ap, - ffi.Pointer> vsie, - ffi.Pointer length, - ) { - return _wifi_manager_ap_get_vsie( - ap, - vsie, - length, - ); - } - - late final _wifi_manager_ap_get_vsiePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_ap_h, - ffi.Pointer>, - ffi.Pointer)>>('wifi_manager_ap_get_vsie'); - late final _wifi_manager_ap_get_vsie = - _wifi_manager_ap_get_vsiePtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Gets access point configuration handle. - /// @since_tizen 3.0 - /// @remarks You must release @a config using wifi_manager_config_destroy(). - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] name The access point name - /// @param[in] passphrase The access point passphrase - /// @param[in] security_type The access point security type - /// @param[out] config The access point configuration handle - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @pre This function needs a wifi_manager_initialize() call before use - /// @see wifi_manager_config_destroy() - int wifi_manager_config_create( - wifi_manager_h wifi, - ffi.Pointer name, - ffi.Pointer passphrase, - int security_type, - ffi.Pointer config, - ) { - return _wifi_manager_config_create( - wifi, - name, - passphrase, - security_type, - config, - ); - } - - late final _wifi_manager_config_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>( - 'wifi_manager_config_create'); - late final _wifi_manager_config_create = - _wifi_manager_config_createPtr.asFunction< - int Function( - wifi_manager_h, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - - /// @brief Clones the access point configuration handle. - /// @since_tizen 3.0 - /// @remarks You must release @a cloned_config using wifi_manager_config_destroy(). - /// - /// @param[in] origin The origin access point configuration handle - /// @param[out] cloned_config The cloned access point configuration handle - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_config_destroy() - int wifi_manager_config_clone( - wifi_manager_config_h origin, - ffi.Pointer cloned_config, - ) { - return _wifi_manager_config_clone( - origin, - cloned_config, - ); - } - - late final _wifi_manager_config_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_config_h, ffi.Pointer)>>( - 'wifi_manager_config_clone'); - late final _wifi_manager_config_clone = - _wifi_manager_config_clonePtr.asFunction< - int Function( - wifi_manager_config_h, ffi.Pointer)>(); - - /// @brief Destroys the access point configuration handle. - /// @since_tizen 3.0 - /// - /// @param[in] config The access point configuration handle - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_config_create() - /// @see wifi_manager_config_clone() - int wifi_manager_config_destroy( - wifi_manager_config_h config, - ) { - return _wifi_manager_config_destroy( - config, - ); - } - - late final _wifi_manager_config_destroyPtr = - _lookup>( - 'wifi_manager_config_destroy'); - late final _wifi_manager_config_destroy = _wifi_manager_config_destroyPtr - .asFunction(); - - /// @brief Saves Wi-Fi configuration of access point. - /// @details When a configuration is changed, these changes will be not applied to the Connection Manager immediately.\n - /// When you call this function, your changes affect the Connection Manager and the existing configuration is updated. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] config The access point configuration handle - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_config_create() - int wifi_manager_config_save( - wifi_manager_h wifi, - wifi_manager_config_h config, - ) { - return _wifi_manager_config_save( - wifi, - config, - ); - } - - late final _wifi_manager_config_savePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, - wifi_manager_config_h)>>('wifi_manager_config_save'); - late final _wifi_manager_config_save = _wifi_manager_config_savePtr - .asFunction(); - - /// @brief Removes Wi-Fi configuration of access point. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] config The access point configuration handle - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_config_create() - /// @see wifi_manager_config_foreach_configuration() - int wifi_manager_config_remove( - wifi_manager_h wifi, - wifi_manager_config_h config, - ) { - return _wifi_manager_config_remove( - wifi, - config, - ); - } - - late final _wifi_manager_config_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, - wifi_manager_config_h)>>('wifi_manager_config_remove'); - late final _wifi_manager_config_remove = _wifi_manager_config_removePtr - .asFunction(); - - /// @brief Gets configurations of an access point. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback to be called - /// @param[in] user_data The user data passed to the callback function - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @pre This function needs wifi_manager_initialize() before use. - /// @post This function invokes wifi_manager_config_list_cb(). - int wifi_manager_config_foreach_configuration( - wifi_manager_h wifi, - wifi_manager_config_list_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_config_foreach_configuration( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_config_foreach_configurationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_config_list_cb, - ffi.Pointer)>>( - 'wifi_manager_config_foreach_configuration'); - late final _wifi_manager_config_foreach_configuration = - _wifi_manager_config_foreach_configurationPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_config_list_cb, - ffi.Pointer)>(); - - /// @brief Gets the name of access point from configuration. - /// @since_tizen 3.0 - /// @remarks You must release @a name using free(). - /// - /// @param[in] config The access point configuration handle - /// @param[out] name The name of access point - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_config_get_name( - wifi_manager_config_h config, - ffi.Pointer> name, - ) { - return _wifi_manager_config_get_name( - config, - name, - ); - } - - late final _wifi_manager_config_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_config_h, ffi.Pointer>)>>( - 'wifi_manager_config_get_name'); - late final _wifi_manager_config_get_name = - _wifi_manager_config_get_namePtr.asFunction< - int Function( - wifi_manager_config_h, ffi.Pointer>)>(); - - /// @brief Gets the security type of access point from configuration. - /// @since_tizen 3.0 - /// - /// @param[in] config The access point configuration handle - /// @param[out] security_type The security type of access point - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_config_get_security_type( - wifi_manager_config_h config, - ffi.Pointer security_type, - ) { - return _wifi_manager_config_get_security_type( - config, - security_type, - ); - } - - late final _wifi_manager_config_get_security_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Pointer)>>( - 'wifi_manager_config_get_security_type'); - late final _wifi_manager_config_get_security_type = - _wifi_manager_config_get_security_typePtr.asFunction< - int Function(wifi_manager_config_h, ffi.Pointer)>(); - - /// @brief Sets access point proxy address configuration. - /// @since_tizen 3.0 - /// - /// @param[in] config The access point configuration handle - /// @param[in] address_family The address family - /// @param[in] proxy_address The proxy address - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_config_save() - int wifi_manager_config_set_proxy_address( - wifi_manager_config_h config, - int address_family, - ffi.Pointer proxy_address, - ) { - return _wifi_manager_config_set_proxy_address( - config, - address_family, - proxy_address, - ); - } - - late final _wifi_manager_config_set_proxy_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Int32, - ffi.Pointer)>>('wifi_manager_config_set_proxy_address'); - late final _wifi_manager_config_set_proxy_address = - _wifi_manager_config_set_proxy_addressPtr.asFunction< - int Function(wifi_manager_config_h, int, ffi.Pointer)>(); - - /// @brief Gets the proxy address of access point from configuration. - /// @since_tizen 3.0 - /// @remarks You must release @a proxy_address using free(). - /// - /// @param[in] config The access point configuration handle - /// @param[out] address_family The address family - /// @param[out] proxy_address The proxy address - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_config_get_proxy_address( - wifi_manager_config_h config, - ffi.Pointer address_family, - ffi.Pointer> proxy_address, - ) { - return _wifi_manager_config_get_proxy_address( - config, - address_family, - proxy_address, - ); - } - - late final _wifi_manager_config_get_proxy_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Pointer, - ffi.Pointer>)>>( - 'wifi_manager_config_get_proxy_address'); - late final _wifi_manager_config_get_proxy_address = - _wifi_manager_config_get_proxy_addressPtr.asFunction< - int Function(wifi_manager_config_h, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Sets the hidden property of access point from the configuration. - /// @since_tizen 3.0 - /// - /// @param[in] config The access point configuration handle - /// @param[in] is_hidden The new value of the hidden property - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_config_save() - int wifi_manager_config_set_hidden_ap_property( - wifi_manager_config_h config, - bool is_hidden, - ) { - return _wifi_manager_config_set_hidden_ap_property( - config, - is_hidden, - ); - } - - late final _wifi_manager_config_set_hidden_ap_propertyPtr = _lookup< - ffi - .NativeFunction>( - 'wifi_manager_config_set_hidden_ap_property'); - late final _wifi_manager_config_set_hidden_ap_property = - _wifi_manager_config_set_hidden_ap_propertyPtr - .asFunction(); - - /// @brief Gets the hidden property of access point from the configuration. - /// @since_tizen 3.0 - /// - /// @param[in] config The access point configuration handle - /// @param[out] is_hidden The hidden property of access point - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_config_get_hidden_ap_property( - wifi_manager_config_h config, - ffi.Pointer is_hidden, - ) { - return _wifi_manager_config_get_hidden_ap_property( - config, - is_hidden, - ); - } - - late final _wifi_manager_config_get_hidden_ap_propertyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Pointer)>>( - 'wifi_manager_config_get_hidden_ap_property'); - late final _wifi_manager_config_get_hidden_ap_property = - _wifi_manager_config_get_hidden_ap_propertyPtr.asFunction< - int Function(wifi_manager_config_h, ffi.Pointer)>(); - - /// @brief Gets access point anonymous identity from configuration. - /// @since_tizen 3.0 - /// @remarks You must release @a anonymous_identity using free(). - /// - /// @param[in] config The access point configuration handle - /// @param[out] anonymous_identity The anonymous identity of access point - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int wifi_manager_config_get_eap_anonymous_identity( - wifi_manager_config_h config, - ffi.Pointer> anonymous_identity, - ) { - return _wifi_manager_config_get_eap_anonymous_identity( - config, - anonymous_identity, - ); - } - - late final _wifi_manager_config_get_eap_anonymous_identityPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_config_h, ffi.Pointer>)>>( - 'wifi_manager_config_get_eap_anonymous_identity'); - late final _wifi_manager_config_get_eap_anonymous_identity = - _wifi_manager_config_get_eap_anonymous_identityPtr.asFunction< - int Function( - wifi_manager_config_h, ffi.Pointer>)>(); - - /// @brief Sets access point anonymous identity to configuration. - /// @since_tizen 3.0 - /// - /// @param[in] config The access point configuration handle - /// @param[in] anonymous_identity The anonymous identity - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @see wifi_manager_config_save() - int wifi_manager_config_set_eap_anonymous_identity( - wifi_manager_config_h config, - ffi.Pointer anonymous_identity, - ) { - return _wifi_manager_config_set_eap_anonymous_identity( - config, - anonymous_identity, - ); - } - - late final _wifi_manager_config_set_eap_anonymous_identityPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Pointer)>>( - 'wifi_manager_config_set_eap_anonymous_identity'); - late final _wifi_manager_config_set_eap_anonymous_identity = - _wifi_manager_config_set_eap_anonymous_identityPtr.asFunction< - int Function(wifi_manager_config_h, ffi.Pointer)>(); - - /// @brief Gets access point cacert file from configuration. - /// @since_tizen 3.0 - /// @remarks You must release @a ca_cert using free(). - /// @remarks The mediastorage privilege http://tizen.org/privilege/mediastorage is needed \n - /// if @a image_path is relevant to media storage.\n - /// The externalstorage privilege http://tizen.org/privilege/externalstorage is needed \n - /// if @a image_path is relevant to external storage. - /// - /// @param[in] config The access point configuration handle - /// @param[out] ca_cert The certification authority(CA) certificates file of access point - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int wifi_manager_config_get_eap_ca_cert_file( - wifi_manager_config_h config, - ffi.Pointer> ca_cert, - ) { - return _wifi_manager_config_get_eap_ca_cert_file( - config, - ca_cert, - ); - } - - late final _wifi_manager_config_get_eap_ca_cert_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_config_h, ffi.Pointer>)>>( - 'wifi_manager_config_get_eap_ca_cert_file'); - late final _wifi_manager_config_get_eap_ca_cert_file = - _wifi_manager_config_get_eap_ca_cert_filePtr.asFunction< - int Function( - wifi_manager_config_h, ffi.Pointer>)>(); - - /// @brief Sets access point cacert file to configuration. - /// @since_tizen 3.0 - /// @remarks The mediastorage privilege http://tizen.org/privilege/mediastorage is needed \n - /// if @a image_path is relevant to media storage.\n - /// The externalstorage privilege http://tizen.org/privilege/externalstorage is needed \n - /// if @a image_path is relevant to external storage. - /// - /// @param[in] config The access point configuration handle - /// @param[in] ca_cert The certification authority(CA) certificates file of access point - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @see wifi_manager_config_save() - int wifi_manager_config_set_eap_ca_cert_file( - wifi_manager_config_h config, - ffi.Pointer ca_cert, - ) { - return _wifi_manager_config_set_eap_ca_cert_file( - config, - ca_cert, - ); - } - - late final _wifi_manager_config_set_eap_ca_cert_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Pointer)>>( - 'wifi_manager_config_set_eap_ca_cert_file'); - late final _wifi_manager_config_set_eap_ca_cert_file = - _wifi_manager_config_set_eap_ca_cert_filePtr.asFunction< - int Function(wifi_manager_config_h, ffi.Pointer)>(); - - /// @brief Gets access point client cert file from configuration. - /// @since_tizen 3.0 - /// @remarks You must release @a client_cert using free(). - /// - /// @param[in] config The access point configuration handle - /// @param[out] client_cert The certification authority(CA) certificates file of access point - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int wifi_manager_config_get_eap_client_cert_file( - wifi_manager_config_h config, - ffi.Pointer> client_cert, - ) { - return _wifi_manager_config_get_eap_client_cert_file( - config, - client_cert, - ); - } - - late final _wifi_manager_config_get_eap_client_cert_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_config_h, ffi.Pointer>)>>( - 'wifi_manager_config_get_eap_client_cert_file'); - late final _wifi_manager_config_get_eap_client_cert_file = - _wifi_manager_config_get_eap_client_cert_filePtr.asFunction< - int Function( - wifi_manager_config_h, ffi.Pointer>)>(); - - /// @brief Sets access point client cert file to configuration. - /// @since_tizen 3.0 - /// - /// @param[in] config The access point configuration handle - /// @param[in] private_key The private key file - /// @param[in] client_cert The certification authority(CA) certificates file of access point - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @see wifi_manager_config_save() - int wifi_manager_config_set_eap_client_cert_file( - wifi_manager_config_h config, - ffi.Pointer private_key, - ffi.Pointer client_cert, - ) { - return _wifi_manager_config_set_eap_client_cert_file( - config, - private_key, - client_cert, - ); - } - - late final _wifi_manager_config_set_eap_client_cert_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Pointer, - ffi.Pointer)>>( - 'wifi_manager_config_set_eap_client_cert_file'); - late final _wifi_manager_config_set_eap_client_cert_file = - _wifi_manager_config_set_eap_client_cert_filePtr.asFunction< - int Function(wifi_manager_config_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets access point identity from configuration. - /// @since_tizen 3.0 - /// @remarks You must release @a identity using free(). - /// - /// @param[in] config The access point configuration handle - /// @param[out] identity The identity of access point - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int wifi_manager_config_get_eap_identity( - wifi_manager_config_h config, - ffi.Pointer> identity, - ) { - return _wifi_manager_config_get_eap_identity( - config, - identity, - ); - } - - late final _wifi_manager_config_get_eap_identityPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_config_h, ffi.Pointer>)>>( - 'wifi_manager_config_get_eap_identity'); - late final _wifi_manager_config_get_eap_identity = - _wifi_manager_config_get_eap_identityPtr.asFunction< - int Function( - wifi_manager_config_h, ffi.Pointer>)>(); - - /// @brief Sets access point identity to configuration. - /// @since_tizen 3.0 - /// - /// @param[in] config The access point configuration handle - /// @param[in] identity The identity - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @see wifi_manager_config_save() - int wifi_manager_config_set_eap_identity( - wifi_manager_config_h config, - ffi.Pointer identity, - ) { - return _wifi_manager_config_set_eap_identity( - config, - identity, - ); - } - - late final _wifi_manager_config_set_eap_identityPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, - ffi.Pointer)>>('wifi_manager_config_set_eap_identity'); - late final _wifi_manager_config_set_eap_identity = - _wifi_manager_config_set_eap_identityPtr.asFunction< - int Function(wifi_manager_config_h, ffi.Pointer)>(); - - /// @brief Gets access point EAP type from configuration. - /// @since_tizen 3.0 - /// - /// @param[in] config The access point configuration handle - /// @param[out] eap_type The EAP type of access point - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int wifi_manager_config_get_eap_type( - wifi_manager_config_h config, - ffi.Pointer eap_type, - ) { - return _wifi_manager_config_get_eap_type( - config, - eap_type, - ); - } - - late final _wifi_manager_config_get_eap_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, - ffi.Pointer)>>('wifi_manager_config_get_eap_type'); - late final _wifi_manager_config_get_eap_type = - _wifi_manager_config_get_eap_typePtr.asFunction< - int Function(wifi_manager_config_h, ffi.Pointer)>(); - - /// @brief Sets access point EAP type to configuration. - /// @since_tizen 3.0 - /// - /// @param[in] config The access point configuration handle - /// @param[in] eap_type The EAP type - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @see wifi_manager_config_save() - int wifi_manager_config_set_eap_type( - wifi_manager_config_h config, - int eap_type, - ) { - return _wifi_manager_config_set_eap_type( - config, - eap_type, - ); - } - - late final _wifi_manager_config_set_eap_typePtr = _lookup< - ffi - .NativeFunction>( - 'wifi_manager_config_set_eap_type'); - late final _wifi_manager_config_set_eap_type = - _wifi_manager_config_set_eap_typePtr - .asFunction(); - - /// @brief Gets access point EAP auth type from configuration. - /// @since_tizen 3.0 - /// - /// @param[in] config The access point configuration handle - /// @param[out] eap_auth_type The EAP auth type of access point - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int wifi_manager_config_get_eap_auth_type( - wifi_manager_config_h config, - ffi.Pointer eap_auth_type, - ) { - return _wifi_manager_config_get_eap_auth_type( - config, - eap_auth_type, - ); - } - - late final _wifi_manager_config_get_eap_auth_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Pointer)>>( - 'wifi_manager_config_get_eap_auth_type'); - late final _wifi_manager_config_get_eap_auth_type = - _wifi_manager_config_get_eap_auth_typePtr.asFunction< - int Function(wifi_manager_config_h, ffi.Pointer)>(); - - /// @brief Sets access point EAP auth type to configuration. - /// @since_tizen 3.0 - /// - /// @param[in] config The access point configuration handle - /// @param[in] eap_auth_type The EAP auth type - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @see wifi_manager_config_save() - int wifi_manager_config_set_eap_auth_type( - wifi_manager_config_h config, - int eap_auth_type, - ) { - return _wifi_manager_config_set_eap_auth_type( - config, - eap_auth_type, - ); - } - - late final _wifi_manager_config_set_eap_auth_typePtr = _lookup< - ffi - .NativeFunction>( - 'wifi_manager_config_set_eap_auth_type'); - late final _wifi_manager_config_set_eap_auth_type = - _wifi_manager_config_set_eap_auth_typePtr - .asFunction(); - - /// @brief Gets access point subject match from configuration. - /// @since_tizen 3.0 - /// @remarks You must release @a subject_match using free(). - /// - /// @param[in] config The access point configuration handle - /// @param[out] subject_match The subject match of access point - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int wifi_manager_config_get_eap_subject_match( - wifi_manager_config_h config, - ffi.Pointer> subject_match, - ) { - return _wifi_manager_config_get_eap_subject_match( - config, - subject_match, - ); - } - - late final _wifi_manager_config_get_eap_subject_matchPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_config_h, ffi.Pointer>)>>( - 'wifi_manager_config_get_eap_subject_match'); - late final _wifi_manager_config_get_eap_subject_match = - _wifi_manager_config_get_eap_subject_matchPtr.asFunction< - int Function( - wifi_manager_config_h, ffi.Pointer>)>(); - - /// @brief Sets access point subject match to configuration. - /// @since_tizen 3.0 - /// - /// @param[in] config The access point configuration handle - /// @param[in] subject_match The subject match - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @see wifi_manager_config_save() - int wifi_manager_config_set_eap_subject_match( - wifi_manager_config_h config, - ffi.Pointer subject_match, - ) { - return _wifi_manager_config_set_eap_subject_match( - config, - subject_match, - ); - } - - late final _wifi_manager_config_set_eap_subject_matchPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Pointer)>>( - 'wifi_manager_config_set_eap_subject_match'); - late final _wifi_manager_config_set_eap_subject_match = - _wifi_manager_config_set_eap_subject_matchPtr.asFunction< - int Function(wifi_manager_config_h, ffi.Pointer)>(); - - /// @brief Registers the callback called when a TDLS device is found. - /// @since_tizen 4.0 - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_tdls_set_discovered_cb( - wifi_manager_h wifi, - wifi_manager_tdls_discovered_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_tdls_set_discovered_cb( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_tdls_set_discovered_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_tdls_discovered_cb, - ffi.Pointer)>>('wifi_manager_tdls_set_discovered_cb'); - late final _wifi_manager_tdls_set_discovered_cb = - _wifi_manager_tdls_set_discovered_cbPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_tdls_discovered_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback called when TDLS device is found. - /// @since_tizen 4.0 - /// - /// @param[in] wifi The Wi-Fi handle - /// - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_tdls_unset_discovered_cb( - wifi_manager_h wifi, - ) { - return _wifi_manager_tdls_unset_discovered_cb( - wifi, - ); - } - - late final _wifi_manager_tdls_unset_discovered_cbPtr = - _lookup>( - 'wifi_manager_tdls_unset_discovered_cb'); - late final _wifi_manager_tdls_unset_discovered_cb = - _wifi_manager_tdls_unset_discovered_cbPtr - .asFunction(); - - /// @brief Discovers devices that support TDLS. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] peer_mac_addr The MAC address (e.g., ff:ff:ff:ff:ff:ff, - /// AA:BB:CC:DD:EE:FF) of the peer to be discovered - /// - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_tdls_start_discovery( - wifi_manager_h wifi, - ffi.Pointer peer_mac_addr, - ) { - return _wifi_manager_tdls_start_discovery( - wifi, - peer_mac_addr, - ); - } - - late final _wifi_manager_tdls_start_discoveryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, - ffi.Pointer)>>('wifi_manager_tdls_start_discovery'); - late final _wifi_manager_tdls_start_discovery = - _wifi_manager_tdls_start_discoveryPtr - .asFunction)>(); - - /// @brief Connects to a peer device. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] peer_mac_addr The MAC address of the peer device to be connected - /// - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_tdls_connect( - wifi_manager_h wifi, - ffi.Pointer peer_mac_addr, - ) { - return _wifi_manager_tdls_connect( - wifi, - peer_mac_addr, - ); - } - - late final _wifi_manager_tdls_connectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, - ffi.Pointer)>>('wifi_manager_tdls_connect'); - late final _wifi_manager_tdls_connect = _wifi_manager_tdls_connectPtr - .asFunction)>(); - - /// @brief Disconnects the connected peer. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] peer_mac_addr The MAC address of the connected peer - /// - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_tdls_disconnect( - wifi_manager_h wifi, - ffi.Pointer peer_mac_addr, - ) { - return _wifi_manager_tdls_disconnect( - wifi, - peer_mac_addr, - ); - } - - late final _wifi_manager_tdls_disconnectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, - ffi.Pointer)>>('wifi_manager_tdls_disconnect'); - late final _wifi_manager_tdls_disconnect = _wifi_manager_tdls_disconnectPtr - .asFunction)>(); - - /// @brief Gets Peer Mac address of Connected peer. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// - /// @remarks The @a peer_mac_addr should be freed using free(). - /// @param[in] wifi The Wi-Fi handle - /// @param[out] peer_mac_addr The MAC address of the connected peer - /// - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NO_CONNECTION No active TDLS Connection - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_tdls_get_connected_peer( - wifi_manager_h wifi, - ffi.Pointer> peer_mac_addr, - ) { - return _wifi_manager_tdls_get_connected_peer( - wifi, - peer_mac_addr, - ); - } - - late final _wifi_manager_tdls_get_connected_peerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, ffi.Pointer>)>>( - 'wifi_manager_tdls_get_connected_peer'); - late final _wifi_manager_tdls_get_connected_peer = - _wifi_manager_tdls_get_connected_peerPtr.asFunction< - int Function(wifi_manager_h, ffi.Pointer>)>(); - - /// @brief Registers the callback called when TDLS state is changed. - /// @since_tizen 3.0 - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_tdls_set_state_changed_cb( - wifi_manager_h wifi, - wifi_manager_tdls_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_tdls_set_state_changed_cb( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_tdls_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, - wifi_manager_tdls_state_changed_cb, ffi.Pointer)>>( - 'wifi_manager_tdls_set_state_changed_cb'); - late final _wifi_manager_tdls_set_state_changed_cb = - _wifi_manager_tdls_set_state_changed_cbPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_tdls_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback called when TDLS state is changed. - /// @since_tizen 3.0 - /// - /// @param[in] wifi The Wi-Fi handle - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_tdls_unset_state_changed_cb( - wifi_manager_h wifi, - ) { - return _wifi_manager_tdls_unset_state_changed_cb( - wifi, - ); - } - - late final _wifi_manager_tdls_unset_state_changed_cbPtr = - _lookup>( - 'wifi_manager_tdls_unset_state_changed_cb'); - late final _wifi_manager_tdls_unset_state_changed_cb = - _wifi_manager_tdls_unset_state_changed_cbPtr - .asFunction(); - - /// @brief Enables a TDLS channel switching request. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] peer_mac_addr The MAC address of the connected TDLS peer - /// @param[in] freq The new frequency [MHz] - /// - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_tdls_enable_channel_switching( - wifi_manager_h wifi, - ffi.Pointer peer_mac_addr, - int freq, - ) { - return _wifi_manager_tdls_enable_channel_switching( - wifi, - peer_mac_addr, - freq, - ); - } - - late final _wifi_manager_tdls_enable_channel_switchingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, ffi.Pointer, - ffi.Int)>>('wifi_manager_tdls_enable_channel_switching'); - late final _wifi_manager_tdls_enable_channel_switching = - _wifi_manager_tdls_enable_channel_switchingPtr.asFunction< - int Function(wifi_manager_h, ffi.Pointer, int)>(); - - /// @brief Disables a TDLS channel switching request. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] peer_mac_addr The MAC address of the connected TDLS peer - /// - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_tdls_disable_channel_switching( - wifi_manager_h wifi, - ffi.Pointer peer_mac_addr, - ) { - return _wifi_manager_tdls_disable_channel_switching( - wifi, - peer_mac_addr, - ); - } - - late final _wifi_manager_tdls_disable_channel_switchingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, ffi.Pointer)>>( - 'wifi_manager_tdls_disable_channel_switching'); - late final _wifi_manager_tdls_disable_channel_switching = - _wifi_manager_tdls_disable_channel_switchingPtr - .asFunction)>(); - - /// @brief Registers the callback called when IP conflict state is changed. - /// @since_tizen 5.0 - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_set_ip_conflict_cb( - wifi_manager_h wifi, - wifi_manager_ip_conflict_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_set_ip_conflict_cb( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_set_ip_conflict_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_ip_conflict_cb, - ffi.Pointer)>>('wifi_manager_set_ip_conflict_cb'); - late final _wifi_manager_set_ip_conflict_cb = - _wifi_manager_set_ip_conflict_cbPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_ip_conflict_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback called when IP conflict state is changed. - /// @since_tizen 5.0 - /// @param[in] wifi The Wi-Fi handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_unset_ip_conflict_cb( - wifi_manager_h wifi, - ) { - return _wifi_manager_unset_ip_conflict_cb( - wifi, - ); - } - - late final _wifi_manager_unset_ip_conflict_cbPtr = - _lookup>( - 'wifi_manager_unset_ip_conflict_cb'); - late final _wifi_manager_unset_ip_conflict_cb = - _wifi_manager_unset_ip_conflict_cbPtr - .asFunction(); - - /// @brief Enables or disables IP conflict detection. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] detect True or false boolean to enable or disable - /// - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_set_ip_conflict_detect_enable( - wifi_manager_h wifi, - bool detect, - ) { - return _wifi_manager_set_ip_conflict_detect_enable( - wifi, - detect, - ); - } - - late final _wifi_manager_set_ip_conflict_detect_enablePtr = - _lookup>( - 'wifi_manager_set_ip_conflict_detect_enable'); - late final _wifi_manager_set_ip_conflict_detect_enable = - _wifi_manager_set_ip_conflict_detect_enablePtr - .asFunction(); - - /// @brief Checks whether IP conflict detection is enabled. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] wifi The Wi-Fi handle - /// @param[out] state @c true if IP conflict detection is enabled, - /// otherwise @c false if IP conflict detection is disabled. - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ip_conflict_detect_is_enabled( - wifi_manager_h wifi, - ffi.Pointer state, - ) { - return _wifi_manager_ip_conflict_detect_is_enabled( - wifi, - state, - ); - } - - late final _wifi_manager_ip_conflict_detect_is_enabledPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, ffi.Pointer)>>( - 'wifi_manager_ip_conflict_detect_is_enabled'); - late final _wifi_manager_ip_conflict_detect_is_enabled = - _wifi_manager_ip_conflict_detect_is_enabledPtr - .asFunction)>(); - - /// @brief Gets the state of the IP conflict. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] wifi The Wi-Fi handle - /// @param[out] state The current state of IP conflict - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_get_ip_conflict_state( - wifi_manager_h wifi, - ffi.Pointer state, - ) { - return _wifi_manager_get_ip_conflict_state( - wifi, - state, - ); - } - - late final _wifi_manager_get_ip_conflict_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, - ffi.Pointer)>>('wifi_manager_get_ip_conflict_state'); - late final _wifi_manager_get_ip_conflict_state = - _wifi_manager_get_ip_conflict_statePtr - .asFunction)>(); - - /// @platform - /// @brief Gets the handle of a current engine information. - /// @since_tizen 3.0 - /// @remarks @a engine should be released using csr_engine_destroy(). - /// @param[in] id Engine identifier to get handle - /// @param[out] engine A pointer of the engine information handle - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_PARAMETER @a engine is invalid - /// @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists - /// @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_engine_destroy() - int csr_get_current_engine( - int id, - ffi.Pointer engine, - ) { - return _csr_get_current_engine( - id, - engine, - ); - } - - late final _csr_get_current_enginePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, ffi.Pointer)>>('csr_get_current_engine'); - late final _csr_get_current_engine = _csr_get_current_enginePtr - .asFunction)>(); - - /// @platform - /// @brief Extracts a vendor name from the engine information handle. - /// @since_tizen 3.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/antivirus.admin - /// @remarks @a vendor must be released using free(). - /// @param[in] engine The engine information handle - /// @param[out] vendor A pointer of the engine's vendor name - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a vendor is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_get_current_engine() - int csr_engine_get_vendor( - csr_engine_h engine, - ffi.Pointer> vendor, - ) { - return _csr_engine_get_vendor( - engine, - vendor, - ); - } - - late final _csr_engine_get_vendorPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_engine_h, - ffi.Pointer>)>>('csr_engine_get_vendor'); - late final _csr_engine_get_vendor = _csr_engine_get_vendorPtr.asFunction< - int Function(csr_engine_h, ffi.Pointer>)>(); - - /// @platform - /// @brief Extracts an engine name from the engine information handle. - /// @since_tizen 3.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/antivirus.admin - /// @remarks @a name must be released using free(). - /// @param[in] engine The engine information handle - /// @param[out] name A pointer of the engine's name - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a name is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_get_current_engine() - int csr_engine_get_name( - csr_engine_h engine, - ffi.Pointer> name, - ) { - return _csr_engine_get_name( - engine, - name, - ); - } - - late final _csr_engine_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_engine_h, - ffi.Pointer>)>>('csr_engine_get_name'); - late final _csr_engine_get_name = _csr_engine_get_namePtr.asFunction< - int Function(csr_engine_h, ffi.Pointer>)>(); - - /// @platform - /// @brief Extracts an engine version from the engine information handle. - /// @since_tizen 3.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/antivirus.admin - /// @remarks @a version must be released using free(). - /// @param[in] engine An engine information handle - /// @param[out] version A pointer of the engine's version - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a version is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_get_current_engine() - int csr_engine_get_version( - csr_engine_h engine, - ffi.Pointer> version, - ) { - return _csr_engine_get_version( - engine, - version, - ); - } - - late final _csr_engine_get_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_engine_h, - ffi.Pointer>)>>('csr_engine_get_version'); - late final _csr_engine_get_version = _csr_engine_get_versionPtr.asFunction< - int Function(csr_engine_h, ffi.Pointer>)>(); - - /// @platform - /// @brief Extracts an engine's data version from the engine information handle. - /// @since_tizen 3.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/antivirus.admin - /// @remarks @a version must be released using free(). - /// @param[in] engine The engine information handle - /// @param[out] version A pointer of the data version. It can be null - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a version is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_get_current_engine() - int csr_engine_get_data_version( - csr_engine_h engine, - ffi.Pointer> version, - ) { - return _csr_engine_get_data_version( - engine, - version, - ); - } - - late final _csr_engine_get_data_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - csr_engine_h, ffi.Pointer>)>>( - 'csr_engine_get_data_version'); - late final _csr_engine_get_data_version = - _csr_engine_get_data_versionPtr.asFunction< - int Function(csr_engine_h, ffi.Pointer>)>(); - - /// @platform - /// @brief Extracts the latest update time of an engine from the engine information handle. - /// @since_tizen 3.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/antivirus.admin - /// @param[in] engine The engine information handle - /// @param[out] time A pointer of lasted update time - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a time is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_get_current_engine() - int csr_engine_get_latest_update_time( - csr_engine_h engine, - ffi.Pointer time, - ) { - return _csr_engine_get_latest_update_time( - engine, - time, - ); - } - - late final _csr_engine_get_latest_update_timePtr = _lookup< - ffi - .NativeFunction)>>( - 'csr_engine_get_latest_update_time'); - late final _csr_engine_get_latest_update_time = - _csr_engine_get_latest_update_timePtr - .asFunction)>(); - - /// @platform - /// @brief Extracts the state of engine activation from the engine information handle. - /// @since_tizen 3.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/antivirus.admin - /// @param[in] engine The engine information handle - /// @param[out] activated A pointer of the engine activation state - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a activated is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_get_current_engine() - int csr_engine_get_activated( - csr_engine_h engine, - ffi.Pointer activated, - ) { - return _csr_engine_get_activated( - engine, - activated, - ); - } - - late final _csr_engine_get_activatedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_engine_h, - ffi.Pointer)>>('csr_engine_get_activated'); - late final _csr_engine_get_activated = _csr_engine_get_activatedPtr - .asFunction)>(); - - /// @platform - /// @brief Enable or disable an engine. - /// @since_tizen 3.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/antivirus.admin - /// @remarks If an engine is disabled, all major operations would be failed with #CSR_ERROR_ENGINE_DISABLED error code. - /// @param[in] engine The engine information handle - /// @param[in] state The engine state - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a state is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_get_current_engine() - int csr_engine_set_state( - csr_engine_h engine, - int state, - ) { - return _csr_engine_set_state( - engine, - state, - ); - } - - late final _csr_engine_set_statePtr = - _lookup>( - 'csr_engine_set_state'); - late final _csr_engine_set_state = - _csr_engine_set_statePtr.asFunction(); - - /// @platform - /// @brief Gets the engine state. - /// @since_tizen 3.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/antivirus.admin - /// @param[in] engine The engine information handle - /// @param[out] state A pointer of the engine state - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a state is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_get_current_engine() - int csr_engine_get_state( - csr_engine_h engine, - ffi.Pointer state, - ) { - return _csr_engine_get_state( - engine, - state, - ); - } - - late final _csr_engine_get_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - csr_engine_h, ffi.Pointer)>>('csr_engine_get_state'); - late final _csr_engine_get_state = _csr_engine_get_statePtr - .asFunction)>(); - - /// @platform - /// @brief Releases all system resources associated with a engine information handle. - /// @since_tizen 3.0 - /// @param[in] engine The engine information handle - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle - int csr_engine_destroy( - csr_engine_h engine, - ) { - return _csr_engine_destroy( - engine, - ); - } - - late final _csr_engine_destroyPtr = - _lookup>( - 'csr_engine_destroy'); - late final _csr_engine_destroy = - _csr_engine_destroyPtr.asFunction(); - - /// @partner - /// @brief Initializes and returns a Content Screening API handle. - /// @details A Content Screening API handle (or CSR CS handle) is obtained by this method. - /// The handle is required for subsequent CSR CS API calls. - /// @since_tizen 3.0 - /// @remarks @a handle should be released using csr_cs_context_destroy(). - /// @remarks Multiple handles can be obtained. - /// @param[out] handle A pointer of CSR CS context handle - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE @a handle may be null - /// @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_context_destroy() - int csr_cs_context_create( - ffi.Pointer handle, - ) { - return _csr_cs_context_create( - handle, - ); - } - - late final _csr_cs_context_createPtr = _lookup< - ffi.NativeFunction)>>( - 'csr_cs_context_create'); - late final _csr_cs_context_create = _csr_cs_context_createPtr - .asFunction)>(); - - /// @partner - /// @brief Releases all system resources associated with a Content Screening API handle. - /// @since_tizen 3.0 - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_SOCKET Socket error between client and server - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_context_create() - int csr_cs_context_destroy( - csr_cs_context_h handle, - ) { - return _csr_cs_context_destroy( - handle, - ); - } - - late final _csr_cs_context_destroyPtr = - _lookup>( - 'csr_cs_context_destroy'); - late final _csr_cs_context_destroy = - _csr_cs_context_destroyPtr.asFunction(); - - /// @partner - /// @brief Sets a popup option for malware detected. - /// @details If #CSR_CS_ASK_USER_YES is set, a popup will be prompted to a user when a malware is detected. - /// If #CSR_CS_ASK_USER_NO is set which is default value, no popup will be prompted even if a malware is detected. - /// User can allow, disallow, and remove detected malware by popup. - /// Selection can be different between malware's severity. - /// @since_tizen 3.0 - /// @remarks This option is disabled(#CSR_CS_ASK_USER_NO) as a default. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] ask_user Popup option to set or unset - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a ask_user is invalid - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_context_create() - /// @see csr_cs_context_destroy() - int csr_cs_set_ask_user( - csr_cs_context_h handle, - int ask_user, - ) { - return _csr_cs_set_ask_user( - handle, - ask_user, - ); - } - - late final _csr_cs_set_ask_userPtr = _lookup< - ffi.NativeFunction>( - 'csr_cs_set_ask_user'); - late final _csr_cs_set_ask_user = - _csr_cs_set_ask_userPtr.asFunction(); - - /// @partner - /// @brief Sets a popup message of a client in case that a malware is detected. - /// @details Default message is "Malware which may harm your device is detected." - /// @since_tizen 3.0 - /// @remarks Meaningful only when ask user option is set by csr_cs_set_ask_user(). - /// @remarks The message will be printed on popup for user. - /// @remarks Default popup message will be used if it isn't set. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] message A message to print on a popup - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a message is too long or empty. Max size is 64 bytes - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_context_create() - /// @see csr_cs_context_destroy() - int csr_cs_set_popup_message( - csr_cs_context_h handle, - ffi.Pointer message, - ) { - return _csr_cs_set_popup_message( - handle, - message, - ); - } - - late final _csr_cs_set_popup_messagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_context_h, - ffi.Pointer)>>('csr_cs_set_popup_message'); - late final _csr_cs_set_popup_message = _csr_cs_set_popup_messagePtr - .asFunction)>(); - - /// @partner - /// @brief Sets a maximum core usage during scanning. - /// @since_tizen 3.0 - /// @remarks If a core usage is not set, #CSR_CS_CORE_USAGE_DEFAULT will be used. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] usage A maximum core usage during scanning - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a usage is invalid - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_context_create() - /// @see csr_cs_context_destroy() - int csr_cs_set_core_usage( - csr_cs_context_h handle, - int usage, - ) { - return _csr_cs_set_core_usage( - handle, - usage, - ); - } - - late final _csr_cs_set_core_usagePtr = _lookup< - ffi.NativeFunction>( - 'csr_cs_set_core_usage'); - late final _csr_cs_set_core_usage = _csr_cs_set_core_usagePtr - .asFunction(); - - /// @partner - /// @brief Sets a scan on cloud option. - /// @since_tizen 3.0 - /// @remarks Scan on cloud option is turned off as a default. - /// @remarks If an engine does not support "scanning on cloud", this option is silently ignored. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] scan_on_cloud Flag of scanning on cloud option - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_context_create() - /// @see csr_cs_context_destroy() - int csr_cs_set_scan_on_cloud( - csr_cs_context_h handle, - bool scan_on_cloud, - ) { - return _csr_cs_set_scan_on_cloud( - handle, - scan_on_cloud, - ); - } - - late final _csr_cs_set_scan_on_cloudPtr = - _lookup>( - 'csr_cs_set_scan_on_cloud'); - late final _csr_cs_set_scan_on_cloud = _csr_cs_set_scan_on_cloudPtr - .asFunction(); - - /// @partner - /// @brief Scans a data buffer for malware. - /// @details @a malware result of this method is not available for being judged by - /// csr_cs_judge_detected_malware() because it's data and not a file, so it cannot be removed or ignored. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/antivirus.scan - /// @remarks Scan data synchronously. - /// @remarks @a malware will be released when @a handle is released using csr_cs_context_destroy(). - /// @remarks If multiple malwares exists in @a data, the malware with the highest severity will be returned. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] data A scan target data - /// @param[in] length A size of a scan target data - /// @param[out] malware A pointer of the detected malware handle. It can be null when no malware detected - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory - /// @retval #CSR_ERROR_INVALID_PARAMETER @a data or @a malware is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED No privilege to call - /// @retval #CSR_ERROR_NOT_SUPPORTED Device needed to run API is not supported - /// @retval #CSR_ERROR_SOCKET Socket error between client and server - /// @retval #CSR_ERROR_SERVER Server has been failed for some reason - /// @retval #CSR_ERROR_USER_RESPONSE_FAILED Getting user response is failed. - /// @a malware will be allocated on this error - /// @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists - /// @retval #CSR_ERROR_ENGINE_DISABLED Engine is in disabled state - /// @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_context_create() - /// @see csr_cs_context_destroy() - int csr_cs_scan_data( - csr_cs_context_h handle, - ffi.Pointer data, - int length, - ffi.Pointer malware, - ) { - return _csr_cs_scan_data( - handle, - data, - length, - malware, - ); - } - - late final _csr_cs_scan_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_context_h, ffi.Pointer, - ffi.Size, ffi.Pointer)>>('csr_cs_scan_data'); - late final _csr_cs_scan_data = _csr_cs_scan_dataPtr.asFunction< - int Function(csr_cs_context_h, ffi.Pointer, int, - ffi.Pointer)>(); - - /// @partner - /// @brief Scans a file specified by file path for malware. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/antivirus.scan - /// @remarks Scan file synchronously. - /// @remarks @a malware will be released when @a handle is released using csr_cs_context_destroy(). - /// @remarks If multiple malwares exists in a file, the malware with the highest severity will be returned. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] file_path A path of scan target file - /// @param[out] malware A pointer of the detected malware handle. It can be null when no malware detected - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory - /// @retval #CSR_ERROR_INVALID_PARAMETER @a file_path or @a malware is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED Access denied - /// @retval #CSR_ERROR_NOT_SUPPORTED Device needed to run API is not supported - /// @retval #CSR_ERROR_DB DB transaction error - /// @retval #CSR_ERROR_REMOVE_FAILED Removing file or application is failed when malware exist and user select to remove by popup. - /// @a malware will be allocated on this error - /// @retval #CSR_ERROR_USER_RESPONSE_FAILED Getting user response is failed - /// @a malware will be allocated on this error - /// @retval #CSR_ERROR_FILE_DO_NOT_EXIST File not found - /// @retval #CSR_ERROR_SOCKET Socket error between client and server - /// @retval #CSR_ERROR_SERVER Server has been failed for some reason - /// @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists - /// @retval #CSR_ERROR_ENGINE_DISABLED Engine is in disabled state - /// @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated - /// @retval #CSR_ERROR_ENGINE_PERMISSION Insufficient permission of engine - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_context_create() - /// @see csr_cs_context_destroy() - int csr_cs_scan_file( - csr_cs_context_h handle, - ffi.Pointer file_path, - ffi.Pointer malware, - ) { - return _csr_cs_scan_file( - handle, - file_path, - malware, - ); - } - - late final _csr_cs_scan_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_context_h, ffi.Pointer, - ffi.Pointer)>>('csr_cs_scan_file'); - late final _csr_cs_scan_file = _csr_cs_scan_filePtr.asFunction< - int Function(csr_cs_context_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @partner - /// @brief Sets a callback function for the case that a file scan is completed. - /// @since_tizen 3.0 - /// @remarks Callback for asynchronous scan functions. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] callback A callback function for each file or application scanning done without any malware. - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a callback is invalid - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_scan_files_async() - /// @see csr_cs_scan_dir_async() - /// @see csr_cs_scan_dirs_async() - int csr_cs_set_file_scanned_cb( - csr_cs_context_h handle, - csr_cs_file_scanned_cb callback, - ) { - return _csr_cs_set_file_scanned_cb( - handle, - callback, - ); - } - - late final _csr_cs_set_file_scanned_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_context_h, - csr_cs_file_scanned_cb)>>('csr_cs_set_file_scanned_cb'); - late final _csr_cs_set_file_scanned_cb = _csr_cs_set_file_scanned_cbPtr - .asFunction(); - - /// @partner - /// @brief Sets a callback function for detection of a malware. - /// @since_tizen 3.0 - /// @remarks Callback for asynchronous scan functions. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] callback A callback function for each file or application scanning done with malware detected - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a callback is invalid - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_scan_files_async() - /// @see csr_cs_scan_dir_async() - /// @see csr_cs_scan_dirs_async() - int csr_cs_set_detected_cb( - csr_cs_context_h handle, - csr_cs_detected_cb callback, - ) { - return _csr_cs_set_detected_cb( - handle, - callback, - ); - } - - late final _csr_cs_set_detected_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - csr_cs_context_h, csr_cs_detected_cb)>>('csr_cs_set_detected_cb'); - late final _csr_cs_set_detected_cb = _csr_cs_set_detected_cbPtr - .asFunction(); - - /// @partner - /// @brief Sets a callback function for scanning completed without an error. - /// @since_tizen 3.0 - /// @remarks Callback for asynchronous scan functions. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] callback A callback function for scanning completed successfully - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a callback is invalid - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_scan_files_async() - /// @see csr_cs_scan_dir_async() - /// @see csr_cs_scan_dirs_async() - int csr_cs_set_completed_cb( - csr_cs_context_h handle, - csr_cs_completed_cb callback, - ) { - return _csr_cs_set_completed_cb( - handle, - callback, - ); - } - - late final _csr_cs_set_completed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_context_h, - csr_cs_completed_cb)>>('csr_cs_set_completed_cb'); - late final _csr_cs_set_completed_cb = _csr_cs_set_completed_cbPtr - .asFunction(); - - /// @partner - /// @brief Sets a callback function for scanning cancelled. - /// @since_tizen 3.0 - /// @remarks Callback for asynchronous scan functions. - /// @remarks Client can cancel asynchronous scanning by csr_cs_cancel_scanning(). - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] callback A callback function for scanning cancelled - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a callback is invalid - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_scan_files_async() - /// @see csr_cs_scan_dir_async() - /// @see csr_cs_scan_dirs_async() - /// @see csr_cs_cancel_scanning() - int csr_cs_set_cancelled_cb( - csr_cs_context_h handle, - csr_cs_cancelled_cb callback, - ) { - return _csr_cs_set_cancelled_cb( - handle, - callback, - ); - } - - late final _csr_cs_set_cancelled_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_context_h, - csr_cs_cancelled_cb)>>('csr_cs_set_cancelled_cb'); - late final _csr_cs_set_cancelled_cb = _csr_cs_set_cancelled_cbPtr - .asFunction(); - - /// @partner - /// @brief Sets a callback function for scanning stopped with an error. - /// @since_tizen 3.0 - /// @remarks Callback for asynchronous scan functions. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] callback A callback function for scanning stopped due to an error - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a callback is invalid - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_scan_files_async() - /// @see csr_cs_scan_dir_async() - /// @see csr_cs_scan_dirs_async() - int csr_cs_set_error_cb( - csr_cs_context_h handle, - csr_cs_error_cb callback, - ) { - return _csr_cs_set_error_cb( - handle, - callback, - ); - } - - late final _csr_cs_set_error_cbPtr = _lookup< - ffi - .NativeFunction>( - 'csr_cs_set_error_cb'); - late final _csr_cs_set_error_cb = _csr_cs_set_error_cbPtr - .asFunction(); - - /// @partner - /// @brief Scan files specified by an array of file paths for malware. - /// @details If scanning of the single file is done without detected malware, - /// csr_cs_file_scanned_cb() is called and else if malware detected - /// csr_cs_detected_cb() is called. If scanning is cancelled by - /// csr_cs_cancel_scanning(), csr_cs_cancelled_cb() is called. If scanning is failed - /// with error, csr_cs_error_cb() is called. If scanning is completed without - /// error, csr_cs_completed_cb(). Every callbacks are registered by callback - /// setter methods to @a handle and if callback is not registered, it will be just skipped to be called. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/antivirus.scan - /// @remarks Asynchronous function. - /// @remarks The caller should set callback functions before calling this method. - /// @remarks Detected malware which is provided to the callback will be released when - /// @a handle is released using csr_cs_context_destroy(). - /// @remarks If multiple malwares exists in a file, the malware with the highest - /// severity will be returned for the file via csr_cs_set_detected_cb(). - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] file_paths An array of scan target files - /// @param[in] count A number of scan target files - /// @param[in] user_data The pointer of a user data. It can be null. - /// It is delivered back to the client when a callback function is called - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory - /// @retval #CSR_ERROR_INVALID_PARAMETER @a file_paths is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED Access denied - /// @retval #CSR_ERROR_NOT_SUPPORTED Device needed to run API is not supported - /// @retval #CSR_ERROR_BUSY Busy for processing another request - /// @retval #CSR_ERROR_FILE_DO_NOT_EXIST File not found - /// @retval #CSR_ERROR_SOCKET Socket error between client and server - /// @retval #CSR_ERROR_SERVER Server has been failed for some reason - /// @retval #CSR_ERROR_DB DB transaction error - /// @retval #CSR_ERROR_ENGINE_PERMISSION Insufficient permission of engine - /// @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists - /// @retval #CSR_ERROR_ENGINE_DISABLED Engine is in disabled state - /// @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @pre It is required to set callbacks, csr_cs_completed_cb, csr_cs_error_cb(), - /// csr_cs_cancel_scanning(), csr_cs_detected_cb(), and/or csr_cs_file_scanned_cb(). - /// @see csr_cs_set_file_scanned_cb() - /// @see csr_cs_set_detected_cb() - /// @see csr_cs_set_completed_cb() - /// @see csr_cs_set_cancelled_cb() - /// @see csr_cs_set_error_cb() - /// @see csr_cs_cancel_scanning() - int csr_cs_scan_files_async( - csr_cs_context_h handle, - ffi.Pointer> file_paths, - int count, - ffi.Pointer user_data, - ) { - return _csr_cs_scan_files_async( - handle, - file_paths, - count, - user_data, - ); - } - - late final _csr_cs_scan_files_asyncPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_context_h, ffi.Pointer>, - ffi.Size, ffi.Pointer)>>('csr_cs_scan_files_async'); - late final _csr_cs_scan_files_async = _csr_cs_scan_files_asyncPtr.asFunction< - int Function(csr_cs_context_h, ffi.Pointer>, int, - ffi.Pointer)>(); - - /// @partner - /// @brief Scans a directory specified by directory path for malware. - /// @details If scanning of the single file is done without detected malware, - /// csr_cs_file_scanned_cb() is called and else if malware detected - /// csr_cs_detected_cb() is called. If scanning is cancelled by - /// csr_cs_cancel_scanning(), csr_cs_cancelled_cb() is called. If scanning is failed - /// with error, csr_cs_error_cb() is called. If scanning is completed without - /// error, csr_cs_completed_cb(). Every callbacks are registered by callback - /// setter methods to @a handle and if callback is not registered, it will be just skipped to be called. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/antivirus.scan - /// @remarks Asynchronous function. - /// @remarks The caller should set callback functions before calling this method. - /// @remarks Detected malware which is provided to the callback will be released when - /// @a handle is released using csr_cs_context_destroy(). - /// @remarks If multiple malwares exists in a file, the malware with the highest - /// severity will be returned for the file via csr_cs_set_detected_cb(). - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] dir_path A path of scan target directory - /// @param[in] user_data The pointer of a user data. It can be null. - /// It is used on the callback functions which are registered to @a handle - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory - /// @retval #CSR_ERROR_INVALID_PARAMETER @a dir_path is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED Access denied - /// @retval #CSR_ERROR_NOT_SUPPORTED Device needed to run API is not supported - /// @retval #CSR_ERROR_BUSY Busy for processing another request - /// @retval #CSR_ERROR_FILE_DO_NOT_EXIST File not found - /// @retval #CSR_ERROR_FILE_SYSTEM File type is invalid. It should be directory - /// @retval #CSR_ERROR_SOCKET Socket error between client and server - /// @retval #CSR_ERROR_SERVER Server has been failed for some reason - /// @retval #CSR_ERROR_DB DB transaction error - /// @retval #CSR_ERROR_ENGINE_PERMISSION Insufficient permission of engine - /// @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists - /// @retval #CSR_ERROR_ENGINE_DISABLED Engine is in disabled state - /// @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @pre It is required to set callbacks, csr_cs_completed_cb, csr_cs_error_cb(), - /// csr_cs_cancel_scanning(), csr_cs_detected_cb(), and/or csr_cs_file_scanned_cb(). - /// @see csr_cs_set_file_scanned_cb() - /// @see csr_cs_set_detected_cb() - /// @see csr_cs_set_completed_cb() - /// @see csr_cs_set_cancelled_cb() - /// @see csr_cs_set_error_cb() - /// @see csr_cs_cancel_scanning() - int csr_cs_scan_dir_async( - csr_cs_context_h handle, - ffi.Pointer dir_path, - ffi.Pointer user_data, - ) { - return _csr_cs_scan_dir_async( - handle, - dir_path, - user_data, - ); - } - - late final _csr_cs_scan_dir_asyncPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_context_h, ffi.Pointer, - ffi.Pointer)>>('csr_cs_scan_dir_async'); - late final _csr_cs_scan_dir_async = _csr_cs_scan_dir_asyncPtr.asFunction< - int Function( - csr_cs_context_h, ffi.Pointer, ffi.Pointer)>(); - - /// @partner - /// @brief Scan directories specified by an array of directory paths for malware. - /// @details If scanning of the single file is done without detected malware, - /// csr_cs_file_scanned_cb() is called and else if malware detected - /// csr_cs_detected_cb() is called. If scanning is cancelled by - /// csr_cs_cancel_scanning(), csr_cs_cancelled_cb() is called. If scanning is failed - /// with error, csr_cs_error_cb() is called. If scanning is completed without - /// error, csr_cs_completed_cb(). Every callbacks are registered by callback - /// setter methods to @a handle and if callback is not registered, it will just be skipped to be called. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/antivirus.scan - /// @remarks Asynchronous function. - /// @remarks The caller should set callback functions before calls this method. - /// @remarks Detected malware which is provided to the callback will be released when - /// @a handle is released using csr_cs_context_destroy(). - /// @remarks If multiple malwares exists in a file, the malware with the highest - /// severity will be returned for the file via csr_cs_set_detected_cb(). - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] dir_paths An array of scan target directories - /// @param[in] count A number of scan target directories - /// @param[in] user_data The pointer of a user data. It can be null. It is used on - /// the callback functions which are registered to @a handle - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory - /// @retval #CSR_ERROR_INVALID_PARAMETER @a dir_paths is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED Access denied - /// @retval #CSR_ERROR_NOT_SUPPORTED Device needed to run API is not supported - /// @retval #CSR_ERROR_BUSY Busy for processing another request - /// @retval #CSR_ERROR_FILE_DO_NOT_EXIST File not found - /// @retval #CSR_ERROR_FILE_SYSTEM File type is invalid. It should be directory - /// @retval #CSR_ERROR_SOCKET Socket error between client and server - /// @retval #CSR_ERROR_SERVER Server has been failed for some reason - /// @retval #CSR_ERROR_DB DB transaction error - /// @retval #CSR_ERROR_ENGINE_PERMISSION Insufficient permission of engine - /// @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists - /// @retval #CSR_ERROR_ENGINE_DISABLED Engine is in disabled state - /// @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @pre It is required to set callbacks, csr_cs_completed_cb, csr_cs_error_cb(), - /// csr_cs_cancel_scanning(), csr_cs_detected_cb(), and/or csr_cs_file_scanned_cb(). - /// @see csr_cs_set_file_scanned_cb() - /// @see csr_cs_set_detected_cb() - /// @see csr_cs_set_completed_cb() - /// @see csr_cs_set_cancelled_cb() - /// @see csr_cs_set_error_cb() - /// @see csr_cs_cancel_scanning() - int csr_cs_scan_dirs_async( - csr_cs_context_h handle, - ffi.Pointer> dir_paths, - int count, - ffi.Pointer user_data, - ) { - return _csr_cs_scan_dirs_async( - handle, - dir_paths, - count, - user_data, - ); - } - - late final _csr_cs_scan_dirs_asyncPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_context_h, ffi.Pointer>, - ffi.Size, ffi.Pointer)>>('csr_cs_scan_dirs_async'); - late final _csr_cs_scan_dirs_async = _csr_cs_scan_dirs_asyncPtr.asFunction< - int Function(csr_cs_context_h, ffi.Pointer>, int, - ffi.Pointer)>(); - - /// @partner - /// @brief Cancels a running scanning task, asynchronously. - /// @since_tizen 3.0 - /// @remarks Only for asynchronous scan functions. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_NO_TASK No task to cancel - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_scan_files_async() - /// @see csr_cs_scan_dir_async() - /// @see csr_cs_scan_dirs_async() - int csr_cs_cancel_scanning( - csr_cs_context_h handle, - ) { - return _csr_cs_cancel_scanning( - handle, - ); - } - - late final _csr_cs_cancel_scanningPtr = - _lookup>( - 'csr_cs_cancel_scanning'); - late final _csr_cs_cancel_scanning = - _csr_cs_cancel_scanningPtr.asFunction(); - - /// @partner - /// @brief Extracts the severity of a detected malware from the detected malware handle. - /// @since_tizen 3.0 - /// @param[in] malware A detected malware handle returned by csr_cs_scan_data(), - /// csr_cs_scan_file() or csr_cs_malware_list_get_malware() - /// @param[out] severity A pointer of the severity of a detected malware - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid detected malware handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a severity is invalid - /// @retval #CSR_ERROR_SYSTEM System error - int csr_cs_malware_get_severity( - csr_cs_malware_h malware, - ffi.Pointer severity, - ) { - return _csr_cs_malware_get_severity( - malware, - severity, - ); - } - - late final _csr_cs_malware_get_severityPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_malware_h, - ffi.Pointer)>>('csr_cs_malware_get_severity'); - late final _csr_cs_malware_get_severity = _csr_cs_malware_get_severityPtr - .asFunction)>(); - - /// @partner - /// @brief Extracts the name of a detected malware from the detected malware handle. - /// @since_tizen 3.0 - /// @remarks @a name must be released using free(). - /// @param[in] malware A detected malware handle - /// @param[out] name A pointer of the name of a detected malware - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid detected malware handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a name is invalid - /// @retval #CSR_ERROR_SYSTEM System error - int csr_cs_malware_get_name( - csr_cs_malware_h malware, - ffi.Pointer> name, - ) { - return _csr_cs_malware_get_name( - malware, - name, - ); - } - - late final _csr_cs_malware_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_malware_h, - ffi.Pointer>)>>('csr_cs_malware_get_name'); - late final _csr_cs_malware_get_name = _csr_cs_malware_get_namePtr.asFunction< - int Function(csr_cs_malware_h, ffi.Pointer>)>(); - - /// @partner - /// @brief Extracts an url that contains detailed information on vendor's web site from the detected malware handle. - /// @since_tizen 3.0 - /// @remarks @a detailed_url must be released using free(). - /// @param[in] malware A detected malware handle - /// @param[out] detailed_url A pointer of an url that contains detailed information on - /// vendor's web site. It can be null if a vendor doesn't provide this information - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid detected malware handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a detailed_url is invalid. - /// @retval #CSR_ERROR_SYSTEM System error - int csr_cs_malware_get_detailed_url( - csr_cs_malware_h malware, - ffi.Pointer> detailed_url, - ) { - return _csr_cs_malware_get_detailed_url( - malware, - detailed_url, - ); - } - - late final _csr_cs_malware_get_detailed_urlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - csr_cs_malware_h, ffi.Pointer>)>>( - 'csr_cs_malware_get_detailed_url'); - late final _csr_cs_malware_get_detailed_url = - _csr_cs_malware_get_detailed_urlPtr.asFunction< - int Function(csr_cs_malware_h, ffi.Pointer>)>(); - - /// @partner - /// @brief Extracts the time stamp when a malware is detected from the detected malware handle. - /// @since_tizen 3.0 - /// @param[in] malware A detected malware handle - /// @param[out] timestamp A pointer of the time stamp in milli second when a malware is detected - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid detected malware handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a timestamp is invalid - /// @retval #CSR_ERROR_SYSTEM System error - int csr_cs_malware_get_timestamp( - csr_cs_malware_h malware, - ffi.Pointer timestamp, - ) { - return _csr_cs_malware_get_timestamp( - malware, - timestamp, - ); - } - - late final _csr_cs_malware_get_timestampPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_malware_h, - ffi.Pointer)>>('csr_cs_malware_get_timestamp'); - late final _csr_cs_malware_get_timestamp = _csr_cs_malware_get_timestampPtr - .asFunction)>(); - - /// @partner - /// @brief Extracts the file name where a malware is detected from the detected malware handle. - /// @since_tizen 3.0 - /// @remarks @a file_name must be released using free(). - /// @param[in] malware A detected malware handle - /// @param[out] file_name A pointer of the file name where a malware is detected. The file name is null for csr_cs_scan_data() - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid detected malware handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a file_name is invalid - /// @retval #CSR_ERROR_SYSTEM System error - int csr_cs_malware_get_file_name( - csr_cs_malware_h malware, - ffi.Pointer> file_name, - ) { - return _csr_cs_malware_get_file_name( - malware, - file_name, - ); - } - - late final _csr_cs_malware_get_file_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - csr_cs_malware_h, ffi.Pointer>)>>( - 'csr_cs_malware_get_file_name'); - late final _csr_cs_malware_get_file_name = - _csr_cs_malware_get_file_namePtr.asFunction< - int Function(csr_cs_malware_h, ffi.Pointer>)>(); - - /// @partner - /// @brief Extracts a user response of a popup from the detected malware handle. - /// @since_tizen 3.0 - /// @param[in] malware A detected malware handle - /// @param[out] response A pointer of the user response - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid result handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a response is invalid - /// @retval #CSR_ERROR_SYSTEM System error - int csr_cs_malware_get_user_response( - csr_cs_malware_h malware, - ffi.Pointer response, - ) { - return _csr_cs_malware_get_user_response( - malware, - response, - ); - } - - late final _csr_cs_malware_get_user_responsePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_malware_h, - ffi.Pointer)>>('csr_cs_malware_get_user_response'); - late final _csr_cs_malware_get_user_response = - _csr_cs_malware_get_user_responsePtr - .asFunction)>(); - - /// @partner - /// @brief Checks if a malware was detected in an application or in a file. - /// @since_tizen 3.0 - /// @param[in] malware A detected malware handle - /// @param[out] is_app A pointer of a flag indicating the position where a malware was detected. - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid result handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a is_app is invalid - /// @retval #CSR_ERROR_SYSTEM System error - int csr_cs_malware_is_app( - csr_cs_malware_h malware, - ffi.Pointer is_app, - ) { - return _csr_cs_malware_is_app( - malware, - is_app, - ); - } - - late final _csr_cs_malware_is_appPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_malware_h, - ffi.Pointer)>>('csr_cs_malware_is_app'); - late final _csr_cs_malware_is_app = _csr_cs_malware_is_appPtr - .asFunction)>(); - - /// @partner - /// @brief Extracts the package id of an application where a malware is detected from detected malware handle. - /// @since_tizen 3.0 - /// @remarks @a pkg_id must be released using free(). - /// @param[in] malware A detected malware handle - /// @param[out] pkg_id A pointer of the package id where a malware is detected. - /// It is null when a malware was not detected in an application - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid detected malware handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a pkg_id is invalid - /// @retval #CSR_ERROR_SYSTEM System error - int csr_cs_malware_get_pkg_id( - csr_cs_malware_h malware, - ffi.Pointer> pkg_id, - ) { - return _csr_cs_malware_get_pkg_id( - malware, - pkg_id, - ); - } - - late final _csr_cs_malware_get_pkg_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - csr_cs_malware_h, ffi.Pointer>)>>( - 'csr_cs_malware_get_pkg_id'); - late final _csr_cs_malware_get_pkg_id = - _csr_cs_malware_get_pkg_idPtr.asFunction< - int Function(csr_cs_malware_h, ffi.Pointer>)>(); - - /// @platform - /// @brief Judges how a detected malware file is handled. - /// @details Detected malware will be removed by #CSR_CS_ACTION_REMOVE action. - /// File or application which contains malware will be removed. - /// Detected malware will be ignored by #CSR_CS_ACTION_IGNORE action. - /// File or application which contains malware will be ignored and will not be treated - /// as malware until this API is called with #CSR_CS_ACTION_UNIGNORE action. - /// @since_tizen 3.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/antivirus.admin - /// @remarks Detected malware can be removed or ignored. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] malware A handle of a detected malware - /// @param[in] action An action to be taken - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory - /// @retval #CSR_ERROR_INVALID_PARAMETER @a malware or @a action is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED No permission to remove - /// @retval #CSR_ERROR_FILE_DO_NOT_EXIST File to take action on not found - /// @retval #CSR_ERROR_FILE_CHANGED File to take action on changed after detection - /// @retval #CSR_ERROR_SOCKET Socket error between client and server - /// @retval #CSR_ERROR_SERVER Server has been failed for some reason - /// @retval #CSR_ERROR_DB DB transaction error - /// @retval #CSR_ERROR_REMOVE_FAILED Removing file or application is failed - /// @retval #CSR_ERROR_SYSTEM System error - int csr_cs_judge_detected_malware( - csr_cs_context_h handle, - csr_cs_malware_h malware, - int action, - ) { - return _csr_cs_judge_detected_malware( - handle, - malware, - action, - ); - } - - late final _csr_cs_judge_detected_malwarePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_context_h, csr_cs_malware_h, - ffi.Int32)>>('csr_cs_judge_detected_malware'); - late final _csr_cs_judge_detected_malware = _csr_cs_judge_detected_malwarePtr - .asFunction(); - - /// @partner - /// @brief Gets information on a detected malware file specified by file path. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/antivirus.scan - /// @remarks @a malware will be released when @a handle is destroyed. - /// @remarks @a file_path will be null if it's result of csr_cs_scan_data(). - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] file_path A path of a detected malware file - /// @param[out] malware A pointer of the detected malware handle. It can be null when no malware file - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory - /// @retval #CSR_ERROR_INVALID_PARAMETER @a file_path or @a malware is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED No permission to remove - /// @retval #CSR_ERROR_FILE_DO_NOT_EXIST No malware file - /// @retval #CSR_ERROR_SOCKET Socket error between client and server - /// @retval #CSR_ERROR_SERVER Server has been failed for some reason - /// @retval #CSR_ERROR_DB DB transaction error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_scan_data() - /// @see csr_cs_scan_file() - /// @see csr_cs_detected_cb - int csr_cs_get_detected_malware( - csr_cs_context_h handle, - ffi.Pointer file_path, - ffi.Pointer malware, - ) { - return _csr_cs_get_detected_malware( - handle, - file_path, - malware, - ); - } - - late final _csr_cs_get_detected_malwarePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_context_h, ffi.Pointer, - ffi.Pointer)>>('csr_cs_get_detected_malware'); - late final _csr_cs_get_detected_malware = - _csr_cs_get_detected_malwarePtr.asFunction< - int Function(csr_cs_context_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @partner - /// @brief Gets information on a detected malware files specified by directory path. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/antivirus.scan - /// @remarks @a list will be released when @a handle is destroyed. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] dir_paths A directory path where detected malware files exists - /// @param[in] count Count of array element of @a dir_paths - /// @param[out] list A pointer of the detected malware list handle. It can be null when there is no malware file - /// @param[out] list_count Count of detected malware files which existed in the specified directory - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory - /// @retval #CSR_ERROR_INVALID_PARAMETER @a dir_paths, @a list, or @a count is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED No permission to remove - /// @retval #CSR_ERROR_FILE_DO_NOT_EXIST No malware file - /// @retval #CSR_ERROR_SOCKET Socket error between client and server - /// @retval #CSR_ERROR_SERVER Server has been failed for some reason - /// @retval #CSR_ERROR_DB DB transaction error - /// @retval #CSR_ERROR_SYSTEM System error - int csr_cs_get_detected_malwares( - csr_cs_context_h handle, - ffi.Pointer> dir_paths, - int count, - ffi.Pointer list, - ffi.Pointer list_count, - ) { - return _csr_cs_get_detected_malwares( - handle, - dir_paths, - count, - list, - list_count, - ); - } - - late final _csr_cs_get_detected_malwaresPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - csr_cs_context_h, - ffi.Pointer>, - ffi.Size, - ffi.Pointer, - ffi.Pointer)>>('csr_cs_get_detected_malwares'); - late final _csr_cs_get_detected_malwares = - _csr_cs_get_detected_malwaresPtr.asFunction< - int Function( - csr_cs_context_h, - ffi.Pointer>, - int, - ffi.Pointer, - ffi.Pointer)>(); - - /// @partner - /// @brief Gets information on a ignored malware file specified by file path. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/antivirus.scan - /// @remarks @a malware will be released when @a handle is destroyed. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] file_path A path of a ignored malware file - /// @param[out] malware A pointer of the detected malware handle. It can be null when no ignored file - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory - /// @retval #CSR_ERROR_INVALID_PARAMETER @a file_path or @a malware is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED No permission to remove - /// @retval #CSR_ERROR_FILE_DO_NOT_EXIST No ignored file - /// @retval #CSR_ERROR_SOCKET Socket error between client and server - /// @retval #CSR_ERROR_SERVER Server has been failed for some reason - /// @retval #CSR_ERROR_DB DB transaction error - /// @retval #CSR_ERROR_SYSTEM System error - int csr_cs_get_ignored_malware( - csr_cs_context_h handle, - ffi.Pointer file_path, - ffi.Pointer malware, - ) { - return _csr_cs_get_ignored_malware( - handle, - file_path, - malware, - ); - } - - late final _csr_cs_get_ignored_malwarePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_context_h, ffi.Pointer, - ffi.Pointer)>>('csr_cs_get_ignored_malware'); - late final _csr_cs_get_ignored_malware = - _csr_cs_get_ignored_malwarePtr.asFunction< - int Function(csr_cs_context_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @partner - /// @brief Gets information on ignored malware files specified by directory path. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/antivirus.scan - /// @remarks @a list will be released when @a handle is destroyed. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] dir_paths A directory path where ignored malware files exists - /// @param[in] count Count of array element of @a dir_paths - /// @param[out] list A pointer of the detected malware list handle. It can be null when no ignored file - /// @param[out] list_count Count of ignored malware files which existed in the specified directory - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory - /// @retval #CSR_ERROR_INVALID_PARAMETER @a dir_paths, @a list, or @a count is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED No permission to remove - /// @retval #CSR_ERROR_FILE_DO_NOT_EXIST No ignored file - /// @retval #CSR_ERROR_SOCKET Socket error between client and server - /// @retval #CSR_ERROR_SERVER Server has been failed for some reason - /// @retval #CSR_ERROR_DB DB transaction error - /// @retval #CSR_ERROR_SYSTEM System error - int csr_cs_get_ignored_malwares( - csr_cs_context_h handle, - ffi.Pointer> dir_paths, - int count, - ffi.Pointer list, - ffi.Pointer list_count, - ) { - return _csr_cs_get_ignored_malwares( - handle, - dir_paths, - count, - list, - list_count, - ); - } - - late final _csr_cs_get_ignored_malwaresPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - csr_cs_context_h, - ffi.Pointer>, - ffi.Size, - ffi.Pointer, - ffi.Pointer)>>('csr_cs_get_ignored_malwares'); - late final _csr_cs_get_ignored_malwares = - _csr_cs_get_ignored_malwaresPtr.asFunction< - int Function( - csr_cs_context_h, - ffi.Pointer>, - int, - ffi.Pointer, - ffi.Pointer)>(); - - /// @partner - /// @brief Extracts the detected malware handle from the detected malware list handle. - /// @since_tizen 3.0 - /// @remarks @a malware will be released when a context is released using csr_cs_context_destroy(). - /// @param[in] list A detected malware list handle returned by csr_cs_get_detected_malwares() or csr_cs_get_ignored_malwares() - /// @param[in] index An index of a target detected malware handle to get - /// @param[out] malware A pointer of the detected malware handle. It can be null when index is invalid - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid list - /// @retval #CSR_ERROR_INVALID_PARAMETER @a index or @a malware is invalid - /// @retval #CSR_ERROR_SYSTEM System error - int csr_cs_malware_list_get_malware( - csr_cs_malware_list_h list, - int index, - ffi.Pointer malware, - ) { - return _csr_cs_malware_list_get_malware( - list, - index, - malware, - ); - } - - late final _csr_cs_malware_list_get_malwarePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_malware_list_h, ffi.Size, - ffi.Pointer)>>( - 'csr_cs_malware_list_get_malware'); - late final _csr_cs_malware_list_get_malware = - _csr_cs_malware_list_get_malwarePtr.asFunction< - int Function( - csr_cs_malware_list_h, int, ffi.Pointer)>(); - - /// @partner - /// @brief Initializes and returns a CSR Web Protection API handle. - /// @details A Web Protection API handle (or CSR WP handle) is obtained by this method. - /// The handle is required for subsequent CSR WP API calls. - /// @since_tizen 3.0 - /// @remarks @a handle should be released using csr_wp_context_destroy(). - /// @remarks Multiple handles can be obtained. - /// @param[out] handle A pointer of CSR WP context handle - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory - /// @retval #CSR_ERROR_INVALID_PARAMETER @a handle is invalid - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_wp_context_destroy() - int csr_wp_context_create( - ffi.Pointer handle, - ) { - return _csr_wp_context_create( - handle, - ); - } - - late final _csr_wp_context_createPtr = _lookup< - ffi.NativeFunction)>>( - 'csr_wp_context_create'); - late final _csr_wp_context_create = _csr_wp_context_createPtr - .asFunction)>(); - - /// @partner - /// @brief Releases all system resources associated with a Web Protection API handle. - /// @since_tizen 3.0 - /// @param[in] handle CSR WP context handle returned by csr_wp_context_create() - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_SOCKET Socket error between client and server - /// @retval #CSR_ERROR_SERVER Server has been failed for some reason - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_wp_context_create() - int csr_wp_context_destroy( - csr_wp_context_h handle, - ) { - return _csr_wp_context_destroy( - handle, - ); - } - - late final _csr_wp_context_destroyPtr = - _lookup>( - 'csr_wp_context_destroy'); - late final _csr_wp_context_destroy = - _csr_wp_context_destroyPtr.asFunction(); - - /// @partner - /// @brief Sets a popup option for risky URL checked. - /// @details If #CSR_WP_ASK_USER_YES is set, a popup will be prompted to a user when a URL turns out risky. - /// If #CSR_WP_ASK_USER_NO is set, no popup will be prompted even when a URL turns out risky. - /// @since_tizen 3.0 - /// @remarks This option is disabled(#CSR_WP_ASK_USER_NO) as a default. - /// @param[in] handle CSR WP context handle returned by csr_wp_context_create() - /// @param[in] ask_user A popup option in case for a risky URL - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a ask_user is invalid - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_wp_context_create() - int csr_wp_set_ask_user( - csr_wp_context_h handle, - int ask_user, - ) { - return _csr_wp_set_ask_user( - handle, - ask_user, - ); - } - - late final _csr_wp_set_ask_userPtr = _lookup< - ffi.NativeFunction>( - 'csr_wp_set_ask_user'); - late final _csr_wp_set_ask_user = - _csr_wp_set_ask_userPtr.asFunction(); - - /// @partner - /// @brief Sets a popup message of a client in case for a risky URL. - /// @details Default message is "Risky URL which may harm your device is detected". - /// @since_tizen 3.0 - /// @remarks Meaningful only when ask user option is set by csr_wp_set_ask_user(). - /// @remarks The message will be printed on popup for user. - /// @remarks Default popup message will be used if it isn't set. - /// @param[in] handle CSR WP context handle returned by csr_wp_context_create() - /// @param[in] message A message to print on a popup - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a message is too long or empty. Max size is 64 bytes - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_wp_context_create() - int csr_wp_set_popup_message( - csr_wp_context_h handle, - ffi.Pointer message, - ) { - return _csr_wp_set_popup_message( - handle, - message, - ); - } - - late final _csr_wp_set_popup_messagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_wp_context_h, - ffi.Pointer)>>('csr_wp_set_popup_message'); - late final _csr_wp_set_popup_message = _csr_wp_set_popup_messagePtr - .asFunction)>(); - - /// @partner - /// @brief Checks URL reputation against the engine vendor's database. - /// @details Checks whether accessing the URL is risky or not and returns a result handle with the risk level for the URL. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/antivirus.webprotect - /// @remarks @a result will be released when @a handle is released using csr_wp_context_destroy(). - /// @param[in] handle CSR WP context handle returned by csr_wp_context_create() - /// @param[in] url URL to check - /// @param[out] result A pointer of the result handle with the Risk level for the URL - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory - /// @retval #CSR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CSR_ERROR_NOT_SUPPORTED Device needed to run API is not supported - /// @retval #CSR_ERROR_INVALID_PARAMETER @a url or @a result is invalid - /// @retval #CSR_ERROR_SOCKET Socket error between client and server - /// @retval #CSR_ERROR_SERVER Server has been failed for some reason - /// @retval #CSR_ERROR_USER_RESPONSE_FAILED Getting user response is failed. - /// @a result will be allocated on this error - /// @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists - /// @retval #CSR_ERROR_ENGINE_DISABLED Engine is in disabled state - /// @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_wp_context_create() - /// @see csr_wp_set_ask_user() - /// @see csr_wp_set_popup_message() - int csr_wp_check_url( - csr_wp_context_h handle, - ffi.Pointer url, - ffi.Pointer result, - ) { - return _csr_wp_check_url( - handle, - url, - result, - ); - } - - late final _csr_wp_check_urlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_wp_context_h, ffi.Pointer, - ffi.Pointer)>>('csr_wp_check_url'); - late final _csr_wp_check_url = _csr_wp_check_urlPtr.asFunction< - int Function(csr_wp_context_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @partner - /// @brief Extracts a risk level of the url from the result handle. - /// @since_tizen 3.0 - /// @param[in] result A result handle returned by csr_wp_check_url() - /// @param[out] level A pointer of the risk level for the given URL - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid result handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a level is invalid - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_wp_check_url() - int csr_wp_result_get_risk_level( - csr_wp_check_result_h result, - ffi.Pointer level, - ) { - return _csr_wp_result_get_risk_level( - result, - level, - ); - } - - late final _csr_wp_result_get_risk_levelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_wp_check_result_h, - ffi.Pointer)>>('csr_wp_result_get_risk_level'); - late final _csr_wp_result_get_risk_level = - _csr_wp_result_get_risk_levelPtr.asFunction< - int Function(csr_wp_check_result_h, ffi.Pointer)>(); - - /// @partner - /// @brief Extracts an url of vendor's web site that contains detailed information about the risk from the result handle. - /// @since_tizen 3.0 - /// @remarks @a detailed_url must be released using free(). - /// @param[in] result A result handle returned by csr_wp_check_url() - /// @param[out] detailed_url A pointer of an url that contains detailed information about the risk - /// If the risk level is #CSR_WP_RISK_MEDIUM or #CSR_WP_RISK_HIGH, - /// this url should be provided by the engine - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid result handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a detailed_url is invalid - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_wp_check_url() - int csr_wp_result_get_detailed_url( - csr_wp_check_result_h result, - ffi.Pointer> detailed_url, - ) { - return _csr_wp_result_get_detailed_url( - result, - detailed_url, - ); - } - - late final _csr_wp_result_get_detailed_urlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - csr_wp_check_result_h, ffi.Pointer>)>>( - 'csr_wp_result_get_detailed_url'); - late final _csr_wp_result_get_detailed_url = - _csr_wp_result_get_detailed_urlPtr.asFunction< - int Function( - csr_wp_check_result_h, ffi.Pointer>)>(); - - /// @partner - /// @brief Extracts a user response of a popup from the result handle. - /// @since_tizen 3.0 - /// @param[in] result A result handle returned by csr_wp_check_url() - /// @param[out] response A pointer of the user response - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid result handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a response is invalid - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_wp_check_url() - /// @see #csr_wp_user_response_e - int csr_wp_result_get_user_response( - csr_wp_check_result_h result, - ffi.Pointer response, - ) { - return _csr_wp_result_get_user_response( - result, - response, - ); - } - - late final _csr_wp_result_get_user_responsePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_wp_check_result_h, - ffi.Pointer)>>('csr_wp_result_get_user_response'); - late final _csr_wp_result_get_user_response = - _csr_wp_result_get_user_responsePtr.asFunction< - int Function(csr_wp_check_result_h, ffi.Pointer)>(); - - /// @brief Creates the device policy manager handle. - /// @details This API creates device policy manager handle required to - /// the device policy APIs. - /// This API is also used to verify whether caller is authorized - /// or not. - /// @since_tizen 3.0 - /// @return Device policy manager handle on success, otherwise NULL - /// @remarks The specific error code can be obtained by using the - /// get_last_result() method. Error codes are described in - /// exception section. - /// The returned handle should be released using dpm_manager_destroy(). - /// @exception #DPM_ERROR_NONE No error - /// @exception #DPM_ERROR_CONNECTION_REFUSED Connection refused - /// @exception #DPM_ERROR_OUT_OF_MEMORY Out of memory - /// @see dpm_manager_destroy() - /// @see get_last_result() - device_policy_manager_h dpm_manager_create() { - return _dpm_manager_create(); - } - - late final _dpm_manager_createPtr = - _lookup>( - 'dpm_manager_create'); - late final _dpm_manager_create = - _dpm_manager_createPtr.asFunction(); - - /// @brief Releases the device policy manager handle. - /// @details This API must be called if interaction with the device - /// policy manager is no longer required. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_manager_destroy( - device_policy_manager_h handle, - ) { - return _dpm_manager_destroy( - handle, - ); - } - - late final _dpm_manager_destroyPtr = - _lookup>( - 'dpm_manager_destroy'); - late final _dpm_manager_destroy = _dpm_manager_destroyPtr - .asFunction(); - - /// @brief Adds policy change callback to the device policy - /// manager. - /// @details This API can be used to subscribe policy change callback. - /// The callback specified to this API is asynchronously called when - /// policy is changed on runtime. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[in] name Policy name to subscribe(see @ref CAPI_SECURITY_DPM_MODULE_POLICY) - /// @param[in] callback The callback when policy is changed - /// @param[in] user_data User specified data passed to the callback - /// @param[out] id Policy change callback identifier - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @remark See @ref CAPI_SECURITY_DPM_MODULE_POLICY section for available policy name - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_remove_policy_changed_cb() - int dpm_add_policy_changed_cb( - device_policy_manager_h handle, - ffi.Pointer name, - dpm_policy_changed_cb callback, - ffi.Pointer user_data, - ffi.Pointer id, - ) { - return _dpm_add_policy_changed_cb( - handle, - name, - callback, - user_data, - id, - ); - } - - late final _dpm_add_policy_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - device_policy_manager_h, - ffi.Pointer, - dpm_policy_changed_cb, - ffi.Pointer, - ffi.Pointer)>>('dpm_add_policy_changed_cb'); - late final _dpm_add_policy_changed_cb = - _dpm_add_policy_changed_cbPtr.asFunction< - int Function( - device_policy_manager_h, - ffi.Pointer, - dpm_policy_changed_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Removes policy change callback from the device policy - /// manager. - /// @details This API should be called if policy change subscription is no longer - /// required. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[in] id Policy change callback identifier - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @pre The handle must be created by dpm_manager_create(). - /// @pre The callback identifier must be created by dpm_manager_add_policy_changed_cb(). - /// @see dpm_manager_create() - /// @see dpm_add_policy_changed_cb() - int dpm_remove_policy_changed_cb( - device_policy_manager_h handle, - int id, - ) { - return _dpm_remove_policy_changed_cb( - handle, - id, - ); - } - - late final _dpm_remove_policy_changed_cbPtr = _lookup< - ffi - .NativeFunction>( - 'dpm_remove_policy_changed_cb'); - late final _dpm_remove_policy_changed_cb = _dpm_remove_policy_changed_cbPtr - .asFunction(); - - /// @brief Adds signal callback. - /// @details This API can be used to receive signals raised by the device policy manager. - /// The callback specified to this function is automatically called when - /// the device policy manager raises signal. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[in] signal The signal name to receive(see @ref CAPI_DPM_SECURITY_MODULE_SIGNAL) - /// @param[in] callback The signal callback - /// @param[in] user_data The user data passed to the callback function - /// @param[out] id Signal identifier - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @remark See @ref CAPI_DPM_SECURITY_MODULE_SIGNAL section for signals - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_manager_destroy() - /// @see dpm_remove_signal_cb() - int dpm_add_signal_cb( - device_policy_manager_h handle, - ffi.Pointer signal, - dpm_signal_cb callback, - ffi.Pointer user_data, - ffi.Pointer id, - ) { - return _dpm_add_signal_cb( - handle, - signal, - callback, - user_data, - id, - ); - } - - late final _dpm_add_signal_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - device_policy_manager_h, - ffi.Pointer, - dpm_signal_cb, - ffi.Pointer, - ffi.Pointer)>>('dpm_add_signal_cb'); - late final _dpm_add_signal_cb = _dpm_add_signal_cbPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer, - dpm_signal_cb, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Removes signal callback. - /// @details This API removes signal callback. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[in] id Signal identifier - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @pre The context must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_manager_destroy() - /// @see dpm_add_signal_cb() - int dpm_remove_signal_cb( - device_policy_manager_h handle, - int id, - ) { - return _dpm_remove_signal_cb( - handle, - id, - ); - } - - late final _dpm_remove_signal_cbPtr = _lookup< - ffi - .NativeFunction>( - 'dpm_remove_signal_cb'); - late final _dpm_remove_signal_cb = _dpm_remove_signal_cbPtr - .asFunction(); - - /// @partner - /// @brief Sets password quality. - /// @details An administrator can set the password restrictions it is imposing. - /// After setting this, the user will not be able to - /// enter a new password that is not at least as restrictive as what has been set. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[in] quality Password quality type, values of #dpm_password_quality_e combined with bitwise 'or' - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_set_quality( - device_policy_manager_h handle, - int quality, - ) { - return _dpm_password_set_quality( - handle, - quality, - ); - } - - late final _dpm_password_set_qualityPtr = _lookup< - ffi - .NativeFunction>( - 'dpm_password_set_quality'); - late final _dpm_password_set_quality = _dpm_password_set_qualityPtr - .asFunction(); - - /// @partner - /// @brief Gets password quality. - /// @details An administrator can get the password restrictions it is imposing. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[out] quality Password quality type, values of #dpm_password_quality_e combined with bitwise 'or' - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_get_quality( - device_policy_manager_h handle, - ffi.Pointer quality, - ) { - return _dpm_password_get_quality( - handle, - quality, - ); - } - - late final _dpm_password_get_qualityPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_password_get_quality'); - late final _dpm_password_get_quality = - _dpm_password_get_qualityPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Sets password minimum length. - /// @details Sets the minimum allowed password length. After setting this, - /// the user will not be able to enter a new password that is - /// shorter than the setting length. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[in] value Allowed minimum password length - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_set_minimum_length( - device_policy_manager_h handle, - int value, - ) { - return _dpm_password_set_minimum_length( - handle, - value, - ); - } - - late final _dpm_password_set_minimum_lengthPtr = _lookup< - ffi - .NativeFunction>( - 'dpm_password_set_minimum_length'); - late final _dpm_password_set_minimum_length = - _dpm_password_set_minimum_lengthPtr - .asFunction(); - - /// @partner - /// @brief Gets password minimum length. - /// @details Gets the minimum allowed password length. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[out] value Allowed minimum password length - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_get_minimum_length( - device_policy_manager_h handle, - ffi.Pointer value, - ) { - return _dpm_password_get_minimum_length( - handle, - value, - ); - } - - late final _dpm_password_get_minimum_lengthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_password_get_minimum_length'); - late final _dpm_password_get_minimum_length = - _dpm_password_get_minimum_lengthPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Sets minimum complex char in password. - /// @details Complex characters are all non-alphabetic characters; - /// that is, numbers and symbols. Admin can configure this - /// setting and make the password more secure. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[in] value Number of minimum complex char in password. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_set_min_complex_chars( - device_policy_manager_h handle, - int value, - ) { - return _dpm_password_set_min_complex_chars( - handle, - value, - ); - } - - late final _dpm_password_set_min_complex_charsPtr = _lookup< - ffi - .NativeFunction>( - 'dpm_password_set_min_complex_chars'); - late final _dpm_password_set_min_complex_chars = - _dpm_password_set_min_complex_charsPtr - .asFunction(); - - /// @partner - /// @brief Gets minimum complex char in password. - /// @details Complex characters are all non-alphabetic characters; - /// that is, numbers and symbols. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[out] value Number of minimum complex char in password. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_get_min_complex_chars( - device_policy_manager_h handle, - ffi.Pointer value, - ) { - return _dpm_password_get_min_complex_chars( - handle, - value, - ); - } - - late final _dpm_password_get_min_complex_charsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_password_get_min_complex_chars'); - late final _dpm_password_get_min_complex_chars = - _dpm_password_get_min_complex_charsPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Sets maximum number of failed attempts before device is wiped. - /// @details If user fails the last attempt, device will be wiped. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[in] value Maximum count for failed passwords. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_set_maximum_failed_attempts_for_wipe( - device_policy_manager_h handle, - int value, - ) { - return _dpm_password_set_maximum_failed_attempts_for_wipe( - handle, - value, - ); - } - - late final _dpm_password_set_maximum_failed_attempts_for_wipePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_password_set_maximum_failed_attempts_for_wipe'); - late final _dpm_password_set_maximum_failed_attempts_for_wipe = - _dpm_password_set_maximum_failed_attempts_for_wipePtr - .asFunction(); - - /// @partner - /// @brief Gets maximum number of failed attempts before device is wiped. - /// @details If user fails the last attempt, device will be wiped. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[out] value Maximum count for failed passwords. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_get_maximum_failed_attempts_for_wipe( - device_policy_manager_h handle, - ffi.Pointer value, - ) { - return _dpm_password_get_maximum_failed_attempts_for_wipe( - handle, - value, - ); - } - - late final _dpm_password_get_maximum_failed_attempts_for_wipePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer)>>( - 'dpm_password_get_maximum_failed_attempts_for_wipe'); - late final _dpm_password_get_maximum_failed_attempts_for_wipe = - _dpm_password_get_maximum_failed_attempts_for_wipePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Sets the number of days password expires. - /// @details An administrator can configure the password age to force - /// the user to enter a new password after every expiration period. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[in] value Number of days after which the password expires. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_set_expires( - device_policy_manager_h handle, - int value, - ) { - return _dpm_password_set_expires( - handle, - value, - ); - } - - late final _dpm_password_set_expiresPtr = _lookup< - ffi - .NativeFunction>( - 'dpm_password_set_expires'); - late final _dpm_password_set_expires = _dpm_password_set_expiresPtr - .asFunction(); - - /// @partner - /// @brief Gets the number of days password expires. - /// @details An administrator can get the password age to force - /// the user to enter a new password after every expiration period. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[out] value Number of days after which the password expires. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_get_expires( - device_policy_manager_h handle, - ffi.Pointer value, - ) { - return _dpm_password_get_expires( - handle, - value, - ); - } - - late final _dpm_password_get_expiresPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_password_get_expires'); - late final _dpm_password_get_expires = - _dpm_password_get_expiresPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Sets the number of min password history to avoid previous password. - /// @details An administrator can configure the number of previous - /// passwords which cannot be used when entering a new password. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[in] value Number of previous passwords which cannot be used when - /// settings a new password. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_set_history( - device_policy_manager_h handle, - int value, - ) { - return _dpm_password_set_history( - handle, - value, - ); - } - - late final _dpm_password_set_historyPtr = _lookup< - ffi - .NativeFunction>( - 'dpm_password_set_history'); - late final _dpm_password_set_history = _dpm_password_set_historyPtr - .asFunction(); - - /// @partner - /// @brief Gets the number of min password history to avoid previous password. - /// @details An administrator can get the number of previous - /// passwords which cannot be used when entering a new password. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[out] value Number of previous passwords which cannot be used when - /// settings a new password. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_get_history( - device_policy_manager_h handle, - ffi.Pointer value, - ) { - return _dpm_password_get_history( - handle, - value, - ); - } - - late final _dpm_password_get_historyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_password_get_history'); - late final _dpm_password_get_history = - _dpm_password_get_historyPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Sets the required password pattern. - /// @details An administrator can force User to enter password based on - /// a regular expression. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[in] pattern Password pattern. If regular expression is - /// [a-zA-Z]{4}[0-9]{4}, we can force user to enter a 8 character - /// password with first 4 alphabetic characters and next 4 - /// numeric characters. An administrator must take care when - /// setting this pattern. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_set_pattern( - device_policy_manager_h handle, - ffi.Pointer pattern, - ) { - return _dpm_password_set_pattern( - handle, - pattern, - ); - } - - late final _dpm_password_set_patternPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_password_set_pattern'); - late final _dpm_password_set_pattern = - _dpm_password_set_patternPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Resets password. - /// @details This takes effect immediately to the device password. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[in] password New password - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_reset( - device_policy_manager_h handle, - ffi.Pointer password, - ) { - return _dpm_password_reset( - handle, - password, - ); - } - - late final _dpm_password_resetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_password_reset'); - late final _dpm_password_reset = _dpm_password_resetPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Enforces password change. - /// @details An administrator can enforce password change. PasswordPolicy - /// change setting is launched. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_enforce_change( - device_policy_manager_h handle, - ) { - return _dpm_password_enforce_change( - handle, - ); - } - - late final _dpm_password_enforce_changePtr = - _lookup>( - 'dpm_password_enforce_change'); - late final _dpm_password_enforce_change = _dpm_password_enforce_changePtr - .asFunction(); - - /// @partner - /// @brief Sets the maximum number of seconds of inactivity time - /// before the screen timeout occurs. - /// @details An administrator sets the maximum number of seconds of inactivity - /// time before the screen timeout occurs and a device user must - /// type the password to unlock the device. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[in] value Maximum inactivity time for device lock. Specifies how soon - /// the device can be unlocked again after use, without reprompting for - /// the passcode. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_set_max_inactivity_time_device_lock( - device_policy_manager_h handle, - int value, - ) { - return _dpm_password_set_max_inactivity_time_device_lock( - handle, - value, - ); - } - - late final _dpm_password_set_max_inactivity_time_device_lockPtr = _lookup< - ffi - .NativeFunction>( - 'dpm_password_set_max_inactivity_time_device_lock'); - late final _dpm_password_set_max_inactivity_time_device_lock = - _dpm_password_set_max_inactivity_time_device_lockPtr - .asFunction(); - - /// @partner - /// @brief Gets the maximum number of seconds of inactivity time - /// before the screen timeout occurs. - /// @details Called by an application that is managing the device to get - /// the value of timeout period. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[out] value Pointer of Maximum inactivity time for device lock. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_get_max_inactivity_time_device_lock( - device_policy_manager_h handle, - ffi.Pointer value, - ) { - return _dpm_password_get_max_inactivity_time_device_lock( - handle, - value, - ); - } - - late final _dpm_password_get_max_inactivity_time_device_lockPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer)>>( - 'dpm_password_get_max_inactivity_time_device_lock'); - late final _dpm_password_get_max_inactivity_time_device_lock = - _dpm_password_get_max_inactivity_time_device_lockPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Sets password status - /// @details An administrator can know password status for this API. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[in] status Password status - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_set_status( - device_policy_manager_h handle, - int status, - ) { - return _dpm_password_set_status( - handle, - status, - ); - } - - late final _dpm_password_set_statusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - device_policy_manager_h, ffi.Int32)>>('dpm_password_set_status'); - late final _dpm_password_set_status = _dpm_password_set_statusPtr - .asFunction(); - - /// @partner - /// @brief Gets password status - /// @details An administrator can know password status for this API. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] status Password status - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_get_status( - device_policy_manager_h handle, - ffi.Pointer status, - ) { - return _dpm_password_get_status( - handle, - status, - ); - } - - late final _dpm_password_get_statusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_password_get_status'); - late final _dpm_password_get_status = _dpm_password_get_statusPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Removes all password patterns. - /// @details An administrator can remove all password patterns. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_delete_pattern( - device_policy_manager_h handle, - ) { - return _dpm_password_delete_pattern( - handle, - ); - } - - late final _dpm_password_delete_patternPtr = - _lookup>( - 'dpm_password_delete_pattern'); - late final _dpm_password_delete_pattern = _dpm_password_delete_patternPtr - .asFunction(); - - /// @partner - /// @brief Gets password pattern. - /// @details This API can be used for applying complexity on new password value. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @remarks The @a pattern should be freed using free(). - /// @param[in] handle Device policy manager handle - /// @param[out] pattern Password pattern - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_get_pattern( - device_policy_manager_h handle, - ffi.Pointer> pattern, - ) { - return _dpm_password_get_pattern( - handle, - pattern, - ); - } - - late final _dpm_password_get_patternPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer>)>>('dpm_password_get_pattern'); - late final _dpm_password_get_pattern = - _dpm_password_get_patternPtr.asFunction< - int Function( - device_policy_manager_h, ffi.Pointer>)>(); - - /// @partner - /// @brief Sets the maximum number of times a character can occur in - /// the device password. - /// @details Called by an admin that is managing the device to specify that - /// any character in the device password cannot occur more than - /// the specified maximum number of times. Characters can be numeric - /// or alphabetic or symbolic. "aaabcde" has 'a' which occurs 3 times, - /// "1b1c1de" has '1' which occurs 3 times and "a@b@c@" has '@' which - /// occurs 3 times. A value of '0' specifies that no restrictions are - /// applied. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[in] value Maximum character occurrences - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_set_maximum_character_occurrences( - device_policy_manager_h handle, - int value, - ) { - return _dpm_password_set_maximum_character_occurrences( - handle, - value, - ); - } - - late final _dpm_password_set_maximum_character_occurrencesPtr = _lookup< - ffi - .NativeFunction>( - 'dpm_password_set_maximum_character_occurrences'); - late final _dpm_password_set_maximum_character_occurrences = - _dpm_password_set_maximum_character_occurrencesPtr - .asFunction(); - - /// @partner - /// @brief Gets the maximum number of times a character can occur in - /// the device password. - /// @details An administrator can retrieve the maximum number of times - /// a character can occur in the device password. If more than - /// one admin has set this value then the least value will take - /// preference. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[out] value Pointer of Maximum Character Occurrences - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_get_maximum_character_occurrences( - device_policy_manager_h handle, - ffi.Pointer value, - ) { - return _dpm_password_get_maximum_character_occurrences( - handle, - value, - ); - } - - late final _dpm_password_get_maximum_character_occurrencesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer)>>( - 'dpm_password_get_maximum_character_occurrences'); - late final _dpm_password_get_maximum_character_occurrences = - _dpm_password_get_maximum_character_occurrencesPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Sets the maximum length of the numeric sequence - /// which is allowed in the device password. - /// @details Called by an administrator that is managing the device to set - /// the maximum numeric sequence length. This specifies that - /// the device password must not contain numeric sequences greater - /// than the given length. - /// Numeric sequences can be increasing successively by one like - /// "12345", or decreasing successively by one like "98765", or - /// repeating like "55555". - /// These are all numeric sequences of length '5'. - /// If maximum value is set to '5' then "123456" or "987654" or - /// "555555" are not allowed. - /// A value of '0' specifies that no such numeric sequence - /// restrictions are applied. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[in] value Maximum numeric sequence length - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_set_maximum_numeric_sequence_length( - device_policy_manager_h handle, - int value, - ) { - return _dpm_password_set_maximum_numeric_sequence_length( - handle, - value, - ); - } - - late final _dpm_password_set_maximum_numeric_sequence_lengthPtr = _lookup< - ffi - .NativeFunction>( - 'dpm_password_set_maximum_numeric_sequence_length'); - late final _dpm_password_set_maximum_numeric_sequence_length = - _dpm_password_set_maximum_numeric_sequence_lengthPtr - .asFunction(); - - /// @partner - /// @brief Gets the maximum numeric sequence length allowed in - /// the device password. - /// @details An administrator can retrieve the length of numeric sequences - /// which are allowed in the device password. - /// For instance, if the return value is '3' then "123", "987", - /// "555" would all be numeric sequences of length '3' and will be - /// allowed in the device password. - /// If more than one admin has set this value then the least value - /// will take preference. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[out] value Pointer of maximum numeric sequence length - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_get_maximum_numeric_sequence_length( - device_policy_manager_h handle, - ffi.Pointer value, - ) { - return _dpm_password_get_maximum_numeric_sequence_length( - handle, - value, - ); - } - - late final _dpm_password_get_maximum_numeric_sequence_lengthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer)>>( - 'dpm_password_get_maximum_numeric_sequence_length'); - late final _dpm_password_get_maximum_numeric_sequence_length = - _dpm_password_get_maximum_numeric_sequence_lengthPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Creates a password forbidden string list iterator. - /// @details The password forbidden string list iterator can be used to get all forbidden strings. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @return A password forbidden string list iterator on success, otherwise - /// null value - /// @remarks The specific error code can be obtained by using the - /// get_last_result() method. Error codes are described in - /// exception section. - /// The returned iterator should be released using dpm_password_destroy_iterator(). - /// @exception #DPM_ERROR_NONE No error - /// @exception #DPM_ERROR_OUT_OF_MEMORY Out of memory - /// @exception #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #DPM_ERROR_TIMED_OUT Time out - /// @exception #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_password_iterator_next() - /// @see dpm_password_destroy_iterator() - /// @see get_last_result() - dpm_password_iterator_h dpm_password_create_iterator( - device_policy_manager_h handle, - ) { - return _dpm_password_create_iterator( - handle, - ); - } - - late final _dpm_password_create_iteratorPtr = _lookup< - ffi.NativeFunction< - dpm_password_iterator_h Function( - device_policy_manager_h)>>('dpm_password_create_iterator'); - late final _dpm_password_create_iterator = _dpm_password_create_iteratorPtr - .asFunction(); - - /// @partner - /// @brief Fetches a password forbidden string and forwards the iterator. - /// @details This API returns a password forbidden string indicated by the iterator, and then - /// the iterator is moved to the next position. If the iterator reaches - /// the end of the list, null value will be returned. - /// @since_tizen 3.0 - /// @param[in] iter The iterator to be controlled - /// @param[out] forbidden_string The forbidden string got from the iterator - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @remarks The @a forbidden_string should not be freed using free(). - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @pre The iter must be created by dpm_password_create_iterator(). - /// @see dpm_passsword_create_iterator() - /// @see dpm_password_destroy_iterator() - int dpm_password_iterator_next( - dpm_password_iterator_h iter, - ffi.Pointer> forbidden_string, - ) { - return _dpm_password_iterator_next( - iter, - forbidden_string, - ); - } - - late final _dpm_password_iterator_nextPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(dpm_password_iterator_h, - ffi.Pointer>)>>( - 'dpm_password_iterator_next'); - late final _dpm_password_iterator_next = - _dpm_password_iterator_nextPtr.asFunction< - int Function( - dpm_password_iterator_h, ffi.Pointer>)>(); - - /// @partner - /// @brief Frees the password forbidden string iterator. - /// @details This API frees the password forbidden string iterator. This API must be called - /// if the iterator no longer used. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] iter The iterator to be removed - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The iter must be created by dpm_password_create_iterator() - /// @see dpm_password_create_iterator() - /// @see dpm_password_iterator_next() - int dpm_password_destroy_iterator( - dpm_password_iterator_h iter, - ) { - return _dpm_password_destroy_iterator( - iter, - ); - } - - late final _dpm_password_destroy_iteratorPtr = - _lookup>( - 'dpm_password_destroy_iterator'); - late final _dpm_password_destroy_iterator = _dpm_password_destroy_iteratorPtr - .asFunction(); - - /// @partner - /// @brief Sets strings which are forbidden in the device password. - /// @details Called by an admin that is managing the device to set strings that are forbidden to be used in the device password. - /// This specifies any strings which must not be present in the device password such as personal data (variations on the user's name, email address or X400 address), or any other strings. - /// If the parameter list has only one blank string(""), then the stored strings are cleared. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[in] strings The forbidden strings - /// @param[in] length The length of the strings - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_set_forbidden_strings( - device_policy_manager_h handle, - ffi.Pointer> strings, - int length, - ) { - return _dpm_password_set_forbidden_strings( - handle, - strings, - length, - ); - } - - late final _dpm_password_set_forbidden_stringsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - device_policy_manager_h, - ffi.Pointer>, - ffi.Int)>>('dpm_password_set_forbidden_strings'); - late final _dpm_password_set_forbidden_strings = - _dpm_password_set_forbidden_stringsPtr.asFunction< - int Function(device_policy_manager_h, - ffi.Pointer>, int)>(); - - /// @partner - /// @brief Allows or disallows the use of camera. - /// @details An administrator can use this API to set whether the use of camera - /// is allowed or not. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.camera - /// @param[in] handle Device policy manager handle - /// @param[in] allow If true, allow the use of camera, if false, disallow the use of camera - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_get_camera_state() - int dpm_restriction_set_camera_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_camera_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_camera_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_camera_state'); - late final _dpm_restriction_set_camera_state = - _dpm_restriction_set_camera_statePtr - .asFunction(); - - /// @brief Check whether the use of camera is allowed or not. - /// @details An administrator can use this API to check whether the use of camera - /// is allowed or not. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the use of camera is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_set_camera_state() - int dpm_restriction_get_camera_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_camera_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_camera_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_restriction_get_camera_state'); - late final _dpm_restriction_get_camera_state = - _dpm_restriction_get_camera_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows the use of microphone. - /// @details An administrator can use this API to set whether the use of microphone - /// is allowed or not. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.microphone - /// @param[in] handle Device policy manager handle - /// @param[in] allow If true, allow the use of microphone, - /// if false, disallow the use of microphone - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_get_microphone_state() - int dpm_restriction_set_microphone_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_microphone_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_microphone_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_microphone_state'); - late final _dpm_restriction_set_microphone_state = - _dpm_restriction_set_microphone_statePtr - .asFunction(); - - /// @brief Checks whether the use of microphone is allowed or not. - /// @details An administrator can use this API to check whether the use of microphone - /// is allowed of not. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the use of microphone is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_set_microphone_state() - int dpm_restriction_get_microphone_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_microphone_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_microphone_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_restriction_get_microphone_state'); - late final _dpm_restriction_get_microphone_state = - _dpm_restriction_get_microphone_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows user to change the location state. - /// @details An administrator can use this API to allow or disallow user to change - /// the location state. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.location - /// @param[in] handle Device policy manager handle - /// @param[in] allow If true, allow user to change the location state, if false, disallow - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_get_location_state() - int dpm_restriction_set_location_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_location_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_location_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_location_state'); - late final _dpm_restriction_set_location_state = - _dpm_restriction_set_location_statePtr - .asFunction(); - - /// @brief Check whether user is allowed to change location state or not. - /// @details An administrator can use this API to check whether user is allowed to change - /// the location state or not. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the location state change is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_set_location_state() - int dpm_restriction_get_location_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_location_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_location_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_restriction_get_location_state'); - late final _dpm_restriction_get_location_state = - _dpm_restriction_get_location_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows user to use usb mass storage. - /// @details An administrator can use this API to set whether the usb mass - /// storage is allowed or not. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.storage - /// @param[in] handle Device policy manager handle - /// @param[in] allow If true, allow user to use the external storages, if false, disallow - /// the external storage - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_storage_get_external_storage_state() - int dpm_restriction_set_external_storage_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_external_storage_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_external_storage_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_external_storage_state'); - late final _dpm_restriction_set_external_storage_state = - _dpm_restriction_set_external_storage_statePtr - .asFunction(); - - /// @brief Checks whether the use of external storage is allowed or not. - /// @details An administrator can use this API to check whether the use of external storage is - /// allowed or not. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the use of external storage is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_storage_set_external_storage_state() - int dpm_restriction_get_external_storage_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_external_storage_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_external_storage_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer)>>( - 'dpm_restriction_get_external_storage_state'); - late final _dpm_restriction_get_external_storage_state = - _dpm_restriction_get_external_storage_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows user to access the clipboard. - /// @details An administrator can use this API to set whether the clipboard access. - /// is allowed or not - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.clipboard - /// @param[in] handle Device policy manager handle - /// @param[in] allow If true, allow the clipboard access, if false, disallow the clipboard access. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_get_clipboard_state() - int dpm_restriction_set_clipboard_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_clipboard_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_clipboard_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_clipboard_state'); - late final _dpm_restriction_set_clipboard_state = - _dpm_restriction_set_clipboard_statePtr - .asFunction(); - - /// @brief Checks whether the clipboard access is allowed or not. - /// @details An administrator can use this API to check whether the clipboard access - /// is allowed or not. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the access is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_set_clipboard_state() - int dpm_restriction_get_clipboard_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_clipboard_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_clipboard_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_restriction_get_clipboard_state'); - late final _dpm_restriction_get_clipboard_state = - _dpm_restriction_get_clipboard_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows the usb debugging. - /// @details An administrator can use this API to set whether the usb debugging - /// is allowed or not. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.debugging - /// @param[in] handle Device policy manager handle - /// @param[in] allow If true, allow the usb debugging, if false, disallow the usb - /// debugging - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_get_usb_debugging_state() - int dpm_restriction_set_usb_debugging_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_usb_debugging_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_usb_debugging_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_usb_debugging_state'); - late final _dpm_restriction_set_usb_debugging_state = - _dpm_restriction_set_usb_debugging_statePtr - .asFunction(); - - /// @brief Checks whether the usb debugging is allowed or not. - /// @details An administrator can use this API to check whether the usb debugging - /// is allowed or not. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the usb debugging is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_set_usb_debugging_state() - int dpm_restriction_get_usb_debugging_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_usb_debugging_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_usb_debugging_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer)>>( - 'dpm_restriction_get_usb_debugging_state'); - late final _dpm_restriction_get_usb_debugging_state = - _dpm_restriction_get_usb_debugging_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows user to change the Wi-Fi state. - /// @details An administrator can use this API to allow or disallow user to - /// change the Wi-Fi state. If it is disallowed, user does not have UI - /// access to change the state. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.wifi - /// @param[in] handle Device policy manager handle - /// @param[in] allow If true, allow user to change Wi-Fi state, - /// if false, disallow user to change Wi-Fi state. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_get_wifi_state() - int dpm_restriction_set_wifi_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_wifi_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_wifi_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_wifi_state'); - late final _dpm_restriction_set_wifi_state = - _dpm_restriction_set_wifi_statePtr - .asFunction(); - - /// @brief Checks whether the Wi-Fi state change is allowed or not. - /// @details An administrator can use this API to check whether user is - /// allowed to change Wi-Fi state or not. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the change is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_set_wifi_state() - int dpm_restriction_get_wifi_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_wifi_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_wifi_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_restriction_get_wifi_state'); - late final _dpm_restriction_get_wifi_state = - _dpm_restriction_get_wifi_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows user to change Wi-Fi hotspot state change. - /// @details An administrator can use this API to allow or disallow user to change Wi-Fi - /// hotspot state. When it is disallowed, the UI is grayed out so user cannot - /// change Wi-Fi hotspot state. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.wifi - /// @param[in] handle Device policy manager handle - /// @param[in] allow If true, allow user to change Wi-Fi hostspot state, - /// if false, disallow user to change Wi-Fi hotspot state. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_get_wifi_hotspot_state() - int dpm_restriction_set_wifi_hotspot_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_wifi_hotspot_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_wifi_hotspot_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_wifi_hotspot_state'); - late final _dpm_restriction_set_wifi_hotspot_state = - _dpm_restriction_set_wifi_hotspot_statePtr - .asFunction(); - - /// @brief Checks whether the the Wi-Fi hotspot state change is allowed or not. - /// @details An administrator can use this API to check whether user is allowed to change - /// Wi-Fi hotspot state or not. - /// If the Wi-Fi hotspot state change is disallowed, the UI is grayed out so user can not - /// change its state. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the state change is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_set_wifi_hotspot_state() - int dpm_restriction_get_wifi_hotspot_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_wifi_hotspot_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_wifi_hotspot_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_restriction_get_wifi_hotspot_state'); - late final _dpm_restriction_get_wifi_hotspot_state = - _dpm_restriction_get_wifi_hotspot_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows user to change the bluetooth tethering state. - /// @details An administrator can use this API to allow of disallow user - /// to chanage the bluetooth tethering state. - /// When disallowed, the UI is grayed out so user cannot change the state. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.bluetooth - /// @param[in] handle Device policy manager handle - /// @param[in] allow If true, allow user to change the bluetooth tethering state, - /// if false, disallow user to change the bluetooth tethering state. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_get_bluetooth_tethering_state() - int dpm_restriction_set_bluetooth_tethering_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_bluetooth_tethering_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_bluetooth_tethering_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_bluetooth_tethering_state'); - late final _dpm_restriction_set_bluetooth_tethering_state = - _dpm_restriction_set_bluetooth_tethering_statePtr - .asFunction(); - - /// @brief Checks whether the bluetooth tethering state change is allowed. - /// @details An administrator can use this API to check whether user is allowed - /// to change bluetooth tethering state. - /// is allowed or not. - /// If the bluetooth tethering state change is disallowed, the UI is grayed out - /// so user can not change its state. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the change is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_set_bluetooth_tethering_state() - int dpm_restriction_get_bluetooth_tethering_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_bluetooth_tethering_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_bluetooth_tethering_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer)>>( - 'dpm_restriction_get_bluetooth_tethering_state'); - late final _dpm_restriction_get_bluetooth_tethering_state = - _dpm_restriction_get_bluetooth_tethering_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows user to change USB tethering settings. - /// @details An administrator can use this API to allow or disallow user - /// to change USB tethering settings. - /// When disallowed, the UI is grayed out so user cannot change the state. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.usb - /// @param[in] handle Device policy manager handle - /// @param[in] allow If true, allow USB tethering state change, - /// if false, disallow USB tethering state change. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_get_usb_tethering_state() - int dpm_restriction_set_usb_tethering_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_usb_tethering_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_usb_tethering_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_usb_tethering_state'); - late final _dpm_restriction_set_usb_tethering_state = - _dpm_restriction_set_usb_tethering_statePtr - .asFunction(); - - /// @brief Checks whether the USB tethering state change is allowed. - /// @details An administrator can use this API to check whether the USB tethering state change - /// is allowed or not. - /// If the USB tethering state change is disallowed, the UI is grayed out - /// so user can not change its state. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the change is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_set_usb_tethering_state() - int dpm_restriction_get_usb_tethering_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_usb_tethering_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_usb_tethering_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer)>>( - 'dpm_restriction_get_usb_tethering_state'); - late final _dpm_restriction_get_usb_tethering_state = - _dpm_restriction_get_usb_tethering_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows user to change the bluetooth state. - /// @details An administrator can use this API to allow or disallow user - /// to change the bluetooth state. - /// When disallowed, the UI is grayed out so user cannot change the state. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.bluetooth - /// @param[in] handle Device policy manager handle - /// @param[in] allow If true, allow user to change bluetooth state, - /// if false, disallow user to change bluetooth state. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_get_bluetooth_mode_change_state() - int dpm_restriction_set_bluetooth_mode_change_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_bluetooth_mode_change_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_bluetooth_mode_change_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_bluetooth_mode_change_state'); - late final _dpm_restriction_set_bluetooth_mode_change_state = - _dpm_restriction_set_bluetooth_mode_change_statePtr - .asFunction(); - - /// @brief Checks whether the the bluetooth state change is allowed of not. - /// @details An administrator can use this API to check whether the bluetooth state change - /// is allowed or not. - /// If the bluetooth state change is disallowed, the UI is grayed out - /// so user can not change its state. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the change is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_set_bluetooth_mode_change_state() - int dpm_restriction_get_bluetooth_mode_change_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_bluetooth_mode_change_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_bluetooth_mode_change_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer)>>( - 'dpm_restriction_get_bluetooth_mode_change_state'); - late final _dpm_restriction_get_bluetooth_mode_change_state = - _dpm_restriction_get_bluetooth_mode_change_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows the bluetooth desktop connectivity. - /// @details An administrator can use this API to allow or disallow the bluetooth - /// desktop connectivity. - /// If the bluetooth desktop connectivity is disallowed, the UI is grayed out - /// so user can not - /// change its state. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.bluetooth - /// @param[in] handle Device policy manager handle - /// @param[out] allow If true, allow the bluetooth desktop connectivity, - /// if false, disallow the bluetooth desktop connectivitiy - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_get_bluetooth_desktop_connectivity_state() - int dpm_restriction_set_bluetooth_desktop_connectivity_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_bluetooth_desktop_connectivity_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_bluetooth_desktop_connectivity_statePtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Int)>>( - 'dpm_restriction_set_bluetooth_desktop_connectivity_state'); - late final _dpm_restriction_set_bluetooth_desktop_connectivity_state = - _dpm_restriction_set_bluetooth_desktop_connectivity_statePtr - .asFunction(); - - /// @brief Checks whether the the Bluetooth desktop connectivity is allowed or not. - /// @details An administrator can use this API to check whether the Bluetooth desktop - /// connectivity is allowed or not. - /// If the Bluetooth desktop connectivity is disallowed, the UI is grayed out - /// so user can not change its state. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the connectivity is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_set_bluetooth_desktop_connectivity_state() - int dpm_restriction_get_bluetooth_desktop_connectivity_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_bluetooth_desktop_connectivity_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_bluetooth_desktop_connectivity_statePtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - device_policy_manager_h, ffi.Pointer)>>( - 'dpm_restriction_get_bluetooth_desktop_connectivity_state'); - late final _dpm_restriction_get_bluetooth_desktop_connectivity_state = - _dpm_restriction_get_bluetooth_desktop_connectivity_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows user to change the bluetooth pairing. - /// @details An administrator can use this API to allow or disallow the bluetooth pairing. - /// If the bluetooth pairing is disallowed, the UI is grayed out - /// so user can not change its state. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.bluetooth - /// @param[in] handle Device policy manager handle - /// @param[out] allow If true, allow the bluetooth pairing, if false, disallow the bluetooth pairing. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_get_bluetooth_pairing_state() - int dpm_restriction_set_bluetooth_pairing_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_bluetooth_pairing_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_bluetooth_pairing_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_bluetooth_pairing_state'); - late final _dpm_restriction_set_bluetooth_pairing_state = - _dpm_restriction_set_bluetooth_pairing_statePtr - .asFunction(); - - /// @brief Checks whether the the bluetooth pairing is allowed or not. - /// @details An administrator can use this API to check whether the bluetooth - /// pairing is allowed or not. - /// If the bluetooth pairing is disallowed, the UI is grayed out - /// so user can not change its state. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the pairing is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_set_bluetooth_pairing_state() - int dpm_restriction_get_bluetooth_pairing_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_bluetooth_pairing_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_bluetooth_pairing_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer)>>( - 'dpm_restriction_get_bluetooth_pairing_state'); - late final _dpm_restriction_get_bluetooth_pairing_state = - _dpm_restriction_get_bluetooth_pairing_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows user to use of SMS or text messaging. - /// @details An administrator can disable the text messaging capability - /// without any user interaction - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.message - /// @param[in] handle Device policy manager handle - /// @param[in] sim_id SIM identifier - /// @param[in] allow If true, allow the use of SMS or text messaging, - /// if false, disallow the use of SMS or text messaging. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_restriction_get_messaging_state() - int dpm_restriction_set_messaging_state( - device_policy_manager_h handle, - ffi.Pointer sim_id, - int allow, - ) { - return _dpm_restriction_set_messaging_state( - handle, - sim_id, - allow, - ); - } - - late final _dpm_restriction_set_messaging_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer, - ffi.Int)>>('dpm_restriction_set_messaging_state'); - late final _dpm_restriction_set_messaging_state = - _dpm_restriction_set_messaging_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer, int)>(); - - /// @brief Checks whether the text messaging is allowed or not. - /// @details An administrator can use this API to check whether text messaging capability - /// is enabled or not. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[in] sim_id SIM identifier - /// @param[out] is_allowed true if the messaging is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_restriction_set_messaging_state() - int dpm_restriction_get_messaging_state( - device_policy_manager_h handle, - ffi.Pointer sim_id, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_messaging_state( - handle, - sim_id, - is_allowed, - ); - } - - late final _dpm_restriction_get_messaging_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer, - ffi.Pointer)>>('dpm_restriction_get_messaging_state'); - late final _dpm_restriction_get_messaging_state = - _dpm_restriction_get_messaging_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows the access to POP or IMAP email. - /// @details An administrator can disable the email capability without any user interaction - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.email - /// @param[in] handle Device policy manager handle - /// @param[in] allow If ture, allow POP or IMAP email, if false, disallow POP or IMAP email. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_restriction_get_popimap_email_state() - int dpm_restriction_set_popimap_email_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_popimap_email_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_popimap_email_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_popimap_email_state'); - late final _dpm_restriction_set_popimap_email_state = - _dpm_restriction_set_popimap_email_statePtr - .asFunction(); - - /// @brief Checks whether the access to POP or IMAP email is allowed or not. - /// @details An administrator can use this API to check the access to POP or IMAP email - /// is allowed or not. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the POP or IMAP email is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_restriction_set_popimap_email_state() - int dpm_restriction_get_popimap_email_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_popimap_email_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_popimap_email_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer)>>( - 'dpm_restriction_get_popimap_email_state'); - late final _dpm_restriction_get_popimap_email_state = - _dpm_restriction_get_popimap_email_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows the use of web browser. - /// @details An administrator can allows or disallow the use of web browser without - /// any user interaction - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.browser - /// @param[in] handle Device policy manager handle - /// @param[in] allow If true, allow the use of web browser, - /// if false, disallow the use of web browser. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_restriction_get_browser_state() - int dpm_restriction_set_browser_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_browser_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_browser_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_browser_state'); - late final _dpm_restriction_set_browser_state = - _dpm_restriction_set_browser_statePtr - .asFunction(); - - /// @brief Checks whether the use of web browser is allowed or not. - /// @details An administrator can use this API to check whether the use of web browser - /// is allowed or not. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the use of web browser is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_restriction_set_browser_state() - int dpm_restriction_get_browser_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_browser_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_browser_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_restriction_get_browser_state'); - late final _dpm_restriction_get_browser_state = - _dpm_restriction_get_browser_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - int dpm_restriction_set_usb_client_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_usb_client_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_usb_client_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_usb_client_state'); - late final _dpm_restriction_set_usb_client_state = - _dpm_restriction_set_usb_client_statePtr - .asFunction(); - - int dpm_restriction_get_usb_client_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_usb_client_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_usb_client_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_restriction_get_usb_client_state'); - late final _dpm_restriction_get_usb_client_state = - _dpm_restriction_get_usb_client_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Locks device screen immediately. - /// @details An administrator can use this API to lock the device screen - /// immediately - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.lock - /// @param[in] handle Device policy manager handle - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_security_lockout_screen( - device_policy_manager_h handle, - ) { - return _dpm_security_lockout_screen( - handle, - ); - } - - late final _dpm_security_lockout_screenPtr = - _lookup>( - 'dpm_security_lockout_screen'); - late final _dpm_security_lockout_screen = _dpm_security_lockout_screenPtr - .asFunction(); - - /// @partner - /// @brief Encrypts or decrypts internal storage. - /// @details An administrator can use this API to enable full device - /// encryption, which includes device memory and internal SD card. - /// Before calling this API, administrator must ensure that - /// the device password is set to alphanumeric quality. - /// The administrator can set an alphanumeric password by using - /// dpm_set_password_quality() API - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.security - /// @param[in] handle Device policy manager handle - /// @param[in] encrypt true if encryption is required, false if decryption is - /// required - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_security_is_internal_storage_encrypted() - int dpm_security_set_internal_storage_encryption( - device_policy_manager_h handle, - int encrypt, - ) { - return _dpm_security_set_internal_storage_encryption( - handle, - encrypt, - ); - } - - late final _dpm_security_set_internal_storage_encryptionPtr = _lookup< - ffi - .NativeFunction>( - 'dpm_security_set_internal_storage_encryption'); - late final _dpm_security_set_internal_storage_encryption = - _dpm_security_set_internal_storage_encryptionPtr - .asFunction(); - - /// @brief Checks the internal storage encryption state. - /// @details An administrator can use this API to check whether internal - /// storage encryption is enabled. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_encrypted true if internal storage is encrypted or being encrypted, - /// else false. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_security_set_internal_storage_encryption() - int dpm_security_is_internal_storage_encrypted( - device_policy_manager_h handle, - ffi.Pointer is_encrypted, - ) { - return _dpm_security_is_internal_storage_encrypted( - handle, - is_encrypted, - ); - } - - late final _dpm_security_is_internal_storage_encryptedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer)>>( - 'dpm_security_is_internal_storage_encrypted'); - late final _dpm_security_is_internal_storage_encrypted = - _dpm_security_is_internal_storage_encryptedPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Encrypts or decrypts external storage. - /// @details An administrator can use this API to enable external SD card - /// encryption. Before calling this API, administrator must - /// ensure that the device password is set to alphanumeric quality. - /// The administrator can set an alphanumeric password by using - /// dpm_set_password_quality() API - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.security - /// @param[in] handle Device policy manager handle - /// @param[in] encrypt true if encryption is required, false if decryption is - /// required - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_security_is_external_storage_encryped() - int dpm_security_set_external_storage_encryption( - device_policy_manager_h handle, - int encrypt, - ) { - return _dpm_security_set_external_storage_encryption( - handle, - encrypt, - ); - } - - late final _dpm_security_set_external_storage_encryptionPtr = _lookup< - ffi - .NativeFunction>( - 'dpm_security_set_external_storage_encryption'); - late final _dpm_security_set_external_storage_encryption = - _dpm_security_set_external_storage_encryptionPtr - .asFunction(); - - /// @brief Checks the external storage encryption state. - /// @details An administrator can use this API to check whether external - /// storage encryption is enabled. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_encrypted true if external storage is encrypted or being encrypted, - /// else false - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_security_set_external_storage_encryption() - int dpm_security_is_external_storage_encrypted( - device_policy_manager_h handle, - ffi.Pointer is_encrypted, - ) { - return _dpm_security_is_external_storage_encrypted( - handle, - is_encrypted, - ); - } - - late final _dpm_security_is_external_storage_encryptedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer)>>( - 'dpm_security_is_external_storage_encrypted'); - late final _dpm_security_is_external_storage_encrypted = - _dpm_security_is_external_storage_encryptedPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Wipes external memory, internal memory, or both selectively. - /// @details Device Admin can use this API to wipe both SD card data - /// and application data. - /// Calling this API may require rebooting the device. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.wipe - /// @param[in] handle Device policy manager handle - /// @param[in] type The target storage for wipe - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_security_wipe_data( - device_policy_manager_h handle, - int type, - ) { - return _dpm_security_wipe_data( - handle, - type, - ); - } - - late final _dpm_security_wipe_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - device_policy_manager_h, ffi.Int32)>>('dpm_security_wipe_data'); - late final _dpm_security_wipe_data = _dpm_security_wipe_dataPtr - .asFunction(); - - /// @partner - /// @brief Creates a new zone. - /// @details An administrator can use this API to create a container. Once the container - /// is created, the admin package given to the parameter will be installed inside - /// the container. Then ownership of the container gets transferred to the admin - /// package from the client which triggered the container creation process. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.zone - /// @param[in] handle Device policy manager handle - /// @param[in] name The zone name to be created - /// @param[in] pkgname Admin package container ownership will be transferred - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_zone_destroy() - /// @see dpm_zone_create_iterator() - int dpm_zone_create( - device_policy_manager_h handle, - ffi.Pointer name, - ffi.Pointer pkgname, - ) { - return _dpm_zone_create( - handle, - name, - pkgname, - ); - } - - late final _dpm_zone_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer, - ffi.Pointer)>>('dpm_zone_create'); - late final _dpm_zone_create = _dpm_zone_createPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @partner - /// @brief Removes existing zone. - /// @details Administrator can use this API to remove zone. All file system objects - /// created for the zone will be also erased. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.zone - /// @param[in] handle Device policy manager handle - /// @param[in] name The zone name to be removed - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API or the caller is not the owner - /// of the zone - /// @pre The handle must be created by dpm_manager_create(). - /// @pre The zone corresponding to the given name must be - /// created before use of this API. - /// @see dpm_manager_create() - /// @see dpm_zone_create() - /// @see dpm_zone_create_iterator() - int dpm_zone_destroy( - device_policy_manager_h handle, - ffi.Pointer name, - ) { - return _dpm_zone_destroy( - handle, - name, - ); - } - - late final _dpm_zone_destroyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_zone_destroy'); - late final _dpm_zone_destroy = _dpm_zone_destroyPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @brief Gets the zone state. - /// @details This API can be used to get the state of the zone. The zone can - /// have one of the three states(running, locked). - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[in] name The zone name - /// @param[out] state The zone state - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_NO_DATA No such zone to get state - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_zone_create() - /// @see dpm_zone_destroy() - int dpm_zone_get_state( - device_policy_manager_h handle, - ffi.Pointer name, - ffi.Pointer state, - ) { - return _dpm_zone_get_state( - handle, - name, - state, - ); - } - - late final _dpm_zone_get_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer, - ffi.Pointer)>>('dpm_zone_get_state'); - late final _dpm_zone_get_state = _dpm_zone_get_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Retrieves all the name of created zones - /// @details This API calls dpm_zone_foreach_cb() once for each zone name - /// with traversing the created zones list. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[in] state a combination of the zone state to look - /// @param[in] callback The iteration callback function - /// @param[in] user_data The user data passed to the callback function - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_zone_create() - /// @see dpm_zone_destroy() - int dpm_zone_foreach_name( - device_policy_manager_h handle, - int state, - dpm_zone_foreach_name_cb callback, - ffi.Pointer user_data, - ) { - return _dpm_zone_foreach_name( - handle, - state, - callback, - user_data, - ); - } - - late final _dpm_zone_foreach_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - device_policy_manager_h, - ffi.Int32, - dpm_zone_foreach_name_cb, - ffi.Pointer)>>('dpm_zone_foreach_name'); - late final _dpm_zone_foreach_name = _dpm_zone_foreach_namePtr.asFunction< - int Function(device_policy_manager_h, int, dpm_zone_foreach_name_cb, - ffi.Pointer)>(); - - /// @deprecated Deprecated since 3.0. [Use ckmc_owner_id_separator instead] - /// @brief Separator between alias and label. - /// @since_tizen 2.3 - /// @remarks Alias can be provided as an alias alone, or together with label - in this - /// case, separator " " (space bar) is used to separate label and alias. - /// @see #ckmc_owner_id_separator - late final ffi.Pointer> _ckmc_label_name_separator = - _lookup>('ckmc_label_name_separator'); - - ffi.Pointer get ckmc_label_name_separator => - _ckmc_label_name_separator.value; - - /// @brief Separator between alias and owner id. - /// @since_tizen 3.0 - /// @remarks Alias can be provided as an alias alone, or together with owner id. - /// In this case, separator " " (space bar) is used to separate id and alias. - /// @see ckmc_alias_new() - late final ffi.Pointer> _ckmc_owner_id_separator = - _lookup>('ckmc_owner_id_separator'); - - ffi.Pointer get ckmc_owner_id_separator => - _ckmc_owner_id_separator.value; - - /// @brief The owner of system database. - /// @since_tizen 3.0 - /// @remarks #ckmc_owner_id_system constains id connected with all system applications that run with uid less than 5000. - /// Client should use #ckmc_owner_id_system to access data owned by system application and stored in system database. - /// Client must have permission to access proper row. - /// @see ckmc_alias_new() - late final ffi.Pointer> _ckmc_owner_id_system = - _lookup>('ckmc_owner_id_system'); - - ffi.Pointer get ckmc_owner_id_system => _ckmc_owner_id_system.value; - - /// @brief Creates a new full alias which is a concatenation of @a owner_id and @a alias. - /// @since_tizen 3.0 - /// @remarks @a full_alias should be freed with free() after use. - /// @remarks Returns #CKMC_ERROR_INVALID_PARAMETER if any of parameter is NULL. - /// @remarks Returns #CKMC_ERROR_INVALID_PARAMETER if @a owner_id is empty. - /// @param[in] owner_id Data owner's id. This should be package id if data owner is - /// application. If you want to access data stored by system - /// services, it should be #ckmc_owner_id_system - /// @param[in] alias Data alias - /// @param[out] full_alias The newly created alias which is a concatenation of - /// @a owner_id, #ckmc_owner_id_separator and @a alias. - /// Destroy by free() after use - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_OUT_OF_MEMORY Not enough memory - /// @see #ckmc_owner_id_separator - /// @see #ckmc_owner_id_system - int ckmc_alias_new( - ffi.Pointer owner_id, - ffi.Pointer alias, - ffi.Pointer> full_alias, - ) { - return _ckmc_alias_new( - owner_id, - alias, - full_alias, - ); - } - - late final _ckmc_alias_newPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('ckmc_alias_new'); - late final _ckmc_alias_new = _ckmc_alias_newPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Creates a new #ckmc_key_s handle and returns it. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks You must destroy the newly created #ckmc_key_s by calling ckmc_key_free() if it is no longer needed. - /// @param[in] raw_key The byte array of key \n - /// @a raw_key may be encrypted with password - /// @param[in] key_size The byte size of @a raw_key - /// @param[in] key_type The @a raw_key's type - /// @param[in] password The byte array used to decrypt @a raw_key inside key manager \n - /// If @a raw_key is not encrypted, @a password can be null - /// @param[out] ppkey The pointer to a newly created #ckmc_key_s handle - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_OUT_OF_MEMORY Not enough memory - /// @see ckmc_key_free() - /// @see #ckmc_key_s - int ckmc_key_new( - ffi.Pointer raw_key, - int key_size, - int key_type, - ffi.Pointer password, - ffi.Pointer> ppkey, - ) { - return _ckmc_key_new( - raw_key, - key_size, - key_type, - password, - ppkey, - ); - } - - late final _ckmc_key_newPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Size, - ffi.Int32, - ffi.Pointer, - ffi.Pointer>)>>('ckmc_key_new'); - late final _ckmc_key_new = _ckmc_key_newPtr.asFunction< - int Function(ffi.Pointer, int, int, - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Destroys the #ckmc_key_s handle and releases all its resources. - /// @since_tizen 2.3 - /// @param[in] key The #ckmc_key_s handle to destroy - void ckmc_key_free( - ffi.Pointer key, - ) { - return _ckmc_key_free( - key, - ); - } - - late final _ckmc_key_freePtr = - _lookup)>>( - 'ckmc_key_free'); - late final _ckmc_key_free = - _ckmc_key_freePtr.asFunction)>(); - - /// @brief Creates a new #ckmc_raw_buffer_s handle and returns it. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks You must destroy the newly created #ckmc_raw_buffer_s by calling ckmc_buffer_free() if it is no longer needed. - /// @param[in] data The byte array of buffer - /// @param[in] size The byte size of buffer - /// @param[out] ppbuffer The pointer to a newly created #ckmc_raw_buffer_s handle - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_OUT_OF_MEMORY Not enough memory - /// @see ckmc_buffer_free() - /// @see #ckmc_raw_buffer_s - int ckmc_buffer_new( - ffi.Pointer data, - int size, - ffi.Pointer> ppbuffer, - ) { - return _ckmc_buffer_new( - data, - size, - ppbuffer, - ); - } - - late final _ckmc_buffer_newPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, - ffi.Pointer>)>>('ckmc_buffer_new'); - late final _ckmc_buffer_new = _ckmc_buffer_newPtr.asFunction< - int Function(ffi.Pointer, int, - ffi.Pointer>)>(); - - /// @brief Destroys the #ckmc_raw_buffer_s handle and releases all its resources. - /// @since_tizen 2.3 - /// @param[in] buffer The #ckmc_raw_buffer_s structure to destroy - void ckmc_buffer_free( - ffi.Pointer buffer, - ) { - return _ckmc_buffer_free( - buffer, - ); - } - - late final _ckmc_buffer_freePtr = _lookup< - ffi - .NativeFunction)>>( - 'ckmc_buffer_free'); - late final _ckmc_buffer_free = _ckmc_buffer_freePtr - .asFunction)>(); - - /// @brief Creates a new #ckmc_cert_s handle and returns it. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks You must destroy the newly created #ckmc_cert_s by calling ckmc_cert_free() if it is no longer needed. - /// @param[in] raw_cert The byte array of certificate - /// @param[in] cert_size The byte size of raw_cert - /// @param[in] data_format The encoding format of raw_cert - /// @param[out] ppcert The pointer to a newly created #ckmc_cert_s handle - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_OUT_OF_MEMORY Not enough memory - /// @see ckmc_cert_free() - /// @see ckmc_load_cert_from_file() - /// @see #ckmc_cert_s - int ckmc_cert_new( - ffi.Pointer raw_cert, - int cert_size, - int data_format, - ffi.Pointer> ppcert, - ) { - return _ckmc_cert_new( - raw_cert, - cert_size, - data_format, - ppcert, - ); - } - - late final _ckmc_cert_newPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Int32, - ffi.Pointer>)>>('ckmc_cert_new'); - late final _ckmc_cert_new = _ckmc_cert_newPtr.asFunction< - int Function(ffi.Pointer, int, int, - ffi.Pointer>)>(); - - /// @brief Destroys the #ckmc_cert_s handle and releases all its resources. - /// @since_tizen 2.3 - /// @param[in] cert The #ckmc_cert_s handle to destroy - /// @see ckmc_load_cert_from_file() - void ckmc_cert_free( - ffi.Pointer cert, - ) { - return _ckmc_cert_free( - cert, - ); - } - - late final _ckmc_cert_freePtr = - _lookup)>>( - 'ckmc_cert_free'); - late final _ckmc_cert_free = - _ckmc_cert_freePtr.asFunction)>(); - - /// @brief Creates a new #ckmc_cert_s handle from a given file and returns it. - /// @since_tizen 2.3 - /// @remarks You must destroy the newly created #ckmc_cert_s by calling ckmc_cert_free() if it is no longer needed. - /// @param[in] file_path The path of certificate file to be loaded \n - /// The only DER or PEM encoded certificate file is supported - /// @param[out] cert The pointer of newly created #ckmc_cert_s handle - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_OUT_OF_MEMORY Not enough memory space - /// @retval #CKMC_ERROR_INVALID_FORMAT Invalid certificate file format - /// @retval #CKMC_ERROR_FILE_ACCESS_DENIED Provided file does not exist or cannot be accessed - /// @see ckmc_cert_free() - /// @see #ckmc_cert_s - int ckmc_load_cert_from_file( - ffi.Pointer file_path, - ffi.Pointer> cert, - ) { - return _ckmc_load_cert_from_file( - file_path, - cert, - ); - } - - late final _ckmc_load_cert_from_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer>)>>( - 'ckmc_load_cert_from_file'); - late final _ckmc_load_cert_from_file = - _ckmc_load_cert_from_filePtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Creates a new #ckmc_pkcs12_s handle and returns it. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks You must destroy the newly created #ckmc_pkcs12_s by calling ckmc_pkcs12_free() if it is no longer needed. - /// @remarks On success, private_key, cert && ca_cert_list ownership is transferred into newly returned ckmc_pkcs12_s. - /// @param[in] private_key #ckmc_key_s handle to the private key (optional) - /// @param[in] cert #ckmc_cert_s handle to the certificate (optional) - /// @param[in] ca_cert_list #ckmc_cert_list_s list of chain certificate handles (optional) - /// @param[out] pkcs12_bundle The pointer to a newly created #ckmc_pkcs12_s handle - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid or private_key, cert and ca_cert_list all are null - /// @retval #CKMC_ERROR_OUT_OF_MEMORY Not enough memory - /// @see ckmc_pkcs12_free() - /// @see ckmc_pkcs12_load() - /// @see #ckmc_key_s - /// @see #ckmc_cert_s - /// @see #ckmc_cert_list_s - /// @see #ckmc_pkcs12_s - int ckmc_pkcs12_new( - ffi.Pointer private_key, - ffi.Pointer cert, - ffi.Pointer ca_cert_list, - ffi.Pointer> pkcs12_bundle, - ) { - return _ckmc_pkcs12_new( - private_key, - cert, - ca_cert_list, - pkcs12_bundle, - ); - } - - late final _ckmc_pkcs12_newPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('ckmc_pkcs12_new'); - late final _ckmc_pkcs12_new = _ckmc_pkcs12_newPtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4. @elseif WEARABLE 3.0. @endif [Use ckmc_pkcs12_load() instead] - /// @brief Creates a new #ckmc_key_s (@a private_key), #ckmc_cert_s (@a cert), and #ckmc_cert_list_s (@a ca_cert_list) handle from a given PKCS#12 file and returns them. - /// @since_tizen 2.3 - /// @remarks You must destroy the newly created #ckmc_key_s, #ckmc_cert_s, and - /// #ckmc_cert_list_s by calling ckmc_key_free(), ckmc_cert_free(), and - /// ckmc_cert_list_all_free() if they are no longer needed. - /// @param[in] file_path The path of PKCS12 file to be loaded - /// @param[in] passphrase The passphrase used to decrypt the PCKS12 file \n - /// If PKCS12 file is not encrypted, passphrase can be null - /// @param[out] private_key The pointer of newly created #ckmc_key_s handle for a private key - /// @param[out] cert The pointer of newly created #ckmc_cert_s handle for a certificate \n - /// It is null if the PKCS12 file does not contain a certificate - /// @param[out] ca_cert_list The pointer of newly created #ckmc_cert_list_s handle for CA certificates \n - /// It is null if the PKCS12 file does not contain CA certificates - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_OUT_OF_MEMORY Not enough memory space - /// @retval #CKMC_ERROR_INVALID_FORMAT Invalid PKCS12 file format - /// @retval #CKMC_ERROR_FILE_ACCESS_DENIED Provided file does not exist or cannot be accessed - /// @see ckmc_pkcs12_new() - /// @see ckmc_pkcs12_load() - /// @see ckmc_key_free() - /// @see ckmc_cert_free() - /// @see ckmc_cert_list_all_free() - /// @see #ckmc_key_s - /// @see #ckmc_cert_s - /// @see #ckmc_cert_list_s - int ckmc_load_from_pkcs12_file( - ffi.Pointer file_path, - ffi.Pointer passphrase, - ffi.Pointer> private_key, - ffi.Pointer> cert, - ffi.Pointer> ca_cert_list, - ) { - return _ckmc_load_from_pkcs12_file( - file_path, - passphrase, - private_key, - cert, - ca_cert_list, - ); - } - - late final _ckmc_load_from_pkcs12_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer>)>>( - 'ckmc_load_from_pkcs12_file'); - late final _ckmc_load_from_pkcs12_file = - _ckmc_load_from_pkcs12_filePtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer>)>(); - - /// @brief Creates a new #ckmc_pkcs12_s handle from a given PKCS#12 file and returns it. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks You must destroy the newly created #ckmc_pkcs12_s by calling ckmc_pkcs12_free() if they are no longer needed. - /// @param[in] file_path The path of PKCS12 file to be loaded - /// @param[in] passphrase The passphrase used to decrypt the PCKS12 file \n - /// If PKCS12 file is not encrypted, passphrase can be null - /// @param[out] pkcs12_bundle The pointer of newly created #ckmc_cert_list_s handle for CA certificates \n - /// It is null if the PKCS12 file does not contain CA certificates - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_OUT_OF_MEMORY Not enough memory space - /// @retval #CKMC_ERROR_INVALID_FORMAT Invalid PKCS12 file format - /// @retval #CKMC_ERROR_FILE_ACCESS_DENIED Provided file does not exist or cannot be accessed - /// @see ckmc_pkcs12_free() - /// @see #ckmc_pkcs12_s - int ckmc_pkcs12_load( - ffi.Pointer file_path, - ffi.Pointer passphrase, - ffi.Pointer> pkcs12_bundle, - ) { - return _ckmc_pkcs12_load( - file_path, - passphrase, - pkcs12_bundle, - ); - } - - late final _ckmc_pkcs12_loadPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('ckmc_pkcs12_load'); - late final _ckmc_pkcs12_load = _ckmc_pkcs12_loadPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Destroys the #ckmc_pkcs12_s handle and releases all its resources. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] pkcs12 The #ckmc_pkcs12_s handle to destroy - /// @see ckmc_pkcs12_new() - /// @see ckmc_pkcs12_load() - void ckmc_pkcs12_free( - ffi.Pointer pkcs12, - ) { - return _ckmc_pkcs12_free( - pkcs12, - ); - } - - late final _ckmc_pkcs12_freePtr = _lookup< - ffi.NativeFunction)>>( - 'ckmc_pkcs12_free'); - late final _ckmc_pkcs12_free = _ckmc_pkcs12_freePtr - .asFunction)>(); - - /// @brief Creates a new #ckmc_alias_list_s handle and returns it. - /// The alias pointer in the returned #ckmc_alias_list_s handle points to the provided characters and next is null. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks You must destroy the newly created #ckmc_alias_list_s - /// by calling ckmc_alias_list_free() or ckmc_alias_list_all_free() if it is no longer needed. - /// @param[in] alias The first item to be set in the newly created #ckmc_alias_list_s - /// @param[out] ppalias_list The pointer to a newly created #ckmc_alias_list_s handle - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_OUT_OF_MEMORY Not enough memory - /// @see ckmc_alias_list_all_free() - /// @see #ckmc_alias_list_s - int ckmc_alias_list_new( - ffi.Pointer alias, - ffi.Pointer> ppalias_list, - ) { - return _ckmc_alias_list_new( - alias, - ppalias_list, - ); - } - - late final _ckmc_alias_list_newPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer>)>>( - 'ckmc_alias_list_new'); - late final _ckmc_alias_list_new = _ckmc_alias_list_newPtr.asFunction< - int Function(ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Creates a new #ckmc_alias_list_s handle, adds it to a previous #ckmc_alias_list_s and returns it. - /// The alias pointer in the returned #ckmc_alias_list_s handle points to the provided characters and next is null. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] previous The last #ckmc_alias_list_s handle to which a newly created #ckmc_alias_list_s is added - /// @param[in] alias The item to be set in the newly created #ckmc_alias_list_s - /// @param[out] pplast The pointer to a newly created and added #ckmc_alias_list_s handle - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_OUT_OF_MEMORY Not enough memory - /// @see ckmc_alias_list_all_free() - /// @see #ckmc_alias_list_s - int ckmc_alias_list_add( - ffi.Pointer previous, - ffi.Pointer alias, - ffi.Pointer> pplast, - ) { - return _ckmc_alias_list_add( - previous, - alias, - pplast, - ); - } - - late final _ckmc_alias_list_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>( - 'ckmc_alias_list_add'); - late final _ckmc_alias_list_add = _ckmc_alias_list_addPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Destroys the #ckmc_alias_list_s handle and releases resources of #ckmc_alias_list_s from the provided first handle cascadingly. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks It does not destroy an alias itself in #ckmc_alias_list_s. - /// @param[in] first The first #ckmc_alias_list_s handle to destroy - /// @see ckmc_alias_list_all_free() - /// @see #ckmc_alias_list_s - void ckmc_alias_list_free( - ffi.Pointer first, - ) { - return _ckmc_alias_list_free( - first, - ); - } - - late final _ckmc_alias_list_freePtr = _lookup< - ffi - .NativeFunction)>>( - 'ckmc_alias_list_free'); - late final _ckmc_alias_list_free = _ckmc_alias_list_freePtr - .asFunction)>(); - - /// @brief Destroys the #ckmc_alias_list_s handle and releases all its resources from the provided first handle cascadingly. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks It also destroys the alias in #ckmc_alias_list_s. - /// @param[in] first The first #ckmc_alias_list_s handle to destroy - /// @see #ckmc_alias_list_s - void ckmc_alias_list_all_free( - ffi.Pointer first, - ) { - return _ckmc_alias_list_all_free( - first, - ); - } - - late final _ckmc_alias_list_all_freePtr = _lookup< - ffi - .NativeFunction)>>( - 'ckmc_alias_list_all_free'); - late final _ckmc_alias_list_all_free = _ckmc_alias_list_all_freePtr - .asFunction)>(); - - /// @brief Creates a new #ckmc_cert_list_s handle and returns it. - /// The cert pointer in the returned #ckmc_cert_list_s handle points to the provided #ckmc_cert_s and next is null. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks You must destroy the newly created #ckmc_cert_list_s by calling ckmc_cert_list_free() or ckmc_cert_list_all_free() if it is no longer needed. - /// @param[in] cert The first item to be set in the newly created #ckmc_cert_list_s - /// @param[out] ppalias_list The pointer to a newly created #ckmc_alias_list_s handle - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_OUT_OF_MEMORY Not enough memory - /// @see ckmc_cert_list_all_free() - /// @see #ckmc_cert_list_s - int ckmc_cert_list_new( - ffi.Pointer cert, - ffi.Pointer> ppalias_list, - ) { - return _ckmc_cert_list_new( - cert, - ppalias_list, - ); - } - - late final _ckmc_cert_list_newPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer>)>>( - 'ckmc_cert_list_new'); - late final _ckmc_cert_list_new = _ckmc_cert_list_newPtr.asFunction< - int Function(ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Creates a new #ckmc_cert_list_s handle, adds it to a previous #ckmc_cert_list_s and returns it. - /// The cert pointer in the returned #ckmc_alias_list_s handle points to the provided #ckmc_cert_s and next is null. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] previous The last #ckmc_cert_list_s handle to which a newly created #ckmc_cert_list_s is added - /// @param[in] cert The item to be set in the newly created #ckmc_cert_list_s - /// @param[out] pplast The pointer to a newly created and added #ckmc_alias_list_s handle - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_OUT_OF_MEMORY Not enough memory - /// @see ckmc_cert_list_all_free() - /// @see #ckmc_cert_list_s - int ckmc_cert_list_add( - ffi.Pointer previous, - ffi.Pointer cert, - ffi.Pointer> pplast, - ) { - return _ckmc_cert_list_add( - previous, - cert, - pplast, - ); - } - - late final _ckmc_cert_list_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>( - 'ckmc_cert_list_add'); - late final _ckmc_cert_list_add = _ckmc_cert_list_addPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Destroys the #ckmc_cert_list_s handle and releases resources of #ckmc_cert_list_s from the provided first handle cascadingly. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks It does not destroy #ckmc_cert_s itself in #ckmc_cert_list_s. - /// @param[in] first The first #ckmc_cert_list_s handle to destroy - /// @see ckmc_cert_list_all_free() - /// @see #ckmc_cert_list_s - void ckmc_cert_list_free( - ffi.Pointer first, - ) { - return _ckmc_cert_list_free( - first, - ); - } - - late final _ckmc_cert_list_freePtr = _lookup< - ffi.NativeFunction)>>( - 'ckmc_cert_list_free'); - late final _ckmc_cert_list_free = _ckmc_cert_list_freePtr - .asFunction)>(); - - /// @brief Destroys the #ckmc_cert_list_s handle and releases all its resources from the provided first handle cascadingly. - /// @since_tizen 2.3 - /// @remarks It also destroys #ckmc_cert_s in #ckmc_cert_list_s. - /// @param[in] first The first #ckmc_cert_list_s handle to destroy - /// @see #ckmc_cert_list_s - void ckmc_cert_list_all_free( - ffi.Pointer first, - ) { - return _ckmc_cert_list_all_free( - first, - ); - } - - late final _ckmc_cert_list_all_freePtr = _lookup< - ffi.NativeFunction)>>( - 'ckmc_cert_list_all_free'); - late final _ckmc_cert_list_all_free = _ckmc_cert_list_all_freePtr - .asFunction)>(); - - /// @brief Creates new parameter list. - /// @since_tizen 3.0 - /// @remarks Caller is responsible for freeing it with ckmc_param_list_free(). - /// @param[in] pparams Double pointer to the handle of param list to which the newly created algorithm param list will be assigned - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @see ckmc_param_list_set_integer() - /// @see ckmc_param_list_set_buffer() - /// @see ckmc_param_list_free() - /// @see ckmc_generate_new_params() - /// @see #ckmc_param_list_h - /// @see #ckmc_param_name_e - /// @see #ckmc_algo_type_e - int ckmc_param_list_new( - ffi.Pointer pparams, - ) { - return _ckmc_param_list_new( - pparams, - ); - } - - late final _ckmc_param_list_newPtr = _lookup< - ffi.NativeFunction)>>( - 'ckmc_param_list_new'); - late final _ckmc_param_list_new = _ckmc_param_list_newPtr - .asFunction)>(); - - /// @brief Sets integer parameter to the list. - /// @since_tizen 3.0 - /// @remarks Caller is responsible for #ckmc_param_list_h creation. - /// @param[in] params Algorithm param list handle created with ckmc_param_list_new() or ckmc_generate_new_params() \n - /// New param with @a name and @a value will be set here - /// @param[in] name Name of parameter to set \n - /// Existing parameter will be overwritten \n - /// Passing invalid parameter name will result in an error - /// @param[in] value Value of the parameter in form of a integer - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @see ckmc_param_list_new() - /// @see ckmc_param_list_set_buffer() - /// @see ckmc_param_list_get_integer() - /// @see ckmc_param_list_get_buffer() - /// @see ckmc_param_list_free() - /// @see ckmc_generate_new_params() - /// @see #ckmc_param_list_h - /// @see #ckmc_param_name_e - /// @see #ckmc_algo_type_e - int ckmc_param_list_set_integer( - ckmc_param_list_h params, - int name, - int value, - ) { - return _ckmc_param_list_set_integer( - params, - name, - value, - ); - } - - late final _ckmc_param_list_set_integerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ckmc_param_list_h, ffi.Int32, - ffi.Uint64)>>('ckmc_param_list_set_integer'); - late final _ckmc_param_list_set_integer = _ckmc_param_list_set_integerPtr - .asFunction(); - - /// @brief Sets buffer parameter to the list. - /// @since_tizen 3.0 - /// @remarks Caller is responsible for #ckmc_param_list_h creation. - /// @param[in] params Algorithm param list handle created with ckmc_param_list_new() or ckmc_generate_new_params() - /// New param with @a name and @a buffer will be set here - /// @param[in] name Name of parameter to set \n - /// Existing parameter will be overwritten \n - /// Passing invalid parameter name will result in an error - /// @param[in] buffer Value of the parameter in form of a buffer \n - /// Caller is responsible for creating and freeing the buffer - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @see ckmc_param_list_new() - /// @see ckmc_param_list_set_integer() - /// @see ckmc_param_list_get_integer() - /// @see ckmc_param_list_get_buffer() - /// @see ckmc_param_list_free() - /// @see ckmc_generate_new_params() - /// @see #ckmc_param_list_h - /// @see #ckmc_param_name_e - /// @see #ckmc_algo_type_e - int ckmc_param_list_set_buffer( - ckmc_param_list_h params, - int name, - ffi.Pointer buffer, - ) { - return _ckmc_param_list_set_buffer( - params, - name, - buffer, - ); - } - - late final _ckmc_param_list_set_bufferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ckmc_param_list_h, ffi.Int32, - ffi.Pointer)>>('ckmc_param_list_set_buffer'); - late final _ckmc_param_list_set_buffer = - _ckmc_param_list_set_bufferPtr.asFunction< - int Function( - ckmc_param_list_h, int, ffi.Pointer)>(); - - /// @brief Gets integer parameter from the list. - /// @since_tizen 3.0 - /// @remarks Caller is responsible for #ckmc_param_list_h creation. - /// @param[in] params Algorithm param list handle created with ckmc_param_list_new() or ckmc_generate_new_params() - /// which contains param with @a name - /// @param[in] name Name of parameter to get - /// @param[out] pvalue Value of the parameter in form of a integer - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @see ckmc_param_list_new() - /// @see ckmc_param_list_set_integer() - /// @see ckmc_param_list_set_buffer() - /// @see ckmc_param_list_get_buffer() - /// @see ckmc_param_list_free() - /// @see ckmc_generate_new_params() - /// @see #ckmc_param_list_h - /// @see #ckmc_param_name_e - /// @see #ckmc_algo_type_e - int ckmc_param_list_get_integer( - ckmc_param_list_h params, - int name, - ffi.Pointer pvalue, - ) { - return _ckmc_param_list_get_integer( - params, - name, - pvalue, - ); - } - - late final _ckmc_param_list_get_integerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ckmc_param_list_h, ffi.Int32, - ffi.Pointer)>>('ckmc_param_list_get_integer'); - late final _ckmc_param_list_get_integer = - _ckmc_param_list_get_integerPtr.asFunction< - int Function(ckmc_param_list_h, int, ffi.Pointer)>(); - - /// @brief Gets buffer parameter from the list. - /// @since_tizen 3.0 - /// @remarks Caller is responsible for #ckmc_param_list_h creation. - /// @param[in] params Algorithm param list handle created with ckmc_param_list_new() or ckmc_generate_new_params() - /// which contains param with @a name - /// @param[in] name Name of parameter to get - /// @param[out] ppbuffer Value of the parameter in form of a buffer \n - /// Caller is responsible for creating and freeing the buffer - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @see ckmc_param_list_new() - /// @see ckmc_param_list_set_integer() - /// @see ckmc_param_list_set_buffer() - /// @see ckmc_param_list_get_integer() - /// @see ckmc_param_list_free() - /// @see ckmc_generate_new_params() - /// @see ckmc_buffer_free() - /// @see #ckmc_param_list_h - /// @see #ckmc_param_name_e - /// @see #ckmc_algo_type_e - int ckmc_param_list_get_buffer( - ckmc_param_list_h params, - int name, - ffi.Pointer> ppbuffer, - ) { - return _ckmc_param_list_get_buffer( - params, - name, - ppbuffer, - ); - } - - late final _ckmc_param_list_get_bufferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ckmc_param_list_h, ffi.Int32, - ffi.Pointer>)>>( - 'ckmc_param_list_get_buffer'); - late final _ckmc_param_list_get_buffer = - _ckmc_param_list_get_bufferPtr.asFunction< - int Function(ckmc_param_list_h, int, - ffi.Pointer>)>(); - - /// @brief Frees previously allocated list of algorithm params. - /// @since_tizen 3.0 - /// @param[in] params First element of the list to be freed - /// @see ckmc_param_list_new() - /// @see ckmc_param_list_set_integer() - /// @see ckmc_param_list_set_buffer() - /// @see ckmc_param_list_get_integer() - /// @see ckmc_param_list_get_buffer() - /// @see ckmc_generate_new_params() - /// @see #ckmc_param_list_h - /// @see #ckmc_param_name_e - /// @see #ckmc_algo_type_e - void ckmc_param_list_free( - ckmc_param_list_h params, - ) { - return _ckmc_param_list_free( - params, - ); - } - - late final _ckmc_param_list_freePtr = - _lookup>( - 'ckmc_param_list_free'); - late final _ckmc_param_list_free = - _ckmc_param_list_freePtr.asFunction(); - - /// @brief Generates algorithm parameters for a given algorithm type and set them to the list. - /// @since_tizen 3.0 - /// @remarks Caller is responsible for #ckmc_param_list_h destruction. - /// @remarks Algorithm parameters are set to default values. Optional fields are left empty. - /// Initialization vectors are left empty (they have to be set manually). - /// Caller is responsible for freeing the list with ckmc_param_list_free(). - /// @remarks If the function returns error, provided param list may contain some of default parameters. - /// @param[in] type Type of the algorithm - /// @param[out] pparams Newly generated handle of param list which should be freed by caller after use - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @see ckmc_param_list_new() - /// @see ckmc_param_list_set_integer() - /// @see ckmc_param_list_set_buffer() - /// @see ckmc_param_list_get_integer() - /// @see ckmc_param_list_get_buffer() - /// @see ckmc_param_list_free() - /// @see #ckmc_param_list_h - /// @see #ckmc_param_name_e - /// @see #ckmc_algo_type_e - int ckmc_generate_new_params( - int type, - ffi.Pointer pparams, - ) { - return _ckmc_generate_new_params( - type, - pparams, - ); - } - - late final _ckmc_generate_new_paramsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, - ffi.Pointer)>>('ckmc_generate_new_params'); - late final _ckmc_generate_new_params = _ckmc_generate_new_paramsPtr - .asFunction)>(); - - /// @brief Stores a key inside key manager based on the provided policy. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks Currently API supports seven types of keys. These are RSA public/private key, DSA public/private key, ECDSA public/private key, and AES symmetric key. - /// @remarks key_type in key may be set to #CKMC_KEY_NONE as an input. key_type is determined inside key manager during storing keys. - /// @remarks Some private key files are protected by a password. If raw_key in key read from those encrypted files is encrypted with a password, the password should be provided in the #ckmc_key_s structure. - /// @remarks If password in policy is provided, the key is additionally encrypted with the password in the policy. - /// @param[in] alias The name of a key to be stored - /// @param[in] key The key's binary value to be stored - /// @param[in] policy The policy about how to store a key securely - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ALIAS_EXISTS Alias already exists - /// @retval #CKMC_ERROR_INVALID_FORMAT The format of raw_key is not valid - /// @retval #CKMC_ERROR_DB_ERROR Failed due to a database error - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_remove_alias() - /// @see ckmc_get_key() - /// @see ckmc_get_key_alias_list() - /// @see #ckmc_key_s - /// @see #ckmc_policy_s - int ckmc_save_key( - ffi.Pointer alias, - ckmc_key_s key, - ckmc_policy_s policy, - ) { - return _ckmc_save_key( - alias, - key, - policy, - ); - } - - late final _ckmc_save_keyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ckmc_key_s, - ckmc_policy_s)>>('ckmc_save_key'); - late final _ckmc_save_key = _ckmc_save_keyPtr.asFunction< - int Function(ffi.Pointer, ckmc_key_s, ckmc_policy_s)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4. @elseif WEARABLE 3.0. @endif [Use ckmc_remove_alias() instead] - /// @brief Removes a key from key manager. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks To remove key, client must have remove permission to the specified key. - /// @remarks The key owner can remove by default. - /// @param[in] alias The name of a key to be removed - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to a database error - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_save_key() - /// @see ckmc_get_key() - /// @see ckmc_get_key_alias_list() - int ckmc_remove_key( - ffi.Pointer alias, - ) { - return _ckmc_remove_key( - alias, - ); - } - - late final _ckmc_remove_keyPtr = - _lookup)>>( - 'ckmc_remove_key'); - late final _ckmc_remove_key = - _ckmc_remove_keyPtr.asFunction)>(); - - /// @brief Gets a key from key manager. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks A client can access only data stored by the client. - /// @remarks You must destroy the newly created @a ppkey by calling ckmc_key_free() if it is no longer needed. - /// @param[in] alias The name of a key to retrieve - /// @param[in] password The password used in decrypting a key value \n - /// If password of policy is provided in ckmc_save_key(), the same password should be provided - /// @param[out] ppkey The pointer to a newly created ckmc_key_s handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to a database error - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @retval #CKMC_ERROR_AUTHENTICATION_FAILED Decryption failed because password is incorrect - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_save_key() - /// @see ckmc_remove_alias() - /// @see ckmc_get_key_alias_list() - int ckmc_get_key( - ffi.Pointer alias, - ffi.Pointer password, - ffi.Pointer> ppkey, - ) { - return _ckmc_get_key( - alias, - password, - ppkey, - ); - } - - late final _ckmc_get_keyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('ckmc_get_key'); - late final _ckmc_get_key = _ckmc_get_keyPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets all the alias of keys that the client can access. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks A client can access only data stored by the client. - /// @remarks You must destroy the newly created @a ppalias_list by calling ckmc_alias_list_all_free() - /// if it is no longer needed. - /// @param[out] ppalias_list The pointer to a newly created ckmc_alias_list_s handle containing all - /// available alias of keys \n - /// If there is no available key alias, *ppalias_list will be null - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to a database error - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_save_key() - /// @see ckmc_remove_alias() - /// @see ckmc_get_key() - int ckmc_get_key_alias_list( - ffi.Pointer> ppalias_list, - ) { - return _ckmc_get_key_alias_list( - ppalias_list, - ); - } - - late final _ckmc_get_key_alias_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>)>>( - 'ckmc_get_key_alias_list'); - late final _ckmc_get_key_alias_list = _ckmc_get_key_alias_listPtr - .asFunction>)>(); - - /// @brief Stores a certificate inside key manager based on the provided policy. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0 - /// @remarks The certificate's binary value will be converted and saved as binary DER encoded certificates. - /// @param[in] alias The name of a certificate to be stored - /// @param[in] cert The certificate's binary value to be stored - /// @param[in] policy The policy about how to store a certificate securely - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ALIAS_EXISTS Alias already exists - /// @retval #CKMC_ERROR_INVALID_FORMAT The format of raw_cert is not valid - /// @retval #CKMC_ERROR_DB_ERROR Failed due to a database error - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_remove_alias() - /// @see ckmc_get_cert() - /// @see ckmc_get_cert_alias_list() - /// @see #ckmc_cert_s - /// @see #ckmc_policy_s - int ckmc_save_cert( - ffi.Pointer alias, - ckmc_cert_s cert, - ckmc_policy_s policy, - ) { - return _ckmc_save_cert( - alias, - cert, - policy, - ); - } - - late final _ckmc_save_certPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ckmc_cert_s, - ckmc_policy_s)>>('ckmc_save_cert'); - late final _ckmc_save_cert = _ckmc_save_certPtr.asFunction< - int Function(ffi.Pointer, ckmc_cert_s, ckmc_policy_s)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4. @elseif WEARABLE 3.0. @endif [Use ckmc_remove_alias() instead] - /// @brief Removes a certificate from key manager. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks To remove certificate, client must have remove permission to the specified certificate. - /// @remarks The key owner can remove by default. - /// @param[in] alias The name of a certificate to be removed - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to a database error - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_save_cert() - /// @see ckmc_get_cert() - /// @see ckmc_get_cert_alias_list() - int ckmc_remove_cert( - ffi.Pointer alias, - ) { - return _ckmc_remove_cert( - alias, - ); - } - - late final _ckmc_remove_certPtr = - _lookup)>>( - 'ckmc_remove_cert'); - late final _ckmc_remove_cert = - _ckmc_remove_certPtr.asFunction)>(); - - /// @brief Gets a certificate from key manager. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks A client can access only certificate stored by the client. - /// @remarks A DER encoded certificate will be returned as a return value. - /// @remarks You must destroy the newly created @a ppcert by calling ckmc_cert_free() if it is no longer needed. - /// @param[in] alias The name of a certificate to retrieve - /// @param[in] password The password used in decrypting a certificate value \n - /// If password of policy is provided in ckmc_save_cert(), the same password - /// should be provided - /// @param[out] ppcert The pointer to a newly created ckmc_cert_s handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to a database error - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exists - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @retval #CKMC_ERROR_AUTHENTICATION_FAILED Decryption failed because password is incorrect - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_save_cert() - /// @see ckmc_remove_alias() - /// @see ckmc_get_cert_alias_list() - int ckmc_get_cert( - ffi.Pointer alias, - ffi.Pointer password, - ffi.Pointer> ppcert, - ) { - return _ckmc_get_cert( - alias, - password, - ppcert, - ); - } - - late final _ckmc_get_certPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('ckmc_get_cert'); - late final _ckmc_get_cert = _ckmc_get_certPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets all alias of certificates which the client can access. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks A client can access only data stored by the client. - /// @remarks You must destroy the newly created @a ppalias_list by calling ckmc_alias_list_all_free() if it is no longer needed. - /// @param[out] ppalias_list The pointer to a newly created ckmc_alias_list_s handle containing all available alias of keys \n - /// If there is no available key alias, *ppalias_list will be null - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to a database error - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_save_cert() - /// @see ckmc_remove_alias() - /// @see ckmc_get_cert() - int ckmc_get_cert_alias_list( - ffi.Pointer> ppalias_list, - ) { - return _ckmc_get_cert_alias_list( - ppalias_list, - ); - } - - late final _ckmc_get_cert_alias_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>)>>( - 'ckmc_get_cert_alias_list'); - late final _ckmc_get_cert_alias_list = _ckmc_get_cert_alias_listPtr - .asFunction>)>(); - - /// @brief Stores PKCS12's contents inside key manager based on the provided policies. All items from the PKCS12 will use the same alias. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @param[in] alias The name of a data to be stored - /// @param[in] pkcs Pointer to the pkcs12 structure to be saved - /// @param[in] key_policy The policy about how to store pkcs's private key - /// @param[in] cert_policy The policy about how to store pkcs's certificate - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ALIAS_EXISTS Alias already exists - /// @retval #CKMC_ERROR_DB_ERROR Failed due to a database error - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_remove_alias() - /// @see ckmc_get_pkcs12() - /// @see ckmc_get_data_alias_list() - /// @see ckmc_pkcs12_load() - /// @see #ckmc_pkcs12_s - /// @see #ckmc_policy_s - int ckmc_save_pkcs12( - ffi.Pointer alias, - ffi.Pointer pkcs, - ckmc_policy_s key_policy, - ckmc_policy_s cert_policy, - ) { - return _ckmc_save_pkcs12( - alias, - pkcs, - key_policy, - cert_policy, - ); - } - - late final _ckmc_save_pkcs12Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ckmc_policy_s, ckmc_policy_s)>>('ckmc_save_pkcs12'); - late final _ckmc_save_pkcs12 = _ckmc_save_pkcs12Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ckmc_policy_s, ckmc_policy_s)>(); - - /// @brief Gets a pkcs12 from key manager. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks A client can access only data stored by the client. - /// @remarks You must destroy the newly created @a pkcs12 by calling ckmc_pkcs12_free() if it is no longer needed. - /// @param[in] alias The name of a data to retrieve - /// @param[in] key_password Password that was used to encrypt privateKey (may be NULL) - /// @param[in] cert_password Password used to encrypt certificates (may be NULL) - /// @param[out] pkcs12 The pointer to a newly created ckmc_pkcs12_s handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to a database error - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @retval #CKMC_ERROR_AUTHENTICATION_FAILED key_password or cert_password does not match with password used to encrypt data - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_save_pkcs12() - /// @see ckmc_remove_alias() - int ckmc_get_pkcs12( - ffi.Pointer alias, - ffi.Pointer key_password, - ffi.Pointer cert_password, - ffi.Pointer> pkcs12, - ) { - return _ckmc_get_pkcs12( - alias, - key_password, - cert_password, - pkcs12, - ); - } - - late final _ckmc_get_pkcs12Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('ckmc_get_pkcs12'); - late final _ckmc_get_pkcs12 = _ckmc_get_pkcs12Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Stores a data inside key manager based on the provided policy. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @param[in] alias The name of a data to be stored - /// @param[in] data The binary value to be stored - /// @param[in] policy The policy about how to store a data securely - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ALIAS_EXISTS Alias already exists - /// @retval #CKMC_ERROR_DB_ERROR Failed due to a database error - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_remove_alias() - /// @see ckmc_get_data() - /// @see ckmc_get_data_alias_list() - /// @see #ckmc_raw_buffer_s - /// @see #ckmc_policy_s - int ckmc_save_data( - ffi.Pointer alias, - ckmc_raw_buffer_s data, - ckmc_policy_s policy, - ) { - return _ckmc_save_data( - alias, - data, - policy, - ); - } - - late final _ckmc_save_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ckmc_raw_buffer_s, - ckmc_policy_s)>>('ckmc_save_data'); - late final _ckmc_save_data = _ckmc_save_dataPtr.asFunction< - int Function(ffi.Pointer, ckmc_raw_buffer_s, ckmc_policy_s)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4. @elseif WEARABLE 3.0. @endif [Use ckmc_remove_alias() instead] - /// @brief Removes a data from key manager. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks To remove data, client must have remove permission to the specified data object. - /// @remarks The data owner can remove by default. - /// @param[in] alias The name of a data to be removed - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to the error with unknown reason - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_save_data() - /// @see ckmc_get_data() - /// @see ckmc_get_data_alias_list() - int ckmc_remove_data( - ffi.Pointer alias, - ) { - return _ckmc_remove_data( - alias, - ); - } - - late final _ckmc_remove_dataPtr = - _lookup)>>( - 'ckmc_remove_data'); - late final _ckmc_remove_data = - _ckmc_remove_dataPtr.asFunction)>(); - - /// @brief Gets a data from key manager. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks A client can access only data stored by the client. - /// @remarks You must destroy the newly created @a ppdata by calling ckmc_buffer_free() if it is no longer needed. - /// @param[in] alias The name of a data to retrieve - /// @param[in] password The password used in decrypting a data value \n - /// If password of policy is provided in ckmc_save_data(), the same password - /// should be provided - /// @param[out] ppdata The pointer to a newly created ckmc_raw_buffer_s handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to the error with unknown reason - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @retval #CKMC_ERROR_AUTHENTICATION_FAILED Decryption failed because password is incorrect - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_save_data() - /// @see ckmc_remove_alias() - /// @see ckmc_get_data_alias_list() - int ckmc_get_data( - ffi.Pointer alias, - ffi.Pointer password, - ffi.Pointer> ppdata, - ) { - return _ckmc_get_data( - alias, - password, - ppdata, - ); - } - - late final _ckmc_get_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('ckmc_get_data'); - late final _ckmc_get_data = _ckmc_get_dataPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets all alias of data which the client can access. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks A client can access only data stored by the client. - /// @remarks You must destroy the newly created @a ppalias_list by calling ckmc_alias_list_all_free() if it is no longer needed. - /// @param[out] ppalias_list The pointer to a newly created ckmc_alias_list_s handle containing all available alias of keys \n - /// If there is no available key alias, *ppalias_list will be null - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to the error with unknown reason - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_save_data() - /// @see ckmc_remove_alias() - /// @see ckmc_get_data() - int ckmc_get_data_alias_list( - ffi.Pointer> ppalias_list, - ) { - return _ckmc_get_data_alias_list( - ppalias_list, - ); - } - - late final _ckmc_get_data_alias_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>)>>( - 'ckmc_get_data_alias_list'); - late final _ckmc_get_data_alias_list = _ckmc_get_data_alias_listPtr - .asFunction>)>(); - - /// @brief Creates RSA private/public key pair and stores them inside key manager based on each policy. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks If password in the policy is provided, the key is additionally encrypted with the password in the policy. - /// @param[in] size The size of key strength to be created \n - /// @c 1024, @c 2048, and @c 4096 are supported - /// @param[in] private_key_alias The name of private key to be stored - /// @param[in] public_key_alias The name of public key to be stored - /// @param[in] policy_private_key The policy about how to store a private key securely - /// @param[in] policy_public_key The policy about how to store a public key securely - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ALIAS_EXISTS Alias already exists - /// @retval #CKMC_ERROR_DB_ERROR Failed due to other DB transaction unexpectedly - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_create_key_pair_dsa() - /// @see ckmc_create_key_pair_ecdsa() - /// @see ckmc_create_signature() - /// @see ckmc_verify_signature() - int ckmc_create_key_pair_rsa( - int size, - ffi.Pointer private_key_alias, - ffi.Pointer public_key_alias, - ckmc_policy_s policy_private_key, - ckmc_policy_s policy_public_key, - ) { - return _ckmc_create_key_pair_rsa( - size, - private_key_alias, - public_key_alias, - policy_private_key, - policy_public_key, - ); - } - - late final _ckmc_create_key_pair_rsaPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Size, - ffi.Pointer, - ffi.Pointer, - ckmc_policy_s, - ckmc_policy_s)>>('ckmc_create_key_pair_rsa'); - late final _ckmc_create_key_pair_rsa = - _ckmc_create_key_pair_rsaPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, - ckmc_policy_s, ckmc_policy_s)>(); - - /// @brief Creates DSA private/public key pair and stores them inside key manager based on each policy. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks If password in the policy is provided, the key is additionally encrypted with the password in the policy. - /// @param[in] size The size of key strength to be created \n - /// @c 1024, @c 2048, @c 3072 and @c 4096 are supported - /// @param[in] private_key_alias The name of private key to be stored - /// @param[in] public_key_alias The name of public key to be stored - /// @param[in] policy_private_key The policy about how to store a private key securely - /// @param[in] policy_public_key The policy about how to store a public key securely - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ALIAS_EXISTS Alias already exists - /// @retval #CKMC_ERROR_DB_ERROR Failed due to other DB transaction unexpectedly - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_create_key_pair_rsa() - /// @see ckmc_create_key_pair_ecdsa() - /// @see ckmc_create_signature() - /// @see ckmc_verify_signature() - int ckmc_create_key_pair_dsa( - int size, - ffi.Pointer private_key_alias, - ffi.Pointer public_key_alias, - ckmc_policy_s policy_private_key, - ckmc_policy_s policy_public_key, - ) { - return _ckmc_create_key_pair_dsa( - size, - private_key_alias, - public_key_alias, - policy_private_key, - policy_public_key, - ); - } - - late final _ckmc_create_key_pair_dsaPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Size, - ffi.Pointer, - ffi.Pointer, - ckmc_policy_s, - ckmc_policy_s)>>('ckmc_create_key_pair_dsa'); - late final _ckmc_create_key_pair_dsa = - _ckmc_create_key_pair_dsaPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, - ckmc_policy_s, ckmc_policy_s)>(); - - /// @brief Creates ECDSA private/public key pair and stores them inside key manager based on each policy. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks If password in the policy is provided, the key is additionally encrypted with the password in the policy. - /// @param[in] type The type of elliptic curve of ECDSA - /// @param[in] private_key_alias The name of private key to be stored - /// @param[in] public_key_alias The name of public key to be stored - /// @param[in] policy_private_key The policy about how to store a private key securely - /// @param[in] policy_public_key The policy about how to store a public key securely - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ALIAS_EXISTS Alias already exists - /// @retval #CKMC_ERROR_DB_ERROR Failed due to other DB transaction unexpectedly - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_create_key_pair_rsa() - /// @see ckmc_create_key_pair_dsa() - /// @see ckmc_create_signature() - /// @see ckmc_verify_signature() - /// @see #ckmc_ec_type_e - int ckmc_create_key_pair_ecdsa( - int type, - ffi.Pointer private_key_alias, - ffi.Pointer public_key_alias, - ckmc_policy_s policy_private_key, - ckmc_policy_s policy_public_key, - ) { - return _ckmc_create_key_pair_ecdsa( - type, - private_key_alias, - public_key_alias, - policy_private_key, - policy_public_key, - ); - } - - late final _ckmc_create_key_pair_ecdsaPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ckmc_policy_s, - ckmc_policy_s)>>('ckmc_create_key_pair_ecdsa'); - late final _ckmc_create_key_pair_ecdsa = - _ckmc_create_key_pair_ecdsaPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, - ckmc_policy_s, ckmc_policy_s)>(); - - /// @brief Creates AES key and stores it inside key manager based on the policy. - /// @since_tizen 3.0 - /// @remarks If password in the policy is provided, the key is additionally encrypted with the password in the policy. - /// @param[in] size The size of key strength to be created \n - /// @c 128, @c 192 and @c 256 are supported - /// @param[in] key_alias The name of key to be stored - /// @param[in] key_policy The policy about how to store the key securely - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ALIAS_EXISTS Alias already exists - /// @retval #CKMC_ERROR_DB_ERROR Failed due to other DB transaction unexpectedly - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_create_key_pair_rsa() - /// @see ckmc_create_key_pair_dsa() - /// @see ckmc_create_key_pair_ecdsa() - /// @see #ckmc_policy_s - int ckmc_create_key_aes( - int size, - ffi.Pointer key_alias, - ckmc_policy_s key_policy, - ) { - return _ckmc_create_key_aes( - size, - key_alias, - key_policy, - ); - } - - late final _ckmc_create_key_aesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Size, ffi.Pointer, - ckmc_policy_s)>>('ckmc_create_key_aes'); - late final _ckmc_create_key_aes = _ckmc_create_key_aesPtr - .asFunction, ckmc_policy_s)>(); - - /// @brief Creates a signature on a given message using a private key and returns the signature. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks If password of policy is provided during storing a key, the same password should be provided. - /// @remarks You must destroy the newly created @a ppsignature by calling ckmc_buffer_free() if it is no longer needed. - /// @param[in] private_key_alias The name of private key - /// @param[in] password The password used in decrypting a private key value - /// @param[in] message The message that is signed with a private key - /// @param[in] hash The hash algorithm used in creating signature - /// @param[in] padding The RSA padding algorithm used in creating signature \n - /// It is used only when the signature algorithm is RSA. If - /// @a padding is CKMC_NONE_PADDING you must use CKMC_HASH_NONE - /// and the message must be equal to key length - /// @param[out] ppsignature The pointer to a newly created signature \n - /// If an error occurs, @a *ppsignature will be null - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to the error with unknown reason - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @retval #CKMC_ERROR_AUTHENTICATION_FAILED Decryption failed because password is incorrect - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_create_key_pair_rsa() - /// @see ckmc_create_key_pair_ecdsa() - /// @see ckmc_verify_signature() - /// @see ckmc_buffer_free() - /// @see #ckmc_hash_algo_e - /// @see #ckmc_rsa_padding_algo_e - int ckmc_create_signature( - ffi.Pointer private_key_alias, - ffi.Pointer password, - ckmc_raw_buffer_s message, - int hash, - int padding, - ffi.Pointer> ppsignature, - ) { - return _ckmc_create_signature( - private_key_alias, - password, - message, - hash, - padding, - ppsignature, - ); - } - - late final _ckmc_create_signaturePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ckmc_raw_buffer_s, - ffi.Int32, - ffi.Int32, - ffi.Pointer>)>>( - 'ckmc_create_signature'); - late final _ckmc_create_signature = _ckmc_create_signaturePtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ckmc_raw_buffer_s, - int, - int, - ffi.Pointer>)>(); - - /// @brief Verifies a given signature on a given message using a public key and returns the signature status. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks If password of policy is provided during storing a key, the same password should be provided. - /// @param[in] public_key_alias The name of public key - /// @param[in] password The password used in decrypting a public key value - /// @param[in] message The input on which the signature is created - /// @param[in] signature The signature that is verified with public key - /// @param[in] hash The hash algorithm used in verifying signature - /// @param[in] padding The RSA padding algorithm used in verifying signature \n - /// It is used only when the signature algorithm is RSA. If - /// @a padding is CKMC_NONE_PADDING you must use CKMC_HASH_NONE - /// and the message must be equal to key length - /// @return @c 0 on success and the signature is valid, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_VERIFICATION_FAILED The signature is invalid - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to the error with unknown reason - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @retval #CKMC_ERROR_AUTHENTICATION_FAILED Decryption failed because password is incorrect - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_create_key_pair_rsa() - /// @see ckmc_create_key_pair_ecdsa() - /// @see ckmc_verify_signature() - /// @see #ckmc_hash_algo_e - /// @see #ckmc_rsa_padding_algo_e - int ckmc_verify_signature( - ffi.Pointer public_key_alias, - ffi.Pointer password, - ckmc_raw_buffer_s message, - ckmc_raw_buffer_s signature, - int hash, - int padding, - ) { - return _ckmc_verify_signature( - public_key_alias, - password, - message, - signature, - hash, - padding, - ); - } - - late final _ckmc_verify_signaturePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ckmc_raw_buffer_s, - ckmc_raw_buffer_s, - ffi.Int32, - ffi.Int32)>>('ckmc_verify_signature'); - late final _ckmc_verify_signature = _ckmc_verify_signaturePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ckmc_raw_buffer_s, ckmc_raw_buffer_s, int, int)>(); - - /// @brief Verifies a certificate chain and returns that chain. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks The trusted root certificate of the chain should exist in the system's certificate storage. - /// @remarks You must destroy the newly created @a ppcert_chain_list by calling ckmc_cert_list_all_free() if it is no longer needed. - /// @param[in] cert The certificate to be verified - /// @param[in] untrustedcerts The untrusted CA certificates to be used in verifying a certificate chain - /// @param[out] ppcert_chain_list The pointer to a newly created certificate chain's handle \n - /// If an error occurs, @a *ppcert_chain_list will be null - /// @return @c 0 on success and the signature is valid, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_VERIFICATION_FAILED The certificate chain is not valid - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to the error with unknown reason - /// @retval #CKMC_ERROR_INVALID_FORMAT The format of certificate is not valid - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @retval #CKMC_ERROR_AUTHENTICATION_FAILED Decryption failed because password is incorrect - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_cert_list_all_free() - int ckmc_get_cert_chain( - ffi.Pointer cert, - ffi.Pointer untrustedcerts, - ffi.Pointer> ppcert_chain_list, - ) { - return _ckmc_get_cert_chain( - cert, - untrustedcerts, - ppcert_chain_list, - ); - } - - late final _ckmc_get_cert_chainPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>( - 'ckmc_get_cert_chain'); - late final _ckmc_get_cert_chain = _ckmc_get_cert_chainPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4. @elseif WEARABLE 3.0. @endif [Use ckmc_get_cert_chain() instead] - /// @brief Verifies a certificate chain using an alias list of untrusted certificates and return that chain. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks The trusted root certificate of the chain should exist in the system's certificate storage. - /// @remarks You must destroy the newly created @a ppcert_chain_list by calling ckmc_cert_list_all_free() if it is no longer needed. - /// @remarks @a untrustedcerts shouldn't be protected with optional password. - /// @param[in] cert The certificate to be verified - /// @param[in] untrustedcerts The alias list of untrusted CA certificates stored in key manager to be used in verifying a certificate chain - /// @param[out] ppcert_chain_list The pointer to a newly created certificate chain's handle \n - /// If an error occurs, @a *ppcert_chain_list will be null - /// @return @c 0 on success and the signature is valid, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_VERIFICATION_FAILED The certificate chain is not valid - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to the error with unknown reason - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_INVALID_FORMAT The format of certificate is not valid - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @retval #CKMC_ERROR_AUTHENTICATION_FAILED Some certificates were encrypted with password and could not be used - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_get_cert_chain() - /// @see ckmc_cert_list_all_free() - int ckmc_get_cert_chain_with_alias( - ffi.Pointer cert, - ffi.Pointer untrustedcerts, - ffi.Pointer> ppcert_chain_list, - ) { - return _ckmc_get_cert_chain_with_alias( - cert, - untrustedcerts, - ppcert_chain_list, - ); - } - - late final _ckmc_get_cert_chain_with_aliasPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>( - 'ckmc_get_cert_chain_with_alias'); - late final _ckmc_get_cert_chain_with_alias = - _ckmc_get_cert_chain_with_aliasPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Verifies a certificate chain and returns that chain using user-entered, trusted, and untrusted CA certificates. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks If the trusted root certificates are provided as a user input, these certificates do not need to exist in the system's certificate storage. - /// @remarks You must destroy the newly created @a ppcert_chain_list by calling ckmc_cert_list_all_free() if it is no longer needed. - /// @param[in] cert The certificate to be verified - /// @param[in] untrustedcerts The untrusted CA certificates to be used in verifying a certificate chain - /// @param[in] trustedcerts The trusted CA certificates to be used in verifying a certificate chain - /// @param[in] use_trustedsystemcerts The flag indicating the use of the trusted root certificates in the system's certificate storage - /// @param[out] ppcert_chain_list The pointer to a newly created certificate chain's handle \n - /// If an error occurs, @a *ppcert_chain_list will be null - /// @return @c 0 on success and the signature is valid, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_VERIFICATION_FAILED The certificate chain is not valid - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to the error with unknown reason - /// @retval #CKMC_ERROR_INVALID_FORMAT The format of certificate is not valid - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_cert_list_all_free() - int ckmc_get_cert_chain_with_trustedcert( - ffi.Pointer cert, - ffi.Pointer untrustedcerts, - ffi.Pointer trustedcerts, - bool use_trustedsystemcerts, - ffi.Pointer> ppcert_chain_list, - ) { - return _ckmc_get_cert_chain_with_trustedcert( - cert, - untrustedcerts, - trustedcerts, - use_trustedsystemcerts, - ppcert_chain_list, - ); - } - - late final _ckmc_get_cert_chain_with_trustedcertPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer>)>>( - 'ckmc_get_cert_chain_with_trustedcert'); - late final _ckmc_get_cert_chain_with_trustedcert = - _ckmc_get_cert_chain_with_trustedcertPtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer>)>(); - - /// @brief Perform OCSP that checks certificate is whether revoked or not. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @remarks %http://tizen.org/privilege/internet (public level privilege) is required to use this API instead of %http://tizen.org/privilege/keymanager (public level privilege) since 3.0. - /// @param[in] pcert_chain_list Valid certificate chain to perform OCSP check - /// @param[out] ocsp_status The pointer to status result of OCSP check - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @retval #CKMC_ERROR_NOT_SUPPORTED Device needed to run API is not supported - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @pre @a pcert_chain_list is created with ckmc_get_certificate_chain() or - /// ckmc_get_certificate_chain_with_alias(). - /// @see ckmc_get_cert_chain()) - /// @see ckmc_cert_list_all_free() - int ckmc_ocsp_check( - ffi.Pointer pcert_chain_list, - ffi.Pointer ocsp_status, - ) { - return _ckmc_ocsp_check( - pcert_chain_list, - ocsp_status, - ); - } - - late final _ckmc_ocsp_checkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('ckmc_ocsp_check'); - late final _ckmc_ocsp_check = _ckmc_ocsp_checkPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4. @elseif WEARABLE 3.0. @endif [Use ckmc_set_permission() instead] - /// @brief Allows another application to access client's application data. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks Data identified by @a alias should exist. - /// @param[in] alias Data alias for which access will be granted - /// @param[in] accessor Package id of the application that will gain access rights - /// @param[in] granted Rights granted for @a accessor application - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to the error with unknown reason - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_deny_access() - int ckmc_allow_access( - ffi.Pointer alias, - ffi.Pointer accessor, - int granted, - ) { - return _ckmc_allow_access( - alias, - accessor, - granted, - ); - } - - late final _ckmc_allow_accessPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('ckmc_allow_access'); - late final _ckmc_allow_access = _ckmc_allow_accessPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); - - /// @brief Allows another application to access client's application data. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks Data identified by @a alias should exist. - /// @param[in] alias Data alias for which access will be granted - /// @param[in] accessor Package id of the application that will gain access rights - /// @param[in] permissions Mask of permissions granted for @a accessor application - /// (#ckmc_permission_e) - /// (previous permission mask will be replaced with the new mask value) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to the error with unknown reason - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - int ckmc_set_permission( - ffi.Pointer alias, - ffi.Pointer accessor, - int permissions, - ) { - return _ckmc_set_permission( - alias, - accessor, - permissions, - ); - } - - late final _ckmc_set_permissionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Int)>>('ckmc_set_permission'); - late final _ckmc_set_permission = _ckmc_set_permissionPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4. @elseif WEARABLE 3.0. @endif [Use ckmc_set_permission() instead] - /// @brief Revokes another application's access to client's application data. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks Data identified by @a alias should exist. - /// @remarks Only access previously granted with ckmc_allow_access can be revoked. - /// @param[in] alias Data alias for which access will be revoked - /// @param[in] accessor Package id of the application that will lose access rights - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid or the @a accessor doesn't have access to @a alias - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to the error with unknown reason - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_allow_access() - /// @see ckmc_set_permission() - int ckmc_deny_access( - ffi.Pointer alias, - ffi.Pointer accessor, - ) { - return _ckmc_deny_access( - alias, - accessor, - ); - } - - late final _ckmc_deny_accessPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('ckmc_deny_access'); - late final _ckmc_deny_access = _ckmc_deny_accessPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Removes an entry (no matter of type) from the key manager. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks To remove item, client must have remove permission to the specified item. - /// @remarks The item owner can remove by default. - /// @param[in] alias Item alias to be removed - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to a database error - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_save_key() - /// @see ckmc_save_cert() - /// @see ckmc_save_data() - /// @see ckmc_save_pkcs12() - /// @see ckmc_create_key_pair_rsa() - /// @see ckmc_create_key_pair_dsa() - /// @see ckmc_create_key_pair_ecdsa() - int ckmc_remove_alias( - ffi.Pointer alias, - ) { - return _ckmc_remove_alias( - alias, - ); - } - - late final _ckmc_remove_aliasPtr = - _lookup)>>( - 'ckmc_remove_alias'); - late final _ckmc_remove_alias = - _ckmc_remove_aliasPtr.asFunction)>(); - - /// @brief Encrypts data using selected key and algorithm. - /// @since_tizen 3.0 - /// @remarks Key identified by @a key_alias should exist. - /// @param[in] params Algorithm parameter list handle. See #ckmc_param_list_h and - /// #ckmc_algo_type_e for details - /// @param[in] key_alias Alias of the key to be used for encryption - /// @param[in] password The password used in decrypting a key value \n - /// If password of the policy is provided in ckmc_save_key(), the same - /// password should be provided - /// @param[in] decrypted Data to be encrypted. In case of AES algorithm there are no restrictions on the size of data. - /// For RSA the size must be smaller or equal to key size in bytes - 42. - /// Example: for 1024 RSA key the maximum data size is 1024/8 - 42 = 86 - /// @param[out] ppencrypted Encrypted data (some algorithms may return additional information embedded in encrypted data. - /// AES GCM is an example) \n - /// The caller is responsible for freeing @a encrypted with ckmc_buffer_free() - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid (missing or invalid - /// mandatory algorithm parameter, decrypted = NULL, - /// ppencrypted = NULL) - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to the error with unknown reason - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Key with given alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @retval #CKMC_ERROR_AUTHENTICATION_FAILED Key decryption failed because password is incorrect - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_buffer_free() - /// @see ckmc_param_list_new() - /// @see ckmc_param_list_free() - /// @see ckmc_param_list_set_integer() - /// @see ckmc_param_list_set_buffer() - /// @see ckmc_generate_new_params() - /// @see #ckmc_param_list_h - /// @see #ckmc_param_name_e - /// @see #ckmc_algo_type_e - int ckmc_encrypt_data( - ckmc_param_list_h params, - ffi.Pointer key_alias, - ffi.Pointer password, - ckmc_raw_buffer_s decrypted, - ffi.Pointer> ppencrypted, - ) { - return _ckmc_encrypt_data( - params, - key_alias, - password, - decrypted, - ppencrypted, - ); - } - - late final _ckmc_encrypt_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ckmc_param_list_h, - ffi.Pointer, - ffi.Pointer, - ckmc_raw_buffer_s, - ffi.Pointer>)>>( - 'ckmc_encrypt_data'); - late final _ckmc_encrypt_data = _ckmc_encrypt_dataPtr.asFunction< - int Function( - ckmc_param_list_h, - ffi.Pointer, - ffi.Pointer, - ckmc_raw_buffer_s, - ffi.Pointer>)>(); - - /// @brief Decrypts data using selected key and algorithm. - /// @since_tizen 3.0 - /// @remarks Key identified by @a key_alias should exist. - /// @param[in] params Algorithm parameter list handle. You should use the same parameters that were used for encryption. - /// See #ckmc_param_list_h and #ckmc_algo_type_e for details - /// @param[in] key_alias Alias of the key to be used for encryption - /// @param[in] password The password used in decrypting a key value \n - /// If password of the policy is provided in ckmc_save_key(), the same password should be provided - /// @param[in] encrypted Data to be decrypted (some algorithms may require additional information embedded in encrypted data. AES GCM is an example) - /// @param[out] ppdecrypted Decrypted data \n - /// The caller is responsible for freeing @a decrypted with ckmc_buffer_free() - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid (missing or invalid - /// mandatory algorithm parameter, encrypted = NULL, - /// ppdecrypted = NULL) - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to the error with unknown reason - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Key with given alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @retval #CKMC_ERROR_AUTHENTICATION_FAILED Key decryption failed because password is incorrect - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_buffer_free() - /// @see ckmc_param_list_new() - /// @see ckmc_param_list_free() - /// @see ckmc_param_list_set_integer() - /// @see ckmc_param_list_set_buffer() - /// @see ckmc_generate_new_params() - /// @see #ckmc_param_list_h - /// @see #ckmc_param_name_e - /// @see #ckmc_algo_type_e - int ckmc_decrypt_data( - ckmc_param_list_h params, - ffi.Pointer key_alias, - ffi.Pointer password, - ckmc_raw_buffer_s encrypted, - ffi.Pointer> ppdecrypted, - ) { - return _ckmc_decrypt_data( - params, - key_alias, - password, - encrypted, - ppdecrypted, - ); - } - - late final _ckmc_decrypt_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ckmc_param_list_h, - ffi.Pointer, - ffi.Pointer, - ckmc_raw_buffer_s, - ffi.Pointer>)>>( - 'ckmc_decrypt_data'); - late final _ckmc_decrypt_data = _ckmc_decrypt_dataPtr.asFunction< - int Function( - ckmc_param_list_h, - ffi.Pointer, - ffi.Pointer, - ckmc_raw_buffer_s, - ffi.Pointer>)>(); - - /// @brief Checks if an application, which calls this function, has permission to use the - /// given privilege. - /// - /// @since_tizen 4.0 - /// - /// @param[in] privilege The privilege that is to be checked. - /// @param[out] result The result of the privilege check. - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_NONE Successful - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_UNKNOWN Unknown error - int ppm_check_permission( - ffi.Pointer privilege, - ffi.Pointer result, - ) { - return _ppm_check_permission( - privilege, - result, - ); - } - - late final _ppm_check_permissionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('ppm_check_permission'); - late final _ppm_check_permission = _ppm_check_permissionPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Requests a user's response to obtain permission for using the given privilege. - /// - /// @details When this function is called, an underlying service may show an appropriate - /// UI dialogue box (pop-up) with a question about granting the application access - /// to the given privilege. Once a user makes a decision, the service may modify - /// the privacy policy (when it is a definitive decision). After that, the service - /// sends the response back to the application. The possible response values are as follows: - /// #PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_ALLOW_FOREVER\n - /// #PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_DENY_FOREVER\n - /// #PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_DENY_ONCE\n - /// The application receives #PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_DENY_ONCE value after - /// pressing 'Deny' button while not having selected the 'Don't ask again?' checkbox. If the device - /// has the home and back buttons, pressing either of them gives the - /// #PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_DENY_ONCE response. - /// The application is informed about the user's decision by invoking ppm_request_response_cb(). - /// When a privacy policy for the given privilege has already been resolved, no pop-up will - /// be shown and the service will reply immediately with an appropriate result: - /// #PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_ALLOW_FOREVER\n - /// #PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_DENY_FOREVER\n - /// - /// @since_tizen 4.0 - /// - /// @remarks Before calling this function, call ppm_check_permission() to check if the application has - /// permission to use the given privilege. If the result of calling ppm_check_permission() is - /// #PRIVACY_PRIVILEGE_MANAGER_CHECK_RESULT_ASK, the application should call - /// this function to determine access to the privilege. - /// - /// @param[in] privilege The given privilege for which a pop-up must be shown. - /// @param[in] callback The given callback function which will be invoked - /// when the API receives a response. - /// @param[in] user_data User specific data which will be passed to - /// the given callback. - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_NONE Successful - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_ALREADY_IN_PROGRESS Operation already in progress - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_UNKNOWN Unknown error - /// - /// @post ppm_request_response_cb() will be invoked. - /// @see ppm_request_response_cb() - int ppm_request_permission( - ffi.Pointer privilege, - ppm_request_response_cb callback, - ffi.Pointer user_data, - ) { - return _ppm_request_permission( - privilege, - callback, - user_data, - ); - } - - late final _ppm_request_permissionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ppm_request_response_cb, - ffi.Pointer)>>('ppm_request_permission'); - late final _ppm_request_permission = _ppm_request_permissionPtr.asFunction< - int Function(ffi.Pointer, ppm_request_response_cb, - ffi.Pointer)>(); - - /// @brief Gets the display name of the given privilege. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @remarks @a display_name must be released using free(). - /// @param[in] api_version The API version of the application to get privilege information - /// @param[in] privilege The privilege - /// @param[out] display_name The display name of the privilege - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PRVINFO_ERROR_NONE Successful - /// @retval #PRVINFO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PRVINFO_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #PRVINFO_ERROR_INTERNAL_ERROR Unknown error - int privilege_info_get_display_name( - ffi.Pointer api_version, - ffi.Pointer privilege, - ffi.Pointer> display_name, - ) { - return _privilege_info_get_display_name( - api_version, - privilege, - display_name, - ); - } - - late final _privilege_info_get_display_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>( - 'privilege_info_get_display_name'); - late final _privilege_info_get_display_name = - _privilege_info_get_display_namePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets the display name of the given privilege. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @remarks @a display_name must be released using free(). - /// @remarks package_type must be one of followings: PRVINFO_PACKAGE_TYPE_NATIVE, PRVINFO_PACKAGE_TYPE_WEB - /// @param[in] package_type The type of application package - /// @param[in] api_version The API version of the application to get privilege information - /// @param[in] privilege The privilege - /// @param[out] display_name The display name of the privilege - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PRVINFO_ERROR_NONE Successful - /// @retval #PRVINFO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PRVINFO_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #PRVINFO_ERROR_INTERNAL_ERROR Unknown error - int privilege_info_get_display_name_by_pkgtype( - ffi.Pointer package_type, - ffi.Pointer api_version, - ffi.Pointer privilege, - ffi.Pointer> display_name, - ) { - return _privilege_info_get_display_name_by_pkgtype( - package_type, - api_version, - privilege, - display_name, - ); - } - - late final _privilege_info_get_display_name_by_pkgtypePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>>( - 'privilege_info_get_display_name_by_pkgtype'); - late final _privilege_info_get_display_name_by_pkgtype = - _privilege_info_get_display_name_by_pkgtypePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Gets the description of the given privilege. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @remarks @a description must be released using free(). - /// @param[in] api_version The API version of the application to get privilege information - /// @param[in] privilege The privilege - /// @param[out] description The description of the privilege - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PRVINFO_ERROR_NONE Successful - /// @retval #PRVINFO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PRVINFO_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #PRVINFO_ERROR_INTERNAL_ERROR Unknown error - int privilege_info_get_description( - ffi.Pointer api_version, - ffi.Pointer privilege, - ffi.Pointer> description, - ) { - return _privilege_info_get_description( - api_version, - privilege, - description, - ); - } - - late final _privilege_info_get_descriptionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>( - 'privilege_info_get_description'); - late final _privilege_info_get_description = - _privilege_info_get_descriptionPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets the description of the given privilege. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @remarks @a description must be released using free(). - /// @remarks package_type must be one of followings: PRVINFO_PACKAGE_TYPE_NATIVE, PRVINFO_PACKAGE_TYPE_WEB - /// @param[in] package_type The type of application package - /// @param[in] api_version The API version of the application to get privilege information - /// @param[in] privilege The privilege - /// @param[out] description The description of the privilege - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PRVINFO_ERROR_NONE Successful - /// @retval #PRVINFO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PRVINFO_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #PRVINFO_ERROR_INTERNAL_ERROR Unknown error - int privilege_info_get_description_by_pkgtype( - ffi.Pointer package_type, - ffi.Pointer api_version, - ffi.Pointer privilege, - ffi.Pointer> description, - ) { - return _privilege_info_get_description_by_pkgtype( - package_type, - api_version, - privilege, - description, - ); - } - - late final _privilege_info_get_description_by_pkgtypePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>>( - 'privilege_info_get_description_by_pkgtype'); - late final _privilege_info_get_description_by_pkgtype = - _privilege_info_get_description_by_pkgtypePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Gets the display name of the privacy group in which the given privilege is included. - /// @since_tizen 3.0 - /// @remarks @a privacy_name must be released using free(). - /// @remarks @a privilege must be privacy related, otherwise #PRVINFO_ERROR_INVALID_PARAMETER is returned. - /// @param[in] privilege The privilege - /// @param[out] privacy_name The privacy group's display name that the given privilege is included in - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PRVINFO_ERROR_NONE Successful - /// @retval #PRVINFO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PRVINFO_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #PRVINFO_ERROR_INTERNAL_ERROR Unknown error - int privilege_info_get_privacy_display_name( - ffi.Pointer privilege, - ffi.Pointer> privacy_name, - ) { - return _privilege_info_get_privacy_display_name( - privilege, - privacy_name, - ); - } - - late final _privilege_info_get_privacy_display_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer>)>>( - 'privilege_info_get_privacy_display_name'); - late final _privilege_info_get_privacy_display_name = - _privilege_info_get_privacy_display_namePtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Gets the status of the given privacy related privilege. - /// @since_tizen 3.0 - /// @remarks @a privilege must be privacy related, otherwise #PRVINFO_ERROR_INVALID_PARAMETER is returned. - /// In case of errors, @a status is set to @c true. - /// @param[in] privilege The privilege - /// @param[out] status @c true if the privilege is on, - /// and @c false if the privilege is off - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PRVINFO_ERROR_NONE Successful - /// @retval #PRVINFO_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #PRVINFO_ERROR_INTERNAL_ERROR Unknown error - int privilege_info_get_privacy_privilege_status( - ffi.Pointer privilege, - ffi.Pointer status, - ) { - return _privilege_info_get_privacy_privilege_status( - privilege, - status, - ); - } - - late final _privilege_info_get_privacy_privilege_statusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>>( - 'privilege_info_get_privacy_privilege_status'); - late final _privilege_info_get_privacy_privilege_status = - _privilege_info_get_privacy_privilege_statusPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Initializes the library. Must be called before any other crypto - /// function. Should be called once in each thread that uses yaca. - /// - /// @since_tizen 3.0 - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_cleanup() - int yaca_initialize() { - return _yaca_initialize(); - } - - late final _yaca_initializePtr = - _lookup>('yaca_initialize'); - late final _yaca_initialize = - _yaca_initializePtr.asFunction(); - - /// @brief Cleans up the library. Must be called before exiting the thread that - /// called yaca_initialize(). - /// - /// @since_tizen 3.0 - /// - /// @see yaca_initialize() - void yaca_cleanup() { - return _yaca_cleanup(); - } - - late final _yaca_cleanupPtr = - _lookup>('yaca_cleanup'); - late final _yaca_cleanup = _yaca_cleanupPtr.asFunction(); - - /// @brief Allocates the memory. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a memory should be freed using yaca_free(). - /// - /// @param[in] size Size of the allocation (bytes) - /// @param[out] memory Allocated memory - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// - /// @see yaca_zalloc() - /// @see yaca_realloc() - /// @see yaca_free() - int yaca_malloc( - int size, - ffi.Pointer> memory, - ) { - return _yaca_malloc( - size, - memory, - ); - } - - late final _yaca_mallocPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Size, ffi.Pointer>)>>('yaca_malloc'); - late final _yaca_malloc = _yaca_mallocPtr - .asFunction>)>(); - - /// @brief Allocates the zeroed memory. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a memory should be freed using yaca_free(). - /// - /// @param[in] size Size of the allocation (bytes) - /// @param[out] memory Allocated memory - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// - /// @see yaca_malloc() - /// @see yaca_realloc() - /// @see yaca_free() - int yaca_zalloc( - int size, - ffi.Pointer> memory, - ) { - return _yaca_zalloc( - size, - memory, - ); - } - - late final _yaca_zallocPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Size, ffi.Pointer>)>>('yaca_zalloc'); - late final _yaca_zalloc = _yaca_zallocPtr - .asFunction>)>(); - - /// @brief Re-allocates the memory. - /// - /// @since_tizen 3.0 - /// - /// @remarks In case of failure the function doesn't free the memory pointed by @a memory. - /// - /// @remarks If @a memory is NULL then the call is equivalent to yaca_malloc(). - /// - /// @remarks If the function fails the contents of @a memory will be left unchanged. - /// - /// @remarks The @a memory should be freed using yaca_free(). - /// - /// @param[in] size Size of the new allocation (bytes) - /// @param[in,out] memory Memory to be reallocated - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// - /// @see yaca_malloc() - /// @see yaca_zalloc() - /// @see yaca_free() - int yaca_realloc( - int size, - ffi.Pointer> memory, - ) { - return _yaca_realloc( - size, - memory, - ); - } - - late final _yaca_reallocPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Size, ffi.Pointer>)>>('yaca_realloc'); - late final _yaca_realloc = _yaca_reallocPtr - .asFunction>)>(); - - /// @brief Frees the memory allocated by yaca_malloc(), yaca_zalloc(), - /// yaca_realloc() or one of the cryptographic operations. - /// - /// @since_tizen 3.0 - /// - /// @param[in] memory Pointer to the memory to be freed - /// - /// @see yaca_malloc() - /// @see yaca_zalloc() - /// @see yaca_realloc() - void yaca_free( - ffi.Pointer memory, - ) { - return _yaca_free( - memory, - ); - } - - late final _yaca_freePtr = - _lookup)>>( - 'yaca_free'); - late final _yaca_free = - _yaca_freePtr.asFunction)>(); - - /// @brief Safely compares first @a len bytes of two buffers. - /// - /// @since_tizen 3.0 - /// - /// @param[in] first Pointer to the first buffer - /// @param[in] second Pointer to the second buffer - /// @param[in] len Length to compare - /// - /// @return #YACA_ERROR_NONE when buffers are equal otherwise #YACA_ERROR_DATA_MISMATCH - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0) - /// @retval #YACA_ERROR_DATA_MISMATCH Buffers are different - int yaca_memcmp( - ffi.Pointer first, - ffi.Pointer second, - int len, - ) { - return _yaca_memcmp( - first, - second, - len, - ); - } - - late final _yaca_memcmpPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('yaca_memcmp'); - late final _yaca_memcmp = _yaca_memcmpPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); - - /// @brief Generates random data. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] data Pointer to the memory to be randomized - /// @param[in] data_len Length of the memory to be randomized - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0) - /// @retval #YACA_ERROR_INTERNAL Internal error - int yaca_randomize_bytes( - ffi.Pointer data, - int data_len, - ) { - return _yaca_randomize_bytes( - data, - data_len, - ); - } - - late final _yaca_randomize_bytesPtr = _lookup< - ffi - .NativeFunction, ffi.Size)>>( - 'yaca_randomize_bytes'); - late final _yaca_randomize_bytes = _yaca_randomize_bytesPtr - .asFunction, int)>(); - - /// @brief Sets the non-standard context properties. Can only be called on an - /// initialized context. - /// - /// @remarks The @a value has to be of type appropriate for given property. See #yaca_property_e - /// for details on corresponding types. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] ctx Previously initialized crypto context - /// @param[in] property Property to be set - /// @param[in] value Property value - /// @param[in] value_len Length of the property value - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0, - /// invalid @a ctx or @a property) - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_property_e - /// @see yaca_context_get_property() - int yaca_context_set_property( - yaca_context_h ctx, - int property, - ffi.Pointer value, - int value_len, - ) { - return _yaca_context_set_property( - ctx, - property, - value, - value_len, - ); - } - - late final _yaca_context_set_propertyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_context_h, ffi.Int32, ffi.Pointer, - ffi.Size)>>('yaca_context_set_property'); - late final _yaca_context_set_property = - _yaca_context_set_propertyPtr.asFunction< - int Function(yaca_context_h, int, ffi.Pointer, int)>(); - - /// @brief Returns the non-standard context properties. Can only be called on an - /// initialized context. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a value should be freed using yaca_free(). - /// - /// @remarks The @a value has to be of type appropriate for given property. See #yaca_property_e - /// for details on corresponding types. - /// - /// @remarks The @a value_len can be NULL if returned @a value is a single object - /// (i.e. not an array/buffer). - /// - /// @param[in] ctx Previously initialized crypto context - /// @param[in] property Property to be read - /// @param[out] value Copy of the property value - /// @param[out] value_len Length of the property value will be returned here - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a ctx or @a property) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_property_e - /// @see yaca_context_set_property() - /// @see yaca_free() - int yaca_context_get_property( - yaca_context_h ctx, - int property, - ffi.Pointer> value, - ffi.Pointer value_len, - ) { - return _yaca_context_get_property( - ctx, - property, - value, - value_len, - ); - } - - late final _yaca_context_get_propertyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - yaca_context_h, - ffi.Int32, - ffi.Pointer>, - ffi.Pointer)>>('yaca_context_get_property'); - late final _yaca_context_get_property = - _yaca_context_get_propertyPtr.asFunction< - int Function(yaca_context_h, int, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Returns the minimum required size of the output buffer for a single crypto function call. - /// - /// @since_tizen 3.0 - /// - /// @remarks This function should be used to learn the required size of the output buffer - /// for a single function call (eg. *_update or *_finalize). The actual output length - /// (number of bytes that has been used) will be returned by the function call itself. - /// - /// @remarks In case the function call has no output (e.g. yaca_sign_update(), - /// yaca_digest_update()), there is no need to use this function. - /// - /// @remarks In case the function call has no input (eg. *_finalize), the value of - /// @a input_len has to be set to 0. - /// - /// @param[in] ctx Previously initialized crypto context - /// @param[in] input_len Length of the input data to be processed - /// @param[out] output_len Required length of the output - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a ctx or too big @a input_len) - /// @retval #YACA_ERROR_INTERNAL Internal error - int yaca_context_get_output_length( - yaca_context_h ctx, - int input_len, - ffi.Pointer output_len, - ) { - return _yaca_context_get_output_length( - ctx, - input_len, - output_len, - ); - } - - late final _yaca_context_get_output_lengthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_context_h, ffi.Size, - ffi.Pointer)>>('yaca_context_get_output_length'); - late final _yaca_context_get_output_length = - _yaca_context_get_output_lengthPtr.asFunction< - int Function(yaca_context_h, int, ffi.Pointer)>(); - - /// @brief Destroys the crypto context. Must be called on all contexts that are - /// no longer used. Passing #YACA_CONTEXT_NULL is allowed. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] ctx Crypto context - /// - /// @see #yaca_context_h - void yaca_context_destroy( - yaca_context_h ctx, - ) { - return _yaca_context_destroy( - ctx, - ); - } - - late final _yaca_context_destroyPtr = - _lookup>( - 'yaca_context_destroy'); - late final _yaca_context_destroy = - _yaca_context_destroyPtr.asFunction(); - - /// @brief Returns the recommended/default length of the Initialization Vector - /// for a given encryption configuration. - /// - /// @since_tizen 3.0 - /// - /// @remarks If returned @a iv_bit_len equals 0 that means that for this - /// specific algorithm and its parameters Initialization Vector is not used. - /// - /// @param[in] algo Encryption algorithm - /// @param[in] bcm Chain mode - /// @param[in] key_bit_len Key length in bits - /// @param[out] iv_bit_len Recommended Initialization Vector length in bits - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a algo, @a bcm or @a key_bit_len) - /// @retval #YACA_ERROR_INTERNAL Internal error - int yaca_encrypt_get_iv_bit_length( - int algo, - int bcm, - int key_bit_len, - ffi.Pointer iv_bit_len, - ) { - return _yaca_encrypt_get_iv_bit_length( - algo, - bcm, - key_bit_len, - iv_bit_len, - ); - } - - late final _yaca_encrypt_get_iv_bit_lengthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Int32, ffi.Size, - ffi.Pointer)>>('yaca_encrypt_get_iv_bit_length'); - late final _yaca_encrypt_get_iv_bit_length = - _yaca_encrypt_get_iv_bit_lengthPtr - .asFunction)>(); - - /// @brief Initializes an encryption context. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a ctx should be released using yaca_context_destroy(). - /// - /// @param[out] ctx Newly created context - /// @param[in] algo Encryption algorithm that will be used - /// @param[in] bcm Chaining mode that will be used - /// @param[in] sym_key Symmetric key that will be used - /// @param[in] iv Initialization Vector that will be used - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a algo, @a bcm, @a sym_key or @a iv) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_encrypt_algorithm_e - /// @see #yaca_block_cipher_mode_e - /// @see yaca_encrypt_update() - /// @see yaca_encrypt_finalize() - /// @see yaca_context_destroy() - int yaca_encrypt_initialize( - ffi.Pointer ctx, - int algo, - int bcm, - yaca_key_h sym_key, - yaca_key_h iv, - ) { - return _yaca_encrypt_initialize( - ctx, - algo, - bcm, - sym_key, - iv, - ); - } - - late final _yaca_encrypt_initializePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int32, ffi.Int32, - yaca_key_h, yaca_key_h)>>('yaca_encrypt_initialize'); - late final _yaca_encrypt_initialize = _yaca_encrypt_initializePtr.asFunction< - int Function( - ffi.Pointer, int, int, yaca_key_h, yaca_key_h)>(); - - /// @brief Encrypts chunk of the data. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] ctx Context created by yaca_encrypt_initialize() - /// @param[in] plaintext Plaintext to be encrypted - /// @param[in] plaintext_len Length of the plaintext - /// @param[out] ciphertext Buffer for the encrypted data - /// (must be allocated by client, see yaca_context_get_output_length()) - /// @param[out] ciphertext_len Length of the encrypted data, - /// actual number of bytes written will be returned here - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0, - /// invalid @a ctx) - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_encrypt_initialize() - /// @see yaca_encrypt_finalize() - /// @see yaca_context_get_output_length() - int yaca_encrypt_update( - yaca_context_h ctx, - ffi.Pointer plaintext, - int plaintext_len, - ffi.Pointer ciphertext, - ffi.Pointer ciphertext_len, - ) { - return _yaca_encrypt_update( - ctx, - plaintext, - plaintext_len, - ciphertext, - ciphertext_len, - ); - } - - late final _yaca_encrypt_updatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - yaca_context_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Pointer)>>('yaca_encrypt_update'); - late final _yaca_encrypt_update = _yaca_encrypt_updatePtr.asFunction< - int Function(yaca_context_h, ffi.Pointer, int, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Encrypts the final chunk of the data. - /// - /// @remarks Skipping yaca_encrypt_update() and calling only yaca_encrypt_finalize() will produce an - /// encryption of an empty message. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] ctx A valid encrypt context - /// @param[out] ciphertext Final piece of the encrypted data - /// (must be allocated by client, see yaca_context_get_output_length()) - /// @param[out] ciphertext_len Length of the final piece, - /// actual number of bytes written will be returned here - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a ctx) - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_encrypt_initialize() - /// @see yaca_encrypt_update() - /// @see yaca_context_get_output_length() - int yaca_encrypt_finalize( - yaca_context_h ctx, - ffi.Pointer ciphertext, - ffi.Pointer ciphertext_len, - ) { - return _yaca_encrypt_finalize( - ctx, - ciphertext, - ciphertext_len, - ); - } - - late final _yaca_encrypt_finalizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_context_h, ffi.Pointer, - ffi.Pointer)>>('yaca_encrypt_finalize'); - late final _yaca_encrypt_finalize = _yaca_encrypt_finalizePtr.asFunction< - int Function( - yaca_context_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Initializes an decryption context. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a ctx should be released using yaca_context_destroy(). - /// - /// @param[out] ctx Newly created context - /// @param[in] algo Encryption algorithm that was used to encrypt the data - /// @param[in] bcm Chaining mode that was used to encrypt the data - /// @param[in] sym_key Symmetric key that was used to encrypt the data - /// @param[in] iv Initialization Vector that was used to encrypt the data - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a algo, @a bcm, @a sym_key or @a iv) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_encrypt_algorithm_e - /// @see #yaca_block_cipher_mode_e - /// @see yaca_decrypt_update() - /// @see yaca_decrypt_finalize() - /// @see yaca_context_destroy() - int yaca_decrypt_initialize( - ffi.Pointer ctx, - int algo, - int bcm, - yaca_key_h sym_key, - yaca_key_h iv, - ) { - return _yaca_decrypt_initialize( - ctx, - algo, - bcm, - sym_key, - iv, - ); - } - - late final _yaca_decrypt_initializePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int32, ffi.Int32, - yaca_key_h, yaca_key_h)>>('yaca_decrypt_initialize'); - late final _yaca_decrypt_initialize = _yaca_decrypt_initializePtr.asFunction< - int Function( - ffi.Pointer, int, int, yaca_key_h, yaca_key_h)>(); - - /// @brief Decrypts chunk of the data. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] ctx Context created by yaca_decrypt_initialize() - /// @param[in] ciphertext Ciphertext to be decrypted - /// @param[in] ciphertext_len Length of the ciphertext - /// @param[out] plaintext Buffer for the decrypted data - /// (must be allocated by client, see yaca_context_get_output_length()) - /// @param[out] plaintext_len Length of the decrypted data, - /// actual number of bytes written will be returned here - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0, - /// invalid @a ctx), wrong #YACA_PROPERTY_CCM_AAD or - /// wrong #YACA_PROPERTY_CCM_TAG was used - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_decrypt_initialize() - /// @see yaca_decrypt_finalize() - /// @see yaca_context_get_output_length() - int yaca_decrypt_update( - yaca_context_h ctx, - ffi.Pointer ciphertext, - int ciphertext_len, - ffi.Pointer plaintext, - ffi.Pointer plaintext_len, - ) { - return _yaca_decrypt_update( - ctx, - ciphertext, - ciphertext_len, - plaintext, - plaintext_len, - ); - } - - late final _yaca_decrypt_updatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - yaca_context_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Pointer)>>('yaca_decrypt_update'); - late final _yaca_decrypt_update = _yaca_decrypt_updatePtr.asFunction< - int Function(yaca_context_h, ffi.Pointer, int, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Decrypts the final chunk of the data. - /// - /// @remarks Skipping yaca_decrypt_update() and calling only yaca_decrypt_finalize() will produce a - /// decryption of an empty ciphertext. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] ctx A valid decrypt context - /// @param[out] plaintext Final piece of the decrypted data - /// (must be allocated by client, see yaca_context_get_output_length()) - /// @param[out] plaintext_len Length of the final piece, - /// actual number of bytes written will be returned here - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a ctx), wrong #YACA_PROPERTY_GCM_AAD or - /// wrong #YACA_PROPERTY_GCM_TAG was used - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_decrypt_initialize() - /// @see yaca_decrypt_update() - /// @see yaca_context_get_output_length() - int yaca_decrypt_finalize( - yaca_context_h ctx, - ffi.Pointer plaintext, - ffi.Pointer plaintext_len, - ) { - return _yaca_decrypt_finalize( - ctx, - plaintext, - plaintext_len, - ); - } - - late final _yaca_decrypt_finalizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_context_h, ffi.Pointer, - ffi.Pointer)>>('yaca_decrypt_finalize'); - late final _yaca_decrypt_finalize = _yaca_decrypt_finalizePtr.asFunction< - int Function( - yaca_context_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Initializes an asymmetric encryption context and generates - /// symmetric key and Initialization Vector. - /// - /// @remarks Generated symmetric key is encrypted with public key, - /// so can be only used with yaca_open_initialize(). It can be exported, - /// but after import it can be only used with yaca_open_initialize() as well. - /// - /// @remarks The @a ctx should be released using yaca_context_destroy(). - /// - /// @remarks The @a pub_key must be #YACA_KEY_TYPE_RSA_PUB. - /// - /// @remarks The @a sym_key_bit_len must be at least 88 bits shorter than the @a pub_key bit length. - /// - /// @remarks The @a sym_key should be released using yaca_key_destroy(). - /// - /// @remarks The @a iv should be released using yaca_key_destroy(). - /// - /// @since_tizen 3.0 - /// - /// @param[out] ctx Newly created context - /// @param[in] pub_key Public key of the peer that will receive the encrypted data - /// @param[in] algo Symmetric algorithm that will be used - /// @param[in] bcm Block chaining mode for the symmetric algorithm - /// @param[in] sym_key_bit_len Symmetric key length (in bits) that will be generated - /// @param[out] sym_key Generated symmetric key that will be used, - /// it is encrypted with peer's public key - /// @param[out] iv Generated Initialization Vector that will be used - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a algo, @a bcm, @a sym_key_bit_len or @a pub_key) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_encrypt_algorithm_e - /// @see #yaca_block_cipher_mode_e - /// @see #yaca_key_bit_length_e - /// @see yaca_seal_update() - /// @see yaca_seal_finalize() - /// @see yaca_open_initialize() - /// @see yaca_key_destroy() - /// @see yaca_context_destroy() - int yaca_seal_initialize( - ffi.Pointer ctx, - yaca_key_h pub_key, - int algo, - int bcm, - int sym_key_bit_len, - ffi.Pointer sym_key, - ffi.Pointer iv, - ) { - return _yaca_seal_initialize( - ctx, - pub_key, - algo, - bcm, - sym_key_bit_len, - sym_key, - iv, - ); - } - - late final _yaca_seal_initializePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - yaca_key_h, - ffi.Int32, - ffi.Int32, - ffi.Size, - ffi.Pointer, - ffi.Pointer)>>('yaca_seal_initialize'); - late final _yaca_seal_initialize = _yaca_seal_initializePtr.asFunction< - int Function(ffi.Pointer, yaca_key_h, int, int, int, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Encrypts piece of the data. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] ctx Context created by yaca_seal_initialize() - /// @param[in] plaintext Plaintext to be encrypted - /// @param[in] plaintext_len Length of the plaintext - /// @param[out] ciphertext Buffer for the encrypted data - /// (must be allocated by client, see yaca_context_get_output_length()) - /// @param[out] ciphertext_len Length of the encrypted data, - /// actual number of bytes written will be returned here - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0, - /// invalid @a ctx) - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_seal_initialize() - /// @see yaca_seal_finalize() - /// @see yaca_context_get_output_length() - int yaca_seal_update( - yaca_context_h ctx, - ffi.Pointer plaintext, - int plaintext_len, - ffi.Pointer ciphertext, - ffi.Pointer ciphertext_len, - ) { - return _yaca_seal_update( - ctx, - plaintext, - plaintext_len, - ciphertext, - ciphertext_len, - ); - } - - late final _yaca_seal_updatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - yaca_context_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Pointer)>>('yaca_seal_update'); - late final _yaca_seal_update = _yaca_seal_updatePtr.asFunction< - int Function(yaca_context_h, ffi.Pointer, int, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Encrypts the final piece of the data. - /// - /// @remarks Skipping yaca_seal_update() and calling only yaca_seal_finalize() will produce an - /// encryption of an empty message. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] ctx A valid seal context - /// @param[out] ciphertext Final piece of the encrypted data - /// (must be allocated by client, see yaca_context_get_output_length()) - /// @param[out] ciphertext_len Length of the final piece, - /// actual number of bytes written will be returned here - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a ctx) - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_seal_initialize() - /// @see yaca_seal_update() - /// @see yaca_context_get_output_length() - int yaca_seal_finalize( - yaca_context_h ctx, - ffi.Pointer ciphertext, - ffi.Pointer ciphertext_len, - ) { - return _yaca_seal_finalize( - ctx, - ciphertext, - ciphertext_len, - ); - } - - late final _yaca_seal_finalizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_context_h, ffi.Pointer, - ffi.Pointer)>>('yaca_seal_finalize'); - late final _yaca_seal_finalize = _yaca_seal_finalizePtr.asFunction< - int Function( - yaca_context_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Initializes an asymmetric decryption context. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a ctx should be released using yaca_context_destroy(). - /// - /// @remarks The @a prv_key must be #YACA_KEY_TYPE_RSA_PRIV. - /// - /// @param[out] ctx Newly created context - /// @param[in] prv_key Private key, part of the pair that was used for the encryption - /// @param[in] algo Symmetric algorithm that was used for the encryption - /// @param[in] bcm Block chaining mode for the symmetric algorithm - /// @param[in] sym_key_bit_len Symmetric key length (in bits) that was used for the encryption - /// @param[in] sym_key Symmetric key, encrypted with the public key, - /// that was used to encrypt the data - /// @param[in] iv Initialization Vector that was used for the encryption - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, invalid - /// @a algo, @a bcm, @a sym_key_bit_len, @a prv_key, - /// @a sym_key or @a iv) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_encrypt_algorithm_e - /// @see #yaca_block_cipher_mode_e - /// @see #yaca_key_bit_length_e - /// @see yaca_open_update() - /// @see yaca_open_finalize() - /// @see yaca_context_destroy() - int yaca_open_initialize( - ffi.Pointer ctx, - yaca_key_h prv_key, - int algo, - int bcm, - int sym_key_bit_len, - yaca_key_h sym_key, - yaca_key_h iv, - ) { - return _yaca_open_initialize( - ctx, - prv_key, - algo, - bcm, - sym_key_bit_len, - sym_key, - iv, - ); - } - - late final _yaca_open_initializePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - yaca_key_h, - ffi.Int32, - ffi.Int32, - ffi.Size, - yaca_key_h, - yaca_key_h)>>('yaca_open_initialize'); - late final _yaca_open_initialize = _yaca_open_initializePtr.asFunction< - int Function(ffi.Pointer, yaca_key_h, int, int, int, - yaca_key_h, yaca_key_h)>(); - - /// @brief Decrypts piece of the data. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] ctx Context created by yaca_open_initialize() - /// @param[in] ciphertext Ciphertext to be decrypted - /// @param[in] ciphertext_len Length of the ciphertext - /// @param[out] plaintext Buffer for the decrypted data - /// (must be allocated by client, see yaca_context_get_output_length()) - /// @param[out] plaintext_len Length of the decrypted data, - /// actual number of bytes written will be returned here - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0, - /// invalid @a ctx), wrong #YACA_PROPERTY_CCM_AAD or - /// wrong #YACA_PROPERTY_CCM_TAG was used - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_open_initialize() - /// @see yaca_open_finalize() - /// @see yaca_context_get_output_length() - int yaca_open_update( - yaca_context_h ctx, - ffi.Pointer ciphertext, - int ciphertext_len, - ffi.Pointer plaintext, - ffi.Pointer plaintext_len, - ) { - return _yaca_open_update( - ctx, - ciphertext, - ciphertext_len, - plaintext, - plaintext_len, - ); - } - - late final _yaca_open_updatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - yaca_context_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Pointer)>>('yaca_open_update'); - late final _yaca_open_update = _yaca_open_updatePtr.asFunction< - int Function(yaca_context_h, ffi.Pointer, int, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Decrypts last chunk of sealed message. - /// - /// @remarks Skipping yaca_open_update() and calling only yaca_open_finalize() will produce a - /// decryption of an empty ciphertext. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] ctx A valid open context - /// @param[out] plaintext Final piece of the decrypted data - /// (must be allocated by client, see yaca_context_get_output_length()) - /// @param[out] plaintext_len Length of the final piece, - /// actual number of bytes written will be returned here - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a ctx), wrong #YACA_PROPERTY_GCM_AAD or - /// wrong #YACA_PROPERTY_GCM_TAG was used - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_open_initialize() - /// @see yaca_open_update() - /// @see yaca_context_get_output_length() - int yaca_open_finalize( - yaca_context_h ctx, - ffi.Pointer plaintext, - ffi.Pointer plaintext_len, - ) { - return _yaca_open_finalize( - ctx, - plaintext, - plaintext_len, - ); - } - - late final _yaca_open_finalizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_context_h, ffi.Pointer, - ffi.Pointer)>>('yaca_open_finalize'); - late final _yaca_open_finalize = _yaca_open_finalizePtr.asFunction< - int Function( - yaca_context_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Initializes a signature context for asymmetric signatures. - /// - /// @since_tizen 3.0 - /// - /// @remarks For verification use yaca_verify_initialize(), yaca_verify_update() and - /// yaca_verify_finalize() functions with matching public key. - /// - /// @remarks For RSA operations the default padding used is #YACA_PADDING_PKCS1. It can be - /// changed using yaca_context_set_property() with #YACA_PROPERTY_PADDING. - /// - /// @remarks For #YACA_DIGEST_SHA384 and #YACA_DIGEST_SHA512 the RSA key size must be bigger than - /// #YACA_KEY_LENGTH_512BIT. - /// - /// @remarks Using of #YACA_DIGEST_MD5 algorithm for DSA and ECDSA operations is prohibited. - /// - /// @remarks Using of #YACA_DIGEST_MD5 or #YACA_DIGEST_SHA224 with #YACA_PADDING_X931 is prohibited. - /// - /// @remarks The @a ctx should be released using yaca_context_destroy(). - /// - /// @param[out] ctx Newly created context - /// @param[in] algo Digest algorithm that will be used - /// @param[in] prv_key Private key that will be used, algorithm is deduced based - /// on key type, supported key types: - /// - #YACA_KEY_TYPE_RSA_PRIV, - /// - #YACA_KEY_TYPE_DSA_PRIV, - /// - #YACA_KEY_TYPE_EC_PRIV - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a algo or @a prv_key) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_type_e - /// @see #yaca_digest_algorithm_e - /// @see #yaca_padding_e - /// @see yaca_context_set_property() - /// @see yaca_sign_update() - /// @see yaca_sign_finalize() - /// @see yaca_verify_initialize() - /// @see yaca_verify_update() - /// @see yaca_verify_finalize() - /// @see yaca_context_destroy() - int yaca_sign_initialize( - ffi.Pointer ctx, - int algo, - yaca_key_h prv_key, - ) { - return _yaca_sign_initialize( - ctx, - algo, - prv_key, - ); - } - - late final _yaca_sign_initializePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int32, - yaca_key_h)>>('yaca_sign_initialize'); - late final _yaca_sign_initialize = _yaca_sign_initializePtr - .asFunction, int, yaca_key_h)>(); - - /// @brief Initializes a signature context for HMAC. - /// - /// @since_tizen 3.0 - /// - /// @remarks For verification, calculate message HMAC and compare with received MAC using - /// yaca_memcmp(). - /// - /// @remarks The @a ctx should be released using yaca_context_destroy(). - /// - /// @param[out] ctx Newly created context - /// @param[in] algo Digest algorithm that will be used - /// @param[in] sym_key Symmetric key that will be used, supported key types: - /// - #YACA_KEY_TYPE_SYMMETRIC, - /// - #YACA_KEY_TYPE_DES - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a algo or @a sym_key) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_type_e - /// @see #yaca_digest_algorithm_e - /// @see yaca_sign_update() - /// @see yaca_sign_finalize() - /// @see yaca_memcmp() - /// @see yaca_context_destroy() - int yaca_sign_initialize_hmac( - ffi.Pointer ctx, - int algo, - yaca_key_h sym_key, - ) { - return _yaca_sign_initialize_hmac( - ctx, - algo, - sym_key, - ); - } - - late final _yaca_sign_initialize_hmacPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int32, - yaca_key_h)>>('yaca_sign_initialize_hmac'); - late final _yaca_sign_initialize_hmac = _yaca_sign_initialize_hmacPtr - .asFunction, int, yaca_key_h)>(); - - /// @brief Initializes a signature context for CMAC. - /// - /// @since_tizen 3.0 - /// - /// @remarks For verification, calculate message CMAC and compare with received MAC using - /// yaca_memcmp(). - /// - /// @remarks The @a ctx should be released using yaca_context_destroy(). - /// - /// @param[out] ctx Newly created context - /// @param[in] algo Encryption algorithm that will be used - /// @param[in] sym_key Symmetric key that will be used, supported key types: - /// - #YACA_KEY_TYPE_SYMMETRIC, - /// - #YACA_KEY_TYPE_DES - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a algo or @a sym_key) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_type_e - /// @see #yaca_encrypt_algorithm_e - /// @see yaca_sign_update() - /// @see yaca_sign_finalize() - /// @see yaca_memcmp() - /// @see yaca_context_destroy() - int yaca_sign_initialize_cmac( - ffi.Pointer ctx, - int algo, - yaca_key_h sym_key, - ) { - return _yaca_sign_initialize_cmac( - ctx, - algo, - sym_key, - ); - } - - late final _yaca_sign_initialize_cmacPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int32, - yaca_key_h)>>('yaca_sign_initialize_cmac'); - late final _yaca_sign_initialize_cmac = _yaca_sign_initialize_cmacPtr - .asFunction, int, yaca_key_h)>(); - - /// @brief Feeds the message into the digital signature or MAC algorithm. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] ctx Context created by yaca_sign_initialize(), - /// yaca_sign_initialize_hmac() or yaca_sign_initialize_cmac() - /// @param[in] message Message to be signed - /// @param[in] message_len Length of the message - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0, - /// invalid @a ctx) - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_sign_initialize() - /// @see yaca_sign_finalize() - /// @see yaca_sign_initialize_hmac() - /// @see yaca_sign_initialize_cmac() - int yaca_sign_update( - yaca_context_h ctx, - ffi.Pointer message, - int message_len, - ) { - return _yaca_sign_update( - ctx, - message, - message_len, - ); - } - - late final _yaca_sign_updatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_context_h, ffi.Pointer, - ffi.Size)>>('yaca_sign_update'); - late final _yaca_sign_update = _yaca_sign_updatePtr - .asFunction, int)>(); - - /// @brief Calculates the final signature or MAC. - /// - /// @since_tizen 3.0 - /// - /// @remarks Skipping yaca_sign_update() and calling only yaca_sign_finalize() will produce a - /// signature or MAC of an empty message. - /// - /// @param[in,out] ctx A valid sign context - /// @param[out] signature Buffer for the MAC or the message signature - /// (must be allocated by client, see yaca_context_get_output_length()) - /// @param[out] signature_len Length of the MAC or the signature, - /// actual number of bytes written will be returned here - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a ctx) - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_sign_initialize() - /// @see yaca_sign_update() - /// @see yaca_sign_initialize_hmac() - /// @see yaca_sign_initialize_cmac() - /// @see yaca_context_get_output_length() - int yaca_sign_finalize( - yaca_context_h ctx, - ffi.Pointer signature, - ffi.Pointer signature_len, - ) { - return _yaca_sign_finalize( - ctx, - signature, - signature_len, - ); - } - - late final _yaca_sign_finalizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_context_h, ffi.Pointer, - ffi.Pointer)>>('yaca_sign_finalize'); - late final _yaca_sign_finalize = _yaca_sign_finalizePtr.asFunction< - int Function( - yaca_context_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Initializes a signature verification context for asymmetric signatures. - /// - /// @since_tizen 3.0 - /// - /// @remarks For RSA operations the default padding used is #YACA_PADDING_PKCS1. It can be - /// changed using yaca_context_set_property() with #YACA_PROPERTY_PADDING. - /// For verify to succeed it has to be set to the same value it was signed with. - /// - /// @remarks The @a ctx should be released using yaca_context_destroy(). - /// - /// @param[out] ctx Newly created context - /// @param[in] algo Digest algorithm that will be used - /// @param[in] pub_key Public key that will be used, algorithm is deduced based on - /// key type, supported key types: - /// - #YACA_KEY_TYPE_RSA_PUB, - /// - #YACA_KEY_TYPE_DSA_PUB, - /// - #YACA_KEY_TYPE_EC_PUB - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a algo or @a pub_key) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_type_e - /// @see #yaca_digest_algorithm_e - /// @see #yaca_padding_e - /// @see yaca_context_set_property() - /// @see yaca_verify_update() - /// @see yaca_verify_finalize() - /// @see yaca_context_destroy() - int yaca_verify_initialize( - ffi.Pointer ctx, - int algo, - yaca_key_h pub_key, - ) { - return _yaca_verify_initialize( - ctx, - algo, - pub_key, - ); - } - - late final _yaca_verify_initializePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int32, - yaca_key_h)>>('yaca_verify_initialize'); - late final _yaca_verify_initialize = _yaca_verify_initializePtr - .asFunction, int, yaca_key_h)>(); - - /// @brief Feeds the message into the digital signature verification algorithm. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] ctx Context created by yaca_verify_initialize() - /// @param[in] message Message - /// @param[in] message_len Length of the message - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0, - /// invalid @a ctx) - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_verify_initialize() - /// @see yaca_verify_finalize() - int yaca_verify_update( - yaca_context_h ctx, - ffi.Pointer message, - int message_len, - ) { - return _yaca_verify_update( - ctx, - message, - message_len, - ); - } - - late final _yaca_verify_updatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_context_h, ffi.Pointer, - ffi.Size)>>('yaca_verify_update'); - late final _yaca_verify_update = _yaca_verify_updatePtr - .asFunction, int)>(); - - /// @brief Performs the verification. - /// - /// @since_tizen 3.0 - /// - /// @remarks Skipping yaca_verify_update() and calling only yaca_verify_finalize() will verify - /// the signature of an empty message. - /// - /// @param[in,out] ctx A valid verify context - /// @param[in] signature Message signature to be verified - /// @param[in] signature_len Length of the signature - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a ctx) - /// @retval #YACA_ERROR_INTERNAL Internal error - /// @retval #YACA_ERROR_DATA_MISMATCH The verification failed - /// - /// @see yaca_verify_initialize() - /// @see yaca_verify_update() - /// @see yaca_sign_finalize() - int yaca_verify_finalize( - yaca_context_h ctx, - ffi.Pointer signature, - int signature_len, - ) { - return _yaca_verify_finalize( - ctx, - signature, - signature_len, - ); - } - - late final _yaca_verify_finalizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_context_h, ffi.Pointer, - ffi.Size)>>('yaca_verify_finalize'); - late final _yaca_verify_finalize = _yaca_verify_finalizePtr - .asFunction, int)>(); - - /// @brief Initializes a digest context. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a ctx should be released using yaca_context_destroy(). - /// - /// @param[out] ctx Newly created context - /// @param[in] algo Digest algorithm that will be used - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a algo) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_digest_algorithm_e - /// @see yaca_digest_update() - /// @see yaca_digest_finalize() - /// @see yaca_context_destroy() - int yaca_digest_initialize( - ffi.Pointer ctx, - int algo, - ) { - return _yaca_digest_initialize( - ctx, - algo, - ); - } - - late final _yaca_digest_initializePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Int32)>>('yaca_digest_initialize'); - late final _yaca_digest_initialize = _yaca_digest_initializePtr - .asFunction, int)>(); - - /// @brief Feeds the message into the message digest algorithm. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] ctx Context created by yaca_digest_initialize() - /// @param[in] message Message from which the digest is to be calculated - /// @param[in] message_len Length of the message - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0, - /// invalid @a ctx) - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_digest_initialize() - /// @see yaca_digest_finalize() - int yaca_digest_update( - yaca_context_h ctx, - ffi.Pointer message, - int message_len, - ) { - return _yaca_digest_update( - ctx, - message, - message_len, - ); - } - - late final _yaca_digest_updatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_context_h, ffi.Pointer, - ffi.Size)>>('yaca_digest_update'); - late final _yaca_digest_update = _yaca_digest_updatePtr - .asFunction, int)>(); - - /// @brief Calculates the final digest. - /// - /// @since_tizen 3.0 - /// - /// @remarks Skipping yaca_digest_update() and calling only yaca_digest_finalize() will produce an - /// empty message digest. - /// - /// @param[in,out] ctx A valid digest context - /// @param[out] digest Buffer for the message digest - /// (must be allocated by client, see yaca_context_get_output_length()) - /// @param[out] digest_len Length of the digest, - /// actual number of bytes written will be returned here - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a ctx) - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_digest_initialize() - /// @see yaca_digest_update() - /// @see yaca_context_get_output_length() - int yaca_digest_finalize( - yaca_context_h ctx, - ffi.Pointer digest, - ffi.Pointer digest_len, - ) { - return _yaca_digest_finalize( - ctx, - digest, - digest_len, - ); - } - - late final _yaca_digest_finalizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_context_h, ffi.Pointer, - ffi.Pointer)>>('yaca_digest_finalize'); - late final _yaca_digest_finalize = _yaca_digest_finalizePtr.asFunction< - int Function( - yaca_context_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets key's type. - /// - /// @since_tizen 3.0 - /// - /// @param[in] key Key which type we return - /// @param[out] key_type Key type - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Either of the params is NULL - /// - /// @see #yaca_key_type_e - int yaca_key_get_type( - yaca_key_h key, - ffi.Pointer key_type, - ) { - return _yaca_key_get_type( - key, - key_type, - ); - } - - late final _yaca_key_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - yaca_key_h, ffi.Pointer)>>('yaca_key_get_type'); - late final _yaca_key_get_type = _yaca_key_get_typePtr - .asFunction)>(); - - /// @brief Gets key's length (in bits). - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a key can be any symmetric (including an Initialization Vector) or - /// asymmetric key (including key generation parameters). - /// - /// @remarks For Diffie-Helmann @a key_bit_len returns prime length in bits. Values - /// used to generate the key/parameters in yaca_key_generate() are not - /// restored. Neither generator number nor values from #yaca_key_bit_length_dh_rfc_e. - /// - /// @remarks For Elliptic Curves @a key_bit_len returns values from #yaca_key_bit_length_ec_e. - /// - /// @param[in] key Key which length we return - /// @param[out] key_bit_len Key length in bits - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Either of the params is NULL - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_bit_length_e - /// @see #yaca_key_bit_length_dh_rfc_e - /// @see #yaca_key_bit_length_ec_e - int yaca_key_get_bit_length( - yaca_key_h key, - ffi.Pointer key_bit_len, - ) { - return _yaca_key_get_bit_length( - key, - key_bit_len, - ); - } - - late final _yaca_key_get_bit_lengthPtr = _lookup< - ffi - .NativeFunction)>>( - 'yaca_key_get_bit_length'); - late final _yaca_key_get_bit_length = _yaca_key_get_bit_lengthPtr - .asFunction)>(); - - /// @brief Imports a key or key generation parameters. - /// - /// @since_tizen 3.0 - /// - /// @remarks Everywhere where either a key (of any type) or an asymmetric key is referred - /// in the documentation of this function key generator parameters are also included. - /// - /// @remarks This function imports a key trying to match it to the @a key_type specified. - /// It should autodetect both the key format and the file format. - /// - /// @remarks For symmetric, Initialization Vector and DES keys RAW binary format and BASE64 encoded - /// binary format are supported. - /// For asymmetric keys PEM and DER file formats are supported. - /// - /// @remarks Asymmetric keys can be in their default ASN1 structure formats (like - /// PKCS#1, SSleay or PKCS#3). Private asymmetric keys can also be in - /// PKCS#8 format. Additionally it is possible to import public RSA/DSA/EC - /// keys from X509 certificate. - /// - /// @remarks If the key is encrypted the algorithm will be autodetected and password - /// used. If it's not known if the key is encrypted one should pass NULL as - /// password and check for the #YACA_ERROR_INVALID_PASSWORD return code. - /// - /// @remarks If the imported key will be detected as a format that does not support - /// encryption and password was passed #YACA_ERROR_INVALID_PARAMETER will - /// be returned. For a list of keys and formats that do support encryption - /// see yaca_key_export() documentation. - /// - /// @remarks The @a key should be released using yaca_key_destroy(). - /// - /// @param[in] key_type Type of the key - /// @param[in] password Null-terminated password for the key (can be NULL) - /// @param[in] data Blob containing the key - /// @param[in] data_len Size of the blob - /// @param[out] key Returned key - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0, - /// invalid @a key_type or @a data_len too big) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// @retval #YACA_ERROR_INVALID_PASSWORD Invalid @a password given or @a password was required - /// and none was given - /// - /// @see #yaca_key_type_e - /// @see yaca_key_export() - /// @see yaca_key_destroy() - int yaca_key_import( - int key_type, - ffi.Pointer password, - ffi.Pointer data, - int data_len, - ffi.Pointer key, - ) { - return _yaca_key_import( - key_type, - password, - data, - data_len, - key, - ); - } - - late final _yaca_key_importPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.Pointer)>>('yaca_key_import'); - late final _yaca_key_import = _yaca_key_importPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - /// @brief Exports a key or key generation parameters to arbitrary format. - /// - /// @since_tizen 3.0 - /// - /// @remarks Everywhere where either a key (of any type) or an asymmetric key is referred - /// in the documentation of this function key generator parameters are also included. - /// - /// @remarks This function exports the key to an arbitrary key format and key file format. - /// - /// @remarks For key formats two values are allowed: - /// - #YACA_KEY_FORMAT_DEFAULT: this is the only option possible in case of symmetric keys - /// (or Initialization Vector), for asymmetric keys it will - /// export to their default ASN1 structure format - /// (e.g. PKCS#1, SSLeay, PKCS#3). - /// - #YACA_KEY_FORMAT_PKCS8: this will only work for private asymmetric keys. - /// - /// @remarks The following file formats are supported: - /// - #YACA_KEY_FILE_FORMAT_RAW: used only for symmetric, raw binary format - /// - #YACA_KEY_FILE_FORMAT_BASE64: used only for symmetric, BASE64 encoded binary form - /// - #YACA_KEY_FILE_FORMAT_PEM: used only for asymmetric, PEM file format - /// - #YACA_KEY_FILE_FORMAT_DER: used only for asymmetric, DER file format - /// - /// @remarks Encryption is supported and optional for RSA/DSA private keys in the - /// #YACA_KEY_FORMAT_DEFAULT with #YACA_KEY_FILE_FORMAT_PEM format. If no password is - /// provided the exported key will be unencrypted. The encryption algorithm used - /// in this case is AES-256-CBC. - /// - /// @remarks Encryption is obligatory for #YACA_KEY_FORMAT_PKCS8 format (for both, PEM and DER - /// file formats). If no password is provided the #YACA_ERROR_INVALID_PARAMETER will - /// be returned. The encryption algorithm used in this case is AES-256-CBC. The key is - /// generated from password using PBKDF2 with HMAC-SHA1 function and 2048 iterations. - /// - /// @remarks Encryption is not supported for the symmetric, public keys and key generation - /// parameters in all their supported formats. If a password is provided in such - /// case the #YACA_ERROR_INVALID_PARAMETER will be returned. - /// - /// @param[in] key Key to be exported - /// @param[in] key_fmt Format of the key - /// @param[in] key_file_fmt Format of the key file - /// @param[in] password Password used for the encryption (can be NULL) - /// @param[out] data Data, allocated by the library, containing exported key - /// (must be freed with yaca_free()) - /// @param[out] data_len Size of the output data - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0, - /// invalid @a key_fmt, @a key_file_fmt or @a data_len too big) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_format_e - /// @see #yaca_key_file_format_e - /// @see yaca_key_import() - /// @see yaca_key_destroy() - int yaca_key_export( - yaca_key_h key, - int key_fmt, - int key_file_fmt, - ffi.Pointer password, - ffi.Pointer> data, - ffi.Pointer data_len, - ) { - return _yaca_key_export( - key, - key_fmt, - key_file_fmt, - password, - data, - data_len, - ); - } - - late final _yaca_key_exportPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - yaca_key_h, - ffi.Int32, - ffi.Int32, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('yaca_key_export'); - late final _yaca_key_export = _yaca_key_exportPtr.asFunction< - int Function(yaca_key_h, int, int, ffi.Pointer, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Generates a secure key or key generation parameters (or an Initialization Vector). - /// - /// @since_tizen 3.0 - /// - /// @remarks This function is used to generate symmetric keys, private asymmetric keys - /// or key generation parameters for key types that support them (DSA, DH and EC). - /// - /// @remarks Supported key lengths: - /// - RSA: length >= 512bits - /// - DSA: length >= 512bits, multiple of 64 - /// - DH: a value taken from #yaca_key_bit_length_dh_rfc_e or - /// (YACA_KEY_LENGTH_DH_GENERATOR_* | prime_length_in_bits), - /// where prime_length_in_bits can be any positive number - /// - EC: a value taken from #yaca_key_bit_length_ec_e - /// - /// @remarks The @a key should be released using yaca_key_destroy(). - /// - /// @param[in] key_type Type of the key to be generated - /// @param[in] key_bit_len Length of the key (in bits) to be generated - /// @param[out] key Newly generated key - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER @a key is NULL, incorrect @a key_type or - /// @a key_bit_len is not dividable by 8 - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_type_e - /// @see #yaca_key_bit_length_e - /// @see #yaca_key_bit_length_dh_rfc_e - /// @see #YACA_KEY_LENGTH_DH_GENERATOR_2 - /// @see #YACA_KEY_LENGTH_DH_GENERATOR_5 - /// @see #yaca_key_bit_length_ec_e - /// @see yaca_key_destroy() - int yaca_key_generate( - int key_type, - int key_bit_len, - ffi.Pointer key, - ) { - return _yaca_key_generate( - key_type, - key_bit_len, - key, - ); - } - - late final _yaca_key_generatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Size, - ffi.Pointer)>>('yaca_key_generate'); - late final _yaca_key_generate = _yaca_key_generatePtr - .asFunction)>(); - - /// @brief Generates a secure private asymmetric key from parameters. - /// - /// @since_tizen 3.0 - /// - /// @remarks This function is used to generate private asymmetric keys - /// based on pre-generated parameters. - /// - /// @remarks The @a key should be released using yaca_key_destroy(). - /// - /// @param[in] params Pre-generated parameters - /// @param[out] prv_key Newly generated private key - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER @a prv_key is NULL or incorrect @a params - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_key_destroy() - /// @see yaca_key_generate() - /// @see yaca_key_extract_parameters() - int yaca_key_generate_from_parameters( - yaca_key_h params, - ffi.Pointer prv_key, - ) { - return _yaca_key_generate_from_parameters( - params, - prv_key, - ); - } - - late final _yaca_key_generate_from_parametersPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_key_h, - ffi.Pointer)>>('yaca_key_generate_from_parameters'); - late final _yaca_key_generate_from_parameters = - _yaca_key_generate_from_parametersPtr - .asFunction)>(); - - /// @brief Extracts public key from a private one. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a pub_key should be released using yaca_key_destroy(). - /// - /// @param[in] prv_key Private key to extract the public one from - /// @param[out] pub_key Extracted public key - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER @a prv_key is of invalid type or @a pub_key is NULL - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_key_generate() - /// @see yaca_key_import() - /// @see yaca_key_destroy() - int yaca_key_extract_public( - yaca_key_h prv_key, - ffi.Pointer pub_key, - ) { - return _yaca_key_extract_public( - prv_key, - pub_key, - ); - } - - late final _yaca_key_extract_publicPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - yaca_key_h, ffi.Pointer)>>('yaca_key_extract_public'); - late final _yaca_key_extract_public = _yaca_key_extract_publicPtr - .asFunction)>(); - - /// @brief Extracts parameters from a private or a public key. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a params should be released using yaca_key_destroy(). - /// - /// @param[in] key A key to extract the parameters from - /// @param[out] params Extracted parameters - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER @a key is of invalid type or @a params is NULL - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_key_generate() - /// @see yaca_key_generate_from_parameters() - /// @see yaca_key_import() - /// @see yaca_key_destroy() - int yaca_key_extract_parameters( - yaca_key_h key, - ffi.Pointer params, - ) { - return _yaca_key_extract_parameters( - key, - params, - ); - } - - late final _yaca_key_extract_parametersPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_key_h, - ffi.Pointer)>>('yaca_key_extract_parameters'); - late final _yaca_key_extract_parameters = _yaca_key_extract_parametersPtr - .asFunction)>(); - - /// @brief Derives a shared secret using Diffie-Helmann or EC Diffie-Helmann key exchange protocol. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a secret should not be used as a symmetric key, - /// to produce a symmetric key pass the secret to a key derivation function (KDF) - /// or a message digest function. - /// - /// @remarks The @a secret should be freed with yaca_free(). - /// - /// @param[in] prv_key Our private key - /// @param[in] pub_key Peer public key - /// @param[out] secret Generated shared secret - /// @param[out] secret_len Size of the shared secret - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values - /// (invalid @a prv_key or @a pub_key) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_key_derive_kdf() - /// @see yaca_simple_calculate_digest() - /// @see yaca_free() - int yaca_key_derive_dh( - yaca_key_h prv_key, - yaca_key_h pub_key, - ffi.Pointer> secret, - ffi.Pointer secret_len, - ) { - return _yaca_key_derive_dh( - prv_key, - pub_key, - secret, - secret_len, - ); - } - - late final _yaca_key_derive_dhPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - yaca_key_h, - yaca_key_h, - ffi.Pointer>, - ffi.Pointer)>>('yaca_key_derive_dh'); - late final _yaca_key_derive_dh = _yaca_key_derive_dhPtr.asFunction< - int Function(yaca_key_h, yaca_key_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Derives a key material from shared secret. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a info parameter is ANSI X9.42 OtherInfo or ANSI X9.62 SharedInfo structure, - /// more information can be found in ANSI X9.42/62 standard specification. - /// - /// @remarks The @a key_material or separate parts of it can be used to import a symmetric key - /// with yaca_key_import(). - /// - /// @remarks The @a key_material should be freed using yaca_free(). - /// - /// @param[in] kdf Key derivation function - /// @param[in] algo Digest algorithm that should be used in key derivation - /// @param[in] secret Shared secret - /// @param[in] secret_len Size of the shared secret - /// @param[in] info Optional additional info, use NULL if not appending extra info - /// @param[in] info_len Length of additional info, use 0 if not using additional info - /// @param[in] key_material_len Length of a key material to be generated - /// @param[out] key_material Newly generated key material - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0, - /// invalid @a algo or @a kdf) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_kdf_e - /// @see #yaca_digest_algorithm_e - /// @see yaca_key_derive_dh() - /// @see yaca_key_import() - /// @see yaca_free() - int yaca_key_derive_kdf( - int kdf, - int algo, - ffi.Pointer secret, - int secret_len, - ffi.Pointer info, - int info_len, - int key_material_len, - ffi.Pointer> key_material, - ) { - return _yaca_key_derive_kdf( - kdf, - algo, - secret, - secret_len, - info, - info_len, - key_material_len, - key_material, - ); - } - - late final _yaca_key_derive_kdfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - ffi.Int32, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Pointer>)>>('yaca_key_derive_kdf'); - late final _yaca_key_derive_kdf = _yaca_key_derive_kdfPtr.asFunction< - int Function(int, int, ffi.Pointer, int, ffi.Pointer, - int, int, ffi.Pointer>)>(); - - /// @brief Derives a key from user password (PKCS #5 a.k.a. pbkdf2 algorithm). - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a key should be released using yaca_key_destroy(). - /// - /// @param[in] password User password as a null-terminated string - /// @param[in] salt Salt, should be a non-empty string - /// @param[in] salt_len Length of the salt - /// @param[in] iterations Number of iterations - /// @param[in] algo Digest algorithm that should be used in key generation - /// @param[in] key_bit_len Length of a key (in bits) to be generated - /// @param[out] key Newly generated key - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0, - /// invalid @a algo or @a key_bit_len not dividable by 8) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_digest_algorithm_e - /// @see yaca_key_destroy() - int yaca_key_derive_pbkdf2( - ffi.Pointer password, - ffi.Pointer salt, - int salt_len, - int iterations, - int algo, - int key_bit_len, - ffi.Pointer key, - ) { - return _yaca_key_derive_pbkdf2( - password, - salt, - salt_len, - iterations, - algo, - key_bit_len, - key, - ); - } - - late final _yaca_key_derive_pbkdf2Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Int32, - ffi.Size, - ffi.Pointer)>>('yaca_key_derive_pbkdf2'); - late final _yaca_key_derive_pbkdf2 = _yaca_key_derive_pbkdf2Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, int, int, - int, ffi.Pointer)>(); - - /// @brief Release the key created by the library. Passing YACA_KEY_NULL is allowed. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] key Key to be released - /// - /// @see yaca_key_import() - /// @see yaca_key_export() - /// @see yaca_key_generate() - void yaca_key_destroy( - yaca_key_h key, - ) { - return _yaca_key_destroy( - key, - ); - } - - late final _yaca_key_destroyPtr = - _lookup>( - 'yaca_key_destroy'); - late final _yaca_key_destroy = - _yaca_key_destroyPtr.asFunction(); - - /// @brief Encrypts data using a RSA public key (low-level encrypt equivalent). - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a ciphertext should be freed using yaca_free(). - /// - /// @remarks The @a pub_key used has to be of a #YACA_KEY_TYPE_RSA_PUB type. - /// - /// @remarks The maximum length of plaintext depends on the key length and padding method. - /// See #yaca_padding_e for details. - /// - /// @remarks The @a plaintext can be NULL but then the @a plaintext_len must be 0. - /// - /// @param[in] padding Padding method - /// @param[in] pub_key Public RSA key (see yaca_key.h for key generation functions) - /// @param[in] plaintext Plaintext to be encrypted - /// @param[in] plaintext_len Length of the plaintext - /// @param[out] ciphertext Encrypted data, will be allocated by the library - /// @param[out] ciphertext_len Length of the encrypted data (may be larger than decrypted) - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0 - /// invalid @a padding, @a pub_key or @a plaintext_len) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_type_e - /// @see #yaca_padding_e - /// @see yaca_rsa_private_decrypt() - /// @see yaca_free() - int yaca_rsa_public_encrypt( - int padding, - yaca_key_h pub_key, - ffi.Pointer plaintext, - int plaintext_len, - ffi.Pointer> ciphertext, - ffi.Pointer ciphertext_len, - ) { - return _yaca_rsa_public_encrypt( - padding, - pub_key, - plaintext, - plaintext_len, - ciphertext, - ciphertext_len, - ); - } - - late final _yaca_rsa_public_encryptPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - yaca_key_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer>, - ffi.Pointer)>>('yaca_rsa_public_encrypt'); - late final _yaca_rsa_public_encrypt = _yaca_rsa_public_encryptPtr.asFunction< - int Function(int, yaca_key_h, ffi.Pointer, int, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Decrypts data using a RSA private key (low-level decrypt equivalent). - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a plaintext should be freed using yaca_free(). - /// - /// @remarks The @a prv_key used has to be of a #YACA_KEY_TYPE_RSA_PRIV type. - /// - /// @param[in] padding Padding method - /// @param[in] prv_key Private RSA key matching the public one used to encrypt the data - /// @param[in] ciphertext Ciphertext to be decrypted - /// @param[in] ciphertext_len Length of ciphertext - /// @param[out] plaintext Decrypted data, will be allocated by the library - /// @param[out] plaintext_len Length of the decrypted data - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0 - /// invalid @a padding or @a prv_key), padding check failed - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_type_e - /// @see #yaca_padding_e - /// @see yaca_rsa_public_encrypt() - /// @see yaca_free() - int yaca_rsa_private_decrypt( - int padding, - yaca_key_h prv_key, - ffi.Pointer ciphertext, - int ciphertext_len, - ffi.Pointer> plaintext, - ffi.Pointer plaintext_len, - ) { - return _yaca_rsa_private_decrypt( - padding, - prv_key, - ciphertext, - ciphertext_len, - plaintext, - plaintext_len, - ); - } - - late final _yaca_rsa_private_decryptPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - yaca_key_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer>, - ffi.Pointer)>>('yaca_rsa_private_decrypt'); - late final _yaca_rsa_private_decrypt = - _yaca_rsa_private_decryptPtr.asFunction< - int Function(int, yaca_key_h, ffi.Pointer, int, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Encrypts data using a RSA private key (low-level sign equivalent). - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a ciphertext should be freed using yaca_free(). - /// - /// @remarks The @a prv_key used has to be of a #YACA_KEY_TYPE_RSA_PRIV type. - /// - /// @remarks The maximum length of plaintext depends on the key length and padding method, - /// see #yaca_padding_e for details. - /// - /// @remarks The @a plaintext can be NULL but then the @a plaintext_len must be 0. - /// - /// @param[in] padding Padding method - /// @param[in] prv_key Private RSA key (see yaca_key.h for key generation functions) - /// @param[in] plaintext Plaintext to be encrypted - /// @param[in] plaintext_len Length of the plaintext - /// @param[out] ciphertext Encrypted data, will be allocated by the library - /// @param[out] ciphertext_len Length of the encrypted data (may be larger than decrypted) - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0 - /// invalid @a padding, @a prv_key or @a plaintext_len) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_type_e - /// @see #yaca_padding_e - /// @see yaca_rsa_public_decrypt() - /// @see yaca_free() - int yaca_rsa_private_encrypt( - int padding, - yaca_key_h prv_key, - ffi.Pointer plaintext, - int plaintext_len, - ffi.Pointer> ciphertext, - ffi.Pointer ciphertext_len, - ) { - return _yaca_rsa_private_encrypt( - padding, - prv_key, - plaintext, - plaintext_len, - ciphertext, - ciphertext_len, - ); - } - - late final _yaca_rsa_private_encryptPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - yaca_key_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer>, - ffi.Pointer)>>('yaca_rsa_private_encrypt'); - late final _yaca_rsa_private_encrypt = - _yaca_rsa_private_encryptPtr.asFunction< - int Function(int, yaca_key_h, ffi.Pointer, int, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Decrypts data using a RSA public key (low-level verify equivalent). - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a plaintext should be freed using yaca_free(). - /// - /// @remarks The @a pub_key used has to be of a #YACA_KEY_TYPE_RSA_PUB type. - /// - /// @param[in] padding Padding method - /// @param[in] pub_key Public RSA key matching the private one used to encrypt the data - /// @param[in] ciphertext Ciphertext to be decrypted - /// @param[in] ciphertext_len Length of ciphertext - /// @param[out] plaintext Decrypted data, will be allocated by the library - /// @param[out] plaintext_len Length of the decrypted data - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0 - /// invalid @a padding or @a pub_key), padding check failed - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_type_e - /// @see #yaca_padding_e - /// @see yaca_rsa_private_encrypt() - /// @see yaca_free() - int yaca_rsa_public_decrypt( - int padding, - yaca_key_h pub_key, - ffi.Pointer ciphertext, - int ciphertext_len, - ffi.Pointer> plaintext, - ffi.Pointer plaintext_len, - ) { - return _yaca_rsa_public_decrypt( - padding, - pub_key, - ciphertext, - ciphertext_len, - plaintext, - plaintext_len, - ); - } - - late final _yaca_rsa_public_decryptPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - yaca_key_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer>, - ffi.Pointer)>>('yaca_rsa_public_decrypt'); - late final _yaca_rsa_public_decrypt = _yaca_rsa_public_decryptPtr.asFunction< - int Function(int, yaca_key_h, ffi.Pointer, int, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Encrypts data using a symmetric cipher. - /// - /// @since_tizen 3.0 - /// - /// @remarks yaca_simple_encrypt() doesn't support #YACA_BCM_GCM and #YACA_BCM_CCM. - /// - /// @remarks The @a ciphertext should be freed using yaca_free(). - /// - /// @remarks The @a plaintext can be NULL but then @a plaintext_len must be 0. - /// - /// @param[in] algo Encryption algorithm (select #YACA_ENCRYPT_AES if unsure) - /// @param[in] bcm Chaining mode (select #YACA_BCM_CBC if unsure) - /// @param[in] sym_key Symmetric encryption key (see yaca_key.h for key generation functions) - /// @param[in] iv Initialization Vector - /// @param[in] plaintext Plaintext to be encrypted - /// @param[in] plaintext_len Length of the plaintext - /// @param[out] ciphertext Encrypted data, will be allocated by the library - /// @param[out] ciphertext_len Length of the encrypted data (may be larger than decrypted) - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0 - /// invalid @a algo, @a bcm, @a sym_key or @a iv) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_encrypt_algorithm_e - /// @see #yaca_block_cipher_mode_e - /// @see yaca_simple_decrypt() - /// @see yaca_free() - int yaca_simple_encrypt( - int algo, - int bcm, - yaca_key_h sym_key, - yaca_key_h iv, - ffi.Pointer plaintext, - int plaintext_len, - ffi.Pointer> ciphertext, - ffi.Pointer ciphertext_len, - ) { - return _yaca_simple_encrypt( - algo, - bcm, - sym_key, - iv, - plaintext, - plaintext_len, - ciphertext, - ciphertext_len, - ); - } - - late final _yaca_simple_encryptPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - ffi.Int32, - yaca_key_h, - yaca_key_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer>, - ffi.Pointer)>>('yaca_simple_encrypt'); - late final _yaca_simple_encrypt = _yaca_simple_encryptPtr.asFunction< - int Function(int, int, yaca_key_h, yaca_key_h, ffi.Pointer, int, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Decrypts data using a symmetric cipher. - /// - /// @since_tizen 3.0 - /// - /// @remarks yaca_simple_decrypt() doesn't support #YACA_BCM_GCM and #YACA_BCM_CCM. - /// - /// @remarks The @a plaintext should be freed using yaca_free(). - /// - /// @remarks The @a ciphertext can be NULL but then @a ciphertext_len must be 0. - /// - /// @param[in] algo Decryption algorithm that was used to encrypt the data - /// @param[in] bcm Chaining mode that was used to encrypt the data - /// @param[in] sym_key Symmetric encryption key that was used to encrypt the data - /// @param[in] iv Initialization Vector that was used to encrypt the data - /// @param[in] ciphertext Ciphertext to be decrypted - /// @param[in] ciphertext_len Length of ciphertext - /// @param[out] plaintext Decrypted data, will be allocated by the library - /// @param[out] plaintext_len Length of the decrypted data - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0 - /// invalid @a algo, @a bcm, @a sym_key or @a iv) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_encrypt_algorithm_e - /// @see #yaca_block_cipher_mode_e - /// @see yaca_simple_encrypt() - /// @see yaca_free() - int yaca_simple_decrypt( - int algo, - int bcm, - yaca_key_h sym_key, - yaca_key_h iv, - ffi.Pointer ciphertext, - int ciphertext_len, - ffi.Pointer> plaintext, - ffi.Pointer plaintext_len, - ) { - return _yaca_simple_decrypt( - algo, - bcm, - sym_key, - iv, - ciphertext, - ciphertext_len, - plaintext, - plaintext_len, - ); - } - - late final _yaca_simple_decryptPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - ffi.Int32, - yaca_key_h, - yaca_key_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer>, - ffi.Pointer)>>('yaca_simple_decrypt'); - late final _yaca_simple_decrypt = _yaca_simple_decryptPtr.asFunction< - int Function(int, int, yaca_key_h, yaca_key_h, ffi.Pointer, int, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Calculates a digest of a message. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a digest should be freed using yaca_free(). - /// - /// @remarks The @a message can be NULL but then @a message_len must be 0. - /// - /// @param[in] algo Digest algorithm (select #YACA_DIGEST_SHA256 if unsure) - /// @param[in] message Message from which the digest is to be calculated - /// @param[in] message_len Length of the message - /// @param[out] digest Message digest, will be allocated by the library - /// @param[out] digest_len Length of message digest (depends on algorithm) - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a algo) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_digest_algorithm_e - /// @see yaca_free() - int yaca_simple_calculate_digest( - int algo, - ffi.Pointer message, - int message_len, - ffi.Pointer> digest, - ffi.Pointer digest_len, - ) { - return _yaca_simple_calculate_digest( - algo, - message, - message_len, - digest, - digest_len, - ); - } - - late final _yaca_simple_calculate_digestPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - ffi.Pointer, - ffi.Size, - ffi.Pointer>, - ffi.Pointer)>>('yaca_simple_calculate_digest'); - late final _yaca_simple_calculate_digest = - _yaca_simple_calculate_digestPtr.asFunction< - int Function(int, ffi.Pointer, int, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Creates a signature using asymmetric private key. - /// - /// @since_tizen 3.0 - /// - /// @remarks For #YACA_DIGEST_SHA384 and #YACA_DIGEST_SHA512 the RSA key size must be bigger than - /// #YACA_KEY_LENGTH_512BIT. - /// - /// @remarks Using of #YACA_DIGEST_MD5 algorithm for DSA and ECDSA operations is prohibited. - /// - /// @remarks The @a signature should be freed using yaca_free(). - /// - /// @remarks The @a message can be NULL but then @a message_len must be 0. - /// - /// @param[in] algo Digest algorithm that will be used - /// @param[in] prv_key Private key that will be used, algorithm is - /// deduced based on key type, supported key types: - /// - #YACA_KEY_TYPE_RSA_PRIV, - /// - #YACA_KEY_TYPE_DSA_PRIV, - /// - #YACA_KEY_TYPE_EC_PRIV - /// @param[in] message Message to be signed - /// @param[in] message_len Length of the message - /// @param[out] signature Message signature, will be allocated by the library - /// @param[out] signature_len Length of the signature - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0 - /// invalid @a algo or @a prv_key) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_type_e - /// @see #yaca_digest_algorithm_e - /// @see yaca_simple_verify_signature() - /// @see yaca_free() - int yaca_simple_calculate_signature( - int algo, - yaca_key_h prv_key, - ffi.Pointer message, - int message_len, - ffi.Pointer> signature, - ffi.Pointer signature_len, - ) { - return _yaca_simple_calculate_signature( - algo, - prv_key, - message, - message_len, - signature, - signature_len, - ); - } - - late final _yaca_simple_calculate_signaturePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - yaca_key_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer>, - ffi.Pointer)>>('yaca_simple_calculate_signature'); - late final _yaca_simple_calculate_signature = - _yaca_simple_calculate_signaturePtr.asFunction< - int Function(int, yaca_key_h, ffi.Pointer, int, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Verifies a signature using asymmetric public key. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a message can be NULL but then @a message_len must be 0. - /// - /// @param[in] algo Digest algorithm that will be used - /// @param[in] pub_key Public key that will be used, algorithm is - /// deduced based on key type, supported key types: - /// - #YACA_KEY_TYPE_RSA_PUB, - /// - #YACA_KEY_TYPE_DSA_PUB, - /// - #YACA_KEY_TYPE_EC_PUB - /// @param[in] message Message - /// @param[in] message_len Length of the message - /// @param[in] signature Message signature to be verified - /// @param[in] signature_len Length of the signature - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0 - /// invalid @a algo or @a pub_key) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// @retval #YACA_ERROR_DATA_MISMATCH The verification failed - /// - /// @see #yaca_key_type_e - /// @see #yaca_digest_algorithm_e - /// @see yaca_simple_calculate_signature() - int yaca_simple_verify_signature( - int algo, - yaca_key_h pub_key, - ffi.Pointer message, - int message_len, - ffi.Pointer signature, - int signature_len, - ) { - return _yaca_simple_verify_signature( - algo, - pub_key, - message, - message_len, - signature, - signature_len, - ); - } - - late final _yaca_simple_verify_signaturePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - yaca_key_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Size)>>('yaca_simple_verify_signature'); - late final _yaca_simple_verify_signature = - _yaca_simple_verify_signaturePtr.asFunction< - int Function(int, yaca_key_h, ffi.Pointer, int, - ffi.Pointer, int)>(); - - /// @brief Calculates a HMAC of given message using symmetric key. - /// - /// @since_tizen 3.0 - /// - /// @remarks For verification, calculate message HMAC and compare with received MAC using - /// yaca_memcmp(). - /// - /// @remarks The @a mac should be freed using yaca_free(). - /// - /// @remarks The @a message can be NULL but then @a message_len must be 0. - /// - /// @param[in] algo Digest algorithm that will be used - /// @param[in] sym_key Key that will be used, supported key types: - /// - #YACA_KEY_TYPE_SYMMETRIC, - /// - #YACA_KEY_TYPE_DES - /// @param[in] message Message to calculate HMAC from - /// @param[in] message_len Length of the message - /// @param[out] mac MAC, will be allocated by the library - /// @param[out] mac_len Length of the MAC - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0 - /// invalid @a algo or @a sym_key) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_type_e - /// @see #yaca_digest_algorithm_e - /// @see yaca_memcmp() - /// @see yaca_free() - int yaca_simple_calculate_hmac( - int algo, - yaca_key_h sym_key, - ffi.Pointer message, - int message_len, - ffi.Pointer> mac, - ffi.Pointer mac_len, - ) { - return _yaca_simple_calculate_hmac( - algo, - sym_key, - message, - message_len, - mac, - mac_len, - ); - } - - late final _yaca_simple_calculate_hmacPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - yaca_key_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer>, - ffi.Pointer)>>('yaca_simple_calculate_hmac'); - late final _yaca_simple_calculate_hmac = - _yaca_simple_calculate_hmacPtr.asFunction< - int Function(int, yaca_key_h, ffi.Pointer, int, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Calculates a CMAC of given message using symmetric key. - /// - /// @since_tizen 3.0 - /// - /// @remarks For verification, calculate message CMAC and compare with received MAC using - /// yaca_memcmp(). - /// - /// @remarks The @a mac should be freed using yaca_free(). - /// - /// @remarks The @a message can be NULL but then @a message_len must be 0. - /// - /// @param[in] algo Encryption algorithm that will be used - /// @param[in] sym_key Key that will be used, supported key types: - /// - #YACA_KEY_TYPE_SYMMETRIC, - /// - #YACA_KEY_TYPE_DES - /// @param[in] message Message to calculate CMAC from - /// @param[in] message_len Length of the message - /// @param[out] mac MAC, will be allocated by the library - /// @param[out] mac_len Length of the MAC - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0 - /// invalid @a algo or @a sym_key) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_type_e - /// @see #yaca_encrypt_algorithm_e - /// @see yaca_memcmp() - /// @see yaca_free() - int yaca_simple_calculate_cmac( - int algo, - yaca_key_h sym_key, - ffi.Pointer message, - int message_len, - ffi.Pointer> mac, - ffi.Pointer mac_len, - ) { - return _yaca_simple_calculate_cmac( - algo, - sym_key, - message, - message_len, - mac, - mac_len, - ); - } - - late final _yaca_simple_calculate_cmacPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - yaca_key_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer>, - ffi.Pointer)>>('yaca_simple_calculate_cmac'); - late final _yaca_simple_calculate_cmac = - _yaca_simple_calculate_cmacPtr.asFunction< - int Function(int, yaca_key_h, ffi.Pointer, int, - ffi.Pointer>, ffi.Pointer)>(); - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_book _calendar_book view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// Currently NOT Used - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID Read, Write Description
string _uri read only Identifier of this calendar book view
integer id read only DB record ID of the calendar book
string uid read, write Unique identifier
string name read, write Calendar book name
string description read, write Calendar book description
string color read, write Calendar book color for UX
string location read, write Location of the event
integer visibility read, write Visibility of the calendar book for UX
integer sync_event read, write
integer account_id read, write once Account for this calendar
integer store_type read, write Type of calendar contents(refer to the @ref calendar_book_type_e)
string sync_data1 read, write Generic data for use by syncing
string sync_data2 read, write Generic data for use by syncing
string sync_data3 read, write Generic data for use by syncing
string sync_data4 read, write Generic data for use by syncing
integer mode read, write Calendar book mode (refer to the @ref calendar_book_mode_e)
- late final ffi.Pointer<_calendar_book_property_ids> __calendar_book = - _lookup<_calendar_book_property_ids>('_calendar_book'); - - _calendar_book_property_ids get _calendar_book => __calendar_book.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event _calendar_event view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// Refer to the @ref calendar_event_priority_e - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// The timezone of the start_time - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID Read, Write Description
string _uri read only Identifier of this event view
integer id read only DB record ID of the event
integer calendar_book_id read, write ID of the calendar book to which the event belongs
string summary read, write The short description of the event
string description read, write The description of the event
string location read, write The location of the event
string categories read, write The category of the event. For example APPOINTMENT, BIRTHDAY
string exdate read, write The exception list of the event. If this event has a recurrence rule, the instance of the exdate is removed. Format is "YYYYMMDD"(allday event) or "YYYYMMDDTHHMMSS". Multiple exceptions can be included with a comma
integer event_status read, write Refer to the @ref calendar_event_status_e
integer priority read, write
integer timezone read, write The timezone_id of the event if it exists. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_timezone
integer person_id read, write The person_id of the event if the event is a birthday. Refer to the contacts-service
integer busy_status read, write Refer to the @ref calendar_event_busy_status_e
integer sensitivity read, write Refer to the @ref calendar_sensitivity_e
string uid read, write The unique ID of the event
string organizer_name read, write The name of organizer of the event
string organizer_email read, write The email address of the organizer of the event
integer meeting_status read, write Refer to the @ref calendar_meeting_status_e
integer original_event_id read, write The ID of the original event if the event is an exception.
double latitude read, write The latitude of the location of the event
double longitude read, write The longitude of the location of the event
integer email_id read, write ID of the email_id. Refer to the email-service.
long long int created_time read, write The time when the event is created
long long int last_modified_time read only The time when the event is updated
integer is_deleted read only
integer freq read, write The frequent type of event recurrence. Refer to the @ref calendar_recurrence_frequency_e
integer range_type read, write Refer to the @ref calendar_range_type_e
calendar time until_time read, write The end time of the event recurrence. If the range_type is @ref CALENDAR_RANGE_UNTIL
integer count read, write The count of the event recurrence. If the range_type is @ref CALENDAR_RANGE_COUNT
integer interval read, write The interval of the event recurrence
string bysecond read, write The second list of the event recurrence. The value can be from 0 to 59. The list is seperated by commas
string byminute read, write The minute list of the event recurrence. The value can be from 0 to 59. The list is seperated by commas
string byhour read, write The hour list of the event recurrence. The value can be from 0 to 23. The list is seperated by commas
string byday read, write The day list of the event recurrence. The value can be SU, MO, TU, WE, TH, FR, SA. The list is seperated by commas
string bymonthday read, write The month day list of the event recurrence. The value can be from 1 to 31 and from -31 to -1. The list is seperated by commas
string byyearday read, write The year day list of the event recurrence. The value can be from 1 to 366 and from -366 to -1. The list is seperated by commas
string byweekno read, write The week number list of the event recurrence. The value can be from 1 to 53 and from -53 to -1. The list is seperated by commas
string bymonth read, write The month list of the event recurrence. The value can be from 1 to 12. The list is seperated by commas
string bysetpos read, write The position list of the event recurrence. The value can be from 1 to 366 and from -366 to -1. The list is seperated by commas
integer wkst read, write The start day of the week. Refer to the @ref calendar_days_of_week_e
string recurrence_id read, write RECURRENCE-ID of RFC #2445
string rdate read, write RDATE of RFC #2445
integer has_attendee read only Whether or not the event has an attendee list
integer has_alarm read only Whether or not the event has an alarm list
integer calendar_system_type read, write Refer to the @ref calendar_system_type_e
string sync_data1 read, write The sync data of the event. If developer need to save some information related to the event, they can use this property
string sync_data2 read, write The sync data of the event. If developer need to save some information related to the event, they can use this property
string sync_data3 read, write The sync data of the event. If developer need to save some information related to the event, they can use this property
string sync_data4 read, write The sync data of the event. If developer need to save some information related to the event, they can use this property
calendar time start_time read, write The start time of the event
string start_tzid read, write
calendar time end_time read, write The end time of the event
string end_tzid read, write The timezone of the end_time
child list calendar_alarm read, write The alarm list of the event. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_alarm
child list calendar_attendee read, write The attendee list of the event. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_attendee
child list exception read, write The exception mod event list of the event
child list extended read, write The extended property list of the event. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_extended_property
integer is_allday read only The event is an allday event or not
integer link_count read only The event is a linked event (Since 4.0)
integer link_base_id read only The event is a base linked event (Since 4.0)
- late final ffi.Pointer<_calendar_event_property_ids> __calendar_event = - _lookup<_calendar_event_property_ids>('_calendar_event'); - - _calendar_event_property_ids get _calendar_event => __calendar_event.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_todo _calendar_todo view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// The timezone of the start_time - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID Read, Write Description
string _uri read only Identifier of this todo view
integer id read only DB record ID of the todo
integer calendar_book_id read, write ID of the calendar book to which the todo belongs
string summary read, write The short description of the todo
string description read, write The description of the todo
string location read, write The location of the todo
string categories read, write The category of the todo. For example APPOINTMENT, BIRTHDAY
integer todo_status read, write Refer to the @ref calendar_todo_status_e
integer priority read, write Refer to the @ref calendar_todo_priority_e
integer sensitivity read, write Refer to the @ref calendar_sensitivity_e
string uid read, write The unique ID of the todo
double latitude read, write The latitude of the location of the todo
double longitude read, write The longitude of the location of the todo
long long int created_time read, write The time when the todo is created
long long int last_modified_time read only The time when the todo is updated
long long int completed_time read, write The time when the todo is completed
integer progress read, write The progression of the todo. The value can be from 0 to 100
integer is_deleted read only
integer freq read, write The frequent type of todo recurrence. Refer to the @ref calendar_recurrence_frequency_e
integer range_type read, write Refer to the @ref calendar_range_type_e
calendar time until_time read, write The end time of the todo recurrence. If the range_type is CALENDAR_RANGE_UNTIL
integer count read, write The count of the todo recurrence. If the range_type is CALENDAR_RANGE_COUNT
integer interval read, write The interval of the todo recurrence
string bysecond read, write The second list of the todo recurrence. The value can be from 0 to 59. The list is seperated by commas
string byminute read, write The minute list of the todo recurrence. The value can be from 0 to 59. The list is seperated by commas
string byhour read, write The hour list of the todo recurrence. The value can be from 0 to 23. The list is seperated by commas
string byday read, write The day list of the todo recurrence. The value can be SU, MO, TU, WE, TH, FR, SA. The list is seperated by commas
string bymonthday read, write The month day list of the todo recurrence. The value can be from 1 to 31 and from -31 to -1. The list is seperated by commas
string byyearday read, write The year day list of the todo recurrence. The value can be from 1 to 366 and from -366 to -1. The list is seperated by commas
string byweekno read, write The week number list of the todo recurrence. The value can be from 1 to 53 and from -53 to -1. The list is seperated by commas
string bymonth read, write The month list of the todo recurrence. The value can be from 1 to 12. The list is seperated by commas
string bysetpos read, write The position list of the todo recurrence. The value can be from 1 to 366 and from -366 to -1. The list is seperated by commas
integer wkst read, write The start day of the week. Refer to the @ref calendar_days_of_week_e
integer has_alarm read only Whether or not the todo has an alarm list
string sync_data1 read, write The sync data of the todo. If developers need to save some information related to the todo, they can use this property
string sync_data2 read, write The sync data of the todo. If developers need to save some information related to the todo, they can use this property
string sync_data3 read, write The sync data of the todo. If developers need to save some information related to the todo, they can use this property
string sync_data4 read, write The sync data of the todo. If developers need to save some information related to the todo, they can use this property
calendar time start_time read, write The start time of the todo
string start_tzid read, write
calendar time due_time read, write The due time of the todo
string due_tzid read, write The timezone of the due_time
child list calendar_alarm read, write The alarm list of the todo. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_alarm
string organizer_name read, write The name of the organizer of the event
string organizer_email read, write The email address of the organizer of the event
integer has_attendee read only Whether or not the todo has an attendee list
child list calendar_attendee read, write The attendee list of the todo. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_attendee
child list extended read, write The extended property list of the todo. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_extended_property
integer is_allday read only The todo is an allday event or not
- late final ffi.Pointer<_calendar_todo_property_ids> __calendar_todo = - _lookup<_calendar_todo_property_ids>('_calendar_todo'); - - _calendar_todo_property_ids get _calendar_todo => __calendar_todo.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_timezone _calendar_timezone view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID Read, Write Description
string _uri read only Identifier of this timezone view
integer id read only DB record ID of the timezone
integer calendar_book_id read, write DB record ID of a related calendar book
integer tz_offset_from_gmt read, write UTC offset which is in use when the onset of this time zone observance begins. Valid values are -720(-12:00) to 840(+14:00)
string standard_name read, write Name of the Standard Time
integer standard_start_month read, write Starting month of the Standard Time. Month is 0-based. eg, 0 for January
integer standard_start_position_of_week read, write Starting day-of-week-in-month of the Standard Time. Day is 1-based
integer standard_start_day read, write Starting day-of-week of the Standard Time. Valid values are 1(SUNDAY) to 7(SATURDAY)
integer standard_start_hour read, write Starting hour of the Standard Time. Valid values are 0 to 23
integer standard_bias read, write The number of minutes added during the Standard Time
string day_light_name read, write Name of Daylight
integer day_light_start_month read, write Starting month of Daylight. Month is 0-based. eg, 0 for January
integer day_light_start_position_of_week read, write Starting day-of-week-in-month of Daylight. Day is 1-based
integer day_light_start_day read, write Starting day-of-week of Daylight. Valid values are 1(SUNDAY) to 7(SATURDAY)
integer day_light_start_hour read, write Starting hour of Daylight. Valid values are 0 to 23
integer day_light_bias read, write The number of minutes added during Daylight Time
- late final ffi.Pointer<_calendar_timezone_property_ids> __calendar_timezone = - _lookup<_calendar_timezone_property_ids>('_calendar_timezone'); - - _calendar_timezone_property_ids get _calendar_timezone => - __calendar_timezone.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_attendee _calendar_attendee view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID Read, Write Description
string _uri read only Identifier of this calendar attendee view
integer event_id read only Event/TODO that the attendee belongs to
string number read, write The number of the attendee
integer cutype read, write The type of attendee (one of CALENDAR_ATTENDEE_CUTYPE_INDIVIDUAL, CALENDAR_ATTENDEE_CUTYPE_GROUP, CALENDAR_ATTENDEE_CUTYPE_RESOURCE, CALENDAR_ATTENDEE_CUTYPE_ROOM, CALENDAR_ATTENDEE_CUTYPE_UNKNOWN)
integer person_id read, write Person ID that the attendee belongs to
string uid read, write Unique identifier
string email read, write The email address of the attendee
integer role read, write Attendee role (one of CALENDAR_ATTENDEE_ROLE_REQ_PARTICIPANT, CALENDAR_ATTENDEE_ROLE_OPT_PARTICIPANT, CALENDAR_ATTENDEE_ROLE_NON_PARTICIPANT, CALENDAR_ATTENDEE_ROLE_CHAIR)
integer status read, write Attendee status (one of CALENDAR_ATTENDEE_STATUS_PENDING, CALENDAR_ATTENDEE_STATUS_ACCEPTED, CALENDAR_ATTENDEE_STATUS_DECLINED, CALENDAR_ATTENDEE_STATUS_TENTATIVE, CALENDAR_ATTENDEE_STATUS_DELEGATED, CALENDAR_ATTENDEE_STATUS_COMPLETED, CALENDAR_ATTENDEE_STATUS_IN_PROCESS)
integer rsvp read, write RSVP invitation reply (one of true, false)
string delegatee_uri read, write Delegatee (DELEGATED-TO)
string delegator_uri read, write Delegator (DELEGATED-FROM)
string name read, write Attendee name
string member read, write Group that the attendee belongs to
- late final ffi.Pointer<_calendar_attendee_property_ids> __calendar_attendee = - _lookup<_calendar_attendee_property_ids>('_calendar_attendee'); - - _calendar_attendee_property_ids get _calendar_attendee => - __calendar_attendee.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_alarm _calendar_alarm view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID Read, Write Description
string _uri read only Identifier of this calendar alarm view
integer parent_id read only Event that the alarm belongs to
integer type read, write Currently NOT used
long long int time read, write The alarm time of the event(This represents the number of seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000(UTC)). This MUST be used with CALENDAR_ALARM_TIME_UNIT_SPECIFIC
integer tick read, write The number of unit before start time. This MUST be used with one of CALENDAR_ALARM_TIME_UNIT_MINUTE, CALENDAR_ALARM_TIME_UNIT_HOUR, CALENDAR_ALARM_TIME_UNIT_DAY, CALENDAR_ALARM_TIME_UNIT_WEEK.
integer tick_unit read, write Reminder tick time unit (one of CALENDAR_ALARM_NONE, CALENDAR_ALARM_TIME_UNIT_SPECIFIC, CALENDAR_ALARM_TIME_UNIT_MINUTE, CALENDAR_ALARM_TIME_UNIT_HOUR, CALENDAR_ALARM_TIME_UNIT_DAY, CALENDAR_ALARM_TIME_UNIT_WEEK)
string attach read, write Alarm tone path
string summary read, write Alarm summary
string description read, write Alarm description
integer action read, write Action of alarm (one of CALENDAR_ALARM_ACTION_AUDIO, CALENDAR_ALARM_ACTION_DISPLAY, CALENDAR_ALARM_ACTION_EMAIL)
calendar time alarm_time read, write The alarm time
- late final ffi.Pointer<_calendar_alarm_property_ids> __calendar_alarm = - _lookup<_calendar_alarm_property_ids>('_calendar_alarm'); - - _calendar_alarm_property_ids get _calendar_alarm => __calendar_alarm.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_updated_info _calendar_updated_info view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID Description
string _uri Identifier of this updated_info view
integer id Modified event(or todo) record ID
integer calendar_book_id Calendar book ID of the modified event(or todo) record
integer modified_status Enumeration value of the modified status (@ref calendar_record_modified_status_e)
integer version Version after change
- late final ffi.Pointer<_calendar_updated_info_property_ids> - __calendar_updated_info = - _lookup<_calendar_updated_info_property_ids>('_calendar_updated_info'); - - _calendar_updated_info_property_ids get _calendar_updated_info => - __calendar_updated_info.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event_calendar_book _calendar_event_calendar_book view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID
string _uri
integer event_id
integer calendar_book_id
string summary
string description
string location
string categories
string exdate
integer event_status
integer priority
integer timezone
integer person_id
integer busy_status
integer sensitivity
string uid
string organizer_name
string organizer_email
integer meeting_status
integer original_event_id
double latitude
double longitude
integer email_id
long long int created_time
long long int last_modified_time
integer freq
integer range_type
calendar time until_time
integer count
integer interval
string bysecond
string byminute
string byhour
string byday
string bymonthday
string byyearday
string byweekno
string bymonth
string bysetpos
integer wkst
string recurrence_id
string rdate
integer has_attendee
integer has_alarm
integer calendar_system_type
string sync_data1
string sync_data2
string sync_data3
string sync_data4
calendar time start_time
string start_tzid
calendar time end_time
string end_tzid
filter integer calendar_book_visibility
filter integer calendar_book_account_id
- late final ffi.Pointer<_calendar_event_calendar_book_property_ids> - __calendar_event_calendar_book = - _lookup<_calendar_event_calendar_book_property_ids>( - '_calendar_event_calendar_book'); - - _calendar_event_calendar_book_property_ids - get _calendar_event_calendar_book => __calendar_event_calendar_book.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_todo_calendar_book _calendar_todo_calendar_book view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID
string _uri
integer todo_id
integer calendar_book_id
string summary
string description
string location
string categories
integer todo_status
integer priority
integer sensitivity
string uid
double latitude
double longitude
long long int created_time
long long int last_modified_time
long long int completed_time
integer progress
integer freq
integer range_type
calendar time until_time
integer count
integer interval
string bysecond
string byminute
string byhour
string byday
string bymonthday
string byyearday
string byweekno
string bymonth
string bysetpos
integer wkst
integer has_alarm
string sync_data1
string sync_data2
string sync_data3
string sync_data4
calendar time start_time
string start_tzid
calendar time due_time
string due_tzid
filter integer calendar_book_visibility
filter integer calendar_book_account_id
- late final ffi.Pointer<_calendar_todo_calendar_book_property_ids> - __calendar_todo_calendar_book = - _lookup<_calendar_todo_calendar_book_property_ids>( - '_calendar_todo_calendar_book'); - - _calendar_todo_calendar_book_property_ids get _calendar_todo_calendar_book => - __calendar_todo_calendar_book.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event_calendar_book_attendee _calendar_event_calendar_book_attendee view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID
string _uri
integer event_id
integer calendar_book_id
string summary
string description
string location
string categories
string exdate
integer event_status
integer priority
integer timezone
integer person_id
integer busy_status
integer sensitivity
string uid
string organizer_name
string organizer_email
integer meeting_status
integer original_event_id
double latitude
double longitude
integer email_id
long long int created_time
long long int last_modified_time
integer freq
integer range_type
calendar time until_time
integer count
integer interval
string bysecond
string byminute
string byhour
string byday
string bymonthday
string byyearday
string byweekno
string bymonth
string bysetpos
integer wkst
string recurrence_id
string rdate
integer has_attendee
integer has_alarm
integer calendar_system_type
string sync_data1
string sync_data2
string sync_data3
string sync_data4
calendar time start_time
string start_tzid
calendar time end_time
string end_tzid
filter integer calendar_book_visibility
filter integer calendar_book_account_id
filter string attendee_email
filter string attendee_name
filter string attendee_member
- late final ffi.Pointer<_calendar_event_calendar_book_attendee_property_ids> - __calendar_event_calendar_book_attendee = - _lookup<_calendar_event_calendar_book_attendee_property_ids>( - '_calendar_event_calendar_book_attendee'); - - _calendar_event_calendar_book_attendee_property_ids - get _calendar_event_calendar_book_attendee => - __calendar_event_calendar_book_attendee.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_instance_utime_calendar_book _calendar_instance_utime_calendar_book view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID
string _uri
integer event_id
calendar time start_time
calendar time end_time
string summary
string location
integer calendar_book_id
string description
integer busy_status
integer event_status
integer priority
integer sensitivity
integer has_rrule
double latitude
double longitude
integer has_alarm
integer original_event_id
filter integer calendar_book_visibility
filter integer calendar_book_account_id
long long int last_modified_time
string sync_data1
- late final ffi.Pointer<_calendar_instance_utime_calendar_book_property_ids> - __calendar_instance_utime_calendar_book = - _lookup<_calendar_instance_utime_calendar_book_property_ids>( - '_calendar_instance_utime_calendar_book'); - - _calendar_instance_utime_calendar_book_property_ids - get _calendar_instance_utime_calendar_book => - __calendar_instance_utime_calendar_book.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_instance_localtime_calendar_book _calendar_instance_localtime_calendar_book view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID
string _uri
integer event_id
calendar time start_time
calendar time end_time
string summary
string location
integer calendar_book_id
string description
integer busy_status
integer event_status
integer priority
integer sensitivity
integer has_rrule
double latitude
double longitude
integer has_alarm
integer original_event_id
filter integer calendar_book_visibility
filter integer calendar_book_account_id
long long int last_modified_time
string sync_data1
int is_allday
- late final ffi - .Pointer<_calendar_instance_localtime_calendar_book_property_ids> - __calendar_instance_localtime_calendar_book = - _lookup<_calendar_instance_localtime_calendar_book_property_ids>( - '_calendar_instance_localtime_calendar_book'); - - _calendar_instance_localtime_calendar_book_property_ids - get _calendar_instance_localtime_calendar_book => - __calendar_instance_localtime_calendar_book.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_instance_utime_calendar_book_extended _calendar_instance_utime_calendar_book_extended view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID
string _uri
integer event_id
calendar time start_time
calendar time end_time
string summary
string location
integer calendar_book_id
string description
integer busy_status
integer event_status
integer priority
integer sensitivity
integer has_rrule
double latitude
double longitude
integer has_alarm
integer original_event_id
filter integer calendar_book_visibility
filter integer calendar_book_account_id
string organizer_name
string categories
integer has_attendee
string sync_data1
string sync_data2
string sync_data3
string sync_data4
- late final ffi - .Pointer<_calendar_instance_utime_calendar_book_extended_property_ids> - __calendar_instance_utime_calendar_book_extended = - _lookup<_calendar_instance_utime_calendar_book_extended_property_ids>( - '_calendar_instance_utime_calendar_book_extended'); - - _calendar_instance_utime_calendar_book_extended_property_ids - get _calendar_instance_utime_calendar_book_extended => - __calendar_instance_utime_calendar_book_extended.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_instance_localtime_calendar_book_extended _calendar_instance_localtime_calendar_book_extended view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID
string _uri
integer event_id
calendar time start_time
calendar time end_time
string summary
string location
integer calendar_book_id
string description
integer busy_status
integer event_status
integer priority
integer sensitivity
integer has_rrule
double latitude
double longitude
integer has_alarm
integer original_event_id
filter integer calendar_book_visibility
filter integer calendar_book_account_id
string organizer_name
string categories
integer has_attendee
string sync_data1
string sync_data2
string sync_data3
string sync_data4
- late final ffi - .Pointer<_calendar_instance_localtime_calendar_book_extended_property_ids> - __calendar_instance_localtime_calendar_book_extended = - _lookup<_calendar_instance_localtime_calendar_book_extended_property_ids>( - '_calendar_instance_localtime_calendar_book_extended'); - - _calendar_instance_localtime_calendar_book_extended_property_ids - get _calendar_instance_localtime_calendar_book_extended => - __calendar_instance_localtime_calendar_book_extended.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_extended_property _calendar_extended_property view (read only) - /// - /// - /// - /// - /// - /// - /// - /// Identifier of this extended_property view - /// - /// - /// - /// - /// - ///
Type Property ID Read, Write Description
string _uri read only
integer id read only DB record ID of the extended_property
integer record_id read,write Related record ID
integer record_type read, write Enumeration value of the record type (@ref calendar_record_type_e)
string key read, write The key of the property
string value read, write The value of the property
- late final ffi.Pointer<_calendar_extended_property_property_ids> - __calendar_extended_property = - _lookup<_calendar_extended_property_property_ids>( - '_calendar_extended_property'); - - _calendar_extended_property_property_ids get _calendar_extended_property => - __calendar_extended_property.ref; - - /// @brief Inserts a record into the calendar database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.write - /// @param[in] record The record handle - /// @param[out] record_id The record ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_NO_DATA Data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_db_update_record() - /// @see calendar_db_delete_record() - /// @see calendar_db_get_record() - int calendar_db_insert_record( - calendar_record_h record, - ffi.Pointer record_id, - ) { - return _calendar_db_insert_record( - record, - record_id, - ); - } - - late final _calendar_db_insert_recordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, - ffi.Pointer)>>('calendar_db_insert_record'); - late final _calendar_db_insert_record = _calendar_db_insert_recordPtr - .asFunction)>(); - - /// @brief Gets a record from the calendar database. - /// @details This function creates a new record handle from the calendar database by the given @a record_id. \n - /// @a record will be created and filled with record information. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.read - /// @remarks You must release @a record using calendar_record_destroy(). - /// @param[in] view_uri The view URI of a record - /// @param[in] record_id The record ID - /// @param[out] record The record handle associated with the record ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_NO_DATA Data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_record_destroy() - int calendar_db_get_record( - ffi.Pointer view_uri, - int record_id, - ffi.Pointer record, - ) { - return _calendar_db_get_record( - view_uri, - record_id, - record, - ); - } - - late final _calendar_db_get_recordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, - ffi.Pointer)>>('calendar_db_get_record'); - late final _calendar_db_get_record = _calendar_db_get_recordPtr.asFunction< - int Function( - ffi.Pointer, int, ffi.Pointer)>(); - - /// @brief Updates a record in the calendar database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.write - /// @param[in] record The record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_NO_DATA Data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_db_insert_record() - /// @see calendar_db_delete_record() - /// @see calendar_db_get_record() - int calendar_db_update_record( - calendar_record_h record, - ) { - return _calendar_db_update_record( - record, - ); - } - - late final _calendar_db_update_recordPtr = - _lookup>( - 'calendar_db_update_record'); - late final _calendar_db_update_record = _calendar_db_update_recordPtr - .asFunction(); - - /// @brief Deletes a record from the calendar database with related child records. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.write - /// @param[in] view_uri The view URI of a record - /// @param[in] record_id The record ID to be deleted - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found - /// @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_NO_DATA Data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_db_insert_record() - int calendar_db_delete_record( - ffi.Pointer view_uri, - int record_id, - ) { - return _calendar_db_delete_record( - view_uri, - record_id, - ); - } - - late final _calendar_db_delete_recordPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'calendar_db_delete_record'); - late final _calendar_db_delete_record = _calendar_db_delete_recordPtr - .asFunction, int)>(); - - /// @brief Retrieves all records as a list. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.read - /// @remarks You must release @a record_list using calendar_list_destroy(). - /// @param[in] view_uri The view URI to get records from - /// @param[in] offset The index from which results are received - /// @param[in] limit The maximum number of results(value 0 is used for all records) - /// @param[out] record_list The record list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_NO_DATA Data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_list_destroy() - int calendar_db_get_all_records( - ffi.Pointer view_uri, - int offset, - int limit, - ffi.Pointer record_list, - ) { - return _calendar_db_get_all_records( - view_uri, - offset, - limit, - record_list, - ); - } - - late final _calendar_db_get_all_recordsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int, - ffi.Pointer)>>('calendar_db_get_all_records'); - late final _calendar_db_get_all_records = - _calendar_db_get_all_recordsPtr.asFunction< - int Function( - ffi.Pointer, int, int, ffi.Pointer)>(); - - /// @brief Retrieves records using a query handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.read - /// @remarks You must release @a record_list using calendar_list_destroy(). - /// @param[in] query The query handle used to filter results - /// @param[in] offset The index from which results are received - /// @param[in] limit The maximum number of results(value 0 is used for all records) - /// @param[out] record_list The record list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_NO_DATA Data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_list_destroy() - int calendar_db_get_records_with_query( - calendar_query_h query, - int offset, - int limit, - ffi.Pointer record_list, - ) { - return _calendar_db_get_records_with_query( - query, - offset, - limit, - record_list, - ); - } - - late final _calendar_db_get_records_with_queryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_query_h, ffi.Int, ffi.Int, - ffi.Pointer)>>( - 'calendar_db_get_records_with_query'); - late final _calendar_db_get_records_with_query = - _calendar_db_get_records_with_queryPtr.asFunction< - int Function( - calendar_query_h, int, int, ffi.Pointer)>(); - - /// @brief Gets the record count of a specific view. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.read - /// @param[in] view_uri The view URI to get records from - /// @param[out] count The number of records - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_NO_DATA Data does not exist - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre This function requires an open connection to the calendar service using calendar_connect2(). - /// @see calendar_connect() - int calendar_db_get_count( - ffi.Pointer view_uri, - ffi.Pointer count, - ) { - return _calendar_db_get_count( - view_uri, - count, - ); - } - - late final _calendar_db_get_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('calendar_db_get_count'); - late final _calendar_db_get_count = _calendar_db_get_countPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Gets the record count with a query handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.read - /// @param[in] query The query handle used for filtering the results - /// @param[out] count The number of records - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_NO_DATA Data does not exist - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre This function requires an open connection to the calendar service using calendar_connect2(). - /// @see calendar_connect2() - int calendar_db_get_count_with_query( - calendar_query_h query, - ffi.Pointer count, - ) { - return _calendar_db_get_count_with_query( - query, - count, - ); - } - - late final _calendar_db_get_count_with_queryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_query_h, - ffi.Pointer)>>('calendar_db_get_count_with_query'); - late final _calendar_db_get_count_with_query = - _calendar_db_get_count_with_queryPtr - .asFunction)>(); - - /// @brief Inserts multiple records into the calendar database as a batch operation. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.write - /// @param[in] record_list The record list handle - /// @param[out] record_id_array The array of record IDs - /// @param[out] count The number of record IDs - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_NO_DATA Data does not exist - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_db_update_records() - /// @see calendar_db_delete_records() - int calendar_db_insert_records( - calendar_list_h record_list, - ffi.Pointer> record_id_array, - ffi.Pointer count, - ) { - return _calendar_db_insert_records( - record_list, - record_id_array, - count, - ); - } - - late final _calendar_db_insert_recordsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_list_h, ffi.Pointer>, - ffi.Pointer)>>('calendar_db_insert_records'); - late final _calendar_db_insert_records = - _calendar_db_insert_recordsPtr.asFunction< - int Function(calendar_list_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Updates multiple records into the calendar database as a batch operation. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.write - /// @param[in] record_list The record list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_NO_DATA Data does not exist - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_db_insert_records() - /// @see calendar_db_delete_records() - int calendar_db_update_records( - calendar_list_h record_list, - ) { - return _calendar_db_update_records( - record_list, - ); - } - - late final _calendar_db_update_recordsPtr = - _lookup>( - 'calendar_db_update_records'); - late final _calendar_db_update_records = _calendar_db_update_recordsPtr - .asFunction(); - - /// @brief Deletes multiple records with related child records from the calendar database as a batch operation. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.write - /// @param[in] view_uri The view URI of the records to delete - /// @param[in] record_id_array The record IDs to delete - /// @param[in] count The number of records - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found - /// @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_db_insert_records() - /// @see calendar_db_delete_records() - int calendar_db_delete_records( - ffi.Pointer view_uri, - ffi.Pointer record_id_array, - int count, - ) { - return _calendar_db_delete_records( - view_uri, - record_id_array, - count, - ); - } - - late final _calendar_db_delete_recordsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Int)>>('calendar_db_delete_records'); - late final _calendar_db_delete_records = - _calendar_db_delete_recordsPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); - - /// @brief Gets the current calendar database version. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.read - /// @param[out] calendar_db_version The calendar database version - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre This function requires an open connection to the calendar service using calendar_connect(). - /// @see calendar_connect() - /// @see calendar_db_get_changes_by_version() - int calendar_db_get_current_version( - ffi.Pointer calendar_db_version, - ) { - return _calendar_db_get_current_version( - calendar_db_version, - ); - } - - late final _calendar_db_get_current_versionPtr = - _lookup)>>( - 'calendar_db_get_current_version'); - late final _calendar_db_get_current_version = - _calendar_db_get_current_versionPtr - .asFunction)>(); - - /// @brief Registers a callback function to be invoked when a record changes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.read - /// @remarks If successive change notification produced on the view_uri are identical, - /// then they are coalesced into a single notification if the older notification has not yet been called - /// because default main loop is doing something. - /// But it means that a callback function is not called to reliably count of change. - /// This API supports only @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_book view, @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event view, - /// @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_todo view. - /// @param[in] view_uri The view URI of the record to subscribe for change notifications - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre This function requires an open connection to the calendar service using calendar_connect(). - /// @post calendar_db_changed_cb() will be invoked when the designated view changes. - /// @see calendar_connect() - /// @see calendar_db_changed_cb() - /// @see calendar_db_remove_changed_cb() - int calendar_db_add_changed_cb( - ffi.Pointer view_uri, - calendar_db_changed_cb callback, - ffi.Pointer user_data, - ) { - return _calendar_db_add_changed_cb( - view_uri, - callback, - user_data, - ); - } - - late final _calendar_db_add_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, calendar_db_changed_cb, - ffi.Pointer)>>('calendar_db_add_changed_cb'); - late final _calendar_db_add_changed_cb = - _calendar_db_add_changed_cbPtr.asFunction< - int Function(ffi.Pointer, calendar_db_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters a callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.read - /// @param[in] view_uri The view URI of the record to subscribe for change notifications - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre This function requires an open connection to the calendar service using calendar_connect(). - /// @see calendar_connect() - /// @see calendar_db_changed_cb() - /// @see calendar_db_add_changed_cb() - int calendar_db_remove_changed_cb( - ffi.Pointer view_uri, - calendar_db_changed_cb callback, - ffi.Pointer user_data, - ) { - return _calendar_db_remove_changed_cb( - view_uri, - callback, - user_data, - ); - } - - late final _calendar_db_remove_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, calendar_db_changed_cb, - ffi.Pointer)>>('calendar_db_remove_changed_cb'); - late final _calendar_db_remove_changed_cb = - _calendar_db_remove_changed_cbPtr.asFunction< - int Function(ffi.Pointer, calendar_db_changed_cb, - ffi.Pointer)>(); - - /// @brief Retrieves records with the given calendar database version. - /// @details This function finds all the changed records since the given @a calendar_db_version. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.read - /// @remarks You must release @a change_record_list using calendar_list_destroy(). - /// @param[in] view_uri The view URI to get records from - /// @param[in] calendar_book_id The calendar book ID to filter - /// @param[in] calendar_db_version The calendar database version - /// @param[out] record_list The record list - /// @param[out] current_calendar_db_version The current calendar database version - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_list_destroy() - int calendar_db_get_changes_by_version( - ffi.Pointer view_uri, - int calendar_book_id, - int calendar_db_version, - ffi.Pointer record_list, - ffi.Pointer current_calendar_db_version, - ) { - return _calendar_db_get_changes_by_version( - view_uri, - calendar_book_id, - calendar_db_version, - record_list, - current_calendar_db_version, - ); - } - - late final _calendar_db_get_changes_by_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Pointer, - ffi.Pointer)>>('calendar_db_get_changes_by_version'); - late final _calendar_db_get_changes_by_version = - _calendar_db_get_changes_by_versionPtr.asFunction< - int Function(ffi.Pointer, int, int, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Inserts a vcalendar stream into the calendar database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.write - /// @param[in] vcalendar_stream The vcalendar stream - /// @param[out] record_id_array The record IDs to delete - /// @param[out] count The number of record ID arrays - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_NO_DATA Data does not exist - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_db_replace_vcalendars() - int calendar_db_insert_vcalendars( - ffi.Pointer vcalendar_stream, - ffi.Pointer> record_id_array, - ffi.Pointer count, - ) { - return _calendar_db_insert_vcalendars( - vcalendar_stream, - record_id_array, - count, - ); - } - - late final _calendar_db_insert_vcalendarsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('calendar_db_insert_vcalendars'); - late final _calendar_db_insert_vcalendars = - _calendar_db_insert_vcalendarsPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Replaces a vcalendar stream in the calendar database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.write - /// @param[in] vcalendar_stream The vcalendar stream - /// @param[in] record_id_array The record IDs to replace - /// @param[in] count The number of record ID arrays - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_NO_DATA Data does not exist - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre This function requires an open connection to the calendar service by calendar_connect(). - /// @see calendar_connect() - /// @see calendar_db_replace_vcalendars() - int calendar_db_replace_vcalendars( - ffi.Pointer vcalendar_stream, - ffi.Pointer record_id_array, - int count, - ) { - return _calendar_db_replace_vcalendars( - vcalendar_stream, - record_id_array, - count, - ); - } - - late final _calendar_db_replace_vcalendarsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Int)>>('calendar_db_replace_vcalendars'); - late final _calendar_db_replace_vcalendars = - _calendar_db_replace_vcalendarsPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); - - /// @brief Replaces a record in the calendar database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.write - /// @param[in] record The record handle - /// @param[in] record_id The record ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_db_update_record() - /// @see calendar_db_delete_record() - /// @see calendar_db_get_record() - int calendar_db_replace_record( - calendar_record_h record, - int record_id, - ) { - return _calendar_db_replace_record( - record, - record_id, - ); - } - - late final _calendar_db_replace_recordPtr = - _lookup>( - 'calendar_db_replace_record'); - late final _calendar_db_replace_record = _calendar_db_replace_recordPtr - .asFunction(); - - /// @brief Replaces multiple records in the calendar database as a batch operation. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.write - /// @param[in] record_list The record list handle - /// @param[in] record_id_array The record IDs - /// @param[in] count The number of record ID arrays - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_db_update_records() - /// @see calendar_db_delete_records() - /// @see calendar_db_replace_record() - int calendar_db_replace_records( - calendar_list_h record_list, - ffi.Pointer record_id_array, - int count, - ) { - return _calendar_db_replace_records( - record_list, - record_id_array, - count, - ); - } - - late final _calendar_db_replace_recordsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_list_h, ffi.Pointer, - ffi.Int)>>('calendar_db_replace_records'); - late final _calendar_db_replace_records = _calendar_db_replace_recordsPtr - .asFunction, int)>(); - - /// @brief Gets the last successful change version of the database on the current connection. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.read - /// @param[out] last_change_version The calendar database version on the current connection - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre This function requires an open connection to the calendar service using calendar_connect(). - /// @see calendar_connect() - /// @see calendar_db_get_current_version() - int calendar_db_get_last_change_version( - ffi.Pointer last_change_version, - ) { - return _calendar_db_get_last_change_version( - last_change_version, - ); - } - - late final _calendar_db_get_last_change_versionPtr = - _lookup)>>( - 'calendar_db_get_last_change_version'); - late final _calendar_db_get_last_change_version = - _calendar_db_get_last_change_versionPtr - .asFunction)>(); - - /// @brief Retrieves changed exception records since the given calendar database version. - /// Exceptions are the modified or deleted instances in a recurring event. - /// @details This function finds all the changed records since the given @a calendar_db_version. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.read - /// @remarks You must release @a change_record_list using calendar_list_destroy(). - /// @param[in] view_uri The view URI to get records from - /// @param[in] original_event_id The original event ID - /// @param[in] calendar_db_version The calendar database version starting from which to get records - /// @param[out] list The record list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_list_destroy() - int calendar_db_get_changes_exception_by_version( - ffi.Pointer view_uri, - int original_event_id, - int calendar_db_version, - ffi.Pointer list, - ) { - return _calendar_db_get_changes_exception_by_version( - view_uri, - original_event_id, - calendar_db_version, - list, - ); - } - - late final _calendar_db_get_changes_exception_by_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int, - ffi.Pointer)>>( - 'calendar_db_get_changes_exception_by_version'); - late final _calendar_db_get_changes_exception_by_version = - _calendar_db_get_changes_exception_by_versionPtr.asFunction< - int Function( - ffi.Pointer, int, int, ffi.Pointer)>(); - - /// @brief Cleans the data after sync. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.write - /// @param[in] calendar_book_id The calendar book ID - /// @param[in] calendar_db_version The calendar database version - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_NO_DATA Data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - int calendar_db_clean_after_sync( - int calendar_book_id, - int calendar_db_version, - ) { - return _calendar_db_clean_after_sync( - calendar_book_id, - calendar_db_version, - ); - } - - late final _calendar_db_clean_after_syncPtr = - _lookup>( - 'calendar_db_clean_after_sync'); - late final _calendar_db_clean_after_sync = - _calendar_db_clean_after_syncPtr.asFunction(); - - /// @brief Links a record to another record. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.write - /// @param[in] base_id The base record ID - /// @param[in] record_id The record ID to link to - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - int calendar_db_link_record( - int base_id, - int record_id, - ) { - return _calendar_db_link_record( - base_id, - record_id, - ); - } - - late final _calendar_db_link_recordPtr = - _lookup>( - 'calendar_db_link_record'); - late final _calendar_db_link_record = - _calendar_db_link_recordPtr.asFunction(); - - /// @brief Unlinks a record from base record. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.write - /// @param[in] record_id The record ID to unlink - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - int calendar_db_unlink_record( - int record_id, - ) { - return _calendar_db_unlink_record( - record_id, - ); - } - - late final _calendar_db_unlink_recordPtr = - _lookup>( - 'calendar_db_unlink_record'); - late final _calendar_db_unlink_record = - _calendar_db_unlink_recordPtr.asFunction(); - - /// @brief Creates a filter handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks You must release @a filter using calendar_filter_destroy(). - /// @param[in] view_uri The view URI of a filter - /// @param[out] filter The filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to initialize. - /// @see calendar_filter_destroy() - int calendar_filter_create( - ffi.Pointer view_uri, - ffi.Pointer filter, - ) { - return _calendar_filter_create( - view_uri, - filter, - ); - } - - late final _calendar_filter_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('calendar_filter_create'); - late final _calendar_filter_create = _calendar_filter_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys a filter handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] filter The filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_filter_create() - int calendar_filter_destroy( - calendar_filter_h filter, - ) { - return _calendar_filter_destroy( - filter, - ); - } - - late final _calendar_filter_destroyPtr = - _lookup>( - 'calendar_filter_destroy'); - late final _calendar_filter_destroy = - _calendar_filter_destroyPtr.asFunction(); - - /// @brief Adds a condition for the string type property. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] filter The filter handle - /// @param[in] property_id The property ID to add a condition - /// @param[in] match The match flag - /// @param[in] match_value The match value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_filter_add_operator() - int calendar_filter_add_str( - calendar_filter_h filter, - int property_id, - int match, - ffi.Pointer match_value, - ) { - return _calendar_filter_add_str( - filter, - property_id, - match, - match_value, - ); - } - - late final _calendar_filter_add_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_filter_h, ffi.UnsignedInt, ffi.Int32, - ffi.Pointer)>>('calendar_filter_add_str'); - late final _calendar_filter_add_str = _calendar_filter_add_strPtr.asFunction< - int Function(calendar_filter_h, int, int, ffi.Pointer)>(); - - /// @brief Adds a condition for the integer type property. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] filter The filter handle - /// @param[in] property_id The property ID to add a condition - /// @param[in] match The match flag - /// @param[in] match_value The match value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_filter_add_operator() - int calendar_filter_add_int( - calendar_filter_h filter, - int property_id, - int match, - int match_value, - ) { - return _calendar_filter_add_int( - filter, - property_id, - match, - match_value, - ); - } - - late final _calendar_filter_add_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_filter_h, ffi.UnsignedInt, ffi.Int32, - ffi.Int)>>('calendar_filter_add_int'); - late final _calendar_filter_add_int = _calendar_filter_add_intPtr - .asFunction(); - - /// @brief Adds a condition for the double type property. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] filter The filter handle - /// @param[in] property_id The property ID to add a condition - /// @param[in] match The match flag - /// @param[in] match_value The match value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_filter_add_operator() - int calendar_filter_add_double( - calendar_filter_h filter, - int property_id, - int match, - double match_value, - ) { - return _calendar_filter_add_double( - filter, - property_id, - match, - match_value, - ); - } - - late final _calendar_filter_add_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_filter_h, ffi.UnsignedInt, ffi.Int32, - ffi.Double)>>('calendar_filter_add_double'); - late final _calendar_filter_add_double = _calendar_filter_add_doublePtr - .asFunction(); - - /// @brief Adds a condition for the long long int type property. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] filter The filter handle - /// @param[in] property_id The property ID to add a condition - /// @param[in] match The match flag - /// @param[in] match_value The match value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_filter_add_operator() - int calendar_filter_add_lli( - calendar_filter_h filter, - int property_id, - int match, - int match_value, - ) { - return _calendar_filter_add_lli( - filter, - property_id, - match, - match_value, - ); - } - - late final _calendar_filter_add_lliPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_filter_h, ffi.UnsignedInt, ffi.Int32, - ffi.LongLong)>>('calendar_filter_add_lli'); - late final _calendar_filter_add_lli = _calendar_filter_add_lliPtr - .asFunction(); - - /// @brief Adds a condition for the calendar_time_s type property. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] filter The filter handle - /// @param[in] property_id The property ID to add a condition - /// @param[in] match The match flag - /// @param[in] match_value The match value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_filter_add_operator() - int calendar_filter_add_caltime( - calendar_filter_h filter, - int property_id, - int match, - calendar_time_s match_value, - ) { - return _calendar_filter_add_caltime( - filter, - property_id, - match, - match_value, - ); - } - - late final _calendar_filter_add_caltimePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_filter_h, ffi.UnsignedInt, ffi.Int32, - calendar_time_s)>>('calendar_filter_add_caltime'); - late final _calendar_filter_add_caltime = _calendar_filter_add_caltimePtr - .asFunction(); - - /// @brief Adds a child filter to a parent filter. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] parent_filter The parent filter handle - /// @param[in] child_filter The child filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_filter_add_operator() - int calendar_filter_add_filter( - calendar_filter_h parent_filter, - calendar_filter_h child_filter, - ) { - return _calendar_filter_add_filter( - parent_filter, - child_filter, - ); - } - - late final _calendar_filter_add_filterPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_filter_h, - calendar_filter_h)>>('calendar_filter_add_filter'); - late final _calendar_filter_add_filter = _calendar_filter_add_filterPtr - .asFunction(); - - /// @brief Adds an operator between conditions. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] filter The filter handle - /// @param[in] operator_type The operator type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_filter_add_str() - /// @see calendar_filter_add_int() - /// @see calendar_filter_add_double() - /// @see calendar_filter_add_caltime() - /// @see calendar_filter_add_filter() - int calendar_filter_add_operator( - calendar_filter_h filter, - int operator_type, - ) { - return _calendar_filter_add_operator( - filter, - operator_type, - ); - } - - late final _calendar_filter_add_operatorPtr = _lookup< - ffi.NativeFunction>( - 'calendar_filter_add_operator'); - late final _calendar_filter_add_operator = _calendar_filter_add_operatorPtr - .asFunction(); - - /// @brief Creates a calendar list handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks You must release @a calendar_list using calendar_list_destroy(). - /// @param[out] out_list The calendar list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_list_destroy() - int calendar_list_create( - ffi.Pointer out_list, - ) { - return _calendar_list_create( - out_list, - ); - } - - late final _calendar_list_createPtr = _lookup< - ffi.NativeFunction)>>( - 'calendar_list_create'); - late final _calendar_list_create = _calendar_list_createPtr - .asFunction)>(); - - /// @brief Destroys a calendar list handle and releases all its resources. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] list The calendar list handle - /// @param[in] delete_record If @c true, child records are destroyed automatically, - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_list_create() - int calendar_list_destroy( - calendar_list_h list, - bool delete_record, - ) { - return _calendar_list_destroy( - list, - delete_record, - ); - } - - late final _calendar_list_destroyPtr = - _lookup>( - 'calendar_list_destroy'); - late final _calendar_list_destroy = _calendar_list_destroyPtr - .asFunction(); - - /// @brief Retrieves the number of calendar entities in a calendar list. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] list The calendar list handle - /// @param[out] count The count of the calendar entity - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_list_add() - int calendar_list_get_count( - calendar_list_h list, - ffi.Pointer count, - ) { - return _calendar_list_get_count( - list, - count, - ); - } - - late final _calendar_list_get_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_list_h, - ffi.Pointer)>>('calendar_list_get_count'); - late final _calendar_list_get_count = _calendar_list_get_countPtr - .asFunction)>(); - - /// @brief Adds a record to the calendar list. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] list The calendar list handle - /// @param[in] record The record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_list_remove() - int calendar_list_add( - calendar_list_h list, - calendar_record_h record, - ) { - return _calendar_list_add( - list, - record, - ); - } - - late final _calendar_list_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - calendar_list_h, calendar_record_h)>>('calendar_list_add'); - late final _calendar_list_add = _calendar_list_addPtr - .asFunction(); - - /// @brief Removes a record from the calendar list. - /// @details If the record is the current record, then the current record is changed to the next record.\n - /// If the record is the last record then the current record will be @c NULL. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] list The calendar list handle - /// @param[in] record The record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_list_add() - int calendar_list_remove( - calendar_list_h list, - calendar_record_h record, - ) { - return _calendar_list_remove( - list, - record, - ); - } - - late final _calendar_list_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - calendar_list_h, calendar_record_h)>>('calendar_list_remove'); - late final _calendar_list_remove = _calendar_list_removePtr - .asFunction(); - - /// @brief Retrieves a record from the calendar list. - /// @details The default current record is the first record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks You MUST NOT destroy the @a record handle. - /// It is destroyed automatically when the @a list is destroyed. - /// @param[in] list The calendar list handle - /// @param[out] record The record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - int calendar_list_get_current_record_p( - calendar_list_h list, - ffi.Pointer record, - ) { - return _calendar_list_get_current_record_p( - list, - record, - ); - } - - late final _calendar_list_get_current_record_pPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - calendar_list_h, ffi.Pointer)>>( - 'calendar_list_get_current_record_p'); - late final _calendar_list_get_current_record_p = - _calendar_list_get_current_record_pPtr.asFunction< - int Function(calendar_list_h, ffi.Pointer)>(); - - /// @brief Moves a calendar list to the previous position. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] list The calendar list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_list_next() - int calendar_list_prev( - calendar_list_h list, - ) { - return _calendar_list_prev( - list, - ); - } - - late final _calendar_list_prevPtr = - _lookup>( - 'calendar_list_prev'); - late final _calendar_list_prev = - _calendar_list_prevPtr.asFunction(); - - /// @brief Moves a calendar list to the next position. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] list The calendar list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_list_prev() - int calendar_list_next( - calendar_list_h list, - ) { - return _calendar_list_next( - list, - ); - } - - late final _calendar_list_nextPtr = - _lookup>( - 'calendar_list_next'); - late final _calendar_list_next = - _calendar_list_nextPtr.asFunction(); - - /// @brief Moves a calendar list to the first position. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] list The calendar list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_list_last() - int calendar_list_first( - calendar_list_h list, - ) { - return _calendar_list_first( - list, - ); - } - - late final _calendar_list_firstPtr = - _lookup>( - 'calendar_list_first'); - late final _calendar_list_first = - _calendar_list_firstPtr.asFunction(); - - /// @brief Moves a calendar list to the last position. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] list The calendar list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_list_first() - int calendar_list_last( - calendar_list_h list, - ) { - return _calendar_list_last( - list, - ); - } - - late final _calendar_list_lastPtr = - _lookup>( - 'calendar_list_last'); - late final _calendar_list_last = - _calendar_list_lastPtr.asFunction(); - - /// @brief Creates a query handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks You must release @a query using calendar_query_destroy(). - /// @param[in] view_uri The view URI of a query - /// @param[out] query The filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to initialize. - /// @see calendar_query_destroy() - int calendar_query_create( - ffi.Pointer view_uri, - ffi.Pointer query, - ) { - return _calendar_query_create( - view_uri, - query, - ); - } - - late final _calendar_query_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('calendar_query_create'); - late final _calendar_query_create = _calendar_query_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys a query handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] query The query handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_query_create() - int calendar_query_destroy( - calendar_query_h query, - ) { - return _calendar_query_destroy( - query, - ); - } - - late final _calendar_query_destroyPtr = - _lookup>( - 'calendar_query_destroy'); - late final _calendar_query_destroy = - _calendar_query_destroyPtr.asFunction(); - - /// @brief Adds property IDs for projection. - /// @details Property IDs can be of one of the properties of view_uri which is used in calendar_query_create(). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] query The query handle - /// @param[in] property_id_array The property ID array - /// @param[in] count The number of property IDs - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - int calendar_query_set_projection( - calendar_query_h query, - ffi.Pointer property_id_array, - int count, - ) { - return _calendar_query_set_projection( - query, - property_id_array, - count, - ); - } - - late final _calendar_query_set_projectionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_query_h, ffi.Pointer, - ffi.Int)>>('calendar_query_set_projection'); - late final _calendar_query_set_projection = - _calendar_query_set_projectionPtr.asFunction< - int Function(calendar_query_h, ffi.Pointer, int)>(); - - /// @brief Sets the "distinct" option for projection. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] query The query handle - /// @param[in] set If @c true it is set, - /// otherwise if @c false it is unset - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - int calendar_query_set_distinct( - calendar_query_h query, - bool set1, - ) { - return _calendar_query_set_distinct( - query, - set1, - ); - } - - late final _calendar_query_set_distinctPtr = - _lookup>( - 'calendar_query_set_distinct'); - late final _calendar_query_set_distinct = _calendar_query_set_distinctPtr - .asFunction(); - - /// @brief Sets the filter for a query. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] query The query handle - /// @param[in] filter The filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_query_add_operator() - int calendar_query_set_filter( - calendar_query_h query, - calendar_filter_h filter, - ) { - return _calendar_query_set_filter( - query, - filter, - ); - } - - late final _calendar_query_set_filterPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_query_h, - calendar_filter_h)>>('calendar_query_set_filter'); - late final _calendar_query_set_filter = _calendar_query_set_filterPtr - .asFunction(); - - /// @brief Sets the sort mode for a query. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] query The query handle - /// @param[in] property_id The property ID to sort - /// @param[in] is_ascending If @c true it sorts in the ascending order, - /// otherwise if @c false it sorts in the descending order - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - int calendar_query_set_sort( - calendar_query_h query, - int property_id, - bool is_ascending, - ) { - return _calendar_query_set_sort( - query, - property_id, - is_ascending, - ); - } - - late final _calendar_query_set_sortPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_query_h, ffi.UnsignedInt, - ffi.Bool)>>('calendar_query_set_sort'); - late final _calendar_query_set_sort = _calendar_query_set_sortPtr - .asFunction(); - - /// @brief Creates a record handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks You must release @a record using calendar_record_destroy(). - /// @param[in] view_uri The view URI - /// @param[out] out_record The record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to initialize. - /// @see calendar_record_destroy() - int calendar_record_create( - ffi.Pointer view_uri, - ffi.Pointer out_record, - ) { - return _calendar_record_create( - view_uri, - out_record, - ); - } - - late final _calendar_record_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('calendar_record_create'); - late final _calendar_record_create = _calendar_record_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys a record handle and releases all its resources. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The record handle - /// @param[in] delete_child If @c true, child records are destroyed automatically, - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_create() - int calendar_record_destroy( - calendar_record_h record, - bool delete_child, - ) { - return _calendar_record_destroy( - record, - delete_child, - ); - } - - late final _calendar_record_destroyPtr = _lookup< - ffi.NativeFunction>( - 'calendar_record_destroy'); - late final _calendar_record_destroy = _calendar_record_destroyPtr - .asFunction(); - - /// @brief Makes a clone of a record handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks You must release @a cloned_record using calendar_record_destroy(). - /// @param[in] record The record handle - /// @param[out] out_record The cloned record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_destroy() - int calendar_record_clone( - calendar_record_h record, - ffi.Pointer out_record, - ) { - return _calendar_record_clone( - record, - out_record, - ); - } - - late final _calendar_record_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, - ffi.Pointer)>>('calendar_record_clone'); - late final _calendar_record_clone = _calendar_record_clonePtr.asFunction< - int Function(calendar_record_h, ffi.Pointer)>(); - - /// @brief Gets a URI string from a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The record handle - /// @param[out] uri The URI of the record - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - int calendar_record_get_uri_p( - calendar_record_h record, - ffi.Pointer> uri, - ) { - return _calendar_record_get_uri_p( - record, - uri, - ); - } - - late final _calendar_record_get_uri_pPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - calendar_record_h, ffi.Pointer>)>>( - 'calendar_record_get_uri_p'); - late final _calendar_record_get_uri_p = - _calendar_record_get_uri_pPtr.asFunction< - int Function( - calendar_record_h, ffi.Pointer>)>(); - - /// @brief Gets a string from a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks You must release @a value using free(). - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] out_str The result value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_get_str_p() - /// @see calendar_record_set_str() - int calendar_record_get_str( - calendar_record_h record, - int property_id, - ffi.Pointer> out_str, - ) { - return _calendar_record_get_str( - record, - property_id, - out_str, - ); - } - - late final _calendar_record_get_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - ffi.Pointer>)>>('calendar_record_get_str'); - late final _calendar_record_get_str = _calendar_record_get_strPtr.asFunction< - int Function( - calendar_record_h, int, ffi.Pointer>)>(); - - /// @brief Gets a string pointer from a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks You MUST NOT release @a value. - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] out_str The result value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_get_str() - /// @see calendar_record_set_str() - int calendar_record_get_str_p( - calendar_record_h record, - int property_id, - ffi.Pointer> out_str, - ) { - return _calendar_record_get_str_p( - record, - property_id, - out_str, - ); - } - - late final _calendar_record_get_str_pPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - ffi.Pointer>)>>( - 'calendar_record_get_str_p'); - late final _calendar_record_get_str_p = - _calendar_record_get_str_pPtr.asFunction< - int Function( - calendar_record_h, int, ffi.Pointer>)>(); - - /// @brief Gets an integer value from a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] out_value The result value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_set_int() - int calendar_record_get_int( - calendar_record_h record, - int property_id, - ffi.Pointer out_value, - ) { - return _calendar_record_get_int( - record, - property_id, - out_value, - ); - } - - late final _calendar_record_get_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - ffi.Pointer)>>('calendar_record_get_int'); - late final _calendar_record_get_int = _calendar_record_get_intPtr - .asFunction)>(); - - /// @brief Gets a double value from a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] out_value The result value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_set_double() - int calendar_record_get_double( - calendar_record_h record, - int property_id, - ffi.Pointer out_value, - ) { - return _calendar_record_get_double( - record, - property_id, - out_value, - ); - } - - late final _calendar_record_get_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - ffi.Pointer)>>('calendar_record_get_double'); - late final _calendar_record_get_double = - _calendar_record_get_doublePtr.asFunction< - int Function(calendar_record_h, int, ffi.Pointer)>(); - - /// @brief Gets a long long integer value from a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] out_value The result value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_set_lli() - int calendar_record_get_lli( - calendar_record_h record, - int property_id, - ffi.Pointer out_value, - ) { - return _calendar_record_get_lli( - record, - property_id, - out_value, - ); - } - - late final _calendar_record_get_lliPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - ffi.Pointer)>>('calendar_record_get_lli'); - late final _calendar_record_get_lli = _calendar_record_get_lliPtr.asFunction< - int Function(calendar_record_h, int, ffi.Pointer)>(); - - /// @brief Gets a calendar_caltime_s value from a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] out_value The result value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_set_caltime() - int calendar_record_get_caltime( - calendar_record_h record, - int property_id, - ffi.Pointer out_value, - ) { - return _calendar_record_get_caltime( - record, - property_id, - out_value, - ); - } - - late final _calendar_record_get_caltimePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - ffi.Pointer)>>('calendar_record_get_caltime'); - late final _calendar_record_get_caltime = - _calendar_record_get_caltimePtr.asFunction< - int Function(calendar_record_h, int, ffi.Pointer)>(); - - /// @brief Sets a string to a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[in] value The value to be set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_get_str() - /// @see calendar_record_get_str_p() - int calendar_record_set_str( - calendar_record_h record, - int property_id, - ffi.Pointer value, - ) { - return _calendar_record_set_str( - record, - property_id, - value, - ); - } - - late final _calendar_record_set_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - ffi.Pointer)>>('calendar_record_set_str'); - late final _calendar_record_set_str = _calendar_record_set_strPtr.asFunction< - int Function(calendar_record_h, int, ffi.Pointer)>(); - - /// @brief Sets an integer value to a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[in] value The value to be set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_get_int() - int calendar_record_set_int( - calendar_record_h record, - int property_id, - int value, - ) { - return _calendar_record_set_int( - record, - property_id, - value, - ); - } - - late final _calendar_record_set_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - ffi.Int)>>('calendar_record_set_int'); - late final _calendar_record_set_int = _calendar_record_set_intPtr - .asFunction(); - - /// @brief Sets a double value to a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[in] value The value to be set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_get_double() - int calendar_record_set_double( - calendar_record_h record, - int property_id, - double value, - ) { - return _calendar_record_set_double( - record, - property_id, - value, - ); - } - - late final _calendar_record_set_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - ffi.Double)>>('calendar_record_set_double'); - late final _calendar_record_set_double = _calendar_record_set_doublePtr - .asFunction(); - - /// @brief Sets a long long integer value to a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[in] value The value to be set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_get_lli() - int calendar_record_set_lli( - calendar_record_h record, - int property_id, - int value, - ) { - return _calendar_record_set_lli( - record, - property_id, - value, - ); - } - - late final _calendar_record_set_lliPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - ffi.LongLong)>>('calendar_record_set_lli'); - late final _calendar_record_set_lli = _calendar_record_set_lliPtr - .asFunction(); - - /// @brief Sets a calendar_time_s value to a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[in] value The value to be set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_get_caltime() - int calendar_record_set_caltime( - calendar_record_h record, - int property_id, - calendar_time_s value, - ) { - return _calendar_record_set_caltime( - record, - property_id, - value, - ); - } - - late final _calendar_record_set_caltimePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - calendar_time_s)>>('calendar_record_set_caltime'); - late final _calendar_record_set_caltime = _calendar_record_set_caltimePtr - .asFunction(); - - /// @brief Adds a child record to the parent record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The parent record handle - /// @param[in] property_id The property ID - /// @param[in] child_record The handle of the child record to be added to the parent record - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_remove_child_record() - int calendar_record_add_child_record( - calendar_record_h record, - int property_id, - calendar_record_h child_record, - ) { - return _calendar_record_add_child_record( - record, - property_id, - child_record, - ); - } - - late final _calendar_record_add_child_recordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - calendar_record_h)>>('calendar_record_add_child_record'); - late final _calendar_record_add_child_record = - _calendar_record_add_child_recordPtr.asFunction< - int Function(calendar_record_h, int, calendar_record_h)>(); - - /// @brief Removes a child record from the parent record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The parent record handle - /// @param[in] property_id The property ID - /// @param[in] child_record The handle of the child record to be removed from the parent record - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_add_child_record() - int calendar_record_remove_child_record( - calendar_record_h record, - int property_id, - calendar_record_h child_record, - ) { - return _calendar_record_remove_child_record( - record, - property_id, - child_record, - ); - } - - late final _calendar_record_remove_child_recordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - calendar_record_h)>>('calendar_record_remove_child_record'); - late final _calendar_record_remove_child_record = - _calendar_record_remove_child_recordPtr.asFunction< - int Function(calendar_record_h, int, calendar_record_h)>(); - - /// @brief Gets the number of child records in a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The parent record handle - /// @param[in] property_id The property ID - /// @param[out] count The child record count - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_add_child_record() - /// @see calendar_record_remove_child_record() - int calendar_record_get_child_record_count( - calendar_record_h record, - int property_id, - ffi.Pointer count, - ) { - return _calendar_record_get_child_record_count( - record, - property_id, - count, - ); - } - - late final _calendar_record_get_child_record_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - ffi.Pointer)>>( - 'calendar_record_get_child_record_count'); - late final _calendar_record_get_child_record_count = - _calendar_record_get_child_record_countPtr.asFunction< - int Function(calendar_record_h, int, ffi.Pointer)>(); - - /// @brief Gets a child record handle pointer from the parent record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks You MUST NOT release @a child_record. \n - /// It is released when the parent record handle is destroyed. - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[in] index The index of the child record - /// @param[out] child_record The child record handle pointer - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_add_child_record() - /// @see calendar_record_remove_child_record() - /// @see calendar_record_get_child_record_count() - int calendar_record_get_child_record_at_p( - calendar_record_h record, - int property_id, - int index, - ffi.Pointer child_record, - ) { - return _calendar_record_get_child_record_at_p( - record, - property_id, - index, - child_record, - ); - } - - late final _calendar_record_get_child_record_at_pPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, ffi.Int, - ffi.Pointer)>>( - 'calendar_record_get_child_record_at_p'); - late final _calendar_record_get_child_record_at_p = - _calendar_record_get_child_record_at_pPtr.asFunction< - int Function( - calendar_record_h, int, int, ffi.Pointer)>(); - - /// @brief Makes a clone of a given record's child record list. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks You must release @a cloned_list using calendar_list_destroy(). - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] out_list The cloned list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_list_destroy() - int calendar_record_clone_child_record_list( - calendar_record_h record, - int property_id, - ffi.Pointer out_list, - ) { - return _calendar_record_clone_child_record_list( - record, - property_id, - out_list, - ); - } - - late final _calendar_record_clone_child_record_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - ffi.Pointer)>>( - 'calendar_record_clone_child_record_list'); - late final _calendar_record_clone_child_record_list = - _calendar_record_clone_child_record_listPtr.asFunction< - int Function(calendar_record_h, int, ffi.Pointer)>(); - - /// @brief Connects to the calendar service. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks Opening the connection is necessary to access the calendar database and perform operations such as fetching, inserting, or updating records.\n - /// The execution of calendar_connect() and calendar_disconnect() could slow down your application, so you are recommended not to call them frequently. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_disconnect() - int calendar_connect() { - return _calendar_connect(); - } - - late final _calendar_connectPtr = - _lookup>('calendar_connect'); - late final _calendar_connect = - _calendar_connectPtr.asFunction(); - - /// @brief Disconnects from the calendar service. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks If there is no open connection, this function returns #CALENDAR_ERROR_DB_FAILED. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_connect() - int calendar_disconnect() { - return _calendar_disconnect(); - } - - late final _calendar_disconnectPtr = - _lookup>('calendar_disconnect'); - late final _calendar_disconnect = - _calendar_disconnectPtr.asFunction(); - - /// @brief Connects to the calendar service on a thread. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks Opening a connection is necessary to access the calendar database and perform operations such as fetching, inserting, or updating records.\n - /// On a thread environment with calendar_connect(), request in one thread could fail, while another request connection is working in the other thread. - /// To prevent request failure, calendar_connect_on_thread() is recommended. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_disconnect_on_thread() - int calendar_connect_on_thread() { - return _calendar_connect_on_thread(); - } - - late final _calendar_connect_on_threadPtr = - _lookup>( - 'calendar_connect_on_thread'); - late final _calendar_connect_on_thread = - _calendar_connect_on_threadPtr.asFunction(); - - /// @brief Disconnects from the calendar service on a thread. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks If there is no open connection, this function returns #CALENDAR_ERROR_DB_FAILED. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_connect_on_thread() - int calendar_disconnect_on_thread() { - return _calendar_disconnect_on_thread(); - } - - late final _calendar_disconnect_on_threadPtr = - _lookup>( - 'calendar_disconnect_on_thread'); - late final _calendar_disconnect_on_thread = - _calendar_disconnect_on_threadPtr.asFunction(); - - /// @brief Connects to the calendar service. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks Opening a connection is necessary to access the calendar database and perform operations such as fetching, inserting, or updating records.\n - /// Before the calendar-service daemon is ready, if you call calendar_connect(), it could fail. - /// It is recommended to call this API with #CALENDAR_CONNECT_FLAG_RETRY flags in such a situation. - /// @param[in] flags calendar_connect_flag - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_disconnect(), CALENDAR_CONNECT_FLAG_RETRY - int calendar_connect_with_flags( - int flags, - ) { - return _calendar_connect_with_flags( - flags, - ); - } - - late final _calendar_connect_with_flagsPtr = - _lookup>( - 'calendar_connect_with_flags'); - late final _calendar_connect_with_flags = - _calendar_connect_with_flagsPtr.asFunction(); - - /// @brief Retrieves a vcalendar stream from a calendar list. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] calendar_list The calendar list handle - /// @param[out] vcalendar_stream The vcalendar stream - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - int calendar_vcalendar_make_from_records( - calendar_list_h calendar_list, - ffi.Pointer> vcalendar_stream, - ) { - return _calendar_vcalendar_make_from_records( - calendar_list, - vcalendar_stream, - ); - } - - late final _calendar_vcalendar_make_from_recordsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - calendar_list_h, ffi.Pointer>)>>( - 'calendar_vcalendar_make_from_records'); - late final _calendar_vcalendar_make_from_records = - _calendar_vcalendar_make_from_recordsPtr.asFunction< - int Function(calendar_list_h, ffi.Pointer>)>(); - - /// @brief Retrieves all calendars from a vcalendar stream. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] vcalendar_stream The vcalendar stream - /// @param[out] calendar_list The calendar list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to initialize. - int calendar_vcalendar_parse_to_calendar( - ffi.Pointer vcalendar_stream, - ffi.Pointer calendar_list, - ) { - return _calendar_vcalendar_parse_to_calendar( - vcalendar_stream, - calendar_list, - ); - } - - late final _calendar_vcalendar_parse_to_calendarPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>( - 'calendar_vcalendar_parse_to_calendar'); - late final _calendar_vcalendar_parse_to_calendar = - _calendar_vcalendar_parse_to_calendarPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Retrieves all events or to-dos - /// (\ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event or \ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_todo) from a vCalendar file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] vcalendar_file_path The file path of the vCalendar stream file - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to initialize. - /// @post This function invokes calendar_vcalendar_parse_cb(). - /// @see calendar_vcalendar_parse_cb() - /// @see calendar_record_get_uri_p() - int calendar_vcalendar_parse_to_calendar_foreach( - ffi.Pointer vcalendar_file_path, - calendar_vcalendar_parse_cb callback, - ffi.Pointer user_data, - ) { - return _calendar_vcalendar_parse_to_calendar_foreach( - vcalendar_file_path, - callback, - user_data, - ); - } - - late final _calendar_vcalendar_parse_to_calendar_foreachPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - calendar_vcalendar_parse_cb, ffi.Pointer)>>( - 'calendar_vcalendar_parse_to_calendar_foreach'); - late final _calendar_vcalendar_parse_to_calendar_foreach = - _calendar_vcalendar_parse_to_calendar_foreachPtr.asFunction< - int Function(ffi.Pointer, calendar_vcalendar_parse_cb, - ffi.Pointer)>(); - - /// @brief Adds a callback to get a notification when an alarm gives an alert. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.read - /// @param[in] callback The callback to be added - /// @param[in] user_data The user data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_reminder_remove_cb() - int calendar_reminder_add_cb( - calendar_reminder_cb callback, - ffi.Pointer user_data, - ) { - return _calendar_reminder_add_cb( - callback, - user_data, - ); - } - - late final _calendar_reminder_add_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_reminder_cb, - ffi.Pointer)>>('calendar_reminder_add_cb'); - late final _calendar_reminder_add_cb = _calendar_reminder_add_cbPtr - .asFunction)>(); - - /// @brief Removes a callback to get a notification when an alarm gives an alert. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] callback The callback to be removed - /// @param[in] user_data The user data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_reminder_add_cb() - int calendar_reminder_remove_cb( - calendar_reminder_cb callback, - ffi.Pointer user_data, - ) { - return _calendar_reminder_remove_cb( - callback, - user_data, - ); - } - - late final _calendar_reminder_remove_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_reminder_cb, - ffi.Pointer)>>('calendar_reminder_remove_cb'); - late final _calendar_reminder_remove_cb = _calendar_reminder_remove_cbPtr - .asFunction)>(); - - /// @brief Connects to the contacts service. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks Connection opening is necessary to access the contacts server such as fetching, inserting, or updating records.\n - /// The execution of contacts_connect() and contacts_disconnect() could slow down your application. So it is not recommended to call them frequently. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM System error - /// @retval #CONTACTS_ERROR_INTERNAL Internal error - /// @see contacts_disconnect() - int contacts_connect() { - return _contacts_connect(); - } - - late final _contacts_connectPtr = - _lookup>('contacts_connect'); - late final _contacts_connect = - _contacts_connectPtr.asFunction(); - - /// @brief Disconnects from the contacts service. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks If there is no opened connection, this function returns #CONTACTS_ERROR_DB. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM System error - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @see contacts_connect() - int contacts_disconnect() { - return _contacts_disconnect(); - } - - late final _contacts_disconnectPtr = - _lookup>('contacts_disconnect'); - late final _contacts_disconnect = - _contacts_disconnectPtr.asFunction(); - - /// @brief Connects to the contacts service with a connection on another thread. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks Opening connection is necessary to access the contact server and to perform operations such as fetching, inserting, or updating records.\n - /// On multiple thread environment with contacts_connect(), request can be failed in one thread, while another request is working by the connection in the other thread. - /// To prevent request fail, contacts_connect_on_thread() is recommended. Then new connection is set for the thread. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM System error - /// @retval #CONTACTS_ERROR_INTERNAL Internal error - /// @see contacts_disconnect_on_thread() - int contacts_connect_on_thread() { - return _contacts_connect_on_thread(); - } - - late final _contacts_connect_on_threadPtr = - _lookup>( - 'contacts_connect_on_thread'); - late final _contacts_connect_on_thread = - _contacts_connect_on_threadPtr.asFunction(); - - /// @brief Disconnects from the contacts service. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks If there is no opened connection, this function returns #CONTACTS_ERROR_DB. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM System error - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @see contacts_connect_on_thread() - int contacts_disconnect_on_thread() { - return _contacts_disconnect_on_thread(); - } - - late final _contacts_disconnect_on_threadPtr = - _lookup>( - 'contacts_disconnect_on_thread'); - late final _contacts_disconnect_on_thread = - _contacts_disconnect_on_threadPtr.asFunction(); - - /// @brief Connects to the contacts service. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] flags Connection flag - /// @remarks Connection opening is necessary to access the contacts server such as fetching, inserting, or updating records.\n - /// Before contacts-service daemon is ready, if you call contacts_connect(), it will fail. - /// To prevent it, if you call this API with @ref CONTACTS_CONNECT_FLAG_RETRY flags, it will retry several time.\n - /// To close the connection, contacts_disconnect() should be called. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM System error - /// @retval #CONTACTS_ERROR_INTERNAL Internal error - /// @see contacts_disconnect() - int contacts_connect_with_flags( - int flags, - ) { - return _contacts_connect_with_flags( - flags, - ); - } - - late final _contacts_connect_with_flagsPtr = - _lookup>( - 'contacts_connect_with_flags'); - late final _contacts_connect_with_flags = - _contacts_connect_with_flagsPtr.asFunction(); - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book _contacts_address_book view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts addressbook view
integer id read only DB record ID of the addressbook
integer account_id read, write once Account ID that the addressbook belongs to
string name read, write It cannot be @c NULL. Duplicate names are not allowed.
integer mode read, write Addressbook mode, refer to the @ref contacts_address_book_mode_e
- late final ffi.Pointer<_contacts_address_book_property_ids> - __contacts_address_book = - _lookup<_contacts_address_book_property_ids>('_contacts_address_book'); - - _contacts_address_book_property_ids get _contacts_address_book => - __contacts_address_book.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group _contacts_group view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts group view
integer id read only DB record ID of the group
integer address_book_id read, write once Addressbook ID that the group belongs to
string name read, write Group name
string ringtone_path read, write Ringtone path of the group
string image_path read, write Image path of the group
string vibration read, write Vibration path of the group
string extra_data read, write Extra data for default group name
boolean is_read_only read, write once The group is read only or not
string message_alert read, write Message alert path of the group
- late final ffi.Pointer<_contacts_group_property_ids> __contacts_group = - _lookup<_contacts_group_property_ids>('_contacts_group'); - - _contacts_group_property_ids get _contacts_group => __contacts_group.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person _contacts_person view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts person view
integer id read only DB record ID of the person
string display_name read only Display name of the person
string display_name_index read only The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id read only Display contact ID that the person belongs to
string ringtone_path read, write Ringtone path of the person
string image_thumbnail_path read only Image thumbnail path of the person
string vibration read, write Vibration path of the person
string message_alert read, write Message alert path of the person
string status read only Status of social account
boolean is_favorite read, write The person is favorite or not
double favorite_priority read only The priority of favorite contacts. it can be used as sorting key, see the @ref contacts_query_set_sort
integer link_count read only Link count of contact records (projection)
string addressbook_ids read only Addressbook IDs that the person belongs to (projection)
boolean has_phonenumber read only The person has phone number or not
boolean has_email read only The person has email or not
integer snippet_type read only keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string read only keyword matched data string (Since 3.0)
- late final ffi.Pointer<_contacts_person_property_ids> __contacts_person = - _lookup<_contacts_person_property_ids>('_contacts_person'); - - _contacts_person_property_ids get _contacts_person => __contacts_person.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_simple_contact _contacts_simple_contact view - /// You can only get simple contact using this view. - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this simple contact view
integerid DB record ID of the contact
stringdisplay_name Display name of the contact
integerdisplay_source_id The source type of display name, refer to the @ref contacts_display_name_source_type_e
integeraddress_book_id Addressbook that the contact belongs to
stringringtone_path Ringtone path of the contact
stringimage_thumbnail_path Image thumbnail path of the contact
booleanis_favorite The contact is favorite or not
booleanhas_phonenumber The contact has phone number or not
booleanhas_email The contact has email or not
integerperson_id Person ID that the contact belongs to
stringuid Unique identifier
stringvibration Vibration path of the contact
stringmessage_alert Message alert path of the contact
integerchanged_time Last changed contact time
- late final ffi.Pointer<_contacts_simple_contact_property_ids> - __contacts_simple_contact = - _lookup<_contacts_simple_contact_property_ids>( - '_contacts_simple_contact'); - - _contacts_simple_contact_property_ids get _contacts_simple_contact => - __contacts_simple_contact.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact _contacts_contact view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contact view
integeridread only DB record ID of the contact
stringdisplay_nameread only Display name of the contact
integerdisplay_source_idread only The source type of display name, refer to the @ref contacts_display_name_source_type_e
integeraddress_book_idread, write once Addressbook ID that the contact belongs to
stringringtone_pathread, write Ringtone path of the contact
stringimage_thumbnail_pathread only Image thumbnail path of the contact
booleanis_favoriteread, write The contact is favorite or not
booleanhas_phonenumberread only The contact has phone number or not
booleanhas_emailread only The contact has email or not
integerperson_idread, write once Person ID that the contact belongs to. If set when inserting, a contact will be linked to person
stringuidread, write Unique identifier
stringvibrationread, write Vibration path of the contact
stringmessage_alertread, write Message alert path of the contact
integerchanged_timeread only Last changed contact time
integerlink_moderead, write once The link mode, refer to the @ref contacts_contact_link_mode_e. If the person_id was set, this value will be ignored
recordnameread, write _contacts_name child record (single)
recordcompanyread, write _contacts_company child record (multiple)
recordnoteread, write _contacts_note child record (multiple)
recordnumberread, write _contacts_number child record (multiple)
recordemailread, write _contacts_email child record (multiple)
recordeventread, write _contacts_event child record (multiple)
recordmessengerread, write _contacts_messenger child record (multiple)
recordaddressread, write _contacts_address child record (multiple)
recordurlread, write _contacts_url child record (multiple)
recordnicknameread, write _contacts_nickname child record (multiple)
recordprofileread, write _contacts_profile child record (multiple)
recordrelationshipread, write _contacts_relationship child record (multiple)
recordimageread, write _contacts_image child record (multiple)
recordgroup_relationread, write _contacts_group_relation child record (multiple)
recordsipread, write _contacts_sip child record (multiple) (Since 3.0)
- late final ffi.Pointer<_contacts_contact_property_ids> __contacts_contact = - _lookup<_contacts_contact_property_ids>('_contacts_contact'); - - _contacts_contact_property_ids get _contacts_contact => - __contacts_contact.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile _contacts_my_profile view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this my profile view
integeridread only DB record ID of the my profile
stringdisplay_nameread only Display name of the profile
integeraddress_book_idread, write once Addressbook ID that the profile belongs to
stringimage_thumbnail_pathread only Image thumbnail path of the profile
stringuidread, write Unique identifier
integerchanged_timeread only Last changed profile time
recordnameread, write _contacts_name child record (single)
recordcompanyread, write _contacts_company child record (multiple)
recordnoteread, write _contacts_note child record (multiple)
recordnumberread, write _contacts_number child record (multiple)
recordemailread, write _contacts_email child record (multiple)
recordeventread, write _contacts_event child record (multiple)
recordmessengerread, write _contacts_messenger child record (multiple)
recordaddressread, write _contacts_address child record (multiple)
recordurlread, write _contacts_url child record (multiple)
recordnicknameread, write _contacts_nickname child record (multiple)
recordprofileread, write _contacts_profile child record (multiple)
recordrelationshipread, write _contacts_relationship child record (multiple)
recordimageread, write _contacts_image child record (multiple)
recordsipread, write _contacts_sip child record (multiple) (Since 3.0)
- late final ffi.Pointer<_contacts_my_profile_property_ids> - __contacts_my_profile = - _lookup<_contacts_my_profile_property_ids>('_contacts_my_profile'); - - _contacts_my_profile_property_ids get _contacts_my_profile => - __contacts_my_profile.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name _contacts_name view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts name view
integer id read only DB record ID of the name
integer contact_id read, write once Contacts ID that the name record belongs to
string first read, write First name
string last read, write Last name
string addition read, write Middle name
string suffix read, write Suffix
string prefix read, write Prefix
string phonetic_first read, write Pronounce the first name
string phonetic_middle read, write Pronounce the middle name
string phonetic_last read, write Pronounce the last name
- late final ffi.Pointer<_contacts_name_property_ids> __contacts_name = - _lookup<_contacts_name_property_ids>('_contacts_name'); - - _contacts_name_property_ids get _contacts_name => __contacts_name.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number _contacts_number view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts number view
integer id read only DB record ID of the number
integer contact_id read, write once Contact ID that the number belongs to
integer type read, write Number type, refer to the @ref contacts_number_type_e
string label read, write Custom number type label, when the number type is #CONTACTS_NUMBER_TYPE_CUSTOM
boolean is_default read, write The number is default number or not
string number read, write Number
string normalized_number filter only You can only use this property for search filter.
string cleaned_number filter only You can only use this property for search filter.
string number_filter filter only You can only use this property for search filter.
- late final ffi.Pointer<_contacts_number_property_ids> __contacts_number = - _lookup<_contacts_number_property_ids>('_contacts_number'); - - _contacts_number_property_ids get _contacts_number => __contacts_number.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email _contacts_email view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts email view
integer id read only DB record ID of the email
integer contact_id read, write once Contact ID that the email belongs to
integer type read, write Email type, refer to the @ref contacts_email_type_e
string label read, write Custom mail type label, when the email type is #CONTACTS_EMAIL_TYPE_CUSTOM
boolean is_default read, write The email is default email or not
string email read, write Email address
- late final ffi.Pointer<_contacts_email_property_ids> __contacts_email = - _lookup<_contacts_email_property_ids>('_contacts_email'); - - _contacts_email_property_ids get _contacts_email => __contacts_email.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address _contacts_address view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts address view
integer id read only DB record ID of the address
integer contact_id read, write once Contact ID that the address belongs to
integer type read, write Address type, refer to the @ref contacts_address_type_e
string label read, write Address type label, when the address type is #CONTACTS_ADDRESS_TYPE_CUSTOM
string postbox read, write Post office box
string postal_code read, write Postal code
string region read, write Region
string locality read, write Locality
string street read, write Street
string country read, write Country
string extended read, write Extended address
boolean is_default read, write The address is default or not
- late final ffi.Pointer<_contacts_address_property_ids> __contacts_address = - _lookup<_contacts_address_property_ids>('_contacts_address'); - - _contacts_address_property_ids get _contacts_address => - __contacts_address.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note _contacts_note view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts note view
integer id read only DB record ID of the note
integer contact_id read, write once Contact ID that the note belongs to
string note read, write Note contents
- late final ffi.Pointer<_contacts_note_property_ids> __contacts_note = - _lookup<_contacts_note_property_ids>('_contacts_note'); - - _contacts_note_property_ids get _contacts_note => __contacts_note.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url _contacts_url view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts URL view
integer id read only DB record ID of the URL
integer contact_id read, write once Contact ID that the URL belongs to
integer type read, write URL type, refer to the @ref contacts_url_type_e
string label read, write Custom URL type label, when the URL type is #CONTACTS_URL_TYPE_CUSTOM
string url read, write URL
- late final ffi.Pointer<_contacts_url_property_ids> __contacts_url = - _lookup<_contacts_url_property_ids>('_contacts_url'); - - _contacts_url_property_ids get _contacts_url => __contacts_url.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event _contacts_event view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts event view
integer id read only DB record ID of the event
integer contact_id read, write once Contact ID that the event belongs to
integer type read, write Event type, refer to the @ref contacts_event_type_e
string label read, write Custom event type label, when the event type is #CONTACTS_EVENT_TYPE_CUSTOM
integer date read, write Event date(YYYYMMDD). e.g. 2014/1/1 : 20140101. Even if the calendar_type is set as CONTACTS_EVENT_CALENDAR_TYPE_CHINESE, you SHOULD set Gregorian date
integer calendar_type read, write Calendar type, refer to the @ref contacts_event_calendar_type_e
bool is_leap_month (Deprecated) read, write The month is leap or not (valid on lunisolar calendar only)
- late final ffi.Pointer<_contacts_event_property_ids> __contacts_event = - _lookup<_contacts_event_property_ids>('_contacts_event'); - - _contacts_event_property_ids get _contacts_event => __contacts_event.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group_relation _contacts_group_relation view - /// Refer @ref contacts_group_add_contact, @ref contacts_group_remove_contact - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this relationship view
integer id read only DB record ID of the group (can not be used as filter)
integer group_id read, write once DB record ID of the group
integer contact_id read, write once DB record ID of the contact
string name read only Group name
- late final ffi.Pointer<_contacts_group_relation_property_ids> - __contacts_group_relation = - _lookup<_contacts_group_relation_property_ids>( - '_contacts_group_relation'); - - _contacts_group_relation_property_ids get _contacts_group_relation => - __contacts_group_relation.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship _contacts_relationship view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this relationship view
integer id read only DB record ID of the relationship
integer contact_id read, write once Contact ID that the relationship belongs to
integer type read, write Relationship type, refer to the @ref contacts_relationship_type_e
string label read, write Custom relationship type label, when the relationship type is CONTACTS_RELATIONSHIP_TYPE_CUSTOM
string name read, write Selected contact name that the relationship belongs to
- late final ffi.Pointer<_contacts_relationship_property_ids> - __contacts_relationship = - _lookup<_contacts_relationship_property_ids>('_contacts_relationship'); - - _contacts_relationship_property_ids get _contacts_relationship => - __contacts_relationship.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image _contacts_image view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts image view
integer id read only DB record ID of the image
integer contact_id read, write once Contact ID that the image belongs to
integer type read, write Image type, refer to the @ref contacts_image_type_e
string label read, write Custom image type label, when the image type is #CONTACTS_IMAGE_TYPE_CUSTOM
string path read, write Image thumbnail path
- late final ffi.Pointer<_contacts_image_property_ids> __contacts_image = - _lookup<_contacts_image_property_ids>('_contacts_image'); - - _contacts_image_property_ids get _contacts_image => __contacts_image.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company _contacts_company view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts company view
integer id read only DB record ID of the company
integer contact_id read, write once Contact ID that the company belongs to
integer type read, write Company type, refer to the @ref contacts_company_type_e
string label read, write Custom company type label, when the company type is #CONTACTS_COMPANY_TYPE_CUSTOM
string name read, write Company name
string department read, write Department
string job_title read, write Job title
string assistant_name read, write Assistant name
string role read, write Role
string logo read, write Company logo image file path
string location read, write Company location
string description read, write Description
string phonetic_name read, write Pronounce the company name
- late final ffi.Pointer<_contacts_company_property_ids> __contacts_company = - _lookup<_contacts_company_property_ids>('_contacts_company'); - - _contacts_company_property_ids get _contacts_company => - __contacts_company.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname _contacts_nickname view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts nickname view
integer id read only DB record ID of the nickname
integer contact_id read, write once Contact ID that the nickname belongs to
string name read, write Nickname
- late final ffi.Pointer<_contacts_nickname_property_ids> __contacts_nickname = - _lookup<_contacts_nickname_property_ids>('_contacts_nickname'); - - _contacts_nickname_property_ids get _contacts_nickname => - __contacts_nickname.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger _contacts_messenger view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts messenger view
integer id read only DB record ID of the messenger
integer contact_id read, write once Contact ID that the messenger belongs to
integer type read, write Messenger type, refer to the @ref contacts_messenger_type_e
string label read, write Custom messenger type label, when the messenger type is #CONTACTS_MESSENGER_TYPE_CUSTOM
string im_id read, write Messenger ID (email address or email ID...)
- late final ffi.Pointer<_contacts_messenger_property_ids> - __contacts_messenger = - _lookup<_contacts_messenger_property_ids>('_contacts_messenger'); - - _contacts_messenger_property_ids get _contacts_messenger => - __contacts_messenger.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension _contacts_extension view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts extension view
integer id read only DB record ID of the contact extension
integer contact_id read, write once Contact ID that the contact extension belongs to
integer data1 read, write The extra child record format for non-provided from contacts-service
string data2 read, write The extra child record format for non-provided from contacts-service
string data3 read, write The extra child record format for non-provided from contacts-service
string data4 read, write The extra child record format for non-provided from contacts-service
string data5 read, write The extra child record format for non-provided from contacts-service
string data6 read, write The extra child record format for non-provided from contacts-service
string data7 read, write The extra child record format for non-provided from contacts-service
string data8 read, write The extra child record format for non-provided from contacts-service
string data9 read, write The extra child record format for non-provided from contacts-service
string data10 read, write The extra child record format for non-provided from contacts-service
string data11 read, write The extra child record format for non-provided from contacts-service
string data12 read, write The extra child record format for non-provided from contacts-service
- late final ffi.Pointer<_contacts_extension_property_ids> - __contacts_extension = - _lookup<_contacts_extension_property_ids>('_contacts_extension'); - - _contacts_extension_property_ids get _contacts_extension => - __contacts_extension.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_sdn _contacts_sdn view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts sdn view
integer id read only DB record ID of the sdn
string name read only Provided name of sdn
string number read only Provided number of sdn
integer sim_slot_no read onlyIt is related to the SIM slot number. sim_slot_no 0 means first SIM card, sim_slot_no 1 means second SIM. It is same with handle index of telephony handle list. Refer to the telephony_init()
- late final ffi.Pointer<_contacts_sdn_property_ids> __contacts_sdn = - _lookup<_contacts_sdn_property_ids>('_contacts_sdn'); - - _contacts_sdn_property_ids get _contacts_sdn => __contacts_sdn.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile _contacts_profile view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts profile view
integer id read only DB record ID of profile
integer contact_id read, write once Contacts ID that the profile belongs to
string uid read, write Unique identifier
string text read, write Profile contents
integer order read, write Priority to display the profile
string service_operation read, write Data for app_control_set_operation
string mime read, write Data for app_control_set_mime
string app_id read, write Data for app_control_set_app_id
string uri read, write Data for app_control_set_uri
string catagory read, write Data for app_control_set_category
string extra_data read, write It includes "key:value,key:value," pairs. You should parse it. And you must base64 encode each key and value
- late final ffi.Pointer<_contacts_profile_property_ids> __contacts_profile = - _lookup<_contacts_profile_property_ids>('_contacts_profile'); - - _contacts_profile_property_ids get _contacts_profile => - __contacts_profile.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo _contacts_activity_photo view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contact activity photo view
integer id read only DB record ID of activity photo
integer activity_id read, write once Activity ID that the activity photo belongs to
string photo_url read, write Photo URL
integer sort_index read, write Sorted photo index
- late final ffi.Pointer<_contacts_activity_photo_property_ids> - __contacts_activity_photo = - _lookup<_contacts_activity_photo_property_ids>( - '_contacts_activity_photo'); - - _contacts_activity_photo_property_ids get _contacts_activity_photo => - __contacts_activity_photo.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity _contacts_activity view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this activity view
integer id read only DB record ID of activity
integer contact_id read, write once Contact ID that the activity belongs to
string source_name read, write Account name that the activity belongs to
int timestamp read, write Published time of activity
string status read, write Activity status
string service_operation read, write Data for app_control_set_operation
string uri read, write Data for app_control_set_uri
record photo read, write _contacts_activity_photo child record (multiple)
- late final ffi.Pointer<_contacts_activity_property_ids> __contacts_activity = - _lookup<_contacts_activity_property_ids>('_contacts_activity'); - - _contacts_activity_property_ids get _contacts_activity => - __contacts_activity.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial _contacts_speeddial view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contact speed dial view
integer speeddial_number read, write once Stored speed dial number
integer number_id read, write Number ID that the speed dial belongs to
string number read only Contact number of specified speed dial
string number_label read only Contact number label of specified speed dial, when the number type is CONTACTS_NUMBER_TYPE_CUSTOM
integer number_type read only Contact number type, refer to the @ref contacts_number_type_e
integer person_id read only Person ID that the speed dial belongs to
string display_name read only Display name that the speed dial belongs to
string image_thumbnail_path read only Image thumbnail path that the speed dial belongs to
string normalized_number filter only You can only use this property for search filter
string cleaned_number filter only You can only use this property for search filter
string number_filter filter only If you add filter with this property, the string will be normalized as minmatch length internally and the match rule will be applied CONTACTS_MATCH_EXACTLY
- late final ffi.Pointer<_contacts_speeddial_property_ids> - __contacts_speeddial = - _lookup<_contacts_speeddial_property_ids>('_contacts_speeddial'); - - _contacts_speeddial_property_ids get _contacts_speeddial => - __contacts_speeddial.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log _contacts_phone_log view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this phone log view
integer id read only DB record ID of phone log
integer person_id read, write once Person ID that the phone log belongs to
string address read, write once Number or Email that the phone log displays
integer log_time read, write once Call end time. The value means number of seconds since 1970-01-01 00:00:00 (UTC)
integer log_type read, write Log type, refer to the @ref contacts_phone_log_type_e
integer extra_data1 read, write once You can set the related integer data (e.g. message_id, email_id or duration(seconds) of call)
string extra_data2 read, write once You can set the related string data (e.g. short message, subject)
string normalized_address filter only You can only use this property for search filter
string cleaned_address filter only You can only use this property for search filter
string address_filter filter only You can only use this property for search filter
integer sim_slot_no read, write once You can set the related SIM slot number. sim_slot_no 0 means first SIM card, sim_slot_no 1 means second SIM. It is same with handle index of telephony handle list. Refer to the telephony_init()
- late final ffi.Pointer<_contacts_phone_log_property_ids> - __contacts_phone_log = - _lookup<_contacts_phone_log_property_ids>('_contacts_phone_log'); - - _contacts_phone_log_property_ids get _contacts_phone_log => - __contacts_phone_log.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact_updated_info _contacts_contact_updated_info view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this contact updated info view
integer contact_id Updated contact ID
integer address_book_id Addressbook ID that the updated contact belongs to
integer type Contact updated type, refer to the @ref contacts_changed_e
integer version Updated version
boolean image_changed Contact image is changed or not
- late final ffi.Pointer<_contacts_contact_updated_info_property_ids> - __contacts_contact_updated_info = - _lookup<_contacts_contact_updated_info_property_ids>( - '_contacts_contact_updated_info'); - - _contacts_contact_updated_info_property_ids - get _contacts_contact_updated_info => __contacts_contact_updated_info.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile_updated_info _contacts_my_profile_updated_info view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this my profile updated info view
integer address_book_id Address book ID that the updated my profile belongs to
integer last_changed_type Changed update type, refer to the @ref contacts_changed_e
integer version Updated version
- late final ffi.Pointer<_contacts_my_profile_updated_info_property_ids> - __contacts_my_profile_updated_info = - _lookup<_contacts_my_profile_updated_info_property_ids>( - '_contacts_my_profile_updated_info'); - - _contacts_my_profile_updated_info_property_ids - get _contacts_my_profile_updated_info => - __contacts_my_profile_updated_info.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group_updated_info _contacts_group_updated_info view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this group updated info view
integer group_id Updated group ID
integer address_book_id Address book ID that the updated group belongs to
integer type Changed update type, refer to the @ref contacts_changed_e
integer version Updated version
- late final ffi.Pointer<_contacts_group_updated_info_property_ids> - __contacts_group_updated_info = - _lookup<_contacts_group_updated_info_property_ids>( - '_contacts_group_updated_info'); - - _contacts_group_updated_info_property_ids get _contacts_group_updated_info => - __contacts_group_updated_info.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group_member_updated_info _contacts_group_member_updated_info view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this group member updated info view
integer group_id Updated group ID
integer address_book_id Address book ID that the updated group belongs to
integer version Updated version
- late final ffi.Pointer<_contacts_group_member_updated_info_property_ids> - __contacts_group_member_updated_info = - _lookup<_contacts_group_member_updated_info_property_ids>( - '_contacts_group_member_updated_info'); - - _contacts_group_member_updated_info_property_ids - get _contacts_group_member_updated_info => - __contacts_group_member_updated_info.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_grouprel_updated_info _contacts_grouprel_updated_info view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this group relation updated info view
integer group_id Group ID of group relation
integer contact_id Contact ID of the updated group relation
integer address_book_id Address book ID of contact that the updated group relation
integer type Changed update type, refer to the @ref contacts_changed_e
integer version Updated version
- late final ffi.Pointer<_contacts_grouprel_updated_info_property_ids> - __contacts_grouprel_updated_info = - _lookup<_contacts_grouprel_updated_info_property_ids>( - '_contacts_grouprel_updated_info'); - - _contacts_grouprel_updated_info_property_ids - get _contacts_grouprel_updated_info => - __contacts_grouprel_updated_info.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact _contacts_person_contact view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this person contact view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
string status Status of social account (projection)
boolean is_favorite The person is favorite or not
integer link_count Link count of contact records (projection)
integer contact_id Contact ID that the person belongs to
string addressbook_ids Addressbook IDs that the person belongs to (projection)
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer address_book_id Addressbook ID that the person belongs to
integer address_book_mode Addressbook mode, refer to the @ref contacts_address_book_mode_e
string address_book_name Addressbook name that the person belongs to
integer snippet_type keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string keyword matched data string (Since 3.0)
- late final ffi.Pointer<_contacts_person_contact_property_ids> - __contacts_person_contact = - _lookup<_contacts_person_contact_property_ids>( - '_contacts_person_contact'); - - _contacts_person_contact_property_ids get _contacts_person_contact => - __contacts_person_contact.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_number _contacts_person_number view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this person number view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
boolean is_favorite The person is favorite or not
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer number_id Number ID that the person belongs to
integer type Number type, refer to the @ref contacts_number_type_e (projection)
string label Custom number type label, when the number type is #CONTACTS_NUMBER_TYPE_CUSTOM (projection)
boolean is_primary_default The number is default number or not
string number Number
string number_filter If you add filter with this property, the string will be normalized as minmatch length internally and the match rule will be applied CONTACTS_MATCH_EXACTLY
string normalized_number You can only use this property for search filter
string cleaned_number You can only use this property for search filter
integer snippet_type keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string keyword matched data string (Since 3.0)
- late final ffi.Pointer<_contacts_person_number_property_ids> - __contacts_person_number = - _lookup<_contacts_person_number_property_ids>('_contacts_person_number'); - - _contacts_person_number_property_ids get _contacts_person_number => - __contacts_person_number.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_email _contacts_person_email view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this person email view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
boolean is_favorite The person is favorite or not
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer email_id Email ID that the person belongs to
integer type Email type, refer to the @ref contacts_email_type_e (projection)
string label Custom mail type label, when the email type is #CONTACTS_EMAIL_TYPE_CUSTOM (projection)
boolean is_primary_default The email is default email or not
string email Email address
integer snippet_type keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string keyword matched data string (Since 3.0)
- late final ffi.Pointer<_contacts_person_email_property_ids> - __contacts_person_email = - _lookup<_contacts_person_email_property_ids>('_contacts_person_email'); - - _contacts_person_email_property_ids get _contacts_person_email => - __contacts_person_email.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel _contacts_person_grouprel view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this person group relation view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
string status Status of social account (projection)
boolean is_favorite The person is favorite or not
integer link_count Link count of contat records (projection)
string addressbook_ids Addressbook IDs that the person belongs to (projection)
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer address_book_id Addressbook ID that the person belongs to
integer address_book_mode Addressbook mode, refer to the @ref contacts_address_book_mode_e
string address_book_name Addressbook name that the person belongs to
integer group_id Group ID that the person belongs to
integer contact_id Contact ID that the person belongs to (projection)
integer snippet_type keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string keyword matched data string (Since 3.0)
- late final ffi.Pointer<_contacts_person_grouprel_property_ids> - __contacts_person_grouprel = - _lookup<_contacts_person_grouprel_property_ids>( - '_contacts_person_grouprel'); - - _contacts_person_grouprel_property_ids get _contacts_person_grouprel => - __contacts_person_grouprel.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned _contacts_person_group_assigned view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this person group assigned view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
string status Status of social account (projection)
boolean is_favorite The person is favorite or not
integer link_count Link count of contact records (projection)
string linked_address_book_ids Addressbook IDs that the linked person belongs to (projection)
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer address_book_id Addressbook ID that the person belongs to
integer address_book_mode Addressbook mode, refer to the @ref contacts_address_book_mode_e
integer group_id Group ID that the person belongs to
integer contact_id Contact ID that the person belongs to (projection)
integer snippet_type keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string keyword matched data string (Since 3.0)
- late final ffi.Pointer<_contacts_person_group_assigned_property_ids> - __contacts_person_group_assigned = - _lookup<_contacts_person_group_assigned_property_ids>( - '_contacts_person_group_assigned'); - - _contacts_person_group_assigned_property_ids - get _contacts_person_group_assigned => - __contacts_person_group_assigned.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned _contacts_person_group_not_assigned view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this person group not assigned view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
string status Status of social account (projection)
boolean is_favorite The person is favorite or not
integer link_count Link count of contact records (projection)
string linked_address_book_ids Addressbook IDs that the linked person belongs to (projection)
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer address_book_id Addressbook ID that the person belongs to
integer address_book_mode Addressbook mode, refer to the @ref contacts_address_book_mode_e
integer contact_id Contact ID that the person belongs to (projection)
integer snippet_type keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string keyword matched data string (Since 3.0)
- late final ffi.Pointer<_contacts_person_group_not_assigned_property_ids> - __contacts_person_group_not_assigned = - _lookup<_contacts_person_group_not_assigned_property_ids>( - '_contacts_person_group_not_assigned'); - - _contacts_person_group_not_assigned_property_ids - get _contacts_person_group_not_assigned => - __contacts_person_group_not_assigned.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_phone_log _contacts_person_phone_log view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this phone log view
integer person_id DB record ID of person
string display_name Display name of the person
string image_thumbnail_path Image thumbnail path of the person (projection)
integer log_id DB record ID of phone log
string address Number or Email that the phone log displays
integer address_type Number or Email type (projection)
integer log_time Call end time. The value means number of seconds since 1970-01-01 00:00:00 (UTC)
integer log_type Log type, refer to the @ref contacts_phone_log_type_e
integer extra_data1 You can set the related integer data (e.g. message_id, email_id or duration(seconds) of call) (projection)
string extra_data2 You can set the related string data (e.g. short message, subject) (projection)
string normalized_address You can only use this property for search filter
string cleaned_address You can only use this property for search filter
string address_filter You can only use this property for search filter
integer sim_slot_no It is related to the SIM slot number. sim_slot_no 0 means first SIM card, sim_slot_no 1 means second SIM. It is same with handle index of telephony handle list. Refer to the telephony_init()
- late final ffi.Pointer<_contacts_person_phone_log_property_ids> - __contacts_person_phone_log = - _lookup<_contacts_person_phone_log_property_ids>( - '_contacts_person_phone_log'); - - _contacts_person_phone_log_property_ids get _contacts_person_phone_log => - __contacts_person_phone_log.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_usage _contacts_person_usage view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this person usage view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
boolean is_favorite The person is favorite or not
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer usage_type Usage type, refer to the @ref contacts_usage_type_e
integer times_used Usage number of person
- late final ffi.Pointer<_contacts_person_usage_property_ids> - __contacts_person_usage = - _lookup<_contacts_person_usage_property_ids>('_contacts_person_usage'); - - _contacts_person_usage_property_ids get _contacts_person_usage => - __contacts_person_usage.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact_number _contacts_contact_number view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this contacts number view
integercontact_id Contact ID that the number belongs to
stringdisplay_name Display name of contact that the number belongs to
integerdisplay_source_type The source type of display name, refer to the @ref contacts_display_name_source_type_e (projection)
integeraddress_book_id Addressbook ID that the number belongs to
integerperson_id Person ID that the number belongs to
stringringtone_path Ringtone path that the number belongs to (projection)
stringimage_thumbnail_path Image thumbnail path that the number belongs to (projection)
integer number_id DB record ID of the number
integer type Number type, refer to the @ref contacts_number_type_e (projection)
string label Custom number type label, when the number type is #CONTACTS_NUMBER_TYPE_CUSTOM (projection)
boolean is_default The number is default number or not
string number Number
string number_filter If you add filter with this property, the string will be normalized as minmatch length internally and the match rule will be applied CONTACTS_MATCH_EXACTLY
string normalized_number You can only use this property for search filter
string cleaned_number You can only use this property for search filter
- late final ffi.Pointer<_contacts_contact_number_property_ids> - __contacts_contact_number = - _lookup<_contacts_contact_number_property_ids>( - '_contacts_contact_number'); - - _contacts_contact_number_property_ids get _contacts_contact_number => - __contacts_contact_number.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact_email _contacts_contact_email view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this contacts email view
integercontact_id Contact ID that the email belongs to
stringdisplay_name Display name that the email belongs to
integerdisplay_source_type The source type of display name that the email belongs to (projection)
integeraddress_book_id Addressbook ID that the email belongs to
integerperson_id Person ID that the email belongs to
stringringtone_path Ringtone path that the email belongs to (projection)
stringimage_thumbnail_path Image thumbnail path that the email belongs to (projection)
integer email_id DB record ID of the email
integer type Email type, refer to the @ref contacts_email_type_e (projection)
string label Custom mail type label, when the email type is #CONTACTS_EMAIL_TYPE_CUSTOM (projection)
boolean is_default Email is default email or not
string email Email address
- late final ffi.Pointer<_contacts_contact_email_property_ids> - __contacts_contact_email = - _lookup<_contacts_contact_email_property_ids>('_contacts_contact_email'); - - _contacts_contact_email_property_ids get _contacts_contact_email => - __contacts_contact_email.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact_grouprel _contacts_contact_grouprel view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this contact grouprel view
integercontact_id Contact ID that the contact group relation belongs to
stringdisplay_name Display name of the group relation
integerdisplay_source_type The source type of display name (projection)
integeraddress_book_id Addressbook ID that the group relation belongs to
integerperson_id Person ID that the group relation belongs to
stringringtone_path Ringtone path of the group relation (projection)
stringimage_thumbnail_path Image thumbnail path of the group relation (projection)
integer group_id DB record ID of the group relation
string group_name Group name (projection)
- late final ffi.Pointer<_contacts_contact_grouprel_property_ids> - __contacts_contact_grouprel = - _lookup<_contacts_contact_grouprel_property_ids>( - '_contacts_contact_grouprel'); - - _contacts_contact_grouprel_property_ids get _contacts_contact_grouprel => - __contacts_contact_grouprel.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact_activity _contacts_contact_activity view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this contact activity view
integercontact_id Contact ID that the activity belongs to
stringdisplay_name Display name of the contact that the activity belongs to
integerdisplay_source_type The source type of display name that the activity belongs to
integeraddress_book_id Addressbook that the activity belongs to
integerperson_id Person ID that the activity belongs to
stringringtone_path Ringtone path of the contact that the activity belongs to (projection)
stringimage_thumbnail_path Image thumbnail path of the contact that the activity belongs to (projection)
integer activity_id DB record ID of the activity
string source_name Account name that the activity belongs to
string status Activity status (projection)
integer timestamp Published time of activity
string service_operation Data for service_set_operation
string uri Data for service_set_uri
- late final ffi.Pointer<_contacts_contact_activity_property_ids> - __contacts_contact_activity = - _lookup<_contacts_contact_activity_property_ids>( - '_contacts_contact_activity'); - - _contacts_contact_activity_property_ids get _contacts_contact_activity => - __contacts_contact_activity.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log_stat _contacts_phone_log_stat view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this log stat view
integer log_count Log count (projection)
integer log_type Log type, see the @ref contacts_phone_log_type_e
integer sim_slot_no It is related to the SIM slot number. sim_slot_no 0 means first SIM card, sim_slot_no 1 means second SIM. It is same with handle index of telephony handle list. Refer to the telephony_init() (Since 3.0)
- late final ffi.Pointer<_contacts_phone_log_stat_property_ids> - __contacts_phone_log_stat = - _lookup<_contacts_phone_log_stat_property_ids>( - '_contacts_phone_log_stat'); - - _contacts_phone_log_stat_property_ids get _contacts_phone_log_stat => - __contacts_phone_log_stat.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_sip _contacts_sip view (Since 3.0) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts sip view
integer id read only DB record ID of the sip
integer contact_id read, write once Contact ID that the sip belongs to
string address read, write SIP address
integer type read, write sip type, refer to the @ref contacts_sip_type_e
string label read, write Custom sip type label, when the sip type is #CONTACTS_SIP_TYPE_CUSTOM
- late final ffi.Pointer<_contacts_sip_property_ids> __contacts_sip = - _lookup<_contacts_sip_property_ids>('_contacts_sip'); - - _contacts_sip_property_ids get _contacts_sip => __contacts_sip.ref; - - /// @brief Creates a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a record using contacts_record_destroy(). - /// @param[in] view_uri The view URI - /// @param[out] record The record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to initialize. - /// @see contacts_record_destroy() - int contacts_record_create( - ffi.Pointer view_uri, - ffi.Pointer record, - ) { - return _contacts_record_create( - view_uri, - record, - ); - } - - late final _contacts_record_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('contacts_record_create'); - late final _contacts_record_create = _contacts_record_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys a record and releases its all resources. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The record handle - /// @param[in] delete_child Set @c true to destroy child records automatically, - /// otherwise set @c false to not destroy child records automatically - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_create() - int contacts_record_destroy( - contacts_record_h record, - bool delete_child, - ) { - return _contacts_record_destroy( - record, - delete_child, - ); - } - - late final _contacts_record_destroyPtr = _lookup< - ffi.NativeFunction>( - 'contacts_record_destroy'); - late final _contacts_record_destroy = _contacts_record_destroyPtr - .asFunction(); - - /// @brief Makes a clone of a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a cloned_record using contacts_record_destroy(). - /// @param[in] record The record handle - /// @param[out] cloned_record The cloned record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_destroy() - int contacts_record_clone( - contacts_record_h record, - ffi.Pointer cloned_record, - ) { - return _contacts_record_clone( - record, - cloned_record, - ); - } - - late final _contacts_record_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, - ffi.Pointer)>>('contacts_record_clone'); - late final _contacts_record_clone = _contacts_record_clonePtr.asFunction< - int Function(contacts_record_h, ffi.Pointer)>(); - - /// @brief Gets a string from the record handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a value using free(). - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] value The value to be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_get_str_p() - /// @see contacts_record_set_str() - int contacts_record_get_str( - contacts_record_h record, - int property_id, - ffi.Pointer> value, - ) { - return _contacts_record_get_str( - record, - property_id, - value, - ); - } - - late final _contacts_record_get_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - ffi.Pointer>)>>('contacts_record_get_str'); - late final _contacts_record_get_str = _contacts_record_get_strPtr.asFunction< - int Function( - contacts_record_h, int, ffi.Pointer>)>(); - - /// @brief Gets a string pointer from the record handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You MUST NOT release @a value. - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] value The value to be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_get_str() - /// @see contacts_record_set_str() - int contacts_record_get_str_p( - contacts_record_h record, - int property_id, - ffi.Pointer> value, - ) { - return _contacts_record_get_str_p( - record, - property_id, - value, - ); - } - - late final _contacts_record_get_str_pPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - ffi.Pointer>)>>( - 'contacts_record_get_str_p'); - late final _contacts_record_get_str_p = - _contacts_record_get_str_pPtr.asFunction< - int Function( - contacts_record_h, int, ffi.Pointer>)>(); - - /// @brief Sets a string to a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[in] value The value to set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_get_str() - /// @see contacts_record_get_str_p() - int contacts_record_set_str( - contacts_record_h record, - int property_id, - ffi.Pointer value, - ) { - return _contacts_record_set_str( - record, - property_id, - value, - ); - } - - late final _contacts_record_set_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - ffi.Pointer)>>('contacts_record_set_str'); - late final _contacts_record_set_str = _contacts_record_set_strPtr.asFunction< - int Function(contacts_record_h, int, ffi.Pointer)>(); - - /// @brief Gets a record's integer value. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] value The value to be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_set_int() - int contacts_record_get_int( - contacts_record_h record, - int property_id, - ffi.Pointer value, - ) { - return _contacts_record_get_int( - record, - property_id, - value, - ); - } - - late final _contacts_record_get_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - ffi.Pointer)>>('contacts_record_get_int'); - late final _contacts_record_get_int = _contacts_record_get_intPtr - .asFunction)>(); - - /// @brief Sets an integer value to a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[in] value The value to set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_get_int() - int contacts_record_set_int( - contacts_record_h record, - int property_id, - int value, - ) { - return _contacts_record_set_int( - record, - property_id, - value, - ); - } - - late final _contacts_record_set_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - ffi.Int)>>('contacts_record_set_int'); - late final _contacts_record_set_int = _contacts_record_set_intPtr - .asFunction(); - - /// @brief Gets a record's long integer value. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] value The value to be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_set_lli() - int contacts_record_get_lli( - contacts_record_h record, - int property_id, - ffi.Pointer value, - ) { - return _contacts_record_get_lli( - record, - property_id, - value, - ); - } - - late final _contacts_record_get_lliPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - ffi.Pointer)>>('contacts_record_get_lli'); - late final _contacts_record_get_lli = _contacts_record_get_lliPtr.asFunction< - int Function(contacts_record_h, int, ffi.Pointer)>(); - - /// @brief Sets a long long integer value to a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[in] value The value to set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_get_lli() - int contacts_record_set_lli( - contacts_record_h record, - int property_id, - int value, - ) { - return _contacts_record_set_lli( - record, - property_id, - value, - ); - } - - late final _contacts_record_set_lliPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - ffi.LongLong)>>('contacts_record_set_lli'); - late final _contacts_record_set_lli = _contacts_record_set_lliPtr - .asFunction(); - - /// @brief Gets a record's boolean value. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] value The value to be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_set_bool() - int contacts_record_get_bool( - contacts_record_h record, - int property_id, - ffi.Pointer value, - ) { - return _contacts_record_get_bool( - record, - property_id, - value, - ); - } - - late final _contacts_record_get_boolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - ffi.Pointer)>>('contacts_record_get_bool'); - late final _contacts_record_get_bool = - _contacts_record_get_boolPtr.asFunction< - int Function(contacts_record_h, int, ffi.Pointer)>(); - - /// @brief Sets a boolean value to a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[in] value The value to set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_get_bool() - int contacts_record_set_bool( - contacts_record_h record, - int property_id, - bool value, - ) { - return _contacts_record_set_bool( - record, - property_id, - value, - ); - } - - late final _contacts_record_set_boolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - ffi.Bool)>>('contacts_record_set_bool'); - late final _contacts_record_set_bool = _contacts_record_set_boolPtr - .asFunction(); - - /// @brief Gets a record's double value. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] value The value to be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_set_double() - int contacts_record_get_double( - contacts_record_h record, - int property_id, - ffi.Pointer value, - ) { - return _contacts_record_get_double( - record, - property_id, - value, - ); - } - - late final _contacts_record_get_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - ffi.Pointer)>>('contacts_record_get_double'); - late final _contacts_record_get_double = - _contacts_record_get_doublePtr.asFunction< - int Function(contacts_record_h, int, ffi.Pointer)>(); - - /// @brief Sets a double value to a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[in] value The value to set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_get_double() - int contacts_record_set_double( - contacts_record_h record, - int property_id, - double value, - ) { - return _contacts_record_set_double( - record, - property_id, - value, - ); - } - - late final _contacts_record_set_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - ffi.Double)>>('contacts_record_set_double'); - late final _contacts_record_set_double = _contacts_record_set_doublePtr - .asFunction(); - - /// @brief Adds a child record to the parent record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The parent record handle - /// @param[in] property_id The property ID - /// @param[in] child_record The child record handle to be added to parent record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_remove_child_record() - int contacts_record_add_child_record( - contacts_record_h record, - int property_id, - contacts_record_h child_record, - ) { - return _contacts_record_add_child_record( - record, - property_id, - child_record, - ); - } - - late final _contacts_record_add_child_recordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - contacts_record_h)>>('contacts_record_add_child_record'); - late final _contacts_record_add_child_record = - _contacts_record_add_child_recordPtr.asFunction< - int Function(contacts_record_h, int, contacts_record_h)>(); - - /// @brief Removes a child record from the parent record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The parent record handle - /// @param[in] property_id The property ID - /// @param[in] child_record The child record handle to be removed from parent record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_add_child_record() - int contacts_record_remove_child_record( - contacts_record_h record, - int property_id, - contacts_record_h child_record, - ) { - return _contacts_record_remove_child_record( - record, - property_id, - child_record, - ); - } - - late final _contacts_record_remove_child_recordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - contacts_record_h)>>('contacts_record_remove_child_record'); - late final _contacts_record_remove_child_record = - _contacts_record_remove_child_recordPtr.asFunction< - int Function(contacts_record_h, int, contacts_record_h)>(); - - /// @brief Gets the number of child records of a parent record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The parent record handle - /// @param[in] property_id The property ID - /// @param[out] count The child record count - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_add_child_record() - /// @see contacts_record_remove_child_record() - int contacts_record_get_child_record_count( - contacts_record_h record, - int property_id, - ffi.Pointer count, - ) { - return _contacts_record_get_child_record_count( - record, - property_id, - count, - ); - } - - late final _contacts_record_get_child_record_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - ffi.Pointer)>>('contacts_record_get_child_record_count'); - late final _contacts_record_get_child_record_count = - _contacts_record_get_child_record_countPtr.asFunction< - int Function(contacts_record_h, int, ffi.Pointer)>(); - - /// @brief Gets a child record handle pointer from the parent record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You MUST NOT release @a child_record. It is released when the parent record is destroyed. - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[in] index The index of child record - /// @param[out] child_record The child record handle pointer - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NO_DATA - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_add_child_record() - /// @see contacts_record_remove_child_record() - /// @see contacts_record_get_child_record_count() - int contacts_record_get_child_record_at_p( - contacts_record_h record, - int property_id, - int index, - ffi.Pointer child_record, - ) { - return _contacts_record_get_child_record_at_p( - record, - property_id, - index, - child_record, - ); - } - - late final _contacts_record_get_child_record_at_pPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, ffi.Int, - ffi.Pointer)>>( - 'contacts_record_get_child_record_at_p'); - late final _contacts_record_get_child_record_at_p = - _contacts_record_get_child_record_at_pPtr.asFunction< - int Function( - contacts_record_h, int, int, ffi.Pointer)>(); - - /// @brief Clones a child record list of the given parent record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a cloned_list using contacts_list_destroy(). - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] cloned_list The cloned list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_list_destroy() - int contacts_record_clone_child_record_list( - contacts_record_h record, - int property_id, - ffi.Pointer cloned_list, - ) { - return _contacts_record_clone_child_record_list( - record, - property_id, - cloned_list, - ); - } - - late final _contacts_record_clone_child_record_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - ffi.Pointer)>>( - 'contacts_record_clone_child_record_list'); - late final _contacts_record_clone_child_record_list = - _contacts_record_clone_child_record_listPtr.asFunction< - int Function(contacts_record_h, int, ffi.Pointer)>(); - - /// @brief Gets URI string from a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The record handle - /// @param[out] view_uri The URI of record - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - int contacts_record_get_uri_p( - contacts_record_h record, - ffi.Pointer> view_uri, - ) { - return _contacts_record_get_uri_p( - record, - view_uri, - ); - } - - late final _contacts_record_get_uri_pPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - contacts_record_h, ffi.Pointer>)>>( - 'contacts_record_get_uri_p'); - late final _contacts_record_get_uri_p = - _contacts_record_get_uri_pPtr.asFunction< - int Function( - contacts_record_h, ffi.Pointer>)>(); - - /// @brief Creates a contacts list. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a contacts_list using contacts_list_destroy(). - /// @param[out] contacts_list The contacts list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_list_destroy() - int contacts_list_create( - ffi.Pointer contacts_list, - ) { - return _contacts_list_create( - contacts_list, - ); - } - - late final _contacts_list_createPtr = _lookup< - ffi.NativeFunction)>>( - 'contacts_list_create'); - late final _contacts_list_create = _contacts_list_createPtr - .asFunction)>(); - - /// @brief Destroys a contacts list and releases its all resources. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] contacts_list The contacts list handle - /// @param[in] delete_child Set @c true to destroy child records automatically, - /// otherwise set @c false to not destroy child records automatically - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_list_create() - int contacts_list_destroy( - contacts_list_h contacts_list, - bool delete_child, - ) { - return _contacts_list_destroy( - contacts_list, - delete_child, - ); - } - - late final _contacts_list_destroyPtr = - _lookup>( - 'contacts_list_destroy'); - late final _contacts_list_destroy = _contacts_list_destroyPtr - .asFunction(); - - /// @brief Retrieves the number of contact entities from a contacts list. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] contacts_list The contacts list handle - /// @param[out] count The count of contact entity - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_list_add() - int contacts_list_get_count( - contacts_list_h contacts_list, - ffi.Pointer count, - ) { - return _contacts_list_get_count( - contacts_list, - count, - ); - } - - late final _contacts_list_get_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_list_h, - ffi.Pointer)>>('contacts_list_get_count'); - late final _contacts_list_get_count = _contacts_list_get_countPtr - .asFunction)>(); - - /// @brief Adds a record to a contacts list. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks Same kind of record can be added. - /// @param[in] contacts_list The contacts list handle - /// @param[in] record The record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_list_remove() - int contacts_list_add( - contacts_list_h contacts_list, - contacts_record_h record, - ) { - return _contacts_list_add( - contacts_list, - record, - ); - } - - late final _contacts_list_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - contacts_list_h, contacts_record_h)>>('contacts_list_add'); - late final _contacts_list_add = _contacts_list_addPtr - .asFunction(); - - /// @brief Removes a record from the contacts list. - /// @details If the record is current record, then current record is changed the next record. \n - /// If the record is the last record, then current record will be @c NULL. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] contacts_list The contacts list handle - /// @param[in] record The record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_list_add() - int contacts_list_remove( - contacts_list_h contacts_list, - contacts_record_h record, - ) { - return _contacts_list_remove( - contacts_list, - record, - ); - } - - late final _contacts_list_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - contacts_list_h, contacts_record_h)>>('contacts_list_remove'); - late final _contacts_list_remove = _contacts_list_removePtr - .asFunction(); - - /// @brief Retrieves a record from the contacts list. - /// @details The default current record is the first record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You MUST NOT destroy the @a record. - /// It is destroyed automatically when the @a contacts_list is destroyed. - /// @param[in] contacts_list The contacts list handle - /// @param[out] record The record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - int contacts_list_get_current_record_p( - contacts_list_h contacts_list, - ffi.Pointer record, - ) { - return _contacts_list_get_current_record_p( - contacts_list, - record, - ); - } - - late final _contacts_list_get_current_record_pPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - contacts_list_h, ffi.Pointer)>>( - 'contacts_list_get_current_record_p'); - late final _contacts_list_get_current_record_p = - _contacts_list_get_current_record_pPtr.asFunction< - int Function(contacts_list_h, ffi.Pointer)>(); - - /// @brief Moves a contacts list to the previous position. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] contacts_list The contacts list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_list_next() - int contacts_list_prev( - contacts_list_h contacts_list, - ) { - return _contacts_list_prev( - contacts_list, - ); - } - - late final _contacts_list_prevPtr = - _lookup>( - 'contacts_list_prev'); - late final _contacts_list_prev = - _contacts_list_prevPtr.asFunction(); - - /// @brief Moves a contacts list to the next position. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] contacts_list The contacts list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_list_prev() - int contacts_list_next( - contacts_list_h contacts_list, - ) { - return _contacts_list_next( - contacts_list, - ); - } - - late final _contacts_list_nextPtr = - _lookup>( - 'contacts_list_next'); - late final _contacts_list_next = - _contacts_list_nextPtr.asFunction(); - - /// @brief Moves a contacts list to the first position. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] contacts_list The contacts list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_list_last() - int contacts_list_first( - contacts_list_h contacts_list, - ) { - return _contacts_list_first( - contacts_list, - ); - } - - late final _contacts_list_firstPtr = - _lookup>( - 'contacts_list_first'); - late final _contacts_list_first = - _contacts_list_firstPtr.asFunction(); - - /// @brief Moves a contacts list to the last position. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] contacts_list The contacts list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_list_first() - int contacts_list_last( - contacts_list_h contacts_list, - ) { - return _contacts_list_last( - contacts_list, - ); - } - - late final _contacts_list_lastPtr = - _lookup>( - 'contacts_list_last'); - late final _contacts_list_last = - _contacts_list_lastPtr.asFunction(); - - /// @brief Creates a filter. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a filter using contacts_filter_destroy(). - /// @param[in] view_uri The view URI of a filter - /// @param[out] filter The filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to initialize - /// @see contacts_filter_destroy() - int contacts_filter_create( - ffi.Pointer view_uri, - ffi.Pointer filter, - ) { - return _contacts_filter_create( - view_uri, - filter, - ); - } - - late final _contacts_filter_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('contacts_filter_create'); - late final _contacts_filter_create = _contacts_filter_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys a filter. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] filter The filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_filter_create() - int contacts_filter_destroy( - contacts_filter_h filter, - ) { - return _contacts_filter_destroy( - filter, - ); - } - - late final _contacts_filter_destroyPtr = - _lookup>( - 'contacts_filter_destroy'); - late final _contacts_filter_destroy = - _contacts_filter_destroyPtr.asFunction(); - - /// @brief Adds a condition for a string type property. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] filter The filter handle - /// @param[in] property_id The property ID to add a condition - /// @param[in] match The match flag - /// @param[in] match_value The match value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_filter_add_operator() - int contacts_filter_add_str( - contacts_filter_h filter, - int property_id, - int match, - ffi.Pointer match_value, - ) { - return _contacts_filter_add_str( - filter, - property_id, - match, - match_value, - ); - } - - late final _contacts_filter_add_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_filter_h, ffi.UnsignedInt, ffi.Int32, - ffi.Pointer)>>('contacts_filter_add_str'); - late final _contacts_filter_add_str = _contacts_filter_add_strPtr.asFunction< - int Function(contacts_filter_h, int, int, ffi.Pointer)>(); - - /// @brief Adds a condition for an integer type property. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] filter The filter handle - /// @param[in] property_id The property ID to add a condition - /// @param[in] match The match flag - /// @param[in] match_value The match value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_filter_add_operator() - int contacts_filter_add_int( - contacts_filter_h filter, - int property_id, - int match, - int match_value, - ) { - return _contacts_filter_add_int( - filter, - property_id, - match, - match_value, - ); - } - - late final _contacts_filter_add_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_filter_h, ffi.UnsignedInt, ffi.Int32, - ffi.Int)>>('contacts_filter_add_int'); - late final _contacts_filter_add_int = _contacts_filter_add_intPtr - .asFunction(); - - /// @brief Adds a condition for a long int type property. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] filter The filter handle - /// @param[in] property_id The property ID to add a condition - /// @param[in] match The match flag - /// @param[in] match_value The match value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_filter_add_operator() - int contacts_filter_add_lli( - contacts_filter_h filter, - int property_id, - int match, - int match_value, - ) { - return _contacts_filter_add_lli( - filter, - property_id, - match, - match_value, - ); - } - - late final _contacts_filter_add_lliPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_filter_h, ffi.UnsignedInt, ffi.Int32, - ffi.LongLong)>>('contacts_filter_add_lli'); - late final _contacts_filter_add_lli = _contacts_filter_add_lliPtr - .asFunction(); - - /// @brief Adds a condition for a double type property. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] filter The filter handle - /// @param[in] property_id The property ID to add a condition - /// @param[in] match The match flag - /// @param[in] match_value The match value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_filter_add_operator() - int contacts_filter_add_double( - contacts_filter_h filter, - int property_id, - int match, - double match_value, - ) { - return _contacts_filter_add_double( - filter, - property_id, - match, - match_value, - ); - } - - late final _contacts_filter_add_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_filter_h, ffi.UnsignedInt, ffi.Int32, - ffi.Double)>>('contacts_filter_add_double'); - late final _contacts_filter_add_double = _contacts_filter_add_doublePtr - .asFunction(); - - /// @brief Adds a condition for a boolean type property. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] filter The filter handle - /// @param[in] property_id The property ID to add a condition - /// @param[in] match_value The match value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_filter_add_operator() - int contacts_filter_add_bool( - contacts_filter_h filter, - int property_id, - bool match_value, - ) { - return _contacts_filter_add_bool( - filter, - property_id, - match_value, - ); - } - - late final _contacts_filter_add_boolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_filter_h, ffi.UnsignedInt, - ffi.Bool)>>('contacts_filter_add_bool'); - late final _contacts_filter_add_bool = _contacts_filter_add_boolPtr - .asFunction(); - - /// @brief Adds an operator between conditions. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] filter The filter handle - /// @param[in] operator_type The operator type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_filter_add_str() - /// @see contacts_filter_add_int() - /// @see contacts_filter_add_bool() - int contacts_filter_add_operator( - contacts_filter_h filter, - int operator_type, - ) { - return _contacts_filter_add_operator( - filter, - operator_type, - ); - } - - late final _contacts_filter_add_operatorPtr = _lookup< - ffi.NativeFunction>( - 'contacts_filter_add_operator'); - late final _contacts_filter_add_operator = _contacts_filter_add_operatorPtr - .asFunction(); - - /// @brief Adds a filter to a given filter. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] parent_filter The parent filter handle - /// @param[in] child_filter The child filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_filter_add_operator() - int contacts_filter_add_filter( - contacts_filter_h parent_filter, - contacts_filter_h child_filter, - ) { - return _contacts_filter_add_filter( - parent_filter, - child_filter, - ); - } - - late final _contacts_filter_add_filterPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_filter_h, - contacts_filter_h)>>('contacts_filter_add_filter'); - late final _contacts_filter_add_filter = _contacts_filter_add_filterPtr - .asFunction(); - - /// @brief Creates a query. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a query using contacts_query_destroy(). - /// @param[in] view_uri The view URI of a query - /// @param[out] query The filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to initialize - /// @see contacts_query_destroy() - int contacts_query_create( - ffi.Pointer view_uri, - ffi.Pointer query, - ) { - return _contacts_query_create( - view_uri, - query, - ); - } - - late final _contacts_query_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('contacts_query_create'); - late final _contacts_query_create = _contacts_query_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys a query. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] query The query handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_query_create() - int contacts_query_destroy( - contacts_query_h query, - ) { - return _contacts_query_destroy( - query, - ); - } - - late final _contacts_query_destroyPtr = - _lookup>( - 'contacts_query_destroy'); - late final _contacts_query_destroy = - _contacts_query_destroyPtr.asFunction(); - - /// @brief Adds property IDs for projection. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] query The query handle - /// @param[in] property_id_array The property ID array - /// @param[in] count The number of property IDs - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - int contacts_query_set_projection( - contacts_query_h query, - ffi.Pointer property_id_array, - int count, - ) { - return _contacts_query_set_projection( - query, - property_id_array, - count, - ); - } - - late final _contacts_query_set_projectionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_query_h, ffi.Pointer, - ffi.Int)>>('contacts_query_set_projection'); - late final _contacts_query_set_projection = - _contacts_query_set_projectionPtr.asFunction< - int Function(contacts_query_h, ffi.Pointer, int)>(); - - /// @brief Sets the "distinct" option for projection. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] query The query handle - /// @param[in] set Set @c true to set the distinct option for projection, - /// otherwise @c false to unset the distinct option - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - int contacts_query_set_distinct( - contacts_query_h query, - bool set1, - ) { - return _contacts_query_set_distinct( - query, - set1, - ); - } - - late final _contacts_query_set_distinctPtr = - _lookup>( - 'contacts_query_set_distinct'); - late final _contacts_query_set_distinct = _contacts_query_set_distinctPtr - .asFunction(); - - /// @brief Sets a filter for query. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] query The query handle - /// @param[in] filter The filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_filter_create() - int contacts_query_set_filter( - contacts_query_h query, - contacts_filter_h filter, - ) { - return _contacts_query_set_filter( - query, - filter, - ); - } - - late final _contacts_query_set_filterPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_query_h, - contacts_filter_h)>>('contacts_query_set_filter'); - late final _contacts_query_set_filter = _contacts_query_set_filterPtr - .asFunction(); - - /// @brief Sets a sort mode for query. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] query The query handle - /// @param[in] property_id The property ID to sort - /// @param[in] is_ascending Set @c true for ascending sort mode, - /// otherwise @c false for descending sort mode - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - int contacts_query_set_sort( - contacts_query_h query, - int property_id, - bool is_ascending, - ) { - return _contacts_query_set_sort( - query, - property_id, - is_ascending, - ); - } - - late final _contacts_query_set_sortPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_query_h, ffi.UnsignedInt, - ffi.Bool)>>('contacts_query_set_sort'); - late final _contacts_query_set_sort = _contacts_query_set_sortPtr - .asFunction(); - - /// @brief Inserts a record to the contacts database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @privilege %http://tizen.org/privilege/callhistory.write - /// @remarks %http://tizen.org/privilege/contact.write is needed for record which is created with @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, \n @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial. \n - /// %http://tizen.org/privilege/callhistory.write is needed for record which is created with @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log. - /// @param[in] record The record handle - /// @param[out] id The ID of inserted record - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @post contacts_db_changed_cb() callback wil be called upon success. - /// @see contacts_connect() - /// @see contacts_db_update_record() - /// @see contacts_db_delete_record() - /// @see contacts_db_get_record() - int contacts_db_insert_record( - contacts_record_h record, - ffi.Pointer id, - ) { - return _contacts_db_insert_record( - record, - id, - ); - } - - late final _contacts_db_insert_recordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, - ffi.Pointer)>>('contacts_db_insert_record'); - late final _contacts_db_insert_record = _contacts_db_insert_recordPtr - .asFunction)>(); - - /// @brief Gets a record from the contacts database. - /// @details This function creates a new contact handle from the contacts database by the given @a record_id. \n - /// @a record will be created, which is filled with contact information. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @privilege %http://tizen.org/privilege/callhistory.read - /// @remarks %http://tizen.org/privilege/contact.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_simple_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_sdn. \n - /// %http://tizen.org/privilege/callhistory.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log. - /// @remarks You must release @a record using contacts_record_destroy(). - /// @param[in] view_uri The view URI of a record - /// @param[in] record_id The record ID to get from database - /// @param[out] record The record handle associated with the record ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_record_destroy() - int contacts_db_get_record( - ffi.Pointer view_uri, - int record_id, - ffi.Pointer record, - ) { - return _contacts_db_get_record( - view_uri, - record_id, - record, - ); - } - - late final _contacts_db_get_recordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, - ffi.Pointer)>>('contacts_db_get_record'); - late final _contacts_db_get_record = _contacts_db_get_recordPtr.asFunction< - int Function( - ffi.Pointer, int, ffi.Pointer)>(); - - /// @brief Updates a record in the contacts database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @privilege %http://tizen.org/privilege/callhistory.write - /// @remarks %http://tizen.org/privilege/contact.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, \n @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial. \n - /// %http://tizen.org/privilege/callhistory.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log. - /// @param[in] record The record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @post contacts_db_changed_cb() callback wil be called upon success. - /// @see contacts_connect() - /// @see contacts_db_insert_record() - /// @see contacts_db_delete_record() - /// @see contacts_db_get_record() - int contacts_db_update_record( - contacts_record_h record, - ) { - return _contacts_db_update_record( - record, - ); - } - - late final _contacts_db_update_recordPtr = - _lookup>( - 'contacts_db_update_record'); - late final _contacts_db_update_record = _contacts_db_update_recordPtr - .asFunction(); - - /// @brief Deletes a record from the contacts database with related child records. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @privilege %http://tizen.org/privilege/callhistory.write - /// @remarks %http://tizen.org/privilege/contact.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, \n @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial. \n - /// %http://tizen.org/privilege/callhistory.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log. - /// @param[in] view_uri The view URI of a record - /// @param[in] record_id The record ID to delete - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @post contacts_db_changed_cb() callback wil be called upon success. - /// @see contacts_connect() - /// @see contacts_db_insert_record() - int contacts_db_delete_record( - ffi.Pointer view_uri, - int record_id, - ) { - return _contacts_db_delete_record( - view_uri, - record_id, - ); - } - - late final _contacts_db_delete_recordPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'contacts_db_delete_record'); - late final _contacts_db_delete_record = _contacts_db_delete_recordPtr - .asFunction, int)>(); - - /// @brief Replaces an id-identified record with the given record. - /// @details Now, this API supports only _contacts_contact view_uri. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @remarks The write-once value of @a record is not replaced. \n - /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact. - /// @param[in] record The new record handle to replace - /// @param[in] id The DB record ID to be replaced - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @post contacts_db_changed_cb() callback wil be called upon success. - /// @see contacts_connect() - /// @see contacts_db_update_record() - /// @see contacts_db_delete_record() - /// @see contacts_db_get_record() - int contacts_db_replace_record( - contacts_record_h record, - int id, - ) { - return _contacts_db_replace_record( - record, - id, - ); - } - - late final _contacts_db_replace_recordPtr = - _lookup>( - 'contacts_db_replace_record'); - late final _contacts_db_replace_record = _contacts_db_replace_recordPtr - .asFunction(); - - /// @brief Retrieves all records and returns the results list. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @privilege %http://tizen.org/privilege/callhistory.read - /// @remarks You must release @a record_list using contacts_list_destroy(). \n - /// %http://tizen.org/privilege/contact.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_simple_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_sdn and all read-only views except views which are related to phone log. \n - /// %http://tizen.org/privilege/callhistory.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log_stat. \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_phone_log view is needed both privileges. - /// @param[in] view_uri The view URI to get records - /// @param[in] offset The index from which to get results - /// @param[in] limit The number to limit results(value 0 is used for all records) - /// @param[out] record_list The record list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_list_destroy() - int contacts_db_get_all_records( - ffi.Pointer view_uri, - int offset, - int limit, - ffi.Pointer record_list, - ) { - return _contacts_db_get_all_records( - view_uri, - offset, - limit, - record_list, - ); - } - - late final _contacts_db_get_all_recordsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int, - ffi.Pointer)>>('contacts_db_get_all_records'); - late final _contacts_db_get_all_records = - _contacts_db_get_all_recordsPtr.asFunction< - int Function( - ffi.Pointer, int, int, ffi.Pointer)>(); - - /// @brief Uses a query to find records. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @privilege %http://tizen.org/privilege/callhistory.read - /// @remarks You must release @a record_list using contacts_list_destroy(). \n - /// %http://tizen.org/privilege/contact.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_simple_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_sdn and all read-only views except views which are related to phone log. \n - /// %http://tizen.org/privilege/callhistory.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log_stat. \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_phone_log view is needed both privileges. - /// @param[in] query The query to filter the results - /// @param[in] offset The index from which to get results - /// @param[in] limit The number to limit results(value 0 is used for get all records) - /// @param[out] record_list The record list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_list_destroy() - int contacts_db_get_records_with_query( - contacts_query_h query, - int offset, - int limit, - ffi.Pointer record_list, - ) { - return _contacts_db_get_records_with_query( - query, - offset, - limit, - record_list, - ); - } - - late final _contacts_db_get_records_with_queryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_query_h, ffi.Int, ffi.Int, - ffi.Pointer)>>( - 'contacts_db_get_records_with_query'); - late final _contacts_db_get_records_with_query = - _contacts_db_get_records_with_queryPtr.asFunction< - int Function( - contacts_query_h, int, int, ffi.Pointer)>(); - - /// @brief Inserts multiple records to the contacts database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @privilege %http://tizen.org/privilege/callhistory.write - /// @remarks %http://tizen.org/privilege/contact.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, \n @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial. \n - /// %http://tizen.org/privilege/callhistory.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log. - /// @param[in] record_list The record list handle - /// @param[out] ids The IDs of inserted records - /// @param[out] count The number of IDs - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @post contacts_db_changed_cb() callback wil be called upon success. - /// @see contacts_connect() - /// @see contacts_db_update_records() - /// @see contacts_db_delete_records() - int contacts_db_insert_records( - contacts_list_h record_list, - ffi.Pointer> ids, - ffi.Pointer count, - ) { - return _contacts_db_insert_records( - record_list, - ids, - count, - ); - } - - late final _contacts_db_insert_recordsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_list_h, ffi.Pointer>, - ffi.Pointer)>>('contacts_db_insert_records'); - late final _contacts_db_insert_records = - _contacts_db_insert_recordsPtr.asFunction< - int Function(contacts_list_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Updates multiple records in the contacts database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @privilege %http://tizen.org/privilege/callhistory.write - /// @remarks %http://tizen.org/privilege/contact.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, \n @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial. \n - /// %http://tizen.org/privilege/callhistory.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log. - /// @param[in] record_list The record list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @post contacts_db_changed_cb() callback wil be called upon success. - /// @see contacts_connect() - /// @see contacts_db_insert_records() - /// @see contacts_db_delete_records() - int contacts_db_update_records( - contacts_list_h record_list, - ) { - return _contacts_db_update_records( - record_list, - ); - } - - late final _contacts_db_update_recordsPtr = - _lookup>( - 'contacts_db_update_records'); - late final _contacts_db_update_records = _contacts_db_update_recordsPtr - .asFunction(); - - /// @brief Deletes multiple records in the contacts database with related child records. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @privilege %http://tizen.org/privilege/callhistory.write - /// @remarks %http://tizen.org/privilege/contact.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, \n @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial. \n - /// %http://tizen.org/privilege/callhistory.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log. - /// @param[in] view_uri The view URI of records - /// @param[in] record_id_array The record IDs to delete - /// @param[in] count The size of record ID array - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @post contacts_db_changed_cb() callback wil be called upon success. - /// @see contacts_connect() - /// @see contacts_db_insert_records() - /// @see contacts_db_update_records() - int contacts_db_delete_records( - ffi.Pointer view_uri, - ffi.Pointer record_id_array, - int count, - ) { - return _contacts_db_delete_records( - view_uri, - record_id_array, - count, - ); - } - - late final _contacts_db_delete_recordsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Int)>>('contacts_db_delete_records'); - late final _contacts_db_delete_records = - _contacts_db_delete_recordsPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); - - /// @brief Replaces database records identified by given ids with a given record list. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @remarks The write-once value of record is not replaced. \n - /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact. - /// @param[in] list The new record list handle to replace - /// @param[in] record_id_array The record IDs to replace - /// @param[in] count The size of record ID array - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @post contacts_db_changed_cb() callback wil be called upon success. - /// @see contacts_connect() - /// @see contacts_db_update_record() - /// @see contacts_db_delete_record() - /// @see contacts_db_get_record() - int contacts_db_replace_records( - contacts_list_h list, - ffi.Pointer record_id_array, - int count, - ) { - return _contacts_db_replace_records( - list, - record_id_array, - count, - ); - } - - late final _contacts_db_replace_recordsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_list_h, ffi.Pointer, - ffi.Int)>>('contacts_db_replace_records'); - late final _contacts_db_replace_records = _contacts_db_replace_recordsPtr - .asFunction, int)>(); - - /// @brief Gets the current contacts database version. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @privilege %http://tizen.org/privilege/callhistory.read - /// @param[out] contacts_db_version The contacts database version - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_db_get_changes_by_version() - int contacts_db_get_current_version( - ffi.Pointer contacts_db_version, - ) { - return _contacts_db_get_current_version( - contacts_db_version, - ); - } - - late final _contacts_db_get_current_versionPtr = - _lookup)>>( - 'contacts_db_get_current_version'); - late final _contacts_db_get_current_version = - _contacts_db_get_current_versionPtr - .asFunction)>(); - - /// @brief Registers a callback function to be invoked when a record changes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @privilege %http://tizen.org/privilege/callhistory.read - /// @remarks %http://tizen.org/privilege/contact.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_simple_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_sdn, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group_relation.\n - /// %http://tizen.org/privilege/callhistory.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log. - /// If successive change notification produced on the view_uri are identical, - /// then they are coalesced into a single notification if the older notification has not yet been called - /// because default main loop is doing something. - /// But, it means that a callback function is not called to reliably count of change. - /// @param[in] view_uri The view URI of records whose changes are monitored - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM System error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @post contacts_db_changed_cb() will be invoked when the designated view changes. - /// @see contacts_connect() - /// @see contacts_db_changed_cb() - /// @see contacts_db_remove_changed_cb() - int contacts_db_add_changed_cb( - ffi.Pointer view_uri, - contacts_db_changed_cb callback, - ffi.Pointer user_data, - ) { - return _contacts_db_add_changed_cb( - view_uri, - callback, - user_data, - ); - } - - late final _contacts_db_add_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, contacts_db_changed_cb, - ffi.Pointer)>>('contacts_db_add_changed_cb'); - late final _contacts_db_add_changed_cb = - _contacts_db_add_changed_cbPtr.asFunction< - int Function(ffi.Pointer, contacts_db_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters a callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] view_uri The view URI of records whose changes are monitored - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM System error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_db_changed_cb() - /// @see contacts_db_add_changed_cb() - int contacts_db_remove_changed_cb( - ffi.Pointer view_uri, - contacts_db_changed_cb callback, - ffi.Pointer user_data, - ) { - return _contacts_db_remove_changed_cb( - view_uri, - callback, - user_data, - ); - } - - late final _contacts_db_remove_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, contacts_db_changed_cb, - ffi.Pointer)>>('contacts_db_remove_changed_cb'); - late final _contacts_db_remove_changed_cb = - _contacts_db_remove_changed_cbPtr.asFunction< - int Function(ffi.Pointer, contacts_db_changed_cb, - ffi.Pointer)>(); - - /// @brief Retrieves records changes since the given database version. - /// @details This function will find all changed records since the given @a contacts_db_version. \n - /// Now, support @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact_updated_info, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group_updated_info \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile_updated_info and @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_grouprel_updated_info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @remarks You must release @a record_list using contacts_list_destroy(). - /// @param[in] view_uri The view URI to get records - /// @param[in] address_book_id The address book ID to filter - /// @param[in] contacts_db_version The contacts database version - /// @param[out] change_record_list The record list - /// @param[out] current_contacts_db_version The current contacts database version - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_list_destroy() - int contacts_db_get_changes_by_version( - ffi.Pointer view_uri, - int address_book_id, - int contacts_db_version, - ffi.Pointer change_record_list, - ffi.Pointer current_contacts_db_version, - ) { - return _contacts_db_get_changes_by_version( - view_uri, - address_book_id, - contacts_db_version, - change_record_list, - current_contacts_db_version, - ); - } - - late final _contacts_db_get_changes_by_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Pointer, - ffi.Pointer)>>('contacts_db_get_changes_by_version'); - late final _contacts_db_get_changes_by_version = - _contacts_db_get_changes_by_versionPtr.asFunction< - int Function(ffi.Pointer, int, int, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Finds records based on a given keyword. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @remarks You must release @a record_list using contacts_list_destroy(). \n - /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned \n - /// and @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned. - /// @param[in] view_uri The view URI to get records - /// @param[in] keyword The keyword - /// @param[in] offset The index from which to get results - /// @param[in] limit The number to limit results(value 0 is used for get all records) - /// @param[out] record_list The record list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_list_destroy() - int contacts_db_search_records( - ffi.Pointer view_uri, - ffi.Pointer keyword, - int offset, - int limit, - ffi.Pointer record_list, - ) { - return _contacts_db_search_records( - view_uri, - keyword, - offset, - limit, - record_list, - ); - } - - late final _contacts_db_search_recordsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Pointer)>>('contacts_db_search_records'); - late final _contacts_db_search_records = - _contacts_db_search_recordsPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, int, - ffi.Pointer)>(); - - /// @brief Finds records based on given query and keyword. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @remarks You must release @a record_list using contacts_list_destroy(). \n - /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned \n - /// and @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned. - /// @param[in] query The query handle to filter - /// @param[in] keyword The keyword - /// @param[in] offset The index from which to get results - /// @param[in] limit The number to limit results(value 0 used for get all records) - /// @param[out] record_list The record list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_list_destroy() - int contacts_db_search_records_with_query( - contacts_query_h query, - ffi.Pointer keyword, - int offset, - int limit, - ffi.Pointer record_list, - ) { - return _contacts_db_search_records_with_query( - query, - keyword, - offset, - limit, - record_list, - ); - } - - late final _contacts_db_search_records_with_queryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_query_h, ffi.Pointer, ffi.Int, - ffi.Int, ffi.Pointer)>>( - 'contacts_db_search_records_with_query'); - late final _contacts_db_search_records_with_query = - _contacts_db_search_records_with_queryPtr.asFunction< - int Function(contacts_query_h, ffi.Pointer, int, int, - ffi.Pointer)>(); - - /// @brief Finds records based on a keyword and range. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @remarks You must release @a record_list using contacts_list_destroy(). \n - /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned. These views can search records with range @ref CONTACTS_SEARCH_RANGE_NAME, @ref CONTACTS_SEARCH_RANGE_NUMBER, @ref CONTACTS_SEARCH_RANGE_DATA. \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_number can search records with @ref CONTACTS_SEARCH_RANGE_NAME and @ref CONTACTS_SEARCH_RANGE_NUMBER.\n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_email can search records with @ref CONTACTS_SEARCH_RANGE_NAME and @ref CONTACTS_SEARCH_RANGE_EMAIL. - /// @param[in] view_uri The view URI - /// @param[in] keyword The keyword - /// @param[in] offset The index from which to get results - /// @param[in] limit The number to limit results(value 0 is used for get all records) - /// @param[in] range The search range - /// @param[out] record_list The record list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_list_destroy() - int contacts_db_search_records_with_range( - ffi.Pointer view_uri, - ffi.Pointer keyword, - int offset, - int limit, - int range, - ffi.Pointer record_list, - ) { - return _contacts_db_search_records_with_range( - view_uri, - keyword, - offset, - limit, - range, - record_list, - ); - } - - late final _contacts_db_search_records_with_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Int, ffi.Int, ffi.Int, ffi.Pointer)>>( - 'contacts_db_search_records_with_range'); - late final _contacts_db_search_records_with_range = - _contacts_db_search_records_with_rangePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, int, - int, ffi.Pointer)>(); - - /// @brief Finds records based on a given keyword for snippet. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @remarks You must release @a record_list using contacts_list_destroy(). \n - /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned \n - /// and @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned. \n - /// Because start match and end match is needed to be composed with keyword, this API performance is lower than contacts_db_search_records(). - /// @param[in] view_uri The view URI to get records - /// @param[in] keyword The keyword - /// @param[in] offset The index from which to get results - /// @param[in] limit The number to limit results(value 0 used for get all records) - /// @param[in] start_match The text which is inserted into the fragment before the keyword(If NULL, default is "[") - /// @param[in] end_match The text which is inserted into the fragment after the keyword(If NULL, default is "]") - /// @param[in] token_number The one side extra number of tokens near keyword(If negative value, full sentence is printed. e.g. if token number is 3 with 'abc' keyword, "my name is [abc]de and my home") - /// @param[out] record_list The record list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_list_destroy() - int contacts_db_search_records_for_snippet( - ffi.Pointer view_uri, - ffi.Pointer keyword, - int offset, - int limit, - ffi.Pointer start_match, - ffi.Pointer end_match, - int token_number, - ffi.Pointer record_list, - ) { - return _contacts_db_search_records_for_snippet( - view_uri, - keyword, - offset, - limit, - start_match, - end_match, - token_number, - record_list, - ); - } - - late final _contacts_db_search_records_for_snippetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer)>>( - 'contacts_db_search_records_for_snippet'); - late final _contacts_db_search_records_for_snippet = - _contacts_db_search_records_for_snippetPtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - - /// @brief Finds records based on given query and keyword for snippet. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @remarks You must release @a record_list using contacts_list_destroy(). \n - /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned \n - /// and @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned. \n - /// Because start match and end match is needed to be composed with keyword, this API performance is lower than contacts_db_search_records_with_query(). - /// @param[in] query The query handle to filter - /// @param[in] keyword The keyword - /// @param[in] offset The index from which to get results - /// @param[in] limit The number to limit results(value 0 used for get all records) - /// @param[in] start_match The text which is inserted into the fragment before the keyword(If NULL, default is "[") - /// @param[in] end_match The text which is inserted into the fragment after the keyword(If NULL, default is "]") - /// @param[in] token_number The one side extra number of tokens near keyword(If negative value, full sentence is printed. e.g. if token number is 3 with 'abc' keyword, "my name is [abc]de and my home") - /// @param[out] record_list The record list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_list_destroy() - int contacts_db_search_records_with_query_for_snippet( - contacts_query_h query, - ffi.Pointer keyword, - int offset, - int limit, - ffi.Pointer start_match, - ffi.Pointer end_match, - int token_number, - ffi.Pointer record_list, - ) { - return _contacts_db_search_records_with_query_for_snippet( - query, - keyword, - offset, - limit, - start_match, - end_match, - token_number, - record_list, - ); - } - - late final _contacts_db_search_records_with_query_for_snippetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - contacts_query_h, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer)>>( - 'contacts_db_search_records_with_query_for_snippet'); - late final _contacts_db_search_records_with_query_for_snippet = - _contacts_db_search_records_with_query_for_snippetPtr.asFunction< - int Function( - contacts_query_h, - ffi.Pointer, - int, - int, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - - /// @brief Finds records based on a keyword and range for snippet. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @remarks You must release @a record_list using contacts_list_destroy(). \n - /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned. These views can search records with range @ref CONTACTS_SEARCH_RANGE_NAME, @ref CONTACTS_SEARCH_RANGE_NUMBER, @ref CONTACTS_SEARCH_RANGE_DATA. \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_number can search records with @ref CONTACTS_SEARCH_RANGE_NAME and @ref CONTACTS_SEARCH_RANGE_NUMBER.\n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_email can search records with @ref CONTACTS_SEARCH_RANGE_NAME and @ref CONTACTS_SEARCH_RANGE_EMAIL. \n - /// Because start match and end match is needed to be composed with keyword, this API performance is lower than contacts_db_search_records_with_range(). - /// @param[in] view_uri The view URI - /// @param[in] keyword The keyword - /// @param[in] offset The index from which to get results - /// @param[in] limit The number to limit results(value 0 is used for get all records) - /// @param[in] range The search range - /// @param[in] start_match The text which is inserted into the fragment before the keyword(If NULL, default is "[") - /// @param[in] end_match The text which is inserted into the fragment after the keyword(If NULL, default is "]") - /// @param[in] token_number The one side extra number of tokens near keyword(If negative value, full sentence is printed. e.g. if token number is 3 with 'abc' keyword, "my name is [abc]de and my home") - /// @param[out] record_list The record list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_list_destroy() - int contacts_db_search_records_with_range_for_snippet( - ffi.Pointer view_uri, - ffi.Pointer keyword, - int offset, - int limit, - int range, - ffi.Pointer start_match, - ffi.Pointer end_match, - int token_number, - ffi.Pointer record_list, - ) { - return _contacts_db_search_records_with_range_for_snippet( - view_uri, - keyword, - offset, - limit, - range, - start_match, - end_match, - token_number, - record_list, - ); - } - - late final _contacts_db_search_records_with_range_for_snippetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer)>>( - 'contacts_db_search_records_with_range_for_snippet'); - late final _contacts_db_search_records_with_range_for_snippet = - _contacts_db_search_records_with_range_for_snippetPtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - int, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - - /// @brief Gets the number of records in a specific view. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @privilege %http://tizen.org/privilege/callhistory.read - /// @remarks %http://tizen.org/privilege/contact.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_simple_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_sdn and all read-only views except views which is related to phone log. \n - /// %http://tizen.org/privilege/callhistory.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log_stat. \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_phone_log view is needed both privilege. - /// @param[in] view_uri The view URI - /// @param[out] count The count of records - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_db_get_count( - ffi.Pointer view_uri, - ffi.Pointer count, - ) { - return _contacts_db_get_count( - view_uri, - count, - ); - } - - late final _contacts_db_get_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('contacts_db_get_count'); - late final _contacts_db_get_count = _contacts_db_get_countPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Gets the number of records matching a query. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @privilege %http://tizen.org/privilege/callhistory.read - /// @remarks %http://tizen.org/privilege/contact.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_simple_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_sdn and all read-only views except views which is related to phone log. \n - /// %http://tizen.org/privilege/callhistory.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log_stat. \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_phone_log view is needed both privilege. - /// @param[in] query The query handle - /// @param[out] count The count of records - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_db_get_count_with_query( - contacts_query_h query, - ffi.Pointer count, - ) { - return _contacts_db_get_count_with_query( - query, - count, - ); - } - - late final _contacts_db_get_count_with_queryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_query_h, - ffi.Pointer)>>('contacts_db_get_count_with_query'); - late final _contacts_db_get_count_with_query = - _contacts_db_get_count_with_queryPtr - .asFunction)>(); - - /// @brief Gets the last successful changed contacts database version on the current connection. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @privilege %http://tizen.org/privilege/callhistory.read - /// @param[out] last_change_version The database version - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_db_get_current_version() - int contacts_db_get_last_change_version( - ffi.Pointer last_change_version, - ) { - return _contacts_db_get_last_change_version( - last_change_version, - ); - } - - late final _contacts_db_get_last_change_versionPtr = - _lookup)>>( - 'contacts_db_get_last_change_version'); - late final _contacts_db_get_last_change_version = - _contacts_db_get_last_change_versionPtr - .asFunction)>(); - - /// @brief Gets the contacts name display order. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @param[out] name_display_order The name display order - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_IPC Unknown IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_setting_get_name_display_order( - ffi.Pointer name_display_order, - ) { - return _contacts_setting_get_name_display_order( - name_display_order, - ); - } - - late final _contacts_setting_get_name_display_orderPtr = - _lookup)>>( - 'contacts_setting_get_name_display_order'); - late final _contacts_setting_get_name_display_order = - _contacts_setting_get_name_display_orderPtr - .asFunction)>(); - - /// @brief Sets the contacts name display order. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @param[in] name_display_order The name display order - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_IPC Unknown IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @post contacts_setting_name_display_order_changed_cb() callback will be called upon success. - /// @see contacts_connect() - int contacts_setting_set_name_display_order( - int name_display_order, - ) { - return _contacts_setting_set_name_display_order( - name_display_order, - ); - } - - late final _contacts_setting_set_name_display_orderPtr = - _lookup>( - 'contacts_setting_set_name_display_order'); - late final _contacts_setting_set_name_display_order = - _contacts_setting_set_name_display_orderPtr - .asFunction(); - - /// @brief Gets the contacts name sorting order in which contacts are returned. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @param[out] name_sorting_order The name sorting order - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_IPC Unknown IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_setting_get_name_sorting_order( - ffi.Pointer name_sorting_order, - ) { - return _contacts_setting_get_name_sorting_order( - name_sorting_order, - ); - } - - late final _contacts_setting_get_name_sorting_orderPtr = - _lookup)>>( - 'contacts_setting_get_name_sorting_order'); - late final _contacts_setting_get_name_sorting_order = - _contacts_setting_get_name_sorting_orderPtr - .asFunction)>(); - - /// @brief Sets the contacts name sorting order in which contacts are returned. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @param[in] name_sorting_order The name sorting order - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_IPC Unknown IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @post contacts_setting_name_sorting_order_changed_cb() callback will be called upon success. - /// @see contacts_connect() - int contacts_setting_set_name_sorting_order( - int name_sorting_order, - ) { - return _contacts_setting_set_name_sorting_order( - name_sorting_order, - ); - } - - late final _contacts_setting_set_name_sorting_orderPtr = - _lookup>( - 'contacts_setting_set_name_sorting_order'); - late final _contacts_setting_set_name_sorting_order = - _contacts_setting_set_name_sorting_orderPtr - .asFunction(); - - /// @brief Registers a callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_IPC Unknown IPC error - /// @retval #CONTACTS_ERROR_INTERNAL Implementation Error, Temporary Use - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @post contacts_setting_name_display_order_changed_cb() will be called under certain conditions, after calling contacts_setting_set_name_display_order(). - /// @see contacts_connect() - /// @see contacts_setting_remove_name_display_order_changed_cb() - int contacts_setting_add_name_display_order_changed_cb( - contacts_setting_name_display_order_changed_cb callback, - ffi.Pointer user_data, - ) { - return _contacts_setting_add_name_display_order_changed_cb( - callback, - user_data, - ); - } - - late final _contacts_setting_add_name_display_order_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_setting_name_display_order_changed_cb, - ffi.Pointer)>>( - 'contacts_setting_add_name_display_order_changed_cb'); - late final _contacts_setting_add_name_display_order_changed_cb = - _contacts_setting_add_name_display_order_changed_cbPtr.asFunction< - int Function(contacts_setting_name_display_order_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters a callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_INTERNAL Implementation Error, Temporary Use - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_setting_add_name_display_order_changed_cb() - int contacts_setting_remove_name_display_order_changed_cb( - contacts_setting_name_display_order_changed_cb callback, - ffi.Pointer user_data, - ) { - return _contacts_setting_remove_name_display_order_changed_cb( - callback, - user_data, - ); - } - - late final _contacts_setting_remove_name_display_order_changed_cbPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - contacts_setting_name_display_order_changed_cb, - ffi.Pointer)>>( - 'contacts_setting_remove_name_display_order_changed_cb'); - late final _contacts_setting_remove_name_display_order_changed_cb = - _contacts_setting_remove_name_display_order_changed_cbPtr.asFunction< - int Function(contacts_setting_name_display_order_changed_cb, - ffi.Pointer)>(); - - /// @brief Registers a callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_IPC Unknown IPC error - /// @retval #CONTACTS_ERROR_INTERNAL Implementation Error, Temporary Use - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @post contacts_setting_name_sorting_order_changed_cb() will be called under certain conditions, after calling contacts_setting_set_name_sorting_order(). - /// @see contacts_connect() - /// @see contacts_setting_remove_name_sorting_order_changed_cb() - int contacts_setting_add_name_sorting_order_changed_cb( - contacts_setting_name_sorting_order_changed_cb callback, - ffi.Pointer user_data, - ) { - return _contacts_setting_add_name_sorting_order_changed_cb( - callback, - user_data, - ); - } - - late final _contacts_setting_add_name_sorting_order_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_setting_name_sorting_order_changed_cb, - ffi.Pointer)>>( - 'contacts_setting_add_name_sorting_order_changed_cb'); - late final _contacts_setting_add_name_sorting_order_changed_cb = - _contacts_setting_add_name_sorting_order_changed_cbPtr.asFunction< - int Function(contacts_setting_name_sorting_order_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters a callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_INTERNAL Implementation Error, Temporary Use - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_setting_add_name_sorting_order_changed_cb() - int contacts_setting_remove_name_sorting_order_changed_cb( - contacts_setting_name_sorting_order_changed_cb callback, - ffi.Pointer user_data, - ) { - return _contacts_setting_remove_name_sorting_order_changed_cb( - callback, - user_data, - ); - } - - late final _contacts_setting_remove_name_sorting_order_changed_cbPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - contacts_setting_name_sorting_order_changed_cb, - ffi.Pointer)>>( - 'contacts_setting_remove_name_sorting_order_changed_cb'); - late final _contacts_setting_remove_name_sorting_order_changed_cb = - _contacts_setting_remove_name_sorting_order_changed_cbPtr.asFunction< - int Function(contacts_setting_name_sorting_order_changed_cb, - ffi.Pointer)>(); - - /// @brief Links a person to another person. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @param[in] base_person_id The base person ID - /// @param[in] person_id The person ID to link to - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_person_link_person( - int base_person_id, - int person_id, - ) { - return _contacts_person_link_person( - base_person_id, - person_id, - ); - } - - late final _contacts_person_link_personPtr = - _lookup>( - 'contacts_person_link_person'); - late final _contacts_person_link_person = - _contacts_person_link_personPtr.asFunction(); - - /// @brief Unlinks a contact from a person. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @param[in] person_id The person ID - /// @param[in] contact_id The contact ID to unlink - /// @param[out] unlinked_person_id The person ID generated - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_person_unlink_contact( - int person_id, - int contact_id, - ffi.Pointer unlinked_person_id, - ) { - return _contacts_person_unlink_contact( - person_id, - contact_id, - unlinked_person_id, - ); - } - - late final _contacts_person_unlink_contactPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Int, - ffi.Pointer)>>('contacts_person_unlink_contact'); - late final _contacts_person_unlink_contact = - _contacts_person_unlink_contactPtr - .asFunction)>(); - - /// @brief Resets a person's usage count. - /// @details The person is no longer in the most frequently contacted person list. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @param[in] person_id The person ID - /// @param[in] type The type to reset - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_person_reset_usage( - int person_id, - int type, - ) { - return _contacts_person_reset_usage( - person_id, - type, - ); - } - - late final _contacts_person_reset_usagePtr = - _lookup>( - 'contacts_person_reset_usage'); - late final _contacts_person_reset_usage = - _contacts_person_reset_usagePtr.asFunction(); - - /// @brief Sets the order of a (favorite) contact. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @param[in] person_id The person ID to move - /// @param[in] previous_person_id The previous person ID - /// @param[in] next_person_id The back person ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_person_set_favorite_order( - int person_id, - int previous_person_id, - int next_person_id, - ) { - return _contacts_person_set_favorite_order( - person_id, - previous_person_id, - next_person_id, - ); - } - - late final _contacts_person_set_favorite_orderPtr = - _lookup>( - 'contacts_person_set_favorite_order'); - late final _contacts_person_set_favorite_order = - _contacts_person_set_favorite_orderPtr - .asFunction(); - - /// @brief Sets a record's default property. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @remarks @a id can be contact_id, number_id, email_id, image_id. - /// @param[in] property #contacts_person_property_e - /// @param[in] person_id The person ID - /// @param[in] id The record ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_person_set_default_property( - int property, - int person_id, - int id, - ) { - return _contacts_person_set_default_property( - property, - person_id, - id, - ); - } - - late final _contacts_person_set_default_propertyPtr = _lookup< - ffi.NativeFunction>( - 'contacts_person_set_default_property'); - late final _contacts_person_set_default_property = - _contacts_person_set_default_propertyPtr - .asFunction(); - - /// @brief Gets a default property for a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @remarks @a id can be contact_id, number_id, email_id, image_id. - /// @param[in] property #contacts_person_property_e - /// @param[in] person_id The person ID - /// @param[out] id The record ID of the property to be set as default - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_person_get_default_property( - int property, - int person_id, - ffi.Pointer id, - ) { - return _contacts_person_get_default_property( - property, - person_id, - id, - ); - } - - late final _contacts_person_get_default_propertyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Int, - ffi.Pointer)>>('contacts_person_get_default_property'); - late final _contacts_person_get_default_property = - _contacts_person_get_default_propertyPtr - .asFunction)>(); - - /// @brief Gets aggregation suggestions. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @remarks You must release @a record_list using contacts_list_destroy(). - /// @remarks This may take a long time. If you need to use it in bulk, make sure the user experience is acceptable while running it. - /// @param[in] person_id The person ID - /// @param[in] limit The number to limit results(value 0 is used for get all records) - /// @param[out] record_list The list of person records - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_person_get_aggregation_suggestions( - int person_id, - int limit, - ffi.Pointer record_list, - ) { - return _contacts_person_get_aggregation_suggestions( - person_id, - limit, - record_list, - ); - } - - late final _contacts_person_get_aggregation_suggestionsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Int, ffi.Pointer)>>( - 'contacts_person_get_aggregation_suggestions'); - late final _contacts_person_get_aggregation_suggestions = - _contacts_person_get_aggregation_suggestionsPtr - .asFunction)>(); - - /// @brief Adds a contact and a group relationship to the contacts database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @param[in] group_id The group ID - /// @param[in] contact_id The contact ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_group_remove_contact() - int contacts_group_add_contact( - int group_id, - int contact_id, - ) { - return _contacts_group_add_contact( - group_id, - contact_id, - ); - } - - late final _contacts_group_add_contactPtr = - _lookup>( - 'contacts_group_add_contact'); - late final _contacts_group_add_contact = - _contacts_group_add_contactPtr.asFunction(); - - /// @brief Removes a contact and a group relationship from the contacts database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @param[in] group_id The group ID - /// @param[in] contact_id The contact ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_group_add_contact() - int contacts_group_remove_contact( - int group_id, - int contact_id, - ) { - return _contacts_group_remove_contact( - group_id, - contact_id, - ); - } - - late final _contacts_group_remove_contactPtr = - _lookup>( - 'contacts_group_remove_contact'); - late final _contacts_group_remove_contact = - _contacts_group_remove_contactPtr.asFunction(); - - /// @brief Sets a group between the previous group and the next group. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @param[in] group_id The group ID to move - /// @param[in] previous_group_id The previous group ID - /// @param[in] next_group_id The back group ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_group_set_group_order( - int group_id, - int previous_group_id, - int next_group_id, - ) { - return _contacts_group_set_group_order( - group_id, - previous_group_id, - next_group_id, - ); - } - - late final _contacts_group_set_group_orderPtr = - _lookup>( - 'contacts_group_set_group_order'); - late final _contacts_group_set_group_order = - _contacts_group_set_group_orderPtr - .asFunction(); - - /// @deprecated Deprecated since 3.0. Use contacts_sim_import_all_contacts_by_sim_slot_no() instead. - /// @brief Imports all contacts from first SIM to Contacts Database. - /// @since_tizen @if MOBILE 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_IPC Unknown IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @retval #CONTACTS_ERROR_INTERNAL Implementation Error, Temporary Use - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_sim_import_all_contacts() { - return _contacts_sim_import_all_contacts(); - } - - late final _contacts_sim_import_all_contactsPtr = - _lookup>( - 'contacts_sim_import_all_contacts'); - late final _contacts_sim_import_all_contacts = - _contacts_sim_import_all_contactsPtr.asFunction(); - - /// @deprecated Deprecated since 3.0. Use contacts_sim_get_initialization_status_by_sim_slot_no() instead. - /// @brief Checks whether first SIM initialization is completed. - /// @since_tizen @if MOBILE 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @param[out] completed @c true if SIM is initialized, - /// otherwise @c false if SIM is not initialized - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_IPC Unknown IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_sim_get_initialization_status( - ffi.Pointer completed, - ) { - return _contacts_sim_get_initialization_status( - completed, - ); - } - - late final _contacts_sim_get_initialization_statusPtr = - _lookup)>>( - 'contacts_sim_get_initialization_status'); - late final _contacts_sim_get_initialization_status = - _contacts_sim_get_initialization_statusPtr - .asFunction)>(); - - /// @brief Imports all contacts from SIM of the given SIM slot number to the Contacts Database. - /// @details This function invokes contacts_sim_import_progress_cb() to indicate the progress of imports whenever a contact is imported. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @param[in] sim_slot_no The SIM slot number; 0 means first SIM, 1 means second SIM - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_IPC Unknown IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_sim_import_progress_cb() - int contacts_sim_import_all_contacts_by_sim_slot_no( - int sim_slot_no, - contacts_sim_import_progress_cb callback, - ffi.Pointer user_data, - ) { - return _contacts_sim_import_all_contacts_by_sim_slot_no( - sim_slot_no, - callback, - user_data, - ); - } - - late final _contacts_sim_import_all_contacts_by_sim_slot_noPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, contacts_sim_import_progress_cb, - ffi.Pointer)>>( - 'contacts_sim_import_all_contacts_by_sim_slot_no'); - late final _contacts_sim_import_all_contacts_by_sim_slot_no = - _contacts_sim_import_all_contacts_by_sim_slot_noPtr.asFunction< - int Function( - int, contacts_sim_import_progress_cb, ffi.Pointer)>(); - - /// @brief Checks whether SIM of the given SIM slot number is initialized. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @param[in] sim_slot_no The SIM slot number; 0 means first SIM, 1 means second SIM - /// @param[out] completed @c true if SIM is initialized, - /// otherwise @c false if SIM is not initialized - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_IPC Unknown IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_sim_get_initialization_status_by_sim_slot_no( - int sim_slot_no, - ffi.Pointer completed, - ) { - return _contacts_sim_get_initialization_status_by_sim_slot_no( - sim_slot_no, - completed, - ); - } - - late final _contacts_sim_get_initialization_status_by_sim_slot_noPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer)>>( - 'contacts_sim_get_initialization_status_by_sim_slot_no'); - late final _contacts_sim_get_initialization_status_by_sim_slot_no = - _contacts_sim_get_initialization_status_by_sim_slot_noPtr - .asFunction)>(); - - /// @brief Retrieves all contacts with a record handle (_contacts_contact) from a vCard file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] vcard_file_path The file path of vCard stream file - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_SYSTEM System error - /// @pre contacts_connect() should be called to initialize. - /// @post This function invokes contacts_vcard_parse_cb(). - /// @see contacts_vcard_parse_cb() - int contacts_vcard_parse_to_contact_foreach( - ffi.Pointer vcard_file_path, - contacts_vcard_parse_cb callback, - ffi.Pointer user_data, - ) { - return _contacts_vcard_parse_to_contact_foreach( - vcard_file_path, - callback, - user_data, - ); - } - - late final _contacts_vcard_parse_to_contact_foreachPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, contacts_vcard_parse_cb, - ffi.Pointer)>>( - 'contacts_vcard_parse_to_contact_foreach'); - late final _contacts_vcard_parse_to_contact_foreach = - _contacts_vcard_parse_to_contact_foreachPtr.asFunction< - int Function(ffi.Pointer, contacts_vcard_parse_cb, - ffi.Pointer)>(); - - /// @brief Retrieves all contacts with a contacts list from a vCard stream. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] vcard_stream The vCard stream - /// @param[out] contacts_list The contacts list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to initialize. - int contacts_vcard_parse_to_contacts( - ffi.Pointer vcard_stream, - ffi.Pointer contacts_list, - ) { - return _contacts_vcard_parse_to_contacts( - vcard_stream, - contacts_list, - ); - } - - late final _contacts_vcard_parse_to_contactsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>( - 'contacts_vcard_parse_to_contacts'); - late final _contacts_vcard_parse_to_contacts = - _contacts_vcard_parse_to_contactsPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Retrieves the vCard stream from a contact. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] contact The contact record handle - /// @param[out] vcard_stream The vCard stream - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - int contacts_vcard_make_from_contact( - contacts_record_h contact, - ffi.Pointer> vcard_stream, - ) { - return _contacts_vcard_make_from_contact( - contact, - vcard_stream, - ); - } - - late final _contacts_vcard_make_from_contactPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - contacts_record_h, ffi.Pointer>)>>( - 'contacts_vcard_make_from_contact'); - late final _contacts_vcard_make_from_contact = - _contacts_vcard_make_from_contactPtr.asFunction< - int Function( - contacts_record_h, ffi.Pointer>)>(); - - /// @brief Retrieves the vCard stream from a contact. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] my_profile The my_profile record handle - /// @param[out] vcard_stream The vCard stream - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - int contacts_vcard_make_from_my_profile( - contacts_record_h my_profile, - ffi.Pointer> vcard_stream, - ) { - return _contacts_vcard_make_from_my_profile( - my_profile, - vcard_stream, - ); - } - - late final _contacts_vcard_make_from_my_profilePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - contacts_record_h, ffi.Pointer>)>>( - 'contacts_vcard_make_from_my_profile'); - late final _contacts_vcard_make_from_my_profile = - _contacts_vcard_make_from_my_profilePtr.asFunction< - int Function( - contacts_record_h, ffi.Pointer>)>(); - - /// @brief Retrieves the vCard stream from a person. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @param[in] person The person record handle - /// @param[out] vcard_stream The vCard stream - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB DB error - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to initialize. - int contacts_vcard_make_from_person( - contacts_record_h person, - ffi.Pointer> vcard_stream, - ) { - return _contacts_vcard_make_from_person( - person, - vcard_stream, - ); - } - - late final _contacts_vcard_make_from_personPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - contacts_record_h, ffi.Pointer>)>>( - 'contacts_vcard_make_from_person'); - late final _contacts_vcard_make_from_person = - _contacts_vcard_make_from_personPtr.asFunction< - int Function( - contacts_record_h, ffi.Pointer>)>(); - - /// @brief Retrieves the count of contact entities from a vCard file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] vcard_file_path The person record handle - /// @param[out] count The count of contact entity - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM System error - int contacts_vcard_get_entity_count( - ffi.Pointer vcard_file_path, - ffi.Pointer count, - ) { - return _contacts_vcard_get_entity_count( - vcard_file_path, - count, - ); - } - - late final _contacts_vcard_get_entity_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('contacts_vcard_get_entity_count'); - late final _contacts_vcard_get_entity_count = - _contacts_vcard_get_entity_countPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the limit size of width and height of photos to append in vCard streams. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @param[out] limit_size The limit size of width and height of photos to append in vCard streams. It's in pixels - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - int contacts_vcard_get_limit_size_of_photo( - ffi.Pointer limit_size, - ) { - return _contacts_vcard_get_limit_size_of_photo( - limit_size, - ); - } - - late final _contacts_vcard_get_limit_size_of_photoPtr = _lookup< - ffi.NativeFunction)>>( - 'contacts_vcard_get_limit_size_of_photo'); - late final _contacts_vcard_get_limit_size_of_photo = - _contacts_vcard_get_limit_size_of_photoPtr - .asFunction)>(); - - /// @brief Sets the limit size of width and height of photos to append to vCard streams. - /// @details This function can be used for getting reduced vCard stream. \n - /// When making vCard stream by using contacts_vcard_make_from_person(), contacts_vcard_make_from_my_profile(), contacts_vcard_make_from_contact(), \n - /// if width or height of the photo to append is bigger than the limit size, it is reduced to the limit size while maintaining original aspect ratio, \n - /// so that vCard stream size can be reduced. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @remarks The limit_size should be bigger than or equal to 8 and smaller than 1080. - /// @param[in] limit_size The limit size of width and height of photos to append in vCard streams. It's in pixels - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - int contacts_vcard_set_limit_size_of_photo( - int limit_size, - ) { - return _contacts_vcard_set_limit_size_of_photo( - limit_size, - ); - } - - late final _contacts_vcard_set_limit_size_of_photoPtr = - _lookup>( - 'contacts_vcard_set_limit_size_of_photo'); - late final _contacts_vcard_set_limit_size_of_photo = - _contacts_vcard_set_limit_size_of_photoPtr - .asFunction(); - - /// @brief Deletes an activity record from the contacts database by contact ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @param[in] contact_id The contact ID to delete - /// @return @c 0 on success, - /// otherwise a negative error value (#contacts_error_e) - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_activity_delete_by_contact_id( - int contact_id, - ) { - return _contacts_activity_delete_by_contact_id( - contact_id, - ); - } - - late final _contacts_activity_delete_by_contact_idPtr = - _lookup>( - 'contacts_activity_delete_by_contact_id'); - late final _contacts_activity_delete_by_contact_id = - _contacts_activity_delete_by_contact_idPtr - .asFunction(); - - /// @brief Deletes an activity record from the contacts database by account ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @param[in] account_id The account ID to delete - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_activity_delete_by_account_id( - int account_id, - ) { - return _contacts_activity_delete_by_account_id( - account_id, - ); - } - - late final _contacts_activity_delete_by_account_idPtr = - _lookup>( - 'contacts_activity_delete_by_account_id'); - late final _contacts_activity_delete_by_account_id = - _contacts_activity_delete_by_account_idPtr - .asFunction(); - - /// @brief Resets the phone log's count. - /// @details The number of all types in the phone log will be @c 0. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/callhistory.write - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_phone_log_reset_statistics() { - return _contacts_phone_log_reset_statistics(); - } - - late final _contacts_phone_log_reset_statisticsPtr = - _lookup>( - 'contacts_phone_log_reset_statistics'); - late final _contacts_phone_log_reset_statistics = - _contacts_phone_log_reset_statisticsPtr.asFunction(); - - /// @brief Resets the phone log's count by sim slot no. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/callhistory.write - /// @param[in] sim_slot_no It is related to the SIM slot number. sim_slot_no 0 means first SIM, sim_slot_no 1 means second SIM - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_phone_log_reset_statistics_by_sim( - int sim_slot_no, - ) { - return _contacts_phone_log_reset_statistics_by_sim( - sim_slot_no, - ); - } - - late final _contacts_phone_log_reset_statistics_by_simPtr = - _lookup>( - 'contacts_phone_log_reset_statistics_by_sim'); - late final _contacts_phone_log_reset_statistics_by_sim = - _contacts_phone_log_reset_statistics_by_simPtr - .asFunction(); - - /// @brief Gets the current status of server. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] status The current status of server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre This function requires an open connection to the contacts service by contacts_connect(). - /// @see contacts_connect() - int contacts_db_get_status( - ffi.Pointer status, - ) { - return _contacts_db_get_status( - status, - ); - } - - late final _contacts_db_get_statusPtr = - _lookup)>>( - 'contacts_db_get_status'); - late final _contacts_db_get_status = _contacts_db_get_statusPtr - .asFunction)>(); - - /// @brief Registers a callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre This function requires an open connection to the contacts service by contacts_connect(). - /// @see contacts_connect() - /// @see contacts_db_remove_status_changed_cb() - int contacts_db_add_status_changed_cb( - contacts_db_status_changed_cb callback, - ffi.Pointer user_data, - ) { - return _contacts_db_add_status_changed_cb( - callback, - user_data, - ); - } - - late final _contacts_db_add_status_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_db_status_changed_cb, - ffi.Pointer)>>('contacts_db_add_status_changed_cb'); - late final _contacts_db_add_status_changed_cb = - _contacts_db_add_status_changed_cbPtr.asFunction< - int Function(contacts_db_status_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters a callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre This function requires an open connection to the contacts service by contacts_connect(). - /// @see contacts_connect() - /// @see contacts_db_add_status_changed_cb() - int contacts_db_remove_status_changed_cb( - contacts_db_status_changed_cb callback, - ffi.Pointer user_data, - ) { - return _contacts_db_remove_status_changed_cb( - callback, - user_data, - ); - } - - late final _contacts_db_remove_status_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_db_status_changed_cb, - ffi.Pointer)>>('contacts_db_remove_status_changed_cb'); - late final _contacts_db_remove_status_changed_cb = - _contacts_db_remove_status_changed_cbPtr.asFunction< - int Function(contacts_db_status_changed_cb, ffi.Pointer)>(); - - /// @brief Creates a blocking rule. - /// - /// @since_tizen 4.0 - /// - /// @remarks You must release @a rule using phone_number_blocking_rule_destroy(). - /// - /// @param[out] rule The blocking rule handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// - /// @pre phone_number_connect() should be called to initialize. - /// - /// @see phone_number_blocking_rule_destroy() - int phone_number_blocking_rule_create( - ffi.Pointer rule, - ) { - return _phone_number_blocking_rule_create( - rule, - ); - } - - late final _phone_number_blocking_rule_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'phone_number_blocking_rule_create'); - late final _phone_number_blocking_rule_create = - _phone_number_blocking_rule_createPtr.asFunction< - int Function(ffi.Pointer)>(); - - /// @brief Destroys a blocking rule and releases all its resources. - /// - /// @since_tizen 4.0 - /// - /// @param[in] rule The blocking rule handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// - /// @see phone_number_blocking_rule_create() - int phone_number_blocking_rule_destroy( - phone_number_blocking_rule_h rule, - ) { - return _phone_number_blocking_rule_destroy( - rule, - ); - } - - late final _phone_number_blocking_rule_destroyPtr = _lookup< - ffi.NativeFunction>( - 'phone_number_blocking_rule_destroy'); - late final _phone_number_blocking_rule_destroy = - _phone_number_blocking_rule_destroyPtr - .asFunction(); - - /// @brief Gets a blocked number from a rule. - /// - /// @since_tizen 4.0 - /// - /// @remarks You must release @a number using free(). - /// - /// @param[in] rule The blocking rule handle - /// @param[out] number The blocked number - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// - /// @see phone_number_blocking_rule_set_number() - int phone_number_blocking_rule_get_number( - phone_number_blocking_rule_h rule, - ffi.Pointer> number, - ) { - return _phone_number_blocking_rule_get_number( - rule, - number, - ); - } - - late final _phone_number_blocking_rule_get_numberPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(phone_number_blocking_rule_h, - ffi.Pointer>)>>( - 'phone_number_blocking_rule_get_number'); - late final _phone_number_blocking_rule_get_number = - _phone_number_blocking_rule_get_numberPtr.asFunction< - int Function(phone_number_blocking_rule_h, - ffi.Pointer>)>(); - - /// @brief Gets a rule's match type. - /// - /// @since_tizen 4.0 - /// - /// @param[in] rule The blocking rule handle - /// @param[out] match_type The match type of blocked number - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// - /// @see phone_number_blocking_rule_set_match_type() - int phone_number_blocking_rule_get_match_type( - phone_number_blocking_rule_h rule, - ffi.Pointer match_type, - ) { - return _phone_number_blocking_rule_get_match_type( - rule, - match_type, - ); - } - - late final _phone_number_blocking_rule_get_match_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - phone_number_blocking_rule_h, ffi.Pointer)>>( - 'phone_number_blocking_rule_get_match_type'); - late final _phone_number_blocking_rule_get_match_type = - _phone_number_blocking_rule_get_match_typePtr.asFunction< - int Function(phone_number_blocking_rule_h, ffi.Pointer)>(); - - /// @brief Sets a blocked number to a rule. - /// - /// @since_tizen 4.0 - /// - /// @param[in] rule The blocking rule handle - /// @param[in] number The blocked number - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// - /// @see phone_number_blocking_rule_get_number() - int phone_number_blocking_rule_set_number( - phone_number_blocking_rule_h rule, - ffi.Pointer number, - ) { - return _phone_number_blocking_rule_set_number( - rule, - number, - ); - } - - late final _phone_number_blocking_rule_set_numberPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(phone_number_blocking_rule_h, - ffi.Pointer)>>('phone_number_blocking_rule_set_number'); - late final _phone_number_blocking_rule_set_number = - _phone_number_blocking_rule_set_numberPtr.asFunction< - int Function(phone_number_blocking_rule_h, ffi.Pointer)>(); - - /// @brief Sets a rule's match type. - /// - /// @since_tizen 4.0 - /// - /// @param[in] rule The blocking rule handle - /// @param[in] match_type The match type of blocked number - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// - /// @see phone_number_blocking_rule_get_match_type() - int phone_number_blocking_rule_set_match_type( - phone_number_blocking_rule_h rule, - int match_type, - ) { - return _phone_number_blocking_rule_set_match_type( - rule, - match_type, - ); - } - - late final _phone_number_blocking_rule_set_match_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(phone_number_blocking_rule_h, - ffi.Int32)>>('phone_number_blocking_rule_set_match_type'); - late final _phone_number_blocking_rule_set_match_type = - _phone_number_blocking_rule_set_match_typePtr - .asFunction(); - - /// @brief Connects to the phonenumber-utils service. - /// @since_tizen 3.0 - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// @see phone_number_disconnect() - int phone_number_connect() { - return _phone_number_connect(); - } - - late final _phone_number_connectPtr = - _lookup>('phone_number_connect'); - late final _phone_number_connect = - _phone_number_connectPtr.asFunction(); - - /// @brief Disconnects from the phonenumber-utils service. - /// @since_tizen 3.0 - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// @see phone_number_connect() - int phone_number_disconnect() { - return _phone_number_disconnect(); - } - - late final _phone_number_disconnectPtr = - _lookup>( - 'phone_number_disconnect'); - late final _phone_number_disconnect = - _phone_number_disconnectPtr.asFunction(); - - /// @brief Gets the location string from number, region, and language. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a location using free(). - /// @remarks The phonenumber-utils is changed to client/server architecture for performance improvement since 3.0. - /// phone_number_connect()/phone_number_disconnect() should be called. - /// @param[in] number The number - /// @param[in] region The region of number - /// @param[in] language The language of location - /// @param[out] location The location string to be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_FILE_NO_SPACE_ON_DEVICE FS Full - /// @retval #PHONE_NUMBER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_NO_DATA Requested data does not exist - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// @pre phone_number_connect() should be called to open a connection to the phonenumber-utils service. (Since 3.0) - /// @post phone_number_disconnect() should be called to close a connection to the phonenumber-utils service. (Since 3.0) - int phone_number_get_location_from_number( - ffi.Pointer number, - int region, - int language, - ffi.Pointer> location, - ) { - return _phone_number_get_location_from_number( - number, - region, - language, - location, - ); - } - - late final _phone_number_get_location_from_numberPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int32, ffi.Int32, - ffi.Pointer>)>>( - 'phone_number_get_location_from_number'); - late final _phone_number_get_location_from_number = - _phone_number_get_location_from_numberPtr.asFunction< - int Function(ffi.Pointer, int, int, - ffi.Pointer>)>(); - - /// @brief Gets the formatted number. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a formatted_number using free(). - /// @remarks The phonenumber-utils is changed to client/server architecture for performance improvement since 3.0. - /// phone_number_connect()/phone_number_disconnect() should be called. - /// @param[in] number The number - /// @param[in] region The region of number - /// @param[out] formatted_number The formatted number string to be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_FILE_NO_SPACE_ON_DEVICE FS Full - /// @retval #PHONE_NUMBER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_NO_DATA Requested data does not exist - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// @pre phone_number_connect() should be called to open a connection to the phonenumber-utils service. (Since 3.0) - /// @post phone_number_disconnect() should be called to close a connection to the phonenumber-utils service. (Since 3.0) - int phone_number_get_formatted_number( - ffi.Pointer number, - int region, - ffi.Pointer> formatted_number, - ) { - return _phone_number_get_formatted_number( - number, - region, - formatted_number, - ); - } - - late final _phone_number_get_formatted_numberPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int32, - ffi.Pointer>)>>( - 'phone_number_get_formatted_number'); - late final _phone_number_get_formatted_number = - _phone_number_get_formatted_numberPtr.asFunction< - int Function(ffi.Pointer, int, - ffi.Pointer>)>(); - - /// @brief Gets the normalized number. - /// @details Normalized number starts with plus('+') and country code, and excludes the separators such - /// as dash or space. It is a format of E.164 standard including the country code based on current network. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// @remarks You must release @a normalized_number using free(). - /// @remarks The phonenumber-utils is changed to client/server architecture for performance improvement since 3.0. - /// phone_number_connect()/phone_number_disconnect() should be called. - /// @param[in] number The number - /// @param[out] normalized_number The normalized number string to be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_NO_DATA Requested data does not exist - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// @pre phone_number_connect() should be called to open a connection to the phonenumber-utils service. (Since 3.0) - /// @post phone_number_disconnect() should be called to close a connection to the phonenumber-utils service. (Since 3.0) - int phone_number_get_normalized_number( - ffi.Pointer number, - ffi.Pointer> normalized_number, - ) { - return _phone_number_get_normalized_number( - number, - normalized_number, - ); - } - - late final _phone_number_get_normalized_numberPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer>)>>( - 'phone_number_get_normalized_number'); - late final _phone_number_get_normalized_number = - _phone_number_get_normalized_numberPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Adds a blocking rule to the phone number database. - /// - /// @since_tizen 4.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/blocknumber.write - /// - /// @param[in] rule The blocking rule handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_DB_FAILED Database operation failure - /// @retval #PHONE_NUMBER_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_IPC Unknown IPC error - /// @retval #PHONE_NUMBER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// @pre phone_number_connect() should be called to open a connection to the phonenumber-utils service. - /// @post phone_number_disconnect() should be called to close a connection to the phonenumber-utils service. - /// @see phone_number_remove_blocking_rule() - int phone_number_add_blocking_rule( - phone_number_blocking_rule_h rule, - ) { - return _phone_number_add_blocking_rule( - rule, - ); - } - - late final _phone_number_add_blocking_rulePtr = _lookup< - ffi.NativeFunction>( - 'phone_number_add_blocking_rule'); - late final _phone_number_add_blocking_rule = - _phone_number_add_blocking_rulePtr - .asFunction(); - - /// @brief Removes a blocking rule from the phone number database. - /// - /// @since_tizen 4.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/blocknumber.write - /// - /// @remarks The blocking rule to remove should have been gotten from the phone number database using phone_number_get_blocking_rules(). - /// - /// @param[in] rule The blocking rule handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_DB_FAILED Database operation failure - /// @retval #PHONE_NUMBER_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_IPC Unknown IPC error - /// @retval #PHONE_NUMBER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// @pre phone_number_connect() should be called to open a connection to the phonenumber-utils service. - /// @post phone_number_disconnect() should be called to close a connection to the phonenumber-utils service. - /// @see phone_number_add_blocking_rule() - int phone_number_remove_blocking_rule( - phone_number_blocking_rule_h rule, - ) { - return _phone_number_remove_blocking_rule( - rule, - ); - } - - late final _phone_number_remove_blocking_rulePtr = _lookup< - ffi.NativeFunction>( - 'phone_number_remove_blocking_rule'); - late final _phone_number_remove_blocking_rule = - _phone_number_remove_blocking_rulePtr - .asFunction(); - - /// @brief Retrieves blocking rules as an array. - /// - /// @since_tizen 4.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/blocknumber.read - /// - /// @remarks You must release each blocking rule in the array with phone_number_blocking_rule_destroy() and @a rules using free(). - /// - /// @param[in] offset The index from which to get results - /// @param[in] limit The number to limit results (value 0 is used for all blocking rules) - /// @param[out] rules The array of blocking rule handles - /// @param[out] length The number of blocking rule handles in the array - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_DB_FAILED Database operation failure - /// @retval #PHONE_NUMBER_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_IPC Unknown IPC error - /// @retval #PHONE_NUMBER_ERROR_NO_DATA Data does not exist - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// @pre phone_number_connect() should be called to open a connection to the phonenumber-utils service. - /// @post phone_number_disconnect() should be called to close a connection to the phonenumber-utils service. - int phone_number_get_blocking_rules( - int offset, - int limit, - ffi.Pointer> rules, - ffi.Pointer length, - ) { - return _phone_number_get_blocking_rules( - offset, - limit, - rules, - length, - ); - } - - late final _phone_number_get_blocking_rulesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Int, - ffi.Pointer>, - ffi.Pointer)>>('phone_number_get_blocking_rules'); - late final _phone_number_get_blocking_rules = - _phone_number_get_blocking_rulesPtr.asFunction< - int Function( - int, - int, - ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Retrieves blocking rules that block a specific number. - /// - /// @since_tizen 4.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/blocknumber.read - /// - /// @remarks You must release each blocking rule in the array with phone_number_blocking_rule_destroy() and @a rules using free(). - /// - /// @param[in] number The number to get blocking rules related with - /// @param[out] rules The array of blocking rule handles - /// @param[out] length The number of blocking rule handles in the array - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_DB_FAILED Database operation failure - /// @retval #PHONE_NUMBER_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_IPC Unknown IPC error - /// @retval #PHONE_NUMBER_ERROR_NO_DATA Data does not exist - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// @pre phone_number_connect() should be called to open a connection to the phonenumber-utils service. - /// @post phone_number_disconnect() should be called to close a connection to the phonenumber-utils service. - int phone_number_get_blocking_rules_related( - ffi.Pointer number, - ffi.Pointer> rules, - ffi.Pointer length, - ) { - return _phone_number_get_blocking_rules_related( - number, - rules, - length, - ); - } - - late final _phone_number_get_blocking_rules_relatedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>( - 'phone_number_get_blocking_rules_related'); - late final _phone_number_get_blocking_rules_related = - _phone_number_get_blocking_rules_relatedPtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Checks if a specific number is blocked or not. - /// - /// @since_tizen 4.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/blocknumber.read - /// - /// @param[in] number The number to check blocking - /// @param[out] is_blocked The blocking result - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_DB_FAILED Database operation failure - /// @retval #PHONE_NUMBER_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_IPC Unknown IPC error - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// @pre phone_number_connect() should be called to open a connection to the phonenumber-utils service. - /// @post phone_number_disconnect() should be called to close a connection to the phonenumber-utils service. - int phone_number_check_blocking( - ffi.Pointer number, - ffi.Pointer is_blocked, - ) { - return _phone_number_check_blocking( - number, - is_blocked, - ); - } - - late final _phone_number_check_blockingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('phone_number_check_blocking'); - late final _phone_number_check_blocking = _phone_number_check_blockingPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Gets the battery charge percentage. - /// @details It returns an integer value from @c 0 to @c 100 that indicates remaining battery charge - /// as a percentage of the maximum level. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks In order to be notified when the battery state changes, use system_info_set_changed_cb(). - /// @param[out] percent The remaining battery charge percentage (@c 0 ~ @c 100) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - int device_battery_get_percent( - ffi.Pointer percent, - ) { - return _device_battery_get_percent( - percent, - ); - } - - late final _device_battery_get_percentPtr = - _lookup)>>( - 'device_battery_get_percent'); - late final _device_battery_get_percent = _device_battery_get_percentPtr - .asFunction)>(); - - /// @brief Gets the charging state. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[out] charging The battery charging state - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @see device_add_callback - /// @see device_remove_callback - /// @see #DEVICE_CALLBACK_BATTERY_CHARGING - int device_battery_is_charging( - ffi.Pointer charging, - ) { - return _device_battery_is_charging( - charging, - ); - } - - late final _device_battery_is_chargingPtr = - _lookup)>>( - 'device_battery_is_charging'); - late final _device_battery_is_charging = _device_battery_is_chargingPtr - .asFunction)>(); - - /// @brief Gets the battery level status. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[out] status The battery level status - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @see device_battery_level_e - /// @see device_add_callback - /// @see device_remove_callback - /// @see #DEVICE_CALLBACK_BATTERY_LEVEL - int device_battery_get_level_status( - ffi.Pointer status, - ) { - return _device_battery_get_level_status( - status, - ); - } - - late final _device_battery_get_level_statusPtr = - _lookup)>>( - 'device_battery_get_level_status'); - late final _device_battery_get_level_status = - _device_battery_get_level_statusPtr - .asFunction)>(); - - /// @brief Gets the battery health information. - /// @since_tizen 3.0 - /// @param[out] health The battery health information - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - int device_battery_get_health( - ffi.Pointer health, - ) { - return _device_battery_get_health( - health, - ); - } - - late final _device_battery_get_healthPtr = - _lookup)>>( - 'device_battery_get_health'); - late final _device_battery_get_health = _device_battery_get_healthPtr - .asFunction)>(); - - /// @brief Gets the battery power source information. - /// @since_tizen 3.0 - /// @param[out] source The battery power source information - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - int device_battery_get_power_source( - ffi.Pointer source, - ) { - return _device_battery_get_power_source( - source, - ); - } - - late final _device_battery_get_power_sourcePtr = - _lookup)>>( - 'device_battery_get_power_source'); - late final _device_battery_get_power_source = - _device_battery_get_power_sourcePtr - .asFunction)>(); - - /// @brief Gets the battery properties. - /// @since_tizen 3.0 - /// @param[in] property The property type - /// @param[out] value The battery information for the property given - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - int device_battery_get_property( - int property, - ffi.Pointer value, - ) { - return _device_battery_get_property( - property, - value, - ); - } - - late final _device_battery_get_propertyPtr = _lookup< - ffi - .NativeFunction)>>( - 'device_battery_get_property'); - late final _device_battery_get_property = _device_battery_get_propertyPtr - .asFunction)>(); - - /// @brief Gets the battery status information. - /// @since_tizen 3.0 - /// @param[out] status The battery status information - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - int device_battery_get_status( - ffi.Pointer status, - ) { - return _device_battery_get_status( - status, - ); - } - - late final _device_battery_get_statusPtr = - _lookup)>>( - 'device_battery_get_status'); - late final _device_battery_get_status = _device_battery_get_statusPtr - .asFunction)>(); - - /// @brief Adds a callback to the observing device state. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] type The device type to monitor - /// @param[in] callback The callback function to add - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_ALREADY_IN_PROGRESS Operation already - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - int device_add_callback( - int type, - device_changed_cb callback, - ffi.Pointer user_data, - ) { - return _device_add_callback( - type, - callback, - user_data, - ); - } - - late final _device_add_callbackPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, device_changed_cb, - ffi.Pointer)>>('device_add_callback'); - late final _device_add_callback = _device_add_callbackPtr.asFunction< - int Function(int, device_changed_cb, ffi.Pointer)>(); - - /// @brief Removes a device callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] type The device type to monitor - /// @param[in] callback The callback function to remove - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - int device_remove_callback( - int type, - device_changed_cb callback, - ) { - return _device_remove_callback( - type, - callback, - ); - } - - late final _device_remove_callbackPtr = _lookup< - ffi.NativeFunction>( - 'device_remove_callback'); - late final _device_remove_callback = _device_remove_callbackPtr - .asFunction(); - - /// @brief Gets the number of display devices. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/display - /// @param[out] device_number The total number of displays - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @see device_display_get_brightness() - /// @see device_display_set_brightness() - /// @see device_display_get_max_brightness() - int device_display_get_numbers( - ffi.Pointer device_number, - ) { - return _device_display_get_numbers( - device_number, - ); - } - - late final _device_display_get_numbersPtr = - _lookup)>>( - 'device_display_get_numbers'); - late final _device_display_get_numbers = _device_display_get_numbersPtr - .asFunction)>(); - - /// @brief Gets the maximum brightness value that can be set. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/display - /// @param[in] display_index The index of the display \n - /// It can be greater than or equal to @c 0 and less than the number of displays returned by device_display_get_numbers(). \n - /// The index zero is always assigned to the main display - /// @param[out] max_brightness The maximum brightness value of the display - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @see device_display_get_numbers() - /// @see device_display_set_brightness() - /// @see device_display_get_brightness() - int device_display_get_max_brightness( - int display_index, - ffi.Pointer max_brightness, - ) { - return _device_display_get_max_brightness( - display_index, - max_brightness, - ); - } - - late final _device_display_get_max_brightnessPtr = _lookup< - ffi.NativeFunction)>>( - 'device_display_get_max_brightness'); - late final _device_display_get_max_brightness = - _device_display_get_max_brightnessPtr - .asFunction)>(); - - /// @brief Gets the display brightness value. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/display - /// @param[in] display_index The index of the display \n - /// It can be greater than or equal to @c 0 and less than the number of displays returned by device_display_get_numbers(). \n - /// The index zero is always assigned to the main display - /// @param[out] brightness The current brightness value of the display - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @see device_display_get_numbers() - /// @see device_display_set_brightness() - /// @see device_display_get_max_brightness() - int device_display_get_brightness( - int display_index, - ffi.Pointer brightness, - ) { - return _device_display_get_brightness( - display_index, - brightness, - ); - } - - late final _device_display_get_brightnessPtr = _lookup< - ffi.NativeFunction)>>( - 'device_display_get_brightness'); - late final _device_display_get_brightness = _device_display_get_brightnessPtr - .asFunction)>(); - - /// @brief Sets the display brightness value. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/display - /// @param[in] display_index The index of the display \n - /// It can be greater than or equal to @c 0 and less than the number of displays returned by device_display_get_numbers(). \n - /// The index zero is always assigned to the main display - /// @param[in] brightness The new brightness value to set \n - /// The maximum value can be represented by device_display_get_max_brightness() - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @see device_display_get_numbers() - /// @see device_display_get_max_brightness() - /// @see device_display_get_brightness() - int device_display_set_brightness( - int display_index, - int brightness, - ) { - return _device_display_set_brightness( - display_index, - brightness, - ); - } - - late final _device_display_set_brightnessPtr = - _lookup>( - 'device_display_set_brightness'); - late final _device_display_set_brightness = - _device_display_set_brightnessPtr.asFunction(); - - /// @brief Gets the current display state. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[out] state The display state - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @see device_add_callback - /// @see device_remove_callback - /// @see #DEVICE_CALLBACK_DISPLAY_STATE - int device_display_get_state( - ffi.Pointer state, - ) { - return _device_display_get_state( - state, - ); - } - - late final _device_display_get_statePtr = - _lookup)>>( - 'device_display_get_state'); - late final _device_display_get_state = _device_display_get_statePtr - .asFunction)>(); - - /// @deprecated Deprecated Since @if WEARABLE 3.0 @else 2.4 @endif - /// @brief Changes the display state by force. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/display - /// @remarks This API triggers display change process and then updates the status when it completes. While the operation is on-going, the device_display_get_state() function returns previous display state. - /// @param[in] state The display state - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @see device_power_request_lock() - /// @see device_power_release_lock() - /// @see device_add_callback - /// @see device_remove_callback - /// @see #DEVICE_CALLBACK_DISPLAY_STATE - /// - /// @par Example - /// @code - /// ... - /// result = device_display_change_state(DISPLAY_STATE_SCREEN_OFF); - /// if (result < 0) - /// dlog_print(DLOG_ERROR, LOG_TAG, "[ERROR] return value result =%d, \n",result); - /// else - /// dlog_print(DLOG_DEBUG, LOG_TAG, "[SUCCESS] return value result =%d \n",result); - /// ... - /// @endcode - int device_display_change_state( - int state, - ) { - return _device_display_change_state( - state, - ); - } - - late final _device_display_change_statePtr = - _lookup>( - 'device_display_change_state'); - late final _device_display_change_state = - _device_display_change_statePtr.asFunction(); - - /// @brief Gets the number of vibrators. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/haptic - /// @param[in] device_number The number of vibrators - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - int device_haptic_get_count( - ffi.Pointer device_number, - ) { - return _device_haptic_get_count( - device_number, - ); - } - - late final _device_haptic_get_countPtr = - _lookup)>>( - 'device_haptic_get_count'); - late final _device_haptic_get_count = _device_haptic_get_countPtr - .asFunction)>(); - - /// @brief Opens a haptic-vibration device. - /// @details Internally, it makes a connection to the vibrator. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/haptic - /// @remarks You must close the Haptic API using device_haptic_close(). - /// @param[in] device_index The index of device what you want to vibrate \n - /// The index starts from @c 0 - /// @param[out] device_handle The handle of vibrator - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - /// @see device_haptic_close() - int device_haptic_open( - int device_index, - ffi.Pointer device_handle, - ) { - return _device_haptic_open( - device_index, - device_handle, - ); - } - - late final _device_haptic_openPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer)>>('device_haptic_open'); - late final _device_haptic_open = _device_haptic_openPtr - .asFunction)>(); - - /// @brief Closes a haptic-vibration device. - /// @details Internally, it disconnects the connection to the vibrator. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/haptic - /// @param[in] device_handle The device handle from device_haptic_open() - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - /// @see device_haptic_open() - int device_haptic_close( - haptic_device_h device_handle, - ) { - return _device_haptic_close( - device_handle, - ); - } - - late final _device_haptic_closePtr = - _lookup>( - 'device_haptic_close'); - late final _device_haptic_close = - _device_haptic_closePtr.asFunction(); - - /// @brief Vibrates during the specified time with a constant intensity. - /// @details This function can be used to start monotonous vibration for the specified time. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/haptic - /// @remarks @a feedback level is reserved for auto changing to save variable in the settings. - /// @remarks @a effect_handle effect_handle value can be @c 0(zero). - /// @param[in] device_handle The device handle from device_haptic_open() - /// @param[in] duration The play duration in milliseconds - /// @param[in] feedback The amount of the intensity variation (@c 0 ~ @c 100) - /// @param[out] effect_handle The pointer to the variable that will receive a handle to the playing effect - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - /// @see device_haptic_stop() - int device_haptic_vibrate( - haptic_device_h device_handle, - int duration, - int feedback, - ffi.Pointer effect_handle, - ) { - return _device_haptic_vibrate( - device_handle, - duration, - feedback, - effect_handle, - ); - } - - late final _device_haptic_vibratePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(haptic_device_h, ffi.Int, ffi.Int, - ffi.Pointer)>>('device_haptic_vibrate'); - late final _device_haptic_vibrate = _device_haptic_vibratePtr.asFunction< - int Function(haptic_device_h, int, int, ffi.Pointer)>(); - - /// @brief Stops all vibration effects which are being played. - /// @details This function can be used to stop all effects started by device_haptic_vibrate(). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/haptic - /// @param[in] device_handle The device handle from device_haptic_open() - /// @param[in] effect_handle The effect handle from device_haptic_vibrate() - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - /// @see device_haptic_vibrate() - int device_haptic_stop( - haptic_device_h device_handle, - haptic_effect_h effect_handle, - ) { - return _device_haptic_stop( - device_handle, - effect_handle, - ); - } - - late final _device_haptic_stopPtr = _lookup< - ffi - .NativeFunction>( - 'device_haptic_stop'); - late final _device_haptic_stop = _device_haptic_stopPtr - .asFunction(); - - /// @brief Gets the information whether IR module is available. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/use_ir - /// @param[out] available The information whether IR is available - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - int device_ir_is_available( - ffi.Pointer available, - ) { - return _device_ir_is_available( - available, - ); - } - - late final _device_ir_is_availablePtr = - _lookup)>>( - 'device_ir_is_available'); - late final _device_ir_is_available = _device_ir_is_availablePtr - .asFunction)>(); - - /// @brief Transmits IR command. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/use_ir - /// @param[in] carrier_frequency Carrier frequency to transmit IR command (Hertz) - /// @param[in] pattern Integer array of IR command - /// @param[in] size Size of IR command pattern - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - int device_ir_transmit( - int carrier_frequency, - ffi.Pointer pattern, - int size, - ) { - return _device_ir_transmit( - carrier_frequency, - pattern, - size, - ); - } - - late final _device_ir_transmitPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Int)>>('device_ir_transmit'); - late final _device_ir_transmit = _device_ir_transmitPtr - .asFunction, int)>(); - - /// @brief Gets the max brightness value of a LED that is located next to the camera. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/led - /// @remarks This API is related to the following feature: %http://tizen.org/feature/camera.back.flash - /// @param[out] max_brightness The max brightness value of the LED - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - int device_flash_get_max_brightness( - ffi.Pointer max_brightness, - ) { - return _device_flash_get_max_brightness( - max_brightness, - ); - } - - late final _device_flash_get_max_brightnessPtr = - _lookup)>>( - 'device_flash_get_max_brightness'); - late final _device_flash_get_max_brightness = - _device_flash_get_max_brightnessPtr - .asFunction)>(); - - /// @brief Gets the brightness value of a LED that is located next to the camera. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/led - /// @remarks This API is related to the following feature: %http://tizen.org/feature/camera.back.flash - /// @param[out] brightness The brightness value of LED (@c 0 ~ MAX) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - int device_flash_get_brightness( - ffi.Pointer brightness, - ) { - return _device_flash_get_brightness( - brightness, - ); - } - - late final _device_flash_get_brightnessPtr = - _lookup)>>( - 'device_flash_get_brightness'); - late final _device_flash_get_brightness = _device_flash_get_brightnessPtr - .asFunction)>(); - - /// @brief Sets the brightness value of a LED that is located next to the camera. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/led - /// @remarks Since @if Mobile 2.4 @elseif WEARABLE 3.0 @endif, this API check camera flash status whether camera API preempted flash or not, so it could be failed if flash was preempted by camera API. In this case, API will return #DEVICE_ERROR_RESOURCE_BUSY error. - /// This API is related to the following feature: %http://tizen.org/feature/camera.back.flash - /// @param[in] brightness The brightness value of LED (@c 0 ~ MAX) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - /// @retval #DEVICE_ERROR_RESOURCE_BUSY Device or resource busy - int device_flash_set_brightness( - int brightness, - ) { - return _device_flash_set_brightness( - brightness, - ); - } - - late final _device_flash_set_brightnessPtr = - _lookup>( - 'device_flash_set_brightness'); - late final _device_flash_set_brightness = - _device_flash_set_brightnessPtr.asFunction(); - - /// @brief Plays the custom effect of the service LED that is located to the front of a device. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/led - /// @remarks This API is related to the following feature: %http://tizen.org/feature/led - /// @param[in] on Turn on time in milliseconds - /// @param[in] off Turn off time in milliseconds - /// @param[in] color The Color value \n - /// The first byte means opaque and the other 3 bytes are RGB values - /// @param[in] flags The combination of enum #led_custom_flags - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - int device_led_play_custom( - int on1, - int off, - int color, - int flags, - ) { - return _device_led_play_custom( - on1, - off, - color, - flags, - ); - } - - late final _device_led_play_customPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Int, ffi.UnsignedInt, - ffi.UnsignedInt)>>('device_led_play_custom'); - late final _device_led_play_custom = - _device_led_play_customPtr.asFunction(); - - /// @brief Stops the custom effect of the service LED that is located to the front of a device. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/led - /// @remarks This API is related to the following feature: %http://tizen.org/feature/led - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - int device_led_stop_custom() { - return _device_led_stop_custom(); - } - - late final _device_led_stop_customPtr = - _lookup>('device_led_stop_custom'); - late final _device_led_stop_custom = - _device_led_stop_customPtr.asFunction(); - - /// @brief Locks the given lock state for a specified time. - /// @details After the given @a timeout_ms (in milliseconds), unlock the given lock state automatically. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/display - /// @remarks If the process dies, then every lock will be removed. - /// @param[in] type The power type to request lock - /// @param[in] timeout_ms The positive number in milliseconds or @c 0 for permanent lock \n - /// So you must release the permanent lock of power state with #device_power_release_lock() if @a timeout_ms is zero - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @see device_power_release_lock() - int device_power_request_lock( - int type, - int timeout_ms, - ) { - return _device_power_request_lock( - type, - timeout_ms, - ); - } - - late final _device_power_request_lockPtr = - _lookup>( - 'device_power_request_lock'); - late final _device_power_request_lock = - _device_power_request_lockPtr.asFunction(); - - /// @brief Releases the given lock state which was locked before. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/display - /// @param[in] type The power type to release lock - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @see device_power_request_lock() - int device_power_release_lock( - int type, - ) { - return _device_power_release_lock( - type, - ); - } - - late final _device_power_release_lockPtr = - _lookup>( - 'device_power_release_lock'); - late final _device_power_release_lock = - _device_power_release_lockPtr.asFunction(); - - /// @deprecated Deprecated Since @if WEARABLE 3.0 @else 2.4 @endif - /// @brief Changes the current power state to the normal/dim state. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/display - /// @remarks This API triggers turn on process and then updates the status when it completes. While the operation is on-going, the device_display_get_state() function returns previous display state. - /// @param[in] dim Set @c true to set the dim state, - /// otherwise set @c false to not set the dim state - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @post The device will be in #DISPLAY_STATE_NORMAL state. - int device_power_wakeup( - bool dim, - ) { - return _device_power_wakeup( - dim, - ); - } - - late final _device_power_wakeupPtr = - _lookup>( - 'device_power_wakeup'); - late final _device_power_wakeup = - _device_power_wakeupPtr.asFunction(); - - /// @platform - /// @brief Reboots the device. - /// @details Will not return if the reboot is successful. \n - /// It operates asynchronously. - /// @since_tizen 2.3.1 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/reboot - /// @param[in] reason Pass to the platform and kernel to request special reboot reason, or null - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - int device_power_reboot( - ffi.Pointer reason, - ) { - return _device_power_reboot( - reason, - ); - } - - late final _device_power_rebootPtr = - _lookup)>>( - 'device_power_reboot'); - late final _device_power_reboot = - _device_power_rebootPtr.asFunction)>(); - - /// @brief Sends log with priority and tag. - /// @details for application. - /// @if MOBILE @since_tizen 2.3 @elseif WEARABLE @since_tizen 2.3.1 @endif - /// @param[in] prio priority level of type #log_priority - /// @param[in] tag tag - a null-terminated string - /// @param[in] fmt format string - same as printf - /// @return On success, the function returns the number of bytes written. - /// On error, a negative errno-style error code - /// @retval #DLOG_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DLOG_ERROR_NOT_PERMITTED Operation not permitted - /// @pre none - /// @post none - /// @see dlog_vprint - /// - /// @code - /// #include - /// int main(void) - /// { - /// int integer = 21; - /// char string[] = "test dlog"; - /// - /// dlog_print(DLOG_INFO, "USR_TAG", "test dlog"); - /// dlog_print(DLOG_INFO, "USR_TAG", "%s, %d", string, integer); - /// return 0; - /// } - /// @endcode - int dlog_print( - int prio, - ffi.Pointer tag, - ffi.Pointer fmt, - ) { - return _dlog_print( - prio, - tag, - fmt, - ); - } - - late final _dlog_printPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer, - ffi.Pointer)>>('dlog_print'); - late final _dlog_print = _dlog_printPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sends log with priority, tag, and va_list. - /// @details for application. - /// @if MOBILE @since_tizen 2.3 @elseif WEARABLE @since_tizen 2.3.1 @endif - /// @param[in] prio priority level of type #log_priority - /// @param[in] tag tag - a null-terminated string - /// @param[in] fmt format string - same as printf - /// @param[in] ap va_list - /// @return On success, the function returns the number of bytes written. - /// On error, a negative errno-style error code - /// @retval #DLOG_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DLOG_ERROR_NOT_PERMITTED Operation not permitted - /// @pre none - /// @post none - /// @see dlog_print - /// - /// @code - /// #include - /// void my_debug_print(char *format, ...) - /// { - /// va_list ap; - /// - /// va_start(ap, format); - /// dlog_vprint(DLOG_INFO, "USR_TAG", format, ap); - /// va_end(ap); - /// } - /// - /// int main(void) - /// { - /// my_debug_print("%s", "test dlog"); - /// my_debug_print("%s, %d", "test dlog", 21); - /// return 0; - /// } - /// @endcode - int dlog_vprint( - int prio, - ffi.Pointer tag, - ffi.Pointer fmt, - va_list ap, - ) { - return _dlog_vprint( - prio, - tag, - fmt, - ap, - ); - } - - late final _dlog_vprintPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer, - ffi.Pointer, va_list)>>('dlog_vprint'); - late final _dlog_vprint = _dlog_vprintPtr.asFunction< - int Function( - int, ffi.Pointer, ffi.Pointer, va_list)>(); - - /// @brief Initializes feedback API. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks If this function is not called in advance, other function will return #FEEDBACK_ERROR_NOT_INITIALIZED. - /// And for controlling haptic device, the privilege should be set to, %http://tizen.org/privilege/haptic. - /// If you don't have the haptic privilege, this function initializes only sound. - /// It does not return any error in this case. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FEEDBACK_ERROR_NONE Successful - /// @post feedback_deinitialize() - /// @see feedback_deinitialize() - int feedback_initialize() { - return _feedback_initialize(); - } - - late final _feedback_initializePtr = - _lookup>('feedback_initialize'); - late final _feedback_initialize = - _feedback_initializePtr.asFunction(); - - /// @brief Deinitializes feedback API. - /// @details This function must be called when feedback functions are no longer needed. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks If you don't want to use feedback anymore, you need to deinitialize with this function. - /// And for controlling haptic device, the privilege should be set to, %http://tizen.org/privilege/haptic. - /// If you don't have the haptic privilege, this function deinitializes only sound. - /// It does not return any error in this case. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FEEDBACK_ERROR_NONE Successful - /// @retval #FEEDBACK_ERROR_NOT_INITIALIZED Not initialized - /// @pre feedback_initialize() - /// @see feedback_initialize() - int feedback_deinitialize() { - return _feedback_deinitialize(); - } - - late final _feedback_deinitializePtr = - _lookup>('feedback_deinitialize'); - late final _feedback_deinitialize = - _feedback_deinitializePtr.asFunction(); - - /// @brief Plays various types of reactions that are pre-defined. - /// @details This function can be used to react to pre-defined actions. \n - /// It play various types of system pre-defined media or vibration patterns. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks Currently, there are two types of reactions: sound and vibration. \n - /// Depending on the settings, some types cannot operate. - /// For example, when set to silent mode, the device doesn't produce any sound. - /// If to play one of the devices is successful, this function regards as success. - /// And for controlling haptic device, the privilege should be set to, %http://tizen.org/privilege/haptic. - /// If you don't have the haptic privilege, it only works sound operation. - /// It does not return any error in this case. - /// @param[in] pattern The pre-defined pattern - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FEEDBACK_ERROR_NONE Successful - /// @retval #FEEDBACK_ERROR_OPERATION_FAILED Operation not permitted - /// @retval #FEEDBACK_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #FEEDBACK_ERROR_NOT_SUPPORTED Not supported device - /// @retval #FEEDBACK_ERROR_NOT_INITIALIZED Not initialized - /// @pre feedback_initialize() - int feedback_play( - int pattern, - ) { - return _feedback_play( - pattern, - ); - } - - late final _feedback_playPtr = - _lookup>('feedback_play'); - late final _feedback_play = _feedback_playPtr.asFunction(); - - /// @brief Plays specific type of reactions that are pre-defined. - /// @details This function can be used to react to pre-defined actions. \n - /// It play specific type of system pre-defined pattern. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks Currently, there are two types of reactions: sound and vibration. \n - /// Depending on the settings, some types cannot operate. - /// For example, when set to silent mode, the device doesn't produce any sound. - /// And for controlling haptic device, the privilege should be set to, %http://tizen.org/privilege/haptic. - /// If you don't have the haptic privilege, it returns FEEDBACK_ERROR_PERMISSION_DENIED error. - /// @param[in] type The pattern type - /// @param[in] pattern The pre-defined pattern - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FEEDBACK_ERROR_NONE Successful - /// @retval #FEEDBACK_ERROR_OPERATION_FAILED Operation not permitted - /// @retval #FEEDBACK_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #FEEDBACK_ERROR_NOT_SUPPORTED Not supported device - /// @retval #FEEDBACK_ERROR_PERMISSION_DENIED Permission denied - /// @retval #FEEDBACK_ERROR_NOT_INITIALIZED Not initialized - /// @pre feedback_initialize() - int feedback_play_type( - int type, - int pattern, - ) { - return _feedback_play_type( - type, - pattern, - ); - } - - late final _feedback_play_typePtr = - _lookup>( - 'feedback_play_type'); - late final _feedback_play_type = - _feedback_play_typePtr.asFunction(); - - /// @brief Stops various types of reactions. - /// @details This function can be used to stop reaction to pre-defined actions. \n - /// It stops system pre-defined vibration patterns. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks This function does not support to stop media sound actions. \n - /// In this case, it will return FEEDBACK_ERROR_NOT_SUPPORTED error. - /// And for controlling haptic device, the privilege should be set to, %http://tizen.org/privilege/haptic. - /// If you don't have the haptic privilege, it only works sound operation. - /// It does not return any error in this case. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FEEDBACK_ERROR_NONE Successful - /// @retval #FEEDBACK_ERROR_OPERATION_FAILED Operation not permitted - /// @retval #FEEDBACK_ERROR_NOT_SUPPORTED Not supported device - /// @retval #FEEDBACK_ERROR_PERMISSION_DENIED Permission denied - /// @retval #FEEDBACK_ERROR_NOT_INITIALIZED Not initialized - /// @pre feedback_initialize() - int feedback_stop() { - return _feedback_stop(); - } - - late final _feedback_stopPtr = - _lookup>('feedback_stop'); - late final _feedback_stop = _feedback_stopPtr.asFunction(); - - /// @brief Checks if the pattern is supported. - /// @details This function can be used to check if a specific pattern is supported. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] type The pattern type - /// @param[in] pattern The pre-defined pattern - /// @param[out] status True means the pattern is supported, - /// otherwise not supported - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FEEDBACK_ERROR_NONE Successful - /// @retval #FEEDBACK_ERROR_OPERATION_FAILED Operation not permitted - /// @retval #FEEDBACK_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #FEEDBACK_ERROR_NOT_SUPPORTED Not supported device - /// @retval #FEEDBACK_ERROR_NOT_INITIALIZED Not initialized - /// @pre feedback_initialize() - int feedback_is_supported_pattern( - int type, - int pattern, - ffi.Pointer status, - ) { - return _feedback_is_supported_pattern( - type, - pattern, - status, - ); - } - - late final _feedback_is_supported_patternPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Int32, - ffi.Pointer)>>('feedback_is_supported_pattern'); - late final _feedback_is_supported_pattern = _feedback_is_supported_patternPtr - .asFunction)>(); - - /// @brief Registers a change event callback for all media keys. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_KEY_ERROR_NONE Successful - /// @retval #MEDIA_KEY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_KEY_ERROR_OPERATION_FAILED Reserve key failed - /// @see media_key_release() - int media_key_reserve( - media_key_event_cb callback, - ffi.Pointer user_data, - ) { - return _media_key_reserve( - callback, - user_data, - ); - } - - late final _media_key_reservePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_key_event_cb, ffi.Pointer)>>('media_key_reserve'); - late final _media_key_reserve = _media_key_reservePtr - .asFunction)>(); - - /// @brief Unregisters the change event callback function. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_KEY_ERROR_NONE Successful - /// @retval #MEDIA_KEY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_KEY_ERROR_OPERATION_FAILED Release key failed - /// @see media_key_reserve() - int media_key_release() { - return _media_key_release(); - } - - late final _media_key_releasePtr = - _lookup>('media_key_release'); - late final _media_key_release = - _media_key_releasePtr.asFunction(); - - /// @platform - /// @brief Opens a GPIO pin. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// @remarks @a gpio should be released with peripheral_gpio_close() - /// - /// @param[in] gpio_pin The GPIO pin number - /// @param[out] gpio The GPIO handle is created on success - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_OUT_OF_MEMORY Memory allocation failed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_RESOURCE_BUSY Device is in use - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @post peripheral_gpio_close() - int peripheral_gpio_open( - int gpio_pin, - ffi.Pointer gpio, - ) { - return _peripheral_gpio_open( - gpio_pin, - gpio, - ); - } - - late final _peripheral_gpio_openPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, - ffi.Pointer)>>('peripheral_gpio_open'); - late final _peripheral_gpio_open = _peripheral_gpio_openPtr - .asFunction)>(); - - /// @platform - /// @brief Closes a GPIO pin. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] gpio The GPIO handle - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @pre peripheral_gpio_open() - int peripheral_gpio_close( - peripheral_gpio_h gpio, - ) { - return _peripheral_gpio_close( - gpio, - ); - } - - late final _peripheral_gpio_closePtr = - _lookup>( - 'peripheral_gpio_close'); - late final _peripheral_gpio_close = - _peripheral_gpio_closePtr.asFunction(); - - /// @platform - /// @brief Sets the GPIO direction. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] gpio The GPIO handle - /// @param[in] direction The direction of the GPIO pin - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_gpio_direction_e - int peripheral_gpio_set_direction( - peripheral_gpio_h gpio, - int direction, - ) { - return _peripheral_gpio_set_direction( - gpio, - direction, - ); - } - - late final _peripheral_gpio_set_directionPtr = _lookup< - ffi.NativeFunction>( - 'peripheral_gpio_set_direction'); - late final _peripheral_gpio_set_direction = _peripheral_gpio_set_directionPtr - .asFunction(); - - /// @platform - /// @brief Sets the GPIO edge mode. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] gpio The GPIO handle - /// @param[in] edge The edge mode of the GPIO pin - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_gpio_edge_e - int peripheral_gpio_set_edge_mode( - peripheral_gpio_h gpio, - int edge, - ) { - return _peripheral_gpio_set_edge_mode( - gpio, - edge, - ); - } - - late final _peripheral_gpio_set_edge_modePtr = _lookup< - ffi.NativeFunction>( - 'peripheral_gpio_set_edge_mode'); - late final _peripheral_gpio_set_edge_mode = _peripheral_gpio_set_edge_modePtr - .asFunction(); - - /// @platform - /// @brief Sets the GPIO interrupted callback to be invoked when the GPIO interrupt is triggered. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] gpio The GPIO handle - /// @param[in] callback The GPIO interrupted callback function to set - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// - /// @post peripheral_gpio_unset_interrupted_cb() - /// @see peripheral_gpio_set_edge_mode() - int peripheral_gpio_set_interrupted_cb( - peripheral_gpio_h gpio, - peripheral_gpio_interrupted_cb callback, - ffi.Pointer user_data, - ) { - return _peripheral_gpio_set_interrupted_cb( - gpio, - callback, - user_data, - ); - } - - late final _peripheral_gpio_set_interrupted_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_gpio_h, peripheral_gpio_interrupted_cb, - ffi.Pointer)>>('peripheral_gpio_set_interrupted_cb'); - late final _peripheral_gpio_set_interrupted_cb = - _peripheral_gpio_set_interrupted_cbPtr.asFunction< - int Function(peripheral_gpio_h, peripheral_gpio_interrupted_cb, - ffi.Pointer)>(); - - /// @platform - /// @brief Unsets the GPIO interrupted callback. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] gpio The GPIO handle - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre peripheral_gpio_set_interrupted_cb() - int peripheral_gpio_unset_interrupted_cb( - peripheral_gpio_h gpio, - ) { - return _peripheral_gpio_unset_interrupted_cb( - gpio, - ); - } - - late final _peripheral_gpio_unset_interrupted_cbPtr = - _lookup>( - 'peripheral_gpio_unset_interrupted_cb'); - late final _peripheral_gpio_unset_interrupted_cb = - _peripheral_gpio_unset_interrupted_cbPtr - .asFunction(); - - /// @platform - /// @brief Gets the current value of the GPIO pin. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] gpio The GPIO handle - /// @param[out] value The value to get - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_gpio_write() - int peripheral_gpio_read( - peripheral_gpio_h gpio, - ffi.Pointer value, - ) { - return _peripheral_gpio_read( - gpio, - value, - ); - } - - late final _peripheral_gpio_readPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_gpio_h, - ffi.Pointer)>>('peripheral_gpio_read'); - late final _peripheral_gpio_read = _peripheral_gpio_readPtr - .asFunction)>(); - - /// @platform - /// @brief Sets the value of the GPIO pin. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] gpio The GPIO handle - /// @param[in] value The value to set (must be 0 or 1) - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_gpio_read() - int peripheral_gpio_write( - peripheral_gpio_h gpio, - int value, - ) { - return _peripheral_gpio_write( - gpio, - value, - ); - } - - late final _peripheral_gpio_writePtr = _lookup< - ffi.NativeFunction>( - 'peripheral_gpio_write'); - late final _peripheral_gpio_write = _peripheral_gpio_writePtr - .asFunction(); - - /// @platform - /// @brief Opens an I2C slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// @remarks @a i2c should be released with peripheral_i2c_close() - /// - /// @param[in] bus The I2C bus number that the slave device is connected - /// @param[in] address The address of the slave device - /// @param[out] i2c The I2C handle is created on success - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_OUT_OF_MEMORY Memory allocation failed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_RESOURCE_BUSY Device is in use - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @post peripheral_i2c_close() - int peripheral_i2c_open( - int bus, - int address, - ffi.Pointer i2c, - ) { - return _peripheral_i2c_open( - bus, - address, - i2c, - ); - } - - late final _peripheral_i2c_openPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Int, - ffi.Pointer)>>('peripheral_i2c_open'); - late final _peripheral_i2c_open = _peripheral_i2c_openPtr - .asFunction)>(); - - /// @platform - /// @brief Closes an I2C slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] i2c The I2C handle - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @pre peripheral_i2c_open() - int peripheral_i2c_close( - peripheral_i2c_h i2c, - ) { - return _peripheral_i2c_close( - i2c, - ); - } - - late final _peripheral_i2c_closePtr = - _lookup>( - 'peripheral_i2c_close'); - late final _peripheral_i2c_close = - _peripheral_i2c_closePtr.asFunction(); - - /// @platform - /// @brief Reads the bytes data from the I2C slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] i2c The I2C handle - /// @param[out] data The data buffer to read - /// @param[in] length The size of data buffer (in bytes) - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_i2c_write() - int peripheral_i2c_read( - peripheral_i2c_h i2c, - ffi.Pointer data, - int length, - ) { - return _peripheral_i2c_read( - i2c, - data, - length, - ); - } - - late final _peripheral_i2c_readPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_i2c_h, ffi.Pointer, - ffi.Uint32)>>('peripheral_i2c_read'); - late final _peripheral_i2c_read = _peripheral_i2c_readPtr.asFunction< - int Function(peripheral_i2c_h, ffi.Pointer, int)>(); - - /// @platform - /// @brief Writes the bytes data to the I2C slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] i2c The I2C handle - /// @param[in] data The data buffer to write - /// @param[in] length The size of data buffer (in bytes) - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_i2c_read() - int peripheral_i2c_write( - peripheral_i2c_h i2c, - ffi.Pointer data, - int length, - ) { - return _peripheral_i2c_write( - i2c, - data, - length, - ); - } - - late final _peripheral_i2c_writePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_i2c_h, ffi.Pointer, - ffi.Uint32)>>('peripheral_i2c_write'); - late final _peripheral_i2c_write = _peripheral_i2c_writePtr.asFunction< - int Function(peripheral_i2c_h, ffi.Pointer, int)>(); - - /// @platform - /// @brief Reads single byte data from the register of the I2C slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] i2c The I2C handle - /// @param[in] reg The register address of the I2C slave device to read - /// @param[out] data The single byte data to read - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_i2c_write_register_byte() - int peripheral_i2c_read_register_byte( - peripheral_i2c_h i2c, - int reg, - ffi.Pointer data, - ) { - return _peripheral_i2c_read_register_byte( - i2c, - reg, - data, - ); - } - - late final _peripheral_i2c_read_register_bytePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_i2c_h, ffi.Uint8, - ffi.Pointer)>>('peripheral_i2c_read_register_byte'); - late final _peripheral_i2c_read_register_byte = - _peripheral_i2c_read_register_bytePtr.asFunction< - int Function(peripheral_i2c_h, int, ffi.Pointer)>(); - - /// @platform - /// @brief Writes single byte data to the register of the I2C slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] i2c The I2C handle - /// @param[in] reg The register address of the I2C slave device to write - /// @param[in] data The single byte data to write - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_i2c_read_register_byte() - int peripheral_i2c_write_register_byte( - peripheral_i2c_h i2c, - int reg, - int data, - ) { - return _peripheral_i2c_write_register_byte( - i2c, - reg, - data, - ); - } - - late final _peripheral_i2c_write_register_bytePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_i2c_h, ffi.Uint8, - ffi.Uint8)>>('peripheral_i2c_write_register_byte'); - late final _peripheral_i2c_write_register_byte = - _peripheral_i2c_write_register_bytePtr - .asFunction(); - - /// @platform - /// @brief Reads word data from the register of the I2C slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] i2c The I2C handle - /// @param[in] reg The register address of the I2C slave device to read - /// @param[out] data The word(2 bytes) data to read - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_i2c_write_register_word() - int peripheral_i2c_read_register_word( - peripheral_i2c_h i2c, - int reg, - ffi.Pointer data, - ) { - return _peripheral_i2c_read_register_word( - i2c, - reg, - data, - ); - } - - late final _peripheral_i2c_read_register_wordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_i2c_h, ffi.Uint8, - ffi.Pointer)>>('peripheral_i2c_read_register_word'); - late final _peripheral_i2c_read_register_word = - _peripheral_i2c_read_register_wordPtr.asFunction< - int Function(peripheral_i2c_h, int, ffi.Pointer)>(); - - /// @platform - /// @brief Writes word data to the register of the I2C slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] i2c The I2C handle - /// @param[in] reg The register address of the I2C slave device to write - /// @param[in] data The word(2 bytes) data to write - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_i2c_read_register_word() - int peripheral_i2c_write_register_word( - peripheral_i2c_h i2c, - int reg, - int data, - ) { - return _peripheral_i2c_write_register_word( - i2c, - reg, - data, - ); - } - - late final _peripheral_i2c_write_register_wordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_i2c_h, ffi.Uint8, - ffi.Uint16)>>('peripheral_i2c_write_register_word'); - late final _peripheral_i2c_write_register_word = - _peripheral_i2c_write_register_wordPtr - .asFunction(); - - /// @platform - /// @brief Opens the PWM pin. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// @remarks @a pwm should be released with peripheral_pwm_close() - /// - /// @param[in] chip The PWM chip number - /// @param[in] pin The PWM pin(channel) number to control - /// @param[out] pwm The PWM handle is created on success - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_OUT_OF_MEMORY Memory allocation failed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_RESOURCE_BUSY Device is in use - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @post peripheral_pwm_close() - int peripheral_pwm_open( - int chip, - int pin, - ffi.Pointer pwm, - ) { - return _peripheral_pwm_open( - chip, - pin, - pwm, - ); - } - - late final _peripheral_pwm_openPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Int, - ffi.Pointer)>>('peripheral_pwm_open'); - late final _peripheral_pwm_open = _peripheral_pwm_openPtr - .asFunction)>(); - - /// @platform - /// @brief Closes the PWM pin. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] pwm The PWM handle - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @pre peripheral_pwm_open() - int peripheral_pwm_close( - peripheral_pwm_h pwm, - ) { - return _peripheral_pwm_close( - pwm, - ); - } - - late final _peripheral_pwm_closePtr = - _lookup>( - 'peripheral_pwm_close'); - late final _peripheral_pwm_close = - _peripheral_pwm_closePtr.asFunction(); - - /// @platform - /// @brief Sets period of the PWM pin. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] pwm The PWM handle - /// @param[in] period_ns The total period of the PWM pin (in nanoseconds) - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - int peripheral_pwm_set_period( - peripheral_pwm_h pwm, - int period_ns, - ) { - return _peripheral_pwm_set_period( - pwm, - period_ns, - ); - } - - late final _peripheral_pwm_set_periodPtr = _lookup< - ffi.NativeFunction>( - 'peripheral_pwm_set_period'); - late final _peripheral_pwm_set_period = _peripheral_pwm_set_periodPtr - .asFunction(); - - /// @platform - /// @brief Sets duty cycle of the PWM pin. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] pwm The PWM handle - /// @param[in] duty_cycle_ns The duty cycle of the PWM pin (in nanoseconds) - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - int peripheral_pwm_set_duty_cycle( - peripheral_pwm_h pwm, - int duty_cycle_ns, - ) { - return _peripheral_pwm_set_duty_cycle( - pwm, - duty_cycle_ns, - ); - } - - late final _peripheral_pwm_set_duty_cyclePtr = _lookup< - ffi.NativeFunction>( - 'peripheral_pwm_set_duty_cycle'); - late final _peripheral_pwm_set_duty_cycle = _peripheral_pwm_set_duty_cyclePtr - .asFunction(); - - /// @platform - /// @brief Sets polarity of the PWM pin. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] pwm The PWM handle - /// @param[in] polarity The polarity of the PWM pin - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_pwm_polarity_e - int peripheral_pwm_set_polarity( - peripheral_pwm_h pwm, - int polarity, - ) { - return _peripheral_pwm_set_polarity( - pwm, - polarity, - ); - } - - late final _peripheral_pwm_set_polarityPtr = _lookup< - ffi.NativeFunction>( - 'peripheral_pwm_set_polarity'); - late final _peripheral_pwm_set_polarity = _peripheral_pwm_set_polarityPtr - .asFunction(); - - /// @platform - /// @brief Enables the PWM pin. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] pwm The PWM handle - /// @param[in] enabled Enable/disable the PWM pin - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - int peripheral_pwm_set_enabled( - peripheral_pwm_h pwm, - bool enabled, - ) { - return _peripheral_pwm_set_enabled( - pwm, - enabled, - ); - } - - late final _peripheral_pwm_set_enabledPtr = - _lookup>( - 'peripheral_pwm_set_enabled'); - late final _peripheral_pwm_set_enabled = _peripheral_pwm_set_enabledPtr - .asFunction(); - - /// @platform - /// @brief Opens the UART slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// @remarks @a uart should be released with peripheral_uart_close() - /// - /// @param[in] port The UART port number that the slave device is connected - /// @param[out] uart The UART handle is created on success - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_OUT_OF_MEMORY Memory allocation failed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_RESOURCE_BUSY Device is in use - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @post peripheral_uart_close() - int peripheral_uart_open( - int port, - ffi.Pointer uart, - ) { - return _peripheral_uart_open( - port, - uart, - ); - } - - late final _peripheral_uart_openPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, - ffi.Pointer)>>('peripheral_uart_open'); - late final _peripheral_uart_open = _peripheral_uart_openPtr - .asFunction)>(); - - /// @platform - /// @brief Closes the UART slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] uart The UART handle - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @pre peripheral_uart_open() - int peripheral_uart_close( - peripheral_uart_h uart, - ) { - return _peripheral_uart_close( - uart, - ); - } - - late final _peripheral_uart_closePtr = - _lookup>( - 'peripheral_uart_close'); - late final _peripheral_uart_close = - _peripheral_uart_closePtr.asFunction(); - - /// @platform - /// @brief Sets baud rate of the UART slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] uart The UART handle - /// @param[in] baud Baud rate of the UART slave device - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_uart_baud_rate_e - int peripheral_uart_set_baud_rate( - peripheral_uart_h uart, - int baud, - ) { - return _peripheral_uart_set_baud_rate( - uart, - baud, - ); - } - - late final _peripheral_uart_set_baud_ratePtr = _lookup< - ffi.NativeFunction>( - 'peripheral_uart_set_baud_rate'); - late final _peripheral_uart_set_baud_rate = _peripheral_uart_set_baud_ratePtr - .asFunction(); - - /// @platform - /// @brief Sets byte size of the UART slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] uart The UART handle - /// @param[in] byte_size Byte size of the UART slave device - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_uart_byte_size_e - int peripheral_uart_set_byte_size( - peripheral_uart_h uart, - int byte_size, - ) { - return _peripheral_uart_set_byte_size( - uart, - byte_size, - ); - } - - late final _peripheral_uart_set_byte_sizePtr = _lookup< - ffi.NativeFunction>( - 'peripheral_uart_set_byte_size'); - late final _peripheral_uart_set_byte_size = _peripheral_uart_set_byte_sizePtr - .asFunction(); - - /// @platform - /// @brief Sets parity bit of the UART slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] uart The UART handle - /// @param[in] parity Parity bit of the UART slave device - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_uart_parity_e - int peripheral_uart_set_parity( - peripheral_uart_h uart, - int parity, - ) { - return _peripheral_uart_set_parity( - uart, - parity, - ); - } - - late final _peripheral_uart_set_parityPtr = _lookup< - ffi.NativeFunction>( - 'peripheral_uart_set_parity'); - late final _peripheral_uart_set_parity = _peripheral_uart_set_parityPtr - .asFunction(); - - /// @platform - /// @brief Sets stop bits of the UART slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] uart The UART handle - /// @param[in] stop_bits Stop bits of the UART slave device - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_uart_stop_bits_e - int peripheral_uart_set_stop_bits( - peripheral_uart_h uart, - int stop_bits, - ) { - return _peripheral_uart_set_stop_bits( - uart, - stop_bits, - ); - } - - late final _peripheral_uart_set_stop_bitsPtr = _lookup< - ffi.NativeFunction>( - 'peripheral_uart_set_stop_bits'); - late final _peripheral_uart_set_stop_bits = _peripheral_uart_set_stop_bitsPtr - .asFunction(); - - /// @platform - /// @brief Sets flow control of the UART slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] uart The UART handle - /// @param[in] sw_flow_control Software flow control (Turns a transmitter on or off) - /// @param[in] hw_flow_control Hardware flow control (Turns "Request to Send/Clear to Send" on or off) - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_uart_software_flow_control_e - /// @see peripheral_uart_hardware_flow_control_e - int peripheral_uart_set_flow_control( - peripheral_uart_h uart, - int sw_flow_control, - int hw_flow_control, - ) { - return _peripheral_uart_set_flow_control( - uart, - sw_flow_control, - hw_flow_control, - ); - } - - late final _peripheral_uart_set_flow_controlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_uart_h, ffi.Int32, - ffi.Int32)>>('peripheral_uart_set_flow_control'); - late final _peripheral_uart_set_flow_control = - _peripheral_uart_set_flow_controlPtr - .asFunction(); - - /// @platform - /// @brief Reads data from the UART slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] uart The UART handle - /// @param[out] data The buffer to read - /// @param[out] length The size of buffer (in bytes) - /// - /// @return the number of bytes read on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_TRY_AGAIN Try again - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_uart_write() - int peripheral_uart_read( - peripheral_uart_h uart, - ffi.Pointer data, - int length, - ) { - return _peripheral_uart_read( - uart, - data, - length, - ); - } - - late final _peripheral_uart_readPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_uart_h, ffi.Pointer, - ffi.Uint32)>>('peripheral_uart_read'); - late final _peripheral_uart_read = _peripheral_uart_readPtr.asFunction< - int Function(peripheral_uart_h, ffi.Pointer, int)>(); - - /// @platform - /// @brief Writes data to the UART slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] uart The UART handle - /// @param[in] data The buffer to write - /// @param[in] length The size of buffer (in bytes) - /// - /// @return the number of bytes write on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_TRY_AGAIN Try again - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_uart_read() - int peripheral_uart_write( - peripheral_uart_h uart, - ffi.Pointer data, - int length, - ) { - return _peripheral_uart_write( - uart, - data, - length, - ); - } - - late final _peripheral_uart_writePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_uart_h, ffi.Pointer, - ffi.Uint32)>>('peripheral_uart_write'); - late final _peripheral_uart_write = _peripheral_uart_writePtr.asFunction< - int Function(peripheral_uart_h, ffi.Pointer, int)>(); - - /// @platform - /// @brief Opens a SPI slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// @remarks @a spi should be released with peripheral_spi_close() - /// - /// @param[in] bus The SPI bus number - /// @param[in] cs The SPI chip select number - /// @param[out] spi The SPI slave device handle - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_OUT_OF_MEMORY Memory allocation failed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_RESOURCE_BUSY Device is in use - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @post peripheral_spi_close() - int peripheral_spi_open( - int bus, - int cs, - ffi.Pointer spi, - ) { - return _peripheral_spi_open( - bus, - cs, - spi, - ); - } - - late final _peripheral_spi_openPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Int, - ffi.Pointer)>>('peripheral_spi_open'); - late final _peripheral_spi_open = _peripheral_spi_openPtr - .asFunction)>(); - - /// @platform - /// @brief Closes the SPI slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] spi The SPI slave device handle - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_spi_open() - int peripheral_spi_close( - peripheral_spi_h spi, - ) { - return _peripheral_spi_close( - spi, - ); - } - - late final _peripheral_spi_closePtr = - _lookup>( - 'peripheral_spi_close'); - late final _peripheral_spi_close = - _peripheral_spi_closePtr.asFunction(); - - /// @platform - /// @brief Sets the SPI transfer mode. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] spi The SPI slave device handle - /// @param[in] mode The SPI transfer mode - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_spi_mode_e - int peripheral_spi_set_mode( - peripheral_spi_h spi, - int mode, - ) { - return _peripheral_spi_set_mode( - spi, - mode, - ); - } - - late final _peripheral_spi_set_modePtr = _lookup< - ffi.NativeFunction>( - 'peripheral_spi_set_mode'); - late final _peripheral_spi_set_mode = _peripheral_spi_set_modePtr - .asFunction(); - - /// @platform - /// @brief Sets the SPI bit order. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] spi The SPI slave device handle - /// @param[in] bit_order The transfer bit order - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_spi_bit_order_e - int peripheral_spi_set_bit_order( - peripheral_spi_h spi, - int bit_order, - ) { - return _peripheral_spi_set_bit_order( - spi, - bit_order, - ); - } - - late final _peripheral_spi_set_bit_orderPtr = _lookup< - ffi.NativeFunction>( - 'peripheral_spi_set_bit_order'); - late final _peripheral_spi_set_bit_order = _peripheral_spi_set_bit_orderPtr - .asFunction(); - - /// @platform - /// @brief Sets the number of bits per word. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] spi The SPI slave device handle - /// @param[in] bits The number of bits per word (in bits) - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - int peripheral_spi_set_bits_per_word( - peripheral_spi_h spi, - int bits, - ) { - return _peripheral_spi_set_bits_per_word( - spi, - bits, - ); - } - - late final _peripheral_spi_set_bits_per_wordPtr = _lookup< - ffi.NativeFunction>( - 'peripheral_spi_set_bits_per_word'); - late final _peripheral_spi_set_bits_per_word = - _peripheral_spi_set_bits_per_wordPtr - .asFunction(); - - /// @platform - /// @brief Sets the frequency of the SPI bus. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// @remarks The frequencies supported are board dependent. - /// - /// @param[in] spi The SPI slave device handle - /// @param[in] freq_hz Frequency to set (in Hz) - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - int peripheral_spi_set_frequency( - peripheral_spi_h spi, - int freq_hz, - ) { - return _peripheral_spi_set_frequency( - spi, - freq_hz, - ); - } - - late final _peripheral_spi_set_frequencyPtr = _lookup< - ffi.NativeFunction>( - 'peripheral_spi_set_frequency'); - late final _peripheral_spi_set_frequency = _peripheral_spi_set_frequencyPtr - .asFunction(); - - /// @platform - /// @brief Reads the bytes data from the SPI slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] spi The SPI slave device handle - /// @param[out] data The data buffer to read - /// @param[in] length The size of data buffer (in bytes) - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_spi_write() - int peripheral_spi_read( - peripheral_spi_h spi, - ffi.Pointer data, - int length, - ) { - return _peripheral_spi_read( - spi, - data, - length, - ); - } - - late final _peripheral_spi_readPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_spi_h, ffi.Pointer, - ffi.Uint32)>>('peripheral_spi_read'); - late final _peripheral_spi_read = _peripheral_spi_readPtr.asFunction< - int Function(peripheral_spi_h, ffi.Pointer, int)>(); - - /// @platform - /// @brief Writes the bytes data to the SPI slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] spi The SPI slave device handle - /// @param[in] data The data buffer to write - /// @param[in] length The size of data buffer (in bytes) - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_spi_read() - int peripheral_spi_write( - peripheral_spi_h spi, - ffi.Pointer data, - int length, - ) { - return _peripheral_spi_write( - spi, - data, - length, - ); - } - - late final _peripheral_spi_writePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_spi_h, ffi.Pointer, - ffi.Uint32)>>('peripheral_spi_write'); - late final _peripheral_spi_write = _peripheral_spi_writePtr.asFunction< - int Function(peripheral_spi_h, ffi.Pointer, int)>(); - - /// @platform - /// @brief Exchanges the bytes data to the SPI slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] spi The SPI slave device handle - /// @param[in] txdata The data buffer to write - /// @param[out] rxdata The data buffer to read - /// @param[in] length The size of txdata and rxdata buffer (in bytes) - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_spi_read() - /// @see peripheral_spi_write() - int peripheral_spi_transfer( - peripheral_spi_h spi, - ffi.Pointer txdata, - ffi.Pointer rxdata, - int length, - ) { - return _peripheral_spi_transfer( - spi, - txdata, - rxdata, - length, - ); - } - - late final _peripheral_spi_transferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_spi_h, ffi.Pointer, - ffi.Pointer, ffi.Uint32)>>('peripheral_spi_transfer'); - late final _peripheral_spi_transfer = _peripheral_spi_transferPtr.asFunction< - int Function(peripheral_spi_h, ffi.Pointer, - ffi.Pointer, int)>(); - - /// @brief Gets the integer value of the runtime information. - /// @details This function gets current state of the given key which represents specific runtime information. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[in] key The runtime information status key from which data should be read - /// @param[out] value The current value of the given key - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An input/output error occurred when read value from system - /// @retval #RUNTIME_INFO_ERROR_PERMISSION_DENIED No permission to use the api - /// @retval #RUNTIME_INFO_ERROR_NOT_SUPPORTED Not supported parameter - int runtime_info_get_value_int( - int key, - ffi.Pointer value, - ) { - return _runtime_info_get_value_int( - key, - value, - ); - } - - late final _runtime_info_get_value_intPtr = _lookup< - ffi - .NativeFunction)>>( - 'runtime_info_get_value_int'); - late final _runtime_info_get_value_int = _runtime_info_get_value_intPtr - .asFunction)>(); - - /// @brief Gets the boolean value from the runtime information. - /// @details This function gets current state of the given key which represents specific runtime information. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[in] key The runtime information key from which data should be read - /// @param[out] value The current value of the given key - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An input/output error occurred when read value from system - /// @retval #RUNTIME_INFO_ERROR_PERMISSION_DENIED No permission to use the api - /// @retval #RUNTIME_INFO_ERROR_NOT_SUPPORTED Not supported parameter - int runtime_info_get_value_bool( - int key, - ffi.Pointer value, - ) { - return _runtime_info_get_value_bool( - key, - value, - ); - } - - late final _runtime_info_get_value_boolPtr = _lookup< - ffi - .NativeFunction)>>( - 'runtime_info_get_value_bool'); - late final _runtime_info_get_value_bool = _runtime_info_get_value_boolPtr - .asFunction)>(); - - /// @brief Gets the double value from the runtime information. - /// @details This function gets current state of the given key which represents specific runtime information. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[in] key The runtime information key from which data should be read - /// @param[out] value The current value of the given key - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An input/output error occurred when read value from system - /// @retval #RUNTIME_INFO_ERROR_PERMISSION_DENIED No permission to use the api - /// @retval #RUNTIME_INFO_ERROR_NOT_SUPPORTED Not supported parameter - int runtime_info_get_value_double( - int key, - ffi.Pointer value, - ) { - return _runtime_info_get_value_double( - key, - value, - ); - } - - late final _runtime_info_get_value_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, - ffi.Pointer)>>('runtime_info_get_value_double'); - late final _runtime_info_get_value_double = _runtime_info_get_value_doublePtr - .asFunction)>(); - - /// @brief Gets the string value for specified runtime information. - /// @details This function gets current state of the given key which represents specific runtime information. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @remarks You must release @a value using free(). - /// - /// @param[in] key The runtime information key from which data should be read - /// @param[out] value The current value of the given key - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An input/output error occurred when read value from system - /// @retval #RUNTIME_INFO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #RUNTIME_INFO_ERROR_PERMISSION_DENIED No permission to use the api - /// @retval #RUNTIME_INFO_ERROR_NOT_SUPPORTED Not supported parameter - int runtime_info_get_value_string( - int key, - ffi.Pointer> value, - ) { - return _runtime_info_get_value_string( - key, - value, - ); - } - - late final _runtime_info_get_value_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer>)>>( - 'runtime_info_get_value_string'); - late final _runtime_info_get_value_string = _runtime_info_get_value_stringPtr - .asFunction>)>(); - - /// @brief Registers a change event callback for given runtime information key. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[in] key The runtime information type - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_PERMISSION_DENIED No permission to use the api - /// @retval #RUNTIME_INFO_ERROR_NOT_SUPPORTED Not supported parameter - /// - /// @post runtime_info_changed_cb() will be invoked. - /// @see runtime_info_unset_changed_cb() - /// @see runtime_info_changed_cb() - int runtime_info_set_changed_cb( - int key, - runtime_info_changed_cb callback, - ffi.Pointer user_data, - ) { - return _runtime_info_set_changed_cb( - key, - callback, - user_data, - ); - } - - late final _runtime_info_set_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, runtime_info_changed_cb, - ffi.Pointer)>>('runtime_info_set_changed_cb'); - late final _runtime_info_set_changed_cb = - _runtime_info_set_changed_cbPtr.asFunction< - int Function(int, runtime_info_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[in] key The runtime information type - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see runtime_info_set_changed_cb() - int runtime_info_unset_changed_cb( - int key, - ) { - return _runtime_info_unset_changed_cb( - key, - ); - } - - late final _runtime_info_unset_changed_cbPtr = - _lookup>( - 'runtime_info_unset_changed_cb'); - late final _runtime_info_unset_changed_cb = - _runtime_info_unset_changed_cbPtr.asFunction(); - - /// @brief Gets system memory information. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// - /// @param[out] info The system memory information structure - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An Input/Output error occurred while reading from system - /// - /// @see runtime_info_get_process_memory_info() - int runtime_info_get_system_memory_info( - ffi.Pointer info, - ) { - return _runtime_info_get_system_memory_info( - info, - ); - } - - late final _runtime_info_get_system_memory_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'runtime_info_get_system_memory_info'); - late final _runtime_info_get_system_memory_info = - _runtime_info_get_system_memory_infoPtr - .asFunction)>(); - - /// @brief Gets memory information per process. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/systemmonitor - /// @remarks You must release @a s value using free(). \n - /// The size of @a s is the same with @a size. - /// - /// @param[in] pid The process unique id array - /// @param[in] size The size of pid array - /// @param[out] info The memory information structure array of the processes - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_OUT_OF_MEMORY Not able to allocate memory (for output param/other operations) - /// @retval #RUNTIME_INFO_ERROR_REMOTE_IO Call to resource daemon failed (dbus errors/resource daemon errors) - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An I/O error during dbus message operations - /// @retval #RUNTIME_INFO_ERROR_PERMISSION_DENIED Process not authorized to request process usage info - /// - /// @see runtime_info_get_system_memory_info() - int runtime_info_get_process_memory_info( - ffi.Pointer pid, - int size, - ffi.Pointer> info, - ) { - return _runtime_info_get_process_memory_info( - pid, - size, - info, - ); - } - - late final _runtime_info_get_process_memory_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, - ffi.Pointer>)>>( - 'runtime_info_get_process_memory_info'); - late final _runtime_info_get_process_memory_info = - _runtime_info_get_process_memory_infoPtr.asFunction< - int Function(ffi.Pointer, int, - ffi.Pointer>)>(); - - /// @brief Gets CPU information. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// - /// @param[out] usage The CPU usage structure - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An input/output error occurred while reading from system - /// - /// @see runtime_info_get_process_cpu_usage() - int runtime_info_get_cpu_usage( - ffi.Pointer usage, - ) { - return _runtime_info_get_cpu_usage( - usage, - ); - } - - late final _runtime_info_get_cpu_usagePtr = _lookup< - ffi - .NativeFunction)>>( - 'runtime_info_get_cpu_usage'); - late final _runtime_info_get_cpu_usage = _runtime_info_get_cpu_usagePtr - .asFunction)>(); - - /// @brief Gets CPU usage per process. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/systemmonitor - /// @remarks You must release @a s value using free(). \n - /// The size of @a s is the same with @a size. - /// - /// @param[in] pid The process unique id array - /// @param[in] size The size of pid array - /// @param[out] usage The CPU usage structure array of the processes - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_OUT_OF_MEMORY Not able to allocate memory (for output param/other operations) - /// @retval #RUNTIME_INFO_ERROR_REMOTE_IO Call to resource daemon failed (dbus errors/resource daemon errors) - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An I/O error occurred (during dbus message operations/other IO operations) - /// @retval #RUNTIME_INFO_ERROR_PERMISSION_DENIED Process not authorized to request process usage info - /// - /// @see runtime_info_get_cpu_usage() - int runtime_info_get_process_cpu_usage( - ffi.Pointer pid, - int size, - ffi.Pointer> usage, - ) { - return _runtime_info_get_process_cpu_usage( - pid, - size, - usage, - ); - } - - late final _runtime_info_get_process_cpu_usagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, - ffi.Pointer>)>>( - 'runtime_info_get_process_cpu_usage'); - late final _runtime_info_get_process_cpu_usage = - _runtime_info_get_process_cpu_usagePtr.asFunction< - int Function(ffi.Pointer, int, - ffi.Pointer>)>(); - - /// @brief Gets the number of processors. - /// @since_tizen 3.0 - /// - /// @param[out] num_core The number of whole processors - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An I/O error occurred (during file open operation) - int runtime_info_get_processor_count( - ffi.Pointer num_core, - ) { - return _runtime_info_get_processor_count( - num_core, - ); - } - - late final _runtime_info_get_processor_countPtr = - _lookup)>>( - 'runtime_info_get_processor_count'); - late final _runtime_info_get_processor_count = - _runtime_info_get_processor_countPtr - .asFunction)>(); - - /// @brief Gets the current frequency of processor. - /// @since_tizen 3.0 - /// - /// @param[in] core_idx The index (from 0) of CPU core that you want to know the frequency - /// @param[out] cpu_freq The current frequency(MHz) of processor - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An I/O error occurred (during file open operation) - /// @retval #RUNTIME_INFO_ERROR_NO_DATA No data available (Since 3.0) - int runtime_info_get_processor_current_frequency( - int core_idx, - ffi.Pointer cpu_freq, - ) { - return _runtime_info_get_processor_current_frequency( - core_idx, - cpu_freq, - ); - } - - late final _runtime_info_get_processor_current_frequencyPtr = _lookup< - ffi.NativeFunction)>>( - 'runtime_info_get_processor_current_frequency'); - late final _runtime_info_get_processor_current_frequency = - _runtime_info_get_processor_current_frequencyPtr - .asFunction)>(); - - /// @brief Gets the max frequency of processor. - /// @since_tizen 3.0 - /// - /// @param[in] core_idx The index (from 0) of CPU core that you want to know the frequency - /// @param[out] cpu_freq The max frequency(MHz) of processor - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An I/O error occurred (during file open operation) - /// @retval #RUNTIME_INFO_ERROR_NO_DATA No data available (Since 3.0) - int runtime_info_get_processor_max_frequency( - int core_idx, - ffi.Pointer cpu_freq, - ) { - return _runtime_info_get_processor_max_frequency( - core_idx, - cpu_freq, - ); - } - - late final _runtime_info_get_processor_max_frequencyPtr = _lookup< - ffi.NativeFunction)>>( - 'runtime_info_get_processor_max_frequency'); - late final _runtime_info_get_processor_max_frequency = - _runtime_info_get_processor_max_frequencyPtr - .asFunction)>(); - - /// @brief Gets the physical memory size. - /// @since_tizen 4.0 - /// - /// @param[out] size Physical memory size (KiB) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An I/O error occurred (during file open operation) - int runtime_info_get_physical_memory_size( - ffi.Pointer size, - ) { - return _runtime_info_get_physical_memory_size( - size, - ); - } - - late final _runtime_info_get_physical_memory_sizePtr = - _lookup)>>( - 'runtime_info_get_physical_memory_size'); - late final _runtime_info_get_physical_memory_size = - _runtime_info_get_physical_memory_sizePtr - .asFunction)>(); - - /// @brief Frees an app usage handle. - /// @since_tizen 4.0 - /// - /// @param[in] handle App usage handle to free - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - int runtime_info_app_usage_destroy( - app_usage_h handle, - ) { - return _runtime_info_app_usage_destroy( - handle, - ); - } - - late final _runtime_info_app_usage_destroyPtr = - _lookup>( - 'runtime_info_app_usage_destroy'); - late final _runtime_info_app_usage_destroy = - _runtime_info_app_usage_destroyPtr - .asFunction(); - - /// @brief Gets the app count from an app usage handle. - /// @since_tizen 4.0 - /// - /// @param[in] handle The app usage handle - /// @param[out] count The number of apps on the app list - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see runtime_info_get_all_apps_memory_usage() - /// @see runtime_info_get_all_apps_cpu_rate() - int runtime_info_app_usage_get_count( - app_usage_h handle, - ffi.Pointer count, - ) { - return _runtime_info_app_usage_get_count( - handle, - count, - ); - } - - late final _runtime_info_app_usage_get_countPtr = _lookup< - ffi - .NativeFunction)>>( - 'runtime_info_app_usage_get_count'); - late final _runtime_info_app_usage_get_count = - _runtime_info_app_usage_get_countPtr - .asFunction)>(); - - /// @brief Gets the app ID from an app usage handle. - /// @since_tizen 4.0 - /// - /// @remarks You must release @a appid using free(). - /// - /// @param[in] handle The app usage handle - /// @param[in] index The index in the app list; should be between 0 and @a count - 1 (inclusive), \n - /// where @a count is provided by runtime_info_app_usage_get_count() - /// @param[out] appid The app ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see runtime_info_get_all_apps_memory_usage() - /// @see runtime_info_get_all_apps_cpu_rate() - int runtime_info_app_usage_get_appid( - app_usage_h handle, - int index, - ffi.Pointer> appid, - ) { - return _runtime_info_app_usage_get_appid( - handle, - index, - appid, - ); - } - - late final _runtime_info_app_usage_get_appidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - app_usage_h, ffi.Int, ffi.Pointer>)>>( - 'runtime_info_app_usage_get_appid'); - late final _runtime_info_app_usage_get_appid = - _runtime_info_app_usage_get_appidPtr.asFunction< - int Function(app_usage_h, int, ffi.Pointer>)>(); - - /// @brief Gets resource usage from an app usage handle. - /// @since_tizen 4.0 - /// - /// @remarks The meaning of @a usage depends on which function was used to create @a handle. - /// - /// @param[in] handle The app usage handle - /// @param[in] index The index in the app list; should be between 0 and @a count - 1 (inclusive), \n - /// where @a count is provided by runtime_info_app_usage_get_count() - /// @param[out] usage Resource usage - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see runtime_info_get_all_apps_memory_usage() - /// @see runtime_info_get_all_apps_cpu_rate() - int runtime_info_app_usage_get_usage( - app_usage_h handle, - int index, - ffi.Pointer usage, - ) { - return _runtime_info_app_usage_get_usage( - handle, - index, - usage, - ); - } - - late final _runtime_info_app_usage_get_usagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - app_usage_h, ffi.Int, ffi.Pointer)>>( - 'runtime_info_app_usage_get_usage'); - late final _runtime_info_app_usage_get_usage = - _runtime_info_app_usage_get_usagePtr.asFunction< - int Function(app_usage_h, int, ffi.Pointer)>(); - - /// @brief Gets memory usage of all apps. - /// @since_tizen 4.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/systemmonitor - /// @remarks You must release @a usage using runtime_info_app_usage_destroy(). - /// - /// @param[out] usage An array of each app's memory usage (KB) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_OUT_OF_MEMORY Not able to allocate memory (for output param/other operations) - /// @retval #RUNTIME_INFO_ERROR_REMOTE_IO Call to resource daemon failed (dbus errors/resource daemon errors) - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An I/O error during dbus message operations - /// @retval #RUNTIME_INFO_ERROR_PERMISSION_DENIED Process not authorized to request app usage info - /// @retval #RUNTIME_INFO_ERROR_NO_DATA No app running - /// - /// @code - /// #include - /// - /// void print_memory_usage(void) - /// { - /// int i; - /// int count; - /// app_usage_h mem_usage_handle; - /// char *appid; - /// unsigned int usage; - /// - /// runtime_info_get_all_apps_memory_usage(&mem_usage_handle); - /// runtime_info_app_usage_get_count(mem_usage_handle, &count); - /// - /// for (i = 0; i < count; i++) { - /// runtime_info_app_usage_get_appid(mem_usage_handle, i, &appid); - /// runtime_info_app_usage_get_usage(mem_usage_handle, i, &usage); - /// printf("appid = %s, usage = %u KB\n", appid, usage); - /// free(appid); - /// } - /// - /// runtime_info_app_usage_destroy(mem_usage_handle); - /// - /// } - /// @endcode - int runtime_info_get_all_apps_memory_usage( - ffi.Pointer usage, - ) { - return _runtime_info_get_all_apps_memory_usage( - usage, - ); - } - - late final _runtime_info_get_all_apps_memory_usagePtr = - _lookup)>>( - 'runtime_info_get_all_apps_memory_usage'); - late final _runtime_info_get_all_apps_memory_usage = - _runtime_info_get_all_apps_memory_usagePtr - .asFunction)>(); - - /// @brief Gets CPU rate of all apps. - /// @since_tizen 4.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/systemmonitor - /// @remarks You must release @a rate using runtime_info_app_usage_destroy(). - /// - /// @param[out] rate An array of each app's CPU usage rate (%), the values are rounded down. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_OUT_OF_MEMORY Not able to allocate memory (for output param/other operations) - /// @retval #RUNTIME_INFO_ERROR_REMOTE_IO Call to resource daemon failed (dbus errors/resource daemon errors) - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An I/O error during dbus message operations - /// @retval #RUNTIME_INFO_ERROR_PERMISSION_DENIED Process not authorized to request app usage info - /// @retval #RUNTIME_INFO_ERROR_NO_DATA No app running - /// - /// @code - /// #include - /// - /// void print_cpu_usage(void) - /// { - /// int i; - /// int count; - /// app_usage_h cpu_rate_handle; - /// char *appid; - /// unsigned int rate; - /// - /// runtime_info_get_all_apps_cpu_rate(&cpu_rate_handle); - /// runtime_info_app_usage_get_count(cpu_rate_handle, &count); - /// - /// for (i = 0; i < count; i++) { - /// runtime_info_app_usage_get_appid(cpu_rate_handle, i, &appid); - /// runtime_info_app_usage_get_usage(cpu_rate_handle, i, &rate); - /// printf("appid = %s, rate = %u %%\n", appid, rate); - /// free(appid); - /// } - /// - /// runtime_info_app_usage_destroy(cpu_rate_handle); - /// - /// } - /// @endcode - int runtime_info_get_all_apps_cpu_rate( - ffi.Pointer rate, - ) { - return _runtime_info_get_all_apps_cpu_rate( - rate, - ); - } - - late final _runtime_info_get_all_apps_cpu_ratePtr = - _lookup)>>( - 'runtime_info_get_all_apps_cpu_rate'); - late final _runtime_info_get_all_apps_cpu_rate = - _runtime_info_get_all_apps_cpu_ratePtr - .asFunction)>(); - - /// @brief Checks whether a given sensor type is supported in the current device. - /// @details If the given sensor type is not supported, sensor_get_default_sensor() will return an error. - /// It is thus recommended to check the availability of the sensor before actually acquiring #sensor_h. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] type A sensor type to check - /// @param[out] supported If supported, @c true; Otherwise @c false - /// - /// @return #SENSOR_ERROR_NONE on success; Otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see sensor_is_supported_by_uri() - int sensor_is_supported( - int type, - ffi.Pointer supported, - ) { - return _sensor_is_supported( - type, - supported, - ); - } - - late final _sensor_is_supportedPtr = _lookup< - ffi - .NativeFunction)>>( - 'sensor_is_supported'); - late final _sensor_is_supported = _sensor_is_supportedPtr - .asFunction)>(); - - /// @brief Checks whether a sensor corresponding to a given URI is supported in the current device. - /// @details To correctly check the availability of a sensor, a valid URI should be provided. - /// The valid form of URIs is explained in \ref CAPI_SYSTEM_SENSOR_LISTENER_MODULE_URI.\n - /// If a URI with the sensor's name is given, for example, %http://tizen.org/sensor/general/light/front, - /// the availability of the @"front@" light sensor is checked. - /// Otherwise, if a URI without the name, %http://tizen.org/sensor/general/light, is given, - /// this function checks the availability of any light sensor in the device.\n - /// It is recommended to check the availability of the sensors corresponding to the URI - /// before actually acquiring #sensor_h. - /// @since_tizen 4.0 - /// - /// @param[in] uri A sensor or a sensor type URI to check - /// @param[out] supported If supported, @c true, otherwise @c false - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see sensor_is_supported() - int sensor_is_supported_by_uri( - ffi.Pointer uri, - ffi.Pointer supported, - ) { - return _sensor_is_supported_by_uri( - uri, - supported, - ); - } - - late final _sensor_is_supported_by_uriPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('sensor_is_supported_by_uri'); - late final _sensor_is_supported_by_uri = _sensor_is_supported_by_uriPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Checks whether a given sensor is a wake-up sensor or not. - /// @details If a sensor is a wake-up sensor, the sensor is able to wake-up the system - /// to report its sensor data even if the system is in sleep mode. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @param[in] sensor A sensor handle to check - /// @param[out] wakeup If the sensor is a wake-up sensor, @c true; - /// Otherwise @c false - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre The handle @c sensor needs to be initialized using - /// sensor_get_default_sensor() or sensor_get_sensor_list() in advance. - int sensor_is_wake_up( - sensor_h sensor, - ffi.Pointer wakeup, - ) { - return _sensor_is_wake_up( - sensor, - wakeup, - ); - } - - late final _sensor_is_wake_upPtr = _lookup< - ffi - .NativeFunction)>>( - 'sensor_is_wake_up'); - late final _sensor_is_wake_up = _sensor_is_wake_upPtr - .asFunction)>(); - - /// @brief Gets the handle for the default sensor of a given type. - /// @details This function returns the handle for the sensor of a given type. - /// If the device has more than one sensor of the given type, - /// this function returns the default sensor of the given type, - /// which is designated by the device. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks Some sensor types are privileged. An application should have the privilege - /// http://tizen.org/privilege/healthinfo to get handles for the following sensors: - /// #SENSOR_HRM, #SENSOR_HRM_LED_GREEN, #SENSOR_HRM_LED_IR, #SENSOR_HRM_LED_RED, - /// #SENSOR_HUMAN_PEDOMETER, #SENSOR_HUMAN_SLEEP_MONITOR, #SENSOR_HUMAN_SLEEP_DETECTOR, - /// and #SENSOR_HUMAN_STRESS_MONITOR. - /// - /// @param[in] type A sensor type to get the handle of its default sensor - /// @param[out] sensor The sensor handle of the default sensor - /// - /// @return #SENSOR_ERROR_NONE on success; Otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_NOT_SUPPORTED The sensor type is not supported in the current device - /// @retval #SENSOR_ERROR_PERMISSION_DENIED Permission denied - /// - /// @see sensor_get_default_sensor_by_uri() - /// @see sensor_get_sensor_list() - int sensor_get_default_sensor( - int type, - ffi.Pointer sensor, - ) { - return _sensor_get_default_sensor( - type, - sensor, - ); - } - - late final _sensor_get_default_sensorPtr = _lookup< - ffi - .NativeFunction)>>( - 'sensor_get_default_sensor'); - late final _sensor_get_default_sensor = _sensor_get_default_sensorPtr - .asFunction)>(); - - /// @brief Gets the handle for the default sensor of a given sensor URI. - /// @details This function returns the handle for the sensor of a given URI. - /// If the device has more than one sensor of the given URI, - /// this function returns the default sensor of the URI, which is designated by the device.\n - /// See \ref CAPI_SYSTEM_SENSOR_LISTENER_MODULE_URI for more details about the URI format. - /// @since_tizen 4.0 - /// - /// @remarks Some sensor types are privileged. An application should have the privilege - /// http://tizen.org/privilege/healthinfo to get handles for the sensor URIs of @"healthinfo@" category. - /// See \ref CAPI_SYSTEM_SENSOR_LISTENER_MODULE_URI to find the @"healthinfo@" category sensor URIs. - /// - /// @param[in] uri A sensor or a sensor type URI to get the handle of its default sensor - /// @param[out] sensor The default sensor handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_NOT_SUPPORTED The URI is not supported in the current device - /// @retval #SENSOR_ERROR_PERMISSION_DENIED Permission denied - /// - /// @see sensor_get_default_sensor() - /// @see sensor_get_sensor_list_by_uri() - int sensor_get_default_sensor_by_uri( - ffi.Pointer uri, - ffi.Pointer sensor, - ) { - return _sensor_get_default_sensor_by_uri( - uri, - sensor, - ); - } - - late final _sensor_get_default_sensor_by_uriPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('sensor_get_default_sensor_by_uri'); - late final _sensor_get_default_sensor_by_uri = - _sensor_get_default_sensor_by_uriPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the handle list of the sensors of a given type. - /// @details A device may have more than one sensors of the given type. - /// In such case, this function can be used to get the handles of all sensors of the type.@n - /// The first element of the @a list denotes the default sensor, - /// which can be retrieved by sensor_get_default_sensor(). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks Some sensor types are privileged. An application should have the privilege - /// http://tizen.org/privilege/healthinfo to get handles for the following sensors: - /// #SENSOR_HRM, #SENSOR_HRM_LED_GREEN, #SENSOR_HRM_LED_IR, #SENSOR_HRM_LED_RED, - /// #SENSOR_HUMAN_PEDOMETER, #SENSOR_HUMAN_SLEEP_MONITOR, #SENSOR_HUMAN_SLEEP_DETECTOR, - /// and #SENSOR_HUMAN_STRESS_MONITOR.@n - /// Instead of specifying a sensor type, by using #SENSOR_ALL, - /// applications can get the list of handles for all available sensors.@n - /// The @a list must be released using free(), if not being used anymore.@n - /// - /// @param[in] type A sensor type to get the list of sensor handles - /// @param[out] list An array of the sensor handles - /// @param[out] sensor_count The number of handles contained in @a list - /// - /// @return #SENSOR_ERROR_NONE on success; Otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_NOT_SUPPORTED The sensor type is not supported in the current device - /// @retval #SENSOR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SENSOR_ERROR_OUT_OF_MEMORY Out of memory - int sensor_get_sensor_list( - int type, - ffi.Pointer> list, - ffi.Pointer sensor_count, - ) { - return _sensor_get_sensor_list( - type, - list, - sensor_count, - ); - } - - late final _sensor_get_sensor_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer>, - ffi.Pointer)>>('sensor_get_sensor_list'); - late final _sensor_get_sensor_list = _sensor_get_sensor_listPtr.asFunction< - int Function( - int, ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Gets the handle list of the sensors of a given URI. - /// @details A device may have more than one sensor of the given URI. - /// In such case, this function can be used to get the handles of all sensors of the given URI.\n - /// See \ref CAPI_SYSTEM_SENSOR_LISTENER_MODULE_URI for more details about the URI format. - /// @since_tizen 4.0 - /// - /// @remarks Some sensors require one or more privileges. An application should have the corresponding privilege - /// to get handles for such sensors. - /// See sensor_get_default_sensor_by_uri() for more details.@n - /// The @a list must be released using free(), if not being used anymore. - /// - /// @param[in] uri A sensor or a sensor type URI to get the list of sensor handles - /// @param[out] list An array of the sensor handles - /// @param[out] sensor_count The number of handles contained in @a list - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_NOT_SUPPORTED The URI is not supported in the current device - /// @retval #SENSOR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SENSOR_ERROR_OUT_OF_MEMORY Out of memory - int sensor_get_sensor_list_by_uri( - ffi.Pointer uri, - ffi.Pointer> list, - ffi.Pointer sensor_count, - ) { - return _sensor_get_sensor_list_by_uri( - uri, - list, - sensor_count, - ); - } - - late final _sensor_get_sensor_list_by_uriPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('sensor_get_sensor_list_by_uri'); - late final _sensor_get_sensor_list_by_uri = - _sensor_get_sensor_list_by_uriPtr.asFunction< - int Function(ffi.Pointer, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Gets the URI of a sensor. - /// @since_tizen 4.0 - /// - /// @remarks The @a uri must be released using free(), if not being used anymore. - /// - /// @param[in] sensor A sensor handle - /// @param[out] uri The URI of the sensor - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - int sensor_get_uri( - sensor_h sensor, - ffi.Pointer> uri, - ) { - return _sensor_get_uri( - sensor, - uri, - ); - } - - late final _sensor_get_uriPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - sensor_h, ffi.Pointer>)>>('sensor_get_uri'); - late final _sensor_get_uri = _sensor_get_uriPtr - .asFunction>)>(); - - /// @brief Gets the name of a sensor. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a name must be released using free(), if not being used anymore. - /// - /// @param[in] sensor A sensor handle - /// @param[out] name The name of the sensor - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - int sensor_get_name( - sensor_h sensor, - ffi.Pointer> name, - ) { - return _sensor_get_name( - sensor, - name, - ); - } - - late final _sensor_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_h, - ffi.Pointer>)>>('sensor_get_name'); - late final _sensor_get_name = _sensor_get_namePtr - .asFunction>)>(); - - /// @brief Gets the vendor of a sensor. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a vendor must be released using free(), if not being used anymore. - /// - /// @param[in] sensor A sensor handle - /// @param[out] vendor The vendor of the sensor - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - int sensor_get_vendor( - sensor_h sensor, - ffi.Pointer> vendor, - ) { - return _sensor_get_vendor( - sensor, - vendor, - ); - } - - late final _sensor_get_vendorPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_h, - ffi.Pointer>)>>('sensor_get_vendor'); - late final _sensor_get_vendor = _sensor_get_vendorPtr - .asFunction>)>(); - - /// @brief Gets the type of a sensor, if it belongs to the known types defined in #sensor_type_e. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] sensor A sensor handle - /// @param[out] type The type of the sensor - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_NO_DATA No known sensor type for the given sensor - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_get_type( - sensor_h sensor, - ffi.Pointer type, - ) { - return _sensor_get_type( - sensor, - type, - ); - } - - late final _sensor_get_typePtr = _lookup< - ffi - .NativeFunction)>>( - 'sensor_get_type'); - late final _sensor_get_type = _sensor_get_typePtr - .asFunction)>(); - - /// @brief Gets the lower bound of the sensor reading of a sensor. - /// @details This function returns the lower bound of the range of possible sensor values, - /// which are generated by the corresponding sensor denoted by a sensor handle.@n - /// If all sensor values are in the same unit, e.g., \f$\mbox{m/s}^2\f$ or degrees, - /// the lower bound of all sensor values is returned. - /// Otherwise, the lower bound of the representative sensor value, e.g., - /// the step count of #SENSOR_HUMAN_PEDOMETER, is returned. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] sensor A sensor handle - /// @param[out] min_range The lower bound - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_get_max_range() - int sensor_get_min_range( - sensor_h sensor, - ffi.Pointer min_range, - ) { - return _sensor_get_min_range( - sensor, - min_range, - ); - } - - late final _sensor_get_min_rangePtr = _lookup< - ffi - .NativeFunction)>>( - 'sensor_get_min_range'); - late final _sensor_get_min_range = _sensor_get_min_rangePtr - .asFunction)>(); - - /// @brief Gets the upper bound of the sensor readings of a sensor. - /// @details This function returns the upper bound of the range of possible sensor values, - /// which are generated by the corresponding sensor denoted by a sensor handle.@n - /// If all sensor values are in the same unit, e.g., \f$\mbox{m/s}^2\f$ or degrees, - /// the upper bound of all sensor values is returned. - /// Otherwise, the upper bound of the representative sensor value, e.g., - /// the step count of #SENSOR_HUMAN_PEDOMETER, is returned. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] sensor A sensor handle - /// @param[out] max_range The upper bound - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_get_min_range() - int sensor_get_max_range( - sensor_h sensor, - ffi.Pointer max_range, - ) { - return _sensor_get_max_range( - sensor, - max_range, - ); - } - - late final _sensor_get_max_rangePtr = _lookup< - ffi - .NativeFunction)>>( - 'sensor_get_max_range'); - late final _sensor_get_max_range = _sensor_get_max_rangePtr - .asFunction)>(); - - /// @brief Gets the resolution of the sensor readings of a sensor. - /// @details This function returns the resolution of the sensor readings. - /// The resolution denotes the smallest difference between sensor readings, - /// each of which is in the range that can be verified by - /// sensor_get_min_range() and sensor_get_max_range(). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] sensor A sensor handle - /// @param[out] resolution The resolution - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_get_resolution( - sensor_h sensor, - ffi.Pointer resolution, - ) { - return _sensor_get_resolution( - sensor, - resolution, - ); - } - - late final _sensor_get_resolutionPtr = _lookup< - ffi - .NativeFunction)>>( - 'sensor_get_resolution'); - late final _sensor_get_resolution = _sensor_get_resolutionPtr - .asFunction)>(); - - /// @brief Gets the possible shorted update interval of a sensor. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] sensor A sensor handle - /// @param[out] min_interval The shorted interval in milliseconds - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_get_min_interval( - sensor_h sensor, - ffi.Pointer min_interval, - ) { - return _sensor_get_min_interval( - sensor, - min_interval, - ); - } - - late final _sensor_get_min_intervalPtr = _lookup< - ffi.NativeFunction)>>( - 'sensor_get_min_interval'); - late final _sensor_get_min_interval = _sensor_get_min_intervalPtr - .asFunction)>(); - - /// @brief Gets the size of the hardware FIFO of a sensor. - /// @details This function returns the size of the hardware FIFO that may be used by - /// a specific sensor to support batching. - /// However, regarding the underlying hardware configuration, - /// the returned count may not mean the maximum number of sensor data that can be batched. - /// See sensor_get_max_batch_count() for such purpose, finding out the - /// possible maximum number of batched data. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] sensor A sensor handle - /// @param[out] fifo_count The FIFO count - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_get_fifo_count( - sensor_h sensor, - ffi.Pointer fifo_count, - ) { - return _sensor_get_fifo_count( - sensor, - fifo_count, - ); - } - - late final _sensor_get_fifo_countPtr = _lookup< - ffi.NativeFunction)>>( - 'sensor_get_fifo_count'); - late final _sensor_get_fifo_count = _sensor_get_fifo_countPtr - .asFunction)>(); - - /// @brief Gets the maximum batch count of a sensor. - /// @details This function returns the maximum number of sensor data events - /// that can be possibly delivered when the batched data are flushed. - /// Therefore, this count can be used to check whether the sensor supports - /// batching or not.@n - /// If this returns a positive count, i.e., the sensor supports batching, - /// the count also can be used to guess the possible longest batch latency - /// of the sensor, with respect to the update interval to use. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] sensor A sensor handle - /// @param[out] max_batch_count If the sensor does not support batching, 0; - /// Otherwise a positive integer. - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_listener_set_max_batch_latency() - int sensor_get_max_batch_count( - sensor_h sensor, - ffi.Pointer max_batch_count, - ) { - return _sensor_get_max_batch_count( - sensor, - max_batch_count, - ); - } - - late final _sensor_get_max_batch_countPtr = _lookup< - ffi.NativeFunction)>>( - 'sensor_get_max_batch_count'); - late final _sensor_get_max_batch_count = _sensor_get_max_batch_countPtr - .asFunction)>(); - - /// @brief Adds a callback function to be invoked when a new sensor is added. - /// @since_tizen 4.0 - /// - /// @param[in] callback A callback function to be added - /// @param[in] user_data A user data to be passed to the callback function - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_remove_sensor_added_cb() - int sensor_add_sensor_added_cb( - sensor_added_cb callback, - ffi.Pointer user_data, - ) { - return _sensor_add_sensor_added_cb( - callback, - user_data, - ); - } - - late final _sensor_add_sensor_added_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_added_cb, - ffi.Pointer)>>('sensor_add_sensor_added_cb'); - late final _sensor_add_sensor_added_cb = _sensor_add_sensor_added_cbPtr - .asFunction)>(); - - /// @brief Removes a callback function added using sensor_add_sensor_added_cb(). - /// @since_tizen 4.0 - /// - /// @param[in] callback A callback function to be removed - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_add_sensor_added_cb() - int sensor_remove_sensor_added_cb( - sensor_added_cb callback, - ) { - return _sensor_remove_sensor_added_cb( - callback, - ); - } - - late final _sensor_remove_sensor_added_cbPtr = - _lookup>( - 'sensor_remove_sensor_added_cb'); - late final _sensor_remove_sensor_added_cb = _sensor_remove_sensor_added_cbPtr - .asFunction(); - - /// @brief Adds a callback function to be invoked when a sensor is removed. - /// @since_tizen 4.0 - /// - /// @param[in] callback A callback function to be removed - /// @param[in] user_data A user data to be passed to the callback function - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_remove_sensor_removed_cb() - int sensor_add_sensor_removed_cb( - sensor_removed_cb callback, - ffi.Pointer user_data, - ) { - return _sensor_add_sensor_removed_cb( - callback, - user_data, - ); - } - - late final _sensor_add_sensor_removed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_removed_cb, - ffi.Pointer)>>('sensor_add_sensor_removed_cb'); - late final _sensor_add_sensor_removed_cb = _sensor_add_sensor_removed_cbPtr - .asFunction)>(); - - /// @brief Removes a callback function added using sensor_add_sensor_removed_cb(). - /// @since_tizen 4.0 - /// - /// @param[in] callback A callback function to be removed - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_add_sensor_removed_cb() - int sensor_remove_sensor_removed_cb( - sensor_removed_cb callback, - ) { - return _sensor_remove_sensor_removed_cb( - callback, - ); - } - - late final _sensor_remove_sensor_removed_cbPtr = - _lookup>( - 'sensor_remove_sensor_removed_cb'); - late final _sensor_remove_sensor_removed_cb = - _sensor_remove_sensor_removed_cbPtr - .asFunction(); - - /// @brief Creates a sensor listener. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a listener must be released using sensor_destroy_listener(). - /// - /// @param[in] sensor A sensor handle - /// @param[out] listener A listener handle of @a sensor - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @pre The handle @a sensor needs to be initialized using - /// sensor_get_default_sensor() or sensor_get_sensor_list() in advance. - int sensor_create_listener( - sensor_h sensor, - ffi.Pointer listener, - ) { - return _sensor_create_listener( - sensor, - listener, - ); - } - - late final _sensor_create_listenerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_h, - ffi.Pointer)>>('sensor_create_listener'); - late final _sensor_create_listener = _sensor_create_listenerPtr - .asFunction)>(); - - /// @brief Releases all the resources allocated for a listener. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks If this function is called while the sensor is still running, - /// that is, sensor_listener_start() was called but sensor_listener_stop() was not, - /// then it is implicitly stopped. - /// - /// @param[in] listener A listener handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see sensor_create_listener() - int sensor_destroy_listener( - sensor_listener_h listener, - ) { - return _sensor_destroy_listener( - listener, - ); - } - - late final _sensor_destroy_listenerPtr = - _lookup>( - 'sensor_destroy_listener'); - late final _sensor_destroy_listener = - _sensor_destroy_listenerPtr.asFunction(); - - /// @brief Starts observing the sensor events regarding a given sensor listener. - /// @details If a sensor listener is started, its event callback function starts to be called - /// whenever the corresponding sensor events occur.@n - /// For example, #SENSOR_ACCELEROMETER reports its sensor readings repeatedly, - /// with a specific update interval. - /// Note that, unlike the accelerometer, sensors like #SENSOR_PROXIMITY emit events - /// only if their states change. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] listener A listener handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @pre The @a listener needs to be created in advance, by using sensor_create_listener(). - /// Then the callback function needs to be attached to the @a listener, by using - /// sensor_listener_set_event_cb(). - /// @see sensor_listener_stop() - int sensor_listener_start( - sensor_listener_h listener, - ) { - return _sensor_listener_start( - listener, - ); - } - - late final _sensor_listener_startPtr = - _lookup>( - 'sensor_listener_start'); - late final _sensor_listener_start = - _sensor_listener_startPtr.asFunction(); - - /// @brief Stops observing the sensor events regarding a given sensor listener. - /// @details The listener's event callback function stops being called. - /// But the sensor itself may not be stopped if there are other listeners - /// that are using the same sensor. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] listener A listener handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_listener_start() - int sensor_listener_stop( - sensor_listener_h listener, - ) { - return _sensor_listener_stop( - listener, - ); - } - - late final _sensor_listener_stopPtr = - _lookup>( - 'sensor_listener_stop'); - late final _sensor_listener_stop = - _sensor_listener_stopPtr.asFunction(); - - /// @brief Registers the callback function to be invoked when sensor events are delivered via a sensor listener. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] listener A listener handle - /// @param[in] interval_ms A desired update interval between sensor events in milliseconds.@n - /// If 0, it will be automatically set to the default interval of the corresponding sensor.@n - /// See sensor_listener_set_interval() for more details. - /// @param[in] callback A callback function to attach with the @a listener handle - /// @param[in] data A user data to be passed to the callback function - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_listener_unset_event_cb() - int sensor_listener_set_event_cb( - sensor_listener_h listener, - int interval_ms, - sensor_event_cb callback, - ffi.Pointer data, - ) { - return _sensor_listener_set_event_cb( - listener, - interval_ms, - callback, - data, - ); - } - - late final _sensor_listener_set_event_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_listener_h, ffi.UnsignedInt, sensor_event_cb, - ffi.Pointer)>>('sensor_listener_set_event_cb'); - late final _sensor_listener_set_event_cb = - _sensor_listener_set_event_cbPtr.asFunction< - int Function(sensor_listener_h, int, sensor_event_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the sensor event callback function attached to a given sensor listener. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] listener A listener handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_listener_set_event_cb() - int sensor_listener_unset_event_cb( - sensor_listener_h listener, - ) { - return _sensor_listener_unset_event_cb( - listener, - ); - } - - late final _sensor_listener_unset_event_cbPtr = - _lookup>( - 'sensor_listener_unset_event_cb'); - late final _sensor_listener_unset_event_cb = - _sensor_listener_unset_event_cbPtr - .asFunction(); - - /// @brief Registers the callback function to be invoked when the accuracy of a sensor changes. - /// @details In addition to sensor_event_cb(), sensor_accuracy_changed_cb() also can be attached - /// to sensor listeners. With this accuracy callback function, applications can be notified - /// the changes of the corresponding sensors separately. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] listener A listener handle - /// @param[in] callback A callback function to attach with the @a listener handle - /// @param[in] data A user data to be passed to the callback function - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @pre The @a listener needs to be started to get the change callbacks. - /// @see sensor_listener_unset_accuracy_cb() - int sensor_listener_set_accuracy_cb( - sensor_listener_h listener, - sensor_accuracy_changed_cb callback, - ffi.Pointer data, - ) { - return _sensor_listener_set_accuracy_cb( - listener, - callback, - data, - ); - } - - late final _sensor_listener_set_accuracy_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_listener_h, sensor_accuracy_changed_cb, - ffi.Pointer)>>('sensor_listener_set_accuracy_cb'); - late final _sensor_listener_set_accuracy_cb = - _sensor_listener_set_accuracy_cbPtr.asFunction< - int Function(sensor_listener_h, sensor_accuracy_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the sensor accuracy change callback function attached to a given sensor listener. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] listener A listener handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_listener_set_accuracy_cb() - int sensor_listener_unset_accuracy_cb( - sensor_listener_h listener, - ) { - return _sensor_listener_unset_accuracy_cb( - listener, - ); - } - - late final _sensor_listener_unset_accuracy_cbPtr = - _lookup>( - 'sensor_listener_unset_accuracy_cb'); - late final _sensor_listener_unset_accuracy_cb = - _sensor_listener_unset_accuracy_cbPtr - .asFunction(); - - /// @brief Reads the current sensor data via a given sensor listener. - /// @details This function synchronously reads the sensor reading of the corresponding sensor, if available. - /// Otherwise, if the sensor is not ready to report its values, this function fails and returns - /// #SENSOR_ERROR_OPERATION_FAILED. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remark As a sensor usually works in an event-driven manner, it may not be able to read its data on demand. - /// Then this function tries to return the last known values.@n - /// To be able to read the current values or the last known values, the sensor needs to be - /// enabled in advance. As an application cannot be sure that the sensor is already enabled - /// by other applications, it is recommended to start the sensor explicitly by using sensor_listener_start().@n - /// But note that, even if the sensor is started, on-demand reading can fail always, - /// thus it would be better to use the asynchronous callback approach. - /// - /// @param[in] listener A listener handle - /// @param[out] event The retrieved sensor data - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_listener_read_data( - sensor_listener_h listener, - ffi.Pointer event, - ) { - return _sensor_listener_read_data( - listener, - event, - ); - } - - late final _sensor_listener_read_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_listener_h, - ffi.Pointer)>>('sensor_listener_read_data'); - late final _sensor_listener_read_data = - _sensor_listener_read_dataPtr.asFunction< - int Function(sensor_listener_h, ffi.Pointer)>(); - - /// @brief Changes the update interval of a sensor. - /// @details The specified interval is only a suggested interval between sensor measurements. - /// You will get at least one sensor measurement within the interval you specify, - /// but the actual interval between sensor measurements can be affected by other applications and the system. - /// To reduce the system overhead, it is recommended to set the longest interval that you can, - /// because the system usually chooses the shortest interval among all intervals specified. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks Normally, a sensor's default update interval is 100 ms, - /// and you can use the default interval by setting the interval to 0. - /// However, please note that, the default interval varies with the sensor and the device.@n - /// In addition, a sensor has the lower and the upper bound of its update interval, - /// usually 10 and 1000 ms respectively. - /// These lower and upper bounds also can vary with the sensor and the device, - /// any invalid input values exceeding the bounds will be implicitly adjusted into the valid range. - /// - /// @param[in] listener A listener handle - /// @param[in] interval_ms A desired update interval between sensor events in milliseconds. - /// If 0, it will be automatically set to the default interval of the corresponding sensor. - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_get_min_interval() - int sensor_listener_set_interval( - sensor_listener_h listener, - int interval_ms, - ) { - return _sensor_listener_set_interval( - listener, - interval_ms, - ); - } - - late final _sensor_listener_set_intervalPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_listener_h, - ffi.UnsignedInt)>>('sensor_listener_set_interval'); - late final _sensor_listener_set_interval = _sensor_listener_set_intervalPtr - .asFunction(); - - /// @brief Sets the desired max batch latency of a sensor. - /// @details Sensors that support batching may allow applications to change their maximum batch latencies. - /// For example, if you set the latency as 10,000 ms, the sensor may store its data - /// up to 10,000 ms, before delivering the data through the HAL.@n - /// In cases of non-batching sensors, this function returns #SENSOR_ERROR_NONE, - /// but nothing is affected by the input latency value. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks Even if you set a batch latency, the sensor may not work as you intended, - /// as one sensor can be used by more than one listeners. - /// In addition, some batch sensors may already have fixed batching latency - /// or batching queue size, which cannot be altered by applications. - /// - /// @param[in] listener A listener handle - /// @param[in] max_batch_latency A desired batch latency in milliseconds - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - int sensor_listener_set_max_batch_latency( - sensor_listener_h listener, - int max_batch_latency, - ) { - return _sensor_listener_set_max_batch_latency( - listener, - max_batch_latency, - ); - } - - late final _sensor_listener_set_max_batch_latencyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_listener_h, - ffi.UnsignedInt)>>('sensor_listener_set_max_batch_latency'); - late final _sensor_listener_set_max_batch_latency = - _sensor_listener_set_max_batch_latencyPtr - .asFunction(); - - /// @brief Sets an attribute to control the behavior of a sensor listener. - /// @details Applications can change the behavior of a sensor listener, for example, - /// what is the reference coordinate of the sensor values, - /// and when the system is allowed to turn off the sensor implicitly to reduce the power consumption. - /// See #sensor_attribute_e for more details about the available control parameters. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @param[in] listener A listener handle - /// @param[in] attribute An attribute to change - /// @param[in] value An attribute value - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - int sensor_listener_set_attribute_int( - sensor_listener_h listener, - int attribute, - int value, - ) { - return _sensor_listener_set_attribute_int( - listener, - attribute, - value, - ); - } - - late final _sensor_listener_set_attribute_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_listener_h, ffi.Int32, - ffi.Int)>>('sensor_listener_set_attribute_int'); - late final _sensor_listener_set_attribute_int = - _sensor_listener_set_attribute_intPtr - .asFunction(); - - /// @brief Changes the power-saving behavior of a sensor listener. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remark sensor_listener_set_attribute_int() with #SENSOR_ATTRIBUTE_PAUSE_POLICY replaces this function. - /// - /// @param[in] listener A listener handle - /// @param[in] option A sensor option - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_listener_set_option( - sensor_listener_h listener, - int option, - ) { - return _sensor_listener_set_option( - listener, - option, - ); - } - - late final _sensor_listener_set_optionPtr = _lookup< - ffi.NativeFunction>( - 'sensor_listener_set_option'); - late final _sensor_listener_set_option = _sensor_listener_set_optionPtr - .asFunction(); - - /// @brief Creates a sensor provider. - /// @details This function creates a sensor provider handle with a given URI. - /// The URI should be in the valid form described in \ref CAPI_SYSTEM_SENSOR_LISTENER_MODULE_URI. - /// In addition, it is not allowed to set the vendor in the URI to @"tizen.org@", - /// as it is pre-assigned to the platform-defined sensors.\n - /// @since_tizen 4.0 - /// - /// @remarks If your application needs to publish health-related sensor data, - /// the URI category should be @"healthinfo@". - /// Then the applications without the privilege http://tizen.org/privilege/healthinfo - /// are not allowed to listen your application's health-related sensor. - /// - /// @remarks The @a provider must be released using sensor_destroy_provider(). - /// - /// @param[in] uri The URI of sensor to be created - /// @param[out] provider The sensor provider handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_destroy_provider() - int sensor_create_provider( - ffi.Pointer uri, - ffi.Pointer provider, - ) { - return _sensor_create_provider( - uri, - provider, - ); - } - - late final _sensor_create_providerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('sensor_create_provider'); - late final _sensor_create_provider = _sensor_create_providerPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Registers the sensor provider. - /// @details A sensor provider is created via sensor_create_provider(), - /// and the three callback functions sensor_provider_start_cb(), sensor_provider_stop_cb(), - /// and sensor_provider_set_interval_changed_cb() should be set in advance. - /// @since_tizen 4.0 - /// - /// @param[in] provider The sensor provider handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_remove_provider() - int sensor_add_provider( - sensor_provider_h provider, - ) { - return _sensor_add_provider( - provider, - ); - } - - late final _sensor_add_providerPtr = - _lookup>( - 'sensor_add_provider'); - late final _sensor_add_provider = - _sensor_add_providerPtr.asFunction(); - - /// @brief Unregisters the sensor provider. - /// @since_tizen 4.0 - /// - /// @param[in] provider The sensor provider handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_add_provider() - int sensor_remove_provider( - sensor_provider_h provider, - ) { - return _sensor_remove_provider( - provider, - ); - } - - late final _sensor_remove_providerPtr = - _lookup>( - 'sensor_remove_provider'); - late final _sensor_remove_provider = - _sensor_remove_providerPtr.asFunction(); - - /// @brief Releases all the resources allocated for the sensor provider. - /// @since_tizen 4.0 - /// - /// @remarks If this function is called before sensor_remove_provider() is called, - /// then the sensor provider will be implicitly unregistered. - /// - /// @param[in] provider The sensor provider handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see sensor_create_provider() - int sensor_destroy_provider( - sensor_provider_h provider, - ) { - return _sensor_destroy_provider( - provider, - ); - } - - late final _sensor_destroy_providerPtr = - _lookup>( - 'sensor_destroy_provider'); - late final _sensor_destroy_provider = - _sensor_destroy_providerPtr.asFunction(); - - /// @brief Sets the name to the sensor provider. - /// @since_tizen 4.0 - /// - /// @param[in] provider The sensor provider handle - /// @param[in] name The name of the sensor - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre sensor_create_provider() - /// @see sensor_provider_set_vendor() - /// sensor_provider_set_range() - /// sensor_provider_set_resolution() - int sensor_provider_set_name( - sensor_provider_h provider, - ffi.Pointer name, - ) { - return _sensor_provider_set_name( - provider, - name, - ); - } - - late final _sensor_provider_set_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_provider_h, - ffi.Pointer)>>('sensor_provider_set_name'); - late final _sensor_provider_set_name = _sensor_provider_set_namePtr - .asFunction)>(); - - /// @brief Sets the vendor to the sensor provider. - /// @since_tizen 4.0 - /// - /// @param[in] provider The sensor provider handle - /// @param[in] vendor The vendor of the sensor - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre sensor_create_provider() - /// @see sensor_provider_set_name() - /// sensor_provider_set_range() - /// sensor_provider_set_resolution() - int sensor_provider_set_vendor( - sensor_provider_h provider, - ffi.Pointer vendor, - ) { - return _sensor_provider_set_vendor( - provider, - vendor, - ); - } - - late final _sensor_provider_set_vendorPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_provider_h, - ffi.Pointer)>>('sensor_provider_set_vendor'); - late final _sensor_provider_set_vendor = _sensor_provider_set_vendorPtr - .asFunction)>(); - - /// @brief Sets the range of possible sensor values to the sensor provider. - /// @since_tizen 4.0 - /// - /// @remarks If the application does not set the range, the default values are 0 and 1. - /// - /// @param[in] provider The sensor provider handle - /// @param[in] min_range The lower bound - /// @param[in] max_range The upper bound - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre sensor_create_provider() - /// @see sensor_provider_set_name() - /// sensor_provider_set_vendor() - /// sensor_provider_set_resolution() - int sensor_provider_set_range( - sensor_provider_h provider, - double min_range, - double max_range, - ) { - return _sensor_provider_set_range( - provider, - min_range, - max_range, - ); - } - - late final _sensor_provider_set_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_provider_h, ffi.Float, - ffi.Float)>>('sensor_provider_set_range'); - late final _sensor_provider_set_range = _sensor_provider_set_rangePtr - .asFunction(); - - /// @brief Sets the resolution of sensor values to the sensor provider. - /// @since_tizen 4.0 - /// - /// @remarks If the application does not set the resolution, the default value is 1. - /// - /// @param[in] provider The sensor provider handle - /// @param[in] resolution The resolution - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre sensor_create_provider() - /// @see sensor_provider_set_name() - /// sensor_provider_set_vendor() - /// sensor_provider_set_range() - int sensor_provider_set_resolution( - sensor_provider_h provider, - double resolution, - ) { - return _sensor_provider_set_resolution( - provider, - resolution, - ); - } - - late final _sensor_provider_set_resolutionPtr = _lookup< - ffi.NativeFunction>( - 'sensor_provider_set_resolution'); - late final _sensor_provider_set_resolution = - _sensor_provider_set_resolutionPtr - .asFunction(); - - /// @brief Registers the callback function to be invoked when a listener starts the sensor provider. - /// @since_tizen 4.0 - /// - /// @param[in] provider The provider handle - /// @param[in] callback The callback function to attach to the @a provider handle - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_provider_set_start_cb( - sensor_provider_h provider, - sensor_provider_start_cb callback, - ffi.Pointer user_data, - ) { - return _sensor_provider_set_start_cb( - provider, - callback, - user_data, - ); - } - - late final _sensor_provider_set_start_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_provider_h, sensor_provider_start_cb, - ffi.Pointer)>>('sensor_provider_set_start_cb'); - late final _sensor_provider_set_start_cb = - _sensor_provider_set_start_cbPtr.asFunction< - int Function(sensor_provider_h, sensor_provider_start_cb, - ffi.Pointer)>(); - - /// @brief Registers the callback function to be invoked when a sensor listener stops the sensor provider. - /// @since_tizen 4.0 - /// - /// @param[in] provider The sensor provider handle - /// @param[in] callback The callback function to attach to the @a provider handle - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_provider_set_stop_cb( - sensor_provider_h provider, - sensor_provider_stop_cb callback, - ffi.Pointer user_data, - ) { - return _sensor_provider_set_stop_cb( - provider, - callback, - user_data, - ); - } - - late final _sensor_provider_set_stop_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_provider_h, sensor_provider_stop_cb, - ffi.Pointer)>>('sensor_provider_set_stop_cb'); - late final _sensor_provider_set_stop_cb = - _sensor_provider_set_stop_cbPtr.asFunction< - int Function(sensor_provider_h, sensor_provider_stop_cb, - ffi.Pointer)>(); - - /// @brief Registers the callback function to be invoked when the interval is changed. - /// @since_tizen 4.0 - /// - /// @param[in] provider The sensor provider handle - /// @param[in] callback The callback function to attach to the @a provider handle - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_provider_set_interval_changed_cb( - sensor_provider_h provider, - sensor_provider_interval_changed_cb callback, - ffi.Pointer user_data, - ) { - return _sensor_provider_set_interval_changed_cb( - provider, - callback, - user_data, - ); - } - - late final _sensor_provider_set_interval_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_provider_h, - sensor_provider_interval_changed_cb, ffi.Pointer)>>( - 'sensor_provider_set_interval_changed_cb'); - late final _sensor_provider_set_interval_changed_cb = - _sensor_provider_set_interval_changed_cbPtr.asFunction< - int Function(sensor_provider_h, sensor_provider_interval_changed_cb, - ffi.Pointer)>(); - - /// @brief Publishes a sensor event through the declared sensor. - /// @details This function publishes a sensor's data to its listeners. - /// @since_tizen 4.0 - /// - /// @param[in] provider The sensor provider handle - /// @param[out] event The sensor event - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_provider_publish( - sensor_provider_h provider, - sensor_event_s event, - ) { - return _sensor_provider_publish( - provider, - event, - ); - } - - late final _sensor_provider_publishPtr = _lookup< - ffi - .NativeFunction>( - 'sensor_provider_publish'); - late final _sensor_provider_publish = _sensor_provider_publishPtr - .asFunction(); - - /// @brief Checks whether it is supported to record a given sensor type. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @param[in] type A sensor type to check - /// @param[out] supported If supported, @c true; Otherwise @c false - /// - /// @return #SENSOR_ERROR_NONE on success; Otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_recorder_is_supported( - int type, - ffi.Pointer supported, - ) { - return _sensor_recorder_is_supported( - type, - supported, - ); - } - - late final _sensor_recorder_is_supportedPtr = _lookup< - ffi - .NativeFunction)>>( - 'sensor_recorder_is_supported'); - late final _sensor_recorder_is_supported = _sensor_recorder_is_supportedPtr - .asFunction)>(); - - /// @brief Starts to record a given sensor type. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @remarks Some sensor types are privileged. An application should have the privilege - /// http://tizen.org/privilege/healthinfo to get access to the following sensors: - /// #SENSOR_HRM, #SENSOR_HRM_LED_GREEN, #SENSOR_HRM_LED_IR, #SENSOR_HRM_LED_RED, - /// #SENSOR_HUMAN_PEDOMETER, #SENSOR_HUMAN_SLEEP_MONITOR, #SENSOR_HUMAN_SLEEP_DETECTOR, - /// and #SENSOR_HUMAN_STRESS_MONITOR. - /// - /// @param[in] type A sensor type to be recorded - /// @param[in] option Option - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_NOT_SUPPORTED Not supported to record the sensor type - /// @retval #SENSOR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// @retval #SENSOR_ERROR_NOT_AVAILABLE The sensor is already being recorded by the request of the current application - /// - /// @see sensor_recorder_stop() - int sensor_recorder_start( - int type, - sensor_recorder_option_h option, - ) { - return _sensor_recorder_start( - type, - option, - ); - } - - late final _sensor_recorder_startPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, sensor_recorder_option_h)>>('sensor_recorder_start'); - late final _sensor_recorder_start = _sensor_recorder_startPtr - .asFunction(); - - /// @brief Stops recording a given sensor type. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @param[in] type A sensor type being recorded - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_NOT_SUPPORTED The sensor type is not supported - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_recorder_start() - int sensor_recorder_stop( - int type, - ) { - return _sensor_recorder_stop( - type, - ); - } - - late final _sensor_recorder_stopPtr = - _lookup>( - 'sensor_recorder_stop'); - late final _sensor_recorder_stop = - _sensor_recorder_stopPtr.asFunction(); - - /// @brief Creates a recorder option handle. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @remarks The @a option must be released using sensor_recorder_destroy_option(). - /// - /// @param[out] option Option handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_recorder_create_option( - ffi.Pointer option, - ) { - return _sensor_recorder_create_option( - option, - ); - } - - late final _sensor_recorder_create_optionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'sensor_recorder_create_option'); - late final _sensor_recorder_create_option = _sensor_recorder_create_optionPtr - .asFunction)>(); - - /// @brief Destroys a recorder option handle. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @param[in] option Option handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_recorder_destroy_option( - sensor_recorder_option_h option, - ) { - return _sensor_recorder_destroy_option( - option, - ); - } - - late final _sensor_recorder_destroy_optionPtr = - _lookup>( - 'sensor_recorder_destroy_option'); - late final _sensor_recorder_destroy_option = - _sensor_recorder_destroy_optionPtr - .asFunction(); - - /// @brief Sets a recording option parameter. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @param[in] option Option handle - /// @param[in] param Option parameter - /// @param[in] value Value - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_recorder_option_set_int( - sensor_recorder_option_h option, - int param, - int value, - ) { - return _sensor_recorder_option_set_int( - option, - param, - value, - ); - } - - late final _sensor_recorder_option_set_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_recorder_option_h, ffi.Int32, - ffi.Int)>>('sensor_recorder_option_set_int'); - late final _sensor_recorder_option_set_int = - _sensor_recorder_option_set_intPtr - .asFunction(); - - /// @brief Creates a recorder query handle. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @remarks The @a query must be released using sensor_recorder_destroy_query(). - /// - /// @param[out] query Query handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_recorder_create_query( - ffi.Pointer query, - ) { - return _sensor_recorder_create_query( - query, - ); - } - - late final _sensor_recorder_create_queryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'sensor_recorder_create_query'); - late final _sensor_recorder_create_query = _sensor_recorder_create_queryPtr - .asFunction)>(); - - /// @brief Destroys a recorder query handle. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @param[in] query Query handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_recorder_destroy_query( - sensor_recorder_query_h query, - ) { - return _sensor_recorder_destroy_query( - query, - ); - } - - late final _sensor_recorder_destroy_queryPtr = - _lookup>( - 'sensor_recorder_destroy_query'); - late final _sensor_recorder_destroy_query = _sensor_recorder_destroy_queryPtr - .asFunction(); - - /// @brief Sets an integer-type query parameter - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @param[in] query Query handle - /// @param[in] param Query parameter - /// @param[in] value Value - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_recorder_query_set_int( - sensor_recorder_query_h query, - int param, - int value, - ) { - return _sensor_recorder_query_set_int( - query, - param, - value, - ); - } - - late final _sensor_recorder_query_set_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_recorder_query_h, ffi.Int32, - ffi.Int)>>('sensor_recorder_query_set_int'); - late final _sensor_recorder_query_set_int = _sensor_recorder_query_set_intPtr - .asFunction(); - - /// @brief Sets a time-type query parameter. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @param[in] query Query handle - /// @param[in] param Query parameter - /// @param[in] t Time - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_recorder_query_set_time( - sensor_recorder_query_h query, - int param, - int t, - ) { - return _sensor_recorder_query_set_time( - query, - param, - t, - ); - } - - late final _sensor_recorder_query_set_timePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_recorder_query_h, ffi.Int32, - time_t)>>('sensor_recorder_query_set_time'); - late final _sensor_recorder_query_set_time = - _sensor_recorder_query_set_timePtr - .asFunction(); - - /// @brief Queries the recorded data asynchronously. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @remarks Some sensor types are privileged. An application should have the privilege - /// http://tizen.org/privilege/healthinfo to get access to the following sensors: - /// #SENSOR_HRM, #SENSOR_HRM_LED_GREEN, #SENSOR_HRM_LED_IR, #SENSOR_HRM_LED_RED, - /// #SENSOR_HUMAN_PEDOMETER, #SENSOR_HUMAN_SLEEP_MONITOR, #SENSOR_HUMAN_SLEEP_DETECTOR, - /// and #SENSOR_HUMAN_STRESS_MONITOR. - /// - /// @param[in] type Sensor type - /// @param[in] query Query handle - /// @param[in] cb Callback function to receive the queried data - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_NOT_SUPPORTED Not supported to record the sensor type - /// @retval #SENSOR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_recorder_read_sync() - int sensor_recorder_read( - int type, - sensor_recorder_query_h query, - sensor_recorder_data_cb cb, - ffi.Pointer user_data, - ) { - return _sensor_recorder_read( - type, - query, - cb, - user_data, - ); - } - - late final _sensor_recorder_readPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - sensor_recorder_query_h, - sensor_recorder_data_cb, - ffi.Pointer)>>('sensor_recorder_read'); - late final _sensor_recorder_read = _sensor_recorder_readPtr.asFunction< - int Function(int, sensor_recorder_query_h, sensor_recorder_data_cb, - ffi.Pointer)>(); - - /// @brief Queries the recorded data synchronously. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @remarks Some sensor types are privileged. An application should have the privilege - /// http://tizen.org/privilege/healthinfo to get access to the following sensors: - /// #SENSOR_HRM, #SENSOR_HRM_LED_GREEN, #SENSOR_HRM_LED_IR, #SENSOR_HRM_LED_RED, - /// #SENSOR_HUMAN_PEDOMETER, #SENSOR_HUMAN_SLEEP_MONITOR, #SENSOR_HUMAN_SLEEP_DETECTOR, - /// and #SENSOR_HUMAN_STRESS_MONITOR. - /// - /// @param[in] type Sensor type - /// @param[in] query Query handle - /// @param[in] cb Callback function to receive the queried data - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_NOT_SUPPORTED Not supported to record the sensor type - /// @retval #SENSOR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// @retval #SENSOR_ERROR_NO_DATA No data retrieved - /// - /// @see sensor_recorder_read() - int sensor_recorder_read_sync( - int type, - sensor_recorder_query_h query, - sensor_recorder_data_cb cb, - ffi.Pointer user_data, - ) { - return _sensor_recorder_read_sync( - type, - query, - cb, - user_data, - ); - } - - late final _sensor_recorder_read_syncPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - sensor_recorder_query_h, - sensor_recorder_data_cb, - ffi.Pointer)>>('sensor_recorder_read_sync'); - late final _sensor_recorder_read_sync = - _sensor_recorder_read_syncPtr.asFunction< - int Function(int, sensor_recorder_query_h, sensor_recorder_data_cb, - ffi.Pointer)>(); - - /// @brief Gets the start and the end time of the time period of a given record data. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @param[in] data Record data handle - /// @param[out] start_time Start time of the time period of the record - /// @param[out] end_time End time of the time period of the record - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_recorder_data_get_time( - sensor_recorder_data_h data, - ffi.Pointer start_time, - ffi.Pointer end_time, - ) { - return _sensor_recorder_data_get_time( - data, - start_time, - end_time, - ); - } - - late final _sensor_recorder_data_get_timePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_recorder_data_h, ffi.Pointer, - ffi.Pointer)>>('sensor_recorder_data_get_time'); - late final _sensor_recorder_data_get_time = - _sensor_recorder_data_get_timePtr.asFunction< - int Function(sensor_recorder_data_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets an integer value from a record data. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @param[in] data Record data handle - /// @param[in] key Data attribute to retrieve - /// @param[out] value Retrieved value - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// @retval #SENSOR_ERROR_NO_DATA No data retrieved - int sensor_recorder_data_get_int( - sensor_recorder_data_h data, - int key, - ffi.Pointer value, - ) { - return _sensor_recorder_data_get_int( - data, - key, - value, - ); - } - - late final _sensor_recorder_data_get_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_recorder_data_h, ffi.Int32, - ffi.Pointer)>>('sensor_recorder_data_get_int'); - late final _sensor_recorder_data_get_int = - _sensor_recorder_data_get_intPtr.asFunction< - int Function(sensor_recorder_data_h, int, ffi.Pointer)>(); - - /// @brief Gets a double value from a record data. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @param[in] data Record data handle - /// @param[in] key Data attribute to retrieve - /// @param[out] value Retrieved value - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// @retval #SENSOR_ERROR_NO_DATA No data retrieved - int sensor_recorder_data_get_double( - sensor_recorder_data_h data, - int key, - ffi.Pointer value, - ) { - return _sensor_recorder_data_get_double( - data, - key, - value, - ); - } - - late final _sensor_recorder_data_get_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_recorder_data_h, ffi.Int32, - ffi.Pointer)>>('sensor_recorder_data_get_double'); - late final _sensor_recorder_data_get_double = - _sensor_recorder_data_get_doublePtr.asFunction< - int Function(sensor_recorder_data_h, int, ffi.Pointer)>(); - - /// @brief Gets the inclination matrix @"I@" and rotation matrix @"R@" transforming a vector from the device coordinate to the world's coordinate. - /// - /// @details [0 0 g] = R * gravity (g = magnitude of gravity) \n - /// [0 m 0] = I * R * geomagnetic (m = magnitude of the geomagnetic field) \n - /// R is the identity matrix when the device is aligned with the world's coordinate system, that is, when the device's X axis points towards the East, the Y axis points to the North Pole and the device is facing the sky. \n - /// I is a rotation matrix transforming the geomagnetic vector into the same coordinate space as gravity (the world's coordinate space). I is a simple rotation around the X axis. \n - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks Parameters Gx, Gy, and Gz can be obtained from the values returned by #SENSOR_GRAVITY. \n - /// Parameters Mx, My, and Mz can be obtained from the values returned by #SENSOR_MAGNETIC. - /// Output parameter R and I are always returned as a 3x3 matrix array of 9 floats like this form: - ///
-  /// { R[0], R[1], R[2],
-  /// R[3], R[4], R[5],
-  /// R[6], R[7], R[6] }
-  /// 
- /// - /// - /// @param[in] Gx The X-axis gravity vector in the device's coordinate - /// @param[in] Gy The Y-axis gravity vector in the device's coordinate - /// @param[in] Gz The Z-axis gravity vector in the device's coordinate - /// @param[in] Mx The X-axis geomagnetic vector in the device's coordinate - /// @param[in] My The Y-axis geomagnetic vector in the device's coordinate - /// @param[in] Mz The Z-axis geomagnetic vector in the device's coordinate - /// @param[out] R The array of 9 floats that represent the rotation matrix @"R@" \n - /// It can be null. - /// @param[out] I The array of 9 floats that represent the inclination matrix @"I@" \n - /// It can be null. - /// - /// @return #SENSOR_ERROR_NONE on success; Otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - int sensor_util_get_rotation_matrix( - double Gx, - double Gy, - double Gz, - double Mx, - double My, - double Mz, - ffi.Pointer R, - ffi.Pointer I, - ) { - return _sensor_util_get_rotation_matrix( - Gx, - Gy, - Gz, - Mx, - My, - Mz, - R, - I, - ); - } - - late final _sensor_util_get_rotation_matrixPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Float, - ffi.Float, - ffi.Float, - ffi.Float, - ffi.Float, - ffi.Float, - ffi.Pointer, - ffi.Pointer)>>('sensor_util_get_rotation_matrix'); - late final _sensor_util_get_rotation_matrix = - _sensor_util_get_rotation_matrixPtr.asFunction< - int Function(double, double, double, double, double, double, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Converts a rotation vector to a rotation matrix. - /// - /// @details Rotation vectors (Vx, Vy, Vz) can be obtained from #SENSOR_ROTATION_VECTOR. - /// It returns a 9 element rotation matrix in the array R. R must have length as 9. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] Vx The X-axis rotation vector - /// @param[in] Vy The Y-axis rotation vector - /// @param[in] Vz The Z-axis rotation vector - /// @param[out] R A 9 element rotation matrix in the array R that must have length as 9 - /// - /// @return #SENSOR_ERROR_NONE on success; Otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - int sensor_util_get_rotation_matrix_from_vector( - double Vx, - double Vy, - double Vz, - ffi.Pointer R, - ) { - return _sensor_util_get_rotation_matrix_from_vector( - Vx, - Vy, - Vz, - R, - ); - } - - late final _sensor_util_get_rotation_matrix_from_vectorPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Float, ffi.Float, ffi.Float, ffi.Pointer)>>( - 'sensor_util_get_rotation_matrix_from_vector'); - late final _sensor_util_get_rotation_matrix_from_vector = - _sensor_util_get_rotation_matrix_from_vectorPtr.asFunction< - int Function(double, double, double, ffi.Pointer)>(); - - /// @brief Rotates the supplied rotation matrix so that it is expressed in a different coordinate system. - /// - /// @details This is typically used when an application needs to compute the three orientation angles of the device in a different coordinate system. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks inR and outR can be the same array, but this is not recommended for performance reasons. - /// This returns an error when X and Y define the same axis. - /// - /// @param[in] inR The rotation matrix (3x3) to be transformed - /// @param[in] x The world axis and direction on which the X axis of the device is mapped - /// @param[in] y The world axis and direction on which the Y axis of the device is mapped - /// @param[out] outR The transformed rotation matrix (3x3) - /// - /// @return #SENSOR_ERROR_NONE on success; Otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - int sensor_util_remap_coordinate_system( - ffi.Pointer inR, - int x, - int y, - ffi.Pointer outR, - ) { - return _sensor_util_remap_coordinate_system( - inR, - x, - y, - outR, - ); - } - - late final _sensor_util_remap_coordinate_systemPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int32, ffi.Int32, - ffi.Pointer)>>('sensor_util_remap_coordinate_system'); - late final _sensor_util_remap_coordinate_system = - _sensor_util_remap_coordinate_systemPtr.asFunction< - int Function( - ffi.Pointer, int, int, ffi.Pointer)>(); - - /// @brief Computes the geomagnetic inclination angle in radians from the inclination matrix I returned by sensor_util_get_rotation_matrix(). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] I The inclination matrix from sensor_util_get_rotation_matrix() - /// @param[out] inclination The geomagnetic inclination angle in radians - /// - /// @return #SENSOR_ERROR_NONE on success; Otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see sensor_util_get_rotation_matrix() - int sensor_util_get_inclination( - ffi.Pointer I, - ffi.Pointer inclination, - ) { - return _sensor_util_get_inclination( - I, - inclination, - ); - } - - late final _sensor_util_get_inclinationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('sensor_util_get_inclination'); - late final _sensor_util_get_inclination = - _sensor_util_get_inclinationPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Computes the device's orientation based on the rotation matrix. - /// - /// @details When it returns, the array values are filled with the result: - /// - values[0]: azimuth, rotation around the Z axis. - /// - values[1]: pitch, rotation around the X axis. - /// - values[2]: roll, rotation around the Y axis. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks Parameter R must be an array of 9 floats from sensor_util_get_rotation_matrix() \n - /// Returned values are always arrays of 3 floats. - /// - /// @param[in] R A 9 element rotation matrix in the array - /// @param[out] values An array of 3 floats to hold the result - /// - /// @return #SENSOR_ERROR_NONE on success; Otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see sensor_util_get_rotation_matrix() - int sensor_util_get_orientation( - ffi.Pointer R, - ffi.Pointer values, - ) { - return _sensor_util_get_orientation( - R, - values, - ); - } - - late final _sensor_util_get_orientationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('sensor_util_get_orientation'); - late final _sensor_util_get_orientation = - _sensor_util_get_orientationPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Computes the angle change between two rotation matrices. - /// - /// @details Given a current rotation matrix (R) and a previous rotation matrix (prevR), it computes - /// the rotation around the x,y, and z axes which transforms prevR to R. - /// It outputs a 3 element vector containing the x,y, and z angle change at indexes 0, 1, and 2 respectively. \n - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks Each input matrix is a 3x3 matrix like this form: - ///
-  /// { R[0], R[1], R[2],
-  /// R[3], R[4], R[5],
-  /// R[6], R[7], R[6] }
-  /// 
- /// - /// @param[in] R The current rotation matrix - /// @param[in] prevR The previous rotation matrix - /// @param[out] angleChange An array of floats in which the angle change is stored - /// - /// @return #SENSOR_ERROR_NONE on success; Otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - int sensor_util_get_angle_change( - ffi.Pointer R, - ffi.Pointer prevR, - ffi.Pointer angleChange, - ) { - return _sensor_util_get_angle_change( - R, - prevR, - angleChange, - ); - } - - late final _sensor_util_get_angle_changePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('sensor_util_get_angle_change'); - late final _sensor_util_get_angle_change = - _sensor_util_get_angle_changePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the declination of the horizontal component of the magnetic field from true north, in degrees. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] latitude The latitude in geodetic coordinates - /// @param[in] longitude The longitude in geodetic coordinates - /// @param[in] altitude The altitude in geodetic coordinates - /// @param[out] declination The declination of the horizontal component of the magnetic field in degrees - /// - /// @return #SENSOR_ERROR_NONE on success; Otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - int sensor_util_get_declination( - double latitude, - double longitude, - double altitude, - ffi.Pointer declination, - ) { - return _sensor_util_get_declination( - latitude, - longitude, - altitude, - declination, - ); - } - - late final _sensor_util_get_declinationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Float, ffi.Float, ffi.Float, - ffi.Pointer)>>('sensor_util_get_declination'); - late final _sensor_util_get_declination = - _sensor_util_get_declinationPtr.asFunction< - int Function(double, double, double, ffi.Pointer)>(); - - /// @brief Gets the altitude from the atmospheric pressure, the pressure at sea level and temperature, in meters. - /// @since_tizen 4.0 - /// - /// @param[in] pressure The atmospheric pressure (hPa) - /// @param[in] sea_level_pressure The sea level pressure (hPa) @n - /// If the sea level pressure is not known, you can use 1013.25 hPa, mean sea level pressure - /// @param[in] temperature The temperature (degrees Celsius) @n - /// If the temperature is not known, you can use 15 degrees Celsius - /// @param[out] altitude The altitude (meters) - /// - /// @return #SENSOR_ERROR_NONE on success; Otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - int sensor_util_get_altitude( - double pressure, - double sea_level_pressure, - double temperature, - ffi.Pointer altitude, - ) { - return _sensor_util_get_altitude( - pressure, - sea_level_pressure, - temperature, - altitude, - ); - } - - late final _sensor_util_get_altitudePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Float, ffi.Float, ffi.Float, - ffi.Pointer)>>('sensor_util_get_altitude'); - late final _sensor_util_get_altitude = - _sensor_util_get_altitudePtr.asFunction< - int Function(double, double, double, ffi.Pointer)>(); - - /// @brief Retrieves all the storage in a device. - /// @details This function invokes the callback function once for each storage in a device. \n - /// If storage_device_supported_cb() returns @c false, then the iteration will be finished. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] callback The iteration callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STORAGE_ERROR_NONE Successful - /// @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @post This function invokes storage_device_supported_cb() repeatedly for each supported device. - /// @see storage_device_supported_cb() - int storage_foreach_device_supported( - storage_device_supported_cb callback, - ffi.Pointer user_data, - ) { - return _storage_foreach_device_supported( - callback, - user_data, - ); - } - - late final _storage_foreach_device_supportedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(storage_device_supported_cb, - ffi.Pointer)>>('storage_foreach_device_supported'); - late final _storage_foreach_device_supported = - _storage_foreach_device_supportedPtr.asFunction< - int Function(storage_device_supported_cb, ffi.Pointer)>(); - - /// @brief Gets the absolute path to the root directory of the given storage. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks Files saved on the internal/external storage are readable or writable by all applications.\n - /// When an application is uninstalled, the files written by that application are not removed from the internal/external storage.\n - /// If you want to access files or directories in internal storage, you must declare http://tizen.org/privilege/mediastorage.\n - /// If you want to access files or directories in external storage, you must declare http://tizen.org/privilege/externalstorage.\n - /// You must release @a path using free(). - /// @param[in] storage_id The storage device - /// @param[out] path The absolute path to the storage directory - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STORAGE_ERROR_NONE Successful - /// @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STORAGE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STORAGE_ERROR_NOT_SUPPORTED Storage not supported - /// @see storage_get_state() - int storage_get_root_directory( - int storage_id, - ffi.Pointer> path, - ) { - return _storage_get_root_directory( - storage_id, - path, - ); - } - - late final _storage_get_root_directoryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer>)>>( - 'storage_get_root_directory'); - late final _storage_get_root_directory = _storage_get_root_directoryPtr - .asFunction>)>(); - - /// @brief Gets the absolute path to the each directory of the given storage. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks Files saved on the internal/external storage are readable or writable by all applications.\n - /// When an application is uninstalled, the files written by that application are not removed from the internal/external storage.\n - /// The directory path may not exist, so you must make sure that it exists before using it.\n - /// If you want to access files or directories in internal storage except #STORAGE_DIRECTORY_SYSTEM_RINGTONES, you must declare http://tizen.org/privilege/mediastorage.\n - /// If you want to access files or directories in #STORAGE_DIRECTORY_SYSTEM_RINGTONES, you must declare %http://tizen.org/privilege/systemsettings.\n - /// If you want to access files or directories in external storage, you must declare http://tizen.org/privilege/externalstorage.\n - /// You must release @a path using free(). - /// @param[in] storage_id The storage device - /// @param[in] type The directory type - /// @param[out] path The absolute path to the directory type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STORAGE_ERROR_NONE Successful - /// @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STORAGE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STORAGE_ERROR_NOT_SUPPORTED Storage not supported - /// @see storage_get_state() - int storage_get_directory( - int storage_id, - int type, - ffi.Pointer> path, - ) { - return _storage_get_directory( - storage_id, - type, - path, - ); - } - - late final _storage_get_directoryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Int32, - ffi.Pointer>)>>('storage_get_directory'); - late final _storage_get_directory = _storage_get_directoryPtr - .asFunction>)>(); - - /// @brief Gets the type of the given storage. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] storage_id The storage device - /// @param[out] type The type of the storage - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STORAGE_ERROR_NONE Successful - /// @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STORAGE_ERROR_NOT_SUPPORTED Storage not supported - int storage_get_type( - int storage_id, - ffi.Pointer type, - ) { - return _storage_get_type( - storage_id, - type, - ); - } - - late final _storage_get_typePtr = _lookup< - ffi - .NativeFunction)>>( - 'storage_get_type'); - late final _storage_get_type = _storage_get_typePtr - .asFunction)>(); - - /// @brief Gets the current state of the given storage. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] storage_id The storage device - /// @param[out] state The current state of the storage - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STORAGE_ERROR_NONE Successful - /// @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STORAGE_ERROR_NOT_SUPPORTED Storage not supported - /// @see storage_get_root_directory() - /// @see storage_get_total_space() - /// @see storage_get_available_space() - int storage_get_state( - int storage_id, - ffi.Pointer state, - ) { - return _storage_get_state( - storage_id, - state, - ); - } - - late final _storage_get_statePtr = _lookup< - ffi - .NativeFunction)>>( - 'storage_get_state'); - late final _storage_get_state = _storage_get_statePtr - .asFunction)>(); - - /// @brief Registers a callback function to be invoked when the state of the storage changes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] storage_id The storage device - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STORAGE_ERROR_NONE Successful - /// @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STORAGE_ERROR_NOT_SUPPORTED Storage not supported - /// @retval #STORAGE_ERROR_OPERATION_FAILED Operation failed - /// @post storage_state_changed_cb() will be invoked if the state of the registered storage changes. - /// @see storage_state_changed_cb() - /// @see storage_unset_state_changed_cb() - int storage_set_state_changed_cb( - int storage_id, - storage_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _storage_set_state_changed_cb( - storage_id, - callback, - user_data, - ); - } - - late final _storage_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, storage_state_changed_cb, - ffi.Pointer)>>('storage_set_state_changed_cb'); - late final _storage_set_state_changed_cb = - _storage_set_state_changed_cbPtr.asFunction< - int Function(int, storage_state_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] storage_id The storage device to monitor - /// @param[in] callback The callback function to register - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STORAGE_ERROR_NONE Successful - /// @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STORAGE_ERROR_NOT_SUPPORTED Storage not supported - /// @retval #STORAGE_ERROR_OPERATION_FAILED Operation failed - /// @see storage_state_changed_cb() - /// @see storage_set_state_changed_cb() - int storage_unset_state_changed_cb( - int storage_id, - storage_state_changed_cb callback, - ) { - return _storage_unset_state_changed_cb( - storage_id, - callback, - ); - } - - late final _storage_unset_state_changed_cbPtr = _lookup< - ffi - .NativeFunction>( - 'storage_unset_state_changed_cb'); - late final _storage_unset_state_changed_cb = - _storage_unset_state_changed_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be invoked when the state of the specified storage device type changes. - /// @since_tizen 3.0 - /// @param[in] type The type of the storage device - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STORAGE_ERROR_NONE Successful - /// @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STORAGE_ERROR_NOT_SUPPORTED Storage not supported - /// @retval #STORAGE_ERROR_OPERATION_FAILED Operation failed - /// @post storage_changed_cb() will be invoked if the state of the registered storage type changes. - /// @see storage_changed_cb() - /// @see storage_unset_changed_cb() - int storage_set_changed_cb( - int type, - storage_changed_cb callback, - ffi.Pointer user_data, - ) { - return _storage_set_changed_cb( - type, - callback, - user_data, - ); - } - - late final _storage_set_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, storage_changed_cb, - ffi.Pointer)>>('storage_set_changed_cb'); - late final _storage_set_changed_cb = _storage_set_changed_cbPtr.asFunction< - int Function(int, storage_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function for storage type state changes. - /// @since_tizen 3.0 - /// @param[in] type The type of the the storage device - /// @param[in] callback The callback function to unregister - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STORAGE_ERROR_NONE Successful - /// @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STORAGE_ERROR_NOT_SUPPORTED Storage not supported - /// @retval #STORAGE_ERROR_OPERATION_FAILED Operation failed - /// @see storage_changed_cb() - /// @see storage_set_changed_cb() - int storage_unset_changed_cb( - int type, - storage_changed_cb callback, - ) { - return _storage_unset_changed_cb( - type, - callback, - ); - } - - late final _storage_unset_changed_cbPtr = _lookup< - ffi.NativeFunction>( - 'storage_unset_changed_cb'); - late final _storage_unset_changed_cb = _storage_unset_changed_cbPtr - .asFunction(); - - /// @brief Gets the total space of the given storage in bytes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] storage_id The storage device - /// @param[out] bytes The total space size of the storage (bytes) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STORAGE_ERROR_NONE Successful - /// @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STORAGE_ERROR_NOT_SUPPORTED Storage not supported - /// @retval #STORAGE_ERROR_OPERATION_FAILED Operation failed - /// @see storage_get_state() - /// @see storage_get_available_space() - int storage_get_total_space( - int storage_id, - ffi.Pointer bytes, - ) { - return _storage_get_total_space( - storage_id, - bytes, - ); - } - - late final _storage_get_total_spacePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, - ffi.Pointer)>>('storage_get_total_space'); - late final _storage_get_total_space = _storage_get_total_spacePtr - .asFunction)>(); - - /// @brief Gets the available space size of the given storage in bytes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] storage_id The storage device - /// @param[out] bytes The available space size of the storage (bytes) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STORAGE_ERROR_NONE Successful - /// @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STORAGE_ERROR_NOT_SUPPORTED Storage not supported - /// @retval #STORAGE_ERROR_OPERATION_FAILED Operation failed - /// @see storage_get_state() - /// @see storage_get_total_space() - int storage_get_available_space( - int storage_id, - ffi.Pointer bytes, - ) { - return _storage_get_available_space( - storage_id, - bytes, - ); - } - - late final _storage_get_available_spacePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer)>>( - 'storage_get_available_space'); - late final _storage_get_available_space = _storage_get_available_spacePtr - .asFunction)>(); - - int storage_get_internal_memory_size( - ffi.Pointer buf, - ) { - return _storage_get_internal_memory_size( - buf, - ); - } - - late final _storage_get_internal_memory_sizePtr = - _lookup)>>( - 'storage_get_internal_memory_size'); - late final _storage_get_internal_memory_size = - _storage_get_internal_memory_sizePtr - .asFunction)>(); - - int storage_get_external_memory_size( - ffi.Pointer buf, - ) { - return _storage_get_external_memory_size( - buf, - ); - } - - late final _storage_get_external_memory_sizePtr = - _lookup)>>( - 'storage_get_external_memory_size'); - late final _storage_get_external_memory_size = - _storage_get_external_memory_sizePtr - .asFunction)>(); - - /// @brief Gets the boolean value of the @a platform feature. - /// @since_tizen 2.3 - /// @param[in] key The name of the platform feature to get - /// @param[out] value The value of the given platform feature - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SYSTEM_INFO_ERROR_NONE Successful - /// @retval #SYSTEM_INFO_ERROR_INVALID_PARAMETER Cannot find the @a key in the model config file - /// @retval #SYSTEM_INFO_ERROR_IO_ERROR An input/output error occurred while reading the @a value from the model config file - /// @retval #SYSTEM_INFO_ERROR_PERMISSION_DENIED No permission to use the API - int system_info_get_platform_bool( - ffi.Pointer key, - ffi.Pointer value, - ) { - return _system_info_get_platform_bool( - key, - value, - ); - } - - late final _system_info_get_platform_boolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('system_info_get_platform_bool'); - late final _system_info_get_platform_bool = _system_info_get_platform_boolPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Gets the integer value of the @a platform feature. - /// @since_tizen 2.3 - /// @param[in] key The name of the platform feature to get - /// @param[out] value The value of the given platform feature - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SYSTEM_INFO_ERROR_NONE Successful - /// @retval #SYSTEM_INFO_ERROR_INVALID_PARAMETER Cannot find the @a key in the model config file - /// @retval #SYSTEM_INFO_ERROR_IO_ERROR An input/output error occurred while reading the @a value from the model config file - /// @retval #SYSTEM_INFO_ERROR_PERMISSION_DENIED No permission to use the API - int system_info_get_platform_int( - ffi.Pointer key, - ffi.Pointer value, - ) { - return _system_info_get_platform_int( - key, - value, - ); - } - - late final _system_info_get_platform_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('system_info_get_platform_int'); - late final _system_info_get_platform_int = _system_info_get_platform_intPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Gets the double value of the @a platform feature. - /// @since_tizen 2.3 - /// @param[in] key The name of the platform feature to get - /// @param[out] value The value of the given platform feature - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SYSTEM_INFO_ERROR_NONE Successful - /// @retval #SYSTEM_INFO_ERROR_INVALID_PARAMETER Cannot find the @a key in the model config file - /// @retval #SYSTEM_INFO_ERROR_IO_ERROR An input/output error occurred while reading the @a value from the model config file - /// @retval #SYSTEM_INFO_ERROR_PERMISSION_DENIED No permission to use the API - int system_info_get_platform_double( - ffi.Pointer key, - ffi.Pointer value, - ) { - return _system_info_get_platform_double( - key, - value, - ); - } - - late final _system_info_get_platform_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('system_info_get_platform_double'); - late final _system_info_get_platform_double = - _system_info_get_platform_doublePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the string value of the @a platform feature. - /// @since_tizen 2.3 - /// @remarks You must release the @a value using free(). - /// @param[in] key The name of the platform feature to get - /// @param[out] value The value of the given platform feature - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SYSTEM_INFO_ERROR_NONE Successful - /// @retval #SYSTEM_INFO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SYSTEM_INFO_ERROR_INVALID_PARAMETER Cannot find the @a key in the model config file - /// @retval #SYSTEM_INFO_ERROR_IO_ERROR An input/output error occurred while reading the @a value from the model config file - /// @retval #SYSTEM_INFO_ERROR_PERMISSION_DENIED No permission to use the API - int system_info_get_platform_string( - ffi.Pointer key, - ffi.Pointer> value, - ) { - return _system_info_get_platform_string( - key, - value, - ); - } - - late final _system_info_get_platform_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer>)>>( - 'system_info_get_platform_string'); - late final _system_info_get_platform_string = - _system_info_get_platform_stringPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Gets the boolean value of the @a custom feature. - /// @since_tizen 2.3 - /// @param[in] key The name of the custom feature to get. NOTE: This custom function uses a custom key which is provided by OEM's - /// @param[out] value The value of the given custom feature - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SYSTEM_INFO_ERROR_NONE Successful - /// @retval #SYSTEM_INFO_ERROR_INVALID_PARAMETER Cannot find the @a key in the model config file - /// @retval #SYSTEM_INFO_ERROR_IO_ERROR An input/output error occurred while reading the @a value from the model config file - /// @retval #SYSTEM_INFO_ERROR_PERMISSION_DENIED No permission to use the API - int system_info_get_custom_bool( - ffi.Pointer key, - ffi.Pointer value, - ) { - return _system_info_get_custom_bool( - key, - value, - ); - } - - late final _system_info_get_custom_boolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('system_info_get_custom_bool'); - late final _system_info_get_custom_bool = _system_info_get_custom_boolPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Gets the integer value of the @a custom feature. - /// @since_tizen 2.3 - /// @param[in] key The name of the custom feature to get. NOTE: This custom function uses a custom key which is provided by OEM's - /// @param[out] value The value of the given custom feature - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SYSTEM_INFO_ERROR_NONE Successful - /// @retval #SYSTEM_INFO_ERROR_INVALID_PARAMETER Cannot the find @a key in the model config file - /// @retval #SYSTEM_INFO_ERROR_IO_ERROR An input/output error occurred while reading the @a value from the model config file - /// @retval #SYSTEM_INFO_ERROR_PERMISSION_DENIED No permission to use the API - int system_info_get_custom_int( - ffi.Pointer key, - ffi.Pointer value, - ) { - return _system_info_get_custom_int( - key, - value, - ); - } - - late final _system_info_get_custom_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('system_info_get_custom_int'); - late final _system_info_get_custom_int = _system_info_get_custom_intPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Gets the double value of the @a custom feature. - /// @since_tizen 2.3 - /// @param[in] key The name of the custom feature to get. NOTE: This custom function uses a custom key which is provided by OEM's - /// @param[out] value The value of the given custom feature - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SYSTEM_INFO_ERROR_NONE Successful - /// @retval #SYSTEM_INFO_ERROR_INVALID_PARAMETER Cannot find the @a key in the model config file - /// @retval #SYSTEM_INFO_ERROR_IO_ERROR An input/output error occurred while reading the @a value from the model config file - /// @retval #SYSTEM_INFO_ERROR_PERMISSION_DENIED No permission to use the API - int system_info_get_custom_double( - ffi.Pointer key, - ffi.Pointer value, - ) { - return _system_info_get_custom_double( - key, - value, - ); - } - - late final _system_info_get_custom_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('system_info_get_custom_double'); - late final _system_info_get_custom_double = - _system_info_get_custom_doublePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the string value of the @a custom feature. - /// @since_tizen 2.3 - /// @remarks You must release the @a value using free(). - /// @param[in] key The name of the custom feature to get. NOTE: This custom function uses a custom key which is provided by OEM's - /// @param[out] value The value of the given custom feature - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SYSTEM_INFO_ERROR_NONE Successful - /// @retval #SYSTEM_INFO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SYSTEM_INFO_ERROR_INVALID_PARAMETER Cannot find the @a key in the model config file - /// @retval #SYSTEM_INFO_ERROR_IO_ERROR An input/output error occurred while reading the @a value from the model config file - /// @retval #SYSTEM_INFO_ERROR_PERMISSION_DENIED No permission to use the API - int system_info_get_custom_string( - ffi.Pointer key, - ffi.Pointer> value, - ) { - return _system_info_get_custom_string( - key, - value, - ); - } - - late final _system_info_get_custom_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer>)>>( - 'system_info_get_custom_string'); - late final _system_info_get_custom_string = - _system_info_get_custom_stringPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @internal - /// @brief Do not use it. It will be removed. - int system_info_get_value_int( - int key, - ffi.Pointer value, - ) { - return _system_info_get_value_int( - key, - value, - ); - } - - late final _system_info_get_value_intPtr = _lookup< - ffi - .NativeFunction)>>( - 'system_info_get_value_int'); - late final _system_info_get_value_int = _system_info_get_value_intPtr - .asFunction)>(); - - /// @internal - /// @brief Do not use it. It will be removed. - int system_info_get_value_bool( - int key, - ffi.Pointer value, - ) { - return _system_info_get_value_bool( - key, - value, - ); - } - - late final _system_info_get_value_boolPtr = _lookup< - ffi - .NativeFunction)>>( - 'system_info_get_value_bool'); - late final _system_info_get_value_bool = _system_info_get_value_boolPtr - .asFunction)>(); - - /// @internal - /// @brief Do not use it. It will be removed. - int system_info_get_value_double( - int key, - ffi.Pointer value, - ) { - return _system_info_get_value_double( - key, - value, - ); - } - - late final _system_info_get_value_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, - ffi.Pointer)>>('system_info_get_value_double'); - late final _system_info_get_value_double = _system_info_get_value_doublePtr - .asFunction)>(); - - /// @internal - /// @brief Do not use it. It will be removed. - int system_info_get_value_string( - int key, - ffi.Pointer> value, - ) { - return _system_info_get_value_string( - key, - value, - ); - } - - late final _system_info_get_value_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer>)>>( - 'system_info_get_value_string'); - late final _system_info_get_value_string = _system_info_get_value_stringPtr - .asFunction>)>(); - - /// @internal - /// @brief It is not decided if it should be opened to public. - int system_info_get_platform_type( - ffi.Pointer key, - ffi.Pointer type, - ) { - return _system_info_get_platform_type( - key, - type, - ); - } - - late final _system_info_get_platform_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('system_info_get_platform_type'); - late final _system_info_get_platform_type = - _system_info_get_platform_typePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @internal - /// @brief It is not decided if it should be opened to public. - int system_info_get_custom_type( - ffi.Pointer key, - ffi.Pointer type, - ) { - return _system_info_get_custom_type( - key, - type, - ); - } - - late final _system_info_get_custom_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('system_info_get_custom_type'); - late final _system_info_get_custom_type = - _system_info_get_custom_typePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @platform - /// @brief Sets the system settings value associated with the given key as an integer. - /// @since_tizen 2.3 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/systemsettings.admin - /// @remarks When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned. - /// @param[in] key The key name of the system settings - /// @param[out] value The new system settings value of the given key - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SYSTEM_SETTINGS_ERROR_NONE Successful - /// @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error - /// @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - /// @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device - int system_settings_set_value_int( - int key, - int value, - ) { - return _system_settings_set_value_int( - key, - value, - ); - } - - late final _system_settings_set_value_intPtr = - _lookup>( - 'system_settings_set_value_int'); - late final _system_settings_set_value_int = - _system_settings_set_value_intPtr.asFunction(); - - /// @brief Gets the system settings value associated with the given key as an integer. - /// @since_tizen 2.3 - /// @remarks When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned. - /// @param[in] key The key name of the system settings - /// @param[out] value The current system settings value of the given key - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SYSTEM_SETTINGS_ERROR_NONE Successful - /// @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error - /// @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - /// @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device - /// @warning %http://tizen.org/privilege/systemsettings (public level privilege) MUST NOT be declared to use this API since 2.3.1. - int system_settings_get_value_int( - int key, - ffi.Pointer value, - ) { - return _system_settings_get_value_int( - key, - value, - ); - } - - late final _system_settings_get_value_intPtr = _lookup< - ffi - .NativeFunction)>>( - 'system_settings_get_value_int'); - late final _system_settings_get_value_int = _system_settings_get_value_intPtr - .asFunction)>(); - - /// @platform - /// @brief Sets the system settings value associated with the given key as a boolean. - /// @since_tizen 2.3 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/systemsettings.admin - /// @remarks When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned. - /// @param[in] key The key name of the system settings - /// @param[out] value The new system settings value of the given key - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SYSTEM_SETTINGS_ERROR_NONE Successful - /// @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error - /// @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - /// @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device - int system_settings_set_value_bool( - int key, - bool value, - ) { - return _system_settings_set_value_bool( - key, - value, - ); - } - - late final _system_settings_set_value_boolPtr = - _lookup>( - 'system_settings_set_value_bool'); - late final _system_settings_set_value_bool = - _system_settings_set_value_boolPtr.asFunction(); - - /// @brief Gets the system settings value associated with the given key as a boolean. - /// @since_tizen 2.3 - /// @remarks When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned. - /// @param[in] key The key name of the system settings - /// @param[out] value The current system settings value of the given key - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SYSTEM_SETTINGS_ERROR_NONE Successful - /// @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error - /// @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - /// @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device - /// @warning %http://tizen.org/privilege/systemsettings (public level privilege) MUST NOT be declared to use this API since 2.3.1. - int system_settings_get_value_bool( - int key, - ffi.Pointer value, - ) { - return _system_settings_get_value_bool( - key, - value, - ); - } - - late final _system_settings_get_value_boolPtr = _lookup< - ffi - .NativeFunction)>>( - 'system_settings_get_value_bool'); - late final _system_settings_get_value_bool = - _system_settings_get_value_boolPtr - .asFunction)>(); - - /// @platform - /// @brief Sets the system settings value associated with the given key as a string. - /// @since_tizen 2.3 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/systemsettings.admin - /// @remarks #SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE is not available for setting. When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned. - /// @param[in] key The key name of the system settings - /// @param[out] value The new system settings value of the given key - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SYSTEM_SETTINGS_ERROR_NONE Successful - /// @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error - /// @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - /// @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device - int system_settings_set_value_string( - int key, - ffi.Pointer value, - ) { - return _system_settings_set_value_string( - key, - value, - ); - } - - late final _system_settings_set_value_stringPtr = _lookup< - ffi - .NativeFunction)>>( - 'system_settings_set_value_string'); - late final _system_settings_set_value_string = - _system_settings_set_value_stringPtr - .asFunction)>(); - - /// @brief Gets the system settings value associated with the given key as a string. - /// @since_tizen 2.3 - /// @remarks You must release @a value using free(). When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned. - /// @param[in] key The key name of the system settings - /// @param[out] value The current system settings value of the given key - /// @return 0 on success, otherwise a negative error value - /// @retval #SYSTEM_SETTINGS_ERROR_NONE Successful - /// @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error - /// @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - /// @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device - /// @warning %http://tizen.org/privilege/systemsettings (public level privilege) MUST NOT be declared to use this API since 2.3.1. - int system_settings_get_value_string( - int key, - ffi.Pointer> value, - ) { - return _system_settings_get_value_string( - key, - value, - ); - } - - late final _system_settings_get_value_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer>)>>( - 'system_settings_get_value_string'); - late final _system_settings_get_value_string = - _system_settings_get_value_stringPtr - .asFunction>)>(); - - /// @brief Registers a change event callback for the given system settings key. - /// @since_tizen 2.3 - /// @remarks #SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE is not available for set_changed_cb. When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned. - /// @param[in] key The key name of the system settings - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #SYSTEM_SETTINGS_ERROR_NONE Successful - /// @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - /// @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device - /// @post system_settings_changed_cb() will be invoked. - /// - /// @see system_settings_unset_changed_cb() - /// @see system_settings_changed_cb() - /// @warning %http://tizen.org/privilege/systemsettings (public level privilege) MUST NOT be declared to use this API since 2.3.1. - int system_settings_set_changed_cb( - int key, - system_settings_changed_cb callback, - ffi.Pointer user_data, - ) { - return _system_settings_set_changed_cb( - key, - callback, - user_data, - ); - } - - late final _system_settings_set_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, system_settings_changed_cb, - ffi.Pointer)>>('system_settings_set_changed_cb'); - late final _system_settings_set_changed_cb = - _system_settings_set_changed_cbPtr.asFunction< - int Function( - int, system_settings_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen 2.3 - /// @remarks #SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE is not available for set_changed_cb. When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned. - /// @param[in] key The key name of the system settings - /// @return 0 on success, otherwise a negative error value - /// @retval #SYSTEM_SETTINGS_ERROR_NONE Successful - /// @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - /// @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device - /// - /// @see system_settings_set_changed_cb() - /// @warning %http://tizen.org/privilege/systemsettings (public level privilege) MUST NOT be declared to use this API since 2.3.1. - int system_settings_unset_changed_cb( - int key, - ) { - return _system_settings_unset_changed_cb( - key, - ); - } - - late final _system_settings_unset_changed_cbPtr = - _lookup>( - 'system_settings_unset_changed_cb'); - late final _system_settings_unset_changed_cb = - _system_settings_unset_changed_cbPtr.asFunction(); - - /// @platform - /// @brief Iterate the system settings value associated with the given key as a string type. - /// @since_tizen 3.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/systemsettings.admin - /// @remarks When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned. - /// @param[in] key The key name of the system settings - /// @param[in] callback The callback-function name for iteration - /// @param[in] user_data The user data passed from caller-side - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SYSTEM_SETTINGS_ERROR_NONE Successful - /// @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error - /// @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - /// @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device - int system_settings_foreach_value_string( - int key, - system_settings_iter_cb callback, - ffi.Pointer user_data, - ) { - return _system_settings_foreach_value_string( - key, - callback, - user_data, - ); - } - - late final _system_settings_foreach_value_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, system_settings_iter_cb, - ffi.Pointer)>>('system_settings_foreach_value_string'); - late final _system_settings_foreach_value_string = - _system_settings_foreach_value_stringPtr.asFunction< - int Function(int, system_settings_iter_cb, ffi.Pointer)>(); - - /// @platform - /// @brief Adds the system settings value associated with the given key as a string type if it supports List iteration. - /// @since_tizen 3.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/systemsettings.admin - /// @remarks When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned. - /// @param[in] key The key name of the system settings - /// @param[in] value string typed value to be appended - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SYSTEM_SETTINGS_ERROR_NONE Successful - /// @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error - /// @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - /// @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device - int system_settings_add_value_string( - int key, - ffi.Pointer value, - ) { - return _system_settings_add_value_string( - key, - value, - ); - } - - late final _system_settings_add_value_stringPtr = _lookup< - ffi - .NativeFunction)>>( - 'system_settings_add_value_string'); - late final _system_settings_add_value_string = - _system_settings_add_value_stringPtr - .asFunction)>(); - - /// @platform - /// @brief Delete the system settings value associated with the given key as an string type if it supports List iteration. - /// @since_tizen 3.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/systemsettings.admin - /// @remarks When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned. - /// @param[in] key The key name of the system settings - /// @param[in] value string typed value to be removed - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SYSTEM_SETTINGS_ERROR_NONE Successful - /// @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error - /// @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - /// @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device - int system_settings_delete_value_string( - int key, - ffi.Pointer value, - ) { - return _system_settings_delete_value_string( - key, - value, - ); - } - - late final _system_settings_delete_value_stringPtr = _lookup< - ffi - .NativeFunction)>>( - 'system_settings_delete_value_string'); - late final _system_settings_delete_value_string = - _system_settings_delete_value_stringPtr - .asFunction)>(); - - /// @brief Adds a change event callback for the given system settings key. - /// @details The difference between this function and system_settings_set_changed_cb() is that system_settings_set_changed_cb() can set only one callback for a given key, while system_settings_add_changed_cb() can set multiple callbacks for a given key. - /// @since_tizen 4.0 - /// @remarks The @a key cannot be #SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE. When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned. - /// @param[in] key The key name of the system settings - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #SYSTEM_SETTINGS_ERROR_NONE Successful - /// @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device - /// @post system_settings_changed_cb() will be invoked. - /// - /// @see system_settings_remove_changed_cb() - /// @see system_settings_changed_cb() - int system_settings_add_changed_cb( - int key, - system_settings_changed_cb callback, - ffi.Pointer user_data, - ) { - return _system_settings_add_changed_cb( - key, - callback, - user_data, - ); - } - - late final _system_settings_add_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, system_settings_changed_cb, - ffi.Pointer)>>('system_settings_add_changed_cb'); - late final _system_settings_add_changed_cb = - _system_settings_add_changed_cbPtr.asFunction< - int Function( - int, system_settings_changed_cb, ffi.Pointer)>(); - - /// @brief Removes a change event callback function. - /// @details The difference between this function and system_settings_unset_changed_cb() is that system_settings_unset_changed_cb() unsets the callback set with system_settings_set_changed_cb(), while system_settings_remove_changed_cb() removes callbacks added with system_settings_add_changed_cb() - /// @since_tizen 4.0 - /// @remarks The @a key cannot be #SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE. When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned. - /// @param[in] key The key name of the system settings - /// @param[in] callback The callback function to be removed - /// @return 0 on success, otherwise a negative error value - /// @retval #SYSTEM_SETTINGS_ERROR_NONE Successful - /// @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device - /// - /// @see system_settings_add_changed_cb() - int system_settings_remove_changed_cb( - int key, - system_settings_changed_cb callback, - ) { - return _system_settings_remove_changed_cb( - key, - callback, - ); - } - - late final _system_settings_remove_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, system_settings_changed_cb)>>( - 'system_settings_remove_changed_cb'); - late final _system_settings_remove_changed_cb = - _system_settings_remove_changed_cbPtr - .asFunction(); - - /// @brief Writes a trace event to indicate that a synchronous event has begun. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] name The name of event (optionally containing format specifiers) - /// @exception TRACE_ERROR_NONE Success - /// @exception TRACE_ERROR_IO_ERROR I/O error - /// @see trace_end() - void trace_begin( - ffi.Pointer name, - ) { - return _trace_begin( - name, - ); - } - - late final _trace_beginPtr = - _lookup)>>( - 'trace_begin'); - late final _trace_begin = - _trace_beginPtr.asFunction)>(); - - /// @brief Writes a trace event to indicate that the synchronous event has ended. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif - /// @remarks trace_end() ends the most recently called trace_begin(). - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @exception TRACE_ERROR_NONE Success - /// @exception TRACE_ERROR_IO_ERROR I/O error - /// @see trace_begin() - void trace_end() { - return _trace_end(); - } - - late final _trace_endPtr = - _lookup>('trace_end'); - late final _trace_end = _trace_endPtr.asFunction(); - - /// @brief Writes a trace event to indicate that an asynchronous event has begun. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] cookie An unique identifier for distinguishing simultaneous events - /// @param[in] name The name of event (optionally containing format specifiers) - /// @exception TRACE_ERROR_NONE Success - /// @exception TRACE_ERROR_IO_ERROR I/O error - /// @see trace_async_end() - void trace_async_begin( - int cookie, - ffi.Pointer name, - ) { - return _trace_async_begin( - cookie, - name, - ); - } - - late final _trace_async_beginPtr = _lookup< - ffi - .NativeFunction)>>( - 'trace_async_begin'); - late final _trace_async_begin = _trace_async_beginPtr - .asFunction)>(); - - /// @brief Writes a trace event to indicate that the asynchronous event has ended. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif - /// @remarks trace_async_end() ends matched trace_async_begin() which has same cookie and name. - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] cookie An unique identifier for distinguishing simultaneous events - /// @param[in] name The name of event (optionally containing format specifiers) - /// @exception TRACE_ERROR_NONE Success - /// @exception TRACE_ERROR_IO_ERROR I/O error - /// @see trace_async_begin() - void trace_async_end( - int cookie, - ffi.Pointer name, - ) { - return _trace_async_end( - cookie, - name, - ); - } - - late final _trace_async_endPtr = _lookup< - ffi - .NativeFunction)>>( - 'trace_async_end'); - late final _trace_async_end = _trace_async_endPtr - .asFunction)>(); - - /// @brief Writes a trace event to track change of integer counter - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] value The counter value - /// @param[in] name The name of event (optionally containing format specifiers) - /// @exception TRACE_ERROR_NONE Success - /// @exception TRACE_ERROR_IO_ERROR I/O error - void trace_update_counter( - int value, - ffi.Pointer name, - ) { - return _trace_update_counter( - value, - name, - ); - } - - late final _trace_update_counterPtr = _lookup< - ffi - .NativeFunction)>>( - 'trace_update_counter'); - late final _trace_update_counter = _trace_update_counterPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_MODULE - /// @brief Initializes usb_host context. - /// @details This function must be called before any other function from this module. - /// @since_tizen 3.0 - /// @remarks @a ctx should be destroyed by calling usb_host_destroy() when no longer needed. - /// @param[out] ctx Context pointer - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NONE Successful - /// @post usb_host_destroy() should be called to free resources allocated for ctx by this function. - int usb_host_create( - ffi.Pointer ctx, - ) { - return _usb_host_create( - ctx, - ); - } - - late final _usb_host_createPtr = _lookup< - ffi - .NativeFunction)>>( - 'usb_host_create'); - late final _usb_host_create = _usb_host_createPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_MODULE - /// @brief Deinitializes usb_host context. - /// @details This function must be called after closing all devices - /// and before application close. It has to be called to clean - /// the memory used by library. - /// @since_tizen 3.0 - /// @param[in] ctx Context to deinitialize - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NONE Success - /// @pre Context must be initialized by usb_host_create(). - int usb_host_destroy( - usb_host_context_h ctx, - ) { - return _usb_host_destroy( - ctx, - ); - } - - late final _usb_host_destroyPtr = - _lookup>( - 'usb_host_destroy'); - late final _usb_host_destroy = - _usb_host_destroyPtr.asFunction(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets USB device list. - /// @details This function returns list of USB devices attached to system. - /// To free obtained device list usb_host_free_device_list() should be used, this - /// function can also unref devices. Do not unref device and then open it. - /// - /// All devices have reference counter. Functions usb_host_ref_device() and - /// usb_host_unref_device() are used to ref or unref device. When ref counter - /// reaches 0 device will be freed. - /// Devices reached by calling usb_host_get_device_list() have a reference count of - /// 1, and usb_host_free_device_list() can optionally decrease the reference count - /// on all devices in the list. usb_host_device_open() adds another reference which is - /// later destroyed by usb_host_device_close(). - /// - /// @since_tizen 3.0 - /// @param[in] ctx Context handle - /// @param[out] devs An array of devices - /// @param[out] length Number of devices - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Operation not supported - /// @retval #USB_HOST_ERROR_PERMISSION_DENIED Permission denied - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NONE Successful - /// @post @a devs must be freed with usb_host_free_device_list() when no longer needed. - int usb_host_get_device_list( - usb_host_context_h ctx, - ffi.Pointer> devs, - ffi.Pointer length, - ) { - return _usb_host_get_device_list( - ctx, - devs, - length, - ); - } - - late final _usb_host_get_device_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - usb_host_context_h, - ffi.Pointer>, - ffi.Pointer)>>('usb_host_get_device_list'); - late final _usb_host_get_device_list = - _usb_host_get_device_listPtr.asFunction< - int Function( - usb_host_context_h, - ffi.Pointer>, - ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Frees devices list. - /// @details This function needs to be called to free device list. This - /// function can also unref devices if unref_devices is set to non-zero value. - /// Do not unref device and then open it. - /// @since_tizen 3.0 - /// @param[in] devs List of devices - /// @param[in] unref_devices Set to true to unreference devices, set to false to not unref - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NONE Successful - /// @pre usb_host_get_device_list() must be called before using this function. - int usb_host_free_device_list( - ffi.Pointer devs, - bool unref_devices, - ) { - return _usb_host_free_device_list( - devs, - unref_devices, - ); - } - - late final _usb_host_free_device_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Bool)>>('usb_host_free_device_list'); - late final _usb_host_free_device_list = _usb_host_free_device_listPtr - .asFunction, bool)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Refs a device. - /// @details Increment ref count of device. - /// @since_tizen 3.0 - /// @param[in] dev Device to reference - /// @return 0 on success, error code otherwise - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NONE Successful - int usb_host_ref_device( - usb_host_device_h dev, - ) { - return _usb_host_ref_device( - dev, - ); - } - - late final _usb_host_ref_devicePtr = - _lookup>( - 'usb_host_ref_device'); - late final _usb_host_ref_device = - _usb_host_ref_devicePtr.asFunction(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Unrefs a device. - /// @details Decrements ref count of device. If ref count reaches zero, - /// device will be destroyed. - /// @since_tizen 3.0 - /// @param[in] dev Device to unreference - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_unref_device( - usb_host_device_h dev, - ) { - return _usb_host_unref_device( - dev, - ); - } - - late final _usb_host_unref_devicePtr = - _lookup>( - 'usb_host_unref_device'); - late final _usb_host_unref_device = - _usb_host_unref_devicePtr.asFunction(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Opens a device. - /// @details This function opens a device, which allows performing operations on it - /// (including transfer operations and strings introspection). - /// @since_tizen 3.0 - /// @param[in] dev Device to open - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_OUT_OF_MEMORY Memory allocation failure - /// @retval #USB_HOST_ERROR_NO_SUCH_DEVICE There is no device connected - /// @retval #USB_HOST_ERROR_PERMISSION_DENIED No proper permission to access device - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Operation not supported - /// @see usb_host_is_device_opened() - int usb_host_device_open( - usb_host_device_h dev, - ) { - return _usb_host_device_open( - dev, - ); - } - - late final _usb_host_device_openPtr = - _lookup>( - 'usb_host_device_open'); - late final _usb_host_device_open = - _usb_host_device_openPtr.asFunction(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Closes device. - /// @details Function should be called before usb_host_destroy(). - /// It destroys reference that was added by usb_host_device_open(). - /// @since_tizen 3.0 - /// @param[in] dev Device that should be closed - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_DEVICE_NOT_OPENED If device is not opened - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NONE Successful - int usb_host_device_close( - usb_host_device_h dev, - ) { - return _usb_host_device_close( - dev, - ); - } - - late final _usb_host_device_closePtr = - _lookup>( - 'usb_host_device_close'); - late final _usb_host_device_close = - _usb_host_device_closePtr.asFunction(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Opens device with valid idVendor and idProduct. - /// @details This function can be used to open device with known idVendor and - /// idProduct. If two or more devices have same vendor and product id only - /// first will be opened. - /// @since_tizen 3.0 - /// @param[in] ctx Context - /// @param[in] vendor_id idVendor of connected device - /// @param[in] product_id idProduct of connected device - /// @param[out] device_handle Opened device handle - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_OUT_OF_MEMORY Insufficient memory - /// @retval #USB_HOST_ERROR_NO_SUCH_DEVICE No device - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_device_open_with_vid_pid( - usb_host_context_h ctx, - int vendor_id, - int product_id, - ffi.Pointer device_handle, - ) { - return _usb_host_device_open_with_vid_pid( - ctx, - vendor_id, - product_id, - device_handle, - ); - } - - late final _usb_host_device_open_with_vid_pidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_context_h, ffi.Int, ffi.Int, - ffi.Pointer)>>( - 'usb_host_device_open_with_vid_pid'); - late final _usb_host_device_open_with_vid_pid = - _usb_host_device_open_with_vid_pidPtr.asFunction< - int Function( - usb_host_context_h, int, int, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets bus number. - /// @details Gets device bus number. This is number of the bus - /// that device is connected to. - /// @since_tizen 3.0 - /// @param[in] dev Device handle - /// @param[out] bus_number Device bus number - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_PERMISSION_DENIED Permission denied - int usb_host_device_get_bus_number( - usb_host_device_h dev, - ffi.Pointer bus_number, - ) { - return _usb_host_device_get_bus_number( - dev, - bus_number, - ); - } - - late final _usb_host_device_get_bus_numberPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, - ffi.Pointer)>>('usb_host_device_get_bus_number'); - late final _usb_host_device_get_bus_number = - _usb_host_device_get_bus_numberPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets address. - /// @details Gets device address. This is address of device on the bus - /// that device is connected to. - /// @since_tizen 3.0 - /// @param[in] dev Device - /// @param[out] device_address Device address - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - int usb_host_device_get_address( - usb_host_device_h dev, - ffi.Pointer device_address, - ) { - return _usb_host_device_get_address( - dev, - device_address, - ); - } - - late final _usb_host_device_get_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, - ffi.Pointer)>>('usb_host_device_get_address'); - late final _usb_host_device_get_address = _usb_host_device_get_addressPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets list of port numbers. - /// @details Gets list of all port numbers from a device. - /// @since_tizen 3.0 - /// @param[in] dev Device - /// @param[out] port_numbers Array to be filled with port numbers - /// @param[in] port_numbers_len Max length of array - /// @param[out] ports_count Number of all ports obtained from device - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_OUT_OF_MEMORY Insufficient memory - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - int usb_host_device_get_port_numbers( - usb_host_device_h dev, - ffi.Pointer port_numbers, - int port_numbers_len, - ffi.Pointer ports_count, - ) { - return _usb_host_device_get_port_numbers( - dev, - port_numbers, - port_numbers_len, - ports_count, - ); - } - - late final _usb_host_device_get_port_numbersPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, ffi.Pointer, ffi.Int, - ffi.Pointer)>>('usb_host_device_get_port_numbers'); - late final _usb_host_device_get_port_numbers = - _usb_host_device_get_port_numbersPtr.asFunction< - int Function(usb_host_device_h, ffi.Pointer, int, - ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets a configuration. - /// @details Gets a USB configuration from a device. - /// @since_tizen 3.0 - /// @remarks @a config must be freed with usb_host_config_destroy(). - /// @param[in] dev Device - /// @param[in] config_index index of configuration to retrieve (counting from 0) - /// @param[out] config Output location for USB configuration - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_FOUND The configuration does not exist - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @post Returned configuration should be destroyed by usb_host_config_destroy() - /// when no longer needed. - int usb_host_device_get_config( - usb_host_device_h dev, - int config_index, - ffi.Pointer config, - ) { - return _usb_host_device_get_config( - dev, - config_index, - config, - ); - } - - late final _usb_host_device_get_configPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, ffi.Int, - ffi.Pointer)>>('usb_host_device_get_config'); - late final _usb_host_device_get_config = - _usb_host_device_get_configPtr.asFunction< - int Function( - usb_host_device_h, int, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets an active config. - /// @details Gets handle to active configuration. - /// This function will return 0 value in config parameter :if device is unconfigured. - /// @since_tizen 3.0 - /// @param[in] dev A device - /// @param[out] config Handle to active configuration - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NO_SUCH_DEVICE the dev has been disconnected - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_DEVICE_NOT_OPENED The device was not opened - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @post Obtained configuration should be destroyed by usb_host_config_destroy() - /// when no longer needed. - int usb_host_get_active_config( - usb_host_device_h dev, - ffi.Pointer config, - ) { - return _usb_host_get_active_config( - dev, - config, - ); - } - - late final _usb_host_get_active_configPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, - ffi.Pointer)>>('usb_host_get_active_config'); - late final _usb_host_get_active_config = - _usb_host_get_active_configPtr.asFunction< - int Function(usb_host_device_h, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Sets a configuration. - /// @details Set active configuration for a device. - /// @since_tizen 3.0 - /// @param[in] configuration Handle to configuration to be activated - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_FOUND Requested configuration does not exist - /// @retval #USB_HOST_ERROR_RESOURCE_BUSY Interfaces are currently claimed - /// @retval #USB_HOST_ERROR_NO_SUCH_DEVICE The device has been disconnected - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_DEVICE_NOT_OPENED The device was not opened - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - int usb_host_set_config( - usb_host_config_h configuration, - ) { - return _usb_host_set_config( - configuration, - ); - } - - late final _usb_host_set_configPtr = - _lookup>( - 'usb_host_set_config'); - late final _usb_host_set_config = - _usb_host_set_configPtr.asFunction(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Puts a device in unconfigured state. - /// @since_tizen 4.0 - /// @param[in] dev Device to be unconfigured - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_RESOURCE_BUSY Interfaces are currently claimed - /// @retval #USB_HOST_ERROR_NO_SUCH_DEVICE Device has beed disconnected - int usb_host_device_unconfigure( - usb_host_device_h dev, - ) { - return _usb_host_device_unconfigure( - dev, - ); - } - - late final _usb_host_device_unconfigurePtr = - _lookup>( - 'usb_host_device_unconfigure'); - late final _usb_host_device_unconfigure = _usb_host_device_unconfigurePtr - .asFunction(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets USB specification release number. - /// @details Gets binary-coded decimal USB specification release number. - /// This value is equal to bcdUSB field of device descriptor. See USB specification - /// for more info. - /// @since_tizen 3.0 - /// @param[in] dev A device - /// @param[out] bcd_usb Bcd release number of USB - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_PERMISSION_DENIED Permission denied - int usb_host_device_get_bcd_usb( - usb_host_device_h dev, - ffi.Pointer bcd_usb, - ) { - return _usb_host_device_get_bcd_usb( - dev, - bcd_usb, - ); - } - - late final _usb_host_device_get_bcd_usbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, - ffi.Pointer)>>('usb_host_device_get_bcd_usb'); - late final _usb_host_device_get_bcd_usb = _usb_host_device_get_bcd_usbPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets device class. - /// @since_tizen 3.0 - /// @param[in] dev A device - /// @param[out] device_class Device class - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_device_get_class( - usb_host_device_h dev, - ffi.Pointer device_class, - ) { - return _usb_host_device_get_class( - dev, - device_class, - ); - } - - late final _usb_host_device_get_classPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, - ffi.Pointer)>>('usb_host_device_get_class'); - late final _usb_host_device_get_class = _usb_host_device_get_classPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets device sub class. - /// @since_tizen 3.0 - /// @param[in] dev A device - /// @param[out] subclass Device subclass - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_device_get_sub_class( - usb_host_device_h dev, - ffi.Pointer subclass, - ) { - return _usb_host_device_get_sub_class( - dev, - subclass, - ); - } - - late final _usb_host_device_get_sub_classPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, - ffi.Pointer)>>('usb_host_device_get_sub_class'); - late final _usb_host_device_get_sub_class = _usb_host_device_get_sub_classPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets device protocol. - /// @since_tizen 3.0 - /// @param[in] dev A device - /// @param[out] protocol Device protocol - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_device_get_protocol( - usb_host_device_h dev, - ffi.Pointer protocol, - ) { - return _usb_host_device_get_protocol( - dev, - protocol, - ); - } - - late final _usb_host_device_get_protocolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, - ffi.Pointer)>>('usb_host_device_get_protocol'); - late final _usb_host_device_get_protocol = _usb_host_device_get_protocolPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets maximum packet size for endpoint 0. - /// @since_tizen 3.0 - /// @param[in] dev A device - /// @param[out] max_packet_size Maximum size of single packet, in bytes - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_device_get_max_packet_size_0( - usb_host_device_h dev, - ffi.Pointer max_packet_size, - ) { - return _usb_host_device_get_max_packet_size_0( - dev, - max_packet_size, - ); - } - - late final _usb_host_device_get_max_packet_size_0Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, - ffi.Pointer)>>('usb_host_device_get_max_packet_size_0'); - late final _usb_host_device_get_max_packet_size_0 = - _usb_host_device_get_max_packet_size_0Ptr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets vendor id. - /// @since_tizen 3.0 - /// @param[in] dev A device - /// @param[out] vendor_id Vendor id of @a dev - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_device_get_id_vendor( - usb_host_device_h dev, - ffi.Pointer vendor_id, - ) { - return _usb_host_device_get_id_vendor( - dev, - vendor_id, - ); - } - - late final _usb_host_device_get_id_vendorPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, - ffi.Pointer)>>('usb_host_device_get_id_vendor'); - late final _usb_host_device_get_id_vendor = _usb_host_device_get_id_vendorPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets product id. - /// @since_tizen 3.0 - /// @param[in] dev A device - /// @param[out] product_id Product id of @a dev - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_device_get_id_product( - usb_host_device_h dev, - ffi.Pointer product_id, - ) { - return _usb_host_device_get_id_product( - dev, - product_id, - ); - } - - late final _usb_host_device_get_id_productPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, - ffi.Pointer)>>('usb_host_device_get_id_product'); - late final _usb_host_device_get_id_product = - _usb_host_device_get_id_productPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets device release number in binary-coded decimal. - /// @since_tizen 3.0 - /// @param[in] dev A device - /// @param[out] device_bcd Device release number - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_device_get_bcd_device( - usb_host_device_h dev, - ffi.Pointer device_bcd, - ) { - return _usb_host_device_get_bcd_device( - dev, - device_bcd, - ); - } - - late final _usb_host_device_get_bcd_devicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, - ffi.Pointer)>>('usb_host_device_get_bcd_device'); - late final _usb_host_device_get_bcd_device = - _usb_host_device_get_bcd_devicePtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets number of configurations for given device. - /// @since_tizen 3.0 - /// @param[in] dev A device - /// @param[out] num_configurations Number of configurations for given device - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_device_get_num_configurations( - usb_host_device_h dev, - ffi.Pointer num_configurations, - ) { - return _usb_host_device_get_num_configurations( - dev, - num_configurations, - ); - } - - late final _usb_host_device_get_num_configurationsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, - ffi.Pointer)>>('usb_host_device_get_num_configurations'); - late final _usb_host_device_get_num_configurations = - _usb_host_device_get_num_configurationsPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Checks if device is opened. - /// @since_tizen 3.0 - /// @param[in] dev A device - /// @param[out] is_opened True if device is opened, false otherwise - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_is_device_opened( - usb_host_device_h dev, - ffi.Pointer is_opened, - ) { - return _usb_host_is_device_opened( - dev, - is_opened, - ); - } - - late final _usb_host_is_device_openedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, - ffi.Pointer)>>('usb_host_is_device_opened'); - late final _usb_host_is_device_opened = _usb_host_is_device_openedPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets string describing device manufacturer, in ASCII. - /// @since_tizen 3.0 - /// @param[in] dev A handle to opened device - /// @param[in, out] length Data buffer size/how much was actually used - /// @param[out] data Buffer to store string - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_OVERFLOW There was no space in buffer - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_PERMISSION_DENIED Permission denied - /// @pre dev must point to device opened by usb_host_device_open() or usb_host_device_open_with_vid_pid(). - int usb_host_device_get_manufacturer_str( - usb_host_device_h dev, - ffi.Pointer length, - ffi.Pointer data, - ) { - return _usb_host_device_get_manufacturer_str( - dev, - length, - data, - ); - } - - late final _usb_host_device_get_manufacturer_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, ffi.Pointer, - ffi.Pointer)>>( - 'usb_host_device_get_manufacturer_str'); - late final _usb_host_device_get_manufacturer_str = - _usb_host_device_get_manufacturer_strPtr.asFunction< - int Function(usb_host_device_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets product string of device, in ASCII. - /// @since_tizen 3.0 - /// @param[in] dev A handle to opened device - /// @param[in, out] length Data buffer size/how much was actually used - /// @param[out] data Buffer to store string - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_OVERFLOW There was no space in buffer - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_PERMISSION_DENIED Permission denied - /// @pre dev must point to device opened by usb_host_device_open() or usb_host_device_open_with_vid_pid(). - int usb_host_device_get_product_str( - usb_host_device_h dev, - ffi.Pointer length, - ffi.Pointer data, - ) { - return _usb_host_device_get_product_str( - dev, - length, - data, - ); - } - - late final _usb_host_device_get_product_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, ffi.Pointer, - ffi.Pointer)>>( - 'usb_host_device_get_product_str'); - late final _usb_host_device_get_product_str = - _usb_host_device_get_product_strPtr.asFunction< - int Function(usb_host_device_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets serial number of a device, in ASCII. - /// @since_tizen 3.0 - /// @param[in] dev A handle to opened device - /// @param[in, out] length Data buffer size/how much was actually used - /// @param[out] data Buffer to store string - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_OVERFLOW There was no space in buffer - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_PERMISSION_DENIED Permission denied - /// @pre dev must point to device opened by usb_host_device_open() or usb_host_device_open_with_vid_pid(). - int usb_host_device_get_serial_number_str( - usb_host_device_h dev, - ffi.Pointer length, - ffi.Pointer data, - ) { - return _usb_host_device_get_serial_number_str( - dev, - length, - data, - ); - } - - late final _usb_host_device_get_serial_number_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, ffi.Pointer, - ffi.Pointer)>>( - 'usb_host_device_get_serial_number_str'); - late final _usb_host_device_get_serial_number_str = - _usb_host_device_get_serial_number_strPtr.asFunction< - int Function(usb_host_device_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_CONFIG_MODULE - /// @brief Gets number of interfaces for given configuration. - /// @since_tizen 3.0 - /// @param[in] config A configuration - /// @param[out] num_interfaces Number of interfaces - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_config_get_num_interfaces( - usb_host_config_h config, - ffi.Pointer num_interfaces, - ) { - return _usb_host_config_get_num_interfaces( - config, - num_interfaces, - ); - } - - late final _usb_host_config_get_num_interfacesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_config_h, - ffi.Pointer)>>('usb_host_config_get_num_interfaces'); - late final _usb_host_config_get_num_interfaces = - _usb_host_config_get_num_interfacesPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_CONFIG_MODULE - /// @brief Checks if device is self-powered in given configuration. - /// @since_tizen 3.0 - /// @param[in] config A configuration - /// @param[out] self_powered True if device is self-powered in given configuration, - /// false otherwise - /// @return 0 on success, negative error code otherwise - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - int usb_host_config_is_self_powered( - usb_host_config_h config, - ffi.Pointer self_powered, - ) { - return _usb_host_config_is_self_powered( - config, - self_powered, - ); - } - - late final _usb_host_config_is_self_poweredPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_config_h, - ffi.Pointer)>>('usb_host_config_is_self_powered'); - late final _usb_host_config_is_self_powered = - _usb_host_config_is_self_poweredPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_CONFIG_MODULE - /// @brief Checks if device in given configuration supports remote wakeup. - /// @since_tizen 3.0 - /// @param[in] config A configuration - /// @param[out] remote_wakeup True if device supports remote wakeup in given configuration, - /// false otherwise - /// @return 0 on success, negative error code otherwise - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval @USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - int usb_host_config_support_remote_wakeup( - usb_host_config_h config, - ffi.Pointer remote_wakeup, - ) { - return _usb_host_config_support_remote_wakeup( - config, - remote_wakeup, - ); - } - - late final _usb_host_config_support_remote_wakeupPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_config_h, - ffi.Pointer)>>('usb_host_config_support_remote_wakeup'); - late final _usb_host_config_support_remote_wakeup = - _usb_host_config_support_remote_wakeupPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_CONFIG_MODULE - /// @brief Gets maximum power in given configuration, in mA. - /// @since_tizen 3.0 - /// @param[in] config A configuration - /// @param[out] max_power Maximum power, in mA - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_config_get_max_power( - usb_host_config_h config, - ffi.Pointer max_power, - ) { - return _usb_host_config_get_max_power( - config, - max_power, - ); - } - - late final _usb_host_config_get_max_powerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_config_h, - ffi.Pointer)>>('usb_host_config_get_max_power'); - late final _usb_host_config_get_max_power = _usb_host_config_get_max_powerPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_CONFIG_MODULE - /// @brief Gets string describing a configuration. - /// @since_tizen 3.0 - /// @param[in] config A configuration - /// @param[in, out] length Data buffer size/how much was actually used - /// @param[out] data Buffer to store string - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_OVERFLOW There was no space in buffer - /// @retval #USB_HOST_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @pre config must be configuration of device opened by usb_host_device_open() or - /// usb_host_device_open_with_vid_pid() - int usb_host_device_get_config_str( - usb_host_config_h config, - ffi.Pointer length, - ffi.Pointer data, - ) { - return _usb_host_device_get_config_str( - config, - length, - data, - ); - } - - late final _usb_host_device_get_config_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_config_h, ffi.Pointer, - ffi.Pointer)>>( - 'usb_host_device_get_config_str'); - late final _usb_host_device_get_config_str = - _usb_host_device_get_config_strPtr.asFunction< - int Function(usb_host_config_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_CONFIG_MODULE - /// @brief Gets an interface from configuration. - /// @details Gets a USB interface from configuration by its index. - /// @since_tizen 3.0 - /// @param[in] config Configuration handle - /// @param[in] interface_index index of interface to retrieve (counting from 0) - /// @param[out] interface Interface handle - /// @remarks There is no need to destroy the @a interface handle. It is no longer valid - /// when config is destroyed. - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_FOUND Configuration does not exist - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_PERMISSION_DENIED Permission denied - int usb_host_config_get_interface( - usb_host_config_h config, - int interface_index, - ffi.Pointer interface1, - ) { - return _usb_host_config_get_interface( - config, - interface_index, - interface1, - ); - } - - late final _usb_host_config_get_interfacePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_config_h, ffi.Int, - ffi.Pointer)>>( - 'usb_host_config_get_interface'); - late final _usb_host_config_get_interface = - _usb_host_config_get_interfacePtr.asFunction< - int Function( - usb_host_config_h, int, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_CONFIG_MODULE - /// @brief Frees configuration. - /// @details Frees configuration obtained from usb_host_device_get_config(). - /// @since_tizen 3.0 - /// @param[in] config Configuration to free - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_PERMISSION_DENIED Permission denied - /// @pre config must be obtained by usb_host_device_get_config(). - int usb_host_config_destroy( - usb_host_config_h config, - ) { - return _usb_host_config_destroy( - config, - ); - } - - late final _usb_host_config_destroyPtr = - _lookup>( - 'usb_host_config_destroy'); - late final _usb_host_config_destroy = - _usb_host_config_destroyPtr.asFunction(); - - /// @ingroup CAPI_USB_HOST_INTERFACE_MODULE - /// @brief Claims interface. - /// @details Claims interface on a device. - /// To perform I/O operations on interface user has to claim it. - /// Remember to call usb_host_release_interface() when communication - /// with the device is finished. - /// @since_tizen 3.0 - /// @param[in] interface The bInterfaceNumber of interface to claim - /// @param[in] force Set to true to auto detach kernel driver, set to false to not detach it - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_FOUND Requested interface does not exist - /// @retval #USB_HOST_ERROR_RESOURCE_BUSY Another program or driver has claimed the - /// interface - /// @retval #USB_HOST_ERROR_NO_SUCH_DEVICE Device has been disconnected - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_DEVICE_NOT_OPENED The device was not opened - int usb_host_claim_interface( - usb_host_interface_h interface1, - bool force, - ) { - return _usb_host_claim_interface( - interface1, - force, - ); - } - - late final _usb_host_claim_interfacePtr = _lookup< - ffi.NativeFunction>( - 'usb_host_claim_interface'); - late final _usb_host_claim_interface = _usb_host_claim_interfacePtr - .asFunction(); - - /// @ingroup CAPI_USB_HOST_INTERFACE_MODULE - /// @brief Releases interface. - /// @details Releases interface previously claimed by usb_host_claim_interface(). - /// This is a blocking function. - /// @since_tizen 3.0 - /// @param[in] interface The bInterfaceNumber of interface to release - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_FOUND Interface was not claimed - /// @retval #USB_HOST_ERROR_NO_SUCH_DEVICE Device has been disconnected - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_DEVICE_NOT_OPENED The device was not opened - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_PERMISSION_DENIED Permission denied - int usb_host_release_interface( - usb_host_interface_h interface1, - ) { - return _usb_host_release_interface( - interface1, - ); - } - - late final _usb_host_release_interfacePtr = - _lookup>( - 'usb_host_release_interface'); - late final _usb_host_release_interface = _usb_host_release_interfacePtr - .asFunction(); - - /// @ingroup CAPI_USB_HOST_INTERFACE_MODULE - /// @brief Gets number of given interface. - /// @since_tizen 3.0 - /// @param[in] interface An interface - /// @param[out] number Number of given interface - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_interface_get_number( - usb_host_interface_h interface1, - ffi.Pointer number, - ) { - return _usb_host_interface_get_number( - interface1, - number, - ); - } - - late final _usb_host_interface_get_numberPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_interface_h, - ffi.Pointer)>>('usb_host_interface_get_number'); - late final _usb_host_interface_get_number = _usb_host_interface_get_numberPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_INTERFACE_MODULE - /// @brief Gets number of endpoints in given interface. - /// @since_tizen 3.0 - /// @param[in] interface An interface - /// @param[out] num_endpoints Number of endpoints in @a interface - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_interface_get_num_endpoints( - usb_host_interface_h interface1, - ffi.Pointer num_endpoints, - ) { - return _usb_host_interface_get_num_endpoints( - interface1, - num_endpoints, - ); - } - - late final _usb_host_interface_get_num_endpointsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_interface_h, - ffi.Pointer)>>('usb_host_interface_get_num_endpoints'); - late final _usb_host_interface_get_num_endpoints = - _usb_host_interface_get_num_endpointsPtr.asFunction< - int Function(usb_host_interface_h, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_INTERFACE_MODULE - /// @brief Gets an endpoint from interface. - /// @details Get a USB endpoint from interface by its index. - /// @since_tizen 3.0 - /// @param[in] interface Interface handle - /// @param[in] ep_index index of endpoint to retrieve (counting from 0) - /// @param[out] ep Endpoint handle - /// @remarks @a ep handle is no longer valid when config will be destroyed. There is no need to destroy it, - /// it is done automatically when the configuration is destroyed. - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_interface_get_endpoint( - usb_host_interface_h interface1, - int ep_index, - ffi.Pointer ep, - ) { - return _usb_host_interface_get_endpoint( - interface1, - ep_index, - ep, - ); - } - - late final _usb_host_interface_get_endpointPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_interface_h, ffi.Int, - ffi.Pointer)>>( - 'usb_host_interface_get_endpoint'); - late final _usb_host_interface_get_endpoint = - _usb_host_interface_get_endpointPtr.asFunction< - int Function( - usb_host_interface_h, int, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_INTERFACE_MODULE - /// @brief Sets alternative setting for interface. - /// @since_tizen 3.0 - /// @param[in] interface Interface handle - /// @param[in] altsetting Index of new alternative setting for given interface - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_interface_set_altsetting( - usb_host_interface_h interface1, - int altsetting, - ) { - return _usb_host_interface_set_altsetting( - interface1, - altsetting, - ); - } - - late final _usb_host_interface_set_altsettingPtr = _lookup< - ffi.NativeFunction>( - 'usb_host_interface_set_altsetting'); - late final _usb_host_interface_set_altsetting = - _usb_host_interface_set_altsettingPtr - .asFunction(); - - /// @ingroup CAPI_USB_HOST_INTERFACE_MODULE - /// @brief Gets current alternative setting from an interface. - /// @since_tizen 4.0 - /// @param[in] interface Interface handle - /// @param[out] altsetting Index of alternative setting set for the given interface - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_interface_get_altsetting( - usb_host_interface_h interface1, - ffi.Pointer altsetting, - ) { - return _usb_host_interface_get_altsetting( - interface1, - altsetting, - ); - } - - late final _usb_host_interface_get_altsettingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_interface_h, - ffi.Pointer)>>('usb_host_interface_get_altsetting'); - late final _usb_host_interface_get_altsetting = - _usb_host_interface_get_altsettingPtr.asFunction< - int Function(usb_host_interface_h, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_INTERFACE_MODULE - /// @brief Gets string describing an interface. - /// @since_tizen 3.0 - /// @param[in] interface An interface - /// @param[in, out] length Data buffer size/how much was actually used - /// @param[out] data Buffer to store string - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_OVERFLOW There was no space in buffer - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @pre device which interface is part of must be opened by usb_host_device_open() or - /// usb_host_device_open_with_vid_pid() - int usb_host_interface_get_str( - usb_host_interface_h interface1, - ffi.Pointer length, - ffi.Pointer data, - ) { - return _usb_host_interface_get_str( - interface1, - length, - data, - ); - } - - late final _usb_host_interface_get_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_interface_h, ffi.Pointer, - ffi.Pointer)>>('usb_host_interface_get_str'); - late final _usb_host_interface_get_str = - _usb_host_interface_get_strPtr.asFunction< - int Function(usb_host_interface_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_ENDPOINT_MODULE - /// @brief Gets number of given endpoint. - /// @since_tizen 3.0 - /// @param[in] ep An endpoint - /// @param[out] number Number of given endpoint - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_endpoint_get_number( - usb_host_endpoint_h ep, - ffi.Pointer number, - ) { - return _usb_host_endpoint_get_number( - ep, - number, - ); - } - - late final _usb_host_endpoint_get_numberPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_endpoint_h, - ffi.Pointer)>>('usb_host_endpoint_get_number'); - late final _usb_host_endpoint_get_number = _usb_host_endpoint_get_numberPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_ENDPOINT_MODULE - /// @brief Gets direction of an endpoint. - /// @since_tizen 3.0 - /// @param[in] ep An endpoint - /// @param[out] direction Direction of endpoint (a value from enum #usb_host_endpoint_direction_e) - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_endpoint_get_direction( - usb_host_endpoint_h ep, - ffi.Pointer direction, - ) { - return _usb_host_endpoint_get_direction( - ep, - direction, - ); - } - - late final _usb_host_endpoint_get_directionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_endpoint_h, - ffi.Pointer)>>('usb_host_endpoint_get_direction'); - late final _usb_host_endpoint_get_direction = - _usb_host_endpoint_get_directionPtr.asFunction< - int Function(usb_host_endpoint_h, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_ENDPOINT_MODULE - /// @brief Gets transfer type of given endpoint. - /// @since_tizen 3.0 - /// @param[in] ep An endpoint - /// @param[out] transfer_type Transfer type (a value from enum #usb_host_transfer_type_e) - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_endpoint_get_transfer_type( - usb_host_endpoint_h ep, - ffi.Pointer transfer_type, - ) { - return _usb_host_endpoint_get_transfer_type( - ep, - transfer_type, - ); - } - - late final _usb_host_endpoint_get_transfer_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_endpoint_h, - ffi.Pointer)>>('usb_host_endpoint_get_transfer_type'); - late final _usb_host_endpoint_get_transfer_type = - _usb_host_endpoint_get_transfer_typePtr.asFunction< - int Function(usb_host_endpoint_h, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_ENDPOINT_MODULE - /// @brief Gets synchronization type of given endpoint. - /// @since_tizen 3.0 - /// @param[in] ep An endpoint - /// @param[out] synch_type Synch type (a value from enum #usb_host_iso_sync_type_e) - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_endpoint_get_synch_type( - usb_host_endpoint_h ep, - ffi.Pointer synch_type, - ) { - return _usb_host_endpoint_get_synch_type( - ep, - synch_type, - ); - } - - late final _usb_host_endpoint_get_synch_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_endpoint_h, - ffi.Pointer)>>('usb_host_endpoint_get_synch_type'); - late final _usb_host_endpoint_get_synch_type = - _usb_host_endpoint_get_synch_typePtr.asFunction< - int Function(usb_host_endpoint_h, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_ENDPOINT_MODULE - /// @brief Gets usage type of given endpoint. - /// @since_tizen 3.0 - /// @param[in] ep An endpoint - /// @param[out] usage_type Usage type (a value from enum #usb_host_usage_type_e) - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_endpoint_get_usage_type( - usb_host_endpoint_h ep, - ffi.Pointer usage_type, - ) { - return _usb_host_endpoint_get_usage_type( - ep, - usage_type, - ); - } - - late final _usb_host_endpoint_get_usage_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_endpoint_h, - ffi.Pointer)>>('usb_host_endpoint_get_usage_type'); - late final _usb_host_endpoint_get_usage_type = - _usb_host_endpoint_get_usage_typePtr.asFunction< - int Function(usb_host_endpoint_h, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_ENDPOINT_MODULE - /// @brief Gets max packet size of given endpoint. - /// @since_tizen 3.0 - /// @param[in] ep An endpoint - /// @param[out] max_packet_size Max packet size, in bytes - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_endpoint_get_max_packet_size( - usb_host_endpoint_h ep, - ffi.Pointer max_packet_size, - ) { - return _usb_host_endpoint_get_max_packet_size( - ep, - max_packet_size, - ); - } - - late final _usb_host_endpoint_get_max_packet_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_endpoint_h, - ffi.Pointer)>>('usb_host_endpoint_get_max_packet_size'); - late final _usb_host_endpoint_get_max_packet_size = - _usb_host_endpoint_get_max_packet_sizePtr.asFunction< - int Function(usb_host_endpoint_h, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_ENDPOINT_MODULE - /// @brief Gets interval for polling endpoint for data transfers. - /// @since_tizen 3.0 - /// @param[in] ep An endpoint - /// @param[out] interval Interval for polling, in frame counts (refer to USB protocol specification) - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_endpoint_get_interval( - usb_host_endpoint_h ep, - ffi.Pointer interval, - ) { - return _usb_host_endpoint_get_interval( - ep, - interval, - ); - } - - late final _usb_host_endpoint_get_intervalPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_endpoint_h, - ffi.Pointer)>>('usb_host_endpoint_get_interval'); - late final _usb_host_endpoint_get_interval = - _usb_host_endpoint_get_intervalPtr.asFunction< - int Function(usb_host_endpoint_h, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_SYNCIO_MODULE - /// @brief Performs USB control transfer. - /// @details For more explanation about the values please refer to USB protocol specification - /// @since_tizen 3.0 - /// @remarks The wValue, wIndex and wLength fields values should be given in host-endian - /// byte order. - /// @param[in] dev Device handle - /// @param[in] bm_request_type bmRequestType type field for the setup packet - /// @param[in] b_request bRequest field for the setup packet - /// @param[in] w_value wValue field for the setup packet - /// @param[in] w_index wIndex field for the setup packet - /// @param[in] data Suitably-sized data buffer for either input or output - /// (depending on direction bits within bmRequestType) - /// @param[in] w_length wLength field for the setup packet. The data buffer should - /// be at least this size - /// @param[in] timeout Timeout (in milliseconds) that this function should wait - /// before giving up due to no response being received. For an unlimited - /// @param[out] transferred Number of transferred bytes - /// timeout, 0 value should be used. - /// @return 0 on success, negative error code otherwise - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_TIMED_OUT Transfer timed out - /// @retval #USB_HOST_ERROR_BROKEN_PIPE Control request was not supported by the device - /// @retval #USB_HOST_ERROR_NO_SUCH_DEVICE The device has been disconnected - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_DEVICE_NOT_OPENED The device was not opened - /// @retval #USB_HOST_ERROR_OVERFLOW Device offered more data - /// @pre dev must point to device opened by usb_host_device_open() or usb_host_device_open_with_vid_pid() - int usb_host_control_transfer( - usb_host_device_h dev, - int bm_request_type, - int b_request, - int w_value, - int w_index, - ffi.Pointer data, - int w_length, - int timeout, - ffi.Pointer transferred, - ) { - return _usb_host_control_transfer( - dev, - bm_request_type, - b_request, - w_value, - w_index, - data, - w_length, - timeout, - transferred, - ); - } - - late final _usb_host_control_transferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - usb_host_device_h, - ffi.Uint8, - ffi.Uint8, - ffi.Uint16, - ffi.Uint16, - ffi.Pointer, - ffi.Uint16, - ffi.UnsignedInt, - ffi.Pointer)>>('usb_host_control_transfer'); - late final _usb_host_control_transfer = - _usb_host_control_transferPtr.asFunction< - int Function(usb_host_device_h, int, int, int, int, - ffi.Pointer, int, int, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_SYNCIO_MODULE - /// @brief Performs transfer on given endpoint. - /// @details Performs a USB transfer on given endpoint. Direction of transfer is - /// determined by the endpoint. - /// @since_tizen 3.0 - /// @param[in] ep Endpoint handle - /// @param[in] data Suitably-sized data buffer for either input or output - /// (depending on endpoint) - /// @param[in] length For writes, the number of bytes from data to be sent, for - /// reads the maximum number of bytes to receive into the data buffer - /// @param[out] transferred number of bytes actually transferred - /// @param[in] timeout Timeout (in milliseconds) that this function should wait - /// before giving up due to no response being received (for an unlimited - /// timeout 0 value should be used) - /// @return 0 on success (and populates @a transferred), negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_TIMED_OUT Transfer timed out - /// @retval #USB_HOST_ERROR_BROKEN_PIPE Endpoint halted - /// @retval #USB_HOST_ERROR_OVERFLOW Device offered more data - /// @retval #USB_HOST_ERROR_NO_SUCH_DEVICE Device has been disconnected - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_DEVICE_NOT_OPENED The device was not opened - /// @pre ep must be a valid endpoint received from usb_host_interface_get_endpoint(). - /// @pre ep must be an endpoint of device opened by usb_host_device_open() or - /// usb_host_device_open_with_vid_pid(). - int usb_host_transfer( - usb_host_endpoint_h ep, - ffi.Pointer data, - int length, - ffi.Pointer transferred, - int timeout, - ) { - return _usb_host_transfer( - ep, - data, - length, - transferred, - timeout, - ); - } - - late final _usb_host_transferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - usb_host_endpoint_h, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.UnsignedInt)>>('usb_host_transfer'); - late final _usb_host_transfer = _usb_host_transferPtr.asFunction< - int Function(usb_host_endpoint_h, ffi.Pointer, int, - ffi.Pointer, int)>(); - - /// @ingroup CAPI_USB_HOST_HOTPLUG_MODULE - /// @brief Registers a callback function to be invoked when a device is connected or disconnected. - /// @since_tizen 4.0 - /// @param[in] ctx Context handle - /// @param[in] cb The callback function to be registered - /// @param[in] event Event that will trigger registered callback - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] handle Handle of the registered callback - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_OUT_OF_MEMORY Out of memory - int usb_host_set_hotplug_cb( - usb_host_context_h ctx, - usb_host_hotplug_cb cb, - int event, - ffi.Pointer user_data, - ffi.Pointer handle, - ) { - return _usb_host_set_hotplug_cb( - ctx, - cb, - event, - user_data, - handle, - ); - } - - late final _usb_host_set_hotplug_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - usb_host_context_h, - usb_host_hotplug_cb, - ffi.Int32, - ffi.Pointer, - ffi.Pointer)>>('usb_host_set_hotplug_cb'); - late final _usb_host_set_hotplug_cb = _usb_host_set_hotplug_cbPtr.asFunction< - int Function(usb_host_context_h, usb_host_hotplug_cb, int, - ffi.Pointer, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_HOTPLUG_MODULE - /// @brief Unregisters the hotplug callback function. - /// @since_tizen 4.0 - /// @param[in] handle Handle of the callback to be unregistered - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - int usb_host_unset_hotplug_cb( - usb_host_hotplug_h handle, - ) { - return _usb_host_unset_hotplug_cb( - handle, - ); - } - - late final _usb_host_unset_hotplug_cbPtr = - _lookup>( - 'usb_host_unset_hotplug_cb'); - late final _usb_host_unset_hotplug_cb = _usb_host_unset_hotplug_cbPtr - .asFunction(); - - /// @brief Sets a callback function to be invoked when the telephony state changes. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks An application should have the privilege corresponding to each notificaiton ID. \n - /// Please see the #telephony_noti_e to know the privilege. \n - /// If an application has no proper privilege, callback will not be invoked although API returns success. - /// - /// @param[in] handle The handle to use the telephony API - /// @param[in] noti_id The notification ID to set the callback - /// @param[in] cb The callback to be invoked when the telephony state changes - /// @param[in] user_data The user data passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// - /// @post telephony_noti_cb() will be invoked. - /// - /// @see telephony_unset_noti_cb() - int telephony_set_noti_cb( - telephony_h handle, - int noti_id, - telephony_noti_cb cb, - ffi.Pointer user_data, - ) { - return _telephony_set_noti_cb( - handle, - noti_id, - cb, - user_data, - ); - } - - late final _telephony_set_noti_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_h, ffi.Int32, telephony_noti_cb, - ffi.Pointer)>>('telephony_set_noti_cb'); - late final _telephony_set_noti_cb = _telephony_set_noti_cbPtr.asFunction< - int Function( - telephony_h, int, telephony_noti_cb, ffi.Pointer)>(); - - /// @brief Unsets a callback function. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] handle The handle to use the telephony API - /// @param[in] noti_id The notification ID to unset a callback - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// - /// @see telephony_set_noti_cb() - int telephony_unset_noti_cb( - telephony_h handle, - int noti_id, - ) { - return _telephony_unset_noti_cb( - handle, - noti_id, - ); - } - - late final _telephony_unset_noti_cbPtr = - _lookup>( - 'telephony_unset_noti_cb'); - late final _telephony_unset_noti_cb = - _telephony_unset_noti_cbPtr.asFunction(); - - /// @brief Acquires the list of available handles to use the telephony API. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You will get two handles in case of dual SIM device. \n - /// In this case, handle[0] means Primary SIM and handle[1] means Secondary SIM. - /// - /// @param[out] list The list contains the number of - /// available handles and array of handles - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// - /// @see telephony_deinit() - int telephony_init( - ffi.Pointer list, - ) { - return _telephony_init( - list, - ); - } - - late final _telephony_initPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer)>>('telephony_init'); - late final _telephony_init = _telephony_initPtr - .asFunction)>(); - - /// @brief Deinitializes the telephony handle list. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] list The handle list to be deinitialized - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// - /// @see telephony_init() - int telephony_deinit( - ffi.Pointer list, - ) { - return _telephony_deinit( - list, - ); - } - - late final _telephony_deinitPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer)>>('telephony_deinit'); - late final _telephony_deinit = _telephony_deinitPtr - .asFunction)>(); - - /// @brief Acquires the telephony state value. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[out] state The state value of telephony - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// - /// @see telephony_set_state_changed_cb() - /// @see telephony_unset_state_changed_cb() - int telephony_get_state( - ffi.Pointer state, - ) { - return _telephony_get_state( - state, - ); - } - - late final _telephony_get_statePtr = - _lookup)>>( - 'telephony_get_state'); - late final _telephony_get_state = _telephony_get_statePtr - .asFunction)>(); - - /// @brief Sets a callback function to be invoked when the telephony state changes. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] callback The callback to be invoked when the telephony state changes - /// @param[in] user_data The user data passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// - /// @post telephony_state_changed_cb() will be invoked. - /// - /// @see telephony_unset_state_changed_cb() - int telephony_set_state_changed_cb( - telephony_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _telephony_set_state_changed_cb( - callback, - user_data, - ); - } - - late final _telephony_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_state_changed_cb, - ffi.Pointer)>>('telephony_set_state_changed_cb'); - late final _telephony_set_state_changed_cb = - _telephony_set_state_changed_cbPtr.asFunction< - int Function(telephony_state_changed_cb, ffi.Pointer)>(); - - /// @brief Unsets a telephony state callback function. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] callback The callback to unset when the telephony state changes - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// - /// @see telephony_set_state_changed_cb() - int telephony_unset_state_changed_cb( - telephony_state_changed_cb callback, - ) { - return _telephony_unset_state_changed_cb( - callback, - ); - } - - late final _telephony_unset_state_changed_cbPtr = - _lookup>( - 'telephony_unset_state_changed_cb'); - late final _telephony_unset_state_changed_cb = - _telephony_unset_state_changed_cbPtr - .asFunction(); - - /// @deprecated Deprecated Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. Use #telephony_call_get_status instead. - /// - /// @brief Gets the voice call state of the telephony service. - /// @details Determines if the voice call is connecting, connected, or idle. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @remarks When you are dialing a number or a new voice call is ringing, - /// the state of the voice call is #TELEPHONY_CALL_STATE_CONNECTING. - /// When a new voice call is connecting while another voice call is already connected, - /// the state of the voice call is #TELEPHONY_CALL_STATE_CONNECTING as well. - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] call_state The current state of the voice call - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - int telephony_call_get_voice_call_state( - telephony_h handle, - ffi.Pointer call_state, - ) { - return _telephony_call_get_voice_call_state( - handle, - call_state, - ); - } - - late final _telephony_call_get_voice_call_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_h, - ffi.Pointer)>>('telephony_call_get_voice_call_state'); - late final _telephony_call_get_voice_call_state = - _telephony_call_get_voice_call_statePtr - .asFunction)>(); - - /// @deprecated Deprecated Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. Use #telephony_call_get_status instead. - /// - /// @brief Gets the video call state of the telephony service. - /// @details Determines if the video call is connecting, connected, or idle. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @remarks When you are dialing a number or a new video call is ringing, - /// the state of the video call is #TELEPHONY_CALL_STATE_CONNECTING. - /// If a video call is connected, then the state of any other call cannot be - /// #TELEPHONY_CALL_STATE_CONNECTING and #TELEPHONY_CALL_STATE_CONNECTED. - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] call_state The current state of the video call - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - int telephony_call_get_video_call_state( - telephony_h handle, - ffi.Pointer call_state, - ) { - return _telephony_call_get_video_call_state( - handle, - call_state, - ); - } - - late final _telephony_call_get_video_call_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_h, - ffi.Pointer)>>('telephony_call_get_video_call_state'); - late final _telephony_call_get_video_call_state = - _telephony_call_get_video_call_statePtr - .asFunction)>(); - - /// @brief Gets the current value for the preferred voice call subscription. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] call_sub The currently set preferred call subscription value. (telephony_call_preferred_voice_subs_e) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - int telephony_call_get_preferred_voice_subscription( - telephony_h handle, - ffi.Pointer call_sub, - ) { - return _telephony_call_get_preferred_voice_subscription( - handle, - call_sub, - ); - } - - late final _telephony_call_get_preferred_voice_subscriptionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_h, ffi.Pointer)>>( - 'telephony_call_get_preferred_voice_subscription'); - late final _telephony_call_get_preferred_voice_subscription = - _telephony_call_get_preferred_voice_subscriptionPtr - .asFunction)>(); - - /// @brief Gets the list of the current call. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @remarks You must release @c call_list using telephony_call_release_call_list(). - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] count Count of the existing calls - /// @param[out] call_list List of call information for existing calls - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - int telephony_call_get_call_list( - telephony_h handle, - ffi.Pointer count, - ffi.Pointer> call_list, - ) { - return _telephony_call_get_call_list( - handle, - count, - call_list, - ); - } - - late final _telephony_call_get_call_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_h, ffi.Pointer, - ffi.Pointer>)>>( - 'telephony_call_get_call_list'); - late final _telephony_call_get_call_list = - _telephony_call_get_call_listPtr.asFunction< - int Function(telephony_h, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Releases the list allocated from #telephony_call_get_call_list(). - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] count The count of the calls from #telephony_call_get_call_list() - /// @param[in] call_list The handle from #telephony_call_get_call_list() - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The call list should be validated from #telephony_call_get_call_list(). - int telephony_call_release_call_list( - int count, - ffi.Pointer> call_list, - ) { - return _telephony_call_release_call_list( - count, - call_list, - ); - } - - late final _telephony_call_release_call_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.UnsignedInt, - ffi.Pointer>)>>( - 'telephony_call_release_call_list'); - late final _telephony_call_release_call_list = - _telephony_call_release_call_listPtr.asFunction< - int Function(int, ffi.Pointer>)>(); - - /// @brief Gets the call handle ID. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] call_handle The handle from #telephony_call_get_call_list() - /// @param[out] handle_id The ID of the call handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The call handle should be obtained from #telephony_call_get_call_list(). - /// @post The call list should be released by using #telephony_call_release_call_list(). - int telephony_call_get_handle_id( - telephony_call_h call_handle, - ffi.Pointer handle_id, - ) { - return _telephony_call_get_handle_id( - call_handle, - handle_id, - ); - } - - late final _telephony_call_get_handle_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_call_h, - ffi.Pointer)>>('telephony_call_get_handle_id'); - late final _telephony_call_get_handle_id = - _telephony_call_get_handle_idPtr.asFunction< - int Function(telephony_call_h, ffi.Pointer)>(); - - /// @brief Gets the call number. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks You must release @c number using free() on success case. - /// - /// @param[in] call_handle The handle from #telephony_call_get_call_list() - /// @param[out] number The number of the call - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The call handle should be obtained from #telephony_call_get_call_list(). - /// @post The call list should be released by using #telephony_call_release_call_list(). - int telephony_call_get_number( - telephony_call_h call_handle, - ffi.Pointer> number, - ) { - return _telephony_call_get_number( - call_handle, - number, - ); - } - - late final _telephony_call_get_numberPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - telephony_call_h, ffi.Pointer>)>>( - 'telephony_call_get_number'); - late final _telephony_call_get_number = - _telephony_call_get_numberPtr.asFunction< - int Function(telephony_call_h, ffi.Pointer>)>(); - - /// @brief Gets the call type. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] call_handle The handle from #telephony_call_get_call_list() - /// @param[out] type The type of the call (#telephony_call_type_e) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The call handle should be obtained from #telephony_call_get_call_list(). - /// @post The call list should be released by using #telephony_call_release_call_list(). - int telephony_call_get_type( - telephony_call_h call_handle, - ffi.Pointer type, - ) { - return _telephony_call_get_type( - call_handle, - type, - ); - } - - late final _telephony_call_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_call_h, - ffi.Pointer)>>('telephony_call_get_type'); - late final _telephony_call_get_type = _telephony_call_get_typePtr - .asFunction)>(); - - /// @brief Gets the call status. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] call_handle The handle from #telephony_call_get_call_list() - /// @param[out] status The status of the call (#telephony_call_status_e) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The call handle should be obtained from #telephony_call_get_call_list(). - /// @post The call list should be released by using #telephony_call_release_call_list(). - int telephony_call_get_status( - telephony_call_h call_handle, - ffi.Pointer status, - ) { - return _telephony_call_get_status( - call_handle, - status, - ); - } - - late final _telephony_call_get_statusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_call_h, - ffi.Pointer)>>('telephony_call_get_status'); - late final _telephony_call_get_status = _telephony_call_get_statusPtr - .asFunction)>(); - - /// @brief Gets whether the call is MO(Mobile Originated) call or MT(Mobile Terminated). - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] call_handle The handle from #telephony_call_get_call_list() - /// @param[out] direction The direction of the call (#telephony_call_direction_e) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The call handle should be obtained from #telephony_call_get_call_list(). - /// @post The call list should be released by using #telephony_call_release_call_list(). - int telephony_call_get_direction( - telephony_call_h call_handle, - ffi.Pointer direction, - ) { - return _telephony_call_get_direction( - call_handle, - direction, - ); - } - - late final _telephony_call_get_directionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_call_h, - ffi.Pointer)>>('telephony_call_get_direction'); - late final _telephony_call_get_direction = _telephony_call_get_directionPtr - .asFunction)>(); - - /// @brief Gets whether the call is conference call or not. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] call_handle The handle from #telephony_call_get_call_list() - /// @param[out] conference_status The value whether the call is conference call or not - /// (true: Conference call, false: Single call) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The call handle should be obtained from #telephony_call_get_call_list(). - /// @post The call list should be released by using #telephony_call_release_call_list(). - int telephony_call_get_conference_status( - telephony_call_h call_handle, - ffi.Pointer conference_status, - ) { - return _telephony_call_get_conference_status( - call_handle, - conference_status, - ); - } - - late final _telephony_call_get_conference_statusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_call_h, - ffi.Pointer)>>('telephony_call_get_conference_status'); - late final _telephony_call_get_conference_status = - _telephony_call_get_conference_statusPtr - .asFunction)>(); - - /// @brief Gets the Integrated Circuit Card IDentification (ICC-ID). - /// @details The Integrated Circuit Card Identification number internationally identifies SIM cards. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @remarks You must release @c icc_id using free() on success case. - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] icc_id The Integrated Circuit Card Identification - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// @retval #TELEPHONY_ERROR_SIM_NOT_AVAILABLE SIM is not available - /// - /// @pre The SIM state must be #TELEPHONY_SIM_STATE_AVAILABLE. - /// - /// @see telephony_sim_get_state() - int telephony_sim_get_icc_id( - telephony_h handle, - ffi.Pointer> icc_id, - ) { - return _telephony_sim_get_icc_id( - handle, - icc_id, - ); - } - - late final _telephony_sim_get_icc_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_h, - ffi.Pointer>)>>('telephony_sim_get_icc_id'); - late final _telephony_sim_get_icc_id = - _telephony_sim_get_icc_idPtr.asFunction< - int Function(telephony_h, ffi.Pointer>)>(); - - /// @brief Gets the SIM Operator (MCC [3 digits] + MNC [2~3 digits]). - /// @details The Operator is embedded in the SIM card. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @remarks You must release @c sim_operator using free() on success case. - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] sim_operator The SIM Operator - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// @retval #TELEPHONY_ERROR_SIM_NOT_AVAILABLE SIM is not available - /// - /// @pre The SIM state must be #TELEPHONY_SIM_STATE_AVAILABLE. - /// - /// @see telephony_sim_get_state() - int telephony_sim_get_operator( - telephony_h handle, - ffi.Pointer> sim_operator, - ) { - return _telephony_sim_get_operator( - handle, - sim_operator, - ); - } - - late final _telephony_sim_get_operatorPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - telephony_h, ffi.Pointer>)>>( - 'telephony_sim_get_operator'); - late final _telephony_sim_get_operator = - _telephony_sim_get_operatorPtr.asFunction< - int Function(telephony_h, ffi.Pointer>)>(); - - /// @brief Gets the Mobile Subscription Identification Number (MSIN [9~10 digits]) of the SIM provider. - /// @details This function gets Mobile Subscription Identification Number embedded in the SIM card. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @remarks You must release @c msin using free() on success case. - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] msin The Mobile Subscription Identification Number - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// @retval #TELEPHONY_ERROR_SIM_NOT_AVAILABLE SIM is not available - /// - /// @pre The SIM state must be #TELEPHONY_SIM_STATE_AVAILABLE. - /// - /// @see telephony_sim_get_state() - int telephony_sim_get_msin( - telephony_h handle, - ffi.Pointer> msin, - ) { - return _telephony_sim_get_msin( - handle, - msin, - ); - } - - late final _telephony_sim_get_msinPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_h, - ffi.Pointer>)>>('telephony_sim_get_msin'); - late final _telephony_sim_get_msin = _telephony_sim_get_msinPtr.asFunction< - int Function(telephony_h, ffi.Pointer>)>(); - - /// @brief Gets the Service Provider Name (SPN) of the SIM card. - /// @details This function gets Service Provider Name embedded in the SIM card. - /// If this value is not stored in SIM card, @c NULL will be returned. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @remarks You must release @c spn using free() on success case. - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] spn The Service Provider Name - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// @retval #TELEPHONY_ERROR_SIM_NOT_AVAILABLE SIM is not available - /// - /// @pre The SIM state must be #TELEPHONY_SIM_STATE_AVAILABLE. - /// - /// @see telephony_sim_get_state() - int telephony_sim_get_spn( - telephony_h handle, - ffi.Pointer> spn, - ) { - return _telephony_sim_get_spn( - handle, - spn, - ); - } - - late final _telephony_sim_get_spnPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_h, - ffi.Pointer>)>>('telephony_sim_get_spn'); - late final _telephony_sim_get_spn = _telephony_sim_get_spnPtr.asFunction< - int Function(telephony_h, ffi.Pointer>)>(); - - /// @brief Checks whether the current SIM card is different from the previous SIM card. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] is_changed @c true if the current SIM card is different from the previous SIM card, - /// otherwise @c false if the SIM card is not changed - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// @retval #TELEPHONY_ERROR_SIM_NOT_AVAILABLE SIM is not available - /// - /// @pre The SIM state must be #TELEPHONY_SIM_STATE_AVAILABLE. - /// - /// @see telephony_sim_get_state() - int telephony_sim_is_changed( - telephony_h handle, - ffi.Pointer is_changed, - ) { - return _telephony_sim_is_changed( - handle, - is_changed, - ); - } - - late final _telephony_sim_is_changedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - telephony_h, ffi.Pointer)>>('telephony_sim_is_changed'); - late final _telephony_sim_is_changed = _telephony_sim_is_changedPtr - .asFunction)>(); - - /// @brief Gets the state of the SIM. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] sim_state The current state of the SIM - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - int telephony_sim_get_state( - telephony_h handle, - ffi.Pointer sim_state, - ) { - return _telephony_sim_get_state( - handle, - sim_state, - ); - } - - late final _telephony_sim_get_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - telephony_h, ffi.Pointer)>>('telephony_sim_get_state'); - late final _telephony_sim_get_state = _telephony_sim_get_statePtr - .asFunction)>(); - - /// @brief Gets the list of application on UICC. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] app_list The masking value for below values - /// #TELEPHONY_SIM_APP_TYPE_SIM 0x01 GSM Application - /// #TELEPHONY_SIM_APP_TYPE_USIM 0x02 USIM Application - /// #TELEPHONY_SIM_APP_TYPE_CSIM 0x04 CSIM Application - /// #TELEPHONY_SIM_APP_TYPE_ISIM 0x08 ISIM Application - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// @retval #TELEPHONY_ERROR_SIM_NOT_AVAILABLE SIM is not available - /// - /// @pre The SIM state must be #TELEPHONY_SIM_STATE_AVAILABLE. - /// - /// @see telephony_sim_get_state() - int telephony_sim_get_application_list( - telephony_h handle, - ffi.Pointer app_list, - ) { - return _telephony_sim_get_application_list( - handle, - app_list, - ); - } - - late final _telephony_sim_get_application_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_h, ffi.Pointer)>>( - 'telephony_sim_get_application_list'); - late final _telephony_sim_get_application_list = - _telephony_sim_get_application_listPtr.asFunction< - int Function(telephony_h, ffi.Pointer)>(); - - /// @brief Gets the SIM card subscriber number. - /// @details This function gets subscriber number embedded in the SIM card. - /// This value contains MSISDN related to the subscriber. - /// If this value is not stored in SIM card, @c NULL will be returned. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @remarks You must release @c subscriber_number using free() on success case. - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] subscriber_number The subscriber number in the SIM - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// @retval #TELEPHONY_ERROR_SIM_NOT_AVAILABLE SIM is not available - /// - /// @pre The SIM state must be #TELEPHONY_SIM_STATE_AVAILABLE. - /// - /// @see telephony_sim_get_state() - int telephony_sim_get_subscriber_number( - telephony_h handle, - ffi.Pointer> subscriber_number, - ) { - return _telephony_sim_get_subscriber_number( - handle, - subscriber_number, - ); - } - - late final _telephony_sim_get_subscriber_numberPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - telephony_h, ffi.Pointer>)>>( - 'telephony_sim_get_subscriber_number'); - late final _telephony_sim_get_subscriber_number = - _telephony_sim_get_subscriber_numberPtr.asFunction< - int Function(telephony_h, ffi.Pointer>)>(); - - /// @brief Gets the Subscriber ID. - /// @details This function gets subscriber ID encoded. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @remarks You must release @c subscriber_id using free() on success case. - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] subscriber_id The subscriber ID - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// @retval #TELEPHONY_ERROR_SIM_NOT_AVAILABLE SIM is not available - /// - /// @pre The SIM state must be #TELEPHONY_SIM_STATE_AVAILABLE. - /// - /// @see telephony_sim_get_state() - int telephony_sim_get_subscriber_id( - telephony_h handle, - ffi.Pointer> subscriber_id, - ) { - return _telephony_sim_get_subscriber_id( - handle, - subscriber_id, - ); - } - - late final _telephony_sim_get_subscriber_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - telephony_h, ffi.Pointer>)>>( - 'telephony_sim_get_subscriber_id'); - late final _telephony_sim_get_subscriber_id = - _telephony_sim_get_subscriber_idPtr.asFunction< - int Function(telephony_h, ffi.Pointer>)>(); - - /// @brief Gets the lock state of the SIM. - /// @details This function gets SIM card lock state. - /// If SIM state is #TELEPHONY_SIM_STATE_LOCKED, you can use this function to retrieve lock state. - /// - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] lock_state The current lock state of the SIM - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// - /// @pre The SIM state must be #TELEPHONY_SIM_STATE_LOCKED. - /// - /// @see telephony_sim_get_state() - int telephony_sim_get_lock_state( - telephony_h handle, - ffi.Pointer lock_state, - ) { - return _telephony_sim_get_lock_state( - handle, - lock_state, - ); - } - - late final _telephony_sim_get_lock_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_h, - ffi.Pointer)>>('telephony_sim_get_lock_state'); - late final _telephony_sim_get_lock_state = _telephony_sim_get_lock_statePtr - .asFunction)>(); - - /// @brief Gets the GID1 (Group Identifier Level 1). - /// @details This function gets Group Identifier Level 1(GID1) embedded in the SIM card. - /// If this value is not stored in SIM card, @c NULL will be returned. - /// - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @remarks You must release @c gid1 using free() on success case. - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] gid1 The GID1 - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// @retval #TELEPHONY_ERROR_SIM_NOT_AVAILABLE SIM is not available - /// - /// @pre The SIM state must be #TELEPHONY_SIM_STATE_AVAILABLE. - /// - /// @see telephony_sim_get_state() - int telephony_sim_get_group_id1( - telephony_h handle, - ffi.Pointer> gid1, - ) { - return _telephony_sim_get_group_id1( - handle, - gid1, - ); - } - - late final _telephony_sim_get_group_id1Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - telephony_h, ffi.Pointer>)>>( - 'telephony_sim_get_group_id1'); - late final _telephony_sim_get_group_id1 = - _telephony_sim_get_group_id1Ptr.asFunction< - int Function(telephony_h, ffi.Pointer>)>(); - - /// @brief Gets the call forwarding indicator state of the SIM. - /// @details If the state is @c true, incoming call will be forwarded to the selected number. - /// @c state indicates the CFU (Call Forwarding Unconditional) indicator status - Voice. - /// (3GPP TS 31.102 4.2.64 EF CFIS) - /// - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] state The value whether incoming call will be forwarded or not. - /// (@c true: forwarded, @c false: not forwarded) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// @retval #TELEPHONY_ERROR_SIM_NOT_AVAILABLE SIM is not available - /// - /// @pre The SIM state must be #TELEPHONY_SIM_STATE_AVAILABLE. - /// - /// @see telephony_sim_get_state() - int telephony_sim_get_call_forwarding_indicator_state( - telephony_h handle, - ffi.Pointer state, - ) { - return _telephony_sim_get_call_forwarding_indicator_state( - handle, - state, - ); - } - - late final _telephony_sim_get_call_forwarding_indicator_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_h, ffi.Pointer)>>( - 'telephony_sim_get_call_forwarding_indicator_state'); - late final _telephony_sim_get_call_forwarding_indicator_state = - _telephony_sim_get_call_forwarding_indicator_statePtr - .asFunction)>(); - - /// @brief Gets the LAC (Location Area Code) of the current location. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location.coarse - /// - /// @remarks This API can be used in GSM / WCDMA network. @n - /// http://tizen.org/privilege/location.coarse privilege is required to use this API since 3.0. @n - /// http://tizen.org/privilege/telephony privilege is no longer required since 3.0. - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] lac The Location Area Code, @c -1 if unknown - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// - /// @see telephony_network_get_service_state() - /// @see telephony_network_get_type() - int telephony_network_get_lac( - telephony_h handle, - ffi.Pointer lac, - ) { - return _telephony_network_get_lac( - handle, - lac, - ); - } - - late final _telephony_network_get_lacPtr = _lookup< - ffi - .NativeFunction)>>( - 'telephony_network_get_lac'); - late final _telephony_network_get_lac = _telephony_network_get_lacPtr - .asFunction)>(); - - /// @brief Gets the cell ID of the current location. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location.coarse - /// - /// @remarks This API can be used in GSM / WCDMA / LTE network. @n - /// http://tizen.org/privilege/location.coarse privilege is required to use this API since 3.0. @n - /// http://tizen.org/privilege/telephony privilege is no longer required since 3.0. - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] cell_id The cell identification number, @c -1 if unknown - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// - /// @see telephony_network_get_service_state() - /// @see telephony_network_get_type() - int telephony_network_get_cell_id( - telephony_h handle, - ffi.Pointer cell_id, - ) { - return _telephony_network_get_cell_id( - handle, - cell_id, - ); - } - - late final _telephony_network_get_cell_idPtr = _lookup< - ffi - .NativeFunction)>>( - 'telephony_network_get_cell_id'); - late final _telephony_network_get_cell_id = _telephony_network_get_cell_idPtr - .asFunction)>(); - - /// @brief Gets the RSSI (Received Signal Strength Indicator). - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] rssi The Received Signal Strength Indicator \n - /// Higher the received number, the stronger the signal strength - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - int telephony_network_get_rssi( - telephony_h handle, - ffi.Pointer rssi, - ) { - return _telephony_network_get_rssi( - handle, - rssi, - ); - } - - late final _telephony_network_get_rssiPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_h, - ffi.Pointer)>>('telephony_network_get_rssi'); - late final _telephony_network_get_rssi = _telephony_network_get_rssiPtr - .asFunction)>(); - - /// @brief Gets the roaming state of the current registered network. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] status @c true if roaming, - /// otherwise @c false if not roaming - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - int telephony_network_get_roaming_status( - telephony_h handle, - ffi.Pointer status, - ) { - return _telephony_network_get_roaming_status( - handle, - status, - ); - } - - late final _telephony_network_get_roaming_statusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_h, - ffi.Pointer)>>('telephony_network_get_roaming_status'); - late final _telephony_network_get_roaming_status = - _telephony_network_get_roaming_statusPtr - .asFunction)>(); - - /// @brief Gets the MCC (Mobile Country Code) of the current registered network. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @remarks This API can be used in GSM / WCDMA / LTE network. - /// You must release @c mcc using free() on success case, empty string if unknown. - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] mcc The Mobile Country Code (three digits) - /// Mobile Country Code (MCC) identifies the country where the cell is being used - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - int telephony_network_get_mcc( - telephony_h handle, - ffi.Pointer> mcc, - ) { - return _telephony_network_get_mcc( - handle, - mcc, - ); - } - - late final _telephony_network_get_mccPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - telephony_h, ffi.Pointer>)>>( - 'telephony_network_get_mcc'); - late final _telephony_network_get_mcc = - _telephony_network_get_mccPtr.asFunction< - int Function(telephony_h, ffi.Pointer>)>(); - - /// @brief Gets the MNC (Mobile Network Code) of the current registered network. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @remarks This API can be used in GSM / WCDMA / LTE network. - /// You must release @c mnc using free() on success case, empty string if unknown. - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] mnc The Mobile Network Code (three digits) - /// The Mobile Network Code (MNC) identifies the mobile phone operator and network provider - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - int telephony_network_get_mnc( - telephony_h handle, - ffi.Pointer> mnc, - ) { - return _telephony_network_get_mnc( - handle, - mnc, - ); - } - - late final _telephony_network_get_mncPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - telephony_h, ffi.Pointer>)>>( - 'telephony_network_get_mnc'); - late final _telephony_network_get_mnc = - _telephony_network_get_mncPtr.asFunction< - int Function(telephony_h, ffi.Pointer>)>(); - - /// @brief Gets the name of the current registered network. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @remarks This API can be used in GSM / WCDMA / LTE network. - /// You must release @c network_name using free() on success case. - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] network_name The name of the current registered network, empty string if unknown - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - int telephony_network_get_network_name( - telephony_h handle, - ffi.Pointer> network_name, - ) { - return _telephony_network_get_network_name( - handle, - network_name, - ); - } - - late final _telephony_network_get_network_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - telephony_h, ffi.Pointer>)>>( - 'telephony_network_get_network_name'); - late final _telephony_network_get_network_name = - _telephony_network_get_network_namePtr.asFunction< - int Function(telephony_h, ffi.Pointer>)>(); - - /// @brief Gets the network service type of the current registered network. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @remarks This API can be used in case network is in service. - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] network_type The network service type - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// - /// @see telephony_network_get_service_state() - int telephony_network_get_type( - telephony_h handle, - ffi.Pointer network_type, - ) { - return _telephony_network_get_type( - handle, - network_type, - ); - } - - late final _telephony_network_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_h, - ffi.Pointer)>>('telephony_network_get_type'); - late final _telephony_network_get_type = _telephony_network_get_typePtr - .asFunction)>(); - - /// @brief Gets the packet service type of the current registered network. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @remarks This API can be used in HSDPA network. - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] ps_type The type of packet service - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// - /// @see telephony_network_get_service_state() - /// @see telephony_network_get_type() - int telephony_network_get_ps_type( - telephony_h handle, - ffi.Pointer ps_type, - ) { - return _telephony_network_get_ps_type( - handle, - ps_type, - ); - } - - late final _telephony_network_get_ps_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_h, - ffi.Pointer)>>('telephony_network_get_ps_type'); - late final _telephony_network_get_ps_type = _telephony_network_get_ps_typePtr - .asFunction)>(); - - /// @brief Gets the network name option of the current registered network. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] network_name_option The network name display option - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - int telephony_network_get_network_name_option( - telephony_h handle, - ffi.Pointer network_name_option, - ) { - return _telephony_network_get_network_name_option( - handle, - network_name_option, - ); - } - - late final _telephony_network_get_network_name_optionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_h, ffi.Pointer)>>( - 'telephony_network_get_network_name_option'); - late final _telephony_network_get_network_name_option = - _telephony_network_get_network_name_optionPtr - .asFunction)>(); - - /// @brief Gets the current network state of the telephony service. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @remarks To know the state of data network, refer connection API. - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] network_service_state The current network state - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - int telephony_network_get_service_state( - telephony_h handle, - ffi.Pointer network_service_state, - ) { - return _telephony_network_get_service_state( - handle, - network_service_state, - ); - } - - late final _telephony_network_get_service_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_h, - ffi.Pointer)>>('telephony_network_get_service_state'); - late final _telephony_network_get_service_state = - _telephony_network_get_service_statePtr - .asFunction)>(); - - /// @brief Gets the current default subscription for data service (Packet Switched). - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] default_sub The current default data subscription - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - int telephony_network_get_default_data_subscription( - telephony_h handle, - ffi.Pointer default_sub, - ) { - return _telephony_network_get_default_data_subscription( - handle, - default_sub, - ); - } - - late final _telephony_network_get_default_data_subscriptionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_h, ffi.Pointer)>>( - 'telephony_network_get_default_data_subscription'); - late final _telephony_network_get_default_data_subscription = - _telephony_network_get_default_data_subscriptionPtr - .asFunction)>(); - - /// @brief Gets the current default subscription for voice service (Circuit Switched). - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] default_sub The current default voice subscription - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - int telephony_network_get_default_subscription( - telephony_h handle, - ffi.Pointer default_sub, - ) { - return _telephony_network_get_default_subscription( - handle, - default_sub, - ); - } - - late final _telephony_network_get_default_subscriptionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_h, ffi.Pointer)>>( - 'telephony_network_get_default_subscription'); - late final _telephony_network_get_default_subscription = - _telephony_network_get_default_subscriptionPtr - .asFunction)>(); - - /// @brief Gets the network selection mode. - /// - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] mode The network selection mode - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - int telephony_network_get_selection_mode( - telephony_h handle, - ffi.Pointer mode, - ) { - return _telephony_network_get_selection_mode( - handle, - mode, - ); - } - - late final _telephony_network_get_selection_modePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_h, - ffi.Pointer)>>('telephony_network_get_selection_mode'); - late final _telephony_network_get_selection_mode = - _telephony_network_get_selection_modePtr - .asFunction)>(); - - /// @brief Gets the TAC (Tracking Area Code) of the current location. - /// - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location.coarse - /// - /// @remarks This API can be used in LTE network. - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] tac The Tracking Area Code, @c -1 if unknown - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// - /// @see telephony_network_get_service_state() - /// @see telephony_network_get_type() - int telephony_network_get_tac( - telephony_h handle, - ffi.Pointer tac, - ) { - return _telephony_network_get_tac( - handle, - tac, - ); - } - - late final _telephony_network_get_tacPtr = _lookup< - ffi - .NativeFunction)>>( - 'telephony_network_get_tac'); - late final _telephony_network_get_tac = _telephony_network_get_tacPtr - .asFunction)>(); - - /// @brief Gets the system ID of the current location. - /// - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location.coarse - /// - /// @remarks This API can be used in CDMA network. - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] sid The system ID, @c -1 if unknown - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// - /// @see telephony_network_get_service_state() - /// @see telephony_network_get_type() - int telephony_network_get_system_id( - telephony_h handle, - ffi.Pointer sid, - ) { - return _telephony_network_get_system_id( - handle, - sid, - ); - } - - late final _telephony_network_get_system_idPtr = _lookup< - ffi - .NativeFunction)>>( - 'telephony_network_get_system_id'); - late final _telephony_network_get_system_id = - _telephony_network_get_system_idPtr - .asFunction)>(); - - /// @brief Gets the network ID of the current location. - /// - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location.coarse - /// - /// @remarks This API can be used in CDMA network. - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] nid The network ID, @c -1 if unknown - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// - /// @see telephony_network_get_service_state() - /// @see telephony_network_get_type() - int telephony_network_get_network_id( - telephony_h handle, - ffi.Pointer nid, - ) { - return _telephony_network_get_network_id( - handle, - nid, - ); - } - - late final _telephony_network_get_network_idPtr = _lookup< - ffi - .NativeFunction)>>( - 'telephony_network_get_network_id'); - late final _telephony_network_get_network_id = - _telephony_network_get_network_idPtr - .asFunction)>(); - - /// @brief Gets the base station ID of the current location. - /// - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location.coarse - /// - /// @remarks This API can be used in CDMA network. - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] bs_id The base station ID, @c -1 if unknown - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// - /// @see telephony_network_get_service_state() - /// @see telephony_network_get_type() - int telephony_network_get_base_station_id( - telephony_h handle, - ffi.Pointer bs_id, - ) { - return _telephony_network_get_base_station_id( - handle, - bs_id, - ); - } - - late final _telephony_network_get_base_station_idPtr = _lookup< - ffi - .NativeFunction)>>( - 'telephony_network_get_base_station_id'); - late final _telephony_network_get_base_station_id = - _telephony_network_get_base_station_idPtr - .asFunction)>(); - - /// @brief Gets the base station latitude of the current location. - /// - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location.coarse - /// - /// @remarks This API can be used in CDMA network. - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] bs_latitude The base station latitude, @c 0x7FFFFFFF if unknown - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// - /// @see telephony_network_get_service_state() - /// @see telephony_network_get_type() - int telephony_network_get_base_station_latitude( - telephony_h handle, - ffi.Pointer bs_latitude, - ) { - return _telephony_network_get_base_station_latitude( - handle, - bs_latitude, - ); - } - - late final _telephony_network_get_base_station_latitudePtr = _lookup< - ffi - .NativeFunction)>>( - 'telephony_network_get_base_station_latitude'); - late final _telephony_network_get_base_station_latitude = - _telephony_network_get_base_station_latitudePtr - .asFunction)>(); - - /// @brief Gets the base station longitude of the current location. - /// - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location.coarse - /// - /// @remarks This API can be used in CDMA network. - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] bs_longitude The base station longitude, @c 0x7FFFFFFF if unknown - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - /// - /// @see telephony_network_get_service_state() - /// @see telephony_network_get_type() - int telephony_network_get_base_station_longitude( - telephony_h handle, - ffi.Pointer bs_longitude, - ) { - return _telephony_network_get_base_station_longitude( - handle, - bs_longitude, - ); - } - - late final _telephony_network_get_base_station_longitudePtr = _lookup< - ffi - .NativeFunction)>>( - 'telephony_network_get_base_station_longitude'); - late final _telephony_network_get_base_station_longitude = - _telephony_network_get_base_station_longitudePtr - .asFunction)>(); - - /// @brief Gets the received signal strength (dBm). - /// - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] dbm The received signal strength in dBm, @c 0 if unknown \n - /// The higher the received number, the stronger the signal - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - int telephony_network_get_signal_strength( - telephony_h handle, - ffi.Pointer dbm, - ) { - return _telephony_network_get_signal_strength( - handle, - dbm, - ); - } - - late final _telephony_network_get_signal_strengthPtr = _lookup< - ffi - .NativeFunction)>>( - 'telephony_network_get_signal_strength'); - late final _telephony_network_get_signal_strength = - _telephony_network_get_signal_strengthPtr - .asFunction)>(); - - /// @brief Gets the IMEI (International Mobile Station Equipment Identity) of a mobile phone. - /// @details The IMEI number is used by a GSM network to identify valid devices - /// and therefore can be used for stopping a stolen phone from accessing that network. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @remarks You must release @c imei using free() on success case. - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] imei The International Mobile Station Equipment Identity - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - int telephony_modem_get_imei( - telephony_h handle, - ffi.Pointer> imei, - ) { - return _telephony_modem_get_imei( - handle, - imei, - ); - } - - late final _telephony_modem_get_imeiPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_h, - ffi.Pointer>)>>('telephony_modem_get_imei'); - late final _telephony_modem_get_imei = - _telephony_modem_get_imeiPtr.asFunction< - int Function(telephony_h, ffi.Pointer>)>(); - - /// @brief Gets the power status of the modem. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] status The Modem power status (0=on,1=off,2=reset,3=low) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - int telephony_modem_get_power_status( - telephony_h handle, - ffi.Pointer status, - ) { - return _telephony_modem_get_power_status( - handle, - status, - ); - } - - late final _telephony_modem_get_power_statusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_h, - ffi.Pointer)>>('telephony_modem_get_power_status'); - late final _telephony_modem_get_power_status = - _telephony_modem_get_power_statusPtr - .asFunction)>(); - - /// @brief Gets the MEID (Mobile Equipment Identifier) of a mobile phone (for CDMA). - /// - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// - /// @remarks You must release @c meid using free() on success case. - /// - /// @param[in] handle The handle from telephony_init() - /// @param[out] meid The Mobile Equipment Identifier - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #TELEPHONY_ERROR_NONE Successful - /// @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #TELEPHONY_ERROR_NOT_SUPPORTED Not supported - /// @retval #TELEPHONY_ERROR_OPERATION_FAILED Operation failed - int telephony_modem_get_meid( - telephony_h handle, - ffi.Pointer> meid, - ) { - return _telephony_modem_get_meid( - handle, - meid, - ); - } - - late final _telephony_modem_get_meidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(telephony_h, - ffi.Pointer>)>>('telephony_modem_get_meid'); - late final _telephony_modem_get_meid = - _telephony_modem_get_meidPtr.asFunction< - int Function(telephony_h, ffi.Pointer>)>(); - - /// @brief Creates and initializes clipboard handle. - /// @since_tizen 3.0 - /// @param[out] cbhm_handle Clipboard handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - /// @retval #CBHM_ERROR_OUT_OF_MEMORY Out of memory - /// @see cbhm_close_service() - int cbhm_open_service( - ffi.Pointer cbhm_handle, - ) { - return _cbhm_open_service( - cbhm_handle, - ); - } - - late final _cbhm_open_servicePtr = - _lookup)>>( - 'cbhm_open_service'); - late final _cbhm_open_service = - _cbhm_open_servicePtr.asFunction)>(); - - /// @brief Closes clipboard handle. - /// @since_tizen 3.0 - /// @param[in] cbhm_handle Clipboard handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - /// @see cbhm_open_service() - int cbhm_close_service( - cbhm_h cbhm_handle, - ) { - return _cbhm_close_service( - cbhm_handle, - ); - } - - late final _cbhm_close_servicePtr = - _lookup>( - 'cbhm_close_service'); - late final _cbhm_close_service = - _cbhm_close_servicePtr.asFunction(); - - /// @brief Shows clipboard. - /// @since_tizen 3.0 - /// @param[in] cbhm_handle Clipboard handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - /// @see cbhm_hide() - int cbhm_show( - cbhm_h cbhm_handle, - ) { - return _cbhm_show( - cbhm_handle, - ); - } - - late final _cbhm_showPtr = - _lookup>('cbhm_show'); - late final _cbhm_show = _cbhm_showPtr.asFunction(); - - /// @brief Hides clipboard. - /// @since_tizen 3.0 - /// @param[in] cbhm_handle Clipboard handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - /// @see cbhm_show() - int cbhm_hide( - cbhm_h cbhm_handle, - ) { - return _cbhm_hide( - cbhm_handle, - ); - } - - late final _cbhm_hidePtr = - _lookup>('cbhm_hide'); - late final _cbhm_hide = _cbhm_hidePtr.asFunction(); - - /// @brief Sets clipboard selection type. - /// @since_tizen 3.0 - /// @param[in] cbhm_handle Clipboard handle - /// @param[in] type Selection type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - /// @see cbhm_selection_type_get() - int cbhm_selection_type_set( - cbhm_h cbhm_handle, - int type, - ) { - return _cbhm_selection_type_set( - cbhm_handle, - type, - ); - } - - late final _cbhm_selection_type_setPtr = - _lookup>( - 'cbhm_selection_type_set'); - late final _cbhm_selection_type_set = - _cbhm_selection_type_setPtr.asFunction(); - - /// @brief Gets clipboard selection type. - /// @since_tizen 3.0 - /// @param[in] cbhm_handle Clipboard handle - /// @param[out] type Selection type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - /// @see cbhm_selection_type_set() - int cbhm_selection_type_get( - cbhm_h cbhm_handle, - ffi.Pointer type, - ) { - return _cbhm_selection_type_get( - cbhm_handle, - type, - ); - } - - late final _cbhm_selection_type_getPtr = _lookup< - ffi.NativeFunction)>>( - 'cbhm_selection_type_get'); - late final _cbhm_selection_type_get = _cbhm_selection_type_getPtr - .asFunction)>(); - - /// @brief Adds event callback function of selecting a clipboard item. - /// @since_tizen 3.0 - /// @param[in] cbhm_handle Clipboard handle - /// @param[in] callback Callback function called when a clipboard item is selected - /// @param[in] user_data User data to be passed to the given event callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - /// @retval #CBHM_ERROR_OUT_OF_MEMORY Out of memory - int cbhm_item_selected_callback_add( - cbhm_h cbhm_handle, - cbhm_selected_cb callback, - ffi.Pointer user_data, - ) { - return _cbhm_item_selected_callback_add( - cbhm_handle, - callback, - user_data, - ); - } - - late final _cbhm_item_selected_callback_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(cbhm_h, cbhm_selected_cb, - ffi.Pointer)>>('cbhm_item_selected_callback_add'); - late final _cbhm_item_selected_callback_add = - _cbhm_item_selected_callback_addPtr.asFunction< - int Function(cbhm_h, cbhm_selected_cb, ffi.Pointer)>(); - - /// @brief Removes event callback function for selecting a clipboard item. - /// @since_tizen 4.0 - /// @param[in] cbhm_handle The clipboard handle - /// @param[in] callback The callback function to be deleted - /// @param[in] user_data User data to be passed to the given event callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - int cbhm_item_selected_callback_remove( - cbhm_h cbhm_handle, - cbhm_selected_cb callback, - ffi.Pointer user_data, - ) { - return _cbhm_item_selected_callback_remove( - cbhm_handle, - callback, - user_data, - ); - } - - late final _cbhm_item_selected_callback_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(cbhm_h, cbhm_selected_cb, - ffi.Pointer)>>('cbhm_item_selected_callback_remove'); - late final _cbhm_item_selected_callback_remove = - _cbhm_item_selected_callback_removePtr.asFunction< - int Function(cbhm_h, cbhm_selected_cb, ffi.Pointer)>(); - - /// @brief Sends data to clipboard. - /// @since_tizen 3.0 - /// @param[in] cbhm_handle Clipboard handle - /// @param[in] type Selection type - /// @param[in] data Data to be sent - /// @param[in] len The length of data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - /// @retval #CBHM_ERROR_OUT_OF_MEMORY Out of memory - /// @see cbhm_selection_get() - int cbhm_selection_set( - cbhm_h cbhm_handle, - int type, - ffi.Pointer data, - int len, - ) { - return _cbhm_selection_set( - cbhm_handle, - type, - data, - len, - ); - } - - late final _cbhm_selection_setPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(cbhm_h, ffi.Int32, ffi.Pointer, - ffi.Size)>>('cbhm_selection_set'); - late final _cbhm_selection_set = _cbhm_selection_setPtr - .asFunction, int)>(); - - /// @brief Receives data from clipboard. - /// @since_tizen 3.0 - /// @param[in] cbhm_handle Clipboard handle - /// @param[in] type Selection type - /// @param[in] callback Callback function receiving data from clipboard - /// @param[in] user_data User data to be passed to the given event callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - /// @retval #CBHM_ERROR_NO_DATA No data available - /// @see cbhm_selection_set() - int cbhm_selection_get( - cbhm_h cbhm_handle, - int type, - cbhm_selection_data_cb callback, - ffi.Pointer user_data, - ) { - return _cbhm_selection_get( - cbhm_handle, - type, - callback, - user_data, - ); - } - - late final _cbhm_selection_getPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(cbhm_h, ffi.Int32, cbhm_selection_data_cb, - ffi.Pointer)>>('cbhm_selection_get'); - late final _cbhm_selection_get = _cbhm_selection_getPtr.asFunction< - int Function( - cbhm_h, int, cbhm_selection_data_cb, ffi.Pointer)>(); - - /// @brief Gets the count of clipboard items. - /// @since_tizen 3.0 - /// @param[in] cbhm_handle Clipboard handle - /// @return The count of clipboard items - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - int cbhm_item_count_get( - cbhm_h cbhm_handle, - ) { - return _cbhm_item_count_get( - cbhm_handle, - ); - } - - late final _cbhm_item_count_getPtr = - _lookup>( - 'cbhm_item_count_get'); - late final _cbhm_item_count_get = - _cbhm_item_count_getPtr.asFunction(); - - /// @brief Gets the type of the latest item in clipboard. - /// @since_tizen 4.0 - /// @param[in] cbhm_handle The clipboard handle - /// @param[out] type The type of the latest item - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - /// @see cbhm_selection_type_set() - int cbhm_latest_item_type_get( - cbhm_h cbhm_handle, - ffi.Pointer type, - ) { - return _cbhm_latest_item_type_get( - cbhm_handle, - type, - ); - } - - late final _cbhm_latest_item_type_getPtr = _lookup< - ffi.NativeFunction)>>( - 'cbhm_latest_item_type_get'); - late final _cbhm_latest_item_type_get = _cbhm_latest_item_type_getPtr - .asFunction)>(); - - /// @brief Adds event callback function for receiving changed event of clipboard items. - /// @since_tizen 4.0 - /// @param[in] cbhm_handle The clipboard handle - /// @param[in] callback The callback function called when a clipboard item is changed - /// @param[in] user_data User data to be passed to the given event callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - /// @retval #CBHM_ERROR_OUT_OF_MEMORY Out of memory - int cbhm_item_changed_callback_add( - cbhm_h cbhm_handle, - cbhm_item_changed_cb callback, - ffi.Pointer user_data, - ) { - return _cbhm_item_changed_callback_add( - cbhm_handle, - callback, - user_data, - ); - } - - late final _cbhm_item_changed_callback_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(cbhm_h, cbhm_item_changed_cb, - ffi.Pointer)>>('cbhm_item_changed_callback_add'); - late final _cbhm_item_changed_callback_add = - _cbhm_item_changed_callback_addPtr.asFunction< - int Function(cbhm_h, cbhm_item_changed_cb, ffi.Pointer)>(); - - /// @brief Removes event callback function for receiving changed event of clipboard items. - /// @since_tizen 4.0 - /// @param[in] cbhm_handle The clipboard handle - /// @param[in] callback The callback function to be removed - /// @param[in] user_data User data to be passed to the given event callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - int cbhm_item_changed_callback_remove( - cbhm_h cbhm_handle, - cbhm_item_changed_cb callback, - ffi.Pointer user_data, - ) { - return _cbhm_item_changed_callback_remove( - cbhm_handle, - callback, - user_data, - ); - } - - late final _cbhm_item_changed_callback_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(cbhm_h, cbhm_item_changed_cb, - ffi.Pointer)>>('cbhm_item_changed_callback_remove'); - late final _cbhm_item_changed_callback_remove = - _cbhm_item_changed_callback_removePtr.asFunction< - int Function(cbhm_h, cbhm_item_changed_cb, ffi.Pointer)>(); - - /// @brief Gets the clipboard state. - /// @since_tizen 4.0 - /// @param[in] cbhm_handle Clipboard handle - /// @param[out] type State type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - int cbhm_state_get( - cbhm_h cbhm_handle, - ffi.Pointer type, - ) { - return _cbhm_state_get( - cbhm_handle, - type, - ); - } - - late final _cbhm_state_getPtr = _lookup< - ffi.NativeFunction)>>( - 'cbhm_state_get'); - late final _cbhm_state_get = _cbhm_state_getPtr - .asFunction)>(); - - /// @brief Adds event callback function of receiving monitored event of clipboard. - /// @since_tizen 4.0 - /// @param[in] cbhm_handle Clipboard handle - /// @param[in] callback Callback function called when clipboard becomes active or inactive - /// @param[in] user_data User data to be passed to the given event callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - /// @retval #CBHM_ERROR_OUT_OF_MEMORY Out of memory - /// @see cbhm_monitor_callback_remove() - int cbhm_monitor_callback_add( - cbhm_h cbhm_handle, - cbhm_monitor_cb callback, - ffi.Pointer user_data, - ) { - return _cbhm_monitor_callback_add( - cbhm_handle, - callback, - user_data, - ); - } - - late final _cbhm_monitor_callback_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(cbhm_h, cbhm_monitor_cb, - ffi.Pointer)>>('cbhm_monitor_callback_add'); - late final _cbhm_monitor_callback_add = - _cbhm_monitor_callback_addPtr.asFunction< - int Function(cbhm_h, cbhm_monitor_cb, ffi.Pointer)>(); - - /// @brief Deletes event callback function of receiving monitored event of clipboard. - /// @since_tizen 4.0 - /// @param[in] cbhm_handle Clipboard handle - /// @param[in] callback Callback function to be deleted - /// @param[in] user_data User data to be passed to the given event callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - /// @see cbhm_monitor_callback_add() - int cbhm_monitor_callback_remove( - cbhm_h cbhm_handle, - cbhm_monitor_cb callback, - ffi.Pointer user_data, - ) { - return _cbhm_monitor_callback_remove( - cbhm_handle, - callback, - user_data, - ); - } - - late final _cbhm_monitor_callback_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(cbhm_h, cbhm_monitor_cb, - ffi.Pointer)>>('cbhm_monitor_callback_remove'); - late final _cbhm_monitor_callback_remove = - _cbhm_monitor_callback_removePtr.asFunction< - int Function(cbhm_h, cbhm_monitor_cb, ffi.Pointer)>(); - - /// @brief Initializes External Output Manager (EOM). - /// @details User should call this function previously for using EOM. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks After all using, call eom_deinit() function for resource returning. - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_CONNECTION_FAILURE The EOM connection failure - /// @see eom_deinit() - /// @see #eom_error_e - int eom_init() { - return _eom_init(); - } - - late final _eom_initPtr = - _lookup>('eom_init'); - late final _eom_init = _eom_initPtr.asFunction(); - - /// @brief Finalizes External Output Manager (EOM). - /// @details User should call this function after using EOM to release all - /// resources of EOM. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @see eom_init() - void eom_deinit() { - return _eom_deinit(); - } - - late final _eom_deinitPtr = - _lookup>('eom_deinit'); - late final _eom_deinit = _eom_deinitPtr.asFunction(); - - /// @brief Registers a callback function to get output connection notification - /// from External Output Manager (EOM) module. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] callback The function pointer of eom_output_added_cb callback - /// function - /// @param[in] user_data The pointer of user data which is passed to - /// eom_output_added_cb function - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_OUT_OF_MEMORY Memory allocation failure - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see eom_unset_output_added_cb() - /// @see #eom_output_added_cb - int eom_set_output_added_cb( - eom_output_added_cb callback, - ffi.Pointer user_data, - ) { - return _eom_set_output_added_cb( - callback, - user_data, - ); - } - - late final _eom_set_output_added_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(eom_output_added_cb, - ffi.Pointer)>>('eom_set_output_added_cb'); - late final _eom_set_output_added_cb = _eom_set_output_added_cbPtr - .asFunction)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] callback The function pointer of eom_output_added_cb callback - /// function - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see eom_set_output_added_cb() - /// @see #eom_output_added_cb - int eom_unset_output_added_cb( - eom_output_added_cb callback, - ) { - return _eom_unset_output_added_cb( - callback, - ); - } - - late final _eom_unset_output_added_cbPtr = - _lookup>( - 'eom_unset_output_added_cb'); - late final _eom_unset_output_added_cb = _eom_unset_output_added_cbPtr - .asFunction(); - - /// @brief Registers a callback function to get output disconnection - /// notification from External Output Manager (EOM) module. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] callback The function pointer of eom_output_removed_cb callback - /// function - /// @param[in] user_data The pointer of user data which is passed to - /// eom_output_removed_cb function - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_OUT_OF_MEMORY Memory allocation failure - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see eom_unset_output_removed_cb() - /// @see #eom_output_removed_cb - int eom_set_output_removed_cb( - eom_output_removed_cb callback, - ffi.Pointer user_data, - ) { - return _eom_set_output_removed_cb( - callback, - user_data, - ); - } - - late final _eom_set_output_removed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(eom_output_removed_cb, - ffi.Pointer)>>('eom_set_output_removed_cb'); - late final _eom_set_output_removed_cb = _eom_set_output_removed_cbPtr - .asFunction)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] callback The function pointer of eom_output_removed_cb callback - /// function - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see eom_set_output_removed_cb() - /// @see #eom_output_removed_cb - int eom_unset_output_removed_cb( - eom_output_removed_cb callback, - ) { - return _eom_unset_output_removed_cb( - callback, - ); - } - - late final _eom_unset_output_removed_cbPtr = - _lookup>( - 'eom_unset_output_removed_cb'); - late final _eom_unset_output_removed_cb = _eom_unset_output_removed_cbPtr - .asFunction(); - - /// @brief Registers a callback function to get output mode changing - /// notification from External Output Manager (EOM) module. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] callback The function pointer of eom_mode_changed_cb callback - /// function - /// @param[in] user_data The pointer of user data which is passed to - /// eom_mode_changed_cb function - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_OUT_OF_MEMORY Memory allocation failure - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see eom_unset_mode_changed_cb() - /// @see #eom_mode_changed_cb - int eom_set_mode_changed_cb( - eom_mode_changed_cb callback, - ffi.Pointer user_data, - ) { - return _eom_set_mode_changed_cb( - callback, - user_data, - ); - } - - late final _eom_set_mode_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(eom_mode_changed_cb, - ffi.Pointer)>>('eom_set_mode_changed_cb'); - late final _eom_set_mode_changed_cb = _eom_set_mode_changed_cbPtr - .asFunction)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] callback The function pointer of eom_mode_changed_cb callback - /// function - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see eom_set_mode_changed_cb() - /// @see #eom_mode_changed_cb - int eom_unset_mode_changed_cb( - eom_mode_changed_cb callback, - ) { - return _eom_unset_mode_changed_cb( - callback, - ); - } - - late final _eom_unset_mode_changed_cbPtr = - _lookup>( - 'eom_unset_mode_changed_cb'); - late final _eom_unset_mode_changed_cb = _eom_unset_mode_changed_cbPtr - .asFunction(); - - /// @brief Registers a callback function to get output attribute changing - /// notification from External Output Manager (EOM) module. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] callback The function pointer of eom_attribute_changed_cb - /// callback function - /// @param[in] user_data The pointer of user data which is passed to - /// eom_attribute_changed_cb function - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_OUT_OF_MEMORY Memory allocation failure - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see eom_unset_attribute_changed_cb() - /// @see #eom_attribute_changed_cb - int eom_set_attribute_changed_cb( - eom_attribute_changed_cb callback, - ffi.Pointer user_data, - ) { - return _eom_set_attribute_changed_cb( - callback, - user_data, - ); - } - - late final _eom_set_attribute_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(eom_attribute_changed_cb, - ffi.Pointer)>>('eom_set_attribute_changed_cb'); - late final _eom_set_attribute_changed_cb = - _eom_set_attribute_changed_cbPtr.asFunction< - int Function(eom_attribute_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] callback The function pointer of eom_attribute_changed_cb - /// callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see eom_set_attribute_changed_cb() - /// @see #eom_attribute_changed_cb - int eom_unset_attribute_changed_cb( - eom_attribute_changed_cb callback, - ) { - return _eom_unset_attribute_changed_cb( - callback, - ); - } - - late final _eom_unset_attribute_changed_cbPtr = - _lookup>( - 'eom_unset_attribute_changed_cb'); - late final _eom_unset_attribute_changed_cb = - _eom_unset_attribute_changed_cbPtr - .asFunction(); - - /// @brief Gets the IDs and count of external output. - /// @details This function returns the IDs of external output which are - /// available to connect to target device, and the count of them - /// also. User can get the id of external output. - /// which user want to watch. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks User should free return value by using free(). - /// The specific error code can be obtained using the get_last_result() method. - /// Error codes are described in Exception section. - /// @param[out] count The count of the eom_output_id supported by system - /// @return The array of the eom_output_id if this function succeeds, otherwise - /// NULL - /// @retval The pointer of #eom_output_id - /// @exception #EOM_ERROR_NONE Successful - /// @exception #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #EOM_ERROR_OUT_OF_MEMORY Memory allocation failure - /// @pre eom_init() - /// @see #eom_output_id - /// @see #eom_error_e - ffi.Pointer eom_get_eom_output_ids( - ffi.Pointer count, - ) { - return _eom_get_eom_output_ids( - count, - ); - } - - late final _eom_get_eom_output_idsPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('eom_get_eom_output_ids'); - late final _eom_get_eom_output_ids = _eom_get_eom_output_idsPtr - .asFunction Function(ffi.Pointer)>(); - - /// @brief Gets type of external output. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks The specific error code can be obtained using the get_last_result() - /// method. Error codes are described in Exception section. - /// @param[in] output_id The id of external output device - /// @param[out] type The type of external output instance - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see #eom_output_id - /// @see #eom_error_e - /// @see #eom_output_type_e - int eom_get_output_type( - int output_id, - ffi.Pointer type, - ) { - return _eom_get_output_type( - output_id, - type, - ); - } - - late final _eom_get_output_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - eom_output_id, ffi.Pointer)>>('eom_get_output_type'); - late final _eom_get_output_type = _eom_get_output_typePtr - .asFunction)>(); - - /// @brief Gets mode of external output. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks The specific error code can be obtained using the get_last_result() - /// method. Error codes are described in Exception section. - /// @param[in] output_id The id of external output device - /// @param[out] mode The mode of external output instance - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EOM_ERROR_NO_SUCH_DEVICE Invalid external output instance - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see #eom_output_id - /// @see #eom_error_e - /// @see #eom_output_mode_e - int eom_get_output_mode( - int output_id, - ffi.Pointer mode, - ) { - return _eom_get_output_mode( - output_id, - mode, - ); - } - - late final _eom_get_output_modePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - eom_output_id, ffi.Pointer)>>('eom_get_output_mode'); - late final _eom_get_output_mode = _eom_get_output_modePtr - .asFunction)>(); - - /// @brief Gets attribute of external output. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks The specific error code can be obtained using the get_last_result() - /// method. Error codes are described in Exception section. - /// @param[in] output_id The id of external output device - /// @param[out] attribute The attribute of external output instance - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EOM_ERROR_NO_SUCH_DEVICE Invalid external output instance - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see #eom_output_id - /// @see #eom_error_e - /// @see #eom_output_attribute_e - int eom_get_output_attribute( - int output_id, - ffi.Pointer attribute, - ) { - return _eom_get_output_attribute( - output_id, - attribute, - ); - } - - late final _eom_get_output_attributePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(eom_output_id, - ffi.Pointer)>>('eom_get_output_attribute'); - late final _eom_get_output_attribute = _eom_get_output_attributePtr - .asFunction)>(); - - /// @brief Gets attribute state of external output. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks The specific error code can be obtained using the get_last_result() - /// method. Error codes are described in Exception section. - /// @param[in] output_id The id of external output device - /// @param[out] state The attribute state of external output instance - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EOM_ERROR_NO_SUCH_DEVICE Invalid external output instance - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see #eom_output_id - /// @see #eom_error_e - /// @see #eom_output_attribute_state_e - int eom_get_output_attribute_state( - int output_id, - ffi.Pointer state, - ) { - return _eom_get_output_attribute_state( - output_id, - state, - ); - } - - late final _eom_get_output_attribute_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(eom_output_id, - ffi.Pointer)>>('eom_get_output_attribute_state'); - late final _eom_get_output_attribute_state = - _eom_get_output_attribute_statePtr - .asFunction)>(); - - /// @brief Gets resolution of external output. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] output_id The id of external output device - /// @param[out] width The width of external output instance - /// @param[out] height The height of external output instance - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EOM_ERROR_NO_SUCH_DEVICE Invalid external output instance - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see #eom_output_id - /// @see #eom_error_e - int eom_get_output_resolution( - int output_id, - ffi.Pointer width, - ffi.Pointer height, - ) { - return _eom_get_output_resolution( - output_id, - width, - height, - ); - } - - late final _eom_get_output_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(eom_output_id, ffi.Pointer, - ffi.Pointer)>>('eom_get_output_resolution'); - late final _eom_get_output_resolution = - _eom_get_output_resolutionPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets physical width/height (millimeters) of external output. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] output_id The id of external output device - /// @param[out] phy_width The physical mm width of external output instance - /// @param[out] phy_height The physical mm height of external output instance - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EOM_ERROR_NO_SUCH_DEVICE Invalid external output instance - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see #eom_output_id - /// @see #eom_error_e - int eom_get_output_physical_size( - int output_id, - ffi.Pointer phy_width, - ffi.Pointer phy_height, - ) { - return _eom_get_output_physical_size( - output_id, - phy_width, - phy_height, - ); - } - - late final _eom_get_output_physical_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(eom_output_id, ffi.Pointer, - ffi.Pointer)>>('eom_get_output_physical_size'); - late final _eom_get_output_physical_size = - _eom_get_output_physical_sizePtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the attribute of the external output ID. - /// @details The application can set the External Output Manager (EOM) attribute - /// to the external output ID. - /// The EOM module manages the windows to display on external output and - /// control the policy of external output. The application can recognize - /// the attribute state and manage the resources when the application receives - /// several notification callback from EOM module. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] output_id The id of external output device - /// @param[in] attr The attribute of the external output - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EOM_ERROR_NO_SUCH_DEVICE Invalid external output instance - /// @retval #EOM_ERROR_MESSAGE_SENDING_FAILURE Communication failure with EOM - /// module - /// @retval #EOM_ERROR_MESSAGE_OPERATION_FAILURE Operation failure - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see #eom_output_id - /// @see #eom_error_e - int eom_set_output_attribute( - int output_id, - int attr, - ) { - return _eom_set_output_attribute( - output_id, - attr, - ); - } - - late final _eom_set_output_attributePtr = - _lookup>( - 'eom_set_output_attribute'); - late final _eom_set_output_attribute = - _eom_set_output_attributePtr.asFunction(); - - /// @brief Sets window to the external output best resolution of external output - /// device. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] output_id The id of external output device - /// @param[in] win The pointer of evas object - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EOM_ERROR_NO_SUCH_DEVICE Invalid external output instance - /// @retval #EOM_ERROR_MESSAGE_SENDING_FAILURE Communication failure with EOM - /// module - /// @retval #EOM_ERROR_MESSAGE_OPERATION_FAILURE Operation failure - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see #eom_output_id - /// @see #eom_error_e - int eom_set_output_window( - int output_id, - ffi.Pointer win, - ) { - return _eom_set_output_window( - output_id, - win, - ); - } - - late final _eom_set_output_windowPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(eom_output_id, - ffi.Pointer)>>('eom_set_output_window'); - late final _eom_set_output_window = _eom_set_output_windowPtr - .asFunction)>(); - - /// @brief Runs the main loop of IME application. - /// - /// @details This function starts to run IME application's main loop. The ime_create_cb() - /// callback function is called to initialize IME application before the main loop starts up. And - /// the ime_terminate_cb() callback function is called when IME application is terminated. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks IME application MUST implement ime_app_main() function which is the main - /// entry point of IME application. In ime_app_main() function, the ime_run() - /// function MUST be called with the necessary callback functions; ime_create_cb(), - /// ime_terminate_cb(), ime_show_cb(), and ime_hide_cb() callback functions - /// are mandatory for IME application. - /// - /// @param[in] basic_cb The structure pointer of the essential callback functions - /// @param[in] user_data User data to be passed to the callback functions - /// - /// @return 0 if IME application ends successfully, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NO_CALLBACK_FUNCTION Necessary callback function is not set - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @pre The ime_event_set_***() functions can be called to set the event handling callback functions. - /// - /// @see ime_callback_s() - /// @see ime_event_set_focus_in_cb() - /// @see ime_event_set_focus_out_cb() - /// @see ime_event_set_surrounding_text_updated_cb() - /// @see ime_event_set_input_context_reset_cb() - /// @see ime_event_set_cursor_position_updated_cb() - /// @see ime_event_set_language_requested_cb() - /// @see ime_event_set_language_set_cb() - /// @see ime_event_set_imdata_set_cb() - /// @see ime_event_set_layout_set_cb() - /// @see ime_event_set_return_key_type_set_cb() - /// @see ime_event_set_return_key_state_set_cb() - /// @see ime_event_set_geometry_requested_cb() - /// @see ime_event_set_display_language_changed_cb() - /// @see ime_event_set_rotation_degree_changed_cb() - /// @see ime_event_set_accessibility_state_changed_cb() - /// @see ime_event_set_option_window_created_cb() - /// @see ime_event_set_option_window_destroyed_cb() - /// @see ime_event_set_prediction_hint_set_cb() - /// - /// @code - /// static void inputmethod_create_cb(void *user_data); - /// static void inputmethod_terminate_cb(void *user_data); - /// static void inputmethod_show_cb(int context_id, ime_context_h context, void *user_data); - /// static void inputmethod_hide_cb(int context_id, void *user_data); - /// static void inputmethod_focus_in_cb(int context_id, void *user_data); - /// static void inputmethod_focus_out_cb(int context_id, void *user_data); - /// static void inputmethod_cursor_position_updated_cb(int cursor_pos, void *user_data); - /// - /// static void inputmethod_create_cb(void *user_data) - /// { - /// Evas_Object *ime_win = NULL; - /// - /// ime_set_size(480, 400, 800, 400); - /// ime_win = ime_get_main_window(); - /// if (ime_win) { - /// // Prepare before showing IME window. - /// } - /// } - /// - /// static void inputmethod_show_cb(int context_id, ime_context_h context, void *user_data) - /// { - /// Ecore_IMF_Input_Panel_Layout layout; - /// ime_layout_variation_e layout_variation; - /// Evas_Object *ime_win; - /// - /// ime_context_get_layout(context, &layout); - /// ime_context_get_layout_variation(context, &layout_variation); - /// - /// ime_win = ime_get_main_window(); - /// if (ime_win) { - /// // Compose IME UI properly with the context information and show. - /// - /// evas_object_show(ime_win); - /// } - /// } - /// - /// static void inputmethod_hide_cb(int context_id, void *user_data) - /// { - /// Evas_Object *ime_win = ime_get_main_window(); - /// if (ime_win) { - /// evas_object_hide(ime_win); - /// } - /// } - /// - /// void ime_app_main(int argc, char **argv) - /// { - /// ime_callback_s basic_callback = { - /// inputmethod_create_cb, - /// inputmethod_terminate_cb, - /// inputmethod_show_cb, - /// inputmethod_hide_cb, - /// }; - /// - /// ime_event_set_focus_in_cb(inputmethod_focus_in_cb, NULL); - /// ime_event_set_focus_out_cb(inputmethod_focus_out_cb, NULL); - /// ime_event_set_cursor_position_updated_cb(inputmethod_cursor_position_updated_cb, NULL); - /// - /// ime_run(&basic_callback, NULL); - /// } - /// @endcode - int ime_run( - ffi.Pointer basic_cb, - ffi.Pointer user_data, - ) { - return _ime_run( - basic_cb, - user_data, - ); - } - - late final _ime_runPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('ime_run'); - late final _ime_run = _ime_runPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets @c focus_in event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_focus_in_cb() callback function is called when an associated text input - /// UI control has focus. - /// - /// @param[in] callback_func @c focus_in event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_focus_in_cb() - /// @see ime_run() - int ime_event_set_focus_in_cb( - ime_focus_in_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_focus_in_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_focus_in_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_focus_in_cb, - ffi.Pointer)>>('ime_event_set_focus_in_cb'); - late final _ime_event_set_focus_in_cb = _ime_event_set_focus_in_cbPtr - .asFunction)>(); - - /// @brief Sets @c focus_out event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_focus_out_cb() callback function is called when an associated text input - /// UI control loses focus. - /// - /// @param[in] callback_func @c focus_out event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_focus_out_cb() - /// @see ime_run() - int ime_event_set_focus_out_cb( - ime_focus_out_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_focus_out_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_focus_out_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_focus_out_cb, - ffi.Pointer)>>('ime_event_set_focus_out_cb'); - late final _ime_event_set_focus_out_cb = _ime_event_set_focus_out_cbPtr - .asFunction)>(); - - /// @brief Sets @c surrounding_text_updated event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_surrounding_text_updated_cb() callback function is called when an - /// associated text input UI control responds to a request with the surrounding text. - /// - /// @param[in] callback_func @c surrounding_text_updated event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_surrounding_text_updated_cb() - /// @see ime_run() - int ime_event_set_surrounding_text_updated_cb( - ime_surrounding_text_updated_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_surrounding_text_updated_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_surrounding_text_updated_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ime_surrounding_text_updated_cb, ffi.Pointer)>>( - 'ime_event_set_surrounding_text_updated_cb'); - late final _ime_event_set_surrounding_text_updated_cb = - _ime_event_set_surrounding_text_updated_cbPtr.asFunction< - int Function( - ime_surrounding_text_updated_cb, ffi.Pointer)>(); - - /// @brief Sets @c input_context_reset event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_input_context_reset_cb() callback function is called to reset the input - /// context of an associated text input UI control. - /// - /// @param[in] callback_func @c input_context_reset event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_input_context_reset_cb() - /// @see ime_run() - int ime_event_set_input_context_reset_cb( - ime_input_context_reset_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_input_context_reset_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_input_context_reset_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_input_context_reset_cb, - ffi.Pointer)>>('ime_event_set_input_context_reset_cb'); - late final _ime_event_set_input_context_reset_cb = - _ime_event_set_input_context_reset_cbPtr.asFunction< - int Function(ime_input_context_reset_cb, ffi.Pointer)>(); - - /// @brief Sets @c cursor_position_updated event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_cursor_position_updated_cb() callback function is called when the position - /// of the cursor in an associated text input UI control changes. - /// - /// @param[in] callback_func @c cursor_position_updated event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_cursor_position_updated_cb() - /// @see ime_run() - int ime_event_set_cursor_position_updated_cb( - ime_cursor_position_updated_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_cursor_position_updated_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_cursor_position_updated_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ime_cursor_position_updated_cb, ffi.Pointer)>>( - 'ime_event_set_cursor_position_updated_cb'); - late final _ime_event_set_cursor_position_updated_cb = - _ime_event_set_cursor_position_updated_cbPtr.asFunction< - int Function( - ime_cursor_position_updated_cb, ffi.Pointer)>(); - - /// @brief Sets @c language_requested event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_language_requested_cb() callback function is called when an associated - /// text input UI control requests the language from the input panel. - /// - /// @param[in] callback_func @c language_requested event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_language_requested_cb() - /// @see ime_run() - int ime_event_set_language_requested_cb( - ime_language_requested_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_language_requested_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_language_requested_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_language_requested_cb, - ffi.Pointer)>>('ime_event_set_language_requested_cb'); - late final _ime_event_set_language_requested_cb = - _ime_event_set_language_requested_cbPtr.asFunction< - int Function(ime_language_requested_cb, ffi.Pointer)>(); - - /// @brief Sets @c language_set event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_language_set_cb() callback function is called to set the preferred - /// language to the input panel. - /// - /// @param[in] callback_func @c language_set event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_language_set_cb() - /// @see ime_run() - int ime_event_set_language_set_cb( - ime_language_set_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_language_set_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_language_set_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_language_set_cb, - ffi.Pointer)>>('ime_event_set_language_set_cb'); - late final _ime_event_set_language_set_cb = _ime_event_set_language_set_cbPtr - .asFunction)>(); - - /// @brief Sets @c imdata_set event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_imdata_set_cb() callback function is called to set the application - /// specific data to deliver to the input panel. - /// - /// @param[in] callback_func @c imdata_set event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_imdata_set_cb() - /// @see ime_event_set_imdata_requested_cb() - /// @see ime_run() - int ime_event_set_imdata_set_cb( - ime_imdata_set_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_imdata_set_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_imdata_set_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_imdata_set_cb, - ffi.Pointer)>>('ime_event_set_imdata_set_cb'); - late final _ime_event_set_imdata_set_cb = _ime_event_set_imdata_set_cbPtr - .asFunction)>(); - - /// @brief Sets @c imdata_requested event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_imdata_requested_cb() callback function is called when an associated - /// text input UI control requests the application specific data from the input panel. - /// - /// @param[in] callback_func @c imdata_requested event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_imdata_requested_cb() - /// @see ime_event_set_imdata_set_cb() - /// @see ime_run() - int ime_event_set_imdata_requested_cb( - ime_imdata_requested_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_imdata_requested_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_imdata_requested_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_imdata_requested_cb, - ffi.Pointer)>>('ime_event_set_imdata_requested_cb'); - late final _ime_event_set_imdata_requested_cb = - _ime_event_set_imdata_requested_cbPtr.asFunction< - int Function(ime_imdata_requested_cb, ffi.Pointer)>(); - - /// @brief Sets @c layout_set event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_layout_set_cb() callback function is called when an associated text input - /// UI control requests the input panel to set its layout. - /// - /// @param[in] callback_func @c layout_set event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_layout_set_cb() - /// @see ime_run() - int ime_event_set_layout_set_cb( - ime_layout_set_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_layout_set_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_layout_set_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_layout_set_cb, - ffi.Pointer)>>('ime_event_set_layout_set_cb'); - late final _ime_event_set_layout_set_cb = _ime_event_set_layout_set_cbPtr - .asFunction)>(); - - /// @brief Sets @c return_key_type_set event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_return_key_type_set_cb() callback function is called when an associated - /// text input UI control requests the input panel to set the @c Return key label. - /// - /// @param[in] callback_func @c return_key_type_set event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_return_key_type_set_cb() - /// @see ime_run() - int ime_event_set_return_key_type_set_cb( - ime_return_key_type_set_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_return_key_type_set_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_return_key_type_set_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_return_key_type_set_cb, - ffi.Pointer)>>('ime_event_set_return_key_type_set_cb'); - late final _ime_event_set_return_key_type_set_cb = - _ime_event_set_return_key_type_set_cbPtr.asFunction< - int Function(ime_return_key_type_set_cb, ffi.Pointer)>(); - - /// @brief Sets @c return_key_state_set event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_return_key_state_set_cb() callback function is called when an associated - /// text input UI control requests the input panel to enable or disable the @c Return key state. - /// - /// @param[in] callback_func @c return_key_state_set event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_return_key_state_set_cb() - /// @see ime_run() - int ime_event_set_return_key_state_set_cb( - ime_return_key_state_set_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_return_key_state_set_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_return_key_state_set_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_return_key_state_set_cb, - ffi.Pointer)>>('ime_event_set_return_key_state_set_cb'); - late final _ime_event_set_return_key_state_set_cb = - _ime_event_set_return_key_state_set_cbPtr.asFunction< - int Function(ime_return_key_state_set_cb, ffi.Pointer)>(); - - /// @brief Sets @c geometry_requested event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_geometry_requested_cb() callback function is called when an associated - /// text input UI control requests the position and size from the input panel. - /// - /// @param[in] callback_func @c geometry_requested event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_geometry_requested_cb() - /// @see ime_run() - int ime_event_set_geometry_requested_cb( - ime_geometry_requested_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_geometry_requested_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_geometry_requested_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_geometry_requested_cb, - ffi.Pointer)>>('ime_event_set_geometry_requested_cb'); - late final _ime_event_set_geometry_requested_cb = - _ime_event_set_geometry_requested_cbPtr.asFunction< - int Function(ime_geometry_requested_cb, ffi.Pointer)>(); - - /// @brief Sets @c process_key_event event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_process_key_event_cb() callback function is called when the key event - /// is received from the external keyboard devices or ime_send_key_event() function. - /// - /// @param[in] callback_func @c process_key_event event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_process_key_event_cb() - /// @see ime_run() - /// - /// @code - /// static void inputmethod_create_cb(void *user_data); - /// static void inputmethod_terminate_cb(void *user_data); - /// static void inputmethod_show_cb(int context_id, ime_context_h context, void *user_data); - /// static void inputmethod_hide_cb(int context_id, void *user_data); - /// - /// static bool inputmethod_process_key_event_cb(ime_key_code_e keycode, ime_key_mask_e keymask, void *user_data); - /// { - /// if (keymask & IME_KEY_MASK_CONTROL) { - /// return false; // e.g., Cotrol+C key event would be forwarded to UI control of the client application - /// } - /// if (keymask & IME_KEY_MASK_ALT) { - /// return false; - /// } - /// - /// if (!(keymask & IME_KEY_MASK_RELEASED)) { // The key is pressed - /// if (keycode == IME_KEY_1) { - /// ime_update_preedit_string("1"); // Show "1" preedit string - /// return true; - /// } - /// else if (keycode == IME_KEY_2) { - /// ime_commit_string("12"); // Input "12" string - /// return true; - /// } - /// } - /// - /// return false; - /// } - /// - /// void ime_app_main(int argc, char **argv) - /// { - /// ime_callback_s basic_callback = { - /// inputmethod_create_cb, - /// inputmethod_terminate_cb, - /// inputmethod_show_cb, - /// inputmethod_hide_cb, - /// }; - /// - /// ime_event_set_process_key_event_cb(inputmethod_process_key_event_cb, NULL); - /// - /// ime_run(&basic_callback, NULL); - /// } - /// @endcode - int ime_event_set_process_key_event_cb( - ime_process_key_event_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_process_key_event_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_process_key_event_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_process_key_event_cb, - ffi.Pointer)>>('ime_event_set_process_key_event_cb'); - late final _ime_event_set_process_key_event_cb = - _ime_event_set_process_key_event_cbPtr.asFunction< - int Function(ime_process_key_event_cb, ffi.Pointer)>(); - - /// @brief Sets @c display_language_changed event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_display_language_changed_cb() callback function is called when the system - /// display language is changed. - /// - /// @param[in] callback_func @c display_language_changed event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_display_language_changed_cb() - /// @see ime_run() - int ime_event_set_display_language_changed_cb( - ime_display_language_changed_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_display_language_changed_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_display_language_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ime_display_language_changed_cb, ffi.Pointer)>>( - 'ime_event_set_display_language_changed_cb'); - late final _ime_event_set_display_language_changed_cb = - _ime_event_set_display_language_changed_cbPtr.asFunction< - int Function( - ime_display_language_changed_cb, ffi.Pointer)>(); - - /// @brief Sets @c rotation_degree_changed event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_rotation_degree_changed_cb() callback function is called when the device - /// is rotated. - /// - /// @param[in] callback_func @c rotation_degree_changed event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_rotation_degree_changed_cb() - /// @see ime_run() - int ime_event_set_rotation_degree_changed_cb( - ime_rotation_degree_changed_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_rotation_degree_changed_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_rotation_degree_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ime_rotation_degree_changed_cb, ffi.Pointer)>>( - 'ime_event_set_rotation_degree_changed_cb'); - late final _ime_event_set_rotation_degree_changed_cb = - _ime_event_set_rotation_degree_changed_cbPtr.asFunction< - int Function( - ime_rotation_degree_changed_cb, ffi.Pointer)>(); - - /// @brief Sets @c accessibility_state_changed event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_accessibility_state_changed_cb() callback function is called when - /// Accessibility in Settings application is on or off. - /// - /// @param[in] callback_func @c accessibility_state_changed event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_accessibility_state_changed_cb() - /// @see ime_run() - int ime_event_set_accessibility_state_changed_cb( - ime_accessibility_state_changed_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_accessibility_state_changed_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_accessibility_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ime_accessibility_state_changed_cb, ffi.Pointer)>>( - 'ime_event_set_accessibility_state_changed_cb'); - late final _ime_event_set_accessibility_state_changed_cb = - _ime_event_set_accessibility_state_changed_cbPtr.asFunction< - int Function( - ime_accessibility_state_changed_cb, ffi.Pointer)>(); - - /// @brief Sets @c option_window_created event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_option_window_created_cb() callback function is called to create the option window. - /// - /// @param[in] callback_func @c option_window_created event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_option_window_created_cb() - /// @see ime_run() - int ime_event_set_option_window_created_cb( - ime_option_window_created_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_option_window_created_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_option_window_created_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ime_option_window_created_cb, ffi.Pointer)>>( - 'ime_event_set_option_window_created_cb'); - late final _ime_event_set_option_window_created_cb = - _ime_event_set_option_window_created_cbPtr.asFunction< - int Function(ime_option_window_created_cb, ffi.Pointer)>(); - - /// @brief Sets @c option_window_destroyed event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_option_window_destroyed_cb() callback function is called to destroy the option window. - /// - /// @param[in] callback_func @c option_window_destroyed event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_option_window_destroyed_cb() - /// @see ime_run() - int ime_event_set_option_window_destroyed_cb( - ime_option_window_destroyed_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_option_window_destroyed_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_option_window_destroyed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ime_option_window_destroyed_cb, ffi.Pointer)>>( - 'ime_event_set_option_window_destroyed_cb'); - late final _ime_event_set_option_window_destroyed_cb = - _ime_event_set_option_window_destroyed_cbPtr.asFunction< - int Function( - ime_option_window_destroyed_cb, ffi.Pointer)>(); - - /// @brief Sends a key event to the associated text input UI control. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @details This function sends key down or up event with key mask to the client application. - /// If @a forward_key is @c true, this key event goes to the edit filed directly. And if @a forward_key - /// is @c false, the ime_process_key_event_cb() callback function receives the key event before the edit field. - /// - /// @param[in] keycode The key code to be sent - /// @param[in] keymask The modifier key mask - /// @param[in] forward_key The flag to send the key event directly to the edit field - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @post If @a forward_key is @c false, the ime_process_key_event_cb() callback function can compose the text with the key events. - /// - /// @see ime_key_code_e - /// @see ime_key_mask_e - /// @see ime_process_key_event_cb() - int ime_send_key_event( - int keycode, - int keymask, - bool forward_key, - ) { - return _ime_send_key_event( - keycode, - keymask, - forward_key, - ); - } - - late final _ime_send_key_eventPtr = _lookup< - ffi.NativeFunction>( - 'ime_send_key_event'); - late final _ime_send_key_event = - _ime_send_key_eventPtr.asFunction(); - - /// @brief Sends the text to the associated text input UI control. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] str The UTF-8 string to be committed - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @see ime_show_preedit_string() - /// @see ime_hide_preedit_string() - /// @see ime_update_preedit_string() - int ime_commit_string( - ffi.Pointer str, - ) { - return _ime_commit_string( - str, - ); - } - - late final _ime_commit_stringPtr = - _lookup)>>( - 'ime_commit_string'); - late final _ime_commit_string = - _ime_commit_stringPtr.asFunction)>(); - - /// @brief Requests to show preedit string. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @see ime_commit_string() - /// @see ime_hide_preedit_string() - /// @see ime_update_preedit_string() - int ime_show_preedit_string() { - return _ime_show_preedit_string(); - } - - late final _ime_show_preedit_stringPtr = - _lookup>( - 'ime_show_preedit_string'); - late final _ime_show_preedit_string = - _ime_show_preedit_stringPtr.asFunction(); - - /// @brief Requests to hide preedit string. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @see ime_commit_string() - /// @see ime_show_preedit_string() - /// @see ime_update_preedit_string() - int ime_hide_preedit_string() { - return _ime_hide_preedit_string(); - } - - late final _ime_hide_preedit_stringPtr = - _lookup>( - 'ime_hide_preedit_string'); - late final _ime_hide_preedit_string = - _ime_hide_preedit_stringPtr.asFunction(); - - /// @brief Updates a new preedit string. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] str The UTF-8 string to be updated in preedit - /// @param[in] attrs The Eina_List which has #ime_preedit_attribute lists; @a str can be composed of multiple - /// string attributes: underline, highlight color and reversal color. The @a attrs will be released internally - /// on success and it can be NULL if no attributes to set - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @post This function is supposed to be followed by the ime_show_preedit_string() function. - /// - /// @see ime_preedit_attribute - /// @see ime_commit_string() - /// @see ime_show_preedit_string() - /// @see ime_hide_preedit_string() - /// - /// @code - /// { - /// int ret; - /// Eina_List *list = NULL; - /// - /// ime_preedit_attribute *attr = calloc(1, sizeof (ime_preedit_attribute)); - /// attr->start = 0; - /// attr->length = 1; - /// attr->type = IME_ATTR_FONTSTYLE; - /// attr->value = IME_ATTR_FONTSTYLE_UNDERLINE; - /// list = eina_list_append(list, attr); - /// - /// attr = calloc(1, sizeof (ime_preedit_attribute)); - /// attr->start = 1; - /// attr->length = 1; - /// attr->type = IME_ATTR_FONTSTYLE; - /// attr->value = IME_ATTR_FONTSTYLE_HIGHLIGHT; - /// list = eina_list_append(list, attr); - /// - /// attr = calloc(1, sizeof (ime_preedit_attribute)); - /// attr->start = 2; - /// attr->length = 1; - /// attr->type = IME_ATTR_FONTSTYLE; - /// attr->value = IME_ATTR_FONTSTYLE_REVERSAL; - /// list = eina_list_append(list, attr); - /// - /// ret = ime_update_preedit_string("abcd", list); - /// if (ret != IME_ERROR_NONE) { - /// EINA_LIST_FREE(list, attr) - /// free(attr); - /// } - /// } - /// @endcode - int ime_update_preedit_string( - ffi.Pointer str, - ffi.Pointer attrs, - ) { - return _ime_update_preedit_string( - str, - attrs, - ); - } - - late final _ime_update_preedit_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('ime_update_preedit_string'); - late final _ime_update_preedit_string = - _ime_update_preedit_stringPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Requests the surrounding text from the position of the cursor, asynchronously. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] maxlen_before The maximum length of string to be retrieved before the cursor; -1 means unlimited - /// @param[in] maxlen_after The maximum length of string to be retrieved after the cursor; -1 means unlimited - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NO_CALLBACK_FUNCTION Necessary callback function is not set - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @pre The ime_surrounding_text_updated_cb() callback function MUST be set by ime_event_set_surrounding_text_updated_cb(). - /// - /// @post The requested surrounding text can be received using the ime_surrounding_text_updated_cb() callback function. - /// - /// @see ime_delete_surrounding_text() - /// @see ime_event_set_surrounding_text_updated_cb() - /// @see ime_surrounding_text_updated_cb() - int ime_request_surrounding_text( - int maxlen_before, - int maxlen_after, - ) { - return _ime_request_surrounding_text( - maxlen_before, - maxlen_after, - ); - } - - late final _ime_request_surrounding_textPtr = - _lookup>( - 'ime_request_surrounding_text'); - late final _ime_request_surrounding_text = - _ime_request_surrounding_textPtr.asFunction(); - - /// @brief Requests to delete surrounding text. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] offset The offset value from the cursor position - /// @param[in] len The length of the text to delete - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @see ime_request_surrounding_text() - int ime_delete_surrounding_text( - int offset, - int len, - ) { - return _ime_delete_surrounding_text( - offset, - len, - ); - } - - late final _ime_delete_surrounding_textPtr = - _lookup>( - 'ime_delete_surrounding_text'); - late final _ime_delete_surrounding_text = - _ime_delete_surrounding_textPtr.asFunction(); - - /// @brief Gets the surrounding text from the position of the cursor, synchronously. - /// - /// @remarks @a text must be released using free(). - /// - /// @since_tizen 3.0 - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] maxlen_before The maximum length of string to be retrieved before the cursor; -1 means unlimited - /// @param[in] maxlen_after The maximum length of string to be retrieved after the cursor; -1 means unlimited - /// @param[out] text The surrounding text - /// @param[out] cursor_pos The cursor position - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// @retval #IME_ERROR_OUT_OF_MEMORY Failed to obtain text due to out of memory - /// - /// @see ime_delete_surrounding_text() - int ime_get_surrounding_text( - int maxlen_before, - int maxlen_after, - ffi.Pointer> text, - ffi.Pointer cursor_pos, - ) { - return _ime_get_surrounding_text( - maxlen_before, - maxlen_after, - text, - cursor_pos, - ); - } - - late final _ime_get_surrounding_textPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Int, ffi.Pointer>, - ffi.Pointer)>>('ime_get_surrounding_text'); - late final _ime_get_surrounding_text = - _ime_get_surrounding_textPtr.asFunction< - int Function(int, int, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Requests to set selection. - /// - /// @since_tizen 3.0 - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] start The start cursor position in text (in characters not bytes) - /// @param[in] end The end cursor position in text (in characters not bytes) - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - int ime_set_selection( - int start, - int end, - ) { - return _ime_set_selection( - start, - end, - ); - } - - late final _ime_set_selectionPtr = - _lookup>( - 'ime_set_selection'); - late final _ime_set_selection = - _ime_set_selectionPtr.asFunction(); - - /// @brief Gets the selected text synchronously. - /// - /// @details If multi-line text is selected, the result will contain '\n' for each newline character. - /// And if the selected text is empty, the result will be an empty string. - /// - /// @since_tizen 4.0 - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks @a text must be released using free(). - /// - /// @param[out] text The selected text - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - int ime_get_selected_text( - ffi.Pointer> text, - ) { - return _ime_get_selected_text( - text, - ); - } - - late final _ime_get_selected_textPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>)>>('ime_get_selected_text'); - late final _ime_get_selected_text = _ime_get_selected_textPtr - .asFunction>)>(); - - /// @brief This API returns the pointer of input panel main window. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The specific error code can be obtained using the get_last_result() method if this function returns NULL. - /// - /// @return The input panel main window object on success, otherwise NULL - /// - /// @exception #IME_ERROR_NONE Successful - /// #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @see ime_create_cb() - /// @see ime_terminate_cb() - /// @see ime_show_cb() - /// @see ime_hide_cb() - ffi.Pointer ime_get_main_window() { - return _ime_get_main_window(); - } - - late final _ime_get_main_windowPtr = - _lookup Function()>>( - 'ime_get_main_window'); - late final _ime_get_main_window = - _ime_get_main_windowPtr.asFunction Function()>(); - - /// @brief This API updates the input panel window's size information. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] portrait_width The width in portrait mode - /// @param[in] portrait_height The height in portrait mode - /// @param[in] landscape_width The width in landscape mode - /// @param[in] landscape_height The height in landscape mode - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @see ime_create_cb() - int ime_set_size( - int portrait_width, - int portrait_height, - int landscape_width, - int landscape_height, - ) { - return _ime_set_size( - portrait_width, - portrait_height, - landscape_width, - landscape_height, - ); - } - - late final _ime_set_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Int, ffi.Int, ffi.Int)>>('ime_set_size'); - late final _ime_set_size = - _ime_set_sizePtr.asFunction(); - - /// @brief Requests to create an option window from the input panel. - /// - /// @details The input panel can call this function to open the option window. This - /// function calls ime_option_window_created_cb() callback function with - /// #IME_OPTION_WINDOW_TYPE_KEYBOARD parameter. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NO_CALLBACK_FUNCTION Necessary callback function is not set - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @pre The ime_option_window_created_cb() and ime_option_window_destroyed_cb() - /// callback functions MUST be set by ime_event_set_option_window_created_cb() and - /// ime_event_set_option_window_destroyed_cb() respectively. - /// - /// @post This function calls ime_option_window_created_cb() callback function to - /// create the option window. And ime_destroy_option_window() function can be called - /// to close the option window. - /// - /// @see ime_event_set_option_window_created_cb() - /// @see ime_option_window_created_cb() - /// @see ime_destroy_option_window() - int ime_create_option_window() { - return _ime_create_option_window(); - } - - late final _ime_create_option_windowPtr = - _lookup>( - 'ime_create_option_window'); - late final _ime_create_option_window = - _ime_create_option_windowPtr.asFunction(); - - /// @brief Requests to destroy an option window. - /// - /// @details The input panel can call this function to close the option window which - /// is created from either the input panel or Settings application. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] window The option window to destroy - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NO_CALLBACK_FUNCTION Necessary callback function is not set - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @pre The ime_option_window_created_cb() and ime_option_window_destroyed_cb() - /// callback functions MUST be set by ime_event_set_option_window_created_cb() and - /// ime_event_set_option_window_destroyed_cb() respectively. - /// - /// @post This function calls ime_option_window_destroyed_cb() callback function - /// to destroy the option window. - /// - /// @see ime_event_set_option_window_destroyed_cb() - /// @see ime_option_window_destroyed_cb() - /// @see ime_create_option_window() - int ime_destroy_option_window( - ffi.Pointer window, - ) { - return _ime_destroy_option_window( - window, - ); - } - - late final _ime_destroy_option_windowPtr = - _lookup)>>( - 'ime_destroy_option_window'); - late final _ime_destroy_option_window = _ime_destroy_option_windowPtr - .asFunction)>(); - - /// @brief Gets the layout information from the given input context. - /// - /// @details Each edit field has various attributes for input panel. This function can be - /// called to get the layout information in ime_show_cb() callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] context The input context information of an associated text input UI control - /// @param[out] layout Layout information - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @post Input panel UI should be drawn or operated by this information accordingly. - /// - /// @see ime_show_cb() - /// @see ime_layout_set_cb() - int ime_context_get_layout( - ime_context_h context, - ffi.Pointer layout, - ) { - return _ime_context_get_layout( - context, - layout, - ); - } - - late final _ime_context_get_layoutPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_context_h, - ffi.Pointer)>>('ime_context_get_layout'); - late final _ime_context_get_layout = _ime_context_get_layoutPtr - .asFunction)>(); - - /// @brief Gets the layout variation information from the given input context. - /// - /// @details Each edit field has various attributes for input panel. This function can be - /// called to get the layout variation information in ime_show_cb() callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] context The input context information of an associated text input UI control - /// @param[out] layout_variation Layout variation information - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @post Input panel UI should be drawn or operated by this information accordingly. - /// - /// @see ime_show_cb() - /// @see ime_layout_variation_e - int ime_context_get_layout_variation( - ime_context_h context, - ffi.Pointer layout_variation, - ) { - return _ime_context_get_layout_variation( - context, - layout_variation, - ); - } - - late final _ime_context_get_layout_variationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_context_h, - ffi.Pointer)>>('ime_context_get_layout_variation'); - late final _ime_context_get_layout_variation = - _ime_context_get_layout_variationPtr - .asFunction)>(); - - /// @brief Gets the cursor position information from the given input context. - /// - /// @details Each edit field has various attributes for input panel. This function can be - /// called to get the cursor position information in ime_show_cb() callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] context The input context information of an associated text input UI control - /// @param[out] cursor_pos Cursor position information - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @post Input panel UI should be drawn or operated by this information accordingly. - /// - /// @see ime_show_cb() - /// @see ime_cursor_position_updated_cb() - int ime_context_get_cursor_position( - ime_context_h context, - ffi.Pointer cursor_pos, - ) { - return _ime_context_get_cursor_position( - context, - cursor_pos, - ); - } - - late final _ime_context_get_cursor_positionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_context_h, - ffi.Pointer)>>('ime_context_get_cursor_position'); - late final _ime_context_get_cursor_position = - _ime_context_get_cursor_positionPtr - .asFunction)>(); - - /// @brief Gets the autocapital type information from the given input context. - /// - /// @details Each edit field has various attributes for input panel. This function can be - /// called to get the autocapital type information in ime_show_cb() callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] context The input context information of an associated text input UI control - /// @param[out] autocapital_type Autocapital type information - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @post Input panel UI should be drawn or operated by this information accordingly. - /// - /// @see ime_show_cb() - int ime_context_get_autocapital_type( - ime_context_h context, - ffi.Pointer autocapital_type, - ) { - return _ime_context_get_autocapital_type( - context, - autocapital_type, - ); - } - - late final _ime_context_get_autocapital_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_context_h, - ffi.Pointer)>>('ime_context_get_autocapital_type'); - late final _ime_context_get_autocapital_type = - _ime_context_get_autocapital_typePtr - .asFunction)>(); - - /// @brief Gets the @c Return key label type information from the given input context. - /// - /// @details Each edit field has various attributes for input panel. This function can be - /// called to get the @c Return key label type information in ime_show_cb() callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] context The input context information of an associated text input UI control - /// @param[out] return_key_type The @c Return key label type information - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @post Input panel UI should be drawn or operated by this information accordingly. - /// - /// @see ime_show_cb() - /// @see ime_return_key_type_set_cb() - int ime_context_get_return_key_type( - ime_context_h context, - ffi.Pointer return_key_type, - ) { - return _ime_context_get_return_key_type( - context, - return_key_type, - ); - } - - late final _ime_context_get_return_key_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_context_h, - ffi.Pointer)>>('ime_context_get_return_key_type'); - late final _ime_context_get_return_key_type = - _ime_context_get_return_key_typePtr - .asFunction)>(); - - /// @brief Gets the @c Return key state information from the given input context. - /// - /// @details Each edit field has various attributes for input panel. This function can be - /// called to get the @c Return key state information in ime_show_cb() callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] context The input context information of an associated text input UI control - /// @param[out] return_key_state The @c Return key state information \n @c true to enable @c Return key - /// button, @c false to disable @c Return key button - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @post Input panel UI should be drawn or operated by this information accordingly. - /// - /// @see ime_show_cb() - /// @see ime_return_key_state_set_cb() - int ime_context_get_return_key_state( - ime_context_h context, - ffi.Pointer return_key_state, - ) { - return _ime_context_get_return_key_state( - context, - return_key_state, - ); - } - - late final _ime_context_get_return_key_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_context_h, - ffi.Pointer)>>('ime_context_get_return_key_state'); - late final _ime_context_get_return_key_state = - _ime_context_get_return_key_statePtr - .asFunction)>(); - - /// @brief Gets the prediction mode information from the given input context. - /// - /// @details Each edit field has various attributes for input panel. This function can be - /// called to get the prediction mode information in ime_show_cb() callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] context The input context information of an associated text input UI control - /// @param[out] prediction_mode Prediction mode information \n @c true to allow the predictive - /// text feature if available, @c false to disable the predictive text feature - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @post Input panel UI should be drawn or operated by this information accordingly. - /// - /// @see ime_show_cb() - int ime_context_get_prediction_mode( - ime_context_h context, - ffi.Pointer prediction_mode, - ) { - return _ime_context_get_prediction_mode( - context, - prediction_mode, - ); - } - - late final _ime_context_get_prediction_modePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_context_h, - ffi.Pointer)>>('ime_context_get_prediction_mode'); - late final _ime_context_get_prediction_mode = - _ime_context_get_prediction_modePtr - .asFunction)>(); - - /// @brief Gets the password mode information from the given input context. - /// - /// @details Each edit field has various attributes for input panel. This function can be - /// called to get the password mode information in ime_show_cb() callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks If @a password_mode is @c true, the input panel is advised not to support the predictive text. - /// - /// @param[in] context The input context information of an associated text input UI control - /// @param[out] password_mode Password mode information \n @c true to indicate that a password being inputted, - /// @c false to indicate non-password edit field. - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @post Input panel UI should be drawn or operated by this information accordingly. - /// - /// @see ime_show_cb() - int ime_context_get_password_mode( - ime_context_h context, - ffi.Pointer password_mode, - ) { - return _ime_context_get_password_mode( - context, - password_mode, - ); - } - - late final _ime_context_get_password_modePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_context_h, - ffi.Pointer)>>('ime_context_get_password_mode'); - late final _ime_context_get_password_mode = _ime_context_get_password_modePtr - .asFunction)>(); - - /// @brief Gets the input hint information from the given input context. - /// - /// @details Each edit field has various attributes for input panel. This function can be - /// called to get the input hint information in ime_show_cb() callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks @a input_hint is a bit-wise value which recommends the input panel provide - /// an auto completion and so on if it is capable of supporting such features. - /// - /// @param[in] context The input context information of an associated text input UI control - /// @param[out] input_hint Input hint information - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @post Input panel UI should be drawn or operated by this information accordingly. - /// - /// @see ime_show_cb() - int ime_context_get_input_hint( - ime_context_h context, - ffi.Pointer input_hint, - ) { - return _ime_context_get_input_hint( - context, - input_hint, - ); - } - - late final _ime_context_get_input_hintPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_context_h, - ffi.Pointer)>>('ime_context_get_input_hint'); - late final _ime_context_get_input_hint = _ime_context_get_input_hintPtr - .asFunction)>(); - - /// @brief Gets the text bidirectional information from the given input context. - /// - /// @details Each edit field has various attributes for input panel. This function can be - /// called to get the bidirectional information in ime_show_cb() callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] context The input context information of an associated text input UI control - /// @param[out] bidi Text bidirectional information - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @post Input panel UI should be drawn or operated by this information accordingly. - /// - /// @see ime_show_cb() - int ime_context_get_bidi_direction( - ime_context_h context, - ffi.Pointer bidi, - ) { - return _ime_context_get_bidi_direction( - context, - bidi, - ); - } - - late final _ime_context_get_bidi_directionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_context_h, - ffi.Pointer)>>('ime_context_get_bidi_direction'); - late final _ime_context_get_bidi_direction = - _ime_context_get_bidi_directionPtr - .asFunction)>(); - - /// @brief Gets the preferred language information from the given input context. - /// - /// @details Each edit field has various attributes for input panel. This function can be - /// called to get the preferred language information in ime_show_cb() callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] context The input context information of an associated text input UI control - /// @param[out] language Preferred language information - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @post Input panel UI should be drawn or operated by this information accordingly. - /// - /// @see ime_show_cb() - int ime_context_get_language( - ime_context_h context, - ffi.Pointer language, - ) { - return _ime_context_get_language( - context, - language, - ); - } - - late final _ime_context_get_languagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_context_h, - ffi.Pointer)>>('ime_context_get_language'); - late final _ime_context_get_language = _ime_context_get_languagePtr - .asFunction)>(); - - /// @brief Gets the device name of the key event. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks @a dev_name must be released using free(). - /// - /// @param[in] dev_info The device information from the key event - /// @param[out] dev_name The name of key input device. This can be an empty string if the device name is not available - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @see ime_process_key_event_cb() - /// @see ime_device_info_get_class() - /// @see ime_device_info_get_subclass() - int ime_device_info_get_name( - ime_device_info_h dev_info, - ffi.Pointer> dev_name, - ) { - return _ime_device_info_get_name( - dev_info, - dev_name, - ); - } - - late final _ime_device_info_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_device_info_h, - ffi.Pointer>)>>('ime_device_info_get_name'); - late final _ime_device_info_get_name = - _ime_device_info_get_namePtr.asFunction< - int Function( - ime_device_info_h, ffi.Pointer>)>(); - - /// @brief Gets the device class of the key event. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] dev_info The device information from the key event - /// @param[out] dev_class The class of key input device. This can be #ECORE_IMF_DEVICE_CLASS_NONE if the device class is not available - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @see ime_process_key_event_cb() - /// @see ime_device_info_get_name() - /// @see ime_device_info_get_subclass() - int ime_device_info_get_class( - ime_device_info_h dev_info, - ffi.Pointer dev_class, - ) { - return _ime_device_info_get_class( - dev_info, - dev_class, - ); - } - - late final _ime_device_info_get_classPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_device_info_h, - ffi.Pointer)>>('ime_device_info_get_class'); - late final _ime_device_info_get_class = _ime_device_info_get_classPtr - .asFunction)>(); - - /// @brief Gets the device subclass of the key event. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] dev_info The device information from the key event - /// @param[out] dev_subclass The subclass of key input device. This can be #ECORE_IMF_DEVICE_SUBCLASS_NONE if the device subclass is not available - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @see ime_process_key_event_cb() - /// @see ime_device_info_get_name() - /// @see ime_device_info_get_class() - int ime_device_info_get_subclass( - ime_device_info_h dev_info, - ffi.Pointer dev_subclass, - ) { - return _ime_device_info_get_subclass( - dev_info, - dev_subclass, - ); - } - - late final _ime_device_info_get_subclassPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_device_info_h, - ffi.Pointer)>>('ime_device_info_get_subclass'); - late final _ime_device_info_get_subclass = _ime_device_info_get_subclassPtr - .asFunction)>(); - - /// @brief Sets prediction hint event callback function. - /// - /// @since_tizen 4.0 - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_prediction_hint_set_cb() callback function is called to set the prediction - /// hint string to deliver to the input panel. - /// - /// @param[in] callback_func The prediction hint event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_prediction_hint_set_cb() - /// @see ime_run() - int ime_event_set_prediction_hint_set_cb( - ime_prediction_hint_set_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_prediction_hint_set_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_prediction_hint_set_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_prediction_hint_set_cb, - ffi.Pointer)>>('ime_event_set_prediction_hint_set_cb'); - late final _ime_event_set_prediction_hint_set_cb = - _ime_event_set_prediction_hint_set_cbPtr.asFunction< - int Function(ime_prediction_hint_set_cb, ffi.Pointer)>(); - - /// @brief Sets MIME type event callback function. - /// - /// @since_tizen 4.0 - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_mime_type_set_request_cb() callback function is called when an associated text input - /// UI control requests the text entry to set the MIME type. - /// - /// @param[in] callback_func MIME type event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_mime_type_set_request_cb() - /// @see ime_run() - int ime_event_set_mime_type_set_request_cb( - ime_mime_type_set_request_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_mime_type_set_request_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_mime_type_set_request_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ime_mime_type_set_request_cb, ffi.Pointer)>>( - 'ime_event_set_mime_type_set_request_cb'); - late final _ime_event_set_mime_type_set_request_cb = - _ime_event_set_mime_type_set_request_cbPtr.asFunction< - int Function(ime_mime_type_set_request_cb, ffi.Pointer)>(); - - /// @brief Sends a private command to the associated text input UI control. - /// - /// @details This can be used by IME to deliver specific data to an application. - /// The data format MUST be negotiated by both application and IME. - /// - /// @since_tizen 4.0 - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] command The UTF-8 string to be sent - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - int ime_send_private_command( - ffi.Pointer command, - ) { - return _ime_send_private_command( - command, - ); - } - - late final _ime_send_private_commandPtr = - _lookup)>>( - 'ime_send_private_command'); - late final _ime_send_private_command = _ime_send_private_commandPtr - .asFunction)>(); - - /// @brief Commits contents such as image to the associated text input UI control. - /// - /// @since_tizen 4.0 - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] content The content URI to be sent - /// @param[in] description The content description - /// @param[in] mime_type The MIME type received from the ime_mime_type_set_request_cb() - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @see ime_mime_type_set_request_cb() - /// @see ime_event_set_mime_type_set_request_cb() - int ime_commit_content( - ffi.Pointer content, - ffi.Pointer description, - ffi.Pointer mime_type, - ) { - return _ime_commit_content( - content, - description, - mime_type, - ); - } - - late final _ime_commit_contentPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('ime_commit_content'); - late final _ime_commit_content = _ime_commit_contentPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Sets the floating mode or not. - /// - /// @since_tizen 4.0 - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] floating_mode @c true - floating mode on, @c false - floating mode off - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @see ime_set_floating_drag_start() - /// @see ime_set_floating_drag_end() - int ime_set_floating_mode( - bool floating_mode, - ) { - return _ime_set_floating_mode( - floating_mode, - ); - } - - late final _ime_set_floating_modePtr = - _lookup>( - 'ime_set_floating_mode'); - late final _ime_set_floating_mode = - _ime_set_floating_modePtr.asFunction(); - - /// @brief Allows the floating input panel window to move along with the mouse pointer when the mouse is pressed. - /// - /// @since_tizen 4.0 - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks This function can be used in floating mode. If the floating mode is deactivated, calling this function has no effect. - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @pre The floating mode was turned on with ime_set_floating_mode(). - /// - /// @see ime_set_floating_mode() - /// @see ime_set_floating_drag_end() - int ime_set_floating_drag_start() { - return _ime_set_floating_drag_start(); - } - - late final _ime_set_floating_drag_startPtr = - _lookup>( - 'ime_set_floating_drag_start'); - late final _ime_set_floating_drag_start = - _ime_set_floating_drag_startPtr.asFunction(); - - /// @brief Disallows the movement of the floating input panel window with the mouse pointer when the mouse is pressed. - /// - /// @details This function must be called after invoking ime_set_floating_drag_start(). Otherwise the call is ignored. - /// - /// @since_tizen 4.0 - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks This function can be used in floating mode. If the floating mode is deactivated, calling this function has no effect. - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @pre The floating mode was turned on with ime_set_floating_mode(). - /// @pre ime_set_floating_drag_start() was called before. - /// - /// @see ime_set_floating_mode() - /// @see ime_set_floating_drag_start() - int ime_set_floating_drag_end() { - return _ime_set_floating_drag_end(); - } - - late final _ime_set_floating_drag_endPtr = - _lookup>( - 'ime_set_floating_drag_end'); - late final _ime_set_floating_drag_end = - _ime_set_floating_drag_endPtr.asFunction(); - - /// @brief Requests to open the installed IME list menu. - /// @details This function provides the installed IME list menu for the IME developers who might want to open it to enable their IME. - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/imemanager - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IME_MANAGER_ERROR_NONE No error - /// @retval #IME_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @see ime_manager_show_ime_selector() - int ime_manager_show_ime_list() { - return _ime_manager_show_ime_list(); - } - - late final _ime_manager_show_ime_listPtr = - _lookup>( - 'ime_manager_show_ime_list'); - late final _ime_manager_show_ime_list = - _ime_manager_show_ime_listPtr.asFunction(); - - /// @brief Requests to open the IME selector menu. - /// @details This function provides the IME selector menu for the IME or other application developers who might want to change the default IME. - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/imemanager - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IME_MANAGER_ERROR_NONE No error - /// @retval #IME_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @see ime_manager_show_ime_list() - int ime_manager_show_ime_selector() { - return _ime_manager_show_ime_selector(); - } - - late final _ime_manager_show_ime_selectorPtr = - _lookup>( - 'ime_manager_show_ime_selector'); - late final _ime_manager_show_ime_selector = - _ime_manager_show_ime_selectorPtr.asFunction(); - - /// @brief Checks if the specific IME is enabled or disabled in the system keyboard setting. - /// @details The IME developers can use this function to check their IME is enabled or not. - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/imemanager - /// @param[in] app_id The application ID of the IME - /// @param[out] enabled The On (enabled) and Off (disabled) state of the IME - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IME_MANAGER_ERROR_NONE No error - /// @retval #IME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @see ime_manager_show_ime_list() - int ime_manager_is_ime_enabled( - ffi.Pointer app_id, - ffi.Pointer enabled, - ) { - return _ime_manager_is_ime_enabled( - app_id, - enabled, - ); - } - - late final _ime_manager_is_ime_enabledPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('ime_manager_is_ime_enabled'); - late final _ime_manager_is_ime_enabled = _ime_manager_is_ime_enabledPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Checks which IME is the current activated (selected) IME. - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @remarks @a app_id must be released using free(). - /// @privlevel public - /// @privilege %http://tizen.org/privilege/imemanager - /// @param[out] app_id The application ID of the active IME - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IME_MANAGER_ERROR_NONE No error - /// @retval #IME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @see ime_manager_show_ime_selector() - int ime_manager_get_active_ime( - ffi.Pointer> app_id, - ) { - return _ime_manager_get_active_ime( - app_id, - ); - } - - late final _ime_manager_get_active_imePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>)>>( - 'ime_manager_get_active_ime'); - late final _ime_manager_get_active_ime = _ime_manager_get_active_imePtr - .asFunction>)>(); - - /// @brief Gets the number of IMEs which are enabled (usable). - /// @since_tizen 3.0 - /// @remarks The specific error code can be obtained using the get_last_result() method. - /// Error codes are described in Exception section. - /// @privlevel public - /// @privilege %http://tizen.org/privilege/imemanager - /// @return The @a number of enabled IMEs on success, - /// otherwise @c 0 - /// @exception IME_MANAGER_ERROR_NONE Successful - /// @exception IME_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @exception IME_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @see ime_manager_is_ime_enabled() - /// @see ime_manager_show_ime_selector() - int ime_manager_get_enabled_ime_count() { - return _ime_manager_get_enabled_ime_count(); - } - - late final _ime_manager_get_enabled_ime_countPtr = - _lookup>( - 'ime_manager_get_enabled_ime_count'); - late final _ime_manager_get_enabled_ime_count = - _ime_manager_get_enabled_ime_countPtr.asFunction(); - - /// @brief Creates a STT handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks If the function succeeds, @a stt handle must be released with stt_destroy(). - /// @param[out] stt The STT handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @post If this function is called, the STT state will be #STT_STATE_CREATED. - /// @see stt_destroy() - int stt_create( - ffi.Pointer stt, - ) { - return _stt_create( - stt, - ); - } - - late final _stt_createPtr = - _lookup)>>( - 'stt_create'); - late final _stt_create = - _stt_createPtr.asFunction)>(); - - /// @brief Destroys a STT handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @see stt_create() - int stt_destroy( - stt_h stt, - ) { - return _stt_destroy( - stt, - ); - } - - late final _stt_destroyPtr = - _lookup>('stt_destroy'); - late final _stt_destroy = _stt_destroyPtr.asFunction(); - - /// @brief Retrieves supported engine information using a callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Success - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE STT Not initialized - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_CREATED. - /// @post This function invokes stt_supported_engine_cb() repeatedly for getting engine information. - /// @see stt_supported_engine_cb() - int stt_foreach_supported_engines( - stt_h stt, - stt_supported_engine_cb callback, - ffi.Pointer user_data, - ) { - return _stt_foreach_supported_engines( - stt, - callback, - user_data, - ); - } - - late final _stt_foreach_supported_enginesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stt_h, stt_supported_engine_cb, - ffi.Pointer)>>('stt_foreach_supported_engines'); - late final _stt_foreach_supported_engines = - _stt_foreach_supported_enginesPtr.asFunction< - int Function( - stt_h, stt_supported_engine_cb, ffi.Pointer)>(); - - /// @brief Gets the current engine ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks If the function is success, @a engine_id must be released using free(). - /// @param[in] stt The STT handle - /// @param[out] engine_id Engine ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Success - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE STT Not initialized - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_CREATED. - /// @see stt_set_engine() - int stt_get_engine( - stt_h stt, - ffi.Pointer> engine_id, - ) { - return _stt_get_engine( - stt, - engine_id, - ); - } - - late final _stt_get_enginePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - stt_h, ffi.Pointer>)>>('stt_get_engine'); - late final _stt_get_engine = _stt_get_enginePtr - .asFunction>)>(); - - /// @brief Sets the engine ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @privilege %http://tizen.org/privilege/appmanager.launch - /// @remarks A privilege (%http://tizen.org/privilege/appmanager.launch) is necessary since 3.0. - /// @param[in] stt The STT handle - /// @param[in] engine_id Engine ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Success - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE STT Not initialized - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_CREATED. - /// @see stt_get_engine() - int stt_set_engine( - stt_h stt, - ffi.Pointer engine_id, - ) { - return _stt_set_engine( - stt, - engine_id, - ); - } - - late final _stt_set_enginePtr = _lookup< - ffi.NativeFunction)>>( - 'stt_set_engine'); - late final _stt_set_engine = _stt_set_enginePtr - .asFunction)>(); - - /// @brief Sets the app credential. - /// @details Using this API, the application can set a credential. - /// The credential is a key to verify the authorization about using the engine. - /// If the application sets the credential, it will be able to use functions of the engine entirely. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @remarks The necessity of the credential depends on the engine. In case of the engine which is basically embedded in Tizen, the credential is not necessary so far. - /// However, if the user wants to apply the 3rd party's engine, the credential may be necessary. In that case, please follow the policy provided by the corresponding engine. - /// @param[in] stt The STT handle - /// @param[in] credential The app credential - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Success - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @pre The state should be #STT_STATE_CREATED or #STT_STATE_READY. - /// @see stt_start() - int stt_set_credential( - stt_h stt, - ffi.Pointer credential, - ) { - return _stt_set_credential( - stt, - credential, - ); - } - - late final _stt_set_credentialPtr = _lookup< - ffi.NativeFunction)>>( - 'stt_set_credential'); - late final _stt_set_credential = _stt_set_credentialPtr - .asFunction)>(); - - /// @brief Sets the private data to stt engine. - /// @details The private data is the setting parameter for applying keys provided by the engine. - /// Using this API, the application can set the private data and use the corresponding key of the engine. - /// For example, if the engine provides 'partial recognition' as a recognition type, the application can set the private data as the following. - /// int ret = stt_set_private_data(stt_h, "recognition_type", "PARTIAL"); - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @remarks If the engine is replaced with the other engine, the key may be ignored. - /// @param[in] stt The STT handle - /// @param[in] key The field name of private data - /// @param[in] data The data for set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_TIMED_OUT No answer from the STT service - /// @pre The state should be #STT_STATE_READY. - /// @see stt_get_private_data() - int stt_set_private_data( - stt_h stt, - ffi.Pointer key, - ffi.Pointer data, - ) { - return _stt_set_private_data( - stt, - key, - data, - ); - } - - late final _stt_set_private_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stt_h, ffi.Pointer, - ffi.Pointer)>>('stt_set_private_data'); - late final _stt_set_private_data = _stt_set_private_dataPtr.asFunction< - int Function(stt_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the private data from stt engine. - /// @details The private data is the information provided by the engine. - /// Using this API, the application can get the private data which corresponds to the key from the engine. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @remarks If the engine is replaced with the other engine, the key may be ignored. - /// @remarks The @a data must be released using free() when it is no longer required. - /// @param[in] stt The STT handle - /// @param[in] key The field name of private data - /// @param[out] data The data field of private data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_TIMED_OUT No answer from the STT service - /// @pre The state should be #STT_STATE_READY. - /// @see stt_set_private_data() - int stt_get_private_data( - stt_h stt, - ffi.Pointer key, - ffi.Pointer> data, - ) { - return _stt_get_private_data( - stt, - key, - data, - ); - } - - late final _stt_get_private_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stt_h, ffi.Pointer, - ffi.Pointer>)>>('stt_get_private_data'); - late final _stt_get_private_data = _stt_get_private_dataPtr.asFunction< - int Function( - stt_h, ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Connects the STT service asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_CREATED. - /// @post If this function is successful, the STT state will be #STT_STATE_READY. - /// If this function is failed, the error callback is called. (e.g. #STT_ERROR_ENGINE_NOT_FOUND) - /// @see stt_unprepare() - int stt_prepare( - stt_h stt, - ) { - return _stt_prepare( - stt, - ); - } - - late final _stt_preparePtr = - _lookup>('stt_prepare'); - late final _stt_prepare = _stt_preparePtr.asFunction(); - - /// @brief Disconnects the STT service. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_READY. - /// @post If this function is called, the STT state will be #STT_STATE_CREATED. - /// @see stt_prepare() - int stt_unprepare( - stt_h stt, - ) { - return _stt_unprepare( - stt, - ); - } - - late final _stt_unpreparePtr = - _lookup>('stt_unprepare'); - late final _stt_unprepare = - _stt_unpreparePtr.asFunction(); - - /// @brief Retrieves all supported languages of current engine using callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_ENGINE_NOT_FOUND No available engine - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @post This function invokes stt_supported_language_cb() repeatedly for getting languages. - /// @see stt_supported_language_cb() - /// @see stt_get_default_language() - int stt_foreach_supported_languages( - stt_h stt, - stt_supported_language_cb callback, - ffi.Pointer user_data, - ) { - return _stt_foreach_supported_languages( - stt, - callback, - user_data, - ); - } - - late final _stt_foreach_supported_languagesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stt_h, stt_supported_language_cb, - ffi.Pointer)>>('stt_foreach_supported_languages'); - late final _stt_foreach_supported_languages = - _stt_foreach_supported_languagesPtr.asFunction< - int Function( - stt_h, stt_supported_language_cb, ffi.Pointer)>(); - - /// @brief Gets the default language set by the user. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks The language is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code. - /// For example, "ko_KR" for Korean, "en_US" for American English. - /// If the function succeeds, @a language must be released using free() when it is no longer required. - /// @param[in] stt The STT handle - /// @param[out] language The language - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @see stt_foreach_supported_languages() - int stt_get_default_language( - stt_h stt, - ffi.Pointer> language, - ) { - return _stt_get_default_language( - stt, - language, - ); - } - - late final _stt_get_default_languagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stt_h, - ffi.Pointer>)>>('stt_get_default_language'); - late final _stt_get_default_language = _stt_get_default_languagePtr - .asFunction>)>(); - - /// @brief Gets the current STT state. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @param[out] state The current STT state - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @see stt_start() - /// @see stt_stop() - /// @see stt_cancel() - /// @see stt_state_changed_cb() - int stt_get_state( - stt_h stt, - ffi.Pointer state, - ) { - return _stt_get_state( - stt, - state, - ); - } - - late final _stt_get_statePtr = _lookup< - ffi.NativeFunction)>>( - 'stt_get_state'); - late final _stt_get_state = _stt_get_statePtr - .asFunction)>(); - - /// @brief Gets the current error message. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @remarks This function should be called during an stt error callback. If not, the error as operation failure will be returned. - /// If the function succeeds, @a err_msg must be released using free() when it is no longer required. - /// @param[in] stt The STT handle - /// @param[out] err_msg The current error message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @see stt_set_error_cb() - /// @see stt_unset_error_cb() - int stt_get_error_message( - stt_h stt, - ffi.Pointer> err_msg, - ) { - return _stt_get_error_message( - stt, - err_msg, - ); - } - - late final _stt_get_error_messagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stt_h, - ffi.Pointer>)>>('stt_get_error_message'); - late final _stt_get_error_message = _stt_get_error_messagePtr - .asFunction>)>(); - - /// @brief Checks whether the recognition type is supported. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @param[in] type The type for recognition (e.g. #STT_RECOGNITION_TYPE_FREE, #STT_RECOGNITION_TYPE_FREE_PARTIAL) - /// @param[out] support The result status @c true = supported, - /// @c false = not supported - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_READY. - int stt_is_recognition_type_supported( - stt_h stt, - ffi.Pointer type, - ffi.Pointer support, - ) { - return _stt_is_recognition_type_supported( - stt, - type, - support, - ); - } - - late final _stt_is_recognition_type_supportedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stt_h, ffi.Pointer, - ffi.Pointer)>>('stt_is_recognition_type_supported'); - late final _stt_is_recognition_type_supported = - _stt_is_recognition_type_supportedPtr.asFunction< - int Function(stt_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the silence detection. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @param[in] type The option type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED_FEATURE Not supported feature of current engine - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_READY. - int stt_set_silence_detection( - stt_h stt, - int type, - ) { - return _stt_set_silence_detection( - stt, - type, - ); - } - - late final _stt_set_silence_detectionPtr = - _lookup>( - 'stt_set_silence_detection'); - late final _stt_set_silence_detection = - _stt_set_silence_detectionPtr.asFunction(); - - /// @brief Sets the sound to start recording. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks Sound file type should be wav type. - /// @param[in] stt The STT handle - /// @param[in] filename The sound file path - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_READY. - int stt_set_start_sound( - stt_h stt, - ffi.Pointer filename, - ) { - return _stt_set_start_sound( - stt, - filename, - ); - } - - late final _stt_set_start_soundPtr = _lookup< - ffi.NativeFunction)>>( - 'stt_set_start_sound'); - late final _stt_set_start_sound = _stt_set_start_soundPtr - .asFunction)>(); - - /// @brief Unsets the sound to start recording. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_READY. - int stt_unset_start_sound( - stt_h stt, - ) { - return _stt_unset_start_sound( - stt, - ); - } - - late final _stt_unset_start_soundPtr = - _lookup>( - 'stt_unset_start_sound'); - late final _stt_unset_start_sound = - _stt_unset_start_soundPtr.asFunction(); - - /// @brief Sets the sound to stop recording. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks Sound file type should be wav type. - /// @param[in] stt The STT handle - /// @param[in] filename The sound file path - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_READY. - int stt_set_stop_sound( - stt_h stt, - ffi.Pointer filename, - ) { - return _stt_set_stop_sound( - stt, - filename, - ); - } - - late final _stt_set_stop_soundPtr = _lookup< - ffi.NativeFunction)>>( - 'stt_set_stop_sound'); - late final _stt_set_stop_sound = _stt_set_stop_soundPtr - .asFunction)>(); - - /// @brief Unsets the sound to stop recording. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_READY. - int stt_unset_stop_sound( - stt_h stt, - ) { - return _stt_unset_stop_sound( - stt, - ); - } - - late final _stt_unset_stop_soundPtr = - _lookup>( - 'stt_unset_stop_sound'); - late final _stt_unset_stop_sound = - _stt_unset_stop_soundPtr.asFunction(); - - /// @brief Starts recording and recognition asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks This function starts recording in the STT service and sending recording data to engine. - /// This work continues until stt_stop(), stt_cancel() or silence detected by engine. - /// @param[in] stt The STT handle - /// @param[in] language The language selected from stt_foreach_supported_languages() - /// @param[in] type The type for recognition (e.g. #STT_RECOGNITION_TYPE_FREE, #STT_RECOGNITION_TYPE_FREE_PARTIAL) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_RECORDER_BUSY Recorder busy - /// @retval #STT_ERROR_INVALID_LANGUAGE Invalid language - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #STT_ERROR_IN_PROGRESS_TO_RECORDING Progress to recording is not finished - /// @pre The state should be #STT_STATE_READY. - /// @post It will invoke stt_state_changed_cb(), if you register a callback with stt_state_changed_cb(). - /// If this function succeeds, the STT state will be #STT_STATE_RECORDING. - /// If you call this function again before state changes, you will receive STT_ERROR_IN_PROGRESS_TO_RECORDING. - /// @see stt_stop() - /// @see stt_cancel() - /// @see stt_state_changed_cb() - int stt_start( - stt_h stt, - ffi.Pointer language, - ffi.Pointer type, - ) { - return _stt_start( - stt, - language, - type, - ); - } - - late final _stt_startPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stt_h, ffi.Pointer, - ffi.Pointer)>>('stt_start'); - late final _stt_start = _stt_startPtr.asFunction< - int Function(stt_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Finishes the recording and starts recognition processing in engine asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #STT_ERROR_IN_PROGRESS_TO_READY Progress to ready is not finished - /// @retval #STT_ERROR_IN_PROGRESS_TO_RECORDING Progress to recording is not finished - /// @retval #STT_ERROR_IN_PROGRESS_TO_PROCESSING Progress to processing is not finished - /// @pre The state should be #STT_STATE_RECORDING. - /// @post It will invoke stt_state_changed_cb(), if you register a callback with stt_state_changed_cb(). - /// If this function succeeds, the STT state will be #STT_STATE_PROCESSING. - /// If you call this function again before state changes, you will receive STT_ERROR_IN_PROGRESS_TO_PROCESSING. - /// After processing of engine, stt_result_cb() is called. - /// @see stt_start() - /// @see stt_cancel() - /// @see stt_state_changed_cb() - int stt_stop( - stt_h stt, - ) { - return _stt_stop( - stt, - ); - } - - late final _stt_stopPtr = - _lookup>('stt_stop'); - late final _stt_stop = _stt_stopPtr.asFunction(); - - /// @brief Cancels processing recognition and recording asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks This function cancels recording and engine cancels recognition processing. - /// After successful cancel, stt_state_changed_cb() is called otherwise if error is occurred, stt_error_cb() is called. - /// @param[in] stt The STT handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #STT_ERROR_IN_PROGRESS_TO_READY Progress to ready is not finished - /// @retval #STT_ERROR_IN_PROGRESS_TO_RECORDING Progress to recording is not finished - /// @retval #STT_ERROR_IN_PROGRESS_TO_PROCESSING Progress to processing is not finished - /// @pre The state should be #STT_STATE_RECORDING or #STT_STATE_PROCESSING. - /// @post It will invoke stt_state_changed_cb(), if you register a callback with stt_state_changed_cb(). - /// If this function succeeds, the STT state will be #STT_STATE_READY. - /// If you call this function again before state changes, you will receive STT_ERROR_IN_PROGRESS_TO_READY. - /// @see stt_start() - /// @see stt_stop() - /// @see stt_state_changed_cb() - int stt_cancel( - stt_h stt, - ) { - return _stt_cancel( - stt, - ); - } - - late final _stt_cancelPtr = - _lookup>('stt_cancel'); - late final _stt_cancel = _stt_cancelPtr.asFunction(); - - /// @brief Gets the microphone volume during recording. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @param[out] volume Recording volume - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_RECORDING. - /// @see stt_start() - int stt_get_recording_volume( - stt_h stt, - ffi.Pointer volume, - ) { - return _stt_get_recording_volume( - stt, - volume, - ); - } - - late final _stt_get_recording_volumePtr = _lookup< - ffi.NativeFunction)>>( - 'stt_get_recording_volume'); - late final _stt_get_recording_volume = _stt_get_recording_volumePtr - .asFunction)>(); - - /// @brief Retrieves the time stamp of the current recognition result using the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks This function should be called in stt_recognition_result_cb(). - /// After stt_recognition_result_cb(), result data is NOT valid. - /// @param[in] stt The STT handle - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre This function should be called in stt_recognition_result_cb(). - /// @post This function invokes stt_result_time_cb() repeatedly for getting time information. - /// @see stt_result_time_cb() - /// @see stt_recognition_result_cb() - int stt_foreach_detailed_result( - stt_h stt, - stt_result_time_cb callback, - ffi.Pointer user_data, - ) { - return _stt_foreach_detailed_result( - stt, - callback, - user_data, - ); - } - - late final _stt_foreach_detailed_resultPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stt_h, stt_result_time_cb, - ffi.Pointer)>>('stt_foreach_detailed_result'); - late final _stt_foreach_detailed_result = - _stt_foreach_detailed_resultPtr.asFunction< - int Function(stt_h, stt_result_time_cb, ffi.Pointer)>(); - - /// @brief Registers a callback function to get the recognition result. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_CREATED. - /// @see stt_recognition_result_cb() - /// @see stt_unset_recognition_result_cb() - int stt_set_recognition_result_cb( - stt_h stt, - stt_recognition_result_cb callback, - ffi.Pointer user_data, - ) { - return _stt_set_recognition_result_cb( - stt, - callback, - user_data, - ); - } - - late final _stt_set_recognition_result_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stt_h, stt_recognition_result_cb, - ffi.Pointer)>>('stt_set_recognition_result_cb'); - late final _stt_set_recognition_result_cb = - _stt_set_recognition_result_cbPtr.asFunction< - int Function( - stt_h, stt_recognition_result_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_CREATED. - /// @see stt_set_recognition_result_cb() - int stt_unset_recognition_result_cb( - stt_h stt, - ) { - return _stt_unset_recognition_result_cb( - stt, - ); - } - - late final _stt_unset_recognition_result_cbPtr = - _lookup>( - 'stt_unset_recognition_result_cb'); - late final _stt_unset_recognition_result_cb = - _stt_unset_recognition_result_cbPtr.asFunction(); - - /// @brief Registers a callback function to be called when STT state changes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_CREATED. - /// @see stt_state_changed_cb() - /// @see stt_unset_state_changed_cb() - int stt_set_state_changed_cb( - stt_h stt, - stt_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _stt_set_state_changed_cb( - stt, - callback, - user_data, - ); - } - - late final _stt_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stt_h, stt_state_changed_cb, - ffi.Pointer)>>('stt_set_state_changed_cb'); - late final _stt_set_state_changed_cb = - _stt_set_state_changed_cbPtr.asFunction< - int Function(stt_h, stt_state_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_CREATED. - /// @see stt_set_state_changed_cb() - int stt_unset_state_changed_cb( - stt_h stt, - ) { - return _stt_unset_state_changed_cb( - stt, - ); - } - - late final _stt_unset_state_changed_cbPtr = - _lookup>( - 'stt_unset_state_changed_cb'); - late final _stt_unset_state_changed_cb = - _stt_unset_state_changed_cbPtr.asFunction(); - - /// @brief Registers a callback function to be called when an error occurred. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_CREATED. - /// @see stt_error_cb() - /// @see stt_unset_error_cb() - int stt_set_error_cb( - stt_h stt, - stt_error_cb callback, - ffi.Pointer user_data, - ) { - return _stt_set_error_cb( - stt, - callback, - user_data, - ); - } - - late final _stt_set_error_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - stt_h, stt_error_cb, ffi.Pointer)>>('stt_set_error_cb'); - late final _stt_set_error_cb = _stt_set_error_cbPtr - .asFunction)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_CREATED. - /// @see stt_set_error_cb() - int stt_unset_error_cb( - stt_h stt, - ) { - return _stt_unset_error_cb( - stt, - ); - } - - late final _stt_unset_error_cbPtr = - _lookup>( - 'stt_unset_error_cb'); - late final _stt_unset_error_cb = - _stt_unset_error_cbPtr.asFunction(); - - /// @brief Registers a callback function to detect the default language change. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_CREATED. - /// @see stt_default_language_changed_cb() - /// @see stt_unset_default_language_changed_cb() - int stt_set_default_language_changed_cb( - stt_h stt, - stt_default_language_changed_cb callback, - ffi.Pointer user_data, - ) { - return _stt_set_default_language_changed_cb( - stt, - callback, - user_data, - ); - } - - late final _stt_set_default_language_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stt_h, stt_default_language_changed_cb, - ffi.Pointer)>>('stt_set_default_language_changed_cb'); - late final _stt_set_default_language_changed_cb = - _stt_set_default_language_changed_cbPtr.asFunction< - int Function( - stt_h, stt_default_language_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_CREATED. - /// @see stt_set_default_language_changed_cb() - int stt_unset_default_language_changed_cb( - stt_h stt, - ) { - return _stt_unset_default_language_changed_cb( - stt, - ); - } - - late final _stt_unset_default_language_changed_cbPtr = - _lookup>( - 'stt_unset_default_language_changed_cb'); - late final _stt_unset_default_language_changed_cb = - _stt_unset_default_language_changed_cbPtr - .asFunction(); - - /// @brief Registers a callback function to detect the engine change. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @param[in] stt The STT handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @pre The state should be #STT_STATE_CREATED. - /// @see stt_engine_changed_cb() - /// @see stt_unset_engine_changed_cb() - int stt_set_engine_changed_cb( - stt_h stt, - stt_engine_changed_cb callback, - ffi.Pointer user_data, - ) { - return _stt_set_engine_changed_cb( - stt, - callback, - user_data, - ); - } - - late final _stt_set_engine_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stt_h, stt_engine_changed_cb, - ffi.Pointer)>>('stt_set_engine_changed_cb'); - late final _stt_set_engine_changed_cb = - _stt_set_engine_changed_cbPtr.asFunction< - int Function(stt_h, stt_engine_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @param[in] stt The STT handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @pre The state should be #STT_STATE_CREATED. - /// @see stt_set_engine_changed_cb() - int stt_unset_engine_changed_cb( - stt_h stt, - ) { - return _stt_unset_engine_changed_cb( - stt, - ); - } - - late final _stt_unset_engine_changed_cbPtr = - _lookup>( - 'stt_unset_engine_changed_cb'); - late final _stt_unset_engine_changed_cb = - _stt_unset_engine_changed_cbPtr.asFunction(); - - /// @brief Main function for Speech-To-Text (STT) engine. - /// @details This function is the main function for operating STT engine. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks The service_app_main() should be used for working the engine after this function. - /// @param[in] argc The argument count(original) - /// @param[in] argv The argument(original) - /// @param[in] callback The structure of engine request callback function - /// @return This function returns @c zero on success, - /// or negative with error code on failure - /// @retval #STTE_ERROR_NONE Successful - /// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STTE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #STTE_ERROR_NOT_SUPPORTED Not supported - /// @retval #STTE_ERROR_OPERATION_FAILED Operation failure - /// @see stte_request_callback_s - /// @code - /// #include - /// - /// // Required callback functions - MUST BE IMPLEMENTED - /// static int sttengine_get_info_cb(char** engine_uuid, char** engine_name, char** engine_setting, bool* use_network); - /// static int sttengine_initialize_cb(void); - /// static int sttengine_deinitialize_cb(void); - /// static int sttengine_is_valid_language_cb(const char* language, bool* is_valid); - /// static int sttengine_foreach_supported_langs_cb(stte_supported_language_cb callback, void* user_data); - /// static bool sttengine_support_silence_detection_cb(void); - /// static int sttengine_set_silence_detection_cb(bool is_set); - /// static int sttengine_support_recognition_type_cb(const char* type, bool* is_supported); - /// static int sttengine_get_recording_format_cb(stte_audio_type_e* types, int* rate, int* channels); - /// static int sttengine_set_recording_data_cb(const void* data, unsigned int length); - /// static int sttengine_foreach_result_time_cb(void* time_info, stte_result_time_cb callback, void* user_data); - /// static int sttengine_start_cb(const char* language, const char* type, const char* appid, const char* credential, void *user_data); - /// static int sttengine_stop_cb(void); - /// static int sttengine_cancel_cb(void); - /// static int sttengine_check_app_agreed_cb(const char* appid, bool* is_agreed); - /// static bool sttengine_need_app_credential_cb(void); - /// - /// // Optional callback function - /// static int sttengine_private_data_set_cb(const char* key, const char* data); - /// - /// int main(int argc, char* argv[]) - /// { - /// // 1. Create a structure 'stte_request_callback_s' - /// stte_request_callback_s engine_callback = { 0, }; - /// - /// engine_callback.size = sizeof(stte_request_callback_s); - /// engine_callback.version = 1; - /// engine_callback.get_info = sttengine_get_info_cb; - /// - /// engine_callback.initialize = sttengine_initialize_cb; - /// engine_callback.deinitialize = sttengine_deinitialize_cb; - /// - /// engine_callback.foreach_langs = sttengine_foreach_supported_langs_cb; - /// engine_callback.is_valid_lang = sttengine_is_valid_language_cb; - /// engine_callback.support_silence = sttengine_support_silence_detection_cb; - /// engine_callback.support_recognition_type = sttengine_support_recognition_type_cb; - /// - /// engine_callback.get_audio_format = sttengine_get_recording_format_cb; - /// engine_callback.foreach_result_time = sttengine_foreach_result_time_cb; - /// - /// engine_callback.set_silence_detection = sttengine_set_silence_detection_cb; - /// - /// engine_callback.start = sttengine_start_cb; - /// engine_callback.set_recording = sttengine_set_recording_data_cb; - /// engine_callback.stop = sttengine_stop_cb; - /// engine_callback.cancel = sttengine_cancel_cb; - /// - /// engine_callback.check_app_agreed = sttengine_check_app_agreed_cb; - /// engine_callback.need_app_credential = sttengine_need_app_credential_cb; - /// - /// // 2. Run 'stte_main()' - /// if (0 != stte_main(argc, argv, &engine_callback)) { - /// return -1; - /// } - /// - /// // Optional - /// stte_set_private_data_set_cb(sttengine_private_data_set_cb); - /// - /// // 3. Set event callbacks for service app and Run 'service_app_main()' - /// char ad[50] = { 0, }; - /// - /// service_app_lifecycle_callback_s event_callback; - /// app_event_handler_h handlers[5] = { NULL, }; - /// - /// event_callback.create = service_app_create; - /// event_callback.terminate = service_app_terminate; - /// event_callback.app_control = service_app_control; - /// - /// service_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, service_app_low_battery, &ad); - /// service_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, service_app_low_memory, &ad); - /// service_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, service_app_lang_changed, &ad); - /// service_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, service_app_region_changed, &ad); - /// - /// return service_app_main(argc, argv, &event_callback, ad); - /// } - /// - /// @endcode - int stte_main( - int argc, - ffi.Pointer> argv, - ffi.Pointer callback, - ) { - return _stte_main( - argc, - argv, - callback, - ); - } - - late final _stte_mainPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer>, - ffi.Pointer)>>('stte_main'); - late final _stte_main = _stte_mainPtr.asFunction< - int Function(int, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Sends the recognition result to the engine service user. - /// @since_tizen 3.0 - /// @remarks This API is used in stte_set_recording_data_cb() and stte_stop_cb(), when STT engine sends the recognition result to the engine service user. - /// This function is called in the following situations; 1) after stte_stop_cb() is called, 2) the end point of speech is detected from recording, or 3) partial result is occurred. - /// The recognition result and @a user_data must be transferred to the engine service user through this function. - /// Also, @a time_info must be transferred to stte_foreach_result_time_cb(). The type of @a time_info is up to the STT engine developer. - /// @param[in] event The result event - /// @param[in] type The recognition type (e.g. #STTE_RECOGNITION_TYPE_FREE, #STTE_RECOGNITION_TYPE_FREE_PARTIAL) - /// @param[in] result Result texts - /// @param[in] result_count Result text count - /// @param[in] msg Engine message (e.g. #STTE_RESULT_MESSAGE_NONE, #STTE_RESULT_MESSAGE_ERROR_TOO_SHORT) - /// @param[in] time_info The time information - /// @param[in] user_data The user data passed from stte_start_cb() - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STTE_ERROR_NONE Successful - /// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STTE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #STTE_ERROR_NOT_SUPPORTED Not supported - /// @retval #STTE_ERROR_OPERATION_FAILED Operation failure - /// @pre The stte_main() function should be invoked before this function is called. - /// stte_stop_cb() will invoke this function. - /// @post This function invokes stte_foreach_result_time_cb(). - /// @see stte_start_cb() - /// @see stte_set_recording_data_cb() - /// @see stte_stop_cb() - /// @see stte_foreach_result_time_cb() - int stte_send_result( - int event, - ffi.Pointer type, - ffi.Pointer> result, - int result_count, - ffi.Pointer msg, - ffi.Pointer time_info, - ffi.Pointer user_data, - ) { - return _stte_send_result( - event, - type, - result, - result_count, - msg, - time_info, - user_data, - ); - } - - late final _stte_send_resultPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - ffi.Pointer, - ffi.Pointer>, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('stte_send_result'); - late final _stte_send_result = _stte_send_resultPtr.asFunction< - int Function( - int, - ffi.Pointer, - ffi.Pointer>, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Sends the error to the engine service user. - /// @details The following error codes can be delivered. - /// #STTE_ERROR_NONE, - /// #STTE_ERROR_OUT_OF_MEMORY, - /// #STTE_ERROR_IO_ERROR, - /// #STTE_ERROR_INVALID_PARAMETER, - /// #STTE_ERROR_NETWORK_DOWN, - /// #STTE_ERROR_INVALID_STATE, - /// #STTE_ERROR_INVALID_LANGUAGE, - /// #STTE_ERROR_OPERATION_FAILED, - /// #STTE_ERROR_NOT_SUPPORTED_FEATURE, - /// #STTE_ERROR_NOT_SUPPORTED, - /// #STTE_ERROR_PERMISSION_DENIED, - /// #STTE_ERROR_RECORDING_TIMED_OUT. - /// @since_tizen 3.0 - /// @param[in] error The error reason - /// @param[in] msg The error message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STTE_ERROR_NONE Successful - /// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STTE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #STTE_ERROR_NOT_SUPPORTED Not supported - /// @retval #STTE_ERROR_OPERATION_FAILED Operation failure - /// @pre The stte_main() function should be invoked before this function is called. - int stte_send_error( - int error, - ffi.Pointer msg, - ) { - return _stte_send_error( - error, - msg, - ); - } - - late final _stte_send_errorPtr = _lookup< - ffi - .NativeFunction)>>( - 'stte_send_error'); - late final _stte_send_error = _stte_send_errorPtr - .asFunction)>(); - - /// @brief Sends the speech status to the engine service user when STT engine notifies the change of the speech status. - /// @since_tizen 3.0 - /// @remarks This API is invoked when STT engine wants to notify the change of the speech status anytime. - /// NOTE that this API can be invoked for recognizing the speech. - /// @param[in] status The status of speech (e.g. STTE_SPEECH_STATUS_START_POINT_DETECTED or STTE_SPEECH_STATUS_END_POINT_DETECTED) - /// @param[in] user_data The user data passed from the start function. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STTE_ERROR_NONE Successful - /// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STTE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #STTE_ERROR_NOT_SUPPORTED Not supported - /// @retval #STTE_ERROR_OPERATION_FAILED Operation failure - /// @pre The stte_main() function should be invoked before this function is called. - /// stte_start_cb() and stte_set_recording_data_cb() will invoke this function. - /// @see stte_start_cb() - /// @see stte_set_recording_data_cb() - int stte_send_speech_status( - int status, - ffi.Pointer user_data, - ) { - return _stte_send_speech_status( - status, - user_data, - ); - } - - late final _stte_send_speech_statusPtr = _lookup< - ffi - .NativeFunction)>>( - 'stte_send_speech_status'); - late final _stte_send_speech_status = _stte_send_speech_statusPtr - .asFunction)>(); - - /// @brief Sets a callback function for setting the private data. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks The stte_private_data_set_cb() function is called when the engine service user sends the private data. - /// @param[in] callback_func stte_private_data_set event callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STTE_ERROR_NONE Successful - /// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STTE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #STTE_ERROR_NOT_SUPPORTED Not supported - /// @retval #STTE_ERROR_OPERATION_FAILED Operation failure - /// @pre The stte_main() function should be invoked before this function is called. - /// @see stte_private_data_set_cb() - int stte_set_private_data_set_cb( - stte_private_data_set_cb callback_func, - ) { - return _stte_set_private_data_set_cb( - callback_func, - ); - } - - late final _stte_set_private_data_set_cbPtr = - _lookup>( - 'stte_set_private_data_set_cb'); - late final _stte_set_private_data_set_cb = _stte_set_private_data_set_cbPtr - .asFunction(); - - /// @brief Sets a callback function for requesting the private data. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks The stte_private_data_requested_cb() function is called when the engine service user gets the private data from STT engine. - /// @param[in] callback_func stte_private_data_requested event callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STTE_ERROR_NONE Successful - /// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STTE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #STTE_ERROR_NOT_SUPPORTED Not supported - /// @retval #STTE_ERROR_OPERATION_FAILED Operation failure - /// @pre The stte_main() function should be invoked before this function is called. - /// @see stte_private_data_requested_cb() - int stte_set_private_data_requested_cb( - stte_private_data_requested_cb callback_func, - ) { - return _stte_set_private_data_requested_cb( - callback_func, - ); - } - - late final _stte_set_private_data_requested_cbPtr = _lookup< - ffi.NativeFunction>( - 'stte_set_private_data_requested_cb'); - late final _stte_set_private_data_requested_cb = - _stte_set_private_data_requested_cbPtr - .asFunction(); - - /// @brief Creates a handle for TTS. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If the function succeeds, @a tts handle must be released with tts_destroy(). - /// @param[out] tts The TTS handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_ENGINE_NOT_FOUND Engine not found - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @post If this function is called, the TTS state will be #TTS_STATE_CREATED. - /// @see tts_destroy() - int tts_create( - ffi.Pointer tts, - ) { - return _tts_create( - tts, - ); - } - - late final _tts_createPtr = - _lookup)>>( - 'tts_create'); - late final _tts_create = - _tts_createPtr.asFunction)>(); - - /// @brief Destroys the handle and disconnects the daemon. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @see tts_create() - int tts_destroy( - tts_h tts, - ) { - return _tts_destroy( - tts, - ); - } - - late final _tts_destroyPtr = - _lookup>('tts_destroy'); - late final _tts_destroy = _tts_destroyPtr.asFunction(); - - /// @brief Sets the TTS mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @param[in] mode The mode - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_get_mode() - int tts_set_mode( - tts_h tts, - int mode, - ) { - return _tts_set_mode( - tts, - mode, - ); - } - - late final _tts_set_modePtr = - _lookup>( - 'tts_set_mode'); - late final _tts_set_mode = - _tts_set_modePtr.asFunction(); - - /// @brief Gets the TTS mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @param[out] mode The mode - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_set_mode() - int tts_get_mode( - tts_h tts, - ffi.Pointer mode, - ) { - return _tts_get_mode( - tts, - mode, - ); - } - - late final _tts_get_modePtr = _lookup< - ffi.NativeFunction)>>( - 'tts_get_mode'); - late final _tts_get_mode = _tts_get_modePtr - .asFunction)>(); - - /// @brief Sets the app credential. - /// @details Using this API, the application can set a credential. - /// The credential is a key to verify the authorization about using the engine. - /// If the application sets the credential, it will be able to use functions of the engine entirely. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @remarks The necessity of the credential depends on the engine. In case of the engine which is basically embedded in Tizen, the credential is not necessary so far. - /// However, if the user wants to apply the 3rd party's engine, the credential may be necessary. In that case, please follow the policy provided by the corresponding engine. - /// @param[in] tts The TTS handle - /// @param[in] credential The app credential - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Success - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED or #TTS_STATE_READY. - /// @see tts_play() - int tts_set_credential( - tts_h tts, - ffi.Pointer credential, - ) { - return _tts_set_credential( - tts, - credential, - ); - } - - late final _tts_set_credentialPtr = _lookup< - ffi.NativeFunction)>>( - 'tts_set_credential'); - late final _tts_set_credential = _tts_set_credentialPtr - .asFunction)>(); - - /// @brief Connects the daemon asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @post If this function is successful, the TTS state will be #TTS_STATE_READY. - /// If this function is failed, the error callback is called. (e.g. #TTS_ERROR_ENGINE_NOT_FOUND) - /// @see tts_unprepare() - int tts_prepare( - tts_h tts, - ) { - return _tts_prepare( - tts, - ); - } - - late final _tts_preparePtr = - _lookup>('tts_prepare'); - late final _tts_prepare = _tts_preparePtr.asFunction(); - - /// @brief Disconnects the daemon. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_READY. - /// @post If this function is called, the TTS state will be #TTS_STATE_CREATED. - /// @see tts_prepare() - int tts_unprepare( - tts_h tts, - ) { - return _tts_unprepare( - tts, - ); - } - - late final _tts_unpreparePtr = - _lookup>('tts_unprepare'); - late final _tts_unprepare = - _tts_unpreparePtr.asFunction(); - - /// @brief Retrieves all supported voices of the current engine using callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_ENGINE_NOT_FOUND Engine not found - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @post This function invokes tts_supported_voice_cb() repeatedly for getting voices. - /// @see tts_get_default_voice() - int tts_foreach_supported_voices( - tts_h tts, - tts_supported_voice_cb callback, - ffi.Pointer user_data, - ) { - return _tts_foreach_supported_voices( - tts, - callback, - user_data, - ); - } - - late final _tts_foreach_supported_voicesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tts_h, tts_supported_voice_cb, - ffi.Pointer)>>('tts_foreach_supported_voices'); - late final _tts_foreach_supported_voices = - _tts_foreach_supported_voicesPtr.asFunction< - int Function(tts_h, tts_supported_voice_cb, ffi.Pointer)>(); - - /// @brief Gets the default voice set by the user. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If the function succeeds, @a language must be released with free(). - /// @param[in] tts The TTS handle - /// @param[out] language Language specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code (for example, "ko_KR" for Korean, "en_US" for American English) - /// @param[out] voice_type The voice type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_ENGINE_NOT_FOUND Engine not found - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @see tts_foreach_supported_voices() - int tts_get_default_voice( - tts_h tts, - ffi.Pointer> language, - ffi.Pointer voice_type, - ) { - return _tts_get_default_voice( - tts, - language, - voice_type, - ); - } - - late final _tts_get_default_voicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tts_h, ffi.Pointer>, - ffi.Pointer)>>('tts_get_default_voice'); - late final _tts_get_default_voice = _tts_get_default_voicePtr.asFunction< - int Function( - tts_h, ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Sets the private data to tts engine. - /// @details The private data is the setting parameter for applying keys provided by the engine. - /// Using this API, the application can set the private data and use the corresponding key of the engine. - /// For example, if the engine provides 'girl's voice' as a voice type, the application can set the private data as the following. - /// int ret = tts_set_private_data(tts_h, "voice_type", "GIRL"); - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @remarks If the engine is replaced with the other engine, the key may be ignored. - /// @param[in] tts The TTS handle - /// @param[in] key The field name of private data - /// @param[in] data The data for set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_ENGINE_NOT_FOUND Engine not found - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_READY. - /// @see tts_get_private_data() - int tts_set_private_data( - tts_h tts, - ffi.Pointer key, - ffi.Pointer data, - ) { - return _tts_set_private_data( - tts, - key, - data, - ); - } - - late final _tts_set_private_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tts_h, ffi.Pointer, - ffi.Pointer)>>('tts_set_private_data'); - late final _tts_set_private_data = _tts_set_private_dataPtr.asFunction< - int Function(tts_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the private data from tts engine. - /// @details The private data is the information provided by the engine. - /// Using this API, the application can get the private data which corresponds to the key from the engine. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @remarks The @a data must be released using free() when it is no longer required. - /// If the engine is replaced with the other engine, the key may be ignored. - /// @param[in] tts The TTS handle - /// @param[in] key The field name of private data - /// @param[out] data The data field of private data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_ENGINE_NOT_FOUND Engine not found - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_READY. - /// @see tts_set_private_data() - int tts_get_private_data( - tts_h tts, - ffi.Pointer key, - ffi.Pointer> data, - ) { - return _tts_get_private_data( - tts, - key, - data, - ); - } - - late final _tts_get_private_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tts_h, ffi.Pointer, - ffi.Pointer>)>>('tts_get_private_data'); - late final _tts_get_private_data = _tts_get_private_dataPtr.asFunction< - int Function( - tts_h, ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Gets the maximum byte size for text. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @param[out] size The maximum byte size for text - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_READY. - /// @see tts_add_text() - int tts_get_max_text_size( - tts_h tts, - ffi.Pointer size, - ) { - return _tts_get_max_text_size( - tts, - size, - ); - } - - late final _tts_get_max_text_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - tts_h, ffi.Pointer)>>('tts_get_max_text_size'); - late final _tts_get_max_text_size = _tts_get_max_text_sizePtr - .asFunction)>(); - - /// @brief Gets the current state of TTS. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @param[out] state The current state of TTS - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @see tts_play() - /// @see tts_stop() - /// @see tts_pause() - int tts_get_state( - tts_h tts, - ffi.Pointer state, - ) { - return _tts_get_state( - tts, - state, - ); - } - - late final _tts_get_statePtr = _lookup< - ffi.NativeFunction)>>( - 'tts_get_state'); - late final _tts_get_state = _tts_get_statePtr - .asFunction)>(); - - /// @brief Gets the speed range. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @param[out] min The minimum speed value - /// @param[out] normal The normal speed value - /// @param[out] max The maximum speed value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_add_text() - int tts_get_speed_range( - tts_h tts, - ffi.Pointer min, - ffi.Pointer normal, - ffi.Pointer max, - ) { - return _tts_get_speed_range( - tts, - min, - normal, - max, - ); - } - - late final _tts_get_speed_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tts_h, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('tts_get_speed_range'); - late final _tts_get_speed_range = _tts_get_speed_rangePtr.asFunction< - int Function(tts_h, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the current error message. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @remarks This function should be called from a tts error callback. Calling in any other context will result in an Operation failed error. - /// A successful call will allocate @a err_msg, which must be released by calling free() when it is no longer required. - /// @param[in] tts The TTS handle - /// @param[out] err_msg The current error message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @see tts_set_error_cb() - /// @see tts_unset_error_cb() - int tts_get_error_message( - tts_h tts, - ffi.Pointer> err_msg, - ) { - return _tts_get_error_message( - tts, - err_msg, - ); - } - - late final _tts_get_error_messagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tts_h, - ffi.Pointer>)>>('tts_get_error_message'); - late final _tts_get_error_message = _tts_get_error_messagePtr - .asFunction>)>(); - - /// @brief Adds a text to the queue. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks Locale(e.g. setlocale()) MUST be set for utf8 text validation check. - /// @param[in] tts The TTS handle - /// @param[in] text An input text based utf8 - /// @param[in] language The language selected from the tts_foreach_supported_voices() (e.g. 'NULL'(Automatic), 'en_US') - /// @param[in] voice_type The voice type selected from the tts_foreach_supported_voices() (e.g. #TTS_VOICE_TYPE_AUTO, #TTS_VOICE_TYPE_FEMALE) - /// @param[in] speed A speaking speed (e.g. #TTS_SPEED_AUTO or the value from tts_get_speed_range()) - /// @param[out] utt_id The utterance ID passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_INVALID_VOICE Invalid voice about language, voice type - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @retval #TTS_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #TTS_STATE_READY, #TTS_STATE_PLAYING or #TTS_STATE_PAUSED. - /// @see tts_get_max_text_size() - /// @see tts_set_credential() - int tts_add_text( - tts_h tts, - ffi.Pointer text, - ffi.Pointer language, - int voice_type, - int speed, - ffi.Pointer utt_id, - ) { - return _tts_add_text( - tts, - text, - language, - voice_type, - speed, - utt_id, - ); - } - - late final _tts_add_textPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tts_h, ffi.Pointer, ffi.Pointer, - ffi.Int, ffi.Int, ffi.Pointer)>>('tts_add_text'); - late final _tts_add_text = _tts_add_textPtr.asFunction< - int Function(tts_h, ffi.Pointer, ffi.Pointer, int, - int, ffi.Pointer)>(); - - /// @brief Starts synthesizing voice from the text and plays the synthesized audio data. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_OUT_OF_NETWORK Out of network - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @retval #TTS_ERROR_PERMISSION_DENIED Permission denied - /// @pre The current state should be #TTS_STATE_READY or #TTS_STATE_PAUSED. - /// @post If this function succeeds, the TTS state will be #TTS_STATE_PLAYING. - /// @see tts_add_text() - /// @see tts_pause() - /// @see tts_stop() - /// @see tts_utterance_started_cb() - /// @see tts_utterance_completed_cb() - /// @see tts_error_cb() - /// @see tts_set_credential() - int tts_play( - tts_h tts, - ) { - return _tts_play( - tts, - ); - } - - late final _tts_playPtr = - _lookup>('tts_play'); - late final _tts_play = _tts_playPtr.asFunction(); - - /// @brief Stops playing the utterance and clears the queue. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The TTS state should be #TTS_STATE_READY or #TTS_STATE_PLAYING or #TTS_STATE_PAUSED. - /// @post If this function succeeds, the TTS state will be #TTS_STATE_READY. - /// This function will remove all text via tts_add_text() and synthesized sound data. - /// @see tts_play() - /// @see tts_pause() - int tts_stop( - tts_h tts, - ) { - return _tts_stop( - tts, - ); - } - - late final _tts_stopPtr = - _lookup>('tts_stop'); - late final _tts_stop = _tts_stopPtr.asFunction(); - - /// @brief Pauses the currently playing utterance. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The TTS state should be #TTS_STATE_PLAYING. - /// @post If this function succeeds, the TTS state will be #TTS_STATE_PAUSED. - /// @see tts_play() - /// @see tts_stop() - /// @see tts_error_cb() - /// @see tts_interrupted_cb() - int tts_pause( - tts_h tts, - ) { - return _tts_pause( - tts, - ); - } - - late final _tts_pausePtr = - _lookup>('tts_pause'); - late final _tts_pause = _tts_pausePtr.asFunction(); - - /// @brief Registers a callback function to be called when the TTS state changes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_state_changed_cb() - /// @see tts_unset_state_changed_cb() - int tts_set_state_changed_cb( - tts_h tts, - tts_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _tts_set_state_changed_cb( - tts, - callback, - user_data, - ); - } - - late final _tts_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tts_h, tts_state_changed_cb, - ffi.Pointer)>>('tts_set_state_changed_cb'); - late final _tts_set_state_changed_cb = - _tts_set_state_changed_cbPtr.asFunction< - int Function(tts_h, tts_state_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_set_state_changed_cb() - int tts_unset_state_changed_cb( - tts_h tts, - ) { - return _tts_unset_state_changed_cb( - tts, - ); - } - - late final _tts_unset_state_changed_cbPtr = - _lookup>( - 'tts_unset_state_changed_cb'); - late final _tts_unset_state_changed_cb = - _tts_unset_state_changed_cbPtr.asFunction(); - - /// @brief Registers a callback function to detect utterance start. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_utterance_started_cb() - /// @see tts_unset_utterance_started_cb() - int tts_set_utterance_started_cb( - tts_h tts, - tts_utterance_started_cb callback, - ffi.Pointer user_data, - ) { - return _tts_set_utterance_started_cb( - tts, - callback, - user_data, - ); - } - - late final _tts_set_utterance_started_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tts_h, tts_utterance_started_cb, - ffi.Pointer)>>('tts_set_utterance_started_cb'); - late final _tts_set_utterance_started_cb = - _tts_set_utterance_started_cbPtr.asFunction< - int Function( - tts_h, tts_utterance_started_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_set_utterance_started_cb() - int tts_unset_utterance_started_cb( - tts_h tts, - ) { - return _tts_unset_utterance_started_cb( - tts, - ); - } - - late final _tts_unset_utterance_started_cbPtr = - _lookup>( - 'tts_unset_utterance_started_cb'); - late final _tts_unset_utterance_started_cb = - _tts_unset_utterance_started_cbPtr.asFunction(); - - /// @brief Registers a callback function to detect utterance completion. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_utterance_completed_cb() - /// @see tts_unset_utterance_completed_cb() - int tts_set_utterance_completed_cb( - tts_h tts, - tts_utterance_completed_cb callback, - ffi.Pointer user_data, - ) { - return _tts_set_utterance_completed_cb( - tts, - callback, - user_data, - ); - } - - late final _tts_set_utterance_completed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tts_h, tts_utterance_completed_cb, - ffi.Pointer)>>('tts_set_utterance_completed_cb'); - late final _tts_set_utterance_completed_cb = - _tts_set_utterance_completed_cbPtr.asFunction< - int Function( - tts_h, tts_utterance_completed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_set_utterance_completed_cb() - int tts_unset_utterance_completed_cb( - tts_h tts, - ) { - return _tts_unset_utterance_completed_cb( - tts, - ); - } - - late final _tts_unset_utterance_completed_cbPtr = - _lookup>( - 'tts_unset_utterance_completed_cb'); - late final _tts_unset_utterance_completed_cb = - _tts_unset_utterance_completed_cbPtr.asFunction(); - - /// @brief Registers a callback function to detect errors. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_error_cb() - /// @see tts_unset_error_cb() - int tts_set_error_cb( - tts_h tts, - tts_error_cb callback, - ffi.Pointer user_data, - ) { - return _tts_set_error_cb( - tts, - callback, - user_data, - ); - } - - late final _tts_set_error_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - tts_h, tts_error_cb, ffi.Pointer)>>('tts_set_error_cb'); - late final _tts_set_error_cb = _tts_set_error_cbPtr - .asFunction)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_set_error_cb() - int tts_unset_error_cb( - tts_h tts, - ) { - return _tts_unset_error_cb( - tts, - ); - } - - late final _tts_unset_error_cbPtr = - _lookup>( - 'tts_unset_error_cb'); - late final _tts_unset_error_cb = - _tts_unset_error_cbPtr.asFunction(); - - /// @brief Registers a callback function to detect default voice change. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_default_voice_changed_cb() - /// @see tts_unset_default_voice_changed_cb() - int tts_set_default_voice_changed_cb( - tts_h tts, - tts_default_voice_changed_cb callback, - ffi.Pointer user_data, - ) { - return _tts_set_default_voice_changed_cb( - tts, - callback, - user_data, - ); - } - - late final _tts_set_default_voice_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tts_h, tts_default_voice_changed_cb, - ffi.Pointer)>>('tts_set_default_voice_changed_cb'); - late final _tts_set_default_voice_changed_cb = - _tts_set_default_voice_changed_cbPtr.asFunction< - int Function( - tts_h, tts_default_voice_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_set_default_voice_changed_cb() - int tts_unset_default_voice_changed_cb( - tts_h tts, - ) { - return _tts_unset_default_voice_changed_cb( - tts, - ); - } - - late final _tts_unset_default_voice_changed_cbPtr = - _lookup>( - 'tts_unset_default_voice_changed_cb'); - late final _tts_unset_default_voice_changed_cb = - _tts_unset_default_voice_changed_cbPtr.asFunction(); - - /// @brief Registers a callback function to detect the engine change. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @param[in] tts The TTS handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_engine_changed_cb() - /// @see tts_unset_engine_changed_cb() - int tts_set_engine_changed_cb( - tts_h tts, - tts_engine_changed_cb callback, - ffi.Pointer user_data, - ) { - return _tts_set_engine_changed_cb( - tts, - callback, - user_data, - ); - } - - late final _tts_set_engine_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tts_h, tts_engine_changed_cb, - ffi.Pointer)>>('tts_set_engine_changed_cb'); - late final _tts_set_engine_changed_cb = - _tts_set_engine_changed_cbPtr.asFunction< - int Function(tts_h, tts_engine_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @param[in] tts The TTS handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_set_engine_changed_cb() - int tts_unset_engine_changed_cb( - tts_h tts, - ) { - return _tts_unset_engine_changed_cb( - tts, - ); - } - - late final _tts_unset_engine_changed_cbPtr = - _lookup>( - 'tts_unset_engine_changed_cb'); - late final _tts_unset_engine_changed_cb = - _tts_unset_engine_changed_cbPtr.asFunction(); - - /// @brief Main function for Text-To-Speech (TTS) engine. - /// @details This function is the main function for operating TTS engine. - /// @since_tizen 3.0 - /// @remarks The service_app_main() should be used for working the engine after this function. - /// @param[in] argc The argument count(original) - /// @param[in] argv The argument(original) - /// @param[in] callback The structure of engine request callback function - /// @return This function returns zero on success, - /// or negative with error code on failure - /// @retval #TTSE_ERROR_NONE Successful - /// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure - /// @retval #TTSE_ERROR_NOT_SUPPORTED Not supported - /// @see ttse_request_callback_s - /// @code - /// #include - /// - /// // Required callback functions - MUST BE IMPLEMENTED - /// static int ttsengine_get_info_cb(char** engine_uuid, char** engine_name, char** engine_setting, bool* use_network); - /// static int ttsengine_initialize_cb(void); - /// static int ttsengine_deinitialize_cb(void); - /// static int ttsengine_is_valid_voice_cb(const char* language, int type, bool* is_valid); - /// static int ttsengine_foreach_supported_voices_cb(ttse_supported_voice_cb callback, void* user_data); - /// static int ttsengine_set_pitch_cb(int pitch); - /// static int ttsengine_load_voice_cb(const char* language, int type); - /// static int ttsengine_unload_voice_cb(const char* language, int type); - /// static int ttsengine_start_synthesis_cb(const char* language, int type, const char* text, int speed, void* user_data); - /// static int ttsengine_cancel_synthesis_cb(void); - /// static int ttsengine_check_app_agreed_cb(const char* appid, bool* is_agreed); - /// static bool ttsengine_need_app_credential_cb(void); - /// - /// // Optional callback function - /// static int ttsengine_private_data_set_cb(const char* key, const char* data); - /// - /// int main(int argc, char* argv[]) - /// { - /// // 1. Create a structure 'ttse_request_callback_s' - /// ttse_request_callback_s engine_callback = { 0, }; - /// - /// engine_callback.size = sizeof(ttse_request_callback_s); - /// engine_callback.version = 1; - /// engine_callback.get_info = ttsengine_get_info_cb; - /// engine_callback.initialize = ttsengine_initialize_cb; - /// engine_callback.deinitialize = ttsengine_deinitialize_cb; - /// engine_callback.foreach_voices = ttsengine_foreach_supported_voices_cb; - /// engine_callback.is_valid_voice = ttsengine_is_valid_voice_cb; - /// engine_callback.set_pitch = ttsengine_set_pitch_cb; - /// engine_callback.load_voice = ttsengine_load_voice_cb; - /// engine_callback.unload_voice = ttsengine_unload_voice_cb; - /// engine_callback.start_synth = ttsengine_start_synthesis_cb; - /// engine_callback.cancel_synth = ttsengine_cancel_synthesis_cb; - /// engine_callback.check_app_agreed = ttsengine_check_app_agreed_cb; - /// engine_callback.need_app_credential = ttsengine_need_app_credential_cb; - /// - /// // 2. Run 'ttse_main()' - /// if (0 != ttse_main(argc, argv, &engine_callback)) { - /// return -1; - /// } - /// - /// // Optional - /// ttse_set_private_data_set_cb(ttsengine_private_data_set_cb); - /// - /// // 3. Set event callbacks for service app and Run 'service_app_main()' - /// char ad[50] = { 0, }; - /// - /// service_app_lifecycle_callback_s event_callback; - /// app_event_handler_h handlers[5] = { NULL, }; - /// - /// event_callback.create = service_app_create; - /// event_callback.terminate = service_app_terminate; - /// event_callback.app_control = service_app_control; - /// - /// service_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, service_app_low_battery, &ad); - /// service_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, service_app_low_memory, &ad); - /// service_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, service_app_lang_changed, &ad); - /// service_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, service_app_region_changed, &ad); - /// - /// return service_app_main(argc, argv, &event_callback, ad); - /// } - /// - /// @endcode - int ttse_main( - int argc, - ffi.Pointer> argv, - ffi.Pointer callback, - ) { - return _ttse_main( - argc, - argv, - callback, - ); - } - - late final _ttse_mainPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer>, - ffi.Pointer)>>('ttse_main'); - late final _ttse_main = _ttse_mainPtr.asFunction< - int Function(int, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Gets the speed range from Tizen platform. - /// @since_tizen 3.0 - /// @remarks This API is used when TTS engine wants to get the speed range from Tizen platform. - /// @param[out] min The minimum speed value - /// @param[out] normal The normal speed value - /// @param[out] max The maximum speed value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTSE_ERROR_NONE Successful - /// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTSE_ERROR_NOT_SUPPORTED Not supported - /// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure - int ttse_get_speed_range( - ffi.Pointer min, - ffi.Pointer normal, - ffi.Pointer max, - ) { - return _ttse_get_speed_range( - min, - normal, - max, - ); - } - - late final _ttse_get_speed_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('ttse_get_speed_range'); - late final _ttse_get_speed_range = _ttse_get_speed_rangePtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the pitch range from Tizen platform. - /// @since_tizen 3.0 - /// @remarks This API is used when TTS engine wants to get the pitch range from Tizen platform. - /// @param[out] min The minimum pitch value - /// @param[out] normal The normal pitch value - /// @param[out] max The maximum pitch value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTSE_ERROR_NONE Successful - /// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTSE_ERROR_NOT_SUPPORTED Not supported - /// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure - int ttse_get_pitch_range( - ffi.Pointer min, - ffi.Pointer normal, - ffi.Pointer max, - ) { - return _ttse_get_pitch_range( - min, - normal, - max, - ); - } - - late final _ttse_get_pitch_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('ttse_get_pitch_range'); - late final _ttse_get_pitch_range = _ttse_get_pitch_rangePtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sends the synthesized result to the engine service user. - /// @since_tizen 3.0 - /// @remarks This API is used in ttse_start_synthesis_cb(), when TTS engine sends the synthesized result to the engine service user. - /// The synthesized result and @a user_data must be transferred to the engine service user through this function. - /// @param[in] event The result event - /// @param[in] data Result data - /// @param[in] data_size Result data size - /// @param[in] audio_type The audio type - /// @param[in] rate The sample rate - /// @param[in] user_data The user data passed from ttse_start_synthesis_cb() - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTSE_ERROR_NONE Successful - /// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTSE_ERROR_NOT_SUPPORTED Not supported - /// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure - /// @pre The ttse_main() function should be invoked before this function is called. - /// ttse_start_synthesis_cb() will invoke this function. - /// @see ttse_start_synthesis_cb() - int ttse_send_result( - int event, - ffi.Pointer data, - int data_size, - int audio_type, - int rate, - ffi.Pointer user_data, - ) { - return _ttse_send_result( - event, - data, - data_size, - audio_type, - rate, - user_data, - ); - } - - late final _ttse_send_resultPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer, ffi.UnsignedInt, - ffi.Int32, ffi.Int, ffi.Pointer)>>('ttse_send_result'); - late final _ttse_send_result = _ttse_send_resultPtr.asFunction< - int Function( - int, ffi.Pointer, int, int, int, ffi.Pointer)>(); - - /// @brief Sends the error to the engine service user. - /// @details The following error codes can be delivered. - /// #TTSE_ERROR_NONE, - /// #TTSE_ERROR_OUT_OF_MEMORY, - /// #TTSE_ERROR_IO_ERROR, - /// #TTSE_ERROR_INVALID_PARAMETER, - /// #TTSE_ERROR_NETWORK_DOWN, - /// #TTSE_ERROR_PERMISSION_DENIED, - /// #TTSE_ERROR_INVALID_STATE, - /// #TTSE_ERROR_INVALID_VOICE, - /// #TTSE_ERROR_OPERATION_FAILED, - /// #TTSE_ERROR_NOT_SUPPORTED_FEATURE, - /// #TTSE_ERROR_NOT_SUPPORTED. - /// @since_tizen 3.0 - /// @param[in] error The error reason - /// @param[in] msg The error message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTSE_ERROR_NONE Successful - /// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTSE_ERROR_NOT_SUPPORTED Not supported - /// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure - /// @pre The ttse_main() function should be invoked before this function is called. - int ttse_send_error( - int error, - ffi.Pointer msg, - ) { - return _ttse_send_error( - error, - msg, - ); - } - - late final _ttse_send_errorPtr = _lookup< - ffi - .NativeFunction)>>( - 'ttse_send_error'); - late final _ttse_send_error = _ttse_send_errorPtr - .asFunction)>(); - - /// @brief Sets a callback function for setting the private data. - /// @since_tizen 3.0 - /// @remarks The ttse_private_data_set_cb() function is called when the engine service user sends the private data. - /// @param[in] callback_func ttse_private_data_set event callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTSE_ERROR_NONE Successful - /// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTSE_ERROR_NOT_SUPPORTED Not supported - /// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure - /// @pre The ttse_main() function should be invoked before this function is called. - /// @see ttse_private_data_set_cb() - int ttse_set_private_data_set_cb( - ttse_private_data_set_cb callback_func, - ) { - return _ttse_set_private_data_set_cb( - callback_func, - ); - } - - late final _ttse_set_private_data_set_cbPtr = - _lookup>( - 'ttse_set_private_data_set_cb'); - late final _ttse_set_private_data_set_cb = _ttse_set_private_data_set_cbPtr - .asFunction(); - - /// @brief Sets a callback function for requesting the private data. - /// @since_tizen 3.0 - /// @remarks The ttse_private_data_requested_cb() function is called when the engine service user gets the private data from TTS engine. - /// @param[in] callback_func ttse_private_data_requested event callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTSE_ERROR_NONE Successful - /// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTSE_ERROR_NOT_SUPPORTED Not supported - /// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure - /// @pre The ttse_main() function should be invoked before this function is called. - /// @see ttse_private_data_requested_cb() - int ttse_set_private_data_requested_cb( - ttse_private_data_requested_cb callback_func, - ) { - return _ttse_set_private_data_requested_cb( - callback_func, - ); - } - - late final _ttse_set_private_data_requested_cbPtr = _lookup< - ffi.NativeFunction>( - 'ttse_set_private_data_requested_cb'); - late final _ttse_set_private_data_requested_cb = - _ttse_set_private_data_requested_cbPtr - .asFunction(); - - /// @brief Initializes voice control. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks If the function succeeds, @a vc must be released with vc_deinitialize(). - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #VC_ERROR_OPERATION_FAILED Operation failure - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @post If this function is called, the state will be #VC_STATE_INITIALIZED. - /// @see vc_deinitialize() - int vc_initialize() { - return _vc_initialize(); - } - - late final _vc_initializePtr = - _lookup>('vc_initialize'); - late final _vc_initialize = _vc_initializePtr.asFunction(); - - /// @brief Deinitializes voice control. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_OPERATION_FAILED Operation failure - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @see vc_deinitialize() - int vc_deinitialize() { - return _vc_deinitialize(); - } - - late final _vc_deinitializePtr = - _lookup>('vc_deinitialize'); - late final _vc_deinitialize = - _vc_deinitializePtr.asFunction(); - - /// @brief Connects the voice control service. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_OPERATION_FAILED Operation failure - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_INITIALIZED. - /// @post If this function is called, the state will be #VC_STATE_READY. - /// @see vc_unprepare() - int vc_prepare() { - return _vc_prepare(); - } - - late final _vc_preparePtr = - _lookup>('vc_prepare'); - late final _vc_prepare = _vc_preparePtr.asFunction(); - - /// @brief Disconnects the voice control service. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_READY. - /// @post If this function is called, the state will be #VC_STATE_INITIALIZED. - /// @see vc_prepare() - int vc_unprepare() { - return _vc_unprepare(); - } - - late final _vc_unpreparePtr = - _lookup>('vc_unprepare'); - late final _vc_unprepare = _vc_unpreparePtr.asFunction(); - - /// @brief Retrieves all supported languages using callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] callback Callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_OPERATION_FAILED Operation failure - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_INITIALIZED or #VC_STATE_READY. - /// @post This function invokes vc_supported_language_cb() repeatedly for getting languages. - /// @see vc_supported_language_cb() - /// @see vc_get_current_language() - int vc_foreach_supported_languages( - vc_supported_language_cb callback, - ffi.Pointer user_data, - ) { - return _vc_foreach_supported_languages( - callback, - user_data, - ); - } - - late final _vc_foreach_supported_languagesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(vc_supported_language_cb, - ffi.Pointer)>>('vc_foreach_supported_languages'); - late final _vc_foreach_supported_languages = - _vc_foreach_supported_languagesPtr.asFunction< - int Function(vc_supported_language_cb, ffi.Pointer)>(); - - /// @brief Gets current language. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remark If the function succeeds, @a language must be released with free() by you when you no longer need it. - /// @param[out] language A language is specified as an ISO 3166 alpha-2 two letter country-code - /// followed by ISO 639-1 for the two-letter language code. - /// For example, "ko_KR" for Korean, "en_US" for American English - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #VC_ERROR_OPERATION_FAILED Operation failure - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_INITIALIZED or #VC_STATE_READY. - /// @see vc_foreach_supported_languages() - int vc_get_current_language( - ffi.Pointer> language, - ) { - return _vc_get_current_language( - language, - ); - } - - late final _vc_get_current_languagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>)>>('vc_get_current_language'); - late final _vc_get_current_language = _vc_get_current_languagePtr - .asFunction>)>(); - - /// @brief Gets current state of voice control client. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[out] state The current state - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @see vc_state_changed_cb() - /// @see vc_set_state_changed_cb() - int vc_get_state( - ffi.Pointer state, - ) { - return _vc_get_state( - state, - ); - } - - late final _vc_get_statePtr = - _lookup)>>( - 'vc_get_state'); - late final _vc_get_state = - _vc_get_statePtr.asFunction)>(); - - /// @brief Gets current state of voice control service. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[out] state The current state - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_READY. - /// @see vc_request_start() - /// @see vc_request_stop() - /// @see vc_request_cancel() - /// @see vc_set_service_state_changed_cb() - /// @see vc_unset_service_state_changed_cb() - int vc_get_service_state( - ffi.Pointer state, - ) { - return _vc_get_service_state( - state, - ); - } - - late final _vc_get_service_statePtr = - _lookup)>>( - 'vc_get_service_state'); - late final _vc_get_service_state = _vc_get_service_statePtr - .asFunction)>(); - - /// @brief Gets the system command list. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks In the system command list, there are system commands predefined by product manufacturers. Those commands have the highest priority. - /// Therefore, the user can not set any commands same with the system commands. - /// The @a vc_sys_cmd_list must be released using free() when it is no longer required. - /// @param[out] vc_sys_cmd_list System command list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The service state should be #VC_SERVICE_STATE_READY. - /// @see vc_unset_command_list() - int vc_get_system_command_list( - ffi.Pointer vc_sys_cmd_list, - ) { - return _vc_get_system_command_list( - vc_sys_cmd_list, - ); - } - - late final _vc_get_system_command_listPtr = - _lookup)>>( - 'vc_get_system_command_list'); - late final _vc_get_system_command_list = _vc_get_system_command_listPtr - .asFunction)>(); - - /// @brief Sets the invocation name. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks Invocation name is used to activate background commands. The invocation name can be the same as the application name or any other phrase. - /// For example, an application "Tizen Sample" has a background command, "Play music", and the invocation name of the application is set to "Tizen Sample". - /// In order to activate the background command, users can say "Tizen Sample, Play music". - /// The invocation name is dependent on the current language. For example, if the current language is "en_US"(English), the invocation name is also "en_US". - /// If the current language is "ja_JP"(Japanese) and the invocation name is "en_US", the invocation name will not be recognized. - /// This function should be called before vc_set_command_list(). - /// @param[in] name Invocation name that an application wants to be invoked by - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_READY. - /// @see vc_set_command_list() - int vc_set_invocation_name( - ffi.Pointer name, - ) { - return _vc_set_invocation_name( - name, - ); - } - - late final _vc_set_invocation_namePtr = - _lookup)>>( - 'vc_set_invocation_name'); - late final _vc_set_invocation_name = _vc_set_invocation_namePtr - .asFunction)>(); - - /// @brief Requests to start the dialogue. - /// @details Using this function, the developer can request starting the dialogue to the framework. - /// When the developer requests the dialogue, two types of texts, @a disp_text and @a utt_text, can be sent by this function. - /// @a disp_text is a text for displaying, and @a utt_text is that for uttering. - /// For example, if @a disp_text is "October 10th" and @a utt_text is "Today is October 10th.", "October 10th" will be displayed on the screen and "Today is October 10th." will be spoken. - /// Also, the developer can set whether the dialogue starts automatically or not, using @a auto_start. - /// If the developer sets @a auto_start as @c true, the framework will start to record next speech and continue the dialogue. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks If @a auto_start is @c true, the recognition will start again. In this case, it can be restarted up to 4 times. - /// @param[in] disp_text Text to be displayed on the screen - /// @param[in] utt_text Text to be spoken - /// @param[in] auto_start A variable for setting whether the dialog session will be restarted automatically or not - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The service state should be #VC_SERVICE_STATE_READY. - int vc_request_dialog( - ffi.Pointer disp_text, - ffi.Pointer utt_text, - bool auto_start, - ) { - return _vc_request_dialog( - disp_text, - utt_text, - auto_start, - ); - } - - late final _vc_request_dialogPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Bool)>>('vc_request_dialog'); - late final _vc_request_dialog = _vc_request_dialogPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, bool)>(); - - /// @brief Sets command list. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks The command type is valid for #VC_COMMAND_TYPE_FOREGROUND or #VC_COMMAND_TYPE_BACKGROUND. - /// The matched commands of command list should be set and they should include type and command text at least. - /// @param[in] vc_cmd_list Command list handle - /// @param[in] type Command type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_READY. - /// @see vc_unset_command_list() - int vc_set_command_list( - vc_cmd_list_h vc_cmd_list, - int type, - ) { - return _vc_set_command_list( - vc_cmd_list, - type, - ); - } - - late final _vc_set_command_listPtr = - _lookup>( - 'vc_set_command_list'); - late final _vc_set_command_list = - _vc_set_command_listPtr.asFunction(); - - /// @brief Unsets command list. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] type Command type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_READY. - /// @see vc_set_command_list() - int vc_unset_command_list( - int type, - ) { - return _vc_unset_command_list( - type, - ); - } - - late final _vc_unset_command_listPtr = - _lookup>( - 'vc_unset_command_list'); - late final _vc_unset_command_list = - _vc_unset_command_listPtr.asFunction(); - - /// @brief Gets the recognition result. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] callback Callback function to get recognition result - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_READY. - /// @see vc_result_cb() - int vc_get_result( - vc_result_cb callback, - ffi.Pointer user_data, - ) { - return _vc_get_result( - callback, - user_data, - ); - } - - late final _vc_get_resultPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - vc_result_cb, ffi.Pointer)>>('vc_get_result'); - late final _vc_get_result = _vc_get_resultPtr - .asFunction)>(); - - /// @brief Registers a callback function for getting recognition result. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] callback Callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_INITIALIZED. - /// @see vc_result_cb() - /// @see vc_unset_result_cb() - int vc_set_result_cb( - vc_result_cb callback, - ffi.Pointer user_data, - ) { - return _vc_set_result_cb( - callback, - user_data, - ); - } - - late final _vc_set_result_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - vc_result_cb, ffi.Pointer)>>('vc_set_result_cb'); - late final _vc_set_result_cb = _vc_set_result_cbPtr - .asFunction)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_INITIALIZED. - /// @see vc_set_result_cb() - int vc_unset_result_cb() { - return _vc_unset_result_cb(); - } - - late final _vc_unset_result_cbPtr = - _lookup>('vc_unset_result_cb'); - late final _vc_unset_result_cb = - _vc_unset_result_cbPtr.asFunction(); - - /// @brief Registers a callback function to be called when state is changed. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] callback Callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_INITIALIZED. - /// @see vc_service_state_changed_cb() - /// @see vc_unset_service_state_changed_cb() - int vc_set_service_state_changed_cb( - vc_service_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _vc_set_service_state_changed_cb( - callback, - user_data, - ); - } - - late final _vc_set_service_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(vc_service_state_changed_cb, - ffi.Pointer)>>('vc_set_service_state_changed_cb'); - late final _vc_set_service_state_changed_cb = - _vc_set_service_state_changed_cbPtr.asFunction< - int Function(vc_service_state_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_INITIALIZED. - /// @see vc_set_service_state_changed_cb() - int vc_unset_service_state_changed_cb() { - return _vc_unset_service_state_changed_cb(); - } - - late final _vc_unset_service_state_changed_cbPtr = - _lookup>( - 'vc_unset_service_state_changed_cb'); - late final _vc_unset_service_state_changed_cb = - _vc_unset_service_state_changed_cbPtr.asFunction(); - - /// @brief Registers a callback function to be called when state is changed. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] callback Callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_INITIALIZED. - /// @see vc_state_changed_cb() - /// @see vc_unset_state_changed_cb() - int vc_set_state_changed_cb( - vc_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _vc_set_state_changed_cb( - callback, - user_data, - ); - } - - late final _vc_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(vc_state_changed_cb, - ffi.Pointer)>>('vc_set_state_changed_cb'); - late final _vc_set_state_changed_cb = _vc_set_state_changed_cbPtr - .asFunction)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_INITIALIZED. - /// @see vc_set_state_changed_cb() - int vc_unset_state_changed_cb() { - return _vc_unset_state_changed_cb(); - } - - late final _vc_unset_state_changed_cbPtr = - _lookup>( - 'vc_unset_state_changed_cb'); - late final _vc_unset_state_changed_cb = - _vc_unset_state_changed_cbPtr.asFunction(); - - /// @brief Registers a callback function to be called when current language is changed. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] callback Callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_INITIALIZED. - /// @see vc_current_language_changed_cb() - /// @see vc_unset_current_language_changed_cb() - int vc_set_current_language_changed_cb( - vc_current_language_changed_cb callback, - ffi.Pointer user_data, - ) { - return _vc_set_current_language_changed_cb( - callback, - user_data, - ); - } - - late final _vc_set_current_language_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(vc_current_language_changed_cb, - ffi.Pointer)>>('vc_set_current_language_changed_cb'); - late final _vc_set_current_language_changed_cb = - _vc_set_current_language_changed_cbPtr.asFunction< - int Function( - vc_current_language_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_INITIALIZED. - /// @see vc_set_current_language_changed_cb() - int vc_unset_current_language_changed_cb() { - return _vc_unset_current_language_changed_cb(); - } - - late final _vc_unset_current_language_changed_cbPtr = - _lookup>( - 'vc_unset_current_language_changed_cb'); - late final _vc_unset_current_language_changed_cb = - _vc_unset_current_language_changed_cbPtr.asFunction(); - - /// @brief Registers a callback function to be called when an error occurred. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] callback Callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_INITIALIZED. - /// @see vc_error_cb() - /// @see vc_unset_error_cb() - int vc_set_error_cb( - vc_error_cb callback, - ffi.Pointer user_data, - ) { - return _vc_set_error_cb( - callback, - user_data, - ); - } - - late final _vc_set_error_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - vc_error_cb, ffi.Pointer)>>('vc_set_error_cb'); - late final _vc_set_error_cb = _vc_set_error_cbPtr - .asFunction)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_INITIALIZED. - /// @see vc_set_error_cb() - int vc_unset_error_cb() { - return _vc_unset_error_cb(); - } - - late final _vc_unset_error_cbPtr = - _lookup>('vc_unset_error_cb'); - late final _vc_unset_error_cb = - _vc_unset_error_cbPtr.asFunction(); -} - -/// @brief Enumeration for tizen errors. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class tizen_error_e { - /// < Successful - static const int TIZEN_ERROR_NONE = 0; - - /// < Operation not permitted - static const int TIZEN_ERROR_NOT_PERMITTED = -1; - - /// < No such file or directory - static const int TIZEN_ERROR_NO_SUCH_FILE = -2; - - /// < No such process - static const int TIZEN_ERROR_NO_SUCH_PROCESS = -3; - - /// < Interrupted system call - static const int TIZEN_ERROR_INTERRUPTED_SYS_CALL = -4; - - /// < I/O error - static const int TIZEN_ERROR_IO_ERROR = -5; - - /// < No such device or address - static const int TIZEN_ERROR_NO_SUCH_DEVICE = -6; - - /// < Argument list too long - static const int TIZEN_ERROR_ARGUMENT_LIST_TOO_LONG = -7; - - /// < Exec format error - static const int TIZEN_ERROR_EXEC_FORMAT_ERROR = -8; - - /// < Bad file number - static const int TIZEN_ERROR_BAD_FILE_NUMBER = -9; - - /// < Try again - static const int TIZEN_ERROR_TRY_AGAIN = -11; - - /// < Out of memory - static const int TIZEN_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied - static const int TIZEN_ERROR_PERMISSION_DENIED = -13; - - /// < Bad address - static const int TIZEN_ERROR_BAD_ADDRESS = -14; - - /// < Block device required - static const int TIZEN_ERROR_BLOCK_DEVICE_REQUIRED = -15; - - /// < Device or resource busy - static const int TIZEN_ERROR_RESOURCE_BUSY = -16; - - /// < File exists - static const int TIZEN_ERROR_FILE_EXISTS = -17; - - /// < Cross-device link - static const int TIZEN_ERROR_CROSS_DEVICE_LINK = -18; - - /// < Not a directory - static const int TIZEN_ERROR_NOT_A_DIRECTORY = -20; - - /// < Is a directory - static const int TIZEN_ERROR_IS_A_DIRECTORY = -21; - - /// < Invalid function parameter - static const int TIZEN_ERROR_INVALID_PARAMETER = -22; - - /// < File table overflow - static const int TIZEN_ERROR_FILE_TABLE_OVERFLOW = -23; - - /// < Too many open files - static const int TIZEN_ERROR_TOO_MANY_OPEN_FILES = -24; - - /// < Not a terminal - static const int TIZEN_ERROR_TOO_NOT_A_TERMINAL = -25; - - /// < Not a terminal - static const int TIZEN_ERROR_TOO_TEXT_FILE_BUSY = -26; - - /// < File too large - static const int TIZEN_ERROR_FILE_TOO_LARGE = -27; - - /// < No space left on device - static const int TIZEN_ERROR_FILE_NO_SPACE_ON_DEVICE = -28; - - /// < Illegal seek - static const int TIZEN_ERROR_ILLEGAL_SEEK = -29; - - /// < Read-only file system - static const int TIZEN_ERROR_READ_ONLY_FILESYSTEM = -30; - - /// < No data available - static const int TIZEN_ERROR_NO_DATA = -61; - - /// < Too many links - static const int TIZEN_ERROR_TOO_MANY_LINKS = -31; - - /// < Broken pipe - static const int TIZEN_ERROR_BROKEN_PIPE = -32; - - /// < Math argument out of domain of func - static const int TIZEN_ERROR_ARGUMENT_OUT_OF_DOMAIN = -33; - - /// < Math result not representable - static const int TIZEN_ERROR_RESULT_OUT_OF_RANGE = -34; - - /// < Resource deadlock would occur - static const int TIZEN_ERROR_WOULD_CAUSE_DEADLOCK = -35; - - /// < File name too long - static const int TIZEN_ERROR_FILE_NAME_TOO_LONG = -36; - - /// < No record locks available - static const int TIZEN_ERROR_FILE_NO_LOCKS_AVAILABLE = -37; - - /// < Function not implemented - static const int TIZEN_ERROR_INVALID_OPERATION = -38; - - /// < Directory not empty - static const int TIZEN_ERROR_DIR_NOT_EMPTY = -39; - - /// < Too many symbolic links encountered - static const int TIZEN_ERROR_TOO_MANY_SYMBOLIC_LINKS = -40; - - /// < Operation would block - static const int TIZEN_ERROR_WOULD_BLOCK = -11; - - /// < Accessing a corrupted shared library - static const int TIZEN_ERROR_CORRUPTED_SHARED_LIB = -80; - - /// < .lib section in a.out corrupted - static const int TIZEN_ERROR_LIB_SECTION_CORRUPTED = -81; - - /// < Attempting to link in too many shared libraries - static const int TIZEN_ERROR_LINK_TOO_MANY_SHARED_LIB = -82; - - /// < Cannot exec a shared library directly - static const int TIZEN_ERROR_SHARED_LIB_EXEC = -83; - - /// < Illegal byte sequence - static const int TIZEN_ERROR_ILLEGAL_BYTE_SEQ = -84; - - /// < Interrupted system call should be restarted - static const int TIZEN_ERROR_SYSTEM_CALL_RESTART = -85; - - /// < Streams pipe error - static const int TIZEN_ERROR_STREAMS_PIPE = -86; - - /// < Too many users - static const int TIZEN_ERROR_TOO_MANY_USERS = -87; - - /// < Socket operation on non-socket - static const int TIZEN_ERROR_NON_SOCKET = -88; - - /// < Destination address required - static const int TIZEN_ERROR_NO_DEST_ADDRESS = -89; - - /// < Message too long - static const int TIZEN_ERROR_MSG_TOO_LONG = -90; - - /// < Protocol wrong type for socket - static const int TIZEN_ERROR_PROTOCOL_WRONG_TYPE = -91; - - /// < Protocol not available - static const int TIZEN_ERROR_PROTOCOL_NOT_AVALIABLE = -92; - - /// < Protocol not supported - static const int TIZEN_ERROR_PROTOCOL_NOT_SUPPORTED = -93; - - /// < Socket type not supported - static const int TIZEN_ERROR_SOCKET_TYPE_NOT_SUPPORTED = -94; - - /// < Operation not supported on transport endpoint - static const int TIZEN_ERROR_ENDPOINT_OPERATIN_NOT_SUPPORTED = -95; - - /// < Protocol family not supported - static const int TIZEN_ERROR_PROTOCOL_FAMILY_NOT_SUPPORTED = -96; - - /// < Address family not supported by protocol - static const int TIZEN_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED = -97; - - /// < Address already in use - static const int TIZEN_ERROR_ADDRES_IN_USE = -98; - - /// < Cannot assign requested address - static const int TIZEN_ERROR_CANNOT_ASSIGN_ADDRESS = -99; - - /// < Network is down - static const int TIZEN_ERROR_NETWORK_DOWN = -100; - - /// < Network is unreachable - static const int TIZEN_ERROR_NETWORK_UNREACHABLE = -101; - - /// < Network dropped connection because of reset - static const int TIZEN_ERROR_NETWORK_RESET = -102; - - /// < Software caused connection abort - static const int TIZEN_ERROR_CONNECTION_ABORTED = -103; - - /// < Connection reset by peer - static const int TIZEN_ERROR_CONNECTION_RESET_BY_PEER = -104; - - /// < No buffer space available - static const int TIZEN_ERROR_BUFFER_SPACE = -105; - - /// < Transport endpoint is already connected - static const int TIZEN_ERROR_ENDPOINT_CONNECTED = -106; - - /// < Transport endpoint is not connected - static const int TIZEN_ERROR_ENDPOINT_NOT_CONNECTED = -107; - - /// < Cannot send after transport endpoint shutdown - static const int TIZEN_ERROR_ENDPOINT_SHUTDOWN = -108; - - /// < Too many references: cannot splice - static const int TIZEN_ERROR_TOO_MANY_REFERENCES = -109; - - /// < Connection timed out - static const int TIZEN_ERROR_CONNECTION_TIME_OUT = -110; - - /// < Connection refused - static const int TIZEN_ERROR_CONNECTION_REFUSED = -111; - - /// < Host is down - static const int TIZEN_ERROR_HOST_DOWN = -112; - - /// < No route to host - static const int TIZEN_ERROR_NO_ROUTE_TO_HOST = -113; - - /// < Operation already in progress - static const int TIZEN_ERROR_ALREADY_IN_PROGRESS = -114; - - /// < Operation now in progress - static const int TIZEN_ERROR_NOW_IN_PROGRESS = -115; - - /// < Stale NFS file handle - static const int TIZEN_ERROR_STALE_NFS_FILE_HANDLE = -116; - - /// < Structure needs cleaning - static const int TIZEN_ERROR_STRUCTURE_UNCLEAN = -117; - - /// < Not a XENIX named type file - static const int TIZEN_ERROR_NOT_XENIX_NAMED_TYPE_FILE = -118; - - /// < No XENIX semaphores available - static const int TIZEN_ERROR_NO_XENIX_SEMAPHORES_AVAILABLE = -119; - - /// < Is a named type file - static const int TIZEN_ERROR_IS_NAMED_TYPE_FILE = -120; - - /// < Remote I/O error - static const int TIZEN_ERROR_REMOTE_IO = -121; - - /// < Quota exceeded - static const int TIZEN_ERROR_QUOTA_EXCEEDED = -122; - - /// < No medium found - static const int TIZEN_ERROR_NO_MEDIUM = -123; - - /// < Wrong medium type - static const int TIZEN_ERROR_WRONG_MEDIUM_TYPE = -124; - - /// < Operation Canceled - static const int TIZEN_ERROR_CANCELED = -125; - - /// < Required key not available - static const int TIZEN_ERROR_KEY_NOT_AVAILABLE = -126; - - /// < Key has expired - static const int TIZEN_ERROR_KEY_EXPIRED = -127; - - /// < Key has been revoked - static const int TIZEN_ERROR_KEY_REVOKED = -128; - - /// < Key was rejected by service - static const int TIZEN_ERROR_KEY_REJECTED = -129; - - /// < Owner died (for robust mutexes) - static const int TIZEN_ERROR_OWNER_DEAD = -130; - - /// < Unknown error - static const int TIZEN_ERROR_UNKNOWN = -1073741824; - - /// < Time out - static const int TIZEN_ERROR_TIMED_OUT = -1073741823; - - /// < Not supported - static const int TIZEN_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Not Consented - static const int TIZEN_ERROR_USER_NOT_CONSENTED = -1073741821; - - /// < Restriction by Device Policy - static const int TIZEN_ERROR_DEVICE_POLICY_RESTRICTION = -1073741820; - static const int TIZEN_ERROR_END_OF_COLLECTION = -1073741819; -} - -final class _bundle_t extends ffi.Opaque {} - -final class app_control_s extends ffi.Opaque {} - -/// @brief Enumeration for the application control error. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class app_control_error_e { - /// < Successful - static const int APP_CONTROL_ERROR_NONE = 0; - - /// < Invalid parameter - static const int APP_CONTROL_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int APP_CONTROL_ERROR_OUT_OF_MEMORY = -12; - - /// < The application is not found - static const int APP_CONTROL_ERROR_APP_NOT_FOUND = -17825759; - - /// < Specified key is not found - static const int APP_CONTROL_ERROR_KEY_NOT_FOUND = -126; - - /// < Key is not available - static const int APP_CONTROL_ERROR_KEY_REJECTED = -129; - - /// < Invalid data type - static const int APP_CONTROL_ERROR_INVALID_DATA_TYPE = -17825758; - - /// < The application cannot be launched now - static const int APP_CONTROL_ERROR_LAUNCH_REJECTED = -17825757; - - /// < Permission denied - static const int APP_CONTROL_ERROR_PERMISSION_DENIED = -13; - - /// < Internal launch error - static const int APP_CONTROL_ERROR_LAUNCH_FAILED = -17825756; - - /// < Time out - static const int APP_CONTROL_ERROR_TIMED_OUT = -1073741823; - - /// < IO error - static const int APP_CONTROL_ERROR_IO_ERROR = -5; -} - -/// @brief Enumeration for the application control result. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @see app_control_enable_app_started_result_event() -abstract class app_control_result_e { - /// < Callee application launched actually (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int APP_CONTROL_RESULT_APP_STARTED = 1; - - /// < Operation succeeded - static const int APP_CONTROL_RESULT_SUCCEEDED = 0; - - /// < Operation failed by the callee - static const int APP_CONTROL_RESULT_FAILED = -1; - - /// < Operation canceled by the platform - static const int APP_CONTROL_RESULT_CANCELED = -2; -} - -/// @brief Enumeration for the application control launch mode. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class app_control_launch_mode_e { - /// < Prefer to launch an application as single mode - static const int APP_CONTROL_LAUNCH_MODE_SINGLE = 0; - - /// < Prefer to launch an application as group mode - static const int APP_CONTROL_LAUNCH_MODE_GROUP = 1; -} - -/// @brief The application control handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef app_control_h = ffi.Pointer; - -/// @brief Called to retrieve the extra data contained in the app_control. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks The @a key must not be deallocated by the application. -/// @param[in] app_control The app_control handle -/// @param[in] key The key of the value contained in the app_control -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @pre app_control_foreach_extra_data() will invoke this callback. -/// @see app_control_foreach_extra_data() -typedef app_control_extra_data_cb - = ffi.Pointer>; -typedef app_control_extra_data_cbFunction = ffi.Bool Function( - app_control_h app_control, - ffi.Pointer key, - ffi.Pointer user_data); -typedef Dartapp_control_extra_data_cbFunction = bool Function( - app_control_h app_control, - ffi.Pointer key, - ffi.Pointer user_data); - -/// @brief Called once for each matched application that can be launched to handle the given app_control request. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] app_control The app_control handle -/// @param[in] package The package name of the application that can handle the launch request of the given app_control -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @pre app_control_foreach_app_matched() will invoke this callback. -/// @see app_control_foreach_app_matched() -typedef app_control_app_matched_cb - = ffi.Pointer>; -typedef app_control_app_matched_cbFunction = ffi.Bool Function( - app_control_h app_control, - ffi.Pointer appid, - ffi.Pointer user_data); -typedef Dartapp_control_app_matched_cbFunction = bool Function( - app_control_h app_control, - ffi.Pointer appid, - ffi.Pointer user_data); - -/// @brief Called when the reply of the launch request is delivered. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks The @a request and @a reply must not be deallocated by the application. -/// @param[in] request The app_control handle of the launch request that has been sent -/// @param[in] reply The app_control handle in which the results of the callee are contained -/// @param[in] result The result code of the launch request -/// @param[in] user_data The user data passed from the callback registration function -/// @pre When the callee replies to the launch request, this callback will be invoked. -/// @pre Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, if #APP_CONTROL_RESULT_APP_STARTED event is enabled, -/// this callback will also be invoked when the callee application actually launched. -/// @see app_control_send_launch_request() -/// @see app_control_reply_to_launch_request() -/// @see app_control_enable_app_started_result_event() -/// @see #APP_CONTROL_RESULT_APP_STARTED -typedef app_control_reply_cb - = ffi.Pointer>; -typedef app_control_reply_cbFunction = ffi.Void Function(app_control_h request, - app_control_h reply, ffi.Int32 result, ffi.Pointer user_data); -typedef Dartapp_control_reply_cbFunction = void Function(app_control_h request, - app_control_h reply, int result, ffi.Pointer user_data); - -/// @brief Enumeration for application error. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class app_error_e { - /// < Successful - static const int APP_ERROR_NONE = 0; - - /// < Invalid parameter - static const int APP_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int APP_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid application context - static const int APP_ERROR_INVALID_CONTEXT = -17825791; - - /// < No such file or directory - static const int APP_ERROR_NO_SUCH_FILE = -2; - - /// < Not supported (Since 4.0) - static const int APP_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Application is already running - static const int APP_ERROR_ALREADY_RUNNING = -114; - - /// < Permission denied @if MOBILE (Since 2.3.1) @endif - static const int APP_ERROR_PERMISSION_DENIED = -13; -} - -/// @brief Enumeration for system events. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class app_event_type_e { - /// < The low memory event - static const int APP_EVENT_LOW_MEMORY = 0; - - /// < The low battery event - static const int APP_EVENT_LOW_BATTERY = 1; - - /// < The system language changed event - static const int APP_EVENT_LANGUAGE_CHANGED = 2; - - /// < The device orientation changed event - static const int APP_EVENT_DEVICE_ORIENTATION_CHANGED = 3; - - /// < The region format changed event - static const int APP_EVENT_REGION_FORMAT_CHANGED = 4; - - /// < The suspended state changed event of the application (since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - /// @see app_event_get_suspended_state - static const int APP_EVENT_SUSPENDED_STATE_CHANGED = 5; - - /// < The update requested event (Since 3.0) - /// This event can occur when an app needs to be updated. - /// It is dependent on target devices. - static const int APP_EVENT_UPDATE_REQUESTED = 6; -} - -/// @brief Enumeration for device orientation. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class app_device_orientation_e { - /// < The device is oriented in a natural position - static const int APP_DEVICE_ORIENTATION_0 = 0; - - /// < The device's left side is at the top - static const int APP_DEVICE_ORIENTATION_90 = 90; - - /// < The device is upside down - static const int APP_DEVICE_ORIENTATION_180 = 180; - - /// < The device's right side is at the top - static const int APP_DEVICE_ORIENTATION_270 = 270; -} - -/// @brief Enumeration for low memory status. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class app_event_low_memory_status_e { - /// < Normal status - static const int APP_EVENT_LOW_MEMORY_NORMAL = 1; - - /// < Soft warning status - static const int APP_EVENT_LOW_MEMORY_SOFT_WARNING = 2; - - /// < Hard warning status - static const int APP_EVENT_LOW_MEMORY_HARD_WARNING = 4; -} - -/// @brief Enumeration for battery status. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class app_event_low_battery_status_e { - /// < The battery status is under 1% - static const int APP_EVENT_LOW_BATTERY_POWER_OFF = 1; - - /// < The battery status is under 5% - static const int APP_EVENT_LOW_BATTERY_CRITICAL_LOW = 2; -} - -/// @brief Enumeration for suspended state. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class app_suspended_state_e { - /// < Application will enter the suspended state - static const int APP_SUSPENDED_STATE_WILL_ENTER = 0; - - /// < Application did exit from the suspended state - static const int APP_SUSPENDED_STATE_DID_EXIT = 1; -} - -final class app_event_handler extends ffi.Opaque {} - -final class app_event_info extends ffi.Opaque {} - -/// @brief The system event information handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @see app_event_get_low_memory_status -/// @see app_event_get_low_battery_status -/// @see app_event_get_language -/// @see app_event_get_region_format -/// @see app_event_get_device_orientation -/// @see app_event_get_suspended_state -typedef app_event_info_h = ffi.Pointer; - -/// @brief The structure type containing the set of callback functions for handling application lifecycle events. -/// @details It is one of the input parameters of the ui_app_main() function. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @see ui_app_main() -/// @see app_create_cb() -/// @see app_pause_cb() -/// @see app_resume_cb() -/// @see app_terminate_cb() -/// @see app_control_cb() -final class ui_app_lifecycle_callback_s extends ffi.Struct { - /// < This callback function is called at the start of the application. - external app_create_cb create; - - /// < This callback function is called once after the main loop of the application exits. - external app_terminate_cb terminate; - - /// < This callback function is called each time the application is completely obscured by another application and becomes invisible to the user. - external app_pause_cb pause; - - /// < This callback function is called each time the application becomes visible to the user. - external app_resume_cb resume; - - /// < This callback function is called when another application sends the launch request to the application. - external app_control_cb app_control; -} - -/// @brief Called when the application starts. -/// @details The callback function is called before the main loop of the application starts. -/// In this callback, you can initialize application resources like window creation, data structure, and so on. -/// After this callback function returns @c true, the main loop starts up and app_control_cb() is subsequently called. -/// If this callback function returns @c false, the main loop doesn't start and app_terminate_cb() is subsequently called. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] user_data The user data passed from the callback registration function -/// @return @c true on success, -/// otherwise @c false -/// @pre ui_app_main() will invoke this callback function. -/// @see ui_app_main() -/// @see #ui_app_lifecycle_callback_s -typedef app_create_cb = ffi.Pointer>; -typedef app_create_cbFunction = ffi.Bool Function( - ffi.Pointer user_data); -typedef Dartapp_create_cbFunction = bool Function( - ffi.Pointer user_data); - -/// @brief Called when the application's main loop exits. -/// @details You should release the application's resources in this function. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] user_data The user data passed from the callback registration function -/// @see ui_app_main() -/// @see #ui_app_lifecycle_callback_s -typedef app_terminate_cb - = ffi.Pointer>; -typedef app_terminate_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartapp_terminate_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Called when the application is completely obscured by another application and becomes invisible. -/// @details The application is not terminated and still running in the paused state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] user_data The user data passed from the callback registration function -/// @see ui_app_main() -/// @see #ui_app_lifecycle_callback_s -typedef app_pause_cb = ffi.Pointer>; -typedef app_pause_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartapp_pause_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Called when the application becomes visible. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] user_data The user data passed from the callback registration function -/// @see ui_app_main() -/// @see #ui_app_lifecycle_callback_s -typedef app_resume_cb = ffi.Pointer>; -typedef app_resume_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartapp_resume_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Called when another application sends a launch request to the application. -/// @details When the application is launched, this callback function is called after the main loop of the application starts up. -/// The passed app_control handle describes the launch request and contains the information about why the application is launched. -/// If the launch request is sent to the application in the running or pause state, -/// this callback function can be called again to notify that the application has been asked to launch. -/// The application could be explicitly launched by the user from the application launcher or be launched to perform the specific operation by another application. -/// The application is responsible for handling each launch request and responding appropriately. -/// Using the App Control API, the application can get information about what is to be performed. -/// If the application is launched from the application launcher or explicitly launched by another application, -/// the passed app_control handle may include only the default operation (#APP_CONTROL_OPERATION_DEFAULT) without any data. -/// For more information, see The @ref CAPI_APP_CONTROL_MODULE API description. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks After this callback returns, the handle of the app_control is freed. -/// Therefore, if you want to use the handle after returning this callback, you MUST copy it by using app_control_clone() API. -/// @param[in] app_control The handle to the app_control -/// @param[in] user_data The user data passed from the callback registration function -/// @see ui_app_main() -/// @see #ui_app_lifecycle_callback_s -/// @see @ref CAPI_APP_CONTROL_MODULE API -typedef app_control_cb - = ffi.Pointer>; -typedef app_control_cbFunction = ffi.Void Function( - app_control_h app_control, ffi.Pointer user_data); -typedef Dartapp_control_cbFunction = void Function( - app_control_h app_control, ffi.Pointer user_data); - -/// @brief The event handler that returned from add event handler function to handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @see app_event_type_e -/// @see app_add_event_handler -/// @see app_remove_event_handler -/// @see app_event_info_h -typedef app_event_handler_h = ffi.Pointer; - -/// @brief The system event callback function. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] event_info The system event information -/// @param[in] user_data The user data passed from the add event handler function -/// @see app_add_event_handler -/// @see app_event_info_h -/// @remarks If the given @a event_info has #APP_SUSPENDED_STATE_WILL_ENTER value, -/// the application should not call any asynchronous operations in this callback. -/// After the callback returns, process of the application will be changed to suspended -/// state immediately. Thus, asynchronous operations may work incorrectly. (since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) -typedef app_event_cb = ffi.Pointer>; -typedef app_event_cbFunction = ffi.Void Function( - app_event_info_h event_info, ffi.Pointer user_data); -typedef Dartapp_event_cbFunction = void Function( - app_event_info_h event_info, ffi.Pointer user_data); - -/// @brief Enumeration for error codes of Bundle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class bundle_error_e { - /// < Successful - static const int BUNDLE_ERROR_NONE = 0; - - /// < Out of memory - static const int BUNDLE_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int BUNDLE_ERROR_INVALID_PARAMETER = -22; - - /// < Required key not available - static const int BUNDLE_ERROR_KEY_NOT_AVAILABLE = -126; - - /// < Key exists - static const int BUNDLE_ERROR_KEY_EXISTS = -18350079; -} - -/// @brief Enumeration for key-value pair types. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class bundle_type_property { - /// < Array type - static const int BUNDLE_TYPE_ARRAY = 256; - - /// < Primitive type - static const int BUNDLE_TYPE_PRIMITIVE = 512; - - /// < Measurable type - static const int BUNDLE_TYPE_MEASURABLE = 1024; -} - -/// @brief Enumeration for bundle types. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class bundle_type { - /// < None - static const int BUNDLE_TYPE_NONE = -1; - - /// < Any type - static const int BUNDLE_TYPE_ANY = 0; - - /// < String type (Default) - static const int BUNDLE_TYPE_STR = 1025; - - /// < String array type - static const int BUNDLE_TYPE_STR_ARRAY = 1281; - - /// < Byte type - static const int BUNDLE_TYPE_BYTE = 2; - - /// < Byte array type - static const int BUNDLE_TYPE_BYTE_ARRAY = 258; -} - -final class keyval_t extends ffi.Opaque {} - -/// @brief The bundle handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef bundle = _bundle_t; - -/// @brief Called for every key-value pair. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @see bundle_foreach() -typedef bundle_iterator_t - = ffi.Pointer>; -typedef bundle_iterator_tFunction = ffi.Void Function( - ffi.Pointer key, - ffi.Int type, - ffi.Pointer kv, - ffi.Pointer user_data); -typedef Dartbundle_iterator_tFunction = void Function(ffi.Pointer key, - int type, ffi.Pointer kv, ffi.Pointer user_data); - -/// @brief The key-value pair handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @see bundle_iterator_t -typedef bundle_keyval_t = keyval_t; - -/// @brief The encoded data type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @see bundle_encode() -/// @see bundle_decode() -typedef bundle_raw = ffi.UnsignedChar; -typedef Dartbundle_raw = int; - -/// @brief Enumeration for notification errors. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_error { - /// < Success - static const int NOTIFICATION_ERROR_NONE = 0; - - /// < Invalid parameter - static const int NOTIFICATION_ERROR_INVALID_PARAMETER = -22; - - /// < out of memory - static const int NOTIFICATION_ERROR_OUT_OF_MEMORY = -12; - - /// < I/O error - static const int NOTIFICATION_ERROR_IO_ERROR = -5; - - /// < Permission denied - static const int NOTIFICATION_ERROR_PERMISSION_DENIED = -13; - - /// < Function not implemented (@b Since: @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int NOTIFICATION_ERROR_INVALID_OPERATION = -38; - - /// < Error from DB query - static const int NOTIFICATION_ERROR_FROM_DB = -18087935; - - /// < Already exist private ID - static const int NOTIFICATION_ERROR_ALREADY_EXIST_ID = -18087934; - - /// < Error from DBus - static const int NOTIFICATION_ERROR_FROM_DBUS = -18087933; - - /// < Not exist private ID - static const int NOTIFICATION_ERROR_NOT_EXIST_ID = -18087932; - - /// < No response from notification service - static const int NOTIFICATION_ERROR_SERVICE_NOT_READY = -18087931; - - /// < Max notification count exceeded (@b Since: 3.0) - static const int NOTIFICATION_ERROR_MAX_EXCEEDED = -18087930; -} - -/// @brief Enumeration for notification layout type. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_ly_type { - /// < Default - static const int NOTIFICATION_LY_NONE = 0; - - /// < Layout for notification. Used to inform single event - static const int NOTIFICATION_LY_NOTI_EVENT_SINGLE = 1; - - /// < Layout for notification. Used to inform multiple event - static const int NOTIFICATION_LY_NOTI_EVENT_MULTIPLE = 2; - - /// < Layout for notification. Used to display images - static const int NOTIFICATION_LY_NOTI_THUMBNAIL = 3; - - /// < Layout for ongoing notification. Used to display text message. - /// notifications with NOTIFICATION_LY_ONGOING_EVENT can not be protected from - /// removing by user since tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - static const int NOTIFICATION_LY_ONGOING_EVENT = 4; - - /// < Layout for ongoing notification. Used to display progress - static const int NOTIFICATION_LY_ONGOING_PROGRESS = 5; - - /// < Layout for extended notification (Since 4.0) - static const int NOTIFICATION_LY_EXTENSION = 6; -} - -/// @brief Enumeration for notification lauch option type. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_launch_option_type { - static const int NOTIFICATION_LAUNCH_OPTION_APP_CONTROL = 1; -} - -/// @brief Enumeration for event type on notification. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class notification_event_type { - /// < Event type : Click on button 1 - static const int NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_1 = 0; - - /// < Event type : Click on button 2 - static const int NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_2 = 1; - - /// < Event type : Click on button 3 - static const int NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_3 = 2; - - /// < Event type : Click on button 4 - static const int NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_4 = 3; - - /// < Event type : Click on button 5 - static const int NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_5 = 4; - - /// < Event type : Click on button 6 - static const int NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_6 = 5; - - /// < Event type : Click on icon - static const int NOTIFICATION_EVENT_TYPE_CLICK_ON_ICON = 6; - - /// < Event type : Click on thumbnail - static const int NOTIFICATION_EVENT_TYPE_CLICK_ON_THUMBNAIL = 7; - - /// < Event type : Click on text_input button(Since 3.0) - static const int NOTIFICATION_EVENT_TYPE_CLICK_ON_TEXT_INPUT_BUTTON = 8; -} - -/// @brief Enumeration for notification sound type. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_sound_type { - /// < Default value. no sound - static const int NOTIFICATION_SOUND_TYPE_NONE = -1; - - /// < Default sound - static const int NOTIFICATION_SOUND_TYPE_DEFAULT = 0; - - /// < User sound data - static const int NOTIFICATION_SOUND_TYPE_USER_DATA = 1; -} - -/// @brief Enumeration for notification vibration type. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_vibration_type { - /// < Default value. No vibration - static const int NOTIFICATION_VIBRATION_TYPE_NONE = -1; - - /// < Default vibrate pattern - static const int NOTIFICATION_VIBRATION_TYPE_DEFAULT = 0; - - /// < User vibration data - static const int NOTIFICATION_VIBRATION_TYPE_USER_DATA = 1; -} - -/// @brief Enumeration for notification LED operation. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_led_op { - /// < Default value. Disable the LED notification - static const int NOTIFICATION_LED_OP_OFF = -1; - - /// < Turn on the LED with default color - static const int NOTIFICATION_LED_OP_ON = 0; - - /// < Turn on the LED with custom color - static const int NOTIFICATION_LED_OP_ON_CUSTOM_COLOR = 1; -} - -/// @deprecated Deprecated since 2.3.1 -/// @brief Enumeration for setting display type of count. -/// @since_tizen 2.3 -abstract class notification_count_display_type { - static const int NOTIFICATION_COUNT_DISPLAY_TYPE_NONE = -1; - - /// < The number is placed to left - static const int NOTIFICATION_COUNT_DISPLAY_TYPE_LEFT = 0; - - /// < The number is placed to center - static const int NOTIFICATION_COUNT_DISPLAY_TYPE_IN = 1; - - /// < The number is placed to right - static const int NOTIFICATION_COUNT_DISPLAY_TYPE_RIGHT = 2; -} - -/// @brief Enumeration for button. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class notification_button_index { - /// < button 1 - static const int NOTIFICATION_BUTTON_1 = 1; - - /// < button 2 - static const int NOTIFICATION_BUTTON_2 = 2; - - /// < button 3 - static const int NOTIFICATION_BUTTON_3 = 3; - - /// < button 4 - static const int NOTIFICATION_BUTTON_4 = 4; - - /// < button 5 - static const int NOTIFICATION_BUTTON_5 = 5; - - /// < button 6 - static const int NOTIFICATION_BUTTON_6 = 6; -} - -/// @brief Enumeration for notification text type. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_text_type { - static const int NOTIFICATION_TEXT_TYPE_NONE = -1; - - /// < Title - static const int NOTIFICATION_TEXT_TYPE_TITLE = 0; - - /// < Content - static const int NOTIFICATION_TEXT_TYPE_CONTENT = 1; - - /// < Content for content display option is off of the Settings - static const int NOTIFICATION_TEXT_TYPE_CONTENT_FOR_DISPLAY_OPTION_IS_OFF = 2; - - /// < Text to display event count - static const int NOTIFICATION_TEXT_TYPE_EVENT_COUNT = 3; - - /// < Box contents 1 - static const int NOTIFICATION_TEXT_TYPE_INFO_1 = 4; - - /// < Box contents 1-1 - static const int NOTIFICATION_TEXT_TYPE_INFO_SUB_1 = 5; - - /// < Box contents 2 - static const int NOTIFICATION_TEXT_TYPE_INFO_2 = 6; - - /// < Box contents 2-1 - static const int NOTIFICATION_TEXT_TYPE_INFO_SUB_2 = 7; - - /// < Box contents 3 - static const int NOTIFICATION_TEXT_TYPE_INFO_3 = 8; - - /// < Box contents 3-1 - static const int NOTIFICATION_TEXT_TYPE_INFO_SUB_3 = 9; - - /// < Group title - static const int NOTIFICATION_TEXT_TYPE_GROUP_TITLE = 10; - - /// < Group content - static const int NOTIFICATION_TEXT_TYPE_GROUP_CONTENT = 11; - - /// < Group content for content display option is off of the Settings - static const int - NOTIFICATION_TEXT_TYPE_GROUP_CONTENT_FOR_DISPLAY_OPTION_IS_OFF = 12; - - /// < Text on button 1 - static const int NOTIFICATION_TEXT_TYPE_BUTTON_1 = 13; - - /// < Text on button 2 - static const int NOTIFICATION_TEXT_TYPE_BUTTON_2 = 14; - - /// < Text on button 3 - static const int NOTIFICATION_TEXT_TYPE_BUTTON_3 = 15; - - /// < Text on button 4 - static const int NOTIFICATION_TEXT_TYPE_BUTTON_4 = 16; - - /// < Text on button 5 - static const int NOTIFICATION_TEXT_TYPE_BUTTON_5 = 17; - - /// < Text on button 6 - static const int NOTIFICATION_TEXT_TYPE_BUTTON_6 = 18; - - /// < Guide text on the message reply box(Since 3.0) - static const int NOTIFICATION_TEXT_TYPE_TEXT_INPUT_PLACEHOLDER = 19; - - /// < Text on button the on message reply box(Since 3.0) - static const int NOTIFICATION_TEXT_TYPE_TEXT_INPUT_BUTTON = 20; - - /// < Content for extended notification (Since 4.0) - static const int NOTIFICATION_TEXT_TYPE_CONTENT_EXTENSION = 21; -} - -/// @brief Enumeration for image type. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_image_type { - static const int NOTIFICATION_IMAGE_TYPE_NONE = -1; - - /// < Icon - static const int NOTIFICATION_IMAGE_TYPE_ICON = 0; - - /// < Indicator icon - static const int NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR = 1; - - /// < Lock screen icon - static const int NOTIFICATION_IMAGE_TYPE_ICON_FOR_LOCK = 2; - - /// < Thumbnail - static const int NOTIFICATION_IMAGE_TYPE_THUMBNAIL = 3; - - /// < Lock screen thumbnail - static const int NOTIFICATION_IMAGE_TYPE_THUMBNAIL_FOR_LOCK = 4; - - /// < Icon - static const int NOTIFICATION_IMAGE_TYPE_ICON_SUB = 5; - - /// < image displayed on background - static const int NOTIFICATION_IMAGE_TYPE_BACKGROUND = 6; - - /// < Image for thumbnail list - static const int NOTIFICATION_IMAGE_TYPE_LIST_1 = 7; - - /// < Image for thumbnail list - static const int NOTIFICATION_IMAGE_TYPE_LIST_2 = 8; - - /// < Image for thumbnail list - static const int NOTIFICATION_IMAGE_TYPE_LIST_3 = 9; - - /// < Image for thumbnail list - static const int NOTIFICATION_IMAGE_TYPE_LIST_4 = 10; - - /// < Image for thumbnail list - static const int NOTIFICATION_IMAGE_TYPE_LIST_5 = 11; - - /// < Image for button 1 - static const int NOTIFICATION_IMAGE_TYPE_BUTTON_1 = 12; - - /// < Image for button 2 - static const int NOTIFICATION_IMAGE_TYPE_BUTTON_2 = 13; - - /// < Image for button 3 - static const int NOTIFICATION_IMAGE_TYPE_BUTTON_3 = 14; - - /// < Image for button 4 - static const int NOTIFICATION_IMAGE_TYPE_BUTTON_4 = 15; - - /// < Image for button 5 - static const int NOTIFICATION_IMAGE_TYPE_BUTTON_5 = 16; - - /// < Image for button 6 - static const int NOTIFICATION_IMAGE_TYPE_BUTTON_6 = 17; - - /// < Image for message reply(Since 3.0) - static const int NOTIFICATION_IMAGE_TYPE_TEXT_INPUT_BUTTON = 18; - - /// < Image for extended notification (Since 4.0) - static const int NOTIFICATION_IMAGE_TYPE_EXTENSION = 19; -} - -/// @brief Enumeration for application execution type. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_execute_type { - /// < No operation - static const int NOTIFICATION_EXECUTE_TYPE_NONE = -1; - - /// < Responding action - static const int NOTIFICATION_EXECUTE_TYPE_RESPONDING = 0; - - /// < Launching when notification data is single - static const int NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH = 1; - - /// < Launching when notification data is grouping(multi) - static const int NOTIFICATION_EXECUTE_TYPE_MULTI_LAUNCH = 2; -} - -/// @brief Enumeration for notification type. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_type { - /// < None - static const int NOTIFICATION_TYPE_NONE = -1; - - /// < Notification type - static const int NOTIFICATION_TYPE_NOTI = 0; - - /// < Ongoing type - static const int NOTIFICATION_TYPE_ONGOING = 1; -} - -/// @brief Enumeration for Group ID. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_group_id { - /// < Not Grouping - static const int NOTIFICATION_GROUP_ID_NONE = -1; - - /// < Notification that has same title is grouping - static const int NOTIFICATION_GROUP_ID_DEFAULT = 0; -} - -/// @brief Enumeration for Private ID. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_priv_id { - /// < Internally set priv_id - static const int NOTIFICATION_PRIV_ID_NONE = -1; -} - -/// @brief Enumeration for notification property. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_property { - /// < Display only SIM card inserted - static const int NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE = 1; - - /// < Disable application launch when it selected - static const int NOTIFICATION_PROP_DISABLE_APP_LAUNCH = 2; - - /// < Disable auto delete when it selected - static const int NOTIFICATION_PROP_DISABLE_AUTO_DELETE = 4; - - /// < Notification Tray should launch application using appsvc API (Deprecated since 2.3.1) - static const int NOTIFICATION_PROP_LAUNCH_UG = 8; - - /// < Use notification_set_display_applist API (Deprecated since 2.3.1) - static const int NOTIFICATION_PROP_DISABLE_TICKERNOTI = 16; - - /// < The notification will not be removed (Deprecated since 2.3.1) - static const int NOTIFICATION_PROP_PERMANENT_DISPLAY = 32; - - /// < Disable update when it inserted. - static const int NOTIFICATION_PROP_DISABLE_UPDATE_ON_INSERT = 64; - - /// < Disable update when it deleted. - static const int NOTIFICATION_PROP_DISABLE_UPDATE_ON_DELETE = 128; - - /// < Deleted when device is rebooted eventhough NOTIFICATION_TYPE_NOTI type - static const int NOTIFICATION_PROP_VOLATILE_DISPLAY = 256; -} - -/// @brief Enumeration for display application list. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_display_applist { - /// < Notification Tray(Quickpanel) - static const int NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY = 1; - - /// < Ticker notification - static const int NOTIFICATION_DISPLAY_APP_TICKER = 2; - - /// < Lock screen - static const int NOTIFICATION_DISPLAY_APP_LOCK = 4; - - /// < Indicator - static const int NOTIFICATION_DISPLAY_APP_INDICATOR = 8; - - /// < Active notification - static const int NOTIFICATION_DISPLAY_APP_ACTIVE = 16; - - /// < All display application except active notification - static const int NOTIFICATION_DISPLAY_APP_ALL = 15; -} - -/// @brief Enumeration for notification operation code. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_op_type { - /// < Default - static const int NOTIFICATION_OP_NONE = 0; - - /// < Notification inserted - static const int NOTIFICATION_OP_INSERT = 1; - - /// < Notification updated - static const int NOTIFICATION_OP_UPDATE = 2; - - /// < Notification deleted - static const int NOTIFICATION_OP_DELETE = 3; - - /// < Notifications deleted - static const int NOTIFICATION_OP_DELETE_ALL = 4; - - /// < (Deprecated Since 2.3.1) - static const int NOTIFICATION_OP_REFRESH = 5; - - /// < Notification service is ready - static const int NOTIFICATION_OP_SERVICE_READY = 6; -} - -/// @brief Enumeration for notification operation data code. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_op_data_type { - /// < Default - static const int NOTIFICATION_OP_DATA_MIN = 0; - - /// < Operation type - static const int NOTIFICATION_OP_DATA_TYPE = 1; - - /// < Private ID - static const int NOTIFICATION_OP_DATA_PRIV_ID = 2; - - /// < Notification handler - static const int NOTIFICATION_OP_DATA_NOTI = 3; - - /// < Reserved - static const int NOTIFICATION_OP_DATA_EXTRA_INFO_1 = 4; - - /// < Reserved - static const int NOTIFICATION_OP_DATA_EXTRA_INFO_2 = 5; -} - -/// @brief Enumeration for notification count position in the text. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notifcation_count_pos_type { - /// < Count data is not displaying in the text - static const int NOTIFICATION_COUNT_POS_NONE = -1; - - /// < Count data is displaying at the left of the text - static const int NOTIFICATION_COUNT_POS_LEFT = 0; - - /// < Count data is displaying in the text - static const int NOTIFICATION_COUNT_POS_IN = 1; - - /// < Count data is displaying at the right of the text - static const int NOTIFICATION_COUNT_POS_RIGHT = 2; -} - -/// @brief Enumeration for notification variable parameter type. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_variable_type { - /// < Variable parameter type is NONE - static const int NOTIFICATION_VARIABLE_TYPE_NONE = -1; - - /// < Variable parameter type is int - static const int NOTIFICATION_VARIABLE_TYPE_INT = 0; - - /// < Variable parameter type is double - static const int NOTIFICATION_VARIABLE_TYPE_DOUBLE = 1; - - /// < Variable parameter type is string - static const int NOTIFICATION_VARIABLE_TYPE_STRING = 2; - - /// < Variable parameter type is count - static const int NOTIFICATION_VARIABLE_TYPE_COUNT = 3; -} - -final class _notification extends ffi.Opaque {} - -/// @brief The structure for notification operation. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -final class _notification_op extends ffi.Struct { - /// < Notification operation type - @ffi.Int32() - external int type; - - /// < private ID - @ffi.Int() - external int priv_id; - - /// < Reserved - @ffi.Int() - external int extra_info_1; - - /// < Reserved - @ffi.Int() - external int extra_info_2; - - /// < Notification handler - external notification_h noti; -} - -/// @brief Notification handle. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -typedef notification_h = ffi.Pointer<_notification>; - -/// @brief Enumeration for permission. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class notification_permission_type { - static const int NOTIFICATION_PERMISSION_TYPE_NONE = 0; - static const int NOTIFICATION_PERMISSION_TYPE_DELETE = 1; - static const int NOTIFICATION_PERMISSION_TYPE_UPDATE = 2; -} - -/// @brief Enumeration for notification block state. -/// @since_tizen 3.0 -abstract class notification_block_state { - /// < The app is allowed to post notifications - static const int NOTIFICATION_BLOCK_STATE_ALLOWED = 0; - - /// < The app is not allowed to post any notifications - static const int NOTIFICATION_BLOCK_STATE_BLOCKED = 1; - - /// < User set do not disturb mode - static const int NOTIFICATION_BLOCK_STATE_DO_NOT_DISTURB = 2; -} - -typedef time_t = __time_t; -typedef __time_t = ffi.Long; -typedef Dart__time_t = int; - -/// @brief Enumeration for Alarm Error. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class alarm_error_e { - /// < Successful - static const int ALARM_ERROR_NONE = 0; - - /// < Invalid parameter - static const int ALARM_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid time - static const int ALARM_ERROR_INVALID_TIME = -17825787; - - /// < Invalid date - static const int ALARM_ERROR_INVALID_DATE = -17825786; - - /// < The alarm service connection failed - static const int ALARM_ERROR_CONNECTION_FAIL = -17825785; - - /// < Application is not permitted. (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int ALARM_ERROR_NOT_PERMITTED_APP = -17825784; - - /// < Out of memory - static const int ALARM_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied - static const int ALARM_ERROR_PERMISSION_DENIED = -13; -} - -/// @brief Enumeration for Alarm Week Flag, the days of the week. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class alarm_week_flag_e { - /// < Sunday - static const int ALARM_WEEK_FLAG_SUNDAY = 1; - - /// < Monday - static const int ALARM_WEEK_FLAG_MONDAY = 2; - - /// < Tuesday - static const int ALARM_WEEK_FLAG_TUESDAY = 4; - - /// < Wednesday - static const int ALARM_WEEK_FLAG_WEDNESDAY = 8; - - /// < Thursday - static const int ALARM_WEEK_FLAG_THURSDAY = 16; - - /// < Friday - static const int ALARM_WEEK_FLAG_FRIDAY = 32; - - /// < Saturday - static const int ALARM_WEEK_FLAG_SATURDAY = 64; -} - -final class tm extends ffi.Struct { - @ffi.Int() - external int tm_sec; - - @ffi.Int() - external int tm_min; - - @ffi.Int() - external int tm_hour; - - @ffi.Int() - external int tm_mday; - - @ffi.Int() - external int tm_mon; - - @ffi.Int() - external int tm_year; - - @ffi.Int() - external int tm_wday; - - @ffi.Int() - external int tm_yday; - - @ffi.Int() - external int tm_isdst; - - @ffi.Long() - external int tm_gmtoff; - - external ffi.Pointer tm_zone; -} - -/// @brief Called once for each scheduled alarm to get the alarm ID. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] alarm_id The alarm ID returned when the alarm is scheduled -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @pre alarm_foreach_registered_alarm() will invoke this callback to get all the registered alarm IDs. -/// @see alarm_foreach_registered_alarm() -typedef alarm_registered_alarm_cb - = ffi.Pointer>; -typedef alarm_registered_alarm_cbFunction = ffi.Bool Function( - ffi.Int alarm_id, ffi.Pointer user_data); -typedef Dartalarm_registered_alarm_cbFunction = bool Function( - int alarm_id, ffi.Pointer user_data); - -final class event_handler extends ffi.Opaque {} - -/// @brief Enumeration for Event Error. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class event_error_e { - /// < Successful - static const int EVENT_ERROR_NONE = 0; - - /// < Invalid parameter - static const int EVENT_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int EVENT_ERROR_OUT_OF_MEMORY = -12; - - /// < Time out - static const int EVENT_ERROR_TIMED_OUT = -1073741823; - - /// < IO error - static const int EVENT_ERROR_IO_ERROR = -5; - - /// < Permisiion denied - static const int EVENT_ERROR_PERMISSION_DENIED = -13; -} - -/// @brief Event callback. -/// -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] event_name The interested event name -/// @param[in] event_data The data of interested event -/// @param[in] user_data The user data set by event_add_event_handler() -/// @see event_add_event_handler -typedef event_cb = ffi.Pointer>; -typedef event_cbFunction = ffi.Void Function(ffi.Pointer event_name, - ffi.Pointer event_data, ffi.Pointer user_data); -typedef Dartevent_cbFunction = void Function(ffi.Pointer event_name, - ffi.Pointer event_data, ffi.Pointer user_data); - -/// @brief Event handle. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -typedef event_handler_h = ffi.Pointer; - -/// @brief Enumeration for Preference Error. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class preference_error_e { - /// < Successful - static const int PREFERENCE_ERROR_NONE = 0; - - /// < Invalid parameter - static const int PREFERENCE_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int PREFERENCE_ERROR_OUT_OF_MEMORY = -12; - - /// < Required key not available - static const int PREFERENCE_ERROR_NO_KEY = -17825744; - - /// < Internal I/O Error - static const int PREFERENCE_ERROR_IO_ERROR = -5; -} - -/// @brief Called when the given key's value in the preference changes. -/// @details When the @a key is added or removed, this callback function is skipped(only update can be handled). -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] key The name of the key in the preference -/// @param[in] user_data The user data passed from the callback registration function -/// @pre This function is invoked when the value of the key is overwritten after you register this callback using preference_set_changed_cb(). -/// @see preference_set_changed_cb() -/// @see preference_unset_changed_cb() -/// @see preference_set_boolean() -/// @see preference_set_int() -/// @see preference_set_string() -/// @see preference_set_double() -typedef preference_changed_cb - = ffi.Pointer>; -typedef preference_changed_cbFunction = ffi.Void Function( - ffi.Pointer key, ffi.Pointer user_data); -typedef Dartpreference_changed_cbFunction = void Function( - ffi.Pointer key, ffi.Pointer user_data); - -/// @brief Called to get key string, once for each key-value pair in the preference. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks You should not free the @a key returned by this function. -/// @param[in] key The key of the value added to the preference -/// @param[in] value The value associated with the key -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @pre preference_foreach_item() will invoke this callback function. -/// @see preference_foreach_item() -typedef preference_item_cb - = ffi.Pointer>; -typedef preference_item_cbFunction = ffi.Bool Function( - ffi.Pointer key, ffi.Pointer user_data); -typedef Dartpreference_item_cbFunction = bool Function( - ffi.Pointer key, ffi.Pointer user_data); - -/// @brief Enumeration for Resource Types -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class app_resource_e { - /// ; -typedef pid_t = __pid_t; -typedef __pid_t = ffi.Int; -typedef Dart__pid_t = int; - -/// @brief Enumeration for application component type. -/// @since_tizen 4.0 -/// @details A component is an application considered as a part of a package. -/// The application component type indicates what type of -/// a component an application is in a package. -/// @see PACKAGE_INFO_PROP_APP_COMPONENT_TYPE -/// @see app_info_get_app_component_type() -abstract class app_info_app_component_type_e { - /// < UI application - static const int APP_INFO_APP_COMPONENT_TYPE_UI_APP = 0; - - /// < Service application - static const int APP_INFO_APP_COMPONENT_TYPE_SERVICE_APP = 1; - - /// < Widget application - static const int APP_INFO_APP_COMPONENT_TYPE_WIDGET_APP = 2; - - /// < Watch application - static const int APP_INFO_APP_COMPONENT_TYPE_WATCH_APP = 3; -} - -final class app_info_s extends ffi.Opaque {} - -final class app_info_filter_s extends ffi.Opaque {} - -final class app_info_metadata_filter_s extends ffi.Opaque {} - -/// @brief Application information handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef app_info_h = ffi.Pointer; - -/// @brief Called to get application metadata in app_info_foreach_metadata(). -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] metadata_name The name of the metadata -/// @param[in] metadata_value The value of the metadata -/// @param[in] user_data The user data passed to app_info_foreach_metadata() -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// @pre app_info_foreach_metadata() will invoke this callback. -/// @see app_info_foreach_metadata() -typedef app_info_metadata_cb - = ffi.Pointer>; -typedef app_info_metadata_cbFunction = ffi.Bool Function( - ffi.Pointer metadata_key, - ffi.Pointer metadata_value, - ffi.Pointer user_data); -typedef Dartapp_info_metadata_cbFunction = bool Function( - ffi.Pointer metadata_key, - ffi.Pointer metadata_value, - ffi.Pointer user_data); - -/// @brief Called for each application category in app_info_foreach_category(). -/// @since_tizen 4.0 -/// @remarks @a category will be freed when the application information handle is destroyed -/// using app_info_destroy() -/// @param[in] category The name of the category -/// @param[in] user_data The user data passed to app_info_foreach_category() -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// @pre app_info_foreach_category() will invoke this callback. -/// @see app_info_foreach_category() -typedef app_info_category_cb - = ffi.Pointer>; -typedef app_info_category_cbFunction = ffi.Bool Function( - ffi.Pointer category, ffi.Pointer user_data); -typedef Dartapp_info_category_cbFunction = bool Function( - ffi.Pointer category, ffi.Pointer user_data); - -/// @brief Application filter handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef app_info_filter_h = ffi.Pointer; - -/// @brief Called to get the application information once for each installed application. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] app_info The application information of each installed application -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// @pre app_manager_foreach_app_info() will invoke this callback. -/// @see app_manager_foreach_app_info() -typedef app_info_filter_cb - = ffi.Pointer>; -typedef app_info_filter_cbFunction = ffi.Bool Function( - app_info_h app_info, ffi.Pointer user_data); -typedef Dartapp_info_filter_cbFunction = bool Function( - app_info_h app_info, ffi.Pointer user_data); - -/// @brief Application metadata filter handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef app_info_metadata_filter_h = ffi.Pointer; - -/// @brief Enumerations for Application Manager Error . -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class app_manager_error_e { - /// < Successful - static const int APP_MANAGER_ERROR_NONE = 0; - - /// < Invalid parameter - static const int APP_MANAGER_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int APP_MANAGER_ERROR_OUT_OF_MEMORY = -12; - - /// < Internal I/O error - static const int APP_MANAGER_ERROR_IO_ERROR = -5; - - /// < No such application - static const int APP_MANAGER_ERROR_NO_SUCH_APP = -17891327; - - /// < Database error - static const int APP_MANAGER_ERROR_DB_FAILED = -17891325; - - /// < Invalid package name - static const int APP_MANAGER_ERROR_INVALID_PACKAGE = -17891324; - - /// < App is not running - static const int APP_MANAGER_ERROR_APP_NO_RUNNING = -17891323; - - /// < Internal aul request error - static const int APP_MANAGER_ERROR_REQUEST_FAILED = -17891322; - - /// < Permission denied - static const int APP_MANAGER_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported (Since 3.0) - static const int APP_MANAGER_ERROR_NOT_SUPPORTED = -1073741822; -} - -/// @brief Enumeration for app manager status type. -/// @since_tizen 3.0 -abstract class app_manager_event_status_type_e { - /// < All Status - static const int APP_MANAGER_EVENT_STATUS_TYPE_ALL = 0; - - /// < Application enable status - static const int APP_MANAGER_EVENT_STATUS_TYPE_ENABLE = 1; - - /// < Application disable status - static const int APP_MANAGER_EVENT_STATUS_TYPE_DISABLE = 2; -} - -/// @brief Enumeration for app manager event type. -/// @since_tizen 3.0 -abstract class app_manager_event_type_e { - /// < Application enable event - static const int APP_MANAGER_EVENT_ENABLE_APP = 0; - - /// < Application disable event. - static const int APP_MANAGER_EVENT_DISABLE_APP = 1; -} - -/// @brief Enumeration for app manager event state. -/// @since_tizen 3.0 -abstract class app_manager_event_state_e { - /// < Started event state - static const int APP_MANAGER_EVENT_STATE_STARTED = 0; - - /// < Completed event state - static const int APP_MANAGER_EVENT_STATE_COMPLETED = 1; - - /// < Failed event state - static const int APP_MANAGER_EVENT_STATE_FAILED = 2; -} - -final class app_manager_event_s extends ffi.Opaque {} - -/// @brief Called when an application is launched or terminated. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] app_context The application context of the application launched or terminated -/// @param[in] event The application context event -/// @param[in] user_data The user data passed from the foreach function -/// @pre This function is called when an application gets launched or terminated, after you register this callback using app_manager_set_app_context_event_cb(). -/// @see app_manager_set_app_context_event_cb() -/// @see app_manager_unset_app_context_event_cb() -typedef app_manager_app_context_event_cb - = ffi.Pointer>; -typedef app_manager_app_context_event_cbFunction = ffi.Void Function( - app_context_h app_context, - ffi.Int32 event, - ffi.Pointer user_data); -typedef Dartapp_manager_app_context_event_cbFunction = void Function( - app_context_h app_context, int event, ffi.Pointer user_data); - -/// @brief Called to get the application context once for each running application. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] app_context The application context of each running application -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// @pre app_manager_foreach_app_context() will invoke this callback. -/// @see app_manager_foreach_app_context() -typedef app_manager_app_context_cb - = ffi.Pointer>; -typedef app_manager_app_context_cbFunction = ffi.Bool Function( - app_context_h app_context, ffi.Pointer user_data); -typedef Dartapp_manager_app_context_cbFunction = bool Function( - app_context_h app_context, ffi.Pointer user_data); - -/// @brief Called to get the application information once for each installed application. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] app_info The application information of each installed application -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// @pre app_manager_foreach_app_info() will invoke this callback. -/// @see app_manager_foreach_app_info() -typedef app_manager_app_info_cb - = ffi.Pointer>; -typedef app_manager_app_info_cbFunction = ffi.Bool Function( - app_info_h app_info, ffi.Pointer user_data); -typedef Dartapp_manager_app_info_cbFunction = bool Function( - app_info_h app_info, ffi.Pointer user_data); - -/// @brief App manager event handle. -/// @since_tizen 3.0 -typedef app_manager_event_h = ffi.Pointer; - -/// @brief Called when the application is enabled or disabled. -/// @since_tizen 3.0 -/// -/// @param[in] type The type of the app to be enabled or disabled -/// @param[in] app_id The app id to be enabled or disabled -/// @param[in] event_type The event type of the app -/// @param[in] event_state The current event state of the app -/// @param[in] handle The app manager event handle -/// @param[in] user_data The user data passed from app_manager_set_event_cb() -/// @pre This function is called when an application being disabled or enabled, after you register this callback using app_manager_set_event_cb(). -/// -/// @see app_manager_set_event_cb() -/// @see app_manager_unset_event_cb() -typedef app_manager_event_cb - = ffi.Pointer>; -typedef app_manager_event_cbFunction = ffi.Void Function( - ffi.Pointer type, - ffi.Pointer app_id, - ffi.Int32 event_type, - ffi.Int32 event_state, - app_manager_event_h handle, - ffi.Pointer user_data); -typedef Dartapp_manager_event_cbFunction = void Function( - ffi.Pointer type, - ffi.Pointer app_id, - int event_type, - int event_state, - app_manager_event_h handle, - ffi.Pointer user_data); - -/// @brief Enumeration for Badge Error -abstract class badge_error_e { - /// < Success - static const int BADGE_ERROR_NONE = 0; - - /// < Invalid parameter - static const int BADGE_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int BADGE_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied - static const int BADGE_ERROR_PERMISSION_DENIED = -13; - - /// < Error from I/O - static const int BADGE_ERROR_IO_ERROR = -5; - - /// < Not supported (Since 4.0) - static const int BADGE_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Error from DB - static const int BADGE_ERROR_FROM_DB = -17956863; - - /// < Already exist - static const int BADGE_ERROR_ALREADY_EXIST = -17956862; - - /// < Error from DBus - static const int BADGE_ERROR_FROM_DBUS = -17956861; - - /// < Not exist - static const int BADGE_ERROR_NOT_EXIST = -17956860; - - /// < Error service not ready - static const int BADGE_ERROR_SERVICE_NOT_READY = -17956859; - - /// < The caller application is not signed with the certificate of the badge owner - static const int BADGE_ERROR_INVALID_PACKAGE = -17956858; -} - -/// @brief Callback function for getting result of badge_foreach. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] app_id The id of the application -/// @param[in] count The count of the badge -/// @param[in] user_data The user data passed from the badge_foreach function -/// @return true to continue with the next iteration of the loop, false to break out of the loop -/// @pre badge_foreach() will invoke this callback. -/// @see badge_foreach() -typedef badge_foreach_cb - = ffi.Pointer>; -typedef badge_foreach_cbFunction = ffi.Bool Function( - ffi.Pointer app_id, - ffi.UnsignedInt count, - ffi.Pointer user_data); -typedef Dartbadge_foreach_cbFunction = bool Function( - ffi.Pointer app_id, int count, ffi.Pointer user_data); - -/// @brief Enumeration for Badge Action. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class badge_action { - /// < Badge created - static const int BADGE_ACTION_CREATE = 0; - - /// < Badge removed - static const int BADGE_ACTION_REMOVE = 1; - - /// < Badge updated - static const int BADGE_ACTION_UPDATE = 2; - - /// < The display option of the badge changed - static const int BADGE_ACTION_CHANGED_DISPLAY = 3; - - /// < The badge service is ready - static const int BADGE_ACTION_SERVICE_READY = 4; -} - -/// @brief Called when the badge information is changed. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] action The type of the change. Refer #badge_action -/// @param[in] app_id The name of the application -/// @param[in] count The count of the badge -/// @param[in] user_data The user data passed from the callback register function -/// @pre badge_register_changed_cb() will invoke this callback. -/// @see badge_unregister_changed_cb() -typedef badge_change_cb - = ffi.Pointer>; -typedef badge_change_cbFunction = ffi.Void Function( - ffi.UnsignedInt action, - ffi.Pointer app_id, - ffi.UnsignedInt count, - ffi.Pointer user_data); -typedef Dartbadge_change_cbFunction = void Function(int action, - ffi.Pointer app_id, int count, ffi.Pointer user_data); - -final class data_control_bulk_data_s extends ffi.Opaque {} - -final class data_control_bulk_result_data_s extends ffi.Opaque {} - -final class data_control_s extends ffi.Opaque {} - -/// @brief Enumeration for different types of columns in a SQL table. -/// @since_tizen 2.3 -abstract class data_control_sql_column_type_e { - /// < undefined type - static const int DATA_CONTROL_SQL_COLUMN_TYPE_UNDEFINED = 0; - - /// < integer type - static const int DATA_CONTROL_SQL_COLUMN_TYPE_INT64 = 1; - - /// < double type - static const int DATA_CONTROL_SQL_COLUMN_TYPE_DOUBLE = 2; - - /// < text type - static const int DATA_CONTROL_SQL_COLUMN_TYPE_TEXT = 3; - - /// < blob type - static const int DATA_CONTROL_SQL_COLUMN_TYPE_BLOB = 4; - - /// < null value - static const int DATA_CONTROL_SQL_COLUMN_TYPE_NULL = 5; -} - -/// @brief Enumeration for the various error codes an API can return. -/// @since_tizen 2.3 -abstract class data_control_error_e { - /// < Successful - static const int DATA_CONTROL_ERROR_NONE = 0; - - /// < Out of memory - static const int DATA_CONTROL_ERROR_OUT_OF_MEMORY = -12; - - /// < I/O error - static const int DATA_CONTROL_ERROR_IO_ERROR = -5; - - /// < Invalid parameter - static const int DATA_CONTROL_ERROR_INVALID_PARAMETER = -22; - - /// < Permission denied - static const int DATA_CONTROL_ERROR_PERMISSION_DENIED = -13; - - /// < Too long argument - static const int DATA_CONTROL_ERROR_MAX_EXCEEDED = -18415615; -} - -/// @brief Enumeration for the various data changed notification types. -/// @since_tizen 3.0 -abstract class data_control_data_change_type_e { - /// < Update notification - static const int DATA_CONTROL_DATA_CHANGE_SQL_UPDATE = 0; - - /// < Insert notification - static const int DATA_CONTROL_DATA_CHANGE_SQL_INSERT = 1; - - /// < Delete notification - static const int DATA_CONTROL_DATA_CHANGE_SQL_DELETE = 2; - - /// < Set notification - static const int DATA_CONTROL_DATA_CHANGE_MAP_SET = 3; - - /// < Add notification - static const int DATA_CONTROL_DATA_CHANGE_MAP_ADD = 4; - - /// < Remove notification - static const int DATA_CONTROL_DATA_CHANGE_MAP_REMOVE = 5; -} - -final class result_set_s extends ffi.Opaque {} - -/// @brief The structure type to represent a SQL result set. -/// @details This type can be used to enumerate through the result set of an SQL query. -/// @since_tizen 2.3 -typedef result_set_cursor = ffi.Pointer; - -/// @brief The bulk data handle. -/// @since_tizen 3.0 -typedef data_control_bulk_data_h = ffi.Pointer; - -/// @brief The bulk result data handle. -/// @since_tizen 3.0 -typedef data_control_bulk_result_data_h - = ffi.Pointer; - -/// @brief The structure type to contain the set of callback functions for handling the response events of the SQL-friendly interface based data control. -/// @since_tizen 2.3 -/// -/// @see data_control_sql_select_response_cb() -/// @see data_control_sql_insert_response_cb() -/// @see data_control_sql_update_response_cb() -/// @see data_control_sql_delete_response_cb() -final class data_control_sql_response_cb extends ffi.Struct { - /// < This callback function is called when a response is received for an select operation from an application using the SQL-friendly interface based data control. - external data_control_sql_select_response_cb select_cb; - - /// < This callback function is called when a response is received for an insert operation from an application using the SQL-friendly interface based data control. - external data_control_sql_insert_response_cb insert_cb; - - /// < This callback function is called when a response is received for an update operation from an application using the SQL-friendly interface based data control. - external data_control_sql_update_response_cb update_cb; - - /// < This callback function is called when a response is received for a delete operation from an application using the SQL-friendly interface based data control. - external data_control_sql_delete_response_cb delete_cb; -} - -/// @brief Called when a response is received for a select operation from an application using the SQL-friendly interface based data control. -/// @since_tizen 2.3 -/// -/// @remarks @a enumerator will be removed after the execution of this callback. -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function \n -/// @a provider should not be destroyed -/// @param[in] enumerator The enumerator for navigating the result of data control select request -/// @param[in] provider_result Set to @c true if the data control provider successfully processed, \n -/// otherwise set to @c false -/// @param[in] error The error message from the data control provider -/// @param[in] user_data The user data passed from the register function -typedef data_control_sql_select_response_cb = ffi - .Pointer>; -typedef data_control_sql_select_response_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - result_set_cursor enumerator, - ffi.Bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); -typedef Dartdata_control_sql_select_response_cbFunction = void Function( - int request_id, - data_control_h provider, - result_set_cursor enumerator, - bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); - -/// @brief The structure type for the provider handle. -/// @since_tizen 2.3 -typedef data_control_h = ffi.Pointer; - -/// @brief Called when a response is received for an insert operation from an application using the SQL-friendly interface based data control. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function \n -/// @a provider should not be destroyed -/// @param[in] inserted_row_id The inserted row ID set by the data control -/// @param[in] provider_result Set to @c true if the data control provider successfully processed, \n -/// otherwise set to @c false -/// @param[in] error The error message from the data control provider -/// @param[in] user_data The user data passed from the register function -typedef data_control_sql_insert_response_cb = ffi - .Pointer>; -typedef data_control_sql_insert_response_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.LongLong inserted_row_id, - ffi.Bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); -typedef Dartdata_control_sql_insert_response_cbFunction = void Function( - int request_id, - data_control_h provider, - int inserted_row_id, - bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); - -/// @brief Called when a response is received for an update operation from an application using the SQL-friendly interface based data control. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function \n -/// @a provider should not be destroyed -/// @param[in] provider_result Set to @c true if the data control provider successfully processed, \n -/// otherwise set to @c false -/// @param[in] error The error message from the data control provider -/// @param[in] user_data The user data passed from the register function -typedef data_control_sql_update_response_cb = ffi - .Pointer>; -typedef data_control_sql_update_response_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.Bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); -typedef Dartdata_control_sql_update_response_cbFunction = void Function( - int request_id, - data_control_h provider, - bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); - -/// @brief Called when a response is received for a delete operation from an application using the SQL-friendly interface based data control. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID that identifies the data control -/// @param[in] provider The provider handle. @a provider is valid only inside this function \n -/// @a provider should not be destroyed -/// @param[in] provider_result Set to @c true if the data control provider successfully processed, \n -/// otherwise set to @c false -/// @param[in] error The error message from the data control provider -/// @param[in] user_data The user data passed from the register function -typedef data_control_sql_delete_response_cb = ffi - .Pointer>; -typedef data_control_sql_delete_response_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.Bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); -typedef Dartdata_control_sql_delete_response_cbFunction = void Function( - int request_id, - data_control_h provider, - bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); - -/// @brief Called when a response is received for a bulk operation from a provider application. -/// @since_tizen 3.0 -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function. \n -/// @a provider should not be destroyed. -/// @param[in] bulk_results The result data for each insert request. @a bulk_results is valid only inside this function. \n -/// @a bulk_results should not be freed. -/// @param[in] provider_result Set to @c true if the data control provider successfully processed, \n -/// otherwise set to @c false -/// @param[in] error The error message from the data control provider. @a error is valid only inside this function. \n -/// @a error should not be freed. -/// @param[in] user_data The user data passed from the register function -/// @see data_control_sql_register_insert_bulk_data_response_cb() -/// @see data_control_map_register_add_bulk_data_response_cb() -typedef data_control_bulk_cb - = ffi.Pointer>; -typedef data_control_bulk_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - data_control_bulk_result_data_h bulk_results, - ffi.Bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); -typedef Dartdata_control_bulk_cbFunction = void Function( - int request_id, - data_control_h provider, - data_control_bulk_result_data_h bulk_results, - bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); - -/// @brief The structure type to contain the set of callback functions for handling the response events -/// of the key-value structured data control. -/// @since_tizen 2.3 -/// @see data_control_map_get_response_cb() -/// @see data_control_map_set_response_cb() -/// @see data_control_map_add_response_cb() -/// @see data_control_map_remove_response_cb() -final class data_control_map_response_cb extends ffi.Struct { - /// < This callback function is called when the response is received for a getting value from the key-value structured data control provider. - external data_control_map_get_response_cb get_cb; - - /// < This callback function is called when the response is received for a setting value from the key-value structured data control provider. - external data_control_map_set_response_cb set_cb; - - /// < This callback function is called when the response is received for an adding value from the key-value structured data control provider. - external data_control_map_add_response_cb add_cb; - - /// < This callback function is called when the response is for a removing value received from the key-value structured data control provider. - external data_control_map_remove_response_cb remove_cb; -} - -/// @brief Called when the result value list is received from the key-value structured data control provider. -/// @since_tizen 2.3 -/// @remarks You must release @a result_value_list using free() after it is used. Note that @a result_value list is an array of char *. Its length is @a result_value_count. You should release all the elements in the @a result_value_list array and @a result_value_list itself like the following code. -/// -/// @code -/// -/// int i; -/// for (i = 0; i < resule_value_count; i++) -/// free(result_value_list[i]); -/// free(result_value_list); -/// -/// @endcode -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function \n -/// @a provider should not be destroyed. -/// @param[in] result_value_list The result value list of the data control request that gets the matching values -/// @param[in] result_value_count The number of the values -/// @param[in] provider_result Set to @c true if the data control provider is successfully processed, \n -/// otherwise set to @c false -/// @param[in] error The error message from the data control provider -/// @param[in] user_data The user data passed from the register function -typedef data_control_map_get_response_cb - = ffi.Pointer>; -typedef data_control_map_get_response_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.Pointer> result_value_list, - ffi.Int result_value_count, - ffi.Bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); -typedef Dartdata_control_map_get_response_cbFunction = void Function( - int request_id, - data_control_h provider, - ffi.Pointer> result_value_list, - int result_value_count, - bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); - -/// @brief Called when the response is received for a set operation from the key-value structured data control provider. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID that identifies the data control -/// @param[in] provider The provider handle. @a provider is valid only inside this function \n -/// @a provider should not be destroyed. -/// @param[in] provider_result Set to @c true if the data control provider successfully processed, \n -/// otherwise @c false -/// @param[in] error The error message from the data control provider -/// @param[in] user_data The user data passed from the register function -typedef data_control_map_set_response_cb - = ffi.Pointer>; -typedef data_control_map_set_response_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.Bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); -typedef Dartdata_control_map_set_response_cbFunction = void Function( - int request_id, - data_control_h provider, - bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); - -/// @brief Called when the response is received for an add operation from the key-value structured data control provider. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID that identifies the data control -/// @param[in] provider The provider handle. @a provider is valid only inside this function \n -/// @a provider should not be destroyed. -/// @param[in] provider_result Set to @c true if the data control provider successfully processed, \n -/// otherwise set to @c false -/// @param[in] error The error message from the data control provider -/// @param[in] user_data The user data passed from the register function -typedef data_control_map_add_response_cb - = ffi.Pointer>; -typedef data_control_map_add_response_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.Bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); -typedef Dartdata_control_map_add_response_cbFunction = void Function( - int request_id, - data_control_h provider, - bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); - -/// @brief Called when the response is received for a remove operation from the key-value structured data control provider. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID that identifies the data control -/// @param[in] provider The provider handle. @a provider is valid only inside this function \n -/// @a provider should not be destroyed. -/// @param[in] provider_result Set to @c true if the data control provider successfully processed, \n -/// otherwise set to @c false -/// @param[in] error The error message from the data control provider -/// @param[in] user_data The user data passed from the register function -typedef data_control_map_remove_response_cb = ffi - .Pointer>; -typedef data_control_map_remove_response_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.Bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); -typedef Dartdata_control_map_remove_response_cbFunction = void Function( - int request_id, - data_control_h provider, - bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); - -/// @brief The structure type to contain the set of callback functions for handling the request events -/// of SQL-friendly interface based data control. -/// @since_tizen 2.3 -/// -/// @see data_control_provider_sql_select_request_cb() -/// @see data_control_provider_sql_insert_request_cb() -/// @see data_control_provider_sql_update_request_cb() -/// @see data_control_provider_sql_delete_request_cb() -final class data_control_provider_sql_cb extends ffi.Struct { - /// < This callback function is called when a request for insert operation is received from other application. - external data_control_provider_sql_insert_request_cb insert_cb; - - /// < This callback function is called when a request for select operation is received from other application. - external data_control_provider_sql_select_request_cb select_cb; - - /// < This callback function is called when a request for update operation is received from other application. - external data_control_provider_sql_update_request_cb update_cb; - - /// < This callback function is called when a request for delete operation is received from other application. - external data_control_provider_sql_delete_request_cb delete_cb; -} - -/// @brief Called when the insert request is received from an application using SQL-friendly interface based data control. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function. \n -/// @a provider should not be freed -/// @param[in] insert_data The column-value pairs to insert \n -/// If the value is a string, the value must be wrapped in single quotes, -/// otherwise it does not need to be wrapped in single quotes. \n -/// To use outside the callback, make a copy by using bundle_dup(). -/// @a insert_data should not be freed. -/// @param[in] user_data The user data passed from the register function -typedef data_control_provider_sql_insert_request_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef data_control_provider_sql_insert_request_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.Pointer insert_data, - ffi.Pointer user_data); -typedef Dartdata_control_provider_sql_insert_request_cbFunction = void Function( - int request_id, - data_control_h provider, - ffi.Pointer insert_data, - ffi.Pointer user_data); - -/// @brief Called when the select request is received from an application using SQL-friendly interface based data control. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function. \n -/// @a provider should not be freed -/// @param[in] column_list The column list to query -/// @param[in] column_count The total number of columns to be queried -/// @param[in] where A filter to select the desired rows \n -/// It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue -/// @param[in] order The sorting order of the rows to query \n -/// It is an SQL 'ORDER BY' clause excluding the 'ORDER BY' itself -/// @param[in] user_data The user data passed from the register function -typedef data_control_provider_sql_select_request_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef data_control_provider_sql_select_request_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.Pointer> column_list, - ffi.Int column_count, - ffi.Pointer where, - ffi.Pointer order, - ffi.Pointer user_data); -typedef Dartdata_control_provider_sql_select_request_cbFunction = void Function( - int request_id, - data_control_h provider, - ffi.Pointer> column_list, - int column_count, - ffi.Pointer where, - ffi.Pointer order, - ffi.Pointer user_data); - -/// @brief Called when the update request is received from an application using SQL-friendly interface based data control. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function. \n -/// @a provider should not be freed -/// @param[in] update_data The column-value pairs to update \n -/// If the value is a string, the value must be wrapped in single quotes, -/// otherwise it does not need to be wrapped in single quotes. \n -/// To use outside the callback, make a copy by using bundle_dup(). -/// @a update_data should not be freed. -/// @param[in] where A filter to select the desired rows to update \n -/// It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue -/// @param[in] user_data The user data passed from the register function -typedef data_control_provider_sql_update_request_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef data_control_provider_sql_update_request_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.Pointer update_data, - ffi.Pointer where, - ffi.Pointer user_data); -typedef Dartdata_control_provider_sql_update_request_cbFunction = void Function( - int request_id, - data_control_h provider, - ffi.Pointer update_data, - ffi.Pointer where, - ffi.Pointer user_data); - -/// @brief Called when the delete request is received from an application using SQL-friendly interface based data control. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function. \n -/// @a provider should not be freed -/// @param[in] where A filter to select the desired rows to delete \n -/// It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue -/// @param[in] user_data The user data passed from the register function -typedef data_control_provider_sql_delete_request_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef data_control_provider_sql_delete_request_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.Pointer where, - ffi.Pointer user_data); -typedef Dartdata_control_provider_sql_delete_request_cbFunction = void Function( - int request_id, - data_control_h provider, - ffi.Pointer where, - ffi.Pointer user_data); - -/// @brief The structure type to contain the set of callback functions for handling the request events -/// from the key-value structured data control consumer. -/// @since_tizen 2.3 -/// -/// @see data_control_provider_map_get_value_request_cb() -/// @see data_control_provider_map_set_value_request_cb() -/// @see data_control_provider_map_add_value_request_cb() -/// @see data_control_provider_map_remove_value_request_cb() -final class data_control_provider_map_cb extends ffi.Struct { - /// < This callback function is called when a request for getting value is received from other application. - external data_control_provider_map_get_value_request_cb get_cb; - - /// < This callback function is called when a request for setting value is received from other application. - external data_control_provider_map_set_value_request_cb set_cb; - - /// < This callback function is called when a request for adding value is received from other application. - external data_control_provider_map_add_value_request_cb add_cb; - - /// < This callback function is called when a request for removing value is received from other application. - external data_control_provider_map_remove_value_request_cb remove_cb; -} - -/// @brief Called when the request for obtaining the value list is received from the key-value structured data control consumer. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function. \n -/// @a provider should not be freed -/// @param[in] key The key of the value list to obtain -/// @param[in] user_data The user data passed from the register function -typedef data_control_provider_map_get_value_request_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef data_control_provider_map_get_value_request_cbFunction - = ffi.Void Function(ffi.Int request_id, data_control_h provider, - ffi.Pointer key, ffi.Pointer user_data); -typedef Dartdata_control_provider_map_get_value_request_cbFunction - = void Function(int request_id, data_control_h provider, - ffi.Pointer key, ffi.Pointer user_data); - -/// @brief Called when the request for replacing the value is received from the key-value structured data control consumer. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function. \n -/// @a provider should not be freed -/// @param[in] key The key of the value to replace -/// @param[in] old_value The value to replace -/// @param[in] new_value The new value that replaces the existing value -/// @param[in] user_data The user data passed from the register function -typedef data_control_provider_map_set_value_request_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef data_control_provider_map_set_value_request_cbFunction - = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.Pointer key, - ffi.Pointer old_value, - ffi.Pointer new_value, - ffi.Pointer user_data); -typedef Dartdata_control_provider_map_set_value_request_cbFunction - = void Function( - int request_id, - data_control_h provider, - ffi.Pointer key, - ffi.Pointer old_value, - ffi.Pointer new_value, - ffi.Pointer user_data); - -/// @brief Called when the request for adding the value is received from the key-value structured data control consumer. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function. \n -/// @a provider should not be freed -/// @param[in] key The key of the value to add -/// @param[in] value The value to add -/// @param[in] user_data The user data passed from the register function -typedef data_control_provider_map_add_value_request_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef data_control_provider_map_add_value_request_cbFunction - = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.Pointer key, - ffi.Pointer value, - ffi.Pointer user_data); -typedef Dartdata_control_provider_map_add_value_request_cbFunction - = void Function( - int request_id, - data_control_h provider, - ffi.Pointer key, - ffi.Pointer value, - ffi.Pointer user_data); - -/// @brief Called when the request for removing the value is received from the key-value structured data control consumer. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function. \n -/// @a provider should not be freed -/// @param[in] key The key of the value to remove -/// @param[in] value The value to remove -/// @param[in] user_data The user data passed from the register function -typedef data_control_provider_map_remove_value_request_cb = ffi.Pointer< - ffi - .NativeFunction>; -typedef data_control_provider_map_remove_value_request_cbFunction - = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.Pointer key, - ffi.Pointer value, - ffi.Pointer user_data); -typedef Dartdata_control_provider_map_remove_value_request_cbFunction - = void Function( - int request_id, - data_control_h provider, - ffi.Pointer key, - ffi.Pointer value, - ffi.Pointer user_data); - -/// @brief Called when a consumer requests a data change callback addition. -/// @details The callback decides - through the return value - whether a consumer application should be allowed to add a data change callback. \n -/// If it returns true, it means the application should be allowed to do so, if it returns false, it means it should be denied. -/// -/// @since_tizen 3.0 -/// @param[in] provider The provider handle. @a provider is valid only inside this function. \n -/// @a provider should not be freed -/// @param[in] consumer_appid The id of the consumer application which requested to add the callback. @a consumer_appid is valid only inside this function. \n -/// To use outside the callback, make a copy. @a consumer_appid should not be freed -/// @param[in] user_data The user data. -/// @return A boolean value indicating whether the consumer application should be allowed to add data change callbacks. -/// @c true let the application add a data change callback, -/// otherwise @c false application not allowed to add data change callback -/// -/// @pre The callback must be registered using data_control_provider_add_data_change_consumer_filter_cb(). \n -/// data_control_add_data_change_cb() must be called to invoke this callback. -/// -/// @see data_control_provider_add_data_change_consumer_filter_cb() -/// @see data_control_provider_remove_data_change_consumer_filter_cb() -typedef data_control_provider_data_change_consumer_filter_cb = ffi.Pointer< - ffi.NativeFunction< - data_control_provider_data_change_consumer_filter_cbFunction>>; -typedef data_control_provider_data_change_consumer_filter_cbFunction - = ffi.Bool Function(data_control_h provider, - ffi.Pointer consumer_appid, ffi.Pointer user_data); -typedef Dartdata_control_provider_data_change_consumer_filter_cbFunction - = bool Function(data_control_h provider, - ffi.Pointer consumer_appid, ffi.Pointer user_data); - -/// @brief Called for each application which successfully added a data change callback. -/// @since_tizen 3.0 -/// -/// @param[in] provider The provider handle. @a provider is valid only inside this function \n -/// @a provider should not be freed -/// @param[in] consumer_appid The id of the consumer application. @a consumer_appid is valid only inside this function \n -/// To use outside the callback, make a copy. @a consumer_appid should not be freed -/// @param[in] user_data The user data -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre data_control_provider_foreach_data_change_consumer() must be called to invoke this callback. -/// @see data_control_provider_foreach_data_change_consumer() -typedef data_control_provider_data_change_consumer_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef data_control_provider_data_change_consumer_cbFunction - = ffi.Bool Function(data_control_h provider, - ffi.Pointer consumer_appid, ffi.Pointer user_data); -typedef Dartdata_control_provider_data_change_consumer_cbFunction - = bool Function(data_control_h provider, - ffi.Pointer consumer_appid, ffi.Pointer user_data); - -/// @brief Called when the bulk data request is received from an consumer application. -/// @since_tizen 3.0 -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function. \n -/// @a provider should not be freed -/// @param[in] bulk_data The bulk data handle which contains data to be inserted or added -/// @param[in] user_data The user data passed from the register function -/// -/// @see data_control_provider_sql_register_insert_bulk_data_request_cb() -/// @see data_control_provider_map_register_add_bulk_data_request_cb() -/// @see data_control_sql_insert_bulk_data() -/// @see data_control_map_add_bulk_data() -/// @see data_control_bulk_data_add() -typedef data_control_provider_bulk_cb - = ffi.Pointer>; -typedef data_control_provider_bulk_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - data_control_bulk_data_h bulk_data, - ffi.Pointer user_data); -typedef Dartdata_control_provider_bulk_cbFunction = void Function( - int request_id, - data_control_h provider, - data_control_bulk_data_h bulk_data, - ffi.Pointer user_data); - -/// @brief Called when received data changed notification from provider application. -/// @since_tizen 3.0 -/// @param[in] provider The provider handle. @a provider is valid only inside this function \n -/// @a provider should not be destroyed. -/// @param[in] type Changed data type -/// @param[in] data Data from provider, intended to contain information about changed data \n -/// @a data is valid only inside this function \n -/// To use outside the callback, make a copy. @a data should not be freed -/// @param[in] user_data The user data passed from the add function -/// @pre The callback must be registered using data_control_add_data_change_cb(). \n -/// data_control_provider_send_data_change_noti() must be called to invoke this callback. -/// @see data_control_add_data_change_cb() -/// @see data_control_provider_send_data_change_noti() -typedef data_control_data_change_cb - = ffi.Pointer>; -typedef data_control_data_change_cbFunction = ffi.Void Function( - data_control_h provider, - ffi.Int32 type, - ffi.Pointer data, - ffi.Pointer user_data); -typedef Dartdata_control_data_change_cbFunction = void Function( - data_control_h provider, - int type, - ffi.Pointer data, - ffi.Pointer user_data); - -/// @brief Called when the consumer receives the result of the data change callback adding operation. -/// @details The following error codes can be delivered: \n -/// #DATA_CONTROL_ERROR_NONE, \n -/// #DATA_CONTROL_ERROR_OUT_OF_MEMORY, \n -/// #DATA_CONTROL_ERROR_IO_ERROR, \n -/// #DATA_CONTROL_ERROR_PERMISSION_DENIED, \n -/// #DATA_CONTROL_ERROR_MAX_EXCEEDED -/// @since_tizen 3.0 -/// @remarks DATA_CONTROL_ERROR_PERMISSION_DENIED will be returned when the provider denies to add the callback. -/// @param[in] provider The provider handle. @a provider is valid only inside this function \n -/// @a provider should not be destroyed. -/// @param[in] result Add data change callback result -/// @param[in] callback_id Added callback ID -/// @param[in] user_data The user data passed from the add function -/// @pre The callback must be registered using data_control_add_data_change_cb(). -/// @see data_control_add_data_change_cb() -typedef data_control_add_callback_result_cb = ffi - .Pointer>; -typedef data_control_add_callback_result_cbFunction = ffi.Void Function( - data_control_h provider, - ffi.Int32 result, - ffi.Int callback_id, - ffi.Pointer user_data); -typedef Dartdata_control_add_callback_result_cbFunction = void Function( - data_control_h provider, - int result, - int callback_id, - ffi.Pointer user_data); - -/// @brief Enumeration for error codes of a message port. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class message_port_error_e { - /// < Successful - static const int MESSAGE_PORT_ERROR_NONE = 0; - - /// < Internal I/O error - static const int MESSAGE_PORT_ERROR_IO_ERROR = -5; - - /// < Out of memory - static const int MESSAGE_PORT_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int MESSAGE_PORT_ERROR_INVALID_PARAMETER = -22; - - /// < The message port of the remote application is not found - static const int MESSAGE_PORT_ERROR_PORT_NOT_FOUND = -18022399; - - /// < The remote application is not signed with the same certificate - static const int MESSAGE_PORT_ERROR_CERTIFICATE_NOT_MATCH = -18022398; - - /// < The size of the message has exceeded the maximum limit - static const int MESSAGE_PORT_ERROR_MAX_EXCEEDED = -18022397; - - /// < Resource is temporarily unavailable - static const int MESSAGE_PORT_ERROR_RESOURCE_UNAVAILABLE = -18022396; -} - -/// @brief Called when a message is received. -/// @details The function is called when a message is received from the remote application. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks @a message is automatically freed by framework when callback returned, you can keep @a message using bundle_dup() @n -/// @a remote_port will be set only if the remote application sends a message with its port information using message_port_send_message_with_local_port(), otherwise it is @c NULL @n -/// When message is sent from remote application by message_port_send_message_with_local_port() in bidirectional communication, trusted_remote_port is used to check whether remote port is trusted port or not -/// This callback is called only in the main thread. -/// @param[in] local_port_id The local message port ID returned by message_port_register_local_port() -/// @param[in] remote_app_id The ID of the remote application that sent this message -/// @param[in] remote_port The name of the remote message port -/// @param[in] trusted_remote_port If @c true, the remote port is a trusted port; otherwise if @c false, it is not -/// @param[in] message The message passed from the remote application -/// @param[in] user_data The user data passed from the register function -/// @pre Either message_port_send_message() or message_port_send_message_with_local_port() from the remote application will invoke this function if you register it using message_port_register_local_port() -/// @see message_port_register_local_port() -/// @see message_port_unregister_local_port() -/// @see message_port_send_message() -/// @see message_port_send_message_with_local_port() -typedef message_port_message_cb - = ffi.Pointer>; -typedef message_port_message_cbFunction = ffi.Void Function( - ffi.Int local_port_id, - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - ffi.Bool trusted_remote_port, - ffi.Pointer message, - ffi.Pointer user_data); -typedef Dartmessage_port_message_cbFunction = void Function( - int local_port_id, - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - bool trusted_remote_port, - ffi.Pointer message, - ffi.Pointer user_data); - -/// @brief Called when a trusted message is received. -/// @details This function is called when a trusted message is received from the remote application. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks You can keep @a message using bundle_dup(). @n -/// @a remote_port will be set only if the remote application sends a message with its port information using message_port_send_trusted_message_with_local_port(), otherwise it is @c NULL. @n -/// When message is sent from remote application by message_port_send_trusted_message_with_local_port() in bidirectional communication, trusted_remote_port is used to check whether remote port is trusted port or not. -/// This callback is called only in the main thread. -/// @param[in] trusted_local_port_id The message port ID returned by message_port_register_trusted_local_port() -/// @param[in] remote_app_id The ID of the remote application that sent this message -/// @param[in] remote_port The name of the remote message port -/// @param[in] trusted_remote_port If @c true, the remote port is a trusted port; otherwise if @c false, it is not -/// @param[in] message The message passed from the remote application -/// @param[in] user_data The user data passed from the register function -/// @pre Either message_port_send_trusted_message() or message_port_send_trusted_message_with_local_port() from the remote application will invoke this function if you register it using message_port_register_trusted_local_port(). -/// @see message_port_register_trusted_local_port() -/// @see message_port_unregister_trusted_local_port() -/// @see message_port_send_trusted_message() -/// @see message_port_send_trusted_message_with_local_port() -typedef message_port_trusted_message_cb - = ffi.Pointer>; -typedef message_port_trusted_message_cbFunction = ffi.Void Function( - ffi.Int trusted_local_port_id, - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - ffi.Bool trusted_remote_port, - ffi.Pointer message, - ffi.Pointer user_data); -typedef Dartmessage_port_trusted_message_cbFunction = void Function( - int trusted_local_port_id, - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - bool trusted_remote_port, - ffi.Pointer message, - ffi.Pointer user_data); - -/// @brief Called when a remote port is registered or unregistered. -/// @details The function is called when a remote port is registered or unregistered -/// from the remote application. -/// @since_tizen 4.0 -/// @remarks @a remote_app_id and @a remote_port can be used until -/// message_port_remove_registration_event_cb() is called for the watcher which reported -/// the event. -/// @param[in] remote_app_id The ID of the remote application that sent this message -/// @param[in] remote_port The name of the remote message port -/// @param[in] trusted_remote_port Indicates whether remote port is trusted -/// @param[in] user_data The user data passed from the register function -/// @pre Called when a remote port is registered or unregistered if you add it using -/// message_port_add_registered_cb() or message_port_add_unregistered_cb() respectively. -/// @see message_port_add_registered_cb() -/// @see message_port_add_unregistered_cb() -/// @see message_port_remove_registration_event_cb() -typedef message_port_registration_event_cb = ffi - .Pointer>; -typedef message_port_registration_event_cbFunction = ffi.Void Function( - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - ffi.Bool trusted_remote_port, - ffi.Pointer user_data); -typedef Dartmessage_port_registration_event_cbFunction = void Function( - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - bool trusted_remote_port, - ffi.Pointer user_data); - -final class package_info_s extends ffi.Opaque {} - -final class package_updateinfo_s extends ffi.Opaque {} - -/// @brief Enumeration for storage type. -/// @since_tizen 2.3 -abstract class package_info_installed_storage_type_e { - /// < Internal storage - static const int PACKAGE_INFO_INTERNAL_STORAGE = 0; - - /// < External storage - static const int PACKAGE_INFO_EXTERNAL_STORAGE = 1; -} - -/// @brief Enumeration for app component type. -/// @since_tizen 2.3 -abstract class package_info_app_component_type_e { - /// < All application - static const int PACKAGE_INFO_ALLAPP = 0; - - /// < UI application - static const int PACKAGE_INFO_UIAPP = 1; - - /// < Service application - static const int PACKAGE_INFO_SERVICEAPP = 2; - - /// < Widget application (Since 4.0) - static const int PACKAGE_INFO_WIDGETAPP = 3; - - /// < Watch application (Since 4.0) - static const int PACKAGE_INFO_WATCHAPP = 4; -} - -/// @brief Enumeration for certification type. -/// @since_tizen 2.3 -abstract class package_cert_type_e { - /// < Author Root Certificate - static const int PACKAGE_INFO_AUTHOR_ROOT_CERT = 0; - - /// < Author Intermediate Certificate - static const int PACKAGE_INFO_AUTHOR_INTERMEDIATE_CERT = 1; - - /// < Author Signer Certificate - static const int PACKAGE_INFO_AUTHOR_SIGNER_CERT = 2; - - /// < Distributor Root Certificate - static const int PACKAGE_INFO_DISTRIBUTOR_ROOT_CERT = 3; - - /// < Distributor Intermediate Certificate - static const int PACKAGE_INFO_DISTRIBUTOR_INTERMEDIATE_CERT = 4; - - /// < Distributor Signer Certificate - static const int PACKAGE_INFO_DISTRIBUTOR_SIGNER_CERT = 5; - - /// < Distributor2 Root Certificate - static const int PACKAGE_INFO_DISTRIBUTOR2_ROOT_CERT = 6; - - /// < Distributor2 Intermediate Certificate - static const int PACKAGE_INFO_DISTRIBUTOR2_INTERMEDIATE_CERT = 7; - - /// < Distributor2 Signer Certificate - static const int PACKAGE_INFO_DISTRIBUTOR2_SIGNER_CERT = 8; -} - -/// @brief Enumeration for package update info type. -/// @since_tizen 4.0 -abstract class package_updateinfo_type_e { - /// < None type - static const int PACKAGE_UPDATEINFO_TYPE_NONE = 0; - - /// < Force type - static const int PACKAGE_UPDATEINFO_TYPE_FORCE = 1; - - /// < Optional type - static const int PACKAGE_UPDATEINFO_TYPE_OPTIONAL = 2; -} - -/// @brief The package information handle. -/// @since_tizen 2.3 -typedef package_info_h = ffi.Pointer; - -/// @brief Called to get the application ID once for each installed package. -/// @since_tizen 2.3 -/// @param[in] comp_type The Application Component type -/// @param[in] callback The callback function to be invoked -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @pre package_info_foreach_app_from_package() will invoke this callback. -/// @see package_info_foreach_app_from_package() -typedef package_info_app_cb - = ffi.Pointer>; -typedef package_info_app_cbFunction = ffi.Bool Function(ffi.Int32 comp_type, - ffi.Pointer app_id, ffi.Pointer user_data); -typedef Dartpackage_info_app_cbFunction = bool Function(int comp_type, - ffi.Pointer app_id, ffi.Pointer user_data); - -/// @brief Called to get the certification information. -/// @since_tizen 2.3 -/// @param[in] package_info The package info handle -/// @param[in] cert_type The certificate type -/// @param[in] cert_value The certificate value of corresponding certificate key \n -/// This value is base64 encoded data. -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @pre package_info_foreach_cert_info() will invoke this callback. -/// @see package_info_foreach_cert_info() -typedef package_info_cert_info_cb - = ffi.Pointer>; -typedef package_info_cert_info_cbFunction = ffi.Bool Function( - package_info_h handle, - ffi.Int32 cert_type, - ffi.Pointer cert_value, - ffi.Pointer user_data); -typedef Dartpackage_info_cert_info_cbFunction = bool Function( - package_info_h handle, - int cert_type, - ffi.Pointer cert_value, - ffi.Pointer user_data); - -/// @brief Called to get the privilege information. -/// @since_tizen 2.3 -/// @param[in] privilege_name the name of the privilege -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @pre package_info_foreach_privilege_info() will invoke this callback. -/// @see package_info_foreach_privilege_info() -typedef package_info_privilege_info_cb - = ffi.Pointer>; -typedef package_info_privilege_info_cbFunction = ffi.Bool Function( - ffi.Pointer privilege_name, ffi.Pointer user_data); -typedef Dartpackage_info_privilege_info_cbFunction = bool Function( - ffi.Pointer privilege_name, ffi.Pointer user_data); - -/// @brief The package update information handle. -/// @since_tizen 4.0 -typedef package_updateinfo_h = ffi.Pointer; - -/// @brief Called for each update information of all packages. -/// @since_tizen 4.0 -/// @remarks @a info should not be freed and can be used only in the callback. -/// @param[in] info The package update information handle -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @pre package_info_updateinfo_foreach_updateinfo() will invoke this callback. -/// @see package_info_updateinfo_foreach_updateinfo() -typedef package_info_updateinfo_cb - = ffi.Pointer>; -typedef package_info_updateinfo_cbFunction = ffi.Bool Function( - package_updateinfo_h info, ffi.Pointer user_data); -typedef Dartpackage_info_updateinfo_cbFunction = bool Function( - package_updateinfo_h info, ffi.Pointer user_data); - -/// @brief Enumeration for error code. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class package_manager_error_e { - /// < Successful - static const int PACKAGE_MANAGER_ERROR_NONE = 0; - - /// < Invalid parameter - static const int PACKAGE_MANAGER_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY = -12; - - /// < Internal I/O error - static const int PACKAGE_MANAGER_ERROR_IO_ERROR = -5; - - /// < No such package - static const int PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE = -18153359; - - /// < Severe system error - static const int PACKAGE_MANAGER_ERROR_SYSTEM_ERROR = -18153358; - - /// < Permission denied - static const int PACKAGE_MANAGER_ERROR_PERMISSION_DENIED = -13; -} - -/// @brief Enumeration for event type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class package_manager_event_type_e { - /// < Install event type - static const int PACKAGE_MANAGER_EVENT_TYPE_INSTALL = 0; - - /// < Uninstall event type - static const int PACKAGE_MANAGER_EVENT_TYPE_UNINSTALL = 1; - - /// < Update event type - static const int PACKAGE_MANAGER_EVENT_TYPE_UPDATE = 2; - - /// < Move event type (Since 3.0) - static const int PACKAGE_MANAGER_EVENT_TYPE_MOVE = 3; - - /// < Clear event type (Since 3.0) - static const int PACKAGE_MANAGER_EVENT_TYPE_CLEAR = 4; - static const int PACAKGE_MANAGER_EVENT_TYPE_INSTALL = 0; - static const int PACAKGE_MANAGER_EVENT_TYPE_UNINSTALL = 1; - static const int PACAKGE_MANAGER_EVENT_TYPE_UPDATE = 2; -} - -/// @brief Enumeration for event state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class package_manager_event_state_e { - /// < Started event state - static const int PACKAGE_MANAGER_EVENT_STATE_STARTED = 0; - - /// < Processing event state - static const int PACKAGE_MANAGER_EVENT_STATE_PROCESSING = 1; - - /// < Completed event state - static const int PACKAGE_MANAGER_EVENT_STATE_COMPLETED = 2; - - /// < Failed event state - static const int PACKAGE_MANAGER_EVENT_STATE_FAILED = 3; - static const int PACAKGE_MANAGER_EVENT_STATE_STARTED = 0; - static const int PACAKGE_MANAGER_EVENT_STATE_PROCESSING = 1; - static const int PACAKGE_MANAGER_EVENT_STATE_COMPLETED = 2; - static const int PACAKGE_MANAGER_EVENT_STATE_FAILED = 3; -} - -/// @brief Enumeration for move type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class package_manager_move_type_e { - /// < Internal type - static const int PACKAGE_MANAGER_REQUEST_MOVE_TO_INTERNAL = 0; - - /// < External type - static const int PACKAGE_MANAGER_REQUEST_MOVE_TO_EXTERNAL = 1; - static const int PACAKGE_MANAGER_REQUEST_MOVE_TO_INTERNAL = 0; - static const int PACAKGE_MANAGER_REQUEST_MOVE_TO_EXTERNAL = 1; -} - -/// @brief Enumeration for certification compare type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class package_manager_compare_result_type_e { - /// < Matching certification - static const int PACKAGE_MANAGER_COMPARE_MATCH = 0; - - /// < Mismatching certification - static const int PACKAGE_MANAGER_COMPARE_MISMATCH = 1; - - /// < First package has no certification - static const int PACKAGE_MANAGER_COMPARE_LHS_NO_CERT = 2; - - /// < Second package has no certification - static const int PACKAGE_MANAGER_COMPARE_RHS_NO_CERT = 3; - - /// < Both have no certification - static const int PACKAGE_MANAGER_COMPARE_BOTH_NO_CERT = 4; - static const int PACAKGE_MANAGER_COMPARE_MATCH = 0; - static const int PACAKGE_MANAGER_COMPARE_MISMATCH = 1; - static const int PACAKGE_MANAGER_COMPARE_LHS_NO_CERT = 2; - static const int PACAKGE_MANAGER_COMPARE_RHS_NO_CERT = 3; - static const int PACAKGE_MANAGER_COMPARE_BOTH_NO_CERT = 4; -} - -/// @brief Enumeration for permission type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class package_manager_permission_type_e { - /// < Normal permission - static const int PACKAGE_MANAGER_PERMISSION_NORMAL = 0; - - /// < Signature permission - static const int PACKAGE_MANAGER_PERMISSION_SIGNATURE = 1; - - /// < Privilege permission - static const int PACKAGE_MANAGER_PERMISSION_PRIVILEGE = 2; -} - -/// @brief Enumeration for status type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class package_manager_status_type_e { - /// < All status - static const int PACKAGE_MANAGER_STATUS_TYPE_ALL = 0; - - /// < Install package status - static const int PACKAGE_MANAGER_STATUS_TYPE_INSTALL = 1; - - /// < Uninstall package status - static const int PACKAGE_MANAGER_STATUS_TYPE_UNINSTALL = 2; - - /// < Upgrade package status - static const int PACKAGE_MANAGER_STATUS_TYPE_UPGRADE = 4; - - /// < Move package status - static const int PACKAGE_MANAGER_STATUS_TYPE_MOVE = 8; - - /// < Clear data status - static const int PACKAGE_MANAGER_STATUS_TYPE_CLEAR_DATA = 16; - - /// < Install progress status - static const int PACKAGE_MANAGER_STATUS_TYPE_INSTALL_PROGRESS = 32; - - /// < Get size status - static const int PACKAGE_MANAGER_STATUS_TYPE_GET_SIZE = 64; -} - -final class package_updateinfo_request_s extends ffi.Opaque {} - -final class package_manager_s extends ffi.Opaque {} - -final class package_manager_filter_s extends ffi.Opaque {} - -/// @brief The Package manager handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef package_manager_h = ffi.Pointer; - -/// @brief Called when the package is installed, uninstalled, or updated, and the progress of the request to the package manager changes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] type The type of the package to be installed, uninstalled, or updated -/// @param[in] package The name of the package to be installed, uninstalled, or updated -/// @param[in] event_type The type of the request to the package manager -/// @param[in] event_state The current state of the request to the package manager -/// @param[in] progress The progress for the request that is being processed by the package manager \n -/// The range of progress is from @c 0 to @c 100 -/// @param[in] error The error code when the package manager failed to process the request -/// @param[in] user_data The user data passed from package_manager_set_event_cb() -/// @see package_manager_set_event_cb() -/// @see package_manager_unset_event_cb() -typedef package_manager_event_cb - = ffi.Pointer>; -typedef package_manager_event_cbFunction = ffi.Void Function( - ffi.Pointer type, - ffi.Pointer package, - ffi.Int32 event_type, - ffi.Int32 event_state, - ffi.Int progress, - ffi.Int32 error, - ffi.Pointer user_data); -typedef Dartpackage_manager_event_cbFunction = void Function( - ffi.Pointer type, - ffi.Pointer package, - int event_type, - int event_state, - int progress, - int error, - ffi.Pointer user_data); - -/// @brief Called to retrieve all packages. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] package_info The package information -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @see package_manager_foreach_package_info() -typedef package_manager_package_info_cb - = ffi.Pointer>; -typedef package_manager_package_info_cbFunction = ffi.Bool Function( - package_info_h package_info, ffi.Pointer user_data); -typedef Dartpackage_manager_package_info_cbFunction = bool Function( - package_info_h package_info, ffi.Pointer user_data); - -final class package_size_info extends ffi.Opaque {} - -/// @brief Called when the package size information is obtained. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] package_id The package ID -/// @param[in] size_info The pointer to the structure including the package size information -/// @param[in] user_data The user data to be passed to the callback function -typedef package_manager_size_info_receive_cb = ffi - .Pointer>; -typedef package_manager_size_info_receive_cbFunction = ffi.Void Function( - ffi.Pointer package_id, - package_size_info_h size_info, - ffi.Pointer user_data); -typedef Dartpackage_manager_size_info_receive_cbFunction = void Function( - ffi.Pointer package_id, - package_size_info_h size_info, - ffi.Pointer user_data); - -/// @brief The package size information handle. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -typedef package_size_info_h = ffi.Pointer; - -/// @platform -/// @brief Called when the total package size information is obtained. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] size_info The pointer to the structure including the package size information -/// @param[in] user_data The user data to be passed to the callback function -typedef package_manager_total_size_info_receive_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef package_manager_total_size_info_receive_cbFunction = ffi.Void Function( - package_size_info_h size_info, ffi.Pointer user_data); -typedef Dartpackage_manager_total_size_info_receive_cbFunction = void Function( - package_size_info_h size_info, ffi.Pointer user_data); - -/// @brief Package manager filter handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef package_manager_filter_h = ffi.Pointer; - -/// @platform -/// @brief Enumeration for request mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class package_manager_request_mode_e { - /// < @platform Default request mode - static const int PACKAGE_MANAGER_REQUEST_MODE_DEFAULT = 0; - - /// < @platform Quiet request mode - static const int PACKAGE_MANAGER_REQUEST_MODE_QUIET = 1; - static const int PACAKGE_MANAGER_REQUEST_MODE_DEFAULT = 0; - static const int PACAKGE_MANAGER_REQUEST_MODE_QUIET = 1; -} - -final class package_manager_request_s extends ffi.Opaque {} - -/// @platform -/// @brief The Package manager request handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef package_manager_request_h = ffi.Pointer; - -/// @platform -/// @brief Called when the progress of the request to the package manager changes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] id The ID of the request to the package manager -/// @param[in] type The type of the package to install, uninstall or update -/// @param[in] package The name of the package to install, uninstall or update -/// @param[in] event_type The type of the request to the package manager -/// @param[in] event_state The current state of the request to the package manager -/// @param[in] progress The progress for the request that is being processed by the package manager \n -/// The range of progress is from @c 0 to @c 100. -/// @param[in] error The error code when the package manager failed to process the request -/// @param[in] user_data The user data passed from package_manager_request_set_event_cb() -/// @see package_manager_request_set_event_cb() -/// @see package_manager_request_unset_event_cb() -typedef package_manager_request_event_cb - = ffi.Pointer>; -typedef package_manager_request_event_cbFunction = ffi.Void Function( - ffi.Int id, - ffi.Pointer type, - ffi.Pointer package, - ffi.Int32 event_type, - ffi.Int32 event_state, - ffi.Int progress, - ffi.Int32 error, - ffi.Pointer user_data); -typedef Dartpackage_manager_request_event_cbFunction = void Function( - int id, - ffi.Pointer type, - ffi.Pointer package, - int event_type, - int event_state, - int progress, - int error, - ffi.Pointer user_data); - -/// @brief The Package manager update info request handle. -/// @since_tizen 4.0 -typedef package_updateinfo_request_h - = ffi.Pointer; - -final class package_archive_info_s extends ffi.Opaque {} - -/// @brief The package archive information handle. -/// @since_tizen 4.0 -typedef package_archive_info_h = ffi.Pointer; - -/// @brief The structure type containing the set of callback functions for handling application events. -/// @details It is one of the input parameters of the service_app_efl_main() function. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @see service_app_main() -/// @see service_app_create_cb() -/// @see service_app_terminate_cb() -/// @see service_app_control_cb() -final class service_app_lifecycle_callback_s extends ffi.Struct { - /// < This callback function is called at the start of the application. - external service_app_create_cb create; - - /// < This callback function is called once after the main loop of the application exits. - external service_app_terminate_cb terminate; - - /// < This callback function is called when another application sends the launch request to the application. - external service_app_control_cb app_control; -} - -/// @brief Called at the start of the agent application. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] user_data The user data passed from the callback registration function -/// @return @c true on success, -/// otherwise @c false -/// @pre service_app_main() will invoke this callback function. -/// @see service_app_main() -/// @see #service_app_lifecycle_callback_s -typedef service_app_create_cb - = ffi.Pointer>; -typedef service_app_create_cbFunction = ffi.Bool Function( - ffi.Pointer user_data); -typedef Dartservice_app_create_cbFunction = bool Function( - ffi.Pointer user_data); - -/// @brief Called once after the main loop of the agent application exits. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] user_data The user data passed from the callback registration function -/// @see service_app_main() -/// @see #service_app_lifecycle_callback_s -typedef service_app_terminate_cb - = ffi.Pointer>; -typedef service_app_terminate_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartservice_app_terminate_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Called when another application sends the launch request to the agent application. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] app_control The handle to the app_control -/// @param[in] user_data The user data passed from the callback registration function -/// @see service_app_main() -/// @see #service_app_lifecycle_callback_s -/// @see @ref CAPI_APP_CONTROL_MODULE API -typedef service_app_control_cb - = ffi.Pointer>; -typedef service_app_control_cbFunction = ffi.Void Function( - app_control_h app_control, ffi.Pointer user_data); -typedef Dartservice_app_control_cbFunction = void Function( - app_control_h app_control, ffi.Pointer user_data); - -/// @brief Enumeration for values of shortcut response types. -/// @since_tizen 2.3 -abstract class shortcut_error_e { - /// < Successful - static const int SHORTCUT_ERROR_NONE = 0; - - /// < Invalid function parameter - static const int SHORTCUT_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int SHORTCUT_ERROR_OUT_OF_MEMORY = -12; - - /// < I/O Error - static const int SHORTCUT_ERROR_IO_ERROR = -5; - - /// < Permission denied - static const int SHORTCUT_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int SHORTCUT_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Device or resource busy - static const int SHORTCUT_ERROR_RESOURCE_BUSY = -16; - - /// < There is no space to add a new shortcut - static const int SHORTCUT_ERROR_NO_SPACE = -18219007; - - /// < Shortcut is already added - static const int SHORTCUT_ERROR_EXIST = -18219006; - - /// < Unrecoverable error - static const int SHORTCUT_ERROR_FAULT = -18219004; - - /// < Not exist shortcut(@b Since: 3.0) - static const int SHORTCUT_ERROR_NOT_EXIST = -18219000; - - /// < Connection not established or communication problem - static const int SHORTCUT_ERROR_COMM = -18218944; -} - -/// @brief Enumeration for shortcut types. -/// @details Basically, two types of shortcuts are defined. -/// Every homescreen developer should support these types of shortcuts. -/// Or return, a proper errno to figure out why the application failed to add a shortcut. -/// #LAUNCH_BY_APP is used for adding a package itself as a shortcut. -/// #LAUNCH_BY_URI is used for adding a shortcut for "uri" data. -/// @since_tizen 2.3 -abstract class shortcut_type { - /// < Launch the application itself - static const int LAUNCH_BY_APP = 0; - - /// < Launch the application with the given data(URI) - static const int LAUNCH_BY_URI = 1; -} - -/// @brief Enumeration for sizes of shortcut widget. -/// @since_tizen 2.4 -abstract class shortcut_widget_size { - static const int WIDGET_SIZE_DEFAULT = 268435456; - - /// < 1x1 - static const int WIDGET_SIZE_1x1 = 268500992; - - /// < 2x1 - static const int WIDGET_SIZE_2x1 = 268566528; - - /// < 2x2 - static const int WIDGET_SIZE_2x2 = 268697600; - - /// < 4x1 - static const int WIDGET_SIZE_4x1 = 268959744; - - /// < 4x2 - static const int WIDGET_SIZE_4x2 = 269484032; - - /// < 4x3 - static const int WIDGET_SIZE_4x3 = 270532608; - - /// < 4x4 - static const int WIDGET_SIZE_4x4 = 272629760; - - /// < 4x5 - static const int WIDGET_SIZE_4x5 = 285212672; - - /// < 4x6 - static const int WIDGET_SIZE_4x6 = 301989888; - static const int WIDGET_SIZE_EASY_DEFAULT = 805306368; - - /// < Easy mode 1x1 - static const int WIDGET_SIZE_EASY_1x1 = 805371904; - - /// < Easy mode 3x2 - static const int WIDGET_SIZE_EASY_3x1 = 805437440; - - /// < Easy mode 3x3 - static const int WIDGET_SIZE_EASY_3x3 = 805568512; -} - -/// @brief Called to receive the result of shortcut_add_to_home(). -/// @since_tizen 2.3 -/// @param[in] ret The result value, it could be @c 0 if it succeeds to add a shortcut, -/// otherwise it returns an errno -/// @param[in] data The callback data -/// @return int @c 0 if there is no error, -/// otherwise errno -/// @see shortcut_add_to_home() -typedef result_cb_t = ffi.Pointer>; -typedef result_cb_tFunction = ffi.Int Function( - ffi.Int ret, ffi.Pointer data); -typedef Dartresult_cb_tFunction = int Function( - int ret, ffi.Pointer data); - -/// @brief Called to receive the result of shortcut_get_list(). -/// @since_tizen 2.4 -/// @param[in] package_name The name of package -/// @param[in] icon The absolute path of an icon file for this shortcut -/// @param[in] name The name of the created shortcut icon -/// @param[in] extra_key The user data. A property of shortcut element in manifest file -/// @param[in] extra_data The user data. A property of shortcut element in manifest file -/// @param[in] user_data The callback user data -/// @return SHORTCUT_ERROR_NONE to continue with the next iteration of the loop, other error values to break out of the loop -/// @see shortcut_get_list() -typedef shortcut_list_cb - = ffi.Pointer>; -typedef shortcut_list_cbFunction = ffi.Int Function( - ffi.Pointer package_name, - ffi.Pointer icon, - ffi.Pointer name, - ffi.Pointer extra_key, - ffi.Pointer extra_data, - ffi.Pointer user_data); -typedef Dartshortcut_list_cbFunction = int Function( - ffi.Pointer package_name, - ffi.Pointer icon, - ffi.Pointer name, - ffi.Pointer extra_key, - ffi.Pointer extra_data, - ffi.Pointer user_data); - -/// @brief Called to the add_to_home request. -/// @details The homescreen should define a callback as this type and implement the service code -/// for adding a new application shortcut. -/// @since_tizen 2.4 -/// @param[in] package_name The name of package -/// @param[in] name The name of the created shortcut icon -/// @param[in] type One of the three defined types -/// @param[in] content_info The specific information for creating a new shortcut -/// @param[in] icon The absolute path of an icon file for this shortcut -/// @param[in] pid The process ID of who request add_to_home -/// @param[in] allow_duplicate @c 1 if the shortcut can be duplicated, -/// otherwise a shourtcut should exist only once -/// @param[in] data The callback data -/// @return The result of handling a shortcut creation request\n -/// This returns @c 0 if the add_to_home request is handled successfully, -/// otherwise it returns a proper errno -/// @see shortcut_set_request_cb() -typedef shortcut_request_cb - = ffi.Pointer>; -typedef shortcut_request_cbFunction = ffi.Int Function( - ffi.Pointer package_name, - ffi.Pointer name, - ffi.Int type, - ffi.Pointer content_info, - ffi.Pointer icon, - ffi.Int pid, - ffi.Double period, - ffi.Int allow_duplicate, - ffi.Pointer data); -typedef Dartshortcut_request_cbFunction = int Function( - ffi.Pointer package_name, - ffi.Pointer name, - int type, - ffi.Pointer content_info, - ffi.Pointer icon, - int pid, - double period, - int allow_duplicate, - ffi.Pointer data); - -/// @brief Called to the shortcut_remove_from_home request. -/// @since_tizen 3.0 -/// @param[in] package_name The name of package -/// @param[in] name The name of the created shortcut icon -/// @param[in] sender_pid The process ID of who request shortcut_remove_from_home -/// @param[in] user_data The user data passed from the callback register function -/// @return The result of handling a shortcut remove request\n -/// This returns @c 0 if the remove_from_home request is handled successfully, -/// otherwise it returns a proper errno. -/// @see shortcut_set_remove_cb() -typedef shortcut_remove_cb - = ffi.Pointer>; -typedef shortcut_remove_cbFunction = ffi.Int Function( - ffi.Pointer package_name, - ffi.Pointer name, - ffi.Int sender_pid, - ffi.Pointer user_data); -typedef Dartshortcut_remove_cbFunction = int Function( - ffi.Pointer package_name, - ffi.Pointer name, - int sender_pid, - ffi.Pointer user_data); - -/// @brief Enumeration for error codes of URL download. -/// @since_tizen 2.3 -abstract class download_error_e { - /// < Successful - static const int DOWNLOAD_ERROR_NONE = 0; - - /// < Invalid parameter - static const int DOWNLOAD_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int DOWNLOAD_ERROR_OUT_OF_MEMORY = -12; - - /// < Network is unreachable - static const int DOWNLOAD_ERROR_NETWORK_UNREACHABLE = -101; - - /// < HTTP session time-out - static const int DOWNLOAD_ERROR_CONNECTION_TIMED_OUT = -110; - - /// < No space left on device - static const int DOWNLOAD_ERROR_NO_SPACE = -28; - - /// < Permission denied - static const int DOWNLOAD_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int DOWNLOAD_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Invalid state - static const int DOWNLOAD_ERROR_INVALID_STATE = -44040159; - - /// < Connection failed - static const int DOWNLOAD_ERROR_CONNECTION_FAILED = -44040158; - - /// < Invalid URL - static const int DOWNLOAD_ERROR_INVALID_URL = -44040156; - - /// < Invalid destination - static const int DOWNLOAD_ERROR_INVALID_DESTINATION = -44040155; - - /// < Too many simultaneous downloads - static const int DOWNLOAD_ERROR_TOO_MANY_DOWNLOADS = -44040154; - - /// < Download server queue is full - static const int DOWNLOAD_ERROR_QUEUE_FULL = -44040153; - - /// < The download is already completed - static const int DOWNLOAD_ERROR_ALREADY_COMPLETED = -44040152; - - /// < Failed to rename the downloaded file - static const int DOWNLOAD_ERROR_FILE_ALREADY_EXISTS = -44040151; - - /// < Cannot resume - static const int DOWNLOAD_ERROR_CANNOT_RESUME = -44040150; - - /// < Specified field not found - static const int DOWNLOAD_ERROR_FIELD_NOT_FOUND = -44040149; - - /// < Too many redirects from HTTP response header - static const int DOWNLOAD_ERROR_TOO_MANY_REDIRECTS = -44040144; - - /// < The download cannot handle the HTTP status value - static const int DOWNLOAD_ERROR_UNHANDLED_HTTP_CODE = -44040143; - - /// < No action after client creates a download ID - static const int DOWNLOAD_ERROR_REQUEST_TIMEOUT = -44040142; - - /// < No call to start API for some time although the download is created - static const int DOWNLOAD_ERROR_RESPONSE_TIMEOUT = -44040141; - - /// < No response from client after rebooting download daemon - static const int DOWNLOAD_ERROR_SYSTEM_DOWN = -44040140; - - /// < Download ID does not exist in download service module - static const int DOWNLOAD_ERROR_ID_NOT_FOUND = -44040139; - - /// < Network bonding is set but network type is not set as DOWNLOAD_NETWORK_ALL - static const int DOWNLOAD_ERROR_INVALID_NETWORK_TYPE = -44040138; - - /// < No data because the set API is not called - static const int DOWNLOAD_ERROR_NO_DATA = -61; - - /// < Internal I/O error - static const int DOWNLOAD_ERROR_IO_ERROR = -5; -} - -/// @brief Enumeration for download states. -/// @since_tizen 2.3 -abstract class download_state_e { - /// < Unhandled exception - static const int DOWNLOAD_STATE_NONE = 0; - - /// < Ready to download - static const int DOWNLOAD_STATE_READY = 1; - - /// < Queued to start downloading - static const int DOWNLOAD_STATE_QUEUED = 2; - - /// < Currently downloading - static const int DOWNLOAD_STATE_DOWNLOADING = 3; - - /// < The download is waiting to resume - static const int DOWNLOAD_STATE_PAUSED = 4; - - /// < The download is completed - static const int DOWNLOAD_STATE_COMPLETED = 5; - - /// < The download failed - static const int DOWNLOAD_STATE_FAILED = 6; - - /// < User canceled the download item - static const int DOWNLOAD_STATE_CANCELED = 7; -} - -/// @brief Enumeration for network type for downloading. -/// @since_tizen 2.3 -abstract class download_network_type_e { - /// < Download is available through data network - static const int DOWNLOAD_NETWORK_DATA_NETWORK = 0; - - /// < Download is available through WiFi - static const int DOWNLOAD_NETWORK_WIFI = 1; - - /// < Download is available through WiFi-Direct - static const int DOWNLOAD_NETWORK_WIFI_DIRECT = 2; - - /// < Download is available through either data network or WiFi - static const int DOWNLOAD_NETWORK_ALL = 3; -} - -/// @brief Enumeration for notification types when a client wants to register. -/// @since_tizen 2.3 -/// -/// @see download_set_notification_type() -/// @see download_get_notification_type() -abstract class download_notification_type_e { - /// < Do not register notification - static const int DOWNLOAD_NOTIFICATION_TYPE_NONE = 0; - - /// < Completion notification for success state and failed state - static const int DOWNLOAD_NOTIFICATION_TYPE_COMPLETE_ONLY = 1; - - /// < All download notifications for ongoing state, success state and failed state - static const int DOWNLOAD_NOTIFICATION_TYPE_ALL = 2; -} - -/// @brief Enumeration for the type of notification app control action which the client wants to set when registering notification. -/// @since_tizen 2.3 -/// -/// @see download_set_notification_app_control() -/// @see download_get_notification_app_control() -abstract class download_notification_app_control_type_e { - /// < App control action for failed and ongoing notification - static const int DOWNLOAD_NOTIFICATION_APP_CONTROL_TYPE_ONGOING = 0; - - /// < App control action for completed notification - static const int DOWNLOAD_NOTIFICATION_APP_CONTROL_TYPE_COMPLETE = 1; - - /// < App control action for failed notification - static const int DOWNLOAD_NOTIFICATION_APP_CONTROL_TYPE_FAILED = 2; -} - -/// @brief Called when a download state is changed. -/// -/// @since_tizen 2.3 -/// -/// @param[in] download_id The download ID -/// @param[in] state The state of download -/// @param[in] user_data The user data passed from download_set_state_changed_cb() -/// -/// @pre download_start() will invoke this callback if you register this callback using download_set_state_changed_cb(). -/// -/// @see download_set_state_changed_cb() -/// @see download_unset_state_changed_cb() -typedef download_state_changed_cb - = ffi.Pointer>; -typedef download_state_changed_cbFunction = ffi.Void Function( - ffi.Int download_id, ffi.Int32 state, ffi.Pointer user_data); -typedef Dartdownload_state_changed_cbFunction = void Function( - int download_id, int state, ffi.Pointer user_data); - -/// @brief Called when the progress of download changes. -/// -/// @since_tizen 2.3 -/// -/// @remarks This callback function is only invoked in the downloading state. -/// -/// @param[in] download_id The download ID -/// @param[in] received The size of the data received in bytes -/// @param[in] user_data The user data passed from download_set_progress_cb() -/// -/// @pre This callback function is invoked if you register this callback using download_set_progress_cb(). -/// -/// @see download_cancel() -/// @see download_set_progress_cb() -/// @see download_unset_progress_cb() -typedef download_progress_cb - = ffi.Pointer>; -typedef download_progress_cbFunction = ffi.Void Function(ffi.Int download_id, - ffi.UnsignedLongLong received, ffi.Pointer user_data); -typedef Dartdownload_progress_cbFunction = void Function( - int download_id, int received, ffi.Pointer user_data); - -/// @brief Enumeration of error code. -abstract class mime_type_error_e { - /// < Successful - static const int MIME_TYPE_ERROR_NONE = 0; - - /// < Invalid parameter - static const int MIME_TYPE_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int MIME_TYPE_ERROR_OUT_OF_MEMORY = -12; - - /// < Internal I/O error - static const int MIME_TYPE_ERROR_IO_ERROR = -5; - - /// < No access for the file (Since 4.0) - static const int MIME_TYPE_ERROR_PERMISSION_DENIED = -13; -} - -/// @ingroup CAPI_MEDIA_CONTENT_MODULE -/// @brief Enumeration for the media file format. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks Since 4.0, #MEDIA_CONTENT_TYPE_OTHERS is related to the following feature:\n -/// %http://tizen.org/feature/content.scanning.others\n -/// If this feature is not suppported on the device, MEDIA_CONTENT_TYPE_OTHERS type file is not scanned. -abstract class media_content_type_e { - /// ; - -/// @ingroup CAPI_CONTENT_MEDIA_FILTER_MODULE -/// @brief The structure type for the Media filter handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef filter_h = ffi.Pointer; - -/// @ingroup CAPI_CONTENT_MEDIA_FOLDER_MODULE -/// @brief Called for every available media folder. -/// @details Iterates over a list of folders. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks To use the @a folder outside this function, copy the handle with the media_folder_clone() function. \n -/// The callback is called in the main loop. -/// -/// @param[in] folder The handle to the media folder -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre media_folder_foreach_folder_from_db() will invoke this function. -/// @see media_folder_clone() -/// @see media_folder_foreach_folder_from_db() -typedef media_folder_cb - = ffi.Pointer>; -typedef media_folder_cbFunction = ffi.Bool Function( - media_folder_h folder, ffi.Pointer user_data); -typedef Dartmedia_folder_cbFunction = bool Function( - media_folder_h folder, ffi.Pointer user_data); - -/// @ingroup CAPI_CONTENT_MEDIA_FOLDER_MODULE -/// @brief The structure type for the Media folder handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef media_folder_h = ffi.Pointer; - -/// @ingroup CAPI_CONTENT_MEDIA_INFO_MODULE -/// @brief Called for every available media info. -/// @details Iterates over a list of media info. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks To use the @a media outside this function, copy the handle with media_info_clone() function. \n -/// The callback is called in the main loop. -/// -/// @param[in] media The handle to the media info -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre media_tag_foreach_media_from_db(), media_playlist_foreach_media_from_db(), media_genre_foreach_media_from_db(), -/// media_info_foreach_media_from_db(), media_folder_foreach_media_from_db() will invoke this function. -/// -/// @see media_info_clone() -/// @see media_album_foreach_media_from_db() -/// @see media_playlist_foreach_media_from_db() -/// @see media_tag_foreach_media_from_db() -/// @see media_info_foreach_media_from_db() -/// @see media_folder_foreach_media_from_db() -typedef media_info_cb = ffi.Pointer>; -typedef media_info_cbFunction = ffi.Bool Function( - media_info_h media, ffi.Pointer user_data); -typedef Dartmedia_info_cbFunction = bool Function( - media_info_h media, ffi.Pointer user_data); - -/// @ingroup CAPI_CONTENT_MEDIA_INFO_MODULE -/// @brief The structure type for the Media info handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef media_info_h = ffi.Pointer; - -/// @ingroup CAPI_CONTENT_MEDIA_IMAGE_MODULE -/// @brief The structure type for the Image metadata handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef image_meta_h = ffi.Pointer; - -/// @ingroup CAPI_CONTENT_MEDIA_INFO_MODULE -/// @brief Called when media items are inserted completely. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks The callback is called in a separate thread(not in the main loop). -/// -/// @param[in] media The handle to the media info -/// @param[in] user_data The user data passed from the foreach function -/// -/// @pre media_info_insert_batch_to_db() -/// @see media_info_insert_batch_to_db() -typedef media_insert_completed_cb - = ffi.Pointer>; -typedef media_insert_completed_cbFunction = ffi.Void Function( - ffi.Int32 error, ffi.Pointer user_data); -typedef Dartmedia_insert_completed_cbFunction = void Function( - int error, ffi.Pointer user_data); - -/// @deprecated Deprecated since 4.0. -/// @ingroup CAPI_CONTENT_MEDIA_INFO_MODULE -/// @brief Called when the burst shot is inserted completely. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks The callback is called in a separate thread(not in the main loop). -/// -/// @param[in] media The handle to the media info -/// @param[in] user_data The user data passed from the foreach function -/// -/// @pre media_info_insert_burst_shot_to_db() -/// @see media_info_insert_burst_shot_to_db() -typedef media_insert_burst_shot_completed_cb = ffi - .Pointer>; -typedef media_insert_burst_shot_completed_cbFunction = ffi.Void Function( - ffi.Int32 error, ffi.Pointer user_data); -typedef Dartmedia_insert_burst_shot_completed_cbFunction = void Function( - int error, ffi.Pointer user_data); - -/// @ingroup CAPI_CONTENT_MEDIA_TAG_MODULE -/// @brief Called for every tag in the obtained list of tags. -/// @details Iterates over a list of tags. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks To use the @a tag outside this function, copy the handle with the media_tag_clone() function. \n -/// The callback is called in the main loop. -/// -/// @param[in] tag The handle to the media tag -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre media_tag_foreach_tag_from_db(), media_info_foreach_tag_from_db() will invoke this function. -/// -/// @see media_tag_clone() -/// @see media_tag_foreach_tag_from_db() -/// @see media_info_foreach_tag_from_db() -typedef media_tag_cb = ffi.Pointer>; -typedef media_tag_cbFunction = ffi.Bool Function( - media_tag_h tag, ffi.Pointer user_data); -typedef Dartmedia_tag_cbFunction = bool Function( - media_tag_h tag, ffi.Pointer user_data); - -/// @ingroup CAPI_CONTENT_MEDIA_TAG_MODULE -/// @brief The structure type for the Media tag handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef media_tag_h = ffi.Pointer; - -/// @ingroup CAPI_CONTENT_MEDIA_BOOKMARK_MODULE -/// @brief Called for every bookmark in the obtained list of bookmarks. -/// @details Iterates over a bookmark list. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks To use the @a bookmark outside this function, copy the handle with the media_bookmark_clone() function. \n -/// The callback is called in the main loop. -/// -/// @param[in] bookmark The handle to the video bookmark -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre media_info_foreach_bookmark_from_db() will invoke this function. -/// @see media_info_foreach_bookmark_from_db() -typedef media_bookmark_cb - = ffi.Pointer>; -typedef media_bookmark_cbFunction = ffi.Bool Function( - media_bookmark_h bookmark, ffi.Pointer user_data); -typedef Dartmedia_bookmark_cbFunction = bool Function( - media_bookmark_h bookmark, ffi.Pointer user_data); - -/// @ingroup CAPI_CONTENT_MEDIA_BOOKMARK_MODULE -/// @brief The structure type for the Media bookmark handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef media_bookmark_h = ffi.Pointer; - -/// @ingroup CAPI_CONTENT_MEDIA_FACE_MODULE -/// @brief Called for every face in the obtained list of face. -/// @details Iterates over a media face list. -/// -/// @since_tizen 3.0 -/// -/// @remarks You should not destroy @a face returned by this function. \n -/// The callback is called in the main loop. -/// -/// @param[in] face The handle of the media face -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre media_info_foreach_face_from_db() will invoke this function. -/// @see media_info_foreach_face_from_db() -typedef media_face_cb = ffi.Pointer>; -typedef media_face_cbFunction = ffi.Bool Function( - media_face_h face, ffi.Pointer user_data); -typedef Dartmedia_face_cbFunction = bool Function( - media_face_h face, ffi.Pointer user_data); - -/// @ingroup CAPI_CONTENT_MEDIA_FACE_MODULE -/// @brief The structure type for the Media face handle. -/// @since_tizen 3.0 -typedef media_face_h = ffi.Pointer; - -/// @ingroup CAPI_CONTENT_MEDIA_VIDEO_META_MODULE -/// @brief The structure type for the Video metadata handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef video_meta_h = ffi.Pointer; - -/// @ingroup CAPI_CONTENT_MEDIA_INFO_MODULE -/// @brief Called when creating a thumbnail image. -/// @details This callback is called for completion of generating the thumbnail image. -/// The following error codes can be delivered. \n -/// #MEDIA_CONTENT_ERROR_NONE, \n -/// #MEDIA_CONTENT_ERROR_INVALID_PARAMETER, \n -/// #MEDIA_CONTENT_ERROR_INVALID_OPERATION, \n -/// #MEDIA_CONTENT_ERROR_PERMISSION_DENIED, \n -/// #MEDIA_CONTENT_ERROR_DB_FAILED, \n -/// #MEDIA_CONTENT_ERROR_UNSUPPORTED_CONTENT -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks The callback is called in a separate thread(not in the main loop). -/// -/// @param[in] error The error code -/// @param[in] path The path of the thumbnail which is generated -/// @param[in] user_data The user data passed from the foreach function -/// -/// @pre media_info_create_thumbnail() -/// @see media_info_create_thumbnail() -typedef media_thumbnail_completed_cb - = ffi.Pointer>; -typedef media_thumbnail_completed_cbFunction = ffi.Void Function( - ffi.Int32 error, - ffi.Pointer path, - ffi.Pointer user_data); -typedef Dartmedia_thumbnail_completed_cbFunction = void Function( - int error, ffi.Pointer path, ffi.Pointer user_data); - -/// @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE -/// @brief Called when face detection on the image is completed. -/// -/// @details The following error codes can be delivered. \n -/// #MEDIA_CONTENT_ERROR_NONE, \n -/// #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, \n -/// #MEDIA_CONTENT_ERROR_INVALID_OPERATION, \n -/// #MEDIA_CONTENT_ERROR_DB_FAILED, \n -/// #MEDIA_CONTENT_ERROR_DB_BUSY, \n -/// #MEDIA_CONTENT_ERROR_UNSUPPORTED_CONTENT -/// -/// @since_tizen 3.0 -/// -/// @remarks The callback is called in a separate thread(not in the main loop). -/// -/// @param[in] error The error code -/// @param[in] face_count The number of all detected faces -/// @param[in] user_data The user data passed from the foreach function -/// -/// @pre media_info_start_face_detection() -/// @see media_info_start_face_detection() -typedef media_face_detection_completed_cb = ffi - .Pointer>; -typedef media_face_detection_completed_cbFunction = ffi.Void Function( - ffi.Int32 error, ffi.Int face_count, ffi.Pointer user_data); -typedef Dartmedia_face_detection_completed_cbFunction = void Function( - int error, int face_count, ffi.Pointer user_data); - -/// @ingroup CAPI_CONTENT_MEDIA_ALBUM_MODULE -/// @brief Called for every album in the obtained list of groups. -/// @details Iterates over an album list. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks To use the @a album outside this function, copy the handle with the media_album_clone() function. \n -/// The callback is called in the main loop. -/// -/// @param[in] album The handle to the media album -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre media_album_foreach_album_from_db() will invoke this function. -/// -/// @see media_album_clone() -/// @see media_album_foreach_album_from_db() -typedef media_album_cb - = ffi.Pointer>; -typedef media_album_cbFunction = ffi.Bool Function( - media_album_h album, ffi.Pointer user_data); -typedef Dartmedia_album_cbFunction = bool Function( - media_album_h album, ffi.Pointer user_data); - -/// @ingroup CAPI_CONTENT_MEDIA_ALBUM_MODULE -/// @brief The structure type for the Media album handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef media_album_h = ffi.Pointer; - -/// @ingroup CAPI_CONTENT_MEDIA_GROUP_MODULE -/// @brief Called for every group in the obtained list of groups. -/// @details Iterates over a media group list. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks You should not free @a group_name returned by this function. \n -/// The callback is called in the main loop. -/// -/// @param[in] group_name The name of the media group -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre media_group_foreach_group_from_db() will invoke this function. -/// @see media_group_foreach_group_from_db() -typedef media_group_cb - = ffi.Pointer>; -typedef media_group_cbFunction = ffi.Bool Function( - ffi.Pointer group_name, ffi.Pointer user_data); -typedef Dartmedia_group_cbFunction = bool Function( - ffi.Pointer group_name, ffi.Pointer user_data); - -/// @ingroup CAPI_CONTENT_MEDIA_PLAYLIST_MODULE -/// @brief Called for every playlist in the obtained list of playlists. -/// @details Iterates over a playlist list. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks To use the @a playlist outside this function, copy the handle with the media_playlist_clone() function. \n -/// The callback is called in the main loop. -/// -/// @param[in] playlist The handle to the media playlist -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre media_playlist_foreach_playlist_from_db() will invoke this function. -/// -/// @see media_playlist_clone() -/// @see media_playlist_foreach_playlist_from_db() -typedef media_playlist_cb - = ffi.Pointer>; -typedef media_playlist_cbFunction = ffi.Bool Function( - media_playlist_h playlist, ffi.Pointer user_data); -typedef Dartmedia_playlist_cbFunction = bool Function( - media_playlist_h playlist, ffi.Pointer user_data); - -/// @ingroup CAPI_CONTENT_MEDIA_PLAYLIST_MODULE -/// @brief The structure type for the Media playlist handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef media_playlist_h = ffi.Pointer; - -/// @ingroup CAPI_CONTENT_MEDIA_PLAYLIST_MODULE -/// @brief Called for every media info with playlist member ID in the obtained list of media info. -/// @details Iterates over playlist members. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks To use the @a media outside this function, copy the handle with the media_info_clone() function. \n -/// The callback is called in the main loop. -/// -/// @param[in] playlist_member_id The ID to member of the playlist -/// @param[in] media The handle to the media info -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre media_playlist_foreach_media_from_db() will invoke this function. -/// -/// @see media_info_clone() -/// @see media_playlist_foreach_media_from_db() -typedef playlist_member_cb - = ffi.Pointer>; -typedef playlist_member_cbFunction = ffi.Bool Function( - ffi.Int playlist_member_id, - media_info_h media, - ffi.Pointer user_data); -typedef Dartplaylist_member_cbFunction = bool Function(int playlist_member_id, - media_info_h media, ffi.Pointer user_data); - -/// @ingroup CAPI_CONTENT_MEDIA_STORAGE_MODULE -/// @brief The structure type for the Media storage handle. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -typedef media_storage_h = ffi.Pointer; - -/// @ingroup CAPI_CONTENT_MEDIA_STORAGE_MODULE -/// @brief Called for every storage in the obtained list of storages. -/// @details Iterates over a media storage list. -/// -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// -/// @remarks You should not destroy @a storage returned by this function. \n -/// The callback is called in the main loop. -/// -/// @param[in] storage The handle of the media storage -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre media_storage_foreach_storage_from_db() will invoke this function. -/// @see media_storage_foreach_storage_from_db() -typedef media_storage_cb - = ffi.Pointer>; -typedef media_storage_cbFunction = ffi.Bool Function( - media_storage_h storage, ffi.Pointer user_data); -typedef Dartmedia_storage_cbFunction = bool Function( - media_storage_h storage, ffi.Pointer user_data); - -/// @ingroup CAPI_MEDIA_CONTENT_MODULE -/// @brief Called when the media scanning is finished. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks The callback is called in a separate thread(not in the main loop). -/// -/// @param[in] error The error code -/// @param[in] user_data The user data passed from the foreach function -/// -/// @pre media_content_scan_folder(). -/// @see media_content_scan_folder() -typedef media_scan_completed_cb - = ffi.Pointer>; -typedef media_scan_completed_cbFunction = ffi.Void Function( - ffi.Int32 error, ffi.Pointer user_data); -typedef Dartmedia_scan_completed_cbFunction = void Function( - int error, ffi.Pointer user_data); - -/// @ingroup CAPI_MEDIA_CONTENT_MODULE -/// @brief Called when the notification of the media DB change is subscribed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks The callback is called in a separate thread(not in the main loop). -/// -/// @param[in] error The error code -/// @param[in] pid The PID which publishes notification -/// @param[in] update_item The update item of notification -/// @param[in] update_type The update type of notification -/// @param[in] media_type The type of the media content (#media_content_type_e) -/// @param[in] uuid The UUID of media or directory, which is updated -/// @param[in] path The path of the media or directory -/// @param[in] mime_type The mime type of the media info -/// @param[in] user_data The user data passed from the foreach function -/// -/// @pre media_content_db_update_subscribe(). -/// @see media_content_db_update_subscribe() -typedef media_content_db_update_cb - = ffi.Pointer>; -typedef media_content_db_update_cbFunction = ffi.Void Function( - ffi.Int32 error, - ffi.Int pid, - ffi.Int32 update_item, - ffi.Int32 update_type, - ffi.Int32 media_type, - ffi.Pointer uuid, - ffi.Pointer path, - ffi.Pointer mime_type, - ffi.Pointer user_data); -typedef Dartmedia_content_db_update_cbFunction = void Function( - int error, - int pid, - int update_item, - int update_type, - int media_type, - ffi.Pointer uuid, - ffi.Pointer path, - ffi.Pointer mime_type, - ffi.Pointer user_data); - -/// @ingroup CAPI_CONTENT_MEDIA_CONTENT_MODULE -/// @brief The structure type for the Media content noti handle. -/// @since_tizen 3.0 -typedef media_content_noti_h = ffi.Pointer; - -final class email_s extends ffi.Opaque {} - -/// @brief Enumeration for the result values of email transport. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class email_sending_e { - /// < Email sending failed - static const int EMAIL_SENDING_FAILED = -1; - - /// < Email sending succeeded - static const int EMAIL_SENDING_SUCCEEDED = 0; -} - -/// @brief Enumeration for the email recipient types. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class email_recipient_type_e { - /// < Normal recipient - static const int EMAIL_RECIPIENT_TYPE_TO = 1; - - /// < CC(carbon copy) recipient - static const int EMAIL_RECIPIENT_TYPE_CC = 2; - - /// < BCC(blind carbon copy) recipient - static const int EMAIL_RECIPIENT_TYPE_BCC = 3; -} - -/// @brief Enumeration for error codes for email API. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class email_error_e { - /// < Successful - static const int EMAILS_ERROR_NONE = 0; - - /// < Memory cannot be allocated - static const int EMAILS_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int EMAILS_ERROR_INVALID_PARAMETER = -22; - - /// < Server not ready - static const int EMAILS_ERROR_SERVER_NOT_READY = -24116736; - - /// < Communication with server failed - static const int EMAILS_ERROR_COMMUNICATION_WITH_SERVER_FAILED = -24116735; - - /// < Operation failed - static const int EMAILS_ERROR_OPERATION_FAILED = -24116734; - - /// < Email account not found - static const int EMAILS_ERROR_ACCOUNT_NOT_FOUND = -24116733; - - /// < Email database failed - static const int EMAILS_ERROR_DB_FAILED = -24116732; - - /// < Permission denied - static const int EMAILS_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported (Since 3.0) - static const int EMAILS_ERROR_NOT_SUPPORTED = -1073741822; -} - -/// @brief The email message handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -typedef email_h = ffi.Pointer; - -/// @brief Called when the process of sending an email finishes. -/// @details You can check whether sending an email succeeds using this function. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -/// @param[in] email The handle to the email message -/// @param[in] result The result of email message sending \n -/// #EMAIL_SENDING_FAILED or #EMAIL_SENDING_SUCCEEDED -/// @param[in] user_data The user data passed from the callback registration function -/// @pre email_send_message() will invoke this callback if you register this callback using email_set_message_sent_cb(). -/// @see email_send_message() -/// @see email_set_message_sent_cb() -/// @see email_unset_message_sent_cb() -typedef email_message_sent_cb - = ffi.Pointer>; -typedef email_message_sent_cbFunction = ffi.Void Function( - email_h email, ffi.Int32 result, ffi.Pointer user_data); -typedef Dartemail_message_sent_cbFunction = void Function( - email_h email, int result, ffi.Pointer user_data); - -final class messages_service_s extends ffi.Opaque {} - -final class messages_message_s extends ffi.Opaque {} - -/// @brief Enumeration for the message box type. -/// @since_tizen 2.3 -abstract class messages_message_box_e { - /// < All message box type - static const int MESSAGES_MBOX_ALL = 0; - - /// < Inbox type - static const int MESSAGES_MBOX_INBOX = 1; - - /// < Outbox type - static const int MESSAGES_MBOX_OUTBOX = 2; - - /// < Sentbox type - static const int MESSAGES_MBOX_SENTBOX = 3; - - /// < Draft type - static const int MESSAGES_MBOX_DRAFT = 4; -} - -/// @brief Enumeration for the message type. -/// @since_tizen 2.3 -abstract class messages_message_type_e { - /// < Unknown type - static const int MESSAGES_TYPE_UNKNOWN = 0; - - /// < SMS type - static const int MESSAGES_TYPE_SMS = 1; - - /// < MMS type - static const int MESSAGES_TYPE_MMS = 2; - - /// < CB(Cell Broadcast) Type - static const int MESSAGES_TYPE_SMS_CB = 17; - - /// < WAP Push Type - static const int MESSAGES_TYPE_SMS_PUSH = 161; - - /// < ETWS(Earthquake and Tsunami Warning System) Primary Type - static const int MESSAGES_TYPE_SMS_ETWS_PRIMARY = 337; - - /// < ETWS(Earthquake and Tsunami Warning System) Secondary Type - static const int MESSAGES_TYPE_SMS_ETWS_SECONDARY = 353; -} - -/// @brief Enumeration for the attachment type for MMS messaging. -/// @since_tizen 2.3 -abstract class messages_media_type_e { - /// < Unknown - static const int MESSAGES_MEDIA_UNKNOWN = 0; - - /// < The image - static const int MESSAGES_MEDIA_IMAGE = 1; - - /// < The audio - static const int MESSAGES_MEDIA_AUDIO = 2; - - /// < The video - static const int MESSAGES_MEDIA_VIDEO = 3; -} - -/// @brief Enumeration for the recipient type of a message. -/// @since_tizen 2.3 -abstract class messages_recipient_type_e { - /// < Unknown - static const int MESSAGES_RECIPIENT_UNKNOWN = 0; - - /// < The 'To' recipient - static const int MESSAGES_RECIPIENT_TO = 1; - - /// < The 'Cc' (carbon copy) recipient - static const int MESSAGES_RECIPIENT_CC = 2; - - /// < The 'Bcc' (blind carbon copy) recipient - static const int MESSAGES_RECIPIENT_BCC = 3; -} - -/// @brief Enumeration for the result of sending a message. -/// @since_tizen 2.3 -abstract class messages_sending_result_e { - /// < Message sending failed - static const int MESSAGES_SENDING_FAILED = -1; - - /// < Message sending succeeded - static const int MESSAGES_SENDING_SUCCEEDED = 0; -} - -/// @brief Enumeration for the SIM index of a message. -/// @since_tizen 2.3 -abstract class messages_sim_index_e { - /// < Unknown SIM Index - static const int MESSAGES_SIM_INDEX_UNKNOWN = 0; - - /// < SIM Index 1 - static const int MESSAGES_SIM_INDEX_1 = 1; - - /// < SIM Index 2 - static const int MESSAGES_SIM_INDEX_2 = 2; -} - -/// @brief Enumeration for Messaging of error code. -abstract class messages_error_e { - /// < Successful - static const int MESSAGES_ERROR_NONE = 0; - - /// < Out of memory - static const int MESSAGES_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int MESSAGES_ERROR_INVALID_PARAMETER = -22; - - /// < Server is not read - static const int MESSAGES_ERROR_SERVER_NOT_READY = -24181503; - - /// < Communication with server failed - static const int MESSAGES_ERROR_COMMUNICATION_WITH_SERVER_FAILED = -24181502; - - /// < Index out of range - static const int MESSAGES_ERROR_OUT_OF_RANGE = -24181501; - - /// < Sending a message failed - static const int MESSAGES_ERROR_SENDING_FAILED = -24181500; - - /// < Messaging operation failed - static const int MESSAGES_ERROR_OPERATION_FAILED = -24181499; - - /// < No SIM Card - static const int MESSAGES_ERROR_NO_SIM_CARD = -24181498; - - /// < No data available - static const int MESSAGES_ERROR_NO_DATA = -24181497; - - /// < Permission denied - static const int MESSAGES_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int MESSAGES_ERROR_NOT_SUPPORTED = -1073741822; -} - -/// @brief The messaging service handle. -/// @since_tizen 2.3 -typedef messages_service_h = ffi.Pointer; - -/// @brief The message handle. -/// @since_tizen 2.3 -typedef messages_message_h = ffi.Pointer; - -/// @brief Called when the process of sending a message to all recipients finishes. -/// @since_tizen 2.3 -/// @param[in] result The result of message sending -/// @param[in] user_data The user data passed from the callback registration function -/// @pre messages_send_message() will invoke this callback function. -/// @see messages_send_message() -typedef messages_sent_cb - = ffi.Pointer>; -typedef messages_sent_cbFunction = ffi.Void Function( - ffi.Int32 result, ffi.Pointer user_data); -typedef Dartmessages_sent_cbFunction = void Function( - int result, ffi.Pointer user_data); - -/// @brief Called when a message is retrieved from a search request. -/// @since_tizen 2.3 -/// @remarks You should not call messages_destroy_message() with @a msg. -/// @param[in] msg The message handle \n -/// It can be @c NULL if nothing is found -/// @param[in] user_data The user data passed from the foreach function -/// @param[in] index The index of a message from the messages that have been retrieved as a search result -/// @param[in] result_count The count of the messages that have been retrieved as a result applying @a limit and @a offset \n -/// If the search has a @a limit, then this value is always equal or less than the limit -/// @param[in] total_count The count of the messages that have been retrieved as a result without applying @a limit and @a offset \n -/// The value can be used to calculate the total number of page views for the searched messages. \n -/// For example, if the count of message search is @c 50 and the limit is @c 20, then using this value, you can notice the total page is @c 3 -/// @return @c true to continue with the next iteration of the loop, -/// otherwise return @c false to break out of the loop -/// @pre messages_foreach_message() will invoke this callback function. -/// @see messages_foreach_message() -typedef messages_search_cb - = ffi.Pointer>; -typedef messages_search_cbFunction = ffi.Bool Function( - messages_message_h msg, - ffi.Int index, - ffi.Int result_count, - ffi.Int total_count, - ffi.Pointer user_data); -typedef Dartmessages_search_cbFunction = bool Function( - messages_message_h msg, - int index, - int result_count, - int total_count, - ffi.Pointer user_data); - -/// @brief Called when an incoming message is received. -/// @since_tizen 2.3 -/// @param[in] incoming_msg The incoming message -/// @param[in] user_data The user data passed from the callback registration function -/// @pre You register this callback using messages_set_message_incoming_cb() for getting an incoming message. -/// @see messages_set_message_incoming_cb() -/// @see messages_unset_message_incoming_cb() -typedef messages_incoming_cb - = ffi.Pointer>; -typedef messages_incoming_cbFunction = ffi.Void Function( - messages_message_h incoming_msg, ffi.Pointer user_data); -typedef Dartmessages_incoming_cbFunction = void Function( - messages_message_h incoming_msg, ffi.Pointer user_data); - -/// @brief Called when an incoming push message is received. -/// @since_tizen 2.3 -/// @param[in] header The header of the push message -/// @param[in] body The body of the push message \n -/// It is not a null-terminated string -/// @param[in] body_length The length of @a body -/// @param[in] user_data The user data to be passed to the callback function -/// @pre You register this callback using messages_push_set_incoming_cb() for getting an incoming message. -/// @see messages_push_set_incoming_cb() -/// @see messages_push_unset_incoming_cb() -typedef messages_push_incoming_cb - = ffi.Pointer>; -typedef messages_push_incoming_cbFunction = ffi.Void Function( - ffi.Pointer header, - ffi.Pointer body, - ffi.Int body_length, - ffi.Pointer user_data); -typedef Dartmessages_push_incoming_cbFunction = void Function( - ffi.Pointer header, - ffi.Pointer body, - int body_length, - ffi.Pointer user_data); - -/// @brief Enumeration for sound manager's error codes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sound_manager_error_e { - /// < Successful - static const int SOUND_MANAGER_ERROR_NONE = 0; - - /// < Out of memory - static const int SOUND_MANAGER_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int SOUND_MANAGER_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid operation - static const int SOUND_MANAGER_ERROR_INVALID_OPERATION = -38; - - /// < Permission denied - static const int SOUND_MANAGER_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int SOUND_MANAGER_ERROR_NOT_SUPPORTED = -1073741822; - - /// < No data - static const int SOUND_MANAGER_ERROR_NO_DATA = -61; - - /// < Internal error inside the sound system - static const int SOUND_MANAGER_ERROR_INTERNAL = -26607615; - - /// < Noncompliance with the sound system policy - static const int SOUND_MANAGER_ERROR_POLICY = -26607614; - - /// < No playing sound - static const int SOUND_MANAGER_ERROR_NO_PLAYING_SOUND = -26607613; - - /// < Invalid state (Since 3.0) - static const int SOUND_MANAGER_ERROR_INVALID_STATE = -26607612; -} - -/// @brief Enumeration for sound type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sound_type_e { - /// < Sound type for system - static const int SOUND_TYPE_SYSTEM = 0; - - /// < Sound type for notifications - static const int SOUND_TYPE_NOTIFICATION = 1; - - /// < Sound type for alarm - static const int SOUND_TYPE_ALARM = 2; - - /// < Sound type for ringtones (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int SOUND_TYPE_RINGTONE = 3; - - /// < Sound type for media - static const int SOUND_TYPE_MEDIA = 4; - - /// < Sound type for call (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int SOUND_TYPE_CALL = 5; - - /// < Sound type for voip (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int SOUND_TYPE_VOIP = 6; - - /// < Sound type for voice - static const int SOUND_TYPE_VOICE = 7; -} - -final class sound_stream_info_s extends ffi.Opaque {} - -/// @brief Enumeration for sound stream type. -/// @since_tizen 3.0 -abstract class sound_stream_type_e { - /// < Sound stream type for media - static const int SOUND_STREAM_TYPE_MEDIA = 0; - - /// < Sound stream type for system - static const int SOUND_STREAM_TYPE_SYSTEM = 1; - - /// < Sound stream type for alarm - static const int SOUND_STREAM_TYPE_ALARM = 2; - - /// < Sound stream type for notification - static const int SOUND_STREAM_TYPE_NOTIFICATION = 3; - - /// < Sound stream type for emergency - static const int SOUND_STREAM_TYPE_EMERGENCY = 4; - - /// < Sound stream type for voice information - static const int SOUND_STREAM_TYPE_VOICE_INFORMATION = 5; - - /// < Sound stream type for voice recognition - static const int SOUND_STREAM_TYPE_VOICE_RECOGNITION = 6; - - /// < Sound stream type for ringtone for VoIP - static const int SOUND_STREAM_TYPE_RINGTONE_VOIP = 7; - - /// < Sound stream type for VoIP - static const int SOUND_STREAM_TYPE_VOIP = 8; - - /// < Sound stream type for media only for external devices - static const int SOUND_STREAM_TYPE_MEDIA_EXTERNAL_ONLY = 9; -} - -/// @brief Enumeration for change reason of sound stream focus state. -/// @since_tizen 3.0 -abstract class sound_stream_focus_change_reason_e { - /// < Changed by the stream type for media - static const int SOUND_STREAM_FOCUS_CHANGED_BY_MEDIA = 0; - - /// < Changed by the stream type for system - static const int SOUND_STREAM_FOCUS_CHANGED_BY_SYSTEM = 1; - - /// < Changed by the stream type for alarm - static const int SOUND_STREAM_FOCUS_CHANGED_BY_ALARM = 2; - - /// < Changed by the stream type for notification - static const int SOUND_STREAM_FOCUS_CHANGED_BY_NOTIFICATION = 3; - - /// < Changed by the stream type for emergency - static const int SOUND_STREAM_FOCUS_CHANGED_BY_EMERGENCY = 4; - - /// < Changed by the stream type for voice information - static const int SOUND_STREAM_FOCUS_CHANGED_BY_VOICE_INFORMATION = 5; - - /// < Changed by the stream type for voice recognition - static const int SOUND_STREAM_FOCUS_CHANGED_BY_VOICE_RECOGNITION = 6; - - /// < Changed by the stream type for ringtone - static const int SOUND_STREAM_FOCUS_CHANGED_BY_RINGTONE = 7; - - /// < Changed by the stream type for VoIP - static const int SOUND_STREAM_FOCUS_CHANGED_BY_VOIP = 8; - - /// < Changed by the stream type for voice-call or video-call - static const int SOUND_STREAM_FOCUS_CHANGED_BY_CALL = 9; - - /// < Changed by the stream type for media only for external devices - static const int SOUND_STREAM_FOCUS_CHANGED_BY_MEDIA_EXTERNAL_ONLY = 10; -} - -/// @brief Enumeration for sound stream focus mask. -/// @since_tizen 3.0 -abstract class sound_stream_focus_mask_e { - /// < Mask for playback focus - static const int SOUND_STREAM_FOCUS_FOR_PLAYBACK = 1; - - /// < Mask for recording focus - static const int SOUND_STREAM_FOCUS_FOR_RECORDING = 2; - - /// < Mask for both playback and recording focus - static const int SOUND_STREAM_FOCUS_FOR_BOTH = 3; -} - -/// @brief Enumeration for sound stream focus state. -/// @since_tizen 3.0 -abstract class sound_stream_focus_state_e { - /// < Focus state for release - static const int SOUND_STREAM_FOCUS_STATE_RELEASED = 0; - - /// < Focus state for acquisition - static const int SOUND_STREAM_FOCUS_STATE_ACQUIRED = 1; -} - -/// @brief Enumeration for sound behavior. -/// @since_tizen 3.0 -/// @remarks These values can be combined with bitwise 'or'. -/// @see sound_manager_get_current_playback_focus() -/// @see sound_manager_get_current_recording_focus() -abstract class sound_behavior_e { - /// < None (default) - static const int SOUND_BEHAVIOR_NONE = 0; - - /// < No resumption - static const int SOUND_BEHAVIOR_NO_RESUME = 1; - - /// < Fading effect - static const int SOUND_BEHAVIOR_FADING = 2; -} - -/// @deprecated Deprecated since 3.0. Use sound_manager_create_stream_information() and sound_stream_type_e instead. -/// @brief Enumeration for session type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sound_session_type_e { - /// < Media type - static const int SOUND_SESSION_TYPE_MEDIA = 0; - - /// < Alarm type - static const int SOUND_SESSION_TYPE_ALARM = 1; - - /// < Notification type - static const int SOUND_SESSION_TYPE_NOTIFICATION = 2; - - /// < Emergency type - static const int SOUND_SESSION_TYPE_EMERGENCY = 3; - - /// < VoIP type - static const int SOUND_SESSION_TYPE_VOIP = 4; -} - -/// @deprecated Deprecated since 3.0. Use sound_manager_acquire_focus() or not instead. -/// @brief Enumeration for session option for starting. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sound_session_option_for_starting_e { - /// < This session will be mixed with others when starting (default) - static const int SOUND_SESSION_OPTION_MIX_WITH_OTHERS_WHEN_START = 0; - - /// < This session will interrupt other sessions when starting - static const int SOUND_SESSION_OPTION_PAUSE_OTHERS_WHEN_START = 1; -} - -/// @deprecated Deprecated since 3.0. In sound_stream_focus_state_changed_cb, you can choose to stop playing or not. -/// @brief Enumeration for session option during play. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sound_session_option_for_during_play_e { - /// < This session will be interrupted by other sessions during play (default) - static const int SOUND_SESSION_OPTION_INTERRUPTIBLE_DURING_PLAY = 0; - - /// < This session will not be interrupted by other media sessions - static const int SOUND_SESSION_OPTION_UNINTERRUPTIBLE_DURING_PLAY = 1; -} - -/// @deprecated Deprecated since 3.0. In sound_stream_focus_state_changed_cb, you can choose to resume playing or not. -/// @brief Enumeration for session option for resumption. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sound_session_option_for_resumption_e { - /// < This session will be resumed according to system policy (default) - static const int SOUND_SESSION_OPTION_RESUMPTION_BY_SYSTEM = 0; - - /// < This session will be resumed according to system policy and when the media session which interrupted this session is paused - static const int SOUND_SESSION_OPTION_RESUMPTION_BY_SYSTEM_OR_MEDIA_PAUSED = - 1; -} - -/// @deprecated Deprecated since 3.0. Use sound_manager_apply_stream_routing() instead. -/// @brief Enumeration for voip session mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sound_session_voip_mode_e { - /// < voip mode for ringtone - static const int SOUND_SESSION_VOIP_MODE_RINGTONE = 0; - - /// < voip mode for during call with built-in receiver - static const int SOUND_SESSION_VOIP_MODE_VOICE_WITH_BUILTIN_RECEIVER = 1; - - /// < voip mode for during call with built-in speaker - static const int SOUND_SESSION_VOIP_MODE_VOICE_WITH_BUILTIN_SPEAKER = 2; - - /// < voip mode for during call with audio jack - static const int SOUND_SESSION_VOIP_MODE_VOICE_WITH_AUDIO_JACK = 3; - - /// < voip mode for during call with bluetooth - static const int SOUND_SESSION_VOIP_MODE_VOICE_WITH_BLUETOOTH = 4; -} - -/// @deprecated Deprecated since 3.0. Use sound_stream_focus_state_changed_cb instead. -/// @brief Enumeration for sound session interrupted type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sound_session_interrupted_code_e { - /// < Interrupt completed - static const int SOUND_SESSION_INTERRUPTED_COMPLETED = 0; - - /// < Interrupted by media application - static const int SOUND_SESSION_INTERRUPTED_BY_MEDIA = 1; - - /// < Interrupted by an incoming call - static const int SOUND_SESSION_INTERRUPTED_BY_CALL = 2; - - /// < Interrupted by unplugging headphones - static const int SOUND_SESSION_INTERRUPTED_BY_EARJACK_UNPLUG = 3; - - /// < Interrupted by a resource conflict - static const int SOUND_SESSION_INTERRUPTED_BY_RESOURCE_CONFLICT = 4; - - /// < Interrupted by an alarm - static const int SOUND_SESSION_INTERRUPTED_BY_ALARM = 5; - - /// < Interrupted by an emergency - static const int SOUND_SESSION_INTERRUPTED_BY_EMERGENCY = 6; - - /// < Interrupted by a notification - static const int SOUND_SESSION_INTERRUPTED_BY_NOTIFICATION = 7; -} - -/// @brief Enumeration for sound device type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sound_device_type_e { - /// < Built-in speaker - static const int SOUND_DEVICE_BUILTIN_SPEAKER = 0; - - /// < Built-in receiver - static const int SOUND_DEVICE_BUILTIN_RECEIVER = 1; - - /// < Built-in mic - static const int SOUND_DEVICE_BUILTIN_MIC = 2; - - /// < Audio jack that can be connected to wired accessory such as headphone, headset, and so on - static const int SOUND_DEVICE_AUDIO_JACK = 3; - - /// < Bluetooth (Deprecated since 3.0) - static const int SOUND_DEVICE_BLUETOOTH = 4; - - /// < Bluetooth device representing media (A2DP) profile (Since 3.0) - static const int SOUND_DEVICE_BLUETOOTH_MEDIA = 4; - - /// < HDMI - static const int SOUND_DEVICE_HDMI = 5; - - /// < MIRRORING (Deprecated since 3.0) - static const int SOUND_DEVICE_MIRRORING = 6; - - /// < Device for forwarding (Since 3.0) - static const int SOUND_DEVICE_FORWARDING = 6; - - /// < USB Audio - static const int SOUND_DEVICE_USB_AUDIO = 7; - - /// < Bluetooth device representing voice (SCO) profile (Since 3.0) - static const int SOUND_DEVICE_BLUETOOTH_VOICE = 8; -} - -/// @brief Enumeration for sound device direction. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sound_device_io_direction_e { - /// < Input device - static const int SOUND_DEVICE_IO_DIRECTION_IN = 0; - - /// < Output device - static const int SOUND_DEVICE_IO_DIRECTION_OUT = 1; - - /// < Input/output device (both directions are available) - static const int SOUND_DEVICE_IO_DIRECTION_BOTH = 2; -} - -/// @deprecated Deprecated since 4.0. -/// @brief Enumeration for sound device state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sound_device_state_e { - /// < Deactivated state - static const int SOUND_DEVICE_STATE_DEACTIVATED = 0; - - /// < Activated state - static const int SOUND_DEVICE_STATE_ACTIVATED = 1; -} - -/// @brief Enumeration for sound device mask. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sound_device_mask_e { - /// < Mask for input devices - static const int SOUND_DEVICE_IO_DIRECTION_IN_MASK = 1; - - /// < Mask for output devices - static const int SOUND_DEVICE_IO_DIRECTION_OUT_MASK = 2; - - /// < Mask for input/output devices (both directions are available) - static const int SOUND_DEVICE_IO_DIRECTION_BOTH_MASK = 4; - - /// < Mask for built-in devices - static const int SOUND_DEVICE_TYPE_INTERNAL_MASK = 16; - - /// < Mask for external devices - static const int SOUND_DEVICE_TYPE_EXTERNAL_MASK = 32; - - /// < Mask for deactivated devices - static const int SOUND_DEVICE_STATE_DEACTIVATED_MASK = 4096; - - /// < Mask for activated devices - static const int SOUND_DEVICE_STATE_ACTIVATED_MASK = 8192; - - /// < Mask for all devices - static const int SOUND_DEVICE_ALL_MASK = 65535; -} - -/// @deprecated Deprecated since 3.0. Use sound_manager_add_device_state_changed_cb() instead. -/// @brief Enumeration for changed information of sound device. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sound_device_changed_info_e { - /// < State of the device was changed - static const int SOUND_DEVICE_CHANGED_INFO_STATE = 0; - - /// < IO direction of the device was changed - static const int SOUND_DEVICE_CHANGED_INFO_IO_DIRECTION = 1; -} - -/// @brief Called when the system volume has changed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] type The sound type of the changed volume -/// @param[in] volume The new volume value -/// @param[in] user_data The user data passed from the callback registration function -/// @pre sound_manager_set_volume() will invoke this callback if you register it using sound_manager_set_volume_changed_cb(). -/// @see sound_manager_set_volume_changed_cb() -/// @see sound_manager_unset_volume_changed_cb() -typedef sound_manager_volume_changed_cb - = ffi.Pointer>; -typedef sound_manager_volume_changed_cbFunction = ffi.Void Function( - ffi.Int32 type, ffi.UnsignedInt volume, ffi.Pointer user_data); -typedef Dartsound_manager_volume_changed_cbFunction = void Function( - int type, int volume, ffi.Pointer user_data); - -/// @brief Called when the state of focus that belongs to the stream_info is changed. -/// @since_tizen 3.0 -/// -/// @remarks This function is issued in the internal thread of the sound manager.\n -/// Therefore it is recommended not to call UI update function in this function. -/// -/// @param[in] stream_info The handle of stream information -/// @param[in] focus_mask The changed focus mask -/// @param[in] focus_state The changed focus state -/// @param[in] reason The reason for state change of the focus -/// @param[in] sound_behavior The requested sound behavior that should be followed, values of #sound_behavior_e combined with bitwise 'or' -/// @param[in] extra_info The extra information -/// @param[in] user_data The user data passed from the callback registration function -/// @pre You should register this callback using sound_manager_create_stream_information(). -/// @see sound_manager_create_stream_information() -/// @see sound_manager_destroy_stream_information() -/// @see sound_manager_get_focus_state() -typedef sound_stream_focus_state_changed_cb = ffi - .Pointer>; -typedef sound_stream_focus_state_changed_cbFunction = ffi.Void Function( - sound_stream_info_h stream_info, - ffi.Int32 focus_mask, - ffi.Int32 focus_state, - ffi.Int32 reason, - ffi.Int sound_behavior, - ffi.Pointer extra_info, - ffi.Pointer user_data); -typedef Dartsound_stream_focus_state_changed_cbFunction = void Function( - sound_stream_info_h stream_info, - int focus_mask, - int focus_state, - int reason, - int sound_behavior, - ffi.Pointer extra_info, - ffi.Pointer user_data); - -/// @brief Sound stream information handle. -/// @since_tizen 3.0 -typedef sound_stream_info_h = ffi.Pointer; - -/// @brief Sound device handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef sound_device_h = ffi.Pointer; - -/// @brief Called when the focus state for each sound stream type is changed regardless of the process. -/// @since_tizen 3.0 -/// -/// @remarks This function is invoked by the internal thread of the sound manager.\n -/// Therefore it is recommended not to call functions which update the UI from this callback. -/// -/// @param[in] id The focus state change watch cb id -/// @param[in] focus_mask The changed focus mask -/// @param[in] focus_state The changed focus state -/// @param[in] reason The reason for state change of the focus -/// @param[in] extra_info The extra information -/// @param[in] user_data The user data passed from the callback registration function -/// @pre You should register this callback using sound_manager_add_focus_state_watch_cb(). -/// @see sound_manager_add_focus_state_watch_cb() -/// @see sound_manager_remove_focus_state_watch_cb() -typedef sound_stream_focus_state_watch_cb = ffi - .Pointer>; -typedef sound_stream_focus_state_watch_cbFunction = ffi.Void Function( - ffi.Int id, - ffi.Int32 focus_mask, - ffi.Int32 focus_state, - ffi.Int32 reason, - ffi.Pointer extra_info, - ffi.Pointer user_data); -typedef Dartsound_stream_focus_state_watch_cbFunction = void Function( - int id, - int focus_mask, - int focus_state, - int reason, - ffi.Pointer extra_info, - ffi.Pointer user_data); - -/// @deprecated Deprecated since 3.0. Use sound_stream_focus_state_changed_cb instead. -/// @brief Called when the playing sound session is interrupted. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] code The interrupted code -/// @param[in] user_data The user data passed from the callback registration function -/// @pre You should register this callback using sound_manager_set_session_interrupted_cb(). -/// @see sound_manager_set_session_interrupted_cb() -/// @see sound_manager_unset_session_interrupted_cb() -typedef sound_session_interrupted_cb - = ffi.Pointer>; -typedef sound_session_interrupted_cbFunction = ffi.Void Function( - ffi.Int32 code, ffi.Pointer user_data); -typedef Dartsound_session_interrupted_cbFunction = void Function( - int code, ffi.Pointer user_data); - -/// @brief Sound device list handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef sound_device_list_h = ffi.Pointer; - -/// @deprecated Deprecated since 3.0. Use sound_device_connection_changed_cb() instead. -/// @brief Called when the state of connection of a sound device was changed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] sound_device_h The sound_device -/// @param[in] is_connected The state of device connection: (@c true = connected, @c false = disconnected) -/// @param[in] user_data The user data passed from the callback registration function -/// @pre You should register this callback using sound_manager_set_device_connected_cb(). -/// @see sound_manager_set_device_connected_cb() -/// @see sound_manager_unset_device_connected_cb() -typedef sound_device_connected_cb - = ffi.Pointer>; -typedef sound_device_connected_cbFunction = ffi.Void Function( - sound_device_h device, - ffi.Bool is_connected, - ffi.Pointer user_data); -typedef Dartsound_device_connected_cbFunction = void Function( - sound_device_h device, bool is_connected, ffi.Pointer user_data); - -/// @brief Called when the connection state of a sound device was changed. -/// @since_tizen 3.0 -/// @param[in] device The sound_device -/// @param[in] is_connected The state of device connection: @c true = connected, @c false = disconnected -/// @param[in] user_data The user data passed from the callback registration function -/// @pre You should add this callback using sound_manager_add_device_connection_changed_cb(). -/// @see sound_manager_add_device_connection_changed_cb() -/// @see sound_manager_remove_device_connection_changed_cb() -typedef sound_device_connection_changed_cb = ffi - .Pointer>; -typedef sound_device_connection_changed_cbFunction = ffi.Void Function( - sound_device_h device, - ffi.Bool is_connected, - ffi.Pointer user_data); -typedef Dartsound_device_connection_changed_cbFunction = void Function( - sound_device_h device, bool is_connected, ffi.Pointer user_data); - -/// @deprecated Deprecated since 3.0. -/// @brief Called when the information of a sound device was changed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] sound_device_h The sound_device -/// @param[in] changed_info The entry of sound device information -/// @param[in] user_data The user data passed from the callback registration function -/// @pre You should register this callback using sound_manager_set_device_information_changed_cb(). -/// @see sound_manager_set_device_information_changed_cb() -/// @see sound_manager_unset_device_information_changed_cb() -typedef sound_device_information_changed_cb = ffi - .Pointer>; -typedef sound_device_information_changed_cbFunction = ffi.Void Function( - sound_device_h device, - ffi.Int32 changed_info, - ffi.Pointer user_data); -typedef Dartsound_device_information_changed_cbFunction = void Function( - sound_device_h device, int changed_info, ffi.Pointer user_data); - -/// @deprecated Deprecated since 4.0. -/// @brief Called when the state of a sound device was changed. -/// @since_tizen 3.0 -/// @param[in] device The sound_device -/// @param[in] state The state of the device -/// @param[in] user_data The user data passed from the callback registration function -/// @pre You should add this callback using sound_manager_add_device_state_changed_cb(). -/// @see sound_manager_add_device_state_changed_cb() -/// @see sound_manager_remove_device_state_changed_cb() -typedef sound_device_state_changed_cb - = ffi.Pointer>; -typedef sound_device_state_changed_cbFunction = ffi.Void Function( - sound_device_h device, ffi.Int32 state, ffi.Pointer user_data); -typedef Dartsound_device_state_changed_cbFunction = void Function( - sound_device_h device, int state, ffi.Pointer user_data); - -final class audio_io_s extends ffi.Opaque {} - -/// @brief Enumeration for audio sample type with bit depth. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class audio_sample_type_e { - /// < Unsigned 8-bit audio samples - static const int AUDIO_SAMPLE_TYPE_U8 = 112; - - /// < Signed 16-bit audio samples - static const int AUDIO_SAMPLE_TYPE_S16_LE = 113; -} - -/// @brief Enumeration for audio channel. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class audio_channel_e { - /// < 1 channel, mono - static const int AUDIO_CHANNEL_MONO = 128; - - /// < 2 channel, stereo - static const int AUDIO_CHANNEL_STEREO = 129; -} - -/// @brief Enumeration for audio input and output state. -/// @since_tizen 3.0 -abstract class audio_io_state_e { - /// < Audio-io handle is created, but not prepared - static const int AUDIO_IO_STATE_IDLE = 0; - - /// < Audio-io handle is ready and the stream is running - static const int AUDIO_IO_STATE_RUNNING = 1; - - /// < Audio-io handle is ready and the stream is paused - static const int AUDIO_IO_STATE_PAUSED = 2; -} - -/// @brief Enumeration for audio input and output error. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class audio_io_error_e { - /// < Successful - static const int AUDIO_IO_ERROR_NONE = 0; - - /// < Out of memory - static const int AUDIO_IO_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int AUDIO_IO_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid operation - static const int AUDIO_IO_ERROR_INVALID_OPERATION = -38; - - /// < Device open error by security - static const int AUDIO_IO_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int AUDIO_IO_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Device policy restriction (Since 3.0) - static const int AUDIO_IO_ERROR_DEVICE_POLICY_RESTRICTION = -1073741820; - - /// < Device open error - static const int AUDIO_IO_ERROR_DEVICE_NOT_OPENED = -26214399; - - /// < Device close error - static const int AUDIO_IO_ERROR_DEVICE_NOT_CLOSED = -26214398; - - /// < Invalid buffer pointer - static const int AUDIO_IO_ERROR_INVALID_BUFFER = -26214397; - - /// < Sound policy error - static const int AUDIO_IO_ERROR_SOUND_POLICY = -26214396; - - /// < Invalid state (Since 3.0) - static const int AUDIO_IO_ERROR_INVALID_STATE = -26214395; - - /// < Not supported stream type (Since 3.0) - static const int AUDIO_IO_ERROR_NOT_SUPPORTED_TYPE = -26214394; -} - -/// @deprecated Deprecated since 3.0 -/// @brief Enumeration for audio IO interrupted messages. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class audio_io_interrupted_code_e { - /// < Interrupt completed - static const int AUDIO_IO_INTERRUPTED_COMPLETED = 0; - - /// < Interrupted by a media application - static const int AUDIO_IO_INTERRUPTED_BY_MEDIA = 1; - - /// < Interrupted by an incoming call - static const int AUDIO_IO_INTERRUPTED_BY_CALL = 2; - - /// < Interrupted by unplugging headphones - static const int AUDIO_IO_INTERRUPTED_BY_EARJACK_UNPLUG = 3; - - /// < Interrupted by a resource conflict - static const int AUDIO_IO_INTERRUPTED_BY_RESOURCE_CONFLICT = 4; - - /// < Interrupted by an alarm - static const int AUDIO_IO_INTERRUPTED_BY_ALARM = 5; - - /// < Interrupted by an emergency - static const int AUDIO_IO_INTERRUPTED_BY_EMERGENCY = 6; - - /// < Interrupted by a notification - static const int AUDIO_IO_INTERRUPTED_BY_NOTIFICATION = 7; -} - -/// @brief The audio input handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef audio_in_h = ffi.Pointer; - -/// @deprecated Deprecated since 3.0. Use sound_stream_focus_state_changed_cb instead. -/// @brief Called when audio input or output is interrupted. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] error_code The interrupted error code -/// @param[in] user_data The user data passed from the callback registration function -/// -/// @see audio_in_set_interrupted_cb() -/// @see audio_out_set_interrupted_cb() -/// @see audio_in_unset_interrupted_cb() -/// @see audio_out_unset_interrupted_cb() -typedef audio_io_interrupted_cb - = ffi.Pointer>; -typedef audio_io_interrupted_cbFunction = ffi.Void Function( - ffi.Int32 code, ffi.Pointer user_data); -typedef Dartaudio_io_interrupted_cbFunction = void Function( - int code, ffi.Pointer user_data); - -/// @brief Called when audio input data is available in asynchronous(event) mode. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks @a use audio_in_peek() to get audio in data inside callback, use audio_in_drop() after use of peeked data. -/// -/// @param[in] handle The handle to the audio input -/// @param[in] nbytes The amount of available audio in data which can be peeked. -/// @param[in] user_data The user data passed from the callback registration function -/// -/// @see audio_in_set_stream_cb() -typedef audio_in_stream_cb - = ffi.Pointer>; -typedef audio_in_stream_cbFunction = ffi.Void Function( - audio_in_h handle, ffi.Size nbytes, ffi.Pointer user_data); -typedef Dartaudio_in_stream_cbFunction = void Function( - audio_in_h handle, int nbytes, ffi.Pointer user_data); - -/// @brief Called when the state of audio input is changed. -/// -/// @since_tizen 3.0 -/// -/// @param[in] handle The handle of the audio input -/// @param[in] previous The previous state of the audio input -/// @param[in] current The current state of the audio input -/// @param[in] by_policy @c true if the state is changed by policy, otherwise @c false if the state is not changed by policy -/// @param[in] user_data The user data passed from the callback registration function -/// -/// @see audio_in_set_state_changed_cb() -/// @see audio_in_unset_state_changed_cb() -typedef audio_in_state_changed_cb - = ffi.Pointer>; -typedef audio_in_state_changed_cbFunction = ffi.Void Function( - audio_in_h handle, - ffi.Int32 previous, - ffi.Int32 current, - ffi.Bool by_policy, - ffi.Pointer user_data); -typedef Dartaudio_in_state_changed_cbFunction = void Function(audio_in_h handle, - int previous, int current, bool by_policy, ffi.Pointer user_data); - -/// @brief The audio output handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef audio_out_h = ffi.Pointer; - -/// @brief Called when audio out data can be written in asynchronous(event) mode. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks @a use audio_out_write() to write pcm data inside this callback. -/// @param[in] handle The handle to the audio output -/// @param[in] nbytes The amount of audio in data which can be written. -/// @param[in] user_data The user data passed from the callback registration function -/// -/// @see audio_out_set_stream_cb() -typedef audio_out_stream_cb - = ffi.Pointer>; -typedef audio_out_stream_cbFunction = ffi.Void Function( - audio_out_h handle, ffi.Size nbytes, ffi.Pointer user_data); -typedef Dartaudio_out_stream_cbFunction = void Function( - audio_out_h handle, int nbytes, ffi.Pointer user_data); - -/// @brief Called when the state of audio output is changed. -/// -/// @since_tizen 3.0 -/// -/// @param[in] handle The handle of the audio output -/// @param[in] previous The previous state of the audio output -/// @param[in] current The current state of the audio output -/// @param[in] by_policy @c true if the state is changed by policy, otherwise @c false if the state is not changed by policy -/// @param[in] user_data The user data passed from the callback registration function -/// -/// @see audio_out_set_state_changed_cb() -/// @see audio_out_unset_state_changed_cb() -typedef audio_out_state_changed_cb - = ffi.Pointer>; -typedef audio_out_state_changed_cbFunction = ffi.Void Function( - audio_out_h handle, - ffi.Int32 previous, - ffi.Int32 current, - ffi.Bool by_policy, - ffi.Pointer user_data); -typedef Dartaudio_out_state_changed_cbFunction = void Function( - audio_out_h handle, - int previous, - int current, - bool by_policy, - ffi.Pointer user_data); - -final class media_format_s extends ffi.Opaque {} - -/// @brief Enumerations of media format error. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class media_format_error_e { - /// < Successful - static const int MEDIA_FORMAT_ERROR_NONE = 0; - - /// < Out of memory - static const int MEDIA_FORMAT_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int MEDIA_FORMAT_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid operation - static const int MEDIA_FORMAT_ERROR_INVALID_OPERATION = -38; - - /// < No space left on device - static const int MEDIA_FORMAT_ERROR_FILE_NO_SPACE_ON_DEVICE = -28; -} - -/// @brief Enumeration for media format type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class media_format_type_e { - /// < media format type is NONE - static const int MEDIA_FORMAT_NONE = 0; - - /// < media format type is AUDIO - static const int MEDIA_FORMAT_AUDIO = 16777216; - - /// < media format type is VIDEO - static const int MEDIA_FORMAT_VIDEO = 33554432; - - /// < media format type is TEXT - static const int MEDIA_FORMAT_TEXT = 50331648; - - /// < media format type is CONTAINER - static const int MEDIA_FORMAT_CONTAINER = 67108864; - - /// < media format type is UNKNOWN - static const int MEDIA_FORMAT_UNKNOWN = 134217728; -} - -/// @brief Enumeration for media format data type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class media_format_data_type_e { - /// < media format data type is encoded type - static const int MEDIA_FORMAT_ENCODED = 268435456; - - /// < media format data type is raw type - static const int MEDIA_FORMAT_RAW = 536870912; -} - -/// @brief Enumeration for media format MIME type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class media_format_mimetype_e { - /// < media format mime type is L16, AUDIO - static const int MEDIA_FORMAT_L16 = 285216784; - - /// < media format mime type is ALAW, AUDIO - static const int MEDIA_FORMAT_ALAW = 285216800; - - /// < media format mime type is ULAW, AUDIO - static const int MEDIA_FORMAT_ULAW = 285216816; - - /// < media format mime type is AMR, AUDIO, indicates MEDIA_FORMAT_AMR_NB (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_AMR = 285216832; - - /// < media format mime type is AMR_NB, AUDIO , (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_AMR_NB = 285216832; - - /// < media format mime type is AMR_WB, AUDIO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_AMR_WB = 285216833; - - /// < media format mime type is G729, AUDIO - static const int MEDIA_FORMAT_G729 = 285216848; - - /// < media format mime type is AAC, AUDIO, indicates MEDIA_FORMAT_AAC_LC (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_AAC = 285216864; - - /// < media format mime type is AAC_LC, AUDIO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_AAC_LC = 285216864; - - /// < media format mime type is AAC_HE, AUDIO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_AAC_HE = 285216865; - - /// < media format mime type is AAC_HE_PS, AUDIO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_AAC_HE_PS = 285216866; - - /// < media format mime type is MP3, AUDIO - static const int MEDIA_FORMAT_MP3 = 285216880; - - /// < media format mime type is MP23, AUDIO, (Since 4.0) - static const int MEDIA_FORMAT_MP2 = 285216881; - - /// < media format mime type is VORBIS, AUDIO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_VORBIS = 285216896; - - /// < media format mime type is FLAC, AUDIO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_FLAC = 285216912; - - /// < media format mime type is WMAV1, AUDIO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_WMAV1 = 285216928; - - /// < media format mime type is WMAV2, AUDIO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_WMAV2 = 285216929; - - /// < media format mime type is WMAVPRO, AUDIO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_WMAPRO = 285216930; - - /// < media format mime type is WMAVLSL, AUDIO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_WMALSL = 285216931; - - /// < media format mime type is AC3, AUDIO, (Since 4.0) - static const int MEDIA_FORMAT_AC3 = 285216945; - - /// < media format mime type is EAC3, AUDIO, (Since 4.0) - static const int MEDIA_FORMAT_EAC3 = 285216946; - - /// < media format mime type is DTS, AUDIO, (Since 4.0) - static const int MEDIA_FORMAT_DTS = 285216961; - - /// < media format mime type is OPUS, AUDIO, (Since 4.0) - static const int MEDIA_FORMAT_OPUS = 285216977; - - /// < media format mime type is PCM, AUDIO, indicates MEDIA_FORMAT_PCM_S16LE (Since 3.0) - static const int MEDIA_FORMAT_PCM = 553653520; - - /// < media format mime type is PCM signed 16-bit little-endian, AUDIO, (Since 3.0) - static const int MEDIA_FORMAT_PCM_S16LE = 553653520; - - /// < media format mime type is PCM signed 24-bit little-endian, AUDIO, (Since 3.0) - static const int MEDIA_FORMAT_PCM_S24LE = 553653521; - - /// < media format mime type is PCM signed 32-bit little-endian, AUDIO, (Since 3.0) - static const int MEDIA_FORMAT_PCM_S32LE = 553653522; - - /// < media format mime type is PCM signed 16-bit big-endian, AUDIO, (Since 3.0) - static const int MEDIA_FORMAT_PCM_S16BE = 553653523; - - /// < media format mime type is PCM signed 24-bit big-endian, AUDIO, (Since 3.0) - static const int MEDIA_FORMAT_PCM_S24BE = 553653524; - - /// < media format mime type is PCM signed 32-bit big-endian, AUDIO, (Since 3.0) - static const int MEDIA_FORMAT_PCM_S32BE = 553653525; - - /// < media format mime type is PCM 32-bit floating point little-endian, AUDIO, (Since 3.0) - static const int MEDIA_FORMAT_PCM_F32LE = 553653526; - - /// < media format mime type is PCM 32-bit floating point big-endian, AUDIO, (Since 3.0) - static const int MEDIA_FORMAT_PCM_F32BE = 553653527; - - /// < media format mime type is PCM unsigned 16-bit little-endian, AUDIO, (Since 4.0) - static const int MEDIA_FORMAT_PCM_U16LE = 553653528; - - /// < media format mime type is PCM unsigned 24-bit little-endian, AUDIO, (Since 4.0) - static const int MEDIA_FORMAT_PCM_U24LE = 553653529; - - /// < media format mime type is PCM unsigned 32-bit little-endian, AUDIO, (Since 4.0) - static const int MEDIA_FORMAT_PCM_U32LE = 553653530; - - /// < media format mime type is PCM unsigned 16-bit big-endian, AUDIO, (Since 4.0) - static const int MEDIA_FORMAT_PCM_U16BE = 553653531; - - /// < media format mime type is PCM unsigned 24-bit big-endian, AUDIO, (Since 4.0) - static const int MEDIA_FORMAT_PCM_U24BE = 553653532; - - /// < media format mime type is PCM unsigned 32-bit big-endian, AUDIO, (Since 4.0) - static const int MEDIA_FORMAT_PCM_U32BE = 553653533; - - /// < media format mime type is PCM A-law, AUDIO - static const int MEDIA_FORMAT_PCMA = 553653536; - - /// < media format mime type is PCM U-law, AUDIO - static const int MEDIA_FORMAT_PCMU = 553653552; - - /// < media format mime type is H261, VIDEO - static const int MEDIA_FORMAT_H261 = 301998096; - - /// < media format mime type is H263, VIDEO - static const int MEDIA_FORMAT_H263 = 301998112; - - /// < media format mime type is H263P, VIDEO - static const int MEDIA_FORMAT_H263P = 301998113; - - /// < media format mime type is H263 Baseline Profile, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_H263_BLP = 301998114; - - /// < media format mime type is H263 H.320 Coding Efficiency Profile, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_H263_H320_CEP = 301998115; - - /// < media format mime type is H263 Backward-Compatibility Profile, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_H263_BCP = 301998116; - - /// < media format mime type is H263 Interactive and Streaming Wireless Profile, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_H263_ISW2P = 301998117; - - /// < media format mime type is H263 Interactive and Streaming Wireless Profile, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_H263_ISW3P = 301998118; - - /// < media format mime type is H263 Conversation High Compression Profile, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_H263_CHCP = 301998119; - - /// < media format mime type is H263 Conversational Internet Profile, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_H263_C_INTERNETP = 301998120; - - /// < media format mime type is H263 Conversational Interlace Profile, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_H263_C_INTERLACEP = 301998121; - - /// < media format mime type is H263 High Latency Profile, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_H263_HLP = 301998122; - - /// < media format mime type is H264 baseline profile, VIDEO - static const int MEDIA_FORMAT_H264_SP = 301998128; - - /// < media format mime type is H264 main profile, VIDEO - static const int MEDIA_FORMAT_H264_MP = 301998129; - - /// < media format mime type is H264 high profile, VIDEO - static const int MEDIA_FORMAT_H264_HP = 301998130; - - /// < media format mime type is H264 Extended Profile, VIDEO (Since 3.0) - static const int MEDIA_FORMAT_H264_EXTP = 301998131; - - /// < media format mime type is H264 High10 Profile, VIDEO (Since 3.0) - static const int MEDIA_FORMAT_H264_H10P = 301998132; - - /// < media format mime type is H264 High422 Profile, VIDEO (Since 3.0) - static const int MEDIA_FORMAT_H264_H422P = 301998133; - - /// < media format mime type is H264 High444 Profile, VIDEO (Since 3.0) - static const int MEDIA_FORMAT_H264_H444P = 301998134; - - /// < media format mime type is H264 CAVLC444 Profile, VIDEO (Since 3.0) - static const int MEDIA_FORMAT_H264_C444P = 301998135; - - /// < media format mime type is MJPEG, VIDEO - static const int MEDIA_FORMAT_MJPEG = 301998144; - - /// < media format mime type is MPEG1, VIDEO - static const int MEDIA_FORMAT_MPEG1 = 301998160; - - /// < media format mime type is MPEG2 simple profile, VIDEO - static const int MEDIA_FORMAT_MPEG2_SP = 301998176; - - /// < media format mime type is MPEG2 main profile, VIDEO - static const int MEDIA_FORMAT_MPEG2_MP = 301998177; - - /// < media format mime type is MPEG2 high profile, VIDEO - static const int MEDIA_FORMAT_MPEG2_HP = 301998178; - - /// < media format mime type is MPEG4 simple profile, VIDEO - static const int MEDIA_FORMAT_MPEG4_SP = 301998192; - - /// < media format mime type is MPEG4 advanced simple profile, VIDEO - static const int MEDIA_FORMAT_MPEG4_ASP = 301998193; - - /// < media format mime type is HEVC, VIDEO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_HEVC = 301998208; - - /// < media format mime type is HEVC Main Profile, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_HEVC_MP = 301998209; - - /// < media format mime type is HEVC Main10 Profile, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_HEVC_M10P = 301998210; - - /// < media format mime type is VP8, VIDEO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_VP8 = 301998224; - - /// < media format mime type is VP9, VIDEO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_VP9 = 301998240; - - /// < media format mime type is VC1, VIDEO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_VC1 = 301998256; - - /// < media format mime type is DIVX4, VIDEO, (Since 4.0) - static const int MEDIA_FORMAT_DIVX4 = 301998276; - - /// < media format mime type is DIVX5, VIDEO, (Since 4.0) - static const int MEDIA_FORMAT_DIVX5 = 301998277; - - /// < media format mime type is XVID, VIDEO, (Since 4.0) - static const int MEDIA_FORMAT_XVID = 301998288; - - /// < media format mime type is I420, VIDEO - static const int MEDIA_FORMAT_I420 = 570434832; - - /// < media format mime type is NV12, VIDEO - static const int MEDIA_FORMAT_NV12 = 570434848; - - /// < media format mime type is NV12T, VIDEO - static const int MEDIA_FORMAT_NV12T = 570434864; - - /// < media format mime type is YV12, VIDEO - static const int MEDIA_FORMAT_YV12 = 570434880; - - /// < media format mime type is NV21, VIDEO - static const int MEDIA_FORMAT_NV21 = 570434896; - - /// < media format mime type is NV16, VIDEO - static const int MEDIA_FORMAT_NV16 = 570434912; - - /// < media format mime type is YUYV, VIDEO - static const int MEDIA_FORMAT_YUYV = 570434928; - - /// < media format mime type is UYVY, VIDEO - static const int MEDIA_FORMAT_UYVY = 570434944; - - /// < media format mime type is 422P, VIDEO - static const int MEDIA_FORMAT_422P = 570434960; - - /// < media format mime type is RGB565, VIDEO - static const int MEDIA_FORMAT_RGB565 = 570434976; - - /// < media format mime type is RGB888, VIDEO - static const int MEDIA_FORMAT_RGB888 = 570434992; - - /// < media format mime type is RGBA, VIDEO - static const int MEDIA_FORMAT_RGBA = 570435008; - - /// < media format mime type is ARGB, VIDEO - static const int MEDIA_FORMAT_ARGB = 570435024; - - /// < media format mime type is BGRA, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_BGRA = 570435040; - - /// < media format mime type is MP4 container, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_CONTAINER_MP4 = 67121168; - - /// < media format mime type is AVI container, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_CONTAINER_AVI = 67121184; - - /// < media format mime type is MPEG2TS container, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_CONTAINER_MPEG2TS = 67121200; - - /// < media format mime type is MPEG2PS container, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_CONTAINER_MPEG2PS = 67121216; - - /// < media format mime type is MATROSKA container, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_CONTAINER_MATROSKA = 67121232; - - /// < media format mime type is WEBM container, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_CONTAINER_WEBM = 67121248; - - /// < media format mime type is 3GP container, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_CONTAINER_3GP = 67121264; - - /// < media format mime type is WAV container, AUDIO, (Since 3.0) - static const int MEDIA_FORMAT_CONTAINER_WAV = 67125264; - - /// < media format mime type is OGG container, AUDIO, (Since 3.0) - static const int MEDIA_FORMAT_CONTAINER_OGG = 67125280; - - /// < media format mime type is AAC_ADTS container, AUDIO, (Since 3.0) - static const int MEDIA_FORMAT_CONTAINER_AAC_ADTS = 67125296; - - /// < media format mime type is AAC_ADIF container, AUDIO, (Since 3.0) - static const int MEDIA_FORMAT_CONTAINER_AAC_ADIF = 67125297; - - /// < media format mime type is HW dependent, VIDEO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_NATIVE_VIDEO = 570454016; - - /// < media format mime type is MP4, TEXT, (Since 3.0) - static const int MEDIA_FORMAT_TEXT_MP4 = 318799888; - - /// < media format mime type is 3GP, TEXT, (Since 3.0) - static const int MEDIA_FORMAT_TEXT_3GP = 318799904; - - /// < media format mime type is MEDIA_FORMAT_MAX, Do not use - static const int MEDIA_FORMAT_MAX = 318799905; -} - -/// @brief Enumeration for media color model. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class media_format_color_model_e { - /// < media format color model is NONE - static const int MEDIA_COLOR_MODEL_NONE = 0; - - /// < media format color model is RGB - static const int MEDIA_COLOR_MODEL_RGB = 1; - - /// < media format color model is YUV - static const int MEDIA_COLOR_MODEL_YUV = 2; -} - -/// @brief Enumeration for media format aac header type. -/// @since_tizen 3.0 -abstract class media_format_aac_header_type_e { - /// < media format aac header type is RAW, no header - static const int MEDIA_FORMAT_AAC_HEADER_NONE = 0; - - /// < media format aac header type is ADTS header - static const int MEDIA_FORMAT_AAC_HEADER_ADTS = 1; - - /// < media format aac header type is ADIF header - static const int MEDIA_FORMAT_AAC_HEADER_ADIF = 2; - - /// < media format aac header type is UNKNOWN - static const int MEDIA_FORMAT_AAC_HEADER_UNKNOWN = 3; -} - -/// @brief Enumeration for media format text type. -/// @since_tizen 3.0 -abstract class media_format_text_type_e { - /// < media format text type is none - static const int MEDIA_FORMAT_TEXT_TYPE_NONE = 0; - - /// < media format text type is MPEG-4 Timed Text - static const int MEDIA_FORMAT_TEXT_TYPE_TIMED_TEXT_MP4 = 1; - - /// < media format text type is 3GPP Timed Text - static const int MEDIA_FORMAT_TEXT_TYPE_TIMED_TEXT_3GPP = 2; - - /// < media format text type is unknown - static const int MEDIA_FORMAT_TEXT_TYPE_UNKNOWN = 3; -} - -/// @brief Media Format handle type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef media_format_h = ffi.Pointer; - -/// @brief Enumeration for tbm_surface error type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class tbm_surface_error_e { - /// < Successful - static const int TBM_SURFACE_ERROR_NONE = 0; - - /// < Invalid parameter - static const int TBM_SURFACE_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid Operation - static const int TBM_SURFACE_ERROR_INVALID_OPERATION = -38; -} - -/// @brief Definition for the TBM plane struct. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -final class _tbm_surface_plane extends ffi.Struct { - /// < Plane pointer - external ffi.Pointer ptr; - - /// < Plane size - @ffi.Uint32() - external int size; - - /// < Plane offset - @ffi.Uint32() - external int offset; - - /// < Plane stride - @ffi.Uint32() - external int stride; - - /// < Reserved pointer1 - external ffi.Pointer reserved1; - - /// < Reserved pointer2 - external ffi.Pointer reserved2; - - /// < Reserved pointer3 - external ffi.Pointer reserved3; -} - -/// @brief Definition for the TBM surface information struct. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -final class _tbm_surface_info extends ffi.Struct { - /// < TBM surface width - @ffi.Uint32() - external int width; - - /// < TBM surface height - @ffi.Uint32() - external int height; - - /// < TBM surface format - @tbm_format() - external int format; - - /// < TBM surface bbp - @ffi.Uint32() - external int bpp; - - /// < TBM surface size - @ffi.Uint32() - external int size; - - /// < The number of planes - @ffi.Uint32() - external int num_planes; - - /// < Array of planes - @ffi.Array.multi([4]) - external ffi.Array planes; - - /// < Reserved pointer4 - external ffi.Pointer reserved4; - - /// < Reserved pointer5 - external ffi.Pointer reserved5; - - /// < Reserved pointer6 - external ffi.Pointer reserved6; -} - -/// @brief Definition for the Tizen buffer surface format. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef tbm_format = ffi.Uint32; -typedef Darttbm_format = int; - -/// @brief Definition for the TBM plane struct. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef tbm_surface_plane_s = _tbm_surface_plane; - -/// @brief Definition for the Tizen buffer surface. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef tbm_surface_h = ffi.Pointer<_tbm_surface>; - -final class _tbm_surface extends ffi.Opaque {} - -/// @brief Definition for the TBM surface information struct. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef tbm_surface_info_s = _tbm_surface_info; - -final class media_packet_s extends ffi.Opaque {} - -/// @brief Enumeration for media packet error. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class media_packet_error_e { - /// < Successful - static const int MEDIA_PACKET_ERROR_NONE = 0; - - /// < Out of memory - static const int MEDIA_PACKET_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int MEDIA_PACKET_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid operation - static const int MEDIA_PACKET_ERROR_INVALID_OPERATION = -38; - - /// < No space left on device - static const int MEDIA_PACKET_ERROR_FILE_NO_SPACE_ON_DEVICE = -28; - - /// < No Available packet, (Since 3.0) - static const int MEDIA_PACKET_ERROR_NO_AVAILABLE_PACKET = -27394047; -} - -/// @brief Enumeration for media buffer flag. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class media_buffer_flags_e { - /// < The buffer marked as such contains codec initialization/codec specific data instead of media data - static const int MEDIA_PACKET_CODEC_CONFIG = 1; - - /// < The end of stream - static const int MEDIA_PACKET_END_OF_STREAM = 2; - - /// < The buffer marked as such contains the data for a sync frame - static const int MEDIA_PACKET_SYNC_FRAME = 4; -} - -/// @brief Enumeration for the return values of media packet finalize call back functions. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @see media_packet_finalize_cb() -abstract class finalize_cb_ret { - /// < Packet handle is not destroyed - static const int MEDIA_PACKET_REUSE = 0; - - /// < Destroy packet handle - static const int MEDIA_PACKET_FINALIZE = 1; -} - -/// @brief Called when the media packet is destroyed. -/// @details It will be invoked when media_packet_destroy() is called. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @param[in] packet The media packet handle -/// @param[in] error_code The error code of #media_packet_error_e -/// @param[in] user_data The user data passed from the callback registration function -/// -/// @pre It will be invoked when media packet is destroyed. -/// -/// @retval #MEDIA_PACKET_REUSE Packet handle is not destroyed, the handle will be reused. -/// @retval #MEDIA_PACKET_FINALIZE Destroy media packet handle, the handle will not be reused. -/// -/// @see media_packet_destroy() -/// @see media_packet_create_alloc() -/// @see media_packet_create() -/// @see media_packet_copy() -/// @see media_packet_create_from_tbm_surface() -typedef media_packet_finalize_cb - = ffi.Pointer>; -typedef media_packet_finalize_cbFunction = ffi.Int Function( - media_packet_h packet, ffi.Int error_code, ffi.Pointer user_data); -typedef Dartmedia_packet_finalize_cbFunction = int Function( - media_packet_h packet, int error_code, ffi.Pointer user_data); - -/// @brief The Media Packet handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef media_packet_h = ffi.Pointer; - -/// @brief Enumeration for the error codes of Camera. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_error_e { - /// < Successful - static const int CAMERA_ERROR_NONE = 0; - - /// < Invalid parameter - static const int CAMERA_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid state - static const int CAMERA_ERROR_INVALID_STATE = -26279934; - - /// < Out of memory - static const int CAMERA_ERROR_OUT_OF_MEMORY = -12; - - /// < Device error - static const int CAMERA_ERROR_DEVICE = -26279932; - - /// < Internal error - static const int CAMERA_ERROR_INVALID_OPERATION = -38; - - /// < Blocked by Audio Session Manager (Deprecated since 3.0) - static const int CAMERA_ERROR_SOUND_POLICY = -26279930; - - /// < Restricted by security system policy - static const int CAMERA_ERROR_SECURITY_RESTRICTED = -26279929; - - /// < The device is using another application or working on some operation - static const int CAMERA_ERROR_DEVICE_BUSY = -26279928; - - /// < No camera device - static const int CAMERA_ERROR_DEVICE_NOT_FOUND = -26279927; - - /// < Blocked by Audio Session Manager - CALL (Deprecated since 3.0) - static const int CAMERA_ERROR_SOUND_POLICY_BY_CALL = -26279926; - - /// < Blocked by Audio Session Manager - ALARM (Deprecated since 3.0) - static const int CAMERA_ERROR_SOUND_POLICY_BY_ALARM = -26279925; - - /// < ESD situation - static const int CAMERA_ERROR_ESD = -26279924; - - /// < The access to the resources can not be granted - static const int CAMERA_ERROR_PERMISSION_DENIED = -13; - - /// < The feature is not supported - static const int CAMERA_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Blocked by resource conflict (Since 3.0) - static const int CAMERA_ERROR_RESOURCE_CONFLICT = -26279923; - - /// < Socket connection lost (Since 3.0) - static const int CAMERA_ERROR_SERVICE_DISCONNECTED = -26279922; -} - -/// @brief Enumeration for the camera state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_state_e { - /// < Before creating - static const int CAMERA_STATE_NONE = 0; - - /// < Created, but not initialized yet - static const int CAMERA_STATE_CREATED = 1; - - /// < Preview - static const int CAMERA_STATE_PREVIEW = 2; - - /// < While capturing - static const int CAMERA_STATE_CAPTURING = 3; - - /// < After capturing - static const int CAMERA_STATE_CAPTURED = 4; -} - -/// @brief Enumeration for the camera device state. -/// @since_tizen 3.0 -abstract class camera_device_state_e { - /// < Not opened - static const int CAMERA_DEVICE_STATE_NULL = 0; - - /// < Opened - static const int CAMERA_DEVICE_STATE_OPENED = 1; - - /// < Now previewing or capturing or is being used for video recording - static const int CAMERA_DEVICE_STATE_WORKING = 2; -} - -/// @brief Enumeration for the camera device. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_device_e { - /// < Primary camera - static const int CAMERA_DEVICE_CAMERA0 = 0; - - /// < Secondary camera - static const int CAMERA_DEVICE_CAMERA1 = 1; -} - -/// @brief Enumeration for the camera pixel format. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_pixel_format_e { - /// < Invalid pixel format - static const int CAMERA_PIXEL_FORMAT_INVALID = -1; - - /// < NV12 pixel format - static const int CAMERA_PIXEL_FORMAT_NV12 = 0; - - /// < NV12 Tiled pixel format - static const int CAMERA_PIXEL_FORMAT_NV12T = 1; - - /// < NV16 pixel format - static const int CAMERA_PIXEL_FORMAT_NV16 = 2; - - /// < NV21 pixel format - static const int CAMERA_PIXEL_FORMAT_NV21 = 3; - - /// < YUYV(YUY2) pixel format - static const int CAMERA_PIXEL_FORMAT_YUYV = 4; - - /// < UYVY pixel format - static const int CAMERA_PIXEL_FORMAT_UYVY = 5; - - /// < YUV422(Y:U:V) planar pixel format - static const int CAMERA_PIXEL_FORMAT_422P = 6; - - /// < I420 pixel format - static const int CAMERA_PIXEL_FORMAT_I420 = 7; - - /// < YV12 pixel format - static const int CAMERA_PIXEL_FORMAT_YV12 = 8; - - /// < RGB565 pixel format - static const int CAMERA_PIXEL_FORMAT_RGB565 = 9; - - /// < RGB888 pixel format - static const int CAMERA_PIXEL_FORMAT_RGB888 = 10; - - /// < RGBA pixel format - static const int CAMERA_PIXEL_FORMAT_RGBA = 11; - - /// < ARGB pixel format - static const int CAMERA_PIXEL_FORMAT_ARGB = 12; - - /// < Encoded pixel format - static const int CAMERA_PIXEL_FORMAT_JPEG = 13; - - /// < Encoded pixel format : H264 (Since 3.0) - static const int CAMERA_PIXEL_FORMAT_H264 = 15; -} - -/// @brief Enumeration for the camera display type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_display_type_e { - /// < Overlay surface display - static const int CAMERA_DISPLAY_TYPE_OVERLAY = 0; - - /// < Evas object surface display - static const int CAMERA_DISPLAY_TYPE_EVAS = 1; - - /// < This disposes off buffers - static const int CAMERA_DISPLAY_TYPE_NONE = 2; -} - -/// @brief Enumeration for the camera policy. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_policy_e { - /// < None - static const int CAMERA_POLICY_NONE = 0; - - /// < Sound policy (Deprecated since 3.0) - static const int CAMERA_POLICY_SOUND = 1; - - /// < Sound policy by CALL (Deprecated since 3.0) - static const int CAMERA_POLICY_SOUND_BY_CALL = 2; - - /// < Sound policy by ALARM (Deprecated since 3.0) - static const int CAMERA_POLICY_SOUND_BY_ALARM = 3; - - /// < Security policy - static const int CAMERA_POLICY_SECURITY = 4; - - /// < Resource conflict (Since 3.0) - static const int CAMERA_POLICY_RESOURCE_CONFLICT = 5; -} - -/// @brief Enumeration for the camera rotation type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_rotation_e { - /// < No rotation - static const int CAMERA_ROTATION_NONE = 0; - - /// < 90 degree rotation - static const int CAMERA_ROTATION_90 = 1; - - /// < 180 degree rotation - static const int CAMERA_ROTATION_180 = 2; - - /// < 270 degree rotation - static const int CAMERA_ROTATION_270 = 3; -} - -/// @brief Enumeration for the camera flip type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_flip_e { - /// < No Flip - static const int CAMERA_FLIP_NONE = 0; - - /// < Horizontal flip - static const int CAMERA_FLIP_HORIZONTAL = 1; - - /// < Vertical flip - static const int CAMERA_FLIP_VERTICAL = 2; - static const int CAMERA_FLIP_BOTH = 3; -} - -/// @brief Enumeration for the camera focus state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_focus_state_e { - /// < Focus released - static const int CAMERA_FOCUS_STATE_RELEASED = 0; - - /// < Focus in progress - static const int CAMERA_FOCUS_STATE_ONGOING = 1; - - /// < Focus succeeded - static const int CAMERA_FOCUS_STATE_FOCUSED = 2; - - /// < Focus failed - static const int CAMERA_FOCUS_STATE_FAILED = 3; -} - -/// @brief Enumeration for the facing direction of camera module -/// @since_tizen 3.0 -abstract class camera_facing_direction_e { - /// < Rear - static const int CAMERA_FACING_DIRECTION_REAR = 0; - - /// < Front - static const int CAMERA_FACING_DIRECTION_FRONT = 1; -} - -/// @brief Enumeration for the current flash state. -/// @since_tizen 3.0 -abstract class camera_flash_state_e { - /// < Flash is not used now through camera API - static const int CAMERA_FLASH_STATE_NOT_USED = 0; - - /// < Flash is used now through camera API - static const int CAMERA_FLASH_STATE_USED = 1; -} - -/// @brief The structure type of the image data. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -final class camera_image_data_s extends ffi.Struct { - /// < The image buffer - external ffi.Pointer data; - - /// < The size of the buffer - @ffi.UnsignedInt() - external int size; - - /// < The width of the image - @ffi.Int() - external int width; - - /// < The height of the image - @ffi.Int() - external int height; - - /// < The format of the image pixel - @ffi.Int32() - external int format; - - /// < The exif raw data - external ffi.Pointer exif; - - /// < The size of the exif data - @ffi.UnsignedInt() - external int exif_size; -} - -/// @brief The structure type for face detection. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -final class camera_detected_face_s extends ffi.Struct { - /// < The ID of each face - @ffi.Int() - external int id; - - /// < The confidence level for the detection of the face - @ffi.Int() - external int score; - - /// < The x coordinates of the face - @ffi.Int() - external int x; - - /// < The y coordinates of the face - @ffi.Int() - external int y; - - /// < The width of the face - @ffi.Int() - external int width; - - /// < The height of the face - @ffi.Int() - external int height; -} - -/// @brief The structure type to preview stream data. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -final class camera_preview_data_s extends ffi.Struct { - /// < The format of the frame pixel - @ffi.Int32() - external int format; - - /// < The width of the frame - @ffi.Int() - external int width; - - /// < The height of the frame - @ffi.Int() - external int height; - - /// < The number of planes - @ffi.Int() - external int num_of_planes; - - /// < The timestamp of the frame - @ffi.UnsignedInt() - external int timestamp; - - external UnnamedUnion1 data; -} - -final class UnnamedUnion1 extends ffi.Union { - /// < single plane frame data - external UnnamedStruct1 single_plane; - - /// < double plane frame data - external UnnamedStruct2 double_plane; - - /// < triple plane frame data - external UnnamedStruct3 triple_plane; - - external UnnamedStruct4 encoded_plane; -} - -final class UnnamedStruct1 extends ffi.Struct { - /// < The yuv data pointer - external ffi.Pointer yuv; - - /// < The size of data - @ffi.UnsignedInt() - external int size; -} - -final class UnnamedStruct2 extends ffi.Struct { - /// < The y data pointer - external ffi.Pointer y; - - /// < The uv data pointer - external ffi.Pointer uv; - - /// < The size of y data - @ffi.UnsignedInt() - external int y_size; - - /// < The size of uv data - @ffi.UnsignedInt() - external int uv_size; -} - -final class UnnamedStruct3 extends ffi.Struct { - /// < The y data pointer - external ffi.Pointer y; - - /// < The u data pointer - external ffi.Pointer u; - - /// < The v data pointer - external ffi.Pointer v; - - /// < The size of y data - @ffi.UnsignedInt() - external int y_size; - - /// < The size of u data - @ffi.UnsignedInt() - external int u_size; - - /// < The size of v data - @ffi.UnsignedInt() - external int v_size; -} - -final class UnnamedStruct4 extends ffi.Struct { - /// < The encoded data pointer - external ffi.Pointer data; - - /// < The size of encoded data - @ffi.UnsignedInt() - external int size; -} - -final class camera_cli_s extends ffi.Opaque {} - -/// @brief Enumeration for the camera display mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_display_mode_e { - /// < Letter box - static const int CAMERA_DISPLAY_MODE_LETTER_BOX = 0; - - /// < Origin size - static const int CAMERA_DISPLAY_MODE_ORIGIN_SIZE = 1; - - /// < Full screen - static const int CAMERA_DISPLAY_MODE_FULL = 2; - - /// < Cropped full screen - static const int CAMERA_DISPLAY_MODE_CROPPED_FULL = 3; - - /// < Original size or letter box (Since 3.0) - static const int CAMERA_DISPLAY_MODE_ORIGIN_OR_LETTER_BOX = 4; - - /// < Custom ROI (Since 3.0) - static const int CAMERA_DISPLAY_MODE_CUSTOM_ROI = 5; -} - -/// @brief Enumeration for the color tone, which provides the impression of looking through a tinted glass. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_attr_effect_mode_e { - /// < None - static const int CAMERA_ATTR_EFFECT_NONE = 0; - - /// < Mono - static const int CAMERA_ATTR_EFFECT_MONO = 1; - - /// < Sepia - static const int CAMERA_ATTR_EFFECT_SEPIA = 2; - - /// < Negative - static const int CAMERA_ATTR_EFFECT_NEGATIVE = 3; - - /// < Blue - static const int CAMERA_ATTR_EFFECT_BLUE = 4; - - /// < Green - static const int CAMERA_ATTR_EFFECT_GREEN = 5; - - /// < Aqua - static const int CAMERA_ATTR_EFFECT_AQUA = 6; - - /// < Violet - static const int CAMERA_ATTR_EFFECT_VIOLET = 7; - - /// < Orange - static const int CAMERA_ATTR_EFFECT_ORANGE = 8; - - /// < Gray - static const int CAMERA_ATTR_EFFECT_GRAY = 9; - - /// < Red - static const int CAMERA_ATTR_EFFECT_RED = 10; - - /// < Antique - static const int CAMERA_ATTR_EFFECT_ANTIQUE = 11; - - /// < Warm - static const int CAMERA_ATTR_EFFECT_WARM = 12; - - /// < Pink - static const int CAMERA_ATTR_EFFECT_PINK = 13; - - /// < Yellow - static const int CAMERA_ATTR_EFFECT_YELLOW = 14; - - /// < Purple - static const int CAMERA_ATTR_EFFECT_PURPLE = 15; - - /// < Emboss - static const int CAMERA_ATTR_EFFECT_EMBOSS = 16; - - /// < Outline - static const int CAMERA_ATTR_EFFECT_OUTLINE = 17; - - /// < Solarization - static const int CAMERA_ATTR_EFFECT_SOLARIZATION = 18; - - /// < Sketch - static const int CAMERA_ATTR_EFFECT_SKETCH = 19; - - /// < Washed - static const int CAMERA_ATTR_EFFECT_WASHED = 20; - - /// < Vintage warm - static const int CAMERA_ATTR_EFFECT_VINTAGE_WARM = 21; - - /// < Vintage cold - static const int CAMERA_ATTR_EFFECT_VINTAGE_COLD = 22; - - /// < Posterization - static const int CAMERA_ATTR_EFFECT_POSTERIZATION = 23; - - /// < Cartoon - static const int CAMERA_ATTR_EFFECT_CARTOON = 24; - - /// < Selective color - Red - static const int CAMERA_ATTR_EFFECT_SELECTIVE_RED = 25; - - /// < Selective color - Green - static const int CAMERA_ATTR_EFFECT_SELECTIVE_GREEN = 26; - - /// < Selective color - Blue - static const int CAMERA_ATTR_EFFECT_SELECTIVE_BLUE = 27; - - /// < Selective color - Yellow - static const int CAMERA_ATTR_EFFECT_SELECTIVE_YELLOW = 28; - - /// < Selective color - Red and Yellow - static const int CAMERA_ATTR_EFFECT_SELECTIVE_RED_YELLOW = 29; - - /// < Other Graphic effects - static const int CAMERA_ATTR_EFFECT_OTHER_GRAPHICS = 30; -} - -/// @brief Enumeration for the white balance levels of the camera. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_attr_whitebalance_e { - /// < None - static const int CAMERA_ATTR_WHITE_BALANCE_NONE = 0; - - /// < Automatic - static const int CAMERA_ATTR_WHITE_BALANCE_AUTOMATIC = 1; - - /// < Daylight - static const int CAMERA_ATTR_WHITE_BALANCE_DAYLIGHT = 2; - - /// < Cloudy - static const int CAMERA_ATTR_WHITE_BALANCE_CLOUDY = 3; - - /// < Fluorescent - static const int CAMERA_ATTR_WHITE_BALANCE_FLUORESCENT = 4; - - /// < Incandescent - static const int CAMERA_ATTR_WHITE_BALANCE_INCANDESCENT = 5; - - /// < Shade - static const int CAMERA_ATTR_WHITE_BALANCE_SHADE = 6; - - /// < Horizon - static const int CAMERA_ATTR_WHITE_BALANCE_HORIZON = 7; - - /// < Flash - static const int CAMERA_ATTR_WHITE_BALANCE_FLASH = 8; - - /// < Custom - static const int CAMERA_ATTR_WHITE_BALANCE_CUSTOM = 9; -} - -/// @brief Enumeration for the scene mode. -/// @details The mode of operation can be in daylight, night, or back-light. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_attr_scene_mode_e { - /// < Normal - static const int CAMERA_ATTR_SCENE_MODE_NORMAL = 0; - - /// < Portrait - static const int CAMERA_ATTR_SCENE_MODE_PORTRAIT = 1; - - /// < Landscape - static const int CAMERA_ATTR_SCENE_MODE_LANDSCAPE = 2; - - /// < Sports - static const int CAMERA_ATTR_SCENE_MODE_SPORTS = 3; - - /// < Party & indoor - static const int CAMERA_ATTR_SCENE_MODE_PARTY_N_INDOOR = 4; - - /// < Beach & indoor - static const int CAMERA_ATTR_SCENE_MODE_BEACH_N_INDOOR = 5; - - /// < Sunset - static const int CAMERA_ATTR_SCENE_MODE_SUNSET = 6; - - /// < Dusk & dawn - static const int CAMERA_ATTR_SCENE_MODE_DUSK_N_DAWN = 7; - - /// < Fall - static const int CAMERA_ATTR_SCENE_MODE_FALL_COLOR = 8; - - /// < Night scene - static const int CAMERA_ATTR_SCENE_MODE_NIGHT_SCENE = 9; - - /// < Firework - static const int CAMERA_ATTR_SCENE_MODE_FIREWORK = 10; - - /// < Text - static const int CAMERA_ATTR_SCENE_MODE_TEXT = 11; - - /// < Show window - static const int CAMERA_ATTR_SCENE_MODE_SHOW_WINDOW = 12; - - /// < Candle light - static const int CAMERA_ATTR_SCENE_MODE_CANDLE_LIGHT = 13; - - /// < Backlight - static const int CAMERA_ATTR_SCENE_MODE_BACKLIGHT = 14; - - /// < Aqua - static const int CAMERA_ATTR_SCENE_MODE_AQUA = 15; -} - -/// @brief Enumeration for the auto focus mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_attr_af_mode_e { - /// < auto-focus is not set - static const int CAMERA_ATTR_AF_NONE = 0; - - /// < auto-focus in the normal mode - static const int CAMERA_ATTR_AF_NORMAL = 1; - - /// < auto-focus in the macro mode(close distance) - static const int CAMERA_ATTR_AF_MACRO = 2; - - /// < auto-focus in the full mode(all range scan, limited by device spec) - static const int CAMERA_ATTR_AF_FULL = 3; -} - -/// @brief Enumeration for the ISO levels of the camera. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_attr_iso_e { - /// < ISO auto mode - static const int CAMERA_ATTR_ISO_AUTO = 0; - - /// < ISO 50 - static const int CAMERA_ATTR_ISO_50 = 1; - - /// < ISO 100 - static const int CAMERA_ATTR_ISO_100 = 2; - - /// < ISO 200 - static const int CAMERA_ATTR_ISO_200 = 3; - - /// < ISO 400 - static const int CAMERA_ATTR_ISO_400 = 4; - - /// < ISO 800 - static const int CAMERA_ATTR_ISO_800 = 5; - - /// < ISO 1600 - static const int CAMERA_ATTR_ISO_1600 = 6; - - /// < ISO 3200 - static const int CAMERA_ATTR_ISO_3200 = 7; -} - -/// @brief Enumeration for the camera exposure modes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_attr_exposure_mode_e { - /// < Off - static const int CAMERA_ATTR_EXPOSURE_MODE_OFF = 0; - - /// < All mode - static const int CAMERA_ATTR_EXPOSURE_MODE_ALL = 1; - - /// < Center mode - static const int CAMERA_ATTR_EXPOSURE_MODE_CENTER = 2; - - /// < Spot mode - static const int CAMERA_ATTR_EXPOSURE_MODE_SPOT = 3; - - /// < Custom mode - static const int CAMERA_ATTR_EXPOSURE_MODE_CUSTOM = 4; -} - -/// @brief Enumeration for the orientation values of tag. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_attr_tag_orientation_e { - /// < Row #0 is at the top, Column #0 is to the left - static const int CAMERA_ATTR_TAG_ORIENTATION_TOP_LEFT = 1; - - /// < Row #0 is at the top, Column #0 is to the right (flipped) - static const int CAMERA_ATTR_TAG_ORIENTATION_TOP_RIGHT = 2; - - /// < Row #0 is at the bottom, Column #0 is to the right - static const int CAMERA_ATTR_TAG_ORIENTATION_BOTTOM_RIGHT = 3; - - /// < Row #0 is at the bottom, Column #0 is to the left (flipped) - static const int CAMERA_ATTR_TAG_ORIENTATION_BOTTOM_LEFT = 4; - - /// < Row #0 is to the left, Column #0 is at the top (flipped) - static const int CAMERA_ATTR_TAG_ORIENTATION_LEFT_TOP = 5; - - /// < Row #0 is to the right, Column #0 is at the top - static const int CAMERA_ATTR_TAG_ORIENTATION_RIGHT_TOP = 6; - - /// < Row #0 is to the right, Column #0 is at the bottom (flipped) - static const int CAMERA_ATTR_TAG_ORIENTATION_RIGHT_BOTTOM = 7; - - /// < Row #0 is to the left, Column #0 is at the bottom - static const int CAMERA_ATTR_TAG_ORIENTATION_LEFT_BOTTOM = 8; -} - -/// @brief Enumeration for the flash mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_attr_flash_mode_e { - /// < Always off - static const int CAMERA_ATTR_FLASH_MODE_OFF = 0; - - /// < Always splashes - static const int CAMERA_ATTR_FLASH_MODE_ON = 1; - - /// < Depending on intensity of light, strobe starts to flash - static const int CAMERA_ATTR_FLASH_MODE_AUTO = 2; - - /// < Red eye reduction. Multiple flash before capturing - static const int CAMERA_ATTR_FLASH_MODE_REDEYE_REDUCTION = 3; - - /// < Slow sync curtain synchronization - static const int CAMERA_ATTR_FLASH_MODE_SLOW_SYNC = 4; - - /// < Front curtain synchronization - static const int CAMERA_ATTR_FLASH_MODE_FRONT_CURTAIN = 5; - - /// < Rear curtain synchronization - static const int CAMERA_ATTR_FLASH_MODE_REAR_CURTAIN = 6; - - /// < Keep turned on until turning off - static const int CAMERA_ATTR_FLASH_MODE_PERMANENT = 7; -} - -/// @brief Enumeration to preview FPS. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_attr_fps_e { - /// < AUTO FPS - static const int CAMERA_ATTR_FPS_AUTO = 0; - - /// < 7 FPS - static const int CAMERA_ATTR_FPS_7 = 7; - - /// < 8 FPS - static const int CAMERA_ATTR_FPS_8 = 8; - - /// < 15 FPS - static const int CAMERA_ATTR_FPS_15 = 15; - - /// < 20 FPS - static const int CAMERA_ATTR_FPS_20 = 20; - - /// < 24 FPS - static const int CAMERA_ATTR_FPS_24 = 24; - - /// < 25 FPS - static const int CAMERA_ATTR_FPS_25 = 25; - - /// < 30 FPS - static const int CAMERA_ATTR_FPS_30 = 30; - - /// < 60 FPS - static const int CAMERA_ATTR_FPS_60 = 60; - - /// < 90 FPS - static const int CAMERA_ATTR_FPS_90 = 90; - - /// < 120 FPS - static const int CAMERA_ATTR_FPS_120 = 120; -} - -/// @brief Enumeration for the theater mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_attr_theater_mode_e { - /// < Disable theater mode - External display shows same image as device display - static const int CAMERA_ATTR_THEATER_MODE_DISABLE = 0; - - /// < Enable theater mode - Preview image is displayed on external display with full screen mode, but preview image is not shown on device display - static const int CAMERA_ATTR_THEATER_MODE_ENABLE = 2; - - /// < Clone mode - Preview image is displayed on external display with full screen mode. Also preview image is shown by the UI on device display - static const int CAMERA_ATTR_THEATER_MODE_CLONE = 1; -} - -/// @brief Enumeration for HDR capture mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_attr_hdr_mode_e { - /// < Disable HDR capture - static const int CAMERA_ATTR_HDR_MODE_DISABLE = 0; - - /// < Enable HDR capture - static const int CAMERA_ATTR_HDR_MODE_ENABLE = 1; - - /// < Enable HDR capture and keep original image data - static const int CAMERA_ATTR_HDR_MODE_KEEP_ORIGINAL = 2; -} - -/// @brief Enumeration for PTZ(Pan Tilt Zoom) type. -/// @since_tizen 3.0 -abstract class camera_attr_ptz_type_e { - /// < Move the camera device physically - static const int CAMERA_ATTR_PTZ_TYPE_MECHANICAL = 0; - - /// < Zoom digitally and move into portion of the image - static const int CAMERA_ATTR_PTZ_TYPE_ELECTRONIC = 1; -} - -/// @brief Enumeration for PTZ(Pan Tilt Zoom) movement type. -/// @since_tizen 3.0 -abstract class camera_attr_ptz_move_type_e { - /// < Move to a specific coordinate position - static const int CAMERA_ATTR_PTZ_MOVE_ABSOLUTE = 0; - - /// < Move a specific distance from the current position - static const int CAMERA_ATTR_PTZ_MOVE_RELATIVE = 1; -} - -/// @brief The Camera handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @see recorder_create_videorecorder() -typedef camera_h = ffi.Pointer; - -/// @brief Called to get information about image data taken by the camera once per frame while capturing. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks This function is issued in the context of internal framework so the UI update code should not be directly invoked. -/// You must not call camera_start_preview() within this callback. -/// -/// @param[in] image The image data of the captured picture -/// @param[in] postview The image data of the postview -/// @param[in] thumbnail The image data of the thumbnail (it should be @c NULL if the available thumbnail data does not exist) -/// @param[in] user_data The user data passed from the callback registration function -/// @pre camera_start_capture() or camera_start_continuous_capture() will invoke this callback function if it is registered using camera_start_capture() or camera_start_continuous_capture(). -/// @see camera_start_capture() -/// @see camera_start_continuous_capture() -/// @see camera_capture_completed_cb() -typedef camera_capturing_cb - = ffi.Pointer>; -typedef camera_capturing_cbFunction = ffi.Void Function( - ffi.Pointer image, - ffi.Pointer postview, - ffi.Pointer thumbnail, - ffi.Pointer user_data); -typedef Dartcamera_capturing_cbFunction = void Function( - ffi.Pointer image, - ffi.Pointer postview, - ffi.Pointer thumbnail, - ffi.Pointer user_data); - -/// @brief Called when the camera capturing completes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks The callback is called after camera_capturing_cb() is completed.\n -/// If you want to show the user a preview after capturing is finished, \n -/// an application can use camera_start_preview() after calling this callback. -/// @param[in] user_data The user data passed from the callback registration function -/// @pre This callback function is invoked if it is registered using camera_start_capture() or camera_start_continuous_capture(). -/// @see camera_start_capture() -/// @see camera_start_continuous_capture() -/// @see camera_capturing_cb() -typedef camera_capture_completed_cb - = ffi.Pointer>; -typedef camera_capture_completed_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartcamera_capture_completed_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief The Camera display handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef camera_display_h = ffi.Pointer; - -/// @brief Called when a face is detected in the preview frame. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] faces The detected face array -/// @param[in] count The length of the array -/// @param[in] user_data The user data passed from the callback registration function -/// @see camera_start_face_detection() -typedef camera_face_detected_cb - = ffi.Pointer>; -typedef camera_face_detected_cbFunction = ffi.Void Function( - ffi.Pointer faces, - ffi.Int count, - ffi.Pointer user_data); -typedef Dartcamera_face_detected_cbFunction = void Function( - ffi.Pointer faces, - int count, - ffi.Pointer user_data); - -/// @brief Called once for each supported preview resolution. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] width The preview image width -/// @param[in] height The preview image height -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre camera_foreach_supported_preview_resolution() will invoke this callback. -/// @see camera_foreach_supported_preview_resolution() -typedef camera_supported_preview_resolution_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef camera_supported_preview_resolution_cbFunction = ffi.Bool Function( - ffi.Int width, ffi.Int height, ffi.Pointer user_data); -typedef Dartcamera_supported_preview_resolution_cbFunction = bool Function( - int width, int height, ffi.Pointer user_data); - -/// @brief Called once for each supported capture resolution. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] width The capture resolution width -/// @param[in] height The capture resolution height -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre camera_foreach_supported_capture_resolution() will invoke this callback. -/// @see camera_foreach_supported_capture_resolution() -typedef camera_supported_capture_resolution_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef camera_supported_capture_resolution_cbFunction = ffi.Bool Function( - ffi.Int width, ffi.Int height, ffi.Pointer user_data); -typedef Dartcamera_supported_capture_resolution_cbFunction = bool Function( - int width, int height, ffi.Pointer user_data); - -/// @brief Called once for the pixel format of each supported capture format. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] format The supported pixel format -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre camera_foreach_supported_capture_format() will invoke this callback. -/// @see camera_foreach_supported_capture_format() -typedef camera_supported_capture_format_cb = ffi - .Pointer>; -typedef camera_supported_capture_format_cbFunction = ffi.Bool Function( - ffi.Int32 format, ffi.Pointer user_data); -typedef Dartcamera_supported_capture_format_cbFunction = bool Function( - int format, ffi.Pointer user_data); - -/// @brief Called once for the pixel format of each supported preview format. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] format The supported preview data format -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre camera_foreach_supported_preview_format() will invoke this callback. -/// @see camera_foreach_supported_preview_format() -typedef camera_supported_preview_format_cb = ffi - .Pointer>; -typedef camera_supported_preview_format_cbFunction = ffi.Bool Function( - ffi.Int32 format, ffi.Pointer user_data); -typedef Dartcamera_supported_preview_format_cbFunction = bool Function( - int format, ffi.Pointer user_data); - -/// @brief Called to register for notifications about delivering a copy of the new preview frame when every preview frame is displayed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks This function is issued in the context of internal framework so the UI update code should not be directly invoked.\n -/// If the camera is used as a recorder then this callback function won't be called. -/// -/// @param[in] frame The reference pointer to preview stream data -/// @param[in] user_data The user data passed from the callback registration function -/// @pre camera_start_preview() will invoke this callback function if you register this callback using camera_set_preview_cb(). -/// @see camera_start_preview() -/// @see camera_set_preview_cb() -/// @see camera_unset_preview_cb() -typedef camera_preview_cb - = ffi.Pointer>; -typedef camera_preview_cbFunction = ffi.Void Function( - ffi.Pointer frame, ffi.Pointer user_data); -typedef Dartcamera_preview_cbFunction = void Function( - ffi.Pointer frame, ffi.Pointer user_data); - -/// @brief Called to register for notifications about delivering media packet when every preview frame is displayed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks This function is issued in the context of internal framework so the UI update code should not be directly invoked.\n -/// If the camera is used as a recorder then this callback function won't be called.\n -/// and the packet should be released by media_packet_destroy() after use. -/// -/// @param[in] pkt Reference pointer to media packet -/// @param[in] user_data The user data passed from the callback registration function -/// @pre camera_start_preview() will invoke this callback function if you register this callback using camera_set_media_packet_preview_cb(). -/// @see camera_start_preview() -/// @see camera_set_media_packet_preview_cb() -/// @see camera_unset_media_packet_preview_cb() -typedef camera_media_packet_preview_cb - = ffi.Pointer>; -typedef camera_media_packet_preview_cbFunction = ffi.Void Function( - media_packet_h pkt, ffi.Pointer user_data); -typedef Dartcamera_media_packet_preview_cbFunction = void Function( - media_packet_h pkt, ffi.Pointer user_data); - -/// @brief Called when the camera state is changed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] previous The previous state of the camera -/// @param[in] current The current state of the camera -/// @param[in] by_policy If @c true the state is changed by policy, otherwise @c false -/// @param[in] user_data The user data passed from the callback registration function -/// @pre camera_start_preview(), camera_start_capture() or camera_stop_preview() -/// will invoke this callback if you register this callback using camera_set_state_changed_cb(). -/// @see camera_set_state_changed_cb() -typedef camera_state_changed_cb - = ffi.Pointer>; -typedef camera_state_changed_cbFunction = ffi.Void Function(ffi.Int32 previous, - ffi.Int32 current, ffi.Bool by_policy, ffi.Pointer user_data); -typedef Dartcamera_state_changed_cbFunction = void Function( - int previous, int current, bool by_policy, ffi.Pointer user_data); - -/// @brief Called when the camera is interrupted by policy. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks This callback is called after interrupt handling is completed. -/// @param[in] policy The policy that interrupted the camera -/// @param[in] previous The previous state of the camera -/// @param[in] current The current state of the camera -/// @param[in] user_data The user data passed from the callback registration function -/// @see camera_set_interrupted_cb() -typedef camera_interrupted_cb - = ffi.Pointer>; -typedef camera_interrupted_cbFunction = ffi.Void Function(ffi.Int32 policy, - ffi.Int32 previous, ffi.Int32 current, ffi.Pointer user_data); -typedef Dartcamera_interrupted_cbFunction = void Function( - int policy, int previous, int current, ffi.Pointer user_data); - -/// @brief Called when the camera interrupt is started by policy. -/// @since_tizen 4.0 -/// @remarks This callback is called before interrupt handling is started. -/// @param[in] policy The policy that is interrupting the camera -/// @param[in] state The current state of the camera -/// @param[in] user_data The user data passed from the callback registration function -/// @see camera_set_interrupt_started_cb() -typedef camera_interrupt_started_cb - = ffi.Pointer>; -typedef camera_interrupt_started_cbFunction = ffi.Void Function( - ffi.Int32 policy, ffi.Int32 state, ffi.Pointer user_data); -typedef Dartcamera_interrupt_started_cbFunction = void Function( - int policy, int state, ffi.Pointer user_data); - -/// @brief Called when the camera focus state is changed. -/// @details When the camera auto focus completes or a change to the focus state occurs, -/// this callback is invoked. \n \n -/// Changes of focus state are as follows: \n -/// #CAMERA_FOCUS_STATE_RELEASED -> start focusing -> #CAMERA_FOCUS_STATE_ONGOING -> working -> -/// #CAMERA_FOCUS_STATE_FOCUSED or #CAMERA_FOCUS_STATE_FAILED. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @param[in] state The current state of the auto-focus -/// @param[in] user_data The user data passed from the callback registration function -/// @pre camera_start_focusing() will invoke this callback if you register it using camera_set_focus_changed_cb(). -/// @see camera_set_focus_changed_cb() -/// @see camera_unset_focus_changed_cb() -/// @see camera_start_focusing() -/// @see camera_cancel_focusing() -typedef camera_focus_changed_cb - = ffi.Pointer>; -typedef camera_focus_changed_cbFunction = ffi.Void Function( - ffi.Int32 state, ffi.Pointer user_data); -typedef Dartcamera_focus_changed_cbFunction = void Function( - int state, ffi.Pointer user_data); - -/// @brief Called when an error occurs. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks This callback informs about a critical error situation.\n -/// When this callback is invoked, the user should release the resource and terminate the application.\n -/// In case of errors, one of these codes occur:\n -/// #CAMERA_ERROR_DEVICE,\n -/// #CAMERA_ERROR_INVALID_OPERATION,\n -/// #CAMERA_ERROR_OUT_OF_MEMORY. -/// @param[in] error The error code -/// @param[in] current_state The current state of the camera -/// @param[in] user_data The user data passed from the callback registration function -/// @pre This callback function is invoked if it is registered using camera_set_error_cb(). -/// @see camera_set_error_cb() -/// @see camera_unset_error_cb() -typedef camera_error_cb - = ffi.Pointer>; -typedef camera_error_cbFunction = ffi.Void Function( - ffi.Int32 error, ffi.Int32 current_state, ffi.Pointer user_data); -typedef Dartcamera_error_cbFunction = void Function( - int error, int current_state, ffi.Pointer user_data); - -/// @brief Called when the camera device state is changed. -/// @since_tizen 3.0 -/// @param[in] device The hardware camera type -/// @param[in] state The state of the camera device -/// @param[in] user_data The user data passed from the callback registration function -/// @see camera_add_device_state_changed_cb() -typedef camera_device_state_changed_cb - = ffi.Pointer>; -typedef camera_device_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 device, ffi.Int32 state, ffi.Pointer user_data); -typedef Dartcamera_device_state_changed_cbFunction = void Function( - int device, int state, ffi.Pointer user_data); - -/// @brief Called to get each supported FPS mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] mode The supported FPS mode -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre camera_attr_foreach_supported_fps() will invoke this callback. -/// @see camera_attr_foreach_supported_fps() -typedef camera_attr_supported_fps_cb - = ffi.Pointer>; -typedef camera_attr_supported_fps_cbFunction = ffi.Bool Function( - ffi.Int32 fps, ffi.Pointer user_data); -typedef Dartcamera_attr_supported_fps_cbFunction = bool Function( - int fps, ffi.Pointer user_data); - -/// @brief Called to get each supported auto-focus mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] mode The supported auto-focus mode -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre camera_attr_foreach_supported_af_mode() will invoke this callback. -/// @see camera_attr_foreach_supported_af_mode() -typedef camera_attr_supported_af_mode_cb - = ffi.Pointer>; -typedef camera_attr_supported_af_mode_cbFunction = ffi.Bool Function( - ffi.Int32 mode, ffi.Pointer user_data); -typedef Dartcamera_attr_supported_af_mode_cbFunction = bool Function( - int mode, ffi.Pointer user_data); - -/// @brief Called to get each supported exposure mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] mode The supported exposure mode -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre camera_attr_foreach_supported_exposure_mode() will invoke this callback. -/// @see camera_attr_foreach_supported_exposure_mode() -/// @see #camera_attr_exposure_mode_e -typedef camera_attr_supported_exposure_mode_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef camera_attr_supported_exposure_mode_cbFunction = ffi.Bool Function( - ffi.Int32 mode, ffi.Pointer user_data); -typedef Dartcamera_attr_supported_exposure_mode_cbFunction = bool Function( - int mode, ffi.Pointer user_data); - -/// @brief Called to get each supported ISO mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] iso The supported ISO mode -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre camera_attr_foreach_supported_iso() will invoke this callback. -/// @see camera_attr_foreach_supported_iso() -typedef camera_attr_supported_iso_cb - = ffi.Pointer>; -typedef camera_attr_supported_iso_cbFunction = ffi.Bool Function( - ffi.Int32 iso, ffi.Pointer user_data); -typedef Dartcamera_attr_supported_iso_cbFunction = bool Function( - int iso, ffi.Pointer user_data); - -/// @brief Called to get each supported theater mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] mode The supported theater mode -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop -/// @pre camera_attr_foreach_supported_theater_mode() will invoke this callback. -/// @see camera_attr_foreach_supported_theater_mode() -typedef camera_attr_supported_theater_mode_cb = ffi - .Pointer>; -typedef camera_attr_supported_theater_mode_cbFunction = ffi.Bool Function( - ffi.Int32 mode, ffi.Pointer user_data); -typedef Dartcamera_attr_supported_theater_mode_cbFunction = bool Function( - int mode, ffi.Pointer user_data); - -/// @brief Called to get each supported white balance. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] wb The supported white balance mode -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre camera_attr_foreach_supported_whitebalance() will invoke this callback. -/// @see camera_attr_foreach_supported_whitebalance() -/// @see #camera_attr_whitebalance_e -typedef camera_attr_supported_whitebalance_cb = ffi - .Pointer>; -typedef camera_attr_supported_whitebalance_cbFunction = ffi.Bool Function( - ffi.Int32 wb, ffi.Pointer user_data); -typedef Dartcamera_attr_supported_whitebalance_cbFunction = bool Function( - int wb, ffi.Pointer user_data); - -/// @brief Called to get each supported effect mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] effect The supported effect mode -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre camera_attr_foreach_supported_effect() will invoke this callback. -/// @see camera_attr_foreach_supported_effect() -typedef camera_attr_supported_effect_cb - = ffi.Pointer>; -typedef camera_attr_supported_effect_cbFunction = ffi.Bool Function( - ffi.Int32 effect, ffi.Pointer user_data); -typedef Dartcamera_attr_supported_effect_cbFunction = bool Function( - int effect, ffi.Pointer user_data); - -/// @brief Called to get each supported scene mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] mode The supported scene mode -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre camera_attr_foreach_supported_scene_mode() will invoke this callback. -/// @see camera_attr_foreach_supported_scene_mode() -/// @see #camera_attr_scene_mode_e -typedef camera_attr_supported_scene_mode_cb = ffi - .Pointer>; -typedef camera_attr_supported_scene_mode_cbFunction = ffi.Bool Function( - ffi.Int32 mode, ffi.Pointer user_data); -typedef Dartcamera_attr_supported_scene_mode_cbFunction = bool Function( - int mode, ffi.Pointer user_data); - -/// @brief Called to get each supported flash mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] mode The supported flash mode -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre camera_attr_foreach_supported_flash_mode() will invoke this callback. -/// @see camera_attr_foreach_supported_flash_mode() -typedef camera_attr_supported_flash_mode_cb = ffi - .Pointer>; -typedef camera_attr_supported_flash_mode_cbFunction = ffi.Bool Function( - ffi.Int32 mode, ffi.Pointer user_data); -typedef Dartcamera_attr_supported_flash_mode_cbFunction = bool Function( - int mode, ffi.Pointer user_data); - -/// @brief Called to get each supported stream rotation mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] mode The supported stream rotation mode -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop -/// @pre camera_attr_foreach_supported_stream_rotation() will invoke this callback. -/// @see camera_attr_foreach_supported_stream_rotation() -typedef camera_attr_supported_stream_rotation_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef camera_attr_supported_stream_rotation_cbFunction = ffi.Bool Function( - ffi.Int32 rotation, ffi.Pointer user_data); -typedef Dartcamera_attr_supported_stream_rotation_cbFunction = bool Function( - int rotation, ffi.Pointer user_data); - -/// @brief Called to get each supported stream flip mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] mode The supported stream flip mode -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop -/// @pre camera_attr_foreach_supported_stream_flip() will invoke this callback. -/// @see camera_attr_foreach_supported_stream_flip() -typedef camera_attr_supported_stream_flip_cb = ffi - .Pointer>; -typedef camera_attr_supported_stream_flip_cbFunction = ffi.Bool Function( - ffi.Int32 flip, ffi.Pointer user_data); -typedef Dartcamera_attr_supported_stream_flip_cbFunction = bool Function( - int flip, ffi.Pointer user_data); - -/// @brief Called when the HDR capture process is updated. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] percent The progress percentage of HDR capture -/// @param[in] user_data The user data passed from the callback registration function -/// @pre camera_start_capture() will invoke this callback if you register it using camera_attr_set_hdr_capture_progress_cb(). -/// @see camera_attr_get_hdr_mode() -/// @see camera_attr_set_hdr_capture_progress_cb() -/// @see camera_attr_unset_hdr_capture_progress_cb() -/// @see camera_attr_is_supported_hdr_capture() -typedef camera_attr_hdr_progress_cb - = ffi.Pointer>; -typedef camera_attr_hdr_progress_cbFunction = ffi.Void Function( - ffi.Int percent, ffi.Pointer user_data); -typedef Dartcamera_attr_hdr_progress_cbFunction = void Function( - int percent, ffi.Pointer user_data); - -/// @brief Called to get each supported PTZ(Pan Tilt Zoom) type. -/// @since_tizen 3.0 -/// @param[in] type The supported ptz type -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop -/// @pre camera_attr_foreach_supported_ptz_mode() will invoke this callback. -/// @see camera_attr_foreach_supported_ptz_mode() -typedef camera_attr_supported_ptz_type_cb = ffi - .Pointer>; -typedef camera_attr_supported_ptz_type_cbFunction = ffi.Bool Function( - ffi.Int32 type, ffi.Pointer user_data); -typedef Dartcamera_attr_supported_ptz_type_cbFunction = bool Function( - int type, ffi.Pointer user_data); - -final class media_packet_pool_s extends ffi.Opaque {} - -/// @brief The Media Packet Pool Handle. -/// @since_tizen 3.0 -typedef media_packet_pool_h = ffi.Pointer; - -final class mediacodec_s extends ffi.Opaque {} - -/// @brief Enumeration of media codec support type -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks If this codec is to be used as an encoder or decoder, the codec flag must be set to #MEDIACODEC_ENCODER or -/// #MEDIACODEC_DECODER. If user doesn't set optional flag, default flags will be set to #MEDIACODEC_SUPPORT_TYPE_SW. -abstract class mediacodec_support_type_e { - /// < This flag is for using the encoder - static const int MEDIACODEC_ENCODER = 1; - - /// < This flag is for using the decoder - static const int MEDIACODEC_DECODER = 2; - - /// < This is an optional flag for using the h/w codec - static const int MEDIACODEC_SUPPORT_TYPE_HW = 4; - - /// < This is an optional flag for using the s/w codec - static const int MEDIACODEC_SUPPORT_TYPE_SW = 8; -} - -/// @brief Enumerations of media codec type -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class mediacodec_codec_type_e { - /// < NONE - static const int MEDIACODEC_NONE = 0; - - /// < L16 - static const int MEDIACODEC_L16 = 4112; - - /// < ALAW - static const int MEDIACODEC_ALAW = 4128; - - /// < ULAW - static const int MEDIACODEC_ULAW = 4144; - - /// < MEDIACDEC_AMR indicates AMR-NB (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_AMR = 4160; - - /// < AMR-NB (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_AMR_NB = 4160; - - /// < AMR-WB (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_AMR_WB = 4161; - - /// < G729 - static const int MEDIACODEC_G729 = 4176; - - /// < MEDIACDEC_AAC indicates AAC-LC (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_AAC = 4192; - - /// < AAC-LC (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_AAC_LC = 4192; - - /// < HE-AAC (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_AAC_HE = 4193; - - /// < HE-AAC-PS (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_AAC_HE_PS = 4194; - - /// < MP3 - static const int MEDIACODEC_MP3 = 4208; - - /// < VORBIS (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_VORBIS = 4224; - - /// < FLAC (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_FLAC = 4240; - - /// < WMA version 1 (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_WMAV1 = 4256; - - /// < WMA version 2 (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_WMAV2 = 4257; - - /// < WMA Professional (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_WMAPRO = 4258; - - /// < WMA Lossless (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_WMALSL = 4259; - - /// < H.261 - static const int MEDIACODEC_H261 = 8208; - - /// < H.263 - static const int MEDIACODEC_H263 = 8224; - - /// < H.264 - static const int MEDIACODEC_H264 = 8240; - - /// < MJPEG - static const int MEDIACODEC_MJPEG = 8256; - - /// < MPEG1 - static const int MEDIACODEC_MPEG1 = 8272; - - /// < MPEG2 - static const int MEDIACODEC_MPEG2 = 8288; - - /// < MPEG4 - static const int MEDIACODEC_MPEG4 = 8304; - - /// < HEVC (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_HEVC = 8320; - - /// < VP8 (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_VP8 = 8336; - - /// < VP9 (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_VP9 = 8352; - - /// < VC1 (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_VC1 = 8368; -} - -/// @brief Enumeration of media codec error -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class mediacodec_error_e { - /// < Successful - static const int MEDIACODEC_ERROR_NONE = 0; - - /// < Out of memory - static const int MEDIACODEC_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int MEDIACODEC_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid operation - static const int MEDIACODEC_ERROR_INVALID_OPERATION = -38; - - /// < Not supported - static const int MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE = -1073741822; - - /// < Permission denied - static const int MEDIACODEC_ERROR_PERMISSION_DENIED = -13; - - /// < Invalid state - static const int MEDIACODEC_ERROR_INVALID_STATE = -26935295; - - /// < Invalid input buffer - static const int MEDIACODEC_ERROR_INVALID_INBUFFER = -26935294; - - /// < Invalid output buffer - static const int MEDIACODEC_ERROR_INVALID_OUTBUFFER = -26935293; - - /// < Internal error - static const int MEDIACODEC_ERROR_INTERNAL = -26935292; - - /// < Not initialized mediacodec - static const int MEDIACODEC_ERROR_NOT_INITIALIZED = -26935291; - - /// < Invalid stream - static const int MEDIACODEC_ERROR_INVALID_STREAM = -26935290; - - /// < Not supported format - static const int MEDIACODEC_ERROR_CODEC_NOT_FOUND = -26935289; - - /// < Error while decoding data - static const int MEDIACODEC_ERROR_DECODE = -26935288; - - /// < Out of storage - static const int MEDIACODEC_ERROR_NO_FREE_SPACE = -26935287; - - /// < Cannot find stream - static const int MEDIACODEC_ERROR_STREAM_NOT_FOUND = -26935286; - - /// < Not supported format - static const int MEDIACODEC_ERROR_NOT_SUPPORTED_FORMAT = -26935285; - - /// < Not available buffer - static const int MEDIACODEC_ERROR_BUFFER_NOT_AVAILABLE = -26935284; - - /// < Overflow input buffer (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_ERROR_OVERFLOW_INBUFFER = -26935283; - - /// < Exceed the instance limits (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_ERROR_RESOURCE_OVERLOADED = -26935282; -} - -/// @brief Enumeration of buffer status -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class mediacodec_status_e { - static const int MEDIACODEC_NEED_DATA = 0; - static const int MEDIACODEC_ENOUGH_DATA = 1; -} - -/// @brief Media Codec type handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef mediacodec_h = ffi.Pointer; - -/// @brief Called when the input buffer(pkt) used up. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @details It will be invoked when mediacodec has used input buffer. -/// @param[in] pkt The media packet handle -/// @param[in] user_data The user data passed from the callback registration function -/// @pre It will be invoked when input buffer process completed if you register this callback using mediacodec_set_input_buffer_used_cb(). -/// @see mediacodec_set_input_buffer_used_cb() -/// @see mediacodec_unset_input_buffer_used_cb() -typedef mediacodec_input_buffer_used_cb - = ffi.Pointer>; -typedef mediacodec_input_buffer_used_cbFunction = ffi.Void Function( - media_packet_h pkt, ffi.Pointer user_data); -typedef Dartmediacodec_input_buffer_used_cbFunction = void Function( - media_packet_h pkt, ffi.Pointer user_data); - -/// @brief Called when the output buffer is available. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @details It will be invoked when mediacodec has output buffer. -/// @param[in] pkt The media packet handle -/// @param[in] user_data The user data passed from the callback registration function -/// @pre It will be invoked when mediacodec process completed(had output buffer) if you register this callback using mediacodec_set_fill_buffer_cb(). -/// @see mediacodec_set_output_buffer_available_cb() -/// @see mediacodec_unset_output_buffer_available_cb() -typedef mediacodec_output_buffer_available_cb = ffi - .Pointer>; -typedef mediacodec_output_buffer_available_cbFunction = ffi.Void Function( - media_packet_h pkt, ffi.Pointer user_data); -typedef Dartmediacodec_output_buffer_available_cbFunction = void Function( - media_packet_h pkt, ffi.Pointer user_data); - -/// @brief Called when the error has occured -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @details It will be invoked when the error has occured. -/// @param[in] error_code The error code -/// @param[in] user_data The user data passed from the callback registration function -/// @pre It will be invoked when the error has occured if you register this callback using mediacodec_set_error_cb(). -/// @see mediacodec_set_error_cb() -/// @see mediacodec_unset_error_cb() -typedef mediacodec_error_cb - = ffi.Pointer>; -typedef mediacodec_error_cbFunction = ffi.Void Function( - ffi.Int32 error, ffi.Pointer user_data); -typedef Dartmediacodec_error_cbFunction = void Function( - int error, ffi.Pointer user_data); - -/// @brief Called when there is no data to decode/encode -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @details It will be invoked when the end-of-stream is reached. -/// @param[in] user_data The user data passed from the callback registration function -/// @pre It will be invoked when the eos event generate if you register this callback using mediacodec_set_eos_cb(). -/// @see mediacodec_set_eos_cb() -/// @see mediacodec_unset_eos_cb() -typedef mediacodec_eos_cb - = ffi.Pointer>; -typedef mediacodec_eos_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartmediacodec_eos_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Called when the mediacodec needs more data or has enough data. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @details It is recommended that the application stops calling mediacodec_process_input() when MEDIACODEC_ENOUGH_DATA -/// is invoked. -/// @param[in] user_data The user data passed from the callback registration function -/// @see mediacodec_set_buffer_status_cb() -/// @see mediacodec_unset_buffer_status_cb() -typedef mediacodec_buffer_status_cb - = ffi.Pointer>; -typedef mediacodec_buffer_status_cbFunction = ffi.Void Function( - ffi.Int32 status, ffi.Pointer user_data); -typedef Dartmediacodec_buffer_status_cbFunction = void Function( - int status, ffi.Pointer user_data); - -/// @brief Called once for each supported codec types. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] codec_type The codec type -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, @c false to break out of the loop. -/// @pre mediacodec_foreach_supported_codec() will invoke this callback. -/// @see mediacodec_foreach_supported_codec() -typedef mediacodec_supported_codec_cb - = ffi.Pointer>; -typedef mediacodec_supported_codec_cbFunction = ffi.Bool Function( - ffi.Int32 codec_type, ffi.Pointer user_data); -typedef Dartmediacodec_supported_codec_cbFunction = bool Function( - int codec_type, ffi.Pointer user_data); - -/// @brief Enumeration for the media controller error. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class mc_error_e { - /// < Successful - static const int MEDIA_CONTROLLER_ERROR_NONE = 0; - - /// < Invalid parameter - static const int MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid Operation - static const int MEDIA_CONTROLLER_ERROR_INVALID_OPERATION = -38; - - /// < No space left on device - static const int MEDIA_CONTROLLER_ERROR_FILE_NO_SPACE_ON_DEVICE = -28; - - /// < Permission denied - static const int MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED = -13; -} - -/// @brief Enumeration for the media controller server state. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class mc_server_state_e { - /// < None state - static const int MC_SERVER_STATE_NONE = 0; - - /// < Activate state - static const int MC_SERVER_STATE_ACTIVATE = 1; - - /// < Deactivate state - static const int MC_SERVER_STATE_DEACTIVATE = 2; -} - -/// @brief Enumeration for the media meta info. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class mc_meta_e { - /// < Title - static const int MC_META_MEDIA_TITLE = 0; - - /// < Artist - static const int MC_META_MEDIA_ARTIST = 1; - - /// < Album - static const int MC_META_MEDIA_ALBUM = 2; - - /// < Author - static const int MC_META_MEDIA_AUTHOR = 3; - - /// < Genre - static const int MC_META_MEDIA_GENRE = 4; - - /// < Duration - static const int MC_META_MEDIA_DURATION = 5; - - /// < Date - static const int MC_META_MEDIA_DATE = 6; - - /// < Copyright - static const int MC_META_MEDIA_COPYRIGHT = 7; - - /// < Description - static const int MC_META_MEDIA_DESCRIPTION = 8; - - /// < Track Number - static const int MC_META_MEDIA_TRACK_NUM = 9; - - /// < Picture. Album Art - static const int MC_META_MEDIA_PICTURE = 10; -} - -/// @brief Enumeration for the media playback state. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class mc_playback_states_e { - /// < None - static const int MC_PLAYBACK_STATE_NONE = 0; - - /// < Play - static const int MC_PLAYBACK_STATE_PLAYING = 1; - - /// < Pause - static const int MC_PLAYBACK_STATE_PAUSED = 2; - - /// < Stop - static const int MC_PLAYBACK_STATE_STOPPED = 3; - - /// < Next file - static const int MC_PLAYBACK_STATE_NEXT_FILE = 4; - - /// < Previous file - static const int MC_PLAYBACK_STATE_PREV_FILE = 5; - - /// < Fast forward - static const int MC_PLAYBACK_STATE_FAST_FORWARD = 6; - - /// < Rewind - static const int MC_PLAYBACK_STATE_REWIND = 7; -} - -/// @brief Enumeration for the shuffle mode. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class mc_shuffle_mode_e { - /// < Shuffle mode on - static const int MC_SHUFFLE_MODE_ON = 0; - - /// < Shuffle mode off - static const int MC_SHUFFLE_MODE_OFF = 1; -} - -/// @brief Enumeration for the repeat mode. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class mc_repeat_mode_e { - /// < Repeat mode on - static const int MC_REPEAT_MODE_ON = 0; - - /// < Repeat mode off - static const int MC_REPEAT_MODE_OFF = 1; -} - -/// @brief Enumeration for the subscription type. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class mc_subscription_type_e { - /// < Server state - static const int MC_SUBSCRIPTION_TYPE_SERVER_STATE = 0; - - /// < Playback - static const int MC_SUBSCRIPTION_TYPE_PLAYBACK = 1; - - /// < Metadata - static const int MC_SUBSCRIPTION_TYPE_METADATA = 2; - - /// < Shuffle mode - static const int MC_SUBSCRIPTION_TYPE_SHUFFLE_MODE = 3; - - /// < Repeat mode - static const int MC_SUBSCRIPTION_TYPE_REPEAT_MODE = 4; -} - -/// @brief The structure type for the media server handle. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -typedef mc_server_h = ffi.Pointer; - -/// @brief Called when the Server received playback state command from the client. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// -/// @details This callback is called when server received playback state recommand from client. -/// -/// @remarks The callback is called in the dbus event loop. -/// -/// @param[in] client_name The app_id of the media controller client -/// @param[in] state The received playback state -/// @param[in] user_data The user data passed from the mc_server_set_playback_state_command_received_cb() fuction -/// -/// @pre mc_server_set_playback_state_command_received_cb() -/// -/// @see mc_server_set_playback_state_command_received_cb() -typedef mc_server_playback_state_command_received_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef mc_server_playback_state_command_received_cbFunction - = ffi.Void Function(ffi.Pointer client_name, ffi.Int32 state, - ffi.Pointer user_data); -typedef Dartmc_server_playback_state_command_received_cbFunction - = void Function(ffi.Pointer client_name, int state, - ffi.Pointer user_data); - -/// @brief Called when the Server received custom command from the client. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// -/// @details This callback is called when server received custom recommand from client. -/// If there is reply for command, call mc_server_send_command_reply() function. -/// -/// @remarks The callback is called in the dbus event loop. -/// -/// @param[in] client_name The app_id of the media controller client -/// @param[in] command The received command -/// @param[in] data The extra data -/// @param[in] user_data The user data passed from the mc_server_set_custom_command_received_cb() fuction -/// -/// @pre mc_server_set_custom_command_received_cb() -/// -/// @see mc_server_set_custom_command_received_cb() -typedef mc_server_custom_command_received_cb = ffi - .Pointer>; -typedef mc_server_custom_command_received_cbFunction = ffi.Void Function( - ffi.Pointer client_name, - ffi.Pointer command, - ffi.Pointer data, - ffi.Pointer user_data); -typedef Dartmc_server_custom_command_received_cbFunction = void Function( - ffi.Pointer client_name, - ffi.Pointer command, - ffi.Pointer data, - ffi.Pointer user_data); - -/// @brief The structure type for the media client handle. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -typedef mc_client_h = ffi.Pointer; - -/// @brief Called when updating status of the media controller server. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// -/// @remarks The callback is called in the dbus event loop. -/// -/// @param[in] server_name, The app_id of the updated media controller server -/// @param[in] state, The state of the updated media controller server -/// @param[in] user_data The user data passed from the mc_client_set_server_update_cb() fuction -/// -/// @pre mc_client_set_server_update_cb() -/// -/// @see mc_client_set_server_update_cb() -typedef mc_server_state_updated_cb - = ffi.Pointer>; -typedef mc_server_state_updated_cbFunction = ffi.Void Function( - ffi.Pointer server_name, - ffi.Int32 state, - ffi.Pointer user_data); -typedef Dartmc_server_state_updated_cbFunction = void Function( - ffi.Pointer server_name, - int state, - ffi.Pointer user_data); - -/// @brief Called when updating the playback information of the media controller server. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// -/// @remarks The callback is called in the dbus event loop. -/// -/// @param[in] server_name, The app_id of the updated media controller server -/// @param[in] playback, The playback information of the updated media controller server -/// @param[in] user_data The user data passed from the mc_client_set_playback_update_cb() fuction -/// -/// @pre mc_client_set_playback_update_cb() -/// -/// @see mc_client_set_playback_update_cb() -typedef mc_playback_updated_cb - = ffi.Pointer>; -typedef mc_playback_updated_cbFunction = ffi.Void Function( - ffi.Pointer server_name, - mc_playback_h playback, - ffi.Pointer user_data); -typedef Dartmc_playback_updated_cbFunction = void Function( - ffi.Pointer server_name, - mc_playback_h playback, - ffi.Pointer user_data); - -/// @brief The structure type for the media controller playback handle. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -typedef mc_playback_h = ffi.Pointer; - -/// @brief Called when updating the metadata of the media controller server. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// -/// @remarks The callback is called in the dbus event loop. -/// -/// @param[in] server_name, The app_id of the updated media controller server -/// @param[in] metadata, the metadata of the updated media controller server -/// @param[in] user_data The user data passed from the mc_client_set_metadata_update_cb() fuction -/// -/// @pre mc_client_set_metadata_update_cb() -/// -/// @see mc_client_set_metadata_update_cb() -typedef mc_metadata_updated_cb - = ffi.Pointer>; -typedef mc_metadata_updated_cbFunction = ffi.Void Function( - ffi.Pointer server_name, - mc_metadata_h metadata, - ffi.Pointer user_data); -typedef Dartmc_metadata_updated_cbFunction = void Function( - ffi.Pointer server_name, - mc_metadata_h metadata, - ffi.Pointer user_data); - -/// @brief The structure type for the media controller metadata handle. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -typedef mc_metadata_h = ffi.Pointer; - -/// @brief Called when updating the shuffle mode of the media controller server. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// -/// @remarks The callback is called in the dbus event loop. -/// -/// @param[in] server_name, The app_id of the updated media controller server -/// @param[in] mode, The shuffle mode of the updated media controller server -/// @param[in] user_data The user data passed from the mc_client_set_shuffle_mode_update_cb() fuction -/// -/// @pre mc_client_set_shuffle_mode_update_cb() -/// -/// @see mc_client_set_shuffle_mode_update_cb() -typedef mc_shuffle_mode_changed_cb - = ffi.Pointer>; -typedef mc_shuffle_mode_changed_cbFunction = ffi.Void Function( - ffi.Pointer server_name, - ffi.Int32 mode, - ffi.Pointer user_data); -typedef Dartmc_shuffle_mode_changed_cbFunction = void Function( - ffi.Pointer server_name, - int mode, - ffi.Pointer user_data); - -/// @brief Called when updating the repeat mode of the media controller server. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// -/// @remarks The callback is called in the dbus event loop. -/// -/// @param[in] server_name, The app_id of the updated media controller server -/// @param[in] mode, The repeat mode of the updated media controller server -/// @param[in] user_data The user data passed from the mc_client_set_repeat_mode_update_cb() fuction -/// -/// @pre mc_client_set_repeat_mode_update_cb() -/// -/// @see mc_client_set_repeat_mode_update_cb() -typedef mc_repeat_mode_changed_cb - = ffi.Pointer>; -typedef mc_repeat_mode_changed_cbFunction = ffi.Void Function( - ffi.Pointer server_name, - ffi.Int32 mode, - ffi.Pointer user_data); -typedef Dartmc_repeat_mode_changed_cbFunction = void Function( - ffi.Pointer server_name, - int mode, - ffi.Pointer user_data); - -/// @brief Called when requesting the list of subscribed servers. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// -/// @remarks The callback is called in the dbus event loop. -/// -/// @param[in] server_name, The app_id of the subscribed media controller server -/// @param[in] user_data The user data passed from the mc_client_foreach_server_subscribed() fuction -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre mc_client_foreach_server_subscribed() -/// -/// @see mc_client_foreach_server_subscribed() -typedef mc_subscribed_server_cb - = ffi.Pointer>; -typedef mc_subscribed_server_cbFunction = ffi.Bool Function( - ffi.Pointer server_name, ffi.Pointer user_data); -typedef Dartmc_subscribed_server_cbFunction = bool Function( - ffi.Pointer server_name, ffi.Pointer user_data); - -/// @brief Called when requesting the list of activated servers. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// -/// @remarks The callback is called in the dbus event loop. -/// -/// @param[in] server_name, The app_id of the activated media controller server -/// @param[in] user_data The user data passed from the mc_client_foreach_server() fuction -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre mc_client_foreach_server() -/// -/// @see mc_client_foreach_server() -typedef mc_activated_server_cb - = ffi.Pointer>; -typedef mc_activated_server_cbFunction = ffi.Bool Function( - ffi.Pointer server_name, ffi.Pointer user_data); -typedef Dartmc_activated_server_cbFunction = bool Function( - ffi.Pointer server_name, ffi.Pointer user_data); - -/// @brief Called when receiving the command processing result from the server. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// -/// @remarks The callback is called in the dbus event loop. -/// -/// @param[in] server_name The app_id of the updated media controller server -/// @param[in] result_code The result code of custom command -/// @param[in] data The extra data -/// @param[in] user_data The user data passed from the mc_client_send_custom_command() fuction -/// -/// @pre mc_client_send_custom_command() -/// -/// @see mc_client_send_custom_command() -typedef mc_command_reply_received_cb - = ffi.Pointer>; -typedef mc_command_reply_received_cbFunction = ffi.Void Function( - ffi.Pointer server_name, - ffi.Int result_code, - ffi.Pointer data, - ffi.Pointer user_data); -typedef Dartmc_command_reply_received_cbFunction = void Function( - ffi.Pointer server_name, - int result_code, - ffi.Pointer data, - ffi.Pointer user_data); - -final class mediademuxer_s extends ffi.Opaque {} - -/// @brief Enumeration for media demuxer state -/// @since_tizen 3.0 -abstract class mediademuxer_state { - /// < The mediademuxer is not created - static const int MEDIADEMUXER_STATE_NONE = 0; - - /// < The mediademuxer is created, but not prepared - static const int MEDIADEMUXER_STATE_IDLE = 1; - - /// < The mediademuxer is ready to demux media - static const int MEDIADEMUXER_STATE_READY = 2; - - /// < The mediademuxer is demuxing media - static const int MEDIADEMUXER_STATE_DEMUXING = 3; -} - -/// @brief Enumeration for media demuxer error. -/// @since_tizen 3.0 -abstract class mediademuxer_error_e { - /// < Successful - static const int MEDIADEMUXER_ERROR_NONE = 0; - - /// < Out of memory - static const int MEDIADEMUXER_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int MEDIADEMUXER_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid operation - static const int MEDIADEMUXER_ERROR_INVALID_OPERATION = -38; - - /// < Not supported - static const int MEDIADEMUXER_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Permission denied - static const int MEDIADEMUXER_ERROR_PERMISSION_DENIED = -13; - - /// < Invalid state - static const int MEDIADEMUXER_ERROR_INVALID_STATE = -27131903; - - /// < Invalid path - static const int MEDIADEMUXER_ERROR_INVALID_PATH = -27131902; - - /// < Resource limit - static const int MEDIADEMUXER_ERROR_RESOURCE_LIMIT = -27131901; - - /// < Seek operation failure - static const int MEDIADEMUXER_ERROR_SEEK_FAILED = -27131900; - - /// < Not permitted format - static const int MEDIADEMUXER_ERROR_DRM_NOT_PERMITTED = -27131899; -} - -/// @brief Media Demuxer handle type. -/// @since_tizen 3.0 -typedef mediademuxer_h = ffi.Pointer; - -/// @brief Called when error occurs in media demuxer. -/// @details Following error codes can be delivered. -/// #MEDIADEMUXER_ERROR_INVALID_OPERATION, -/// #MEDIADEMUXER_ERROR_NOT_SUPPORTED, -/// #MEDIADEMUXER_ERROR_INVALID_PATH, -/// #MEDIADEMUXER_ERROR_RESOURCE_LIMIT, -/// #MEDIADEMUXER_ERROR_SEEK_FAILED, -/// #MEDIADEMUXER_ERROR_DRM_NOT_PERMITTED -/// @since_tizen 3.0 -/// @param[in] error The error that occurred in media demuxer -/// @param[in] user_data The user data passed from the code where -/// mediademuxer_set_error_cb() was invoked -/// This data will be accessible from mediademuxer_error_cb() -/// @pre Create media demuxer handle by calling mediademuxer_create() function. -/// @see mediademuxer_set_error_cb() -/// @see mediademuxer_unset_error_cb() -typedef mediademuxer_error_cb - = ffi.Pointer>; -typedef mediademuxer_error_cbFunction = ffi.Void Function( - ffi.Int32 error, ffi.Pointer user_data); -typedef Dartmediademuxer_error_cbFunction = void Function( - int error, ffi.Pointer user_data); - -/// @brief Called when end of stream occurs in media demuxer. -/// @since_tizen 3.0 -/// @param[in] track_num The track_num which indicate eos for which track number occured -/// @param[in] user_data The user data passed from the code where -/// mediademuxer_set_eos_cb() was invoked -/// This data will be accessible from mediademuxer_eos_cb() -/// @pre Create media demuxer handle by calling mediademuxer_create() function. -/// @see mediademuxer_set_eos_cb() -/// @see mediademuxer_unset_eos_cb() -typedef mediademuxer_eos_cb - = ffi.Pointer>; -typedef mediademuxer_eos_cbFunction = ffi.Void Function( - ffi.Int track_num, ffi.Pointer user_data); -typedef Dartmediademuxer_eos_cbFunction = void Function( - int track_num, ffi.Pointer user_data); - -final class mediamuxer_s extends ffi.Opaque {} - -/// @brief Enumeration for media muxer state -/// @since_tizen 3.0 -abstract class mediamuxer_state_e { - /// < The mediamuxer is not created - static const int MEDIAMUXER_STATE_NONE = 0; - - /// < The mediamuxer is created, but not prepared - static const int MEDIAMUXER_STATE_IDLE = 1; - - /// < The mediamuxer is ready to mux media - static const int MEDIAMUXER_STATE_READY = 2; - - /// < The mediamuxer is muxing media - static const int MEDIAMUXER_STATE_MUXING = 3; - - /// < The mediamuxer is paused while muxing media - static const int MEDIAMUXER_STATE_PAUSED = 4; -} - -/// @brief Enumeration for media muxer error -/// @since_tizen 3.0 -abstract class mediamuxer_error_e { - /// < Successful - static const int MEDIAMUXER_ERROR_NONE = 0; - - /// < Out of memory - static const int MEDIAMUXER_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int MEDIAMUXER_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid operation - static const int MEDIAMUXER_ERROR_INVALID_OPERATION = -38; - - /// < Not supported - static const int MEDIAMUXER_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Permission denied - static const int MEDIAMUXER_ERROR_PERMISSION_DENIED = -13; - - /// < Invalid state - static const int MEDIAMUXER_ERROR_INVALID_STATE = -27197439; - - /// < Invalid path - static const int MEDIAMUXER_ERROR_INVALID_PATH = -27197438; - - /// < Resource limit - static const int MEDIAMUXER_ERROR_RESOURCE_LIMIT = -27197437; -} - -/// @brief Enumeration for media muxer output format -/// @since_tizen 3.0 -abstract class mediamuxer_output_format_e { - /// < The mediamuxer output format is MP4 container - static const int MEDIAMUXER_CONTAINER_FORMAT_MP4 = 67121168; - - /// < The mediamuxer output format is 3GP container - static const int MEDIAMUXER_CONTAINER_FORMAT_3GP = 67121264; - - /// < The mediamuxer output format is WAV container - static const int MEDIAMUXER_CONTAINER_FORMAT_WAV = 67125264; - - /// < The mediamuxer output format is ARM_NB container - static const int MEDIAMUXER_CONTAINER_FORMAT_AMR_NB = 285216832; - - /// < The mediamuxer output format is AMR_WB container - static const int MEDIAMUXER_CONTAINER_FORMAT_AMR_WB = 285216833; - - /// < The mediamuxer output format is AAC_ADTS container - static const int MEDIAMUXER_CONTAINER_FORMAT_AAC_ADTS = 67125296; -} - -/// @brief Media Muxer handle type -/// @since_tizen 3.0 -typedef mediamuxer_h = ffi.Pointer; - -/// @brief Called when error occurs in media muxer. -/// @details Following error codes can be delivered. -/// #MEDIAMUXER_ERROR_INVALID_OPERATION, -/// #MEDIAMUXER_ERROR_NOT_SUPPORTED, -/// #MEDIAMUXER_ERROR_INVALID_PATH, -/// #MEDIAMUXER_ERROR_RESOURCE_LIMIT -/// @since_tizen 3.0 -/// @param[in] error The error that occurred in media muxer -/// @param[in] user_data The user data passed from the code where -/// mediamuxer_set_error_cb() was invoked -/// This data will be accessible from @a mediamuxer_error_cb -/// @pre Create media muxer handle by calling mediamuxer_create() function. -/// @see mediamuxer_set_error_cb() -/// @see mediamuxer_unset_error_cb() -typedef mediamuxer_error_cb - = ffi.Pointer>; -typedef mediamuxer_error_cbFunction = ffi.Void Function( - ffi.Int32 error, ffi.Pointer user_data); -typedef Dartmediamuxer_error_cbFunction = void Function( - int error, ffi.Pointer user_data); - -/// @brief Called when end of stream occurs in media muxer. -/// @since_tizen 4.0 -/// @param[in] user_data The user data passed from the code where -/// mediamuxer_set_eos_cb() was invoked;\n -/// this data will be accessible from mediamuxer_eos_cb() -/// @pre Create media muxer handle by calling mediamuxer_create() function. -/// @see mediamuxer_set_eos_cb() -/// @see mediamuxer_unset_eos_cb() -typedef mediamuxer_eos_cb - = ffi.Pointer>; -typedef mediamuxer_eos_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartmediamuxer_eos_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Enumeration for media streamer node type. -/// -/// @since_tizen 3.0 -abstract class media_streamer_node_type_e { - /// < Not defined type - static const int MEDIA_STREAMER_NODE_TYPE_NONE = 0; - - /// < Src node type. Not available for media_streamer_node_create(). Use media_streamer_node_create_src() - static const int MEDIA_STREAMER_NODE_TYPE_SRC = 1; - - /// < Sink node type. Not available for media_streamer_node_create(). Use media_streamer_node_create_sink() - static const int MEDIA_STREAMER_NODE_TYPE_SINK = 2; - - /// < Video encoder node type - static const int MEDIA_STREAMER_NODE_TYPE_VIDEO_ENCODER = 3; - - /// < Video decoder node type - static const int MEDIA_STREAMER_NODE_TYPE_VIDEO_DECODER = 4; - - /// < Audio encoder node type - static const int MEDIA_STREAMER_NODE_TYPE_AUDIO_ENCODER = 5; - - /// < Audio decoder node type - static const int MEDIA_STREAMER_NODE_TYPE_AUDIO_DECODER = 6; - - /// < Video converter node type - static const int MEDIA_STREAMER_NODE_TYPE_VIDEO_CONVERTER = 7; - - /// < Audio converter node type - static const int MEDIA_STREAMER_NODE_TYPE_AUDIO_CONVERTER = 8; - - /// < Audio resample node type - static const int MEDIA_STREAMER_NODE_TYPE_AUDIO_RESAMPLE = 9; - - /// < Rtp video payloader - static const int MEDIA_STREAMER_NODE_TYPE_VIDEO_PAY = 10; - - /// < Rtp audio payloader - static const int MEDIA_STREAMER_NODE_TYPE_AUDIO_PAY = 11; - - /// < Rtp video depayloader - static const int MEDIA_STREAMER_NODE_TYPE_VIDEO_DEPAY = 12; - - /// < Rtp audio depayloader - static const int MEDIA_STREAMER_NODE_TYPE_AUDIO_DEPAY = 13; - - /// < Rate node type - static const int MEDIA_STREAMER_NODE_TYPE_VIDEO_RATE = 14; - - /// < Scale node type - static const int MEDIA_STREAMER_NODE_TYPE_VIDEO_SCALE = 15; - - /// < Overlay node type - static const int MEDIA_STREAMER_NODE_TYPE_TEXT_OVERLAY = 16; - - /// < Parser node type - static const int MEDIA_STREAMER_NODE_TYPE_PARSER = 17; - - /// < Filter node type, to limit formats of data - static const int MEDIA_STREAMER_NODE_TYPE_FILTER = 18; - - /// < Tee node type, splits data to multiple path - static const int MEDIA_STREAMER_NODE_TYPE_TEE = 19; - - /// < Queue node type - static const int MEDIA_STREAMER_NODE_TYPE_QUEUE = 20; - - /// < Multiple data queue node type - static const int MEDIA_STREAMER_NODE_TYPE_MQUEUE = 21; - - /// < Muxer node type - static const int MEDIA_STREAMER_NODE_TYPE_MUXER = 22; - - /// < Demuxer node type - static const int MEDIA_STREAMER_NODE_TYPE_DEMUXER = 23; - - /// < Rtp component to send and receive data - static const int MEDIA_STREAMER_NODE_TYPE_RTP = 24; - - /// < N-to-1 input stream selector - static const int MEDIA_STREAMER_NODE_TYPE_INPUT_SELECTOR = 25; - - /// < 1-to-N output stream selector - static const int MEDIA_STREAMER_NODE_TYPE_OUTPUT_SELECTOR = 26; - - /// < Folds many mono channel into one interleaved audio stream - static const int MEDIA_STREAMER_NODE_TYPE_INTERLEAVE = 27; - - /// < Splits multi channel audio into many mono audio - static const int MEDIA_STREAMER_NODE_TYPE_DEINTERLEAVE = 28; -} - -/// @brief Enumeration for media streamer source node type. -/// -/// @since_tizen 3.0 -abstract class media_streamer_node_src_type_e { - /// < Not defined src type - static const int MEDIA_STREAMER_NODE_SRC_TYPE_NONE = 0; - - /// < Local file src type - static const int MEDIA_STREAMER_NODE_SRC_TYPE_FILE = 1; - - /// < Http src type, Network internet feature is required - static const int MEDIA_STREAMER_NODE_SRC_TYPE_HTTP = 2; - - /// < Rtsp src type, Network internet feature is required - static const int MEDIA_STREAMER_NODE_SRC_TYPE_RTSP = 3; - - /// < Camera src type, Camera feature is required - static const int MEDIA_STREAMER_NODE_SRC_TYPE_CAMERA = 4; - - /// < Audio capture src type, Microphone feature is required - static const int MEDIA_STREAMER_NODE_SRC_TYPE_AUDIO_CAPTURE = 5; - - /// < Video capture src type, Camera feature is required - static const int MEDIA_STREAMER_NODE_SRC_TYPE_VIDEO_CAPTURE = 6; - - /// < Audio test src type - static const int MEDIA_STREAMER_NODE_SRC_TYPE_AUDIO_TEST = 7; - - /// < Video test src type - static const int MEDIA_STREAMER_NODE_SRC_TYPE_VIDEO_TEST = 8; - - /// < Custom src type - static const int MEDIA_STREAMER_NODE_SRC_TYPE_CUSTOM = 9; - - /// < Adaptive src type, Network internet feature is required - static const int MEDIA_STREAMER_NODE_SRC_TYPE_ADAPTIVE = 10; -} - -/// @brief Enumeration for media streamer sink node type. -/// -/// @since_tizen 3.0 -abstract class media_streamer_node_sink_type_e { - /// < Not defined sink type - static const int MEDIA_STREAMER_NODE_SINK_TYPE_NONE = 0; - - /// < Local file sink type - static const int MEDIA_STREAMER_NODE_SINK_TYPE_FILE = 1; - - /// < Rtsp sink type, Network internet feature is required - static const int MEDIA_STREAMER_NODE_SINK_TYPE_RTSP = 2; - - /// < Http sink type, Network internet feature is required - static const int MEDIA_STREAMER_NODE_SINK_TYPE_HTTP = 3; - - /// < Audio sink type - static const int MEDIA_STREAMER_NODE_SINK_TYPE_AUDIO = 4; - - /// < Overlay sink type - static const int MEDIA_STREAMER_NODE_SINK_TYPE_OVERLAY = 5; - - /// < Fake sink type - static const int MEDIA_STREAMER_NODE_SINK_TYPE_FAKE = 6; - - /// < Custom sink type - static const int MEDIA_STREAMER_NODE_SINK_TYPE_CUSTOM = 7; - - /// < Adaptive sink type to generate fragmented files - static const int MEDIA_STREAMER_NODE_SINK_TYPE_ADAPTIVE = 8; -} - -/// @brief Enumeration for media streamer state. -/// -/// @since_tizen 3.0 -abstract class media_streamer_state_e { - /// < Streamer is not created - static const int MEDIA_STREAMER_STATE_NONE = 0; - - /// < Streamer is created but not prepared - static const int MEDIA_STREAMER_STATE_IDLE = 1; - - /// < Streamer is ready to play - static const int MEDIA_STREAMER_STATE_READY = 2; - - /// < Streamer is playing - static const int MEDIA_STREAMER_STATE_PLAYING = 3; - - /// < Streamer is paused - static const int MEDIA_STREAMER_STATE_PAUSED = 4; - - /// < Seek is under operation - static const int MEDIA_STREAMER_STATE_SEEKING = 5; -} - -/// @brief Enumeration for media streamer error. -/// -/// @since_tizen 3.0 -abstract class media_streamer_error_e { - /// < Successful - static const int MEDIA_STREAMER_ERROR_NONE = 0; - - /// < Invalid parameter - static const int MEDIA_STREAMER_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid operation - static const int MEDIA_STREAMER_ERROR_INVALID_OPERATION = -38; - - /// < No space left on the device - static const int MEDIA_STREAMER_ERROR_FILE_NO_SPACE_ON_DEVICE = -28; - - /// < The feature is not supported - static const int MEDIA_STREAMER_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Permission denied - static const int MEDIA_STREAMER_ERROR_PERMISSION_DENIED = -13; - - /// < Invalid state - static const int MEDIA_STREAMER_ERROR_INVALID_STATE = -27262975; - - /// < Connection failed - static const int MEDIA_STREAMER_ERROR_CONNECTION_FAILED = -27262974; - - /// < Resource conflict - static const int MEDIA_STREAMER_ERROR_RESOURCE_CONFLICT = -27262973; - - /// < Seek operation failure - static const int MEDIA_STREAMER_ERROR_SEEK_FAILED = -27262972; -} - -/// @brief Enumeration of media streamer buffer status of custom src -/// -/// @since_tizen 3.0 -abstract class media_streamer_custom_buffer_status_e { - /// < Buffer underrun of custom src - static const int MEDIA_STREAMER_CUSTOM_BUFFER_UNDERRUN = 0; - - /// < Buffer overflow of custom src - static const int MEDIA_STREAMER_CUSTOM_BUFFER_OVERFLOW = 1; -} - -/// @brief Enumeration for media streamer's interruption type. -/// -/// @since_tizen 3.0 -abstract class media_streamer_interrupted_code_e { - /// < Interrupted by a resource conflict - static const int MEDIA_STREAMER_INTERRUPTED_BY_RESOURCE_CONFLICT = 0; - - /// < Interrupted by a security policy - static const int MEDIA_STREAMER_INTERRUPTED_BY_SECURITY = 1; -} - -/// @brief Media Streamer handle type. -/// -/// @since_tizen 3.0 -typedef media_streamer_h = ffi.Pointer; - -/// @brief Called when error occurs in media streamer. -/// @details Following error codes can be delivered. -/// #MEDIA_STREAMER_ERROR_INVALID_OPERATION, -/// #MEDIA_STREAMER_ERROR_FILE_NO_SPACE_ON_DEVICE, -/// #MEDIA_STREAMER_ERROR_NOT_SUPPORTED, -/// #MEDIA_STREAMER_ERROR_CONNECTION_FAILED, -/// #MEDIA_STREAMER_ERROR_RESOURCE_CONFLICT -/// @since_tizen 3.0 -/// @param [in] streamer Media streamer handle -/// @param [in] error The error that occurred in media steamer -/// @param [in] user_data The user data passed from the code where -/// media_streamer_set_error_cb() was invoked -/// This data will be accessible from @a media_streamer_error_cb -/// @pre Create media streamer handle by calling media_streamer_create() function -/// @see media_streamer_set_error_cb() -/// @see media_streamer_unset_error_cb() -typedef media_streamer_error_cb - = ffi.Pointer>; -typedef media_streamer_error_cbFunction = ffi.Void Function( - media_streamer_h streamer, - ffi.Int32 error, - ffi.Pointer user_data); -typedef Dartmedia_streamer_error_cbFunction = void Function( - media_streamer_h streamer, int error, ffi.Pointer user_data); - -/// @brief Called when media streamer state is changed. -/// @since_tizen 3.0 -/// @param [in] streamer Media streamer handle -/// @param [in] previous_state The previous state of the media streamer -/// @param [in] current_state The current state of media streamer -/// @param [in] user_data The user data passed from the code where -/// media_streamer_set_state_changed_cb() was invoked -/// This data will be accessible from @a media_streamer_state_changed_cb -/// @pre Create media streamer handle by calling media_streamer_create() function -/// @see media_streamer_set_state_change_cb() -/// @see media_streamer_unset_state_change_cb() -typedef media_streamer_state_changed_cb - = ffi.Pointer>; -typedef media_streamer_state_changed_cbFunction = ffi.Void Function( - media_streamer_h streamer, - ffi.Int32 previous_state, - ffi.Int32 current_state, - ffi.Pointer user_data); -typedef Dartmedia_streamer_state_changed_cbFunction = void Function( - media_streamer_h streamer, - int previous_state, - int current_state, - ffi.Pointer user_data); - -/// @brief Called when the media streamer is interrupted. -/// @since_tizen 3.0 -/// @param[in] error_code The interrupted error code -/// @param[in] user_data The user data passed from the callback registration function -/// @see media_streamer_set_interrupted_cb() -/// @see media_streamer_unset_interrupted_cb() -typedef media_streamer_interrupted_cb - = ffi.Pointer>; -typedef media_streamer_interrupted_cbFunction = ffi.Void Function( - ffi.Int32 code, ffi.Pointer user_data); -typedef Dartmedia_streamer_interrupted_cbFunction = void Function( - int code, ffi.Pointer user_data); - -/// @brief Media Streamer node handle type. -/// -/// @since_tizen 3.0 -typedef media_streamer_node_h = ffi.Pointer; - -/// @brief Called when the custom source needs more data or has enough data. -/// @details This callback will be invoked when the buffer level drops below the threshold of max size -/// or no free space in custom source buffer. -/// @since_tizen 3.0 -/// @remarks Callback can be applied only for MEDIA_STREAMER_NODE_SRC_TYPE_CUSTOM source type -/// @param [in] node Media streamer source node handle -/// @param [in] user_data The user data passed from the callback registration function -/// @see media_streamer_src_set_buffer_status_cb() -/// @see media_streamer_node_get_param() -/// @see media_streamer_node_set_param() -typedef media_streamer_custom_buffer_status_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef media_streamer_custom_buffer_status_cbFunction = ffi.Void Function( - media_streamer_node_h node, - ffi.Int32 status, - ffi.Pointer user_data); -typedef Dartmedia_streamer_custom_buffer_status_cbFunction = void Function( - media_streamer_node_h node, int status, ffi.Pointer user_data); - -/// @brief Called when new data is available from custom sink. -/// @details This callback can be applied only to MEDIA_STREAMER_NODE_SINK_TYPE_CUSTOM sink type -/// @since_tizen 3.0 -/// @param [in] node Media streamer sink node handle -/// @param [in] user_data The user data passed from the code where -/// media_streamer_sink_set_data_ready_cb() was invoked -/// This data will be accessible from @a media_streamer_sink_data_ready_cb -/// @pre media_streamer_sink_set_data_ready_cb() -/// @see MEDIA_STREAMER_NODE_SINK_TYPE_CUSTOM -/// @see media_streamer_sink_set_data_ready_cb() -/// @see media_streamer_sink_unset_data_ready_cb() -typedef media_streamer_sink_data_ready_cb = ffi - .Pointer>; -typedef media_streamer_sink_data_ready_cbFunction = ffi.Void Function( - media_streamer_node_h node, ffi.Pointer user_data); -typedef Dartmedia_streamer_sink_data_ready_cbFunction = void Function( - media_streamer_node_h node, ffi.Pointer user_data); - -/// @brief Called when the end-of-stream has been reached. -/// @details This callback can be applied only to MEDIA_STREAMER_NODE_SINK_TYPE_CUSTOM sink type -/// @since_tizen 3.0 -/// @param [in] node Media streamer sink node handle -/// @param [in] user_data The user data passed from the code where -/// media_streamer_sink_set_eos_cb() was invoked -/// This data will be accessible from @a media_streamer_sink_eos_cb -/// @pre media_streamer_sink_set_eos_cb() -/// @see MEDIA_STREAMER_NODE_SINK_TYPE_CUSTOM -/// @see media_streamer_sink_set_eos_cb() -/// @see media_streamer_sink_unset_eos_cb() -typedef media_streamer_sink_eos_cb - = ffi.Pointer>; -typedef media_streamer_sink_eos_cbFunction = ffi.Void Function( - media_streamer_node_h node, ffi.Pointer user_data); -typedef Dartmedia_streamer_sink_eos_cbFunction = void Function( - media_streamer_node_h node, ffi.Pointer user_data); - -/// @brief Called when the seek operation is completed. -/// @since_tizen 3.0 -/// @param[in] user_data The user data passed from the callback registration function -/// @see media_streamer_set_play_position() -typedef media_streamer_position_changed_cb = ffi - .Pointer>; -typedef media_streamer_position_changed_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartmedia_streamer_position_changed_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Point in 2D space. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -final class mv_point_s extends ffi.Struct { - /// < X-axis coordinate of the point in 2D space - @ffi.Int() - external int x; - - /// < Y-axis coordinate of the point in 2D space - @ffi.Int() - external int y; -} - -/// @brief Location of the object bounded by quadrangle defined by four 2D points. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -final class mv_quadrangle_s extends ffi.Struct { - /// < Four points that define object bounding - /// quadrangle - @ffi.Array.multi([4]) - external ffi.Array points; -} - -/// @brief Location of the object bounded by rectangle defined by -/// coordinates of top left corner, width and height. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -final class mv_rectangle_s extends ffi.Struct { - /// < Top left corner of rectangle coordinates - external mv_point_s point; - - /// < Width of the bounding rectangle - @ffi.Int() - external int width; - - /// < Height of the bounding rectangle - @ffi.Int() - external int height; -} - -/// @brief Enumeration for Media Vision error. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -abstract class mv_error_e { - static const int MEDIA_VISION_ERROR_NONE = 0; - static const int MEDIA_VISION_ERROR_NOT_SUPPORTED = -1073741822; - static const int MEDIA_VISION_ERROR_MSG_TOO_LONG = -90; - static const int MEDIA_VISION_ERROR_NO_DATA = -61; - static const int MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE = -126; - static const int MEDIA_VISION_ERROR_OUT_OF_MEMORY = -12; - static const int MEDIA_VISION_ERROR_INVALID_PARAMETER = -22; - static const int MEDIA_VISION_ERROR_INVALID_OPERATION = -38; - static const int MEDIA_VISION_ERROR_PERMISSION_DENIED = -1; - static const int MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT = -27066367; - static const int MEDIA_VISION_ERROR_INTERNAL = -27066366; - static const int MEDIA_VISION_ERROR_INVALID_DATA = -27066365; - static const int MEDIA_VISION_ERROR_INVALID_PATH = -27066364; -} - -/// @brief Enumeration for Media Vision @ref mv_engine_config_h handle attribute -/// type. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -abstract class mv_config_attribute_type_e { - /// < Double attribute type - static const int MV_ENGINE_CONFIG_ATTR_TYPE_DOUBLE = 0; - - /// < Integer attribute type - static const int MV_ENGINE_CONFIG_ATTR_TYPE_INTEGER = 1; - - /// < Boolean attribute type - static const int MV_ENGINE_CONFIG_ATTR_TYPE_BOOLEAN = 2; - - /// < String attribute type - static const int MV_ENGINE_CONFIG_ATTR_TYPE_STRING = 3; -} - -/// @brief Enumeration for Media Vision colorspace. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -abstract class mv_colorspace_e { - /// < The colorspace type is invalid - static const int MEDIA_VISION_COLORSPACE_INVALID = 0; - - /// < The colorspace type is Y800 - static const int MEDIA_VISION_COLORSPACE_Y800 = 1; - - /// < The colorspace type is I420 - static const int MEDIA_VISION_COLORSPACE_I420 = 2; - - /// < The colorspace type is NV12 - static const int MEDIA_VISION_COLORSPACE_NV12 = 3; - - /// < The colorspace type is YV12 - static const int MEDIA_VISION_COLORSPACE_YV12 = 4; - - /// < The colorspace type is NV21 - static const int MEDIA_VISION_COLORSPACE_NV21 = 5; - - /// < The colorspace type is YUYV - static const int MEDIA_VISION_COLORSPACE_YUYV = 6; - - /// < The colorspace type is UYVY - static const int MEDIA_VISION_COLORSPACE_UYVY = 7; - - /// < The colorspace type is 422P - static const int MEDIA_VISION_COLORSPACE_422P = 8; - - /// < The colorspace type is RGB565 - static const int MEDIA_VISION_COLORSPACE_RGB565 = 9; - - /// < The colorspace type is RGB888 - static const int MEDIA_VISION_COLORSPACE_RGB888 = 10; - - /// < The colorspace type is RGBA - static const int MEDIA_VISION_COLORSPACE_RGBA = 11; -} - -/// @brief The handle to the source. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -typedef mv_source_h = ffi.Pointer; - -/// @brief The handle to the Media Vision API engine algorithms configuration. -/// @details Configuration is a dictionary consists of key and value pairs to -/// collect engine-specific settings and allow Media Vision module to -/// access them internally. Engine configuration provides developer by -/// the possibility to make computer vision algorithms work better -/// in particular conditions of API usage. To create engine -/// configuration handle @ref mv_create_engine_config() function has to -/// be used. When configuration is not needed any more, it is required to -/// destroy it and release resources by @ref mv_destroy_engine_config() -/// function. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @see mv_create_engine_config() -/// @see mv_destroy_engine_config() -typedef mv_engine_config_h = ffi.Pointer; - -/// @brief Called to get information (type and name) once for each supported -/// attribute. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// @param [in] attribute_type The supported attribute type -/// @param [in] attribute_name The supported attribute name -/// @param [in] user_data The user data passed from the -/// @ref mv_engine_config_foreach_supported_attribute() -/// function -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// -/// @pre mv_engine_config_foreach_supported_attribute() will invoke this callback -/// @see mv_engine_config_foreach_supported_attribute() -typedef mv_supported_attribute_cb - = ffi.Pointer>; -typedef mv_supported_attribute_cbFunction = ffi.Bool Function( - ffi.Int32 attribute_type, - ffi.Pointer attribute_name, - ffi.Pointer user_data); -typedef Dartmv_supported_attribute_cbFunction = bool Function( - int attribute_type, - ffi.Pointer attribute_name, - ffi.Pointer user_data); - -/// @brief Enumeration for supported barcode types. -/// @details QR codes (versions 1 to 40) and set of 1D barcodes are supported -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -abstract class mv_barcode_type_e { - /// < 2D barcode - Quick Response code - static const int MV_BARCODE_QR = 0; - - /// < 1D barcode - Universal Product Code with 12-digit - static const int MV_BARCODE_UPC_A = 1; - - /// < 1D barcode - Universal Product Code with 6-digit - static const int MV_BARCODE_UPC_E = 2; - - /// < 1D barcode - International Article Number with 8-digit - static const int MV_BARCODE_EAN_8 = 3; - - /// < 1D barcode - International Article Number with 13-digit - static const int MV_BARCODE_EAN_13 = 4; - - /// < 1D barcode - Code 128 - static const int MV_BARCODE_CODE128 = 5; - - /// < 1D barcode - Code 39 - static const int MV_BARCODE_CODE39 = 6; - - /// < 1D barcode - Interleaved Two of Five - static const int MV_BARCODE_I2_5 = 7; - - /// < Undefined - static const int MV_BARCODE_UNDEFINED = 8; -} - -/// @brief Enumeration for supported QR code error correction level. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// @remarks This is unavailable for 1D barcodes -abstract class mv_barcode_qr_ecc_e { - /// < Recovery up to 7% losses - static const int MV_BARCODE_QR_ECC_LOW = 0; - - /// < Recovery up to 15% losses - static const int MV_BARCODE_QR_ECC_MEDIUM = 1; - - /// < Recovery up to 25% losses - static const int MV_BARCODE_QR_ECC_QUARTILE = 2; - - /// < Recovery up to 30% losses - static const int MV_BARCODE_QR_ECC_HIGH = 3; - - /// < Unavailable - static const int MV_BARCODE_QR_ECC_UNAVAILABLE = 4; -} - -/// @brief Enumeration for supported QR code encoding mode. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// @remarks This is unavailable for 1D barcodes -abstract class mv_barcode_qr_mode_e { - /// < Numeric digits - static const int MV_BARCODE_QR_MODE_NUMERIC = 0; - - /// < Alphanumeric characters - static const int MV_BARCODE_QR_MODE_ALPHANUMERIC = 1; - - /// < Raw 8-bit bytes - static const int MV_BARCODE_QR_MODE_BYTE = 2; - - /// < UTF-8 character encoding - static const int MV_BARCODE_QR_MODE_UTF8 = 3; - - /// < Unavailable - static const int MV_BARCODE_QR_MODE_UNAVAILABLE = 4; -} - -/// @brief Enumeration for supported image formats for the barcode generating. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -abstract class mv_barcode_image_format_e { - static const int MV_BARCODE_IMAGE_FORMAT_UNAVAILABLE = -1; - - /// < BMP image format - static const int MV_BARCODE_IMAGE_FORMAT_BMP = 0; - - /// < JPEG image format - static const int MV_BARCODE_IMAGE_FORMAT_JPG = 1; - - /// < PNG image format - static const int MV_BARCODE_IMAGE_FORMAT_PNG = 2; - - /// < The number of supported image format - static const int MV_BARCODE_IMAGE_FORMAT_NUM = 3; -} - -/// @brief Enumeration to target attribute -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -abstract class mv_barcode_detect_attr_target_e { - /// < 1D and 2D - static const int MV_BARCODE_DETECT_ATTR_TARGET_ALL = 0; - - /// < 1D barcode only - static const int MV_BARCODE_DETECT_ATTR_TARGET_1D_BARCODE = 1; - - /// < 2D barcode only - static const int MV_BARCODE_DETECT_ATTR_TARGET_2D_BARCODE = 2; -} - -/// @brief Called when barcode detection is completed. -/// @details If no barcode is detected then the method will be called, barcodes -/// and states will be equal to NULL, and @a number_of_barcodes - 0. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// @param [in] source The handle to the media source -/// @param [in] engine_cfg The handle to the configuration of the engine -/// @param [in] barcode_locations The quadrangle locations of detected barcodes -/// @param [in] messages The decoded messages of barcodes -/// @param [in] types The types of detected barcodes -/// @param [in] number_of_barcodes The number of detected barcodes -/// @param [in] user_data The user data passed from -/// the mv_barcode_detect() function -/// -/// @pre mv_barcode_detect() invokes this callback -/// -/// @see mv_barcode_detect() -typedef mv_barcode_detected_cb - = ffi.Pointer>; -typedef mv_barcode_detected_cbFunction = ffi.Void Function( - mv_source_h source, - mv_engine_config_h engine_cfg, - ffi.Pointer barcode_locations, - ffi.Pointer> messages, - ffi.Pointer types, - ffi.Int number_of_barcodes, - ffi.Pointer user_data); -typedef Dartmv_barcode_detected_cbFunction = void Function( - mv_source_h source, - mv_engine_config_h engine_cfg, - ffi.Pointer barcode_locations, - ffi.Pointer> messages, - ffi.Pointer types, - int number_of_barcodes, - ffi.Pointer user_data); - -/// @brief Enumeration to text attribute -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -abstract class mv_barcode_generate_attr_text_e { - /// < Invisible - static const int MV_BARCODE_GENERATE_ATTR_TEXT_INVISIBLE = 0; - - /// < Visible - static const int MV_BARCODE_GENERATE_ATTR_TEXT_VISIBLE = 1; -} - -/// @brief Enumeration for eyes state type. -/// -/// @since_tizen 3.0 -/// -/// @see mv_face_eye_condition_recognize() -abstract class mv_face_eye_condition_e { - /// < Eyes are open - static const int MV_FACE_EYES_OPEN = 0; - - /// < Eyes are closed - static const int MV_FACE_EYES_CLOSED = 1; - - /// < The eyes condition wasn't determined - static const int MV_FACE_EYES_NOT_FOUND = 2; -} - -/// @brief Enumeration for expression types can be determined for faces. -/// -/// @since_tizen 3.0 -/// -/// @see mv_face_facial_expression_recognize() -abstract class mv_face_facial_expression_e { - /// < Unknown face expression - static const int MV_FACE_UNKNOWN = 0; - - /// < Face expression is neutral - static const int MV_FACE_NEUTRAL = 1; - - /// < Face expression is smiling - static const int MV_FACE_SMILE = 2; - - /// < Face expression is sadness - static const int MV_FACE_SADNESS = 3; - - /// < Face expression is surprise - static const int MV_FACE_SURPRISE = 4; - - /// < Face expression is anger - static const int MV_FACE_ANGER = 5; - - /// < Face expression is fear - static const int MV_FACE_FEAR = 6; - - /// < Face expression is disgust - static const int MV_FACE_DISGUST = 7; -} - -/// @brief Called when faces are detected for the @a source. -/// @details This type callback can be invoked each time when -/// @ref mv_face_detect() is called to process the results of face -/// detecting. -/// -/// @since_tizen 3.0 -/// @remarks If no face is detected then the callback will be invoked, but -/// @a faces_locations array will be NULL, and @a number_of_faces will -/// be equal to 0. -/// @param [in] source The handle to the source of the media where -/// faces were detected -/// @param [in] engine_cfg The handle to the configuration of engine was -/// used for face detecting, or NULL if default -/// settings were applied -/// @param [in] faces_locations Rectangular locations of detected faces -/// @param [in] number_of_faces Number of detected faces -/// @param [in] user_data The user data passed from callback invoking code -/// -/// @pre Call @ref mv_face_detect() function to perform detection of the face for -/// the face image and invoke this callback as a result -/// -/// @see mv_face_detect() -typedef mv_face_detected_cb - = ffi.Pointer>; -typedef mv_face_detected_cbFunction = ffi.Void Function( - mv_source_h source, - mv_engine_config_h engine_cfg, - ffi.Pointer faces_locations, - ffi.Int number_of_faces, - ffi.Pointer user_data); -typedef Dartmv_face_detected_cbFunction = void Function( - mv_source_h source, - mv_engine_config_h engine_cfg, - ffi.Pointer faces_locations, - int number_of_faces, - ffi.Pointer user_data); - -/// @brief The handle to the model aggregating recognition face features. -/// @details This handle can be used for faces recognizing with -/// @ref mv_face_recognize() function. Handle has to be created by -/// @ref mv_face_recognition_model_create() and destroyed by -/// @ref mv_face_recognition_model_destroy() functions. To use -/// recognition models effectively learning process has to be performed -/// before recognition. In other words, appropriate set of the face -/// image examples has to be collected with -/// @ref mv_face_recognition_model_add() function before -/// @ref mv_face_recognition_model_learn() function call, then -/// recognition can be performed with @ref mv_face_recognize(). -/// -/// @since_tizen 3.0 -/// -/// @see mv_face_recognition_model_create() -/// @see mv_face_recognition_model_destroy() -/// @see mv_face_recognition_model_learn() -typedef mv_face_recognition_model_h = ffi.Pointer; - -/// @brief Called each time when face is recognized by @ref mv_face_recognize() -/// function. -/// -/// @since_tizen 3.0 -/// @param [in] source The handle to the image source for which -/// face has been recognized/not recognized -/// @param [in] recognition_model The handle to the recognition model has been -/// used for recognition -/// @param [in] engine_cfg The handle to the configuration of engine was -/// used for recognition, or NULL if default -/// settings were applied -/// @param [in] face_location The pointer to the location of the face -/// recognized on @a source. If face wasn't -/// recognized, then pointer is NULL -/// @param [in] face_label The label that identifies face which was -/// recognized in the @a source. NULL if -/// recognition was performed, but no faces -/// were recognized in the @a source -/// @param [in] confidence The confidence of the @a recognition_model -/// that face has been recognized correctly -/// (value from 0.0 to 1.0). No faces were -/// recognized if @a confidence was 0.0. -/// When model has been learned on large amount -/// of examples, threshold for this value -/// can be high (0.85-0.95). If model -/// was learned for small amount of examples, -/// then threshold can be reduced (0.5-0.85) -/// @param [in] user_data The user data passed from callback invoking -/// code -/// -/// @pre Call @ref mv_face_recognize() function to perform recognition of the -/// face for the face image and invoke this callback as a result -/// -/// @see mv_face_recognize() -typedef mv_face_recognized_cb - = ffi.Pointer>; -typedef mv_face_recognized_cbFunction = ffi.Void Function( - mv_source_h source, - mv_face_recognition_model_h recognition_model, - mv_engine_config_h engine_cfg, - ffi.Pointer face_location, - ffi.Pointer face_label, - ffi.Double confidence, - ffi.Pointer user_data); -typedef Dartmv_face_recognized_cbFunction = void Function( - mv_source_h source, - mv_face_recognition_model_h recognition_model, - mv_engine_config_h engine_cfg, - ffi.Pointer face_location, - ffi.Pointer face_label, - double confidence, - ffi.Pointer user_data); - -/// @brief The handle to the model aggregating tracking face features. -/// @details This model can be used for face tracking with @ref mv_face_track() -/// function. Handle has to be created by -/// @ref mv_face_tracking_model_create() and destroyed by -/// @ref mv_face_tracking_model_destroy() function. Tracking model can -/// be improved during tracking task and allows to track face more -/// accurately. So, you can create several tracking models independently -/// by default, then apply tracking task for each of them. After some -/// tracking these models will be different and each of them will be -/// more efficient for tracking of face for which was created. -/// -/// @since_tizen 3.0 -/// @remarks Create each tracking model for single face. -/// -/// @see mv_face_tracking_model_create() -/// @see mv_face_tracking_model_destroy() -typedef mv_face_tracking_model_h = ffi.Pointer; - -/// @brief Called when face determined by @a tracking_model is tracked. -/// @details This type callback can be invoked each time when -/// @ref mv_face_track() is called to process the results of face -/// tracking. -/// -/// @since_tizen 3.0 -/// @param [in] source The handle to the video frame or image from -/// sequence for which face was tracked -/// @param [in] tracking_model The handle to the model that was used for -/// tracking -/// @param [in] engine_cfg The handle to the configuration of engine was -/// used for tracking, or NULL if default settings -/// were applied. -/// @param [in] location The pointer to the quadrangle-shaped location -/// which determines new position of the tracked -/// face on the @a source. If NULL, then face was -/// lost by tracking algorithm during last iteration -/// @param [in] confidence The confidence of the @a tracking_model -/// that new location of the face was determined -/// correctly (value from 0.0 to 1.0). -/// If no location was determined during last track -/// iteration, then value is 0.0 -/// @param [in] user_data The user data passed from callback invoking code -/// -/// @pre Call @ref mv_face_track() function to perform track iteration for -/// the video frame or the image from sequence and invoke this callback as -/// a result -/// -/// @see mv_face_track() -typedef mv_face_tracked_cb - = ffi.Pointer>; -typedef mv_face_tracked_cbFunction = ffi.Void Function( - mv_source_h source, - mv_face_tracking_model_h tracking_model, - mv_engine_config_h engine_cfg, - ffi.Pointer location, - ffi.Double confidence, - ffi.Pointer user_data); -typedef Dartmv_face_tracked_cbFunction = void Function( - mv_source_h source, - mv_face_tracking_model_h tracking_model, - mv_engine_config_h engine_cfg, - ffi.Pointer location, - double confidence, - ffi.Pointer user_data); - -/// @brief Called when eye blink condition is recognized. -/// @details This type callback can be invoked each time when -/// mv_face_eye_condition_recognize() is called for @a face_location to -/// recognize eye-blink condition for the face at the @a source.\n -/// Usage example for this callback can be found in -/// mv_face_eye_condition_recognize() documentation. -/// -/// @since_tizen 3.0 -/// @param [in] source The handle to the source of the media for which -/// eye-blink condition was recognized -/// @param [in] engine_cfg The handle to the configuration of engine was -/// used for eye-blink condition recognition, or -/// NULL if default settings were applied. -/// @param [in] face_location The location bounding the face at the @a source -/// @param [in] eye_condition The type of eye-blink condition recognized for -/// face bounded by @a face_location -/// @param [in] user_data The user data passed from callback invoking code -/// -/// -/// @pre Call @ref mv_face_eye_condition_recognize() function to perform -/// eye-blink condition recognition and invoke this callback as a result -/// -/// @see mv_face_eye_condition_recognize() -typedef mv_face_eye_condition_recognized_cb = ffi - .Pointer>; -typedef mv_face_eye_condition_recognized_cbFunction = ffi.Void Function( - mv_source_h source, - mv_engine_config_h engine_cfg, - mv_rectangle_s face_location, - ffi.Int32 eye_condition, - ffi.Pointer user_data); -typedef Dartmv_face_eye_condition_recognized_cbFunction = void Function( - mv_source_h source, - mv_engine_config_h engine_cfg, - mv_rectangle_s face_location, - int eye_condition, - ffi.Pointer user_data); - -/// @brief Called when facial expression is recognized -/// @details This type callback can be invoked each time when -/// mv_face_facial_expression_recognize() is called for @a face_location to -/// recognize facial expression for the face at the @a source.\n -/// Usage example for this callback can be found in -/// mv_face_facial_expression_recognize() documentation. -/// -/// @since_tizen 3.0 -/// @param [in] source The handle to the source of the media for -/// which facial expression was recognized -/// @param [in] engine_cfg The handle to the configuration of engine was -/// used for expression recognition -/// @param [in] face_location The location bounding the face at the @a source -/// @param [in] facial_expression The type of facial expression recognized -/// for face bounded by @a face_location -/// @param [in] user_data The user data passed from callback invoking code -/// -/// @pre Create a source handle by calling mv_create_source() -/// @pre Create a face engine configuration handle by calling mv_create_engine_config() -/// -/// @see mv_face_facial_expression_recognize() -typedef mv_face_facial_expression_recognized_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef mv_face_facial_expression_recognized_cbFunction = ffi.Void Function( - mv_source_h source, - mv_engine_config_h engine_cfg, - mv_rectangle_s face_location, - ffi.Int32 facial_expression, - ffi.Pointer user_data); -typedef Dartmv_face_facial_expression_recognized_cbFunction = void Function( - mv_source_h source, - mv_engine_config_h engine_cfg, - mv_rectangle_s face_location, - int facial_expression, - ffi.Pointer user_data); - -/// @brief The image object's type handle. -/// -/// @since_tizen 3.0 -typedef mv_image_object_h = ffi.Pointer; - -/// @brief Called when image recognition results are received from @ref mv_image_recognize() -/// @details This type of callback will be called after @ref mv_image_recognize() -/// in order to process recognition result. -/// -/// @since_tizen 3.0 -/// @remarks Values @a source, @a engine_cfg, @a image_objects, and @a number_of_objects -/// are the same as values of input parameters of @ref mv_image_recognize(). -/// @remarks @a locations are valid only inside callback. -/// @param [in] source The handle to the source image on which the -/// recognition was carried out -/// @param [in] engine_cfg The handle to the configuration of engine -/// that was used for image recognition, or NULL -/// if default settings were applied -/// @param [in] image_objects The set of handles to the image objects which -/// have been processed as targets of recognition -/// @param [in] locations The locations of image objects on the source -/// image. This array corresponding to an array -/// of image objects and each element contains a -/// location of corresponding object on the -/// @a source image or NULL if object is not -/// recognized -/// @param [in] number_of_objects The number of image objects and corresponding -/// locations -/// @param [in] user_data The user data passed from the -/// @ref mv_image_recognize() function -/// -/// @pre Call @ref mv_image_recognize() function to perform recognition of the -/// image objects on the source image and invoke this callback as a result -/// -/// @see mv_image_recognize() -/// @see mv_source_h -/// @see mv_image_object_h -/// @see mv_engine_config_h -/// @see mv_quadrangle_s -typedef mv_image_recognized_cb - = ffi.Pointer>; -typedef mv_image_recognized_cbFunction = ffi.Void Function( - mv_source_h source, - mv_engine_config_h engine_cfg, - ffi.Pointer image_objects, - ffi.Pointer> locations, - ffi.UnsignedInt number_of_objects, - ffi.Pointer user_data); -typedef Dartmv_image_recognized_cbFunction = void Function( - mv_source_h source, - mv_engine_config_h engine_cfg, - ffi.Pointer image_objects, - ffi.Pointer> locations, - int number_of_objects, - ffi.Pointer user_data); - -/// @brief The image tracking model's type handle. -/// -/// @since_tizen 3.0 -typedef mv_image_tracking_model_h = ffi.Pointer; - -/// @brief Called when image tracking result received from @ref mv_image_track() -/// @details Image tracking on a sequence of frames assumes calling -/// @ref mv_image_track() function for each frame in the correct order. -/// This type of callback will be called after each @ref mv_image_track() -/// call for processing result data. -/// -/// @since_tizen 3.0 -/// @remarks If image object is not tracked then the callback will be invoked, -/// but @a location will be NULL. -/// @remarks Handles @a image_tracking_model, @a source and @a engine_cfg the -/// same as input parameters of @ref mv_image_track(). -/// @remarks @a location pointer is valid only inside callback -/// @param [in] source The handle to the source image on which -/// the tracking was carried out -/// @param [in] image_tracking_model The handle to the image tracking model -/// which processed as target of tracking -/// @param [in] engine_cfg The handle to the configuration of engine -/// that was used to image tracking, or -/// NULL if default settings were applied -/// @param [in] location The image object location on the source -/// image or NULL if objects is not tracked -/// @param [in] user_data The user data passed from the -/// @ref mv_image_track() function -/// -/// @pre Call @ref mv_image_track() function to perform tracking of the image -/// object on the current image from the sequence and invoke this callback -/// as a result -/// -/// @see mv_image_track() -/// @see mv_source_h -/// @see image_tracking_model_h -/// @see mv_engine_config_h -/// @see mv_quadrangle_s -typedef mv_image_tracked_cb - = ffi.Pointer>; -typedef mv_image_tracked_cbFunction = ffi.Void Function( - mv_source_h source, - mv_image_tracking_model_h image_tracking_model, - mv_engine_config_h engine_cfg, - ffi.Pointer location, - ffi.Pointer user_data); -typedef Dartmv_image_tracked_cbFunction = void Function( - mv_source_h source, - mv_image_tracking_model_h image_tracking_model, - mv_engine_config_h engine_cfg, - ffi.Pointer location, - ffi.Pointer user_data); - -/// @brief The handle to event trigger. -/// -/// @since_tizen 3.0 -/// @remarks See supported event types and their descriptions in -/// @ref CAPI_MEDIA_VISION_SURVEILLANCE_EVENT_TYPES documentation -/// section. -/// Also the list of supported events can be obtained using -/// @ref mv_surveillance_foreach_supported_event_type() function -typedef mv_surveillance_event_trigger_h = ffi.Pointer; - -/// @brief Called when event trigger activation has been detected. -/// -/// @since_tizen 3.0 -/// @remarks Handle @a event_result is valid only inside callback -/// @param [in] trigger The event trigger handle -/// @param [in] source The handle to the media source -/// @param [in] video_stream_id The identifier of the video source where event -/// has been detected -/// @param [in] event_result The event result passed from the -/// @ref mv_surveillance_subscribe_event_trigger() -/// @param [in] user_data The user data passed from the -/// @ref mv_surveillance_subscribe_event_trigger() -/// function -/// -/// @pre Callback can be invoked only after -/// @ref mv_surveillance_subscribe_event_trigger() -/// was called for particular event trigger. -/// -/// @see mv_surveillance_subscribe_event_trigger() -/// @see mv_surveillance_unsubscribe_event_trigger() -typedef mv_surveillance_event_occurred_cb = ffi - .Pointer>; -typedef mv_surveillance_event_occurred_cbFunction = ffi.Void Function( - mv_surveillance_event_trigger_h trigger, - mv_source_h source, - ffi.Int video_stream_id, - mv_surveillance_result_h event_result, - ffi.Pointer user_data); -typedef Dartmv_surveillance_event_occurred_cbFunction = void Function( - mv_surveillance_event_trigger_h trigger, - mv_source_h source, - int video_stream_id, - mv_surveillance_result_h event_result, - ffi.Pointer user_data); - -/// @brief The handle to event trigger activation result. -/// @details Result is a handle to the output values which are specific for each event. -/// See the output values names in the event types descriptions located -/// in @ref CAPI_MEDIA_VISION_SURVEILLANCE_EVENT_TYPES documentation -/// section. -/// Result values can be gotten by @ref mv_surveillance_get_result_value() -/// function one by one in order specified in the event description ( -/// the same order of event value names is supported by -/// @ref mv_surveillance_foreach_event_result_name() function). -/// This pointer will be destroyed when -/// @ref mv_surveillance_event_occurred_cb passed. -/// -/// @since_tizen 3.0 -typedef mv_surveillance_result_h = ffi.Pointer; - -/// @brief Called to get the information once for each supported event type. -/// -/// @since_tizen 3.0 -/// @remarks Don't release memory of @a event_type -/// @param [in] event_type Character string containing name of the event type -/// @param [in] user_data The user data passed from the -/// @ref mv_surveillance_foreach_supported_event_type() -/// function -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// -/// @pre mv_surveillance_foreach_supported_event_type() will invoke this callback -/// @see mv_surveillance_foreach_supported_event_type() -typedef mv_surveillance_event_type_cb - = ffi.Pointer>; -typedef mv_surveillance_event_type_cbFunction = ffi.Bool Function( - ffi.Pointer event_type, ffi.Pointer user_data); -typedef Dartmv_surveillance_event_type_cbFunction = bool Function( - ffi.Pointer event_type, ffi.Pointer user_data); - -/// @brief Called to get the result name from the triggered event. -/// -/// @since_tizen 3.0 -/// @remarks Don't release memory of @a value_name -/// @param [in] name Character string containing the name of value that -/// can be obtained from @ref mv_surveillance_result_h -/// handle by @ref mv_surveillance_get_result_value() -/// function -/// @param [in] user_data The user data passed from the -/// @ref mv_surveillance_foreach_event_result_name() -/// function -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// -/// @pre mv_surveillance_foreach_event_result_name() will invoke this -/// callback -/// @see mv_surveillance_foreach_event_result_name() -typedef mv_surveillance_event_result_name_cb = ffi - .Pointer>; -typedef mv_surveillance_event_result_name_cbFunction = ffi.Bool Function( - ffi.Pointer name, ffi.Pointer user_data); -typedef Dartmv_surveillance_event_result_name_cbFunction = bool Function( - ffi.Pointer name, ffi.Pointer user_data); - -/// @ingroup CAPI_MEDIA_METADATA_EDITOR_MODULE -/// @brief The enumerations of media metadata error -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class metadata_editor_error_e { - /// < Successful - static const int METADATA_EDITOR_ERROR_NONE = 0; - - /// < Invalid parameter - static const int METADATA_EDITOR_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int METADATA_EDITOR_ERROR_OUT_OF_MEMORY = -12; - - /// < File not exist - static const int METADATA_EDITOR_ERROR_FILE_EXISTS = -17; - - /// < Permission denied - static const int METADATA_EDITOR_ERROR_PERMISSION_DENIED = -13; - - /// < Unsupported type - static const int METADATA_EDITOR_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Invalid internal operation - static const int METADATA_EDITOR_ERROR_OPERATION_FAILED = -27000831; -} - -/// @ingroup CAPI_MEDIA_METADATA_EDITOR_MODULE -/// @brief The enumerations of attribute -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class metadata_editor_attr_e { - /// < Artist - static const int METADATA_EDITOR_ATTR_ARTIST = 0; - - /// < Title - static const int METADATA_EDITOR_ATTR_TITLE = 1; - - /// < Album - static const int METADATA_EDITOR_ATTR_ALBUM = 2; - - /// < Genre - static const int METADATA_EDITOR_ATTR_GENRE = 3; - - /// < Author - static const int METADATA_EDITOR_ATTR_AUTHOR = 4; - - /// < Copyright - static const int METADATA_EDITOR_ATTR_COPYRIGHT = 5; - - /// < Date - static const int METADATA_EDITOR_ATTR_DATE = 6; - - /// < Description - static const int METADATA_EDITOR_ATTR_DESCRIPTION = 7; - - /// < Comment - static const int METADATA_EDITOR_ATTR_COMMENT = 8; - - /// < Track number info - static const int METADATA_EDITOR_ATTR_TRACK_NUM = 9; - - /// < Picture number - static const int METADATA_EDITOR_ATTR_PICTURE_NUM = 10; - - /// < Conductor - static const int METADATA_EDITOR_ATTR_CONDUCTOR = 11; - - /// < Unsynchronized lyric - static const int METADATA_EDITOR_ATTR_UNSYNCLYRICS = 12; -} - -/// @ingroup CAPI_MEDIA_METADATA_EDITOR_MODULE -/// @brief The handle of media metadata -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -typedef metadata_editor_h = ffi.Pointer; - -/// @ingroup CAPI_METADATA_EXTRACTOR_MODULE -/// @brief Enumeration for metadata extractor error. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class metadata_extractor_error_e { - /// < Successful - static const int METADATA_EXTRACTOR_ERROR_NONE = 0; - - /// < Invalid parameter - static const int METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int METADATA_EXTRACTOR_ERROR_OUT_OF_MEMORY = -12; - - /// < File does not exist - static const int METADATA_EXTRACTOR_ERROR_FILE_EXISTS = -17; - - /// < Permission denied - static const int METADATA_EXTRACTOR_ERROR_PERMISSION_DENIED = -13; - - /// < Invalid internal operation - static const int METADATA_EXTRACTOR_ERROR_OPERATION_FAILED = -26411007; -} - -/// @ingroup CAPI_METADATA_EXTRACTOR_MODULE -/// @brief Enumeration for attribute. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class metadata_extractor_attr_e { - /// < Duration - static const int METADATA_DURATION = 0; - - /// < Video Bitrate - static const int METADATA_VIDEO_BITRATE = 1; - - /// < Video FPS - static const int METADATA_VIDEO_FPS = 2; - - /// < Video Width - static const int METADATA_VIDEO_WIDTH = 3; - - /// < Video Height - static const int METADATA_VIDEO_HEIGHT = 4; - - /// < Video stream count - static const int METADATA_HAS_VIDEO = 5; - - /// < Audio Bitrate - static const int METADATA_AUDIO_BITRATE = 6; - - /// < Audio Channels - static const int METADATA_AUDIO_CHANNELS = 7; - - /// < Audio Samplerate - static const int METADATA_AUDIO_SAMPLERATE = 8; - - /// < Audio bit per sample - static const int METADATA_AUDIO_BITPERSAMPLE = 9; - - /// < Audio stream count - static const int METADATA_HAS_AUDIO = 10; - - /// < Artist - static const int METADATA_ARTIST = 11; - - /// < Title - static const int METADATA_TITLE = 12; - - /// < Album - static const int METADATA_ALBUM = 13; - - /// < Album_Artist - static const int METADATA_ALBUM_ARTIST = 14; - - /// < Genre - static const int METADATA_GENRE = 15; - - /// < Author (Deprecated since 4.0. Use METADATA_COMPOSER instead) - static const int METADATA_AUTHOR = 16; - - /// < Composer - static const int METADATA_COMPOSER = 16; - - /// < Copyright - static const int METADATA_COPYRIGHT = 17; - - /// < Date - static const int METADATA_DATE = 18; - - /// < Description - static const int METADATA_DESCRIPTION = 19; - - /// < Comment - static const int METADATA_COMMENT = 20; - - /// < Track number info - static const int METADATA_TRACK_NUM = 21; - - /// < Classification - static const int METADATA_CLASSIFICATION = 22; - - /// < Rating - static const int METADATA_RATING = 23; - - /// < Longitude - static const int METADATA_LONGITUDE = 24; - - /// < Latitude - static const int METADATA_LATITUDE = 25; - - /// < Altitude - static const int METADATA_ALTITUDE = 26; - - /// < Conductor - static const int METADATA_CONDUCTOR = 27; - - /// < Unsynchronized lyric - static const int METADATA_UNSYNCLYRICS = 28; - - /// < Synchronized lyric (time/lyric set) number - static const int METADATA_SYNCLYRICS_NUM = 29; - - /// < Recording date - static const int METADATA_RECDATE = 30; - - /// < Rotate(Orientation) Information - static const int METADATA_ROTATE = 31; - - /// < Video Codec (Since 3.0) - static const int METADATA_VIDEO_CODEC = 32; - - /// < Audio Codec (Since 3.0) - static const int METADATA_AUDIO_CODEC = 33; - - /// < Flag indicating if the video is a spherical video (Since 3.0) - static const int METADATA_360 = 34; -} - -final class metadata_extractor_s extends ffi.Opaque {} - -/// @ingroup CAPI_METADATA_EXTRACTOR_MODULE -/// @brief The metadata extractor handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef metadata_extractor_h = ffi.Pointer; - -final class player_s extends ffi.Opaque {} - -/// @brief Enumeration for media player state. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class player_state_e { - /// < Player is not created - static const int PLAYER_STATE_NONE = 0; - - /// < Player is created, but not prepared - static const int PLAYER_STATE_IDLE = 1; - - /// < Player is ready to play media - static const int PLAYER_STATE_READY = 2; - - /// < Player is playing media - static const int PLAYER_STATE_PLAYING = 3; - - /// < Player is paused while playing media - static const int PLAYER_STATE_PAUSED = 4; -} - -/// @brief Enumeration for media player's error codes. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class player_error_e { - /// < Successful - static const int PLAYER_ERROR_NONE = 0; - - /// < Out of memory - static const int PLAYER_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int PLAYER_ERROR_INVALID_PARAMETER = -22; - - /// < No such file or directory - static const int PLAYER_ERROR_NO_SUCH_FILE = -2; - - /// < Invalid operation - static const int PLAYER_ERROR_INVALID_OPERATION = -38; - - /// < No space left on the device - static const int PLAYER_ERROR_FILE_NO_SPACE_ON_DEVICE = -28; - - /// < Not supported Feature - static const int PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE = -1073741822; - - /// < Seek operation failure - static const int PLAYER_ERROR_SEEK_FAILED = -26476511; - - /// < Invalid state - static const int PLAYER_ERROR_INVALID_STATE = -26476510; - - /// < File format not supported - static const int PLAYER_ERROR_NOT_SUPPORTED_FILE = -26476509; - - /// < Invalid URI - static const int PLAYER_ERROR_INVALID_URI = -26476508; - - /// < Sound policy error - static const int PLAYER_ERROR_SOUND_POLICY = -26476507; - - /// < Streaming connection failed - static const int PLAYER_ERROR_CONNECTION_FAILED = -26476506; - - /// < Video capture failed - static const int PLAYER_ERROR_VIDEO_CAPTURE_FAILED = -26476505; - - /// < Expired license - static const int PLAYER_ERROR_DRM_EXPIRED = -26476504; - - /// < No license - static const int PLAYER_ERROR_DRM_NO_LICENSE = -26476503; - - /// < License for future use - static const int PLAYER_ERROR_DRM_FUTURE_USE = -26476502; - - /// < Format not permitted - static const int PLAYER_ERROR_DRM_NOT_PERMITTED = -26476501; - - /// < Resource limit - static const int PLAYER_ERROR_RESOURCE_LIMIT = -26476500; - - /// < Permission denied - static const int PLAYER_ERROR_PERMISSION_DENIED = -13; - - /// < Socket connection lost (Since 3.0) - static const int PLAYER_ERROR_SERVICE_DISCONNECTED = -26476499; - - /// < No buffer space available (Since 3.0) - static const int PLAYER_ERROR_BUFFER_SPACE = -105; - - /// < Not supported audio codec but video can be played (Since 4.0) - static const int PLAYER_ERROR_NOT_SUPPORTED_AUDIO_CODEC = -26476498; - - /// < Not supported video codec but audio can be played (Since 4.0) - static const int PLAYER_ERROR_NOT_SUPPORTED_VIDEO_CODEC = -26476497; - - /// < Not supported subtitle format (Since 4.0) - static const int PLAYER_ERROR_NOT_SUPPORTED_SUBTITLE = -26476496; -} - -/// @brief Enumeration for media player's interruption type. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class player_interrupted_code_e { - /// < Interrupt completed (Deprecated since 3.0) - static const int PLAYER_INTERRUPTED_COMPLETED = 0; - - /// < Interrupted by a non-resumable media application (Deprecated since 3.0) - static const int PLAYER_INTERRUPTED_BY_MEDIA = 1; - - /// < Interrupted by an incoming call (Deprecated since 3.0) - static const int PLAYER_INTERRUPTED_BY_CALL = 2; - - /// < Interrupted by unplugging headphones (Deprecated since 3.0) - static const int PLAYER_INTERRUPTED_BY_EARJACK_UNPLUG = 3; - - /// < Interrupted by a resource conflict and the player handle will be paused or unprepared - static const int PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT = 4; - - /// < Interrupted by an alarm (Deprecated since 3.0) - static const int PLAYER_INTERRUPTED_BY_ALARM = 5; - - /// < Interrupted by an emergency (Deprecated since 3.0) - static const int PLAYER_INTERRUPTED_BY_EMERGENCY = 6; - - /// < Interrupted by a notification (Deprecated since 3.0) - static const int PLAYER_INTERRUPTED_BY_NOTIFICATION = 7; -} - -/// @brief Enumeration for progressive download message type. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class player_pd_message_type_e { - /// < Progressive download is started - static const int PLAYER_PD_STARTED = 0; - - /// < Progressive download is completed - static const int PLAYER_PD_COMPLETED = 1; -} - -/// @brief Enumeration for display type. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class player_display_type_e { - /// < Overlay surface display - static const int PLAYER_DISPLAY_TYPE_OVERLAY = 0; - static const int PLAYER_DISPLAY_TYPE_OBSOLETE_EVAS_WNONE = 1; - static const int PLAYER_DISPLAY_TYPE_OBSOLETE_NONE_WEVAS = 2; - - /// < Evas image object surface display (Since 4.0) - static const int PLAYER_DISPLAY_TYPE_EVAS = 3; - - /// < This disposes of buffers (Since 4.0) - static const int PLAYER_DISPLAY_TYPE_NONE = 4; -} - -/// @brief Enumeration for audio latency mode. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class audio_latency_mode_e { - /// < Low audio latency mode - static const int AUDIO_LATENCY_MODE_LOW = 0; - - /// < Middle audio latency mode - static const int AUDIO_LATENCY_MODE_MID = 1; - - /// < High audio latency mode - static const int AUDIO_LATENCY_MODE_HIGH = 2; -} - -/// @brief Enumeration for stream type. -/// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif -abstract class player_stream_type_e { - /// < Container type - static const int PLAYER_STREAM_TYPE_DEFAULT = 0; - - /// < Audio element stream type - static const int PLAYER_STREAM_TYPE_AUDIO = 1; - - /// < Video element stream type - static const int PLAYER_STREAM_TYPE_VIDEO = 2; - - /// < Text type - static const int PLAYER_STREAM_TYPE_TEXT = 3; -} - -/// @brief Enumeration of media stream buffer status -/// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif -abstract class player_media_stream_buffer_status_e { - static const int PLAYER_MEDIA_STREAM_BUFFER_UNDERRUN = 0; - static const int PLAYER_MEDIA_STREAM_BUFFER_OVERFLOW = 1; -} - -/// @brief Enumeration for display rotation type. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class player_display_rotation_e { - /// < Display is not rotated - static const int PLAYER_DISPLAY_ROTATION_NONE = 0; - - /// < Display is rotated 90 degrees - static const int PLAYER_DISPLAY_ROTATION_90 = 1; - - /// < Display is rotated 180 degrees - static const int PLAYER_DISPLAY_ROTATION_180 = 2; - - /// < Display is rotated 270 degrees - static const int PLAYER_DISPLAY_ROTATION_270 = 3; -} - -/// @brief Enumeration for display mode. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class player_display_mode_e { - /// < Letter box - static const int PLAYER_DISPLAY_MODE_LETTER_BOX = 0; - - /// < Origin size - static const int PLAYER_DISPLAY_MODE_ORIGIN_SIZE = 1; - - /// < Full-screen - static const int PLAYER_DISPLAY_MODE_FULL_SCREEN = 2; - - /// < Cropped full-screen - static const int PLAYER_DISPLAY_MODE_CROPPED_FULL = 3; - - /// < Origin size (if surface size is larger than video size(width/height)) or Letter box (if video size(width/height) is larger than surface size) - static const int PLAYER_DISPLAY_MODE_ORIGIN_OR_LETTER = 4; - - /// < Dst ROI mode - static const int PLAYER_DISPLAY_MODE_DST_ROI = 5; - static const int PLAYER_DISPLAY_MODE_NUM = 6; -} - -/// @brief Enumeration for media stream content information. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class player_content_info_e { - /// < Album - static const int PLAYER_CONTENT_INFO_ALBUM = 0; - - /// < Artist - static const int PLAYER_CONTENT_INFO_ARTIST = 1; - - /// < Author - static const int PLAYER_CONTENT_INFO_AUTHOR = 2; - - /// < Genre - static const int PLAYER_CONTENT_INFO_GENRE = 3; - - /// < Title - static const int PLAYER_CONTENT_INFO_TITLE = 4; - - /// < Year - static const int PLAYER_CONTENT_INFO_YEAR = 5; -} - -/// @brief The media player's type handle. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -typedef player_h = ffi.Pointer; - -/// @brief Called when the media player is prepared. -/// @details It will be invoked when player has reached the begin of stream. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @param[in] user_data The user data passed from the callback registration function -/// @pre player_prepare_async() will cause this callback. -/// @post The player state will be #PLAYER_STATE_READY. -/// @see player_prepare_async() -typedef player_prepared_cb - = ffi.Pointer>; -typedef player_prepared_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartplayer_prepared_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Called when the seek operation is completed. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @param[in] user_data The user data passed from the callback registration function -/// @see player_set_play_position() -typedef player_seek_completed_cb - = ffi.Pointer>; -typedef player_seek_completed_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartplayer_seek_completed_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief The player display handle. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -typedef player_display_h = ffi.Pointer; - -/// @brief Called to register for notifications about delivering media packet when every video frame is decoded. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @remarks This function is called in the context of gstreamer so the UI update code must not be directly invoked.\n -/// The packet must be released after use by calling media_packet_destroy(). \n -/// If not, the decoder will fail due to having insufficient buffer space for the decoded frame. -/// -/// @param[in] pkt Reference pointer to the media packet -/// @param[in] user_data The user data passed from the callback registration function -typedef player_media_packet_video_decoded_cb = ffi - .Pointer>; -typedef player_media_packet_video_decoded_cbFunction = ffi.Void Function( - media_packet_h pkt, ffi.Pointer user_data); -typedef Dartplayer_media_packet_video_decoded_cbFunction = void Function( - media_packet_h pkt, ffi.Pointer user_data); - -/// @brief Called when the buffer level drops below the threshold of max size or no free space in buffer. -/// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif -/// @remarks This API is used for media stream playback only. -/// @param[in] status The buffer status -/// @param[in] user_data The user data passed from the callback registration function -/// @see player_set_media_stream_buffer_status_cb() -/// @see player_set_media_stream_buffer_max_size() -/// @see player_set_media_stream_buffer_min_threshold() -typedef player_media_stream_buffer_status_cb = ffi - .Pointer>; -typedef player_media_stream_buffer_status_cbFunction = ffi.Void Function( - ffi.Int32 status, ffi.Pointer user_data); -typedef Dartplayer_media_stream_buffer_status_cbFunction = void Function( - int status, ffi.Pointer user_data); - -/// @brief Called to notify the next push-buffer offset when seeking is occurred. -/// @details The next push-buffer should produce buffers from the new offset. -/// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif -/// @remarks This API is used for media stream playback only. -/// @param[in] offset The new byte position to seek -/// @param[in] user_data The user data passed from the callback registration function -typedef player_media_stream_seek_cb - = ffi.Pointer>; -typedef player_media_stream_seek_cbFunction = ffi.Void Function( - ffi.UnsignedLongLong offset, ffi.Pointer user_data); -typedef Dartplayer_media_stream_seek_cbFunction = void Function( - int offset, ffi.Pointer user_data); - -/// @brief Called when the video is captured. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @remarks The color space format of the captured image is IMAGE_UTIL_COLORSPACE_RGB888. -/// @param[in] data The captured image buffer -/// @param[in] width The width of the captured image -/// @param[in] height The height of the captured image -/// @param[in] size The size of the captured image -/// @param[in] user_data The user data passed from the callback registration function -/// @see player_capture_video() -typedef player_video_captured_cb - = ffi.Pointer>; -typedef player_video_captured_cbFunction = ffi.Void Function( - ffi.Pointer data, - ffi.Int width, - ffi.Int height, - ffi.UnsignedInt size, - ffi.Pointer user_data); -typedef Dartplayer_video_captured_cbFunction = void Function( - ffi.Pointer data, - int width, - int height, - int size, - ffi.Pointer user_data); - -/// @brief Called when the media player is completed. -/// @details It will be invoked when player has reached the end of the stream. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @param[in] user_data The user data passed from the callback registration function -/// @pre It will be invoked when the playback is completed if you register this callback using player_set_completed_cb(). -/// @see player_set_completed_cb() -/// @see player_unset_completed_cb() -typedef player_completed_cb - = ffi.Pointer>; -typedef player_completed_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartplayer_completed_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Called when the media player is interrupted. -/// @details If the code is #PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT, -/// the player state will be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, or #PLAYER_STATE_PAUSED. -/// Application should get exact state by calling player_get_state(). -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @param[in] code The interrupted error code -/// @param[in] user_data The user data passed from the callback registration function -/// @see player_set_interrupted_cb() -/// @see player_unset_interrupted_cb() -/// @see player_get_state() -typedef player_interrupted_cb - = ffi.Pointer>; -typedef player_interrupted_cbFunction = ffi.Void Function( - ffi.Int32 code, ffi.Pointer user_data); -typedef Dartplayer_interrupted_cbFunction = void Function( - int code, ffi.Pointer user_data); - -/// @brief Called when an error occurs in the media player. -/// @details Following error codes can be delivered. -/// #PLAYER_ERROR_INVALID_OPERATION -/// #PLAYER_ERROR_INVALID_STATE -/// #PLAYER_ERROR_INVALID_URI -/// #PLAYER_ERROR_CONNECTION_FAILED -/// #PLAYER_ERROR_DRM_NOT_PERMITTED -/// #PLAYER_ERROR_FILE_NO_SPACE_ON_DEVICE -/// #PLAYER_ERROR_NOT_SUPPORTED_FILE -/// #PLAYER_ERROR_SEEK_FAILED -/// #PLAYER_ERROR_SERVICE_DISCONNECTED -/// #PLAYER_ERROR_NOT_SUPPORTED_AUDIO_CODEC (Since 4.0) -/// #PLAYER_ERROR_NOT_SUPPORTED_VIDEO_CODEC (Since 4.0) -/// #PLAYER_ERROR_NOT_SUPPORTED_SUBTITLE (Since 4.0) -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @param[in] error_code The error code -/// @param[in] user_data The user data passed from the callback registration function -/// @see player_set_error_cb() -/// @see player_unset_error_cb() -typedef player_error_cb - = ffi.Pointer>; -typedef player_error_cbFunction = ffi.Void Function( - ffi.Int error_code, ffi.Pointer user_data); -typedef Dartplayer_error_cbFunction = void Function( - int error_code, ffi.Pointer user_data); - -/// @brief Called when the buffering percentage of the media playback is updated. -/// @details If the buffer is full, it will return 100%. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @param[in] percent The percentage of buffering completed (0~100) -/// @param[in] user_data The user data passed from the callback registration function -/// @see player_set_buffering_cb() -/// @see player_unset_buffering_cb() -typedef player_buffering_cb - = ffi.Pointer>; -typedef player_buffering_cbFunction = ffi.Void Function( - ffi.Int percent, ffi.Pointer user_data); -typedef Dartplayer_buffering_cbFunction = void Function( - int percent, ffi.Pointer user_data); - -/// @brief Called when progressive download is started or completed. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @param[in] type The message type for progressive download -/// @param[in] user_data The user data passed from the callback registration function -/// @see player_set_progressive_download_path() -typedef player_pd_message_cb - = ffi.Pointer>; -typedef player_pd_message_cbFunction = ffi.Void Function( - ffi.Int32 type, ffi.Pointer user_data); -typedef Dartplayer_pd_message_cbFunction = void Function( - int type, ffi.Pointer user_data); - -/// @brief Called when the subtitle is updated. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @param[in] duration The duration of the updated subtitle -/// @param[in] text The text of the updated subtitle -/// @param[in] user_data The user data passed from the callback registration function -/// @see player_set_subtitle_updated_cb() -/// @see player_unset_subtitle_updated_cb() -typedef player_subtitle_updated_cb - = ffi.Pointer>; -typedef player_subtitle_updated_cbFunction = ffi.Void Function( - ffi.UnsignedLong duration, - ffi.Pointer text, - ffi.Pointer user_data); -typedef Dartplayer_subtitle_updated_cbFunction = void Function( - int duration, ffi.Pointer text, ffi.Pointer user_data); - -/// @brief Called to notify the video stream changed. -/// @details The video stream changing is detected just before rendering operation. -/// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif -/// @param[in] width The width of the captured image -/// @param[in] height The height of the captured image -/// @param[in] fps The frame per second of the video \n -/// It can be @c 0 if there is no video stream information. -/// @param[in] bit_rate The video bit rate [Hz] \n -/// It can be an invalid value if there is no video stream information. -/// @param[in] user_data The user data passed from the callback registration function -/// @see player_set_video_stream_changed_cb() -typedef player_video_stream_changed_cb - = ffi.Pointer>; -typedef player_video_stream_changed_cbFunction = ffi.Void Function( - ffi.Int width, - ffi.Int height, - ffi.Int fps, - ffi.Int bit_rate, - ffi.Pointer user_data); -typedef Dartplayer_video_stream_changed_cbFunction = void Function(int width, - int height, int fps, int bit_rate, ffi.Pointer user_data); - -/// @brief Called to notify the streaming variant information. -/// @details The adaptive streaming protocol(hls, mpeg dash) can support variant stream condition. -/// All the streaming variant information can be shared by calling player_foreach_adaptive_variant(). -/// @since_tizen 4.0 -/// @param[in] bandwidth The bandwidth of the stream can be supportable, this is mandatory parameter -/// @param[in] width The width of the stream, this is optional parameter -/// @param[in] height The height of the stream, this is optional parameter -/// @param[in] user_data The user data passed from the callback registration function -/// @see player_foreach_adaptive_variant() -typedef player_adaptive_variant_cb - = ffi.Pointer>; -typedef player_adaptive_variant_cbFunction = ffi.Void Function( - ffi.Int bandwidth, - ffi.Int width, - ffi.Int height, - ffi.Pointer user_data); -typedef Dartplayer_adaptive_variant_cbFunction = void Function( - int bandwidth, int width, int height, ffi.Pointer user_data); - -final class recorder_s extends ffi.Opaque {} - -/// @brief Enumeration for error code of the media recorder. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class recorder_error_e { - /// < Successful - static const int RECORDER_ERROR_NONE = 0; - - /// < Invalid parameter - static const int RECORDER_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid state - static const int RECORDER_ERROR_INVALID_STATE = -26542062; - - /// < Out of memory - static const int RECORDER_ERROR_OUT_OF_MEMORY = -12; - - /// < Device error - static const int RECORDER_ERROR_DEVICE = -26542060; - - /// < Internal error - static const int RECORDER_ERROR_INVALID_OPERATION = -38; - - /// < Blocked by Audio Session Manager (Deprecated since 3.0) - static const int RECORDER_ERROR_SOUND_POLICY = -26542058; - - /// < Restricted by security system policy - static const int RECORDER_ERROR_SECURITY_RESTRICTED = -26542057; - - /// < Blocked by Audio Session Manager - CALL (Deprecated since 3.0) - static const int RECORDER_ERROR_SOUND_POLICY_BY_CALL = -26542056; - - /// < Blocked by Audio Session Manager - ALARM (Deprecated since 3.0) - static const int RECORDER_ERROR_SOUND_POLICY_BY_ALARM = -26542055; - - /// < ESD situation - static const int RECORDER_ERROR_ESD = -26542054; - - /// < Out of storage - static const int RECORDER_ERROR_OUT_OF_STORAGE = -26542053; - - /// < The access to the resources can not be granted - static const int RECORDER_ERROR_PERMISSION_DENIED = -13; - - /// < The feature is not supported - static const int RECORDER_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Blocked by resource conflict (Since 3.0) - static const int RECORDER_ERROR_RESOURCE_CONFLICT = -26542052; - - /// < Socket connection lost (Since 3.0) - static const int RECORDER_ERROR_SERVICE_DISCONNECTED = -26542051; -} - -/// @brief Enumeration for recorder states. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class recorder_state_e { - /// < Recorder is not created - static const int RECORDER_STATE_NONE = 0; - - /// < Recorder is created, but not prepared - static const int RECORDER_STATE_CREATED = 1; - - /// < Recorder is ready to record \n In case of video recorder, preview display will be shown - static const int RECORDER_STATE_READY = 2; - - /// < Recorder is recording media - static const int RECORDER_STATE_RECORDING = 3; - - /// < Recorder is paused while recording media - static const int RECORDER_STATE_PAUSED = 4; -} - -/// @brief Enumeration for the recording limit. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class recorder_recording_limit_type_e { - /// < Time limit (second) of recording file - static const int RECORDER_RECORDING_LIMIT_TIME = 0; - - /// < Size limit (kilo bytes [KB]) of recording file - static const int RECORDER_RECORDING_LIMIT_SIZE = 1; - - /// < No free space in storage - static const int RECORDER_RECORDING_LIMIT_FREE_SPACE = 2; -} - -/// @brief Enumeration for the file container format. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class recorder_file_format_e { - /// < 3GP file format - static const int RECORDER_FILE_FORMAT_3GP = 0; - - /// < MP4 file format - static const int RECORDER_FILE_FORMAT_MP4 = 1; - - /// < AMR file format - static const int RECORDER_FILE_FORMAT_AMR = 2; - - /// < ADTS file format - static const int RECORDER_FILE_FORMAT_ADTS = 3; - - /// < WAV file format - static const int RECORDER_FILE_FORMAT_WAV = 4; - - /// < OGG file format - static const int RECORDER_FILE_FORMAT_OGG = 5; - - /// < MPEG2-TransportStream file format (Since 3.0) - static const int RECORDER_FILE_FORMAT_M2TS = 6; -} - -/// @brief Enumeration for the audio codec. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class recorder_audio_codec_e { - /// < Disable audio track - static const int RECORDER_AUDIO_CODEC_DISABLE = -1; - - /// < AMR codec - static const int RECORDER_AUDIO_CODEC_AMR = 0; - - /// < AAC codec - static const int RECORDER_AUDIO_CODEC_AAC = 1; - - /// < Vorbis codec - static const int RECORDER_AUDIO_CODEC_VORBIS = 2; - - /// < PCM codec - static const int RECORDER_AUDIO_CODEC_PCM = 3; - - /// < MP3 codec (Since 3.0) - static const int RECORDER_AUDIO_CODEC_MP3 = 4; -} - -/// @brief Enumeration for the video codec. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class recorder_video_codec_e { - /// < H263 codec - static const int RECORDER_VIDEO_CODEC_H263 = 0; - - /// < H264 codec - static const int RECORDER_VIDEO_CODEC_H264 = 1; - - /// < MPEG4 codec - static const int RECORDER_VIDEO_CODEC_MPEG4 = 2; - - /// < Theora codec - static const int RECORDER_VIDEO_CODEC_THEORA = 3; -} - -/// @brief Enumeration for audio capture devices. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class recorder_audio_device_e { - /// < Mic device - static const int RECORDER_AUDIO_DEVICE_MIC = 0; - - /// < Modem - static const int RECORDER_AUDIO_DEVICE_MODEM = 1; -} - -/// @brief Enumeration for the recorder rotation type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class recorder_rotation_e { - /// < No rotation - static const int RECORDER_ROTATION_NONE = 0; - - /// < 90 degree rotation - static const int RECORDER_ROTATION_90 = 1; - - /// < 180 degree rotation - static const int RECORDER_ROTATION_180 = 2; - - /// < 270 degree rotation - static const int RECORDER_ROTATION_270 = 3; -} - -/// @brief Enumeration for the recorder policy. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class recorder_policy_e { - /// < None - static const int RECORDER_POLICY_NONE = 0; - - /// < Sound policy (Deprecated since 3.0) - static const int RECORDER_POLICY_SOUND = 1; - - /// < Sound policy by CALL (Deprecated since 3.0) - static const int RECORDER_POLICY_SOUND_BY_CALL = 2; - - /// < Sound policy by ALARM (Deprecated since 3.0) - static const int RECORDER_POLICY_SOUND_BY_ALARM = 3; - - /// < Security policy - static const int RECORDER_POLICY_SECURITY = 4; - - /// < Resource conflict (Since 3.0) - static const int RECORDER_POLICY_RESOURCE_CONFLICT = 5; -} - -/// @brief Enumeration for the recorder type. -/// @since_tizen 3.0 -abstract class recorder_type_e { - /// < Audio only recorder - static const int RECORDER_TYPE_AUDIO = 0; - - /// < Video recorder (audio is optional) - static const int RECORDER_TYPE_VIDEO = 1; -} - -/// @brief Enumeration for the recorder device state. -/// @since_tizen 3.0 -abstract class recorder_device_state_e { - /// < No recording in progress - static const int RECORDER_DEVICE_STATE_IDLE = 0; - - /// < Now recording - static const int RECORDER_DEVICE_STATE_RECORDING = 1; - - /// < All recordings are paused - static const int RECORDER_DEVICE_STATE_PAUSED = 2; -} - -/// @brief The Media recorder handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef recorder_h = ffi.Pointer; - -/// @brief Called iteratively to notify about the supported file formats. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] format The format of recording files -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre recorder_foreach_supported_file_format() will invoke this callback. -/// @see recorder_foreach_supported_file_format() -typedef recorder_supported_file_format_cb = ffi - .Pointer>; -typedef recorder_supported_file_format_cbFunction = ffi.Bool Function( - ffi.Int32 format, ffi.Pointer user_data); -typedef Dartrecorder_supported_file_format_cbFunction = bool Function( - int format, ffi.Pointer user_data); - -/// @brief Called iteratively to notify about the supported audio encoders. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] codec The codec of audio encoder -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre recorder_foreach_supported_audio_encoder() will invoke this callback. -/// @see recorder_foreach_supported_audio_encoder() -typedef recorder_supported_audio_encoder_cb = ffi - .Pointer>; -typedef recorder_supported_audio_encoder_cbFunction = ffi.Bool Function( - ffi.Int32 codec, ffi.Pointer user_data); -typedef Dartrecorder_supported_audio_encoder_cbFunction = bool Function( - int codec, ffi.Pointer user_data); - -/// @brief Called once for each supported video resolution. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] width The video image width -/// @param[in] height The video image height -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre recorder_foreach_supported_video_resolution() will invoke this callback. -/// @see recorder_foreach_supported_video_resolution() -typedef recorder_supported_video_resolution_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef recorder_supported_video_resolution_cbFunction = ffi.Bool Function( - ffi.Int width, ffi.Int height, ffi.Pointer user_data); -typedef Dartrecorder_supported_video_resolution_cbFunction = bool Function( - int width, int height, ffi.Pointer user_data); - -/// @brief Called iteratively to notify about the supported video encoders. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] codec The codec of video encoder -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre recorder_foreach_supported_video_encoder() will invoke this callback. -/// @see recorder_foreach_supported_video_encoder() -typedef recorder_supported_video_encoder_cb = ffi - .Pointer>; -typedef recorder_supported_video_encoder_cbFunction = ffi.Bool Function( - ffi.Int32 codec, ffi.Pointer user_data); -typedef Dartrecorder_supported_video_encoder_cbFunction = bool Function( - int codec, ffi.Pointer user_data); - -/// @brief Called when the record state is changed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] previous The previous state of the recorder -/// @param[in] current The current state of the recorder -/// @param[in] by_policy @c true if the state is changed by policy, otherwise @c false if the state is not changed -/// @param[in] user_data The user data passed from the callback registration function -/// @pre This function is required to register a callback using recorder_set_state_changed_cb(). -/// @see recorder_set_state_changed_cb() -/// @see recorder_prepare() -/// @see recorder_unprepare() -/// @see recorder_start() -/// @see recorder_pause() -/// @see recorder_commit() -/// @see recorder_cancel() -typedef recorder_state_changed_cb - = ffi.Pointer>; -typedef recorder_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 previous, - ffi.Int32 current, - ffi.Bool by_policy, - ffi.Pointer user_data); -typedef Dartrecorder_state_changed_cbFunction = void Function( - int previous, int current, bool by_policy, ffi.Pointer user_data); - -/// @brief Called when the recorder is interrupted by a policy. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks This callback is called after interrupt handling is completed. -/// @param[in] policy The policy that interrupted the recorder -/// @param[in] previous The previous state of the recorder -/// @param[in] current The current state of the recorder -/// @param[in] user_data The user data passed from the callback registration function -/// @see recorder_set_interrupted_cb() -typedef recorder_interrupted_cb - = ffi.Pointer>; -typedef recorder_interrupted_cbFunction = ffi.Void Function(ffi.Int32 policy, - ffi.Int32 previous, ffi.Int32 current, ffi.Pointer user_data); -typedef Dartrecorder_interrupted_cbFunction = void Function( - int policy, int previous, int current, ffi.Pointer user_data); - -/// @brief Called when the recorder interrupt is started by a policy. -/// @since_tizen 4.0 -/// @remarks This callback is called before interrupt handling is started. -/// @param[in] policy The policy that is interrupting the recorder -/// @param[in] state The current state of the recorder -/// @param[in] user_data The user data passed from the callback registration function -/// @see recorder_set_interrupt_started_cb() -typedef recorder_interrupt_started_cb - = ffi.Pointer>; -typedef recorder_interrupt_started_cbFunction = ffi.Void Function( - ffi.Int32 policy, ffi.Int32 state, ffi.Pointer user_data); -typedef Dartrecorder_interrupt_started_cbFunction = void Function( - int policy, int state, ffi.Pointer user_data); - -/// @brief Called when audio stream data was being delivered just before storing in the recorded file. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks The callback function holds the same buffer that will be recorded. \n -/// So if the user changes the buffer, the result file will contain the buffer. -/// @remarks The callback is called via internal thread of Frameworks, therefore do not invoke UI API, recorder_unprepare(), recorder_commit() and recorder_cancel() in callback. -/// @param[in] stream The audio stream data -/// @param[in] size The size of the stream data -/// @param[in] format The audio format -/// @param[in] channel The number of the channel -/// @param[in] timestamp The timestamp of the stream buffer (in msec) -/// @param[in] user_data The user data passed from the callback registration function -/// @see recorder_set_audio_stream_cb() -typedef recorder_audio_stream_cb - = ffi.Pointer>; -typedef recorder_audio_stream_cbFunction = ffi.Void Function( - ffi.Pointer stream, - ffi.Int size, - ffi.Int32 format, - ffi.Int channel, - ffi.UnsignedInt timestamp, - ffi.Pointer user_data); -typedef Dartrecorder_audio_stream_cbFunction = void Function( - ffi.Pointer stream, - int size, - int format, - int channel, - int timestamp, - ffi.Pointer user_data); - -/// @brief Called when muxed stream data is delivered just before writing to the file. -/// @since_tizen 4.0 -/// @remarks This callback receives the data that will be recorded, \n -/// but any changes to this data will not affect the recorded file. \n -/// The @a stream should not be freed and it's valid only in the callback. To use outside the callback, make a copy. -/// @param[in] stream The muxed stream data -/// @param[in] size The size of the stream data -/// @param[in] offset The offset of the stream data -/// @param[in] user_data The user data passed from the callback registration function -/// @see recorder_set_muxed_stream_cb() -typedef recorder_muxed_stream_cb - = ffi.Pointer>; -typedef recorder_muxed_stream_cbFunction = ffi.Void Function( - ffi.Pointer stream, - ffi.Int size, - ffi.UnsignedLongLong offset, - ffi.Pointer user_data); -typedef Dartrecorder_muxed_stream_cbFunction = void Function( - ffi.Pointer stream, - int size, - int offset, - ffi.Pointer user_data); - -/// @brief Called to indicate the recording status. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks This callback function is repeatedly invoked during the #RECORDER_STATE_RECORDING state. -/// @param[in] elapsed_time The time of the recording (milliseconds) -/// @param[in] file_size The size of the recording file (KB) -/// @param[in] user_data The user data passed from the callback registration function -/// @pre recorder_start() will invoke this callback if you register it using recorder_set_recording_status_cb(). -/// @see recorder_set_recording_status_cb() -/// @see recorder_unset_recording_status_cb() -/// @see recorder_start() -typedef recorder_recording_status_cb - = ffi.Pointer>; -typedef recorder_recording_status_cbFunction = ffi.Void Function( - ffi.UnsignedLongLong elapsed_time, - ffi.UnsignedLongLong file_size, - ffi.Pointer user_data); -typedef Dartrecorder_recording_status_cbFunction = void Function( - int elapsed_time, int file_size, ffi.Pointer user_data); - -/// @brief Called when limitation error occurs while recording. -/// @details The callback function is possible to receive three types of limits: time, size and no-space. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks After being called, recording data is discarded and not written in the recording file. Also the state of recorder is not changed. -/// @param[in] type The imitation type -/// @param[in] user_data The user data passed from the callback registration function -/// @pre You have to register a callback using recorder_set_recording_limit_reached_cb(). -/// @see recorder_set_recording_status_cb() -/// @see recorder_set_recording_limit_reached_cb() -/// @see recorder_unset_recording_limit_reached_cb() -typedef recorder_recording_limit_reached_cb = ffi - .Pointer>; -typedef recorder_recording_limit_reached_cbFunction = ffi.Void Function( - ffi.Int32 type, ffi.Pointer user_data); -typedef Dartrecorder_recording_limit_reached_cbFunction = void Function( - int type, ffi.Pointer user_data); - -/// @brief Called when the error occurred. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks This callback informs about the critical error situation. \n -/// When being invoked, user should release the resource and terminate the application. \n -/// This error code will be reported. -/// #RECORDER_ERROR_DEVICE \n -/// #RECORDER_ERROR_INVALID_OPERATION \n -/// #RECORDER_ERROR_OUT_OF_MEMORY. -/// @param[in] error The error code -/// @param[in] current_state The current state of the recorder -/// @param[in] user_data The user data passed from the callback registration function -/// @pre This callback function is invoked if you register this callback using recorder_set_error_cb(). -/// @see recorder_set_error_cb() -/// @see recorder_unset_error_cb() -typedef recorder_error_cb - = ffi.Pointer>; -typedef recorder_error_cbFunction = ffi.Void Function( - ffi.Int32 error, ffi.Int32 current_state, ffi.Pointer user_data); -typedef Dartrecorder_error_cbFunction = void Function( - int error, int current_state, ffi.Pointer user_data); - -/// @brief Called when the recorder device state is changed. -/// @since_tizen 3.0 -/// @param[in] type The recorder type -/// @param[in] state The state of the recorder device -/// @param[in] user_data The user data passed from the callback registration function -/// @see recorder_add_device_state_changed_cb() -typedef recorder_device_state_changed_cb - = ffi.Pointer>; -typedef recorder_device_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 type, ffi.Int32 state, ffi.Pointer user_data); -typedef Dartrecorder_device_state_changed_cbFunction = void Function( - int type, int state, ffi.Pointer user_data); - -/// @brief Enumeration for Tizen Sound Pool error. -/// -/// @since_tizen 4.0 -abstract class sound_pool_error_e { - static const int SOUND_POOL_ERROR_NONE = 0; - static const int SOUND_POOL_ERROR_KEY_NOT_AVAILABLE = -126; - static const int SOUND_POOL_ERROR_OUT_OF_MEMORY = -12; - static const int SOUND_POOL_ERROR_INVALID_PARAMETER = -22; - static const int SOUND_POOL_ERROR_INVALID_OPERATION = -38; - static const int SOUND_POOL_ERROR_NOT_PERMITTED = -1; - static const int SOUND_POOL_ERROR_NO_SUCH_FILE = -2; -} - -/// @brief Enumeration of sound pool stream state. -/// -/// @since_tizen 4.0 -abstract class sound_pool_stream_state_e { - /// < Stream state isn't determined - static const int SOUND_POOL_STREAM_STATE_NONE = 0; - - /// < Stream state is playing - static const int SOUND_POOL_STREAM_STATE_PLAYING = 1; - - /// < Stream state is paused - static const int SOUND_POOL_STREAM_STATE_PAUSED = 2; - - /// < Stream state is stopped - static const int SOUND_POOL_STREAM_STATE_STOPPED = 3; - - /// < Stream state is finished - static const int SOUND_POOL_STREAM_STATE_FINISHED = 4; - - /// < Stream state is suspended - static const int SOUND_POOL_STREAM_STATE_SUSPENDED = 5; -} - -/// @brief Enumeration of sound pool stream priority policy. -/// -/// @since_tizen 4.0 -abstract class sound_pool_stream_priority_policy_e { - /// < Stream priority policy is mute - static const int SOUND_POOL_STREAM_PRIORITY_POLICY_MUTE = 0; - - /// < Stream priority policy is suspended - static const int SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED = 1; -} - -/// @brief Enumeration of sound pool state. -/// -/// @since_tizen 4.0 -abstract class sound_pool_state_e { - /// < Sound pool active state: streams can be played - static const int SOUND_POOL_STATE_ACTIVE = 0; - - /// < Sound pool inactive state: streams can't be played - static const int SOUND_POOL_STATE_INACTIVE = 1; -} - -/// @brief Sound pool handle type. -/// -/// @since_tizen 4.0 -typedef sound_pool_h = ffi.Pointer; - -/// @brief Called when the sound pool state is changed. -/// -/// @since_tizen 4.0 -/// @remarks @a pool is the object for which the callback was set. -/// @param[in] pool The sound pool handle -/// @param[in] prev_state Previous pool state -/// @param[in] cur_state Current pool state -/// @param[in] user_data The user data passed from the code where -/// sound_pool_set_state_changed_cb() was -/// called. -/// -/// @pre Create sound pool handle by calling sound_pool_create() -/// @pre Call sound_pool_set_state_changed_cb() -/// -/// @see sound_pool_create() -/// @see sound_pool_set_state_changed_cb() -/// @see sound_pool_state_e -typedef sound_pool_state_changed_cb - = ffi.Pointer>; -typedef sound_pool_state_changed_cbFunction = ffi.Void Function( - sound_pool_h pool, - ffi.Int32 prev_state, - ffi.Int32 cur_state, - ffi.Pointer user_data); -typedef Dartsound_pool_state_changed_cbFunction = void Function( - sound_pool_h pool, - int prev_state, - int cur_state, - ffi.Pointer user_data); - -/// @brief Called when the sound pool stream state is changed. -/// -/// @since_tizen 4.0 -/// @remarks @a pool is the object for which the callback was set. -/// @param[in] pool The sound pool handle -/// @param[in] id Unique stream identifier -/// @param[in] prev_state Previous stream state -/// @param[in] cur_state Current stream state -/// @param[in] user_data The user data passed to the callback -/// -/// @pre Create sound pool handle by calling sound_pool_create() -/// @pre Load source to pool by calling sound_pool_load_source_from_file() -/// @pre Start source playback by calling sound_pool_stream_play() -/// -/// @see sound_pool_create() -/// @see sound_pool_load_source_from_file() -/// @see sound_pool_stream_play() -/// @see sound_pool_stream_state_e -typedef sound_pool_stream_state_changed_cb = ffi - .Pointer>; -typedef sound_pool_stream_state_changed_cbFunction = ffi.Void Function( - sound_pool_h pool, - ffi.UnsignedInt id, - ffi.Int32 prev_state, - ffi.Int32 cur_state, - ffi.Pointer user_data); -typedef Dartsound_pool_stream_state_changed_cbFunction = void Function( - sound_pool_h pool, - int id, - int prev_state, - int cur_state, - ffi.Pointer user_data); - -final class streamrecorder_s extends ffi.Opaque {} - -/// @brief Enumeration for the source type. -/// @since_tizen 3.0 -abstract class streamrecorder_source_e { - /// < Video only - static const int STREAMRECORDER_SOURCE_VIDEO = 0; - - /// < Audio only - static const int STREAMRECORDER_SOURCE_AUDIO = 1; - - /// < Video and Audio - static const int STREAMRECORDER_SOURCE_VIDEO_AUDIO = 2; -} - -/// @brief Enumeration for the pixel format. -/// @since_tizen 3.0 -abstract class streamrecorder_video_source_format_e { - /// < Invalid pixel format - static const int STREAMRECORDER_VIDEO_SOURCE_FORMAT_INVALID = -1; - - /// < NV12 pixel format - static const int STREAMRECORDER_VIDEO_SOURCE_FORMAT_NV12 = 0; - - /// < NV12 pixel format - static const int STREAMRECORDER_VIDEO_SOURCE_FORMAT_NV21 = 1; - - /// < I420 pixel format - static const int STREAMRECORDER_VIDEO_SOURCE_FORMAT_I420 = 2; - - /// < Number of the video source format - static const int STREAMRECORDER_VIDEO_SOURCE_FORMAT_NUM = 3; -} - -/// @brief Enumeration for the file container format. -/// @since_tizen 3.0 -abstract class streamrecorder_file_format_e { - /// < 3GP file format - static const int STREAMRECORDER_FILE_FORMAT_3GP = 0; - - /// < MP4 file format - static const int STREAMRECORDER_FILE_FORMAT_MP4 = 1; - - /// < AMR file format - static const int STREAMRECORDER_FILE_FORMAT_AMR = 2; - - /// < ADTS file format - static const int STREAMRECORDER_FILE_FORMAT_ADTS = 3; - - /// < WAV file format - static const int STREAMRECORDER_FILE_FORMAT_WAV = 4; -} - -/// @brief Enumeration for the audio codec. -/// @since_tizen 3.0 -abstract class streamrecorder_audio_codec_e { - /// < AMR codec - static const int STREAMRECORDER_AUDIO_CODEC_AMR = 0; - - /// < AAC codec - static const int STREAMRECORDER_AUDIO_CODEC_AAC = 1; - - /// < PCM codec - static const int STREAMRECORDER_AUDIO_CODEC_PCM = 2; -} - -/// @brief Enumeration for the video codec. -/// @since_tizen 3.0 -abstract class streamrecorder_video_codec_e { - /// < H263 codec - static const int STREAMRECORDER_VIDEO_CODEC_H263 = 0; - - /// < MPEG4 codec - static const int STREAMRECORDER_VIDEO_CODEC_MPEG4 = 1; -} - -/// @brief Enumeration for the recording limit reached. -/// @since_tizen 3.0 -abstract class streamrecorder_recording_limit_type_e { - /// < Time limit (second) of recording file - static const int STREAMRECORDER_RECORDING_LIMIT_TYPE_TIME = 0; - - /// < Size limit (kilo bytes [KB]) of recording file - static const int STREAMRECORDER_RECORDING_LIMIT_TYPE_SIZE = 1; -} - -/// @brief Enumeration for Streamrecorder error type. -/// @since_tizen 3.0 -abstract class streamrecorder_error_e { - /// < Successful - static const int STREAMRECORDER_ERROR_NONE = 0; - - /// < Invalid parameter - static const int STREAMRECORDER_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid state - static const int STREAMRECORDER_ERROR_INVALID_STATE = -27328511; - - /// < Out of memory - static const int STREAMRECORDER_ERROR_OUT_OF_MEMORY = -12; - - /// < Internal error - static const int STREAMRECORDER_ERROR_INVALID_OPERATION = -38; - - /// < Out of storage - static const int STREAMRECORDER_ERROR_OUT_OF_STORAGE = -27328510; - - /// < The access to the resources can not be granted - static const int STREAMRECORDER_ERROR_PERMISSION_DENIED = -13; - - /// < The feature is not supported - static const int STREAMRECORDER_ERROR_NOT_SUPPORTED = -1073741822; -} - -/// @brief Enumeration for the Streamrecorder notification. -/// @since_tizen 3.0 -abstract class streamrecorder_notify_e { - /// < None - static const int STREAMRECORDER_NOTIFY_NONE = 0; - - /// < The notification of normal state changes - static const int STREAMRECORDER_NOTIFY_STATE_CHANGED = 1; -} - -/// @brief Enumeration for Streamrecorder states. -/// @since_tizen 3.0 -abstract class streamrecorder_state_e { - /// < StreamRecorder is not created - static const int STREAMRECORDER_STATE_NONE = 0; - - /// < StreamRecorder is created, but not prepared - static const int STREAMRECORDER_STATE_CREATED = 1; - - /// < StreamRecorder is prepared to record - static const int STREAMRECORDER_STATE_PREPARED = 2; - - /// < StreamRecorder is recording media - static const int STREAMRECORDER_STATE_RECORDING = 3; - - /// < StreamRecorder is paused while recording media - static const int STREAMRECORDER_STATE_PAUSED = 4; -} - -/// @brief The Streamrecorder handle. -/// @since_tizen 3.0 -typedef streamrecorder_h = ffi.Pointer; - -/// @brief Called iteratively to notify about the supported file formats. -/// @since_tizen 3.0 -/// @param[in] format The format of recording files -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre streamrecorder_foreach_supported_file_format() will invoke this callback. -/// @see streamrecorder_foreach_supported_file_format() -typedef streamrecorder_supported_file_format_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef streamrecorder_supported_file_format_cbFunction = ffi.Bool Function( - ffi.Int32 format, ffi.Pointer user_data); -typedef Dartstreamrecorder_supported_file_format_cbFunction = bool Function( - int format, ffi.Pointer user_data); - -/// @brief Called iteratively to notify about the supported audio encoders. -/// @since_tizen 3.0 -/// @param[in] codec The codec of audio encoder -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre streamrecorder_foreach_supported_audio_encoder() will invoke this callback. -/// @see streamrecorder_foreach_supported_audio_encoder() -typedef streamrecorder_supported_audio_encoder_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef streamrecorder_supported_audio_encoder_cbFunction = ffi.Bool Function( - ffi.Int32 codec, ffi.Pointer user_data); -typedef Dartstreamrecorder_supported_audio_encoder_cbFunction = bool Function( - int codec, ffi.Pointer user_data); - -/// @brief Called iteratively to notify about the supported video encoders. -/// @since_tizen 3.0 -/// @param[in] codec The codec of video encoder -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre streamrecorder_foreach_supported_video_encoder() will invoke this callback. -/// @see streamrecorder_foreach_supported_video_encoder() -typedef streamrecorder_supported_video_encoder_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef streamrecorder_supported_video_encoder_cbFunction = ffi.Bool Function( - ffi.Int32 codec, ffi.Pointer user_data); -typedef Dartstreamrecorder_supported_video_encoder_cbFunction = bool Function( - int codec, ffi.Pointer user_data); - -/// @brief Called once for each supported video resolution. -/// @since_tizen 3.0 -/// @param[in] width The video image width -/// @param[in] height The video image height -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre streamrecorder_foreach_supported_video_resolution() will invoke this callback. -/// @see streamrecorder_foreach_supported_video_resolution() -typedef streamrecorder_supported_video_resolution_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef streamrecorder_supported_video_resolution_cbFunction = ffi.Bool - Function(ffi.Int width, ffi.Int height, ffi.Pointer user_data); -typedef Dartstreamrecorder_supported_video_resolution_cbFunction = bool - Function(int width, int height, ffi.Pointer user_data); - -/// @brief Called when the streamrecorder gets some nofications. -/// @since_tizen 3.0 -/// @param[in] previous The previous state of the streamrecorder -/// @param[in] current The current state of the streamrecorder -/// @param[in] notification The notification type of the srecorder -/// @param[in] user_data The user data passed from the callback registration function -/// @pre This function is required to register a callback using streamrecorder_set_notify_cb(). -/// @see streamrecorder_set_notify_cb() -/// @see streamrecorder_prepare() -/// @see streamrecorder_unprepare() -/// @see streamrecorder_start() -/// @see streamrecorder_pause() -/// @see streamrecorder_commit() -/// @see streamrecorder_cancel() -typedef streamrecorder_notify_cb - = ffi.Pointer>; -typedef streamrecorder_notify_cbFunction = ffi.Void Function(ffi.Int32 previous, - ffi.Int32 current, ffi.Int32 notification, ffi.Pointer user_data); -typedef Dartstreamrecorder_notify_cbFunction = void Function(int previous, - int current, int notification, ffi.Pointer user_data); - -/// @brief Called to indicate the recording status. -/// @since_tizen 3.0 -/// @remarks This callback function is repeatedly invoked during the #STREAMRECORDER_STATE_RECORDING state. -/// @param[in] elapsed_time The time of the recording (milliseconds) -/// @param[in] file_size The size of the recording file (KB) -/// @param[in] user_data The user data passed from the callback registration function -/// @pre streamrecorder_start() will invoke this callback if you register it using streamrecorder_set_recording_status_cb(). -/// @see streamrecorder_set_recording_status_cb() -/// @see streamrecorder_unset_recording_status_cb() -/// @see streamrecorder_start() -typedef streamrecorder_recording_status_cb = ffi - .Pointer>; -typedef streamrecorder_recording_status_cbFunction = ffi.Void Function( - ffi.UnsignedLongLong elapsed_time, - ffi.UnsignedLongLong file_size, - ffi.Pointer user_data); -typedef Dartstreamrecorder_recording_status_cbFunction = void Function( - int elapsed_time, int file_size, ffi.Pointer user_data); - -/// @brief Called when limitation error occurs while recording. -/// @details The callback function is possible to receive three types of limits: time and size. -/// @since_tizen 3.0 -/// @remarks After being called, recording data except present recorded data will be discarded and not written in the recording file. Also the state of streamrecorder is not changed. -/// @param[in] type The imitation type -/// @param[in] user_data The user data passed from the callback registration function -/// @pre You have to register a callback using streamrecorder_set_recording_limit_reached_cb(). -/// @see streamrecorder_set_recording_status_cb() -/// @see streamrecorder_set_recording_limit_reached_cb() -/// @see streamrecorder_unset_recording_limit_reached_cb() -typedef streamrecorder_recording_limit_reached_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef streamrecorder_recording_limit_reached_cbFunction = ffi.Void Function( - ffi.Int32 type, ffi.Pointer user_data); -typedef Dartstreamrecorder_recording_limit_reached_cbFunction = void Function( - int type, ffi.Pointer user_data); - -/// @brief Called when the error occurred. -/// @since_tizen 3.0 -/// @remarks This callback informs about the critical error situation. \n -/// When being invoked, user should release the resource and terminate the application. \n -/// This error code will be reported. \n -/// #STREAMRECORDER_ERROR_INVALID_OPERATION \n -/// #STREAMRECORDER_ERROR_OUT_OF_MEMORY -/// @param[in] error The error code -/// @param[in] current_state The current state of the streamrecorder -/// @param[in] user_data The user data passed from the callback registration function -/// @pre This callback function is invoked if you register this callback using streamrecorder_set_error_cb(). -/// @see streamrecorder_set_error_cb() -/// @see streamrecorder_unset_error_cb() -typedef streamrecorder_error_cb - = ffi.Pointer>; -typedef streamrecorder_error_cbFunction = ffi.Void Function( - ffi.Int32 error, ffi.Int32 current_state, ffi.Pointer user_data); -typedef Dartstreamrecorder_error_cbFunction = void Function( - int error, int current_state, ffi.Pointer user_data); - -/// @brief Called iteratively to notify about the buffer has been consumed -/// @since_tizen 3.0 -/// @remarks The user needs to release consumed buffer if buffer is allocated by user including media packet -/// @param[in] buffer The consumed buffer that user pushed -/// @param[in] user_data The user data passed -/// @see streamrecorder_set_buffer_consume_completed_cb() will invoke this callback. -/// @see streamrecorder_unset_buffer_consume_completed_cb() -typedef streamrecorder_consume_completed_cb = ffi - .Pointer>; -typedef streamrecorder_consume_completed_cbFunction = ffi.Void Function( - ffi.Pointer buffer, ffi.Pointer user_data); -typedef Dartstreamrecorder_consume_completed_cbFunction = void Function( - ffi.Pointer buffer, ffi.Pointer user_data); - -/// @ingroup CAPI_MEDIA_THUMBNAIL_UTIL_MODULE -/// @brief Enumeration for a thumbnail util error. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class thumbnail_util_error_e { - /// < Successful - static const int THUMBNAIL_UTIL_ERROR_NONE = 0; - - /// < Invalid parameter - static const int THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int THUMBNAIL_UTIL_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid Operation - static const int THUMBNAIL_UTIL_ERROR_INVALID_OPERATION = -38; - - /// < No space left on device - static const int THUMBNAIL_UTIL_ERROR_FILE_NO_SPACE_ON_DEVICE = -28; - - /// < Permission denied - static const int THUMBNAIL_UTIL_ERROR_PERMISSION_DENIED = -13; - - /// < Unsupported Content (Since 4.0) - static const int THUMBNAIL_UTIL_ERROR_UNSUPPORTED_CONTENT = -49872895; -} - -final class thumbnail_s extends ffi.Opaque {} - -/// @ingroup CAPI_MEDIA_THUMBNAIL_UTIL_MODULE -/// @brief The structure type for the thumbnail info handle. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -typedef thumbnail_h = ffi.Pointer; - -/// @ingroup CAPI_MEDIA_THUMBNAIL_UTIL_MODULE -/// @brief Called when creating the thumbnail. -/// @details This callback is called for completion of generating the thumbnail. -/// -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// -/// @remarks Color space of the generated thumbnail is BGRA. \n -/// The callback is called in a separate thread(not in the main loop). \n -/// You must release @a thumb_data using free(). -/// -/// @param[in] error The error code -/// @param[in] request_id The generated request id by thumbnail extraction request -/// @param[in] thumb_width The width of the thumbnail which is generated -/// @param[in] thumb_height The height of the thumbnail which is generated -/// @param[in] thumb_data The raw data of the thumbnail which is generated -/// @param[in] thumb_size The size of the thumbnail which is generated -/// @param[in] user_data The user data passed from the thumbnail_util_extract() function -/// -/// @pre thumbnail_util_extract() calls this callback. -/// @see thumbnail_util_extract() -typedef thumbnail_extracted_cb - = ffi.Pointer>; -typedef thumbnail_extracted_cbFunction = ffi.Void Function( - ffi.Int32 error, - ffi.Pointer request_id, - ffi.Int thumb_width, - ffi.Int thumb_height, - ffi.Pointer thumb_data, - ffi.Int thumb_size, - ffi.Pointer user_data); -typedef Dartthumbnail_extracted_cbFunction = void Function( - int error, - ffi.Pointer request_id, - int thumb_width, - int thumb_height, - ffi.Pointer thumb_data, - int thumb_size, - ffi.Pointer user_data); - -/// @brief Enumeration of error codes for tone player. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class tone_player_error_e { - /// < Successful - static const int TONE_PLAYER_ERROR_NONE = 0; - - /// < Invalid parameter - static const int TONE_PLAYER_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid operation - static const int TONE_PLAYER_ERROR_INVALID_OPERATION = -38; - - /// < Not supported (Since 3.0) - static const int TONE_PLAYER_ERROR_NOT_SUPPORTED_TYPE = -26673151; -} - -/// @brief Enumeration of tone. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class tone_type_e { - /// < The default tone - static const int TONE_TYPE_DEFAULT = 0; - - /// < Predefined DTMF 0 - static const int TONE_TYPE_DTMF_0 = 0; - - /// < Predefined DTMF 1 - static const int TONE_TYPE_DTMF_1 = 1; - - /// < Predefined DTMF 2 - static const int TONE_TYPE_DTMF_2 = 2; - - /// < Predefined DTMF 3 - static const int TONE_TYPE_DTMF_3 = 3; - - /// < Predefined DTMF 4 - static const int TONE_TYPE_DTMF_4 = 4; - - /// < Predefined DTMF 5 - static const int TONE_TYPE_DTMF_5 = 5; - - /// < Predefined DTMF 6 - static const int TONE_TYPE_DTMF_6 = 6; - - /// < Predefined DTMF 7 - static const int TONE_TYPE_DTMF_7 = 7; - - /// < Predefined DTMF 8 - static const int TONE_TYPE_DTMF_8 = 8; - - /// < Predefined DTMF 9 - static const int TONE_TYPE_DTMF_9 = 9; - - /// < Predefined DTMF Star - Asterisk (*) - static const int TONE_TYPE_DTMF_S = 10; - - /// < Predefined DTMF sharP (#) - static const int TONE_TYPE_DTMF_P = 11; - - /// < Predefined DTMF A (A) - static const int TONE_TYPE_DTMF_A = 12; - - /// < Predefined DTMF B (B) - static const int TONE_TYPE_DTMF_B = 13; - - /// < Predefined DTMF C (C) - static const int TONE_TYPE_DTMF_C = 14; - - /// < Predefined DTMF D (D) - static const int TONE_TYPE_DTMF_D = 15; - - /// < Call supervisory tone, Dial tone: CEPT: 425Hz, continuous - static const int TONE_TYPE_SUP_DIAL = 16; - - /// < Call supervisory tone, Dial tone: ANSI (IS-95): 350Hz+440Hz, continuous - static const int TONE_TYPE_ANSI_DIAL = 17; - - /// < Call supervisory tone, Dial tone: JAPAN: 400Hz, continuous - static const int TONE_TYPE_JAPAN_DIAL = 18; - - /// < Call supervisory tone, Busy: CEPT: 425Hz, 500ms ON, 500ms OFF... - static const int TONE_TYPE_SUP_BUSY = 19; - - /// < Call supervisory tone, Busy: ANSI (IS-95): 480Hz+620Hz, 500ms ON, 500ms OFF... - static const int TONE_TYPE_ANSI_BUSY = 20; - - /// < Call supervisory tone, Busy: JAPAN: 400Hz, 500ms ON, 500ms OFF... - static const int TONE_TYPE_JAPAN_BUSY = 21; - - /// < Call supervisory tone, Congestion: CEPT, JAPAN: 425Hz, 200ms ON, 200ms OFF - static const int TONE_TYPE_SUP_CONGESTION = 22; - - /// < Call supervisory tone, Congestion: ANSI (IS-95): 480Hz+620Hz, 250ms ON, 250ms OFF... - static const int TONE_TYPE_ANSI_CONGESTION = 23; - - /// < Call supervisory tone, Radio path acknowledgment : CEPT, ANSI: 425Hz, 200ms ON - static const int TONE_TYPE_SUP_RADIO_ACK = 24; - - /// < Call supervisory tone, Radio path acknowledgment : JAPAN: 400Hz, 1s ON, 2s OFF... - static const int TONE_TYPE_JAPAN_RADIO_ACK = 25; - - /// < Call supervisory tone, Radio path not available: 425Hz, 200ms ON, 200 OFF 3 bursts - static const int TONE_TYPE_SUP_RADIO_NOTAVAIL = 26; - - /// < Call supervisory tone, Error/Special info: 950Hz+1400Hz+1800Hz, 330ms ON, 1s OFF... - static const int TONE_TYPE_SUP_ERROR = 27; - - /// < Call supervisory tone, Call Waiting: CEPT, JAPAN: 425Hz, 200ms ON, 600ms OFF, 200ms ON, 3s OFF... - static const int TONE_TYPE_SUP_CALL_WAITING = 28; - - /// < Call supervisory tone, Call Waiting: ANSI (IS-95): 440 Hz, 300 ms ON, 9.7 s OFF, (100 ms ON, 100 ms OFF, 100 ms ON, 9.7s OFF ...) - static const int TONE_TYPE_ANSI_CALL_WAITING = 29; - - /// < Call supervisory tone, Ring Tone: CEPT, JAPAN: 425Hz, 1s ON, 4s OFF... - static const int TONE_TYPE_SUP_RINGTONE = 30; - - /// < Call supervisory tone, Ring Tone: ANSI (IS-95): 440Hz + 480Hz, 2s ON, 4s OFF... - static const int TONE_TYPE_ANSI_RINGTONE = 31; - - /// < General beep: 400Hz+1200Hz, 35ms ON - static const int TONE_TYPE_PROP_BEEP = 32; - - /// < Proprietary tone, positive acknowledgment: 1200Hz, 100ms ON, 100ms OFF 2 bursts - static const int TONE_TYPE_PROP_ACK = 33; - - /// < Proprietary tone, negative acknowledgment: 300Hz+400Hz+500Hz, 400ms ON - static const int TONE_TYPE_PROP_NACK = 34; - - /// < Proprietary tone, prompt tone: 400Hz+1200Hz, 200ms ON - static const int TONE_TYPE_PROP_PROMPT = 35; - - /// < Proprietary tone, general double beep: twice 400Hz+1200Hz, 35ms ON, 200ms OFF, 35ms ON - static const int TONE_TYPE_PROP_BEEP2 = 36; - - /// < Call supervisory tone (IS-95), intercept tone: alternating 440 Hz and 620 Hz tones, each on for 250 ms - static const int TONE_TYPE_SUP_INTERCEPT = 37; - - /// < Call supervisory tone (IS-95), abbreviated intercept: intercept tone limited to 4 seconds - static const int TONE_TYPE_SUP_INTERCEPT_ABBREV = 38; - - /// < Call supervisory tone (IS-95), abbreviated congestion: congestion tone limited to 4 seconds - static const int TONE_TYPE_SUP_CONGESTION_ABBREV = 39; - - /// < Call supervisory tone (IS-95), confirm tone: a 350 Hz tone added to a 440 Hz tone repeated 3 times in a 100 ms on, 100 ms off cycle - static const int TONE_TYPE_SUP_CONFIRM = 40; - - /// < Call supervisory tone (IS-95), pip tone: four bursts of 480 Hz tone (0.1 s on, 0.1 s off). - static const int TONE_TYPE_SUP_PIP = 41; - - /// < 425Hz continuous - static const int TONE_TYPE_CDMA_DIAL_TONE_LITE = 42; - - /// < CDMA USA Ringback: 440Hz+480Hz 2s ON, 4000 OFF ... - static const int TONE_TYPE_CDMA_NETWORK_USA_RINGBACK = 43; - - /// < CDMA Intercept tone: 440Hz 250ms ON, 620Hz 250ms ON ... - static const int TONE_TYPE_CDMA_INTERCEPT = 44; - - /// < CDMA Abbr Intercept tone: 440Hz 250ms ON, 620Hz 250ms ON - static const int TONE_TYPE_CDMA_ABBR_INTERCEPT = 45; - - /// < CDMA Reorder tone: 480Hz+620Hz 250ms ON, 250ms OFF... - static const int TONE_TYPE_CDMA_REORDER = 46; - - /// < CDMA Abbr Reorder tone: 480Hz+620Hz 250ms ON, 250ms OFF repeated for 8 times - static const int TONE_TYPE_CDMA_ABBR_REORDER = 47; - - /// < CDMA Network Busy tone: 480Hz+620Hz 500ms ON, 500ms OFF continuous - static const int TONE_TYPE_CDMA_NETWORK_BUSY = 48; - - /// < CDMA Confirm tone: 350Hz+440Hz 100ms ON, 100ms OFF repeated for 3 times - static const int TONE_TYPE_CDMA_CONFIRM = 49; - - /// < CDMA answer tone: silent tone - definition Frequency 0, 0ms ON, 0ms OFF - static const int TONE_TYPE_CDMA_ANSWER = 50; - - /// < CDMA Network Callwaiting tone: 440Hz 300ms ON - static const int TONE_TYPE_CDMA_NETWORK_CALLWAITING = 51; - - /// < CDMA PIP tone: 480Hz 100ms ON, 100ms OFF repeated for 4 times - static const int TONE_TYPE_CDMA_PIP = 52; - - /// < ISDN Call Signal Normal tone: {2091Hz 32ms ON, 2556 64ms ON} 20 times, 2091 32ms ON, 2556 48ms ON, 4s OFF - static const int TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_NORMAL = 53; - - /// < ISDN Call Signal Intergroup tone: {2091Hz 32ms ON, 2556 64ms ON} 8 times, 2091Hz 32ms ON, 400ms OFF, {2091Hz 32ms ON, 2556Hz 64ms ON} 8times, 2091Hz 32ms ON, 4s OFF. - static const int TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_INTERGROUP = 54; - - /// < ISDN Call Signal SP PRI tone:{2091Hz 32ms ON, 2556 64ms ON} 4 times 2091Hz 16ms ON, 200ms OFF, {2091Hz 32ms ON, 2556Hz 64ms ON} 4 times, 2091Hz 16ms ON, 200ms OFF - static const int TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_SP_PRI = 55; - - /// < SDN Call sign PAT3 tone: silent tone - static const int TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_PAT3 = 56; - - /// < ISDN Ping Ring tone: {2091Hz 32ms ON, 2556Hz 64ms ON} 5 times 2091Hz 20ms ON - static const int TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_PING_RING = 57; - - /// < ISDN Pat5 tone: silent tone - static const int TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_PAT5 = 58; - - /// < ISDN Pat6 tone: silent tone - static const int TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_PAT6 = 59; - - /// < ISDN Pat7 tone: silent tone - static const int TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_PAT7 = 60; - - /// < TONE_CDMA_HIGH_L tone: {3700Hz 25ms, 4000Hz 25ms} 40 times 4000ms OFF, Repeat .... - static const int TONE_TYPE_CDMA_HIGH_L = 61; - - /// < TONE_CDMA_MED_L tone: {2600Hz 25ms, 2900Hz 25ms} 40 times 4000ms OFF, Repeat .... - static const int TONE_TYPE_CDMA_MED_L = 62; - - /// < TONE_CDMA_LOW_L tone: {1300Hz 25ms, 1450Hz 25ms} 40 times, 4000ms OFF, Repeat .... - static const int TONE_TYPE_CDMA_LOW_L = 63; - - /// < CDMA HIGH SS tone: {3700Hz 25ms, 4000Hz 25ms} repeat 16 times, 400ms OFF, repeat .... - static const int TONE_TYPE_CDMA_HIGH_SS = 64; - - /// < CDMA MED SS tone: {2600Hz 25ms, 2900Hz 25ms} repeat 16 times, 400ms OFF, repeat .... - static const int TONE_TYPE_CDMA_MED_SS = 65; - - /// < CDMA LOW SS tone: {1300z 25ms, 1450Hz 25ms} repeat 16 times, 400ms OFF, repeat .... - static const int TONE_TYPE_CDMA_LOW_SS = 66; - - /// < CDMA HIGH SSL tone: {3700Hz 25ms, 4000Hz 25ms} 8 times, 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} repeat 8 times, 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} repeat 16 times, 4000ms OFF, repeat ... - static const int TONE_TYPE_CDMA_HIGH_SSL = 67; - - /// < CDMA MED SSL tone: {2600Hz 25ms, 2900Hz 25ms} 8 times, 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} repeat 8 times, 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} repeat 16 times, 4000ms OFF, repeat ... - static const int TONE_TYPE_CDMA_MED_SSL = 68; - - /// < CDMA LOW SSL tone: {1300Hz 25ms, 1450Hz 25ms} 8 times, 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} repeat 8 times, 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} repeat 16 times, 4000ms OFF, repeat ... - static const int TONE_TYPE_CDMA_LOW_SSL = 69; - - /// < CDMA HIGH SS2 tone: {3700Hz 25ms, 4000Hz 25ms} 20 times, 1000ms OFF, {3700Hz 25ms, 4000Hz 25ms} 20 times, 3000ms OFF, repeat .... - static const int TONE_TYPE_CDMA_HIGH_SS_2 = 70; - - /// < CDMA MED SS2 tone: {2600Hz 25ms, 2900Hz 25ms} 20 times, 1000ms OFF, {2600Hz 25ms, 2900Hz 25ms} 20 times, 3000ms OFF, repeat .... - static const int TONE_TYPE_CDMA_MED_SS_2 = 71; - - /// < CDMA LOW SS2 tone: {1300Hz 25ms, 1450Hz 25ms} 20 times, 1000ms OFF, {1300Hz 25ms, 1450Hz 25ms} 20 times, 3000ms OFF, repeat .... - static const int TONE_TYPE_CDMA_LOW_SS_2 = 72; - - /// < CDMA HIGH SLS tone: {3700Hz 25ms, 4000Hz 25ms} 10 times, 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 20 times, 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 10 times, 3000ms OFF, REPEAT - static const int TONE_TYPE_CDMA_HIGH_SLS = 73; - - /// < CDMA MED SLS tone: {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 20 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 3000ms OFF, REPEAT - static const int TONE_TYPE_CDMA_MED_SLS = 74; - - /// < CDMA LOW SLS tone: {1300Hz 25ms, 1450Hz 25ms} 10 times, 500ms OFF, {1300Hz 25ms, 1450Hz 25ms} 20 times, 500ms OFF, {1300Hz 25ms, 1450Hz 25ms} 10 times, 3000ms OFF, REPEAT - static const int TONE_TYPE_CDMA_LOW_SLS = 75; - - /// < CDMA HIGH S X4 tone: {3700Hz 25ms, 4000Hz 25ms} 10 times, 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 10 times, 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 10 times, 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 10 times, 2500ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_HIGH_S_X4 = 76; - - /// < CDMA MED S X4 tone: {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 2500ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_MED_S_X4 = 77; - - /// < CDMA LOW S X4 tone: {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 2500ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_LOW_S_X4 = 78; - - /// < CDMA HIGH PBX L: {3700Hz 25ms, 4000Hz 25ms}20 times, 2000ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_HIGH_PBX_L = 79; - - /// < CDMA MED PBX L: {2600Hz 25ms, 2900Hz 25ms}20 times, 2000ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_MED_PBX_L = 80; - - /// < CDMA LOW PBX L: {1300Hz 25ms,1450Hz 25ms}20 times, 2000ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_LOW_PBX_L = 81; - - /// < CDMA HIGH PBX SS tone: {3700Hz 25ms, 4000Hz 25ms} 8 times 200 ms OFF, {3700Hz 25ms 4000Hz 25ms}8 times, 2000ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_HIGH_PBX_SS = 82; - - /// < CDMA MED PBX SS tone: {2600Hz 25ms, 2900Hz 25ms} 8 times 200 ms OFF, {2600Hz 25ms 2900Hz 25ms}8 times, 2000ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_MED_PBX_SS = 83; - - /// < CDMA LOW PBX SS tone: {1300Hz 25ms, 1450Hz 25ms} 8 times 200 ms OFF, {1300Hz 25ms 1450Hz 25ms}8 times, 2000ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_LOW_PBX_SS = 84; - - /// < CDMA HIGH PBX SSL tone:{3700Hz 25ms, 4000Hz 25ms} 8 times 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} 8 times, 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} 16 times, 1000ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_HIGH_PBX_SSL = 85; - - /// < CDMA MED PBX SSL tone:{2600Hz 25ms, 2900Hz 25ms} 8 times 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} 8 times, 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} 16 times, 1000ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_MED_PBX_SSL = 86; - - /// < CDMA LOW PBX SSL tone:{1300Hz 25ms, 1450Hz 25ms} 8 times 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} 8 times, 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} 16 times, 1000ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_LOW_PBX_SSL = 87; - - /// < CDMA HIGH PBX SLS tone:{3700Hz 25ms, 4000Hz 25ms} 8 times 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} 16 times, 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} 8 times, 1000ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_HIGH_PBX_SLS = 88; - - /// < CDMA MED PBX SLS tone:{2600Hz 25ms, 2900Hz 25ms} 8 times 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} 16 times, 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} 8 times, 1000ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_MED_PBX_SLS = 89; - - /// < CDMA LOW PBX SLS tone:{1300Hz 25ms, 1450Hz 25ms} 8 times 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} 16 times, 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} 8 times, 1000ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_LOW_PBX_SLS = 90; - - /// < CDMA HIGH PBX X S4 tone: {3700Hz 25ms 4000Hz 25ms} 8 times, 200ms OFF, {3700Hz 25ms 4000Hz 25ms} 8 times, 200ms OFF, {3700Hz 25ms 4000Hz 25ms} 8 times, 200ms OFF, {3700Hz 25ms 4000Hz 25ms} 8 times, 800ms OFF, REPEAT... - static const int TONE_TYPE_CDMA_HIGH_PBX_S_X4 = 91; - - /// < CDMA MED PBX X S4 tone: {2600Hz 25ms 2900Hz 25ms} 8 times, 200ms OFF, {2600Hz 25ms 2900Hz 25ms} 8 times, 200ms OFF, {2600Hz 25ms 2900Hz 25ms} 8 times, 200ms OFF, {2600Hz 25ms 2900Hz 25ms} 8 times, 800ms OFF, REPEAT... - static const int TONE_TYPE_CDMA_MED_PBX_S_X4 = 92; - - /// < CDMA LOW PBX X S4 tone: {1300Hz 25ms 1450Hz 25ms} 8 times, 200ms OFF, {1300Hz 25ms 1450Hz 25ms} 8 times, 200ms OFF, {1300Hz 25ms 1450Hz 25ms} 8 times, 200ms OFF, {1300Hz 25ms 1450Hz 25ms} 8 times, 800ms OFF, REPEAT... - static const int TONE_TYPE_CDMA_LOW_PBX_S_X4 = 93; - - /// < CDMA Alert Network Lite tone: 1109Hz 62ms ON, 784Hz 62ms ON, 740Hz 62ms ON 622Hz 62ms ON, 1109Hz 62ms ON - static const int TONE_TYPE_CDMA_ALERT_NETWORK_LITE = 94; - - /// < CDMA Alert Auto Redial tone: {1245Hz 62ms ON, 659Hz 62ms ON} 3 times, 1245 62ms ON - static const int TONE_TYPE_CDMA_ALERT_AUTOREDIAL_LITE = 95; - - /// < CDMA One Min Beep tone: 1150Hz+770Hz 400ms ON - static const int TONE_TYPE_CDMA_ONE_MIN_BEEP = 96; - - /// < CDMA KEYPAD Volume key lite tone: 941Hz+1477Hz 120ms ON - static const int TONE_TYPE_CDMA_KEYPAD_VOLUME_KEY_LITE = 97; - - /// < CDMA PRESSHOLDKEY LITE tone: 587Hz 375ms ON, 1175Hz 125ms ON - static const int TONE_TYPE_CDMA_PRESSHOLDKEY_LITE = 98; - - /// < CDMA ALERT INCALL LITE tone: 587Hz 62ms, 784 62ms, 831Hz 62ms, 784Hz 62ms, 1109 62ms, 784Hz 62ms, 831Hz 62ms, 784Hz 62ms - static const int TONE_TYPE_CDMA_ALERT_INCALL_LITE = 99; - - /// < CDMA EMERGENCY RINGBACK tone: {941Hz 125ms ON, 10ms OFF} 3times 4990ms OFF, REPEAT... - static const int TONE_TYPE_CDMA_EMERGENCY_RINGBACK = 100; - - /// < CDMA ALERT CALL GUARD tone: {1319Hz 125ms ON, 125ms OFF} 3 times - static const int TONE_TYPE_CDMA_ALERT_CALL_GUARD = 101; - - /// < CDMA SOFT ERROR LITE tone: 1047Hz 125ms ON, 370Hz 125ms - static const int TONE_TYPE_CDMA_SOFT_ERROR_LITE = 102; - - /// < CDMA CALLDROP LITE tone: 1480Hz 125ms, 1397Hz 125ms, 784Hz 125ms - static const int TONE_TYPE_CDMA_CALLDROP_LITE = 103; - - /// < CDMA_NETWORK_BUSY_ONE_SHOT tone: 425Hz 500ms ON, 500ms OFF. - static const int TONE_TYPE_CDMA_NETWORK_BUSY_ONE_SHOT = 104; - - /// < CDMA_ABBR_ALERT tone: 1150Hz+770Hz 400ms ON - static const int TONE_TYPE_CDMA_ABBR_ALERT = 105; - - /// < CDMA_SIGNAL_OFF - silent tone - static const int TONE_TYPE_CDMA_SIGNAL_OFF = 106; - - /// < User Defined Tone: 100Hz continuous - static const int TONE_TYPE_USER_DEFINED_LOW_FRE = 107; - - /// < User Defined Tone: 200Hz continuous - static const int TONE_TYPE_USER_DEFINED_MED_FRE = 108; - - /// < User Defined Tone: 300Hz continuous - static const int TONE_TYPE_USER_DEFINED_HIGH_FRE = 109; -} - -/// @ingroup CAPI_MEDIA_VIDEO_UTIL_MODULE -/// @brief Enumeration for errors of a video util. -/// @since_tizen 2.3 -abstract class video_util_error_e { - /// < Successful - static const int VIDEO_UTIL_ERROR_NONE = 0; - - /// < Invalid parameter - static const int VIDEO_UTIL_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int VIDEO_UTIL_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid operation - static const int VIDEO_UTIL_ERROR_INVALID_OPERATION = -38; - - /// < Device or resource busy - static const int VIDEO_UTIL_ERROR_BUSY = -16; - - /// < Not supported format - static const int VIDEO_UTIL_ERROR_NOT_SUPPORTED_FORMAT = -26738687; - - /// < Permission denied - static const int VIDEO_UTIL_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int VIDEO_UTIL_ERROR_NOT_SUPPORTED = -1073741822; -} - -/// @ingroup CAPI_MEDIA_VIDEO_UTIL_MODULE -/// @brief Enumeration for video codec. -/// @since_tizen 2.3 -abstract class video_util_video_codec_e { - /// < MPEG4 - static const int VIDEO_UTIL_VIDEO_CODEC_MPEG4 = 0; - - /// < H.263 - static const int VIDEO_UTIL_VIDEO_CODEC_H263 = 1; - - /// < H.264 - static const int VIDEO_UTIL_VIDEO_CODEC_H264 = 2; - - /// < No transcoding for video - static const int VIDEO_UTIL_VIDEO_CODEC_NONE = 3; -} - -/// @ingroup CAPI_MEDIA_VIDEO_UTIL_MODULE -/// @brief Enumeration for audio codec. -/// @since_tizen 2.3 -abstract class video_util_audio_codec_e { - /// < AAC - static const int VIDEO_UTIL_AUDIO_CODEC_AAC = 0; - - /// < AMRNB - static const int VIDEO_UTIL_AUDIO_CODEC_AMRNB = 1; - - /// < No transcoding for audio - static const int VIDEO_UTIL_AUDIO_CODEC_NONE = 2; -} - -/// @ingroup CAPI_MEDIA_VIDEO_UTIL_MODULE -/// @brief Enumeration for formats of a media. -/// @since_tizen 2.3 -abstract class video_util_file_format_e { - /// < 3GP - static const int VIDEO_UTIL_FILE_FORMAT_3GP = 0; - - /// < MP4 - static const int VIDEO_UTIL_FILE_FORMAT_MP4 = 1; - static const int VIDEO_UTIL_FILE_FORMAT_MAX = 2; -} - -final class video_util_s extends ffi.Opaque {} - -/// @ingroup CAPI_MEDIA_VIDEO_UTIL_MODULE -/// @brief Video util handle. -/// @since_tizen 2.3 -typedef video_util_h = ffi.Pointer; - -/// @ingroup CAPI_MEDIA_VIDEO_UTIL_MODULE -/// @brief Called regularly during the video transcoding. -/// @since_tizen 2.3 -/// -/// @details The interval of callback invocation depends on the framework. -/// -/// @param[in] current_position The current position in milliseconds -/// @param[in] duration The duration in seconds -/// @param[in] user_data The user data passed from the callback registration function -/// -/// @pre This callback function is invoked if you register this callback using video_util_set_progress_transcoding_cb(). -/// -/// @see video_util_start_transcoding() -typedef video_util_transcoding_progress_cb = ffi - .Pointer>; -typedef video_util_transcoding_progress_cbFunction = ffi.Void Function( - ffi.UnsignedLong current_position, - ffi.UnsignedLong duration, - ffi.Pointer user_data); -typedef Dartvideo_util_transcoding_progress_cbFunction = void Function( - int current_position, int duration, ffi.Pointer user_data); - -/// @ingroup CAPI_MEDIA_VIDEO_UTIL_MODULE -/// @brief Called when transcoding is finished just before storing in the file. -/// @since_tizen 2.3 -/// -/// @param[in] error_code The error code of video util -/// @param[in] user_data The user data passed from the callback registration function -/// -/// @pre video_util_start_transcoding() will invoke this function. -typedef video_util_transcoding_completed_cb = ffi - .Pointer>; -typedef video_util_transcoding_completed_cbFunction = ffi.Void Function( - ffi.Int32 error_code, ffi.Pointer user_data); -typedef Dartvideo_util_transcoding_completed_cbFunction = void Function( - int error_code, ffi.Pointer user_data); - -/// @brief Called iteratively to notify you about the supported file formats. -/// @since_tizen 2.3 -/// -/// @param[in] format The format of media files -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre video_util_foreach_supported_file_format() will invoke this callback. -typedef video_util_supported_file_format_cb = ffi - .Pointer>; -typedef video_util_supported_file_format_cbFunction = ffi.Bool Function( - ffi.Int32 format, ffi.Pointer user_data); -typedef Dartvideo_util_supported_file_format_cbFunction = bool Function( - int format, ffi.Pointer user_data); - -/// @brief Called iteratively to notify you of supported video codec. -/// @since_tizen 2.3 -/// -/// @param[in] format The codec of video -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre video_util_foreach_supported_video_codec() will invoke this callback. -typedef video_util_supported_video_encoder_cb = ffi - .Pointer>; -typedef video_util_supported_video_encoder_cbFunction = ffi.Bool Function( - ffi.Int32 codec, ffi.Pointer user_data); -typedef Dartvideo_util_supported_video_encoder_cbFunction = bool Function( - int codec, ffi.Pointer user_data); - -/// @brief Called iteratively to notify you about the supported audio codec. -/// @since_tizen 2.3 -/// -/// @param[in] format The codec of audio -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre video_util_foreach_supported_audio_codec() will invoke this callback. -typedef video_util_supported_audio_encoder_cb = ffi - .Pointer>; -typedef video_util_supported_audio_encoder_cbFunction = ffi.Bool Function( - ffi.Int32 codec, ffi.Pointer user_data); -typedef Dartvideo_util_supported_audio_encoder_cbFunction = bool Function( - int codec, ffi.Pointer user_data); - -/// @brief Enumeration of error codes for WAV player. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class wav_player_error_e { - /// < Successful - static const int WAV_PLAYER_ERROR_NONE = 0; - - /// < Invalid parameter - static const int WAV_PLAYER_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid operation - static const int WAV_PLAYER_ERROR_INVALID_OPERATION = -38; - - /// < Format not supported - static const int WAV_PLAYER_ERROR_FORMAT_NOT_SUPPORTED = -26804223; - - /// < Not supported (Since 3.0) - static const int WAV_PLAYER_ERROR_NOT_SUPPORTED_TYPE = -26804222; -} - -/// @brief Called when a WAV file has finished playing. -/// @details This callback is not invoked by calling wav_player_stop(). -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] id The completed wav player ID -/// @param[in] user_data The user data passed from the callback registration function -/// @see wav_player_start() -typedef wav_player_playback_completed_cb - = ffi.Pointer>; -typedef wav_player_playback_completed_cbFunction = ffi.Void Function( - ffi.Int id, ffi.Pointer user_data); -typedef Dartwav_player_playback_completed_cbFunction = void Function( - int id, ffi.Pointer user_data); - -/// @WEARABLE_ONLY -/// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE -/// @brief Enumeration of PBAP fields. -/// @since_tizen 3.0 -abstract class bt_pbap_field_e { - /// < All field - static const int BT_PBAP_FIELD_ALL = -1; - - /// < vCard Version - static const int BT_PBAP_FIELD_VERSION = 1; - - /// < Formatted Name - static const int BT_PBAP_FIELD_FN = 2; - - /// < Structured Presentation of Name - static const int BT_PBAP_FIELD_N = 4; - - /// < Associated Image or Photo - static const int BT_PBAP_FIELD_PHOTO = 8; - - /// < Birthday - static const int BT_PBAP_FIELD_BDAY = 16; - - /// < Delivery Address - static const int BT_PBAP_FIELD_ADR = 32; - - /// < Delivery - static const int BT_PBAP_FIELD_LABEL = 64; - - /// < Telephone Number - static const int BT_PBAP_FIELD_TEL = 128; - - /// < Electronic Mail Address - static const int BT_PBAP_FIELD_EMAIL = 256; - - /// < Electronic Mail - static const int BT_PBAP_FIELD_MAILER = 512; - - /// < Time Zone - static const int BT_PBAP_FIELD_TZ = 1024; - - /// < Geographic Position - static const int BT_PBAP_FIELD_GEO = 2048; - - /// < Job - static const int BT_PBAP_FIELD_TITLE = 4096; - - /// < Role within the Organization - static const int BT_PBAP_FIELD_ROLE = 8192; - - /// < Organization Logo - static const int BT_PBAP_FIELD_LOGO = 16384; - - /// < vCard of Person Representing - static const int BT_PBAP_FIELD_AGENT = 32768; - - /// < Name of Organization - static const int BT_PBAP_FIELD_ORG = 65536; - - /// < Comments - static const int BT_PBAP_FIELD_NOTE = 131072; - - /// < Revision - static const int BT_PBAP_FIELD_REV = 262144; - - /// < Pronunciation of Name - static const int BT_PBAP_FIELD_SOUND = 524288; - - /// < Uniform Resource Locator - static const int BT_PBAP_FIELD_URL = 1048576; - - /// < Unique ID - static const int BT_PBAP_FIELD_UID = 2097152; - - /// < Public Encryption Key - static const int BT_PBAP_FIELD_KEY = 4194304; - - /// < Nickname - static const int BT_PBAP_FIELD_NICKNAME = 8388608; - - /// < Categories - static const int BT_PBAP_FIELD_CATEGORIES = 16777216; - - /// < Product ID - static const int BT_PBAP_FIELD_PROID = 33554432; - - /// < Class information - static const int BT_PBAP_FIELD_CLASS = 67108864; - - /// < String used for sorting operations - static const int BT_PBAP_FIELD_SORT_STRING = 134217728; - - /// < Time stamp - static const int BT_PBAP_FIELD_X_IRMC_CALL_DATETIME = 268435456; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_MODULE -/// @brief Enumerations of Bluetooth error codes. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_error_e { - /// < Successful - static const int BT_ERROR_NONE = 0; - - /// < Operation cancelled - static const int BT_ERROR_CANCELLED = -125; - - /// < Invalid parameter - static const int BT_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int BT_ERROR_OUT_OF_MEMORY = -12; - - /// < Device or resource busy - static const int BT_ERROR_RESOURCE_BUSY = -16; - - /// < Timeout error - static const int BT_ERROR_TIMED_OUT = -1073741823; - - /// < Operation now in progress - static const int BT_ERROR_NOW_IN_PROGRESS = -115; - - /// < BT is Not Supported - static const int BT_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Permission denied - static const int BT_ERROR_PERMISSION_DENIED = -13; - - /// < Quota exceeded - static const int BT_ERROR_QUOTA_EXCEEDED = -122; - - /// < No data available - static const int BT_ERROR_NO_DATA = -61; - - /// < Device policy restriction (Since 3.0) - static const int BT_ERROR_DEVICE_POLICY_RESTRICTION = -1073741820; - - /// < Local adapter not initialized - static const int BT_ERROR_NOT_INITIALIZED = -29359871; - - /// < Local adapter not enabled - static const int BT_ERROR_NOT_ENABLED = -29359870; - - /// < Operation already done - static const int BT_ERROR_ALREADY_DONE = -29359869; - - /// < Operation failed - static const int BT_ERROR_OPERATION_FAILED = -29359868; - - /// < Operation not in progress - static const int BT_ERROR_NOT_IN_PROGRESS = -29359867; - - /// < Remote device not bonded - static const int BT_ERROR_REMOTE_DEVICE_NOT_BONDED = -29359866; - - /// < Authentication rejected - static const int BT_ERROR_AUTH_REJECTED = -29359865; - - /// < Authentication failed - static const int BT_ERROR_AUTH_FAILED = -29359864; - - /// < Remote device not found - static const int BT_ERROR_REMOTE_DEVICE_NOT_FOUND = -29359863; - - /// < Service search failed - static const int BT_ERROR_SERVICE_SEARCH_FAILED = -29359862; - - /// < Remote device is not connected - static const int BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED = -29359861; - - /// < Resource temporarily unavailable - static const int BT_ERROR_AGAIN = -29359860; - - /// < Service Not Found - static const int BT_ERROR_SERVICE_NOT_FOUND = -29359859; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE -/// @brief Enumerations of the Bluetooth adapter state. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_adapter_state_e { - /// < Bluetooth adapter is disabled - static const int BT_ADAPTER_DISABLED = 0; - - /// < Bluetooth adapter is enabled - static const int BT_ADAPTER_ENABLED = 1; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE -/// @brief Enumerations of the Bluetooth visibility mode. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_adapter_visibility_mode_e { - /// < Other devices cannot find your device via discovery - static const int BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE = 0; - - /// < Discoverable mode - static const int BT_ADAPTER_VISIBILITY_MODE_GENERAL_DISCOVERABLE = 1; - - /// < Discoverable mode with time limit. After specific period, - /// it is changed to #BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE. - static const int BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE = 2; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE -/// @brief Enumerations of the discovery state of Bluetooth device. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_adapter_device_discovery_state_e { - /// < Device discovery is started - static const int BT_ADAPTER_DEVICE_DISCOVERY_STARTED = 0; - - /// < Device discovery is finished - static const int BT_ADAPTER_DEVICE_DISCOVERY_FINISHED = 1; - - /// < The remote Bluetooth device is found - static const int BT_ADAPTER_DEVICE_DISCOVERY_FOUND = 2; -} - -/// @deprecated Deprecated since 2.3.1 -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief Enumerations of the discovery state of Bluetooth LE device. -/// @since_tizen @if WEARABLE @else 2.3 @endif -abstract class bt_adapter_le_device_discovery_state_e { - /// < LE device discovery is started - static const int BT_ADAPTER_LE_DEVICE_DISCOVERY_STARTED = 0; - - /// < LE device discovery is finished - static const int BT_ADAPTER_LE_DEVICE_DISCOVERY_FINISHED = 1; - - /// < The remote Bluetooth LE device is found - static const int BT_ADAPTER_LE_DEVICE_DISCOVERY_FOUND = 2; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief Enumerations of the Bluetooth advertising state. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_adapter_le_advertising_state_e { - /// < Bluetooth advertising is stopped - static const int BT_ADAPTER_LE_ADVERTISING_STOPPED = 0; - - /// < Bluetooth advertising is started - static const int BT_ADAPTER_LE_ADVERTISING_STARTED = 1; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief Enumerations of the Bluetooth advertising mode. -/// @since_tizen 2.3.1 -abstract class bt_adapter_le_advertising_mode_e { - /// < Balanced advertising mode - static const int BT_ADAPTER_LE_ADVERTISING_MODE_BALANCED = 0; - - /// < Low latency advertising mode - static const int BT_ADAPTER_LE_ADVERTISING_MODE_LOW_LATENCY = 1; - - /// < Low energy advertising mode - static const int BT_ADAPTER_LE_ADVERTISING_MODE_LOW_ENERGY = 2; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief Enumerations of the Bluetooth advertising filter policy. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_adapter_le_advertising_filter_policy_e { - /// < White list is not in use - static const int BT_ADAPTER_LE_ADVERTISING_FILTER_DEFAULT = 0; - - /// < Allow the scan - /// request that in the White list - static const int BT_ADAPTER_LE_ADVERTISING_FILTER_ALLOW_SCAN_WL = 1; - - /// < Allow the connection - /// request that in the White list - static const int BT_ADAPTER_LE_ADVERTISING_FILTER_ALLOW_CONN_WL = 2; - - /// < Allow the - /// scan and connection request that in the White list - static const int BT_ADAPTER_LE_ADVERTISING_FILTER_ALLOW_SCAN_CONN_WL = 3; -} - -/// @deprecated Deprecated since 2.3.1 -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief Enumerations of the Bluetooth advertising type. -/// @since_tizen @if WEARABLE @else 2.3 @endif -abstract class bt_adapter_le_advertising_type_e { - /// < Connectable undirected advertising (ADV_IND) - static const int BT_ADAPTER_LE_ADVERTISING_CONNECTABLE = 0; - - /// < Connectable high duty cycle directed advertising (ADV_DIRECT_IND) - static const int BT_ADAPTER_LE_ADVERTISING_CONNECTABLE_DIRECT_HIGH = 1; - - /// < Scannable undirected advertising (ADV_SCAN_IND) - static const int BT_ADAPTER_LE_ADVERTISING_SCANNABLE = 2; - - /// < Non connectable undirected advertising (ADV_NONCOND_IND) - static const int BT_ADAPTER_LE_ADVERTISING_NON_CONNECTABLE = 3; - - /// < Connectable low duty cycle directed advertising (ADV_DIRECT_IND) - static const int BT_ADAPTER_LE_ADVERTISING_CONNECTABLE_DIRECT_LOW = 4; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief Enumerations of the Bluetooth LE packet type. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_adapter_le_packet_type_e { - /// < Advertising packet - static const int BT_ADAPTER_LE_PACKET_ADVERTISING = 0; - - /// < Scan response packet - static const int BT_ADAPTER_LE_PACKET_SCAN_RESPONSE = 1; -} - -/// @deprecated Deprecated since 2.3.1 -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief Enumerations of the Bluetooth LE data type -/// that can be included in LE packets. -/// @since_tizen @if WEARABLE @else 2.3 @endif -abstract class bt_adapter_le_packet_data_type_e { - /// < Complete list of 16 bit UUIDs - static const int - BT_ADAPTER_LE_PACKET_DATA_COMP_LIST_16_BIT_SERVICE_CLASS_UUIDS = 3; - - /// title; - - /// < Artist - external ffi.Pointer artist; - - /// < Album name - external ffi.Pointer album; - - /// < Album Genre - external ffi.Pointer genre; - - /// < The total number of tracks - @ffi.UnsignedInt() - external int total_tracks; - - /// < Track number - @ffi.UnsignedInt() - external int number; - - /// < Duration - @ffi.UnsignedInt() - external int duration; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_HDP_MODULE -/// @brief Enumerations for the data channel type -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_hdp_channel_type_e { - /// < Reliable Data Channel - static const int BT_HDP_CHANNEL_TYPE_RELIABLE = 1; - - /// < Streaming Data Channel - static const int BT_HDP_CHANNEL_TYPE_STREAMING = 2; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE -/// @brief Enumerations of the integer type for GATT handle's value. -/// @since_tizen 2.3.1 -abstract class bt_data_type_int_e { - /// < 8 bit signed int type - static const int BT_DATA_TYPE_SINT8 = 0; - - /// < 16 bit signed int type - static const int BT_DATA_TYPE_SINT16 = 1; - - /// < 32 bit signed int type - static const int BT_DATA_TYPE_SINT32 = 2; - - /// < 8 bit unsigned int type - static const int BT_DATA_TYPE_UINT8 = 3; - - /// < 16 bit unsigned int type - static const int BT_DATA_TYPE_UINT16 = 4; - - /// < 32 bit unsigned int type - static const int BT_DATA_TYPE_UINT32 = 5; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE -/// @brief Enumerations of the float type for GATT handle's value. -/// @since_tizen 2.3.1 -abstract class bt_data_type_float_e { - /// < 32 bit float type - static const int BT_DATA_TYPE_FLOAT = 0; - - /// < 16 bit float type - static const int BT_DATA_TYPE_SFLOAT = 1; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE -/// @brief Enumerations of the write type. -/// @since_tizen 2.3.1 -abstract class bt_gatt_write_type_e { - /// < Write without response type - static const int BT_GATT_WRITE_TYPE_WRITE_NO_RESPONSE = 0; - - /// < Write type - static const int BT_GATT_WRITE_TYPE_WRITE = 1; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE -/// @brief Enumerations of the GATT handle's type. -/// @since_tizen 2.3.1 -abstract class bt_gatt_type_e { - /// < GATT service type - static const int BT_GATT_TYPE_SERVICE = 1; - static const int BT_GATT_TYPE_CHARACTERISTIC = 2; - - /// GATT characteristic type - static const int BT_GATT_TYPE_DESCRIPTOR = 3; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE -/// @brief Enumerations of the service type. -/// @since_tizen 2.3.1 -abstract class bt_gatt_service_type_e { - /// < GATT primary service type - static const int BT_GATT_SERVICE_TYPE_PRIMARY = 1; - - /// < GATT secondary service type - static const int BT_GATT_SERVICE_TYPE_SECONDARY = 2; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE -/// @brief Enumerations of the characteristic's property. -/// @since_tizen 2.3.1 -abstract class bt_gatt_property_e { - /// < Broadcast property - static const int BT_GATT_PROPERTY_BROADCAST = 1; - - /// < Read property - static const int BT_GATT_PROPERTY_READ = 2; - - /// < Write without response property - static const int BT_GATT_PROPERTY_WRITE_WITHOUT_RESPONSE = 4; - - /// < Write property - static const int BT_GATT_PROPERTY_WRITE = 8; - - /// < Notify property - static const int BT_GATT_PROPERTY_NOTIFY = 16; - - /// < Indicate property - static const int BT_GATT_PROPERTY_INDICATE = 32; - - /// < Authenticated signed writes property - static const int BT_GATT_PROPERTY_AUTHENTICATED_SIGNED_WRITES = 64; - - /// < Extended properties - static const int BT_GATT_PROPERTY_EXTENDED_PROPERTIES = 128; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE -/// @brief Enumerations of gatt server's service changing mode. -/// @since_tizen 3.0 -abstract class bt_gatt_client_service_change_type_e { - /// < Service added - static const int BT_GATT_CLIENT_SERVICE_ADDED = 0; - - /// < Service removed - static const int BT_GATT_CLIENT_SERVICE_REMOVED = 1; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE -/// @brief Enumerations of the attribute's permission. -/// @since_tizen 3.0 -abstract class bt_gatt_permission_e { - /// < Readable permission - static const int BT_GATT_PERMISSION_READ = 1; - - /// < Writable permission - static const int BT_GATT_PERMISSION_WRITE = 2; - - /// < Readable permission required encryption - static const int BT_GATT_PERMISSION_ENCRYPT_READ = 4; - - /// < Writable permission required encryption - static const int BT_GATT_PERMISSION_ENCRYPT_WRITE = 8; - - /// < Readable permission required encryption and authentication - static const int BT_GATT_PERMISSION_ENCRYPT_AUTHENTICATED_READ = 16; - - /// < Writable permission required encryption and authentication - static const int BT_GATT_PERMISSION_ENCRYPT_AUTHENTICATED_WRITE = 32; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE -/// @brief Enumerations of the remote device request types for attributes -/// @since_tizen 3.0 -abstract class bt_gatt_att_request_type_e { - static const int BT_GATT_REQUEST_TYPE_READ = 0; - static const int BT_GATT_REQUEST_TYPE_WRITE = 1; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_PAN_PANU_MODULE -/// @brief Enumerations for the types of PAN(Personal Area Networking) service. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_panu_service_type_e { - /// < Network Access Point - static const int BT_PANU_SERVICE_TYPE_NAP = 0; -} - -/// @WEARABLE_ONLY -/// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE -/// @brief Enumeration of address book location for PBAP. -/// @since_tizen 3.0 -abstract class bt_pbap_address_book_source_e { - /// < Request for Addressbook from remote device - static const int BT_PBAP_SOURCE_DEVICE = 0; - - /// < Request for address book from SIM - static const int BT_PBAP_SOURCE_SIM = 1; -} - -/// @WEARABLE_ONLY -/// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE -/// @brief Enumeration of folder type. -/// @since_tizen 3.0 -abstract class bt_pbap_folder_type_e { - /// < Request for address book - static const int BT_PBAP_FOLDER_PHONE_BOOK = 0; - - /// < Request for incoming calls - static const int BT_PBAP_FOLDER_INCOMING = 1; - - /// < Request for outgoing calls - static const int BT_PBAP_FOLDER_OUTGOING = 2; - - /// < Request for missed calls - static const int BT_PBAP_FOLDER_MISSED = 3; - - /// < Request for combined calls - static const int BT_PBAP_FOLDER_COMBINED = 4; -} - -/// @WEARABLE_ONLY -/// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE -/// @brief Enumeration of phone book search fields. -/// @since_tizen 3.0 -abstract class bt_pbap_search_field_e { - /// < Request for search by name (default) - static const int BT_PBAP_SEARCH_NAME = 0; - - /// < Request for search by phone number - static const int BT_PBAP_SEARCH_NUMBER = 1; - - /// < Request for search by sound - static const int BT_PBAP_SEARCH_SOUND = 2; -} - -/// @WEARABLE_ONLY -/// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE -/// @brief Enumeration of vCard Formats. -/// @since_tizen 3.0 -abstract class bt_pbap_vcard_format_e { - /// < vCard format 2.1 (default) - static const int BT_PBAP_VCARD_FORMAT_VCARD21 = 0; - - /// < vCard format 3.0 - static const int BT_PBAP_VCARD_FORMAT_VCARD30 = 1; -} - -/// @WEARABLE_ONLY -/// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE -/// @brief Enumeration of sorting orders. -/// @since_tizen 3.0 -abstract class bt_pbap_sort_order_e { - /// < Filter order indexed (default) - static const int BT_PBAP_ORDER_INDEXED = 0; - - /// < Filter order alphanumeric - static const int BT_PBAP_ORDER_ALPHANUMERIC = 1; - - /// < Filter order phonetic - static const int BT_PBAP_ORDER_PHONETIC = 2; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Class structure of device and service. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @see #bt_device_info_s -/// @see #bt_adapter_device_discovery_info_s -/// @see bt_device_bond_created_cb() -/// @see bt_adapter_device_discovery_state_changed_cb() -final class bt_class_s extends ffi.Struct { - /// < Major device class. - @ffi.Int32() - external int major_device_class; - - /// < Minor device class. - @ffi.Int32() - external int minor_device_class; - - /// < Major service class mask. - /// This value can be a combination of #bt_major_service_class_e like #BT_MAJOR_SERVICE_CLASS_RENDERING | #BT_MAJOR_SERVICE_CLASS_AUDIO - @ffi.Int() - external int major_service_class_mask; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE -/// @brief Structure of device discovery information. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @see #bt_class_s -/// @see bt_adapter_device_discovery_state_changed_cb() -final class bt_adapter_device_discovery_info_s extends ffi.Struct { - /// < The address of remote device - external ffi.Pointer remote_address; - - /// < The name of remote device - external ffi.Pointer remote_name; - - /// < The Bluetooth classes - external bt_class_s bt_class; - - /// < The strength indicator of received signal - @ffi.Int() - external int rssi; - - /// < The bonding state - @ffi.Bool() - external bool is_bonded; - - /// < The UUID list of service - external ffi.Pointer> service_uuid; - - /// < The number of services - @ffi.Int() - external int service_count; - - /// < The Bluetooth appearance - @ffi.Int32() - external int appearance; - - /// < manufacturer specific data length - @ffi.Int() - external int manufacturer_data_len; - - /// < manufacturer specific data - external ffi.Pointer manufacturer_data; -} - -/// @deprecated Deprecated since 2.3.1 -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief Structure of le device discovery information. -/// @since_tizen @if WEARABLE @else 2.3 @endif -/// -/// @see #bt_class_s -/// @see bt_adapter_le_device_discovery_state_changed_cb() -final class bt_adapter_le_device_discovery_info_s extends ffi.Struct { - /// < The address of remote device - external ffi.Pointer remote_address; - - /// < The address type of remote device - @ffi.Int() - external int address_type; - - /// < The strength indicator of received signal - @ffi.Int() - external int rssi; - - /// < advertising indication data length - @ffi.Int() - external int adv_data_len; - - /// < advertising indication data - external ffi.Pointer adv_data; - - /// < scan response data length - @ffi.Int() - external int scan_data_len; - - /// < scan response data - external ffi.Pointer scan_data; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief Structure of le scan result information. -/// @since_tizen 2.3.1 -/// -/// @see bt_adapter_le_start_scan() -final class bt_adapter_le_device_scan_result_info_s extends ffi.Struct { - /// < The address of remote device - external ffi.Pointer remote_address; - - /// < The address type of remote device - @ffi.Int32() - external int address_type; - - /// < The strength indicator of received signal - @ffi.Int() - external int rssi; - - /// < advertising indication data length - @ffi.Int() - external int adv_data_len; - - /// < advertising indication data - external ffi.Pointer adv_data; - - /// < scan response data length - @ffi.Int() - external int scan_data_len; - - /// < scan response data - external ffi.Pointer scan_data; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief The structure for LE iBeacon scan result information. -/// @since_tizen 4.0 -/// -/// @see bt_adapter_le_start_scan() -final class bt_adapter_le_ibeacon_scan_result_info_s extends ffi.Struct { - /// < Company ID - @ffi.Int() - external int company_id; - - /// < iBeacon type - @ffi.Int() - external int ibeacon_type; - - /// < UUID - external ffi.Pointer uuid; - - /// < Major ID - @ffi.Int() - external int major_id; - - /// < Minor ID - @ffi.Int() - external int minor_id; - - /// < Measured power - @ffi.Int() - external int measured_power; -} - -/// @deprecated Deprecated since 2.3.1 -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief Structure of advertising parameters. -/// @since_tizen @if WEARABLE @else 2.3 @endif -/// -/// @see bt_adapter_le_advertising_state_changed_cb() -/// @see bt_adapter_le_start_advertising() -final class bt_adapter_le_advertising_params_s extends ffi.Struct { - /// < Minimum advertising interval for non-directed advertising. - /// A multiple of 0.625ms is only allowed (Time range : 20ms to 10.24sec). - @ffi.Float() - external double interval_min; - - /// < Maximum advertising interval for non-directed advertising. - /// A multiple of 0.625ms is only allowed (Time range : 20ms to 10.24sec). - @ffi.Float() - external double interval_max; - - @ffi.Char() - external int filter_policy; - - @ffi.Char() - external int type; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief LE service data structure. -/// @since_tizen 2.3.1 -/// -/// @see bt_adapter_le_get_scan_result_service_data() -final class bt_adapter_le_service_data_s extends ffi.Struct { - /// < 16 bit UUID of the service data - external ffi.Pointer service_uuid; - - /// < Service data - external ffi.Pointer service_data; - - /// < Service data length - @ffi.Int() - external int service_data_len; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Device information structure used for identifying pear device. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @see #bt_class_s -/// @see bt_device_bond_created_cb() -final class bt_device_info_s extends ffi.Struct { - /// < The address of remote device - external ffi.Pointer remote_address; - - /// < The name of remote device - external ffi.Pointer remote_name; - - /// < The Bluetooth classes - external bt_class_s bt_class; - - /// < The UUID list of service - external ffi.Pointer> service_uuid; - - /// < The number of services - @ffi.Int() - external int service_count; - - /// < The bonding state - @ffi.Bool() - external bool is_bonded; - - /// < The connection state - @ffi.Bool() - external bool is_connected; - - /// < The authorization state - @ffi.Bool() - external bool is_authorized; - - /// < manufacturer specific data length - @ffi.Int() - external int manufacturer_data_len; - - /// < manufacturer specific data - external ffi.Pointer manufacturer_data; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Service Discovery Protocol (SDP) data structure. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @details This protocol is used for discovering available services or pear device, -/// and finding one to connect with. -/// -/// @see bt_device_service_searched_cb() -final class bt_device_sdp_info_s extends ffi.Struct { - /// < The address of remote device - external ffi.Pointer remote_address; - - /// < The UUID list of service - external ffi.Pointer> service_uuid; - - /// < The number of services. - @ffi.Int() - external int service_count; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Device connection information structure. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @see bt_device_connection_state_changed_cb() -final class bt_device_connection_info_s extends ffi.Struct { - /// < The address of remote device - external ffi.Pointer remote_address; - - /// < Link type - @ffi.Int32() - external int link; - - /// < Disconnection reason - @ffi.Int32() - external int disconn_reason; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE -/// @brief Rfcomm connection data used for exchanging data between Bluetooth devices. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @see bt_socket_connection_state_changed_cb() -final class bt_socket_connection_s extends ffi.Struct { - /// < The file descriptor of connected socket - @ffi.Int() - external int socket_fd; - - /// < The file descriptor of the server socket or -1 for client connection - @ffi.Int() - external int server_fd; - - /// < The local device role in this connection - @ffi.Int32() - external int local_role; - - /// < The remote device address - external ffi.Pointer remote_address; - - /// < The service UUId - external ffi.Pointer service_uuid; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE -/// @brief Structure of RFCOMM received data. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @remarks User can use standard linux functions for reading/writing -/// data from/to sockets. -/// -/// @see bt_socket_data_received_cb() -final class bt_socket_received_data_s extends ffi.Struct { - /// < The socket fd - @ffi.Int() - external int socket_fd; - - /// < The length of the received data - @ffi.Int() - external int data_size; - - /// < The received data - external ffi.Pointer data; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE -/// @brief Attribute protocol MTU change information structure. -/// @since_tizen 4.0 -/// -/// @see bt_gatt_client_att_mtu_changed_cb() -final class bt_gatt_client_att_mtu_info_s extends ffi.Struct { - /// < The address of remote device - external ffi.Pointer remote_address; - - /// < MTU value - @ffi.UnsignedInt() - external int mtu; - - /// < Request status - @ffi.UnsignedInt() - external int status; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE -/// @brief Enumerations of the Bluetooth HID mouse's button. -/// @since_tizen @if WEARABLE 3.0 @endif -abstract class bt_hid_mouse_button_e { - /// key; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE -/// @brief Enumerations of the Bluetooth HID header type. -/// @since_tizen @if WEARABLE 3.0 @endif -abstract class bt_hid_header_type_e { - /// < The Bluetooth HID header type: Handshake - static const int BT_HID_HEADER_HANDSHAKE = 0; - - /// < The Bluetooth HID header type: HID control - static const int BT_HID_HEADER_HID_CONTROL = 1; - - /// < The Bluetooth HID header type: Get report - static const int BT_HID_HEADER_GET_REPORT = 2; - - /// < The Bluetooth HID header type: Set report - static const int BT_HID_HEADER_SET_REPORT = 3; - - /// < The Bluetooth HID header type: Get protocol - static const int BT_HID_HEADER_GET_PROTOCOL = 4; - - /// < The Bluetooth HID header type: Set protocol - static const int BT_HID_HEADER_SET_PROTOCOL = 5; - - /// < The Bluetooth HID header type: Data - static const int BT_HID_HEADER_DATA = 6; - - /// < The Bluetooth HID header type: Unknown - static const int BT_HID_HEADER_UNKNOWN = 7; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE -/// @brief Enumerations of the Bluetooth HID parameter type. -/// @since_tizen @if WEARABLE 3.0 @endif -abstract class bt_hid_param_type_e { - /// < Parameter type: Input - static const int BT_HID_PARAM_DATA_RTYPE_INPUT = 0; - - /// < Parameter type: Output - static const int BT_HID_PARAM_DATA_RTYPE_OUTPUT = 1; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE -/// @brief Enumerations of the Bluetooth HID handshake type. -/// @since_tizen @if WEARABLE 3.0 @endif -abstract class bt_hid_handshake_type_e { - /// < Handshake error code none - static const int BT_HID_HANDSHAKE_SUCCESSFUL = 0; - - /// < Handshake error code Not Ready - static const int BT_HID_HANDSHAKE_NOT_READY = 1; - - /// < Handshake error code send invalid report id - static const int BT_HID_HANDSHAKE_ERR_INVALID_REPORT_ID = 2; - - /// < Handshake error code request unsupported request - static const int BT_HID_HANDSHAKE_ERR_UNSUPPORTED_REQUEST = 3; - - /// < Handshake error code received invalid parameter - static const int BT_HID_HANDSHAKE_ERR_INVALID_PARAMETER = 4; - - /// < unknown error - static const int BT_HID_HANDSHAKE_ERR_UNKNOWN = 14; - - /// < Fatal error - static const int BT_HID_HANDSHAKE_ERR_FATAL = 15; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE -/// @brief The structure type containing data received from the HID Host. -/// @since_tizen @if WEARABLE 3.0 @endif -final class bt_hid_device_received_data_s extends ffi.Struct { - /// < The remote device's address - external ffi.Pointer address; - - /// < The header type - @ffi.Int32() - external int header_type; - - /// < The parameter type - @ffi.Int32() - external int param_type; - - /// < The length of the received data - @ffi.Int() - external int data_size; - - /// < The received data - external ffi.Pointer data; -} - -/// @WEARABLE_ONLY -/// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE -/// @brief The structure type containing vCard information. -/// @since_tizen 3.0 -/// -/// @see bt_pbap_client_pull_vcard() -final class bt_pbap_vcard_info_s extends ffi.Struct { - /// < The vcard index, used as a parameter for bt_pbap_client_pull_vcard() - @ffi.Int() - external int index; - - /// < The contact name of the vCard - external ffi.Pointer contact_name; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief Enumeration for the scan filter type. -/// @since_tizen 4.0 -/// @see bt_adapter_le_scan_filter_set_type() -abstract class bt_adapter_le_scan_filter_type_e { - /// < iBeacon filter type - static const int BT_ADAPTER_LE_SCAN_FILTER_TYPE_IBEACON = 0; - - /// < Proximity UUID filter type - static const int BT_ADAPTER_LE_SCAN_FILTER_TYPE_PROXIMITY_UUID = 1; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE -/// @brief Called when you get bonded devices repeatedly. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] device_info The bonded device information -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// \n @c false to break out of the loop. -/// @pre bt_adapter_foreach_bonded_device() will invoke this function. -/// -/// @see bt_adapter_foreach_bonded_device() -typedef bt_adapter_bonded_device_cb - = ffi.Pointer>; -typedef bt_adapter_bonded_device_cbFunction = ffi.Bool Function( - ffi.Pointer device_info, ffi.Pointer user_data); -typedef Dartbt_adapter_bonded_device_cbFunction = bool Function( - ffi.Pointer device_info, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE -/// @brief Called when the Bluetooth adapter state changes. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] result The result of the adapter state changing -/// @param[in] adapter_state The adapter state to be changed -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_adapter_set_state_changed_cb() -/// @see bt_adapter_unset_state_changed_cb() -typedef bt_adapter_state_changed_cb - = ffi.Pointer>; -typedef bt_adapter_state_changed_cbFunction = ffi.Void Function( - ffi.Int result, ffi.Int32 adapter_state, ffi.Pointer user_data); -typedef Dartbt_adapter_state_changed_cbFunction = void Function( - int result, int adapter_state, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE -/// @brief Called when adapter name changes. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] device_name The name of the Bluetooth device to be changed -/// @param[in] user_data The user data passed from the callback registration function -/// @pre This function will be invoked when the name of Bluetooth adapter changes -/// if you register this callback using bt_adapter_set_name_changed_cb(). -/// @see bt_adapter_set_name() -/// @see bt_adapter_set_name_changed_cb() -/// @see bt_adapter_unset_name_changed_cb() -typedef bt_adapter_name_changed_cb - = ffi.Pointer>; -typedef bt_adapter_name_changed_cbFunction = ffi.Void Function( - ffi.Pointer device_name, ffi.Pointer user_data); -typedef Dartbt_adapter_name_changed_cbFunction = void Function( - ffi.Pointer device_name, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE -/// @brief Called when the visibility mode changes. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] result The result of the visibility mode changing -/// @param[in] visibility_mode The visibility mode to be changed -/// @param[in] user_data The user data passed from the callback registration function -/// -/// @pre This function will be invoked when the visibility of Bluetooth adapter changes -/// if you register this callback using bt_adapter_set_visibility_mode_changed_cb(). -/// -/// @see bt_adapter_set_visibility_mode_changed_cb() -/// @see bt_adapter_unset_visibility_mode_changed_cb() -typedef bt_adapter_visibility_mode_changed_cb = ffi - .Pointer>; -typedef bt_adapter_visibility_mode_changed_cbFunction = ffi.Void Function( - ffi.Int result, ffi.Int32 visibility_mode, ffi.Pointer user_data); -typedef Dartbt_adapter_visibility_mode_changed_cbFunction = void Function( - int result, int visibility_mode, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE -/// @brief Called every second until the visibility mode is changed to #BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @remarks This callback function is called only if visibility mode is #BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE. -/// @param[in] duration The duration until the visibility mode is changed to #BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE (in seconds) -/// @param[in] user_data The user data passed from the callback registration function -/// @pre This function will be invoked if you register this callback using bt_adapter_set_visibility_duration_changed_cb(). -/// @see bt_adapter_set_visibility_duration_changed_cb() -/// @see bt_adapter_unset_visibility_duration_changed_cb() -typedef bt_adapter_visibility_duration_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef bt_adapter_visibility_duration_changed_cbFunction = ffi.Void Function( - ffi.Int duration, ffi.Pointer user_data); -typedef Dartbt_adapter_visibility_duration_changed_cbFunction = void Function( - int duration, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE -/// @brief Called when the state of device discovery changes. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @remarks If \a discovery_state is #BT_ADAPTER_DEVICE_DISCOVERY_FOUND, -/// then you can get some information, such as remote device address, remote device name, rssi, and bonding state. -/// -/// @param[in] result The result of the device discovery -/// @param[in] discovery_state The discovery state to be changed -/// @param[in] discovery_info The information of the discovered device \n -/// If \a discovery_state is #BT_ADAPTER_DEVICE_DISCOVERY_STARTED or -/// #BT_ADAPTER_DEVICE_DISCOVERY_FINISHED, then \a discovery_info is NULL. -/// @param[in] user_data The user data passed from the callback registration function -/// -/// @pre Either bt_adapter_start_device_discovery() or bt_adapter_stop_device_discovery() will invoke this function -/// if you register this callback using bt_adapter_set_device_discovery_state_changed_cb(). -/// -/// @see bt_adapter_start_device_discovery() -/// @see bt_adapter_stop_device_discovery() -/// @see bt_adapter_set_device_discovery_state_changed_cb() -/// @see bt_adapter_unset_device_discovery_state_changed_cb() -typedef bt_adapter_device_discovery_state_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef bt_adapter_device_discovery_state_changed_cbFunction - = ffi.Void Function( - ffi.Int result, - ffi.Int32 discovery_state, - ffi.Pointer discovery_info, - ffi.Pointer user_data); -typedef Dartbt_adapter_device_discovery_state_changed_cbFunction - = void Function( - int result, - int discovery_state, - ffi.Pointer discovery_info, - ffi.Pointer user_data); - -/// @deprecated Deprecated since 2.3.1 -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief Called when the state of LE device discovery changes. -/// @since_tizen @if WEARABLE @else 2.3 @endif -/// -/// @remarks If \a discovery_state is #BT_ADAPTER_LE_DEVICE_DISCOVERY_FOUND, -/// then you can get some information, such as remote LE device address, remote device name, rssi, and bonding state. -/// -/// @param[in] result The result of the LE device discovery -/// @param[in] discovery_state The discovery state to be changed -/// @param[in] discovery_info The information of the discovered LE device \n -/// If \a discovery_state is #BT_ADAPTER_LE_DEVICE_DISCOVERY_STARTED or -/// #BT_ADAPTER_LE_DEVICE_DISCOVERY_FINISHED, then \a discovery_info is NULL. -/// @param[in] user_data The user data passed from the callback registration function -/// -/// @pre Either bt_adapter_start_device_discovery() or bt_adapter_stop_device_discovery() will invoke this function -/// if you register this callback using bt_adapter_set_device_discovery_state_changed_cb(). -/// -/// @see bt_adapter_le_start_device_discovery() -/// @see bt_adapter_le_stop_device_discovery() -/// @see bt_adapter_le_set_device_discovery_state_changed_cb() -/// @see bt_adapter_le_unset_device_discovery_state_changed_cb() -typedef bt_adapter_le_device_discovery_state_changed_cb = ffi.Pointer< - ffi - .NativeFunction>; -typedef bt_adapter_le_device_discovery_state_changed_cbFunction - = ffi.Void Function( - ffi.Int result, - ffi.Int32 discovery_state, - ffi.Pointer discovery_info, - ffi.Pointer user_data); -typedef Dartbt_adapter_le_device_discovery_state_changed_cbFunction - = void Function( - int result, - int discovery_state, - ffi.Pointer discovery_info, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief Called when the LE advertisement has been found. -/// @since_tizen 2.3.1 -/// -/// @param[in] result The result of the LE scan -/// @param[in] info The information of the found LE advertisement. -/// @param[in] user_data The user data passed from the start function -/// -/// @see bt_adapter_le_start_scan() -typedef bt_adapter_le_scan_result_cb - = ffi.Pointer>; -typedef bt_adapter_le_scan_result_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Pointer info, - ffi.Pointer user_data); -typedef Dartbt_adapter_le_scan_result_cbFunction = void Function( - int result, - ffi.Pointer info, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief The handle to control Bluetooth LE advertising. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -typedef bt_advertiser_h = ffi.Pointer; - -/// @ingroup CAPI_NETWORK_BLUETOOTH_IPSP_MODULE -/// @brief Called when the IPSP initialization state changes. -/// @since_tizen 4.0 -/// @param[in] result The result of the initialization or deinitialization request -/// @param[in] ipsp_initialized The initialized state: (@c true = initialized, @c false = deinitialized) -/// @param[in] user_data The user data passed from the initialization request function -/// @see bt_ipsp_initialize() -/// @see bt_ipsp_deinitialize() -typedef bt_ipsp_init_state_changed_cb - = ffi.Pointer>; -typedef bt_ipsp_init_state_changed_cbFunction = ffi.Void Function( - ffi.Int result, ffi.Bool ipsp_initialized, ffi.Pointer user_data); -typedef Dartbt_ipsp_init_state_changed_cbFunction = void Function( - int result, bool ipsp_initialized, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_IPSP_MODULE -/// @brief Called when the IPSP connection state changes. -/// @since_tizen 4.0 -/// @param[in] result The result of the connection or disconnection request -/// @param[in] connected The connection status: (@c true = connected, @c false = disconnected) -/// @param[in] remote_address Address of remote device -/// @param[in] iface_name The network interface name for IPv6 network interface -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_ipsp_connect() -/// @see bt_ipsp_disconnect() -typedef bt_ipsp_connection_state_changed_cb = ffi - .Pointer>; -typedef bt_ipsp_connection_state_changed_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Bool connected, - ffi.Pointer remote_address, - ffi.Pointer iface_name, - ffi.Pointer user_data); -typedef Dartbt_ipsp_connection_state_changed_cbFunction = void Function( - int result, - bool connected, - ffi.Pointer remote_address, - ffi.Pointer iface_name, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief Called when the state of advertiser changes. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[out] result The result of the requested state change of advertiser -/// @param[out] advertiser The handle of the state changed advertiser -/// @param[out] adv_state The advertiser state to be changed -/// @param[out] user_data The user data passed from the start function -/// -/// @see bt_adapter_le_start_advertising_new() -/// @see bt_adapter_le_stop_advertising() -typedef bt_adapter_le_advertising_state_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef bt_adapter_le_advertising_state_changed_cbFunction = ffi.Void Function( - ffi.Int result, - bt_advertiser_h advertiser, - ffi.Int32 adv_state, - ffi.Pointer user_data); -typedef Dartbt_adapter_le_advertising_state_changed_cbFunction = void Function( - int result, - bt_advertiser_h advertiser, - int adv_state, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Called when you get connected profiles repeatedly. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] profile The connected Bluetooth profile -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// \n @c false to break out of the loop. -/// @pre bt_device_foreach_connected_profiles() will invoke this function. -/// @see bt_device_foreach_connected_profiles() -typedef bt_device_connected_profile - = ffi.Pointer>; -typedef bt_device_connected_profileFunction = ffi.Bool Function( - ffi.Int32 profile, ffi.Pointer user_data); -typedef Dartbt_device_connected_profileFunction = bool Function( - int profile, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Called when the process of creating bond finishes. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @remarks If the remote user does not respond within 60 seconds, a time out will happen with #BT_ERROR_TIMED_OUT result code.\n -/// If bt_device_cancel_bonding() is called and it returns #BT_ERROR_NONE, then this callback function will be called -/// with #BT_ERROR_CANCELLED result. \n -/// If creating a bond succeeds but service search fails, then this callback will be called with #BT_ERROR_SERVICE_SEARCH_FAILED. -/// In this case, you should try service search again by bt_device_start_service_search() to get the supported service list. -/// -/// @param[in] result The result of the bonding device -/// @param[in] device_info The device information which you creates bond with -/// @param[in] user_data The user data passed from the callback registration function -/// -/// @pre Either bt_device_create_bond() will invoke this function -/// if you register this callback using bt_device_set_bond_created_cb(). -/// -/// @see bt_device_create_bond() -/// @see bt_device_cancel_bonding() -/// @see bt_device_set_bond_created_cb() -/// @see bt_device_unset_bond_created_cb() -typedef bt_device_bond_created_cb - = ffi.Pointer>; -typedef bt_device_bond_created_cbFunction = ffi.Void Function(ffi.Int result, - ffi.Pointer device_info, ffi.Pointer user_data); -typedef Dartbt_device_bond_created_cbFunction = void Function(int result, - ffi.Pointer device_info, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Called when the bond destroys. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] result The result that a bond is destroyed -/// @param[in] remote_address The address of the remote Bluetooth device to destroy bond with -/// @param[in] user_data The user data passed from the callback registration function -/// @pre bt_device_destroy_bond() will invoke this function -/// if you register this callback using bt_device_set_bond_destroyed_cb(). -/// -/// @see bt_device_destroy_bond() -/// @see bt_device_set_bond_destroyed_cb() -/// @see bt_device_unset_bond_destroyed_cb() -typedef bt_device_bond_destroyed_cb - = ffi.Pointer>; -typedef bt_device_bond_destroyed_cbFunction = ffi.Void Function(ffi.Int result, - ffi.Pointer remote_address, ffi.Pointer user_data); -typedef Dartbt_device_bond_destroyed_cbFunction = void Function(int result, - ffi.Pointer remote_address, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Called when the authorization of device changes. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] authorization The authorization of device -/// @param[in] remote_address The address of the remote Bluetooth device which is (un)authorized -/// @param[in] user_data The user data passed from the callback registration function -/// @pre bt_device_set_authorization() will invoke this function if you register this callback using bt_device_set_authorization_changed_cb(). -/// -/// @see bt_device_set_authorization() -/// @see #bt_device_set_authorization_changed_cb() -/// @see #bt_device_unset_authorization_changed_cb() -typedef bt_device_authorization_changed_cb = ffi - .Pointer>; -typedef bt_device_authorization_changed_cbFunction = ffi.Void Function( - ffi.Int32 authorization, - ffi.Pointer remote_address, - ffi.Pointer user_data); -typedef Dartbt_device_authorization_changed_cbFunction = void Function( - int authorization, - ffi.Pointer remote_address, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Called when the process of service search finishes. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @remark -/// -/// @param[in] result The result of the service searching -/// @param[in] sdp_info The structure of service lists found on a device -/// @param[in] user_data The user data passed from the callback registration function -/// @pre Either bt_device_start_service_search() will invoke this function -/// if you register this callback using bt_device_set_service_searched_cb(). -/// -/// @see bt_device_start_service_search() -/// @see bt_device_set_service_searched_cb() -/// @see bt_device_unset_service_searched_cb() -typedef bt_device_service_searched_cb - = ffi.Pointer>; -typedef bt_device_service_searched_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Pointer sdp_info, - ffi.Pointer user_data); -typedef Dartbt_device_service_searched_cbFunction = void Function( - int result, - ffi.Pointer sdp_info, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Called when the connection state is changed. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] connected The connection status: (@c true = connected, @c false = disconnected) -/// @param[in] conn_info The connection information -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_device_set_connection_state_changed_cb() -/// @see bt_device_unset_connection_state_changed_cb() -typedef bt_device_connection_state_changed_cb = ffi - .Pointer>; -typedef bt_device_connection_state_changed_cbFunction = ffi.Void Function( - ffi.Bool connected, - ffi.Pointer conn_info, - ffi.Pointer user_data); -typedef Dartbt_device_connection_state_changed_cbFunction = void Function( - bool connected, - ffi.Pointer conn_info, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE -/// @brief Called when you receive data. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] data The received data from the remote device -/// @param[in] user_data The user data passed from the callback registration function -/// -/// @pre When the connected remote Bluetooth device invokes bt_socket_send_data(), -/// this function will be invoked if you register this function using bt_socket_set_data_received_cb(). -/// -/// @see bt_socket_set_data_received_cb() -/// @see bt_socket_unset_data_received_cb() -/// @see bt_socket_send_data() -typedef bt_socket_data_received_cb - = ffi.Pointer>; -typedef bt_socket_data_received_cbFunction = ffi.Void Function( - ffi.Pointer data, - ffi.Pointer user_data); -typedef Dartbt_socket_data_received_cbFunction = void Function( - ffi.Pointer data, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE -/// @brief Called when a RFCOMM connection is requested. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] socket_fd The file descriptor of socket on which a connection is requested -/// @param[in] remote_address The address of remote device -/// @param[in] user_data The user data passed from the callback registration function -/// @pre If you register this callback function by bt_socket_set_connection_requested_cb(), -/// bt_socket_connection_requested_cb() will be invoked. -typedef bt_socket_connection_requested_cb = ffi - .Pointer>; -typedef bt_socket_connection_requested_cbFunction = ffi.Void Function( - ffi.Int socket_fd, - ffi.Pointer remote_address, - ffi.Pointer user_data); -typedef Dartbt_socket_connection_requested_cbFunction = void Function( - int socket_fd, - ffi.Pointer remote_address, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE -/// @brief Called when the socket connection state changes. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] result The result of connection state changing -/// @param[in] connection_state The connection state -/// @param[in] connection The connection information which is established or disconnected -/// @param[in] user_data The user data passed from the callback registration function -/// @pre Either bt_socket_connect_rfcomm() will invoke this function. -/// In addition, bt_socket_connection_state_changed_cb() will be invoked when the socket connection state is changed. -/// @see bt_socket_listen_and_accept_rfcomm() -/// @see bt_socket_connect_rfcomm() -/// @see bt_socket_set_connection_state_changed_cb() -/// @see bt_socket_unset_connection_state_changed_cb() -typedef bt_socket_connection_state_changed_cb = ffi - .Pointer>; -typedef bt_socket_connection_state_changed_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Int32 connection_state, - ffi.Pointer connection, - ffi.Pointer user_data); -typedef Dartbt_socket_connection_state_changed_cbFunction = void Function( - int result, - int connection_state, - ffi.Pointer connection, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_SERVER_MODULE -/// @brief Called when an OPP connection is requested. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @details You must call bt_opp_server_accept_connection() if you want to accept. -/// Otherwise, you must call bt_opp_server_reject_connection(). -/// @param[in] remote_address The address of remote device -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_opp_server_accept() -/// @see bt_opp_server_reject() -typedef bt_opp_server_connection_requested_cb = ffi - .Pointer>; -typedef bt_opp_server_connection_requested_cbFunction = ffi.Void Function( - ffi.Pointer remote_address, ffi.Pointer user_data); -typedef Dartbt_opp_server_connection_requested_cbFunction = void Function( - ffi.Pointer remote_address, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_SERVER_MODULE -/// @brief Called when a file is being transferred. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] file The path of file to be pushed -/// @param[in] size The file size (bytes) -/// @param[in] percent The progress in percentage (1 ~ 100) -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_opp_server_accept() -/// @see bt_opp_server_accept_connection() -typedef bt_opp_server_transfer_progress_cb = ffi - .Pointer>; -typedef bt_opp_server_transfer_progress_cbFunction = ffi.Void Function( - ffi.Pointer file, - ffi.LongLong size, - ffi.Int percent, - ffi.Pointer user_data); -typedef Dartbt_opp_server_transfer_progress_cbFunction = void Function( - ffi.Pointer file, - int size, - int percent, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_SERVER_MODULE -/// @brief Called when a transfer is finished. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] error_code The result of push -/// @param[in] file The path of file to be pushed -/// @param[in] size The file size (bytes) -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_opp_server_accept() -/// @see bt_opp_server_accept_connection() -typedef bt_opp_server_transfer_finished_cb = ffi - .Pointer>; -typedef bt_opp_server_transfer_finished_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Pointer file, - ffi.LongLong size, - ffi.Pointer user_data); -typedef Dartbt_opp_server_transfer_finished_cbFunction = void Function( - int result, - ffi.Pointer file, - int size, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_CLIENT_MODULE -/// @brief Called when OPP server responds to the push request. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] result The result of OPP server response -/// @param[in] remote_address The remote address -/// @param[in] user_data The user data passed from the callback registration function -/// @pre bt_opp_client_push_files() will invoke this function. -/// @see bt_opp_client_push_files() -typedef bt_opp_client_push_responded_cb - = ffi.Pointer>; -typedef bt_opp_client_push_responded_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Pointer remote_address, - ffi.Pointer user_data); -typedef Dartbt_opp_client_push_responded_cbFunction = void Function(int result, - ffi.Pointer remote_address, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_CLIENT_MODULE -/// @brief Called when each file is being transferred. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] file The path of file to be pushed -/// @param[in] size The file size (bytes) -/// @param[in] percent The progress in percentage (1 ~ 100). 100 means that a file is transferred completely. -/// @param[in] user_data The user data passed from the callback registration function -/// @pre bt_opp_client_push_files() will invoke this function. -/// @see bt_opp_client_push_files() -typedef bt_opp_client_push_progress_cb - = ffi.Pointer>; -typedef bt_opp_client_push_progress_cbFunction = ffi.Void Function( - ffi.Pointer file, - ffi.LongLong size, - ffi.Int percent, - ffi.Pointer user_data); -typedef Dartbt_opp_client_push_progress_cbFunction = void Function( - ffi.Pointer file, - int size, - int percent, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_CLIENT_MODULE -/// @brief Called when the push request is finished. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] result The result of the push request -/// @param[in] remote_address The remote address -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_opp_client_push_files() -typedef bt_opp_client_push_finished_cb - = ffi.Pointer>; -typedef bt_opp_client_push_finished_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Pointer remote_address, - ffi.Pointer user_data); -typedef Dartbt_opp_client_push_finished_cbFunction = void Function(int result, - ffi.Pointer remote_address, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_HID_MODULE -/// @brief Called when the connection state is changed. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @details This callback is called when the connection state is changed. -/// When you call bt_hid_host_connect() or bt_hid_host_disconnect(), this callback is also called with error result even though these functions fail. -/// @param[in] result The result of changing the connection state -/// @param[in] connected The state to be changed. @a true means connected state, Otherwise, @a false. -/// @param[in] remote_address The remote address -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_hid_host_connect() -/// @see bt_hid_host_disconnect() -typedef bt_hid_host_connection_state_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef bt_hid_host_connection_state_changed_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Bool connected, - ffi.Pointer remote_address, - ffi.Pointer user_data); -typedef Dartbt_hid_host_connection_state_changed_cbFunction = void Function( - int result, - bool connected, - ffi.Pointer remote_address, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE -/// @brief Called when the Bluetooth HID Device connection state changes. -/// @details The following error codes can be delivered: \n -/// #BT_ERROR_NONE \n -/// #BT_ERROR_OPERATION_FAILED \n -/// @since_tizen @if WEARABLE 3.0 @endif -/// -/// @param[in] result The result of changing the connection state. -/// @param[in] connected The requested state. @a true means the connection is enabled, @a false means the connection is disabled. -/// @param[in] remote_address The remote device's address -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_hid_device_activate() -typedef bt_hid_device_connection_state_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef bt_hid_device_connection_state_changed_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Bool connected, - ffi.Pointer remote_address, - ffi.Pointer user_data); -typedef Dartbt_hid_device_connection_state_changed_cbFunction = void Function( - int result, - bool connected, - ffi.Pointer remote_address, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE -/// @brief Called when the HID Device receives data from the HID Host. -/// @details The following error codes can be delivered: \n -/// #BT_ERROR_NONE \n -/// #BT_ERROR_OPERATION_FAILED \n -/// @since_tizen @if WEARABLE 3.0 @endif -/// -/// @param[in] data The data received from the HID Host. -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_hid_device_set_data_received_cb() -typedef bt_hid_device_data_received_cb - = ffi.Pointer>; -typedef bt_hid_device_data_received_cbFunction = ffi.Void Function( - ffi.Pointer data, - ffi.Pointer user_data); -typedef Dartbt_hid_device_data_received_cbFunction = void Function( - ffi.Pointer data, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE -/// @brief Called when the connection state is changed. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @details This callback is called when the connection state is changed. -/// When you call bt_audio_connect() or bt_audio_disconnect(), this callback is also called with error result even though these functions fail. -/// @param[in] result The result of changing the connection state -/// @param[in] connected The state to be changed. @a true means connected state, Otherwise, @a false. -/// @param[in] remote_address The remote address -/// @param[in] type The type of audio profile except #BT_AUDIO_PROFILE_TYPE_ALL -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_audio_set_connection_state_changed_cb() -/// @see bt_audio_unset_connection_state_changed_cb() -typedef bt_audio_connection_state_changed_cb = ffi - .Pointer>; -typedef bt_audio_connection_state_changed_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Bool connected, - ffi.Pointer remote_address, - ffi.Int32 type, - ffi.Pointer user_data); -typedef Dartbt_audio_connection_state_changed_cbFunction = void Function( - int result, - bool connected, - ffi.Pointer remote_address, - int type, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE -/// @brief Called when the connection state is changed. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] connected The state to be changed. @a true means connected state, Otherwise, @a false. -/// @param[in] remote_address The remote address -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_avrcp_target_initialize() -/// @see bt_avrcp_target_deinitialize() -typedef bt_avrcp_target_connection_state_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef bt_avrcp_target_connection_state_changed_cbFunction = ffi.Void Function( - ffi.Bool connected, - ffi.Pointer remote_address, - ffi.Pointer user_data); -typedef Dartbt_avrcp_target_connection_state_changed_cbFunction = void Function( - bool connected, - ffi.Pointer remote_address, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE -/// @brief Called when the equalizer state is changed by the remote control device. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] equalizer The equalizer state -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_avrcp_set_equalizer_state_changed_cb() -/// @see bt_avrcp_unset_equalizer_state_changed_cb() -typedef bt_avrcp_equalizer_state_changed_cb = ffi - .Pointer>; -typedef bt_avrcp_equalizer_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 equalizer, ffi.Pointer user_data); -typedef Dartbt_avrcp_equalizer_state_changed_cbFunction = void Function( - int equalizer, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE -/// @brief Called when the repeat mode is changed by the remote control device. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] repeat The repeat mode -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_avrcp_set_repeat_mode_changed_cb() -/// @see bt_avrcp_unset_repeat_mode_changed_cb() -typedef bt_avrcp_repeat_mode_changed_cb - = ffi.Pointer>; -typedef bt_avrcp_repeat_mode_changed_cbFunction = ffi.Void Function( - ffi.Int32 repeat, ffi.Pointer user_data); -typedef Dartbt_avrcp_repeat_mode_changed_cbFunction = void Function( - int repeat, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE -/// @brief Called when the shuffle mode is changed by the remote control device. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] shuffle The shuffle mode -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_avrcp_set_shuffle_mode_changed_cb() -/// @see bt_avrcp_unset_shuffle_mode_changed_cb() -typedef bt_avrcp_shuffle_mode_changed_cb - = ffi.Pointer>; -typedef bt_avrcp_shuffle_mode_changed_cbFunction = ffi.Void Function( - ffi.Int32 shuffle, ffi.Pointer user_data); -typedef Dartbt_avrcp_shuffle_mode_changed_cbFunction = void Function( - int shuffle, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE -/// @brief Called when the scan mode is changed by the remote control device. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] shuffle The shuffle mode -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_avrcp_set_scan_mode_changed_cb() -/// @see bt_avrcp_unset_scan_mode_changed_cb() -typedef bt_avrcp_scan_mode_changed_cb - = ffi.Pointer>; -typedef bt_avrcp_scan_mode_changed_cbFunction = ffi.Void Function( - ffi.Int32 scan, ffi.Pointer user_data); -typedef Dartbt_avrcp_scan_mode_changed_cbFunction = void Function( - int scan, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE -/// @brief Called when the Song position mode is changed by the remote target device. -/// @since_tizen 3.0 -/// @param[in] position Playback position in milliseconds. When position is 0 it means the track is starting and when it's greater than or equal to track's duration the track has ended. -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_avrcp_set_position_changed_cb() -/// @see bt_avrcp_unset_position_changed_cb() -typedef bt_avrcp_position_changed_cb - = ffi.Pointer>; -typedef bt_avrcp_position_changed_cbFunction = ffi.Void Function( - ffi.UnsignedInt position, ffi.Pointer user_data); -typedef Dartbt_avrcp_position_changed_cbFunction = void Function( - int position, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE -/// @brief Called when the Song Play status mode is changed by the remote target device. -/// @since_tizen 3.0 -/// @param[in] play_state The song play status -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_avrcp_set_play_status_changed_cb() -/// @see bt_avrcp_unset_play_status_changed_cb() -typedef bt_avrcp_play_status_changed_cb - = ffi.Pointer>; -typedef bt_avrcp_play_status_changed_cbFunction = ffi.Void Function( - ffi.Int32 play_state, ffi.Pointer user_data); -typedef Dartbt_avrcp_play_status_changed_cbFunction = void Function( - int play_state, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE -/// @brief Called when the Song metadata information is changed by the remote target device. -/// @since_tizen 3.0 -/// @param[in] track The song metadata information -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_avrcp_set_track_info_changed_cb() -/// @see bt_avrcp_unset_track_info_changed_cb() -typedef bt_avrcp_track_info_changed_cb - = ffi.Pointer>; -typedef bt_avrcp_track_info_changed_cbFunction = ffi.Void Function( - ffi.Pointer track, - ffi.Pointer user_data); -typedef Dartbt_avrcp_track_info_changed_cbFunction = void Function( - ffi.Pointer track, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE -/// @brief Called when the connection state is changed. -/// @since_tizen 3.0 -/// @param[in] connected The state to be changed. @a true means connected state, Otherwise, @a false. -/// @param[in] remote_address The remote address -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_avrcp_control_initialize() -/// @see bt_avrcp_control_deinitialize() -typedef bt_avrcp_control_connection_state_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef bt_avrcp_control_connection_state_changed_cbFunction - = ffi.Void Function(ffi.Bool connected, - ffi.Pointer remote_address, ffi.Pointer user_data); -typedef Dartbt_avrcp_control_connection_state_changed_cbFunction - = void Function(bool connected, ffi.Pointer remote_address, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_HDP_MODULE -/// @brief Called when the connection is established. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] result The result of connecting to the remote device -/// @param[in] remote_address The address of connected remote device -/// @param[in] app_id The ID of application -/// @param[in] type The type of HDP(Health Device Profile) channel -/// @param[in] channel The connected data channel -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_hdp_disconnected_cb -/// @see bt_hdp_set_connection_state_changed_cb() -/// @see bt_hdp_unset_connection_state_changed_cb() -typedef bt_hdp_connected_cb - = ffi.Pointer>; -typedef bt_hdp_connected_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Pointer remote_address, - ffi.Pointer app_id, - ffi.Int32 type, - ffi.UnsignedInt channel, - ffi.Pointer user_data); -typedef Dartbt_hdp_connected_cbFunction = void Function( - int result, - ffi.Pointer remote_address, - ffi.Pointer app_id, - int type, - int channel, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_HDP_MODULE -/// @brief Called when the connection is disconnected. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] result The result of disconnecting from the remote device -/// @param[in] remote_address The address of disconnected remote device -/// @param[in] channel The connected data channel -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_hdp_connected_cb -/// @see bt_hdp_set_connection_state_changed_cb() -/// @see bt_hdp_unset_connection_state_changed_cb() -typedef bt_hdp_disconnected_cb - = ffi.Pointer>; -typedef bt_hdp_disconnected_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Pointer remote_address, - ffi.UnsignedInt channel, - ffi.Pointer user_data); -typedef Dartbt_hdp_disconnected_cbFunction = void Function( - int result, - ffi.Pointer remote_address, - int channel, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_HDP_MODULE -/// @brief Called when the you receive the data. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] channel The connected data channel -/// @param[in] data The received data -/// @param[in] size The size of received data (byte) -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_hdp_set_data_received_cb() -/// @see bt_hdp_unset_data_received_cb() -typedef bt_hdp_data_received_cb - = ffi.Pointer>; -typedef bt_hdp_data_received_cbFunction = ffi.Void Function( - ffi.UnsignedInt channel, - ffi.Pointer data, - ffi.UnsignedInt size, - ffi.Pointer user_data); -typedef Dartbt_hdp_data_received_cbFunction = void Function(int channel, - ffi.Pointer data, int size, ffi.Pointer user_data); - -/// @deprecated Deprecated since 2.3.1. Use bt_gatt_foreach_cb instead. -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE -/// @brief Called when you get the primary services repeatedly. -/// @since_tizen @if WEARABLE @else 2.3 @endif -/// -/// @param[in] service The attribute handle of service -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// \n @c false to break out of the loop. -/// @pre bt_gatt_foreach_primary_services() will invoke this function. -/// @see bt_gatt_foreach_primary_services() -typedef bt_gatt_primary_service_cb - = ffi.Pointer>; -typedef bt_gatt_primary_service_cbFunction = ffi.Bool Function( - bt_gatt_attribute_h service, ffi.Pointer user_data); -typedef Dartbt_gatt_primary_service_cbFunction = bool Function( - bt_gatt_attribute_h service, ffi.Pointer user_data); - -/// @deprecated Deprecated since 2.3.1. Use bt_gatt_h instead. -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE -/// @brief The attribute handle of GATT(Generic Attribute Profile). -/// @since_tizen @if WEARABLE @else 2.3 @endif -typedef bt_gatt_attribute_h = ffi.Pointer; - -/// @deprecated Deprecated since 2.3.1. This is not required because characteristic discovery is happened automatically. -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE -/// @brief Called after the characteristics are discovered by bt_gatt_discover_characteristics(). -/// @since_tizen @if WEARABLE @else 2.3 @endif -/// -/// @remarks If bt_gatt_discover_characteristics() failed, then this callback function is called only once with 0 total and NULL characteristic_handle. -/// @param[in] result The result of discovering -/// @param[in] index The index of characteristics in a service, starts from 0 -/// @param[in] total The total number of characteristics in a service -/// @param[in] characteristic The attribute handle of characteristic -/// @param[in] user_data The user data passed from the request function -/// @return @c true to continue with the next iteration of the loop, -/// \n @c false to break out of the loop. -/// @pre bt_gatt_discover_characteristics() will invoke this callback. -/// @see bt_gatt_discover_characteristics() -typedef bt_gatt_characteristics_discovered_cb = ffi - .Pointer>; -typedef bt_gatt_characteristics_discovered_cbFunction = ffi.Bool Function( - ffi.Int result, - ffi.Int index, - ffi.Int total, - bt_gatt_attribute_h characteristic, - ffi.Pointer user_data); -typedef Dartbt_gatt_characteristics_discovered_cbFunction = bool Function( - int result, - int index, - int total, - bt_gatt_attribute_h characteristic, - ffi.Pointer user_data); - -/// @deprecated Deprecated since 2.3.1. Use bt_gatt_foreach_cb instead. -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE -/// @brief Called when you get the included services repeatedly. -/// @since_tizen @if WEARABLE @else 2.3 @endif -/// -/// @param[in] service The attribute handle of service -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// \n @c false to break out of the loop. -/// @pre bt_gatt_foreach_included_services() will invoke this function. -/// @see bt_gatt_foreach_included_services() -typedef bt_gatt_included_service_cb - = ffi.Pointer>; -typedef bt_gatt_included_service_cbFunction = ffi.Bool Function( - bt_gatt_attribute_h service, ffi.Pointer user_data); -typedef Dartbt_gatt_included_service_cbFunction = bool Function( - bt_gatt_attribute_h service, ffi.Pointer user_data); - -/// @deprecated Deprecated since 2.3.1. Use bt_gatt_client_characteristic_value_changed_cb instead. -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE -/// @brief Called when a characteristic in service is changed. -/// @since_tizen @if WEARABLE @else 2.3 @endif -/// -/// @param[in] characteristic The attribute handle of characteristic -/// @param[in] value The value of characteristic (byte array) -/// @param[in] value_length The length of value -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_gatt_set_characteristic_changed_cb() -/// @see bt_gatt_unset_characteristic_changed_cb() -typedef bt_gatt_characteristic_changed_cb = ffi - .Pointer>; -typedef bt_gatt_characteristic_changed_cbFunction = ffi.Void Function( - bt_gatt_attribute_h characteristic, - ffi.Pointer value, - ffi.Int value_length, - ffi.Pointer user_data); -typedef Dartbt_gatt_characteristic_changed_cbFunction = void Function( - bt_gatt_attribute_h characteristic, - ffi.Pointer value, - int value_length, - ffi.Pointer user_data); - -/// @deprecated Deprecated since 2.3.1. Use bt_gatt_client_request_completed_cb instead. -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE -/// @brief Called when a characteristic value is written. -/// @since_tizen @if WEARABLE @else 2.3 @endif -/// -/// @see bt_gatt_set_characteristic_value() -typedef bt_gatt_characteristic_write_cb - = ffi.Pointer>; -typedef bt_gatt_characteristic_write_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartbt_gatt_characteristic_write_cbFunction = void Function( - ffi.Pointer user_data); - -/// @deprecated Deprecated since 2.3.1. Use bt_gatt_client_request_completed_cb instead. -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE -/// @brief Called when a characteristic value is read. -/// @since_tizen @if WEARABLE @else 2.3 @endif -/// -/// @param[in] value The value of characteristic (byte array) -/// @param[in] value_length The length of value -/// @param[in] user_data The user data passed from the foreach function -/// @see bt_gatt_read_characteristic_value() -typedef bt_gatt_characteristic_read_cb - = ffi.Pointer>; -typedef bt_gatt_characteristic_read_cbFunction = ffi.Void Function( - ffi.Pointer value, - ffi.Int value_length, - ffi.Pointer user_data); -typedef Dartbt_gatt_characteristic_read_cbFunction = void Function( - ffi.Pointer value, - int value_length, - ffi.Pointer user_data); - -/// @deprecated Deprecated since 2.3.1. This is not required because descriptor discovery is happened automatically. -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE -/// @brief Called after the characteristics descriptors are discovered by bt_gatt_discover_characteristic_descriptor(). -/// @since_tizen @if WEARABLE @else 2.3 @endif -/// -/// @param[in] result The result of discovering -/// @param[in] characteristic_format The format of the information data. -/// characteristic_format = 0x01 indicates UUIDs are 16-bits -/// characteristic_format = 0x02 indicates UUIDs are 128-bits -/// @param[in] total The total number of elements in characteristic_descriptor -/// @param[in] characteristic descriptor The attribute handle and the UUID of characteristic descriptor -/// @param[in] user_data The user data passed from the request function -/// @see bt_gatt_discover_characteristic_descriptor() -typedef bt_gatt_characteristic_descriptor_discovered_cb = ffi.Pointer< - ffi - .NativeFunction>; -typedef bt_gatt_characteristic_descriptor_discovered_cbFunction - = ffi.Void Function( - ffi.Int result, - ffi.UnsignedChar characteristic_format, - ffi.Int total, - bt_gatt_attribute_h characteristic_descriptor, - ffi.Pointer user_data); -typedef Dartbt_gatt_characteristic_descriptor_discovered_cbFunction - = void Function( - int result, - int characteristic_format, - int total, - bt_gatt_attribute_h characteristic_descriptor, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief The handle of a service, characteristic or descriptor. -/// @since_tizen 2.3.1 -typedef bt_gatt_h = ffi.Pointer; - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE -/// @brief The handle of a GATT client which is associated with a remote device. -/// @since_tizen 2.3.1 -typedef bt_gatt_client_h = ffi.Pointer; - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE -/// @brief Called when you get GATT handles repeatedly -/// @since_tizen 2.3.1 -/// -/// @param[in] total The total number of GATT handles to be called -/// @param[in] index The index of current GATT handle. It starts from 0. -/// @param[in] gatt_handle The GATT handle -/// @param[in] user_data The user data passed from the foreach function -/// -/// @see bt_gatt_service_foreach_characteristics() -/// @see bt_gatt_service_foreach_included_services() -/// @see bt_gatt_characteristic_foreach_descriptors() -/// @see bt_gatt_client_foreach_services() -typedef bt_gatt_foreach_cb - = ffi.Pointer>; -typedef bt_gatt_foreach_cbFunction = ffi.Bool Function(ffi.Int total, - ffi.Int index, bt_gatt_h gatt_handle, ffi.Pointer user_data); -typedef Dartbt_gatt_foreach_cbFunction = bool Function(int total, int index, - bt_gatt_h gatt_handle, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE -/// @brief Called when the client request(e.g. read / write) has been completed -/// @since_tizen 2.3.1 -/// -/// @param[in] result The result of a request -/// @param[in] request_handle The requesting GATT handle -/// @param[in] user_data The user data passed from the requesting function -/// -/// @see bt_gatt_client_read_value() -/// @see bt_gatt_client_write_value() -typedef bt_gatt_client_request_completed_cb = ffi - .Pointer>; -typedef bt_gatt_client_request_completed_cbFunction = ffi.Void Function( - ffi.Int result, bt_gatt_h request_handle, ffi.Pointer user_data); -typedef Dartbt_gatt_client_request_completed_cbFunction = void Function( - int result, bt_gatt_h request_handle, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE -/// @brief Called when the ATT MTU value is changed. -/// @since_tizen 4.0 -/// -/// @remarks The @a mtu_info must not be freed by application. -/// @a mtu_info can be used only inside the callback. -/// If it's needed outside, make a copy. -/// -/// @param[in] client The handle of a GATT client which is associated with a remote device -/// @param[in] mtu_info The MTU information -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_gatt_client_set_connection_state_changed_cb() -/// @see bt_gatt_client_unset_connection_state_changed_cb() -typedef bt_gatt_client_att_mtu_changed_cb = ffi - .Pointer>; -typedef bt_gatt_client_att_mtu_changed_cbFunction = ffi.Void Function( - bt_gatt_client_h client, - ffi.Pointer mtu_info, - ffi.Pointer user_data); -typedef Dartbt_gatt_client_att_mtu_changed_cbFunction = void Function( - bt_gatt_client_h client, - ffi.Pointer mtu_info, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE -/// @brief Called when a value of a watched characteristic's GATT handle has been changed -/// @since_tizen 2.3.1 -/// -/// @remarks After this function is returned, a changed value is automatically -/// applied to @a characteristic. Before that, @a characteristic has an old value. -/// -/// @param[in] characteristic The characteristic's GATT handle of which value change is informed. It has an old value. -/// @param[in] value The new value -/// @param[in] len The length of @a value -/// @param[in] user_data The user data passed from the registering function -/// -/// @see bt_gatt_client_set_characteristic_value_changed_cb() -typedef bt_gatt_client_characteristic_value_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef bt_gatt_client_characteristic_value_changed_cbFunction - = ffi.Void Function(bt_gatt_h characteristic, ffi.Pointer value, - ffi.Int len, ffi.Pointer user_data); -typedef Dartbt_gatt_client_characteristic_value_changed_cbFunction - = void Function(bt_gatt_h characteristic, ffi.Pointer value, - int len, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE -/// @brief Called when a service of a remote GATT server has been changed. -/// @since_tizen 3.0 -/// -/// @param[in] client The handle of a GATT client which is associated with a remote device. -/// @param[in] change_type The changed type -/// @param[in] service_uuid The changed service uuid -/// @param[in] user_data The user data passed from the registering function -/// -/// @see bt_gatt_client_set_characteristic_value_changed_cb() -typedef bt_gatt_client_service_changed_cb = ffi - .Pointer>; -typedef bt_gatt_client_service_changed_cbFunction = ffi.Void Function( - bt_gatt_client_h client, - ffi.Int32 change_type, - ffi.Pointer service_uuid, - ffi.Pointer user_data); -typedef Dartbt_gatt_client_service_changed_cbFunction = void Function( - bt_gatt_client_h client, - int change_type, - ffi.Pointer service_uuid, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE -/// @brief Called when the connection state is changed. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @details This callback is called when the connection state is changed. -/// When you called bt_gatt_connect() or bt_gatt_disconnect(), this callback is also called with error result even though these functions fail. -/// -/// @param[in] result The result of changing the connection state. -/// @param[in] connected The state to be changed, @a true means connected state, Otherwise, @a false. -/// @param[in] remote_address The remote_address -/// @param[in] user_data The user data passed from the callback registration function. -/// -/// @see bt_gatt_connect() -/// @see bt_gatt_disconnect() -/// @see bt_gatt_set_connection_state_changed_cb() -/// @see bt_gatt_unset_connection_state_changed_cb() -typedef bt_gatt_connection_state_changed_cb = ffi - .Pointer>; -typedef bt_gatt_connection_state_changed_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Bool connected, - ffi.Pointer remote_address, - ffi.Pointer user_data); -typedef Dartbt_gatt_connection_state_changed_cbFunction = void Function( - int result, - bool connected, - ffi.Pointer remote_address, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE -/// @brief The handle of a GATT server. -/// @since_tizen 3.0 -typedef bt_gatt_server_h = ffi.Pointer; - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE -/// @brief Called when the remote device requests to read a value on a GATT server. -/// @since_tizen 3.0 -/// -/// @details For finishing the request, call the function #bt_gatt_server_send_response in callback. -/// -/// @remarks The @a remote_address must not be freed by application. -/// @remarks The @a server must not be freed by application. -/// @remarks The @a gatt_handle must not be freed by application. -/// -/// @param[in] remote_address The address of the requesting remote device -/// @param[in] request_id The identification of this request. It will be used to send a response. -/// @param[in] server The GATT server handle -/// @param[in] gatt_handle The characteristic or descriptor's GATT handle to be read -/// @param[in] offset The requested offset from where the GATT handle's value is read -/// @param[in] user_data The user data passed from the registration function -/// -/// @see bt_gatt_server_set_read_value_requested_cb() -/// @see bt_gatt_server_send_response() -typedef bt_gatt_server_read_value_requested_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef bt_gatt_server_read_value_requested_cbFunction = ffi.Void Function( - ffi.Pointer remote_address, - ffi.Int request_id, - bt_gatt_server_h server, - bt_gatt_h gatt_handle, - ffi.Int offset, - ffi.Pointer user_data); -typedef Dartbt_gatt_server_read_value_requested_cbFunction = void Function( - ffi.Pointer remote_address, - int request_id, - bt_gatt_server_h server, - bt_gatt_h gatt_handle, - int offset, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE -/// @brief Called when the remote device enables or disables the Notification/Indication for particular characteristics. -/// @since_tizen 3.0 -/// -/// @details By using this callback function, server can know notification state. -/// -/// @remarks The @a server must not be freed by application. -/// @remarks The @a gatt_handle must not be freed by application. -/// -/// @param[in] notify Indicates whether the Notification/Indication is enabled or not -/// @param[in] server The GATT server handle -/// @param[in] gatt_handle The characteristic's GATT handle to be read -/// @param[in] user_data The user data passed from the registration function -/// -/// @see bt_gatt_server_set_read_value_requested_cb() -typedef bt_gatt_server_characteristic_notification_state_changed_cb = ffi.Pointer< - ffi.NativeFunction< - bt_gatt_server_characteristic_notification_state_changed_cbFunction>>; -typedef bt_gatt_server_characteristic_notification_state_changed_cbFunction - = ffi.Void Function(ffi.Bool notify, bt_gatt_server_h server, - bt_gatt_h gatt_handle, ffi.Pointer user_data); -typedef Dartbt_gatt_server_characteristic_notification_state_changed_cbFunction - = void Function(bool notify, bt_gatt_server_h server, bt_gatt_h gatt_handle, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE -/// @brief Called when a value of a characteristic or descriptor's GATT handle has been changed. -/// @since_tizen 3.0 -/// -/// @details For finishing the request, call the function #bt_gatt_server_send_response in callback. -/// -/// @remarks After this function is returned, a changed value is automatically -/// applied to @a gatt_handle. Before that, @a gatt_handle has an old value. -/// @remarks The @a remote_address must not be freed by application. -/// @remarks The @a server must not be freed by application. -/// @remarks The @a gatt_handle must not be freed by application. -/// @remarks The @a value must not be freed by application. -/// -/// @param[in] remote_address The address of the remote device which requests a change -/// @param[in] request_id The identification of this request. It will be used to send a response. -/// @param[in] server The GATT server handle -/// @param[in] gatt_handle The characteristic or descriptor's GATT handle which has an old value -/// @param[in] response_needed Indicates whether a response is required by the remote device - @c true if required, @c false if not -/// @param[in] offset The requested offset from where the @a gatt_handle value will be updated -/// @param[in] value The new value -/// @param[in] len The length of @a value -/// @param[in] user_data The user data passed from the registration function -/// -/// @see bt_gatt_server_set_write_value_requested_cb() -/// @see bt_gatt_server_send_response() -typedef bt_gatt_server_write_value_requested_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef bt_gatt_server_write_value_requested_cbFunction = ffi.Void Function( - ffi.Pointer remote_address, - ffi.Int request_id, - bt_gatt_server_h server, - bt_gatt_h gatt_handle, - ffi.Bool response_needed, - ffi.Int offset, - ffi.Pointer value, - ffi.Int len, - ffi.Pointer user_data); -typedef Dartbt_gatt_server_write_value_requested_cbFunction = void Function( - ffi.Pointer remote_address, - int request_id, - bt_gatt_server_h server, - bt_gatt_h gatt_handle, - bool response_needed, - int offset, - ffi.Pointer value, - int len, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE -/// @brief Called when the sending notification / indication is done. -/// @since_tizen 3.0 -/// -/// @remarks The @a remote_address must not be freed by application. -/// @remarks The @a server must not be freed by application. -/// @remarks The @a characteristic must not be freed by application. -/// -/// @remarks In case of an indication, once a confirmation is received from the remote device this callback will be called. \n -/// This callback will be called several times if there are two or more remote devices which enable a Client Characteristic Configuration Descriptor(CCCD). \n -/// For the last remote device, @a completed will be set as true. -/// -/// @param[in] result The result of a sending operation -/// @param[in] remote_address The address of the remote device -/// @param[in] server The GATT server handle -/// @param[in] characteristic The characteristic's GATT handle -/// @param[in] completed If this callback is for the last remote device which enables a CCCD, it will be true. Or it will be false. -/// @param[in] user_data The user data passed from the requesting function -/// -/// @see bt_gatt_server_notify_characteristic_changed_value() -typedef bt_gatt_server_notification_sent_cb = ffi - .Pointer>; -typedef bt_gatt_server_notification_sent_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Pointer remote_address, - bt_gatt_server_h server, - bt_gatt_h characteristic, - ffi.Bool completed, - ffi.Pointer user_data); -typedef Dartbt_gatt_server_notification_sent_cbFunction = void Function( - int result, - ffi.Pointer remote_address, - bt_gatt_server_h server, - bt_gatt_h characteristic, - bool completed, - ffi.Pointer user_data); - -/// @WEARABLE_ONLY -/// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE -/// @brief Called when PBAP is Connected or Disconnected. -/// @details The following error codes can be delivered: \n -/// #BT_ERROR_NONE \n -/// #BT_ERROR_OPERATION_FAILED \n -/// @since_tizen 3.0 -/// -/// @param[in] result The result of connecting to or disconnecting from the remote device -/// @param[in] connected The PBAP connection status (@c true = connected, @c false = disconnected) -/// @param[in] remote_address The remote device address (@a remote_address is valid only inside this function. To use outside the callback, make a copy. @a remote_address should not be freed.) -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_pbap_client_connect() -/// @see bt_pbap_client_disconnect() -typedef bt_pbap_connection_state_changed_cb = ffi - .Pointer>; -typedef bt_pbap_connection_state_changed_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Bool connected, - ffi.Pointer remote_address, - ffi.Pointer user_data); -typedef Dartbt_pbap_connection_state_changed_cbFunction = void Function( - int result, - bool connected, - ffi.Pointer remote_address, - ffi.Pointer user_data); - -/// @WEARABLE_ONLY -/// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE -/// @brief Called when PBAP Phonebook size calculation completes. -/// @details The following error codes can be delivered: \n -/// #BT_ERROR_NONE \n -/// #BT_ERROR_OPERATION_FAILED \n -/// @since_tizen 3.0 -/// -/// @param[in] result The result of getting the phone book size -/// @param[in] remote_address The remote device address (@a remote_address is valid only inside this function. To use outside the callback, make a copy. @a remote_address should not be freed.) -/// @param[in] size Size of Phonebook -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_pbap_client_get_phone_book_size() -/// @see bt_pbap_client_connect() -/// @see bt_pbap_client_disconnect() -typedef bt_pbap_phone_book_size_cb - = ffi.Pointer>; -typedef bt_pbap_phone_book_size_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Pointer remote_address, - ffi.Int size, - ffi.Pointer user_data); -typedef Dartbt_pbap_phone_book_size_cbFunction = void Function( - int result, - ffi.Pointer remote_address, - int size, - ffi.Pointer user_data); - -/// @WEARABLE_ONLY -/// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE -/// @brief Called when PBAP Phonebook Pull completes. -/// @details The received phone book file will be saved in the platform downloads folder. \n -/// The following error codes can be delivered: \n -/// #BT_ERROR_NONE \n -/// #BT_ERROR_OPERATION_FAILED \n -/// @since_tizen 3.0 -/// -/// @param[in] result The result of getting the phone book -/// @param[in] remote_address The remote device address (@a remote_address is valid only inside this function. To use outside the callback, make a copy. @a remote_address should not be freed.) -/// @param[in] vcf_file The absolute path of the file in which the vCards are saved (@a vcf_file is valid only inside this function. To use outside the callback, make a copy. @a vcf_file should not be freed.) -/// @param[in] successful true if the operation was successful, false if not -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_pbap_client_get_phone_book() -/// @see bt_pbap_client_connect() -/// @see bt_pbap_client_disconnect() -typedef bt_pbap_phone_book_received_cb - = ffi.Pointer>; -typedef bt_pbap_phone_book_received_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Pointer remote_address, - ffi.Pointer vcf_file, - ffi.Pointer user_data); -typedef Dartbt_pbap_phone_book_received_cbFunction = void Function( - int result, - ffi.Pointer remote_address, - ffi.Pointer vcf_file, - ffi.Pointer user_data); - -/// @WEARABLE_ONLY -/// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE -/// @brief Called when PBAP List vCards completes. -/// @details The following error codes can be delivered: \n -/// #BT_ERROR_NONE \n -/// #BT_ERROR_OPERATION_FAILED \n -/// @since_tizen 3.0 -/// -/// @param[in] result The result of getting the vcard list -/// @param[in] remote_address The remote device address (@a remote_address is valid only inside this function. To use outside the callback, make a copy. @a remote_address should not be freed.) -/// @param[in] vcard_info List of vcard information (@a vcard_info is valid only inside this function. To use outside the callback, make a copy. @a vcard_info should not be freed.) -/// @param[in] count Number of contacts in the list -/// @param[in] successful true if the operation was successful, false if not -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_pbap_client_get_list() -/// @see bt_pbap_client_connect() -/// @see bt_pbap_client_disconnect() -typedef bt_pbap_list_vcards_cb - = ffi.Pointer>; -typedef bt_pbap_list_vcards_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Pointer remote_address, - ffi.Pointer vcard_info, - ffi.Int count, - ffi.Pointer user_data); -typedef Dartbt_pbap_list_vcards_cbFunction = void Function( - int result, - ffi.Pointer remote_address, - ffi.Pointer vcard_info, - int count, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief The handle of a Bluetooth LE scan filter. -/// @since_tizen 4.0 -typedef bt_scan_filter_h = ffi.Pointer; - -/// @brief Enumeration for security type of Wi-Fi. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_wifi_security_type_e { - /// < Security disabled - static const int CONNECTION_WIFI_SECURITY_TYPE_NONE = 0; - - /// < WEP - static const int CONNECTION_WIFI_SECURITY_TYPE_WEP = 1; - - /// < WPA-PSK - static const int CONNECTION_WIFI_SECURITY_TYPE_WPA_PSK = 2; - - /// < WPA2-PSK - static const int CONNECTION_WIFI_SECURITY_TYPE_WPA2_PSK = 3; - - /// < EAP - static const int CONNECTION_WIFI_SECURITY_TYPE_EAP = 4; -} - -/// @brief Enumeration for encryption modes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_wifi_encryption_type_e { - /// < Encryption disabled - static const int CONNECTION_WIFI_ENCRYPTION_TYPE_NONE = 0; - - /// < WEP - static const int CONNECTION_WIFI_ENCRYPTION_TYPE_WEP = 1; - - /// < TKIP - static const int CONNECTION_WIFI_ENCRYPTION_TYPE_TKIP = 2; - - /// < AES - static const int CONNECTION_WIFI_ENCRYPTION_TYPE_AES = 3; - - /// < TKIP and AES are both supported - static const int CONNECTION_WIFI_ENCRYPTION_TYPE_TKIP_AES_MIXED = 4; -} - -/// @brief Enumeration for cellular service type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_cellular_service_type_e { - /// < Unknown - static const int CONNECTION_CELLULAR_SERVICE_TYPE_UNKNOWN = 0; - - /// < Internet - static const int CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET = 1; - - /// < MMS - static const int CONNECTION_CELLULAR_SERVICE_TYPE_MMS = 2; - - /// < Prepaid internet - static const int CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_INTERNET = 3; - - /// < Prepaid MMS - static const int CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_MMS = 4; - - /// < Tethering - static const int CONNECTION_CELLULAR_SERVICE_TYPE_TETHERING = 5; - - /// < Specific application - static const int CONNECTION_CELLULAR_SERVICE_TYPE_APPLICATION = 6; -} - -/// @brief Enumeration for cellular pdn type. -/// @since_tizen 3.0 -/// @remarks Use CONNECTION_CELLULAR_PDN_TYPE_IPV4_IPV6 instead of -/// CONNECTION_CELLULAR_PDN_TYPE_IPV4_IPv6. -abstract class connection_cellular_pdn_type_e { - static const int CONNECTION_CELLULAR_PDN_TYPE_UNKNOWN = 0; - - /// > Unknown - static const int CONNECTION_CELLULAR_PDN_TYPE_IPV4 = 1; - - /// > IPv4 - static const int CONNECTION_CELLULAR_PDN_TYPE_IPV6 = 2; - - /// > IPv6 - static const int CONNECTION_CELLULAR_PDN_TYPE_IPV4_IPv6 = 3; - - /// > IPv4 and IPv6 (Deprecated since 4.0) - static const int CONNECTION_CELLULAR_PDN_TYPE_IPV4_IPV6 = 4; -} - -/// @brief Enumeration for cellular authentication type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_cellular_auth_type_e { - /// < No authentication - static const int CONNECTION_CELLULAR_AUTH_TYPE_NONE = 0; - - /// < PAP authentication - static const int CONNECTION_CELLULAR_AUTH_TYPE_PAP = 1; - - /// < CHAP authentication - static const int CONNECTION_CELLULAR_AUTH_TYPE_CHAP = 2; -} - -/// @brief Enumeration for profile state type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_profile_state_e { - /// < Disconnected state - static const int CONNECTION_PROFILE_STATE_DISCONNECTED = 0; - - /// < Association state - static const int CONNECTION_PROFILE_STATE_ASSOCIATION = 1; - - /// < Configuration state - static const int CONNECTION_PROFILE_STATE_CONFIGURATION = 2; - - /// < Connected state - static const int CONNECTION_PROFILE_STATE_CONNECTED = 3; -} - -/// @brief Enumeration for address family. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_address_family_e { - /// < IPV4 Address type - static const int CONNECTION_ADDRESS_FAMILY_IPV4 = 0; - - /// < IPV6 Address type - static const int CONNECTION_ADDRESS_FAMILY_IPV6 = 1; -} - -/// @brief Enumeration for IP configuration type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_ip_config_type_e { - /// Not defined - static const int CONNECTION_IP_CONFIG_TYPE_NONE = 0; - - /// Manual IP configuration - static const int CONNECTION_IP_CONFIG_TYPE_STATIC = 1; - - /// Config IP using DHCP client - static const int CONNECTION_IP_CONFIG_TYPE_DYNAMIC = 2; - - /// Config IP from Auto IP pool (169.254/16). Later with DHCP client, if available - static const int CONNECTION_IP_CONFIG_TYPE_AUTO = 3; - - /// Indicates an IP address that can not be modified - static const int CONNECTION_IP_CONFIG_TYPE_FIXED = 4; -} - -/// @brief Enumeration for proxy method type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_proxy_type_e { - /// Direct connection - static const int CONNECTION_PROXY_TYPE_DIRECT = 0; - - /// Auto configuration (use PAC file). If URL property is not set, - /// DHCP/WPAD auto-discover will be tried - static const int CONNECTION_PROXY_TYPE_AUTO = 1; - - /// Manual configuration - static const int CONNECTION_PROXY_TYPE_MANUAL = 2; -} - -/// @brief Enumeration for DNS configuration type. -/// @since_tizen 4.0 -abstract class connection_dns_config_type_e { - /// < Not defined - static const int CONNECTION_DNS_CONFIG_TYPE_NONE = 0; - - /// < Manual DNS configuration - static const int CONNECTION_DNS_CONFIG_TYPE_STATIC = 1; - - /// < Config DNS using DHCP client - static const int CONNECTION_DNS_CONFIG_TYPE_DYNAMIC = 2; -} - -/// @brief Enumeration for network connection type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_profile_type_e { - /// < Cellular type - static const int CONNECTION_PROFILE_TYPE_CELLULAR = 0; - - /// < Wi-Fi type - static const int CONNECTION_PROFILE_TYPE_WIFI = 1; - - /// < Ethernet type - static const int CONNECTION_PROFILE_TYPE_ETHERNET = 2; - - /// < Bluetooth type - static const int CONNECTION_PROFILE_TYPE_BT = 3; -} - -/// @brief The profile handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef connection_profile_h = ffi.Pointer; - -/// @brief Called when the state of the profile is changed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] state The state -/// @param[in] user_data The user data passed from the callback registration function -/// @see connection_profile_set_state_changed_cb() -/// @see connection_profile_unset_state_changed_cb() -typedef connection_profile_state_changed_cb = ffi - .Pointer>; -typedef connection_profile_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 state, ffi.Pointer user_data); -typedef Dartconnection_profile_state_changed_cbFunction = void Function( - int state, ffi.Pointer user_data); - -/// @brief Enumeration for connection type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_type_e { - /// < Disconnected - static const int CONNECTION_TYPE_DISCONNECTED = 0; - - /// < Wi-Fi type - static const int CONNECTION_TYPE_WIFI = 1; - - /// < Cellular type - static const int CONNECTION_TYPE_CELLULAR = 2; - - /// < Ethernet type - static const int CONNECTION_TYPE_ETHERNET = 3; - - /// < Bluetooth type - static const int CONNECTION_TYPE_BT = 4; - - /// < Proxy type for internet connection (Since 3.0) - static const int CONNECTION_TYPE_NET_PROXY = 5; -} - -/// @brief Enumeration for cellular network state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_cellular_state_e { - /// < Out of service - static const int CONNECTION_CELLULAR_STATE_OUT_OF_SERVICE = 0; - - /// < Flight mode - static const int CONNECTION_CELLULAR_STATE_FLIGHT_MODE = 1; - - /// < Roaming is turned off - static const int CONNECTION_CELLULAR_STATE_ROAMING_OFF = 2; - - /// < Call is only available - static const int CONNECTION_CELLULAR_STATE_CALL_ONLY_AVAILABLE = 3; - - /// < Available but not connected yet - static const int CONNECTION_CELLULAR_STATE_AVAILABLE = 4; - - /// < Connected - static const int CONNECTION_CELLULAR_STATE_CONNECTED = 5; -} - -/// @brief Enumeration for Wi-Fi state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_wifi_state_e { - /// < Wi-Fi is deactivated - static const int CONNECTION_WIFI_STATE_DEACTIVATED = 0; - - /// < Disconnected - static const int CONNECTION_WIFI_STATE_DISCONNECTED = 1; - - /// < Connected - static const int CONNECTION_WIFI_STATE_CONNECTED = 2; -} - -/// @brief Enumeration for ethernet state. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class connection_ethernet_state_e { - /// < There is no Ethernet profile to open - static const int CONNECTION_ETHERNET_STATE_DEACTIVATED = 0; - - /// < Disconnected - static const int CONNECTION_ETHERNET_STATE_DISCONNECTED = 1; - - /// < Connected - static const int CONNECTION_ETHERNET_STATE_CONNECTED = 2; -} - -/// @brief Enumeration for Bluetooth state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_bt_state_e { - /// < There is no Bluetooth profile to open - static const int CONNECTION_BT_STATE_DEACTIVATED = 0; - - /// < Disconnected - static const int CONNECTION_BT_STATE_DISCONNECTED = 1; - - /// < Connected - static const int CONNECTION_BT_STATE_CONNECTED = 2; -} - -/// @brief Enumeration for connection iterator type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_iterator_type_e { - /// < The iterator of the registered profile - static const int CONNECTION_ITERATOR_TYPE_REGISTERED = 0; - - /// < The iterator of the connected profile - static const int CONNECTION_ITERATOR_TYPE_CONNECTED = 1; - - /// < The iterator of the default profile - static const int CONNECTION_ITERATOR_TYPE_DEFAULT = 2; -} - -/// @brief Enumeration for reset profile type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_reset_option_e { - /// Initialized with the default profile defined by csc - static const int CONNECTION_RESET_DEFAULT_PROFILE = 0; - - /// Remove all profiles - static const int CONNECTION_RESET_CLEAR_PROFILE = 1; -} - -/// @brief Enumeration for the attached or detached state of ethernet cable. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class connection_ethernet_cable_state_e { - /// < Ethernet cable is detached - static const int CONNECTION_ETHERNET_CABLE_DETACHED = 0; - - /// < Ethernet cable is attached - static const int CONNECTION_ETHERNET_CABLE_ATTACHED = 1; -} - -/// @brief Enumeration for connection errors. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_error_e { - /// Successful - static const int CONNECTION_ERROR_NONE = 0; - - /// Invalid parameter - static const int CONNECTION_ERROR_INVALID_PARAMETER = -22; - - /// Out of memory error - static const int CONNECTION_ERROR_OUT_OF_MEMORY = -12; - - /// Invalid operation - static const int CONNECTION_ERROR_INVALID_OPERATION = -38; - - /// Address family not supported - static const int CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED = -97; - - /// Operation failed - static const int CONNECTION_ERROR_OPERATION_FAILED = -29424639; - - /// End of iteration - static const int CONNECTION_ERROR_ITERATOR_END = -29424638; - - /// There is no connection - static const int CONNECTION_ERROR_NO_CONNECTION = -29424637; - - /// Now inprogress - static const int CONNECTION_ERROR_NOW_IN_PROGRESS = -115; - - /// Already exists - static const int CONNECTION_ERROR_ALREADY_EXISTS = -29424636; - - /// Operation is aborted - static const int CONNECTION_ERROR_OPERATION_ABORTED = -29424635; - - /// DHCP failed - static const int CONNECTION_ERROR_DHCP_FAILED = -29424634; - - /// Invalid key - static const int CONNECTION_ERROR_INVALID_KEY = -29424633; - - /// No reply - static const int CONNECTION_ERROR_NO_REPLY = -29424632; - - /// Permission denied - static const int CONNECTION_ERROR_PERMISSION_DENIED = -13; - - /// Not supported - static const int CONNECTION_ERROR_NOT_SUPPORTED = -1073741822; -} - -/// @brief Enumeration for statistics type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_statistics_type_e { - /// < Last received data - static const int CONNECTION_STATISTICS_TYPE_LAST_RECEIVED_DATA = 0; - - /// < Last sent data - static const int CONNECTION_STATISTICS_TYPE_LAST_SENT_DATA = 1; - - /// < Total received data - static const int CONNECTION_STATISTICS_TYPE_TOTAL_RECEIVED_DATA = 2; - - /// < Total sent data - static const int CONNECTION_STATISTICS_TYPE_TOTAL_SENT_DATA = 3; -} - -/// @brief The connection handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef connection_h = ffi.Pointer; - -/// @deprecated Deprecated since 4.0. Use connection_ethernet_cable_state_changed_cb instead. -/// @brief Called when ethernet cable is plugged [in/out]. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] state The state of ethernet cable -/// @param[in] user_data The user data passed to callback registration function -typedef connection_ethernet_cable_state_chaged_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef connection_ethernet_cable_state_chaged_cbFunction = ffi.Void Function( - ffi.Int32 state, ffi.Pointer user_data); -typedef Dartconnection_ethernet_cable_state_chaged_cbFunction = void Function( - int state, ffi.Pointer user_data); - -/// @brief Called when ethernet cable is plugged [in/out]. -/// @since_tizen 4.0 -/// @param[in] state The state of ethernet cable -/// @param[in] user_data The user data passed to callback registration function -typedef connection_ethernet_cable_state_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef connection_ethernet_cable_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 state, ffi.Pointer user_data); -typedef Dartconnection_ethernet_cable_state_changed_cbFunction = void Function( - int state, ffi.Pointer user_data); - -/// @brief Called when the type of a connection is changed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] type The type of the current network connection -/// @param[in] user_data The user data passed from the callback registration function -/// @see connection_set_type_changed_cb() -/// @see connection_unset_type_changed_cb() -typedef connection_type_changed_cb - = ffi.Pointer>; -typedef connection_type_changed_cbFunction = ffi.Void Function( - ffi.Int32 type, ffi.Pointer user_data); -typedef Dartconnection_type_changed_cbFunction = void Function( - int type, ffi.Pointer user_data); - -/// @brief Called when the address is changed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] ipv4_address The IP address for IPv4 -/// @param[in] ipv6_address The IP address for IPv6 -/// @param[in] user_data The user data passed from the callback registration function -/// @see connection_set_ip_address_changed_cb() -/// @see connection_unset_ip_address_changed_cb() -/// @see connection_set_proxy_address_changed_cb() -/// @see connection_unset_proxy_address_changed_cb() -typedef connection_address_changed_cb - = ffi.Pointer>; -typedef connection_address_changed_cbFunction = ffi.Void Function( - ffi.Pointer ipv4_address, - ffi.Pointer ipv6_address, - ffi.Pointer user_data); -typedef Dartconnection_address_changed_cbFunction = void Function( - ffi.Pointer ipv4_address, - ffi.Pointer ipv6_address, - ffi.Pointer user_data); - -/// @brief The profiles iterator handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef connection_profile_iterator_h = ffi.Pointer; - -/// @brief Called when connection_set_default_cellular_service_profile_async() finishes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] result The result -/// @param[in] user_data The user data passed from connection_open_profile() -/// @pre connection_set_default_cellular_service_profile_async() will invoke this callback function. -/// @see connection_set_default_cellular_service_profile_async() -typedef connection_set_default_cb - = ffi.Pointer>; -typedef connection_set_default_cbFunction = ffi.Void Function( - ffi.Int32 result, ffi.Pointer user_data); -typedef Dartconnection_set_default_cbFunction = void Function( - int result, ffi.Pointer user_data); - -/// @brief Called after connection_open_profile() is finished. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] result The result -/// @param[in] user_data The user data passed from connection_open_profile() -/// @pre connection_open_profile() will invoke this callback function. -/// @see connection_open_profile() -typedef connection_opened_cb - = ffi.Pointer>; -typedef connection_opened_cbFunction = ffi.Void Function( - ffi.Int32 result, ffi.Pointer user_data); -typedef Dartconnection_opened_cbFunction = void Function( - int result, ffi.Pointer user_data); - -/// @brief Called after connection_close_profile() is finished. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] result The result -/// @param[in] user_data The user data passed from connection_close_profile() -/// @pre connection_close_profile() will invoke this callback function. -/// @see connection_close_profile() -typedef connection_closed_cb - = ffi.Pointer>; -typedef connection_closed_cbFunction = ffi.Void Function( - ffi.Int32 result, ffi.Pointer user_data); -typedef Dartconnection_closed_cbFunction = void Function( - int result, ffi.Pointer user_data); - -/// @brief Called after connection_reset_profile() is finished. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] result The result -/// @param[in] user_data The user data passed from connection_reset_profile() -/// @pre connection_reset_profile() will invoke this callback function. -/// @see connection_reset_profile() -typedef connection_reset_cb - = ffi.Pointer>; -typedef connection_reset_cbFunction = ffi.Void Function( - ffi.Int32 result, ffi.Pointer user_data); -typedef Dartconnection_reset_cbFunction = void Function( - int result, ffi.Pointer user_data); - -/// @brief Called with an IPv6 address. -/// @since_tizen 4.0 -/// @remarks If @a ipv6_address is needed outside the callback, a copy should be made. \n -/// @a ipv6_address will be freed automatically after the execution of this callback. -/// @param[in] ipv6_address The IPv6 address -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n -/// @c false to break out of the loop -/// @pre connection_foreach_ipv6_addresses() will invoke this callback. -/// @see connection_foreach_ipv6_addresses() -typedef connection_ipv6_address_cb - = ffi.Pointer>; -typedef connection_ipv6_address_cbFunction = ffi.Bool Function( - ffi.Pointer ipv6_address, ffi.Pointer user_data); -typedef Dartconnection_ipv6_address_cbFunction = bool Function( - ffi.Pointer ipv6_address, ffi.Pointer user_data); - -/// @brief Enumeration for Network Service Discovery DNSSD error code. -/// @since_tizen 3.0 -abstract class dnssd_error_e { - /// < Successful - static const int DNSSD_ERROR_NONE = 0; - - /// < Out of memory - static const int DNSSD_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied - static const int DNSSD_ERROR_PERMISSION_DENIED = -13; - - /// < Invalid operation - static const int DNSSD_ERROR_INVALID_OPERATION = -38; - - /// < Invalid function parameter - static const int DNSSD_ERROR_INVALID_PARAMETER = -22; - - /// < Not supported - static const int DNSSD_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Not Initialized - static const int DNSSD_ERROR_NOT_INITIALIZED = -30015487; - - /// < Already registered - static const int DNSSD_ERROR_ALREADY_REGISTERED = -30015486; - - /// < Name conflict - static const int DNSSD_ERROR_NAME_CONFLICT = -30015485; - - /// < Background daemon not running - static const int DNSSD_ERROR_SERVICE_NOT_RUNNING = -30015484; - - /// < Service not found - static const int DNSSD_ERROR_SERVICE_NOT_FOUND = -30015483; - - /// < Operation failed - static const int DNSSD_ERROR_OPERATION_FAILED = -30015482; -} - -/// @brief Enumeration for Network Service Discovery DNSSD browse state. -/// @since_tizen 3.0 -abstract class dnssd_service_state_e { - /// >; -typedef dnssd_registered_cbFunction = ffi.Void Function(ffi.Int32 result, - dnssd_service_h local_service, ffi.Pointer user_data); -typedef Dartdnssd_registered_cbFunction = void Function(int result, - Dartdnssd_service_h local_service, ffi.Pointer user_data); - -/// @brief The DNSSD Browser handle. -/// @since_tizen 3.0 -typedef dnssd_browser_h = ffi.UnsignedInt; -typedef Dartdnssd_browser_h = int; - -/// @brief Called when a DNSSD service is found. -/// @details remote_service is valid only when service_state is -/// DNSSD_SERVICE_STATE_AVAILABLE or DNSSD_SERVICE_STATE_UNAVAILABLE. -/// In case of service_state DNSSD_SERVICE_STATE_UNAVAILABLE, application -/// can only use dnssd_service_get_type() and dnssd_service_get_name(). -/// Other get functions can only be used when service_state is -/// DNSSD_SERVICE_STATE_AVAILABLE. -/// @since_tizen 3.0 -/// @param[in] service_state The DNSSD service state of remote service -/// @param[in] remote_service The DNSSD remote service handle -/// @param[in] user_data The user data passed from the request function -/// @see dnssd_start_browsing_service() -typedef dnssd_found_cb - = ffi.Pointer>; -typedef dnssd_found_cbFunction = ffi.Void Function(ffi.Int32 service_state, - dnssd_service_h remote_service, ffi.Pointer user_data); -typedef Dartdnssd_found_cbFunction = void Function(int service_state, - Dartdnssd_service_h remote_service, ffi.Pointer user_data); - -/// @brief Enumeration for type of observation. -/// @since_tizen 3.0 -abstract class iotcon_observe_type_e { - /// < Indicates no option - static const int IOTCON_OBSERVE_NO_TYPE = 0; - - /// < Indicates action of registering observation - static const int IOTCON_OBSERVE_REGISTER = 1; - - /// < Indicates action of unregistering observation - static const int IOTCON_OBSERVE_DEREGISTER = 2; -} - -/// @brief Enumeration for policy of observation. -/// @since_tizen 3.0 -abstract class iotcon_observe_policy_e { - /// < Indicates observation request for most up-to-date notifications only - static const int IOTCON_OBSERVE_IGNORE_OUT_OF_ORDER = 0; - - /// < Indicates observation request for all notifications including state notifications - static const int IOTCON_OBSERVE_ACCEPT_OUT_OF_ORDER = 1; -} - -/// @brief Enumeration for connectivities which can be held in a resource. -/// @remarks IOTCON_CONNECTIVITY_PREFER_UDP and IOTCON_CONNECTIVITY_PREFER_TCP should be mutually exclusive. -/// @remarks IOTCON_CONNECTIVITY_IPV4_ONLY and IOTCON_CONNECTIVITY_IPV6_ONLY should be mutually exclusive. -/// @since_tizen 3.0 -abstract class iotcon_connectivity_type_e { - /// < Indicates all connectivities - static const int IOTCON_CONNECTIVITY_ALL = 0; - - /// < Indicates Internet Protocol connectivity - static const int IOTCON_CONNECTIVITY_IP = 1; - - /// < It is related to IOTCON_CONNECTIVITY_IP, and it indicates UDP is preferred - static const int IOTCON_CONNECTIVITY_PREFER_UDP = 65536; - - /// < It is related to IOTCON_CONNECTIVITY_IP, and it indicates TCP is preferred - static const int IOTCON_CONNECTIVITY_PREFER_TCP = 131072; - - /// < When this bit is set with IOTCON_CONNECTIVITY_IP, resources are discovered for IPv4 - static const int IOTCON_CONNECTIVITY_IPV4_ONLY = 262144; - - /// < When this bit is set with IOTCON_CONNECTIVITY_IP, resources are discovered for IPv6 - static const int IOTCON_CONNECTIVITY_IPV6_ONLY = 524288; -} - -/// @brief Enumeration for policy which can be held in a resource. -/// @since_tizen 3.0 -abstract class iotcon_resource_policy_e { - /// < Indicates resource uninitialized - static const int IOTCON_RESOURCE_NO_POLICY = 0; - - /// < Indicates resource that is allowed to be discovered - static const int IOTCON_RESOURCE_DISCOVERABLE = 1; - - /// < Indicates resource that is allowed to be observed - static const int IOTCON_RESOURCE_OBSERVABLE = 2; - - /// < Indicates resource initialized and activated - static const int IOTCON_RESOURCE_ACTIVE = 4; - - /// < Indicates resource which takes some delay to respond - static const int IOTCON_RESOURCE_SLOW = 8; - - /// < Indicates secure resource - static const int IOTCON_RESOURCE_SECURE = 16; - - /// < When this bit is set, the resource is allowed to be discovered only if discovery request contains an explicit querystring. - static const int IOTCON_RESOURCE_EXPLICIT_DISCOVERABLE = 32; -} - -/// @brief Enumeration for type of request. -/// @since_tizen 3.0 -abstract class iotcon_request_type_e { - /// < Indicates none - static const int IOTCON_REQUEST_UNKNOWN = 0; - - /// < Indicates get method of request - static const int IOTCON_REQUEST_GET = 1; - - /// < Indicates put method of request - static const int IOTCON_REQUEST_PUT = 2; - - /// < Indicates post method of request - static const int IOTCON_REQUEST_POST = 3; - - /// < Indicates delete method of request - static const int IOTCON_REQUEST_DELETE = 4; -} - -/// @brief Enumeration for result of response. -/// @since_tizen 3.0 -abstract class iotcon_response_result_e { - /// < Indicates result of response for success - static const int IOTCON_RESPONSE_OK = 0; - - /// < Indicates result of response for error - static const int IOTCON_RESPONSE_ERROR = 1; - - /// < Indicates result of response for resource creation - static const int IOTCON_RESPONSE_RESOURCE_CREATED = 2; - - /// < Indicates result of response for resource deletion - static const int IOTCON_RESPONSE_RESOURCE_DELETED = 3; - - /// < Indicates result of response for resource change - static const int IOTCON_RESPONSE_RESOURCE_CHANGED = 4; - - /// < Indicates result of response for slow resource - static const int IOTCON_RESPONSE_SLOW = 5; - - /// < Indicates result of response for accessing unauthorized resource - static const int IOTCON_RESPONSE_FORBIDDEN = 6; -} - -/// @brief Enumeration for result of presence. -/// @since_tizen 3.0 -abstract class iotcon_presence_result_e { - /// < Indicates for successful action of presence - static const int IOTCON_PRESENCE_OK = 0; - - /// < Indicates for stopped action of presence - static const int IOTCON_PRESENCE_STOPPED = 1; - - /// < Indicates for no response of presence for some time - static const int IOTCON_PRESENCE_TIMEOUT = 2; -} - -/// @brief Enumeration for operation of presence response. -/// @since_tizen 3.0 -abstract class iotcon_presence_trigger_e { - /// < Indicates for resource creation operation of server - static const int IOTCON_PRESENCE_RESOURCE_CREATED = 0; - - /// < Indicates for resource update operation of server - static const int IOTCON_PRESENCE_RESOURCE_UPDATED = 1; - - /// < Indicates for resource destruction operation of server - static const int IOTCON_PRESENCE_RESOURCE_DESTROYED = 2; -} - -/// @brief Enumeration for types of representation that is possible to have. -/// @since_tizen 3.0 -abstract class iotcon_type_e { - /// < Indicates for representation that have no type - static const int IOTCON_TYPE_NONE = 0; - - /// < Indicates for representation that have int type - static const int IOTCON_TYPE_INT = 1; - - /// < Indicates for representation that have bool type - static const int IOTCON_TYPE_BOOL = 2; - - /// < Indicates for representation that have double type - static const int IOTCON_TYPE_DOUBLE = 3; - - /// < Indicates for representation that have string type - static const int IOTCON_TYPE_STR = 4; - - /// < Indicates for representation that have byte string type - static const int IOTCON_TYPE_BYTE_STR = 5; - - /// < Indicates for representation that have null type - static const int IOTCON_TYPE_NULL = 6; - - /// < Indicates for representation that have list type - static const int IOTCON_TYPE_LIST = 7; - - /// < Indicates for representation that have another representation type - static const int IOTCON_TYPE_ATTRIBUTES = 8; -} - -/// @brief Enumeration for properties of device information. -/// @since_tizen 3.0 -abstract class iotcon_device_info_e { - /// < Indicates human friendly name for device - static const int IOTCON_DEVICE_INFO_NAME = 0; - - /// < Indicates spec version of the core specification - static const int IOTCON_DEVICE_INFO_SPEC_VER = 1; - - /// < Indicates unique identifier for OCF device - static const int IOTCON_DEVICE_INFO_ID = 2; - - /// < Indicates version of the specs this device data model is implemented to - static const int IOTCON_DEVICE_INFO_DATA_MODEL_VER = 3; -} - -/// @brief Enumeration for properties of platform information. -/// @since_tizen 3.0 -abstract class iotcon_platform_info_e { - /// < Indicates platform identifier - static const int IOTCON_PLATFORM_INFO_ID = 0; - - /// < Indicates name of manufacturer - static const int IOTCON_PLATFORM_INFO_MANUF_NAME = 1; - - /// < Indicates URL to manufacturer - static const int IOTCON_PLATFORM_INFO_MANUF_URL = 2; - - /// < Indicates model number as designated by manufacturer - static const int IOTCON_PLATFORM_INFO_MODEL_NUMBER = 3; - - /// < Indicates manufacturing date of device - static const int IOTCON_PLATFORM_INFO_DATE_OF_MANUF = 4; - - /// < Indicates version of platform defined by manufacturer - static const int IOTCON_PLATFORM_INFO_PLATFORM_VER = 5; - - /// < Indicates version of platform resident OS - static const int IOTCON_PLATFORM_INFO_OS_VER = 6; - - /// < Indicates version of platform hardware - static const int IOTCON_PLATFORM_INFO_HARDWARE_VER = 7; - - /// < Indicates version of device firmware - static const int IOTCON_PLATFORM_INFO_FIRMWARE_VER = 8; - - /// < Indicates URL that points to support information from manufacturer - static const int IOTCON_PLATFORM_INFO_SUPPORT_URL = 9; - - /// < Indicates reference time for the device - static const int IOTCON_PLATFORM_INFO_SYSTEM_TIME = 10; -} - -/// @brief Enumeration for states of remote resource. -/// @since_tizen 3.0 -abstract class iotcon_remote_resource_state_e { - /// < Indicates remote resource is alive - static const int IOTCON_REMOTE_RESOURCE_ALIVE = 0; - - /// < Indicates remote resource is lost - static const int IOTCON_REMOTE_RESOURCE_LOST_SIGNAL = 1; -} - -/// @brief Enumeration for quality of service. -/// @since_tizen 3.0 -abstract class iotcon_qos_e { - /// < Indicates low quality of service - static const int IOTCON_QOS_LOW = 0; - - /// < Indicates high quality of service - static const int IOTCON_QOS_HIGH = 1; -} - -final class icl_resource extends ffi.Opaque {} - -final class icl_lite_resource extends ffi.Opaque {} - -final class icl_resource_response extends ffi.Opaque {} - -final class icl_observers extends ffi.Opaque {} - -final class icl_resource_request extends ffi.Opaque {} - -final class icl_remote_resource extends ffi.Opaque {} - -final class icl_presence extends ffi.Opaque {} - -final class icl_presence_response extends ffi.Opaque {} - -final class icl_device_info extends ffi.Opaque {} - -final class icl_platform_info extends ffi.Opaque {} - -final class icl_resource_ifaces extends ffi.Opaque {} - -final class icl_resource_types extends ffi.Opaque {} - -final class icl_options extends ffi.Opaque {} - -final class icl_query extends ffi.Opaque {} - -final class icl_representation_s extends ffi.Opaque {} - -final class icl_list_s extends ffi.Opaque {} - -final class icl_attributes_s extends ffi.Opaque {} - -/// @brief The iotcon_value_h type values list handle. -/// @details @a iotcon_list_h is an opaque data structure. -/// @since_tizen 3.0 -typedef iotcon_list_h = ffi.Pointer; - -/// @brief The attributes handle. -/// @details @a iotcon_attributes_h is an opaque data structure to have attribute value map. -/// Attribute value map consists of a key and a value. -/// Datatype of the key is string and the value should be one of them #IOTCON_TYPE_INT, -/// #IOTCON_TYPE_BOOL, #IOTCON_TYPE_DOUBLE, #IOTCON_TYPE_STR, #IOTCON_TYPE_NULL, -/// #IOTCON_TYPE_LIST and #IOTCON_TYPE_ATTRIBUTES. -/// @since_tizen 3.0 -typedef iotcon_attributes_h = ffi.Pointer; - -/// @brief Specifies the type of function passed to iotcon_list_foreach_int(). -/// @since_tizen 3.0 -/// @param[in] pos The number of the integer value (0 being the first) -/// @param[in] value The integer value -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_list_foreach_int() will invoke this callback function. -/// @see iotcon_list_foreach_int() -typedef iotcon_list_int_cb - = ffi.Pointer>; -typedef iotcon_list_int_cbFunction = ffi.Bool Function( - ffi.Int pos, ffi.Int value, ffi.Pointer user_data); -typedef Dartiotcon_list_int_cbFunction = bool Function( - int pos, int value, ffi.Pointer user_data); - -/// @brief Specifies the type of function passed to iotcon_list_foreach_bool(). -/// @since_tizen 3.0 -/// @param[in] pos The number of the boolean value (0 being the first) -/// @param[in] value The boolean value -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_list_foreach_bool() will invoke this callback function. -/// @see iotcon_list_foreach_bool() -typedef iotcon_list_bool_cb - = ffi.Pointer>; -typedef iotcon_list_bool_cbFunction = ffi.Bool Function( - ffi.Int pos, ffi.Bool value, ffi.Pointer user_data); -typedef Dartiotcon_list_bool_cbFunction = bool Function( - int pos, bool value, ffi.Pointer user_data); - -/// @brief Specifies the type of function passed to iotcon_list_foreach_double(). -/// @since_tizen 3.0 -/// @param[in] pos The number of the double value (0 being the first) -/// @param[in] value The double value -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_list_foreach_double() will invoke this callback function. -/// @see iotcon_list_foreach_double() -typedef iotcon_list_double_cb - = ffi.Pointer>; -typedef iotcon_list_double_cbFunction = ffi.Bool Function( - ffi.Int pos, ffi.Double value, ffi.Pointer user_data); -typedef Dartiotcon_list_double_cbFunction = bool Function( - int pos, double value, ffi.Pointer user_data); - -/// @brief Specifies the type of function passed to iotcon_list_foreach_byte_str(). -/// @since_tizen 3.0 -/// @param[in] pos The number of the string value (0 being the first) -/// @param[in] value The byte string value -/// @param[in] len The length of @a value -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_list_foreach_byte_str() will invoke this callback function. -/// @see iotcon_list_foreach_byte_str() -typedef iotcon_list_byte_str_cb - = ffi.Pointer>; -typedef iotcon_list_byte_str_cbFunction = ffi.Bool Function( - ffi.Int pos, - ffi.Pointer value, - ffi.Int len, - ffi.Pointer user_data); -typedef Dartiotcon_list_byte_str_cbFunction = bool Function( - int pos, - ffi.Pointer value, - int len, - ffi.Pointer user_data); - -/// @brief Specifies the type of function passed to iotcon_list_foreach_str(). -/// @since_tizen 3.0 -/// @param[in] pos The number of the string value (0 being the first) -/// @param[in] value The string value -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_list_foreach_str() will invoke this callback function. -/// @see iotcon_list_foreach_str() -typedef iotcon_list_str_cb - = ffi.Pointer>; -typedef iotcon_list_str_cbFunction = ffi.Bool Function( - ffi.Int pos, ffi.Pointer value, ffi.Pointer user_data); -typedef Dartiotcon_list_str_cbFunction = bool Function( - int pos, ffi.Pointer value, ffi.Pointer user_data); - -/// @brief Specifies the type of function passed to iotcon_list_foreach_list(). -/// @since_tizen 3.0 -/// @param[in] pos The number of the list value (0 being the first) -/// @param[in] value The list value -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_list_foreach_list() will invoke this callback function. -/// @see iotcon_list_foreach_list() -typedef iotcon_list_list_cb - = ffi.Pointer>; -typedef iotcon_list_list_cbFunction = ffi.Bool Function( - ffi.Int pos, iotcon_list_h value, ffi.Pointer user_data); -typedef Dartiotcon_list_list_cbFunction = bool Function( - int pos, iotcon_list_h value, ffi.Pointer user_data); - -/// @brief Specifies the type of function passed to iotcon_list_foreach_attributes(). -/// @since_tizen 3.0 -/// @param[in] pos The number of the attributes value (0 being the first) -/// @param[in] value The attributes value -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_list_foreach_attributes() will invoke this callback function. -/// @see iotcon_list_foreach_attributes() -typedef iotcon_list_attributes_cb - = ffi.Pointer>; -typedef iotcon_list_attributes_cbFunction = ffi.Bool Function( - ffi.Int pos, iotcon_attributes_h value, ffi.Pointer user_data); -typedef Dartiotcon_list_attributes_cbFunction = bool Function( - int pos, iotcon_attributes_h value, ffi.Pointer user_data); - -/// @brief The query handle. -/// @details @a iotcon_query_h is an opaque data structure to have attribute value map which consists of key and value. -/// Datatype of both key and value are string. -/// @a iotcon_query_h also have length. -/// The length is total length of all keys and values of map. -/// The length should be less than or equal to 64. -/// @since_tizen 3.0 -typedef iotcon_query_h = ffi.Pointer; - -/// @brief Specifies the type of function passed to iotcon_query_foreach(). -/// @since_tizen 3.0 -/// @param[in] key The key of the query -/// @param[in] value The value of the query -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_query_foreach() will invoke this callback function. -/// @see iotcon_query_foreach() -typedef iotcon_query_foreach_cb - = ffi.Pointer>; -typedef iotcon_query_foreach_cbFunction = ffi.Bool Function( - ffi.Pointer key, - ffi.Pointer value, - ffi.Pointer user_data); -typedef Dartiotcon_query_foreach_cbFunction = bool Function( - ffi.Pointer key, - ffi.Pointer value, - ffi.Pointer user_data); - -/// @brief Specifies the type of function passed to iotcon_attributes_foreach(). -/// @since_tizen 3.0 -/// @param[in] attributes The attributes handle -/// @param[in] key The key -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_attributes_foreach() will invoke this callback function. -/// @see iotcon_attributes_foreach() -typedef iotcon_attributes_cb - = ffi.Pointer>; -typedef iotcon_attributes_cbFunction = ffi.Bool Function( - iotcon_attributes_h attributes, - ffi.Pointer key, - ffi.Pointer user_data); -typedef Dartiotcon_attributes_cbFunction = bool Function( - iotcon_attributes_h attributes, - ffi.Pointer key, - ffi.Pointer user_data); - -/// @brief The options handle. -/// @details @a iotcon_options_h is an opaque data structure to have attribute value map which consists of a key and a value. -/// Datatype of key is an integer and value is string. -/// @since_tizen 3.0 -typedef iotcon_options_h = ffi.Pointer; - -/// @brief Specifies the type of function passed to iotcon_options_foreach(). -/// @since_tizen 3.0 -/// @param[in] id The information of the option -/// @param[in] data The data of the option -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_options_foreach() will invoke this callback function. -/// @see iotcon_options_foreach() -typedef iotcon_options_foreach_cb - = ffi.Pointer>; -typedef iotcon_options_foreach_cbFunction = ffi.Bool Function( - ffi.UnsignedShort id, - ffi.Pointer data, - ffi.Pointer user_data); -typedef Dartiotcon_options_foreach_cbFunction = bool Function( - int id, ffi.Pointer data, ffi.Pointer user_data); - -/// @brief The representation handle. -/// @details @a iotcon_representation_h is an opaque data structure to have uri_path, list of resource types and interfaces. -/// It could contain other representation as children. -/// @since_tizen 3.0 -typedef iotcon_representation_h = ffi.Pointer; - -/// @brief The resource types handle. -/// @details @a iotcon_resource_types_h is an opaque data structure to have list of resource types. A resource type is datatype of string. -/// @since_tizen 3.0 -typedef iotcon_resource_types_h = ffi.Pointer; - -/// @brief The resource interface handle. -/// @details @a iotcon_resource_interfaces_h is an opaque data structure to have list of resource interfaces. A resource interface is datatype of string. -/// @since_tizen 3.0 -typedef iotcon_resource_interfaces_h = ffi.Pointer; - -/// @brief Specifies the type of function passed to iotcon_representation_foreach_children(). -/// @since_tizen 3.0 -/// @param[in] child The child Representation handle -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_representation_foreach_children() will invoke this callback function. -/// @see iotcon_representation_foreach_children() -typedef iotcon_children_cb - = ffi.Pointer>; -typedef iotcon_children_cbFunction = ffi.Bool Function( - iotcon_representation_h child, ffi.Pointer user_data); -typedef Dartiotcon_children_cbFunction = bool Function( - iotcon_representation_h child, ffi.Pointer user_data); - -/// @brief Specifies the type of function passed to iotcon_resource_types_foreach(). -/// @since_tizen 3.0 -/// @param[in] type The value of the resource types -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_resource_types_foreach() will invoke this callback function. -/// @see iotcon_resource_types_foreach() -typedef iotcon_resource_types_foreach_cb - = ffi.Pointer>; -typedef iotcon_resource_types_foreach_cbFunction = ffi.Bool Function( - ffi.Pointer type, ffi.Pointer user_data); -typedef Dartiotcon_resource_types_foreach_cbFunction = bool Function( - ffi.Pointer type, ffi.Pointer user_data); - -/// @brief Specifies the iface of function passed to iotcon_resource_interfaces_foreach(). -/// @since_tizen 3.0 -/// @remarks @a iface could be a value such as #IOTCON_INTERFACE_DEFAULT. -/// @param[in] iface The value of the resource ifaces -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_resource_interfaces_foreach() will invoke this callback function. -/// @see iotcon_resource_interfaces_foreach() -typedef iotcon_resource_interfaces_foreach_cb = ffi - .Pointer>; -typedef iotcon_resource_interfaces_foreach_cbFunction = ffi.Bool Function( - ffi.Pointer iface, ffi.Pointer user_data); -typedef Dartiotcon_resource_interfaces_foreach_cbFunction = bool Function( - ffi.Pointer iface, ffi.Pointer user_data); - -/// @ingroup CAPI_IOT_CONNECTIVITY_MODULE -/// @brief Enumeration for IoTCon error code. -/// @since_tizen 3.0 -/// @{ -abstract class iotcon_error_e { - /// < Successful - static const int IOTCON_ERROR_NONE = 0; - - /// < I/O error - static const int IOTCON_ERROR_IO_ERROR = -5; - - /// < Out of memory - static const int IOTCON_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied - static const int IOTCON_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int IOTCON_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Invalid parameter - static const int IOTCON_ERROR_INVALID_PARAMETER = -22; - - /// < No data available - static const int IOTCON_ERROR_NO_DATA = -61; - - /// < Time out - static const int IOTCON_ERROR_TIMEOUT = -1073741823; - - /// < IoTivity errors - static const int IOTCON_ERROR_IOTIVITY = -29884415; - - /// < Representation errors - static const int IOTCON_ERROR_REPRESENTATION = -29884414; - - /// < Invalid type - static const int IOTCON_ERROR_INVALID_TYPE = -29884413; - - /// < Already - static const int IOTCON_ERROR_ALREADY = -29884412; - - /// < System errors - static const int IOTCON_ERROR_SYSTEM = -29884410; -} - -/// @brief Specifies the type of function passed to iotcon_resource_create() and iotcon_resource_set_request_handler(). -/// @details Called when server receives request from the client. -/// @since_tizen 3.0 -/// @param[in] resource The resource requested -/// @param[in] request The request from client -/// @param[in] user_data The user data to pass to the function -/// @pre The callback must be registered using iotcon_resource_create() -/// @see iotcon_resource_create() -/// @see iotcon_resource_set_request_handler() -typedef iotcon_request_handler_cb - = ffi.Pointer>; -typedef iotcon_request_handler_cbFunction = ffi.Void Function( - iotcon_resource_h resource, - iotcon_request_h request, - ffi.Pointer user_data); -typedef Dartiotcon_request_handler_cbFunction = void Function( - iotcon_resource_h resource, - iotcon_request_h request, - ffi.Pointer user_data); - -/// @brief The resource handle. -/// @details @a iotcon_resource_h is an opaque data structure to represent registered resource by server. -/// A resource has host_address, uri_path, resource types, interfaces and internal handle. -/// If observable attribute of resource is true, client can observe this resource. -/// When client requests by CRUD functions, handler will be invoked if registered. -/// It could contain other resource as children. -/// @since_tizen 3.0 -typedef iotcon_resource_h = ffi.Pointer; - -/// @brief The request handle. -/// @details @a iotcon_request_h is an opaque data structure to request to a particular resource. -/// @a iotcon_request_h is a data type of client's request which consists of header options, query, representation. -/// @since_tizen 3.0 -typedef iotcon_request_h = ffi.Pointer; - -/// @brief The observers handle. -/// @details The list of observer IDs. -/// @since_tizen 3.0 -typedef iotcon_observers_h = ffi.Pointer; - -/// @brief Specifies the type of function passed to iotcon_lite_resource_create(). -/// @since_tizen 3.0 -/// @param[in] resource The handle of the lite resource -/// @param[in] attributes The attributes of the lite resource -/// @param[in] user_data The user data to pass to the function -/// @return @c true to accept post request, -/// otherwise @c false to reject it -/// @pre The callback must be registered using iotcon_lite_resource_create(). -/// @see iotcon_lite_resource_create() -typedef iotcon_lite_resource_post_request_cb = ffi - .Pointer>; -typedef iotcon_lite_resource_post_request_cbFunction = ffi.Bool Function( - iotcon_lite_resource_h resource, - iotcon_attributes_h attributes, - ffi.Pointer user_data); -typedef Dartiotcon_lite_resource_post_request_cbFunction = bool Function( - iotcon_lite_resource_h resource, - iotcon_attributes_h attributes, - ffi.Pointer user_data); - -/// @brief The lite resource handle. -/// @details @a iotcon_lite_resource_h is an opaque data structure to represent registered resource by server. -/// A resource has host_address, uri_path, resource types, and internal handle. -/// If observable attribute of resource is true, client can observe this resource. -/// @since_tizen 3.0 -typedef iotcon_lite_resource_h = ffi.Pointer; - -/// @brief The response handle. -/// @details @a iotcon_response_h is an opaque data structure to respond to client. -/// @a iotcon_response_h is a data type of server's response which consists of result, header options, query, representation. -/// @since_tizen 3.0 -typedef iotcon_response_h = ffi.Pointer; - -/// @brief The remote resource handle. -/// @details When Client is successful to find out resource from remote server, server's resource information is reorganized as @a iotcon_remote_resource_h by IoTCon. -/// Client can request CRUD to server by using this. -/// @a iotcon_remote_resource_h is an opaque data structure to have host_address, uri_path, resource types, interfaces, options and device id. -/// If observable attribute is true, remote resource is observable. -/// When you observe remote resource, observe_handle will be set. -/// @since_tizen 3.0 -typedef iotcon_remote_resource_h = ffi.Pointer; - -/// @brief Specifies the type of observe callback passed to iotcon_remote_resource_observe_register(). -/// The @a err could be one of #iotcon_error_e. \n -/// The @a response is created by a server. Therefore, you can't get any values that the server didn't set. -/// @since_tizen 3.0 -/// @param[in] resource The handle of the remote resource -/// @param[in] err The error code -/// @param[in] sequence_number The sequence number of observe -/// @param[in] response The handle of the response -/// @param[in] user_data The user data passed from the callback registration function -/// @pre The callback must be registered using iotcon_remote_resource_observe_register() -/// @see iotcon_remote_resource_observe_register() -/// @see iotcon_remote_resource_observe_deregister() -/// @see iotcon_resource_notify() -typedef iotcon_remote_resource_observe_cb = ffi - .Pointer>; -typedef iotcon_remote_resource_observe_cbFunction = ffi.Void Function( - iotcon_remote_resource_h resource, - ffi.Int32 err, - ffi.Int sequence_number, - iotcon_response_h response, - ffi.Pointer user_data); -typedef Dartiotcon_remote_resource_observe_cbFunction = void Function( - iotcon_remote_resource_h resource, - int err, - int sequence_number, - iotcon_response_h response, - ffi.Pointer user_data); - -/// @brief Specifies the type of response function. -/// @details The function passed to iotcon_remote_resource_get(), iotcon_remote_resource_put(), -/// iotcon_remote_resource_post(), iotcon_remote_resource_delete().\n -/// The @a err could be one of #iotcon_error_e.\n -/// The @a request_type could be one of #iotcon_request_type_e.\n -/// The @a response is created by a server. Therefore, you can't get any values that the server didn't set. -/// @since_tizen 3.0 -/// @param[in] resource The handle of the resource -/// @param[in] err The error code -/// @param[in] request_type The request type -/// @param[in] response The handle of the response -/// @param[in] user_data The user data passed from the callback registration function -/// @pre The callback must be registered using iotcon_remote_resource_get(), iotcon_remote_resource_put(), iotcon_remote_resource_post(), iotcon_remote_resource_delete(). -/// @see iotcon_remote_resource_get() -/// @see iotcon_remote_resource_put() -/// @see iotcon_remote_resource_post() -/// @see iotcon_remote_resource_delete() -typedef iotcon_remote_resource_response_cb = ffi - .Pointer>; -typedef iotcon_remote_resource_response_cbFunction = ffi.Void Function( - iotcon_remote_resource_h resource, - ffi.Int32 err, - ffi.Int32 request_type, - iotcon_response_h response, - ffi.Pointer user_data); -typedef Dartiotcon_remote_resource_response_cbFunction = void Function( - iotcon_remote_resource_h resource, - int err, - int request_type, - iotcon_response_h response, - ffi.Pointer user_data); - -/// @brief Specifies the type of function passed to iotcon_remote_resource_start_caching(). -/// @since_tizen 3.0 -/// @param[in] resource The handle of the remote resource -/// @param[in] representation The handle of the representation -/// @param[in] user_data The user data to pass to the function -/// @pre The callback must be registered using iotcon_remote_resource_start_caching() -/// @see iotcon_remote_resource_start_caching() -/// @see iotcon_remote_resource_stop_caching() -typedef iotcon_remote_resource_cached_representation_changed_cb = ffi.Pointer< - ffi.NativeFunction< - iotcon_remote_resource_cached_representation_changed_cbFunction>>; -typedef iotcon_remote_resource_cached_representation_changed_cbFunction - = ffi.Void Function( - iotcon_remote_resource_h resource, - iotcon_representation_h representation, - ffi.Pointer user_data); -typedef Dartiotcon_remote_resource_cached_representation_changed_cbFunction - = void Function( - iotcon_remote_resource_h resource, - iotcon_representation_h representation, - ffi.Pointer user_data); - -/// @brief Specifies the type of function passed to iotcon_remote_resource_start_monitoring(). -/// @since_tizen 3.0 -/// @param[in] resource The handle of the remote resource -/// @param[in] state The state of the remote resource -/// @param[in] user_data The user data to pass to the function -/// @pre The callback must be registered using iotcon_remote_resource_start_monitoring() -/// @see iotcon_remote_resource_start_monitoring() -/// @see iotcon_remote_resource_stop_monitoring() -typedef iotcon_remote_resource_state_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef iotcon_remote_resource_state_changed_cbFunction = ffi.Void Function( - iotcon_remote_resource_h resource, - ffi.Int32 state, - ffi.Pointer user_data); -typedef Dartiotcon_remote_resource_state_changed_cbFunction = void Function( - iotcon_remote_resource_h resource, - int state, - ffi.Pointer user_data); - -/// @brief Specifies the type of function passed to iotcon_add_presence_cb(). -/// @details Called when client receives presence events from the server. -/// The @a response handle contains presence information. -/// @since_tizen 3.0 -/// @param[in] presence The presence handle -/// @param[in] err The error code(@c 0 on success, otherwise a negative error value) -/// @param[in] response The presence response handle -/// @param[in] user_data The user data to pass to the function -/// @pre The callback must be registered using iotcon_add_presence_cb(). -/// @see iotcon_add_presence_cb() -/// @see iotcon_remove_presence_cb() -/// @see iotcon_presence_response_get_connectivity_type() -/// @see iotcon_presence_response_get_host_address() -/// @see iotcon_presence_response_get_resource_type() -/// @see iotcon_presence_response_get_result() -/// @see iotcon_presence_response_get_trigger() -typedef iotcon_presence_cb - = ffi.Pointer>; -typedef iotcon_presence_cbFunction = ffi.Void Function( - iotcon_presence_h presence, - ffi.Int32 err, - iotcon_presence_response_h response, - ffi.Pointer user_data); -typedef Dartiotcon_presence_cbFunction = void Function( - iotcon_presence_h presence, - int err, - iotcon_presence_response_h response, - ffi.Pointer user_data); - -/// @brief The presence handle. -/// @details @a iotcon_presence_h is a handle of presence subscription. -/// It is used to cancel presence. -/// @since_tizen 3.0 -typedef iotcon_presence_h = ffi.Pointer; - -/// @brief The presence response handle. -/// @details @a iotcon_presence_response_h is a handle of presence response subscription. \n -/// It is used to get the information of presence response from server. -/// @since_tizen 3.0 -typedef iotcon_presence_response_h = ffi.Pointer; - -/// @brief Specifies the type of function passed to iotcon_find_resource(). -/// @details Called when a resource is found from the remote server. \n -/// The @a resource completes its life cycle in the function. -/// If you want to send requests(GET, PUT, POST, DELETE, and OBSERVE) on the @a resource, -/// you must clone the @a resource using iotcon_remote_resource_clone(). \n -/// The @a result could be one of #iotcon_error_e. -/// @since_tizen 3.0 -/// @param[in] resource The handle of resource which is found -/// @param[in] result The result code (Lesser than 0 on fail, otherwise a response result value) -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue to find resource, -/// otherwise @c false to stop \n -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre The callback must be registered using iotcon_find_resource() -/// @see iotcon_find_resource() -typedef iotcon_found_resource_cb - = ffi.Pointer>; -typedef iotcon_found_resource_cbFunction = ffi.Bool Function( - iotcon_remote_resource_h resource, - ffi.Int32 result, - ffi.Pointer user_data); -typedef Dartiotcon_found_resource_cbFunction = bool Function( - iotcon_remote_resource_h resource, - int result, - ffi.Pointer user_data); - -/// @brief Specifies the type of function passed to iotcon_find_device_info(). -/// @details The @a result could be one of #iotcon_error_e. -/// @since_tizen 3.0 -/// @param[in] device_info The device information from remote server -/// @param[in] result The result code (@c 0 on success, otherwise a negative error value) -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue to find device information, -/// otherwise @c false to stop \n -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_find_device_info() will invoke this callback function. -/// @see iotcon_find_device_info() -/// @see iotcon_device_info_get_property() -typedef iotcon_device_info_cb - = ffi.Pointer>; -typedef iotcon_device_info_cbFunction = ffi.Bool Function( - iotcon_device_info_h device_info, - ffi.Int32 result, - ffi.Pointer user_data); -typedef Dartiotcon_device_info_cbFunction = bool Function( - iotcon_device_info_h device_info, - int result, - ffi.Pointer user_data); - -/// @brief The device information handle. -/// @details @a iotcon_device_info_h is a handle of device information. -/// @since_tizen 3.0 -typedef iotcon_device_info_h = ffi.Pointer; - -/// @brief Specifies the type of function passed to iotcon_find_platform_info(). -/// @details The @a result could be one of #iotcon_error_e. -/// @since_tizen 3.0 -/// @param[in] platform_info The platform information from remote server -/// @param[in] result The result code (@c 0 on success, otherwise a negative error value) -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue to find platform information, -/// otherwise @c false to stop \n -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_find_platform_info() will invoke this callback function. -/// @see iotcon_find_platform_info() -/// @see iotcon_platform_info_get_property() -typedef iotcon_platform_info_cb - = ffi.Pointer>; -typedef iotcon_platform_info_cbFunction = ffi.Bool Function( - iotcon_platform_info_h platform_info, - ffi.Int32 result, - ffi.Pointer user_data); -typedef Dartiotcon_platform_info_cbFunction = bool Function( - iotcon_platform_info_h platform_info, - int result, - ffi.Pointer user_data); - -/// @brief The platform information handle. -/// @details @a iotcon_platform_info_h is a handle of platform information. -/// @since_tizen 3.0 -typedef iotcon_platform_info_h = ffi.Pointer; - -/// @brief Specifies the type of function passed to iotcon_add_generated_pin_cb(). -/// @details When a provisioning tool calls the function for registering this device, it is called, immediately. -/// @since_tizen 3.0 -/// @param[in] pin The pin number which is generated automatically -/// @param[in] user_data The user data to pass to the function -/// @pre The callback must be registered using iotcon_add_generated_pin_cb() -/// @see iotcon_add_generated_pin_cb() -/// @see iotcon_remove_generated_pin_cb() -typedef iotcon_generated_pin_cb - = ffi.Pointer>; -typedef iotcon_generated_pin_cbFunction = ffi.Void Function( - ffi.Pointer pin, ffi.Pointer user_data); -typedef Dartiotcon_generated_pin_cbFunction = void Function( - ffi.Pointer pin, ffi.Pointer user_data); - -/// @brief Error codes reported by the MTP API. -/// @since_tizen 3.0 -abstract class mtp_error_e { - /// < Successful - static const int MTP_ERROR_NONE = 0; - - /// < I/O error - static const int MTP_ERROR_IO_ERROR = -5; - - /// < Invalid parameter - static const int MTP_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int MTP_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied - static const int MTP_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int MTP_ERROR_NOT_SUPPORTED = -1073741822; - - /// < MTP communication error - static const int MTP_ERROR_COMM_ERROR = -30146559; - - /// < MTP controller error - static const int MTP_ERROR_CONTROLLER = -30146558; - - /// < MTP have not any device - static const int MTP_ERROR_NO_DEVICE = -30146557; - - /// < MTP is not initialized - static const int MTP_ERROR_NOT_INITIALIZED = -30146556; - - /// < MTP is not activated - static const int MTP_ERROR_NOT_ACTIVATED = -30146555; - - /// < MTP communication is not initialized - static const int MTP_ERROR_NOT_COMM_INITIALIZED = -30146554; - - /// < MTP Plugin failed - static const int MTP_ERROR_PLUGIN_FAIL = -30146553; -} - -/// @brief Enumerations for MTP Storage type -/// @since_tizen 3.0 -abstract class mtp_storage_type_e { - /// < Storage type is undefined - static const int MTP_STORAGE_TYPE_UNDEFINED = 0; - - /// < Storage type is fixed ROM - static const int MTP_STORAGE_TYPE_FIXED_ROM = 1; - - /// < Storage type is removable ROM - static const int MTP_STORAGE_TYPE_REMOVABLE_ROM = 2; - - /// < Storage type is fixed RAM - static const int MTP_STORAGE_TYPE_FIXED_RAM = 3; - - /// < Storage type is Removable RAM - static const int MTP_STORAGE_TYPE_REMOVABLE_RAM = 4; -} - -/// @brief Enumerations for MTP file type -/// @since_tizen 3.0 -abstract class mtp_filetype_e { - /// < FOLDER file type - static const int MTP_FILETYPE_FOLDER = 0; - - /// < WAV file type - static const int MTP_FILETYPE_WAV = 1; - - /// < MP3 file type - static const int MTP_FILETYPE_MP3 = 2; - - /// < WMA file type - static const int MTP_FILETYPE_WMA = 3; - - /// < OGG file type - static const int MTP_FILETYPE_OGG = 4; - - /// < AUDIBLE file type - static const int MTP_FILETYPE_AUDIBLE = 5; - - /// < MP4 file type - static const int MTP_FILETYPE_MP4 = 6; - - /// < UNDEF_AUDIO file type - static const int MTP_FILETYPE_UNDEF_AUDIO = 7; - - /// < WMV file type - static const int MTP_FILETYPE_WMV = 8; - - /// < AVI file type - static const int MTP_FILETYPE_AVI = 9; - - /// < MPEG file type - static const int MTP_FILETYPE_MPEG = 10; - - /// < ASF file type - static const int MTP_FILETYPE_ASF = 11; - - /// < QT file type - static const int MTP_FILETYPE_QT = 12; - - /// < UNDEF_VIDEO file type - static const int MTP_FILETYPE_UNDEF_VIDEO = 13; - - /// < JPEG file type - static const int MTP_FILETYPE_JPEG = 14; - - /// < JFIF file type - static const int MTP_FILETYPE_JFIF = 15; - - /// < TIFF file type - static const int MTP_FILETYPE_TIFF = 16; - - /// < BMP file type - static const int MTP_FILETYPE_BMP = 17; - - /// < GIF file type - static const int MTP_FILETYPE_GIF = 18; - - /// < PICT file type - static const int MTP_FILETYPE_PICT = 19; - - /// < PNG file type - static const int MTP_FILETYPE_PNG = 20; - - /// < VCALENDAR1 file type - static const int MTP_FILETYPE_VCALENDAR1 = 21; - - /// < VCALENDAR2 file type - static const int MTP_FILETYPE_VCALENDAR2 = 22; - - /// < VCARD2 file type - static const int MTP_FILETYPE_VCARD2 = 23; - - /// < VCARD3 file type - static const int MTP_FILETYPE_VCARD3 = 24; - - /// < WINDOWSIMAGEFORMAT file type - static const int MTP_FILETYPE_WINDOWSIMAGEFORMAT = 25; - - /// < WINEXEC file type - static const int MTP_FILETYPE_WINEXEC = 26; - - /// < TEXT file type - static const int MTP_FILETYPE_TEXT = 27; - - /// < HTML file type - static const int MTP_FILETYPE_HTML = 28; - - /// < FIRMWARE file type - static const int MTP_FILETYPE_FIRMWARE = 29; - - /// < AAC file type - static const int MTP_FILETYPE_AAC = 30; - - /// < MEDIACARD file type - static const int MTP_FILETYPE_MEDIACARD = 31; - - /// < FLAC file type - static const int MTP_FILETYPE_FLAC = 32; - - /// < MP2 file type - static const int MTP_FILETYPE_MP2 = 33; - - /// < M4A file type - static const int MTP_FILETYPE_M4A = 34; - - /// < DOC file type - static const int MTP_FILETYPE_DOC = 35; - - /// < XML file type - static const int MTP_FILETYPE_XML = 36; - - /// < XLS file type - static const int MTP_FILETYPE_XLS = 37; - - /// < PPT file type - static const int MTP_FILETYPE_PPT = 38; - - /// < MHT file type - static const int MTP_FILETYPE_MHT = 39; - - /// < JP2 file type - static const int MTP_FILETYPE_JP2 = 40; - - /// < JPX file type - static const int MTP_FILETYPE_JPX = 41; - - /// < ALBUM file type - static const int MTP_FILETYPE_ALBUM = 42; - - /// < PLAYLIST file type - static const int MTP_FILETYPE_PLAYLIST = 43; - - /// < Unknown file type - static const int MTP_FILETYPE_UNKNOWN = 44; - - /// < Helper enum value for certain function - static const int MTP_FILETYPE_ALL = 45; - - /// < Helper enum value for certain function - static const int MTP_FILETYPE_ALL_IMAGE = 46; -} - -/// @brief Enumerations for MTP event type -/// @since_tizen 3.0 -abstract class mtp_event_e { - /// < Unknown event type - static const int MTP_EVENT_UNKNOWN = 0; - - /// < Storage is added - static const int MTP_EVENT_STORAGE_ADDED = 1; - - /// < Storage is removed - static const int MTP_EVENT_STORAGE_REMOVED = 2; - - /// < Object is added - static const int MTP_EVENT_OBJECT_ADDED = 3; - - /// < Object is removed - static const int MTP_EVENT_OBJECT_REMOVED = 4; - - /// < Device is added - static const int MTP_EVENT_DEVICE_ADDED = 5; - - /// < Device is removed - static const int MTP_EVENT_DEVICE_REMOVED = 6; - - /// < MTP is turned off - static const int MTP_EVENT_TURNED_OFF = 7; -} - -/// @brief The handle to the mtp device -/// @since_tizen 3.0 -typedef mtp_device_h = ffi.Int; -typedef Dartmtp_device_h = int; - -/// @brief The handle to the mtp storage -/// @since_tizen 3.0 -typedef mtp_storage_h = ffi.Int; -typedef Dartmtp_storage_h = int; - -/// @brief The handle to the mtp object -/// @since_tizen 3.0 -typedef mtp_object_h = ffi.Int; -typedef Dartmtp_object_h = int; - -/// @brief Called when mtp event is occured. -/// @since_tizen 3.0 -/// @remarks Depending on the type of event, the meaning of event parameter is different. -/// - If event is device event, then event_parameter type is mtp_device_h. -/// - If event is storage event, then event_parameter type is mtp_storage_h. -/// - If event is object event, then event_parameter type is mtp_object_h. -/// - If event is MTP_EVENT_TURNED_OFF, then event_parameter is 0. -/// -/// @param [in] event The event -/// @param [in] event_parameter The event parameter -/// @param [in] user_data The user data passed from the callback registration function -/// -/// @see mtp_set_mtp_event_cb() -/// @see mtp_unset_mtp_event_cb() -typedef mtp_event_cb = ffi.Pointer>; -typedef mtp_event_cbFunction = ffi.Void Function( - ffi.Int32 event, ffi.Int event_parameter, ffi.Pointer user_data); -typedef Dartmtp_event_cbFunction = void Function( - int event, int event_parameter, ffi.Pointer user_data); - -/// @brief Enumeration for Network Service Discovery SSDP error code. -/// @since_tizen 3.0 -abstract class ssdp_error_e { - /// < Successful - static const int SSDP_ERROR_NONE = 0; - - /// < Out of memory - static const int SSDP_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied - static const int SSDP_ERROR_PERMISSION_DENIED = -13; - - /// < Invalid function parameter - static const int SSDP_ERROR_INVALID_PARAMETER = -22; - - /// < Not supported - static const int SSDP_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Not initialized - static const int SSDP_ERROR_NOT_INITIALIZED = -29949951; - - /// < Operation failed - static const int SSDP_ERROR_OPERATION_FAILED = -29949948; - - /// < Service not found - static const int SSDP_ERROR_SERVICE_NOT_FOUND = -29949947; - - /// < Service already registered - static const int SSDP_ERROR_SERVICE_ALREADY_REGISTERED = -29949946; -} - -/// @brief Enumeration for Network Service Discovery SSDP service browse state. -/// @since_tizen 3.0 -abstract class ssdp_service_state_e { - /// < A new service is available - static const int SSDP_SERVICE_STATE_AVAILABLE = 0; - - /// < A service is not available - static const int SSDP_SERVICE_STATE_UNAVAILABLE = 1; -} - -/// @brief The SSDP service handle. -/// @since_tizen 3.0 -typedef ssdp_service_h = ffi.UnsignedInt; -typedef Dartssdp_service_h = int; - -/// @brief Called when the registration of SSDP service is finished. -/// @since_tizen 3.0 -/// @param[in] result The result of registration -/// @param[in] ssdp_service The SSDP local service handle -/// @param[in] user_data The user data passed from the request function -/// @see ssdp_register_local_service() -typedef ssdp_registered_cb - = ffi.Pointer>; -typedef ssdp_registered_cbFunction = ffi.Void Function(ffi.Int32 result, - ssdp_service_h ssdp_local_service, ffi.Pointer user_data); -typedef Dartssdp_registered_cbFunction = void Function(int result, - Dartssdp_service_h ssdp_local_service, ffi.Pointer user_data); - -/// @brief The SSDP browser handle. -/// @since_tizen 3.0 -typedef ssdp_browser_h = ffi.UnsignedInt; -typedef Dartssdp_browser_h = int; - -/// @brief Called when a service has become available or unavailable. -/// @since_tizen 3.0 -/// @param[in] state The state of found service -/// @param[in] ssdp_service The SSDP remote service handle -/// @param[in] user_data The user data passed from the request function -/// @see ssdp_start_browsing_service() -typedef ssdp_found_cb = ffi.Pointer>; -typedef ssdp_found_cbFunction = ffi.Void Function(ffi.Int32 state, - ssdp_service_h ssdp_remote_service, ffi.Pointer user_data); -typedef Dartssdp_found_cbFunction = void Function(int state, - Dartssdp_service_h ssdp_remote_service, ffi.Pointer user_data); - -/// @brief Error codes reported by the smartcard API. -/// @since_tizen 2.3.1 -/// @ingroup CAPI_NETWORK_SMARTCARD_SE_SERVICE_MODULE -abstract class smartcard_error_e { - /// < Successful - static const int SMARTCARD_ERROR_NONE = 0; - - /// < A general error occurred - static const int SMARTCARD_ERROR_GENERAL = -29818879; - - /// < I/O error - static const int SMARTCARD_ERROR_IO_ERROR = -5; - - /// < No such element error - static const int SMARTCARD_ERROR_NO_SUCH_ELEMENT = -29818878; - - /// < Illegal state of execution error - static const int SMARTCARD_ERROR_ILLEGAL_STATE = -29818877; - - /// < Invalid function parameter - static const int SMARTCARD_ERROR_INVALID_PARAMETER = -22; - - /// < Illegal reference - static const int SMARTCARD_ERROR_ILLEGAL_REFERENCE = -29818876; - - /// < Operation not supported from SE - static const int SMARTCARD_ERROR_OPERATION_NOT_SUPPORTED = -29818875; - - /// < Permission denied - static const int SMARTCARD_ERROR_PERMISSION_DENIED = -13; - - /// < No channel available - static const int SMARTCARD_ERROR_CHANNEL_NOT_AVAILABLE = -29818874; - - /// < Smartcard service not initialized - static const int SMARTCARD_ERROR_NOT_INITIALIZED = -29818873; - - /// < Not supported - static const int SMARTCARD_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Out of memory - static const int SMARTCARD_ERROR_OUT_OF_MEMORY = -12; -} - -/// @brief Enumerations for Smartcard reader event type -/// @since_tizen 3.0 -/// @ingroup CAPI_NETWORK_SMARTCARD_READER_MODULE -abstract class smartcard_reader_event_type_e { - /// < This event notifies the application that I/O error occurs on smartcard reader - static const int SMARTCARD_READER_EVENT_TYPE_IO_ERROR = 0; - - /// < This event notifies the application that smartcard reader is inserted - static const int SMARTCARD_READER_EVENT_TYPE_INSERTED = 1; - - /// < This event notifies the application that smartcard reader is removed - static const int SMARTCARD_READER_EVENT_TYPE_REMOVED = 2; -} - -/// @brief Called when a smartcard reader event occurs. -/// @since_tizen 3.0 -/// @ingroup CAPI_NETWORK_SMARTCARD_READER_MODULE -/// -/// @param [in] reader The reader handle -/// @param [in] event_type The reader event type -/// @param [in] user_data The user data passed from the callback registration function -/// -/// @see smartcard_reader_set_event_cb() -/// @see smartcard_reader_unset_event_cb() -typedef smartcard_reader_event_cb - = ffi.Pointer>; -typedef smartcard_reader_event_cbFunction = ffi.Void Function( - ffi.Int reader, ffi.Int32 event_type, ffi.Pointer user_data); -typedef Dartsmartcard_reader_event_cbFunction = void Function( - int reader, int event_type, ffi.Pointer user_data); - -/// @brief Enumeration for the Wi-Fi error type. -/// @since_tizen 3.0 -abstract class wifi_manager_error_e { - /// Successful - static const int WIFI_MANAGER_ERROR_NONE = 0; - - /// Invalid parameter - static const int WIFI_MANAGER_ERROR_INVALID_PARAMETER = -22; - - /// Out of memory error - static const int WIFI_MANAGER_ERROR_OUT_OF_MEMORY = -12; - - /// Invalid operation - static const int WIFI_MANAGER_ERROR_INVALID_OPERATION = -38; - - /// Address family not supported - static const int WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED = -97; - - /// Operation failed - static const int WIFI_MANAGER_ERROR_OPERATION_FAILED = -30277631; - - /// There is no connected AP - static const int WIFI_MANAGER_ERROR_NO_CONNECTION = -30277630; - - /// Now in progress - static const int WIFI_MANAGER_ERROR_NOW_IN_PROGRESS = -115; - - /// Already exists - static const int WIFI_MANAGER_ERROR_ALREADY_EXISTS = -30277629; - - /// Operation is aborted - static const int WIFI_MANAGER_ERROR_OPERATION_ABORTED = -30277628; - - /// DHCP failed - static const int WIFI_MANAGER_ERROR_DHCP_FAILED = -30277627; - - /// Invalid key - static const int WIFI_MANAGER_ERROR_INVALID_KEY = -30277626; - - /// No reply - static const int WIFI_MANAGER_ERROR_NO_REPLY = -30277625; - - /// Restricted by security system policy - static const int WIFI_MANAGER_ERROR_SECURITY_RESTRICTED = -30277624; - - /// Already initialized - static const int WIFI_MANAGER_ERROR_ALREADY_INITIALIZED = -30277623; - - /// Out of range - static const int WIFI_MANAGER_ERROR_OUT_OF_RANGE = -30277622; - - /// Connect failed - static const int WIFI_MANAGER_ERROR_CONNECT_FAILED = -30277621; - - /// Login failed - static const int WIFI_MANAGER_ERROR_LOGIN_FAILED = -30277620; - - /// Authentication failed - static const int WIFI_MANAGER_ERROR_AUTHENTICATION_FAILED = -30277619; - - /// PIN missing - static const int WIFI_MANAGER_ERROR_PIN_MISSING = -30277618; - - /// WPS Overlap (Since 4.0) - static const int WIFI_MANAGER_ERROR_WPS_OVERLAP = -30277617; - - /// WPS Timeout (Since 4.0) - static const int WIFI_MANAGER_ERROR_WPS_TIMEOUT = -30277616; - - /// WPS WEP Prohibited (Since 4.0) - static const int WIFI_MANAGER_ERROR_WPS_WEP_PROHIBITED = -30277615; - - /// Permission Denied - static const int WIFI_MANAGER_ERROR_PERMISSION_DENIED = -13; - - /// Not Supported - static const int WIFI_MANAGER_ERROR_NOT_SUPPORTED = -1073741822; -} - -/// @brief Enumeration for the state of the Wi-Fi device. -/// @since_tizen 3.0 -abstract class wifi_manager_device_state_e { - /// < Wi-Fi is Deactivated - static const int WIFI_MANAGER_DEVICE_STATE_DEACTIVATED = 0; - - /// < Wi-Fi is activated - static const int WIFI_MANAGER_DEVICE_STATE_ACTIVATED = 1; -} - -/// @brief Enumeration for the state of the Wi-Fi connection. -/// @since_tizen 3.0 -abstract class wifi_manager_connection_state_e { - /// < Connection failed state - static const int WIFI_MANAGER_CONNECTION_STATE_FAILURE = -1; - - /// < Disconnected state - static const int WIFI_MANAGER_CONNECTION_STATE_DISCONNECTED = 0; - - /// < Association state - static const int WIFI_MANAGER_CONNECTION_STATE_ASSOCIATION = 1; - - /// < Configuration state - static const int WIFI_MANAGER_CONNECTION_STATE_CONFIGURATION = 2; - - /// < Connected state - static const int WIFI_MANAGER_CONNECTION_STATE_CONNECTED = 3; -} - -/// @brief Enumeration for the state of the static IP conflict. -/// @since_tizen 5.0 -abstract class wifi_manager_ip_conflict_state_e { - /// < Unknown state - static const int WIFI_MANAGER_IP_CONFLICT_STATE_UNKNOWN = 0; - - /// < Resolved state - static const int WIFI_MANAGER_IP_CONFLICT_STATE_CONFLICT_NOT_DETECTED = 1; - - /// < Conflict state - static const int WIFI_MANAGER_IP_CONFLICT_STATE_CONFLICT_DETECTED = 2; -} - -/// @brief Enumeration for the RSSI level. -/// @since_tizen 3.0 -abstract class wifi_manager_rssi_level_e { - /// < No signal - static const int WIFI_MANAGER_RSSI_LEVEL_0 = 0; - - /// < Very weak signal ~ -83dBm - static const int WIFI_MANAGER_RSSI_LEVEL_1 = 1; - - /// < Weak signal -82 ~ -75dBm - static const int WIFI_MANAGER_RSSI_LEVEL_2 = 2; - - /// < Strong signal -74 ~ -64dBm - static const int WIFI_MANAGER_RSSI_LEVEL_3 = 3; - - /// < Very strong signal -63dBm ~ - static const int WIFI_MANAGER_RSSI_LEVEL_4 = 4; -} - -/// @brief Enumeration for the wifi scanning state. -/// @since_tizen 4.0 -abstract class wifi_manager_scan_state_e { - /// < Scan is not running - static const int WIFI_MANAGER_SCAN_STATE_NOT_SCANNING = 0; - - /// < Scan is in progress - static const int WIFI_MANAGER_SCAN_STATE_SCANNING = 1; -} - -/// @brief Enumeration for the TDLS Discovery State. -/// @since_tizen 4.0 -abstract class wifi_manager_tdls_discovery_state_e { - /// < Discovery is in progress - static const int WIFI_MANAGER_TDLS_DISCOVERY_STATE_ONGOING = 0; - - /// < Discovery is finished - static const int WIFI_MANAGER_TDLS_DISCOVERY_STATE_FINISHED = 1; -} - -/// @brief Enumeration for the Wi-Fi Module state. -/// @since_tizen 4.0 -abstract class wifi_manager_module_state_e { - /// < Wi-Fi Module is detached - static const int WIFI_MANAGER_MODULE_STATE_DETACHED = 0; - - /// < Wi-Fi Module is attached - static const int WIFI_MANAGER_MODULE_STATE_ATTACHED = 1; -} - -/// @brief Enumeration for the Net IP configuration type. -/// @since_tizen 3.0 -abstract class wifi_manager_ip_config_type_e { - /// Not defined - static const int WIFI_MANAGER_IP_CONFIG_TYPE_NONE = 0; - - /// Manual IP configuration - static const int WIFI_MANAGER_IP_CONFIG_TYPE_STATIC = 1; - - /// Config IP using DHCP client - static const int WIFI_MANAGER_IP_CONFIG_TYPE_DYNAMIC = 2; - - /// Config IP from Auto IP pool (169.254/16). Later with DHCP client, if available - static const int WIFI_MANAGER_IP_CONFIG_TYPE_AUTO = 3; - - /// Indicates an IP address that can not be modified - static const int WIFI_MANAGER_IP_CONFIG_TYPE_FIXED = 4; -} - -/// @brief Enumeration for DNS Configuration type. -/// @since_tizen 4.0 -abstract class wifi_manager_dns_config_type_e { - /// < Not defined - static const int WIFI_MANAGER_DNS_CONFIG_TYPE_NONE = 0; - - /// < Manual DNS configuration - static const int WIFI_MANAGER_DNS_CONFIG_TYPE_STATIC = 1; - - /// < Config DNS using DHCP client - static const int WIFI_MANAGER_DNS_CONFIG_TYPE_DYNAMIC = 2; -} - -/// @brief Enumeration for the address type. -/// @since_tizen 3.0 -abstract class wifi_manager_address_family_e { - /// < IPV4 Address family - static const int WIFI_MANAGER_ADDRESS_FAMILY_IPV4 = 0; - - /// < IPV6 Address family - static const int WIFI_MANAGER_ADDRESS_FAMILY_IPV6 = 1; -} - -/// @brief Enumeration for the proxy method type. -/// @since_tizen 3.0 -abstract class wifi_manager_proxy_type_e { - /// Direct connection - static const int WIFI_MANAGER_PROXY_TYPE_DIRECT = 0; - - /// Auto configuration(Use PAC file). If URL property is not set, - /// DHCP/WPAD auto-discover will be tried - static const int WIFI_MANAGER_PROXY_TYPE_AUTO = 1; - - /// Manual configuration - static const int WIFI_MANAGER_PROXY_TYPE_MANUAL = 2; -} - -/// @brief Enumeration for Wi-Fi security type. -/// @details The following security modes are used in infrastructure and ad-hoc mode. -/// For now all EAP security mechanisms are provided only in infrastructure mode. -/// -/// @since_tizen 3.0 -abstract class wifi_manager_security_type_e { - /// < Security disabled - static const int WIFI_MANAGER_SECURITY_TYPE_NONE = 0; - - /// < WEP - static const int WIFI_MANAGER_SECURITY_TYPE_WEP = 1; - - /// < WPA-PSK - static const int WIFI_MANAGER_SECURITY_TYPE_WPA_PSK = 2; - - /// < WPA2-PSK - static const int WIFI_MANAGER_SECURITY_TYPE_WPA2_PSK = 3; - - /// < EAP - static const int WIFI_MANAGER_SECURITY_TYPE_EAP = 4; -} - -/// @brief Enumeration for Wi-Fi encryption type. -/// @details The following encryption modes are used in infrastructure and ad-hoc mode. -/// @since_tizen 3.0 -abstract class wifi_manager_encryption_type_e { - /// < Encryption disabled - static const int WIFI_MANAGER_ENCRYPTION_TYPE_NONE = 0; - - /// < WEP - static const int WIFI_MANAGER_ENCRYPTION_TYPE_WEP = 1; - - /// < TKIP - static const int WIFI_MANAGER_ENCRYPTION_TYPE_TKIP = 2; - - /// < AES - static const int WIFI_MANAGER_ENCRYPTION_TYPE_AES = 3; - - /// < TKIP and AES are both supported - static const int WIFI_MANAGER_ENCRYPTION_TYPE_TKIP_AES_MIXED = 4; -} - -/// @brief Enumeration for EAP type. -/// @since_tizen 3.0 -abstract class wifi_manager_eap_type_e { - /// < EAP PEAP type - static const int WIFI_MANAGER_EAP_TYPE_PEAP = 0; - - /// < EAP TLS type - static const int WIFI_MANAGER_EAP_TYPE_TLS = 1; - - /// < EAP TTLS type - static const int WIFI_MANAGER_EAP_TYPE_TTLS = 2; - - /// < EAP SIM type - static const int WIFI_MANAGER_EAP_TYPE_SIM = 3; - - /// < EAP AKA type - static const int WIFI_MANAGER_EAP_TYPE_AKA = 4; -} - -/// @brief Enumeration for EAP phase2 authentication type. -/// @since_tizen 3.0 -abstract class wifi_manager_eap_auth_type_e { - /// < EAP phase2 authentication none - static const int WIFI_MANAGER_EAP_AUTH_TYPE_NONE = 0; - - /// < EAP phase2 authentication PAP - static const int WIFI_MANAGER_EAP_AUTH_TYPE_PAP = 1; - - /// < EAP phase2 authentication MSCHAP - static const int WIFI_MANAGER_EAP_AUTH_TYPE_MSCHAP = 2; - - /// < EAP phase2 authentication MSCHAPv2 - static const int WIFI_MANAGER_EAP_AUTH_TYPE_MSCHAPV2 = 3; - - /// < EAP phase2 authentication GTC - static const int WIFI_MANAGER_EAP_AUTH_TYPE_GTC = 4; - - /// < EAP phase2 authentication MD5 - static const int WIFI_MANAGER_EAP_AUTH_TYPE_MD5 = 5; -} - -/// @brief Enumeration for Wi-Fi disconnect reason, provided by the supplicant. -/// @since_tizen 4.0 -abstract class wifi_manager_disconnect_reason_e { - /// Locally Generate Disconnect from user side (Since 5.0) - static const int WIFI_REASON_LOCAL_GENERATE_FROM_USER = -3; - - /// Unspecified reason - static const int WIFI_REASON_UNSPECIFIED = 1; - - /// Previous authentication no longer valid - static const int WIFI_REASON_PREV_AUTH_NOT_VALID = 2; - - /// Deauthenticated because sending STA is leaving (or has left) IBSS or ESS - static const int WIFI_REASON_DEAUTH_LEAVING = 3; - - /// Disassociated due to inactivity - static const int WIFI_REASON_DISASSOC_DUE_TO_INACTIVITY = 4; - - /// Disassociated because AP is unable to handle all currently associated STAs - static const int WIFI_REASON_DISASSOC_AP_BUSY = 5; - - /// Class 2 frame received from nonauthenticated STA - static const int WIFI_REASON_CLASS2_FRAME_FROM_NONAUTH_STA = 6; - - /// Class 3 frame received from nonassociated STA - static const int WIFI_REASON_CLASS3_FRAME_FROM_NONASSOC_STA = 7; - - /// Disassociated because sending STA is leaving (or has left) BSS - static const int WIFI_REASON_DISASSOC_STA_HAS_LEFT = 8; - - /// STA requesting (re)association is not authenticated with responding STA - static const int WIFI_REASON_STA_REQ_ASSOC_WITHOUT_AUTH = 9; - - /// Disassociated because the information in the Power Capability - /// element is unacceptable - static const int WIFI_REASON_PWR_CAPABILITY_NOT_VALID = 10; - - /// Disassociated because the information in the Supported Channels - /// element is unacceptable - static const int WIFI_REASON_SUPPORTED_CHANNEL_NOT_VALID = 11; - - /// Invalid element i.e., an element defined in this standard for which the - /// content does not meet the specifications in Clause 8 - static const int WIFI_REASON_INVALID_IE = 13; - - /// Message Integrity Code (MIC) failure - static const int WIFI_REASON_MICHAEL_MIC_FAILURE = 14; - - /// 4-Way Handshake timeout - static const int WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT = 15; - - /// Group Key Handshake timeout - static const int WIFI_REASON_GROUP_KEY_UPDATE_TIMEOUT = 16; - - /// Element in 4-Way Handshake different from (Re)Association Request/Probe - /// Response/Beacon frame - static const int WIFI_REASON_IE_IN_4WAY_DIFFERS = 17; - - /// Invalid group cipher - static const int WIFI_REASON_GROUP_CIPHER_NOT_VALID = 18; - - /// Invalid pairwise cipher - static const int WIFI_REASON_PAIRWISE_CIPHER_NOT_VALID = 19; - - /// Invalid AKMP - static const int WIFI_REASON_AKMP_NOT_VALID = 20; - - /// Unsupported RSNE version - static const int WIFI_REASON_UNSUPPORTED_RSN_IE_VERSION = 21; - - /// Invalid RSNE capabilities - static const int WIFI_REASON_INVALID_RSN_IE_CAPAB = 22; - - /// IEEE 802.1X authentication failed - static const int WIFI_REASON_IEEE_802_1X_AUTH_FAILED = 23; - - /// Cipher suite rejected because of the security policy - static const int WIFI_REASON_CIPHER_SUITE_REJECTED = 24; - - /// TDLS direct-link teardown due to TDLS peer STA unreachable via the - /// TDLS direct link - static const int WIFI_REASON_TDLS_TEARDOWN_UNREACHABLE = 25; - - /// TDLS direct-link teardown for unspecified reason - static const int WIFI_REASON_TDLS_TEARDOWN_UNSPECIFIED = 26; - - /// Disassociated because excessive number of frames need to be acknowledged, - /// but are not acknowledged due to AP transmissions and/or poor channel conditions - static const int WIFI_REASON_DISASSOC_LOW_ACK = 34; - - /// SME cancels the mesh peering instance with the reason other than reaching - /// the maximum number of peer mesh STAs - static const int WIFI_REASON_MESH_PEERING_CANCELLED = 52; - - /// The mesh STA has reached the supported maximum number of peer mesh STAs - static const int WIFI_REASON_MESH_MAX_PEERS = 53; - - /// The received information violates the Mesh Configuration policy - /// configured in the mesh STA profile - static const int WIFI_REASON_MESH_CONFIG_POLICY_VIOLATION = 54; - - /// The mesh STA has received a Mesh Peering Close message requesting - /// to close the mesh peering - static const int WIFI_REASON_MESH_CLOSE_RCVD = 55; - - /// The mesh STA has resent dot11MeshMaxRetries Mesh Peering Open messages, - /// without receiving a Mesh Peering Confirm message - static const int WIFI_REASON_MESH_MAX_RETRIES = 56; - - /// The confirmTimer for the mesh peering instance times out - static const int WIFI_REASON_MESH_CONFIRM_TIMEOUT = 57; - - /// The mesh STA fails to unwrap the GTK or the values in the wrapped - /// contents do not match - static const int WIFI_REASON_MESH_INVALID_GTK = 58; - - /// The mesh STA receives inconsistent information about the mesh parameters - /// between Mesh Peering Management frames - static const int WIFI_REASON_MESH_INCONSISTENT_PARAMS = 59; - - /// The mesh STA does not have proxy information for this external destination - static const int WIFI_REASON_MESH_INVALID_SECURITY_CAP = 60; -} - -/// @brief Enumeration for Wi-Fi Association Status code, provided by the supplicant. -/// @details The Wi-Fi Standard Reference : Status codes (IEEE 802.11-2007, 7.3.1.9, Table 7-23). -/// @since_tizen 5.0 -abstract class wifi_manager_assoc_status_code_e { - /// Successful - static const int WLAN_STATUS_SUCCESS = 0; - - /// Unspecified failure - static const int WLAN_STATUS_UNSPECIFIED_FAILURE = 1; - - /// Responding STA does not support the specified authentication - /// algorithm - static const int WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG = 13; - - /// Association denied because AP is unable to handle additional - /// associated STAs - static const int WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA = 17; - - /// Association denied because the requesting STA does not support - /// HT feature - static const int WLAN_STATUS_ASSOC_DENIED_NO_HT = 27; - - /// Association request rejected temporarily - static const int WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY = 30; - - /// Robust management frame policy violation - static const int WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION = 31; - - /// Invalid element - static const int WLAN_STATUS_INVALID_IE = 40; - - /// Invalid group cipher - static const int WLAN_STATUS_GROUP_CIPHER_NOT_VALID = 41; - - /// Invalid pairwise cipher - static const int WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID = 42; - - /// Invalid AKMP - static const int WLAN_STATUS_AKMP_NOT_VALID = 43; - - /// Cipher suite rejected because of security policy - static const int WLAN_STATUS_CIPHER_REJECTED_PER_POLICY = 46; - - /// Association denied because the Listen interval is too large - static const int WLAN_STATUS_ASSOC_DENIED_LISTEN_INT_TOO_LARGE = 51; - - /// Invalid pairwise master key identifier (PKMID) - static const int WLAN_STATUS_INVALID_PMKID = 53; - - /// Invalid MDE - static const int WLAN_STATUS_INVALID_MDIE = 54; - - /// Invalid FTE - static const int WLAN_STATUS_INVALID_FTIE = 55; - - /// Association denied because the requesting STA does not support - /// VHT feature - static const int WLAN_STATUS_ASSOC_DENIED_NO_VHT = 104; -} - -/// @brief Enumeration for the state of the Wi-Fi TDLS. -/// @since_tizen 3.0 -abstract class wifi_manager_tdls_state_e { - /// < Wi-Fi TDLS is Disconnected - static const int WIFI_MANAGER_TDLS_STATE_DISCONNECTED = 0; - - /// < Wi-Fi TDLS is Connected - static const int WIFI_MANAGER_TDLS_STATE_CONNECTED = 1; -} - -/// @brief Enumeration for Wi-Fi Frame type. -/// @since_tizen 5.0 -/// @see wifi_manager_add_vsie() -/// @see wifi_manager_remove_vsie() -/// @see wifi_manager_get_vsie() -abstract class wifi_manager_vsie_frames_e { - /// WiFi probe request frame - static const int WIFI_MANAGER_VSIE_FRAME_PROBE_REQ = 0; - - /// WiFi association request frame - static const int WIFI_MANAGER_VSIE_FRAME_ASSOC_REQ = 1; - - /// WiFi re-association request frame - static const int WIFI_MANAGER_VSIE_FRAME_REASSOC = 2; - - /// WiFi authentication request frame - static const int WIFI_MANAGER_VSIE_FRAME_AUTH_REQ = 3; - - /// WiFi action frame - static const int WIFI_MANAGER_VSIE_FRAME_ACTION = 4; -} - -/// @brief The Wi-Fi manager handle. -/// @since_tizen 3.0 -typedef wifi_manager_h = ffi.Pointer; - -/// @brief Called after wifi_manager_activate() or wifi_manager_activate_with_wifi_picker_tested() is completed. -/// @since_tizen 3.0 -/// @param[in] result The result -/// @param[in] user_data The user data passed from wifi_manager_activate() and wifi_manager_activate_with_wifi_picker_tested() -/// @pre wifi_manager_activate() or wifi_manager_activate_with_wifi_picker_tested() will invoke this callback function. -/// @see wifi_manager_activate() -/// @see wifi_manager_activate_with_wifi_picker_tested() -typedef wifi_manager_activated_cb - = ffi.Pointer>; -typedef wifi_manager_activated_cbFunction = ffi.Void Function( - ffi.Int32 result, ffi.Pointer user_data); -typedef Dartwifi_manager_activated_cbFunction = void Function( - int result, ffi.Pointer user_data); - -/// @brief Called after wifi_manager_deactivate() is completed. -/// @since_tizen 3.0 -/// @param[in] result The result -/// @param[in] user_data The user data passed from wifi_manager_deactivate() -/// @pre wifi_manager_deactivate() will invoke this callback function. -/// @see wifi_manager_deactivate() -typedef wifi_manager_deactivated_cb - = ffi.Pointer>; -typedef wifi_manager_deactivated_cbFunction = ffi.Void Function( - ffi.Int32 result, ffi.Pointer user_data); -typedef Dartwifi_manager_deactivated_cbFunction = void Function( - int result, ffi.Pointer user_data); - -/// @brief Called when the scan is finished. -/// @since_tizen 3.0 -/// @param[in] error_code The error code -/// @param[in] user_data The user data passed from the callback registration function -/// @see wifi_manager_scan() -/// @see wifi_manager_set_background_scan_cb() -/// @see wifi_manager_unset_background_scan_cb() -typedef wifi_manager_scan_finished_cb - = ffi.Pointer>; -typedef wifi_manager_scan_finished_cbFunction = ffi.Void Function( - ffi.Int32 error_code, ffi.Pointer user_data); -typedef Dartwifi_manager_scan_finished_cbFunction = void Function( - int error_code, ffi.Pointer user_data); - -/// @brief The Wi-Fi specific ap scan handle. -/// @since_tizen 4.0 -typedef wifi_manager_specific_scan_h = ffi.Pointer; - -/// @brief Called when the connection process is completed. -/// @details The following functions start the connection process and will -/// result in the callback being called: -/// - wifi_manager_connect() -/// - wifi_manager_connect_by_wps_pbc() -/// - wifi_manager_connect_by_wps_pin() -/// - wifi_manager_connect_by_wps_pbc_without_ssid() -/// - wifi_manager_connect_by_wps_pin_without_ssid() -/// - wifi_manager_connect_hidden_ap() -/// @since_tizen 3.0 -/// @param[in] result The result -/// @param[in] user_data The user data passed from the connection function. -/// @pre Any connection function will invoke this callback. -/// @see wifi_manager_connect() -/// @see wifi_manager_connect_by_wps_pbc() -/// @see wifi_manager_connect_by_wps_pin() -/// @see wifi_manager_connect_by_wps_pbc_without_ssid() -/// @see wifi_manager_connect_by_wps_pin_without_ssid() -/// @see wifi_manager_connect_hidden_ap() -typedef wifi_manager_connected_cb - = ffi.Pointer>; -typedef wifi_manager_connected_cbFunction = ffi.Void Function( - ffi.Int32 result, ffi.Pointer user_data); -typedef Dartwifi_manager_connected_cbFunction = void Function( - int result, ffi.Pointer user_data); - -/// @brief The Wi-Fi access point handle. -/// @since_tizen 3.0 -typedef wifi_manager_ap_h = ffi.Pointer; - -/// @brief Called for each found access point. -/// @since_tizen 3.0 -/// @remarks @a AP is valid only in this function. In order to use @a AP outside this function, you must copy the AP with wifi_manager_ap_clone(). -/// @param[in] ap The access point -/// @param[in] user_data The user data passed from the request function -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// @pre wifi_manager_foreach_found_ap() will invoke this callback. -/// @pre wifi_manager_foreach_found_specific_ap() will invoke this callback. -/// @see wifi_manager_foreach_found_ap() -/// @see wifi_manager_foreach_found_specific_ap() -typedef wifi_manager_found_ap_cb - = ffi.Pointer>; -typedef wifi_manager_found_ap_cbFunction = ffi.Bool Function( - wifi_manager_ap_h ap, ffi.Pointer user_data); -typedef Dartwifi_manager_found_ap_cbFunction = bool Function( - wifi_manager_ap_h ap, ffi.Pointer user_data); - -/// @brief Called after wifi_manager_disconnect() is completed. -/// @since_tizen 3.0 -/// @param[in] result The result -/// @param[in] user_data The user data passed from wifi_manager_disconnect() -/// @pre wifi_manager_disconnect() will invoke this callback function. -/// @see wifi_manager_disconnect() -typedef wifi_manager_disconnected_cb - = ffi.Pointer>; -typedef wifi_manager_disconnected_cbFunction = ffi.Void Function( - ffi.Int32 result, ffi.Pointer user_data); -typedef Dartwifi_manager_disconnected_cbFunction = void Function( - int result, ffi.Pointer user_data); - -/// @brief Called when the device state is changed. -/// @since_tizen 3.0 -/// @param[in] state The device state -/// @param[in] user_data The user data passed from the callback registration function -/// @see wifi_manager_set_device_state_changed_cb() -/// @see wifi_manager_unset_device_state_changed_cb() -typedef wifi_manager_device_state_changed_cb = ffi - .Pointer>; -typedef wifi_manager_device_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 state, ffi.Pointer user_data); -typedef Dartwifi_manager_device_state_changed_cbFunction = void Function( - int state, ffi.Pointer user_data); - -/// @brief Called when the scanning state is changed. -/// @since_tizen 4.0 -/// @param[in] state The wifi scanning state -/// @param[in] user_data The user data passed from the callback registration function -/// @see wifi_manager_set_scan_state_changed_cb() -/// @see wifi_manager_unset_scan_state_changed_cb() -typedef wifi_manager_scan_state_changed_cb = ffi - .Pointer>; -typedef wifi_manager_scan_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 state, ffi.Pointer user_data); -typedef Dartwifi_manager_scan_state_changed_cbFunction = void Function( - int state, ffi.Pointer user_data); - -/// @brief Called when the connection state is changed. -/// @since_tizen 3.0 -/// @param[in] state The connection state -/// @param[in] ap The access point -/// @param[in] user_data The user data passed from the callback registration function -/// @see wifi_manager_set_connection_state_changed_cb() -/// @see wifi_manager_unset_connection_state_changed_cb() -typedef wifi_manager_connection_state_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef wifi_manager_connection_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 state, wifi_manager_ap_h ap, ffi.Pointer user_data); -typedef Dartwifi_manager_connection_state_changed_cbFunction = void Function( - int state, wifi_manager_ap_h ap, ffi.Pointer user_data); - -/// @brief Called when the RSSI of connected Wi-Fi is changed. -/// @since_tizen 3.0 -/// @param[in] rssi_level The level of RSSI -/// @param[in] user_data The user data passed from the callback registration function -/// @see wifi_manager_set_rssi_level_changed_cb() -/// @see wifi_manager_unset_rssi_level_changed_cb() -typedef wifi_manager_rssi_level_changed_cb = ffi - .Pointer>; -typedef wifi_manager_rssi_level_changed_cbFunction = ffi.Void Function( - ffi.Int32 rssi_level, ffi.Pointer user_data); -typedef Dartwifi_manager_rssi_level_changed_cbFunction = void Function( - int rssi_level, ffi.Pointer user_data); - -/// @brief Called when the Wi-Fi Module state is changed. -/// @since_tizen 4.0 -/// @param[in] wifi_module_state The Wi-Fi Module state -/// @param[in] user_data The user data passed from the callback registration function -/// @see wifi_manager_set_module_state_changed_cb() -/// @see wifi_manager_unset_module_state_changed_cb() -typedef wifi_manager_module_state_changed_cb = ffi - .Pointer>; -typedef wifi_manager_module_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 wifi_module_state, ffi.Pointer user_data); -typedef Dartwifi_manager_module_state_changed_cbFunction = void Function( - int wifi_module_state, ffi.Pointer user_data); - -/// @brief Called when the BSSID scan is finished. -/// @since_tizen 4.0 -/// @param[in] error_code The error code -/// @param[in] user_data The user data passed from the callback registration function -/// @see wifi_manager_scan() -/// @see wifi_manager_bssid_scan() -/// @see wifi_manager_set_background_scan_cb() -/// @see wifi_manager_unset_background_scan_cb() -typedef wifi_manager_bssid_scan_finished_cb = ffi - .Pointer>; -typedef wifi_manager_bssid_scan_finished_cbFunction = ffi.Void Function( - ffi.Int32 error_code, ffi.Pointer user_data); -typedef Dartwifi_manager_bssid_scan_finished_cbFunction = void Function( - int error_code, ffi.Pointer user_data); - -/// @brief Called with an IPv6 address. -/// @since_tizen 4.0 -/// @remarks If @a ipv6_address is needed outside the callback, a copy should be -/// made. @a ipv6_address will be freed automatically after the execution -/// of this callback. -/// @param[in] ipv6_address The IPv6 address -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n -/// @c false to break out of the loop -/// @pre wifi_manager_ap_foreach_ipv6_address() will invoke this callback. -/// @see wifi_manager_ap_foreach_ipv6_address() -typedef wifi_manager_ap_ipv6_address_cb - = ffi.Pointer>; -typedef wifi_manager_ap_ipv6_address_cbFunction = ffi.Bool Function( - ffi.Pointer ipv6_address, ffi.Pointer user_data); -typedef Dartwifi_manager_ap_ipv6_address_cbFunction = bool Function( - ffi.Pointer ipv6_address, ffi.Pointer user_data); - -/// @brief The Wi-Fi access point configuration handle -/// @since_tizen 3.0 -typedef wifi_manager_config_h = ffi.Pointer; - -/// @brief Called for each found access point configuration. -/// @since_tizen 3.0 -/// @remarks @a config is valid only in this function. In order to use @a config outside this function, you must copy the config with wifi_manager_config_clone(). -/// -/// @param[in] config The access point configuration handle -/// @param[in] user_data The user data passed from the request function -/// -/// @return @c true to continue with the next iteration of the loop, otherwise @c false to break out of the loop \n -/// @pre wifi_manager_config_foreach_configuration() will invoke this callback. -/// @see wifi_manager_config_foreach_configuration() -typedef wifi_manager_config_list_cb - = ffi.Pointer>; -typedef wifi_manager_config_list_cbFunction = ffi.Bool Function( - wifi_manager_config_h config, ffi.Pointer user_data); -typedef Dartwifi_manager_config_list_cbFunction = bool Function( - wifi_manager_config_h config, ffi.Pointer user_data); - -/// @brief Called when the Wi-Fi TDLS is discovered. -/// @remarks @a peer_mac_addr is usable only in the callback. To use outside the callback, make a copy. -/// @param[in] state The TDLS state -/// @param[in] peer_mac_addr The MAC address of the TDLS peer -/// @param[in] user_data The user data passed from the callback registration function -/// @see wifi_manager_tdls_set_discovered_cb() -/// @see wifi_manager_tdls_unset_discovered_cb() -typedef wifi_manager_tdls_discovered_cb - = ffi.Pointer>; -typedef wifi_manager_tdls_discovered_cbFunction = ffi.Void Function( - ffi.Int32 state, - ffi.Pointer peer_mac_addr, - ffi.Pointer user_data); -typedef Dartwifi_manager_tdls_discovered_cbFunction = void Function(int state, - ffi.Pointer peer_mac_addr, ffi.Pointer user_data); - -/// @brief Called when the Wi-Fi TDLS state is changed. -/// @since_tizen 3.0 -/// -/// @param[in] state The TDLS state -/// @param[in] peer_mac_addr The MAC address of the TDLS peer -/// @param[in] user_data The user data passed from the callback registration function -/// @see wifi_manager_tdls_set_state_changed_cb() -/// @see wifi_manager_tdls_unset_state_changed_cb() -typedef wifi_manager_tdls_state_changed_cb = ffi - .Pointer>; -typedef wifi_manager_tdls_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 state, - ffi.Pointer peer_mac_addr, - ffi.Pointer user_data); -typedef Dartwifi_manager_tdls_state_changed_cbFunction = void Function( - int state, - ffi.Pointer peer_mac_addr, - ffi.Pointer user_data); - -/// @brief Called when the IP conflict state is changed. -/// @since_tizen 5.0 -/// @remarks @a mac should not be freed. @a mac is available only in the callback. To use -/// outside the callback, make a copy. -/// @param[in] mac The destination MAC address causing conflict -/// @param[in] state The current state -/// @param[in] user_data The user data passed from the callback registration function -/// @see wifi_manager_set_ip_conflict_cb() -/// @see wifi_manager_unset_ip_conflict_cb() -typedef wifi_manager_ip_conflict_cb - = ffi.Pointer>; -typedef wifi_manager_ip_conflict_cbFunction = ffi.Void Function( - ffi.Pointer mac, - ffi.Int32 state, - ffi.Pointer user_data); -typedef Dartwifi_manager_ip_conflict_cbFunction = void Function( - ffi.Pointer mac, int state, ffi.Pointer user_data); - -/// @partner -/// @brief Enumeration for CSR Errors. -/// @since_tizen 3.0 -abstract class csr_error_e { - /// < Successful - static const int CSR_ERROR_NONE = 0; - - /// < Invalid function parameter - static const int CSR_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int CSR_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied - static const int CSR_ERROR_PERMISSION_DENIED = -13; - - /// < Device needed to run API is not supported - static const int CSR_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Busy for processing another request - static const int CSR_ERROR_BUSY = -16; - - /// < Socket error between client and server - static const int CSR_ERROR_SOCKET = -31653887; - - /// < The given handle is invalid - static const int CSR_ERROR_INVALID_HANDLE = -31653886; - - /// < Server has been failed for some reason - static const int CSR_ERROR_SERVER = -31653885; - - /// < No Task exists - static const int CSR_ERROR_NO_TASK = -31653884; - - /// < DB transaction error - static const int CSR_ERROR_DB = -31653883; - - /// < Removing file or application is failed - static const int CSR_ERROR_REMOVE_FAILED = -31653882; - - /// < Getting user response is failed - static const int CSR_ERROR_USER_RESPONSE_FAILED = -31653881; - - /// < File not exist - static const int CSR_ERROR_FILE_DO_NOT_EXIST = -31653880; - - /// < File changed after detection - static const int CSR_ERROR_FILE_CHANGED = -31653879; - - /// < File type is invalid - static const int CSR_ERROR_FILE_SYSTEM = -31653872; - - /// < Insufficient permission of engine - static const int CSR_ERROR_ENGINE_PERMISSION = -31653871; - - /// < No engine exists - static const int CSR_ERROR_ENGINE_NOT_EXIST = -31653870; - - /// < Engine is in disabled state - static const int CSR_ERROR_ENGINE_DISABLED = -31653869; - - /// < Engine is not activated - static const int CSR_ERROR_ENGINE_NOT_ACTIVATED = -31653868; - - /// < Engine internal error - static const int CSR_ERROR_ENGINE_INTERNAL = -31653863; - - /// < System error - static const int CSR_ERROR_SYSTEM = -31653633; -} - -final class __csr_engine_h extends ffi.Opaque {} - -/// @platform -/// @brief Enumeration for engine identifier. -/// @since_tizen 3.0 -abstract class csr_engine_id_e { - /// < Content screening engine id - static const int CSR_ENGINE_CS = 1; - - /// < Web protection engine id - static const int CSR_ENGINE_WP = 2; -} - -/// @platform -/// @brief Enumeration for state of engine activation. -/// @since_tizen 3.0 -abstract class csr_activated_e { - /// < Engine is not activated - static const int CSR_NOT_ACTIVATED = 1; - - /// < Engine is activated - static const int CSR_ACTIVATED = 2; -} - -/// @platform -/// @brief Enumeration for state of engine. -/// @since_tizen 3.0 -abstract class csr_state_e { - /// < Enable engine - static const int CSR_STATE_ENABLE = 1; - - /// < Disable engine - static const int CSR_STATE_DISABLE = 2; -} - -/// @platform -/// @brief Engine handle. -/// @since_tizen 3.0 -typedef csr_engine_h = ffi.Pointer<__csr_engine_h>; - -/// @partner -/// @brief Enumeration for severity level of a detected malware. -/// @since_tizen 3.0 -abstract class csr_cs_severity_level_e { - /// < Low Severity. User can choose how to handle between skip, ignore and remove. - static const int CSR_CS_SEVERITY_LOW = 1; - - /// < Medium Severity. User can choose how to handle between skip, ignore and remove. - static const int CSR_CS_SEVERITY_MEDIUM = 2; - - /// < High Severity. User can choose how to handle between skip and remove. - static const int CSR_CS_SEVERITY_HIGH = 3; -} - -/// @partner -/// @brief Enumeration for the option of asking user about handling a detected malware. -/// @since_tizen 3.0 -abstract class csr_cs_ask_user_e { - /// < Do not ask the user even if malicious contents were found. - static const int CSR_CS_ASK_USER_NO = 0; - - /// < Ask the user when malicious contents were found. - static const int CSR_CS_ASK_USER_YES = 1; -} - -/// @partner -/// @brief Enumeration for the user response from popup. -/// @since_tizen 3.0 -abstract class csr_cs_user_response_e { - /// < No response from user. - static const int CSR_CS_USER_RESPONSE_USER_NOT_ASKED = 0; - - /// < A user decided to remove a detected malicious content and it was removed. - static const int CSR_CS_USER_RESPONSE_REMOVE = 1; - - /// < A user decided to process a detected malware. - static const int CSR_CS_USER_RESPONSE_PROCESSING_ALLOWED = 2; - - /// < A user decided not to process a detected malware. - static const int CSR_CS_USER_RESPONSE_PROCESSING_DISALLOWED = 3; -} - -/// @partner -/// @brief Enumeration for the action types for the detected malware files. -/// @since_tizen 3.0 -abstract class csr_cs_action_e { - /// < Remove the detected malware file. - static const int CSR_CS_ACTION_REMOVE = 0; - - /// < Ignore the detected malware file. - static const int CSR_CS_ACTION_IGNORE = 1; - - /// < Unignore the previously ignored file. - static const int CSR_CS_ACTION_UNIGNORE = 2; -} - -/// @partner -/// @brief Enumeration for maximum core usage during scanning. -/// @since_tizen 3.0 -abstract class csr_cs_core_usage_e { - /// < Use default setting value. - static const int CSR_CS_CORE_USAGE_DEFAULT = 0; - - /// < Use all cores during scanning. - static const int CSR_CS_CORE_USAGE_ALL = 1; - - /// < Use half cores during scanning. - static const int CSR_CS_CORE_USAGE_HALF = 2; - - /// < Use a single core during scanning. - static const int CSR_CS_CORE_USAGE_SINGLE = 3; -} - -final class __csr_cs_context_s extends ffi.Opaque {} - -final class __csr_cs_malware_s extends ffi.Opaque {} - -final class __csr_cs_malware_list_s extends ffi.Opaque {} - -final class __csr_cs_engine_s extends ffi.Opaque {} - -/// @partner -/// @brief Content screening APIs context handle. -/// @since_tizen 3.0 -typedef csr_cs_context_h = ffi.Pointer<__csr_cs_context_s>; - -/// @partner -/// @brief Detected malware handle. -/// @since_tizen 3.0 -typedef csr_cs_malware_h = ffi.Pointer<__csr_cs_malware_s>; - -/// @partner -/// @brief Called when each file scanning is done without malware. -/// @since_tizen 3.0 -/// @remarks Only for asynchronous scan functions. -/// @remarks Called for each file or application which is not detected malware. -/// @param[in] file_path A path of the file scanned. It would be package path if it's in application -/// @param[in] user_data A pointer of a user data. It's provided by client when calling asynchronous scanning method -/// @see csr_cs_set_file_scanned_cb() -/// @see csr_cs_scan_files_async() -/// @see csr_cs_scan_dir_async() -/// @see csr_cs_scan_dirs_async() -typedef csr_cs_file_scanned_cb - = ffi.Pointer>; -typedef csr_cs_file_scanned_cbFunction = ffi.Void Function( - ffi.Pointer file_path, ffi.Pointer user_data); -typedef Dartcsr_cs_file_scanned_cbFunction = void Function( - ffi.Pointer file_path, ffi.Pointer user_data); - -/// @partner -/// @brief Called when each file scanning is done with malware. -/// @since_tizen 3.0 -/// @remarks Only for asynchronous scan functions. -/// @remarks Called for each file or application which is detected malware. -/// @remarks @a malware will be released when a context is released using csr_cs_context_destroy(). -/// @param[in] malware The detected malware handle -/// @param[in] user_data A pointer of a user data. It's provided by client when calling asynchronous scanning method -/// @see csr_cs_set_detected_cb() -/// @see csr_cs_scan_files_async() -/// @see csr_cs_scan_dir_async() -/// @see csr_cs_scan_dirs_async() -typedef csr_cs_detected_cb - = ffi.Pointer>; -typedef csr_cs_detected_cbFunction = ffi.Void Function( - csr_cs_malware_h malware, ffi.Pointer user_data); -typedef Dartcsr_cs_detected_cbFunction = void Function( - csr_cs_malware_h malware, ffi.Pointer user_data); - -/// @partner -/// @brief Called when scanning is finished successfully. -/// @since_tizen 3.0 -/// @remarks Only for asynchronous scan functions. -/// @remarks Called only once at the end of scanning when success. -/// @param[in] user_data A pointer of a user data. It's provided by client when calling asynchronous scanning method -/// @see csr_cs_set_completed_cb() -/// @see csr_cs_scan_files_async() -/// @see csr_cs_scan_dir_async() -/// @see csr_cs_scan_dirs_async() -typedef csr_cs_completed_cb - = ffi.Pointer>; -typedef csr_cs_completed_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartcsr_cs_completed_cbFunction = void Function( - ffi.Pointer user_data); - -/// @partner -/// @brief Called when scanning is cancelled by csr_cs_cancel_scanning(). -/// @since_tizen 3.0 -/// @remarks Only for asynchronous scan functions. -/// @remarks Called only once at the end of scanning by being cancelled. -/// @param[in] user_data A pointer of a user data. It's provided by client when calling asynchronous scanning method -/// @see csr_cs_set_cancelled_cb() -/// @see csr_cs_cancel_scanning() -/// @see csr_cs_scan_files_async() -/// @see csr_cs_scan_dir_async() -/// @see csr_cs_scan_dirs_async() -typedef csr_cs_cancelled_cb - = ffi.Pointer>; -typedef csr_cs_cancelled_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartcsr_cs_cancelled_cbFunction = void Function( - ffi.Pointer user_data); - -/// @partner -/// @brief Called when scanning is stopped with an error. -/// @details The following error codes can be delivered.\n -/// #CSR_ERROR_FILE_DO_NOT_EXIST,\n -/// #CSR_ERROR_SOCKET,\n -/// #CSR_ERROR_SERVER,\n -/// #CSR_ERROR_ENGINE_NOT_EXIST,\n -/// #CSR_ERROR_ENGINE_DISABLED,\n -/// #CSR_ERROR_ENGINE_NOT_ACTIVATED,\n -/// #CSR_ERROR_ENGINE_PERMISSION,\n -/// #CSR_ERROR_ENGINE_INTERNAL -/// @since_tizen 3.0 -/// @remarks Only for asynchronous scan functions. -/// @remarks Called only once at the end of scanning when failed with error. -/// @param[in] error_code Error code of #csr_error_e defined in csr-error.h -/// @param[in] user_data A pointer of a user data. It's provided by client when calling asynchronous scanning method -/// @see csr_cs_set_error_cb() -/// @see csr_cs_scan_files_async() -/// @see csr_cs_scan_dir_async() -/// @see csr_cs_scan_dirs_async() -typedef csr_cs_error_cb - = ffi.Pointer>; -typedef csr_cs_error_cbFunction = ffi.Void Function( - ffi.Int error_code, ffi.Pointer user_data); -typedef Dartcsr_cs_error_cbFunction = void Function( - int error_code, ffi.Pointer user_data); - -/// @partner -/// @brief Detected malware list handle. -/// @since_tizen 3.0 -typedef csr_cs_malware_list_h = ffi.Pointer<__csr_cs_malware_list_s>; - -final class __csr_wp_context_s extends ffi.Opaque {} - -final class __csr_wp_check_result_h extends ffi.Opaque {} - -/// @partner -/// @brief Enumeration for the options about prompting a popup to a user. -/// @since_tizen 3.0 -abstract class csr_wp_ask_user_e { - /// < Do not ask the user even if a URL turns out risky. - static const int CSR_WP_ASK_USER_NO = 0; - - /// < Ask the user when a URL turns out risky - static const int CSR_WP_ASK_USER_YES = 1; -} - -/// @partner -/// @brief Enumeration for the user response for a popup. -/// @since_tizen 3.0 -abstract class csr_wp_user_response_e { - /// < There was no popup for asking the user. - static const int CSR_WP_USER_RESPONSE_USER_NOT_ASKED = 0; - - /// < A user allowed to process the url. - static const int CSR_WP_USER_RESPONSE_PROCESSING_ALLOWED = 1; - - /// < A user disallowed to process the url. - static const int CSR_WP_USER_RESPONSE_PROCESSING_DISALLOWED = 2; -} - -/// @partner -/// @brief Enumeration for risk level of a url. -/// @since_tizen 3.0 -abstract class csr_wp_risk_level_e { - /// < Risk Low. - static const int CSR_WP_RISK_LOW = 1; - - /// < Risk Unverified. There is no information about the url. - static const int CSR_WP_RISK_UNVERIFIED = 2; - - /// < Risk Medium. Prompt the user before processing. Ask the user if they want the application to process the url. - static const int CSR_WP_RISK_MEDIUM = 3; - - /// < High Risk.Do not process the url and just notify the user - static const int CSR_WP_RISK_HIGH = 4; -} - -/// @partner -/// @brief CSR WP context handle. -/// @since_tizen 3.0 -typedef csr_wp_context_h = ffi.Pointer<__csr_wp_context_s>; - -/// @partner -/// @brief CSR WP scan result handle. -/// @since_tizen 3.0 -typedef csr_wp_check_result_h = ffi.Pointer<__csr_wp_check_result_h>; - -/// @brief Enumeration of device policy API errors -/// @since_tizen 3.0 -abstract class dpm_error_type_e { - /// < The operation was successful - static const int DPM_ERROR_NONE = 0; - - /// < Invalid parameter - static const int DPM_ERROR_INVALID_PARAMETER = -22; - - /// < Connection refused - static const int DPM_ERROR_CONNECTION_REFUSED = -111; - - /// < Time out - static const int DPM_ERROR_TIMED_OUT = -1073741823; - - /// < Access privilege is not sufficient - static const int DPM_ERROR_PERMISSION_DENIED = -13; - - /// < Operation not permitted - static const int DPM_ERROR_NOT_PERMITTED = -1; - - /// < File exists - static const int DPM_ERROR_FILE_EXISTS = -17; - - /// < Out of memory - static const int DPM_ERROR_OUT_OF_MEMORY = -12; - - /// < No Data - static const int DPM_ERROR_NO_DATA = -61; -} - -/// @brief The device policy manager handle -/// @details The device policy manager handle is an abstraction of the -/// logical connection between the device policy manager and -/// it's client. The device policy manager handle must be -/// created by using dpm_manager_create() before attempting to -/// use almost any of the device policy APIs, and it should -/// be freed when interaction with the device policy manager -/// is no longer required. -/// To release the handle, use dpm_manager_destroy(). -/// @since_tizen 3.0 -/// @see dpm_manager_create() -/// @see dpm_manager_destroy() -typedef device_policy_manager_h = ffi.Pointer; - -/// @brief Called when a policy is changed. -/// @since_tizen 3.0 -/// @param[in] name The name of the policy -/// @param[in] state The current state of the policy -/// @param[in] user_data The user data passed from dpm_manager_add_policy_changed_cb -/// @see dpm_manager_add_policy_changed_cb() -/// @see dpm_manager_remove_policy_changed_cb() -typedef dpm_policy_changed_cb - = ffi.Pointer>; -typedef dpm_policy_changed_cbFunction = ffi.Void Function( - ffi.Pointer name, - ffi.Pointer state, - ffi.Pointer user_data); -typedef Dartdpm_policy_changed_cbFunction = void Function( - ffi.Pointer name, - ffi.Pointer state, - ffi.Pointer user_data); - -/// @brief Called when a zone raises a signal. -/// @since_tizen 3.0 -/// @param[in] name The zone name -/// @param[in] object The object name triggered the signal -/// @param[in] user_data The user data passed from dpm_zone_add_signal_cb -/// @see dpm_zone_add_signal_cb() -/// @see dpm_zone_remove_signal_cb() -typedef dpm_signal_cb = ffi.Pointer>; -typedef dpm_signal_cbFunction = ffi.Void Function(ffi.Pointer name, - ffi.Pointer object, ffi.Pointer user_data); -typedef Dartdpm_signal_cbFunction = void Function(ffi.Pointer name, - ffi.Pointer object, ffi.Pointer user_data); - -/// @brief Enumeration for dpm password quality type -/// @since_tizen 3.0 -abstract class dpm_password_quality_e { - /// < No requirements for password. - static const int DPM_PASSWORD_QUALITY_UNSPECIFIED = 0; - - /// < EAS(Exchange ActiveSync) requirement for simple password - static const int DPM_PASSWORD_QUALITY_SIMPLE_PASSWORD = 1; - - /// < Some kind password is required, but doesn't care what it is - static const int DPM_PASSWORD_QUALITY_SOMETHING = 16; - - /// < Containing at least numeric characters - static const int DPM_PASSWORD_QUALITY_NUMERIC = 32; - - /// < Containing at least alphabetic (or other symbol) characters - static const int DPM_PASSWORD_QUALITY_ALPHABETIC = 64; - - /// < Containing at least numeric and alphabetic characters - static const int DPM_PASSWORD_QUALITY_ALPHANUMERIC = 128; -} - -/// @brief Enumeration for dpm password status type -/// @since_tizen 3.0 -abstract class dpm_password_status_e { - /// < Password normal status - static const int DPM_PASSWORD_STATUS_NORMAL = 0; - - /// < Password successfully changed - static const int DPM_PASSWORD_STATUS_CHANGED = 1; - - /// < Password not changed - static const int DPM_PASSWORD_STATUS_NOT_CHANGED = 2; - - /// < Password change required - static const int DPM_PASSWORD_STATUS_CHANGE_REQUIRED = 3; - - /// < Password Max Attempts Exceeded - static const int DPM_PASSWORD_STATUS_MAX_ATTEMPTS_EXCEEDED = 4; - - /// < Password expired - static const int DPM_PASSWORD_STATUS_EXPIRED = 5; - - /// < Device unlock failed by Password Recovery - static const int DPM_PASSWORD_STATUS_RECOVERY_PASSWORD_FAILED = 6; - - /// < Device unlock succeeded by Password Recovery - static const int DPM_PASSWORD_STATUS_RECOVERY_PASSWORD_SUCCEEDED = 7; - - /// < Password quality successfully changed - static const int DPM_PASSWORD_STATUS_QUALITY_CHANGED = 8; - - /// < Password min_length successfully changed - static const int DPM_PASSWORD_STATUS_MIN_LENGTH_CHANGED = 9; - - /// < Password complex_char successfully changed - static const int DPM_PASSWORD_STATUS_COMPLEX_CHAR_CHANGED = 10; - - /// < Password pattern successfully changed - static const int DPM_PASSWORD_STATUS_PATTERN_CHANGED = 11; -} - -/// @brief The password forbidden string list iterator handle -/// @since_tizen 3.0 -/// @see dpm_password_create_iterator() -/// @see dpm_password_iterator_next() -/// @see dpm_password_destroy_iterator() -typedef dpm_password_iterator_h = ffi.Pointer; - -/// @brief Enumeration for device wipe type. -/// @since_tizen 3.0 -abstract class dpm_security_wipe_type_e { - /// < Wipe internal memory - static const int DPM_SECURITY_WIPE_INTERNAL_STORAGE = 1; - - /// < Wipe external memory - static const int DPM_SECURITY_WIPE_EXTERNAL_STORAGE = 2; -} - -/// @brief Enumeration for zone state -/// @since_tizen 3.0 -abstract class dpm_zone_state_e { - /// < Zone has been defined, but it can not start. - static const int DPM_ZONE_STATE_LOCKED = 1; - - /// < Zone has been started. - static const int DPM_ZONE_STATE_RUNNING = 2; - - /// < This presents all of the state - static const int DPM_ZONE_STATE_ALL = 255; -} - -/// @brief Called to get all the name of created zones. -/// @since_tizen 3.0 -/// @param[in] name The zone name -/// @param[in] user_data The user data passed from dpm_zone_foreach_name -/// @return true to continue with the next iteration of the loop, otherwise false to break out out the loop -/// @see dpm_zone_foreach_name() -typedef dpm_zone_foreach_name_cb - = ffi.Pointer>; -typedef dpm_zone_foreach_name_cbFunction = ffi.Bool Function( - ffi.Pointer name, ffi.Pointer user_data); -typedef Dartdpm_zone_foreach_name_cbFunction = bool Function( - ffi.Pointer name, ffi.Pointer user_data); - -/// @brief Enumeration for Key Manager Errors. -/// @since_tizen 2.3 -abstract class key_manager_error_e { - /// < Successful - static const int CKMC_ERROR_NONE = 0; - - /// < Invalid function parameter - static const int CKMC_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int CKMC_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied - static const int CKMC_ERROR_PERMISSION_DENIED = -13; - - /// < Device needed to run API is not supported - static const int CKMC_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Socket error between client and Central Key Manager - static const int CKMC_ERROR_SOCKET = -31522815; - - /// < Invalid request from client - static const int CKMC_ERROR_BAD_REQUEST = -31522814; - - /// < Invalid response from Central Key Manager - static const int CKMC_ERROR_BAD_RESPONSE = -31522813; - - /// < Transmitting request failed - static const int CKMC_ERROR_SEND_FAILED = -31522812; - - /// < Receiving response failed - static const int CKMC_ERROR_RECV_FAILED = -31522811; - - /// < Optional password which used when saving is incorrect - static const int CKMC_ERROR_AUTHENTICATION_FAILED = -31522810; - - /// < The output buffer size which is passed as parameter is too small - static const int CKMC_ERROR_BUFFER_TOO_SMALL = -31522809; - - /// < Central Key Manager has been failed for some reason - static const int CKMC_ERROR_SERVER_ERROR = -31522808; - - /// < The database was not unlocked - user did not login - static const int CKMC_ERROR_DB_LOCKED = -31522807; - - /// < An internal error inside the database - static const int CKMC_ERROR_DB_ERROR = -31522806; - - /// < Provided alias already exists in the database - static const int CKMC_ERROR_DB_ALIAS_EXISTS = -31522805; - - /// < No data for given alias - static const int CKMC_ERROR_DB_ALIAS_UNKNOWN = -31522804; - - /// < CA certificate(s) were unknown and chain could not be created - static const int CKMC_ERROR_VERIFICATION_FAILED = -31522803; - - /// < A provided file or binary has not a valid format - static const int CKMC_ERROR_INVALID_FORMAT = -31522802; - - /// < A provided file doesn't exist or cannot be accessed in the file system - static const int CKMC_ERROR_FILE_ACCESS_DENIED = -31522801; - - /// < The data is saved as unexportable so it cannot be leaked - static const int CKMC_ERROR_NOT_EXPORTABLE = -31522800; - - /// < Save key/certificate/pkcs12 failed because of file system error - static const int CKMC_ERROR_FILE_SYSTEM = -31522799; - - /// < The error with unknown reason - static const int CKMC_ERROR_UNKNOWN = -31522561; -} - -/// @brief Enumeration for key types of key manager. -/// @since_tizen 2.3 -abstract class ckmc_key_type { - /// < Key type not specified - static const int CKMC_KEY_NONE = 0; - - /// < RSA public key - static const int CKMC_KEY_RSA_PUBLIC = 1; - - /// < RSA private key - static const int CKMC_KEY_RSA_PRIVATE = 2; - - /// < ECDSA public key - static const int CKMC_KEY_ECDSA_PUBLIC = 3; - - /// < ECDSA private key - static const int CKMC_KEY_ECDSA_PRIVATE = 4; - - /// < DSA public key - static const int CKMC_KEY_DSA_PUBLIC = 5; - - /// < DSA private key - static const int CKMC_KEY_DSA_PRIVATE = 6; - - /// < AES key - static const int CKMC_KEY_AES = 7; -} - -/// @brief Enumeration for data format. -/// @since_tizen 2.3 -abstract class ckmc_data_format { - /// < DER format base64 encoded data - static const int CKMC_FORM_DER_BASE64 = 0; - - /// < DER encoded data - static const int CKMC_FORM_DER = 1; - - /// < PEM encoded data. It consists of the DER format base64 encoded - /// with additional header and footer lines. - static const int CKMC_FORM_PEM = 2; -} - -/// @brief Enumeration for elliptic curve. -/// @since_tizen 2.3 -abstract class ckmc_ec_type { - /// < Elliptic curve domain "secp192r1" listed in "SEC 2" recommended - /// elliptic curve domain - static const int CKMC_EC_PRIME192V1 = 0; - - /// < "SEC 2" recommended elliptic curve domain - secp256r1 - static const int CKMC_EC_PRIME256V1 = 1; - - /// < NIST curve P-384(covers "secp384r1", the elliptic curve domain - /// listed in See SEC 2 - static const int CKMC_EC_SECP384R1 = 2; -} - -/// @brief Enumeration for hash algorithm. -/// @since_tizen 2.3 -abstract class ckmc_hash_algo { - /// < No Hash Algorithm - static const int CKMC_HASH_NONE = 0; - - /// < Hash Algorithm SHA1 - static const int CKMC_HASH_SHA1 = 1; - - /// < Hash Algorithm SHA256 - static const int CKMC_HASH_SHA256 = 2; - - /// < Hash Algorithm SHA384 - static const int CKMC_HASH_SHA384 = 3; - - /// < Hash Algorithm SHA512 - static const int CKMC_HASH_SHA512 = 4; -} - -/// @brief Enumeration for RSA padding algorithm. -/// @since_tizen 2.3 -abstract class ckmc_rsa_padding_algo { - /// < No Padding - static const int CKMC_NONE_PADDING = 0; - - /// < PKCS#1 Padding - static const int CKMC_PKCS1_PADDING = 1; - - /// < X9.31 padding - static const int CKMC_X931_PADDING = 2; -} - -/// @deprecated Deprecated since @if MOBILE 2.4. @elseif WEARABLE 3.0. @endif [Use ckmc_permission_e() instead] -/// @brief Enumeration for database access rights. -/// @since_tizen 2.3 -abstract class ckmc_access_right { - /// < Access right for read - static const int CKMC_AR_READ = 0; - - /// < Access right for read and remove - static const int CKMC_AR_READ_REMOVE = 1; -} - -/// @brief Enumeration for permissions to access/modify alias. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class ckmc_permission { - /// < Clear permissions - static const int CKMC_PERMISSION_NONE = 0; - - /// < Eead allowed - static const int CKMC_PERMISSION_READ = 1; - - /// < Remove allowed - static const int CKMC_PERMISSION_REMOVE = 2; -} - -/// @brief The structure for binary buffer used in key manager CAPI. -/// @since_tizen 2.3 -final class __ckmc_raw_buff extends ffi.Struct { - /// < Byte array containing binary data - external ffi.Pointer data; - - /// < The size of the binary data - @ffi.Size() - external int size; -} - -/// @brief The structure for a policy for storing key/certificate/binary data. -/// @since_tizen 2.3 -final class __ckmc_policy extends ffi.Struct { - /// < Byte array used to encrypt data inside CKM. If it is not null, the data - /// (or key, or certificate) is stored encrypted with this password inside - /// key manager - external ffi.Pointer password; - - /// < If true key may be extracted from storage - @ffi.Bool() - external bool extractable; -} - -/// @brief The structure for key used in key manager CAPI. -/// @since_tizen 2.3 -final class __ckmc_key extends ffi.Struct { - /// < Byte array of key. raw_key may be encrypted with password - external ffi.Pointer raw_key; - - /// < The byte size of raw_key - @ffi.Size() - external int key_size; - - /// < The raw_key's type - @ffi.Int32() - external int key_type; - - /// < Byte array used to decrypt data raw_key inside key manager. - external ffi.Pointer password; -} - -/// @brief The structure for certificate used in key manager CAPI. -/// @since_tizen 2.3 -final class __ckmc_cert extends ffi.Struct { - /// < Byte array of certificate - external ffi.Pointer raw_cert; - - /// < Byte size of raw_cert - @ffi.Size() - external int cert_size; - - /// < Raw_cert's encoding format - @ffi.Int32() - external int data_format; -} - -/// @brief The structure for linked list of alias. -/// @since_tizen 2.3 -final class __ckmc_alias_list extends ffi.Struct { - /// < The name of key, certificate or data stored in key manager - external ffi.Pointer alias; - - /// < The pointer pointing to the next ckmc_alias_list_s - external ffi.Pointer<__ckmc_alias_list> next; -} - -/// @brief The structure for linked list of ckmc_cert_s -/// @since_tizen 2.3 -final class __ckmc_cert_list extends ffi.Struct { - /// < The pointer of ckmc_cert_s - external ffi.Pointer cert; - - /// < The pointer pointing to the next ckmc_cert_list_s - external ffi.Pointer<__ckmc_cert_list> next; -} - -/// @brief The structure for certificate used in key manager CAPI. -/// @since_tizen 2.3 -typedef ckmc_cert_s = __ckmc_cert; - -/// @brief Enumeration for OCSP status. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class ckmc_ocsp_status { - /// < OCSP status is good - static const int CKMC_OCSP_STATUS_GOOD = 0; - - /// < The certificate is revoked - static const int CKMC_OCSP_STATUS_REVOKED = 1; - - /// < Unknown error - static const int CKMC_OCSP_STATUS_UNKNOWN = 2; - - /// < The certificate does not provide OCSP extension - static const int CKMC_OCSP_ERROR_UNSUPPORTED = 3; - - /// < The invalid URL in certificate OCSP extension - static const int CKMC_OCSP_ERROR_INVALID_URL = 4; - - /// < The invalid response from OCSP server - static const int CKMC_OCSP_ERROR_INVALID_RESPONSE = 5; - - /// < OCSP remote server error - static const int CKMC_OCSP_ERROR_REMOTE = 6; - - /// < Network connection error - static const int CKMC_OCSP_ERROR_NET = 7; - - /// < OpenSSL API error - static const int CKMC_OCSP_ERROR_INTERNAL = 8; -} - -/// @brief The structure for PKCS12 used in key manager CAPI. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -final class __ckmc_pkcs12 extends ffi.Struct { - /// < The private key, may be null - external ffi.Pointer priv_key; - - /// < The certificate, may be null - external ffi.Pointer cert; - - /// < The chain certificate list, may be null - external ffi.Pointer ca_chain; -} - -/// @brief The structure for key used in key manager CAPI. -/// @since_tizen 2.3 -typedef ckmc_key_s = __ckmc_key; - -/// @brief The structure for linked list of ckmc_cert_s -/// @since_tizen 2.3 -typedef ckmc_cert_list_s = __ckmc_cert_list; - -/// @brief Enumeration for crypto algorithm parameters. -/// @since_tizen 3.0 -/// @see #ckmc_algo_type_e -abstract class ckmc_param_name { - static const int CKMC_PARAM_ALGO_TYPE = 1; - - /// < 16B buffer (up to 2^64-1 bytes long in case of AES GCM) - static const int CKMC_PARAM_ED_IV = 101; - - /// < integer - ctr length in bits - static const int CKMC_PARAM_ED_CTR_LEN = 102; - - /// < buffer - static const int CKMC_PARAM_ED_AAD = 103; - - /// < integer - tag length in bits - static const int CKMC_PARAM_ED_TAG_LEN = 104; - - /// < buffer - static const int CKMC_PARAM_ED_LABEL = 105; -} - -final class __ckmc_param_list extends ffi.Opaque {} - -/// @brief Enumeration for crypto algorithm types. -/// @since_tizen 3.0 -/// @see #ckmc_param_name_e -abstract class ckmc_algo_type { - /// < AES-CTR algorithm - /// Supported parameters: - /// - CKMC_PARAM_ALGO_TYPE = CKMC_ALGO_AES_CTR(mandatory), - /// - CKMC_PARAM_ED_IV = 16-byte initialization vector(mandatory) - /// - CKMC_PARAM_ED_CTR_LEN = length of counter block in bits - /// (optional, only 128b is supported at the moment) - static const int CKMC_ALGO_AES_CTR = 1; - - /// < AES-CBC algorithm - /// Supported parameters: - /// - CKMC_PARAM_ALGO_TYPE = CKMC_ALGO_AES_CBC(mandatory), - /// - CKMC_PARAM_ED_IV = 16-byte initialization vector(mandatory) - static const int CKMC_ALGO_AES_CBC = 2; - - /// < AES-GCM algorithm - /// Supported parameters: - /// - CKMC_PARAM_ALGO_TYPE = CKMC_ALGO_AES_GCM(mandatory), - /// - CKMC_PARAM_ED_IV = initialization vector(mandatory) - /// - CKMC_PARAM_ED_TAG_LEN = GCM tag length in bits. One of - /// {32, 64, 96, 104, 112, 120, 128} (optional, if not present, the - /// length 128 is used) - /// - CKMC_PARAM_ED_AAD = additional authentication data(optional) - static const int CKMC_ALGO_AES_GCM = 3; - - /// < AES-CFB algorithm - /// Supported parameters: - /// - CKMC_PARAM_ALGO_TYPE = CKMC_ALGO_AES_CFB(mandatory), - /// - CKMC_PARAM_ED_IV = 16-byte initialization vector(mandatory) - static const int CKMC_ALGO_AES_CFB = 4; - - /// < RSA-OAEP algorithm - /// Supported parameters: - /// - CKMC_PARAM_ALGO_TYPE = CKMC_ALGO_RSA_OAEP(required), - /// - CKMC_PARAM_ED_LABEL = label to be associated with the message - /// (optional, not supported at the moment) - static const int CKMC_ALGO_RSA_OAEP = 5; -} - -/// @brief The structure for binary buffer used in key manager CAPI. -/// @since_tizen 2.3 -typedef ckmc_raw_buffer_s = __ckmc_raw_buff; - -/// @brief The structure for PKCS12 used in key manager CAPI. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -typedef ckmc_pkcs12_s = __ckmc_pkcs12; - -/// @brief The structure for linked list of alias. -/// @since_tizen 2.3 -typedef ckmc_alias_list_s = __ckmc_alias_list; - -/// @brief Algorithm parameter list handle. -/// @since_tizen 3.0 -/// @remarks Each parameter list must have at least one CKMC_PARAM_ALGO_TYPE parameter that identifies the algorithm. -/// See #ckmc_algo_type_e for available algorithms and additional parameters they support. -/// @see ckmc_generate_new_params() -/// @see ckmc_param_list_new() -/// @see ckmc_param_list_set_integer() -/// @see ckmc_param_list_set_buffer() -/// @see ckmc_param_list_get_integer() -/// @see ckmc_param_list_get_buffer() -/// @see ckmc_param_list_free() -/// @see #ckmc_algo_type_e -/// @see #ckmc_param_name_e -typedef ckmc_param_list_h = ffi.Pointer<__ckmc_param_list>; - -/// @brief The structure for a policy for storing key/certificate/binary data. -/// @since_tizen 2.3 -typedef ckmc_policy_s = __ckmc_policy; - -/// @brief Enumeration for error codes of Privacy Privilege Manager. -/// @since_tizen 4.0 -abstract class ppm_error_e { - /// Successful - static const int PRIVACY_PRIVILEGE_MANAGER_ERROR_NONE = 0; - - /// I/O error - static const int PRIVACY_PRIVILEGE_MANAGER_ERROR_IO_ERROR = -5; - - /// Invalid parameter - static const int PRIVACY_PRIVILEGE_MANAGER_ERROR_INVALID_PARAMETER = -22; - - /// Operation already in progress - static const int PRIVACY_PRIVILEGE_MANAGER_ERROR_ALREADY_IN_PROGRESS = -114; - - /// Out of memory - static const int PRIVACY_PRIVILEGE_MANAGER_ERROR_OUT_OF_MEMORY = -12; - - /// Unknown error - static const int PRIVACY_PRIVILEGE_MANAGER_ERROR_UNKNOWN = -1073741824; -} - -/// @brief Enumeration for results of a permission check. -/// @since_tizen 4.0 -abstract class ppm_check_result_e { - /// The application has permission to use a privilege. - static const int PRIVACY_PRIVILEGE_MANAGER_CHECK_RESULT_ALLOW = 0; - - /// The application doesn't have permission to use a privilege. - static const int PRIVACY_PRIVILEGE_MANAGER_CHECK_RESULT_DENY = 1; - - /// The user has to be asked whether to grant permission to use a privilege. - static const int PRIVACY_PRIVILEGE_MANAGER_CHECK_RESULT_ASK = 2; -} - -/// @brief Enumeration for results of a permission request. -/// @since_tizen 4.0 -abstract class ppm_request_result_e { - /// The user granted permission to use a privilege for an indefinite period of time. - static const int PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_ALLOW_FOREVER = 0; - - /// The user denied granting permission to use a privilege for an indefinite period of time. - static const int PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_DENY_FOREVER = 1; - - /// The user denied granting permission to use a privilege once. - static const int PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_DENY_ONCE = 2; -} - -/// @brief Enumeration for status codes of a permission request. -/// @since_tizen 4.0 -abstract class ppm_call_cause_e { - /// Callback was called with a valid answer. - static const int PRIVACY_PRIVILEGE_MANAGER_CALL_CAUSE_ANSWER = 0; - - /// Callback was called because of an error. - static const int PRIVACY_PRIVILEGE_MANAGER_CALL_CAUSE_ERROR = 1; -} - -/// @brief Called when the application receives a response upon calling ppm_request_permission(). -/// -/// @since_tizen 4.0 -/// -/// @param[in] cause The value representing a reason why this callback -/// has been called. -/// @param[in] result The result of a response triggered by calling ppm_request_permission(). -/// This is a valid value only if the @a cause parameter is equal to -/// #PRIVACY_PRIVILEGE_MANAGER_CALL_CAUSE_ANSWER. -/// @param[in] privilege The privilege that has been checked. This pointer is managed by the API and -/// it is valid only in the body of the callback function. -/// @param[in] user_data User specific data, this pointer has been passed -/// to ppm_request_permission(). -/// -/// @see ppm_request_permission() -typedef ppm_request_response_cb - = ffi.Pointer>; -typedef ppm_request_response_cbFunction = ffi.Void Function( - ffi.Int32 cause, - ffi.Int32 result, - ffi.Pointer privilege, - ffi.Pointer user_data); -typedef Dartppm_request_response_cbFunction = void Function( - int cause, - int result, - ffi.Pointer privilege, - ffi.Pointer user_data); - -/// @brief Enumeration for error code for Privilege Information. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class privilege_info_error_e { - /// < Successful - static const int PRVINFO_ERROR_NONE = 0; - - /// < Invalid function parameter - static const int PRVINFO_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int PRVINFO_ERROR_OUT_OF_MEMORY = -12; - - /// < Unknown error - static const int PRVINFO_ERROR_INTERNAL_ERROR = -1073741824; -} - -final class yaca_context_s extends ffi.Opaque {} - -final class yaca_key_s extends ffi.Opaque {} - -/// @brief Enumeration of YACA key formats. -/// -/// @since_tizen 3.0 -abstract class yaca_key_format_e { - /// Key is either PKCS#1 for RSA or SSLeay for DSA, also use this option for symmetric - static const int YACA_KEY_FORMAT_DEFAULT = 0; - - /// Key is in PKCS#8, can only be used for asymmetric private keys - static const int YACA_KEY_FORMAT_PKCS8 = 1; -} - -/// @brief Enumeration of YACA key file formats. -/// -/// @since_tizen 3.0 -abstract class yaca_key_file_format_e { - /// Key file is in raw binary format, used for symmetric keys - static const int YACA_KEY_FILE_FORMAT_RAW = 0; - - /// Key file is encoded in ASCII-base64, used for symmetric keys - static const int YACA_KEY_FILE_FORMAT_BASE64 = 1; - - /// Key file is in PEM file format, used for asymmetric keys - static const int YACA_KEY_FILE_FORMAT_PEM = 2; - - /// Key file is in DER file format, used for asymmetric keys - static const int YACA_KEY_FILE_FORMAT_DER = 3; -} - -/// @brief Enumeration of YACA key types, Initialization Vector is considered as key. -/// -/// @since_tizen 3.0 -abstract class yaca_key_type_e { - /// Generic symmetric cipher KEY - static const int YACA_KEY_TYPE_SYMMETRIC = 0; - - /// DES* key - must be handled differently because of parity bits - static const int YACA_KEY_TYPE_DES = 1; - - /// Initialization Vector for symmetric algorithms - static const int YACA_KEY_TYPE_IV = 2; - - /// RSA public key - static const int YACA_KEY_TYPE_RSA_PUB = 3; - - /// RSA private key - static const int YACA_KEY_TYPE_RSA_PRIV = 4; - - /// Digital Signature Algorithm public key - static const int YACA_KEY_TYPE_DSA_PUB = 5; - - /// Digital Signature Algorithm private key - static const int YACA_KEY_TYPE_DSA_PRIV = 6; - - /// Diffie-Hellman public key - static const int YACA_KEY_TYPE_DH_PUB = 7; - - /// Diffie-Hellman private key - static const int YACA_KEY_TYPE_DH_PRIV = 8; - - /// Elliptic Curve public key (for DSA and DH) - static const int YACA_KEY_TYPE_EC_PUB = 9; - - /// Elliptic Curve private key (for DSA and DH) - static const int YACA_KEY_TYPE_EC_PRIV = 10; - - /// Digital Signature Algorithm parameters - static const int YACA_KEY_TYPE_DSA_PARAMS = 11; - - /// Diffie-Hellman parameters - static const int YACA_KEY_TYPE_DH_PARAMS = 12; - - /// Elliptic Curve parameters - static const int YACA_KEY_TYPE_EC_PARAMS = 13; -} - -/// @brief Enumeration of YACA key lengths. -/// It is possible to use arbitrary integer instead, -/// this enum values are placed here to avoid magic numbers. -/// -/// @since_tizen 3.0 -abstract class yaca_key_bit_length_e { - /// 64 bits - static const int YACA_KEY_LENGTH_IV_64BIT = 64; - - /// 128 bits - static const int YACA_KEY_LENGTH_IV_128BIT = 128; - - /// 8 bits - static const int YACA_KEY_LENGTH_UNSAFE_8BIT = 8; - - /// 40 bits - static const int YACA_KEY_LENGTH_UNSAFE_40BIT = 40; - - /// 64 bits - static const int YACA_KEY_LENGTH_UNSAFE_64BIT = 64; - - /// 80 bits - static const int YACA_KEY_LENGTH_UNSAFE_80BIT = 80; - - /// 128 bits - static const int YACA_KEY_LENGTH_UNSAFE_128BIT = 128; - - /// 192 bits - static const int YACA_KEY_LENGTH_192BIT = 192; - - /// 256 bits - static const int YACA_KEY_LENGTH_256BIT = 256; - - /// 512 bits - static const int YACA_KEY_LENGTH_512BIT = 512; - - /// 1024 bits - static const int YACA_KEY_LENGTH_1024BIT = 1024; - - /// 2048 bits - static const int YACA_KEY_LENGTH_2048BIT = 2048; - - /// 3072 bits - static const int YACA_KEY_LENGTH_3072BIT = 3072; - - /// 4096 bits - static const int YACA_KEY_LENGTH_4096BIT = 4096; -} - -/// @brief Enumeration of YACA elliptic curve types with their bit lengths. -/// It's meant to be passed or returned as a @a key_bit_len param -/// in appropriate functions when dealing with elliptic curves. -/// -/// @since_tizen 3.0 -abstract class yaca_key_bit_length_ec_e { - /// Elliptic curve prime192v1 - static const int YACA_KEY_LENGTH_EC_PRIME192V1 = 805306560; - - /// Elliptic curve prime256v1 - static const int YACA_KEY_LENGTH_EC_PRIME256V1 = 805306624; - - /// Elliptic curve secp256k1 - static const int YACA_KEY_LENGTH_EC_SECP256K1 = 824180992; - - /// Elliptic curve secp384r1 - static const int YACA_KEY_LENGTH_EC_SECP384R1 = 823132544; - - /// Elliptic curve secp521r1 - static const int YACA_KEY_LENGTH_EC_SECP521R1 = 823132681; -} - -/// @brief Enumeration of YACA DH parameters taken from RFC 5114. -/// It's meant to be passed or returned as a @a key_bit_len param -/// in appropriate functions when dealing with DH and wanting to -/// use RFC 5114 values. -/// -/// @since_tizen 3.0 -abstract class yaca_key_bit_length_dh_rfc_e { - /// RFC 5114 DH parameters 1024_160 - static const int YACA_KEY_LENGTH_DH_RFC_1024_160 = 536871936; - - /// RFC 5114 DH parameters 2048_224 - static const int YACA_KEY_LENGTH_DH_RFC_2048_224 = 553650176; - - /// RFC 5114 DH parameters 2048_256 - static const int YACA_KEY_LENGTH_DH_RFC_2048_256 = 570427392; -} - -/// @brief Enumeration of YACA message digest algorithms. -/// -/// @since_tizen 3.0 -abstract class yaca_digest_algorithm_e { - /// Message digest algorithm MD5 - static const int YACA_DIGEST_MD5 = 0; - - /// Message digest algorithm SHA1 - static const int YACA_DIGEST_SHA1 = 1; - - /// Message digest algorithm SHA2, 224bit - static const int YACA_DIGEST_SHA224 = 2; - - /// Message digest algorithm SHA2, 256bit - static const int YACA_DIGEST_SHA256 = 3; - - /// Message digest algorithm SHA2, 384bit - static const int YACA_DIGEST_SHA384 = 4; - - /// Message digest algorithm SHA2, 512bit - static const int YACA_DIGEST_SHA512 = 5; -} - -/// @brief Enumeration of YACA symmetric encryption algorithms. -/// -/// @since_tizen 3.0 -abstract class yaca_encrypt_algorithm_e { - /// AES encryption. - /// - Supported key lengths: @c 128, @c 192 and @c 256 bits. - /// - Supported block cipher modes:\n - /// #YACA_BCM_CBC,\n - /// #YACA_BCM_OFB,\n - /// #YACA_BCM_CFB,\n - /// #YACA_BCM_CFB1,\n - /// #YACA_BCM_CFB8,\n - /// #YACA_BCM_ECB,\n - /// #YACA_BCM_GCM,\n - /// #YACA_BCM_CCM,\n - /// #YACA_BCM_CTR,\n - /// #YACA_BCM_WRAP - /// - see #yaca_block_cipher_mode_e for details on additional properties (mandatory). - static const int YACA_ENCRYPT_AES = 0; - - /// DES encryption. - /// - Supported key lengths: @c 64 bits. - /// - Supported block cipher modes:\n - /// #YACA_BCM_CBC,\n - /// #YACA_BCM_OFB,\n - /// #YACA_BCM_CFB,\n - /// #YACA_BCM_CFB1,\n - /// #YACA_BCM_CFB8,\n - /// #YACA_BCM_ECB - /// - see #yaca_block_cipher_mode_e for details on additional properties (mandatory). - static const int YACA_ENCRYPT_UNSAFE_DES = 1; - - /// 3DES 2-key encryption. - /// - Supported key lengths: @c 128 bits. - /// - Supported block cipher modes:\n - /// #YACA_BCM_CBC,\n - /// #YACA_BCM_OFB,\n - /// #YACA_BCM_CFB,\n - /// #YACA_BCM_ECB - /// - see #yaca_block_cipher_mode_e for details on additional properties (mandatory). - /// - Use double DES keys to perform corresponding 2-key 3DES encryption. - static const int YACA_ENCRYPT_UNSAFE_3DES_2TDEA = 2; - - /// 3DES 3-key encryption. - /// - Supported key lengths: @c 192 bits. - /// - Supported block cipher modes:\n - /// #YACA_BCM_CBC,\n - /// #YACA_BCM_OFB,\n - /// #YACA_BCM_CFB,\n - /// #YACA_BCM_CFB1,\n - /// #YACA_BCM_CFB8,\n - /// #YACA_BCM_ECB,\n - /// #YACA_BCM_WRAP - /// - see #yaca_block_cipher_mode_e for details on additional properties (mandatory). - /// - Use triple DES keys to perform corresponding 3-key 3DES encryption. - static const int YACA_ENCRYPT_3DES_3TDEA = 3; - - /// RC2 encryption. - /// This is a variable key length cipher. - /// - Supported key lengths: 8-1024 bits in steps of 8 bits. - /// - Effective key bits property by default equals to 128 bits.\n - /// Effective key bits can be set using yaca_context_set_property() and - /// #YACA_PROPERTY_RC2_EFFECTIVE_KEY_BITS.\n - /// It can be set after yaca_encrypt_initialize() / yaca_decrypt_initialize(), and before - /// yaca_encrypt_update() / yaca_decrypt_update() in encryption / decryption operation. - /// - /// - Supported block cipher modes:\n - /// #YACA_BCM_CBC,\n - /// #YACA_BCM_OFB,\n - /// #YACA_BCM_CFB,\n - /// #YACA_BCM_ECB - /// - see #yaca_block_cipher_mode_e for details on additional properties (mandatory). - static const int YACA_ENCRYPT_UNSAFE_RC2 = 4; - - /// RC4 encryption. - /// This is a variable key length cipher. - /// - Supported key lengths: 40–2048 bits in steps of 8 bits. - /// - Initialization Vector is not used. - /// - This cipher doesn't support block cipher modes, use #YACA_BCM_NONE instead. - static const int YACA_ENCRYPT_UNSAFE_RC4 = 5; - - /// CAST5 encryption. - /// This is a variable key length cipher. - /// - Supported key lengths: 40-128 bits in steps of 8 bits. - /// - Supported block cipher modes:\n - /// #YACA_BCM_CBC,\n - /// #YACA_BCM_OFB,\n - /// #YACA_BCM_CFB,\n - /// #YACA_BCM_ECB - /// - see #yaca_block_cipher_mode_e for details on additional properties (mandatory). - static const int YACA_ENCRYPT_CAST5 = 6; -} - -/// @brief Enumeration of YACA chaining modes for block ciphers. -/// -/// @since_tizen 3.0 -abstract class yaca_block_cipher_mode_e { - /// Used when algorithm doesn't support block ciphers modes. - /// Initialization Vector is not used. - static const int YACA_BCM_NONE = 0; - - /// ECB block cipher mode. - /// Initialization Vector is not used. - /// - /// By default the input data is padded using standard block padding (#YACA_PADDING_PKCS7). - /// Padding can be disabled using yaca_context_set_property() and - /// #YACA_PROPERTY_PADDING,#YACA_PADDING_NONE, - /// then the total length of data passed until *_finalize() MUST be a multiple of block size. - /// #YACA_PROPERTY_PADDING can be set at the latest before the *_finalize() call. - static const int YACA_BCM_ECB = 1; - - /// CTR block cipher mode. - /// 128-bit Initialization Vector for AES, - /// 64-bit for other algorithms is mandatory. - static const int YACA_BCM_CTR = 2; - - /// CBC block cipher mode. - /// 128-bit Initialization Vector for AES, - /// 64-bit for other algorithms is mandatory. - /// - /// By default the input data is padded using standard block padding (#YACA_PADDING_PKCS7). - /// Padding can be disabled using yaca_context_set_property() and - /// #YACA_PROPERTY_PADDING, #YACA_PADDING_NONE, - /// then the total length of data passed until *_finalize() MUST be a multiple of block size. - /// #YACA_PROPERTY_PADDING can be set at the latest before the *_finalize() call. - static const int YACA_BCM_CBC = 3; - - /// GCM block cipher mode. - /// This is a variable Initialization Vector length mode (recommended 96-bits). - /// - /// Supported properties: - /// - #YACA_PROPERTY_GCM_TAG_LEN = GCM tag length (optional)\n - /// Supported tag lengths: @c 4, @c 8, @c 12, @c 13, @c 14, @c 15, @c 16 - /// (16 bytes tag by default).\n - /// Set after yaca_encrypt_finalize() / yaca_seal_finalize() and before - /// yaca_context_get_property(#YACA_PROPERTY_GCM_TAG) in encryption / seal operation.\n - /// The @a value should be a size_t variable.\n - /// In decryption / open operation tag length is not set.\n\n - /// - /// - #YACA_PROPERTY_GCM_TAG = GCM tag\n - /// Get after yaca_encrypt_finalize() / yaca_seal_finalize() in encryption / seal operation.\n - /// Set after yaca_decrypt_update() / yaca_open_update() and before - /// yaca_decrypt_finalize() / yaca_open_finalize() in decryption / open operation.\n\n - /// - /// - #YACA_PROPERTY_GCM_AAD = additional authentication data (optional)\n - /// Set after yaca_encrypt_initialize() / yaca_seal_initialize() and before - /// yaca_encrypt_update() / yaca_seal_update() in encryption / seal operation.\n - /// Set after yaca_decrypt_initialize() / yaca_open_initialize() and before - /// yaca_decrypt_update() / yaca_open_update() in decryption / open operation.\n\n - /// - /// @see yaca_context_set_property() - /// @see yaca_context_get_property() - static const int YACA_BCM_GCM = 4; - - /// Default CFB block cipher mode. - /// 128-bit Initialization Vector for AES, - /// 64-bit for other algorithms is mandatory. - static const int YACA_BCM_CFB = 5; - - /// 1 bit CFB block cipher mode. - /// 128-bit Initialization Vector for AES, - /// 64-bit for other algorithms is mandatory. - static const int YACA_BCM_CFB1 = 6; - - /// 8 bits CFB block cipher mode. - /// 128-bit Initialization Vector for AES, - /// 64-bit for other algorithms is mandatory. - static const int YACA_BCM_CFB8 = 7; - - /// OFB block cipher mode. - /// 128-bit Initialization Vector for AES, - /// 64-bit for other algorithms is mandatory. - static const int YACA_BCM_OFB = 8; - - /// CBC-MAC Mode (AES). - /// This is a variable Initialization Vector length mode.\n - /// Supported Initialization Vector lengths: 56-104 bits in steps of 8 bits - /// (recommended 56-bits).\n\n - /// - /// Supported properties: - /// - #YACA_PROPERTY_CCM_TAG_LEN = CCM tag length (optional)\n - /// Supported tag lengths: 4-16 bytes in steps of 2 bytes (12 bytes tag by default).\n - /// Set after yaca_encrypt_initialize() / yaca_seal_initialize() and before - /// yaca_encrypt_update() / yaca_seal_update() in encryption / seal operation.\n - /// The @a value should be a size_t variable.\n - /// In decryption / open operation tag length is not set.\n\n - /// - /// - #YACA_PROPERTY_CCM_TAG = CCM tag\n - /// Get after yaca_encrypt_finalize() / yaca_seal_finalize() in encryption / seal operation.\n - /// Set after yaca_decrypt_initialize() / yaca_open_initialize() and before - /// yaca_decrypt_update() / yaca_open_update() in decryption / open operation.\n\n - /// - /// - #YACA_PROPERTY_CCM_AAD = additional authentication data (optional)\n - /// The total plaintext length must be passed to yaca_encrypt_update() / yaca_seal_update() - /// if AAD is used.\n - /// Set after yaca_encrypt_initialize() / yaca_seal_initialize() and before - /// yaca_encrypt_update() / yaca_seal_update() in encryption / seal operation.\n - /// You can only call yaca_encrypt_update() / yaca_seal_update() once for AAD - /// and once for the plaintext.\n\n - /// - /// The total encrypted text length must be passed to yaca_decrypt_update() / - /// yaca_open_update() if AAD is used.\n - /// Set after yaca_decrypt_initialize() / yaca_open_initialize() and before - /// yaca_decrypt_update() / yaca_open_update() in decryption / open operation.\n - /// You can only call yaca_decrypt_update() / yaca_open_update() once for AAD - /// and once for the encrypted text.\n\n - /// - /// @see yaca_context_set_property() - /// @see yaca_context_get_property() - static const int YACA_BCM_CCM = 9; - - /// Used with #YACA_ENCRYPT_AES or #YACA_ENCRYPT_3DES_3TDEA to perform a key wrapping - /// (key material symmetric encryption). - /// - /// Only a single yaca_encrypt_update() / yaca_decrypt_update() is allowed. - /// - /// Usage in yaca_seal_initialize() / yaca_open_finalize() is forbidden. - /// - /// Key used to do the wrapping with #YACA_ENCRYPT_AES can be a 128-bit key, a 192-bit key, - /// or a 256-bit key.\n - /// 64-bit Initialization Vector is used.\n - /// Wrapped key can be a 128-bit key, a 192-bit key, or a 256-bit key.\n - /// #YACA_ENCRYPT_AES allows wrapping multiple keys together. - /// - /// Key used to do the wrapping with #YACA_ENCRYPT_3DES_3TDEA can be a 192-bit DES key only.\n - /// Initialization Vector is not used.\n - /// Wrapped key can be a 128-bit DES key (two-key), or a 192-bit DES key (three-key).\n - /// #YACA_ENCRYPT_3DES_3TDEA allows wrapping only one key. - static const int YACA_BCM_WRAP = 10; -} - -/// @brief Enumeration of YACA non-standard properties for algorithms. -/// -/// @since_tizen 3.0 -/// -/// @see #yaca_padding_e -abstract class yaca_property_e { - /// Padding for the encrypt/decrypt or sign/verify operation. Property type is #yaca_padding_e. - /// - /// This property can be set at the latest before the *_finalize() call. - static const int YACA_PROPERTY_PADDING = 0; - - /// GCM Additional Authentication Data. Property type is a buffer (e.g. char*) - static const int YACA_PROPERTY_GCM_AAD = 1; - - /// GCM Tag. Property type is a buffer (e.g. char*) - static const int YACA_PROPERTY_GCM_TAG = 2; - - /// GCM Tag length in bytes. Property type is size_t. - static const int YACA_PROPERTY_GCM_TAG_LEN = 3; - - /// CCM Additional Authentication Data. Property type is a buffer (e.g. char*) - static const int YACA_PROPERTY_CCM_AAD = 4; - - /// CCM Tag. Property type is a buffer (e.g. char*) - static const int YACA_PROPERTY_CCM_TAG = 5; - - /// CCM Tag length in bytes. Property type is size_t. - static const int YACA_PROPERTY_CCM_TAG_LEN = 6; - - /// RC2 effective key bits, 1-1024, 1 bit resolution. Property type is size_t. - static const int YACA_PROPERTY_RC2_EFFECTIVE_KEY_BITS = 7; -} - -/// @brief Enumeration of YACA paddings. -/// -/// @since_tizen 3.0 -abstract class yaca_padding_e { - /// No padding at all. This method assumes that the input data already has a proper length for - /// a given cryptographic operation (e.g. it has been padded by the client). Suitable for - /// symmetric encrypt/decrypt operations as well as low-level RSA operations. - static const int YACA_PADDING_NONE = 0; - - /// X9.31 padding. Suitable for RSA sign/verify operation. Not supported in low-level - /// RSA operations. - static const int YACA_PADDING_X931 = 1; - - /// PKCS #1 v1.5 padding. Suitable for RSA sign/verify and low-level RSA operations. - /// For low-level operations the input must be at least 11 bytes shorter than the key length. - static const int YACA_PADDING_PKCS1 = 2; - - /// PKCS #1 PSS padding. Suitable for RSA sign/verify operations. Not supported in low-level - /// RSA operations. - static const int YACA_PADDING_PKCS1_PSS = 3; - - /// EME-OAEP as defined in PKCS #1 v2.0 with SHA-1, MGF1 and an empty encoding parameter. - /// Suitable for low-level RSA public_encrypt/private_decrypt operations. For low-level - /// operations the input must be at least 42 bytes shorter than the key length. - static const int YACA_PADDING_PKCS1_OAEP = 4; - - /// PKCS #1 v1.5 padding with an SSL-specific modification that denotes that the party - /// is SSL3 capable. It is used for rollback attack detection in SSLv3. If during decryption it - /// turns out that both parties are using #YACA_PADDING_PKCS1_SSLV23 (both are communicating - /// using SSL2 and both are SSL3 capable) it is treated as a rollback attack and an error is - /// returned. Suitable for low-level RSA public_encrypt/private_decrypt operations. For - /// low-level operations the input must be at least 11 bytes shorter than the key length. - static const int YACA_PADDING_PKCS1_SSLV23 = 5; - - /// PKCS #7 padding. Suitable for symmetric encrypt/decrypt operation. - static const int YACA_PADDING_PKCS7 = 6; -} - -/// @brief Enumeration of YACA key derivation functions. -/// -/// @since_tizen 3.0 -abstract class yaca_kdf_e { - /// ANSI X9.42 key derivation function, - /// (shared secret derived using Diffie-Helmann key exchange protocol). - static const int YACA_KDF_X942 = 0; - - /// ANSI X9.62 key derivation function, - /// (shared secret derived using EC Diffie-Helmann key exchange protocol). - static const int YACA_KDF_X962 = 1; -} - -/// @brief The context handle. -/// -/// @since_tizen 3.0 -typedef yaca_context_h = ffi.Pointer; - -/// @brief The handle of a key, an Initialization Vector or a key generation parameters. -/// -/// @since_tizen 3.0 -typedef yaca_key_h = ffi.Pointer; - -/// @brief Enumeration of YACA error values. -/// -/// @since_tizen 3.0 -abstract class yaca_error_e { - /// Successful - static const int YACA_ERROR_NONE = 0; - - /// Invalid function parameter - static const int YACA_ERROR_INVALID_PARAMETER = -22; - - /// Out of memory - static const int YACA_ERROR_OUT_OF_MEMORY = -12; - - /// Internal error - static const int YACA_ERROR_INTERNAL = -31653887; - - /// Data mismatch - static const int YACA_ERROR_DATA_MISMATCH = -31653886; - - /// Invalid password - static const int YACA_ERROR_INVALID_PASSWORD = -31653885; -} - -/// @brief Enumeration for calendar errors. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_error_e { - /// < Successful - static const int CALENDAR_ERROR_NONE = 0; - - /// < Out of memory - static const int CALENDAR_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int CALENDAR_ERROR_INVALID_PARAMETER = -22; - - /// < Requested data does not exist - static const int CALENDAR_ERROR_NO_DATA = -61; - - /// < Operation now in progress - static const int CALENDAR_ERROR_NOW_IN_PROGRESS = -115; - - /// < Operation already in progress - static const int CALENDAR_ERROR_ALREADY_IN_PROGRESS = -114; - - /// < Operation not permitted - static const int CALENDAR_ERROR_NOT_PERMITTED = -1; - - /// < FS is full - static const int CALENDAR_ERROR_FILE_NO_SPACE = -28; - - /// < Permission denied - static const int CALENDAR_ERROR_PERMISSION_DENIED = -13; - - /// < No access to the database - static const int CALENDAR_ERROR_DB_FAILED = -33554430; - - /// < Iterator is on the last position - static const int CALENDAR_ERROR_ITERATOR_END = -33554428; - - /// < Database not found - static const int CALENDAR_ERROR_DB_RECORD_NOT_FOUND = -33554427; - - /// < Unknown IPC error - static const int CALENDAR_ERROR_IPC = -33554241; - - /// < Error from another modules - static const int CALENDAR_ERROR_SYSTEM = -33554193; - - /// < Not supported (Since 4.0) - static const int CALENDAR_ERROR_NOT_SUPPORTED = -1073741822; -} - -final class __calendar_record_h extends ffi.Opaque {} - -final class __calendar_filter_h extends ffi.Opaque {} - -final class __calendar_list_h extends ffi.Opaque {} - -final class __calendar_query_h extends ffi.Opaque {} - -final class __calendar_h extends ffi.Opaque {} - -/// @brief Enumeration for the filter match type of a string. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_match_str_flag_e { - /// < Full string, case-sensitive - static const int CALENDAR_MATCH_EXACTLY = 0; - - /// < Full string, case-insensitive - static const int CALENDAR_MATCH_FULLSTRING = 1; - - /// < Sub string, case-insensitive - static const int CALENDAR_MATCH_CONTAINS = 2; - - /// < Start with, case-insensitive - static const int CALENDAR_MATCH_STARTSWITH = 3; - - /// < End with, case-insensitive - static const int CALENDAR_MATCH_ENDSWITH = 4; - - /// < IS NOT NULL - static const int CALENDAR_MATCH_EXISTS = 5; - - /// < Calendar match string flag max enum count - static const int CALENDAR_MATCH_STR_MAX = 6; -} - -/// @brief Enumeration for the filter match type of an integer. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_match_int_flag_e { - /// < '=' - static const int CALENDAR_MATCH_EQUAL = 0; - - /// < '>' - static const int CALENDAR_MATCH_GREATER_THAN = 1; - - /// < '>=' - static const int CALENDAR_MATCH_GREATER_THAN_OR_EQUAL = 2; - - /// < '<' - static const int CALENDAR_MATCH_LESS_THAN = 3; - - /// < '<=' - static const int CALENDAR_MATCH_LESS_THAN_OR_EQUAL = 4; - - /// < '<>', this flag can yield poor performance - static const int CALENDAR_MATCH_NOT_EQUAL = 5; - - /// < IS NULL - static const int CALENDAR_MATCH_NONE = 6; - - /// < Calendar match integer flag max enum count - static const int CALENDAR_MATCH_INT_MAX = 7; -} - -/// @brief Enumeration for a filter operator. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_filter_operator_e { - /// < AND - static const int CALENDAR_FILTER_OPERATOR_AND = 0; - - /// < OR - static const int CALENDAR_FILTER_OPERATOR_OR = 1; - - /// < Calendar filter operator max enum count - static const int CALENDAR_FILTER_OPERATOR_MAX = 2; -} - -/// @brief Enumeration for the calendar book type. -/// @details "OR"ing is supported. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_book_type_e { - /// < Default calendar book type - static const int CALENDAR_BOOK_TYPE_NONE = 0; - - /// < Event calendar book type - static const int CALENDAR_BOOK_TYPE_EVENT = 1; - - /// < To-do calendar book type - static const int CALENDAR_BOOK_TYPE_TODO = 2; -} - -/// @brief Enumeration for the calendar sensitivity type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_sensitivity_e { - /// < Public Sensitivity - static const int CALENDAR_SENSITIVITY_PUBLIC = 0; - - /// < Private Sensitivity - static const int CALENDAR_SENSITIVITY_PRIVATE = 1; - - /// < Confidential Sensitivity - static const int CALENDAR_SENSITIVITY_CONFIDENTIAL = 2; -} - -/// @brief Enumeration for the attendee status. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_attendee_status_e { - /// < Pending status - static const int CALENDAR_ATTENDEE_STATUS_PENDING = 0; - - /// < Accepted status - static const int CALENDAR_ATTENDEE_STATUS_ACCEPTED = 1; - - /// < Declined status - static const int CALENDAR_ATTENDEE_STATUS_DECLINED = 2; - - /// < Tentative status - static const int CALENDAR_ATTENDEE_STATUS_TENTATIVE = 3; - - /// < Delegated status - static const int CALENDAR_ATTENDEE_STATUS_DELEGATED = 4; - - /// < Completed status - static const int CALENDAR_ATTENDEE_STATUS_COMPLETED = 5; - - /// < In process status - static const int CALENDAR_ATTENDEE_STATUS_IN_PROCESS = 6; - - /// < Calendar attendee status max enum count - static const int CALENDAR_ATTENDEE_STATUS_MAX = 7; -} - -/// @brief Enumeration for the attendee role. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_attendee_role_e { - /// < Participation is required - static const int CALENDAR_ATTENDEE_ROLE_REQ_PARTICIPANT = 0; - - /// < Accepted status - static const int CALENDAR_ATTENDEE_ROLE_OPT_PARTICIPANT = 1; - - /// < Non-Participant - static const int CALENDAR_ATTENDEE_ROLE_NON_PARTICIPANT = 2; - - /// < Chairperson - static const int CALENDAR_ATTENDEE_ROLE_CHAIR = 3; - - /// < Calendar attendee role max enum count - static const int CALENDAR_ATTENDEE_ROLE_MAX = 4; -} - -/// @brief Enumeration for the attendee cutype. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_attendee_cutyep_e { - /// < Individual cutype - static const int CALENDAR_ATTENDEE_CUTYPE_INDIVIDUAL = 0; - - /// < Group cutype - static const int CALENDAR_ATTENDEE_CUTYPE_GROUP = 1; - - /// < Resource cutype - static const int CALENDAR_ATTENDEE_CUTYPE_RESOURCE = 2; - - /// < Room cutype - static const int CALENDAR_ATTENDEE_CUTYPE_ROOM = 3; - - /// < Unknown cutype - static const int CALENDAR_ATTENDEE_CUTYPE_UNKNOWN = 4; - - /// < Calendar attendee cutype max enum count - static const int CALENDAR_ATTENDEE_CUTYPE_MAX = 5; -} - -/// @brief Enumeration for the alarm time unit type of an event, such as minutes, hours, days, and so on. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_alarm_time_unit_type_e { - /// < No reminder set - static const int CALENDAR_ALARM_NONE = -1; - - /// < Specific in seconds - static const int CALENDAR_ALARM_TIME_UNIT_SPECIFIC = 1; - - /// < Alarm time unit in minutes - static const int CALENDAR_ALARM_TIME_UNIT_MINUTE = 60; - - /// < Alarm time unit in hours - static const int CALENDAR_ALARM_TIME_UNIT_HOUR = 3600; - - /// < Alarm time unit in days - static const int CALENDAR_ALARM_TIME_UNIT_DAY = 86400; - - /// < Alarm time unit in weeks - static const int CALENDAR_ALARM_TIME_UNIT_WEEK = 604800; -} - -/// @brief Enumeration for the alarm action. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_alarm_action_e { - /// < Audio action - static const int CALENDAR_ALARM_ACTION_AUDIO = 0; - - /// < Display action - static const int CALENDAR_ALARM_ACTION_DISPLAY = 1; - - /// < Email action - static const int CALENDAR_ALARM_ACTION_EMAIL = 2; - - /// < Calendar alarm action max enum count - static const int CALENDAR_ALARM_ACTION_MAX = 3; -} - -/// @brief Enumeration for the frequency of an event's recurrence. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_recurrence_frequency_e { - /// < No recurrence event - static const int CALENDAR_RECURRENCE_NONE = 0; - - /// < An event occurs every day - static const int CALENDAR_RECURRENCE_DAILY = 1; - - /// < An event occurs on the same day of every week. According to the week flag, the event will recur every day of the week - static const int CALENDAR_RECURRENCE_WEEKLY = 2; - - /// < An event occurs on the same day of every month - static const int CALENDAR_RECURRENCE_MONTHLY = 3; - - /// < An event occurs on the same day of every year - static const int CALENDAR_RECURRENCE_YEARLY = 4; -} - -/// @brief Enumeration for the event status. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_event_status_e { - /// < No status - static const int CALENDAR_EVENT_STATUS_NONE = 1; - - /// < The event is tentative - static const int CALENDAR_EVENT_STATUS_TENTATIVE = 2; - - /// < The event is confirmed - static const int CALENDAR_EVENT_STATUS_CONFIRMED = 4; - - /// < The event is canceled - static const int CALENDAR_EVENT_STATUS_CANCELLED = 8; -} - -/// @brief Enumeration for the busy status of an event. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_event_busy_status_e { - /// < The free status - static const int CALENDAR_EVENT_BUSY_STATUS_FREE = 0; - - /// < The busy status - static const int CALENDAR_EVENT_BUSY_STATUS_BUSY = 1; - - /// < The unavailable status - static const int CALENDAR_EVENT_BUSY_STATUS_UNAVAILABLE = 2; - - /// < The tentative status - static const int CALENDAR_EVENT_BUSY_STATUS_TENTATIVE = 3; -} - -/// @brief Enumeration for the calendar event item's priority. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_event_priority_e { - /// < No priority - static const int CALENDAR_EVENT_PRIORITY_NONE = 1; - - /// < Low priority - static const int CALENDAR_EVENT_PRIORITY_LOW = 8; - - /// < Normal priority - static const int CALENDAR_EVENT_PRIORITY_NORMAL = 4; - - /// < High priority - static const int CALENDAR_EVENT_PRIORITY_HIGH = 2; -} - -/// @brief Enumeration for the calendar to-do item's priority. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_todo_priority_e { - /// < No priority - static const int CALENDAR_TODO_PRIORITY_NONE = 1; - - /// < Low priority - static const int CALENDAR_TODO_PRIORITY_LOW = 8; - - /// < Normal priority - static const int CALENDAR_TODO_PRIORITY_NORMAL = 4; - - /// < High priority - static const int CALENDAR_TODO_PRIORITY_HIGH = 2; -} - -/// @brief Enumeration for the status of a to-do. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_todo_status_e { - /// < No status - static const int CALENDAR_TODO_STATUS_NONE = 256; - - /// < Needs action status - static const int CALENDAR_TODO_STATUS_NEEDS_ACTION = 512; - - /// < Completed status - static const int CALENDAR_TODO_STATUS_COMPLETED = 1024; - - /// < Work in process status - static const int CALENDAR_TODO_STATUS_IN_PROCESS = 2048; - - /// < Canceled status - static const int CALENDAR_TODO_STATUS_CANCELED = 4096; -} - -/// @brief Enumeration for the time type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_time_type_e { - /// < Unix time - static const int CALENDAR_TIME_UTIME = 0; - - /// < Local time - static const int CALENDAR_TIME_LOCALTIME = 1; -} - -/// @brief Enumeration for the range type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_range_type_e { - /// < Range until - static const int CALENDAR_RANGE_UNTIL = 0; - - /// < Range count - static const int CALENDAR_RANGE_COUNT = 1; - - /// < No range - static const int CALENDAR_RANGE_NONE = 2; -} - -/// @brief Enumeration for the system type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_system_type_e { - /// < Locale's default calendar - static const int CALENDAR_SYSTEM_NONE = 0; - - /// < Locale's default calendar - static const int CALENDAR_SYSTEM_GREGORIAN = 1; - - /// < East asian lunisolar calendar - static const int CALENDAR_SYSTEM_EAST_ASIAN_LUNISOLAR = 2; -} - -/// @brief Enumeration for the meeting status. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_meeting_status_e { - /// < No meeting - static const int CALENDAR_MEETING_STATUS_NOTMEETING = 0; - - /// < Meeting exists - static const int CALENDAR_MEETING_STATUS_MEETING = 1; - - /// < Meeting received - static const int CALENDAR_MEETING_STATUS_RECEIVED = 2; - - /// < Meeting canceled - static const int CALENDAR_MEETING_STATUS_CANCELED = 3; -} - -/// @brief Enumeration for weekdays. -/// @details Same value as UCalendarDaysOfWeek in ICU. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_days_of_week_e { - /// < Sunday - static const int CALENDAR_SUNDAY = 1; - - /// < Monday - static const int CALENDAR_MONDAY = 2; - - /// < Tuesday - static const int CALENDAR_TUESDAY = 3; - - /// < Wednesday - static const int CALENDAR_WEDNESDAY = 4; - - /// < Thursday - static const int CALENDAR_THURSDAY = 5; - - /// < Friday - static const int CALENDAR_FRIDAY = 6; - - /// < Saturday - static const int CALENDAR_SATURDAY = 7; -} - -/// @brief Enumeration for the modified status of a record. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_record_modified_status_e { - /// < The record is inserted - static const int CALENDAR_RECORD_MODIFIED_STATUS_INSERTED = 0; - - /// < The record is updated - static const int CALENDAR_RECORD_MODIFIED_STATUS_UPDATED = 1; - - /// < The record is deleted - static const int CALENDAR_RECORD_MODIFIED_STATUS_DELETED = 2; -} - -/// @brief The structure of time. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -final class calendar_time_s extends ffi.Struct { - /// < type - @ffi.Int32() - external int type; - - external UnnamedUnion2 time; -} - -final class UnnamedUnion2 extends ffi.Union { - /// < utime - @ffi.LongLong() - external int utime; - - external UnnamedStruct5 date; -} - -final class UnnamedStruct5 extends ffi.Struct { - /// < year - @ffi.Int() - external int year; - - /// < month - @ffi.Int() - external int month; - - /// < mday - @ffi.Int() - external int mday; - - /// < hour - @ffi.Int() - external int hour; - - /// < minute - @ffi.Int() - external int minute; - - /// < second - @ffi.Int() - external int second; - - /// < Deprecated since 2.4:leap month - @ffi.Bool() - external bool is_leap_month; -} - -/// @brief Enumeration for the type of a record. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_record_type_e { - /// < No record type - static const int CALENDAR_RECORD_TYPE_NONE = 0; - - /// < Book type - static const int CALENDAR_RECORD_TYPE_CALENDAR_BOOK = 1; - - /// < Event type - static const int CALENDAR_RECORD_TYPE_EVENT = 2; - - /// < Todo type - static const int CALENDAR_RECORD_TYPE_TODO = 3; -} - -/// @brief Enumeration for the book mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_book_mode_e { - /// < All modules can read and write records of this calendar_book - static const int CALENDAR_BOOK_MODE_NONE = 0; - - /// < All modules can only read records of this calendar book - static const int CALENDAR_BOOK_MODE_RECORD_READONLY = 1; -} - -/// @brief Enumeration for the sync event type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_book_sync_event_type_e { - /// < This book would not be synced to others except me - static const int CALENDAR_BOOK_SYNC_EVENT_FOR_ME = 0; - - /// < This book would be synced to everyone and deleted events would be deleted on time - static const int CALENDAR_BOOK_SYNC_EVENT_FOR_EVERY_AND_DELETE = 1; - - /// < This book would be synced to everyone but deleted events would be retained. Deleted events are removed by calendar_db_clean_after_sync() API - static const int CALENDAR_BOOK_SYNC_EVENT_FOR_EVERY_AND_REMAIN = 2; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_book _calendar_book view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// Currently NOT Used -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID Read, Write Description
string _uri read only Identifier of this calendar book view
integer id read only DB record ID of the calendar book
string uid read, write Unique identifier
string name read, write Calendar book name
string description read, write Calendar book description
string color read, write Calendar book color for UX
string location read, write Location of the event
integer visibility read, write Visibility of the calendar book for UX
integer sync_event read, write
integer account_id read, write once Account for this calendar
integer store_type read, write Type of calendar contents(refer to the @ref calendar_book_type_e)
string sync_data1 read, write Generic data for use by syncing
string sync_data2 read, write Generic data for use by syncing
string sync_data3 read, write Generic data for use by syncing
string sync_data4 read, write Generic data for use by syncing
integer mode read, write Calendar book mode (refer to the @ref calendar_book_mode_e)
-final class _calendar_book_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int uid; - - @ffi.UnsignedInt() - external int name; - - @ffi.UnsignedInt() - external int description; - - @ffi.UnsignedInt() - external int color; - - @ffi.UnsignedInt() - external int location; - - @ffi.UnsignedInt() - external int visibility; - - @ffi.UnsignedInt() - external int sync_event; - - @ffi.UnsignedInt() - external int account_id; - - @ffi.UnsignedInt() - external int store_type; - - @ffi.UnsignedInt() - external int sync_data1; - - @ffi.UnsignedInt() - external int sync_data2; - - @ffi.UnsignedInt() - external int sync_data3; - - @ffi.UnsignedInt() - external int sync_data4; - - @ffi.UnsignedInt() - external int mode; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event _calendar_event view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// Refer to the @ref calendar_event_priority_e -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// The timezone of the start_time -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID Read, Write Description
string _uri read only Identifier of this event view
integer id read only DB record ID of the event
integer calendar_book_id read, write ID of the calendar book to which the event belongs
string summary read, write The short description of the event
string description read, write The description of the event
string location read, write The location of the event
string categories read, write The category of the event. For example APPOINTMENT, BIRTHDAY
string exdate read, write The exception list of the event. If this event has a recurrence rule, the instance of the exdate is removed. Format is "YYYYMMDD"(allday event) or "YYYYMMDDTHHMMSS". Multiple exceptions can be included with a comma
integer event_status read, write Refer to the @ref calendar_event_status_e
integer priority read, write
integer timezone read, write The timezone_id of the event if it exists. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_timezone
integer person_id read, write The person_id of the event if the event is a birthday. Refer to the contacts-service
integer busy_status read, write Refer to the @ref calendar_event_busy_status_e
integer sensitivity read, write Refer to the @ref calendar_sensitivity_e
string uid read, write The unique ID of the event
string organizer_name read, write The name of organizer of the event
string organizer_email read, write The email address of the organizer of the event
integer meeting_status read, write Refer to the @ref calendar_meeting_status_e
integer original_event_id read, write The ID of the original event if the event is an exception.
double latitude read, write The latitude of the location of the event
double longitude read, write The longitude of the location of the event
integer email_id read, write ID of the email_id. Refer to the email-service.
long long int created_time read, write The time when the event is created
long long int last_modified_time read only The time when the event is updated
integer is_deleted read only
integer freq read, write The frequent type of event recurrence. Refer to the @ref calendar_recurrence_frequency_e
integer range_type read, write Refer to the @ref calendar_range_type_e
calendar time until_time read, write The end time of the event recurrence. If the range_type is @ref CALENDAR_RANGE_UNTIL
integer count read, write The count of the event recurrence. If the range_type is @ref CALENDAR_RANGE_COUNT
integer interval read, write The interval of the event recurrence
string bysecond read, write The second list of the event recurrence. The value can be from 0 to 59. The list is seperated by commas
string byminute read, write The minute list of the event recurrence. The value can be from 0 to 59. The list is seperated by commas
string byhour read, write The hour list of the event recurrence. The value can be from 0 to 23. The list is seperated by commas
string byday read, write The day list of the event recurrence. The value can be SU, MO, TU, WE, TH, FR, SA. The list is seperated by commas
string bymonthday read, write The month day list of the event recurrence. The value can be from 1 to 31 and from -31 to -1. The list is seperated by commas
string byyearday read, write The year day list of the event recurrence. The value can be from 1 to 366 and from -366 to -1. The list is seperated by commas
string byweekno read, write The week number list of the event recurrence. The value can be from 1 to 53 and from -53 to -1. The list is seperated by commas
string bymonth read, write The month list of the event recurrence. The value can be from 1 to 12. The list is seperated by commas
string bysetpos read, write The position list of the event recurrence. The value can be from 1 to 366 and from -366 to -1. The list is seperated by commas
integer wkst read, write The start day of the week. Refer to the @ref calendar_days_of_week_e
string recurrence_id read, write RECURRENCE-ID of RFC #2445
string rdate read, write RDATE of RFC #2445
integer has_attendee read only Whether or not the event has an attendee list
integer has_alarm read only Whether or not the event has an alarm list
integer calendar_system_type read, write Refer to the @ref calendar_system_type_e
string sync_data1 read, write The sync data of the event. If developer need to save some information related to the event, they can use this property
string sync_data2 read, write The sync data of the event. If developer need to save some information related to the event, they can use this property
string sync_data3 read, write The sync data of the event. If developer need to save some information related to the event, they can use this property
string sync_data4 read, write The sync data of the event. If developer need to save some information related to the event, they can use this property
calendar time start_time read, write The start time of the event
string start_tzid read, write
calendar time end_time read, write The end time of the event
string end_tzid read, write The timezone of the end_time
child list calendar_alarm read, write The alarm list of the event. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_alarm
child list calendar_attendee read, write The attendee list of the event. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_attendee
child list exception read, write The exception mod event list of the event
child list extended read, write The extended property list of the event. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_extended_property
integer is_allday read only The event is an allday event or not
integer link_count read only The event is a linked event (Since 4.0)
integer link_base_id read only The event is a base linked event (Since 4.0)
-final class _calendar_event_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int calendar_book_id; - - @ffi.UnsignedInt() - external int summary; - - @ffi.UnsignedInt() - external int description; - - @ffi.UnsignedInt() - external int location; - - @ffi.UnsignedInt() - external int categories; - - @ffi.UnsignedInt() - external int exdate; - - @ffi.UnsignedInt() - external int event_status; - - @ffi.UnsignedInt() - external int priority; - - @ffi.UnsignedInt() - external int timezone; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int busy_status; - - @ffi.UnsignedInt() - external int sensitivity; - - @ffi.UnsignedInt() - external int uid; - - @ffi.UnsignedInt() - external int organizer_name; - - @ffi.UnsignedInt() - external int organizer_email; - - @ffi.UnsignedInt() - external int meeting_status; - - @ffi.UnsignedInt() - external int original_event_id; - - @ffi.UnsignedInt() - external int latitude; - - @ffi.UnsignedInt() - external int longitude; - - @ffi.UnsignedInt() - external int email_id; - - @ffi.UnsignedInt() - external int created_time; - - @ffi.UnsignedInt() - external int last_modified_time; - - @ffi.UnsignedInt() - external int is_deleted; - - @ffi.UnsignedInt() - external int freq; - - @ffi.UnsignedInt() - external int range_type; - - @ffi.UnsignedInt() - external int until_time; - - @ffi.UnsignedInt() - external int count; - - @ffi.UnsignedInt() - external int interval; - - @ffi.UnsignedInt() - external int bysecond; - - @ffi.UnsignedInt() - external int byminute; - - @ffi.UnsignedInt() - external int byhour; - - @ffi.UnsignedInt() - external int byday; - - @ffi.UnsignedInt() - external int bymonthday; - - @ffi.UnsignedInt() - external int byyearday; - - @ffi.UnsignedInt() - external int byweekno; - - @ffi.UnsignedInt() - external int bymonth; - - @ffi.UnsignedInt() - external int bysetpos; - - @ffi.UnsignedInt() - external int wkst; - - @ffi.UnsignedInt() - external int recurrence_id; - - @ffi.UnsignedInt() - external int rdate; - - @ffi.UnsignedInt() - external int has_attendee; - - @ffi.UnsignedInt() - external int has_alarm; - - @ffi.UnsignedInt() - external int calendar_system_type; - - @ffi.UnsignedInt() - external int sync_data1; - - @ffi.UnsignedInt() - external int sync_data2; - - @ffi.UnsignedInt() - external int sync_data3; - - @ffi.UnsignedInt() - external int sync_data4; - - @ffi.UnsignedInt() - external int start_time; - - @ffi.UnsignedInt() - external int start_tzid; - - @ffi.UnsignedInt() - external int end_time; - - @ffi.UnsignedInt() - external int end_tzid; - - @ffi.UnsignedInt() - external int calendar_alarm; - - @ffi.UnsignedInt() - external int calendar_attendee; - - @ffi.UnsignedInt() - external int exception; - - @ffi.UnsignedInt() - external int extended; - - @ffi.UnsignedInt() - external int is_allday; - - @ffi.UnsignedInt() - external int link_count; - - @ffi.UnsignedInt() - external int link_base_id; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_todo _calendar_todo view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// The timezone of the start_time -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID Read, Write Description
string _uri read only Identifier of this todo view
integer id read only DB record ID of the todo
integer calendar_book_id read, write ID of the calendar book to which the todo belongs
string summary read, write The short description of the todo
string description read, write The description of the todo
string location read, write The location of the todo
string categories read, write The category of the todo. For example APPOINTMENT, BIRTHDAY
integer todo_status read, write Refer to the @ref calendar_todo_status_e
integer priority read, write Refer to the @ref calendar_todo_priority_e
integer sensitivity read, write Refer to the @ref calendar_sensitivity_e
string uid read, write The unique ID of the todo
double latitude read, write The latitude of the location of the todo
double longitude read, write The longitude of the location of the todo
long long int created_time read, write The time when the todo is created
long long int last_modified_time read only The time when the todo is updated
long long int completed_time read, write The time when the todo is completed
integer progress read, write The progression of the todo. The value can be from 0 to 100
integer is_deleted read only
integer freq read, write The frequent type of todo recurrence. Refer to the @ref calendar_recurrence_frequency_e
integer range_type read, write Refer to the @ref calendar_range_type_e
calendar time until_time read, write The end time of the todo recurrence. If the range_type is CALENDAR_RANGE_UNTIL
integer count read, write The count of the todo recurrence. If the range_type is CALENDAR_RANGE_COUNT
integer interval read, write The interval of the todo recurrence
string bysecond read, write The second list of the todo recurrence. The value can be from 0 to 59. The list is seperated by commas
string byminute read, write The minute list of the todo recurrence. The value can be from 0 to 59. The list is seperated by commas
string byhour read, write The hour list of the todo recurrence. The value can be from 0 to 23. The list is seperated by commas
string byday read, write The day list of the todo recurrence. The value can be SU, MO, TU, WE, TH, FR, SA. The list is seperated by commas
string bymonthday read, write The month day list of the todo recurrence. The value can be from 1 to 31 and from -31 to -1. The list is seperated by commas
string byyearday read, write The year day list of the todo recurrence. The value can be from 1 to 366 and from -366 to -1. The list is seperated by commas
string byweekno read, write The week number list of the todo recurrence. The value can be from 1 to 53 and from -53 to -1. The list is seperated by commas
string bymonth read, write The month list of the todo recurrence. The value can be from 1 to 12. The list is seperated by commas
string bysetpos read, write The position list of the todo recurrence. The value can be from 1 to 366 and from -366 to -1. The list is seperated by commas
integer wkst read, write The start day of the week. Refer to the @ref calendar_days_of_week_e
integer has_alarm read only Whether or not the todo has an alarm list
string sync_data1 read, write The sync data of the todo. If developers need to save some information related to the todo, they can use this property
string sync_data2 read, write The sync data of the todo. If developers need to save some information related to the todo, they can use this property
string sync_data3 read, write The sync data of the todo. If developers need to save some information related to the todo, they can use this property
string sync_data4 read, write The sync data of the todo. If developers need to save some information related to the todo, they can use this property
calendar time start_time read, write The start time of the todo
string start_tzid read, write
calendar time due_time read, write The due time of the todo
string due_tzid read, write The timezone of the due_time
child list calendar_alarm read, write The alarm list of the todo. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_alarm
string organizer_name read, write The name of the organizer of the event
string organizer_email read, write The email address of the organizer of the event
integer has_attendee read only Whether or not the todo has an attendee list
child list calendar_attendee read, write The attendee list of the todo. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_attendee
child list extended read, write The extended property list of the todo. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_extended_property
integer is_allday read only The todo is an allday event or not
-final class _calendar_todo_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int calendar_book_id; - - @ffi.UnsignedInt() - external int summary; - - @ffi.UnsignedInt() - external int description; - - @ffi.UnsignedInt() - external int location; - - @ffi.UnsignedInt() - external int categories; - - @ffi.UnsignedInt() - external int todo_status; - - @ffi.UnsignedInt() - external int priority; - - @ffi.UnsignedInt() - external int sensitivity; - - @ffi.UnsignedInt() - external int uid; - - @ffi.UnsignedInt() - external int latitude; - - @ffi.UnsignedInt() - external int longitude; - - @ffi.UnsignedInt() - external int created_time; - - @ffi.UnsignedInt() - external int last_modified_time; - - @ffi.UnsignedInt() - external int completed_time; - - @ffi.UnsignedInt() - external int progress; - - @ffi.UnsignedInt() - external int is_deleted; - - @ffi.UnsignedInt() - external int freq; - - @ffi.UnsignedInt() - external int range_type; - - @ffi.UnsignedInt() - external int until_time; - - @ffi.UnsignedInt() - external int count; - - @ffi.UnsignedInt() - external int interval; - - @ffi.UnsignedInt() - external int bysecond; - - @ffi.UnsignedInt() - external int byminute; - - @ffi.UnsignedInt() - external int byhour; - - @ffi.UnsignedInt() - external int byday; - - @ffi.UnsignedInt() - external int bymonthday; - - @ffi.UnsignedInt() - external int byyearday; - - @ffi.UnsignedInt() - external int byweekno; - - @ffi.UnsignedInt() - external int bymonth; - - @ffi.UnsignedInt() - external int bysetpos; - - @ffi.UnsignedInt() - external int wkst; - - @ffi.UnsignedInt() - external int has_alarm; - - @ffi.UnsignedInt() - external int sync_data1; - - @ffi.UnsignedInt() - external int sync_data2; - - @ffi.UnsignedInt() - external int sync_data3; - - @ffi.UnsignedInt() - external int sync_data4; - - @ffi.UnsignedInt() - external int start_time; - - @ffi.UnsignedInt() - external int start_tzid; - - @ffi.UnsignedInt() - external int due_time; - - @ffi.UnsignedInt() - external int due_tzid; - - @ffi.UnsignedInt() - external int calendar_alarm; - - @ffi.UnsignedInt() - external int organizer_name; - - @ffi.UnsignedInt() - external int organizer_email; - - @ffi.UnsignedInt() - external int has_attendee; - - @ffi.UnsignedInt() - external int calendar_attendee; - - @ffi.UnsignedInt() - external int extended; - - @ffi.UnsignedInt() - external int is_allday; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_timezone _calendar_timezone view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID Read, Write Description
string _uri read only Identifier of this timezone view
integer id read only DB record ID of the timezone
integer calendar_book_id read, write DB record ID of a related calendar book
integer tz_offset_from_gmt read, write UTC offset which is in use when the onset of this time zone observance begins. Valid values are -720(-12:00) to 840(+14:00)
string standard_name read, write Name of the Standard Time
integer standard_start_month read, write Starting month of the Standard Time. Month is 0-based. eg, 0 for January
integer standard_start_position_of_week read, write Starting day-of-week-in-month of the Standard Time. Day is 1-based
integer standard_start_day read, write Starting day-of-week of the Standard Time. Valid values are 1(SUNDAY) to 7(SATURDAY)
integer standard_start_hour read, write Starting hour of the Standard Time. Valid values are 0 to 23
integer standard_bias read, write The number of minutes added during the Standard Time
string day_light_name read, write Name of Daylight
integer day_light_start_month read, write Starting month of Daylight. Month is 0-based. eg, 0 for January
integer day_light_start_position_of_week read, write Starting day-of-week-in-month of Daylight. Day is 1-based
integer day_light_start_day read, write Starting day-of-week of Daylight. Valid values are 1(SUNDAY) to 7(SATURDAY)
integer day_light_start_hour read, write Starting hour of Daylight. Valid values are 0 to 23
integer day_light_bias read, write The number of minutes added during Daylight Time
-final class _calendar_timezone_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int calendar_book_id; - - @ffi.UnsignedInt() - external int tz_offset_from_gmt; - - @ffi.UnsignedInt() - external int standard_name; - - @ffi.UnsignedInt() - external int standard_start_month; - - @ffi.UnsignedInt() - external int standard_start_position_of_week; - - @ffi.UnsignedInt() - external int standard_start_day; - - @ffi.UnsignedInt() - external int standard_start_hour; - - @ffi.UnsignedInt() - external int standard_bias; - - @ffi.UnsignedInt() - external int day_light_name; - - @ffi.UnsignedInt() - external int day_light_start_month; - - @ffi.UnsignedInt() - external int day_light_start_position_of_week; - - @ffi.UnsignedInt() - external int day_light_start_day; - - @ffi.UnsignedInt() - external int day_light_start_hour; - - @ffi.UnsignedInt() - external int day_light_bias; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_attendee _calendar_attendee view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID Read, Write Description
string _uri read only Identifier of this calendar attendee view
integer event_id read only Event/TODO that the attendee belongs to
string number read, write The number of the attendee
integer cutype read, write The type of attendee (one of CALENDAR_ATTENDEE_CUTYPE_INDIVIDUAL, CALENDAR_ATTENDEE_CUTYPE_GROUP, CALENDAR_ATTENDEE_CUTYPE_RESOURCE, CALENDAR_ATTENDEE_CUTYPE_ROOM, CALENDAR_ATTENDEE_CUTYPE_UNKNOWN)
integer person_id read, write Person ID that the attendee belongs to
string uid read, write Unique identifier
string email read, write The email address of the attendee
integer role read, write Attendee role (one of CALENDAR_ATTENDEE_ROLE_REQ_PARTICIPANT, CALENDAR_ATTENDEE_ROLE_OPT_PARTICIPANT, CALENDAR_ATTENDEE_ROLE_NON_PARTICIPANT, CALENDAR_ATTENDEE_ROLE_CHAIR)
integer status read, write Attendee status (one of CALENDAR_ATTENDEE_STATUS_PENDING, CALENDAR_ATTENDEE_STATUS_ACCEPTED, CALENDAR_ATTENDEE_STATUS_DECLINED, CALENDAR_ATTENDEE_STATUS_TENTATIVE, CALENDAR_ATTENDEE_STATUS_DELEGATED, CALENDAR_ATTENDEE_STATUS_COMPLETED, CALENDAR_ATTENDEE_STATUS_IN_PROCESS)
integer rsvp read, write RSVP invitation reply (one of true, false)
string delegatee_uri read, write Delegatee (DELEGATED-TO)
string delegator_uri read, write Delegator (DELEGATED-FROM)
string name read, write Attendee name
string member read, write Group that the attendee belongs to
-final class _calendar_attendee_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int parent_id; - - @ffi.UnsignedInt() - external int number; - - @ffi.UnsignedInt() - external int cutype; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int uid; - - @ffi.UnsignedInt() - external int group; - - @ffi.UnsignedInt() - external int email; - - @ffi.UnsignedInt() - external int role; - - @ffi.UnsignedInt() - external int status; - - @ffi.UnsignedInt() - external int rsvp; - - @ffi.UnsignedInt() - external int delegatee_uri; - - @ffi.UnsignedInt() - external int delegator_uri; - - @ffi.UnsignedInt() - external int name; - - @ffi.UnsignedInt() - external int member; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_alarm _calendar_alarm view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID Read, Write Description
string _uri read only Identifier of this calendar alarm view
integer parent_id read only Event that the alarm belongs to
integer type read, write Currently NOT used
long long int time read, write The alarm time of the event(This represents the number of seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000(UTC)). This MUST be used with CALENDAR_ALARM_TIME_UNIT_SPECIFIC
integer tick read, write The number of unit before start time. This MUST be used with one of CALENDAR_ALARM_TIME_UNIT_MINUTE, CALENDAR_ALARM_TIME_UNIT_HOUR, CALENDAR_ALARM_TIME_UNIT_DAY, CALENDAR_ALARM_TIME_UNIT_WEEK.
integer tick_unit read, write Reminder tick time unit (one of CALENDAR_ALARM_NONE, CALENDAR_ALARM_TIME_UNIT_SPECIFIC, CALENDAR_ALARM_TIME_UNIT_MINUTE, CALENDAR_ALARM_TIME_UNIT_HOUR, CALENDAR_ALARM_TIME_UNIT_DAY, CALENDAR_ALARM_TIME_UNIT_WEEK)
string attach read, write Alarm tone path
string summary read, write Alarm summary
string description read, write Alarm description
integer action read, write Action of alarm (one of CALENDAR_ALARM_ACTION_AUDIO, CALENDAR_ALARM_ACTION_DISPLAY, CALENDAR_ALARM_ACTION_EMAIL)
calendar time alarm_time read, write The alarm time
-final class _calendar_alarm_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int parent_id; - - @ffi.UnsignedInt() - external int tick; - - @ffi.UnsignedInt() - external int tick_unit; - - @ffi.UnsignedInt() - external int description; - - @ffi.UnsignedInt() - external int summary; - - @ffi.UnsignedInt() - external int action; - - @ffi.UnsignedInt() - external int attach; - - @ffi.UnsignedInt() - external int alarm_time; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_updated_info _calendar_updated_info view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID Description
string _uri Identifier of this updated_info view
integer id Modified event(or todo) record ID
integer calendar_book_id Calendar book ID of the modified event(or todo) record
integer modified_status Enumeration value of the modified status (@ref calendar_record_modified_status_e)
integer version Version after change
-final class _calendar_updated_info_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int calendar_book_id; - - @ffi.UnsignedInt() - external int modified_status; - - @ffi.UnsignedInt() - external int version; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event_calendar_book _calendar_event_calendar_book view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID
string _uri
integer event_id
integer calendar_book_id
string summary
string description
string location
string categories
string exdate
integer event_status
integer priority
integer timezone
integer person_id
integer busy_status
integer sensitivity
string uid
string organizer_name
string organizer_email
integer meeting_status
integer original_event_id
double latitude
double longitude
integer email_id
long long int created_time
long long int last_modified_time
integer freq
integer range_type
calendar time until_time
integer count
integer interval
string bysecond
string byminute
string byhour
string byday
string bymonthday
string byyearday
string byweekno
string bymonth
string bysetpos
integer wkst
string recurrence_id
string rdate
integer has_attendee
integer has_alarm
integer calendar_system_type
string sync_data1
string sync_data2
string sync_data3
string sync_data4
calendar time start_time
string start_tzid
calendar time end_time
string end_tzid
filter integer calendar_book_visibility
filter integer calendar_book_account_id
-final class _calendar_event_calendar_book_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int event_id; - - @ffi.UnsignedInt() - external int calendar_book_id; - - @ffi.UnsignedInt() - external int summary; - - @ffi.UnsignedInt() - external int description; - - @ffi.UnsignedInt() - external int location; - - @ffi.UnsignedInt() - external int categories; - - @ffi.UnsignedInt() - external int exdate; - - @ffi.UnsignedInt() - external int event_status; - - @ffi.UnsignedInt() - external int priority; - - @ffi.UnsignedInt() - external int timezone; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int busy_status; - - @ffi.UnsignedInt() - external int sensitivity; - - @ffi.UnsignedInt() - external int uid; - - @ffi.UnsignedInt() - external int organizer_name; - - @ffi.UnsignedInt() - external int organizer_email; - - @ffi.UnsignedInt() - external int meeting_status; - - @ffi.UnsignedInt() - external int original_event_id; - - @ffi.UnsignedInt() - external int latitude; - - @ffi.UnsignedInt() - external int longitude; - - @ffi.UnsignedInt() - external int email_id; - - @ffi.UnsignedInt() - external int created_time; - - @ffi.UnsignedInt() - external int last_modified_time; - - @ffi.UnsignedInt() - external int freq; - - @ffi.UnsignedInt() - external int range_type; - - @ffi.UnsignedInt() - external int until_time; - - @ffi.UnsignedInt() - external int count; - - @ffi.UnsignedInt() - external int interval; - - @ffi.UnsignedInt() - external int bysecond; - - @ffi.UnsignedInt() - external int byminute; - - @ffi.UnsignedInt() - external int byhour; - - @ffi.UnsignedInt() - external int byday; - - @ffi.UnsignedInt() - external int bymonthday; - - @ffi.UnsignedInt() - external int byyearday; - - @ffi.UnsignedInt() - external int byweekno; - - @ffi.UnsignedInt() - external int bymonth; - - @ffi.UnsignedInt() - external int bysetpos; - - @ffi.UnsignedInt() - external int wkst; - - @ffi.UnsignedInt() - external int recurrence_id; - - @ffi.UnsignedInt() - external int rdate; - - @ffi.UnsignedInt() - external int has_attendee; - - @ffi.UnsignedInt() - external int has_alarm; - - @ffi.UnsignedInt() - external int calendar_system_type; - - @ffi.UnsignedInt() - external int sync_data1; - - @ffi.UnsignedInt() - external int sync_data2; - - @ffi.UnsignedInt() - external int sync_data3; - - @ffi.UnsignedInt() - external int sync_data4; - - @ffi.UnsignedInt() - external int start_time; - - @ffi.UnsignedInt() - external int start_tzid; - - @ffi.UnsignedInt() - external int end_time; - - @ffi.UnsignedInt() - external int end_tzid; - - @ffi.UnsignedInt() - external int is_allday; - - @ffi.UnsignedInt() - external int calendar_book_visibility; - - @ffi.UnsignedInt() - external int calendar_book_account_id; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_todo_calendar_book _calendar_todo_calendar_book view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID
string _uri
integer todo_id
integer calendar_book_id
string summary
string description
string location
string categories
integer todo_status
integer priority
integer sensitivity
string uid
double latitude
double longitude
long long int created_time
long long int last_modified_time
long long int completed_time
integer progress
integer freq
integer range_type
calendar time until_time
integer count
integer interval
string bysecond
string byminute
string byhour
string byday
string bymonthday
string byyearday
string byweekno
string bymonth
string bysetpos
integer wkst
integer has_alarm
string sync_data1
string sync_data2
string sync_data3
string sync_data4
calendar time start_time
string start_tzid
calendar time due_time
string due_tzid
filter integer calendar_book_visibility
filter integer calendar_book_account_id
-final class _calendar_todo_calendar_book_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int todo_id; - - @ffi.UnsignedInt() - external int calendar_book_id; - - @ffi.UnsignedInt() - external int summary; - - @ffi.UnsignedInt() - external int description; - - @ffi.UnsignedInt() - external int location; - - @ffi.UnsignedInt() - external int categories; - - @ffi.UnsignedInt() - external int todo_status; - - @ffi.UnsignedInt() - external int priority; - - @ffi.UnsignedInt() - external int sensitivity; - - @ffi.UnsignedInt() - external int uid; - - @ffi.UnsignedInt() - external int latitude; - - @ffi.UnsignedInt() - external int longitude; - - @ffi.UnsignedInt() - external int created_time; - - @ffi.UnsignedInt() - external int last_modified_time; - - @ffi.UnsignedInt() - external int completed_time; - - @ffi.UnsignedInt() - external int progress; - - @ffi.UnsignedInt() - external int freq; - - @ffi.UnsignedInt() - external int range_type; - - @ffi.UnsignedInt() - external int until_time; - - @ffi.UnsignedInt() - external int count; - - @ffi.UnsignedInt() - external int interval; - - @ffi.UnsignedInt() - external int bysecond; - - @ffi.UnsignedInt() - external int byminute; - - @ffi.UnsignedInt() - external int byhour; - - @ffi.UnsignedInt() - external int byday; - - @ffi.UnsignedInt() - external int bymonthday; - - @ffi.UnsignedInt() - external int byyearday; - - @ffi.UnsignedInt() - external int byweekno; - - @ffi.UnsignedInt() - external int bymonth; - - @ffi.UnsignedInt() - external int bysetpos; - - @ffi.UnsignedInt() - external int wkst; - - @ffi.UnsignedInt() - external int has_alarm; - - @ffi.UnsignedInt() - external int sync_data1; - - @ffi.UnsignedInt() - external int sync_data2; - - @ffi.UnsignedInt() - external int sync_data3; - - @ffi.UnsignedInt() - external int sync_data4; - - @ffi.UnsignedInt() - external int start_time; - - @ffi.UnsignedInt() - external int start_tzid; - - @ffi.UnsignedInt() - external int due_time; - - @ffi.UnsignedInt() - external int due_tzid; - - @ffi.UnsignedInt() - external int organizer_name; - - @ffi.UnsignedInt() - external int organizer_email; - - @ffi.UnsignedInt() - external int has_attendee; - - @ffi.UnsignedInt() - external int is_allday; - - @ffi.UnsignedInt() - external int calendar_book_visibility; - - @ffi.UnsignedInt() - external int calendar_book_account_id; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event_calendar_book_attendee _calendar_event_calendar_book_attendee view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID
string _uri
integer event_id
integer calendar_book_id
string summary
string description
string location
string categories
string exdate
integer event_status
integer priority
integer timezone
integer person_id
integer busy_status
integer sensitivity
string uid
string organizer_name
string organizer_email
integer meeting_status
integer original_event_id
double latitude
double longitude
integer email_id
long long int created_time
long long int last_modified_time
integer freq
integer range_type
calendar time until_time
integer count
integer interval
string bysecond
string byminute
string byhour
string byday
string bymonthday
string byyearday
string byweekno
string bymonth
string bysetpos
integer wkst
string recurrence_id
string rdate
integer has_attendee
integer has_alarm
integer calendar_system_type
string sync_data1
string sync_data2
string sync_data3
string sync_data4
calendar time start_time
string start_tzid
calendar time end_time
string end_tzid
filter integer calendar_book_visibility
filter integer calendar_book_account_id
filter string attendee_email
filter string attendee_name
filter string attendee_member
-final class _calendar_event_calendar_book_attendee_property_ids - extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int event_id; - - @ffi.UnsignedInt() - external int calendar_book_id; - - @ffi.UnsignedInt() - external int summary; - - @ffi.UnsignedInt() - external int description; - - @ffi.UnsignedInt() - external int location; - - @ffi.UnsignedInt() - external int categories; - - @ffi.UnsignedInt() - external int exdate; - - @ffi.UnsignedInt() - external int event_status; - - @ffi.UnsignedInt() - external int priority; - - @ffi.UnsignedInt() - external int timezone; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int busy_status; - - @ffi.UnsignedInt() - external int sensitivity; - - @ffi.UnsignedInt() - external int uid; - - @ffi.UnsignedInt() - external int organizer_name; - - @ffi.UnsignedInt() - external int organizer_email; - - @ffi.UnsignedInt() - external int meeting_status; - - @ffi.UnsignedInt() - external int original_event_id; - - @ffi.UnsignedInt() - external int latitude; - - @ffi.UnsignedInt() - external int longitude; - - @ffi.UnsignedInt() - external int email_id; - - @ffi.UnsignedInt() - external int created_time; - - @ffi.UnsignedInt() - external int last_modified_time; - - @ffi.UnsignedInt() - external int freq; - - @ffi.UnsignedInt() - external int range_type; - - @ffi.UnsignedInt() - external int until_time; - - @ffi.UnsignedInt() - external int count; - - @ffi.UnsignedInt() - external int interval; - - @ffi.UnsignedInt() - external int bysecond; - - @ffi.UnsignedInt() - external int byminute; - - @ffi.UnsignedInt() - external int byhour; - - @ffi.UnsignedInt() - external int byday; - - @ffi.UnsignedInt() - external int bymonthday; - - @ffi.UnsignedInt() - external int byyearday; - - @ffi.UnsignedInt() - external int byweekno; - - @ffi.UnsignedInt() - external int bymonth; - - @ffi.UnsignedInt() - external int bysetpos; - - @ffi.UnsignedInt() - external int wkst; - - @ffi.UnsignedInt() - external int recurrence_id; - - @ffi.UnsignedInt() - external int rdate; - - @ffi.UnsignedInt() - external int has_attendee; - - @ffi.UnsignedInt() - external int has_alarm; - - @ffi.UnsignedInt() - external int calendar_system_type; - - @ffi.UnsignedInt() - external int sync_data1; - - @ffi.UnsignedInt() - external int sync_data2; - - @ffi.UnsignedInt() - external int sync_data3; - - @ffi.UnsignedInt() - external int sync_data4; - - @ffi.UnsignedInt() - external int start_time; - - @ffi.UnsignedInt() - external int start_tzid; - - @ffi.UnsignedInt() - external int end_time; - - @ffi.UnsignedInt() - external int end_tzid; - - @ffi.UnsignedInt() - external int is_allday; - - @ffi.UnsignedInt() - external int calendar_book_visibility; - - @ffi.UnsignedInt() - external int calendar_book_account_id; - - @ffi.UnsignedInt() - external int attendee_email; - - @ffi.UnsignedInt() - external int attendee_name; - - @ffi.UnsignedInt() - external int attendee_member; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_instance_utime_calendar_book _calendar_instance_utime_calendar_book view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID
string _uri
integer event_id
calendar time start_time
calendar time end_time
string summary
string location
integer calendar_book_id
string description
integer busy_status
integer event_status
integer priority
integer sensitivity
integer has_rrule
double latitude
double longitude
integer has_alarm
integer original_event_id
filter integer calendar_book_visibility
filter integer calendar_book_account_id
long long int last_modified_time
string sync_data1
-final class _calendar_instance_utime_calendar_book_property_ids - extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int event_id; - - @ffi.UnsignedInt() - external int start_time; - - @ffi.UnsignedInt() - external int end_time; - - @ffi.UnsignedInt() - external int summary; - - @ffi.UnsignedInt() - external int location; - - @ffi.UnsignedInt() - external int calendar_book_id; - - @ffi.UnsignedInt() - external int description; - - @ffi.UnsignedInt() - external int busy_status; - - @ffi.UnsignedInt() - external int event_status; - - @ffi.UnsignedInt() - external int priority; - - @ffi.UnsignedInt() - external int sensitivity; - - @ffi.UnsignedInt() - external int has_rrule; - - @ffi.UnsignedInt() - external int latitude; - - @ffi.UnsignedInt() - external int longitude; - - @ffi.UnsignedInt() - external int has_alarm; - - @ffi.UnsignedInt() - external int original_event_id; - - @ffi.UnsignedInt() - external int calendar_book_visibility; - - @ffi.UnsignedInt() - external int calendar_book_account_id; - - @ffi.UnsignedInt() - external int last_modified_time; - - @ffi.UnsignedInt() - external int sync_data1; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_instance_localtime_calendar_book _calendar_instance_localtime_calendar_book view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID
string _uri
integer event_id
calendar time start_time
calendar time end_time
string summary
string location
integer calendar_book_id
string description
integer busy_status
integer event_status
integer priority
integer sensitivity
integer has_rrule
double latitude
double longitude
integer has_alarm
integer original_event_id
filter integer calendar_book_visibility
filter integer calendar_book_account_id
long long int last_modified_time
string sync_data1
int is_allday
-final class _calendar_instance_localtime_calendar_book_property_ids - extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int event_id; - - @ffi.UnsignedInt() - external int start_time; - - @ffi.UnsignedInt() - external int end_time; - - @ffi.UnsignedInt() - external int summary; - - @ffi.UnsignedInt() - external int location; - - @ffi.UnsignedInt() - external int calendar_book_id; - - @ffi.UnsignedInt() - external int description; - - @ffi.UnsignedInt() - external int busy_status; - - @ffi.UnsignedInt() - external int event_status; - - @ffi.UnsignedInt() - external int priority; - - @ffi.UnsignedInt() - external int sensitivity; - - @ffi.UnsignedInt() - external int has_rrule; - - @ffi.UnsignedInt() - external int latitude; - - @ffi.UnsignedInt() - external int longitude; - - @ffi.UnsignedInt() - external int has_alarm; - - @ffi.UnsignedInt() - external int original_event_id; - - @ffi.UnsignedInt() - external int calendar_book_visibility; - - @ffi.UnsignedInt() - external int calendar_book_account_id; - - @ffi.UnsignedInt() - external int last_modified_time; - - @ffi.UnsignedInt() - external int sync_data1; - - @ffi.UnsignedInt() - external int is_allday; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_instance_utime_calendar_book_extended _calendar_instance_utime_calendar_book_extended view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID
string _uri
integer event_id
calendar time start_time
calendar time end_time
string summary
string location
integer calendar_book_id
string description
integer busy_status
integer event_status
integer priority
integer sensitivity
integer has_rrule
double latitude
double longitude
integer has_alarm
integer original_event_id
filter integer calendar_book_visibility
filter integer calendar_book_account_id
string organizer_name
string categories
integer has_attendee
string sync_data1
string sync_data2
string sync_data3
string sync_data4
-final class _calendar_instance_utime_calendar_book_extended_property_ids - extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int event_id; - - @ffi.UnsignedInt() - external int start_time; - - @ffi.UnsignedInt() - external int end_time; - - @ffi.UnsignedInt() - external int summary; - - @ffi.UnsignedInt() - external int location; - - @ffi.UnsignedInt() - external int calendar_book_id; - - @ffi.UnsignedInt() - external int description; - - @ffi.UnsignedInt() - external int busy_status; - - @ffi.UnsignedInt() - external int event_status; - - @ffi.UnsignedInt() - external int priority; - - @ffi.UnsignedInt() - external int sensitivity; - - @ffi.UnsignedInt() - external int has_rrule; - - @ffi.UnsignedInt() - external int latitude; - - @ffi.UnsignedInt() - external int longitude; - - @ffi.UnsignedInt() - external int has_alarm; - - @ffi.UnsignedInt() - external int original_event_id; - - @ffi.UnsignedInt() - external int calendar_book_visibility; - - @ffi.UnsignedInt() - external int calendar_book_account_id; - - @ffi.UnsignedInt() - external int last_modified_time; - - @ffi.UnsignedInt() - external int sync_data1; - - @ffi.UnsignedInt() - external int organizer_name; - - @ffi.UnsignedInt() - external int categories; - - @ffi.UnsignedInt() - external int has_attendee; - - @ffi.UnsignedInt() - external int sync_data2; - - @ffi.UnsignedInt() - external int sync_data3; - - @ffi.UnsignedInt() - external int sync_data4; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_instance_localtime_calendar_book_extended _calendar_instance_localtime_calendar_book_extended view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID
string _uri
integer event_id
calendar time start_time
calendar time end_time
string summary
string location
integer calendar_book_id
string description
integer busy_status
integer event_status
integer priority
integer sensitivity
integer has_rrule
double latitude
double longitude
integer has_alarm
integer original_event_id
filter integer calendar_book_visibility
filter integer calendar_book_account_id
string organizer_name
string categories
integer has_attendee
string sync_data1
string sync_data2
string sync_data3
string sync_data4
-final class _calendar_instance_localtime_calendar_book_extended_property_ids - extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int event_id; - - @ffi.UnsignedInt() - external int start_time; - - @ffi.UnsignedInt() - external int end_time; - - @ffi.UnsignedInt() - external int summary; - - @ffi.UnsignedInt() - external int location; - - @ffi.UnsignedInt() - external int calendar_book_id; - - @ffi.UnsignedInt() - external int description; - - @ffi.UnsignedInt() - external int busy_status; - - @ffi.UnsignedInt() - external int event_status; - - @ffi.UnsignedInt() - external int priority; - - @ffi.UnsignedInt() - external int sensitivity; - - @ffi.UnsignedInt() - external int has_rrule; - - @ffi.UnsignedInt() - external int latitude; - - @ffi.UnsignedInt() - external int longitude; - - @ffi.UnsignedInt() - external int has_alarm; - - @ffi.UnsignedInt() - external int original_event_id; - - @ffi.UnsignedInt() - external int calendar_book_visibility; - - @ffi.UnsignedInt() - external int calendar_book_account_id; - - @ffi.UnsignedInt() - external int last_modified_time; - - @ffi.UnsignedInt() - external int sync_data1; - - @ffi.UnsignedInt() - external int organizer_name; - - @ffi.UnsignedInt() - external int categories; - - @ffi.UnsignedInt() - external int has_attendee; - - @ffi.UnsignedInt() - external int is_allday; - - @ffi.UnsignedInt() - external int sync_data2; - - @ffi.UnsignedInt() - external int sync_data3; - - @ffi.UnsignedInt() - external int sync_data4; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_extended_property _calendar_extended_property view (read only) -/// -/// -/// -/// -/// -/// -/// -/// Identifier of this extended_property view -/// -/// -/// -/// -/// -///
Type Property ID Read, Write Description
string _uri read only
integer id read only DB record ID of the extended_property
integer record_id read,write Related record ID
integer record_type read, write Enumeration value of the record type (@ref calendar_record_type_e)
string key read, write The key of the property
string value read, write The value of the property
-final class _calendar_extended_property_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int record_id; - - @ffi.UnsignedInt() - external int record_type; - - @ffi.UnsignedInt() - external int key; - - @ffi.UnsignedInt() - external int value; -} - -typedef calendar_record_h = ffi.Pointer<__calendar_record_h>; -typedef calendar_list_h = ffi.Pointer<__calendar_list_h>; -typedef calendar_query_h = ffi.Pointer<__calendar_query_h>; - -/// @brief Called when a designated view changes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -/// @param[in] view_uri The view URI -/// @param[in] user_data The user data passed from the callback registration function -/// @see calendar_db_add_changed_cb() -typedef calendar_db_changed_cb - = ffi.Pointer>; -typedef calendar_db_changed_cbFunction = ffi.Void Function( - ffi.Pointer view_uri, ffi.Pointer user_data); -typedef Dartcalendar_db_changed_cbFunction = void Function( - ffi.Pointer view_uri, ffi.Pointer user_data); -typedef calendar_filter_h = ffi.Pointer<__calendar_filter_h>; - -/// @brief Called to get a record handle of -/// \ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event or \ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_todo. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -/// @param[in] record The record handle (\ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event or \ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_todo) -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @pre calendar_vcalendar_parse_to_calendar_foreach() will invoke this callback. -/// @see calendar_vcalendar_parse_to_calendar_foreach() -/// @see calendar_record_get_uri_p() -typedef calendar_vcalendar_parse_cb - = ffi.Pointer>; -typedef calendar_vcalendar_parse_cbFunction = ffi.Bool Function( - calendar_record_h record, ffi.Pointer user_data); -typedef Dartcalendar_vcalendar_parse_cbFunction = bool Function( - calendar_record_h record, ffi.Pointer user_data); - -/// @brief Called when an alarm is alerted. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -/// @param[in] param Value string like id=value&time=value&tick=value&unit=value&type=value -/// @param[in] user_data The user data passed from the callback registration function -/// @see calendar_reminder_add_cb() -typedef calendar_reminder_cb - = ffi.Pointer>; -typedef calendar_reminder_cbFunction = ffi.Void Function( - ffi.Pointer param, ffi.Pointer user_data); -typedef Dartcalendar_reminder_cbFunction = void Function( - ffi.Pointer param, ffi.Pointer user_data); - -/// @brief Enumeration for contacts errors. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_error_e { - /// < Successful - static const int CONTACTS_ERROR_NONE = 0; - - /// < Out of memory - static const int CONTACTS_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int CONTACTS_ERROR_INVALID_PARAMETER = -22; - - /// < FS Full - static const int CONTACTS_ERROR_FILE_NO_SPACE = -28; - - /// < Permission denied - static const int CONTACTS_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int CONTACTS_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Requested data does not exist - static const int CONTACTS_ERROR_NO_DATA = -61; - - /// < Database table locked or file locked - static const int CONTACTS_ERROR_DB_LOCKED = -33619839; - - /// < Unknown DB error - static const int CONTACTS_ERROR_DB = -33619809; - - /// < IPC server is not available - static const int CONTACTS_ERROR_IPC_NOT_AVALIABLE = -33619791; - - /// < Unknown IPC error - static const int CONTACTS_ERROR_IPC = -33619777; - - /// < Internal system module error - static const int CONTACTS_ERROR_SYSTEM = -33619729; - - /// < Implementation Error, Temporary Use - static const int CONTACTS_ERROR_INTERNAL = -33619713; -} - -final class __contacts_record_h extends ffi.Opaque {} - -final class __contacts_filter_h extends ffi.Opaque {} - -final class __contacts_list_h extends ffi.Opaque {} - -final class __contacts_query_h extends ffi.Opaque {} - -final class __contacts_h extends ffi.Opaque {} - -/// @brief Enumeration for contacts data type. -/// @since_tizen 3.0 -abstract class contacts_data_type_e { - static const int CONTACTS_DATA_TYPE_NAME = 1; - static const int CONTACTS_DATA_TYPE_POSTAL = 2; - static const int CONTACTS_DATA_TYPE_MESSENGER = 3; - static const int CONTACTS_DATA_TYPE_URL = 4; - static const int CONTACTS_DATA_TYPE_EVENT = 5; - static const int CONTACTS_DATA_TYPE_COMPANY = 6; - static const int CONTACTS_DATA_TYPE_NICKNAME = 7; - static const int CONTACTS_DATA_TYPE_NUMBER = 8; - static const int CONTACTS_DATA_TYPE_EMAIL = 9; - static const int CONTACTS_DATA_TYPE_PROFILE = 10; - static const int CONTACTS_DATA_TYPE_RELATIONSHIP = 11; - static const int CONTACTS_DATA_TYPE_NOTE = 12; - static const int CONTACTS_DATA_TYPE_IMAGE = 13; - static const int CONTACTS_DATA_TYPE_SIP = 14; - static const int CONTACTS_DATA_TYPE_EXTENSION = 100; -} - -/// @brief Enumeration for contacts number type. -/// @details The number can be made with a set of values by specifying one or more values. -/// Example : CTS_NUM_TYPE_HOME|CTS_NUM_TYPE_VOICE -/// Exceptionally, CTS_NUM_TYPE_CUSTOM is exclusive. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_number_type_e { - /// < Other number type - static const int CONTACTS_NUMBER_TYPE_OTHER = 0; - - /// < Custom number type - static const int CONTACTS_NUMBER_TYPE_CUSTOM = 1; - - /// < A telephone number associated with a residence - static const int CONTACTS_NUMBER_TYPE_HOME = 2; - - /// < A telephone number associated with a place of work - static const int CONTACTS_NUMBER_TYPE_WORK = 4; - - /// < A voice telephone number - static const int CONTACTS_NUMBER_TYPE_VOICE = 8; - - /// < A facsimile telephone number - static const int CONTACTS_NUMBER_TYPE_FAX = 16; - - /// < The telephone number has voice messaging support - static const int CONTACTS_NUMBER_TYPE_MSG = 32; - - /// < A cellular telephone number - static const int CONTACTS_NUMBER_TYPE_CELL = 64; - - /// < A paging device telephone number - static const int CONTACTS_NUMBER_TYPE_PAGER = 128; - - /// < A bulletin board system telephone number - static const int CONTACTS_NUMBER_TYPE_BBS = 256; - - /// < A MODEM connected telephone number - static const int CONTACTS_NUMBER_TYPE_MODEM = 512; - - /// < A car-phone telephone number - static const int CONTACTS_NUMBER_TYPE_CAR = 1024; - - /// < An ISDN service telephone number - static const int CONTACTS_NUMBER_TYPE_ISDN = 2048; - - /// < A video conferencing telephone number - static const int CONTACTS_NUMBER_TYPE_VIDEO = 4096; - - /// < A personal communication services telephone number - static const int CONTACTS_NUMBER_TYPE_PCS = 8192; - - /// < A company main number - static const int CONTACTS_NUMBER_TYPE_COMPANY_MAIN = 16384; - - /// < A radio phone number - static const int CONTACTS_NUMBER_TYPE_RADIO = 32768; - - /// < An additional type for main - static const int CONTACTS_NUMBER_TYPE_MAIN = 536870912; - - /// < An additional type for assistant - static const int CONTACTS_NUMBER_TYPE_ASSISTANT = 1073741824; -} - -/// @brief Enumeration for Contact email type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_email_type_e { - /// < Other email type - static const int CONTACTS_EMAIL_TYPE_OTHER = 0; - - /// < Custom email type - static const int CONTACTS_EMAIL_TYPE_CUSTOM = 1; - - /// < An email address associated with a residence - static const int CONTACTS_EMAIL_TYPE_HOME = 2; - - /// < An email address associated with a place of work - static const int CONTACTS_EMAIL_TYPE_WORK = 4; - - /// < A mobile email address - static const int CONTACTS_EMAIL_TYPE_MOBILE = 8; -} - -/// @brief Enumeration for Contact company type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_company_type_e { - /// < Other company type - static const int CONTACTS_COMPANY_TYPE_OTHER = 0; - - /// < Custom company type - static const int CONTACTS_COMPANY_TYPE_CUSTOM = 1; - - /// < Work company type - static const int CONTACTS_COMPANY_TYPE_WORK = 2; -} - -/// @brief Enumeration for Contact address type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_address_type_e { - /// < Other address type - static const int CONTACTS_ADDRESS_TYPE_OTHER = 0; - - /// < A delivery address for a residence - static const int CONTACTS_ADDRESS_TYPE_CUSTOM = 1; - - /// < A delivery address for a residence - static const int CONTACTS_ADDRESS_TYPE_HOME = 2; - - /// < A delivery address for a place of work - static const int CONTACTS_ADDRESS_TYPE_WORK = 4; - - /// < A domestic delivery address - static const int CONTACTS_ADDRESS_TYPE_DOM = 8; - - /// < An international delivery address - static const int CONTACTS_ADDRESS_TYPE_INTL = 16; - - /// < A postal delivery address - static const int CONTACTS_ADDRESS_TYPE_POSTAL = 32; - - /// < A parcel delivery address - static const int CONTACTS_ADDRESS_TYPE_PARCEL = 64; -} - -/// @brief Enumeration for Contact URL type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_url_type_e { - /// < Other URL type - static const int CONTACTS_URL_TYPE_OTHER = 0; - - /// < Custom URL type - static const int CONTACTS_URL_TYPE_CUSTOM = 1; - - /// < Home URL type - static const int CONTACTS_URL_TYPE_HOME = 2; - - /// < Work URL type - static const int CONTACTS_URL_TYPE_WORK = 3; -} - -/// @brief Enumeration for Contact messenger type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_messenger_type_e { - /// < Other messenger type - static const int CONTACTS_MESSENGER_TYPE_OTHER = 0; - - /// < Custom messenger type - static const int CONTACTS_MESSENGER_TYPE_CUSTOM = 1; - - /// < Google messenger type - static const int CONTACTS_MESSENGER_TYPE_GOOGLE = 2; - - /// < Windows live messenger type - static const int CONTACTS_MESSENGER_TYPE_WLM = 3; - - /// < Yahoo messenger type - static const int CONTACTS_MESSENGER_TYPE_YAHOO = 4; - - /// < Facebook messenger type - static const int CONTACTS_MESSENGER_TYPE_FACEBOOK = 5; - - /// < ICQ type - static const int CONTACTS_MESSENGER_TYPE_ICQ = 6; - - /// < AOL instance messenger type - static const int CONTACTS_MESSENGER_TYPE_AIM = 7; - - /// < QQ type - static const int CONTACTS_MESSENGER_TYPE_QQ = 8; - - /// < Jabber type - static const int CONTACTS_MESSENGER_TYPE_JABBER = 9; - - /// < Skype type - static const int CONTACTS_MESSENGER_TYPE_SKYPE = 10; - - /// < IRC type - static const int CONTACTS_MESSENGER_TYPE_IRC = 11; -} - -/// @brief Enumeration for Call history type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_phone_log_type_e { - /// < None - static const int CONTACTS_PLOG_TYPE_NONE = 0; - - /// < Incoming call - static const int CONTACTS_PLOG_TYPE_VOICE_INCOMING = 1; - - /// < Outgoing call - static const int CONTACTS_PLOG_TYPE_VOICE_OUTGOING = 2; - - /// < Incoming video call - static const int CONTACTS_PLOG_TYPE_VIDEO_INCOMING = 3; - - /// < Outgoing video call - static const int CONTACTS_PLOG_TYPE_VIDEO_OUTGOING = 4; - - /// < Not confirmed missed call - static const int CONTACTS_PLOG_TYPE_VOICE_INCOMING_UNSEEN = 5; - - /// < Confirmed missed call - static const int CONTACTS_PLOG_TYPE_VOICE_INCOMING_SEEN = 6; - - /// < Not confirmed missed video call - static const int CONTACTS_PLOG_TYPE_VIDEO_INCOMING_UNSEEN = 7; - - /// < Confirmed missed video call - static const int CONTACTS_PLOG_TYPE_VIDEO_INCOMING_SEEN = 8; - - /// < Rejected call - static const int CONTACTS_PLOG_TYPE_VOICE_REJECT = 9; - - /// < Rejected video call - static const int CONTACTS_PLOG_TYPE_VIDEO_REJECT = 10; - - /// < Blocked call - static const int CONTACTS_PLOG_TYPE_VOICE_BLOCKED = 11; - - /// < Blocked video call - static const int CONTACTS_PLOG_TYPE_VIDEO_BLOCKED = 12; - - /// < Incoming MMS - static const int CONTACTS_PLOG_TYPE_MMS_INCOMING = 101; - - /// < Outgoing MMS - static const int CONTACTS_PLOG_TYPE_MMS_OUTGOING = 102; - - /// < Incoming SMS - static const int CONTACTS_PLOG_TYPE_SMS_INCOMING = 103; - - /// < Outgoing SMS - static const int CONTACTS_PLOG_TYPE_SMS_OUTGOING = 104; - - /// < Blocked SMS - static const int CONTACTS_PLOG_TYPE_SMS_BLOCKED = 105; - - /// < Blocked MMS - static const int CONTACTS_PLOG_TYPE_MMS_BLOCKED = 106; - - /// < Received email - static const int CONTACTS_PLOG_TYPE_EMAIL_RECEIVED = 201; - - /// < Sent email - static const int CONTACTS_PLOG_TYPE_EMAIL_SENT = 202; -} - -/// @brief Enumeration for Contact event type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_event_type_e { - /// < Other event type - static const int CONTACTS_EVENT_TYPE_OTHER = 0; - - /// < Custom event type - static const int CONTACTS_EVENT_TYPE_CUSTOM = 1; - - /// < Birthday event type - static const int CONTACTS_EVENT_TYPE_BIRTH = 2; - - /// < Anniversary event type - static const int CONTACTS_EVENT_TYPE_ANNIVERSARY = 3; -} - -/// @brief Enumeration for Contact event calendar type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_event_calendar_type_e { - /// < Gregorian calendar - static const int CONTACTS_EVENT_CALENDAR_TYPE_GREGORIAN = 0; - - /// < Chinese calenadr - static const int CONTACTS_EVENT_CALENDAR_TYPE_CHINESE = 1; -} - -/// @brief Enumeration for Contact image type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_image_type_e { - /// < Other type - static const int CONTACTS_IMAGE_TYPE_OTHER = 0; - - /// < Custom type - static const int CONTACTS_IMAGE_TYPE_CUSTOM = 1; -} - -/// @brief Enumeration for usage type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_usage_type_e { - /// < None - static const int CONTACTS_USAGE_STAT_TYPE_NONE = 0; - - /// < Outgoing call - static const int CONTACTS_USAGE_STAT_TYPE_OUTGOING_CALL = 1; - - /// < Outgoing message - static const int CONTACTS_USAGE_STAT_TYPE_OUTGOING_MSG = 2; - - /// < Outgoing email (Since 3.0) - static const int CONTACTS_USAGE_STAT_TYPE_OUTGOING_EMAIL = 3; - - /// < Incoming call (Since 3.0) - static const int CONTACTS_USAGE_STAT_TYPE_INCOMING_CALL = 4; - - /// < Incoming message (Since 3.0) - static const int CONTACTS_USAGE_STAT_TYPE_INCOMING_MSG = 5; - - /// < Incoming email (Since 3.0) - static const int CONTACTS_USAGE_STAT_TYPE_INCOMING_EMAIL = 6; - - /// < Missed call (Since 3.0) - static const int CONTACTS_USAGE_STAT_TYPE_MISSED_CALL = 7; - - /// < Rejected call (Since 3.0) - static const int CONTACTS_USAGE_STAT_TYPE_REJECTED_CALL = 8; - - /// < Blocked call (Since 3.0) - static const int CONTACTS_USAGE_STAT_TYPE_BLOCKED_CALL = 9; - - /// < Blocked message (Since 3.0) - static const int CONTACTS_USAGE_STAT_TYPE_BLOCKED_MSG = 10; -} - -/// @brief Enumeration for Contact display name source type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_display_name_source_type_e { - /// < Invalid source of display name - static const int CONTACTS_DISPLAY_NAME_SOURCE_TYPE_INVALID = 0; - - /// < Produced display name from email record - static const int CONTACTS_DISPLAY_NAME_SOURCE_TYPE_EMAIL = 1; - - /// < Produced display name from number record - static const int CONTACTS_DISPLAY_NAME_SOURCE_TYPE_NUMBER = 2; - - /// < Produced display name from nickname record - static const int CONTACTS_DISPLAY_NAME_SOURCE_TYPE_NICKNAME = 3; - - /// < Produced display name from company record - static const int CONTACTS_DISPLAY_NAME_SOURCE_TYPE_COMPANY = 4; - - /// < Produced display name from name record - static const int CONTACTS_DISPLAY_NAME_SOURCE_TYPE_NAME = 5; -} - -/// @brief Enumeration for Address book mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_address_book_mode_e { - /// < All module can read and write contacts of this address_book - static const int CONTACTS_ADDRESS_BOOK_MODE_NONE = 0; - - /// < All module can only read contacts of this address_book - static const int CONTACTS_ADDRESS_BOOK_MODE_READONLY = 1; -} - -/// @brief Enumeration for link mode when inserting contact. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_contact_link_mode_e { - /// < Auto link immediately - static const int CONTACTS_CONTACT_LINK_MODE_NONE = 0; - - /// < Do not auto link when the contact is inserted - static const int CONTACTS_CONTACT_LINK_MODE_IGNORE_ONCE = 1; -} - -/// @brief Enumeration for Contact relationship type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_relationship_type_e { - /// < Other relationship type - static const int CONTACTS_RELATIONSHIP_TYPE_OTHER = 0; - - /// < Assistant type - static const int CONTACTS_RELATIONSHIP_TYPE_ASSISTANT = 1; - - /// < Brother type - static const int CONTACTS_RELATIONSHIP_TYPE_BROTHER = 2; - - /// < Child type - static const int CONTACTS_RELATIONSHIP_TYPE_CHILD = 3; - - /// < Domestic Partner type - static const int CONTACTS_RELATIONSHIP_TYPE_DOMESTIC_PARTNER = 4; - - /// < Father type - static const int CONTACTS_RELATIONSHIP_TYPE_FATHER = 5; - - /// < Friend type - static const int CONTACTS_RELATIONSHIP_TYPE_FRIEND = 6; - - /// < Manager type - static const int CONTACTS_RELATIONSHIP_TYPE_MANAGER = 7; - - /// < Mother type - static const int CONTACTS_RELATIONSHIP_TYPE_MOTHER = 8; - - /// < Parent type - static const int CONTACTS_RELATIONSHIP_TYPE_PARENT = 9; - - /// < Partner type - static const int CONTACTS_RELATIONSHIP_TYPE_PARTNER = 10; - - /// < Referred by type - static const int CONTACTS_RELATIONSHIP_TYPE_REFERRED_BY = 11; - - /// < Relative type - static const int CONTACTS_RELATIONSHIP_TYPE_RELATIVE = 12; - - /// < Sister type - static const int CONTACTS_RELATIONSHIP_TYPE_SISTER = 13; - - /// < Spouse type - static const int CONTACTS_RELATIONSHIP_TYPE_SPOUSE = 14; - - /// < Custom type - static const int CONTACTS_RELATIONSHIP_TYPE_CUSTOM = 15; -} - -/// @brief Enumeration for Contact search range. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_search_range_e { - /// < Search record from name - static const int CONTACTS_SEARCH_RANGE_NAME = 1; - - /// < Search record from name and number - static const int CONTACTS_SEARCH_RANGE_NUMBER = 2; - - /// < Search record from name,number and data - static const int CONTACTS_SEARCH_RANGE_DATA = 4; - - /// < Search record from name,number,data and email. Now, support only _contacts_person_email view_uri - static const int CONTACTS_SEARCH_RANGE_EMAIL = 8; -} - -/// @brief Enumeration for SIP(Session Intialion Protocol) type range. -/// @since_tizen 3.0 -abstract class contacts_sip_type_e { - /// < Other sip type - static const int CONTACTS_SIP_TYPE_OTHER = 0; - - /// < Custom sip type - static const int CONTACTS_SIP_TYPE_CUSTOM = 1; - - /// < Home sip type - static const int CONTACTS_SIP_TYPE_HOME = 2; - - /// < Work sip type - static const int CONTACTS_SIP_TYPE_WORK = 3; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book _contacts_address_book view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts addressbook view
integer id read only DB record ID of the addressbook
integer account_id read, write once Account ID that the addressbook belongs to
string name read, write It cannot be @c NULL. Duplicate names are not allowed.
integer mode read, write Addressbook mode, refer to the @ref contacts_address_book_mode_e
-final class _contacts_address_book_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int account_id; - - @ffi.UnsignedInt() - external int name; - - @ffi.UnsignedInt() - external int mode; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group _contacts_group view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts group view
integer id read only DB record ID of the group
integer address_book_id read, write once Addressbook ID that the group belongs to
string name read, write Group name
string ringtone_path read, write Ringtone path of the group
string image_path read, write Image path of the group
string vibration read, write Vibration path of the group
string extra_data read, write Extra data for default group name
boolean is_read_only read, write once The group is read only or not
string message_alert read, write Message alert path of the group
-final class _contacts_group_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int name; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_path; - - @ffi.UnsignedInt() - external int vibration; - - @ffi.UnsignedInt() - external int extra_data; - - @ffi.UnsignedInt() - external int is_read_only; - - @ffi.UnsignedInt() - external int message_alert; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person _contacts_person view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts person view
integer id read only DB record ID of the person
string display_name read only Display name of the person
string display_name_index read only The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id read only Display contact ID that the person belongs to
string ringtone_path read, write Ringtone path of the person
string image_thumbnail_path read only Image thumbnail path of the person
string vibration read, write Vibration path of the person
string message_alert read, write Message alert path of the person
string status read only Status of social account
boolean is_favorite read, write The person is favorite or not
double favorite_priority read only The priority of favorite contacts. it can be used as sorting key, see the @ref contacts_query_set_sort
integer link_count read only Link count of contact records (projection)
string addressbook_ids read only Addressbook IDs that the person belongs to (projection)
boolean has_phonenumber read only The person has phone number or not
boolean has_email read only The person has email or not
integer snippet_type read only keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string read only keyword matched data string (Since 3.0)
-final class _contacts_person_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_name_index; - - @ffi.UnsignedInt() - external int display_contact_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int vibration; - - @ffi.UnsignedInt() - external int status; - - @ffi.UnsignedInt() - external int is_favorite; - - @ffi.UnsignedInt() - external int favorite_priority; - - @ffi.UnsignedInt() - external int link_count; - - @ffi.UnsignedInt() - external int addressbook_ids; - - @ffi.UnsignedInt() - external int has_phonenumber; - - @ffi.UnsignedInt() - external int has_email; - - @ffi.UnsignedInt() - external int message_alert; - - @ffi.UnsignedInt() - external int snippet_type; - - @ffi.UnsignedInt() - external int snippet_string; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_simple_contact _contacts_simple_contact view -/// You can only get simple contact using this view. -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this simple contact view
integerid DB record ID of the contact
stringdisplay_name Display name of the contact
integerdisplay_source_id The source type of display name, refer to the @ref contacts_display_name_source_type_e
integeraddress_book_id Addressbook that the contact belongs to
stringringtone_path Ringtone path of the contact
stringimage_thumbnail_path Image thumbnail path of the contact
booleanis_favorite The contact is favorite or not
booleanhas_phonenumber The contact has phone number or not
booleanhas_email The contact has email or not
integerperson_id Person ID that the contact belongs to
stringuid Unique identifier
stringvibration Vibration path of the contact
stringmessage_alert Message alert path of the contact
integerchanged_time Last changed contact time
-final class _contacts_simple_contact_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_source_type; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int is_favorite; - - @ffi.UnsignedInt() - external int has_phonenumber; - - @ffi.UnsignedInt() - external int has_email; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int uid; - - @ffi.UnsignedInt() - external int vibration; - - @ffi.UnsignedInt() - external int changed_time; - - @ffi.UnsignedInt() - external int message_alert; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact _contacts_contact view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contact view
integeridread only DB record ID of the contact
stringdisplay_nameread only Display name of the contact
integerdisplay_source_idread only The source type of display name, refer to the @ref contacts_display_name_source_type_e
integeraddress_book_idread, write once Addressbook ID that the contact belongs to
stringringtone_pathread, write Ringtone path of the contact
stringimage_thumbnail_pathread only Image thumbnail path of the contact
booleanis_favoriteread, write The contact is favorite or not
booleanhas_phonenumberread only The contact has phone number or not
booleanhas_emailread only The contact has email or not
integerperson_idread, write once Person ID that the contact belongs to. If set when inserting, a contact will be linked to person
stringuidread, write Unique identifier
stringvibrationread, write Vibration path of the contact
stringmessage_alertread, write Message alert path of the contact
integerchanged_timeread only Last changed contact time
integerlink_moderead, write once The link mode, refer to the @ref contacts_contact_link_mode_e. If the person_id was set, this value will be ignored
recordnameread, write _contacts_name child record (single)
recordcompanyread, write _contacts_company child record (multiple)
recordnoteread, write _contacts_note child record (multiple)
recordnumberread, write _contacts_number child record (multiple)
recordemailread, write _contacts_email child record (multiple)
recordeventread, write _contacts_event child record (multiple)
recordmessengerread, write _contacts_messenger child record (multiple)
recordaddressread, write _contacts_address child record (multiple)
recordurlread, write _contacts_url child record (multiple)
recordnicknameread, write _contacts_nickname child record (multiple)
recordprofileread, write _contacts_profile child record (multiple)
recordrelationshipread, write _contacts_relationship child record (multiple)
recordimageread, write _contacts_image child record (multiple)
recordgroup_relationread, write _contacts_group_relation child record (multiple)
recordsipread, write _contacts_sip child record (multiple) (Since 3.0)
-final class _contacts_contact_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_source_type; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int is_favorite; - - @ffi.UnsignedInt() - external int has_phonenumber; - - @ffi.UnsignedInt() - external int has_email; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int uid; - - @ffi.UnsignedInt() - external int vibration; - - @ffi.UnsignedInt() - external int changed_time; - - @ffi.UnsignedInt() - external int link_mode; - - @ffi.UnsignedInt() - external int name; - - @ffi.UnsignedInt() - external int image; - - @ffi.UnsignedInt() - external int company; - - @ffi.UnsignedInt() - external int note; - - @ffi.UnsignedInt() - external int number; - - @ffi.UnsignedInt() - external int email; - - @ffi.UnsignedInt() - external int event; - - @ffi.UnsignedInt() - external int messenger; - - @ffi.UnsignedInt() - external int address; - - @ffi.UnsignedInt() - external int url; - - @ffi.UnsignedInt() - external int nickname; - - @ffi.UnsignedInt() - external int profile; - - @ffi.UnsignedInt() - external int relationship; - - @ffi.UnsignedInt() - external int group_relation; - - @ffi.UnsignedInt() - external int extension1; - - @ffi.UnsignedInt() - external int message_alert; - - @ffi.UnsignedInt() - external int sip; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile _contacts_my_profile view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this my profile view
integeridread only DB record ID of the my profile
stringdisplay_nameread only Display name of the profile
integeraddress_book_idread, write once Addressbook ID that the profile belongs to
stringimage_thumbnail_pathread only Image thumbnail path of the profile
stringuidread, write Unique identifier
integerchanged_timeread only Last changed profile time
recordnameread, write _contacts_name child record (single)
recordcompanyread, write _contacts_company child record (multiple)
recordnoteread, write _contacts_note child record (multiple)
recordnumberread, write _contacts_number child record (multiple)
recordemailread, write _contacts_email child record (multiple)
recordeventread, write _contacts_event child record (multiple)
recordmessengerread, write _contacts_messenger child record (multiple)
recordaddressread, write _contacts_address child record (multiple)
recordurlread, write _contacts_url child record (multiple)
recordnicknameread, write _contacts_nickname child record (multiple)
recordprofileread, write _contacts_profile child record (multiple)
recordrelationshipread, write _contacts_relationship child record (multiple)
recordimageread, write _contacts_image child record (multiple)
recordsipread, write _contacts_sip child record (multiple) (Since 3.0)
-final class _contacts_my_profile_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int uid; - - @ffi.UnsignedInt() - external int changed_time; - - @ffi.UnsignedInt() - external int name; - - @ffi.UnsignedInt() - external int image; - - @ffi.UnsignedInt() - external int company; - - @ffi.UnsignedInt() - external int note; - - @ffi.UnsignedInt() - external int number; - - @ffi.UnsignedInt() - external int email; - - @ffi.UnsignedInt() - external int event; - - @ffi.UnsignedInt() - external int messenger; - - @ffi.UnsignedInt() - external int address; - - @ffi.UnsignedInt() - external int url; - - @ffi.UnsignedInt() - external int nickname; - - @ffi.UnsignedInt() - external int profile; - - @ffi.UnsignedInt() - external int relationship; - - @ffi.UnsignedInt() - external int extension1; - - @ffi.UnsignedInt() - external int sip; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name _contacts_name view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts name view
integer id read only DB record ID of the name
integer contact_id read, write once Contacts ID that the name record belongs to
string first read, write First name
string last read, write Last name
string addition read, write Middle name
string suffix read, write Suffix
string prefix read, write Prefix
string phonetic_first read, write Pronounce the first name
string phonetic_middle read, write Pronounce the middle name
string phonetic_last read, write Pronounce the last name
-final class _contacts_name_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int first; - - @ffi.UnsignedInt() - external int last; - - @ffi.UnsignedInt() - external int addition; - - @ffi.UnsignedInt() - external int suffix; - - @ffi.UnsignedInt() - external int prefix; - - @ffi.UnsignedInt() - external int phonetic_first; - - @ffi.UnsignedInt() - external int phonetic_middle; - - @ffi.UnsignedInt() - external int phonetic_last; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number _contacts_number view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts number view
integer id read only DB record ID of the number
integer contact_id read, write once Contact ID that the number belongs to
integer type read, write Number type, refer to the @ref contacts_number_type_e
string label read, write Custom number type label, when the number type is #CONTACTS_NUMBER_TYPE_CUSTOM
boolean is_default read, write The number is default number or not
string number read, write Number
string normalized_number filter only You can only use this property for search filter.
string cleaned_number filter only You can only use this property for search filter.
string number_filter filter only You can only use this property for search filter.
-final class _contacts_number_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; - - @ffi.UnsignedInt() - external int is_default; - - @ffi.UnsignedInt() - external int number; - - @ffi.UnsignedInt() - external int normalized_number; - - @ffi.UnsignedInt() - external int cleaned_number; - - @ffi.UnsignedInt() - external int number_filter; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email _contacts_email view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts email view
integer id read only DB record ID of the email
integer contact_id read, write once Contact ID that the email belongs to
integer type read, write Email type, refer to the @ref contacts_email_type_e
string label read, write Custom mail type label, when the email type is #CONTACTS_EMAIL_TYPE_CUSTOM
boolean is_default read, write The email is default email or not
string email read, write Email address
-final class _contacts_email_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; - - @ffi.UnsignedInt() - external int is_default; - - @ffi.UnsignedInt() - external int email; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address _contacts_address view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts address view
integer id read only DB record ID of the address
integer contact_id read, write once Contact ID that the address belongs to
integer type read, write Address type, refer to the @ref contacts_address_type_e
string label read, write Address type label, when the address type is #CONTACTS_ADDRESS_TYPE_CUSTOM
string postbox read, write Post office box
string postal_code read, write Postal code
string region read, write Region
string locality read, write Locality
string street read, write Street
string country read, write Country
string extended read, write Extended address
boolean is_default read, write The address is default or not
-final class _contacts_address_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; - - @ffi.UnsignedInt() - external int postbox; - - @ffi.UnsignedInt() - external int extended; - - @ffi.UnsignedInt() - external int street; - - @ffi.UnsignedInt() - external int locality; - - @ffi.UnsignedInt() - external int region; - - @ffi.UnsignedInt() - external int postal_code; - - @ffi.UnsignedInt() - external int country; - - @ffi.UnsignedInt() - external int is_default; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note _contacts_note view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts note view
integer id read only DB record ID of the note
integer contact_id read, write once Contact ID that the note belongs to
string note read, write Note contents
-final class _contacts_note_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int note; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url _contacts_url view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts URL view
integer id read only DB record ID of the URL
integer contact_id read, write once Contact ID that the URL belongs to
integer type read, write URL type, refer to the @ref contacts_url_type_e
string label read, write Custom URL type label, when the URL type is #CONTACTS_URL_TYPE_CUSTOM
string url read, write URL
-final class _contacts_url_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; - - @ffi.UnsignedInt() - external int url; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event _contacts_event view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts event view
integer id read only DB record ID of the event
integer contact_id read, write once Contact ID that the event belongs to
integer type read, write Event type, refer to the @ref contacts_event_type_e
string label read, write Custom event type label, when the event type is #CONTACTS_EVENT_TYPE_CUSTOM
integer date read, write Event date(YYYYMMDD). e.g. 2014/1/1 : 20140101. Even if the calendar_type is set as CONTACTS_EVENT_CALENDAR_TYPE_CHINESE, you SHOULD set Gregorian date
integer calendar_type read, write Calendar type, refer to the @ref contacts_event_calendar_type_e
bool is_leap_month (Deprecated) read, write The month is leap or not (valid on lunisolar calendar only)
-final class _contacts_event_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; - - @ffi.UnsignedInt() - external int date; - - @ffi.UnsignedInt() - external int calendar_type; - - @ffi.UnsignedInt() - external int is_leap_month; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group_relation _contacts_group_relation view -/// Refer @ref contacts_group_add_contact, @ref contacts_group_remove_contact -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this relationship view
integer id read only DB record ID of the group (can not be used as filter)
integer group_id read, write once DB record ID of the group
integer contact_id read, write once DB record ID of the contact
string name read only Group name
-final class _contacts_group_relation_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int group_id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int name; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship _contacts_relationship view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this relationship view
integer id read only DB record ID of the relationship
integer contact_id read, write once Contact ID that the relationship belongs to
integer type read, write Relationship type, refer to the @ref contacts_relationship_type_e
string label read, write Custom relationship type label, when the relationship type is CONTACTS_RELATIONSHIP_TYPE_CUSTOM
string name read, write Selected contact name that the relationship belongs to
-final class _contacts_relationship_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; - - @ffi.UnsignedInt() - external int name; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image _contacts_image view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts image view
integer id read only DB record ID of the image
integer contact_id read, write once Contact ID that the image belongs to
integer type read, write Image type, refer to the @ref contacts_image_type_e
string label read, write Custom image type label, when the image type is #CONTACTS_IMAGE_TYPE_CUSTOM
string path read, write Image thumbnail path
-final class _contacts_image_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; - - @ffi.UnsignedInt() - external int path; - - @ffi.UnsignedInt() - external int is_default; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company _contacts_company view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts company view
integer id read only DB record ID of the company
integer contact_id read, write once Contact ID that the company belongs to
integer type read, write Company type, refer to the @ref contacts_company_type_e
string label read, write Custom company type label, when the company type is #CONTACTS_COMPANY_TYPE_CUSTOM
string name read, write Company name
string department read, write Department
string job_title read, write Job title
string assistant_name read, write Assistant name
string role read, write Role
string logo read, write Company logo image file path
string location read, write Company location
string description read, write Description
string phonetic_name read, write Pronounce the company name
-final class _contacts_company_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; - - @ffi.UnsignedInt() - external int name; - - @ffi.UnsignedInt() - external int department; - - @ffi.UnsignedInt() - external int job_title; - - @ffi.UnsignedInt() - external int assistant_name; - - @ffi.UnsignedInt() - external int role; - - @ffi.UnsignedInt() - external int logo; - - @ffi.UnsignedInt() - external int location; - - @ffi.UnsignedInt() - external int description; - - @ffi.UnsignedInt() - external int phonetic_name; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname _contacts_nickname view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts nickname view
integer id read only DB record ID of the nickname
integer contact_id read, write once Contact ID that the nickname belongs to
string name read, write Nickname
-final class _contacts_nickname_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int name; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger _contacts_messenger view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts messenger view
integer id read only DB record ID of the messenger
integer contact_id read, write once Contact ID that the messenger belongs to
integer type read, write Messenger type, refer to the @ref contacts_messenger_type_e
string label read, write Custom messenger type label, when the messenger type is #CONTACTS_MESSENGER_TYPE_CUSTOM
string im_id read, write Messenger ID (email address or email ID...)
-final class _contacts_messenger_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; - - @ffi.UnsignedInt() - external int im_id; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension _contacts_extension view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts extension view
integer id read only DB record ID of the contact extension
integer contact_id read, write once Contact ID that the contact extension belongs to
integer data1 read, write The extra child record format for non-provided from contacts-service
string data2 read, write The extra child record format for non-provided from contacts-service
string data3 read, write The extra child record format for non-provided from contacts-service
string data4 read, write The extra child record format for non-provided from contacts-service
string data5 read, write The extra child record format for non-provided from contacts-service
string data6 read, write The extra child record format for non-provided from contacts-service
string data7 read, write The extra child record format for non-provided from contacts-service
string data8 read, write The extra child record format for non-provided from contacts-service
string data9 read, write The extra child record format for non-provided from contacts-service
string data10 read, write The extra child record format for non-provided from contacts-service
string data11 read, write The extra child record format for non-provided from contacts-service
string data12 read, write The extra child record format for non-provided from contacts-service
-final class _contacts_extension_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int data1; - - @ffi.UnsignedInt() - external int data2; - - @ffi.UnsignedInt() - external int data3; - - @ffi.UnsignedInt() - external int data4; - - @ffi.UnsignedInt() - external int data5; - - @ffi.UnsignedInt() - external int data6; - - @ffi.UnsignedInt() - external int data7; - - @ffi.UnsignedInt() - external int data8; - - @ffi.UnsignedInt() - external int data9; - - @ffi.UnsignedInt() - external int data10; - - @ffi.UnsignedInt() - external int data11; - - @ffi.UnsignedInt() - external int data12; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_sdn _contacts_sdn view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts sdn view
integer id read only DB record ID of the sdn
string name read only Provided name of sdn
string number read only Provided number of sdn
integer sim_slot_no read onlyIt is related to the SIM slot number. sim_slot_no 0 means first SIM card, sim_slot_no 1 means second SIM. It is same with handle index of telephony handle list. Refer to the telephony_init()
-final class _contacts_sdn_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int name; - - @ffi.UnsignedInt() - external int number; - - @ffi.UnsignedInt() - external int sim_slot_no; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile _contacts_profile view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts profile view
integer id read only DB record ID of profile
integer contact_id read, write once Contacts ID that the profile belongs to
string uid read, write Unique identifier
string text read, write Profile contents
integer order read, write Priority to display the profile
string service_operation read, write Data for app_control_set_operation
string mime read, write Data for app_control_set_mime
string app_id read, write Data for app_control_set_app_id
string uri read, write Data for app_control_set_uri
string catagory read, write Data for app_control_set_category
string extra_data read, write It includes "key:value,key:value," pairs. You should parse it. And you must base64 encode each key and value
-final class _contacts_profile_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int uid; - - @ffi.UnsignedInt() - external int text; - - @ffi.UnsignedInt() - external int order; - - @ffi.UnsignedInt() - external int service_operation; - - @ffi.UnsignedInt() - external int mime; - - @ffi.UnsignedInt() - external int app_id; - - @ffi.UnsignedInt() - external int uri; - - @ffi.UnsignedInt() - external int category; - - @ffi.UnsignedInt() - external int extra_data; - - @ffi.UnsignedInt() - external int contact_id; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo _contacts_activity_photo view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contact activity photo view
integer id read only DB record ID of activity photo
integer activity_id read, write once Activity ID that the activity photo belongs to
string photo_url read, write Photo URL
integer sort_index read, write Sorted photo index
-final class _contacts_activity_photo_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int activity_id; - - @ffi.UnsignedInt() - external int photo_url; - - @ffi.UnsignedInt() - external int sort_index; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity _contacts_activity view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this activity view
integer id read only DB record ID of activity
integer contact_id read, write once Contact ID that the activity belongs to
string source_name read, write Account name that the activity belongs to
int timestamp read, write Published time of activity
string status read, write Activity status
string service_operation read, write Data for app_control_set_operation
string uri read, write Data for app_control_set_uri
record photo read, write _contacts_activity_photo child record (multiple)
-final class _contacts_activity_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int source_name; - - @ffi.UnsignedInt() - external int status; - - @ffi.UnsignedInt() - external int timestamp; - - @ffi.UnsignedInt() - external int service_operation; - - @ffi.UnsignedInt() - external int uri; - - @ffi.UnsignedInt() - external int photo; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial _contacts_speeddial view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contact speed dial view
integer speeddial_number read, write once Stored speed dial number
integer number_id read, write Number ID that the speed dial belongs to
string number read only Contact number of specified speed dial
string number_label read only Contact number label of specified speed dial, when the number type is CONTACTS_NUMBER_TYPE_CUSTOM
integer number_type read only Contact number type, refer to the @ref contacts_number_type_e
integer person_id read only Person ID that the speed dial belongs to
string display_name read only Display name that the speed dial belongs to
string image_thumbnail_path read only Image thumbnail path that the speed dial belongs to
string normalized_number filter only You can only use this property for search filter
string cleaned_number filter only You can only use this property for search filter
string number_filter filter only If you add filter with this property, the string will be normalized as minmatch length internally and the match rule will be applied CONTACTS_MATCH_EXACTLY
-final class _contacts_speeddial_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int speeddial_number; - - @ffi.UnsignedInt() - external int number_id; - - @ffi.UnsignedInt() - external int number; - - @ffi.UnsignedInt() - external int number_label; - - @ffi.UnsignedInt() - external int number_type; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int normalized_number; - - @ffi.UnsignedInt() - external int cleaned_number; - - @ffi.UnsignedInt() - external int number_filter; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log _contacts_phone_log view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this phone log view
integer id read only DB record ID of phone log
integer person_id read, write once Person ID that the phone log belongs to
string address read, write once Number or Email that the phone log displays
integer log_time read, write once Call end time. The value means number of seconds since 1970-01-01 00:00:00 (UTC)
integer log_type read, write Log type, refer to the @ref contacts_phone_log_type_e
integer extra_data1 read, write once You can set the related integer data (e.g. message_id, email_id or duration(seconds) of call)
string extra_data2 read, write once You can set the related string data (e.g. short message, subject)
string normalized_address filter only You can only use this property for search filter
string cleaned_address filter only You can only use this property for search filter
string address_filter filter only You can only use this property for search filter
integer sim_slot_no read, write once You can set the related SIM slot number. sim_slot_no 0 means first SIM card, sim_slot_no 1 means second SIM. It is same with handle index of telephony handle list. Refer to the telephony_init()
-final class _contacts_phone_log_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int address; - - @ffi.UnsignedInt() - external int log_time; - - @ffi.UnsignedInt() - external int log_type; - - @ffi.UnsignedInt() - external int extra_data1; - - @ffi.UnsignedInt() - external int extra_data2; - - @ffi.UnsignedInt() - external int normalized_address; - - @ffi.UnsignedInt() - external int cleaned_address; - - @ffi.UnsignedInt() - external int address_filter; - - @ffi.UnsignedInt() - external int sim_slot_no; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact_updated_info _contacts_contact_updated_info view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this contact updated info view
integer contact_id Updated contact ID
integer address_book_id Addressbook ID that the updated contact belongs to
integer type Contact updated type, refer to the @ref contacts_changed_e
integer version Updated version
boolean image_changed Contact image is changed or not
-final class _contacts_contact_updated_info_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int version; - - @ffi.UnsignedInt() - external int image_changed; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile_updated_info _contacts_my_profile_updated_info view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this my profile updated info view
integer address_book_id Address book ID that the updated my profile belongs to
integer last_changed_type Changed update type, refer to the @ref contacts_changed_e
integer version Updated version
-final class _contacts_my_profile_updated_info_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int last_changed_type; - - @ffi.UnsignedInt() - external int version; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group_updated_info _contacts_group_updated_info view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this group updated info view
integer group_id Updated group ID
integer address_book_id Address book ID that the updated group belongs to
integer type Changed update type, refer to the @ref contacts_changed_e
integer version Updated version
-final class _contacts_group_updated_info_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int group_id; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int version; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group_member_updated_info _contacts_group_member_updated_info view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this group member updated info view
integer group_id Updated group ID
integer address_book_id Address book ID that the updated group belongs to
integer version Updated version
-final class _contacts_group_member_updated_info_property_ids - extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int group_id; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int version; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_grouprel_updated_info _contacts_grouprel_updated_info view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this group relation updated info view
integer group_id Group ID of group relation
integer contact_id Contact ID of the updated group relation
integer address_book_id Address book ID of contact that the updated group relation
integer type Changed update type, refer to the @ref contacts_changed_e
integer version Updated version
-final class _contacts_grouprel_updated_info_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int group_id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int version; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact _contacts_person_contact view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this person contact view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
string status Status of social account (projection)
boolean is_favorite The person is favorite or not
integer link_count Link count of contact records (projection)
integer contact_id Contact ID that the person belongs to
string addressbook_ids Addressbook IDs that the person belongs to (projection)
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer address_book_id Addressbook ID that the person belongs to
integer address_book_mode Addressbook mode, refer to the @ref contacts_address_book_mode_e
string address_book_name Addressbook name that the person belongs to
integer snippet_type keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string keyword matched data string (Since 3.0)
-final class _contacts_person_contact_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_name_index; - - @ffi.UnsignedInt() - external int display_contact_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int vibration; - - @ffi.UnsignedInt() - external int status; - - @ffi.UnsignedInt() - external int is_favorite; - - @ffi.UnsignedInt() - external int link_count; - - @ffi.UnsignedInt() - external int addressbook_ids; - - @ffi.UnsignedInt() - external int has_phonenumber; - - @ffi.UnsignedInt() - external int has_email; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int address_book_name; - - @ffi.UnsignedInt() - external int address_book_mode; - - @ffi.UnsignedInt() - external int message_alert; - - @ffi.UnsignedInt() - external int snippet_type; - - @ffi.UnsignedInt() - external int snippet_string; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_number _contacts_person_number view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this person number view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
boolean is_favorite The person is favorite or not
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer number_id Number ID that the person belongs to
integer type Number type, refer to the @ref contacts_number_type_e (projection)
string label Custom number type label, when the number type is #CONTACTS_NUMBER_TYPE_CUSTOM (projection)
boolean is_primary_default The number is default number or not
string number Number
string number_filter If you add filter with this property, the string will be normalized as minmatch length internally and the match rule will be applied CONTACTS_MATCH_EXACTLY
string normalized_number You can only use this property for search filter
string cleaned_number You can only use this property for search filter
integer snippet_type keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string keyword matched data string (Since 3.0)
-final class _contacts_person_number_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_name_index; - - @ffi.UnsignedInt() - external int display_contact_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int vibration; - - @ffi.UnsignedInt() - external int is_favorite; - - @ffi.UnsignedInt() - external int has_phonenumber; - - @ffi.UnsignedInt() - external int has_email; - - @ffi.UnsignedInt() - external int number_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; - - @ffi.UnsignedInt() - external int is_primary_default; - - @ffi.UnsignedInt() - external int number; - - @ffi.UnsignedInt() - external int number_filter; - - @ffi.UnsignedInt() - external int normalized_number; - - @ffi.UnsignedInt() - external int message_alert; - - @ffi.UnsignedInt() - external int cleaned_number; - - @ffi.UnsignedInt() - external int snippet_type; - - @ffi.UnsignedInt() - external int snippet_string; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_email _contacts_person_email view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this person email view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
boolean is_favorite The person is favorite or not
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer email_id Email ID that the person belongs to
integer type Email type, refer to the @ref contacts_email_type_e (projection)
string label Custom mail type label, when the email type is #CONTACTS_EMAIL_TYPE_CUSTOM (projection)
boolean is_primary_default The email is default email or not
string email Email address
integer snippet_type keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string keyword matched data string (Since 3.0)
-final class _contacts_person_email_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_name_index; - - @ffi.UnsignedInt() - external int display_contact_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int vibration; - - @ffi.UnsignedInt() - external int is_favorite; - - @ffi.UnsignedInt() - external int has_phonenumber; - - @ffi.UnsignedInt() - external int has_email; - - @ffi.UnsignedInt() - external int email_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; - - @ffi.UnsignedInt() - external int is_primary_default; - - @ffi.UnsignedInt() - external int email; - - @ffi.UnsignedInt() - external int message_alert; - - @ffi.UnsignedInt() - external int snippet_type; - - @ffi.UnsignedInt() - external int snippet_string; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel _contacts_person_grouprel view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this person group relation view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
string status Status of social account (projection)
boolean is_favorite The person is favorite or not
integer link_count Link count of contat records (projection)
string addressbook_ids Addressbook IDs that the person belongs to (projection)
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer address_book_id Addressbook ID that the person belongs to
integer address_book_mode Addressbook mode, refer to the @ref contacts_address_book_mode_e
string address_book_name Addressbook name that the person belongs to
integer group_id Group ID that the person belongs to
integer contact_id Contact ID that the person belongs to (projection)
integer snippet_type keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string keyword matched data string (Since 3.0)
-final class _contacts_person_grouprel_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_name_index; - - @ffi.UnsignedInt() - external int display_contact_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int vibration; - - @ffi.UnsignedInt() - external int status; - - @ffi.UnsignedInt() - external int is_favorite; - - @ffi.UnsignedInt() - external int link_count; - - @ffi.UnsignedInt() - external int addressbook_ids; - - @ffi.UnsignedInt() - external int has_phonenumber; - - @ffi.UnsignedInt() - external int has_email; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int group_id; - - @ffi.UnsignedInt() - external int address_book_name; - - @ffi.UnsignedInt() - external int address_book_mode; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int message_alert; - - @ffi.UnsignedInt() - external int snippet_type; - - @ffi.UnsignedInt() - external int snippet_string; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned _contacts_person_group_assigned view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this person group assigned view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
string status Status of social account (projection)
boolean is_favorite The person is favorite or not
integer link_count Link count of contact records (projection)
string linked_address_book_ids Addressbook IDs that the linked person belongs to (projection)
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer address_book_id Addressbook ID that the person belongs to
integer address_book_mode Addressbook mode, refer to the @ref contacts_address_book_mode_e
integer group_id Group ID that the person belongs to
integer contact_id Contact ID that the person belongs to (projection)
integer snippet_type keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string keyword matched data string (Since 3.0)
-final class _contacts_person_group_assigned_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_name_index; - - @ffi.UnsignedInt() - external int display_contact_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int vibration; - - @ffi.UnsignedInt() - external int status; - - @ffi.UnsignedInt() - external int is_favorite; - - @ffi.UnsignedInt() - external int link_count; - - @ffi.UnsignedInt() - external int linked_address_book_ids; - - @ffi.UnsignedInt() - external int has_phonenumber; - - @ffi.UnsignedInt() - external int has_email; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int group_id; - - @ffi.UnsignedInt() - external int address_book_mode; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int message_alert; - - @ffi.UnsignedInt() - external int snippet_type; - - @ffi.UnsignedInt() - external int snippet_string; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned _contacts_person_group_not_assigned view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this person group not assigned view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
string status Status of social account (projection)
boolean is_favorite The person is favorite or not
integer link_count Link count of contact records (projection)
string linked_address_book_ids Addressbook IDs that the linked person belongs to (projection)
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer address_book_id Addressbook ID that the person belongs to
integer address_book_mode Addressbook mode, refer to the @ref contacts_address_book_mode_e
integer contact_id Contact ID that the person belongs to (projection)
integer snippet_type keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string keyword matched data string (Since 3.0)
-final class _contacts_person_group_not_assigned_property_ids - extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_name_index; - - @ffi.UnsignedInt() - external int display_contact_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int vibration; - - @ffi.UnsignedInt() - external int status; - - @ffi.UnsignedInt() - external int is_favorite; - - @ffi.UnsignedInt() - external int link_count; - - @ffi.UnsignedInt() - external int linked_address_book_ids; - - @ffi.UnsignedInt() - external int has_phonenumber; - - @ffi.UnsignedInt() - external int has_email; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int address_book_mode; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int message_alert; - - @ffi.UnsignedInt() - external int snippet_type; - - @ffi.UnsignedInt() - external int snippet_string; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_phone_log _contacts_person_phone_log view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this phone log view
integer person_id DB record ID of person
string display_name Display name of the person
string image_thumbnail_path Image thumbnail path of the person (projection)
integer log_id DB record ID of phone log
string address Number or Email that the phone log displays
integer address_type Number or Email type (projection)
integer log_time Call end time. The value means number of seconds since 1970-01-01 00:00:00 (UTC)
integer log_type Log type, refer to the @ref contacts_phone_log_type_e
integer extra_data1 You can set the related integer data (e.g. message_id, email_id or duration(seconds) of call) (projection)
string extra_data2 You can set the related string data (e.g. short message, subject) (projection)
string normalized_address You can only use this property for search filter
string cleaned_address You can only use this property for search filter
string address_filter You can only use this property for search filter
integer sim_slot_no It is related to the SIM slot number. sim_slot_no 0 means first SIM card, sim_slot_no 1 means second SIM. It is same with handle index of telephony handle list. Refer to the telephony_init()
-final class _contacts_person_phone_log_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int log_id; - - @ffi.UnsignedInt() - external int address; - - @ffi.UnsignedInt() - external int address_type; - - @ffi.UnsignedInt() - external int log_time; - - @ffi.UnsignedInt() - external int log_type; - - @ffi.UnsignedInt() - external int extra_data1; - - @ffi.UnsignedInt() - external int extra_data2; - - @ffi.UnsignedInt() - external int normalized_address; - - @ffi.UnsignedInt() - external int cleaned_address; - - @ffi.UnsignedInt() - external int address_filter; - - @ffi.UnsignedInt() - external int sim_slot_no; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_usage _contacts_person_usage view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this person usage view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
boolean is_favorite The person is favorite or not
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer usage_type Usage type, refer to the @ref contacts_usage_type_e
integer times_used Usage number of person
-final class _contacts_person_usage_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_name_index; - - @ffi.UnsignedInt() - external int display_contact_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int vibration; - - @ffi.UnsignedInt() - external int is_favorite; - - @ffi.UnsignedInt() - external int has_phonenumber; - - @ffi.UnsignedInt() - external int has_email; - - @ffi.UnsignedInt() - external int usage_type; - - @ffi.UnsignedInt() - external int times_used; - - @ffi.UnsignedInt() - external int message_alert; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact_number _contacts_contact_number view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this contacts number view
integercontact_id Contact ID that the number belongs to
stringdisplay_name Display name of contact that the number belongs to
integerdisplay_source_type The source type of display name, refer to the @ref contacts_display_name_source_type_e (projection)
integeraddress_book_id Addressbook ID that the number belongs to
integerperson_id Person ID that the number belongs to
stringringtone_path Ringtone path that the number belongs to (projection)
stringimage_thumbnail_path Image thumbnail path that the number belongs to (projection)
integer number_id DB record ID of the number
integer type Number type, refer to the @ref contacts_number_type_e (projection)
string label Custom number type label, when the number type is #CONTACTS_NUMBER_TYPE_CUSTOM (projection)
boolean is_default The number is default number or not
string number Number
string number_filter If you add filter with this property, the string will be normalized as minmatch length internally and the match rule will be applied CONTACTS_MATCH_EXACTLY
string normalized_number You can only use this property for search filter
string cleaned_number You can only use this property for search filter
-final class _contacts_contact_number_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_source_type; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int number_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; - - @ffi.UnsignedInt() - external int is_default; - - @ffi.UnsignedInt() - external int number; - - @ffi.UnsignedInt() - external int number_filter; - - @ffi.UnsignedInt() - external int normalized_number; - - @ffi.UnsignedInt() - external int cleaned_number; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact_email _contacts_contact_email view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this contacts email view
integercontact_id Contact ID that the email belongs to
stringdisplay_name Display name that the email belongs to
integerdisplay_source_type The source type of display name that the email belongs to (projection)
integeraddress_book_id Addressbook ID that the email belongs to
integerperson_id Person ID that the email belongs to
stringringtone_path Ringtone path that the email belongs to (projection)
stringimage_thumbnail_path Image thumbnail path that the email belongs to (projection)
integer email_id DB record ID of the email
integer type Email type, refer to the @ref contacts_email_type_e (projection)
string label Custom mail type label, when the email type is #CONTACTS_EMAIL_TYPE_CUSTOM (projection)
boolean is_default Email is default email or not
string email Email address
-final class _contacts_contact_email_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_source_type; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int email_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; - - @ffi.UnsignedInt() - external int is_default; - - @ffi.UnsignedInt() - external int email; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact_grouprel _contacts_contact_grouprel view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this contact grouprel view
integercontact_id Contact ID that the contact group relation belongs to
stringdisplay_name Display name of the group relation
integerdisplay_source_type The source type of display name (projection)
integeraddress_book_id Addressbook ID that the group relation belongs to
integerperson_id Person ID that the group relation belongs to
stringringtone_path Ringtone path of the group relation (projection)
stringimage_thumbnail_path Image thumbnail path of the group relation (projection)
integer group_id DB record ID of the group relation
string group_name Group name (projection)
-final class _contacts_contact_grouprel_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_source_type; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int group_id; - - @ffi.UnsignedInt() - external int group_name; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact_activity _contacts_contact_activity view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this contact activity view
integercontact_id Contact ID that the activity belongs to
stringdisplay_name Display name of the contact that the activity belongs to
integerdisplay_source_type The source type of display name that the activity belongs to
integeraddress_book_id Addressbook that the activity belongs to
integerperson_id Person ID that the activity belongs to
stringringtone_path Ringtone path of the contact that the activity belongs to (projection)
stringimage_thumbnail_path Image thumbnail path of the contact that the activity belongs to (projection)
integer activity_id DB record ID of the activity
string source_name Account name that the activity belongs to
string status Activity status (projection)
integer timestamp Published time of activity
string service_operation Data for service_set_operation
string uri Data for service_set_uri
-final class _contacts_contact_activity_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_source_type; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int account_id; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int activity_id; - - @ffi.UnsignedInt() - external int source_name; - - @ffi.UnsignedInt() - external int status; - - @ffi.UnsignedInt() - external int timestamp; - - @ffi.UnsignedInt() - external int service_operation; - - @ffi.UnsignedInt() - external int uri; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log_stat _contacts_phone_log_stat view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this log stat view
integer log_count Log count (projection)
integer log_type Log type, see the @ref contacts_phone_log_type_e
integer sim_slot_no It is related to the SIM slot number. sim_slot_no 0 means first SIM card, sim_slot_no 1 means second SIM. It is same with handle index of telephony handle list. Refer to the telephony_init() (Since 3.0)
-final class _contacts_phone_log_stat_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int log_count; - - @ffi.UnsignedInt() - external int log_type; - - @ffi.UnsignedInt() - external int sim_slot_no; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_sip _contacts_sip view (Since 3.0) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts sip view
integer id read only DB record ID of the sip
integer contact_id read, write once Contact ID that the sip belongs to
string address read, write SIP address
integer type read, write sip type, refer to the @ref contacts_sip_type_e
string label read, write Custom sip type label, when the sip type is #CONTACTS_SIP_TYPE_CUSTOM
-final class _contacts_sip_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int address; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; -} - -typedef contacts_record_h = ffi.Pointer<__contacts_record_h>; -typedef contacts_list_h = ffi.Pointer<__contacts_list_h>; - -/// @brief Enumeration for Contacts match string flags. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_match_str_flag_e { - /// < Full string, case-sensitive - static const int CONTACTS_MATCH_EXACTLY = 0; - - /// < Full string, case-insensitive - static const int CONTACTS_MATCH_FULLSTRING = 1; - - /// < Sub string, case-insensitive - static const int CONTACTS_MATCH_CONTAINS = 2; - - /// < Start with, case-insensitive - static const int CONTACTS_MATCH_STARTSWITH = 3; - - /// < End with, case-insensitive - static const int CONTACTS_MATCH_ENDSWITH = 4; - - /// < IS NOT NULL - static const int CONTACTS_MATCH_EXISTS = 5; -} - -/// @brief Enumeration for Contacts match int flags. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_match_int_flag_e { - /// < '=' - static const int CONTACTS_MATCH_EQUAL = 0; - - /// < '>' - static const int CONTACTS_MATCH_GREATER_THAN = 1; - - /// < '>=' - static const int CONTACTS_MATCH_GREATER_THAN_OR_EQUAL = 2; - - /// < '<' - static const int CONTACTS_MATCH_LESS_THAN = 3; - - /// < '<=' - static const int CONTACTS_MATCH_LESS_THAN_OR_EQUAL = 4; - - /// < '<>', this flag can yield poor performance - static const int CONTACTS_MATCH_NOT_EQUAL = 5; - - /// < IS NULL - static const int CONTACTS_MATCH_NONE = 6; -} - -/// @brief Enumeration for Contacts filter operators. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_filter_operator_e { - /// < AND - static const int CONTACTS_FILTER_OPERATOR_AND = 0; - - /// < OR - static const int CONTACTS_FILTER_OPERATOR_OR = 1; -} - -typedef contacts_filter_h = ffi.Pointer<__contacts_filter_h>; -typedef contacts_query_h = ffi.Pointer<__contacts_query_h>; - -/// @brief Enumeration for contact change state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_changed_e { - /// < Inserted - static const int CONTACTS_CHANGE_INSERTED = 0; - - /// < Updated - static const int CONTACTS_CHANGE_UPDATED = 1; - - /// < Deleted - static const int CONTACTS_CHANGE_DELETED = 2; -} - -/// @brief Called when the designated view changes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -/// @param[in] view_uri The view URI -/// @param[in] user_data The user data passed from the callback registration function -/// @pre The callback must be registered using contacts_db_add_changed_cb. -/// @see contacts_db_add_changed_cb() -typedef contacts_db_changed_cb - = ffi.Pointer>; -typedef contacts_db_changed_cbFunction = ffi.Void Function( - ffi.Pointer view_uri, ffi.Pointer user_data); -typedef Dartcontacts_db_changed_cbFunction = void Function( - ffi.Pointer view_uri, ffi.Pointer user_data); - -/// @brief Enumeration for name display order. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_name_display_order_e { - /// < First name comes at the first - static const int CONTACTS_NAME_DISPLAY_ORDER_FIRSTLAST = 0; - - /// < First name comes at the last - static const int CONTACTS_NAME_DISPLAY_ORDER_LASTFIRST = 1; -} - -/// @brief Enumeration for name sorting order. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_name_sorting_order_e { - /// < Contacts are first sorted based on the first name - static const int CONTACTS_NAME_SORTING_ORDER_FIRSTLAST = 0; - - /// < Contacts are first sorted based on the last name - static const int CONTACTS_NAME_SORTING_ORDER_LASTFIRST = 1; -} - -/// @brief Called when a designated view changes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -/// @param[in] name_display_order The name display order setting value -/// @param[in] user_data The user data passed from the callback registration function -/// @pre The callback must be registered using contacts_setting_add_name_display_order_changed_cb(). -/// contacts_setting_set_name_display_order() must be called to invoke this callback. -/// @see contacts_setting_add_name_display_order_changed_cb() -/// @see contacts_setting_remove_name_display_order_changed_cb() -typedef contacts_setting_name_display_order_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef contacts_setting_name_display_order_changed_cbFunction = ffi.Void - Function(ffi.Int32 name_display_order, ffi.Pointer user_data); -typedef Dartcontacts_setting_name_display_order_changed_cbFunction = void - Function(int name_display_order, ffi.Pointer user_data); - -/// @brief Called when a designated view changes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -/// @param[in] name_sorting_order The name sorting order setting value -/// @param[in] user_data The user data passed from the callback registration function -/// @pre The callback must be registered using contacts_setting_add_name_sorting_order_changed_cb(). -/// contacts_setting_set_name_sorting_order() must be called to invoke this callback. -/// @see contacts_setting_add_name_sorting_order_changed_cb() -/// @see contacts_setting_remove_name_sorting_order_changed_cb() -typedef contacts_setting_name_sorting_order_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef contacts_setting_name_sorting_order_changed_cbFunction = ffi.Void - Function(ffi.Int32 name_sorting_order, ffi.Pointer user_data); -typedef Dartcontacts_setting_name_sorting_order_changed_cbFunction = void - Function(int name_sorting_order, ffi.Pointer user_data); - -/// @brief Enumeration for Contacts person properties. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_person_property_e { - /// < Default contacts record - static const int CONTACTS_PERSON_PROPERTY_NAME_CONTACT = 0; - - /// < Default number record - static const int CONTACTS_PERSON_PROPERTY_NUMBER = 1; - - /// < Default email record - static const int CONTACTS_PERSON_PROPERTY_EMAIL = 2; - - /// < Default image record - static const int CONTACTS_PERSON_PROPERTY_IMAGE = 3; -} - -/// @brief Called whenever a contact is imported. -/// @since_tizen 3.0 -/// @param[in] total The number of contacts that will be imported -/// @param[in] imported_cnt The number of already imported contacts -/// @param[in] user_data The user data passed from the callback registration function -/// @return @c true to continue with the import of contacts -/// otherwise @c false to stop the import of contacts -/// @pre contacts_sim_import_all_contacts_by_sim_slot_no() will invoke this callback. -/// @see contacts_sim_import_all_contacts_by_sim_slot_no() -typedef contacts_sim_import_progress_cb - = ffi.Pointer>; -typedef contacts_sim_import_progress_cbFunction = ffi.Bool Function( - ffi.Int total, ffi.Int imported_cnt, ffi.Pointer user_data); -typedef Dartcontacts_sim_import_progress_cbFunction = bool Function( - int total, int imported_cnt, ffi.Pointer user_data); - -/// @brief Called to get a record handle of @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -/// @param[in] record The record handle -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @pre contacts_vcard_parse_to_contact_foreach() will invoke this callback. -/// @see contacts_vcard_parse_to_contact_foreach() -typedef contacts_vcard_parse_cb - = ffi.Pointer>; -typedef contacts_vcard_parse_cbFunction = ffi.Bool Function( - contacts_record_h record, ffi.Pointer user_data); -typedef Dartcontacts_vcard_parse_cbFunction = bool Function( - contacts_record_h record, ffi.Pointer user_data); - -/// @brief Enumeration for contact DB status. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_db_status_e { - /// < Normal - static const int CONTACTS_DB_STATUS_NORMAL = 0; - - /// < DB status is Changing collation - static const int CONTACTS_DB_STATUS_CHANGING_COLLATION = 1; -} - -/// @brief Called when contacts-service server status changes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -/// @param[in] status The current status of server -/// @param[in] user_data The user data passed from the callback registration function -/// @pre This function requires an open connection to contacts service by contacts_connect(). -/// @see contacts_db_add_status_changed_cb() -typedef contacts_db_status_changed_cb - = ffi.Pointer>; -typedef contacts_db_status_changed_cbFunction = ffi.Void Function( - ffi.Int32 status, ffi.Pointer user_data); -typedef Dartcontacts_db_status_changed_cbFunction = void Function( - int status, ffi.Pointer user_data); - -/// @brief Enumeration for language type. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class phone_number_lang_e { - /// < Amharic - static const int PHONE_NUMBER_LANG_AMHARIC = 0; - - /// < Arabic - static const int PHONE_NUMBER_LANG_ARABIC = 1; - - /// < Belarusian - static const int PHONE_NUMBER_LANG_BELARUSIAN = 2; - - /// < Bulgarian - static const int PHONE_NUMBER_LANG_BULGARIAN = 3; - - /// < Chinese - static const int PHONE_NUMBER_LANG_CHINESE = 4; - - /// < Chinese(Traditional) - static const int PHONE_NUMBER_LANG_CHINESE_TRADITIONAL = 5; - - /// < Czech - static const int PHONE_NUMBER_LANG_CZECH = 6; - - /// < Dutch - static const int PHONE_NUMBER_LANG_DUTCH = 7; - - /// < English - static const int PHONE_NUMBER_LANG_ENGLISH = 8; - - /// < Finnish - static const int PHONE_NUMBER_LANG_FINNISH = 9; - - /// < French - static const int PHONE_NUMBER_LANG_FRENCH = 10; - - /// < German - static const int PHONE_NUMBER_LANG_GERMAN = 11; - - /// < Greek - static const int PHONE_NUMBER_LANG_GREEK = 12; - - /// < Hungarian - static const int PHONE_NUMBER_LANG_HUNGARIAN = 13; - - /// < Indonesian - static const int PHONE_NUMBER_LANG_INDONESIAN = 14; - - /// < Italian - static const int PHONE_NUMBER_LANG_ITALIAN = 15; - - /// < Japanese - static const int PHONE_NUMBER_LANG_JAPANESE = 16; - - /// < Korean - static const int PHONE_NUMBER_LANG_KOREAN = 17; - - /// < Northern Sami - static const int PHONE_NUMBER_LANG_NORTHERN_SAMI = 18; - - /// < Persian - static const int PHONE_NUMBER_LANG_PERSIAN = 19; - - /// < Polish - static const int PHONE_NUMBER_LANG_POLISH = 20; - - /// < Portuguese - static const int PHONE_NUMBER_LANG_PORTUGUESE = 21; - - /// < Romanian - static const int PHONE_NUMBER_LANG_ROMANIAN = 22; - - /// < Russian - static const int PHONE_NUMBER_LANG_RUSSIAN = 23; - - /// < Serbian - static const int PHONE_NUMBER_LANG_SERBIAN = 24; - - /// < Spanish - static const int PHONE_NUMBER_LANG_SPANISH = 25; - - /// < Swedish - static const int PHONE_NUMBER_LANG_SWEDISH = 26; - - /// < Thai - static const int PHONE_NUMBER_LANG_THAI = 27; - - /// < Turkish - static const int PHONE_NUMBER_LANG_TURKISH = 28; - - /// < Vietnamese - static const int PHONE_NUMBER_LANG_VIETNAMESE = 29; - - /// < Current System Value (Since 3.0) - static const int PHONE_NUMBER_LANG_SYSTEM = 30; - static const int PHONE_NUMBER_LANG_MAX = 31; -} - -/// @brief Enumeration for region type. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class phone_number_region_e { - /// < Aland Islands - static const int PHONE_NUMBER_REGION_ALAND_ISLANDS = 0; - - /// < Albania - static const int PHONE_NUMBER_REGION_ALBANIA = 1; - - /// < Algeria - static const int PHONE_NUMBER_REGION_ALGERIA = 2; - - /// < American Samoa - static const int PHONE_NUMBER_REGION_AMERICAN_SAMOA = 3; - - /// < Angola - static const int PHONE_NUMBER_REGION_ANGOLA = 4; - - /// < Anguilla - static const int PHONE_NUMBER_REGION_ANGUILLA = 5; - - /// < Argentina - static const int PHONE_NUMBER_REGION_ARGENTINA = 6; - - /// < Armenia - static const int PHONE_NUMBER_REGION_ARMENIA = 7; - - /// < Ascension Island - static const int PHONE_NUMBER_REGION_ASCENSION_ISLAND = 8; - - /// < Atigua and Barbuda - static const int PHONE_NUMBER_REGION_ATIGUA_AND_BARBUDA = 9; - - /// < Austria - static const int PHONE_NUMBER_REGION_AUSTRIA = 10; - - /// < Bahamas - static const int PHONE_NUMBER_REGION_BAHAMAS = 11; - - /// < Barbados - static const int PHONE_NUMBER_REGION_BARBADOS = 12; - - /// < Belarus - static const int PHONE_NUMBER_REGION_BELARUS = 13; - - /// < Belgium - static const int PHONE_NUMBER_REGION_BELGIUM = 14; - - /// < Benin - static const int PHONE_NUMBER_REGION_BENIN = 15; - - /// < Bermuda - static const int PHONE_NUMBER_REGION_BERMUDA = 16; - - /// < Bonaire Sint Eustatius and Saba - static const int PHONE_NUMBER_REGION_BONAIRE_SINT_EUSTATIUS_AND_SABA = 17; - - /// < Botswana - static const int PHONE_NUMBER_REGION_BOTSWANA = 18; - - /// < Brazil - static const int PHONE_NUMBER_REGION_BRAZIL = 19; - - /// < Bulgaria - static const int PHONE_NUMBER_REGION_BULGARIA = 20; - - /// < Burkina Faso - static const int PHONE_NUMBER_REGION_BURKINA_FASO = 21; - - /// < Burundi - static const int PHONE_NUMBER_REGION_BURUNDI = 22; - - /// < Cabo Verde - static const int PHONE_NUMBER_REGION_CABO_VERDE = 23; - - /// < Cameroon - static const int PHONE_NUMBER_REGION_CAMEROON = 24; - - /// < Canada - static const int PHONE_NUMBER_REGION_CANADA = 25; - - /// < Cayman Island - static const int PHONE_NUMBER_REGION_CAYMAN_ISLAND = 26; - - /// < Chile - static const int PHONE_NUMBER_REGION_CHILE = 27; - - /// < China - static const int PHONE_NUMBER_REGION_CHINA = 28; - - /// < Colombia - static const int PHONE_NUMBER_REGION_COLOMBIA = 29; - - /// < Comoros - static const int PHONE_NUMBER_REGION_COMOROS = 30; - - /// < Congo - static const int PHONE_NUMBER_REGION_CONGO = 31; - - /// < Cote d'Ivoire - static const int PHONE_NUMBER_REGION_COTE_D_IVOIRE = 32; - - /// < Cuba - static const int PHONE_NUMBER_REGION_CUBA = 33; - - /// < Curacao - static const int PHONE_NUMBER_REGION_CURACAO = 34; - - /// < Czech Republic - static const int PHONE_NUMBER_REGION_CZECH_REPUBLIC = 35; - - /// < Congo (Democratic Republic of the) - static const int PHONE_NUMBER_REGION_DEMOCRATIC_REPUBLIC_OF_THE_CONGO = 36; - - /// < Dominica - static const int PHONE_NUMBER_REGION_DOMINICA = 37; - - /// < Domoinican Republic - static const int PHONE_NUMBER_REGION_DOMINICAN_REPUBLIC = 38; - - /// < Egypt - static const int PHONE_NUMBER_REGION_EGYPT = 39; - - /// < Estonia - static const int PHONE_NUMBER_REGION_ESTONIA = 40; - - /// < Ethiopia - static const int PHONE_NUMBER_REGION_ETHIOPIA = 41; - - /// < Finland - static const int PHONE_NUMBER_REGION_FINLAND = 42; - - /// < France - static const int PHONE_NUMBER_REGION_FRANCE = 43; - - /// < Gabon - static const int PHONE_NUMBER_REGION_GABON = 44; - - /// < Gambia - static const int PHONE_NUMBER_REGION_GAMBIA = 45; - - /// < Germany - static const int PHONE_NUMBER_REGION_GERMANY = 46; - - /// < Ghana - static const int PHONE_NUMBER_REGION_GHANA = 47; - - /// < Greece - static const int PHONE_NUMBER_REGION_GREECE = 48; - - /// < Greenland - static const int PHONE_NUMBER_REGION_GREENLAND = 49; - - /// < Grenada - static const int PHONE_NUMBER_REGION_GRENADA = 50; - - /// < Guam - static const int PHONE_NUMBER_REGION_GUAM = 51; - - /// < Guernsey - static const int PHONE_NUMBER_REGION_GUERNSEY = 52; - - /// < Guinea - static const int PHONE_NUMBER_REGION_GUINEA = 53; - - /// < Guinea-Bissau - static const int PHONE_NUMBER_REGION_GUINEA_BISSAU = 54; - - /// < Hungary - static const int PHONE_NUMBER_REGION_HUNGARY = 55; - - /// < Iceland - static const int PHONE_NUMBER_REGION_ICELAND = 56; - - /// < India - static const int PHONE_NUMBER_REGION_INDIA = 57; - - /// < Indonesia - static const int PHONE_NUMBER_REGION_INDONESIA = 58; - - /// < Ireland - static const int PHONE_NUMBER_REGION_IRELAND = 59; - - /// < Iran (Islamic Republic of) - static const int PHONE_NUMBER_REGION_ISLAMIC_REPUBLIC_OF_IRAN = 60; - - /// < Isle of Man - static const int PHONE_NUMBER_REGION_ISLE_OF_MAN = 61; - - /// < Italy - static const int PHONE_NUMBER_REGION_ITALY = 62; - - /// < Jamaica - static const int PHONE_NUMBER_REGION_JAMAICA = 63; - - /// < Japan - static const int PHONE_NUMBER_REGION_JAPAN = 64; - - /// < Jersey - static const int PHONE_NUMBER_REGION_JERSEY = 65; - - /// < Jordan - static const int PHONE_NUMBER_REGION_JORDAN = 66; - - /// < Kazakhstan - static const int PHONE_NUMBER_REGION_KAZAKHSTAN = 67; - - /// < Kenya - static const int PHONE_NUMBER_REGION_KENYA = 68; - - /// < Kiribati - static const int PHONE_NUMBER_REGION_KIRIBATI = 69; - - /// < Latvia - static const int PHONE_NUMBER_REGION_LATVIA = 70; - - /// < Lesotho - static const int PHONE_NUMBER_REGION_LESOTHO = 71; - - /// < Lithuania - static const int PHONE_NUMBER_REGION_LITHUANIA = 72; - - /// < Luxembourg - static const int PHONE_NUMBER_REGION_LUXEMBOURG = 73; - - /// < Madagascar - static const int PHONE_NUMBER_REGION_MADAGASCAR = 74; - - /// < Mauritania - static const int PHONE_NUMBER_REGION_MAURITANIA = 75; - - /// < Maritius - static const int PHONE_NUMBER_REGION_MAURITIUS = 76; - - /// < Montserrat - static const int PHONE_NUMBER_REGION_MONTSERRAT = 77; - - /// < Morocco - static const int PHONE_NUMBER_REGION_MOROCCO = 78; - - /// < Mazambique - static const int PHONE_NUMBER_REGION_MOZAMBIQUE = 79; - - /// < Namibia - static const int PHONE_NUMBER_REGION_NAMIBIA = 80; - - /// < Netherlands - static const int PHONE_NUMBER_REGION_NETHERLANDS = 81; - - /// < Nigeria - static const int PHONE_NUMBER_REGION_NIGERIA = 82; - - /// < Northern Mariana Island - static const int PHONE_NUMBER_REGION_NORTHERN_MARIANA_ISLANDS = 83; - - /// < Norway - static const int PHONE_NUMBER_REGION_NORWAY = 84; - - /// < Peru - static const int PHONE_NUMBER_REGION_PERU = 85; - - /// < Poland - static const int PHONE_NUMBER_REGION_POLAND = 86; - - /// < Portugal - static const int PHONE_NUMBER_REGION_PORTUGAL = 87; - - /// < Puerto Rico - static const int PHONE_NUMBER_REGION_PUERTO_RICO = 88; - - /// < Korea (Republic of) - static const int PHONE_NUMBER_REGION_REPUBLIC_OF_KOREA = 89; - - /// < Moldova (Republic of) - static const int PHONE_NUMBER_REGION_REPUBLIC_OF_MOLDOVA = 90; - - /// < Romania - static const int PHONE_NUMBER_REGION_ROMANIA = 91; - - /// < Russian Federation - static const int PHONE_NUMBER_REGION_RUSSIAN_FEDERATION = 92; - - /// < Saint Helena, Ascension and Tristan da Cunha - static const int PHONE_NUMBER_REGION_SAINT_HELENA = 93; - - /// < Saint Kitts and Nevis - static const int PHONE_NUMBER_REGION_SAINT_KITTS_AND_NEVIS = 94; - - /// < Saint Lucia - static const int PHONE_NUMBER_REGION_SAINT_LUCIA = 95; - - /// < Saint Vincent and the Grenadines - static const int PHONE_NUMBER_REGION_SAINT_VINCENT_AND_THE_GRENADINES = 96; - - /// < Sao Tome and Principe - static const int PHONE_NUMBER_REGION_SAO_TOME_AND_PRINCIPE = 97; - - /// < Saudi Arabia - static const int PHONE_NUMBER_REGION_SAUDI_ARABIA = 98; - - /// < Senegal - static const int PHONE_NUMBER_REGION_SENEGAL = 99; - - /// < Serbia - static const int PHONE_NUMBER_REGION_SERBIA = 100; - - /// < Sierra Leone - static const int PHONE_NUMBER_REGION_SIERRA_LEONE = 101; - - /// < Sint maarten (Dutch part) - static const int PHONE_NUMBER_REGION_SINT_MAARTEN = 102; - - /// < Slovakia - static const int PHONE_NUMBER_REGION_SLOVAKIA = 103; - - /// < Somalia - static const int PHONE_NUMBER_REGION_SOMALIA = 104; - - /// < South Africa - static const int PHONE_NUMBER_REGION_SOUTH_AFRICA = 105; - - /// < Spain - static const int PHONE_NUMBER_REGION_SPAIN = 106; - - /// < Sri Lanka - static const int PHONE_NUMBER_REGION_SRI_LANKA = 107; - - /// < Sudan - static const int PHONE_NUMBER_REGION_SUDAN = 108; - - /// < Svalbard and Jan Mayen - static const int PHONE_NUMBER_REGION_SVALBARD_AND_JAN_MAYEN = 109; - - /// < Swaziland - static const int PHONE_NUMBER_REGION_SWAZILAND = 110; - - /// < Sweden - static const int PHONE_NUMBER_REGION_SWEDEN = 111; - - /// < Switzerland - static const int PHONE_NUMBER_REGION_SWITZERLAND = 112; - - /// < Taiwan Province of China - static const int PHONE_NUMBER_REGION_TAIWAN_PROVINCE_OF_CHINA = 113; - - /// < Thailand - static const int PHONE_NUMBER_REGION_THAILAND = 114; - - /// < Macedonia (the Former Yugoslav Republic of) - static const int - PHONE_NUMBER_REGION_THE_FORMER_YUGOSLAV_REPUBLIC_OF_MACEDONIA = 115; - - /// < Togo - static const int PHONE_NUMBER_REGION_TOGO = 116; - - /// < Trinidad and Tobago - static const int PHONE_NUMBER_REGION_TRINIDAD_AND_TOBAGO = 117; - - /// < Tristan da Cunha - static const int PHONE_NUMBER_REGION_TRISTAN_DA_CUNHA = 118; - - /// < Tunisia - static const int PHONE_NUMBER_REGION_TUNISIA = 119; - - /// < Turkey - static const int PHONE_NUMBER_REGION_TURKEY = 120; - - /// < Turks and Caicos Islands - static const int PHONE_NUMBER_REGION_TURKS_AND_CAICOS_ISLANDS = 121; - - /// < Uganda - static const int PHONE_NUMBER_REGION_UGANDA = 122; - - /// < United Kingdom - static const int PHONE_NUMBER_REGION_UNITED_KINGDOM = 123; - - /// < United States of America - static const int PHONE_NUMBER_REGION_UNITED_STATES_OF_AMERICA = 124; - - /// < Venezuela - static const int PHONE_NUMBER_REGION_VENEZUELA = 125; - - /// < Viet Nam - static const int PHONE_NUMBER_REGION_VIET_NAM = 126; - - /// < Virgin Island (British) - static const int PHONE_NUMBER_REGION_VIRGIN_ISLAND_BRITISH = 127; - - /// < Virgin Island (U.S.) - static const int PHONE_NUMBER_REGION_VIRGIN_ISLAND_US = 128; - - /// < Western Sahara - static const int PHONE_NUMBER_REGION_WESTERN_SAHARA = 129; - - /// < Zambia - static const int PHONE_NUMBER_REGION_ZAMBIA = 130; - - /// < Zimbabwe - static const int PHONE_NUMBER_REGION_ZIMBABWE = 131; - - /// < Andorra (Since 3.0) - static const int PHONE_NUMBER_REGION_ANDORRA = 132; - - /// < United Arab Emirates (Since 3.0) - static const int PHONE_NUMBER_REGION_UNITED_ARAB_EMIRATES = 133; - - /// < Afghanistan (Since 3.0) - static const int PHONE_NUMBER_REGION_AFGHANISTAN = 134; - - /// < Australia (Since 3.0) - static const int PHONE_NUMBER_REGION_AUSTRALIA = 135; - - /// < Aruba (Since 3.0) - static const int PHONE_NUMBER_REGION_ARUBA = 136; - - /// < Azerbaijan (Since 3.0) - static const int PHONE_NUMBER_REGION_AZERBAIJAN = 137; - - /// < Bosnia and Herzegovina (Since 3.0) - static const int PHONE_NUMBER_REGION_BOSNIA_AND_HERZEGOVINA = 138; - - /// < Bangladesh (Since 3.0) - static const int PHONE_NUMBER_REGION_BANGLADESH = 139; - - /// < Bahrain (Since 3.0) - static const int PHONE_NUMBER_REGION_BAHRAIN = 140; - - /// < Saint Barthelemy, French Antilles (Since 3.0) - static const int PHONE_NUMBER_REGION_SAINT_BARTHELEMY = 141; - - /// < Brunei Darussalam (Since 3.0) - static const int PHONE_NUMBER_REGION_BRUNEI_DARUSSALAM = 142; - - /// < Bolivia (Since 3.0) - static const int PHONE_NUMBER_REGION_BOLIVIA = 143; - - /// < Bhutan (Since 3.0) - static const int PHONE_NUMBER_REGION_BHUTAN = 144; - - /// < Belize (Since 3.0) - static const int PHONE_NUMBER_REGION_BELIZE = 145; - - /// < Cocos Islands (Since 3.0) - static const int PHONE_NUMBER_REGION_COCOS_ISLANDS = 146; - - /// < Central African Republic (Since 3.0) - static const int PHONE_NUMBER_REGION_CENTRAL_AFRICAN_REPUBLIC = 147; - - /// < Cook Islands (Since 3.0) - static const int PHONE_NUMBER_REGION_COOK_ISLANDS = 148; - - /// < Costa Rica (Since 3.0) - static const int PHONE_NUMBER_REGION_COSTA_RICA = 149; - - /// < Christmas Islands (Since 3.0) - static const int PHONE_NUMBER_REGION_CHRISTMAS_ISLANDS = 150; - - /// < Cyprus (Since 3.0) - static const int PHONE_NUMBER_REGION_CYPRUS = 151; - - /// < Djibouti (Since 3.0) - static const int PHONE_NUMBER_REGION_DJIBOUTI = 152; - - /// < Denmark (Since 3.0) - static const int PHONE_NUMBER_REGION_DENMARK = 153; - - /// < Ecuador (Since 3.0) - static const int PHONE_NUMBER_REGION_ECUADOR = 154; - - /// < Eritrea (Since 3.0) - static const int PHONE_NUMBER_REGION_ERITREA = 155; - - /// < Fiji (Since 3.0) - static const int PHONE_NUMBER_REGION_FIJI = 156; - - /// < Falkland Islands (Since 3.0) - static const int PHONE_NUMBER_REGION_FALKLAND_ISLANDS = 157; - - /// < Micronesia, Federated States of (Since 3.0) - static const int PHONE_NUMBER_REGION_MICRONESIA = 158; - - /// < Faroe Islands (Since 3.0) - static const int PHONE_NUMBER_REGION_FAROE_ISLANDS = 159; - - /// < Georgia (Since 3.0) - static const int PHONE_NUMBER_REGION_GEORGIA = 160; - - /// < French Guiana (Since 3.0) - static const int PHONE_NUMBER_REGION_FRENCH_GUIANA = 161; - - /// < Gibraltar (Since 3.0) - static const int PHONE_NUMBER_REGION_GIBRALTAR = 162; - - /// < Guadeloupe (Since 3.0) - static const int PHONE_NUMBER_REGION_GUADELOUPE = 163; - - /// < Equatorial Guinea (Since 3.0) - static const int PHONE_NUMBER_REGION_EQUATORIAL_GUINEA = 164; - - /// < Guatemala (Since 3.0) - static const int PHONE_NUMBER_REGION_GUATEMALA = 165; - - /// < Guyana (Since 3.0) - static const int PHONE_NUMBER_REGION_GUYANA = 166; - - /// < Hong Kong (Since 3.0) - static const int PHONE_NUMBER_REGION_HONG_KONG = 167; - - /// < Honduras (Since 3.0) - static const int PHONE_NUMBER_REGION_HONDURAS = 168; - - /// < Croatia (Since 3.0) - static const int PHONE_NUMBER_REGION_CROATIA = 169; - - /// < Haiti (Since 3.0) - static const int PHONE_NUMBER_REGION_HAITI = 170; - - /// < Israel (Since 3.0) - static const int PHONE_NUMBER_REGION_ISRAEL = 171; - - /// < British Indian Ocean Territory / Diego Garcia (Since 3.0) - static const int PHONE_NUMBER_REGION_DIEGO_GARCIA = 172; - - /// < Iraq (Since 3.0) - static const int PHONE_NUMBER_REGION_IRAQ = 173; - - /// < Kyrgyzstan (Since 3.0) - static const int PHONE_NUMBER_REGION_KYRGYZSTAN = 174; - - /// < Cambodia (Since 3.0) - static const int PHONE_NUMBER_REGION_CAMBODIA = 175; - - /// < Korea, Dem. People's Rep. of (Since 3.0) - static const int PHONE_NUMBER_REGION_NORTH_KOREA = 176; - - /// < Kuwait (Since 3.0) - static const int PHONE_NUMBER_REGION_KUWAIT = 177; - - /// < Lao People's Dem. Rep. (Since 3.0) - static const int PHONE_NUMBER_REGION_LAOS = 178; - - /// < Lebanon (Since 3.0) - static const int PHONE_NUMBER_REGION_LEBANON = 179; - - /// < Liechtenstein (Since 3.0) - static const int PHONE_NUMBER_REGION_LIECHTENSTEIN = 180; - - /// < Liberia (Since 3.0) - static const int PHONE_NUMBER_REGION_LIBERIA = 181; - - /// < Libya (Soc. People's Libyan Arab Jamahiriya) (Since 3.0) - static const int PHONE_NUMBER_REGION_LIBYA = 182; - - /// < Monaco (Since 3.0) - static const int PHONE_NUMBER_REGION_MONACO = 183; - - /// < Montenegro (Since 3.0) - static const int PHONE_NUMBER_REGION_MONTENEGRO = 184; - - /// < Saint-Martin, French Antilles (Since 3.0) - static const int PHONE_NUMBER_REGION_SAINT_MARTIN = 185; - - /// < Marshall Islands (Since 3.0) - static const int PHONE_NUMBER_REGION_MARSHALL_ISLANDS = 186; - - /// < Mali (Since 3.0) - static const int PHONE_NUMBER_REGION_MALI = 187; - - /// < Myanmar (Since 3.0) - static const int PHONE_NUMBER_REGION_MYANMAR = 188; - - /// < Mongolia (Since 3.0) - static const int PHONE_NUMBER_REGION_MONGOLIA = 189; - - /// < Macao, China (Since 3.0) - static const int PHONE_NUMBER_REGION_MACAO = 190; - - /// < Martinique (French Dept. of) (Since 3.0) - static const int PHONE_NUMBER_REGION_MARTINIQUE = 191; - - /// < Malta (Since 3.0) - static const int PHONE_NUMBER_REGION_MALTA = 192; - - /// < Maldives (Since 3.0) - static const int PHONE_NUMBER_REGION_MALDIVES = 193; - - /// < Malawi (Since 3.0) - static const int PHONE_NUMBER_REGION_MALAWI = 194; - - /// < Mexico (Since 3.0) - static const int PHONE_NUMBER_REGION_MEXICO = 195; - - /// < Malaysia (Since 3.0) - static const int PHONE_NUMBER_REGION_MALAYSIA = 196; - - /// < New Caledonia (Territoire francais d'outre-mer) (Since 3.0) - static const int PHONE_NUMBER_REGION_NEW_CALEDONIA = 197; - - /// < Niger (Since 3.0) - static const int PHONE_NUMBER_REGION_NIGER = 198; - - /// < Norfolk Island (Since 3.0) - static const int PHONE_NUMBER_REGION_NORFOLK_ISLAND = 199; - - /// < Nicaragua (Since 3.0) - static const int PHONE_NUMBER_REGION_NICARAGUA = 200; - - /// < Nepal (Since 3.0) - static const int PHONE_NUMBER_REGION_NEPAL = 201; - - /// < Nauru (Since 3.0) - static const int PHONE_NUMBER_REGION_NAURU = 202; - - /// < Niue (Since 3.0) - static const int PHONE_NUMBER_REGION_NIUE = 203; - - /// < New Zealand (Since 3.0) - static const int PHONE_NUMBER_REGION_NEW_ZEALAND = 204; - - /// < Oman (Since 3.0) - static const int PHONE_NUMBER_REGION_OMAN = 205; - - /// < Panama (Since 3.0) - static const int PHONE_NUMBER_REGION_PANAMA = 206; - - /// < French Polynesia (Tahiti) (Territoire francais d'outre-mer) (Since 3.0) - static const int PHONE_NUMBER_REGION_FRENCH_POLYNESIA = 207; - - /// < Papua New Guinea (Since 3.0) - static const int PHONE_NUMBER_REGION_PAPUA_NEW_GUINEA = 208; - - /// < Philippines (Since 3.0) - static const int PHONE_NUMBER_REGION_PHILIPPINES = 209; - - /// < Pakistan (Since 3.0) - static const int PHONE_NUMBER_REGION_PAKISTAN = 210; - - /// < Saint Pierre and Miquelon (Collectivite territoriale de la Republique francaise) (Since 3.0) - static const int PHONE_NUMBER_REGION_SAINT_PIERRE_AND_MIQUELON = 211; - - /// < Palestinian Authority (Since 3.0) - static const int PHONE_NUMBER_REGION_PALESTINIAN_AUTHORITY = 212; - - /// < Palau (Since 3.0) - static const int PHONE_NUMBER_REGION_PALAU = 213; - - /// < Paraguay (Since 3.0) - static const int PHONE_NUMBER_REGION_PARAGUAY = 214; - - /// < Qatar (Since 3.0) - static const int PHONE_NUMBER_REGION_QATAR = 215; - - /// < Reunion (French Departments and Territories in the Indian Ocean) (Since 3.0) - static const int PHONE_NUMBER_REGION_REUNION = 216; - - /// < Rwanda (Since 3.0) - static const int PHONE_NUMBER_REGION_RWANDA = 217; - - /// < Solomon Islands (Since 3.0) - static const int PHONE_NUMBER_REGION_SOLOMON_ISLANDS = 218; - - /// < Seychelles (Since 3.0) - static const int PHONE_NUMBER_REGION_SEYCHELLES = 219; - - /// < Singapore (Since 3.0) - static const int PHONE_NUMBER_REGION_SINGAPORE = 220; - - /// < Slovenia (Since 3.0) - static const int PHONE_NUMBER_REGION_SLOVENIA = 221; - - /// < San Marino (Since 3.0) - static const int PHONE_NUMBER_REGION_SAN_MARINO = 222; - - /// < Suriname (Since 3.0) - static const int PHONE_NUMBER_REGION_SURINAME = 223; - - /// < South Sudan (Since 3.0) - static const int PHONE_NUMBER_REGION_SOUTH_SUDAN = 224; - - /// < El Salvador (Since 3.0) - static const int PHONE_NUMBER_REGION_EL_SALVADOR = 225; - - /// < Syrian Arab Republic (Since 3.0) - static const int PHONE_NUMBER_REGION_SYRIAN_ARAB_REPUBLIC = 226; - - /// < Chad (Since 3.0) - static const int PHONE_NUMBER_REGION_CHAD = 227; - - /// < Tajikistan (Since 3.0) - static const int PHONE_NUMBER_REGION_TAJIKISTAN = 228; - - /// < Tokelau (Since 3.0) - static const int PHONE_NUMBER_REGION_TOKELAU = 229; - - /// < Timor-Leste (East Timor) (Since 3.0) - static const int PHONE_NUMBER_REGION_TIMOR_LESTE = 230; - - /// < Turkmenistan (Since 3.0) - static const int PHONE_NUMBER_REGION_TURKMENISTAN = 231; - - /// < Tonga (Since 3.0) - static const int PHONE_NUMBER_REGION_TONGA = 232; - - /// < Tuvalu (Since 3.0) - static const int PHONE_NUMBER_REGION_TUVALU = 233; - - /// < Tanzania (Since 3.0) - static const int PHONE_NUMBER_REGION_TANZANIA = 234; - - /// < Ukraine (Since 3.0) - static const int PHONE_NUMBER_REGION_UKRAINE = 235; - - /// < Uruguay (Since 3.0) - static const int PHONE_NUMBER_REGION_URUGUAY = 236; - - /// < Uzbekistan (Since 3.0) - static const int PHONE_NUMBER_REGION_UZBEKISTAN = 237; - - /// < Vatican City (Since 3.0) - static const int PHONE_NUMBER_REGION_VATICAN_CITY = 238; - - /// < Vanuatu (Since 3.0) - static const int PHONE_NUMBER_REGION_VANUATU = 239; - - /// < Wallis and Futuna (Territoire francais d'outre-mer) (Since 3.0) - static const int PHONE_NUMBER_REGION_WALLIS_AND_FUTUNA = 240; - - /// < Samoa (Since 3.0) - static const int PHONE_NUMBER_REGION_SAMOA = 241; - - /// < Yemen (Since 3.0) - static const int PHONE_NUMBER_REGION_YEMEN = 242; - - /// < Mayotte (Since 3.0) - static const int PHONE_NUMBER_REGION_MAYOTTE = 243; - - /// < Current System Value (Since 3.0) - static const int PHONE_NUMBER_REGION_SYSTEM = 244; - static const int PHONE_NUMBER_REGION_MAX = 245; -} - -/// @brief Enumeration for match type. -/// @since_tizen 4.0 -abstract class phone_number_blocking_rule_match_type_e { - /// < Exact match - static const int PHONE_NUMBER_MATCH_TYPE_EXACTLY = 0; - - /// < Includes - static const int PHONE_NUMBER_MATCH_TYPE_INCLUDES = 1; - - /// < Starts with - static const int PHONE_NUMBER_MATCH_TYPE_STARTS_WITH = 2; - - /// < Ends with - static const int PHONE_NUMBER_MATCH_TYPE_ENDS_WITH = 3; -} - -/// @brief Enumeration for phone number errors. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class phone_number_error_e { - /// < Successful - static const int PHONE_NUMBER_ERROR_NONE = 0; - - /// < I/O Error - static const int PHONE_NUMBER_ERROR_IO_ERROR = -5; - - /// < Out of memory - static const int PHONE_NUMBER_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int PHONE_NUMBER_ERROR_INVALID_PARAMETER = -22; - - /// < FS Full - static const int PHONE_NUMBER_ERROR_FILE_NO_SPACE_ON_DEVICE = -28; - - /// < Permission denied - static const int PHONE_NUMBER_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int PHONE_NUMBER_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Requested data does not exist - static const int PHONE_NUMBER_ERROR_NO_DATA = -61; - - /// < Internal error (Since 3.0) - static const int PHONE_NUMBER_ERROR_SYSTEM = -33685265; - - /// < No access to the database (Since 4.0) - static const int PHONE_NUMBER_ERROR_DB_FAILED = -33685502; - - /// < Unknown IPC error (Since 4.0) - static const int PHONE_NUMBER_ERROR_IPC = -33685313; -} - -/// @brief The blocking rule handle. -/// @since_tizen 4.0 -typedef phone_number_blocking_rule_h = ffi.Pointer; - -/// @brief Enumeration for device's error code. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class device_error_e { - /// < Successful - static const int DEVICE_ERROR_NONE = 0; - - /// < Operation not permitted - static const int DEVICE_ERROR_OPERATION_FAILED = -1; - - /// < Permission denied - static const int DEVICE_ERROR_PERMISSION_DENIED = -13; - - /// < Invalid parameter - static const int DEVICE_ERROR_INVALID_PARAMETER = -22; - - /// < Operation already in progress - static const int DEVICE_ERROR_ALREADY_IN_PROGRESS = -114; - - /// < Not supported in this device - static const int DEVICE_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Device or resource busy - static const int DEVICE_ERROR_RESOURCE_BUSY = -16; - - /// < Not initialized - static const int DEVICE_ERROR_NOT_INITIALIZED = -37748717; -} - -/// @brief Enumeration for the battery level status. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class device_battery_level_e { - /// < The battery goes empty. Prepare for the safe termination of the application, because the device starts a shutdown process soon after entering this level. - static const int DEVICE_BATTERY_LEVEL_EMPTY = 0; - - /// < The battery charge is at a critical state. You may have to stop using multimedia features, because they are not guaranteed to work correctly at this battery status. - static const int DEVICE_BATTERY_LEVEL_CRITICAL = 1; - - /// < The battery has little charge left. - static const int DEVICE_BATTERY_LEVEL_LOW = 2; - - /// < The battery status is not to be careful. - static const int DEVICE_BATTERY_LEVEL_HIGH = 3; - - /// < The battery status is fully charged. It means no more charge. - static const int DEVICE_BATTERY_LEVEL_FULL = 4; -} - -/// @brief Enumeration for battery health information. -/// @since_tizen 3.0 -abstract class device_battery_health_e { - /// < The battery health is good - static const int DEVICE_BATTERY_HEALTH_GOOD = 0; - - /// < The temperature of the battery is cold - static const int DEVICE_BATTERY_HEALTH_COLD = 1; - - /// < The battery is dead - static const int DEVICE_BATTERY_HEALTH_DEAD = 2; - - /// < The temperature of the battery is high - static const int DEVICE_BATTERY_HEALTH_OVER_HEAT = 3; - - /// < The battery is in over voltage state - static const int DEVICE_BATTERY_HEALTH_OVER_VOLTAGE = 4; -} - -/// @brief Enumeration for power source information. -/// @since_tizen 3.0 -abstract class device_battery_power_source_e { - /// < There is no power source - static const int DEVICE_BATTERY_POWER_SOURCE_NONE = 0; - - /// < AC power cable is connected - static const int DEVICE_BATTERY_POWER_SOURCE_AC = 1; - - /// < USB power cable is connected - static const int DEVICE_BATTERY_POWER_SOURCE_USB = 2; - - /// < Power is provided by a wireless source - static const int DEVICE_BATTERY_POWER_SOURCE_WIRELESS = 3; -} - -/// @brief Enumeration for battery property information. -/// @since_tizen 3.0 -abstract class device_battery_property_e { - /// < The battery capacity (0 ~ 100 %) - static const int DEVICE_BATTERY_PROPERTY_CAPACITY = 0; - - /// < The battery current (uA) - static const int DEVICE_BATTERY_PROPERTY_CURRENT_NOW = 1; - - /// < The average battery current (uA) - static const int DEVICE_BATTERY_PROPERTY_CURRENT_AVERAGE = 2; -} - -/// @brief Enumeration for battery status information. -/// @since_tizen 3.0 -abstract class device_battery_status_e { - /// < Battery is charging - static const int DEVICE_BATTERY_STATUS_CHARGING = 0; - - /// < Battery is discharging - static const int DEVICE_BATTERY_STATUS_DISCHARGING = 1; - - /// < Battery is fully charged - static const int DEVICE_BATTERY_STATUS_FULL = 2; - - /// < Battery is not charging - static const int DEVICE_BATTERY_STATUS_NOT_CHARGING = 3; -} - -/// @brief Enumeration for the device state callback. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class device_callback_e { - /// < Called when a battery charge percentage is changed - static const int DEVICE_CALLBACK_BATTERY_CAPACITY = 0; - - /// < Called when a battery level is changed - static const int DEVICE_CALLBACK_BATTERY_LEVEL = 1; - - /// < Called when battery charging state is changed - static const int DEVICE_CALLBACK_BATTERY_CHARGING = 2; - - /// < Called when a display state is changed - static const int DEVICE_CALLBACK_DISPLAY_STATE = 3; - - /// < Called when a flash brightness is changed (Since Tizen @if Mobile 2.4 @elseif WEARABLE 3.0 @endif) - static const int DEVICE_CALLBACK_FLASH_BRIGHTNESS = 4; - static const int DEVICE_CALLBACK_MAX = 5; -} - -/// @brief Called when a device status is changed. -/// @details Each device callback has a different output param type. \n -/// So you need to check below output param before using this function. \n -/// callback enum output type \n -/// DEVICE_CALLBACK_BATTERY_CAPACITY int \n -/// DEVICE_CALLBACK_BATTERY_LEVEL int \n -/// DEVICE_CALLBACK_BATTERY_CHARGING bool \n -/// DEVICE_CALLBACK_DISPLAY_STATE int \n -/// DEVICE_CALLBACK_FLASH_BRIGHTNESS int -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks DEVICE_CALLBACK_FLASH_BRIGHTNESS callback invoked when user set flash brightness by using device_flash_set_brightness(). It does not work by camera flash operation. To register DEVICE_CALLBACK_FLASH_BRIGHTNESS callback, you need to declare the LED privilege (%http://tizen.org/privilege/led). -/// @param[out] type The device type to monitor -/// @param[out] value The changed value -/// @param[out] user_data The user data passed from the callback registration function -typedef device_changed_cb - = ffi.Pointer>; -typedef device_changed_cbFunction = ffi.Void Function(ffi.Int32 type, - ffi.Pointer value, ffi.Pointer user_data); -typedef Dartdevice_changed_cbFunction = void Function( - int type, ffi.Pointer value, ffi.Pointer user_data); - -/// @brief Enumeration for the available display states. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class display_state_e { - /// < Normal state - static const int DISPLAY_STATE_NORMAL = 0; - - /// < @if TV @internal @endif Screen dim state - static const int DISPLAY_STATE_SCREEN_DIM = 1; - - /// < Screen off state - static const int DISPLAY_STATE_SCREEN_OFF = 2; -} - -/// @brief The haptic device handle. -typedef haptic_device_h = ffi.Pointer; - -/// @brief The haptic effect handle. -typedef haptic_effect_h = ffi.Pointer; - -/// @brief Enumeration for custom LED flags. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class led_custom_flags { - /// < blink LED - static const int LED_CUSTOM_DUTY_ON = 1; - - /// < Default flag - static const int LED_CUSTOM_DEFAULT = 1; -} - -/// @brief Enumeration for lock type. -/// @details Each enum ensures that the suitable device is on until all the lock requests have been released or after a timeout. -/// -/// -/// -/// -/// -///
Enum TypeCPUBrightness(Display)
POWER_LOCK_CPUONOFF
POWER_LOCK_DISPLAYONON(Normal)
POWER_LOCK_DISPLAY_DIMONON(Dim)
-/// The POWER_LOCK_DISPLAY and POWER_LOCK_DISPLAY_DIM types were deprecated in Tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif.\n -/// Please use below api set instead of these types.\n -/// int efl_util_set_window_screen_mode(Evas_Object *window, efl_util_screen_mode_e mode); \n -/// int efl_util_get_window_screen_mode(Evas_Object *window, efl_util_screen_mode_e *mode); -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks An application can lock the specific type. -/// @remarks These enums are mutually exclusive. -/// @remarks You cannot combine with an enum below. -abstract class power_lock_e { - /// < CPU lock - static const int POWER_LOCK_CPU = 0; - - /// < Display normal lock (Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. Use efl_util_set_window_screen_mode() instead) - static const int POWER_LOCK_DISPLAY = 1; - - /// < Display dim lock (Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. Use efl_util_set_window_screen_mode() instead) - static const int POWER_LOCK_DISPLAY_DIM = 2; -} - -/// @brief Enumeration for Dlog Error. -/// @if MOBILE @since_tizen 2.3 @elseif WEARABLE @since_tizen 2.3.1 @endif -abstract class dlog_error_e { - /// < Successful - static const int DLOG_ERROR_NONE = 0; - - /// < Invalid parameter - static const int DLOG_ERROR_INVALID_PARAMETER = -22; - - /// < Operation not permitted - static const int DLOG_ERROR_NOT_PERMITTED = -1; -} - -/// @brief Enumeration for log priority values in ascending priority order. -/// @if MOBILE @since_tizen 2.3 @elseif WEARABLE @since_tizen 2.3.1 @endif -abstract class log_priority { - /// < Keep this always at the start - static const int DLOG_UNKNOWN = 0; - - /// < Default - static const int DLOG_DEFAULT = 1; - - /// < Verbose - static const int DLOG_VERBOSE = 2; - - /// < Debug - static const int DLOG_DEBUG = 3; - - /// < Info - static const int DLOG_INFO = 4; - - /// < Warning - static const int DLOG_WARN = 5; - - /// < Error - static const int DLOG_ERROR = 6; - - /// < Fatal - static const int DLOG_FATAL = 7; - - /// < Silent - static const int DLOG_SILENT = 8; - - /// < Keep this always at the end. - static const int DLOG_PRIO_MAX = 9; -} - -typedef va_list = __builtin_va_list; -typedef __builtin_va_list = ffi.Pointer; - -/// @brief Enumeration for feedback interface type. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class feedback_type_e { - /// < Feedback type none - static const int FEEDBACK_TYPE_NONE = 0; - - /// < Feedback type for sound - static const int FEEDBACK_TYPE_SOUND = 1; - - /// < Feedback type for vibration - static const int FEEDBACK_TYPE_VIBRATION = 2; - static const int FEEDBACK_TYPE_END = 3; -} - -/// @brief Enumeration for feedback interface of the system pre-defined patterns. -/// @details Each feedback pattern can have separate media files of each types. -/// But depending on vendor design, pattern may not have any type of file. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class feedback_pattern_e { - static const int FEEDBACK_PATTERN_NONE = -1; - - /// < Feedback pattern when general touch - static const int FEEDBACK_PATTERN_TAP = 0; - - /// < Feedback pattern when touch text key - static const int FEEDBACK_PATTERN_SIP = 1; - - /// < Feedback pattern when touch numeric 0 key - static const int FEEDBACK_PATTERN_KEY0 = 6; - - /// < Feedback pattern when touch numeric 1 key - static const int FEEDBACK_PATTERN_KEY1 = 7; - - /// < Feedback pattern when touch numeric 2 key - static const int FEEDBACK_PATTERN_KEY2 = 8; - - /// < Feedback pattern when touch numeric 3 key - static const int FEEDBACK_PATTERN_KEY3 = 9; - - /// < Feedback pattern when touch numeric 4 key - static const int FEEDBACK_PATTERN_KEY4 = 10; - - /// < Feedback pattern when touch numeric 5 key - static const int FEEDBACK_PATTERN_KEY5 = 11; - - /// < Feedback pattern when touch numeric 6 key - static const int FEEDBACK_PATTERN_KEY6 = 12; - - /// < Feedback pattern when touch numeric 7 key - static const int FEEDBACK_PATTERN_KEY7 = 13; - - /// < Feedback pattern when touch numeric 8 key - static const int FEEDBACK_PATTERN_KEY8 = 14; - - /// < Feedback pattern when touch numeric 9 key - static const int FEEDBACK_PATTERN_KEY9 = 15; - - /// < Feedback pattern when touch star key - static const int FEEDBACK_PATTERN_KEY_STAR = 16; - - /// < Feedback pattern when touch sharp key - static const int FEEDBACK_PATTERN_KEY_SHARP = 17; - - /// < Feedback pattern when touch backspace key - static const int FEEDBACK_PATTERN_KEY_BACK = 18; - - /// < Feedback pattern when touch hold - static const int FEEDBACK_PATTERN_HOLD = 19; - - /// < Feedback pattern when press hardware key - static const int FEEDBACK_PATTERN_HW_TAP = 21; - - /// < Feedback pattern when holding press hardware key - static const int FEEDBACK_PATTERN_HW_HOLD = 22; - - /// < Feedback pattern when incoming a message - static const int FEEDBACK_PATTERN_MESSAGE = 23; - - /// < Feedback pattern when incoming an email - static const int FEEDBACK_PATTERN_EMAIL = 25; - - /// < Feedback pattern when alert wake up call - static const int FEEDBACK_PATTERN_WAKEUP = 27; - - /// < Feedback pattern when alert schedule alarm - static const int FEEDBACK_PATTERN_SCHEDULE = 29; - - /// < Feedback pattern when alert timer - static const int FEEDBACK_PATTERN_TIMER = 31; - - /// < Feedback pattern when alert general event - static const int FEEDBACK_PATTERN_GENERAL = 33; - - /// < Feedback pattern when power on - static const int FEEDBACK_PATTERN_POWERON = 36; - - /// < Feedback pattern when power off - static const int FEEDBACK_PATTERN_POWEROFF = 37; - - /// < Feedback pattern when connecting charger - static const int FEEDBACK_PATTERN_CHARGERCONN = 38; - - /// < Feedback pattern when occuring charging error - static const int FEEDBACK_PATTERN_CHARGING_ERROR = 40; - - /// < Feedback pattern when full charged - static const int FEEDBACK_PATTERN_FULLCHARGED = 42; - - /// < Feedback pattern when low battery - static const int FEEDBACK_PATTERN_LOWBATT = 44; - - /// < Feedback pattern when lock - static const int FEEDBACK_PATTERN_LOCK = 46; - - /// < Feedback pattern when unlock - static const int FEEDBACK_PATTERN_UNLOCK = 47; - - /// < Feedback pattern when turn on vibration mode - static const int FEEDBACK_PATTERN_VIBRATION_ON = 55; - - /// < Feedback pattern when turn off silent mode - static const int FEEDBACK_PATTERN_SILENT_OFF = 56; - - /// < Feedback pattern when connecting with bluetooth - static const int FEEDBACK_PATTERN_BT_CONNECTED = 57; - - /// < Feedback pattern when disconnecting with bluetooth - static const int FEEDBACK_PATTERN_BT_DISCONNECTED = 58; - - /// < Feedback pattern when list reorder - static const int FEEDBACK_PATTERN_LIST_REORDER = 62; - - /// < Feedback pattern when list slider sweep - static const int FEEDBACK_PATTERN_LIST_SLIDER = 63; - - /// < Feedback pattern when pressed volume key - static const int FEEDBACK_PATTERN_VOLUME_KEY = 64; - - /// < Feedback pattern for short feedback (Since 4.0) - static const int FEEDBACK_PATTERN_SYSTEM_SHORT = 107; - - /// < Feedback pattern for error (Since 4.0) - static const int FEEDBACK_PATTERN_SYSTEM_ERROR = 108; - - /// < Feedback pattern for long feedback (Since 4.0) - static const int FEEDBACK_PATTERN_SYSTEM_LONG = 112; - - /// < Feedback pattern for normal feedback (Since 4.0) - static const int FEEDBACK_PATTERN_SYSTEM_MID = 113; - - /// < Feedback pattern for end of effect (Since 4.0) - static const int FEEDBACK_PATTERN_END_EFFECT = 117; - - /// < Feedback pattern for strong buzz (Since 4.0) - static const int FEEDBACK_PATTERN_GENERAL_STRONG_BUZZ = 135; - static const int FEEDBACK_PATTERN_END = 10000; -} - -/// @brief Enumeration for the Feedback API error codes. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class feedback_error_e { - /// < Successful - static const int FEEDBACK_ERROR_NONE = 0; - - /// < Operation failed - static const int FEEDBACK_ERROR_OPERATION_FAILED = -1; - - /// < Invalid parameter - static const int FEEDBACK_ERROR_INVALID_PARAMETER = -22; - - /// < Not supported in this device - static const int FEEDBACK_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Permission denied - static const int FEEDBACK_ERROR_PERMISSION_DENIED = -13; - - /// < Not initialized - static const int FEEDBACK_ERROR_NOT_INITIALIZED = -38404095; -} - -/// @brief Enumeration for error codes of a media key. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class media_key_error_e { - /// < Successful - static const int MEDIA_KEY_ERROR_NONE = 0; - - /// < Invalid parameter - static const int MEDIA_KEY_ERROR_INVALID_PARAMETER = -22; - - /// < Reserve/Release failed - static const int MEDIA_KEY_ERROR_OPERATION_FAILED = -37879807; -} - -/// @brief Enumeration for media keys. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class media_key_e { - /// < Play key - static const int MEDIA_KEY_PLAY = 0; - - /// < Stop key - static const int MEDIA_KEY_STOP = 1; - - /// < Pause key - static const int MEDIA_KEY_PAUSE = 2; - - /// < Previous key - static const int MEDIA_KEY_PREVIOUS = 3; - - /// < Next key - static const int MEDIA_KEY_NEXT = 4; - - /// < Fastforward key - static const int MEDIA_KEY_FASTFORWARD = 5; - - /// < Rewind key - static const int MEDIA_KEY_REWIND = 6; - - /// < Playpause key - static const int MEDIA_KEY_PLAYPAUSE = 7; - - /// < Media key for earjack - static const int MEDIA_KEY_MEDIA = 8; - - /// < Unknown key - static const int MEDIA_KEY_UNKNOWN = 9; -} - -/// @brief Enumeration for event statuses of a media key. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class media_key_event_e { - /// < Pressed status - static const int MEDIA_KEY_STATUS_PRESSED = 0; - - /// < Released status - static const int MEDIA_KEY_STATUS_RELEASED = 1; - - /// < Unknown status - static const int MEDIA_KEY_STATUS_UNKNOWN = 2; -} - -/// @brief Called when the status of the media key is changed. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @param[in] key The key whose status is changed -/// @param[in] status The status of the key -/// @param[in] user_data The user data passed from the callback registration function -/// @pre media_key_reserve() will invoke this callback function. -/// @see media_key_reserve() -/// @see media_key_release() -typedef media_key_event_cb - = ffi.Pointer>; -typedef media_key_event_cbFunction = ffi.Void Function( - ffi.Int32 key, ffi.Int32 status, ffi.Pointer user_data); -typedef Dartmedia_key_event_cbFunction = void Function( - int key, int status, ffi.Pointer user_data); - -/// @brief Enumeration for peripheral-io error. -/// @since_tizen 4.0 -abstract class peripheral_error_e { - /// < Successful - static const int PERIPHERAL_ERROR_NONE = 0; - - /// < I/O error - static const int PERIPHERAL_ERROR_IO_ERROR = -5; - - /// < No such device - static const int PERIPHERAL_ERROR_NO_DEVICE = -6; - - /// < Try again - static const int PERIPHERAL_ERROR_TRY_AGAIN = -11; - - /// < Out of memory - static const int PERIPHERAL_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied - static const int PERIPHERAL_ERROR_PERMISSION_DENIED = -13; - - /// < Device or resource busy - static const int PERIPHERAL_ERROR_RESOURCE_BUSY = -16; - - /// < Invalid parameter - static const int PERIPHERAL_ERROR_INVALID_PARAMETER = -22; - - /// < Not supported - static const int PERIPHERAL_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Unknown error - static const int PERIPHERAL_ERROR_UNKNOWN = -1073741824; -} - -/// @brief Enumeration of GPIO direction options. -/// @since_tizen 4.0 -abstract class peripheral_gpio_direction_e { - /// < Input Mode - static const int PERIPHERAL_GPIO_DIRECTION_IN = 0; - - /// < Output mode with high value - static const int PERIPHERAL_GPIO_DIRECTION_OUT_INITIALLY_HIGH = 1; - - /// < Output mode with low value - static const int PERIPHERAL_GPIO_DIRECTION_OUT_INITIALLY_LOW = 2; -} - -/// @brief Enumeration of edge types for the GPIO interrupt. -/// @since_tizen 4.0 -abstract class peripheral_gpio_edge_e { - /// < No interrupt on GPIO - static const int PERIPHERAL_GPIO_EDGE_NONE = 0; - - /// < Interrupt on rising only - static const int PERIPHERAL_GPIO_EDGE_RISING = 1; - - /// < Interrupt on falling only - static const int PERIPHERAL_GPIO_EDGE_FALLING = 2; - - /// < Interrupt on rising & falling - static const int PERIPHERAL_GPIO_EDGE_BOTH = 3; -} - -final class _peripheral_gpio_s extends ffi.Opaque {} - -/// @brief The handle of a GPIO pin. -/// @since_tizen 4.0 -typedef peripheral_gpio_h = ffi.Pointer<_peripheral_gpio_s>; - -/// @platform -/// @brief The GPIO interrupted callback called when the GPIO interrupt is triggered. -/// @since_tizen 4.0 -/// -/// @param[in] gpio The GPIO handle -/// @param[in] error The GPIO error -/// @param[in] user_data The user data passed from the callback registration function -/// -/// @see peripheral_gpio_set_interrupted_cb() -typedef peripheral_gpio_interrupted_cb - = ffi.Pointer>; -typedef peripheral_gpio_interrupted_cbFunction = ffi.Void Function( - peripheral_gpio_h gpio, ffi.Int32 error, ffi.Pointer user_data); -typedef Dartperipheral_gpio_interrupted_cbFunction = void Function( - peripheral_gpio_h gpio, int error, ffi.Pointer user_data); - -final class _peripheral_i2c_s extends ffi.Opaque {} - -/// @brief The handle of the I2C slave device. -/// @since_tizen 4.0 -typedef peripheral_i2c_h = ffi.Pointer<_peripheral_i2c_s>; - -final class _peripheral_pwm_s extends ffi.Opaque {} - -/// @brief Enumeration for Polarity. -/// @since_tizen 4.0 -abstract class peripheral_pwm_polarity_e { - /// < PWM signal start in the active high state (Normal) - static const int PERIPHERAL_PWM_POLARITY_ACTIVE_HIGH = 0; - - /// < PWM signal start in the active low state (Inversed) - static const int PERIPHERAL_PWM_POLARITY_ACTIVE_LOW = 1; -} - -/// @brief The handle of the PWM peripherals. -/// @since_tizen 4.0 -typedef peripheral_pwm_h = ffi.Pointer<_peripheral_pwm_s>; - -final class _peripheral_uart_s extends ffi.Opaque {} - -/// @brief Enumeration for baud rate. -/// @since_tizen 4.0 -abstract class peripheral_uart_baud_rate_e { - /// < The number of signal in one second is 0 - static const int PERIPHERAL_UART_BAUD_RATE_0 = 0; - - /// < The number of signal in one second is 50 - static const int PERIPHERAL_UART_BAUD_RATE_50 = 1; - - /// < The number of signal in one second is 75 - static const int PERIPHERAL_UART_BAUD_RATE_75 = 2; - - /// < The number of signal in one second is 110 - static const int PERIPHERAL_UART_BAUD_RATE_110 = 3; - - /// < The number of signal in one second is 134 - static const int PERIPHERAL_UART_BAUD_RATE_134 = 4; - - /// < The number of signal in one second is 150 - static const int PERIPHERAL_UART_BAUD_RATE_150 = 5; - - /// < The number of signal in one second is 200 - static const int PERIPHERAL_UART_BAUD_RATE_200 = 6; - - /// < The number of signal in one second is 300 - static const int PERIPHERAL_UART_BAUD_RATE_300 = 7; - - /// < The number of signal in one second is 600 - static const int PERIPHERAL_UART_BAUD_RATE_600 = 8; - - /// < The number of signal in one second is 1200 - static const int PERIPHERAL_UART_BAUD_RATE_1200 = 9; - - /// < The number of signal in one second is 1800 - static const int PERIPHERAL_UART_BAUD_RATE_1800 = 10; - - /// < The number of signal in one second is 2400 - static const int PERIPHERAL_UART_BAUD_RATE_2400 = 11; - - /// < The number of signal in one second is 4800 - static const int PERIPHERAL_UART_BAUD_RATE_4800 = 12; - - /// < The number of signal in one second is 9600 - static const int PERIPHERAL_UART_BAUD_RATE_9600 = 13; - - /// < The number of signal in one second is 19200 - static const int PERIPHERAL_UART_BAUD_RATE_19200 = 14; - - /// < The number of signal in one second is 38400 - static const int PERIPHERAL_UART_BAUD_RATE_38400 = 15; - - /// < The number of signal in one second is 57600 - static const int PERIPHERAL_UART_BAUD_RATE_57600 = 16; - - /// < The number of signal in one second is 115200 - static const int PERIPHERAL_UART_BAUD_RATE_115200 = 17; - - /// < The number of signal in one second is 230400 - static const int PERIPHERAL_UART_BAUD_RATE_230400 = 18; -} - -/// @brief Enumeration for byte size. -/// @since_tizen 4.0 -abstract class peripheral_uart_byte_size_e { - /// < 5 data bits - static const int PERIPHERAL_UART_BYTE_SIZE_5BIT = 0; - - /// < 6 data bits - static const int PERIPHERAL_UART_BYTE_SIZE_6BIT = 1; - - /// < 7 data bits - static const int PERIPHERAL_UART_BYTE_SIZE_7BIT = 2; - - /// < 8 data bits - static const int PERIPHERAL_UART_BYTE_SIZE_8BIT = 3; -} - -/// @brief Enumeration for parity bit. -/// @since_tizen 4.0 -abstract class peripheral_uart_parity_e { - /// < No parity is used - static const int PERIPHERAL_UART_PARITY_NONE = 0; - - /// < Even parity is used - static const int PERIPHERAL_UART_PARITY_EVEN = 1; - - /// < ODD parity is used - static const int PERIPHERAL_UART_PARITY_ODD = 2; -} - -/// @brief Enumeration for stop bits. -/// @since_tizen 4.0 -abstract class peripheral_uart_stop_bits_e { - /// < One stop bit - static const int PERIPHERAL_UART_STOP_BITS_1BIT = 0; - - /// < Two stop bits - static const int PERIPHERAL_UART_STOP_BITS_2BIT = 1; -} - -/// @brief Enumeration for hardware flow control. -/// @since_tizen 4.0 -abstract class peripheral_uart_hardware_flow_control_e { - /// < No hardware flow control - static const int PERIPHERAL_UART_HARDWARE_FLOW_CONTROL_NONE = 0; - - /// < Automatic RTS/CTS hardware flow control - static const int PERIPHERAL_UART_HARDWARE_FLOW_CONTROL_AUTO_RTSCTS = 1; -} - -/// @brief Enumeration for software flow control. -/// @since_tizen 4.0 -abstract class peripheral_uart_software_flow_control_e { - /// < No software flow control - static const int PERIPHERAL_UART_SOFTWARE_FLOW_CONTROL_NONE = 0; - - /// < XON/XOFF software flow control - static const int PERIPHERAL_UART_SOFTWARE_FLOW_CONTROL_XONXOFF = 1; -} - -/// @brief The handle to the UART peripherals. -/// @since_tizen 4.0 -typedef peripheral_uart_h = ffi.Pointer<_peripheral_uart_s>; - -final class _peripheral_spi_s extends ffi.Opaque {} - -/// @brief Enumeration of SPI transfer modes. -/// @since_tizen 4.0 -abstract class peripheral_spi_mode_e { - /// < CPOL = 0, CPHa = 0 Mode - static const int PERIPHERAL_SPI_MODE_0 = 0; - - /// < CPOL = 0, CPHa = 1 Mode - static const int PERIPHERAL_SPI_MODE_1 = 1; - - /// < CPOL = 1, CPHa = 0 Mode - static const int PERIPHERAL_SPI_MODE_2 = 2; - - /// < CPOL = 1, CPHa = 1 Mode - static const int PERIPHERAL_SPI_MODE_3 = 3; -} - -/// @brief Enumeration of bit orders. -/// @since_tizen 4.0 -abstract class peripheral_spi_bit_order_e { - /// < Use most siginificant bit first - static const int PERIPHERAL_SPI_BIT_ORDER_MSB = 0; - - /// < Use least significant bit first - static const int PERIPHERAL_SPI_BIT_ORDER_LSB = 1; -} - -/// @brief The handle of a SPI peripherals. -/// @since_tizen 4.0 -typedef peripheral_spi_h = ffi.Pointer<_peripheral_spi_s>; - -/// @brief Enumeration for error codes for runtime information. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class runtime_info_error_e { - /// < Successful - static const int RUNTIME_INFO_ERROR_NONE = 0; - - /// < Invalid parameter - static const int RUNTIME_INFO_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int RUNTIME_INFO_ERROR_OUT_OF_MEMORY = -12; - - /// < An input/output error occurred when read value from system - static const int RUNTIME_INFO_ERROR_IO_ERROR = -5; - - /// < Remote I/O error occurred - static const int RUNTIME_INFO_ERROR_REMOTE_IO = -121; - - /// < No permission to use the api - static const int RUNTIME_INFO_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported parameter - static const int RUNTIME_INFO_ERROR_NOT_SUPPORTED = -1073741822; - - /// < No data available (Since 3.0) - static const int RUNTIME_INFO_ERROR_NO_DATA = -61; -} - -/// @brief Enumeration for keys for runtime information. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class runtime_info_key_e { - /// >; -typedef runtime_info_changed_cbFunction = ffi.Void Function( - ffi.Int32 key, ffi.Pointer user_data); -typedef Dartruntime_info_changed_cbFunction = void Function( - int key, ffi.Pointer user_data); - -/// @brief Structure for memory information. -/// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif -final class runtime_memory_info_s extends ffi.Struct { - /// < Total memory (KiB) - @ffi.Int() - external int total; - - /// < Used memory (KiB) - @ffi.Int() - external int used; - - /// < Free memory (KiB) - @ffi.Int() - external int free; - - /// < Cache memory (KiB) - @ffi.Int() - external int cache; - - /// < Swap memory (KiB) - @ffi.Int() - external int swap; -} - -/// @brief Structure for memory information per process. -/// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif -final class process_memory_info_s extends ffi.Struct { - /// < Virtual memory size (KiB) - @ffi.Int() - external int vsz; - - /// < Resident set size (KiB) - @ffi.Int() - external int rss; - - /// < Proportional set size (KiB) - @ffi.Int() - external int pss; - - /// < Not modified and mapped by other processes (KiB) - @ffi.Int() - external int shared_clean; - - /// < Modified and mapped by other processes (KiB) - @ffi.Int() - external int shared_dirty; - - /// < Not modified and available only to that process (KiB) - @ffi.Int() - external int private_clean; - - /// < Modified and available only to that process (KiB) - @ffi.Int() - external int private_dirty; -} - -/// @brief Structure for CPU usage. -/// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif -final class runtime_cpu_usage_s extends ffi.Struct { - /// < Time running un-niced user processes (Percent) - @ffi.Double() - external double user; - - /// < Time running kernel processes (Percent) - @ffi.Double() - external double system; - - /// < Time running niced user processes (Percent) - @ffi.Double() - external double nice; - - /// < Time waiting for I/O completion (Percent) - @ffi.Double() - external double iowait; -} - -/// @brief Structure for CPU usage per process. -/// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif -final class process_cpu_usage_s extends ffi.Struct { - /// < Amount of time that this process has been scheduled in user mode (clock ticks) - @ffi.Int() - external int utime; - - /// < Amount of time that this process has been scheduled in kernel mode (clock ticks) - @ffi.Int() - external int stime; -} - -final class app_usages_s extends ffi.Opaque {} - -/// @brief Handle for app usage information. -/// @since_tizen 4.0 -typedef app_usage_h = ffi.Pointer; - -/// @brief Enumeration for errors. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sensor_error_e { - /// < Successful - static const int SENSOR_ERROR_NONE = 0; - - /// < I/O error - static const int SENSOR_ERROR_IO_ERROR = -5; - - /// < Invalid parameter - static const int SENSOR_ERROR_INVALID_PARAMETER = -22; - - /// < Not supported - static const int SENSOR_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Permission denied - static const int SENSOR_ERROR_PERMISSION_DENIED = -13; - - /// < Out of memory - static const int SENSOR_ERROR_OUT_OF_MEMORY = -12; - - /// < No data available - /// @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif - static const int SENSOR_ERROR_NO_DATA = -61; - - /// < Sensor doesn't need calibration - static const int SENSOR_ERROR_NOT_NEED_CALIBRATION = -38010877; - - /// < Operation failed - static const int SENSOR_ERROR_OPERATION_FAILED = -38010874; - - /// < The sensor is supported, but currently not available - /// @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif - static const int SENSOR_ERROR_NOT_AVAILABLE = -38010873; -} - -/// @brief Enumeration for proximity sensor events. -/// @details In its #sensor_event_s, #SENSOR_PROXIMITY reports the existence of -/// nearby objects in front of the sensor as one of the followings. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sensor_proximity_e { - /// < An object is placed near the proximity sensor - static const int SENSOR_PROXIMITY_NEAR = 0; - - /// < No object is placed near the proximity sensor - static const int SENSOR_PROXIMITY_FAR = 5; -} - -/// @brief Enumeration for pedestrian state. -/// @details In its #sensor_event_s, #SENSOR_HUMAN_PEDOMETER reports the user's -/// pedestrian state as one of the followings. -/// @since_tizen 3.0 -abstract class sensor_pedometer_state_e { - /// < Uncertain - static const int SENSOR_PEDOMETER_STATE_UNKNOWN = -1; - - /// < The user is not moving - static const int SENSOR_PEDOMETER_STATE_STOP = 0; - - /// < The user is walking - static const int SENSOR_PEDOMETER_STATE_WALK = 1; - - /// < The user is running - static const int SENSOR_PEDOMETER_STATE_RUN = 2; -} - -/// @brief Enumeration for sleep state. -/// @details In its #sensor_event_s, #SENSOR_HUMAN_SLEEP_MONITOR reports the user's -/// sleep state as one of the followings. -/// @since_tizen 3.0 -abstract class sensor_sleep_state_e { - /// < Uncertain - static const int SENSOR_SLEEP_STATE_UNKNOWN = -1; - - /// < The user is awake - static const int SENSOR_SLEEP_STATE_WAKE = 0; - - /// < The user is asleep - static const int SENSOR_SLEEP_STATE_SLEEP = 1; -} - -/// @brief Enumeration for sensor types. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sensor_type_e { - /// < All sensors. This can be used to retrieve #sensor_h for all available sensors. - static const int SENSOR_ALL = -1; - - /// < Accelerometer - static const int SENSOR_ACCELEROMETER = 0; - - /// < Gravity sensor - static const int SENSOR_GRAVITY = 1; - - /// < Linear acceleration sensor - static const int SENSOR_LINEAR_ACCELERATION = 2; - - /// < Magnetic sensor - static const int SENSOR_MAGNETIC = 3; - - /// < Rotation vector sensor - static const int SENSOR_ROTATION_VECTOR = 4; - - /// < Orientation sensor - static const int SENSOR_ORIENTATION = 5; - - /// < Gyroscope - static const int SENSOR_GYROSCOPE = 6; - - /// < Light sensor - static const int SENSOR_LIGHT = 7; - - /// < Proximity sensor - static const int SENSOR_PROXIMITY = 8; - - /// < Pressure sensor - static const int SENSOR_PRESSURE = 9; - - /// < Ultraviolet sensor - static const int SENSOR_ULTRAVIOLET = 10; - - /// < Temperature sensor - static const int SENSOR_TEMPERATURE = 11; - - /// < Humidity sensor - static const int SENSOR_HUMIDITY = 12; - - /// < Heart-rate monitor @if MOBILE (Since 2.3.1) @endif - /// @n Privilege : http://tizen.org/privilege/healthinfo - static const int SENSOR_HRM = 13; - - /// < Green LED sensor of HRM @if MOBILE (Since 2.3.1) @endif - /// @n Privilege : http://tizen.org/privilege/healthinfo - static const int SENSOR_HRM_LED_GREEN = 14; - - /// < Infra-Red LED sensor of HRM @if MOBILE (Since 2.3.1) @endif - /// @n Privilege : http://tizen.org/privilege/healthinfo - static const int SENSOR_HRM_LED_IR = 15; - - /// < Red LED sensor of HRM @if MOBILE (Since 2.3.1) @endif - /// @n Privilege : http://tizen.org/privilege/healthinfo - static const int SENSOR_HRM_LED_RED = 16; - - /// < Uncalibrated Gyroscope sensor - /// @if MOBILE (Since 2.4) @elseif WEARABLE (Since 2.3.2) @endif - static const int SENSOR_GYROSCOPE_UNCALIBRATED = 17; - - /// < Uncalibrated Geomagnetic sensor - /// @if MOBILE (Since 2.4) @elseif WEARABLE (Since 2.3.2) @endif - static const int SENSOR_GEOMAGNETIC_UNCALIBRATED = 18; - - /// < Gyroscope-based rotation vector sensor - /// @if MOBILE (Since 2.4) @elseif WEARABLE (Since 2.3.2) @endif - static const int SENSOR_GYROSCOPE_ROTATION_VECTOR = 19; - - /// < Geomagnetic-based rotation vector sensor - /// @if MOBILE (Since 2.4) @elseif WEARABLE (Since 2.3.2) @endif - static const int SENSOR_GEOMAGNETIC_ROTATION_VECTOR = 20; - - /// < Significant motion sensor (Since 4.0) - static const int SENSOR_SIGNIFICANT_MOTION = 256; - - /// < Pedometer (Since 3.0) - /// @n Privilege : http://tizen.org/privilege/healthinfo - static const int SENSOR_HUMAN_PEDOMETER = 768; - - /// < Sleep monitor (Since 3.0) - /// @n Privilege : http://tizen.org/privilege/healthinfo - static const int SENSOR_HUMAN_SLEEP_MONITOR = 769; - - /// < Sleep detector (Since 3.0) - /// @n Privilege : http://tizen.org/privilege/healthinfo - static const int SENSOR_HUMAN_SLEEP_DETECTOR = 770; - - /// < Stress monitor (Since 3.0) - /// @n Privilege : http://tizen.org/privilege/healthinfo - static const int SENSOR_HUMAN_STRESS_MONITOR = 771; - - /// < End of sensor enum values (Deprecated since 3.0) - static const int SENSOR_LAST = 772; - - /// < Custom sensor (Deprecated since 3.0) - static const int SENSOR_CUSTOM = 10000; -} - -/// @brief Sensor handle. -/// @details The handle for controlling a specific sensor can be retrieved using sensor_get_default_sensor().@n -/// The function returns the handle of the default sensor of a given type, and usually, -/// a device has one sensor for one type. -/// However, if the device supports multiple sensors of the same type, -/// sensor_get_sensor_list() function can be used to get the list of all the sensors of the type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef sensor_h = ffi.Pointer; - -/// @brief Called when a new sensor is added. -/// @since_tizen 4.0 -/// -/// @remarks @a uri should not be freed and can be used only in the callback. -/// To use outside the callback, make a copy. -/// -/// @param[in] uri The URI of the newly added sensor -/// @param[in] user_data The user data had passed to sensor_add_sensor_added_cb(). -/// -/// @pre A callback function needs to be set using sensor_add_sensor_added_cb(). -/// @see sensor_add_sensor_added_cb() -/// @see sensor_remove_sensor_added_cb() -typedef sensor_added_cb - = ffi.Pointer>; -typedef sensor_added_cbFunction = ffi.Void Function( - ffi.Pointer uri, ffi.Pointer user_data); -typedef Dartsensor_added_cbFunction = void Function( - ffi.Pointer uri, ffi.Pointer user_data); - -/// @brief Called when a sensor is removed. -/// @since_tizen 4.0 -/// -/// @remarks @a uri should not be freed and can be used only in the callback. -/// To use outside the callback, make a copy. -/// -/// @param[in] uri The URI of the removed sensor -/// @param[in] user_data The user data had passed to sensor_add_sensor_removed_cb() -/// -/// @pre A callback function needs to be set using sensor_add_sensor_removed_cb(). -/// @see sensor_add_sensor_removed_cb() -/// @see sensor_remove_sensor_removed_cb() -typedef sensor_removed_cb - = ffi.Pointer>; -typedef sensor_removed_cbFunction = ffi.Void Function( - ffi.Pointer uri, ffi.Pointer user_data); -typedef Dartsensor_removed_cbFunction = void Function( - ffi.Pointer uri, ffi.Pointer user_data); - -final class sensor_listener_s extends ffi.Opaque {} - -/// @brief Sensor data event delivered via sensor_event_cb(). -/// @details A sensor data is delivered as a structure, which contains the accuracy of the data, -/// the time when the data was observed, and the data array. -/// The data array is a fixed size @c float array, and the number of data fields -/// stored in the array varies with the sensor type. -/// For example, #SENSOR_ACCELEROMETER reports 3-dimensional data, -/// #sensor_event_s::value_count is thus set to 3.@n -/// Note that, even if the data values are @c float, in some cases, -/// it may contain one or more categorical data as in #sensor_proximity_e. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @see #sensor_pedometer_state_e -/// @see #sensor_sleep_state_e -final class sensor_event_s extends ffi.Struct { - /// < Accuracy of sensor data - @ffi.Int() - external int accuracy; - - /// < Time when the sensor data was observed - @ffi.UnsignedLongLong() - external int timestamp; - - /// < Number of sensor data values stored in #sensor_event_s::values - @ffi.Int() - external int value_count; - - /// < Sensor data values - @ffi.Array.multi([16]) - external ffi.Array values; -} - -/// @brief Enumeration for sensor data accuracy. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sensor_data_accuracy_e { - /// < Undefined - static const int SENSOR_DATA_ACCURACY_UNDEFINED = -1; - - /// < Not accurate - static const int SENSOR_DATA_ACCURACY_BAD = 0; - - /// < Moderately accurate - static const int SENSOR_DATA_ACCURACY_NORMAL = 1; - - /// < Highly accurate - static const int SENSOR_DATA_ACCURACY_GOOD = 2; - - /// < Very highly accurate - static const int SENSOR_DATA_ACCURACY_VERYGOOD = 3; -} - -/// @brief Enumeration for sensor listener behavior attributes -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -abstract class sensor_attribute_e { - /// < Reference orientation of sensor data to be reported.@n - /// See #sensor_axis_e for available attribute values. - static const int SENSOR_ATTRIBUTE_AXIS_ORIENTATION = 1; - - /// < Pause-and-resume policy of sensors.@n - /// See #sensor_pause_e for available attribute values. - static const int SENSOR_ATTRIBUTE_PAUSE_POLICY = 2; -} - -abstract class sensor_option_e { - /// < Does not receive data when the LCD is off and in the power save mode - static const int SENSOR_OPTION_DEFAULT = 0; - - /// < Receives data when the LCD is off - static const int SENSOR_OPTION_ON_IN_SCREEN_OFF = 1; - - /// < Receives data in the power save mode - static const int SENSOR_OPTION_ON_IN_POWERSAVE_MODE = 2; - - /// < Receives data when the LCD is off and in the power save mode - static const int SENSOR_OPTION_ALWAYS_ON = 3; -} - -/// @brief Enumeration for reference orientations of sensor data -/// @details The sensor's physical orientation may differ from what applications are aware of, -/// in cases that the device has a rotated screen, physically or logically. -/// For example, a watch device may have right hand mode, which logically rotates -/// the display 180 degrees. -/// Applications may not be aware of such situations, thus they may receives -/// sensor data inverted in X and Y directions. -/// With #SENSOR_AXIS_DISPLAY_ORIENTED option, applications can get data that -/// are properly aligned with the orientation of which they are aware.@n -/// By default, #SENSOR_AXIS_DISPLAY_ORIENTED is used. -/// If you need to use the data that are not affected by display orientations, -/// #SENSOR_AXIS_DEVICE_ORIENTED needs to be set. -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -abstract class sensor_axis_e { - /// < Using the device orientation as the reference coordinate system - static const int SENSOR_AXIS_DEVICE_ORIENTED = 1; - - /// < Using the display orientation as the reference coordinate system - static const int SENSOR_AXIS_DISPLAY_ORIENTED = 2; -} - -/// @brief Enumeration for pause policies of sensor listeners -/// @details To be power-efficient, you can set the policy of how to pause and resume -/// a sensor listener regarding the system status. -/// By default, #SENSOR_PAUSE_ALL is used to obtain the maximum power efficiency. -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -abstract class sensor_pause_e { - /// < The sensor will not pause, unless the system goes into sleep mode - static const int SENSOR_PAUSE_NONE = 0; - - /// < The sensor pauses while the display is off - static const int SENSOR_PAUSE_ON_DISPLAY_OFF = 1; - - /// < The sensor pauses while the power-save mode is enabled - static const int SENSOR_PAUSE_ON_POWERSAVE_MODE = 2; - - /// < The sensor pauses in all the above cases - static const int SENSOR_PAUSE_ALL = 3; -} - -/// @brief Sensor listener handle. -/// @details For each #sensor_h, one or more sensor listeners can be created by using sensor_create_listener(). -/// Then the sensor's data can observed asynchronously, can be read synchronously if available, via the listener. -/// Applications are also able to control the behavior of each sensor, for example, -/// update interval of sensor readings. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef sensor_listener_h = ffi.Pointer; - -/// @brief Called when a sensor event occurs. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @param[in] sensor The corresponding sensor handle -/// @param[in] event A sensor event -/// @param[in] data The user data had passed to sensor_listener_set_event_cb() -/// -/// @pre The sensor needs to be started regarding a listener handle, using sensor_listener_start(). -typedef sensor_event_cb - = ffi.Pointer>; -typedef sensor_event_cbFunction = ffi.Void Function(sensor_h sensor, - ffi.Pointer event, ffi.Pointer data); -typedef Dartsensor_event_cbFunction = void Function(sensor_h sensor, - ffi.Pointer event, ffi.Pointer data); - -/// @brief Called when the accuracy of a sensor changes. -/// @details Sensors can be affected by the environment. -/// For example, #SENSOR_MAGNETIC is sensitive to any surrounding objects that can influence -/// electromagnetic fields. This function is called if the accuracy of the corresponding sensor is changed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @param[in] sensor A sensor handle -/// @param[in] timestamp The time in milliseconds when the accuracy changed -/// @param[in] accuracy The current accuracy of the sensor -/// @param[in] data The user data had passed to sensor_listener_set_accuracy_cb() -typedef sensor_accuracy_changed_cb - = ffi.Pointer>; -typedef sensor_accuracy_changed_cbFunction = ffi.Void Function( - sensor_h sensor, - ffi.UnsignedLongLong timestamp, - ffi.Int32 accuracy, - ffi.Pointer data); -typedef Dartsensor_accuracy_changed_cbFunction = void Function( - sensor_h sensor, int timestamp, int accuracy, ffi.Pointer data); - -final class _sensor_provider_s extends ffi.Opaque {} - -/// @brief Sensor provider handle. -/// @details One or more sensor providers can be created by using sensor_create_provider(). -/// The sensor's data can be published to listeners, via the provider. -/// @since_tizen 4.0 -/// -/// @see sensor_create_provider() -/// @see sensor_destroy_provider() -typedef sensor_provider_h = ffi.Pointer<_sensor_provider_s>; - -/// @brief Called when a sensor listener starts the sensor provider. -/// @since_tizen 4.0 -/// -/// @remarks @a provider is the object created with sensor_create_provider() -/// and is the object for which the callback was triggered. -/// -/// @param[in] provider The sensor provider handle -/// @param[in] user_data The user data to be passed to the callback function -/// -/// @pre A callback function needs to be set using sensor_provider_set_start_cb(). -/// @see sensor_provider_set_start_cb() -typedef sensor_provider_start_cb - = ffi.Pointer>; -typedef sensor_provider_start_cbFunction = ffi.Void Function( - sensor_provider_h provider, ffi.Pointer user_data); -typedef Dartsensor_provider_start_cbFunction = void Function( - sensor_provider_h provider, ffi.Pointer user_data); - -/// @brief Called when a sensor listener stops the sensor provider. -/// @since_tizen 4.0 -/// -/// @remarks @a provider is the object created with sensor_create_provider() -/// and is the object for which the callback was triggered. -/// -/// @param[in] provider The sensor provider handle -/// @param[in] user_data The user data to be passed to the callback function -/// -/// @pre A callback function needs to be set using sensor_provider_set_stop_cb(). -/// @see sensor_provider_set_stop_cb() -typedef sensor_provider_stop_cb - = ffi.Pointer>; -typedef sensor_provider_stop_cbFunction = ffi.Void Function( - sensor_provider_h provider, ffi.Pointer user_data); -typedef Dartsensor_provider_stop_cbFunction = void Function( - sensor_provider_h provider, ffi.Pointer user_data); - -/// @brief Called when the interval of the sensor provider is changed. -/// @since_tizen 4.0 -/// -/// @remarks @a provider is the object created with sensor_create_provider() -/// and is the object for which the callback was triggered. -/// -/// @param[in] provider The sensor provider handle -/// @param[in] interval_ms The interval -/// @param[in] user_data The user data to be passed to the callback function -/// -/// @pre A callback function needs to be set using sensor_provider_set_interval_changed_cb(). -/// @see sensor_provider_set_interval_changed_cb() -typedef sensor_provider_interval_changed_cb = ffi - .Pointer>; -typedef sensor_provider_interval_changed_cbFunction = ffi.Void Function( - sensor_provider_h provider, - ffi.UnsignedInt interval_ms, - ffi.Pointer user_data); -typedef Dartsensor_provider_interval_changed_cbFunction = void Function( - sensor_provider_h provider, - int interval_ms, - ffi.Pointer user_data); - -/// @brief Enumeration for option parameters for sensor recording. -/// @details None, one, or more option parameters can be set to #sensor_recorder_option_h, -/// then applications can request to record a specific sensor with the parameters via -/// sensor_recorder_start(). -/// If a parameter is not supported for the specified sensor type, it will be ignored. -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -abstract class sensor_recorder_option_e { - /// < Desired retention period for the recorded sensor data (hours); int; - static const int SENSOR_RECORDER_OPTION_RETENTION_PERIOD = 0; - - /// < Desired interval between data records (minutes); int; see #sensor_recorder_interval_e - static const int SENSOR_RECORDER_OPTION_INTERVAL = 1; -} - -/// @brief Enumeration for intervals between data records. -/// @details Some sensor types including #SENSOR_HRM may not fit to continuous monitoring and recording. -/// To reduce the battery use for recording such sensors, recording interval between each -/// sensor data is chosen. For example, an application set the interval of 1 hour, -/// the platform tries to retrieve the sensor data only once per hour, thus it will be more -/// battery efficient than to listen the sensor data continuously.@n -/// If the application does not set the interval explicitly, the default value is chosen. -/// The default values are differ from sensor to sensor. -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -/// @remarks If more than one applications set different intervals, the shortest value is chosen. -abstract class sensor_recorder_interval_e { - /// < 10 Minutes - static const int SENSOR_RECORDER_INTERVAL_10_MINUTES = 10; - - /// < 1 Hour - static const int SENSOR_RECORDER_INTERVAL_1_HOUR = 60; - - /// < 3 Hours - static const int SENSOR_RECORDER_INTERVAL_3_HOURS = 180; - - /// < 6 Hours - static const int SENSOR_RECORDER_INTERVAL_6_HOURS = 360; - - /// < 12 Hours - static const int SENSOR_RECORDER_INTERVAL_12_HOURS = 720; - - /// < 1 Day - static const int SENSOR_RECORDER_INTERVAL_1_DAY = 1440; -} - -/// @brief Enumeration for filtering and aggregation parameters for querying sensor records. -/// @details None, one, or more query parameters can be set to #sensor_recorder_query_h, -/// to specify the data to be retrieved via sensor_recorder_read(). -/// If a necessary parameter is not set, the default value is chosen. -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -abstract class sensor_recorder_query_e { - /// < Start time of the data to be queried (Epoch); time_t; If unspecified, 1 day ago - static const int SENSOR_RECORDER_QUERY_START_TIME = 0; - - /// < End time of the data to be queried (Epoch); time_t; If unspecified, the current time - static const int SENSOR_RECORDER_QUERY_END_TIME = 1; - - /// < The anchor time to slice the querying duration of time (Epoch); time_t; - /// It needs to be set with #SENSOR_RECORDER_QUERY_TIME_INTERVAL, otherwise, it is ignored - static const int SENSOR_RECORDER_QUERY_ANCHOR_TIME = 2; - - /// < The interval of each sliced querying duration (minutes); int - static const int SENSOR_RECORDER_QUERY_TIME_INTERVAL = 3; -} - -/// @brief Enumeration for data attributes can be contained in #sensor_recorder_data_h. -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -/// @see sensor_recorder_data_get_int() -/// @see sensor_recorder_data_get_double() -abstract class sensor_recorder_data_e { - /// < Count of both walking and running steps; int - /// @if WEARABLE (Since 3.0) @endif - static const int SENSOR_RECORDER_DATA_STEPS = 0; - - /// < Count of walking steps; int - /// @if WEARABLE (Since 3.0) @endif - static const int SENSOR_RECORDER_DATA_WALK_STEPS = 1; - - /// < Count of running steps; int - /// @if WEARABLE (Since 3.0) @endif - static const int SENSOR_RECORDER_DATA_RUN_STEPS = 2; - - /// < Distance walked or ran (m); double - /// @if WEARABLE (Since 3.0) @endif - static const int SENSOR_RECORDER_DATA_DISTANCE = 3; - - /// < Calorie burned (kcal); double - /// @if WEARABLE (Since 3.0) @endif - static const int SENSOR_RECORDER_DATA_CALORIE = 4; - - /// < Heart Rate (BPM); int - /// @if WEARABLE (Since 3.0) @endif - static const int SENSOR_RECORDER_DATA_HEART_RATE = 16; - - /// < Sleep state; int; One of #sensor_sleep_state_e - /// @if WEARABLE (Since 3.0) @endif - static const int SENSOR_RECORDER_DATA_SLEEP_STATE = 32; - - /// < Pressure; double - static const int SENSOR_RECORDER_DATA_PRESSURE = 48; - - /// < Max pressure; double - static const int SENSOR_RECORDER_DATA_MAX_PRESSURE = 49; - - /// < Min pressure; double - static const int SENSOR_RECORDER_DATA_MIN_PRESSURE = 50; - - /// < Average pressure; double - static const int SENSOR_RECORDER_DATA_AVERAGE_PRESSURE = 51; -} - -/// @brief Option handle to contain recording policies and parameters. -/// @details one or more sensor options can be created by using sensor_recorder_create_option(). -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -typedef sensor_recorder_option_h = ffi.Pointer; - -/// @brief Query handle to contain filtering and aggregation parameters for recorded data. -/// @details one or more sensor options can be created by using sensor_recorder_create_query(). -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -typedef sensor_recorder_query_h = ffi.Pointer; - -/// @brief Called when the query results are retrieved. -/// @details One of the following errors can be delivered.\n -/// #SENSOR_ERROR_NONE, Successful\n -/// #SENSOR_ERROR_OPERATION_FAILED, Operation failed\n -/// #SENSOR_ERROR_NO_DATA, No data retrieved. -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -/// -/// @param[in] type Sensor type -/// @param[in] data Retrieved data record -/// @param[in] remains Number of remaining records to be delivered -/// @param[in] error Error -/// @param[in] user_data The user data passed from sensor_recorder_read() or sensor_recorder_read_sync() -/// -/// @return If @c true, it continues to iterate to the next record; If @c false, the iteration stops -typedef sensor_recorder_data_cb - = ffi.Pointer>; -typedef sensor_recorder_data_cbFunction = ffi.Bool Function( - ffi.Int32 type, - sensor_recorder_data_h data, - ffi.Int remains, - ffi.Int32 error, - ffi.Pointer user_data); -typedef Dartsensor_recorder_data_cbFunction = bool Function( - int type, - sensor_recorder_data_h data, - int remains, - int error, - ffi.Pointer user_data); - -/// @brief Data handle to contain retrieved sensor records. -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -typedef sensor_recorder_data_h = ffi.Pointer; - -/// @brief Enumeration of the axis used in sensor_util_remap_coordinate_system(). -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sensor_util_axis_e { - /// < -X - static const int SENSOR_UTIL_AXIS_MINUS_X = 0; - - /// < -Y - static const int SENSOR_UTIL_AXIS_MINUS_Y = 1; - - /// < -Z - static const int SENSOR_UTIL_AXIS_MINUS_Z = 2; - - /// < +X - static const int SENSOR_UTIL_AXIS_X = 3; - - /// < +Y - static const int SENSOR_UTIL_AXIS_Y = 4; - - /// < +Z - static const int SENSOR_UTIL_AXIS_Z = 5; - static const int sensor_util_axis_minus_x = 0; - static const int sensor_util_axis_minus_y = 1; - static const int sensor_util_axis_minus_z = 2; - static const int sensor_util_axis_x = 3; - static const int sensor_util_axis_y = 4; - static const int sensor_util_axis_z = 5; -} - -/// @brief Enumeration for Storage of error codes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class storage_error_e { - /// < Successful - static const int STORAGE_ERROR_NONE = 0; - - /// < Invalid parameter - static const int STORAGE_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int STORAGE_ERROR_OUT_OF_MEMORY = -12; - - /// < Storage not supported - static const int STORAGE_ERROR_NOT_SUPPORTED = -6; - - /// < Operation failed - static const int STORAGE_ERROR_OPERATION_FAILED = -131054; -} - -/// @brief Enumeration for the storage types. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class storage_type_e { - /// < Internal device storage (built-in storage in a device, non-removable) - static const int STORAGE_TYPE_INTERNAL = 0; - - /// < External storage - static const int STORAGE_TYPE_EXTERNAL = 1; - - /// < Extended internal storage (External storage used as internal storage) (Since 4.0) - static const int STORAGE_TYPE_EXTENDED_INTERNAL = 2; -} - -/// @brief Enumeration for storage devices state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class storage_state_e { - /// < Storage is present but cannot be mounted. Typically it happens if the file system of the storage is corrupted - static const int STORAGE_STATE_UNMOUNTABLE = -2; - - /// < Storage is not present - static const int STORAGE_STATE_REMOVED = -1; - - /// < Storage is present and mounted with read/write access - static const int STORAGE_STATE_MOUNTED = 0; - - /// < Storage is present and mounted with read only access - static const int STORAGE_STATE_MOUNTED_READ_ONLY = 1; -} - -/// @brief Called to get information once for each supported storage. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] storage_id The unique storage ID -/// @param[in] type The type of the storage -/// @param[in] state The current state of the storage -/// @param[in] path The absolute path to the root directory of the storage -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// @pre storage_foreach_device_supported() will invoke this callback function. -/// @see storage_foreach_device_supported() -typedef storage_device_supported_cb - = ffi.Pointer>; -typedef storage_device_supported_cbFunction = ffi.Bool Function( - ffi.Int storage_id, - ffi.Int32 type, - ffi.Int32 state, - ffi.Pointer path, - ffi.Pointer user_data); -typedef Dartstorage_device_supported_cbFunction = bool Function( - int storage_id, - int type, - int state, - ffi.Pointer path, - ffi.Pointer user_data); - -/// @brief Enumeration for the storage directory types. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class storage_directory_e { - /// < Image directory - static const int STORAGE_DIRECTORY_IMAGES = 0; - - /// < Sounds directory - static const int STORAGE_DIRECTORY_SOUNDS = 1; - - /// < Videos directory - static const int STORAGE_DIRECTORY_VIDEOS = 2; - - /// < Camera directory - static const int STORAGE_DIRECTORY_CAMERA = 3; - - /// < Downloads directory - static const int STORAGE_DIRECTORY_DOWNLOADS = 4; - - /// < Music directory - static const int STORAGE_DIRECTORY_MUSIC = 5; - - /// < Documents directory - static const int STORAGE_DIRECTORY_DOCUMENTS = 6; - - /// < Others directory - static const int STORAGE_DIRECTORY_OTHERS = 7; - - /// < System ringtones directory. Only available for internal storage. - static const int STORAGE_DIRECTORY_SYSTEM_RINGTONES = 8; - static const int STORAGE_DIRECTORY_MAX = 9; -} - -/// @brief Called when the state of storage changes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] storage_id The unique storage ID -/// @param[in] state The current state of the storage -/// @param[in] user_data The user data passed from the foreach function -/// @pre storage_set_state_changed_cb() will invoke this callback function. -/// @see storage_set_state_changed_cb() -/// @see storage_unset_state_changed_cb() -typedef storage_state_changed_cb - = ffi.Pointer>; -typedef storage_state_changed_cbFunction = ffi.Void Function( - ffi.Int storage_id, ffi.Int32 state, ffi.Pointer user_data); -typedef Dartstorage_state_changed_cbFunction = void Function( - int storage_id, int state, ffi.Pointer user_data); - -/// @brief Enumeration for storage device types. -/// @since_tizen 3.0 -abstract class storage_dev_e { - /// < SD card device (external storage) - static const int STORAGE_DEV_EXT_SDCARD = 1001; - - /// < USB storage device (external storage) - static const int STORAGE_DEV_EXT_USB_MASS_STORAGE = 1002; - - /// < Extended internal storage device (External storage used as internal storage) (Since 4.0) - static const int STORAGE_DEV_EXTENDED_INTERNAL = 1003; -} - -/// @brief Called when the state of a storage type changes. -/// @since_tizen 3.0 -/// @param[in] storage_id The unique storage ID -/// @param[in] dev The type of the external storage device -/// @param[in] state The state of the storage -/// @param[in] fstype The type of the file system -/// @param[in] fsuuid The uuid of the file system -/// @param[in] mountpath The mount path of the file system -/// @param[in] primary The primary partition -/// @param[in] flags The flags for the storage status -/// @param[in] user_data The user data -/// @pre storage_set_changed_cb() will invoke this callback function. -/// @see storage_set_changed_cb() -/// @see storage_unset_changed_cb() -typedef storage_changed_cb - = ffi.Pointer>; -typedef storage_changed_cbFunction = ffi.Void Function( - ffi.Int storage_id, - ffi.Int32 dev, - ffi.Int32 state, - ffi.Pointer fstype, - ffi.Pointer fsuuid, - ffi.Pointer mountpath, - ffi.Bool primary, - ffi.Int flags, - ffi.Pointer user_data); -typedef Dartstorage_changed_cbFunction = void Function( - int storage_id, - int dev, - int state, - ffi.Pointer fstype, - ffi.Pointer fsuuid, - ffi.Pointer mountpath, - bool primary, - int flags, - ffi.Pointer user_data); - -final class statvfs extends ffi.Struct { - @ffi.UnsignedLong() - external int f_bsize; - - @ffi.UnsignedLong() - external int f_frsize; - - @__fsblkcnt_t() - external int f_blocks; - - @__fsblkcnt_t() - external int f_bfree; - - @__fsblkcnt_t() - external int f_bavail; - - @__fsfilcnt_t() - external int f_files; - - @__fsfilcnt_t() - external int f_ffree; - - @__fsfilcnt_t() - external int f_favail; - - @ffi.UnsignedLong() - external int f_fsid; - - @ffi.Int() - external int __f_unused; - - @ffi.UnsignedLong() - external int f_flag; - - @ffi.UnsignedLong() - external int f_namemax; - - @ffi.Array.multi([6]) - external ffi.Array __f_spare; -} - -typedef __fsblkcnt_t = ffi.UnsignedLong; -typedef Dart__fsblkcnt_t = int; -typedef __fsfilcnt_t = ffi.UnsignedLong; -typedef Dart__fsfilcnt_t = int; - -/// @brief Enumeration for system information error codes. -abstract class system_info_error_e { - /// < Successful - static const int SYSTEM_INFO_ERROR_NONE = 0; - - /// < Invalid parameter - static const int SYSTEM_INFO_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int SYSTEM_INFO_ERROR_OUT_OF_MEMORY = -12; - - /// < An input/output error occurred when reading value from system - static const int SYSTEM_INFO_ERROR_IO_ERROR = -5; - - /// < No permission to use the API - static const int SYSTEM_INFO_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported parameter (Since 3.0) - static const int SYSTEM_INFO_ERROR_NOT_SUPPORTED = -1073741822; -} - -/// @internal -/// @brief It is not decided if it should be opened to public. -abstract class system_info_type_e { - static const int SYSTEM_INFO_BOOL = 0; - static const int SYSTEM_INFO_INT = 1; - static const int SYSTEM_INFO_DOUBLE = 2; - static const int SYSTEM_INFO_STRING = 3; -} - -/// @internal -/// @brief Enumeration for system information key. -abstract class system_info_key_e { - /// < @internal The model of the device - static const int SYSTEM_INFO_KEY_MODEL = 0; - - /// < @internal The version of the Tizen API - static const int SYSTEM_INFO_KEY_TIZEN_VERSION = 1; - - /// < @internal The name of platform - static const int SYSTEM_INFO_KEY_PLATFORM_NAME = 2; - - /// < @internal The name of tizen version - static const int SYSTEM_INFO_KEY_TIZEN_VERSION_NAME = 3; - - /// < @internal The manufacturer of the device - static const int SYSTEM_INFO_KEY_MANUFACTURER = 4; - - /// < @internal The CORE CPU architecture of model - static const int SYSTEM_INFO_KEY_CORE_CPU_ARCH = 5; - - /// < @internal The CORE CPU frequency of model - static const int SYSTEM_INFO_KEY_CORE_CPU_FREQ = 6; - - /// < @internal The build string of platform binary - static const int SYSTEM_INFO_KEY_BUILD_STRING = 7; - - /// < @internal The build date of platform binary - static const int SYSTEM_INFO_KEY_BUILD_DATE = 8; - - /// < @internal The build time of platform binary - static const int SYSTEM_INFO_KEY_BUILD_TIME = 9; - - /// < @internal The height of the screen in pixels - static const int SYSTEM_INFO_KEY_SCREEN_HEIGHT = 10; - - /// < @internal The width of the screen in pixels - static const int SYSTEM_INFO_KEY_SCREEN_WIDTH = 11; - - /// < @internal The physical screen height in millimeters - static const int SYSTEM_INFO_KEY_PHYSICAL_SCREEN_HEIGHT = 12; - - /// < @internal The physical screen width in millimeters - static const int SYSTEM_INFO_KEY_PHYSICAL_SCREEN_WIDTH = 13; - - /// < @internal Indicates whether the device supports tethering - static const int SYSTEM_INFO_KEY_TETHERING_SUPPORTED = 14; -} - -/// @brief Enumeration for system settings error. -/// @since_tizen 2.3 -abstract class system_settings_error_e { - /// < Successful - static const int SYSTEM_SETTINGS_ERROR_NONE = 0; - - /// < Invalid parameter - static const int SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int SYSTEM_SETTINGS_ERROR_OUT_OF_MEMORY = -12; - - /// < Internal I/O error - static const int SYSTEM_SETTINGS_ERROR_IO_ERROR = -5; - - /// < Permission denied - static const int SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported @if MOBILE (Since 2.3.1) @endif - static const int SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Not supported @if MOBILE (Since 2.3.1) @endif - static const int SYSTEM_SETTINGS_ERROR_CALL_UNSUPPORTED_API = -1073741822; - - /// < Current lock screen app set 'password' type - static const int SYSTEM_SETTINGS_ERROR_LOCKSCREEN_APP_PASSWORD_MODE = - -38141951; -} - -/// @brief Enumeration for System Settings Key. -/// @since_tizen 2.3 -abstract class system_settings_key_e { - /// < (string) The file path of the current ringtone - static const int SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE = 0; - - /// < (string) The file path of the current home screen wallpaper - static const int SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN = 1; - - /// < (string) The file path of the current lock screen wallpaper - static const int SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN = 2; - - /// < (int) The current system font size - static const int SYSTEM_SETTINGS_KEY_FONT_SIZE = 3; - - /// < (string) The current system font type - static const int SYSTEM_SETTINGS_KEY_FONT_TYPE = 4; - - /// < (bool) Indicates whether the motion service is activated - static const int SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION = 5; - - /// < (string) The file path of the current email alert ringtone - static const int SYSTEM_SETTINGS_KEY_EMAIL_ALERT_RINGTONE = 6; - - /// < (bool) Indicates whether the USB debugging is enabled (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int SYSTEM_SETTINGS_KEY_USB_DEBUGGING_ENABLED = 7; - - /// < (bool) Indicates whether the 3G data network is enabled (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED = 8; - - /// < (string) Indicates lockscreen app pkg name - static const int SYSTEM_SETTINGS_KEY_LOCKSCREEN_APP = 10; - - /// < (string) The current system default font type (only support Get) - static const int SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE = 11; - - /// < (string) Indicates the current country setting in the _ syntax. The country setting is in the ISO 639-2 format, and the region setting is in the ISO 3166-1 alpha-2 format - static const int SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY = 12; - - /// < (string) Indicates the current language setting in the _ syntax. The language setting is in the ISO 639-2 format and the region setting is in the ISO 3166-1 alpha-2 format. - static const int SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE = 13; - - /// < (bool) Indicates whether the 24-hour clock is used. If the value is @c false, the 12-hour clock is used. - static const int SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR = 14; - - /// < (string) Indicates the current time zone. - static const int SYSTEM_SETTINGS_KEY_LOCALE_TIMEZONE = 15; - - /// < (int) Once System changes time, this event occurs to notify time change. - static const int SYSTEM_SETTINGS_KEY_TIME_CHANGED = 16; - - /// < GET (bool) Indicates whether the screen lock sound is enabled on the device. ex) LCD on/off sound - static const int SYSTEM_SETTINGS_KEY_SOUND_LOCK = 17; - - /// < GET (bool) Indicates whether the device is in the silent mode. - static const int SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE = 18; - - /// < GET (bool) Indicates whether the screen touch sound is enabled on the device. - static const int SYSTEM_SETTINGS_KEY_SOUND_TOUCH = 19; - - /// < GET (bool) Indicates whether rotation control is automatic. - static const int SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO = 20; - - /// < GET (string) Indicates device name. - static const int SYSTEM_SETTINGS_KEY_DEVICE_NAME = 21; - - /// < GET (bool) Indicates whether the device user has enabled the motion feature. - static const int SYSTEM_SETTINGS_KEY_MOTION_ENABLED = 22; - - /// < GET (bool) Indicates whether Wi-Fi-related notifications are enabled on the device. - static const int SYSTEM_SETTINGS_KEY_NETWORK_WIFI_NOTIFICATION = 23; - - /// < GET (bool) Indicates whether the device is in the flight mode. - static const int SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE = 24; - - /// < (int) Indicates the backlight time (in seconds). @internal The following values can be used: 15, 30, 60, 120, 300, and 600. - static const int SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME = 25; - - /// < (string) Indicates the file path of the current notification tone set by the user. - static const int SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION = 26; - - /// < (int) Indicates the time period for notification repetitions. - static const int SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION_REPETITION_PERIOD = - 27; - - /// < (int) Indicates the current lock state - static const int SYSTEM_SETTINGS_KEY_LOCK_STATE = 28; - - /// < (string) Indicates Ads ID for each device (Since 3.0) - static const int SYSTEM_SETTINGS_KEY_ADS_ID = 29; - - /// < (int) Indicates Ultra Data Save status, one of #system_settings_uds_state_e values (Since 4.0) - static const int SYSTEM_SETTINGS_KEY_ULTRA_DATA_SAVE = 30; - - /// < (string) Indicates Ultra Data Save Package List (Since 4.0), the list is a string containing whitelisted package names separated with semicolons (;) - static const int SYSTEM_SETTINGS_KEY_ULTRA_DATA_SAVE_PKG_LIST = 31; - - /// < GET (bool) Indicates whether the accessibility TTS is enabled on the device. (Since 4.0) - static const int SYSTEM_SETTINGS_KEY_ACCESSIBILITY_TTS = 32; - - /// < (bool) Indicates whether vibration is enabled on the device. (Since 4.0) - static const int SYSTEM_SETTINGS_KEY_VIBRATION = 33; - static const int SYSTEM_SETTINGS_KEY_MAX = 34; -} - -/// @brief Enumeration for Idle Lock State -/// @since_tizen 2.3.1 -abstract class system_settings_idle_lock_state_e { - /// < Device is unlocked - static const int SYSTEM_SETTINGS_LOCK_STATE_UNLOCK = 0; - - /// < Device is locked - static const int SYSTEM_SETTINGS_LOCK_STATE_LOCK = 1; - - /// < Device is being locked - static const int SYSTEM_SETTINGS_LOCK_STATE_LAUNCHING_LOCK = 2; -} - -/// @brief Enumeration for font size. -/// @since_tizen 2.3 -abstract class system_settings_font_size_e { - /// < A small size - static const int SYSTEM_SETTINGS_FONT_SIZE_SMALL = 0; - - /// < A normal size - static const int SYSTEM_SETTINGS_FONT_SIZE_NORMAL = 1; - - /// < A large size - static const int SYSTEM_SETTINGS_FONT_SIZE_LARGE = 2; - - /// < A huge size - static const int SYSTEM_SETTINGS_FONT_SIZE_HUGE = 3; - - /// < A giant size - static const int SYSTEM_SETTINGS_FONT_SIZE_GIANT = 4; -} - -/// @brief Enumeration for Ultra Data Save -/// @since_tizen 4.0 -abstract class system_settings_uds_state_e { - /// < OFF - static const int SYSTEM_SETTINGS_UDS_OFF = 0; - - /// < ON - static const int SYSTEM_SETTINGS_UDS_ON = 1; - - /// < UDS on and the app is whitelisted - static const int SYSTEM_SETTINGS_UDS_ON_WHITELISTED = 2; -} - -/// @brief Called when the system settings changes. -/// @since_tizen 2.3 -/// @param[in] key The key name of the system settings changed system settings -/// @param[in] user_data The user data passed from the callback registration function -/// @pre system_settings_set_changed_cb() will invoke this callback function. -/// @see system_settings_set_changed_cb() -/// @see system_settings_unset_changed_cb() -typedef system_settings_changed_cb - = ffi.Pointer>; -typedef system_settings_changed_cbFunction = ffi.Void Function( - ffi.Int32 key, ffi.Pointer user_data); -typedef Dartsystem_settings_changed_cbFunction = void Function( - int key, ffi.Pointer user_data); - -/// @platform -/// @brief Called to get each string value from string typed list. -/// @since_tizen 3.0 -/// @param[in] index zero based number indicating index of node in a list -/// @param[in] value value returned from the list -/// @param[in] cb_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, otherwise false to break out of the loop -typedef system_settings_iter_cb - = ffi.Pointer>; -typedef system_settings_iter_cbFunction = ffi.Bool Function( - ffi.Int index, ffi.Pointer value, ffi.Pointer cb_data); -typedef Dartsystem_settings_iter_cbFunction = bool Function( - int index, ffi.Pointer value, ffi.Pointer cb_data); - -/// @brief Enumeration for Trace Error. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif -abstract class trace_error_e { - /// < Successful - static const int TRACE_ERROR_NONE = 0; - - /// < I/O error - static const int TRACE_ERROR_IO_ERROR = -5; -} - -/// @ingroup CAPI_USB_HOST_ENDPOINT_MODULE -/// @brief Enumeration of an endpoint's direction. -/// @since_tizen 3.0 -abstract class usb_host_endpoint_direction_e { - /// < IN direction - static const int USB_HOST_DIRECTION_IN = 0; - - /// < OUT direction - static const int USB_HOST_DIRECTION_OUT = 1; -} - -/// @ingroup CAPI_USB_HOST_ENDPOINT_MODULE -/// @brief Enumeration of transfer type. -/// @since_tizen 3.0 -abstract class usb_host_transfer_type_e { - /// < Control transfer - static const int USB_HOST_TRANSFER_TYPE_CONTROL = 0; - - /// < Isochronous transfer - static const int USB_HOST_TRANSFER_TYPE_ISOCHRONOUS = 1; - - /// < Bulk transfer - static const int USB_HOST_TRANSFER_TYPE_BULK = 2; - - /// < Interrupt transfer - static const int USB_HOST_TRANSFER_TYPE_INTERRUPT = 3; -} - -/// @ingroup CAPI_USB_HOST_ENDPOINT_MODULE -/// @brief Enumeration of isochronous endpoint's synchronization type. -/// @since_tizen 3.0 -abstract class usb_host_iso_sync_type_e { - /// < No synchronization - static const int USB_HOST_ISO_SYNC_TYPE_NONE = 0; - - /// < Asynchronous - static const int USB_HOST_ISO_SYNC_TYPE_ASYNC = 1; - - /// < Adaptive - static const int USB_HOST_ISO_SYNC_TYPE_ADAPTIVE = 2; - - /// < Synchronous - static const int USB_HOST_ISO_SYNC_TYPE_SYNC = 3; -} - -/// @ingroup CAPI_USB_HOST_ENDPOINT_MODULE -/// @brief Enumeration of an endpoint's usage type. -/// @since_tizen 3.0 -abstract class usb_host_usage_type_e { - /// < Data endpoint - static const int USB_HOST_USAGE_TYPE_DATA = 0; - - /// < Feedback endpoint - static const int USB_HOST_USAGE_TYPE_FEEDBACK = 1; - - /// < Implicit feedback Data endpoint - static const int USB_HOST_USAGE_TYPE_IMPLICIT = 2; -} - -/// @ingroup CAPI_USB_HOST_MODULE -/// @brief Enumeration of error codes reported by USB host API. -/// @since_tizen 3.0 -abstract class usb_host_error_e { - /// < Successful - static const int USB_HOST_ERROR_NONE = 0; - - /// < I/O error - static const int USB_HOST_ERROR_IO_ERROR = -5; - - /// < Invalid parameter - static const int USB_HOST_ERROR_INVALID_PARAMETER = -22; - - /// < Permission denied - static const int USB_HOST_ERROR_PERMISSION_DENIED = -13; - - /// < No device - static const int USB_HOST_ERROR_NO_SUCH_DEVICE = -6; - - /// < Entity not found - static const int USB_HOST_ERROR_NOT_FOUND = -38469631; - - /// < Resource busy - static const int USB_HOST_ERROR_RESOURCE_BUSY = -16; - - /// < Operation timed out - static const int USB_HOST_ERROR_TIMED_OUT = -1073741823; - - /// < Overflow - static const int USB_HOST_ERROR_OVERFLOW = -38469630; - - /// < Device is not opened - static const int USB_HOST_ERROR_DEVICE_NOT_OPENED = -38469629; - - /// < Pipe error - static const int USB_HOST_ERROR_BROKEN_PIPE = -32; - - /// < System call interrupted - static const int USB_HOST_ERROR_INTERRUPTED_SYS_CALL = -4; - - /// < Insufficient memory - static const int USB_HOST_ERROR_OUT_OF_MEMORY = -12; - - /// < Operation not supported - static const int USB_HOST_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Other error - static const int USB_HOST_ERROR_UNKNOWN = -1073741824; -} - -/// @ingroup CAPI_USB_HOST_HOTPLUG_MODULE -/// @brief Enumeration of hotplug event types. -/// @since_tizen 4.0 -abstract class usb_host_hotplug_event_e { - /// < Device was connected - static const int USB_HOST_HOTPLUG_EVENT_ATTACH = 0; - - /// < Device was disconnected - static const int USB_HOST_HOTPLUG_EVENT_DETACH = 1; - - /// < Any event - static const int USB_HOST_HOTPLUG_EVENT_ANY = 2; -} - -final class usb_host_context_s extends ffi.Opaque {} - -final class usb_host_device_s extends ffi.Opaque {} - -final class usb_host_config_s extends ffi.Opaque {} - -final class usb_host_interface_s extends ffi.Opaque {} - -final class usb_host_endpoint_s extends ffi.Opaque {} - -final class usb_host_hotplug_s extends ffi.Opaque {} - -/// @ingroup CAPI_USB_HOST_MODULE -/// @brief Context handle to USB host. -/// @details This structure represents usb_host session. -/// Using own session allows to use this API independently. -/// For example calling usb_host_destroy() will not destroy resources -/// that are being used by another user of the library. -/// -/// To create session there is need to call usb_host_create(), -/// to destroy call usb_host_destroy(). Each session created by usb_host_create() -/// has to be destroyed using usb_host_destroy() -/// @since_tizen 3.0 -typedef usb_host_context_h = ffi.Pointer; - -/// @ingroup CAPI_USB_HOST_DEV_MODULE -/// @brief Structure representing USB device. -/// @details This structure represents USB device found on USB bus. -/// -/// This can be obtained by usb_host_get_device_list() or usb_host_device_open_with_vid_pidi(). -/// Some basic operations can be performed on closed device obtained by usb_host_device_list(). -/// To perform any I/O operations the device must be opened by calling usb_host_device_open() -/// or usb_host_device_open_with_vid_pid(). -/// -/// @since_tizen 3.0 -typedef usb_host_device_h = ffi.Pointer; - -/// @ingroup CAPI_USB_HOST_CONFIG_MODULE -/// @brief USB config handle. -/// @details This type represents USB device configuration. Device can have multiple configurations, -/// a configuration can have multiple interfaces. This handle can be obtained by -/// usb_host_device_get_config(). -/// @since_tizen 3.0 -typedef usb_host_config_h = ffi.Pointer; - -/// @ingroup CAPI_USB_HOST_INTERFACE_MODULE -/// @brief USB interface handle. -/// @details This type represents USB interface. An interface is a part of configuration and -/// can have multiple endpoints. This handle can be obtained by usb_host_config_get_interface(). -/// @since_tizen 3.0 -typedef usb_host_interface_h = ffi.Pointer; - -/// @ingroup CAPI_USB_HOST_ENDPOINT_MODULE -/// @brief USB endpoint handle. -/// @details This type represents USB endpoint. This handle can be obtained by -/// usb_host_interface_get_endpoint(). -/// @since_tizen 3.0 -typedef usb_host_endpoint_h = ffi.Pointer; - -/// @ingroup CAPI_USB_HOST_HOTPLUG_MODULE -/// @brief Device connected/disconnected event handler. -/// @details The device handle should be unreffed with usb_host_unref_device() -/// when no longer needed. -/// @since_tizen 4.0 -/// @param[in] dev Device which was connected/disconnected -/// @param[in] user_data User data pointer passed on callback registration -typedef usb_host_hotplug_cb - = ffi.Pointer>; -typedef usb_host_hotplug_cbFunction = ffi.Void Function( - usb_host_device_h dev, ffi.Pointer user_data); -typedef Dartusb_host_hotplug_cbFunction = void Function( - usb_host_device_h dev, ffi.Pointer user_data); - -/// @ingroup CAPI_USB_HOST_HOTPLUG_MODULE -/// @brief USB hotplug callback handle. -/// @details This handle is used for managing registered hotplug callbacks. -/// @since_tizen 4.0 -typedef usb_host_hotplug_h = ffi.Pointer; - -final class telephony_data extends ffi.Opaque {} - -/// @brief The structure type for the list of handles to use the Telephony API. -/// @remarks There are two handles in case of dual SIM device. \n -/// In this case, handle[0] means Primary SIM and handle[1] means Secondary SIM. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -final class telephony_handle_list_s extends ffi.Struct { - /// < Number of available handle - @ffi.UnsignedInt() - external int count; - - /// < Handle to use Telephony API - external ffi.Pointer handle; -} - -/// @brief The Telephony API handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef telephony_h = ffi.Pointer; - -/// @brief Enumeration for Telephony error. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class telephony_error_e { - /// < Successful - static const int TELEPHONY_ERROR_NONE = 0; - - /// < Out of memory - static const int TELEPHONY_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int TELEPHONY_ERROR_INVALID_PARAMETER = -22; - - /// < Permission denied - static const int TELEPHONY_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int TELEPHONY_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Operation failed - static const int TELEPHONY_ERROR_OPERATION_FAILED = -39845887; - - /// < SIM is not available - static const int TELEPHONY_ERROR_SIM_NOT_AVAILABLE = -39841791; -} - -/// @brief Enumeration for Telephony notification. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class telephony_noti_e { - /// < Notification to be invoked when the SIM card state changes. @n - /// '#telephony_sim_state_e' will be delivered in notification data @n - /// Privilege : http://tizen.org/privilege/telephony - static const int TELEPHONY_NOTI_SIM_STATUS = 16; - - /// < Notification to be invoked when the SIM call forwarding indicator state changes. @n - /// 'state(bool)' will be delivered in notification data (@b Since: 3.0) @n - /// Privilege : http://tizen.org/privilege/telephony - static const int TELEPHONY_NOTI_SIM_CALL_FORWARDING_INDICATOR_STATE = 17; - - /// < Notification to be invoked when the network service state changes. @n - /// '#telephony_network_service_state_e' will be delivered in notification data @n - /// Privilege : http://tizen.org/privilege/telephony - static const int TELEPHONY_NOTI_NETWORK_SERVICE_STATE = 32; - - /// < Notification to be invoked when the cell ID changes. @n - /// 'cell_id(int)' will be delivered in notification data @n - /// Privilege : http://tizen.org/privilege/location.coarse (@b Since: 3.0) @n - /// http://tizen.org/privilege/telephony privilege is no longer required since 3.0. - static const int TELEPHONY_NOTI_NETWORK_CELLID = 33; - - /// < Notification to be invoked when the roaming status changes. @n - /// 'roaming_status(bool)' will be delivered in notification data @n - /// Privilege : http://tizen.org/privilege/telephony - static const int TELEPHONY_NOTI_NETWORK_ROAMING_STATUS = 34; - - /// < Notification to be invoked when the signal strength changes. @n - /// '#telephony_network_rssi_e' will be delivered in notification data @n - /// Privilege : http://tizen.org/privilege/telephony - static const int TELEPHONY_NOTI_NETWORK_SIGNALSTRENGTH_LEVEL = 35; - - /// < Notification to be invoked when the network name changes. @n - /// 'network_name(char *)' wil be delivered in notification data (@b Since: @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) @n - /// Privilege : http://tizen.org/privilege/telephony - static const int TELEPHONY_NOTI_NETWORK_NETWORK_NAME = 36; - - /// < Notification to be invoked when the ps type changes. @n - /// '#telephony_network_ps_type_e' will be delivered in notification data (@b Since: @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) @n - /// Privilege : http://tizen.org/privilege/telephony - static const int TELEPHONY_NOTI_NETWORK_PS_TYPE = 37; - - /// < Notification to be invoked when the default data subscription changes. @n - /// '#telephony_network_default_data_subs_e' wil be delivered in notification data (@b Since: @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) @n - /// Privilege : http://tizen.org/privilege/telephony - static const int TELEPHONY_NOTI_NETWORK_DEFAULT_DATA_SUBSCRIPTION = 38; - - /// < Notification to be invoked when the default subscription changes. @n - /// '#telephony_network_default_subs_e' will be delivered in notification data (@b Since: @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) @n - /// Privilege : http://tizen.org/privilege/telephony - static const int TELEPHONY_NOTI_NETWORK_DEFAULT_SUBSCRIPTION = 39; - - /// < Notification to be invoked when the LAC (Location Area Code) changes. @n - /// 'lac(int)' will be delivered in notification data (@b Since: 3.0) @n - /// Privilege : http://tizen.org/privilege/location.coarse - static const int TELEPHONY_NOTI_NETWORK_LAC = 40; - - /// < Notification to be invoked when the TAC (Tracking Area Code) changes. @n - /// 'tac(int)' will be delivered in notification data (@b Since: 3.0) @n - /// Privilege : http://tizen.org/privilege/location.coarse - static const int TELEPHONY_NOTI_NETWORK_TAC = 41; - - /// < Notification to be invoked when the system ID changes. @n - /// 'sid(int)' will be delivered in notification data (@b Since: 3.0) @n - /// Privilege : http://tizen.org/privilege/location.coarse - static const int TELEPHONY_NOTI_NETWORK_SYSTEM_ID = 42; - - /// < Notification to be invoked when the network ID changes. @n - /// 'nid(int)' will be delivered in notification data (@b Since: 3.0) @n - /// Privilege : http://tizen.org/privilege/location.coarse - static const int TELEPHONY_NOTI_NETWORK_NETWORK_ID = 43; - - /// < Notification to be invoked when the base station ID changes. @n - /// 'bs_id(int)' will be delivered in notification data (@b Since: 3.0) @n - /// Privilege : http://tizen.org/privilege/location.coarse - static const int TELEPHONY_NOTI_NETWORK_BS_ID = 44; - - /// < Notification to be invoked when the base station latitude changes. @n - /// 'bs_latitude(int)' will be delivered in notification data (@b Since: 3.0) @n - /// Privilege : http://tizen.org/privilege/location.coarse - static const int TELEPHONY_NOTI_NETWORK_BS_LATITUDE = 45; - - /// < Notification to be invoked when the base station longitude changes. @n - /// 'bs_longitue(int)' will be delivered in notification data (@b Since: 3.0) @n - /// Privilege : http://tizen.org/privilege/location.coarse - static const int TELEPHONY_NOTI_NETWORK_BS_LONGITUDE = 46; - - /// < Notification to be invoked when the voice call state changes. @n - /// '#telephony_call_state_e' will be delivered in notification data (Deprecated Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. Use TELEPHONY_NOTI_VOICE_CALL_STATUS_XXX instead.) @n - /// Privilege : http://tizen.org/privilege/telephony - static const int TELEPHONY_NOTI_VOICE_CALL_STATE = 48; - - /// < Notification to be invoked when the video call state changes. @n - /// '#telephony_call_state_e' will be delivered in notification data (Deprecated Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. Use TELEPHONY_NOTI_VIDEO_CALL_STATUS_XXX instead.) @n - /// Privilege : http://tizen.org/privilege/telephony - static const int TELEPHONY_NOTI_VIDEO_CALL_STATE = 49; - - /// < Notification to be invoked when a voice call is in idle status. @n - /// 'handle_id(unsigned int)' will be delivered in notification data (@b Since: @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) @n - /// Privilege : http://tizen.org/privilege/telephony - static const int TELEPHONY_NOTI_VOICE_CALL_STATUS_IDLE = 50; - - /// < Notification to be invoked when a voice call is in active status. @n - /// 'handle_id(unsigned int)' will be delivered in notification data (@b Since: @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) @n - /// Privilege : http://tizen.org/privilege/telephony - static const int TELEPHONY_NOTI_VOICE_CALL_STATUS_ACTIVE = 51; - - /// < Notification to be invoked when a voice call is in held status. @n - /// 'handle_id(unsigned int)' will be delivered in notification data (@b Since: @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) @n - /// Privilege : http://tizen.org/privilege/telephony - static const int TELEPHONY_NOTI_VOICE_CALL_STATUS_HELD = 52; - - /// < Notification to be invoked when a voice call is in dialing status. @n - /// 'handle_id(unsigned int)' will be delivered in notification data (@b Since: @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) @n - /// Privilege : http://tizen.org/privilege/telephony - static const int TELEPHONY_NOTI_VOICE_CALL_STATUS_DIALING = 53; - - /// < Notification to be invoked when a voice call is in alertingstatus. @n - /// 'handle_id(unsigned int)' will be delivered in notification data (@b Since: @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) @n - /// Privilege : http://tizen.org/privilege/telephony - static const int TELEPHONY_NOTI_VOICE_CALL_STATUS_ALERTING = 54; - - /// < Notification to be invoked when a voice call is in incoming status. @n - /// 'handle_id(unsigned int)' will be delivered in notification data (@b Since: @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) @n - /// Privilege : http://tizen.org/privilege/telephony - static const int TELEPHONY_NOTI_VOICE_CALL_STATUS_INCOMING = 55; - - /// < Notification to be invoked when a video call is in idle status. @n - /// 'handle_id(unsigned int)' will be delivered in notification data (@b Since: @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) @n - /// Privilege : http://tizen.org/privilege/telephony - static const int TELEPHONY_NOTI_VIDEO_CALL_STATUS_IDLE = 56; - - /// < Notification to be invoked when a video call is in active status. @n - /// 'handle_id(unsigned int)' will be delivered in notification data (@b Since: @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) @n - /// Privilege : http://tizen.org/privilege/telephony - static const int TELEPHONY_NOTI_VIDEO_CALL_STATUS_ACTIVE = 57; - - /// < Notification to be invoked when a video call is in dialing status. @n - /// 'handle_id(unsigned int)' will be delivered in notification data (@b Since: @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) @n - /// Privilege : http://tizen.org/privilege/telephony - static const int TELEPHONY_NOTI_VIDEO_CALL_STATUS_DIALING = 58; - - /// < Notification to be invoked when a video call is in alerting status. @n - /// 'handle_id(unsigned int)' will be delivered in notification data (@b Since: @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) @n - /// Privilege : http://tizen.org/privilege/telephony - static const int TELEPHONY_NOTI_VIDEO_CALL_STATUS_ALERTING = 59; - - /// < Notification to be invoked when a video call is in incoming status. @n - /// 'handle_id(unsigned int)' will be delivered in notification data (@b Since: @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) @n - /// Privilege : http://tizen.org/privilege/telephony - static const int TELEPHONY_NOTI_VIDEO_CALL_STATUS_INCOMING = 60; - - /// < Notification to be invoked when the preferred voice subscription changes. @n - /// '#telephony_call_preferred_voice_subs_e' will be delivered in notification data (@b Since: @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) @n - /// Privilege : http://tizen.org/privilege/telephony - static const int TELEPHONY_NOTI_CALL_PREFERRED_VOICE_SUBSCRIPTION = 61; - - /// < Notification to be invoked when the modem power status changes. @n - /// '#telephony_modem_power_status_e' will be delivered in notification data (@b Since: 4.0) @n - /// Privilege : http://tizen.org/privilege/telephony - static const int TELEPHONY_NOTI_MODEM_POWER_STATUS = 62; -} - -/// @brief Called when the telephony state changes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef telephony_noti_cb - = ffi.Pointer>; -typedef telephony_noti_cbFunction = ffi.Void Function( - telephony_h handle, - ffi.Int32 noti_id, - ffi.Pointer data, - ffi.Pointer user_data); -typedef Darttelephony_noti_cbFunction = void Function(telephony_h handle, - int noti_id, ffi.Pointer data, ffi.Pointer user_data); - -/// @brief Enumeration for the telephony state. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class telephony_state_e { - /// < Telephony state is not ready - static const int TELEPHONY_STATE_NOT_READY = 0; - - /// < Telephony state is ready - static const int TELEPHONY_STATE_READY = 1; -} - -/// @brief Called for the telephony state changes. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -typedef telephony_state_changed_cb - = ffi.Pointer>; -typedef telephony_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 state, ffi.Pointer user_data); -typedef Darttelephony_state_changed_cbFunction = void Function( - int state, ffi.Pointer user_data); - -final class telephony_call_info_s extends ffi.Opaque {} - -/// @deprecated Deprecated Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. Use #telephony_call_status_e instead. -/// -/// @brief Enumeration for the call state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class telephony_call_state_e { - /// < There exists no calls. - static const int TELEPHONY_CALL_STATE_IDLE = 0; - - /// < There exists at least one call that is dialing, alerting or incoming - static const int TELEPHONY_CALL_STATE_CONNECTING = 1; - - /// < There exist active or held calls, and no calls are dialing, alerting or incoming - static const int TELEPHONY_CALL_STATE_CONNECTED = 2; -} - -/// @brief Enumeration for the call status. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class telephony_call_status_e { - /// < Idle status - static const int TELEPHONY_CALL_STATUS_IDLE = 0; - - /// < Active status - static const int TELEPHONY_CALL_STATUS_ACTIVE = 1; - - /// < Held status - static const int TELEPHONY_CALL_STATUS_HELD = 2; - - /// < Dialing status - static const int TELEPHONY_CALL_STATUS_DIALING = 3; - - /// < Alerting status - static const int TELEPHONY_CALL_STATUS_ALERTING = 4; - - /// < Incoming status - static const int TELEPHONY_CALL_STATUS_INCOMING = 5; -} - -/// @brief Enumeration for the preferred voice call subscription. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class telephony_call_preferred_voice_subs_e { - /// < Unknown status - static const int TELEPHONY_CALL_PREFERRED_VOICE_SUBS_UNKNOWN = -1; - - /// < Current network - static const int TELEPHONY_CALL_PREFERRED_VOICE_SUBS_CURRENT_NETWORK = 0; - - /// < ASK Always - static const int TELEPHONY_CALL_PREFERRED_VOICE_SUBS_ASK_ALWAYS = 1; - - /// < SIM 1 - static const int TELEPHONY_CALL_PREFERRED_VOICE_SUBS_SIM1 = 2; - - /// < SIM 2 - static const int TELEPHONY_CALL_PREFERRED_VOICE_SUBS_SIM2 = 3; -} - -/// @brief Enumeration for the call type. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class telephony_call_type_e { - /// < Voice call - static const int TELEPHONY_CALL_TYPE_VOICE = 0; - - /// < Video call - static const int TELEPHONY_CALL_TYPE_VIDEO = 1; - - /// < Emergency call - static const int TELEPHONY_CALL_TYPE_E911 = 2; -} - -/// @brief Enumeration for the call direction. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class telephony_call_direction_e { - /// < MO(Mobile Originated) call - static const int TELEPHONY_CALL_DIRECTION_MO = 0; - - /// < MT(Mobile Terminated) call - static const int TELEPHONY_CALL_DIRECTION_MT = 1; -} - -/// @brief The call handle. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -typedef telephony_call_h = ffi.Pointer; - -/// @brief Enumeration for the state of SIM card. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class telephony_sim_state_e { - /// < SIM is not available on this device - static const int TELEPHONY_SIM_STATE_UNAVAILABLE = 0; - - /// < SIM is locked - static const int TELEPHONY_SIM_STATE_LOCKED = 1; - - /// < SIM is available on this device (SIM is not locked) - static const int TELEPHONY_SIM_STATE_AVAILABLE = 2; - - /// < SIM is in transition between states - static const int TELEPHONY_SIM_STATE_UNKNOWN = 3; -} - -/// @brief Enumeration for the lock state of SIM card. -/// @since_tizen 3.0 -abstract class telephony_sim_lock_state_e { - /// < SIM is not in lock - static const int TELEPHONY_SIM_LOCK_STATE_UNKNOWN = 0; - - /// < SIM is PIN(Personal Identification Number) locked - static const int TELEPHONY_SIM_LOCK_STATE_PIN_REQUIRED = 1; - - /// < SIM is PUK(Personal Unblocking Code) locked - static const int TELEPHONY_SIM_LOCK_STATE_PUK_REQUIRED = 2; - - /// < SIM is permanently blocked(All the attempts for PIN/PUK failed) - static const int TELEPHONY_SIM_LOCK_STATE_PERM_LOCKED = 3; - - /// < SIM is NCK(Network Control Key) locked - static const int TELEPHONY_SIM_LOCK_STATE_NCK_REQUIRED = 4; -} - -/// @brief Enumeration for the type of SIM card. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class telephony_sim_application_type_e { - /// < SIM(GSM) Application - static const int TELEPHONY_SIM_APP_TYPE_SIM = 1; - - /// < USIM Application - static const int TELEPHONY_SIM_APP_TYPE_USIM = 2; - - /// < CDMA Application - static const int TELEPHONY_SIM_APP_TYPE_CSIM = 4; - - /// < ISIM Application - static const int TELEPHONY_SIM_APP_TYPE_ISIM = 8; -} - -/// @brief Enumeration for RSSI (Receive Signal Strength Indicator). -/// @details #TELEPHONY_NETWORK_RSSI_6 indicates the highest strength. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class telephony_network_rssi_e { - /// < Strength 0 - static const int TELEPHONY_NETWORK_RSSI_0 = 0; - - /// < Strength 1 - static const int TELEPHONY_NETWORK_RSSI_1 = 1; - - /// < Strength 2 - static const int TELEPHONY_NETWORK_RSSI_2 = 2; - - /// < Strength 3 - static const int TELEPHONY_NETWORK_RSSI_3 = 3; - - /// < Strength 4 - static const int TELEPHONY_NETWORK_RSSI_4 = 4; - - /// < Strength 5 - static const int TELEPHONY_NETWORK_RSSI_5 = 5; - - /// < Strength 6 - static const int TELEPHONY_NETWORK_RSSI_6 = 6; -} - -/// @brief Enumeration for Network Type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class telephony_network_type_e { - /// < Unknown - static const int TELEPHONY_NETWORK_TYPE_UNKNOWN = 0; - - /// < 2G GSM network type - static const int TELEPHONY_NETWORK_TYPE_GSM = 1; - - /// < 2.5G GPRS network type - static const int TELEPHONY_NETWORK_TYPE_GPRS = 2; - - /// < 2.5G EDGE network type - static const int TELEPHONY_NETWORK_TYPE_EDGE = 3; - - /// < 3G UMTS network type - static const int TELEPHONY_NETWORK_TYPE_UMTS = 4; - - /// < HSDPA network type - static const int TELEPHONY_NETWORK_TYPE_HSDPA = 5; - - /// < LTE network type - static const int TELEPHONY_NETWORK_TYPE_LTE = 6; - - /// < IS95A network type (Since: 3.0) - static const int TELEPHONY_NETWORK_TYPE_IS95A = 7; - - /// < IS95B network type (Since: 3.0) - static const int TELEPHONY_NETWORK_TYPE_IS95B = 8; - - /// < CDMA 1x network type (Since: 3.0) - static const int TELEPHONY_NETWORK_TYPE_CDMA_1X = 9; - - /// < EVDO revision 0 network type (Since: 3.0) - static const int TELEPHONY_NETWORK_TYPE_EVDO_REV_0 = 10; - - /// < EVDO revision A network type (Since: 3.0) - static const int TELEPHONY_NETWORK_TYPE_EVDO_REV_A = 11; - - /// < EVDO revision B network type (Since: 3.0) - static const int TELEPHONY_NETWORK_TYPE_EVDO_REV_B = 12; - - /// < EVDV network type (Since: 3.0) - static const int TELEPHONY_NETWORK_TYPE_EVDV = 13; - - /// < EHRPD network type (Since: 3.0) - static const int TELEPHONY_NETWORK_TYPE_EHRPD = 14; -} - -/// @brief Enumeration for PS Type. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class telephony_network_ps_type_e { - /// < Unknown - static const int TELEPHONY_NETWORK_PS_TYPE_UNKNOWN = 0; - - /// < HSDPA ps type - static const int TELEPHONY_NETWORK_PS_TYPE_HSDPA = 1; - - /// < HSUPA ps type - static const int TELEPHONY_NETWORK_PS_TYPE_HSUPA = 2; - - /// < HSPA ps type - static const int TELEPHONY_NETWORK_PS_TYPE_HSPA = 3; - - /// < HSPAP ps type - static const int TELEPHONY_NETWORK_PS_TYPE_HSPAP = 4; -} - -/// @brief Enumeration for Network Service State. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class telephony_network_service_state_e { - /// < In service - static const int TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE = 0; - - /// < Out of service - static const int TELEPHONY_NETWORK_SERVICE_STATE_OUT_OF_SERVICE = 1; - - /// < Only emergency call is allowed - static const int TELEPHONY_NETWORK_SERVICE_STATE_EMERGENCY_ONLY = 2; -} - -/// @brief Enumeration for Network Name Priority. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class telephony_network_name_option_e { - /// < Unknown - static const int TELEPHONY_NETWORK_NAME_OPTION_UNKNOWN = 0; - - /// < Network name displayed by SPN - static const int TELEPHONY_NETWORK_NAME_OPTION_SPN = 1; - - /// < Network name displayed by Network - static const int TELEPHONY_NETWORK_NAME_OPTION_NETWORK = 2; - - /// < Network name displayed by SPN or Network - static const int TELEPHONY_NETWORK_NAME_OPTION_ANY = 3; -} - -/// @brief Enumeration for the possible 'default' Data Subscriptions for Packet Switched(PS). -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class telephony_network_default_data_subs_e { - /// < Unknown status - static const int TELEPHONY_NETWORK_DEFAULT_DATA_SUBS_UNKNOWN = -1; - - /// < SIM 1 - static const int TELEPHONY_NETWORK_DEFAULT_DATA_SUBS_SIM1 = 0; - - /// < SIM 2 - static const int TELEPHONY_NETWORK_DEFAULT_DATA_SUBS_SIM2 = 1; -} - -/// @brief Enumeration for defining possible 'default' Subscriptions for Circuit Switched(CS). -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class telephony_network_default_subs_e { - /// < Unknown status - static const int TELEPHONY_NETWORK_DEFAULT_SUBS_UNKNOWN = -1; - - /// < SIM 1 network - static const int TELEPHONY_NETWORK_DEFAULT_SUBS_SIM1 = 0; - - /// < SIM 2 network - static const int TELEPHONY_NETWORK_DEFAULT_SUBS_SIM2 = 1; -} - -/// @brief Enumeration for network selection mode. -/// @since_tizen 3.0 -abstract class telephony_network_selection_mode_e { - /// < Automatic mode - static const int TELEPHONY_NETWORK_SELECTION_MODE_AUTOMATIC = 0; - - /// < Manual mode - static const int TELEPHONY_NETWORK_SELECTION_MODE_MANUAL = 1; -} - -/// @brief Enumeration for Modem Power Status. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class telephony_modem_power_status_e { - /// < Unknown - static const int TELEPHONY_MODEM_POWER_STATUS_UNKNOWN = -1; - - /// < Modem power ON - static const int TELEPHONY_MODEM_POWER_STATUS_ON = 0; - - /// < Modem power OFF - static const int TELEPHONY_MODEM_POWER_STATUS_OFF = 1; - - /// < Modem power RESET - static const int TELEPHONY_MODEM_POWER_STATUS_RESET = 2; - - /// < Modem power LOW - static const int TELEPHONY_MODEM_POWER_STATUS_LOW = 3; -} - -/// @brief Enumeration for Clipboard Data Type. -/// @since_tizen 3.0 -abstract class cbhm_sel_type_e { - static const int CBHM_SEL_TYPE_NONE = 0; - - /// Content is from outside of Elementary - static const int CBHM_SEL_TYPE_TEXT = 1; - - /// Plain unformatted text: Used for things that don't want rich markup - static const int CBHM_SEL_TYPE_MARKUP = 2; - - /// Edje textblock markup, including inline images - static const int CBHM_SEL_TYPE_IMAGE = 4; - - /// Images - static const int CBHM_SEL_TYPE_HTML = 8; -} - -/// @brief Enumeration for Clipboard State Type. -/// @since_tizen 3.0 -abstract class cbhm_state_type_e { - static const int CBHM_STATE_NONE = 0; - static const int CBHM_STATE_SHOW = 1; - static const int CBHM_STATE_HIDE = 2; -} - -/// @brief Enumeration for Clipboard Error Codes. -/// @since_tizen 3.0 -abstract class cbhm_error_e { - /// < Successful - static const int CBHM_ERROR_NONE = 0; - - /// < Out of memory - static const int CBHM_ERROR_OUT_OF_MEMORY = -12; - - /// < Not supported - static const int CBHM_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Invalid parameter - static const int CBHM_ERROR_INVALID_PARAMETER = -22; - - /// < No data available - static const int CBHM_ERROR_NO_DATA = -61; - - /// < Connection refused - static const int CBHM_ERROR_CONNECTION_REFUSED = -111; - - /// < Address already in use - static const int CBHM_ERROR_ADDRES_IN_USE = -98; -} - -final class cbhm extends ffi.Opaque {} - -/// @brief Clipboard handle. -/// @since_tizen 3.0 -typedef cbhm_h = ffi.Pointer; - -/// @brief Event callback signature of selecting a clipboard item. -/// @since_tizen 3.0 -/// @param[in] cbhm_handle Clipboard handle -/// @param[in] user_data User data to be passed to the given event callback function -/// @return This is reserved -/// @see cbhm_item_selected_callback_add() -typedef cbhm_selected_cb - = ffi.Pointer>; -typedef cbhm_selected_cbFunction = ffi.Int Function( - cbhm_h cbhm_handle, ffi.Pointer user_data); -typedef Dartcbhm_selected_cbFunction = int Function( - cbhm_h cbhm_handle, ffi.Pointer user_data); - -/// @brief Event callback signature of receiving data from clipboard. -/// @since_tizen 3.0 -/// @param[in] Clipboard handle -/// @param[out] buf Buffer for receiving data -/// @param[in] len The length of buffer -/// @param[in] user_data User data to be passed to the given event callback function -/// @return This is reserved -/// @see cbhm_item_selected_callback_add() -typedef cbhm_selection_data_cb - = ffi.Pointer>; -typedef cbhm_selection_data_cbFunction = ffi.Int Function(cbhm_h cbhm_handle, - ffi.Pointer buf, ffi.Size len, ffi.Pointer user_data); -typedef Dartcbhm_selection_data_cbFunction = int Function(cbhm_h cbhm_handle, - ffi.Pointer buf, int len, ffi.Pointer user_data); - -/// @brief Event callback signature for receiving changed event of clipboard items. -/// @since_tizen 4.0 -/// @param[in] cbhm_handle The clipboard handle -/// @remarks @a cbhm_handle is the same handle as the one used in the cbhm_item_changed_callback_add() call with which the callback was added -/// @param[in] item_count The number of clipboard items -/// @param[in] user_data User data to be passed to the given event callback function -/// @return #CBHM_ERROR_NONE on success, -/// otherwise a negative error value -/// @retval #CBHM_ERROR_NONE Successful -/// @see cbhm_item_selected_callback_add() -typedef cbhm_item_changed_cb - = ffi.Pointer>; -typedef cbhm_item_changed_cbFunction = ffi.Void Function( - cbhm_h cbhm_handle, ffi.Int item_count, ffi.Pointer user_data); -typedef Dartcbhm_item_changed_cbFunction = void Function( - cbhm_h cbhm_handle, int item_count, ffi.Pointer user_data); - -/// @brief Event callback signature of receiving monitored event of clipboard. -/// @since_tizen 4.0 -/// @param[in] cbhm_handle Clipboard handle -/// @param[in] active_state Clipboard is active if @c true, inactive otherwise -/// @param[in] user_data User data to be passed to the given event callback function -/// @see cbhm_monitor_callback_add() -/// @see cbhm_monitor_callback_remove() -typedef cbhm_monitor_cb - = ffi.Pointer>; -typedef cbhm_monitor_cbFunction = ffi.Void Function( - cbhm_h cbhm_handle, ffi.Bool active_state, ffi.Pointer user_data); -typedef Dartcbhm_monitor_cbFunction = void Function( - cbhm_h cbhm_handle, bool active_state, ffi.Pointer user_data); - -/// @brief Enumeration of External Output Manager (EOM) error type -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class eom_error_e { - /// < Success - static const int EOM_ERROR_NONE = 0; - - /// < Memory allocation failure - static const int EOM_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid input parameter - static const int EOM_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid external output instance - static const int EOM_ERROR_NO_SUCH_DEVICE = -6; - - /// < Connection failure - static const int EOM_ERROR_CONNECTION_FAILURE = -42205183; - - /// < Message sending failure - static const int EOM_ERROR_MESSAGE_SENDING_FAILURE = -42205182; - - /// < Message operation failure - static const int EOM_ERROR_MESSAGE_OPERATION_FAILURE = -42205181; -} - -/// @brief Enumeration of external output type -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class eom_output_type_e { - /// < Unknown output type - static const int EOM_OUTPUT_TYPE_UNKNOWN = 0; - - /// < VGA output - static const int EOM_OUTPUT_TYPE_VGA = 1; - - /// < DVII output type - static const int EOM_OUTPUT_TYPE_DVII = 2; - - /// < DVID output type - static const int EOM_OUTPUT_TYPE_DVID = 3; - - /// < DVIA output type - static const int EOM_OUTPUT_TYPE_DVIA = 4; - - /// < Composite output type - static const int EOM_OUTPUT_TYPE_COMPOSITE = 5; - - /// < SVIDEO output type - static const int EOM_OUTPUT_TYPE_SVIDEO = 6; - - /// < LVDS output type - static const int EOM_OUTPUT_TYPE_LVDS = 7; - - /// < Component output type - static const int EOM_OUTPUT_TYPE_COMPONENT = 8; - - /// < 9PinDIN output type - static const int EOM_OUTPUT_TYPE_9PINDIN = 9; - - /// < DisplayPort output type - static const int EOM_OUTPUT_TYPE_DISPLAYPORT = 10; - - /// < HDMIA output type - static const int EOM_OUTPUT_TYPE_HDMIA = 11; - - /// < HDMIB output type - static const int EOM_OUTPUT_TYPE_HDMIB = 12; - - /// < TV output type - static const int EOM_OUTPUT_TYPE_TV = 13; - - /// < EDP output type - static const int EOM_OUTPUT_TYPE_EDP = 14; - - /// < VIRTUAL output type - static const int EOM_OUTPUT_TYPE_VIRTUAL = 15; - - /// < DSI output type - static const int EOM_OUTPUT_TYPE_DSI = 16; - static const int EOM_OUTPUT_TYPE_MAX = 17; -} - -/// @brief Enumeration of external output mode -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class eom_output_mode_e { - /// < None - static const int EOM_OUTPUT_MODE_NONE = 0; - - /// < Mirror mode - static const int EOM_OUTPUT_MODE_MIRROR = 1; - - /// < Presentation mode - static const int EOM_OUTPUT_MODE_PRESENTATION = 2; - static const int EOM_OUTPUT_MODE_MAX = 3; -} - -/// @brief Enumeration of External Output Manager (EOM) attributes -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class eom_output_attribute_e { - /// < None - static const int EOM_OUTPUT_ATTRIBUTE_NONE = 0; - - /// < Normal presentation mode window showing on external output - static const int EOM_OUTPUT_ATTRIBUTE_NORMAL = 1; - - /// < Exclusive share presentation mode window showing on external output - static const int EOM_OUTPUT_ATTRIBUTE_EXCLUSIVE_SHARE = 2; - - /// < Exclusive presentation mode window showing on external output - static const int EOM_OUTPUT_ATTRIBUTE_EXCLUSIVE = 3; - static const int EOM_OUTPUT_ATTRIBUTE_MAX = 4; -} - -/// @brief Enumeration of External Output Manager (EOM) attribute state -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class eom_output_attribute_state_e { - /// < None - static const int EOM_OUTPUT_ATTRIBUTE_STATE_NONE = 0; - - /// < Output attribute is active - static const int EOM_OUTPUT_ATTRIBUTE_STATE_ACTIVE = 1; - - /// < Output attribute is inactive - static const int EOM_OUTPUT_ATTRIBUTE_STATE_INACTIVE = 2; - - /// < Cannot use external output - static const int EOM_OUTPUT_ATTRIBUTE_STATE_LOST = 3; - static const int EOM_OUTPUT_ATTRIBUTE_STATE_MAX = 4; -} - -/// @brief Called when External Output Manager (EOM) module sends output -/// connection notification. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] output_id The output id which is connected output -/// @param[in] user_data The pointer of user data which is passed to -/// eom_output_added_cb function -/// @see eom_set_output_added_cb() -/// @see eom_unset_output_added_cb() -typedef eom_output_added_cb - = ffi.Pointer>; -typedef eom_output_added_cbFunction = ffi.Void Function( - eom_output_id output_id, ffi.Pointer user_data); -typedef Darteom_output_added_cbFunction = void Function( - Darteom_output_id output_id, ffi.Pointer user_data); - -/// @brief Definition for external output ID -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -typedef eom_output_id = ffi.UnsignedInt; -typedef Darteom_output_id = int; - -/// @brief Called when External Output Manager (EOM) module sends output -/// disconnection notification. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] output_id The output id which is connected output -/// @param[in] user_data The pointer of user data which is passed to -/// eom_output_removed_cb function -/// @see eom_set_output_removed_cb() -/// @see eom_unset_output_removed_cb() -typedef eom_output_removed_cb - = ffi.Pointer>; -typedef eom_output_removed_cbFunction = ffi.Void Function( - eom_output_id output_id, ffi.Pointer user_data); -typedef Darteom_output_removed_cbFunction = void Function( - Darteom_output_id output_id, ffi.Pointer user_data); - -/// @brief Called when External Output Manager (EOM) module sends output -/// mode changing notification. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] output_id The output id which is connected output -/// @param[in] user_data The pointer of user data which is passed to -/// eom_mode_changed_cb function -/// @see eom_set_mode_changed_cb() -/// @see eom_unset_mode_changed_cb() -typedef eom_mode_changed_cb - = ffi.Pointer>; -typedef eom_mode_changed_cbFunction = ffi.Void Function( - eom_output_id output_id, ffi.Pointer user_data); -typedef Darteom_mode_changed_cbFunction = void Function( - Darteom_output_id output_id, ffi.Pointer user_data); - -/// @brief Called when External Output Manager (EOM) module sends output -/// attribute changing notification. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] output_id The output id which is connected output -/// @param[in] user_data The pointer of user data which is passed to -/// eom_attribute_changed_cb function -/// @see eom_set_attribute_changed_cb() -/// @see eom_unset_attribute_changed_cb() -typedef eom_attribute_changed_cb - = ffi.Pointer>; -typedef eom_attribute_changed_cbFunction = ffi.Void Function( - eom_output_id output_id, ffi.Pointer user_data); -typedef Darteom_attribute_changed_cbFunction = void Function( - Darteom_output_id output_id, ffi.Pointer user_data); - -/// @typedef Evas_Object -/// An Evas Object handle. -/// @ingroup Evas_Object_Group -typedef Evas_Object = Eo; - -/// @typedef Eo -/// The basic Object type. -typedef Eo = _Eo_Opaque; - -final class _Eo_Opaque extends ffi.Opaque {} - -/// @brief Enumeration for input method function error -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -abstract class ime_error_e { - /// < Successful - static const int IME_ERROR_NONE = 0; - - /// < Invalid parameter - static const int IME_ERROR_INVALID_PARAMETER = -22; - - /// < Permission denied - static const int IME_ERROR_PERMISSION_DENIED = -13; - - /// < Necessary callback function is not set - static const int IME_ERROR_NO_CALLBACK_FUNCTION = -49414143; - - /// < IME main loop isn't started yet - static const int IME_ERROR_NOT_RUNNING = -49414142; - - /// < Operation failed - static const int IME_ERROR_OPERATION_FAILED = -49414141; - - /// < out of memory - static const int IME_ERROR_OUT_OF_MEMORY = -12; -} - -/// @brief Enumeration of the option window type -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @see ime_option_window_created_cb() -abstract class ime_option_window_type_e { - /// < Open from Keyboard - static const int IME_OPTION_WINDOW_TYPE_KEYBOARD = 0; - - /// < Open from Setting application - static const int IME_OPTION_WINDOW_TYPE_SETTING_APPLICATION = 1; -} - -/// @brief Enumeration of layout variation -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @see ime_context_get_layout_variation() -abstract class ime_layout_variation_e { - /// < The plain normal layout - static const int IME_LAYOUT_NORMAL_VARIATION_NORMAL = 0; - - /// < Filename layout; symbols such as '/', '*', '\', '|', '<', '>', '?', '"' and ':' should be disabled - static const int IME_LAYOUT_NORMAL_VARIATION_FILENAME = 1; - - /// < The name of a person - static const int IME_LAYOUT_NORMAL_VARIATION_PERSON_NAME = 2; - - /// < The plain normal number layout - static const int IME_LAYOUT_NUMBERONLY_VARIATION_NORMAL = 0; - - /// < The number layout to allow a negative sign - static const int IME_LAYOUT_NUMBERONLY_VARIATION_SIGNED = 1; - - /// < The number layout to allow decimal point to provide fractional value - static const int IME_LAYOUT_NUMBERONLY_VARIATION_DECIMAL = 2; - - /// < The number layout to allow decimal point and negative sign - static const int IME_LAYOUT_NUMBERONLY_VARIATION_SIGNED_AND_DECIMAL = 3; - - /// < The normal password layout - static const int IME_LAYOUT_PASSWORD_VARIATION_NORMAL = 0; - - /// < The password layout to allow only number - static const int IME_LAYOUT_PASSWORD_VARIATION_NUMBERONLY = 1; -} - -/// @brief Enumeration of string attribute type -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @remarks Currently, a font style is available to use. -/// -/// @see ime_preedit_attribute() -/// @see ime_update_preedit_string() -abstract class ime_attribute_type { - /// < No attribute - static const int IME_ATTR_NONE = 0; - - /// < A font style attribute, e.g., underline, etc. - static const int IME_ATTR_FONTSTYLE = 1; -} - -/// @brief The structure type to contain the attributes for preedit string. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @remarks A preedit string may have one or more different attributes. This structure describes each attribute of the string. -/// -/// @see ime_update_preedit_string() -/// @see ime_attribute_type -final class ime_preedit_attribute extends ffi.Struct { - /// < The start position in the string of this attribute - @ffi.UnsignedInt() - external int start; - - /// < The character length of this attribute, the range is [start, start+length] - @ffi.UnsignedInt() - external int length; - - /// < The type of this attribute - @ffi.Int32() - external int type; - - /// < The value of this attribute - @ffi.UnsignedInt() - external int value; -} - -final class _ime_context extends ffi.Opaque {} - -final class _ime_device_info extends ffi.Opaque {} - -/// @brief The structure type to contain the set of the essential callback functions for IME application lifecycle and appearance. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @remarks These four callback functions are mandatory for IME application. -/// -/// @see ime_run() -final class ime_callback_s extends ffi.Struct { - /// < Called when the input panel is created - external ime_create_cb create; - - /// < Called when the input panel is terminated - external ime_terminate_cb terminate; - - /// < Called when the input panel is requested to show itself - external ime_show_cb show1; - - /// < Called when the input panel is requested to hide itself - external ime_hide_cb hide1; -} - -/// @brief Called when the input panel is created. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks This callback function is mandatory and must be registered using ime_run(). The -/// ime_get_main_window() can be used to get the created input panel window. -/// -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The ime_run() function calls this callback function. -/// -/// @see ime_run() -/// @see ime_set_size() -/// @see ime_get_main_window() -typedef ime_create_cb = ffi.Pointer>; -typedef ime_create_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartime_create_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Called when the input panel is terminated. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks This callback function is mandatory and must be registered using ime_run(). The -/// ime_get_main_window() can be used to get the created input panel window. -/// -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @see ime_run() -/// @see ime_get_main_window() -typedef ime_terminate_cb - = ffi.Pointer>; -typedef ime_terminate_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartime_terminate_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Called when an associated text input UI control requests the input panel to show itself. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks This callback function is mandatory and must be registered using ime_run(). -/// IME application should configure its input panel with #ime_context_h structure information. -/// The ime_get_main_window() can be used to get the created input panel window. -/// -/// @param[in] context_id The input context identification value of an associated text input UI control -/// @param[in] context The input context information handle -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @see ime_run() -/// @see ime_get_main_window() -/// @see ime_context_get_layout() -/// @see ime_context_get_layout_variation() -/// @see ime_context_get_cursor_position() -/// @see ime_context_get_autocapital_type() -/// @see ime_context_get_return_key_type() -/// @see ime_context_get_return_key_state() -/// @see ime_context_get_prediction_mode() -/// @see ime_context_get_password_mode() -/// @see ime_context_get_input_hint() -/// @see ime_context_get_bidi_direction() -/// @see ime_context_get_language() -typedef ime_show_cb = ffi.Pointer>; -typedef ime_show_cbFunction = ffi.Void Function( - ffi.Int context_id, ime_context_h context, ffi.Pointer user_data); -typedef Dartime_show_cbFunction = void Function( - int context_id, ime_context_h context, ffi.Pointer user_data); - -/// @brief Handle of an associated text input UI control's input context. -/// -/// @details This is one of parameters of ime_show_cb() callback function. IME application -/// should configure its input panel with this structure information. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @see ime_context_get_layout() -/// @see ime_context_get_layout_variation() -/// @see ime_context_get_cursor_position() -/// @see ime_context_get_autocapital_type() -/// @see ime_context_get_return_key_type() -/// @see ime_context_get_return_key_state() -/// @see ime_context_get_prediction_mode() -/// @see ime_context_get_password_mode() -/// @see ime_context_get_input_hint() -/// @see ime_context_get_bidi_direction() -/// @see ime_context_get_language() -typedef ime_context_h = ffi.Pointer<_ime_context>; - -/// @brief Called when an associated text input UI control requests the input panel to hide itself. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks This callback function is mandatory and must be registered using ime_run(). The -/// ime_get_main_window() can be used to get the created input panel window. -/// -/// @param[in] context_id The input context identification value of an associated text input UI control -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @see ime_run() -/// @see ime_get_main_window() -typedef ime_hide_cb = ffi.Pointer>; -typedef ime_hide_cbFunction = ffi.Void Function( - ffi.Int context_id, ffi.Pointer user_data); -typedef Dartime_hide_cbFunction = void Function( - int context_id, ffi.Pointer user_data); - -/// @brief Called when an associated text input UI control has focus. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @param[in] context_id The input context identification value of an associated text input UI control -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_focus_in_cb() function. -/// -/// @see ime_event_set_focus_in_cb() -typedef ime_focus_in_cb - = ffi.Pointer>; -typedef ime_focus_in_cbFunction = ffi.Void Function( - ffi.Int context_id, ffi.Pointer user_data); -typedef Dartime_focus_in_cbFunction = void Function( - int context_id, ffi.Pointer user_data); - -/// @brief Called when an associated text input UI control loses focus. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @param[in] context_id The input context identification value of an associated text input UI control -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_focus_out_cb() function. -/// -/// @see ime_event_set_focus_out_cb() -typedef ime_focus_out_cb - = ffi.Pointer>; -typedef ime_focus_out_cbFunction = ffi.Void Function( - ffi.Int context_id, ffi.Pointer user_data); -typedef Dartime_focus_out_cbFunction = void Function( - int context_id, ffi.Pointer user_data); - -/// @brief Called when an associated text input UI control responds to a request with the surrounding text. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks The ime_request_surrounding_text() must be called to invoke this callback function, asynchronously. -/// -/// @param[in] context_id The input context identification value of an associated text input UI control -/// @param[in] text The UTF-8 string requested -/// @param[in] cursor_pos The cursor position -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_surrounding_text_updated_cb() function. -/// -/// @see ime_event_set_surrounding_text_updated_cb() -/// @see ime_request_surrounding_text() -typedef ime_surrounding_text_updated_cb - = ffi.Pointer>; -typedef ime_surrounding_text_updated_cbFunction = ffi.Void Function( - ffi.Int context_id, - ffi.Pointer text, - ffi.Int cursor_pos, - ffi.Pointer user_data); -typedef Dartime_surrounding_text_updated_cbFunction = void Function( - int context_id, - ffi.Pointer text, - int cursor_pos, - ffi.Pointer user_data); - -/// @brief Called to reset the input context of an associated text input UI control. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_input_context_reset_cb() function. -/// -/// @see ime_event_set_input_context_reset_cb() -typedef ime_input_context_reset_cb - = ffi.Pointer>; -typedef ime_input_context_reset_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartime_input_context_reset_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Called when the position of the cursor in an associated text input UI control changes. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @param[in] cursor_pos The cursor position -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_cursor_position_updated_cb() function. -/// -/// @see ime_event_set_cursor_position_updated_cb() -typedef ime_cursor_position_updated_cb - = ffi.Pointer>; -typedef ime_cursor_position_updated_cbFunction = ffi.Void Function( - ffi.Int cursor_pos, ffi.Pointer user_data); -typedef Dartime_cursor_position_updated_cbFunction = void Function( - int cursor_pos, ffi.Pointer user_data); - -/// @brief Called when an associated text input UI control requests the language from the input panel. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks The allocated @a lang_code will be released internally. -/// -/// @param[in] user_data User data to be passed from the callback registration function -/// @param[out] lang_code Input panel's current input language code (e.g., "en_US") -/// -/// @pre The callback can be registered using ime_event_set_language_requested_cb() function. -/// -/// @see ime_event_set_language_requested_cb() -typedef ime_language_requested_cb - = ffi.Pointer>; -typedef ime_language_requested_cbFunction = ffi.Void Function( - ffi.Pointer user_data, - ffi.Pointer> lang_code); -typedef Dartime_language_requested_cbFunction = void Function( - ffi.Pointer user_data, - ffi.Pointer> lang_code); - -/// @brief Called to set the preferred language to the input panel. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks @a language information is already set to the input panel when it is shown -/// through #ime_context_h. This callback function will be only called when the client -/// application changes the edit field's language attribute after the input panel is shown. -/// -/// @param[in] language The preferred language that the client application wants -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_language_set_cb() function. -/// -/// @see ime_event_set_language_set_cb() -typedef ime_language_set_cb - = ffi.Pointer>; -typedef ime_language_set_cbFunction = ffi.Void Function( - ffi.Int32 language, ffi.Pointer user_data); -typedef Dartime_language_set_cbFunction = void Function( - int language, ffi.Pointer user_data); - -/// @typedef Ecore_IMF_Input_Panel_Lang -/// -/// Input panel (virtual keyboard) language modes. -/// -/// @see ecore_imf_context_input_panel_language_set() -abstract class Ecore_IMF_Input_Panel_Lang { - /// < Automatic @since 1.2 - static const int ECORE_IMF_INPUT_PANEL_LANG_AUTOMATIC = 0; - - /// < Alphabet @since 1.2 - static const int ECORE_IMF_INPUT_PANEL_LANG_ALPHABET = 1; -} - -/// @brief Called to set the application specific data to deliver to the input panel. -/// -/// @details This API is used by the applications to deliver the specific data to the input panel. -/// The data format MUST be negotiated by both application and input panel. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @param[in] data The specific data to be set to the input panel -/// @param[in] data_length The length of data, in bytes, to send to the input panel -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_imdata_set_cb() function. -/// -/// @see ime_event_set_imdata_set_cb() -typedef ime_imdata_set_cb - = ffi.Pointer>; -typedef ime_imdata_set_cbFunction = ffi.Void Function( - ffi.Pointer data, - ffi.UnsignedInt data_length, - ffi.Pointer user_data); -typedef Dartime_imdata_set_cbFunction = void Function( - ffi.Pointer data, - int data_length, - ffi.Pointer user_data); - -/// @brief Called when an associated text input UI control requests the application specific data from the input panel. -/// -/// @details This API is used by the applications to request the specific data from the input panel. -/// The data format MUST be negotiated by both application and input panel. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks The allocated @a data will be released internally. -/// -/// @param[in] user_data User data to be passed from the callback registration function -/// @param[out] data Input panel's data to be set to the application -/// @param[out] data_length The length of data, in bytes, to send to the application -/// -/// @pre The callback can be registered using ime_event_set_imdata_requested_cb() function. -/// -/// @see ime_event_set_imdata_requested_cb() -typedef ime_imdata_requested_cb - = ffi.Pointer>; -typedef ime_imdata_requested_cbFunction = ffi.Void Function( - ffi.Pointer user_data, - ffi.Pointer> data, - ffi.Pointer data_length); -typedef Dartime_imdata_requested_cbFunction = void Function( - ffi.Pointer user_data, - ffi.Pointer> data, - ffi.Pointer data_length); - -/// @brief Called when an associated text input UI control requests the input panel to set its layout. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks @a layout information is already set to the input panel when it is shown -/// through #ime_context_h. This callback function will be only called when the client -/// application changes the edit field's layout attribute after the input panel is shown. -/// -/// @param[in] layout The input panel layout -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_layout_set_cb() function. -/// -/// @see ime_event_set_layout_set_cb() -typedef ime_layout_set_cb - = ffi.Pointer>; -typedef ime_layout_set_cbFunction = ffi.Void Function( - ffi.Int32 layout, ffi.Pointer user_data); -typedef Dartime_layout_set_cbFunction = void Function( - int layout, ffi.Pointer user_data); - -/// @typedef Ecore_IMF_Input_Panel_Layout -/// -/// Input panel (virtual keyboard) layout types. -/// -/// @see ecore_imf_context_input_panel_layout_set() -abstract class Ecore_IMF_Input_Panel_Layout { - /// < Default layout - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL = 0; - - /// < Number layout - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBER = 1; - - /// < Email layout - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_EMAIL = 2; - - /// < URL layout - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_URL = 3; - - /// < Phone Number layout - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_PHONENUMBER = 4; - - /// < IP layout - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_IP = 5; - - /// < Month layout - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_MONTH = 6; - - /// < Number Only layout - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY = 7; - - /// < Never use this - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID = 8; - - /// < Hexadecimal layout @since 1.2 - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_HEX = 9; - - /// < Command-line terminal layout including ESC, Alt, Ctrl key, so on (no auto-correct, no auto-capitalization) @since 1.2 - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_TERMINAL = 10; - - /// < Like normal, but no auto-correct, no auto-capitalization etc. @since 1.2 - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD = 11; - - /// < Date and time layout @since 1.8 - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_DATETIME = 12; - - /// < Emoticon layout @since 1.10 - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_EMOTICON = 13; - - /// < Voice layout, but if the IME does not support voice layout, then normal layout will be shown @since 1.19 - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_VOICE = 14; -} - -/// @brief Called when an associated text input UI control requests the input panel to set the @c Return key label. -/// The input panel can show text or image on the @c Return button according to the @c Return key action. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks @a type information is already set to the input panel when it is shown -/// through #ime_context_h. This callback function will be only called when the client -/// application changes the edit field's @c Return key type attribute after the input panel -/// is shown. -/// -/// @param[in] type The type of @c Return key on the input panel -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_return_key_type_set_cb() function. -/// -/// @see ime_event_set_return_key_type_set_cb() -typedef ime_return_key_type_set_cb - = ffi.Pointer>; -typedef ime_return_key_type_set_cbFunction = ffi.Void Function( - ffi.Int32 type, ffi.Pointer user_data); -typedef Dartime_return_key_type_set_cbFunction = void Function( - int type, ffi.Pointer user_data); - -/// @typedef Ecore_IMF_Input_Panel_Return_Key_Type -/// -/// "Return" Key types on the input panel (virtual keyboard). -/// -/// @see ecore_imf_context_input_panel_return_key_type_set() -abstract class Ecore_IMF_Input_Panel_Return_Key_Type { - /// < Default @since 1.2 - static const int ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT = 0; - - /// < Done @since 1.2 - static const int ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DONE = 1; - - /// < Go @since 1.2 - static const int ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_GO = 2; - - /// < Join @since 1.2 - static const int ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_JOIN = 3; - - /// < Login @since 1.2 - static const int ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN = 4; - - /// < Next @since 1.2 - static const int ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_NEXT = 5; - - /// < Search or magnifier icon @since 1.2 - static const int ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH = 6; - - /// < Send @since 1.2 - static const int ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEND = 7; - - /// < Sign-in @since 1.8 - static const int ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SIGNIN = 8; -} - -/// @brief Called when an associated text input UI control requests the input panel to enable -/// or disable the @c Return key state. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks @a disabled information is already set to the input panel when it is shown -/// through #ime_context_h. This callback function will be only called when the client -/// application changes the edit field's @c Return key disable attribute after the input panel -/// is shown. -/// -/// @param[in] disabled The Boolean state to disable @c Return key. The @c Return key is enabled by default -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_return_key_state_set_cb() function. -/// -/// @see ime_event_set_return_key_state_set_cb() -typedef ime_return_key_state_set_cb - = ffi.Pointer>; -typedef ime_return_key_state_set_cbFunction = ffi.Void Function( - ffi.Bool disabled, ffi.Pointer user_data); -typedef Dartime_return_key_state_set_cbFunction = void Function( - bool disabled, ffi.Pointer user_data); - -/// @brief Called when an associated text input UI control requests the position and size from the input panel. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @param[in] user_data User data to be passed from the callback registration function -/// @param[out] x The x position in screen -/// @param[out] y The y position in screen -/// @param[out] w The window width -/// @param[out] h The window height -/// -/// @pre The callback can be registered using ime_event_set_geometry_requested_cb() function. -/// -/// @see ime_event_set_geometry_requested_cb() -typedef ime_geometry_requested_cb - = ffi.Pointer>; -typedef ime_geometry_requested_cbFunction = ffi.Void Function( - ffi.Pointer user_data, - ffi.Pointer x, - ffi.Pointer y, - ffi.Pointer w, - ffi.Pointer h); -typedef Dartime_geometry_requested_cbFunction = void Function( - ffi.Pointer user_data, - ffi.Pointer x, - ffi.Pointer y, - ffi.Pointer w, - ffi.Pointer h); - -/// @brief Called when the key event is received from the external devices or ime_send_key_event() function. -/// -/// @details This function processes the key event before an associated text input UI control does. -/// -/// @remarks If the key event is from the external device, @a dev_info will have its name, class and subclass information. -/// -/// @param[in] keycode The key code to be sent -/// @param[in] keymask The modifier key mask -/// @param[in] dev_info The device information handle -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @return @c true if the event is processed, otherwise the event is not processed and is forwarded to the client application. -/// -/// @pre The callback can be registered using ime_event_set_process_key_event_cb() function. -/// -/// @see ime_event_set_process_key_event_cb() -/// @see ime_device_info_get_name() -/// @see ime_device_info_get_class() -/// @see ime_device_info_get_subclass() -/// @see ime_send_key_event() -/// @see ime_commit_string() -/// @see ime_show_preedit_string() -/// @see ime_hide_preedit_string() -/// @see ime_update_preedit_string() -typedef ime_process_key_event_cb - = ffi.Pointer>; -typedef ime_process_key_event_cbFunction = ffi.Bool Function( - ffi.Int32 keycode, - ffi.Int32 keymask, - ime_device_info_h dev_info, - ffi.Pointer user_data); -typedef Dartime_process_key_event_cbFunction = bool Function(int keycode, - int keymask, ime_device_info_h dev_info, ffi.Pointer user_data); - -/// @brief Enumeration for the key codes. -/// If keycode & 0xff000000 == 0x01000000 then this key code is directly encoded 24-bit UCS character. -/// The UCS value is keycode & 0x00ffffff. -/// @details Defines the list of keys supported by the system. -/// Note that certain keys may not be available on all devices. -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -abstract class ime_key_code_e { - /// < The backspace key - static const int IME_KEY_BackSpace = 65288; - - /// < The tab key - static const int IME_KEY_Tab = 65289; - - /// < The linefeed key - static const int IME_KEY_Linefeed = 65290; - - /// < The clear key - static const int IME_KEY_Clear = 65291; - - /// < The return key - static const int IME_KEY_Return = 65293; - - /// < The pause key - static const int IME_KEY_Pause = 65299; - - /// < The scroll lock key - static const int IME_KEY_Scroll_Lock = 65300; - - /// < The sys req key - static const int IME_KEY_Sys_Req = 65301; - - /// < The escape key - static const int IME_KEY_Escape = 65307; - - /// < The delete key - static const int IME_KEY_Delete = 65535; - - /// < The home key - static const int IME_KEY_Home = 65360; - - /// < The left directional key - static const int IME_KEY_Left = 65361; - - /// < The up directional key - static const int IME_KEY_Up = 65362; - - /// < The right directional key - static const int IME_KEY_Right = 65363; - - /// < The down directional key - static const int IME_KEY_Down = 65364; - - /// < The prior, previous key - static const int IME_KEY_Prior = 65365; - - /// < The page up key - static const int IME_KEY_Page_Up = 65365; - - /// < The next key - static const int IME_KEY_Next = 65366; - - /// < The page down key - static const int IME_KEY_Page_Down = 65366; - - /// < The end key - static const int IME_KEY_End = 65367; - - /// < The begin key - static const int IME_KEY_Begin = 65368; - - /// < The select key - static const int IME_KEY_Select = 65376; - - /// < The print key - static const int IME_KEY_Print = 65377; - - /// < The execute, run, do key - static const int IME_KEY_Execute = 65378; - - /// < The insert key - static const int IME_KEY_Insert = 65379; - - /// < The undo key - static const int IME_KEY_Undo = 65381; - - /// < The redo key - static const int IME_KEY_Redo = 65382; - - /// < The menu key - static const int IME_KEY_Menu = 65383; - - /// < The find key - static const int IME_KEY_Find = 65384; - - /// < The cancel, stop, abort, exit key - static const int IME_KEY_Cancel = 65385; - - /// < The help key - static const int IME_KEY_Help = 65386; - - /// < The break key - static const int IME_KEY_Break = 65387; - - /// < The character set switch key - static const int IME_KEY_Mode_switch = 65406; - - /// < The num lock key - static const int IME_KEY_Num_Lock = 65407; - - /// < The Numpad space key - static const int IME_KEY_KP_Space = 65408; - - /// < The Numpad tab key - static const int IME_KEY_KP_Tab = 65417; - - /// < The Numpad enter key - static const int IME_KEY_KP_Enter = 65421; - - /// < The Numpad function 1 key - static const int IME_KEY_KP_F1 = 65425; - - /// < The Numpad function 2 key - static const int IME_KEY_KP_F2 = 65426; - - /// < The Numpad function 3 key - static const int IME_KEY_KP_F3 = 65427; - - /// < The Numpad function 4 key - static const int IME_KEY_KP_F4 = 65428; - - /// < The Numpad home key - static const int IME_KEY_KP_Home = 65429; - - /// < The Numpad left key - static const int IME_KEY_KP_Left = 65430; - - /// < The Numpad up key - static const int IME_KEY_KP_Up = 65431; - - /// < The Numpad right key - static const int IME_KEY_KP_Right = 65432; - - /// < The Numpad down key - static const int IME_KEY_KP_Down = 65433; - - /// < The Numpad prior, previous key - static const int IME_KEY_KP_Prior = 65434; - - /// < The Numpad page up key - static const int IME_KEY_KP_Page_Up = 65434; - - /// < The Numpad next key - static const int IME_KEY_KP_Next = 65435; - - /// < The Numpad page down key - static const int IME_KEY_KP_Page_Down = 65435; - - /// < The Numpad end key - static const int IME_KEY_KP_End = 65436; - - /// < The Numpad begin key - static const int IME_KEY_KP_Begin = 65437; - - /// < The Numpad insert key - static const int IME_KEY_KP_Insert = 65438; - - /// < The Numpad delete key - static const int IME_KEY_KP_Delete = 65439; - - /// < The Numpad equal key - static const int IME_KEY_KP_Equal = 65469; - - /// < The Numpad multiply key - static const int IME_KEY_KP_Multiply = 65450; - - /// < The Numpad add key - static const int IME_KEY_KP_Add = 65451; - - /// < The Numpad separator key - static const int IME_KEY_KP_Separator = 65452; - - /// < The Numpad subtract key - static const int IME_KEY_KP_Subtract = 65453; - - /// < The Numpad decimal key - static const int IME_KEY_KP_Decimal = 65454; - - /// < The Numpad divide key - static const int IME_KEY_KP_Divide = 65455; - - /// < The Numpad 0 key - static const int IME_KEY_KP_0 = 65456; - - /// < The Numpad 1 key - static const int IME_KEY_KP_1 = 65457; - - /// < The Numpad 2 key - static const int IME_KEY_KP_2 = 65458; - - /// < The Numpad 3 key - static const int IME_KEY_KP_3 = 65459; - - /// < The Numpad 4 key - static const int IME_KEY_KP_4 = 65460; - - /// < The Numpad 5 key - static const int IME_KEY_KP_5 = 65461; - - /// < The Numpad 6 key - static const int IME_KEY_KP_6 = 65462; - - /// < The Numpad 7 key - static const int IME_KEY_KP_7 = 65463; - - /// < The Numpad 8 key - static const int IME_KEY_KP_8 = 65464; - - /// < The Numpad 9 key - static const int IME_KEY_KP_9 = 65465; - - /// < The function 1 key - static const int IME_KEY_F1 = 65470; - - /// < The function 2 key - static const int IME_KEY_F2 = 65471; - - /// < The function 3 key - static const int IME_KEY_F3 = 65472; - - /// < The function 4 key - static const int IME_KEY_F4 = 65473; - - /// < The function 5 key - static const int IME_KEY_F5 = 65474; - - /// < The function 6 key - static const int IME_KEY_F6 = 65475; - - /// < The function 7 key - static const int IME_KEY_F7 = 65476; - - /// < The function 8 key - static const int IME_KEY_F8 = 65477; - - /// < The function 9 key - static const int IME_KEY_F9 = 65478; - - /// < The function 10 key - static const int IME_KEY_F10 = 65479; - - /// < The function 11 key - static const int IME_KEY_F11 = 65480; - - /// < The function 12 key - static const int IME_KEY_F12 = 65481; - - /// < The function 13 key - static const int IME_KEY_F13 = 65482; - - /// < The function 14 key - static const int IME_KEY_F14 = 65483; - - /// < The function 15 key - static const int IME_KEY_F15 = 65484; - - /// < The function 16 key - static const int IME_KEY_F16 = 65485; - - /// < The function 17 key - static const int IME_KEY_F17 = 65486; - - /// < The function 18 key - static const int IME_KEY_F18 = 65487; - - /// < The function 19 key - static const int IME_KEY_F19 = 65488; - - /// < The function 20 key - static const int IME_KEY_F20 = 65489; - - /// < The function 21 key - static const int IME_KEY_F21 = 65490; - - /// < The function 22 key - static const int IME_KEY_F22 = 65491; - - /// < The function 23 key - static const int IME_KEY_F23 = 65492; - - /// < The function 24 key - static const int IME_KEY_F24 = 65493; - - /// < The function 25 key - static const int IME_KEY_F25 = 65494; - - /// < The function 26 key - static const int IME_KEY_F26 = 65495; - - /// < The function 27 key - static const int IME_KEY_F27 = 65496; - - /// < The function 28 key - static const int IME_KEY_F28 = 65497; - - /// < The function 29 key - static const int IME_KEY_F29 = 65498; - - /// < The function 30 key - static const int IME_KEY_F30 = 65499; - - /// < The function 31 key - static const int IME_KEY_F31 = 65500; - - /// < The function 32 key - static const int IME_KEY_F32 = 65501; - - /// < The function 33 key - static const int IME_KEY_F33 = 65502; - - /// < The function 34 key - static const int IME_KEY_F34 = 65503; - - /// < The function 35 key - static const int IME_KEY_F35 = 65504; - - /// < The left shift key - static const int IME_KEY_Shift_L = 65505; - - /// < The right shift key - static const int IME_KEY_Shift_R = 65506; - - /// < The left control key - static const int IME_KEY_Control_L = 65507; - - /// < The right control key - static const int IME_KEY_Control_R = 65508; - - /// < The caps lock key - static const int IME_KEY_Caps_Lock = 65509; - - /// < The shift lock key - static const int IME_KEY_Shift_Lock = 65510; - - /// < The left meta key - static const int IME_KEY_Meta_L = 65511; - - /// < The right meta key - static const int IME_KEY_Meta_R = 65512; - - /// < The left alt key - static const int IME_KEY_Alt_L = 65513; - - /// < The right alt key - static const int IME_KEY_Alt_R = 65514; - - /// < The left super key - static const int IME_KEY_Super_L = 65515; - - /// < The right super key - static const int IME_KEY_Super_R = 65516; - - /// < The left hyper key - static const int IME_KEY_Hyper_L = 65517; - - /// < The right hyper key - static const int IME_KEY_Hyper_R = 65518; - - /// < The space key - static const int IME_KEY_space = 32; - - /// < The exclamation key - static const int IME_KEY_exclam = 33; - - /// < The quotedbl key - static const int IME_KEY_quotedbl = 34; - - /// < The number sign key - static const int IME_KEY_numbersign = 35; - - /// < The dollar key - static const int IME_KEY_dollar = 36; - - /// < The percent key - static const int IME_KEY_percent = 37; - - /// < The ampersand key - static const int IME_KEY_ampersand = 38; - - /// < The apostrophe key - static const int IME_KEY_apostrophe = 39; - - /// < The parenleft key - static const int IME_KEY_parenleft = 40; - - /// < The parenright key - static const int IME_KEY_parenright = 41; - - /// < The asterisk key - static const int IME_KEY_asterisk = 42; - - /// < The plus key - static const int IME_KEY_plus = 43; - - /// < The comma key - static const int IME_KEY_comma = 44; - - /// < The minus key - static const int IME_KEY_minus = 45; - - /// < The period key - static const int IME_KEY_period = 46; - - /// < The slash key - static const int IME_KEY_slash = 47; - - /// < The 0 key - static const int IME_KEY_0 = 48; - - /// < The 1 key - static const int IME_KEY_1 = 49; - - /// < The 2 key - static const int IME_KEY_2 = 50; - - /// < The 3 key - static const int IME_KEY_3 = 51; - - /// < The 4 key - static const int IME_KEY_4 = 52; - - /// < The 5 key - static const int IME_KEY_5 = 53; - - /// < The 6 key - static const int IME_KEY_6 = 54; - - /// < The 7 key - static const int IME_KEY_7 = 55; - - /// < The 8 key - static const int IME_KEY_8 = 56; - - /// < The 9 key - static const int IME_KEY_9 = 57; - - /// < The colon key - static const int IME_KEY_colon = 58; - - /// < The semicolon key - static const int IME_KEY_semicolon = 59; - - /// < The less key - static const int IME_KEY_less = 60; - - /// < The equal key - static const int IME_KEY_equal = 61; - - /// < The greater key - static const int IME_KEY_greater = 62; - - /// < The question key - static const int IME_KEY_question = 63; - - /// < The at key - static const int IME_KEY_at = 64; - - /// < The A key - static const int IME_KEY_A = 65; - - /// < The B key - static const int IME_KEY_B = 66; - - /// < The C key - static const int IME_KEY_C = 67; - - /// < The D key - static const int IME_KEY_D = 68; - - /// < The E key - static const int IME_KEY_E = 69; - - /// < The F key - static const int IME_KEY_F = 70; - - /// < The G key - static const int IME_KEY_G = 71; - - /// < The H key - static const int IME_KEY_H = 72; - - /// < The I key - static const int IME_KEY_I = 73; - - /// < The J key - static const int IME_KEY_J = 74; - - /// < The K key - static const int IME_KEY_K = 75; - - /// < The L key - static const int IME_KEY_L = 76; - - /// < The M key - static const int IME_KEY_M = 77; - - /// < The N key - static const int IME_KEY_N = 78; - - /// < The O key - static const int IME_KEY_O = 79; - - /// < The P key - static const int IME_KEY_P = 80; - - /// < The Q key - static const int IME_KEY_Q = 81; - - /// < The R key - static const int IME_KEY_R = 82; - - /// < The S key - static const int IME_KEY_S = 83; - - /// < The T key - static const int IME_KEY_T = 84; - - /// < The U key - static const int IME_KEY_U = 85; - - /// < The V key - static const int IME_KEY_V = 86; - - /// < The W key - static const int IME_KEY_W = 87; - - /// < The X key - static const int IME_KEY_X = 88; - - /// < The Y key - static const int IME_KEY_Y = 89; - - /// < The Z key - static const int IME_KEY_Z = 90; - - /// < The left bracket key - static const int IME_KEY_bracketleft = 91; - - /// < The backslash key - static const int IME_KEY_backslash = 92; - - /// < The right bracket key - static const int IME_KEY_bracketright = 93; - - /// < The circumflex key - static const int IME_KEY_asciicircum = 94; - - /// < The underscore key - static const int IME_KEY_underscore = 95; - - /// < The grave key - static const int IME_KEY_grave = 96; - - /// < The a key - static const int IME_KEY_a = 97; - - /// < The b key - static const int IME_KEY_b = 98; - - /// < The c key - static const int IME_KEY_c = 99; - - /// < The d key - static const int IME_KEY_d = 100; - - /// < The e key - static const int IME_KEY_e = 101; - - /// < The f key - static const int IME_KEY_f = 102; - - /// < The g key - static const int IME_KEY_g = 103; - - /// < The h key - static const int IME_KEY_h = 104; - - /// < The i key - static const int IME_KEY_i = 105; - - /// < The j key - static const int IME_KEY_j = 106; - - /// < The k key - static const int IME_KEY_k = 107; - - /// < The l key - static const int IME_KEY_l = 108; - - /// < The m key - static const int IME_KEY_m = 109; - - /// < The n key - static const int IME_KEY_n = 110; - - /// < The o key - static const int IME_KEY_o = 111; - - /// < The p key - static const int IME_KEY_p = 112; - - /// < The q key - static const int IME_KEY_q = 113; - - /// < The r key - static const int IME_KEY_r = 114; - - /// < The s key - static const int IME_KEY_s = 115; - - /// < The t key - static const int IME_KEY_t = 116; - - /// < The u key - static const int IME_KEY_u = 117; - - /// < The v key - static const int IME_KEY_v = 118; - - /// < The w key - static const int IME_KEY_w = 119; - - /// < The x key - static const int IME_KEY_x = 120; - - /// < The y key - static const int IME_KEY_y = 121; - - /// < The z key - static const int IME_KEY_z = 122; - - /// < The left brace key - static const int IME_KEY_braceleft = 123; - - /// < The bar key - static const int IME_KEY_bar = 124; - - /// < The right brace key - static const int IME_KEY_braceright = 125; - - /// < The tilde key - static const int IME_KEY_asciitilde = 126; -} - -/// @brief Enumeration for the key masks. -/// The key masks indicate which modifier keys is pressed down during the keyboard hit. -/// The special IME_KEY_MASK_RELEASED indicates the key release event. -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -abstract class ime_key_mask_e { - /// < Key press event without modifier key - static const int IME_KEY_MASK_PRESSED = 0; - - /// < The Shift key is pressed down - static const int IME_KEY_MASK_SHIFT = 1; - - /// < The CapsLock key is pressed down - static const int IME_KEY_MASK_CAPSLOCK = 2; - - /// < The Control key is pressed down - static const int IME_KEY_MASK_CONTROL = 4; - - /// < The Alt key is pressed down - static const int IME_KEY_MASK_ALT = 8; - - /// < The Meta key is pressed down - static const int IME_KEY_MASK_META = 16; - - /// < The Win (between Control and Alt) is pressed down - static const int IME_KEY_MASK_WIN = 32; - - /// < The Hyper key is pressed down - static const int IME_KEY_MASK_HYPER = 64; - - /// < The NumLock key is pressed down - static const int IME_KEY_MASK_NUMLOCK = 128; - - /// < Key release event - static const int IME_KEY_MASK_RELEASED = 32768; -} - -/// @brief Handle of the device information of the key event. -/// -/// @details This is one of parameters of ime_process_key_event_cb() callback function. IME application -/// may distinguish the key event by using this if necessary. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @see ime_process_key_event_cb() -/// @see ime_device_info_get_name() -/// @see ime_device_info_get_class() -/// @see ime_device_info_get_subclass() -typedef ime_device_info_h = ffi.Pointer<_ime_device_info>; - -/// @brief Called when the system display language is changed. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @param[in] language The language code -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_display_language_changed_cb() function. -/// -/// @see ime_event_set_display_language_changed_cb() -typedef ime_display_language_changed_cb - = ffi.Pointer>; -typedef ime_display_language_changed_cbFunction = ffi.Void Function( - ffi.Pointer language, ffi.Pointer user_data); -typedef Dartime_display_language_changed_cbFunction = void Function( - ffi.Pointer language, ffi.Pointer user_data); - -/// @brief Called when the device is rotated. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @param[in] degree The rotation degree -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_rotation_degree_changed_cb() function. -/// -/// @see ime_event_set_rotation_degree_changed_cb() -typedef ime_rotation_degree_changed_cb - = ffi.Pointer>; -typedef ime_rotation_degree_changed_cbFunction = ffi.Void Function( - ffi.Int degree, ffi.Pointer user_data); -typedef Dartime_rotation_degree_changed_cbFunction = void Function( - int degree, ffi.Pointer user_data); - -/// @brief Called when Accessibility in Settings application is on or off. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @param[in] state Accessibility option state -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_accessibility_state_changed_cb() function. -/// -/// @see ime_event_set_accessibility_state_changed_cb() -typedef ime_accessibility_state_changed_cb = ffi - .Pointer>; -typedef ime_accessibility_state_changed_cbFunction = ffi.Void Function( - ffi.Bool state, ffi.Pointer user_data); -typedef Dartime_accessibility_state_changed_cbFunction = void Function( - bool state, ffi.Pointer user_data); - -/// @brief Called to create the option window. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks if Input panel requests to open the option window, @a type will be #IME_OPTION_WINDOW_TYPE_KEYBOARD. -/// And if Settings application requests to open it, @a type will be #IME_OPTION_WINDOW_TYPE_SETTING_APPLICATION. -/// -/// @param[in] window The created window object -/// @param[in] type The type of option window -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_option_window_created_cb() function. The -/// ime_create_option_window() calls this callback function or Settings application can call this callback function. -/// -/// @see ime_event_set_option_window_created_cb() -/// @see ime_create_option_window() -typedef ime_option_window_created_cb - = ffi.Pointer>; -typedef ime_option_window_created_cbFunction = ffi.Void Function( - ffi.Pointer window, - ffi.Int32 type, - ffi.Pointer user_data); -typedef Dartime_option_window_created_cbFunction = void Function( - ffi.Pointer window, int type, ffi.Pointer user_data); - -/// @brief Called to destroy the option window. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @param[in] window The window object to destroy -/// @param[in] user_data User data to be passed to the callback function -/// -/// @pre The callback can be registered using ime_event_set_option_window_destroyed_cb() function. -/// ime_destroy_option_window() calls this callback function. -/// -/// @see ime_event_set_option_window_destroyed_cb() -typedef ime_option_window_destroyed_cb - = ffi.Pointer>; -typedef ime_option_window_destroyed_cbFunction = ffi.Void Function( - ffi.Pointer window, ffi.Pointer user_data); -typedef Dartime_option_window_destroyed_cbFunction = void Function( - ffi.Pointer window, ffi.Pointer user_data); - -/// @typedef Eina_List -/// Type for a generic double linked list. -typedef Eina_List = _Eina_List; - -/// @struct _Eina_List -/// Type for a generic double linked list. -final class _Eina_List extends ffi.Struct { - /// < Pointer to list element payload - external ffi.Pointer data; - - /// < Next member in the list - external ffi.Pointer next; - - /// < Previous member in the list - external ffi.Pointer prev; - - /// < Private list accounting info - don't touch - external ffi.Pointer accounting; - - @Eina_Magic() - external int __magic; -} - -/// @typedef Eina_List -/// Type for a generic double linked list. -typedef Eina_List1 = _Eina_List; - -/// @typedef Eina_List_Accounting -/// Cache used to store the last element of a list and the number of -/// elements, for fast access. -typedef Eina_List_Accounting = _Eina_List_Accounting; - -/// @struct _Eina_List_Accounting -/// Cache used to store the last element of a list and the number of -/// elements, for fast access. It is for private used and must not be -/// touched. -final class _Eina_List_Accounting extends ffi.Struct { - /// < Pointer to the last element of the list - don't touch - external ffi.Pointer last; - - /// < Number of elements of the list - don't touch - @ffi.UnsignedInt() - external int count; - - @Eina_Magic() - external int __magic; -} - -/// @brief An abstract type for a magic number. -typedef Eina_Magic = ffi.UnsignedInt; -typedef DartEina_Magic = int; - -/// @typedef Ecore_IMF_Autocapital_Type -/// -/// Autocapitalization Types. -/// -/// @see ecore_imf_context_autocapital_type_set() -abstract class Ecore_IMF_Autocapital_Type { - /// < No auto-capitalization when typing @since 1.1 - static const int ECORE_IMF_AUTOCAPITAL_TYPE_NONE = 0; - - /// < Autocapitalize each word typed @since 1.1 - static const int ECORE_IMF_AUTOCAPITAL_TYPE_WORD = 1; - - /// < Autocapitalize the start of each sentence @since 1.1 - static const int ECORE_IMF_AUTOCAPITAL_TYPE_SENTENCE = 2; - - /// < Autocapitalize all letters @since 1.1 - static const int ECORE_IMF_AUTOCAPITAL_TYPE_ALLCHARACTER = 3; -} - -/// @typedef Ecore_IMF_Input_Hints -/// @brief Enumeration for defining the types of Ecore_IMF Input Hints. -/// @since 1.12 -abstract class Ecore_IMF_Input_Hints { - /// < No active hints @since 1.12 - static const int ECORE_IMF_INPUT_HINT_NONE = 0; - - /// < Suggest word auto completion @since 1.12 - static const int ECORE_IMF_INPUT_HINT_AUTO_COMPLETE = 1; - - /// < Typed text should not be stored. @since 1.12 - static const int ECORE_IMF_INPUT_HINT_SENSITIVE_DATA = 2; - - /// < Multiline text @since 1.18 - static const int ECORE_IMF_INPUT_HINT_MULTILINE = 4; -} - -/// @typedef Ecore_IMF_BiDi_Direction -/// @brief Enumeration for defining the types of Ecore_IMF bidirectionality. -/// @since 1.12 -abstract class Ecore_IMF_BiDi_Direction { - /// < The Neutral mode @since 1.12 - static const int ECORE_IMF_BIDI_DIRECTION_NEUTRAL = 0; - - /// < The Left to Right mode @since 1.12 - static const int ECORE_IMF_BIDI_DIRECTION_LTR = 1; - - /// < The Right to Left mode @since 1.12 - static const int ECORE_IMF_BIDI_DIRECTION_RTL = 2; -} - -abstract class Ecore_IMF_Device_Class { - /// < Not a device @since 1.14 - static const int ECORE_IMF_DEVICE_CLASS_NONE = 0; - - /// < The user/seat (the user themselves) @since 1.14 - static const int ECORE_IMF_DEVICE_CLASS_SEAT = 1; - - /// < A regular keyboard, numberpad or attached buttons @since 1.14 - static const int ECORE_IMF_DEVICE_CLASS_KEYBOARD = 2; - - /// < A mouse, trackball or touchpad relative motion device @since 1.14 - static const int ECORE_IMF_DEVICE_CLASS_MOUSE = 3; - - /// < A touchscreen with fingers or stylus @since 1.14 - static const int ECORE_IMF_DEVICE_CLASS_TOUCH = 4; - - /// < A special pen device @since 1.14 - static const int ECORE_IMF_DEVICE_CLASS_PEN = 5; - - /// < A laser pointer, wii-style or "minority report" pointing device @since 1.14 - static const int ECORE_IMF_DEVICE_CLASS_POINTER = 6; - - /// < A gamepad controller or joystick @since 1.14 - static const int ECORE_IMF_DEVICE_CLASS_GAMEPAD = 7; -} - -abstract class Ecore_IMF_Device_Subclass { - /// < Not a device @since 1.14 - static const int ECORE_IMF_DEVICE_SUBCLASS_NONE = 0; - - /// < The normal flat of your finger @since 1.14 - static const int ECORE_IMF_DEVICE_SUBCLASS_FINGER = 1; - - /// < A fingernail @since 1.14 - static const int ECORE_IMF_DEVICE_SUBCLASS_FINGERNAIL = 2; - - /// < A Knuckle @since 1.14 - static const int ECORE_IMF_DEVICE_SUBCLASS_KNUCKLE = 3; - - /// < The palm of a users hand @since 1.14 - static const int ECORE_IMF_DEVICE_SUBCLASS_PALM = 4; - - /// < The side of your hand @since 1.14 - static const int ECORE_IMF_DEVICE_SUBCLASS_HAND_SIZE = 5; - - /// < The flat of your hand @since 1.14 - static const int ECORE_IMF_DEVICE_SUBCLASS_HAND_FLAT = 6; - - /// < The tip of a pen @since 1.14 - static const int ECORE_IMF_DEVICE_SUBCLASS_PEN_TIP = 7; - - /// < A trackpad style mouse @since 1.14 - static const int ECORE_IMF_DEVICE_SUBCLASS_TRACKPAD = 8; - - /// < A trackpoint style mouse @since 1.14 - static const int ECORE_IMF_DEVICE_SUBCLASS_TRACKPOINT = 9; - - /// < A trackball style mouse @since 1.14 - static const int ECORE_IMF_DEVICE_SUBCLASS_TRACKBALL = 10; - - /// < A remote controller @since_tizen 4.0 - static const int ECORE_IMF_DEVICE_SUBCLASS_REMOCON = 11; - - /// < A virtual keyboard @since_tizen 4.0 - static const int ECORE_IMF_DEVICE_SUBCLASS_VIRTUAL_KEYBOARD = 12; -} - -/// @brief Called to set the prediction hint string to deliver to the input panel. -/// -/// @since_tizen 4.0 -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks @a prediction_hint is valid only in the callback. To use outside the callback, make a copy. -/// This function is used by the applications to deliver the prediction hint message to the input panel. -/// -/// @param[in] prediction_hint The prediction hint to be set to the input panel -/// @param[in] user_data User data to be passed to the callback function -/// -/// @pre The callback can be registered using ime_event_set_prediction_hint_set_cb() function. -/// -/// @see ime_event_set_prediction_hint_set_cb() -typedef ime_prediction_hint_set_cb - = ffi.Pointer>; -typedef ime_prediction_hint_set_cbFunction = ffi.Void Function( - ffi.Pointer prediction_hint, ffi.Pointer user_data); -typedef Dartime_prediction_hint_set_cbFunction = void Function( - ffi.Pointer prediction_hint, ffi.Pointer user_data); - -/// @brief Called when an associated text input UI control requests the text entry to set the MIME type. -/// -/// @since_tizen 4.0 -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks @a mime_type is valid only in the callback. To use outside the callback, make a copy. -/// This function is used by the applications to deliver the MIME type to the input panel. -/// -/// @param[in] mime_type The MIME type to be set to the input panel -/// @param[in] user_data User data to be passed to the callback function -/// -/// @pre The callback can be registered using ime_event_set_mime_type_set_request_cb() function. -/// -/// @see ime_event_set_mime_type_set_request_cb() -typedef ime_mime_type_set_request_cb - = ffi.Pointer>; -typedef ime_mime_type_set_request_cbFunction = ffi.Void Function( - ffi.Pointer mime_type, ffi.Pointer user_data); -typedef Dartime_mime_type_set_request_cbFunction = void Function( - ffi.Pointer mime_type, ffi.Pointer user_data); - -/// @brief Enumeration for input method manager function error. -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -abstract class ime_manager_error_e { - /// < Successful - static const int IME_MANAGER_ERROR_NONE = 0; - - /// < Invalid parameter - static const int IME_MANAGER_ERROR_INVALID_PARAMETER = -22; - - /// < Permission denied - static const int IME_MANAGER_ERROR_PERMISSION_DENIED = -13; - - /// < Operation failed - static const int IME_MANAGER_ERROR_OPERATION_FAILED = -49414128; -} - -/// @brief Enumeration for error codes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class stt_error_e { - /// < Successful - static const int STT_ERROR_NONE = 0; - - /// < Out of Memory - static const int STT_ERROR_OUT_OF_MEMORY = -12; - - /// < I/O error - static const int STT_ERROR_IO_ERROR = -5; - - /// < Invalid parameter - static const int STT_ERROR_INVALID_PARAMETER = -22; - - /// < No answer from the STT service - static const int STT_ERROR_TIMED_OUT = -1073741823; - - /// < Device or resource busy - static const int STT_ERROR_RECORDER_BUSY = -16; - - /// < Network is down - static const int STT_ERROR_OUT_OF_NETWORK = -100; - - /// < Permission denied - static const int STT_ERROR_PERMISSION_DENIED = -13; - - /// < STT NOT supported - static const int STT_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Invalid state - static const int STT_ERROR_INVALID_STATE = -49283071; - - /// < Invalid language - static const int STT_ERROR_INVALID_LANGUAGE = -49283070; - - /// < No available engine - static const int STT_ERROR_ENGINE_NOT_FOUND = -49283069; - - /// < Operation failed - static const int STT_ERROR_OPERATION_FAILED = -49283068; - - /// < Not supported feature of current engine - static const int STT_ERROR_NOT_SUPPORTED_FEATURE = -49283067; - - /// < Recording timed out @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif - static const int STT_ERROR_RECORDING_TIMED_OUT = -49283066; - - /// < No speech while recording @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif - static const int STT_ERROR_NO_SPEECH = -49283065; - - /// < Progress to ready is not finished @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif - static const int STT_ERROR_IN_PROGRESS_TO_READY = -49283064; - - /// < Progress to recording is not finished @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif - static const int STT_ERROR_IN_PROGRESS_TO_RECORDING = -49283063; - - /// < Progress to processing is not finished @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif - static const int STT_ERROR_IN_PROGRESS_TO_PROCESSING = -49283056; - - /// < Service reset @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif - static const int STT_ERROR_SERVICE_RESET = -49283055; -} - -/// @brief Enumeration for state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class stt_state_e { - /// < 'CREATED' state - static const int STT_STATE_CREATED = 0; - - /// < 'READY' state - static const int STT_STATE_READY = 1; - - /// < 'RECORDING' state - static const int STT_STATE_RECORDING = 2; - - /// < 'PROCESSING' state - static const int STT_STATE_PROCESSING = 3; -} - -/// @brief Enumeration for result event. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class stt_result_event_e { - /// < Event when the recognition full or last result is ready - static const int STT_RESULT_EVENT_FINAL_RESULT = 0; - - /// < Event when the recognition partial result is ready - static const int STT_RESULT_EVENT_PARTIAL_RESULT = 1; - - /// < Event when the recognition has failed - static const int STT_RESULT_EVENT_ERROR = 2; -} - -/// @brief Enumeration for result time callback event. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class stt_result_time_event_e { - /// < Event when the token is beginning type - static const int STT_RESULT_TIME_EVENT_BEGINNING = 0; - - /// < Event when the token is middle type - static const int STT_RESULT_TIME_EVENT_MIDDLE = 1; - - /// < Event when the token is end type - static const int STT_RESULT_TIME_EVENT_END = 2; -} - -/// @brief Enumeration for silence detection type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class stt_option_silence_detection_e { - /// < Silence detection type - False - static const int STT_OPTION_SILENCE_DETECTION_FALSE = 0; - - /// < Silence detection type - True - static const int STT_OPTION_SILENCE_DETECTION_TRUE = 1; - - /// < Silence detection type - Auto - static const int STT_OPTION_SILENCE_DETECTION_AUTO = 2; -} - -final class stt_s extends ffi.Opaque {} - -/// @brief A structure of STT handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef stt_h = ffi.Pointer; - -/// @brief Called to get the engine information. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] engine_id Engine ID -/// @param[in] engine_name Engine name -/// @param[in] user_data User data passed from the stt_setting_foreach_supported_engines() -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @pre stt_foreach_supported_engines() will invoke this callback. -/// @see stt_foreach_supported_engines() -typedef stt_supported_engine_cb - = ffi.Pointer>; -typedef stt_supported_engine_cbFunction = ffi.Bool Function( - stt_h stt, - ffi.Pointer engine_id, - ffi.Pointer engine_name, - ffi.Pointer user_data); -typedef Dartstt_supported_engine_cbFunction = bool Function( - stt_h stt, - ffi.Pointer engine_id, - ffi.Pointer engine_name, - ffi.Pointer user_data); - -/// @brief Called to retrieve the supported languages. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks The language is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code. For example, "ko_KR" for Korean, "en_US" for American English. -/// @param[in] stt The STT handle -/// @param[in] language The language -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// @c false to break out of the loop -/// @pre stt_foreach_supported_languages() will invoke this callback. -/// @see stt_foreach_supported_languages() -typedef stt_supported_language_cb - = ffi.Pointer>; -typedef stt_supported_language_cbFunction = ffi.Bool Function( - stt_h stt, ffi.Pointer language, ffi.Pointer user_data); -typedef Dartstt_supported_language_cbFunction = bool Function( - stt_h stt, ffi.Pointer language, ffi.Pointer user_data); - -/// @brief Called when STT get the result time stamp in free partial type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] stt The STT handle -/// @param[in] index The result index -/// @param[in] event The token event -/// @param[in] text The result text -/// @param[in] start_time The start time of result text -/// @param[in] end_time The end time of result text -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop -/// otherwise @c false to break out of the loop -/// @pre stt_recognition_result_cb() should be called. -/// @see stt_recognition_result_cb() -typedef stt_result_time_cb - = ffi.Pointer>; -typedef stt_result_time_cbFunction = ffi.Bool Function( - stt_h stt, - ffi.Int index, - ffi.Int32 event, - ffi.Pointer text, - ffi.Long start_time, - ffi.Long end_time, - ffi.Pointer user_data); -typedef Dartstt_result_time_cbFunction = bool Function( - stt_h stt, - int index, - int event, - ffi.Pointer text, - int start_time, - int end_time, - ffi.Pointer user_data); - -/// @brief Called when STT gets the recognition result from the engine. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks After stt_stop() is called, silence is detected from recording, or partial result is occured, this function is called. -/// @param[in] stt The STT handle -/// @param[in] event The result event -/// @param[in] data Result texts -/// @param[in] data_count Result text count -/// @param[in] msg Engine message (e.g. #STT_RESULT_MESSAGE_NONE, #STT_RESULT_MESSAGE_ERROR_TOO_SHORT) -/// @param[in] user_data The user data passed from the callback registration function -/// @pre stt_stop() will invoke this callback if you register it using stt_set_result_cb(). -/// @post If this function is called and event is #STT_RESULT_EVENT_FINAL_RESULT, the STT state will be #STT_STATE_READY. -/// @see stt_stop() -/// @see stt_set_recognition_result_cb() -/// @see stt_unset_recognition_result_cb() -typedef stt_recognition_result_cb - = ffi.Pointer>; -typedef stt_recognition_result_cbFunction = ffi.Void Function( - stt_h stt, - ffi.Int32 event, - ffi.Pointer> data, - ffi.Int data_count, - ffi.Pointer msg, - ffi.Pointer user_data); -typedef Dartstt_recognition_result_cbFunction = void Function( - stt_h stt, - int event, - ffi.Pointer> data, - int data_count, - ffi.Pointer msg, - ffi.Pointer user_data); - -/// @brief Called when the state of STT is changed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] stt The STT handle -/// @param[in] previous A previous state -/// @param[in] current A current state -/// @param[in] user_data The user data passed from the callback registration function -/// @pre An application registers this callback using stt_set_state_changed_cb() to detect changing state. -/// @see stt_set_state_changed_cb() -/// @see stt_unset_state_changed_cb() -typedef stt_state_changed_cb - = ffi.Pointer>; -typedef stt_state_changed_cbFunction = ffi.Void Function(stt_h stt, - ffi.Int32 previous, ffi.Int32 current, ffi.Pointer user_data); -typedef Dartstt_state_changed_cbFunction = void Function( - stt_h stt, int previous, int current, ffi.Pointer user_data); - -/// @brief Called when an error occurs. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] stt The STT handle -/// @param[in] reason The error type (e.g. #STT_ERROR_OUT_OF_NETWORK, #STT_ERROR_IO_ERROR) -/// @param[in] user_data The user data passed from the callback registration function -/// @pre An application registers this callback using stt_set_error_cb() to detect error. -/// @see stt_set_error_cb() -/// @see stt_unset_error_cb() -typedef stt_error_cb = ffi.Pointer>; -typedef stt_error_cbFunction = ffi.Void Function( - stt_h stt, ffi.Int32 reason, ffi.Pointer user_data); -typedef Dartstt_error_cbFunction = void Function( - stt_h stt, int reason, ffi.Pointer user_data); - -/// @brief Called when the default language is changed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] stt The STT handle -/// @param[in] previous_language A previous language -/// @param[in] current_language A current language -/// @param[in] user_data The user data passed from the callback registration function -/// @see stt_set_default_language_changed_cb() -typedef stt_default_language_changed_cb - = ffi.Pointer>; -typedef stt_default_language_changed_cbFunction = ffi.Void Function( - stt_h stt, - ffi.Pointer previous_language, - ffi.Pointer current_language, - ffi.Pointer user_data); -typedef Dartstt_default_language_changed_cbFunction = void Function( - stt_h stt, - ffi.Pointer previous_language, - ffi.Pointer current_language, - ffi.Pointer user_data); - -/// @brief Called when the engine is changed. -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -/// @remarks The language is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code. For example, "ko_KR" for Korean, "en_US" for American English. -/// @param[in] stt The STT handle -/// @param[in] engine_id Engine ID -/// @param[in] language The default language -/// @param[in] support_silence Whether the silence detection is supported or not -/// @param[in] need_credential The necessity of credential -/// @param[in] user_data The user data passed from the callback registration function -/// @see stt_set_engine_changed_cb() -typedef stt_engine_changed_cb - = ffi.Pointer>; -typedef stt_engine_changed_cbFunction = ffi.Void Function( - stt_h stt, - ffi.Pointer engine_id, - ffi.Pointer language, - ffi.Bool support_silence, - ffi.Bool need_credential, - ffi.Pointer user_data); -typedef Dartstt_engine_changed_cbFunction = void Function( - stt_h stt, - ffi.Pointer engine_id, - ffi.Pointer language, - bool support_silence, - bool need_credential, - ffi.Pointer user_data); - -/// @brief Enumeration for error codes. -/// @since_tizen 3.0 -abstract class stte_error_e { - /// < Successful - static const int STTE_ERROR_NONE = 0; - - /// < Out of Memory - static const int STTE_ERROR_OUT_OF_MEMORY = -12; - - /// < I/O error - static const int STTE_ERROR_IO_ERROR = -5; - - /// < Invalid parameter - static const int STTE_ERROR_INVALID_PARAMETER = -22; - - /// < Network down(Out of network) - static const int STTE_ERROR_NETWORK_DOWN = -100; - - /// < Invalid state - static const int STTE_ERROR_INVALID_STATE = -49283071; - - /// < Invalid language - static const int STTE_ERROR_INVALID_LANGUAGE = -49283070; - - /// < Operation failed - static const int STTE_ERROR_OPERATION_FAILED = -49283068; - - /// < Not supported feature - static const int STTE_ERROR_NOT_SUPPORTED_FEATURE = -49283067; - - /// < Not supported - static const int STTE_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Permission denied - static const int STTE_ERROR_PERMISSION_DENIED = -13; - - /// < Recording timed out - static const int STTE_ERROR_RECORDING_TIMED_OUT = -49283066; -} - -/// @brief Enumeration for audio type. -/// @since_tizen 3.0 -abstract class stte_audio_type_e { - /// < Signed 16bit audio type, Little endian - static const int STTE_AUDIO_TYPE_PCM_S16_LE = 0; - - /// < Unsigned 8bit audio type - static const int STTE_AUDIO_TYPE_PCM_U8 = 1; -} - -/// @brief Enumeration for callback event. -/// @since_tizen 3.0 -abstract class stte_result_event_e { - /// < Event when either the full matched or the final result is delivered - static const int STTE_RESULT_EVENT_FINAL_RESULT = 0; - - /// < Event when the partial matched result is delivered - static const int STTE_RESULT_EVENT_PARTIAL_RESULT = 1; - - /// < Event when the recognition has failed - static const int STTE_RESULT_EVENT_ERROR = 2; -} - -/// @brief Enumeration for result time callback event. -/// @since_tizen 3.0 -abstract class stte_result_time_event_e { - /// < Event when the token is beginning type - static const int STTE_RESULT_TIME_EVENT_BEGINNING = 0; - - /// < Event when the token is middle type - static const int STTE_RESULT_TIME_EVENT_MIDDLE = 1; - - /// < Event when the token is end type - static const int STTE_RESULT_TIME_EVENT_END = 2; -} - -/// @brief Enumeration for speech status. -/// @since_tizen 3.0 -abstract class stte_speech_status_e { - /// < Beginning point of speech is detected - static const int STTE_SPEECH_STATUS_BEGINNING_POINT_DETECTED = 0; - - /// < End point of speech is detected - static const int STTE_SPEECH_STATUS_END_POINT_DETECTED = 1; -} - -/// @brief A structure for the STT engine functions. -/// @details This structure contains essential callback functions for operating STT engine. -/// @since_tizen 3.0 -/// @remarks These functions are mandatory for operating STT engine. Therefore, all functions MUST be implemented. -final class stte_request_callback_s extends ffi.Struct { - /// < The version of the structure 'stte_request_callback_s' - @ffi.Int() - external int version; - - /// < Called when the engine service user requests the basic information of STT engine - external stte_get_info_cb get_info; - - /// < Called when the engine service user initializes STT engine - external stte_initialize_cb initialize; - - /// < Called when the engine service user deinitializes STT engine - external stte_deinitialize_cb deinitialize; - - /// < Called when the engine service user gets the whole supported language list - external stte_foreach_supported_langs_cb foreach_langs; - - /// < Called when the engine service user checks whether the corresponding language is valid or not - external stte_is_valid_language_cb is_valid_lang; - - /// < Called when the engine service user checks whether STT engine supports silence detection - external stte_support_silence_detection_cb support_silence; - - /// < Called when the engine service user checks whether STT engine supports the corresponding recognition type - external stte_support_recognition_type_cb support_recognition_type; - - /// < Called when the engine service user gets the proper recording format of STT engine - external stte_get_recording_format_cb get_audio_format; - - /// < Called when the engine service user gets the result time information(stamp) - external stte_foreach_result_time_cb foreach_result_time; - - /// < Called when the engine service user sets the silence detection - external stte_set_silence_detection_cb set_silence_detection; - - /// < Called when the engine service user starts to recognize the recording data - external stte_start_cb start; - - /// < Called when the engine service user sets and sends the recording data for speech recognition - external stte_set_recording_data_cb set_recording; - - /// < Called when the engine service user stops to recognize the recording data - external stte_stop_cb stop; - - /// < Called when the engine service user cancels to recognize the recording data - external stte_cancel_cb cancel; - - /// < Called when the engine service user requests for STT engine to check whether the application agreed the usage of STT engine - external stte_check_app_agreed_cb check_app_agreed; - - /// < Called when the engine service user checks whether STT engine needs the application's credential - external stte_need_app_credential_cb need_app_credential; -} - -/// @brief Called when the engine service user requests the basic information of STT engine. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// The allocated @a engine_uuid, @a engine_name, and @a engine_setting will be released internally. -/// In order to upload the engine at Tizen Appstore, both a service app and a ui app are necessary. -/// Therefore, @a engine_setting must be transferred to the engine service user. -/// @param[out] engine_uuid UUID of engine -/// @param[out] engine_name Name of engine -/// @param[out] engine_setting The engine setting application(ui app)'s app ID -/// @param[out] use_network A variable for checking whether the network is used or not -/// @return @c 0 on success, -/// otherwise a negative error code on failure -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #STTE_ERROR_OPERATION_FAILED Operation failure -typedef stte_get_info_cb - = ffi.Pointer>; -typedef stte_get_info_cbFunction = ffi.Int Function( - ffi.Pointer> engine_uuid, - ffi.Pointer> engine_name, - ffi.Pointer> engine_setting, - ffi.Pointer use_network); -typedef Dartstte_get_info_cbFunction = int Function( - ffi.Pointer> engine_uuid, - ffi.Pointer> engine_name, - ffi.Pointer> engine_setting, - ffi.Pointer use_network); - -/// @brief Called when the engine service user initializes STT engine. -/// @details This callback function is called by the engine service user to request for STT engine to be started. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #STTE_ERROR_INVALID_STATE Already initialized -/// @retval #STTE_ERROR_OPERATION_FAILED Operation failure -/// @see stte_deinitialize_cb() -typedef stte_initialize_cb - = ffi.Pointer>; -typedef stte_initialize_cbFunction = ffi.Int Function(); -typedef Dartstte_initialize_cbFunction = int Function(); - -/// @brief Called when the engine service user deinitializes STT engine -/// @details This callback function is called by the engine service user to request for STT engine to be deinitialized. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// NOTE that the engine may be terminated automatically. -/// When this callback function is invoked, the release of resources is necessary. -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_STATE Not initialized -/// @see stte_initialize_cb() -typedef stte_deinitialize_cb - = ffi.Pointer>; -typedef stte_deinitialize_cbFunction = ffi.Int Function(); -typedef Dartstte_deinitialize_cbFunction = int Function(); - -/// @brief Called when the engine service user gets the whole supported language list. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// In this function, the engine service user's callback function 'stte_supported_language_cb()' is invoked repeatedly for getting all supported languages, and @a user_data must be transferred to 'stte_supported_language_cb()'. -/// If 'stte_supported_language_cb()' returns @c false, it should be stopped to call 'stte_supported_language_cb()'. -/// @param[in] callback The callback function -/// @param[in] user_data The user data which must be passed to the callback function 'stte_supported_language_cb()' -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #STTE_ERROR_INVALID_STATE Not initialized -/// @post This callback function invokes stte_supported_language_cb() repeatedly for getting supported languages. -/// @see stte_supported_language_cb() -typedef stte_foreach_supported_langs_cb - = ffi.Pointer>; -typedef stte_foreach_supported_langs_cbFunction = ffi.Int Function( - stte_supported_language_cb callback, ffi.Pointer user_data); -typedef Dartstte_foreach_supported_langs_cbFunction = int Function( - stte_supported_language_cb callback, ffi.Pointer user_data); - -/// @brief Called when STT engine informs the engine service user about whole supported language list. -/// @details This callback function is implemented by the engine service user. Therefore, the engine developer does NOT have to implement this callback function. -/// @since_tizen 3.0 -/// @remarks This callback function is called in stte_foreach_supported_langs_cb() to inform the whole supported language list. -/// @a user_data must be transferred from stte_foreach_supported_langs_cb(). -/// @param[in] language The language is specified as an ISO 3166 alpha-2 two letter country-code -/// followed by ISO 639-1 for the two-letter language code -/// For example, "ko_KR" for Korean, "en_US" for American English -/// @param[in] user_data The user data passed from stte_foreach_supported_langs_cb() -/// @return @c true to continue with the next iteration of the loop -/// @c false to break out of the loop -/// @pre stte_foreach_supported_langs_cb() will invoke this callback function. -/// @see stte_foreach_supported_langs_cb() -typedef stte_supported_language_cb - = ffi.Pointer>; -typedef stte_supported_language_cbFunction = ffi.Bool Function( - ffi.Pointer language, ffi.Pointer user_data); -typedef Dartstte_supported_language_cbFunction = bool Function( - ffi.Pointer language, ffi.Pointer user_data); - -/// @brief Called when the engine service user checks whether the corresponding language is valid or not in STT engine. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// @param[in] language The language is specified as an ISO 3166 alpha-2 two letter country-code -/// followed by ISO 639-1 for the two-letter language code -/// For example, "ko_KR" for Korean, "en_US" for American English -/// @param[out] is_valid A variable for checking whether the corresponding language is valid or not. -/// @c true to be valid, -/// @c false to be invalid -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter -/// @see stte_foreach_supported_languages_cb() -typedef stte_is_valid_language_cb - = ffi.Pointer>; -typedef stte_is_valid_language_cbFunction = ffi.Int Function( - ffi.Pointer language, ffi.Pointer is_valid); -typedef Dartstte_is_valid_language_cbFunction = int Function( - ffi.Pointer language, ffi.Pointer is_valid); - -/// @brief Called when the engine service user checks whether STT engine supports silence detection. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// @return @c true to support silence detection, -/// @c false not to support silence detection -/// @see stte_set_silence_detection_cb() -typedef stte_support_silence_detection_cb = ffi - .Pointer>; -typedef stte_support_silence_detection_cbFunction = ffi.Bool Function(); -typedef Dartstte_support_silence_detection_cbFunction = bool Function(); - -/// @brief Called when the engine service user checks whether STT engine supports the corresponding recognition type. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// @param[in] type The type for recognition (e.g. #STTE_RECOGNITION_TYPE_FREE) -/// @param[out] is_supported A variable for checking whether STT engine supports the corresponding recognition type. -/// @c true to support recognition type, -/// @c false not to support recognition type -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter -typedef stte_support_recognition_type_cb - = ffi.Pointer>; -typedef stte_support_recognition_type_cbFunction = ffi.Int Function( - ffi.Pointer type, ffi.Pointer is_supported); -typedef Dartstte_support_recognition_type_cbFunction = int Function( - ffi.Pointer type, ffi.Pointer is_supported); - -/// @brief Called when the engine service user gets the proper recording format of STT engine. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// The recording format is used for creating the recorder. -/// @param[out] types The format used by the recorder -/// @param[out] rate The sample rate used by the recorder -/// @param[out] channels The number of channels used by the recorder -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_STATE Not initialized -typedef stte_get_recording_format_cb - = ffi.Pointer>; -typedef stte_get_recording_format_cbFunction = ffi.Int Function( - ffi.Pointer types, - ffi.Pointer rate, - ffi.Pointer channels); -typedef Dartstte_get_recording_format_cbFunction = int Function( - ffi.Pointer types, - ffi.Pointer rate, - ffi.Pointer channels); - -/// @brief Called when the engine service user gets the result time information(stamp). -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// In this function, the engine service user's callback function 'stte_result_time_cb()' is invoked repeatedly for sending the time information to the engine service user, and @a user_data must be transferred to 'stte_result_time_cb()'. -/// If 'stte_result_time_cb()' returns @c false, it should be stopped to call 'stte_result_time_cb()'. -/// @a time_info is transferred from stte_send_result(). The type of @a time_info is up to the STT engine developer. -/// @param[in] time_info The time information -/// @param[in] callback The callback function -/// @param[in] user_data The user data which must be passed to the callback function 'stte_result_time_cb()' -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #STTE_ERROR_INVALID_STATE Not initialized -/// @pre stte_send_result() will invoke this function. -/// @post This function invokes stte_result_time_cb() repeatedly for getting result time information. -/// @see stte_result_time_cb() -typedef stte_foreach_result_time_cb - = ffi.Pointer>; -typedef stte_foreach_result_time_cbFunction = ffi.Int Function( - ffi.Pointer time_info, - stte_result_time_cb callback, - ffi.Pointer user_data); -typedef Dartstte_foreach_result_time_cbFunction = int Function( - ffi.Pointer time_info, - stte_result_time_cb callback, - ffi.Pointer user_data); - -/// @brief Called when STT engine provides the time stamp of result to the engine service user. -/// @details This callback function is implemented by the engine service user. Therefore, the engine developer does NOT have to implement this callback function. -/// @since_tizen 3.0 -/// @remarks This callback function is called in stte_foreach_result_time_cb() for adding time information. -/// @a user_data must be transferred from stte_foreach_result_time_cb(). -/// @param[in] index The result index -/// @param[in] event The token event -/// @param[in] text The result text -/// @param[in] start_time The time started speaking the result text -/// @param[in] end_time The time finished speaking the result text -/// @param[in] user_data The user data passed from stte_foreach_result_time_cb() -/// @return @c true to continue with the next iteration of the loop -/// @c false to break out of the loop -/// @pre stte_send_result() should be called. -/// @see stte_send_result() -/// @see stte_foreach_result_time_cb() -typedef stte_result_time_cb - = ffi.Pointer>; -typedef stte_result_time_cbFunction = ffi.Bool Function( - ffi.Int index, - ffi.Int32 event, - ffi.Pointer text, - ffi.Long start_time, - ffi.Long end_time, - ffi.Pointer user_data); -typedef Dartstte_result_time_cbFunction = bool Function( - int index, - int event, - ffi.Pointer text, - int start_time, - int end_time, - ffi.Pointer user_data); - -/// @brief Called when the engine service user sets the silence detection. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// If the engine service user sets this option as 'TRUE', STT engine will detect the silence (EPD) and send the callback event about it. -/// @param[in] is_set A variable for setting the silence detection. -/// @c true to detect the silence, -/// @c false not to detect the silence -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_STATE Not initialized -/// @retval #STTE_ERROR_NOT_SUPPORTED_FEATURE Not supported feature -typedef stte_set_silence_detection_cb - = ffi.Pointer>; -typedef stte_set_silence_detection_cbFunction = ffi.Int Function( - ffi.Bool is_set); -typedef Dartstte_set_silence_detection_cbFunction = int Function(bool is_set); - -/// @brief Called when the engine service user starts to recognize the recording data. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// In this callback function, STT engine must transfer the recognition result and @a user_data to the engine service user using stte_send_result(). -/// Also, if STT engine needs the application's credential, it sets the credential granted to the application. -/// @param[in] language The language is specified as an ISO 3166 alpha-2 two letter country-code -/// followed by ISO 639-1 for the two-letter language code -/// For example, "ko_KR" for Korean, "en_US" for American English -/// @param[in] type The recognition type. (e.g. #STTE_RECOGNITION_TYPE_FREE) -/// @param[in] appid The Application ID -/// @param[in] credential The credential granted to the application -/// @param[in] user_data The user data to be passed to the callback function -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #STTE_ERROR_INVALID_STATE Invalid state -/// @retval #STTE_ERROR_INVALID_LANGUAGE Invalid language -/// @retval #STTE_ERROR_OPERATION_FAILED Operation failure -/// @retval #STTE_ERROR_NETWORK_DOWN Out of network -/// @pre The engine is not in recognition processing. -/// @see stte_set_recording_data_cb() -/// @see stte_stop_cb() -/// @see stte_cancel_cb() -/// @see stte_need_app_credential_cb() -typedef stte_start_cb = ffi.Pointer>; -typedef stte_start_cbFunction = ffi.Int Function( - ffi.Pointer language, - ffi.Pointer type, - ffi.Pointer appid, - ffi.Pointer credential, - ffi.Pointer user_data); -typedef Dartstte_start_cbFunction = int Function( - ffi.Pointer language, - ffi.Pointer type, - ffi.Pointer appid, - ffi.Pointer credential, - ffi.Pointer user_data); - -/// @brief Called when the engine service user sets and sends the recording data for speech recognition. -/// @details This callback function is called by the engine service user to send the recording data to STT engine. -/// The engine receives the recording data and uses for speech recognition. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// Also, this function should be returned immediately after recording data copy. -/// @param[in] data The recording data -/// @param[in] length The length of recording data -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #STTE_ERROR_INVALID_STATE Invalid state -/// @retval #STTE_ERROR_OPERATION_FAILED Operation failure -/// @pre stte_start_cb() should succeed. -/// @post If the engine supports partial result, stte_send_result() should be invoked. -/// @see stte_start_cb() -/// @see stte_cancel_cb() -/// @see stte_stop_cb() -typedef stte_set_recording_data_cb - = ffi.Pointer>; -typedef stte_set_recording_data_cbFunction = ffi.Int Function( - ffi.Pointer data, ffi.UnsignedInt length); -typedef Dartstte_set_recording_data_cbFunction = int Function( - ffi.Pointer data, int length); - -/// @brief Called when the engine service user stops to recognize the recording data. -/// @details This callback function is called by the engine service user to stop recording and to get the recognition result. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_STATE Invalid state -/// @retval #STTE_ERROR_OPERATION_FAILED Operation failure -/// @retval #STTE_ERROR_NETWORK_DOWN Out of network -/// @pre stte_start_cb() should succeed. -/// @post After processing of the engine, stte_send_result() must be called. -/// @see stte_start_cb() -/// @see stte_set_recording_data_cb() -/// @see stte_cancel_cb() -/// @see stte_send_result() -typedef stte_stop_cb = ffi.Pointer>; -typedef stte_stop_cbFunction = ffi.Int Function(); -typedef Dartstte_stop_cbFunction = int Function(); - -/// @brief Called when the engine service user cancels to recognize the recording data. -/// @details This callback function is called by the engine service user to cancel to recognize the recording data. -/// Also, when starting the recorder is failed, this function is called. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful. -/// @retval #STTE_ERROR_INVALID_STATE Invalid state. -/// @pre STT engine is in recognition processing or recording. -/// @see stte_start_cb() -/// @see stte_stop_cb() -typedef stte_cancel_cb - = ffi.Pointer>; -typedef stte_cancel_cbFunction = ffi.Int Function(); -typedef Dartstte_cancel_cbFunction = int Function(); - -/// @brief Called when the engine service user requests for STT engine to check whether the application agreed the usage of STT engine. -/// @details This callback function is called when the engine service user requests for STT engine to check the application's agreement about using the engine. -/// According to the need, the engine developer can provide some user interfaces to check the agreement. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// If the STT engine developer wants not to check the agreement, the developer has need to return proper values as @a is_agreed in accordance with the intention. @c true if the developer regards that every application agreed the usage of the engine, @c false if the developer regards that every application disagreed. -/// NOTE that, however, there may be any legal issue unless the developer checks the agreement. Therefore, we suggest that the engine developers should provide a function to check the agreement. -/// @param[in] appid The Application ID -/// @param[out] is_agreed A variable for checking whether the application agreed to use STT engine or not. -/// @c true to agree, -/// @c false to disagree -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_STATE Not initialized -/// @retval #STTE_ERROR_NOT_SUPPORTED_FEATURE Not supported feature -typedef stte_check_app_agreed_cb - = ffi.Pointer>; -typedef stte_check_app_agreed_cbFunction = ffi.Int Function( - ffi.Pointer appid, ffi.Pointer is_agreed); -typedef Dartstte_check_app_agreed_cbFunction = int Function( - ffi.Pointer appid, ffi.Pointer is_agreed); - -/// @brief Called when the engine service user checks whether STT engine needs the application's credential. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// @return @c true if STT engine needs the application's credential, -/// otherwise @c false -typedef stte_need_app_credential_cb - = ffi.Pointer>; -typedef stte_need_app_credential_cbFunction = ffi.Bool Function(); -typedef Dartstte_need_app_credential_cbFunction = bool Function(); - -/// @brief Called when STT engine receives the private data from the engine service user. -/// @details This callback function is called when the engine service user sends the private data to STT engine. -/// @since_tizen 3.0 -/// @remarks This callback function is optional and is registered using stte_set_private_data_set_cb(). -/// @param[in] key The key field of private data -/// @param[in] data The data field of private data -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #STTE_ERROR_OPERATION_FAILED Operation failure -/// @see stte_private_data_requested_cb() -/// @see stte_set_private_data_set_cb() -typedef stte_private_data_set_cb - = ffi.Pointer>; -typedef stte_private_data_set_cbFunction = ffi.Int Function( - ffi.Pointer key, ffi.Pointer data); -typedef Dartstte_private_data_set_cbFunction = int Function( - ffi.Pointer key, ffi.Pointer data); - -/// @brief Called when STT engine provides the engine service user with the private data. -/// @details This callback function is called when the engine service user gets the private data from STT engine. -/// @since_tizen 3.0 -/// @remarks This callback function is optional and is registered using stte_set_private_data_requested_cb(). -/// @param[out] key The key field of private data -/// @param[out] data The data field of private data -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #STTE_ERROR_OPERATION_FAILED Operation failure -/// @see stte_private_data_set_cb() -/// @see stte_set_private_data_requested_cb() -typedef stte_private_data_requested_cb - = ffi.Pointer>; -typedef stte_private_data_requested_cbFunction = ffi.Int Function( - ffi.Pointer key, ffi.Pointer> data); -typedef Dartstte_private_data_requested_cbFunction = int Function( - ffi.Pointer key, ffi.Pointer> data); - -/// @brief Enumeration for error code. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class tts_error_e { - /// < Successful - static const int TTS_ERROR_NONE = 0; - - /// < Out of Memory - static const int TTS_ERROR_OUT_OF_MEMORY = -12; - - /// < I/O error - static const int TTS_ERROR_IO_ERROR = -5; - - /// < Invalid parameter - static const int TTS_ERROR_INVALID_PARAMETER = -22; - - /// < Network is down - static const int TTS_ERROR_OUT_OF_NETWORK = -100; - - /// < No answer from the daemon - static const int TTS_ERROR_TIMED_OUT = -1073741823; - - /// < Permission denied - static const int TTS_ERROR_PERMISSION_DENIED = -13; - - /// < TTS NOT supported - static const int TTS_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Invalid state - static const int TTS_ERROR_INVALID_STATE = -49348607; - - /// < Invalid voice - static const int TTS_ERROR_INVALID_VOICE = -49348606; - - /// < No available engine - static const int TTS_ERROR_ENGINE_NOT_FOUND = -49348605; - - /// < Operation failed - static const int TTS_ERROR_OPERATION_FAILED = -49348604; - - /// < Audio policy blocked - static const int TTS_ERROR_AUDIO_POLICY_BLOCKED = -49348603; - - /// < Not supported feature of current engine @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif - static const int TTS_ERROR_NOT_SUPPORTED_FEATURE = -49348602; - - /// < Service reset @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif - static const int TTS_ERROR_SERVICE_RESET = -49348601; -} - -/// @brief Enumeration for TTS mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class tts_mode_e { - /// < Default mode for normal application - static const int TTS_MODE_DEFAULT = 0; - - /// < Notification mode - static const int TTS_MODE_NOTIFICATION = 1; - - /// < Accessibiliity mode - static const int TTS_MODE_SCREEN_READER = 2; -} - -/// @brief Enumeration for state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class tts_state_e { - /// < 'CREATED' state - static const int TTS_STATE_CREATED = 0; - - /// < 'READY' state - static const int TTS_STATE_READY = 1; - - /// < 'PLAYING' state - static const int TTS_STATE_PLAYING = 2; - - /// < 'PAUSED' state - static const int TTS_STATE_PAUSED = 3; -} - -final class tts_s extends ffi.Opaque {} - -/// @brief The TTS handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef tts_h = ffi.Pointer; - -/// @brief Called to retrieve the supported voice. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] tts The TTS handle -/// @param[in] language Language specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code (for example, "ko_KR" for Korean, "en_US" for American English) -/// @param[in] voice_type A voice type (e.g. #TTS_VOICE_TYPE_MALE, #TTS_VOICE_TYPE_FEMALE) -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// @c false to break out of the loop -/// @pre tts_foreach_supported_voices() will invoke this callback function. -/// @see tts_foreach_supported_voices() -typedef tts_supported_voice_cb - = ffi.Pointer>; -typedef tts_supported_voice_cbFunction = ffi.Bool Function( - tts_h tts, - ffi.Pointer language, - ffi.Int voice_type, - ffi.Pointer user_data); -typedef Darttts_supported_voice_cbFunction = bool Function( - tts_h tts, - ffi.Pointer language, - int voice_type, - ffi.Pointer user_data); - -/// @brief Called when the state of TTS is changed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @details If the daemon must stop player because of changing engine and -/// the daemon must pause player because of other requests, this callback function is called. -/// @param[in] tts The TTS handle -/// @param[in] previous The previous state -/// @param[in] current The current state -/// @param[in] user_data The user data passed from the callback registration function -/// @pre An application registers this callback using tts_set_state_changed_cb() to detect changing state. -/// @see tts_set_state_changed_cb() -/// @see tts_unset_state_changed_cb() -typedef tts_state_changed_cb - = ffi.Pointer>; -typedef tts_state_changed_cbFunction = ffi.Void Function(tts_h tts, - ffi.Int32 previous, ffi.Int32 current, ffi.Pointer user_data); -typedef Darttts_state_changed_cbFunction = void Function( - tts_h tts, int previous, int current, ffi.Pointer user_data); - -/// @brief Called when utterance has started. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] tts The TTS handle -/// @param[in] utt_id The utterance ID passed from the add text function -/// @param[in] user_data The user data passed from the callback registration function -/// @pre An application registers this callback using tts_set_utterance_started_cb() to detect utterance started. -/// @see tts_add_text() -/// @see tts_set_utterance_started_cb() -/// @see tts_unset_utterance_started_cb() -typedef tts_utterance_started_cb - = ffi.Pointer>; -typedef tts_utterance_started_cbFunction = ffi.Void Function( - tts_h tts, ffi.Int utt_id, ffi.Pointer user_data); -typedef Darttts_utterance_started_cbFunction = void Function( - tts_h tts, int utt_id, ffi.Pointer user_data); - -/// @brief Called when utterance is finished. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] tts The TTS handle -/// @param[in] utt_id The utterance ID passed from the add text function -/// @param[in] user_data The user data passed from the callback registration function -/// @pre An application registers this callback using tts_set_utterance_completed_cb() to detect utterance completed. -/// @see tts_add_text() -/// @see tts_set_utterance_completed_cb() -/// @see tts_unset_utterance_completed_cb() -typedef tts_utterance_completed_cb - = ffi.Pointer>; -typedef tts_utterance_completed_cbFunction = ffi.Void Function( - tts_h tts, ffi.Int utt_id, ffi.Pointer user_data); -typedef Darttts_utterance_completed_cbFunction = void Function( - tts_h tts, int utt_id, ffi.Pointer user_data); - -/// @brief Called when an error occurs. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] tts The TTS handle -/// @param[in] utt_id The utterance ID passed from the add text function -/// @param[in] reason The error code -/// @param[in] user_data The user data passed from the callback registration function -/// @pre An application registers this callback using tts_set_error_cb() to detect error. -/// @see tts_play() -/// @see tts_pause() -/// @see tts_stop() -/// @see tts_set_error_cb() -/// @see tts_unset_error_cb() -typedef tts_error_cb = ffi.Pointer>; -typedef tts_error_cbFunction = ffi.Void Function(tts_h tts, ffi.Int utt_id, - ffi.Int32 reason, ffi.Pointer user_data); -typedef Darttts_error_cbFunction = void Function( - tts_h tts, int utt_id, int reason, ffi.Pointer user_data); - -/// @brief Called when the default voice is changed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] tts The TTS handle -/// @param[in] previous_language The previous language -/// @param[in] previous_voice_type The previous voice type -/// @param[in] current_language The current language -/// @param[in] current_voice_type The current voice type -/// @param[in] user_data The user data passed from the callback registration function -/// @see tts_set_default_voice_changed_cb() -typedef tts_default_voice_changed_cb - = ffi.Pointer>; -typedef tts_default_voice_changed_cbFunction = ffi.Void Function( - tts_h tts, - ffi.Pointer previous_language, - ffi.Int previous_voice_type, - ffi.Pointer current_language, - ffi.Int current_voice_type, - ffi.Pointer user_data); -typedef Darttts_default_voice_changed_cbFunction = void Function( - tts_h tts, - ffi.Pointer previous_language, - int previous_voice_type, - ffi.Pointer current_language, - int current_voice_type, - ffi.Pointer user_data); - -/// @brief Called when the engine is changed. -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -/// @param[in] tts The TTS handle -/// @param[in] engine_id Engine ID -/// @param[in] language The default language specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code (for example, "ko_KR" for Korean, "en_US" for American English) -/// @param[in] voice_type The default voice type -/// @param[in] need_credential The necessity of credential -/// @param[in] user_data The user data passed from the callback registration function -/// @see tts_set_engine_changed_cb() -typedef tts_engine_changed_cb - = ffi.Pointer>; -typedef tts_engine_changed_cbFunction = ffi.Void Function( - tts_h tts, - ffi.Pointer engine_id, - ffi.Pointer language, - ffi.Int voice_type, - ffi.Bool need_credential, - ffi.Pointer user_data); -typedef Darttts_engine_changed_cbFunction = void Function( - tts_h tts, - ffi.Pointer engine_id, - ffi.Pointer language, - int voice_type, - bool need_credential, - ffi.Pointer user_data); - -/// @brief Enumeration for error codes. -/// @since_tizen 3.0 -abstract class ttse_error_e { - /// < Successful - static const int TTSE_ERROR_NONE = 0; - - /// < Out of Memory - static const int TTSE_ERROR_OUT_OF_MEMORY = -12; - - /// < I/O error - static const int TTSE_ERROR_IO_ERROR = -5; - - /// < Invalid parameter - static const int TTSE_ERROR_INVALID_PARAMETER = -22; - - /// < Out of network - static const int TTSE_ERROR_NETWORK_DOWN = -100; - - /// < Permission denied - static const int TTSE_ERROR_PERMISSION_DENIED = -13; - - /// < Invalid state - static const int TTSE_ERROR_INVALID_STATE = -49348607; - - /// < Invalid voice - static const int TTSE_ERROR_INVALID_VOICE = -49348606; - - /// < Operation failed - static const int TTSE_ERROR_OPERATION_FAILED = -49348604; - - /// < Not supported feature - static const int TTSE_ERROR_NOT_SUPPORTED_FEATURE = -49348602; - - /// < Not supported - static const int TTSE_ERROR_NOT_SUPPORTED = -1073741822; -} - -/// @brief Enumeration for audio type. -/// @since_tizen 3.0 -abstract class ttse_audio_type_e { - /// < Signed 16-bit audio type - static const int TTSE_AUDIO_TYPE_RAW_S16 = 0; - - /// < Unsigned 8-bit audio type - static const int TTSE_AUDIO_TYPE_RAW_U8 = 1; - static const int TTSE_AUDIO_TYPE_MAX = 2; -} - -/// @brief Enumeration for result event type. -/// @since_tizen 3.0 -abstract class ttse_result_event_e { - /// < Event when the voice synthesis is failed - static const int TTSE_RESULT_EVENT_FAIL = -1; - - /// < Event when the sound data is first data by callback function - static const int TTSE_RESULT_EVENT_START = 1; - - /// < Event when the next sound data exist, not first and not last - static const int TTSE_RESULT_EVENT_CONTINUE = 2; - - /// < Event when the sound data is last data or sound data is only one result - static const int TTSE_RESULT_EVENT_FINISH = 3; -} - -/// @brief A structure for the TTS engine functions. -/// @details This structure contains essential callback functions for operating TTS engine. -/// @since_tizen 3.0 -/// @remarks These functions are mandatory for operating TTS engine. Therefore, all functions MUST be implemented. -final class ttse_request_callback_s extends ffi.Struct { - /// < The version of the structure 'ttse_request_callback_s' - @ffi.Int() - external int version; - - /// < Called when the engine service user requests the basic information of TTS engine - external ttse_get_info_cb get_info; - - /// < Called when the engine service user initializes TTS engine - external ttse_initialize_cb initialize; - - /// < Called when the engine service user deinitializes TTS engine - external ttse_deinitialize_cb deinitialize; - - /// < Called when the engine service user gets the whole supported voice list - external ttse_foreach_supported_voices_cb foreach_voices; - - /// < Called when the engine service user checks whether the voice is valid or not in TTS engine - external ttse_is_valid_voice_cb is_valid_voice; - - /// < Called when the engine service user sets the default pitch of TTS engine - external ttse_set_pitch_cb set_pitch; - - /// < Called when the engine service user requests to load the corresponding voice type for the first time - external ttse_load_voice_cb load_voice; - - /// < Called when the engine service user requests to unload the corresponding voice type or to stop using voice - external ttse_unload_voice_cb unload_voice; - - /// < Called when the engine service user starts to synthesize a voice, asynchronously - external ttse_start_synthesis_cb start_synth; - - /// < Called when the engine service user cancels to synthesize a voice - external ttse_cancel_synthesis_cb cancel_synth; - - /// < Called when the engine service user requests for TTS engine to check whether the application agreed the usage of TTS engine - external ttse_check_app_agreed_cb check_app_agreed; - - /// < Called when the engine service user checks whether TTS engine needs the application's credential - external ttse_need_app_credential_cb need_app_credential; -} - -/// @brief Called when the engine service user requests the basic information of TTS engine. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using ttse_main(). -/// The allocated @a engine_uuid, @a engine_name, and @a engine_setting will be released internally. -/// In order to upload the engine at Tizen Appstore, both a service app and a ui app are necessary. -/// Therefore, @a engine_setting must be transferred to the engine service user. -/// @param[out] engine_uuid UUID of engine -/// @param[out] engine_name Name of engine -/// @param[out] engine_setting The engine setting application(ui app)'s app ID -/// @param[out] use_network The status for using network -/// @return @c 0 on success, -/// otherwise a negative error code on failure -/// @retval #TTSE_ERROR_NONE Successful -/// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure -typedef ttse_get_info_cb - = ffi.Pointer>; -typedef ttse_get_info_cbFunction = ffi.Int Function( - ffi.Pointer> engine_uuid, - ffi.Pointer> engine_name, - ffi.Pointer> engine_setting, - ffi.Pointer use_network); -typedef Dartttse_get_info_cbFunction = int Function( - ffi.Pointer> engine_uuid, - ffi.Pointer> engine_name, - ffi.Pointer> engine_setting, - ffi.Pointer use_network); - -/// @brief Called when the engine service user initializes TTS engine. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using ttse_main(). -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #TTSE_ERROR_NONE Successful -/// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #TTSE_ERROR_INVALID_STATE Already initialized -/// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure -/// @retval #TTSE_ERROR_PERMISSION_DENIED Permission denied -/// @see ttse_deinitialize_cb() -typedef ttse_initialize_cb - = ffi.Pointer>; -typedef ttse_initialize_cbFunction = ffi.Int Function(); -typedef Dartttse_initialize_cbFunction = int Function(); - -/// @brief Called when the engine service user deinitializes TTS engine. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using ttse_main(). -/// NOTE that the engine may be terminated automatically. -/// When this callback function is invoked, the release of resources is necessary. -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #TTSE_ERROR_NONE Successful -/// @retval #TTSE_ERROR_INVALID_STATE Not initialized -/// @see ttse_initialize_cb() -typedef ttse_deinitialize_cb - = ffi.Pointer>; -typedef ttse_deinitialize_cbFunction = ffi.Int Function(); -typedef Dartttse_deinitialize_cbFunction = int Function(); - -/// @brief Called when the engine service user gets the whole supported voice list. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using ttse_main(). -/// In this function, the engine service user's callback function 'ttse_supported_voice_cb()' is invoked repeatedly for getting all supported voices, and @a user_data must be transferred to 'ttse_supported_voice_cb()'. -/// If 'ttse_supported_voice_cb()' returns @c false, it should be stopped to call 'ttse_supported_voice_cb()'. -/// @param[in] callback The callback function -/// @param[in] user_data The user data which must be passed to ttse_supported_voice_cb() -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #TTSE_ERROR_NONE Successful -/// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #TTSE_ERROR_INVALID_STATE Not initialized -/// @post This callback function invokes ttse_supported_voice_cb() repeatedly for getting all supported voices. -/// @see ttse_supported_voice_cb() -typedef ttse_foreach_supported_voices_cb - = ffi.Pointer>; -typedef ttse_foreach_supported_voices_cbFunction = ffi.Int Function( - ttse_supported_voice_cb callback, ffi.Pointer user_data); -typedef Dartttse_foreach_supported_voices_cbFunction = int Function( - ttse_supported_voice_cb callback, ffi.Pointer user_data); - -/// @brief Called when TTS engine informs the engine service user about whole supported language and voice type list. -/// @details This callback function is implemented by the engine service user. Therefore, the engine developer does NOT have to implement this callback function. -/// @since_tizen 3.0 -/// @remarks This callback function is called by ttse_foreach_supported_voices_cb() to inform the whole supported voice list. -/// @a user_data must be transferred from ttse_foreach_supported_voices_cb(). -/// @param[in] language The language is specified as an ISO 3166 alpha-2 two-letter country code -/// followed by ISO 639-1 for the two-letter language code. -/// For example, "ko_KR" for Korean, "en_US" for American English -/// @param[in] type The voice type -/// @param[in] user_data The user data passed from ttse_foreach_supported_voices_cb() -/// @return @c true to continue with the next iteration of the loop -/// @c false to break out of the loop -/// @pre ttse_foreach_supported_voices_cb() will invoke this callback function. -/// @see ttse_foreach_supported_voices_cb() -typedef ttse_supported_voice_cb - = ffi.Pointer>; -typedef ttse_supported_voice_cbFunction = ffi.Bool Function( - ffi.Pointer language, - ffi.Int type, - ffi.Pointer user_data); -typedef Dartttse_supported_voice_cbFunction = bool Function( - ffi.Pointer language, int type, ffi.Pointer user_data); - -/// @brief Called when the engine service user checks whether the voice is valid or not in TTS engine. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using ttse_main(). -/// @param[in] language The language is specified as an ISO 3166 alpha-2 two-letter country code -/// followed by ISO 639-1 for the two-letter language code. -/// For example, "ko_KR" for Korean, "en_US" for American English -/// @param[in] type The voice type -/// @param[out] is_valid A variable for checking whether the corresponding voice is valid or not. -/// @c true to be valid, -/// @c false to be invalid -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #TTSE_ERROR_NONE Successful -/// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter -/// @see ttse_foreach_supported_voices_cb() -typedef ttse_is_valid_voice_cb - = ffi.Pointer>; -typedef ttse_is_valid_voice_cbFunction = ffi.Int Function( - ffi.Pointer language, - ffi.Int type, - ffi.Pointer is_valid); -typedef Dartttse_is_valid_voice_cbFunction = int Function( - ffi.Pointer language, int type, ffi.Pointer is_valid); - -/// @brief Called when the engine service user sets the default pitch of TTS engine. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using ttse_main(). -/// @param[in] pitch The default pitch -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #TTSE_ERROR_NONE Successful -/// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #TTSE_ERROR_INVALID_STATE Not initialized -/// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure -typedef ttse_set_pitch_cb - = ffi.Pointer>; -typedef ttse_set_pitch_cbFunction = ffi.Int Function(ffi.Int pitch); -typedef Dartttse_set_pitch_cbFunction = int Function(int pitch); - -/// @brief Called when the engine service user requests to load the corresponding voice type for the first time. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using ttse_main(). -/// @param[in] language The language is specified as an ISO 3166 alpha-2 two-letter country code -/// followed by ISO 639-1 for the two-letter language code. -/// For example, "ko_KR" for Korean, "en_US" for American English -/// @param[in] type The voice type -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #TTSE_ERROR_NONE Successful -/// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #TTSE_ERROR_INVALID_STATE Not initialized -/// @retval #TTSE_ERROR_OUT_OF_MEMORY Out of memory -/// @retval #TTSE_ERROR_INVALID_VOICE Invalid voice -/// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure -/// @see ttse_unload_voice_cb() -typedef ttse_load_voice_cb - = ffi.Pointer>; -typedef ttse_load_voice_cbFunction = ffi.Int Function( - ffi.Pointer language, ffi.Int type); -typedef Dartttse_load_voice_cbFunction = int Function( - ffi.Pointer language, int type); - -/// @brief Called when the engine service user requests to unload the corresponding voice type or to stop using voice. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using ttse_main(). -/// @param[in] language The language is specified as an ISO 3166 alpha-2 two-letter country code -/// followed by ISO 639-1 for the two-letter language code. -/// For example, "ko_KR" for Korean, "en_US" for American English -/// @param[in] type The voice type -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #TTSE_ERROR_NONE Successful -/// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #TTSE_ERROR_INVALID_STATE Not initialized -/// @retval #TTSE_ERROR_INVALID_VOICE Invalid voice -/// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure -/// @see ttse_load_voice_cb() -typedef ttse_unload_voice_cb - = ffi.Pointer>; -typedef ttse_unload_voice_cbFunction = ffi.Int Function( - ffi.Pointer language, ffi.Int type); -typedef Dartttse_unload_voice_cbFunction = int Function( - ffi.Pointer language, int type); - -/// @brief Called when the engine service user starts to synthesize a voice, asynchronously. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using ttse_main(). -/// In this callback function, TTS engine must transfer the synthesized result and @a user_data to the engine service user using ttse_send_result(). -/// Also, if TTS engine needs the application's credential, it can set the credential granted to the application. -/// @param[in] language The language is specified as an ISO 3166 alpha-2 two-letter country code -/// followed by ISO 639-1 for the two-letter language code. -/// For example, "ko_KR" for Korean, "en_US" for American English -/// @param[in] type The voice type -/// @param[in] text Texts -/// @param[in] speed The speed of speaking -/// @param[in] appid The Application ID -/// @param[in] credential The credential granted to the application -/// @param[in] user_data The user data which must be passed to ttse_send_result() -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #TTSE_ERROR_NONE Successful -/// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #TTSE_ERROR_INVALID_STATE Not initialized or already started synthesis -/// @retval #TTSE_ERROR_INVALID_VOICE Invalid voice -/// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure -/// @retval #TTSE_ERROR_NETWORK_DOWN Out of network -/// @retval #TTSE_ERROR_PERMISSION_DENIED Permission denied -/// @post This function invokes ttse_send_result(). -/// @see ttse_send_result() -/// @see ttse_cancel_synthesis_cb() -/// @see ttse_need_app_credential_cb() -typedef ttse_start_synthesis_cb - = ffi.Pointer>; -typedef ttse_start_synthesis_cbFunction = ffi.Int Function( - ffi.Pointer language, - ffi.Int type, - ffi.Pointer text, - ffi.Int speed, - ffi.Pointer appid, - ffi.Pointer credential, - ffi.Pointer user_data); -typedef Dartttse_start_synthesis_cbFunction = int Function( - ffi.Pointer language, - int type, - ffi.Pointer text, - int speed, - ffi.Pointer appid, - ffi.Pointer credential, - ffi.Pointer user_data); - -/// @brief Called when the engine service user cancels to synthesize a voice. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using ttse_main(). -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #TTSE_ERROR_NONE Successful -/// @retval #TTSE_ERROR_INVALID_STATE Not initialized or not started synthesis -/// @pre The ttse_start_synthesis_cb() should be performed -/// @see ttse_start_synthesis_cb() -typedef ttse_cancel_synthesis_cb - = ffi.Pointer>; -typedef ttse_cancel_synthesis_cbFunction = ffi.Int Function(); -typedef Dartttse_cancel_synthesis_cbFunction = int Function(); - -/// @brief Called when the engine service user requests for TTS engine to check whether the application agreed the usage of TTS engine. -/// @details This callback function is called when the engine service user requests for TTS engine to check the application's agreement about using the engine. -/// According to the need, the engine developer can provide some user interfaces to check the agreement. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using ttse_main(). -/// If the TTS engine developer wants not to check the agreement, the developer has need to return proper values as @a is_agreed in accordance with the intention. @c true if the developer regards that every application agreed the usage of the engine, @c false if the developer regards that every application disagreed. -/// NOTE that, however, there may be any legal issue unless the developer checks the agreement. Therefore, we suggest that the engine developers should provide a function to check the agreement. -/// @param[in] appid The Application ID -/// @param[out] is_agreed A variable for checking whether the application agreed to use TTS engine or not. -/// @c true to agree, -/// @c false to disagree -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #TTSE_ERROR_NONE Successful -/// @retval #TTSE_ERROR_INVALID_STATE Not initialized -/// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #TTSE_ERROR_NOT_SUPPORTED_FEATURE Not supported feature -typedef ttse_check_app_agreed_cb - = ffi.Pointer>; -typedef ttse_check_app_agreed_cbFunction = ffi.Int Function( - ffi.Pointer appid, ffi.Pointer is_agreed); -typedef Dartttse_check_app_agreed_cbFunction = int Function( - ffi.Pointer appid, ffi.Pointer is_agreed); - -/// @brief Called when the engine service user checks whether TTS engine needs the application's credential. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using ttse_main(). -/// @return @c true if TTS engine needs the application's credential, -/// otherwise @c false -typedef ttse_need_app_credential_cb - = ffi.Pointer>; -typedef ttse_need_app_credential_cbFunction = ffi.Bool Function(); -typedef Dartttse_need_app_credential_cbFunction = bool Function(); - -/// @brief Called when TTS engine receives the private data from the engine service user. -/// @details This callback function is called when the engine service user sends the private data to TTS engine. -/// @since_tizen 3.0 -/// @remarks This callback function is optional and is registered using ttse_set_private_data_set_cb(). -/// @param[in] key The key field of private data -/// @param[in] data The data field of private data -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #TTSE_ERROR_NONE Successful -/// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure -/// @retval #TTSE_ERROR_NOT_SUPPORTED_FEATURE Not supported feature -/// @see ttse_private_data_requested_cb() -/// @see ttse_set_private_data_set_cb() -typedef ttse_private_data_set_cb - = ffi.Pointer>; -typedef ttse_private_data_set_cbFunction = ffi.Int Function( - ffi.Pointer key, ffi.Pointer data); -typedef Dartttse_private_data_set_cbFunction = int Function( - ffi.Pointer key, ffi.Pointer data); - -/// @brief Called when TTS engine provides the engine service user with the private data. -/// @details This callback function is called when the engine service user gets the private data from TTS engine. -/// @since_tizen 3.0 -/// @remarks This callback function is optional and is registered using ttse_set_private_data_requested_cb(). -/// @param[out] key The key field of private data -/// @param[out] data The data field of private data -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #TTSE_ERROR_NONE Successful -/// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure -/// @retval #TTSE_ERROR_NOT_SUPPORTED_FEATURE Not supported feature -/// @see ttse_private_data_set_cb() -/// @see ttse_set_private_data_requested_cb() -typedef ttse_private_data_requested_cb - = ffi.Pointer>; -typedef ttse_private_data_requested_cbFunction = ffi.Int Function( - ffi.Pointer key, ffi.Pointer> data); -typedef Dartttse_private_data_requested_cbFunction = int Function( - ffi.Pointer key, ffi.Pointer> data); - -/// @brief Called to retrieve supported language. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] language A language is specified as an ISO 3166 alpha-2 two letter country-code -/// followed by ISO 639-1 for the two-letter language code. -/// For example, "ko_KR" for Korean, "en_US" for American English -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// @c false to break out of the loop -/// @pre The function will invoke this callback. -typedef vc_supported_language_cb - = ffi.Pointer>; -typedef vc_supported_language_cbFunction = ffi.Bool Function( - ffi.Pointer language, ffi.Pointer user_data); -typedef Dartvc_supported_language_cbFunction = bool Function( - ffi.Pointer language, ffi.Pointer user_data); - -/// @brief Enumeration for client state. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class vc_state_e { - /// < 'None' state - static const int VC_STATE_NONE = 0; - - /// < 'Initialized' state - static const int VC_STATE_INITIALIZED = 1; - - /// < 'Ready' state - static const int VC_STATE_READY = 2; -} - -/// @brief Enumeration for service state. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class vc_service_state_e { - /// < 'None' state - static const int VC_SERVICE_STATE_NONE = 0; - - /// < 'Ready' state - static const int VC_SERVICE_STATE_READY = 1; - - /// < 'Recording' state - static const int VC_SERVICE_STATE_RECORDING = 2; - - /// < 'Processing' state - static const int VC_SERVICE_STATE_PROCESSING = 3; -} - -/// @brief The voice command list handle. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -typedef vc_cmd_list_h = ffi.Pointer; - -final class vc_cmd_list_s extends ffi.Opaque {} - -/// @brief Called when client gets the recognition result. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @remarks If the duplicated commands are recognized, the event(e.g. #VC_RESULT_EVENT_REJECTED) of command may be rejected -/// for selecting command as priority. If you set similar or same commands or the recognized results are multi-results, -/// vc_cmd_list has the multi commands. -/// @param[in] event The result event (e.g. #VC_RESULT_EVENT_RESULT_SUCCESS, #VC_RESULT_EVENT_REJECTED) -/// @param[in] vc_cmd_list The recognized command list -/// @param[in] result The spoken text -/// @param[in] user_data The user data passed from the callback registration function -/// @pre An application registers callback function. -/// @see vc_set_result_cb() -typedef vc_result_cb = ffi.Pointer>; -typedef vc_result_cbFunction = ffi.Void Function( - ffi.Int32 event, - vc_cmd_list_h vc_cmd_list, - ffi.Pointer result, - ffi.Pointer user_data); -typedef Dartvc_result_cbFunction = void Function( - int event, - vc_cmd_list_h vc_cmd_list, - ffi.Pointer result, - ffi.Pointer user_data); - -/// @brief Enumeration for result event. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class vc_result_event_e { - /// < Normal result - static const int VC_RESULT_EVENT_RESULT_SUCCESS = 0; - - /// < Rejected result - static const int VC_RESULT_EVENT_REJECTED = 1; -} - -/// @brief Called when the state of voice control service is changed. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] previous A previous state -/// @param[in] current A current state -/// @param[in] user_data The user data passed from the callback registration function -/// @pre An application registers this callback to detect changing service state. -/// @see vc_set_service_state_changed_cb() -typedef vc_service_state_changed_cb - = ffi.Pointer>; -typedef vc_service_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 previous, ffi.Int32 current, ffi.Pointer user_data); -typedef Dartvc_service_state_changed_cbFunction = void Function( - int previous, int current, ffi.Pointer user_data); - -/// @brief Called when the state of voice control client is changed. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] previous A previous state -/// @param[in] current A current state -/// @param[in] user_data The user data passed from the callback registration function -/// @pre An application registers this callback to detect changing state. -/// @see vc_set_state_changed_cb() -typedef vc_state_changed_cb - = ffi.Pointer>; -typedef vc_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 previous, ffi.Int32 current, ffi.Pointer user_data); -typedef Dartvc_state_changed_cbFunction = void Function( - int previous, int current, ffi.Pointer user_data); - -/// @brief Called when default language is changed. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] previous Previous language -/// @param[in] current Current language -/// @param[in] user_data The user data passed from the callback registration function -/// @pre An application registers this callback to detect changing mode. -/// @see vc_set_current_language_changed_cb() -typedef vc_current_language_changed_cb - = ffi.Pointer>; -typedef vc_current_language_changed_cbFunction = ffi.Void Function( - ffi.Pointer previous, - ffi.Pointer current, - ffi.Pointer user_data); -typedef Dartvc_current_language_changed_cbFunction = void Function( - ffi.Pointer previous, - ffi.Pointer current, - ffi.Pointer user_data); - -/// @brief Called when error occurred. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] reason The error type (e.g. #VC_ERROR_OUT_OF_MEMORY, #VC_ERROR_TIMED_OUT) -/// @param[in] user_data The user data passed from the callback registration function -/// @pre An application registers this callback to detect error. -/// @see vc_set_error_cb() -typedef vc_error_cb = ffi.Pointer>; -typedef vc_error_cbFunction = ffi.Void Function( - ffi.Int32 reason, ffi.Pointer user_data); -typedef Dartvc_error_cbFunction = void Function( - int reason, ffi.Pointer user_data); - -/// @brief Enumeration for error codes. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class vc_error_e { - /// < Successful - static const int VC_ERROR_NONE = 0; - - /// < Out of Memory - static const int VC_ERROR_OUT_OF_MEMORY = -12; - - /// < I/O error - static const int VC_ERROR_IO_ERROR = -5; - - /// < Invalid parameter - static const int VC_ERROR_INVALID_PARAMETER = -22; - - /// < No answer from service - static const int VC_ERROR_TIMED_OUT = -1073741823; - - /// < Busy recorder - static const int VC_ERROR_RECORDER_BUSY = -16; - - /// < Permission denied - static const int VC_ERROR_PERMISSION_DENIED = -13; - - /// < VC NOT supported - static const int VC_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Invalid state - static const int VC_ERROR_INVALID_STATE = -49610735; - - /// < Invalid language - static const int VC_ERROR_INVALID_LANGUAGE = -49610734; - - /// < No available engine - static const int VC_ERROR_ENGINE_NOT_FOUND = -49610733; - - /// < Operation failed - static const int VC_ERROR_OPERATION_FAILED = -49610732; - - /// < Operation rejected - static const int VC_ERROR_OPERATION_REJECTED = -49610731; - - /// < List reached end - static const int VC_ERROR_ITERATION_END = -49610730; - - /// < List empty - static const int VC_ERROR_EMPTY = -49610729; - - /// < Service daemon reset (Since 3.0) - static const int VC_ERROR_SERVICE_RESET = -49610728; - - /// < In progress to ready (Since 3.0) - static const int VC_ERROR_IN_PROGRESS_TO_READY = -49610727; - - /// < In progress to recording (Since 3.0) - static const int VC_ERROR_IN_PROGRESS_TO_RECORDING = -49610720; - - /// < In progress to processing (Since 3.0) - static const int VC_ERROR_IN_PROGRESS_TO_PROCESSING = -49610719; -} - -const int TIZEN_ERROR_MAX_PLATFORM_ERROR = 0; - -const int TIZEN_ERROR_MIN_PLATFORM_ERROR = -1073741824; - -const int TIZEN_ERROR_MIN_MODULE_ERROR = -2147483648; - -const int TIZEN_ERROR_MAX_MODULE_ERROR = -1073741825; - -const int TIZEN_ERROR_APPLICATION_CLASS = -512; - -const int TIZEN_ERROR_BASE_CLASS = -1024; - -const int TIZEN_ERROR_CONTENT_CLASS = -2048; - -const int TIZEN_ERROR_LOCATION_CLASS = -4096; - -const int TIZEN_ERROR_MULTIMEDIA_CLASS = -8192; - -const int TIZEN_ERROR_MESSAGING_CLASS = -16384; - -const int TIZEN_ERROR_NETWORK_CLASS = -32768; - -const int TIZEN_ERROR_SOCIAL_CLASS = -65536; - -const int TIZEN_ERROR_SYSTEM_CLASS = -131072; - -const int TIZEN_ERROR_TELEPHONY_CLASS = -262144; - -const int TIZEN_ERROR_UI_CLASS = -524288; - -const int TIZEN_ERROR_UIX_CLASS = -1048576; - -const int TIZEN_ERROR_AD_CLASS = -2097152; - -const int TIZEN_ERROR_WEB_CLASS = -4194304; - -const int TIZEN_ERROR_DRM_CLASS = -8388608; - -const int TIZEN_ERROR_ACCOUNT_CLASS = -16777216; - -const int TIZEN_ERROR_ACCOUNT = -16777216; - -const int TIZEN_ERROR_ACCOUNT_OAUTH = -16842752; - -const int TIZEN_ERROR_SYNC_MANAGER = -16908288; - -const int TIZEN_ERROR_FIDO = -16973824; - -const int TIZEN_ERROR_APPLICATION = -17825792; - -const int TIZEN_ERROR_APPLICATION_MANAGER = -17891328; - -const int TIZEN_ERROR_BADGE = -17956864; - -const int TIZEN_ERROR_MESSAGE_PORT = -18022400; - -const int TIZEN_ERROR_NOTIFICATION = -18087936; - -const int TIZEN_ERROR_PACKAGE_MANAGER = -18153472; - -const int TIZEN_ERROR_SHORTCUT = -18219008; - -const int TIZEN_ERROR_BUNDLE = -18350080; - -const int TIZEN_ERROR_DATA_CONTROL = -18415616; - -const int TIZEN_ERROR_SERVICE_APPLICATION = -18874368; - -const int TIZEN_ERROR_MINICONTROL = -18939904; - -const int TIZEN_ERROR_UTILITY_ICU = -22020096; - -const int TIZEN_ERROR_MIME_TYPE = -23068672; - -const int TIZEN_ERROR_MEDIA_CONTENT = -23134208; - -const int TIZEN_ERROR_EMAIL_SERVICE = -24117248; - -const int TIZEN_ERROR_MESSAGING_SERVICE = -24182784; - -const int TIZEN_ERROR_PUSH = -24248320; - -const int TIZEN_ERROR_AUDIO_IO = -26214400; - -const int TIZEN_ERROR_CAMERA = -26279936; - -const int TIZEN_ERROR_IMAGE_UTIL = -26345472; - -const int TIZEN_ERROR_METADATA_EXTRACTOR = -26411008; - -const int TIZEN_ERROR_PLAYER = -26476544; - -const int TIZEN_ERROR_RECORDER = -26542080; - -const int TIZEN_ERROR_SOUND_MANAGER = -26607616; - -const int TIZEN_ERROR_TONE_PLAYER = -26673152; - -const int TIZEN_ERROR_VIDEO_UTIL = -26738688; - -const int TIZEN_ERROR_WAV_PLAYER = -26804224; - -const int TIZEN_ERROR_RADIO = -26869760; - -const int TIZEN_ERROR_MEDIACODEC = -26935296; - -const int TIZEN_ERROR_METADATA_EDITOR = -27000832; - -const int TIZEN_ERROR_MEDIA_VISION = -27066368; - -const int TIZEN_ERROR_MEDIA_DEMUXER = -27131904; - -const int TIZEN_ERROR_MEDIA_MUXER = -27197440; - -const int TIZEN_ERROR_MEDIA_STREAMER = -27262976; - -const int TIZEN_ERROR_STREAMRECORDER = -27328512; - -const int TIZEN_ERROR_MEDIA_TOOL = -27394048; - -const int TIZEN_ERROR_BLUETOOTH = -29360128; - -const int TIZEN_ERROR_CONNECTION = -29425664; - -const int TIZEN_ERROR_NFC = -29491200; - -const int TIZEN_ERROR_SERIAL = -29556736; - -const int TIZEN_ERROR_TETHERING = -29622272; - -const int TIZEN_ERROR_WIFI = -29687808; - -const int TIZEN_ERROR_WIFI_DIRECT = -29753344; - -const int TIZEN_ERROR_SMARTCARD = -29818880; - -const int TIZEN_ERROR_IOTCON = -29884416; - -const int TIZEN_ERROR_SSDP = -29949952; - -const int TIZEN_ERROR_DNSSD = -30015488; - -const int TIZEN_ERROR_VPNSVC = -30081024; - -const int TIZEN_ERROR_MTP = -30146560; - -const int TIZEN_ERROR_HTTP = -30212096; - -const int TIZEN_ERROR_WIFI_MANAGER = -30277632; - -const int TIZEN_ERROR_PRIVACY_MANAGER = -31457280; - -const int TIZEN_ERROR_KEY_MANAGER = -31522816; - -const int TIZEN_ERROR_PRIVILEGE_INFORMATION = -31588352; - -const int TIZEN_ERROR_CSR = -31653888; - -const int TIZEN_ERROR_CALENDAR = -33554432; - -const int TIZEN_ERROR_CONTACTS = -33619968; - -const int TIZEN_ERROR_PHONENUMBER_UTILS = -33685504; - -const int TIZEN_ERROR_STORAGE = -35651584; - -const int TIZEN_ERROR_VCONF = -35717120; - -const int TIZEN_ERROR_DEVICE = -37748736; - -const int TIZEN_ERROR_DLOG = -37814272; - -const int TIZEN_ERROR_MEDIA_KEY = -37879808; - -const int TIZEN_ERROR_RUNTIME_INFORMATION = -37945344; - -const int TIZEN_ERROR_SENSOR = -38010880; - -const int TIZEN_ERROR_SYSTEM_INFORMATION = -38076416; - -const int TIZEN_ERROR_SYSTEM_SETTING = -38141952; - -const int TIZEN_ERROR_SYSTEM_RESOURCE = -38207488; - -const int TIZEN_ERROR_CONTEXT = -38273024; - -const int TIZEN_ERROR_HEALTH = -38338560; - -const int TIZEN_ERROR_FEEDBACK = -38404096; - -const int TIZEN_ERROR_USB_HOST = -38469632; - -const int TIZEN_ERROR_TELEPHONY = -39845888; - -const int TIZEN_ERROR_EFL_UTIL = -41943040; - -const int TIZEN_ERROR_UTILX = -42008576; - -const int TIZEN_ERROR_NATIVE_BUFFER = -42074112; - -const int TIZEN_ERROR_TBM = -42139648; - -const int TIZEN_ERROR_EOM = -42205184; - -const int TIZEN_ERROR_PANEL = -42270720; - -const int TIZEN_ERROR_TZSH = -42336256; - -const int TIZEN_ERROR_DOWNLOAD = -44040192; - -const int TIZEN_ERROR_WEBVIEW = -44105728; - -const int TIZEN_ERROR_LOCATION_MANAGER = -46137344; - -const int TIZEN_ERROR_GEOFENCE_MANAGER = -46202880; - -const int TIZEN_ERROR_MAPS_SERVICE = -46268416; - -const int TIZEN_ERROR_STT = -49283072; - -const int TIZEN_ERROR_TTS = -49348608; - -const int TIZEN_ERROR_IME = -49414144; - -const int TIZEN_ERROR_SERVICE_ADAPTOR = -49479680; - -const int TIZEN_ERROR_WIDGET = -49545216; - -const int TIZEN_ERROR_VOICE_CONTROL = -49610752; - -const int TIZEN_ERROR_ASP = -49676288; - -const int TIZEN_ZIGBEE_ERROR = -49741824; - -const int TIZEN_ERROR_STC = -49807360; - -const int TIZEN_ERROR_THUMBNAIL_UTIL = -49872896; - -const int TIZEN_ERROR_JOB_SCHEDULER = -49938432; - -const String APP_CONTROL_OPERATION_MAIN = - 'http://tizen.org/appcontrol/operation/main'; - -const String APP_CONTROL_OPERATION_DEFAULT = - 'http://tizen.org/appcontrol/operation/default'; - -const String APP_CONTROL_OPERATION_EDIT = - 'http://tizen.org/appcontrol/operation/edit'; - -const String APP_CONTROL_OPERATION_VIEW = - 'http://tizen.org/appcontrol/operation/view'; - -const String APP_CONTROL_OPERATION_PICK = - 'http://tizen.org/appcontrol/operation/pick'; - -const String APP_CONTROL_OPERATION_CREATE_CONTENT = - 'http://tizen.org/appcontrol/operation/create_content'; - -const String APP_CONTROL_OPERATION_CALL = - 'http://tizen.org/appcontrol/operation/call'; - -const String APP_CONTROL_OPERATION_SEND = - 'http://tizen.org/appcontrol/operation/send'; - -const String APP_CONTROL_OPERATION_SEND_TEXT = - 'http://tizen.org/appcontrol/operation/send_text'; - -const String APP_CONTROL_OPERATION_SHARE = - 'http://tizen.org/appcontrol/operation/share'; - -const String APP_CONTROL_OPERATION_MULTI_SHARE = - 'http://tizen.org/appcontrol/operation/multi_share'; - -const String APP_CONTROL_OPERATION_SHARE_TEXT = - 'http://tizen.org/appcontrol/operation/share_text'; - -const String APP_CONTROL_OPERATION_DIAL = - 'http://tizen.org/appcontrol/operation/dial'; - -const String APP_CONTROL_OPERATION_SEARCH = - 'http://tizen.org/appcontrol/operation/search'; - -const String APP_CONTROL_OPERATION_DOWNLOAD = - 'http://tizen.org/appcontrol/operation/download'; - -const String APP_CONTROL_OPERATION_PRINT = - 'http://tizen.org/appcontrol/operation/print'; - -const String APP_CONTROL_OPERATION_COMPOSE = - 'http://tizen.org/appcontrol/operation/compose'; - -const String APP_CONTROL_OPERATION_LAUNCH_ON_EVENT = - 'http://tizen.org/appcontrol/operation/launch_on_event'; - -const String APP_CONTROL_OPERATION_ADD = - 'http://tizen.org/appcontrol/operation/add'; - -const String APP_CONTROL_OPERATION_IMAGE_CAPTURE = - 'http://tizen.org/appcontrol/operation/image_capture'; - -const String APP_CONTROL_OPERATION_VIDEO_CAPTURE = - 'http://tizen.org/appcontrol/operation/video_capture'; - -const String APP_CONTROL_OPERATION_SETTING_BT_ENABLE = - 'http://tizen.org/appcontrol/operation/setting/bt_enable'; - -const String APP_CONTROL_OPERATION_SETTING_BT_VISIBILITY = - 'http://tizen.org/appcontrol/operation/setting/bt_visibility'; - -const String APP_CONTROL_OPERATION_SETTING_LOCATION = - 'http://tizen.org/appcontrol/operation/setting/location'; - -const String APP_CONTROL_OPERATION_SETTING_NFC = - 'http://tizen.org/appcontrol/operation/setting/nfc'; - -const String APP_CONTROL_OPERATION_SETTING = - 'http://tizen.org/appcontrol/operation/setting'; - -const String APP_CONTROL_OPERATION_SETTING_WIFI = - 'http://tizen.org/appcontrol/operation/setting/wifi'; - -const String APP_CONTROL_OPERATION_SETTING_VPN = - 'http://tizen.org/appcontrol/operation/setting/vpn'; - -const String APP_CONTROL_OPERATION_GET_INPUT = - 'http://tizen.org/appcontrol/operation/get_input'; - -const String APP_CONTROL_DATA_SUBJECT = - 'http://tizen.org/appcontrol/data/subject'; - -const String APP_CONTROL_DATA_TO = 'http://tizen.org/appcontrol/data/to'; - -const String APP_CONTROL_DATA_CC = 'http://tizen.org/appcontrol/data/cc'; - -const String APP_CONTROL_DATA_BCC = 'http://tizen.org/appcontrol/data/bcc'; - -const String APP_CONTROL_DATA_TEXT = 'http://tizen.org/appcontrol/data/text'; - -const String APP_CONTROL_DATA_TITLE = 'http://tizen.org/appcontrol/data/title'; - -const String APP_CONTROL_DATA_SELECTED = - 'http://tizen.org/appcontrol/data/selected'; - -const String APP_CONTROL_DATA_PATH = 'http://tizen.org/appcontrol/data/path'; - -const String APP_CONTROL_DATA_SELECTION_MODE = - 'http://tizen.org/appcontrol/data/selection_mode'; - -const String APP_CONTROL_DATA_CALENDAR_ALL_DAY = - 'http://tizen.org/appcontrol/data/calendar/all_day'; - -const String APP_CONTROL_DATA_CALENDAR_START_TIME = - 'http://tizen.org/appcontrol/data/calendar/start_time'; - -const String APP_CONTROL_DATA_CALENDAR_END_TIME = - 'http://tizen.org/appcontrol/data/calendar/end_time'; - -const String APP_CONTROL_DATA_EMAIL = 'http://tizen.org/appcontrol/data/email'; - -const String APP_CONTROL_DATA_PHONE = 'http://tizen.org/appcontrol/data/phone'; - -const String APP_CONTROL_DATA_URL = 'http://tizen.org/appcontrol/data/url'; - -const String APP_CONTROL_DATA_ID = 'http://tizen.org/appcontrol/data/id'; - -const String APP_CONTROL_DATA_TYPE = 'http://tizen.org/appcontrol/data/type'; - -const String APP_CONTROL_DATA_TOTAL_COUNT = - 'http://tizen.org/appcontrol/data/total_count'; - -const String APP_CONTROL_DATA_TOTAL_SIZE = - 'http://tizen.org/appcontrol/data/total_size'; - -const String APP_CONTROL_DATA_NAME = 'http://tizen.org/appcontrol/data/name'; - -const String APP_CONTROL_DATA_LOCATION = - 'http://tizen.org/appcontrol/data/location'; - -const String APP_CONTROL_DATA_INPUT_TYPE = - 'http://tizen.org/appcontrol/data/input_type'; - -const String APP_CONTROL_DATA_INPUT_DEFAULT_TEXT = - 'http://tizen.org/appcontrol/data/input_default_text'; - -const String APP_CONTROL_DATA_INPUT_GUIDE_TEXT = - 'http://tizen.org/appcontrol/data/input_guide_text'; - -const String APP_CONTROL_DATA_INPUT_PREDICTION_HINT = - 'http://tizen.org/appcontrol/data/input_prediction_hint'; - -const String APP_CONTROL_DATA_INPUT_RETURNKEY_TYPE = - 'http://tizen.org/appcontrol/data/input_returnkey_type'; - -const String APP_CONTROL_DATA_INPUT_MAX_TEXT_LENGTH = - 'http://tizen.org/appcontrol/data/input_max_text_length'; - -const String APP_CONTROL_DATA_INPUT_CURSOR_POSITION_SET = - 'http://tizen.org/appcontrol/data/input_cursor_position_set'; - -const String APP_CONTROL_DATA_INPUT_CURSOR_POSITION_GET = - 'http://tizen.org/appcontrol/data/input_cursor_position_get'; - -const String APP_CONTROL_DATA_INPUT_REPLY_TYPE = - 'http://tizen.org/appcontrol/data/input_reply_type'; - -const String APP_CONTROL_DATA_WIDGET_INSTANCE_ID = - 'http://tizen.org/appcontrol/data/widget_instance_id'; - -const String APP_CONTROL_DATA_WIDGET_CONTENT = - 'http://tizen.org/appcontrol/data/widget_content'; - -const String APP_CONTROL_DATA_WIDGET_APP_ID = - 'http://tizen.org/appcontrol/data/widget_app_id'; - -const int NOTIFICATION_DO_NOT_SHOW_TIME_STAMP = -1; - -const String APP_CONTROL_DATA_ALARM_ID = - 'http://tizen.org/appcontrol/data/alarm_id'; - -const String SYSTEM_EVENT_BATTERY_CHARGER_STATUS = - 'tizen.system.event.battery_charger_status'; - -const String EVENT_KEY_BATTERY_CHARGER_STATUS = 'battery_charger_status'; - -const String EVENT_VAL_BATTERY_CHARGER_DISCONNECTED = 'disconnected'; - -const String EVENT_VAL_BATTERY_CHARGER_CONNECTED = 'connected'; - -const String EVENT_VAL_BATTERY_CHARGER_CHARGING = 'charging'; - -const String EVENT_VAL_BATTERY_CHARGER_DISCHARGING = 'discharging'; - -const String SYSTEM_EVENT_BATTERY_LEVEL_STATUS = - 'tizen.system.event.battery_level_status'; - -const String EVENT_KEY_BATTERY_LEVEL_STATUS = 'battery_level_status'; - -const String EVENT_VAL_BATTERY_LEVEL_EMPTY = 'empty'; - -const String EVENT_VAL_BATTERY_LEVEL_CRITICAL = 'critical'; - -const String EVENT_VAL_BATTERY_LEVEL_LOW = 'low'; - -const String EVENT_VAL_BATTERY_LEVEL_HIGH = 'high'; - -const String EVENT_VAL_BATTERY_LEVEL_FULL = 'full'; - -const String SYSTEM_EVENT_USB_STATUS = 'tizen.system.event.usb_status'; - -const String EVENT_KEY_USB_STATUS = 'usb_status'; - -const String EVENT_VAL_USB_DISCONNECTED = 'disconnected'; - -const String EVENT_VAL_USB_CONNECTED = 'connected'; - -const String EVENT_VAL_USB_AVAILABLE = 'available'; - -const String SYSTEM_EVENT_EARJACK_STATUS = 'tizen.system.event.earjack_status'; - -const String EVENT_KEY_EARJACK_STATUS = 'earjack_status'; - -const String EVENT_VAL_EARJACK_DISCONNECTED = 'disconnected'; - -const String EVENT_VAL_EARJACK_CONNECTED = 'connected'; - -const String SYSTEM_EVENT_DISPLAY_STATE = 'tizen.system.event.display_state'; - -const String EVENT_KEY_DISPLAY_STATE = 'display_state'; - -const String EVENT_VAL_DISPLAY_NORMAL = 'normal'; - -const String EVENT_VAL_DISPLAY_DIM = 'dim'; - -const String EVENT_VAL_DISPLAY_OFF = 'off'; - -const String SYSTEM_EVENT_BOOT_COMPLETED = 'tizen.system.event.boot_completed'; - -const String SYSTEM_EVENT_SYSTEM_SHUTDOWN = - 'tizen.system.event.system_shutdown'; - -const String SYSTEM_EVENT_LOW_MEMORY = 'tizen.system.event.low_memory'; - -const String EVENT_KEY_LOW_MEMORY = 'low_memory'; - -const String EVENT_VAL_MEMORY_NORMAL = 'normal'; - -const String EVENT_VAL_MEMORY_SOFT_WARNING = 'soft_warning'; - -const String EVENT_VAL_MEMORY_HARD_WARNING = 'hard_warning'; - -const String SYSTEM_EVENT_WIFI_STATE = 'tizen.system.event.wifi_state'; - -const String EVENT_KEY_WIFI_STATE = 'wifi_state'; - -const String EVENT_VAL_WIFI_OFF = 'off'; - -const String EVENT_VAL_WIFI_ON = 'on'; - -const String EVENT_VAL_WIFI_CONNECTED = 'connected'; - -const String SYSTEM_EVENT_BT_STATE = 'tizen.system.event.bt_state'; - -const String EVENT_KEY_BT_STATE = 'bt_state'; - -const String EVENT_VAL_BT_OFF = 'off'; - -const String EVENT_VAL_BT_ON = 'on'; - -const String EVENT_KEY_BT_LE_STATE = 'bt_le_state'; - -const String EVENT_VAL_BT_LE_OFF = 'off'; - -const String EVENT_VAL_BT_LE_ON = 'on'; - -const String EVENT_KEY_BT_TRANSFERING_STATE = 'bt_transfering_state'; - -const String EVENT_VAL_BT_NON_TRANSFERING = 'non_transfering'; - -const String EVENT_VAL_BT_TRANSFERING = 'transfering'; - -const String SYSTEM_EVENT_LOCATION_ENABLE_STATE = - 'tizen.system.event.location_enable_state'; - -const String EVENT_KEY_LOCATION_ENABLE_STATE = 'location_enable_state'; - -const String EVENT_VAL_LOCATION_DISABLED = 'disabled'; - -const String EVENT_VAL_LOCATION_ENABLED = 'enabled'; - -const String SYSTEM_EVENT_GPS_ENABLE_STATE = - 'tizen.system.event.gps_enable_state'; - -const String EVENT_KEY_GPS_ENABLE_STATE = 'gps_enable_state'; - -const String EVENT_VAL_GPS_DISABLED = 'disabled'; - -const String EVENT_VAL_GPS_ENABLED = 'enabled'; - -const String SYSTEM_EVENT_NPS_ENABLE_STATE = - 'tizen.system.event.nps_enable_state'; - -const String EVENT_KEY_NPS_ENABLE_STATE = 'nps_enable_state'; - -const String EVENT_VAL_NPS_DISABLED = 'disabled'; - -const String EVENT_VAL_NPS_ENABLED = 'enabled'; - -const String SYSTEM_EVENT_INCOMING_MSG = 'tizen.system.event.incoming_msg'; - -const String EVENT_KEY_MSG_TYPE = 'msg_type'; - -const String EVENT_VAL_SMS = 'sms'; - -const String EVENT_VAL_MMS = 'mms'; - -const String EVENT_VAL_PUSH = 'push'; - -const String EVENT_VAL_CB = 'cb'; - -const String EVENT_KEY_MSG_ID = 'msg_id'; - -const String SYSTEM_EVENT_OUTGOING_MSG = 'tizen.system.event.outgoing_msg'; - -const String EVENT_KEY_OUT_MSG_TYPE = 'msg_type'; - -const String EVENT_KEY_OUT_MSG_ID = 'msg_id'; - -const String SYSTEM_EVENT_TIME_CHANGED = 'tizen.system.event.time_changed'; - -const String SYSTEM_EVENT_TIME_ZONE = 'tizen.system.event.time_zone'; - -const String EVENT_KEY_TIME_ZONE = 'time_zone'; - -const String SYSTEM_EVENT_HOUR_FORMAT = 'tizen.system.event.hour_format'; - -const String EVENT_KEY_HOUR_FORMAT = 'hour_format'; - -const String EVENT_VAL_HOURFORMAT_12 = '12'; - -const String EVENT_VAL_HOURFORMAT_24 = '24'; - -const String SYSTEM_EVENT_LANGUAGE_SET = 'tizen.system.event.language_set'; - -const String EVENT_KEY_LANGUAGE_SET = 'language_set'; - -const String SYSTEM_EVENT_REGION_FORMAT = 'tizen.system.event.region_format'; - -const String EVENT_KEY_REGION_FORMAT = 'region_format'; - -const String SYSTEM_EVENT_SILENT_MODE = 'tizen.system.event.silent_mode'; - -const String EVENT_KEY_SILENT_MODE = 'silent_mode'; - -const String EVENT_VAL_SILENTMODE_ON = 'on'; - -const String EVENT_VAL_SILENTMODE_OFF = 'off'; - -const String SYSTEM_EVENT_VIBRATION_STATE = - 'tizen.system.event.vibration_state'; - -const String EVENT_KEY_VIBRATION_STATE = 'vibration_state'; - -const String EVENT_VAL_VIBRATION_ON = 'on'; - -const String EVENT_VAL_VIBRATION_OFF = 'off'; - -const String SYSTEM_EVENT_SCREEN_AUTOROTATE_STATE = - 'tizen.system.event.screen_autorotate_state'; - -const String EVENT_KEY_SCREEN_AUTOROTATE_STATE = 'screen_autorotate_state'; - -const String EVENT_VAL_SCREEN_AUTOROTATE_ON = 'on'; - -const String EVENT_VAL_SCREEN_AUTOROTATE_OFF = 'off'; - -const String SYSTEM_EVENT_MOBILE_DATA_STATE = - 'tizen.system.event.mobile_data_state'; - -const String EVENT_KEY_MOBILE_DATA_STATE = 'mobile_data_state'; - -const String EVENT_VAL_MOBILE_DATA_OFF = 'off'; - -const String EVENT_VAL_MOBILE_DATA_ON = 'on'; - -const String SYSTEM_EVENT_DATA_ROAMING_STATE = - 'tizen.system.event.data_roaming_state'; - -const String EVENT_KEY_DATA_ROAMING_STATE = 'data_roaming_state'; - -const String EVENT_VAL_DATA_ROAMING_OFF = 'off'; - -const String EVENT_VAL_DATA_ROAMING_ON = 'on'; - -const String SYSTEM_EVENT_FONT_SET = 'tizen.system.event.font_set'; - -const String EVENT_KEY_FONT_SET = 'font_set'; - -const String SYSTEM_EVENT_NETWORK_STATUS = 'tizen.system.event.network_status'; - -const String EVENT_KEY_NETWORK_STATUS = 'network_status'; - -const String EVENT_VAL_NETWORK_DISCONNECTED = 'disconnected'; - -const String EVENT_VAL_NETWORK_WIFI = 'wifi'; - -const String EVENT_VAL_NETWORK_CELLULAR = 'cellular'; - -const String EVENT_VAL_NETWORK_ETHERNET = 'ethernet'; - -const String EVENT_VAL_NETWORK_BT = 'bt'; - -const String EVENT_VAL_NETWORK_NET_PROXY = 'net_proxy'; - -const String PACKAGE_INFO_PROP_APP_ID = 'PACKAGE_INFO_PROP_APP_ID'; - -const String PACKAGE_INFO_PROP_APP_TYPE = 'PACKAGE_INFO_PROP_APP_TYPE'; - -const String PACKAGE_INFO_PROP_APP_CATEGORY = 'PACKAGE_INFO_PROP_APP_CATEGORY'; - -const String PACKAGE_INFO_PROP_APP_INSTALLED_STORAGE = - 'PACKAGE_INFO_PROP_APP_INSTALLED_STORAGE'; - -const String PACKAGE_INFO_PROP_APP_NODISPLAY = - 'PACKAGE_INFO_PROP_APP_NODISPLAY'; - -const String PACKAGE_INFO_PROP_APP_TASKMANAGE = - 'PACKAGE_INFO_PROP_APP_TASKMANAGE'; - -const String PACKAGE_INFO_PROP_APP_DISABLED = 'PACKAGE_INFO_PROP_APP_DISABLED'; - -const String PACKAGE_INFO_PROP_APP_COMPONENT_TYPE = - 'PACKAGE_INFO_PROP_APP_COMPONENT_TYPE'; - -const String PACKAGE_MANAGER_PKGINFO_PROP_REMOVABLE = - 'PMINFO_PKGINFO_PROP_PACKAGE_REMOVABLE'; - -const String PACKAGE_MANAGER_PKGINFO_PROP_READONLY = - 'PMINFO_PKGINFO_PROP_PACKAGE_READONLY'; - -const String PACKAGE_MANAGER_PKGINFO_PROP_SUPPORT_DISABLE = - 'PMINFO_PKGINFO_PROP_PACKAGE_SUPPORT_DISABLE'; - -const String PACKAGE_MANAGER_PKGINFO_PROP_DISABLE = - 'PMINFO_PKGINFO_PROP_PACKAGE_DISABLE'; - -const String PACKAGE_MANAGER_PKGINFO_PROP_PRELOAD = - 'PMINFO_PKGINFO_PROP_PACKAGE_PRELOAD'; - -const int MEDIA_CONTENT_ERROR_CLASS = -23134208; - -const String MEDIA_ID = 'MEDIA_ID'; - -const String MEDIA_PATH = 'MEDIA_PATH'; - -const String MEDIA_DISPLAY_NAME = 'MEDIA_DISPLAY_NAME'; - -const String MEDIA_TYPE = 'MEDIA_TYPE'; - -const String MEDIA_MIME_TYPE = 'MEDIA_MIME_TYPE'; - -const String MEDIA_SIZE = 'MEDIA_SIZE'; - -const String MEDIA_ADDED_TIME = 'MEDIA_ADDED_TIME'; - -const String MEDIA_MODIFIED_TIME = 'MEDIA_MODIFIED_TIME'; - -const String MEDIA_TIMELINE = 'MEDIA_TIMELINE'; - -const String MEDIA_THUMBNAIL_PATH = 'MEDIA_THUMBNAIL_PATH'; - -const String MEDIA_TITLE = 'MEDIA_TITLE'; - -const String MEDIA_ALBUM = 'MEDIA_ALBUM'; - -const String MEDIA_ARTIST = 'MEDIA_ARTIST'; - -const String MEDIA_ALBUM_ARTIST = 'MEDIA_ALBUM_ARTIST'; - -const String MEDIA_GENRE = 'MEDIA_GENRE'; - -const String MEDIA_COMPOSER = 'MEDIA_COMPOSER'; - -const String MEDIA_YEAR = 'MEDIA_YEAR'; - -const String MEDIA_RECORDED_DATE = 'MEDIA_RECORDED_DATE'; - -const String MEDIA_COPYRIGHT = 'MEDIA_COPYRIGHT'; - -const String MEDIA_TRACK_NUM = 'MEDIA_TRACK_NUM'; - -const String MEDIA_DESCRIPTION = 'MEDIA_DESCRIPTION'; - -const String MEDIA_BITRATE = 'MEDIA_BITRATE'; - -const String MEDIA_BITPERSAMPLE = 'MEDIA_BITPERSAMPLE'; - -const String MEDIA_SAMPLERATE = 'MEDIA_SAMPLERATE'; - -const String MEDIA_CHANNEL = 'MEDIA_CHANNEL'; - -const String MEDIA_DURATION = 'MEDIA_DURATION'; - -const String MEDIA_LONGITUDE = 'MEDIA_LONGITUDE'; - -const String MEDIA_LATITUDE = 'MEDIA_LATITUDE'; - -const String MEDIA_ALTITUDE = 'MEDIA_ALTITUDE'; - -const String MEDIA_WIDTH = 'MEDIA_WIDTH'; - -const String MEDIA_HEIGHT = 'MEDIA_HEIGHT'; - -const String MEDIA_DATETAKEN = 'MEDIA_DATETAKEN'; - -const String MEDIA_ORIENTATION = 'MEDIA_ORIENTATION'; - -const String MEDIA_BURST_ID = 'BURST_ID'; - -const String MEDIA_PLAYED_COUNT = 'MEDIA_PLAYED_COUNT'; - -const String MEDIA_LAST_PLAYED_TIME = 'MEDIA_LAST_PLAYED_TIME'; - -const String MEDIA_LAST_PLAYED_POSITION = 'MEDIA_LAST_PLAYED_POSITION'; - -const String MEDIA_RATING = 'MEDIA_RATING'; - -const String MEDIA_FAVOURITE = 'MEDIA_FAVOURITE'; - -const String MEDIA_AUTHOR = 'MEDIA_AUTHOR'; - -const String MEDIA_PROVIDER = 'MEDIA_PROVIDER'; - -const String MEDIA_CONTENT_NAME = 'MEDIA_CONTENT_NAME'; - -const String MEDIA_CATEGORY = 'MEDIA_CATEGORY'; - -const String MEDIA_LOCATION_TAG = 'MEDIA_LOCATION_TAG'; - -const String MEDIA_AGE_RATING = 'MEDIA_AGE_RATING'; - -const String MEDIA_KEYWORD = 'MEDIA_KEYWORD'; - -const String MEDIA_WEATHER = 'MEDIA_WEATHER'; - -const String MEDIA_IS_DRM = 'MEDIA_IS_DRM'; - -const String MEDIA_STORAGE_TYPE = 'MEDIA_STORAGE_TYPE'; - -const String MEDIA_EXPOSURE_TIME = 'MEDIA_EXPOSURE_TIME'; - -const String MEDIA_FNUMBER = 'MEDIA_FNUMBER'; - -const String MEDIA_ISO = 'MEDIA_ISO'; - -const String MEDIA_MODEL = 'MEDIA_MODEL'; - -const String MEDIA_FILE_NAME_PINYIN = 'MEDIA_FILE_NAME_PINYIN'; - -const String MEDIA_TITLE_PINYIN = 'MEDIA_TITLE_PINYIN'; - -const String MEDIA_ALBUM_PINYIN = 'MEDIA_ALBUM_PINYIN'; - -const String MEDIA_ARTIST_PINYIN = 'MEDIA_ARTIST_PINYIN'; - -const String MEDIA_ALBUM_ARTIST_PINYIN = 'MEDIA_ALBUM_ARTIST_PINYIN'; - -const String MEDIA_GENRE_PINYIN = 'MEDIA_GENRE_PINYIN'; - -const String MEDIA_COMPOSER_PINYIN = 'MEDIA_COMPOSER_PINYIN'; - -const String MEDIA_COPYRIGHT_PINYIN = 'MEDIA_COPYRIGHT_PINYIN'; - -const String MEDIA_DESCRIPTION_PINYIN = 'MEDIA_DESCRIPTION_PINYIN'; - -const String MEDIA_AUTHOR_PINYIN = 'MEDIA_AUTHOR_PINYIN'; - -const String MEDIA_PROVIDER_PINYIN = 'MEDIA_PROVIDER_PINYIN'; - -const String MEDIA_CONTENT_NAME_PINYIN = 'MEDIA_CONTENT_NAME_PINYIN'; - -const String MEDIA_CATEGORY_PINYIN = 'MEDIA_CATEGORY_PINYIN'; - -const String MEDIA_LOCATION_TAG_PINYIN = 'MEDIA_LOCATION_TAG_PINYIN'; - -const String MEDIA_AGE_RATING_PINYIN = 'MEDIA_AGE_RATING_PINYIN'; - -const String MEDIA_KEYWORD_PINYIN = 'MEDIA_KEYWORD_PINYIN'; - -const String MEDIA_360 = 'MEDIA_360'; - -const String FOLDER_ID = 'FOLDER_ID'; - -const String FOLDER_PATH = 'FOLDER_PATH'; - -const String FOLDER_NAME = 'FOLDER_NAME'; - -const String FOLDER_MODIFIED_TIME = 'FOLDER_MODIFIED_TIME'; - -const String FOLDER_STORAGE_TYPE = 'FOLDER_STORAGE_TYPE'; - -const String FOLDER_NAME_PINYIN = 'FOLDER_NAME_PINYIN'; - -const String FOLDER_ORDER = 'FOLDER_ORDER'; - -const String FOLDER_PARENT_FOLDER_ID = 'FOLDER_PARENT_FOLDER_ID'; - -const String PLAYLIST_NAME = 'PLAYLIST_NAME'; - -const String MEDIA_PLAYLIST_ID = 'PLAYLIST_ID'; - -const String PLAYLIST_MEMBER_ORDER = 'PLAYLIST_MEMBER_ORDER'; - -const String PLAYLIST_MEDIA_COUNT = 'PLAYLIST_MEDIA_COUNT'; - -const String TAG_NAME = 'TAG_NAME'; - -const String MEDIA_TAG_ID = 'TAG_ID'; - -const String TAG_MEDIA_COUNT = 'TAG_MEDIA_COUNT'; - -const String BOOKMARK_MARKED_TIME = 'BOOKMARK_MARKED_TIME'; - -const String MEDIA_BOOKMARK_ID = 'BOOKMARK_ID'; - -const String BOOKMARK_NAME = 'BOOKMARK_NAME'; - -const String MEDIA_STORAGE_ID = 'STORAGE_ID'; - -const String MEDIA_STORAGE_PATH = 'STORAGE_PATH'; - -const String MEDIA_FACE_TAG = 'MEDIA_FACE_TAG'; - -const String MEDIA_FACE_ID = 'MEDIA_FACE_ID'; - -const int TBM_SURF_PLANE_MAX = 4; - -const int TBM_SURF_OPTION_READ = 1; - -const int TBM_SURF_OPTION_WRITE = 2; - -const int TBM_FORMAT_C8 = 538982467; - -const int TBM_FORMAT_RGB332 = 943867730; - -const int TBM_FORMAT_BGR233 = 944916290; - -const int TBM_FORMAT_XRGB4444 = 842093144; - -const int TBM_FORMAT_XBGR4444 = 842089048; - -const int TBM_FORMAT_RGBX4444 = 842094674; - -const int TBM_FORMAT_BGRX4444 = 842094658; - -const int TBM_FORMAT_ARGB4444 = 842093121; - -const int TBM_FORMAT_ABGR4444 = 842089025; - -const int TBM_FORMAT_RGBA4444 = 842088786; - -const int TBM_FORMAT_BGRA4444 = 842088770; - -const int TBM_FORMAT_XRGB1555 = 892424792; - -const int TBM_FORMAT_XBGR1555 = 892420696; - -const int TBM_FORMAT_RGBX5551 = 892426322; - -const int TBM_FORMAT_BGRX5551 = 892426306; - -const int TBM_FORMAT_ARGB1555 = 892424769; - -const int TBM_FORMAT_ABGR1555 = 892420673; - -const int TBM_FORMAT_RGBA5551 = 892420434; - -const int TBM_FORMAT_BGRA5551 = 892420418; - -const int TBM_FORMAT_RGB565 = 909199186; - -const int TBM_FORMAT_BGR565 = 909199170; - -const int TBM_FORMAT_RGB888 = 875710290; - -const int TBM_FORMAT_BGR888 = 875710274; - -const int TBM_FORMAT_XRGB8888 = 875713112; - -const int TBM_FORMAT_XBGR8888 = 875709016; - -const int TBM_FORMAT_RGBX8888 = 875714642; - -const int TBM_FORMAT_BGRX8888 = 875714626; - -const int TBM_FORMAT_ARGB8888 = 875713089; - -const int TBM_FORMAT_ABGR8888 = 875708993; - -const int TBM_FORMAT_RGBA8888 = 875708754; - -const int TBM_FORMAT_BGRA8888 = 875708738; - -const int TBM_FORMAT_XRGB2101010 = 808669784; - -const int TBM_FORMAT_XBGR2101010 = 808665688; - -const int TBM_FORMAT_RGBX1010102 = 808671314; - -const int TBM_FORMAT_BGRX1010102 = 808671298; - -const int TBM_FORMAT_ARGB2101010 = 808669761; - -const int TBM_FORMAT_ABGR2101010 = 808665665; - -const int TBM_FORMAT_RGBA1010102 = 808665426; - -const int TBM_FORMAT_BGRA1010102 = 808665410; - -const int TBM_FORMAT_YUYV = 1448695129; - -const int TBM_FORMAT_YVYU = 1431918169; - -const int TBM_FORMAT_UYVY = 1498831189; - -const int TBM_FORMAT_VYUY = 1498765654; - -const int TBM_FORMAT_AYUV = 1448433985; - -const int TBM_FORMAT_NV12 = 842094158; - -const int TBM_FORMAT_NV21 = 825382478; - -const int TBM_FORMAT_NV16 = 909203022; - -const int TBM_FORMAT_NV61 = 825644622; - -const int TBM_FORMAT_YUV410 = 961959257; - -const int TBM_FORMAT_YVU410 = 961893977; - -const int TBM_FORMAT_YUV411 = 825316697; - -const int TBM_FORMAT_YVU411 = 825316953; - -const int TBM_FORMAT_YUV420 = 842093913; - -const int TBM_FORMAT_YVU420 = 842094169; - -const int TBM_FORMAT_YUV422 = 909202777; - -const int TBM_FORMAT_YVU422 = 909203033; - -const int TBM_FORMAT_YUV444 = 875713881; - -const int TBM_FORMAT_YVU444 = 875714137; - -const int TBM_FORMAT_NV12MT = 842091860; - -const int CAMERA_ERROR_CLASS = -26279936; - -const String MEDIA_STREAMER_PARAM_CAMERA_ID = 'camera-id'; - -const String MEDIA_STREAMER_PARAM_CAPTURE_WIDTH = 'capture-width'; - -const String MEDIA_STREAMER_PARAM_CAPTURE_HEIGHT = 'capture-height'; - -const String MEDIA_STREAMER_PARAM_IS_LIVE_STREAM = 'is-live'; - -const String MEDIA_STREAMER_PARAM_URI = 'uri'; - -const String MEDIA_STREAMER_PARAM_USER_AGENT = 'user-agent'; - -const String MEDIA_STREAMER_PARAM_STREAM_TYPE = 'stream-type'; - -const String MEDIA_STREAMER_PARAM_PORT = 'port'; - -const String MEDIA_STREAMER_PARAM_VIDEO_IN_PORT = 'video_in_port'; - -const String MEDIA_STREAMER_PARAM_AUDIO_IN_PORT = 'audio_in_port'; - -const String MEDIA_STREAMER_PARAM_VIDEO_OUT_PORT = 'video_out_port'; - -const String MEDIA_STREAMER_PARAM_AUDIO_OUT_PORT = 'audio_out_port'; - -const String MEDIA_STREAMER_PARAM_IP_ADDRESS = 'address'; - -const String MEDIA_STREAMER_PARAM_AUDIO_DEVICE = 'audio_device'; - -const String MEDIA_STREAMER_PARAM_CLOCK_SYNCHRONIZED = 'sync'; - -const String MEDIA_STREAMER_PARAM_ROTATE = 'rotate'; - -const String MEDIA_STREAMER_PARAM_FLIP = 'flip'; - -const String MEDIA_STREAMER_PARAM_DISPLAY_GEOMETRY_METHOD = - 'display-geometry-method'; - -const String MEDIA_STREAMER_PARAM_DISPLAY = 'display'; - -const String MEDIA_STREAMER_PARAM_VISIBLE = 'visible'; - -const String MEDIA_STREAMER_PARAM_HOST = 'host'; - -const String MEDIA_STREAMER_PARAM_SEGMENT_LOCATION = 'location'; - -const String MEDIA_STREAMER_PARAM_PLAYLIST_LOCATION = 'playlist-location'; - -const String MV_BARCODE_DETECT_ATTR_TARGET = 'MV_BARCODE_DETECT_ATTR_TARGET'; - -const String MV_BARCODE_GENERATE_ATTR_TEXT = 'MV_BARCODE_GENERATE_ATTR_TEXT'; - -const String MV_BARCODE_GENERATE_ATTR_COLOR_FRONT = - 'MV_BARCODE_GENERATE_ATTR_COLOR_FRONT'; - -const String MV_BARCODE_GENERATE_ATTR_COLOR_BACK = - 'MV_BARCODE_GENERATE_ATTR_COLOR_BACK'; - -const String MV_FACE_DETECTION_MODEL_FILE_PATH = - 'MV_FACE_DETECTION_MODEL_FILE_PATH'; - -const String MV_FACE_RECOGNITION_MODEL_TYPE = 'MV_FACE_RECOGNITION_MODEL_TYPE'; - -const String MV_FACE_DETECTION_ROI_X = 'MV_FACE_DETECTION_ROI_X'; - -const String MV_FACE_DETECTION_ROI_Y = 'MV_FACE_DETECTION_ROI_Y'; - -const String MV_FACE_DETECTION_ROI_WIDTH = 'MV_FACE_DETECTION_ROI_WIDTH'; - -const String MV_FACE_DETECTION_ROI_HEIGHT = 'MV_FACE_DETECTION_ROI_HEIGHT'; - -const String MV_FACE_DETECTION_MIN_SIZE_WIDTH = - 'MV_FACE_DETECTION_MIN_SIZE_WIDTH'; - -const String MV_FACE_DETECTION_MIN_SIZE_HEIGHT = - 'MV_FACE_DETECTION_MIN_SIZE_HEIGHT'; - -const String MV_IMAGE_RECOGNITION_OBJECT_SCALE_FACTOR = - 'MV_IMAGE_RECOGNITION_OBJECT_SCALE_FACTOR'; - -const String MV_IMAGE_RECOGNITION_OBJECT_MAX_KEYPOINTS_NUM = - 'MV_IMAGE_RECOGNITION_OBJECT_MAX_KEYPOINTS_NUM'; - -const String MV_IMAGE_RECOGNITION_SCENE_SCALE_FACTOR = - 'MV_IMAGE_RECOGNITION_SCENE_SCALE_FACTOR'; - -const String MV_IMAGE_RECOGNITION_SCENE_MAX_KEYPOINTS_NUM = - 'MV_IMAGE_RECOGNITION_SCENE_MAX_KEYPOINTS_NUM'; - -const String MV_IMAGE_RECOGNITION_MIN_MATCH_NUM = - 'MV_IMAGE_RECOGNITION_MIN_MATCH_NUM'; - -const String MV_IMAGE_RECOGNITION_REQ_MATCH_PART = - 'MV_IMAGE_RECOGNITION_REQ_MATCH_PART'; - -const String MV_IMAGE_RECOGNITION_TOLERANT_MATCH_PART_ERR = - 'MV_IMAGE_RECOGNITION_TOLERANT_MATCH_PART_ERR'; - -const String MV_IMAGE_TRACKING_HISTORY_AMOUNT = - 'MV_IMAGE_TRACKING_HISTORY_AMOUNT'; - -const String MV_IMAGE_TRACKING_EXPECTED_OFFSET = - 'MV_IMAGE_TRACKING_EXPECTED_OFFSET'; - -const String MV_IMAGE_TRACKING_USE_STABLIZATION = - 'MV_IMAGE_TRACKING_USE_STABLIZATION'; - -const String MV_IMAGE_TRACKING_STABLIZATION_TOLERANT_SHIFT = - 'MV_IMAGE_TRACKING_STABLIZATION_TOLERANT_SHIFT'; - -const String MV_IMAGE_TRACKING_STABLIZATION_SPEED = - 'MV_IMAGE_TRACKING_STABLIZATION_SPEED'; - -const String MV_IMAGE_TRACKING_STABLIZATION_ACCELERATION = - 'MV_IMAGE_TRACKING_STABLIZATION_ACCELERATION'; - -const String MV_SURVEILLANCE_EVENT_TYPE_MOVEMENT_DETECTED = - 'MV_SURVEILLANCE_EVENT_MOVEMENT_DETECTED'; - -const String MV_SURVEILLANCE_MOVEMENT_NUMBER_OF_REGIONS = - 'NUMBER_OF_MOVEMENT_REGIONS'; - -const String MV_SURVEILLANCE_MOVEMENT_REGIONS = 'MOVEMENT_REGIONS'; - -const String MV_SURVEILLANCE_EVENT_TYPE_PERSON_APPEARED_DISAPPEARED = - 'MV_SURVEILLANCE_EVENT_PERSON_APPEARED_DISAPEARED'; - -const String MV_SURVEILLANCE_PERSONS_APPEARED_NUMBER = - 'NUMBER_OF_APPEARED_PERSONS'; - -const String MV_SURVEILLANCE_PERSONS_DISAPPEARED_NUMBER = - 'NUMBER_OF_DISAPPEARED_PERSONS'; - -const String MV_SURVEILLANCE_PERSONS_TRACKED_NUMBER = - 'NUMBER_OF_TRACKED_PERSONS'; - -const String MV_SURVEILLANCE_PERSONS_APPEARED_LOCATIONS = - 'APPEARED_PERSONS_LOCATIONS'; - -const String MV_SURVEILLANCE_PERSONS_DISAPPEARED_LOCATIONS = - 'DISAPPEARED_PERSONS_LOCATIONS'; - -const String MV_SURVEILLANCE_PERSONS_TRACKED_LOCATIONS = - 'TRACKED_PERSONS_LOCATIONS'; - -const String MV_SURVEILLANCE_EVENT_TYPE_PERSON_RECOGNIZED = - 'MV_SURVEILLANCE_EVENT_PERSON_RECOGNIZED'; - -const String MV_SURVEILLANCE_PERSONS_RECOGNIZED_NUMBER = 'NUMBER_OF_PERSONS'; - -const String MV_SURVEILLANCE_PERSONS_RECOGNIZED_LOCATIONS = 'PERSONS_LOCATIONS'; - -const String MV_SURVEILLANCE_PERSONS_RECOGNIZED_LABELS = 'PERSONS_LABELS'; - -const String MV_SURVEILLANCE_PERSONS_RECOGNIZED_CONFIDENCES = - 'PERSONS_CONFIDENCES'; - -const String MV_SURVEILLANCE_FACE_RECOGNITION_MODEL_FILE_PATH = - 'MV_SURVEILLANCE_FACE_RECOGNITION_MODEL_FILE_PATH'; - -const String MV_SURVEILLANCE_MOVEMENT_DETECTION_THRESHOLD = - 'MV_SURVEILLANCE_MOVEMENT_DETECTION_THRESHOLD'; - -const String MV_SURVEILLANCE_SKIP_FRAMES_COUNT = - 'MV_SURVEILLANCE_SKIP_FRAMES_COUNT'; - -const int METADATA_EDITOR_ERROR_CLASS = -27000832; - -const int METADATA_EXTRACTOR_ERROR_CLASS = -26411008; - -const int PLAYER_ERROR_CLASS = -26476512; - -const int PLAYER_CUSTOM_ERROR_CLASS = -26472448; - -const int RECORDER_ERROR_CLASS = -26542064; - -const int THUMBNAIL_UTIL_ERROR_CLASS = -49872896; - -const int TONE_PLAYER_ERROR_CLASS = -8096; - -const int VIDEO_UTIL_ERROR_CLASS = -26738688; - -const String TRANSCODER_FEATURE_PATH = - 'http://tizen.org/feature/multimedia.transcoder'; - -const int WAV_PLAYER_ERROR_CLASS = -8112; - -const int IOTCON_MULTICAST_ADDRESS = 0; - -const int IOTCON_FUNC_STOP = 0; - -const int IOTCON_FUNC_CONTINUE = 1; - -const String IOTCON_INTERFACE_DEFAULT = 'oic.if.baseline'; - -const String IOTCON_INTERFACE_LINK = 'oic.if.ll'; - -const String IOTCON_INTERFACE_BATCH = 'oic.if.b'; - -const String IOTCON_INTERFACE_GROUP = 'oic.mi.grp'; - -const String IOTCON_INTERFACE_READONLY = 'oic.if.r'; - -const int SMARTCARD_ERROR_CLASS = -29818880; - -const int YACA_KEYLEN_COMPONENT_TYPE_MASK = -268435456; - -const int YACA_KEYLEN_COMPONENT_TYPE_BITS = 0; - -const int YACA_KEYLEN_COMPONENT_TYPE_DH = 268435456; - -const int YACA_KEYLEN_COMPONENT_TYPE_DH_RFC = 536870912; - -const int YACA_KEYLEN_COMPONENT_TYPE_EC = 805306368; - -const int YACA_KEYLEN_COMPONENT_DH_GEN_MASK = 251658240; - -const int YACA_KEYLEN_COMPONENT_DH_GEN_2 = 0; - -const int YACA_KEYLEN_COMPONENT_DH_GEN_5 = 16777216; - -const int YACA_KEYLEN_COMPONENT_DH_PRIME_MASK = 65535; - -const int YACA_KEYLEN_COMPONENT_DH_RFC_MASK = 251658240; - -const int YACA_KEYLEN_COMPONENT_DH_RFC_160 = 0; - -const int YACA_KEYLEN_COMPONENT_DH_RFC_224 = 16777216; - -const int YACA_KEYLEN_COMPONENT_DH_RFC_256 = 33554432; - -const int YACA_KEYLEN_COMPONENT_EC_PRIME = 0; - -const int YACA_KEYLEN_COMPONENT_EC_SECP = 16777216; - -const int YACA_KEYLEN_COMPONENT_EC_SECT = 33554432; - -const int YACA_KEYLEN_COMPONENT_EC_BRAINPOOL = 50331648; - -const int YACA_KEYLEN_COMPONENT_EC_V = 0; - -const int YACA_KEYLEN_COMPONENT_EC_R = 1048576; - -const int YACA_KEYLEN_COMPONENT_EC_K = 2097152; - -const int YACA_KEYLEN_COMPONENT_EC_T = 3145728; - -const int YACA_KEYLEN_COMPONENT_EC_1 = 0; - -const int YACA_KEYLEN_COMPONENT_EC_2 = 65536; - -const int YACA_KEYLEN_COMPONENT_EC_3 = 131072; - -const int YACA_KEYLEN_COMPONENT_EC_4 = 196608; - -const int YACA_KEY_LENGTH_DH_GENERATOR_2 = 268435456; - -const int YACA_KEY_LENGTH_DH_GENERATOR_5 = 285212672; - -const int TIZEN_ERROR_YACA = -31653888; - -const int CALENDAR_CONNECT_FLAG_NONE = 0; - -const int CALENDAR_CONNECT_FLAG_RETRY = 1; - -const int DEFAULT_EVENT_CALENDAR_BOOK_ID = 1; - -const int DEFAULT_TODO_CALENDAR_BOOK_ID = 2; - -const int DEFAULT_BIRTHDAY_CALENDAR_BOOK_ID = 3; - -const int CALENDAR_TODO_NO_DUE_DATE = 9223372036854775807; - -const int CALENDAR_TODO_NO_START_DATE = -9223372036854775807; - -const int CALENDAR_RECORD_NO_UNTIL = 9223372036854775807; - -const double CALENDAR_RECORD_NO_COORDINATE = 1000.0; - -const int CALENDAR_BOOK_FILTER_ALL = -1; - -const int CONTACTS_CONNECT_FLAG_RETRY = 1; - -const int CONTACTS_CONNECT_FLAG_NONE = 0; - -const int LOG_TAG = 0; - -const int MAX_VALUE_SIZE = 16; - -const int IME_ATTR_FONTSTYLE_UNDERLINE = 1; - -const int IME_ATTR_FONTSTYLE_HIGHLIGHT = 2; - -const int IME_ATTR_FONTSTYLE_REVERSAL = 4; - -const String STT_RECOGNITION_TYPE_FREE = 'stt.recognition.type.FREE'; - -const String STT_RECOGNITION_TYPE_FREE_PARTIAL = - 'stt.recognition.type.FREE.PARTIAL'; - -const String STT_RECOGNITION_TYPE_SEARCH = 'stt.recognition.type.SEARCH'; - -const String STT_RECOGNITION_TYPE_WEB_SEARCH = - 'stt.recognition.type.WEB_SEARCH'; - -const String STT_RECOGNITION_TYPE_MAP = 'stt.recognition.type.MAP'; - -const String STT_RESULT_MESSAGE_NONE = 'stt.result.message.none'; - -const String STT_RESULT_MESSAGE_ERROR_TOO_SOON = - 'stt.result.message.error.too.soon'; - -const String STT_RESULT_MESSAGE_ERROR_TOO_SHORT = - 'stt.result.message.error.too.short'; - -const String STT_RESULT_MESSAGE_ERROR_TOO_LONG = - 'stt.result.message.error.too.long'; - -const String STT_RESULT_MESSAGE_ERROR_TOO_QUIET = - 'stt.result.message.error.too.quiet'; - -const String STT_RESULT_MESSAGE_ERROR_TOO_LOUD = - 'stt.result.message.error.too.loud'; - -const String STT_RESULT_MESSAGE_ERROR_TOO_FAST = - 'stt.result.message.error.too.fast'; - -const String STTE_RECOGNITION_TYPE_FREE = 'stt.recognition.type.FREE'; - -const String STTE_RECOGNITION_TYPE_FREE_PARTIAL = - 'stt.recognition.type.FREE.PARTIAL'; - -const String STTE_RESULT_MESSAGE_NONE = 'stt.result.message.none'; - -const String STTE_RESULT_MESSAGE_ERROR_TOO_SOON = - 'stt.result.message.error.too.soon'; - -const String STTE_RESULT_MESSAGE_ERROR_TOO_SHORT = - 'stt.result.message.error.too.short'; - -const String STTE_RESULT_MESSAGE_ERROR_TOO_LONG = - 'stt.result.message.error.too.long'; - -const String STTE_RESULT_MESSAGE_ERROR_TOO_QUIET = - 'stt.result.message.error.too.quiet'; - -const String STTE_RESULT_MESSAGE_ERROR_TOO_LOUD = - 'stt.result.message.error.too.loud'; - -const String STTE_RESULT_MESSAGE_ERROR_TOO_FAST = - 'stt.result.message.error.too.fast'; - -const int TTS_SPEED_AUTO = 0; - -const int TTS_VOICE_TYPE_AUTO = 0; - -const int TTS_VOICE_TYPE_MALE = 1; - -const int TTS_VOICE_TYPE_FEMALE = 2; - -const int TTS_VOICE_TYPE_CHILD = 3; - -const int TTSE_VOICE_TYPE_MALE = 1; - -const int TTSE_VOICE_TYPE_FEMALE = 2; - -const int TTSE_VOICE_TYPE_CHILD = 3; - -const int VC_COMMAND_TYPE_FOREGROUND = 1; - -const int VC_COMMAND_TYPE_BACKGROUND = 2; - -const int VC_DIALOG_END = 0; - -const int VC_DIALOG_CONTINUE = 1; diff --git a/lib/src/bindings/4.0/generated_symbols.dart b/lib/src/bindings/4.0/generated_symbols.dart deleted file mode 100644 index b27925a..0000000 --- a/lib/src/bindings/4.0/generated_symbols.dart +++ /dev/null @@ -1,5967 +0,0 @@ -// Copyright 2021 Samsung Electronics Co., Ltd. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// AUTO GENERATED FILE, DO NOT EDIT. -// -// Generated by `package:symgen`. - -final Map> tizen40Symbols = { - 'libcapi-appfw-application.so.0': [ - 'app_efl_exit', - 'app_efl_main', - 'app_exit', - 'app_get_device_orientation', - 'app_get_preinitialized_background', - 'app_get_preinitialized_conformant', - 'app_get_preinitialized_window', - 'app_main', - 'i18n_get_text', - 'ui_app_add_event_handler', - 'ui_app_exit', - 'ui_app_fini', - 'ui_app_init', - 'ui_app_main', - 'ui_app_remove_event_handler', - ], - 'libcapi-appfw-alarm.so.0': [ - 'alarm_cancel', - 'alarm_cancel_all', - 'alarm_foreach_registered_alarm', - 'alarm_get_app_control', - 'alarm_get_current_time', - 'alarm_get_global', - 'alarm_get_notification', - 'alarm_get_scheduled_date', - 'alarm_get_scheduled_period', - 'alarm_get_scheduled_recurrence_week_flag', - 'alarm_schedule_after_delay', - 'alarm_schedule_at_date', - 'alarm_schedule_noti_after_delay', - 'alarm_schedule_noti_once_after_delay', - 'alarm_schedule_noti_once_at_date', - 'alarm_schedule_noti_with_recurrence_week_flag', - 'alarm_schedule_once_after_delay', - 'alarm_schedule_once_at_date', - 'alarm_schedule_service_once_after_delay', - 'alarm_schedule_service_once_at_date', - 'alarm_schedule_with_recurrence_week_flag', - 'alarm_set_global', - 'alarm_set_systime', - 'alarm_set_systime_with_propagation_delay', - 'alarm_set_timezone', - 'alarm_update_date', - 'alarm_update_delay', - 'alarm_update_period', - 'alarm_update_week_flag', - ], - 'libcapi-appfw-app-common.so.0': [ - 'app_convert_appcore_rm', - 'app_error', - 'app_event_get_device_orientation', - 'app_event_get_language', - 'app_event_get_low_battery_status', - 'app_event_get_low_memory_status', - 'app_event_get_region_format', - 'app_event_get_suspended_state', - 'app_finalizer_add', - 'app_finalizer_execute', - 'app_finalizer_remove', - 'app_get_cache_path', - 'app_get_data_path', - 'app_get_external_cache_path', - 'app_get_external_data_path', - 'app_get_external_shared_data_path', - 'app_get_id', - 'app_get_name', - 'app_get_package', - 'app_get_package_app_name', - 'app_get_resource_path', - 'app_get_shared_data_path', - 'app_get_shared_resource_path', - 'app_get_shared_trusted_path', - 'app_get_tep_resource_path', - 'app_get_version', - 'app_resource_manager_get', - 'app_resource_manager_init', - 'app_resource_manager_release', - ], - 'libcapi-appfw-app-control.so.0': [ - 'app_control_add_extra_data', - 'app_control_add_extra_data_array', - 'app_control_cb_broker_foreach_app_matched', - 'app_control_clone', - 'app_control_create', - 'app_control_create_event', - 'app_control_create_request', - 'app_control_destroy', - 'app_control_enable_app_started_result_event', - 'app_control_error', - 'app_control_export_as_bundle', - 'app_control_foreach_app_matched', - 'app_control_foreach_extra_data', - 'app_control_get_app_id', - 'app_control_get_caller', - 'app_control_get_category', - 'app_control_get_extra_data', - 'app_control_get_extra_data_array', - 'app_control_get_instance_id', - 'app_control_get_launch_mode', - 'app_control_get_mime', - 'app_control_get_operation', - 'app_control_get_package', - 'app_control_get_uri', - 'app_control_get_window', - 'app_control_import_from_bundle', - 'app_control_is_extra_data_array', - 'app_control_is_reply_requested', - 'app_control_remove_extra_data', - 'app_control_reply_to_launch_request', - 'app_control_request_transient_app', - 'app_control_send_launch_request', - 'app_control_send_terminate_request', - 'app_control_set_app_id', - 'app_control_set_category', - 'app_control_set_defapp', - 'app_control_set_instance_id', - 'app_control_set_launch_mode', - 'app_control_set_mime', - 'app_control_set_operation', - 'app_control_set_package', - 'app_control_set_uri', - 'app_control_set_window', - 'app_control_to_bundle', - 'app_control_unset_defapp', - 'app_control_validate_internal_key', - ], - 'libcapi-appfw-event.so.0': [ - 'event_add_event_handler', - 'event_error', - 'event_keep_last_event_data', - 'event_publish_app_event', - 'event_publish_trusted_app_event', - 'event_remove_event_handler', - ], - 'libcapi-appfw-preference.so.0': [ - 'preference_foreach_item', - 'preference_get_boolean', - 'preference_get_double', - 'preference_get_int', - 'preference_get_string', - 'preference_is_existing', - 'preference_remove', - 'preference_remove_all', - 'preference_set_boolean', - 'preference_set_changed_cb', - 'preference_set_double', - 'preference_set_int', - 'preference_set_string', - 'preference_unset_changed_cb', - ], - 'libcapi-appfw-app-manager.so.0': [ - 'app_context_clone', - 'app_context_destroy', - 'app_context_get_app_id', - 'app_context_get_app_state', - 'app_context_get_package', - 'app_context_get_package_id', - 'app_context_get_pid', - 'app_context_is_equal', - 'app_context_is_sub_app', - 'app_context_is_terminated', - 'app_info_clone', - 'app_info_create', - 'app_info_destroy', - 'app_info_filter_add_bool', - 'app_info_filter_add_string', - 'app_info_filter_count_appinfo', - 'app_info_filter_create', - 'app_info_filter_destroy', - 'app_info_filter_foreach_appinfo', - 'app_info_foreach_category', - 'app_info_foreach_metadata', - 'app_info_get_app_component_type', - 'app_info_get_app_id', - 'app_info_get_exec', - 'app_info_get_icon', - 'app_info_get_label', - 'app_info_get_localed_label', - 'app_info_get_package', - 'app_info_get_type', - 'app_info_is_enabled', - 'app_info_is_equal', - 'app_info_is_nodisplay', - 'app_info_is_onboot', - 'app_info_is_preload', - 'app_info_metadata_filter_add', - 'app_info_metadata_filter_create', - 'app_info_metadata_filter_destroy', - 'app_info_metadata_filter_foreach', - 'app_manager_attach_window', - 'app_manager_detach_window', - 'app_manager_event_create', - 'app_manager_event_destroy', - 'app_manager_event_set_status', - 'app_manager_foreach_app_context', - 'app_manager_foreach_app_info', - 'app_manager_foreach_running_app_context', - 'app_manager_foreach_visible_app_context', - 'app_manager_get_app_context', - 'app_manager_get_app_context_by_instance_id', - 'app_manager_get_app_id', - 'app_manager_get_app_info', - 'app_manager_get_external_shared_data_path', - 'app_manager_get_focused_app_context', - 'app_manager_get_shared_data_path', - 'app_manager_get_shared_resource_path', - 'app_manager_get_shared_trusted_path', - 'app_manager_is_running', - 'app_manager_request_terminate_bg_app', - 'app_manager_resume_app', - 'app_manager_set_app_context_event_cb', - 'app_manager_set_app_context_status_cb', - 'app_manager_set_event_cb', - 'app_manager_set_splash_screen_display', - 'app_manager_terminate_app', - 'app_manager_unset_app_context_event_cb', - 'app_manager_unset_app_context_status_cb', - 'app_manager_unset_event_cb', - ], - 'libbadge.so.0': [ - 'badge_add', - 'badge_add_deferred_task', - 'badge_add_for_uid', - 'badge_create', - 'badge_create_for_uid', - 'badge_db_delete', - 'badge_db_delete_by_pkgname', - 'badge_db_exec', - 'badge_db_get_allow_to_display_by_appid', - 'badge_db_get_count', - 'badge_db_get_display_option', - 'badge_db_get_list', - 'badge_db_get_setting_by_appid', - 'badge_db_init', - 'badge_db_insert', - 'badge_db_is_existing', - 'badge_db_set_count', - 'badge_db_set_display_option', - 'badge_db_update_setting', - 'badge_del_deferred_task', - 'badge_error_quark', - 'badge_foreach', - 'badge_foreach_for_uid', - 'badge_get_count', - 'badge_get_count_for_uid', - 'badge_get_display', - 'badge_get_display_for_uid', - 'badge_ipc_make_gvariant_from_setting', - 'badge_ipc_make_setting_from_gvariant', - 'badge_is_existing', - 'badge_is_existing_for_uid', - 'badge_is_service_ready', - 'badge_new', - 'badge_new_for_uid', - 'badge_register_changed_cb', - 'badge_register_changed_cb_for_uid', - 'badge_remove', - 'badge_remove_for_uid', - 'badge_set_count', - 'badge_set_count_for_uid', - 'badge_set_display', - 'badge_set_display_for_uid', - 'badge_setting_arrange_tables', - 'badge_setting_delete_package_for_uid', - 'badge_setting_free_setting', - 'badge_setting_get_allow_to_display', - 'badge_setting_get_appid', - 'badge_setting_get_pkgname', - 'badge_setting_get_setting_by_appid', - 'badge_setting_get_setting_by_appid_for_uid', - 'badge_setting_insert_package_for_uid', - 'badge_setting_is_existed_appid', - 'badge_setting_refresh_setting_table', - 'badge_setting_set_allow_to_display', - 'badge_setting_update_setting', - 'badge_setting_update_setting_for_uid', - 'badge_unregister_changed_cb', - 'badge_unregister_changed_cb_for_uid', - ], - 'libbundle.so.0': [ - 'bundle_add', - 'bundle_add_byte', - 'bundle_add_byte_array', - 'bundle_add_str', - 'bundle_add_str_array', - 'bundle_compare', - 'bundle_create', - 'bundle_decode', - 'bundle_decode_raw', - 'bundle_del', - 'bundle_dup', - 'bundle_encode', - 'bundle_encode_raw', - 'bundle_export_to_argv', - 'bundle_foreach', - 'bundle_free', - 'bundle_free_encoded_rawdata', - 'bundle_free_exported_argv', - 'bundle_from_json', - 'bundle_get_byte', - 'bundle_get_byte_array', - 'bundle_get_count', - 'bundle_get_str', - 'bundle_get_str_array', - 'bundle_get_type', - 'bundle_get_val', - 'bundle_import_from_argv', - 'bundle_iterate', - 'bundle_keyval_get_array_val', - 'bundle_keyval_get_basic_val', - 'bundle_keyval_get_type', - 'bundle_keyval_type_is_array', - 'bundle_keyval_type_is_measurable', - 'bundle_set_byte_array_element', - 'bundle_set_str_array_element', - 'bundle_to_json', - ], - 'libdata-control.so.0': [ - 'data_control_add_data_change_cb', - 'data_control_bulk_data_add', - 'data_control_bulk_data_create', - 'data_control_bulk_data_destroy', - 'data_control_bulk_data_get_count', - 'data_control_bulk_data_get_data', - 'data_control_bulk_result_data_add', - 'data_control_bulk_result_data_create', - 'data_control_bulk_result_data_destroy', - 'data_control_bulk_result_data_get_count', - 'data_control_bulk_result_data_get_result_data', - 'data_control_map_add', - 'data_control_map_add_bulk_data', - 'data_control_map_bind_add_bulk_data_response_cb', - 'data_control_map_bind_response_cb', - 'data_control_map_create', - 'data_control_map_destroy', - 'data_control_map_get', - 'data_control_map_get_data_id', - 'data_control_map_get_handle_id', - 'data_control_map_get_provider_id', - 'data_control_map_get_with_page', - 'data_control_map_register_add_bulk_data_response_cb', - 'data_control_map_register_response_cb', - 'data_control_map_remove', - 'data_control_map_set', - 'data_control_map_set_data_id', - 'data_control_map_set_provider_id', - 'data_control_map_unbind_add_bulk_data_response_cb', - 'data_control_map_unbind_response_cb', - 'data_control_map_unregister_add_bulk_data_response_cb', - 'data_control_map_unregister_response_cb', - 'data_control_provider_add_data_change_consumer_filter_cb', - 'data_control_provider_create_delete_statement', - 'data_control_provider_create_insert_statement', - 'data_control_provider_create_select_statement', - 'data_control_provider_create_update_statement', - 'data_control_provider_foreach_data_change_consumer', - 'data_control_provider_get_client_appid', - 'datacontrol_provider_get_select_page_info', - 'data_control_provider_map_register_add_bulk_data_request_cb', - 'data_control_provider_map_register_cb', - 'data_control_provider_map_unregister_add_bulk_data_request_cb', - 'data_control_provider_map_unregister_cb', - 'data_control_provider_match_data_id', - 'data_control_provider_match_provider_id', - 'data_control_provider_remove_data_change_consumer_filter_cb', - 'data_control_provider_send_bulk_insert_result', - 'data_control_provider_send_data_change_noti', - 'data_control_provider_send_delete_result', - 'data_control_provider_send_error', - 'data_control_provider_send_insert_result', - 'data_control_provider_send_map_bulk_add_result', - 'data_control_provider_send_map_get_value_result', - 'data_control_provider_send_map_result', - 'data_control_provider_send_select_result', - 'datacontrol_provider_send_select_result_without_data', - 'data_control_provider_send_update_result', - 'data_control_provider_sql_register_cb', - 'data_control_provider_sql_register_insert_bulk_data_request_cb', - 'data_control_provider_sql_unregister_cb', - 'data_control_provider_sql_unregister_insert_bulk_data_request_cb', - 'datacontrol_provider_write_socket', - 'data_control_remove_data_change_cb', - 'data_control_sql_bind_insert_bulk_data_response_cb', - 'data_control_sql_bind_response_cb', - 'data_control_sql_create', - 'data_control_sql_delete', - 'data_control_sql_destroy', - 'data_control_sql_get_blob_data', - 'data_control_sql_get_column_count', - 'data_control_sql_get_column_item_size', - 'data_control_sql_get_column_item_type', - 'data_control_sql_get_column_name', - 'data_control_sql_get_data_id', - 'data_control_sql_get_double_data', - 'data_control_sql_get_handle_id', - 'data_control_sql_get_int64_data', - 'data_control_sql_get_int_data', - 'data_control_sql_get_provider_id', - 'data_control_sql_get_text_data', - 'data_control_sql_insert', - 'data_control_sql_insert_bulk_data', - 'data_control_sql_register_insert_bulk_data_response_cb', - 'data_control_sql_register_response_cb', - 'data_control_sql_select', - 'data_control_sql_select_with_page', - 'data_control_sql_set_data_id', - 'data_control_sql_set_provider_id', - 'data_control_sql_step_first', - 'data_control_sql_step_last', - 'data_control_sql_step_next', - 'data_control_sql_step_previous', - 'data_control_sql_unbind_insert_bulk_data_response_cb', - 'data_control_sql_unbind_response_cb', - 'data_control_sql_unregister_insert_bulk_data_response_cb', - 'data_control_sql_unregister_response_cb', - 'data_control_sql_update', - ], - 'libmessage-port.so.1': [ - 'message_port_add_registered_cb', - 'message_port_add_unregistered_cb', - 'message_port_check_remote_port', - 'message_port_check_trusted_remote_port', - 'message_port_register_local_port', - 'message_port_register_trusted_local_port', - 'message_port_remove_registration_event_cb', - 'message_port_send_message', - 'message_port_send_message_with_local_port', - 'message_port_send_trusted_message', - 'message_port_send_trusted_message_with_local_port', - 'message_port_unregister_local_port', - 'message_port_unregister_trusted_local_port', - ], - 'libnotification.so.0': [ - 'notification_add_button', - 'notification_add_deferred_task', - 'notification_add_private_sharing_target_id', - 'notification_calibrate_private_sharing', - 'notification_check_event_receiver_available', - 'notification_clear', - 'notification_clone', - 'notification_create', - 'notification_create_from_package_template', - 'notification_create_from_template', - 'notification_db_init', - 'notification_del_deferred_task', - 'notification_delete', - 'notification_delete_all', - 'notification_delete_all_by_type', - 'notification_delete_all_for_uid', - 'notification_delete_by_priv_id', - 'notification_delete_for_uid', - 'notification_delete_group_by_group_id', - 'notification_delete_group_by_priv_id', - 'notification_error_quark', - 'notification_free', - 'notification_free_list', - 'notification_get_all_count', - 'notification_get_all_count_for_uid', - 'notification_get_application', - 'notification_get_args', - 'notification_get_auto_remove', - 'notification_get_content', - 'notification_get_count', - 'notification_get_default_button', - 'notification_get_default_viewer', - 'notification_get_delete_timeout', - 'notification_get_detail_list', - 'notification_get_detail_list_for_uid', - 'notification_get_display_applist', - 'notification_get_dnd_and_allow_to_notify', - 'notification_get_event_flag', - 'notification_get_event_handler', - 'notification_get_execute_option', - 'notification_get_extension_data', - 'notification_get_extension_event_handler', - 'notification_get_extension_image_size', - 'notification_get_extention_data', - 'notification_get_grouping_list', - 'notification_get_hide_timeout', - 'notification_get_icon', - 'notification_get_id', - 'notification_get_image', - 'notification_get_insert_time', - 'notification_get_launch_option', - 'notification_get_layout', - 'notification_get_led', - 'notification_get_led_time_period', - 'notification_get_list', - 'notification_get_list_by_page', - 'notification_get_list_by_page_for_uid', - 'notification_get_list_for_uid', - 'notification_get_noti_block_state', - 'notification_get_ongoing_flag', - 'notification_get_ongoing_time', - 'notification_get_ongoing_value_type', - 'notification_get_pkgname', - 'notification_get_progress', - 'notification_get_property', - 'notification_get_size', - 'notification_get_sound', - 'notification_get_tag', - 'notification_get_text', - 'notification_get_text_domain', - 'notification_get_text_input_max_length', - 'notification_get_time', - 'notification_get_time_from_text', - 'notification_get_title', - 'notification_get_type', - 'notification_get_uid', - 'notification_get_vibration', - 'notification_insert', - 'notification_insert_for_uid', - 'notification_ipc_get_socket_write_buf_size', - 'notification_ipc_make_gvariant_from_dnd_allow_exception', - 'notification_ipc_make_gvariant_from_noti', - 'notification_ipc_make_gvariant_from_setting', - 'notification_ipc_make_gvariant_from_system_setting', - 'notification_ipc_make_noti_from_gvariant', - 'notification_ipc_make_setting_from_gvariant', - 'notification_ipc_make_system_setting_from_gvariant', - 'notification_ipc_socket_get_read_buf_size', - 'notification_ipc_socket_pair', - 'notification_ipc_socket_read', - 'notification_ipc_socket_write', - 'notification_ipc_socket_write_string', - 'notification_is_service_ready', - 'notification_launch_default_viewer', - 'notification_list_append', - 'notification_list_get_count', - 'notification_list_get_data', - 'notification_list_get_head', - 'notification_list_get_next', - 'notification_list_get_prev', - 'notification_list_get_tail', - 'notification_list_remove', - 'notification_load', - 'notification_load_by_tag', - 'notification_load_by_tag_for_uid', - 'notification_new', - 'notification_noti_add_template', - 'notification_noti_check_count_for_template', - 'notification_noti_check_tag', - 'notification_noti_delete_all', - 'notification_noti_delete_by_priv_id', - 'notification_noti_delete_by_priv_id_get_changes', - 'notification_noti_delete_template', - 'notification_noti_get_all_count', - 'notification_noti_get_by_priv_id', - 'notification_noti_get_by_tag', - 'notification_noti_get_count', - 'notification_noti_get_detail_list', - 'notification_noti_get_grouping_list', - 'notification_noti_get_package_template', - 'notification_noti_insert', - 'notification_noti_update', - 'notification_ongoing_update_cb_set', - 'notification_ongoing_update_cb_unset', - 'notification_op_get_data', - 'notification_post', - 'notification_post_for_uid', - 'notification_post_with_event_cb', - 'notification_post_with_event_cb_for_uid', - 'notification_register_detailed_changed_cb', - 'notification_register_detailed_changed_cb_for_uid', - 'notification_register_system_setting_dnd_changed_cb', - 'notification_register_system_setting_dnd_changed_cb_for_uid', - 'notification_remove_button', - 'notification_remove_private_sharing', - 'notification_remove_private_sharing_target_id', - 'notification_resister_changed_cb', - 'notification_resister_changed_cb_for_uid', - 'notification_save_as_template', - 'notification_send_event', - 'notification_send_event_by_priv_id', - 'notification_set_app_id', - 'notification_set_application', - 'notification_set_args', - 'notification_set_auto_remove', - 'notification_set_content', - 'notification_set_default_button', - 'notification_set_delete_timeout', - 'notification_set_display_applist', - 'notification_set_event_handler', - 'notification_set_execute_option', - 'notification_set_extension_data', - 'notification_set_extension_event_handler', - 'notification_set_extension_image_size', - 'notification_set_extention_data', - 'notification_set_hide_timeout', - 'notification_set_icon', - 'notification_set_image', - 'notification_set_launch_option', - 'notification_set_layout', - 'notification_set_led', - 'notification_set_led_time_period', - 'notification_set_ongoing_flag', - 'notification_set_ongoing_time', - 'notification_set_ongoing_value_type', - 'notification_set_pkgname', - 'notification_set_private_sharing', - 'notification_set_priv_id', - 'notification_set_progress', - 'notification_set_property', - 'notification_set_size', - 'notification_set_sound', - 'notification_set_tag', - 'notification_set_text', - 'notification_set_text_domain', - 'notification_set_text_input', - 'notification_set_time', - 'notification_set_time_to_text', - 'notification_setting_db_update', - 'notification_setting_db_update_app_disabled', - 'notification_setting_db_update_do_not_disturb', - 'notification_setting_db_update_system_setting', - 'notification_setting_delete_package_for_uid', - 'notification_setting_free_notification', - 'notification_setting_get_allow_to_notify', - 'notification_setting_get_app_disabled', - 'notification_setting_get_appid', - 'notification_setting_get_do_not_disturb_except', - 'notification_setting_get_lock_screen_content', - 'notification_setting_get_package_name', - 'notification_setting_get_pop_up_notification', - 'notification_setting_get_setting', - 'notification_setting_get_setting_array', - 'notification_setting_get_setting_array_for_uid', - 'notification_setting_get_setting_by_appid_for_uid', - 'notification_setting_get_setting_by_package_name', - 'notification_setting_get_visibility_class', - 'notification_setting_insert_package_for_uid', - 'notification_setting_refresh_setting_table', - 'notification_setting_set_allow_to_notify', - 'notification_setting_set_do_not_disturb_except', - 'notification_setting_set_lock_screen_content', - 'notification_setting_set_pop_up_notification', - 'notification_setting_set_visibility_class', - 'notification_setting_update_setting', - 'notification_setting_update_setting_for_uid', - 'notification_set_title', - 'notification_set_uid', - 'notification_set_vibration', - 'notification_status_message_post', - 'notification_status_monitor_message_cb_set', - 'notification_status_monitor_message_cb_unset', - 'notification_system_setting_dnd_schedule_get_day', - 'notification_system_setting_dnd_schedule_get_enabled', - 'notification_system_setting_dnd_schedule_get_end_time', - 'notification_system_setting_dnd_schedule_get_start_time', - 'notification_system_setting_dnd_schedule_set_day', - 'notification_system_setting_dnd_schedule_set_enabled', - 'notification_system_setting_dnd_schedule_set_end_time', - 'notification_system_setting_dnd_schedule_set_start_time', - 'notification_system_setting_free_system_setting', - 'notification_system_setting_get_dnd_allow_exceptions', - 'notification_system_setting_get_dnd_schedule_enabled_uid', - 'notification_system_setting_get_do_not_disturb', - 'notification_system_setting_get_lock_screen_content', - 'notification_system_setting_get_visibility_class', - 'notification_system_setting_init_system_setting_table', - 'notification_system_setting_load_dnd_allow_exception', - 'notification_system_setting_load_system_setting', - 'notification_system_setting_load_system_setting_for_uid', - 'notification_system_setting_set_dnd_allow_exceptions', - 'notification_system_setting_set_do_not_disturb', - 'notification_system_setting_set_lock_screen_content', - 'notification_system_setting_set_visibility_class', - 'notification_system_setting_update_dnd_allow_exception', - 'notification_system_setting_update_system_setting', - 'notification_system_setting_update_system_setting_for_uid', - 'notification_translate_localized_text', - 'notification_unregister_detailed_changed_cb', - 'notification_unregister_detailed_changed_cb_for_uid', - 'notification_unregister_system_setting_dnd_changed_cb', - 'notification_unregister_system_setting_dnd_changed_cb_for_uid', - 'notification_unresister_changed_cb', - 'notification_unresister_changed_cb_for_uid', - 'notification_update', - 'notification_update_async', - 'notification_update_async_for_uid', - 'notification_update_content', - 'notification_update_for_uid', - 'notification_update_progress', - 'notification_update_size', - 'notification_validate_private_sharing', - 'noti_setting_get_setting_array', - 'noti_setting_service_get_setting_by_app_id', - 'noti_system_setting_get_do_not_disturb', - 'noti_system_setting_load_system_setting', - ], - 'libcapi-appfw-package-manager.so.0': [ - 'package_archive_info_create', - 'package_archive_info_destroy', - 'package_archive_info_get_api_version', - 'package_archive_info_get_author', - 'package_archive_info_get_description', - 'package_archive_info_get_icon', - 'package_archive_info_get_label', - 'package_archive_info_get_package', - 'package_archive_info_get_type', - 'package_archive_info_get_version', - 'package_info_clone', - 'package_info_create', - 'package_info_destroy', - 'package_info_foreach_app_from_package', - 'package_info_foreach_cert_info', - 'package_info_foreach_privilege_info', - 'package_info_get_icon', - 'package_info_get_installed_storage', - 'package_info_get_installed_time', - 'package_info_get_label', - 'package_info_get_main_app_id', - 'package_info_get_package', - 'package_info_get_root_path', - 'package_info_get_tep_name', - 'package_info_get_type', - 'package_info_get_version', - 'package_info_is_accessible', - 'package_info_is_equal', - 'package_info_is_preload_package', - 'package_info_is_removable_package', - 'package_info_is_system_package', - 'package_info_updateinfo_create', - 'package_info_updateinfo_destroy', - 'package_info_updateinfo_foreach_info', - 'package_info_updateinfo_get_pkgid', - 'package_info_updateinfo_get_type', - 'package_info_updateinfo_get_version', - 'package_manager_clear_all_cache_dir', - 'package_manager_clear_cache_dir', - 'package_manager_clear_data_dir', - 'package_manager_compare_app_cert_info', - 'package_manager_compare_package_cert_info', - 'package_manager_create', - 'package_manager_destroy', - 'package_manager_drm_decrypt_package', - 'package_manager_drm_generate_license_request', - 'package_manager_drm_register_license', - 'package_manager_filter_add_bool', - 'package_manager_filter_count', - 'package_manager_filter_create', - 'package_manager_filter_destroy', - 'package_manager_filter_foreach_package_info', - 'package_manager_foreach_package_info', - 'package_manager_get_package_id_by_app_id', - 'package_manager_get_package_info', - 'package_manager_get_package_size_info', - 'package_manager_get_permission_type', - 'package_manager_get_total_package_size_info', - 'package_manager_is_preload_package_by_app_id', - 'package_manager_request_create', - 'package_manager_request_destroy', - 'package_manager_request_install', - 'package_manager_request_install_with_cb', - 'package_manager_request_mount_install', - 'package_manager_request_mount_install_with_cb', - 'package_manager_request_move', - 'package_manager_request_move_with_cb', - 'package_manager_request_set_event_cb', - 'package_manager_request_set_mode', - 'package_manager_request_set_tep', - 'package_manager_request_set_type', - 'package_manager_request_uninstall', - 'package_manager_request_uninstall_with_cb', - 'package_manager_request_unset_event_cb', - 'package_manager_set_event_cb', - 'package_manager_set_event_status', - 'package_manager_unset_event_cb', - 'package_manager_updateinfo_request_create', - 'package_manager_updateinfo_request_destroy', - 'package_manager_updateinfo_request_register', - 'package_manager_updateinfo_request_unregister', - 'package_manager_updateinfo_request_unregister_all', - 'package_manager_updateinfo_set_pkgid', - 'package_manager_updateinfo_set_type', - 'package_manager_updateinfo_set_version', - 'package_size_info_get_app_size', - 'package_size_info_get_cache_size', - 'package_size_info_get_data_size', - 'package_size_info_get_external_app_size', - 'package_size_info_get_external_cache_size', - 'package_size_info_get_external_data_size', - ], - 'libappcore-agent.so.1': [ - 'service_app_add_event_handler', - 'service_app_add_job_handler', - 'service_app_exit', - 'service_app_exit_without_restart', - 'service_app_job_finished', - 'service_app_job_raise', - 'service_app_main', - 'service_app_main_ext', - 'service_app_remove_event_handler', - 'service_app_remove_job_handler', - ], - 'libshortcut.so.0': [ - 'add_to_home_dynamicbox', - 'add_to_home_shortcut', - 'shortcut_add_to_home', - 'shortcut_add_to_home_widget', - 'shortcut_db_get_list', - 'shortcut_db_init', - 'shortcut_error_quark', - 'shortcut_get_list', - 'shortcut_remove_from_home', - 'shortcut_set_remove_cb', - 'shortcut_set_request_cb', - 'shortcut_unset_remove_cb', - 'shortcut_unset_request_cb', - ], - 'libcapi-base-common.so.0': [ - 'get_error_message', - 'get_last_result', - 'set_last_result', - ], - 'libcapi-web-url-download.so.0': [ - 'download_add_http_header_field', - 'download_cancel', - 'download_create', - 'download_destroy', - 'download_get_auto_download', - 'download_get_content_name', - 'download_get_content_size', - 'download_get_destination', - 'download_get_downloaded_file_path', - 'download_get_error', - 'download_get_etag', - 'download_get_file_name', - 'download_get_http_header_field', - 'download_get_http_header_field_list', - 'download_get_http_status', - 'download_get_mime_type', - 'download_get_network_bonding', - 'download_get_network_type', - 'download_get_notification_app_control', - 'download_get_notification_description', - 'download_get_notification_title', - 'download_get_notification_type', - 'download_get_state', - 'download_get_temp_path', - 'download_get_url', - 'download_pause', - 'download_remove_http_header_field', - 'download_set_auto_download', - 'download_set_destination', - 'download_set_file_name', - 'download_set_network_bonding', - 'download_set_network_type', - 'download_set_notification_app_control', - 'download_set_notification_description', - 'download_set_notification_title', - 'download_set_notification_type', - 'download_set_progress_cb', - 'download_set_state_changed_cb', - 'download_set_temp_file_path', - 'download_set_url', - 'download_start', - 'download_unset_progress_cb', - 'download_unset_state_changed_cb', - ], - 'libcapi-content-mime-type.so.0': [ - 'mime_type_get_file_extension', - 'mime_type_get_generic_icon', - 'mime_type_get_icon', - 'mime_type_get_mime_type', - 'mime_type_get_mime_type_for_data', - 'mime_type_get_mime_type_for_file', - ], - 'libcapi-content-media-content.so.0': [ - 'audio_meta_clone', - 'audio_meta_destroy', - 'audio_meta_get_album', - 'audio_meta_get_album_artist', - 'audio_meta_get_artist', - 'audio_meta_get_bitpersample', - 'audio_meta_get_bit_rate', - 'audio_meta_get_channel', - 'audio_meta_get_composer', - 'audio_meta_get_copyright', - 'audio_meta_get_duration', - 'audio_meta_get_genre', - 'audio_meta_get_media_id', - 'audio_meta_get_played_count', - 'audio_meta_get_played_position', - 'audio_meta_get_played_time', - 'audio_meta_get_recorded_date', - 'audio_meta_get_sample_rate', - 'audio_meta_get_track_num', - 'audio_meta_get_year', - 'audio_meta_set_played_count', - 'audio_meta_set_played_position', - 'audio_meta_set_played_time', - 'audio_meta_update_to_db', - 'image_meta_clone', - 'image_meta_destroy', - 'image_meta_get_burst_id', - 'image_meta_get_date_taken', - 'image_meta_get_exposure_time', - 'image_meta_get_fnumber', - 'image_meta_get_height', - 'image_meta_get_iso', - 'image_meta_get_media_id', - 'image_meta_get_model', - 'image_meta_get_orientation', - 'image_meta_get_width', - 'image_meta_is_burst_shot', - 'image_meta_set_orientation', - 'image_meta_update_to_db', - 'media_album_clone', - 'media_album_destroy', - 'media_album_foreach_album_from_db', - 'media_album_foreach_media_from_db', - 'media_album_get_album_art', - 'media_album_get_album_count_from_db', - 'media_album_get_album_from_db', - 'media_album_get_album_id', - 'media_album_get_artist', - 'media_album_get_media_count_from_db', - 'media_album_get_name', - 'media_bookmark_clone', - 'media_bookmark_create', - 'media_bookmark_delete_from_db', - 'media_bookmark_destroy', - 'media_bookmark_foreach_bookmark_from_db', - 'media_bookmark_get_bookmark_count_from_db', - 'media_bookmark_get_bookmark_id', - 'media_bookmark_get_marked_time', - 'media_bookmark_get_name', - 'media_bookmark_get_thumbnail_path', - 'media_bookmark_insert_to_db', - 'media_bookmark_insert_to_db_v2', - 'media_bookmark_set_name', - 'media_bookmark_set_thumbnail_path', - 'media_bookmark_update_to_db', - 'media_content_add_db_updated_cb', - 'media_content_cancel_scan_folder', - 'media_content_connect', - 'media_content_connect_with_uid', - 'media_content_disconnect', - 'media_content_remove_db_updated_cb', - 'media_content_scan_file', - 'media_content_scan_folder', - 'media_content_set_db_updated_cb', - 'media_content_unset_db_updated_cb', - 'media_face_clone', - 'media_face_create', - 'media_face_delete_from_db', - 'media_face_destroy', - 'media_face_foreach_face_from_db', - 'media_face_get_face_count_from_db', - 'media_face_get_face_id', - 'media_face_get_face_rect', - 'media_face_get_media_id', - 'media_face_get_orientation', - 'media_face_get_tag', - 'media_face_insert_to_db', - 'media_face_set_face_rect', - 'media_face_set_orientation', - 'media_face_set_tag', - 'media_face_update_to_db', - 'media_filter_create', - 'media_filter_destroy', - 'media_filter_get_condition', - 'media_filter_get_condition_v2', - 'media_filter_get_offset', - 'media_filter_get_order', - 'media_filter_get_order_v2', - 'media_filter_get_storage', - 'media_filter_set_condition', - 'media_filter_set_condition_v2', - 'media_filter_set_offset', - 'media_filter_set_order', - 'media_filter_set_order_v2', - 'media_filter_set_storage', - 'media_folder_clone', - 'media_folder_destroy', - 'media_folder_foreach_folder_from_db', - 'media_folder_foreach_media_from_db', - 'media_folder_get_folder_count_from_db', - 'media_folder_get_folder_from_db', - 'media_folder_get_folder_id', - 'media_folder_get_media_count_from_db', - 'media_folder_get_modified_time', - 'media_folder_get_name', - 'media_folder_get_order', - 'media_folder_get_parent_folder_id', - 'media_folder_get_path', - 'media_folder_get_storage_id', - 'media_folder_get_storage_type', - 'media_folder_set_name', - 'media_folder_set_order', - 'media_folder_update_to_db', - 'media_group_foreach_group_from_db', - 'media_group_foreach_media_from_db', - 'media_group_get_group_count_from_db', - 'media_group_get_media_count_from_db', - 'media_info_cancel_face_detection', - 'media_info_cancel_thumbnail', - 'media_info_clone', - 'media_info_create', - 'media_info_create_thumbnail', - 'media_info_delete_batch_from_db', - 'media_info_delete_from_db', - 'media_info_destroy', - 'media_info_foreach_bookmark_from_db', - 'media_info_foreach_face_from_db', - 'media_info_foreach_media_from_db', - 'media_info_foreach_tag_from_db', - 'media_info_get_added_time', - 'media_info_get_age_rating', - 'media_info_get_altitude', - 'media_info_get_audio', - 'media_info_get_author', - 'media_info_get_bookmark_count_from_db', - 'media_info_get_category', - 'media_info_get_content_name', - 'media_info_get_description', - 'media_info_get_display_name', - 'media_info_get_face_count_from_db', - 'media_info_get_favorite', - 'media_info_get_file_path', - 'media_info_get_image', - 'media_info_get_keyword', - 'media_info_get_latitude', - 'media_info_get_location_tag', - 'media_info_get_longitude', - 'media_info_get_media_count_from_db', - 'media_info_get_media_from_db', - 'media_info_get_media_id', - 'media_info_get_media_type', - 'media_info_get_mime_type', - 'media_info_get_modified_time', - 'media_info_get_played_count', - 'media_info_get_played_time', - 'media_info_get_provider', - 'media_info_get_rating', - 'media_info_get_size', - 'media_info_get_storage_id', - 'media_info_get_storage_type', - 'media_info_get_tag_count_from_db', - 'media_info_get_thumbnail_path', - 'media_info_get_timeline', - 'media_info_get_title', - 'media_info_get_video', - 'media_info_get_weather', - 'media_info_increase_played_count', - 'media_info_insert_batch_to_db', - 'media_info_insert_burst_shot_to_db', - 'media_info_insert_to_db', - 'media_info_insert_to_db_with_data', - 'media_info_is_360_content', - 'media_info_is_drm', - 'media_info_move_to_db', - 'media_info_refresh_metadata_to_db', - 'media_info_set_added_time', - 'media_info_set_age_rating', - 'media_info_set_album', - 'media_info_set_altitude', - 'media_info_set_artist', - 'media_info_set_author', - 'media_info_set_category', - 'media_info_set_content_name', - 'media_info_set_description', - 'media_info_set_display_name', - 'media_info_set_favorite', - 'media_info_set_genre', - 'media_info_set_keyword', - 'media_info_set_latitude', - 'media_info_set_location_tag', - 'media_info_set_longitude', - 'media_info_set_played_time', - 'media_info_set_provider', - 'media_info_set_rating', - 'media_info_set_recorded_date', - 'media_info_set_title', - 'media_info_set_weather', - 'media_info_start_face_detection', - 'media_info_update_to_db', - 'media_playlist_add_media', - 'media_playlist_clone', - 'media_playlist_create', - 'media_playlist_delete_from_db', - 'media_playlist_destroy', - 'media_playlist_export_to_file', - 'media_playlist_foreach_media_from_db', - 'media_playlist_foreach_playlist_from_db', - 'media_playlist_get_media_count_from_db', - 'media_playlist_get_name', - 'media_playlist_get_playlist_count_from_db', - 'media_playlist_get_playlist_from_db', - 'media_playlist_get_playlist_id', - 'media_playlist_get_play_order', - 'media_playlist_get_play_order_v2', - 'media_playlist_get_thumbnail_path', - 'media_playlist_import_from_file', - 'media_playlist_insert_to_db', - 'media_playlist_insert_to_db_v2', - 'media_playlist_remove_media', - 'media_playlist_set_name', - 'media_playlist_set_play_order', - 'media_playlist_set_thumbnail_path', - 'media_playlist_update_to_db', - 'media_playlist_update_to_db_v2', - 'media_storage_clone', - 'media_storage_destroy', - 'media_storage_foreach_media_from_db', - 'media_storage_foreach_storage_from_db', - 'media_storage_get_id', - 'media_storage_get_media_count_from_db', - 'media_storage_get_name', - 'media_storage_get_path', - 'media_storage_get_storage_count_from_db', - 'media_storage_get_storage_info_from_db', - 'media_storage_get_type', - 'media_tag_add_media', - 'media_tag_clone', - 'media_tag_create', - 'media_tag_delete_from_db', - 'media_tag_destroy', - 'media_tag_foreach_media_from_db', - 'media_tag_foreach_tag_from_db', - 'media_tag_get_media_count_from_db', - 'media_tag_get_name', - 'media_tag_get_tag_count_from_db', - 'media_tag_get_tag_from_db', - 'media_tag_get_tag_id', - 'media_tag_insert_to_db', - 'media_tag_insert_to_db_v2', - 'media_tag_remove_media', - 'media_tag_set_name', - 'media_tag_update_to_db', - 'media_tag_update_to_db_v2', - 'video_meta_clone', - 'video_meta_destroy', - 'video_meta_get_album', - 'video_meta_get_album_artist', - 'video_meta_get_artist', - 'video_meta_get_bit_rate', - 'video_meta_get_composer', - 'video_meta_get_copyright', - 'video_meta_get_duration', - 'video_meta_get_genre', - 'video_meta_get_height', - 'video_meta_get_media_id', - 'video_meta_get_played_count', - 'video_meta_get_played_position', - 'video_meta_get_played_time', - 'video_meta_get_recorded_date', - 'video_meta_get_rotation', - 'video_meta_get_track_num', - 'video_meta_get_width', - 'video_meta_get_year', - 'video_meta_set_played_count', - 'video_meta_set_played_position', - 'video_meta_set_played_time', - 'video_meta_update_to_db', - ], - 'libcapi-messaging-email.so.0': [ - 'email_add_attach', - 'email_add_recipient', - 'email_create_message', - 'email_destroy_message', - 'email_remove_all_attachments', - 'email_remove_all_recipients', - 'email_save_message', - 'email_send_message', - 'email_set_body', - 'email_set_message_sent_cb', - 'email_set_subject', - 'email_unset_message_sent_cb', - ], - 'libcapi-messaging-messages.so.0': [ - 'messages_add_address', - 'messages_add_message', - 'messages_add_sms_listening_port', - 'messages_close_service', - 'messages_create_message', - 'messages_destroy_message', - 'messages_foreach_message', - 'messages_free_message_array', - 'messages_get_address', - 'messages_get_address_count', - 'messages_get_mbox_type', - 'messages_get_message_count', - 'messages_get_message_id', - 'messages_get_message_port', - 'messages_get_message_type', - 'messages_get_sim_id', - 'messages_get_text', - 'messages_get_time', - 'messages_mms_add_attachment', - 'messages_mms_get_attachment', - 'messages_mms_get_attachment_count', - 'messages_mms_get_subject', - 'messages_mms_remove_all_attachments', - 'messages_mms_set_subject', - 'messages_open_service', - 'messages_push_add_incoming_cb', - 'messages_push_deregister', - 'messages_push_register', - 'messages_push_remove_incoming_cb', - 'messages_push_reregister', - 'messages_remove_all_addresses', - 'messages_search_message', - 'messages_search_message_by_id', - 'messages_send_message', - 'messages_set_mbox_type', - 'messages_set_message_incoming_cb', - 'messages_set_sim_id', - 'messages_set_text', - 'messages_set_time', - 'messages_unset_message_incoming_cb', - ], - 'libcapi-media-audio-io.so.0': [ - 'audio_in_create', - 'audio_in_create_loopback', - 'audio_in_destroy', - 'audio_in_drop', - 'audio_in_flush', - 'audio_in_get_buffer_size', - 'audio_in_get_channel', - 'audio_in_get_sample_rate', - 'audio_in_get_sample_type', - 'audio_in_ignore_session', - 'audio_in_pause', - 'audio_in_peek', - 'audio_in_prepare', - 'audio_in_read', - 'audio_in_resume', - 'audio_in_set_interrupted_cb', - 'audio_in_set_sound_stream_info', - 'audio_in_set_state_changed_cb', - 'audio_in_set_stream_cb', - 'audio_in_unprepare', - 'audio_in_unset_interrupted_cb', - 'audio_in_unset_state_changed_cb', - 'audio_in_unset_stream_cb', - 'audio_out_create', - 'audio_out_create_new', - 'audio_out_destroy', - 'audio_out_drain', - 'audio_out_flush', - 'audio_out_get_buffer_size', - 'audio_out_get_channel', - 'audio_out_get_sample_rate', - 'audio_out_get_sample_type', - 'audio_out_get_sound_type', - 'audio_out_ignore_session', - 'audio_out_pause', - 'audio_out_prepare', - 'audio_out_resume', - 'audio_out_set_interrupted_cb', - 'audio_out_set_sound_stream_info', - 'audio_out_set_state_changed_cb', - 'audio_out_set_stream_cb', - 'audio_out_unprepare', - 'audio_out_unset_interrupted_cb', - 'audio_out_unset_state_changed_cb', - 'audio_out_unset_stream_cb', - 'audio_out_write', - 'cpp_audio_in_create', - 'cpp_audio_in_create_loopback', - 'cpp_audio_in_destroy', - 'cpp_audio_in_drain', - 'cpp_audio_in_drop', - 'cpp_audio_in_flush', - 'cpp_audio_in_get_buffer_size', - 'cpp_audio_in_get_channel', - 'cpp_audio_in_get_sample_rate', - 'cpp_audio_in_get_sample_type', - 'cpp_audio_in_ignore_session', - 'cpp_audio_in_pause', - 'cpp_audio_in_peek', - 'cpp_audio_in_prepare', - 'cpp_audio_in_read', - 'cpp_audio_in_resume', - 'cpp_audio_in_set_interrupted_cb', - 'cpp_audio_in_set_sound_stream_info', - 'cpp_audio_in_set_state_changed_cb', - 'cpp_audio_in_set_stream_cb', - 'cpp_audio_in_unprepare', - 'cpp_audio_in_unset_interrupted_cb', - 'cpp_audio_in_unset_state_changed_cb', - 'cpp_audio_in_unset_stream_cb', - 'cpp_audio_out_create', - 'cpp_audio_out_create_new', - 'cpp_audio_out_destroy', - 'cpp_audio_out_drain', - 'cpp_audio_out_flush', - 'cpp_audio_out_get_buffer_size', - 'cpp_audio_out_get_channel', - 'cpp_audio_out_get_sample_rate', - 'cpp_audio_out_get_sample_type', - 'cpp_audio_out_get_sound_type', - 'cpp_audio_out_ignore_session', - 'cpp_audio_out_pause', - 'cpp_audio_out_prepare', - 'cpp_audio_out_resume', - 'cpp_audio_out_set_interrupted_cb', - 'cpp_audio_out_set_sound_stream_info', - 'cpp_audio_out_set_state_changed_cb', - 'cpp_audio_out_set_stream_cb', - 'cpp_audio_out_unprepare', - 'cpp_audio_out_unset_interrupted_cb', - 'cpp_audio_out_unset_state_changed_cb', - 'cpp_audio_out_unset_stream_cb', - 'cpp_audio_out_write', - ], - 'libcapi-media-camera.so.0': [ - 'camera_add_device_state_changed_cb', - 'camera_attr_clear_af_area', - 'camera_attr_disable_shutter_sound', - 'camera_attr_enable_anti_shake', - 'camera_attr_enable_auto_contrast', - 'camera_attr_enable_tag', - 'camera_attr_enable_video_stabilization', - 'camera_attr_foreach_supported_af_mode', - 'camera_attr_foreach_supported_effect', - 'camera_attr_foreach_supported_exposure_mode', - 'camera_attr_foreach_supported_flash_mode', - 'camera_attr_foreach_supported_fps', - 'camera_attr_foreach_supported_fps_by_resolution', - 'camera_attr_foreach_supported_iso', - 'camera_attr_foreach_supported_ptz_type', - 'camera_attr_foreach_supported_scene_mode', - 'camera_attr_foreach_supported_stream_flip', - 'camera_attr_foreach_supported_stream_rotation', - 'camera_attr_foreach_supported_theater_mode', - 'camera_attr_foreach_supported_whitebalance', - 'camera_attr_get_af_mode', - 'camera_attr_get_brightness', - 'camera_attr_get_brightness_range', - 'camera_attr_get_contrast', - 'camera_attr_get_contrast_range', - 'camera_attr_get_display_roi_area', - 'camera_attr_get_effect', - 'camera_attr_get_encoded_preview_bitrate', - 'camera_attr_get_encoded_preview_gop_interval', - 'camera_attr_get_exposure', - 'camera_attr_get_exposure_mode', - 'camera_attr_get_exposure_range', - 'camera_attr_get_flash_mode', - 'camera_attr_get_geotag', - 'camera_attr_get_hdr_mode', - 'camera_attr_get_image_quality', - 'camera_attr_get_iso', - 'camera_attr_get_lens_orientation', - 'camera_attr_get_pan', - 'camera_attr_get_pan_range', - 'camera_attr_get_preview_fps', - 'camera_attr_get_scene_mode', - 'camera_attr_get_stream_flip', - 'camera_attr_get_stream_rotation', - 'camera_attr_get_tag_image_description', - 'camera_attr_get_tag_orientation', - 'camera_attr_get_tag_software', - 'camera_attr_get_theater_mode', - 'camera_attr_get_tilt', - 'camera_attr_get_tilt_range', - 'camera_attr_get_whitebalance', - 'camera_attr_get_zoom', - 'camera_attr_get_zoom_range', - 'camera_attr_is_enabled_anti_shake', - 'camera_attr_is_enabled_auto_contrast', - 'camera_attr_is_enabled_tag', - 'camera_attr_is_enabled_video_stabilization', - 'camera_attr_is_supported_anti_shake', - 'camera_attr_is_supported_auto_contrast', - 'camera_attr_is_supported_hdr_capture', - 'camera_attr_is_supported_video_stabilization', - 'camera_attr_remove_geotag', - 'camera_attr_set_af_area', - 'camera_attr_set_af_mode', - 'camera_attr_set_brightness', - 'camera_attr_set_contrast', - 'camera_attr_set_display_roi_area', - 'camera_attr_set_effect', - 'camera_attr_set_encoded_preview_bitrate', - 'camera_attr_set_encoded_preview_gop_interval', - 'camera_attr_set_exposure', - 'camera_attr_set_exposure_mode', - 'camera_attr_set_flash_mode', - 'camera_attr_set_geotag', - 'camera_attr_set_hdr_capture_progress_cb', - 'camera_attr_set_hdr_mode', - 'camera_attr_set_image_quality', - 'camera_attr_set_iso', - 'camera_attr_set_pan', - 'camera_attr_set_preview_fps', - 'camera_attr_set_ptz_type', - 'camera_attr_set_scene_mode', - 'camera_attr_set_stream_flip', - 'camera_attr_set_stream_rotation', - 'camera_attr_set_tag_image_description', - 'camera_attr_set_tag_orientation', - 'camera_attr_set_tag_software', - 'camera_attr_set_theater_mode', - 'camera_attr_set_tilt', - 'camera_attr_set_whitebalance', - 'camera_attr_set_zoom', - 'camera_attr_unset_hdr_capture_progress_cb', - 'camera_cancel_focusing', - 'camera_change_device', - 'camera_create', - 'camera_destroy', - 'camera_foreach_supported_capture_format', - 'camera_foreach_supported_capture_resolution', - 'camera_foreach_supported_preview_format', - 'camera_foreach_supported_preview_resolution', - 'camera_get_capture_format', - 'camera_get_capture_resolution', - 'camera_get_device_count', - 'camera_get_device_state', - 'camera_get_display_flip', - 'camera_get_display_mode', - 'camera_get_display_reuse_hint', - 'camera_get_display_rotation', - 'camera_get_facing_direction', - 'camera_get_flash_state', - 'camera_get_preview_format', - 'camera_get_preview_resolution', - 'camera_get_recommended_preview_resolution', - 'camera_get_state', - 'camera_is_display_visible', - 'camera_is_supported_continuous_capture', - 'camera_is_supported_face_detection', - 'camera_is_supported_media_packet_preview_cb', - 'camera_is_supported_zero_shutter_lag', - 'camera_remove_device_state_changed_cb', - 'camera_set_capture_format', - 'camera_set_capture_resolution', - 'camera_set_display', - 'camera_set_display_flip', - 'camera_set_display_mode', - 'camera_set_display_reuse_hint', - 'camera_set_display_rotation', - 'camera_set_display_visible', - 'camera_set_error_cb', - 'camera_set_focus_changed_cb', - 'camera_set_interrupted_cb', - 'camera_set_interrupt_started_cb', - 'camera_set_media_packet_preview_cb', - 'camera_set_preview_cb', - 'camera_set_preview_format', - 'camera_set_preview_resolution', - 'camera_set_state_changed_cb', - 'camera_start_capture', - 'camera_start_continuous_capture', - 'camera_start_evas_rendering', - 'camera_start_face_detection', - 'camera_start_focusing', - 'camera_start_preview', - 'camera_stop_continuous_capture', - 'camera_stop_evas_rendering', - 'camera_stop_face_detection', - 'camera_stop_preview', - 'camera_unset_error_cb', - 'camera_unset_focus_changed_cb', - 'camera_unset_interrupted_cb', - 'camera_unset_interrupt_started_cb', - 'camera_unset_media_packet_preview_cb', - 'camera_unset_preview_cb', - 'camera_unset_state_changed_cb', - ], - 'libcapi-media-codec.so.0': [ - 'codec_type_to_simple_enumeration', - 'mc_async_queue_disable', - 'mc_async_queue_enable', - 'mc_async_queue_flush', - 'mc_async_queue_free', - 'mc_async_queue_is_empty', - 'mc_async_queue_new', - 'mc_async_queue_pop', - 'mc_async_queue_pop_forced', - 'mc_async_queue_push', - 'mc_byte_align', - 'mc_configure', - 'mc_create', - 'mc_destroy', - 'mc_flush_buffers', - 'mc_get_output', - 'mc_get_packet_pool', - 'mc_get_supported_type', - 'mc_gst_core_free', - 'mc_gst_core_new', - 'mc_gst_flush_buffers', - 'mc_gst_get_output', - 'mc_gst_get_packet_pool', - 'mc_gst_port_free', - 'mc_gst_port_new', - 'mc_gst_prepare', - 'mc_gst_process_input', - 'mc_gst_unprepare', - 'mc_hex_dump', - 'mc_ini_load', - 'mc_init_bits', - 'mc_prepare', - 'mc_process_input', - 'mc_read_bits', - 'mc_sem_down', - 'mc_sem_free', - 'mc_sem_new', - 'mc_sem_up', - 'mc_set_adec_info', - 'mc_set_aenc_info', - 'mc_set_buffer_status_cb', - 'mc_set_codec', - 'mc_set_empty_buffer_cb', - 'mc_set_eos_cb', - 'mc_set_error_cb', - 'mc_set_fill_buffer_cb', - 'mc_set_supported_codec_cb', - 'mc_set_vdec_info', - 'mc_set_venc_info', - 'mc_show_bits', - 'mc_unprepare', - 'mc_unset_buffer_status_cb', - 'mc_unset_empty_buffer_cb', - 'mc_unset_eos_cb', - 'mc_unset_error_cb', - 'mc_unset_fill_buffer_cb', - 'mediacodec_configure_from_media_format', - 'mediacodec_create', - 'mediacodec_destroy', - 'mediacodec_flush_buffers', - 'mediacodec_foreach_supported_codec', - 'mediacodec_foreach_supported_codec_static', - 'mediacodec_get_output', - 'mediacodec_get_packet_pool', - 'mediacodec_get_supported_type', - 'mediacodec_prepare', - 'mediacodec_process_input', - 'mediacodec_set_adec_info', - 'mediacodec_set_aenc_info', - 'mediacodec_set_buffer_status_cb', - 'mediacodec_set_codec', - 'mediacodec_set_eos_cb', - 'mediacodec_set_error_cb', - 'mediacodec_set_input_buffer_used_cb', - 'mediacodec_set_output_buffer_available_cb', - 'mediacodec_set_vdec_info', - 'mediacodec_set_venc_info', - 'mediacodec_unprepare', - 'mediacodec_unset_buffer_status_cb', - 'mediacodec_unset_eos_cb', - 'mediacodec_unset_error_cb', - 'mediacodec_unset_input_buffer_used_cb', - 'mediacodec_unset_output_buffer_available_cb', - 'simple_to_codec_type_enumeration', - ], - 'libcapi-media-controller.so.0': [ - 'mc_client_create', - 'mc_client_destroy', - 'mc_client_destroy_metadata', - 'mc_client_destroy_playback', - 'mc_client_foreach_server', - 'mc_client_foreach_server_subscribed', - 'mc_client_get_latest_server_info', - 'mc_client_get_metadata', - 'mc_client_get_playback_position', - 'mc_client_get_playback_state', - 'mc_client_get_server_metadata', - 'mc_client_get_server_playback_info', - 'mc_client_get_server_repeat_mode', - 'mc_client_get_server_shuffle_mode', - 'mc_client_send_custom_command', - 'mc_client_send_playback_state_command', - 'mc_client_set_metadata_update_cb', - 'mc_client_set_playback_update_cb', - 'mc_client_set_repeat_mode_update_cb', - 'mc_client_set_server_update_cb', - 'mc_client_set_shuffle_mode_update_cb', - 'mc_client_subscribe', - 'mc_client_unset_metadata_update_cb', - 'mc_client_unset_playback_update_cb', - 'mc_client_unset_repeat_mode_update_cb', - 'mc_client_unset_server_update_cb', - 'mc_client_unset_shuffle_mode_update_cb', - 'mc_client_unsubscribe', - 'mc_db_check_server_table_exist', - 'mc_db_connect', - 'mc_db_create_server_table', - 'mc_db_delete_server_address_from_table', - 'mc_db_delete_server_table', - 'mc_db_disconnect', - 'mc_db_foreach_server_list', - 'mc_db_get_latest_server_name', - 'mc_db_get_metadata_info', - 'mc_db_get_playback_info', - 'mc_db_get_repeat_mode', - 'mc_db_get_server_state', - 'mc_db_get_shuffle_mode', - 'mc_db_insert_server_address_into_table', - 'mc_db_update_latest_server_table', - 'mc_db_update_playback_info', - 'mc_db_update_repeat_mode', - 'mc_db_update_server_state', - 'mc_db_update_shuffle_mode', - 'mc_db_update_whole_metadata', - 'mc_ipc_get_dbus_connection', - 'mc_ipc_register_listener', - 'mc_ipc_send_message', - 'mc_ipc_send_message_to_server', - 'mc_ipc_service_connect', - 'mc_ipc_unref_dbus_connection', - 'mc_ipc_unregister_all_listener', - 'mc_ipc_unregister_listener', - 'mc_server_create', - 'mc_server_destroy', - 'mc_server_send_command_reply', - 'mc_server_set_custom_command_received_cb', - 'mc_server_set_metadata', - 'mc_server_set_playback_position', - 'mc_server_set_playback_state', - 'mc_server_set_playback_state_command_received_cb', - 'mc_server_unset_custom_command_received_cb', - 'mc_server_unset_playback_state_command_received_cb', - 'mc_server_update_metadata', - 'mc_server_update_playback_info', - 'mc_server_update_repeat_mode', - 'mc_server_update_shuffle_mode', - 'mc_util_get_command_availabe', - 'mc_util_get_interface_name', - 'mc_util_get_own_name', - 'mc_util_make_filter_interface_name', - 'mc_util_set_command_availabe', - ], - 'libcapi-mediademuxer.so.0': [ - 'custom_mediademxer_port_register', - 'ffmpeg_mediademxer_port_register', - 'gst_mediademxer_port_register', - 'md_create', - 'md_destroy', - 'md_get_track_count', - 'md_get_track_info', - 'md_ini_load', - 'md_prepare', - 'md_read_sample', - 'md_seek', - 'md_select_track', - 'md_set_data_source', - 'md_set_eos_cb', - 'md_set_error_cb', - 'md_start', - 'md_stop', - 'md_unprepare', - 'md_unselect_track', - 'mediademuxer_create', - 'mediademuxer_destroy', - 'mediademuxer_get_state', - 'mediademuxer_get_track_count', - 'mediademuxer_get_track_info', - 'mediademuxer_prepare', - 'mediademuxer_read_sample', - 'mediademuxer_seek', - 'mediademuxer_select_track', - 'mediademuxer_set_data_source', - 'mediademuxer_set_eos_cb', - 'mediademuxer_set_error_cb', - 'mediademuxer_start', - 'mediademuxer_stop', - 'mediademuxer_unprepare', - 'mediademuxer_unselect_track', - 'mediademuxer_unset_eos_cb', - 'mediademuxer_unset_error_cb', - ], - 'libcapi-mediamuxer.so.0': [ - 'custom_mediamuxer_port_register', - 'ffmpeg_mediamuxer_port_register', - 'gst_mediamuxer_port_register', - 'mediamuxer_add_track', - 'mediamuxer_close_track', - 'mediamuxer_create', - 'mediamuxer_destroy', - 'mediamuxer_get_state', - 'mediamuxer_pause', - 'mediamuxer_prepare', - 'mediamuxer_resume', - 'mediamuxer_set_data_sink', - 'mediamuxer_set_eos_cb', - 'mediamuxer_set_error_cb', - 'mediamuxer_start', - 'mediamuxer_stop', - 'mediamuxer_unprepare', - 'mediamuxer_unset_eos_cb', - 'mediamuxer_unset_error_cb', - 'mediamuxer_write_sample', - 'mx_add_track', - 'mx_close_track', - 'mx_create', - 'mx_destroy', - 'mx_ini_load', - 'mx_pause', - 'mx_prepare', - 'mx_resume', - 'mx_set_data_sink', - 'mx_set_eos_cb', - 'mx_set_error_cb', - 'mx_start', - 'mx_stop', - 'mx_unprepare', - 'mx_write_sample', - ], - 'libcapi-media-streamer.so.0': [ - 'media_streamer_create', - 'media_streamer_destroy', - 'media_streamer_get_duration', - 'media_streamer_get_play_position', - 'media_streamer_get_state', - 'media_streamer_node_add', - 'media_streamer_node_create', - 'media_streamer_node_create_sink', - 'media_streamer_node_create_src', - 'media_streamer_node_destroy', - 'media_streamer_node_get_pad_format', - 'media_streamer_node_get_pad_name', - 'media_streamer_node_get_param', - 'media_streamer_node_get_params', - 'media_streamer_node_link', - 'media_streamer_node_pull_packet', - 'media_streamer_node_push_packet', - 'media_streamer_node_remove', - 'media_streamer_node_set_pad_format', - 'media_streamer_node_set_param', - 'media_streamer_node_set_params', - 'media_streamer_pause', - 'media_streamer_play', - 'media_streamer_prepare', - 'media_streamer_set_error_cb', - 'media_streamer_set_interrupted_cb', - 'media_streamer_set_play_position', - 'media_streamer_set_state_change_cb', - 'media_streamer_sink_set_data_ready_cb', - 'media_streamer_sink_set_eos_cb', - 'media_streamer_sink_unset_data_ready_cb', - 'media_streamer_sink_unset_eos_cb', - 'media_streamer_src_set_buffer_status_cb', - 'media_streamer_src_unset_buffer_status_cb', - 'media_streamer_stop', - 'media_streamer_unprepare', - 'media_streamer_unset_error_cb', - 'media_streamer_unset_interrupted_cb', - 'media_streamer_unset_state_change_cb', - ], - 'libcapi-media-tool.so.0': [ - 'media_format_create', - 'media_format_get_audio_aac_header_type', - 'media_format_get_audio_aac_type', - 'media_format_get_audio_info', - 'media_format_get_container_mime', - 'media_format_get_extra', - 'media_format_get_text_info', - 'media_format_get_type', - 'media_format_get_video_frame_rate', - 'media_format_get_video_info', - 'media_format_is_writable', - 'media_format_make_writable', - 'media_format_ref', - 'media_format_set_audio_aac_header_type', - 'media_format_set_audio_aac_type', - 'media_format_set_audio_avg_bps', - 'media_format_set_audio_bit', - 'media_format_set_audio_channel', - 'media_format_set_audio_mime', - 'media_format_set_audio_samplerate', - 'media_format_set_container_mime', - 'media_format_set_extra', - 'media_format_set_text_mime', - 'media_format_set_text_type', - 'media_format_set_video_avg_bps', - 'media_format_set_video_frame_rate', - 'media_format_set_video_height', - 'media_format_set_video_max_bps', - 'media_format_set_video_mime', - 'media_format_set_video_width', - 'media_format_unref', - 'media_packet_alloc', - 'media_packet_copy', - 'media_packet_create', - 'media_packet_create_alloc', - 'media_packet_create_from_external_memory', - 'media_packet_create_from_tbm_surface', - 'media_packet_destroy', - 'media_packet_get_allocated_buffer_size', - 'media_packet_get_buffer_data_ptr', - 'media_packet_get_buffer_size', - 'media_packet_get_codec_data', - 'media_packet_get_dts', - 'media_packet_get_duration', - 'media_packet_get_extra', - 'media_packet_get_flags', - 'media_packet_get_format', - 'media_packet_get_number_of_video_planes', - 'media_packet_get_pts', - 'media_packet_get_tbm_surface', - 'media_packet_get_video_plane_data_ptr', - 'media_packet_get_video_stride_height', - 'media_packet_get_video_stride_width', - 'media_packet_has_tbm_surface_buffer', - 'media_packet_is_audio', - 'media_packet_is_codec_config', - 'media_packet_is_encoded', - 'media_packet_is_end_of_stream', - 'media_packet_is_raw', - 'media_packet_is_sync_frame', - 'media_packet_is_text', - 'media_packet_is_video', - 'media_packet_pool_acquire_packet', - 'media_packet_pool_allocate', - 'media_packet_pool_create', - 'media_packet_pool_deallocate', - 'media_packet_pool_destroy', - 'media_packet_pool_get_size', - 'media_packet_pool_release_packet', - 'media_packet_pool_set_media_format', - 'media_packet_pool_set_size', - 'media_packet_reset_flags', - 'media_packet_set_buffer_size', - 'media_packet_set_codec_data', - 'media_packet_set_dts', - 'media_packet_set_duration', - 'media_packet_set_extra', - 'media_packet_set_flags', - 'media_packet_set_format', - 'media_packet_set_pts', - 'media_packet_unset_flags', - ], - 'libcapi-media-vision.so.0': [ - 'mv_barcode_detect', - 'mv_barcode_generate_image', - 'mv_barcode_generate_source', - 'mv_create_engine_config', - 'mv_create_source', - 'mv_destroy_engine_config', - 'mv_destroy_source', - 'mv_engine_config_foreach_supported_attribute', - 'mv_engine_config_get_bool_attribute', - 'mv_engine_config_get_double_attribute', - 'mv_engine_config_get_int_attribute', - 'mv_engine_config_get_string_attribute', - 'mv_engine_config_set_bool_attribute', - 'mv_engine_config_set_double_attribute', - 'mv_engine_config_set_int_attribute', - 'mv_engine_config_set_string_attribute', - 'mv_face_detect', - 'mv_face_eye_condition_recognize', - 'mv_face_facial_expression_recognize', - 'mv_face_recognition_model_add', - 'mv_face_recognition_model_clone', - 'mv_face_recognition_model_create', - 'mv_face_recognition_model_destroy', - 'mv_face_recognition_model_learn', - 'mv_face_recognition_model_load', - 'mv_face_recognition_model_query_labels', - 'mv_face_recognition_model_reset', - 'mv_face_recognition_model_save', - 'mv_face_recognize', - 'mv_face_track', - 'mv_face_tracking_model_clone', - 'mv_face_tracking_model_create', - 'mv_face_tracking_model_destroy', - 'mv_face_tracking_model_load', - 'mv_face_tracking_model_prepare', - 'mv_face_tracking_model_save', - 'mv_image_object_clone', - 'mv_image_object_create', - 'mv_image_object_destroy', - 'mv_image_object_fill', - 'mv_image_object_get_label', - 'mv_image_object_get_recognition_rate', - 'mv_image_object_load', - 'mv_image_object_save', - 'mv_image_object_set_label', - 'mv_image_recognize', - 'mv_image_track', - 'mv_image_tracking_model_clone', - 'mv_image_tracking_model_create', - 'mv_image_tracking_model_destroy', - 'mv_image_tracking_model_load', - 'mv_image_tracking_model_refresh', - 'mv_image_tracking_model_save', - 'mv_image_tracking_model_set_target', - 'mv_source_clear', - 'mv_source_fill_by_buffer', - 'mv_source_fill_by_media_packet', - 'mv_source_get_buffer', - 'mv_source_get_colorspace', - 'mv_source_get_height', - 'mv_source_get_width', - 'mv_surveillance_event_trigger_create', - 'mv_surveillance_event_trigger_destroy', - 'mv_surveillance_foreach_event_result_name', - 'mv_surveillance_foreach_supported_event_type', - 'mv_surveillance_get_event_trigger_roi', - 'mv_surveillance_get_event_trigger_type', - 'mv_surveillance_get_result_value', - 'mv_surveillance_push_source', - 'mv_surveillance_set_event_trigger_roi', - 'mv_surveillance_subscribe_event_trigger', - 'mv_surveillance_unsubscribe_event_trigger', - ], - 'libcapi-media-metadata-editor.so': [ - 'metadata_editor_append_picture', - 'metadata_editor_create', - 'metadata_editor_destroy', - 'metadata_editor_get_metadata', - 'metadata_editor_get_picture', - 'metadata_editor_remove_picture', - 'metadata_editor_set_metadata', - 'metadata_editor_set_path', - 'metadata_editor_update_metadata', - ], - 'libcapi-media-metadata-extractor.so': [ - 'metadata_extractor_create', - 'metadata_extractor_destroy', - 'metadata_extractor_get_artwork', - 'metadata_extractor_get_frame', - 'metadata_extractor_get_frame_at_time', - 'metadata_extractor_get_metadata', - 'metadata_extractor_get_synclyrics', - 'metadata_extractor_set_buffer', - 'metadata_extractor_set_path', - ], - 'libcapi-media-player.so.0': [ - 'client_get_api_timeout', - 'client_wait_for_cb_return', - 'client_wait_for_server_ack', - 'player_360_get_direction_of_view', - 'player_360_get_field_of_view', - 'player_360_get_zoom', - 'player_360_is_enabled', - 'player_360_set_direction_of_view', - 'player_360_set_enable', - 'player_360_set_field_of_view', - 'player_360_set_zoom', - 'player_audio_effect_equalizer_clear', - 'player_audio_effect_equalizer_is_available', - 'player_audio_effect_get_equalizer_band_frequency', - 'player_audio_effect_get_equalizer_band_frequency_range', - 'player_audio_effect_get_equalizer_band_level', - 'player_audio_effect_get_equalizer_bands_count', - 'player_audio_effect_get_equalizer_level_range', - 'player_audio_effect_set_equalizer_all_bands', - 'player_audio_effect_set_equalizer_band_level', - 'player_capture_video', - 'player_create', - 'player_destroy', - 'player_enable_media_packet_video_frame_decoded_cb', - 'player_enable_tsurf_pool', - 'player_foreach_adaptive_variant', - 'player_get_album_art', - 'player_get_audio_latency_mode', - 'player_get_audio_stream_info', - 'player_get_codec_info', - 'player_get_content_info', - 'player_get_current_track', - 'player_get_display_mode', - 'player_get_display_rotation', - 'player_get_duration', - 'player_get_max_adaptive_variant_limit', - 'player_get_media_packet_video_frame_pool_size', - 'player_get_media_stream_buffer_max_size', - 'player_get_media_stream_buffer_min_threshold', - 'player_get_next_uri', - 'player_get_play_position', - 'player_get_progressive_download_status', - 'player_get_state', - 'player_get_streaming_buffering_time', - 'player_get_streaming_download_progress', - 'player_get_track_count', - 'player_get_track_language_code', - 'player_get_video_codec_type', - 'player_get_video_size', - 'player_get_video_stream_info', - 'player_get_volume', - 'player_is_audio_only', - 'player_is_display_visible', - 'player_is_enabled_tsurf_pool', - 'player_is_gapless', - 'player_is_looping', - 'player_is_muted', - 'player_pause', - 'player_prepare', - 'player_prepare_async', - 'player_push_media_stream', - 'player_select_track', - 'player_set_audio_latency_mode', - 'player_set_audio_only', - 'player_set_buffering_cb', - 'player_set_completed_cb', - 'player_set_display', - 'player_set_display_mode', - 'player_set_display_roi_area', - 'player_set_display_rotation', - 'player_set_display_visible', - 'player_set_ecore_wl_display', - 'player_set_error_cb', - 'player_set_gapless', - 'player_set_interrupted_cb', - 'player_set_looping', - 'player_set_max_adaptive_variant_limit', - 'player_set_media_packet_video_frame_decoded_cb', - 'player_set_media_stream_buffer_max_size', - 'player_set_media_stream_buffer_min_threshold', - 'player_set_media_stream_buffer_status_cb', - 'player_set_media_stream_buffer_status_cb_ex', - 'player_set_media_stream_dynamic_resolution', - 'player_set_media_stream_info', - 'player_set_media_stream_seek_cb', - 'player_set_memory_buffer', - 'player_set_mute', - 'player_set_next_uri', - 'player_set_pcm_extraction_mode', - 'player_set_pcm_spec', - 'player_set_playback_rate', - 'player_set_play_position', - 'player_set_progressive_download_message_cb', - 'player_set_progressive_download_path', - 'player_set_sound_stream_info', - 'player_set_sound_type', - 'player_set_streaming_buffering_time', - 'player_set_streaming_cookie', - 'player_set_streaming_playback_rate', - 'player_set_streaming_user_agent', - 'player_set_subtitle_path', - 'player_set_subtitle_position_offset', - 'player_set_subtitle_updated_cb', - 'player_set_uri', - 'player_set_video_codec_type', - 'player_set_video_stream_changed_cb', - 'player_set_volume', - 'player_start', - 'player_stop', - 'player_unprepare', - 'player_unset_buffering_cb', - 'player_unset_completed_cb', - 'player_unset_error_cb', - 'player_unset_interrupted_cb', - 'player_unset_media_packet_video_frame_decoded_cb', - 'player_unset_media_stream_buffer_status_cb', - 'player_unset_media_stream_buffer_status_cb_ex', - 'player_unset_media_stream_seek_cb', - 'player_unset_progressive_download_message_cb', - 'player_unset_subtitle_updated_cb', - 'player_unset_video_stream_changed_cb', - ], - 'libcapi-media-recorder.so.0': [ - 'recorder_add_device_state_changed_cb', - 'recorder_attr_get_audio_channel', - 'recorder_attr_get_audio_device', - 'recorder_attr_get_audio_encoder_bitrate', - 'recorder_attr_get_audio_samplerate', - 'recorder_attr_get_orientation_tag', - 'recorder_attr_get_recording_motion_rate', - 'recorder_attr_get_size_limit', - 'recorder_attr_get_time_limit', - 'recorder_attr_get_video_encoder_bitrate', - 'recorder_attr_is_muted', - 'recorder_attr_set_audio_channel', - 'recorder_attr_set_audio_device', - 'recorder_attr_set_audio_encoder_bitrate', - 'recorder_attr_set_audio_samplerate', - 'recorder_attr_set_mute', - 'recorder_attr_set_orientation_tag', - 'recorder_attr_set_recording_motion_rate', - 'recorder_attr_set_size_limit', - 'recorder_attr_set_time_limit', - 'recorder_attr_set_video_encoder_bitrate', - 'recorder_cancel', - 'recorder_commit', - 'recorder_create_audiorecorder', - 'recorder_create_videorecorder', - 'recorder_destroy', - 'recorder_foreach_supported_audio_encoder', - 'recorder_foreach_supported_file_format', - 'recorder_foreach_supported_video_encoder', - 'recorder_foreach_supported_video_resolution', - 'recorder_get_audio_encoder', - 'recorder_get_audio_level', - 'recorder_get_device_state', - 'recorder_get_file_format', - 'recorder_get_filename', - 'recorder_get_state', - 'recorder_get_video_encoder', - 'recorder_get_video_resolution', - 'recorder_pause', - 'recorder_prepare', - 'recorder_remove_device_state_changed_cb', - 'recorder_set_audio_encoder', - 'recorder_set_audio_stream_cb', - 'recorder_set_error_cb', - 'recorder_set_file_format', - 'recorder_set_filename', - 'recorder_set_interrupted_cb', - 'recorder_set_interrupt_started_cb', - 'recorder_set_muxed_stream_cb', - 'recorder_set_recording_limit_reached_cb', - 'recorder_set_recording_status_cb', - 'recorder_set_sound_stream_info', - 'recorder_set_state_changed_cb', - 'recorder_set_video_encoder', - 'recorder_set_video_resolution', - 'recorder_start', - 'recorder_unprepare', - 'recorder_unset_audio_stream_cb', - 'recorder_unset_error_cb', - 'recorder_unset_interrupted_cb', - 'recorder_unset_interrupt_started_cb', - 'recorder_unset_muxed_stream_cb', - 'recorder_unset_recording_limit_reached_cb', - 'recorder_unset_recording_status_cb', - 'recorder_unset_state_changed_cb', - ], - 'libcapi-media-sound-manager.so.0': [ - 'sound_manager_acquire_focus', - 'sound_manager_acquire_focus_all', - 'sound_manager_add_device_connection_changed_cb', - 'sound_manager_add_device_for_stream_routing', - 'sound_manager_add_device_id_for_stream_routing', - 'sound_manager_add_device_state_changed_cb', - 'sound_manager_add_focus_state_watch_cb', - 'sound_manager_add_volume_changed_cb', - 'sound_manager_apply_stream_routing', - 'sound_manager_create_stream_information', - 'sound_manager_create_stream_information_internal', - 'sound_manager_create_virtual_stream', - 'sound_manager_deliver_focus', - 'sound_manager_destroy_stream_information', - 'sound_manager_destroy_virtual_stream', - 'sound_manager_disable_session_backward_compatibility', - 'sound_manager_free_device_list', - 'sound_manager_get_current_device_list', - 'sound_manager_get_current_media_playback_device_type', - 'sound_manager_get_current_playback_focus', - 'sound_manager_get_current_recording_focus', - 'sound_manager_get_current_sound_type', - 'sound_manager_get_device_id', - 'sound_manager_get_device_io_direction', - 'sound_manager_get_device_list', - 'sound_manager_get_device_name', - 'sound_manager_get_device_product_id', - 'sound_manager_get_device_state', - 'sound_manager_get_device_state_by_id', - 'sound_manager_get_device_type', - 'sound_manager_get_device_vendor_id', - 'sound_manager_get_focus_reacquisition', - 'sound_manager_get_focus_state', - 'sound_manager_get_index_from_stream_information', - 'sound_manager_get_internal_voip_stream_information', - 'sound_manager_get_master_volume', - 'sound_manager_get_max_master_volume', - 'sound_manager_get_max_volume', - 'sound_manager_get_media_session_option', - 'sound_manager_get_media_session_resumption_option', - 'sound_manager_get_next_device', - 'sound_manager_get_prev_device', - 'sound_manager_get_session_type', - 'sound_manager_get_sound_type', - 'sound_manager_get_type_from_stream_information', - 'sound_manager_get_voip_session_mode', - 'sound_manager_get_volume', - 'sound_manager_is_available_stream_information', - 'sound_manager_is_stream_on_device', - 'sound_manager_release_focus', - 'sound_manager_release_focus_all', - 'sound_manager_remove_all_devices_for_stream_routing', - 'sound_manager_remove_device_connection_changed_cb', - 'sound_manager_remove_device_for_stream_routing', - 'sound_manager_remove_device_id_for_stream_routing', - 'sound_manager_remove_device_state_changed_cb', - 'sound_manager_remove_focus_state_watch_cb', - 'sound_manager_remove_volume_changed_cb', - 'sound_manager_set_current_sound_type', - 'sound_manager_set_device_connected_cb', - 'sound_manager_set_device_information_changed_cb', - 'sound_manager_set_filter', - 'sound_manager_set_filter_preset', - 'sound_manager_set_focus_reacquisition', - 'sound_manager_set_master_volume', - 'sound_manager_set_media_session_option', - 'sound_manager_set_media_session_resumption_option', - 'sound_manager_set_session_interrupted_cb', - 'sound_manager_set_session_type', - 'sound_manager_set_stream_routing_option', - 'sound_manager_set_voip_session_mode', - 'sound_manager_set_volume', - 'sound_manager_set_volume_changed_cb', - 'sound_manager_start_virtual_stream', - 'sound_manager_stop_virtual_stream', - 'sound_manager_unset_current_sound_type', - 'sound_manager_unset_device_connected_cb', - 'sound_manager_unset_device_information_changed_cb', - 'sound_manager_unset_filter', - 'sound_manager_unset_session_interrupted_cb', - 'sound_manager_unset_volume_changed_cb', - ], - 'libcapi-media-sound-pool.so.0': [ - 'sound_pool_activate', - 'sound_pool_create', - 'sound_pool_deactivate', - 'sound_pool_destroy', - 'sound_pool_get_state', - 'sound_pool_get_volume', - 'sound_pool_load_source_from_file', - 'sound_pool_set_state_changed_cb', - 'sound_pool_set_volume', - 'sound_pool_stream_get_priority', - 'sound_pool_stream_get_state', - 'sound_pool_stream_get_volume', - 'sound_pool_stream_pause', - 'sound_pool_stream_play', - 'sound_pool_stream_resume', - 'sound_pool_stream_set_priority', - 'sound_pool_stream_set_volume', - 'sound_pool_stream_stop', - 'sound_pool_unload_source', - 'sound_pool_unset_state_changed_cb', - ], - 'libcapi-media-streamrecorder.so.0': [ - 'streamrecorder_cancel', - 'streamrecorder_commit', - 'streamrecorder_create', - 'streamrecorder_destroy', - 'streamrecorder_enable_source_buffer', - 'streamrecorder_foreach_supported_audio_encoder', - 'streamrecorder_foreach_supported_file_format', - 'streamrecorder_foreach_supported_video_encoder', - 'streamrecorder_foreach_supported_video_resolution', - 'streamrecorder_get_audio_channel', - 'streamrecorder_get_audio_encoder', - 'streamrecorder_get_audio_encoder_bitrate', - 'streamrecorder_get_audio_samplerate', - 'streamrecorder_get_file_format', - 'streamrecorder_get_filename', - 'streamrecorder_get_recording_limit', - 'streamrecorder_get_state', - 'streamrecorder_get_video_encoder', - 'streamrecorder_get_video_encoder_bitrate', - 'streamrecorder_get_video_framerate', - 'streamrecorder_get_video_resolution', - 'streamrecorder_get_video_source_format', - 'streamrecorder_pause', - 'streamrecorder_prepare', - 'streamrecorder_push_stream_buffer', - 'streamrecorder_set_audio_channel', - 'streamrecorder_set_audio_encoder', - 'streamrecorder_set_audio_encoder_bitrate', - 'streamrecorder_set_audio_samplerate', - 'streamrecorder_set_buffer_consume_completed_cb', - 'streamrecorder_set_error_cb', - 'streamrecorder_set_file_format', - 'streamrecorder_set_filename', - 'streamrecorder_set_notify_cb', - 'streamrecorder_set_recording_limit', - 'streamrecorder_set_recording_limit_reached_cb', - 'streamrecorder_set_recording_status_cb', - 'streamrecorder_set_video_encoder', - 'streamrecorder_set_video_encoder_bitrate', - 'streamrecorder_set_video_framerate', - 'streamrecorder_set_video_resolution', - 'streamrecorder_set_video_source_format', - 'streamrecorder_start', - 'streamrecorder_unprepare', - 'streamrecorder_unset_buffer_consume_completed_cb', - 'streamrecorder_unset_error_cb', - 'streamrecorder_unset_notify_cb', - 'streamrecorder_unset_recording_limit_reached_cb', - 'streamrecorder_unset_recording_status_cb', - ], - 'libcapi-media-thumbnail-util.so': [ - 'thumbnail_util_cancel', - 'thumbnail_util_cancel_all', - 'thumbnail_util_create', - 'thumbnail_util_destroy', - 'thumbnail_util_extract', - 'thumbnail_util_set_path', - 'thumbnail_util_set_size', - ], - 'libcapi-media-tone-player.so.0': [ - 'tone_player_start', - 'tone_player_start_new', - 'tone_player_stop', - ], - 'libcapi-media-video-util.so.0': [ - 'video_util_cancel_transcoding', - 'video_util_create', - 'video_util_destroy', - 'video_util_foreach_supported_audio_codec', - 'video_util_foreach_supported_file_format', - 'video_util_foreach_supported_video_codec', - 'video_util_get_progress_transcoding', - 'video_util_set_accurate_mode', - 'video_util_set_audio_codec', - 'video_util_set_file_format', - 'video_util_set_file_path', - 'video_util_set_fps', - 'video_util_set_resolution', - 'video_util_set_video_codec', - 'video_util_start_transcoding', - ], - 'libcapi-media-wav-player.so.0': [ - 'wav_player_start', - 'wav_player_start_loop', - 'wav_player_start_new', - 'wav_player_stop', - ], - 'libcapi-network-bluetooth.so.0': [ - 'bt_a2dp_set_content_protection', - 'bt_adapter_disable', - 'bt_adapter_enable', - 'bt_adapter_force_hcidump', - 'bt_adapter_foreach_bonded_device', - 'bt_adapter_foreach_profile_connected_devices', - 'bt_adapter_free_device_info', - 'bt_adapter_free_manufacturer_data', - 'bt_adapter_get_address', - 'bt_adapter_get_bonded_device_info', - 'bt_adapter_get_bonded_device_is_alias_set', - 'bt_adapter_get_connectable', - 'bt_adapter_get_local_info', - 'bt_adapter_get_local_oob_data', - 'bt_adapter_get_local_oob_ext_data', - 'bt_adapter_get_name', - 'bt_adapter_get_state', - 'bt_adapter_get_version', - 'bt_adapter_get_visibility', - 'bt_adapter_is_discovering', - 'bt_adapter_is_service_used', - 'bt_adapter_le_add_advertising_data', - 'bt_adapter_le_add_advertising_manufacturer_data', - 'bt_adapter_le_add_advertising_service_data', - 'bt_adapter_le_add_advertising_service_solicitation_uuid', - 'bt_adapter_le_add_advertising_service_uuid', - 'bt_adapter_le_add_white_list', - 'bt_adapter_le_clear_advertising_data', - 'bt_adapter_le_clear_white_list', - 'bt_adapter_le_create_advertiser', - 'bt_adapter_le_destroy_advertiser', - 'bt_adapter_le_disable', - 'bt_adapter_le_enable', - 'bt_adapter_le_enable_privacy', - 'bt_adapter_le_free_ibeacon_report', - 'bt_adapter_le_free_service_data_list', - 'bt_adapter_le_get_scan_result_appearance', - 'bt_adapter_le_get_scan_result_device_name', - 'bt_adapter_le_get_scan_result_ibeacon_report', - 'bt_adapter_le_get_scan_result_manufacturer_data', - 'bt_adapter_le_get_scan_result_service_data_list', - 'bt_adapter_le_get_scan_result_service_solicitation_uuids', - 'bt_adapter_le_get_scan_result_service_uuids', - 'bt_adapter_le_get_scan_result_tx_power_level', - 'bt_adapter_le_get_state', - 'bt_adapter_le_is_discovering', - 'bt_adapter_le_read_maximum_data_length', - 'bt_adapter_le_read_suggested_default_data_length', - 'bt_adapter_le_remove_advertising_data', - 'bt_adapter_le_remove_white_list', - 'bt_adapter_le_scan_filter_create', - 'bt_adapter_le_scan_filter_destroy', - 'bt_adapter_le_scan_filter_register', - 'bt_adapter_le_scan_filter_set_device_address', - 'bt_adapter_le_scan_filter_set_device_name', - 'bt_adapter_le_scan_filter_set_ibeacon', - 'bt_adapter_le_scan_filter_set_manufacturer_data', - 'bt_adapter_le_scan_filter_set_manufacturer_data_with_mask', - 'bt_adapter_le_scan_filter_set_proximity_uuid', - 'bt_adapter_le_scan_filter_set_service_data', - 'bt_adapter_le_scan_filter_set_service_data_with_mask', - 'bt_adapter_le_scan_filter_set_service_solicitation_uuid', - 'bt_adapter_le_scan_filter_set_service_solicitation_uuid_with_mask', - 'bt_adapter_le_scan_filter_set_service_uuid', - 'bt_adapter_le_scan_filter_set_service_uuid_with_mask', - 'bt_adapter_le_scan_filter_set_type', - 'bt_adapter_le_scan_filter_unregister', - 'bt_adapter_le_scan_filter_unregister_all', - 'bt_adapter_le_scan_filter_unset_proximity_uuid', - 'bt_adapter_le_set_advertising_appearance', - 'bt_adapter_le_set_advertising_connectable', - 'bt_adapter_le_set_advertising_device_name', - 'bt_adapter_le_set_advertising_filter_policy', - 'bt_adapter_le_set_advertising_mode', - 'bt_adapter_le_set_advertising_tx_power_level', - 'bt_adapter_le_set_customized_scan_mode', - 'bt_adapter_le_set_device_discovery_state_changed_cb', - 'bt_adapter_le_set_remote_oob_ext_data', - 'bt_adapter_le_set_scan_mode', - 'bt_adapter_le_set_state_changed_cb', - 'bt_adapter_le_set_static_random_address', - 'bt_adapter_le_start_advertising', - 'bt_adapter_le_start_advertising_new', - 'bt_adapter_le_start_device_discovery', - 'bt_adapter_le_start_scan', - 'bt_adapter_le_stop_advertising', - 'bt_adapter_le_stop_device_discovery', - 'bt_adapter_le_stop_scan', - 'bt_adapter_le_unset_device_discovery_state_changed_cb', - 'bt_adapter_le_unset_state_changed_cb', - 'bt_adapter_le_write_host_suggested_default_data_length', - 'bt_adapter_parse_manufacturer_data', - 'bt_adapter_passkey_confirmation_reply', - 'bt_adapter_passkey_reply', - 'bt_adapter_recover', - 'bt_adapter_remove_remote_oob_data', - 'bt_adapter_reset', - 'bt_adapter_set_authentication_req_cb', - 'bt_adapter_set_connectable', - 'bt_adapter_set_connectable_changed_cb', - 'bt_adapter_set_device_discovery_state_changed_cb', - 'bt_adapter_set_manufacturer_data', - 'bt_adapter_set_manufacturer_data_changed_cb', - 'bt_adapter_set_name', - 'bt_adapter_set_name_changed_cb', - 'bt_adapter_set_passkey_notification', - 'bt_adapter_set_remote_oob_data', - 'bt_adapter_set_remote_oob_ext_data', - 'bt_adapter_set_state_changed_cb', - 'bt_adapter_set_visibility', - 'bt_adapter_set_visibility_duration_changed_cb', - 'bt_adapter_set_visibility_mode_changed_cb', - 'bt_adapter_start_device_discovery', - 'bt_adapter_stop_device_discovery', - 'bt_adapter_unset_authentication_req_cb', - 'bt_adapter_unset_connectable_changed_cb', - 'bt_adapter_unset_device_discovery_state_changed_cb', - 'bt_adapter_unset_manufacturer_data_changed_cb', - 'bt_adapter_unset_name_changed_cb', - 'bt_adapter_unset_passkey_notification', - 'bt_adapter_unset_state_changed_cb', - 'bt_adapter_unset_visibility_duration_changed_cb', - 'bt_adapter_unset_visibility_mode_changed_cb', - 'bt_ag_close_sco', - 'bt_ag_get_speaker_gain', - 'bt_ag_is_connected', - 'bt_ag_is_nrec_enabled', - 'bt_ag_is_sco_opened', - 'bt_ag_is_wbs_mode', - 'bt_ag_notify_call_event', - 'bt_ag_notify_call_list', - 'bt_ag_notify_speaker_gain', - 'bt_ag_notify_vendor_cmd', - 'bt_ag_notify_voice_recognition_state', - 'bt_ag_open_sco', - 'bt_ag_set_call_handling_event_cb', - 'bt_ag_set_dtmf_transmitted_cb', - 'bt_ag_set_microphone_gain_changed_cb', - 'bt_ag_set_multi_call_handling_event_cb', - 'bt_ag_set_sco_state_changed_cb', - 'bt_ag_set_speaker_gain_changed_cb', - 'bt_ag_set_vendor_cmd_cb', - 'bt_ag_switch_headset', - 'bt_ag_unset_call_handling_event_cb', - 'bt_ag_unset_dtmf_transmitted_cb', - 'bt_ag_unset_microphone_gain_changed_cb', - 'bt_ag_unset_multi_call_handling_event_cb', - 'bt_ag_unset_sco_state_changed_cb', - 'bt_ag_unset_speaker_gain_changed_cb', - 'bt_ag_unset_vendor_cmd_cb', - 'bt_audio_connect', - 'bt_audio_deinitialize', - 'bt_audio_disconnect', - 'bt_audio_initialize', - 'bt_audio_select_role', - 'bt_audio_set_connection_state_changed_cb', - 'bt_audio_unset_connection_state_changed_cb', - 'bt_avrcp_control_connect', - 'bt_avrcp_control_decrease_volume', - 'bt_avrcp_control_deinitialize', - 'bt_avrcp_control_disconnect', - 'bt_avrcp_control_free_track_info', - 'bt_avrcp_control_get_equalizer_state', - 'bt_avrcp_control_get_play_status', - 'bt_avrcp_control_get_position', - 'bt_avrcp_control_get_repeat_mode', - 'bt_avrcp_control_get_scan_mode', - 'bt_avrcp_control_get_shuffle_mode', - 'bt_avrcp_control_get_track_info', - 'bt_avrcp_control_increase_volume', - 'bt_avrcp_control_initialize', - 'bt_avrcp_control_send_player_command', - 'bt_avrcp_control_set_absolute_volume', - 'bt_avrcp_control_set_equalizer_state', - 'bt_avrcp_control_set_repeat_mode', - 'bt_avrcp_control_set_scan_mode', - 'bt_avrcp_control_set_shuffle_mode', - 'bt_avrcp_set_equalizer_state_changed_cb', - 'bt_avrcp_set_play_status_changed_cb', - 'bt_avrcp_set_position_changed_cb', - 'bt_avrcp_set_repeat_mode_changed_cb', - 'bt_avrcp_set_scan_mode_changed_cb', - 'bt_avrcp_set_shuffle_mode_changed_cb', - 'bt_avrcp_set_track_info_changed_cb', - 'bt_avrcp_target_connect', - 'bt_avrcp_target_deinitialize', - 'bt_avrcp_target_disconnect', - 'bt_avrcp_target_initialize', - 'bt_avrcp_target_notify_equalizer_state', - 'bt_avrcp_target_notify_player_state', - 'bt_avrcp_target_notify_position', - 'bt_avrcp_target_notify_repeat_mode', - 'bt_avrcp_target_notify_scan_mode', - 'bt_avrcp_target_notify_shuffle_mode', - 'bt_avrcp_target_notify_track', - 'bt_avrcp_unset_equalizer_state_changed_cb', - 'bt_avrcp_unset_play_status_changed_cb', - 'bt_avrcp_unset_position_changed_cb', - 'bt_avrcp_unset_repeat_mode_changed_cb', - 'bt_avrcp_unset_scan_mode_changed_cb', - 'bt_avrcp_unset_shuffle_mode_changed_cb', - 'bt_avrcp_unset_track_info_changed_cb', - 'bt_call_list_add', - 'bt_call_list_create', - 'bt_call_list_destroy', - 'bt_call_list_reset', - 'bt_deinitialize', - 'bt_device_cancel_bonding', - 'bt_device_cancel_service_search', - 'bt_device_create_bond', - 'bt_device_create_bond_by_type', - 'bt_device_destroy_bond', - 'bt_device_disable_rssi_monitor', - 'bt_device_enable_rssi_monitor', - 'bt_device_foreach_connected_profiles', - 'bt_device_get_att_mtu', - 'bt_device_get_connection_state', - 'bt_device_get_id_address', - 'bt_device_get_profile_restricted', - 'bt_device_get_profile_trusted', - 'bt_device_get_rssi_strength', - 'bt_device_get_service_mask_from_uuid_list', - 'bt_device_is_profile_connected', - 'bt_device_le_conn_update', - 'bt_device_le_set_data_length', - 'bt_device_le_set_data_length_change_cb', - 'bt_device_request_att_mtu', - 'bt_device_set_alias', - 'bt_device_set_att_mtu_changed_cb', - 'bt_device_set_authorization', - 'bt_device_set_authorization_changed_cb', - 'bt_device_set_bond_created_cb', - 'bt_device_set_bond_destroyed_cb', - 'bt_device_set_connection_state_changed_cb', - 'bt_device_set_pin_code', - 'bt_device_set_profile_restricted', - 'bt_device_set_profile_trusted', - 'bt_device_set_service_searched_cb', - 'bt_device_set_trusted_profile_cb', - 'bt_device_start_service_search', - 'bt_device_unset_att_mtu_changed_cb', - 'bt_device_unset_authorization_changed_cb', - 'bt_device_unset_bond_created_cb', - 'bt_device_unset_bond_destroyed_cb', - 'bt_device_unset_connection_state_changed_cb', - 'bt_device_unset_pin_code', - 'bt_device_unset_rssi_alert_cb', - 'bt_device_unset_service_searched_cb', - 'bt_device_unset_trusted_profile_cb', - 'bt_device_update_le_connection_mode', - 'bt_dpm_activate_device_restriction', - 'bt_dpm_activate_uuid_restriction', - 'bt_dpm_add_devices_to_blacklist', - 'bt_dpm_add_devices_to_whitelist', - 'bt_dpm_add_uuids_to_blacklist', - 'bt_dpm_add_uuids_to_whitelist', - 'bt_dpm_clear_devices_from_blacklist', - 'bt_dpm_clear_devices_from_whitelist', - 'bt_dpm_clear_uuids_from_blacklist', - 'bt_dpm_clear_uuids_from_whitelist', - 'bt_dpm_get_allow_bluetooth_mode', - 'bt_dpm_get_allow_outgoing_call', - 'bt_dpm_get_data_transfer_state', - 'bt_dpm_get_desktop_connectivity_state', - 'bt_dpm_get_devices_from_blacklist', - 'bt_dpm_get_devices_from_whitelist', - 'bt_dpm_get_discoverable_state', - 'bt_dpm_get_limited_discoverable_state', - 'bt_dpm_get_pairing_state', - 'bt_dpm_get_profile_state', - 'bt_dpm_get_uuids_from_blacklist', - 'bt_dpm_get_uuids_from_whitelist', - 'bt_dpm_is_device_restriction_active', - 'bt_dpm_is_uuid_restriction_active', - 'bt_dpm_remove_device_from_blacklist', - 'bt_dpm_remove_device_from_whitelist', - 'bt_dpm_remove_uuid_from_blacklist', - 'bt_dpm_remove_uuid_from_whitelist', - 'bt_dpm_set_allow_bluetooth_mode', - 'bt_dpm_set_allow_outgoing_call', - 'bt_dpm_set_data_transfer_state', - 'bt_dpm_set_desktop_connectivity_state', - 'bt_dpm_set_discoverable_state', - 'bt_dpm_set_limited_discoverable_state', - 'bt_dpm_set_pairing_state', - 'bt_dpm_set_profile_state', - 'bt_gatt_characteristic_add_descriptor', - 'bt_gatt_characteristic_create', - 'bt_gatt_characteristic_destroy', - 'bt_gatt_characteristic_foreach_descriptors', - 'bt_gatt_characteristic_get_descriptor', - 'bt_gatt_characteristic_get_permissions', - 'bt_gatt_characteristic_get_properties', - 'bt_gatt_characteristic_get_service', - 'bt_gatt_characteristic_get_write_type', - 'bt_gatt_characteristic_set_properties', - 'bt_gatt_characteristic_set_write_type', - 'bt_gatt_client_create', - 'bt_gatt_client_destroy', - 'bt_gatt_client_foreach_services', - 'bt_gatt_client_get_att_mtu', - 'bt_gatt_client_get_remote_address', - 'bt_gatt_client_get_service', - 'bt_gatt_client_read_value', - 'bt_gatt_client_request_att_mtu_change', - 'bt_gatt_client_set_att_mtu_changed_cb', - 'bt_gatt_client_set_characteristic_value_changed_cb', - 'bt_gatt_client_set_service_changed_cb', - 'bt_gatt_client_unset_att_mtu_changed_cb', - 'bt_gatt_client_unset_characteristic_value_changed_cb', - 'bt_gatt_client_unset_service_changed_cb', - 'bt_gatt_client_write_value', - 'bt_gatt_clone_attribute_handle', - 'bt_gatt_connect', - 'bt_gatt_descriptor_create', - 'bt_gatt_descriptor_destroy', - 'bt_gatt_descriptor_get_characteristic', - 'bt_gatt_descriptor_get_permissions', - 'bt_gatt_destroy', - 'bt_gatt_destroy_attribute_handle', - 'bt_gatt_disconnect', - 'bt_gatt_discover_characteristic_descriptor', - 'bt_gatt_discover_characteristics', - 'bt_gatt_foreach_included_services', - 'bt_gatt_foreach_primary_services', - 'bt_gatt_get_characteristic_declaration', - 'bt_gatt_get_float_value', - 'bt_gatt_get_int_value', - 'bt_gatt_get_service_uuid', - 'bt_gatt_get_type', - 'bt_gatt_get_uuid', - 'bt_gatt_get_value', - 'bt_gatt_read_characteristic_value', - 'bt_gatt_server_create', - 'bt_gatt_server_deinitialize', - 'bt_gatt_server_destroy', - 'bt_gatt_server_foreach_services', - 'bt_gatt_server_get_service', - 'bt_gatt_server_initialize', - 'bt_gatt_server_notify_characteristic_changed_value', - 'bt_gatt_server_register_service', - 'bt_gatt_server_send_response', - 'bt_gatt_server_set_characteristic_notification_state_change_cb', - 'bt_gatt_server_set_read_value_requested_cb', - 'bt_gatt_server_set_write_value_requested_cb', - 'bt_gatt_server_start', - 'bt_gatt_server_unregister_all_services', - 'bt_gatt_server_unregister_service', - 'bt_gatt_service_add_characteristic', - 'bt_gatt_service_add_included_service', - 'bt_gatt_service_create', - 'bt_gatt_service_destroy', - 'bt_gatt_service_foreach_characteristics', - 'bt_gatt_service_foreach_included_services', - 'bt_gatt_service_get_characteristic', - 'bt_gatt_service_get_client', - 'bt_gatt_service_get_included_service', - 'bt_gatt_service_get_server', - 'bt_gatt_set_characteristic_changed_cb', - 'bt_gatt_set_characteristic_value', - 'bt_gatt_set_characteristic_value_request', - 'bt_gatt_set_connection_state_changed_cb', - 'bt_gatt_set_float_value', - 'bt_gatt_set_int_value', - 'bt_gatt_set_permissions', - 'bt_gatt_set_value', - 'bt_gatt_unset_characteristic_changed_cb', - 'bt_gatt_unset_connection_state_changed_cb', - 'bt_gatt_unwatch_characteristic_changes', - 'bt_gatt_watch_characteristic_changes', - 'bt_get_uuid_name', - 'bt_hdp_connect_to_source', - 'bt_hdp_disconnect', - 'bt_hdp_register_sink_app', - 'bt_hdp_send_data', - 'bt_hdp_set_connection_state_changed_cb', - 'bt_hdp_set_data_received_cb', - 'bt_hdp_unregister_sink_app', - 'bt_hdp_unset_connection_state_changed_cb', - 'bt_hdp_unset_data_received_cb', - 'bt_hf_close_sco', - 'bt_hf_deinitialize', - 'bt_hf_free_call_status_info_list', - 'bt_hf_get_call_status_info_list', - 'bt_hf_get_codec_id', - 'bt_hf_initialize', - 'bt_hf_is_connected', - 'bt_hf_is_inband_ringtone_supported', - 'bt_hf_is_sco_opened', - 'bt_hf_notify_call_event', - 'bt_hf_notify_speaker_gain', - 'bt_hf_notify_vendor_cmd', - 'bt_hf_notify_voice_recognition_state', - 'bt_hf_request_call_status_info_list', - 'bt_hf_send_dtmf', - 'bt_hf_set_call_handling_event_cb', - 'bt_hf_set_call_status_updated_event_cb', - 'bt_hf_set_multi_call_handling_event_cb', - 'bt_hf_set_remote_call_event_cb', - 'bt_hf_set_remote_device_state_changed_cb', - 'bt_hf_set_sco_state_changed_cb', - 'bt_hf_set_speaker_gain_changed_cb', - 'bt_hf_set_vendor_dep_cmd_event_cb', - 'bt_hf_unset_call_handling_event_cb', - 'bt_hf_unset_call_status_updated_event_cb', - 'bt_hf_unset_multi_call_handling_event_cb', - 'bt_hf_unset_remote_call_event_cb', - 'bt_hf_unset_remote_device_state_changed_cb', - 'bt_hf_unset_sco_state_changed_cb', - 'bt_hf_unset_speaker_gain_changed_cb', - 'bt_hf_unset_vendor_dep_cmd_event_cb', - 'bt_hid_device_activate', - 'bt_hid_device_connect', - 'bt_hid_device_deactivate', - 'bt_hid_device_disconnect', - 'bt_hid_device_reply_to_report', - 'bt_hid_device_send_custom_event', - 'bt_hid_device_send_key_event', - 'bt_hid_device_send_mouse_event', - 'bt_hid_device_set_data_received_cb', - 'bt_hid_device_unset_data_received_cb', - 'bt_hid_host_connect', - 'bt_hid_host_deinitialize', - 'bt_hid_host_disconnect', - 'bt_hid_host_initialize', - 'bt_initialize', - 'bt_ipsp_connect', - 'bt_ipsp_deinitialize', - 'bt_ipsp_disconnect', - 'bt_ipsp_initialize', - 'bt_ipsp_set_connection_state_changed_cb', - 'bt_ipsp_unset_connection_state_changed_cb', - 'bt_map_client_create_session', - 'bt_map_client_deinitialize', - 'bt_map_client_destroy_session', - 'bt_map_client_get_message', - 'bt_map_client_initialize', - 'bt_map_client_list_filter_fields', - 'bt_map_client_list_folders', - 'bt_map_client_list_folders_filter_create', - 'bt_map_client_list_folders_filter_destroy', - 'bt_map_client_list_messages', - 'bt_map_client_list_messages_filter_create', - 'bt_map_client_list_messages_filter_destroy', - 'bt_map_client_push_message', - 'bt_map_client_push_message_args_create', - 'bt_map_client_push_message_args_destroy', - 'bt_map_client_set_folder', - 'bt_map_client_update_inbox', - 'bt_nap_activate', - 'bt_nap_deactivate', - 'bt_nap_disconnect', - 'bt_nap_disconnect_all', - 'bt_nap_set_connection_state_changed_cb', - 'bt_nap_unset_connection_state_changed_cb', - 'bt_opp_client_add_file', - 'bt_opp_client_cancel_push', - 'bt_opp_client_clear_files', - 'bt_opp_client_deinitialize', - 'bt_opp_client_initialize', - 'bt_opp_client_push_files', - 'bt_opp_get_transfer_progress', - 'bt_opp_server_accept', - 'bt_opp_server_cancel_transfer', - 'bt_opp_server_deinitialize', - 'bt_opp_server_initialize', - 'bt_opp_server_initialize_by_connection_request', - 'bt_opp_server_reject', - 'bt_opp_server_set_destination', - 'bt_otp_client_connect', - 'bt_otp_client_create', - 'bt_otp_client_create_object', - 'bt_otp_client_delete_object', - 'bt_otp_client_destroy', - 'bt_otp_client_disconnect', - 'bt_otp_client_discover_all_objects', - 'bt_otp_client_execute_object', - 'bt_otp_client_read_object_contents', - 'bt_otp_client_select_object', - 'bt_otp_client_set_connection_state_changed_cb', - 'bt_otp_client_unset_connection_state_changed_cb', - 'bt_otp_client_write_object', - 'bt_otp_server_deinitialize', - 'bt_otp_server_initialize', - 'bt_otp_set_server_state_changed_cb', - 'bt_otp_unset_server_state_changed_cb', - 'bt_panu_connect', - 'bt_panu_disconnect', - 'bt_panu_set_connection_state_changed_cb', - 'bt_panu_unset_connection_state_changed_cb', - 'bt_pbap_client_connect', - 'bt_pbap_client_deinitialize', - 'bt_pbap_client_disconnect', - 'bt_pbap_client_get_list', - 'bt_pbap_client_get_phone_book', - 'bt_pbap_client_get_phone_book_size', - 'bt_pbap_client_initialize', - 'bt_pbap_client_is_connected', - 'bt_pbap_client_pull_vcard', - 'bt_pbap_client_search_phone_book', - 'bt_pbap_client_set_connection_state_changed_cb', - 'bt_pbap_client_unset_connection_state_changed_cb', - 'bt_proximity_monitor_connect', - 'bt_proximity_monitor_create', - 'bt_proximity_monitor_destroy', - 'bt_proximity_monitor_disconnect', - 'bt_proximity_monitor_get_immediate_alert', - 'bt_proximity_monitor_get_linkloss_alert', - 'bt_proximity_monitor_get_signal_level', - 'bt_proximity_monitor_set_connection_state_changed_cb', - 'bt_proximity_monitor_set_immediate_alert', - 'bt_proximity_monitor_set_linkloss_alert', - 'bt_proximity_monitor_unset_connection_state_changed_cb', - 'bt_proximity_reporter_create', - 'bt_proximity_reporter_destroy', - 'bt_proximity_reporter_get_immediate_alert', - 'bt_proximity_reporter_get_linkloss_alert', - 'bt_proximity_reporter_set_connection_state_changed_cb', - 'bt_proximity_reporter_set_property_changed_cb', - 'bt_proximity_reporter_unset_connection_state_changed_cb', - 'bt_proximity_reporter_unset_property_changed_cb', - 'bt_socket_accept', - 'bt_socket_connect_rfcomm', - 'bt_socket_create_rfcomm', - 'bt_socket_create_rfcomm_ex', - 'bt_socket_destroy_rfcomm', - 'bt_socket_destroy_rfcomm_ex', - 'bt_socket_disconnect_rfcomm', - 'bt_socket_is_service_used', - 'bt_socket_listen', - 'bt_socket_listen_and_accept_rfcomm', - 'bt_socket_listen_and_accept_rfcomm_ex', - 'bt_socket_reject', - 'bt_socket_send_data', - 'bt_socket_set_connection_requested_cb', - 'bt_socket_set_connection_state_changed_cb', - 'bt_socket_set_data_received_cb', - 'bt_socket_unset_connection_requested_cb', - 'bt_socket_unset_connection_state_changed_cb', - 'bt_socket_unset_data_received_cb', - 'bt_tds_provider_create', - 'bt_tds_provider_destroy', - 'bt_tds_provider_register', - 'bt_tds_provider_send_activation_resp', - 'bt_tds_provider_set_manufacturer_data', - 'bt_tds_provider_set_transport_data', - 'bt_tds_provider_unregister', - 'bt_tds_seeker_activate_control_point', - 'bt_tds_seeker_connect', - 'bt_tds_seeker_create', - 'bt_tds_seeker_destroy', - 'bt_tds_seeker_disconnect', - 'bt_tds_seeker_get_complete_transport_blocks', - 'bt_tds_seeker_set_connection_state_changed_cb', - 'bt_tds_seeker_unset_connection_state_changed_cb', - 'bt_tds_set_transport_activation_requested_cb', - 'bt_tds_start_seeking_providers', - 'bt_tds_stop_seeking_providers', - 'bt_tds_unset_transport_activation_requested_cb', - ], - 'libcapi-network-connection.so.1': [ - 'connection_add_profile', - 'connection_add_route', - 'connection_add_route_entry', - 'connection_add_route_ipv6', - 'connection_close_profile', - 'connection_create', - 'connection_destroy', - 'connection_destroy_profile_iterator', - 'connection_foreach_ipv6_address', - 'connection_get_bt_state', - 'connection_get_cellular_state', - 'connection_get_current_profile', - 'connection_get_default_cellular_service_profile', - 'connection_get_ethernet_cable_state', - 'connection_get_ethernet_state', - 'connection_get_ip_address', - 'connection_get_mac_address', - 'connection_get_profile_iterator', - 'connection_get_proxy', - 'connection_get_statistics', - 'connection_get_type', - 'connection_get_wifi_state', - 'connection_is_metered_network', - 'connection_open_profile', - 'connection_profile_clone', - 'connection_profile_create', - 'connection_profile_destroy', - 'connection_profile_get_cellular_apn', - 'connection_profile_get_cellular_auth_info', - 'connection_profile_get_cellular_home_url', - 'connection_profile_get_cellular_pdn_type', - 'connection_profile_get_cellular_roam_pdn_type', - 'connection_profile_get_cellular_service_type', - 'connection_profile_get_dhcp_lease_duration', - 'connection_profile_get_dhcp_server_address', - 'connection_profile_get_dns_address', - 'connection_profile_get_dns_config_type', - 'connection_profile_get_gateway_address', - 'connection_profile_get_id', - 'connection_profile_get_ip_address', - 'connection_profile_get_ip_config_type', - 'connection_profile_get_ipv6_state', - 'connection_profile_get_name', - 'connection_profile_get_network_interface_name', - 'connection_profile_get_prefix_length', - 'connection_profile_get_proxy_address', - 'connection_profile_get_proxy_type', - 'connection_profile_get_state', - 'connection_profile_get_subnet_mask', - 'connection_profile_get_type', - 'connection_profile_get_wifi_bssid', - 'connection_profile_get_wifi_encryption_type', - 'connection_profile_get_wifi_essid', - 'connection_profile_get_wifi_frequency', - 'connection_profile_get_wifi_max_speed', - 'connection_profile_get_wifi_rssi', - 'connection_profile_get_wifi_security_type', - 'connection_profile_is_cellular_default', - 'connection_profile_is_cellular_editable', - 'connection_profile_is_cellular_hidden', - 'connection_profile_is_cellular_roaming', - 'connection_profile_is_wifi_passphrase_required', - 'connection_profile_is_wifi_wps_supported', - 'connection_profile_iterator_has_next', - 'connection_profile_iterator_next', - 'connection_profile_refresh', - 'connection_profile_set_cellular_apn', - 'connection_profile_set_cellular_auth_info', - 'connection_profile_set_cellular_home_url', - 'connection_profile_set_cellular_pdn_type', - 'connection_profile_set_cellular_roam_pdn_type', - 'connection_profile_set_cellular_service_type', - 'connection_profile_set_dns_address', - 'connection_profile_set_dns_config_type', - 'connection_profile_set_gateway_address', - 'connection_profile_set_ip_address', - 'connection_profile_set_ip_config_type', - 'connection_profile_set_prefix_length', - 'connection_profile_set_proxy_address', - 'connection_profile_set_proxy_type', - 'connection_profile_set_state_changed_cb', - 'connection_profile_set_subnet_mask', - 'connection_profile_set_wifi_passphrase', - 'connection_profile_unset_state_changed_cb', - 'connection_remove_profile', - 'connection_remove_route', - 'connection_remove_route_entry', - 'connection_remove_route_ipv6', - 'connection_reset_profile', - 'connection_reset_statistics', - 'connection_set_default_cellular_service_profile', - 'connection_set_default_cellular_service_profile_async', - 'connection_set_ethernet_cable_state_chaged_cb', - 'connection_set_ethernet_cable_state_changed_cb', - 'connection_set_ip_address_changed_cb', - 'connection_set_proxy_address_changed_cb', - 'connection_set_type_changed_cb', - 'connection_unset_ethernet_cable_state_chaged_cb', - 'connection_unset_ethernet_cable_state_changed_cb', - 'connection_unset_ip_address_changed_cb', - 'connection_unset_proxy_address_changed_cb', - 'connection_unset_type_changed_cb', - 'connection_update_profile', - ], - 'libnsd-dns-sd.so.0': [ - 'dnssd_create_local_service', - 'dnssd_deinitialize', - 'dnssd_deregister_local_service', - 'dnssd_destroy_local_service', - 'dnssd_initialize', - 'dnssd_register_local_service', - 'dnssd_service_add_txt_record', - 'dnssd_service_get_all_txt_record', - 'dnssd_service_get_ip', - 'dnssd_service_get_name', - 'dnssd_service_get_port', - 'dnssd_service_get_type', - 'dnssd_service_remove_txt_record', - 'dnssd_service_set_interface', - 'dnssd_service_set_name', - 'dnssd_service_set_port', - 'dnssd_service_set_record', - 'dnssd_service_unset_record', - 'dnssd_start_browsing_service', - 'dnssd_start_browsing_service_on_interface', - 'dnssd_stop_browsing_service', - ], - 'libiotcon.so.0': [ - 'iotcon_add_generated_pin_cb', - 'iotcon_add_presence_cb', - 'iotcon_attributes_add_attributes', - 'iotcon_attributes_add_bool', - 'iotcon_attributes_add_byte_str', - 'iotcon_attributes_add_double', - 'iotcon_attributes_add_int', - 'iotcon_attributes_add_list', - 'iotcon_attributes_add_null', - 'iotcon_attributes_add_str', - 'iotcon_attributes_clone', - 'iotcon_attributes_create', - 'iotcon_attributes_destroy', - 'iotcon_attributes_foreach', - 'iotcon_attributes_get_attributes', - 'iotcon_attributes_get_bool', - 'iotcon_attributes_get_byte_str', - 'iotcon_attributes_get_double', - 'iotcon_attributes_get_int', - 'iotcon_attributes_get_keys_count', - 'iotcon_attributes_get_list', - 'iotcon_attributes_get_str', - 'iotcon_attributes_get_type', - 'iotcon_attributes_is_null', - 'iotcon_attributes_remove', - 'iotcon_deinitialize', - 'iotcon_device_info_get_property', - 'iotcon_find_device_info', - 'iotcon_find_platform_info', - 'iotcon_find_resource', - 'iotcon_get_timeout', - 'iotcon_initialize', - 'iotcon_list_add_attributes', - 'iotcon_list_add_bool', - 'iotcon_list_add_byte_str', - 'iotcon_list_add_double', - 'iotcon_list_add_int', - 'iotcon_list_add_list', - 'iotcon_list_add_str', - 'iotcon_list_create', - 'iotcon_list_destroy', - 'iotcon_list_foreach_attributes', - 'iotcon_list_foreach_bool', - 'iotcon_list_foreach_byte_str', - 'iotcon_list_foreach_double', - 'iotcon_list_foreach_int', - 'iotcon_list_foreach_list', - 'iotcon_list_foreach_str', - 'iotcon_list_get_length', - 'iotcon_list_get_nth_attributes', - 'iotcon_list_get_nth_bool', - 'iotcon_list_get_nth_byte_str', - 'iotcon_list_get_nth_double', - 'iotcon_list_get_nth_int', - 'iotcon_list_get_nth_list', - 'iotcon_list_get_nth_str', - 'iotcon_list_get_type', - 'iotcon_list_remove_nth', - 'iotcon_lite_resource_create', - 'iotcon_lite_resource_destroy', - 'iotcon_lite_resource_get_attributes', - 'iotcon_lite_resource_update_attributes', - 'iotcon_observers_add', - 'iotcon_observers_create', - 'iotcon_observers_destroy', - 'iotcon_observers_remove', - 'iotcon_options_add', - 'iotcon_options_create', - 'iotcon_options_destroy', - 'iotcon_options_foreach', - 'iotcon_options_lookup', - 'iotcon_options_remove', - 'iotcon_platform_info_get_property', - 'iotcon_polling_get_interval', - 'iotcon_polling_invoke', - 'iotcon_polling_set_interval', - 'iotcon_presence_get_connectivity_type', - 'iotcon_presence_get_host_address', - 'iotcon_presence_get_resource_type', - 'iotcon_presence_response_get_connectivity_type', - 'iotcon_presence_response_get_host_address', - 'iotcon_presence_response_get_resource_type', - 'iotcon_presence_response_get_result', - 'iotcon_presence_response_get_trigger', - 'iotcon_provisioning_acl_add_resource', - 'iotcon_provisioning_acl_create', - 'iotcon_provisioning_acl_destroy', - 'iotcon_provisioning_acl_set_all_subject', - 'iotcon_provisioning_acl_set_permission', - 'iotcon_provisioning_acl_set_subject', - 'iotcon_provisioning_device_clone', - 'iotcon_provisioning_device_destroy', - 'iotcon_provisioning_device_get_connectivity_type', - 'iotcon_provisioning_device_get_host_address', - 'iotcon_provisioning_device_get_id', - 'iotcon_provisioning_device_get_oxm', - 'iotcon_provisioning_device_is_owned', - 'iotcon_provisioning_find_device', - 'iotcon_provisioning_initialize', - 'iotcon_provisioning_pairwise_devices', - 'iotcon_provisioning_provision_acl', - 'iotcon_provisioning_provision_cred', - 'iotcon_provisioning_register_unowned_device', - 'iotcon_provisioning_remove_device', - 'iotcon_provisioning_set_randompin_cb', - 'iotcon_provisioning_unlink_pairwise', - 'iotcon_query_add', - 'iotcon_query_create', - 'iotcon_query_destroy', - 'iotcon_query_foreach', - 'iotcon_query_get_interface', - 'iotcon_query_get_resource_type', - 'iotcon_query_lookup', - 'iotcon_query_remove', - 'iotcon_query_set_interface', - 'iotcon_query_set_resource_type', - 'iotcon_remote_resource_clone', - 'iotcon_remote_resource_create', - 'iotcon_remote_resource_delete', - 'iotcon_remote_resource_destroy', - 'iotcon_remote_resource_get', - 'iotcon_remote_resource_get_cached_representation', - 'iotcon_remote_resource_get_checking_interval', - 'iotcon_remote_resource_get_connectivity_type', - 'iotcon_remote_resource_get_device_id', - 'iotcon_remote_resource_get_device_name', - 'iotcon_remote_resource_get_host_address', - 'iotcon_remote_resource_get_interfaces', - 'iotcon_remote_resource_get_options', - 'iotcon_remote_resource_get_policies', - 'iotcon_remote_resource_get_types', - 'iotcon_remote_resource_get_uri_path', - 'iotcon_remote_resource_observe_deregister', - 'iotcon_remote_resource_observe_register', - 'iotcon_remote_resource_post', - 'iotcon_remote_resource_put', - 'iotcon_remote_resource_set_checking_interval', - 'iotcon_remote_resource_set_options', - 'iotcon_remote_resource_start_caching', - 'iotcon_remote_resource_start_monitoring', - 'iotcon_remote_resource_stop_caching', - 'iotcon_remote_resource_stop_monitoring', - 'iotcon_remove_generated_pin_cb', - 'iotcon_remove_presence_cb', - 'iotcon_representation_add_child', - 'iotcon_representation_clone', - 'iotcon_representation_create', - 'iotcon_representation_destroy', - 'iotcon_representation_foreach_children', - 'iotcon_representation_get_attributes', - 'iotcon_representation_get_child_count', - 'iotcon_representation_get_nth_child', - 'iotcon_representation_get_resource_interfaces', - 'iotcon_representation_get_resource_types', - 'iotcon_representation_get_uri_path', - 'iotcon_representation_remove_child', - 'iotcon_representation_set_attributes', - 'iotcon_representation_set_resource_interfaces', - 'iotcon_representation_set_resource_types', - 'iotcon_representation_set_uri_path', - 'iotcon_request_get_connectivity_type', - 'iotcon_request_get_host_address', - 'iotcon_request_get_observe_id', - 'iotcon_request_get_observe_type', - 'iotcon_request_get_options', - 'iotcon_request_get_query', - 'iotcon_request_get_representation', - 'iotcon_request_get_request_type', - 'iotcon_resource_bind_child_resource', - 'iotcon_resource_bind_interface', - 'iotcon_resource_bind_type', - 'iotcon_resource_create', - 'iotcon_resource_destroy', - 'iotcon_resource_get_child_count', - 'iotcon_resource_get_interfaces', - 'iotcon_resource_get_nth_child', - 'iotcon_resource_get_policies', - 'iotcon_resource_get_types', - 'iotcon_resource_get_uri_path', - 'iotcon_resource_interfaces_add', - 'iotcon_resource_interfaces_clone', - 'iotcon_resource_interfaces_create', - 'iotcon_resource_interfaces_destroy', - 'iotcon_resource_interfaces_foreach', - 'iotcon_resource_interfaces_remove', - 'iotcon_resource_notify', - 'iotcon_resource_set_request_handler', - 'iotcon_resource_types_add', - 'iotcon_resource_types_clone', - 'iotcon_resource_types_create', - 'iotcon_resource_types_destroy', - 'iotcon_resource_types_foreach', - 'iotcon_resource_types_remove', - 'iotcon_resource_unbind_child_resource', - 'iotcon_response_create', - 'iotcon_response_destroy', - 'iotcon_response_get_options', - 'iotcon_response_get_representation', - 'iotcon_response_get_result', - 'iotcon_response_send', - 'iotcon_response_set_options', - 'iotcon_response_set_representation', - 'iotcon_response_set_result', - 'iotcon_set_device_name', - 'iotcon_set_timeout', - 'iotcon_start_presence', - 'iotcon_stop_presence', - ], - 'libcapi-network-mtp.so.1': [ - 'mtp_add_mtp_event_cb', - 'mtp_db_deinit', - 'mtp_db_get_object_info', - 'mtp_db_init', - 'mtp_deinitialize', - 'mtp_delete_object', - 'mtp_deviceinfo_get_bus_location', - 'mtp_deviceinfo_get_device_number', - 'mtp_deviceinfo_get_device_version', - 'mtp_deviceinfo_get_manufacturer_name', - 'mtp_deviceinfo_get_model_name', - 'mtp_deviceinfo_get_serial_number', - 'mtp_deviceinfo_get_stitching_engine_version', - 'mtp_gdbus_deviceinfo_get_bus_location', - 'mtp_gdbus_deviceinfo_get_device_number', - 'mtp_gdbus_deviceinfo_get_device_version', - 'mtp_gdbus_deviceinfo_get_manufacturer_name', - 'mtp_gdbus_deviceinfo_get_model_name', - 'mtp_gdbus_deviceinfo_get_serial_number', - 'mtp_gdbus_deviceinfo_get_stitching_engine_version', - 'mtp_gdbus_deviceinfo_proxy_deinit', - 'mtp_gdbus_deviceinfo_proxy_init', - 'mtp_gdbuslib_deviceinfo_call_get_bus_location', - 'mtp_gdbuslib_deviceinfo_call_get_bus_location_finish', - 'mtp_gdbuslib_deviceinfo_call_get_bus_location_sync', - 'mtp_gdbuslib_deviceinfo_call_get_device_number', - 'mtp_gdbuslib_deviceinfo_call_get_device_number_finish', - 'mtp_gdbuslib_deviceinfo_call_get_device_number_sync', - 'mtp_gdbuslib_deviceinfo_call_get_device_version', - 'mtp_gdbuslib_deviceinfo_call_get_device_version_finish', - 'mtp_gdbuslib_deviceinfo_call_get_device_version_sync', - 'mtp_gdbuslib_deviceinfo_call_get_manufacturer_name', - 'mtp_gdbuslib_deviceinfo_call_get_manufacturer_name_finish', - 'mtp_gdbuslib_deviceinfo_call_get_manufacturer_name_sync', - 'mtp_gdbuslib_deviceinfo_call_get_model_name', - 'mtp_gdbuslib_deviceinfo_call_get_model_name_finish', - 'mtp_gdbuslib_deviceinfo_call_get_model_name_sync', - 'mtp_gdbuslib_deviceinfo_call_get_serial_number', - 'mtp_gdbuslib_deviceinfo_call_get_serial_number_finish', - 'mtp_gdbuslib_deviceinfo_call_get_serial_number_sync', - 'mtp_gdbuslib_deviceinfo_call_get_stitching_engine_version', - 'mtp_gdbuslib_deviceinfo_call_get_stitching_engine_version_finish', - 'mtp_gdbuslib_deviceinfo_call_get_stitching_engine_version_sync', - 'mtp_gdbuslib_deviceinfo_complete_get_bus_location', - 'mtp_gdbuslib_deviceinfo_complete_get_device_number', - 'mtp_gdbuslib_deviceinfo_complete_get_device_version', - 'mtp_gdbuslib_deviceinfo_complete_get_manufacturer_name', - 'mtp_gdbuslib_deviceinfo_complete_get_model_name', - 'mtp_gdbuslib_deviceinfo_complete_get_serial_number', - 'mtp_gdbuslib_deviceinfo_complete_get_stitching_engine_version', - 'mtp_gdbuslib_deviceinfo_get_type', - 'mtp_gdbuslib_deviceinfo_interface_info', - 'mtp_gdbuslib_deviceinfo_override_properties', - 'mtp_gdbuslib_deviceinfo_proxy_get_type', - 'mtp_gdbuslib_deviceinfo_proxy_new', - 'mtp_gdbuslib_deviceinfo_proxy_new_finish', - 'mtp_gdbuslib_deviceinfo_proxy_new_for_bus', - 'mtp_gdbuslib_deviceinfo_proxy_new_for_bus_finish', - 'mtp_gdbuslib_deviceinfo_proxy_new_for_bus_sync', - 'mtp_gdbuslib_deviceinfo_proxy_new_sync', - 'mtp_gdbuslib_deviceinfo_skeleton_get_type', - 'mtp_gdbuslib_deviceinfo_skeleton_new', - 'mtp_gdbuslib_manager_call_delete_object', - 'mtp_gdbuslib_manager_call_delete_object_finish', - 'mtp_gdbuslib_manager_call_delete_object_sync', - 'mtp_gdbuslib_manager_call_get_devices', - 'mtp_gdbuslib_manager_call_get_devices_finish', - 'mtp_gdbuslib_manager_call_get_devices_sync', - 'mtp_gdbuslib_manager_call_get_object', - 'mtp_gdbuslib_manager_call_get_object_finish', - 'mtp_gdbuslib_manager_call_get_object_handles', - 'mtp_gdbuslib_manager_call_get_object_handles_finish', - 'mtp_gdbuslib_manager_call_get_object_handles_sync', - 'mtp_gdbuslib_manager_call_get_object_sync', - 'mtp_gdbuslib_manager_call_get_partial_object', - 'mtp_gdbuslib_manager_call_get_partial_object_finish', - 'mtp_gdbuslib_manager_call_get_partial_object_sync', - 'mtp_gdbuslib_manager_call_get_storages', - 'mtp_gdbuslib_manager_call_get_storages_finish', - 'mtp_gdbuslib_manager_call_get_storages_sync', - 'mtp_gdbuslib_manager_call_get_thumbnail', - 'mtp_gdbuslib_manager_call_get_thumbnail_finish', - 'mtp_gdbuslib_manager_call_get_thumbnail_sync', - 'mtp_gdbuslib_manager_complete_delete_object', - 'mtp_gdbuslib_manager_complete_get_devices', - 'mtp_gdbuslib_manager_complete_get_object', - 'mtp_gdbuslib_manager_complete_get_object_handles', - 'mtp_gdbuslib_manager_complete_get_partial_object', - 'mtp_gdbuslib_manager_complete_get_storages', - 'mtp_gdbuslib_manager_complete_get_thumbnail', - 'mtp_gdbuslib_manager_emit_mtp_event', - 'mtp_gdbuslib_manager_get_type', - 'mtp_gdbuslib_manager_interface_info', - 'mtp_gdbuslib_manager_override_properties', - 'mtp_gdbuslib_manager_proxy_get_type', - 'mtp_gdbuslib_manager_proxy_new', - 'mtp_gdbuslib_manager_proxy_new_finish', - 'mtp_gdbuslib_manager_proxy_new_for_bus', - 'mtp_gdbuslib_manager_proxy_new_for_bus_finish', - 'mtp_gdbuslib_manager_proxy_new_for_bus_sync', - 'mtp_gdbuslib_manager_proxy_new_sync', - 'mtp_gdbuslib_manager_skeleton_get_type', - 'mtp_gdbuslib_manager_skeleton_new', - 'mtp_gdbuslib_objectinfo_call_get_property', - 'mtp_gdbuslib_objectinfo_call_get_property_finish', - 'mtp_gdbuslib_objectinfo_call_get_property_string', - 'mtp_gdbuslib_objectinfo_call_get_property_string_finish', - 'mtp_gdbuslib_objectinfo_call_get_property_string_sync', - 'mtp_gdbuslib_objectinfo_call_get_property_sync', - 'mtp_gdbuslib_objectinfo_complete_get_property', - 'mtp_gdbuslib_objectinfo_complete_get_property_string', - 'mtp_gdbuslib_objectinfo_get_type', - 'mtp_gdbuslib_objectinfo_interface_info', - 'mtp_gdbuslib_objectinfo_override_properties', - 'mtp_gdbuslib_objectinfo_proxy_get_type', - 'mtp_gdbuslib_objectinfo_proxy_new', - 'mtp_gdbuslib_objectinfo_proxy_new_finish', - 'mtp_gdbuslib_objectinfo_proxy_new_for_bus', - 'mtp_gdbuslib_objectinfo_proxy_new_for_bus_finish', - 'mtp_gdbuslib_objectinfo_proxy_new_for_bus_sync', - 'mtp_gdbuslib_objectinfo_proxy_new_sync', - 'mtp_gdbuslib_objectinfo_skeleton_get_type', - 'mtp_gdbuslib_objectinfo_skeleton_new', - 'mtp_gdbuslib_storageinfo_call_get_description', - 'mtp_gdbuslib_storageinfo_call_get_description_finish', - 'mtp_gdbuslib_storageinfo_call_get_description_sync', - 'mtp_gdbuslib_storageinfo_call_get_free_space', - 'mtp_gdbuslib_storageinfo_call_get_free_space_finish', - 'mtp_gdbuslib_storageinfo_call_get_free_space_sync', - 'mtp_gdbuslib_storageinfo_call_get_max_capacity', - 'mtp_gdbuslib_storageinfo_call_get_max_capacity_finish', - 'mtp_gdbuslib_storageinfo_call_get_max_capacity_sync', - 'mtp_gdbuslib_storageinfo_call_get_storage_type', - 'mtp_gdbuslib_storageinfo_call_get_storage_type_finish', - 'mtp_gdbuslib_storageinfo_call_get_storage_type_sync', - 'mtp_gdbuslib_storageinfo_call_get_volume_identifier', - 'mtp_gdbuslib_storageinfo_call_get_volume_identifier_finish', - 'mtp_gdbuslib_storageinfo_call_get_volume_identifier_sync', - 'mtp_gdbuslib_storageinfo_complete_get_description', - 'mtp_gdbuslib_storageinfo_complete_get_free_space', - 'mtp_gdbuslib_storageinfo_complete_get_max_capacity', - 'mtp_gdbuslib_storageinfo_complete_get_storage_type', - 'mtp_gdbuslib_storageinfo_complete_get_volume_identifier', - 'mtp_gdbuslib_storageinfo_get_type', - 'mtp_gdbuslib_storageinfo_interface_info', - 'mtp_gdbuslib_storageinfo_override_properties', - 'mtp_gdbuslib_storageinfo_proxy_get_type', - 'mtp_gdbuslib_storageinfo_proxy_new', - 'mtp_gdbuslib_storageinfo_proxy_new_finish', - 'mtp_gdbuslib_storageinfo_proxy_new_for_bus', - 'mtp_gdbuslib_storageinfo_proxy_new_for_bus_finish', - 'mtp_gdbuslib_storageinfo_proxy_new_for_bus_sync', - 'mtp_gdbuslib_storageinfo_proxy_new_sync', - 'mtp_gdbuslib_storageinfo_skeleton_get_type', - 'mtp_gdbuslib_storageinfo_skeleton_new', - 'mtp_gdbus_manager_add_event_cb', - 'mtp_gdbus_manager_deinitialize', - 'mtp_gdbus_manager_delete_object', - 'mtp_gdbus_manager_get_devices', - 'mtp_gdbus_manager_get_object', - 'mtp_gdbus_manager_get_object_handles', - 'mtp_gdbus_manager_get_partial_object', - 'mtp_gdbus_manager_get_storages', - 'mtp_gdbus_manager_get_thumbnail', - 'mtp_gdbus_manager_initialize', - 'mtp_gdbus_manager_remove_all_event_cb', - 'mtp_gdbus_manager_remove_event_cb', - 'mtp_gdbus_objectinfo_get_property', - 'mtp_gdbus_objectinfo_get_property_string', - 'mtp_gdbus_objectinfo_proxy_deinit', - 'mtp_gdbus_objectinfo_proxy_init', - 'mtp_gdbus_storageinfo_get_description', - 'mtp_gdbus_storageinfo_get_free_space', - 'mtp_gdbus_storageinfo_get_max_capacity', - 'mtp_gdbus_storageinfo_get_storage_type', - 'mtp_gdbus_storageinfo_get_volume_identifier', - 'mtp_gdbus_storageinfo_proxy_deinit', - 'mtp_gdbus_storageinfo_proxy_init', - 'mtp_get_devices', - 'mtp_get_object', - 'mtp_get_object_handles', - 'mtp_get_partial_object', - 'mtp_get_storages', - 'mtp_get_thumbnail', - 'mtp_initialize', - 'mtp_objectinfo_get_association_desc', - 'mtp_objectinfo_get_association_type', - 'mtp_objectinfo_get_date_created', - 'mtp_objectinfo_get_date_modified', - 'mtp_objectinfo_get_file_name', - 'mtp_objectinfo_get_file_type', - 'mtp_objectinfo_get_image_bit_depth', - 'mtp_objectinfo_get_image_pix_height', - 'mtp_objectinfo_get_image_pix_width', - 'mtp_objectinfo_get_keywords', - 'mtp_objectinfo_get_object_info', - 'mtp_objectinfo_get_parent_object_handle', - 'mtp_objectinfo_get_size', - 'mtp_objectinfo_get_storage', - 'mtp_objectinfo_get_thumbnail_file_type', - 'mtp_objectinfo_get_thumbnail_pix_height', - 'mtp_objectinfo_get_thumbnail_pix_width', - 'mtp_objectinfo_get_thumbnail_size', - 'mtp_remove_mtp_event_cb', - 'mtp_storageinfo_get_description', - 'mtp_storageinfo_get_free_space', - 'mtp_storageinfo_get_max_capacity', - 'mtp_storageinfo_get_storage_type', - 'mtp_storageinfo_get_volume_identifier', - ], - 'libnsd-ssdp.so.0': [ - 'ssdp_create_local_service', - 'ssdp_deinitialize', - 'ssdp_deregister_local_service', - 'ssdp_destroy_local_service', - 'ssdp_initialize', - 'ssdp_register_local_service', - 'ssdp_service_get_target', - 'ssdp_service_get_url', - 'ssdp_service_get_usn', - 'ssdp_service_set_url', - 'ssdp_service_set_usn', - 'ssdp_start_browsing_service', - 'ssdp_stop_browsing_service', - ], - 'libcapi-network-smartcard.so.0': [ - 'channel_close', - 'channel_close_sync', - 'channel_destroy_instance', - 'channel_get_select_response', - 'channel_get_select_response_length', - 'channel_get_session', - 'channel_get_transmit_response', - 'channel_is_basic_channel', - 'channel_is_closed', - 'channel_select_next', - 'channel_transmit', - 'channel_transmit_sync', - 'reader_close_sessions', - 'reader_destroy_instance', - 'reader_get_name', - 'reader_get_se_service', - 'reader_is_secure_element_present', - 'reader_open_session', - 'reader_open_session_sync', - 'se_service_create_instance', - 'se_service_create_instance_sync', - 'se_service_create_instance_with_event_callback', - 'se_service_destroy_instance', - 'se_service_get_readers', - 'se_service_get_readers_count', - 'se_service_get_version', - 'se_service_is_connected', - 'se_service_set_event_handler', - 'se_service_shutdown', - 'se_service_unset_event_handler', - 'session_close', - 'session_close_channels', - 'session_close_sync', - 'session_destroy_instance', - 'session_get_atr', - 'session_get_atr_sync', - 'session_get_channel_count', - 'session_get_reader', - 'session_is_closed', - 'session_open_basic_channel', - 'session_open_basic_channel_sync', - 'session_open_logical_channel', - 'session_open_logical_channel_sync', - 'smartcard_channel_close', - 'smartcard_channel_get_select_response', - 'smartcard_channel_get_session', - 'smartcard_channel_is_basic_channel', - 'smartcard_channel_is_closed', - 'smartcard_channel_select_next', - 'smartcard_channel_transmit', - 'smartcard_channel_transmit_retrieve_response', - 'smartcard_deinitialize', - 'smartcard_get_readers', - 'smartcard_get_version', - 'smartcard_initialize', - 'smartcard_reader_close_sessions', - 'smartcard_reader_get_name', - 'smartcard_reader_is_secure_element_present', - 'smartcard_reader_open_session', - 'smartcard_reader_set_event_cb', - 'smartcard_reader_unset_event_cb', - 'smartcard_session_close', - 'smartcard_session_close_channels', - 'smartcard_session_get_atr', - 'smartcard_session_get_reader', - 'smartcard_session_is_closed', - 'smartcard_session_open_basic_channel', - 'smartcard_session_open_logical_channel', - ], - 'libcapi-network-wifi-manager.so.1': [ - 'net_wifi_flush_bss', - 'net_wifi_get_ap_auto_connect', - 'net_wifi_get_auto_connect_mode', - 'net_wifi_set_ap_auto_connect', - 'net_wifi_set_auto_connect_mode', - 'wifi_manager_activate', - 'wifi_manager_activate_with_wifi_picker_tested', - 'wifi_manager_add_vsie', - 'wifi_manager_ap_clone', - 'wifi_manager_ap_create', - 'wifi_manager_ap_destroy', - 'wifi_manager_ap_foreach_ipv6_address', - 'wifi_manager_ap_get_assoc_status_code', - 'wifi_manager_ap_get_auto_connect', - 'wifi_manager_ap_get_bssid', - 'wifi_manager_ap_get_connection_state', - 'wifi_manager_ap_get_dhcp_lease_duration', - 'wifi_manager_ap_get_dhcp_server_address', - 'wifi_manager_ap_get_disconnect_reason', - 'wifi_manager_ap_get_dns_address', - 'wifi_manager_ap_get_dns_config_type', - 'wifi_manager_ap_get_eap_auth_type', - 'wifi_manager_ap_get_eap_ca_cert_file', - 'wifi_manager_ap_get_eap_client_cert_file', - 'wifi_manager_ap_get_eap_passphrase', - 'wifi_manager_ap_get_eap_private_key_file', - 'wifi_manager_ap_get_eap_type', - 'wifi_manager_ap_get_encryption_type', - 'wifi_manager_ap_get_error_state', - 'wifi_manager_ap_get_essid', - 'wifi_manager_ap_get_frequency', - 'wifi_manager_ap_get_gateway_address', - 'wifi_manager_ap_get_ip_address', - 'wifi_manager_ap_get_ip_config_type', - 'wifi_manager_ap_get_max_speed', - 'wifi_manager_ap_get_prefix_length', - 'wifi_manager_ap_get_proxy_address', - 'wifi_manager_ap_get_proxy_type', - 'wifi_manager_ap_get_raw_ssid', - 'wifi_manager_ap_get_rssi', - 'wifi_manager_ap_get_rssi_level', - 'wifi_manager_ap_get_security_type', - 'wifi_manager_ap_get_subnet_mask', - 'wifi_manager_ap_get_vsie', - 'wifi_manager_ap_hidden_create', - 'wifi_manager_ap_is_favorite', - 'wifi_manager_ap_is_passphrase_required', - 'wifi_manager_ap_is_passpoint', - 'wifi_manager_ap_is_wps_supported', - 'wifi_manager_ap_refresh', - 'wifi_manager_ap_set_auto_connect', - 'wifi_manager_ap_set_dns_address', - 'wifi_manager_ap_set_dns_config_type', - 'wifi_manager_ap_set_eap_auth_type', - 'wifi_manager_ap_set_eap_ca_cert_file', - 'wifi_manager_ap_set_eap_client_cert_file', - 'wifi_manager_ap_set_eap_passphrase', - 'wifi_manager_ap_set_eap_private_key_info', - 'wifi_manager_ap_set_eap_type', - 'wifi_manager_ap_set_encryption_type', - 'wifi_manager_ap_set_gateway_address', - 'wifi_manager_ap_set_ip_address', - 'wifi_manager_ap_set_ip_config_type', - 'wifi_manager_ap_set_passphrase', - 'wifi_manager_ap_set_prefix_length', - 'wifi_manager_ap_set_proxy_address', - 'wifi_manager_ap_set_proxy_type', - 'wifi_manager_ap_set_security_type', - 'wifi_manager_ap_set_subnet_mask', - 'wifi_manager_bssid_scan', - 'wifi_manager_cancel_wps', - 'wifi_manager_config_clone', - 'wifi_manager_config_create', - 'wifi_manager_config_destroy', - 'wifi_manager_config_foreach_configuration', - 'wifi_manager_config_get_eap_anonymous_identity', - 'wifi_manager_config_get_eap_auth_type', - 'wifi_manager_config_get_eap_ca_cert_file', - 'wifi_manager_config_get_eap_client_cert_file', - 'wifi_manager_config_get_eap_identity', - 'wifi_manager_config_get_eap_subject_match', - 'wifi_manager_config_get_eap_type', - 'wifi_manager_config_get_hidden_ap_property', - 'wifi_manager_config_get_name', - 'wifi_manager_config_get_proxy_address', - 'wifi_manager_config_get_security_type', - 'wifi_manager_config_remove', - 'wifi_manager_config_save', - 'wifi_manager_config_set_eap_anonymous_identity', - 'wifi_manager_config_set_eap_auth_type', - 'wifi_manager_config_set_eap_ca_cert_file', - 'wifi_manager_config_set_eap_client_cert_file', - 'wifi_manager_config_set_eap_identity', - 'wifi_manager_config_set_eap_subject_match', - 'wifi_manager_config_set_eap_type', - 'wifi_manager_config_set_hidden_ap_property', - 'wifi_manager_config_set_proxy_address', - 'wifi_manager_connect', - 'wifi_manager_connect_by_wps_pbc', - 'wifi_manager_connect_by_wps_pbc_without_ssid', - 'wifi_manager_connect_by_wps_pin', - 'wifi_manager_connect_by_wps_pin_without_ssid', - 'wifi_manager_connect_hidden_ap', - 'wifi_manager_deactivate', - 'wifi_manager_deinitialize', - 'wifi_manager_disconnect', - 'wifi_manager_flush_bss', - 'wifi_manager_foreach_found_ap', - 'wifi_manager_foreach_found_bssid_ap', - 'wifi_manager_foreach_found_netlink_scan_ap', - 'wifi_manager_foreach_found_specific_ap', - 'wifi_manager_forget_ap', - 'wifi_manager_get_auto_connect', - 'wifi_manager_get_autoscan', - 'wifi_manager_get_autoscan_mode', - 'wifi_manager_get_connected_ap', - 'wifi_manager_get_connection_state', - 'wifi_manager_get_ip_conflict_period', - 'wifi_manager_get_ip_conflict_state', - 'wifi_manager_get_mac_address', - 'wifi_manager_get_module_state', - 'wifi_manager_get_network_interface_name', - 'wifi_manager_get_passpoint', - 'wifi_manager_get_scan_state', - 'wifi_manager_get_vsie', - 'wifi_manager_initialize', - 'wifi_manager_ip_conflict_detect_is_enabled', - 'wifi_manager_is_activated', - 'wifi_manager_netlink_scan', - 'wifi_manager_netlink_scan_create', - 'wifi_manager_netlink_scan_destroy', - 'wifi_manager_netlink_scan_set_ssid', - 'wifi_manager_netlink_scan_set_vsie', - 'wifi_manager_remove_vsie', - 'wifi_manager_scan', - 'wifi_manager_scan_specific_ap', - 'wifi_manager_set_auto_connect', - 'wifi_manager_set_autoscan', - 'wifi_manager_set_autoscan_mode', - 'wifi_manager_set_background_scan_cb', - 'wifi_manager_set_connection_state_changed_cb', - 'wifi_manager_set_device_state_changed_cb', - 'wifi_manager_set_ip_conflict_cb', - 'wifi_manager_set_ip_conflict_detect_enable', - 'wifi_manager_set_ip_conflict_period', - 'wifi_manager_set_module_state_changed_cb', - 'wifi_manager_set_passpoint', - 'wifi_manager_set_rssi_level_changed_cb', - 'wifi_manager_set_scan_state_changed_cb', - 'wifi_manager_specific_ap_start_multi_scan', - 'wifi_manager_specific_scan_create', - 'wifi_manager_specific_scan_destroy', - 'wifi_manager_specific_scan_set_freq', - 'wifi_manager_specific_scan_set_ssid', - 'wifi_manager_tdls_connect', - 'wifi_manager_tdls_disable_channel_switching', - 'wifi_manager_tdls_disconnect', - 'wifi_manager_tdls_enable_channel_switching', - 'wifi_manager_tdls_get_connected_peer', - 'wifi_manager_tdls_set_discovered_cb', - 'wifi_manager_tdls_set_state_changed_cb', - 'wifi_manager_tdls_start_discovery', - 'wifi_manager_tdls_unset_discovered_cb', - 'wifi_manager_tdls_unset_state_changed_cb', - 'wifi_manager_unset_background_scan_cb', - 'wifi_manager_unset_connection_state_changed_cb', - 'wifi_manager_unset_device_state_changed_cb', - 'wifi_manager_unset_ip_conflict_cb', - 'wifi_manager_unset_module_state_changed_cb', - 'wifi_manager_unset_rssi_level_changed_cb', - 'wifi_manager_unset_scan_state_changed_cb', - 'wifi_manager_update_ap', - ], - 'libcsr-client.so.2': [ - 'csr_cs_cancel_scanning', - 'csr_cs_context_create', - 'csr_cs_context_destroy', - 'csr_cs_get_detected_malware', - 'csr_cs_get_detected_malwares', - 'csr_cs_get_ignored_malware', - 'csr_cs_get_ignored_malwares', - 'csr_cs_judge_detected_malware', - 'csr_cs_malware_get_detailed_url', - 'csr_cs_malware_get_file_name', - 'csr_cs_malware_get_name', - 'csr_cs_malware_get_pkg_id', - 'csr_cs_malware_get_severity', - 'csr_cs_malware_get_timestamp', - 'csr_cs_malware_get_user_response', - 'csr_cs_malware_is_app', - 'csr_cs_malware_list_get_malware', - 'csr_cs_scan_data', - 'csr_cs_scan_dir_async', - 'csr_cs_scan_dirs_async', - 'csr_cs_scan_file', - 'csr_cs_scan_files_async', - 'csr_cs_set_ask_user', - 'csr_cs_set_cancelled_cb', - 'csr_cs_set_completed_cb', - 'csr_cs_set_core_usage', - 'csr_cs_set_detected_cb', - 'csr_cs_set_error_cb', - 'csr_cs_set_file_scanned_cb', - 'csr_cs_set_popup_message', - 'csr_cs_set_scan_on_cloud', - 'csr_engine_destroy', - 'csr_engine_get_activated', - 'csr_engine_get_data_version', - 'csr_engine_get_latest_update_time', - 'csr_engine_get_name', - 'csr_engine_get_state', - 'csr_engine_get_vendor', - 'csr_engine_get_version', - 'csr_engine_set_state', - 'csr_get_current_engine', - 'csr_wp_check_url', - 'csr_wp_context_create', - 'csr_wp_context_destroy', - 'csr_wp_result_get_detailed_url', - 'csr_wp_result_get_risk_level', - 'csr_wp_result_get_user_response', - 'csr_wp_set_ask_user', - 'csr_wp_set_popup_message', - ], - 'libdpm.so.0': [ - 'dpm_add_policy_changed_cb', - 'dpm_add_signal_cb', - 'dpm_admin_deregister_client', - 'dpm_admin_register_client', - 'dpm_application_add_privilege_to_blacklist', - 'dpm_application_check_privilege_is_blacklisted', - 'dpm_application_get_mode_restriction', - 'dpm_application_install_package', - 'dpm_application_remove_privilege_from_blacklist', - 'dpm_application_set_mode_restriction', - 'dpm_application_uninstall_package', - 'dpm_application_unset_mode_restriction', - 'dpm_bluetooth_add_device_to_blacklist', - 'dpm_bluetooth_add_uuid_to_blacklist', - 'dpm_bluetooth_is_device_restricted', - 'dpm_bluetooth_is_uuid_restricted', - 'dpm_bluetooth_remove_device_from_blacklist', - 'dpm_bluetooth_remove_uuid_from_blacklist', - 'dpm_bluetooth_set_device_restriction', - 'dpm_bluetooth_set_uuid_restriction', - 'dpm_manager_create', - 'dpm_manager_destroy', - 'dpm_password_create_iterator', - 'dpm_password_delete_pattern', - 'dpm_password_destroy_iterator', - 'dpm_password_enforce_change', - 'dpm_password_get_expires', - 'dpm_password_get_history', - 'dpm_password_get_maximum_character_occurrences', - 'dpm_password_get_maximum_failed_attempts_for_wipe', - 'dpm_password_get_maximum_numeric_sequence_length', - 'dpm_password_get_max_inactivity_time_device_lock', - 'dpm_password_get_min_complex_chars', - 'dpm_password_get_minimum_length', - 'dpm_password_get_pattern', - 'dpm_password_get_quality', - 'dpm_password_get_recovery', - 'dpm_password_get_status', - 'dpm_password_iterator_next', - 'dpm_password_reset', - 'dpm_password_set_expires', - 'dpm_password_set_forbidden_strings', - 'dpm_password_set_history', - 'dpm_password_set_maximum_character_occurrences', - 'dpm_password_set_maximum_failed_attempts_for_wipe', - 'dpm_password_set_maximum_numeric_sequence_length', - 'dpm_password_set_max_inactivity_time_device_lock', - 'dpm_password_set_min_complex_chars', - 'dpm_password_set_minimum_length', - 'dpm_password_set_pattern', - 'dpm_password_set_quality', - 'dpm_password_set_recovery', - 'dpm_password_set_status', - 'dpm_remove_policy_changed_cb', - 'dpm_remove_signal_cb', - 'dpm_restriction_get_bluetooth_desktop_connectivity_state', - 'dpm_restriction_get_bluetooth_mode_change_state', - 'dpm_restriction_get_bluetooth_pairing_state', - 'dpm_restriction_get_bluetooth_tethering_state', - 'dpm_restriction_get_browser_state', - 'dpm_restriction_get_camera_state', - 'dpm_restriction_get_clipboard_state', - 'dpm_restriction_get_external_storage_state', - 'dpm_restriction_get_location_state', - 'dpm_restriction_get_messaging_state', - 'dpm_restriction_get_microphone_state', - 'dpm_restriction_get_popimap_email_state', - 'dpm_restriction_get_usb_client_state', - 'dpm_restriction_get_usb_debugging_state', - 'dpm_restriction_get_usb_tethering_state', - 'dpm_restriction_get_wifi_hotspot_state', - 'dpm_restriction_get_wifi_state', - 'dpm_restriction_set_bluetooth_desktop_connectivity_state', - 'dpm_restriction_set_bluetooth_mode_change_state', - 'dpm_restriction_set_bluetooth_pairing_state', - 'dpm_restriction_set_bluetooth_tethering_state', - 'dpm_restriction_set_browser_state', - 'dpm_restriction_set_camera_state', - 'dpm_restriction_set_clipboard_state', - 'dpm_restriction_set_external_storage_state', - 'dpm_restriction_set_location_state', - 'dpm_restriction_set_messaging_state', - 'dpm_restriction_set_microphone_state', - 'dpm_restriction_set_popimap_email_state', - 'dpm_restriction_set_usb_client_state', - 'dpm_restriction_set_usb_debugging_state', - 'dpm_restriction_set_usb_tethering_state', - 'dpm_restriction_set_wifi_hotspot_state', - 'dpm_restriction_set_wifi_state', - 'dpm_security_is_external_storage_encrypted', - 'dpm_security_is_internal_storage_encrypted', - 'dpm_security_lockout_screen', - 'dpm_security_set_external_storage_encryption', - 'dpm_security_set_internal_storage_encryption', - 'dpm_security_wipe_data', - 'dpm_wifi_add_ssid_to_blocklist', - 'dpm_wifi_is_network_access_restricted', - 'dpm_wifi_is_profile_change_restricted', - 'dpm_wifi_remove_ssid_from_blocklist', - 'dpm_wifi_set_network_access_restriction', - 'dpm_wifi_set_profile_change_restriction', - 'dpm_zone_create', - 'dpm_zone_destroy', - 'dpm_zone_foreach_name', - 'dpm_zone_get_state', - ], - 'libkey-manager-client.so.1': [ - 'ckmc_alias_list_add', - 'ckmc_alias_list_all_free', - 'ckmc_alias_list_free', - 'ckmc_alias_list_new', - 'ckmc_alias_new', - 'ckmc_allow_access', - 'ckmc_buffer_free', - 'ckmc_buffer_new', - 'ckmc_cert_free', - 'ckmc_cert_list_add', - 'ckmc_cert_list_all_free', - 'ckmc_cert_list_free', - 'ckmc_cert_list_new', - 'ckmc_cert_new', - 'ckmc_create_key_aes', - 'ckmc_create_key_pair_dsa', - 'ckmc_create_key_pair_ecdsa', - 'ckmc_create_key_pair_rsa', - 'ckmc_create_signature', - 'ckmc_decrypt_data', - 'ckmc_deny_access', - 'ckmc_encrypt_data', - 'ckmc_generate_new_params', - 'ckmc_get_cert', - 'ckmc_get_cert_alias_list', - 'ckmc_get_cert_chain', - 'ckmc_get_cert_chain_with_alias', - 'ckmc_get_cert_chain_with_trustedcert', - 'ckmc_get_data', - 'ckmc_get_data_alias_list', - 'ckmc_get_key', - 'ckmc_get_key_alias_list', - 'ckmc_get_pkcs12', - 'ckmc_key_free', - 'ckmc_key_new', - 'ckmc_load_cert_from_file', - 'ckmc_load_from_pkcs12_file', - 'ckmc_ocsp_check', - 'ckmc_param_list_free', - 'ckmc_param_list_get_buffer', - 'ckmc_param_list_get_integer', - 'ckmc_param_list_new', - 'ckmc_param_list_set_buffer', - 'ckmc_param_list_set_integer', - 'ckmc_pkcs12_free', - 'ckmc_pkcs12_load', - 'ckmc_pkcs12_new', - 'ckmc_remove_alias', - 'ckmc_remove_cert', - 'ckmc_remove_data', - 'ckmc_remove_key', - 'ckmc_save_cert', - 'ckmc_save_data', - 'ckmc_save_key', - 'ckmc_save_pkcs12', - 'ckmc_set_permission', - 'ckmc_verify_signature', - ], - 'libcapi-privacy-privilege-manager.so.0': [ - 'ppm_check_permission', - 'ppm_request_permission', - ], - 'libprivilege-info.so.1': [ - 'privilege_info_get_description', - 'privilege_info_get_description_by_pkgtype', - 'privilege_info_get_display_name', - 'privilege_info_get_display_name_by_pkgtype', - 'privilege_info_get_privacy_display_name', - 'privilege_info_get_privacy_privilege_status', - ], - 'libyaca.so.0': [ - 'yaca_cleanup', - 'yaca_context_destroy', - 'yaca_context_get_output_length', - 'yaca_context_get_property', - 'yaca_context_set_property', - 'yaca_debug_set_error_cb', - 'yaca_debug_translate_error', - 'yaca_decrypt_finalize', - 'yaca_decrypt_initialize', - 'yaca_decrypt_update', - 'yaca_digest_finalize', - 'yaca_digest_initialize', - 'yaca_digest_update', - 'yaca_encrypt_finalize', - 'yaca_encrypt_get_iv_bit_length', - 'yaca_encrypt_initialize', - 'yaca_encrypt_update', - 'yaca_free', - 'yaca_initialize', - 'yaca_key_derive_dh', - 'yaca_key_derive_kdf', - 'yaca_key_derive_pbkdf2', - 'yaca_key_destroy', - 'yaca_key_export', - 'yaca_key_extract_parameters', - 'yaca_key_extract_public', - 'yaca_key_generate', - 'yaca_key_generate_from_parameters', - 'yaca_key_get_bit_length', - 'yaca_key_get_type', - 'yaca_key_import', - 'yaca_malloc', - 'yaca_memcmp', - 'yaca_open_finalize', - 'yaca_open_initialize', - 'yaca_open_update', - 'yaca_randomize_bytes', - 'yaca_realloc', - 'yaca_rsa_private_decrypt', - 'yaca_rsa_private_encrypt', - 'yaca_rsa_public_decrypt', - 'yaca_rsa_public_encrypt', - 'yaca_seal_finalize', - 'yaca_seal_initialize', - 'yaca_seal_update', - 'yaca_sign_finalize', - 'yaca_sign_initialize', - 'yaca_sign_initialize_cmac', - 'yaca_sign_initialize_hmac', - 'yaca_sign_update', - 'yaca_simple_calculate_cmac', - 'yaca_simple_calculate_digest', - 'yaca_simple_calculate_hmac', - 'yaca_simple_calculate_signature', - 'yaca_simple_decrypt', - 'yaca_simple_encrypt', - 'yaca_simple_verify_signature', - 'yaca_verify_finalize', - 'yaca_verify_initialize', - 'yaca_verify_update', - 'yaca_zalloc', - ], - 'libcalendar-service2.so.0': [ - 'calendar_connect', - 'calendar_connect_on_thread', - 'calendar_connect_with_flags', - 'calendar_db_add_changed_cb', - 'calendar_db_clean_after_sync', - 'calendar_db_delete_record', - 'calendar_db_delete_records', - 'calendar_db_get_all_records', - 'calendar_db_get_changes_by_version', - 'calendar_db_get_changes_exception_by_version', - 'calendar_db_get_count', - 'calendar_db_get_count_with_query', - 'calendar_db_get_current_version', - 'calendar_db_get_last_change_version', - 'calendar_db_get_record', - 'calendar_db_get_records_with_query', - 'calendar_db_insert_record', - 'calendar_db_insert_records', - 'calendar_db_insert_vcalendars', - 'calendar_db_link_record', - 'calendar_db_remove_changed_cb', - 'calendar_db_replace_record', - 'calendar_db_replace_records', - 'calendar_db_replace_vcalendars', - 'calendar_db_unlink_record', - 'calendar_db_update_record', - 'calendar_db_update_records', - 'calendar_disconnect', - 'calendar_disconnect_on_thread', - 'calendar_filter_add_caltime', - 'calendar_filter_add_double', - 'calendar_filter_add_filter', - 'calendar_filter_add_int', - 'calendar_filter_add_lli', - 'calendar_filter_add_operator', - 'calendar_filter_add_str', - 'calendar_filter_create', - 'calendar_filter_destroy', - 'calendar_list_add', - 'calendar_list_create', - 'calendar_list_destroy', - 'calendar_list_first', - 'calendar_list_get_count', - 'calendar_list_get_current_record_p', - 'calendar_list_last', - 'calendar_list_next', - 'calendar_list_prev', - 'calendar_list_remove', - 'calendar_query_create', - 'calendar_query_destroy', - 'calendar_query_set_distinct', - 'calendar_query_set_filter', - 'calendar_query_set_projection', - 'calendar_query_set_sort', - 'calendar_record_add_child_record', - 'calendar_record_clone', - 'calendar_record_clone_child_record_list', - 'calendar_record_create', - 'calendar_record_destroy', - 'calendar_record_get_caltime', - 'calendar_record_get_child_record_at_p', - 'calendar_record_get_child_record_count', - 'calendar_record_get_double', - 'calendar_record_get_int', - 'calendar_record_get_lli', - 'calendar_record_get_str', - 'calendar_record_get_str_p', - 'calendar_record_get_uri_p', - 'calendar_record_remove_child_record', - 'calendar_record_set_caltime', - 'calendar_record_set_double', - 'calendar_record_set_int', - 'calendar_record_set_lli', - 'calendar_record_set_str', - 'calendar_reminder_add_cb', - 'calendar_reminder_remove_cb', - 'calendar_vcalendar_make_from_records', - 'calendar_vcalendar_parse_to_calendar', - 'calendar_vcalendar_parse_to_calendar_foreach', - ], - 'libcontacts-service2.so.0': [ - 'contacts_activity_delete_by_account_id', - 'contacts_activity_delete_by_contact_id', - 'contacts_connect', - 'contacts_connect_on_thread', - 'contacts_connect_with_flags', - 'contacts_db_add_changed_cb', - 'contacts_db_add_changed_cb_with_info', - 'contacts_db_add_status_changed_cb', - 'contacts_db_delete_record', - 'contacts_db_delete_records', - 'contacts_db_get_all_records', - 'contacts_db_get_changes_by_version', - 'contacts_db_get_count', - 'contacts_db_get_count_with_query', - 'contacts_db_get_current_version', - 'contacts_db_get_last_change_version', - 'contacts_db_get_record', - 'contacts_db_get_records_with_query', - 'contacts_db_get_status', - 'contacts_db_insert_record', - 'contacts_db_insert_records', - 'contacts_db_remove_changed_cb', - 'contacts_db_remove_changed_cb_with_info', - 'contacts_db_remove_status_changed_cb', - 'contacts_db_replace_record', - 'contacts_db_replace_records', - 'contacts_db_search_records', - 'contacts_db_search_records_for_snippet', - 'contacts_db_search_records_with_query', - 'contacts_db_search_records_with_query_for_snippet', - 'contacts_db_search_records_with_range', - 'contacts_db_search_records_with_range_for_snippet', - 'contacts_db_update_record', - 'contacts_db_update_records', - 'contacts_disconnect', - 'contacts_disconnect_on_thread', - 'contacts_filter_add_bool', - 'contacts_filter_add_double', - 'contacts_filter_add_filter', - 'contacts_filter_add_int', - 'contacts_filter_add_lli', - 'contacts_filter_add_operator', - 'contacts_filter_add_str', - 'contacts_filter_create', - 'contacts_filter_destroy', - 'contacts_group_add_contact', - 'contacts_group_remove_contact', - 'contacts_group_set_group_order', - 'contacts_list_add', - 'contacts_list_create', - 'contacts_list_destroy', - 'contacts_list_first', - 'contacts_list_get_count', - 'contacts_list_get_current_record_p', - 'contacts_list_last', - 'contacts_list_next', - 'contacts_list_prev', - 'contacts_list_remove', - 'contacts_person_get_aggregation_suggestions', - 'contacts_person_get_default_property', - 'contacts_person_link_person', - 'contacts_person_reset_usage', - 'contacts_person_set_default_property', - 'contacts_person_set_favorite_order', - 'contacts_person_unlink_contact', - 'contacts_phone_log_delete', - 'contacts_phone_log_reset_statistics', - 'contacts_phone_log_reset_statistics_by_sim', - 'contacts_query_create', - 'contacts_query_destroy', - 'contacts_query_set_distinct', - 'contacts_query_set_filter', - 'contacts_query_set_projection', - 'contacts_query_set_sort', - 'contacts_record_add_child_record', - 'contacts_record_clone', - 'contacts_record_clone_child_record_list', - 'contacts_record_create', - 'contacts_record_destroy', - 'contacts_record_get_bool', - 'contacts_record_get_child_record_at_p', - 'contacts_record_get_child_record_count', - 'contacts_record_get_double', - 'contacts_record_get_int', - 'contacts_record_get_lli', - 'contacts_record_get_str', - 'contacts_record_get_str_p', - 'contacts_record_get_uri_p', - 'contacts_record_remove_child_record', - 'contacts_record_set_bool', - 'contacts_record_set_double', - 'contacts_record_set_int', - 'contacts_record_set_lli', - 'contacts_record_set_str', - 'contacts_setting_add_name_display_order_changed_cb', - 'contacts_setting_add_name_sorting_order_changed_cb', - 'contacts_setting_get_name_display_order', - 'contacts_setting_get_name_sorting_order', - 'contacts_setting_remove_name_display_order_changed_cb', - 'contacts_setting_remove_name_sorting_order_changed_cb', - 'contacts_setting_set_name_display_order', - 'contacts_setting_set_name_sorting_order', - 'contacts_sim_get_initialization_status', - 'contacts_sim_get_initialization_status_by_sim_slot_no', - 'contacts_sim_import_all_contacts', - 'contacts_sim_import_all_contacts_by_sim_slot_no', - 'contacts_vcard_get_entity_count', - 'contacts_vcard_get_limit_size_of_photo', - 'contacts_vcard_make_from_contact', - 'contacts_vcard_make_from_my_profile', - 'contacts_vcard_make_from_person', - 'contacts_vcard_parse_to_contact_foreach', - 'contacts_vcard_parse_to_contacts', - 'contacts_vcard_set_limit_size_of_photo', - ], - 'libphonenumber-utils.so.0': [ - 'phone_number_add_blocking_rule', - 'phone_number_blocking_rule_create', - 'phone_number_blocking_rule_destroy', - 'phone_number_blocking_rule_get_match_type', - 'phone_number_blocking_rule_get_number', - 'phone_number_blocking_rule_set_match_type', - 'phone_number_blocking_rule_set_number', - 'phone_number_check_blocking', - 'phone_number_connect', - 'phone_number_disconnect', - 'phone_number_get_blocking_rules', - 'phone_number_get_blocking_rules_related', - 'phone_number_get_formatted_number', - 'phone_number_get_location_from_number', - 'phone_number_get_normalized_number', - 'phone_number_remove_blocking_rule', - ], - 'libcapi-system-device.so.0': [ - 'config_parse', - 'dbus_method_async_with_reply', - 'dbus_method_sync', - 'dbus_method_sync_with_reply', - 'device_add_callback', - 'device_battery_get_health', - 'device_battery_get_level_status', - 'device_battery_get_percent', - 'device_battery_get_power_source', - 'device_battery_get_property', - 'device_battery_get_status', - 'device_battery_is_charging', - 'device_display_change_state', - 'device_display_get_brightness', - 'device_display_get_max_brightness', - 'device_display_get_numbers', - 'device_display_get_state', - 'device_display_set_brightness', - 'device_flash_get_brightness', - 'device_flash_get_max_brightness', - 'device_flash_set_brightness', - 'device_get_brightness', - 'device_get_display_numbers', - 'device_get_max_brightness', - 'device_haptic_close', - 'device_haptic_get_count', - 'device_haptic_open', - 'device_haptic_stop', - 'device_haptic_vibrate', - 'device_ir_is_available', - 'device_ir_transmit', - 'device_led_play_custom', - 'device_led_stop_custom', - 'device_memory_get_available', - 'device_memory_get_total', - 'device_power_reboot', - 'device_power_release_lock', - 'device_power_request_lock', - 'device_power_wakeup', - 'device_remove_callback', - 'device_set_brightness', - 'device_set_brightness_from_settings', - 'device_set_brightness_to_settings', - 'register_signal_handler', - 'restart_callback', - 'unregister_signal_handler', - ], - 'libdlog.so.0': [ - 'add_recv_timestamp', - 'connect_sock', - 'create_glued_string', - 'create_pipe_message', - 'dlog_print', - 'dlog_vprint', - 'log_config_foreach', - 'log_config_free', - 'log_config_get', - 'log_config_get_boolean', - 'log_config_get_int', - 'log_config_print_key', - 'log_config_print_out', - 'log_config_read', - 'log_config_read_file', - 'log_config_remove', - 'log_config_set', - 'log_config_write', - 'log_id_by_name', - 'log_name_by_id', - 'parse_androidlogger_message', - 'parse_kmsg_message', - 'parse_syslog_datagram', - 'recv_pipe', - 'send_pipe', - 'str_ends_with', - 'syslog_critical_failure', - ], - 'libfeedback.so.0': [ - 'feedback_deinitialize', - 'feedback_get_resource_path', - 'feedback_initialize', - 'feedback_is_supported_pattern', - 'feedback_play', - 'feedback_play_internal', - 'feedback_play_type', - 'feedback_play_type_by_name', - 'feedback_play_type_internal', - 'feedback_set_resource_path', - 'feedback_stop', - ], - 'libcapi-system-media-key.so.0': [ - 'media_key_release', - 'media_key_reserve', - ], - 'libcapi-system-peripheral-io.so.0': [ - 'peripheral_gdbus_gpio_close', - 'peripheral_gdbus_gpio_open', - 'peripheral_gdbus_i2c_close', - 'peripheral_gdbus_i2c_open', - 'peripheral_gdbus_pwm_close', - 'peripheral_gdbus_pwm_open', - 'peripheral_gdbus_spi_close', - 'peripheral_gdbus_spi_open', - 'peripheral_gdbus_uart_close', - 'peripheral_gdbus_uart_open', - 'peripheral_gpio_close', - 'peripheral_gpio_open', - 'peripheral_gpio_read', - 'peripheral_gpio_set_direction', - 'peripheral_gpio_set_edge_mode', - 'peripheral_gpio_set_interrupted_cb', - 'peripheral_gpio_unset_interrupted_cb', - 'peripheral_gpio_write', - 'peripheral_i2c_close', - 'peripheral_i2c_open', - 'peripheral_i2c_read', - 'peripheral_i2c_read_register_byte', - 'peripheral_i2c_read_register_word', - 'peripheral_i2c_write', - 'peripheral_i2c_write_register_byte', - 'peripheral_i2c_write_register_word', - 'peripheral_interface_gpio_close', - 'peripheral_interface_gpio_read', - 'peripheral_interface_gpio_set_direction', - 'peripheral_interface_gpio_set_edge_mode', - 'peripheral_interface_gpio_set_initial_direction_into_handle', - 'peripheral_interface_gpio_set_initial_edge_into_handle', - 'peripheral_interface_gpio_set_interrupted_cb', - 'peripheral_interface_gpio_unset_interrupted_cb', - 'peripheral_interface_gpio_write', - 'peripheral_interface_i2c_close', - 'peripheral_interface_i2c_read', - 'peripheral_interface_i2c_read_register_byte', - 'peripheral_interface_i2c_read_register_word', - 'peripheral_interface_i2c_write', - 'peripheral_interface_i2c_write_register_byte', - 'peripheral_interface_i2c_write_register_word', - 'peripheral_interface_pwm_close', - 'peripheral_interface_pwm_set_duty_cycle', - 'peripheral_interface_pwm_set_enable', - 'peripheral_interface_pwm_set_period', - 'peripheral_interface_pwm_set_polarity', - 'peripheral_interface_spi_close', - 'peripheral_interface_spi_read', - 'peripheral_interface_spi_set_bit_order', - 'peripheral_interface_spi_set_bits_per_word', - 'peripheral_interface_spi_set_frequency', - 'peripheral_interface_spi_set_mode', - 'peripheral_interface_spi_transfer', - 'peripheral_interface_spi_write', - 'peripheral_interface_uart_close', - 'peripheral_interface_uart_flush', - 'peripheral_interface_uart_read', - 'peripheral_interface_uart_set_baud_rate', - 'peripheral_interface_uart_set_byte_size', - 'peripheral_interface_uart_set_flow_control', - 'peripheral_interface_uart_set_parity', - 'peripheral_interface_uart_set_stop_bits', - 'peripheral_interface_uart_write', - 'peripheral_io_gdbus_gpio_call_close', - 'peripheral_io_gdbus_gpio_call_close_finish', - 'peripheral_io_gdbus_gpio_call_close_sync', - 'peripheral_io_gdbus_gpio_call_open', - 'peripheral_io_gdbus_gpio_call_open_finish', - 'peripheral_io_gdbus_gpio_call_open_sync', - 'peripheral_io_gdbus_gpio_complete_close', - 'peripheral_io_gdbus_gpio_complete_open', - 'peripheral_io_gdbus_gpio_get_type', - 'peripheral_io_gdbus_gpio_interface_info', - 'peripheral_io_gdbus_gpio_override_properties', - 'peripheral_io_gdbus_gpio_proxy_get_type', - 'peripheral_io_gdbus_gpio_proxy_new', - 'peripheral_io_gdbus_gpio_proxy_new_finish', - 'peripheral_io_gdbus_gpio_proxy_new_for_bus', - 'peripheral_io_gdbus_gpio_proxy_new_for_bus_finish', - 'peripheral_io_gdbus_gpio_proxy_new_for_bus_sync', - 'peripheral_io_gdbus_gpio_proxy_new_sync', - 'peripheral_io_gdbus_gpio_skeleton_get_type', - 'peripheral_io_gdbus_gpio_skeleton_new', - 'peripheral_io_gdbus_i2c_call_close', - 'peripheral_io_gdbus_i2c_call_close_finish', - 'peripheral_io_gdbus_i2c_call_close_sync', - 'peripheral_io_gdbus_i2c_call_open', - 'peripheral_io_gdbus_i2c_call_open_finish', - 'peripheral_io_gdbus_i2c_call_open_sync', - 'peripheral_io_gdbus_i2c_complete_close', - 'peripheral_io_gdbus_i2c_complete_open', - 'peripheral_io_gdbus_i2c_get_type', - 'peripheral_io_gdbus_i2c_interface_info', - 'peripheral_io_gdbus_i2c_override_properties', - 'peripheral_io_gdbus_i2c_proxy_get_type', - 'peripheral_io_gdbus_i2c_proxy_new', - 'peripheral_io_gdbus_i2c_proxy_new_finish', - 'peripheral_io_gdbus_i2c_proxy_new_for_bus', - 'peripheral_io_gdbus_i2c_proxy_new_for_bus_finish', - 'peripheral_io_gdbus_i2c_proxy_new_for_bus_sync', - 'peripheral_io_gdbus_i2c_proxy_new_sync', - 'peripheral_io_gdbus_i2c_skeleton_get_type', - 'peripheral_io_gdbus_i2c_skeleton_new', - 'peripheral_io_gdbus_pwm_call_close', - 'peripheral_io_gdbus_pwm_call_close_finish', - 'peripheral_io_gdbus_pwm_call_close_sync', - 'peripheral_io_gdbus_pwm_call_open', - 'peripheral_io_gdbus_pwm_call_open_finish', - 'peripheral_io_gdbus_pwm_call_open_sync', - 'peripheral_io_gdbus_pwm_complete_close', - 'peripheral_io_gdbus_pwm_complete_open', - 'peripheral_io_gdbus_pwm_get_type', - 'peripheral_io_gdbus_pwm_interface_info', - 'peripheral_io_gdbus_pwm_override_properties', - 'peripheral_io_gdbus_pwm_proxy_get_type', - 'peripheral_io_gdbus_pwm_proxy_new', - 'peripheral_io_gdbus_pwm_proxy_new_finish', - 'peripheral_io_gdbus_pwm_proxy_new_for_bus', - 'peripheral_io_gdbus_pwm_proxy_new_for_bus_finish', - 'peripheral_io_gdbus_pwm_proxy_new_for_bus_sync', - 'peripheral_io_gdbus_pwm_proxy_new_sync', - 'peripheral_io_gdbus_pwm_skeleton_get_type', - 'peripheral_io_gdbus_pwm_skeleton_new', - 'peripheral_io_gdbus_spi_call_close', - 'peripheral_io_gdbus_spi_call_close_finish', - 'peripheral_io_gdbus_spi_call_close_sync', - 'peripheral_io_gdbus_spi_call_open', - 'peripheral_io_gdbus_spi_call_open_finish', - 'peripheral_io_gdbus_spi_call_open_sync', - 'peripheral_io_gdbus_spi_complete_close', - 'peripheral_io_gdbus_spi_complete_open', - 'peripheral_io_gdbus_spi_get_type', - 'peripheral_io_gdbus_spi_interface_info', - 'peripheral_io_gdbus_spi_override_properties', - 'peripheral_io_gdbus_spi_proxy_get_type', - 'peripheral_io_gdbus_spi_proxy_new', - 'peripheral_io_gdbus_spi_proxy_new_finish', - 'peripheral_io_gdbus_spi_proxy_new_for_bus', - 'peripheral_io_gdbus_spi_proxy_new_for_bus_finish', - 'peripheral_io_gdbus_spi_proxy_new_for_bus_sync', - 'peripheral_io_gdbus_spi_proxy_new_sync', - 'peripheral_io_gdbus_spi_skeleton_get_type', - 'peripheral_io_gdbus_spi_skeleton_new', - 'peripheral_io_gdbus_uart_call_close', - 'peripheral_io_gdbus_uart_call_close_finish', - 'peripheral_io_gdbus_uart_call_close_sync', - 'peripheral_io_gdbus_uart_call_open', - 'peripheral_io_gdbus_uart_call_open_finish', - 'peripheral_io_gdbus_uart_call_open_sync', - 'peripheral_io_gdbus_uart_complete_close', - 'peripheral_io_gdbus_uart_complete_open', - 'peripheral_io_gdbus_uart_get_type', - 'peripheral_io_gdbus_uart_interface_info', - 'peripheral_io_gdbus_uart_override_properties', - 'peripheral_io_gdbus_uart_proxy_get_type', - 'peripheral_io_gdbus_uart_proxy_new', - 'peripheral_io_gdbus_uart_proxy_new_finish', - 'peripheral_io_gdbus_uart_proxy_new_for_bus', - 'peripheral_io_gdbus_uart_proxy_new_for_bus_finish', - 'peripheral_io_gdbus_uart_proxy_new_for_bus_sync', - 'peripheral_io_gdbus_uart_proxy_new_sync', - 'peripheral_io_gdbus_uart_skeleton_get_type', - 'peripheral_io_gdbus_uart_skeleton_new', - 'peripheral_pwm_close', - 'peripheral_pwm_open', - 'peripheral_pwm_set_duty_cycle', - 'peripheral_pwm_set_enabled', - 'peripheral_pwm_set_period', - 'peripheral_pwm_set_polarity', - 'peripheral_spi_close', - 'peripheral_spi_open', - 'peripheral_spi_read', - 'peripheral_spi_set_bit_order', - 'peripheral_spi_set_bits_per_word', - 'peripheral_spi_set_frequency', - 'peripheral_spi_set_mode', - 'peripheral_spi_transfer', - 'peripheral_spi_write', - 'peripheral_uart_close', - 'peripheral_uart_open', - 'peripheral_uart_read', - 'peripheral_uart_set_baud_rate', - 'peripheral_uart_set_byte_size', - 'peripheral_uart_set_flow_control', - 'peripheral_uart_set_parity', - 'peripheral_uart_set_stop_bits', - 'peripheral_uart_write', - ], - 'libcapi-system-runtime-info.so.0': [ - 'runtime_info_app_usage_destroy', - 'runtime_info_app_usage_get_appid', - 'runtime_info_app_usage_get_count', - 'runtime_info_app_usage_get_usage', - 'runtime_info_get_all_apps_cpu_rate', - 'runtime_info_get_all_apps_memory_usage', - 'runtime_info_get_cpu_usage', - 'runtime_info_get_physical_memory_size', - 'runtime_info_get_process_cpu_usage', - 'runtime_info_get_process_memory_info', - 'runtime_info_get_processor_count', - 'runtime_info_get_processor_current_frequency', - 'runtime_info_get_processor_max_frequency', - 'runtime_info_get_system_memory_info', - 'runtime_info_get_value_bool', - 'runtime_info_get_value_double', - 'runtime_info_get_value_int', - 'runtime_info_get_value_string', - 'runtime_info_set_changed_cb', - 'runtime_info_unset_changed_cb', - ], - 'libcapi-system-sensor.so.0': [ - 'clamp', - 'getAngleChange', - 'getDeclination', - 'getInclination', - 'getRotationMatrix', - 'matrixToQuat', - 'quatToMatrix', - 'remapCoordinateSystem', - 'sensor_add_provider', - 'sensor_add_sensor_added_cb', - 'sensor_add_sensor_removed_cb', - 'sensor_create_listener', - 'sensor_create_provider', - 'sensor_destroy_listener', - 'sensor_destroy_provider', - 'sensor_get_default_sensor', - 'sensor_get_default_sensor_by_uri', - 'sensor_get_fifo_count', - 'sensor_get_max_batch_count', - 'sensor_get_max_range', - 'sensor_get_min_interval', - 'sensor_get_min_range', - 'sensor_get_name', - 'sensor_get_resolution', - 'sensor_get_sensor_list', - 'sensor_get_sensor_list_by_uri', - 'sensor_get_type', - 'sensor_get_uri', - 'sensor_get_vendor', - 'sensor_is_supported', - 'sensor_is_supported_by_uri', - 'sensor_is_wake_up', - 'sensor_listener_read_data', - 'sensor_listener_set_accuracy_cb', - 'sensor_listener_set_attribute_int', - 'sensor_listener_set_event_cb', - 'sensor_listener_set_interval', - 'sensor_listener_set_max_batch_latency', - 'sensor_listener_set_option', - 'sensor_listener_start', - 'sensor_listener_stop', - 'sensor_listener_unset_accuracy_cb', - 'sensor_listener_unset_event_cb', - 'sensor_provider_publish', - 'sensor_provider_set_interval_changed_cb', - 'sensor_provider_set_name', - 'sensor_provider_set_range', - 'sensor_provider_set_resolution', - 'sensor_provider_set_start_cb', - 'sensor_provider_set_stop_cb', - 'sensor_provider_set_vendor', - 'sensor_recorder_create_option', - 'sensor_recorder_create_query', - 'sensor_recorder_data_get_double', - 'sensor_recorder_data_get_int', - 'sensor_recorder_data_get_time', - 'sensor_recorder_destroy_option', - 'sensor_recorder_destroy_query', - 'sensor_recorder_is_supported', - 'sensor_recorder_option_set_int', - 'sensor_recorder_query_set_int', - 'sensor_recorder_query_set_time', - 'sensor_recorder_read', - 'sensor_recorder_read_sync', - 'sensor_recorder_start', - 'sensor_recorder_stop', - 'sensor_remove_provider', - 'sensor_remove_sensor_added_cb', - 'sensor_remove_sensor_removed_cb', - 'sensor_util_get_altitude', - 'sensor_util_get_angle_change', - 'sensor_util_get_declination', - 'sensor_util_get_inclination', - 'sensor_util_get_orientation', - 'sensor_util_get_rotation_matrix', - 'sensor_util_get_rotation_matrix_from_vector', - 'sensor_util_remap_coordinate_system', - 'setCoordinate', - ], - 'libstorage.so.0.1': [ - 'storage_foreach_device_supported', - 'storage_get_available_space', - 'storage_get_compat_internal_path', - 'storage_get_directory', - 'storage_get_external_memory_size', - 'storage_get_external_memory_size64', - 'storage_get_internal_memory_size', - 'storage_get_internal_memory_size64', - 'storage_get_origin_internal_path', - 'storage_get_primary_sdcard', - 'storage_get_root_directory', - 'storage_get_state', - 'storage_get_total_space', - 'storage_get_type', - 'storage_get_type_dev', - 'storage_set_changed_cb', - 'storage_set_state_changed_cb', - 'storage_unset_changed_cb', - 'storage_unset_state_changed_cb', - ], - 'libcapi-system-info.so.0': [ - 'system_info_get_custom_bool', - 'system_info_get_custom_double', - 'system_info_get_custom_int', - 'system_info_get_custom_string', - 'system_info_get_custom_type', - 'system_info_get_platform_bool', - 'system_info_get_platform_double', - 'system_info_get_platform_int', - 'system_info_get_platform_string', - 'system_info_get_platform_type', - 'system_info_get_value_bool', - 'system_info_get_value_double', - 'system_info_get_value_int', - 'system_info_get_value_string', - ], - 'libcapi-system-system-settings.so.0': [ - 'add_multi_callback', - 'alloc_multi_callback_node', - 'clean_node', - 'delete_multi_callback', - 'find_callback_node', - 'font_conf_doc_parse', - 'free_multi_callback_node', - 'get_filelist_from_dir_path', - 'get_filename_from_fullname', - 'get_media_basename', - 'invoke_callback_list', - 'ss_json_ringtone_add', - 'ss_json_ringtone_contain', - 'ss_json_ringtone_list', - 'ss_json_ringtone_load_from_data', - 'ss_json_ringtone_open_file', - 'ss_json_ringtone_print', - 'ss_json_ringtone_remove', - 'system_setting_add_incoming_call_ringtone', - 'system_setting_del_incoming_call_ringtone', - 'system_setting_feature_check_font', - 'system_setting_feature_check_home_screen', - 'system_setting_feature_check_incoming_call', - 'system_setting_feature_check_lock_screen', - 'system_setting_feature_check_notification_email', - 'system_setting_feature_check_telephony', - 'system_setting_feature_check_wifi', - 'system_setting_get_3g_data_network', - 'system_setting_get_accessibility_tts', - 'system_setting_get_ads_id', - 'system_setting_get_auto_rotation_mode', - 'system_setting_get_default_font_type', - 'system_setting_get_device_name', - 'system_setting_get_email_alert_ringtone', - 'system_setting_get_font_size', - 'system_setting_get_font_type', - 'system_setting_get_incoming_call_ringtone', - 'system_setting_get_locale_country', - 'system_setting_get_locale_language', - 'system_setting_get_locale_timeformat_24hour', - 'system_setting_get_locale_timezone', - 'system_setting_get_lockscreen_app', - 'system_setting_get_lock_state', - 'system_setting_get_motion_activation', - 'system_setting_get_network_flight_mode', - 'system_setting_get_network_wifi_notification', - 'system_setting_get_notification_repetition_period', - 'system_setting_get_screen_backlight_time', - 'system_setting_get_sound_lock', - 'system_setting_get_sound_notification', - 'system_setting_get_sound_silent_mode', - 'system_setting_get_sound_touch', - 'system_setting_get_time_changed', - 'system_setting_get_uds_state', - 'system_setting_get_usb_debugging_option', - 'system_setting_get_vibration', - 'system_setting_get_wallpaper_home_screen', - 'system_setting_get_wallpaper_lock_screen', - 'system_setting_list_incoming_call_ringtone', - 'system_settings_add_changed_cb', - 'system_settings_add_value', - 'system_settings_add_value_string', - 'system_settings_delete_value_string', - 'system_settings_del_value', - 'system_setting_set_3g_data_network', - 'system_setting_set_ads_id', - 'system_setting_set_auto_rotation_mode', - 'system_setting_set_changed_callback_3g_data_network', - 'system_setting_set_changed_callback_accessibility_tts', - 'system_setting_set_changed_callback_ads_id', - 'system_setting_set_changed_callback_auto_rotation_mode', - 'system_setting_set_changed_callback_device_name', - 'system_setting_set_changed_callback_email_alert_ringtone', - 'system_setting_set_changed_callback_font_size', - 'system_setting_set_changed_callback_font_type', - 'system_setting_set_changed_callback_incoming_call_ringtone', - 'system_setting_set_changed_callback_locale_country', - 'system_setting_set_changed_callback_locale_language', - 'system_setting_set_changed_callback_locale_timeformat_24hour', - 'system_setting_set_changed_callback_locale_timezone', - 'system_setting_set_changed_callback_locale_timezone_changed', - 'system_setting_set_changed_callback_lockscreen_app', - 'system_setting_set_changed_callback_lock_state', - 'system_setting_set_changed_callback_motion_activation', - 'system_setting_set_changed_callback_network_flight_mode', - 'system_setting_set_changed_callback_network_wifi_notification', - 'system_setting_set_changed_callback_notification_repetition_period', - 'system_setting_set_changed_callback_screen_backlight_time', - 'system_setting_set_changed_callback_sound_lock', - 'system_setting_set_changed_callback_sound_notification', - 'system_setting_set_changed_callback_sound_silent_mode', - 'system_setting_set_changed_callback_sound_touch', - 'system_setting_set_changed_callback_time_changed', - 'system_setting_set_changed_callback_uds_pkg_list', - 'system_setting_set_changed_callback_uds_state', - 'system_setting_set_changed_callback_usb_debugging_option', - 'system_setting_set_changed_callback_vibration', - 'system_setting_set_changed_callback_wallpaper_home_screen', - 'system_setting_set_changed_callback_wallpaper_lock_screen', - 'system_setting_set_device_name', - 'system_setting_set_email_alert_ringtone', - 'system_setting_set_font_size', - 'system_setting_set_font_type', - 'system_setting_set_incoming_call_ringtone', - 'system_setting_set_locale_country', - 'system_setting_set_locale_language', - 'system_setting_set_locale_timeformat_24hour', - 'system_setting_set_locale_timezone', - 'system_setting_set_lockscreen_app', - 'system_setting_set_lock_state', - 'system_setting_set_motion_activation', - 'system_setting_set_notification_repetition_period', - 'system_setting_set_screen_backlight_time', - 'system_setting_set_sound_notification', - 'system_setting_set_sound_silent_mode', - 'system_setting_set_usb_debugging_option', - 'system_setting_set_vibration', - 'system_setting_set_wallpaper_home_screen', - 'system_setting_set_wallpaper_lock_screen', - 'system_settings_feature_check_bool', - 'system_settings_foreach_value_string', - 'system_settings_get_item', - 'system_settings_get_value', - 'system_settings_get_value_bool', - 'system_settings_get_value_int', - 'system_settings_get_value_string', - 'system_settings_list_value', - 'system_settings_remove_changed_cb', - 'system_settings_set_changed_cb', - 'system_settings_set_value', - 'system_settings_set_value_bool', - 'system_settings_set_value_int', - 'system_settings_set_value_string', - 'system_settings_unset_changed_cb', - 'system_settings_vconf_get_key_string', - 'system_setting_unset_changed_callback_3g_data_network', - 'system_setting_unset_changed_callback_accessibility_tts', - 'system_setting_unset_changed_callback_ads_id', - 'system_setting_unset_changed_callback_auto_rotation_mode', - 'system_setting_unset_changed_callback_device_name', - 'system_setting_unset_changed_callback_email_alert_ringtone', - 'system_setting_unset_changed_callback_font_size', - 'system_setting_unset_changed_callback_font_type', - 'system_setting_unset_changed_callback_incoming_call_ringtone', - 'system_setting_unset_changed_callback_locale_country', - 'system_setting_unset_changed_callback_locale_language', - 'system_setting_unset_changed_callback_locale_timeformat_24hour', - 'system_setting_unset_changed_callback_locale_timezone', - 'system_setting_unset_changed_callback_locale_timezone_changed', - 'system_setting_unset_changed_callback_lockscreen_app', - 'system_setting_unset_changed_callback_lock_state', - 'system_setting_unset_changed_callback_motion_activation', - 'system_setting_unset_changed_callback_network_flight_mode', - 'system_setting_unset_changed_callback_network_wifi_notification', - 'system_setting_unset_changed_callback_notification_repetition_period', - 'system_setting_unset_changed_callback_screen_backlight_time', - 'system_setting_unset_changed_callback_sound_lock', - 'system_setting_unset_changed_callback_sound_notification', - 'system_setting_unset_changed_callback_sound_silent_mode', - 'system_setting_unset_changed_callback_sound_touch', - 'system_setting_unset_changed_callback_time_changed', - 'system_setting_unset_changed_callback_uds_pkg_list', - 'system_setting_unset_changed_callback_uds_state', - 'system_setting_unset_changed_callback_usb_debugging_option', - 'system_setting_unset_changed_callback_vibration', - 'system_setting_unset_changed_callback_wallpaper_home_screen', - 'system_setting_unset_changed_callback_wallpaper_lock_screen', - 'system_setting_vconf_get_value_bool', - 'system_setting_vconf_get_value_int', - 'system_setting_vconf_get_value_string', - 'system_setting_vconf_set_changed_cb', - 'system_setting_vconf_set_changed_multi_cb', - 'system_setting_vconf_set_value_bool', - 'system_setting_vconf_set_value_int', - 'system_setting_vconf_set_value_string', - 'system_setting_vconf_unset_changed_cb', - 'system_setting_vconf_unset_changed_multi_cb', - ], - 'libttrace.so.1': [ - 'check_params', - 'libttrace_fini', - 'libttrace_init', - 'trace_async_begin', - 'traceAsyncBegin', - 'trace_async_end', - 'traceAsyncEnd', - 'trace_begin', - 'traceBegin', - 'traceCounter', - 'trace_end', - 'traceEnd', - 'traceMark', - 'trace_update_counter', - ], - 'libcapi-system-usbhost.so.0': [ - 'usb_host_claim_interface', - 'usb_host_config_destroy', - 'usb_host_config_get_interface', - 'usb_host_config_get_max_power', - 'usb_host_config_get_num_interfaces', - 'usb_host_config_is_self_powered', - 'usb_host_config_support_remote_wakeup', - 'usb_host_control_transfer', - 'usb_host_create', - 'usb_host_destroy', - 'usb_host_device_close', - 'usb_host_device_get_address', - 'usb_host_device_get_bcd_device', - 'usb_host_device_get_bcd_usb', - 'usb_host_device_get_bus_number', - 'usb_host_device_get_class', - 'usb_host_device_get_config', - 'usb_host_device_get_config_str', - 'usb_host_device_get_id_product', - 'usb_host_device_get_id_vendor', - 'usb_host_device_get_manufacturer_str', - 'usb_host_device_get_max_packet_size_0', - 'usb_host_device_get_num_configurations', - 'usb_host_device_get_port_numbers', - 'usb_host_device_get_product_str', - 'usb_host_device_get_protocol', - 'usb_host_device_get_serial_number_str', - 'usb_host_device_get_sub_class', - 'usb_host_device_open', - 'usb_host_device_open_with_vid_pid', - 'usb_host_device_unconfigure', - 'usb_host_endpoint_get_direction', - 'usb_host_endpoint_get_interval', - 'usb_host_endpoint_get_max_packet_size', - 'usb_host_endpoint_get_number', - 'usb_host_endpoint_get_synch_type', - 'usb_host_endpoint_get_transfer_type', - 'usb_host_endpoint_get_usage_type', - 'usb_host_free_device_list', - 'usb_host_get_active_config', - 'usb_host_get_device_list', - 'usb_host_interface_get_altsetting', - 'usb_host_interface_get_endpoint', - 'usb_host_interface_get_number', - 'usb_host_interface_get_num_endpoints', - 'usb_host_interface_get_str', - 'usb_host_interface_set_altsetting', - 'usb_host_is_device_opened', - 'usb_host_ref_device', - 'usb_host_release_interface', - 'usb_host_set_config', - 'usb_host_set_hotplug_cb', - 'usb_host_transfer', - 'usb_host_unref_device', - 'usb_host_unset_hotplug_cb', - ], - 'libcapi-telephony.so.0': [ - 'telephony_call_get_call_list', - 'telephony_call_get_conference_status', - 'telephony_call_get_direction', - 'telephony_call_get_handle_id', - 'telephony_call_get_number', - 'telephony_call_get_preferred_voice_subscription', - 'telephony_call_get_status', - 'telephony_call_get_type', - 'telephony_call_get_video_call_state', - 'telephony_call_get_voice_call_state', - 'telephony_call_release_call_list', - 'telephony_deinit', - 'telephony_get_state', - 'telephony_init', - 'telephony_modem_get_imei', - 'telephony_modem_get_meid', - 'telephony_modem_get_power_status', - 'telephony_network_get_base_station_id', - 'telephony_network_get_base_station_latitude', - 'telephony_network_get_base_station_longitude', - 'telephony_network_get_cell_id', - 'telephony_network_get_default_data_subscription', - 'telephony_network_get_default_subscription', - 'telephony_network_get_lac', - 'telephony_network_get_mcc', - 'telephony_network_get_mnc', - 'telephony_network_get_network_id', - 'telephony_network_get_network_name', - 'telephony_network_get_network_name_option', - 'telephony_network_get_ps_type', - 'telephony_network_get_roaming_status', - 'telephony_network_get_rssi', - 'telephony_network_get_selection_mode', - 'telephony_network_get_service_state', - 'telephony_network_get_signal_strength', - 'telephony_network_get_system_id', - 'telephony_network_get_tac', - 'telephony_network_get_type', - 'telephony_set_noti_cb', - 'telephony_set_state_changed_cb', - 'telephony_sim_get_application_list', - 'telephony_sim_get_call_forwarding_indicator_state', - 'telephony_sim_get_group_id1', - 'telephony_sim_get_icc_id', - 'telephony_sim_get_lock_state', - 'telephony_sim_get_msin', - 'telephony_sim_get_operator', - 'telephony_sim_get_spn', - 'telephony_sim_get_state', - 'telephony_sim_get_subscriber_id', - 'telephony_sim_get_subscriber_number', - 'telephony_sim_is_changed', - 'telephony_unset_noti_cb', - 'telephony_unset_state_changed_cb', - ], - 'libcbhm.so.1': [ - 'cbhm_close_service', - 'cbhm_hide', - 'cbhm_item_changed_callback_add', - 'cbhm_item_changed_callback_remove', - 'cbhm_item_count_get', - 'cbhm_item_selected_callback_add', - 'cbhm_item_selected_callback_remove', - 'cbhm_latest_item_type_get', - 'cbhml_changed_cb_hash_deinit', - 'cbhml_changed_cb_hash_init', - 'cbhml_changed_cb_table_get', - 'cbhml_monitor_cb_hash_deinit', - 'cbhml_monitor_cb_hash_init', - 'cbhml_monitor_cb_table_get', - 'cbhml_selection_handler_deinit', - 'cbhml_selection_handler_init', - 'cbhml_selection_hash_deinit', - 'cbhml_selection_hash_init', - 'cbhml_selection_obj_table_get', - 'cbhm_monitor_callback_add', - 'cbhm_monitor_callback_remove', - 'cbhm_open_service', - 'cbhm_selection_get', - 'cbhm_selection_set', - 'cbhm_selection_type_get', - 'cbhm_selection_type_set', - 'cbhm_show', - 'cbhm_state_get', - 'cbhm_utils_calloc', - 'cbhm_utils_free', - 'cbhm_utils_malloc', - ], - 'libeom.so.0': [ - 'eom_deinit', - 'eom_get_eom_output_ids', - 'eom_get_output_attribute', - 'eom_get_output_attribute_state', - 'eom_get_output_mode', - 'eom_get_output_physical_size', - 'eom_get_output_resolution', - 'eom_get_output_type', - 'eom_init', - 'eom_set_attribute_changed_cb', - 'eom_set_mode_changed_cb', - 'eom_set_output_added_cb', - 'eom_set_output_attribute', - 'eom_set_output_removed_cb', - 'eom_set_output_window', - 'eom_unset_attribute_changed_cb', - 'eom_unset_mode_changed_cb', - 'eom_unset_output_added_cb', - 'eom_unset_output_removed_cb', - 'eom_wayland_client_deinit', - 'eom_wayland_client_get_output_ids', - 'eom_wayland_client_get_output_info', - 'eom_wayland_client_init', - 'eom_wayland_client_set_attribute', - 'eom_wayland_client_set_window', - ], - 'libtbm.so.1': [ - 'tbm_backend_alloc', - 'tbm_backend_free', - 'tbm_backend_get_bo_priv', - 'tbm_backend_get_bufmgr_priv', - 'tbm_backend_get_priv_from_bufmgr', - 'tbm_backend_init', - 'tbm_backend_is_display_server', - 'tbm_backend_set_bo_priv', - 'tbm_bo_add_user_data', - 'tbm_bo_alloc', - 'tbm_bo_delete_user_data', - 'tbm_bo_export', - 'tbm_bo_export_fd', - 'tbm_bo_get_flags', - 'tbm_bo_get_handle', - 'tbm_bo_get_user_data', - 'tbm_bo_import', - 'tbm_bo_import_fd', - 'tbm_bo_locked', - 'tbm_bo_map', - 'tbm_bo_ref', - 'tbm_bo_set_user_data', - 'tbm_bo_size', - 'tbm_bo_swap', - 'tbm_bo_unmap', - 'tbm_bo_unref', - 'tbm_bufmgr_bind_native_display', - 'tbm_bufmgr_debug_dump_all', - 'tbm_bufmgr_debug_dump_set_scale', - 'tbm_bufmgr_debug_queue_dump', - 'tbm_bufmgr_debug_show', - 'tbm_bufmgr_debug_tbm_info_get', - 'tbm_bufmgr_debug_trace', - 'tbm_bufmgr_deinit', - 'tbm_bufmgr_get_capability', - 'tbm_bufmgr_get_fd_limit', - 'tbm_bufmgr_init', - 'tbm_drm_helper_get_auth_info', - 'tbm_drm_helper_get_fd', - 'tbm_drm_helper_get_master_fd', - 'tbm_drm_helper_set_fd', - 'tbm_drm_helper_set_tbm_master_fd', - 'tbm_drm_helper_unset_fd', - 'tbm_drm_helper_unset_tbm_master_fd', - 'tbm_drm_helper_wl_auth_server_deinit', - 'tbm_drm_helper_wl_auth_server_init', - 'tbm_get_last_error', - 'tbm_surface_create', - 'tbm_surface_destroy', - 'tbm_surface_get_format', - 'tbm_surface_get_height', - 'tbm_surface_get_info', - 'tbm_surface_get_width', - 'tbm_surface_internal_add_user_data', - 'tbm_surface_internal_capture_buffer', - 'tbm_surface_internal_capture_shm_buffer', - 'tbm_surface_internal_create_with_bos', - 'tbm_surface_internal_create_with_flags', - 'tbm_surface_internal_delete_user_data', - 'tbm_surface_internal_destroy', - 'tbm_surface_internal_dump_buffer', - 'tbm_surface_internal_dump_end', - 'tbm_surface_internal_dump_shm_buffer', - 'tbm_surface_internal_dump_start', - 'tbm_surface_internal_dump_with_scale_start', - 'tbm_surface_internal_get_bo', - 'tbm_surface_internal_get_bpp', - 'tbm_surface_internal_get_format', - 'tbm_surface_internal_get_height', - 'tbm_surface_internal_get_info', - 'tbm_surface_internal_get_num_bos', - 'tbm_surface_internal_get_num_planes', - 'tbm_surface_internal_get_plane_bo_idx', - 'tbm_surface_internal_get_plane_data', - 'tbm_surface_internal_get_size', - 'tbm_surface_internal_get_user_data', - 'tbm_surface_internal_get_width', - 'tbm_surface_internal_is_valid', - 'tbm_surface_internal_query_supported_formats', - 'tbm_surface_internal_ref', - 'tbm_surface_internal_set_debug_data', - 'tbm_surface_internal_set_debug_pid', - 'tbm_surface_internal_set_user_data', - 'tbm_surface_internal_unmap', - 'tbm_surface_internal_unref', - 'tbm_surface_map', - 'tbm_surface_query_formats', - 'tbm_surface_queue_acquire', - 'tbm_surface_queue_add_acquirable_cb', - 'tbm_surface_queue_add_can_dequeue_cb', - 'tbm_surface_queue_add_dequeuable_cb', - 'tbm_surface_queue_add_dequeue_cb', - 'tbm_surface_queue_add_destroy_cb', - 'tbm_surface_queue_add_reset_cb', - 'tbm_surface_queue_add_trace_cb', - 'tbm_surface_queue_can_acquire', - 'tbm_surface_queue_cancel_acquire', - 'tbm_surface_queue_cancel_dequeue', - 'tbm_surface_queue_can_dequeue', - 'tbm_surface_queue_create', - 'tbm_surface_queue_dequeue', - 'tbm_surface_queue_destroy', - 'tbm_surface_queue_enqueue', - 'tbm_surface_queue_flush', - 'tbm_surface_queue_free_flush', - 'tbm_surface_queue_get_format', - 'tbm_surface_queue_get_height', - 'tbm_surface_queue_get_size', - 'tbm_surface_queue_get_surfaces', - 'tbm_surface_queue_get_trace_surface_num', - 'tbm_surface_queue_get_width', - 'tbm_surface_queue_notify_reset', - 'tbm_surface_queue_release', - 'tbm_surface_queue_remove_acquirable_cb', - 'tbm_surface_queue_remove_can_dequeue_cb', - 'tbm_surface_queue_remove_dequeuable_cb', - 'tbm_surface_queue_remove_dequeue_cb', - 'tbm_surface_queue_remove_destroy_cb', - 'tbm_surface_queue_remove_reset_cb', - 'tbm_surface_queue_remove_trace_cb', - 'tbm_surface_queue_reset', - 'tbm_surface_queue_sequence_create', - 'tbm_surface_queue_set_alloc_cb', - 'tbm_surface_queue_set_modes', - 'tbm_surface_queue_set_size', - 'tbm_surface_queue_set_sync_count', - 'tbm_surface_unmap', - 'tbm_sync_fence_create', - 'tbm_sync_fence_merge', - 'tbm_sync_fence_wait', - 'tbm_sync_timeline_create', - 'tbm_sync_timeline_inc', - 'user_data_create', - 'user_data_delete', - 'user_data_lookup', - ], - 'libcapi-ui-inputmethod.so.0': [ - 'ime_commit_content', - 'ime_commit_string', - 'ime_context_get_autocapital_type', - 'ime_context_get_bidi_direction', - 'ime_context_get_caps_mode', - 'ime_context_get_cursor_position', - 'ime_context_get_input_hint', - 'ime_context_get_language', - 'ime_context_get_layout', - 'ime_context_get_layout_variation', - 'ime_context_get_password_mode', - 'ime_context_get_prediction_mode', - 'ime_context_get_return_key_state', - 'ime_context_get_return_key_type', - 'ime_create_option_window', - 'ime_delete_surrounding_text', - 'ime_destroy_option_window', - 'ime_device_info_get_class', - 'ime_device_info_get_name', - 'ime_device_info_get_subclass', - 'ime_event_set_accessibility_state_changed_cb', - 'ime_event_set_candidate_hide_cb', - 'ime_event_set_candidate_show_cb', - 'ime_event_set_caps_mode_changed_cb', - 'ime_event_set_cursor_position_updated_cb', - 'ime_event_set_display_language_changed_cb', - 'ime_event_set_focus_in_cb', - 'ime_event_set_focus_out_cb', - 'ime_event_set_geometry_requested_cb', - 'ime_event_set_imdata_requested_cb', - 'ime_event_set_imdata_set_cb', - 'ime_event_set_input_context_reset_cb', - 'ime_event_set_language_requested_cb', - 'ime_event_set_language_set_cb', - 'ime_event_set_layout_set_cb', - 'ime_event_set_lookup_table_changed_cb', - 'ime_event_set_mime_type_set_request_cb', - 'ime_event_set_option_window_created_cb', - 'ime_event_set_option_window_destroyed_cb', - 'ime_event_set_prediction_hint_set_cb', - 'ime_event_set_process_input_device_event_cb', - 'ime_event_set_process_key_event_cb', - 'ime_event_set_return_key_state_set_cb', - 'ime_event_set_return_key_type_set_cb', - 'ime_event_set_rotation_degree_changed_cb', - 'ime_event_set_surrounding_text_updated_cb', - 'ime_event_unset_process_input_device_event_cb', - 'ime_finalize', - 'ime_flush_imengine', - 'ime_get_main_window', - 'ime_get_selected_text', - 'ime_get_surrounding_text', - 'ime_hide_preedit_string', - 'ime_initialize', - 'ime_input_device_rotary_get_direction', - 'ime_prepare', - 'ime_request_hide', - 'ime_request_surrounding_text', - 'ime_reset_imengine', - 'ime_run', - 'ime_select_candidate', - 'ime_send_key_event', - 'ime_send_private_command', - 'ime_set_dotnet_flag', - 'ime_set_floating_drag_end', - 'ime_set_floating_drag_start', - 'ime_set_floating_mode', - 'ime_set_imengine', - 'ime_set_selection', - 'ime_set_size', - 'ime_show_preedit_string', - 'ime_update_input_context', - 'ime_update_preedit_string', - ], - 'libcapi-ui-inputmethod-manager.so.0': [ - 'ime_manager_get_active_ime', - 'ime_manager_get_enabled_ime_count', - 'ime_manager_is_ime_enabled', - 'ime_manager_show_ime_list', - 'ime_manager_show_ime_selector', - ], - 'libstt.so': [ - 'stt_cancel', - 'stt_cancel_file', - 'stt_client_destroy', - 'stt_client_get', - 'stt_client_get_by_uid', - 'stt_client_get_client_list', - 'stt_client_get_size', - 'stt_client_get_use_callback', - 'stt_client_new', - 'stt_client_not_use_callback', - 'stt_client_use_callback', - 'stt_config_check_default_engine_is_valid', - 'stt_config_check_default_language_is_valid', - 'stt_config_mgr_add_time_info', - 'stt_config_mgr_finalize', - 'stt_config_mgr_foreach_time_info', - 'stt_config_mgr_get_auto_language', - 'stt_config_mgr_get_default_language', - 'stt_config_mgr_get_engine', - 'stt_config_mgr_get_engine_agreement', - 'stt_config_mgr_get_engine_list', - 'stt_config_mgr_get_language_list', - 'stt_config_mgr_get_silence_detection', - 'stt_config_mgr_initialize', - 'stt_config_mgr_inotify_event_cb', - 'stt_config_mgr_remove_time_info_file', - 'stt_config_mgr_reset_time_info', - 'stt_config_mgr_save_time_info_file', - 'stt_config_mgr_set_auto_language', - 'stt_config_mgr_set_callback', - 'stt_config_mgr_set_default_language', - 'stt_config_mgr_set_engine', - 'stt_config_mgr_set_silence_detection', - 'stt_config_mgr_unset_callback', - 'stt_create', - 'stt_dbus_close_connection', - 'stt_dbus_open_connection', - 'stt_dbus_reconnect', - 'stt_dbus_request_cancel', - 'stt_dbus_request_cancel_file', - 'stt_dbus_request_check_app_agreed', - 'stt_dbus_request_finalize', - 'stt_dbus_request_get_default_lang', - 'stt_dbus_request_get_private_data', - 'stt_dbus_request_get_support_langs', - 'stt_dbus_request_hello', - 'stt_dbus_request_initialize', - 'stt_dbus_request_is_recognition_type_supported', - 'stt_dbus_request_set_current_engine', - 'stt_dbus_request_set_private_data', - 'stt_dbus_request_set_start_sound', - 'stt_dbus_request_set_stop_sound', - 'stt_dbus_request_start', - 'stt_dbus_request_start_file', - 'stt_dbus_request_stop', - 'stt_dbus_request_unset_start_sound', - 'stt_dbus_request_unset_stop_sound', - 'stt_destroy', - 'stt_foreach_detailed_result', - 'stt_foreach_supported_engines', - 'stt_foreach_supported_languages', - 'stt_get_default_language', - 'stt_get_engine', - 'stt_get_error_message', - 'stt_get_private_data', - 'stt_get_recording_volume', - 'stt_get_state', - 'stt_is_recognition_type_supported', - 'stt_parser_clear_time_info', - 'stt_parser_find_config_changed', - 'stt_parser_free_engine_info', - 'stt_parser_get_engine_info', - 'stt_parser_get_time_info', - 'stt_parser_load_config', - 'stt_parser_print_engine_info', - 'stt_parser_set_auto_lang', - 'stt_parser_set_engine', - 'stt_parser_set_language', - 'stt_parser_set_silence_detection', - 'stt_parser_set_time_info', - 'stt_parser_unload_config', - 'stt_prepare', - 'stt_set_credential', - 'stt_set_default_language_changed_cb', - 'stt_set_engine', - 'stt_set_engine_changed_cb', - 'stt_set_error_cb', - 'stt_set_private_data', - 'stt_set_recognition_result_cb', - 'stt_set_server_stt', - 'stt_set_silence_detection', - 'stt_set_speech_status_cb', - 'stt_set_start_sound', - 'stt_set_state_changed_cb', - 'stt_set_stop_sound', - 'stt_start', - 'stt_start_file', - 'stt_stop', - 'stt_tag', - 'stt_unprepare', - 'stt_unset_default_language_changed_cb', - 'stt_unset_engine_changed_cb', - 'stt_unset_error_cb', - 'stt_unset_recognition_result_cb', - 'stt_unset_speech_status_cb', - 'stt_unset_start_sound', - 'stt_unset_state_changed_cb', - 'stt_unset_stop_sound', - ], - 'libstt_engine.so': [ - 'client_show_list', - 'stt_client_get_app_agreed', - 'stt_client_get_current_recognition', - 'stt_client_set_app_agreed', - 'stt_client_set_current_recognition', - 'stt_client_unset_current_recognition', - 'stt_config_check_default_engine_is_valid', - 'stt_config_check_default_language_is_valid', - 'stt_config_mgr_add_time_info', - 'stt_config_mgr_finalize', - 'stt_config_mgr_foreach_time_info', - 'stt_config_mgr_get_auto_language', - 'stt_config_mgr_get_default_language', - 'stt_config_mgr_get_engine', - 'stt_config_mgr_get_engine_agreement', - 'stt_config_mgr_get_engine_list', - 'stt_config_mgr_get_language_list', - 'stt_config_mgr_get_silence_detection', - 'stt_config_mgr_initialize', - 'stt_config_mgr_inotify_event_cb', - 'stt_config_mgr_remove_time_info_file', - 'stt_config_mgr_reset_time_info', - 'stt_config_mgr_save_time_info_file', - 'stt_config_mgr_set_auto_language', - 'stt_config_mgr_set_callback', - 'stt_config_mgr_set_default_language', - 'stt_config_mgr_set_engine', - 'stt_config_mgr_set_silence_detection', - 'stt_config_mgr_unset_callback', - 'sttd_cleanup_client', - 'sttd_client_add', - 'sttd_client_delete', - 'sttd_client_get_list', - 'sttd_client_get_pid', - 'sttd_client_get_ref_count', - 'sttd_client_get_start_sound', - 'sttd_client_get_state', - 'sttd_client_get_stop_sound', - 'sttd_client_set_start_sound', - 'sttd_client_set_state', - 'sttd_client_set_stop_sound', - 'sttd_config_finalize', - 'sttd_config_get_default_engine', - 'sttd_config_get_default_language', - 'sttd_config_get_default_silence_detection', - 'sttd_config_initialize', - 'sttd_config_set_default_engine', - 'sttd_config_time_add', - 'sttd_config_time_reset', - 'sttd_config_time_save', - 'sttdc_send_error_signal', - 'sttdc_send_hello', - 'sttdc_send_result', - 'sttdc_send_set_state', - 'sttdc_send_set_volume', - 'sttdc_send_speech_status', - 'sttd_dbus_close_connection', - 'sttd_dbus_open_connection', - 'sttd_dbus_server_cancel', - 'sttd_dbus_server_cancel_file', - 'sttd_dbus_server_check_app_agreed', - 'sttd_dbus_server_finalize', - 'sttd_dbus_server_get_current_engine', - 'sttd_dbus_server_get_default_lang', - 'sttd_dbus_server_get_private_data', - 'sttd_dbus_server_get_support_engines', - 'sttd_dbus_server_get_support_lang', - 'sttd_dbus_server_hello', - 'sttd_dbus_server_initialize', - 'sttd_dbus_server_is_recognition_type_supported', - 'sttd_dbus_server_set_current_engine', - 'sttd_dbus_server_set_private_data', - 'sttd_dbus_server_set_start_sound', - 'sttd_dbus_server_set_stop_sound', - 'sttd_dbus_server_start', - 'sttd_dbus_server_start_file', - 'sttd_dbus_server_stop', - 'sttd_dbus_server_unset_start_sound', - 'sttd_dbus_server_unset_stop_sound', - 'sttd_engine_agent_check_app_agreed', - 'sttd_engine_agent_get_current_engine', - 'sttd_engine_agent_get_default_lang', - 'sttd_engine_agent_get_engine_list', - 'sttd_engine_agent_get_option_supported', - 'sttd_engine_agent_get_private_data', - 'sttd_engine_agent_init', - 'sttd_engine_agent_is_credential_needed', - 'sttd_engine_agent_is_default_engine', - 'sttd_engine_agent_is_recognition_type_supported', - 'sttd_engine_agent_load_current_engine', - 'sttd_engine_agent_need_network', - 'sttd_engine_agent_recognize_cancel', - 'sttd_engine_agent_recognize_start_engine', - 'sttd_engine_agent_recognize_start_file', - 'sttd_engine_agent_recognize_start_recorder', - 'sttd_engine_agent_recognize_stop_engine', - 'sttd_engine_agent_recognize_stop_file', - 'sttd_engine_agent_recognize_stop_recorder', - 'sttd_engine_agent_release', - 'sttd_engine_agent_send_error', - 'sttd_engine_agent_send_result', - 'sttd_engine_agent_send_speech_status', - 'sttd_engine_agent_set_default_engine', - 'sttd_engine_agent_set_default_language', - 'sttd_engine_agent_set_private_data', - 'sttd_engine_agent_set_recording_data', - 'sttd_engine_agent_set_silence_detection', - 'sttd_engine_agent_supported_langs', - 'sttd_engine_agent_unload_current_engine', - 'sttd_finalize', - 'sttd_initialize', - 'sttd_recorder_clear', - 'sttd_recorder_create', - 'sttd_recorder_deinitialize', - 'sttd_recorder_destroy', - 'sttd_recorder_initialize', - 'sttd_recorder_set_audio_session', - 'sttd_recorder_start', - 'sttd_recorder_start_file', - 'sttd_recorder_stop', - 'sttd_recorder_stop_file', - 'sttd_recorder_unset_audio_session', - 'sttd_server_cancel', - 'sttd_server_cancel_file', - 'sttd_server_check_app_agreed', - 'sttd_server_finalize', - 'sttd_server_get_current_engine', - 'sttd_server_get_current_langauage', - 'sttd_server_get_private_data', - 'sttd_server_get_supported_engines', - 'sttd_server_get_supported_languages', - 'sttd_server_initialize', - 'sttd_server_is_recognition_type_supported', - 'sttd_server_set_current_engine', - 'sttd_server_set_private_data', - 'sttd_server_set_start_sound', - 'sttd_server_set_stop_sound', - 'sttd_server_start', - 'sttd_server_start_file', - 'sttd_server_stop', - 'stte_main', - 'stt_engine_check_app_agreed', - 'stt_engine_deinitialize', - 'stt_engine_foreach_result_time', - 'stt_engine_get_audio_type', - 'stt_engine_get_first_language', - 'stt_engine_get_private_data', - 'stt_engine_get_supported_langs', - 'stt_engine_initialize', - 'stt_engine_is_valid_language', - 'stt_engine_load', - 'stt_engine_need_app_credential', - 'stt_engine_recognize_cancel', - 'stt_engine_recognize_cancel_file', - 'stt_engine_recognize_start', - 'stt_engine_recognize_start_file', - 'stt_engine_recognize_stop', - 'stt_engine_send_error', - 'stt_engine_send_result', - 'stt_engine_send_speech_status', - 'stt_engine_set_private_data', - 'stt_engine_set_private_data_requested_cb', - 'stt_engine_set_private_data_set_cb', - 'stt_engine_set_recognition_result_cb', - 'stt_engine_set_recording_data', - 'stt_engine_set_silence_detection', - 'stt_engine_support_recognition_type', - 'stt_engine_support_silence', - 'stt_engine_unload', - 'stte_send_error', - 'stte_send_result', - 'stte_send_speech_status', - 'stte_set_private_data_requested_cb', - 'stte_set_private_data_set_cb', - 'stt_network_finalize', - 'stt_network_initialize', - 'stt_network_is_connected', - 'stt_parser_clear_time_info', - 'stt_parser_find_config_changed', - 'stt_parser_free_engine_info', - 'stt_parser_get_engine_info', - 'stt_parser_get_time_info', - 'stt_parser_load_config', - 'stt_parser_print_engine_info', - 'stt_parser_set_auto_lang', - 'stt_parser_set_engine', - 'stt_parser_set_language', - 'stt_parser_set_silence_detection', - 'stt_parser_set_time_info', - 'stt_parser_unload_config', - 'stt_tag', - ], - 'libtts.so': [ - 'tts_add_pcm', - 'tts_add_text', - 'tts_client_destroy', - 'tts_client_get', - 'tts_client_get_by_uid', - 'tts_client_get_client_list', - 'tts_client_get_connected_client_count', - 'tts_client_get_mode_client_count', - 'tts_client_get_size', - 'tts_client_get_use_callback', - 'tts_client_new', - 'tts_client_not_use_callback', - 'tts_client_use_callback', - 'tts_config_check_default_engine_is_valid', - 'tts_config_check_default_voice_is_valid', - 'tts_config_mgr_finalize', - 'tts_config_mgr_get_auto_voice', - 'tts_config_mgr_get_engine', - 'tts_config_mgr_get_engine_list', - 'tts_config_mgr_get_max_text_size', - 'tts_config_mgr_get_pitch', - 'tts_config_mgr_get_speech_rate', - 'tts_config_mgr_get_voice', - 'tts_config_mgr_get_voice_list', - 'tts_config_mgr_initialize', - 'tts_config_mgr_inotify_event_cb', - 'tts_config_mgr_set_auto_voice', - 'tts_config_mgr_set_callback', - 'tts_config_mgr_set_engine', - 'tts_config_mgr_set_pitch', - 'tts_config_mgr_set_speech_rate', - 'tts_config_mgr_set_voice', - 'tts_config_mgr_unset_callback', - 'tts_config_set_screen_reader_callback', - 'tts_config_unset_screen_reader_callback', - 'tts_create', - 'tts_dbus_close_connection', - 'tts_dbus_open_connection', - 'tts_dbus_reconnect', - 'tts_dbus_request_add_pcm', - 'tts_dbus_request_add_text', - 'tts_dbus_request_finalize', - 'tts_dbus_request_get_private_data', - 'tts_dbus_request_hello', - 'tts_dbus_request_initialize', - 'tts_dbus_request_pause', - 'tts_dbus_request_play', - 'tts_dbus_request_play_pcm', - 'tts_dbus_request_set_private_data', - 'tts_dbus_request_stop', - 'tts_dbus_request_stop_pcm', - 'tts_destroy', - 'tts_foreach_supported_voices', - 'tts_get_default_voice', - 'tts_get_error_message', - 'tts_get_max_text_size', - 'tts_get_mode', - 'tts_get_private_data', - 'tts_get_speed_range', - 'tts_get_state', - 'tts_parser_copy_xml', - 'tts_parser_find_config_changed', - 'tts_parser_free_engine_info', - 'tts_parser_get_engine_info', - 'tts_parser_load_config', - 'tts_parser_print_engine_info', - 'tts_parser_set_auto_voice', - 'tts_parser_set_engine', - 'tts_parser_set_pitch', - 'tts_parser_set_speech_rate', - 'tts_parser_set_voice', - 'tts_parser_unload_config', - 'tts_pause', - 'tts_pause_async', - 'tts_play', - 'tts_play_async', - 'tts_play_pcm', - 'tts_prepare', - 'tts_prepare_sync', - 'tts_set_credential', - 'tts_set_default_voice_changed_cb', - 'tts_set_engine_changed_cb', - 'tts_set_error_cb', - 'tts_set_mode', - 'tts_set_private_data', - 'tts_set_server_tts', - 'tts_set_state_changed_cb', - 'tts_set_utterance_completed_cb', - 'tts_set_utterance_started_cb', - 'tts_stop', - 'tts_stop_aync', - 'tts_stop_pcm', - 'tts_tag', - 'tts_unprepare', - 'tts_unset_default_voice_changed_cb', - 'tts_unset_engine_changed_cb', - 'tts_unset_error_cb', - 'tts_unset_state_changed_cb', - 'tts_unset_utterance_completed_cb', - 'tts_unset_utterance_started_cb', - ], - 'libtts_engine.so': [ - 'tts_config_check_default_engine_is_valid', - 'tts_config_check_default_voice_is_valid', - 'tts_config_mgr_finalize', - 'tts_config_mgr_get_auto_voice', - 'tts_config_mgr_get_engine', - 'tts_config_mgr_get_engine_list', - 'tts_config_mgr_get_max_text_size', - 'tts_config_mgr_get_pitch', - 'tts_config_mgr_get_speech_rate', - 'tts_config_mgr_get_voice', - 'tts_config_mgr_get_voice_list', - 'tts_config_mgr_initialize', - 'tts_config_mgr_inotify_event_cb', - 'tts_config_mgr_set_auto_voice', - 'tts_config_mgr_set_callback', - 'tts_config_mgr_set_engine', - 'tts_config_mgr_set_pitch', - 'tts_config_mgr_set_speech_rate', - 'tts_config_mgr_set_voice', - 'tts_config_mgr_unset_callback', - 'tts_config_set_screen_reader_callback', - 'tts_config_unset_screen_reader_callback', - 'ttsd_cleanup_client', - 'ttsd_config_finalize', - 'ttsd_config_get_default_engine', - 'ttsd_config_get_default_pitch', - 'ttsd_config_get_default_speed', - 'ttsd_config_get_default_voice', - 'ttsd_config_initialize', - 'ttsd_config_save_error', - 'ttsd_config_set_default_engine', - 'ttsd_config_set_screen_reader_callback', - 'ttsdc_send_error_message', - 'ttsdc_send_hello', - 'ttsdc_send_message', - 'ttsdc_send_set_state_message', - 'ttsdc_send_utt_finish_message', - 'ttsdc_send_utt_start_message', - 'ttsd_data_add_sound_data', - 'ttsd_data_add_speak_data', - 'ttsd_data_clear_data', - 'ttsd_data_delete_client', - 'ttsd_data_foreach_clients', - 'ttsd_data_get_client_count', - 'ttsd_data_get_client_state', - 'ttsd_data_get_current_playing', - 'ttsd_data_get_pid', - 'ttsd_data_get_same_pid_client_count', - 'ttsd_data_get_sound_data', - 'ttsd_data_get_sound_data_size', - 'ttsd_data_get_speak_data', - 'ttsd_data_get_speak_data_size', - 'ttsd_data_is_client', - 'ttsd_data_is_uttid_valid', - 'ttsd_data_new_client', - 'ttsd_data_reset_used_voice', - 'ttsd_data_save_error_log', - 'ttsd_data_set_client_state', - 'ttsd_data_set_used_voice', - 'ttsd_dbus_close_connection', - 'ttsd_dbus_open_connection', - 'ttsd_dbus_server_add_pcm', - 'ttsd_dbus_server_add_text', - 'ttsd_dbus_server_finalize', - 'ttsd_dbus_server_get_current_voice', - 'ttsd_dbus_server_get_private_data', - 'ttsd_dbus_server_get_support_voices', - 'ttsd_dbus_server_hello', - 'ttsd_dbus_server_initialize', - 'ttsd_dbus_server_pause', - 'ttsd_dbus_server_play', - 'ttsd_dbus_server_play_pcm', - 'ttsd_dbus_server_set_private_data', - 'ttsd_dbus_server_stop', - 'ttsd_dbus_server_stop_pcm', - 'ttsd_engine_agent_init', - 'ttsd_engine_agent_is_credential_needed', - 'ttsd_engine_agent_is_same_engine', - 'ttsd_engine_agent_load_current_engine', - 'ttsd_engine_agent_need_network', - 'ttsd_engine_agent_release', - 'ttsd_engine_agent_set_default_pitch', - 'ttsd_engine_agent_set_default_speed', - 'ttsd_engine_agent_set_default_voice', - 'ttsd_engine_agent_set_private_data_requested_cb', - 'ttsd_engine_agent_set_private_data_set_cb', - 'ttsd_engine_agent_unload_current_engine', - 'ttsd_engine_cancel_synthesis', - 'ttsd_engine_check_app_agreed', - 'ttsd_engine_get_default_voice', - 'ttsd_engine_get_private_data', - 'ttsd_engine_get_voice_list', - 'ttsd_engine_load_voice', - 'ttsd_engine_select_valid_voice', - 'ttsd_engine_set_private_data', - 'ttsd_engine_start_synthesis', - 'ttsd_engine_unload_voice', - 'ttsd_finalize', - 'ttsd_get_mode', - 'ttsd_initialize', - 'ttsd_network_finalize', - 'ttsd_network_initialize', - 'ttsd_network_is_connected', - 'ttsd_player_all_stop', - 'ttsd_player_check_current_playback_focus', - 'ttsd_player_clear', - 'ttsd_player_create_instance', - 'ttsd_player_destroy_instance', - 'ttsd_player_init', - 'ttsd_player_pause', - 'ttsd_player_play', - 'ttsd_player_play_pcm', - 'ttsd_player_release', - 'ttsd_player_resume', - 'ttsd_player_stop', - 'ttsd_send_error', - 'ttsd_send_result', - 'ttsd_server_add_pcm', - 'ttsd_server_add_queue', - 'ttsd_server_finalize', - 'ttsd_server_get_current_voice', - 'ttsd_server_get_private_data', - 'ttsd_server_get_support_voices', - 'ttsd_server_initialize', - 'ttsd_server_pause', - 'ttsd_server_play', - 'ttsd_server_play_pcm', - 'ttsd_server_set_private_data', - 'ttsd_server_stop', - 'ttsd_server_stop_pcm', - 'ttsd_set_mode', - 'ttsd_set_private_data_requested_cb', - 'ttsd_set_private_data_set_cb', - 'ttsd_terminate_daemon', - 'ttse_get_pitch_range', - 'ttse_get_speed_range', - 'ttse_main', - 'ttse_send_error', - 'ttse_send_result', - 'ttse_set_private_data_requested_cb', - 'ttse_set_private_data_set_cb', - 'tts_parser_copy_xml', - 'tts_parser_find_config_changed', - 'tts_parser_free_engine_info', - 'tts_parser_get_engine_info', - 'tts_parser_load_config', - 'tts_parser_print_engine_info', - 'tts_parser_set_auto_voice', - 'tts_parser_set_engine', - 'tts_parser_set_pitch', - 'tts_parser_set_speech_rate', - 'tts_parser_set_voice', - 'tts_parser_unload_config', - 'tts_tag', - ], - 'libvc.so': [ - 'vc_auth_cancel', - 'vc_auth_disable', - 'vc_auth_enable', - 'vc_auth_get_state', - 'vc_auth_set_state_changed_cb', - 'vc_auth_start', - 'vc_auth_stop', - 'vc_auth_unset_state_changed_cb', - 'vc_client_create', - 'vc_client_destroy', - 'vc_client_get_auth_state', - 'vc_client_get_auth_state_changed_cb', - 'vc_client_get_before_auth_state', - 'vc_client_get_before_state', - 'vc_client_get_client_state', - 'vc_client_get_client_state_by_uid', - 'vc_client_get_count', - 'vc_client_get_current_lang_changed_cb', - 'vc_client_get_error', - 'vc_client_get_error_cb', - 'vc_client_get_handle', - 'vc_client_get_invocation_name', - 'vc_client_get_is_foreground', - 'vc_client_get_mgr_pid', - 'vc_client_get_result_cb', - 'vc_client_get_service_state', - 'vc_client_get_service_state_changed_cb', - 'vc_client_get_state_changed_cb', - 'vc_client_get_xid', - 'vc_client_is_valid', - 'vc_client_is_valid_by_uid', - 'vc_client_not_use_callback', - 'vc_client_set_auth_state', - 'vc_client_set_auth_state_changed_cb', - 'vc_client_set_client_state', - 'vc_client_set_current_lang_changed_cb', - 'vc_client_set_error', - 'vc_client_set_error_cb', - 'vc_client_set_invocation_name', - 'vc_client_set_is_foreground', - 'vc_client_set_mgr_pid', - 'vc_client_set_result_cb', - 'vc_client_set_service_state', - 'vc_client_set_service_state_changed_cb', - 'vc_client_set_state_changed_cb', - 'vc_client_set_xid', - 'vc_client_unset_auth_state_changed_cb', - 'vc_client_use_callback', - 'vc_cmd_create', - 'vc_cmd_destroy', - 'vc_cmd_get_appid', - 'vc_cmd_get_command', - 'vc_cmd_get_datetime', - 'vc_cmd_get_domain', - 'vc_cmd_get_fixed_command', - 'vc_cmd_get_format', - 'vc_cmd_get_id', - 'vc_cmd_get_invocation_name', - 'vc_cmd_get_nlu_json', - 'vc_cmd_get_pid', - 'vc_cmd_get_result_key', - 'vc_cmd_get_type', - 'vc_cmd_get_unfixed_command', - 'vc_cmd_list_add', - 'vc_cmd_list_create', - 'vc_cmd_list_destroy', - 'vc_cmd_list_filter_by_type', - 'vc_cmd_list_first', - 'vc_cmd_list_foreach_commands', - 'vc_cmd_list_get_count', - 'vc_cmd_list_get_current', - 'vc_cmd_list_last', - 'vc_cmd_list_next', - 'vc_cmd_list_prev', - 'vc_cmd_list_remove', - 'vc_cmd_list_remove_all', - 'vc_cmd_parser_append_commands', - 'vc_cmd_parser_delete_file', - 'vc_cmd_parser_get_commands', - 'vc_cmd_parser_save_file', - 'vc_cmd_print_list', - 'vc_cmd_set_appid', - 'vc_cmd_set_command', - 'vc_cmd_set_domain', - 'vc_cmd_set_fixed_command', - 'vc_cmd_set_format', - 'vc_cmd_set_id', - 'vc_cmd_set_invocation_name', - 'vc_cmd_set_pid', - 'vc_cmd_set_result_key', - 'vc_cmd_set_type', - 'vc_cmd_set_unfixed_command', - 'vc_config_check_default_engine_is_valid', - 'vc_config_check_default_language_is_valid', - 'vc_config_convert_error_code', - 'vc_config_mgr_finalize', - 'vc_config_mgr_get_auto_language', - 'vc_config_mgr_get_default_language', - 'vc_config_mgr_get_enabled', - 'vc_config_mgr_get_foreground', - 'vc_config_mgr_get_language_list', - 'vc_config_mgr_get_nonfixed_support', - 'vc_config_mgr_initialize', - 'vc_config_mgr_inotify_event_cb', - 'vc_config_mgr_set_auto_language', - 'vc_config_mgr_set_default_language', - 'vc_config_mgr_set_enabled', - 'vc_config_mgr_set_enabled_cb', - 'vc_config_mgr_set_foreground', - 'vc_config_mgr_set_lang_cb', - 'vc_config_mgr_unset_enabled_cb', - 'vc_config_mgr_unset_lang_cb', - 'vc_config_tag', - 'vc_db_append_commands', - 'vc_db_backup_command', - 'vc_db_begin_transaction', - 'vc_db_commit_transaction', - 'vc_db_create_table', - 'vc_db_delete_commands', - 'vc_db_delete_table', - 'vc_db_finalize', - 'vc_db_get_appid_list', - 'vc_db_get_commands', - 'vc_db_get_result', - 'vc_db_get_result_pid_list', - 'vc_db_initialize', - 'vc_db_insert_command', - 'vc_db_insert_commands_list', - 'vc_db_insert_result', - 'vc_db_restore_command', - 'vc_db_rollback_transaction', - 'vc_db_tag', - 'vc_dbus_close_connection', - 'vc_dbus_open_connection', - 'vc_dbus_reconnect', - 'vc_dbus_request_auth_cancel', - 'vc_dbus_request_auth_disable', - 'vc_dbus_request_auth_enable', - 'vc_dbus_request_auth_start', - 'vc_dbus_request_auth_stop', - 'vc_dbus_request_dialog', - 'vc_dbus_request_finalize', - 'vc_dbus_request_hello', - 'vc_dbus_request_initialize', - 'vc_dbus_request_is_system_command_valid', - 'vc_dbus_request_set_command', - 'vc_dbus_request_set_exclusive_command', - 'vc_dbus_request_unset_command', - 'vc_dbus_set_foreground', - 'vc_deinitialize', - 'vc_foreach_supported_languages', - 'vc_get_current_language', - 'vc_get_result', - 'vc_get_service_state', - 'vc_get_state', - 'vc_get_system_command_list', - 'vc_info_parser_get_client_info', - 'vc_info_parser_get_demandable_clients', - 'vc_info_parser_get_nlu_result', - 'vc_info_parser_get_result', - 'vc_info_parser_get_result_pid_list', - 'vc_info_parser_set_client_info', - 'vc_info_parser_set_demandable_client', - 'vc_info_parser_set_nlu_result', - 'vc_info_parser_set_result', - 'vc_info_parser_unset_result', - 'vc_info_tag', - 'vc_initialize', - 'vc_is_command_format_supported', - 'vc_json_set_all_commands_from_file', - 'vc_json_set_commands_from_file', - 'vc_json_tag', - 'vc_parser_find_config_changed', - 'vc_parser_free_engine_info', - 'vc_parser_get_engine_info', - 'vc_parser_get_foreground', - 'vc_parser_load_config', - 'vc_parser_print_engine_info', - 'vc_parser_set_auto_lang', - 'vc_parser_set_enabled', - 'vc_parser_set_engine', - 'vc_parser_set_foreground', - 'vc_parser_set_language', - 'vc_parser_unload_config', - 'vc_prepare', - 'vc_prepare_sync', - 'vc_request_dialog', - 'vc_set_command_list', - 'vc_set_command_list_from_file', - 'vc_set_current_language_changed_cb', - 'vc_set_error_cb', - 'vc_set_invocation_name', - 'vc_set_result_cb', - 'vc_set_service_state_changed_cb', - 'vc_set_state_changed_cb', - 'vc_unprepare', - 'vc_unset_command_list', - 'vc_unset_current_language_changed_cb', - 'vc_unset_error_cb', - 'vc_unset_result_cb', - 'vc_unset_service_state_changed_cb', - 'vc_unset_state_changed_cb', - ], -}; diff --git a/lib/src/bindings/5.0/generated_bindings.dart b/lib/src/bindings/5.0/generated_bindings.dart deleted file mode 100644 index d586d89..0000000 --- a/lib/src/bindings/5.0/generated_bindings.dart +++ /dev/null @@ -1,194523 +0,0 @@ -// Copyright 2021 Samsung Electronics Co., Ltd. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// ignore_for_file: type=lint, unused_element, unused_field - -// AUTO GENERATED FILE, DO NOT EDIT. -// -// Generated by `package:ffigen`. -import 'dart:ffi' as ffi; - -/// Dart bindings for Tizen native APIs. -class Tizen50Native { - /// Holds the symbol lookup function. - final ffi.Pointer Function(String symbolName) - _lookup; - - /// The symbols are looked up in [dynamicLibrary]. - Tizen50Native(ffi.DynamicLibrary dynamicLibrary) - : _lookup = dynamicLibrary.lookup; - - /// The symbols are looked up with [lookup]. - Tizen50Native.fromLookup( - ffi.Pointer Function(String symbolName) - lookup) - : _lookup = lookup; - - /// @brief Gets the last error code in the thread. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @details This function retrieves the last error code which is set by set_last_result() - /// @return One of #tizen_error_e - /// @see #tizen_error_e - /// @see set_last_result() - int get_last_result() { - return _get_last_result(); - } - - late final _get_last_resultPtr = - _lookup>('get_last_result'); - late final _get_last_result = - _get_last_resultPtr.asFunction(); - - /// @brief Sets the last error code to be returned in the thread. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] err The error code to be returned - /// @see #tizen_error_e - /// @see get_last_result() - void set_last_result( - int err, - ) { - return _set_last_result( - err, - ); - } - - late final _set_last_resultPtr = - _lookup>( - 'set_last_result'); - late final _set_last_result = - _set_last_resultPtr.asFunction(); - - /// @brief Gets the message for given the error code. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remark This function returns a static pointer; subsequent calls will overwrite it. - /// @param[in] err The error value to be returned - /// @return The error's message - /// @see #tizen_error_e - /// - /// @code - /// char* errMsg; - /// location_manager_h location_handle; - /// int result = location_manager_create(LOCATION_METHOD_GPS, &location_handle); - /// - /// if (LOCATIONS_ERROR_NONE != result) { - /// errMsg = get_error_message(result); - /// dlog_print(DLOG_INFO, "MyTag", "%s", errMsg); - /// } - /// @endcode - ffi.Pointer get_error_message( - int err, - ) { - return _get_error_message( - err, - ); - } - - late final _get_error_messagePtr = - _lookup Function(ffi.Int)>>( - 'get_error_message'); - late final _get_error_message = - _get_error_messagePtr.asFunction Function(int)>(); - - /// @deprecated Deprecated since Tizen 2.4.\n - /// This API is not necessary to use since Tizen 2.4. - /// @brief Connects to the account database by readwrite mode. - /// - /// @since_tizen @if MOBILE 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read \n - /// %http://tizen.org/privilege/account.write - /// @remarks This API need both privileges - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_DB_NOT_OPENED DB is not connected - /// @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission - int account_connect() { - return _account_connect(); - } - - late final _account_connectPtr = - _lookup>('account_connect'); - late final _account_connect = - _account_connectPtr.asFunction(); - - /// @deprecated Deprecated since Tizen 2.4.\n - /// This API is not necessary to use since Tizen 2.4. - /// @brief Connects to the account database by readonly mode. - /// - /// @since_tizen @if MOBILE 2.3 @endif - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_DB_NOT_OPENED DB is not connected - /// @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission - int account_connect_readonly() { - return _account_connect_readonly(); - } - - late final _account_connect_readonlyPtr = - _lookup>( - 'account_connect_readonly'); - late final _account_connect_readonly = - _account_connect_readonlyPtr.asFunction(); - - /// @deprecated Deprecated since Tizen 2.4.\n - /// This API is not necessary to use since Tizen 2.4. - /// @brief Disconnects from the account database. - /// - /// @since_tizen @if MOBILE 2.3 @endif - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission - /// @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite busy handler expired - int account_disconnect() { - return _account_disconnect(); - } - - late final _account_disconnectPtr = - _lookup>('account_disconnect'); - late final _account_disconnect = - _account_disconnectPtr.asFunction(); - - /// @brief Creates a handle to the account. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks Release @a account using account_destroy(). - /// @remarks The created handle is not added to the account database until account_insert_to_db() is called. - /// - /// @param[in] account The account handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_destroy() - int account_create( - ffi.Pointer account, - ) { - return _account_create( - account, - ); - } - - late final _account_createPtr = - _lookup)>>( - 'account_create'); - late final _account_create = - _account_createPtr.asFunction)>(); - - /// @brief Destroys the account handle and releases all its resources. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] account The account handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_create() - int account_destroy( - account_h account, - ) { - return _account_destroy( - account, - ); - } - - late final _account_destroyPtr = - _lookup>( - 'account_destroy'); - late final _account_destroy = - _account_destroyPtr.asFunction(); - - /// @brief Inserts the account details to the account database. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read \n - /// %http://tizen.org/privilege/account.write - /// @remarks This API need both privileges - /// @param[in] account The account handle - /// @param[out] account_db_id The account ID to be assigned to an account - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed - /// @retval #ACCOUNT_ERROR_DUPLICATED Same user name exists in your application - /// @retval #ACCOUNT_ERROR_NOT_ALLOW_MULTIPLE Tried to add an account in spite of multiple false accounts - /// @retval #ACCOUNT_ERROR_NOT_REGISTERED_PROVIDER Tried to add an account though you did not register the account type in manifest - /// @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission - /// @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy - /// @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n - /// But the account_connect() is not required to use this function since tizen 2.4. - /// - /// @see account_delete_from_db_by_id() - /// @see account_delete_from_db_by_user_name() - /// @see account_delete_from_db_by_package_name() - /// @see account_update_to_db_by_id() - /// @see account_update_to_db_by_user_name() - int account_insert_to_db( - account_h account, - ffi.Pointer account_db_id, - ) { - return _account_insert_to_db( - account, - account_db_id, - ); - } - - late final _account_insert_to_dbPtr = _lookup< - ffi - .NativeFunction)>>( - 'account_insert_to_db'); - late final _account_insert_to_db = _account_insert_to_dbPtr - .asFunction)>(); - - /// @brief Deletes an account from the account database by account DB ID. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read \n - /// %http://tizen.org/privilege/account.write - /// @remarks This API need both privileges \n - /// Only can delete an account which was added by same package applications - /// @param[in] account_db_id The account ID to delete - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed - /// @retval #ACCOUNT_ERROR_PERMISSION_DENIED The account owner is different from the caller or DB Access fail by permission - /// @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy - /// @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n - /// But the account_connect() is not required to use this function since tizen 2.4. - /// - /// @see account_insert_to_db() - /// @see account_delete_from_db_by_user_name() - /// @see account_delete_from_db_by_package_name() - /// @see account_update_to_db_by_id() - /// @see account_update_to_db_by_user_name() - int account_delete_from_db_by_id( - int account_db_id, - ) { - return _account_delete_from_db_by_id( - account_db_id, - ); - } - - late final _account_delete_from_db_by_idPtr = - _lookup>( - 'account_delete_from_db_by_id'); - late final _account_delete_from_db_by_id = - _account_delete_from_db_by_idPtr.asFunction(); - - /// @brief Deletes an account from the account database by user name. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read \n - /// %http://tizen.org/privilege/account.write - /// @remarks This API need both privileges \n - /// Only can delete accounts which were added by same package applications - /// @param[in] user_name The user name of the account to delete - /// @param[in] package_name The package name of the account to delete - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed - /// @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission - /// @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy - /// @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n - /// But the account_connect() is not required to use this function since tizen 2.4. - /// - /// @see account_insert_to_db() - /// @see account_delete_from_db_by_id() - /// @see account_delete_from_db_by_package_name() - /// @see account_update_to_db_by_id() - /// @see account_update_to_db_by_user_name() - int account_delete_from_db_by_user_name( - ffi.Pointer user_name, - ffi.Pointer package_name, - ) { - return _account_delete_from_db_by_user_name( - user_name, - package_name, - ); - } - - late final _account_delete_from_db_by_user_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('account_delete_from_db_by_user_name'); - late final _account_delete_from_db_by_user_name = - _account_delete_from_db_by_user_namePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Deletes an account from the account database by package name. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read \n - /// %http://tizen.org/privilege/account.write - /// @remarks This API need both privileges \n - /// Only can delete accounts which was added by same package applications - /// @param[in] package_name The package name of account(s) to delete - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed - /// @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission - /// @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy - /// @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n - /// But the account_connect() is not required to use this function since tizen 2.4. - /// - /// @see account_insert_to_db() - /// @see account_delete_from_db_by_id() - /// @see account_delete_from_db_by_user_name() - /// @see account_update_to_db_by_id() - /// @see account_update_to_db_by_user_name() - int account_delete_from_db_by_package_name( - ffi.Pointer package_name, - ) { - return _account_delete_from_db_by_package_name( - package_name, - ); - } - - late final _account_delete_from_db_by_package_namePtr = - _lookup)>>( - 'account_delete_from_db_by_package_name'); - late final _account_delete_from_db_by_package_name = - _account_delete_from_db_by_package_namePtr - .asFunction)>(); - - /// @brief Updates the account details to the account database. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read \n - /// %http://tizen.org/privilege/account.write - /// @remarks This API need both privileges \n - /// Only can update an account which was added by same package applications - /// @param[in] account The account handle - /// @param[in] account_id The account ID to update - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed - /// @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND The account to update does not exist - /// @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission - /// @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy - /// @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n - /// But the account_connect() is not required to use this function since tizen 2.4. - /// - /// @see account_insert_to_db() - /// @see account_delete_from_db_by_id() - /// @see account_delete_from_db_by_user_name() - /// @see account_delete_from_db_by_package_name() - /// @see account_update_to_db_by_user_name() - int account_update_to_db_by_id( - account_h account, - int account_id, - ) { - return _account_update_to_db_by_id( - account, - account_id, - ); - } - - late final _account_update_to_db_by_idPtr = - _lookup>( - 'account_update_to_db_by_id'); - late final _account_update_to_db_by_id = - _account_update_to_db_by_idPtr.asFunction(); - - /// @brief Updates the account details to the account database. - /// The provider permission check has been added since tizen 2.4. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read \n - /// %http://tizen.org/privilege/account.write - /// @remarks This API need both privileges \n - /// Only can update an account which was added by same package applications - /// @param[in] account The account handle - /// @param[in] account_id The account ID to update - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed - /// @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND The account to update does not exist - /// @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission - /// @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy - /// @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n - /// But the account_connect() is not required to use this function since tizen 2.4. - /// - /// @see account_insert_to_db() - /// @see account_delete_from_db_by_id() - /// @see account_delete_from_db_by_user_name() - /// @see account_delete_from_db_by_package_name() - /// @see account_update_to_db_by_user_name() - int account_update_to_db_by_id_ex( - account_h account, - int account_id, - ) { - return _account_update_to_db_by_id_ex( - account, - account_id, - ); - } - - late final _account_update_to_db_by_id_exPtr = - _lookup>( - 'account_update_to_db_by_id_ex'); - late final _account_update_to_db_by_id_ex = _account_update_to_db_by_id_exPtr - .asFunction(); - - /// @brief Updates the account details to the account database. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read \n - /// %http://tizen.org/privilege/account.write - /// @remarks This API need both privileges \n - /// Only can update accounts which were added by same package applications - /// @param[in] account The account handle - /// @param[in] user_name The user name of the account to update - /// @param[in] package_name The package name for the user name - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed - /// @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND The account to update does not exist - /// @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission - /// @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy - /// @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n - /// But the account_connect() is not required to use this function since tizen 2.4. - /// - /// @see account_insert_to_db() - /// @see account_delete_from_db_by_id() - /// @see account_delete_from_db_by_user_name() - /// @see account_delete_from_db_by_package_name() - /// @see account_update_to_db_by_id() - int account_update_to_db_by_user_name( - account_h account, - ffi.Pointer user_name, - ffi.Pointer package_name, - ) { - return _account_update_to_db_by_user_name( - account, - user_name, - package_name, - ); - } - - late final _account_update_to_db_by_user_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_h, ffi.Pointer, - ffi.Pointer)>>('account_update_to_db_by_user_name'); - late final _account_update_to_db_by_user_name = - _account_update_to_db_by_user_namePtr.asFunction< - int Function( - account_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the ID of an account. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] account The account handle - /// @param[out] account_id The account ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - int account_get_account_id( - account_h account, - ffi.Pointer account_id, - ) { - return _account_get_account_id( - account, - account_id, - ); - } - - late final _account_get_account_idPtr = _lookup< - ffi - .NativeFunction)>>( - 'account_get_account_id'); - late final _account_get_account_id = _account_get_account_idPtr - .asFunction)>(); - - /// @brief Gets the user name of an account. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a user_name using free(). - /// - /// @param[in] account The account handle - /// @param[out] user_name The user name of the account - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_set_user_name() - int account_get_user_name( - account_h account, - ffi.Pointer> user_name, - ) { - return _account_get_user_name( - account, - user_name, - ); - } - - late final _account_get_user_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_h, - ffi.Pointer>)>>('account_get_user_name'); - late final _account_get_user_name = _account_get_user_namePtr.asFunction< - int Function(account_h, ffi.Pointer>)>(); - - /// @brief Sets the user name of an account. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] account The account handle - /// @param[in] user_name The string to set as user name - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_get_user_name() - int account_set_user_name( - account_h account, - ffi.Pointer user_name, - ) { - return _account_set_user_name( - account, - user_name, - ); - } - - late final _account_set_user_namePtr = _lookup< - ffi - .NativeFunction)>>( - 'account_set_user_name'); - late final _account_set_user_name = _account_set_user_namePtr - .asFunction)>(); - - /// @brief Gets the display name of an account. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a display_name using free(). - /// - /// @param[in] account The account handle - /// @param[out] display_name The display name of the account - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_get_display_name() - int account_get_display_name( - account_h account, - ffi.Pointer> display_name, - ) { - return _account_get_display_name( - account, - display_name, - ); - } - - late final _account_get_display_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_h, - ffi.Pointer>)>>('account_get_display_name'); - late final _account_get_display_name = - _account_get_display_namePtr.asFunction< - int Function(account_h, ffi.Pointer>)>(); - - /// @brief Sets the display name of an account. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] account The account handle - /// @param[in] display_name The text string to set as the display name - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_get_display_name() - int account_set_display_name( - account_h account, - ffi.Pointer display_name, - ) { - return _account_set_display_name( - account, - display_name, - ); - } - - late final _account_set_display_namePtr = _lookup< - ffi - .NativeFunction)>>( - 'account_set_display_name'); - late final _account_set_display_name = _account_set_display_namePtr - .asFunction)>(); - - /// @brief Gets the capability detail of an account. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] account The account handle - /// @param[in] capability_type The capability type to get the capability value - /// @param[out] capability_value The capability value (on/off) of the specified capability_type - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND There is no given capability_type in the account - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_set_capability() - int account_get_capability( - account_h account, - ffi.Pointer capability_type, - ffi.Pointer capability_value, - ) { - return _account_get_capability( - account, - capability_type, - capability_value, - ); - } - - late final _account_get_capabilityPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_h, ffi.Pointer, - ffi.Pointer)>>('account_get_capability'); - late final _account_get_capability = _account_get_capabilityPtr.asFunction< - int Function(account_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets all the capabilities of an account. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] account The account handle - /// @param[in] callback The callback function - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_set_capability() - int account_get_capability_all( - account_h account, - capability_cb callback, - ffi.Pointer user_data, - ) { - return _account_get_capability_all( - account, - callback, - user_data, - ); - } - - late final _account_get_capability_allPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_h, capability_cb, - ffi.Pointer)>>('account_get_capability_all'); - late final _account_get_capability_all = - _account_get_capability_allPtr.asFunction< - int Function(account_h, capability_cb, ffi.Pointer)>(); - - /// @brief Sets the capability. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] account The account handle - /// @param[in] capability_type The capability type - /// @param[in] capability_state The capability state - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_get_capability() - int account_set_capability( - account_h account, - ffi.Pointer capability_type, - int capability_state, - ) { - return _account_set_capability( - account, - capability_type, - capability_state, - ); - } - - late final _account_set_capabilityPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_h, ffi.Pointer, - ffi.Int32)>>('account_set_capability'); - late final _account_set_capability = _account_set_capabilityPtr - .asFunction, int)>(); - - /// @brief Gets the icon path. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a icon_path using free(). - /// - /// @param[in] account The account handle - /// @param[out] icon_path The icon path - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_set_icon_path() - int account_get_icon_path( - account_h account, - ffi.Pointer> icon_path, - ) { - return _account_get_icon_path( - account, - icon_path, - ); - } - - late final _account_get_icon_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_h, - ffi.Pointer>)>>('account_get_icon_path'); - late final _account_get_icon_path = _account_get_icon_pathPtr.asFunction< - int Function(account_h, ffi.Pointer>)>(); - - /// @brief Sets the icon path. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] account The account handle - /// @param[in] icon_path The text string to set as the icon path - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_get_icon_path() - int account_set_icon_path( - account_h account, - ffi.Pointer icon_path, - ) { - return _account_set_icon_path( - account, - icon_path, - ); - } - - late final _account_set_icon_pathPtr = _lookup< - ffi - .NativeFunction)>>( - 'account_set_icon_path'); - late final _account_set_icon_path = _account_set_icon_pathPtr - .asFunction)>(); - - /// @brief Gets the domain name. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a domain_name using free(). - /// - /// @param[in] account The account handle - /// @param[out] domain_name The domain name - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_set_domain_name() - int account_get_domain_name( - account_h account, - ffi.Pointer> domain_name, - ) { - return _account_get_domain_name( - account, - domain_name, - ); - } - - late final _account_get_domain_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_h, - ffi.Pointer>)>>('account_get_domain_name'); - late final _account_get_domain_name = _account_get_domain_namePtr.asFunction< - int Function(account_h, ffi.Pointer>)>(); - - /// @brief Sets the domain name. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] account The account handle - /// @param[in] domain_name The text string to set as the domain name - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_get_domain_name() - int account_set_domain_name( - account_h account, - ffi.Pointer domain_name, - ) { - return _account_set_domain_name( - account, - domain_name, - ); - } - - late final _account_set_domain_namePtr = _lookup< - ffi - .NativeFunction)>>( - 'account_set_domain_name'); - late final _account_set_domain_name = _account_set_domain_namePtr - .asFunction)>(); - - /// @brief Gets the email address. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a email_address using free(). - /// - /// @param[in] account The account handle - /// @param[out] email_address The email address - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_set_email_address() - int account_get_email_address( - account_h account, - ffi.Pointer> email_address, - ) { - return _account_get_email_address( - account, - email_address, - ); - } - - late final _account_get_email_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_h, ffi.Pointer>)>>( - 'account_get_email_address'); - late final _account_get_email_address = - _account_get_email_addressPtr.asFunction< - int Function(account_h, ffi.Pointer>)>(); - - /// @brief Sets the email address. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] account The account handle - /// @param[in] email_address The text string to set as the email address - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_get_email_address() - int account_set_email_address( - account_h account, - ffi.Pointer email_address, - ) { - return _account_set_email_address( - account, - email_address, - ); - } - - late final _account_set_email_addressPtr = _lookup< - ffi - .NativeFunction)>>( - 'account_set_email_address'); - late final _account_set_email_address = _account_set_email_addressPtr - .asFunction)>(); - - /// @brief Gets the package name. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a package_name using free(). - /// - /// @param[in] account The account handle - /// @param[out] package_name The package name - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_set_package_name() - int account_get_package_name( - account_h account, - ffi.Pointer> package_name, - ) { - return _account_get_package_name( - account, - package_name, - ); - } - - late final _account_get_package_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_h, - ffi.Pointer>)>>('account_get_package_name'); - late final _account_get_package_name = - _account_get_package_namePtr.asFunction< - int Function(account_h, ffi.Pointer>)>(); - - /// @brief Sets the package name. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] account The account handle - /// @param[in] package_name The text string to set as the package name - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_get_email_address() - int account_set_package_name( - account_h account, - ffi.Pointer package_name, - ) { - return _account_set_package_name( - account, - package_name, - ); - } - - late final _account_set_package_namePtr = _lookup< - ffi - .NativeFunction)>>( - 'account_set_package_name'); - late final _account_set_package_name = _account_set_package_namePtr - .asFunction)>(); - - /// @brief Gets the access token. Access token field is used to store account secrets (such as password or master token). - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a access_token using free(). - /// @remarks Access token field is used for storing account secret (password / master token etc) - /// - /// @param[in] account The account handle - /// @param[out] access_token The access token - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// Only account owner application can retrieve account password / access_token. For others this field will be null. - /// @see account_set_access_token() - int account_get_access_token( - account_h account, - ffi.Pointer> access_token, - ) { - return _account_get_access_token( - account, - access_token, - ); - } - - late final _account_get_access_tokenPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_h, - ffi.Pointer>)>>('account_get_access_token'); - late final _account_get_access_token = - _account_get_access_tokenPtr.asFunction< - int Function(account_h, ffi.Pointer>)>(); - - /// @brief Sets the access token. Access token field is used to store account secrets (such as password or master token). - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks Only account owner application can retrieve account password / access_token. For others this field will be null. - /// - /// @param[in] account The account handle - /// @param[in] access_token The text string to set as the access token - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// @see account_get_access_token() - int account_set_access_token( - account_h account, - ffi.Pointer access_token, - ) { - return _account_set_access_token( - account, - access_token, - ); - } - - late final _account_set_access_tokenPtr = _lookup< - ffi - .NativeFunction)>>( - 'account_set_access_token'); - late final _account_set_access_token = _account_set_access_tokenPtr - .asFunction)>(); - - /// @brief Gets the user text. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a user_text using free(). - /// - /// @param[in] account The account handle - /// @param[in] user_text_index The index of the user text (range: 0 ~ 4) - /// @param[out] user_text The user text - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_set_user_text() - int account_get_user_text( - account_h account, - int user_text_index, - ffi.Pointer> user_text, - ) { - return _account_get_user_text( - account, - user_text_index, - user_text, - ); - } - - late final _account_get_user_textPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_h, ffi.Int, - ffi.Pointer>)>>('account_get_user_text'); - late final _account_get_user_text = _account_get_user_textPtr.asFunction< - int Function(account_h, int, ffi.Pointer>)>(); - - /// @brief Sets the user text. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] account The account handle - /// @param[in] user_text_index The index of the user text (must be in range from @c 0 to @c 4) - /// @param[in] user_text The text string to set as the user text - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_get_user_text() - int account_set_user_text( - account_h account, - int user_text_index, - ffi.Pointer user_text, - ) { - return _account_set_user_text( - account, - user_text_index, - user_text, - ); - } - - late final _account_set_user_textPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_h, ffi.Int, - ffi.Pointer)>>('account_set_user_text'); - late final _account_set_user_text = _account_set_user_textPtr - .asFunction)>(); - - /// @brief Gets the user integer. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] account The account handle - /// @param[in] user_int_index The index of the user integer (must be in range from @c 0 to @c 4) - /// @param[out] user_integer The user integer - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_set_user_int() - int account_get_user_int( - account_h account, - int user_int_index, - ffi.Pointer user_integer, - ) { - return _account_get_user_int( - account, - user_int_index, - user_integer, - ); - } - - late final _account_get_user_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_h, ffi.Int, - ffi.Pointer)>>('account_get_user_int'); - late final _account_get_user_int = _account_get_user_intPtr - .asFunction)>(); - - /// @brief Sets the user integer. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] account The account handle - /// @param[in] user_int_index The index of the user integer (must be in range from @c 0 to @c 4) - /// @param[in] user_integer The integer to set as the user integer - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_get_user_int() - int account_set_user_int( - account_h account, - int user_int_index, - int user_integer, - ) { - return _account_set_user_int( - account, - user_int_index, - user_integer, - ); - } - - late final _account_set_user_intPtr = _lookup< - ffi.NativeFunction>( - 'account_set_user_int'); - late final _account_set_user_int = - _account_set_user_intPtr.asFunction(); - - /// @brief Gets the authentication type. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] account The account handle - /// @param[out] auth_type The authentication type - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_set_auth_type() - int account_get_auth_type( - account_h account, - ffi.Pointer auth_type, - ) { - return _account_get_auth_type( - account, - auth_type, - ); - } - - late final _account_get_auth_typePtr = _lookup< - ffi - .NativeFunction)>>( - 'account_get_auth_type'); - late final _account_get_auth_type = _account_get_auth_typePtr - .asFunction)>(); - - /// @brief Sets the authentication type. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] account The account handle - /// @param[in] auth_type The integer to be set as the authentication type - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_get_auth_type() - int account_set_auth_type( - account_h account, - int auth_type, - ) { - return _account_set_auth_type( - account, - auth_type, - ); - } - - late final _account_set_auth_typePtr = - _lookup>( - 'account_set_auth_type'); - late final _account_set_auth_type = - _account_set_auth_typePtr.asFunction(); - - /// @brief Gets the secret. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] account The account handle - /// @param[out] secret The secret - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_set_secret() - int account_get_secret( - account_h account, - ffi.Pointer secret, - ) { - return _account_get_secret( - account, - secret, - ); - } - - late final _account_get_secretPtr = _lookup< - ffi - .NativeFunction)>>( - 'account_get_secret'); - late final _account_get_secret = _account_get_secretPtr - .asFunction)>(); - - /// @brief Sets the secret. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] account The account handle - /// @param[in] secret The secrecy to be set - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_get_secret() - int account_set_secret( - account_h account, - int secret, - ) { - return _account_set_secret( - account, - secret, - ); - } - - late final _account_set_secretPtr = - _lookup>( - 'account_set_secret'); - late final _account_set_secret = - _account_set_secretPtr.asFunction(); - - /// @brief Gets the sync support. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] account The account handle - /// @param[out] sync_support The sync support - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_set_sync_support() - int account_get_sync_support( - account_h account, - ffi.Pointer sync_support, - ) { - return _account_get_sync_support( - account, - sync_support, - ); - } - - late final _account_get_sync_supportPtr = _lookup< - ffi - .NativeFunction)>>( - 'account_get_sync_support'); - late final _account_get_sync_support = _account_get_sync_supportPtr - .asFunction)>(); - - /// @brief Sets the sync support. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] account The account handle - /// @param[in] sync_support The sync state to be set - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_get_sync_support() - int account_set_sync_support( - account_h account, - int sync_support, - ) { - return _account_set_sync_support( - account, - sync_support, - ); - } - - late final _account_set_sync_supportPtr = - _lookup>( - 'account_set_sync_support'); - late final _account_set_sync_support = - _account_set_sync_supportPtr.asFunction(); - - /// @brief Gets the source. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a source using free(). - /// - /// @param[in] account The account handle - /// @param[out] source The source - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_set_source() - int account_get_source( - account_h account, - ffi.Pointer> source, - ) { - return _account_get_source( - account, - source, - ); - } - - late final _account_get_sourcePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_h, - ffi.Pointer>)>>('account_get_source'); - late final _account_get_source = _account_get_sourcePtr.asFunction< - int Function(account_h, ffi.Pointer>)>(); - - /// @brief Sets the source. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] account The account handle - /// @param[in] source The text string to set as the source - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_get_source() - int account_set_source( - account_h account, - ffi.Pointer source, - ) { - return _account_set_source( - account, - source, - ); - } - - late final _account_set_sourcePtr = _lookup< - ffi - .NativeFunction)>>( - 'account_set_source'); - late final _account_set_source = _account_set_sourcePtr - .asFunction)>(); - - /// @brief Sets the custom. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] account The account handle - /// @param[in] key The user custom key for the specific value - /// @param[in] value The user custom value about the given key - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_get_custom() - int account_set_custom( - account_h account, - ffi.Pointer key, - ffi.Pointer value, - ) { - return _account_set_custom( - account, - key, - value, - ); - } - - late final _account_set_customPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_h, ffi.Pointer, - ffi.Pointer)>>('account_set_custom'); - late final _account_set_custom = _account_set_customPtr.asFunction< - int Function(account_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the user specific custom text of an account key. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a value using free(). - /// - /// @param[in] account The account handle - /// @param[in] key The key to retrieve custom text - /// @param[out] value The text of the given key - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND There is no given capability type in the account - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_set_custom() - int account_get_custom( - account_h account, - ffi.Pointer key, - ffi.Pointer> value, - ) { - return _account_get_custom( - account, - key, - value, - ); - } - - late final _account_get_customPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_h, ffi.Pointer, - ffi.Pointer>)>>('account_get_custom'); - late final _account_get_custom = _account_get_customPtr.asFunction< - int Function(account_h, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets all the user custom texts of an account. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] account The account handle - /// @param[in] callback The callback function to retrieve all custom text \n - /// The callback function gives the key and value. - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_set_custom() - int account_get_custom_all( - account_h account, - account_custom_cb callback, - ffi.Pointer user_data, - ) { - return _account_get_custom_all( - account, - callback, - user_data, - ); - } - - late final _account_get_custom_allPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_h, account_custom_cb, - ffi.Pointer)>>('account_get_custom_all'); - late final _account_get_custom_all = _account_get_custom_allPtr.asFunction< - int Function(account_h, account_custom_cb, ffi.Pointer)>(); - - /// @brief Retrieves all accounts details by invoking the given callback function iteratively. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed - /// @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission - /// @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND Related record does not exist - /// @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy - /// @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n - /// But the account_connect() is not required to use this function since tizen 2.4. - /// @post This function invokes account_cb(). - /// - /// @see account_query_account_by_account_id() - /// @see account_query_account_by_user_name() - /// @see account_query_account_by_package_name() - /// @see account_query_account_by_capability() - int account_foreach_account_from_db( - account_cb callback, - ffi.Pointer user_data, - ) { - return _account_foreach_account_from_db( - callback, - user_data, - ); - } - - late final _account_foreach_account_from_dbPtr = _lookup< - ffi - .NativeFunction)>>( - 'account_foreach_account_from_db'); - late final _account_foreach_account_from_db = - _account_foreach_account_from_dbPtr - .asFunction)>(); - - /// @brief Retrieves an account with the account ID. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read - /// @remarks You must allocate @a account using account_create() and release using account_destroy(). - /// - /// @param[in] account_db_id The account database ID to search - /// @param[out] account The account handle \n - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed - /// @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission - /// @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy - /// @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n - /// But the account_connect() is not required to use this function since tizen 2.4. - /// - /// @see account_query_account_by_user_name() - /// @see account_query_account_by_package_name() - /// @see account_query_account_by_capability() - int account_query_account_by_account_id( - int account_db_id, - ffi.Pointer account, - ) { - return _account_query_account_by_account_id( - account_db_id, - account, - ); - } - - late final _account_query_account_by_account_idPtr = _lookup< - ffi - .NativeFunction)>>( - 'account_query_account_by_account_id'); - late final _account_query_account_by_account_id = - _account_query_account_by_account_idPtr - .asFunction)>(); - - /// @brief Retrieves all accounts with the user name. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read - /// @param[in] callback The callback function to invoke - /// @param[in] user_name The user name to search - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed - /// @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission - /// @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy - /// @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n - /// But the account_connect() is not required to use this function since tizen 2.4. - /// @post This function invokes account_cb(). - /// - /// @see account_foreach_account_from_db() - /// @see account_query_account_by_account_id() - /// @see account_query_account_by_package_name() - /// @see account_query_account_by_capability() - int account_query_account_by_user_name( - account_cb callback, - ffi.Pointer user_name, - ffi.Pointer user_data, - ) { - return _account_query_account_by_user_name( - callback, - user_name, - user_data, - ); - } - - late final _account_query_account_by_user_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_cb, ffi.Pointer, - ffi.Pointer)>>('account_query_account_by_user_name'); - late final _account_query_account_by_user_name = - _account_query_account_by_user_namePtr.asFunction< - int Function( - account_cb, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Retrieves all accounts with the package name. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read - /// @param[in] callback The callback function to invoke - /// @param[in] package_name The package name to search - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed - /// @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission - /// @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy - /// @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n - /// But the account_connect() is not required to use this function since tizen 2.4. - /// @post This function invokes account_cb(). - /// - /// @see account_foreach_account_from_db() - /// @see account_query_account_by_account_id() - /// @see account_query_account_by_user_name() - /// @see account_query_account_by_capability() - int account_query_account_by_package_name( - account_cb callback, - ffi.Pointer package_name, - ffi.Pointer user_data, - ) { - return _account_query_account_by_package_name( - callback, - package_name, - user_data, - ); - } - - late final _account_query_account_by_package_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_cb, ffi.Pointer, - ffi.Pointer)>>('account_query_account_by_package_name'); - late final _account_query_account_by_package_name = - _account_query_account_by_package_namePtr.asFunction< - int Function( - account_cb, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Retrieves all accounts with the capability type and capability value. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read - /// @param[in] callback The callback function to invoke - /// @param[in] capability_type The capability type to search - /// @param[in] capability_value The capability value to search - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed - /// @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission - /// @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy - /// @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n - /// But the account_connect() is not required to use this function since tizen 2.4. - /// @post This function invokes account_cb(). - /// - /// @see account_foreach_account_from_db() - /// @see account_query_account_by_account_id() - /// @see account_query_account_by_user_name() - /// @see account_query_account_by_package_name() - int account_query_account_by_capability( - account_cb callback, - ffi.Pointer capability_type, - int capability_value, - ffi.Pointer user_data, - ) { - return _account_query_account_by_capability( - callback, - capability_type, - capability_value, - user_data, - ); - } - - late final _account_query_account_by_capabilityPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_cb, ffi.Pointer, ffi.Int32, - ffi.Pointer)>>('account_query_account_by_capability'); - late final _account_query_account_by_capability = - _account_query_account_by_capabilityPtr.asFunction< - int Function( - account_cb, ffi.Pointer, int, ffi.Pointer)>(); - - /// @brief Retrieves all accounts with the capability type. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read - /// @param[in] callback The callback function to invoke - /// @param[in] capability_type The capability type to search - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed - /// @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission - /// @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy - /// @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n - /// But the account_connect() is not required to use this function since tizen 2.4. - /// @post This function invokes account_cb(). - /// - /// @see account_foreach_account_from_db() - /// @see account_query_account_by_account_id() - /// @see account_query_account_by_user_name() - /// @see account_query_account_by_package_name() - int account_query_account_by_capability_type( - account_cb callback, - ffi.Pointer capability_type, - ffi.Pointer user_data, - ) { - return _account_query_account_by_capability_type( - callback, - capability_type, - user_data, - ); - } - - late final _account_query_account_by_capability_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - account_cb, ffi.Pointer, ffi.Pointer)>>( - 'account_query_account_by_capability_type'); - late final _account_query_account_by_capability_type = - _account_query_account_by_capability_typePtr.asFunction< - int Function( - account_cb, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Retrieves all capabilities with the account database ID. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read - /// @param[in] callback The callback function to invoke - /// @param[in] account_db_id The account database ID to search - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed - /// @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission - /// @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy - /// @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n - /// But the account_connect() is not required to use this function since tizen 2.4. - /// @post This function invokes capability_cb(). - /// - /// @see account_get_capability() - /// @see account_set_capability() - int account_query_capability_by_account_id( - capability_cb callback, - int account_db_id, - ffi.Pointer user_data, - ) { - return _account_query_capability_by_account_id( - callback, - account_db_id, - user_data, - ); - } - - late final _account_query_capability_by_account_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(capability_cb, ffi.Int, ffi.Pointer)>>( - 'account_query_capability_by_account_id'); - late final _account_query_capability_by_account_id = - _account_query_capability_by_account_idPtr.asFunction< - int Function(capability_cb, int, ffi.Pointer)>(); - - /// @brief Gets the count of accounts in the account database. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read - /// @param[out] count The out parameter for count of all accounts - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed - /// @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission - /// @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy - /// @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n - /// But the account_connect() is not required to use this function since tizen 2.4. - int account_get_total_count_from_db( - ffi.Pointer count, - ) { - return _account_get_total_count_from_db( - count, - ); - } - - late final _account_get_total_count_from_dbPtr = - _lookup)>>( - 'account_get_total_count_from_db'); - late final _account_get_total_count_from_db = - _account_get_total_count_from_dbPtr - .asFunction)>(); - - /// @brief Updates the sync status of an account with the given account ID. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read \n - /// %http://tizen.org/privilege/account.write - /// @remarks This API need both privileges \n - /// Only can update an account which was added by same package applications - /// @param[in] account_db_id The account ID for which sync status needs to be changed - /// @param[in] sync_status The new sync status - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed - /// @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission - /// @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy - /// @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n - /// But the account_connect() is not required to use this function since tizen 2.4. - int account_update_sync_status_by_id( - int account_db_id, - int sync_status, - ) { - return _account_update_sync_status_by_id( - account_db_id, - sync_status, - ); - } - - late final _account_update_sync_status_by_idPtr = - _lookup>( - 'account_update_sync_status_by_id'); - late final _account_update_sync_status_by_id = - _account_update_sync_status_by_idPtr.asFunction(); - - /// @brief Creates a handle to the account provider. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a account_type handle using account_type_destroy().\n - /// - /// @param[in] account_type The account provider handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_type_destroy() - int account_type_create( - ffi.Pointer account_type, - ) { - return _account_type_create( - account_type, - ); - } - - late final _account_type_createPtr = _lookup< - ffi.NativeFunction)>>( - 'account_type_create'); - late final _account_type_create = _account_type_createPtr - .asFunction)>(); - - /// @brief Destroys the account provider handle and releases all its resources. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// - /// @remarks When you get @a account_type_h using account_type_create(), you must release the handle using account_destroy() to avoid the memory leak. - /// - /// @param[in] account_type The account provider handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_type_create() - int account_type_destroy( - account_type_h account_type, - ) { - return _account_type_destroy( - account_type, - ); - } - - late final _account_type_destroyPtr = - _lookup>( - 'account_type_destroy'); - late final _account_type_destroy = - _account_type_destroyPtr.asFunction(); - - /// @brief Retrieves capability information with your application ID. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read - /// @param[in] callback The callback function carries the capability name of an app ID - /// @param[in] app_id The application ID to search - /// @param[in] user_data The user data \n - /// If you have your private data to carry into callback function, then you can use it. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed - /// @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission - /// @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy - /// @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n - /// But the account_connect() is not required to use this function since tizen 2.4. - int account_type_query_provider_feature_by_app_id( - provider_feature_cb callback, - ffi.Pointer app_id, - ffi.Pointer user_data, - ) { - return _account_type_query_provider_feature_by_app_id( - callback, - app_id, - user_data, - ); - } - - late final _account_type_query_provider_feature_by_app_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(provider_feature_cb, ffi.Pointer, - ffi.Pointer)>>( - 'account_type_query_provider_feature_by_app_id'); - late final _account_type_query_provider_feature_by_app_id = - _account_type_query_provider_feature_by_app_idPtr.asFunction< - int Function(provider_feature_cb, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Checks whether the given application ID supports the capability. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] app_id The application ID - /// @param[in] capability The capability \n - /// For example, ACCOUNT_SUPPORTS_CAPABILITY_CONTACT or "http://tizen.org/account/capability/contact" - /// - /// @return @c TRUE if the application supports the given capability, \n - /// otherwise @c FALSE if the application does not support the given capability - /// @retval @c TRUE means the application supports the given capability - /// @retval @c FALSE means the application does not support the given capability - /// @exception #ACCOUNT_ERROR_NONE Successful - /// @exception #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #ACCOUNT_ERROR_RECORD_NOT_FOUND Related record does not exist - /// @exception #ACCOUNT_ERROR_DB_FAILED Database operation failed - /// @exception #ACCOUNT_ERROR_PERMISSION_DENIED DB access fail by permission - /// @exception #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy - /// @exception #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened - /// @exception #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n - /// But the account_connect() is not required to use this function since tizen 2.4. - bool account_type_query_supported_feature( - ffi.Pointer app_id, - ffi.Pointer capability, - ) { - return _account_type_query_supported_feature( - app_id, - capability, - ); - } - - late final _account_type_query_supported_featurePtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer)>>('account_type_query_supported_feature'); - late final _account_type_query_supported_feature = - _account_type_query_supported_featurePtr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the application ID of an account provider. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a app_id using free(). - /// - /// @param[in] account_type The account provider handle \n - /// It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db(). - /// @param[out] app_id The application ID of an account provider item - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_type_foreach_account_type_from_db() - /// @see account_type_query_by_app_id() - int account_type_get_app_id( - account_type_h account_type, - ffi.Pointer> app_id, - ) { - return _account_type_get_app_id( - account_type, - app_id, - ); - } - - late final _account_type_get_app_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_type_h, - ffi.Pointer>)>>('account_type_get_app_id'); - late final _account_type_get_app_id = _account_type_get_app_idPtr.asFunction< - int Function(account_type_h, ffi.Pointer>)>(); - - /// @brief Gets the service provider ID of an account provider. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a service_provider_id using free(). - /// - /// @param[in] account_type The account provider handle \n - /// It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db(). - /// @param[out] service_provider_id The service provider text ID of an account provider item - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_type_foreach_account_type_from_db() - /// @see account_type_query_by_app_id() - int account_type_get_service_provider_id( - account_type_h account_type, - ffi.Pointer> service_provider_id, - ) { - return _account_type_get_service_provider_id( - account_type, - service_provider_id, - ); - } - - late final _account_type_get_service_provider_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - account_type_h, ffi.Pointer>)>>( - 'account_type_get_service_provider_id'); - late final _account_type_get_service_provider_id = - _account_type_get_service_provider_idPtr.asFunction< - int Function(account_type_h, ffi.Pointer>)>(); - - /// @brief Gets the icon path of an account provider. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a icon_path using free(). - /// - /// @param[in] account_type The account provider handle \n - /// It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db(). - /// @param[out] icon_path The icon path of the account provider item - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_type_foreach_account_type_from_db() - /// @see account_type_query_by_app_id() - int account_type_get_icon_path( - account_type_h account_type, - ffi.Pointer> icon_path, - ) { - return _account_type_get_icon_path( - account_type, - icon_path, - ); - } - - late final _account_type_get_icon_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - account_type_h, ffi.Pointer>)>>( - 'account_type_get_icon_path'); - late final _account_type_get_icon_path = - _account_type_get_icon_pathPtr.asFunction< - int Function(account_type_h, ffi.Pointer>)>(); - - /// @brief Gets the small icon path of an account provider. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a small_icon_path using free(). - /// - /// @param[in] account_type The account provider handle\n - /// It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db(). - /// @param[out] small_icon_path The small icon path of the account provider item - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_type_foreach_account_type_from_db() - /// @see account_type_query_by_app_id() - int account_type_get_small_icon_path( - account_type_h account_type, - ffi.Pointer> small_icon_path, - ) { - return _account_type_get_small_icon_path( - account_type, - small_icon_path, - ); - } - - late final _account_type_get_small_icon_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - account_type_h, ffi.Pointer>)>>( - 'account_type_get_small_icon_path'); - late final _account_type_get_small_icon_path = - _account_type_get_small_icon_pathPtr.asFunction< - int Function(account_type_h, ffi.Pointer>)>(); - - /// @brief Checks whether the given account provider supports multiple accounts. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] account_type The account provider handle \n - /// It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db. - /// @param[out] multiple_account_support The flag indicating support for multiple accounts accounts\n - /// TRUE or FALSE. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_type_foreach_account_type_from_db() - /// @see account_type_query_by_app_id() - int account_type_get_multiple_account_support( - account_type_h account_type, - ffi.Pointer multiple_account_support, - ) { - return _account_type_get_multiple_account_support( - account_type, - multiple_account_support, - ); - } - - late final _account_type_get_multiple_account_supportPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_type_h, ffi.Pointer)>>( - 'account_type_get_multiple_account_support'); - late final _account_type_get_multiple_account_support = - _account_type_get_multiple_account_supportPtr - .asFunction)>(); - - /// @brief Gets capability information with the given account provider handle. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] account_type The account provider handle\n - /// It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db(). - /// @param[in] callback The callback function that carries the capability name of the app ID - /// @param[in] user_data The user data \n - /// If you have your private data to carry into callback function, then you can use it. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n - /// But the account_connect() is not required to use this function since tizen 2.4. - int account_type_get_provider_feature_all( - account_type_h account_type, - provider_feature_cb callback, - ffi.Pointer user_data, - ) { - return _account_type_get_provider_feature_all( - account_type, - callback, - user_data, - ); - } - - late final _account_type_get_provider_feature_allPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_type_h, provider_feature_cb, - ffi.Pointer)>>('account_type_get_provider_feature_all'); - late final _account_type_get_provider_feature_all = - _account_type_get_provider_feature_allPtr.asFunction< - int Function( - account_type_h, provider_feature_cb, ffi.Pointer)>(); - - /// @brief Gets the specific label information detail of an account provider. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a label using free(). - /// - /// @param[in] account_type The account provider handle\n - /// It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db(). - /// @param[in] locale The locale is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code.\n - /// For example, "ko_KR" or "ko-kr" for Korean, "en_US" or "en-us" for American English. - /// @param[out] label The label text given for the locale - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND No label for the given locale - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_type_foreach_account_type_from_db() - /// @see account_type_query_by_app_id() - int account_type_get_label_by_locale( - account_type_h account_type, - ffi.Pointer locale, - ffi.Pointer> label, - ) { - return _account_type_get_label_by_locale( - account_type, - locale, - label, - ); - } - - late final _account_type_get_label_by_localePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_type_h, ffi.Pointer, - ffi.Pointer>)>>( - 'account_type_get_label_by_locale'); - late final _account_type_get_label_by_locale = - _account_type_get_label_by_localePtr.asFunction< - int Function(account_type_h, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets the label information detail of an account provider. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] account_type The account provider handle\n - /// It should be given by account_type_query_* functions or account_type_foreach_account_type_from_db(). - /// @param[in] callback The callback function carrying the label information - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_type_foreach_account_type_from_db() - /// @see account_type_query_by_app_id() - int account_type_get_label( - account_type_h account_type, - account_label_cb callback, - ffi.Pointer user_data, - ) { - return _account_type_get_label( - account_type, - callback, - user_data, - ); - } - - late final _account_type_get_labelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_type_h, account_label_cb, - ffi.Pointer)>>('account_type_get_label'); - late final _account_type_get_label = _account_type_get_labelPtr.asFunction< - int Function(account_type_h, account_label_cb, ffi.Pointer)>(); - - /// @brief Retrieves the label information with your application ID. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read - /// @param[in] callback The callback function that carries label_h for label information \n - /// label_h contains label info as parameter. - /// @param[in] app_id The application ID to search - /// @param[in] user_data The user data \n - /// If you have your private data to carry into callback function, then you can use it. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed - /// @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission - /// @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy - /// @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n - /// But the account_connect() is not required to use this function since tizen 2.4. - /// - /// @see account_type_query_by_app_id() - /// @see account_type_foreach_account_type_from_db() - int account_type_query_label_by_app_id( - account_label_cb callback, - ffi.Pointer app_id, - ffi.Pointer user_data, - ) { - return _account_type_query_label_by_app_id( - callback, - app_id, - user_data, - ); - } - - late final _account_type_query_label_by_app_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_label_cb, ffi.Pointer, - ffi.Pointer)>>('account_type_query_label_by_app_id'); - late final _account_type_query_label_by_app_id = - _account_type_query_label_by_app_idPtr.asFunction< - int Function(account_label_cb, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Retrieves the account provider information with your application ID. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read - /// @param[in] app_id The application ID to search - /// @param[in,out] account_type The account handle which has to be created by account_type_create() before calling this function and released by account_type_destroy() after calling this function. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed - /// @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND Queried data does not exist - /// @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission - /// @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy - /// @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n - /// But the account_connect() is not required to use this function since tizen 2.4. - /// - /// @see account_type_create() - /// @see account_type_get_app_id() - /// @see account_type_get_service_provider_id() - /// @see account_type_get_icon_path() - /// @see account_type_get_small_icon_path() - /// @see account_type_get_multiple_account_support() - /// @see account_type_get_label() - /// @see account_type_destroy() - int account_type_query_by_app_id( - ffi.Pointer app_id, - ffi.Pointer account_type, - ) { - return _account_type_query_by_app_id( - app_id, - account_type, - ); - } - - late final _account_type_query_by_app_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('account_type_query_by_app_id'); - late final _account_type_query_by_app_id = - _account_type_query_by_app_idPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Retrieves all account provider information. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read - /// @param[in] callback The account provider information \n - /// You can get the account information through account_type_get_* with the carried account_type_handle. - /// @param[in] user_data The user data \n - /// It will be carried through your callback function. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed - /// @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission - /// @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy - /// @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n - /// But the account_connect() is not required to use this function since tizen 2.4. - /// - /// @see account_type_create() - /// @see account_type_get_app_id() - /// @see account_type_get_service_provider_id() - /// @see account_type_get_icon_path() - /// @see account_type_get_small_icon_path() - /// @see account_type_get_multiple_account_support() - /// @see account_type_get_label() - /// @see account_type_destroy() - int account_type_foreach_account_type_from_db( - account_type_cb callback, - ffi.Pointer user_data, - ) { - return _account_type_foreach_account_type_from_db( - callback, - user_data, - ); - } - - late final _account_type_foreach_account_type_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_type_cb, ffi.Pointer)>>( - 'account_type_foreach_account_type_from_db'); - late final _account_type_foreach_account_type_from_db = - _account_type_foreach_account_type_from_dbPtr - .asFunction)>(); - - /// @brief Retrieves the label information with the given application ID and locale. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read - /// @param[in] app_id The application ID - /// @param[in] locale The locale is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code.\n - /// For example, "ko_KR" or "ko-kr" for Korean, "en_US" or "en-us" for American English. - /// @param[out] label The label text corresponding app_id and locale \n - /// It must be free text. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed - /// @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission - /// @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy - /// @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n - /// But the account_connect() is not required to use this function since tizen 2.4. - int account_type_query_label_by_locale( - ffi.Pointer app_id, - ffi.Pointer locale, - ffi.Pointer> label, - ) { - return _account_type_query_label_by_locale( - app_id, - locale, - label, - ); - } - - late final _account_type_query_label_by_localePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>( - 'account_type_query_label_by_locale'); - late final _account_type_query_label_by_locale = - _account_type_query_label_by_localePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Retrieves account provider information with the capability name. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read - /// @param[in] callback The callback function to retrieve account provider information - /// @param[in] key The capability value to search account provider \n - /// For example, ACCOUNT_SUPPORTS_CAPABILITY_CONTACT or "http://tizen.org/account/capability/contact" - /// @param[in] user_data If you have your private data to carry into callback function, then you can use it - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND Record not found - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed - /// @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission - /// @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy - /// @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n - /// But the account_connect() is not required to use this function since tizen 2.4. - int account_type_query_by_provider_feature( - account_type_cb callback, - ffi.Pointer key, - ffi.Pointer user_data, - ) { - return _account_type_query_by_provider_feature( - callback, - key, - user_data, - ); - } - - late final _account_type_query_by_provider_featurePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_type_cb, ffi.Pointer, - ffi.Pointer)>>( - 'account_type_query_by_provider_feature'); - late final _account_type_query_by_provider_feature = - _account_type_query_by_provider_featurePtr.asFunction< - int Function( - account_type_cb, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Checks whether the given app_id exists in the account provider DB. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read - /// @param[in] app_id The application ID to check - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_RECORD_NOT_FOUND Record not found - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid app ID - /// @retval #ACCOUNT_ERROR_DB_FAILED Database operation failed - /// @retval #ACCOUNT_ERROR_PERMISSION_DENIED DB Access fail by permission - /// @retval #ACCOUNT_ERROR_DATABASE_BUSY SQLite handler is busy - /// @retval #ACCOUNT_ERROR_DB_NOT_OPENED Account database did not opened - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires an open connection to an account service by account_connect() on tizen 2.3 (MOBILE).\n - /// But the account_connect() is not required to use this function since tizen 2.4. - /// - /// @see account_type_query_by_app_id() - int account_type_query_app_id_exist( - ffi.Pointer app_id, - ) { - return _account_type_query_app_id_exist( - app_id, - ); - } - - late final _account_type_query_app_id_existPtr = - _lookup)>>( - 'account_type_query_app_id_exist'); - late final _account_type_query_app_id_exist = - _account_type_query_app_id_existPtr - .asFunction)>(); - - /// @brief Creates a handle for the account event subscription. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a account_subscribe handle using account_unsubscribe_notification(). - /// - /// @param[in] account_subscribe The account subscription handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_unsubscribe_notification() - /// @see account_subscribe_notification() - int account_subscribe_create( - ffi.Pointer account_subscribe, - ) { - return _account_subscribe_create( - account_subscribe, - ); - } - - late final _account_subscribe_createPtr = _lookup< - ffi - .NativeFunction)>>( - 'account_subscribe_create'); - late final _account_subscribe_create = _account_subscribe_createPtr - .asFunction)>(); - - /// @brief Starts to subscribe account event through the given callback function. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read \n - /// @param[in] account_subscribe The account subscription handle - /// @param[in] callback The callback function that is called when an account is removed and a data of account is updated from the account database \n - /// It will be called with event message and account ID. - /// @param[in] user_data The user_data that is delivered to callback - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_EVENT_SUBSCRIPTION_FAIL Subscription fail - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre account_subscribe_create() - /// - /// @see account_unsubscribe_notification() - /// @see account_subscribe_notification() - int account_subscribe_notification( - account_subscribe_h account_subscribe, - account_event_cb callback, - ffi.Pointer user_data, - ) { - return _account_subscribe_notification( - account_subscribe, - callback, - user_data, - ); - } - - late final _account_subscribe_notificationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(account_subscribe_h, account_event_cb, - ffi.Pointer)>>('account_subscribe_notification'); - late final _account_subscribe_notification = - _account_subscribe_notificationPtr.asFunction< - int Function( - account_subscribe_h, account_event_cb, ffi.Pointer)>(); - - /// @brief Destroys the account subscribe handle and releases all its resources. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/account.read \n - /// @remarks You must call @a account_unsubscribe_notification when you do not need to subscribe account event. - /// - /// @param[in] account_subscribe The account subscription handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ACCOUNT_ERROR_NONE Successful - /// @retval #ACCOUNT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ACCOUNT_ERROR_EVENT_SUBSCRIPTION_FAIL Unsubscription failed - /// @retval #ACCOUNT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see account_create() - int account_unsubscribe_notification( - account_subscribe_h account_subscribe, - ) { - return _account_unsubscribe_notification( - account_subscribe, - ); - } - - late final _account_unsubscribe_notificationPtr = - _lookup>( - 'account_unsubscribe_notification'); - late final _account_unsubscribe_notification = - _account_unsubscribe_notificationPtr - .asFunction(); - - /// @brief Retrieves all the available FIDO authenticators supported by this Device. - /// @details fido_authenticator_cb() callback is called synchronously once for each authenticator. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/fido.client - /// - /// @param[in] cb The iteration callback handle - /// @param[in] user_data The user data handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FIDO_ERROR_NONE Successful - /// @retval #FIDO_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #FIDO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #FIDO_ERROR_PERMISSION_DENIED The application does not have permission to call this function. - /// @retval #FIDO_ERROR_NOT_SUPPORTED FIDO is not supported on this device. - int fido_foreach_authenticator( - fido_authenticator_cb cb, - ffi.Pointer user_data, - ) { - return _fido_foreach_authenticator( - cb, - user_data, - ); - } - - late final _fido_foreach_authenticatorPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(fido_authenticator_cb, - ffi.Pointer)>>('fido_foreach_authenticator'); - late final _fido_foreach_authenticator = _fido_foreach_authenticatorPtr - .asFunction)>(); - - /// @brief Gets the Authenticator title. - /// @since_tizen 3.0 - /// - /// @remarks The @a title should be released using free(). - /// @param[in] auth The Authenticator handle - /// @param[out] title The title - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FIDO_ERROR_NONE Successful - /// @retval #FIDO_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #FIDO_ERROR_INVALID_PARAMETER Invalid parameter - int fido_authenticator_get_title( - fido_authenticator_h auth, - ffi.Pointer> title, - ) { - return _fido_authenticator_get_title( - auth, - title, - ); - } - - late final _fido_authenticator_get_titlePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - fido_authenticator_h, ffi.Pointer>)>>( - 'fido_authenticator_get_title'); - late final _fido_authenticator_get_title = - _fido_authenticator_get_titlePtr.asFunction< - int Function( - fido_authenticator_h, ffi.Pointer>)>(); - - /// @brief Retrieves the Authenticator AAID (Authenticator Attestation ID). - /// @since_tizen 3.0 - /// - /// @remarks The @a aaid should be released using free(). - /// @param[in] auth The Authenticator handle - /// @param[out] aaid The AAID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FIDO_ERROR_NONE Successful - /// @retval #FIDO_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #FIDO_ERROR_INVALID_PARAMETER Invalid parameter - int fido_authenticator_get_aaid( - fido_authenticator_h auth, - ffi.Pointer> aaid, - ) { - return _fido_authenticator_get_aaid( - auth, - aaid, - ); - } - - late final _fido_authenticator_get_aaidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - fido_authenticator_h, ffi.Pointer>)>>( - 'fido_authenticator_get_aaid'); - late final _fido_authenticator_get_aaid = - _fido_authenticator_get_aaidPtr.asFunction< - int Function( - fido_authenticator_h, ffi.Pointer>)>(); - - /// @brief Retrieves the Authenticator description - /// @since_tizen 3.0 - /// - /// @remarks The @a desc should be released using free(). - /// @param[in] auth The Authenticator handle - /// @param[out] desc The description - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FIDO_ERROR_NONE Successful - /// @retval #FIDO_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #FIDO_ERROR_INVALID_PARAMETER Invalid parameter - int fido_authenticator_get_description( - fido_authenticator_h auth, - ffi.Pointer> desc, - ) { - return _fido_authenticator_get_description( - auth, - desc, - ); - } - - late final _fido_authenticator_get_descriptionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - fido_authenticator_h, ffi.Pointer>)>>( - 'fido_authenticator_get_description'); - late final _fido_authenticator_get_description = - _fido_authenticator_get_descriptionPtr.asFunction< - int Function( - fido_authenticator_h, ffi.Pointer>)>(); - - /// @brief Retrieves the Authenticator assertion scheme. - /// @since_tizen 3.0 - /// - /// @remarks The @a scheme should be released using free(). Refer to FIDO UAF Registry document for more details. - /// @param[in] auth The Authenticator handle - /// @param[out] scheme The assertion scheme. UAFV1TLV is the default assertion scheme - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FIDO_ERROR_NONE Successful - /// @retval #FIDO_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #FIDO_ERROR_INVALID_PARAMETER Invalid parameter - int fido_authenticator_get_assertion_scheme( - fido_authenticator_h auth, - ffi.Pointer> scheme, - ) { - return _fido_authenticator_get_assertion_scheme( - auth, - scheme, - ); - } - - late final _fido_authenticator_get_assertion_schemePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - fido_authenticator_h, ffi.Pointer>)>>( - 'fido_authenticator_get_assertion_scheme'); - late final _fido_authenticator_get_assertion_scheme = - _fido_authenticator_get_assertion_schemePtr.asFunction< - int Function( - fido_authenticator_h, ffi.Pointer>)>(); - - /// @brief Retrieves the Authenticator algorithm. - /// @since_tizen 3.0 - /// - /// @param[in] auth The Authenticator handle - /// @param[out] algo The authentication algorithm - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FIDO_ERROR_NONE Successful - /// @retval #FIDO_ERROR_INVALID_PARAMETER Invalid parameter - int fido_authenticator_get_algorithm( - fido_authenticator_h auth, - ffi.Pointer algo, - ) { - return _fido_authenticator_get_algorithm( - auth, - algo, - ); - } - - late final _fido_authenticator_get_algorithmPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(fido_authenticator_h, - ffi.Pointer)>>('fido_authenticator_get_algorithm'); - late final _fido_authenticator_get_algorithm = - _fido_authenticator_get_algorithmPtr.asFunction< - int Function(fido_authenticator_h, ffi.Pointer)>(); - - /// @brief Retrieves all the available attestation types for this Authenticator. - /// @since_tizen 3.0 - /// - /// @param[in] auth The Authenticator handle - /// @param[in] cb The iteration callback - /// @param[in] user_data The user data - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FIDO_ERROR_NONE Successful - /// @retval #FIDO_ERROR_INVALID_PARAMETER Invalid parameter - int fido_authenticator_foreach_attestation_type( - fido_authenticator_h auth, - fido_attestation_type_cb cb, - ffi.Pointer user_data, - ) { - return _fido_authenticator_foreach_attestation_type( - auth, - cb, - user_data, - ); - } - - late final _fido_authenticator_foreach_attestation_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(fido_authenticator_h, fido_attestation_type_cb, - ffi.Pointer)>>( - 'fido_authenticator_foreach_attestation_type'); - late final _fido_authenticator_foreach_attestation_type = - _fido_authenticator_foreach_attestation_typePtr.asFunction< - int Function(fido_authenticator_h, fido_attestation_type_cb, - ffi.Pointer)>(); - - /// @brief Retrieves the user verification method of this Authenticator. - /// @since_tizen 3.0 - /// - /// @param[in] auth The Authenticator handle - /// @param[out] user_verification The user verification method - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FIDO_ERROR_NONE Successful - /// @retval #FIDO_ERROR_INVALID_PARAMETER Invalid parameter - int fido_authenticator_get_verification_method( - fido_authenticator_h auth, - ffi.Pointer user_verification, - ) { - return _fido_authenticator_get_verification_method( - auth, - user_verification, - ); - } - - late final _fido_authenticator_get_verification_methodPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(fido_authenticator_h, ffi.Pointer)>>( - 'fido_authenticator_get_verification_method'); - late final _fido_authenticator_get_verification_method = - _fido_authenticator_get_verification_methodPtr.asFunction< - int Function(fido_authenticator_h, ffi.Pointer)>(); - - /// @brief Retrieves the key protection method of this Authenticator. - /// @since_tizen 3.0 - /// - /// @param[in] auth The Authenticator handle - /// @param[out] key_protection The key protection method - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FIDO_ERROR_NONE Successful - /// @retval #FIDO_ERROR_INVALID_PARAMETER Invalid parameter - int fido_authenticator_get_key_protection_method( - fido_authenticator_h auth, - ffi.Pointer key_protection, - ) { - return _fido_authenticator_get_key_protection_method( - auth, - key_protection, - ); - } - - late final _fido_authenticator_get_key_protection_methodPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(fido_authenticator_h, ffi.Pointer)>>( - 'fido_authenticator_get_key_protection_method'); - late final _fido_authenticator_get_key_protection_method = - _fido_authenticator_get_key_protection_methodPtr.asFunction< - int Function(fido_authenticator_h, ffi.Pointer)>(); - - /// @brief Retrieves the matcher protection method of this Authenticator. - /// @since_tizen 3.0 - /// - /// @param[in] auth The Authenticator handle - /// @param[out] matcher_protection The matcher protection method - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FIDO_ERROR_NONE Successful - /// @retval #FIDO_ERROR_INVALID_PARAMETER Invalid parameter - int fido_authenticator_get_matcher_protection_method( - fido_authenticator_h auth, - ffi.Pointer matcher_protection, - ) { - return _fido_authenticator_get_matcher_protection_method( - auth, - matcher_protection, - ); - } - - late final _fido_authenticator_get_matcher_protection_methodPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(fido_authenticator_h, ffi.Pointer)>>( - 'fido_authenticator_get_matcher_protection_method'); - late final _fido_authenticator_get_matcher_protection_method = - _fido_authenticator_get_matcher_protection_methodPtr.asFunction< - int Function(fido_authenticator_h, ffi.Pointer)>(); - - /// @brief Retrieves the attachment hint of this Authenticator. - /// @since_tizen 3.0 - /// - /// @param[in] auth The Authenticator handle - /// @param[out] attachment_hint The matcher protection method - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FIDO_ERROR_NONE Successful - /// @retval #FIDO_ERROR_INVALID_PARAMETER Invalid parameter - int fido_authenticator_get_attachment_hint( - fido_authenticator_h auth, - ffi.Pointer attachment_hint, - ) { - return _fido_authenticator_get_attachment_hint( - auth, - attachment_hint, - ); - } - - late final _fido_authenticator_get_attachment_hintPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(fido_authenticator_h, ffi.Pointer)>>( - 'fido_authenticator_get_attachment_hint'); - late final _fido_authenticator_get_attachment_hint = - _fido_authenticator_get_attachment_hintPtr.asFunction< - int Function(fido_authenticator_h, ffi.Pointer)>(); - - /// @brief Checks if the Authenticator is Second factor only which is supported by U2F standards. - /// @since_tizen 3.0 - /// - /// @param[in] auth The Authenticator handle - /// - /// @return @c true if its only second factor, - /// otherwise false. - bool fido_authenticator_get_is_second_factor_only( - fido_authenticator_h auth, - ) { - return _fido_authenticator_get_is_second_factor_only( - auth, - ); - } - - late final _fido_authenticator_get_is_second_factor_onlyPtr = - _lookup>( - 'fido_authenticator_get_is_second_factor_only'); - late final _fido_authenticator_get_is_second_factor_only = - _fido_authenticator_get_is_second_factor_onlyPtr - .asFunction(); - - /// @brief Retrieves the Transaction Confirmation display type of this Authenticator. - /// @since_tizen 3.0 - /// - /// @param[in] auth The Authenticator handle - /// @param[out] tc_display The TC display type - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FIDO_ERROR_NONE Successful - /// @retval #FIDO_ERROR_INVALID_PARAMETER Invalid parameter - int fido_authenticator_get_tc_discplay( - fido_authenticator_h auth, - ffi.Pointer tc_display, - ) { - return _fido_authenticator_get_tc_discplay( - auth, - tc_display, - ); - } - - late final _fido_authenticator_get_tc_discplayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(fido_authenticator_h, - ffi.Pointer)>>('fido_authenticator_get_tc_discplay'); - late final _fido_authenticator_get_tc_discplay = - _fido_authenticator_get_tc_discplayPtr.asFunction< - int Function(fido_authenticator_h, ffi.Pointer)>(); - - /// @brief Retrieves the Transaction Confirmation display content type of this Authenticator. - /// @since_tizen 3.0 - /// - /// @remarks The @a tc_display_content_type should be released using free(). - /// @param[in] auth The Authenticator handle - /// @param[out] tc_display_content_type The TC display content type which is supported MIME type [RFC2049] such as text/plain or image/png - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FIDO_ERROR_NONE Successful - /// @retval #FIDO_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #FIDO_ERROR_INVALID_PARAMETER Invalid parameter - int fido_authenticator_get_tc_display_type( - fido_authenticator_h auth, - ffi.Pointer> tc_display_content_type, - ) { - return _fido_authenticator_get_tc_display_type( - auth, - tc_display_content_type, - ); - } - - late final _fido_authenticator_get_tc_display_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - fido_authenticator_h, ffi.Pointer>)>>( - 'fido_authenticator_get_tc_display_type'); - late final _fido_authenticator_get_tc_display_type = - _fido_authenticator_get_tc_display_typePtr.asFunction< - int Function( - fido_authenticator_h, ffi.Pointer>)>(); - - /// @brief Retrieves the icon of this Authenticator. - /// @since_tizen 3.0 - /// - /// @remarks The @a icon should be released using free(). - /// @param[in] auth The Authenticator handle - /// @param[out] icon The icon. Portable Network Graphic (PNG) format image file representing the icon encoded as a data: url[RFC2397] - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FIDO_ERROR_NONE Successful - /// @retval #FIDO_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #FIDO_ERROR_INVALID_PARAMETER Invalid parameter - int fido_authenticator_get_icon( - fido_authenticator_h auth, - ffi.Pointer> icon, - ) { - return _fido_authenticator_get_icon( - auth, - icon, - ); - } - - late final _fido_authenticator_get_iconPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - fido_authenticator_h, ffi.Pointer>)>>( - 'fido_authenticator_get_icon'); - late final _fido_authenticator_get_icon = - _fido_authenticator_get_iconPtr.asFunction< - int Function( - fido_authenticator_h, ffi.Pointer>)>(); - - /// @brief Gets the FIDO client vendor name. - /// @since_tizen 3.0 - /// - /// @remarks The @a vendor_name should be released using free(). - /// @param[out] vendor_name The vendor name - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FIDO_ERROR_NONE Successful - /// @retval #FIDO_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #FIDO_ERROR_INVALID_PARAMETER Invalid parameter - int fido_get_client_vendor( - ffi.Pointer> vendor_name, - ) { - return _fido_get_client_vendor( - vendor_name, - ); - } - - late final _fido_get_client_vendorPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>)>>('fido_get_client_vendor'); - late final _fido_get_client_vendor = _fido_get_client_vendorPtr - .asFunction>)>(); - - /// @brief Gets the FIDO client vendor version information. - /// @since_tizen 3.0 - /// - /// @param[out] client_major_version The FIDO client major version - /// @param[out] client_minor_version The FIDO client minor version - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FIDO_ERROR_NONE Successful - /// @retval #FIDO_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #FIDO_ERROR_INVALID_PARAMETER Invalid parameter - int fido_get_client_version( - ffi.Pointer client_major_version, - ffi.Pointer client_minor_version, - ) { - return _fido_get_client_version( - client_major_version, - client_minor_version, - ); - } - - late final _fido_get_client_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('fido_get_client_version'); - late final _fido_get_client_version = _fido_get_client_versionPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Checks whether the FIDO message can be processed. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/fido.client - /// - /// @param[in] uaf_message_json The FIDO message in JSON format which is received from the relying party server - /// @param[out] is_supported True if the message can be handled by the device, else false - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FIDO_ERROR_NONE Successful - /// @retval #FIDO_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #FIDO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #FIDO_ERROR_NOT_SUPPORTED FIDO is not supported - /// @retval #FIDO_ERROR_PERMISSION_DENIED The application does not have permission to call this function. - /// @retval #FIDO_ERROR_UNSUPPORTED_VERSION The UAF Message does not specify a protocol version supported by this FIDO UAF Client. - /// @retval #FIDO_ERROR_NO_SUITABLE_AUTHENTICATOR No suitable authenticators found. - /// @retval #FIDO_ERROR_PROTOCOL_ERROR The interaction may have timed out, or the UAF message is malformed. - /// @retval #FIDO_ERROR_UNTRUSTED_FACET_ID The caller's id is not allowed to use this operation. - int fido_uaf_is_supported( - ffi.Pointer uaf_message_json, - ffi.Pointer is_supported, - ) { - return _fido_uaf_is_supported( - uaf_message_json, - is_supported, - ); - } - - late final _fido_uaf_is_supportedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('fido_uaf_is_supported'); - late final _fido_uaf_is_supported = _fido_uaf_is_supportedPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Processes the given FIDO UAF message. - /// @details This function is asynchronous. The response is delivered via fido_uaf_response_message_cb(). - /// Depending on the FIDO message type, this may involve user interactions. - /// - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/fido.client - /// - /// @param[in] uaf_request_json The FIDO UAF message in JSON format which is received from the relying party server - /// @param[in] channel_binding The channel binding data in JSON format which is received from the relying party server - /// @param[in] callback The callback to receive response - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FIDO_ERROR_NONE Successful - /// @retval #FIDO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #FIDO_ERROR_NOT_SUPPORTED FIDO is not supported - /// - /// @see fido_uaf_response_message_cb() - int fido_uaf_get_response_message( - ffi.Pointer uaf_request_json, - ffi.Pointer channel_binding, - fido_uaf_response_message_cb callback, - ffi.Pointer user_data, - ) { - return _fido_uaf_get_response_message( - uaf_request_json, - channel_binding, - callback, - user_data, - ); - } - - late final _fido_uaf_get_response_messagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - fido_uaf_response_message_cb, - ffi.Pointer)>>('fido_uaf_get_response_message'); - late final _fido_uaf_get_response_message = - _fido_uaf_get_response_messagePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - fido_uaf_response_message_cb, ffi.Pointer)>(); - - /// @brief Notifies the FIDO client about the server result. FIDO Server sends the result of processing a UAF message to FIDO client. - /// @remarks This is especially important for cases when a new registration may be considered by the client to be in a pending state - /// until it is communicated that the server accepted it. - /// - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/fido.client - /// - /// @param[in] response_code The status code received from Server, #FIDO_SERVER_STATUS_CODE_OK implies success - /// @param[in] uaf_response_json The FIDO response message sent to server in JSON format - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FIDO_ERROR_NONE Successful - /// @retval #FIDO_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #FIDO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #FIDO_ERROR_NOT_SUPPORTED FIDO is not supported - /// @retval #FIDO_ERROR_PERMISSION_DENIED The application does not have permission to call this function. - /// @retval #FIDO_ERROR_UNSUPPORTED_VERSION The UAF Message does not specify a protocol version supported by this FIDO UAF Client. - /// @retval #FIDO_ERROR_NO_SUITABLE_AUTHENTICATOR No suitable authenticators found. - /// @retval #FIDO_ERROR_PROTOCOL_ERROR The interaction may have timed out, or the UAF message is malformed. - /// @retval #FIDO_ERROR_UNTRUSTED_FACET_ID The caller's id is not allowed to use this operation. - /// - /// @see fido_uaf_response_message_cb() - int fido_uaf_set_server_result( - int response_code, - ffi.Pointer uaf_response_json, - ) { - return _fido_uaf_set_server_result( - response_code, - uaf_response_json, - ); - } - - late final _fido_uaf_set_server_resultPtr = _lookup< - ffi.NativeFunction)>>( - 'fido_uaf_set_server_result'); - late final _fido_uaf_set_server_result = _fido_uaf_set_server_resultPtr - .asFunction)>(); - - /// @brief Creates a bundle object. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @return The bundle object - /// @retval @c NULL - Failure - /// @exception BUNDLE_ERROR_NONE Success - /// @exception BUNDLE_ERROR_OUT_OF_MEMORY Out of memory - /// @see bundle_free() - /// - /// @code - /// #include - /// bundle *b = bundle_create(); // Create a new bundle object - /// bundle_free(b); // Free the bundle - /// @endcode - ffi.Pointer bundle_create() { - return _bundle_create(); - } - - late final _bundle_createPtr = - _lookup Function()>>( - 'bundle_create'); - late final _bundle_create = - _bundle_createPtr.asFunction Function()>(); - - /// @brief Frees the given bundle object with key-value pairs in it. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] b The bundle object to be freed - /// @return The operation result - /// @retval BUNDLE_ERROR_NONE Success - /// @retval BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre @a b must be a valid bundle object. - /// @see bundle_create() - /// - /// @code - /// #include - /// bundle *b = bundle_create(); // Create a new bundle object - /// bundle_free(b); // Free the bundle - /// @endcode - int bundle_free( - ffi.Pointer b, - ) { - return _bundle_free( - b, - ); - } - - late final _bundle_freePtr = - _lookup)>>( - 'bundle_free'); - late final _bundle_free = - _bundle_freePtr.asFunction)>(); - - /// @brief Adds a strings array type key-value pair into a given bundle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] b The bundle object - /// @param[in] key The key - /// @param[in] str_array The string type value; if @c NULL, an empty array is created; you can change an item with - /// @param[in] len The length of the array - /// @return The operation result - /// @retval BUNDLE_ERROR_NONE Success - /// @retval BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval BUNDLE_ERROR_KEY_EXISTS Key already exists - /// @retval BUNDLE_ERROR_OUT_OF_MEMORY Out of memory - /// @pre @a b must be a valid bundle object. - /// @see bundle_get_str_array() - /// - /// @code - /// #include - /// char *sa = {"aaa", "bbb", "ccc"}; // String array of length 3 - /// bundle *b = bundle_create(); - /// bundle_add_str_array(b, "foo", sa, 3); // Add a key-value pair - /// bundle_free(b); - /// @endcode - int bundle_add_str_array( - ffi.Pointer b, - ffi.Pointer key, - ffi.Pointer> str_array, - int len, - ) { - return _bundle_add_str_array( - b, - key, - str_array, - len, - ); - } - - late final _bundle_add_str_arrayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Int)>>('bundle_add_str_array'); - late final _bundle_add_str_array = _bundle_add_str_arrayPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, int)>(); - - /// @brief Deletes a key-value object with the given key. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] b The bundle object - /// @param[in] key The given key - /// @return The operation result - /// @retval BUNDLE_ERROR_NONE Success - /// @retval BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval BUNDLE_ERROR_KEY_NOT_AVAILABLE Key not available - /// @pre @a b must be a valid bundle object. - /// - /// @code - /// #include - /// bundle *b = bundle_create(); // Create a new bundle object - /// bundle_add_str(b, "foo_key", "bar_val"); // Add a key-value pair - /// bundle_del(b, "foo_key"); // Delete "foo_key" from b - /// - /// bundle_free(b); - /// @endcode - int bundle_del( - ffi.Pointer b, - ffi.Pointer key, - ) { - return _bundle_del( - b, - key, - ); - } - - late final _bundle_delPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('bundle_del'); - late final _bundle_del = _bundle_delPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Gets a string array from a given key. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You MUST NOT free or modify the returned string. \n - /// The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] b The bundle object - /// @param[in] key The key - /// @param[out] len The array length - /// @return The pointer to the array of strings - /// @retval @c NULL - Key not found - /// @exception BUNDLE_ERROR_NONE Success - /// @exception BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception BUNDLE_ERROR_KEY_NOT_AVAILABLE Key not available - /// @pre @a b must be a valid bundle object. - /// @see bundle_add_str_array() - /// - /// @code - /// #include - /// bundle *b = bundle_create(); - /// char *sa = {"aaa", "bbb", "ccc"}; // String array of length 3 - /// bundle_add_str_array(b, "foo", sa, 3); // Add a key-value pair - /// - /// char **str_array = NULL; - /// int len_str_array = 0; - /// - /// str_array=bundle_get_str_array(b, "foo", &len_str_array); - /// // str_array = {"aaa", "bbb", "ccc"}, and len_str_array = 3 - /// - /// bundle_free(b); - /// @endcode - ffi.Pointer> bundle_get_str_array( - ffi.Pointer b, - ffi.Pointer key, - ffi.Pointer len, - ) { - return _bundle_get_str_array( - b, - key, - len, - ); - } - - late final _bundle_get_str_arrayPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer> Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('bundle_get_str_array'); - late final _bundle_get_str_array = _bundle_get_str_arrayPtr.asFunction< - ffi.Pointer> Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the number of bundle items. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] b The bundle object - /// @return The number of bundle items - /// @pre @a b must be a valid bundle object. - /// - /// @code - /// #include - /// bundle *b = bundle_create(); // Create a new bundle object - /// bundle_add_str(b, "key1", "val1"); // Add a key-value pair - /// int count = bundle_get_count(b); // count = 1 - /// bundle_add_str(b, "key2", "val2"); // Add another key-value pair - /// count = bundle_get_count(b); // count = 2 - /// - /// bundle_free(b); - /// @endcode - int bundle_get_count( - ffi.Pointer b, - ) { - return _bundle_get_count( - b, - ); - } - - late final _bundle_get_countPtr = - _lookup)>>( - 'bundle_get_count'); - late final _bundle_get_count = - _bundle_get_countPtr.asFunction)>(); - - /// @brief Gets the type of the value with a given key. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] b A bundle - /// @param[in] key A key in the bundle - /// @return The type of a key in @a b - /// @exception BUNDLE_ERROR_NONE Success - /// @exception BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception BUNDLE_ERROR_KEY_NOT_AVAILABLE Key not available - /// @pre @a b must be a valid bundle object. - /// @see bundle_type_t - int bundle_get_type( - ffi.Pointer b, - ffi.Pointer key, - ) { - return _bundle_get_type( - b, - key, - ); - } - - late final _bundle_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('bundle_get_type'); - late final _bundle_get_type = _bundle_get_typePtr - .asFunction, ffi.Pointer)>(); - - /// @brief Duplicates a given bundle object. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] b_from The bundle object to be duplicated - /// @return The new bundle object - /// @retval @c NULL - Failure - /// @exception BUNDLE_ERROR_NONE Success - /// @exception BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre @a b must be a valid bundle object. - /// - /// @code - /// #include - /// bundle *b = bundle_create(); // Create a new bundle object - /// bundle_add_str(b, "foo_key", "bar_val"); // Add a key-value pair - /// bundle *b_dup = bundle_dup(b); // Duplicate b - /// - /// bundle_free(b); - /// bundle_free(b_dup); - /// @endcode - ffi.Pointer bundle_dup( - ffi.Pointer b_from, - ) { - return _bundle_dup( - b_from, - ); - } - - late final _bundle_dupPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('bundle_dup'); - late final _bundle_dup = _bundle_dupPtr - .asFunction Function(ffi.Pointer)>(); - - /// @brief Iterates a callback function for each key-value pair in a given bundle. - /// @details Supports all types of values. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. \n - /// This function supports all types. - /// @param[in] b The bundle object - /// @param[in] iter The iteration callback function - /// @param[in] user_data The data for the callback function - /// @exception BUNDLE_ERROR_NONE Success - /// @exception BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre @a b must be a valid bundle object. - /// @see bundle_keyval_get_type() - /// @see bundle_keyval_type_is_array() - /// @see bundle_keyval_get_basic_val() - /// @see bundle_keyval_get_array_val() - /// - /// @code - /// #include - /// #include - /// void - /// sample_cb(const char *key, const int type, const bundle_keyval_t *kv, void *user_data) - /// { - /// void *basic_val = NULL; - /// size_t basic_size = 0; - /// void **array_val = NULL; - /// int array_len = 0; - /// size_t *array_elem_size = NULL; - /// - /// printf("Key:%s, Type:%d\n", key, type); - /// if (bundle_keyval_type_is_array(kv)) { - /// bundle_keyval_get_array_val(kv, &array_val, &array_len, &array_elem_size); - /// // Do something - /// } - /// else { - /// bundle_keyval_get_basic_val(kv, &basic_val, &basic_size); - /// // Do something - /// } - /// } - /// - /// int main(void) - /// { - /// bundle *b = bundle_create(); // Create a new bundle object - /// bundle_add_str(b, "k1", "v1"); // Add a key-value pair - /// bundle_add_byte(b, "k2", "v2", 3); // Add a key-value pair - /// char *s_arr[] = {"abc", "bcd", "cde"}; - /// bundle_add_str_array(b, "k3", s_arr, 3); // Add a key-value pair - /// bundle_foreach(b, sample_cb, NULL); // Iterate sample_cb() for each key/value - /// - /// return 0; - /// } - /// @endcode - void bundle_foreach( - ffi.Pointer b, - bundle_iterator_t iter, - ffi.Pointer user_data, - ) { - return _bundle_foreach( - b, - iter, - user_data, - ); - } - - late final _bundle_foreachPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, bundle_iterator_t, - ffi.Pointer)>>('bundle_foreach'); - late final _bundle_foreach = _bundle_foreachPtr.asFunction< - void Function( - ffi.Pointer, bundle_iterator_t, ffi.Pointer)>(); - - /// @brief Gets the type of a key-value pair. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] kv A bundle_keyval_t object - /// @return The type of @a kv - /// @retval @c -1 - Failure - /// @exception BUNDLE_ERROR_NONE Success - /// @exception BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre @a kv must be a valid bundle_keyval_t object. - /// @see bundle_foreach() - int bundle_keyval_get_type( - ffi.Pointer kv, - ) { - return _bundle_keyval_get_type( - kv, - ); - } - - late final _bundle_keyval_get_typePtr = _lookup< - ffi.NativeFunction)>>( - 'bundle_keyval_get_type'); - late final _bundle_keyval_get_type = _bundle_keyval_get_typePtr - .asFunction)>(); - - /// @brief Determines whether the type of a key-value pair is an array. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] kv A bundle_keyval_t object - /// @return The operation result - /// @retval @c 1 - @a kv is an array - /// @retval @c 0 - @a kv is not an array - /// @exception BUNDLE_ERROR_NONE Success - /// @exception BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre @a kv must be a valid bundle_keyval_t object. - /// @see bundle_foreach() - int bundle_keyval_type_is_array( - ffi.Pointer kv, - ) { - return _bundle_keyval_type_is_array( - kv, - ); - } - - late final _bundle_keyval_type_is_arrayPtr = _lookup< - ffi.NativeFunction)>>( - 'bundle_keyval_type_is_array'); - late final _bundle_keyval_type_is_array = _bundle_keyval_type_is_arrayPtr - .asFunction)>(); - - /// @brief Gets the value and size of the value from a key-value pair of basic type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must not free @a val. - /// @param[in] kv A bundle_keyval_t object - /// @param[out] val The value - /// @param[out] size The size of @a val - /// @return The operation result - /// @retval BUNDLE_ERROR_NONE Success - /// @retval BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre @a kv must be a valid bundle_keyval_t object. - /// @post @a val and @a size are set. - /// @see bundle_foreach() - int bundle_keyval_get_basic_val( - ffi.Pointer kv, - ffi.Pointer> val, - ffi.Pointer size, - ) { - return _bundle_keyval_get_basic_val( - kv, - val, - size, - ); - } - - late final _bundle_keyval_get_basic_valPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('bundle_keyval_get_basic_val'); - late final _bundle_keyval_get_basic_val = - _bundle_keyval_get_basic_valPtr.asFunction< - int Function(ffi.Pointer, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Gets the value array, length of the array, and size of each array item. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] kv A bundle_keyval_t object - /// @param[out] array_val The array pointer of values - /// @param[out] array_len The length of @a array_val - /// @param[out] array_element_size The array of size of each array element - /// @return The operation result - /// @retval BUNDLE_ERROR_NONE Success - /// @retval BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre @a kv must be a valid bundle_keyval_t object. - /// @post @a array_val, @a array_len, @a array_item_size are set. - /// @see bundle_foreach() - int bundle_keyval_get_array_val( - ffi.Pointer kv, - ffi.Pointer>> array_val, - ffi.Pointer array_len, - ffi.Pointer> array_element_size, - ) { - return _bundle_keyval_get_array_val( - kv, - array_val, - array_len, - array_element_size, - ); - } - - late final _bundle_keyval_get_array_valPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>>, - ffi.Pointer, - ffi.Pointer>)>>( - 'bundle_keyval_get_array_val'); - late final _bundle_keyval_get_array_val = - _bundle_keyval_get_array_valPtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer>>, - ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Encodes a bundle to the bundle_raw format (uses base64 format). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] b The bundle object - /// @param[out] r The returned bundle_raw data(byte data) - /// @a r MUST BE FREED by free(r) - /// @param[out] len The size of @a r (in bytes) - /// @return The size of the raw data - /// @retval BUNDLE_ERROR_NONE Success - /// @retval BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre @a b must be a valid bundle object. - /// - /// @code - /// #include - /// bundle *b = bundle_create(); // Create a new bundle object - /// bundle_add_str(b, "foo_key", "bar_val"); // Add a key-value pair - /// bundle_raw *r; - /// int len; - /// bundle_encode(b, &r, &len); // Encode b - /// - /// bundle_free(b); - /// @endcode - int bundle_encode( - ffi.Pointer b, - ffi.Pointer> r, - ffi.Pointer len, - ) { - return _bundle_encode( - b, - r, - len, - ); - } - - late final _bundle_encodePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('bundle_encode'); - late final _bundle_encode = _bundle_encodePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Deserializes bundle_raw and gets the bundle object. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] r The bundle_raw data to be converted to bundle object - /// @param[in] len The size of @a r - /// @return The bundle object - /// @retval @c NULL - Failure - /// @exception BUNDLE_ERROR_NONE Success - /// @exception BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre @a b must be a valid bundle object. - /// - /// @code - /// #include - /// bundle *b = bundle_create(); // Create a new bundle object - /// bundle_add_str(b, "foo_key", "bar_val"); // Add a key-value pair - /// - /// bundle_raw *encoded_b; - /// int len; - /// bundle_encode(b, &encoded_b, &len); // Encode b - /// - /// bundle *b_dup; - /// b_dup = bundle_decode(encoded_b, len); // Decoded bundle object - /// - /// bundle_free(b); - /// free(encoded_b); - /// bundle_free(b_dup); - /// @endcode - ffi.Pointer bundle_decode( - ffi.Pointer r, - int len, - ) { - return _bundle_decode( - r, - len, - ); - } - - late final _bundle_decodePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Int)>>('bundle_decode'); - late final _bundle_decode = _bundle_decodePtr - .asFunction Function(ffi.Pointer, int)>(); - - /// @brief Adds a string type key-value pair into a bundle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] b The bundle object - /// @param[in] key The key - /// @param[in] str The string type value - /// @return The operation result - /// @retval BUNDLE_ERROR_NONE Success - /// @retval BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval BUNDLE_ERROR_KEY_EXISTS Key already exists - /// @retval BUNDLE_ERROR_OUT_OF_MEMORY Out of memory - /// @pre @a b must be a valid bundle object. - /// @see bundle_get_str() - /// @code - /// #include - /// bundle *b = bundle_create(); // Create a new bundle object - /// bundle_add_str(b, "foo", "bar"); // Add a key-value pair - /// - /// bundle_free(b); - /// @endcode - int bundle_add_str( - ffi.Pointer b, - ffi.Pointer key, - ffi.Pointer str, - ) { - return _bundle_add_str( - b, - key, - str, - ); - } - - late final _bundle_add_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('bundle_add_str'); - late final _bundle_add_str = _bundle_add_strPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Adds a byte type key-value pair into a bundle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] b The bundle object - /// @param[in] key The key - /// @param[in] byte The string type value - /// @param[in] size The size of @a byte - /// @return The operation result - /// @retval BUNDLE_ERROR_NONE Success - /// @retval BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval BUNDLE_ERROR_KEY_EXISTS Key already exists - /// @retval BUNDLE_ERROR_OUT_OF_MEMORY Out of memory - /// @pre @a b must be a valid bundle object. - /// @see bundle_get_byte() - /// - /// @code - /// #include - /// bundle *b = bundle_create(); // Create a new bundle object - /// bundle_add_byte(b, "foo", "bar\0", 4); // Add a key-value pair - /// - /// int number = 12345; - /// bundle_add_byte(b, "number", &number, sizeof(int)); - /// - /// bundle_free(b); - /// @endcode - int bundle_add_byte( - ffi.Pointer b, - ffi.Pointer key, - ffi.Pointer byte, - int size, - ) { - return _bundle_add_byte( - b, - key, - byte, - size, - ); - } - - late final _bundle_add_bytePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Size)>>('bundle_add_byte'); - late final _bundle_add_byte = _bundle_add_bytePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - /// @brief Gets the string value with the given key. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must not free str. - /// @param[in] b The bundle object - /// @param[in] key The key - /// @param[out] str The returned value - /// @return The operation result - /// @retval BUNDLE_ERROR_NONE Success - /// @retval BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval BUNDLE_ERROR_KEY_NOT_AVAILABLE Key not available - /// @pre @a b must be a valid bundle object. - /// @see bundle_add_str() - /// - /// @code - /// #include - /// bundle *b = bundle_create(); // Create a new bundle object - /// bundle_add_str(b, "foo_key", "bar_val"); // Add a key-value pair - /// - /// char *v = NULL; - /// bundle_get_str(b, "foo_key", &v); // v = "bar_val" - /// - /// bundle_free(b); // After freeing b, v becomes a dangling pointer - /// v = NULL; - /// @endcode - int bundle_get_str( - ffi.Pointer b, - ffi.Pointer key, - ffi.Pointer> str, - ) { - return _bundle_get_str( - b, - key, - str, - ); - } - - late final _bundle_get_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('bundle_get_str'); - late final _bundle_get_str = _bundle_get_strPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets the byte value with the given key. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must not free @a byte. - /// @param[in] b The bundle object - /// @param[in] key The key - /// @param[out] byte The returned value - /// @param[out] size The size of the byte - /// @return The operation result - /// @retval BUNDLE_ERROR_NONE Success - /// @retval BUNDLE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval BUNDLE_ERROR_KEY_NOT_AVAILABLE Key not available - /// @pre @a b must be a valid bundle object. - /// @see bundle_add_byte() - /// - /// @code - /// #include - /// bundle *b = bundle_create(); // Create a new bundle object - /// bundle_add_byte(b, "foo", "bar\0", 4); // Add a string to the bundle - /// int number = 12345; - /// bundle_add_byte(b, "number", (const void**)&number, sizeof(int)); // Add an integer to the bundle - /// - /// unsigned char *v = NULL; - /// size_t v_size; - /// bundle_get_byte(b, "foo", (void**)&v, &v_size); // v = "bar\0" - /// int *n = NULL; - /// size_t n_size; - /// bundle_get_byte(b, "number", (void**)&n, &n_size); // number = 12345 - /// - /// bundle_free(b); // After freeing b, v and n become a dangling pointer - /// @endcode - int bundle_get_byte( - ffi.Pointer b, - ffi.Pointer key, - ffi.Pointer> byte, - ffi.Pointer size, - ) { - return _bundle_get_byte( - b, - key, - byte, - size, - ); - } - - late final _bundle_get_bytePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('bundle_get_byte'); - late final _bundle_get_byte = _bundle_get_bytePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Requests Sync Manager to perform one time sync operation. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] account An account handle on which sync operation was requested or @c NULL in the case of accountless sync operation - /// @param[in] sync_job_name A string representing a sync job which will be operated just one time - /// @param[in] sync_option sync options determine an way to operate sync job and can be used as ORing. - /// @param[in] sync_job_user_data User data which contains additional information related registered sync job or it can be @c NULL in the case of requesting without sync_job_user_data - /// @param[out] sync_job_id A unique value which can manage sync jobs. The number of sync job id is limited as less than a hundred. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SYNC_ERROR_NONE Successful - /// @retval #SYNC_ERROR_NOT_SUPPORTED Not supported - /// @retval #SYNC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYNC_ERROR_QUOTA_EXCEEDED Quota exceeded - /// @retval #SYNC_ERROR_SYSTEM Internal system error - /// @retval #SYNC_ERROR_SYNC_ADAPTER_NOT_FOUND Sync adapter is not registered - /// - /// @pre This function requires calling below Sync Adapter's APIs by a service application before it is called. - /// @pre Call sync_adapter_set_callbacks() before calling this function. - /// - /// @see sync_manager_remove_sync_job() - /// @see sync_option_e - int sync_manager_on_demand_sync_job( - account_h account, - ffi.Pointer sync_job_name, - int sync_option, - ffi.Pointer sync_job_user_data, - ffi.Pointer sync_job_id, - ) { - return _sync_manager_on_demand_sync_job( - account, - sync_job_name, - sync_option, - sync_job_user_data, - sync_job_id, - ); - } - - late final _sync_manager_on_demand_sync_jobPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - account_h, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer)>>('sync_manager_on_demand_sync_job'); - late final _sync_manager_on_demand_sync_job = - _sync_manager_on_demand_sync_jobPtr.asFunction< - int Function(account_h, ffi.Pointer, int, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Requests Sync Manager to perform periodic sync operations. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// - /// @remarks Sync job can be added with its name. In the case of adding periodic sync job with same sync job, it will replace previous setting with new one. - /// - /// @param[in] account An account handle on which sync operation was requested or @c NULL in the case of accountless sync operation - /// @param[in] sync_job_name A string representing a sync job which will be operated with period interval - /// @param[in] sync_period Determines time interval of periodic sync. The periodic sync operation can be triggered in that interval, but it does not guarantee exact time. The minimum value is 30 minutes. - /// @param[in] sync_option sync options determine an way to operate sync job and can be used as ORing. - /// @param[in] sync_job_user_data User data which contains additional information related registered sync job or it can be @c NULL in the case of requesting without sync_job_user_data - /// @param[out] sync_job_id A unique value which can manage sync jobs. The number of sync job id is limited as less than a hundred. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SYNC_ERROR_NONE Successful - /// @retval #SYNC_ERROR_NOT_SUPPORTED Not supported - /// @retval #SYNC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYNC_ERROR_QUOTA_EXCEEDED Quota exceeded - /// @retval #SYNC_ERROR_SYSTEM Internal system error - /// @retval #SYNC_ERROR_SYNC_ADAPTER_NOT_FOUND Sync adapter is not registered - /// - /// @pre This function requires calling below Sync Adapter's APIs by a service application before it is called. - /// @pre Call sync_adapter_set_callbacks() before calling this function. - /// - /// @see sync_manager_remove_sync_job() - /// @see sync_option_e - /// @see sync_period_e - int sync_manager_add_periodic_sync_job( - account_h account, - ffi.Pointer sync_job_name, - int sync_period, - int sync_option, - ffi.Pointer sync_job_user_data, - ffi.Pointer sync_job_id, - ) { - return _sync_manager_add_periodic_sync_job( - account, - sync_job_name, - sync_period, - sync_option, - sync_job_user_data, - sync_job_id, - ); - } - - late final _sync_manager_add_periodic_sync_jobPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - account_h, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Pointer, - ffi.Pointer)>>('sync_manager_add_periodic_sync_job'); - late final _sync_manager_add_periodic_sync_job = - _sync_manager_add_periodic_sync_jobPtr.asFunction< - int Function(account_h, ffi.Pointer, int, int, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Requests Sync Manager to perform sync operations whenever corresponding DB changed. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.read since @if MOBILE 2.4 @endif - /// @privilege %http://tizen.org/privilege/contact.read - /// - /// @remarks Data change sync job can be added by using its capability. In the case of adding a sync job with same capability, it will replace previous setting with new one. \n\n - /// %http://tizen.org/privilege/calendar.read is needed to add data change sync job for receiving notification with @ref SYNC_SUPPORTS_CAPABILITY_CALENDAR. This capability is supported on Mobile profile only. \n\n since @if MOBILE 2.4 @endif - /// %http://tizen.org/privilege/contact.read is needed to add data change sync job for receiving notification with @ref SYNC_SUPPORTS_CAPABILITY_CONTACT. - /// - /// @param[in] account An account handle on which sync operation was requested or @c NULL in the case of accountless sync operation - /// @param[in] sync_capability A string representing a sync job which will be operated whenever data change of this capability - /// @param[in] sync_option sync options determine an way to operate sync job and can be used as ORing. - /// @param[in] sync_job_user_data User data which contains additional information related registered sync job or it can be @c NULL in the case of requesting without sync_job_user_data - /// @param[out] sync_job_id A unique value which can manage sync jobs. The number of sync job id is limited as less than a hundred. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SYNC_ERROR_NONE Successful - /// @retval #SYNC_ERROR_NOT_SUPPORTED Not supported - /// @retval #SYNC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYNC_ERROR_QUOTA_EXCEEDED Quota exceeded - /// @retval #SYNC_ERROR_SYSTEM Internal system error - /// @retval #SYNC_ERROR_SYNC_ADAPTER_NOT_FOUND Sync adapter is not registered - /// - /// @pre This function requires calling below Sync Adapter's APIs by a service application before it is called. - /// @pre Call sync_adapter_set_callbacks() before calling this function. - /// - /// @see sync_manager_remove_sync_job() - /// @see sync_option_e - int sync_manager_add_data_change_sync_job( - account_h account, - ffi.Pointer sync_capability, - int sync_option, - ffi.Pointer sync_job_user_data, - ffi.Pointer sync_job_id, - ) { - return _sync_manager_add_data_change_sync_job( - account, - sync_capability, - sync_option, - sync_job_user_data, - sync_job_id, - ); - } - - late final _sync_manager_add_data_change_sync_jobPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - account_h, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer)>>('sync_manager_add_data_change_sync_job'); - late final _sync_manager_add_data_change_sync_job = - _sync_manager_add_data_change_sync_jobPtr.asFunction< - int Function(account_h, ffi.Pointer, int, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Requests Sync Manager to remove corresponding sync job id. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks sync_job_id can not be @c NULL. - /// - /// @param[in] sync_job_id A unique value of each sync job, it can be used to search specific sync job and remove it - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SYNC_ERROR_NONE Successful - /// @retval #SYNC_ERROR_NOT_SUPPORTED Not supported - /// @retval #SYNC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYNC_ERROR_SYSTEM Internal system error - /// - /// @pre This function requires calling at least one of the below Sync Manager's APIs before it is called. - /// @pre sync_manager_on_demand_sync_job() - /// @pre sync_manager_add_periodic_sync_job() - /// @pre sync_manager_add_data_change_sync_job() - /// - /// @see sync_manager_on_demand_sync_job() - /// @see sync_manager_add_periodic_sync_job() - /// @see sync_manager_add_data_change_sync_job() - int sync_manager_remove_sync_job( - int sync_job_id, - ) { - return _sync_manager_remove_sync_job( - sync_job_id, - ); - } - - late final _sync_manager_remove_sync_jobPtr = - _lookup>( - 'sync_manager_remove_sync_job'); - late final _sync_manager_remove_sync_job = - _sync_manager_remove_sync_jobPtr.asFunction(); - - /// @brief Requests Sync Manager to query corresponding sync request. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] sync_job_cb A callback function for receiving the result of this API - /// @param[in] user_data User data which contains additional information related foreach job or @c NULL if do not want to transfer user data - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SYNC_ERROR_NONE Successful - /// @retval #SYNC_ERROR_NOT_SUPPORTED Not supported - /// @retval #SYNC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYNC_ERROR_SYSTEM Internal system error - /// - /// @pre This function requires calling at least one of the below Sync Manager's APIs before it is called. - /// @pre sync_manager_on_demand_sync_job() - /// @pre sync_manager_add_periodic_sync_job() - /// @pre sync_manager_add_data_change_sync_job() - /// - /// @see sync_manager_sync_job_cb() - /// @see sync_manager_on_demand_sync_job() - /// @see sync_manager_add_periodic_sync_job() - /// @see sync_manager_add_data_change_sync_job() - int sync_manager_foreach_sync_job( - sync_manager_sync_job_cb sync_job_cb, - ffi.Pointer user_data, - ) { - return _sync_manager_foreach_sync_job( - sync_job_cb, - user_data, - ); - } - - late final _sync_manager_foreach_sync_jobPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sync_manager_sync_job_cb, - ffi.Pointer)>>('sync_manager_foreach_sync_job'); - late final _sync_manager_foreach_sync_job = - _sync_manager_foreach_sync_jobPtr.asFunction< - int Function(sync_manager_sync_job_cb, ffi.Pointer)>(); - - /// @brief Sets client (Sync Adapter) callback functions - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks This API only can be called by a service application. And it can be set by only one service application per a package. - /// - /// @param[in] on_start_cb A callback function to be called by Sync Manager for performing sync operation - /// @param[in] on_cancel_cb A callback function to be called by Sync Manager for cancelling sync operation - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #SYNC_ERROR_NONE Successful - /// @retval #SYNC_ERROR_NOT_SUPPORTED Not supported - /// @retval #SYNC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SYNC_ERROR_IO_ERROR I/O error - /// @retval #SYNC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYNC_ERROR_QUOTA_EXCEEDED Quota exceeded - /// @retval #SYNC_ERROR_SYSTEM System error - /// - /// @see sync_adapter_start_sync_cb() - /// @see sync_adapter_cancel_sync_cb() - /// @see sync_adapter_unset_callbacks() - int sync_adapter_set_callbacks( - sync_adapter_start_sync_cb on_start_cb, - sync_adapter_cancel_sync_cb on_cancel_cb, - ) { - return _sync_adapter_set_callbacks( - on_start_cb, - on_cancel_cb, - ); - } - - late final _sync_adapter_set_callbacksPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sync_adapter_start_sync_cb, - sync_adapter_cancel_sync_cb)>>('sync_adapter_set_callbacks'); - late final _sync_adapter_set_callbacks = - _sync_adapter_set_callbacksPtr.asFunction< - int Function( - sync_adapter_start_sync_cb, sync_adapter_cancel_sync_cb)>(); - - /// @brief Unsets client (Sync Adapter) callback functions - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #SYNC_ERROR_NONE Successful - /// @retval #SYNC_ERROR_NOT_SUPPORTED Not supported - /// @retval #SYNC_ERROR_SYSTEM System error - /// - /// @pre Call sync_adapter_set_callbacks() before calling this function. - /// - /// @see sync_adapter_start_sync_cb() - /// @see sync_adapter_cancel_sync_cb() - /// @see sync_adapter_set_callbacks() - int sync_adapter_unset_callbacks() { - return _sync_adapter_unset_callbacks(); - } - - late final _sync_adapter_unset_callbacksPtr = - _lookup>( - 'sync_adapter_unset_callbacks'); - late final _sync_adapter_unset_callbacks = - _sync_adapter_unset_callbacksPtr.asFunction(); - - /// @brief Creates an app_control handle. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The @a app_control must be released using app_control_destroy(). - /// @param[out] app_control The app_control handle to be newly created on success - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_control_destroy() - int app_control_create( - ffi.Pointer app_control, - ) { - return _app_control_create( - app_control, - ); - } - - late final _app_control_createPtr = - _lookup)>>( - 'app_control_create'); - late final _app_control_create = _app_control_createPtr - .asFunction)>(); - - /// @brief Destroys the app_control handle and releases all its resources. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_control The app_control handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_control_create() - int app_control_destroy( - app_control_h app_control, - ) { - return _app_control_destroy( - app_control, - ); - } - - late final _app_control_destroyPtr = - _lookup>( - 'app_control_destroy'); - late final _app_control_destroy = - _app_control_destroyPtr.asFunction(); - - /// @brief Sets the operation to be performed. - /// - /// @details The @a operation is the mandatory information for the launch request. - /// If the operation is not specified, #APP_CONTROL_OPERATION_DEFAULT is used for the launch request. - /// If the operation is #APP_CONTROL_OPERATION_DEFAULT, the package information is mandatory to explicitly launch the application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_control The app_control handle - /// @param[in] operation The operation to be performed (if the @a operation is @c NULL, it clears the previous value) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see app_control_get_operation() - /// @see APP_CONTROL_OPERATION_DEFAULT - /// @see APP_CONTROL_OPERATION_EDIT - /// @see APP_CONTROL_OPERATION_VIEW - /// @see APP_CONTROL_OPERATION_PICK - /// @see APP_CONTROL_OPERATION_CREATE_CONTENT - /// @see APP_CONTROL_OPERATION_CALL - /// @see APP_CONTROL_OPERATION_SEND - /// @see APP_CONTROL_OPERATION_SEND_TEXT - /// @see APP_CONTROL_OPERATION_DIAL - /// @see APP_CONTROL_OPERATION_SEARCH - int app_control_set_operation( - app_control_h app_control, - ffi.Pointer operation, - ) { - return _app_control_set_operation( - app_control, - operation, - ); - } - - late final _app_control_set_operationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, - ffi.Pointer)>>('app_control_set_operation'); - late final _app_control_set_operation = _app_control_set_operationPtr - .asFunction)>(); - - /// @brief Gets the operation to be performed. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The @a operation must be released using free(). - /// @param[in] app_control The app_control handle - /// @param[out] operation The operation to be performed - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_control_set_operation() - int app_control_get_operation( - app_control_h app_control, - ffi.Pointer> operation, - ) { - return _app_control_get_operation( - app_control, - operation, - ); - } - - late final _app_control_get_operationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - app_control_h, ffi.Pointer>)>>( - 'app_control_get_operation'); - late final _app_control_get_operation = - _app_control_get_operationPtr.asFunction< - int Function(app_control_h, ffi.Pointer>)>(); - - /// @brief Sets the URI of the data. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks Since Tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, if the parameter @a uri is started with 'file://' and it is a regular file in this application's data path which can be obtained by calling the app_get_data_path() function, it will be shared to the callee application. Framework will grant a temporary permission to the callee application for this file and revoke it when the callee application is terminated. The callee application can just read it. - /// @param[in] app_control The app_control handle - /// @param[in] uri The URI of the data this app_control is operating on (if the @a uri is @c NULL, it clears the previous value) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see app_control_get_uri() - int app_control_set_uri( - app_control_h app_control, - ffi.Pointer uri, - ) { - return _app_control_set_uri( - app_control, - uri, - ); - } - - late final _app_control_set_uriPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - app_control_h, ffi.Pointer)>>('app_control_set_uri'); - late final _app_control_set_uri = _app_control_set_uriPtr - .asFunction)>(); - - /// @brief Gets the URI of the data. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The @a uri must be released using free(). - /// @param[in] app_control The app_control handle - /// @param[out] uri The URI of the data this app_control is operating on - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_control_set_uri() - int app_control_get_uri( - app_control_h app_control, - ffi.Pointer> uri, - ) { - return _app_control_get_uri( - app_control, - uri, - ); - } - - late final _app_control_get_uriPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, - ffi.Pointer>)>>('app_control_get_uri'); - late final _app_control_get_uri = _app_control_get_uriPtr.asFunction< - int Function(app_control_h, ffi.Pointer>)>(); - - /// @brief Sets the explicit MIME type of the data. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_control The app_control handle - /// @param[in] mime The explicit MIME type of the data this app_control is operating on (if the @a mime is @c NULL, it clears the previous value) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see app_control_get_mime() - int app_control_set_mime( - app_control_h app_control, - ffi.Pointer mime, - ) { - return _app_control_set_mime( - app_control, - mime, - ); - } - - late final _app_control_set_mimePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - app_control_h, ffi.Pointer)>>('app_control_set_mime'); - late final _app_control_set_mime = _app_control_set_mimePtr - .asFunction)>(); - - /// @brief Gets the explicit MIME type of the data. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The @a uri must be released using free(). - /// @param[in] app_control The app_control handle - /// @param[out] mime The explicit MIME type of the data this app_control is operating on - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_control_set_mime() - int app_control_get_mime( - app_control_h app_control, - ffi.Pointer> mime, - ) { - return _app_control_get_mime( - app_control, - mime, - ); - } - - late final _app_control_get_mimePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, - ffi.Pointer>)>>('app_control_get_mime'); - late final _app_control_get_mime = _app_control_get_mimePtr.asFunction< - int Function(app_control_h, ffi.Pointer>)>(); - - /// @brief Sets the explicit category. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_control The app_control handle - /// @param[in] category The explicit category (if the @a category is @c NULL, it clears the previous value) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see app_control_get_category() - int app_control_set_category( - app_control_h app_control, - ffi.Pointer category, - ) { - return _app_control_set_category( - app_control, - category, - ); - } - - late final _app_control_set_categoryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, - ffi.Pointer)>>('app_control_set_category'); - late final _app_control_set_category = _app_control_set_categoryPtr - .asFunction)>(); - - /// @brief Gets the explicit category. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The @a category must be released using free(). - /// @param[in] app_control The app_control handle - /// @param[out] category The explicit category - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_control_set_category() - int app_control_get_category( - app_control_h app_control, - ffi.Pointer> category, - ) { - return _app_control_get_category( - app_control, - category, - ); - } - - late final _app_control_get_categoryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, - ffi.Pointer>)>>('app_control_get_category'); - late final _app_control_get_category = - _app_control_get_categoryPtr.asFunction< - int Function(app_control_h, ffi.Pointer>)>(); - - /// @brief Sets the ID of the application to explicitly launch. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_control The app_control handle - /// @param[in] app_id The ID of the application to explicitly launch (if the @a app_id is @c NULL, it clears the previous value) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_control_get_app_id() - int app_control_set_app_id( - app_control_h app_control, - ffi.Pointer app_id, - ) { - return _app_control_set_app_id( - app_control, - app_id, - ); - } - - late final _app_control_set_app_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - app_control_h, ffi.Pointer)>>('app_control_set_app_id'); - late final _app_control_set_app_id = _app_control_set_app_idPtr - .asFunction)>(); - - /// @brief Gets the ID of the application to explicitly launch. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The @a app_id must be released with free(). - /// @param[in] app_control The app_control handle - /// @param[out] app_id The ID of the application to explicitly launch - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_control_set_app_id() - int app_control_get_app_id( - app_control_h app_control, - ffi.Pointer> app_id, - ) { - return _app_control_get_app_id( - app_control, - app_id, - ); - } - - late final _app_control_get_app_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, - ffi.Pointer>)>>('app_control_get_app_id'); - late final _app_control_get_app_id = _app_control_get_app_idPtr.asFunction< - int Function(app_control_h, ffi.Pointer>)>(); - - /// @brief Adds extra data to the app_control. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The function replaces any existing value for the given key. - /// @remarks The function returns #APP_CONTROL_ERROR_INVALID_PARAMETER if @a key or @a value is a zero-length string. - /// @remarks The function returns #APP_CONTROL_ERROR_KEY_REJECTED if the application tries to use the same key with the system-defined key. - /// @param[in] app_control The app_control handle - /// @param[in] key The name of the extra data - /// @param[in] value The value associated with the given key - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_KEY_REJECTED Key not available - /// @see app_control_add_extra_data_array() - /// @see app_control_remove_extra_data() - /// @see app_control_get_extra_data() - int app_control_add_extra_data( - app_control_h app_control, - ffi.Pointer key, - ffi.Pointer value, - ) { - return _app_control_add_extra_data( - app_control, - key, - value, - ); - } - - late final _app_control_add_extra_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, ffi.Pointer, - ffi.Pointer)>>('app_control_add_extra_data'); - late final _app_control_add_extra_data = - _app_control_add_extra_dataPtr.asFunction< - int Function( - app_control_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Adds the extra data array to the app_control. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The function replaces any existing value for the given key. - /// @remarks The function returns #APP_CONTROL_ERROR_INVALID_PARAMETER if @a key is a zero-length string. - /// @remarks The function returns #APP_CONTROL_ERROR_KEY_REJECTED if the application tries to use the same key with the system-defined key. - /// @param[in] app_control The app_control handle - /// @param[in] key The name of the extra data - /// @param[in] value The array value associated with the given key - /// @param[in] length The length of the array - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_KEY_REJECTED Key not available - /// @see app_control_add_extra_data() - /// @see app_control_remove_extra_data() - /// @see app_control_get_extra_data() - int app_control_add_extra_data_array( - app_control_h app_control, - ffi.Pointer key, - ffi.Pointer> value, - int length, - ) { - return _app_control_add_extra_data_array( - app_control, - key, - value, - length, - ); - } - - late final _app_control_add_extra_data_arrayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - app_control_h, - ffi.Pointer, - ffi.Pointer>, - ffi.Int)>>('app_control_add_extra_data_array'); - late final _app_control_add_extra_data_array = - _app_control_add_extra_data_arrayPtr.asFunction< - int Function(app_control_h, ffi.Pointer, - ffi.Pointer>, int)>(); - - /// @brief Removes the extra data from the app_control. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_control The app_control handle - /// @param[in] key The name of the extra data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_KEY_NOT_FOUND Specified key not found - /// @retval #APP_CONTROL_ERROR_KEY_REJECTED Key not available - /// @see app_control_add_extra_data() - /// @see app_control_add_extra_data_array() - /// @see app_control_get_extra_data() - int app_control_remove_extra_data( - app_control_h app_control, - ffi.Pointer key, - ) { - return _app_control_remove_extra_data( - app_control, - key, - ); - } - - late final _app_control_remove_extra_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, - ffi.Pointer)>>('app_control_remove_extra_data'); - late final _app_control_remove_extra_data = _app_control_remove_extra_dataPtr - .asFunction)>(); - - /// @brief Gets the extra data from the app_control. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The @a value must be released using free(). - /// @remarks The function returns #APP_CONTROL_ERROR_INVALID_DATA_TYPE if @a value is of array data type. - /// @param[in] app_control The app_control handle - /// @param[in] key The name of the extra data - /// @param[out] value The value associated with the given key - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_KEY_NOT_FOUND Specified key not found - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #APP_CONTROL_ERROR_INVALID_DATA_TYPE Invalid data type - /// @retval #APP_CONTROL_ERROR_KEY_REJECTED Key not available - /// @see app_control_add_extra_data() - /// @see app_control_add_extra_data_array() - /// @see app_control_get_extra_data() - /// @see app_control_remove_extra_data() - /// @see app_control_foreach_extra_data() - int app_control_get_extra_data( - app_control_h app_control, - ffi.Pointer key, - ffi.Pointer> value, - ) { - return _app_control_get_extra_data( - app_control, - key, - value, - ); - } - - late final _app_control_get_extra_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, ffi.Pointer, - ffi.Pointer>)>>( - 'app_control_get_extra_data'); - late final _app_control_get_extra_data = - _app_control_get_extra_dataPtr.asFunction< - int Function(app_control_h, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets the extra data array from the app_control. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The @a value must be released using free(). - /// @remarks The function returns #APP_CONTROL_ERROR_INVALID_DATA_TYPE if @a value is not of array data type. - /// @param[in] app_control The app_control handle - /// @param[in] key The name of the extra data - /// @param[out] value The array value associated with the given key - /// @param[out] length The length of the array - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_KEY_NOT_FOUND Specified key not found - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #APP_CONTROL_ERROR_INVALID_DATA_TYPE Invalid data type - /// @retval #APP_CONTROL_ERROR_KEY_REJECTED Key not available - /// @see app_control_add_extra_data() - /// @see app_control_add_extra_data_array() - /// @see app_control_remove_extra_data() - /// @see app_control_foreach_extra_data() - int app_control_get_extra_data_array( - app_control_h app_control, - ffi.Pointer key, - ffi.Pointer>> value, - ffi.Pointer length, - ) { - return _app_control_get_extra_data_array( - app_control, - key, - value, - length, - ); - } - - late final _app_control_get_extra_data_arrayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - app_control_h, - ffi.Pointer, - ffi.Pointer>>, - ffi.Pointer)>>('app_control_get_extra_data_array'); - late final _app_control_get_extra_data_array = - _app_control_get_extra_data_arrayPtr.asFunction< - int Function( - app_control_h, - ffi.Pointer, - ffi.Pointer>>, - ffi.Pointer)>(); - - /// @brief Checks whether the extra data associated with the given @a key is of array data type. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_control The app_control handle - /// @param[in] key The name of the extra data - /// @param[out] array If @c true the extra data is of array data type, - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see app_control_add_extra_data() - /// @see app_control_add_extra_data_array() - /// @see app_control_remove_extra_data() - /// @see app_control_foreach_extra_data() - int app_control_is_extra_data_array( - app_control_h app_control, - ffi.Pointer key, - ffi.Pointer array, - ) { - return _app_control_is_extra_data_array( - app_control, - key, - array, - ); - } - - late final _app_control_is_extra_data_arrayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, ffi.Pointer, - ffi.Pointer)>>('app_control_is_extra_data_array'); - late final _app_control_is_extra_data_array = - _app_control_is_extra_data_arrayPtr.asFunction< - int Function( - app_control_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Retrieves all extra data contained in app_control. - /// @details This function calls app_control_extra_data_cb() once for each key-value pair for extra data contained in app_control. \n - /// If the app_control_extra_data_cb() callback function returns @c false, then iteration will be finished. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_control The app_control handle - /// @param[in] callback The iteration callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @post This function invokes app_control_extra_data_cb(). - /// @see app_control_extra_data_cb() - int app_control_foreach_extra_data( - app_control_h app_control, - app_control_extra_data_cb callback, - ffi.Pointer user_data, - ) { - return _app_control_foreach_extra_data( - app_control, - callback, - user_data, - ); - } - - late final _app_control_foreach_extra_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, app_control_extra_data_cb, - ffi.Pointer)>>('app_control_foreach_extra_data'); - late final _app_control_foreach_extra_data = - _app_control_foreach_extra_dataPtr.asFunction< - int Function(app_control_h, app_control_extra_data_cb, - ffi.Pointer)>(); - - /// @brief Retrieves all applications that can be launched to handle the given app_control request. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_control The app_control handle - /// @param[in] callback The iteration callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Success - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @post This function invokes app_control_app_matched_cb(). - /// @see app_control_app_matched_cb() - int app_control_foreach_app_matched( - app_control_h app_control, - app_control_app_matched_cb callback, - ffi.Pointer user_data, - ) { - return _app_control_foreach_app_matched( - app_control, - callback, - user_data, - ); - } - - late final _app_control_foreach_app_matchedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, app_control_app_matched_cb, - ffi.Pointer)>>('app_control_foreach_app_matched'); - late final _app_control_foreach_app_matched = - _app_control_foreach_app_matchedPtr.asFunction< - int Function(app_control_h, app_control_app_matched_cb, - ffi.Pointer)>(); - - /// @brief Sends the launch request. - /// - /// @details The operation is mandatory information for the launch request. \n - /// If the operation is not specified, #APP_CONTROL_OPERATION_DEFAULT is used by default. - /// If the operation is #APP_CONTROL_OPERATION_DEFAULT, the application ID is mandatory to explicitly launch the application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/appmanager.launch - /// @remarks The function returns #APP_CONTROL_ERROR_LAUNCH_REJECTED if the operation value is #APP_CONTROL_OPERATION_LAUNCH_ON_EVENT which is only for handling the event from the platform or other application, refer to the @a Event module. - /// @remarks Since Tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, the launch request of the service application over out of packages is restricted by the platform. Also, implicit launch requests are NOT delivered to service applications since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. To launch a service application, an explicit launch request with application ID given by the app_control_set_app_id() must be sent. - /// @param[in] app_control The app_control handle - /// @param[in] callback The callback function to be called when the reply is delivered - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #APP_CONTROL_ERROR_APP_NOT_FOUND The application to run the given launch request is not found - /// @retval #APP_CONTROL_ERROR_LAUNCH_REJECTED The application cannot be launched in current context - /// @retval #APP_CONTROL_ERROR_LAUNCH_FAILED Failed to launch the application - /// @retval #APP_CONTROL_ERROR_TIMED_OUT Failed due to timeout. The application that handles @a app_control may be busy - /// @retval #APP_CONTROL_ERROR_PERMISSION_DENIED Permission denied - /// @post If the launch request is sent for the result, the result will come back through the app_control_reply_cb() from the callee application. Additional replies may be delivered on the app_control_enable_app_started_result_event() called. - /// @see app_control_reply_to_launch_request() - /// @see app_control_reply_cb() - /// @see app_control_enable_app_started_result_event() - int app_control_send_launch_request( - app_control_h app_control, - app_control_reply_cb callback, - ffi.Pointer user_data, - ) { - return _app_control_send_launch_request( - app_control, - callback, - user_data, - ); - } - - late final _app_control_send_launch_requestPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, app_control_reply_cb, - ffi.Pointer)>>('app_control_send_launch_request'); - late final _app_control_send_launch_request = - _app_control_send_launch_requestPtr.asFunction< - int Function( - app_control_h, app_control_reply_cb, ffi.Pointer)>(); - - /// @brief Sends the terminate request to the application that is launched by app_control. This API is only effective for some applications that are provided by default for handling platform default app_controls. You are not allowed to terminate other general applications using this API. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks Since Tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, this API can be used to terminate sub-applications which were launched as group mode by the caller application. - /// Once callee application is being terminated by this API, other applications which were launched by the callee application as a group mode will be terminated as well. - /// @param[in] app_control The app_control handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_PERMISSION_DENIED Permission denied - /// @see app_control_send_launch_request() - /// @see app_control_set_launch_mode() - int app_control_send_terminate_request( - app_control_h app_control, - ) { - return _app_control_send_terminate_request( - app_control, - ); - } - - late final _app_control_send_terminate_requestPtr = - _lookup>( - 'app_control_send_terminate_request'); - late final _app_control_send_terminate_request = - _app_control_send_terminate_requestPtr - .asFunction(); - - /// @brief Replies to the launch request sent by the caller. - /// @details If the caller application sent the launch request to receive the result, the callee application can return the result back to the caller. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The function is not allowed to send reply #APP_CONTROL_RESULT_APP_STARTED as @a result which is reserved for platform developers. - /// @param[in] reply The app_control handle in which the results of the callee are contained - /// @param[in] request The app_control handle sent by the caller - /// @param[in] result The result code of the launch request - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_control_send_launch_request() - int app_control_reply_to_launch_request( - app_control_h reply, - app_control_h request, - int result, - ) { - return _app_control_reply_to_launch_request( - reply, - request, - result, - ); - } - - late final _app_control_reply_to_launch_requestPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, app_control_h, - ffi.Int32)>>('app_control_reply_to_launch_request'); - late final _app_control_reply_to_launch_request = - _app_control_reply_to_launch_requestPtr - .asFunction(); - - /// @brief Creates and returns a copy of the given app_control handle. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks A newly created app_control should be destroyed by calling the app_control_destroy() if it is no longer needed. - /// - /// @param[out] clone If successful, a newly created app_control handle will be returned - /// @param[in] app_control The app_control handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_control_destroy() - int app_control_clone( - ffi.Pointer clone, - app_control_h app_control, - ) { - return _app_control_clone( - clone, - app_control, - ); - } - - late final _app_control_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, app_control_h)>>('app_control_clone'); - late final _app_control_clone = _app_control_clonePtr - .asFunction, app_control_h)>(); - - /// @brief Gets the application ID of the caller from the launch request. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The @a app_control must be the launch request from app_control_cb(). - /// @remarks This function returns #APP_CONTROL_ERROR_INVALID_PARAMETER if the given app_control is not the launch request. - /// @remarks The @a id must be released using free(). - /// @param[in] app_control The app_control handle from app_control_cb() - /// @param[out] id The application ID of the caller - /// @return @a 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - int app_control_get_caller( - app_control_h app_control, - ffi.Pointer> id, - ) { - return _app_control_get_caller( - app_control, - id, - ); - } - - late final _app_control_get_callerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, - ffi.Pointer>)>>('app_control_get_caller'); - late final _app_control_get_caller = _app_control_get_callerPtr.asFunction< - int Function(app_control_h, ffi.Pointer>)>(); - - /// @brief Checks whether the caller is requesting a reply from the launch request. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The @a app_control must be the launch request from app_control_cb(). - /// @remarks This function returns #APP_CONTROL_ERROR_INVALID_PARAMETER if the given app_control is not the launch request. - /// @param[in] app_control The app_control handle from app_control_cb() - /// @param[out] requested If @c true a reply is requested by the caller, - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - int app_control_is_reply_requested( - app_control_h app_control, - ffi.Pointer requested, - ) { - return _app_control_is_reply_requested( - app_control, - requested, - ); - } - - late final _app_control_is_reply_requestedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, - ffi.Pointer)>>('app_control_is_reply_requested'); - late final _app_control_is_reply_requested = - _app_control_is_reply_requestedPtr - .asFunction)>(); - - /// @brief Sets the launch mode of the application. - /// - /// @details This function allows the callee application to be launched as a group or as a single mode. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks Although launch_mode were set as #APP_CONTROL_LAUNCH_MODE_GROUP, the callee application would be launched as a single mode if the manifest file of callee application defined the launch mode as "single". - /// This function can just set the preference of the caller application to launch an application. - /// @remarks Sub-applications which were launched as a group mode always have own process. - /// - /// @param[in] app_control The app_control handle - /// @param[in] mode The launch mode of the application - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see app_control_set_launch_mode() - /// @see app_control_launch_mode_e - int app_control_set_launch_mode( - app_control_h app_control, - int mode, - ) { - return _app_control_set_launch_mode( - app_control, - mode, - ); - } - - late final _app_control_set_launch_modePtr = - _lookup>( - 'app_control_set_launch_mode'); - late final _app_control_set_launch_mode = _app_control_set_launch_modePtr - .asFunction(); - - /// @brief Gets the launch mode of the application. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks Since Tizen 3.0, if launch mode is not set in the caller application control, - /// the function returns the #APP_CONTROL_LAUNCH_MODE_SINGLE launch mode. - /// @param[in] app_control The app_control handle - /// @param[out] mode The launch mode of the application - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see app_control_get_launch_mode() - /// @see app_control_launch_mode_e - int app_control_get_launch_mode( - app_control_h app_control, - ffi.Pointer mode, - ) { - return _app_control_get_launch_mode( - app_control, - mode, - ); - } - - late final _app_control_get_launch_modePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, - ffi.Pointer)>>('app_control_get_launch_mode'); - late final _app_control_get_launch_mode = _app_control_get_launch_modePtr - .asFunction)>(); - - /// @brief Enables an additional launch result event on the launch request. - /// - /// @details The function allows to receive the #APP_CONTROL_RESULT_APP_STARTED event on\n - /// application get launched by the app_control. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks app_control_reply_cb() will be called on the APP_CONTROL_RESULT_APP_STARTED event received. - /// @param[in] app_control The app_control handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see app_control_send_launch_request() - /// @see #APP_CONTROL_RESULT_APP_STARTED - int app_control_enable_app_started_result_event( - app_control_h app_control, - ) { - return _app_control_enable_app_started_result_event( - app_control, - ); - } - - late final _app_control_enable_app_started_result_eventPtr = - _lookup>( - 'app_control_enable_app_started_result_event'); - late final _app_control_enable_app_started_result_event = - _app_control_enable_app_started_result_eventPtr - .asFunction(); - - /// @brief Sends the launch request asynchronously. - /// - /// @details The operation is mandatory information for the launch request. \n - /// If the operation is not specified, #APP_CONTROL_OPERATION_DEFAULT is used by default. - /// If the operation is #APP_CONTROL_OPERATION_DEFAULT, the application ID is mandatory to explicitly launch the application. - /// @details After the callee application is initialized or the launch request is delivered to the running application successfully, the result callback function will be invoked. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/appmanager.launch - /// @remarks The function returns #APP_CONTROL_ERROR_LAUNCH_REJECTED if the operation value is #APP_CONTROL_OPERATION_LAUNCH_ON_EVENT which is only for handling the event from the platform or other application, refer to the @a Event Module. - /// @remarks The launch request of the service application over out of packages is restricted by the platform. Also, implicit launch requests are NOT delivered to service applications since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. To launch a service application, an explicit launch request with application ID given by the app_control_set_app_id() must be sent. - /// @param[in] app_control The app_control handle - /// @param[in] result_cb The callback function to be called when the result is delivered - /// @param[in] reply_cb The callback function to be called when the reply is delivered - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_CONTROL_ERROR_NONE Successful - /// @retval #APP_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #APP_CONTROL_ERROR_APP_NOT_FOUND The application to run the given launch request is not found - /// @retval #APP_CONTROL_ERROR_LAUNCH_REJECTED The application cannot be launched in current context - /// @retval #APP_CONTROL_ERROR_LAUNCH_FAILED Failed to launch the application - /// @retval #APP_CONTROL_ERROR_TIMED_OUT Failed due to timeout. The application that handles @a app_control may be busy - /// @retval #APP_CONTROL_ERROR_PERMISSION_DENIED Permission denied - /// @post If the launch request is sent for the result, the result will come back through the app_control_reply_cb() from the callee application. Additional replies may be delivered if app_control_enable_app_started_result_event() was called. - /// @see app_control_result_cb() - /// @see app_control_reply_to_launch_request() - /// @see app_control_reply_cb() - /// @see app_control_enable_app_started_result_event() - int app_control_send_launch_request_async( - app_control_h app_control, - app_control_result_cb result_cb, - app_control_reply_cb reply_cb, - ffi.Pointer user_data, - ) { - return _app_control_send_launch_request_async( - app_control, - result_cb, - reply_cb, - user_data, - ); - } - - late final _app_control_send_launch_request_asyncPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - app_control_h, - app_control_result_cb, - app_control_reply_cb, - ffi.Pointer)>>('app_control_send_launch_request_async'); - late final _app_control_send_launch_request_async = - _app_control_send_launch_request_asyncPtr.asFunction< - int Function(app_control_h, app_control_result_cb, - app_control_reply_cb, ffi.Pointer)>(); - - /// @brief Gets the low memory status from the given event info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] event_info The system event info - /// @param[out] status The low memory status - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_ERROR_INVALID_CONTEXT Invalid event context - /// @see app_event_info_h - /// @see app_event_low_memory_status_e - int app_event_get_low_memory_status( - app_event_info_h event_info, - ffi.Pointer status, - ) { - return _app_event_get_low_memory_status( - event_info, - status, - ); - } - - late final _app_event_get_low_memory_statusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_event_info_h, - ffi.Pointer)>>('app_event_get_low_memory_status'); - late final _app_event_get_low_memory_status = - _app_event_get_low_memory_statusPtr - .asFunction)>(); - - /// @brief Gets the low battery status from given event info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] event_info The system event info - /// @param[out] status The low battery status - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_ERROR_INVALID_CONTEXT Invalid event context - /// @see app_event_info_h - /// @see app_event_low_battery_status_e - int app_event_get_low_battery_status( - app_event_info_h event_info, - ffi.Pointer status, - ) { - return _app_event_get_low_battery_status( - event_info, - status, - ); - } - - late final _app_event_get_low_battery_statusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_event_info_h, - ffi.Pointer)>>('app_event_get_low_battery_status'); - late final _app_event_get_low_battery_status = - _app_event_get_low_battery_statusPtr - .asFunction)>(); - - /// @brief Gets the language from the given event info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks @a lang must be released using free(). - /// @param[in] event_info The system event info - /// @param[out] lang The language changed - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_ERROR_INVALID_CONTEXT Invalid event context - /// @see app_event_info_h - int app_event_get_language( - app_event_info_h event_info, - ffi.Pointer> lang, - ) { - return _app_event_get_language( - event_info, - lang, - ); - } - - late final _app_event_get_languagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_event_info_h, - ffi.Pointer>)>>('app_event_get_language'); - late final _app_event_get_language = _app_event_get_languagePtr.asFunction< - int Function(app_event_info_h, ffi.Pointer>)>(); - - /// @brief Gets the region format from the given event info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks @a region must be released using free(). - /// @param[in] event_info The system event info - /// @param[out] region The region format changed - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_ERROR_INVALID_CONTEXT Invalid event context - /// @see app_event_info_h - int app_event_get_region_format( - app_event_info_h event_info, - ffi.Pointer> region, - ) { - return _app_event_get_region_format( - event_info, - region, - ); - } - - late final _app_event_get_region_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - app_event_info_h, ffi.Pointer>)>>( - 'app_event_get_region_format'); - late final _app_event_get_region_format = - _app_event_get_region_formatPtr.asFunction< - int Function(app_event_info_h, ffi.Pointer>)>(); - - /// @brief Gets the device orientation from the given event info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] event_info The system event info - /// @param[out] orientation The device orientation changed - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_ERROR_INVALID_CONTEXT Invalid event context - /// @see app_event_info_h - /// @see app_device_orientation_e - int app_event_get_device_orientation( - app_event_info_h event_info, - ffi.Pointer orientation, - ) { - return _app_event_get_device_orientation( - event_info, - orientation, - ); - } - - late final _app_event_get_device_orientationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_event_info_h, - ffi.Pointer)>>('app_event_get_device_orientation'); - late final _app_event_get_device_orientation = - _app_event_get_device_orientationPtr - .asFunction)>(); - - /// @brief Gets the suspended state of the application from the given event info. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks The application should not use any asynchronous operations in #APP_SUSPENDED_STATE_WILL_ENTER event. - /// Because applications will be changed to suspended state just after #APP_SUSPENDED_STATE_WILL_ENTER, asynchronous calls are not guaranteed to work properly. - /// @param[in] event_info The handle for getting the suspended state - /// @param[out] state The suspended state of the application - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_ERROR_INVALID_CONTEXT Invalid event context - int app_event_get_suspended_state( - app_event_info_h event_info, - ffi.Pointer state, - ) { - return _app_event_get_suspended_state( - event_info, - state, - ); - } - - late final _app_event_get_suspended_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_event_info_h, - ffi.Pointer)>>('app_event_get_suspended_state'); - late final _app_event_get_suspended_state = _app_event_get_suspended_statePtr - .asFunction)>(); - - /// @brief Gets the ID of the application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks @a id must be released using free(). - /// @param[out] id The ID of the application - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_ERROR_INVALID_CONTEXT The application is launched illegally, not launched by the launch system - /// @retval #APP_ERROR_OUT_OF_MEMORY Out of memory - int app_get_id( - ffi.Pointer> id, - ) { - return _app_get_id( - id, - ); - } - - late final _app_get_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>)>>('app_get_id'); - late final _app_get_id = _app_get_idPtr - .asFunction>)>(); - - /// @brief Gets the localized name of the application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks @a name must be released using free(). - /// @param[out] name The name of the application - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_ERROR_INVALID_CONTEXT The application is launched illegally, not launched by the launch system - /// @retval #APP_ERROR_OUT_OF_MEMORY Out of memory - int app_get_name( - ffi.Pointer> name, - ) { - return _app_get_name( - name, - ); - } - - late final _app_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>)>>('app_get_name'); - late final _app_get_name = _app_get_namePtr - .asFunction>)>(); - - /// @brief Gets the version of the application package. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks @a version must be released using free(). - /// @param[out] version The version of the application - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_ERROR_INVALID_CONTEXT The application is launched illegally, not launched by the launch system - /// @retval #APP_ERROR_OUT_OF_MEMORY Out of memory - int app_get_version( - ffi.Pointer> version, - ) { - return _app_get_version( - version, - ); - } - - late final _app_get_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>)>>('app_get_version'); - late final _app_get_version = _app_get_versionPtr - .asFunction>)>(); - - /// @brief Gets the absolute path to the application's data directory which is used to store private data of the application. - /// @details An application can read and write its own files in the application's data directory. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The returned path should be released. - /// @return The absolute path to the application's data directory, @n - /// otherwise a null pointer if the memory is insufficient - ffi.Pointer app_get_data_path() { - return _app_get_data_path(); - } - - late final _app_get_data_pathPtr = - _lookup Function()>>( - 'app_get_data_path'); - late final _app_get_data_path = - _app_get_data_pathPtr.asFunction Function()>(); - - /// @brief Gets the absolute path to the application's cache directory which is used to store temporary data of the application. - /// @details An application can read and write its own files in the application's cache directory. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The returned path should be released. @n - /// The files stored in the application's cache directory can be removed by setting application or platform while the application is running. - /// @return The absolute path to the application's cache directory, @n - /// otherwise a null pointer if the memory is insufficient - ffi.Pointer app_get_cache_path() { - return _app_get_cache_path(); - } - - late final _app_get_cache_pathPtr = - _lookup Function()>>( - 'app_get_cache_path'); - late final _app_get_cache_path = - _app_get_cache_pathPtr.asFunction Function()>(); - - /// @brief Gets the absolute path to the application resource directory. The resource files are delivered with the application package. - /// @details An application can only read its own files in the application's resource directory. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The returned path should be released. - /// @return The absolute path to the application's resource directory, @n - /// otherwise a null pointer if the memory is insufficient - ffi.Pointer app_get_resource_path() { - return _app_get_resource_path(); - } - - late final _app_get_resource_pathPtr = - _lookup Function()>>( - 'app_get_resource_path'); - late final _app_get_resource_path = - _app_get_resource_pathPtr.asFunction Function()>(); - - /// @brief Gets the absolute path to the application's shared data directory which is used to share data with other applications. - /// @details An application can read and write its own files in the application's shared data directory and others can only read the files. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/appdir.shareddata - /// @remarks The returned path should be released. @n - /// Since Tizen 3.0, an application that want to use shared/data directory must declare http://tizen.org/privilege/appdir.shareddata privilege. If the application doesn't declare the privilege, the framework will not create shared/data directory for the application. - /// Carefully consider the privacy implications when deciding whether to use the shared/data directory, since the application cannot control access to this directory by other applications. - /// If you want to share files with other applications, consider passing path via @ref CAPI_APP_CONTROL_MODULE API. - /// The @ref CAPI_APP_CONTROL_MODULE API supports giving permission to other applications by passing path via app_control. @n - /// The specific error code can be obtained using the get_last_result(). Error codes are described in Exception section. - /// - /// @return The absolute path to the application's shared data directory, @n - /// otherwise a null pointer if the memory is insufficient. It will return NULL for applications with api-version 3.0 or later, and set #APP_ERROR_PERMISSION_DENIED if the application does not declare the shareddata privilege. - /// @exception APP_ERROR_NONE Success - /// @exception APP_ERROR_OUT_OF_MEMORY Out of memory - /// @exception APP_ERROR_PERMISSION_DENIED Permission denied - ffi.Pointer app_get_shared_data_path() { - return _app_get_shared_data_path(); - } - - late final _app_get_shared_data_pathPtr = - _lookup Function()>>( - 'app_get_shared_data_path'); - late final _app_get_shared_data_path = _app_get_shared_data_pathPtr - .asFunction Function()>(); - - /// @brief Gets the absolute path to the application's shared resource directory which is used to share resources with other applications. - /// @details An application can read its own files in the application's shared resource directory, and others can only read the files. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The returned path should be released. - /// @return The absolute path to the application's shared resource directory, @n - /// otherwise a null pointer if the memory is insufficient - ffi.Pointer app_get_shared_resource_path() { - return _app_get_shared_resource_path(); - } - - late final _app_get_shared_resource_pathPtr = - _lookup Function()>>( - 'app_get_shared_resource_path'); - late final _app_get_shared_resource_path = _app_get_shared_resource_pathPtr - .asFunction Function()>(); - - /// @brief Gets the absolute path to the application's shared trusted directory which is used to share data with a family of trusted applications. - /// @details An application can read and write its own files in the application's shared trusted directory - /// and the family applications signed with the same certificate can read and write the files in the shared trusted directory. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The returned path should be released. - /// @return The absolute path to the application's shared trusted directory, @n - /// otherwise a null pointer if the memory is insufficient - ffi.Pointer app_get_shared_trusted_path() { - return _app_get_shared_trusted_path(); - } - - late final _app_get_shared_trusted_pathPtr = - _lookup Function()>>( - 'app_get_shared_trusted_path'); - late final _app_get_shared_trusted_path = _app_get_shared_trusted_pathPtr - .asFunction Function()>(); - - /// @brief Gets the absolute path to the application's external data directory which is used to store data of the application. - /// @details An application can read and write its own files in the application's external data directory. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The returned path should be released. @n - /// The important files stored in the application's external data directory should be encrypted because they can be exported via the external sdcard. - /// To access the path returned by this function requires the privilege - /// that is "http://tizen.org/privilege/externalstorage.appdata". - /// @return The absolute path to the application's external data directory, @n - /// otherwise a null pointer if the memory is insufficient - ffi.Pointer app_get_external_data_path() { - return _app_get_external_data_path(); - } - - late final _app_get_external_data_pathPtr = - _lookup Function()>>( - 'app_get_external_data_path'); - late final _app_get_external_data_path = _app_get_external_data_pathPtr - .asFunction Function()>(); - - /// @brief Gets the absolute path to the application's external cache directory which is used to store temporary data of the application. - /// @details An application can read and write its own files in the application's external cache directory. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The returned path should be released. @n - /// The files stored in the application's external cache directory can be removed by - /// setting application while the application is running. @n - /// The important files stored in the application's external cache directory should be - /// encrypted because they can be exported via the external sdcard. - /// To access the path returned by this function requires the privilege - /// that is "http://tizen.org/privilege/externalstorage.appdata". - /// @return The absolute path to the application's external cache directory, @n - /// otherwise a null pointer if the memory is insufficient - ffi.Pointer app_get_external_cache_path() { - return _app_get_external_cache_path(); - } - - late final _app_get_external_cache_pathPtr = - _lookup Function()>>( - 'app_get_external_cache_path'); - late final _app_get_external_cache_path = _app_get_external_cache_pathPtr - .asFunction Function()>(); - - /// @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. - /// @brief Gets the absolute path to the application's external shared data directory which is used to share data with other applications. - /// @details An application can read and write its own files in the application's external shared data directory, and others can only read the files. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specified @a path should be released. - /// To access the path returned by this function requires the privilege - /// that is "http://tizen.org/privilege/externalstorage.appdata". - /// The function may not work as intended in certain devices due to some implementation issues. - /// @return The absolute path to the application's external shared data directory, @n - /// otherwise a null pointer if the memory is insufficient - ffi.Pointer app_get_external_shared_data_path() { - return _app_get_external_shared_data_path(); - } - - late final _app_get_external_shared_data_pathPtr = - _lookup Function()>>( - 'app_get_external_shared_data_path'); - late final _app_get_external_shared_data_path = - _app_get_external_shared_data_pathPtr - .asFunction Function()>(); - - /// @brief Gets the absolute path to the application's TEP(Tizen Expansion Package) directory. The resource files are delivered with the expansion package. - /// @details An application can only read its own files in the application's TEP(Tizen Expansion Package) directory. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks The returned path should be released. - /// @return The absolute path to the application's TEP(Tizen Expansion Package) directory, @n - /// otherwise a null pointer if the memory is insufficient - ffi.Pointer app_get_tep_resource_path() { - return _app_get_tep_resource_path(); - } - - late final _app_get_tep_resource_pathPtr = - _lookup Function()>>( - 'app_get_tep_resource_path'); - late final _app_get_tep_resource_path = _app_get_tep_resource_pathPtr - .asFunction Function()>(); - - /// @brief Gets the localized translation for the specified string. - /// - /// @details If a translation is not found in the localization file(.po file), @a message is returned. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks Do not free the returned value. - /// - /// @param[in] message The string to be translated - /// @return The localized translation for the given @a message on success, - /// otherwise the given @a message - ffi.Pointer i18n_get_text( - ffi.Pointer message, - ) { - return _i18n_get_text( - message, - ); - } - - late final _i18n_get_textPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('i18n_get_text'); - late final _i18n_get_text = _i18n_get_textPtr - .asFunction Function(ffi.Pointer)>(); - - /// @brief Gets the current device orientation. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @return The current device orientation - int app_get_device_orientation() { - return _app_get_device_orientation(); - } - - late final _app_get_device_orientationPtr = - _lookup>( - 'app_get_device_orientation'); - late final _app_get_device_orientation = - _app_get_device_orientationPtr.asFunction(); - - /// @brief Runs the application's main loop until ui_app_exit() is called. - /// @details This function is the main entry point of the Tizen application. - /// The app_create_cb() callback function is called to initialize the application before the main loop of application starts up. - /// After the app_create_cb() callback function returns true, the main loop starts up and the app_control_cb() callback function is subsequently called. - /// If the app_create_cb() callback function returns false, the main loop doesn't start up and app_terminate_cb() callback function is called. - /// This main loop supports event handling for the Ecore Main Loop. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] argc The argument count - /// @param[in] argv The argument vector - /// @param[in] callback The set of callback functions to handle application lifecycle events - /// @param[in] user_data The user data to be passed to the callback functions - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_ERROR_INVALID_CONTEXT The application is launched illegally, not launched by the launch system - /// @retval #APP_ERROR_ALREADY_RUNNING The main loop already started - /// @see app_create_cb() - /// @see app_terminate_cb() - /// @see app_pause_cb() - /// @see app_resume_cb() - /// @see app_control_cb() - /// @see ui_app_exit() - /// @see #ui_app_lifecycle_callback_s - int ui_app_main( - int argc, - ffi.Pointer> argv, - ffi.Pointer callback, - ffi.Pointer user_data, - ) { - return _ui_app_main( - argc, - argv, - callback, - user_data, - ); - } - - late final _ui_app_mainPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>>('ui_app_main'); - late final _ui_app_main = _ui_app_mainPtr.asFunction< - int Function(int, ffi.Pointer>, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Exits the main loop of application. - /// @details The main loop of application stops and app_terminate_cb() is invoked. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @see ui_app_main() - /// @see app_terminate_cb() - void ui_app_exit() { - return _ui_app_exit(); - } - - late final _ui_app_exitPtr = - _lookup>('ui_app_exit'); - late final _ui_app_exit = _ui_app_exitPtr.asFunction(); - - /// @brief Adds the system event handler. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[out] event_handler The event handler - /// @param[in] event_type The system event type - /// @param[in] callback The callback function - /// @param[in] user_data The user data to be passed to the callback functions - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_event_type_e - /// @see app_event_cb - /// @see ui_app_remove_event_handler - int ui_app_add_event_handler( - ffi.Pointer event_handler, - int event_type, - app_event_cb callback, - ffi.Pointer user_data, - ) { - return _ui_app_add_event_handler( - event_handler, - event_type, - callback, - user_data, - ); - } - - late final _ui_app_add_event_handlerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - app_event_cb, - ffi.Pointer)>>('ui_app_add_event_handler'); - late final _ui_app_add_event_handler = - _ui_app_add_event_handlerPtr.asFunction< - int Function(ffi.Pointer, int, app_event_cb, - ffi.Pointer)>(); - - /// @brief Removes registered event handler. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] event_handler The event handler - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @see ui_app_add_event_handler - int ui_app_remove_event_handler( - app_event_handler_h event_handler, - ) { - return _ui_app_remove_event_handler( - event_handler, - ); - } - - late final _ui_app_remove_event_handlerPtr = - _lookup>( - 'ui_app_remove_event_handler'); - late final _ui_app_remove_event_handler = _ui_app_remove_event_handlerPtr - .asFunction(); - - /// @brief Shows a toast popup window with given message. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] message The messages to be posted - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #NOTIFICATION_ERROR_FROM_DBUS Error from DBus - /// @see #notification_error_e - int notification_status_message_post( - ffi.Pointer message, - ) { - return _notification_status_message_post( - message, - ); - } - - late final _notification_status_message_postPtr = - _lookup)>>( - 'notification_status_message_post'); - late final _notification_status_message_post = - _notification_status_message_postPtr - .asFunction)>(); - - /// @brief Sets an absolute path for an image file to display on the notification view. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] type The notification image type - /// @param[in] image_path The image file full path - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Notification handle should be created by notification_create(). - /// @see #notification_image_type_e - /// @see notification_create() - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) - /// return; - /// - /// noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, APP_IMAGE_FULL_PATH); - /// if (noti_err != NOTIFICATION_ERROR_NONE) { - /// notification_free(noti); - /// return; - /// } - /// } - /// @endcode - int notification_set_image( - notification_h noti, - int type, - ffi.Pointer image_path, - ) { - return _notification_set_image( - noti, - type, - image_path, - ); - } - - late final _notification_set_imagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Int32, - ffi.Pointer)>>('notification_set_image'); - late final _notification_set_image = _notification_set_imagePtr - .asFunction)>(); - - /// @brief Gets the absolute path of an image file. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @remarks Do not free @a image_path. It will be freed when notification_free() is called. - /// @param[in] noti Notification handle - /// @param[in] type Notification image type - /// @param[out] image_path Image file full path - /// @return NOTIFICATION_ERROR_NONE on success, - /// other value on failure - /// @retval NOTIFICATION_ERROR_NONE Success - /// @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Notification handle should be created by notification_create(). - /// @see #notification_image_type_e - /// @see notification_create() - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// char *image_path = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti_err = notification_get_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, &image_path); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// } - /// @endcode - int notification_get_image( - notification_h noti, - int type, - ffi.Pointer> image_path, - ) { - return _notification_get_image( - noti, - type, - image_path, - ); - } - - late final _notification_get_imagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Int32, - ffi.Pointer>)>>('notification_get_image'); - late final _notification_get_image = _notification_get_imagePtr.asFunction< - int Function(notification_h, int, ffi.Pointer>)>(); - - /// @brief Sets a timestamp. - /// @details If input_time is @c 0, time information is taken from the current time. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] input_time The input time. If you want the time stamp to not be shown, set this as NOTIFICATION_DO_NOT_SHOW_TIME_STAMP - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Notification handle should be created by notification_create(). - /// @see notification_create() - /// @see NOTIFICATION_DO_NOT_SHOW_TIME_STAMP - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) - /// return; - /// - /// noti_err = notification_set_time(noti, time(NULL)); - /// if (noti_err != NOTIFICATION_ERROR_NONE) { - /// notification_free(noti); - /// return; - /// } - /// } - /// @endcode - int notification_set_time( - notification_h noti, - int input_time, - ) { - return _notification_set_time( - noti, - input_time, - ); - } - - late final _notification_set_timePtr = - _lookup>( - 'notification_set_time'); - late final _notification_set_time = - _notification_set_timePtr.asFunction(); - - /// @brief Gets a timestamp. - /// @details If ret_time is @c 0, time information is not set before. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[out] ret_time The return time value - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Notification handle should be created by notification_create(). - /// @see notification_create() - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// time_t ret_time; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti_err = notification_get_time(noti, &ret_time); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// } - /// @endcode - int notification_get_time( - notification_h noti, - ffi.Pointer ret_time, - ) { - return _notification_get_time( - noti, - ret_time, - ); - } - - late final _notification_get_timePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - notification_h, ffi.Pointer)>>('notification_get_time'); - late final _notification_get_time = _notification_get_timePtr - .asFunction)>(); - - /// @brief Gets an insertion timestamp of the notification. - /// @details If ret_time is @c 0, this notification data is not inserted before. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[out] ret_time The return time value - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// time_t ret_time; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti_err = notification_get_insert_time(noti, &ret_time); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// } - /// @endcode - int notification_get_insert_time( - notification_h noti, - ffi.Pointer ret_time, - ) { - return _notification_get_insert_time( - noti, - ret_time, - ); - } - - late final _notification_get_insert_timePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, - ffi.Pointer)>>('notification_get_insert_time'); - late final _notification_get_insert_time = _notification_get_insert_timePtr - .asFunction)>(); - - /// @brief Sets the text to display on the notification view. - /// @details Sets title, content string. If the text is formatted data (only %d, %f, %s are supported), type - value pair should be set. - /// If %d, the type #NOTIFICATION_VARIABLE_TYPE_INT and the value is an integer. - /// If %f, the type #NOTIFICATION_VARIABLE_TYPE_DOUBLE and the value is a double. - /// If %s, the type #NOTIFICATION_VARIABLE_TYPE_STRING and the value is a string. - /// If the type is #NOTIFICATION_VARIABLE_TYPE_COUNT, notification count is displaying with text. - /// If the value is #NOTIFICATION_COUNT_POS_LEFT, count is displayed at the left of the text. - /// If the value is #NOTIFICATION_COUNT_POS_IN, count is displayed in the text when text has %d format. - /// If the value is #NOTIFICATION_COUNT_POS_RIGHT, count is displayed at the right of the text. - /// Variable parameters should be terminated #NOTIFICATION_VARIABLE_TYPE_NONE. - /// - /// Note that You can display the translated contents according to the language of the system. - /// The application must supply a String KEY as the fourth argument to support localization. - /// If the language on the system changes, the contents of the notification are also translated. - /// - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] type The notification text type - /// @param[in] text The basic text - /// @param[in] key The text key for localization - /// @param[in] args_type The variable parameter that type - value pair - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre notification handle should be created by notification_create(). - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) - /// return; - /// - /// noti_err = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, - /// "I'm Title", "IDS_APP_BODY_IM_TITLE", NOTIFICATION_VARIABLE_TYPE_NONE); - /// if (noti_err != NOTIFICATION_ERROR_NONE) { - /// notification_free(noti); - /// return; - /// } - /// } - /// @endcode - int notification_set_text( - notification_h noti, - int type, - ffi.Pointer text, - ffi.Pointer key, - int args_type, - ) { - return _notification_set_text( - noti, - type, - text, - key, - args_type, - ); - } - - late final _notification_set_textPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Int32, ffi.Pointer, - ffi.Pointer, ffi.Int)>>('notification_set_text'); - late final _notification_set_text = _notification_set_textPtr.asFunction< - int Function(notification_h, int, ffi.Pointer, - ffi.Pointer, int)>(); - - /// @brief Gets the text from the notification handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] type The notification text type - /// @param[out] text The notification text - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// char *text = NULL; - /// - /// noti_err = notification_get_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, &text); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_get_text( - notification_h noti, - int type, - ffi.Pointer> text, - ) { - return _notification_get_text( - noti, - type, - text, - ); - } - - late final _notification_get_textPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Int32, - ffi.Pointer>)>>('notification_get_text'); - late final _notification_get_text = _notification_get_textPtr.asFunction< - int Function(notification_h, int, ffi.Pointer>)>(); - - /// @brief Sets the timestamp to display on the notification view. - /// @details The timestamp will be converted to a formatted string and it will be displayed on the set text area. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] type The notification text type - /// @param[in] time The timestamp - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Notification handle should be created by notification_create(). - int notification_set_time_to_text( - notification_h noti, - int type, - int time, - ) { - return _notification_set_time_to_text( - noti, - type, - time, - ); - } - - late final _notification_set_time_to_textPtr = _lookup< - ffi - .NativeFunction>( - 'notification_set_time_to_text'); - late final _notification_set_time_to_text = _notification_set_time_to_textPtr - .asFunction(); - - /// @brief Gets the timestamp from the notification handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] type The notification text type - /// @param[in] time The pointer of time stamp - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Notification handle should be created by notification_create(). - int notification_get_time_from_text( - notification_h noti, - int type, - ffi.Pointer time, - ) { - return _notification_get_time_from_text( - noti, - type, - time, - ); - } - - late final _notification_get_time_from_textPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Int32, - ffi.Pointer)>>('notification_get_time_from_text'); - late final _notification_get_time_from_text = - _notification_get_time_from_textPtr - .asFunction)>(); - - /// @brief Sets the sound type for the notification. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] type The notification sound type - /// @param[in] path The user sound file path - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti_err = notification_set_sound(noti, NOTIFICATION_SOUND_TYPE_DEFAULT, NULL); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_set_sound( - notification_h noti, - int type, - ffi.Pointer path, - ) { - return _notification_set_sound( - noti, - type, - path, - ); - } - - late final _notification_set_soundPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Int32, - ffi.Pointer)>>('notification_set_sound'); - late final _notification_set_sound = _notification_set_soundPtr - .asFunction)>(); - - /// @brief Gets the sound type from the notification handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[out] type The notification sound type - /// @param[out] path The user sound file path - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// notification_sound_type_e type = NOTIFICATION_SOUND_TYPE_NONE; - /// - /// noti_err = notification_get_sound(noti, &type, NULL); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_get_sound( - notification_h noti, - ffi.Pointer type, - ffi.Pointer> path, - ) { - return _notification_get_sound( - noti, - type, - path, - ); - } - - late final _notification_get_soundPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Pointer, - ffi.Pointer>)>>('notification_get_sound'); - late final _notification_get_sound = _notification_get_soundPtr.asFunction< - int Function(notification_h, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Sets the vibration type for the notification. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] type The notification vibration type - /// @param[in] path The user vibration file path - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti_err = notification_set_vibration(noti, NOTIFICATION_VIBRATION_TYPE_DEFAULT, NULL); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_set_vibration( - notification_h noti, - int type, - ffi.Pointer path, - ) { - return _notification_set_vibration( - noti, - type, - path, - ); - } - - late final _notification_set_vibrationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Int32, - ffi.Pointer)>>('notification_set_vibration'); - late final _notification_set_vibration = _notification_set_vibrationPtr - .asFunction)>(); - - /// @brief Gets the vibrate type from the notification handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[out] type The notification sound type - /// @param[out] path The user vibration file path - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// notification_vibration_type_e type = NOTIFICATION_VIBRATION_TYPE_NONE; - /// - /// noti_err = notification_get_vibration(noti, &type, NULL); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_get_vibration( - notification_h noti, - ffi.Pointer type, - ffi.Pointer> path, - ) { - return _notification_get_vibration( - noti, - type, - path, - ); - } - - late final _notification_get_vibrationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Pointer, - ffi.Pointer>)>>( - 'notification_get_vibration'); - late final _notification_get_vibration = - _notification_get_vibrationPtr.asFunction< - int Function(notification_h, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Sets the LED displaying option. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] operation The LED notification operation - /// @param[in] led_argb The notification LED color - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti_err = notification_set_led(noti, NOTIFICATION_LED_OP_ON, NULL); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_set_led( - notification_h noti, - int operation, - int led_argb, - ) { - return _notification_set_led( - noti, - operation, - led_argb, - ); - } - - late final _notification_set_ledPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - notification_h, ffi.Int32, ffi.Int)>>('notification_set_led'); - late final _notification_set_led = _notification_set_ledPtr - .asFunction(); - - /// @brief Gets the LED displaying option from the notification handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[out] operation The LED notification operation - /// @param[out] led_argb The notification LED color - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// notification_led_type_e type = NOTIFICATION_LED_OP_OFF; - /// - /// noti_err = notification_get_led(noti, &type, NULL); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_get_led( - notification_h noti, - ffi.Pointer operation, - ffi.Pointer led_argb, - ) { - return _notification_get_led( - noti, - operation, - led_argb, - ); - } - - late final _notification_get_ledPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Pointer, - ffi.Pointer)>>('notification_get_led'); - late final _notification_get_led = _notification_get_ledPtr.asFunction< - int Function( - notification_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the time period of flashing the LED. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] on_ms The time for turning on the LED - /// @param[in] off_ms The time for turning off the LED - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti_err = notification_set_led_time_period(noti, 100, 100); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_set_led_time_period( - notification_h noti, - int on_ms, - int off_ms, - ) { - return _notification_set_led_time_period( - noti, - on_ms, - off_ms, - ); - } - - late final _notification_set_led_time_periodPtr = _lookup< - ffi - .NativeFunction>( - 'notification_set_led_time_period'); - late final _notification_set_led_time_period = - _notification_set_led_time_periodPtr - .asFunction(); - - /// @brief Gets the time period of flashing the LED from the notification handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[out] on_ms The time for turning on the LED - /// @param[out] off_ms The time for turning on the LED - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// int led_on_ms = 0; - /// int led_off_ms = 0; - /// - /// noti_err = notification_get_led_time_period(noti, &led_on_ms, &led_off_ms); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_get_led_time_period( - notification_h noti, - ffi.Pointer on_ms, - ffi.Pointer off_ms, - ) { - return _notification_get_led_time_period( - noti, - on_ms, - off_ms, - ); - } - - late final _notification_get_led_time_periodPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Pointer, - ffi.Pointer)>>('notification_get_led_time_period'); - late final _notification_get_led_time_period = - _notification_get_led_time_periodPtr.asFunction< - int Function( - notification_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the launch option for a notification. - /// @details When notification data selected in display application, application launched by app_control_send_launch_request with app_control handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] type Launching option type - /// @param[in] option App Control handler - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// app_control_h app_control = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// // Do something - /// - /// app_control_create(&app_control); - /// app_control_set_app_id(app_control, "org.tizen.app"); - /// - /// // Do something - /// - /// noti_err = notification_set_launch_option(noti, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, (void *)app_control); - /// if (noti_err != NOTIFICATION_ERROR_NONE) { - /// app_control_destroy(app_control); - /// notification_free(noti); - /// return; - /// } - /// - /// app_control_destroy(app_control); - /// } - /// @endcode - int notification_set_launch_option( - notification_h noti, - int type, - ffi.Pointer option, - ) { - return _notification_set_launch_option( - noti, - type, - option, - ); - } - - late final _notification_set_launch_optionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Int32, - ffi.Pointer)>>('notification_set_launch_option'); - late final _notification_set_launch_option = - _notification_set_launch_optionPtr.asFunction< - int Function(notification_h, int, ffi.Pointer)>(); - - /// @brief Gets the launch option from the notification handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @remarks You must release @a app_control using app_control_destroy(). - /// @param[in] noti The notification handle - /// @param[in] type Launching option type - /// @param[out] option The pointer of App Control handler - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// app_control_h app_control = NULL; - /// app_control_create(&app_control); - /// - /// // Do something - /// - /// noti_err = notification_get_launch_option(noti, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, (void *)&app_control); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// } - /// @endcode - int notification_get_launch_option( - notification_h noti, - int type, - ffi.Pointer option, - ) { - return _notification_get_launch_option( - noti, - type, - option, - ); - } - - late final _notification_get_launch_optionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Int32, - ffi.Pointer)>>('notification_get_launch_option'); - late final _notification_get_launch_option = - _notification_get_launch_optionPtr.asFunction< - int Function(notification_h, int, ffi.Pointer)>(); - - /// @brief Sets the handler for a specific event. - /// @details When some event occurs on notification, application launched by app_control_send_launch_request with app_control handle. \n - /// Setting event handler of a button means that the notification will show the button. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] noti The notification handle - /// @param[in] event_type Event type - /// @param[in] event_handler App control handle - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @see #notification_event_type_e - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// app_control_h app_control = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// // Do something - /// - /// app_control_create(&app_control); - /// app_control_set_app_id(app_control, "org.tizen.app"); - /// - /// // Do something - /// - /// noti_err = notification_set_event_handler(noti, NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_1, app_control); - /// if (noti_err != NOTIFICATION_ERROR_NONE) { - /// app_control_destroy(app_control); - /// notification_free(noti); - /// return; - /// } - /// - /// app_control_destroy(app_control); - /// } - /// @endcode - int notification_set_event_handler( - notification_h noti, - int event_type, - app_control_h event_handler, - ) { - return _notification_set_event_handler( - noti, - event_type, - event_handler, - ); - } - - late final _notification_set_event_handlerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Int32, - app_control_h)>>('notification_set_event_handler'); - late final _notification_set_event_handler = - _notification_set_event_handlerPtr - .asFunction(); - - /// @brief Gets the event handler of a specific event. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a app_control using app_control_destroy(). - /// @param[in] noti The notification handle - /// @param[in] event_type Launching option type - /// @param[out] event_handler The handler of App Control - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @see #notification_event_type_e - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// app_control_h app_control = NULL; - /// app_control_create(&app_control); - /// - /// // Do something - /// - /// noti_err = notification_get_event_handler(noti, NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_1, &app_control); - /// if (noti_err != NOTIFICATION_ERROR_NONE) { - /// notification_free(noti); - /// return; - /// } - /// } - /// @endcode - int notification_get_event_handler( - notification_h noti, - int event_type, - ffi.Pointer event_handler, - ) { - return _notification_get_event_handler( - noti, - event_type, - event_handler, - ); - } - - late final _notification_get_event_handlerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Int32, - ffi.Pointer)>>('notification_get_event_handler'); - late final _notification_get_event_handler = - _notification_get_event_handlerPtr.asFunction< - int Function(notification_h, int, ffi.Pointer)>(); - - /// @brief Sets the property of the notification. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] flags The property with | operation - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// bundle *b = NULL; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) - /// return; - /// - /// noti_err = notification_set_property(noti, NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE | NOTIFICATION_PROP_DISABLE_APP_LAUNCH); - /// if (noti_err != NOTIFICATION_ERROR_NONE) { - /// notification_free(noti); - /// return; - /// } - /// } - /// @endcode - int notification_set_property( - notification_h noti, - int flags, - ) { - return _notification_set_property( - noti, - flags, - ); - } - - late final _notification_set_propertyPtr = - _lookup>( - 'notification_set_property'); - late final _notification_set_property = _notification_set_propertyPtr - .asFunction(); - - /// @brief Gets the property of the notification from the notification handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[out] flags The notification property - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// int flags = 0; - /// - /// noti_err = notification_get_property(noti, &flags); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_get_property( - notification_h noti, - ffi.Pointer flags, - ) { - return _notification_get_property( - noti, - flags, - ); - } - - late final _notification_get_propertyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, - ffi.Pointer)>>('notification_get_property'); - late final _notification_get_property = _notification_get_propertyPtr - .asFunction)>(); - - /// @brief Sets applications to display the notification. - /// @details All display application is enabled(NOTIFICATION_DISPLAY_APP_ALL) if you do not call this API. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] applist The with | operation - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// bundle *b = NULL; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) - /// return; - /// - /// noti_err = notification_set_display_applist(noti, NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY | - /// NOTIFICATION_DISPLAY_APP_TICKER | NOTIFICATION_DISPLAY_APP_INDICATOR); - /// if (noti_err != NOTIFICATION_ERROR_NONE) { - /// notification_free(noti); - /// return; - /// } - /// } - /// @endcode - int notification_set_display_applist( - notification_h noti, - int applist, - ) { - return _notification_set_display_applist( - noti, - applist, - ); - } - - late final _notification_set_display_applistPtr = - _lookup>( - 'notification_set_display_applist'); - late final _notification_set_display_applist = - _notification_set_display_applistPtr - .asFunction(); - - /// @brief Gets the application list displaying the notification from the notification handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[out] applist The display application list - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// int applist = 0; - /// - /// noti_err = notification_get_display_applist(noti, &applist); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_get_display_applist( - notification_h noti, - ffi.Pointer applist, - ) { - return _notification_get_display_applist( - noti, - applist, - ); - } - - late final _notification_get_display_applistPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, - ffi.Pointer)>>('notification_get_display_applist'); - late final _notification_get_display_applist = - _notification_get_display_applistPtr - .asFunction)>(); - - /// @brief Sets the initial size for the ongoing type. - /// @details After notification_post() call, the size is not updated. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] size The double type size - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) - /// return; - /// - /// noti_err = notification_set_size(noti, 0.0); - /// if (noti_err != NOTIFICATION_ERROR_NONE) { - /// notification_free(noti); - /// return; - /// } - /// } - /// @endcode - int notification_set_size( - notification_h noti, - double size, - ) { - return _notification_set_size( - noti, - size, - ); - } - - late final _notification_set_sizePtr = - _lookup>( - 'notification_set_size'); - late final _notification_set_size = _notification_set_sizePtr - .asFunction(); - - /// @brief Gets the progress size. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[out] size The progress size - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// double size = 0.0; - /// - /// noti_err = notification_get_size(noti, &size); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// } - /// @endcode - int notification_get_size( - notification_h noti, - ffi.Pointer size, - ) { - return _notification_get_size( - noti, - size, - ); - } - - late final _notification_get_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, - ffi.Pointer)>>('notification_get_size'); - late final _notification_get_size = _notification_get_sizePtr - .asFunction)>(); - - /// @brief Sets the initial progress for the ongoing type. - /// @details After the notification_post() call, the progress is not updated. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] percentage The progress percentage - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) - /// return; - /// - /// noti_err = notification_set_progress(noti, 0.0); - /// if (noti_err != NOTIFICATION_ERROR_NONE) { - /// notification_free(noti); - /// return; - /// } - /// } - /// @endcode - int notification_set_progress( - notification_h noti, - double percentage, - ) { - return _notification_set_progress( - noti, - percentage, - ); - } - - late final _notification_set_progressPtr = - _lookup>( - 'notification_set_progress'); - late final _notification_set_progress = _notification_set_progressPtr - .asFunction(); - - /// @brief Gets the progress from the notification handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @remarks At the end of the operation, the progress should be @c 1.0. - /// @param[in] noti The notification handle - /// @param[out] percentage The progress percentage - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// double percentage = 0.0; - /// - /// noti_err = notification_get_progress(noti, &percentage); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_get_progress( - notification_h noti, - ffi.Pointer percentage, - ) { - return _notification_get_progress( - noti, - percentage, - ); - } - - late final _notification_get_progressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, - ffi.Pointer)>>('notification_get_progress'); - late final _notification_get_progress = _notification_get_progressPtr - .asFunction)>(); - - /// @brief Sets the layout of the notification view. - /// @details Caller can set displaying layout of notification. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[in] layout The type of layout - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @see #notification_ly_type_e - int notification_set_layout( - notification_h noti, - int layout, - ) { - return _notification_set_layout( - noti, - layout, - ); - } - - late final _notification_set_layoutPtr = - _lookup>( - 'notification_set_layout'); - late final _notification_set_layout = _notification_set_layoutPtr - .asFunction(); - - /// @brief Gets the layout of the notification view from the notification handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[out] layout The type of layout - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @see #notification_ly_type_e - int notification_get_layout( - notification_h noti, - ffi.Pointer layout, - ) { - return _notification_get_layout( - noti, - layout, - ); - } - - late final _notification_get_layoutPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, - ffi.Pointer)>>('notification_get_layout'); - late final _notification_get_layout = _notification_get_layoutPtr - .asFunction)>(); - - /// @brief Gets the type of a notification. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @param[out] type The notification type - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// notification_type_e type; - /// - /// noti_err = notification_get_type(noti, &type); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// } - /// @endcode - int notification_get_type( - notification_h noti, - ffi.Pointer type, - ) { - return _notification_get_type( - noti, - type, - ); - } - - late final _notification_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, - ffi.Pointer)>>('notification_get_type'); - late final _notification_get_type = _notification_get_typePtr - .asFunction)>(); - - /// @brief Updates notification data. - /// @details The updated notification will appear in the notification area. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[in] noti The notification handle that is created by notification_create() - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @retval #NOTIFICATION_ERROR_NOT_EXIST_ID Priv ID does not exist - /// @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti_err = notification_update(NULL); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// } - /// @endcode - int notification_update( - notification_h noti, - ) { - return _notification_update( - noti, - ); - } - - late final _notification_updatePtr = - _lookup>( - 'notification_update'); - late final _notification_update = - _notification_updatePtr.asFunction(); - - /// @brief Deletes a notification with the given handle. - /// @details notification_delete() removes notification data from database and notification_free() releases memory of notification data. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[in] noti The notification handle - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @retval NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// // Do something - /// - /// noti_err = notification_delete(noti); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_delete( - notification_h noti, - ) { - return _notification_delete( - noti, - ); - } - - late final _notification_deletePtr = - _lookup>( - 'notification_delete'); - late final _notification_delete = - _notification_deletePtr.asFunction(); - - /// @brief Creates internal structure data and returns a notification handle. - /// @details Available type is #NOTIFICATION_TYPE_NOTI and #NOTIFICATION_TYPE_ONGOING. - /// #NOTIFICATION_TYPE_NOTI is remaining notification data even if device is restarted. - /// #NOTIFICATION_TYPE_ONGOING can display progress on a notification with #NOTIFICATION_LY_ONGOING_PROGRESS layout. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] type The notification type - /// @return Notification handle(notification_h) on success, - /// otherwise @c NULL on failure - /// @retval notification_h Success - /// @retval NULL Failure - /// @exception #NOTIFICATION_ERROR_NONE Success - /// @exception #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @exception #NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory - /// @exception #NOTIFICATION_ERROR_IO_ERROR I/O error - /// @see #notification_type_e - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) - /// return; - /// - /// // Do something - /// - /// } - /// @endcode - notification_h notification_create( - int type, - ) { - return _notification_create( - type, - ); - } - - late final _notification_createPtr = - _lookup>( - 'notification_create'); - late final _notification_create = - _notification_createPtr.asFunction(); - - /// @brief Creates a notification clone. - /// @details Newly created notification handle is returned. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @remarks This cloned notification handle should be freed using notification_free(). - /// @param[in] noti The notification handle - /// @param[out] clone The newly created notification handle that has same with input @a noti - /// @return #NOTIFICATION_ERROR_NONE if success, - /// otherwise any other value if failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @see #notification_type_e - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// notification_h clone = NULL; - /// - /// notification_clone(noti, &clone); - /// - /// // Do something - /// - /// } - /// @endcode - int notification_clone( - notification_h noti, - ffi.Pointer clone, - ) { - return _notification_clone( - noti, - clone, - ); - } - - late final _notification_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, - ffi.Pointer)>>('notification_clone'); - late final _notification_clone = _notification_clonePtr - .asFunction)>(); - - /// @brief Frees the internal structure data of a notification handle. - /// @details Internal data of a notification handle is released. Data of the inserted notification is not deleted. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti The notification handle - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Notification handle should be created by notification_create(). - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) - /// return; - /// - /// // Do something - /// - /// noti_err = notification_free(noti); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_free( - notification_h noti, - ) { - return _notification_free( - noti, - ); - } - - late final _notification_freePtr = - _lookup>( - 'notification_free'); - late final _notification_free = - _notification_freePtr.asFunction(); - - /// @brief Sets the tag of the notification handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti Notification handle - /// @param[in] tag Tag for loading notification handle - /// @return #NOTIFICATION_ERROR_NONE on success, - /// other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @see notification_get_tag() - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) - /// return; - /// - /// // Do something - /// - /// noti_err = notification_set_tag(noti, tag); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_set_tag( - notification_h noti, - ffi.Pointer tag, - ) { - return _notification_set_tag( - noti, - tag, - ); - } - - late final _notification_set_tagPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - notification_h, ffi.Pointer)>>('notification_set_tag'); - late final _notification_set_tag = _notification_set_tagPtr - .asFunction)>(); - - /// @brief Gets the tag of the notification handle. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @param[in] noti Notification handle - /// @param[out] tag Tag for loading notification handle - /// @return #NOTIFICATION_ERROR_NONE on success, - /// other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @see notification_set_tag() - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// const char *tag = NULL; - /// - /// // Do something - /// - /// noti_err = notification_get_tag(noti, &tag); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_get_tag( - notification_h noti, - ffi.Pointer> tag, - ) { - return _notification_get_tag( - noti, - tag, - ); - } - - late final _notification_get_tagPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, - ffi.Pointer>)>>('notification_get_tag'); - late final _notification_get_tag = _notification_get_tagPtr.asFunction< - int Function(notification_h, ffi.Pointer>)>(); - - /// @brief Loads a notification from the notification's database with the tag. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] tag Tag for loading notification handle - /// @return Notification handle(notification_h) on success, - /// NULL on failure - /// @retval notification_h Success - /// @retval NULL Failure - /// @exception #NOTIFICATION_ERROR_NONE Success - /// @exception #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @exception #NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory - /// @exception #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @see #notification_type_e - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// - /// noti = notification_load_by_tag(tag); - /// if (noti == NULL) - /// return; - /// - /// // Do something - /// - /// } - /// @endcode - notification_h notification_load_by_tag( - ffi.Pointer tag, - ) { - return _notification_load_by_tag( - tag, - ); - } - - late final _notification_load_by_tagPtr = _lookup< - ffi.NativeFunction)>>( - 'notification_load_by_tag'); - late final _notification_load_by_tag = _notification_load_by_tagPtr - .asFunction)>(); - - /// @brief Deletes all notifications of the given type. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[in] type Notification type - /// @return #NOTIFICATION_ERROR_NONE if success, - /// other value if failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti_err = notification_delete_all(NOTIFICATION_TYPE_NOTI); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_delete_all( - int type, - ) { - return _notification_delete_all( - type, - ); - } - - late final _notification_delete_allPtr = - _lookup>( - 'notification_delete_all'); - late final _notification_delete_all = - _notification_delete_allPtr.asFunction(); - - /// @brief Posts a notification. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[in] noti Notification handle - /// @return #NOTIFICATION_ERROR_NONE if success, - /// other value if failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @pre Notification handle should be created by notification_create(). - /// @post notification_free(). - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti_err = notification_post(noti); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_post( - notification_h noti, - ) { - return _notification_post( - noti, - ); - } - - late final _notification_postPtr = - _lookup>( - 'notification_post'); - late final _notification_post = - _notification_postPtr.asFunction(); - - /// @brief Gets the package name of the notification. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] noti Notification handle - /// @param[out] pkgname The package name of the notification - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval NOTIFICATION_ERROR_NONE Success - /// @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// char *pkgname = NULL; - /// - /// // Do something - /// - /// noti_err = notification_get_pkgname(noti, &pkgname); - /// - /// if (noti_err != NOTIFICATION_ERROR_NONE) { - /// notification_free(noti); - /// return; - /// } - /// } - /// @endcode - int notification_get_pkgname( - notification_h noti, - ffi.Pointer> pkgname, - ) { - return _notification_get_pkgname( - noti, - pkgname, - ); - } - - late final _notification_get_pkgnamePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, - ffi.Pointer>)>>('notification_get_pkgname'); - late final _notification_get_pkgname = - _notification_get_pkgnamePtr.asFunction< - int Function(notification_h, ffi.Pointer>)>(); - - /// @brief Adds a button on the notification. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] noti Notification handle - /// @param[in] button_index Button index - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval NOTIFICATION_ERROR_NONE Success - /// @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// char *pkgname = NULL; - /// - /// // Do something - /// - /// noti_err = notification_add_button(noti, NOTIFICATION_BUTTON_1); - /// - /// if (noti_err != NOTIFICATION_ERROR_NONE) { - /// notification_free(noti); - /// return; - /// } - /// } - /// @endcode - int notification_add_button( - notification_h noti, - int button_index, - ) { - return _notification_add_button( - noti, - button_index, - ); - } - - late final _notification_add_buttonPtr = - _lookup>( - 'notification_add_button'); - late final _notification_add_button = _notification_add_buttonPtr - .asFunction(); - - /// @brief Removes a button on the notification. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] noti Notification handle - /// @param[in] button_index Button index - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval NOTIFICATION_ERROR_NONE Success - /// @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// char *pkgname = NULL; - /// - /// // Do something - /// - /// noti_err = notification_remove_button(noti, NOTIFICATION_BUTTON_1); - /// - /// if (noti_err != NOTIFICATION_ERROR_NONE) { - /// notification_free(noti); - /// return; - /// } - /// } - /// @endcode - int notification_remove_button( - notification_h noti, - int button_index, - ) { - return _notification_remove_button( - noti, - button_index, - ); - } - - late final _notification_remove_buttonPtr = - _lookup>( - 'notification_remove_button'); - late final _notification_remove_button = _notification_remove_buttonPtr - .asFunction(); - - /// @brief Sets the 'auto remove' option of the active notification. - /// @details The 'auto remove' option lets the active notification be removed several seconds after it shows. Default value is true. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks When 'auto_remove' is set as false, the active notification will not be removed - /// as long as the user removes the active notification or the app which posted the active notification removes the active notification. - /// @param[in] noti Notification handle - /// @param[in] auto_remove Auto remove option - /// @return #NOTIFICATION_ERROR_NONE On success, - /// other value if failure - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @see #notification_h - /// @see #notification_get_auto_remove - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// // Do something - /// - /// noti_err = notification_set_auto_remove(noti, false); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_set_auto_remove( - notification_h noti, - bool auto_remove, - ) { - return _notification_set_auto_remove( - noti, - auto_remove, - ); - } - - late final _notification_set_auto_removePtr = - _lookup>( - 'notification_set_auto_remove'); - late final _notification_set_auto_remove = _notification_set_auto_removePtr - .asFunction(); - - /// @brief Gets the 'auto remove' option of the active notification. - /// @details The 'auto remove' option lets the active notification be removed several seconds after it shows. Default value is true. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] noti Notification handle - /// @param[out] auto_remove Auto remove option - /// @return #NOTIFICATION_ERROR_NONE On success, other value on failure - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @see #notification_h - /// @see #notification_get_auto_remove - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// bool auto_remove; - /// - /// // Do something - /// - /// noti_err = notification_get_auto_remove(noti, &auto_remove); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_get_auto_remove( - notification_h noti, - ffi.Pointer auto_remove, - ) { - return _notification_get_auto_remove( - noti, - auto_remove, - ); - } - - late final _notification_get_auto_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, - ffi.Pointer)>>('notification_get_auto_remove'); - late final _notification_get_auto_remove = _notification_get_auto_removePtr - .asFunction)>(); - - /// @brief Saves a notification template to the notification database. - /// @details An application can save the created notification as a template for later reuse. - /// If the template has the same name as a saved one, the saved template will be overwritten. - /// A saved template can be loaded only by the application which saved it. - /// All templates are removed when the application package is uninstalled. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @remarks The number of templates is limited to 10. - /// When you try to add more than 10 templates, #NOTIFICATION_ERROR_MAX_EXCEEDED will be returned. - /// @param[in] noti Notification handle - /// @param[in] template_name Template name - /// @return #NOTIFICATION_ERROR_NONE On success, other value on failure - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #NOTIFICATION_ERROR_IO_ERROR I/O error - /// @retval #NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The Permission denied - /// @retval #NOTIFICATION_ERROR_MAX_EXCEEDED Max notification count exceeded - /// @see #notification_h - /// @see notification_create_from_template() - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// notification_h noti = NULL; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) - /// return; - /// - /// // add the content you want to use for the template. - /// - /// noti_err = notification_save_as_template(noti, "CALL_ACCEPT"); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = notification_free(noti); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// } - /// @endcode - int notification_save_as_template( - notification_h noti, - ffi.Pointer template_name, - ) { - return _notification_save_as_template( - noti, - template_name, - ); - } - - late final _notification_save_as_templatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, - ffi.Pointer)>>('notification_save_as_template'); - late final _notification_save_as_template = _notification_save_as_templatePtr - .asFunction)>(); - - /// @brief Loads a notification template from the notification database. - /// @details An application can load a saved template and post it. - /// An application can load only templates that it has saved. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @remarks The returned handle should be destroyed using notification_free(). - /// The specific error code can be obtained using get_last_result(). - /// Error codes are described in the Exception section. - /// If an invalid template name is given, the result will be set to #NOTIFICATION_ERROR_FROM_DB. - /// @param[in] template_name Template name - /// @return Notification handle on success, NULL on failure - /// @exception #NOTIFICATION_ERROR_NONE Success - /// @exception #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - /// @exception #NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory - /// @exception #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @exception #NOTIFICATION_ERROR_FROM_DB Error from DB query - /// @see #notification_h - /// @see notification_save_as_template() - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// - /// noti = notification_create_from_template("CALL_ACCEPT"); - /// if (noti == NULL) - /// return; - /// - /// } - /// @endcode - notification_h notification_create_from_template( - ffi.Pointer template_name, - ) { - return _notification_create_from_template( - template_name, - ); - } - - late final _notification_create_from_templatePtr = _lookup< - ffi.NativeFunction)>>( - 'notification_create_from_template'); - late final _notification_create_from_template = - _notification_create_from_templatePtr - .asFunction)>(); - - /// @brief Gets notification block state. - /// @details The user can set the notification block state in settings. - /// The block state indicates whether or not notifications can be posted. - /// Additionally only notifications to the notification panel are - /// allowed in "Do not disturb mode". Sound, Vibrate and - /// Active/Instant notifications are blocked. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[out] state Notification block state - /// @return #NOTIFICATION_ERROR_NONE On success, other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #NOTIFICATION_ERROR_OUT_OF_MEMORY out of memory - /// @retval #NOTIFICATION_ERROR_IO_ERROR I/O Error - /// @retval #NOTIFICATION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #NOTIFICATION_ERROR_SERVICE_NOT_READY No response from notification service - /// @see #notification_block_state_e - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// notification_block_state_e state; - /// - /// // Do something - /// - /// noti_err = notification_get_noti_block_state(&state); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int notification_get_noti_block_state( - ffi.Pointer state, - ) { - return _notification_get_noti_block_state( - state, - ); - } - - late final _notification_get_noti_block_statePtr = - _lookup)>>( - 'notification_get_noti_block_state'); - late final _notification_get_noti_block_state = - _notification_get_noti_block_statePtr - .asFunction)>(); - - /// @brief Sets a text input box to reply directly on the notification. - /// @details When you add a text input to the active notification, the notification UI will show a text input with a button. - /// So, the user can enter any text and press the button to confirm the text as a input. - /// You can edit some UI component that is related to the text input. - /// First, you can add placeholder text to guide the user using notification_set_text() with #NOTIFICATION_TEXT_TYPE_TEXT_INPUT_PLACEHOLDER type. - /// You also can edit button for the text input. - /// For setting just a text to the button, you can set the text using notification_set_text() with #NOTIFICATION_TEXT_TYPE_TEXT_INPUT_BUTTON type. - /// If you want to show image button, you can set an image for the button using notification_set_image() with #NOTIFICATION_IMAGE_TYPE_TEXT_INPUT_BUTTON type. - /// - /// Note that you should set an app_control for handling the event for user input using notification_set_event_handler(). - /// #NOTIFICATION_EVENT_TYPE_CLICK_ON_TEXT_INPUT_BUTTON is the event type for the text input. - /// You can get the text the user enters in the app_control handle that is passed as a result of the event. - /// The app_control will contain APP_CONTROL_DATA_TEXT key, so you can get the text using app_control_get_extra_data() using APP_CONTROL_DATA_TEXT key. - /// The value will contain the text user enters. - /// - /// Note that you are able to make the switching button to the text input box. - /// You have to set the app_control which you will set in a text input box to the switching button. - /// Refer to the second sample code. - /// @since_tizen 3.0 - /// @param[in] noti Notification handle - /// @param[in] text_input_max_length The maximum value which can be inputted - /// @return #NOTIFICATION_ERROR_NONE on success, - /// otherwise any other value on failure - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// notification_h noti = NULL; - /// app_control = NULL; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) - /// return; - /// - /// noti_err = notification_set_text_input(noti, 160); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = notification_set_text(noti, - /// NOTIFICATION_TEXT_TYPE_TEXT_INPUT_PLACEHOLDER, - /// "Text message", - /// NULL, - /// NOTIFICATION_VARIABLE_TYPE_NONE); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = notification_set_text(noti, - /// NOTIFICATION_TEXT_TYPE_TEXT_INPUT_BUTTON, - /// "SEND", - /// NULL, - /// NOTIFICATION_VARIABLE_TYPE_NONE); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = notification_set_display_applist(noti, - /// NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY | NOTIFICATION_DISPLAY_APP_ACTIVE); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// // Do something - /// - /// noti_err = app_control_create(&app_control); - /// if (noti_err != APP_CONTROL_ERROR_NONE) - /// return; - /// - /// noti_err = app_control_set_app_id(app_control, appid); - /// if (noti_err != APP_CONTROL_ERROR_NONE) - /// return; - /// - /// noti_err = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT); - /// if (noti_err != APP_CONTROL_ERROR_NONE) - /// return; - /// - /// noti_err = notification_set_event_handler(noti, - /// NOTIFICATION_EVENT_TYPE_CLICK_ON_TEXT_INPUT_BUTTON, - /// app_control); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = app_control_destroy(app_control); - /// if (noti_err != APP_CONTROL_ERROR_NONE) - /// return; - /// - /// noti_err = notification_post(noti); - /// if(noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// } - /// - /// - /// { - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// notification_h noti = NULL; - /// app_control = NULL; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) { - /// return; - /// } - /// - /// noti_err = notification_set_text_input(noti, 160); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = notification_set_text(noti, - /// NOTIFICATION_TEXT_TYPE_TEXT_INPUT_PLACEHOLDER, - /// "Text message", - /// NULL, - /// NOTIFICATION_VARIABLE_TYPE_NONE); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = notification_set_text(noti, - /// NOTIFICATION_TEXT_TYPE_TEXT_INPUT_BUTTON, - /// "SEND", - /// NULL, - /// NOTIFICATION_VARIABLE_TYPE_NONE); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = notification_add_button(notification, NOTIFICATION_BUTTON_1); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = notification_set_text(notification, - /// NOTIFICATION_TEXT_TYPE_BUTTON_1, - /// "reply", - /// NULL, - /// NOTIFICATION_VARIABLE_TYPE_NONE); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = notification_set_display_applist(noti, - /// NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY | NOTIFICATION_DISPLAY_APP_ACTIVE); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// // Do something - /// - /// noti_err = app_control_create(&app_control); - /// if (noti_err != APP_CONTROL_ERROR_NONE) - /// return; - /// - /// noti_err = app_control_set_app_id(app_control, appid); - /// if (noti_err != APP_CONTROL_ERROR_NONE) - /// return; - /// - /// noti_err = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT); - /// if (noti_err != APP_CONTROL_ERROR_NONE) - /// return; - /// - /// noti_err = notification_set_event_handler(notification, - /// NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_1, - /// app_control); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = notification_set_event_handler(noti, - /// NOTIFICATION_EVENT_TYPE_CLICK_ON_TEXT_INPUT_BUTTON, - /// app_control); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = app_control_destroy(app_control); - /// if (noti_err != APP_CONTROL_ERROR_NONE) - /// return; - /// - /// noti_err = notification_post(noti); - /// if(noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// } - /// @endcode - int notification_set_text_input( - notification_h noti, - int text_input_max_length, - ) { - return _notification_set_text_input( - noti, - text_input_max_length, - ); - } - - late final _notification_set_text_inputPtr = - _lookup>( - 'notification_set_text_input'); - late final _notification_set_text_input = _notification_set_text_inputPtr - .asFunction(); - - /// @brief Sets the image height for the extended notification. - /// @details The image is shown under the notification's text. The application can set the image height. - /// The image is modified to fit into the height set by this function. - /// The image can be scaled down and/or cropped. - /// If @a height is 0, the default value is used. The default height depends on the screen size. - /// @since_tizen 4.0 - /// @param[in] noti The notification handle - /// @param[in] height The image height - /// @return #NOTIFICATION_ERROR_NONE On success, - /// otherwise a negative error value - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @see notification_get_extension_image_size() - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// notification_h noti = NULL; - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// - /// noti = notification_create(NOTIFICATION_TYPE_NOTI); - /// if (noti == NULL) - /// return; - /// - /// noti_err = notification_set_text(noti, - /// NOTIFICATION_TEXT_TYPE_CONTENT_EXTENTION, - /// "message", - /// NULL, - /// NOTIFICATION_VARIABLE_TYPE_NONE); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = notification_set_image(noti, - /// NOTIFICATION_IMAGE_TYPE_EXTENTION, - /// image_path); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = notification_set_layout(noti, NOTIFICATION_LY_EXTENTION); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// noti_err = notification_set_extension_image_size(noti, 20); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// - /// // Do something - /// } - /// @endcode - int notification_set_extension_image_size( - notification_h noti, - int height, - ) { - return _notification_set_extension_image_size( - noti, - height, - ); - } - - late final _notification_set_extension_image_sizePtr = - _lookup>( - 'notification_set_extension_image_size'); - late final _notification_set_extension_image_size = - _notification_set_extension_image_sizePtr - .asFunction(); - - /// @brief Gets the image height for the extended notification. - /// @since_tizen 4.0 - /// @param[in] noti The notification handle - /// @param[out] height The image height - /// @return #NOTIFICATION_ERROR_NONE On success, otherwise a negative error value - /// @retval #NOTIFICATION_ERROR_NONE Success - /// @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - /// @see notification_set_extension_image_size() - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int noti_err = NOTIFICATION_ERROR_NONE; - /// int height; - /// - /// // Do something - /// - /// noti_err = notification_get_extension_image_size(noti, &height); - /// if (noti_err != NOTIFICATION_ERROR_NONE) - /// return; - /// } - /// @endcode - int notification_get_extension_image_size( - notification_h noti, - ffi.Pointer height, - ) { - return _notification_get_extension_image_size( - noti, - height, - ); - } - - late final _notification_get_extension_image_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, - ffi.Pointer)>>('notification_get_extension_image_size'); - late final _notification_get_extension_image_size = - _notification_get_extension_image_sizePtr - .asFunction)>(); - - /// @brief Sets an alarm to be triggered after a specific time. - /// @details The alarm will first go off @a delay seconds later and then will go off every certain amount of time defined using @a period seconds. To cancel the alarm, call alarm_cancel() with @a alarm_id. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @remarks If the application is uninstalled after setting an alarm, the alarm is cancelled automatically. - /// If the operation of @a app_control is not specified, #APP_CONTROL_OPERATION_DEFAULT is used for the launch request. - /// If the operation of @a app_control is #APP_CONTROL_OPERATION_DEFAULT, the package information is mandatory to explicitly launch the application. - /// Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, this api does not support exact period and delay for minimizing the wakeups of the device. The system can adjust when the alarm expires. - /// If you want to trigger an alarm exactly, see @see alarm_schedule_once_after_delay() - /// Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif If @a app_control is specified with service-application, the application is only allowed to run on which has Background Category. - /// Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif If the appid of @a app_control is not specified, this api is not allowed. In other words, the explicit @a app_control is only allowed. - /// - /// @param[in] app_control The destination app_control to perform a specific task when the alarm is triggered - /// @param[in] delay The amount of time before the first execution (in seconds). Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, Although this is inexact, the alarm will not fire before this time - /// @param[in] period The amount of time between subsequent alarms (in seconds). Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, This value does not guarantee the accuracy. The actual interval is calculated by the OS. The minimum value is 600sec - /// @param[out] alarm_id The alarm ID that uniquely identifies an alarm - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_INVALID_TIME Triggered time is invalid - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @retval #ALARM_ERROR_NOT_PERMITTED_APP @a app_control is not permitted - /// @see alarm_cancel() - /// @see alarm_cancel_all() - /// @see alarm_get_scheduled_date() - /// @see alarm_get_scheduled_period() - /// @see alarm_schedule_once_after_delay() - int alarm_schedule_after_delay( - app_control_h app_control, - int delay, - int period, - ffi.Pointer alarm_id, - ) { - return _alarm_schedule_after_delay( - app_control, - delay, - period, - alarm_id, - ); - } - - late final _alarm_schedule_after_delayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, ffi.Int, ffi.Int, - ffi.Pointer)>>('alarm_schedule_after_delay'); - late final _alarm_schedule_after_delay = - _alarm_schedule_after_delayPtr.asFunction< - int Function(app_control_h, int, int, ffi.Pointer)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. [Use alarm_schedule_once_at_date() instead] - /// @brief Sets an alarm to be triggered at a specific time. - /// @details The @a date describes the time of the first occurrence. - /// If @a period is bigger than @c 0, the alarm will be scheduled after the @a period time. - /// If @a period is set to @c 0, the alarm will go off just once without repetition. - /// To cancel the alarm, call alarm_cancel() with @a alarm_id. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @remarks If application is uninstalled after setting an alarm, the alarm is cancelled automatically. - /// If the operation of @a app_control is not specified, #APP_CONTROL_OPERATION_DEFAULT is used for the launch request. - /// If the operation of @a app_control is #APP_CONTROL_OPERATION_DEFAULT, the package information is mandatory to explicitly launch the application. - /// - /// @param[in] app_control The destination app_control to perform specific work when the alarm is triggered - /// @param[in] date The first active alarm time - /// @param[in] period The amount of time between subsequent alarms(in second) - /// @param[out] alarm_id The alarm ID that uniquely identifies an alarm - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_INVALID_DATE Triggered date is invalid - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_cancel() - /// @see alarm_cancel_all() - /// @see alarm_get_scheduled_date() - /// @see alarm_get_scheduled_period() - int alarm_schedule_at_date( - app_control_h app_control, - ffi.Pointer date, - int period, - ffi.Pointer alarm_id, - ) { - return _alarm_schedule_at_date( - app_control, - date, - period, - alarm_id, - ); - } - - late final _alarm_schedule_at_datePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, ffi.Pointer, ffi.Int, - ffi.Pointer)>>('alarm_schedule_at_date'); - late final _alarm_schedule_at_date = _alarm_schedule_at_datePtr.asFunction< - int Function( - app_control_h, ffi.Pointer, int, ffi.Pointer)>(); - - /// @brief Sets an alarm to be triggered after a specific time. - /// @details The alarm will go off @a delay seconds later. To cancel the alarm, call alarm_cancel() with @a alarm_id. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @remarks If the application is uninstalled after setting an alarm, the alarm is cancelled automatically. - /// If the operation of @a app_control is not specified, #APP_CONTROL_OPERATION_DEFAULT is used for the launch request. - /// If the operation of @a app_control is #APP_CONTROL_OPERATION_DEFAULT, the package information is mandatory to explicitly launch the application. - /// If the appid of @a app_control is not specified, this api is not allowed. In other words, the explicit @a app_control is only allowed. - /// The @a app_control only supports UI application with this api. If @a app_control is not UI application, #ALARM_ERROR_NOT_PERMITTED_APP returned. - /// When the alarm is expired, Alarm Manager will turn on LCD to prohibit background jobs. - /// - /// @param[in] app_control The destination app_control to perform a specific task when the alarm is triggered - /// @param[in] delay The amount of time before the execution (in seconds) - /// @param[out] alarm_id The alarm ID that uniquely identifies an alarm - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_INVALID_TIME Triggered time is invalid - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @retval #ALARM_ERROR_NOT_PERMITTED_APP @a app_control is not permitted. @a app_control for UI application is only permitted. - /// @see alarm_cancel() - /// @see alarm_cancel_all() - /// @see alarm_get_scheduled_date() - int alarm_schedule_once_after_delay( - app_control_h app_control, - int delay, - ffi.Pointer alarm_id, - ) { - return _alarm_schedule_once_after_delay( - app_control, - delay, - alarm_id, - ); - } - - late final _alarm_schedule_once_after_delayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, ffi.Int, - ffi.Pointer)>>('alarm_schedule_once_after_delay'); - late final _alarm_schedule_once_after_delay = - _alarm_schedule_once_after_delayPtr - .asFunction)>(); - - /// @brief Sets an alarm to be triggered at a specific time. - /// @details The @a date describes the time of the first occurrence. To cancel the alarm, call alarm_cancel() with @a alarm_id. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @remarks If application is uninstalled after setting an alarm, the alarm is cancelled automatically. - /// If the operation of @a app_control is not specified, #APP_CONTROL_OPERATION_DEFAULT is used for the launch request. - /// If the operation of @a app_control is #APP_CONTROL_OPERATION_DEFAULT, the package information is mandatory to explicitly launch the application. - /// If the appid of @a app_control is not specified, this api is not allowed. In other words, the explicit @a app_control is only allowed. - /// The @a app_control only supports UI application with this api. If @a app_control is not UI application, #ALARM_ERROR_NOT_PERMITTED_APP returned. - /// When the alarm is expired, Alarm Manager will turn on LCD to prohibit background jobs. - /// - /// @param[in] app_control The destination app_control to perform specific work when the alarm is triggered - /// @param[in] date The first active alarm time - /// @param[out] alarm_id The alarm ID that uniquely identifies an alarm - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_INVALID_DATE Triggered date is invalid - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @retval #ALARM_ERROR_NOT_PERMITTED_APP @a app_control is not permitted. @a app_control for UI application is only permitted. - /// @see alarm_cancel() - /// @see alarm_cancel_all() - /// @see alarm_get_scheduled_date() - int alarm_schedule_once_at_date( - app_control_h app_control, - ffi.Pointer date, - ffi.Pointer alarm_id, - ) { - return _alarm_schedule_once_at_date( - app_control, - date, - alarm_id, - ); - } - - late final _alarm_schedule_once_at_datePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, ffi.Pointer, - ffi.Pointer)>>('alarm_schedule_once_at_date'); - late final _alarm_schedule_once_at_date = - _alarm_schedule_once_at_datePtr.asFunction< - int Function(app_control_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets an alarm to be triggered periodically, starting at a specific time. - /// @details The @a date describes the time of the first occurrence. - /// @a week_flag is the repeat value of the days of the week. - /// If @a week_flag is #ALARM_WEEK_FLAG_TUESDAY, the alarm will repeat every Tuesday at a specific time. - /// To cancel the alarm, call alarm_cancel() with @a alarm_id. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @remarks If the application is uninstalled after setting an alarm, the alarm is cancelled automatically. - /// If the operation of @a app_control is not specified, #APP_CONTROL_OPERATION_DEFAULT is used for the launch request. - /// If the operation of @a app_control is #APP_CONTROL_OPERATION_DEFAULT, the package information is mandatory to explicitly launch the application. - /// Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, The @a app_control only supports UI application with this api. If @a app_control is not UI application, #ALARM_ERROR_NOT_PERMITTED_APP returned. - /// When the alarm is expired, Alarm Manager will turn on LCD to prohibit background jobs. - /// Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, If the appid of @a app_control is not specified, this api is not allowed. In other words, the explicit @a app_control is only allowed. - /// - /// @param[in] app_control The destination app_control to perform specific work when the alarm is triggered - /// @param[in] date The first active alarm time - /// @param[in] week_flag The day of the week, @a week_flag may be a combination of days, like #ALARM_WEEK_FLAG_TUESDAY | #ALARM_WEEK_FLAG_FRIDAY - /// @param[out] alarm_id The alarm ID that uniquely identifies an alarm - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_INVALID_DATE Triggered date is invalid - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @retval #ALARM_ERROR_NOT_PERMITTED_APP @a app_control is not permitted. @a app_control for UI application is only permitted. - /// @see alarm_cancel() - /// @see alarm_cancel_all() - /// @see alarm_get_scheduled_recurrence_week_flag() - /// @see alarm_get_scheduled_date() - /// @see #alarm_week_flag_e - int alarm_schedule_with_recurrence_week_flag( - app_control_h app_control, - ffi.Pointer date, - int week_flag, - ffi.Pointer alarm_id, - ) { - return _alarm_schedule_with_recurrence_week_flag( - app_control, - date, - week_flag, - alarm_id, - ); - } - - late final _alarm_schedule_with_recurrence_week_flagPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, ffi.Pointer, ffi.Int, - ffi.Pointer)>>( - 'alarm_schedule_with_recurrence_week_flag'); - late final _alarm_schedule_with_recurrence_week_flag = - _alarm_schedule_with_recurrence_week_flagPtr.asFunction< - int Function( - app_control_h, ffi.Pointer, int, ffi.Pointer)>(); - - /// @brief Gets the recurrence days of the week. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.get - /// @remarks If the given @a alarm_id is not obtained by using the alarm_schedule_with_recurrence_week_flag() function, - /// an error (error code #ALARM_ERROR_INVALID_PARAMETER) will occur because this alarm is scheduled with no recurrence. - /// If the operation of @a app_control is not specified, #APP_CONTROL_OPERATION_DEFAULT is used for the launch request. - /// If the operation of @a app_control is #APP_CONTROL_OPERATION_DEFAULT, the package information is mandatory to explicitly launch the application. - /// @param[in] alarm_id The alarm ID returned when the alarm is scheduled - /// @param[out] week_flag The recurrence days of the week, @a week_flag may be a combination of days, like #ALARM_WEEK_FLAG_TUESDAY | #ALARM_WEEK_FLAG_FRIDAY - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_schedule_with_recurrence_week_flag() - /// @see #alarm_week_flag_e - int alarm_get_scheduled_recurrence_week_flag( - int alarm_id, - ffi.Pointer week_flag, - ) { - return _alarm_get_scheduled_recurrence_week_flag( - alarm_id, - week_flag, - ); - } - - late final _alarm_get_scheduled_recurrence_week_flagPtr = _lookup< - ffi.NativeFunction)>>( - 'alarm_get_scheduled_recurrence_week_flag'); - late final _alarm_get_scheduled_recurrence_week_flag = - _alarm_get_scheduled_recurrence_week_flagPtr - .asFunction)>(); - - /// @brief Cancels the alarm with the specific alarm ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @param[in] alarm_id The alarm ID that is cancelled - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_schedule_at_date() - /// @see alarm_schedule_after_delay() - /// @see alarm_schedule_with_recurrence_week_flag() - /// @see alarm_cancel_all() - int alarm_cancel( - int alarm_id, - ) { - return _alarm_cancel( - alarm_id, - ); - } - - late final _alarm_cancelPtr = - _lookup>('alarm_cancel'); - late final _alarm_cancel = _alarm_cancelPtr.asFunction(); - - /// @brief Cancels all scheduled alarms that are registered by the application that calls this API. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_schedule_at_date() - /// @see alarm_schedule_after_delay() - /// @see alarm_schedule_with_recurrence_week_flag() - /// @see alarm_cancel() - int alarm_cancel_all() { - return _alarm_cancel_all(); - } - - late final _alarm_cancel_allPtr = - _lookup>('alarm_cancel_all'); - late final _alarm_cancel_all = - _alarm_cancel_allPtr.asFunction(); - - /// @brief Retrieves the IDs of all registered alarms by invoking a callback once for each scheduled alarm. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.get - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @post This function invokes alarm_registered_alarm_cb() repeatedly for each registered alarm. - /// @see alarm_registered_alarm_cb() - int alarm_foreach_registered_alarm( - alarm_registered_alarm_cb callback, - ffi.Pointer user_data, - ) { - return _alarm_foreach_registered_alarm( - callback, - user_data, - ); - } - - late final _alarm_foreach_registered_alarmPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(alarm_registered_alarm_cb, - ffi.Pointer)>>('alarm_foreach_registered_alarm'); - late final _alarm_foreach_registered_alarm = - _alarm_foreach_registered_alarmPtr.asFunction< - int Function(alarm_registered_alarm_cb, ffi.Pointer)>(); - - /// @brief Gets the scheduled time from the given alarm ID in C standard time struct. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.get - /// @remarks @a date is not needed by the function after the call. - /// @param[in] alarm_id The alarm ID returned when the alarm is scheduled - /// @param[out] date The time value of the next alarm event - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_schedule_at_date() - /// @see alarm_schedule_after_delay() - /// @see alarm_schedule_with_recurrence_week_flag() - int alarm_get_scheduled_date( - int alarm_id, - ffi.Pointer date, - ) { - return _alarm_get_scheduled_date( - alarm_id, - date, - ); - } - - late final _alarm_get_scheduled_datePtr = - _lookup)>>( - 'alarm_get_scheduled_date'); - late final _alarm_get_scheduled_date = _alarm_get_scheduled_datePtr - .asFunction)>(); - - /// @brief Gets the period of time between the recurrent alarms. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.get - /// @remarks If the given @a alarm_id is not obtained by using the alarm_schedule_at_date() or alarm_schedule_after_delay() function, - /// an error (error code #ALARM_ERROR_INVALID_PARAMETER) will occur. - /// @param[in] alarm_id The alarm ID returned when the alarm is scheduled - /// @param[out] period The period of time between recurrent alarms in seconds - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_schedule_at_date() - /// @see alarm_schedule_after_delay() - /// @see alarm_schedule_with_recurrence_week_flag() - int alarm_get_scheduled_period( - int alarm_id, - ffi.Pointer period, - ) { - return _alarm_get_scheduled_period( - alarm_id, - period, - ); - } - - late final _alarm_get_scheduled_periodPtr = _lookup< - ffi.NativeFunction)>>( - 'alarm_get_scheduled_period'); - late final _alarm_get_scheduled_period = _alarm_get_scheduled_periodPtr - .asFunction)>(); - - /// @brief Gets the current system time using C standard time struct. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[out] date The current system time - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - int alarm_get_current_time( - ffi.Pointer date, - ) { - return _alarm_get_current_time( - date, - ); - } - - late final _alarm_get_current_timePtr = - _lookup)>>( - 'alarm_get_current_time'); - late final _alarm_get_current_time = - _alarm_get_current_timePtr.asFunction)>(); - - /// @brief Gets the app_control to be invoked when the alarm is triggered. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.get - /// @remarks The @a app_control must be released using app_control_destroy(). - /// @param[in] alarm_id The alarm ID uniquely identifies an alarm - /// @param[out] app_control The app_control handle to launch when the alarm is triggered - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_schedule_at_date() - /// @see alarm_schedule_after_delay() - /// @see alarm_schedule_with_recurrence_week_flag() - int alarm_get_app_control( - int alarm_id, - ffi.Pointer app_control, - ) { - return _alarm_get_app_control( - alarm_id, - app_control, - ); - } - - late final _alarm_get_app_controlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer)>>('alarm_get_app_control'); - late final _alarm_get_app_control = _alarm_get_app_controlPtr - .asFunction)>(); - - /// @brief Sets global flag in the alarm. - /// @details Sets @a global flag to set/unset alarm globally. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @remarks The @a alarm_id must be id of alarm which will launch global application. - /// The function returns an error (error code #ALARM_ERROR_NOT_PERMITTED_APP) if it is not. - /// Note that the application which is launched by global alarm runs in the user session that is logged in currently. - /// It doesn't run in the session for the user who registers the global alarm. - /// So, if the application uses application's private data for each user to handling the app_control for the alarm, it might not show proper data to the user. - /// Therefore, We recommend to contain all the data for the alarm to the app_control handle for the global alarm. - /// Then, the launched application would be able to use the data to show proper alarm UX to the user. - /// @param[in] alarm_id The alarm ID uniquely identifies an alarm - /// @param[in] global The global flag to set/unset alarm globally - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_NOT_PERMITTED_APP @a alarm_id is not permitted - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_schedule_at_date() - /// @see alarm_schedule_after_delay() - /// @see alarm_schedule_with_recurrence_week_flag() - int alarm_set_global( - int alarm_id, - bool global, - ) { - return _alarm_set_global( - alarm_id, - global, - ); - } - - late final _alarm_set_globalPtr = - _lookup>( - 'alarm_set_global'); - late final _alarm_set_global = - _alarm_set_globalPtr.asFunction(); - - /// @brief Gets whether the alarm will launch global application or not. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.get - /// @param[in] alarm_id The alarm ID uniquely identifies an alarm - /// @param[out] global Whether the alarm will launch global application or not - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_set_global() - int alarm_get_global( - int alarm_id, - ffi.Pointer global, - ) { - return _alarm_get_global( - alarm_id, - global, - ); - } - - late final _alarm_get_globalPtr = _lookup< - ffi.NativeFunction)>>( - 'alarm_get_global'); - late final _alarm_get_global = _alarm_get_globalPtr - .asFunction)>(); - - /// @brief Sets a notification alarm to be triggered at a specific time. - /// @details The @a date describes the time of the alarm occurrence. - /// To cancel the alarm, call alarm_cancel() with @a alarm_id. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @privilege %http://tizen.org/privilege/notification - /// @remarks If application is uninstalled after setting an alarm, the alarm is cancelled automatically. - /// When the alarm goes off, Alarm Manager will turn on LCD to prohibit background jobs. - /// - /// @param[in] noti The notification to be posted when the alarm is triggered - /// @param[in] date The active alarm time - /// @param[out] alarm_id The ID which uniquely identifies the scheduled alarm - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_INVALID_DATE Triggered date is invalid - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_cancel() - /// @see alarm_cancel_all() - /// @see alarm_get_scheduled_date() - int alarm_schedule_noti_once_at_date( - notification_h noti, - ffi.Pointer date, - ffi.Pointer alarm_id, - ) { - return _alarm_schedule_noti_once_at_date( - noti, - date, - alarm_id, - ); - } - - late final _alarm_schedule_noti_once_at_datePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Pointer, - ffi.Pointer)>>('alarm_schedule_noti_once_at_date'); - late final _alarm_schedule_noti_once_at_date = - _alarm_schedule_noti_once_at_datePtr.asFunction< - int Function( - notification_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets a notification alarm to be triggered after a specific delay. - /// @details The alarm will first go off after @a delay seconds. - /// The alarm will then go off every period seconds until canceled. - /// To cancel the alarm, call alarm_cancel() with @a alarm_id. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @privilege %http://tizen.org/privilege/notification - /// @remarks If the application is uninstalled after setting an alarm, the alarm is cancelled automatically. - /// This function is a minimally intrusive way to trigger alarms when precision is not important. - /// The system will adjust the @a delay and @a period requests to suit internal needs; the requests - /// will be treated as minimum values. Note that @a period cannot be less than 600 seconds, if - /// a smaller request is supplied it will be silently adjusted to a request of 600. - /// When the alarm goes off, Alarm Manager will turn on LCD to prohibit background jobs. - /// - /// @param[in] noti The notification to be posted when the alarm is triggered - /// @param[in] delay The amount of time before the first execution (in seconds). - /// @param[in] period The amount of time between subsequent alarms (in seconds). - /// @param[out] alarm_id The ID which uniquely identifies the scheduled alarm - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_INVALID_TIME Triggered time is invalid - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_cancel() - /// @see alarm_cancel_all() - /// @see alarm_get_scheduled_date() - /// @see alarm_get_scheduled_period() - /// @see alarm_schedule_noti_once_after_delay() - int alarm_schedule_noti_after_delay( - notification_h noti, - int delay, - int period, - ffi.Pointer alarm_id, - ) { - return _alarm_schedule_noti_after_delay( - noti, - delay, - period, - alarm_id, - ); - } - - late final _alarm_schedule_noti_after_delayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Int, ffi.Int, - ffi.Pointer)>>('alarm_schedule_noti_after_delay'); - late final _alarm_schedule_noti_after_delay = - _alarm_schedule_noti_after_delayPtr.asFunction< - int Function(notification_h, int, int, ffi.Pointer)>(); - - /// @brief Sets a notification alarm to be triggered after a specific delay. - /// @details The alarm will go off @a delay seconds later. - /// To cancel the alarm, call alarm_cancel() with @a alarm_id. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @privilege %http://tizen.org/privilege/notification - /// @remarks If the application is uninstalled after setting an alarm, the alarm is cancelled automatically. - /// When the alarm goes off, Alarm Manager will turn on LCD to prohibit background jobs. - /// - /// @param[in] noti The notification to be posted when the alarm is triggered - /// @param[in] delay The amount of time before the execution (in seconds) - /// @param[out] alarm_id The ID which uniquely identifies the scheduled alarm - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_INVALID_TIME Triggered time is invalid - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_cancel() - /// @see alarm_cancel_all() - /// @see alarm_get_scheduled_date() - int alarm_schedule_noti_once_after_delay( - notification_h noti, - int delay, - ffi.Pointer alarm_id, - ) { - return _alarm_schedule_noti_once_after_delay( - noti, - delay, - alarm_id, - ); - } - - late final _alarm_schedule_noti_once_after_delayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Int, - ffi.Pointer)>>('alarm_schedule_noti_once_after_delay'); - late final _alarm_schedule_noti_once_after_delay = - _alarm_schedule_noti_once_after_delayPtr.asFunction< - int Function(notification_h, int, ffi.Pointer)>(); - - /// @brief Sets a notification to be triggered periodically, starting at a specific time. - /// @details The @a date describes the time of the first occurrence. - /// @a week_flag describes the day(s) of the week when the notification recurs. - /// If @a week_flag is #ALARM_WEEK_FLAG_TUESDAY, the alarm will repeat every Tuesday at a specific time. - /// If @a week_flag is less than or equal to zero, the alarm is not repeated. - /// To cancel the alarm, call alarm_cancel() with @a alarm_id. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @privilege %http://tizen.org/privilege/notification - /// @remarks If the application is uninstalled after setting an alarm, the alarm is cancelled automatically. - /// - /// @param[in] noti The notification to be posted when the alarm is triggered - /// @param[in] date The first active alarm time - /// @param[in] week_flag The day of the week the notification recurs. @a week_flag may be a combination of days, like #ALARM_WEEK_FLAG_TUESDAY | #ALARM_WEEK_FLAG_FRIDAY - /// @param[out] alarm_id The ID which uniquely identifies the scheduled alarm - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_INVALID_DATE Triggered date is invalid - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_cancel() - /// @see alarm_cancel_all() - /// @see alarm_get_scheduled_recurrence_week_flag() - /// @see alarm_get_scheduled_date() - /// @see #alarm_week_flag_e - int alarm_schedule_noti_with_recurrence_week_flag( - notification_h noti, - ffi.Pointer date, - int week_flag, - ffi.Pointer alarm_id, - ) { - return _alarm_schedule_noti_with_recurrence_week_flag( - noti, - date, - week_flag, - alarm_id, - ); - } - - late final _alarm_schedule_noti_with_recurrence_week_flagPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(notification_h, ffi.Pointer, ffi.Int, - ffi.Pointer)>>( - 'alarm_schedule_noti_with_recurrence_week_flag'); - late final _alarm_schedule_noti_with_recurrence_week_flag = - _alarm_schedule_noti_with_recurrence_week_flagPtr.asFunction< - int Function( - notification_h, ffi.Pointer, int, ffi.Pointer)>(); - - /// @brief Gets the notification to be posted when an alarm is triggered. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.get - /// @remarks @a noti must be released using notification_free(). - /// - /// @param[in] alarm_id The ID which uniquely identifies a scheduled alarm - /// @param[out] noti The notification to be posted when the alarm is triggered - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @see alarm_schedule_noti_once_at_date() - /// @see alarm_schedule_noti_after_delay() - /// @see alarm_schedule_noti_once_after_delay() - /// @see alarm_schedule_noti_with_recurrence_week_flag() - int alarm_get_notification( - int alarm_id, - ffi.Pointer noti, - ) { - return _alarm_get_notification( - alarm_id, - noti, - ); - } - - late final _alarm_get_notificationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer)>>('alarm_get_notification'); - late final _alarm_get_notification = _alarm_get_notificationPtr - .asFunction)>(); - - /// @brief Updates the delay of the registered alarm. - /// @details The @a delay is the time (in seconds) before the alarm's first setting off. - /// The delay is an exact value, see alarm_schedule_once_after_delay() for details. - /// This function can be called for any alarm. - /// If the delay was set before, it will be overwritten. If it was not, it will be set. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @remarks This function can be called only for alarms whose app control launches an UI application. - /// If this condition is not met, #ALARM_ERROR_NOT_PERMITTED_APP is returned. - /// @param[in] alarm_id The ID which uniquely identifies the scheduled alarm - /// @param[in] delay The amount of time before the first execution (in seconds). - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @retval #ALARM_ERROR_NOT_PERMITTED_APP App control does not launch an UI application - int alarm_update_delay( - int alarm_id, - int delay, - ) { - return _alarm_update_delay( - alarm_id, - delay, - ); - } - - late final _alarm_update_delayPtr = - _lookup>( - 'alarm_update_delay'); - late final _alarm_update_delay = - _alarm_update_delayPtr.asFunction(); - - /// @brief Updates the date of the registered alarm. - /// @details The @a date describes the date on which the alarm is set off for the first time. - /// This function can be called for any alarm. - /// If the date was set before, it will be overwritten. If it was not, it will be set. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @remarks This function can be called only for alarms whose app control launches an UI application. - /// If this condition is not met, #ALARM_ERROR_NOT_PERMITTED_APP is returned. - /// @param[in] alarm_id The ID which uniquely identifies the scheduled alarm - /// @param[in] date The time value of the next alarm event - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_INVALID_TIME Triggered time is invalid - /// @retval #ALARM_ERROR_INVALID_DATE Triggered time is invalid - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @retval #ALARM_ERROR_NOT_PERMITTED_APP App control does not launch an UI application - int alarm_update_date( - int alarm_id, - ffi.Pointer date, - ) { - return _alarm_update_date( - alarm_id, - date, - ); - } - - late final _alarm_update_datePtr = - _lookup)>>( - 'alarm_update_date'); - late final _alarm_update_date = - _alarm_update_datePtr.asFunction)>(); - - /// @brief Updates the period of the registered alarm. - /// @details The alarm will then go off every @a period seconds until canceled. - /// This function can be called for any alarm. - /// If the week recurrence flag was set before, it will be removed and the period will be set. - /// If the period was set before, it will be overwritten. If it was not, it will be set. - /// If the @a period argument is 0 and the period was previously set, - /// the period attribute will be cleared and the alarm will be changed to one-time. - /// If the @a period argument is 0 and the period was not set, - /// or the week recurrence flag was set, the alarm will be unchanged. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @param[in] alarm_id The ID which uniquely identifies the scheduled alarm - /// @param[in] period The amount of time between subsequent alarms (in seconds). - /// Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, this - /// value does not guarantee the accuracy. The actual interval - /// is calculated by the OS. The minimum value is 600sec. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - int alarm_update_period( - int alarm_id, - int period, - ) { - return _alarm_update_period( - alarm_id, - period, - ); - } - - late final _alarm_update_periodPtr = - _lookup>( - 'alarm_update_period'); - late final _alarm_update_period = - _alarm_update_periodPtr.asFunction(); - - /// @brief Updates the week recurrence flag of the registered alarm. - /// @details @a week_flag is the repeat value of the days of the week. - /// For example, if @a week_flag is #ALARM_WEEK_FLAG_TUESDAY, the alarm will repeat every - /// Tuesday at a specific time. - /// This function can be called for any alarm. - /// If the period was set before, it will be removed and the week recurrence flag will be set. - /// If the week recurrence flag was set before, it will be overwritten. If it was not, it will be set. - /// If the @a week_flag argument is 0 and the flag was previously set, - /// the flag attribute will be cleared and the alarm will be changed to one-time. - /// If the @a week_flag argument is 0 and the flag was not set, - /// or the period was set, the alarm will be unchanged. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/alarm.set - /// @remarks This function can be called only for alarms whose app control launches an UI application. - /// If this condition is not met, #ALARM_ERROR_NOT_PERMITTED_APP is returned. - /// @param[in] alarm_id The ID which uniquely identifies the scheduled alarm - /// @param[in] week_flag The day of the week, @a week_flag may be a combination - /// of days, like #ALARM_WEEK_FLAG_TUESDAY | #ALARM_WEEK_FLAG_FRIDAY - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #ALARM_ERROR_NONE Successful - /// @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ALARM_ERROR_CONNECTION_FAIL Failed to connect to an alarm server - /// @retval #ALARM_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied - /// @retval #ALARM_ERROR_NOT_PERMITTED_APP App control does not launch an UI application - int alarm_update_week_flag( - int alarm_id, - int week_flag, - ) { - return _alarm_update_week_flag( - alarm_id, - week_flag, - ); - } - - late final _alarm_update_week_flagPtr = - _lookup>( - 'alarm_update_week_flag'); - late final _alarm_update_week_flag = - _alarm_update_week_flagPtr.asFunction(); - - /// @brief Adds the event handler for receiving event-data of interested events. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks If you want to add the privileged event, you MUST declare right privilege first. Unless that, this function returns #EVENT_ERROR_PERMISSION_DENIED. The privileged events are commented on remarks of it's definitions. - /// @param[in] event_name The interested event name - /// @param[in] callback The event callback called when the event occurs - /// @param[in] user_data The user data for passing to callback - /// @param[out] event_handler The event handler - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EVENT_ERROR_NONE Successful - /// @retval #EVENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EVENT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #EVENT_ERROR_IO_ERROR Adding handler failed - /// @retval #EVENT_ERROR_OUT_OF_MEMORY Out of memory - int event_add_event_handler( - ffi.Pointer event_name, - event_cb callback, - ffi.Pointer user_data, - ffi.Pointer event_handler, - ) { - return _event_add_event_handler( - event_name, - callback, - user_data, - event_handler, - ); - } - - late final _event_add_event_handlerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - event_cb, - ffi.Pointer, - ffi.Pointer)>>('event_add_event_handler'); - late final _event_add_event_handler = _event_add_event_handlerPtr.asFunction< - int Function(ffi.Pointer, event_cb, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Removes the registered event handler. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] event_handler The event handler - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EVENT_ERROR_NONE Successful - /// @retval #EVENT_ERROR_INVALID_PARAMETER Invalid parameter - int event_remove_event_handler( - event_handler_h event_handler, - ) { - return _event_remove_event_handler( - event_handler, - ); - } - - late final _event_remove_event_handlerPtr = - _lookup>( - 'event_remove_event_handler'); - late final _event_remove_event_handler = _event_remove_event_handlerPtr - .asFunction(); - - /// @brief Sends the User-Event to receiver applications. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks The format of User-Event's name MUST be "event.{sender's appid}.{user-defined name}", refer to 'The name-format of User-Event' section, If the event_name is invalid, the function returns #EVENT_ERROR_IO_ERROR. - /// @param[in] event_name The event's name to send - /// @param[in] event_data The event's data to send - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EVENT_ERROR_NONE Successful - /// @retval #EVENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EVENT_ERROR_IO_ERROR Sending operation failed - int event_publish_app_event( - ffi.Pointer event_name, - ffi.Pointer event_data, - ) { - return _event_publish_app_event( - event_name, - event_data, - ); - } - - late final _event_publish_app_eventPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('event_publish_app_event'); - late final _event_publish_app_event = _event_publish_app_eventPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Sends the User-Event to trusted receiver-applications. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks The application which has same certification with sender can receive the event. - /// @remarks The format of User-Event's name MUST be "event.{sender's appid}.{user-defined name}", refer to 'The name-format of User-Event' section, If the event_name is invalid, the function returns #EVENT_ERROR_IO_ERROR. - /// @param[in] event_name The event's name to send - /// @param[in] event_data The event's data to send - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EVENT_ERROR_NONE Successful - /// @retval #EVENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EVENT_ERROR_IO_ERROR Sending operation failed - int event_publish_trusted_app_event( - ffi.Pointer event_name, - ffi.Pointer event_data, - ) { - return _event_publish_trusted_app_event( - event_name, - event_data, - ); - } - - late final _event_publish_trusted_app_eventPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('event_publish_trusted_app_event'); - late final _event_publish_trusted_app_event = - _event_publish_trusted_app_eventPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Keeps last User-Event data for receiver applications. - /// - /// @since_tizen 3.0 - /// @remarks The receiver applications will receive this last event data after adding their new handlers via event_add_event_handler() API since the sender application called this API. - /// @remarks If a sender application sends same event via trusted API and non-trusted API, then a trusted receiver will get latest data regardless of trusted or non-trusted, but non-trusted receiver will get the last data only from non-trusted API. - /// @remarks The effect of this API continues during runtime. That means when the sender application process restarts, the sender application needs to call this api again to make the event to keep the last event. - /// @param[in] event_name The event's name to keep last event data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EVENT_ERROR_NONE Successful - /// @retval #EVENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EVENT_ERROR_IO_ERROR Sending operation failed - /// @retval #EVENT_ERROR_OUT_OF_MEMORY Out of memory - int event_keep_last_event_data( - ffi.Pointer event_name, - ) { - return _event_keep_last_event_data( - event_name, - ); - } - - late final _event_keep_last_event_dataPtr = - _lookup)>>( - 'event_keep_last_event_data'); - late final _event_keep_last_event_data = _event_keep_last_event_dataPtr - .asFunction)>(); - - /// @brief Creates the job info handle. - /// @since_tizen 4.0 - /// @remarks The @a job_info must be released by using job_info_destroy(). - /// The job will be started by the periodic interval or the trigger events. - /// @param[out] job_info The job info handle to be newly created on success - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #JOB_ERROR_NONE Successful - /// @retval #JOB_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #JOB_ERROR_OUT_OF_MEMORY Out of memory - /// @see job_info_destroy() - /// @see job_info_set_periodic() - /// @see job_info_add_trigger_event() - int job_info_create( - ffi.Pointer job_info, - ) { - return _job_info_create( - job_info, - ); - } - - late final _job_info_createPtr = - _lookup)>>( - 'job_info_create'); - late final _job_info_create = - _job_info_createPtr.asFunction)>(); - - /// @brief Destroys the job info handle and releases all its resources. - /// @since_tizen 4.0 - /// @param[in] job_info The job info handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #JOB_ERROR_NONE Successful - /// @retval #JOB_ERROR_INVALID_PARAMETER Invalid parameter - /// @see job_info_create() - int job_info_destroy( - job_info_h job_info, - ) { - return _job_info_destroy( - job_info, - ); - } - - late final _job_info_destroyPtr = - _lookup>( - 'job_info_destroy'); - late final _job_info_destroy = - _job_info_destroyPtr.asFunction(); - - /// @brief Sets the periodic interval of the job. - /// @since_tizen 4.0 - /// @remarks The platform does not guarantee the accuracy of the given interval for minimizing the wakeups of the device. - /// Thus you should not rely on it for timing. - /// If this function is called after adding the job trigger events by using job_info_add_trigger_event(), - /// the function returns a negative error value. - /// @param[in] job_info The job info handle - /// @param[in] interval The periodic interval (in minutes) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #JOB_ERROR_NONE Successful - /// @retval #JOB_ERROR_INVALID_PARAMETER Invalid parameter - /// @see job_info_destroy() - int job_info_set_periodic( - job_info_h job_info, - int interval, - ) { - return _job_info_set_periodic( - job_info, - interval, - ); - } - - late final _job_info_set_periodicPtr = _lookup< - ffi.NativeFunction>( - 'job_info_set_periodic'); - late final _job_info_set_periodic = - _job_info_set_periodicPtr.asFunction(); - - /// @brief Sets the job to be automatically scheduled after the device reboots. - /// @since_tizen 4.0 - /// @remarks If it's a one-time job, setting it to a persistent job returns - /// a negative error value on scheduling by using job_scheduler_schedule(). - /// @param[in] job_info The job info handle - /// @param[in] persistent @c true, if the job needs to be automatically scheduled - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #JOB_ERROR_NONE Successful - /// @retval #JOB_ERROR_INVALID_PARAMETER Invalid parameter - /// @see job_info_set_once() - /// @see job_scheduler_schedule() - int job_info_set_persistent( - job_info_h job_info, - bool persistent, - ) { - return _job_info_set_persistent( - job_info, - persistent, - ); - } - - late final _job_info_set_persistentPtr = - _lookup>( - 'job_info_set_persistent'); - late final _job_info_set_persistent = - _job_info_set_persistentPtr.asFunction(); - - /// @brief Sets the job not to be repeated. - /// @since_tizen 4.0 - /// @remarks If it's a persistent job, setting it to a one-time job returns - /// a negative error value on scheduling by using job_scheduler_schedule(). - /// @param[in] job_info The job info handle - /// @param[in] once @c true, if the job does not need to be repeated - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #JOB_ERROR_NONE Successful - /// @retval #JOB_ERROR_INVALID_PARAMETER Invalid parameter - /// @see job_info_set_persistent() - /// @see job_scheduler_schedule() - int job_info_set_once( - job_info_h job_info, - bool once, - ) { - return _job_info_set_once( - job_info, - once, - ); - } - - late final _job_info_set_oncePtr = - _lookup>( - 'job_info_set_once'); - late final _job_info_set_once = - _job_info_set_oncePtr.asFunction(); - - /// @brief Sets the timeout interval of the requirements. - /// @since_tizen 4.0 - /// @remarks If the requirements are not satisfied within the timeout value, - /// the job does not start. - /// @param[in] job_info The job info handle - /// @param[in] timeout The timeout interval (ms) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #JOB_ERROR_NONE Successful - /// @retval #JOB_ERROR_INVALID_PARAMETER Invalid parameter - int job_info_set_requirement_timeout( - job_info_h job_info, - int timeout, - ) { - return _job_info_set_requirement_timeout( - job_info, - timeout, - ); - } - - late final _job_info_set_requirement_timeoutPtr = _lookup< - ffi.NativeFunction>( - 'job_info_set_requirement_timeout'); - late final _job_info_set_requirement_timeout = - _job_info_set_requirement_timeoutPtr - .asFunction(); - - /// @brief Sets that the battery level must not be low to run the job. - /// @since_tizen 4.0 - /// @param[in] job_info The job info handle - /// @param[in] battery_not_low @c true, the battery level must not be low. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #JOB_ERROR_NONE Successful - /// @retval #JOB_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #JOB_ERROR_IO_ERROR IO error - /// @retval #JOB_ERROR_NOT_INITIALIZED Not initialized - /// @retval #JOB_ERROR_NOT_SUPPORTED Not supported - /// @pre job_scheduler_init() must be called. - /// @see job_scheduler_init() - int job_info_set_requires_battery_not_low( - job_info_h job_info, - bool battery_not_low, - ) { - return _job_info_set_requires_battery_not_low( - job_info, - battery_not_low, - ); - } - - late final _job_info_set_requires_battery_not_lowPtr = - _lookup>( - 'job_info_set_requires_battery_not_low'); - late final _job_info_set_requires_battery_not_low = - _job_info_set_requires_battery_not_lowPtr - .asFunction(); - - /// @brief Sets that the battery must be charging to run the job. - /// @since_tizen 4.0 - /// @param[in] job_info The job info handle - /// @param[in] charging @c true, the battery must be charging. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #JOB_ERROR_NONE Successful - /// @retval #JOB_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #JOB_ERROR_IO_ERROR IO error - /// @retval #JOB_ERROR_NOT_INITIALIZED Not initialized - /// @retval #JOB_ERROR_NOT_SUPPORTED Not supported - /// @pre job_scheduler_init() must be called. - /// @see job_scheduler_init() - int job_info_set_requires_charging( - job_info_h job_info, - bool charging, - ) { - return _job_info_set_requires_charging( - job_info, - charging, - ); - } - - late final _job_info_set_requires_chargingPtr = - _lookup>( - 'job_info_set_requires_charging'); - late final _job_info_set_requires_charging = - _job_info_set_requires_chargingPtr - .asFunction(); - - /// @brief Sets that the WiFi must be connected to run the job. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] job_info The job info handle - /// @param[in] wifi_connection @c true, the WiFi must be connected. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #JOB_ERROR_NONE Successful - /// @retval #JOB_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #JOB_ERROR_IO_ERROR IO error - /// @retval #JOB_ERROR_NOT_INITIALIZED Not initialized - /// @retval #JOB_ERROR_NOT_SUPPORTED Not supported - /// @retval #JOB_ERROR_PERMISSION_DENIED Permission denied - /// @pre job_scheduler_init() must be called. - /// @see job_scheduler_init() - int job_info_set_requires_wifi_connection( - job_info_h job_info, - bool wifi_connection, - ) { - return _job_info_set_requires_wifi_connection( - job_info, - wifi_connection, - ); - } - - late final _job_info_set_requires_wifi_connectionPtr = - _lookup>( - 'job_info_set_requires_wifi_connection'); - late final _job_info_set_requires_wifi_connection = - _job_info_set_requires_wifi_connectionPtr - .asFunction(); - - /// @brief Adds the trigger event to the job info handle. - /// @since_tizen 4.0 - /// @remarks The periodic interval of the job info handle must be 0. - /// If the interval of the job info handle is not 0, this function returns a negative error value. - /// Regarding the @a event, the application may require the following privilege: - /// http://tizen.org/privilege/network.get @n - /// If the application does not have the necessary privilege, this function returns #JOB_ERROR_PERMISSION_DENIED. - /// See #job_trigger_event_e to find the corresponding privilege of each event. - /// @param[in] job_info The job info handle - /// @param[in] event The job trigger event - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #JOB_ERROR_NONE Successful - /// @retval #JOB_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #JOB_ERROR_IO_ERROR IO error - /// @retval #JOB_ERROR_NOT_INITIALIZED Not initialized - /// @retval #JOB_ERROR_NOT_SUPPORTED Not supported - /// @retval #JOB_ERROR_ALREADY_EXIST Already exist - /// @retval #JOB_ERROR_PERMISSION_DENIED Permission denied - /// @pre job_scheduler_init() must be called. - /// @see job_scheduler_init() - /// @see job_info_remove_trigger_event() - /// @see job_trigger_event_e - int job_info_add_trigger_event( - job_info_h job_info, - int event, - ) { - return _job_info_add_trigger_event( - job_info, - event, - ); - } - - late final _job_info_add_trigger_eventPtr = - _lookup>( - 'job_info_add_trigger_event'); - late final _job_info_add_trigger_event = _job_info_add_trigger_eventPtr - .asFunction(); - - /// @brief Removes the trigger event from the job info handle. - /// @since_tizen 4.0 - /// @remarks The periodic interval of the job info handle must be 0. - /// If the interval of the job info handle is not 0, this function returns a negative error value. - /// @param[in] job_info The job info handle - /// @param[in] event The job trigger event - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #JOB_ERROR_NONE Successful - /// @retval #JOB_ERROR_INVALID_PARAMETER Invalid parameter - /// @see job_info_add_trigger_event() - /// @see job_trigger_event_e - int job_info_remove_trigger_event( - job_info_h job_info, - int event, - ) { - return _job_info_remove_trigger_event( - job_info, - event, - ); - } - - late final _job_info_remove_trigger_eventPtr = - _lookup>( - 'job_info_remove_trigger_event'); - late final _job_info_remove_trigger_event = _job_info_remove_trigger_eventPtr - .asFunction(); - - /// @brief Gets the ID of the job. - /// @since_tizen 4.0 - /// @remarks The @a job_info must be scheduled by using job_scheduler_schedule(). - /// If the job_info is not scheduled, this function returns a negative error value. - /// The @a job_id must be released by using free(). - /// @param[in] job_info The job info handle - /// @param[out] job_id The ID of the job - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #JOB_ERROR_NONE Successful - /// @retval #JOB_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #JOB_ERROR_OUT_OF_MEMORY Out of memory - /// @see job_scheduler_schedule() - int job_info_get_job_id( - job_info_h job_info, - ffi.Pointer> job_id, - ) { - return _job_info_get_job_id( - job_info, - job_id, - ); - } - - late final _job_info_get_job_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(job_info_h, - ffi.Pointer>)>>('job_info_get_job_id'); - late final _job_info_get_job_id = _job_info_get_job_idPtr.asFunction< - int Function(job_info_h, ffi.Pointer>)>(); - - /// @brief Clones the given job_info handle. - /// @since_tizen 4.0 - /// @remarks The newly created job_info handle must be released by using job_info_destroy(). - /// @param[in] job_info The job info handle - /// @param[out] clone If successful, a newly created job info handle will be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #JOB_ERROR_NONE Successful - /// @retval #JOB_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #JOB_ERROR_OUT_OF_MEMORY Out of memory - /// @see job_info_destroy() - int job_info_clone( - job_info_h job_info, - ffi.Pointer clone, - ) { - return _job_info_clone( - job_info, - clone, - ); - } - - late final _job_info_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - job_info_h, ffi.Pointer)>>('job_info_clone'); - late final _job_info_clone = _job_info_clonePtr - .asFunction)>(); - - /// @brief Initializes the job scheduler. - /// @since_tizen 4.0 - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #JOB_ERROR_NONE Successful - /// @retval #JOB_ERROR_IO_ERROR IO error - /// @retval #JOB_ERROR_OUT_OF_MEMORY Out of memory - /// @see job_scheduler_finish() - int job_scheduler_init() { - return _job_scheduler_init(); - } - - late final _job_scheduler_initPtr = - _lookup>('job_scheduler_init'); - late final _job_scheduler_init = - _job_scheduler_initPtr.asFunction(); - - /// @brief Finalizes the job scheduler. - /// @since_tizen 4.0 - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #JOB_ERROR_NONE Successful - /// @retval #JOB_ERROR_NOT_INITIALIZED Not initialized - /// @see job_scheduler_init() - int job_scheduler_finish() { - return _job_scheduler_finish(); - } - - late final _job_scheduler_finishPtr = - _lookup>('job_scheduler_finish'); - late final _job_scheduler_finish = - _job_scheduler_finishPtr.asFunction(); - - /// @brief Schedules the job. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/appmanager.launch - /// @param[in] job_info The job info handle - /// @param[in] job_id The ID of the job - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #JOB_ERROR_NONE Successful - /// @retval #JOB_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #JOB_ERROR_NOT_INITIALIZED Not initialized - /// @retval #JOB_ERROR_IO_ERROR IO error - /// @retval #JOB_ERROR_ALREADY_EXIST Already exist - /// @retval #JOB_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #JOB_ERROR_PERMISSION_DENIED Permission denied - /// @pre job_scheduler_init() MUST be called. - /// @see job_scheduler_init() - /// @see job_info_create() - int job_scheduler_schedule( - job_info_h job_info, - ffi.Pointer job_id, - ) { - return _job_scheduler_schedule( - job_info, - job_id, - ); - } - - late final _job_scheduler_schedulePtr = _lookup< - ffi - .NativeFunction)>>( - 'job_scheduler_schedule'); - late final _job_scheduler_schedule = _job_scheduler_schedulePtr - .asFunction)>(); - - /// @brief Cancels the scheduled job. - /// @since_tizen 4.0 - /// @param[in] job_id The ID of the scheduled job - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #JOB_ERROR_NONE Successful - /// @retval #JOB_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #JOB_ERROR_NOT_INITIALIZED Not initialized - /// @retval #JOB_ERROR_IO_ERROR IO error - /// @retval #JOB_ERROR_NO_SUCH_JOB No such job - /// @pre job_scheduler_init() MUST be called. - /// @see job_scheduler_init() - int job_scheduler_cancel( - ffi.Pointer job_id, - ) { - return _job_scheduler_cancel( - job_id, - ); - } - - late final _job_scheduler_cancelPtr = - _lookup)>>( - 'job_scheduler_cancel'); - late final _job_scheduler_cancel = _job_scheduler_cancelPtr - .asFunction)>(); - - /// @brief Cancels all scheduled jobs. - /// @since_tizen 4.0 - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #JOB_ERROR_NONE Successful - /// @retval #JOB_ERROR_NOT_INITIALIZED Not initialized - /// @retval #JOB_ERROR_IO_ERROR IO error - /// @pre job_scheduler_init() MUST be called. - /// @see job_scheduler_init() - int job_scheduler_cancel_all() { - return _job_scheduler_cancel_all(); - } - - late final _job_scheduler_cancel_allPtr = - _lookup>( - 'job_scheduler_cancel_all'); - late final _job_scheduler_cancel_all = - _job_scheduler_cancel_allPtr.asFunction(); - - /// @brief Notifies that the job is finished. - /// @since_tizen 4.0 - /// @remarks If the job has been launched, the system kept awake for a while. - /// It is highly recommended to notify that the job is done, - /// the system thus knows it does not need to be kept awake. - /// @param[in] job_id The ID of the scheduled job - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #JOB_ERROR_NONE Successful - /// @retval #JOB_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #JOB_ERROR_NOT_INITIALIZED Not initialized - /// @retval #JOB_ERROR_NO_SUCH_JOB No such job - /// @retval #JOB_ERROR_IO_ERROR IO error - /// @pre job_scheduler_init() MUST be called. - /// @see job_scheduler_init() - int job_scheduler_notify_job_finished( - ffi.Pointer job_id, - ) { - return _job_scheduler_notify_job_finished( - job_id, - ); - } - - late final _job_scheduler_notify_job_finishedPtr = - _lookup)>>( - 'job_scheduler_notify_job_finished'); - late final _job_scheduler_notify_job_finished = - _job_scheduler_notify_job_finishedPtr - .asFunction)>(); - - /// @brief Retrieves all scheduled jobs. - /// @since_tizen 4.0 - /// @param[in] callback The iteration callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #JOB_ERROR_NONE Successful - /// @retval #JOB_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #JOB_ERROR_NOT_INITIALIZED Not initialized - /// @retval #JOB_ERROR_NO_SUCH_JOB No scheduled jobs - /// @pre job_scheduler_init() MUST be called. - /// @see job_scheduler_init() - int job_scheduler_foreach_job( - job_scheduler_foreach_job_cb callback, - ffi.Pointer user_data, - ) { - return _job_scheduler_foreach_job( - callback, - user_data, - ); - } - - late final _job_scheduler_foreach_jobPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(job_scheduler_foreach_job_cb, - ffi.Pointer)>>('job_scheduler_foreach_job'); - late final _job_scheduler_foreach_job = - _job_scheduler_foreach_jobPtr.asFunction< - int Function(job_scheduler_foreach_job_cb, ffi.Pointer)>(); - - /// @brief Adds job service handler for receiving the information of the scheduled job. - /// @since_tizen 4.0 - /// @remarks The @a job_service handle should be released using job_scheduler_service_remove(). - /// @param[in] job_id The ID of the job - /// @param[in] callback The set of callback functions to handle jobs - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] job_service The job service handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #JOB_ERROR_NONE Successful - /// @retval #JOB_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #JOB_ERROR_NOT_INITIALIZED Not initialized - /// @retval #JOB_ERROR_OUT_OF_MEMORY Out of memory - /// @pre job_scheduler_init() MUST be called. - /// @see job_scheduler_init() - /// @see job_scheduler_service_remove() - /// @see job_service_start_cb() - /// @see job_service_stop_cb() - /// @see job_scheduler_job_finished() - /// @see #job_service_callback_s - int job_scheduler_service_add( - ffi.Pointer job_id, - ffi.Pointer callback, - ffi.Pointer user_data, - ffi.Pointer job_service, - ) { - return _job_scheduler_service_add( - job_id, - callback, - user_data, - job_service, - ); - } - - late final _job_scheduler_service_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('job_scheduler_service_add'); - late final _job_scheduler_service_add = - _job_scheduler_service_addPtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Removes registered job service handler. - /// @since_tizen 4.0 - /// @param[in] job_service The job service handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #JOB_ERROR_NONE Successful - /// @retval #JOB_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #JOB_ERROR_NOT_INITIALIZED Not initialized - /// @pre job_scheduler_init() MUST be called. - /// @see job_scheduler_init() - /// @see job_scheduler_service_add() - int job_scheduler_service_remove( - job_service_h job_service, - ) { - return _job_scheduler_service_remove( - job_service, - ); - } - - late final _job_scheduler_service_removePtr = - _lookup>( - 'job_scheduler_service_remove'); - late final _job_scheduler_service_remove = _job_scheduler_service_removePtr - .asFunction(); - - /// @brief Sets an integer value in the preference. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] key The name of the key to modify - /// @param[in] value The new @c int value for the given key - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PREFERENCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - /// @see preference_get_int() - int preference_set_int( - ffi.Pointer key, - int value, - ) { - return _preference_set_int( - key, - value, - ); - } - - late final _preference_set_intPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'preference_set_int'); - late final _preference_set_int = _preference_set_intPtr - .asFunction, int)>(); - - /// @brief Gets an integer value from the preference. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] key The name of the key to retrieve - /// @param[out] value The @c int value for the given key - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PREFERENCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PREFERENCE_ERROR_NO_KEY Required key not available - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - /// @see preference_set_int() - int preference_get_int( - ffi.Pointer key, - ffi.Pointer value, - ) { - return _preference_get_int( - key, - value, - ); - } - - late final _preference_get_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('preference_get_int'); - late final _preference_get_int = _preference_get_intPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Sets a double value in the preference. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] key The name of the key to modify - /// @param[in] value The new @c double value associated with the given key - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PREFERENCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - /// @see preference_get_double() - int preference_set_double( - ffi.Pointer key, - double value, - ) { - return _preference_set_double( - key, - value, - ); - } - - late final _preference_set_doublePtr = _lookup< - ffi - .NativeFunction, ffi.Double)>>( - 'preference_set_double'); - late final _preference_set_double = _preference_set_doublePtr - .asFunction, double)>(); - - /// @brief Gets a double value from the preference. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] key The name of the key to retrieve - /// @param[out] value The @c double value associated with the given key - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PREFERENCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PREFERENCE_ERROR_NO_KEY Required key not available - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - /// @see preference_set_double() - int preference_get_double( - ffi.Pointer key, - ffi.Pointer value, - ) { - return _preference_get_double( - key, - value, - ); - } - - late final _preference_get_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('preference_get_double'); - late final _preference_get_double = _preference_get_doublePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets a string value in the preference. - /// @details It makes a deep copy of the added string value. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] key The name of the key to modify - /// @param[in] value The new @c string value associated with the given key - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PREFERENCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - /// @see preference_get_string() - int preference_set_string( - ffi.Pointer key, - ffi.Pointer value, - ) { - return _preference_set_string( - key, - value, - ); - } - - late final _preference_set_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('preference_set_string'); - late final _preference_set_string = _preference_set_stringPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Gets a string value from the preference. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks @a value must be released using free(). - /// @param[in] key The name of the key to retrieve - /// @param[out] value The @c string value associated with the given key - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PREFERENCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PREFERENCE_ERROR_NO_KEY Required key not available - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - /// @see preference_set_string() - int preference_get_string( - ffi.Pointer key, - ffi.Pointer> value, - ) { - return _preference_get_string( - key, - value, - ); - } - - late final _preference_get_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer>)>>('preference_get_string'); - late final _preference_get_string = _preference_get_stringPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Sets a boolean value in the preference. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] key The name of the key to modify - /// @param[in] value The new @c boolean value associated with the given key - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PREFERENCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - /// @see preference_get_boolean() - int preference_set_boolean( - ffi.Pointer key, - bool value, - ) { - return _preference_set_boolean( - key, - value, - ); - } - - late final _preference_set_booleanPtr = _lookup< - ffi - .NativeFunction, ffi.Bool)>>( - 'preference_set_boolean'); - late final _preference_set_boolean = _preference_set_booleanPtr - .asFunction, bool)>(); - - /// @brief Gets a boolean value from the preference. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] key The name of the key to retrieve - /// @param[out] value The @c boolean value associated with the given key - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PREFERENCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PREFERENCE_ERROR_NO_KEY Required key not available - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - /// @see preference_set_boolean() - int preference_get_boolean( - ffi.Pointer key, - ffi.Pointer value, - ) { - return _preference_get_boolean( - key, - value, - ); - } - - late final _preference_get_booleanPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('preference_get_boolean'); - late final _preference_get_boolean = _preference_get_booleanPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Removes any value with the given @a key from the preference. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] key The name of the key to remove - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PREFERENCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PREFERENCE_ERROR_NO_KEY Required key not available - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - int preference_remove( - ffi.Pointer key, - ) { - return _preference_remove( - key, - ); - } - - late final _preference_removePtr = - _lookup)>>( - 'preference_remove'); - late final _preference_remove = - _preference_removePtr.asFunction)>(); - - /// @brief Checks whether the given @a key exists in the preference. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] key The name of the key to check - /// @param[out] existing If @c true the @a key exists in the preference, - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PREFERENCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - int preference_is_existing( - ffi.Pointer key, - ffi.Pointer existing, - ) { - return _preference_is_existing( - key, - existing, - ); - } - - late final _preference_is_existingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('preference_is_existing'); - late final _preference_is_existing = _preference_is_existingPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Removes all key-value pairs from the preference. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - /// @see preference_remove() - int preference_remove_all() { - return _preference_remove_all(); - } - - late final _preference_remove_allPtr = - _lookup>('preference_remove_all'); - late final _preference_remove_all = - _preference_remove_allPtr.asFunction(); - - /// @brief Registers a callback function to be invoked when value of the given key in the preference changes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] key The name of the key to monitor - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PREFERENCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PREFERENCE_ERROR_NO_KEY Required key not available - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - /// @post preference_changed_cb() will be invoked. - /// @see preference_unset_changed_cb() - /// @see preference_changed_cb() - int preference_set_changed_cb( - ffi.Pointer key, - preference_changed_cb callback, - ffi.Pointer user_data, - ) { - return _preference_set_changed_cb( - key, - callback, - user_data, - ); - } - - late final _preference_set_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, preference_changed_cb, - ffi.Pointer)>>('preference_set_changed_cb'); - late final _preference_set_changed_cb = - _preference_set_changed_cbPtr.asFunction< - int Function(ffi.Pointer, preference_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] key The name of the key to monitor - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PREFERENCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PREFERENCE_ERROR_NO_KEY Required key not available - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - /// @see preference_set_changed_cb() - int preference_unset_changed_cb( - ffi.Pointer key, - ) { - return _preference_unset_changed_cb( - key, - ); - } - - late final _preference_unset_changed_cbPtr = - _lookup)>>( - 'preference_unset_changed_cb'); - late final _preference_unset_changed_cb = _preference_unset_changed_cbPtr - .asFunction)>(); - - /// @brief Retrieves all key-value pairs in the preference by invoking the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] callback The callback function to get key value once for each key-value pair in the preference - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PREFERENCE_ERROR_NONE Successful - /// @retval #PREFERENCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PREFERENCE_ERROR_IO_ERROR Internal I/O Error - /// @post This function invokes preference_item_cb() repeatedly to get each key-value pair in the preference. - /// @see preference_item_cb() - int preference_foreach_item( - preference_item_cb callback, - ffi.Pointer user_data, - ) { - return _preference_foreach_item( - callback, - user_data, - ); - } - - late final _preference_foreach_itemPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(preference_item_cb, - ffi.Pointer)>>('preference_foreach_item'); - late final _preference_foreach_item = _preference_foreach_itemPtr - .asFunction)>(); - - /// @brief Creates resource manager and get from db. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks If resource manager already exists, - /// It will just return APP_RESOURCE_ERROR_NONE - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_RESOURCE_ERROR_NONE Successful - /// @retval #APP_RESOURCE_ERROR_IO_ERROR IO Internal I/O Error - /// @retval #APP_RESOURCE_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_resource_manager_release() - int app_resource_manager_init() { - return _app_resource_manager_init(); - } - - late final _app_resource_manager_initPtr = - _lookup>( - 'app_resource_manager_init'); - late final _app_resource_manager_init = - _app_resource_manager_initPtr.asFunction(); - - /// @brief Converts resource ID to path name - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks If resource manager is not created yet, - /// app_resource_manager_init() will be invoked automatically. - /// Caller should free the returned pointer. - /// @param[in] type Resource type @see app_resource_e - /// @param[in] id Resource ID - /// @param[out] path The name of requested resource on success, otherwise NULL - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_RESOURCE_ERROR_NONE Successful - /// @retval #APP_RESOURCE_ERROR_INVALID_PARAMETER Invalid Parameter - /// @retval #APP_RESOURCE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #APP_RESOURCE_ERROR_IO_ERROR Internal I/O Error or failed to find valid resource - /// @see app_resource_manager_init() - int app_resource_manager_get( - int type, - ffi.Pointer id, - ffi.Pointer> path, - ) { - return _app_resource_manager_get( - type, - id, - path, - ); - } - - late final _app_resource_manager_getPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer, - ffi.Pointer>)>>('app_resource_manager_get'); - late final _app_resource_manager_get = - _app_resource_manager_getPtr.asFunction< - int Function(int, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Destroys resource manager. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks Please note that the instance of resource manager should only be released when the application is closing. - /// It is a highly recommended way to improve run-time performance. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_RESOURCE_ERROR_NONE Successful - /// @see app_resource_manager_init() - int app_resource_manager_release() { - return _app_resource_manager_release(); - } - - late final _app_resource_manager_releasePtr = - _lookup>( - 'app_resource_manager_release'); - late final _app_resource_manager_release = - _app_resource_manager_releasePtr.asFunction(); - - /// @brief Destroys the application context handle and releases all its resources. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_context The application context handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see app_manager_foreach_app_context() - /// @see app_manager_get_app_context() - int app_context_destroy( - app_context_h app_context, - ) { - return _app_context_destroy( - app_context, - ); - } - - late final _app_context_destroyPtr = - _lookup>( - 'app_context_destroy'); - late final _app_context_destroy = - _app_context_destroyPtr.asFunction(); - - /// @deprecated Deprecated since 2.3.1. Use app_context_get_app_id() instead. - /// @brief Gets the application ID with the given application context. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a package using free(). - /// @param[in] app_context The application context - /// @param[out] package The application ID of the given application context - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_context_get_package( - app_context_h app_context, - ffi.Pointer> package, - ) { - return _app_context_get_package( - app_context, - package, - ); - } - - late final _app_context_get_packagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_context_h, - ffi.Pointer>)>>('app_context_get_package'); - late final _app_context_get_package = _app_context_get_packagePtr.asFunction< - int Function(app_context_h, ffi.Pointer>)>(); - - /// @brief Gets the application ID with the given application context. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a app_id using free(). - /// @param[in] app_context The application context - /// @param[out] app_id The application ID of the given application context - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_context_get_app_id( - app_context_h app_context, - ffi.Pointer> app_id, - ) { - return _app_context_get_app_id( - app_context, - app_id, - ); - } - - late final _app_context_get_app_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_context_h, - ffi.Pointer>)>>('app_context_get_app_id'); - late final _app_context_get_app_id = _app_context_get_app_idPtr.asFunction< - int Function(app_context_h, ffi.Pointer>)>(); - - /// @brief Gets the process ID with the given application context. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_context The application context - /// @param[out] pid The process ID of the given application context - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int app_context_get_pid( - app_context_h app_context, - ffi.Pointer pid, - ) { - return _app_context_get_pid( - app_context, - pid, - ); - } - - late final _app_context_get_pidPtr = _lookup< - ffi - .NativeFunction)>>( - 'app_context_get_pid'); - late final _app_context_get_pid = _app_context_get_pidPtr - .asFunction)>(); - - /// @brief Gets the package id with the given application context. - /// @since_tizen 3.0 - /// @remarks You must release @a pkg_id using free(). - /// @param[in] app_context The application context - /// @param[out] pkg_id The package ID of the given application context - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_context_get_package_id( - app_context_h app_context, - ffi.Pointer> pkg_id, - ) { - return _app_context_get_package_id( - app_context, - pkg_id, - ); - } - - late final _app_context_get_package_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - app_context_h, ffi.Pointer>)>>( - 'app_context_get_package_id'); - late final _app_context_get_package_id = - _app_context_get_package_idPtr.asFunction< - int Function(app_context_h, ffi.Pointer>)>(); - - /// @brief Gets the application state with the given application context. - /// @since_tizen 3.0 - /// @remarks Note that application's state might be changed after you get app_context. - /// This API just returns the state of application when you get the app_context. - /// @param[in] app_context The application context - /// @param[out] state The application state of the given application context - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int app_context_get_app_state( - app_context_h app_context, - ffi.Pointer state, - ) { - return _app_context_get_app_state( - app_context, - state, - ); - } - - late final _app_context_get_app_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_context_h, - ffi.Pointer)>>('app_context_get_app_state'); - late final _app_context_get_app_state = _app_context_get_app_statePtr - .asFunction)>(); - - /// @brief Checks whether the application with the given application context is terminated. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_context The application context - /// @param[out] terminated @c true if the application is terminated, \n - /// otherwise @c false if the application is running - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int app_context_is_terminated( - app_context_h app_context, - ffi.Pointer terminated, - ) { - return _app_context_is_terminated( - app_context, - terminated, - ); - } - - late final _app_context_is_terminatedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_context_h, - ffi.Pointer)>>('app_context_is_terminated'); - late final _app_context_is_terminated = _app_context_is_terminatedPtr - .asFunction)>(); - - /// @brief Checks whether two application contexts are equal. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] lhs The first application context to compare - /// @param[in] rhs The second application context to compare - /// @param[out] equal @c true if the application contexts are equal, \n - /// otherwise @c false if they are not equal - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int app_context_is_equal( - app_context_h lhs, - app_context_h rhs, - ffi.Pointer equal, - ) { - return _app_context_is_equal( - lhs, - rhs, - equal, - ); - } - - late final _app_context_is_equalPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_context_h, app_context_h, - ffi.Pointer)>>('app_context_is_equal'); - late final _app_context_is_equal = _app_context_is_equalPtr.asFunction< - int Function(app_context_h, app_context_h, ffi.Pointer)>(); - - /// @brief Checks whether the application is running as a sub application of the application group. - /// @since_tizen 3.0 - /// @param[in] app_context The application context - /// @param[out] is_sub_app @c true if the sub application of the group, \n - /// otherwise @c false if the main application of the group - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int app_context_is_sub_app( - app_context_h app_context, - ffi.Pointer is_sub_app, - ) { - return _app_context_is_sub_app( - app_context, - is_sub_app, - ); - } - - late final _app_context_is_sub_appPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - app_context_h, ffi.Pointer)>>('app_context_is_sub_app'); - late final _app_context_is_sub_app = _app_context_is_sub_appPtr - .asFunction)>(); - - /// @brief Clones the application context handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[out] clone The newly created application context handle, if cloning is successful - /// @param[in] app_context The application context - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_context_clone( - ffi.Pointer clone, - app_context_h app_context, - ) { - return _app_context_clone( - clone, - app_context, - ); - } - - late final _app_context_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, app_context_h)>>('app_context_clone'); - late final _app_context_clone = _app_context_clonePtr - .asFunction, app_context_h)>(); - - /// @brief Creates the application information handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_id The application ID - /// @param[out] app_info The application information handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_NO_SUCH_APP The app is not installed - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_manager_foreach_app_info() - /// @see app_manager_get_app_info() - int app_info_create( - ffi.Pointer app_id, - ffi.Pointer app_info, - ) { - return _app_info_create( - app_id, - app_info, - ); - } - - late final _app_info_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('app_info_create'); - late final _app_info_create = _app_info_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys the application information handle and releases all its resources. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_info The application information handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see app_manager_foreach_app_info() - /// @see app_manager_get_app_info() - int app_info_destroy( - app_info_h app_info, - ) { - return _app_info_destroy( - app_info, - ); - } - - late final _app_info_destroyPtr = - _lookup>( - 'app_info_destroy'); - late final _app_info_destroy = - _app_info_destroyPtr.asFunction(); - - /// @brief Gets the application ID with the given application context. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a app_id using free(). - /// @param[in] app_info The application information - /// @param[out] app_id The application ID of the given application context - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_info_get_app_id( - app_info_h app_info, - ffi.Pointer> app_id, - ) { - return _app_info_get_app_id( - app_info, - app_id, - ); - } - - late final _app_info_get_app_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_h, - ffi.Pointer>)>>('app_info_get_app_id'); - late final _app_info_get_app_id = _app_info_get_app_idPtr.asFunction< - int Function(app_info_h, ffi.Pointer>)>(); - - /// @brief Gets the executable path of the application - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a exec path using free(). - /// @param[in] app_info The application information - /// @param[out] exec The executable path of the application - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_info_get_exec( - app_info_h app_info, - ffi.Pointer> exec, - ) { - return _app_info_get_exec( - app_info, - exec, - ); - } - - late final _app_info_get_execPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_h, - ffi.Pointer>)>>('app_info_get_exec'); - late final _app_info_get_exec = _app_info_get_execPtr.asFunction< - int Function(app_info_h, ffi.Pointer>)>(); - - /// @brief Gets the label of the application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a label using free(). - /// @param[in] app_info The application information - /// @param[out] label The label of the application - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_info_get_label( - app_info_h app_info, - ffi.Pointer> label, - ) { - return _app_info_get_label( - app_info, - label, - ); - } - - late final _app_info_get_labelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_h, - ffi.Pointer>)>>('app_info_get_label'); - late final _app_info_get_label = _app_info_get_labelPtr.asFunction< - int Function(app_info_h, ffi.Pointer>)>(); - - /// @brief Gets the localed name of the application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release localed name using free(). - /// @param[in] app_id The application ID - /// @param[in] locale The locale information - /// @param[out] label The localed name of the application - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_info_get_localed_label( - ffi.Pointer app_id, - ffi.Pointer locale, - ffi.Pointer> label, - ) { - return _app_info_get_localed_label( - app_id, - locale, - label, - ); - } - - late final _app_info_get_localed_labelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>( - 'app_info_get_localed_label'); - late final _app_info_get_localed_label = - _app_info_get_localed_labelPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets the absolute path to the icon image. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a path using free(). - /// @param[in] app_info The application information - /// @param[out] path The absolute path to the icon - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_info_get_icon( - app_info_h app_info, - ffi.Pointer> path, - ) { - return _app_info_get_icon( - app_info, - path, - ); - } - - late final _app_info_get_iconPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_h, - ffi.Pointer>)>>('app_info_get_icon'); - late final _app_info_get_icon = _app_info_get_iconPtr.asFunction< - int Function(app_info_h, ffi.Pointer>)>(); - - /// @brief Gets the package name. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a package name using free(). - /// @param[in] app_info The application information - /// @param[out] package The package name - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_info_get_package( - app_info_h app_info, - ffi.Pointer> package, - ) { - return _app_info_get_package( - app_info, - package, - ); - } - - late final _app_info_get_packagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_h, - ffi.Pointer>)>>('app_info_get_package'); - late final _app_info_get_package = _app_info_get_packagePtr.asFunction< - int Function(app_info_h, ffi.Pointer>)>(); - - /// @brief Gets the package type name. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release package @a type name using free(). - /// @param[in] app_info The application information - /// @param[out] type The package type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_info_get_type( - app_info_h app_info, - ffi.Pointer> type, - ) { - return _app_info_get_type( - app_info, - type, - ); - } - - late final _app_info_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_h, - ffi.Pointer>)>>('app_info_get_type'); - late final _app_info_get_type = _app_info_get_typePtr.asFunction< - int Function(app_info_h, ffi.Pointer>)>(); - - /// @brief Gets the application component type. - /// @since_tizen 4.0 - /// @param[in] app_info The application information - /// @param[out] type The application component type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_IO_ERROR I/O error - /// @see #PACKAGE_INFO_PROP_APP_COMPONENT_TYPE - /// @see #app_info_app_component_type_e - int app_info_get_app_component_type( - app_info_h app_info, - ffi.Pointer type, - ) { - return _app_info_get_app_component_type( - app_info, - type, - ); - } - - late final _app_info_get_app_component_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_h, - ffi.Pointer)>>('app_info_get_app_component_type'); - late final _app_info_get_app_component_type = - _app_info_get_app_component_typePtr - .asFunction)>(); - - /// @brief Gets the list of metadata for a particular application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_info The application information - /// @param[in] callback The callback function for list - /// @param[in] user_data The user data to be passed to callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_IO_ERROR I/O error - int app_info_foreach_metadata( - app_info_h app_info, - app_info_metadata_cb callback, - ffi.Pointer user_data, - ) { - return _app_info_foreach_metadata( - app_info, - callback, - user_data, - ); - } - - late final _app_info_foreach_metadataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_h, app_info_metadata_cb, - ffi.Pointer)>>('app_info_foreach_metadata'); - late final _app_info_foreach_metadata = - _app_info_foreach_metadataPtr.asFunction< - int Function( - app_info_h, app_info_metadata_cb, ffi.Pointer)>(); - - /// @brief Checks whether application information is nodisplay. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_info The application information - /// @param[out] nodisplay @c true if the application is nodisplay, \n - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int app_info_is_nodisplay( - app_info_h app_info, - ffi.Pointer nodisplay, - ) { - return _app_info_is_nodisplay( - app_info, - nodisplay, - ); - } - - late final _app_info_is_nodisplayPtr = _lookup< - ffi - .NativeFunction)>>( - 'app_info_is_nodisplay'); - late final _app_info_is_nodisplay = _app_info_is_nodisplayPtr - .asFunction)>(); - - /// @brief Checks whether two application information are equal. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] lhs The first application information to compare - /// @param[in] rhs The second application information to compare - /// @param[out] equal @c true if the application information are equal, \n - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int app_info_is_equal( - app_info_h lhs, - app_info_h rhs, - ffi.Pointer equal, - ) { - return _app_info_is_equal( - lhs, - rhs, - equal, - ); - } - - late final _app_info_is_equalPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_h, app_info_h, - ffi.Pointer)>>('app_info_is_equal'); - late final _app_info_is_equal = _app_info_is_equalPtr.asFunction< - int Function(app_info_h, app_info_h, ffi.Pointer)>(); - - /// @brief Checks whether application is enabled. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_info The application information - /// @param[out] enabled @c true if the application is enabled, \n - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int app_info_is_enabled( - app_info_h app_info, - ffi.Pointer enabled, - ) { - return _app_info_is_enabled( - app_info, - enabled, - ); - } - - late final _app_info_is_enabledPtr = _lookup< - ffi - .NativeFunction)>>( - 'app_info_is_enabled'); - late final _app_info_is_enabled = _app_info_is_enabledPtr - .asFunction)>(); - - /// @brief Checks whether application is launched on booting time. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_info The application information - /// @param[out] onboot @c true if the application is launched on booting time, \n - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int app_info_is_onboot( - app_info_h app_info, - ffi.Pointer onboot, - ) { - return _app_info_is_onboot( - app_info, - onboot, - ); - } - - late final _app_info_is_onbootPtr = _lookup< - ffi - .NativeFunction)>>( - 'app_info_is_onboot'); - late final _app_info_is_onboot = _app_info_is_onbootPtr - .asFunction)>(); - - /// @brief Checks whether application is preloaded. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_info The application information - /// @param[out] preload @c true if the application is preloaded, \n - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int app_info_is_preload( - app_info_h app_info, - ffi.Pointer preload, - ) { - return _app_info_is_preload( - app_info, - preload, - ); - } - - late final _app_info_is_preloadPtr = _lookup< - ffi - .NativeFunction)>>( - 'app_info_is_preload'); - late final _app_info_is_preload = _app_info_is_preloadPtr - .asFunction)>(); - - /// @brief Clones the application information handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[out] clone A newly created application information handle, if successfully cloned - /// @param[in] app_info The application information - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #APP_MANAGER_ERROR_NO_SUCH_APP The app is not installed - int app_info_clone( - ffi.Pointer clone, - app_info_h app_info, - ) { - return _app_info_clone( - clone, - app_info, - ); - } - - late final _app_info_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, app_info_h)>>('app_info_clone'); - late final _app_info_clone = _app_info_clonePtr - .asFunction, app_info_h)>(); - - /// @platform - /// @brief Runs a callback for each category which the given application belongs to. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @param[in] app_info The application information - /// @param[in] callback The callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #APP_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @see app_info_create() - int app_info_foreach_category( - app_info_h app_info, - app_info_category_cb callback, - ffi.Pointer user_data, - ) { - return _app_info_foreach_category( - app_info, - callback, - user_data, - ); - } - - late final _app_info_foreach_categoryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_h, app_info_category_cb, - ffi.Pointer)>>('app_info_foreach_category'); - late final _app_info_foreach_category = - _app_info_foreach_categoryPtr.asFunction< - int Function( - app_info_h, app_info_category_cb, ffi.Pointer)>(); - - /// @brief Creates the application information filter handle from DB. - /// All filter properties will be ANDed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[out] handle The pointer to the application info filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #APP_MANAGER_ERROR_IO_ERROR I/O error - int app_info_filter_create( - ffi.Pointer handle, - ) { - return _app_info_filter_create( - handle, - ); - } - - late final _app_info_filter_createPtr = _lookup< - ffi.NativeFunction)>>( - 'app_info_filter_create'); - late final _app_info_filter_create = _app_info_filter_createPtr - .asFunction)>(); - - /// @brief Destroys the application information filter handle, freeing up all the resources. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] handle The pointer to the application info filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_IO_ERROR I/O error - int app_info_filter_destroy( - app_info_filter_h handle, - ) { - return _app_info_filter_destroy( - handle, - ); - } - - late final _app_info_filter_destroyPtr = - _lookup>( - 'app_info_filter_destroy'); - late final _app_info_filter_destroy = - _app_info_filter_destroyPtr.asFunction(); - - /// @brief Adds a boolean filter property to the filter handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] handle The pointer to the application info filter handle - /// @param[in] property The integer property name - /// @param[in] value The value corresponding to the property - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_IO_ERROR I/O error - int app_info_filter_add_bool( - app_info_filter_h handle, - ffi.Pointer property, - bool value, - ) { - return _app_info_filter_add_bool( - handle, - property, - value, - ); - } - - late final _app_info_filter_add_boolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_filter_h, ffi.Pointer, - ffi.Bool)>>('app_info_filter_add_bool'); - late final _app_info_filter_add_bool = - _app_info_filter_add_boolPtr.asFunction< - int Function(app_info_filter_h, ffi.Pointer, bool)>(); - - /// @brief Adds a string filter property to the filter handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] handle The pointer to the application info filter handle - /// @param[in] property The integer property name - /// @param[in] value The value corresponding to the property - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_IO_ERROR I/O error - int app_info_filter_add_string( - app_info_filter_h handle, - ffi.Pointer property, - ffi.Pointer value, - ) { - return _app_info_filter_add_string( - handle, - property, - value, - ); - } - - late final _app_info_filter_add_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_filter_h, ffi.Pointer, - ffi.Pointer)>>('app_info_filter_add_string'); - late final _app_info_filter_add_string = - _app_info_filter_add_stringPtr.asFunction< - int Function(app_info_filter_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the count of filtered apps. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] handle The pointer to the application info filter handle - /// @param[out] count The pointer to the variable for count - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_IO_ERROR I/O error - int app_info_filter_count_appinfo( - app_info_filter_h handle, - ffi.Pointer count, - ) { - return _app_info_filter_count_appinfo( - handle, - count, - ); - } - - late final _app_info_filter_count_appinfoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_filter_h, - ffi.Pointer)>>('app_info_filter_count_appinfo'); - late final _app_info_filter_count_appinfo = _app_info_filter_count_appinfoPtr - .asFunction)>(); - - /// @brief Executes the user supplied callback function for each application that satisfy the filter conditions. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] handle The pointer to the application info filter handle - /// @param[in] callback The callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_IO_ERROR I/O error - int app_info_filter_foreach_appinfo( - app_info_filter_h handle, - app_info_filter_cb callback, - ffi.Pointer user_data, - ) { - return _app_info_filter_foreach_appinfo( - handle, - callback, - user_data, - ); - } - - late final _app_info_filter_foreach_appinfoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_filter_h, app_info_filter_cb, - ffi.Pointer)>>('app_info_filter_foreach_appinfo'); - late final _app_info_filter_foreach_appinfo = - _app_info_filter_foreach_appinfoPtr.asFunction< - int Function( - app_info_filter_h, app_info_filter_cb, ffi.Pointer)>(); - - /// @brief Creates the application's metadata information filter handle from DB. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[out] handle The pointer to the application metadata info filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #APP_MANAGER_ERROR_IO_ERROR I/O error - int app_info_metadata_filter_create( - ffi.Pointer handle, - ) { - return _app_info_metadata_filter_create( - handle, - ); - } - - late final _app_info_metadata_filter_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'app_info_metadata_filter_create'); - late final _app_info_metadata_filter_create = - _app_info_metadata_filter_createPtr - .asFunction)>(); - - /// @brief Destroys the application's metadata information filter handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] handle The pointer to the application info filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_IO_ERROR I/O error - int app_info_metadata_filter_destroy( - app_info_metadata_filter_h handle, - ) { - return _app_info_metadata_filter_destroy( - handle, - ); - } - - late final _app_info_metadata_filter_destroyPtr = - _lookup>( - 'app_info_metadata_filter_destroy'); - late final _app_info_metadata_filter_destroy = - _app_info_metadata_filter_destroyPtr - .asFunction(); - - /// @brief Adds filter condition for the query API. - /// @details The query will search the entire application metadata information collected from - /// the manifest file of all the installed packages. You can specify value as @c NULL to search based on key only. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] handle The pointer to the application metadata info filter handle - /// @param[in] key The pointer to metadata key - /// @param[in] value The pointer to metadata value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_IO_ERROR I/O error - int app_info_metadata_filter_add( - app_info_metadata_filter_h handle, - ffi.Pointer key, - ffi.Pointer value, - ) { - return _app_info_metadata_filter_add( - handle, - key, - value, - ); - } - - late final _app_info_metadata_filter_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_metadata_filter_h, ffi.Pointer, - ffi.Pointer)>>('app_info_metadata_filter_add'); - late final _app_info_metadata_filter_add = - _app_info_metadata_filter_addPtr.asFunction< - int Function(app_info_metadata_filter_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Executes the filter query. - /// @details The query will search the entire application metadata information collected from - /// the manifest file of all the installed packages. For each application returned by the query, the callback will be called. If callback returns - /// negative value, no more callbacks will be called and API will return. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] handle The pointer to the application metadata info filter handle - /// @param[in] callback The function pointer to callback - /// @param[in] user_data The pointer to user data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_IO_ERROR I/O error - int app_info_metadata_filter_foreach( - app_info_metadata_filter_h handle, - app_info_filter_cb callback, - ffi.Pointer user_data, - ) { - return _app_info_metadata_filter_foreach( - handle, - callback, - user_data, - ); - } - - late final _app_info_metadata_filter_foreachPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_info_metadata_filter_h, app_info_filter_cb, - ffi.Pointer)>>('app_info_metadata_filter_foreach'); - late final _app_info_metadata_filter_foreach = - _app_info_metadata_filter_foreachPtr.asFunction< - int Function(app_info_metadata_filter_h, app_info_filter_cb, - ffi.Pointer)>(); - - /// @brief Registers a callback function to be invoked when the applications get launched or terminated. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #APP_MANAGER_ERROR_IO_ERROR Internal I/O error - /// @post It will invoke app_manager_app_context_event_cb() when the application is launched or terminated. - /// @see app_manager_unset_app_context_event_cb() - /// @see app_manager_app_context_event_cb() - int app_manager_set_app_context_event_cb( - app_manager_app_context_event_cb callback, - ffi.Pointer user_data, - ) { - return _app_manager_set_app_context_event_cb( - callback, - user_data, - ); - } - - late final _app_manager_set_app_context_event_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_manager_app_context_event_cb, - ffi.Pointer)>>('app_manager_set_app_context_event_cb'); - late final _app_manager_set_app_context_event_cb = - _app_manager_set_app_context_event_cbPtr.asFunction< - int Function( - app_manager_app_context_event_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @see app_manager_app_context_event_cb() - void app_manager_unset_app_context_event_cb() { - return _app_manager_unset_app_context_event_cb(); - } - - late final _app_manager_unset_app_context_event_cbPtr = - _lookup>( - 'app_manager_unset_app_context_event_cb'); - late final _app_manager_unset_app_context_event_cb = - _app_manager_unset_app_context_event_cbPtr.asFunction(); - - /// @brief Retrieves all application contexts of running applications. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_IO_ERROR Internal I/O error - /// @post This function invokes app_manager_app_context_cb() for each application context. - /// @see app_manager_app_context_cb() - /// @remarks In case of ui applications, sub apps in application groups will not be shown. - int app_manager_foreach_app_context( - app_manager_app_context_cb callback, - ffi.Pointer user_data, - ) { - return _app_manager_foreach_app_context( - callback, - user_data, - ); - } - - late final _app_manager_foreach_app_contextPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_manager_app_context_cb, - ffi.Pointer)>>('app_manager_foreach_app_context'); - late final _app_manager_foreach_app_context = - _app_manager_foreach_app_contextPtr.asFunction< - int Function(app_manager_app_context_cb, ffi.Pointer)>(); - - /// @brief Retrieves all application contexts of running applications including sub apps. - /// @details You can iterate all the running application contexts using this API. - /// This API is similar to app_manager_foreach_app_context() except that this API iterates application contexts including sub apps in application groups. - /// @since_tizen 3.0 - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_IO_ERROR Internal I/O error - /// @post This function invokes app_manager_app_context_cb() for each application context. - /// @see app_manager_app_context_cb() - int app_manager_foreach_running_app_context( - app_manager_app_context_cb callback, - ffi.Pointer user_data, - ) { - return _app_manager_foreach_running_app_context( - callback, - user_data, - ); - } - - late final _app_manager_foreach_running_app_contextPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - app_manager_app_context_cb, ffi.Pointer)>>( - 'app_manager_foreach_running_app_context'); - late final _app_manager_foreach_running_app_context = - _app_manager_foreach_running_app_contextPtr.asFunction< - int Function(app_manager_app_context_cb, ffi.Pointer)>(); - - /// @brief Gets the application context for the given ID of the application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This function returns #APP_MANAGER_ERROR_NO_SUCH_APP if the application with the given application ID is not running. \n - /// You must release @a app_context using app_context_destroy(). - /// @param[in] app_id The ID of the application - /// @param[out] app_context The application context of the given application ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #APP_MANAGER_ERROR_NO_SUCH_APP No such application - int app_manager_get_app_context( - ffi.Pointer app_id, - ffi.Pointer app_context, - ) { - return _app_manager_get_app_context( - app_id, - app_context, - ); - } - - late final _app_manager_get_app_contextPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('app_manager_get_app_context'); - late final _app_manager_get_app_context = - _app_manager_get_app_contextPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the ID of the application for the given process ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This function returns #APP_MANAGER_ERROR_NO_SUCH_APP if the application with the given process ID is not valid. \n - /// You must release @a app_id using free(). - /// @param[in] pid The process ID of the application - /// @param[out] app_id The ID of the application - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_manager_get_app_id( - int pid, - ffi.Pointer> app_id, - ) { - return _app_manager_get_app_id( - pid, - app_id, - ); - } - - late final _app_manager_get_app_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(pid_t, - ffi.Pointer>)>>('app_manager_get_app_id'); - late final _app_manager_get_app_id = _app_manager_get_app_idPtr - .asFunction>)>(); - - /// @brief Checks whether the application with the given ID of the application is running. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] app_id The ID of the application - /// @param[out] running @c true if the application is running, \n - /// otherwise @c false if not running - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int app_manager_is_running( - ffi.Pointer app_id, - ffi.Pointer running, - ) { - return _app_manager_is_running( - app_id, - running, - ); - } - - late final _app_manager_is_runningPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('app_manager_is_running'); - late final _app_manager_is_running = _app_manager_is_runningPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Resumes the application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/appmanager.launch - /// @param[in] app_context The application context - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_APP_NO_RUNNING App is not running - /// @retval #APP_MANAGER_ERROR_REQUEST_FAILED Internal resume error - /// @retval #APP_MANAGER_ERROR_PERMISSION_DENIED Permission denied - int app_manager_resume_app( - app_context_h app_context, - ) { - return _app_manager_resume_app( - app_context, - ); - } - - late final _app_manager_resume_appPtr = - _lookup>( - 'app_manager_resume_app'); - late final _app_manager_resume_app = - _app_manager_resume_appPtr.asFunction(); - - /// @brief Terminates the back ground application.\n - /// UI applications that are in paused state or some service applications could be required to terminate by this API. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/appmanager.kill.bgapp - /// @remarks This function returns after it just sends a request for terminating a background application.\n - /// Platform will decide if the target application could be terminated or not according to the state of the target application. - /// @param[in] app_context The application context - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_REQUEST_FAILED Failed to send terminate request - /// @retval #APP_MANAGER_ERROR_PERMISSION_DENIED Permission denied - int app_manager_request_terminate_bg_app( - app_context_h app_context, - ) { - return _app_manager_request_terminate_bg_app( - app_context, - ); - } - - late final _app_manager_request_terminate_bg_appPtr = - _lookup>( - 'app_manager_request_terminate_bg_app'); - late final _app_manager_request_terminate_bg_app = - _app_manager_request_terminate_bg_appPtr - .asFunction(); - - /// @brief Retrieves all installed applications information. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @post This function invokes app_manager_app_info_cb() for each application information. - /// @see app_manager_app_info_cb() - int app_manager_foreach_app_info( - app_manager_app_info_cb callback, - ffi.Pointer user_data, - ) { - return _app_manager_foreach_app_info( - callback, - user_data, - ); - } - - late final _app_manager_foreach_app_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_manager_app_info_cb, - ffi.Pointer)>>('app_manager_foreach_app_info'); - late final _app_manager_foreach_app_info = - _app_manager_foreach_app_infoPtr.asFunction< - int Function(app_manager_app_info_cb, ffi.Pointer)>(); - - /// @brief Gets the application information for the given application ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a app_info using app_info_destroy(). - /// @param[in] app_id The ID of the application - /// @param[out] app_info The application information for the given application ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #APP_MANAGER_ERROR_NO_SUCH_APP No such application - int app_manager_get_app_info( - ffi.Pointer app_id, - ffi.Pointer app_info, - ) { - return _app_manager_get_app_info( - app_id, - app_info, - ); - } - - late final _app_manager_get_app_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('app_manager_get_app_info'); - late final _app_manager_get_app_info = - _app_manager_get_app_infoPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the absolute path to the shared data directory of the application specified - /// with an application ID. - /// @details An application can only read the files of other application's shared data directory. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specified @a path should be released with free(). @n - /// Since Tizen 3.0, the shared/data directory is supported only for the applications that declare the http://tizen.org/privilege/appdir.shareddata privilege. - /// The function will fail with #APP_MANAGER_ERROR_NOT_SUPPORTED if the privilege is not declared. - /// - /// @param[in] app_id The ID of the application - /// @param[in,out] path The absolute path to the shared data directory of the application - /// specified with the @a app_id - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_NO_SUCH_APP No such application - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #APP_MANAGER_ERROR_NOT_SUPPORTED Not supported - int app_manager_get_shared_data_path( - ffi.Pointer app_id, - ffi.Pointer> path, - ) { - return _app_manager_get_shared_data_path( - app_id, - path, - ); - } - - late final _app_manager_get_shared_data_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer>)>>( - 'app_manager_get_shared_data_path'); - late final _app_manager_get_shared_data_path = - _app_manager_get_shared_data_pathPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Gets the absolute path to the shared resource directory of the application specified - /// with an application ID. - /// @details An application can only read the files of other application's shared resource directory. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specified @a path should be released with free(). - /// - /// @param[in] app_id The ID of the application - /// @param[in,out] path The absolute path to the shared resource directory of the application - /// specified with the @a app_id - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_NO_SUCH_APP No such application - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_manager_get_shared_resource_path( - ffi.Pointer app_id, - ffi.Pointer> path, - ) { - return _app_manager_get_shared_resource_path( - app_id, - path, - ); - } - - late final _app_manager_get_shared_resource_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer>)>>( - 'app_manager_get_shared_resource_path'); - late final _app_manager_get_shared_resource_path = - _app_manager_get_shared_resource_pathPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Gets the absolute path to the shared trusted directory of the application specified - /// with an application ID. - /// @details An application signed with the same certificate can read and write the files of - /// other application's shared trusted directory. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specified @a path should be released with free(). - /// - /// @param[in] app_id The ID of the application - /// @param[in,out] path The absolute path to the shared trusted directory of the application - /// specified with the @a app_id - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_NO_SUCH_APP No such application - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_manager_get_shared_trusted_path( - ffi.Pointer app_id, - ffi.Pointer> path, - ) { - return _app_manager_get_shared_trusted_path( - app_id, - path, - ); - } - - late final _app_manager_get_shared_trusted_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer>)>>( - 'app_manager_get_shared_trusted_path'); - late final _app_manager_get_shared_trusted_path = - _app_manager_get_shared_trusted_pathPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. - /// @brief Gets the absolute path to the shared data directory of the application specified - /// with an application ID. - /// @details An application can only read the files of other application's shared data directory. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specified @a path should be released with free(). - /// @remarks To access the path returned by this function may not work as intended in certain devices due to some implementation issues. - /// - /// @param[in] app_id The ID of the application - /// @param[in,out] path The absolute path to the shared data directory of the application - /// specified with the @a app_id - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_NO_SUCH_APP No such application - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int app_manager_get_external_shared_data_path( - ffi.Pointer app_id, - ffi.Pointer> path, - ) { - return _app_manager_get_external_shared_data_path( - app_id, - path, - ); - } - - late final _app_manager_get_external_shared_data_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer>)>>( - 'app_manager_get_external_shared_data_path'); - late final _app_manager_get_external_shared_data_path = - _app_manager_get_external_shared_data_pathPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Creates a app manager event handle. - /// @since_tizen 3.0 - /// @remarks You must release @a handle using app_manager_event_destroy(). - /// - /// @param[out] handle The app manager event handle that is newly created on success - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see app_manager_event_destroy() - int app_manager_event_create( - ffi.Pointer handle, - ) { - return _app_manager_event_create( - handle, - ); - } - - late final _app_manager_event_createPtr = _lookup< - ffi - .NativeFunction)>>( - 'app_manager_event_create'); - late final _app_manager_event_create = _app_manager_event_createPtr - .asFunction)>(); - - /// @brief Sets the event to handle to listen. - /// You can combine multiple status using OR operation which you want to listen. - /// @since_tizen 3.0 - /// - /// @param [in] handle The app manager event handle - /// @param [in] status_type The status of the application - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_REQUEST_FAILED Internal error - /// - /// @see app_manager_event_status_type_e - /// @see app_manager_set_event_cb() - int app_manager_event_set_status( - app_manager_event_h handle, - int status_type, - ) { - return _app_manager_event_set_status( - handle, - status_type, - ); - } - - late final _app_manager_event_set_statusPtr = _lookup< - ffi.NativeFunction>( - 'app_manager_event_set_status'); - late final _app_manager_event_set_status = _app_manager_event_set_statusPtr - .asFunction(); - - /// @brief Registers a callback function to be invoked when the app is event has occurred. - /// @since_tizen 3.0 - /// @param[in] handle The app manager event handle - /// @param[in] callback The callback function to be registered - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_REQUEST_FAILED Internal error - /// @post app_manager_event_cb() will be invoked. - /// - /// @see app_manager_event_set_status() - /// @see app_manager_event_cb() - /// @see app_manager_unset_event_cb() - int app_manager_set_event_cb( - app_manager_event_h handle, - app_manager_event_cb callback, - ffi.Pointer user_data, - ) { - return _app_manager_set_event_cb( - handle, - callback, - user_data, - ); - } - - late final _app_manager_set_event_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_manager_event_h, app_manager_event_cb, - ffi.Pointer)>>('app_manager_set_event_cb'); - late final _app_manager_set_event_cb = - _app_manager_set_event_cbPtr.asFunction< - int Function(app_manager_event_h, app_manager_event_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen 3.0 - /// - /// @param[in] handle The app manager event handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_REQUEST_FAILED Internal error - /// - /// @see app_manager_event_cb() - /// @see app_manager_set_event_cb() - int app_manager_unset_event_cb( - app_manager_event_h handle, - ) { - return _app_manager_unset_event_cb( - handle, - ); - } - - late final _app_manager_unset_event_cbPtr = - _lookup>( - 'app_manager_unset_event_cb'); - late final _app_manager_unset_event_cb = _app_manager_unset_event_cbPtr - .asFunction(); - - /// @brief Destroys the app manager event handle. - /// @since_tizen 3.0 - /// - /// @param[in] handle The app manager event handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_REQUEST_FAILED Internal error - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see app_manager_event_create() - int app_manager_event_destroy( - app_manager_event_h handle, - ) { - return _app_manager_event_destroy( - handle, - ); - } - - late final _app_manager_event_destroyPtr = - _lookup>( - 'app_manager_event_destroy'); - late final _app_manager_event_destroy = _app_manager_event_destroyPtr - .asFunction(); - - /// @platform - /// @brief Sets the application's icon path into given path. - /// @since_tizen 5.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @remarks The icon file should be included in package which the applications belongs to. - /// @param[in] app_id The ID of the application - /// @param[in] icon_path The path of icon file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #APP_MANAGER_ERROR_NONE Successful - /// @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #APP_MANAGER_ERROR_IO_ERROR Internal error - /// @retval #APP_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// - /// @see app_manager_event_create() - int app_manager_set_app_icon( - ffi.Pointer app_id, - ffi.Pointer icon_path, - ) { - return _app_manager_set_app_icon( - app_id, - icon_path, - ); - } - - late final _app_manager_set_app_iconPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('app_manager_set_app_icon'); - late final _app_manager_set_app_icon = _app_manager_set_app_iconPtr - .asFunction, ffi.Pointer)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif Use badge_add instead. - /// @brief Creates a badge for the application itself. - /// @details Creates new badge to display. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[in] writable_app_id The id of application which is authorized to change the badge - /// @return #BADGE_ERROR_NONE if success, other value if failure - /// @retval #BADGE_ERROR_NONE Success - /// @retval #BADGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BADGE_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #BADGE_ERROR_IO_ERROR Error from I/O - /// @retval #BADGE_ERROR_SERVICE_NOT_READY Service is not ready - /// @retval #BADGE_ERROR_NOT_SUPPORTED Not supported - /// @see #badge_error_e - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int err = BADGE_ERROR_NONE; - /// - /// err = badge_new(app_id); - /// if (err != BADGE_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int badge_new( - ffi.Pointer writable_app_id, - ) { - return _badge_new( - writable_app_id, - ); - } - - late final _badge_newPtr = - _lookup)>>( - 'badge_new'); - late final _badge_new = - _badge_newPtr.asFunction)>(); - - /// @brief Creates a badge for the application specified by the badge_app_id. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @remarks Creating and updating a badge of the other application is allowed only when both applications are signed with the same certificate. - /// @param[in] badge_app_id The id of the application for which the badge will be created. This parameter can be null when creating a badge for itself. - /// @return #BADGE_ERROR_NONE If success, other value if failure - /// @retval #BADGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BADGE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BADGE_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #BADGE_ERROR_IO_ERROR Error from I/O - /// @retval #BADGE_ERROR_FROM_DB Error from DB - /// @retval #BADGE_ERROR_ALREADY_EXIST Already exist - /// @retval #BADGE_ERROR_SERVICE_NOT_READY Service is not ready - /// @retval #BADGE_ERROR_INVALID_PACKAGE The caller application is not signed with the certificate of the badge_app_id - /// @retval #BADGE_ERROR_NOT_SUPPORTED Not supported - /// @see #badge_error_e - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int err = BADGE_ERROR_NONE; - /// - /// err = badge_add("org.tizen.email"); - /// if (err != BADGE_ERROR_NONE) - /// return; - /// } - /// @endcode - int badge_add( - ffi.Pointer badge_app_id, - ) { - return _badge_add( - badge_app_id, - ); - } - - late final _badge_addPtr = - _lookup)>>( - 'badge_add'); - late final _badge_add = - _badge_addPtr.asFunction)>(); - - /// @brief Removes the badge for the designated application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[in] app_id The name of the designated application - /// @return #BADGE_ERROR_NONE if success, other value if failure - /// @retval #BADGE_ERROR_NONE Success - /// @retval #BADGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BADGE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BADGE_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #BADGE_ERROR_IO_ERROR Error from I/O - /// @retval #BADGE_ERROR_FROM_DB Error from DB - /// @retval #BADGE_ERROR_NOT_EXIST Not exist - /// @retval #BADGE_ERROR_SERVICE_NOT_READY Service is not ready - /// @retval #BADGE_ERROR_NOT_SUPPORTED Not supported - /// @see #badge_error_e - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int err = BADGE_ERROR_NONE; - /// - /// err = badge_remove(app_id); - /// if (err != BADGE_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int badge_remove( - ffi.Pointer app_id, - ) { - return _badge_remove( - app_id, - ); - } - - late final _badge_removePtr = - _lookup)>>( - 'badge_remove'); - late final _badge_remove = - _badge_removePtr.asFunction)>(); - - /// @brief Sets badge count for the designated application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[in] app_id The name of the designated application - /// @param[in] count The count of the badge - /// @return #BADGE_ERROR_NONE if success, other value if failure - /// @retval #BADGE_ERROR_NONE Success - /// @retval #BADGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BADGE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BADGE_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #BADGE_ERROR_IO_ERROR Error from I/O - /// @retval #BADGE_ERROR_FROM_DB Error from DB - /// @retval #BADGE_ERROR_NOT_EXIST Not exist - /// @retval #BADGE_ERROR_SERVICE_NOT_READY Service is not ready - /// @retval #BADGE_ERROR_NOT_SUPPORTED Not supported - /// @see #badge_error_e - /// @see badge_add() - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int err = BADGE_ERROR_NONE; - /// - /// err = badge_set_count(app_id, 1); - /// if (err != BADGE_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int badge_set_count( - ffi.Pointer app_id, - int count, - ) { - return _badge_set_count( - app_id, - count, - ); - } - - late final _badge_set_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.UnsignedInt)>>('badge_set_count'); - late final _badge_set_count = _badge_set_countPtr - .asFunction, int)>(); - - /// @brief Gets badge count for the designated application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[in] app_id The name of the designated application - /// @param[out] count The count of the badge - /// @return #BADGE_ERROR_NONE if success, other value if failure - /// @retval #BADGE_ERROR_NONE Success - /// @retval #BADGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BADGE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BADGE_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #BADGE_ERROR_IO_ERROR Error from I/O - /// @retval #BADGE_ERROR_FROM_DB Error from DB - /// @retval #BADGE_ERROR_NOT_EXIST Not exist - /// @retval #BADGE_ERROR_SERVICE_NOT_READY Service is not ready - /// @retval #BADGE_ERROR_NOT_SUPPORTED Not supported - /// @see #badge_error_e - /// @see badge_add() - /// @see badge_set_count() - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int err = BADGE_ERROR_NONE; - /// int count = 0; - /// - /// err = badge_get_count(app_id, &count); - /// if (err != BADGE_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int badge_get_count( - ffi.Pointer app_id, - ffi.Pointer count, - ) { - return _badge_get_count( - app_id, - count, - ); - } - - late final _badge_get_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('badge_get_count'); - late final _badge_get_count = _badge_get_countPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the display option for the designated application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[in] app_id The name of the designated application - /// @param[in] is_display The display option (1 = display, 0 = not display) - /// @return #BADGE_ERROR_NONE if success, other value if failure - /// @retval #BADGE_ERROR_NONE Success - /// @retval #BADGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BADGE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BADGE_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #BADGE_ERROR_IO_ERROR Error from I/O - /// @retval #BADGE_ERROR_FROM_DB Error from DB - /// @retval #BADGE_ERROR_NOT_EXIST Not exist - /// @retval #BADGE_ERROR_SERVICE_NOT_READY Service is not ready - /// @retval #BADGE_ERROR_NOT_SUPPORTED Not supported - /// @see #badge_error_e - /// @see badge_add() - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int err = BADGE_ERROR_NONE; - /// - /// err = badge_set_display(app_id, 1); - /// if (err != BADGE_ERROR_NONE) - /// return; - /// - /// } - /// @endcode - int badge_set_display( - ffi.Pointer app_id, - int is_display, - ) { - return _badge_set_display( - app_id, - is_display, - ); - } - - late final _badge_set_displayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.UnsignedInt)>>('badge_set_display'); - late final _badge_set_display = _badge_set_displayPtr - .asFunction, int)>(); - - /// @brief Gets the display option for the designated application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[in] app_id The name of the designated application - /// @param[out] is_display The display option (1 = display, 0 = not display) - /// @return #BADGE_ERROR_NONE if success, other value if failure - /// @retval #BADGE_ERROR_NONE Success - /// @retval #BADGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BADGE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BADGE_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #BADGE_ERROR_IO_ERROR Error from I/O - /// @retval #BADGE_ERROR_FROM_DB Error from DB - /// @retval #BADGE_ERROR_NOT_EXIST Not exist - /// @retval #BADGE_ERROR_SERVICE_NOT_READY Service is not ready - /// @retval #BADGE_ERROR_NOT_SUPPORTED Not supported - /// @see #badge_error_e - /// @see badge_add() - /// @see badge_set_count() - /// @par Sample code: - /// @code - /// #include - /// - /// { - /// int is_display = 0; - /// int err = BADGE_ERROR_NONE; - /// - /// err = badge_get_display(app_id, &is_display); - /// if (err != BADGE_ERROR_NONE) - /// return; - /// } - /// @endcode - int badge_get_display( - ffi.Pointer app_id, - ffi.Pointer is_display, - ) { - return _badge_get_display( - app_id, - is_display, - ); - } - - late final _badge_get_displayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('badge_get_display'); - late final _badge_get_display = _badge_get_displayPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Retrieves all existing badges. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[in] callback The callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return #BADGE_ERROR_NONE if success, other value if failure - /// @retval #BADGE_ERROR_NONE Success - /// @retval #BADGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BADGE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BADGE_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #BADGE_ERROR_IO_ERROR Error from I/O - /// @retval #BADGE_ERROR_FROM_DB Error form DB - /// @retval #BADGE_ERROR_NOT_EXIST Not exist - /// @retval #BADGE_ERROR_SERVICE_NOT_READY Service is not ready - /// @retval #BADGE_ERROR_NOT_SUPPORTED Not supported - /// @see #badge_error_e - /// @see badge_foreach_cb() - int badge_foreach( - badge_foreach_cb callback, - ffi.Pointer user_data, - ) { - return _badge_foreach( - callback, - user_data, - ); - } - - late final _badge_foreachPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - badge_foreach_cb, ffi.Pointer)>>('badge_foreach'); - late final _badge_foreach = _badge_foreachPtr - .asFunction)>(); - - /// @brief Registers a callback function to receive badge change event. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @remarks Should be used in the homescreen.\n - /// Prospective Clients : Homescreen. - /// @param[in] callback The callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return #BADGE_ERROR_NONE if success, other value if failure - /// @retval #BADGE_ERROR_NONE Success - /// @retval #BADGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BADGE_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #BADGE_ERROR_IO_ERROR Error from I/O - /// @retval #BADGE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BADGE_ERROR_SERVICE_NOT_READY Service is not ready - /// @retval #BADGE_ERROR_NOT_SUPPORTED Not supported - /// @see #badge_error_e - /// @see badge_add() - /// @see badge_remove() - /// @see badge_set_count() - int badge_register_changed_cb( - badge_change_cb callback, - ffi.Pointer user_data, - ) { - return _badge_register_changed_cb( - callback, - user_data, - ); - } - - late final _badge_register_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(badge_change_cb, - ffi.Pointer)>>('badge_register_changed_cb'); - late final _badge_register_changed_cb = _badge_register_changed_cbPtr - .asFunction)>(); - - /// @brief Unregisters a callback function to receive badge change event. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/notification - /// @param[in] callback The callback function - /// @return #BADGE_ERROR_NONE if success, other value if failure - /// @retval #BADGE_ERROR_NONE Success - /// @retval #BADGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BADGE_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #BADGE_ERROR_NOT_EXIST Not exist - /// @retval #BADGE_ERROR_NOT_SUPPORTED Not supported - /// @see #badge_error_e - /// @see badge_register_changed_cb() - int badge_unregister_changed_cb( - badge_change_cb callback, - ) { - return _badge_unregister_changed_cb( - callback, - ); - } - - late final _badge_unregister_changed_cbPtr = - _lookup>( - 'badge_unregister_changed_cb'); - late final _badge_unregister_changed_cb = _badge_unregister_changed_cbPtr - .asFunction(); - - /// @brief Moves the cursor to the first position. - /// @since_tizen 2.3 - /// @remarks The following example demonstrates how to use the %data_control_sql_step_first() method: - /// - /// @code - /// - /// void - /// sql_select_response_cb(int request_id, data_control_h provider, result_set_cursor cursor, - /// bool provider_result, const char *error) - /// { - /// char person_name[32] = {0,}; - /// long long person_number = -1; - /// - /// data_control_sql_step_first(cursor); - /// data_control_sql_get_text_data(cursor, 0, person_name); - /// data_control_sql_get_int64_data(cursor, 1, &person_number); - /// printf("The person %s has the number %l", person_name, person_number); - /// } - /// - /// @endcode - /// - /// @param[in] cursor The cursor that navigates the result of the request for the select operation - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_sql_step_first( - result_set_cursor cursor, - ) { - return _data_control_sql_step_first( - cursor, - ); - } - - late final _data_control_sql_step_firstPtr = - _lookup>( - 'data_control_sql_step_first'); - late final _data_control_sql_step_first = _data_control_sql_step_firstPtr - .asFunction(); - - /// @brief Moves the cursor to the last position. - /// @since_tizen 2.3 - /// @remarks The following example demonstrates how to use the %data_control_sql_step_last() method: - /// - /// @code - /// - /// void - /// sql_select_response_cb(int request_id, data_control_h provider, result_set_cursor cursor, - /// bool provider_result, const char *error) - /// { - /// char person_name[32] = {0,}; - /// long long person_number = -1; - /// - /// data_control_sql_step_last(cursor); - /// data_control_sql_get_text_data(cursor, 0, person_name); - /// data_control_sql_get_int64_data(cursor, 1, &person_number); - /// printf("The person %s has the number %l", person_name, person_number); - /// } - /// - /// @endcode - /// - /// @param[in] cursor The cursor that navigates the result of data control select request - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_sql_step_last( - result_set_cursor cursor, - ) { - return _data_control_sql_step_last( - cursor, - ); - } - - late final _data_control_sql_step_lastPtr = - _lookup>( - 'data_control_sql_step_last'); - late final _data_control_sql_step_last = _data_control_sql_step_lastPtr - .asFunction(); - - /// @brief Moves the cursor to the next position. - /// @since_tizen 2.3 - /// @remarks The following example demonstrates how to use the %data_control_sql_step_next() method: - /// - /// @code - /// - /// void - /// sql_select_response_cb(int request_id, data_control_h provider, result_set_cursor cursor, - /// bool provider_result, const char *error) - /// { - /// char person_name[32] = {0,}; - /// long long person_number = -1; - /// while (data_control_sql_step_next(cursor) == DATA_CONTROL_ERROR_NONE) { - /// data_control_sql_get_text_data(cursor, 0, person_name); - /// data_control_sql_get_int64_data(cursor, 1, &person_number); - /// printf("The person %s has the number %l", person_name, person_number); - /// } - /// } - /// - /// @endcode - /// - /// @param[in] cursor The cursor that navigates the result of the request for the select operation - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_sql_step_next( - result_set_cursor cursor, - ) { - return _data_control_sql_step_next( - cursor, - ); - } - - late final _data_control_sql_step_nextPtr = - _lookup>( - 'data_control_sql_step_next'); - late final _data_control_sql_step_next = _data_control_sql_step_nextPtr - .asFunction(); - - /// @brief Moves the cursor to the previous position. - /// @since_tizen 2.3 - /// @param[in] cursor The cursor that navigates the result of the request for the select operation - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_sql_step_previous( - result_set_cursor cursor, - ) { - return _data_control_sql_step_previous( - cursor, - ); - } - - late final _data_control_sql_step_previousPtr = - _lookup>( - 'data_control_sql_step_previous'); - late final _data_control_sql_step_previous = - _data_control_sql_step_previousPtr - .asFunction(); - - /// @brief Gets the number of columns for this cursor. - /// @since_tizen 2.3 - /// @param[in] cursor The cursor that navigates the result of the request for the select operation - /// @return The number of columns in the calling cursor - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_sql_get_column_count( - result_set_cursor cursor, - ) { - return _data_control_sql_get_column_count( - cursor, - ); - } - - late final _data_control_sql_get_column_countPtr = - _lookup>( - 'data_control_sql_get_column_count'); - late final _data_control_sql_get_column_count = - _data_control_sql_get_column_countPtr - .asFunction(); - - /// @brief Gets the name of the column indicated by the specified index. - /// @since_tizen 2.3 - /// @param[in] cursor The cursor that navigates the result of the request for the select operation - /// @param[in] column_index The index of the destination column - /// @param[out] name The name of the destination column. You should provide a buffer for the column name. The limit of column name length is 4096 bytes - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_sql_get_column_name( - result_set_cursor cursor, - int column_index, - ffi.Pointer name, - ) { - return _data_control_sql_get_column_name( - cursor, - column_index, - name, - ); - } - - late final _data_control_sql_get_column_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(result_set_cursor, ffi.Int, - ffi.Pointer)>>('data_control_sql_get_column_name'); - late final _data_control_sql_get_column_name = - _data_control_sql_get_column_namePtr.asFunction< - int Function(result_set_cursor, int, ffi.Pointer)>(); - - /// @brief Gets the size of the data in the column indicated by the specified index. - /// @since_tizen 2.3 - /// @param[in] cursor The cursor that navigates the result of the request for the select operation - /// @param[in] column_index The index of the destination column - /// @return The size of data in the column indicated by the specified index \n - /// If an error is occurred, then a negative value is returned - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_sql_get_column_item_size( - result_set_cursor cursor, - int column_index, - ) { - return _data_control_sql_get_column_item_size( - cursor, - column_index, - ); - } - - late final _data_control_sql_get_column_item_sizePtr = - _lookup>( - 'data_control_sql_get_column_item_size'); - late final _data_control_sql_get_column_item_size = - _data_control_sql_get_column_item_sizePtr - .asFunction(); - - /// @brief Gets the type of the column indicated by the specified index. - /// @since_tizen 2.3 - /// @param[in] cursor The cursor that navigates the result of the request for the select operation - /// @param[in] column_index The index of the destination column - /// @param[out] type The type of the destination column - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_sql_get_column_item_type( - result_set_cursor cursor, - int column_index, - ffi.Pointer type, - ) { - return _data_control_sql_get_column_item_type( - cursor, - column_index, - type, - ); - } - - late final _data_control_sql_get_column_item_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - result_set_cursor, ffi.Int, ffi.Pointer)>>( - 'data_control_sql_get_column_item_type'); - late final _data_control_sql_get_column_item_type = - _data_control_sql_get_column_item_typePtr.asFunction< - int Function(result_set_cursor, int, ffi.Pointer)>(); - - /// @brief Gets a blob data from the column indicated by the specified index. - /// @since_tizen 2.3 - /// @param[in] cursor The cursor that navigates the result of the request for the select operation - /// @param[in] column_index The index of the destination column - /// @param[out] data The blob value obtained from the column - /// @param[out] size The size of the data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_sql_get_blob_data( - result_set_cursor cursor, - int column_index, - ffi.Pointer data, - int size, - ) { - return _data_control_sql_get_blob_data( - cursor, - column_index, - data, - size, - ); - } - - late final _data_control_sql_get_blob_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(result_set_cursor, ffi.Int, ffi.Pointer, - ffi.Int)>>('data_control_sql_get_blob_data'); - late final _data_control_sql_get_blob_data = - _data_control_sql_get_blob_dataPtr.asFunction< - int Function(result_set_cursor, int, ffi.Pointer, int)>(); - - /// @brief Gets an int value from the column indicated by the specified index. - /// @since_tizen 2.3 - /// @param[in] cursor The cursor that navigates the result of the request for the select operation - /// @param[in] column_index The index of the destination column - /// @param[out] data The integer value obtained from the column - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_sql_get_int_data( - result_set_cursor cursor, - int column_index, - ffi.Pointer data, - ) { - return _data_control_sql_get_int_data( - cursor, - column_index, - data, - ); - } - - late final _data_control_sql_get_int_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(result_set_cursor, ffi.Int, - ffi.Pointer)>>('data_control_sql_get_int_data'); - late final _data_control_sql_get_int_data = _data_control_sql_get_int_dataPtr - .asFunction)>(); - - /// @brief Gets a long long value from the column indicated by the specified index. - /// @since_tizen 2.3 - /// @param[in] cursor The cursor that navigates the result of the request for the select operation - /// @param[in] column_index The index of the destination column - /// @param[out] data The 64-bit integer value obtained from the column - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_sql_get_int64_data( - result_set_cursor cursor, - int column_index, - ffi.Pointer data, - ) { - return _data_control_sql_get_int64_data( - cursor, - column_index, - data, - ); - } - - late final _data_control_sql_get_int64_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(result_set_cursor, ffi.Int, - ffi.Pointer)>>('data_control_sql_get_int64_data'); - late final _data_control_sql_get_int64_data = - _data_control_sql_get_int64_dataPtr.asFunction< - int Function(result_set_cursor, int, ffi.Pointer)>(); - - /// @brief Gets a double value from the column indicated by the specified index. - /// @since_tizen 2.3 - /// @param[in] cursor The cursor that navigates the result of the request for the select operation - /// @param[in] column_index The index of the destination column - /// @param[out] data The value obtained from the column as double - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_sql_get_double_data( - result_set_cursor cursor, - int column_index, - ffi.Pointer data, - ) { - return _data_control_sql_get_double_data( - cursor, - column_index, - data, - ); - } - - late final _data_control_sql_get_double_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(result_set_cursor, ffi.Int, - ffi.Pointer)>>('data_control_sql_get_double_data'); - late final _data_control_sql_get_double_data = - _data_control_sql_get_double_dataPtr.asFunction< - int Function(result_set_cursor, int, ffi.Pointer)>(); - - /// @brief Gets a text value from the column indicated by the specified index. - /// @since_tizen 2.3 - /// @param[in] cursor The cursor that navigates the result of the request for the select operation - /// @param[in] column_index The index of the destination column - /// @param[out] data The value obtained from the column as text. You should provide a buffer for the data. You can get the size of data via data_control_sql_get_column_item_size() - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - int data_control_sql_get_text_data( - result_set_cursor cursor, - int column_index, - ffi.Pointer data, - ) { - return _data_control_sql_get_text_data( - cursor, - column_index, - data, - ); - } - - late final _data_control_sql_get_text_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(result_set_cursor, ffi.Int, - ffi.Pointer)>>('data_control_sql_get_text_data'); - late final _data_control_sql_get_text_data = - _data_control_sql_get_text_dataPtr.asFunction< - int Function(result_set_cursor, int, ffi.Pointer)>(); - - /// @brief Gets the n-th bundle from bulk data. - /// @since_tizen 3.0 - /// @remarks The @a data should not be released. \n - /// It will be released when data_control_bulk_data_destroy() is called. - /// @param[in] bulk_data The bulk data handle - /// @param[in] idx The bundle index. Index starts at 0 - /// @param[out] data The n-th bundle. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_bulk_data_add() - /// @see data_control_bulk_data_destroy() - int data_control_bulk_data_get_data( - data_control_bulk_data_h bulk_data, - int idx, - ffi.Pointer> data, - ) { - return _data_control_bulk_data_get_data( - bulk_data, - idx, - data, - ); - } - - late final _data_control_bulk_data_get_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_bulk_data_h, ffi.Int, - ffi.Pointer>)>>( - 'data_control_bulk_data_get_data'); - late final _data_control_bulk_data_get_data = - _data_control_bulk_data_get_dataPtr.asFunction< - int Function(data_control_bulk_data_h, int, - ffi.Pointer>)>(); - - /// @brief Gets the bulk data bundle count. - /// @since_tizen 3.0 - /// @param[in] bulk_data The bulk data handle - /// @param[out] count The bundle count - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_bulk_data_get_count( - data_control_bulk_data_h bulk_data, - ffi.Pointer count, - ) { - return _data_control_bulk_data_get_count( - bulk_data, - count, - ); - } - - late final _data_control_bulk_data_get_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_bulk_data_h, - ffi.Pointer)>>('data_control_bulk_data_get_count'); - late final _data_control_bulk_data_get_count = - _data_control_bulk_data_get_countPtr.asFunction< - int Function(data_control_bulk_data_h, ffi.Pointer)>(); - - /// @brief Adds a bundle to bulk data. - /// @since_tizen 3.0 - /// @remarks The order in which bundles are added is preserved. Bundle indexes start from 0. - /// @param[in] bulk_data The bulk data handle - /// @param[in] data The bundle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_bulk_data_add( - data_control_bulk_data_h bulk_data, - ffi.Pointer data, - ) { - return _data_control_bulk_data_add( - bulk_data, - data, - ); - } - - late final _data_control_bulk_data_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_bulk_data_h, - ffi.Pointer)>>('data_control_bulk_data_add'); - late final _data_control_bulk_data_add = - _data_control_bulk_data_addPtr.asFunction< - int Function(data_control_bulk_data_h, ffi.Pointer)>(); - - /// @brief Creates bulk data. - /// @since_tizen 3.0 - /// @remarks The @a bulk_data should be released using data_control_bulk_data_destroy(). - /// @param[out] bulk_data The bulk data handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_bulk_data_create( - ffi.Pointer bulk_data, - ) { - return _data_control_bulk_data_create( - bulk_data, - ); - } - - late final _data_control_bulk_data_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'data_control_bulk_data_create'); - late final _data_control_bulk_data_create = _data_control_bulk_data_createPtr - .asFunction)>(); - - /// @brief Destroys bulk data. - /// @since_tizen 3.0 - /// @param[in] bulk_data The bulk data handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_bulk_data_destroy( - data_control_bulk_data_h bulk_data, - ) { - return _data_control_bulk_data_destroy( - bulk_data, - ); - } - - late final _data_control_bulk_data_destroyPtr = - _lookup>( - 'data_control_bulk_data_destroy'); - late final _data_control_bulk_data_destroy = - _data_control_bulk_data_destroyPtr - .asFunction(); - - /// @brief Gets the n-th bundle from bulk result data. - /// @since_tizen 3.0 - /// @remarks The @a data should not be released. \n - /// It will be released when data_control_bulk_result_data_destroy() is called. - /// @param[in] result_data The bulk result data handle - /// @param[in] idx The bundle index. Index starts at 0 - /// @param[out] data The n-th bundle - /// @param[out] result Bulk operation result. Possible values and their meaning are defined by the developer. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_bulk_result_data_add() - /// @see data_control_bulk_result_data_destroy() - int data_control_bulk_result_data_get_result_data( - data_control_bulk_result_data_h result_data, - int idx, - ffi.Pointer> data, - ffi.Pointer result, - ) { - return _data_control_bulk_result_data_get_result_data( - result_data, - idx, - data, - result, - ); - } - - late final _data_control_bulk_result_data_get_result_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_bulk_result_data_h, ffi.Int, - ffi.Pointer>, ffi.Pointer)>>( - 'data_control_bulk_result_data_get_result_data'); - late final _data_control_bulk_result_data_get_result_data = - _data_control_bulk_result_data_get_result_dataPtr.asFunction< - int Function(data_control_bulk_result_data_h, int, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Gets the bulk result data bundle count. - /// @since_tizen 3.0 - /// @param[in] result_data The bulk result data handle - /// @param[out] count The bundle count - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_bulk_result_data_get_count( - data_control_bulk_result_data_h result_data, - ffi.Pointer count, - ) { - return _data_control_bulk_result_data_get_count( - result_data, - count, - ); - } - - late final _data_control_bulk_result_data_get_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_bulk_result_data_h, ffi.Pointer)>>( - 'data_control_bulk_result_data_get_count'); - late final _data_control_bulk_result_data_get_count = - _data_control_bulk_result_data_get_countPtr.asFunction< - int Function( - data_control_bulk_result_data_h, ffi.Pointer)>(); - - /// @brief Adds bulk data - /// @since_tizen 3.0 - /// @remarks The order in which bundles are added is preserved. Bundle indexes start from 0. - /// @param[in] result_data The bulk result data handle - /// @param[in] data The bundle - /// @param[in] result Bulk operation result. Possible values and their meaning are defined by the developer. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_bulk_result_data_get_result_data() - int data_control_bulk_result_data_add( - data_control_bulk_result_data_h result_data, - ffi.Pointer data, - int result, - ) { - return _data_control_bulk_result_data_add( - result_data, - data, - result, - ); - } - - late final _data_control_bulk_result_data_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_bulk_result_data_h, ffi.Pointer, - ffi.Int)>>('data_control_bulk_result_data_add'); - late final _data_control_bulk_result_data_add = - _data_control_bulk_result_data_addPtr.asFunction< - int Function( - data_control_bulk_result_data_h, ffi.Pointer, int)>(); - - /// @brief Creates bulk result data. - /// @since_tizen 3.0 - /// @remarks The @a result_data should be released using data_control_bulk_result_data_destroy(). - /// @param[out] result_data The bulk result data handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_bulk_result_data_create( - ffi.Pointer result_data, - ) { - return _data_control_bulk_result_data_create( - result_data, - ); - } - - late final _data_control_bulk_result_data_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'data_control_bulk_result_data_create'); - late final _data_control_bulk_result_data_create = - _data_control_bulk_result_data_createPtr.asFunction< - int Function(ffi.Pointer)>(); - - /// @brief Destroys bulk result data. - /// @since_tizen 3.0 - /// @param[in] result_data The bulk result data handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_bulk_result_data_destroy( - data_control_bulk_result_data_h result_data, - ) { - return _data_control_bulk_result_data_destroy( - result_data, - ); - } - - late final _data_control_bulk_result_data_destroyPtr = _lookup< - ffi - .NativeFunction>( - 'data_control_bulk_result_data_destroy'); - late final _data_control_bulk_result_data_destroy = - _data_control_bulk_result_data_destroyPtr - .asFunction(); - - /// @brief Creates a provider handle. - /// @since_tizen 2.3 - /// - /// @remarks @a provider should be destroyed with data_control_sql_destroy(). - /// The following example demonstrates how to use the %data_control_sql_create() method: - /// - /// @code - /// - /// { - /// const char *provider_id = "http://tizen.org/datacontrol/provider/example"; - /// const char *data_id = "table"; - /// data_control_h provider; - /// int result = 0; - /// - /// result = data_control_sql_create(&provider); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Creating data control provider is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// result = data_control_sql_set_provider_id(provider, provider_id); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Setting providerID is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// result = data_control_sql_set_data_id(provider, data_id); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Setting dataID is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// // Executes some operations - /// - /// result = data_control_sql_destroy(provider); - /// if (result != DATA_CONTROL_ERROR_NONE) - /// LOGE("Destroying data control provider is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// @endcode - /// - /// @param[out] provider The provider handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see data_control_sql_destroy() - int data_control_sql_create( - ffi.Pointer provider, - ) { - return _data_control_sql_create( - provider, - ); - } - - late final _data_control_sql_createPtr = _lookup< - ffi.NativeFunction)>>( - 'data_control_sql_create'); - late final _data_control_sql_create = _data_control_sql_createPtr - .asFunction)>(); - - /// @brief Destroys the provider handle and releases all its resources. - /// @since_tizen 2.3 - /// - /// @remarks When operations of data control are finished, this function must be called to prevent the memory leak. - /// - /// @param[in] provider The provider handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_sql_create() - int data_control_sql_destroy( - data_control_h provider, - ) { - return _data_control_sql_destroy( - provider, - ); - } - - late final _data_control_sql_destroyPtr = - _lookup>( - 'data_control_sql_destroy'); - late final _data_control_sql_destroy = - _data_control_sql_destroyPtr.asFunction(); - - /// @brief Sets the Provider ID. - /// @since_tizen 2.3 - /// - /// @param[in] provider The provider handle - /// @param[in] provider_id The data control provider ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see data_control_sql_get_provider_id() - int data_control_sql_set_provider_id( - data_control_h provider, - ffi.Pointer provider_id, - ) { - return _data_control_sql_set_provider_id( - provider, - provider_id, - ); - } - - late final _data_control_sql_set_provider_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, - ffi.Pointer)>>('data_control_sql_set_provider_id'); - late final _data_control_sql_set_provider_id = - _data_control_sql_set_provider_idPtr - .asFunction)>(); - - /// @brief Gets the Provider ID. - /// @since_tizen 2.3 - /// - /// @remarks You must release @a provider_id using free() after it is used. - /// - /// @param[in] provider The provider handle - /// @param[out] provider_id The data control provider ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see data_control_sql_set_provider_id() - int data_control_sql_get_provider_id( - data_control_h provider, - ffi.Pointer> provider_id, - ) { - return _data_control_sql_get_provider_id( - provider, - provider_id, - ); - } - - late final _data_control_sql_get_provider_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, ffi.Pointer>)>>( - 'data_control_sql_get_provider_id'); - late final _data_control_sql_get_provider_id = - _data_control_sql_get_provider_idPtr.asFunction< - int Function(data_control_h, ffi.Pointer>)>(); - - /// @brief Sets the data ID. - /// @since_tizen 2.3 - /// - /// @param[in] provider The provider handle - /// @param[in] data_id A string for identifying a specific table to operate \n - /// The string consists of one or more components separated by a slash('/') - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see data_control_sql_get_data_id() - /// - /// @code - /// - /// { - /// bundle *b; - /// int ret; - /// - /// // Insert data to Note table - /// ret = data_control_sql_set_data_id(ad->provider_h, "Note"); - /// if (ret != DATA_CONTROL_ERROR_NONE) - /// dlog_print(DLOG_ERROR, LOG_TAG, "setting data id failed with error: %d", ret); - /// - /// b = bundle_create(); - /// bundle_add_str(b, ""TITLE"", "test"); - /// bundle_add_str(b, "CONTENTS", "test contents"); - /// data_control_sql_insert(ad->provider_h, b, &req_id); - /// bundle_free(b); - /// - /// // Insert data to Dictionary table - /// ret = data_control_sql_set_data_id(ad->provider_h, "Dictionary"); - /// if (ret != DATA_CONTROL_ERROR_NONE) - /// dlog_print(DLOG_ERROR, LOG_TAG, "setting data id failed with error: %d", ret); - /// - /// b = bundle_create(); - /// bundle_add_str(b, "WORD", "test"); - /// bundle_add_str(b, "WORD_DESC", "test desc"); - /// data_control_sql_insert(ad->provider_h, b, &req_id); - /// bundle_free(b); - /// } - /// - /// @endcode - int data_control_sql_set_data_id( - data_control_h provider, - ffi.Pointer data_id, - ) { - return _data_control_sql_set_data_id( - provider, - data_id, - ); - } - - late final _data_control_sql_set_data_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, - ffi.Pointer)>>('data_control_sql_set_data_id'); - late final _data_control_sql_set_data_id = _data_control_sql_set_data_idPtr - .asFunction)>(); - - /// @brief Gets the data ID. - /// @since_tizen 2.3 - /// - /// @remarks You must release @a data_id using free() after it is used. - /// - /// @param[in] provider The provider handle - /// @param[out] data_id A string for identifying a specific table to operate \n - /// The string consists of one or more components separated by a slash('/') - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see data_control_sql_set_data_id() - int data_control_sql_get_data_id( - data_control_h provider, - ffi.Pointer> data_id, - ) { - return _data_control_sql_get_data_id( - provider, - data_id, - ); - } - - late final _data_control_sql_get_data_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, ffi.Pointer>)>>( - 'data_control_sql_get_data_id'); - late final _data_control_sql_get_data_id = - _data_control_sql_get_data_idPtr.asFunction< - int Function(data_control_h, ffi.Pointer>)>(); - - /// @brief Registers a callback function for the SQL data control response. - /// @since_tizen 2.3 - /// - /// @remarks The application is notified when a data control response is received from the @a provider. - /// @remarks Only one callback can be registered for each provider id with this API. - /// @remarks If you register multiple callback for same provider id, it will be overwritten by latest one. - /// - /// - /// @param[in] provider The provider handle - /// @param[in] callback The callback function to be called when a response is received - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see data_control_sql_unregister_response_cb() - /// @see data_control_sql_bind_response_cb() - int data_control_sql_register_response_cb( - data_control_h provider, - ffi.Pointer callback, - ffi.Pointer user_data, - ) { - return _data_control_sql_register_response_cb( - provider, - callback, - user_data, - ); - } - - late final _data_control_sql_register_response_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, - ffi.Pointer, - ffi.Pointer)>>('data_control_sql_register_response_cb'); - late final _data_control_sql_register_response_cb = - _data_control_sql_register_response_cbPtr.asFunction< - int Function( - data_control_h, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function in the @a provider. - /// @since_tizen 2.3 - /// - /// @param[in] provider The provider handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see data_control_sql_register_response_cb() - int data_control_sql_unregister_response_cb( - data_control_h provider, - ) { - return _data_control_sql_unregister_response_cb( - provider, - ); - } - - late final _data_control_sql_unregister_response_cbPtr = - _lookup>( - 'data_control_sql_unregister_response_cb'); - late final _data_control_sql_unregister_response_cb = - _data_control_sql_unregister_response_cbPtr - .asFunction(); - - /// @brief Deletes rows of a table owned by the SQL-type data control provider. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// - /// @remarks If you want to use this api, you must add privileges. - /// @remarks If the value is a string, then the value must be wrapped in single quotes, else it does not need to be wrapped in single quotes. - /// @remarks The following example demonstrates how to use the %data_control_sql_delete() method: - /// - /// @code - /// - /// void - /// sql_delete_response_cb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data) - /// { - /// if (provider_result) - /// LOGI(The delete operation is successful"); - /// else - /// LOGI("The delete operation for the request %d is failed. error message: %s", request_id, error); - /// } - /// - /// data_control_sql_response_cb sql_callback; - /// - /// { - /// const char *where = "group = 'friend'"; - /// int result = 0; - /// int req_id = 0; - /// - /// sql_callback.delete_cb = sql_delete_response_cb; - /// result = data_control_sql_register_response_cb(provider, &sql_callback, void *user_data); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Registering the callback function is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// result = data_control_sql_delete(provider, where, &req_id); - /// if (result != DATA_CONTROL_ERROR_NONE) - /// LOGE("Deleting is failed with error: %d", result); - /// else - /// LOGI("req_id is %d", req_id); - /// - /// return result; - /// } - /// - /// @endcode - /// - /// @param[in] provider The provider handle - /// @param[in] where A filter to select the desired rows to delete \n - /// It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue - /// @param[out] request_id The request ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - int data_control_sql_delete( - data_control_h provider, - ffi.Pointer where, - ffi.Pointer request_id, - ) { - return _data_control_sql_delete( - provider, - where, - request_id, - ); - } - - late final _data_control_sql_deletePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, ffi.Pointer, - ffi.Pointer)>>('data_control_sql_delete'); - late final _data_control_sql_delete = _data_control_sql_deletePtr.asFunction< - int Function( - data_control_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Inserts new rows in a table owned by the SQL-type data control provider. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// - /// @remarks If you want to use this api, you must add privileges. - /// @remarks The following example demonstrates how to use the %data_control_sql_insert() method: - /// - /// @code - /// - /// void - /// sql_insert_response_cb(int request_id, data_control_h provider, long long inserted_row_id, - /// bool provider_result, const char *error, void *user_data) - /// { - /// if (provider_result) - /// LOGI("The insert operation is successful"); - /// else - /// LOGI("The insert operation for the request %d is failed. error message: %s", request_id, error); - /// } - /// - /// data_control_sql_response_cb sql_callback; - /// - /// { - /// int result = 0; - /// int req_id = 0; - /// bundle *b = NULL; - /// - /// sql_callback.insert_cb = sql_insert_response_cb; - /// result = data_control_sql_register_response_cb(provider, &sql_callback, void *user_data); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Registering the callback function is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// b = bundle_create(); - /// bundle_add(b, "WORD", "test"); - /// bundle_add(b, "WORD_DESC", "test description"); - /// - /// result = data_control_sql_insert(provider, b, &req_id); - /// if (result != DATA_CONTROL_ERROR_NONE) - /// LOGE("Inserting is failed with error: %d", result); - /// else - /// LOGI("req_id is %d", req_id); - /// - /// bundle_free(b); - /// - /// return result; - /// } - /// - /// @endcode - /// - /// @param[in] provider The provider handle - /// @param[in] insert_data The column-value pairs to insert \n - /// If the value is a string, then the value must be wrapped in single quotes, - /// else it does not need to be wrapped in single quotes - /// @param[out] request_id The request ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument - int data_control_sql_insert( - data_control_h provider, - ffi.Pointer insert_data, - ffi.Pointer request_id, - ) { - return _data_control_sql_insert( - provider, - insert_data, - request_id, - ); - } - - late final _data_control_sql_insertPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, ffi.Pointer, - ffi.Pointer)>>('data_control_sql_insert'); - late final _data_control_sql_insert = _data_control_sql_insertPtr.asFunction< - int Function( - data_control_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Selects the specified columns to be queried. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// - /// @remarks If you want to use this api, you must add privileges. - /// @remarks The following example demonstrates how to use the %data_control_sql_select() method: - /// - /// @code - /// - /// void - /// sql_select_response_cb(int request_id, data_control_h provider, result_set_cursor *enumerator, - /// bool provider_result, const char *error, void *user_data) - /// { - /// if (provider_result) - /// LOGI("The select operation is successful"); - /// else - /// LOGI("The select operation for the request %d is failed. error message: %s", request_id, error); - /// } - /// - /// data_control_sql_response_cb sql_callback; - /// - /// { - /// int result = 0; - /// int req_id = 0; - /// char *column_list[2]; - /// column_list[0] = "WORD"; - /// column_list[1] = "WORD_DESC"; - /// const char *where = "WORD = 'test'"; - /// const char *order = "WORD ASC"; - /// - /// sql_callback.select_cb = sql_select_response_cb; - /// result = data_control_sql_register_response_cb(provider, &sql_callback, void *user_data); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Registering the callback function is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// result = data_control_sql_select(provider, column_list, 2, where, order, &req_id); - /// if (result != DATA_CONTROL_ERROR_NONE) - /// LOGE("Selecting is failed with error: %d", result); - /// else - /// LOGI("req_id is %d", req_id); - /// - /// return result; - /// } - /// - /// @endcode - /// - /// - /// @param[in] provider The provider handle - /// @param[in] column_list The column list to query - /// @param[in] column_count The total number of columns to be queried - /// @param[in] where A filter to select the desired rows \n - /// It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue - /// @param[in] order The sorting order of the rows to query \n - /// It is an SQL 'ORDER BY' clause excluding the 'ORDER BY' itself. - /// @param[out] request_id The request ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - int data_control_sql_select( - data_control_h provider, - ffi.Pointer> column_list, - int column_count, - ffi.Pointer where, - ffi.Pointer order, - ffi.Pointer request_id, - ) { - return _data_control_sql_select( - provider, - column_list, - column_count, - where, - order, - request_id, - ); - } - - late final _data_control_sql_selectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, - ffi.Pointer>, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('data_control_sql_select'); - late final _data_control_sql_select = _data_control_sql_selectPtr.asFunction< - int Function( - data_control_h, - ffi.Pointer>, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Selects the specified columns to be queried, with partition into pages. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// - /// @remarks If you want to use this api, you must add privileges. - /// - /// @param[in] provider The provider handle - /// @param[in] column_list The column list to query - /// @param[in] column_count The total number of columns to be queried - /// @param[in] where A filter to select the desired rows \n - /// It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue - /// @param[in] order The sorting order of the rows to query \n - /// It is an SQL 'ORDER BY' clause excluding the 'ORDER BY' itself - /// @param[in] page_number The page number of the result set \n - /// It starts from @c 1 - /// @param[in] count_per_page The desired maximum count of rows on a page - /// @param[out] request_id The request ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - /// @see data_control_sql_select() - int data_control_sql_select_with_page( - data_control_h provider, - ffi.Pointer> column_list, - int column_count, - ffi.Pointer where, - ffi.Pointer order, - int page_number, - int count_per_page, - ffi.Pointer request_id, - ) { - return _data_control_sql_select_with_page( - provider, - column_list, - column_count, - where, - order, - page_number, - count_per_page, - request_id, - ); - } - - late final _data_control_sql_select_with_pagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, - ffi.Pointer>, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Pointer)>>('data_control_sql_select_with_page'); - late final _data_control_sql_select_with_page = - _data_control_sql_select_with_pagePtr.asFunction< - int Function( - data_control_h, - ffi.Pointer>, - int, - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer)>(); - - /// @brief Updates values of a table owned by the SQL-type data control provider. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// - /// @remarks If you want to use this api, you must add privileges. - /// @remarks The following example demonstrates how to use the %data_control_sql_update() method: - /// - /// @code - /// - /// void - /// sql_update_response_cb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data) - /// { - /// if (provider_result) - /// LOGI("The update operation is successful"); - /// else - /// LOGI("The update operation for the request %d is failed. error message: %s", request_id, error); - /// } - /// - /// data_control_sql_response_cb sql_callback; - /// - /// { - /// int result = 0; - /// int req_id = 0; - /// const char *where = "WORD = 'test'"; - /// bundle *b = NULL; - /// - /// sql_callback.update_cb = sql_update_response_cb; - /// result = data_control_sql_register_response_cb(provider, &sql_callback, void *user_data); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Registering the callback function is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// b = bundle_create(); - /// bundle_add(b, "WORD", "test_new"); - /// - /// result = data_control_sql_update(provider, b, where, &req_id); - /// if (result != DATA_CONTROL_ERROR_NONE) - /// LOGE("Updating is failed with error: %d", result); - /// else - /// LOGI("req_id is %d", req_id); - /// - /// bundle_free(b); - /// - /// return result; - /// } - /// - /// @endcode - /// - /// - /// @param[in] provider The provider handle - /// @param[in] update_data The column-value pairs to update \n - /// If the value is a string, the value must be wrapped in single quotes, - /// else it does not need to be wrapped in single quotes - /// @param[in] where A filter to select the desired rows to update \n - /// It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue - /// @param[out] request_id The request ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument - int data_control_sql_update( - data_control_h provider, - ffi.Pointer update_data, - ffi.Pointer where, - ffi.Pointer request_id, - ) { - return _data_control_sql_update( - provider, - update_data, - where, - request_id, - ); - } - - late final _data_control_sql_updatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('data_control_sql_update'); - late final _data_control_sql_update = _data_control_sql_updatePtr.asFunction< - int Function(data_control_h, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Inserts multiple rows in one request. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// - /// @remarks If you want to use this function, you must add privileges. - /// @remarks The following example demonstrates how to use the %data_control_sql_insert_bulk_data() method: - /// - /// @code - /// - /// void - /// sql_bulk_insert_response_cb(int request_id, data_control_h provider, data_control_bulk_result_data_h bulk_results, - /// bool provider_result, const char *error, void *user_data) - /// { - /// if (provider_result) - /// LOGI("The bulk insert operation is successful"); - /// else - /// LOGI("The bulk insert operation for the request %d is failed. error message: %s", request_id, error); - /// } - /// - /// data_control_sql_response_cb sql_callback; - /// - /// { - /// data_control_bulk_data_h bulk_data; - /// int req_id; - /// bundle *b1; - /// bundle *b2; - /// int result = 0; - /// int req_id = 0; - /// int bulk_count = 0; - /// - /// result = data_control_sql_register_insert_bulk_data_response_cb(provider, sql_bulk_insert_response_cb, user_data); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Registering the callback function is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// b1 = bundle_create(); - /// bundle_add_str(b1, "WORD", "'test'"); - /// bundle_add_str(b1, "WORD_DESC", "'test description'"); - /// b2 = bundle_create(); - /// bundle_add_str(b2, "WORD", "'test2'"); - /// bundle_add_str(b2, "WORD_DESC", "'test2 description'"); - /// - /// data_control_bulk_data_create(&bulk_data); - /// data_control_bulk_data_add(bulk_data, b1); - /// data_control_bulk_data_add(bulk_data, b2); - /// data_control_bulk_data_get_count(bulk_data, &bulk_count); - /// - /// dlog_print(DLOG_INFO, LOG_TAG, "bulk insert count %d ", bulk_count); - /// - /// data_control_sql_insert_bulk_data(provider, bulk_data, &req_id); - /// data_control_bulk_data_destroy(bulk_data); - /// - /// bundle_free(b1); - /// bundle_free(b2); - /// - /// return result; - /// } - /// - /// @endcode - /// - /// @param[in] provider The provider handle - /// @param[in] bulk_data The bulk data handle - /// @param[out] request_id The request ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument - int data_control_sql_insert_bulk_data( - data_control_h provider, - data_control_bulk_data_h bulk_data, - ffi.Pointer request_id, - ) { - return _data_control_sql_insert_bulk_data( - provider, - bulk_data, - request_id, - ); - } - - late final _data_control_sql_insert_bulk_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, data_control_bulk_data_h, - ffi.Pointer)>>('data_control_sql_insert_bulk_data'); - late final _data_control_sql_insert_bulk_data = - _data_control_sql_insert_bulk_dataPtr.asFunction< - int Function(data_control_h, data_control_bulk_data_h, - ffi.Pointer)>(); - - /// @brief Registers an insert bulk data callback for the SQL data control response. - /// The application is notified when a data control response is - /// received from the @a provider. - /// @since_tizen 3.0 - /// - /// @remarks Only one callback can be registered for each provider id with this - /// function. If you call this function multiple times for the same - /// provider id, any previously set callback will be overwritten. - /// - /// @param[in] provider The provider handle - /// @param[in] callback The callback function to be called when a response is received - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see data_control_sql_unregister_insert_bulk_data_response_cb() - /// @see data_control_sql_bind_insert_bulk_data_response_cb() - int data_control_sql_register_insert_bulk_data_response_cb( - data_control_h provider, - data_control_bulk_cb callback, - ffi.Pointer user_data, - ) { - return _data_control_sql_register_insert_bulk_data_response_cb( - provider, - callback, - user_data, - ); - } - - late final _data_control_sql_register_insert_bulk_data_response_cbPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, data_control_bulk_cb, - ffi.Pointer)>>( - 'data_control_sql_register_insert_bulk_data_response_cb'); - late final _data_control_sql_register_insert_bulk_data_response_cb = - _data_control_sql_register_insert_bulk_data_response_cbPtr.asFunction< - int Function( - data_control_h, data_control_bulk_cb, ffi.Pointer)>(); - - /// @brief Unregisters the insert bulk data callback. - /// @since_tizen 3.0 - /// - /// @param[in] provider The provider handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see data_control_sql_register_insert_bulk_data_response_cb() - int data_control_sql_unregister_insert_bulk_data_response_cb( - data_control_h provider, - ) { - return _data_control_sql_unregister_insert_bulk_data_response_cb( - provider, - ); - } - - late final _data_control_sql_unregister_insert_bulk_data_response_cbPtr = - _lookup>( - 'data_control_sql_unregister_insert_bulk_data_response_cb'); - late final _data_control_sql_unregister_insert_bulk_data_response_cb = - _data_control_sql_unregister_insert_bulk_data_response_cbPtr - .asFunction(); - - /// @brief Binds a callback function to the SQL data control response. - /// @details This function is very similar to - /// data_control_sql_register_response_cb(), which can register a - /// callback for a given provider id. Calling - /// data_control_sql_register_response_cb() again overwrites the - /// callback previously set for the provider id, which means that only - /// one callback can be set for a given id. - /// data_control_sql_bind_response_cb() binds a callback to the handle - /// of a provider, which allows registering multiple callbacks for a - /// given provider id. To do that, you can create new #data_control_h - /// for the same provider id and register callback for the - /// #data_control_h. - /// - /// @since_tizen 4.0 - /// @remarks You can bind a callback function to @a provider. If you call this - /// function multiple times for the same handle, any previously set - /// callback will be overwritten. - /// - /// @param[in] provider The provider handle - /// @param[in] callback The callback function to be called - /// when a response is received - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_sql_register_response_cb() - /// @see data_control_sql_unbind_response_cb() - int data_control_sql_bind_response_cb( - data_control_h provider, - ffi.Pointer callback, - ffi.Pointer user_data, - ) { - return _data_control_sql_bind_response_cb( - provider, - callback, - user_data, - ); - } - - late final _data_control_sql_bind_response_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, - ffi.Pointer, - ffi.Pointer)>>('data_control_sql_bind_response_cb'); - late final _data_control_sql_bind_response_cb = - _data_control_sql_bind_response_cbPtr.asFunction< - int Function( - data_control_h, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Unbinds the callback function in the @a provider. - /// @since_tizen 4.0 - /// - /// @param[in] provider The provider handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_sql_bind_response_cb() - int data_control_sql_unbind_response_cb( - data_control_h provider, - ) { - return _data_control_sql_unbind_response_cb( - provider, - ); - } - - late final _data_control_sql_unbind_response_cbPtr = - _lookup>( - 'data_control_sql_unbind_response_cb'); - late final _data_control_sql_unbind_response_cb = - _data_control_sql_unbind_response_cbPtr - .asFunction(); - - /// @brief Binds the insert bulk data callback to the SQL data control response. - /// @details This function is very similar to - /// data_control_sql_register_insert_bulk_data_response_cb(), which can - /// register a callback for a given provider id. Calling - /// data_control_sql_register_insert_bulk_data_response_cb() again - /// overwrites the callback previously set for the provider id, which - /// means that only one callback can be set for a given id. - /// data_control_sql_bind_insert_bulk_data_response_cb() binds a - /// callback to the handle of a provider, which allows registering - /// multiple callbacks for a given provider id. To do that, you can - /// create new #data_control_h for the same provider id and register - /// callback for the #data_control_h. - /// - /// @since_tizen 4.0 - /// @remarks You can bind a callback function to @a provider. If you call this - /// function multiple times for the same handle, any previously set - /// callback will be overwritten. - /// - /// @param[in] provider The provider handle - /// @param[in] callback The callback function to be called - /// when a response is received - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see data_control_sql_register_insert_bulk_data_response_cb() - /// @see data_control_sql_unbind_insert_bulk_data_response_cb() - int data_control_sql_bind_insert_bulk_data_response_cb( - data_control_h provider, - data_control_bulk_cb callback, - ffi.Pointer user_data, - ) { - return _data_control_sql_bind_insert_bulk_data_response_cb( - provider, - callback, - user_data, - ); - } - - late final _data_control_sql_bind_insert_bulk_data_response_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, data_control_bulk_cb, - ffi.Pointer)>>( - 'data_control_sql_bind_insert_bulk_data_response_cb'); - late final _data_control_sql_bind_insert_bulk_data_response_cb = - _data_control_sql_bind_insert_bulk_data_response_cbPtr.asFunction< - int Function( - data_control_h, data_control_bulk_cb, ffi.Pointer)>(); - - /// @brief Unbinds the insert bulk data callback in the @a provider. - /// @since_tizen 4.0 - /// - /// @param[in] provider The provider handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_sql_unbind_insert_bulk_data_response_cb() - int data_control_sql_unbind_insert_bulk_data_response_cb( - data_control_h provider, - ) { - return _data_control_sql_unbind_insert_bulk_data_response_cb( - provider, - ); - } - - late final _data_control_sql_unbind_insert_bulk_data_response_cbPtr = - _lookup>( - 'data_control_sql_unbind_insert_bulk_data_response_cb'); - late final _data_control_sql_unbind_insert_bulk_data_response_cb = - _data_control_sql_unbind_insert_bulk_data_response_cbPtr - .asFunction(); - - /// @brief Gets the handle ID for @a provider. - /// @since_tizen 4.0 - /// - /// @remarks @a handle_id is generated internally and it is unique for each - /// handle. This function can be used in callbacks to know for which - /// handle the callback was called. - /// - /// @param[in] provider The provider handle - /// @param[out] handle_id The handle ID for @a provider - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_sql_get_handle_id( - data_control_h provider, - ffi.Pointer handle_id, - ) { - return _data_control_sql_get_handle_id( - provider, - handle_id, - ); - } - - late final _data_control_sql_get_handle_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, - ffi.Pointer)>>('data_control_sql_get_handle_id'); - late final _data_control_sql_get_handle_id = - _data_control_sql_get_handle_idPtr - .asFunction)>(); - - /// @brief Creates a provider handle. - /// @since_tizen 2.3 - /// @remarks @a provider should be destroyed with data_control_map_destroy(). - /// The following example demonstrates how to use the %data_control_map_create() method. - /// - /// @code - /// - /// { - /// const char *provider_id = "http://tizen.org/datacontrol/provider/example"; - /// const char *data_id = "table"; - /// data_control_h provider; - /// int result = 0; - /// - /// result = data_control_map_create(&provider); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Creating data control provider is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// result = data_control_map_set_provider_id(provider, provider_id); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Setting providerID is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// result = data_control_map_set_data_id(provider, data_id); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Setting dataID is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// // Executes some operations - /// - /// result = data_control_map_destroy(provider); - /// if (result != DATA_CONTROL_ERROR_NONE) - /// LOGE("Destroying data control provider is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// @endcode - /// - /// @param[out] provider The provider handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see data_control_map_destroy() - int data_control_map_create( - ffi.Pointer provider, - ) { - return _data_control_map_create( - provider, - ); - } - - late final _data_control_map_createPtr = _lookup< - ffi.NativeFunction)>>( - 'data_control_map_create'); - late final _data_control_map_create = _data_control_map_createPtr - .asFunction)>(); - - /// @brief Destroys the provider handle and releases all its resources. - /// @since_tizen 2.3 - /// @remarks When operations of data control are finished, this function must be called to prevent memory leak. - /// @param[in] provider The provider handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_map_create() - int data_control_map_destroy( - data_control_h provider, - ) { - return _data_control_map_destroy( - provider, - ); - } - - late final _data_control_map_destroyPtr = - _lookup>( - 'data_control_map_destroy'); - late final _data_control_map_destroy = - _data_control_map_destroyPtr.asFunction(); - - /// @brief Sets the Provider ID. - /// @since_tizen 2.3 - /// @param[in] provider The provider handle - /// @param[in] provider_id The data control provider ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see data_control_map_get_provider_id() - int data_control_map_set_provider_id( - data_control_h provider, - ffi.Pointer provider_id, - ) { - return _data_control_map_set_provider_id( - provider, - provider_id, - ); - } - - late final _data_control_map_set_provider_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, - ffi.Pointer)>>('data_control_map_set_provider_id'); - late final _data_control_map_set_provider_id = - _data_control_map_set_provider_idPtr - .asFunction)>(); - - /// @brief Gets the Provider ID. - /// @since_tizen 2.3 - /// @remarks You must release @a provider_id using free() after it is used. - /// @param[in] provider The provider handle - /// @param[out] provider_id The data control provider ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see data_control_map_set_provider_id() - int data_control_map_get_provider_id( - data_control_h provider, - ffi.Pointer> provider_id, - ) { - return _data_control_map_get_provider_id( - provider, - provider_id, - ); - } - - late final _data_control_map_get_provider_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, ffi.Pointer>)>>( - 'data_control_map_get_provider_id'); - late final _data_control_map_get_provider_id = - _data_control_map_get_provider_idPtr.asFunction< - int Function(data_control_h, ffi.Pointer>)>(); - - /// @brief Sets the Data ID. - /// @since_tizen 2.3 - /// @param[in] provider The provider handle - /// @param[in] data_id A string for identifying a specific table to operate \n - /// The string consists of one or more components separated by a slash('/'). - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see data_control_map_get_data_id() - int data_control_map_set_data_id( - data_control_h provider, - ffi.Pointer data_id, - ) { - return _data_control_map_set_data_id( - provider, - data_id, - ); - } - - late final _data_control_map_set_data_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, - ffi.Pointer)>>('data_control_map_set_data_id'); - late final _data_control_map_set_data_id = _data_control_map_set_data_idPtr - .asFunction)>(); - - /// @brief Gets the data ID. - /// @since_tizen 2.3 - /// @remarks You must release @a data_id using free() after it is used. - /// @param[in] provider The provider handle - /// @param[out] data_id A string for identifying a specific table to operate \n - /// The string consists of one or more components separated by a slash('/'). - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see data_control_map_set_data_id() - int data_control_map_get_data_id( - data_control_h provider, - ffi.Pointer> data_id, - ) { - return _data_control_map_get_data_id( - provider, - data_id, - ); - } - - late final _data_control_map_get_data_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, ffi.Pointer>)>>( - 'data_control_map_get_data_id'); - late final _data_control_map_get_data_id = - _data_control_map_get_data_idPtr.asFunction< - int Function(data_control_h, ffi.Pointer>)>(); - - /// @brief Registers a callback function for the key-value structured data control response. - /// The application is notified when a data control response is received from the @a provider. - /// @since_tizen 2.3 - /// - /// @remarks The application is notified when a data control response is received from the @a provider. - /// @remarks Only one callback can be registered for each provider id with this API. - /// @remarks If you register multiple callback for same provider id, it will be overwritten by latest one. - /// - /// @param[in] provider The provider handle - /// @param[in] callback The callback function to be called when a response is received - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @see data_control_map_unregister_response_cb() - /// @see data_control_map_bind_response_cb() - int data_control_map_register_response_cb( - data_control_h provider, - ffi.Pointer callback, - ffi.Pointer user_data, - ) { - return _data_control_map_register_response_cb( - provider, - callback, - user_data, - ); - } - - late final _data_control_map_register_response_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, - ffi.Pointer, - ffi.Pointer)>>('data_control_map_register_response_cb'); - late final _data_control_map_register_response_cb = - _data_control_map_register_response_cbPtr.asFunction< - int Function( - data_control_h, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function in the @a provider. - /// @since_tizen 2.3 - /// @param[in] provider The provider handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_map_register_response_cb() - int data_control_map_unregister_response_cb( - data_control_h provider, - ) { - return _data_control_map_unregister_response_cb( - provider, - ); - } - - late final _data_control_map_unregister_response_cbPtr = - _lookup>( - 'data_control_map_unregister_response_cb'); - late final _data_control_map_unregister_response_cb = - _data_control_map_unregister_response_cbPtr - .asFunction(); - - /// @brief Gets the value list associated with the specified @a key from the key-values map owned by the key-value structured data control provider. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// @remarks If you want to use this api, you must add privileges. - /// @remarks If the length of value list associated with the @a key is larger than 20, this API only returns the first 20 values. - /// @remarks The following example demonstrates how to use the %data_control_map_get() method. - /// - /// @code - /// - /// void - /// map_get_response_cb(int request_id, data_control_h provider, char **result_value_list, - /// int ret_value_count, bool provider_result, const char *error, void *user_data) - /// { - /// if (provider_result) - /// LOGI("The get operation is successful"); - /// else - /// LOGI("The get operation for the request %d is failed. error message: %s", request_id, error); - /// } - /// - /// data_control_map_response_cb map_callback; - /// - /// { - /// int result = 0; - /// int req_id = 0; - /// char *key = "key"; - /// - /// map_callback.get_cb = map_get_response_cb; - /// result = data_control_map_register_response_cb(provider, &map_callback, NULL); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Registering the callback function is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// result = data_control_map_get(provider, key, &req_id); - /// if (result != DATA_CONTROL_ERROR_NONE) - /// LOGE("Getting the value list of the key(%s) is failed with error: %d", key, result); - /// else - /// LOGI("req_id is %d", req_id); - /// - /// return result; - /// } - /// - /// @endcode - /// - /// @param[in] provider The provider handle - /// @param[in] key The key of the value list to obtain - /// @param[out] request_id The request ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - /// @see data_control_map_get_with_page() - int data_control_map_get( - data_control_h provider, - ffi.Pointer key, - ffi.Pointer request_id, - ) { - return _data_control_map_get( - provider, - key, - request_id, - ); - } - - late final _data_control_map_getPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, ffi.Pointer, - ffi.Pointer)>>('data_control_map_get'); - late final _data_control_map_get = _data_control_map_getPtr.asFunction< - int Function( - data_control_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the value list associated with the specified @a key from the key-values map owned by the key-value structured data control provider, with partition into pages. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// - /// @remarks If you want to use this api, you must add privileges. - /// @param[in] provider The provider handle - /// @param[in] key The key of the value list to obtain - /// @param[out] request_id The request ID - /// @param[in] page_number The page number of the value set \n - /// It starts from @c 1. - /// @param[in] count_per_page The desired maximum count of the data items per page - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - /// @see data_control_map_get() - int data_control_map_get_with_page( - data_control_h provider, - ffi.Pointer key, - ffi.Pointer request_id, - int page_number, - int count_per_page, - ) { - return _data_control_map_get_with_page( - provider, - key, - request_id, - page_number, - count_per_page, - ); - } - - late final _data_control_map_get_with_pagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Int)>>('data_control_map_get_with_page'); - late final _data_control_map_get_with_page = - _data_control_map_get_with_pagePtr.asFunction< - int Function(data_control_h, ffi.Pointer, - ffi.Pointer, int, int)>(); - - /// @brief Sets the value associated with the specified @a key to a new value. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// @remarks If you want to use this api, you must add privileges. - /// @remarks The following example demonstrates how to use the %data_control_map_set() method. - /// - /// @code - /// - /// void - /// map_set_response_cb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data) - /// { - /// if (provider_result) - /// LOGI("The set operation is successful"); - /// else - /// LOGI("The set operation for the request %d is failed. error message: %s", request_id, error); - /// } - /// - /// data_control_map_response_cb map_callback; - /// - /// { - /// int result = 0; - /// int req_id = 0; - /// char *key = "key"; - /// char *old_value = "old value"; - /// char *new_value = "new value"; - /// - /// map_callback.set_cb = map_set_response_cb; - /// result = data_control_map_register_response_cb(provider, &map_callback, NULL); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Registering the callback function is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// result = data_control_map_set(provider, key, old_value, new_value, &req_id); - /// if (result != DATA_CONTROL_ERROR_NONE) - /// LOGE("Replacing old_value(%s) with new_value(%s) is failed with error: %d", old_value, new_value, result); - /// else - /// LOGI("req_id is %d", req_id); - /// - /// return result; - /// } - /// - /// @endcode - /// - /// @param[in] provider The provider handle - /// @param[in] key The key of the value to replace - /// @param[in] old_value The value to replace - /// @param[in] new_value The new value that replaces the existing value - /// @param[out] request_id The request ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - int data_control_map_set( - data_control_h provider, - ffi.Pointer key, - ffi.Pointer old_value, - ffi.Pointer new_value, - ffi.Pointer request_id, - ) { - return _data_control_map_set( - provider, - key, - old_value, - new_value, - request_id, - ); - } - - late final _data_control_map_setPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('data_control_map_set'); - late final _data_control_map_set = _data_control_map_setPtr.asFunction< - int Function(data_control_h, ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Adds the @a value associated with the specified @a key to the key-values map owned by the key-value structured data control provider. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// @remarks If you want to use this api, you must add privileges. - /// @remarks The following example demonstrates how to use the %data_control_map_add() method. - /// - /// @code - /// - /// void - /// map_add_response_cb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data) - /// { - /// if (provider_result) - /// LOGI("The add operation is successful"); - /// else - /// LOGI("The add operation for the request %d is failed. error message: %s", request_id, error); - /// } - /// - /// data_control_map_response_cb map_callback; - /// - /// { - /// int result = 0; - /// int req_id = 0; - /// const char *key = "key"; - /// const char *value = "value"; - /// - /// map_callback.add_cb = map_add_response_cb; - /// result = data_control_map_register_response_cb(provider, &map_callback, NULL); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Registering the callback function is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// result = data_control_map_add(provider, key, value, &req_id); - /// if (result != DATA_CONTROL_ERROR_NONE) - /// LOGE("Adding %s-%s pair is failed with error: %d", key, value, result); - /// else - /// LOGI("req_id is %d", req_id); - /// - /// return result; - /// } - /// - /// @endcode - /// - /// @param[in] provider The provider handle - /// @param[in] key The key of the value to add - /// @param[in] value The value to add - /// @param[out] request_id The request ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - int data_control_map_add( - data_control_h provider, - ffi.Pointer key, - ffi.Pointer value, - ffi.Pointer request_id, - ) { - return _data_control_map_add( - provider, - key, - value, - request_id, - ); - } - - late final _data_control_map_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('data_control_map_add'); - late final _data_control_map_add = _data_control_map_addPtr.asFunction< - int Function(data_control_h, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Removes the @a value associated with the specified @a key from the key-values map owned by the key-value structured data control provider. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// @remarks If you want to use this api, you must add privileges. - /// @remarks The following example demonstrates how to use the %data_control_map_remove() method. - /// - /// @code - /// - /// void - /// map_remove_response_cb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data) - /// { - /// if (provider_result) - /// LOGI("The remove operation is successful"); - /// else - /// LOGI("The remove operation for the request %d is failed. error message: %s", request_id, error); - /// } - /// - /// data_control_map_response_cb map_callback; - /// - /// { - /// int result = 0; - /// int req_id = 0; - /// const char *key = "key"; - /// const char *value = "value"; - /// - /// map_callback.remove_cb = map_remove_response_cb; - /// result = data_control_map_register_response_cb(provider, &map_callback, NULL); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Registering the callback function is failed with error: %d", result); - /// - /// return result; - /// } - /// - /// result = data_control_map_remove(provider, key, value, &req_id); - /// if (result != DATA_CONTROL_ERROR_NONE) - /// LOGE("Removing %s-%s pair is failed with error: %d", key, value, result); - /// else - /// LOGI("req_id is %d", req_id); - /// - /// return result; - /// } - /// - /// @endcode - /// - /// @param[in] provider The provider handle - /// @param[in] key The key of the value to remove - /// @param[in] value The value to remove - /// @param[out] request_id The request ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - int data_control_map_remove( - data_control_h provider, - ffi.Pointer key, - ffi.Pointer value, - ffi.Pointer request_id, - ) { - return _data_control_map_remove( - provider, - key, - value, - request_id, - ); - } - - late final _data_control_map_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('data_control_map_remove'); - late final _data_control_map_remove = _data_control_map_removePtr.asFunction< - int Function(data_control_h, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Adds multiple key-value pairs in one request. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// @remarks If you want to use this function, you must add privileges. - /// @remarks The following example demonstrates how to use the %data_control_map_add_bulk_data() method. - /// - /// @code - /// - /// void - /// map_bulk_add_response_cb(int request_id, data_control_h provider, data_control_bulk_result_data_h bulk_results, - /// bool provider_result, const char *error, void *user_data) - /// { - /// if (provider_result) - /// LOGI("The add operation is successful"); - /// else - /// LOGI("The add operation for the request %d is failed. error message: %s", request_id, error); - /// } - /// - /// data_control_map_response_cb map_callback; - /// { - /// data_control_bulk_data_h bulk_data; - /// int req_id; - /// bundle *b1; - /// bundle *b2; - /// int result = 0; - /// int req_id = 0; - /// int count; - /// - /// result = data_control_map_register_add_bulk_data_response_cb(provider, map_bulk_add_response_cb, user_data); - /// if (result != DATA_CONTROL_ERROR_NONE) { - /// LOGE("Registering the callback function is failed with error: %d", result); - /// return result; - /// } - /// - /// b1 = bundle_create(); - /// bundle_add_str(b1, "key", "test key"); - /// bundle_add_str(b1, "value", "test value"); - /// b2 = bundle_create(); - /// bundle_add_str(b2, "key", "test key2"); - /// bundle_add_str(b2, "value", "test value2"); - /// - /// data_control_bulk_data_create(&bulk_data); - /// data_control_bulk_data_add(bulk_data, b1); - /// data_control_bulk_data_add(bulk_data, b2); - /// - /// data_control_bulk_data_get_count(bulk_data, &count); - /// dlog_print(DLOG_INFO, LOG_TAG, "bulk add count %d ", count); - /// - /// data_control_map_add_bulk_data(provider, bulk_data, &req_id); - /// data_control_bulk_data_destroy(bulk_data); - /// - /// bundle_free(b1); - /// bundle_free(b2); - /// return result; - /// } - /// - /// @endcode - /// - /// @param[in] provider The provider handle - /// @param[in] bulk_data The bulk data handle - /// @param[out] request_id The request ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_MAX_EXCEEDED Too long argument. Bulk data total length cannot exceed 1MB - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - int data_control_map_add_bulk_data( - data_control_h provider, - data_control_bulk_data_h bulk_data, - ffi.Pointer request_id, - ) { - return _data_control_map_add_bulk_data( - provider, - bulk_data, - request_id, - ); - } - - late final _data_control_map_add_bulk_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, data_control_bulk_data_h, - ffi.Pointer)>>('data_control_map_add_bulk_data'); - late final _data_control_map_add_bulk_data = - _data_control_map_add_bulk_dataPtr.asFunction< - int Function(data_control_h, data_control_bulk_data_h, - ffi.Pointer)>(); - - /// @brief Registers an add bulk data callback for the MAP data control response. - /// The application is notified when a data control response is received - /// from the @a provider. - /// @since_tizen 3.0 - /// - /// @remarks Only one callback can be registered for each provider id with this - /// function. If you call this function multiple times for the same - /// provider id, any previously set callback will be overwritten. - /// @param[in] provider The provider handle - /// @param[in] callback The callback function to be called when a response is received - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_map_unregister_add_bulk_data_response_cb() - /// @see data_control_map_bind_add_bulk_data_response_cb() - int data_control_map_register_add_bulk_data_response_cb( - data_control_h provider, - data_control_bulk_cb callback, - ffi.Pointer user_data, - ) { - return _data_control_map_register_add_bulk_data_response_cb( - provider, - callback, - user_data, - ); - } - - late final _data_control_map_register_add_bulk_data_response_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, data_control_bulk_cb, - ffi.Pointer)>>( - 'data_control_map_register_add_bulk_data_response_cb'); - late final _data_control_map_register_add_bulk_data_response_cb = - _data_control_map_register_add_bulk_data_response_cbPtr.asFunction< - int Function( - data_control_h, data_control_bulk_cb, ffi.Pointer)>(); - - /// @brief Unregisters the add bulk data callback. - /// @since_tizen 3.0 - /// @param[in] provider The provider handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_map_register_add_bulk_data_response_cb() - int data_control_map_unregister_add_bulk_data_response_cb( - data_control_h provider, - ) { - return _data_control_map_unregister_add_bulk_data_response_cb( - provider, - ); - } - - late final _data_control_map_unregister_add_bulk_data_response_cbPtr = - _lookup>( - 'data_control_map_unregister_add_bulk_data_response_cb'); - late final _data_control_map_unregister_add_bulk_data_response_cb = - _data_control_map_unregister_add_bulk_data_response_cbPtr - .asFunction(); - - /// @brief Binds a response callback function to a data control provider handle. - /// The application is notified when a data control response is received - /// from the @a provider. - /// @details This function is very similar to - /// data_control_map_register_response_cb(), which can register a - /// callback for a given provider id. Calling - /// data_control_map_register_response_cb() again overwrites the - /// callback previously set for the provider id, which means that only - /// one callback can be set for a given id. - /// data_control_map_bind_response_cb() binds a callback to the handle - /// of a provider, which allows registering multiple callbacks for a - /// given provider id. To do that, you can create new #data_control_h - /// for the same provider id and register callback for the - /// #data_control_h. - /// - /// @since_tizen 4.0 - /// - /// @remarks If you call this function multiple times for the same handle, any - /// previously set callback will be overwritten. - /// - /// @param[in] provider The provider handle - /// @param[in] callback The callback function to be called - /// when a response is received - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_map_register_response_cb() - /// @see data_control_map_unbind_response_cb() - int data_control_map_bind_response_cb( - data_control_h provider, - ffi.Pointer callback, - ffi.Pointer user_data, - ) { - return _data_control_map_bind_response_cb( - provider, - callback, - user_data, - ); - } - - late final _data_control_map_bind_response_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, - ffi.Pointer, - ffi.Pointer)>>('data_control_map_bind_response_cb'); - late final _data_control_map_bind_response_cb = - _data_control_map_bind_response_cbPtr.asFunction< - int Function( - data_control_h, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Unbinds the callback function in the @a provider. - /// @since_tizen 4.0 - /// - /// @param[in] provider The provider handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_bind_map_response_cb() - int data_control_map_unbind_response_cb( - data_control_h provider, - ) { - return _data_control_map_unbind_response_cb( - provider, - ); - } - - late final _data_control_map_unbind_response_cbPtr = - _lookup>( - 'data_control_map_unbind_response_cb'); - late final _data_control_map_unbind_response_cb = - _data_control_map_unbind_response_cbPtr - .asFunction(); - - /// @brief Binds the add bulk data callback to the map data control response. - /// @details This function is very similar to - /// data_control_map_register_add_bulk_data_response_cb(), which can - /// register a callback for a given provider id. Calling - /// data_control_map_register_add_bulk_data_response_cb() again - /// overwrites the callback previously set for the provider id, which - /// means that only one callback can be set for a given id. - /// data_control_map_bind_add_bulk_data_response_cb() binds a - /// callback to the handle of a provider, which allows registering - /// multiple callbacks for a given provider id. To do that, you can - /// create new #data_control_h for the same provider id and register - /// callback for the #data_control_h. - /// - /// @since_tizen 4.0 - /// @remarks If you call this function multiple times for the same handle, - /// any previously set callback will be overwritten. - /// - /// @param[in] provider The provider handle - /// @param[in] callback The callback function to be called - /// when a response is received - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_map_register_add_bulk_data_response_cb() - /// @see data_control_map_unbind_add_bulk_data_response_cb() - int data_control_map_bind_add_bulk_data_response_cb( - data_control_h provider, - data_control_bulk_cb callback, - ffi.Pointer user_data, - ) { - return _data_control_map_bind_add_bulk_data_response_cb( - provider, - callback, - user_data, - ); - } - - late final _data_control_map_bind_add_bulk_data_response_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, data_control_bulk_cb, - ffi.Pointer)>>( - 'data_control_map_bind_add_bulk_data_response_cb'); - late final _data_control_map_bind_add_bulk_data_response_cb = - _data_control_map_bind_add_bulk_data_response_cbPtr.asFunction< - int Function( - data_control_h, data_control_bulk_cb, ffi.Pointer)>(); - - /// @brief Unbinds the add bulk data callback in the @a provider. - /// @since_tizen 4.0 - /// - /// @param[in] provider The provider handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_map_bind_add_bulk_data_response_cb() - int data_control_map_unbind_add_bulk_data_response_cb( - data_control_h provider, - ) { - return _data_control_map_unbind_add_bulk_data_response_cb( - provider, - ); - } - - late final _data_control_map_unbind_add_bulk_data_response_cbPtr = - _lookup>( - 'data_control_map_unbind_add_bulk_data_response_cb'); - late final _data_control_map_unbind_add_bulk_data_response_cb = - _data_control_map_unbind_add_bulk_data_response_cbPtr - .asFunction(); - - /// @brief Gets the handle ID for @a provider. - /// @since_tizen 4.0 - /// - /// @remarks @a handle_id is generated internally and it is unique for each - /// handle. This function can be used in callbacks to know for which - /// handle the callback was called. - /// - /// @param[in] provider The provider handle - /// @param[out] handle_id The handle ID for @a provider - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_map_get_handle_id( - data_control_h provider, - ffi.Pointer handle_id, - ) { - return _data_control_map_get_handle_id( - provider, - handle_id, - ); - } - - late final _data_control_map_get_handle_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(data_control_h, - ffi.Pointer)>>('data_control_map_get_handle_id'); - late final _data_control_map_get_handle_id = - _data_control_map_get_handle_idPtr - .asFunction)>(); - - /// @brief Registers a callback function for the SQL data control request. - /// The provider is notified when a data control request is received from the client applications. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing - /// - /// @param[in] callback The callback function to be called when a data control request is received - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - int data_control_provider_sql_register_cb( - ffi.Pointer callback, - ffi.Pointer user_data, - ) { - return _data_control_provider_sql_register_cb( - callback, - user_data, - ); - } - - late final _data_control_provider_sql_register_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('data_control_provider_sql_register_cb'); - late final _data_control_provider_sql_register_cb = - _data_control_provider_sql_register_cbPtr.asFunction< - int Function(ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Unregisters the SQL data control request callback functions. - /// @since_tizen 2.3 - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - int data_control_provider_sql_unregister_cb() { - return _data_control_provider_sql_unregister_cb(); - } - - late final _data_control_provider_sql_unregister_cbPtr = - _lookup>( - 'data_control_provider_sql_unregister_cb'); - late final _data_control_provider_sql_unregister_cb = - _data_control_provider_sql_unregister_cbPtr.asFunction(); - - /// @brief Registers a callback function for the map data control request. - /// The provider is notified when a data control request is received from the client applications. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing - /// - /// @param[in] callback The callback function to be called when a data control request is received - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - int data_control_provider_map_register_cb( - ffi.Pointer callback, - ffi.Pointer user_data, - ) { - return _data_control_provider_map_register_cb( - callback, - user_data, - ); - } - - late final _data_control_provider_map_register_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('data_control_provider_map_register_cb'); - late final _data_control_provider_map_register_cb = - _data_control_provider_map_register_cbPtr.asFunction< - int Function(ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Unregisters the map data control request callback functions. - /// @since_tizen 2.3 - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - int data_control_provider_map_unregister_cb() { - return _data_control_provider_map_unregister_cb(); - } - - late final _data_control_provider_map_unregister_cbPtr = - _lookup>( - 'data_control_provider_map_unregister_cb'); - late final _data_control_provider_map_unregister_cb = - _data_control_provider_map_unregister_cbPtr.asFunction(); - - /// @brief Gets the application ID which sends the data control request. - /// @since_tizen 2.3 - /// - /// @remarks You must release @a appid using free() after it is used. - /// - /// @param[in] request_id The request ID - /// @param[out] appid The application ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_provider_get_client_appid( - int request_id, - ffi.Pointer> appid, - ) { - return _data_control_provider_get_client_appid( - request_id, - appid, - ); - } - - late final _data_control_provider_get_client_appidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer>)>>( - 'data_control_provider_get_client_appid'); - late final _data_control_provider_get_client_appid = - _data_control_provider_get_client_appidPtr - .asFunction>)>(); - - /// @brief Sends the success result and the result set of the select request to the client application. - /// @since_tizen 2.3 - /// - /// @param[in] request_id The request ID - /// @param[in] db_handle The result DB handle for the result set - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_provider_send_select_result( - int request_id, - ffi.Pointer db_handle, - ) { - return _data_control_provider_send_select_result( - request_id, - db_handle, - ); - } - - late final _data_control_provider_send_select_resultPtr = _lookup< - ffi.NativeFunction)>>( - 'data_control_provider_send_select_result'); - late final _data_control_provider_send_select_result = - _data_control_provider_send_select_resultPtr - .asFunction)>(); - - /// @brief Sends the success result of the insert request and the last inserted row ID to the client application. - /// @since_tizen 2.3 - /// - /// @param[in] request_id The request ID - /// @param[in] row_id The row ID of the database changed by the insert request - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_provider_send_insert_result( - int request_id, - int row_id, - ) { - return _data_control_provider_send_insert_result( - request_id, - row_id, - ); - } - - late final _data_control_provider_send_insert_resultPtr = - _lookup>( - 'data_control_provider_send_insert_result'); - late final _data_control_provider_send_insert_result = - _data_control_provider_send_insert_resultPtr - .asFunction(); - - /// @brief Sends the success result of the update request to the client application. - /// @since_tizen 2.3 - /// - /// @param[in] request_id The request ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_provider_send_update_result( - int request_id, - ) { - return _data_control_provider_send_update_result( - request_id, - ); - } - - late final _data_control_provider_send_update_resultPtr = - _lookup>( - 'data_control_provider_send_update_result'); - late final _data_control_provider_send_update_result = - _data_control_provider_send_update_resultPtr - .asFunction(); - - /// @brief Sends the success result of the delete request to the client application. - /// @since_tizen 2.3 - /// - /// @param[in] request_id The request ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_provider_send_delete_result( - int request_id, - ) { - return _data_control_provider_send_delete_result( - request_id, - ); - } - - late final _data_control_provider_send_delete_resultPtr = - _lookup>( - 'data_control_provider_send_delete_result'); - late final _data_control_provider_send_delete_result = - _data_control_provider_send_delete_resultPtr - .asFunction(); - - /// @brief Sends the provider error message to the client application. - /// @since_tizen 2.3 - /// - /// @param[in] request_id The request ID - /// @param[in] error The provider-defined error message - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_provider_send_error( - int request_id, - ffi.Pointer error, - ) { - return _data_control_provider_send_error( - request_id, - error, - ); - } - - late final _data_control_provider_send_errorPtr = _lookup< - ffi.NativeFunction)>>( - 'data_control_provider_send_error'); - late final _data_control_provider_send_error = - _data_control_provider_send_errorPtr - .asFunction)>(); - - /// @brief Sends the success result of the request for setting, adding, and removing the key-value structured data to the client application. - /// @since_tizen 2.3 - /// - /// @param[in] request_id The request ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_provider_send_map_result( - int request_id, - ) { - return _data_control_provider_send_map_result( - request_id, - ); - } - - late final _data_control_provider_send_map_resultPtr = - _lookup>( - 'data_control_provider_send_map_result'); - late final _data_control_provider_send_map_result = - _data_control_provider_send_map_resultPtr.asFunction(); - - /// @brief Sends the success result of the request for getting the value list to the client application. - /// @since_tizen 2.3 - /// - /// @param[in] request_id The request ID - /// @param[in] value_list The result value list - /// @param[in] value_count The number of the values - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_provider_send_map_get_value_result( - int request_id, - ffi.Pointer> value_list, - int value_count, - ) { - return _data_control_provider_send_map_get_value_result( - request_id, - value_list, - value_count, - ); - } - - late final _data_control_provider_send_map_get_value_resultPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer>, - ffi.Int)>>('data_control_provider_send_map_get_value_result'); - late final _data_control_provider_send_map_get_value_result = - _data_control_provider_send_map_get_value_resultPtr.asFunction< - int Function(int, ffi.Pointer>, int)>(); - - /// @brief Creates SQL INSERT statement. - /// - /// @since_tizen 2.3 - /// - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] provider The provider handle - /// @param[in] insert_map The column-value pairs to insert - /// - /// @return The SQL INSERT statement on success, - /// otherwise NULL - /// @exception DATA_CONTROL_ERROR_NONE Success - /// @exception DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @exception DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - ffi.Pointer data_control_provider_create_insert_statement( - data_control_h provider, - ffi.Pointer insert_map, - ) { - return _data_control_provider_create_insert_statement( - provider, - insert_map, - ); - } - - late final _data_control_provider_create_insert_statementPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - data_control_h, ffi.Pointer)>>( - 'data_control_provider_create_insert_statement'); - late final _data_control_provider_create_insert_statement = - _data_control_provider_create_insert_statementPtr.asFunction< - ffi.Pointer Function( - data_control_h, ffi.Pointer)>(); - - /// @brief Creates SQL DELETE statement. - /// - /// @since_tizen 2.3 - /// - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] provider The provider handle - /// @param[in] where A filter to select the desired rows to delete \n - /// Pass @c NULL if all rows need to be deleted - /// - /// @return The SQL DELETE statement on success, - /// otherwise NULL - /// @exception DATA_CONTROL_ERROR_NONE Success - /// @exception DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @exception DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - ffi.Pointer data_control_provider_create_delete_statement( - data_control_h provider, - ffi.Pointer where, - ) { - return _data_control_provider_create_delete_statement( - provider, - where, - ); - } - - late final _data_control_provider_create_delete_statementPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - data_control_h, ffi.Pointer)>>( - 'data_control_provider_create_delete_statement'); - late final _data_control_provider_create_delete_statement = - _data_control_provider_create_delete_statementPtr.asFunction< - ffi.Pointer Function( - data_control_h, ffi.Pointer)>(); - - /// @brief Creates SQL UPDATE statement. - /// - /// @since_tizen 2.3 - /// - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] provider The provider handle - /// @param[in] update_map The column-value pairs to update - /// @param[in] where A filter to select the desired rows to update - /// - /// @return The SQL UPDATE statement on success, - /// otherwise NULL - /// @exception DATA_CONTROL_ERROR_NONE Success - /// @exception DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @exception DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - ffi.Pointer data_control_provider_create_update_statement( - data_control_h provider, - ffi.Pointer update_map, - ffi.Pointer where, - ) { - return _data_control_provider_create_update_statement( - provider, - update_map, - where, - ); - } - - late final _data_control_provider_create_update_statementPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - data_control_h, ffi.Pointer, ffi.Pointer)>>( - 'data_control_provider_create_update_statement'); - late final _data_control_provider_create_update_statement = - _data_control_provider_create_update_statementPtr.asFunction< - ffi.Pointer Function( - data_control_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Creates SQL SELECT statement. - /// - /// @since_tizen 2.3 - /// - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] provider The provider handle - /// @param[in] column_list The column names to query \n - /// Pass @c NULL if all columns need to be selected - /// @param[in] column_count The total number of columns to be queried - /// @param[in] where A filter to select the desired rows - /// @param[in] order The sorting order of rows to query - /// - /// @return The SQL SELECT statement on success, - /// otherwise NULL - /// @exception DATA_CONTROL_ERROR_NONE Success - /// @exception DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @exception DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - ffi.Pointer data_control_provider_create_select_statement( - data_control_h provider, - ffi.Pointer> column_list, - int column_count, - ffi.Pointer where, - ffi.Pointer order, - ) { - return _data_control_provider_create_select_statement( - provider, - column_list, - column_count, - where, - order, - ); - } - - late final _data_control_provider_create_select_statementPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - data_control_h, - ffi.Pointer>, - ffi.Int, - ffi.Pointer, - ffi.Pointer)>>( - 'data_control_provider_create_select_statement'); - late final _data_control_provider_create_select_statement = - _data_control_provider_create_select_statementPtr.asFunction< - ffi.Pointer Function( - data_control_h, - ffi.Pointer>, - int, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Checks whether the given provider ID matches the provider handle's provider ID. - /// - /// @since_tizen 2.3 - /// - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] provider The provider handle - /// @param[in] provider_id The provider ID to be compared with handle's provider ID - /// - /// @return @c true if the provider_id matches, - /// otherwise @c false if it does not match - /// @exception DATA_CONTROL_ERROR_NONE Success - /// @exception DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @exception DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - bool data_control_provider_match_provider_id( - data_control_h provider, - ffi.Pointer provider_id, - ) { - return _data_control_provider_match_provider_id( - provider, - provider_id, - ); - } - - late final _data_control_provider_match_provider_idPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(data_control_h, ffi.Pointer)>>( - 'data_control_provider_match_provider_id'); - late final _data_control_provider_match_provider_id = - _data_control_provider_match_provider_idPtr - .asFunction)>(); - - /// @brief Checks whether the given data ID matches the provider handle's data ID. - /// - /// @since_tizen 2.3 - /// - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] provider The provider handle - /// @param[in] data_id The data ID to be compared with handle's data ID - /// - /// @return @c true if the @a data_id matches, - /// otherwise @c false if it does not match - /// @exception DATA_CONTROL_ERROR_NONE Success - /// @exception DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @exception DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - bool data_control_provider_match_data_id( - data_control_h provider, - ffi.Pointer data_id, - ) { - return _data_control_provider_match_data_id( - provider, - data_id, - ); - } - - late final _data_control_provider_match_data_idPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(data_control_h, - ffi.Pointer)>>('data_control_provider_match_data_id'); - late final _data_control_provider_match_data_id = - _data_control_provider_match_data_idPtr - .asFunction)>(); - - /// @brief Sends a data change notification to consumer applications which have successfully added a data change callback. - /// @details If the function is successful, data_control_data_change_cb() callback will be called under certain conditions. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing - /// - /// @param[in] provider Target provider handle - /// @param[in] type Changed data type - /// @param[in] data Customized information about changed data - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre The consumer should call data_control_add_data_change_cb() to receive data change notifications - /// @see data_control_data_change_cb() - /// @see data_control_add_data_change_cb() - int data_control_provider_send_data_change_noti( - data_control_h provider, - int type, - ffi.Pointer data, - ) { - return _data_control_provider_send_data_change_noti( - provider, - type, - data, - ); - } - - late final _data_control_provider_send_data_change_notiPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, ffi.Int32, ffi.Pointer)>>( - 'data_control_provider_send_data_change_noti'); - late final _data_control_provider_send_data_change_noti = - _data_control_provider_send_data_change_notiPtr - .asFunction)>(); - - /// @brief Adds a consumer filter for the data changed callback addition process. - /// @since_tizen 3.0 - /// @remarks If the provider does not add any filters by calling this function, all requests to add a data change callback will be granted. \n - /// If filters are added, and at least one filter returns false for a consumer application, the application will not be able to add data change callbacks. - /// - /// @param[in] callback Consumer filter callback, filtering consumers which try to add data changed callback - /// @param[in] user_data The user data to be passed to the list_cb function - /// @param[out] callback_id Added callback ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @see data_control_provider_data_change_consumer_filter_cb() - int data_control_provider_add_data_change_consumer_filter_cb( - data_control_provider_data_change_consumer_filter_cb callback, - ffi.Pointer user_data, - ffi.Pointer callback_id, - ) { - return _data_control_provider_add_data_change_consumer_filter_cb( - callback, - user_data, - callback_id, - ); - } - - late final _data_control_provider_add_data_change_consumer_filter_cbPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_provider_data_change_consumer_filter_cb, - ffi.Pointer, - ffi.Pointer)>>( - 'data_control_provider_add_data_change_consumer_filter_cb'); - late final _data_control_provider_add_data_change_consumer_filter_cb = - _data_control_provider_add_data_change_consumer_filter_cbPtr.asFunction< - int Function(data_control_provider_data_change_consumer_filter_cb, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Removes a consumer filter for the data changed callback addition process. - /// @since_tizen 3.0 - /// - /// @param[in] callback_id Target callback ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_provider_remove_data_change_consumer_filter_cb( - int callback_id, - ) { - return _data_control_provider_remove_data_change_consumer_filter_cb( - callback_id, - ); - } - - late final _data_control_provider_remove_data_change_consumer_filter_cbPtr = - _lookup>( - 'data_control_provider_remove_data_change_consumer_filter_cb'); - late final _data_control_provider_remove_data_change_consumer_filter_cb = - _data_control_provider_remove_data_change_consumer_filter_cbPtr - .asFunction(); - - /// @brief Retrieves ids of all applications which receive data change notifications from a given provider. - /// @details This function calls data_control_provider_data_change_consumer_cb() once for each provider's notification target consumer id. \n - /// If the data_control_provider_data_change_consumer_cb() callback function returns @c false, then iteration will be finished. - /// @since_tizen 3.0 - /// - /// @param[in] provider Target provider handle - /// @param[in] list_cb The iteration callback function - /// @param[in] user_data The user data to be passed to the list_cb function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @post This function invokes data_control_provider_data_change_consumer_cb(). - /// @see data_control_provider_data_change_consumer_cb() - int data_control_provider_foreach_data_change_consumer( - data_control_h provider, - data_control_provider_data_change_consumer_cb list_cb, - ffi.Pointer user_data, - ) { - return _data_control_provider_foreach_data_change_consumer( - provider, - list_cb, - user_data, - ); - } - - late final _data_control_provider_foreach_data_change_consumerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, - data_control_provider_data_change_consumer_cb, - ffi.Pointer)>>( - 'data_control_provider_foreach_data_change_consumer'); - late final _data_control_provider_foreach_data_change_consumer = - _data_control_provider_foreach_data_change_consumerPtr.asFunction< - int Function( - data_control_h, - data_control_provider_data_change_consumer_cb, - ffi.Pointer)>(); - - /// @brief Sends the result of the bulk insert request to the client application. - /// @since_tizen 3.0 - /// - /// @param[in] request_id The request ID - /// @param[in] bulk_results The bulk add result for each data - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_provider_send_bulk_insert_result( - int request_id, - data_control_bulk_result_data_h bulk_results, - ) { - return _data_control_provider_send_bulk_insert_result( - request_id, - bulk_results, - ); - } - - late final _data_control_provider_send_bulk_insert_resultPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, data_control_bulk_result_data_h)>>( - 'data_control_provider_send_bulk_insert_result'); - late final _data_control_provider_send_bulk_insert_result = - _data_control_provider_send_bulk_insert_resultPtr - .asFunction(); - - /// @brief Sends the result of the bulk add request to the client application. - /// @since_tizen 3.0 - /// - /// @param[in] request_id The request ID - /// @param[in] bulk_results The bulk add result for each data - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - int data_control_provider_send_map_bulk_add_result( - int request_id, - data_control_bulk_result_data_h bulk_results, - ) { - return _data_control_provider_send_map_bulk_add_result( - request_id, - bulk_results, - ); - } - - late final _data_control_provider_send_map_bulk_add_resultPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, data_control_bulk_result_data_h)>>( - 'data_control_provider_send_map_bulk_add_result'); - late final _data_control_provider_send_map_bulk_add_result = - _data_control_provider_send_map_bulk_add_resultPtr - .asFunction(); - - /// @brief Registers a callback for the SQL bulk data request. - /// @details The provider is notified when a data control request is received from the client applications. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing - /// - /// @param[in] callback The callback function to be called when a data control request is received - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - int data_control_provider_sql_register_insert_bulk_data_request_cb( - data_control_provider_bulk_cb callback, - ffi.Pointer user_data, - ) { - return _data_control_provider_sql_register_insert_bulk_data_request_cb( - callback, - user_data, - ); - } - - late final _data_control_provider_sql_register_insert_bulk_data_request_cbPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_provider_bulk_cb, ffi.Pointer)>>( - 'data_control_provider_sql_register_insert_bulk_data_request_cb'); - late final _data_control_provider_sql_register_insert_bulk_data_request_cb = - _data_control_provider_sql_register_insert_bulk_data_request_cbPtr - .asFunction< - int Function( - data_control_provider_bulk_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback for the SQL bulk data request. - /// @since_tizen 3.0 - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @see data_control_provider_sql_register_insert_bulk_data_request_cb() - int data_control_provider_sql_unregister_insert_bulk_data_request_cb() { - return _data_control_provider_sql_unregister_insert_bulk_data_request_cb(); - } - - late final _data_control_provider_sql_unregister_insert_bulk_data_request_cbPtr = - _lookup>( - 'data_control_provider_sql_unregister_insert_bulk_data_request_cb'); - late final _data_control_provider_sql_unregister_insert_bulk_data_request_cb = - _data_control_provider_sql_unregister_insert_bulk_data_request_cbPtr - .asFunction(); - - /// @brief Registers a callback for the MAP bulk data request. - /// @details The provider is notified when a data control request is received from the client applications. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing - /// - /// @param[in] callback The callback function to be called when a data control request is received - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - int data_control_provider_map_register_add_bulk_data_request_cb( - data_control_provider_bulk_cb callback, - ffi.Pointer user_data, - ) { - return _data_control_provider_map_register_add_bulk_data_request_cb( - callback, - user_data, - ); - } - - late final _data_control_provider_map_register_add_bulk_data_request_cbPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_provider_bulk_cb, ffi.Pointer)>>( - 'data_control_provider_map_register_add_bulk_data_request_cb'); - late final _data_control_provider_map_register_add_bulk_data_request_cb = - _data_control_provider_map_register_add_bulk_data_request_cbPtr - .asFunction< - int Function( - data_control_provider_bulk_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback for the MAP bulk data request. - /// @since_tizen 3.0 - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @see data_control_provider_map_register_add_bulk_data_request_cb() - int data_control_provider_map_unregister_add_bulk_data_request_cb() { - return _data_control_provider_map_unregister_add_bulk_data_request_cb(); - } - - late final _data_control_provider_map_unregister_add_bulk_data_request_cbPtr = - _lookup>( - 'data_control_provider_map_unregister_add_bulk_data_request_cb'); - late final _data_control_provider_map_unregister_add_bulk_data_request_cb = - _data_control_provider_map_unregister_add_bulk_data_request_cbPtr - .asFunction(); - - /// @brief Asynchronously adds a data changed callback, which is called whenever the provider's data is changed. - /// @details The function attempts to add the callback asynchronously and calls result_callback to inform about the result of the attempt. \n - /// If the function is successful, result_callback will be called. \n - /// The provider will call any filters which were added for the callback addition process. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// @remarks If you want to use this function, you must add privileges. - /// @param[in] provider Target provider handle - /// @param[in] callback The callback function to be called when consumer receives data change notification - /// @param[in] user_data The user data to be passed to the callback function - /// @param[in] result_callback The callback function to be called when consumer receives add data change callback process result - /// @param[in] result_cb_user_data The user data to be passed to the result_callback function - /// @param[out] callback_id Added callback ID, it can be used to remove the callback - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - /// @see data_control_data_change_cb() - /// @see data_control_add_callback_result_cb() - /// @see data_control_provider_add_data_change_consumer_filter_cb() - int data_control_add_data_change_cb( - data_control_h provider, - data_control_data_change_cb callback, - ffi.Pointer user_data, - data_control_add_callback_result_cb result_callback, - ffi.Pointer result_cb_user_data, - ffi.Pointer callback_id, - ) { - return _data_control_add_data_change_cb( - provider, - callback, - user_data, - result_callback, - result_cb_user_data, - callback_id, - ); - } - - late final _data_control_add_data_change_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - data_control_h, - data_control_data_change_cb, - ffi.Pointer, - data_control_add_callback_result_cb, - ffi.Pointer, - ffi.Pointer)>>('data_control_add_data_change_cb'); - late final _data_control_add_data_change_cb = - _data_control_add_data_change_cbPtr.asFunction< - int Function( - data_control_h, - data_control_data_change_cb, - ffi.Pointer, - data_control_add_callback_result_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Removes data change callback function. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/datasharing \n - /// %http://tizen.org/privilege/appmanager.launch - /// @remarks If you want to use this function, you must add privileges. - /// @param[in] provider Target provider handle - /// @param[in] callback_id Target callback ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DATA_CONTROL_ERROR_NONE Successful - /// @retval #DATA_CONTROL_ERROR_IO_ERROR I/O error - /// @retval #DATA_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DATA_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DATA_CONTROL_ERROR_PERMISSION_DENIED Permission denied - int data_control_remove_data_change_cb( - data_control_h provider, - int callback_id, - ) { - return _data_control_remove_data_change_cb( - provider, - callback_id, - ); - } - - late final _data_control_remove_data_change_cbPtr = - _lookup>( - 'data_control_remove_data_change_cb'); - late final _data_control_remove_data_change_cb = - _data_control_remove_data_change_cbPtr - .asFunction(); - - /// @brief Registers the local message port. - /// @details If the message port name is already registered, the previous local message port ID returns and the callback function is changed. \n - /// Multiple message ports can be registered. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specified callback is called only in the main thread. - /// @param[in] local_port The name of the local message port - /// @param[in] callback The callback function to be called when a message is received - /// @param[in] user_data The user data to be passed to the callback function - /// @return A local message port ID on success, - /// otherwise a negative error value - /// @retval #MESSAGE_PORT_ERROR_INVALID_PARAMETER The specified @a local_port or @a callback is NULL - /// @retval #MESSAGE_PORT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval MESSAGE_PORT_ERROR_IO_ERROR Internal I/O error - /// @see message_port_unregister_local_port() - int message_port_register_local_port( - ffi.Pointer local_port, - message_port_message_cb callback, - ffi.Pointer user_data, - ) { - return _message_port_register_local_port( - local_port, - callback, - user_data, - ); - } - - late final _message_port_register_local_portPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, message_port_message_cb, - ffi.Pointer)>>('message_port_register_local_port'); - late final _message_port_register_local_port = - _message_port_register_local_portPtr.asFunction< - int Function(ffi.Pointer, message_port_message_cb, - ffi.Pointer)>(); - - /// @brief Registers the trusted local message port. - /// @details If the message port name is already registered, the previous local message port ID returns and the callback function is changed. @n - /// It allows communications only if the applications are signed with the same certificate, which is uniquely assigned to the developer. @n - /// Multiple message ports can be registered. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specified callback is called only in the main thread. - /// @param[in] trusted_local_port The name of the trusted local message port - /// @param[in] callback The callback function to be called when a trusted message is received - /// @param[in] user_data The user data to be passed to the callback function - /// @return A trusted local message port ID on success, - /// otherwise a negative error value - /// @retval #MESSAGE_PORT_ERROR_INVALID_PARAMETER The specified @a trusted_local_port or @a callback is NULL - /// @retval #MESSAGE_PORT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGE_PORT_ERROR_IO_ERROR Internal I/O error - /// @see message_port_unregister_trusted_local_port() - int message_port_register_trusted_local_port( - ffi.Pointer trusted_local_port, - message_port_trusted_message_cb callback, - ffi.Pointer user_data, - ) { - return _message_port_register_trusted_local_port( - trusted_local_port, - callback, - user_data, - ); - } - - late final _message_port_register_trusted_local_portPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - message_port_trusted_message_cb, ffi.Pointer)>>( - 'message_port_register_trusted_local_port'); - late final _message_port_register_trusted_local_port = - _message_port_register_trusted_local_portPtr.asFunction< - int Function(ffi.Pointer, message_port_trusted_message_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the local message port. - /// @details This method unregisters the callback function with the specified local port ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] local_port_id The local message port ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGE_PORT_ERROR_NONE Successful - /// @retval #MESSAGE_PORT_ERROR_INVALID_PARAMETER The specified @a local_port_id is not positive - /// @retval #MESSAGE_PORT_ERROR_PORT_NOT_FOUND The specified @a local_port_id cannot be found - /// @retval #MESSAGE_PORT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGE_PORT_ERROR_IO_ERROR Internal I/O error - /// @see message_port_register_local_port() - int message_port_unregister_local_port( - int local_port_id, - ) { - return _message_port_unregister_local_port( - local_port_id, - ); - } - - late final _message_port_unregister_local_portPtr = - _lookup>( - 'message_port_unregister_local_port'); - late final _message_port_unregister_local_port = - _message_port_unregister_local_portPtr.asFunction(); - - /// @brief Registers the trusted local message port. - /// @details This method unregisters the callback function with the specified local port ID. @n - /// It allows communications only if the applications are signed with the same certificate, which is uniquely assigned to the developer. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] trusted_local_port_id The trusted local message port ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGE_PORT_ERROR_NONE Successful - /// @retval #MESSAGE_PORT_ERROR_INVALID_PARAMETER The specified @a trusted_local_port_id is not positive - /// @retval #MESSAGE_PORT_ERROR_PORT_NOT_FOUND The specified @a trusted_local_port_id cannot be found - /// @retval #MESSAGE_PORT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGE_PORT_ERROR_IO_ERROR Internal I/O error - /// @see message_port_register_trusted_local_port() - int message_port_unregister_trusted_local_port( - int trusted_local_port_id, - ) { - return _message_port_unregister_trusted_local_port( - trusted_local_port_id, - ); - } - - late final _message_port_unregister_trusted_local_portPtr = - _lookup>( - 'message_port_unregister_trusted_local_port'); - late final _message_port_unregister_trusted_local_port = - _message_port_unregister_trusted_local_portPtr - .asFunction(); - - /// @brief Checks whether the message port of a remote application is registered. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If this function returns a negative error value, the out parameter @a exist will not be changed. - /// @param[in] remote_app_id The ID of the remote application - /// @param[in] remote_port The name of the remote message port - /// @param[out] exist If @c true, the message port of the remote application exists; - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGE_PORT_ERROR_NONE Successful - /// @retval #MESSAGE_PORT_ERROR_INVALID_PARAMETER The specified @a remote_app_id or @a remote_port is NULL - /// @retval #MESSAGE_PORT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGE_PORT_ERROR_IO_ERROR Internal I/O error - int message_port_check_remote_port( - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - ffi.Pointer exist, - ) { - return _message_port_check_remote_port( - remote_app_id, - remote_port, - exist, - ); - } - - late final _message_port_check_remote_portPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('message_port_check_remote_port'); - late final _message_port_check_remote_port = - _message_port_check_remote_portPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Checks whether the trusted message port of a remote application is registered. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If this function returns a negative error value, the out parameter @a exist will not be changed. - /// @param[in] remote_app_id The ID of the remote application - /// @param[in] remote_port The name of the remote message port - /// @param[out] exist If @c true, the message port of the remote application exists; - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGE_PORT_ERROR_NONE Successful - /// @retval #MESSAGE_PORT_ERROR_INVALID_PARAMETER The specified @a remote_app_id or @a remote_port is @c NULL - /// @retval #MESSAGE_PORT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGE_PORT_ERROR_CERTIFICATE_NOT_MATCH The remote application is not signed with the same certificate - /// @retval #MESSAGE_PORT_ERROR_IO_ERROR Internal I/O error - int message_port_check_trusted_remote_port( - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - ffi.Pointer exist, - ) { - return _message_port_check_trusted_remote_port( - remote_app_id, - remote_port, - exist, - ); - } - - late final _message_port_check_trusted_remote_portPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>( - 'message_port_check_trusted_remote_port'); - late final _message_port_check_trusted_remote_port = - _message_port_check_trusted_remote_portPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Sends a message to the message port of a remote application. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks @a message must be released with bundle_free() after sending the message. - /// @param[in] remote_app_id The ID of the remote application - /// @param[in] remote_port The name of the remote message port - /// @param[in] message The message to be passed to the remote application, the recommended message size is under 4KB - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGE_PORT_ERROR_NONE Successful - /// @retval #MESSAGE_PORT_ERROR_INVALID_PARAMETER The specified @a remote_app_id, @a remote_port or @a message is NULL - /// @retval #MESSAGE_PORT_ERROR_PORT_NOT_FOUND The message port of the remote application cannot be found - /// @retval #MESSAGE_PORT_ERROR_MAX_EXCEEDED The size of message has exceeded the maximum limit - /// @retval #MESSAGE_PORT_ERROR_RESOURCE_UNAVAILABLE Resource temporarily unavailable - /// @retval #MESSAGE_PORT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGE_PORT_ERROR_IO_ERROR Internal I/O error - /// @post It invokes message_port_message_cb() on the remote application. - /// @see message_port_message_cb() - /// @see message_port_register_local_port() - /// @see message_port_unregister_local_port() - /// - /// @code - /// #include - /// bundle *b = bundle_create(); - /// bundle_add(b, "key1", "value1"); - /// bundle_add(b, "key2", "value2"); - /// int ret = message_port_send_message("0123456789.BasicApp", "BasicAppPort", b); - /// bundle_free(b); - /// @endcode - int message_port_send_message( - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - ffi.Pointer message, - ) { - return _message_port_send_message( - remote_app_id, - remote_port, - message, - ); - } - - late final _message_port_send_messagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('message_port_send_message'); - late final _message_port_send_message = - _message_port_send_messagePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Sends a trusted message to the message port of a remote application. - /// @details This method allows communication only if the applications are signed with the same certificate, which is uniquely assigned to the developer. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a message using bundle_free() after sending the message. - /// @param[in] remote_app_id The ID of the remote application - /// @param[in] remote_port The name of the remote message port - /// @param[in] message The message to be passed to the remote application, the recommended message size is under 4KB - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGE_PORT_ERROR_NONE Successful - /// @retval #MESSAGE_PORT_ERROR_INVALID_PARAMETER The specified @a remote_app_id, @a remote_port or @a message is @c NULL - /// @retval #MESSAGE_PORT_ERROR_PORT_NOT_FOUND The message port of the remote application cannot be found - /// @retval #MESSAGE_PORT_ERROR_CERTIFICATE_NOT_MATCH The remote application is not signed with the same certificate - /// @retval #MESSAGE_PORT_ERROR_MAX_EXCEEDED The size of the message has exceeded the maximum limit - /// @retval #MESSAGE_PORT_ERROR_RESOURCE_UNAVAILABLE Resource is temporarily unavailable - /// @retval #MESSAGE_PORT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGE_PORT_ERROR_IO_ERROR Internal I/O error - /// @post It invokes message_port_trusted_message_cb() on the remote application. - /// @see message_port_trusted_message_cb() - /// @see message_port_register_trusted_local_port() - /// @see message_port_unregister_trusted_local_port() - int message_port_send_trusted_message( - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - ffi.Pointer message, - ) { - return _message_port_send_trusted_message( - remote_app_id, - remote_port, - message, - ); - } - - late final _message_port_send_trusted_messagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('message_port_send_trusted_message'); - late final _message_port_send_trusted_message = - _message_port_send_trusted_messagePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Sends a message with local port information to the message port of a remote application. - /// @details This method is used for bidirectional communication. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a message using bundle_free() after sending the message. - /// @param[in] remote_app_id The ID of the remote application - /// @param[in] remote_port The name of the remote message port - /// @param[in] message The message to be passed to the remote application, the recommended message size is under 4KB - /// @param[in] local_port_id The message port ID returned by message_port_register_local_port() or message_port_register_trusted_local_port() - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGE_PORT_ERROR_NONE Successful - /// @retval #MESSAGE_PORT_ERROR_INVALID_PARAMETER The specified @a remote_app_id, @a remote_port or @a message is @c NULL and - /// The specified @a local_port_id is not positive - /// @retval #MESSAGE_PORT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGE_PORT_ERROR_PORT_NOT_FOUND The port of the local or remote application cannot be found - /// @retval #MESSAGE_PORT_ERROR_MAX_EXCEEDED The size of the message has exceeded the maximum limit - /// @retval #MESSAGE_PORT_ERROR_IO_ERROR Internal I/O error - /// @post It invokes message_port_message_cb() on the remote application. - /// @see message_port_message_cb() - /// @see message_port_register_local_port() - /// @see message_port_unregister_local_port() - /// - /// @code - /// #include - /// - /// static void message_port_receive_cb(int local_port_id, const char *remote_app_id, const char *remote_port, bundle *message) {} - /// - /// int - /// main(int argc, char *argv[]) - /// { - /// bundle *b = bundle_create(); - /// bundle_add(b, "key1", "value1"); - /// bundle_add(b, "key2", "value2"); - /// - /// int local_port_id = message_port_register_local_port("HelloPort", message_port_receive_cb); - /// - /// int ret = message_port_send_message_with_local_port("0123456789.BasicApp", "BasicAppPort", b, local_port_id); - /// - /// bundle_free(b); - /// } - /// @endcode - int message_port_send_message_with_local_port( - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - ffi.Pointer message, - int local_port_id, - ) { - return _message_port_send_message_with_local_port( - remote_app_id, - remote_port, - message, - local_port_id, - ); - } - - late final _message_port_send_message_with_local_portPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int)>>('message_port_send_message_with_local_port'); - late final _message_port_send_message_with_local_port = - _message_port_send_message_with_local_portPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - /// @brief Sends a trusted message with local port information to the message port of a remote application. - /// @details This method is used for bidirectional communication. @n - /// It allows communications only if the applications are signed with the same certificate, which is uniquely assigned to the developer. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You muse release @a message using bundle_free() after sending the message. - /// @param[in] remote_app_id The ID of the remote application - /// @param[in] remote_port The name of the remote message port - /// @param[in] message The message to be passed to the remote application, the recommended message size is under 4KB - /// @param[in] local_port_id The message port ID returned by message_port_register_local_port() or message_port_register_trusted_local_port() - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGE_PORT_ERROR_NONE Successful - /// @retval #MESSAGE_PORT_ERROR_INVALID_PARAMETER The specified @a remote_app_id, @a remote_port or @a message is @c NULL and - /// specified @a local_port_id is not positive - /// @retval #MESSAGE_PORT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGE_PORT_ERROR_PORT_NOT_FOUND The port of the local or remote application cannot be found - /// @retval #MESSAGE_PORT_ERROR_CERTIFICATE_NOT_MATCH The remote application is not signed with the same certificate - /// @retval #MESSAGE_PORT_ERROR_MAX_EXCEEDED The size of the message has exceeded the maximum limit - /// @retval #MESSAGE_PORT_ERROR_IO_ERROR Internal I/O error - /// @post It invokes message_port_trusted_message_cb() on the remote application. - /// @see message_port_trusted_message_cb() - /// @see message_port_register_trusted_local_port() - /// @see message_port_unregister_trusted_local_port() - int message_port_send_trusted_message_with_local_port( - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - ffi.Pointer message, - int local_port_id, - ) { - return _message_port_send_trusted_message_with_local_port( - remote_app_id, - remote_port, - message, - local_port_id, - ); - } - - late final _message_port_send_trusted_message_with_local_portPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int)>>('message_port_send_trusted_message_with_local_port'); - late final _message_port_send_trusted_message_with_local_port = - _message_port_send_trusted_message_with_local_portPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - /// @brief Adds a callback called when a remote port is registered. - /// @details When remote port is registered, @a registered_cb function is called. - /// Each added callback has its own separate watcher. - /// @since_tizen 4.0 - /// @remarks The specified callback is called only in the main thread. - /// @param[in] remote_app_id The ID of the remote application - /// @param[in] remote_port The name of the remote message port - /// @param[in] trusted_remote_port Indicates whether remote port is trusted - /// @param[in] registered_cb The callback function to be called - /// when remote port is registered - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] watcher_id The ID of the watcher which is monitoring the remote port - /// registration events - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGE_PORT_ERROR_INVALID_PARAMETER The specified @a remote_app_id or @a remote_port - /// or @a registered_cb is NULL - /// @retval #MESSAGE_PORT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGE_PORT_ERROR_IO_ERROR Internal I/O error - /// @see message_port_registration_event_cb() - /// @see message_port_add_unregistered_cb() - /// @see message_port_remove_registration_event_cb() - int message_port_add_registered_cb( - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - bool trusted_remote_port, - message_port_registration_event_cb registered_cb, - ffi.Pointer user_data, - ffi.Pointer watcher_id, - ) { - return _message_port_add_registered_cb( - remote_app_id, - remote_port, - trusted_remote_port, - registered_cb, - user_data, - watcher_id, - ); - } - - late final _message_port_add_registered_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - message_port_registration_event_cb, - ffi.Pointer, - ffi.Pointer)>>('message_port_add_registered_cb'); - late final _message_port_add_registered_cb = - _message_port_add_registered_cbPtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - bool, - message_port_registration_event_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Adds a callback called when a remote port is unregistered. - /// @details When the remote port is unregistered, @a unregistered_cb function is called. - /// Each added callback has its own separate watcher. - /// @remarks The specified callback is called only in the main thread. - /// @since_tizen 4.0 - /// @param[in] remote_app_id The ID of the remote application - /// @param[in] remote_port The name of the remote message port - /// @param[in] trusted_remote_port Indicates whether remote port is trusted - /// @param[in] unregistered_cb The callback function to be called - /// when remote port is unregistered - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] watcher_id The ID of the watcher which is monitoring the remote port - /// unregistration events - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGE_PORT_ERROR_INVALID_PARAMETER The specified @a remote_app_id or @a remote_port - /// or @a unregistered_cb is NULL - /// @retval #MESSAGE_PORT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MESSAGE_PORT_ERROR_IO_ERROR Internal I/O error - /// @see message_port_registration_event_cb() - /// @see message_port_add_registered_cb() - /// @see message_port_remove_registration_event_cb() - int message_port_add_unregistered_cb( - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - bool trusted_remote_port, - message_port_registration_event_cb unregistered_cb, - ffi.Pointer user_data, - ffi.Pointer watcher_id, - ) { - return _message_port_add_unregistered_cb( - remote_app_id, - remote_port, - trusted_remote_port, - unregistered_cb, - user_data, - watcher_id, - ); - } - - late final _message_port_add_unregistered_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - message_port_registration_event_cb, - ffi.Pointer, - ffi.Pointer)>>('message_port_add_unregistered_cb'); - late final _message_port_add_unregistered_cb = - _message_port_add_unregistered_cbPtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - bool, - message_port_registration_event_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Removes the registration/unregistration callback associated with the given watcher. - /// @since_tizen 4.0 - /// @param[in] watcher_id The ID of watcher which is monitoring remote port - /// registration/unregistration events - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MESSAGE_PORT_ERROR_INVALID_PARAMETER The specified @a watcher_id is not correct - /// @retval #MESSAGE_PORT_ERROR_IO_ERROR Internal I/O error - /// @see message_port_registration_event_cb() - /// @see message_port_add_registered_cb() - /// @see message_port_add_unregistered_cb() - int message_port_remove_registration_event_cb( - int watcher_id, - ) { - return _message_port_remove_registration_event_cb( - watcher_id, - ); - } - - late final _message_port_remove_registration_event_cbPtr = - _lookup>( - 'message_port_remove_registration_event_cb'); - late final _message_port_remove_registration_event_cb = - _message_port_remove_registration_event_cbPtr - .asFunction(); - - /// @brief Retrieves all application IDs of each package. - /// @since_tizen 2.3 - /// @param[in] package_info The package info handle - /// @param[in] comp_type The application component type - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE No such package - /// @post This function invokes package_info_app_cb() repeatedly for each package. - /// @see package_info_app_cb() - int package_info_foreach_app_from_package( - package_info_h package_info, - int comp_type, - package_info_app_cb callback, - ffi.Pointer user_data, - ) { - return _package_info_foreach_app_from_package( - package_info, - comp_type, - callback, - user_data, - ); - } - - late final _package_info_foreach_app_from_packagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, ffi.Int32, package_info_app_cb, - ffi.Pointer)>>('package_info_foreach_app_from_package'); - late final _package_info_foreach_app_from_package = - _package_info_foreach_app_from_packagePtr.asFunction< - int Function(package_info_h, int, package_info_app_cb, - ffi.Pointer)>(); - - /// @brief Destroys the package information handle and releases all its resources. - /// @since_tizen 2.3 - /// @param[in] package_info The package information handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see package_manager_foreach_package_info() - /// @see package_manager_get_package_info() - int package_info_destroy( - package_info_h package_info, - ) { - return _package_info_destroy( - package_info, - ); - } - - late final _package_info_destroyPtr = - _lookup>( - 'package_info_destroy'); - late final _package_info_destroy = - _package_info_destroyPtr.asFunction(); - - /// @brief Gets the package name. - /// @since_tizen 2.3 - /// @remarks You must release @a package using free(). - /// @param[in] package_info The package information - /// @param[out] package The package name - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int package_info_get_package( - package_info_h package_info, - ffi.Pointer> package, - ) { - return _package_info_get_package( - package_info, - package, - ); - } - - late final _package_info_get_packagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, - ffi.Pointer>)>>('package_info_get_package'); - late final _package_info_get_package = - _package_info_get_packagePtr.asFunction< - int Function(package_info_h, ffi.Pointer>)>(); - - /// @brief Gets the main application ID of the package. - /// @since_tizen 4.0 - /// @remarks You must release @a main_app_id using free(). - /// @param[in] package_info The package information - /// @param[out] main_app_id The main application ID of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_info_get_main_app_id( - package_info_h package_info, - ffi.Pointer> main_app_id, - ) { - return _package_info_get_main_app_id( - package_info, - main_app_id, - ); - } - - late final _package_info_get_main_app_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_info_h, ffi.Pointer>)>>( - 'package_info_get_main_app_id'); - late final _package_info_get_main_app_id = - _package_info_get_main_app_idPtr.asFunction< - int Function(package_info_h, ffi.Pointer>)>(); - - /// @brief Gets the label of the package. - /// @since_tizen 2.3 - /// @remarks You must release @a label using free(). - /// @param[in] package_info The package information - /// @param[out] label The label of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_info_get_label( - package_info_h package_info, - ffi.Pointer> label, - ) { - return _package_info_get_label( - package_info, - label, - ); - } - - late final _package_info_get_labelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, - ffi.Pointer>)>>('package_info_get_label'); - late final _package_info_get_label = _package_info_get_labelPtr.asFunction< - int Function(package_info_h, ffi.Pointer>)>(); - - /// @brief Gets the absolute path to the icon image. - /// @since_tizen 2.3 - /// @remarks You must release @a path using free(). - /// @param[in] package_info The package information - /// @param[out] path The path of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_info_get_icon( - package_info_h package_info, - ffi.Pointer> path, - ) { - return _package_info_get_icon( - package_info, - path, - ); - } - - late final _package_info_get_iconPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, - ffi.Pointer>)>>('package_info_get_icon'); - late final _package_info_get_icon = _package_info_get_iconPtr.asFunction< - int Function(package_info_h, ffi.Pointer>)>(); - - /// @brief Gets the version of the package. - /// @since_tizen 2.3 - /// @remarks You must release @a version using free(). - /// @param[in] package_info The package information - /// @param[out] version The version of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_info_get_version( - package_info_h package_info, - ffi.Pointer> version, - ) { - return _package_info_get_version( - package_info, - version, - ); - } - - late final _package_info_get_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, - ffi.Pointer>)>>('package_info_get_version'); - late final _package_info_get_version = - _package_info_get_versionPtr.asFunction< - int Function(package_info_h, ffi.Pointer>)>(); - - /// @brief Gets the type of the package. - /// @since_tizen 2.3 - /// @remarks You must release @a type using free(). - /// @param[in] package_info The package information - /// @param[out] type The type of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_info_get_type( - package_info_h package_info, - ffi.Pointer> type, - ) { - return _package_info_get_type( - package_info, - type, - ); - } - - late final _package_info_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, - ffi.Pointer>)>>('package_info_get_type'); - late final _package_info_get_type = _package_info_get_typePtr.asFunction< - int Function(package_info_h, ffi.Pointer>)>(); - - /// @brief Gets the installed storage for the given package. - /// @since_tizen 2.3 - /// @param[in] package_info The package information - /// @param[out] storage The installed storage - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int package_info_get_installed_storage( - package_info_h package_info, - ffi.Pointer storage, - ) { - return _package_info_get_installed_storage( - package_info, - storage, - ); - } - - late final _package_info_get_installed_storagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, - ffi.Pointer)>>('package_info_get_installed_storage'); - late final _package_info_get_installed_storage = - _package_info_get_installed_storagePtr - .asFunction)>(); - - /// @brief Gets the root path of the package. - /// @since_tizen 2.3 - /// @remarks You must release @a path using free(). - /// @param[in] package_info The package information - /// @param[out] path The root path of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_info_get_root_path( - package_info_h package_info, - ffi.Pointer> path, - ) { - return _package_info_get_root_path( - package_info, - path, - ); - } - - late final _package_info_get_root_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_info_h, ffi.Pointer>)>>( - 'package_info_get_root_path'); - late final _package_info_get_root_path = - _package_info_get_root_pathPtr.asFunction< - int Function(package_info_h, ffi.Pointer>)>(); - - /// @platform - /// @brief Gets the name of the TEP(Tizen Expansion Package). - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @remarks Name must be released using free(). - /// @param[in] package_info The package information - /// @param[out] name The name of the tep - /// @return 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR Severe system error - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - int package_info_get_tep_name( - package_info_h package_info, - ffi.Pointer> name, - ) { - return _package_info_get_tep_name( - package_info, - name, - ); - } - - late final _package_info_get_tep_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_info_h, ffi.Pointer>)>>( - 'package_info_get_tep_name'); - late final _package_info_get_tep_name = - _package_info_get_tep_namePtr.asFunction< - int Function(package_info_h, ffi.Pointer>)>(); - - /// @brief Checks whether the package is system package. - /// @since_tizen 2.3 - /// @param[in] package_info The package information - /// @param[out] system @c true if the package is system package, - /// otherwise @c false if the package is not system package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_info_is_system_package( - package_info_h package_info, - ffi.Pointer system, - ) { - return _package_info_is_system_package( - package_info, - system, - ); - } - - late final _package_info_is_system_packagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, - ffi.Pointer)>>('package_info_is_system_package'); - late final _package_info_is_system_package = - _package_info_is_system_packagePtr - .asFunction)>(); - - /// @brief Checks whether the package is removable. - /// @since_tizen 2.3 - /// @param[in] package_info The package information - /// @param[out] removable The removable info of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR IO error - int package_info_is_removable_package( - package_info_h package_info, - ffi.Pointer removable, - ) { - return _package_info_is_removable_package( - package_info, - removable, - ); - } - - late final _package_info_is_removable_packagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, - ffi.Pointer)>>('package_info_is_removable_package'); - late final _package_info_is_removable_package = - _package_info_is_removable_packagePtr - .asFunction)>(); - - /// @brief Checks whether the package is preloaded. - /// @since_tizen 2.3 - /// @param[in] package_info The package information - /// @param[out] preload The preload info of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_info_is_preload_package( - package_info_h package_info, - ffi.Pointer preload, - ) { - return _package_info_is_preload_package( - package_info, - preload, - ); - } - - late final _package_info_is_preload_packagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, - ffi.Pointer)>>('package_info_is_preload_package'); - late final _package_info_is_preload_package = - _package_info_is_preload_packagePtr - .asFunction)>(); - - /// @brief Checks whether two package information is equal. - /// @since_tizen 2.3 - /// @param[in] lhs The first package information to be compared - /// @param[in] rhs The second package information to be compared - /// @param[out] equal @c true if the package information are equal, - /// otherwise @c false if package information are not equal - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Database error occurred - int package_info_is_equal( - package_info_h lhs, - package_info_h rhs, - ffi.Pointer equal, - ) { - return _package_info_is_equal( - lhs, - rhs, - equal, - ); - } - - late final _package_info_is_equalPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, package_info_h, - ffi.Pointer)>>('package_info_is_equal'); - late final _package_info_is_equal = _package_info_is_equalPtr.asFunction< - int Function(package_info_h, package_info_h, ffi.Pointer)>(); - - /// @brief Checks whether the package info is accessible for the given package. - /// @since_tizen 2.3 - /// @param[in] package_info The package information - /// @param[out] accessible @c true if the package info is accessible, - /// otherwise @c false if the package info is not accessible - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int package_info_is_accessible( - package_info_h package_info, - ffi.Pointer accessible, - ) { - return _package_info_is_accessible( - package_info, - accessible, - ); - } - - late final _package_info_is_accessiblePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, - ffi.Pointer)>>('package_info_is_accessible'); - late final _package_info_is_accessible = _package_info_is_accessiblePtr - .asFunction)>(); - - /// @brief Gets the installed time for the given package. - /// @details If the package was updated, the @a installed_time represents updated time. - /// So, the meaning of 'installed time' corresponds with 'last modified time'. - /// @since_tizen 4.0 - /// @param[in] package_info The package information - /// @param[out] installed_time The integer value of time_t type for installed time - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Database error occurred - int package_info_get_installed_time( - package_info_h package_info, - ffi.Pointer installed_time, - ) { - return _package_info_get_installed_time( - package_info, - installed_time, - ); - } - - late final _package_info_get_installed_timePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, - ffi.Pointer)>>('package_info_get_installed_time'); - late final _package_info_get_installed_time = - _package_info_get_installed_timePtr - .asFunction)>(); - - /// @brief Clones the package information handle. - /// @since_tizen 2.3 - /// @param[out] clone The newly created package information handle - /// @param[in] package_info The package information - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE The package is not installed - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int package_info_clone( - ffi.Pointer clone, - package_info_h package_info, - ) { - return _package_info_clone( - clone, - package_info, - ); - } - - late final _package_info_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - package_info_h)>>('package_info_clone'); - late final _package_info_clone = _package_info_clonePtr - .asFunction, package_info_h)>(); - - /// @brief Gets the package information for the given package - /// @since_tizen 2.3 - /// @remarks You must release @a package_info using package_info_destroy(). - /// @param[in] package The ID of the package - /// @param[out] package_info The package information for the given package ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE The package is not installed - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int package_info_create( - ffi.Pointer package, - ffi.Pointer package_info, - ) { - return _package_info_create( - package, - package_info, - ); - } - - late final _package_info_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('package_info_create'); - late final _package_info_create = _package_info_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Retrieves certification information of the package. - /// @since_tizen 2.3 - /// @param[in] package_info The package information - /// @param[in] callback The iteration callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_info_foreach_cert_info( - package_info_h package_info, - package_info_cert_info_cb callback, - ffi.Pointer user_data, - ) { - return _package_info_foreach_cert_info( - package_info, - callback, - user_data, - ); - } - - late final _package_info_foreach_cert_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, package_info_cert_info_cb, - ffi.Pointer)>>('package_info_foreach_cert_info'); - late final _package_info_foreach_cert_info = - _package_info_foreach_cert_infoPtr.asFunction< - int Function(package_info_h, package_info_cert_info_cb, - ffi.Pointer)>(); - - /// @brief Retrieves privilege information of the package. - /// @since_tizen 2.3 - /// @param[in] package_info The package information - /// @param[in] callback The iteration callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_info_foreach_privilege_info( - package_info_h package_info, - package_info_privilege_info_cb callback, - ffi.Pointer user_data, - ) { - return _package_info_foreach_privilege_info( - package_info, - callback, - user_data, - ); - } - - late final _package_info_foreach_privilege_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_h, package_info_privilege_info_cb, - ffi.Pointer)>>('package_info_foreach_privilege_info'); - late final _package_info_foreach_privilege_info = - _package_info_foreach_privilege_infoPtr.asFunction< - int Function(package_info_h, package_info_privilege_info_cb, - ffi.Pointer)>(); - - /// @brief Gets the package update information for the given package. - /// @since_tizen 4.0 - /// @remarks You must release @a info using package_info_updateinfo_destroy(). - /// @param[in] pkgid The ID of the package - /// @param[out] info The package update information for the given package ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE The package is not installed - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Database error occurred - /// @see package_info_updateinfo_destroy() - int package_info_updateinfo_create( - ffi.Pointer pkgid, - ffi.Pointer info, - ) { - return _package_info_updateinfo_create( - pkgid, - info, - ); - } - - late final _package_info_updateinfo_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>( - 'package_info_updateinfo_create'); - late final _package_info_updateinfo_create = - _package_info_updateinfo_createPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the package name. - /// @since_tizen 4.0 - /// @remarks You must release @a package using free(). - /// @param[in] info The package update information - /// @param[out] package The package name - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Internal I/O error occured - int package_info_updateinfo_get_pkgid( - package_updateinfo_h info, - ffi.Pointer> package, - ) { - return _package_info_updateinfo_get_pkgid( - info, - package, - ); - } - - late final _package_info_updateinfo_get_pkgidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_updateinfo_h, ffi.Pointer>)>>( - 'package_info_updateinfo_get_pkgid'); - late final _package_info_updateinfo_get_pkgid = - _package_info_updateinfo_get_pkgidPtr.asFunction< - int Function( - package_updateinfo_h, ffi.Pointer>)>(); - - /// @brief Gets the update version of package. - /// @since_tizen 4.0 - /// @remarks You must release @a version using free(). - /// @param[in] info The package update information - /// @param[out] version The package update version - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Internal I/O error occured - int package_info_updateinfo_get_version( - package_updateinfo_h info, - ffi.Pointer> version, - ) { - return _package_info_updateinfo_get_version( - info, - version, - ); - } - - late final _package_info_updateinfo_get_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_updateinfo_h, ffi.Pointer>)>>( - 'package_info_updateinfo_get_version'); - late final _package_info_updateinfo_get_version = - _package_info_updateinfo_get_versionPtr.asFunction< - int Function( - package_updateinfo_h, ffi.Pointer>)>(); - - /// @brief Gets the update type of package. - /// @since_tizen 4.0 - /// @param[in] info The package update information - /// @param[out] type The package update type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Internal I/O error occured - int package_info_updateinfo_get_type( - package_updateinfo_h info, - ffi.Pointer type, - ) { - return _package_info_updateinfo_get_type( - info, - type, - ); - } - - late final _package_info_updateinfo_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_updateinfo_h, - ffi.Pointer)>>('package_info_updateinfo_get_type'); - late final _package_info_updateinfo_get_type = - _package_info_updateinfo_get_typePtr.asFunction< - int Function(package_updateinfo_h, ffi.Pointer)>(); - - /// @brief Destroys the package update information handle and releases all its resources. - /// @since_tizen 4.0 - /// @param[in] info The package update information handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see package_info_updateinfo_create() - int package_info_updateinfo_destroy( - package_updateinfo_h info, - ) { - return _package_info_updateinfo_destroy( - info, - ); - } - - late final _package_info_updateinfo_destroyPtr = - _lookup>( - 'package_info_updateinfo_destroy'); - late final _package_info_updateinfo_destroy = - _package_info_updateinfo_destroyPtr - .asFunction(); - - /// @brief Retrieve update information of all packages and invoke callback for each of it. - /// @since_tizen 4.0 - /// @param[in] callback The iteration callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_info_updateinfo_foreach_info( - package_info_updateinfo_cb callback, - ffi.Pointer user_data, - ) { - return _package_info_updateinfo_foreach_info( - callback, - user_data, - ); - } - - late final _package_info_updateinfo_foreach_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_info_updateinfo_cb, - ffi.Pointer)>>('package_info_updateinfo_foreach_info'); - late final _package_info_updateinfo_foreach_info = - _package_info_updateinfo_foreach_infoPtr.asFunction< - int Function(package_info_updateinfo_cb, ffi.Pointer)>(); - - /// @brief Creates a package manager handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.info - /// @remarks You must release @a manager using package_manager_destroy(). - /// @param[out] manager The package manager handle that is newly created on success - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Internal I/O error - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @see package_manager_destroy() - int package_manager_create( - ffi.Pointer manager, - ) { - return _package_manager_create( - manager, - ); - } - - late final _package_manager_createPtr = _lookup< - ffi.NativeFunction)>>( - 'package_manager_create'); - late final _package_manager_create = _package_manager_createPtr - .asFunction)>(); - - /// @brief Destroys the package manager handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] manager The package manager handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see package_manager_create() - int package_manager_destroy( - package_manager_h manager, - ) { - return _package_manager_destroy( - manager, - ); - } - - late final _package_manager_destroyPtr = - _lookup>( - 'package_manager_destroy'); - late final _package_manager_destroy = - _package_manager_destroyPtr.asFunction(); - - /// @brief Sets the event status of the package when the package is installed, uninstalled, or updated. - /// @details You can combine multiple status using OR operation which you want to listen. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param [in] manager The package manager handle - /// @param [in] status_type The status of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Internal I/O error - /// @see package_manager_status_type_e - /// @see package_manager_set_event_cb() - int package_manager_set_event_status( - package_manager_h manager, - int status_type, - ) { - return _package_manager_set_event_status( - manager, - status_type, - ); - } - - late final _package_manager_set_event_statusPtr = - _lookup>( - 'package_manager_set_event_status'); - late final _package_manager_set_event_status = - _package_manager_set_event_statusPtr - .asFunction(); - - /// @brief Registers a callback function to be invoked when the package is installed, uninstalled, or updated. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.info - /// @param[in] manager The package manager handle - /// @param[in] callback The callback function to be registered - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @post package_manager_event_cb() will be invoked. - /// @see package_manager_set_event_status() - /// @see package_manager_event_cb() - /// @see package_manager_unset_event_cb() - int package_manager_set_event_cb( - package_manager_h manager, - package_manager_event_cb callback, - ffi.Pointer user_data, - ) { - return _package_manager_set_event_cb( - manager, - callback, - user_data, - ); - } - - late final _package_manager_set_event_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_manager_h, package_manager_event_cb, - ffi.Pointer)>>('package_manager_set_event_cb'); - late final _package_manager_set_event_cb = - _package_manager_set_event_cbPtr.asFunction< - int Function(package_manager_h, package_manager_event_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] manager The package manager handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see package_manager_event_cb() - /// @see package_manager_set_event_cb() - int package_manager_unset_event_cb( - package_manager_h manager, - ) { - return _package_manager_unset_event_cb( - manager, - ); - } - - late final _package_manager_unset_event_cbPtr = - _lookup>( - 'package_manager_unset_event_cb'); - late final _package_manager_unset_event_cb = - _package_manager_unset_event_cbPtr - .asFunction(); - - /// @brief Retrieves all package information of installed packages. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.info - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @post This function invokes package_manager_package_info_cb() repeatedly for each package information. - /// @see package_manager_package_info_cb() - int package_manager_foreach_package_info( - package_manager_package_info_cb callback, - ffi.Pointer user_data, - ) { - return _package_manager_foreach_package_info( - callback, - user_data, - ); - } - - late final _package_manager_foreach_package_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_manager_package_info_cb, - ffi.Pointer)>>('package_manager_foreach_package_info'); - late final _package_manager_foreach_package_info = - _package_manager_foreach_package_infoPtr.asFunction< - int Function( - package_manager_package_info_cb, ffi.Pointer)>(); - - /// @brief Gets the package ID for the given app ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.info - /// @param[in] app_id The ID of the application - /// @param[out] package_id The ID of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - int package_manager_get_package_id_by_app_id( - ffi.Pointer app_id, - ffi.Pointer> package_id, - ) { - return _package_manager_get_package_id_by_app_id( - app_id, - package_id, - ); - } - - late final _package_manager_get_package_id_by_app_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer>)>>( - 'package_manager_get_package_id_by_app_id'); - late final _package_manager_get_package_id_by_app_id = - _package_manager_get_package_id_by_app_idPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Gets the package information for the given package. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.info - /// @remarks You must release @a package_info using package_info_destroy(). - /// @param[in] package_id The ID of the package - /// @param[out] package_info The package information for the given package ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Database error occurred - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - int package_manager_get_package_info( - ffi.Pointer package_id, - ffi.Pointer package_info, - ) { - return _package_manager_get_package_info( - package_id, - package_info, - ); - } - - late final _package_manager_get_package_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>( - 'package_manager_get_package_info'); - late final _package_manager_get_package_info = - _package_manager_get_package_infoPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Compares whether two package certifications are matched. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] lhs_package_id The first package ID to compare - /// @param[in] rhs_package_id The second package ID to compare - /// @param[out] compare_result @c 0 if the certification information are matched, - /// otherwise the compared result - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Database error occurred - int package_manager_compare_package_cert_info( - ffi.Pointer lhs_package_id, - ffi.Pointer rhs_package_id, - ffi.Pointer compare_result, - ) { - return _package_manager_compare_package_cert_info( - lhs_package_id, - rhs_package_id, - compare_result, - ); - } - - late final _package_manager_compare_package_cert_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>( - 'package_manager_compare_package_cert_info'); - late final _package_manager_compare_package_cert_info = - _package_manager_compare_package_cert_infoPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Compares whether two app certifications are matched. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] lhs_app_id The first app ID to compare - /// @param[in] rhs_app_id The second app ID to compare - /// @param[out] compare_result @c 0 if the certification information are matched, - /// otherwise the compared result - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Database error occurred - int package_manager_compare_app_cert_info( - ffi.Pointer lhs_app_id, - ffi.Pointer rhs_app_id, - ffi.Pointer compare_result, - ) { - return _package_manager_compare_app_cert_info( - lhs_app_id, - rhs_app_id, - compare_result, - ); - } - - late final _package_manager_compare_app_cert_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>( - 'package_manager_compare_app_cert_info'); - late final _package_manager_compare_app_cert_info = - _package_manager_compare_app_cert_infoPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Checks whether the package is preloaded by @a app_id. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.info - /// @param[in] app_id The ID of the application - /// @param[out] preload The preload info of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - int package_manager_is_preload_package_by_app_id( - ffi.Pointer app_id, - ffi.Pointer preload, - ) { - return _package_manager_is_preload_package_by_app_id( - app_id, - preload, - ); - } - - late final _package_manager_is_preload_package_by_app_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>>( - 'package_manager_is_preload_package_by_app_id'); - late final _package_manager_is_preload_package_by_app_id = - _package_manager_is_preload_package_by_app_idPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the package permission type by @a app_id. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.info - /// @param[in] app_id The ID of the application - /// @param[out] permission_type The package permission type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - int package_manager_get_permission_type( - ffi.Pointer app_id, - ffi.Pointer permission_type, - ) { - return _package_manager_get_permission_type( - app_id, - permission_type, - ); - } - - late final _package_manager_get_permission_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('package_manager_get_permission_type'); - late final _package_manager_get_permission_type = - _package_manager_get_permission_typePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Clears the application's internal and external cache directory, asynchronously. - /// @details All files stored in the cache directory of the application specified with the package ID are removed. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.clearcache - /// @param[in] package_id The package ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE No such package - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR Severe system error - int package_manager_clear_cache_dir( - ffi.Pointer package_id, - ) { - return _package_manager_clear_cache_dir( - package_id, - ); - } - - late final _package_manager_clear_cache_dirPtr = - _lookup)>>( - 'package_manager_clear_cache_dir'); - late final _package_manager_clear_cache_dir = - _package_manager_clear_cache_dirPtr - .asFunction)>(); - - /// @platform - /// @brief Clears all applications' internal and external cache directory, asynchronously. - /// @details All files stored in the cache directory of each application are removed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE No such package - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR Severe system error - int package_manager_clear_all_cache_dir() { - return _package_manager_clear_all_cache_dir(); - } - - late final _package_manager_clear_all_cache_dirPtr = - _lookup>( - 'package_manager_clear_all_cache_dir'); - late final _package_manager_clear_all_cache_dir = - _package_manager_clear_all_cache_dirPtr.asFunction(); - - /// @platform - /// @brief Clears internal and external data directories used by applications in the given package. - /// @details All files stored in data directories used by applications in the package specified with the @a package_id are removed. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @param[in] package_id The package ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE No such package - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR Severe system error - int package_manager_clear_data_dir( - ffi.Pointer package_id, - ) { - return _package_manager_clear_data_dir( - package_id, - ); - } - - late final _package_manager_clear_data_dirPtr = - _lookup)>>( - 'package_manager_clear_data_dir'); - late final _package_manager_clear_data_dir = - _package_manager_clear_data_dirPtr - .asFunction)>(); - - /// @brief Gets the package size information, asynchronously. - /// @details The package size info is asynchronously obtained by the callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.info - /// @param[in] package_id The package ID - /// @param[in] callback The asynchronous callback function to get the package size information - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE No such package - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR Severe system error - int package_manager_get_package_size_info( - ffi.Pointer package_id, - package_manager_size_info_receive_cb callback, - ffi.Pointer user_data, - ) { - return _package_manager_get_package_size_info( - package_id, - callback, - user_data, - ); - } - - late final _package_manager_get_package_size_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - package_manager_size_info_receive_cb, - ffi.Pointer)>>('package_manager_get_package_size_info'); - late final _package_manager_get_package_size_info = - _package_manager_get_package_size_infoPtr.asFunction< - int Function(ffi.Pointer, - package_manager_size_info_receive_cb, ffi.Pointer)>(); - - /// @platform - /// @brief Gets the total package size information, asynchronously. - /// @details The total package size info is asynchronously obtained by the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.info - /// @param[in] callback The asynchronous callback function to get the total package size information - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE No such package - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR Severe system error - int package_manager_get_total_package_size_info( - package_manager_total_size_info_receive_cb callback, - ffi.Pointer user_data, - ) { - return _package_manager_get_total_package_size_info( - callback, - user_data, - ); - } - - late final _package_manager_get_total_package_size_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_manager_total_size_info_receive_cb, - ffi.Pointer)>>( - 'package_manager_get_total_package_size_info'); - late final _package_manager_get_total_package_size_info = - _package_manager_get_total_package_size_infoPtr.asFunction< - int Function(package_manager_total_size_info_receive_cb, - ffi.Pointer)>(); - - /// @brief Creates the package information filter handle from db. - /// @details The filtered result will be based on AND operation of all added filter properties. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.info - /// @param[out] handle Pointer to the package info filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @post package_manager_filter_destroy() - /// @see package_manager_filter_add_bool() - /// @see package_manager_filter_foreach_pkginfo() - int package_manager_filter_create( - ffi.Pointer handle, - ) { - return _package_manager_filter_create( - handle, - ); - } - - late final _package_manager_filter_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'package_manager_filter_create'); - late final _package_manager_filter_create = _package_manager_filter_createPtr - .asFunction)>(); - - /// @brief This API destroys the package information filter handle freeing up all the resources - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] handle Pointer to the package info filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @pre package_manager_filter_create() - /// @see package_manager_filter_count() - /// @see package_manager_filter_foreach_package_info() - int package_manager_filter_destroy( - package_manager_filter_h handle, - ) { - return _package_manager_filter_destroy( - handle, - ); - } - - late final _package_manager_filter_destroyPtr = - _lookup>( - 'package_manager_filter_destroy'); - late final _package_manager_filter_destroy = - _package_manager_filter_destroyPtr - .asFunction(); - - /// @brief This API adds a boolean filter property to the filter handle - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] handle Pointer to the package info filter handle - /// @param[in] property boolean property name - /// @param[in] value value corresponding to the property - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @pre package_manager_filter_create() - /// @post package_manager_filter_destroy() - /// @see package_manager_filter_count() - /// @see package_manager_filter_foreach_package_info() - int package_manager_filter_add_bool( - package_manager_filter_h handle, - ffi.Pointer property, - bool value, - ) { - return _package_manager_filter_add_bool( - handle, - property, - value, - ); - } - - late final _package_manager_filter_add_boolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_manager_filter_h, ffi.Pointer, - ffi.Bool)>>('package_manager_filter_add_bool'); - late final _package_manager_filter_add_bool = - _package_manager_filter_add_boolPtr.asFunction< - int Function( - package_manager_filter_h, ffi.Pointer, bool)>(); - - /// @brief This API counts the package that satisfy the filter conditions - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.info - /// @param[in] handle Pointer to the package info filter handle - /// @param[out] count Pointer to store the count value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @pre package_manager_filter_create() - /// @post package_manager_filter_destroy() - /// @see package_manager_filter_foreach_package_info() - int package_manager_filter_count( - package_manager_filter_h handle, - ffi.Pointer count, - ) { - return _package_manager_filter_count( - handle, - count, - ); - } - - late final _package_manager_filter_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_manager_filter_h, - ffi.Pointer)>>('package_manager_filter_count'); - late final _package_manager_filter_count = - _package_manager_filter_countPtr.asFunction< - int Function(package_manager_filter_h, ffi.Pointer)>(); - - /// @brief This API executes the user supplied callback function for each package that satisfy the filter conditions - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.info - /// @param[in] handle Pointer to the package info filter handle - /// @param[in] callback callback function - /// @param[in] user_data user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @pre package_manager_filter_create() - /// @post package_manager_filter_destroy() - /// @post This function invokes package_manager_package_info_cb() repeatedly for each package information. - /// @see package_manager_package_info_cb() - /// @see package_manager_filter_count() - int package_manager_filter_foreach_package_info( - package_manager_filter_h handle, - package_manager_package_info_cb callback, - ffi.Pointer user_data, - ) { - return _package_manager_filter_foreach_package_info( - handle, - callback, - user_data, - ); - } - - late final _package_manager_filter_foreach_package_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_manager_filter_h, - package_manager_package_info_cb, ffi.Pointer)>>( - 'package_manager_filter_foreach_package_info'); - late final _package_manager_filter_foreach_package_info = - _package_manager_filter_foreach_package_infoPtr.asFunction< - int Function(package_manager_filter_h, - package_manager_package_info_cb, ffi.Pointer)>(); - - /// @platform - /// @brief Generates request for getting License, asynchronously. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @remarks You must release @a req_data and @a license_url by yourself. - /// @param[in] resp_data The response data string of the purchase request - /// @param[out] req_data License request data - /// @param[out] license_url License acquisition url data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Internal I/O error - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @post package_manager_drm_register_license - int package_manager_drm_generate_license_request( - ffi.Pointer resp_data, - ffi.Pointer> req_data, - ffi.Pointer> license_url, - ) { - return _package_manager_drm_generate_license_request( - resp_data, - req_data, - license_url, - ); - } - - late final _package_manager_drm_generate_license_requestPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>>( - 'package_manager_drm_generate_license_request'); - late final _package_manager_drm_generate_license_request = - _package_manager_drm_generate_license_requestPtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>(); - - /// @platform - /// @brief Registers encrypted license, asynchronously. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @param[in] resp_data The response data string of the rights request - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Internal I/O error - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @pre package_manager_drm_generate_license_request - int package_manager_drm_register_license( - ffi.Pointer resp_data, - ) { - return _package_manager_drm_register_license( - resp_data, - ); - } - - late final _package_manager_drm_register_licensePtr = - _lookup)>>( - 'package_manager_drm_register_license'); - late final _package_manager_drm_register_license = - _package_manager_drm_register_licensePtr - .asFunction)>(); - - /// @platform - /// @brief Decrypts contents which is encrypted, asynchronously. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @param[in] drm_file_path DRM file path - /// @param[in] decrypted_file_path Decrypted file path - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Internal I/O error - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - int package_manager_drm_decrypt_package( - ffi.Pointer drm_file_path, - ffi.Pointer decrypted_file_path, - ) { - return _package_manager_drm_decrypt_package( - drm_file_path, - decrypted_file_path, - ); - } - - late final _package_manager_drm_decrypt_packagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('package_manager_drm_decrypt_package'); - late final _package_manager_drm_decrypt_package = - _package_manager_drm_decrypt_packagePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Retrieves data size from given handle - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] handle Package size info handle - /// @param[out] data_size Data size will be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int package_size_info_get_data_size( - package_size_info_h handle, - ffi.Pointer data_size, - ) { - return _package_size_info_get_data_size( - handle, - data_size, - ); - } - - late final _package_size_info_get_data_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_size_info_h, - ffi.Pointer)>>('package_size_info_get_data_size'); - late final _package_size_info_get_data_size = - _package_size_info_get_data_sizePtr.asFunction< - int Function(package_size_info_h, ffi.Pointer)>(); - - /// @brief Retrieves cache size from given handle - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] handle Package size info handle - /// @param[out] cache_size Cache size will be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int package_size_info_get_cache_size( - package_size_info_h handle, - ffi.Pointer cache_size, - ) { - return _package_size_info_get_cache_size( - handle, - cache_size, - ); - } - - late final _package_size_info_get_cache_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_size_info_h, - ffi.Pointer)>>('package_size_info_get_cache_size'); - late final _package_size_info_get_cache_size = - _package_size_info_get_cache_sizePtr.asFunction< - int Function(package_size_info_h, ffi.Pointer)>(); - - /// @brief Retrieves application size from given handle - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] handle Package size info handle - /// @param[out] app_size App size will be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int package_size_info_get_app_size( - package_size_info_h handle, - ffi.Pointer app_size, - ) { - return _package_size_info_get_app_size( - handle, - app_size, - ); - } - - late final _package_size_info_get_app_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_size_info_h, - ffi.Pointer)>>('package_size_info_get_app_size'); - late final _package_size_info_get_app_size = - _package_size_info_get_app_sizePtr.asFunction< - int Function(package_size_info_h, ffi.Pointer)>(); - - /// @brief Retrieves external data size from given handle - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] handle Package size info handle - /// @param[out] ext_data_size External data size will be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int package_size_info_get_external_data_size( - package_size_info_h handle, - ffi.Pointer ext_data_size, - ) { - return _package_size_info_get_external_data_size( - handle, - ext_data_size, - ); - } - - late final _package_size_info_get_external_data_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_size_info_h, ffi.Pointer)>>( - 'package_size_info_get_external_data_size'); - late final _package_size_info_get_external_data_size = - _package_size_info_get_external_data_sizePtr.asFunction< - int Function(package_size_info_h, ffi.Pointer)>(); - - /// @brief Retrieves external cache size from given handle - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] handle Package size info handle - /// @param[out] ext_cache_size External cache size will be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int package_size_info_get_external_cache_size( - package_size_info_h handle, - ffi.Pointer ext_cache_size, - ) { - return _package_size_info_get_external_cache_size( - handle, - ext_cache_size, - ); - } - - late final _package_size_info_get_external_cache_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_size_info_h, ffi.Pointer)>>( - 'package_size_info_get_external_cache_size'); - late final _package_size_info_get_external_cache_size = - _package_size_info_get_external_cache_sizePtr.asFunction< - int Function(package_size_info_h, ffi.Pointer)>(); - - /// @brief Retrieves external application size from given handle - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] handle Package size info handle - /// @param[out] ext_app_size External app size will be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int package_size_info_get_external_app_size( - package_size_info_h handle, - ffi.Pointer ext_app_size, - ) { - return _package_size_info_get_external_app_size( - handle, - ext_app_size, - ); - } - - late final _package_size_info_get_external_app_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_size_info_h, ffi.Pointer)>>( - 'package_size_info_get_external_app_size'); - late final _package_size_info_get_external_app_size = - _package_size_info_get_external_app_sizePtr.asFunction< - int Function(package_size_info_h, ffi.Pointer)>(); - - /// @platform - /// @brief Creates a request handle to the package manager. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a request using package_manager_request_destroy(). - /// @param[out] request The request handle that is newly created on success - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Internal I/O error - /// @see package_manager_request_destroy() - int package_manager_request_create( - ffi.Pointer request, - ) { - return _package_manager_request_create( - request, - ); - } - - late final _package_manager_request_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'package_manager_request_create'); - late final _package_manager_request_create = - _package_manager_request_createPtr - .asFunction)>(); - - /// @platform - /// @brief Destroys the request handle to the package manager. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] request The request handle to the package manager - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see package_manager_request_create() - int package_manager_request_destroy( - package_manager_request_h request, - ) { - return _package_manager_request_destroy( - request, - ); - } - - late final _package_manager_request_destroyPtr = - _lookup>( - 'package_manager_request_destroy'); - late final _package_manager_request_destroy = - _package_manager_request_destroyPtr - .asFunction(); - - /// @platform - /// @brief Registers a callback function to be invoked when the progress of the request changes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/packagemanager.info - /// @param[in] request The request handle - /// @param[in] callback The callback function to be registered - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @post package_manager_request_event_cb() will be invoked. - /// @see package_manager_request_event_cb() - /// @see package_manager_request_unset_event_cb() - int package_manager_request_set_event_cb( - package_manager_request_h request, - package_manager_request_event_cb callback, - ffi.Pointer user_data, - ) { - return _package_manager_request_set_event_cb( - request, - callback, - user_data, - ); - } - - late final _package_manager_request_set_event_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_manager_request_h, - package_manager_request_event_cb, - ffi.Pointer)>>('package_manager_request_set_event_cb'); - late final _package_manager_request_set_event_cb = - _package_manager_request_set_event_cbPtr.asFunction< - int Function(package_manager_request_h, - package_manager_request_event_cb, ffi.Pointer)>(); - - /// @platform - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] request The request handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see package_manager_request_event_cb() - /// @see package_manager_request_set_event_cb() - int package_manager_request_unset_event_cb( - package_manager_request_h request, - ) { - return _package_manager_request_unset_event_cb( - request, - ); - } - - late final _package_manager_request_unset_event_cbPtr = - _lookup>( - 'package_manager_request_unset_event_cb'); - late final _package_manager_request_unset_event_cb = - _package_manager_request_unset_event_cbPtr - .asFunction(); - - /// @platform - /// @brief Sets the type of the package to install, uninstall, or update. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] request The request handle - /// @param[in] type The type of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int package_manager_request_set_type( - package_manager_request_h request, - ffi.Pointer type, - ) { - return _package_manager_request_set_type( - request, - type, - ); - } - - late final _package_manager_request_set_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_manager_request_h, - ffi.Pointer)>>('package_manager_request_set_type'); - late final _package_manager_request_set_type = - _package_manager_request_set_typePtr.asFunction< - int Function(package_manager_request_h, ffi.Pointer)>(); - - /// @platform - /// @brief Sets the mode of the request. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] request The request handle - /// @param[in] mode The mode of the request - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int package_manager_request_set_mode( - package_manager_request_h request, - int mode, - ) { - return _package_manager_request_set_mode( - request, - mode, - ); - } - - late final _package_manager_request_set_modePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_manager_request_h, - ffi.Int32)>>('package_manager_request_set_mode'); - late final _package_manager_request_set_mode = - _package_manager_request_set_modePtr - .asFunction(); - - /// @platform - /// @brief Sets the path of TEP file to the request. The TEP file that is set will be installed when the package is installed. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @param[in] request The request handle - /// @param[in] tep_path The TEP path to set. If this is NULL on update, installed TEP will be removed. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR Severe system error - int package_manager_request_set_tep( - package_manager_request_h request, - ffi.Pointer tep_path, - ) { - return _package_manager_request_set_tep( - request, - tep_path, - ); - } - - late final _package_manager_request_set_tepPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_manager_request_h, - ffi.Pointer)>>('package_manager_request_set_tep'); - late final _package_manager_request_set_tep = - _package_manager_request_set_tepPtr.asFunction< - int Function(package_manager_request_h, ffi.Pointer)>(); - - /// @platform - /// @brief Installs the package located at the given path, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @param[in] request The request handle - /// @param[in] path The absolute path to the package to be installed - /// @param[out] id The ID of the request to the package manager - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @see package_manager_request_uninstall() - int package_manager_request_install( - package_manager_request_h request, - ffi.Pointer path, - ffi.Pointer id, - ) { - return _package_manager_request_install( - request, - path, - id, - ); - } - - late final _package_manager_request_installPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_manager_request_h, ffi.Pointer, - ffi.Pointer)>>('package_manager_request_install'); - late final _package_manager_request_install = - _package_manager_request_installPtr.asFunction< - int Function(package_manager_request_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @platform - /// @brief Installs the package located at the given path, asynchronously. - /// @details The progress of the request is asynchronously received by the callback function. - /// The @a callback is the individual callback only called for the current API call. - /// The @a callback is the only callback called, even if another callback was set for this request - /// with package_manager_request_set_event_cb(). - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @param[in] request The request handle - /// @param[in] path The absolute path to the package to be installed - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] id The ID of the request to the package manager - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - int package_manager_request_install_with_cb( - package_manager_request_h request, - ffi.Pointer path, - package_manager_request_event_cb callback, - ffi.Pointer user_data, - ffi.Pointer id, - ) { - return _package_manager_request_install_with_cb( - request, - path, - callback, - user_data, - id, - ); - } - - late final _package_manager_request_install_with_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_manager_request_h, - ffi.Pointer, - package_manager_request_event_cb, - ffi.Pointer, - ffi.Pointer)>>( - 'package_manager_request_install_with_cb'); - late final _package_manager_request_install_with_cb = - _package_manager_request_install_with_cbPtr.asFunction< - int Function( - package_manager_request_h, - ffi.Pointer, - package_manager_request_event_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @platform - /// @brief Uninstalls the package with the given name, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @param[in] request The request handle - /// @param[in] name The name of the package to be uninstalled - /// @param[out] id The ID of the request to the package manager - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - int package_manager_request_uninstall( - package_manager_request_h request, - ffi.Pointer name, - ffi.Pointer id, - ) { - return _package_manager_request_uninstall( - request, - name, - id, - ); - } - - late final _package_manager_request_uninstallPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_manager_request_h, ffi.Pointer, - ffi.Pointer)>>('package_manager_request_uninstall'); - late final _package_manager_request_uninstall = - _package_manager_request_uninstallPtr.asFunction< - int Function(package_manager_request_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @platform - /// @brief Uninstalls the package with the given name, asynchronously. - /// @details The progress of the request is asynchronously received by the callback function. - /// The @a callback is the individual callback only called for the current API call. - /// The @a callback is the only callback called, even if another callback was set for this request - /// with package_manager_request_set_event_cb(). - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @param[in] request The request handle - /// @param[in] name The name of the package to be uninstalled - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] id The ID of the request to the package manager - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - int package_manager_request_uninstall_with_cb( - package_manager_request_h request, - ffi.Pointer name, - package_manager_request_event_cb callback, - ffi.Pointer user_data, - ffi.Pointer id, - ) { - return _package_manager_request_uninstall_with_cb( - request, - name, - callback, - user_data, - id, - ); - } - - late final _package_manager_request_uninstall_with_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_manager_request_h, - ffi.Pointer, - package_manager_request_event_cb, - ffi.Pointer, - ffi.Pointer)>>( - 'package_manager_request_uninstall_with_cb'); - late final _package_manager_request_uninstall_with_cb = - _package_manager_request_uninstall_with_cbPtr.asFunction< - int Function( - package_manager_request_h, - ffi.Pointer, - package_manager_request_event_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @platform - /// @brief Moves the package from SD card to the internal memory and vice versa, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @param[in] request The request handle - /// @param[in] name The name of the package to be moved - /// @param[in] move_type The move type [enum package_manager_move_type_e], [external to internal/internal to external] - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - int package_manager_request_move( - package_manager_request_h request, - ffi.Pointer name, - int move_type, - ) { - return _package_manager_request_move( - request, - name, - move_type, - ); - } - - late final _package_manager_request_movePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_manager_request_h, ffi.Pointer, - ffi.Int32)>>('package_manager_request_move'); - late final _package_manager_request_move = - _package_manager_request_movePtr.asFunction< - int Function( - package_manager_request_h, ffi.Pointer, int)>(); - - /// @platform - /// @brief Moves the package from SD card to the internal memory and vice versa, asynchronously. - /// @details The progress of the request is asynchronously received by the callback function. - /// The @a callback is the individual callback only called for the current API call. - /// The @a callback is the only callback called, even if another callback was set for this request - /// with package_manager_request_set_event_cb(). - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @param[in] request The request handle - /// @param[in] name The name of the package to be moved - /// @param[in] move_type The move type [enum package_manager_move_type_e], [external to internal/internal to external] - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] id The ID of the request to the package manager - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - int package_manager_request_move_with_cb( - package_manager_request_h request, - ffi.Pointer name, - int move_type, - package_manager_request_event_cb callback, - ffi.Pointer user_data, - ffi.Pointer id, - ) { - return _package_manager_request_move_with_cb( - request, - name, - move_type, - callback, - user_data, - id, - ); - } - - late final _package_manager_request_move_with_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_manager_request_h, - ffi.Pointer, - ffi.Int32, - package_manager_request_event_cb, - ffi.Pointer, - ffi.Pointer)>>('package_manager_request_move_with_cb'); - late final _package_manager_request_move_with_cb = - _package_manager_request_move_with_cbPtr.asFunction< - int Function( - package_manager_request_h, - ffi.Pointer, - int, - package_manager_request_event_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @platform - /// @brief Creates a package update info request. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/packagemanager.admin - /// @remarks You must release @a pkg_updateinfo_req using package_manager_updateinfo_request_destroy(). - /// @param[out] pkg_updateinfo_req The package update info request handle that is newly created on success - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @see package_manager_updateinfo_request_destroy() - int package_manager_updateinfo_request_create( - ffi.Pointer pkg_updateinfo_req, - ) { - return _package_manager_updateinfo_request_create( - pkg_updateinfo_req, - ); - } - - late final _package_manager_updateinfo_request_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'package_manager_updateinfo_request_create'); - late final _package_manager_updateinfo_request_create = - _package_manager_updateinfo_request_createPtr.asFunction< - int Function(ffi.Pointer)>(); - - /// @brief Sets the package ID to the package update info request. - /// @since_tizen 4.0 - /// @param[in] pkg_updateinfo_req The update info request handle - /// @param[in] pkgid The package ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see package_manager_updateinfo_request_create() - int package_manager_updateinfo_set_pkgid( - package_updateinfo_request_h pkg_updateinfo_req, - ffi.Pointer pkgid, - ) { - return _package_manager_updateinfo_set_pkgid( - pkg_updateinfo_req, - pkgid, - ); - } - - late final _package_manager_updateinfo_set_pkgidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_updateinfo_request_h, - ffi.Pointer)>>('package_manager_updateinfo_set_pkgid'); - late final _package_manager_updateinfo_set_pkgid = - _package_manager_updateinfo_set_pkgidPtr.asFunction< - int Function(package_updateinfo_request_h, ffi.Pointer)>(); - - /// @brief Sets the package version to the package update info request. - /// @since_tizen 4.0 - /// @param[in] pkg_updateinfo_req The update info request handle - /// @param[in] version The package version - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see package_manager_updateinfo_request_create() - int package_manager_updateinfo_set_version( - package_updateinfo_request_h pkg_updateinfo_req, - ffi.Pointer version, - ) { - return _package_manager_updateinfo_set_version( - pkg_updateinfo_req, - version, - ); - } - - late final _package_manager_updateinfo_set_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_updateinfo_request_h, ffi.Pointer)>>( - 'package_manager_updateinfo_set_version'); - late final _package_manager_updateinfo_set_version = - _package_manager_updateinfo_set_versionPtr.asFunction< - int Function(package_updateinfo_request_h, ffi.Pointer)>(); - - /// @brief Sets the package update type to the package update info request. - /// @since_tizen 4.0 - /// @param[in] pkg_updateinfo_req The update info request handle - /// @param[in] type The package update type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see package_manager_updateinfo_request_create() - /// @see package_updateinfo_type_e - int package_manager_updateinfo_set_type( - package_updateinfo_request_h pkg_updateinfo_req, - int type, - ) { - return _package_manager_updateinfo_set_type( - pkg_updateinfo_req, - type, - ); - } - - late final _package_manager_updateinfo_set_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(package_updateinfo_request_h, - ffi.Int32)>>('package_manager_updateinfo_set_type'); - late final _package_manager_updateinfo_set_type = - _package_manager_updateinfo_set_typePtr - .asFunction(); - - /// @brief Request to register package update info in platform. - /// @since_tizen 4.0 - /// @param[in] pkg_updateinfo_req The update info request handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR Severe system error - /// @see package_manager_updateinfo_request_create() - /// @see package_manager_updateinfo_request_destroy() - int package_manager_updateinfo_request_register( - package_updateinfo_request_h pkg_updateinfo_req, - ) { - return _package_manager_updateinfo_request_register( - pkg_updateinfo_req, - ); - } - - late final _package_manager_updateinfo_request_registerPtr = _lookup< - ffi.NativeFunction>( - 'package_manager_updateinfo_request_register'); - late final _package_manager_updateinfo_request_register = - _package_manager_updateinfo_request_registerPtr - .asFunction(); - - /// @brief Destroys the package update info request. - /// @since_tizen 4.0 - /// @param[in] pkg_updateinfo_req The update info request handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see package_manager_updateinfo_request_create() - int package_manager_updateinfo_request_destroy( - package_updateinfo_request_h pkg_updateinfo_req, - ) { - return _package_manager_updateinfo_request_destroy( - pkg_updateinfo_req, - ); - } - - late final _package_manager_updateinfo_request_destroyPtr = _lookup< - ffi.NativeFunction>( - 'package_manager_updateinfo_request_destroy'); - late final _package_manager_updateinfo_request_destroy = - _package_manager_updateinfo_request_destroyPtr - .asFunction(); - - /// @brief Request to unregister update info in platform for given package id. - /// @since_tizen 4.0 - /// @param[in] pkg_updateinfo_req The update info request handle - /// @param[in] pkgid The package id to request unregister update info - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR Severe system error - int package_manager_updateinfo_request_unregister( - package_updateinfo_request_h pkg_updateinfo_req, - ffi.Pointer pkgid, - ) { - return _package_manager_updateinfo_request_unregister( - pkg_updateinfo_req, - pkgid, - ); - } - - late final _package_manager_updateinfo_request_unregisterPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_updateinfo_request_h, ffi.Pointer)>>( - 'package_manager_updateinfo_request_unregister'); - late final _package_manager_updateinfo_request_unregister = - _package_manager_updateinfo_request_unregisterPtr.asFunction< - int Function(package_updateinfo_request_h, ffi.Pointer)>(); - - /// @brief Request to unregister update info of all packages in platform. - /// @since_tizen 4.0 - /// @param[in] pkg_updateinfo_req The update info request handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR Severe system error - int package_manager_updateinfo_request_unregister_all( - package_updateinfo_request_h pkg_updateinfo_req, - ) { - return _package_manager_updateinfo_request_unregister_all( - pkg_updateinfo_req, - ); - } - - late final _package_manager_updateinfo_request_unregister_allPtr = _lookup< - ffi.NativeFunction>( - 'package_manager_updateinfo_request_unregister_all'); - late final _package_manager_updateinfo_request_unregister_all = - _package_manager_updateinfo_request_unregister_allPtr - .asFunction(); - - /// @brief Creates the package archive information for the given package. - /// @since_tizen 4.0 - /// @remarks If the given path is relevant to media storage, the privilege - /// http://tizen.org/privilege/mediastorage is needed. - /// @remarks If the given path is relevant to external storage, the privilege - /// http://tizen.org/privilege/externalstorage is needed. - /// @remarks You must release @a archive_info - /// using package_archive_info_destroy(). - /// @param[in] path The path of the package - /// @param[out] archive_info The package archive information for - /// the given package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Internal I/O error - /// @see package_archive_info_destroy() - int package_archive_info_create( - ffi.Pointer path, - ffi.Pointer archive_info, - ) { - return _package_archive_info_create( - path, - archive_info, - ); - } - - late final _package_archive_info_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>( - 'package_archive_info_create'); - late final _package_archive_info_create = - _package_archive_info_createPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys the package archive information handle. - /// @since_tizen 4.0 - /// @param[in] archive_info The package archive information handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see package_archive_info_create() - int package_archive_info_destroy( - package_archive_info_h archive_info, - ) { - return _package_archive_info_destroy( - archive_info, - ); - } - - late final _package_archive_info_destroyPtr = - _lookup>( - 'package_archive_info_destroy'); - late final _package_archive_info_destroy = _package_archive_info_destroyPtr - .asFunction(); - - /// @brief Gets the package name. - /// @since_tizen 4.0 - /// @remarks You must release @a package using free(). - /// @param[in] archive_info The package archive information - /// @param[out] package The package name - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int package_archive_info_get_package( - package_archive_info_h archive_info, - ffi.Pointer> package, - ) { - return _package_archive_info_get_package( - archive_info, - package, - ); - } - - late final _package_archive_info_get_packagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_archive_info_h, ffi.Pointer>)>>( - 'package_archive_info_get_package'); - late final _package_archive_info_get_package = - _package_archive_info_get_packagePtr.asFunction< - int Function( - package_archive_info_h, ffi.Pointer>)>(); - - /// @brief Gets the type of the package. - /// @since_tizen 4.0 - /// @remarks You must release @a type using free(). - /// @param[in] archive_info The package archive information - /// @param[out] type The type of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int package_archive_info_get_type( - package_archive_info_h archive_info, - ffi.Pointer> type, - ) { - return _package_archive_info_get_type( - archive_info, - type, - ); - } - - late final _package_archive_info_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_archive_info_h, ffi.Pointer>)>>( - 'package_archive_info_get_type'); - late final _package_archive_info_get_type = - _package_archive_info_get_typePtr.asFunction< - int Function( - package_archive_info_h, ffi.Pointer>)>(); - - /// @brief Gets the version of the package. - /// @since_tizen 4.0 - /// @remarks You must release @a version using free(). - /// @param[in] archive_info The package archive information - /// @param[out] version The version of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int package_archive_info_get_version( - package_archive_info_h archive_info, - ffi.Pointer> version, - ) { - return _package_archive_info_get_version( - archive_info, - version, - ); - } - - late final _package_archive_info_get_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_archive_info_h, ffi.Pointer>)>>( - 'package_archive_info_get_version'); - late final _package_archive_info_get_version = - _package_archive_info_get_versionPtr.asFunction< - int Function( - package_archive_info_h, ffi.Pointer>)>(); - - /// @brief Gets the API version of the package. - /// @since_tizen 4.0 - /// @remarks You must release @a api_version using free(). - /// @param[in] archive_info The package archive information - /// @param[out] api_version The API version of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - int package_archive_info_get_api_version( - package_archive_info_h archive_info, - ffi.Pointer> api_version, - ) { - return _package_archive_info_get_api_version( - archive_info, - api_version, - ); - } - - late final _package_archive_info_get_api_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_archive_info_h, ffi.Pointer>)>>( - 'package_archive_info_get_api_version'); - late final _package_archive_info_get_api_version = - _package_archive_info_get_api_versionPtr.asFunction< - int Function( - package_archive_info_h, ffi.Pointer>)>(); - - /// @brief Gets the description of the package. - /// @since_tizen 4.0 - /// @remarks You must release @a description using free(). - /// @param[in] archive_info The package archive information - /// @param[out] description The description of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_archive_info_get_description( - package_archive_info_h archive_info, - ffi.Pointer> description, - ) { - return _package_archive_info_get_description( - archive_info, - description, - ); - } - - late final _package_archive_info_get_descriptionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_archive_info_h, ffi.Pointer>)>>( - 'package_archive_info_get_description'); - late final _package_archive_info_get_description = - _package_archive_info_get_descriptionPtr.asFunction< - int Function( - package_archive_info_h, ffi.Pointer>)>(); - - /// @brief Gets the label of the package. - /// @since_tizen 4.0 - /// @remarks You must release @a label using free(). - /// @param[in] archive_info The package archive information - /// @param[out] label The label of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_archive_info_get_label( - package_archive_info_h archive_info, - ffi.Pointer> label, - ) { - return _package_archive_info_get_label( - archive_info, - label, - ); - } - - late final _package_archive_info_get_labelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_archive_info_h, ffi.Pointer>)>>( - 'package_archive_info_get_label'); - late final _package_archive_info_get_label = - _package_archive_info_get_labelPtr.asFunction< - int Function( - package_archive_info_h, ffi.Pointer>)>(); - - /// @brief Gets the author of the package. - /// @since_tizen 4.0 - /// @remarks You must release @a author using free(). - /// @param[in] archive_info The package archive information - /// @param[out] author The author of the package - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_archive_info_get_author( - package_archive_info_h archive_info, - ffi.Pointer> author, - ) { - return _package_archive_info_get_author( - archive_info, - author, - ); - } - - late final _package_archive_info_get_authorPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_archive_info_h, ffi.Pointer>)>>( - 'package_archive_info_get_author'); - late final _package_archive_info_get_author = - _package_archive_info_get_authorPtr.asFunction< - int Function( - package_archive_info_h, ffi.Pointer>)>(); - - /// @brief Gets the raw icon of the package. - /// @since_tizen 4.0 - /// @remarks You must release @a icon using free(). - /// @param[in] archive_info The package archive information - /// @param[out] icon The raw icon of the package - /// @param[out] icon_size The size of the icon - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PACKAGE_MANAGER_ERROR_NONE Successful - /// @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error - int package_archive_info_get_icon( - package_archive_info_h archive_info, - ffi.Pointer> icon, - ffi.Pointer icon_size, - ) { - return _package_archive_info_get_icon( - archive_info, - icon, - icon_size, - ); - } - - late final _package_archive_info_get_iconPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - package_archive_info_h, - ffi.Pointer>, - ffi.Pointer)>>('package_archive_info_get_icon'); - late final _package_archive_info_get_icon = - _package_archive_info_get_iconPtr.asFunction< - int Function( - package_archive_info_h, - ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Reads data from an RPC port. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @param[in] h The rpc port handle - /// @param[out] buf Buffer for reading data - /// @param[in] size Size for reading data - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @retval #RPC_PORT_ERROR_IO_ERROR Internal I/O error - /// @see rpc_port_write() - int rpc_port_read( - rpc_port_h h, - ffi.Pointer buf, - int size, - ) { - return _rpc_port_read( - h, - buf, - size, - ); - } - - late final _rpc_port_readPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(rpc_port_h, ffi.Pointer, - ffi.UnsignedInt)>>('rpc_port_read'); - late final _rpc_port_read = _rpc_port_readPtr - .asFunction, int)>(); - - /// @brief Writes data to an RPC port. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @param[in] h The rpc port handle - /// @param[in] buf Buffer for writing data - /// @param[in] size Size for writing data - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @retval #RPC_PORT_ERROR_IO_ERROR Internal I/O error - /// @see rpc_port_read() - int rpc_port_write( - rpc_port_h h, - ffi.Pointer buf, - int size, - ) { - return _rpc_port_write( - h, - buf, - size, - ); - } - - late final _rpc_port_writePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(rpc_port_h, ffi.Pointer, - ffi.UnsignedInt)>>('rpc_port_write'); - late final _rpc_port_write = _rpc_port_writePtr - .asFunction, int)>(); - - /// @brief Creates a rpc port proxy handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @remarks You must release @a h using rpc_port_proxy_destroy(). - /// @param[out] h The rpc port proxy handle that is newly created - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_proxy_destroy() - int rpc_port_proxy_create( - ffi.Pointer h, - ) { - return _rpc_port_proxy_create( - h, - ); - } - - late final _rpc_port_proxy_createPtr = _lookup< - ffi.NativeFunction)>>( - 'rpc_port_proxy_create'); - late final _rpc_port_proxy_create = _rpc_port_proxy_createPtr - .asFunction)>(); - - /// @brief Destroys a rpc port proxy handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port proxy handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_proxy_create() - int rpc_port_proxy_destroy( - rpc_port_proxy_h h, - ) { - return _rpc_port_proxy_destroy( - h, - ); - } - - late final _rpc_port_proxy_destroyPtr = - _lookup>( - 'rpc_port_proxy_destroy'); - late final _rpc_port_proxy_destroy = - _rpc_port_proxy_destroyPtr.asFunction(); - - /// @brief Connects to @a port of @a appid. - /// @details To send and receive data, the proxy should connect to port of stub - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/appmanager.launch \n - /// %http://tizen.org/privilege/datasharing - /// @remarks If you want to use this function, you must add privileges. - /// @param[in] h The rpc port proxy handle - /// @param[in] appid The target stub appid - /// @param[in] port The name of rpc port - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @retval #RPC_PORT_ERROR_IO_ERROR Internal I/O error - /// @retval #RPC_PORT_ERROR_PERMISSION_DENIED Permission denied - int rpc_port_proxy_connect( - rpc_port_proxy_h h, - ffi.Pointer appid, - ffi.Pointer port, - ) { - return _rpc_port_proxy_connect( - h, - appid, - port, - ); - } - - late final _rpc_port_proxy_connectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(rpc_port_proxy_h, ffi.Pointer, - ffi.Pointer)>>('rpc_port_proxy_connect'); - late final _rpc_port_proxy_connect = _rpc_port_proxy_connectPtr.asFunction< - int Function( - rpc_port_proxy_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Adds a proxy connected callback. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port proxy handle - /// @param[in] cb The callback function to be called when proxy is connected - /// @param[in] user_data The user data to be passed to - /// the rpc_port_proxy_connected_event_cb() function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - int rpc_port_proxy_add_connected_event_cb( - rpc_port_proxy_h h, - rpc_port_proxy_connected_event_cb cb, - ffi.Pointer user_data, - ) { - return _rpc_port_proxy_add_connected_event_cb( - h, - cb, - user_data, - ); - } - - late final _rpc_port_proxy_add_connected_event_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(rpc_port_proxy_h, rpc_port_proxy_connected_event_cb, - ffi.Pointer)>>('rpc_port_proxy_add_connected_event_cb'); - late final _rpc_port_proxy_add_connected_event_cb = - _rpc_port_proxy_add_connected_event_cbPtr.asFunction< - int Function(rpc_port_proxy_h, rpc_port_proxy_connected_event_cb, - ffi.Pointer)>(); - - /// @brief Adds a proxy disconnected callback. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port proxy handle - /// @param[in] cb The callback function to be called when proxy is disconnected - /// @param[in] user_data The user data to be passed to - /// the rpc_port_proxy_disconnected_event_cb() function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - int rpc_port_proxy_add_disconnected_event_cb( - rpc_port_proxy_h h, - rpc_port_proxy_disconnected_event_cb cb, - ffi.Pointer user_data, - ) { - return _rpc_port_proxy_add_disconnected_event_cb( - h, - cb, - user_data, - ); - } - - late final _rpc_port_proxy_add_disconnected_event_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - rpc_port_proxy_h, - rpc_port_proxy_disconnected_event_cb, - ffi.Pointer)>>( - 'rpc_port_proxy_add_disconnected_event_cb'); - late final _rpc_port_proxy_add_disconnected_event_cb = - _rpc_port_proxy_add_disconnected_event_cbPtr.asFunction< - int Function(rpc_port_proxy_h, rpc_port_proxy_disconnected_event_cb, - ffi.Pointer)>(); - - /// @brief Adds a proxy rejected callback. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port proxy handle - /// @param[in] cb The callback function to be called when proxy is rejected - /// @param[in] user_data The user data to be passed to - /// the rpc_port_proxy_rejected_event_cb() function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - int rpc_port_proxy_add_rejected_event_cb( - rpc_port_proxy_h h, - rpc_port_proxy_rejected_event_cb cb, - ffi.Pointer user_data, - ) { - return _rpc_port_proxy_add_rejected_event_cb( - h, - cb, - user_data, - ); - } - - late final _rpc_port_proxy_add_rejected_event_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(rpc_port_proxy_h, rpc_port_proxy_rejected_event_cb, - ffi.Pointer)>>('rpc_port_proxy_add_rejected_event_cb'); - late final _rpc_port_proxy_add_rejected_event_cb = - _rpc_port_proxy_add_rejected_event_cbPtr.asFunction< - int Function(rpc_port_proxy_h, rpc_port_proxy_rejected_event_cb, - ffi.Pointer)>(); - - /// @brief Adds a proxy received callback. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port proxy handle - /// @param[in] cb The callback function to be called when proxy received data - /// @param[in] user_data The user data to be passed to - /// the rpc_port_proxy_received_event_cb() function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - int rpc_port_proxy_add_received_event_cb( - rpc_port_proxy_h h, - rpc_port_proxy_received_event_cb cb, - ffi.Pointer user_data, - ) { - return _rpc_port_proxy_add_received_event_cb( - h, - cb, - user_data, - ); - } - - late final _rpc_port_proxy_add_received_event_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(rpc_port_proxy_h, rpc_port_proxy_received_event_cb, - ffi.Pointer)>>('rpc_port_proxy_add_received_event_cb'); - late final _rpc_port_proxy_add_received_event_cb = - _rpc_port_proxy_add_received_event_cbPtr.asFunction< - int Function(rpc_port_proxy_h, rpc_port_proxy_received_event_cb, - ffi.Pointer)>(); - - /// @brief Gets a port from proxy handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @remarks This handle @a port will not be valid if the proxy was disconnected or destroyed. - /// @param[in] h The rpc port proxy handle - /// @param[in] type The type of port - /// @param[out] port The port to communicate - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @retval #RPC_PORT_ERROR_IO_ERROR No available ports - /// @see rpc_port_write() - /// @see rpc_port_read() - /// @see rpc_port_parcel_create_from_port() - /// @see rpc_port_parcel_send(); - int rpc_port_proxy_get_port( - rpc_port_proxy_h h, - int type, - ffi.Pointer port, - ) { - return _rpc_port_proxy_get_port( - h, - type, - port, - ); - } - - late final _rpc_port_proxy_get_portPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(rpc_port_proxy_h, ffi.Int32, - ffi.Pointer)>>('rpc_port_proxy_get_port'); - late final _rpc_port_proxy_get_port = _rpc_port_proxy_get_portPtr.asFunction< - int Function(rpc_port_proxy_h, int, ffi.Pointer)>(); - - /// @brief Creates a rpc port stub handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @remarks You must release @a h using rpc_port_stub_destroy(). - /// @param[out] h The rpc port stub handle that is newly created - /// @param[in] port_name The name of the port which want to listen - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_stub_destroy() - int rpc_port_stub_create( - ffi.Pointer h, - ffi.Pointer port_name, - ) { - return _rpc_port_stub_create( - h, - port_name, - ); - } - - late final _rpc_port_stub_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('rpc_port_stub_create'); - late final _rpc_port_stub_create = _rpc_port_stub_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys a rpc port stub handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port stub handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_stub_create() - int rpc_port_stub_destroy( - rpc_port_stub_h h, - ) { - return _rpc_port_stub_destroy( - h, - ); - } - - late final _rpc_port_stub_destroyPtr = - _lookup>( - 'rpc_port_stub_destroy'); - late final _rpc_port_stub_destroy = - _rpc_port_stub_destroyPtr.asFunction(); - - /// @brief Listens to the requests for connections. - /// @details The stub listens requests to connect by port - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port stub handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @retval #RPC_PORT_ERROR_IO_ERROR Internal I/O error - int rpc_port_stub_listen( - rpc_port_stub_h h, - ) { - return _rpc_port_stub_listen( - h, - ); - } - - late final _rpc_port_stub_listenPtr = - _lookup>( - 'rpc_port_stub_listen'); - late final _rpc_port_stub_listen = - _rpc_port_stub_listenPtr.asFunction(); - - /// @brief Adds a privilege to the stub. - /// @details The stub can control access to the port using tizen privilege. - /// It allows connections only if the proxy which have the privileges. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port stub handle - /// @param[in] privilege The privilege to access this stub - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - int rpc_port_stub_add_privilege( - rpc_port_stub_h h, - ffi.Pointer privilege, - ) { - return _rpc_port_stub_add_privilege( - h, - privilege, - ); - } - - late final _rpc_port_stub_add_privilegePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(rpc_port_stub_h, - ffi.Pointer)>>('rpc_port_stub_add_privilege'); - late final _rpc_port_stub_add_privilege = _rpc_port_stub_add_privilegePtr - .asFunction)>(); - - /// @brief Sets trusted to the stub. - /// @details The stub can control access to the port using tizen certificate. - /// It allows connections only if the proxy is signed with the same - /// certificate. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port stub handle - /// @param[in] trusted Whether stub allows only trusted proxy or not - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - int rpc_port_stub_set_trusted( - rpc_port_stub_h h, - bool trusted, - ) { - return _rpc_port_stub_set_trusted( - h, - trusted, - ); - } - - late final _rpc_port_stub_set_trustedPtr = - _lookup>( - 'rpc_port_stub_set_trusted'); - late final _rpc_port_stub_set_trusted = _rpc_port_stub_set_trustedPtr - .asFunction(); - - /// @brief Adds a stub connected callback. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc stub stub handle - /// @param[in] cb The callback function to be called when proxy is connected - /// with the stub - /// @param[in] user_data The user data to be passed to - /// the rpc_port_stub_connected_event_cb() function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - int rpc_port_stub_add_connected_event_cb( - rpc_port_stub_h h, - rpc_port_stub_connected_event_cb cb, - ffi.Pointer user_data, - ) { - return _rpc_port_stub_add_connected_event_cb( - h, - cb, - user_data, - ); - } - - late final _rpc_port_stub_add_connected_event_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(rpc_port_stub_h, rpc_port_stub_connected_event_cb, - ffi.Pointer)>>('rpc_port_stub_add_connected_event_cb'); - late final _rpc_port_stub_add_connected_event_cb = - _rpc_port_stub_add_connected_event_cbPtr.asFunction< - int Function(rpc_port_stub_h, rpc_port_stub_connected_event_cb, - ffi.Pointer)>(); - - /// @brief Adds a stub disconnected callback. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port stub handle - /// @param[in] cb The callback function to be called when proxy is disconnected - /// with the stub - /// @param[in] user_data The user data to be passed to - /// the rpc_port_stub_disconnected_event_cb() function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - int rpc_port_stub_add_disconnected_event_cb( - rpc_port_stub_h h, - rpc_port_stub_disconnected_event_cb cb, - ffi.Pointer user_data, - ) { - return _rpc_port_stub_add_disconnected_event_cb( - h, - cb, - user_data, - ); - } - - late final _rpc_port_stub_add_disconnected_event_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(rpc_port_stub_h, - rpc_port_stub_disconnected_event_cb, ffi.Pointer)>>( - 'rpc_port_stub_add_disconnected_event_cb'); - late final _rpc_port_stub_add_disconnected_event_cb = - _rpc_port_stub_add_disconnected_event_cbPtr.asFunction< - int Function(rpc_port_stub_h, rpc_port_stub_disconnected_event_cb, - ffi.Pointer)>(); - - /// @brief Adds a stub received callback. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port stub handle - /// @param[in] cb The callback function to be called when stub received data - /// @param[in] user_data The user data to be passed to - /// the rpc_port_stub_received_event_cb() function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - int rpc_port_stub_add_received_event_cb( - rpc_port_stub_h h, - rpc_port_stub_received_event_cb cb, - ffi.Pointer user_data, - ) { - return _rpc_port_stub_add_received_event_cb( - h, - cb, - user_data, - ); - } - - late final _rpc_port_stub_add_received_event_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(rpc_port_stub_h, rpc_port_stub_received_event_cb, - ffi.Pointer)>>('rpc_port_stub_add_received_event_cb'); - late final _rpc_port_stub_add_received_event_cb = - _rpc_port_stub_add_received_event_cbPtr.asFunction< - int Function(rpc_port_stub_h, rpc_port_stub_received_event_cb, - ffi.Pointer)>(); - - /// @brief Gets a port from stub handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @remarks This handle @a port will not be valid if the instance of the stub was disconnected or destroyed. - /// @param[in] h The rpc port stub handle - /// @param[in] type The type of port - /// @param[in] instance The ID of the instance which is connected - /// @param[out] port The port to communicate - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @retval #RPC_PORT_ERROR_IO_ERROR No available ports - /// @see rpc_port_write() - /// @see rpc_port_read() - /// @see rpc_port_parcel_create_from_port() - /// @see rpc_port_parcel_send(); - int rpc_port_stub_get_port( - rpc_port_stub_h h, - int type, - ffi.Pointer instance, - ffi.Pointer port, - ) { - return _rpc_port_stub_get_port( - h, - type, - instance, - port, - ); - } - - late final _rpc_port_stub_get_portPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(rpc_port_stub_h, ffi.Int32, ffi.Pointer, - ffi.Pointer)>>('rpc_port_stub_get_port'); - late final _rpc_port_stub_get_port = _rpc_port_stub_get_portPtr.asFunction< - int Function(rpc_port_stub_h, int, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Creates a rpc port parcel handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @remarks You must release @a h using rpc_port_parcel_destroy(). - /// @param[out] h The rpc port parcel handle that is newly created - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @see rpc_port_parcel_destroy() - int rpc_port_parcel_create( - ffi.Pointer h, - ) { - return _rpc_port_parcel_create( - h, - ); - } - - late final _rpc_port_parcel_createPtr = _lookup< - ffi.NativeFunction)>>( - 'rpc_port_parcel_create'); - late final _rpc_port_parcel_create = _rpc_port_parcel_createPtr - .asFunction)>(); - - /// @brief Creates a rpc port parcel handle from port. - /// @details Creates a rpc port parcel handle using read data from the port. - /// It calls rpc_port_read() internally. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @remarks You must release @a h using rpc_port_parcel_destroy(). - /// @param[out] h The rpc port parcel handle that is newly created - /// @param[in] port The rpc port handle for creating handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a port is NULL - /// @retval #RPC_PORT_ERROR_IO_ERROR Internal I/O error - /// @see rpc_port_parcel_destroy() - /// @see rpc_port_parcel_send() - int rpc_port_parcel_create_from_port( - ffi.Pointer h, - rpc_port_h port, - ) { - return _rpc_port_parcel_create_from_port( - h, - port, - ); - } - - late final _rpc_port_parcel_create_from_portPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - rpc_port_h)>>('rpc_port_parcel_create_from_port'); - late final _rpc_port_parcel_create_from_port = - _rpc_port_parcel_create_from_portPtr.asFunction< - int Function(ffi.Pointer, rpc_port_h)>(); - - /// @brief Sends parcel data through the port. - /// @details Sends parcel data through the port. It calls rpc_port_write() - /// internally. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port parcel handle that is newly created - /// @param[in] port The rpc port handle for writing data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @retval #RPC_PORT_ERROR_IO_ERROR Internal I/O error - /// @see rpc_port_parcel_create_from_port() - int rpc_port_parcel_send( - rpc_port_parcel_h h, - rpc_port_h port, - ) { - return _rpc_port_parcel_send( - h, - port, - ); - } - - late final _rpc_port_parcel_sendPtr = _lookup< - ffi.NativeFunction>( - 'rpc_port_parcel_send'); - late final _rpc_port_parcel_send = _rpc_port_parcel_sendPtr - .asFunction(); - - /// @brief Destroys a rpc port parcel handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port parcel handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_parcel_create() - int rpc_port_parcel_destroy( - rpc_port_parcel_h h, - ) { - return _rpc_port_parcel_destroy( - h, - ); - } - - late final _rpc_port_parcel_destroyPtr = - _lookup>( - 'rpc_port_parcel_destroy'); - late final _rpc_port_parcel_destroy = - _rpc_port_parcel_destroyPtr.asFunction(); - - /// @brief Writes a byte value into rpc port parcel handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port parcel handle - /// @param[in] b Byte data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_parcel_read_byte() - int rpc_port_parcel_write_byte( - rpc_port_parcel_h h, - int b, - ) { - return _rpc_port_parcel_write_byte( - h, - b, - ); - } - - late final _rpc_port_parcel_write_bytePtr = _lookup< - ffi.NativeFunction>( - 'rpc_port_parcel_write_byte'); - late final _rpc_port_parcel_write_byte = _rpc_port_parcel_write_bytePtr - .asFunction(); - - /// @brief Writes a short value into rpc port parcel handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port parcel handle - /// @param[in] i short data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_parcel_read_int16() - int rpc_port_parcel_write_int16( - rpc_port_parcel_h h, - int i, - ) { - return _rpc_port_parcel_write_int16( - h, - i, - ); - } - - late final _rpc_port_parcel_write_int16Ptr = _lookup< - ffi.NativeFunction>( - 'rpc_port_parcel_write_int16'); - late final _rpc_port_parcel_write_int16 = _rpc_port_parcel_write_int16Ptr - .asFunction(); - - /// @brief Writes a integer value into rpc port parcel handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port parcel handle - /// @param[in] i int data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_parcel_read_int32() - int rpc_port_parcel_write_int32( - rpc_port_parcel_h h, - int i, - ) { - return _rpc_port_parcel_write_int32( - h, - i, - ); - } - - late final _rpc_port_parcel_write_int32Ptr = - _lookup>( - 'rpc_port_parcel_write_int32'); - late final _rpc_port_parcel_write_int32 = _rpc_port_parcel_write_int32Ptr - .asFunction(); - - /// @brief Writes a long long integer value into rpc port parcel handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port parcel handle - /// @param[in] i long long data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_parcel_read_int64() - int rpc_port_parcel_write_int64( - rpc_port_parcel_h h, - int i, - ) { - return _rpc_port_parcel_write_int64( - h, - i, - ); - } - - late final _rpc_port_parcel_write_int64Ptr = _lookup< - ffi - .NativeFunction>( - 'rpc_port_parcel_write_int64'); - late final _rpc_port_parcel_write_int64 = _rpc_port_parcel_write_int64Ptr - .asFunction(); - - /// @brief Writes a floating point value into rpc port parcel handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port parcel handle - /// @param[in] f float data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_parcel_read_float() - int rpc_port_parcel_write_float( - rpc_port_parcel_h h, - double f, - ) { - return _rpc_port_parcel_write_float( - h, - f, - ); - } - - late final _rpc_port_parcel_write_floatPtr = _lookup< - ffi.NativeFunction>( - 'rpc_port_parcel_write_float'); - late final _rpc_port_parcel_write_float = _rpc_port_parcel_write_floatPtr - .asFunction(); - - /// @brief Writes a double precision floating point value into rpc port parcel handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port parcel handle - /// @param[in] d double data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_parcel_read_double() - int rpc_port_parcel_write_double( - rpc_port_parcel_h h, - double d, - ) { - return _rpc_port_parcel_write_double( - h, - d, - ); - } - - late final _rpc_port_parcel_write_doublePtr = _lookup< - ffi.NativeFunction>( - 'rpc_port_parcel_write_double'); - late final _rpc_port_parcel_write_double = _rpc_port_parcel_write_doublePtr - .asFunction(); - - /// @brief Writes a string value into rpc port parcel handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port parcel handle - /// @param[in] str string data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_parcel_read_string() - int rpc_port_parcel_write_string( - rpc_port_parcel_h h, - ffi.Pointer str, - ) { - return _rpc_port_parcel_write_string( - h, - str, - ); - } - - late final _rpc_port_parcel_write_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(rpc_port_parcel_h, - ffi.Pointer)>>('rpc_port_parcel_write_string'); - late final _rpc_port_parcel_write_string = _rpc_port_parcel_write_stringPtr - .asFunction)>(); - - /// @brief Writes a boolean value into rpc port parcel handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port parcel handle - /// @param[in] b boolean data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_parcel_read_bool() - int rpc_port_parcel_write_bool( - rpc_port_parcel_h h, - bool b, - ) { - return _rpc_port_parcel_write_bool( - h, - b, - ); - } - - late final _rpc_port_parcel_write_boolPtr = _lookup< - ffi.NativeFunction>( - 'rpc_port_parcel_write_bool'); - late final _rpc_port_parcel_write_bool = _rpc_port_parcel_write_boolPtr - .asFunction(); - - /// @brief Writes a bundle data into rpc port parcel handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port parcel handle - /// @param[in] b Bundle data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_parcel_read_bundle() - int rpc_port_parcel_write_bundle( - rpc_port_parcel_h h, - ffi.Pointer b, - ) { - return _rpc_port_parcel_write_bundle( - h, - b, - ); - } - - late final _rpc_port_parcel_write_bundlePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(rpc_port_parcel_h, - ffi.Pointer)>>('rpc_port_parcel_write_bundle'); - late final _rpc_port_parcel_write_bundle = _rpc_port_parcel_write_bundlePtr - .asFunction)>(); - - /// @brief Writes a count for array into rpc port parcel handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port parcel handle - /// @param[in] count Array count - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_parcel_read_array_count() - int rpc_port_parcel_write_array_count( - rpc_port_parcel_h h, - int count, - ) { - return _rpc_port_parcel_write_array_count( - h, - count, - ); - } - - late final _rpc_port_parcel_write_array_countPtr = - _lookup>( - 'rpc_port_parcel_write_array_count'); - late final _rpc_port_parcel_write_array_count = - _rpc_port_parcel_write_array_countPtr - .asFunction(); - - /// @brief Writes the data into parcel handle using @a parcelable. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port parcel handle - /// @param[in] parcelable The interface to write the data into parcel handle - /// @param[in] data Data which write into parcel - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_parcel_read() - int rpc_port_parcel_write( - rpc_port_parcel_h h, - ffi.Pointer parcelable, - ffi.Pointer data, - ) { - return _rpc_port_parcel_write( - h, - parcelable, - data, - ); - } - - late final _rpc_port_parcel_writePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - rpc_port_parcel_h, - ffi.Pointer, - ffi.Pointer)>>('rpc_port_parcel_write'); - late final _rpc_port_parcel_write = _rpc_port_parcel_writePtr.asFunction< - int Function(rpc_port_parcel_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Reads a byte value from rpc port parcel handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port parcel handle - /// @param[out] b Byte data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_parcel_write_byte() - int rpc_port_parcel_read_byte( - rpc_port_parcel_h h, - ffi.Pointer b, - ) { - return _rpc_port_parcel_read_byte( - h, - b, - ); - } - - late final _rpc_port_parcel_read_bytePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(rpc_port_parcel_h, - ffi.Pointer)>>('rpc_port_parcel_read_byte'); - late final _rpc_port_parcel_read_byte = _rpc_port_parcel_read_bytePtr - .asFunction)>(); - - /// @brief Reads a short value from rpc port parcel handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port parcel handle - /// @param[out] i short data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_parcel_write_int16() - int rpc_port_parcel_read_int16( - rpc_port_parcel_h h, - ffi.Pointer i, - ) { - return _rpc_port_parcel_read_int16( - h, - i, - ); - } - - late final _rpc_port_parcel_read_int16Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function(rpc_port_parcel_h, - ffi.Pointer)>>('rpc_port_parcel_read_int16'); - late final _rpc_port_parcel_read_int16 = _rpc_port_parcel_read_int16Ptr - .asFunction)>(); - - /// @brief Reads a integer value from rpc port parcel handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port parcel handle - /// @param[out] i int data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_parcel_write_int32() - int rpc_port_parcel_read_int32( - rpc_port_parcel_h h, - ffi.Pointer i, - ) { - return _rpc_port_parcel_read_int32( - h, - i, - ); - } - - late final _rpc_port_parcel_read_int32Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function(rpc_port_parcel_h, - ffi.Pointer)>>('rpc_port_parcel_read_int32'); - late final _rpc_port_parcel_read_int32 = _rpc_port_parcel_read_int32Ptr - .asFunction)>(); - - /// @brief Reads a long long integer value from rpc port parcel handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port parcel handle - /// @param[out] i long long data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_parcel_write_int64() - int rpc_port_parcel_read_int64( - rpc_port_parcel_h h, - ffi.Pointer i, - ) { - return _rpc_port_parcel_read_int64( - h, - i, - ); - } - - late final _rpc_port_parcel_read_int64Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function(rpc_port_parcel_h, - ffi.Pointer)>>('rpc_port_parcel_read_int64'); - late final _rpc_port_parcel_read_int64 = _rpc_port_parcel_read_int64Ptr - .asFunction)>(); - - /// @brief Reads a floating point value from rpc port parcel handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port parcel handle - /// @param[out] f float data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_parcel_write_float() - int rpc_port_parcel_read_float( - rpc_port_parcel_h h, - ffi.Pointer f, - ) { - return _rpc_port_parcel_read_float( - h, - f, - ); - } - - late final _rpc_port_parcel_read_floatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(rpc_port_parcel_h, - ffi.Pointer)>>('rpc_port_parcel_read_float'); - late final _rpc_port_parcel_read_float = _rpc_port_parcel_read_floatPtr - .asFunction)>(); - - /// @brief Reads a double precision floating point value from rpc port parcel handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port parcel handle - /// @param[out] d double data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_parcel_write_double() - int rpc_port_parcel_read_double( - rpc_port_parcel_h h, - ffi.Pointer d, - ) { - return _rpc_port_parcel_read_double( - h, - d, - ); - } - - late final _rpc_port_parcel_read_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(rpc_port_parcel_h, - ffi.Pointer)>>('rpc_port_parcel_read_double'); - late final _rpc_port_parcel_read_double = _rpc_port_parcel_read_doublePtr - .asFunction)>(); - - /// @brief Reads a string value from rpc port parcel handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @remarks The @a str should be released using free(). - /// @param[in] h The rpc port parcel handle - /// @param[out] str string data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_parcel_write_string() - int rpc_port_parcel_read_string( - rpc_port_parcel_h h, - ffi.Pointer> str, - ) { - return _rpc_port_parcel_read_string( - h, - str, - ); - } - - late final _rpc_port_parcel_read_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - rpc_port_parcel_h, ffi.Pointer>)>>( - 'rpc_port_parcel_read_string'); - late final _rpc_port_parcel_read_string = - _rpc_port_parcel_read_stringPtr.asFunction< - int Function( - rpc_port_parcel_h, ffi.Pointer>)>(); - - /// @brief Reads a boolean value from rpc port parcel handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port parcel handle - /// @param[out] b boolean data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_parcel_write_bool() - int rpc_port_parcel_read_bool( - rpc_port_parcel_h h, - ffi.Pointer b, - ) { - return _rpc_port_parcel_read_bool( - h, - b, - ); - } - - late final _rpc_port_parcel_read_boolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(rpc_port_parcel_h, - ffi.Pointer)>>('rpc_port_parcel_read_bool'); - late final _rpc_port_parcel_read_bool = _rpc_port_parcel_read_boolPtr - .asFunction)>(); - - /// @brief Reads a bundle data from rpc port parcel handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @remarks The @a b should be released using bundle_free(). - /// @param[in] h The rpc port parcel handle - /// @param[out] b Bundle data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_parcel_write_bundle() - int rpc_port_parcel_read_bundle( - rpc_port_parcel_h h, - ffi.Pointer> b, - ) { - return _rpc_port_parcel_read_bundle( - h, - b, - ); - } - - late final _rpc_port_parcel_read_bundlePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - rpc_port_parcel_h, ffi.Pointer>)>>( - 'rpc_port_parcel_read_bundle'); - late final _rpc_port_parcel_read_bundle = - _rpc_port_parcel_read_bundlePtr.asFunction< - int Function(rpc_port_parcel_h, ffi.Pointer>)>(); - - /// @brief Reads a count for array from rpc port parcel handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port parcel handle - /// @param[out] count Array count - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_parcel_write_array_count() - int rpc_port_parcel_read_array_count( - rpc_port_parcel_h h, - ffi.Pointer count, - ) { - return _rpc_port_parcel_read_array_count( - h, - count, - ); - } - - late final _rpc_port_parcel_read_array_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(rpc_port_parcel_h, - ffi.Pointer)>>('rpc_port_parcel_read_array_count'); - late final _rpc_port_parcel_read_array_count = - _rpc_port_parcel_read_array_countPtr - .asFunction)>(); - - /// @brief Reads a parcel from the data using @a parcelable. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port parcel handle - /// @param[in] parcelable The interface to get data from parcel handle - /// @param[in] data Data which get from parcel - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_parcel_write() - int rpc_port_parcel_read( - rpc_port_parcel_h h, - ffi.Pointer parcelable, - ffi.Pointer data, - ) { - return _rpc_port_parcel_read( - h, - parcelable, - data, - ); - } - - late final _rpc_port_parcel_readPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - rpc_port_parcel_h, - ffi.Pointer, - ffi.Pointer)>>('rpc_port_parcel_read'); - late final _rpc_port_parcel_read = _rpc_port_parcel_readPtr.asFunction< - int Function(rpc_port_parcel_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Reads bytes from rpc port parcel handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port parcel handle - /// @param[out] buf The array buffer to read - /// @param[in] size Bytes to read - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_parcel_write_bool() - int rpc_port_parcel_burst_read( - rpc_port_parcel_h h, - ffi.Pointer buf, - int size, - ) { - return _rpc_port_parcel_burst_read( - h, - buf, - size, - ); - } - - late final _rpc_port_parcel_burst_readPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(rpc_port_parcel_h, ffi.Pointer, - ffi.UnsignedInt)>>('rpc_port_parcel_burst_read'); - late final _rpc_port_parcel_burst_read = - _rpc_port_parcel_burst_readPtr.asFunction< - int Function( - rpc_port_parcel_h, ffi.Pointer, int)>(); - - /// @brief Write bytes to rpc port parcel handle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] h The rpc port parcel handle - /// @param[in] buf The array buffer to write - /// @param[in] size Bytes to write - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RPC_PORT_ERROR_NONE Successful - /// @retval #RPC_PORT_ERROR_INVALID_PARAMETER The specified @a h is NULL - /// @see rpc_port_parcel_write_bool() - int rpc_port_parcel_burst_write( - rpc_port_parcel_h h, - ffi.Pointer buf, - int size, - ) { - return _rpc_port_parcel_burst_write( - h, - buf, - size, - ); - } - - late final _rpc_port_parcel_burst_writePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(rpc_port_parcel_h, ffi.Pointer, - ffi.UnsignedInt)>>('rpc_port_parcel_burst_write'); - late final _rpc_port_parcel_burst_write = - _rpc_port_parcel_burst_writePtr.asFunction< - int Function( - rpc_port_parcel_h, ffi.Pointer, int)>(); - - /// @brief Adds the system event handler - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The service application can handle low memory event, low battery event, language setting changed event and region format changed event. - /// @param[out] handler The event handler - /// @param[in] event_type The system event type - /// @param[in] callback The callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_ERROR_OUT_OF_MEMORY Out of memory - /// @see app_event_type_e - /// @see app_event_cb - /// @see service_app_remove_event_handler - int service_app_add_event_handler( - ffi.Pointer handler, - int event_type, - app_event_cb callback, - ffi.Pointer user_data, - ) { - return _service_app_add_event_handler( - handler, - event_type, - callback, - user_data, - ); - } - - late final _service_app_add_event_handlerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - app_event_cb, - ffi.Pointer)>>('service_app_add_event_handler'); - late final _service_app_add_event_handler = - _service_app_add_event_handlerPtr.asFunction< - int Function(ffi.Pointer, int, app_event_cb, - ffi.Pointer)>(); - - /// @brief Removes registered event handler - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] event_handler The event handler - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @see service_app_add_event_handler - int service_app_remove_event_handler( - app_event_handler_h event_handler, - ) { - return _service_app_remove_event_handler( - event_handler, - ); - } - - late final _service_app_remove_event_handlerPtr = - _lookup>( - 'service_app_remove_event_handler'); - late final _service_app_remove_event_handler = - _service_app_remove_event_handlerPtr - .asFunction(); - - /// @brief Runs the main loop of the application until service_app_exit() is called. - /// @details This function is the main entry point of the Tizen service application. - /// This main loop supports event handling for the GMainLoop and the Ecore Main Loop. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] argc The argument count - /// @param[in] argv The argument vector - /// @param[in] callback The set of callback functions to handle application events - /// @param[in] user_data The user data to be passed to the callback functions - /// @return @c 0 on success, - /// otherwise a negative error value. - /// @retval #APP_ERROR_NONE Successful - /// @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #APP_ERROR_INVALID_CONTEXT The application is launched illegally, not launched by the launch system. - /// @retval #APP_ERROR_ALREADY_RUNNING The main loop has already started - /// @see service_app_create_cb() - /// @see service_app_terminate_cb() - /// @see service_app_control_cb() - /// @see service_app_exit() - /// @see #service_app_lifecycle_callback_s - int service_app_main( - int argc, - ffi.Pointer> argv, - ffi.Pointer callback, - ffi.Pointer user_data, - ) { - return _service_app_main( - argc, - argv, - callback, - user_data, - ); - } - - late final _service_app_mainPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>>('service_app_main'); - late final _service_app_main = _service_app_mainPtr.asFunction< - int Function( - int, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Exits the main loop of the application. - /// @details The main loop of the application stops and service_app_terminate_cb() is invoked. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @see service_app_main() - /// @see service_app_terminate_cb() - void service_app_exit() { - return _service_app_exit(); - } - - late final _service_app_exitPtr = - _lookup>('service_app_exit'); - late final _service_app_exit = - _service_app_exitPtr.asFunction(); - - /// @brief Adds a shortcut to home, asynchronously. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/shortcut - /// @remarks If a homescreen does not support this feature, you will get a proper error code.\n - /// Application must check the return value of this function.\n - /// Application must check the return status from the callback function.\n - /// Application should set the callback function to get the result of this request. - /// @param[in] name The name of the created shortcut icon - /// @param[in] type The type of shortcuts - /// @param[in] uri The specific information for delivering to the viewer for creating a shortcut - /// @param[in] icon The absolute path of an icon file - /// @param[in] allow_duplicate @c 1 if it accepts the duplicated shortcut, - /// otherwise @c 0 - /// @param[in] cb The address of the callback function that is called when the result comes back from the viewer - /// @param[in] data The callback data that is used in the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SHORTCUT_ERROR_NONE Successful - /// @retval #SHORTCUT_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SHORTCUT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SHORTCUT_ERROR_IO_ERROR I/O Error - /// @retval #SHORTCUT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SHORTCUT_ERROR_NOT_SUPPORTED Not supported - /// @retval #SHORTCUT_ERROR_RESOURCE_BUSY Device or resource busy - /// @retval #SHORTCUT_ERROR_NO_SPACE There is no space to add a new shortcut - /// @retval #SHORTCUT_ERROR_EXIST Shortcut is already exist - /// @retval #SHORTCUT_ERROR_FAULT Unrecoverable error - /// @retval #SHORTCUT_ERROR_COMM Connection not established or communication problem - /// @pre You have to prepare the callback function. - /// @post You have to check the return status from the callback function which is passed by the argument. - /// @see result_cb - /// @par Example - /// @code - /// #include - /// #include - /// static int _result_cb(int ret, int pid, void *data) - /// { - /// if (ret < 0) - /// dlog_print("Failed to add a shortcut: %s\n", perror(ret)); - /// - /// dlog_print("Processed by the %d\n", pid); - /// return 0; - /// } - /// - /// static int app_create(void *data) - /// { - /// char* data_path = app_get_data_path(); - /// int path_len = strlen(data_path)+10; - /// char * path = malloc(path_len); - /// memset(path, 0, path_len); - /// strncat(path, data_path, path_len); - /// strncat(path, "Friend.jpg", path_len); - /// - /// shortcut_add_to_home("With friends", LAUNCH_BY_URI, "gallery:0000-0000", path, 0, _result_cb, NULL); - /// free(path); - /// - /// return 0; - /// } - /// @endcode - int shortcut_add_to_home( - ffi.Pointer name, - int type, - ffi.Pointer uri, - ffi.Pointer icon, - int allow_duplicate, - result_cb cb, - ffi.Pointer data, - ) { - return _shortcut_add_to_home( - name, - type, - uri, - icon, - allow_duplicate, - cb, - data, - ); - } - - late final _shortcut_add_to_homePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - result_cb, - ffi.Pointer)>>('shortcut_add_to_home'); - late final _shortcut_add_to_home = _shortcut_add_to_homePtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer, - ffi.Pointer, int, result_cb, ffi.Pointer)>(); - - /// @brief Adds a widget to home, asynchronously. - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/shortcut - /// @remarks If a homescreen does not support this feature, you will get a proper error code.\n - /// Application must check the return value of this function.\n - /// Application must check the return status from the callback function.\n - /// Application should set the callback function to get the result of this request. - /// @param[in] name The name of the created widget which will be shown when the widget is not prepared - /// @param[in] size The size of widget - /// @param[in] widget_id Widget ID - /// @param[in] icon The absolute path of an icon file which will be shown when the widget is not prepared - /// @param[in] period The Update period in seconds - /// @param[in] allow_duplicate @c 1 if it accepts the duplicated widget, - /// otherwise @c 0 - /// @param[in] cb The address of the callback function that is called when the result comes back from the viewer - /// @param[in] data The callback data that is used in the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SHORTCUT_ERROR_NONE Successful - /// @retval #SHORTCUT_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SHORTCUT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SHORTCUT_ERROR_IO_ERROR I/O Error - /// @retval #SHORTCUT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SHORTCUT_ERROR_NOT_SUPPORTED Not supported - /// @retval #SHORTCUT_ERROR_FAULT Unrecoverable error - /// @retval #SHORTCUT_ERROR_COMM Connection not established or communication problem - /// @pre You have to prepare the callback function. - /// @post You have to check the return status from the callback function which is passed by the argument. - /// @see result_cb - /// @see shortcut_widget_size_e - /// @par Example - /// @code - /// #include - /// #include - /// #include - /// - /// #define TIZEN_PATH_MAX 1024 - /// static int _result_cb(int ret, int pid, void *data) - /// { - /// if (ret < 0) - /// dlog_print("Failed to add a widget: %s\n", perror(ret)); - /// - /// dlog_print("Processed by the %d\n", pid); - /// - /// return 0; - /// } - /// - /// static int app_create(void *data) - /// { - /// char *image_root = NULL; - /// char image_path[TIZEN_PATH_MAX] = {0,}; - /// - /// storage_get_directory(STORAGE_TYPE_INTERNAL, STORAGE_DIRECTORY_IMAGES, &image_root); - /// snprintf(image_path, TIZEN_PATH_MAX, "%s/alter_icon.png", image_root); - /// - /// shortcut_add_to_home_widget("alter_name", WIDGET_SIZE_1x1, "org.tizen.testwidget", - /// image_path, -1.0f, 0, _result_cb, NULL); - /// - /// return 0; - /// } - /// @endcode - int shortcut_add_to_home_widget( - ffi.Pointer name, - int size, - ffi.Pointer widget_id, - ffi.Pointer icon, - double period, - int allow_duplicate, - result_cb cb, - ffi.Pointer data, - ) { - return _shortcut_add_to_home_widget( - name, - size, - widget_id, - icon, - period, - allow_duplicate, - cb, - data, - ); - } - - late final _shortcut_add_to_home_widgetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ffi.Int, - result_cb, - ffi.Pointer)>>('shortcut_add_to_home_widget'); - late final _shortcut_add_to_home_widget = - _shortcut_add_to_home_widgetPtr.asFunction< - int Function( - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - double, - int, - result_cb, - ffi.Pointer)>(); - - /// @brief Removes a shortcut from home, asynchronously. - /// @details If the callback function registered for a widget, the shortcut deletion is possible. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/shortcut - /// @param[in] name The name of the created shortcut icon - /// @param[in] cb The address of the callback function that is called when the result comes back from the viewer - /// @param[in] user_data The callback data that is used in the callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #SHORTCUT_ERROR_NONE Successful - /// @retval #SHORTCUT_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SHORTCUT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SHORTCUT_ERROR_IO_ERROR I/O Error - /// @retval #SHORTCUT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SHORTCUT_ERROR_COMM Connection not established or communication problem - /// @retval #SHORTCUT_ERROR_NOT_SUPPORTED Not supported - /// @pre You have to prepare the callback function. - /// @post You have to check the return status from the callback function which is passed by the argument. - /// @see result_cb - /// @par Example - /// @code - /// #include - /// - /// int _result_cb(int ret, void *data) - /// { - /// if (ret < 0) - /// dlog_print("Failed to remove a shortcut: %d\n", ret); - /// - /// return 0; - /// } - /// - /// { - /// int result; - /// - /// result = shortcut_remove_from_home("shortcut_name", _result_cb, NULL); - /// if (result != SHORTCUT_ERROR_NONE) { - /// dlog_print("Failed to remove a shortcut: %d\n", result); - /// return result; - /// } - /// } - /// - /// @endcode - int shortcut_remove_from_home( - ffi.Pointer name, - result_cb cb, - ffi.Pointer user_data, - ) { - return _shortcut_remove_from_home( - name, - cb, - user_data, - ); - } - - late final _shortcut_remove_from_homePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, result_cb, - ffi.Pointer)>>('shortcut_remove_from_home'); - late final _shortcut_remove_from_home = - _shortcut_remove_from_homePtr.asFunction< - int Function( - ffi.Pointer, result_cb, ffi.Pointer)>(); - - /// @brief Gets the preset list of shortcut template from the installed package, synchronously. - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/shortcut - /// @remarks If a homescreen does not support this feature, you will get a proper error code.\n - /// Application must check the return value of this function.\n - /// Application must check the return status from the callback function.\n - /// Application should set the callback function to get the result of this request. - /// @param[in] package_name The package name - /// @param[in] list_cb The callback function to get the shortcut item information - /// @param[in] data The callback data that is used in the callback function - /// @return The return type (int) - /// @retval @c N Number of items (call count of the callback function) - /// @retval #SHORTCUT_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SHORTCUT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SHORTCUT_ERROR_IO_ERROR I/O Error - /// @retval #SHORTCUT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SHORTCUT_ERROR_FAULT Unrecoverable error - /// @retval #SHORTCUT_ERROR_COMM Connection not established or communication problem - /// @retval #SHORTCUT_ERROR_NOT_SUPPORTED Not supported - /// @pre You have to prepare the callback function. - /// @post You have to check the return status from the callback function which is passed by the argument. - int shortcut_get_list( - ffi.Pointer package_name, - shortcut_list_cb list_cb, - ffi.Pointer data, - ) { - return _shortcut_get_list( - package_name, - list_cb, - data, - ); - } - - late final _shortcut_get_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, shortcut_list_cb, - ffi.Pointer)>>('shortcut_get_list'); - late final _shortcut_get_list = _shortcut_get_listPtr.asFunction< - int Function( - ffi.Pointer, shortcut_list_cb, ffi.Pointer)>(); - - /// @brief Sets a callback function to listen requests from applications. - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/shortcut - /// @remarks Should be used in the homescreen.\n - /// Should check the return value of this function. - /// Prospective Clients: Homescreen. - /// @param[in] request_cb The callback function pointer that is invoked when add_to_home is requested - /// @param[in] data The callback data to deliver to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SHORTCUT_ERROR_NONE Successful - /// @retval #SHORTCUT_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SHORTCUT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SHORTCUT_ERROR_IO_ERROR I/O Error - /// @retval #SHORTCUT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SHORTCUT_ERROR_COMM Connection not established or communication problem - /// @retval #SHORTCUT_ERROR_NOT_SUPPORTED Not supported - /// @pre You have to prepare a callback function. - /// @post If a request is sent from the application, the registered callback will be invoked. - /// @see request_cb_t - /// @see shortcut_error_e - int shortcut_set_request_cb( - shortcut_request_cb request_cb, - ffi.Pointer data, - ) { - return _shortcut_set_request_cb( - request_cb, - data, - ); - } - - late final _shortcut_set_request_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(shortcut_request_cb, - ffi.Pointer)>>('shortcut_set_request_cb'); - late final _shortcut_set_request_cb = _shortcut_set_request_cbPtr - .asFunction)>(); - - /// @brief Unsets a callback for the shortcut request. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/shortcut - /// @remarks The specific error code can be obtained using the gat_last_result() method. Error codes are described in Exception section. - /// @return None - /// @exception #SHORTCUT_ERROR_NONE Successful - /// @exception #SHORTCUT_ERROR_NOT_SUPPORTED Not supported - /// @exception #SHORTCUT_ERROR_PERMISSION_DENIED Permission denied - /// @see shortcut_set_request_cb - /// @see get_last_result() - void shortcut_unset_request_cb() { - return _shortcut_unset_request_cb(); - } - - late final _shortcut_unset_request_cbPtr = - _lookup>( - 'shortcut_unset_request_cb'); - late final _shortcut_unset_request_cb = - _shortcut_unset_request_cbPtr.asFunction(); - - /// @brief Sets the callback function to listen the remove requests from applications. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/shortcut - /// @remarks Should be used in the homescreen.\n - /// Should check the return value of this function. - /// Prospective Clients: Homescreen. - /// @param[in] remove_cb The callback function pointer that is invoked when remove_from_home is requested - /// @param[in] data The callback data to deliver to the callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #SHORTCUT_ERROR_NONE Successful - /// @retval #SHORTCUT_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #SHORTCUT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SHORTCUT_ERROR_IO_ERROR I/O Error - /// @retval #SHORTCUT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SHORTCUT_ERROR_COMM Connection not established or communication problem - /// @retval #SHORTCUT_ERROR_NOT_SUPPORTED Not supported - /// @pre You have to prepare a callback function. - /// @post If a request is sent from the application, the registered callback will be invoked. - /// @see remove_cb_t - /// @see shortcut_error_e - int shortcut_set_remove_cb( - shortcut_remove_cb remove_cb, - ffi.Pointer data, - ) { - return _shortcut_set_remove_cb( - remove_cb, - data, - ); - } - - late final _shortcut_set_remove_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(shortcut_remove_cb, - ffi.Pointer)>>('shortcut_set_remove_cb'); - late final _shortcut_set_remove_cb = _shortcut_set_remove_cbPtr - .asFunction)>(); - - /// @brief Unsets a callback for the shortcut remove. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/shortcut - /// @remarks The specific error code can be obtained using the gat_last_result() method. Error codes are described in Exception section. - /// @return None - /// @exception #SHORTCUT_ERROR_NONE Successful - /// @exception #SHORTCUT_ERROR_NOT_SUPPORTED Not supported - /// @exception #SHORTCUT_ERROR_PERMISSION_DENIED Permission denied - /// @see shortcut_set_remove_cb - /// @see get_last_result() - void shortcut_unset_remove_cb() { - return _shortcut_unset_remove_cb(); - } - - late final _shortcut_unset_remove_cbPtr = - _lookup>( - 'shortcut_unset_remove_cb'); - late final _shortcut_unset_remove_cb = - _shortcut_unset_remove_cbPtr.asFunction(); - - /// @brief Creates a new download request and return its download ID. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks The @a download_id is released with download_destroy() by client. - /// - /// @param[out] download_id The download ID that is newly created on success - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_IO_ERROR Internal I/O error - /// @retval #DOWNLOAD_ERROR_QUEUE_FULL Download server queue is full - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @post The download state will be #DOWNLOAD_STATE_READY. - /// - /// @see download_destroy() - int download_create( - ffi.Pointer download_id, - ) { - return _download_create( - download_id, - ); - } - - late final _download_createPtr = - _lookup)>>( - 'download_create'); - late final _download_create = - _download_createPtr.asFunction)>(); - - /// @brief Unloads all data concerning a download ID from memory. - /// - /// @details After calling this API, a download ID is existed at DB in certain time. - /// Within that time, it is able to use the other API with the download ID. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// - /// @remarks If #DOWNLOAD_ERROR_ID_NOT_FOUND is returned, it means that the download ID is completely removed from DB. - /// - /// @param[in] download_id The download ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_create() - int download_destroy( - int download_id, - ) { - return _download_destroy( - download_id, - ); - } - - late final _download_destroyPtr = - _lookup>( - 'download_destroy'); - late final _download_destroy = - _download_destroyPtr.asFunction(); - - /// @brief Sets the URL to download. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks This function should be called before downloading (see download_start()). - /// - /// @param[in] download_id The download ID - /// @param[in] url The URL to download \n - /// If @a url is @c NULL, it clears the previous value. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state must be #DOWNLOAD_STATE_READY, #DOWNLOAD_STATE_FAILED, or #DOWNLOAD_STATE_CANCELED. - /// - /// @see download_get_url() - int download_set_url( - int download_id, - ffi.Pointer url, - ) { - return _download_set_url( - download_id, - url, - ); - } - - late final _download_set_urlPtr = _lookup< - ffi.NativeFunction)>>( - 'download_set_url'); - late final _download_set_url = _download_set_urlPtr - .asFunction)>(); - - /// @brief Gets the URL to download. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks You must release @a url using free(). - /// - /// @param[in] download_id The download ID - /// @param[out] url The URL to download - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_set_url() - int download_get_url( - int download_id, - ffi.Pointer> url, - ) { - return _download_get_url( - download_id, - url, - ); - } - - late final _download_get_urlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, - ffi.Pointer>)>>('download_get_url'); - late final _download_get_url = _download_get_urlPtr - .asFunction>)>(); - - /// @brief Sets the allowed network type for the downloaded file. - /// - /// @details The file can be downloaded only under the allowed network. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks This function should be called before downloading (see download_start()). - /// - /// @param[in] download_id The download ID - /// @param[in] net_type The network type that the client prefers - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state must be #DOWNLOAD_STATE_READY, #DOWNLOAD_STATE_FAILED, or #DOWNLOAD_STATE_CANCELED. - /// - /// @see download_get_network_type() - /// @see #download_network_type_e - int download_set_network_type( - int download_id, - int net_type, - ) { - return _download_set_network_type( - download_id, - net_type, - ); - } - - late final _download_set_network_typePtr = - _lookup>( - 'download_set_network_type'); - late final _download_set_network_type = - _download_set_network_typePtr.asFunction(); - - /// @brief Gets the network type for the downloaded file. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @param[in] download_id The download ID - /// @param[out] net_type The network type that is defined by client - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_set_network_type() - /// @see #download_network_type_e - int download_get_network_type( - int download_id, - ffi.Pointer net_type, - ) { - return _download_get_network_type( - download_id, - net_type, - ); - } - - late final _download_get_network_typePtr = _lookup< - ffi - .NativeFunction)>>( - 'download_get_network_type'); - late final _download_get_network_type = _download_get_network_typePtr - .asFunction)>(); - - /// @brief Sets the destination for the downloaded file. - /// - /// @details The file will be downloaded to the specified destination. - /// The downloaded file is saved to an auto-generated file name in the destination. - /// If the destination is not specified, the file will be downloaded to default storage (see the @ref CAPI_SYSTEM_STORAGE_MODULE API). - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks This function should be called before downloading (see download_start()). - /// - /// @param[in] download_id The download ID - /// @param[in] path The absolute path to the downloaded file \n - /// If @a path is @c NULL, it clears the previous value. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state must be #DOWNLOAD_STATE_READY, #DOWNLOAD_STATE_FAILED, or #DOWNLOAD_STATE_CANCELED. - /// - /// @see download_get_destination() - int download_set_destination( - int download_id, - ffi.Pointer path, - ) { - return _download_set_destination( - download_id, - path, - ); - } - - late final _download_set_destinationPtr = _lookup< - ffi.NativeFunction)>>( - 'download_set_destination'); - late final _download_set_destination = _download_set_destinationPtr - .asFunction)>(); - - /// @brief Gets the destination path for the downloaded file. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks You must release @a path using free(). - /// - /// @param[in] download_id The download ID - /// @param[out] path The absolute path to the downloaded file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_set_destination() - int download_get_destination( - int download_id, - ffi.Pointer> path, - ) { - return _download_get_destination( - download_id, - path, - ); - } - - late final _download_get_destinationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, - ffi.Pointer>)>>('download_get_destination'); - late final _download_get_destination = _download_get_destinationPtr - .asFunction>)>(); - - /// @brief Sets the name for the downloaded file. - /// - /// @details The file will be saved in the specified destination with the given file name. - /// If the file name is not specified, the downloaded file will be saved with an auto-generated file name in the destination. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks This function should be called before downloading (see download_start()). - /// - /// @param[in] download_id The download ID - /// @param[in] file_name The file name for the downloaded file \n - /// If @a name is @c NULL it clears the previous value. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state must be #DOWNLOAD_STATE_READY, #DOWNLOAD_STATE_FAILED, or #DOWNLOAD_STATE_CANCELED. - /// - /// @see download_get_file_name() - int download_set_file_name( - int download_id, - ffi.Pointer file_name, - ) { - return _download_set_file_name( - download_id, - file_name, - ); - } - - late final _download_set_file_namePtr = _lookup< - ffi.NativeFunction)>>( - 'download_set_file_name'); - late final _download_set_file_name = _download_set_file_namePtr - .asFunction)>(); - - /// @brief Gets the name of the downloaded file set previously by download_set_file_name(). - /// - /// @details If the name is not set, @c NULL is returned. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks You must release @a file_name using free(). - /// - /// @param[in] download_id The download ID - /// @param[out] file_name The file name which is set by user - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_set_file_name() - int download_get_file_name( - int download_id, - ffi.Pointer> file_name, - ) { - return _download_get_file_name( - download_id, - file_name, - ); - } - - late final _download_get_file_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, - ffi.Pointer>)>>('download_get_file_name'); - late final _download_get_file_name = _download_get_file_namePtr - .asFunction>)>(); - - /// @brief Gets the absolute path to save the downloaded file. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks This function returns #DOWNLOAD_ERROR_INVALID_STATE if the download is not completed. - /// You must release @a path using free(). - /// - /// @param[in] download_id The download ID - /// @param[out] path The absolute path to the downloaded file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The download state must be #DOWNLOAD_STATE_COMPLETED. - /// - /// @see download_set_file_name() - /// @see download_set_destination() - int download_get_downloaded_file_path( - int download_id, - ffi.Pointer> path, - ) { - return _download_get_downloaded_file_path( - download_id, - path, - ); - } - - late final _download_get_downloaded_file_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer>)>>( - 'download_get_downloaded_file_path'); - late final _download_get_downloaded_file_path = - _download_get_downloaded_file_pathPtr - .asFunction>)>(); - - /// @brief Gets the MIME type of the downloaded content. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks This function returns #DOWNLOAD_ERROR_INVALID_STATE if the download has not been started. - /// You must release @a mime_type using free(). - /// - /// @param[in] download_id The download ID - /// @param[out] mime_type The MIME type of the downloaded file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_set_file_name() - /// @see download_set_destination() - /// @see download_get_downloaded_file_path() - int download_get_mime_type( - int download_id, - ffi.Pointer> mime_type, - ) { - return _download_get_mime_type( - download_id, - mime_type, - ); - } - - late final _download_get_mime_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, - ffi.Pointer>)>>('download_get_mime_type'); - late final _download_get_mime_type = _download_get_mime_typePtr - .asFunction>)>(); - - /// @brief Enables or disables auto download. - /// @details If this option is enabled, - /// the previous downloading item is restarted automatically as soon as the download daemon is restarted. - /// The download progress continues after the client process is terminated. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks The client should call download_set_notification() and download_set_notification_extra_param() after calling this API. - /// If it is not done, the user will not receive the download result in case the client process is not alive. \n - /// The default value is @c false. - /// - /// @param[in] download_id The download ID - /// @param[in] enable Set @c true to enable auto download, - /// otherwise set @c false to disable auto download - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state must be #DOWNLOAD_STATE_READY, #DOWNLOAD_STATE_FAILED, or #DOWNLOAD_STATE_CANCELED. - /// - /// @see download_get_auto_download() - /// @see download_set_notification() - /// @see download_set_notification_extra_param() - int download_set_auto_download( - int download_id, - bool enable, - ) { - return _download_set_auto_download( - download_id, - enable, - ); - } - - late final _download_set_auto_downloadPtr = - _lookup>( - 'download_set_auto_download'); - late final _download_set_auto_download = - _download_set_auto_downloadPtr.asFunction(); - - /// @brief Checks whether auto download is enabled. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @param[in] download_id The download ID - /// @param[out] enable @c true if auto download is enabled, - /// otherwise @c false if auto download is disabled - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_set_auto_download() - int download_get_auto_download( - int download_id, - ffi.Pointer enable, - ) { - return _download_get_auto_download( - download_id, - enable, - ); - } - - late final _download_get_auto_downloadPtr = _lookup< - ffi.NativeFunction)>>( - 'download_get_auto_download'); - late final _download_get_auto_download = _download_get_auto_downloadPtr - .asFunction)>(); - - /// @brief Adds a HTTP header field to the download request. - /// - /// @details The given HTTP header field will be included with the HTTP request of the download request. - /// For more information, see HTTP/1.1: HTTP Message Headers. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks This function should be called before downloading (see download_start()). - /// This function replaces any existing value for the given key. - /// This function returns #DOWNLOAD_ERROR_INVALID_PARAMETER if @a field or @a value is a zero-length string. - /// - /// @param[in] download_id The download ID - /// @param[in] field The name of the HTTP header field - /// @param[in] value The value associated with given field - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state - /// @retval #DOWNLOAD_ERROR_IO_ERROR Internal I/O error - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state must be #DOWNLOAD_STATE_READY, #DOWNLOAD_STATE_FAILED, or #DOWNLOAD_STATE_CANCELED. - /// - /// @see download_get_http_header_field() - /// @see download_remove_http_header_field() - int download_add_http_header_field( - int download_id, - ffi.Pointer field, - ffi.Pointer value, - ) { - return _download_add_http_header_field( - download_id, - field, - value, - ); - } - - late final _download_add_http_header_fieldPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, - ffi.Pointer)>>('download_add_http_header_field'); - late final _download_add_http_header_field = - _download_add_http_header_fieldPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets a value associated with a given HTTP header field from the download. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks This function returns #DOWNLOAD_ERROR_INVALID_PARAMETER if @a field is zero-length string. - /// You must release @a value using free(). - /// - /// @param[in] download_id The download ID - /// @param[in] field The name of the HTTP header field - /// @param[out] value The value associated with given field - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state - /// @retval #DOWNLOAD_ERROR_FIELD_NOT_FOUND Specified field not found - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_add_http_header_field() - /// @see download_remove_http_header_field() - int download_get_http_header_field( - int download_id, - ffi.Pointer field, - ffi.Pointer> value, - ) { - return _download_get_http_header_field( - download_id, - field, - value, - ); - } - - late final _download_get_http_header_fieldPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, - ffi.Pointer>)>>( - 'download_get_http_header_field'); - late final _download_get_http_header_field = - _download_get_http_header_fieldPtr.asFunction< - int Function(int, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets all the HTTP header fields added to the download request. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks You must release @a value using free(). - /// - /// @param[in] download_id The download ID - /// @param[out] fields The array of the HTTP header fields - /// @param[out] length The number of the HTTP header fields - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_add_http_header_field() - /// @see download_remove_http_header_field() - int download_get_http_header_field_list( - int download_id, - ffi.Pointer>> fields, - ffi.Pointer length, - ) { - return _download_get_http_header_field_list( - download_id, - fields, - length, - ); - } - - late final _download_get_http_header_field_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer>>, - ffi.Pointer)>>('download_get_http_header_field_list'); - late final _download_get_http_header_field_list = - _download_get_http_header_field_listPtr.asFunction< - int Function(int, ffi.Pointer>>, - ffi.Pointer)>(); - - /// @brief Removes a given HTTP header field from the download. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks This function should be called before downloading (see download_start()). - /// This function returns #DOWNLOAD_ERROR_INVALID_PARAMETER if field is zero-length string. - /// - /// @param[in] download_id The download ID - /// @param[in] field The name of the HTTP header field - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state - /// @retval #DOWNLOAD_ERROR_FIELD_NOT_FOUND Specified field not found - /// @retval #DOWNLOAD_ERROR_IO_ERROR Internal I/O error - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state must be #DOWNLOAD_STATE_READY, #DOWNLOAD_STATE_FAILED, or #DOWNLOAD_STATE_CANCELED. - /// - /// @see download_add_http_header_field() - /// @see download_get_http_header_field() - int download_remove_http_header_field( - int download_id, - ffi.Pointer field, - ) { - return _download_remove_http_header_field( - download_id, - field, - ); - } - - late final _download_remove_http_header_fieldPtr = _lookup< - ffi.NativeFunction)>>( - 'download_remove_http_header_field'); - late final _download_remove_http_header_field = - _download_remove_http_header_fieldPtr - .asFunction)>(); - - /// @brief Registers a callback function to be invoked when a download state is changed. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks This function should be called before downloading (see download_start()). - /// - /// @param[in] download_id The download ID - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @post download_state_changed_cb() will be invoked. - /// - /// @see download_unset_state_changed_cb() - /// @see download_state_changed_cb() - int download_set_state_changed_cb( - int download_id, - download_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _download_set_state_changed_cb( - download_id, - callback, - user_data, - ); - } - - late final _download_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, download_state_changed_cb, - ffi.Pointer)>>('download_set_state_changed_cb'); - late final _download_set_state_changed_cb = - _download_set_state_changed_cbPtr.asFunction< - int Function( - int, download_state_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the download state change callback function. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks This function should be called before downloading (see download_start()). - /// - /// @param[in] download_id The download ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_set_state_changed_cb() - /// @see download_state_changed_cb() - int download_unset_state_changed_cb( - int download_id, - ) { - return _download_unset_state_changed_cb( - download_id, - ); - } - - late final _download_unset_state_changed_cbPtr = - _lookup>( - 'download_unset_state_changed_cb'); - late final _download_unset_state_changed_cb = - _download_unset_state_changed_cbPtr.asFunction(); - - /// @brief Registers a callback function to be invoked when progress of the download changes. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks This function should be called before downloading (see download_start()). - /// - /// @param[in] download_id The download ID - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @post download_progress_cb() will be invoked. - /// - /// @see download_unset_progress_cb() - /// @see download_progress_cb() - int download_set_progress_cb( - int download_id, - download_progress_cb callback, - ffi.Pointer user_data, - ) { - return _download_set_progress_cb( - download_id, - callback, - user_data, - ); - } - - late final _download_set_progress_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, download_progress_cb, - ffi.Pointer)>>('download_set_progress_cb'); - late final _download_set_progress_cb = - _download_set_progress_cbPtr.asFunction< - int Function(int, download_progress_cb, ffi.Pointer)>(); - - /// @brief Unregisters the download progress change callback function. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks This function should be called before downloading (see download_start()). - /// - /// @param[in] download_id The download ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_set_progress_cb() - /// @see download_progress_cb() - int download_unset_progress_cb( - int download_id, - ) { - return _download_unset_progress_cb( - download_id, - ); - } - - late final _download_unset_progress_cbPtr = - _lookup>( - 'download_unset_progress_cb'); - late final _download_unset_progress_cb = - _download_unset_progress_cbPtr.asFunction(); - - /// @brief Starts or resumes the download, asynchronously. - /// - /// @details This function starts to download the current URL, or resumes the download if paused. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks The URL is the mandatory information to start the download. - /// @remarks It should call download_set_progress_cb() and download_set_state_changed_cb() again - /// after the client process is restarted or download_destroy() is called. - /// - /// @param[in] download_id The download ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state - /// @retval #DOWNLOAD_ERROR_IO_ERROR Internal I/O error - /// @retval #DOWNLOAD_ERROR_INVALID_URL Invalid URL - /// @retval #DOWNLOAD_ERROR_INVALID_DESTINATION Invalid destination - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_QUEUE_FULL Download server queue is full - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The download state must be #DOWNLOAD_STATE_READY, #DOWNLOAD_STATE_PAUSED, #DOWNLOAD_STATE_CANCELED, or #DOWNLOAD_STATE_FAILED. - /// @post The download state will be #DOWNLOAD_STATE_QUEUED or #DOWNLOAD_STATE_DOWNLOADING. - /// - /// @see download_set_url() - /// @see download_pause() - /// @see download_cancel() - int download_start( - int download_id, - ) { - return _download_start( - download_id, - ); - } - - late final _download_startPtr = - _lookup>('download_start'); - late final _download_start = - _download_startPtr.asFunction(); - - /// @brief Pauses the download, asynchronously. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks The paused download can be restarted with download_start() or cancelled with download_cancel(). - /// - /// @param[in] download_id The download ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state - /// @retval #DOWNLOAD_ERROR_IO_ERROR Internal I/O error - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The download state must be #DOWNLOAD_STATE_DOWNLOADING. - /// @post The download state will be #DOWNLOAD_STATE_PAUSED. - /// - /// @see download_start() - /// @see download_cancel() - int download_pause( - int download_id, - ) { - return _download_pause( - download_id, - ); - } - - late final _download_pausePtr = - _lookup>('download_pause'); - late final _download_pause = - _download_pausePtr.asFunction(); - - /// @brief Cancels the download, asynchronously. - /// - /// @details This function cancels the running download and its state will be #DOWNLOAD_STATE_READY. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks The canceled download can be restarted with download_start(). - /// - /// @param[in] download_id The download ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state - /// @retval #DOWNLOAD_ERROR_IO_ERROR Internal I/O error - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The download state must be #DOWNLOAD_STATE_QUEUED, #DOWNLOAD_STATE_DOWNLOADING, or #DOWNLOAD_STATE_PAUSED. - /// @post The download state will be #DOWNLOAD_STATE_CANCELED. - /// - /// @see download_start() - int download_cancel( - int download_id, - ) { - return _download_cancel( - download_id, - ); - } - - late final _download_cancelPtr = - _lookup>('download_cancel'); - late final _download_cancel = - _download_cancelPtr.asFunction(); - - /// @brief Gets the current state of the download. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @param[in] download_id The download ID - /// @param[out] state The current state of the download - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see #download_state_e - int download_get_state( - int download_id, - ffi.Pointer state, - ) { - return _download_get_state( - download_id, - state, - ); - } - - late final _download_get_statePtr = _lookup< - ffi - .NativeFunction)>>( - 'download_get_state'); - late final _download_get_state = _download_get_statePtr - .asFunction)>(); - - /// @brief Gets the full path of the temporary file to store downloaded content. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @param[in] download_id The download ID - /// @param[out] temp_path The full path of temporary file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The download state must be one of the states after #DOWNLOAD_STATE_DOWNLOADING. - /// - /// @see download_set_state_changed_cb() - /// @see download_unset_state_changed_cb() - /// @see download_start() - int download_get_temp_path( - int download_id, - ffi.Pointer> temp_path, - ) { - return _download_get_temp_path( - download_id, - temp_path, - ); - } - - late final _download_get_temp_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, - ffi.Pointer>)>>('download_get_temp_path'); - late final _download_get_temp_path = _download_get_temp_pathPtr - .asFunction>)>(); - - /// @brief Sets the directory path of the temporary file used in the previous download request. - /// @details This is only useful when resuming download to make HTTP request header at the client side. - /// Otherwise, the path should be ignored internally. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks If the etag value is not present in the download database, it is useless to set the temporary path. \n - /// When resuming download, the data is attached at the end of this temporary file. - /// - /// @param[in] download_id The download ID - /// @param[out] path The full path of temporary file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state must be #DOWNLOAD_STATE_READY, #DOWNLOAD_STATE_FAILED, or #DOWNLOAD_STATE_CANCELED. - /// - /// @see download_get_etag() - int download_set_temp_file_path( - int download_id, - ffi.Pointer path, - ) { - return _download_set_temp_file_path( - download_id, - path, - ); - } - - late final _download_set_temp_file_pathPtr = _lookup< - ffi.NativeFunction)>>( - 'download_set_temp_file_path'); - late final _download_set_temp_file_path = _download_set_temp_file_pathPtr - .asFunction)>(); - - /// @brief Gets the content name of downloaded file. - /// - /// @details This can be defined with reference of HTTP response header data. - /// The content name can be received when HTTP response header is received. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @param[in] download_id The download ID - /// @param[out] content_name The content name for displaying to user - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The download state must be one of the states after #DOWNLOAD_STATE_DOWNLOADING. - /// - /// @see download_set_state_changed_cb() - /// @see download_unset_state_changed_cb() - /// @see download_start() - int download_get_content_name( - int download_id, - ffi.Pointer> content_name, - ) { - return _download_get_content_name( - download_id, - content_name, - ); - } - - late final _download_get_content_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer>)>>( - 'download_get_content_name'); - late final _download_get_content_name = _download_get_content_namePtr - .asFunction>)>(); - - /// @brief Gets the total size of downloaded content. - /// - /// @details This information is received from the server. If the server does not send the total size of the content, @a content_size is set to zero. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @param[in] download_id The download ID - /// @param[out] content_size The content size for displaying to user - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The download state must be one of the states after #DOWNLOAD_STATE_DOWNLOADING. - /// - /// @see download_set_state_changed_cb() - /// @see download_unset_state_changed_cb() - /// @see download_start() - int download_get_content_size( - int download_id, - ffi.Pointer content_size, - ) { - return _download_get_content_size( - download_id, - content_size, - ); - } - - late final _download_get_content_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, - ffi.Pointer)>>('download_get_content_size'); - late final _download_get_content_size = _download_get_content_sizePtr - .asFunction)>(); - - /// @brief Gets an error value when the download fails. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @param[in] download_id The download ID - /// @param[out] error The error value - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The download state must be #DOWNLOAD_STATE_FAILED. - /// @pre The download state must be #DOWNLOAD_STATE_CANCELED. - /// - /// @see download_set_state_changed_cb() - /// @see download_unset_state_changed_cb() - /// @see download_start() - /// @see download_error_e - int download_get_error( - int download_id, - ffi.Pointer error, - ) { - return _download_get_error( - download_id, - error, - ); - } - - late final _download_get_errorPtr = _lookup< - ffi - .NativeFunction)>>( - 'download_get_error'); - late final _download_get_error = _download_get_errorPtr - .asFunction)>(); - - /// @brief Gets a HTTP status code when a download error occurs. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @param[in] download_id The download ID - /// @param[out] HTTP_status The HTTP status code defined in RFC 2616 - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The download state must be #DOWNLOAD_STATE_FAILED. - /// - /// @see download_set_download_status_cb() - /// @see download_unset_download_status_cb() - /// @see download_start() - int download_get_http_status( - int download_id, - ffi.Pointer HTTP_status, - ) { - return _download_get_http_status( - download_id, - HTTP_status, - ); - } - - late final _download_get_http_statusPtr = _lookup< - ffi.NativeFunction)>>( - 'download_get_http_status'); - late final _download_get_http_status = _download_get_http_statusPtr - .asFunction)>(); - - /// @brief Sets an app control handle to register notification messages. - /// @details Three types of notification message can be posted: completion, failed and ongoing type. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks When the notification message is clicked, the action to take is decided by the app control handle. \n - /// If the app control handle is not set, the following default operation is executed when the notification message is clicked: \n - /// 1) download completed state - the viewer application is executed according to extension name of downloaded content, \n - /// 2) download failed state and ongoing state - the client application is executed. \n - /// This function should be called before starting the download. \n - /// The app control handle MUST BE FREED by the client when it is not used any more. - /// - /// @param[in] download_id The download ID - /// @param[in] type The enumeration type \n - /// See #download_notification_app_control_type_e. - /// @param[in] handle The app control handle pointer value - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state must be #DOWNLOAD_STATE_READY, #DOWNLOAD_STATE_FAILED, or #DOWNLOAD_STATE_CANCELED. - /// - /// @see download_set_notification_type() - /// @see download_get_notification_app_control() - int download_set_notification_app_control( - int download_id, - int type, - app_control_h handle, - ) { - return _download_set_notification_app_control( - download_id, - type, - handle, - ); - } - - late final _download_set_notification_app_controlPtr = _lookup< - ffi - .NativeFunction>( - 'download_set_notification_app_control'); - late final _download_set_notification_app_control = - _download_set_notification_app_controlPtr - .asFunction(); - - /// @brief Gets the app control handle (used previously to register notification messages) which is set by download_set_notification_app_control(). - /// - /// @details When the notification message is clicked, the action is decided by the app control handle. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks The app control handle MUST BE FREED by the client when it is not used any more. - /// - /// @param[in] download_id The download ID - /// @param[in] type The enumeration type \n - /// See #download_notification_app_control_type_e. - /// @param[out] handle The app control handle pointer value - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_NO_DATA The app control handle has not been set - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_set_notification_app_control() - int download_get_notification_app_control( - int download_id, - int type, - ffi.Pointer handle, - ) { - return _download_get_notification_app_control( - download_id, - type, - handle, - ); - } - - late final _download_get_notification_app_controlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Int32, ffi.Pointer)>>( - 'download_get_notification_app_control'); - late final _download_get_notification_app_control = - _download_get_notification_app_controlPtr - .asFunction)>(); - - /// @brief Sets the title of a notification. - /// - /// @details When registering a notification, the title is displayed in the title area of the notification message. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @param[in] download_id The download ID - /// @param[in] title The title for displaying to user - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre If a notification option is not enabled, this title is not shown to user. - /// - /// @see download_set_notification_type() - /// @see download_get_notification_title() - int download_set_notification_title( - int download_id, - ffi.Pointer title, - ) { - return _download_set_notification_title( - download_id, - title, - ); - } - - late final _download_set_notification_titlePtr = _lookup< - ffi.NativeFunction)>>( - 'download_set_notification_title'); - late final _download_set_notification_title = - _download_set_notification_titlePtr - .asFunction)>(); - - /// @brief Gets the title of the notification set by download_set_notification_title(). - /// - /// @details When registering a notification, the title is displayed in the title area of the notification message. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @param[in] download_id The download ID - /// @param[out] title The title for displaying to user - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_NO_DATA The title has not been set - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre It can get the title value before calling this API. - /// - /// @see download_set_notification_title() - int download_get_notification_title( - int download_id, - ffi.Pointer> title, - ) { - return _download_get_notification_title( - download_id, - title, - ); - } - - late final _download_get_notification_titlePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer>)>>( - 'download_get_notification_title'); - late final _download_get_notification_title = - _download_get_notification_titlePtr - .asFunction>)>(); - - /// @brief Sets the description of a notification. - /// - /// @details When registering a notification, the description is displayed in the description area of the notification message. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @param[in] download_id The download ID - /// @param[in] description The description for displaying to user - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre If the notification option is not enabled, this description is not shown to user. - /// - /// @see download_set_notification_type() - /// @see download_get_notification_description() - int download_set_notification_description( - int download_id, - ffi.Pointer description, - ) { - return _download_set_notification_description( - download_id, - description, - ); - } - - late final _download_set_notification_descriptionPtr = _lookup< - ffi.NativeFunction)>>( - 'download_set_notification_description'); - late final _download_set_notification_description = - _download_set_notification_descriptionPtr - .asFunction)>(); - - /// @brief Gets the description of a notification set by download_set_notification_description(). - /// - /// @details When registering a notification, the description is displayed in the description area of the notification message. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @param[in] download_id The download ID - /// @param[out] description The description for displaying to user - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_NO_DATA The description has not been set - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre It can get the title value before calling this API. - /// - /// @see download_set_notification_description() - int download_get_notification_description( - int download_id, - ffi.Pointer> description, - ) { - return _download_get_notification_description( - download_id, - description, - ); - } - - late final _download_get_notification_descriptionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer>)>>( - 'download_get_notification_description'); - late final _download_get_notification_description = - _download_get_notification_descriptionPtr - .asFunction>)>(); - - /// @brief Sets an option value to register notification messages. - /// @details Three types of notification message can be posted: completion, failed and ongoing type. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks When the notification message is clicked, the action to take is decided by the app control handle (set by download_set_notification_app_control()). \n - /// If the app control is not set, the following default operation is executed when the notification message is clicked: \n - /// 1) download completed state - the viewer application is executed according to extension name of downloaded content, \n - /// 2) download failed state and ongoing state - the client application is executed. \n - /// The default type is #DOWNLOAD_NOTIFICATION_TYPE_NONE. \n - /// This function should be called before starting the download. - /// - /// @param[in] download_id The download ID - /// @param[in] type The enumeration type \n - /// See #download_notification_type_e. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state must be #DOWNLOAD_STATE_READY, #DOWNLOAD_STATE_FAILED, or #DOWNLOAD_STATE_CANCELED. - /// - /// @see download_set_notification_app_control() - /// @see download_get_notification_type() - int download_set_notification_type( - int download_id, - int type, - ) { - return _download_set_notification_type( - download_id, - type, - ); - } - - late final _download_set_notification_typePtr = - _lookup>( - 'download_set_notification_type'); - late final _download_set_notification_type = - _download_set_notification_typePtr.asFunction(); - - /// @brief Gets an option value to register notification messages set by download_set_notification_type(). - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks When the notification message is clicked, the action is decided by the app control from download_set_notification_app_control(). \n - /// The default type is #DOWNLOAD_NOTIFICATION_TYPE_NONE. - /// - /// @param[in] download_id The download ID - /// @param[out] type The enumeration type \n - /// See #download_notification_type_e. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_set_notification_type() - int download_get_notification_type( - int download_id, - ffi.Pointer type, - ) { - return _download_get_notification_type( - download_id, - type, - ); - } - - late final _download_get_notification_typePtr = _lookup< - ffi - .NativeFunction)>>( - 'download_get_notification_type'); - late final _download_get_notification_type = - _download_get_notification_typePtr - .asFunction)>(); - - /// @brief Gets an etag value from the HTTP response header when making a HTTP request for resume. - /// - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/download - /// - /// @remarks The etag value is available or not depending on the web server. \n - /// After download is started, it can get the etag value. - /// - /// @param[in] download_id The download ID - /// @param[out] etag The etag value - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #DOWNLOAD_ERROR_NONE Successful - /// @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No download ID - /// @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DOWNLOAD_ERROR_NOT_SUPPORTED Not supported - /// - /// @see download_set_temp_file_path() - int download_get_etag( - int download_id, - ffi.Pointer> etag, - ) { - return _download_get_etag( - download_id, - etag, - ); - } - - late final _download_get_etagPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, - ffi.Pointer>)>>('download_get_etag'); - late final _download_get_etag = _download_get_etagPtr - .asFunction>)>(); - - /// @brief Gets the MIME type for the given file extension. - /// - /// @remarks The @a mime_type must be released with free() by you. - /// @param[in] file_extension The file extension without the leading dot ('.') - /// @param[out] mime_type The MIME type for the given file extension \n - /// The MIME type is 'application/octet-stream' if the given file extension is not associated with specific file formats - /// @return 0 on success, otherwise a negative error value. - /// @retval #MIME_TYPE_ERROR_NONE Successful - /// @retval #MIME_TYPE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MIME_TYPE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MIME_TYPE_ERROR_IO_ERROR Internal I/O error - /// @see mime_type_get_file_extension() - int mime_type_get_mime_type( - ffi.Pointer file_extension, - ffi.Pointer> mime_type, - ) { - return _mime_type_get_mime_type( - file_extension, - mime_type, - ); - } - - late final _mime_type_get_mime_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer>)>>('mime_type_get_mime_type'); - late final _mime_type_get_mime_type = _mime_type_get_mime_typePtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Gets the file extensions for the given MIME type. - /// - /// @remarks The @a file_extension must be released with free() by you. - /// @param[in] mime_type The MIME type - /// @param[out] file_extension The array of file extension without the leading dot ('.') - /// @param[out] length The length of the array of file extension or zero if there is none - /// @return 0 on success, otherwise a negative error value. - /// @retval #MIME_TYPE_ERROR_NONE Successful - /// @retval #MIME_TYPE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MIME_TYPE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MIME_TYPE_ERROR_IO_ERROR Internal I/O error - /// @see mime_type_get_mime_type() - int mime_type_get_file_extension( - ffi.Pointer mime_type, - ffi.Pointer>> file_extension, - ffi.Pointer length, - ) { - return _mime_type_get_file_extension( - mime_type, - file_extension, - length, - ); - } - - late final _mime_type_get_file_extensionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>>, - ffi.Pointer)>>('mime_type_get_file_extension'); - late final _mime_type_get_file_extension = - _mime_type_get_file_extensionPtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer>>, - ffi.Pointer)>(); - - /// @brief Gets the MIME type for the given data. - /// - /// @since_tizen 4.0 - /// @remarks The @a mime_type must be released with free() by you. - /// @param[in] data The stream of file data - /// @param[in] len The length of data - /// @param[out] mime_type The MIME type for the given file extension \n - /// The MIME type is 'application/octet-stream' if the given file extension is not associated with specific file formats - /// @return 0 on success, otherwise a negative error value. - /// @retval #MIME_TYPE_ERROR_NONE Successful - /// @retval #MIME_TYPE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MIME_TYPE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MIME_TYPE_ERROR_IO_ERROR Internal I/O error - int mime_type_get_mime_type_for_data( - ffi.Pointer data, - int len, - ffi.Pointer> mime_type, - ) { - return _mime_type_get_mime_type_for_data( - data, - len, - mime_type, - ); - } - - late final _mime_type_get_mime_type_for_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, - ffi.Pointer>)>>( - 'mime_type_get_mime_type_for_data'); - late final _mime_type_get_mime_type_for_data = - _mime_type_get_mime_type_for_dataPtr.asFunction< - int Function(ffi.Pointer, int, - ffi.Pointer>)>(); - - /// @brief Gets the MIME type for the given file path. - /// - /// @since_tizen 4.0 - /// @remarks The @a mime_type must be released with free() by you. - /// @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage. - /// @remarks http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. - /// @param[in] file_path The path of target file - /// @param[out] mime_type The MIME type for the given file extension \n - /// The MIME type is 'application/octet-stream' if the given file extension is not associated with specific file formats - /// @return 0 on success, otherwise a negative error value. - /// @retval #MIME_TYPE_ERROR_NONE Successful - /// @retval #MIME_TYPE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MIME_TYPE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MIME_TYPE_ERROR_IO_ERROR Internal I/O error - /// @retval #MIME_TYPE_ERROR_PERMISSION_DENIED Permission denied - int mime_type_get_mime_type_for_file( - ffi.Pointer file_path, - ffi.Pointer> mime_type, - ) { - return _mime_type_get_mime_type_for_file( - file_path, - mime_type, - ); - } - - late final _mime_type_get_mime_type_for_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer>)>>( - 'mime_type_get_mime_type_for_file'); - late final _mime_type_get_mime_type_for_file = - _mime_type_get_mime_type_for_filePtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Clones the audio metadata. - /// @details This function copies the audio metadata handle from a source to destination. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a dst should be released using audio_meta_destroy(). - /// - /// @param[out] dst The destination handle to the audio metadata - /// @param[in] src The source handle to the audio metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see audio_meta_destroy() - int audio_meta_clone( - ffi.Pointer dst, - audio_meta_h src, - ) { - return _audio_meta_clone( - dst, - src, - ); - } - - late final _audio_meta_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, audio_meta_h)>>('audio_meta_clone'); - late final _audio_meta_clone = _audio_meta_clonePtr - .asFunction, audio_meta_h)>(); - - /// @brief Destroys the audio metadata. - /// @details This function frees all resources related to the audio metadata handle. This handle - /// no longer can be used to perform any operations. A new handle has to - /// be created before the next use. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] audio The handle to the audio metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre Get a copy of audio metadata handle handle by calling audio_meta_clone(). - /// - /// @see audio_meta_clone() - int audio_meta_destroy( - audio_meta_h audio, - ) { - return _audio_meta_destroy( - audio, - ); - } - - late final _audio_meta_destroyPtr = - _lookup>( - 'audio_meta_destroy'); - late final _audio_meta_destroy = - _audio_meta_destroyPtr.asFunction(); - - /// @brief Gets the ID of the media of the given audio metadata. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a media_id should be released using free(). - /// - /// @param[in] audio The handle to the audio metadata - /// @param[out] media_id The media ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int audio_meta_get_media_id( - audio_meta_h audio, - ffi.Pointer> media_id, - ) { - return _audio_meta_get_media_id( - audio, - media_id, - ); - } - - late final _audio_meta_get_media_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_meta_h, - ffi.Pointer>)>>('audio_meta_get_media_id'); - late final _audio_meta_get_media_id = _audio_meta_get_media_idPtr.asFunction< - int Function(audio_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the album of the given audio metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no album info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a album should be released using free(). - /// - /// @param[in] audio The handle to the audio metadata - /// @param[out] album The album of the audio metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int audio_meta_get_album( - audio_meta_h audio, - ffi.Pointer> album, - ) { - return _audio_meta_get_album( - audio, - album, - ); - } - - late final _audio_meta_get_albumPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_meta_h, - ffi.Pointer>)>>('audio_meta_get_album'); - late final _audio_meta_get_album = _audio_meta_get_albumPtr.asFunction< - int Function(audio_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the artist of the given audio metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no artist info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a artist should be released using free(). - /// - /// @param[in] audio The handle to the audio metadata - /// @param[out] artist The artist of the audio metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int audio_meta_get_artist( - audio_meta_h audio, - ffi.Pointer> artist, - ) { - return _audio_meta_get_artist( - audio, - artist, - ); - } - - late final _audio_meta_get_artistPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_meta_h, - ffi.Pointer>)>>('audio_meta_get_artist'); - late final _audio_meta_get_artist = _audio_meta_get_artistPtr.asFunction< - int Function(audio_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the album artist of the given audio metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no album artist info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a album_artist should be released using free(). - /// - /// @param[in] audio The handle to the audio metadata - /// @param[out] album_artist The album artist of the audio metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int audio_meta_get_album_artist( - audio_meta_h audio, - ffi.Pointer> album_artist, - ) { - return _audio_meta_get_album_artist( - audio, - album_artist, - ); - } - - late final _audio_meta_get_album_artistPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - audio_meta_h, ffi.Pointer>)>>( - 'audio_meta_get_album_artist'); - late final _audio_meta_get_album_artist = - _audio_meta_get_album_artistPtr.asFunction< - int Function(audio_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the genre of the given audio metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no genre info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a genre should be released using free(). - /// - /// @param[in] audio The handle to the audio metadata - /// @param[out] genre The genre of the audio metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int audio_meta_get_genre( - audio_meta_h audio, - ffi.Pointer> genre, - ) { - return _audio_meta_get_genre( - audio, - genre, - ); - } - - late final _audio_meta_get_genrePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_meta_h, - ffi.Pointer>)>>('audio_meta_get_genre'); - late final _audio_meta_get_genre = _audio_meta_get_genrePtr.asFunction< - int Function(audio_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the composer of the given audio metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no composer info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a composer should be released using free(). - /// - /// @param[in] audio The handle to the audio metadata - /// @param[out] composer The composer of the audio metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int audio_meta_get_composer( - audio_meta_h audio, - ffi.Pointer> composer, - ) { - return _audio_meta_get_composer( - audio, - composer, - ); - } - - late final _audio_meta_get_composerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_meta_h, - ffi.Pointer>)>>('audio_meta_get_composer'); - late final _audio_meta_get_composer = _audio_meta_get_composerPtr.asFunction< - int Function(audio_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the year of the given audio metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no year info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a year should be released using free(). - /// - /// @param[in] audio The handle to the audio metadata - /// @param[out] year The year of the audio metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int audio_meta_get_year( - audio_meta_h audio, - ffi.Pointer> year, - ) { - return _audio_meta_get_year( - audio, - year, - ); - } - - late final _audio_meta_get_yearPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_meta_h, - ffi.Pointer>)>>('audio_meta_get_year'); - late final _audio_meta_get_year = _audio_meta_get_yearPtr.asFunction< - int Function(audio_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the recorded date of the given audio metadata. - /// @details The recorded date is got from audio file's metadata. Some formats like mp4 use UTC and the rest can be different. \n - /// So, please refer to the format specification if needed. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a recorded_date should be released using free(). - /// - /// @param[in] audio The handle to the audio metadata - /// @param[out] recorded_date The recorded date of the audio metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int audio_meta_get_recorded_date( - audio_meta_h audio, - ffi.Pointer> recorded_date, - ) { - return _audio_meta_get_recorded_date( - audio, - recorded_date, - ); - } - - late final _audio_meta_get_recorded_datePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - audio_meta_h, ffi.Pointer>)>>( - 'audio_meta_get_recorded_date'); - late final _audio_meta_get_recorded_date = - _audio_meta_get_recorded_datePtr.asFunction< - int Function(audio_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the copyright notice of the given audio metadata. - /// @details If the media content has no copyright info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a copyright should be released using free(). - /// - /// @param[in] audio The handle to the audio metadata - /// @param[out] copyright The copyright of the audio metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int audio_meta_get_copyright( - audio_meta_h audio, - ffi.Pointer> copyright, - ) { - return _audio_meta_get_copyright( - audio, - copyright, - ); - } - - late final _audio_meta_get_copyrightPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_meta_h, - ffi.Pointer>)>>('audio_meta_get_copyright'); - late final _audio_meta_get_copyright = - _audio_meta_get_copyrightPtr.asFunction< - int Function(audio_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the track number of the given audio metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no track info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a track_num should be released using free(). - /// - /// @param[in] audio The handle to the audio metadata - /// @param[out] track_num The audio track number of the audio metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int audio_meta_get_track_num( - audio_meta_h audio, - ffi.Pointer> track_num, - ) { - return _audio_meta_get_track_num( - audio, - track_num, - ); - } - - late final _audio_meta_get_track_numPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_meta_h, - ffi.Pointer>)>>('audio_meta_get_track_num'); - late final _audio_meta_get_track_num = - _audio_meta_get_track_numPtr.asFunction< - int Function(audio_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the bitrate of the given audio metadata in bitrate per second. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] audio The handle to the audio metadata - /// @param[out] bit_rate The audio bitrate in bit per second [bps] - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int audio_meta_get_bit_rate( - audio_meta_h audio, - ffi.Pointer bit_rate, - ) { - return _audio_meta_get_bit_rate( - audio, - bit_rate, - ); - } - - late final _audio_meta_get_bit_ratePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - audio_meta_h, ffi.Pointer)>>('audio_meta_get_bit_rate'); - late final _audio_meta_get_bit_rate = _audio_meta_get_bit_ratePtr - .asFunction)>(); - - /// @brief Gets bit per sample of the given audio metadata. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] audio The handle to the audio metadata - /// @param[out] bitpersample The audio bit per sample - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int audio_meta_get_bitpersample( - audio_meta_h audio, - ffi.Pointer bitpersample, - ) { - return _audio_meta_get_bitpersample( - audio, - bitpersample, - ); - } - - late final _audio_meta_get_bitpersamplePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_meta_h, - ffi.Pointer)>>('audio_meta_get_bitpersample'); - late final _audio_meta_get_bitpersample = _audio_meta_get_bitpersamplePtr - .asFunction)>(); - - /// @brief Gets the sample rate of the given audio metadata. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] audio The handle to the audio metadata - /// @param[out] sample_rate The audio sample rate[hz] - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int audio_meta_get_sample_rate( - audio_meta_h audio, - ffi.Pointer sample_rate, - ) { - return _audio_meta_get_sample_rate( - audio, - sample_rate, - ); - } - - late final _audio_meta_get_sample_ratePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_meta_h, - ffi.Pointer)>>('audio_meta_get_sample_rate'); - late final _audio_meta_get_sample_rate = _audio_meta_get_sample_ratePtr - .asFunction)>(); - - /// @brief Gets the channel of the given audio metadata. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] audio The handle to the audio metadata - /// @param[out] channel The channel of the audio - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int audio_meta_get_channel( - audio_meta_h audio, - ffi.Pointer channel, - ) { - return _audio_meta_get_channel( - audio, - channel, - ); - } - - late final _audio_meta_get_channelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - audio_meta_h, ffi.Pointer)>>('audio_meta_get_channel'); - late final _audio_meta_get_channel = _audio_meta_get_channelPtr - .asFunction)>(); - - /// @brief Gets the track duration of the given audio metadata. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] audio The handle to the audio metadata - /// @param[out] duration The audio file duration - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int audio_meta_get_duration( - audio_meta_h audio, - ffi.Pointer duration, - ) { - return _audio_meta_get_duration( - audio, - duration, - ); - } - - late final _audio_meta_get_durationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - audio_meta_h, ffi.Pointer)>>('audio_meta_get_duration'); - late final _audio_meta_get_duration = _audio_meta_get_durationPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. Related setter functions are deprecated, therefore this function is not needed anymore. - /// @brief Updates an audio metadata with modified attributes in the media database. - /// @details The function updates the given audio meta in the media database. The function should be called after any change in audio attributes, to be updated to the media - /// database. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @remarks Do not call this function in callback function of foreach function like media_info_foreach_media_from_db(). - /// - /// @param[in] audio The handle to the audio metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int audio_meta_update_to_db( - audio_meta_h audio, - ) { - return _audio_meta_update_to_db( - audio, - ); - } - - late final _audio_meta_update_to_dbPtr = - _lookup>( - 'audio_meta_update_to_db'); - late final _audio_meta_update_to_db = - _audio_meta_update_to_dbPtr.asFunction(); - - /// @brief Creates a media filter handle. - /// @details This function creates a media filter handle. The handle can be - /// used to get the filtered information based on filter properties i.e. offset, count, condition for searching and order. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a filter should be released using media_info_filter_destroy(). - /// - /// @param[out] filter The handle to the media filter - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see media_filter_destroy() - int media_filter_create( - ffi.Pointer filter, - ) { - return _media_filter_create( - filter, - ); - } - - late final _media_filter_createPtr = - _lookup)>>( - 'media_filter_create'); - late final _media_filter_create = - _media_filter_createPtr.asFunction)>(); - - /// @brief Destroys a media filter handle. - /// @details The function frees all resources related to the media filter handle. The filter - /// handle no longer can be used to perform any operations. A new filter handle - /// has to be created before the next usage. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The handle to the media filter - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_filter_create() - int media_filter_destroy( - filter_h filter, - ) { - return _media_filter_destroy( - filter, - ); - } - - late final _media_filter_destroyPtr = - _lookup>( - 'media_filter_destroy'); - late final _media_filter_destroy = - _media_filter_destroyPtr.asFunction(); - - /// @brief Sets the media filter offset and count. - /// @details This function sets the @a offset and @a count for the given filter used to limit number of items returned. - /// For example, if you set the @a offset as @c 10 and @a count as @c 5, then only searched data from @c 10 to @c 14 will be returned when the filter is used with foreach functions. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The handle to the media filter - /// @param[in] offset The start position of the given media filter (Starting from zero) - /// @param[in] count The number of items to be searched with respect to the offset - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_filter_create() - /// @see media_filter_destroy() - int media_filter_set_offset( - filter_h filter, - int offset, - int count, - ) { - return _media_filter_set_offset( - filter, - offset, - count, - ); - } - - late final _media_filter_set_offsetPtr = - _lookup>( - 'media_filter_set_offset'); - late final _media_filter_set_offset = _media_filter_set_offsetPtr - .asFunction(); - - /// @brief Sets the @a condition for the given @a filter. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The handle to the media filter - /// @param[in] condition The condition which is used WHERE clause on a query - /// @param[in] collate_type The collate type for comparing two strings - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_filter_create() - /// @see media_filter_destroy() - int media_filter_set_condition( - filter_h filter, - ffi.Pointer condition, - int collate_type, - ) { - return _media_filter_set_condition( - filter, - condition, - collate_type, - ); - } - - late final _media_filter_set_conditionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filter_h, ffi.Pointer, - ffi.Int32)>>('media_filter_set_condition'); - late final _media_filter_set_condition = _media_filter_set_conditionPtr - .asFunction, int)>(); - - /// @brief Sets the media filter content @a order_type and @a order_keyword i.e. either descending or ascending. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The handle to the media filter - /// @param[in] order_type The search order type - /// @param[in] order_keyword The search order keyword - /// @param[in] collate_type The collate type for comparing two strings - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_filter_create() - /// @see media_filter_destroy() - int media_filter_set_order( - filter_h filter, - int order_type, - ffi.Pointer order_keyword, - int collate_type, - ) { - return _media_filter_set_order( - filter, - order_type, - order_keyword, - collate_type, - ); - } - - late final _media_filter_set_orderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filter_h, ffi.Int32, ffi.Pointer, - ffi.Int32)>>('media_filter_set_order'); - late final _media_filter_set_order = _media_filter_set_orderPtr - .asFunction, int)>(); - - /// @deprecated Deprecated since 5.0. Use media_filter_set_condition() with MEDIA_PATH keyword instead. \n - /// See @ref CAPI_SYSTEM_STORAGE_MODULE for information about file system paths. - /// - /// @brief Sets the @a storage_id for the given @a filter. - /// @details You can use this function when you want to search items only in the specific storage - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] filter The handle to the media filter - /// @param[in] storage_id The ID of the media storage - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_filter_create() - /// @see media_filter_destroy() - int media_filter_set_storage( - filter_h filter, - ffi.Pointer storage_id, - ) { - return _media_filter_set_storage( - filter, - storage_id, - ); - } - - late final _media_filter_set_storagePtr = _lookup< - ffi - .NativeFunction)>>( - 'media_filter_set_storage'); - late final _media_filter_set_storage = _media_filter_set_storagePtr - .asFunction)>(); - - /// @brief Gets the @a offset and @a count for the given @a filter used to limit the number of items returned. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The handle to the media filter - /// @param[out] offset The start position of the given media filter (Starting from zero) - /// @param[out] count The number of items to be searched with respect to the offset - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_filter_create() - /// @see media_filter_destroy() - int media_filter_get_offset( - filter_h filter, - ffi.Pointer offset, - ffi.Pointer count, - ) { - return _media_filter_get_offset( - filter, - offset, - count, - ); - } - - late final _media_filter_get_offsetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filter_h, ffi.Pointer, - ffi.Pointer)>>('media_filter_get_offset'); - late final _media_filter_get_offset = _media_filter_get_offsetPtr.asFunction< - int Function(filter_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the @a condition for the given @a filter. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a condition should be released using free(). - /// - /// @param[in] filter The handle to the media filter - /// @param[out] condition The condition which is used WHERE clause on a query - /// @param[out] collate_type The collate type for comparing two strings - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_filter_create() - /// @see media_filter_destroy() - int media_filter_get_condition( - filter_h filter, - ffi.Pointer> condition, - ffi.Pointer collate_type, - ) { - return _media_filter_get_condition( - filter, - condition, - collate_type, - ); - } - - late final _media_filter_get_conditionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filter_h, ffi.Pointer>, - ffi.Pointer)>>('media_filter_get_condition'); - late final _media_filter_get_condition = - _media_filter_get_conditionPtr.asFunction< - int Function(filter_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Gets the media filter's content @a order_type and @a order_keyword i.e. either descending or ascending. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a order_keyword should be released using free(). - /// - /// @param[in] filter The handle to the media filter - /// @param[out] order_type The search order type - /// @param[out] order_keyword The search order keyword - /// @param[out] collate_type The collate type for comparing two strings - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_filter_create() - /// @see media_filter_destroy() - int media_filter_get_order( - filter_h filter, - ffi.Pointer order_type, - ffi.Pointer> order_keyword, - ffi.Pointer collate_type, - ) { - return _media_filter_get_order( - filter, - order_type, - order_keyword, - collate_type, - ); - } - - late final _media_filter_get_orderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - filter_h, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('media_filter_get_order'); - late final _media_filter_get_order = _media_filter_get_orderPtr.asFunction< - int Function(filter_h, ffi.Pointer, - ffi.Pointer>, ffi.Pointer)>(); - - /// @deprecated Deprecated since 5.0. - /// @brief Gets the @a storage_id for given @a filter. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks The @a storage_id should be released using free(). - /// - /// @param[in] filter The handle to the media filter - /// @param[out] storage_id The ID of the media storage - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_filter_create() - /// @see media_filter_destroy() - int media_filter_get_storage( - filter_h filter, - ffi.Pointer> storage_id, - ) { - return _media_filter_get_storage( - filter, - storage_id, - ); - } - - late final _media_filter_get_storagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filter_h, - ffi.Pointer>)>>('media_filter_get_storage'); - late final _media_filter_get_storage = _media_filter_get_storagePtr - .asFunction>)>(); - - /// @brief Gets the count of folder for the passed @a filter from the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The handle to the media filter - /// @param[out] folder_count The count of the media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_folder_get_folder_count_from_db( - filter_h filter, - ffi.Pointer folder_count, - ) { - return _media_folder_get_folder_count_from_db( - filter, - folder_count, - ); - } - - late final _media_folder_get_folder_count_from_dbPtr = _lookup< - ffi.NativeFunction)>>( - 'media_folder_get_folder_count_from_db'); - late final _media_folder_get_folder_count_from_db = - _media_folder_get_folder_count_from_dbPtr - .asFunction)>(); - - /// @brief Iterates through available media folders with optional @a filter from the media database. - /// @details This function gets the media folder meeting the given @a filter. - /// The @a callback function will be invoked for every retrieved - /// folder. If @c NULL is passed to the @a filter, no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks Do not call updating DB function like media_folder_update_to_db() in your callback function, your callback function is invoked as inline function.\n - /// So, your callback function is in read state in SQLite. When you are in read state, sometimes you do not update DB. \n - /// We do not recommend you call updating DB function in callback of foreach function. - /// - /// @param[in] filter The handle to the media filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @pre A filter handle has to be created by calling media_filter_create(). - /// @post This function invokes media_folder_cb(). - /// - /// @see media_content_connect() - /// @see media_folder_cb() - /// @see media_filter_create() - int media_folder_foreach_folder_from_db( - filter_h filter, - media_folder_cb callback, - ffi.Pointer user_data, - ) { - return _media_folder_foreach_folder_from_db( - filter, - callback, - user_data, - ); - } - - late final _media_folder_foreach_folder_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filter_h, media_folder_cb, - ffi.Pointer)>>('media_folder_foreach_folder_from_db'); - late final _media_folder_foreach_folder_from_db = - _media_folder_foreach_folder_from_dbPtr.asFunction< - int Function(filter_h, media_folder_cb, ffi.Pointer)>(); - - /// @brief Gets the count of media files for the passed @a filter in the given @a folder_id from the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] folder_id The ID of the media folder - /// @param[in] filter The handle to the media filter - /// @param[out] media_count The count of media folder items - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_folder_get_media_count_from_db( - ffi.Pointer folder_id, - filter_h filter, - ffi.Pointer media_count, - ) { - return _media_folder_get_media_count_from_db( - folder_id, - filter, - media_count, - ); - } - - late final _media_folder_get_media_count_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, filter_h, - ffi.Pointer)>>('media_folder_get_media_count_from_db'); - late final _media_folder_get_media_count_from_db = - _media_folder_get_media_count_from_dbPtr.asFunction< - int Function( - ffi.Pointer, filter_h, ffi.Pointer)>(); - - /// @brief Iterates through the media files with an optional @a filter in the given @a folder_id from the media database. - /// @details This function gets all media files associated with the given folder and - /// meeting desired filter option and calls @a callback for - /// every retrieved media item. If @c NULL is passed to the @a filter, no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks Do not call updating DB function like media_info_update_to_db(), media_info_refresh_metadata_to_db(), audio_meta_update_to_db(), image_meta_update_to_db() and video_meta_update_to_db() in your callback function, - /// your callback function is invoked as inline function. \n - /// So, your callback function is in read state in SQLite. When you are in read state, sometimes you do not update DB. \n - /// We do not recommend you call updating DB function in callback of foreach function. - /// - /// @param[in] folder_id The ID of the media folder - /// @param[in] filter The handle to the media filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_info_cb(). - /// - /// @see #media_info_cb - /// @see media_content_connect() - /// @see media_filter_create() - int media_folder_foreach_media_from_db( - ffi.Pointer folder_id, - filter_h filter, - media_info_cb callback, - ffi.Pointer user_data, - ) { - return _media_folder_foreach_media_from_db( - folder_id, - filter, - callback, - user_data, - ); - } - - late final _media_folder_foreach_media_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, filter_h, media_info_cb, - ffi.Pointer)>>('media_folder_foreach_media_from_db'); - late final _media_folder_foreach_media_from_db = - _media_folder_foreach_media_from_dbPtr.asFunction< - int Function(ffi.Pointer, filter_h, media_info_cb, - ffi.Pointer)>(); - - /// @brief Clones the media folder. - /// @details This function copies the media folder handle from a source to - /// destination. There is no media_folder_create() function. The media_folder_h is created internally and available through - /// media folder foreach function such as media_folder_foreach_folder_from_db(). To use this handle outside of these foreach functions, - /// use this function. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a dst should be released using media_folder_destroy(). - /// - /// @param[out] dst The destination handle to the media folder - /// @param[in] src The source handle to the media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_folder_destroy() - /// @see media_folder_foreach_folder_from_db() - int media_folder_clone( - ffi.Pointer dst, - media_folder_h src, - ) { - return _media_folder_clone( - dst, - src, - ); - } - - late final _media_folder_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - media_folder_h)>>('media_folder_clone'); - late final _media_folder_clone = _media_folder_clonePtr - .asFunction, media_folder_h)>(); - - /// @brief Destroys the media folder. - /// @details The function frees all resources related to the folder handle. This handle - /// no longer can be used to perform any operations. A new handle has to - /// be created before the next use. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] folder The handle to the media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre A copy of the media folder handle created by calling media_folder_clone(). - /// - /// @see media_folder_clone() - int media_folder_destroy( - media_folder_h folder, - ) { - return _media_folder_destroy( - folder, - ); - } - - late final _media_folder_destroyPtr = - _lookup>( - 'media_folder_destroy'); - late final _media_folder_destroy = - _media_folder_destroyPtr.asFunction(); - - /// @brief Gets the media folder ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a folder_id should be released using free(). - /// - /// @param[in] folder The handle to the media folder - /// @param[out] folder_id The ID of the media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_folder_get_folder_id( - media_folder_h folder, - ffi.Pointer> folder_id, - ) { - return _media_folder_get_folder_id( - folder, - folder_id, - ); - } - - late final _media_folder_get_folder_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_folder_h, ffi.Pointer>)>>( - 'media_folder_get_folder_id'); - late final _media_folder_get_folder_id = - _media_folder_get_folder_idPtr.asFunction< - int Function(media_folder_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Gets the parent folder ID. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks The @a parent_folder_id should be released using free(). - /// - /// @param[in] folder The handle to the media folder - /// @param[out] parent_folder_id The ID of the upper media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_folder_get_parent_folder_id( - media_folder_h folder, - ffi.Pointer> parent_folder_id, - ) { - return _media_folder_get_parent_folder_id( - folder, - parent_folder_id, - ); - } - - late final _media_folder_get_parent_folder_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_folder_h, ffi.Pointer>)>>( - 'media_folder_get_parent_folder_id'); - late final _media_folder_get_parent_folder_id = - _media_folder_get_parent_folder_idPtr.asFunction< - int Function(media_folder_h, ffi.Pointer>)>(); - - /// @brief Gets the absolute path to the media folder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a path should be released using free(). - /// - /// @param[in] folder The handle to the media folder - /// @param[out] path The path of the media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_folder_get_path( - media_folder_h folder, - ffi.Pointer> path, - ) { - return _media_folder_get_path( - folder, - path, - ); - } - - late final _media_folder_get_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_folder_h, - ffi.Pointer>)>>('media_folder_get_path'); - late final _media_folder_get_path = _media_folder_get_pathPtr.asFunction< - int Function(media_folder_h, ffi.Pointer>)>(); - - /// @brief Gets the media folder name. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a folder_name should be released using free(). - /// - /// @param[in] folder The handle to the media folder - /// @param[out] folder_name The name of the media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_folder_get_name( - media_folder_h folder, - ffi.Pointer> folder_name, - ) { - return _media_folder_get_name( - folder, - folder_name, - ); - } - - late final _media_folder_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_folder_h, - ffi.Pointer>)>>('media_folder_get_name'); - late final _media_folder_get_name = _media_folder_get_namePtr.asFunction< - int Function(media_folder_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Gets the modified date of the folder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] folder The handle to the media folder - /// @param[out] date The modified date of the media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_folder_get_modified_time( - media_folder_h folder, - ffi.Pointer date, - ) { - return _media_folder_get_modified_time( - folder, - date, - ); - } - - late final _media_folder_get_modified_timePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_folder_h, - ffi.Pointer)>>('media_folder_get_modified_time'); - late final _media_folder_get_modified_time = - _media_folder_get_modified_timePtr - .asFunction)>(); - - /// @deprecated Deprecated since 5.0. Use storage_get_type_dev() instead. - /// @brief Gets the folder storage type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] folder The handle to the media folder - /// @param[out] storage_type The storage type of the media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_folder_get_storage_type( - media_folder_h folder, - ffi.Pointer storage_type, - ) { - return _media_folder_get_storage_type( - folder, - storage_type, - ); - } - - late final _media_folder_get_storage_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_folder_h, - ffi.Pointer)>>('media_folder_get_storage_type'); - late final _media_folder_get_storage_type = _media_folder_get_storage_typePtr - .asFunction)>(); - - /// @deprecated Deprecated since 5.0. - /// @brief Gets the storage id of the folder. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks The @a storage_id should be released using free(). - /// - /// @param[in] folder The handle to the media folder - /// @param[out] storage_id The storage id of the media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_folder_get_storage_id( - media_folder_h folder, - ffi.Pointer> storage_id, - ) { - return _media_folder_get_storage_id( - folder, - storage_id, - ); - } - - late final _media_folder_get_storage_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_folder_h, ffi.Pointer>)>>( - 'media_folder_get_storage_id'); - late final _media_folder_get_storage_id = - _media_folder_get_storage_idPtr.asFunction< - int Function(media_folder_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. \n - /// This function does not guarantee order independence between applications. It is recommended that the viewing order is managed by the application. - /// - /// @brief Gets the folder viewing order. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] folder The handle to the media folder - /// @param[out] order The viewing order of the media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_folder_update_to_db() - int media_folder_get_order( - media_folder_h folder, - ffi.Pointer order, - ) { - return _media_folder_get_order( - folder, - order, - ); - } - - late final _media_folder_get_orderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_folder_h, ffi.Pointer)>>('media_folder_get_order'); - late final _media_folder_get_order = _media_folder_get_orderPtr - .asFunction)>(); - - /// @brief Gets the media folder from the media database. - /// - /// @details This function creates a new media folder handle from the media database by the given @a folder_id. - /// Media folder will be created, which is filled with folder information. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a folder should be released using media_folder_destroy(). - /// - /// @param[in] folder_id The ID of the media folder - /// @param[out] folder The handle to the media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_folder_destroy() - int media_folder_get_folder_from_db( - ffi.Pointer folder_id, - ffi.Pointer folder, - ) { - return _media_folder_get_folder_from_db( - folder_id, - folder, - ); - } - - late final _media_folder_get_folder_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('media_folder_get_folder_from_db'); - late final _media_folder_get_folder_from_db = - _media_folder_get_folder_from_dbPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. Use media_content_scan_folder() or media_info_move_to_db() instead. - /// @brief Sets the folder name. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] folder The handle to the media folder - /// @param[in] name The name of the media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_folder_set_name( - media_folder_h folder, - ffi.Pointer name, - ) { - return _media_folder_set_name( - folder, - name, - ); - } - - late final _media_folder_set_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_folder_h, ffi.Pointer)>>('media_folder_set_name'); - late final _media_folder_set_name = _media_folder_set_namePtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. \n - /// This function does not guarantee order independence between applications. It is recommended that the viewing order is managed by the application. - /// @brief Sets the folder viewing order. - /// @details If you set the order value for each folder, you can sort in ascending or descending order as the set order values using the filter. \n - /// Moreover, more detailed settings are possible when used with the filter. \n - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks If you don't set the order value, the order value will be set default value. Default is 0. \n - /// If you don't use the filter, the set order value does not effect the folder viewing order. - /// - /// @param[in] folder The handle to the media folder - /// @param[in] order The viewing order of the media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_folder_set_order( - media_folder_h folder, - int order, - ) { - return _media_folder_set_order( - folder, - order, - ); - } - - late final _media_folder_set_orderPtr = - _lookup>( - 'media_folder_set_order'); - late final _media_folder_set_order = _media_folder_set_orderPtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. Related setter functions are deprecated, therefore this function is not needed anymore. - /// @brief Updates the media folder to the media database. - /// - /// @details The function updates the given media folder in the media database. The function should be called after any change in folder attributes, to be updated to the media - /// database. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @param[in] folder The handle to the media folder - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_folder_destroy() - int media_folder_update_to_db( - media_folder_h folder, - ) { - return _media_folder_update_to_db( - folder, - ); - } - - late final _media_folder_update_to_dbPtr = - _lookup>( - 'media_folder_update_to_db'); - late final _media_folder_update_to_db = - _media_folder_update_to_dbPtr.asFunction(); - - /// @brief Clones the image metadata. - /// @details The function copies the image metadata handle from a source to destination. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a dst should be released using image_meta_destroy(). - /// - /// @param[out] dst The destination handle to the image metadata - /// @param[in] src The source handle to the image metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see image_meta_destroy() - int image_meta_clone( - ffi.Pointer dst, - image_meta_h src, - ) { - return _image_meta_clone( - dst, - src, - ); - } - - late final _image_meta_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, image_meta_h)>>('image_meta_clone'); - late final _image_meta_clone = _image_meta_clonePtr - .asFunction, image_meta_h)>(); - - /// @brief Destroys the image metadata. - /// @details The function frees all resources related to the image metadata handle. This handle - /// no longer can be used to perform any operations. A new handle has to - /// be created before next usage. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] image The handle to the image metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre Get a copy of image_meta handle by calling image_meta_clone(). - /// - /// @see image_meta_clone() - int image_meta_destroy( - image_meta_h image, - ) { - return _image_meta_destroy( - image, - ); - } - - late final _image_meta_destroyPtr = - _lookup>( - 'image_meta_destroy'); - late final _image_meta_destroy = - _image_meta_destroyPtr.asFunction(); - - /// @brief Gets the ID of an image. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a media_id should be released using free(). - /// - /// @param[in] image The handle to the image metadata - /// @param[out] media_id The media ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int image_meta_get_media_id( - image_meta_h image, - ffi.Pointer> media_id, - ) { - return _image_meta_get_media_id( - image, - media_id, - ); - } - - late final _image_meta_get_media_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(image_meta_h, - ffi.Pointer>)>>('image_meta_get_media_id'); - late final _image_meta_get_media_id = _image_meta_get_media_idPtr.asFunction< - int Function(image_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the image width in pixels. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] image The handle to the image metadata - /// @param[out] width The image width in pixels - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int image_meta_get_width( - image_meta_h image, - ffi.Pointer width, - ) { - return _image_meta_get_width( - image, - width, - ); - } - - late final _image_meta_get_widthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - image_meta_h, ffi.Pointer)>>('image_meta_get_width'); - late final _image_meta_get_width = _image_meta_get_widthPtr - .asFunction)>(); - - /// @brief Gets the image height in pixels. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] image The handle to the image metadata - /// @param[out] height The image height in pixels - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int image_meta_get_height( - image_meta_h image, - ffi.Pointer height, - ) { - return _image_meta_get_height( - image, - height, - ); - } - - late final _image_meta_get_heightPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - image_meta_h, ffi.Pointer)>>('image_meta_get_height'); - late final _image_meta_get_height = _image_meta_get_heightPtr - .asFunction)>(); - - /// @brief Gets the image orientation. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] image The handle to the image metadata - /// @param[out] orientation The image orientation - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int image_meta_get_orientation( - image_meta_h image, - ffi.Pointer orientation, - ) { - return _image_meta_get_orientation( - image, - orientation, - ); - } - - late final _image_meta_get_orientationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(image_meta_h, - ffi.Pointer)>>('image_meta_get_orientation'); - late final _image_meta_get_orientation = _image_meta_get_orientationPtr - .asFunction)>(); - - /// @brief Gets the image creation time. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a date_taken should be released using free(). - /// - /// @param[in] image The handle to the image metadata - /// @param[out] date_taken The time, when image was taken (in seconds, since the Epoch) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int image_meta_get_date_taken( - image_meta_h image, - ffi.Pointer> date_taken, - ) { - return _image_meta_get_date_taken( - image, - date_taken, - ); - } - - late final _image_meta_get_date_takenPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - image_meta_h, ffi.Pointer>)>>( - 'image_meta_get_date_taken'); - late final _image_meta_get_date_taken = - _image_meta_get_date_takenPtr.asFunction< - int Function(image_meta_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Gets the burst shot ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a burst_id should be released using free(). - /// - /// @param[in] image The handle to the image metadata - /// @param[out] burst_id The ID of the burst shot\ n - /// If @a burst_id is @c NULL, this is not burst shot - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int image_meta_get_burst_id( - image_meta_h image, - ffi.Pointer> burst_id, - ) { - return _image_meta_get_burst_id( - image, - burst_id, - ); - } - - late final _image_meta_get_burst_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(image_meta_h, - ffi.Pointer>)>>('image_meta_get_burst_id'); - late final _image_meta_get_burst_id = _image_meta_get_burst_idPtr.asFunction< - int Function(image_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the exposure time from EXIF. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks The @a exposure_time should be released using free(). - /// - /// @param[in] image The handle to the image metadata - /// @param[out] exposure_time The value of exposure_time, getting from EXIF - /// - /// @return 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int image_meta_get_exposure_time( - image_meta_h image, - ffi.Pointer> exposure_time, - ) { - return _image_meta_get_exposure_time( - image, - exposure_time, - ); - } - - late final _image_meta_get_exposure_timePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - image_meta_h, ffi.Pointer>)>>( - 'image_meta_get_exposure_time'); - late final _image_meta_get_exposure_time = - _image_meta_get_exposure_timePtr.asFunction< - int Function(image_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the fnumber from EXIF. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] image The handle to the image metadata - /// @param[out] fnumber The value of fnumber, getting from EXIF - /// - /// @return 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int image_meta_get_fnumber( - image_meta_h image, - ffi.Pointer fnumber, - ) { - return _image_meta_get_fnumber( - image, - fnumber, - ); - } - - late final _image_meta_get_fnumberPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(image_meta_h, - ffi.Pointer)>>('image_meta_get_fnumber'); - late final _image_meta_get_fnumber = _image_meta_get_fnumberPtr - .asFunction)>(); - - /// @brief Gets the iso from EXIF. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] image The handle to the image metadata - /// @param[out] iso The value of iso, getting from EXIF - /// - /// @return 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int image_meta_get_iso( - image_meta_h image, - ffi.Pointer iso, - ) { - return _image_meta_get_iso( - image, - iso, - ); - } - - late final _image_meta_get_isoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - image_meta_h, ffi.Pointer)>>('image_meta_get_iso'); - late final _image_meta_get_iso = _image_meta_get_isoPtr - .asFunction)>(); - - /// @brief Gets the model from EXIF. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks The @a model should be released using free(). - /// - /// @param[in] image The handle to the image metadata - /// @param[out] model The value of model, getting from EXIF - /// - /// @return 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int image_meta_get_model( - image_meta_h image, - ffi.Pointer> model, - ) { - return _image_meta_get_model( - image, - model, - ); - } - - late final _image_meta_get_modelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(image_meta_h, - ffi.Pointer>)>>('image_meta_get_model'); - late final _image_meta_get_model = _image_meta_get_modelPtr.asFunction< - int Function(image_meta_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Checks whether the media is a burst shot image. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] image The handle to the image metadata - /// @param[out] is_burst_shot @c true if the media is a burst shot image, - /// otherwise @c false if the media is not a burst shot image - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int image_meta_is_burst_shot( - image_meta_h image, - ffi.Pointer is_burst_shot, - ) { - return _image_meta_is_burst_shot( - image, - is_burst_shot, - ); - } - - late final _image_meta_is_burst_shotPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(image_meta_h, - ffi.Pointer)>>('image_meta_is_burst_shot'); - late final _image_meta_is_burst_shot = _image_meta_is_burst_shotPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. This data cannot be saved to the file. - /// @brief Sets an orientation of the image. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] image The handle to the image metadata - /// @param[in] orientation The image orientation - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int image_meta_set_orientation( - image_meta_h image, - int orientation, - ) { - return _image_meta_set_orientation( - image, - orientation, - ); - } - - late final _image_meta_set_orientationPtr = - _lookup>( - 'image_meta_set_orientation'); - late final _image_meta_set_orientation = _image_meta_set_orientationPtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. Related setter functions are deprecated, therefore this function is not needed anymore. - /// @brief Updates the image to the media database. - /// - /// @details The function updates the given image meta in the media database. \n - /// The function should be called after any change in image attributes, to be updated to the media database. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @remarks Do not call this function in callback function of foreach function like media_info_foreach_media_from_db(). - /// - /// @param[in] image The handle to the image metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int image_meta_update_to_db( - image_meta_h image, - ) { - return _image_meta_update_to_db( - image, - ); - } - - late final _image_meta_update_to_dbPtr = - _lookup>( - 'image_meta_update_to_db'); - late final _image_meta_update_to_db = - _image_meta_update_to_dbPtr.asFunction(); - - /// @brief Inserts the content file into the media database. - /// @details In general, you can use this function to insert content files into the media database. \n - /// You can use media_content_scan_file()/media_content_scan_folder() function instead of this function. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write \n - /// %http://tizen.org/privilege/mediastorage \n - /// %http://tizen.org/privilege/externalstorage - /// - /// @remarks The @a info should be released using media_info_destroy(). \n - /// You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n - /// If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage. \n - /// Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage. \n - /// If you can access both storage, you must add all privilege. \n - /// Since 4.0, This function does not allow a symbolic link. \n - /// @remarks Since 4.0, this function is related to the following feature:\n - /// %http://tizen.org/feature/content.scanning.others\n - /// If this feature is not supported on the device, MEDIA_CONTENT_TYPE_OTHERS type file is not scanned. - /// - /// @param[in] path The path of the content file to add - /// @param[out] info The handle of the inserted content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_content_scan_file() - /// @see media_content_scan_folder() - int media_info_insert_to_db( - ffi.Pointer path, - ffi.Pointer info, - ) { - return _media_info_insert_to_db( - path, - info, - ); - } - - late final _media_info_insert_to_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('media_info_insert_to_db'); - late final _media_info_insert_to_db = _media_info_insert_to_dbPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Inserts content files into the media database, asynchronously. - /// @details This function can insert multiple content files into the media database. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write \n - /// %http://tizen.org/privilege/mediastorage \n - /// %http://tizen.org/privilege/externalstorage - /// - /// @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n - /// If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage. \n - /// Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage. \n - /// If you can access both storage, you must add all privilege. \n - /// Since 4.0, This function does not allow a symbolic link. \n - /// @remarks Since 4.0, this function is related to the following feature:\n - /// %http://tizen.org/feature/content.scanning.others\n - /// If this feature is not supported on the device, MEDIA_CONTENT_TYPE_OTHERS type file is not scanned. - /// - /// @param[in] path_array The path array of the content files to add - /// @param[in] array_length The length of the array - /// @param[in] callback The callback function to be invoked when media items inserted completely - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_insert_completed_cb() - int media_info_insert_batch_to_db( - ffi.Pointer> path_array, - int array_length, - media_insert_completed_cb callback, - ffi.Pointer user_data, - ) { - return _media_info_insert_batch_to_db( - path_array, - array_length, - callback, - user_data, - ); - } - - late final _media_info_insert_batch_to_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>, - ffi.UnsignedInt, - media_insert_completed_cb, - ffi.Pointer)>>('media_info_insert_batch_to_db'); - late final _media_info_insert_batch_to_db = - _media_info_insert_batch_to_dbPtr.asFunction< - int Function(ffi.Pointer>, int, - media_insert_completed_cb, ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Inserts the burst shot images into the media database, asynchronously. - /// @details This function inserts burst images into the media database. - /// media_insert_burst_shot_completed_cb() will be called when insertion to media database is finished. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write \n - /// %http://tizen.org/privilege/mediastorage \n - /// %http://tizen.org/privilege/externalstorage - /// - /// @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n - /// If you want to access only internal storage with this function, you should add privilege http://tizen.org/privilege/mediastorage. \n - /// Or if you want to access only external storage with this function, you should add privilege http://tizen.org/privilege/externalstorage. \n - /// If you can access both storage, you must add all privilege. \n - /// Since 4.0, This function does not allow a symbolic link. \n - /// - /// @param[in] path_array The path array of the burst shot images to add - /// @param[in] array_length The length of the array - /// @param[in] callback The callback function to be invoked when the images are inserted completely - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_insert_burst_shot_completed_cb() - int media_info_insert_burst_shot_to_db( - ffi.Pointer> path_array, - int array_length, - media_insert_burst_shot_completed_cb callback, - ffi.Pointer user_data, - ) { - return _media_info_insert_burst_shot_to_db( - path_array, - array_length, - callback, - user_data, - ); - } - - late final _media_info_insert_burst_shot_to_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>, - ffi.UnsignedInt, - media_insert_burst_shot_completed_cb, - ffi.Pointer)>>('media_info_insert_burst_shot_to_db'); - late final _media_info_insert_burst_shot_to_db = - _media_info_insert_burst_shot_to_dbPtr.asFunction< - int Function(ffi.Pointer>, int, - media_insert_burst_shot_completed_cb, ffi.Pointer)>(); - - /// @deprecated Deprecated since 5.0. Use media_content_scan_file() instead. - /// @brief Deletes the media information from the media database. - /// @details This function only remove media information in the media database. \n - /// You can use media_content_scan_file()/media_content_scan_folder() function instead of this function if a file is removed from the file system. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @param[in] media_id The media ID. It can get from media info handle. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_content_scan_file() - /// @see media_content_scan_folder() - int media_info_delete_from_db( - ffi.Pointer media_id, - ) { - return _media_info_delete_from_db( - media_id, - ); - } - - late final _media_info_delete_from_dbPtr = - _lookup)>>( - 'media_info_delete_from_db'); - late final _media_info_delete_from_db = _media_info_delete_from_dbPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Deletes media information that meets the conditions of the filter from the media database. - /// @details This function can delete multiple media information from the media database. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @param[in] filter The handle to the media filter - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_filter_create() - int media_info_delete_batch_from_db( - filter_h filter, - ) { - return _media_info_delete_batch_from_db( - filter, - ); - } - - late final _media_info_delete_batch_from_dbPtr = - _lookup>( - 'media_info_delete_batch_from_db'); - late final _media_info_delete_batch_from_db = - _media_info_delete_batch_from_dbPtr.asFunction(); - - /// @brief Destroys media info. - /// @details The function frees all resources related to the media info handle. This handle - /// can no longer be used to perform any operations. New media info handle has to - /// be created before the next usage. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre Get copy of media_info handle by calling media_info_clone(). - /// - /// @see media_info_clone() - int media_info_destroy( - media_info_h media, - ) { - return _media_info_destroy( - media, - ); - } - - late final _media_info_destroyPtr = - _lookup>( - 'media_info_destroy'); - late final _media_info_destroy = - _media_info_destroyPtr.asFunction(); - - /// @brief Clones the media info handle. - /// - /// @details This function copies the media info handle from a source to the destination. - /// There is no media_info_create() function. The media_info_h is created internally and - /// available through media info foreach function such as media_info_foreach_media_from_db() or media_info_insert_to_db(). - /// To use this handle outside of these foreach functions, use this function. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a dst should be released using media_info_destroy(). - /// - /// @param[out] dst The destination handle to the media info - /// @param[in] src The source handle to the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_info_destroy() - /// @see media_album_foreach_media_from_db() - /// @see media_playlist_foreach_media_from_db() - /// @see media_group_foreach_media_from_db() - /// @see media_tag_foreach_media_from_db() - /// @see media_info_foreach_media_from_db() - /// @see media_info_insert_to_db() - /// @see media_folder_foreach_media_from_db() - int media_info_clone( - ffi.Pointer dst, - media_info_h src, - ) { - return _media_info_clone( - dst, - src, - ); - } - - late final _media_info_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, media_info_h)>>('media_info_clone'); - late final _media_info_clone = _media_info_clonePtr - .asFunction, media_info_h)>(); - - /// @brief Gets the count of media info for the passed @a filter from the media database. - /// @details If @c NULL is passed to the @a filter, then no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// - /// @param[in] filter The handle to the media filter - /// @param[out] media_count The count of media - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_filter_create() - int media_info_get_media_count_from_db( - filter_h filter, - ffi.Pointer media_count, - ) { - return _media_info_get_media_count_from_db( - filter, - media_count, - ); - } - - late final _media_info_get_media_count_from_dbPtr = _lookup< - ffi.NativeFunction)>>( - 'media_info_get_media_count_from_db'); - late final _media_info_get_media_count_from_db = - _media_info_get_media_count_from_dbPtr - .asFunction)>(); - - /// @brief Iterates through media info from the media database. - /// @details This function gets all media info handles meeting the given @a filter. - /// The @a callback function will be invoked for every retrieved media info. - /// If @c NULL is passed to the @a filter, then no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks Do not call updating DB function like media_info_update_to_db(), media_info_refresh_metadata_to_db(), audio_meta_update_to_db(), image_meta_update_to_db() and video_meta_update_to_db() in your callback function, - /// your callback function is invoked as inline function. - /// So, your callback function is in read state in SQLite. When you are in read state, sometimes you do not update DB. - /// We do not recommend you call updating DB function in callback of foreach function. - /// - /// @param[in] filter The handle to the media filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_info_cb(). - /// - /// @see media_content_connect() - /// @see #media_info_cb - /// @see media_filter_create() - int media_info_foreach_media_from_db( - filter_h filter, - media_info_cb callback, - ffi.Pointer user_data, - ) { - return _media_info_foreach_media_from_db( - filter, - callback, - user_data, - ); - } - - late final _media_info_foreach_media_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filter_h, media_info_cb, - ffi.Pointer)>>('media_info_foreach_media_from_db'); - late final _media_info_foreach_media_from_db = - _media_info_foreach_media_from_dbPtr.asFunction< - int Function(filter_h, media_info_cb, ffi.Pointer)>(); - - /// @brief Gets the count of media tags for the passed @a filter in the given @a media_id from the media database. - /// @details If @c NULL is passed to the @a filter, then no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media_id The media ID - /// @param[in] filter The handle to the media filter - /// @param[out] tag_count The count of the media tag - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_filter_create() - int media_info_get_tag_count_from_db( - ffi.Pointer media_id, - filter_h filter, - ffi.Pointer tag_count, - ) { - return _media_info_get_tag_count_from_db( - media_id, - filter, - tag_count, - ); - } - - late final _media_info_get_tag_count_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, filter_h, - ffi.Pointer)>>('media_info_get_tag_count_from_db'); - late final _media_info_get_tag_count_from_db = - _media_info_get_tag_count_from_dbPtr.asFunction< - int Function( - ffi.Pointer, filter_h, ffi.Pointer)>(); - - /// @brief Iterates through the media tag in the given media info from the media database. - /// @details This function gets all the media tags associated with the given @a media_id and calls @a callback for every retrieved media tag. \n - /// If @c NULL is passed to the @a filter, then no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media_id The media ID - /// @param[in] filter The handle to the media filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_tag_cb(). - /// - /// @see media_content_connect() - /// @see #media_tag_cb - /// @see media_filter_create() - int media_info_foreach_tag_from_db( - ffi.Pointer media_id, - filter_h filter, - media_tag_cb callback, - ffi.Pointer user_data, - ) { - return _media_info_foreach_tag_from_db( - media_id, - filter, - callback, - user_data, - ); - } - - late final _media_info_foreach_tag_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, filter_h, media_tag_cb, - ffi.Pointer)>>('media_info_foreach_tag_from_db'); - late final _media_info_foreach_tag_from_db = - _media_info_foreach_tag_from_dbPtr.asFunction< - int Function(ffi.Pointer, filter_h, media_tag_cb, - ffi.Pointer)>(); - - /// @brief Gets the number of bookmarks for the passed @a filter in the given media ID from the media database. - /// @details If @c NULL is passed to the @a filter, then no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media_id The media ID - /// @param[in] filter The handle to the media filter - /// @param[out] bookmark_count The count of the media tag - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_filter_create() - int media_info_get_bookmark_count_from_db( - ffi.Pointer media_id, - filter_h filter, - ffi.Pointer bookmark_count, - ) { - return _media_info_get_bookmark_count_from_db( - media_id, - filter, - bookmark_count, - ); - } - - late final _media_info_get_bookmark_count_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, filter_h, - ffi.Pointer)>>('media_info_get_bookmark_count_from_db'); - late final _media_info_get_bookmark_count_from_db = - _media_info_get_bookmark_count_from_dbPtr.asFunction< - int Function( - ffi.Pointer, filter_h, ffi.Pointer)>(); - - /// @brief Iterates through the media bookmark in the given media info from the media database. - /// @details This function gets all media bookmarks associated with the given media and calls @a callback for every retrieved media bookmark. - /// If @c NULL is passed to the @a filter, then no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media_id The media ID - /// @param[in] filter The handle to the media filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_bookmark_cb(). - /// - /// @see media_content_connect() - /// @see media_bookmark_cb() - /// @see media_filter_create() - int media_info_foreach_bookmark_from_db( - ffi.Pointer media_id, - filter_h filter, - media_bookmark_cb callback, - ffi.Pointer user_data, - ) { - return _media_info_foreach_bookmark_from_db( - media_id, - filter, - callback, - user_data, - ); - } - - late final _media_info_foreach_bookmark_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, filter_h, media_bookmark_cb, - ffi.Pointer)>>('media_info_foreach_bookmark_from_db'); - late final _media_info_foreach_bookmark_from_db = - _media_info_foreach_bookmark_from_dbPtr.asFunction< - int Function(ffi.Pointer, filter_h, media_bookmark_cb, - ffi.Pointer)>(); - - /// @brief Gets the number of face for the passed @a media_id from the media database. - /// @details If @c NULL is passed to the @a filter, then no filtering is applied. - /// - /// @since_tizen 3.0 - /// - /// @param[in] media_id The media ID - /// @param[in] filter The handle to the media filter - /// @param[out] face_count The count of media face - /// - /// @return 0 on success, otherwise a negative error value. - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @see media_content_connect() - /// @see media_filter_create() - int media_info_get_face_count_from_db( - ffi.Pointer media_id, - filter_h filter, - ffi.Pointer face_count, - ) { - return _media_info_get_face_count_from_db( - media_id, - filter, - face_count, - ); - } - - late final _media_info_get_face_count_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, filter_h, - ffi.Pointer)>>('media_info_get_face_count_from_db'); - late final _media_info_get_face_count_from_db = - _media_info_get_face_count_from_dbPtr.asFunction< - int Function( - ffi.Pointer, filter_h, ffi.Pointer)>(); - - /// @brief Iterates through the media files with optional @a filter in the given @a media_id from the media database. - /// @details This function gets all media face info associated with the given media id and - /// meeting desired filter option and calls @a callback for - /// every retrieved media face info. If NULL is passed to the @a filter, no filtering is applied. - /// - /// @since_tizen 3.0 - /// - /// @param[in] media_id The media ID - /// @param[in] filter The handle to the media filter - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value. - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @see media_content_connect() - /// @see media_filter_create() - int media_info_foreach_face_from_db( - ffi.Pointer media_id, - filter_h filter, - media_face_cb callback, - ffi.Pointer user_data, - ) { - return _media_info_foreach_face_from_db( - media_id, - filter, - callback, - user_data, - ); - } - - late final _media_info_foreach_face_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, filter_h, media_face_cb, - ffi.Pointer)>>('media_info_foreach_face_from_db'); - late final _media_info_foreach_face_from_db = - _media_info_foreach_face_from_dbPtr.asFunction< - int Function(ffi.Pointer, filter_h, media_face_cb, - ffi.Pointer)>(); - - /// @brief Gets the image metadata handle for a given media info. - /// @details This function returns an image metadata handle retrieved from the media info. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a image should be released using image_meta_destroy(). - /// - /// @param[in] media The handle to the media info - /// @param[out] image The handle to the image metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see image_meta_destroy() - int media_info_get_image( - media_info_h media, - ffi.Pointer image, - ) { - return _media_info_get_image( - media, - image, - ); - } - - late final _media_info_get_imagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_get_image'); - late final _media_info_get_image = _media_info_get_imagePtr - .asFunction)>(); - - /// @brief Gets a video metadata handle for a given media info. - /// @details This function returns a video metadata handle retrieved from the media info handle. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a video should be released using video_meta_destroy(). - /// - /// @param[in] media The handle to the media info - /// @param[out] video The handle to the video metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see video_meta_destroy() - int media_info_get_video( - media_info_h media, - ffi.Pointer video, - ) { - return _media_info_get_video( - media, - video, - ); - } - - late final _media_info_get_videoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_get_video'); - late final _media_info_get_video = _media_info_get_videoPtr - .asFunction)>(); - - /// @brief Gets an audio metadata handle for a given media info. - /// @details This function returns an audio metadata handle retrieved from the media info handle. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a audio should be released using audio_meta_destroy(). - /// - /// @param[in] media The handle to the media info - /// @param[out] audio The handle to the audio metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see audio_meta_destroy() - int media_info_get_audio( - media_info_h media, - ffi.Pointer audio, - ) { - return _media_info_get_audio( - media, - audio, - ); - } - - late final _media_info_get_audioPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_get_audio'); - late final _media_info_get_audio = _media_info_get_audioPtr - .asFunction)>(); - - /// @brief Gets the media ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The @a media_id should be released using free(). - /// - /// @param[in] media The handle to the media info - /// @param[out] media_id The media ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_media_id( - media_info_h media, - ffi.Pointer> media_id, - ) { - return _media_info_get_media_id( - media, - media_id, - ); - } - - late final _media_info_get_media_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer>)>>('media_info_get_media_id'); - late final _media_info_get_media_id = _media_info_get_media_idPtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @brief Gets the full path of the content file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a path should be released using free(). - /// - /// @param[in] media The handle to the media info - /// @param[out] path The full path of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_file_path( - media_info_h media, - ffi.Pointer> path, - ) { - return _media_info_get_file_path( - media, - path, - ); - } - - late final _media_info_get_file_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer>)>>('media_info_get_file_path'); - late final _media_info_get_file_path = - _media_info_get_file_pathPtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @brief Gets the file name including the extension of the content file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a name should be released using free(). - /// - /// @param[in] media The handle to the media info - /// @param[out] name The file name including the extension of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_display_name( - media_info_h media, - ffi.Pointer> name, - ) { - return _media_info_get_display_name( - media, - name, - ); - } - - late final _media_info_get_display_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer>)>>( - 'media_info_get_display_name'); - late final _media_info_get_display_name = - _media_info_get_display_namePtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @brief Gets the content type of the content file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[out] type The content type of the content file (#media_content_type_e) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see #media_content_type_e - int media_info_get_media_type( - media_info_h media, - ffi.Pointer type, - ) { - return _media_info_get_media_type( - media, - type, - ); - } - - late final _media_info_get_media_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_get_media_type'); - late final _media_info_get_media_type = _media_info_get_media_typePtr - .asFunction)>(); - - /// @brief Gets the MIME type of the content file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a mime_type should be released using free(). - /// - /// @param[in] media The handle to the media info - /// @param[out] mime_type The MIME type of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_mime_type( - media_info_h media, - ffi.Pointer> mime_type, - ) { - return _media_info_get_mime_type( - media, - mime_type, - ); - } - - late final _media_info_get_mime_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer>)>>('media_info_get_mime_type'); - late final _media_info_get_mime_type = - _media_info_get_mime_typePtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @brief Gets the content file size. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[out] size The content file size - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_size( - media_info_h media, - ffi.Pointer size, - ) { - return _media_info_get_size( - media, - size, - ); - } - - late final _media_info_get_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_get_size'); - late final _media_info_get_size = _media_info_get_sizePtr.asFunction< - int Function(media_info_h, ffi.Pointer)>(); - - /// @brief Gets the added time of the content file. - /// @details The added time refers to the time that content file was first added to media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[out] added_time The added time to the media database - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_added_time( - media_info_h media, - ffi.Pointer added_time, - ) { - return _media_info_get_added_time( - media, - added_time, - ); - } - - late final _media_info_get_added_timePtr = _lookup< - ffi - .NativeFunction)>>( - 'media_info_get_added_time'); - late final _media_info_get_added_time = _media_info_get_added_timePtr - .asFunction)>(); - - /// @brief Gets the modified time of the content file. - /// @details The modified time refers to the last modification time provided by the file system. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[out] time The last modification time of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_modified_time( - media_info_h media, - ffi.Pointer time, - ) { - return _media_info_get_modified_time( - media, - time, - ); - } - - late final _media_info_get_modified_timePtr = _lookup< - ffi - .NativeFunction)>>( - 'media_info_get_modified_time'); - late final _media_info_get_modified_time = _media_info_get_modified_timePtr - .asFunction)>(); - - /// @brief Gets the timeline of content file. - /// @details If the content file has the creation time information (like Content recorded date or Image creation date), that value is timeline. \n - /// Otherwise, timeline value is the same as modified time. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[out] time The timeline of content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_timeline( - media_info_h media, - ffi.Pointer time, - ) { - return _media_info_get_timeline( - media, - time, - ); - } - - late final _media_info_get_timelinePtr = _lookup< - ffi - .NativeFunction)>>( - 'media_info_get_timeline'); - late final _media_info_get_timeline = _media_info_get_timelinePtr - .asFunction)>(); - - /// @brief Gets the thumbnail path of content file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a path should be released using free(). \n - /// If the thumbnail extraction for the given media has not been requested yet, this function returns NULL. \n - /// To create a thumbnail, you should use media_info_generate_thumbnail() function. \n - /// This function returns an empty string if media_info_generate_thumbnail() has failed to create a thumbnail for the given media. - /// - /// @param[in] media The handle to the media info - /// @param[out] path The thumbnail path - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_thumbnail_path( - media_info_h media, - ffi.Pointer> path, - ) { - return _media_info_get_thumbnail_path( - media, - path, - ); - } - - late final _media_info_get_thumbnail_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer>)>>( - 'media_info_get_thumbnail_path'); - late final _media_info_get_thumbnail_path = - _media_info_get_thumbnail_pathPtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @brief Gets the description of content file. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media info has no description, the method returns empty string. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a description should be released using free(). - /// - /// @param[in] media The handle to the media info - /// @param[out] description The description of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_description( - media_info_h media, - ffi.Pointer> description, - ) { - return _media_info_get_description( - media, - description, - ); - } - - late final _media_info_get_descriptionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer>)>>( - 'media_info_get_description'); - late final _media_info_get_description = - _media_info_get_descriptionPtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @brief Gets the longitude of content file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[out] longitude The longitude of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_longitude( - media_info_h media, - ffi.Pointer longitude, - ) { - return _media_info_get_longitude( - media, - longitude, - ); - } - - late final _media_info_get_longitudePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_get_longitude'); - late final _media_info_get_longitude = _media_info_get_longitudePtr - .asFunction)>(); - - /// @brief Gets the latitude of content file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[out] latitude The latitude of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_latitude( - media_info_h media, - ffi.Pointer latitude, - ) { - return _media_info_get_latitude( - media, - latitude, - ); - } - - late final _media_info_get_latitudePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_get_latitude'); - late final _media_info_get_latitude = _media_info_get_latitudePtr - .asFunction)>(); - - /// @brief Gets the altitude of content file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[out] altitude The altitude of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_altitude( - media_info_h media, - ffi.Pointer altitude, - ) { - return _media_info_get_altitude( - media, - altitude, - ); - } - - late final _media_info_get_altitudePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_get_altitude'); - late final _media_info_get_altitude = _media_info_get_altitudePtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Gets the weather of content file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The @a weather should be released using free(). - /// - /// @param[in] media The handle to the media info - /// @param[out] weather The weather of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_weather( - media_info_h media, - ffi.Pointer> weather, - ) { - return _media_info_get_weather( - media, - weather, - ); - } - - late final _media_info_get_weatherPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer>)>>('media_info_get_weather'); - late final _media_info_get_weather = _media_info_get_weatherPtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @brief Gets the rating of content file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[out] rating The rating of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_rating( - media_info_h media, - ffi.Pointer rating, - ) { - return _media_info_get_rating( - media, - rating, - ); - } - - late final _media_info_get_ratingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer)>>('media_info_get_rating'); - late final _media_info_get_rating = _media_info_get_ratingPtr - .asFunction)>(); - - /// @brief Gets the favorite status of content file which User set. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[out] favorite @c true if content file is set as favorite, - /// otherwise @c false if content file is not set as favorite - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_info_set_favorite() - int media_info_get_favorite( - media_info_h media, - ffi.Pointer favorite, - ) { - return _media_info_get_favorite( - media, - favorite, - ); - } - - late final _media_info_get_favoritePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer)>>('media_info_get_favorite'); - late final _media_info_get_favorite = _media_info_get_favoritePtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Gets the author of content file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a author should be released using free(). - /// - /// @param[in] media The handle to the media info - /// @param[out] author The author of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_author( - media_info_h media, - ffi.Pointer> author, - ) { - return _media_info_get_author( - media, - author, - ); - } - - late final _media_info_get_authorPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer>)>>('media_info_get_author'); - late final _media_info_get_author = _media_info_get_authorPtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Gets the provider of content file which User set. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a provider should be released using free(). - /// - /// @param[in] media The handle to the media info - /// @param[out] provider The provider of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_provider( - media_info_h media, - ffi.Pointer> provider, - ) { - return _media_info_get_provider( - media, - provider, - ); - } - - late final _media_info_get_providerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer>)>>('media_info_get_provider'); - late final _media_info_get_provider = _media_info_get_providerPtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. Redundant, use media_info_get_display_name() instead. - /// @brief Gets the content name of content file which User set. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a content_name should be released using free(). - /// - /// @param[in] media The handle to the media info - /// @param[out] content_name The content name of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_content_name( - media_info_h media, - ffi.Pointer> content_name, - ) { - return _media_info_get_content_name( - media, - content_name, - ); - } - - late final _media_info_get_content_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer>)>>( - 'media_info_get_content_name'); - late final _media_info_get_content_name = - _media_info_get_content_namePtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @brief Gets the title of content file. - /// @details If the content file does not have a title, this method returns the filename without the extension. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a title should be released using free(). - /// - /// @param[in] media The handle to the media info - /// @param[out] title The title of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_title( - media_info_h media, - ffi.Pointer> title, - ) { - return _media_info_get_title( - media, - title, - ); - } - - late final _media_info_get_titlePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer>)>>('media_info_get_title'); - late final _media_info_get_title = _media_info_get_titlePtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Gets the category of content file which User set. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a category should be released using free(). - /// - /// @param[in] media The handle to the media info - /// @param[out] category The category of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_category( - media_info_h media, - ffi.Pointer> category, - ) { - return _media_info_get_category( - media, - category, - ); - } - - late final _media_info_get_categoryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer>)>>('media_info_get_category'); - late final _media_info_get_category = _media_info_get_categoryPtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Gets the location tag of content file which User set. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a location_tag should be released using free(). - /// - /// @param[in] media The handle to the media info - /// @param[out] location_tag The location of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_location_tag( - media_info_h media, - ffi.Pointer> location_tag, - ) { - return _media_info_get_location_tag( - media, - location_tag, - ); - } - - late final _media_info_get_location_tagPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer>)>>( - 'media_info_get_location_tag'); - late final _media_info_get_location_tag = - _media_info_get_location_tagPtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Gets the age_rating of content file which User set. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a age_rating should be released using free(). - /// - /// @param[in] media The handle to the media info - /// @param[out] age_rating The age rating of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_age_rating( - media_info_h media, - ffi.Pointer> age_rating, - ) { - return _media_info_get_age_rating( - media, - age_rating, - ); - } - - late final _media_info_get_age_ratingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer>)>>( - 'media_info_get_age_rating'); - late final _media_info_get_age_rating = - _media_info_get_age_ratingPtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. Use media_tag_insert_to_db() instead. - /// @brief Gets the keyword of content file which User set. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a keyword should be released using free(). - /// - /// @param[in] media The handle to the media info - /// @param[out] keyword The keyword of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_keyword( - media_info_h media, - ffi.Pointer> keyword, - ) { - return _media_info_get_keyword( - media, - keyword, - ); - } - - late final _media_info_get_keywordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer>)>>('media_info_get_keyword'); - late final _media_info_get_keyword = _media_info_get_keywordPtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 5.0. - /// @brief Gets the storage id of content file. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks The @a storage_id should be released using free(). - /// - /// @param[in] media The handle to the media info - /// @param[out] storage_id The ID of the media storage - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_storage_id( - media_info_h media, - ffi.Pointer> storage_id, - ) { - return _media_info_get_storage_id( - media, - storage_id, - ); - } - - late final _media_info_get_storage_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer>)>>( - 'media_info_get_storage_id'); - late final _media_info_get_storage_id = - _media_info_get_storage_idPtr.asFunction< - int Function(media_info_h, ffi.Pointer>)>(); - - /// @brief Checks whether the media is protected via DRM. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[out] is_drm @c true if media is DRM media, - /// otherwise @c false if media is not DRM media - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_is_drm( - media_info_h media, - ffi.Pointer is_drm, - ) { - return _media_info_is_drm( - media, - is_drm, - ); - } - - late final _media_info_is_drmPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer)>>('media_info_is_drm'); - late final _media_info_is_drm = _media_info_is_drmPtr - .asFunction)>(); - - /// @brief Checks whether the content file is 360 content. - /// @since_tizen 3.0 - /// - /// @param[in] media The handle to the media info - /// @param[out] is_360 @c true if media is 360 content, - /// otherwise @c false if media is not 360 content - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_is_360_content( - media_info_h media, - ffi.Pointer is_360, - ) { - return _media_info_is_360_content( - media, - is_360, - ); - } - - late final _media_info_is_360_contentPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_is_360_content'); - late final _media_info_is_360_content = _media_info_is_360_contentPtr - .asFunction)>(); - - /// @deprecated Deprecated since 5.0. Use storage_get_type_dev() instead. - /// @brief Gets the storage type of content file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[out] storage_type The storage type of the content file - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_storage_type( - media_info_h media, - ffi.Pointer storage_type, - ) { - return _media_info_get_storage_type( - media, - storage_type, - ); - } - - late final _media_info_get_storage_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_get_storage_type'); - late final _media_info_get_storage_type = _media_info_get_storage_typePtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. \n - /// This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application. - /// @brief Gets number which represents how many times given content has been played. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] media The handle to the media info - /// @param[out] played_count The counter of content played - /// - /// @return 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_played_count( - media_info_h media, - ffi.Pointer played_count, - ) { - return _media_info_get_played_count( - media, - played_count, - ); - } - - late final _media_info_get_played_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_get_played_count'); - late final _media_info_get_played_count = _media_info_get_played_countPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. \n - /// This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application. - /// @brief Gets the content's played time parameter. - /// @details Function returns content's elapsed playback time parameter as period - /// starting from the beginning of the track. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] media The handle to the media info - /// @param[out] played_time The elapsed time of the content - /// - /// @return 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_get_played_time( - media_info_h media, - ffi.Pointer played_time, - ) { - return _media_info_get_played_time( - media, - played_time, - ); - } - - late final _media_info_get_played_timePtr = _lookup< - ffi - .NativeFunction)>>( - 'media_info_get_played_time'); - late final _media_info_get_played_time = _media_info_get_played_timePtr - .asFunction)>(); - - /// @brief Gets the media info from the media database. - /// - /// @details This function creates a new media handle from the media database by the given @a media_id. - /// Media info will be created and filled with information. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a media should be released using media_info_destroy(). - /// - /// @param[in] media_id The media ID - /// @param[out] media The handle to the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_info_destroy() - int media_info_get_media_from_db( - ffi.Pointer media_id, - ffi.Pointer media, - ) { - return _media_info_get_media_from_db( - media_id, - media, - ); - } - - late final _media_info_get_media_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('media_info_get_media_from_db'); - late final _media_info_get_media_from_db = - _media_info_get_media_from_dbPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. \n - /// This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application. - /// @brief Increments the played count to content meta handle. - /// @details You can increase the played(opened) count of the content file. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] media The handle to the media info - /// - /// @return 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db() - int media_info_increase_played_count( - media_info_h media, - ) { - return _media_info_increase_played_count( - media, - ); - } - - late final _media_info_increase_played_countPtr = - _lookup>( - 'media_info_increase_played_count'); - late final _media_info_increase_played_count = - _media_info_increase_played_countPtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. \n - /// This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application. - /// @brief Sets the played time to content meta handle. - /// @details You can set the latest played(opened) time of the content file. the latest played time to be set the current time on the system. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] media The handle to the media info - /// - /// @return 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db() - int media_info_set_played_time( - media_info_h media, - ) { - return _media_info_set_played_time( - media, - ); - } - - late final _media_info_set_played_timePtr = - _lookup>( - 'media_info_set_played_time'); - late final _media_info_set_played_time = - _media_info_set_played_timePtr.asFunction(); - - /// @deprecated Deprecated since 4.0. Redundant, use media_info_move_to_db() instead. - /// @brief Sets the file name including the extension of the content file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[in] display_name The file name including the extension of the content file. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db(). - int media_info_set_display_name( - media_info_h media, - ffi.Pointer display_name, - ) { - return _media_info_set_display_name( - media, - display_name, - ); - } - - late final _media_info_set_display_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_set_display_name'); - late final _media_info_set_display_name = _media_info_set_display_namePtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. This data cannot be saved to the file. - /// @brief Sets the description of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[in] description The description of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db(). - int media_info_set_description( - media_info_h media, - ffi.Pointer description, - ) { - return _media_info_set_description( - media, - description, - ); - } - - late final _media_info_set_descriptionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_set_description'); - late final _media_info_set_description = _media_info_set_descriptionPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. This data cannot be saved to the file. - /// @brief Sets the longitude of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[in] longitude The longitude of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db(). - int media_info_set_longitude( - media_info_h media, - double longitude, - ) { - return _media_info_set_longitude( - media, - longitude, - ); - } - - late final _media_info_set_longitudePtr = - _lookup>( - 'media_info_set_longitude'); - late final _media_info_set_longitude = _media_info_set_longitudePtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. This data cannot be saved to the file. - /// @brief Sets the latitude of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[in] latitude The latitude of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db(). - int media_info_set_latitude( - media_info_h media, - double latitude, - ) { - return _media_info_set_latitude( - media, - latitude, - ); - } - - late final _media_info_set_latitudePtr = - _lookup>( - 'media_info_set_latitude'); - late final _media_info_set_latitude = _media_info_set_latitudePtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. This data cannot be saved to the file. - /// @brief Sets the altitude of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[in] altitude The altitude of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db(). - int media_info_set_altitude( - media_info_h media, - double altitude, - ) { - return _media_info_set_altitude( - media, - altitude, - ); - } - - late final _media_info_set_altitudePtr = - _lookup>( - 'media_info_set_altitude'); - late final _media_info_set_altitude = _media_info_set_altitudePtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. This data cannot be saved to the file. - /// @brief Sets the weather of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[in] weather The weather of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db(). - int media_info_set_weather( - media_info_h media, - ffi.Pointer weather, - ) { - return _media_info_set_weather( - media, - weather, - ); - } - - late final _media_info_set_weatherPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer)>>('media_info_set_weather'); - late final _media_info_set_weather = _media_info_set_weatherPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. This data cannot be saved to the file. - /// @brief Sets the rating of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[in] rating The rating of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db(). - int media_info_set_rating( - media_info_h media, - int rating, - ) { - return _media_info_set_rating( - media, - rating, - ); - } - - late final _media_info_set_ratingPtr = - _lookup>( - 'media_info_set_rating'); - late final _media_info_set_rating = - _media_info_set_ratingPtr.asFunction(); - - /// @brief Sets the favorite of media info. - /// @details This function can mark favorite of the media. If set to @c true, this function record the time of the change moment. \n - /// So, If you use it in order parameter, you can sort the order of the time was a favorite. \n - /// Or, if you use it in condition parameter, you can get the result of the favorite media. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[in] favorite Set @c true to set the media info as favorite, - /// otherwise set @c false to not set the media info as favorite - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_set_favorite( - media_info_h media, - bool favorite, - ) { - return _media_info_set_favorite( - media, - favorite, - ); - } - - late final _media_info_set_favoritePtr = - _lookup>( - 'media_info_set_favorite'); - late final _media_info_set_favorite = _media_info_set_favoritePtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. This data cannot be saved to the file. - /// @brief Sets the author of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[in] author The author of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_set_author( - media_info_h media, - ffi.Pointer author, - ) { - return _media_info_set_author( - media, - author, - ); - } - - late final _media_info_set_authorPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer)>>('media_info_set_author'); - late final _media_info_set_author = _media_info_set_authorPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. This data cannot be saved to the file. - /// @brief Sets the provider of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[in] provider The provider of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_set_provider( - media_info_h media, - ffi.Pointer provider, - ) { - return _media_info_set_provider( - media, - provider, - ); - } - - late final _media_info_set_providerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer)>>('media_info_set_provider'); - late final _media_info_set_provider = _media_info_set_providerPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. Redundant, use media_info_move_to_db() instead. - /// @brief Sets the content name of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[in] content_name The content name of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db() - int media_info_set_content_name( - media_info_h media, - ffi.Pointer content_name, - ) { - return _media_info_set_content_name( - media, - content_name, - ); - } - - late final _media_info_set_content_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_set_content_name'); - late final _media_info_set_content_name = _media_info_set_content_namePtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. This data cannot be saved to the file. - /// @brief Sets the category of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[in] category The category of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db() - int media_info_set_category( - media_info_h media, - ffi.Pointer category, - ) { - return _media_info_set_category( - media, - category, - ); - } - - late final _media_info_set_categoryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer)>>('media_info_set_category'); - late final _media_info_set_category = _media_info_set_categoryPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. This data cannot be saved to the file. - /// @brief Sets the location tag of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[in] location_tag The location of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db() - int media_info_set_location_tag( - media_info_h media, - ffi.Pointer location_tag, - ) { - return _media_info_set_location_tag( - media, - location_tag, - ); - } - - late final _media_info_set_location_tagPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_set_location_tag'); - late final _media_info_set_location_tag = _media_info_set_location_tagPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. This data cannot be saved to the file. - /// @brief Sets the age rating of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[in] age_rating The age rating of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db() - int media_info_set_age_rating( - media_info_h media, - ffi.Pointer age_rating, - ) { - return _media_info_set_age_rating( - media, - age_rating, - ); - } - - late final _media_info_set_age_ratingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_set_age_rating'); - late final _media_info_set_age_rating = _media_info_set_age_ratingPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. Use media_tag_insert_to_db() instead. - /// @brief Sets the keyword of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[in] keyword The keyword of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db() - int media_info_set_keyword( - media_info_h media, - ffi.Pointer keyword, - ) { - return _media_info_set_keyword( - media, - keyword, - ); - } - - late final _media_info_set_keywordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer)>>('media_info_set_keyword'); - late final _media_info_set_keyword = _media_info_set_keywordPtr - .asFunction)>(); - - /// @brief Updates the media info to the media database. - /// - /// @details The function updates the given media info in the media database. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @remarks The function should be called after any change in media, to be updated to the media - /// database. For example, after using media_info_set_favorite() - /// for setting the name of the media, the media_info_update_to_db() function should be called so as to update - /// the given media info attributes in the media database. - /// - /// @param[in] media The handle to the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_info_set_favorite() - int media_info_update_to_db( - media_info_h media, - ) { - return _media_info_update_to_db( - media, - ); - } - - late final _media_info_update_to_dbPtr = - _lookup>( - 'media_info_update_to_db'); - late final _media_info_update_to_db = - _media_info_update_to_dbPtr.asFunction(); - - /// @deprecated Deprecated since 4.0. Use media_content_scan_file() instead. - /// @brief Refreshes the media metadata to the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write \n - /// %http://tizen.org/privilege/mediastorage \n - /// %http://tizen.org/privilege/externalstorage - /// - /// @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n - /// If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage. \n - /// Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage. \n - /// If you can access both storage, you should add all privilege. - /// - /// @param[in] media_id The media ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_info_refresh_metadata_to_db( - ffi.Pointer media_id, - ) { - return _media_info_refresh_metadata_to_db( - media_id, - ); - } - - late final _media_info_refresh_metadata_to_dbPtr = - _lookup)>>( - 'media_info_refresh_metadata_to_db'); - late final _media_info_refresh_metadata_to_db = - _media_info_refresh_metadata_to_dbPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. This data cannot be saved to the file. - /// @brief Sets the added time of media info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] media The handle to the media info - /// @param[in] added_time The added time of the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_info_update_to_db() - int media_info_set_added_time( - media_info_h media, - int added_time, - ) { - return _media_info_set_added_time( - media, - added_time, - ); - } - - late final _media_info_set_added_timePtr = - _lookup>( - 'media_info_set_added_time'); - late final _media_info_set_added_time = _media_info_set_added_timePtr - .asFunction(); - - /// @brief Moves the media info to the given destination path in the media database. - /// @details After moving or renaming a file in the filesystem, call this function to update the database. \n - /// If the source path and destination path are the same, then this function does nothing. - /// If you want to refresh media information, you should use media_content_scan_file() function. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write \n - /// %http://tizen.org/privilege/mediastorage \n - /// %http://tizen.org/privilege/externalstorage - /// - /// @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n - /// If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage. \n - /// Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage. \n - /// If you can access both storage, you should add all privilege. \n - /// Since 4.0, this function does not allow symbolic links. \n - /// This function does not support USB storage before 5.0. Since 5.0, USB storage is supported. \n - /// Since 5.0, the thumbnail is removed if it exists. - /// - /// @param[in] media The handle to the media info - /// @param[in] dst_path The path of destination - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter (Especially, if the request is duplicated, this error returns.) - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_content_scan_folder() - /// @see media_info_generate_thumbnail() - int media_info_move_to_db( - media_info_h media, - ffi.Pointer dst_path, - ) { - return _media_info_move_to_db( - media, - dst_path, - ); - } - - late final _media_info_move_to_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer)>>('media_info_move_to_db'); - late final _media_info_move_to_db = _media_info_move_to_dbPtr - .asFunction)>(); - - /// @deprecated Deprecated since 5.0. Use media_info_generate_thumbnail() instead. - /// @brief Creates a thumbnail file for the given media, asynchronously. - /// @details This function creates an thumbnail file for given media item and calls @a callback for completion of creating the thumbnail. - /// If a thumbnail already exists for the given media, then the path of thumbnail will be returned in callback function. \n - /// Since 3.0, a thumbnail is not automatically extracted during media scanning. \n - /// Therefore, if there exists no thumbnail for the given media, you MUST call this function to create a thumbnail. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write \n - /// %http://tizen.org/privilege/mediastorage \n - /// %http://tizen.org/privilege/externalstorage - /// - /// @remarks If you want to destroy media handle before callback invoked, you must cancel thumbnail request by using media_info_cancel_thumbnail() \n - /// Since 3.0, if creation of a thumbnail is failed, empty string will be passed through media_thumbnail_completed_cb(). - /// Items in external storage except MMC not supported. - /// - /// @param[in] media The handle to the media info - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_info_create_thumbnail( - media_info_h media, - media_thumbnail_completed_cb callback, - ffi.Pointer user_data, - ) { - return _media_info_create_thumbnail( - media, - callback, - user_data, - ); - } - - late final _media_info_create_thumbnailPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, media_thumbnail_completed_cb, - ffi.Pointer)>>('media_info_create_thumbnail'); - late final _media_info_create_thumbnail = - _media_info_create_thumbnailPtr.asFunction< - int Function(media_info_h, media_thumbnail_completed_cb, - ffi.Pointer)>(); - - /// @deprecated Deprecated since 5.0. - /// @brief Cancels the creation of thumbnail file for the given media. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @remarks If you request cancel for the already thumbnail created media, this function return MEDIA_CONTENT_ERROR_INVALID_OPERATION - /// - /// @param[in] media The handle to the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @see media_content_connect() - int media_info_cancel_thumbnail( - media_info_h media, - ) { - return _media_info_cancel_thumbnail( - media, - ); - } - - late final _media_info_cancel_thumbnailPtr = - _lookup>( - 'media_info_cancel_thumbnail'); - late final _media_info_cancel_thumbnail = - _media_info_cancel_thumbnailPtr.asFunction(); - - /// @brief Generates a thumbnail file for the given media, synchronously. - /// - /// @since_tizen 5.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage. \n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n - /// Items in external storage are not supported, with the exception of MMC. - /// - /// @param[in] media The handle to the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_info_get_thumbnail_path() - int media_info_generate_thumbnail( - media_info_h media, - ) { - return _media_info_generate_thumbnail( - media, - ); - } - - late final _media_info_generate_thumbnailPtr = - _lookup>( - 'media_info_generate_thumbnail'); - late final _media_info_generate_thumbnail = _media_info_generate_thumbnailPtr - .asFunction(); - - /// @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE - /// @brief Starts face detection for the given image, asynchronously. - /// @details This function detects faces for given image item and calls the given callback function when the detection is completed. \n - /// The given callback function is called when the detection is completed. \n - /// To obtain the detected faces, call the media_info_foreach_face_from_db() function. - /// - /// @since_tizen 3.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write \n - /// %http://tizen.org/privilege/mediastorage \n - /// %http://tizen.org/privilege/externalstorage - /// - /// @remarks If you want to destroy the media handle before callback invoked, you must cancel the face detection request by using media_info_cancel_face_detection(). \n - /// If face detection fails, the face_count argument in media_face_detection_completed_cb() will be set to 0. - /// Media items in external storage are not supported, with the exception of MMC items. - /// - /// @param[in] media The handle to the media info - /// @param[in] callback The callback function to be invoked when detection is completed - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_info_cancel_face_detection() - int media_info_start_face_detection( - media_info_h media, - media_face_detection_completed_cb callback, - ffi.Pointer user_data, - ) { - return _media_info_start_face_detection( - media, - callback, - user_data, - ); - } - - late final _media_info_start_face_detectionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, media_face_detection_completed_cb, - ffi.Pointer)>>('media_info_start_face_detection'); - late final _media_info_start_face_detection = - _media_info_start_face_detectionPtr.asFunction< - int Function(media_info_h, media_face_detection_completed_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE - /// @brief Cancels face detection of image for the given media. - /// @details This function cancels face detection for given media item. \n - /// If you cancel face detection request before callback is invoked, the callback registered by media_info_start_face_detection() function will not be invoked. - /// - /// @since_tizen 3.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @remarks If face detection is already done when you request the cancellation, this function return MEDIA_CONTENT_ERROR_INVALID_OPERATION - /// - /// @param[in] media The handle to the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_info_start_face_detection() - int media_info_cancel_face_detection( - media_info_h media, - ) { - return _media_info_cancel_face_detection( - media, - ); - } - - late final _media_info_cancel_face_detectionPtr = - _lookup>( - 'media_info_cancel_face_detection'); - late final _media_info_cancel_face_detection = - _media_info_cancel_face_detectionPtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. Use media_info_insert_to_db() instead. - /// @brief Creates the media info handle. - /// @details If the information about the file that is already known, you can use this function to generate empty handler. - /// @since_tizen 3.0 - /// - /// - /// @privilege %http://tizen.org/privilege/mediastorage \n - /// %http://tizen.org/privilege/externalstorage - /// - /// @remarks The @a media should be released using media_info_destroy(). - /// @remarks If you want to access only internal storage with this function, you should add privilege http://tizen.org/privilege/mediastorage. \n - /// Or if you want to access only external storage with this function, you should add privilege http://tizen.org/privilege/externalstorage. \n - /// If you can access both storage, you must add all privilege. - /// - /// @param[in] path The path to create the media info handle - /// @param[out] media The handle to the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see media_info_destroy() - int media_info_create( - ffi.Pointer path, - ffi.Pointer media, - ) { - return _media_info_create( - path, - media, - ); - } - - late final _media_info_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('media_info_create'); - late final _media_info_create = _media_info_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. Use media_info_insert_to_db() instead. - /// @brief Inserts media info to database with media info data. - /// @since_tizen 3.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @remarks The @a media should be released using media_info_destroy(). - /// - /// @param[in] media The handle to the media info - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - int media_info_insert_to_db_with_data( - media_info_h media, - ) { - return _media_info_insert_to_db_with_data( - media, - ); - } - - late final _media_info_insert_to_db_with_dataPtr = - _lookup>( - 'media_info_insert_to_db_with_data'); - late final _media_info_insert_to_db_with_data = - _media_info_insert_to_db_with_dataPtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. - /// @brief Sets the title of media info handle. - /// @since_tizen 3.0 - /// - /// @param[in] media The handle to the media info - /// @param[in] title The title of media info handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_set_title( - media_info_h media, - ffi.Pointer title, - ) { - return _media_info_set_title( - media, - title, - ); - } - - late final _media_info_set_titlePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer)>>('media_info_set_title'); - late final _media_info_set_title = _media_info_set_titlePtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Sets the album of media info handle. - /// @since_tizen 3.0 - /// - /// @param[in] media The handle to the media info - /// @param[in] album The album of the media - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_set_album( - media_info_h media, - ffi.Pointer album, - ) { - return _media_info_set_album( - media, - album, - ); - } - - late final _media_info_set_albumPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer)>>('media_info_set_album'); - late final _media_info_set_album = _media_info_set_albumPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Sets the artist of media info handle. - /// @since_tizen 3.0 - /// - /// @param[in] media The handle to the media info - /// @param[in] artist The artist of media info handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_set_artist( - media_info_h media, - ffi.Pointer artist, - ) { - return _media_info_set_artist( - media, - artist, - ); - } - - late final _media_info_set_artistPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer)>>('media_info_set_artist'); - late final _media_info_set_artist = _media_info_set_artistPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Sets the genre of media info handle. - /// @since_tizen 3.0 - /// - /// @param[in] media The handle to the media info - /// @param[in] genre The genre of media info handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_set_genre( - media_info_h media, - ffi.Pointer genre, - ) { - return _media_info_set_genre( - media, - genre, - ); - } - - late final _media_info_set_genrePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_info_h, ffi.Pointer)>>('media_info_set_genre'); - late final _media_info_set_genre = _media_info_set_genrePtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Sets the recorded date of media info handle. - /// @since_tizen 3.0 - /// - /// @param[in] media The handle to the media info - /// @param[in] recorded_date The recorded date of media info handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_info_set_recorded_date( - media_info_h media, - ffi.Pointer recorded_date, - ) { - return _media_info_set_recorded_date( - media, - recorded_date, - ); - } - - late final _media_info_set_recorded_datePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_info_h, - ffi.Pointer)>>('media_info_set_recorded_date'); - late final _media_info_set_recorded_date = _media_info_set_recorded_datePtr - .asFunction)>(); - - /// @brief Inserts a new tag in the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @remarks The @a tag should be released using media_tag_destroy(). - /// - /// @param[in] tag_name The tag name to be inserted - /// @param[out] tag The handle to the media tag - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_tag_delete_from_db() - /// @see media_tag_destroy() - int media_tag_insert_to_db( - ffi.Pointer tag_name, - ffi.Pointer tag, - ) { - return _media_tag_insert_to_db( - tag_name, - tag, - ); - } - - late final _media_tag_insert_to_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('media_tag_insert_to_db'); - late final _media_tag_insert_to_db = _media_tag_insert_to_dbPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Deletes a given tag from the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @param[in] tag_id The ID of the media tag - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_tag_insert_to_db() - int media_tag_delete_from_db( - int tag_id, - ) { - return _media_tag_delete_from_db( - tag_id, - ); - } - - late final _media_tag_delete_from_dbPtr = - _lookup>( - 'media_tag_delete_from_db'); - late final _media_tag_delete_from_db = - _media_tag_delete_from_dbPtr.asFunction(); - - /// @brief Gets the count of the tag for the passed @a filter from the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The handle to the media filter - /// @param[out] tag_count The count of the media tag - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_tag_get_tag_count_from_db( - filter_h filter, - ffi.Pointer tag_count, - ) { - return _media_tag_get_tag_count_from_db( - filter, - tag_count, - ); - } - - late final _media_tag_get_tag_count_from_dbPtr = _lookup< - ffi.NativeFunction)>>( - 'media_tag_get_tag_count_from_db'); - late final _media_tag_get_tag_count_from_db = - _media_tag_get_tag_count_from_dbPtr - .asFunction)>(); - - /// @brief Iterates through tags from the media database. - /// @details This function gets all tags meeting a desired @a filter - /// and calls a registered callback function for every retrieved tag. - /// If @c NULL is passed to the @a filter, no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The handle to the media filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_tag_cb(). - /// - /// @see media_content_connect() - /// @see #media_tag_cb - /// @see media_filter_create() - int media_tag_foreach_tag_from_db( - filter_h filter, - media_tag_cb callback, - ffi.Pointer user_data, - ) { - return _media_tag_foreach_tag_from_db( - filter, - callback, - user_data, - ); - } - - late final _media_tag_foreach_tag_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filter_h, media_tag_cb, - ffi.Pointer)>>('media_tag_foreach_tag_from_db'); - late final _media_tag_foreach_tag_from_db = - _media_tag_foreach_tag_from_dbPtr.asFunction< - int Function(filter_h, media_tag_cb, ffi.Pointer)>(); - - /// @brief Gets the number of media files for the passed @a filter in the given @a tag_id from the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] tag_id The ID of the media tag - /// @param[in] filter The handle to the media filter - /// @param[out] media_count The count of media items - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_tag_get_media_count_from_db( - int tag_id, - filter_h filter, - ffi.Pointer media_count, - ) { - return _media_tag_get_media_count_from_db( - tag_id, - filter, - media_count, - ); - } - - late final _media_tag_get_media_count_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, filter_h, - ffi.Pointer)>>('media_tag_get_media_count_from_db'); - late final _media_tag_get_media_count_from_db = - _media_tag_get_media_count_from_dbPtr - .asFunction)>(); - - /// @brief Iterates through media items for a given tag from the media database. - /// @details This function gets all media items associated with a given tag and - /// meeting a desired @a filter and calls a registered callback function for - /// every retrieved media item. If @c NULL is passed to the @a filter, no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] tag_id The ID of the media tag - /// @param[in] filter The handle to the media filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_info_cb(). - /// - /// @see media_content_connect() - /// @see media_info_cb() - /// @see media_filter_create() - int media_tag_foreach_media_from_db( - int tag_id, - filter_h filter, - media_info_cb callback, - ffi.Pointer user_data, - ) { - return _media_tag_foreach_media_from_db( - tag_id, - filter, - callback, - user_data, - ); - } - - late final _media_tag_foreach_media_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, filter_h, media_info_cb, - ffi.Pointer)>>('media_tag_foreach_media_from_db'); - late final _media_tag_foreach_media_from_db = - _media_tag_foreach_media_from_dbPtr.asFunction< - int Function(int, filter_h, media_info_cb, ffi.Pointer)>(); - - /// @brief Clones the media tag. - /// @details This function copies the media tag handle from a source to destination. - /// There is no media_tag_create() function. The media_tag_h is created internally and available through media tag foreach function - /// such as media_tag_foreach_tag_from_db(). - /// To use this handle outside of these foreach functions, use this function. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a dst should be released using media_tag_destroy(). - /// - /// @param[out] dst The destination handle to the media tag - /// @param[in] src The source handle to the media tag - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_tag_destroy() - int media_tag_clone( - ffi.Pointer dst, - media_tag_h src, - ) { - return _media_tag_clone( - dst, - src, - ); - } - - late final _media_tag_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, media_tag_h)>>('media_tag_clone'); - late final _media_tag_clone = _media_tag_clonePtr - .asFunction, media_tag_h)>(); - - /// @brief Destroys the media tag. - /// @details This function frees all resources related to the tag handle. The tag handle can no longer - /// be used for any operations. A new tag handle has to be created before next usage. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] tag The handle to the media tag - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre A copy of the media tag handle created by calling media_tag_clone() or media_tag_insert_to_db(). - /// - /// @see media_tag_clone() - /// @see media_tag_insert_to_db() - int media_tag_destroy( - media_tag_h tag, - ) { - return _media_tag_destroy( - tag, - ); - } - - late final _media_tag_destroyPtr = - _lookup>( - 'media_tag_destroy'); - late final _media_tag_destroy = - _media_tag_destroyPtr.asFunction(); - - /// @brief Gets the media tag ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] tag The handle to the media tag - /// @param[out] tag_id The ID of the media tag - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_tag_get_tag_id( - media_tag_h tag, - ffi.Pointer tag_id, - ) { - return _media_tag_get_tag_id( - tag, - tag_id, - ); - } - - late final _media_tag_get_tag_idPtr = _lookup< - ffi - .NativeFunction)>>( - 'media_tag_get_tag_id'); - late final _media_tag_get_tag_id = _media_tag_get_tag_idPtr - .asFunction)>(); - - /// @brief Gets the tag name. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a tag_name should be released using free(). - /// - /// @param[in] tag The handle to the media tag - /// @param[out] tag_name The name of the media tag - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_tag_get_name( - media_tag_h tag, - ffi.Pointer> tag_name, - ) { - return _media_tag_get_name( - tag, - tag_name, - ); - } - - late final _media_tag_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_tag_h, - ffi.Pointer>)>>('media_tag_get_name'); - late final _media_tag_get_name = _media_tag_get_namePtr.asFunction< - int Function(media_tag_h, ffi.Pointer>)>(); - - /// @brief Gets the media tag from the media database. - /// - /// @details This function creates a new media tag handle from the media database by the given @a tag_id. - /// Media tag will be created and will be filled with tag information. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a tag should be released using media_tag_destroy(). - /// - /// @param[in] tag_id The ID of the media tag - /// @param[out] tag The handle to the media tag - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_tag_destroy() - int media_tag_get_tag_from_db( - int tag_id, - ffi.Pointer tag, - ) { - return _media_tag_get_tag_from_db( - tag_id, - tag, - ); - } - - late final _media_tag_get_tag_from_dbPtr = _lookup< - ffi - .NativeFunction)>>( - 'media_tag_get_tag_from_db'); - late final _media_tag_get_tag_from_db = _media_tag_get_tag_from_dbPtr - .asFunction)>(); - - /// @brief Adds a new media info to the tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] tag The handle to the media tag - /// @param[in] media_id The media ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post media_tag_update_to_db() - /// - /// @see media_content_connect() - /// @see media_tag_remove_media() - int media_tag_add_media( - media_tag_h tag, - ffi.Pointer media_id, - ) { - return _media_tag_add_media( - tag, - media_id, - ); - } - - late final _media_tag_add_mediaPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_tag_h, ffi.Pointer)>>('media_tag_add_media'); - late final _media_tag_add_media = _media_tag_add_mediaPtr - .asFunction)>(); - - /// @brief Removes the media info from the given tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] tag The handle to the media tag - /// @param[in] media_id The media ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post media_tag_update_to_db() - /// - /// @see media_content_connect() - /// @see media_tag_add_media() - int media_tag_remove_media( - media_tag_h tag, - ffi.Pointer media_id, - ) { - return _media_tag_remove_media( - tag, - media_id, - ); - } - - late final _media_tag_remove_mediaPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_tag_h, ffi.Pointer)>>('media_tag_remove_media'); - late final _media_tag_remove_media = _media_tag_remove_mediaPtr - .asFunction)>(); - - /// @brief Sets the name of the tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] tag The handle to the media tag - /// @param[in] tag_name The name of the media tag - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @post media_tag_update_to_db() - int media_tag_set_name( - media_tag_h tag, - ffi.Pointer tag_name, - ) { - return _media_tag_set_name( - tag, - tag_name, - ); - } - - late final _media_tag_set_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_tag_h, ffi.Pointer)>>('media_tag_set_name'); - late final _media_tag_set_name = _media_tag_set_namePtr - .asFunction)>(); - - /// @brief Updates the media tag to the media database. - /// - /// @details The function updates the given media tag in the media database. The function should be called after any change in tag attributes, to be updated to the media - /// database. For example, after using media_tag_set_name() for setting the name of the tag, the media_tag_update_to_db() function should be called so as to update - /// the given tag attributes in the media database. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @param[in] tag The handle to the media tag - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_tag_destroy() - /// @see media_tag_add_media() - /// @see media_tag_remove_media() - /// @see media_tag_set_name() - int media_tag_update_to_db( - media_tag_h tag, - ) { - return _media_tag_update_to_db( - tag, - ); - } - - late final _media_tag_update_to_dbPtr = - _lookup>( - 'media_tag_update_to_db'); - late final _media_tag_update_to_db = - _media_tag_update_to_dbPtr.asFunction(); - - /// @brief Clones the video metadata. - /// @details This function copies the video metadata handle from a source to destination. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a dst should be released using video_meta_destroy(). - /// - /// @param[out] dst The destination handle to the video metadata - /// @param[in] src The source handle to the video metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see video_meta_destroy() - int video_meta_clone( - ffi.Pointer dst, - video_meta_h src, - ) { - return _video_meta_clone( - dst, - src, - ); - } - - late final _video_meta_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, video_meta_h)>>('video_meta_clone'); - late final _video_meta_clone = _video_meta_clonePtr - .asFunction, video_meta_h)>(); - - /// @brief Destroys the video metadata. - /// @details This function frees all resources related to the video metadata handle. This handle - /// no longer can be used to perform any operations. A new handle has to - /// be created before the next use. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] video The handle to the video metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre Get copy of video metadata handle by calling video_meta_clone(). - /// - /// @see video_meta_clone() - int video_meta_destroy( - video_meta_h video, - ) { - return _video_meta_destroy( - video, - ); - } - - late final _video_meta_destroyPtr = - _lookup>( - 'video_meta_destroy'); - late final _video_meta_destroy = - _video_meta_destroyPtr.asFunction(); - - /// @brief Gets the ID of the media of the given video metadata. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a media_id should be released using free(). - /// - /// @param[in] video The handle to the video metadata - /// @param[out] media_id The media ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int video_meta_get_media_id( - video_meta_h video, - ffi.Pointer> media_id, - ) { - return _video_meta_get_media_id( - video, - media_id, - ); - } - - late final _video_meta_get_media_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(video_meta_h, - ffi.Pointer>)>>('video_meta_get_media_id'); - late final _video_meta_get_media_id = _video_meta_get_media_idPtr.asFunction< - int Function(video_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the album of the given video metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no album info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a album should be released using free(). - /// - /// @param[in] video The handle to the video metadata - /// @param[out] album The album of the video metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int video_meta_get_album( - video_meta_h video, - ffi.Pointer> album, - ) { - return _video_meta_get_album( - video, - album, - ); - } - - late final _video_meta_get_albumPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(video_meta_h, - ffi.Pointer>)>>('video_meta_get_album'); - late final _video_meta_get_album = _video_meta_get_albumPtr.asFunction< - int Function(video_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the artist of the given video metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no artist info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a artist should be released using free(). - /// - /// @param[in] video The handle to the video metadata - /// @param[out] artist The artist of the video metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int video_meta_get_artist( - video_meta_h video, - ffi.Pointer> artist, - ) { - return _video_meta_get_artist( - video, - artist, - ); - } - - late final _video_meta_get_artistPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(video_meta_h, - ffi.Pointer>)>>('video_meta_get_artist'); - late final _video_meta_get_artist = _video_meta_get_artistPtr.asFunction< - int Function(video_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the video album artist. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no album artist info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a album_artist should be released using free(). - /// - /// @param[in] video The handle to the video metadata - /// @param[out] album_artist The album artist of the video metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int video_meta_get_album_artist( - video_meta_h video, - ffi.Pointer> album_artist, - ) { - return _video_meta_get_album_artist( - video, - album_artist, - ); - } - - late final _video_meta_get_album_artistPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - video_meta_h, ffi.Pointer>)>>( - 'video_meta_get_album_artist'); - late final _video_meta_get_album_artist = - _video_meta_get_album_artistPtr.asFunction< - int Function(video_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the genre of the given video metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no genre info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a genre should be released using free(). - /// - /// @param[in] video The handle to the video metadata - /// @param[out] genre The genre of the video metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int video_meta_get_genre( - video_meta_h video, - ffi.Pointer> genre, - ) { - return _video_meta_get_genre( - video, - genre, - ); - } - - late final _video_meta_get_genrePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(video_meta_h, - ffi.Pointer>)>>('video_meta_get_genre'); - late final _video_meta_get_genre = _video_meta_get_genrePtr.asFunction< - int Function(video_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the composer of the given video metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no composer info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a composer should be released using free(). - /// - /// @param[in] video The handle to the video metadata - /// @param[out] composer The composer of the video metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int video_meta_get_composer( - video_meta_h video, - ffi.Pointer> composer, - ) { - return _video_meta_get_composer( - video, - composer, - ); - } - - late final _video_meta_get_composerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(video_meta_h, - ffi.Pointer>)>>('video_meta_get_composer'); - late final _video_meta_get_composer = _video_meta_get_composerPtr.asFunction< - int Function(video_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the year of the given video metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no year info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a year should be released using free(). - /// - /// @param[in] video The handle to the video metadata - /// @param[out] year The year of the video metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int video_meta_get_year( - video_meta_h video, - ffi.Pointer> year, - ) { - return _video_meta_get_year( - video, - year, - ); - } - - late final _video_meta_get_yearPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(video_meta_h, - ffi.Pointer>)>>('video_meta_get_year'); - late final _video_meta_get_year = _video_meta_get_yearPtr.asFunction< - int Function(video_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the recorded date of the video. - /// @details The recorded date is got from video file's metadata. Some formats like mp4 use UTC and the rest can be different. \n - /// So, please refer to the format specification if needed. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a recorded_date should be released using free(). - /// - /// @param[in] video The handle to the video metadata - /// @param[out] recorded_date The recorded date of the video metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int video_meta_get_recorded_date( - video_meta_h video, - ffi.Pointer> recorded_date, - ) { - return _video_meta_get_recorded_date( - video, - recorded_date, - ); - } - - late final _video_meta_get_recorded_datePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - video_meta_h, ffi.Pointer>)>>( - 'video_meta_get_recorded_date'); - late final _video_meta_get_recorded_date = - _video_meta_get_recorded_datePtr.asFunction< - int Function(video_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the copyright notice of the given video metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no copyright info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a copyright should be released using free(). - /// - /// @param[in] video The handle to the video metadata - /// @param[out] copyright The copyright of the video metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int video_meta_get_copyright( - video_meta_h video, - ffi.Pointer> copyright, - ) { - return _video_meta_get_copyright( - video, - copyright, - ); - } - - late final _video_meta_get_copyrightPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(video_meta_h, - ffi.Pointer>)>>('video_meta_get_copyright'); - late final _video_meta_get_copyright = - _video_meta_get_copyrightPtr.asFunction< - int Function(video_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the track number of the given video metadata. - /// @details If the value is an empty string, the method returns "Unknown". \n - /// Since 3.0, if the media content has no track info, the method returns empty string. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a track_num should be released using free(). - /// - /// @param[in] video The handle to the video metadata - /// @param[out] track_num The track number of the video metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int video_meta_get_track_num( - video_meta_h video, - ffi.Pointer> track_num, - ) { - return _video_meta_get_track_num( - video, - track_num, - ); - } - - late final _video_meta_get_track_numPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(video_meta_h, - ffi.Pointer>)>>('video_meta_get_track_num'); - late final _video_meta_get_track_num = - _video_meta_get_track_numPtr.asFunction< - int Function(video_meta_h, ffi.Pointer>)>(); - - /// @brief Gets the bitrate of the given video metadata in bitrate per second. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] video The handle to the video metadata - /// @param[out] bit_rate The video bit rate in bit per second [bps] - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int video_meta_get_bit_rate( - video_meta_h video, - ffi.Pointer bit_rate, - ) { - return _video_meta_get_bit_rate( - video, - bit_rate, - ); - } - - late final _video_meta_get_bit_ratePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - video_meta_h, ffi.Pointer)>>('video_meta_get_bit_rate'); - late final _video_meta_get_bit_rate = _video_meta_get_bit_ratePtr - .asFunction)>(); - - /// @brief Gets the track duration of the given video metadata. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] video The handle to the video metadata - /// @param[out] duration The video duration in milliseconds - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int video_meta_get_duration( - video_meta_h video, - ffi.Pointer duration, - ) { - return _video_meta_get_duration( - video, - duration, - ); - } - - late final _video_meta_get_durationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - video_meta_h, ffi.Pointer)>>('video_meta_get_duration'); - late final _video_meta_get_duration = _video_meta_get_durationPtr - .asFunction)>(); - - /// @brief Gets the width of the given video metadata. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] video The handle to the video metadata - /// @param[out] width The video width in pixels - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int video_meta_get_width( - video_meta_h video, - ffi.Pointer width, - ) { - return _video_meta_get_width( - video, - width, - ); - } - - late final _video_meta_get_widthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - video_meta_h, ffi.Pointer)>>('video_meta_get_width'); - late final _video_meta_get_width = _video_meta_get_widthPtr - .asFunction)>(); - - /// @brief Gets the height of the given video metadata. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] video The handle to the video metadata - /// @param[out] height The video height in pixels - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int video_meta_get_height( - video_meta_h video, - ffi.Pointer height, - ) { - return _video_meta_get_height( - video, - height, - ); - } - - late final _video_meta_get_heightPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - video_meta_h, ffi.Pointer)>>('video_meta_get_height'); - late final _video_meta_get_height = _video_meta_get_heightPtr - .asFunction)>(); - - /// @brief Gets the rotation of the given video metadata. - /// @since_tizen 4.0 - /// - /// @param[in] video The handle to the video metadata - /// @param[out] rotation The clockwise rotation angle of the video in degrees (can be returned from 0 to less than 360) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int video_meta_get_rotation( - video_meta_h video, - ffi.Pointer rotation, - ) { - return _video_meta_get_rotation( - video, - rotation, - ); - } - - late final _video_meta_get_rotationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - video_meta_h, ffi.Pointer)>>('video_meta_get_rotation'); - late final _video_meta_get_rotation = _video_meta_get_rotationPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. Related setter functions are deprecated, therefore this function is not needed anymore. - /// @brief Updates an video metadata with modified attributes in the media database. - /// @details The function updates the given video meta in the media database. The function should be called after any change in video attributes, to be updated to the media - /// database. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @remarks Do not call this function in callback function of foreach function like media_info_foreach_media_from_db(). - /// - /// @param[in] video The handle to the video metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int video_meta_update_to_db( - video_meta_h video, - ) { - return _video_meta_update_to_db( - video, - ); - } - - late final _video_meta_update_to_dbPtr = - _lookup>( - 'video_meta_update_to_db'); - late final _video_meta_update_to_db = - _video_meta_update_to_dbPtr.asFunction(); - - /// @brief Gets the number of the album for the passed @a filter from the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The handle to the media filter - /// @param[out] album_count The count of the media album - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_album_get_album_count_from_db( - filter_h filter, - ffi.Pointer album_count, - ) { - return _media_album_get_album_count_from_db( - filter, - album_count, - ); - } - - late final _media_album_get_album_count_from_dbPtr = _lookup< - ffi.NativeFunction)>>( - 'media_album_get_album_count_from_db'); - late final _media_album_get_album_count_from_db = - _media_album_get_album_count_from_dbPtr - .asFunction)>(); - - /// @brief Iterates through the media album with optional @a filter from the media database. - /// @details This function gets all media album handles meeting the given filter. - /// The callback function will be invoked for every retrieved media album. - /// If @c NULL is passed to the filter, no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The handle to the media filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_album_cb(). - /// - /// @see #media_album_cb - /// @see media_content_connect() - /// @see media_filter_create() - int media_album_foreach_album_from_db( - filter_h filter, - media_album_cb callback, - ffi.Pointer user_data, - ) { - return _media_album_foreach_album_from_db( - filter, - callback, - user_data, - ); - } - - late final _media_album_foreach_album_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filter_h, media_album_cb, - ffi.Pointer)>>('media_album_foreach_album_from_db'); - late final _media_album_foreach_album_from_db = - _media_album_foreach_album_from_dbPtr.asFunction< - int Function(filter_h, media_album_cb, ffi.Pointer)>(); - - /// @brief Gets the number of media info for the given album present in the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] album_id The ID of the media album - /// @param[in] filter The handle to the media filter - /// @param[out] media_count The count of the media album - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_album_get_media_count_from_db( - int album_id, - filter_h filter, - ffi.Pointer media_count, - ) { - return _media_album_get_media_count_from_db( - album_id, - filter, - media_count, - ); - } - - late final _media_album_get_media_count_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, filter_h, - ffi.Pointer)>>('media_album_get_media_count_from_db'); - late final _media_album_get_media_count_from_db = - _media_album_get_media_count_from_dbPtr - .asFunction)>(); - - /// @brief Iterates through the media files with an optional @a filter in the given media album from the media database. - /// @details This function gets all media files associated with the given media album and - /// meeting desired filter option and calls @a callback for - /// every retrieved media info. If @c NULL is passed to the @a filter, no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] album_id The ID of the media album - /// @param[in] filter The handle to the media filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_info_cb(). - /// - /// @see #media_info_cb - /// @see media_content_connect() - /// @see media_filter_create() - int media_album_foreach_media_from_db( - int album_id, - filter_h filter, - media_info_cb callback, - ffi.Pointer user_data, - ) { - return _media_album_foreach_media_from_db( - album_id, - filter, - callback, - user_data, - ); - } - - late final _media_album_foreach_media_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, filter_h, media_info_cb, - ffi.Pointer)>>('media_album_foreach_media_from_db'); - late final _media_album_foreach_media_from_db = - _media_album_foreach_media_from_dbPtr.asFunction< - int Function(int, filter_h, media_info_cb, ffi.Pointer)>(); - - /// @brief Destroys the album handle. - /// @details This function frees all resources related to the album handle. This handle - /// can no longer be used to perform any operations. A new handle has to - /// be created before the next use. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] album The handle to the media album - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre Get copy of album handle by calling media_album_clone(). - /// - /// @see media_album_clone() - int media_album_destroy( - media_album_h album, - ) { - return _media_album_destroy( - album, - ); - } - - late final _media_album_destroyPtr = - _lookup>( - 'media_album_destroy'); - late final _media_album_destroy = - _media_album_destroyPtr.asFunction(); - - /// @brief Clones a media album. - /// @details This function copies the media album handle from a source to - /// destination. There is no media_album_create() function. The media_album_h is created internally and available through - /// media album foreach function such as media_album_foreach_album_from_db(). To use this handle outside of these foreach functions, - /// use this function. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a dst should be released using media_album_destroy(). - /// - /// @param[out] dst The destination handle to the media album - /// @param[in] src The source handle to the media album - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see media_album_destroy() - /// @see media_album_foreach_album_from_db() - int media_album_clone( - ffi.Pointer dst, - media_album_h src, - ) { - return _media_album_clone( - dst, - src, - ); - } - - late final _media_album_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, media_album_h)>>('media_album_clone'); - late final _media_album_clone = _media_album_clonePtr - .asFunction, media_album_h)>(); - - /// @brief Gets the ID of the album. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] album The handle to the media album - /// @param[out] album_id The ID of the media album - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_album_foreach_album_from_db() - int media_album_get_album_id( - media_album_h album, - ffi.Pointer album_id, - ) { - return _media_album_get_album_id( - album, - album_id, - ); - } - - late final _media_album_get_album_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_album_h, - ffi.Pointer)>>('media_album_get_album_id'); - late final _media_album_get_album_id = _media_album_get_album_idPtr - .asFunction)>(); - - /// @brief Gets the name of the album. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a album_name should be released using free(). - /// - /// @param[in] album The handle to the media album - /// @param[out] album_name The name of the media album handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_album_get_name( - media_album_h album, - ffi.Pointer> album_name, - ) { - return _media_album_get_name( - album, - album_name, - ); - } - - late final _media_album_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_album_h, - ffi.Pointer>)>>('media_album_get_name'); - late final _media_album_get_name = _media_album_get_namePtr.asFunction< - int Function(media_album_h, ffi.Pointer>)>(); - - /// @brief Gets the name of the artist from the given album. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a artist should be released using free(). - /// - /// @param[in] album The handle to the media album - /// @param[out] artist The name of the media artist - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_album_get_artist( - media_album_h album, - ffi.Pointer> artist, - ) { - return _media_album_get_artist( - album, - artist, - ); - } - - late final _media_album_get_artistPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_album_h, - ffi.Pointer>)>>('media_album_get_artist'); - late final _media_album_get_artist = _media_album_get_artistPtr.asFunction< - int Function(media_album_h, ffi.Pointer>)>(); - - /// @brief Gets the album art path from the album. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a album_art should be released using free(). - /// - /// @param[in] album The handle to the media album - /// @param[out] album_art The path of the media album_art - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_album_get_album_art( - media_album_h album, - ffi.Pointer> album_art, - ) { - return _media_album_get_album_art( - album, - album_art, - ); - } - - late final _media_album_get_album_artPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_album_h, ffi.Pointer>)>>( - 'media_album_get_album_art'); - late final _media_album_get_album_art = - _media_album_get_album_artPtr.asFunction< - int Function(media_album_h, ffi.Pointer>)>(); - - /// @brief Gets the media album from the media database. - /// - /// @details This function creates a new media album handle from the media database by the given @a album_id. - /// Media album will be created and will be filled with the album information. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a album should be released using media_album_destroy(). - /// - /// @param[in] album_id The ID of the media album - /// @param[out] album The handle to the media album - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_album_destroy() - int media_album_get_album_from_db( - int album_id, - ffi.Pointer album, - ) { - return _media_album_get_album_from_db( - album_id, - album, - ); - } - - late final _media_album_get_album_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, - ffi.Pointer)>>('media_album_get_album_from_db'); - late final _media_album_get_album_from_db = _media_album_get_album_from_dbPtr - .asFunction)>(); - - /// @brief Gets the number of the group for the passed @a filter from the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The handle to the media filter - /// @param[in] group The type of the media group - /// @param[out] group_count The count of the media group - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_group_get_group_count_from_db( - filter_h filter, - int group, - ffi.Pointer group_count, - ) { - return _media_group_get_group_count_from_db( - filter, - group, - group_count, - ); - } - - late final _media_group_get_group_count_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filter_h, ffi.Int32, - ffi.Pointer)>>('media_group_get_group_count_from_db'); - late final _media_group_get_group_count_from_db = - _media_group_get_group_count_from_dbPtr - .asFunction)>(); - - /// @brief Iterates through the media group with an optional @a filter from the media database. - /// @details This function gets names of media group meeting the given filter. - /// The callback function will be invoked for every retrieved media group. - /// If @c NULL is passed to the filter, no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The handle to the media filter - /// @param[in] group The type of the media group - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_group_cb(). - /// - /// @see #media_group_cb - /// @see media_content_connect() - /// @see media_filter_create() - int media_group_foreach_group_from_db( - filter_h filter, - int group, - media_group_cb callback, - ffi.Pointer user_data, - ) { - return _media_group_foreach_group_from_db( - filter, - group, - callback, - user_data, - ); - } - - late final _media_group_foreach_group_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filter_h, ffi.Int32, media_group_cb, - ffi.Pointer)>>('media_group_foreach_group_from_db'); - late final _media_group_foreach_group_from_db = - _media_group_foreach_group_from_dbPtr.asFunction< - int Function(filter_h, int, media_group_cb, ffi.Pointer)>(); - - /// @brief Gets the count of the media info for the given media group present in the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] group_name The name of the media group - /// @param[in] group The type of the media group - /// @param[in] filter The handle to the media filter - /// @param[out] media_count The count of the media - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_group_get_media_count_from_db( - ffi.Pointer group_name, - int group, - filter_h filter, - ffi.Pointer media_count, - ) { - return _media_group_get_media_count_from_db( - group_name, - group, - filter, - media_count, - ); - } - - late final _media_group_get_media_count_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int32, filter_h, - ffi.Pointer)>>('media_group_get_media_count_from_db'); - late final _media_group_get_media_count_from_db = - _media_group_get_media_count_from_dbPtr.asFunction< - int Function( - ffi.Pointer, int, filter_h, ffi.Pointer)>(); - - /// @brief Iterates through the media files with an optional @a filter in the given @a group from the media database. - /// @details This function gets all media files associated with the given group and - /// meeting desired filter option and calls @a callback for - /// every retrieved media info. If @c NULL is passed to the @a filter, no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] group_name The name of the media group - /// @param[in] group The type of the media group - /// @param[in] filter The handle to the media filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_info_cb(). - /// - /// @see media_info_cb() - /// @see media_content_connect() - /// @see media_filter_create() - int media_group_foreach_media_from_db( - ffi.Pointer group_name, - int group, - filter_h filter, - media_info_cb callback, - ffi.Pointer user_data, - ) { - return _media_group_foreach_media_from_db( - group_name, - group, - filter, - callback, - user_data, - ); - } - - late final _media_group_foreach_media_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - filter_h, - media_info_cb, - ffi.Pointer)>>('media_group_foreach_media_from_db'); - late final _media_group_foreach_media_from_db = - _media_group_foreach_media_from_dbPtr.asFunction< - int Function(ffi.Pointer, int, filter_h, media_info_cb, - ffi.Pointer)>(); - - /// @brief Gets the number of playlists for the passed @a filter from the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The handle to the media filter - /// @param[out] playlist_count The count of the media playlist - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_playlist_get_playlist_count_from_db( - filter_h filter, - ffi.Pointer playlist_count, - ) { - return _media_playlist_get_playlist_count_from_db( - filter, - playlist_count, - ); - } - - late final _media_playlist_get_playlist_count_from_dbPtr = _lookup< - ffi.NativeFunction)>>( - 'media_playlist_get_playlist_count_from_db'); - late final _media_playlist_get_playlist_count_from_db = - _media_playlist_get_playlist_count_from_dbPtr - .asFunction)>(); - - /// @brief Iterates through the media playlists with an optional @a filter from the media database. - /// @details This function gets all media playlists meeting the given filter. - /// The callback function will be invoked for every retrieved media playlist. - /// If @c NULL is passed to the filter, no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The handle to the media filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_playlist_cb(). - /// - /// @see media_playlist_cb() - /// @see media_content_connect() - /// @see media_filter_create() - int media_playlist_foreach_playlist_from_db( - filter_h filter, - media_playlist_cb callback, - ffi.Pointer user_data, - ) { - return _media_playlist_foreach_playlist_from_db( - filter, - callback, - user_data, - ); - } - - late final _media_playlist_foreach_playlist_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - filter_h, media_playlist_cb, ffi.Pointer)>>( - 'media_playlist_foreach_playlist_from_db'); - late final _media_playlist_foreach_playlist_from_db = - _media_playlist_foreach_playlist_from_dbPtr.asFunction< - int Function(filter_h, media_playlist_cb, ffi.Pointer)>(); - - /// @brief Gets the number of the media info for the given playlist present in the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] playlist_id The ID of the media playlist - /// @param[in] filter The handle to the media filter - /// @param[out] media_count The number of media items - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_playlist_get_media_count_from_db( - int playlist_id, - filter_h filter, - ffi.Pointer media_count, - ) { - return _media_playlist_get_media_count_from_db( - playlist_id, - filter, - media_count, - ); - } - - late final _media_playlist_get_media_count_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, filter_h, - ffi.Pointer)>>('media_playlist_get_media_count_from_db'); - late final _media_playlist_get_media_count_from_db = - _media_playlist_get_media_count_from_dbPtr - .asFunction)>(); - - /// @brief Iterates through the media files with an optional @a filter in the given audio playlist from the media database. - /// @details This function gets all media files associated with the given media playlist and - /// meeting desired filter option and calls @a callback for - /// every retrieved media info. If @c NULL is passed to the @a filter, no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] playlist_id The ID of the media playlist - /// @param[in] filter The handle to the media filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_info_cb(). - /// - /// @see media_info_cb() - /// @see media_content_connect() - /// @see media_filter_create() - int media_playlist_foreach_media_from_db( - int playlist_id, - filter_h filter, - playlist_member_cb callback, - ffi.Pointer user_data, - ) { - return _media_playlist_foreach_media_from_db( - playlist_id, - filter, - callback, - user_data, - ); - } - - late final _media_playlist_foreach_media_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, filter_h, playlist_member_cb, - ffi.Pointer)>>('media_playlist_foreach_media_from_db'); - late final _media_playlist_foreach_media_from_db = - _media_playlist_foreach_media_from_dbPtr.asFunction< - int Function( - int, filter_h, playlist_member_cb, ffi.Pointer)>(); - - /// @brief Inserts a new playlist with the given name into the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @remarks The @a playlist should be released using media_playlist_destroy(). - /// - /// @param[in] name The name of the inserted playlist - /// @param[out] playlist The handle to the media playlist - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_playlist_delete_from_db() - int media_playlist_insert_to_db( - ffi.Pointer name, - ffi.Pointer playlist, - ) { - return _media_playlist_insert_to_db( - name, - playlist, - ); - } - - late final _media_playlist_insert_to_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('media_playlist_insert_to_db'); - late final _media_playlist_insert_to_db = - _media_playlist_insert_to_dbPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Deletes the given playlist from the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @param[in] playlist_id The ID of media playlist - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_playlist_insert_to_db() - int media_playlist_delete_from_db( - int playlist_id, - ) { - return _media_playlist_delete_from_db( - playlist_id, - ); - } - - late final _media_playlist_delete_from_dbPtr = - _lookup>( - 'media_playlist_delete_from_db'); - late final _media_playlist_delete_from_db = - _media_playlist_delete_from_dbPtr.asFunction(); - - /// @brief Gets the media playlist from the media database. - /// - /// @details This function creates a new media playlist handle from the media database by the given @a playlist_id. - /// The media playlist will be created and will be filled with the playlist information. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a playlist should be released using media_playlist_destroy(). - /// - /// @param[in] playlist_id The ID of the media playlist - /// @param[out] playlist The handle to the media playlist - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_playlist_destroy() - int media_playlist_get_playlist_from_db( - int playlist_id, - ffi.Pointer playlist, - ) { - return _media_playlist_get_playlist_from_db( - playlist_id, - playlist, - ); - } - - late final _media_playlist_get_playlist_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer)>>( - 'media_playlist_get_playlist_from_db'); - late final _media_playlist_get_playlist_from_db = - _media_playlist_get_playlist_from_dbPtr - .asFunction)>(); - - /// @brief Destroys a playlist handle. - /// @details This function frees all resources related to the playlist handle. This - /// handle no longer can be used to perform any operations. A new handle has to - /// be created before next usage. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] playlist The handle to the media playlist - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre Get a copy of playlist handle by calling media_playlist_clone() or media_playlist_insert_to_db(). - /// - /// @see media_playlist_clone() - int media_playlist_destroy( - media_playlist_h playlist, - ) { - return _media_playlist_destroy( - playlist, - ); - } - - late final _media_playlist_destroyPtr = - _lookup>( - 'media_playlist_destroy'); - late final _media_playlist_destroy = - _media_playlist_destroyPtr.asFunction(); - - /// @brief Clones a playlist handle. - /// @details This function copies the media playlist handle from a source to - /// destination. There is no media_playlist_create() function. The media_playlist_h is created internally and available through - /// media playlist foreach function such as media_playlist_foreach_playlist_from_db(). - /// To use this handle outside of these foreach functions, use this function. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @ a dst should be released using media_playlist_destroy(). - /// - /// @param[out] dst The destination handle to the media playlist - /// @param[in] src The source handle to the media playlist - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see media_playlist_destroy() - /// @see media_playlist_foreach_playlist_from_db() - int media_playlist_clone( - ffi.Pointer dst, - media_playlist_h src, - ) { - return _media_playlist_clone( - dst, - src, - ); - } - - late final _media_playlist_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - media_playlist_h)>>('media_playlist_clone'); - late final _media_playlist_clone = _media_playlist_clonePtr.asFunction< - int Function(ffi.Pointer, media_playlist_h)>(); - - /// @brief Gets the media playlist ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] playlist The handle to the media playlist - /// @param[out] playlist_id The ID of the media playlist - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_playlist_get_playlist_id( - media_playlist_h playlist, - ffi.Pointer playlist_id, - ) { - return _media_playlist_get_playlist_id( - playlist, - playlist_id, - ); - } - - late final _media_playlist_get_playlist_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_playlist_h, - ffi.Pointer)>>('media_playlist_get_playlist_id'); - late final _media_playlist_get_playlist_id = - _media_playlist_get_playlist_idPtr - .asFunction)>(); - - /// @brief Gets a name of the playlist. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a playlist_name should be released using free(). - /// - /// @param[in] playlist The handle to the media playlist - /// @param[out] playlist_name The playlist name - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_playlist_get_name( - media_playlist_h playlist, - ffi.Pointer> playlist_name, - ) { - return _media_playlist_get_name( - playlist, - playlist_name, - ); - } - - late final _media_playlist_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_playlist_h, - ffi.Pointer>)>>('media_playlist_get_name'); - late final _media_playlist_get_name = _media_playlist_get_namePtr.asFunction< - int Function(media_playlist_h, ffi.Pointer>)>(); - - /// @brief Sets the name of the playlist. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] playlist The handle to the media playlist - /// @param[in] playlist_name The name of the media playlist - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @post media_playlist_update_to_db() - int media_playlist_set_name( - media_playlist_h playlist, - ffi.Pointer playlist_name, - ) { - return _media_playlist_set_name( - playlist, - playlist_name, - ); - } - - late final _media_playlist_set_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_playlist_h, - ffi.Pointer)>>('media_playlist_set_name'); - late final _media_playlist_set_name = _media_playlist_set_namePtr - .asFunction)>(); - - /// @brief Gets a thumbnail path of the playlist. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a path should be released using free(). - /// - /// @param[in] playlist The handle to the media playlist - /// @param[out] path The path of the thumbnail - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_playlist_get_thumbnail_path( - media_playlist_h playlist, - ffi.Pointer> path, - ) { - return _media_playlist_get_thumbnail_path( - playlist, - path, - ); - } - - late final _media_playlist_get_thumbnail_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_playlist_h, ffi.Pointer>)>>( - 'media_playlist_get_thumbnail_path'); - late final _media_playlist_get_thumbnail_path = - _media_playlist_get_thumbnail_pathPtr.asFunction< - int Function(media_playlist_h, ffi.Pointer>)>(); - - /// @brief Sets the thumbnail path of the playlist. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] playlist The handle to the media playlist - /// @param[in] path The path of the thumbnail - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @post media_playlist_update_to_db() - int media_playlist_set_thumbnail_path( - media_playlist_h playlist, - ffi.Pointer path, - ) { - return _media_playlist_set_thumbnail_path( - playlist, - path, - ); - } - - late final _media_playlist_set_thumbnail_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_playlist_h, - ffi.Pointer)>>('media_playlist_set_thumbnail_path'); - late final _media_playlist_set_thumbnail_path = - _media_playlist_set_thumbnail_pathPtr - .asFunction)>(); - - /// @brief Sets the playing order in the playlist. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] playlist The handle to the media playlist - /// @param[in] playlist_member_id The ID of the playlist member - /// @param[in] play_order The playing order - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @post media_playlist_update_to_db() - int media_playlist_set_play_order( - media_playlist_h playlist, - int playlist_member_id, - int play_order, - ) { - return _media_playlist_set_play_order( - playlist, - playlist_member_id, - play_order, - ); - } - - late final _media_playlist_set_play_orderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_playlist_h, ffi.Int, - ffi.Int)>>('media_playlist_set_play_order'); - late final _media_playlist_set_play_order = _media_playlist_set_play_orderPtr - .asFunction(); - - /// @brief Adds a new media info to the playlist. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] playlist The handle to the media playlist - /// @param[in] media_id The media ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post media_playlist_update_to_db() - /// - /// @see media_content_connect() - /// @see media_playlist_remove_media() - int media_playlist_add_media( - media_playlist_h playlist, - ffi.Pointer media_id, - ) { - return _media_playlist_add_media( - playlist, - media_id, - ); - } - - late final _media_playlist_add_mediaPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_playlist_h, - ffi.Pointer)>>('media_playlist_add_media'); - late final _media_playlist_add_media = _media_playlist_add_mediaPtr - .asFunction)>(); - - /// @brief Removes the playlist members related with the media from the given playlist. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] playlist The handle to the media playlist - /// @param[in] playlist_member_id The ID of the playlist member - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post media_playlist_update_to_db() - /// - /// @see media_content_connect() - /// @see media_playlist_add_media() - int media_playlist_remove_media( - media_playlist_h playlist, - int playlist_member_id, - ) { - return _media_playlist_remove_media( - playlist, - playlist_member_id, - ); - } - - late final _media_playlist_remove_mediaPtr = - _lookup>( - 'media_playlist_remove_media'); - late final _media_playlist_remove_media = _media_playlist_remove_mediaPtr - .asFunction(); - - /// @brief Gets the played order of the playlist. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] playlist The handle to the media playlist - /// @param[in] playlist_member_id The ID of the playlist member - /// @param[out] play_order The played order - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_playlist_get_play_order( - media_playlist_h playlist, - int playlist_member_id, - ffi.Pointer play_order, - ) { - return _media_playlist_get_play_order( - playlist, - playlist_member_id, - play_order, - ); - } - - late final _media_playlist_get_play_orderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_playlist_h, ffi.Int, - ffi.Pointer)>>('media_playlist_get_play_order'); - late final _media_playlist_get_play_order = _media_playlist_get_play_orderPtr - .asFunction)>(); - - /// @brief Updates the media playlist to the media database. - /// - /// @details The function updates the given media playlist in the media database. - /// The function should be called after any change in the playlist, to be updated to the media database. - /// For example, after using media_playlist_set_name() for setting the name of the playlist, the - /// media_playlist_update_to_db() function should be called so as to update - /// the given playlist attributes in the media database. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @param[in] playlist The handle to the media playlist - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_playlist_destroy() - /// @see media_playlist_add_media() - /// @see media_playlist_remove_media() - /// @see media_playlist_set_name() - /// @see media_playlist_set_play_order() - int media_playlist_update_to_db( - media_playlist_h playlist, - ) { - return _media_playlist_update_to_db( - playlist, - ); - } - - late final _media_playlist_update_to_dbPtr = - _lookup>( - 'media_playlist_update_to_db'); - late final _media_playlist_update_to_db = _media_playlist_update_to_dbPtr - .asFunction(); - - /// @brief Imports the playlist from m3u playlist file. - /// @details This function reads a playlist from the m3u playlist file and insert into the db. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @remarks The @ a playlist should be released using media_playlist_destroy(). - /// @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage. \n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n - /// This function does not support the file of extended m3u playlist. - /// - /// @param[in] playlist_name The name of the media playlist to save - /// @param[in] path The path to import the playlist file - /// @param[out] playlist The handle to the media playlist - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - int media_playlist_import_from_file( - ffi.Pointer playlist_name, - ffi.Pointer path, - ffi.Pointer playlist, - ) { - return _media_playlist_import_from_file( - playlist_name, - path, - playlist, - ); - } - - late final _media_playlist_import_from_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>( - 'media_playlist_import_from_file'); - late final _media_playlist_import_from_file = - _media_playlist_import_from_filePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Exports the playlist to m3u playlist file. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage. \n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. - /// - /// @param[in] playlist The handle to the media playlist - /// @param[in] path path The path to export the playlist - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - int media_playlist_export_to_file( - media_playlist_h playlist, - ffi.Pointer path, - ) { - return _media_playlist_export_to_file( - playlist, - path, - ); - } - - late final _media_playlist_export_to_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_playlist_h, - ffi.Pointer)>>('media_playlist_export_to_file'); - late final _media_playlist_export_to_file = _media_playlist_export_to_filePtr - .asFunction)>(); - - /// @brief Inserts a new bookmark in media on the specified time offset to the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @param[in] media_id The media ID - /// @param[in] time The bookmark time offset (in seconds) - /// @param[in] thumbnail_path The thumbnail path of video bookmark\ n - /// If the media type is audio, then thumbnail is null. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_bookmark_delete_from_db() - int media_bookmark_insert_to_db( - ffi.Pointer media_id, - int time, - ffi.Pointer thumbnail_path, - ) { - return _media_bookmark_insert_to_db( - media_id, - time, - thumbnail_path, - ); - } - - late final _media_bookmark_insert_to_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, time_t, - ffi.Pointer)>>('media_bookmark_insert_to_db'); - late final _media_bookmark_insert_to_db = - _media_bookmark_insert_to_dbPtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer)>(); - - /// @brief Removes a media bookmark from the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @param[in] bookmark_id The ID of the media bookmark - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_bookmark_insert_to_db() - int media_bookmark_delete_from_db( - int bookmark_id, - ) { - return _media_bookmark_delete_from_db( - bookmark_id, - ); - } - - late final _media_bookmark_delete_from_dbPtr = - _lookup>( - 'media_bookmark_delete_from_db'); - late final _media_bookmark_delete_from_db = - _media_bookmark_delete_from_dbPtr.asFunction(); - - /// @brief Gets the number of bookmarks with an optional filter from the media database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] filter The handle to the media filter - /// @param[out] bookmark_count The count of the media bookmark - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_bookmark_get_bookmark_count_from_db( - filter_h filter, - ffi.Pointer bookmark_count, - ) { - return _media_bookmark_get_bookmark_count_from_db( - filter, - bookmark_count, - ); - } - - late final _media_bookmark_get_bookmark_count_from_dbPtr = _lookup< - ffi.NativeFunction)>>( - 'media_bookmark_get_bookmark_count_from_db'); - late final _media_bookmark_get_bookmark_count_from_db = - _media_bookmark_get_bookmark_count_from_dbPtr - .asFunction)>(); - - /// @brief Iterates through the bookmarks with an optional filter from the media database. - /// @details This function gets all bookmarks associated with the given filter and calls @a callback for every retrieved media bookmark. - /// If @c NULL is passed to the @a filter, then no filtering is applied. - /// @since_tizen 4.0 - /// - /// @param[in] filter The handle to the media filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_bookmark_cb(). - /// - /// @see media_content_connect() - /// @see media_bookmark_cb() - /// @see media_filter_create() - int media_bookmark_foreach_bookmark_from_db( - filter_h filter, - media_bookmark_cb callback, - ffi.Pointer user_data, - ) { - return _media_bookmark_foreach_bookmark_from_db( - filter, - callback, - user_data, - ); - } - - late final _media_bookmark_foreach_bookmark_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - filter_h, media_bookmark_cb, ffi.Pointer)>>( - 'media_bookmark_foreach_bookmark_from_db'); - late final _media_bookmark_foreach_bookmark_from_db = - _media_bookmark_foreach_bookmark_from_dbPtr.asFunction< - int Function(filter_h, media_bookmark_cb, ffi.Pointer)>(); - - /// @brief Clones a media bookmark. - /// @details This function copies the media bookmark handle from a source to destination. There is no media_bookmark_create() function. - /// The media_bookmark_h is created internally and available through media bookmark foreach function such as media_info_foreach_bookmark_from_db(). - /// To use this handle outside of these foreach functions, use this function. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a dst should be released using media_bookmark_destroy(). - /// - /// @param[out] dst The destination handle to the media bookmark - /// @param[in] src The source handle to the media bookmark - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see media_bookmark_destroy() - /// @see media_info_foreach_bookmark_from_db() - int media_bookmark_clone( - ffi.Pointer dst, - media_bookmark_h src, - ) { - return _media_bookmark_clone( - dst, - src, - ); - } - - late final _media_bookmark_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - media_bookmark_h)>>('media_bookmark_clone'); - late final _media_bookmark_clone = _media_bookmark_clonePtr.asFunction< - int Function(ffi.Pointer, media_bookmark_h)>(); - - /// @brief Destroys a media bookmark. - /// @details This function frees all the resources related to the bookmark handle. This handle - /// no longer can be used to perform any operations. A new handle has to - /// be created before the next use. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] bookmark The handle to the media bookmark - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre Get copy of bookmark handle by calling media_bookmark_clone(). - /// - /// @see media_bookmark_clone() - int media_bookmark_destroy( - media_bookmark_h bookmark, - ) { - return _media_bookmark_destroy( - bookmark, - ); - } - - late final _media_bookmark_destroyPtr = - _lookup>( - 'media_bookmark_destroy'); - late final _media_bookmark_destroy = - _media_bookmark_destroyPtr.asFunction(); - - /// @brief Gets the bookmark ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] bookmark The handle to the media bookmark - /// @param[out] bookmark_id The ID of the media bookmark - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_bookmark_get_bookmark_id( - media_bookmark_h bookmark, - ffi.Pointer bookmark_id, - ) { - return _media_bookmark_get_bookmark_id( - bookmark, - bookmark_id, - ); - } - - late final _media_bookmark_get_bookmark_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_bookmark_h, - ffi.Pointer)>>('media_bookmark_get_bookmark_id'); - late final _media_bookmark_get_bookmark_id = - _media_bookmark_get_bookmark_idPtr - .asFunction)>(); - - /// @brief Gets the bookmark time marked parameter. - /// @details This function returns time offset in seconds from beginning of the movie on which bookmark - /// was placed. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] bookmark The handle to the media bookmark - /// @param[out] marked_time The bookmark time offset (in seconds) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_bookmark_get_marked_time( - media_bookmark_h bookmark, - ffi.Pointer marked_time, - ) { - return _media_bookmark_get_marked_time( - bookmark, - marked_time, - ); - } - - late final _media_bookmark_get_marked_timePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_bookmark_h, - ffi.Pointer)>>('media_bookmark_get_marked_time'); - late final _media_bookmark_get_marked_time = - _media_bookmark_get_marked_timePtr - .asFunction)>(); - - /// @brief Gets the media bookmark thumbnail. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a path should be released using free(). - /// - /// @param[in] bookmark The handle to the media bookmark - /// @param[out] path The thumbnail path of media bookmark - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_bookmark_get_thumbnail_path( - media_bookmark_h bookmark, - ffi.Pointer> path, - ) { - return _media_bookmark_get_thumbnail_path( - bookmark, - path, - ); - } - - late final _media_bookmark_get_thumbnail_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_bookmark_h, ffi.Pointer>)>>( - 'media_bookmark_get_thumbnail_path'); - late final _media_bookmark_get_thumbnail_path = - _media_bookmark_get_thumbnail_pathPtr.asFunction< - int Function(media_bookmark_h, ffi.Pointer>)>(); - - /// @brief Gets the media bookmark name which user set. - /// @since_tizen 4.0 - /// - /// @remarks The @a name should be released using free(). - /// - /// @param[in] bookmark The handle to the media bookmark - /// @param[out] name The name of media bookmark. If name was not set, empty string is returned. - /// If User set bookmark name to NULL, name will be empty string also. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_bookmark_get_name( - media_bookmark_h bookmark, - ffi.Pointer> name, - ) { - return _media_bookmark_get_name( - bookmark, - name, - ); - } - - late final _media_bookmark_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_bookmark_h, - ffi.Pointer>)>>('media_bookmark_get_name'); - late final _media_bookmark_get_name = _media_bookmark_get_namePtr.asFunction< - int Function(media_bookmark_h, ffi.Pointer>)>(); - - /// @brief Sets the media bookmark name. - /// @since_tizen 4.0 - /// - /// @param[in] bookmark The handle to the media bookmark - /// @param[in] name The name of media bookmark. Can be NULL, empty or non-empty string. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @post media_bookmark_update_to_db() - int media_bookmark_set_name( - media_bookmark_h bookmark, - ffi.Pointer name, - ) { - return _media_bookmark_set_name( - bookmark, - name, - ); - } - - late final _media_bookmark_set_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_bookmark_h, - ffi.Pointer)>>('media_bookmark_set_name'); - late final _media_bookmark_set_name = _media_bookmark_set_namePtr - .asFunction)>(); - - /// @brief Updates bookmark information to the media database. - /// @details The function updates the given bookmark meta in the media database. \n - /// The function should be called after any change in bookmark attributes, to be updated to the media database. \n - /// For example, after using media_bookmark_set_name() for setting the name of the bookmark, \n - /// the media_bookmark_update_to_db() function should be called so as to update the given bookmark attributes in the media database. - /// @since_tizen 4.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @remarks Do not call this function in callback function of foreach function like media_info_foreach_bookmark_from_db(). - /// @param[in] bookmark The handle to the media bookmark - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied when Application has no privilege - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_bookmark_set_name() - int media_bookmark_update_to_db( - media_bookmark_h bookmark, - ) { - return _media_bookmark_update_to_db( - bookmark, - ); - } - - late final _media_bookmark_update_to_dbPtr = - _lookup>( - 'media_bookmark_update_to_db'); - late final _media_bookmark_update_to_db = _media_bookmark_update_to_dbPtr - .asFunction(); - - /// @deprecated Deprecated since 5.0. - /// @brief Gets media storage from database. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks The @a storage should be released using media_storage_destroy(). - /// - /// @param[in] storage_id The ID of the media storage - /// @param[out] storage The media storage handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_storage_get_storage_info_from_db( - ffi.Pointer storage_id, - ffi.Pointer storage, - ) { - return _media_storage_get_storage_info_from_db( - storage_id, - storage, - ); - } - - late final _media_storage_get_storage_info_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>( - 'media_storage_get_storage_info_from_db'); - late final _media_storage_get_storage_info_from_db = - _media_storage_get_storage_info_from_dbPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @deprecated Deprecated since 5.0. Use @ref CAPI_SYSTEM_STORAGE_MODULE instead. - /// @brief Gets the count of media storage for the passed @a filter from the media database. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] filter The handle to the media filter - /// @param[out] storage_count The count of storage - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_storage_get_storage_count_from_db( - filter_h filter, - ffi.Pointer storage_count, - ) { - return _media_storage_get_storage_count_from_db( - filter, - storage_count, - ); - } - - late final _media_storage_get_storage_count_from_dbPtr = _lookup< - ffi.NativeFunction)>>( - 'media_storage_get_storage_count_from_db'); - late final _media_storage_get_storage_count_from_db = - _media_storage_get_storage_count_from_dbPtr - .asFunction)>(); - - /// @deprecated Deprecated since 5.0. Use @ref CAPI_SYSTEM_STORAGE_MODULE instead. - /// @brief Iterates through media storage from the media database. - /// @details This function gets all media storage handles meeting the given @a filter. - /// The @a callback function will be invoked for every retrieved media storage. - /// If @c NULL is passed to the @a filter, then no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] filter The handle to the media filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_storage_destroy(). - /// - /// @see media_content_connect() - /// @see media_storage_destroy() - int media_storage_foreach_storage_from_db( - filter_h filter, - media_storage_cb callback, - ffi.Pointer user_data, - ) { - return _media_storage_foreach_storage_from_db( - filter, - callback, - user_data, - ); - } - - late final _media_storage_foreach_storage_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filter_h, media_storage_cb, - ffi.Pointer)>>('media_storage_foreach_storage_from_db'); - late final _media_storage_foreach_storage_from_db = - _media_storage_foreach_storage_from_dbPtr.asFunction< - int Function(filter_h, media_storage_cb, ffi.Pointer)>(); - - /// @deprecated Deprecated since 5.0. Use media_info_get_media_count_from_db() instead. - /// @brief Gets the count of media files for the passed @a filter in the given @a storage_id from the media database. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks Use media_info_get_media_count_from_db() if you want to search for internal storage. - /// - /// @param[in] storage_id The ID of the media storage - /// @param[in] filter The handle to the media filter - /// @param[out] media_count The count of media storage items - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - int media_storage_get_media_count_from_db( - ffi.Pointer storage_id, - filter_h filter, - ffi.Pointer media_count, - ) { - return _media_storage_get_media_count_from_db( - storage_id, - filter, - media_count, - ); - } - - late final _media_storage_get_media_count_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, filter_h, - ffi.Pointer)>>('media_storage_get_media_count_from_db'); - late final _media_storage_get_media_count_from_db = - _media_storage_get_media_count_from_dbPtr.asFunction< - int Function( - ffi.Pointer, filter_h, ffi.Pointer)>(); - - /// @deprecated Deprecated since 5.0. Use media_info_foreach_media_from_db() instead. - /// @brief Iterates through the media files with an optional @a filter in the given @a storage_id from the media database. - /// @details This function gets all media files associated with the given storage and - /// meeting desired filter option and calls @a callback for - /// every retrieved media item. If @c NULL is passed to the @a filter, no filtering is applied. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks Do not call updating DB function like media_info_update_to_db(), media_info_refresh_metadata_to_db(), audio_meta_update_to_db(), image_meta_update_to_db() and video_meta_update_to_db() in your callback function, - /// your callback function is invoked as inline function. \n - /// So, your callback function is in read state in SQLite. When you are in read state, sometimes you do not update DB. \n - /// We do not recommend you call updating DB function in callback of foreach function.\n - /// Use media_info_foreach_media_from_db() if you want to search for internal storage. - /// - /// @param[in] storage_id The ID of the media storage - /// @param[in] filter The handle to the media filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_info_cb(). - /// - /// @see #media_info_cb - /// @see media_content_connect() - /// @see media_filter_create() - int media_storage_foreach_media_from_db( - ffi.Pointer storage_id, - filter_h filter, - media_info_cb callback, - ffi.Pointer user_data, - ) { - return _media_storage_foreach_media_from_db( - storage_id, - filter, - callback, - user_data, - ); - } - - late final _media_storage_foreach_media_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, filter_h, media_info_cb, - ffi.Pointer)>>('media_storage_foreach_media_from_db'); - late final _media_storage_foreach_media_from_db = - _media_storage_foreach_media_from_dbPtr.asFunction< - int Function(ffi.Pointer, filter_h, media_info_cb, - ffi.Pointer)>(); - - /// @deprecated Deprecated since 5.0. - /// @brief Destroys media storage handle. - /// @details The function frees all resources related to the media storage handle. This handle - /// can no longer be used to perform any operations. New media storage handle has to - /// be created before the next usage. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] storage The media storage handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre Get copy of media_storage_h handle by calling media_storage_clone(). - /// - /// @see media_storage_clone() - int media_storage_destroy( - media_storage_h storage, - ) { - return _media_storage_destroy( - storage, - ); - } - - late final _media_storage_destroyPtr = - _lookup>( - 'media_storage_destroy'); - late final _media_storage_destroy = - _media_storage_destroyPtr.asFunction(); - - /// @deprecated Deprecated since 5.0. - /// @brief Clones the media storage handle. - /// - /// @details This function copies the media storage handle from a source to the destination. - /// There is no media_storage_create() function. The media_storage_h is created internally and - /// available through media storage foreach function such as media_storage_foreach_storage_from_db(). - /// To use this handle outside of these foreach functions, use this function. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks The @a dst should be released using media_storage_destroy(). - /// - /// @param[out] dst The destination handle to the media storage - /// @param[in] src The source handle to the media storage - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_storage_destroy() - /// @see media_storage_foreach_storage_from_db() - /// @see media_storage_get_storage_info_from_db() - int media_storage_clone( - ffi.Pointer dst, - media_storage_h src, - ) { - return _media_storage_clone( - dst, - src, - ); - } - - late final _media_storage_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - media_storage_h)>>('media_storage_clone'); - late final _media_storage_clone = _media_storage_clonePtr.asFunction< - int Function(ffi.Pointer, media_storage_h)>(); - - /// @deprecated Deprecated since 5.0. - /// @brief Gets the storage id of media storage. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks The @a storage_id should be released using free(). - /// - /// @param[in] storage The media storage handle - /// @param[out] storage_id The ID of the media storage - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_storage_get_id( - media_storage_h storage, - ffi.Pointer> storage_id, - ) { - return _media_storage_get_id( - storage, - storage_id, - ); - } - - late final _media_storage_get_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_storage_h, - ffi.Pointer>)>>('media_storage_get_id'); - late final _media_storage_get_id = _media_storage_get_idPtr.asFunction< - int Function(media_storage_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Gets the storage name of media storage. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks The @a storage_name should be released using free(). - /// If the requested storage is not the cloud storage, this function returns NULL. - /// - /// @param[in] storage The media storage handle - /// @param[out] storage_name The storage name of the media storage - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_storage_get_name( - media_storage_h storage, - ffi.Pointer> storage_name, - ) { - return _media_storage_get_name( - storage, - storage_name, - ); - } - - late final _media_storage_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_storage_h, - ffi.Pointer>)>>('media_storage_get_name'); - late final _media_storage_get_name = _media_storage_get_namePtr.asFunction< - int Function(media_storage_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 5.0. Use @ref CAPI_SYSTEM_STORAGE_MODULE instead. - /// @brief Gets the storage path of media storage. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks The @a storage_path should be released using free(). - /// - /// @param[in] storage The media storage handle - /// @param[out] storage_path The storage path of the media storage - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - int media_storage_get_path( - media_storage_h storage, - ffi.Pointer> storage_path, - ) { - return _media_storage_get_path( - storage, - storage_path, - ); - } - - late final _media_storage_get_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_storage_h, - ffi.Pointer>)>>('media_storage_get_path'); - late final _media_storage_get_path = _media_storage_get_pathPtr.asFunction< - int Function(media_storage_h, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 5.0. Use storage_get_type_dev() instead. - /// @brief Gets the storage type of media storage. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] storage The media storage handle - /// @param[out] storage_type The storage type of the media storage - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_storage_get_type( - media_storage_h storage, - ffi.Pointer storage_type, - ) { - return _media_storage_get_type( - storage, - storage_type, - ); - } - - late final _media_storage_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_storage_h, - ffi.Pointer)>>('media_storage_get_type'); - late final _media_storage_get_type = _media_storage_get_typePtr - .asFunction)>(); - - /// @brief Clones the media face handle. - /// @details This function copies the media face handle from a source to - /// destination. There is no media_face_create() function. The media_face_h is created internally and available through - /// media face foreach function such as media_face_foreach_face_from_db(). To use this handle outside of these foreach functions, - /// use this function. - /// - /// @since_tizen 3.0 - /// @remarks The @a dst should be released using media_face_destroy(). - /// - /// @param[out] dst The destination handle to the media face - /// @param[in] src The source handle to the media face - /// - /// @return 0 on success, otherwise a negative error value. - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see media_face_destroy() - /// @see media_face_foreach_face_from_db() - int media_face_clone( - ffi.Pointer dst, - media_face_h src, - ) { - return _media_face_clone( - dst, - src, - ); - } - - late final _media_face_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, media_face_h)>>('media_face_clone'); - late final _media_face_clone = _media_face_clonePtr - .asFunction, media_face_h)>(); - - /// @brief Destroys the media face handle. - /// @details Function frees all resources related to media face handle. This - /// handle no longer can be used to perform any operations. New handle has to - /// be created before next usage. - /// - /// @since_tizen 3.0 - /// - /// @param[in] face The media face handle - /// - /// @return 0 on success, otherwise a negative error value. - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre Get copy of media face handle by calling media_face_clone() or Get media face handle by calling media_info_foreach_face_from_db() - /// - /// @see media_face_clone() - int media_face_destroy( - media_face_h face, - ) { - return _media_face_destroy( - face, - ); - } - - late final _media_face_destroyPtr = - _lookup>( - 'media_face_destroy'); - late final _media_face_destroy = - _media_face_destroyPtr.asFunction(); - - /// @brief Gets the face id from the media face handle. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a face_id should be released using free(). - /// - /// @param[in] face The media face handle - /// @param[out] face_id The ID of the media face - /// - /// @return 0 on success, otherwise a negative error value. - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_face_get_face_id( - media_face_h face, - ffi.Pointer> face_id, - ) { - return _media_face_get_face_id( - face, - face_id, - ); - } - - late final _media_face_get_face_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_face_h, - ffi.Pointer>)>>('media_face_get_face_id'); - late final _media_face_get_face_id = _media_face_get_face_idPtr.asFunction< - int Function(media_face_h, ffi.Pointer>)>(); - - /// @brief Gets the media id from the media face handle. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a media_id should be released using free(). - /// - /// @param[in] face The media face handle - /// @param[out] media_id The media ID - /// - /// @return 0 on success, otherwise a negative error value. - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_face_get_media_id( - media_face_h face, - ffi.Pointer> media_id, - ) { - return _media_face_get_media_id( - face, - media_id, - ); - } - - late final _media_face_get_media_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_face_h, - ffi.Pointer>)>>('media_face_get_media_id'); - late final _media_face_get_media_id = _media_face_get_media_idPtr.asFunction< - int Function(media_face_h, ffi.Pointer>)>(); - - /// @brief Gets the face's rectangle from the media face handle. - /// @details This function can get the face's rectangle information. returned rectangle information includes the orientation value. - /// - /// @since_tizen 3.0 - /// - /// @param[in] face The media face handle - /// @param[out] rect_x The x position of the media face - /// @param[out] rect_y The y position of the media face - /// @param[out] rect_w The width of the media face - /// @param[out] rect_h The height of the media face - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_face_get_face_rect( - media_face_h face, - ffi.Pointer rect_x, - ffi.Pointer rect_y, - ffi.Pointer rect_w, - ffi.Pointer rect_h, - ) { - return _media_face_get_face_rect( - face, - rect_x, - rect_y, - rect_w, - rect_h, - ); - } - - late final _media_face_get_face_rectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_face_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('media_face_get_face_rect'); - late final _media_face_get_face_rect = - _media_face_get_face_rectPtr.asFunction< - int Function( - media_face_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the orientation from the media face handle. - /// @details This function can get the orientation value from the original image. - /// - /// @since_tizen 3.0 - /// - /// @param[in] face The media face handle - /// @param[out] orientation The orientation of the media face - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_face_get_orientation( - media_face_h face, - ffi.Pointer orientation, - ) { - return _media_face_get_orientation( - face, - orientation, - ); - } - - late final _media_face_get_orientationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_face_h, - ffi.Pointer)>>('media_face_get_orientation'); - late final _media_face_get_orientation = _media_face_get_orientationPtr - .asFunction)>(); - - /// @brief Gets the tag from the media face handle. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a tag should be released using free(). - /// - /// @param[in] face The media face handle - /// @param[out] tag The tag of the media face - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - int media_face_get_tag( - media_face_h face, - ffi.Pointer> tag, - ) { - return _media_face_get_tag( - face, - tag, - ); - } - - late final _media_face_get_tagPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_face_h, - ffi.Pointer>)>>('media_face_get_tag'); - late final _media_face_get_tag = _media_face_get_tagPtr.asFunction< - int Function(media_face_h, ffi.Pointer>)>(); - - /// @brief Creates the media face handle. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a face should be released using media_face_destroy(). - /// - /// @param[in] media_id The media ID - /// @param[out] face The media face handle - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_face_destroy() - int media_face_create( - ffi.Pointer media_id, - ffi.Pointer face, - ) { - return _media_face_create( - media_id, - face, - ); - } - - late final _media_face_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('media_face_create'); - late final _media_face_create = _media_face_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the face rectangle of the media face handle. - /// - /// @since_tizen 3.0 - /// - /// @param[in] face The media face handle - /// @param[in] rect_x The integer to set as a position x of face rectangle - /// @param[in] rect_y The integer to set as a position y of face rectangle - /// @param[in] rect_w The integer to set as a width of face rectangle - /// @param[in] rect_h The integer to set as a height of face rectangle - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_face_insert_to_db() - /// @post media_face_update_to_db() - int media_face_set_face_rect( - media_face_h face, - int rect_x, - int rect_y, - int rect_w, - int rect_h, - ) { - return _media_face_set_face_rect( - face, - rect_x, - rect_y, - rect_w, - rect_h, - ); - } - - late final _media_face_set_face_rectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_face_h, ffi.UnsignedInt, ffi.UnsignedInt, - ffi.UnsignedInt, ffi.UnsignedInt)>>('media_face_set_face_rect'); - late final _media_face_set_face_rect = _media_face_set_face_rectPtr - .asFunction(); - - /// @brief Sets the orientation of the media face handle. - /// @details This function may set the value of the original image orientation. - /// - /// @since_tizen 3.0 - /// - /// @param[in] face The media face handle - /// @param[in] orientation The integer to set as an orientation - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post media_face_insert_to_db() - /// @post media_face_update_to_db() - int media_face_set_orientation( - media_face_h face, - int orientation, - ) { - return _media_face_set_orientation( - face, - orientation, - ); - } - - late final _media_face_set_orientationPtr = - _lookup>( - 'media_face_set_orientation'); - late final _media_face_set_orientation = _media_face_set_orientationPtr - .asFunction(); - - /// @brief Sets the tag of the media face handle. - /// - /// @since_tizen 3.0 - /// - /// @param[in] face The media face handle - /// @param[in] tag The tag of the media face - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @post media_face_insert_to_db() - /// @post media_face_update_to_db() - int media_face_set_tag( - media_face_h face, - ffi.Pointer tag, - ) { - return _media_face_set_tag( - face, - tag, - ); - } - - late final _media_face_set_tagPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_face_h, ffi.Pointer)>>('media_face_set_tag'); - late final _media_face_set_tag = _media_face_set_tagPtr - .asFunction)>(); - - /// @brief Inserts a new face in the media database. - /// @since_tizen 3.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @remarks The @a face should be released using media_face_destroy(). - /// - /// @param[in] face The media face handle - /// - /// @return 0 on success, otherwise a negative error value. - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// - /// @see media_content_connect() - /// @see media_face_destroy() - /// @see media_face_set_xxx() - int media_face_insert_to_db( - media_face_h face, - ) { - return _media_face_insert_to_db( - face, - ); - } - - late final _media_face_insert_to_dbPtr = - _lookup>( - 'media_face_insert_to_db'); - late final _media_face_insert_to_db = - _media_face_insert_to_dbPtr.asFunction(); - - /// @brief Updates the face details to the media database. - /// - /// @details The function updates the given media face in the media database. The function should be called after any change in face, to be updated to the media - /// database. For example, after using media_face_set_orientation() for setting the orientation of the face, media_face_update_to_db() function should be called so as to update - /// the given face attributes in the media database. - /// @since_tizen 3.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @param[in] face The media face handle to update - /// - /// @return 0 on success, otherwise a negative error value. - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_face_destroy() - /// @see media_face_set_xxx() - int media_face_update_to_db( - media_face_h face, - ) { - return _media_face_update_to_db( - face, - ); - } - - late final _media_face_update_to_dbPtr = - _lookup>( - 'media_face_update_to_db'); - late final _media_face_update_to_db = - _media_face_update_to_dbPtr.asFunction(); - - /// @brief Deletes the face with given face id from the media database. - /// - /// @since_tizen 3.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write - /// - /// @param[in] face_id The ID of the media face - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @see media_content_connect() - int media_face_delete_from_db( - ffi.Pointer face_id, - ) { - return _media_face_delete_from_db( - face_id, - ); - } - - late final _media_face_delete_from_dbPtr = - _lookup)>>( - 'media_face_delete_from_db'); - late final _media_face_delete_from_db = _media_face_delete_from_dbPtr - .asFunction)>(); - - /// @brief Gets the number of media faces with an optional filter from the media database. - /// @since_tizen 4.0 - /// - /// @param[in] filter The handle to the media filter - /// @param[out] face_count The count of the media faces - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// - /// @see media_content_connect() - /// @see media_filter_create() - int media_face_get_face_count_from_db( - filter_h filter, - ffi.Pointer face_count, - ) { - return _media_face_get_face_count_from_db( - filter, - face_count, - ); - } - - late final _media_face_get_face_count_from_dbPtr = _lookup< - ffi.NativeFunction)>>( - 'media_face_get_face_count_from_db'); - late final _media_face_get_face_count_from_db = - _media_face_get_face_count_from_dbPtr - .asFunction)>(); - - /// @brief Iterates through the faces with an optional filter from the media database. - /// @details This function gets all faces associated with the given filter and calls @a callback for every retrieved media face. - /// If @c NULL is passed to the @a filter, then no filtering is applied. - /// @since_tizen 4.0 - /// - /// @param[in] filter The handle to the media filter - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @post This function invokes media_face_cb(). - /// - /// @see media_content_connect() - /// @see media_face_cb() - /// @see media_filter_create() - int media_face_foreach_face_from_db( - filter_h filter, - media_face_cb callback, - ffi.Pointer user_data, - ) { - return _media_face_foreach_face_from_db( - filter, - callback, - user_data, - ); - } - - late final _media_face_foreach_face_from_dbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filter_h, media_face_cb, - ffi.Pointer)>>('media_face_foreach_face_from_db'); - late final _media_face_foreach_face_from_db = - _media_face_foreach_face_from_dbPtr.asFunction< - int Function(filter_h, media_face_cb, ffi.Pointer)>(); - - /// @brief Connects to the media content service. - /// @details Any media content related function call should be invoked after this function call. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed - /// - /// @post media_content_disconnect() - /// - /// @see media_content_disconnect() - int media_content_connect() { - return _media_content_connect(); - } - - late final _media_content_connectPtr = - _lookup>('media_content_connect'); - late final _media_content_connect = - _media_content_connectPtr.asFunction(); - - /// @brief Disconnects from the media content service. - /// @details This function closes connection to the media content service. Any further media content related operation - /// cannot be performed after this function is called. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed - /// - /// @pre media_content_connect() - /// - /// @see media_content_connect() - int media_content_disconnect() { - return _media_content_disconnect(); - } - - late final _media_content_disconnectPtr = - _lookup>( - 'media_content_disconnect'); - late final _media_content_disconnect = - _media_content_disconnectPtr.asFunction(); - - /// @brief Requests to scan a media file. - /// @details This function requests to scan a media file to the media server. - /// If media file is not registered to DB yet, that media file information will be added to the media DB. If it is already registered to the DB, then this tries to refresh information. \n - /// If requested file does not exist on file system, information of the media file will be removed from the media DB. \n - /// If file information does not exist in DB, this function will be return #MEDIA_CONTENT_ERROR_INVALID_PARAMETER. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write \n - /// %http://tizen.org/privilege/mediastorage \n - /// %http://tizen.org/privilege/externalstorage - /// - /// @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n - /// If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage. \n - /// Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage. \n - /// If you can access both storage, you must add all privilege. \n - /// Since 4.0, This function does not allow a symbolic link.\n - /// @remarks Since 4.0, this function is related to the following feature:\n - /// %http://tizen.org/feature/content.scanning.others\n - /// If this feature is not supported on the device, MEDIA_CONTENT_TYPE_OTHERS type file is not scanned. - /// - /// @param[in] path The file path - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @see media_content_connect() - int media_content_scan_file( - ffi.Pointer path, - ) { - return _media_content_scan_file( - path, - ); - } - - late final _media_content_scan_filePtr = - _lookup)>>( - 'media_content_scan_file'); - late final _media_content_scan_file = _media_content_scan_filePtr - .asFunction)>(); - - /// @brief Requests to scan a media folder, asynchronously. - /// @details This function requests to scan a media folder to the media server with given completed callback function. - /// media_scan_completed_cb() function will be called when the scanning is finished. - /// The sub folders are also scanned, if there are sub folders in that folder. \n - /// If any folder must not be scanned, a blank file ".scan_ignore" has to be created in that folder. - /// After adding or removing a folder from the filesystem, call this function on its source location - /// (this will add or remove an entry from the database). \n - /// After moving or renaming a folder in the filesystem, call this function on its source location - /// (this will remove an entry from the database) and call this function again on its destination location - /// (this will add a new entry to the database).\n - /// Alternatively, you can call this function on any parent of source location and on any parent of destination location.\n - /// You can also call the function once, on a folder which is a parent of both source and destination.\n - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/content.write \n - /// %http://tizen.org/privilege/mediastorage \n - /// %http://tizen.org/privilege/externalstorage - /// - /// @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n - /// If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage. \n - /// Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage. \n - /// If you can access both storage, you must add all privilege. \n - /// Since 4.0, This function does not allow a symbolic link. - /// - /// @param[in] path The folder path - /// @param[in] is_recursive Set @c true to scan recursively subdirectories, - /// otherwise @c false to scan only the current directory - /// @param[in] callback The callback to be invoked when the scanning is finished - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - /// @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - /// @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - /// - /// @pre This function requires opened connection to content service by media_content_connect(). - /// @see media_scan_completed_cb() - /// @see media_content_connect() - int media_content_scan_folder( - ffi.Pointer path, - bool is_recursive, - media_scan_completed_cb callback, - ffi.Pointer user_data, - ) { - return _media_content_scan_folder( - path, - is_recursive, - callback, - user_data, - ); - } - - late final _media_content_scan_folderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Bool, - media_scan_completed_cb, - ffi.Pointer)>>('media_content_scan_folder'); - late final _media_content_scan_folder = - _media_content_scan_folderPtr.asFunction< - int Function(ffi.Pointer, bool, media_scan_completed_cb, - ffi.Pointer)>(); - - /// @brief Requests to cancel the media folder scanning. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] path The folder path - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre media_content_scan_folder() - int media_content_cancel_scan_folder( - ffi.Pointer path, - ) { - return _media_content_cancel_scan_folder( - path, - ); - } - - late final _media_content_cancel_scan_folderPtr = - _lookup)>>( - 'media_content_cancel_scan_folder'); - late final _media_content_cancel_scan_folder = - _media_content_cancel_scan_folderPtr - .asFunction)>(); - - /// @brief Subscribes notifications of the media DB change. - /// @details This function subscribes notifications of the media DB change which are published by the media server or other apps. \n - /// media_content_db_update_cb() function will be called when notification of the media DB change is subscribed. \n - /// Using this function, multiple callback is possible to register in one process. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a noti_handle should be released using media_content_remove_db_updated_cb(). \n - /// If you set the same callback that you previously added, this function returns MEDIA_CONTENT_ERROR_INVALID_OPERATION error. \n - /// - /// @param[in] callback The callback to be invoked when the scanning is finished - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] noti_handle The handle to db updated notification - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see media_content_db_update_cb() - /// @see media_content_remove_db_updated_cb() - int media_content_add_db_updated_cb( - media_content_db_update_cb callback, - ffi.Pointer user_data, - ffi.Pointer noti_handle, - ) { - return _media_content_add_db_updated_cb( - callback, - user_data, - noti_handle, - ); - } - - late final _media_content_add_db_updated_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_content_db_update_cb, - ffi.Pointer, ffi.Pointer)>>( - 'media_content_add_db_updated_cb'); - late final _media_content_add_db_updated_cb = - _media_content_add_db_updated_cbPtr.asFunction< - int Function(media_content_db_update_cb, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Removes notifications of the media DB change. - /// @details This function unsubscribes notifications of the media DB change which are published by the media server or other apps. - /// - /// @since_tizen 3.0 - /// - /// @param[in] noti_handle The handle to db updated notification - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTENT_ERROR_NONE Successful - /// @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre media_content_add_db_updated_cb() - /// - /// @see media_content_add_db_updated_cb() - int media_content_remove_db_updated_cb( - media_content_noti_h noti_handle, - ) { - return _media_content_remove_db_updated_cb( - noti_handle, - ); - } - - late final _media_content_remove_db_updated_cbPtr = - _lookup>( - 'media_content_remove_db_updated_cb'); - late final _media_content_remove_db_updated_cb = - _media_content_remove_db_updated_cbPtr - .asFunction(); - - /// @brief Check whether the activity is supported or not. - /// @details Check if the given activity type is supported in the current device. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] activity Activity type to be checked - /// @param[out] supported @c true if the activity is recognizable in the current device,@n - /// @c false otherwise - /// - /// @return @c 0 if the @c activity is supported, otherwise a negative error value - /// @retval #ACTIVITY_ERROR_NONE Supported - /// @retval #ACTIVITY_ERROR_INVALID_PARAMETER Invalid parameter used - /// @retval #ACTIVITY_ERROR_NOT_SUPPORTED The @c activity is not supported - /// @retval #ACTIVITY_ERROR_OPERATION_FAILED Operation failed because of a system error - /// @retval #ACTIVITY_ERROR_PERMISSION_DENIED Does not have permission to use this - int activity_is_supported( - int activity, - ffi.Pointer supported, - ) { - return _activity_is_supported( - activity, - supported, - ); - } - - late final _activity_is_supportedPtr = _lookup< - ffi - .NativeFunction)>>( - 'activity_is_supported'); - late final _activity_is_supported = _activity_is_supportedPtr - .asFunction)>(); - - /// @brief Initializes an activity handle. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[out] handle Activity handle to be initialized - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #ACTIVITY_ERROR_NONE Successful - /// @retval #ACTIVITY_ERROR_INVALID_PARAMETER Invalid parameter used - /// @retval #ACTIVITY_ERROR_NOT_SUPPORTED Activity recognition is not supported - /// @retval #ACTIVITY_ERROR_OPERATION_FAILED Operation failed because of a system error, e.g., out of memory - /// - /// @see activity_release() - int activity_create( - ffi.Pointer handle, - ) { - return _activity_create( - handle, - ); - } - - late final _activity_createPtr = - _lookup)>>( - 'activity_create'); - late final _activity_create = - _activity_createPtr.asFunction)>(); - - /// @brief Releases the resources occupied by the activity handle. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] handle Activity handle to be released - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #ACTIVITY_ERROR_NONE Successful - /// @retval #ACTIVITY_ERROR_INVALID_PARAMETER Invalid parameter used - /// @retval #ACTIVITY_ERROR_NOT_SUPPORTED Activity recognition is not supported - /// @retval #ACTIVITY_ERROR_OPERATION_FAILED Operation failed because of a system error - /// - /// @pre activity_create() - int activity_release( - activity_h handle, - ) { - return _activity_release( - handle, - ); - } - - late final _activity_releasePtr = - _lookup>( - 'activity_release'); - late final _activity_release = - _activity_releasePtr.asFunction(); - - /// @brief Starts to recognize an activity. - /// @details Sets a callback function to be invoked when the activity is detected, - /// and starts to monitor occurrences of the activity. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] handle Activity handle to be used to control the activity event - /// @param[in] activity Activity type to be monitored - /// @param[in] callback Callback function to receive activity events - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #ACTIVITY_ERROR_NONE Successful - /// @retval #ACTIVITY_ERROR_INVALID_PARAMETER Invalid parameter used - /// @retval #ACTIVITY_ERROR_NOT_SUPPORTED Activity recognition is not supported - /// @retval #ACTIVITY_ERROR_ALREADY_STARTED The @c handle is being used already - /// @retval #ACTIVITY_ERROR_OPERATION_FAILED Operation failed because of a system error - /// @retval #ACTIVITY_ERROR_PERMISSION_DENIED Does not have permission to use this - /// - /// @pre activity_create() - /// @post activity_recognition_cb() - /// @see activity_stop_recognition() - int activity_start_recognition( - activity_h handle, - int activity, - activity_recognition_cb callback, - ffi.Pointer user_data, - ) { - return _activity_start_recognition( - handle, - activity, - callback, - user_data, - ); - } - - late final _activity_start_recognitionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(activity_h, ffi.Int32, activity_recognition_cb, - ffi.Pointer)>>('activity_start_recognition'); - late final _activity_start_recognition = - _activity_start_recognitionPtr.asFunction< - int Function(activity_h, int, activity_recognition_cb, - ffi.Pointer)>(); - - /// @brief Stops recognizing the activity registered to the activity handle. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] handle Activity handle to release its callback function registered - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #ACTIVITY_ERROR_NONE Successful - /// @retval #ACTIVITY_ERROR_INVALID_PARAMETER Invalid parameter used - /// @retval #ACTIVITY_ERROR_NOT_SUPPORTED Activity recognition is not supported - /// @retval #ACTIVITY_ERROR_NOT_STARTED Nothing is started using the @c handle - /// @retval #ACTIVITY_ERROR_OPERATION_FAILED Operation failed because of a system error - int activity_stop_recognition( - activity_h handle, - ) { - return _activity_stop_recognition( - handle, - ); - } - - late final _activity_stop_recognitionPtr = - _lookup>( - 'activity_stop_recognition'); - late final _activity_stop_recognition = - _activity_stop_recognitionPtr.asFunction(); - - /// @brief Gets the recognition accuracy. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] data Activity data received through activity_cb() - /// @param[out] accuracy Accuracy - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #ACTIVITY_ERROR_NONE Successful - /// @retval #ACTIVITY_ERROR_INVALID_PARAMETER Invalid parameter used - /// @retval #ACTIVITY_ERROR_NOT_SUPPORTED Activity recognition is not supported - /// @retval #ACTIVITY_ERROR_OPERATION_FAILED Operation failed because of a system error - int activity_get_accuracy( - activity_data_h data, - ffi.Pointer accuracy, - ) { - return _activity_get_accuracy( - data, - accuracy, - ); - } - - late final _activity_get_accuracyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(activity_data_h, - ffi.Pointer)>>('activity_get_accuracy'); - late final _activity_get_accuracy = _activity_get_accuracyPtr - .asFunction)>(); - - /// @brief Creates a context history handle. - /// @since_tizen 2.4 - /// @remarks The @c handle must be released using context_history_destroy(). - /// - /// @param[out] handle Handle to be initialized - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_HISTORY_ERROR_NONE Successful - /// @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_HISTORY_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_HISTORY_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see context_history_destroy() - int context_history_create( - ffi.Pointer handle, - ) { - return _context_history_create( - handle, - ); - } - - late final _context_history_createPtr = _lookup< - ffi.NativeFunction)>>( - 'context_history_create'); - late final _context_history_create = _context_history_createPtr - .asFunction)>(); - - /// @brief Releases the resources occupied by a handle. - /// @details This releases the memory allocated for the @c handle. - /// - /// @since_tizen 2.4 - /// - /// @param[in] handle Handle to be released - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_HISTORY_ERROR_NONE Successful - /// @retval #CONTEXT_HISTORY_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre context_history_create() - int context_history_destroy( - context_history_h handle, - ) { - return _context_history_destroy( - handle, - ); - } - - late final _context_history_destroyPtr = - _lookup>( - 'context_history_destroy'); - late final _context_history_destroy = - _context_history_destroyPtr.asFunction(); - - /// @brief Creates a history filter. - /// @since_tizen 2.4 - /// @remarks The @c filter must be released using context_history_filter_destroy(). - /// - /// @param[out] filter Filter handle to be initialized - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_HISTORY_ERROR_NONE Successful - /// @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_HISTORY_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_HISTORY_ERROR_OUT_OF_MEMORY Memory allocation failed - /// - /// @see context_history_filter_destroy() - int context_history_filter_create( - ffi.Pointer filter, - ) { - return _context_history_filter_create( - filter, - ); - } - - late final _context_history_filter_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'context_history_filter_create'); - late final _context_history_filter_create = _context_history_filter_createPtr - .asFunction)>(); - - /// @brief Releases the resources occupied by a filter. - /// @details This releases the memory allocated for the @c filter. - /// @since_tizen 2.4 - /// - /// @param[in] filter Filter handle to be released - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_HISTORY_ERROR_NONE Successful - /// @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_HISTORY_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre context_history_filter_create() - int context_history_filter_destroy( - context_history_filter_h filter, - ) { - return _context_history_filter_destroy( - filter, - ); - } - - late final _context_history_filter_destroyPtr = - _lookup>( - 'context_history_filter_destroy'); - late final _context_history_filter_destroy = - _context_history_filter_destroyPtr - .asFunction(); - - /// @brief Sets an integer value to a filter. - /// @details This sets the value to a filter. - /// @since_tizen 2.4 - /// - /// @param[in] filter The filter handle - /// @param[in] filter_type The filter type to set - /// @param[in] value The value to be set - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_HISTORY_ERROR_NONE Successful - /// @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_HISTORY_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre context_history_filter_create() - /// @see context_history_filter_set_string() - int context_history_filter_set_int( - context_history_filter_h filter, - int filter_type, - int value, - ) { - return _context_history_filter_set_int( - filter, - filter_type, - value, - ); - } - - late final _context_history_filter_set_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(context_history_filter_h, ffi.Int32, - ffi.Int)>>('context_history_filter_set_int'); - late final _context_history_filter_set_int = - _context_history_filter_set_intPtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. - /// @brief Sets a string to a filter. - /// @details This sets the value to a filter. - /// @since_tizen 2.4 - /// - /// @param[in] filter The filter handle - /// @param[in] filter_type The filter type to set - /// @param[in] value The value to be set - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_HISTORY_ERROR_NONE Successful - /// @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_HISTORY_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre context_history_filter_create() - /// @see context_history_filter_set_int() - int context_history_filter_set_string( - context_history_filter_h filter, - int filter_type, - ffi.Pointer value, - ) { - return _context_history_filter_set_string( - filter, - filter_type, - value, - ); - } - - late final _context_history_filter_set_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(context_history_filter_h, ffi.Int32, - ffi.Pointer)>>('context_history_filter_set_string'); - late final _context_history_filter_set_string = - _context_history_filter_set_stringPtr.asFunction< - int Function(context_history_filter_h, int, ffi.Pointer)>(); - - /// @brief Checks whether a history data type is supported in the current device. - /// @since_tizen 4.0 - /// - /// @param[in] data_type Type of history data - /// @param[out] supported If supported, @c true, otherwise @c false - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_HISTORY_ERROR_NONE Successful - /// @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_HISTORY_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_HISTORY_ERROR_OPERATION_FAILED Operation failed - int context_history_is_supported( - int data_type, - ffi.Pointer supported, - ) { - return _context_history_is_supported( - data_type, - supported, - ); - } - - late final _context_history_is_supportedPtr = _lookup< - ffi - .NativeFunction)>>( - 'context_history_is_supported'); - late final _context_history_is_supported = _context_history_is_supportedPtr - .asFunction)>(); - - /// @brief Reads context statistics or patterns. - /// @details Retrieves a given type of context statistics or patterns list. - /// See the programming guide to find available filter type #context_history_filter_e@n - /// for each context data type #context_history_data_e. - /// @since_tizen 2.4 - /// - /// @remarks The @c list must be released using context_history_list_destroy(). \n - /// %http://tizen.org/privilege/apphistory.read or %http://tizen.org/privilege/mediahistory.read - /// is needed to retrieve data. It depends on context data type #context_history_data_e. - /// - /// @param[in] handle Handle for controlling the context history data requests - /// @param[in] data_type Type of the history data - /// @param[in] filter Filter to be used to compute statistics or patterns. This can not be @c NULL - /// @param[out] list History data retrieved. This should be freed after use - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_HISTORY_ERROR_NONE Successful - /// @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_HISTORY_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONTEXT_HISTORY_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_HISTORY_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONTEXT_HISTORY_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTEXT_HISTORY_ERROR_NO_DATA Requested data does not exist - /// - /// @pre context_history_create() - /// @post context_history_list_destroy() - int context_history_get_list( - context_history_h handle, - int data_type, - context_history_filter_h filter, - ffi.Pointer list, - ) { - return _context_history_get_list( - handle, - data_type, - filter, - list, - ); - } - - late final _context_history_get_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - context_history_h, - ffi.Int32, - context_history_filter_h, - ffi.Pointer)>>( - 'context_history_get_list'); - late final _context_history_get_list = - _context_history_get_listPtr.asFunction< - int Function(context_history_h, int, context_history_filter_h, - ffi.Pointer)>(); - - /// @brief Retrieves the number of records in a list. - /// @since_tizen 2.4 - /// - /// @param[in] list The history data list handle - /// @param[out] count The count of the data list - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_HISTORY_ERROR_NONE Successful - /// @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_HISTORY_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_HISTORY_ERROR_OPERATION_FAILED Operation failed - /// - /// @pre context_history_get_list() - /// @see context_history_list_move_first() - /// @see context_history_list_move_next() - int context_history_list_get_count( - context_history_list_h list, - ffi.Pointer count, - ) { - return _context_history_list_get_count( - list, - count, - ); - } - - late final _context_history_list_get_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(context_history_list_h, - ffi.Pointer)>>('context_history_list_get_count'); - late final _context_history_list_get_count = - _context_history_list_get_countPtr.asFunction< - int Function(context_history_list_h, ffi.Pointer)>(); - - /// @brief Retrieves the current record from the history list. - /// @details The default current record is the first record. - /// @since_tizen 2.4 - /// @remarks The @c record must be released using context_history_record_destroy(). - /// - /// @param[in] list The context history list handle - /// @param[out] record History data record retrieved - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_HISTORY_ERROR_NONE Successful - /// @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_HISTORY_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_HISTORY_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONTEXT_HISTORY_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @pre context_history_get_list() - /// @post context_history_record_destroy() - int context_history_list_get_current( - context_history_list_h list, - ffi.Pointer record, - ) { - return _context_history_list_get_current( - list, - record, - ); - } - - late final _context_history_list_get_currentPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(context_history_list_h, - ffi.Pointer)>>( - 'context_history_list_get_current'); - late final _context_history_list_get_current = - _context_history_list_get_currentPtr.asFunction< - int Function( - context_history_list_h, ffi.Pointer)>(); - - /// @brief Moves a history data list to the first position. - /// @since_tizen 2.4 - /// - /// @param[in] list The context history list handle - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_HISTORY_ERROR_NONE Successful - /// @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_HISTORY_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre context_history_get_list() - /// @see context_history_list_get_count() - /// @see context_history_list_move_next() - int context_history_list_move_first( - context_history_list_h list, - ) { - return _context_history_list_move_first( - list, - ); - } - - late final _context_history_list_move_firstPtr = - _lookup>( - 'context_history_list_move_first'); - late final _context_history_list_move_first = - _context_history_list_move_firstPtr - .asFunction(); - - /// @brief Moves a history data list to the next position. - /// @since_tizen 2.4 - /// - /// @param[in] list The context history list handle - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_HISTORY_ERROR_NONE Successful - /// @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_HISTORY_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_HISTORY_ERROR_NO_DATA Requested data does not exist - /// - /// @pre context_history_get_list() - /// @see context_history_list_get_count() - /// @see context_history_list_move_first() - int context_history_list_move_next( - context_history_list_h list, - ) { - return _context_history_list_move_next( - list, - ); - } - - late final _context_history_list_move_nextPtr = - _lookup>( - 'context_history_list_move_next'); - late final _context_history_list_move_next = - _context_history_list_move_nextPtr - .asFunction(); - - /// @brief Destroys a history list handle and release all its resources. - /// @since_tizen 2.4 - /// - /// @param[in] list The context history data handle - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_HISTORY_ERROR_NONE Successful - /// @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_HISTORY_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre context_history_get_list() - int context_history_list_destroy( - context_history_list_h list, - ) { - return _context_history_list_destroy( - list, - ); - } - - late final _context_history_list_destroyPtr = - _lookup>( - 'context_history_list_destroy'); - late final _context_history_list_destroy = _context_history_list_destroyPtr - .asFunction(); - - /// @brief Gets an integer value from a record. - /// @details See the programming guide to find available attribute keys@n - /// for each context data #context_history_data_e. - /// @since_tizen 2.4 - /// - /// @param[in] record The record handle - /// @param[in] key The key of attribute to get - /// @param[out] value The result value - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_HISTORY_ERROR_NONE Successful - /// @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_HISTORY_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre context_history_list_get_current() - /// @see context_history_record_get_double() - /// @see context_history_record_get_string() - int context_history_record_get_int( - context_history_record_h record, - ffi.Pointer key, - ffi.Pointer value, - ) { - return _context_history_record_get_int( - record, - key, - value, - ); - } - - late final _context_history_record_get_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(context_history_record_h, ffi.Pointer, - ffi.Pointer)>>('context_history_record_get_int'); - late final _context_history_record_get_int = - _context_history_record_get_intPtr.asFunction< - int Function(context_history_record_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets a string from a record. - /// @details See the programming guide to find available attribute keys@n - /// for each context data #context_history_data_e. - /// @since_tizen 2.4 - /// @remarks @c value must be released using free(). - /// - /// @param[in] record The record handle - /// @param[in] key The key of attribute to get - /// @param[out] value The result value - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_HISTORY_ERROR_NONE Successful - /// @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_HISTORY_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre context_history_list_get_current() - /// @see context_history_record_get_int() - /// @see context_history_record_get_double() - int context_history_record_get_string( - context_history_record_h record, - ffi.Pointer key, - ffi.Pointer> value, - ) { - return _context_history_record_get_string( - record, - key, - value, - ); - } - - late final _context_history_record_get_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(context_history_record_h, ffi.Pointer, - ffi.Pointer>)>>( - 'context_history_record_get_string'); - late final _context_history_record_get_string = - _context_history_record_get_stringPtr.asFunction< - int Function(context_history_record_h, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets a double-precision value from a record. - /// @details See the programming guide to find available attribute keys@n - /// for each context data #context_history_data_e. - /// @since_tizen 3.0 - /// - /// @param[in] record The record handle - /// @param[in] key The key of the attribute to get - /// @param[out] value The result value - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_HISTORY_ERROR_NONE Successful - /// @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_HISTORY_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre context_history_list_get_current() - /// @see context_history_record_get_int() - /// @see context_history_record_get_string() - int context_history_record_get_double( - context_history_record_h record, - ffi.Pointer key, - ffi.Pointer value, - ) { - return _context_history_record_get_double( - record, - key, - value, - ); - } - - late final _context_history_record_get_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(context_history_record_h, ffi.Pointer, - ffi.Pointer)>>('context_history_record_get_double'); - late final _context_history_record_get_double = - _context_history_record_get_doublePtr.asFunction< - int Function(context_history_record_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Destroys a record handle and releases all its resources. - /// @since_tizen 2.4 - /// - /// @param[in] record The record handle - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_HISTORY_ERROR_NONE Successful - /// @retval #CONTEXT_HISTORY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_HISTORY_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre context_history_list_get_current() - int context_history_record_destroy( - context_history_record_h record, - ) { - return _context_history_record_destroy( - record, - ); - } - - late final _context_history_record_destroyPtr = - _lookup>( - 'context_history_record_destroy'); - late final _context_history_record_destroy = - _context_history_record_destroyPtr - .asFunction(); - - /// @brief Registers a rule. - /// @details Using this, applications can register a rule and get the ID of the registered rule.@n - /// A rule can only be enabled, disabled, or removed by the application that has registered the rule. - /// @since_tizen 2.4 - /// - /// @remarks When registering a new rule, regarding the event and condition items used to compose the rule, - /// the application may require one or more privileges. - /// For details, see context_trigger_rule_event_create() and context_trigger_rule_condition_create(). - /// - /// @param[in] rule The rule to register - /// @param[out] rule_id The ID assigned to the @a rule - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTEXT_TRIGGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_RULE Invalid rule - /// - /// @see context_trigger_remove_rule() - int context_trigger_add_rule( - context_trigger_rule_h rule, - ffi.Pointer rule_id, - ) { - return _context_trigger_add_rule( - rule, - rule_id, - ); - } - - late final _context_trigger_add_rulePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(context_trigger_rule_h, - ffi.Pointer)>>('context_trigger_add_rule'); - late final _context_trigger_add_rule = _context_trigger_add_rulePtr - .asFunction)>(); - - /// @brief Removes a rule. - /// @details This removes the rule designated by the @a rule_id, which is owned by the application. - /// @since_tizen 2.4 - /// - /// @remarks If the rule has been activated, it should be disabled through context_trigger_disable_rule() in advance. - /// - /// @param[in] rule_id The ID of the rule to be removed - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTEXT_TRIGGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONTEXT_TRIGGER_ERROR_RULE_ENABLED Rule is enabled already - /// @retval #CONTEXT_TRIGGER_ERROR_RULE_NOT_EXIST Rule does not exist - /// - /// @see context_trigger_add_rule() - int context_trigger_remove_rule( - int rule_id, - ) { - return _context_trigger_remove_rule( - rule_id, - ); - } - - late final _context_trigger_remove_rulePtr = - _lookup>( - 'context_trigger_remove_rule'); - late final _context_trigger_remove_rule = - _context_trigger_remove_rulePtr.asFunction(); - - /// @brief Enables a rule. - /// @details This activates the rule designated by the @a rule_id, which is owned by the application. - /// @since_tizen 2.4 - /// - /// @param[in] rule_id The ID of the rule to be enabled - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTEXT_TRIGGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONTEXT_TRIGGER_ERROR_RULE_ENABLED Rule is enabled already - /// @retval #CONTEXT_TRIGGER_ERROR_RULE_NOT_EXIST Rule does not exist - /// - /// @see context_trigger_disable_rule() - int context_trigger_enable_rule( - int rule_id, - ) { - return _context_trigger_enable_rule( - rule_id, - ); - } - - late final _context_trigger_enable_rulePtr = - _lookup>( - 'context_trigger_enable_rule'); - late final _context_trigger_enable_rule = - _context_trigger_enable_rulePtr.asFunction(); - - /// @brief Disables a rule. - /// @details This deactivates the rule designated by the @a rule_id, which is owned by the application. - /// @since_tizen 2.4 - /// - /// @param[in] rule_id The ID of the rule to be disabled - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_TRIGGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONTEXT_TRIGGER_ERROR_RULE_NOT_ENABLED Rule is not enabled - /// @retval #CONTEXT_TRIGGER_ERROR_RULE_NOT_EXIST Rule does not exist - /// - /// @see context_trigger_enable_rule() - int context_trigger_disable_rule( - int rule_id, - ) { - return _context_trigger_disable_rule( - rule_id, - ); - } - - late final _context_trigger_disable_rulePtr = - _lookup>( - 'context_trigger_disable_rule'); - late final _context_trigger_disable_rule = - _context_trigger_disable_rulePtr.asFunction(); - - /// @brief Gets the IDs of the rules owned by the current application. - /// @since_tizen 2.4 - /// - /// @remarks The arrays @a enabled_rule_ids and @a disabled_rule_ids must be released using @c free(). - /// - /// @param[out] enabled_rule_ids The IDs of the active rules - /// @param[out] enabled_rule_count The number of the active rules - /// @param[out] disabled_rule_ids The IDs of the inactive rules - /// @param[out] disabled_rule_count The number of the inactive rules - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_TRIGGER_ERROR_OPERATION_FAILED Operation failed - int context_trigger_get_own_rule_ids( - ffi.Pointer> enabled_rule_ids, - ffi.Pointer enabled_rule_count, - ffi.Pointer> disabled_rule_ids, - ffi.Pointer disabled_rule_count, - ) { - return _context_trigger_get_own_rule_ids( - enabled_rule_ids, - enabled_rule_count, - disabled_rule_ids, - disabled_rule_count, - ); - } - - late final _context_trigger_get_own_rule_idsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('context_trigger_get_own_rule_ids'); - late final _context_trigger_get_own_rule_ids = - _context_trigger_get_own_rule_idsPtr.asFunction< - int Function(ffi.Pointer>, ffi.Pointer, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Gets a rule stored in the system by rule ID. - /// @since_tizen 2.4 - /// - /// @remarks The @a rule must be released using context_trigger_rule_destroy(). - /// - /// @param[in] rule_id The ID of the rule to be retrieved - /// @param[out] rule The rule retrieved - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_TRIGGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONTEXT_TRIGGER_ERROR_RULE_NOT_EXIST Rule does not exist - int context_trigger_get_rule_by_id( - int rule_id, - ffi.Pointer rule, - ) { - return _context_trigger_get_rule_by_id( - rule_id, - rule, - ); - } - - late final _context_trigger_get_rule_by_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer)>>( - 'context_trigger_get_rule_by_id'); - late final _context_trigger_get_rule_by_id = - _context_trigger_get_rule_by_idPtr - .asFunction)>(); - - /// @brief Creates an empty rule. - /// @details An empty rule container is created. When using this, - /// a logical operator, one of #context_trigger_logical_type_e, needs to be designated.@n - /// In case of #CONTEXT_TRIGGER_LOGICAL_CONJUNCTION, - /// the rule can be satisfied only if all conditions are true. - /// Otherwise, in case of #CONTEXT_TRIGGER_LOGICAL_DISJUNCTION, - /// the rule can be satisfied if at least one is true. - /// @since_tizen 2.4 - /// - /// @remarks The @a rule must be released using context_trigger_rule_destroy(). - /// - /// @param[in] logical_type The logical operator - /// @param[out] rule The rule handle to be initialized - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Memory allocation failed - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// - /// @see context_trigger_rule_destroy() - int context_trigger_rule_create( - int logical_type, - ffi.Pointer rule, - ) { - return _context_trigger_rule_create( - logical_type, - rule, - ); - } - - late final _context_trigger_rule_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, ffi.Pointer)>>( - 'context_trigger_rule_create'); - late final _context_trigger_rule_create = _context_trigger_rule_createPtr - .asFunction)>(); - - /// @brief Releases the resources occupied by a rule handle. - /// @since_tizen 2.4 - /// - /// @param[in] rule The rule handle to be released - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre context_trigger_rule_create() - /// @see context_trigger_get_rule_by_id() - int context_trigger_rule_destroy( - context_trigger_rule_h rule, - ) { - return _context_trigger_rule_destroy( - rule, - ); - } - - late final _context_trigger_rule_destroyPtr = - _lookup>( - 'context_trigger_rule_destroy'); - late final _context_trigger_rule_destroy = _context_trigger_rule_destroyPtr - .asFunction(); - - /// @brief Adds an event or a condition to a rule. - /// @since_tizen 2.4 - /// - /// @param[in] rule The rule - /// @param[in] entry The event or condition entry to be added to the rule - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_TRIGGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_RULE Invalid rule - int context_trigger_rule_add_entry( - context_trigger_rule_h rule, - context_trigger_rule_entry_h entry, - ) { - return _context_trigger_rule_add_entry( - rule, - entry, - ); - } - - late final _context_trigger_rule_add_entryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(context_trigger_rule_h, - context_trigger_rule_entry_h)>>('context_trigger_rule_add_entry'); - late final _context_trigger_rule_add_entry = - _context_trigger_rule_add_entryPtr.asFunction< - int Function(context_trigger_rule_h, context_trigger_rule_entry_h)>(); - - /// @brief Sets a app launching request as the action of a rule. - /// @details Contextual Trigger accepts an App Control as the action of a rule, - /// an application thus can be launched when the rule is satisfied.@n - /// @since_tizen 2.4 - /// - /// @privlevel public - /// @privilege http://tizen.org/privilege/appmanager.launch - /// - /// @remarks In addition to the privilege http://tizen.org/privilege/appmanager.launch, - /// if it is an App Control that makes a call to someone, - /// the privilege http://tizen.org/privilege/call is also required. - /// @remarks The launch request of the service application is restricted. - /// The function will return #CONTEXT_TRIGGER_ERROR_INVALID_RULE, - /// if the launch request is for the service application. - /// - /// @param[in] rule The rule - /// @param[in] app_control The App Control, which will be used to launch an application - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_TRIGGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_RULE Invalid rule - int context_trigger_rule_set_action_app_control( - context_trigger_rule_h rule, - app_control_h app_control, - ) { - return _context_trigger_rule_set_action_app_control( - rule, - app_control, - ); - } - - late final _context_trigger_rule_set_action_app_controlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(context_trigger_rule_h, - app_control_h)>>('context_trigger_rule_set_action_app_control'); - late final _context_trigger_rule_set_action_app_control = - _context_trigger_rule_set_action_app_controlPtr - .asFunction(); - - /// @brief Sets a notification posting request as the action of a rule. - /// @details A basic notification can be posted when the rule is satisfied, - /// which consists of the title, a content body text, an icon, and an App Control. - /// @since_tizen 2.4 - /// - /// @privlevel public - /// @privilege http://tizen.org/privilege/notification - /// - /// @remarks The @a app_control can be @c NULL. In that case, no application will be launched via the notification. - /// - /// @param[in] rule The rule - /// @param[in] title The title text - /// @param[in] content The content body text - /// @param[in] icon_path The icon file path - /// @param[in] app_control The app control - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_TRIGGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_RULE Invalid rule - int context_trigger_rule_set_action_notification( - context_trigger_rule_h rule, - ffi.Pointer title, - ffi.Pointer content, - ffi.Pointer icon_path, - app_control_h app_control, - ) { - return _context_trigger_rule_set_action_notification( - rule, - title, - content, - icon_path, - app_control, - ); - } - - late final _context_trigger_rule_set_action_notificationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - context_trigger_rule_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - app_control_h)>>('context_trigger_rule_set_action_notification'); - late final _context_trigger_rule_set_action_notification = - _context_trigger_rule_set_action_notificationPtr.asFunction< - int Function(context_trigger_rule_h, ffi.Pointer, - ffi.Pointer, ffi.Pointer, app_control_h)>(); - - /// @brief Sets the description of a rule. - /// @since_tizen 2.4 - /// - /// @param[in] rule The rule - /// @param[in] description The description to be set - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_TRIGGER_ERROR_OPERATION_FAILED Operation failed - /// - /// @see context_trigger_rule_get_description() - int context_trigger_rule_set_description( - context_trigger_rule_h rule, - ffi.Pointer description, - ) { - return _context_trigger_rule_set_description( - rule, - description, - ); - } - - late final _context_trigger_rule_set_descriptionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(context_trigger_rule_h, - ffi.Pointer)>>('context_trigger_rule_set_description'); - late final _context_trigger_rule_set_description = - _context_trigger_rule_set_descriptionPtr.asFunction< - int Function(context_trigger_rule_h, ffi.Pointer)>(); - - /// @brief Gets the description of a rule. - /// @since_tizen 2.4 - /// - /// @remarks The @a description must be released using @c free(). - /// - /// @param[in] rule The rule - /// @param[out] description The description of the rule - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_TRIGGER_ERROR_OPERATION_FAILED Operation failed - /// - /// @see context_trigger_rule_set_description() - int context_trigger_rule_get_description( - context_trigger_rule_h rule, - ffi.Pointer> description, - ) { - return _context_trigger_rule_get_description( - rule, - description, - ); - } - - late final _context_trigger_rule_get_descriptionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - context_trigger_rule_h, ffi.Pointer>)>>( - 'context_trigger_rule_get_description'); - late final _context_trigger_rule_get_description = - _context_trigger_rule_get_descriptionPtr.asFunction< - int Function( - context_trigger_rule_h, ffi.Pointer>)>(); - - /// @brief Creates an event entry. - /// @details An event of a contextual event item, which will be monitored by the system, is created. - /// @since_tizen 2.4 - /// - /// @remarks Regarding the @a event_item, the application may require one of the following privileges:@n - /// http://tizen.org/privilege/alarm.set @n - /// http://tizen.org/privilege/network.get @n - /// http://tizen.org/privilege/telephony @n - /// http://tizen.org/privilege/message.read @n - /// http://tizen.org/privilege/contact.read @n - /// http://tizen.org/privilege/location @n - /// If the application does not have necessary privilege, when registering the corresponding rule, - /// context_trigger_add_rule() will return #CONTEXT_TRIGGER_ERROR_PERMISSION_DENIED. - /// See #context_trigger_event_e to find the corresponding privilege of each event item.@n - /// The @a entry must be released using context_trigger_rule_entry_destroy(). - /// - /// @param[in] event_item The contextual event item - /// @param[in] logical_type The logical operator - /// @param[out] entry The event entry to be initialized - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Memory allocation failed - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// - /// @see context_trigger_rule_entry_destroy() - int context_trigger_rule_event_create( - int event_item, - int logical_type, - ffi.Pointer entry, - ) { - return _context_trigger_rule_event_create( - event_item, - logical_type, - entry, - ); - } - - late final _context_trigger_rule_event_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Int32, - ffi.Pointer)>>( - 'context_trigger_rule_event_create'); - late final _context_trigger_rule_event_create = - _context_trigger_rule_event_createPtr.asFunction< - int Function(int, int, ffi.Pointer)>(); - - /// @brief Checks whether a contextual event is supported in the current device. - /// @since_tizen 2.4 - /// - /// @param[in] event_item The contextual event item - /// @param[out] supported If supported, @c true, otherwise @c false - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - int context_trigger_rule_event_is_supported( - int event_item, - ffi.Pointer supported, - ) { - return _context_trigger_rule_event_is_supported( - event_item, - supported, - ); - } - - late final _context_trigger_rule_event_is_supportedPtr = _lookup< - ffi - .NativeFunction)>>( - 'context_trigger_rule_event_is_supported'); - late final _context_trigger_rule_event_is_supported = - _context_trigger_rule_event_is_supportedPtr - .asFunction)>(); - - /// @brief Creates a condition entry. - /// @details A condition of a contextual condition item is created. - /// @since_tizen 2.4 - /// - /// @remarks Regarding the @a condition_item, the application may require one of the following privileges:@n - /// http://tizen.org/privilege/network.get @n - /// http://tizen.org/privilege/telephony @n - /// http://tizen.org/privilege/apphistory.read @n - /// http://tizen.org/privilege/callhistory.read @n - /// http://tizen.org/privilege/mediahistory.read @n - /// If the application does not have necessary privilege, when registering the corresponding rule, - /// context_trigger_add_rule() will return #CONTEXT_TRIGGER_ERROR_PERMISSION_DENIED. - /// See #context_trigger_condition_e to find the corresponding privilege of each condition item.@n - /// The @a entry must be released using context_trigger_rule_entry_destroy(). - /// - /// @param[in] condition_item The contextual condition item - /// @param[in] logical_type The logical operator - /// @param[out] entry The condition entry to be initialized - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Memory allocation failed - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// - /// @see context_trigger_rule_entry_destroy() - int context_trigger_rule_condition_create( - int condition_item, - int logical_type, - ffi.Pointer entry, - ) { - return _context_trigger_rule_condition_create( - condition_item, - logical_type, - entry, - ); - } - - late final _context_trigger_rule_condition_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Int32, - ffi.Pointer)>>( - 'context_trigger_rule_condition_create'); - late final _context_trigger_rule_condition_create = - _context_trigger_rule_condition_createPtr.asFunction< - int Function(int, int, ffi.Pointer)>(); - - /// @brief Checks whether a contextual condition is supported in the current device. - /// @since_tizen 2.4 - /// - /// @param[in] condition_item The contextual condition item - /// @param[out] supported If supported, @c true, otherwise @c false - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - int context_trigger_rule_condition_is_supported( - int condition_item, - ffi.Pointer supported, - ) { - return _context_trigger_rule_condition_is_supported( - condition_item, - supported, - ); - } - - late final _context_trigger_rule_condition_is_supportedPtr = _lookup< - ffi - .NativeFunction)>>( - 'context_trigger_rule_condition_is_supported'); - late final _context_trigger_rule_condition_is_supported = - _context_trigger_rule_condition_is_supportedPtr - .asFunction)>(); - - /// @brief Releases the resource occupied by an entry. - /// @since_tizen 2.4 - /// - /// @param[in] entry The event or condition entry - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre context_trigger_rule_event_create() - /// @pre context_trigger_rule_condition_create() - int context_trigger_rule_entry_destroy( - context_trigger_rule_entry_h entry, - ) { - return _context_trigger_rule_entry_destroy( - entry, - ); - } - - late final _context_trigger_rule_entry_destroyPtr = _lookup< - ffi.NativeFunction>( - 'context_trigger_rule_entry_destroy'); - late final _context_trigger_rule_entry_destroy = - _context_trigger_rule_entry_destroyPtr - .asFunction(); - - /// @brief Sets an integer type option to an event or condition entry. - /// @details See the programming guide to find available option keys for each event/condition item. - /// @since_tizen 2.4 - /// - /// @param[in] entry The event or condition entry - /// @param[in] option_key The option key - /// @param[in] value The option value - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_RULE Invalid rule - /// - /// @see context_trigger_rule_entry_add_option() - /// @see context_trigger_rule_entry_add_option_string() - int context_trigger_rule_entry_add_option_int( - context_trigger_rule_entry_h entry, - ffi.Pointer option_key, - int value, - ) { - return _context_trigger_rule_entry_add_option_int( - entry, - option_key, - value, - ); - } - - late final _context_trigger_rule_entry_add_option_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(context_trigger_rule_entry_h, ffi.Pointer, - ffi.Int)>>('context_trigger_rule_entry_add_option_int'); - late final _context_trigger_rule_entry_add_option_int = - _context_trigger_rule_entry_add_option_intPtr.asFunction< - int Function( - context_trigger_rule_entry_h, ffi.Pointer, int)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Sets a string type option to an event or condition entry. - /// @details See the programming guide to find available option keys for each event/condition item. - /// @since_tizen 2.4 - /// - /// @param[in] entry The event or condition entry - /// @param[in] option_key The option key - /// @param[in] value The option value - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_RULE Invalid rule - /// - /// @see context_trigger_rule_entry_add_option() - /// @see context_trigger_rule_entry_add_option_int() - int context_trigger_rule_entry_add_option_string( - context_trigger_rule_entry_h entry, - ffi.Pointer option_key, - ffi.Pointer value, - ) { - return _context_trigger_rule_entry_add_option_string( - entry, - option_key, - value, - ); - } - - late final _context_trigger_rule_entry_add_option_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(context_trigger_rule_entry_h, - ffi.Pointer, ffi.Pointer)>>( - 'context_trigger_rule_entry_add_option_string'); - late final _context_trigger_rule_entry_add_option_string = - _context_trigger_rule_entry_add_option_stringPtr.asFunction< - int Function(context_trigger_rule_entry_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Sets an option to a condition entry, which references an attribute that will be extracted from the event. - /// @details See the programming guide to find available option keys for each condition item. - /// @since_tizen 2.4 - /// - /// @param[in] entry The condition entry - /// @param[in] option_key The option key - /// @param[in] event_data_key The event data key of which the corresponding data value will be used as the option parameter - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_RULE Invalid rule - /// - /// @see context_trigger_rule_entry_add_option_int() - /// @see context_trigger_rule_entry_add_option_string() - int context_trigger_rule_entry_add_option( - context_trigger_rule_entry_h entry, - ffi.Pointer option_key, - ffi.Pointer event_data_key, - ) { - return _context_trigger_rule_entry_add_option( - entry, - option_key, - event_data_key, - ); - } - - late final _context_trigger_rule_entry_add_optionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(context_trigger_rule_entry_h, ffi.Pointer, - ffi.Pointer)>>('context_trigger_rule_entry_add_option'); - late final _context_trigger_rule_entry_add_option = - _context_trigger_rule_entry_add_optionPtr.asFunction< - int Function(context_trigger_rule_entry_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Adds an attribute key to an entry. - /// @details The key will be used as the left operand of comparisons. - /// See the programming guide to find available attribute keys for each event/condition item. - /// @since_tizen 2.4 - /// - /// @param[in] entry The event or condition entry - /// @param[in] logical_type The logical operator - /// @param[in] key The attribute key - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_RULE Invalid rule - /// - /// @post context_trigger_rule_entry_add_comparison() - /// @post context_trigger_rule_entry_add_comparison_int() - /// @post context_trigger_rule_entry_add_comparison_string() - int context_trigger_rule_entry_add_key( - context_trigger_rule_entry_h entry, - int logical_type, - ffi.Pointer key, - ) { - return _context_trigger_rule_entry_add_key( - entry, - logical_type, - key, - ); - } - - late final _context_trigger_rule_entry_add_keyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(context_trigger_rule_entry_h, ffi.Int32, - ffi.Pointer)>>('context_trigger_rule_entry_add_key'); - late final _context_trigger_rule_entry_add_key = - _context_trigger_rule_entry_add_keyPtr.asFunction< - int Function( - context_trigger_rule_entry_h, int, ffi.Pointer)>(); - - /// @brief Adds a comparison between an attribute key and an integer. - /// @details The key needs to be registered in advance, via context_trigger_rule_entry_add_key(). - /// As the comparison operator, one of the following operators is allowed: - /// #CONTEXT_TRIGGER_EQUAL_TO, #CONTEXT_TRIGGER_NOT_EQUAL_TO, #CONTEXT_TRIGGER_LESS_THAN, - /// #CONTEXT_TRIGGER_GREATER_THAN, #CONTEXT_TRIGGER_LESS_THAN_OR_EQUAL_TO - /// and #CONTEXT_TRIGGER_GREATER_THAN_OR_EQUAL_TO. - /// @since_tizen 2.4 - /// - /// @param[in] entry The event or condition entry - /// @param[in] key The attribute key, which will be used as the left operand - /// @param[in] comp_operator The comparison operator - /// @param[in] value The right operand value - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_TRIGGER_ERROR_NO_DATA The key was not added in the entry - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_RULE Invalid rule - /// - /// @pre context_trigger_rule_entry_add_key() - /// @see context_trigger_rule_entry_add_comparison() - /// @see context_trigger_rule_entry_add_comparison_string() - int context_trigger_rule_entry_add_comparison_int( - context_trigger_rule_entry_h entry, - ffi.Pointer key, - ffi.Pointer comp_operator, - int value, - ) { - return _context_trigger_rule_entry_add_comparison_int( - entry, - key, - comp_operator, - value, - ); - } - - late final _context_trigger_rule_entry_add_comparison_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - context_trigger_rule_entry_h, - ffi.Pointer, - ffi.Pointer, - ffi.Int)>>('context_trigger_rule_entry_add_comparison_int'); - late final _context_trigger_rule_entry_add_comparison_int = - _context_trigger_rule_entry_add_comparison_intPtr.asFunction< - int Function(context_trigger_rule_entry_h, ffi.Pointer, - ffi.Pointer, int)>(); - - /// @brief Adds a comparison between an attribute key and a string. - /// @details The key needs to be registered in advance, via context_trigger_rule_entry_add_key(). - /// As the comparison operator, one of the following operators is allowed: - /// #CONTEXT_TRIGGER_EQUAL_TO and #CONTEXT_TRIGGER_NOT_EQUAL_TO. - /// @since_tizen 2.4 - /// - /// @param[in] entry The event or condition entry - /// @param[in] key The attribute key, which will be used as the left operand - /// @param[in] comp_operator The comparison operator - /// @param[in] value The right operand value - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_TRIGGER_ERROR_NO_DATA The key was not added in the entry - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_RULE Invalid rule - /// - /// @pre context_trigger_rule_entry_add_key() - /// @see context_trigger_rule_entry_add_comparison() - /// @see context_trigger_rule_entry_add_comparison_int() - int context_trigger_rule_entry_add_comparison_string( - context_trigger_rule_entry_h entry, - ffi.Pointer key, - ffi.Pointer comp_operator, - ffi.Pointer value, - ) { - return _context_trigger_rule_entry_add_comparison_string( - entry, - key, - comp_operator, - value, - ); - } - - late final _context_trigger_rule_entry_add_comparison_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - context_trigger_rule_entry_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'context_trigger_rule_entry_add_comparison_string'); - late final _context_trigger_rule_entry_add_comparison_string = - _context_trigger_rule_entry_add_comparison_stringPtr.asFunction< - int Function(context_trigger_rule_entry_h, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Adds a comparison between an attribute of a condition and an attribute extracted from the event. - /// @details The key needs to be registered in advance, via context_trigger_rule_entry_add_key(). - /// @since_tizen 2.4 - /// - /// @param[in] entry The condition entry - /// @param[in] key The attribute key of the condition, which will be used as the left operand - /// @param[in] comp_operator The comparison operator - /// @param[in] event_data_key The event data key of which the corresponding data value will be used as the right operand - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_TRIGGER_ERROR_NO_DATA The key was not added in the entry - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_RULE Invalid rule - /// - /// @pre context_trigger_rule_entry_add_key() - /// @see context_trigger_rule_entry_add_comparison_int() - /// @see context_trigger_rule_entry_add_comparison_string() - int context_trigger_rule_entry_add_comparison( - context_trigger_rule_entry_h entry, - ffi.Pointer key, - ffi.Pointer comp_operator, - ffi.Pointer event_data_key, - ) { - return _context_trigger_rule_entry_add_comparison( - entry, - key, - comp_operator, - event_data_key, - ); - } - - late final _context_trigger_rule_entry_add_comparisonPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - context_trigger_rule_entry_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'context_trigger_rule_entry_add_comparison'); - late final _context_trigger_rule_entry_add_comparison = - _context_trigger_rule_entry_add_comparisonPtr.asFunction< - int Function(context_trigger_rule_entry_h, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Defines a custom contextual data item with its template. - /// @details A contextual data item can be used as an event or a condition of other applications' trigger rules, - /// in addition to predefined #context_trigger_event_e and #context_trigger_condition_e. - /// See the programming guide to find the JSON format for the @a attr_template. - /// @since_tizen 3.0 - /// - /// @param[in] name The name of a custom contextual data item - /// @param[in] attr_template The attribute template which explains contextual data schema in JSON format - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_TRIGGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONTEXT_TRIGGER_ERROR_DATA_EXIST Data exist - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_DATA Invalid data - /// - /// @see context_trigger_custom_unregister() - int context_trigger_custom_register( - ffi.Pointer name, - ffi.Pointer attr_template, - ) { - return _context_trigger_custom_register( - name, - attr_template, - ); - } - - late final _context_trigger_custom_registerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('context_trigger_custom_register'); - late final _context_trigger_custom_register = - _context_trigger_custom_registerPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Removes a defined custom contextual data item. - /// @since_tizen 3.0 - /// - /// @remarks A custom event/condition data item can only be removed by the application that registered it. - /// - /// @param[in] name The name of a custom contextual data item - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// - /// @see context_trigger_custom_register() - int context_trigger_custom_unregister( - ffi.Pointer name, - ) { - return _context_trigger_custom_unregister( - name, - ); - } - - late final _context_trigger_custom_unregisterPtr = - _lookup)>>( - 'context_trigger_custom_unregister'); - late final _context_trigger_custom_unregister = - _context_trigger_custom_unregisterPtr - .asFunction)>(); - - /// @brief Publishes an instance of a defined custom contextual data. - /// @details Using this, an application can publish the latest value of a custom data defined by the same application. - /// The published data instance triggers the evaluation process of the trigger rules that use the data in their event part. - /// If a rule uses the custom data as a condition, the last known value is referenced. - /// See the programming guide to find the JSON format for the @a fact. - /// @since_tizen 3.0 - /// - /// @remarks Corresponding contextual data can only be published by the application that registered it. - /// - /// @param[in] name The name of custom contextual data item - /// @param[in] fact The contextual data to be provided in JSON format - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_DATA Invalid data - int context_trigger_custom_publish( - ffi.Pointer name, - ffi.Pointer fact, - ) { - return _context_trigger_custom_publish( - name, - fact, - ); - } - - late final _context_trigger_custom_publishPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('context_trigger_custom_publish'); - late final _context_trigger_custom_publish = - _context_trigger_custom_publishPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Creates an event entry with custom event, instead of predefined event item #context_trigger_event_e. - /// @details An event of a custom contextual event item, which is registered and will be provided by an application/system, is created. - /// @since_tizen 3.0 - /// - /// @remarks The @a entry must be released using context_trigger_rule_entry_destroy(). - /// - /// @param[in] event_item The custom contextual event item - /// @param[in] provider The id of the package which provides the event item - /// @param[in] logical_type The logical operator - /// @param[out] entry The event entry to be initialized - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Memory allocation failed - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// - /// @see context_trigger_rule_event_create() - /// @see context_trigger_rule_entry_destroy() - int context_trigger_rule_custom_event_create( - ffi.Pointer event_item, - ffi.Pointer provider, - int logical_type, - ffi.Pointer entry, - ) { - return _context_trigger_rule_custom_event_create( - event_item, - provider, - logical_type, - entry, - ); - } - - late final _context_trigger_rule_custom_event_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer)>>( - 'context_trigger_rule_custom_event_create'); - late final _context_trigger_rule_custom_event_create = - _context_trigger_rule_custom_event_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - /// @brief Creates a condition entry with custom condition, instead of predefined condition item #context_trigger_condition_e. - /// @details A condition of a custom contextual condition item, which is registered and will be provided by provider application/system, is created. - /// @since_tizen 3.0 - /// - /// @remarks The @a entry must be released using context_trigger_rule_entry_destroy(). - /// - /// @param[in] condition_item The custom contextual condition item - /// @param[in] provider The id of the package which provides the condition item - /// @param[in] logical_type The logical operator - /// @param[out] entry The condition entry to be initialized - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONTEXT_TRIGGER_ERROR_NONE Successful - /// @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY Memory allocation failed - /// @retval #CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED Not supported - /// - /// @see context_trigger_rule_condition_create() - /// @see context_trigger_rule_entry_destroy() - int context_trigger_rule_custom_condition_create( - ffi.Pointer condition_item, - ffi.Pointer provider, - int logical_type, - ffi.Pointer entry, - ) { - return _context_trigger_rule_custom_condition_create( - condition_item, - provider, - logical_type, - entry, - ); - } - - late final _context_trigger_rule_custom_condition_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer)>>( - 'context_trigger_rule_custom_condition_create'); - late final _context_trigger_rule_custom_condition_create = - _context_trigger_rule_custom_condition_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - /// @brief Check whether the gesture is supported or not. - /// @details Check if the given gesture type is supported in the current device. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] gesture Gesture type to be checked - /// @param[out] supported @c true if the gesture is recognizable in the current device,@n - /// @c false otherwise - /// - /// @return @c 0 if the @c gesture is supported, otherwise a negative error value - /// @retval #GESTURE_ERROR_NONE Supported - /// @retval #GESTURE_ERROR_INVALID_PARAMETER Invalid parameter used - /// @retval #GESTURE_ERROR_NOT_SUPPORTED The @c gesture is not supported - /// @retval #GESTURE_ERROR_OPERATION_FAILED Operation failed because of a system error - /// @retval #GESTURE_ERROR_PERMISSION_DENIED Does not have permission to use this - int gesture_is_supported( - int gesture, - ffi.Pointer supported, - ) { - return _gesture_is_supported( - gesture, - supported, - ); - } - - late final _gesture_is_supportedPtr = _lookup< - ffi - .NativeFunction)>>( - 'gesture_is_supported'); - late final _gesture_is_supported = _gesture_is_supportedPtr - .asFunction)>(); - - /// @brief Initializes a gesture handle. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[out] handle Gesture handle to be initialized - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #GESTURE_ERROR_NONE Successful - /// @retval #GESTURE_ERROR_INVALID_PARAMETER Invalid parameter used - /// @retval #GESTURE_ERROR_NOT_SUPPORTED Gesture recognition is not supported - /// @retval #GESTURE_ERROR_OPERATION_FAILED Operation failed because of a system error, e.g., out of memory - /// - /// @see gesture_release() - int gesture_create( - ffi.Pointer handle, - ) { - return _gesture_create( - handle, - ); - } - - late final _gesture_createPtr = - _lookup)>>( - 'gesture_create'); - late final _gesture_create = - _gesture_createPtr.asFunction)>(); - - /// @brief Releases the resources occupied by the gesture handle. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] handle Gesture handle to be released - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #GESTURE_ERROR_NONE Successful - /// @retval #GESTURE_ERROR_INVALID_PARAMETER Invalid parameter used - /// @retval #GESTURE_ERROR_NOT_SUPPORTED Gesture recognition is not supported - /// @retval #GESTURE_ERROR_OPERATION_FAILED Operation failed because of a system error - /// - /// @pre gesture_create() - int gesture_release( - gesture_h handle, - ) { - return _gesture_release( - handle, - ); - } - - late final _gesture_releasePtr = - _lookup>( - 'gesture_release'); - late final _gesture_release = - _gesture_releasePtr.asFunction(); - - /// @brief Starts to recognize a gesture. - /// @details Sets a callback function to be invoked when the gesture is detected, - /// and starts to monitor occurrences of the gesture. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] handle Gesture handle to be used to control the gesture event - /// @param[in] gesture Gesture type to be monitored - /// @param[in] option Detection option - /// @param[in] callback Callback function to receive gesture events - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #GESTURE_ERROR_NONE Successful - /// @retval #GESTURE_ERROR_INVALID_PARAMETER Invalid parameter used - /// @retval #GESTURE_ERROR_NOT_SUPPORTED Gesture recognition is not supported - /// @retval #GESTURE_ERROR_ALREADY_STARTED The @c handle is being used already - /// @retval #GESTURE_ERROR_OPERATION_FAILED Operation failed because of a system error - /// @retval #GESTURE_ERROR_PERMISSION_DENIED Does not have permission to use this - /// - /// @pre gesture_create() - /// @post gesture_recognition_cb() - /// @see gesture_stop_recognition() - int gesture_start_recognition( - gesture_h handle, - int gesture, - int option, - gesture_recognition_cb callback, - ffi.Pointer user_data, - ) { - return _gesture_start_recognition( - handle, - gesture, - option, - callback, - user_data, - ); - } - - late final _gesture_start_recognitionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - gesture_h, - ffi.Int32, - ffi.Int32, - gesture_recognition_cb, - ffi.Pointer)>>('gesture_start_recognition'); - late final _gesture_start_recognition = - _gesture_start_recognitionPtr.asFunction< - int Function(gesture_h, int, int, gesture_recognition_cb, - ffi.Pointer)>(); - - /// @brief Stops recognizing the gesture registered to the gesture handle. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] handle Gesture handle to release its callback function registered - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #GESTURE_ERROR_NONE Successful - /// @retval #GESTURE_ERROR_INVALID_PARAMETER Invalid parameter used - /// @retval #GESTURE_ERROR_NOT_SUPPORTED Gesture recognition is not supported - /// @retval #GESTURE_ERROR_NOT_STARTED Nothing is started using the @c handle - /// @retval #GESTURE_ERROR_OPERATION_FAILED Operation failed because of a system error - int gesture_stop_recognition( - gesture_h handle, - ) { - return _gesture_stop_recognition( - handle, - ); - } - - late final _gesture_stop_recognitionPtr = - _lookup>( - 'gesture_stop_recognition'); - late final _gesture_stop_recognition = - _gesture_stop_recognitionPtr.asFunction(); - - /// @brief Gets the gesture event from the gesture data received. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] data Gesture data received through a callback function - /// @param[out] event Gesture event data - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #GESTURE_ERROR_NONE Successful - /// @retval #GESTURE_ERROR_INVALID_PARAMETER Invalid parameter used - /// @retval #GESTURE_ERROR_NOT_SUPPORTED Gesture recognition is not supported - /// @retval #GESTURE_ERROR_OPERATION_FAILED Operation failed because of a system error - int gesture_get_event( - gesture_data_h data, - ffi.Pointer event, - ) { - return _gesture_get_event( - data, - event, - ); - } - - late final _gesture_get_eventPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - gesture_data_h, ffi.Pointer)>>('gesture_get_event'); - late final _gesture_get_event = _gesture_get_eventPtr - .asFunction)>(); - - /// @brief Gets the tilting degrees from #GESTURE_TILT data received. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] data Tilt gesture data received through a callback function - /// @param[out] x Tilting degree on X-axis - /// @param[out] y Tilting degree on Y-axis - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #GESTURE_ERROR_NONE Successful - /// @retval #GESTURE_ERROR_INVALID_PARAMETER Invalid parameter used - /// @retval #GESTURE_ERROR_NOT_SUPPORTED Gesture recognition is not supported - /// @retval #GESTURE_ERROR_OPERATION_FAILED Operation failed because of a system error - int gesture_get_tilt( - gesture_data_h data, - ffi.Pointer x, - ffi.Pointer y, - ) { - return _gesture_get_tilt( - data, - x, - y, - ); - } - - late final _gesture_get_tiltPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(gesture_data_h, ffi.Pointer, - ffi.Pointer)>>('gesture_get_tilt'); - late final _gesture_get_tilt = _gesture_get_tiltPtr.asFunction< - int Function( - gesture_data_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Checks whether the geofence manager is available or not. - /// @since_tizen 2.4 - /// @param[out] supported @c true if geofence service is supported, - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see geofence_manager_create() - int geofence_manager_is_supported( - ffi.Pointer supported, - ) { - return _geofence_manager_is_supported( - supported, - ); - } - - late final _geofence_manager_is_supportedPtr = - _lookup)>>( - 'geofence_manager_is_supported'); - late final _geofence_manager_is_supported = _geofence_manager_is_supportedPtr - .asFunction)>(); - - /// @brief Creates a new geofence manager. - /// @since_tizen 2.4 - /// @remarks The manager must be released using geofence_manager_destroy().\n - /// Since 3.0, http://tizen.org/privilege/location privilege is not required. - /// @param[out] manager A geofence manager handle to be newly created on success - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #GEOFENCE_MANAGER_ERROR_EXCEPTION Exception occurred - /// @see geofence_manager_destroy() - int geofence_manager_create( - ffi.Pointer manager, - ) { - return _geofence_manager_create( - manager, - ); - } - - late final _geofence_manager_createPtr = _lookup< - ffi - .NativeFunction)>>( - 'geofence_manager_create'); - late final _geofence_manager_create = _geofence_manager_createPtr - .asFunction)>(); - - /// @brief Releases the geofence manager. - /// @since_tizen 2.4 - /// @remarks Since 3.0, http://tizen.org/privilege/location privilege is not required. - /// @param[in] manager The geofence manager handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #GEOFENCE_MANAGER_ERROR_EXCEPTION Exception occurred - /// @pre geofence_manager_stop() is called before. - /// @see geofence_manager_create() - /// @see geofence_manager_stop() - int geofence_manager_destroy( - geofence_manager_h manager, - ) { - return _geofence_manager_destroy( - manager, - ); - } - - late final _geofence_manager_destroyPtr = - _lookup>( - 'geofence_manager_destroy'); - late final _geofence_manager_destroy = _geofence_manager_destroyPtr - .asFunction(); - - /// @brief Starts the geofencing service. - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @remarks There is no limit on number of geofence managers for which this function called - /// Calling this function invokes a location service event. When the location service is enabled, the service state change callback - /// (set using #geofence_manager_set_geofence_state_changed_cb()) notifies the user with geofence ID as the 1st argument, - /// geofence zone state(#GEOFENCE_STATE_IN and #GEOFENCE_STATE_OUT) as the 2nd argument, and the service starts. - /// @param[in] manager The geofence manager handle - /// @param[in] geofence_id The specified geofence ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #GEOFENCE_MANAGER_ERROR_EXCEPTION Exception occurred - /// @retval #GEOFENCE_MANAGER_ERROR_GEOFENCE_ACCESS_DENIED Access to specified geofence is denied - /// @see geofence_manager_stop() - /// @see geofence_manager_add_fence() - /// @see geofence_manager_set_geofence_state_changed_cb() - int geofence_manager_start( - geofence_manager_h manager, - int geofence_id, - ) { - return _geofence_manager_start( - manager, - geofence_id, - ); - } - - late final _geofence_manager_startPtr = _lookup< - ffi.NativeFunction>( - 'geofence_manager_start'); - late final _geofence_manager_start = _geofence_manager_startPtr - .asFunction(); - - /// @brief Stops the geofenceing service. - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @remarks This function initiates the process of stopping the service. - /// You can stop and start the geofence manager as needed. - /// @param[in] manager The geofence manager handle - /// @param[in] geofence_id The specified geofence ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #GEOFENCE_MANAGER_ERROR_EXCEPTION Exception occurred - /// @retval #GEOFENCE_MANAGER_ERROR_GEOFENCE_ACCESS_DENIED Access to specified geofence is denied - /// @see geofence_manager_start() - int geofence_manager_stop( - geofence_manager_h manager, - int geofence_id, - ) { - return _geofence_manager_stop( - manager, - geofence_id, - ); - } - - late final _geofence_manager_stopPtr = _lookup< - ffi.NativeFunction>( - 'geofence_manager_stop'); - late final _geofence_manager_stop = _geofence_manager_stopPtr - .asFunction(); - - /// @brief Creates a new place for geofencing service. - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @param[in] manager The geofence manager handle - /// @param[in] place_name A place name to be created - /// @param[out] place_id The place ID to be newly created on success - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #GEOFENCE_MANAGER_ERROR_EXCEPTION Exception occurred - /// @see geofence_manager_update_place() - /// @see geofence_manager_remove_place() - int geofence_manager_add_place( - geofence_manager_h manager, - ffi.Pointer place_name, - ffi.Pointer place_id, - ) { - return _geofence_manager_add_place( - manager, - place_name, - place_id, - ); - } - - late final _geofence_manager_add_placePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(geofence_manager_h, ffi.Pointer, - ffi.Pointer)>>('geofence_manager_add_place'); - late final _geofence_manager_add_place = - _geofence_manager_add_placePtr.asFunction< - int Function(geofence_manager_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Updates the place name of a given place ID. - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @param[in] manager The geofence manager handle - /// @param[in] place_id The specified place ID - /// @param[in] place_name A new place name of the place ID - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #GEOFENCE_MANAGER_ERROR_EXCEPTION Exception occurred - /// @retval #GEOFENCE_MANAGER_ERROR_PLACE_ACCESS_DENIED Access to specified place is denied - /// @see geofence_manager_add_place() - /// @see geofence_manager_remove_place() - int geofence_manager_update_place( - geofence_manager_h manager, - int place_id, - ffi.Pointer place_name, - ) { - return _geofence_manager_update_place( - manager, - place_id, - place_name, - ); - } - - late final _geofence_manager_update_placePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(geofence_manager_h, ffi.Int, - ffi.Pointer)>>('geofence_manager_update_place'); - late final _geofence_manager_update_place = - _geofence_manager_update_placePtr.asFunction< - int Function(geofence_manager_h, int, ffi.Pointer)>(); - - /// @brief Removes the specific place for geofencing service. - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @remarks The place must have no geofences. - /// @param[in] manager The geofence manager handle - /// @param[in] place_id The specified place ID - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #GEOFENCE_MANAGER_ERROR_EXCEPTION Exception occurred - /// @retval #GEOFENCE_MANAGER_ERROR_PLACE_ACCESS_DENIED Access to specified place is denied - /// @pre geofence_manager_remove_fence() in all geofence is called before. - /// @see geofence_manager_add_place() - /// @see geofence_manager_update_place() - int geofence_manager_remove_place( - geofence_manager_h manager, - int place_id, - ) { - return _geofence_manager_remove_place( - manager, - place_id, - ); - } - - late final _geofence_manager_remove_placePtr = _lookup< - ffi.NativeFunction>( - 'geofence_manager_remove_place'); - late final _geofence_manager_remove_place = _geofence_manager_remove_placePtr - .asFunction(); - - /// @brief Adds a geofence for a given geofence manager. - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @param[in] manager The geofence manager handle - /// @param[in] fence The geofence handle - /// @param[out] geofence_id The geofence ID handle to be newly created on success - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #GEOFENCE_MANAGER_ERROR_EXCEPTION Exception occurred - /// @see geofence_manager_remove_fence() - /// @see geofence_create_geopoint() - /// @see geofence_create_bluetooth() - /// @see geofence_create_wifi() - /// @see geofence_manager_start() - int geofence_manager_add_fence( - geofence_manager_h manager, - geofence_h fence, - ffi.Pointer geofence_id, - ) { - return _geofence_manager_add_fence( - manager, - fence, - geofence_id, - ); - } - - late final _geofence_manager_add_fencePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(geofence_manager_h, geofence_h, - ffi.Pointer)>>('geofence_manager_add_fence'); - late final _geofence_manager_add_fence = - _geofence_manager_add_fencePtr.asFunction< - int Function(geofence_manager_h, geofence_h, ffi.Pointer)>(); - - /// @brief Removes a geofence with a given geofence ID - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @param[in] manager The geofence manager handle - /// @param[in] geofence_id The specified geofence ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #GEOFENCE_MANAGER_ERROR_EXCEPTION Exception occurred - /// @retval #GEOFENCE_MANAGER_ERROR_GEOFENCE_ACCESS_DENIED Access to specified geofence is denied - /// @pre geofence_manager_stop() is called before. - /// @see geofence_manager_add_fence() - int geofence_manager_remove_fence( - geofence_manager_h manager, - int geofence_id, - ) { - return _geofence_manager_remove_fence( - manager, - geofence_id, - ); - } - - late final _geofence_manager_remove_fencePtr = _lookup< - ffi.NativeFunction>( - 'geofence_manager_remove_fence'); - late final _geofence_manager_remove_fence = _geofence_manager_remove_fencePtr - .asFunction(); - - /// @brief Registers a callback function to be invoked when a device enters or exits the specific geofence. - /// @since_tizen 2.4 - /// @param[in] manager The geofence manager handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes geofence_state_changed_cb(). - /// @see geofence_manager_unset_geofence_state_changed_cb() - /// @see geofence_state_changed_cb() - int geofence_manager_set_geofence_state_changed_cb( - geofence_manager_h manager, - geofence_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _geofence_manager_set_geofence_state_changed_cb( - manager, - callback, - user_data, - ); - } - - late final _geofence_manager_set_geofence_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(geofence_manager_h, geofence_state_changed_cb, - ffi.Pointer)>>( - 'geofence_manager_set_geofence_state_changed_cb'); - late final _geofence_manager_set_geofence_state_changed_cb = - _geofence_manager_set_geofence_state_changed_cbPtr.asFunction< - int Function(geofence_manager_h, geofence_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen 2.4 - /// @param[in] manager The geofence manager handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see geofence_state_changed_cb() - int geofence_manager_unset_geofence_state_changed_cb( - geofence_manager_h manager, - ) { - return _geofence_manager_unset_geofence_state_changed_cb( - manager, - ); - } - - late final _geofence_manager_unset_geofence_state_changed_cbPtr = - _lookup>( - 'geofence_manager_unset_geofence_state_changed_cb'); - late final _geofence_manager_unset_geofence_state_changed_cb = - _geofence_manager_unset_geofence_state_changed_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be invoked when a response comes. - /// @since_tizen 2.4 - /// @param[in] manager The geofence manager handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes geofence_event_cb(). - /// @see geofence_manager_unset_geofence_event_cb() - int geofence_manager_set_geofence_event_cb( - geofence_manager_h manager, - geofence_event_cb callback, - ffi.Pointer user_data, - ) { - return _geofence_manager_set_geofence_event_cb( - manager, - callback, - user_data, - ); - } - - late final _geofence_manager_set_geofence_event_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(geofence_manager_h, geofence_event_cb, - ffi.Pointer)>>( - 'geofence_manager_set_geofence_event_cb'); - late final _geofence_manager_set_geofence_event_cb = - _geofence_manager_set_geofence_event_cbPtr.asFunction< - int Function( - geofence_manager_h, geofence_event_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen 2.4 - /// @param[in] manager The geofence manager handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see geofence_event_cb() - int geofence_manager_unset_geofence_event_cb( - geofence_manager_h manager, - ) { - return _geofence_manager_unset_geofence_event_cb( - manager, - ); - } - - late final _geofence_manager_unset_geofence_event_cbPtr = - _lookup>( - 'geofence_manager_unset_geofence_event_cb'); - late final _geofence_manager_unset_geofence_event_cb = - _geofence_manager_unset_geofence_event_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be invoked when a proximity state of device is changed. - /// @details The proximity state is measured from registered position regardless of the geofence boundary. - /// @since_tizen 3.0 - /// @param[in] manager The geofence manager handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes geofence_proximity_state_changed_cb(). - /// @see geofence_manager_unset_geofence_proximity_state_changed_cb() - int geofence_manager_set_geofence_proximity_state_changed_cb( - geofence_manager_h manager, - geofence_proximity_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _geofence_manager_set_geofence_proximity_state_changed_cb( - manager, - callback, - user_data, - ); - } - - late final _geofence_manager_set_geofence_proximity_state_changed_cbPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - geofence_manager_h, - geofence_proximity_state_changed_cb, - ffi.Pointer)>>( - 'geofence_manager_set_geofence_proximity_state_changed_cb'); - late final _geofence_manager_set_geofence_proximity_state_changed_cb = - _geofence_manager_set_geofence_proximity_state_changed_cbPtr.asFunction< - int Function(geofence_manager_h, geofence_proximity_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen 3.0 - /// @param[in] manager The geofence manager handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see geofence_manager_set_geofence_proximity_state_changed_cb() - int geofence_manager_unset_geofence_proximity_state_changed_cb( - geofence_manager_h manager, - ) { - return _geofence_manager_unset_geofence_proximity_state_changed_cb( - manager, - ); - } - - late final _geofence_manager_unset_geofence_proximity_state_changed_cbPtr = - _lookup>( - 'geofence_manager_unset_geofence_proximity_state_changed_cb'); - late final _geofence_manager_unset_geofence_proximity_state_changed_cb = - _geofence_manager_unset_geofence_proximity_state_changed_cbPtr - .asFunction(); - - /// @brief Retrieves a list of fences registered in the specified geofence manager. - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @param[in] manager The geofence manager handle - /// @param[in] callback The callback function to deliver each fence - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #GEOFENCE_MANAGER_ERROR_DATABASE Database error - /// @post This function invokes geofence_manager_fence_cb(). - /// @see geofence_manager_fence_cb() - /// @see geofence_manager_add_fence() - int geofence_manager_foreach_geofence_list( - geofence_manager_h manager, - geofence_manager_fence_cb callback, - ffi.Pointer user_data, - ) { - return _geofence_manager_foreach_geofence_list( - manager, - callback, - user_data, - ); - } - - late final _geofence_manager_foreach_geofence_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(geofence_manager_h, geofence_manager_fence_cb, - ffi.Pointer)>>( - 'geofence_manager_foreach_geofence_list'); - late final _geofence_manager_foreach_geofence_list = - _geofence_manager_foreach_geofence_listPtr.asFunction< - int Function(geofence_manager_h, geofence_manager_fence_cb, - ffi.Pointer)>(); - - /// @brief Retrieves a list of fences registered in the specified place. - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @param[in] manager The geofence manager handle - /// @param[in] place_id The place ID - /// @param[in] callback The callback function to deliver each fence of the specified place - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #GEOFENCE_MANAGER_ERROR_DATABASE Database error - /// @retval #GEOFENCE_MANAGER_ERROR_PLACE_ACCESS_DENIED Access to specified place is denied - /// @post This function invokes geofence_manager_fence_cb(). - /// @see geofence_manager_fence_cb() - /// @see geofence_manager_add_place() - int geofence_manager_foreach_place_geofence_list( - geofence_manager_h manager, - int place_id, - geofence_manager_fence_cb callback, - ffi.Pointer user_data, - ) { - return _geofence_manager_foreach_place_geofence_list( - manager, - place_id, - callback, - user_data, - ); - } - - late final _geofence_manager_foreach_place_geofence_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(geofence_manager_h, ffi.Int, - geofence_manager_fence_cb, ffi.Pointer)>>( - 'geofence_manager_foreach_place_geofence_list'); - late final _geofence_manager_foreach_place_geofence_list = - _geofence_manager_foreach_place_geofence_listPtr.asFunction< - int Function(geofence_manager_h, int, geofence_manager_fence_cb, - ffi.Pointer)>(); - - /// @brief Retrieves a list of places registered in the specified geofence manager. - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @param[in] manager The geofence manager handle - /// @param[in] callback The callback function to deliver each place of the specified geofence manager - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #GEOFENCE_MANAGER_ERROR_DATABASE Database error - /// @post This function invokes geofence_manager_place_cb(). - /// @see geofence_manager_place_cb() - /// @see geofence_manager_add_place() - int geofence_manager_foreach_place_list( - geofence_manager_h manager, - geofence_manager_place_cb callback, - ffi.Pointer user_data, - ) { - return _geofence_manager_foreach_place_list( - manager, - callback, - user_data, - ); - } - - late final _geofence_manager_foreach_place_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(geofence_manager_h, geofence_manager_place_cb, - ffi.Pointer)>>('geofence_manager_foreach_place_list'); - late final _geofence_manager_foreach_place_list = - _geofence_manager_foreach_place_listPtr.asFunction< - int Function(geofence_manager_h, geofence_manager_place_cb, - ffi.Pointer)>(); - - /// @brief Gets the name of place. - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @remarks The place_name must be released using free(). - /// @param[in] manager The geofence manager handle - /// @param[in] place_id The place ID - /// @param[out] place_name The name of the place - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_ID Invalid geofence ID - /// @retval #GEOFENCE_MANAGER_ERROR_DATABASE Database error - /// @retval #GEOFENCE_MANAGER_ERROR_PLACE_ACCESS_DENIED Access to specified place is denied - /// @see geofence_manager_add_place() - /// @see geofence_manager_update_place() - int geofence_manager_get_place_name( - geofence_manager_h manager, - int place_id, - ffi.Pointer> place_name, - ) { - return _geofence_manager_get_place_name( - manager, - place_id, - place_name, - ); - } - - late final _geofence_manager_get_place_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(geofence_manager_h, ffi.Int, - ffi.Pointer>)>>( - 'geofence_manager_get_place_name'); - late final _geofence_manager_get_place_name = - _geofence_manager_get_place_namePtr.asFunction< - int Function( - geofence_manager_h, int, ffi.Pointer>)>(); - - /// @brief Creates a geopoint type of new geofence. - /// @since_tizen 2.4 - /// @remarks The fence must be released using geofence_destroy().\n - /// Since 3.0, http://tizen.org/privilege/location privilege is not required. - /// @param[in] place_id The current place ID - /// @param[in] latitude Specifies the value of latitude of geofence [-90.0 ~ 90.0] (degrees) - /// @param[in] longitude Specifies the value of longitude of geofence [-180.0 ~ 180.0] (degrees) - /// @param[in] radius Specifies the value of radius of geofence [100 ~ 500](meter) - /// @param[in] address Specifies the value of address - /// @param[out] fence A geofence handle to be newly created on success - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #GEOFENCE_MANAGER_ERROR_EXCEPTION Exception occurred - /// @retval #GEOFENCE_MANAGER_ERROR_PLACE_ACCESS_DENIED Access to specified place is denied - /// @see geofence_create_bluetooth() - /// @see geofence_create_wifi() - /// @see geofence_destroy() - int geofence_create_geopoint( - int place_id, - double latitude, - double longitude, - int radius, - ffi.Pointer address, - ffi.Pointer fence, - ) { - return _geofence_create_geopoint( - place_id, - latitude, - longitude, - radius, - address, - fence, - ); - } - - late final _geofence_create_geopointPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Double, - ffi.Double, - ffi.Int, - ffi.Pointer, - ffi.Pointer)>>('geofence_create_geopoint'); - late final _geofence_create_geopoint = - _geofence_create_geopointPtr.asFunction< - int Function(int, double, double, int, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Creates a bluetooth type of new geofence. - /// @since_tizen 2.4 - /// @remarks The fence must be released using geofence_destroy().\n - /// Since 3.0, http://tizen.org/privilege/location privilege is not required. - /// @param[in] place_id The current place ID - /// @param[in] bssid Specifies the value of BSSID of BT MAC address - /// @param[in] ssid Specifies the value of SSID of BT Device - /// @param[out] fence A geofence handle to be newly created on success - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #GEOFENCE_MANAGER_ERROR_EXCEPTION Exception occurred - /// @retval #GEOFENCE_MANAGER_ERROR_PLACE_ACCESS_DENIED Access to specified place is denied - /// @see geofence_create_geopoint() - /// @see geofence_create_wifi() - /// @see geofence_destroy() - int geofence_create_bluetooth( - int place_id, - ffi.Pointer bssid, - ffi.Pointer ssid, - ffi.Pointer fence, - ) { - return _geofence_create_bluetooth( - place_id, - bssid, - ssid, - fence, - ); - } - - late final _geofence_create_bluetoothPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('geofence_create_bluetooth'); - late final _geofence_create_bluetooth = - _geofence_create_bluetoothPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Creates a Wi-Fi type of new geofence. - /// @since_tizen 2.4 - /// @remarks The fence must be released using geofence_destroy().\n - /// Since 3.0, http://tizen.org/privilege/location privilege is not required. - /// @param[in] place_id The current place ID - /// @param[in] bssid Specifies the value of BSSID of Wi-Fi MAC address - /// @param[in] ssid Specifies the value of SSID of Wi-Fi Device - /// @param[out] fence A geofence handle to be newly created on success - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #GEOFENCE_MANAGER_ERROR_EXCEPTION Exception occurred - /// @retval #GEOFENCE_MANAGER_ERROR_PLACE_ACCESS_DENIED Access to specified place is denied - /// @see geofence_create_geopoint() - /// @see geofence_create_bluetooth() - /// @see geofence_destroy() - int geofence_create_wifi( - int place_id, - ffi.Pointer bssid, - ffi.Pointer ssid, - ffi.Pointer fence, - ) { - return _geofence_create_wifi( - place_id, - bssid, - ssid, - fence, - ); - } - - late final _geofence_create_wifiPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('geofence_create_wifi'); - late final _geofence_create_wifi = _geofence_create_wifiPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Releases the geofence. - /// @since_tizen 2.4 - /// @remarks Since 3.0, http://tizen.org/privilege/location privilege is not required. - /// @param[in] fence The geofence handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @see geofence_create_geopoint() - /// @see geofence_create_bluetooth() - /// @see geofence_create_wifi() - int geofence_destroy( - geofence_h fence, - ) { - return _geofence_destroy( - fence, - ); - } - - late final _geofence_destroyPtr = - _lookup>( - 'geofence_destroy'); - late final _geofence_destroy = - _geofence_destroyPtr.asFunction(); - - /// @brief Gets the type of geofence. - /// @since_tizen 2.4 - /// @param[in] fence The geofence handle - /// @param[out] type The type of geofence - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see geofence_get_geopoint() - /// @see geofence_get_radius() - /// @see geofence_get_bssid() - int geofence_get_type( - geofence_h fence, - ffi.Pointer type, - ) { - return _geofence_get_type( - fence, - type, - ); - } - - late final _geofence_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - geofence_h, ffi.Pointer)>>('geofence_get_type'); - late final _geofence_get_type = _geofence_get_typePtr - .asFunction)>(); - - /// @brief Gets the ID of place. - /// @since_tizen 2.4 - /// @param[in] fence The geofence handle - /// @param[out] place_id The ID of the place - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see geofence_create_geopoint() - /// @see geofence_create_bluetooth() - /// @see geofence_create_wifi() - int geofence_get_place_id( - geofence_h fence, - ffi.Pointer place_id, - ) { - return _geofence_get_place_id( - fence, - place_id, - ); - } - - late final _geofence_get_place_idPtr = _lookup< - ffi - .NativeFunction)>>( - 'geofence_get_place_id'); - late final _geofence_get_place_id = _geofence_get_place_idPtr - .asFunction)>(); - - /// @brief Gets the latitude of geofence. - /// @since_tizen 2.4 - /// @remarks The geofence has latitude only when geofence_type_e is GEOFENCE_TYPE_GEOPOINT. - /// @param[in] fence The geofence handle - /// @param[out] latitude The latitude of geofence - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument. - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see geofence_get_longitude() - /// @see geofence_get_radius() - /// @see geofence_get_address() - /// @see geofence_get_type() - /// @see geofence_create_geopoint() - int geofence_get_latitude( - geofence_h fence, - ffi.Pointer latitude, - ) { - return _geofence_get_latitude( - fence, - latitude, - ); - } - - late final _geofence_get_latitudePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - geofence_h, ffi.Pointer)>>('geofence_get_latitude'); - late final _geofence_get_latitude = _geofence_get_latitudePtr - .asFunction)>(); - - /// @brief Gets the longitude of geofence. - /// @since_tizen 2.4 - /// @remarks The geofence has longitude only when geofence_type_e is GEOFENCE_TYPE_GEOPOINT. - /// @param[in] fence The geofence handle - /// @param[out] longitude The longitude of geofence - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see geofence_get_latitude() - /// @see geofence_get_radius() - /// @see geofence_get_address() - /// @see geofence_get_type() - /// @see geofence_create_geopoint() - int geofence_get_longitude( - geofence_h fence, - ffi.Pointer longitude, - ) { - return _geofence_get_longitude( - fence, - longitude, - ); - } - - late final _geofence_get_longitudePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - geofence_h, ffi.Pointer)>>('geofence_get_longitude'); - late final _geofence_get_longitude = _geofence_get_longitudePtr - .asFunction)>(); - - /// @brief Gets the radius of geofence. - /// @since_tizen 2.4 - /// @remarks The geofence has radius only when geofence_type_e is GEOFENCE_TYPE_GEOPOINT. - /// @param[in] fence The geofence handle - /// @param[out] radius The radius of geofence - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see geofence_get_latitude() - /// @see geofence_get_longitude() - /// @see geofence_get_address() - /// @see geofence_get_type() - /// @see geofence_create_geopoint() - int geofence_get_radius( - geofence_h fence, - ffi.Pointer radius, - ) { - return _geofence_get_radius( - fence, - radius, - ); - } - - late final _geofence_get_radiusPtr = _lookup< - ffi - .NativeFunction)>>( - 'geofence_get_radius'); - late final _geofence_get_radius = _geofence_get_radiusPtr - .asFunction)>(); - - /// @brief Gets the address of geofence - /// @since_tizen 2.4 - /// @remarks The geofence has address only when geofence_type_e is GEOFENCE_TYPE_GEOPOINT. The address must be released using free(). - /// @param[in] fence The geofence handle - /// @param[out] address Specifies the value of address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see geofence_get_latitude() - /// @see geofence_get_longitude() - /// @see geofence_get_radius() - /// @see geofence_get_type() - /// @see geofence_create_geopoint() - int geofence_get_address( - geofence_h fence, - ffi.Pointer> address, - ) { - return _geofence_get_address( - fence, - address, - ); - } - - late final _geofence_get_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(geofence_h, - ffi.Pointer>)>>('geofence_get_address'); - late final _geofence_get_address = _geofence_get_addressPtr.asFunction< - int Function(geofence_h, ffi.Pointer>)>(); - - /// @brief Gets the bssid of geofence - /// @since_tizen 2.4 - /// @remarks The geofence has bssid only when geofence_type_e is GEOFENCE_TYPE_BLUETOOTH or GEOFENCE_TYPE_WIFI. The bssid must be released using free(). - /// @param[in] fence The geofence handle - /// @param[out] bssid The bssid of geofence - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see geofence_get_type() - /// @see geofence_create_bluetooth() - /// @see geofence_create_wifi() - /// @see geofence_get_ssid() - int geofence_get_bssid( - geofence_h fence, - ffi.Pointer> bssid, - ) { - return _geofence_get_bssid( - fence, - bssid, - ); - } - - late final _geofence_get_bssidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(geofence_h, - ffi.Pointer>)>>('geofence_get_bssid'); - late final _geofence_get_bssid = _geofence_get_bssidPtr.asFunction< - int Function(geofence_h, ffi.Pointer>)>(); - - /// @brief Gets the ssid of geofence - /// @since_tizen 2.4 - /// @remarks The geofence has ssid only when geofence_type_e is GEOFENCE_TYPE_BLUETOOTH or GEOFENCE_TYPE_WIFI. The ssid must be released using free(). - /// @param[in] fence The geofence handle - /// @param[out] ssid The ssid of geofence - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see geofence_get_type() - /// @see geofence_create_bluetooth() - /// @see geofence_create_wifi() - /// @see geofence_get_bssid() - int geofence_get_ssid( - geofence_h fence, - ffi.Pointer> ssid, - ) { - return _geofence_get_ssid( - fence, - ssid, - ); - } - - late final _geofence_get_ssidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(geofence_h, - ffi.Pointer>)>>('geofence_get_ssid'); - late final _geofence_get_ssid = _geofence_get_ssidPtr.asFunction< - int Function(geofence_h, ffi.Pointer>)>(); - - /// @brief Returns The geofence status of specified geofence. - /// @since_tizen 2.4 - /// @remarks A status must be released using geofence_status_destroy() - /// @param[in] geofence_id The geofence ID - /// @param[out] status The status handle of a specified geofence - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #GEOFENCE_MANAGER_ERROR_GEOFENCE_ACCESS_DENIED Access to specified geofence is denied - /// @see geofence_status_destroy() - /// @see geofence_manager_start() - /// @see geofence_manager_stop() - int geofence_status_create( - int geofence_id, - ffi.Pointer status, - ) { - return _geofence_status_create( - geofence_id, - status, - ); - } - - late final _geofence_status_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, - ffi.Pointer)>>('geofence_status_create'); - late final _geofence_status_create = _geofence_status_createPtr - .asFunction)>(); - - /// @brief Releases the memory, used by the status data. - /// @since_tizen 2.4 - /// @param[in] status The status handle of a specified geofence - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see geofence_status_create() - /// @see geofence_status_get_state() - /// @see geofence_status_get_duration() - int geofence_status_destroy( - geofence_status_h status, - ) { - return _geofence_status_destroy( - status, - ); - } - - late final _geofence_status_destroyPtr = - _lookup>( - 'geofence_status_destroy'); - late final _geofence_status_destroy = - _geofence_status_destroyPtr.asFunction(); - - /// @brief Gets the state of geofence. - /// @since_tizen 2.4 - /// @param[in] status The geofence status handle - /// @param[out] state The state of geofence - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see geofence_status_get_duration() - int geofence_status_get_state( - geofence_status_h status, - ffi.Pointer state, - ) { - return _geofence_status_get_state( - status, - state, - ); - } - - late final _geofence_status_get_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(geofence_status_h, - ffi.Pointer)>>('geofence_status_get_state'); - late final _geofence_status_get_state = _geofence_status_get_statePtr - .asFunction)>(); - - /// @brief Gets the amount of seconds geofence is in the current state. - /// @since_tizen 2.4 - /// @param[in] status The geofence status handle - /// @param[out] seconds The amount of seconds geofence is in the current state - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #GEOFENCE_MANAGER_ERROR_NONE Successful - /// @retval #GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER Illegal argument - /// @retval #GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see geofence_status_get_state() - int geofence_status_get_duration( - geofence_status_h status, - ffi.Pointer seconds, - ) { - return _geofence_status_get_duration( - status, - seconds, - ); - } - - late final _geofence_status_get_durationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(geofence_status_h, - ffi.Pointer)>>('geofence_status_get_duration'); - late final _geofence_status_get_duration = _geofence_status_get_durationPtr - .asFunction)>(); - - /// @brief Creates a rect type of new location bounds. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a bounds using location_bounds_destroy(). - /// @param[in] top_left The top left position - /// @param[in] bottom_right The bottom right position - /// @param[out] bounds The location bounds handle that is newly created - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATION_BOUNDS_ERROR_NONE Successful - /// @retval #LOCATION_BOUNDS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #LOCATION_BOUNDS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATION_BOUNDS_ERROR_NOT_SUPPORTED Not supported - /// @see location_bounds_get_rect_coords() - /// @see location_bounds_destroy() - int location_bounds_create_rect( - location_coords_s top_left, - location_coords_s bottom_right, - ffi.Pointer bounds, - ) { - return _location_bounds_create_rect( - top_left, - bottom_right, - bounds, - ); - } - - late final _location_bounds_create_rectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(location_coords_s, location_coords_s, - ffi.Pointer)>>('location_bounds_create_rect'); - late final _location_bounds_create_rect = - _location_bounds_create_rectPtr.asFunction< - int Function(location_coords_s, location_coords_s, - ffi.Pointer)>(); - - /// @brief Creates a circle type of new location bounds. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a bounds using location_bounds_destroy(). - /// @param[in] center The center position - /// @param[in] radius The radius of a circle (meters) - /// @param[out] bounds The location bounds handle that is newly created - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATION_BOUNDS_ERROR_NONE Successful - /// @retval #LOCATION_BOUNDS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #LOCATION_BOUNDS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATION_BOUNDS_ERROR_NOT_SUPPORTED Not supported - /// @see location_bounds_get_circle_coords() - /// @see location_bounds_destroy() - int location_bounds_create_circle( - location_coords_s center, - double radius, - ffi.Pointer bounds, - ) { - return _location_bounds_create_circle( - center, - radius, - bounds, - ); - } - - late final _location_bounds_create_circlePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(location_coords_s, ffi.Double, - ffi.Pointer)>>( - 'location_bounds_create_circle'); - late final _location_bounds_create_circle = - _location_bounds_create_circlePtr.asFunction< - int Function( - location_coords_s, double, ffi.Pointer)>(); - - /// @brief Creates a polygon type of new location bounds. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a bounds using location_bounds_destroy(). - /// @remarks @a length should be more than @c 3 to represent polygon. - /// @param[in] coords_list The list of coordinates - /// @param[in] length The length of the coordinates list - /// @param[out] bounds The location bounds handle that is newly created on success - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATION_BOUNDS_ERROR_NONE Successful - /// @retval #LOCATION_BOUNDS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #LOCATION_BOUNDS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATION_BOUNDS_ERROR_NOT_SUPPORTED Not supported - /// @see location_bounds_foreach_polygon_coords() - /// @see location_bounds_destroy() - int location_bounds_create_polygon( - ffi.Pointer coords_list, - int length, - ffi.Pointer bounds, - ) { - return _location_bounds_create_polygon( - coords_list, - length, - bounds, - ); - } - - late final _location_bounds_create_polygonPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, - ffi.Pointer)>>( - 'location_bounds_create_polygon'); - late final _location_bounds_create_polygon = - _location_bounds_create_polygonPtr.asFunction< - int Function(ffi.Pointer, int, - ffi.Pointer)>(); - - /// @brief Checks whether the bounds contains the specified coordinates. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remark The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] bounds The location bounds handle - /// @param[in] coords The coordinates - /// @return @c true if the bounds contains the specified coordinates, - /// otherwise else @c false - /// @exception #LOCATION_BOUNDS_ERROR_NONE Successful - /// @exception #LOCATION_BOUNDS_ERROR_OUT_OF_MEMORY Out of memory - /// @exception #LOCATION_BOUNDS_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #LOCATION_BOUNDS_ERROR_NOT_SUPPORTED Not supported - /// @see location_bounds_create_rect() - /// @see location_bounds_create_circle() - /// @see location_bounds_create_polygon() - bool location_bounds_contains_coordinates( - location_bounds_h bounds, - location_coords_s coords, - ) { - return _location_bounds_contains_coordinates( - bounds, - coords, - ); - } - - late final _location_bounds_contains_coordinatesPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(location_bounds_h, - location_coords_s)>>('location_bounds_contains_coordinates'); - late final _location_bounds_contains_coordinates = - _location_bounds_contains_coordinatesPtr - .asFunction(); - - /// @brief Gets the type of location bounds. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] bounds The location bounds handle - /// @param[out] type The type of location bounds - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATION_BOUNDS_ERROR_NONE Successful - /// @retval #LOCATION_BOUNDS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATION_BOUNDS_ERROR_NOT_SUPPORTED Not supported - /// @see location_bounds_create_rect() - /// @see location_bounds_create_circle() - /// @see location_bounds_create_polygon() - int location_bounds_get_type( - location_bounds_h bounds, - ffi.Pointer type, - ) { - return _location_bounds_get_type( - bounds, - type, - ); - } - - late final _location_bounds_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(location_bounds_h, - ffi.Pointer)>>('location_bounds_get_type'); - late final _location_bounds_get_type = _location_bounds_get_typePtr - .asFunction)>(); - - /// @brief Gets the center position and radius of circle bounds. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] bounds The location bounds handle - /// @param[out] top_left The top left position - /// @param[out] bottom_right The bottom right position - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATION_BOUNDS_ERROR_NONE Successful - /// @retval #LOCATION_BOUNDS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATION_BOUNDS_ERROR_NOT_SUPPORTED Not supported - /// @retval #LOCATION_BOUNDS_ERROR_INCORRECT_TYPE Incorrect bounds type - /// @see location_bounds_create_rect() - int location_bounds_get_rect_coords( - location_bounds_h bounds, - ffi.Pointer top_left, - ffi.Pointer bottom_right, - ) { - return _location_bounds_get_rect_coords( - bounds, - top_left, - bottom_right, - ); - } - - late final _location_bounds_get_rect_coordsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - location_bounds_h, - ffi.Pointer, - ffi.Pointer)>>( - 'location_bounds_get_rect_coords'); - late final _location_bounds_get_rect_coords = - _location_bounds_get_rect_coordsPtr.asFunction< - int Function(location_bounds_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the center position and radius of circle bounds. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] bounds The location bounds handle - /// @param[out] center The center position of the circle - /// @param[out] radius The radius of the circle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATION_BOUNDS_ERROR_NONE Successful - /// @retval #LOCATION_BOUNDS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATION_BOUNDS_ERROR_NOT_SUPPORTED Not supported - /// @retval #LOCATION_BOUNDS_ERROR_INCORRECT_TYPE Incorrect bounds type - /// @see location_bounds_create_circle() - int location_bounds_get_circle_coords( - location_bounds_h bounds, - ffi.Pointer center, - ffi.Pointer radius, - ) { - return _location_bounds_get_circle_coords( - bounds, - center, - radius, - ); - } - - late final _location_bounds_get_circle_coordsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(location_bounds_h, ffi.Pointer, - ffi.Pointer)>>('location_bounds_get_circle_coords'); - late final _location_bounds_get_circle_coords = - _location_bounds_get_circle_coordsPtr.asFunction< - int Function(location_bounds_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Get the coordinates of a polygon. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] bounds The location bounds handle - /// @param[in] callback The iteration callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATION_BOUNDS_ERROR_NONE Successful - /// @retval #LOCATION_BOUNDS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATION_BOUNDS_ERROR_NOT_SUPPORTED Not supported - /// @retval #LOCATION_BOUNDS_ERROR_INCORRECT_TYPE Incorrect bounds type - /// @post It invokes polygon_coords_cb() to get coordinates of polygon. - /// @see polygon_coords_cb() - /// @see location_bounds_create_polygon() - int location_bounds_foreach_polygon_coords( - location_bounds_h bounds, - polygon_coords_cb callback, - ffi.Pointer user_data, - ) { - return _location_bounds_foreach_polygon_coords( - bounds, - callback, - user_data, - ); - } - - late final _location_bounds_foreach_polygon_coordsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(location_bounds_h, polygon_coords_cb, - ffi.Pointer)>>( - 'location_bounds_foreach_polygon_coords'); - late final _location_bounds_foreach_polygon_coords = - _location_bounds_foreach_polygon_coordsPtr.asFunction< - int Function( - location_bounds_h, polygon_coords_cb, ffi.Pointer)>(); - - /// @brief Releases the location bounds. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] bounds The location bounds handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATION_BOUNDS_ERROR_NONE Successful - /// @retval #LOCATION_BOUNDS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATION_BOUNDS_ERROR_NOT_SUPPORTED Not supported - /// @see location_bounds_create_rect() - /// @see location_bounds_create_circle() - /// @see location_bounds_create_polygon() - int location_bounds_destroy( - location_bounds_h bounds, - ) { - return _location_bounds_destroy( - bounds, - ); - } - - late final _location_bounds_destroyPtr = - _lookup>( - 'location_bounds_destroy'); - late final _location_bounds_destroy = - _location_bounds_destroyPtr.asFunction(); - - /// @brief Registers a callback function to be invoked when the boundary area is entered or exited. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] bounds The location bounds handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATION_BOUNDS_ERROR_NONE Successful - /// @retval #LOCATION_BOUNDS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATION_BOUNDS_ERROR_NOT_SUPPORTED Not supported - /// @post location_bounds_state_changed_cb() will be invoked. - /// @see location_bounds_unset_state_changed_cb() - /// @see location_bounds_state_changed_cb() - int location_bounds_set_state_changed_cb( - location_bounds_h bounds, - location_bounds_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _location_bounds_set_state_changed_cb( - bounds, - callback, - user_data, - ); - } - - late final _location_bounds_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(location_bounds_h, location_bounds_state_changed_cb, - ffi.Pointer)>>('location_bounds_set_state_changed_cb'); - late final _location_bounds_set_state_changed_cb = - _location_bounds_set_state_changed_cbPtr.asFunction< - int Function(location_bounds_h, location_bounds_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] bounds The location bounds handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATION_BOUNDS_ERROR_NONE Successful - /// @retval #LOCATION_BOUNDS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATION_BOUNDS_ERROR_NOT_SUPPORTED Not supported - /// @see location_bounds_set_state_changed_cb() - int location_bounds_unset_state_changed_cb( - location_bounds_h bounds, - ) { - return _location_bounds_unset_state_changed_cb( - bounds, - ); - } - - late final _location_bounds_unset_state_changed_cbPtr = - _lookup>( - 'location_bounds_unset_state_changed_cb'); - late final _location_bounds_unset_state_changed_cb = - _location_bounds_unset_state_changed_cbPtr - .asFunction(); - - /// @brief Checks whether the given location method is available. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remark The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] method The location method to be checked - /// @return @c true if the specified location method is supported, - /// otherwise @c false if it is not available - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @retval #LOCATIONS_ERROR_INCORRECT_METHOD Incorrect method - /// @see location_manager_create() - /// @see location_manager_get_method() - bool location_manager_is_supported_method( - int method, - ) { - return _location_manager_is_supported_method( - method, - ); - } - - late final _location_manager_is_supported_methodPtr = - _lookup>( - 'location_manager_is_supported_method'); - late final _location_manager_is_supported_method = - _location_manager_is_supported_methodPtr.asFunction(); - - /// @brief Checks whether the given location method is enabled or not on setting. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] method The location method to be checked - /// @param[out] enable The result value of checking the given location method - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INCORRECT_METHOD Incorrect method - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @see location_manager_create() - /// @see location_manager_set_setting_changed_cb() - /// @see location_manager_unset_setting_changed_cb() - int location_manager_is_enabled_method( - int method, - ffi.Pointer enable, - ) { - return _location_manager_is_enabled_method( - method, - enable, - ); - } - - late final _location_manager_is_enabled_methodPtr = _lookup< - ffi - .NativeFunction)>>( - 'location_manager_is_enabled_method'); - late final _location_manager_is_enabled_method = - _location_manager_is_enabled_methodPtr - .asFunction)>(); - - /// @platform - /// @brief Enables the given location method. - /// @since_tizen 2.3.1 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/location.enable - /// @param[in] method The location method to be checked - /// @param[in] enable The value to set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INCORRECT_METHOD Incorrect method - /// @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED Permission denied - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @see location_manager_is_enabled_method() - /// @see location_manager_create() - int location_manager_enable_method( - int method, - bool enable, - ) { - return _location_manager_enable_method( - method, - enable, - ); - } - - late final _location_manager_enable_methodPtr = - _lookup>( - 'location_manager_enable_method'); - late final _location_manager_enable_method = - _location_manager_enable_methodPtr.asFunction(); - - /// @brief Creates a new location manager. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a manager using location_manager_destroy(). - /// @param[in] method The location method - /// @param[out] manager The location manager handle that is newly created - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @see location_manager_destroy() - int location_manager_create( - int method, - ffi.Pointer manager, - ) { - return _location_manager_create( - method, - manager, - ); - } - - late final _location_manager_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, - ffi.Pointer)>>('location_manager_create'); - late final _location_manager_create = _location_manager_createPtr - .asFunction)>(); - - /// @brief Releases the location manager. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] manager The location manager handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @see location_manager_create() - int location_manager_destroy( - location_manager_h manager, - ) { - return _location_manager_destroy( - manager, - ); - } - - late final _location_manager_destroyPtr = - _lookup>( - 'location_manager_destroy'); - late final _location_manager_destroy = _location_manager_destroyPtr - .asFunction(); - - /// @brief Requests to update current location once. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @remarks Do not request to start the location service using the same manager handler. - /// Calling this function invokes a location service event. When the location service is updated, location_updated_cb. - /// @param[in] manager The location manager handle - /// @param[in] timeout Timeout to stop requesting single location after - /// @param[in] callback The location callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_INCORRECT_METHOD Incorrect method - /// @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available - /// @retval #LOCATIONS_ERROR_NETWORK_FAILED Network failed - /// @retval #LOCATIONS_ERROR_GPS_SETTING_OFF GPS is not enabled - /// @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED The application does not have the privilege to call this method - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @post It invokes location_updated_cb(). - int location_manager_request_single_location( - location_manager_h manager, - int timeout, - location_updated_cb callback, - ffi.Pointer user_data, - ) { - return _location_manager_request_single_location( - manager, - timeout, - callback, - user_data, - ); - } - - late final _location_manager_request_single_locationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(location_manager_h, ffi.Int, location_updated_cb, - ffi.Pointer)>>( - 'location_manager_request_single_location'); - late final _location_manager_request_single_location = - _location_manager_request_single_locationPtr.asFunction< - int Function(location_manager_h, int, location_updated_cb, - ffi.Pointer)>(); - - /// @brief Starts the location service. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @remarks There is no limit on number of location managers for which this function was called. - /// @remarks Calling this function invokes a location service event. When the location service is enabled, the service state change callback - /// (set using location_manager_set_service_state_changed_cb()) notifies the user with #LOCATIONS_SERVICE_ENABLED as - /// the first argument, and the service starts. - /// @remarks The started service is a requirement for calling these functions: - /// location_manager_get_position(), location_manager_get_velocity(), location_manager_get_accuracy(), - /// gps_status_get_nmea(), gps_status_get_satellite(), gps_status_foreach_satellites_in_view(). - /// @remarks Once you stop the service using location_manager_stop(), you can no longer call the functions listed above. - /// @remarks Starting and stopping the service is in the scope of the given location manager only (if there is more than one manager, - /// starting and stopping should be executed for each of them separately). - /// @param[in] manager The location manager handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available - /// @retval #LOCATIONS_ERROR_NETWORK_FAILED Network failed - /// @retval #LOCATIONS_ERROR_GPS_SETTING_OFF GPS is not enabled - /// @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED The application does not have the privilege to call this method - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @post It invokes location_position_updated_cb(), location_velocity_updated_cb(), location_zone_changed_cb(), and location_service_state_changed_cb(). - /// @see location_manager_stop() - /// @see location_manager_get_position() - /// @see location_manager_get_velocity() - /// @see location_manager_get_accuracy() - /// @see location_manager_set_service_state_changed_cb() - /// @see location_manager_set_position_updated_cb() - /// @see location_position_updated_cb() - /// @see location_manager_set_velocity_updated_cb() - /// @see location_velocity_updated_cb() - /// @see location_manager_set_zone_changed_cb() - /// @see location_zone_changed_cb() - int location_manager_start( - location_manager_h manager, - ) { - return _location_manager_start( - manager, - ); - } - - late final _location_manager_startPtr = - _lookup>( - 'location_manager_start'); - late final _location_manager_start = - _location_manager_startPtr.asFunction(); - - /// @brief Stops the location service. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This function initiates the process of stopping the service. When the process is finished, callback set using - /// #location_manager_set_service_state_changed_cb() will be called, with #LOCATIONS_SERVICE_DISABLED as first argument. - /// When that happens, the service is stopped and the user is notified. - /// @remarks You can stop and start the location manager as needed. - /// @param[in] manager The location manager handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available - /// @retval #LOCATIONS_ERROR_NETWORK_FAILED Network failed - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @see location_manager_start() - /// @see location_manager_set_service_state_changed_cb() - /// @see location_service_state_changed_cb() - int location_manager_stop( - location_manager_h manager, - ) { - return _location_manager_stop( - manager, - ); - } - - late final _location_manager_stopPtr = - _lookup>( - 'location_manager_stop'); - late final _location_manager_stop = - _location_manager_stopPtr.asFunction(); - - /// @brief Adds bounds for a given location manager. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] manager The location manager handle - /// @param[in] bounds The location bounds handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @post It invokes location_manager_set_zone_changed_cb() when a boundary is entered or exited, if you set a callback with location_manager_set_zone_changed_cb(). - /// @see location_manager_remove_boundary() - /// @see location_manager_set_zone_changed_cb() - int location_manager_add_boundary( - location_manager_h manager, - location_bounds_h bounds, - ) { - return _location_manager_add_boundary( - manager, - bounds, - ); - } - - late final _location_manager_add_boundaryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(location_manager_h, - location_bounds_h)>>('location_manager_add_boundary'); - late final _location_manager_add_boundary = _location_manager_add_boundaryPtr - .asFunction(); - - /// @brief Deletes bounds for a given location manager. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] manager The location manager handle - /// @param[in] bounds The location bounds handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @see location_manager_add_boundary() - int location_manager_remove_boundary( - location_manager_h manager, - location_bounds_h bounds, - ) { - return _location_manager_remove_boundary( - manager, - bounds, - ); - } - - late final _location_manager_remove_boundaryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(location_manager_h, - location_bounds_h)>>('location_manager_remove_boundary'); - late final _location_manager_remove_boundary = - _location_manager_remove_boundaryPtr - .asFunction(); - - /// @brief Retrieves all location bounds by invoking a specific callback for each location bounds - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] manager The location manager handle - /// @param[in] callback The iteration callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @post location_bounds_cb() will be invoked. - /// @see location_manager_add_boundary() - /// @see location_manager_remove_boundary() - /// @see location_bounds_cb() - int location_manager_foreach_boundary( - location_manager_h manager, - location_bounds_cb callback, - ffi.Pointer user_data, - ) { - return _location_manager_foreach_boundary( - manager, - callback, - user_data, - ); - } - - late final _location_manager_foreach_boundaryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(location_manager_h, location_bounds_cb, - ffi.Pointer)>>('location_manager_foreach_boundary'); - late final _location_manager_foreach_boundary = - _location_manager_foreach_boundaryPtr.asFunction< - int Function( - location_manager_h, location_bounds_cb, ffi.Pointer)>(); - - /// @brief Gets the given location manager's method. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] manager The location manager handle - /// @param[out] method The location method - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @see location_manager_create() - int location_manager_get_method( - location_manager_h manager, - ffi.Pointer method, - ) { - return _location_manager_get_method( - manager, - method, - ); - } - - late final _location_manager_get_methodPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(location_manager_h, - ffi.Pointer)>>('location_manager_get_method'); - late final _location_manager_get_method = _location_manager_get_methodPtr - .asFunction)>(); - - /// @brief Gets the current position information. - /// @details The result contains the current altitude, latitude, and longitude with a measurement timestamp. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @param[in] manager The location manager handle - /// @param[out] altitude The current altitude (meters) - /// @param[out] latitude The current latitude [-90.0 ~ 90.0] (degrees) - /// @param[out] longitude The current longitude [-180.0 ~ 180.0] (degrees) - /// @param[out] timestamp The timestamp (time when measurement took place or @c 0 if valid) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid argument - /// @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available - /// @retval #LOCATIONS_ERROR_GPS_SETTING_OFF GPS is not enabled - /// @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED The application does not have the privilege to call this method - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @pre The location service state must be #LOCATIONS_SERVICE_ENABLED with location_manager_start(). - int location_manager_get_position( - location_manager_h manager, - ffi.Pointer altitude, - ffi.Pointer latitude, - ffi.Pointer longitude, - ffi.Pointer timestamp, - ) { - return _location_manager_get_position( - manager, - altitude, - latitude, - longitude, - timestamp, - ); - } - - late final _location_manager_get_positionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - location_manager_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('location_manager_get_position'); - late final _location_manager_get_position = - _location_manager_get_positionPtr.asFunction< - int Function( - location_manager_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the current position information. - /// @details The result contains the current altitude, latitude, longitude, climb, direction, speed, level, horizontal, and vertical with a measurement timestamp. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @param[in] manager The location manager handle - /// @param[out] altitude The current altitude (meters) - /// @param[out] latitude The current latitude [-90.0 ~ 90.0] (degrees) - /// @param[out] longitude The current longitude [-180.0 ~ 180.0] (degrees) - /// @param[out] climb The climb (km/h) - /// @param[out] direction The direction, degrees from the north - /// @param[out] speed The speed (km/h) - /// @param[out] level The accuracy level - /// @param[out] horizontal The horizontal accuracy (meters) - /// @param[out] vertical The vertical accuracy (meters) - /// @param[out] timestamp The timestamp (time when measurement took place or @c 0 if valid) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid argument - /// @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available - /// @retval #LOCATIONS_ERROR_GPS_SETTING_OFF GPS is not enabled - /// @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED The application does not have the privilege to call this method - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @pre The location service state must be #LOCATIONS_SERVICE_ENABLED with location_manager_start(). - int location_manager_get_location( - location_manager_h manager, - ffi.Pointer altitude, - ffi.Pointer latitude, - ffi.Pointer longitude, - ffi.Pointer climb, - ffi.Pointer direction, - ffi.Pointer speed, - ffi.Pointer level, - ffi.Pointer horizontal, - ffi.Pointer vertical, - ffi.Pointer timestamp, - ) { - return _location_manager_get_location( - manager, - altitude, - latitude, - longitude, - climb, - direction, - speed, - level, - horizontal, - vertical, - timestamp, - ); - } - - late final _location_manager_get_locationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - location_manager_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('location_manager_get_location'); - late final _location_manager_get_location = - _location_manager_get_locationPtr.asFunction< - int Function( - location_manager_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the current velocity information. - /// @details The result contains the current climb, direction, and speed with a measurement timestamp. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @param[in] manager The location manager handle - /// @param[out] climb The climb (km/h) - /// @param[out] direction The direction, degrees from the north - /// @param[out] speed The speed (km/h) - /// @param[out] timestamp The timestamp (time when measurement took place or @c 0 if valid) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid argument - /// @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available - /// @retval #LOCATIONS_ERROR_GPS_SETTING_OFF GPS is not enabled - /// @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED The application does not have the privilege to call this method - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @pre The location service state must be #LOCATIONS_SERVICE_ENABLED with location_manager_start(). - int location_manager_get_velocity( - location_manager_h manager, - ffi.Pointer climb, - ffi.Pointer direction, - ffi.Pointer speed, - ffi.Pointer timestamp, - ) { - return _location_manager_get_velocity( - manager, - climb, - direction, - speed, - timestamp, - ); - } - - late final _location_manager_get_velocityPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - location_manager_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('location_manager_get_velocity'); - late final _location_manager_get_velocity = - _location_manager_get_velocityPtr.asFunction< - int Function( - location_manager_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the current accuracy information. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @param[in] manager The location manager handle - /// @param[out] level The accuracy level - /// @param[out] horizontal The horizontal accuracy (meters) - /// @param[out] vertical The vertical accuracy (meters) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid argument - /// @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available - /// @retval #LOCATIONS_ERROR_GPS_SETTING_OFF GPS is not enabled - /// @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED The application does not have the privilege to call this method - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @pre The location service state must be #LOCATIONS_SERVICE_ENABLED with location_manager_start(). - int location_manager_get_accuracy( - location_manager_h manager, - ffi.Pointer level, - ffi.Pointer horizontal, - ffi.Pointer vertical, - ) { - return _location_manager_get_accuracy( - manager, - level, - horizontal, - vertical, - ); - } - - late final _location_manager_get_accuracyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - location_manager_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('location_manager_get_accuracy'); - late final _location_manager_get_accuracy = - _location_manager_get_accuracyPtr.asFunction< - int Function(location_manager_h, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the last position information which is recorded. - /// @details The @a altitude, @a latitude, @a longitude, and @c timestamp values should be 0, if there is no record of any previous position information. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @param[in] manager The location manager handle - /// @param[out] altitude The last altitude (meters) - /// @param[out] latitude The last latitude [-90.0 ~ 90.0] (degrees) - /// @param[out] longitude The last longitude [-180.0 ~ 180.0] (degrees) - /// @param[out] timestamp The timestamp (time when measurement took place or @c 0 if valid) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid argument - /// @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED The application does not have the privilege to call this method - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @pre The location manager handle must be created by location_manager_create(). - int location_manager_get_last_position( - location_manager_h manager, - ffi.Pointer altitude, - ffi.Pointer latitude, - ffi.Pointer longitude, - ffi.Pointer timestamp, - ) { - return _location_manager_get_last_position( - manager, - altitude, - latitude, - longitude, - timestamp, - ); - } - - late final _location_manager_get_last_positionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - location_manager_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('location_manager_get_last_position'); - late final _location_manager_get_last_position = - _location_manager_get_last_positionPtr.asFunction< - int Function( - location_manager_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the last location information. - /// @details The @a altitude, @a latitude, @a longitude, @a climb, @a direction, @a speed, and @c timestamp values should be 0, if there is no record of any previous position information. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @param[in] manager The location manager handle - /// @param[out] altitude The current altitude (meters) - /// @param[out] latitude The current latitude [-90.0 ~ 90.0] (degrees) - /// @param[out] longitude The current longitude [-180.0 ~ 180.0] (degrees) - /// @param[out] climb The climb (km/h) - /// @param[out] direction The direction, degrees from the north - /// @param[out] speed The speed (km/h) - /// @param[out] level The accuracy level - /// @param[out] horizontal The horizontal accuracy (meters) - /// @param[out] vertical The vertical accuracy (meters) - /// @param[out] timestamp The timestamp (time when measurement took place or @c 0 if valid) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid argument - /// @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED The application does not have the privilege to call this method - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @pre The location manager handle must be created by location_manager_create(). - int location_manager_get_last_location( - location_manager_h manager, - ffi.Pointer altitude, - ffi.Pointer latitude, - ffi.Pointer longitude, - ffi.Pointer climb, - ffi.Pointer direction, - ffi.Pointer speed, - ffi.Pointer level, - ffi.Pointer horizontal, - ffi.Pointer vertical, - ffi.Pointer timestamp, - ) { - return _location_manager_get_last_location( - manager, - altitude, - latitude, - longitude, - climb, - direction, - speed, - level, - horizontal, - vertical, - timestamp, - ); - } - - late final _location_manager_get_last_locationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - location_manager_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('location_manager_get_last_location'); - late final _location_manager_get_last_location = - _location_manager_get_last_locationPtr.asFunction< - int Function( - location_manager_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the last velocity information which is recorded. - /// @details The @a climb, @a direction, and @a speed values should be @c 0, if there is no record of any previous velocity information. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @param[in] manager The location manager handle - /// @param[out] climb The last climb (km/h) - /// @param[out] direction The last direction, degrees from the north - /// @param[out] speed The last speed (km/h) - /// @param[out] timestamp The timestamp (time when measurement took place or @c 0 if valid) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid argument - /// @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED The application does not have the privilege to call this method - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @pre The location manager handle must be created by location_manager_create(). - int location_manager_get_last_velocity( - location_manager_h manager, - ffi.Pointer climb, - ffi.Pointer direction, - ffi.Pointer speed, - ffi.Pointer timestamp, - ) { - return _location_manager_get_last_velocity( - manager, - climb, - direction, - speed, - timestamp, - ); - } - - late final _location_manager_get_last_velocityPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - location_manager_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('location_manager_get_last_velocity'); - late final _location_manager_get_last_velocity = - _location_manager_get_last_velocityPtr.asFunction< - int Function( - location_manager_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the last accuracy information which is recorded. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @param[in] manager The location manager handle - /// @param[out] level The last accuracy level - /// @param[out] horizontal The last horizontal accuracy (meters) - /// @param[out] vertical The last vertical accuracy (meters) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid argument - /// @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED The application does not have the privilege to call this method - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @pre The location manager handle must be created by location_manager_create(). - int location_manager_get_last_accuracy( - location_manager_h manager, - ffi.Pointer level, - ffi.Pointer horizontal, - ffi.Pointer vertical, - ) { - return _location_manager_get_last_accuracy( - manager, - level, - horizontal, - vertical, - ); - } - - late final _location_manager_get_last_accuracyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - location_manager_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('location_manager_get_last_accuracy'); - late final _location_manager_get_last_accuracy = - _location_manager_get_last_accuracyPtr.asFunction< - int Function(location_manager_h, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - /// @deprecated Deprecated since 3.0 - /// @brief Gets the current application's location accessibility status. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[out] state The current location service accessibility status - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid argument - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - int location_manager_get_accessibility_state( - ffi.Pointer state, - ) { - return _location_manager_get_accessibility_state( - state, - ); - } - - late final _location_manager_get_accessibility_statePtr = - _lookup)>>( - 'location_manager_get_accessibility_state'); - late final _location_manager_get_accessibility_state = - _location_manager_get_accessibility_statePtr - .asFunction)>(); - - /// @brief Registers a callback function to be invoked at defined interval with updated position information. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] manager The location manager handle - /// @param[in] callback The callback function to register - /// @param[in] interval The interval [1 ~ 120] (seconds) - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @post location_position_updated_cb() will be invoked. - /// @see location_manager_unset_position_updated_cb() - /// @see location_position_updated_cb() - int location_manager_set_position_updated_cb( - location_manager_h manager, - location_position_updated_cb callback, - int interval, - ffi.Pointer user_data, - ) { - return _location_manager_set_position_updated_cb( - manager, - callback, - interval, - user_data, - ); - } - - late final _location_manager_set_position_updated_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(location_manager_h, location_position_updated_cb, - ffi.Int, ffi.Pointer)>>( - 'location_manager_set_position_updated_cb'); - late final _location_manager_set_position_updated_cb = - _location_manager_set_position_updated_cbPtr.asFunction< - int Function(location_manager_h, location_position_updated_cb, int, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] manager The location manager handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @see location_manager_set_position_updated_cb() - int location_manager_unset_position_updated_cb( - location_manager_h manager, - ) { - return _location_manager_unset_position_updated_cb( - manager, - ); - } - - late final _location_manager_unset_position_updated_cbPtr = - _lookup>( - 'location_manager_unset_position_updated_cb'); - late final _location_manager_unset_position_updated_cb = - _location_manager_unset_position_updated_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be invoked at defined interval with updated velocity information. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] manager The location manager handle - /// @param[in] callback The callback function to register - /// @param[in] interval The interval [1 ~ 120] (seconds) - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @post location_velocity_updated_cb() will be invoked. - /// @see location_manager_unset_velocity_updated_cb() - /// @see location_velocity_updated_cb() - int location_manager_set_velocity_updated_cb( - location_manager_h manager, - location_velocity_updated_cb callback, - int interval, - ffi.Pointer user_data, - ) { - return _location_manager_set_velocity_updated_cb( - manager, - callback, - interval, - user_data, - ); - } - - late final _location_manager_set_velocity_updated_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(location_manager_h, location_velocity_updated_cb, - ffi.Int, ffi.Pointer)>>( - 'location_manager_set_velocity_updated_cb'); - late final _location_manager_set_velocity_updated_cb = - _location_manager_set_velocity_updated_cbPtr.asFunction< - int Function(location_manager_h, location_velocity_updated_cb, int, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] manager The location manager handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @see location_manager_set_velocity_updated_cb() - int location_manager_unset_velocity_updated_cb( - location_manager_h manager, - ) { - return _location_manager_unset_velocity_updated_cb( - manager, - ); - } - - late final _location_manager_unset_velocity_updated_cbPtr = - _lookup>( - 'location_manager_unset_velocity_updated_cb'); - late final _location_manager_unset_velocity_updated_cb = - _location_manager_unset_velocity_updated_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be invoked when the location service state is changed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] manager The location manager handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @post location_service_state_changed_cb() will be invoked. - /// @see location_manager_unset_service_state_changed_cb() - /// @see location_service_state_changed_cb() - /// @see location_manager_start() - /// @see location_manager_stop() - /// @see #location_service_state_e - int location_manager_set_service_state_changed_cb( - location_manager_h manager, - location_service_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _location_manager_set_service_state_changed_cb( - manager, - callback, - user_data, - ); - } - - late final _location_manager_set_service_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(location_manager_h, - location_service_state_changed_cb, ffi.Pointer)>>( - 'location_manager_set_service_state_changed_cb'); - late final _location_manager_set_service_state_changed_cb = - _location_manager_set_service_state_changed_cbPtr.asFunction< - int Function(location_manager_h, location_service_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] manager The location manager handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @see location_manager_set_service_state_changed_cb() - int location_manager_unset_service_state_changed_cb( - location_manager_h manager, - ) { - return _location_manager_unset_service_state_changed_cb( - manager, - ); - } - - late final _location_manager_unset_service_state_changed_cbPtr = - _lookup>( - 'location_manager_unset_service_state_changed_cb'); - late final _location_manager_unset_service_state_changed_cb = - _location_manager_unset_service_state_changed_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be invoked when the previously set boundary area is entered or left. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] manager The location manager handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @pre location_manager_add_boundary() is called before. - /// @post location_zone_changed_cb() will be invoked. - /// @see location_manager_unset_zone_changed_cb() - /// @see location_zone_changed_cb() - int location_manager_set_zone_changed_cb( - location_manager_h manager, - location_zone_changed_cb callback, - ffi.Pointer user_data, - ) { - return _location_manager_set_zone_changed_cb( - manager, - callback, - user_data, - ); - } - - late final _location_manager_set_zone_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(location_manager_h, location_zone_changed_cb, - ffi.Pointer)>>('location_manager_set_zone_changed_cb'); - late final _location_manager_set_zone_changed_cb = - _location_manager_set_zone_changed_cbPtr.asFunction< - int Function(location_manager_h, location_zone_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] manager The location manager handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @see location_manager_set_zone_changed_cb() - int location_manager_unset_zone_changed_cb( - location_manager_h manager, - ) { - return _location_manager_unset_zone_changed_cb( - manager, - ); - } - - late final _location_manager_unset_zone_changed_cbPtr = - _lookup>( - 'location_manager_unset_zone_changed_cb'); - late final _location_manager_unset_zone_changed_cb = - _location_manager_unset_zone_changed_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be invoked when the location setting is changed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] method The method to observe - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_INCORRECT_METHOD Incorrect method - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @post location_setting_changed_cb() will be invoked. - /// @see location_manager_unset_setting_changed_cb() - /// @see location_setting_changed_cb() - int location_manager_set_setting_changed_cb( - int method, - location_setting_changed_cb callback, - ffi.Pointer user_data, - ) { - return _location_manager_set_setting_changed_cb( - method, - callback, - user_data, - ); - } - - late final _location_manager_set_setting_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, location_setting_changed_cb, - ffi.Pointer)>>( - 'location_manager_set_setting_changed_cb'); - late final _location_manager_set_setting_changed_cb = - _location_manager_set_setting_changed_cbPtr.asFunction< - int Function( - int, location_setting_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] method The method to observe - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_INCORRECT_METHOD Incorrect method - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @see location_manager_set_setting_changed_cb() - int location_manager_unset_setting_changed_cb( - int method, - ) { - return _location_manager_unset_setting_changed_cb( - method, - ); - } - - late final _location_manager_unset_setting_changed_cbPtr = - _lookup>( - 'location_manager_unset_setting_changed_cb'); - late final _location_manager_unset_setting_changed_cb = - _location_manager_unset_setting_changed_cbPtr - .asFunction(); - - /// @brief Gets the distance in meters between two locations. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] start_latitude The starting latitude [-90.0 ~ 90.0] (degrees) - /// @param[in] start_longitude The starting longitude [-180.0 ~ 180.0] (degrees) - /// @param[in] end_latitude The ending latitude [-90.0 ~ 90.0] (degrees) - /// @param[in] end_longitude The ending longitude [-180.0 ~ 180.0] (degrees) - /// @param[out] distance The distance between two locations (meters) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid argument - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - int location_manager_get_distance( - double start_latitude, - double start_longitude, - double end_latitude, - double end_longitude, - ffi.Pointer distance, - ) { - return _location_manager_get_distance( - start_latitude, - start_longitude, - end_latitude, - end_longitude, - distance, - ); - } - - late final _location_manager_get_distancePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Double, ffi.Double, ffi.Double, ffi.Double, - ffi.Pointer)>>('location_manager_get_distance'); - late final _location_manager_get_distance = - _location_manager_get_distancePtr.asFunction< - int Function( - double, double, double, double, ffi.Pointer)>(); - - /// @brief Registers a callback function to be invoked at minimum interval or minimum distance with updated position information. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] manager The location manager handle - /// @param[in] callback The callback function to register - /// @param[in] interval The minimum interval between position updates [1 ~ 120] (seconds) - /// @param[in] distance The minimum distance between position updates [1 ~ 120] (meters) - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @post location_changed_cb() will be invoked. - /// @see location_manager_unset_distance_based_location_changed_cb() - /// @see location_changed_cb() - int location_manager_set_distance_based_location_changed_cb( - location_manager_h manager, - location_changed_cb callback, - int interval, - double distance, - ffi.Pointer user_data, - ) { - return _location_manager_set_distance_based_location_changed_cb( - manager, - callback, - interval, - distance, - user_data, - ); - } - - late final _location_manager_set_distance_based_location_changed_cbPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(location_manager_h, location_changed_cb, - ffi.Int, ffi.Double, ffi.Pointer)>>( - 'location_manager_set_distance_based_location_changed_cb'); - late final _location_manager_set_distance_based_location_changed_cb = - _location_manager_set_distance_based_location_changed_cbPtr.asFunction< - int Function(location_manager_h, location_changed_cb, int, double, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] manager The location manager handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @see location_manager_set_distance_based_location_changed_cb() - int location_manager_unset_distance_based_location_changed_cb( - location_manager_h manager, - ) { - return _location_manager_unset_distance_based_location_changed_cb( - manager, - ); - } - - late final _location_manager_unset_distance_based_location_changed_cbPtr = - _lookup>( - 'location_manager_unset_distance_based_location_changed_cb'); - late final _location_manager_unset_distance_based_location_changed_cb = - _location_manager_unset_distance_based_location_changed_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be invoked at defined interval with updated location information. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] manager The location manager handle - /// @param[in] callback The callback function to register - /// @param[in] interval The interval [1 ~ 120] (seconds) - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @post location_changed_cb() will be invoked. - /// @see location_manager_unset_location_changed_cb() - /// @see location_changed_cb() - int location_manager_set_location_changed_cb( - location_manager_h manager, - location_changed_cb callback, - int interval, - ffi.Pointer user_data, - ) { - return _location_manager_set_location_changed_cb( - manager, - callback, - interval, - user_data, - ); - } - - late final _location_manager_set_location_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(location_manager_h, location_changed_cb, ffi.Int, - ffi.Pointer)>>( - 'location_manager_set_location_changed_cb'); - late final _location_manager_set_location_changed_cb = - _location_manager_set_location_changed_cbPtr.asFunction< - int Function(location_manager_h, location_changed_cb, int, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] manager The location manager handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @see location_manager_set_location_changed_cb() - int location_manager_unset_location_changed_cb( - location_manager_h manager, - ) { - return _location_manager_unset_location_changed_cb( - manager, - ); - } - - late final _location_manager_unset_location_changed_cbPtr = - _lookup>( - 'location_manager_unset_location_changed_cb'); - late final _location_manager_unset_location_changed_cb = - _location_manager_unset_location_changed_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be invoked when batch_period is expired. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @remarks The batch_period should be greater than or equal to the batch_interval. - /// In addition, sometimes the period may not work as you intended, the maximum permissible value for batch_period is device specific. - /// @param[in] manager The location manager handle - /// @param[in] callback The callback function to register - /// @param[in] batch_interval The batch sampling interval [1 ~ 255] (seconds) - /// @param[in] batch_period The batch period [1 ~ 60000] (seconds) - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @post location_batch_cb() will be invoked. - /// @see location_manager_start_batch() - /// @see location_batch_cb() - /// @see location_manager_unset_location_batch_cb() - int location_manager_set_location_batch_cb( - location_manager_h manager, - location_batch_cb callback, - int batch_interval, - int batch_period, - ffi.Pointer user_data, - ) { - return _location_manager_set_location_batch_cb( - manager, - callback, - batch_interval, - batch_period, - user_data, - ); - } - - late final _location_manager_set_location_batch_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(location_manager_h, location_batch_cb, ffi.Int, - ffi.Int, ffi.Pointer)>>( - 'location_manager_set_location_batch_cb'); - late final _location_manager_set_location_batch_cb = - _location_manager_set_location_batch_cbPtr.asFunction< - int Function(location_manager_h, location_batch_cb, int, int, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @param[in] manager The location manager handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @see location_manager_set_location_batch_cb() - int location_manager_unset_location_batch_cb( - location_manager_h manager, - ) { - return _location_manager_unset_location_batch_cb( - manager, - ); - } - - late final _location_manager_unset_location_batch_cbPtr = - _lookup>( - 'location_manager_unset_location_batch_cb'); - late final _location_manager_unset_location_batch_cb = - _location_manager_unset_location_batch_cbPtr - .asFunction(); - - /// @brief Starts the location batch service. - /// @details Calling this function starts location batch service, location_batch_cb() will be invoked every @a batch_period seconds. - /// After that, you can obtain all locations with location_manager_foreach_location_batch(). - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @remarks Calling this function invokes a location service event. When the location service is enabled, the service state change callback - /// (set using location_manager_set_service_state_changed_cb()) notifies the user with #LOCATIONS_SERVICE_ENABLED as the first argument, and the service starts. - /// @param[in] manager The location manager handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_INCORRECT_METHOD Incorrect method - /// @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available - /// @retval #LOCATIONS_ERROR_NETWORK_FAILED Network failed - /// @retval #LOCATIONS_ERROR_GPS_SETTING_OFF GPS is not enabled - /// @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED The application does not have the privilege to call this method - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @pre location_manager_set_location_batch_cb() - /// @see location_manager_set_service_state_changed_cb() - /// @see location_service_state_changed_cb() - /// @see location_manager_foreach_location_batch() - /// @see location_manager_stop_batch() - int location_manager_start_batch( - location_manager_h manager, - ) { - return _location_manager_start_batch( - manager, - ); - } - - late final _location_manager_start_batchPtr = - _lookup>( - 'location_manager_start_batch'); - late final _location_manager_start_batch = _location_manager_start_batchPtr - .asFunction(); - - /// @brief Stops the location batch service. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @remarks This function initiates the process of stopping the service. When the process is finished, callback set using - /// #location_manager_set_service_state_changed_cb() will be called, with #LOCATIONS_SERVICE_DISABLED as the first argument. - /// @param[in] manager The location manager handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available - /// @retval #LOCATIONS_ERROR_NETWORK_FAILED Network failed - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @see location_manager_start_batch() - /// @see location_manager_set_service_state_changed_cb() - /// @see location_service_state_changed_cb() - int location_manager_stop_batch( - location_manager_h manager, - ) { - return _location_manager_stop_batch( - manager, - ); - } - - late final _location_manager_stop_batchPtr = - _lookup>( - 'location_manager_stop_batch'); - late final _location_manager_stop_batch = _location_manager_stop_batchPtr - .asFunction(); - - /// @brief Retrieves all location information by invoking a specific callback for each location data. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @param[in] manager The location manager handle - /// @param[in] callback The iteration callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED The application does not have the privilege to call this method - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @pre location_manager_foreach_location_batch() is available after location_batch_cb() is invoked. - /// @post location_batch_get_location_cb() will be invoked. - /// @see location_manager_start_batch() - /// @see location_batch_cb() - /// @see location_batch_get_location_cb() - int location_manager_foreach_location_batch( - location_manager_h manager, - location_batch_get_location_cb callback, - ffi.Pointer user_data, - ) { - return _location_manager_foreach_location_batch( - manager, - callback, - user_data, - ); - } - - late final _location_manager_foreach_location_batchPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(location_manager_h, - location_batch_get_location_cb, ffi.Pointer)>>( - 'location_manager_foreach_location_batch'); - late final _location_manager_foreach_location_batch = - _location_manager_foreach_location_batchPtr.asFunction< - int Function(location_manager_h, location_batch_get_location_cb, - ffi.Pointer)>(); - - /// @brief Checks whether the mock location is enabled. - /// @since_tizen 3.0 - /// @param[out] enabled Indicates whether the mock location is enabled - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @see location_manager_enable_mock_location() - /// @see location_manager_set_mock_location() - /// @see location_manager_clear_mock_location() - int location_manager_is_enabled_mock_location( - ffi.Pointer enabled, - ) { - return _location_manager_is_enabled_mock_location( - enabled, - ); - } - - late final _location_manager_is_enabled_mock_locationPtr = - _lookup)>>( - 'location_manager_is_enabled_mock_location'); - late final _location_manager_is_enabled_mock_location = - _location_manager_is_enabled_mock_locationPtr - .asFunction)>(); - - /// @brief Enables mock location. - /// @details The mock location is a testing function to make location API and callback deliver a mock location - /// set by location_manager_set_mock_location() instead of real positioning data even in the other applications. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @remarks The mock location can only be enabled if developer mode is enabled. - /// @param[in] enable The value to set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_SETTING_OFF MOCK location is not enabled - /// @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED Permission denied - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @see location_manager_is_enabled_mock_location() - /// @see location_manager_set_mock_location() - /// @see location_manager_clear_mock_location() - int location_manager_enable_mock_location( - bool enable, - ) { - return _location_manager_enable_mock_location( - enable, - ); - } - - late final _location_manager_enable_mock_locationPtr = - _lookup>( - 'location_manager_enable_mock_location'); - late final _location_manager_enable_mock_location = - _location_manager_enable_mock_locationPtr - .asFunction(); - - /// @brief Sets a mock location for the given location method. - /// @details The location sets the given altitude, latitude, longitude, climb, direction, speed, level, horizontal, and vertical accuracy. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @param[in] manager The location manager handle - /// @param[in] latitude The current latitude [-90.0 ~ 90.0] (degrees) - /// @param[in] longitude The current longitude [-180.0 ~ 180.0] (degrees) - /// @param[in] altitude The current altitude (meters) - /// @param[in] speed The speed (km/h) - /// @param[in] direction The direction, degrees from the north [0.0 ~ 360.0] - /// @param[in] accuracy The horizontal accuracy (meters) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid argument - /// @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available - /// @retval #LOCATIONS_ERROR_SETTING_OFF MOCK location is not enabled - /// @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED The application does not have the privilege to call this method - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @see location_manager_create() - /// @see location_manager_is_enabled_mock_location() - /// @see location_manager_enable_mock_location() - /// @see location_manager_clear_mock_location() - int location_manager_set_mock_location( - location_manager_h manager, - double latitude, - double longitude, - double altitude, - double speed, - double direction, - double accuracy, - ) { - return _location_manager_set_mock_location( - manager, - latitude, - longitude, - altitude, - speed, - direction, - accuracy, - ); - } - - late final _location_manager_set_mock_locationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - location_manager_h, - ffi.Double, - ffi.Double, - ffi.Double, - ffi.Double, - ffi.Double, - ffi.Double)>>('location_manager_set_mock_location'); - late final _location_manager_set_mock_location = - _location_manager_set_mock_locationPtr.asFunction< - int Function(location_manager_h, double, double, double, double, - double, double)>(); - - /// @brief Clears a mock location. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @param[in] manager The location manager handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid argument - /// @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available - /// @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED The application does not have the privilege to call this method - /// @retval #LOCATIONS_ERROR_SETTING_OFF MOCK location is not enabled - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @see location_manager_create() - /// @see location_manager_is_enabled_mock_location() - /// @see location_manager_enable_mock_location() - /// @see location_manager_set_mock_location() - int location_manager_clear_mock_location( - location_manager_h manager, - ) { - return _location_manager_clear_mock_location( - manager, - ); - } - - late final _location_manager_clear_mock_locationPtr = - _lookup>( - 'location_manager_clear_mock_location'); - late final _location_manager_clear_mock_location = - _location_manager_clear_mock_locationPtr - .asFunction(); - - /// @brief Changes behavior of the location source selection in the fused location method. - /// @since_tizen 4.0 - /// @param[in] manager The location manager handle - /// @param[in] mode The fused mode. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_INCORRECT_METHOD Incorrect method - /// @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE The service is not available - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @see location_manager_create() - int location_manager_set_fused_mode( - location_manager_h manager, - int mode, - ) { - return _location_manager_set_fused_mode( - manager, - mode, - ); - } - - late final _location_manager_set_fused_modePtr = _lookup< - ffi.NativeFunction>( - 'location_manager_set_fused_mode'); - late final _location_manager_set_fused_mode = - _location_manager_set_fused_modePtr - .asFunction(); - - /// @brief Gets the GPS NMEA data. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This call is valid only for location managers with #LOCATIONS_METHOD_GPS method. - /// You must release @a nmea using @c free(). - /// @param[in] manager The location manager handle - /// @param[out] nmea The NMEA data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid argument - /// @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available - /// @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED The application does not have the privilege to call this method - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @pre The location service state must be #LOCATIONS_SERVICE_ENABLED with location_manager_start(). - /// @see location_manager_start() - int gps_status_get_nmea( - location_manager_h manager, - ffi.Pointer> nmea, - ) { - return _gps_status_get_nmea( - manager, - nmea, - ); - } - - late final _gps_status_get_nmeaPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(location_manager_h, - ffi.Pointer>)>>('gps_status_get_nmea'); - late final _gps_status_get_nmea = _gps_status_get_nmeaPtr.asFunction< - int Function(location_manager_h, ffi.Pointer>)>(); - - /// @brief Gets the information of satellites. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @remarks This call is valid only for location managers with #LOCATIONS_METHOD_GPS method. - /// @param[in] manager The location manager handle - /// @param[out] num_of_active The number of active satellites - /// @param[out] num_of_inview The number of satellites in view - /// @param[out] timestamp The timestamp (time when measurement took place or @c 0 if valid) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid argument - /// @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available - /// @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED The application does not have the privilege to call this method - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @pre The location service state must be #LOCATIONS_SERVICE_ENABLED with location_manager_start(). - /// @pre The gps_status_satellite_updated_cb must be set with gps_status_set_satellite_updated_cb(). - /// @see gps_status_foreach_satellites_in_view() - int gps_status_get_satellite( - location_manager_h manager, - ffi.Pointer num_of_active, - ffi.Pointer num_of_inview, - ffi.Pointer timestamp, - ) { - return _gps_status_get_satellite( - manager, - num_of_active, - num_of_inview, - timestamp, - ); - } - - late final _gps_status_get_satellitePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - location_manager_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('gps_status_get_satellite'); - late final _gps_status_get_satellite = - _gps_status_get_satellitePtr.asFunction< - int Function(location_manager_h, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Registers a callback function to be invoked at defined interval with updated satellite information. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @param[in] manager The location manager handle - /// @param[in] callback The callback function to register - /// @param[in] interval The interval [1 ~ 120] (seconds) - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED The application does not have the privilege to call this method - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @post gps_status_satellite_updated_cb() will be invoked. - /// @see gps_status_unset_satellite_updated_cb() - /// @see gps_status_satellite_updated_cb() - /// @see gps_status_get_satellite() - /// @see gps_status_foreach_satellites_in_view() - /// @see gps_status_get_last_satellite() - /// @see gps_status_foreach_last_satellites_in_view() - int gps_status_set_satellite_updated_cb( - location_manager_h manager, - gps_status_satellite_updated_cb callback, - int interval, - ffi.Pointer user_data, - ) { - return _gps_status_set_satellite_updated_cb( - manager, - callback, - interval, - user_data, - ); - } - - late final _gps_status_set_satellite_updated_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - location_manager_h, - gps_status_satellite_updated_cb, - ffi.Int, - ffi.Pointer)>>('gps_status_set_satellite_updated_cb'); - late final _gps_status_set_satellite_updated_cb = - _gps_status_set_satellite_updated_cbPtr.asFunction< - int Function(location_manager_h, gps_status_satellite_updated_cb, int, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] manager The location manager handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @see gps_status_set_satellite_updated_cb() - int gps_status_unset_satellite_updated_cb( - location_manager_h manager, - ) { - return _gps_status_unset_satellite_updated_cb( - manager, - ); - } - - late final _gps_status_unset_satellite_updated_cbPtr = - _lookup>( - 'gps_status_unset_satellite_updated_cb'); - late final _gps_status_unset_satellite_updated_cb = - _gps_status_unset_satellite_updated_cbPtr - .asFunction(); - - /// @brief Invokes the callback function for each satellite. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @remarks This function is valid only for location managers with the #LOCATIONS_METHOD_GPS method. - /// @param[in] manager The location manager handle - /// @param[in] callback The iteration callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid argument - /// @retval #LOCATIONS_ERROR_INCORRECT_METHOD Incorrect method - /// @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available - /// @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED The application does not have the privilege to call this method - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @pre The location service state must be #LOCATIONS_SERVICE_ENABLED with location_manager_start(). - /// @pre The gps_status_satellite_updated_cb must be set with gps_status_set_satellite_updated_cb(). - /// @post It invokes gps_status_get_satellites_cb(). - /// @see gps_status_get_satellite() - /// @see gps_status_get_satellites_cb() - int gps_status_foreach_satellites_in_view( - location_manager_h manager, - gps_status_get_satellites_cb callback, - ffi.Pointer user_data, - ) { - return _gps_status_foreach_satellites_in_view( - manager, - callback, - user_data, - ); - } - - late final _gps_status_foreach_satellites_in_viewPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(location_manager_h, gps_status_get_satellites_cb, - ffi.Pointer)>>('gps_status_foreach_satellites_in_view'); - late final _gps_status_foreach_satellites_in_view = - _gps_status_foreach_satellites_in_viewPtr.asFunction< - int Function(location_manager_h, gps_status_get_satellites_cb, - ffi.Pointer)>(); - - /// @brief Gets the last information of satellites. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @remarks This call is valid only for location managers with #LOCATIONS_METHOD_GPS method. - /// @param[in] manager The location manager handle - /// @param[out] num_of_active The last number of active satellites - /// @param[out] num_of_inview The last number of satellites in view - /// @param[out] timestamp The last timestamp (time when last measurement took place or @c 0 if valid) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid argument - /// @retval #LOCATIONS_ERROR_INCORRECT_METHOD Incorrect method - /// @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available - /// @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED The application does not have the privilege to call this method - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @pre The location service state must be #LOCATIONS_SERVICE_ENABLED with location_manager_start(). - /// @pre The gps_status_satellite_updated_cb must be set with gps_status_set_satellite_updated_cb(). - /// @see gps_status_foreach_satellites_in_view() - int gps_status_get_last_satellite( - location_manager_h manager, - ffi.Pointer num_of_active, - ffi.Pointer num_of_inview, - ffi.Pointer timestamp, - ) { - return _gps_status_get_last_satellite( - manager, - num_of_active, - num_of_inview, - timestamp, - ); - } - - late final _gps_status_get_last_satellitePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - location_manager_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('gps_status_get_last_satellite'); - late final _gps_status_get_last_satellite = - _gps_status_get_last_satellitePtr.asFunction< - int Function(location_manager_h, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Invokes the callback function for each last satellite which is recorded. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/location - /// @remarks This function is valid only for location managers with the #LOCATIONS_METHOD_GPS method. - /// @param[in] manager The location manager handle - /// @param[in] callback The iteration callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #LOCATIONS_ERROR_NONE Successful - /// @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid argument - /// @retval #LOCATIONS_ERROR_INCORRECT_METHOD Incorrect method - /// @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available - /// @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED The application does not have the privilege to call this method - /// @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported - /// @pre The location service state must be #LOCATIONS_SERVICE_ENABLED with location_manager_start(). - /// @pre The gps_status_satellite_updated_cb must be set with gps_status_set_satellite_updated_cb(). - /// @post It invokes gps_status_get_satellites_cb(). - /// @see gps_status_get_last_satellite() - /// @see gps_status_get_satellites_cb() - int gps_status_foreach_last_satellites_in_view( - location_manager_h manager, - gps_status_get_satellites_cb callback, - ffi.Pointer user_data, - ) { - return _gps_status_foreach_last_satellites_in_view( - manager, - callback, - user_data, - ); - } - - late final _gps_status_foreach_last_satellites_in_viewPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(location_manager_h, gps_status_get_satellites_cb, - ffi.Pointer)>>( - 'gps_status_foreach_last_satellites_in_view'); - late final _gps_status_foreach_last_satellites_in_view = - _gps_status_foreach_last_satellites_in_viewPtr.asFunction< - int Function(location_manager_h, gps_status_get_satellites_cb, - ffi.Pointer)>(); - - /// @brief Creates an email message handle for sending an email message. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/email - /// @remarks You must release @a email using email_destroy_message(). - /// @param[out] email A handle to the email message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EMAILS_ERROR_NONE Successful - /// @retval #EMAILS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #EMAILS_ERROR_ACCOUNT_NOT_FOUND Email account not found - /// @retval #EMAILS_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #EMAILS_ERROR_NOT_SUPPORTED Not supported - /// @pre At least one email account should be set up on the device. - /// @see email_destroy_message() - int email_create_message( - ffi.Pointer email, - ) { - return _email_create_message( - email, - ); - } - - late final _email_create_messagePtr = - _lookup)>>( - 'email_create_message'); - late final _email_create_message = - _email_create_messagePtr.asFunction)>(); - - /// @brief Destroys the email message handle and releases all its resources. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] email The handle to the email message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EMAILS_ERROR_NONE Successful - /// @retval #EMAILS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EMAILS_ERROR_OPERATION_FAILED Operation failed - /// @retval #EMAILS_ERROR_NOT_SUPPORTED Not supported - /// @see email_create_message() - int email_destroy_message( - email_h email, - ) { - return _email_destroy_message( - email, - ); - } - - late final _email_destroy_messagePtr = - _lookup>( - 'email_destroy_message'); - late final _email_destroy_message = - _email_destroy_messagePtr.asFunction(); - - /// @brief Sets a subject of the email message. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/email - /// @param[in] email The handle to the email message - /// @param[in] subject The subject of the email message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EMAILS_ERROR_NONE Successful - /// @retval #EMAILS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EMAILS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #EMAILS_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #EMAILS_ERROR_NOT_SUPPORTED Not supported - /// @pre An email message handle is created using email_create_message(). - /// @see email_create_message() - int email_set_subject( - email_h email, - ffi.Pointer subject, - ) { - return _email_set_subject( - email, - subject, - ); - } - - late final _email_set_subjectPtr = _lookup< - ffi.NativeFunction)>>( - 'email_set_subject'); - late final _email_set_subject = _email_set_subjectPtr - .asFunction)>(); - - /// @brief Populates a body of the email message. - /// @details Email message body means the text data to be delivered. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediastorage - /// @param[in] email The handle to the email message - /// @param[in] body The message body - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EMAILS_ERROR_NONE Successful - /// @retval #EMAILS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EMAILS_ERROR_OPERATION_FAILED Operation failed - /// @retval #EMAILS_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #EMAILS_ERROR_NOT_SUPPORTED Not supported - /// @pre An email message handle is created using email_create_message(). - /// @see email_create_message() - int email_set_body( - email_h email, - ffi.Pointer body, - ) { - return _email_set_body( - email, - body, - ); - } - - late final _email_set_bodyPtr = _lookup< - ffi.NativeFunction)>>( - 'email_set_body'); - late final _email_set_body = _email_set_bodyPtr - .asFunction)>(); - - /// @brief Adds a recipient to the email message. - /// @details The email API supports sending an email message to multiple recipients. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks Email address should be in standard format (as described in - /// Internet standards RFC 5321 and RFC 5322). - /// @param[in] email The handle to the email message - /// @param[in] type The recipient type - /// @param[in] address The recipient email address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EMAILS_ERROR_NONE Successful - /// @retval #EMAILS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EMAILS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #EMAILS_ERROR_NOT_SUPPORTED Not supported - /// @pre An email message handle is created using email_create_message(). - /// @see email_create_message() - /// @see email_remove_all_recipients() - int email_add_recipient( - email_h email, - int type, - ffi.Pointer address, - ) { - return _email_add_recipient( - email, - type, - address, - ); - } - - late final _email_add_recipientPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(email_h, ffi.Int32, - ffi.Pointer)>>('email_add_recipient'); - late final _email_add_recipient = _email_add_recipientPtr - .asFunction)>(); - - /// @brief Removes all recipients for the email message. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] email The handle to the email message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EMAILS_ERROR_NONE Successful - /// @retval #EMAILS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EMAILS_ERROR_NOT_SUPPORTED Not supported - /// @pre An email message handle is created using email_create_message(). - /// @see email_add_recipient() - int email_remove_all_recipients( - email_h email, - ) { - return _email_remove_all_recipients( - email, - ); - } - - late final _email_remove_all_recipientsPtr = - _lookup>( - 'email_remove_all_recipients'); - late final _email_remove_all_recipients = - _email_remove_all_recipientsPtr.asFunction(); - - /// @brief Adds a file as an attachment to the email message. - /// @details It should be used to add a file to the attachment list - /// of the email message. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks The maximum attachment file size is 10MB. - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. - /// @param[in] email The handle to the email message - /// @param[in] filepath The absolute full path of the file to be attached - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EMAILS_ERROR_NONE Successful - /// @retval #EMAILS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EMAILS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #EMAILS_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #EMAILS_ERROR_NOT_SUPPORTED Not supported - /// @pre An email message handle is created using email_create_message(). - /// @see email_remove_all_attachments() - int email_add_attach( - email_h email, - ffi.Pointer filepath, - ) { - return _email_add_attach( - email, - filepath, - ); - } - - late final _email_add_attachPtr = _lookup< - ffi.NativeFunction)>>( - 'email_add_attach'); - late final _email_add_attach = _email_add_attachPtr - .asFunction)>(); - - /// @brief Clears all attachments of the email message. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] email The handle to the email message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EMAILS_ERROR_NONE Successful - /// @retval #EMAILS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EMAILS_ERROR_NOT_SUPPORTED Not supported - /// @pre An email message handle is created using email_create_message(). - /// @see email_create_message() - /// @see email_add_attach() - int email_remove_all_attachments( - email_h email, - ) { - return _email_remove_all_attachments( - email, - ); - } - - late final _email_remove_all_attachmentsPtr = - _lookup>( - 'email_remove_all_attachments'); - late final _email_remove_all_attachments = - _email_remove_all_attachmentsPtr.asFunction(); - - /// @brief Saves the email message at outbox. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/email - /// @param[in] email The handle to the email message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EMAILS_ERROR_NONE Successful - /// @retval #EMAILS_ERROR_COMMUNICATION_WITH_SERVER_FAILED Communication with server failed. - /// @retval #EMAILS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EMAILS_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method - /// @retval #EMAILS_ERROR_NOT_SUPPORTED Not supported - /// @pre An email message handle is created using email_create_message(). - /// @see email_create_message() - /// @see email_add_recipient() - /// @see email_set_body() - /// @see email_save_message - int email_save_message( - email_h email, - ) { - return _email_save_message( - email, - ); - } - - late final _email_save_messagePtr = - _lookup>( - 'email_save_message'); - late final _email_save_message = - _email_save_messagePtr.asFunction(); - - /// @brief Sends the email message. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks In order to check whether sending a message succeeds, - /// you should register email_message_sent_cb() using email_set_message_sent_cb(). - /// @param[in] email The handle to the email message - /// @param[in] save_to_sentbox Set to @c true to save the message in the sentbox, - /// otherwise set to @c false to not save the message in the sentbox - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EMAILS_ERROR_NONE Successful - /// @retval #EMAILS_ERROR_COMMUNICATION_WITH_SERVER_FAILED Communication with server failed - /// @retval #EMAILS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EMAILS_ERROR_NOT_SUPPORTED Not supported - /// @pre An email message is stored using email_save_message(). - /// @see email_save_message() - /// @see email_set_message_sent_cb() - int email_send_message( - email_h email, - bool save_to_sentbox, - ) { - return _email_send_message( - email, - save_to_sentbox, - ); - } - - late final _email_send_messagePtr = - _lookup>( - 'email_send_message'); - late final _email_send_message = - _email_send_messagePtr.asFunction(); - - /// @brief Registers a callback function to be invoked when an email message is sent. - /// @details You will be notified when sending a message finishes and check whether it succeeds using this function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] email The handle to the email message - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EMAILS_ERROR_NONE Successful - /// @retval #EMAILS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EMAILS_ERROR_NOT_SUPPORTED Not supported - /// @post It will invoke email_message_sent_cb(). - /// @see email_message_sent_cb() - /// @see email_unset_message_sent_cb() - /// @see email_send_message() - int email_set_message_sent_cb( - email_h email, - email_message_sent_cb callback, - ffi.Pointer user_data, - ) { - return _email_set_message_sent_cb( - email, - callback, - user_data, - ); - } - - late final _email_set_message_sent_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(email_h, email_message_sent_cb, - ffi.Pointer)>>('email_set_message_sent_cb'); - late final _email_set_message_sent_cb = - _email_set_message_sent_cbPtr.asFunction< - int Function( - email_h, email_message_sent_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] msg The handle to the email message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #EMAILS_ERROR_NONE Successful - /// @retval #EMAILS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EMAILS_ERROR_NOT_SUPPORTED Not supported - /// @see email_message_sent_cb() - /// @see email_set_message_sent_cb() - /// @see email_send_message() - int email_unset_message_sent_cb( - email_h msg, - ) { - return _email_unset_message_sent_cb( - msg, - ); - } - - late final _email_unset_message_sent_cbPtr = - _lookup>( - 'email_unset_message_sent_cb'); - late final _email_unset_message_sent_cb = - _email_unset_message_sent_cbPtr.asFunction(); - - /// @brief Connects to the push service and sets callback functions. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/push - /// @remarks If there is a connection between an application and the push service,\n - /// the notify callback passes the notification upon its arrival.\n - /// Otherwise, the push service posts a UI notification to alert users.\n - /// The connection should be freed with push_service_disconnect() by you. - /// @param[in] push_app_id App id received from Tizen Push Server team - /// @param[in] state_callback State callback function - /// @param[in] notify_callback Notify callback function - /// @param[in] user_data User data to pass to state_cb and notify_cb - /// @param[out] connection The connection handle to the push service - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PUSH_SERVICE_ERROR_NONE Successful - /// @retval #PUSH_SERVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PUSH_SERVICE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PUSH_SERVICE_ERROR_NOT_CONNECTED Connection to the daemon failed - /// @retval #PUSH_SERVICE_ERROR_PERMISSION_DENIED No push privilege - /// @retval #PUSH_SERVICE_ERROR_NOT_SUPPORTED Not supported feature - /// @pre There is no connection to the push service for the app_id. - /// @post The state callback will be called to let you know the current - /// registration state immediately. - /// @see push_service_disconnect() - int push_service_connect( - ffi.Pointer push_app_id, - push_service_state_cb state_callback, - push_service_notify_cb notify_callback, - ffi.Pointer user_data, - ffi.Pointer connection, - ) { - return _push_service_connect( - push_app_id, - state_callback, - notify_callback, - user_data, - connection, - ); - } - - late final _push_service_connectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - push_service_state_cb, - push_service_notify_cb, - ffi.Pointer, - ffi.Pointer)>>('push_service_connect'); - late final _push_service_connect = _push_service_connectPtr.asFunction< - int Function( - ffi.Pointer, - push_service_state_cb, - push_service_notify_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Closes the connection and releases all its resources - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If you call this function in the push callback functions,\n - /// it may cause your application to crash.\n - /// The specific error code can be obtained using the get_last_result()\n - /// Error codes are described in the exception section. - /// @param[in] connection The connection handle to the push service - /// @exception #PUSH_SERVICE_ERROR_NONE Successful - /// @exception #PUSH_SERVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #PUSH_SERVICE_ERROR_NOT_SUPPORTED Not supported feature - /// @see push_service_connect() - void push_service_disconnect( - push_service_connection_h connection, - ) { - return _push_service_disconnect( - connection, - ); - } - - late final _push_service_disconnectPtr = - _lookup>( - 'push_service_disconnect'); - late final _push_service_disconnect = _push_service_disconnectPtr - .asFunction(); - - /// @brief Registers an application to the push server. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] connection The connection handle to the push service - /// @param[in] result_callback Result callback function - /// @param[in] user_data User data to pass to result_cb - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PUSH_SERVICE_ERROR_NONE Successful - /// @retval #PUSH_SERVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PUSH_SERVICE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PUSH_SERVICE_ERROR_NOT_CONNECTED No connection to the push service - /// @retval #PUSH_SERVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #PUSH_SERVICE_ERROR_NOT_SUPPORTED Not supported feature - /// @pre The application should be connected to the push service. - /// @post As a result, the state callback will be invoked. - /// @see push_service_deregister() - int push_service_register( - push_service_connection_h connection, - push_service_result_cb result_callback, - ffi.Pointer user_data, - ) { - return _push_service_register( - connection, - result_callback, - user_data, - ); - } - - late final _push_service_registerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(push_service_connection_h, push_service_result_cb, - ffi.Pointer)>>('push_service_register'); - late final _push_service_register = _push_service_registerPtr.asFunction< - int Function(push_service_connection_h, push_service_result_cb, - ffi.Pointer)>(); - - /// @brief Deregisters an application from the Push server. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] connection The connection handle to the push service - /// @param[in] result_callback Result callback function - /// @param[in] user_data User data to pass to result_cb - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PUSH_SERVICE_ERROR_NONE Successful - /// @retval #PUSH_SERVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PUSH_SERVICE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PUSH_SERVICE_ERROR_NOT_CONNECTED No connection to the push service - /// @retval #PUSH_SERVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #PUSH_SERVICE_ERROR_NOT_SUPPORTED Not supported feature - /// @pre The application should be connected to the push service. - /// @post As a result, the state callback will be invoked. - /// @see push_service_register() - int push_service_deregister( - push_service_connection_h connection, - push_service_result_cb result_callback, - ffi.Pointer user_data, - ) { - return _push_service_deregister( - connection, - result_callback, - user_data, - ); - } - - late final _push_service_deregisterPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(push_service_connection_h, push_service_result_cb, - ffi.Pointer)>>('push_service_deregister'); - late final _push_service_deregister = _push_service_deregisterPtr.asFunction< - int Function(push_service_connection_h, push_service_result_cb, - ffi.Pointer)>(); - - /// @brief Retrieves the payload data of a notification that forcibly launched the app. - /// @details When a notification arrives at the device with the "LAUNCH"\n - /// option or a user clicks a notification in the quick panel,\n - /// the push daemon forcibly launches the app and delivers the\n - /// notification to the app as a bundle. This function returns\n - /// the payload data in the notification. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/push - /// @remark This function must be called in the app control callback function.\n - /// You must release the payload data using free().\n - /// push_service_app_control_to_notification() is preferred to this API.\n - /// The specific error code can be obtained using the get_last_result()\n - /// Error codes are described in the exception section. - /// @param[in] app_control The app control handle that is handed over in the\n - /// app control callback function - /// @param[in] operation The operation in the app control handle retrieved by\n - /// app_control_get_operation() - /// @return The payload data (appData) in the notification\n - /// NULL if the app is not launched by a push notification. - /// @exception #PUSH_SERVICE_ERROR_NONE Successful - /// @exception #PUSH_SERVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #PUSH_SERVICE_ERROR_NO_DATA Not launched by a notification - /// @exception #PUSH_SERVICE_ERROR_OPERATION_FAILED Operation fail - /// @exception #PUSH_SERVICE_ERROR_OUT_OF_MEMORY Out of memory - /// @exception #PUSH_SERVICE_ERROR_NOT_CONNECTED Connection to the daemon failed - /// @exception #PUSH_SERVICE_ERROR_PERMISSION_DENIED No push privilege - /// @exception #PUSH_SERVICE_ERROR_NOT_SUPPORTED Not supported feature - /// @see app_control_get_operation() - ffi.Pointer push_service_app_control_to_noti_data( - app_control_h app_control, - ffi.Pointer operation, - ) { - return _push_service_app_control_to_noti_data( - app_control, - operation, - ); - } - - late final _push_service_app_control_to_noti_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(app_control_h, - ffi.Pointer)>>('push_service_app_control_to_noti_data'); - late final _push_service_app_control_to_noti_data = - _push_service_app_control_to_noti_dataPtr.asFunction< - ffi.Pointer Function( - app_control_h, ffi.Pointer)>(); - - /// @brief Retrieves the notification that forcibly launched the app. - /// @details When a notification arrives at the device with the "LAUNCH"\n - /// option or a user clicks a notification in the quick panel,\n - /// the push daemon forcibly launches the app and delivers the\n - /// notification to the app as a bundle. This function returns\n - /// the notification from the bundle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/push - /// @remark This function must be called in the app control callback function.\n - /// You must release the notification using push_service_free_notification(). - /// @param[in] app_control The app control handle that is handed over in the\n - /// app control callback function - /// @param[in] operation The operation in the app control handle retrieved by\n - /// app_control_get_operation() - /// @param[out] noti The handle of the notification that forcibly launched the app - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PUSH_SERVICE_ERROR_NONE Successful - /// @retval #PUSH_SERVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PUSH_SERVICE_ERROR_NO_DATA Not launched by a notification - /// @retval #PUSH_SERVICE_ERROR_OPERATION_FAILED Operation fail - /// @retval #PUSH_SERVICE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PUSH_SERVICE_ERROR_NOT_CONNECTED Connection to the daemon failed - /// @retval #PUSH_SERVICE_ERROR_PERMISSION_DENIED No push privilege - /// @retval #PUSH_SERVICE_ERROR_NOT_SUPPORTED Not supported feature - /// @see push_service_free_notification() - /// @see app_control_get_operation() - int push_service_app_control_to_notification( - app_control_h app_control, - ffi.Pointer operation, - ffi.Pointer noti, - ) { - return _push_service_app_control_to_notification( - app_control, - operation, - noti, - ); - } - - late final _push_service_app_control_to_notificationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(app_control_h, ffi.Pointer, - ffi.Pointer)>>( - 'push_service_app_control_to_notification'); - late final _push_service_app_control_to_notification = - _push_service_app_control_to_notificationPtr.asFunction< - int Function(app_control_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets notification data sent by the server. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a data using free(). - /// @param[in] notification The notification handle - /// @param[out] data The notification data\n - /// Set NULL if error but PUSH_SERVICE_ERROR_INVALID_PARAMETER - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PUSH_SERVICE_ERROR_NONE Successful - /// @retval #PUSH_SERVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PUSH_SERVICE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PUSH_SERVICE_ERROR_NO_DATA No data available - /// @retval #PUSH_SERVICE_ERROR_NOT_SUPPORTED Not supported feature - /// @see push_service_notify_cb() - /// @see push_service_request_unread_notification() - int push_service_get_notification_data( - push_service_notification_h notification, - ffi.Pointer> data, - ) { - return _push_service_get_notification_data( - notification, - data, - ); - } - - late final _push_service_get_notification_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(push_service_notification_h, - ffi.Pointer>)>>( - 'push_service_get_notification_data'); - late final _push_service_get_notification_data = - _push_service_get_notification_dataPtr.asFunction< - int Function(push_service_notification_h, - ffi.Pointer>)>(); - - /// @brief Gets the notification message sent by the server. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remark The msg must be released with free().\n - /// push_service_request_unread_notification() is\n - /// preferred to this API. - /// @param[in] notification The notification handle - /// @param[out] msg The notification message\n - /// Set NULL if error but PUSH_SERVICE_ERROR_INVALID_PARAMETER - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PUSH_SERVICE_ERROR_NONE Successful - /// @retval #PUSH_SERVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PUSH_SERVICE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PUSH_SERVICE_ERROR_NO_DATA No data available - /// @retval #PUSH_SERVICE_ERROR_NOT_SUPPORTED Not supported feature - /// @see push_service_notify_cb() - /// @see push_service_get_unread_notification() - int push_service_get_notification_message( - push_service_notification_h notification, - ffi.Pointer> msg, - ) { - return _push_service_get_notification_message( - notification, - msg, - ); - } - - late final _push_service_get_notification_messagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(push_service_notification_h, - ffi.Pointer>)>>( - 'push_service_get_notification_message'); - late final _push_service_get_notification_message = - _push_service_get_notification_messagePtr.asFunction< - int Function(push_service_notification_h, - ffi.Pointer>)>(); - - /// @brief Gets the received time of the notification message. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] notification The notification handle - /// @param[out] received_time The received time of the notification message \n - /// The @a received_time is based on UTC. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PUSH_SERVICE_ERROR_NONE Successful - /// @retval #PUSH_SERVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PUSH_SERVICE_ERROR_NO_DATA No data available - /// @retval #PUSH_SERVICE_ERROR_NOT_SUPPORTED Not supported feature - /// @see push_service_notify_cb() - /// @see push_service_request_unread_notification() - int push_service_get_notification_time( - push_service_notification_h notification, - ffi.Pointer received_time, - ) { - return _push_service_get_notification_time( - notification, - received_time, - ); - } - - late final _push_service_get_notification_timePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - push_service_notification_h, ffi.Pointer)>>( - 'push_service_get_notification_time'); - late final _push_service_get_notification_time = - _push_service_get_notification_timePtr.asFunction< - int Function( - push_service_notification_h, ffi.Pointer)>(); - - /// @brief Gets the sender of the notification. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a sender using free(). - /// @param[in] notification The notification handle - /// @param[out] sender The sender\n - /// Set @c NULL if error but #PUSH_SERVICE_ERROR_INVALID_PARAMETER - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PUSH_SERVICE_ERROR_NONE Successful - /// @retval #PUSH_SERVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PUSH_SERVICE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PUSH_SERVICE_ERROR_NO_DATA No data available - /// @retval #PUSH_SERVICE_ERROR_NOT_SUPPORTED Not supported feature - /// @see push_service_notify_cb() - /// @see push_serivce_get_unread_notification() - int push_service_get_notification_sender( - push_service_notification_h notification, - ffi.Pointer> sender, - ) { - return _push_service_get_notification_sender( - notification, - sender, - ); - } - - late final _push_service_get_notification_senderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(push_service_notification_h, - ffi.Pointer>)>>( - 'push_service_get_notification_sender'); - late final _push_service_get_notification_sender = - _push_service_get_notification_senderPtr.asFunction< - int Function(push_service_notification_h, - ffi.Pointer>)>(); - - /// @brief Gets the session ID of the notification. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a session_info using free(). - /// @param[in] notification The notification handle - /// @param[out] session_info The session ID\n - /// Set @c NULL if error but #PUSH_SERVICE_ERROR_INVALID_PARAMETER - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PUSH_SERVICE_ERROR_NONE Successful - /// @retval #PUSH_SERVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PUSH_SERVICE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PUSH_SERVICE_ERROR_NO_DATA No data available - /// @retval #PUSH_SERVICE_ERROR_NOT_SUPPORTED Not supported feature - /// @see push_service_notify_cb() - /// @see push_service_request_unread_notification() - int push_service_get_notification_session_info( - push_service_notification_h notification, - ffi.Pointer> session_info, - ) { - return _push_service_get_notification_session_info( - notification, - session_info, - ); - } - - late final _push_service_get_notification_session_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(push_service_notification_h, - ffi.Pointer>)>>( - 'push_service_get_notification_session_info'); - late final _push_service_get_notification_session_info = - _push_service_get_notification_session_infoPtr.asFunction< - int Function(push_service_notification_h, - ffi.Pointer>)>(); - - /// @brief Gets the request ID assigned by the sender. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a request_id using free(). - /// @param[in] notification The notification handle - /// @param[out] request_id The request ID\n - /// Set @c NULL if error but #PUSH_SERVICE_ERROR_INVALID_PARAMETER - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PUSH_SERVICE_ERROR_NONE Successful - /// @retval #PUSH_SERVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PUSH_SERVICE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PUSH_SERVICE_ERROR_NO_DATA No data available - /// @retval #PUSH_SERVICE_ERROR_NOT_SUPPORTED Not supported feature - /// @see push_service_notify_cb() - /// @see push_service_request_unread_notification() - int push_service_get_notification_request_id( - push_service_notification_h notification, - ffi.Pointer> request_id, - ) { - return _push_service_get_notification_request_id( - notification, - request_id, - ); - } - - late final _push_service_get_notification_request_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(push_service_notification_h, - ffi.Pointer>)>>( - 'push_service_get_notification_request_id'); - late final _push_service_get_notification_request_id = - _push_service_get_notification_request_idPtr.asFunction< - int Function(push_service_notification_h, - ffi.Pointer>)>(); - - /// @brief Gets the value in the type field of the notification - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] notification The notification handle - /// @param[out] type The type value assigned by the sender - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PUSH_SERVICE_ERROR_NONE Successful - /// @retval #PUSH_SERVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PUSH_SERVICE_ERROR_NO_DATA No data available - /// @retval #PUSH_SERVICE_ERROR_NOT_SUPPORTED Not supported feature - /// @see push_service_notify_cb() - /// @see push_service_request_unread_notification() - int push_service_get_notification_type( - push_service_notification_h notification, - ffi.Pointer type, - ) { - return _push_service_get_notification_type( - notification, - type, - ); - } - - late final _push_service_get_notification_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(push_service_notification_h, - ffi.Pointer)>>('push_service_get_notification_type'); - late final _push_service_get_notification_type = - _push_service_get_notification_typePtr.asFunction< - int Function(push_service_notification_h, ffi.Pointer)>(); - - /// @brief Gets an unread notification message from the push server. - /// @details If an application receives an unread message with this method, the message is removed from the system. \n - /// This method can be called repeatedly until it returns PUSH_SERVICE_ERROR_NO_DATA \n - /// But, this method does NOT guarantee order and reliability of notification messages. \n - /// Some notification messages can be dropped when the system message queue is full. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks It is recommended to use push_service_request_unread_notification(). - /// @remarks You must release @a noti using push_service_free_notification(). - /// @param[in] connection The connection handle to the push service - /// @param[out] noti The notification handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PUSH_SERVICE_ERROR_NONE Successful - /// @retval #PUSH_SERVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PUSH_SERVICE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PUSH_SERVICE_ERROR_NO_DATA No data available - /// @retval #PUSH_SERVICE_ERROR_NOT_SUPPORTED Not supported feature - /// - /// @see push_service_get_notification_message() - /// @see push_service_get_notification_time() - /// @see push_service_get_notification_data() - int push_service_get_unread_notification( - push_service_connection_h connection, - ffi.Pointer noti, - ) { - return _push_service_get_unread_notification( - connection, - noti, - ); - } - - late final _push_service_get_unread_notificationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(push_service_connection_h, - ffi.Pointer)>>( - 'push_service_get_unread_notification'); - late final _push_service_get_unread_notification = - _push_service_get_unread_notificationPtr.asFunction< - int Function(push_service_connection_h, - ffi.Pointer)>(); - - /// @brief Requests unread notification messages to the push server. - /// @details When the app wants to receive messages that arrived before it launched, this \n - /// method should be called. Upon receiving this request, the daemon sends messages\n - /// stored in its DB to the app. The notify_callback() method assigned in push_service_connect()\n - /// will be called when these messages arrive. No need to call this method multiple\n - /// times to receive multiple messages. This method does NOT guarantee order and\n - /// reliability of notification messages. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This method is preferred to push_service_get_unread_notification(). - /// @param[in] connection The connection handle to the push service - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PUSH_SERVICE_ERROR_NONE Successful - /// @retval #PUSH_SERVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PUSH_SERVICE_ERROR_NOT_CONNECTED Not connected to the daemon - /// @retval #PUSH_SERVICE_ERROR_OPERATION_FAILED Error when sending the request - /// @retval #PUSH_SERVICE_ERROR_NOT_SUPPORTED Not supported feature - /// - /// @see push_service_get_unread_notification() - /// @see push_service_connect() - int push_service_request_unread_notification( - push_service_connection_h connection, - ) { - return _push_service_request_unread_notification( - connection, - ); - } - - late final _push_service_request_unread_notificationPtr = - _lookup>( - 'push_service_request_unread_notification'); - late final _push_service_request_unread_notification = - _push_service_request_unread_notificationPtr - .asFunction(); - - /// @brief Gets the registration ID in the PUSH_SERVICE_STATE_REGISTERED state. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a reg_id using free(). - /// @param[in] connection The connection handle to the push service - /// @param[out] reg_id The registration ID\n - /// Set NULL if error but PUSH_SERVICE_ERROR_INVALID_PARAMETER - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PUSH_SERVICE_ERROR_NONE Successful - /// @retval #PUSH_SERVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PUSH_SERVICE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PUSH_SERVICE_ERROR_NO_DATA No registration ID available - /// @retval #PUSH_SERVICE_ERROR_NOT_SUPPORTED Not supported feature - int push_service_get_registration_id( - push_service_connection_h connection, - ffi.Pointer> reg_id, - ) { - return _push_service_get_registration_id( - connection, - reg_id, - ); - } - - late final _push_service_get_registration_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(push_service_connection_h, - ffi.Pointer>)>>( - 'push_service_get_registration_id'); - late final _push_service_get_registration_id = - _push_service_get_registration_idPtr.asFunction< - int Function( - push_service_connection_h, ffi.Pointer>)>(); - - /// @brief Frees the notification handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remark The specific error code can be obtained using the get_last_result()\n - /// Error codes are described in the exception section. - /// @param[in] noti The notification handle - /// @exception #PUSH_SERVICE_ERROR_NONE Successful - /// @exception #PUSH_SERVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #PUSH_SERVICE_ERROR_NOT_SUPPORTED Not supported feature - void push_service_free_notification( - push_service_notification_h noti, - ) { - return _push_service_free_notification( - noti, - ); - } - - late final _push_service_free_notificationPtr = _lookup< - ffi.NativeFunction>( - 'push_service_free_notification'); - late final _push_service_free_notification = - _push_service_free_notificationPtr - .asFunction(); - - /// @brief Gets the maximum volume level supported for a particular sound type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] type The sound type - /// @param[out] max The maximum volume level - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see sound_manager_set_volume() - /// @see sound_manager_get_volume() - int sound_manager_get_max_volume( - int type, - ffi.Pointer max, - ) { - return _sound_manager_get_max_volume( - type, - max, - ); - } - - late final _sound_manager_get_max_volumePtr = _lookup< - ffi - .NativeFunction)>>( - 'sound_manager_get_max_volume'); - late final _sound_manager_get_max_volume = _sound_manager_get_max_volumePtr - .asFunction)>(); - - /// @brief Sets the volume level specified for a particular sound type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/volume.set - /// @param[in] type The sound type - /// @param[in] volume The volume level to be set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_get_max_volume() - /// @see sound_manager_get_volume() - int sound_manager_set_volume( - int type, - int volume, - ) { - return _sound_manager_set_volume( - type, - volume, - ); - } - - late final _sound_manager_set_volumePtr = - _lookup>( - 'sound_manager_set_volume'); - late final _sound_manager_set_volume = - _sound_manager_set_volumePtr.asFunction(); - - /// @brief Gets the volume level specified for a particular sound type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] type The sound type - /// @param[out] volume The current volume level - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_get_max_volume() - /// @see sound_manager_set_volume() - int sound_manager_get_volume( - int type, - ffi.Pointer volume, - ) { - return _sound_manager_get_volume( - type, - volume, - ); - } - - late final _sound_manager_get_volumePtr = _lookup< - ffi - .NativeFunction)>>( - 'sound_manager_get_volume'); - late final _sound_manager_get_volume = _sound_manager_get_volumePtr - .asFunction)>(); - - /// @brief Gets the type of the sound being currently played. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[out] type The current sound type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_NO_PLAYING_SOUND No playing sound - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - int sound_manager_get_current_sound_type( - ffi.Pointer type, - ) { - return _sound_manager_get_current_sound_type( - type, - ); - } - - late final _sound_manager_get_current_sound_typePtr = - _lookup)>>( - 'sound_manager_get_current_sound_type'); - late final _sound_manager_get_current_sound_type = - _sound_manager_get_current_sound_typePtr - .asFunction)>(); - - /// @brief Adds a callback function to be invoked when the volume level is changed. - /// @since_tizen 3.0 - /// @param[in] callback Callback function to indicate change in volume - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] id The callback id - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @post sound_manager_volume_changed_cb() will be invoked. - /// @see sound_manager_remove_volume_changed_cb() - /// @see sound_manager_volume_changed_cb() - int sound_manager_add_volume_changed_cb( - sound_manager_volume_changed_cb callback, - ffi.Pointer user_data, - ffi.Pointer id, - ) { - return _sound_manager_add_volume_changed_cb( - callback, - user_data, - id, - ); - } - - late final _sound_manager_add_volume_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - sound_manager_volume_changed_cb, - ffi.Pointer, - ffi.Pointer)>>('sound_manager_add_volume_changed_cb'); - late final _sound_manager_add_volume_changed_cb = - _sound_manager_add_volume_changed_cbPtr.asFunction< - int Function(sound_manager_volume_changed_cb, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Removes the volume change callback. - /// @since_tizen 3.0 - /// @param[in] id The id of the callback to remove - /// @return 0 on success, otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_add_volume_changed_cb() - int sound_manager_remove_volume_changed_cb( - int id, - ) { - return _sound_manager_remove_volume_changed_cb( - id, - ); - } - - late final _sound_manager_remove_volume_changed_cbPtr = - _lookup>( - 'sound_manager_remove_volume_changed_cb'); - late final _sound_manager_remove_volume_changed_cb = - _sound_manager_remove_volume_changed_cbPtr - .asFunction(); - - /// @brief Creates a handle for stream information. - /// @since_tizen 3.0 - /// - /// @remarks The registered callback is issued in the internal thread of the sound manager.\n - /// Do not call this function within sound_stream_focus_state_changed_cb() or sound_stream_focus_state_watch_cb(),\n - /// otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned.\n - /// To apply the stream policy according to this stream information, this handle should be passed to other APIs\n - /// related to playback or recording.(e.g. player, wav-player, audio-io, etc.) - /// - /// @param[in] stream_type The type of stream - /// @param[in] callback The focus state change callback function (optional, this can be NULL) - /// @param[in] user_data The user data to be passed to the callback function (optional, this can be NULL) - /// @param[out] stream_info The handle of stream information - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_destroy_stream_information() - /// @see sound_manager_add_device_for_stream_routing() - /// @see sound_manager_remove_device_for_stream_routing() - /// @see sound_manager_remove_all_devices_for_stream_routing() - /// @see sound_manager_apply_stream_routing() - /// @see sound_manager_acquire_focus() - /// @see sound_manager_destroy_focus() - /// @see sound_manager_get_focus_state() - int sound_manager_create_stream_information( - int stream_type, - sound_stream_focus_state_changed_cb callback, - ffi.Pointer user_data, - ffi.Pointer stream_info, - ) { - return _sound_manager_create_stream_information( - stream_type, - callback, - user_data, - stream_info, - ); - } - - late final _sound_manager_create_stream_informationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, sound_stream_focus_state_changed_cb, - ffi.Pointer, ffi.Pointer)>>( - 'sound_manager_create_stream_information'); - late final _sound_manager_create_stream_information = - _sound_manager_create_stream_informationPtr.asFunction< - int Function(int, sound_stream_focus_state_changed_cb, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys the handle for stream information. - /// @since_tizen 3.0 - /// - /// @remarks Do not call this function within sound_stream_focus_state_changed_cb() or sound_stream_focus_state_watch_cb(),\n - /// otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned. - /// - /// @param[in] stream_info The handle of stream information - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_create_stream_information() - /// @see sound_manager_add_device_for_stream_routing() - /// @see sound_manager_remove_device_for_stream_routing() - /// @see sound_manager_remove_all_devices_for_stream_routing() - /// @see sound_manager_apply_stream_routing() - /// @see sound_manager_acquire_focus() - /// @see sound_manager_destroy_focus() - /// @see sound_manager_get_focus_state() - int sound_manager_destroy_stream_information( - sound_stream_info_h stream_info, - ) { - return _sound_manager_destroy_stream_information( - stream_info, - ); - } - - late final _sound_manager_destroy_stream_informationPtr = - _lookup>( - 'sound_manager_destroy_stream_information'); - late final _sound_manager_destroy_stream_information = - _sound_manager_destroy_stream_informationPtr - .asFunction(); - - /// @brief Gets the sound type of the stream information. - /// @since_tizen 3.0 - /// - /// @remarks In case of a @a stream_info made with #SOUND_STREAM_TYPE_EMERGENCY, it'll return #SOUND_MANAGER_ERROR_NO_DATA.\n - /// The reason is that there is no #sound_type_e matched with this @a stream_info. - /// - /// @param[in] stream_info The handle of stream information - /// @param[out] sound_type The sound type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_NO_DATA No data - /// @pre Call sound_manager_create_stream_information() before calling this function. - /// @see sound_manager_create_stream_information() - /// @see sound_manager_set_volume() - /// @see sound_manager_get_max_volume() - /// @see sound_manager_get_volume() - int sound_manager_get_sound_type( - sound_stream_info_h stream_info, - ffi.Pointer sound_type, - ) { - return _sound_manager_get_sound_type( - stream_info, - sound_type, - ); - } - - late final _sound_manager_get_sound_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_stream_info_h, - ffi.Pointer)>>('sound_manager_get_sound_type'); - late final _sound_manager_get_sound_type = _sound_manager_get_sound_typePtr - .asFunction)>(); - - /// @brief Adds the device to the stream information for the stream routing. - /// @since_tizen 3.0 - /// - /// @remarks Use sound_manager_get_device_list() and sound_manager_get_next_device() to get the device.\n - /// #SOUND_MANAGER_ERROR_POLICY could be returned according to the stream type of the @a stream_info.\n - /// The available types of the @a stream_info for this function are #SOUND_STREAM_TYPE_VOIP and #SOUND_STREAM_TYPE_MEDIA_EXTERNAL_ONLY. - /// - /// @param[in] stream_info The handle of stream information - /// @param[in] device The device item from #sound_device_list_h - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_POLICY Noncompliance with the sound system policy - /// @pre Call sound_manager_create_stream_information() before calling this function. - /// @post You can apply this setting by calling sound_manager_apply_stream_routing(). - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - /// @see sound_manager_remove_device_for_stream_routing() - /// @see sound_manager_remove_all_devices_for_stream_routing() - /// @see sound_manager_apply_stream_routing() - int sound_manager_add_device_for_stream_routing( - sound_stream_info_h stream_info, - sound_device_h device, - ) { - return _sound_manager_add_device_for_stream_routing( - stream_info, - device, - ); - } - - late final _sound_manager_add_device_for_stream_routingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_stream_info_h, - sound_device_h)>>('sound_manager_add_device_for_stream_routing'); - late final _sound_manager_add_device_for_stream_routing = - _sound_manager_add_device_for_stream_routingPtr - .asFunction(); - - /// @brief Removes the device from the stream information for the stream routing. - /// @since_tizen 3.0 - /// - /// @remarks Use sound_manager_get_device_list() and sound_manager_get_next_device() to get the device.\n - /// - /// @param[in] stream_info The handle of stream information - /// @param[in] device The device item from #sound_device_list_h - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Call sound_manager_create_stream_information() and sound_manager_add_device_for_stream_routing() before calling this function. - /// @post You can apply this setting by calling sound_manager_apply_stream_routing(). - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - /// @see sound_manager_add_device_for_stream_routing() - /// @see sound_manager_remove_all_devices_for_stream_routing() - /// @see sound_manager_apply_stream_routing() - int sound_manager_remove_device_for_stream_routing( - sound_stream_info_h stream_info, - sound_device_h device, - ) { - return _sound_manager_remove_device_for_stream_routing( - stream_info, - device, - ); - } - - late final _sound_manager_remove_device_for_stream_routingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_stream_info_h, sound_device_h)>>( - 'sound_manager_remove_device_for_stream_routing'); - late final _sound_manager_remove_device_for_stream_routing = - _sound_manager_remove_device_for_stream_routingPtr - .asFunction(); - - /// @brief Removes all devices from the stream information for the stream routing. - /// @since_tizen 4.0 - /// - /// @param[in] stream_info The handle of stream information - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_POLICY Noncompliance with the sound system policy - /// @pre Call sound_manager_create_stream_information() before calling this function. - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - /// @see sound_manager_add_device_for_stream_routing() - /// @see sound_manager_remove_device_for_stream_routing() - /// @see sound_manager_apply_stream_routing() - int sound_manager_remove_all_devices_for_stream_routing( - sound_stream_info_h stream_info, - ) { - return _sound_manager_remove_all_devices_for_stream_routing( - stream_info, - ); - } - - late final _sound_manager_remove_all_devices_for_stream_routingPtr = - _lookup>( - 'sound_manager_remove_all_devices_for_stream_routing'); - late final _sound_manager_remove_all_devices_for_stream_routing = - _sound_manager_remove_all_devices_for_stream_routingPtr - .asFunction(); - - /// @brief Applies the stream routing. - /// @since_tizen 3.0 - /// - /// @remarks If the stream has not been made yet, this setting will be applied when the stream starts to play.\n - /// - /// @param[in] stream_info The handle of stream information - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_STATE Invalid state - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @pre Call sound_manager_create_stream_information() and sound_manager_add_device_for_stream_routing() before calling this function. - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - /// @see sound_manager_add_device_for_stream_routing() - /// @see sound_manager_remove_device_for_stream_routing() - /// @see sound_manager_remove_all_devices_for_stream_routing() - int sound_manager_apply_stream_routing( - sound_stream_info_h stream_info, - ) { - return _sound_manager_apply_stream_routing( - stream_info, - ); - } - - late final _sound_manager_apply_stream_routingPtr = - _lookup>( - 'sound_manager_apply_stream_routing'); - late final _sound_manager_apply_stream_routing = - _sound_manager_apply_stream_routingPtr - .asFunction(); - - /// @brief Acquires the stream focus. - /// @since_tizen 3.0 - /// - /// @remarks Do not call this function within sound_stream_focus_state_changed_cb() or sound_stream_focus_state_watch_cb(),\n - /// otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned. Since 4.0, it is allowed and does not return the error. - /// - /// @param[in] stream_info The handle of stream information - /// @param[in] focus_mask The focus mask that user wants to acquire - /// @param[in] sound_behavior The requesting sound behavior, values of #sound_behavior_e combined with bitwise 'or' - /// @param[in] extra_info The extra information for this request (optional, this can be NULL) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_INVALID_STATE Invalid state - /// @retval #SOUND_MANAGER_ERROR_POLICY Noncompliance with the sound system policy - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @pre Call sound_manager_create_stream_information() with its parameter for sound_stream_focus_state_changed_cb()\n - /// before calling this function. - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - /// @see sound_manager_acquire_focus_all() - /// @see sound_manager_release_focus() - /// @see sound_manager_release_focus_all() - /// @see sound_manager_get_focus_state() - int sound_manager_acquire_focus( - sound_stream_info_h stream_info, - int focus_mask, - int sound_behavior, - ffi.Pointer extra_info, - ) { - return _sound_manager_acquire_focus( - stream_info, - focus_mask, - sound_behavior, - extra_info, - ); - } - - late final _sound_manager_acquire_focusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_stream_info_h, ffi.Int32, ffi.Int, - ffi.Pointer)>>('sound_manager_acquire_focus'); - late final _sound_manager_acquire_focus = - _sound_manager_acquire_focusPtr.asFunction< - int Function(sound_stream_info_h, int, int, ffi.Pointer)>(); - - /// @brief Releases the acquired stream focus. - /// @since_tizen 3.0 - /// - /// @remarks Do not call this function within sound_stream_focus_state_changed_cb() or sound_stream_focus_state_watch_cb(),\n - /// otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned. Since 4.0, it is allowed and does not return the error. - /// - /// @param[in] stream_info The handle of stream information - /// @param[in] focus_mask The focus mask that user wants to release - /// @param[in] sound_behavior The requesting sound behavior, values of #sound_behavior_e combined with bitwise 'or' - /// @param[in] extra_info The extra information for this request (optional, this can be NULL) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_INVALID_STATE Invalid state - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @pre Call sound_manager_create_stream_information() and sound_manager_acquire_focus() before calling this function. - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - /// @see sound_manager_acquire_focus() - /// @see sound_manager_acquire_focus_all() - /// @see sound_manager_release_focus_all() - /// @see sound_manager_get_focus_state() - int sound_manager_release_focus( - sound_stream_info_h stream_info, - int focus_mask, - int sound_behavior, - ffi.Pointer extra_info, - ) { - return _sound_manager_release_focus( - stream_info, - focus_mask, - sound_behavior, - extra_info, - ); - } - - late final _sound_manager_release_focusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_stream_info_h, ffi.Int32, ffi.Int, - ffi.Pointer)>>('sound_manager_release_focus'); - late final _sound_manager_release_focus = - _sound_manager_release_focusPtr.asFunction< - int Function(sound_stream_info_h, int, int, ffi.Pointer)>(); - - /// @brief Acquires all the stream focuses. - /// @since_tizen 4.0 - /// - /// @remarks This function does not return error even though one or all of focuses have already been acquired.\n - /// Use sound_manager_get_focus_state() to get acquired focus state if it returns #SOUND_MANAGER_ERROR_POLICY. - /// - /// @param[in] stream_info The handle of stream information - /// @param[in] sound_behavior The requesting sound behavior, values of #sound_behavior_e combined with bitwise 'or' - /// @param[in] extra_info The extra information for this request (optional, this can be NULL) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_POLICY Noncompliance with the sound system policy - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @pre Call sound_manager_create_stream_information() with its parameter for sound_stream_focus_state_changed_cb()\n - /// before calling this function. - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - /// @see sound_manager_acquire_focus() - /// @see sound_manager_release_focus() - /// @see sound_manager_release_focus_all() - /// @see sound_manager_get_focus_state() - int sound_manager_acquire_focus_all( - sound_stream_info_h stream_info, - int sound_behavior, - ffi.Pointer extra_info, - ) { - return _sound_manager_acquire_focus_all( - stream_info, - sound_behavior, - extra_info, - ); - } - - late final _sound_manager_acquire_focus_allPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_stream_info_h, ffi.Int, - ffi.Pointer)>>('sound_manager_acquire_focus_all'); - late final _sound_manager_acquire_focus_all = - _sound_manager_acquire_focus_allPtr.asFunction< - int Function(sound_stream_info_h, int, ffi.Pointer)>(); - - /// @brief Releases all the acquired stream focuses. - /// @since_tizen 4.0 - /// - /// @remarks This function does not return error even though one or all of focuses have already been released. - /// - /// @param[in] stream_info The handle of stream information - /// @param[in] sound_behavior The requesting sound behavior, values of #sound_behavior_e combined with bitwise 'or' - /// @param[in] extra_info The extra information for this request (optional, this can be NULL) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_POLICY Noncompliance with the sound system policy - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @pre Call sound_manager_create_stream_information(), sound_manager_acquire_focus() and sound_manager_acquire_focus_all()\n - /// before calling this function. - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - /// @see sound_manager_acquire_focus() - /// @see sound_manager_acquire_focus_all() - /// @see sound_manager_release_focus() - /// @see sound_manager_get_focus_state() - int sound_manager_release_focus_all( - sound_stream_info_h stream_info, - int sound_behavior, - ffi.Pointer extra_info, - ) { - return _sound_manager_release_focus_all( - stream_info, - sound_behavior, - extra_info, - ); - } - - late final _sound_manager_release_focus_allPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_stream_info_h, ffi.Int, - ffi.Pointer)>>('sound_manager_release_focus_all'); - late final _sound_manager_release_focus_all = - _sound_manager_release_focus_allPtr.asFunction< - int Function(sound_stream_info_h, int, ffi.Pointer)>(); - - /// @brief Gets the state of focus. - /// @since_tizen 3.0 - /// @param[in] stream_info The handle of stream information - /// @param[out] state_for_playback The state of playback focus - /// @param[out] state_for_recording The state of recording focus - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Call sound_manager_create_stream_information() before calling this function. - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - /// @see sound_manager_acquire_focus() - /// @see sound_manager_release_focus() - int sound_manager_get_focus_state( - sound_stream_info_h stream_info, - ffi.Pointer state_for_playback, - ffi.Pointer state_for_recording, - ) { - return _sound_manager_get_focus_state( - stream_info, - state_for_playback, - state_for_recording, - ); - } - - late final _sound_manager_get_focus_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_stream_info_h, ffi.Pointer, - ffi.Pointer)>>('sound_manager_get_focus_state'); - late final _sound_manager_get_focus_state = - _sound_manager_get_focus_statePtr.asFunction< - int Function(sound_stream_info_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Sets auto focus reacquisition property. - /// @since_tizen 3.0 - /// - /// @remarks The focus reacquisition is set as default. - /// If you don't want to reacquire the focus you've lost automatically, disable the focus reacquisition setting by using this function and vice versa. - /// - /// @param[in] stream_info The handle of stream information - /// @param[in] enable The auto focus reacquisition property value to set: (@c true = enable, @c false = disable) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Call sound_manager_create_stream_information() before calling this function. - /// @see sound_manager_create_stream_information() - int sound_manager_set_focus_reacquisition( - sound_stream_info_h stream_info, - bool enable, - ) { - return _sound_manager_set_focus_reacquisition( - stream_info, - enable, - ); - } - - late final _sound_manager_set_focus_reacquisitionPtr = _lookup< - ffi.NativeFunction>( - 'sound_manager_set_focus_reacquisition'); - late final _sound_manager_set_focus_reacquisition = - _sound_manager_set_focus_reacquisitionPtr - .asFunction(); - - /// @brief Gets auto focus reacquisition property. - /// @since_tizen 3.0 - /// - /// @remarks The default value is true. - /// - /// @param[in] stream_info The handle of stream information - /// @param[out] enabled The value of focus auto reacquisition property: (@c true = enabled, @c false = disabled) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Call sound_manager_create_stream_information() before calling this function. - /// @see sound_manager_create_stream_information() - int sound_manager_get_focus_reacquisition( - sound_stream_info_h stream_info, - ffi.Pointer enabled, - ) { - return _sound_manager_get_focus_reacquisition( - stream_info, - enabled, - ); - } - - late final _sound_manager_get_focus_reacquisitionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_stream_info_h, - ffi.Pointer)>>('sound_manager_get_focus_reacquisition'); - late final _sound_manager_get_focus_reacquisition = - _sound_manager_get_focus_reacquisitionPtr.asFunction< - int Function(sound_stream_info_h, ffi.Pointer)>(); - - /// @brief Delivers focuses to another stream information. - /// @since_tizen 4.0 - /// - /// @remarks This function does not affect any invocation of sound_stream_focus_state_changed_cb() or\n - /// sound_stream_focus_state_watch_cb(). Do not call this function within sound_stream_focus_state_changed_cb() or\n - /// sound_stream_focus_state_watch_cb(), otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned. - /// - /// @param[in] source The source handle of stream information which has focuses - /// @param[in] destination The destination handle of stream information which will receive focuses - /// @param[in] focus_mask The focus mask to deliver - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_INVALID_STATE Invalid state - /// @retval #SOUND_MANAGER_ERROR_POLICY Noncompliance with the sound system policy - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @pre Call sound_manager_create_stream_information(), sound_manager_acquire_focus() and sound_manager_acquire_focus_all()\n - /// before calling this function. - /// @see sound_manager_create_stream_information() - /// @see sound_manager_acquire_focus() - /// @see sound_manager_acquire_focus_all() - int sound_manager_deliver_focus( - sound_stream_info_h source, - sound_stream_info_h destination, - int focus_mask, - ) { - return _sound_manager_deliver_focus( - source, - destination, - focus_mask, - ); - } - - late final _sound_manager_deliver_focusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_stream_info_h, sound_stream_info_h, - ffi.Int32)>>('sound_manager_deliver_focus'); - late final _sound_manager_deliver_focus = - _sound_manager_deliver_focusPtr.asFunction< - int Function(sound_stream_info_h, sound_stream_info_h, int)>(); - - /// @brief Checks if the stream information is using the device. - /// @since_tizen 3.0 - /// - /// @param[in] stream_info The handle of stream information - /// @param[in] device The device item - /// @param[out] is_on Whether the stream info is using the device or not: (@c true = use, @c false = not use) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_get_device_list() - /// @see sound_manager_get_next_device() - /// @see sound_manager_get_prev_device() - /// @see sound_manager_get_device_type() - /// @see sound_manager_get_device_io_direction() - /// @see sound_manager_get_device_id() - /// @see sound_manager_get_device_name() - /// @see sound_manager_free_device_list() - int sound_manager_is_stream_on_device( - sound_stream_info_h stream_info, - sound_device_h device, - ffi.Pointer is_on, - ) { - return _sound_manager_is_stream_on_device( - stream_info, - device, - is_on, - ); - } - - late final _sound_manager_is_stream_on_devicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_stream_info_h, sound_device_h, - ffi.Pointer)>>('sound_manager_is_stream_on_device'); - late final _sound_manager_is_stream_on_device = - _sound_manager_is_stream_on_devicePtr.asFunction< - int Function( - sound_stream_info_h, sound_device_h, ffi.Pointer)>(); - - /// @brief Gets the current device type for media playback stream. - /// @since_tizen 3.0 - /// - /// @param[out] device_type The output device type that a media playback stream can go out - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_NO_DATA No data - /// @see sound_manager_get_device_type() - /// @see sound_manager_get_device_io_direction() - /// @see sound_manager_get_device_id() - /// @see sound_manager_get_device_name() - int sound_manager_get_current_media_playback_device_type( - ffi.Pointer device_type, - ) { - return _sound_manager_get_current_media_playback_device_type( - device_type, - ); - } - - late final _sound_manager_get_current_media_playback_device_typePtr = - _lookup)>>( - 'sound_manager_get_current_media_playback_device_type'); - late final _sound_manager_get_current_media_playback_device_type = - _sound_manager_get_current_media_playback_device_typePtr - .asFunction)>(); - - /// @brief Gets the reason for the current acquired playback focus. - /// @since_tizen 3.0 - /// - /// @remarks If there is no acquired playback focus in this system, it'll return #SOUND_MANAGER_ERROR_NO_DATA.\n - /// Do not call this function within sound_stream_focus_state_changed_cb() or sound_stream_focus_state_watch_cb(),\n - /// otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned.\n - /// The @a extra_info should be released using free(). - /// - /// @param[out] acquired_by The reason for the current acquired playback focus - /// @param[out] sound_behavior The requested sound behavior that should be followed, values of #sound_behavior_e combined with bitwise 'or' - /// @param[out] extra_info The extra information of the acquired playback focus (optional, this can be NULL) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_NO_DATA No data - /// @see sound_manager_get_current_recording_focus() - int sound_manager_get_current_playback_focus( - ffi.Pointer acquired_by, - ffi.Pointer sound_behavior, - ffi.Pointer> extra_info, - ) { - return _sound_manager_get_current_playback_focus( - acquired_by, - sound_behavior, - extra_info, - ); - } - - late final _sound_manager_get_current_playback_focusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>( - 'sound_manager_get_current_playback_focus'); - late final _sound_manager_get_current_playback_focus = - _sound_manager_get_current_playback_focusPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets the reason for the current acquired recording focus. - /// @since_tizen 3.0 - /// - /// @remarks If there is no acquired recording focus in this system, it'll return #SOUND_MANAGER_ERROR_NO_DATA.\n - /// Do not call this function within sound_stream_focus_state_changed_cb() or sound_stream_focus_state_watch_cb(),\n - /// otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned.\n - /// The @a extra_info should be released using free(). - /// - /// @param[out] acquired_by The reason for the current acquired recording focus - /// @param[out] sound_behavior The requested sound behavior that should be followed, values of #sound_behavior_e combined with bitwise 'or' - /// @param[out] extra_info The extra information of the acquired recording focus (optional, this can be NULL) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_NO_DATA No data - /// @see sound_manager_get_current_playback_focus() - int sound_manager_get_current_recording_focus( - ffi.Pointer acquired_by, - ffi.Pointer sound_behavior, - ffi.Pointer> extra_info, - ) { - return _sound_manager_get_current_recording_focus( - acquired_by, - sound_behavior, - extra_info, - ); - } - - late final _sound_manager_get_current_recording_focusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>( - 'sound_manager_get_current_recording_focus'); - late final _sound_manager_get_current_recording_focus = - _sound_manager_get_current_recording_focusPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Registers the watch callback function to be invoked when the focus state for each sound stream type is changed regardless of the process. - /// @since_tizen 3.0 - /// - /// @remarks The registered callback is invoked by the internal thread of the sound manager.\n - /// Do not call this function within sound_stream_focus_state_changed_cb() or sound_stream_focus_state_watch_cb(),\n - /// otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned. - /// - /// @param[in] focus_mask The focus mask that user wants to watch - /// @param[in] callback The focus state change watch callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] id The focus state change watch callback id - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_remove_focus_state_watch_cb() - int sound_manager_add_focus_state_watch_cb( - int focus_mask, - sound_stream_focus_state_watch_cb callback, - ffi.Pointer user_data, - ffi.Pointer id, - ) { - return _sound_manager_add_focus_state_watch_cb( - focus_mask, - callback, - user_data, - id, - ); - } - - late final _sound_manager_add_focus_state_watch_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - sound_stream_focus_state_watch_cb, - ffi.Pointer, - ffi.Pointer)>>('sound_manager_add_focus_state_watch_cb'); - late final _sound_manager_add_focus_state_watch_cb = - _sound_manager_add_focus_state_watch_cbPtr.asFunction< - int Function(int, sound_stream_focus_state_watch_cb, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Unregisters the focus state change watch callback. - /// @since_tizen 3.0 - /// - /// @remarks Do not call this function within sound_stream_focus_state_changed_cb() or sound_stream_focus_state_watch_cb(),\n - /// otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned. - /// - /// @param[in] id The focus state change watch callback id - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_add_focus_state_watch_cb() - int sound_manager_remove_focus_state_watch_cb( - int id, - ) { - return _sound_manager_remove_focus_state_watch_cb( - id, - ); - } - - late final _sound_manager_remove_focus_state_watch_cbPtr = - _lookup>( - 'sound_manager_remove_focus_state_watch_cb'); - late final _sound_manager_remove_focus_state_watch_cb = - _sound_manager_remove_focus_state_watch_cbPtr - .asFunction(); - - /// @brief Gets the list consisting of connected devices. - /// @since_tizen 3.0 - /// - /// @remarks @a device_list should be freed using sound_manager_free_device_list().\n - /// Use sound_manager_get_next_device() to get the first node of the list. - /// - /// @param[in] device_mask The mask values of #sound_device_mask_e combined with bitwise 'or' - /// @param[out] device_list The list of connected devices - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_NO_DATA No data - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_get_next_device() - /// @see sound_manager_get_prev_device() - /// @see sound_manager_get_device_type() - /// @see sound_manager_get_device_io_direction() - /// @see sound_manager_get_device_id() - /// @see sound_manager_get_device_name() - /// @see sound_manager_is_device_running() - /// @see sound_manager_free_device_list() - int sound_manager_get_device_list( - int device_mask, - ffi.Pointer device_list, - ) { - return _sound_manager_get_device_list( - device_mask, - device_list, - ); - } - - late final _sound_manager_get_device_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer)>>( - 'sound_manager_get_device_list'); - late final _sound_manager_get_device_list = _sound_manager_get_device_listPtr - .asFunction)>(); - - /// @brief Frees device list and each item of list. - /// @since_tizen 3.0 - /// - /// @remarks This function will deallocate not only device list itself but also each item. - /// - /// @param[in] device_list The device list got with sound_manager_get_device_list(). - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// - /// @see sound_manager_get_device_list() - /// @see sound_manager_get_next_device() - /// @see sound_manager_get_prev_device() - /// @see sound_manager_get_device_type() - /// @see sound_manager_get_device_io_direction() - /// @see sound_manager_get_device_id() - /// @see sound_manager_get_device_name() - /// @see sound_manager_is_device_running() - int sound_manager_free_device_list( - sound_device_list_h device_list, - ) { - return _sound_manager_free_device_list( - device_list, - ); - } - - late final _sound_manager_free_device_listPtr = - _lookup>( - 'sound_manager_free_device_list'); - late final _sound_manager_free_device_list = - _sound_manager_free_device_listPtr - .asFunction(); - - /// @brief Gets the next item of the device list. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] device_list The list of connected devices - /// @param[out] device The device item - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_NO_DATA No data - /// @see sound_manager_get_device_list() - /// @see sound_manager_get_prev_device() - /// @see sound_manager_get_device_type() - /// @see sound_manager_get_device_io_direction() - /// @see sound_manager_get_device_id() - /// @see sound_manager_get_device_name() - /// @see sound_manager_is_device_running() - /// @see sound_manager_free_device_list() - int sound_manager_get_next_device( - sound_device_list_h device_list, - ffi.Pointer device, - ) { - return _sound_manager_get_next_device( - device_list, - device, - ); - } - - late final _sound_manager_get_next_devicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_device_list_h, - ffi.Pointer)>>('sound_manager_get_next_device'); - late final _sound_manager_get_next_device = - _sound_manager_get_next_devicePtr.asFunction< - int Function(sound_device_list_h, ffi.Pointer)>(); - - /// @brief Gets the previous item of the device list. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] device_list The list of connected devices - /// @param[out] device The device item - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_NO_DATA No data - /// @see sound_manager_get_device_list() - /// @see sound_manager_get_next_device() - /// @see sound_manager_get_device_type() - /// @see sound_manager_get_device_io_direction() - /// @see sound_manager_get_device_id() - /// @see sound_manager_get_device_name() - /// @see sound_manager_is_device_running() - /// @see sound_manager_free_device_list() - int sound_manager_get_prev_device( - sound_device_list_h device_list, - ffi.Pointer device, - ) { - return _sound_manager_get_prev_device( - device_list, - device, - ); - } - - late final _sound_manager_get_prev_devicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_device_list_h, - ffi.Pointer)>>('sound_manager_get_prev_device'); - late final _sound_manager_get_prev_device = - _sound_manager_get_prev_devicePtr.asFunction< - int Function(sound_device_list_h, ffi.Pointer)>(); - - /// @brief Gets the type of the device. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] device The device item - /// @param[out] type The type of the device - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see sound_manager_get_device_list() - /// @see sound_manager_get_next_device() - /// @see sound_manager_get_prev_device() - /// @see sound_manager_get_device_io_direction() - /// @see sound_manager_get_device_id() - /// @see sound_manager_get_device_name() - /// @see sound_manager_is_device_running() - /// @see sound_manager_free_device_list() - int sound_manager_get_device_type( - sound_device_h device, - ffi.Pointer type, - ) { - return _sound_manager_get_device_type( - device, - type, - ); - } - - late final _sound_manager_get_device_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_device_h, - ffi.Pointer)>>('sound_manager_get_device_type'); - late final _sound_manager_get_device_type = _sound_manager_get_device_typePtr - .asFunction)>(); - - /// @brief Gets the io direction of the device. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] device The device item - /// @param[out] io_direction The io direction of the device - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see sound_manager_get_device_list() - /// @see sound_manager_get_next_device() - /// @see sound_manager_get_prev_device() - /// @see sound_manager_get_device_type() - /// @see sound_manager_get_device_id() - /// @see sound_manager_get_device_name() - /// @see sound_manager_is_device_running() - /// @see sound_manager_free_device_list() - int sound_manager_get_device_io_direction( - sound_device_h device, - ffi.Pointer io_direction, - ) { - return _sound_manager_get_device_io_direction( - device, - io_direction, - ); - } - - late final _sound_manager_get_device_io_directionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_device_h, ffi.Pointer)>>( - 'sound_manager_get_device_io_direction'); - late final _sound_manager_get_device_io_direction = - _sound_manager_get_device_io_directionPtr - .asFunction)>(); - - /// @brief Gets the id of the device. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] device The device item - /// @param[out] id The id of the device - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see sound_manager_get_device_list() - /// @see sound_manager_get_next_device() - /// @see sound_manager_get_prev_device() - /// @see sound_manager_get_device_type() - /// @see sound_manager_get_device_io_direction() - /// @see sound_manager_get_device_name() - /// @see sound_manager_is_device_running() - /// @see sound_manager_free_device_list() - int sound_manager_get_device_id( - sound_device_h device, - ffi.Pointer id, - ) { - return _sound_manager_get_device_id( - device, - id, - ); - } - - late final _sound_manager_get_device_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_device_h, - ffi.Pointer)>>('sound_manager_get_device_id'); - late final _sound_manager_get_device_id = _sound_manager_get_device_idPtr - .asFunction)>(); - - /// @brief Gets the name of the device. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] device The device item - /// @param[out] name The name of the device - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_get_device_list() - /// @see sound_manager_get_next_device() - /// @see sound_manager_get_prev_device() - /// @see sound_manager_get_device_type() - /// @see sound_manager_get_device_io_direction() - /// @see sound_manager_get_device_id() - /// @see sound_manager_is_device_running() - /// @see sound_manager_free_device_list() - int sound_manager_get_device_name( - sound_device_h device, - ffi.Pointer> name, - ) { - return _sound_manager_get_device_name( - device, - name, - ); - } - - late final _sound_manager_get_device_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - sound_device_h, ffi.Pointer>)>>( - 'sound_manager_get_device_name'); - late final _sound_manager_get_device_name = - _sound_manager_get_device_namePtr.asFunction< - int Function(sound_device_h, ffi.Pointer>)>(); - - /// @brief Checks if the device is running. - /// @since_tizen 5.0 - /// @param[in] device The device item - /// @param[out] is_running Whether the device is running or not: (@c true = running, @c false = not running) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see sound_manager_get_device_list() - /// @see sound_manager_get_next_device() - /// @see sound_manager_get_prev_device() - /// @see sound_manager_get_device_type() - /// @see sound_manager_get_device_io_direction() - /// @see sound_manager_get_device_id() - /// @see sound_manager_get_device_name() - /// @see sound_manager_free_device_list() - int sound_manager_is_device_running( - sound_device_h device, - ffi.Pointer is_running, - ) { - return _sound_manager_is_device_running( - device, - is_running, - ); - } - - late final _sound_manager_is_device_runningPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_device_h, - ffi.Pointer)>>('sound_manager_is_device_running'); - late final _sound_manager_is_device_running = - _sound_manager_is_device_runningPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. Use sound_manager_is_device_running() instead. - /// @brief Gets the state of the device. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] device The device item - /// @param[out] state The state of the device - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see sound_manager_get_device_list() - /// @see sound_manager_get_next_device() - /// @see sound_manager_get_prev_device() - /// @see sound_manager_get_device_type() - /// @see sound_manager_get_device_io_direction() - /// @see sound_manager_get_device_id() - /// @see sound_manager_get_device_name() - /// @see sound_manager_free_device_list() - int sound_manager_get_device_state( - sound_device_h device, - ffi.Pointer state, - ) { - return _sound_manager_get_device_state( - device, - state, - ); - } - - late final _sound_manager_get_device_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_device_h, - ffi.Pointer)>>('sound_manager_get_device_state'); - late final _sound_manager_get_device_state = - _sound_manager_get_device_statePtr - .asFunction)>(); - - /// @brief Gets the device's supported sample formats. - /// @since_tizen 5.0 - /// - /// @remarks @a device should be #SOUND_DEVICE_USB_AUDIO type and an output device,\n - /// otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned.\n - /// Use sound_manager_get_device_io_direction() to check if it is an output device or not.\n - /// The @a formats should be released using free(). - /// - /// @param[in] device The device item - /// @param[out] formats The supported sample format list - /// @param[out] num_of_elems The number of elements in the sample format list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_set_sample_format() - /// @see sound_manager_get_sample_format() - int sound_manager_get_supported_sample_formats( - sound_device_h device, - ffi.Pointer> formats, - ffi.Pointer num_of_elems, - ) { - return _sound_manager_get_supported_sample_formats( - device, - formats, - num_of_elems, - ); - } - - late final _sound_manager_get_supported_sample_formatsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - sound_device_h, - ffi.Pointer>, - ffi.Pointer)>>( - 'sound_manager_get_supported_sample_formats'); - late final _sound_manager_get_supported_sample_formats = - _sound_manager_get_supported_sample_formatsPtr.asFunction< - int Function(sound_device_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Sets the device's sample format. - /// @since_tizen 5.0 - /// - /// @remarks @a device should be #SOUND_DEVICE_USB_AUDIO type and an output device.\n - /// @a format should be one of the values received from sound_manager_get_supported_sample_formats(),\n - /// otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned.\n - /// Use sound_manager_get_device_io_direction() to check if it is an output device or not. - /// - /// @param[in] device The device item - /// @param[in] format The sample format - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_get_supported_sample_formats() - /// @see sound_manager_get_sample_format() - int sound_manager_set_sample_format( - sound_device_h device, - int format, - ) { - return _sound_manager_set_sample_format( - device, - format, - ); - } - - late final _sound_manager_set_sample_formatPtr = - _lookup>( - 'sound_manager_set_sample_format'); - late final _sound_manager_set_sample_format = - _sound_manager_set_sample_formatPtr - .asFunction(); - - /// @brief Gets the device's sample format. - /// @since_tizen 5.0 - /// - /// @remarks @a device should be #SOUND_DEVICE_USB_AUDIO type and an output device,\n - /// otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned.\n - /// Use sound_manager_get_device_io_direction() to check if it is an output device or not. - /// - /// @param[in] device The device item - /// @param[out] format The sample format - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_get_supported_sample_formats() - /// @see sound_manager_set_sample_format() - int sound_manager_get_sample_format( - sound_device_h device, - ffi.Pointer format, - ) { - return _sound_manager_get_sample_format( - device, - format, - ); - } - - late final _sound_manager_get_sample_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_device_h, - ffi.Pointer)>>('sound_manager_get_sample_format'); - late final _sound_manager_get_sample_format = - _sound_manager_get_sample_formatPtr - .asFunction)>(); - - /// @brief Gets the device's supported sample rates. - /// @since_tizen 5.0 - /// - /// @remarks @a device should be #SOUND_DEVICE_USB_AUDIO type and an output device,\n - /// otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned.\n - /// Use sound_manager_get_device_io_direction() to check if it is an output device or not.\n - /// The @a rates should be released using free(). - /// - /// @param[in] device The device item - /// @param[out] rates The supported sample rate list - /// @param[out] num_of_elems The number of elements in the sample rate list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_set_sample_rate() - /// @see sound_manager_get_sample_rate() - int sound_manager_get_supported_sample_rates( - sound_device_h device, - ffi.Pointer> rates, - ffi.Pointer num_of_elems, - ) { - return _sound_manager_get_supported_sample_rates( - device, - rates, - num_of_elems, - ); - } - - late final _sound_manager_get_supported_sample_ratesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - sound_device_h, - ffi.Pointer>, - ffi.Pointer)>>( - 'sound_manager_get_supported_sample_rates'); - late final _sound_manager_get_supported_sample_rates = - _sound_manager_get_supported_sample_ratesPtr.asFunction< - int Function(sound_device_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Sets the device's sample rate. - /// @since_tizen 5.0 - /// - /// @remarks @a device should be #SOUND_DEVICE_USB_AUDIO type and an output device.\n - /// @a rate should be one of the values received from sound_manager_get_supported_sample_rates(),\n - /// otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned.\n - /// Use sound_manager_get_device_io_direction() to check if it is an output device or not. - /// - /// @param[in] device The device item - /// @param[in] rate The sample rate - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_get_supported_sample_rates() - /// @see sound_manager_get_sample_rate() - int sound_manager_set_sample_rate( - sound_device_h device, - int rate, - ) { - return _sound_manager_set_sample_rate( - device, - rate, - ); - } - - late final _sound_manager_set_sample_ratePtr = - _lookup>( - 'sound_manager_set_sample_rate'); - late final _sound_manager_set_sample_rate = _sound_manager_set_sample_ratePtr - .asFunction(); - - /// @brief Gets the device's sample rate. - /// @since_tizen 5.0 - /// - /// @remarks @a device should be #SOUND_DEVICE_USB_AUDIO type and an output device,\n - /// otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned.\n - /// Use sound_manager_get_device_io_direction() to check if it is an output device or not. - /// - /// @param[in] device The device item - /// @param[out] rate The sample rate - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_get_supported_sample_rates() - /// @see sound_manager_set_sample_rate() - int sound_manager_get_sample_rate( - sound_device_h device, - ffi.Pointer rate, - ) { - return _sound_manager_get_sample_rate( - device, - rate, - ); - } - - late final _sound_manager_get_sample_ratePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_device_h, - ffi.Pointer)>>('sound_manager_get_sample_rate'); - late final _sound_manager_get_sample_rate = _sound_manager_get_sample_ratePtr - .asFunction)>(); - - /// @brief Sets the device's 'avoid resampling' property. - /// @since_tizen 5.0 - /// - /// @remarks @a device should be #SOUND_DEVICE_USB_AUDIO type and an output device,\n - /// otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned.\n - /// Use sound_manager_get_device_io_direction() to check if it is an output device or not.\n - /// The 'avoid resampling' property is not enabled as default. With this enabled, @a device will\n - /// use the first stream's original sample format and rate without resampling if supported. - /// - /// @param[in] device The device item - /// @param[in] enable The 'avoid resampling' property value to set: (@c true = enable, @c false = disable) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_get_avoid_resampling() - int sound_manager_set_avoid_resampling( - sound_device_h device, - bool enable, - ) { - return _sound_manager_set_avoid_resampling( - device, - enable, - ); - } - - late final _sound_manager_set_avoid_resamplingPtr = - _lookup>( - 'sound_manager_set_avoid_resampling'); - late final _sound_manager_set_avoid_resampling = - _sound_manager_set_avoid_resamplingPtr - .asFunction(); - - /// @brief Gets the device's 'avoid resampling' property. - /// @since_tizen 5.0 - /// - /// @remarks @a device should be #SOUND_DEVICE_USB_AUDIO type and an output device,\n - /// otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned.\n - /// Use sound_manager_get_device_io_direction() to check if it is an output device or not.\n - /// The default value of 'avoid resampling' is false. - /// - /// @param[in] device The device item - /// @param[in] enabled The value of 'avoid resampling' property: (@c true = enabled, @c false = disabled) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_set_avoid_resampling() - int sound_manager_get_avoid_resampling( - sound_device_h device, - ffi.Pointer enabled, - ) { - return _sound_manager_get_avoid_resampling( - device, - enabled, - ); - } - - late final _sound_manager_get_avoid_resamplingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_device_h, - ffi.Pointer)>>('sound_manager_get_avoid_resampling'); - late final _sound_manager_get_avoid_resampling = - _sound_manager_get_avoid_resamplingPtr - .asFunction)>(); - - /// @brief Sets the restriction of stream type only for media. - /// @since_tizen 5.0 - /// - /// @remarks @a device should be #SOUND_DEVICE_USB_AUDIO type and an output device,\n - /// otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned.\n - /// Use sound_manager_get_device_io_direction() to check if it is an output device or not.\n - /// This property is not enabled as default. With this enabled, no other stream types\n - /// except #SOUND_STREAM_TYPE_MEDIA is not allowed to @a device. - /// - /// @param[in] device The device item - /// @param[in] enable The 'media stream only' property value to set: (@c true = enable, @c false = disable) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_get_media_stream_only() - int sound_manager_set_media_stream_only( - sound_device_h device, - bool enable, - ) { - return _sound_manager_set_media_stream_only( - device, - enable, - ); - } - - late final _sound_manager_set_media_stream_onlyPtr = - _lookup>( - 'sound_manager_set_media_stream_only'); - late final _sound_manager_set_media_stream_only = - _sound_manager_set_media_stream_onlyPtr - .asFunction(); - - /// @brief Gets the restriction of stream type only for media. - /// @since_tizen 5.0 - /// - /// @remarks @a device should be #SOUND_DEVICE_USB_AUDIO type and an output device,\n - /// otherwise #SOUND_MANAGER_ERROR_INVALID_OPERATION will be returned.\n - /// Use sound_manager_get_device_io_direction() to check if it is an output device or not.\n - /// The property is not enabled as default. - /// - /// @param[in] device The device item - /// @param[out] enabled The value of 'media stream only' property: (@c true = enabled, @c false = disabled) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_set_media_stream_only() - int sound_manager_get_media_stream_only( - sound_device_h device, - ffi.Pointer enabled, - ) { - return _sound_manager_get_media_stream_only( - device, - enabled, - ); - } - - late final _sound_manager_get_media_stream_onlyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_device_h, - ffi.Pointer)>>('sound_manager_get_media_stream_only'); - late final _sound_manager_get_media_stream_only = - _sound_manager_get_media_stream_onlyPtr - .asFunction)>(); - - /// @brief Adds a callback function to be invoked when the connection state of a sound device was changed. - /// @since_tizen 3.0 - /// - /// @param[in] device_mask Devices for which changes should be tracked, values of #sound_device_mask_e combined with bitwise 'or' - /// @param[in] callback The device connection state changed callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] id The callback id - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @post sound_device_connection_changed_cb() will be invoked. - /// @see sound_manager_remove_device_connection_changed_cb() - /// @see sound_device_connection_changed_cb() - int sound_manager_add_device_connection_changed_cb( - int device_mask, - sound_device_connection_changed_cb callback, - ffi.Pointer user_data, - ffi.Pointer id, - ) { - return _sound_manager_add_device_connection_changed_cb( - device_mask, - callback, - user_data, - id, - ); - } - - late final _sound_manager_add_device_connection_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, sound_device_connection_changed_cb, - ffi.Pointer, ffi.Pointer)>>( - 'sound_manager_add_device_connection_changed_cb'); - late final _sound_manager_add_device_connection_changed_cb = - _sound_manager_add_device_connection_changed_cbPtr.asFunction< - int Function(int, sound_device_connection_changed_cb, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Removes a callback function invoked when the connection of a sound device was changed. - /// @since_tizen 3.0 - /// - /// @param[in] id The id of the callback to remove - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_add_device_connection_changed_cb() - int sound_manager_remove_device_connection_changed_cb( - int id, - ) { - return _sound_manager_remove_device_connection_changed_cb( - id, - ); - } - - late final _sound_manager_remove_device_connection_changed_cbPtr = - _lookup>( - 'sound_manager_remove_device_connection_changed_cb'); - late final _sound_manager_remove_device_connection_changed_cb = - _sound_manager_remove_device_connection_changed_cbPtr - .asFunction(); - - /// @brief Adds a callback function to be invoked when the state of a sound device was changed. - /// @since_tizen 5.0 - /// - /// @param[in] device_mask Devices for which changes should be tracked, values of #sound_device_mask_e combined with bitwise 'or' - /// @param[in] callback The device state changed callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] id The callback id - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @post sound_device_running_changed_cb() will be invoked. - /// @see sound_manager_remove_device_running_changed_cb() - /// @see sound_device_running_changed_cb() - int sound_manager_add_device_running_changed_cb( - int device_mask, - sound_device_running_changed_cb callback, - ffi.Pointer user_data, - ffi.Pointer id, - ) { - return _sound_manager_add_device_running_changed_cb( - device_mask, - callback, - user_data, - id, - ); - } - - late final _sound_manager_add_device_running_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, sound_device_running_changed_cb, - ffi.Pointer, ffi.Pointer)>>( - 'sound_manager_add_device_running_changed_cb'); - late final _sound_manager_add_device_running_changed_cb = - _sound_manager_add_device_running_changed_cbPtr.asFunction< - int Function(int, sound_device_running_changed_cb, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Removes a callback function invoked when the state of a sound device was changed. - /// @since_tizen 5.0 - /// - /// @param[in] id The id of the callback to remove - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_add_device_running_changed_cb() - int sound_manager_remove_device_running_changed_cb( - int id, - ) { - return _sound_manager_remove_device_running_changed_cb( - id, - ); - } - - late final _sound_manager_remove_device_running_changed_cbPtr = - _lookup>( - 'sound_manager_remove_device_running_changed_cb'); - late final _sound_manager_remove_device_running_changed_cb = - _sound_manager_remove_device_running_changed_cbPtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. Use sound_manager_add_device_running_changed_cb() instead. - /// @brief Adds a callback function to be invoked when the state of a sound device was changed. - /// @since_tizen 3.0 - /// - /// @param[in] device_mask Devices for which changes should be tracked, values of #sound_device_mask_e combined with bitwise 'or' - /// @param[in] callback The device state changed callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] id The callback id - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @post sound_device_state_changed_cb() will be invoked. - /// @see sound_manager_remove_device_state_changed_cb() - /// @see sound_device_state_connected_cb() - int sound_manager_add_device_state_changed_cb( - int device_mask, - sound_device_state_changed_cb callback, - ffi.Pointer user_data, - ffi.Pointer id, - ) { - return _sound_manager_add_device_state_changed_cb( - device_mask, - callback, - user_data, - id, - ); - } - - late final _sound_manager_add_device_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, sound_device_state_changed_cb, - ffi.Pointer, ffi.Pointer)>>( - 'sound_manager_add_device_state_changed_cb'); - late final _sound_manager_add_device_state_changed_cb = - _sound_manager_add_device_state_changed_cbPtr.asFunction< - int Function(int, sound_device_state_changed_cb, - ffi.Pointer, ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. Use sound_manager_remove_device_running_changed_cb() instead. - /// @brief Removes a callback function invoked when the state of a sound device was changed. - /// @since_tizen 3.0 - /// - /// @param[in] id The id of the callback to remove - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SOUND_MANAGER_ERROR_NONE Success - /// @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system - /// @see sound_manager_add_device_state_changed_cb() - int sound_manager_remove_device_state_changed_cb( - int id, - ) { - return _sound_manager_remove_device_state_changed_cb( - id, - ); - } - - late final _sound_manager_remove_device_state_changed_cbPtr = - _lookup>( - 'sound_manager_remove_device_state_changed_cb'); - late final _sound_manager_remove_device_state_changed_cb = - _sound_manager_remove_device_state_changed_cbPtr - .asFunction(); - - /// @brief Creates an audio device instance and returns an input handle to record PCM (pulse-code modulation) data. - /// - /// @details This function is used for audio input initialization. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// - /// @remarks @a input must be released using audio_in_destroy(). - /// - /// @param[in] sample_rate The audio sample rate in 8000[Hz] ~ 48000[Hz] (Before 5.0), 8000[Hz] ~ 192000[Hz] (Since 5.0) - /// @param[in] channel The audio channel type (mono or stereo) - /// @param[in] type The type of audio sample (8- or 16-bit) - /// @param[out] input An audio input handle is created on success - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_PERMISSION_DENIED Permission denied - /// @retval #AUDIO_IO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #AUDIO_IO_ERROR_DEVICE_NOT_OPENED Device not opened - /// @retval #AUDIO_IO_ERROR_SOUND_POLICY Sound policy error - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// - /// @post The state will be #AUDIO_IO_STATE_IDLE.\n - /// audio_in_set_sound_stream_info() is recommended to be called after this API. - /// @see audio_in_destroy() - int audio_in_create( - int sample_rate, - int channel, - int type, - ffi.Pointer input, - ) { - return _audio_in_create( - sample_rate, - channel, - type, - input, - ); - } - - late final _audio_in_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Int32, ffi.Int32, - ffi.Pointer)>>('audio_in_create'); - late final _audio_in_create = _audio_in_createPtr - .asFunction)>(); - - /// @brief Releases the audio input handle and all its resources associated with an audio stream. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] input The handle to the audio input to destroy - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_DEVICE_NOT_CLOSED Device not closed - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// - /// @see audio_in_create() - int audio_in_destroy( - audio_in_h input, - ) { - return _audio_in_destroy( - input, - ); - } - - late final _audio_in_destroyPtr = - _lookup>( - 'audio_in_destroy'); - late final _audio_in_destroy = - _audio_in_destroyPtr.asFunction(); - - /// @brief Sets the sound stream information to the audio input. - /// - /// @since_tizen 3.0 - /// - /// @remarks @a the sound stream information includes audio routing and volume type. - /// For more details, you can refer to @ref CAPI_MEDIA_SOUND_MANAGER_MODULE - /// System, Alarm, Notification, Emergency, Voice Information, Ringtone VOIP and Ringtone Call stream types are not supported in this API. - /// - /// @param[in] input The handle to the audio input - /// @param[in] stream_info The handle of stream information - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED_TYPE Not supported stream type - /// - /// @pre The state should be #AUDIO_IO_STATE_IDLE.\n - /// Call audio_in_create() before calling this function. - /// @post Call audio_in_prepare() after calling this function. - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - int audio_in_set_sound_stream_info( - audio_in_h input, - sound_stream_info_h stream_info, - ) { - return _audio_in_set_sound_stream_info( - input, - stream_info, - ); - } - - late final _audio_in_set_sound_stream_infoPtr = _lookup< - ffi - .NativeFunction>( - 'audio_in_set_sound_stream_info'); - late final _audio_in_set_sound_stream_info = - _audio_in_set_sound_stream_infoPtr - .asFunction(); - - /// @brief Prepares the audio input for reading audio data by starting buffering of audio data from the device. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] input The handle to the audio input - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// @retval #AUDIO_IO_ERROR_DEVICE_POLICY_RESTRICTION Device policy restriction - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @post The state will be #AUDIO_IO_STATE_RUNNING. - /// @see audio_in_unprepare() - int audio_in_prepare( - audio_in_h input, - ) { - return _audio_in_prepare( - input, - ); - } - - late final _audio_in_preparePtr = - _lookup>( - 'audio_in_prepare'); - late final _audio_in_prepare = - _audio_in_preparePtr.asFunction(); - - /// @brief Unprepares the audio input. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] input The handle to the audio input - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @post The state will be #AUDIO_IO_STATE_IDLE. - /// @see audio_in_prepare() - int audio_in_unprepare( - audio_in_h input, - ) { - return _audio_in_unprepare( - input, - ); - } - - late final _audio_in_unpreparePtr = - _lookup>( - 'audio_in_unprepare'); - late final _audio_in_unprepare = - _audio_in_unpreparePtr.asFunction(); - - /// @brief Pauses buffering of audio data from the device. - /// - /// @since_tizen 3.0 - /// - /// @param[in] input The handle to the audio input - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @pre The state should be #AUDIO_IO_STATE_RUNNING. - /// @post The state will be #AUDIO_IO_STATE_PAUSED. - /// @see audio_in_resume() - int audio_in_pause( - audio_in_h input, - ) { - return _audio_in_pause( - input, - ); - } - - late final _audio_in_pausePtr = - _lookup>( - 'audio_in_pause'); - late final _audio_in_pause = - _audio_in_pausePtr.asFunction(); - - /// @brief Resumes buffering audio data from the device. - /// - /// @since_tizen 3.0 - /// - /// @param[in] input The handle to the audio input - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @pre The state should be #AUDIO_IO_STATE_PAUSED. - /// @post The state will be #AUDIO_IO_STATE_RUNNING. - /// @see audio_in_pause() - int audio_in_resume( - audio_in_h input, - ) { - return _audio_in_resume( - input, - ); - } - - late final _audio_in_resumePtr = - _lookup>( - 'audio_in_resume'); - late final _audio_in_resume = - _audio_in_resumePtr.asFunction(); - - /// @brief Flushes and discards buffered audio data from the input stream. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] input The handle to the audio input - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @pre The state should be #AUDIO_IO_STATE_RUNNING or #AUDIO_IO_STATE_PAUSED. - int audio_in_flush( - audio_in_h input, - ) { - return _audio_in_flush( - input, - ); - } - - late final _audio_in_flushPtr = - _lookup>( - 'audio_in_flush'); - late final _audio_in_flush = - _audio_in_flushPtr.asFunction(); - - /// @brief Reads audio data from the audio input buffer. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] input The handle to the audio input - /// @param[out] buffer The PCM buffer address - /// @param[in] length The length of the PCM data buffer (in bytes) - /// @return The number of read bytes on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_BUFFER Invalid buffer pointer - /// @retval #AUDIO_IO_ERROR_SOUND_POLICY Sound policy error - /// @retval #AUDIO_IO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state should be #AUDIO_IO_STATE_RUNNING. - int audio_in_read( - audio_in_h input, - ffi.Pointer buffer, - int length, - ) { - return _audio_in_read( - input, - buffer, - length, - ); - } - - late final _audio_in_readPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_in_h, ffi.Pointer, - ffi.UnsignedInt)>>('audio_in_read'); - late final _audio_in_read = _audio_in_readPtr - .asFunction, int)>(); - - /// @brief Gets the size to be allocated for the audio input buffer. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] input The handle to the audio input - /// @param[out] size The buffer size (in bytes, the maximum size is 1 MB) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// @see audio_in_read() - int audio_in_get_buffer_size( - audio_in_h input, - ffi.Pointer size, - ) { - return _audio_in_get_buffer_size( - input, - size, - ); - } - - late final _audio_in_get_buffer_sizePtr = _lookup< - ffi - .NativeFunction)>>( - 'audio_in_get_buffer_size'); - late final _audio_in_get_buffer_size = _audio_in_get_buffer_sizePtr - .asFunction)>(); - - /// @brief Gets the sample rate of the audio input data stream. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] input The handle to the audio input - /// @param[out] sample_rate The audio sample rate in Hertz (8000 ~ 48000) (Before 5.0), (8000 ~ 192000) (Since 5.0) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - int audio_in_get_sample_rate( - audio_in_h input, - ffi.Pointer sample_rate, - ) { - return _audio_in_get_sample_rate( - input, - sample_rate, - ); - } - - late final _audio_in_get_sample_ratePtr = _lookup< - ffi - .NativeFunction)>>( - 'audio_in_get_sample_rate'); - late final _audio_in_get_sample_rate = _audio_in_get_sample_ratePtr - .asFunction)>(); - - /// @brief Gets the channel type of the audio input data stream. - /// - /// @details The audio channel type defines whether the audio is mono or stereo. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] input The handle to the audio input - /// @param[out] channel The audio channel type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - int audio_in_get_channel( - audio_in_h input, - ffi.Pointer channel, - ) { - return _audio_in_get_channel( - input, - channel, - ); - } - - late final _audio_in_get_channelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - audio_in_h, ffi.Pointer)>>('audio_in_get_channel'); - late final _audio_in_get_channel = _audio_in_get_channelPtr - .asFunction)>(); - - /// @brief Gets the sample audio format (8-bit or 16-bit) of the audio input data stream. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] input The handle to the audio input - /// @param[out] type The audio sample type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - int audio_in_get_sample_type( - audio_in_h input, - ffi.Pointer type, - ) { - return _audio_in_get_sample_type( - input, - type, - ); - } - - late final _audio_in_get_sample_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - audio_in_h, ffi.Pointer)>>('audio_in_get_sample_type'); - late final _audio_in_get_sample_type = _audio_in_get_sample_typePtr - .asFunction)>(); - - /// @brief Sets an asynchronous(event) callback function to handle recording PCM (pulse-code modulation) data. - /// - /// @details @a callback will be called when you can read a PCM data. - /// It might cause dead lock if change the state of audio handle in callback. - /// (ex: audio_in_destroy, audio_in_prepare, audio_in_unprepare) - /// Recommend to use as a VOIP only. - /// Recommend not to hold callback too long.(it affects latency) - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks @a input must be created using audio_in_create(). - /// - /// @param[in] input An audio input handle - /// @param[in] callback notify stream callback when user can read data (#audio_in_stream_cb) - /// @param[in] user_data user data to be retrieved when callback is called - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #AUDIO_IO_ERROR_DEVICE_NOT_OPENED Device not opened - /// @retval #AUDIO_IO_ERROR_SOUND_POLICY Sound policy error - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// - /// @see audio_in_unset_stream_cb() - int audio_in_set_stream_cb( - audio_in_h input, - audio_in_stream_cb callback, - ffi.Pointer user_data, - ) { - return _audio_in_set_stream_cb( - input, - callback, - user_data, - ); - } - - late final _audio_in_set_stream_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_in_h, audio_in_stream_cb, - ffi.Pointer)>>('audio_in_set_stream_cb'); - late final _audio_in_set_stream_cb = _audio_in_set_stream_cbPtr.asFunction< - int Function(audio_in_h, audio_in_stream_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] input The handle to the audio input - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// - /// @see audio_in_set_stream_cb() - int audio_in_unset_stream_cb( - audio_in_h input, - ) { - return _audio_in_unset_stream_cb( - input, - ); - } - - late final _audio_in_unset_stream_cbPtr = - _lookup>( - 'audio_in_unset_stream_cb'); - late final _audio_in_unset_stream_cb = - _audio_in_unset_stream_cbPtr.asFunction(); - - /// @brief peek from audio in buffer - /// - /// @details This function works correctly only with read, write callback. Otherwise it won't operate as intended. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks @a Works only in asynchronous(event) mode. This will just retrieve buffer pointer from audio in buffer. Drop after use. - /// - /// @param[in] input The handle to the audio input - /// @param[out] buffer start buffer pointer of peeked audio in data - /// @param[out] length amount of audio in data to be peeked - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @pre The state should be #AUDIO_IO_STATE_RUNNING. - /// @see audio_in_drop() - int audio_in_peek( - audio_in_h input, - ffi.Pointer> buffer, - ffi.Pointer length, - ) { - return _audio_in_peek( - input, - buffer, - length, - ); - } - - late final _audio_in_peekPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_in_h, ffi.Pointer>, - ffi.Pointer)>>('audio_in_peek'); - late final _audio_in_peek = _audio_in_peekPtr.asFunction< - int Function(audio_in_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief drop peeked audio buffer. - /// - /// @details This function works correctly only with read, write callback. Otherwise it won't operate as intended. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks @a Works only in asynchronous(event) mode. This will remove audio in data from actual stream buffer. Use this if peeked data is not needed anymore. - /// - /// @param[in] input The handle to the audio input - /// @return 0 on success, otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @pre The state should be #AUDIO_IO_STATE_RUNNING. - /// @see audio_in_peek() - int audio_in_drop( - audio_in_h input, - ) { - return _audio_in_drop( - input, - ); - } - - late final _audio_in_dropPtr = - _lookup>( - 'audio_in_drop'); - late final _audio_in_drop = - _audio_in_dropPtr.asFunction(); - - /// @brief Sets the state changed callback function to the audio input handle. - /// - /// @since_tizen 3.0 - /// - /// @remarks @a input must be created using audio_in_create(). - /// - /// @param[in] input The audio input handle - /// @param[in] callback the state changed callback called when the state of the handle is changed (#audio_in_state_changed_cb) - /// @param[in] user_data user data to be retrieved when callback is called - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// - /// @see audio_in_unset_state_changed_cb() - int audio_in_set_state_changed_cb( - audio_in_h input, - audio_in_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _audio_in_set_state_changed_cb( - input, - callback, - user_data, - ); - } - - late final _audio_in_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_in_h, audio_in_state_changed_cb, - ffi.Pointer)>>('audio_in_set_state_changed_cb'); - late final _audio_in_set_state_changed_cb = - _audio_in_set_state_changed_cbPtr.asFunction< - int Function( - audio_in_h, audio_in_state_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the state changed callback function of the audio input handle. - /// - /// @since_tizen 3.0 - /// - /// @param[in] input The handle to the audio input - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// - /// @see audio_in_set_state_changed_cb() - int audio_in_unset_state_changed_cb( - audio_in_h input, - ) { - return _audio_in_unset_state_changed_cb( - input, - ); - } - - late final _audio_in_unset_state_changed_cbPtr = - _lookup>( - 'audio_in_unset_state_changed_cb'); - late final _audio_in_unset_state_changed_cb = - _audio_in_unset_state_changed_cbPtr - .asFunction(); - - /// @brief Creates an audio device instance and returns an output handle to play PCM (pulse-code modulation) data. - /// - /// @details This function is used for audio output initialization. - /// - /// @since_tizen 3.0 - /// - /// @remarks @a output must be released by audio_out_destroy(). - /// It is recommended to call audio_out_set_sound_stream_info() after this API. - /// - /// @param[in] sample_rate The audio sample rate in 8000[Hz] ~ 48000[Hz] (Before 5.0), 8000[Hz] ~ 192000[Hz] (Since 5.0) - /// @param[in] channel The audio channel type (mono or stereo) - /// @param[in] type The type of audio sample (8-bit or 16-bit) - /// @param[out] output An audio output handle is created on success - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #AUDIO_IO_ERROR_DEVICE_NOT_OPENED Device not opened - /// @retval #AUDIO_IO_ERROR_SOUND_POLICY Sound policy error - /// - /// @post The state will be #AUDIO_IO_STATE_IDLE.\n - /// audio_out_set_sound_stream_info() is recommended to be called after this API. - /// @see audio_out_destroy() - int audio_out_create_new( - int sample_rate, - int channel, - int type, - ffi.Pointer output, - ) { - return _audio_out_create_new( - sample_rate, - channel, - type, - output, - ); - } - - late final _audio_out_create_newPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Int32, ffi.Int32, - ffi.Pointer)>>('audio_out_create_new'); - late final _audio_out_create_new = _audio_out_create_newPtr - .asFunction)>(); - - /// @brief Releases the audio output handle, along with all its resources. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] output The handle to the audio output to destroy - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #AUDIO_IO_ERROR_DEVICE_NOT_CLOSED Device not closed - /// - /// @see audio_out_create_new() - int audio_out_destroy( - audio_out_h output, - ) { - return _audio_out_destroy( - output, - ); - } - - late final _audio_out_destroyPtr = - _lookup>( - 'audio_out_destroy'); - late final _audio_out_destroy = - _audio_out_destroyPtr.asFunction(); - - /// @brief Sets the sound stream information to the audio output. - /// - /// @since_tizen 3.0 - /// - /// @remarks @a the sound stream information includes audio routing and volume type. - /// For more details, you can refer to @ref CAPI_MEDIA_SOUND_MANAGER_MODULE - /// Voice Recognition and Loopback stream types are not supported in this API. - /// - /// @param[in] output The handle to the audio output - /// @param[in] stream_info The handle of stream information - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED Not supported - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// @retval #AUDIO_IO_ERROR_NOT_SUPPORTED_TYPE Not supported stream type - /// - /// @pre The state should be #AUDIO_IO_STATE_IDLE.\n - /// Call audio_out_create_new() before calling this function. - /// @post Call audio_out_prepare() after calling this function. - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - int audio_out_set_sound_stream_info( - audio_out_h output, - sound_stream_info_h stream_info, - ) { - return _audio_out_set_sound_stream_info( - output, - stream_info, - ); - } - - late final _audio_out_set_sound_stream_infoPtr = _lookup< - ffi - .NativeFunction>( - 'audio_out_set_sound_stream_info'); - late final _audio_out_set_sound_stream_info = - _audio_out_set_sound_stream_infoPtr - .asFunction(); - - /// @brief Prepares the audio output for playback, this must be called before audio_out_write(). - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] output The handle to the audio output - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @post The state will be #AUDIO_IO_STATE_RUNNING. - /// @see audio_out_unprepare() - int audio_out_prepare( - audio_out_h output, - ) { - return _audio_out_prepare( - output, - ); - } - - late final _audio_out_preparePtr = - _lookup>( - 'audio_out_prepare'); - late final _audio_out_prepare = - _audio_out_preparePtr.asFunction(); - - /// @brief Unprepares the audio output. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] output The handle to the audio output - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @post The state will be #AUDIO_IO_STATE_IDLE. - /// @see audio_out_prepare() - int audio_out_unprepare( - audio_out_h output, - ) { - return _audio_out_unprepare( - output, - ); - } - - late final _audio_out_unpreparePtr = - _lookup>( - 'audio_out_unprepare'); - late final _audio_out_unprepare = - _audio_out_unpreparePtr.asFunction(); - - /// @brief Pauses feeding of audio data to the device. - /// - /// @since_tizen 3.0 - /// - /// @param[in] output The handle to the audio output - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @pre The state should be #AUDIO_IO_STATE_RUNNING. - /// @post The state will be #AUDIO_IO_STATE_PAUSED. - /// @see audio_out_resume() - int audio_out_pause( - audio_out_h output, - ) { - return _audio_out_pause( - output, - ); - } - - late final _audio_out_pausePtr = - _lookup>( - 'audio_out_pause'); - late final _audio_out_pause = - _audio_out_pausePtr.asFunction(); - - /// @brief Resumes feeding of audio data to the device. - /// - /// @since_tizen 3.0 - /// - /// @param[in] output The handle to the audio output - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @pre The state should be #AUDIO_IO_STATE_PAUSED. - /// @post The state will be #AUDIO_IO_STATE_RUNNING. - /// @see audio_out_pause() - int audio_out_resume( - audio_out_h output, - ) { - return _audio_out_resume( - output, - ); - } - - late final _audio_out_resumePtr = - _lookup>( - 'audio_out_resume'); - late final _audio_out_resume = - _audio_out_resumePtr.asFunction(); - - /// @brief Drains buffered audio data from the output stream. - /// - /// @details This function waits until drains stream buffer completely. (e.g end of playback) - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] output The handle to the audio output - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @pre The state should be #AUDIO_IO_STATE_RUNNING or #AUDIO_IO_STATE_PAUSED. - /// @see audio_out_flush() - int audio_out_drain( - audio_out_h output, - ) { - return _audio_out_drain( - output, - ); - } - - late final _audio_out_drainPtr = - _lookup>( - 'audio_out_drain'); - late final _audio_out_drain = - _audio_out_drainPtr.asFunction(); - - /// @brief Flushes and discards buffered audio data from the output stream. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] output The handle to the audio output - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @pre The state should be #AUDIO_IO_STATE_RUNNING or #AUDIO_IO_STATE_PAUSED. - /// @see audio_out_drain() - int audio_out_flush( - audio_out_h output, - ) { - return _audio_out_flush( - output, - ); - } - - late final _audio_out_flushPtr = - _lookup>( - 'audio_out_flush'); - late final _audio_out_flush = - _audio_out_flushPtr.asFunction(); - - /// @brief Starts writing the audio data to the device. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] output The handle to the audio output - /// @param[in,out] buffer The PCM buffer address - /// @param[in] length The length of the PCM buffer (in bytes) - /// @return The written data size on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_BUFFER Invalid buffer pointer - /// @retval #AUDIO_IO_ERROR_SOUND_POLICY Sound policy error - /// @retval #AUDIO_IO_ERROR_INVALID_STATE Invalid state - /// - /// @pre The state should be #AUDIO_IO_STATE_RUNNING. - int audio_out_write( - audio_out_h output, - ffi.Pointer buffer, - int length, - ) { - return _audio_out_write( - output, - buffer, - length, - ); - } - - late final _audio_out_writePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_out_h, ffi.Pointer, - ffi.UnsignedInt)>>('audio_out_write'); - late final _audio_out_write = _audio_out_writePtr - .asFunction, int)>(); - - /// @brief Gets the size to be allocated for the audio output buffer. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] output The handle to the audio output - /// @param[out] size The suggested buffer size (in bytes, the maximum size is 1 MB) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see audio_out_write() - int audio_out_get_buffer_size( - audio_out_h output, - ffi.Pointer size, - ) { - return _audio_out_get_buffer_size( - output, - size, - ); - } - - late final _audio_out_get_buffer_sizePtr = _lookup< - ffi - .NativeFunction)>>( - 'audio_out_get_buffer_size'); - late final _audio_out_get_buffer_size = _audio_out_get_buffer_sizePtr - .asFunction)>(); - - /// @brief Gets the sample rate of the audio output data stream. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] output The handle to the audio output - /// @param[out] sample_rate The audio sample rate in Hertz (8000 ~ 48000) (Before 5.0), (8000 ~ 192000) (Since 5.0) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - int audio_out_get_sample_rate( - audio_out_h output, - ffi.Pointer sample_rate, - ) { - return _audio_out_get_sample_rate( - output, - sample_rate, - ); - } - - late final _audio_out_get_sample_ratePtr = _lookup< - ffi - .NativeFunction)>>( - 'audio_out_get_sample_rate'); - late final _audio_out_get_sample_rate = _audio_out_get_sample_ratePtr - .asFunction)>(); - - /// @brief Gets the channel type of the audio output data stream. - /// - /// @details The audio channel type defines whether the audio is mono or stereo. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] output The handle to the audio output - /// @param[out] channel The audio channel type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - int audio_out_get_channel( - audio_out_h output, - ffi.Pointer channel, - ) { - return _audio_out_get_channel( - output, - channel, - ); - } - - late final _audio_out_get_channelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - audio_out_h, ffi.Pointer)>>('audio_out_get_channel'); - late final _audio_out_get_channel = _audio_out_get_channelPtr - .asFunction)>(); - - /// @brief Gets the sample audio format (8-bit or 16-bit) of the audio output data stream. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] output The handle to the audio output - /// @param[out] type The audio sample type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - int audio_out_get_sample_type( - audio_out_h output, - ffi.Pointer type, - ) { - return _audio_out_get_sample_type( - output, - type, - ); - } - - late final _audio_out_get_sample_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_out_h, - ffi.Pointer)>>('audio_out_get_sample_type'); - late final _audio_out_get_sample_type = _audio_out_get_sample_typePtr - .asFunction)>(); - - /// @brief Gets the sound type supported by the audio output device. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] output The handle to the audio output - /// @param[out] type The sound type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - int audio_out_get_sound_type( - audio_out_h output, - ffi.Pointer type, - ) { - return _audio_out_get_sound_type( - output, - type, - ); - } - - late final _audio_out_get_sound_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_out_h, - ffi.Pointer)>>('audio_out_get_sound_type'); - late final _audio_out_get_sound_type = _audio_out_get_sound_typePtr - .asFunction)>(); - - /// @brief Sets an asynchronous(event) callback function to handle playing PCM (pulse-code modulation) data. - /// - /// @details @a callback will be called when you can write a PCM data. - /// It might cause dead lock if change the state of audio handle in callback. - /// (ex: audio_out_destroy, audio_out_prepare, audio_out_unprepare) - /// Recommend to use as a VOIP only. - /// Recommend not to hold callback too long.(it affects latency) - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks @a output must be created using audio_out_create_new(). - /// - /// @param[in] output An audio output handle - /// @param[in] callback notify stream callback when user can write data (#audio_out_stream_cb) - /// @param[in] user_data user data to be retrieved when callback is called - /// @return 0 on success, otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #AUDIO_IO_ERROR_DEVICE_NOT_OPENED Device not opened - /// @retval #AUDIO_IO_ERROR_SOUND_POLICY Sound policy error - /// - /// @see audio_out_unset_stream_cb() - int audio_out_set_stream_cb( - audio_out_h output, - audio_out_stream_cb callback, - ffi.Pointer user_data, - ) { - return _audio_out_set_stream_cb( - output, - callback, - user_data, - ); - } - - late final _audio_out_set_stream_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_out_h, audio_out_stream_cb, - ffi.Pointer)>>('audio_out_set_stream_cb'); - late final _audio_out_set_stream_cb = _audio_out_set_stream_cbPtr.asFunction< - int Function(audio_out_h, audio_out_stream_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] output The handle to the audio output - /// @return 0 on success, otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #AUDIO_IO_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see audio_out_set_stream_cb() - int audio_out_unset_stream_cb( - audio_out_h output, - ) { - return _audio_out_unset_stream_cb( - output, - ); - } - - late final _audio_out_unset_stream_cbPtr = - _lookup>( - 'audio_out_unset_stream_cb'); - late final _audio_out_unset_stream_cb = - _audio_out_unset_stream_cbPtr.asFunction(); - - /// @brief Sets the state changed callback function to the audio output handle. - /// - /// @since_tizen 3.0 - /// - /// @remarks @a input must be created using audio_out_create_new(). - /// - /// @param[in] output The audio output handle - /// @param[in] callback the state changed callback called when the state of the handle is changed (#audio_out_state_changed_cb) - /// @param[in] user_data user data to be retrieved when callback is called - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see audio_out_unset_state_changed_cb() - int audio_out_set_state_changed_cb( - audio_out_h output, - audio_out_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _audio_out_set_state_changed_cb( - output, - callback, - user_data, - ); - } - - late final _audio_out_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(audio_out_h, audio_out_state_changed_cb, - ffi.Pointer)>>('audio_out_set_state_changed_cb'); - late final _audio_out_set_state_changed_cb = - _audio_out_set_state_changed_cbPtr.asFunction< - int Function(audio_out_h, audio_out_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the state changed callback function of the audio output handle. - /// - /// @since_tizen 3.0 - /// - /// @param[in] output The handle to the audio output - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #AUDIO_IO_ERROR_NONE Successful - /// @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see audio_out_set_state_changed_cb() - int audio_out_unset_state_changed_cb( - audio_out_h output, - ) { - return _audio_out_unset_state_changed_cb( - output, - ); - } - - late final _audio_out_unset_state_changed_cbPtr = - _lookup>( - 'audio_out_unset_state_changed_cb'); - late final _audio_out_unset_state_changed_cb = - _audio_out_unset_state_changed_cbPtr - .asFunction(); - - /// @brief Creates a media format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @details It creates media format. and reference count will be set to 1 - /// For destroying media_format_h handle, use media_format_unref(). - /// @param[out] fmt allocated media_format_h - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_ref() - /// @see media_format_unref() - int media_format_create( - ffi.Pointer fmt, - ) { - return _media_format_create( - fmt, - ); - } - - late final _media_format_createPtr = _lookup< - ffi.NativeFunction)>>( - 'media_format_create'); - late final _media_format_create = _media_format_createPtr - .asFunction)>(); - - /// @brief Gets format type of media format. - /// @since_tizen 3.0 - /// @param[in] fmt The media_format_h to get format type - /// @param[out] formattype The media_format_type_e, ex) MEDIA_FORMAT_AUDIO - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - int media_format_get_type( - media_format_h fmt, - ffi.Pointer formattype, - ) { - return _media_format_get_type( - fmt, - formattype, - ); - } - - late final _media_format_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_format_h, - ffi.Pointer)>>('media_format_get_type'); - late final _media_format_get_type = _media_format_get_typePtr - .asFunction)>(); - - /// @brief Gets container MIME type of media format. - /// @since_tizen 3.0 - /// @param[in] fmt The media_format_h to get container mime type - /// @param[out] mimetype The media_format_mimetype_e, ex) MEDIA_FORMAT_CONTAINER_MP4 - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_set_container_mime() - int media_format_get_container_mime( - media_format_h fmt, - ffi.Pointer mimetype, - ) { - return _media_format_get_container_mime( - fmt, - mimetype, - ); - } - - late final _media_format_get_container_mimePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_format_h, - ffi.Pointer)>>('media_format_get_container_mime'); - late final _media_format_get_container_mime = - _media_format_get_container_mimePtr - .asFunction)>(); - - /// @brief Gets text track information of media format. - /// @since_tizen 3.0 - /// @param[in] fmt The media_format_h to get text information - /// @param[out] mimetype The media_format_mimetype_e, ex) MEDIA_FORMAT_TEXT_MP4 - /// @param[out] type The media_format_text_type_e - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_set_text_mime() - int media_format_get_text_info( - media_format_h fmt, - ffi.Pointer mimetype, - ffi.Pointer type, - ) { - return _media_format_get_text_info( - fmt, - mimetype, - type, - ); - } - - late final _media_format_get_text_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_format_h, ffi.Pointer, - ffi.Pointer)>>('media_format_get_text_info'); - late final _media_format_get_text_info = - _media_format_get_text_infoPtr.asFunction< - int Function(media_format_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets video information of media format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @details returns mimetype, width, height, average bps, max bps of this media format. - /// @param[in] fmt media_format_h to get video information - /// @param[out] mimetype media_format_mimetype_e , ex) MEDIA_FORMAT_H264_HP - /// @param[out] width width of the video - /// @param[out] height height of the video - /// @param[out] avg_bps average bps of the video - /// @param[out] max_bps max bps of the video - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_set_video_mime() - /// @see media_format_set_video_width() - /// @see media_format_set_video_height() - /// @see media_format_set_video_avg_bps() - /// @see media_format_set_video_max_bps() - int media_format_get_video_info( - media_format_h fmt, - ffi.Pointer mimetype, - ffi.Pointer width, - ffi.Pointer height, - ffi.Pointer avg_bps, - ffi.Pointer max_bps, - ) { - return _media_format_get_video_info( - fmt, - mimetype, - width, - height, - avg_bps, - max_bps, - ); - } - - late final _media_format_get_video_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_format_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('media_format_get_video_info'); - late final _media_format_get_video_info = - _media_format_get_video_infoPtr.asFunction< - int Function( - media_format_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets audio information of media format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @details returns mimetype, channels, height, samplerate bps, max bps of this media format. - /// @param[in] fmt media_format_h to get audio information - /// @param[out] mimetype media_format_mimetype_e , ex) MEDIA_FORMAT_PCM - /// @param[out] channel channel of the audio - /// @param[out] samplerate sampling rate of the audio - /// @param[out] bit bit resolution of the audio - /// @param[out] avg_bps average bps of the audio - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_set_audio_mime() - /// @see media_format_set_audio_channel() - /// @see media_format_set_audio_samplerate() - /// @see media_format_set_audio_bit() - /// @see media_format_set_audio_avg_bps() - int media_format_get_audio_info( - media_format_h fmt, - ffi.Pointer mimetype, - ffi.Pointer channel, - ffi.Pointer samplerate, - ffi.Pointer bit, - ffi.Pointer avg_bps, - ) { - return _media_format_get_audio_info( - fmt, - mimetype, - channel, - samplerate, - bit, - avg_bps, - ); - } - - late final _media_format_get_audio_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_format_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('media_format_get_audio_info'); - late final _media_format_get_audio_info = - _media_format_get_audio_infoPtr.asFunction< - int Function( - media_format_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets audio aac type of media format. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] fmt media_format_h to get audio information - /// @param[out] is_adts AAC ADTS flag of the audio - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_set_audio_aac_type() - int media_format_get_audio_aac_type( - media_format_h fmt, - ffi.Pointer is_adts, - ) { - return _media_format_get_audio_aac_type( - fmt, - is_adts, - ); - } - - late final _media_format_get_audio_aac_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_format_h, - ffi.Pointer)>>('media_format_get_audio_aac_type'); - late final _media_format_get_audio_aac_type = - _media_format_get_audio_aac_typePtr - .asFunction)>(); - - /// @brief Gets audio aac header type of media format. - /// @since_tizen 3.0 - /// @param[in] fmt The media_format_h to get audio information - /// @param[out] aac_header_type The media_format_aac_header_type_e, ex) MEDIA_FORMAT_AAC_HEADER_ADTS - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_set_audio_aac_header_type() - int media_format_get_audio_aac_header_type( - media_format_h fmt, - ffi.Pointer aac_header_type, - ) { - return _media_format_get_audio_aac_header_type( - fmt, - aac_header_type, - ); - } - - late final _media_format_get_audio_aac_header_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_format_h, ffi.Pointer)>>( - 'media_format_get_audio_aac_header_type'); - late final _media_format_get_audio_aac_header_type = - _media_format_get_audio_aac_header_typePtr - .asFunction)>(); - - /// @brief Gets video frame rate of media format. - /// @since_tizen 3.0 - /// @param[in] fmt The media_format_h to get - /// @param[out] frame_rate The video frame rate - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - int media_format_get_video_frame_rate( - media_format_h fmt, - ffi.Pointer frame_rate, - ) { - return _media_format_get_video_frame_rate( - fmt, - frame_rate, - ); - } - - late final _media_format_get_video_frame_ratePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_format_h, - ffi.Pointer)>>('media_format_get_video_frame_rate'); - late final _media_format_get_video_frame_rate = - _media_format_get_video_frame_ratePtr - .asFunction)>(); - - /// @brief Sets container MIME type of media format. - /// @since_tizen 3.0 - /// @param[in] fmt The media_format_h to set - /// @param[in] mimetype The media_format_mimetype_e, ex) MEDIA_FORMAT_MP4 - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_container_mime() - int media_format_set_container_mime( - media_format_h fmt, - int mimetype, - ) { - return _media_format_set_container_mime( - fmt, - mimetype, - ); - } - - late final _media_format_set_container_mimePtr = - _lookup>( - 'media_format_set_container_mime'); - late final _media_format_set_container_mime = - _media_format_set_container_mimePtr - .asFunction(); - - /// @brief Sets text MIME type of media format. - /// @since_tizen 3.0 - /// @param[in] fmt The media_format_h to set - /// @param[in] mimetype The media_format_mimetype_e, ex) MEDIA_FORMAT_TEXT* - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_text_info() - int media_format_set_text_mime( - media_format_h fmt, - int mimetype, - ) { - return _media_format_set_text_mime( - fmt, - mimetype, - ); - } - - late final _media_format_set_text_mimePtr = - _lookup>( - 'media_format_set_text_mime'); - late final _media_format_set_text_mime = _media_format_set_text_mimePtr - .asFunction(); - - /// @brief Sets text type of media format. - /// @since_tizen 3.0 - /// @param[in] fmt The media_format_h to set - /// @param[in] type The text type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_text_info() - int media_format_set_text_type( - media_format_h fmt, - int type, - ) { - return _media_format_set_text_type( - fmt, - type, - ); - } - - late final _media_format_set_text_typePtr = - _lookup>( - 'media_format_set_text_type'); - late final _media_format_set_text_type = _media_format_set_text_typePtr - .asFunction(); - - /// @brief Sets video MIME type of media format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] fmt media_format_h to set - /// @param[in] mimetype media_format_mimetype_e , ex) MEDIA_FORMAT_H264_HP - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_video() - int media_format_set_video_mime( - media_format_h fmt, - int mimetype, - ) { - return _media_format_set_video_mime( - fmt, - mimetype, - ); - } - - late final _media_format_set_video_mimePtr = - _lookup>( - 'media_format_set_video_mime'); - late final _media_format_set_video_mime = _media_format_set_video_mimePtr - .asFunction(); - - /// @brief Sets video width of media format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] fmt media_format_h to set - /// @param[in] width width of the video - /// @pre must set video MIME type by media_format_set_video_mime() - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_video() - int media_format_set_video_width( - media_format_h fmt, - int width, - ) { - return _media_format_set_video_width( - fmt, - width, - ); - } - - late final _media_format_set_video_widthPtr = - _lookup>( - 'media_format_set_video_width'); - late final _media_format_set_video_width = _media_format_set_video_widthPtr - .asFunction(); - - /// @brief Sets video height of media format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] fmt media_format_h to set - /// @param[in] height height of the video - /// @pre must set video MIME type by media_format_set_video_mime() - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_video() - int media_format_set_video_height( - media_format_h fmt, - int height, - ) { - return _media_format_set_video_height( - fmt, - height, - ); - } - - late final _media_format_set_video_heightPtr = - _lookup>( - 'media_format_set_video_height'); - late final _media_format_set_video_height = _media_format_set_video_heightPtr - .asFunction(); - - /// @brief Sets video avg_bps of media format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] fmt media_format_h to set - /// @param[in] avg_bps average bps of the video - /// @pre must set video MIME type by media_format_set_video_mime() - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_video() - int media_format_set_video_avg_bps( - media_format_h fmt, - int avg_bps, - ) { - return _media_format_set_video_avg_bps( - fmt, - avg_bps, - ); - } - - late final _media_format_set_video_avg_bpsPtr = - _lookup>( - 'media_format_set_video_avg_bps'); - late final _media_format_set_video_avg_bps = - _media_format_set_video_avg_bpsPtr - .asFunction(); - - /// @brief Sets video max_bps of media format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] fmt media_format_h to set - /// @param[in] max_bps max bps of the video - /// @pre must set video MIME type by media_format_set_video_mime() - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_video() - int media_format_set_video_max_bps( - media_format_h fmt, - int max_bps, - ) { - return _media_format_set_video_max_bps( - fmt, - max_bps, - ); - } - - late final _media_format_set_video_max_bpsPtr = - _lookup>( - 'media_format_set_video_max_bps'); - late final _media_format_set_video_max_bps = - _media_format_set_video_max_bpsPtr - .asFunction(); - - /// @brief Sets video frame rate of media format. - /// @since_tizen 3.0 - /// @param[in] fmt The media_format_h to set - /// @param[in] frame_rate The video frame rate - /// @pre must set video MIME type by media_format_set_video_mime() - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - int media_format_set_video_frame_rate( - media_format_h fmt, - int frame_rate, - ) { - return _media_format_set_video_frame_rate( - fmt, - frame_rate, - ); - } - - late final _media_format_set_video_frame_ratePtr = - _lookup>( - 'media_format_set_video_frame_rate'); - late final _media_format_set_video_frame_rate = - _media_format_set_video_frame_ratePtr - .asFunction(); - - /// @brief Sets audio MIME type of media format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] fmt media_format_h to set audio information - /// @param[in] mimetype media_format_mimetype_e , ex) MEDIA_FORMAT_PCM - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_audio() - int media_format_set_audio_mime( - media_format_h fmt, - int mimetype, - ) { - return _media_format_set_audio_mime( - fmt, - mimetype, - ); - } - - late final _media_format_set_audio_mimePtr = - _lookup>( - 'media_format_set_audio_mime'); - late final _media_format_set_audio_mime = _media_format_set_audio_mimePtr - .asFunction(); - - /// @brief Sets audio channel of media format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] fmt media_format_h to set audio information - /// @param[in] channel channel of the audio - /// @pre must set audio MIME type by media_format_set_audio_mime() - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_audio() - int media_format_set_audio_channel( - media_format_h fmt, - int channel, - ) { - return _media_format_set_audio_channel( - fmt, - channel, - ); - } - - late final _media_format_set_audio_channelPtr = - _lookup>( - 'media_format_set_audio_channel'); - late final _media_format_set_audio_channel = - _media_format_set_audio_channelPtr - .asFunction(); - - /// @brief Sets audio samplerate of media format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] fmt media_format_h to set - /// @param[in] samplerate sampling rate of the audio - /// @pre must set audio MIME type by media_format_set_audio_mime() - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_audio() - int media_format_set_audio_samplerate( - media_format_h fmt, - int samplerate, - ) { - return _media_format_set_audio_samplerate( - fmt, - samplerate, - ); - } - - late final _media_format_set_audio_sampleratePtr = - _lookup>( - 'media_format_set_audio_samplerate'); - late final _media_format_set_audio_samplerate = - _media_format_set_audio_sampleratePtr - .asFunction(); - - /// @brief Sets audio bit of media format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @details Sets audio bit resolution of this media format - /// @param[in] fmt media_format_h to set - /// @param[in] bit bit of the audio - /// @pre must set audio MIME type by media_format_set_audio_mime() - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_audio() - int media_format_set_audio_bit( - media_format_h fmt, - int bit, - ) { - return _media_format_set_audio_bit( - fmt, - bit, - ); - } - - late final _media_format_set_audio_bitPtr = - _lookup>( - 'media_format_set_audio_bit'); - late final _media_format_set_audio_bit = _media_format_set_audio_bitPtr - .asFunction(); - - /// @brief Sets audio avg_bps of media format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] fmt media_format_h to set - /// @param[in] avg_bps avg_bps of the audio - /// @pre must set audio MIME type by media_format_set_audio_mime() - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_audio() - int media_format_set_audio_avg_bps( - media_format_h fmt, - int avg_bps, - ) { - return _media_format_set_audio_avg_bps( - fmt, - avg_bps, - ); - } - - late final _media_format_set_audio_avg_bpsPtr = - _lookup>( - 'media_format_set_audio_avg_bps'); - late final _media_format_set_audio_avg_bps = - _media_format_set_audio_avg_bpsPtr - .asFunction(); - - /// @brief Sets audio aac type of media format. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @details Sets audio aac data type of this media format - /// @param[in] fmt media_format_h to set - /// @param[in] is_adts aac adts flag of the audio - /// @pre must set audio MIME type by media_format_set_audio_mime() - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_audio_aac_type() - int media_format_set_audio_aac_type( - media_format_h fmt, - bool is_adts, - ) { - return _media_format_set_audio_aac_type( - fmt, - is_adts, - ); - } - - late final _media_format_set_audio_aac_typePtr = - _lookup>( - 'media_format_set_audio_aac_type'); - late final _media_format_set_audio_aac_type = - _media_format_set_audio_aac_typePtr - .asFunction(); - - /// @brief Sets audio aac header type of media format. - /// @since_tizen 3.0 - /// @param[in] fmt The media_format_h to get audio information - /// @param[in] aac_header_type The media_format_aac_header_type_e, ex) MEDIA_FORMAT_AAC_HEADER_ADTS - /// @pre must set audio MIME type by media_format_set_audio_mime() - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_get_audio_aac_header_type() - int media_format_set_audio_aac_header_type( - media_format_h fmt, - int aac_header_type, - ) { - return _media_format_set_audio_aac_header_type( - fmt, - aac_header_type, - ); - } - - late final _media_format_set_audio_aac_header_typePtr = - _lookup>( - 'media_format_set_audio_aac_header_type'); - late final _media_format_set_audio_aac_header_type = - _media_format_set_audio_aac_header_typePtr - .asFunction(); - - /// @brief Increase reference count of media_format_h object. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @details increase ref_count of media_format_h - /// @param[in] fmt exist media_format_h - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_unref() - int media_format_ref( - media_format_h fmt, - ) { - return _media_format_ref( - fmt, - ); - } - - late final _media_format_refPtr = - _lookup>( - 'media_format_ref'); - late final _media_format_ref = - _media_format_refPtr.asFunction(); - - /// @brief Decrease reference count of media_format_h object. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] fmt exist media_format_h - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_ref() - int media_format_unref( - media_format_h fmt, - ) { - return _media_format_unref( - fmt, - ); - } - - late final _media_format_unrefPtr = - _lookup>( - 'media_format_unref'); - late final _media_format_unref = - _media_format_unrefPtr.asFunction(); - - /// @brief Check whether the media_format_h is writable or not. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] fmt exist media_format_h - /// @param[out] is_writable if ref_count is 1, return true. if not, return false - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - int media_format_is_writable( - media_format_h fmt, - ffi.Pointer is_writable, - ) { - return _media_format_is_writable( - fmt, - is_writable, - ); - } - - late final _media_format_is_writablePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_format_h, - ffi.Pointer)>>('media_format_is_writable'); - late final _media_format_is_writable = _media_format_is_writablePtr - .asFunction)>(); - - /// @brief Returns a writable copy of media_format_h. - /// @details If there is only one reference count on fmt, the caller must be the owner, - /// and so this function will return the object unchanged. - /// while, if there is more than one reference count on the object, a new object will be returned. - /// The caller will own a reference to the returned object. - /// In a nutshell, this function unrefs the fmt and refs the out_fmt returned. - /// Don't access fmt after calling this function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If a new object is returned, it will not have its own copy of extra data. - /// The new object's extra data object will be the original object's extra data. - /// @param[in] fmt exist media_format_h , don't access it after calling this function - /// @param[out] out_fmt new copied media_format_h, the caller is owner of this object - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_FORMAT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation - int media_format_make_writable( - media_format_h fmt, - ffi.Pointer out_fmt, - ) { - return _media_format_make_writable( - fmt, - out_fmt, - ); - } - - late final _media_format_make_writablePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_format_h, - ffi.Pointer)>>('media_format_make_writable'); - late final _media_format_make_writable = _media_format_make_writablePtr - .asFunction)>(); - - /// @brief Sets extra data of media format. - /// @details The user can set data that media format does not support. - /// @since_tizen 4.0 - /// @remarks The application is responsible for freeing @a extra_data. - /// For description of extra data behavior upon making an object writable, - /// see the description of media_format_make_writable(). - /// @param[in] fmt The media format handle - /// @param[in] extra_data The extra data to set - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @see media_format_get_extra() - int media_format_set_extra( - media_format_h fmt, - ffi.Pointer extra_data, - ) { - return _media_format_set_extra( - fmt, - extra_data, - ); - } - - late final _media_format_set_extraPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_format_h, - ffi.Pointer)>>('media_format_set_extra'); - late final _media_format_set_extra = _media_format_set_extraPtr - .asFunction)>(); - - /// @brief Gets extra data of media format. - /// @details The user can get extra data which user sets value via media_format_set_extra(). - /// @since_tizen 4.0 - /// @remarks The application is responsible for freeing @a extra_data. - /// For description of extra data behavior upon making an object writable, - /// see the description of media_format_make_writable(). - /// @param[in] fmt The media format handle - /// @param[out] extra_data The extra data to get - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_FORMAT_ERROR_NONE Successful - /// @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter - /// @see media_format_set_extra() - int media_format_get_extra( - media_format_h fmt, - ffi.Pointer> extra_data, - ) { - return _media_format_get_extra( - fmt, - extra_data, - ); - } - - late final _media_format_get_extraPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_format_h, - ffi.Pointer>)>>('media_format_get_extra'); - late final _media_format_get_extra = _media_format_get_extraPtr.asFunction< - int Function(media_format_h, ffi.Pointer>)>(); - - /// @brief Queries surface format list and number of format supported by the system. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks You must release the formats using free(). - /// - /// @param[out] formats The format array which the system can support \n - /// This pointer has to be freed by user. - /// @param[out] num The number of formats - /// - /// @return #TBM_SURFACE_ERROR_NONE if this function succeeds, - /// otherwise an error status value - /// - /// @retval #TBM_SURFACE_ERROR_NONE Success - /// @retval #TBM_SURFACE_ERROR_INVALID_OPERATION Invalid operation - /// - /// @par Example - /// @code - /// #include - /// - /// uint32_t *formats; - /// uint32_t format_num; - /// int ret, i; - /// tbm_surface_error_e tse; - /// - /// tse = tbm_surface_query_formats (&formats, &format_num)) - /// - /// for( i = 0 ; i < format_num ; i++) - /// { - /// if (formats[i] == TBM_FORMAT_RGB332) - /// { - /// .... - /// - /// free (formats); - /// @endcode - int tbm_surface_query_formats( - ffi.Pointer> formats, - ffi.Pointer num, - ) { - return _tbm_surface_query_formats( - formats, - num, - ); - } - - late final _tbm_surface_query_formatsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, - ffi.Pointer)>>('tbm_surface_query_formats'); - late final _tbm_surface_query_formats = - _tbm_surface_query_formatsPtr.asFunction< - int Function( - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Creates the tbm_surface. - /// @details This function creates the tbm_surface with the given width, height, and format. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remark The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// - /// @param[in] width The width of surface - /// @param[in] height The height of surface - /// @param[in] format The format of surface - /// - /// @return #tbm_surface_h on success, - /// otherwise @c NULL - /// - /// @retval #tbm_surface_h The TBM surface handle - /// - /// @exception #TBM_SURFACE_ERROR_NONE Success - /// @exception #TBM_SURFACE_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #TBM_SURFACE_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see tbm_surface_destroy() - /// - /// @par Example - /// @code - /// #include - /// - /// tbm_surface_h surface; - /// - /// surface = tbm_surface_create (128, 128, TBM_FORMAT_RGB332); - /// - /// ... - /// - /// tbm_surface_destroy (surface); - /// @endcode - tbm_surface_h tbm_surface_create( - int width, - int height, - int format, - ) { - return _tbm_surface_create( - width, - height, - format, - ); - } - - late final _tbm_surface_createPtr = _lookup< - ffi.NativeFunction< - tbm_surface_h Function( - ffi.Int, ffi.Int, tbm_format)>>('tbm_surface_create'); - late final _tbm_surface_create = _tbm_surface_createPtr - .asFunction(); - - /// @brief Destroys the tbm_surface. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] surface The #tbm_surface_h - /// - /// @return #TBM_SURFACE_ERROR_NONE on success, - /// otherwise an error status value - /// - /// @retval #TBM_SURFACE_ERROR_NONE Success - /// @retval #TBM_SURFACE_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see tbm_surface_create() - /// - /// @par Example - /// @code - /// #include - /// - /// tbm_surface_h surface; - /// - /// surface = tbm_surface_create (128, 128, TBM_FORMAT_RGB332); - /// - /// ... - /// - /// tbm_surface_destroy (surface); - /// @endcode - int tbm_surface_destroy( - tbm_surface_h surface, - ) { - return _tbm_surface_destroy( - surface, - ); - } - - late final _tbm_surface_destroyPtr = - _lookup>( - 'tbm_surface_destroy'); - late final _tbm_surface_destroy = - _tbm_surface_destroyPtr.asFunction(); - - /// @brief Maps the tbm_surface according to the access option. - /// @details After mapping tbm_surface, the information of tbm_surface is assigned in #tbm_surface_info_s struct. \n - /// The information of tbm_surface has width, height, format, bpp, size, number of planes and information of planes. \n - /// The information of planes has stride, offset, size and pointer of plane. \n - /// #TBM_SURF_OPTION_READ indicates access option to read. \n - /// #TBM_SURF_OPTION_WRITE indicates access option to write. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] surface The #tbm_surface_h - /// @param[in] opt The option to access the tbm_surface - /// @param[out] info The information of the tbm_surface - /// - /// @return #TBM_SURFACE_ERROR_NONE on success, - /// otherwise an error status value - /// - /// @retval #TBM_SURFACE_ERROR_NONE Success - /// @retval #TBM_SURFACE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TBM_SURFACE_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see tbm_surface_unmap(); - /// - /// @par Example - /// @code - /// #include - /// - /// tbm_surface_h surface; - /// tbm_surface_info_s info; - /// int ret; - /// - /// surface = tbm_surface_create (128, 128, TBM_FORMAT_RGB332); - /// ret = tbm_surface_map (surface, TBM_SURF_OPTION_WRITE|TBM_SURF_OPTION_READ, &info); - /// - /// ... - /// - /// tbm_surface_unmap (surface); - /// tbm_surface_destroy (surface); - /// @endcode - int tbm_surface_map( - tbm_surface_h surface, - int opt, - ffi.Pointer info, - ) { - return _tbm_surface_map( - surface, - opt, - info, - ); - } - - late final _tbm_surface_mapPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tbm_surface_h, ffi.Int, - ffi.Pointer)>>('tbm_surface_map'); - late final _tbm_surface_map = _tbm_surface_mapPtr.asFunction< - int Function(tbm_surface_h, int, ffi.Pointer)>(); - - /// @brief Unmaps the tbm_surface. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] surface The #tbm_surface_h - /// - /// @return #TBM_SURFACE_ERROR_NONE on success, - /// otherwise an error status value - /// - /// @retval #TBM_SURFACE_ERROR_NONE Success - /// @retval #TBM_SURFACE_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see tbm_surface_map() - /// - /// @par Example - /// @code - /// #include - /// - /// tbm_surface_h surface; - /// tbm_surface_info_s info; - /// int ret; - /// - /// surface = tbm_surface_create (128, 128, TBM_FORMAT_RGB332); - /// ret = tbm_surface_map (surface, TBM_SURF_OPTION_WRITE|TBM_SURF_OPTION_READ, &info); - /// - /// ... - /// - /// tbm_surface_unmap (surface); - /// tbm_surface_destroy (surface); - /// @endcode - int tbm_surface_unmap( - tbm_surface_h surface, - ) { - return _tbm_surface_unmap( - surface, - ); - } - - late final _tbm_surface_unmapPtr = - _lookup>( - 'tbm_surface_unmap'); - late final _tbm_surface_unmap = - _tbm_surface_unmapPtr.asFunction(); - - /// @brief Gets the information of the tbm_surface. - /// @details The information of tbm_surface is assigned in #tbm_surface_info_s struct. \n - /// The information of tbm_surface has width, height, format, bpp, size, number of planes and information of planes. \n - /// The information of planes has stride, offset, size and pointer of plane. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] surface The #tbm_surface_h - /// @param[out] info The information of the tbm_surface - /// - /// @return #TBM_SURFACE_ERROR_NONE on success, - /// otherwise an error status value - /// - /// @retval #TBM_SURFACE_ERROR_NONE Success - /// @retval #TBM_SURFACE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TBM_SURFACE_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see tbm_surface_map() - /// - /// @par Example - /// @code - /// #include - /// - /// tbm_surface_h surface; - /// tbm_surface_info_s info; - /// int ret; - /// - /// surface = tbm_surface_create (128, 128, TBM_FORMAT_RGB332); - /// ret = tbm_surface_get_info (surface, &info); - /// - /// ... - /// - /// tbm_surface_destroy (surface); - /// @endcode - int tbm_surface_get_info( - tbm_surface_h surface, - ffi.Pointer info, - ) { - return _tbm_surface_get_info( - surface, - info, - ); - } - - late final _tbm_surface_get_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tbm_surface_h, - ffi.Pointer)>>('tbm_surface_get_info'); - late final _tbm_surface_get_info = _tbm_surface_get_infoPtr.asFunction< - int Function(tbm_surface_h, ffi.Pointer)>(); - - /// @brief Gets the width of the tbm_surface. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] surface The #tbm_surface_h - /// - /// @return The width of the tbm_surface on success, - /// otherwise an error status value - /// - /// @retval #TBM_SURFACE_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @par Example - /// @code - /// #include - /// - /// tbm_surface_h surface; - /// int width; - /// - /// surface = tbm_surface_create (128, 128, TBM_FORMAT_RGB332); - /// - /// ... - /// - /// width = tbm_surface_get_width (surface); - /// - /// ... - /// - /// tbm_surface_destroy (surface); - /// @endcode - int tbm_surface_get_width( - tbm_surface_h surface, - ) { - return _tbm_surface_get_width( - surface, - ); - } - - late final _tbm_surface_get_widthPtr = - _lookup>( - 'tbm_surface_get_width'); - late final _tbm_surface_get_width = - _tbm_surface_get_widthPtr.asFunction(); - - /// @brief Gets the height of the tbm_surface. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] surface The #tbm_surface_h - /// - /// @return The height of the tbm_surface if this function succeeds, - /// otherwise an error status value - /// - /// @retval #TBM_SURFACE_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @par Example - /// @code - /// #include - /// - /// tbm_surface_h surface; - /// int height; - /// - /// surface = tbm_surface_create (128, 128, TBM_FORMAT_RGB332); - /// - /// ... - /// - /// height = tbm_surface_get_height (surface); - /// - /// ... - /// - /// tbm_surface_destroy (surface); - /// @endcode - int tbm_surface_get_height( - tbm_surface_h surface, - ) { - return _tbm_surface_get_height( - surface, - ); - } - - late final _tbm_surface_get_heightPtr = - _lookup>( - 'tbm_surface_get_height'); - late final _tbm_surface_get_height = - _tbm_surface_get_heightPtr.asFunction(); - - /// @brief Gets the format of the tbm_surface. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remark The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// - /// @param[in] surface The #tbm_surface_h - /// - /// @return The format of the tbm_surface on success, - /// otherwise @c 0 on failure - /// - /// @retval #tbm_format The format of surface - /// - /// @exception #TBM_SURFACE_ERROR_NONE Success - /// @exception #TBM_SURFACE_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @par Example - /// @code - /// #include - /// - /// tbm_surface_s surface; - /// tbm_format format; - /// - /// surface = tbm_surface_create (128, 128, TBM_FORMAT_RGB332); - /// - /// ... - /// - /// format = tbm_surface_get_format (surface); - /// - /// ... - /// - /// tbm_surface_destroy (surface); - /// @endcode - int tbm_surface_get_format( - tbm_surface_h surface, - ) { - return _tbm_surface_get_format( - surface, - ); - } - - late final _tbm_surface_get_formatPtr = - _lookup>( - 'tbm_surface_get_format'); - late final _tbm_surface_get_format = - _tbm_surface_get_formatPtr.asFunction(); - - /// @brief Creates a media packet handle and allocates buffer. - /// @details The buffer will be allocated to heap or tbm_surface. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The @a packet should be released using media_packet_destroy(). - /// @param[in] fmt The allocated #media_format_h by caller - /// @param[in] fcb The media_packet_finalize_cb() to register - /// @param[in] fcb_data The user data to be passed to the media_packet_finalize_cb() function - /// @param[out] packet A new handle for media packet - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre Must have media_format_h instance by media_format_create() - /// @post Must do media_format_unref() - /// - /// @see media_packet_destroy() - /// @see media_packet_finalize_cb() - /// @see media_format_unref() - /// @par Example - /// @code - /// #include - /// - /// { - /// media_format_h fmt; - /// media_packet_h packet; - /// - /// media_format_create(&fmt); - /// media_format_set_video_mime(fmt, MEDIA_FORMAT_H264_HP); - /// media_format_set_video_width(fmt, 640); - /// media_format_set_video_height(fmt, 480); - /// media_format_set_video_avg_bps(fmt, 10000000); - /// media_format_set_video_max_bps(fmt, 15000000); - /// - /// media_packet_create_alloc (fmt, _finalize_callback, fcb_data, &packet); - /// media_format_unref(fmt); - /// - /// ... - /// media_packet_destroy(packet); - /// } - /// - /// int _finalize_callback(media_packet_h packet, int err, void* userdata) - /// { - /// ... - /// return MEDIA_PACKET_FINALIZE; - /// } - /// - /// @endcode - int media_packet_create_alloc( - media_format_h fmt, - media_packet_finalize_cb fcb, - ffi.Pointer fcb_data, - ffi.Pointer packet, - ) { - return _media_packet_create_alloc( - fmt, - fcb, - fcb_data, - packet, - ); - } - - late final _media_packet_create_allocPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_format_h, - media_packet_finalize_cb, - ffi.Pointer, - ffi.Pointer)>>('media_packet_create_alloc'); - late final _media_packet_create_alloc = - _media_packet_create_allocPtr.asFunction< - int Function(media_format_h, media_packet_finalize_cb, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Creates a media packet handle. - /// @details It creates only media packet handle without allocated buffer. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @c packet must be released by using media_packet_destroy(). - /// @param[in] fmt The allocated #media_format_h by caller - /// @param[in] fcb The media_packet_finalize_cb() to register - /// @param[in] fcb_data The user data to be passed to the media_packet_finalize_cb() function - /// @param[out] packet A new handle for media packet - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre Must have media_format_h instance by media_format_create() - /// @post Must do media_format_unref() - /// - /// @see media_packet_destroy() - /// @see media_packet_finalize_cb() - /// @see media_format_unref() - /// @par Example - /// @code - /// #include - /// - /// { - /// media_format_h fmt; - /// media_packet_h packet; - /// - /// media_format_create(&fmt); - /// media_format_set_video_mime(fmt, MEDIA_FORMAT_H264_HP); - /// media_format_set_video_width(fmt, 640); - /// media_format_set_video_height(fmt, 480); - /// media_format_set_video_avg_bps(fmt, 10000000); - /// media_format_set_video_max_bps(fmt, 15000000); - /// - /// media_packet_create (fmt, _finalize_callback, fcb_data, &packet); - /// media_format_unref(fmt); - /// - /// ... - /// media_packet_destroy(packet); - /// } - /// - /// int _finalize_callback(media_packet_h packet, int err, void* userdata) - /// { - /// ... - /// return MEDIA_PACKET_FINALIZE; - /// } - /// - /// @endcode - int media_packet_create( - media_format_h fmt, - media_packet_finalize_cb fcb, - ffi.Pointer fcb_data, - ffi.Pointer packet, - ) { - return _media_packet_create( - fmt, - fcb, - fcb_data, - packet, - ); - } - - late final _media_packet_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_format_h, - media_packet_finalize_cb, - ffi.Pointer, - ffi.Pointer)>>('media_packet_create'); - late final _media_packet_create = _media_packet_createPtr.asFunction< - int Function(media_format_h, media_packet_finalize_cb, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Copies a media packet handle. - /// @details It re-creates only media packet handle with exist media packet handle. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @c new_packet must be released by using media_packet_destroy(). - /// @param[in] org_packet The existing media packet handle - /// @param[in] fcb The media_packet_finalize_cb() to register - /// @param[in] fcb_data The user data to be passed to the media_packet_finalize_cb() function - /// @param[out] new_packet A new handle for media packet - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see media_packet_destroy() - /// @see media_packet_finalize_cb() - int media_packet_copy( - media_packet_h org_packet, - media_packet_finalize_cb fcb, - ffi.Pointer fcb_data, - ffi.Pointer new_packet, - ) { - return _media_packet_copy( - org_packet, - fcb, - fcb_data, - new_packet, - ); - } - - late final _media_packet_copyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_packet_h, - media_packet_finalize_cb, - ffi.Pointer, - ffi.Pointer)>>('media_packet_copy'); - late final _media_packet_copy = _media_packet_copyPtr.asFunction< - int Function(media_packet_h, media_packet_finalize_cb, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Allocates buffer with media packet handle. - /// @details Before using media_packet_alloc(), media packet handle must be exist. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The existing media packet handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see media_packet_create() - /// @see media_packet_destroy() - int media_packet_alloc( - media_packet_h packet, - ) { - return _media_packet_alloc( - packet, - ); - } - - late final _media_packet_allocPtr = - _lookup>( - 'media_packet_alloc'); - late final _media_packet_alloc = - _media_packet_allocPtr.asFunction(); - - /// @brief Creates media packet handle and allocates buffer with #tbm_surface_h. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @c packet must be released by using media_packet_destroy(). - /// @param[in] fmt The allocated #media_format_h by caller - /// @param[in] surface The #tbm_surface_h by caller - /// @param[in] fcb The media_packet_finalize_cb() to register - /// @param[in] fcb_data The user data to be passed to the media_packet_finalize_cb() function - /// @param[out] packet A new handle for media packet - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre Must have media_format_h instance by media_format_create() - /// @post Must do media_format_unref() - /// - /// @see media_packet_destroy() - /// @see media_packet_finalize_cb() - /// @see media_format_unref() - /// @par Example - /// @code - /// #include - /// - /// { - /// media_format_h fmt; - /// media_packet_h packet; - /// - /// media_format_create(&fmt); - /// media_format_set_video_mime(fmt, MEDIA_FORMAT_H264_HP); - /// media_format_set_video_width(fmt, 640); - /// media_format_set_video_height(fmt, 480); - /// media_format_set_video_avg_bps(fmt, 10000000); - /// media_format_set_video_max_bps(fmt, 15000000); - /// - /// media_packet_create_from_tbm_surface (fmt, surface, _finalize_callback, fcb_data, &packet); - /// media_format_unref(fmt); - /// - /// ... - /// media_pacekt_destory(packet); - /// } - /// - /// int _finalize_callback(media_packet_h packet, int err, void* userdata) - /// { - /// ... - /// return MEDIA_PACKET_FINALIZE; - /// } - /// - /// @endcode - int media_packet_create_from_tbm_surface( - media_format_h fmt, - tbm_surface_h surface, - media_packet_finalize_cb fcb, - ffi.Pointer fcb_data, - ffi.Pointer packet, - ) { - return _media_packet_create_from_tbm_surface( - fmt, - surface, - fcb, - fcb_data, - packet, - ); - } - - late final _media_packet_create_from_tbm_surfacePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_format_h, - tbm_surface_h, - media_packet_finalize_cb, - ffi.Pointer, - ffi.Pointer)>>( - 'media_packet_create_from_tbm_surface'); - late final _media_packet_create_from_tbm_surface = - _media_packet_create_from_tbm_surfacePtr.asFunction< - int Function(media_format_h, tbm_surface_h, media_packet_finalize_cb, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Creates media packet handle with already allocated external buffer. - /// @details It does not support video's #MEDIA_FORMAT_RAW type. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks The @c packet must be released by using media_packet_destroy(). - /// @param[in] fmt The allocated #media_format_h by caller - /// @param[in] mem_ptr The memory pointer which is created by external module - /// @param[in] size The buffer size value to set - /// @param[in] fcb The media_packet_finalize_cb() to register - /// @param[in] fcb_data The user data to be passed to the media_packet_finalize_cb() function - /// @param[out] packet A new handle for media packet - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre Must have media_format_h instance by media_format_create() - /// @post Must do media_format_unref() - /// - /// @see media_packet_destroy() - /// @see media_packet_finalize_cb() - /// @see media_format_unref() - /// @par Example - /// @code - /// #include - /// - /// { - /// media_format_h fmt; - /// media_packet_h packet; - /// - /// media_format_create(&fmt); - /// media_format_set_video_mime(fmt, MEDIA_FORMAT_H264_HP); - /// media_format_set_video_width(fmt, 640); - /// media_format_set_video_height(fmt, 480); - /// media_format_set_video_avg_bps(fmt, 10000000); - /// media_format_set_video_max_bps(fmt, 15000000); - /// - /// media_packet_create_from_external_memory (fmt, mem_ptr, size, _finalize_callback, fcb_data, &packet); - /// media_format_unref(fmt); - /// - /// ... - /// media_packet_destroy(packet); - /// } - /// - /// int _finalize_callback(media_packet_h packet, int err, void* userdata) - /// { - /// ... - /// return MEDIA_PACKET_FINALIZE; - /// } - /// - /// @endcode - int media_packet_create_from_external_memory( - media_format_h fmt, - ffi.Pointer mem_ptr, - int size, - media_packet_finalize_cb fcb, - ffi.Pointer fcb_data, - ffi.Pointer packet, - ) { - return _media_packet_create_from_external_memory( - fmt, - mem_ptr, - size, - fcb, - fcb_data, - packet, - ); - } - - late final _media_packet_create_from_external_memoryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_format_h, - ffi.Pointer, - ffi.Uint64, - media_packet_finalize_cb, - ffi.Pointer, - ffi.Pointer)>>( - 'media_packet_create_from_external_memory'); - late final _media_packet_create_from_external_memory = - _media_packet_create_from_external_memoryPtr.asFunction< - int Function( - media_format_h, - ffi.Pointer, - int, - media_packet_finalize_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets #media_format_h of media packet - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] fmt The media format of media packet - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_format_unref() - /// @par Example - /// @code - /// #include - /// - /// { - /// media_format_h* fmt; - /// - /// media_packet_get_format (pakcet, &fmt); - /// .. - /// - /// media_format_unref(fmt); - /// ... - /// } - /// - /// @endcode - int media_packet_get_format( - media_packet_h packet, - ffi.Pointer fmt, - ) { - return _media_packet_get_format( - packet, - fmt, - ); - } - - late final _media_packet_get_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_get_format'); - late final _media_packet_get_format = _media_packet_get_formatPtr - .asFunction)>(); - - /// @brief Sets #media_format_h of media packet - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[in] fmt The #media_format_h to set - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see media_format_unref() - /// @par Example - /// @code - /// #include - /// - /// { - /// media_format_h fmt; - /// - /// media_packet_set_format (pakcet, fmt); - /// .. - /// - /// media_format_unref(fmt); - /// ... - /// } - /// - /// @endcode - int media_packet_set_format( - media_packet_h packet, - media_format_h fmt, - ) { - return _media_packet_set_format( - packet, - fmt, - ); - } - - late final _media_packet_set_formatPtr = _lookup< - ffi.NativeFunction>( - 'media_packet_set_format'); - late final _media_packet_set_format = _media_packet_set_formatPtr - .asFunction(); - - /// @brief Sets PTS of media packet. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[in] pts The PTS value to set - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_set_pts( - media_packet_h packet, - int pts, - ) { - return _media_packet_set_pts( - packet, - pts, - ); - } - - late final _media_packet_set_ptsPtr = - _lookup>( - 'media_packet_set_pts'); - late final _media_packet_set_pts = - _media_packet_set_ptsPtr.asFunction(); - - /// @brief Sets DTS of media packet handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[in] dts The DTS value to set - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_set_dts( - media_packet_h packet, - int dts, - ) { - return _media_packet_set_dts( - packet, - dts, - ); - } - - late final _media_packet_set_dtsPtr = - _lookup>( - 'media_packet_set_dts'); - late final _media_packet_set_dts = - _media_packet_set_dtsPtr.asFunction(); - - /// @brief Sets PTS of media packet. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[in] duration The duration value to set - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_set_duration( - media_packet_h packet, - int duration, - ) { - return _media_packet_set_duration( - packet, - duration, - ); - } - - late final _media_packet_set_durationPtr = - _lookup>( - 'media_packet_set_duration'); - late final _media_packet_set_duration = _media_packet_set_durationPtr - .asFunction(); - - /// @brief Sets buffer size of media packet. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] size The buffer size value to set - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_set_buffer_size( - media_packet_h packet, - int size, - ) { - return _media_packet_set_buffer_size( - packet, - size, - ); - } - - late final _media_packet_set_buffer_sizePtr = - _lookup>( - 'media_packet_set_buffer_size'); - late final _media_packet_set_buffer_size = _media_packet_set_buffer_sizePtr - .asFunction(); - - /// @brief Gets PTS of media packet. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] pts The PTS value to get - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - int media_packet_get_pts( - media_packet_h packet, - ffi.Pointer pts, - ) { - return _media_packet_get_pts( - packet, - pts, - ); - } - - late final _media_packet_get_ptsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_get_pts'); - late final _media_packet_get_pts = _media_packet_get_ptsPtr - .asFunction)>(); - - /// @brief Gets DTS of media packet - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] dts The DTS value to get - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_get_dts( - media_packet_h packet, - ffi.Pointer dts, - ) { - return _media_packet_get_dts( - packet, - dts, - ); - } - - late final _media_packet_get_dtsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_get_dts'); - late final _media_packet_get_dts = _media_packet_get_dtsPtr - .asFunction)>(); - - /// @brief Gets duration of media packet. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] duration The duration value to get - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_get_duration( - media_packet_h packet, - ffi.Pointer duration, - ) { - return _media_packet_get_duration( - packet, - duration, - ); - } - - late final _media_packet_get_durationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_get_duration'); - late final _media_packet_get_duration = _media_packet_get_durationPtr - .asFunction)>(); - - /// @brief Gets buffer size of media packet. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] size The buffer size value to get - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_get_buffer_size( - media_packet_h packet, - ffi.Pointer size, - ) { - return _media_packet_get_buffer_size( - packet, - size, - ); - } - - late final _media_packet_get_buffer_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_get_buffer_size'); - late final _media_packet_get_buffer_size = _media_packet_get_buffer_sizePtr - .asFunction)>(); - - /// @brief Gets buffer data pointer of media packet. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] data The allocated buffer data pointer - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_get_buffer_data_ptr( - media_packet_h packet, - ffi.Pointer> data, - ) { - return _media_packet_get_buffer_data_ptr( - packet, - data, - ); - } - - late final _media_packet_get_buffer_data_ptrPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_packet_h, ffi.Pointer>)>>( - 'media_packet_get_buffer_data_ptr'); - late final _media_packet_get_buffer_data_ptr = - _media_packet_get_buffer_data_ptrPtr.asFunction< - int Function(media_packet_h, ffi.Pointer>)>(); - - /// @brief Gets TBM surface data of media packet. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] surface The tbm_surface data pointer - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_get_tbm_surface( - media_packet_h packet, - ffi.Pointer surface, - ) { - return _media_packet_get_tbm_surface( - packet, - surface, - ); - } - - late final _media_packet_get_tbm_surfacePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_get_tbm_surface'); - late final _media_packet_get_tbm_surface = _media_packet_get_tbm_surfacePtr - .asFunction)>(); - - /// @brief Sets extra data of media packet. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[in] extra The extra data to set - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_set_extra( - media_packet_h packet, - ffi.Pointer extra, - ) { - return _media_packet_set_extra( - packet, - extra, - ); - } - - late final _media_packet_set_extraPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_set_extra'); - late final _media_packet_set_extra = _media_packet_set_extraPtr - .asFunction)>(); - - /// @brief Gets extra data of media packet. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] extra The extra data to get - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_get_extra( - media_packet_h packet, - ffi.Pointer> extra, - ) { - return _media_packet_get_extra( - packet, - extra, - ); - } - - late final _media_packet_get_extraPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer>)>>('media_packet_get_extra'); - late final _media_packet_get_extra = _media_packet_get_extraPtr.asFunction< - int Function(media_packet_h, ffi.Pointer>)>(); - - /// @brief Checks whether the given media packet is for video. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] is_video @c true if the given media packet is for video, - /// otherwise @c false if the given media packet is not for video - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see media_format_mimetype_e - /// @see media_format_type_e - int media_packet_is_video( - media_packet_h packet, - ffi.Pointer is_video, - ) { - return _media_packet_is_video( - packet, - is_video, - ); - } - - late final _media_packet_is_videoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_packet_h, ffi.Pointer)>>('media_packet_is_video'); - late final _media_packet_is_video = _media_packet_is_videoPtr - .asFunction)>(); - - /// @brief Checks whether the given media packet is for audio. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] is_audio @c true if the given media packet is for audio, - /// otherwise @c false if the given media packet is not for audio - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_mimetype_e - /// @see media_format_type_e - int media_packet_is_audio( - media_packet_h packet, - ffi.Pointer is_audio, - ) { - return _media_packet_is_audio( - packet, - is_audio, - ); - } - - late final _media_packet_is_audioPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_packet_h, ffi.Pointer)>>('media_packet_is_audio'); - late final _media_packet_is_audio = _media_packet_is_audioPtr - .asFunction)>(); - - /// @brief Checks whether the given media packet is for text. - /// @since_tizen 3.0 - /// - /// @param[in] packet The media packet handle - /// @param[out] is_text @c true if the given media packet is for text, - /// otherwise @c false if the given media packet is not for text - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// @see media_format_mimetype_e - /// @see media_format_type_e - int media_packet_is_text( - media_packet_h packet, - ffi.Pointer is_text, - ) { - return _media_packet_is_text( - packet, - is_text, - ); - } - - late final _media_packet_is_textPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_packet_h, ffi.Pointer)>>('media_packet_is_text'); - late final _media_packet_is_text = _media_packet_is_textPtr - .asFunction)>(); - - /// @brief Checks whether the given media packet is encoded type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] is_encoded @c true if the given media packet is encoded, - /// otherwise @c false if the given media packet is not encoded - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see media_format_mimetype_e - /// @see media_format_data_type_e - int media_packet_is_encoded( - media_packet_h packet, - ffi.Pointer is_encoded, - ) { - return _media_packet_is_encoded( - packet, - is_encoded, - ); - } - - late final _media_packet_is_encodedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_is_encoded'); - late final _media_packet_is_encoded = _media_packet_is_encodedPtr - .asFunction)>(); - - /// @brief Checks whether the given media packet is raw type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] is_raw @c true if the given media packet is for raw video, - /// otherwise @c false if the given media packet is not for raw video - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see media_format_mimetype_e - /// @see media_format_data_type_e - int media_packet_is_raw( - media_packet_h packet, - ffi.Pointer is_raw, - ) { - return _media_packet_is_raw( - packet, - is_raw, - ); - } - - late final _media_packet_is_rawPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_packet_h, ffi.Pointer)>>('media_packet_is_raw'); - late final _media_packet_is_raw = _media_packet_is_rawPtr - .asFunction)>(); - - /// @brief Gets #media_buffer_flags_e of media packet. - /// @since_tizen 3.0 - /// - /// @param[in] packet The media packet handle - /// @param[out] flags The media_buffer_flags_e of media packet to get - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see media_buffer_flags_e - /// @see media_packet_unset_flags() - int media_packet_get_flags( - media_packet_h packet, - ffi.Pointer flags, - ) { - return _media_packet_get_flags( - packet, - flags, - ); - } - - late final _media_packet_get_flagsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_get_flags'); - late final _media_packet_get_flags = _media_packet_get_flagsPtr - .asFunction)>(); - - /// @brief Sets #media_buffer_flags_e of media packet. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[in] flags The media_buffer_flags_e of media packet to set - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see media_buffer_flags_e - /// @see media_packet_unset_flags() - int media_packet_set_flags( - media_packet_h packet, - int flags, - ) { - return _media_packet_set_flags( - packet, - flags, - ); - } - - late final _media_packet_set_flagsPtr = - _lookup>( - 'media_packet_set_flags'); - late final _media_packet_set_flags = _media_packet_set_flagsPtr - .asFunction(); - - /// @brief Unsets media_buffer_flags_e of media packet. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[in] flags The #media_buffer_flags_e of media packet to unset - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see media_buffer_flags_e - /// @see media_packet_set_flags() - int media_packet_unset_flags( - media_packet_h packet, - int flags, - ) { - return _media_packet_unset_flags( - packet, - flags, - ); - } - - late final _media_packet_unset_flagsPtr = - _lookup>( - 'media_packet_unset_flags'); - late final _media_packet_unset_flags = _media_packet_unset_flagsPtr - .asFunction(); - - /// @brief Checks whether the given media packet is codec data. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] is_codec_config @c true if the given media packet is for codec data, - /// otherwise @c false if the given media packet is not for codec data - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see media_format_mimetype_e - /// @see media_format_data_type_e - int media_packet_is_codec_config( - media_packet_h packet, - ffi.Pointer is_codec_config, - ) { - return _media_packet_is_codec_config( - packet, - is_codec_config, - ); - } - - late final _media_packet_is_codec_configPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_is_codec_config'); - late final _media_packet_is_codec_config = _media_packet_is_codec_configPtr - .asFunction)>(); - - /// @brief Checks whether the given media packet is eos. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] is_eos @c true if the given media packet is for eos, - /// otherwise @c false if the given media packet is not for eos - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see media_format_mimetype_e - /// @see media_format_data_type_e - int media_packet_is_end_of_stream( - media_packet_h packet, - ffi.Pointer is_eos, - ) { - return _media_packet_is_end_of_stream( - packet, - is_eos, - ); - } - - late final _media_packet_is_end_of_streamPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_is_end_of_stream'); - late final _media_packet_is_end_of_stream = _media_packet_is_end_of_streamPtr - .asFunction)>(); - - /// @brief Checks whether the given media packet is sync frame. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] is_sync @c true if the given media packet is for sync frame, - /// otherwise @c false if the given media packet is not for sync frame - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see media_format_mimetype_e - /// @see media_format_data_type_e - int media_packet_is_sync_frame( - media_packet_h packet, - ffi.Pointer is_sync, - ) { - return _media_packet_is_sync_frame( - packet, - is_sync, - ); - } - - late final _media_packet_is_sync_framePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_is_sync_frame'); - late final _media_packet_is_sync_frame = _media_packet_is_sync_framePtr - .asFunction)>(); - - /// @brief Checks whether the allocated buffer is tbm surface or not. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] has_tbm_surface @c true if the given media packet's allocated buffer is tbm surface, - /// otherwise @c false if the given media packet's allocated buffer is not tbm surface - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_has_tbm_surface_buffer( - media_packet_h packet, - ffi.Pointer has_tbm_surface, - ) { - return _media_packet_has_tbm_surface_buffer( - packet, - has_tbm_surface, - ); - } - - late final _media_packet_has_tbm_surface_bufferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_has_tbm_surface_buffer'); - late final _media_packet_has_tbm_surface_buffer = - _media_packet_has_tbm_surface_bufferPtr - .asFunction)>(); - - /// @brief Gets the number of planes from tbm surface in the given media packet. - /// @details Use only if the media_format_h is #MEDIA_FORMAT_RAW and #MEDIA_FORMAT_VIDEO. - /// It means that media_packet_h's buffer is allocated on tbm_surface. - /// If not sure of that, use media_packet_is_video() and media_packet_is_raw() or media_packet_has_tbm_surface_buffer(). - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] packet The media packet handle - /// @param[out] num The number of planes from tbm_surface - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_get_number_of_video_planes( - media_packet_h packet, - ffi.Pointer num, - ) { - return _media_packet_get_number_of_video_planes( - packet, - num, - ); - } - - late final _media_packet_get_number_of_video_planesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, ffi.Pointer)>>( - 'media_packet_get_number_of_video_planes'); - late final _media_packet_get_number_of_video_planes = - _media_packet_get_number_of_video_planesPtr - .asFunction)>(); - - /// @brief Gets stride width from tbm surface in the given media packet. - /// @details Use only if the media_format_h is #MEDIA_FORMAT_RAW and #MEDIA_FORMAT_VIDEO. - /// It means that media_packet_h's buffer is allocated on tbm_surface. - /// If not sure of that, use media_packet_is_video() and media_packet_is_raw() or media_packet_has_tbm_surface_buffer(). - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] packet The media packet handle - /// @param[in] plane_idx The plane index value - /// @param[out] stride_width the stride value from tbm_surface - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_get_video_stride_width( - media_packet_h packet, - int plane_idx, - ffi.Pointer stride_width, - ) { - return _media_packet_get_video_stride_width( - packet, - plane_idx, - stride_width, - ); - } - - late final _media_packet_get_video_stride_widthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, ffi.Int, - ffi.Pointer)>>('media_packet_get_video_stride_width'); - late final _media_packet_get_video_stride_width = - _media_packet_get_video_stride_widthPtr.asFunction< - int Function(media_packet_h, int, ffi.Pointer)>(); - - /// @brief Gets stride height from tbm surface in the given media packet. - /// @details Use only if the media_format_h is #MEDIA_FORMAT_RAW and #MEDIA_FORMAT_VIDEO. - /// It means that media_packet_h's buffer is allocated on tbm_surface. - /// If not sure of that, use media_packet_is_video() and media_packet_is_raw() or media_packet_has_tbm_surface_buffer(). - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] packet The media packet handle - /// @param[in] plane_idx The plane index value - /// @param[out] stride_height The stride height value from tbm_surface - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_get_video_stride_height( - media_packet_h packet, - int plane_idx, - ffi.Pointer stride_height, - ) { - return _media_packet_get_video_stride_height( - packet, - plane_idx, - stride_height, - ); - } - - late final _media_packet_get_video_stride_heightPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, ffi.Int, - ffi.Pointer)>>('media_packet_get_video_stride_height'); - late final _media_packet_get_video_stride_height = - _media_packet_get_video_stride_heightPtr.asFunction< - int Function(media_packet_h, int, ffi.Pointer)>(); - - /// @brief Gets plane data pointer from tbm surface in the given media packet. - /// @details Use only if the media_format_h is #MEDIA_FORMAT_RAW and #MEDIA_FORMAT_VIDEO. - /// It means that media_packet_h's buffer is allocated on tbm_surface. - /// If not sure of that, use media_packet_is_video() and media_packet_is_raw() or media_packet_has_tbm_surface_buffer(). - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks The @c plane_data_ptr must not be released by using free(). Note that It is released by media_packet_destory() or tbm_surface_destroy(). - /// @param[in] packet The media packet handle - /// @param[in] plane_idx The plane index value - /// @param[out] plane_data_ptr The plane data pointer from tbm_surface - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_get_video_plane_data_ptr( - media_packet_h packet, - int plane_idx, - ffi.Pointer> plane_data_ptr, - ) { - return _media_packet_get_video_plane_data_ptr( - packet, - plane_idx, - plane_data_ptr, - ); - } - - late final _media_packet_get_video_plane_data_ptrPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, ffi.Int, - ffi.Pointer>)>>( - 'media_packet_get_video_plane_data_ptr'); - late final _media_packet_get_video_plane_data_ptr = - _media_packet_get_video_plane_data_ptrPtr.asFunction< - int Function( - media_packet_h, int, ffi.Pointer>)>(); - - /// @brief Gets codec data and the codec data size of media packet. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks The @a codec_data should be released using free(). - /// @param[in] packet The media packet handle - /// @param[out] codec_data The codec data to get - /// @param[out] codec_data_size The codec data size to get - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_get_codec_data( - media_packet_h packet, - ffi.Pointer> codec_data, - ffi.Pointer codec_data_size, - ) { - return _media_packet_get_codec_data( - packet, - codec_data, - codec_data_size, - ); - } - - late final _media_packet_get_codec_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, ffi.Pointer>, - ffi.Pointer)>>('media_packet_get_codec_data'); - late final _media_packet_get_codec_data = - _media_packet_get_codec_dataPtr.asFunction< - int Function(media_packet_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Destroys the media packet handle. - /// @details The registered finalize_callback() function will be invoked to destroy the media packet handle. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] packet The handle to media packet to be destroyed - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see media_packet_create_alloc() - /// @see media_packet_create() - /// @see media_packet_copy() - /// @see media_packet_create_from_tbm_surface() - /// @see media_packet_create_from_external_memory() - int media_packet_destroy( - media_packet_h packet, - ) { - return _media_packet_destroy( - packet, - ); - } - - late final _media_packet_destroyPtr = - _lookup>( - 'media_packet_destroy'); - late final _media_packet_destroy = - _media_packet_destroyPtr.asFunction(); - - /// @brief Sets the rotation method. - /// @since_tizen 5.0 - /// - /// @param[in] packet The media packet handle - /// @param[in] method The rotation method - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_set_rotate_method( - media_packet_h packet, - int method, - ) { - return _media_packet_set_rotate_method( - packet, - method, - ); - } - - late final _media_packet_set_rotate_methodPtr = - _lookup>( - 'media_packet_set_rotate_method'); - late final _media_packet_set_rotate_method = - _media_packet_set_rotate_methodPtr - .asFunction(); - - /// @brief Gets the rotation method. - /// @since_tizen 5.0 - /// - /// @param[in] packet The media packet handle - /// @param[out] method The rotation method - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION Invalid operation - int media_packet_get_rotate_method( - media_packet_h packet, - ffi.Pointer method, - ) { - return _media_packet_get_rotate_method( - packet, - method, - ); - } - - late final _media_packet_get_rotate_methodPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_h, - ffi.Pointer)>>('media_packet_get_rotate_method'); - late final _media_packet_get_rotate_method = - _media_packet_get_rotate_methodPtr - .asFunction)>(); - - /// @brief Creates a new camera handle for controlling a camera. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks Multiple handles on a context at the same time are allowed to be created. However, - /// camera cannot guarantee proper operation because of limited resources, such as - /// camera device, audio device, and display device.\n. - /// A @a camera must be released using camera_destroy(). - /// @remarks The privilege %http://tizen.org/privilege/camera is not required since 4.0,\n - /// but it is required in all earlier versions. - /// @param[in] device The hardware camera to access - /// @param[out] camera A newly returned handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @post If it succeeds, the camera state will be #CAMERA_STATE_CREATED. - /// - /// @see camera_destroy() - int camera_create( - int device, - ffi.Pointer camera, - ) { - return _camera_create( - device, - camera, - ); - } - - late final _camera_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer)>>('camera_create'); - late final _camera_create = - _camera_createPtr.asFunction)>(); - - /// @brief Changes the camera device. - /// - /// @since_tizen 3.0 - /// @remarks This function can be used to change camera device simply without camera_destroy() and camera_create().\n - /// If display reuse hint is set by camera_set_display_reuse_hint() before stopping the preview,\n - /// display handle will be reused and last frame on display can be kept even though camera device is changed. - /// @param[in] camera The handle to the camera - /// @param[in] device The hardware camera to access - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED. - /// @post If it succeeds, the camera attributes and settings will be reset. - /// - /// @see camera_set_display_reuse_hint() - /// @see camera_get_display_reuse_hint() - int camera_change_device( - camera_h camera, - int device, - ) { - return _camera_change_device( - camera, - device, - ); - } - - late final _camera_change_devicePtr = - _lookup>( - 'camera_change_device'); - late final _camera_change_device = - _camera_change_devicePtr.asFunction(); - - /// @brief Destroys the camera handle and releases all its resources. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @see camera_create() - int camera_destroy( - camera_h camera, - ) { - return _camera_destroy( - camera, - ); - } - - late final _camera_destroyPtr = - _lookup>('camera_destroy'); - late final _camera_destroy = - _camera_destroyPtr.asFunction(); - - /// @brief Starts capturing and drawing preview frames on the screen. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/camera - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_RESOURCE_CONFLICT Resource conflict error - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_DEVICE_BUSY The device is being used in another application or is performing other operations - /// @retval #CAMERA_ERROR_DEVICE_NOT_FOUND No camera device - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_CAPTURED.\n - /// You must set the display handle. \n - /// If needed, modify preview FPS(camera_attr_set_preview_fps()), - /// preview resolution(camera_set_preview_resolution()), or preview format(camera_set_preview_format()). - /// @post If it succeeds, the camera state will be #CAMERA_STATE_PREVIEW.\n - /// camera_preview_cb() will be called when preview image data becomes available. - /// - /// @see camera_stop_preview() - /// @see camera_set_display() - /// @see camera_set_preview_cb() - /// @see camera_set_media_packet_preview_cb() - /// @see camera_foreach_supported_preview_resolution() - /// @see camera_set_preview_resolution() - /// @see camera_get_preview_resolution() - /// @see camera_foreach_supported_preview_format() - /// @see camera_set_preview_format() - /// @see camera_get_preview_format() - /// @see camera_attr_foreach_supported_fps() - /// @see camera_attr_set_preview_fps() - /// @see camera_attr_get_preview_fps() - int camera_start_preview( - camera_h camera, - ) { - return _camera_start_preview( - camera, - ); - } - - late final _camera_start_previewPtr = - _lookup>( - 'camera_start_preview'); - late final _camera_start_preview = - _camera_start_previewPtr.asFunction(); - - /// @brief Stops capturing and drawing preview frames. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/camera - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_PREVIEW. - /// @post The camera state will be #CAMERA_STATE_CREATED. - /// @see camera_start_preview() - /// @see camera_unset_preview_cb() - /// @see camera_unset_media_packet_preview_cb() - int camera_stop_preview( - camera_h camera, - ) { - return _camera_stop_preview( - camera, - ); - } - - late final _camera_stop_previewPtr = - _lookup>( - 'camera_stop_preview'); - late final _camera_stop_preview = - _camera_stop_previewPtr.asFunction(); - - /// @brief Starts capturing of still images. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/camera - /// @remarks This function causes the transition of the camera state from #CAMERA_STATE_CAPTURING to #CAMERA_STATE_CAPTURED automatically\n - /// and the corresponding callback function camera_capturing_cb() and camera_capture_completed_cb() will be invoked\n - /// The captured image will be delivered through camera_capturing_cb().\n - /// camera_capture_completed_cb() callback notifies about completion of camera_capturing_cb(). \n - /// The camera's preview should be restarted by calling camera_start_preview(). - /// @param[in] camera The handle to the camera - /// @param[in] capturing_cb The callback for capturing data - /// @param[in] completed_cb The callback for notification of completion - /// @param[in] user_data The user data - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_PREVIEW. \n - /// If needed, modify capture resolution(camera_set_capture_resolution()), - /// capture format(camera_set_capture_format()), or image quality(camera_attr_set_image_quality()). - /// @post If it succeeds the camera state will be #CAMERA_STATE_CAPTURED. - /// - /// @see camera_start_preview() - /// @see camera_start_continuous_capture(); - /// @see camera_foreach_supported_capture_resolution() - /// @see camera_set_capture_resolution() - /// @see camera_get_capture_resolution() - /// @see camera_foreach_supported_capture_format() - /// @see camera_set_capture_format() - /// @see camera_get_capture_format() - /// @see camera_attr_set_image_quality() - /// @see camera_attr_get_image_quality() - int camera_start_capture( - camera_h camera, - camera_capturing_cb capturing_cb, - camera_capture_completed_cb completed_cb, - ffi.Pointer user_data, - ) { - return _camera_start_capture( - camera, - capturing_cb, - completed_cb, - user_data, - ); - } - - late final _camera_start_capturePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - camera_h, - camera_capturing_cb, - camera_capture_completed_cb, - ffi.Pointer)>>('camera_start_capture'); - late final _camera_start_capture = _camera_start_capturePtr.asFunction< - int Function(camera_h, camera_capturing_cb, camera_capture_completed_cb, - ffi.Pointer)>(); - - /// @brief Starts continuously capturing still images. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/camera - /// @remarks If this is not supported zero shutter lag occurs. The capture resolution could be changed to the preview resolution.\n - /// This function causes the transition of the camera state from #CAMERA_STATE_CAPTURING to #CAMERA_STATE_CAPTURED automatically\n - /// and the corresponding callback function camera_capturing_cb() and camera_capture_completed_cb() will be invoked\n - /// Each Captured image will be delivered through camera_capturing_cb().\n - /// The camera_capture_completed_cb() callback notifies about the completion of an entire capture.\n - /// The camera's preview should be restarted by calling camera_start_preview().\n. - /// @param[in] camera The handle to the camera - /// @param[in] count The number of still images - /// @param[in] interval The interval of the capture (millisecond) - /// @param[in] capturing_cb The callback for capturing data - /// @param[in] completed_cb The callback for notification of completion - /// @param[in] user_data The user data - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post If it succeeds the camera state will be #CAMERA_STATE_CAPTURED. - /// - /// @see camera_start_preview() - /// @see camera_start_capture(); - /// @see camera_stop_continuous_capture() - /// @see camera_is_supported_zero_shutter_lag() - int camera_start_continuous_capture( - camera_h camera, - int count, - int interval, - camera_capturing_cb capturing_cb, - camera_capture_completed_cb completed_cb, - ffi.Pointer user_data, - ) { - return _camera_start_continuous_capture( - camera, - count, - interval, - capturing_cb, - completed_cb, - user_data, - ); - } - - late final _camera_start_continuous_capturePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - camera_h, - ffi.Int, - ffi.Int, - camera_capturing_cb, - camera_capture_completed_cb, - ffi.Pointer)>>('camera_start_continuous_capture'); - late final _camera_start_continuous_capture = - _camera_start_continuous_capturePtr.asFunction< - int Function(camera_h, int, int, camera_capturing_cb, - camera_capture_completed_cb, ffi.Pointer)>(); - - /// @brief Aborts continuous capturing. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/camera - /// @remarks The camera state will be changed to #CAMERA_STATE_CAPTURED. - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_PREVIEW. - /// - /// @see camera_start_continuous_capture() - int camera_stop_continuous_capture( - camera_h camera, - ) { - return _camera_stop_continuous_capture( - camera, - ); - } - - late final _camera_stop_continuous_capturePtr = - _lookup>( - 'camera_stop_continuous_capture'); - late final _camera_stop_continuous_capture = - _camera_stop_continuous_capturePtr.asFunction(); - - /// @brief Gets the state of the camera. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] state The current state of the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_create() - /// @see camera_start_preview() - /// @see camera_stop_preview() - /// @see camera_start_capture() - int camera_get_state( - camera_h camera, - ffi.Pointer state, - ) { - return _camera_get_state( - camera, - state, - ); - } - - late final _camera_get_statePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_get_state'); - late final _camera_get_state = _camera_get_statePtr - .asFunction)>(); - - /// @brief Starts camera auto-focusing, asynchronously. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/camera - /// @remarks If continuous status is @c true, the camera continuously tries to focus. - /// @param[in] camera The handle to the camera - /// @param[in] continuous The status of continuous focusing - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_PREVIEW. - /// @post The camera focus state will be #CAMERA_FOCUS_STATE_ONGOING. - /// - /// @see camera_cancel_focusing() - /// @see camera_set_focus_changed_cb() - /// @see camera_focus_changed_cb() - /// @see camera_attr_set_af_mode() - int camera_start_focusing( - camera_h camera, - bool continuous, - ) { - return _camera_start_focusing( - camera, - continuous, - ); - } - - late final _camera_start_focusingPtr = - _lookup>( - 'camera_start_focusing'); - late final _camera_start_focusing = - _camera_start_focusingPtr.asFunction(); - - /// @brief Stops camera auto focusing. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/camera - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_PREVIEW. - /// - /// @see camera_start_focusing() - /// @see camera_focus_changed_cb() - int camera_cancel_focusing( - camera_h camera, - ) { - return _camera_cancel_focusing( - camera, - ); - } - - late final _camera_cancel_focusingPtr = - _lookup>( - 'camera_cancel_focusing'); - late final _camera_cancel_focusing = - _camera_cancel_focusingPtr.asFunction(); - - /// @brief Sets the display handle to show preview images. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This function must be called before previewing (see camera_start_preview()). - /// In Custom ROI display mode, camera_attr_set_display_roi_area() function must be called before calling this function. - /// @remarks This function must be called in main thread of the application. - /// Otherwise, it will return #CAMERA_ERROR_INVALID_OPERATION by internal restriction. - /// To avoid #CAMERA_ERROR_INVALID_OPERATION in sub thread, ecore_thread_main_loop_begin() and - /// ecore_thread_main_loop_end() can be used, but deadlock can occur if the main thread is busy. - /// So, it's not recommended to use them. (Since 5.0) - /// @param[in] camera The handle to the camera - /// @param[in] type The display type - /// @param[in] display The display handle from #GET_DISPLAY - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED. - /// - /// @see camera_start_preview() - /// @see #GET_DISPLAY - /// @see ecore_thread_main_loop_begin() - /// @see ecore_thread_main_loop_end() - int camera_set_display( - camera_h camera, - int type, - camera_display_h display, - ) { - return _camera_set_display( - camera, - type, - display, - ); - } - - late final _camera_set_displayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - camera_h, ffi.Int32, camera_display_h)>>('camera_set_display'); - late final _camera_set_display = _camera_set_displayPtr - .asFunction(); - - /// @brief Sets the resolution of the preview. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This function should be called before previewing (camera_start_preview()). - /// @param[in] camera The handle to the camera - /// @param[in] width The preview width - /// @param[in] height The preview height - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// - /// @see camera_start_preview() - /// @see camera_get_preview_resolution() - /// @see camera_foreach_supported_preview_resolution() - int camera_set_preview_resolution( - camera_h camera, - int width, - int height, - ) { - return _camera_set_preview_resolution( - camera, - width, - height, - ); - } - - late final _camera_set_preview_resolutionPtr = - _lookup>( - 'camera_set_preview_resolution'); - late final _camera_set_preview_resolution = _camera_set_preview_resolutionPtr - .asFunction(); - - /// @brief Gets the resolution of the preview. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] width The preview width - /// @param[out] height The preview height - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_preview_resolution() - /// @see camera_foreach_supported_preview_resolution() - int camera_get_preview_resolution( - camera_h camera, - ffi.Pointer width, - ffi.Pointer height, - ) { - return _camera_get_preview_resolution( - camera, - width, - height, - ); - } - - late final _camera_get_preview_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Pointer, - ffi.Pointer)>>('camera_get_preview_resolution'); - late final _camera_get_preview_resolution = - _camera_get_preview_resolutionPtr.asFunction< - int Function(camera_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the recommended preview resolution. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks Depending on the capture resolution aspect ratio and display resolution, the recommended preview resolution is determined. - /// @param[in] camera The handle to the camera - /// @param[out] width The preview width - /// @param[out] height The preview height - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_preview_resolution() - /// @see camera_foreach_supported_preview_resolution() - int camera_get_recommended_preview_resolution( - camera_h camera, - ffi.Pointer width, - ffi.Pointer height, - ) { - return _camera_get_recommended_preview_resolution( - camera, - width, - height, - ); - } - - late final _camera_get_recommended_preview_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - camera_h, ffi.Pointer, ffi.Pointer)>>( - 'camera_get_recommended_preview_resolution'); - late final _camera_get_recommended_preview_resolution = - _camera_get_recommended_preview_resolutionPtr.asFunction< - int Function(camera_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Starts face detection. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/camera - /// @remarks This should be called after the preview is started.\n - /// This callback will be invoked when the face is detected in the preview frame.\n - /// Internally it starts continuous focus and focusing on the detected face.\n - /// When face detection is running, the camera_start_focusing(), camera_cancel_focusing(), camera_attr_set_af_mode(), camera_attr_set_af_area(), camera_attr_set_exposure_mode(), and camera_attr_set_whitebalance() settings are ignored.\n - /// If camera_stop_preview() is invoked, face detection is stopped and then preview is resumed using camera_start_preview(), this method should be called again to resume face detection. - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback to notify face detection - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Not preview state - /// @retval #CAMERA_ERROR_INVALID_OPERATION Not supported this feature - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be #CAMERA_STATE_PREVIEW. - /// - /// @see camera_stop_face_detection() - /// @see camera_face_detected_cb() - /// @see camera_is_supported_face_detection() - int camera_start_face_detection( - camera_h camera, - camera_face_detected_cb callback, - ffi.Pointer user_data, - ) { - return _camera_start_face_detection( - camera, - callback, - user_data, - ); - } - - late final _camera_start_face_detectionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_face_detected_cb, - ffi.Pointer)>>('camera_start_face_detection'); - late final _camera_start_face_detection = - _camera_start_face_detectionPtr.asFunction< - int Function( - camera_h, camera_face_detected_cb, ffi.Pointer)>(); - - /// @brief Stops face detection. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/camera - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre This should be called after face detection is started. - /// - /// @see camera_start_face_detection() - /// @see camera_is_supported_face_detection() - int camera_stop_face_detection( - camera_h camera, - ) { - return _camera_stop_face_detection( - camera, - ); - } - - late final _camera_stop_face_detectionPtr = - _lookup>( - 'camera_stop_face_detection'); - late final _camera_stop_face_detection = - _camera_stop_face_detectionPtr.asFunction(); - - /// @brief Gets continuous capture feature's supported state. - /// @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] camera The handle to the camera - /// @return @c true on supported, otherwise false - /// @exception #CAMERA_ERROR_NONE Successful - /// @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - bool camera_is_supported_continuous_capture( - camera_h camera, - ) { - return _camera_is_supported_continuous_capture( - camera, - ); - } - - late final _camera_is_supported_continuous_capturePtr = - _lookup>( - 'camera_is_supported_continuous_capture'); - late final _camera_is_supported_continuous_capture = - _camera_is_supported_continuous_capturePtr - .asFunction(); - - /// @brief Retrieves all supported camera preview resolutions by invoking the callback function once for each supported camera preview resolution. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_supported_preview_resolution_cb() repeatedly to retrieve each supported preview resolution. - /// - /// @see camera_set_preview_resolution() - /// @see camera_get_preview_resolution() - /// @see camera_supported_preview_resolution_cb() - int camera_foreach_supported_preview_resolution( - camera_h camera, - camera_supported_preview_resolution_cb callback, - ffi.Pointer user_data, - ) { - return _camera_foreach_supported_preview_resolution( - camera, - callback, - user_data, - ); - } - - late final _camera_foreach_supported_preview_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_supported_preview_resolution_cb, - ffi.Pointer)>>( - 'camera_foreach_supported_preview_resolution'); - late final _camera_foreach_supported_preview_resolution = - _camera_foreach_supported_preview_resolutionPtr.asFunction< - int Function(camera_h, camera_supported_preview_resolution_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE - /// @brief Sets the display rotation. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This function should be called before previewing (see camera_start_preview()) - /// @param[in] camera The handle to the camera - /// @param[in] rotation The display rotation - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_INVALID_OPERATION Display type is incorrect - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_start_preview() - /// @see camera_get_display_rotation() - int camera_set_display_rotation( - camera_h camera, - int rotation, - ) { - return _camera_set_display_rotation( - camera, - rotation, - ); - } - - late final _camera_set_display_rotationPtr = - _lookup>( - 'camera_set_display_rotation'); - late final _camera_set_display_rotation = - _camera_set_display_rotationPtr.asFunction(); - - /// @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE - /// @brief Gets the display rotation. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] rotation The display rotation - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_display_rotation() - int camera_get_display_rotation( - camera_h camera, - ffi.Pointer rotation, - ) { - return _camera_get_display_rotation( - camera, - rotation, - ); - } - - late final _camera_get_display_rotationPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_get_display_rotation'); - late final _camera_get_display_rotation = _camera_get_display_rotationPtr - .asFunction)>(); - - /// @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE - /// @brief Sets the display flip. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] flip The display flip - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_INVALID_OPERATION Display type is incorrect - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_get_display_flip() - int camera_set_display_flip( - camera_h camera, - int flip, - ) { - return _camera_set_display_flip( - camera, - flip, - ); - } - - late final _camera_set_display_flipPtr = - _lookup>( - 'camera_set_display_flip'); - late final _camera_set_display_flip = - _camera_set_display_flipPtr.asFunction(); - - /// @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE - /// @brief Gets the display flip. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] flip The display flip - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_display_flip() - int camera_get_display_flip( - camera_h camera, - ffi.Pointer flip, - ) { - return _camera_get_display_flip( - camera, - flip, - ); - } - - late final _camera_get_display_flipPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_get_display_flip'); - late final _camera_get_display_flip = _camera_get_display_flipPtr - .asFunction)>(); - - /// @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE - /// @brief Sets the visible property for display. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] visible The display visibility property - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_is_display_visible() - int camera_set_display_visible( - camera_h camera, - bool visible, - ) { - return _camera_set_display_visible( - camera, - visible, - ); - } - - late final _camera_set_display_visiblePtr = - _lookup>( - 'camera_set_display_visible'); - late final _camera_set_display_visible = - _camera_set_display_visiblePtr.asFunction(); - - /// @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE - /// @brief Gets the visible property of display. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] visible @c true if camera display is visible, otherwise @c false - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_display_visible() - int camera_is_display_visible( - camera_h camera, - ffi.Pointer visible, - ) { - return _camera_is_display_visible( - camera, - visible, - ); - } - - late final _camera_is_display_visiblePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_is_display_visible'); - late final _camera_is_display_visible = _camera_is_display_visiblePtr - .asFunction)>(); - - /// @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE - /// @brief Sets the display mode. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] mode The display mode - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_get_display_mode() - int camera_set_display_mode( - camera_h camera, - int mode, - ) { - return _camera_set_display_mode( - camera, - mode, - ); - } - - late final _camera_set_display_modePtr = - _lookup>( - 'camera_set_display_mode'); - late final _camera_set_display_mode = - _camera_set_display_modePtr.asFunction(); - - /// @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE - /// @brief Gets the display mode. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] mode The display mode - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_display_mode() - int camera_get_display_mode( - camera_h camera, - ffi.Pointer mode, - ) { - return _camera_get_display_mode( - camera, - mode, - ); - } - - late final _camera_get_display_modePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_get_display_mode'); - late final _camera_get_display_mode = _camera_get_display_modePtr - .asFunction)>(); - - /// @brief Sets the hint for display reuse. - /// @since_tizen 3.0 - /// @details If the hint is set to true, the display will be reused when the camera device is changed with camera_change_device(). - /// @remarks If the current display type is #CAMERA_DISPLAY_TYPE_NONE, this function will return #CAMERA_ERROR_INVALID_OPERATION. - /// @param[in] camera The handle to the camera - /// @param[in] hint The hint for display reuse; true - reuse the display, false - do not reuse - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_PREVIEW. - /// @see camera_get_display_reuse_hint() - /// @see camera_change_device() - int camera_set_display_reuse_hint( - camera_h camera, - bool hint, - ) { - return _camera_set_display_reuse_hint( - camera, - hint, - ); - } - - late final _camera_set_display_reuse_hintPtr = - _lookup>( - 'camera_set_display_reuse_hint'); - late final _camera_set_display_reuse_hint = _camera_set_display_reuse_hintPtr - .asFunction(); - - /// @brief Gets the hint for display reuse. - /// @since_tizen 3.0 - /// @remarks If the current display type is #CAMERA_DISPLAY_TYPE_NONE, this function will return #CAMERA_ERROR_INVALID_OPERATION. - /// @param[in] camera The handle to the camera - /// @param[out] hint The hint for display reuse; true - reuse the display, false - do not reuse - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_get_display_reuse_hint() - /// @see camera_change_device() - int camera_get_display_reuse_hint( - camera_h camera, - ffi.Pointer hint, - ) { - return _camera_get_display_reuse_hint( - camera, - hint, - ); - } - - late final _camera_get_display_reuse_hintPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_get_display_reuse_hint'); - late final _camera_get_display_reuse_hint = _camera_get_display_reuse_hintPtr - .asFunction)>(); - - /// @brief Sets the resolution of the captured image. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] width The capture width - /// @param[in] height The capture height - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_start_capture() - /// @see camera_get_capture_resolution() - /// @see camera_foreach_supported_capture_resolution() - int camera_set_capture_resolution( - camera_h camera, - int width, - int height, - ) { - return _camera_set_capture_resolution( - camera, - width, - height, - ); - } - - late final _camera_set_capture_resolutionPtr = - _lookup>( - 'camera_set_capture_resolution'); - late final _camera_set_capture_resolution = _camera_set_capture_resolutionPtr - .asFunction(); - - /// @brief Gets the resolution of the captured image. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] width The capture width - /// @param[out] height The capture height - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_capture_resolution() - /// @see camera_foreach_supported_capture_resolution() - int camera_get_capture_resolution( - camera_h camera, - ffi.Pointer width, - ffi.Pointer height, - ) { - return _camera_get_capture_resolution( - camera, - width, - height, - ); - } - - late final _camera_get_capture_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Pointer, - ffi.Pointer)>>('camera_get_capture_resolution'); - late final _camera_get_capture_resolution = - _camera_get_capture_resolutionPtr.asFunction< - int Function(camera_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Retrieves all supported camera captured resolutions by invoking the callback function once for each supported camera capture resolution. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_supported_capture_resolution_cb() repeatedly to retrieve each supported capture resolution. - /// @see camera_set_capture_resolution() - /// @see camera_get_capture_resolution() - /// @see camera_supported_capture_resolution_cb() - int camera_foreach_supported_capture_resolution( - camera_h camera, - camera_supported_capture_resolution_cb callback, - ffi.Pointer user_data, - ) { - return _camera_foreach_supported_capture_resolution( - camera, - callback, - user_data, - ); - } - - late final _camera_foreach_supported_capture_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_supported_capture_resolution_cb, - ffi.Pointer)>>( - 'camera_foreach_supported_capture_resolution'); - late final _camera_foreach_supported_capture_resolution = - _camera_foreach_supported_capture_resolutionPtr.asFunction< - int Function(camera_h, camera_supported_capture_resolution_cb, - ffi.Pointer)>(); - - /// @brief Sets the format of an image to be captured. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This function should be called before capturing (see camera_start_capture()). - /// @param[in] camera The handle to the camera - /// @param[out] format The format of the image to be captured - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_start_capture() - /// @see camera_get_capture_format() - /// @see camera_foreach_supported_capture_format() - int camera_set_capture_format( - camera_h camera, - int format, - ) { - return _camera_set_capture_format( - camera, - format, - ); - } - - late final _camera_set_capture_formatPtr = - _lookup>( - 'camera_set_capture_format'); - late final _camera_set_capture_format = - _camera_set_capture_formatPtr.asFunction(); - - /// @brief Gets the format of the image to be captured. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] format The format of the image to be captured - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_capture_format() - /// @see camera_foreach_supported_capture_format() - int camera_get_capture_format( - camera_h camera, - ffi.Pointer format, - ) { - return _camera_get_capture_format( - camera, - format, - ); - } - - late final _camera_get_capture_formatPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_get_capture_format'); - late final _camera_get_capture_format = _camera_get_capture_formatPtr - .asFunction)>(); - - /// @brief Retrieves all supported camera capture formats by invoking the callback function once for each supported camera capture format. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_supported_capture_format_cb() repeatedly to retrieve each supported capture format. - /// @see camera_set_capture_format() - /// @see camera_get_capture_format() - /// @see camera_supported_capture_format_cb() - int camera_foreach_supported_capture_format( - camera_h camera, - camera_supported_capture_format_cb callback, - ffi.Pointer user_data, - ) { - return _camera_foreach_supported_capture_format( - camera, - callback, - user_data, - ); - } - - late final _camera_foreach_supported_capture_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_supported_capture_format_cb, - ffi.Pointer)>>( - 'camera_foreach_supported_capture_format'); - late final _camera_foreach_supported_capture_format = - _camera_foreach_supported_capture_formatPtr.asFunction< - int Function(camera_h, camera_supported_capture_format_cb, - ffi.Pointer)>(); - - /// @brief Sets the preview data format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This function should be called before previewing (see camera_start_preview()). - /// @param[in] camera The handle to the camera - /// @param[in] format The preview data format - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED. - /// @see camera_start_preview() - /// @see camera_get_preview_format() - /// @see camera_foreach_supported_preview_format() - int camera_set_preview_format( - camera_h camera, - int format, - ) { - return _camera_set_preview_format( - camera, - format, - ); - } - - late final _camera_set_preview_formatPtr = - _lookup>( - 'camera_set_preview_format'); - late final _camera_set_preview_format = - _camera_set_preview_formatPtr.asFunction(); - - /// @brief Gets the format of the preview stream. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] format The preview data format - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_preview_format() - /// @see camera_foreach_supported_preview_format() - int camera_get_preview_format( - camera_h camera, - ffi.Pointer format, - ) { - return _camera_get_preview_format( - camera, - format, - ); - } - - late final _camera_get_preview_formatPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_get_preview_format'); - late final _camera_get_preview_format = _camera_get_preview_formatPtr - .asFunction)>(); - - /// @brief Gets the facing direction of camera module. - /// @since_tizen 3.0 - /// @param[in] camera The handle to the camera - /// @param[out] facing_direction The facing direction of camera module - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - int camera_get_facing_direction( - camera_h camera, - ffi.Pointer facing_direction, - ) { - return _camera_get_facing_direction( - camera, - facing_direction, - ); - } - - late final _camera_get_facing_directionPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_get_facing_direction'); - late final _camera_get_facing_direction = _camera_get_facing_directionPtr - .asFunction)>(); - - /// @brief Gets the camera's flash state. - /// @since_tizen 3.0 - /// @param[in] device The hardware camera to access - /// @param[out] state The current flash state - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @see camera_attr_set_flash_mode() - /// @see camera_attr_get_flash_mode() - int camera_get_flash_state( - int device, - ffi.Pointer state, - ) { - return _camera_get_flash_state( - device, - state, - ); - } - - late final _camera_get_flash_statePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_get_flash_state'); - late final _camera_get_flash_state = _camera_get_flash_statePtr - .asFunction)>(); - - /// @brief Retrieves all supported camera preview formats by invoking the callback function once for each supported camera preview format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_supported_preview_format_cb() repeatedly to retrieve each supported preview format. - /// @see camera_set_preview_format() - /// @see camera_get_preview_format() - /// @see camera_supported_preview_format_cb() - int camera_foreach_supported_preview_format( - camera_h camera, - camera_supported_preview_format_cb callback, - ffi.Pointer user_data, - ) { - return _camera_foreach_supported_preview_format( - camera, - callback, - user_data, - ); - } - - late final _camera_foreach_supported_preview_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_supported_preview_format_cb, - ffi.Pointer)>>( - 'camera_foreach_supported_preview_format'); - late final _camera_foreach_supported_preview_format = - _camera_foreach_supported_preview_formatPtr.asFunction< - int Function(camera_h, camera_supported_preview_format_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE - /// @brief Gets the face detection feature's supported state. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] camera The handle to the camera - /// @return @c true if supported, otherwise @c false - /// @see camera_start_face_detection() - /// @see camera_stop_face_detection() - /// @exception #CAMERA_ERROR_NONE Successful - /// @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - bool camera_is_supported_face_detection( - camera_h camera, - ) { - return _camera_is_supported_face_detection( - camera, - ); - } - - late final _camera_is_supported_face_detectionPtr = - _lookup>( - 'camera_is_supported_face_detection'); - late final _camera_is_supported_face_detection = - _camera_is_supported_face_detectionPtr - .asFunction(); - - /// @brief Gets the zero shutter lag feature's supported state. - /// @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If supporting zero shutter lag, continuous shot can be done with full capture size. \n - /// The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] camera The handle to the camera - /// @return @c true if supported, otherwise @c false - /// @exception #CAMERA_ERROR_NONE Successful - /// @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - bool camera_is_supported_zero_shutter_lag( - camera_h camera, - ) { - return _camera_is_supported_zero_shutter_lag( - camera, - ); - } - - late final _camera_is_supported_zero_shutter_lagPtr = - _lookup>( - 'camera_is_supported_zero_shutter_lag'); - late final _camera_is_supported_zero_shutter_lag = - _camera_is_supported_zero_shutter_lagPtr - .asFunction(); - - /// @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE - /// @brief Gets the camera device count. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If the device supports primary and secondary camera, this returns @c 2. If @c 1 is returned, the device only supports primary camera. - /// @param[in] camera The handle to the camera - /// @param[out] device_count The device count - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - int camera_get_device_count( - camera_h camera, - ffi.Pointer device_count, - ) { - return _camera_get_device_count( - camera, - device_count, - ); - } - - late final _camera_get_device_countPtr = _lookup< - ffi.NativeFunction)>>( - 'camera_get_device_count'); - late final _camera_get_device_count = _camera_get_device_countPtr - .asFunction)>(); - - /// @brief Gets the media packet preview callback feature's supported state. - /// @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] camera The handle to the camera - /// @return @c true if supported, otherwise @c false - /// @exception #CAMERA_ERROR_NONE Successful - /// @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - bool camera_is_supported_media_packet_preview_cb( - camera_h camera, - ) { - return _camera_is_supported_media_packet_preview_cb( - camera, - ); - } - - late final _camera_is_supported_media_packet_preview_cbPtr = - _lookup>( - 'camera_is_supported_media_packet_preview_cb'); - late final _camera_is_supported_media_packet_preview_cb = - _camera_is_supported_media_packet_preview_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be called once per frame when previewing. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This callback does not work in the video recorder mode.\n - /// Before 4.0, the only allowed state for calling this function was #CAMERA_STATE_CREATED.\n - /// Since 4.0, #CAMERA_STATE_PREVIEW has been added as an allowed state,\n - /// so that this function could be called before previewing or even while previewing.\n - /// A registered callback is called on the internal thread of the camera.\n - /// A video frame can be retrieved using a registered callback,\n - /// and the buffer is only available in a registered callback.\n - /// Since tizen 3.0, if you change the buffer in a registered callback,\n - /// it could not be displayed on the device in case of copied buffer.\n - /// and if camera_is_supported_media_packet_preview_cb() returns false,\n - /// it's copied buffer case. - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to be registered - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre Before 4.0 : The camera state must be set to #CAMERA_STATE_CREATED.\n - /// Since 4.0 : The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_start_preview() - /// @see camera_unset_preview_cb() - /// @see camera_preview_cb() - int camera_set_preview_cb( - camera_h camera, - camera_preview_cb callback, - ffi.Pointer user_data, - ) { - return _camera_set_preview_cb( - camera, - callback, - user_data, - ); - } - - late final _camera_set_preview_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_preview_cb, - ffi.Pointer)>>('camera_set_preview_cb'); - late final _camera_set_preview_cb = _camera_set_preview_cbPtr.asFunction< - int Function(camera_h, camera_preview_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_preview_cb() - int camera_unset_preview_cb( - camera_h camera, - ) { - return _camera_unset_preview_cb( - camera, - ); - } - - late final _camera_unset_preview_cbPtr = - _lookup>( - 'camera_unset_preview_cb'); - late final _camera_unset_preview_cb = - _camera_unset_preview_cbPtr.asFunction(); - - /// @brief Registers a media packet callback function to be called once per frame when previewing. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This callback does not work in video recorder mode.\n - /// This function should be called before previewing (see camera_start_preview())\n - /// A registered callback is called on the internal thread of the camera.\n - /// A video frame can be retrieved using a registered callback as a media packet.\n - /// The callback function holds the same buffer that will be drawn on the display device.\n - /// So if you change the media packet in a registered callback, it will be displayed on the device\n - /// and the media packet is available until it's destroyed by media_packet_destroy(). - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to be registered - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera's state should be #CAMERA_STATE_CREATED. - /// @see camera_start_preview() - /// @see camera_unset_media_packet_preview_cb() - /// @see camera_media_packet_preview_cb() - int camera_set_media_packet_preview_cb( - camera_h camera, - camera_media_packet_preview_cb callback, - ffi.Pointer user_data, - ) { - return _camera_set_media_packet_preview_cb( - camera, - callback, - user_data, - ); - } - - late final _camera_set_media_packet_preview_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_media_packet_preview_cb, - ffi.Pointer)>>('camera_set_media_packet_preview_cb'); - late final _camera_set_media_packet_preview_cb = - _camera_set_media_packet_preview_cbPtr.asFunction< - int Function(camera_h, camera_media_packet_preview_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the media packet callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_media_packet_preview_cb() - int camera_unset_media_packet_preview_cb( - camera_h camera, - ) { - return _camera_unset_media_packet_preview_cb( - camera, - ); - } - - late final _camera_unset_media_packet_preview_cbPtr = - _lookup>( - 'camera_unset_media_packet_preview_cb'); - late final _camera_unset_media_packet_preview_cb = - _camera_unset_media_packet_preview_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be called when the camera state changes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function will invoke camera_state_changed_cb() when the camera state changes. - /// @see camera_unset_state_changed_cb() - /// @see camera_state_changed_cb() - int camera_set_state_changed_cb( - camera_h camera, - camera_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _camera_set_state_changed_cb( - camera, - callback, - user_data, - ); - } - - late final _camera_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_state_changed_cb, - ffi.Pointer)>>('camera_set_state_changed_cb'); - late final _camera_set_state_changed_cb = - _camera_set_state_changed_cbPtr.asFunction< - int Function( - camera_h, camera_state_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_state_changed_cb() - int camera_unset_state_changed_cb( - camera_h camera, - ) { - return _camera_unset_state_changed_cb( - camera, - ); - } - - late final _camera_unset_state_changed_cbPtr = - _lookup>( - 'camera_unset_state_changed_cb'); - late final _camera_unset_state_changed_cb = - _camera_unset_state_changed_cbPtr.asFunction(); - - /// @brief Registers a callback function to be called when the camera is interrupted by policy. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_unset_interrupted_cb() - /// @see camera_interrupted_cb() - int camera_set_interrupted_cb( - camera_h camera, - camera_interrupted_cb callback, - ffi.Pointer user_data, - ) { - return _camera_set_interrupted_cb( - camera, - callback, - user_data, - ); - } - - late final _camera_set_interrupted_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_interrupted_cb, - ffi.Pointer)>>('camera_set_interrupted_cb'); - late final _camera_set_interrupted_cb = - _camera_set_interrupted_cbPtr.asFunction< - int Function( - camera_h, camera_interrupted_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_interrupted_cb() - int camera_unset_interrupted_cb( - camera_h camera, - ) { - return _camera_unset_interrupted_cb( - camera, - ); - } - - late final _camera_unset_interrupted_cbPtr = - _lookup>( - 'camera_unset_interrupted_cb'); - late final _camera_unset_interrupted_cb = - _camera_unset_interrupted_cbPtr.asFunction(); - - /// @brief Registers a callback function to be called when the camera interrupt is started by policy. - /// @since_tizen 4.0 - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @see camera_unset_interrupt_started_cb() - /// @see camera_interrupt_started_cb() - int camera_set_interrupt_started_cb( - camera_h camera, - camera_interrupt_started_cb callback, - ffi.Pointer user_data, - ) { - return _camera_set_interrupt_started_cb( - camera, - callback, - user_data, - ); - } - - late final _camera_set_interrupt_started_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_interrupt_started_cb, - ffi.Pointer)>>('camera_set_interrupt_started_cb'); - late final _camera_set_interrupt_started_cb = - _camera_set_interrupt_started_cbPtr.asFunction< - int Function( - camera_h, camera_interrupt_started_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen 4.0 - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @see camera_set_interrupt_started_cb() - int camera_unset_interrupt_started_cb( - camera_h camera, - ) { - return _camera_unset_interrupt_started_cb( - camera, - ); - } - - late final _camera_unset_interrupt_started_cbPtr = - _lookup>( - 'camera_unset_interrupt_started_cb'); - late final _camera_unset_interrupt_started_cb = - _camera_unset_interrupt_started_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be called when the auto-focus state changes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function will invoke camera_focus_changed_cb() when the auto-focus state changes. - /// @see camera_start_focusing() - /// @see camera_cancel_focusing() - /// @see camera_unset_focus_changed_cb() - /// @see camera_focus_changed_cb() - int camera_set_focus_changed_cb( - camera_h camera, - camera_focus_changed_cb callback, - ffi.Pointer user_data, - ) { - return _camera_set_focus_changed_cb( - camera, - callback, - user_data, - ); - } - - late final _camera_set_focus_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_focus_changed_cb, - ffi.Pointer)>>('camera_set_focus_changed_cb'); - late final _camera_set_focus_changed_cb = - _camera_set_focus_changed_cbPtr.asFunction< - int Function( - camera_h, camera_focus_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_focus_changed_cb() - int camera_unset_focus_changed_cb( - camera_h camera, - ) { - return _camera_unset_focus_changed_cb( - camera, - ); - } - - late final _camera_unset_focus_changed_cbPtr = - _lookup>( - 'camera_unset_focus_changed_cb'); - late final _camera_unset_focus_changed_cb = - _camera_unset_focus_changed_cbPtr.asFunction(); - - /// @brief Registers a callback function to be called when an asynchronous operation error occurs. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This callback informs about a critical error situation.\n - /// When this callback is invoked, the user should release the resource and terminate the application.\n - /// In case of errors, one of the following codes will occur:\n - /// #CAMERA_ERROR_DEVICE,\n - /// #CAMERA_ERROR_INVALID_OPERATION,\n - /// #CAMERA_ERROR_OUT_OF_MEMORY. - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function will invoke camera_error_cb() when an asynchronous operation error occurs. - /// - /// @see camera_unset_error_cb() - /// @see camera_error_cb() - int camera_set_error_cb( - camera_h camera, - camera_error_cb callback, - ffi.Pointer user_data, - ) { - return _camera_set_error_cb( - camera, - callback, - user_data, - ); - } - - late final _camera_set_error_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_error_cb, - ffi.Pointer)>>('camera_set_error_cb'); - late final _camera_set_error_cb = _camera_set_error_cbPtr.asFunction< - int Function(camera_h, camera_error_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_error_cb() - int camera_unset_error_cb( - camera_h camera, - ) { - return _camera_unset_error_cb( - camera, - ); - } - - late final _camera_unset_error_cbPtr = - _lookup>( - 'camera_unset_error_cb'); - late final _camera_unset_error_cb = - _camera_unset_error_cbPtr.asFunction(); - - /// @brief Gets the state of camera device. - /// @since_tizen 3.0 - /// @param[in] device The hardware camera type - /// @param[out] state The current state of the device - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - int camera_get_device_state( - int device, - ffi.Pointer state, - ) { - return _camera_get_device_state( - device, - state, - ); - } - - late final _camera_get_device_statePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_get_device_state'); - late final _camera_get_device_state = _camera_get_device_statePtr - .asFunction)>(); - - /// @brief Registers a callback function to be called when the camera device state changes. - /// @since_tizen 3.0 - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] cb_id The id of registered callback - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @post This function will invoke camera_device_state_changed_cb() when the camera device's state changes. - /// @see camera_remove_device_state_changed_cb() - /// @see camera_device_state_changed_cb() - int camera_add_device_state_changed_cb( - camera_device_state_changed_cb callback, - ffi.Pointer user_data, - ffi.Pointer cb_id, - ) { - return _camera_add_device_state_changed_cb( - callback, - user_data, - cb_id, - ); - } - - late final _camera_add_device_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - camera_device_state_changed_cb, - ffi.Pointer, - ffi.Pointer)>>('camera_add_device_state_changed_cb'); - late final _camera_add_device_state_changed_cb = - _camera_add_device_state_changed_cbPtr.asFunction< - int Function(camera_device_state_changed_cb, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen 3.0 - /// @param[in] cb_id The id of registered callback - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @see camera_add_device_state_changed_cb() - int camera_remove_device_state_changed_cb( - int cb_id, - ) { - return _camera_remove_device_state_changed_cb( - cb_id, - ); - } - - late final _camera_remove_device_state_changed_cbPtr = - _lookup>( - 'camera_remove_device_state_changed_cb'); - late final _camera_remove_device_state_changed_cb = - _camera_remove_device_state_changed_cbPtr.asFunction(); - - /// @brief Sets the preview frame rate. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This function should be called before previewing (see camera_start_preview()). - /// @param[in] camera The handle to the camera - /// @param[in] fps The frame rate - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED. - /// @see camera_start_preview() - /// @see camera_attr_get_preview_fps() - /// @see camera_attr_foreach_supported_fps() - int camera_attr_set_preview_fps( - camera_h camera, - int fps, - ) { - return _camera_attr_set_preview_fps( - camera, - fps, - ); - } - - late final _camera_attr_set_preview_fpsPtr = - _lookup>( - 'camera_attr_set_preview_fps'); - late final _camera_attr_set_preview_fps = - _camera_attr_set_preview_fpsPtr.asFunction(); - - /// @brief Gets the frames per second of a preview video stream. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] fps The frames per second of the preview video stream - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_preview_fps() - /// @see camera_attr_foreach_supported_fps() - int camera_attr_get_preview_fps( - camera_h camera, - ffi.Pointer fps, - ) { - return _camera_attr_get_preview_fps( - camera, - fps, - ); - } - - late final _camera_attr_get_preview_fpsPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_get_preview_fps'); - late final _camera_attr_get_preview_fps = _camera_attr_get_preview_fpsPtr - .asFunction)>(); - - /// @brief Retrieves all supported FPS modes by invoking the callback function once for each supported FPS mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_attr_supported_fps_cb() repeatedly to get each supported FPS mode. - /// @see camera_attr_set_preview_fps() - /// @see camera_attr_get_preview_fps() - /// @see camera_attr_supported_fps_cb() - int camera_attr_foreach_supported_fps( - camera_h camera, - camera_attr_supported_fps_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_foreach_supported_fps( - camera, - callback, - user_data, - ); - } - - late final _camera_attr_foreach_supported_fpsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_attr_supported_fps_cb, - ffi.Pointer)>>('camera_attr_foreach_supported_fps'); - late final _camera_attr_foreach_supported_fps = - _camera_attr_foreach_supported_fpsPtr.asFunction< - int Function( - camera_h, camera_attr_supported_fps_cb, ffi.Pointer)>(); - - /// @brief Retrieves all supported FPS modes by invoking the callback function once for each supported FPS mode. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] camera The handle to the camera - /// @param[in] width Required preview resolution's width - /// @param[in] height Required preview resolution's height - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_attr_supported_fps_cb() repeatedly to get each supported FPS mode. - /// @see camera_attr_set_preview_fps() - /// @see camera_attr_get_preview_fps() - /// @see camera_attr_supported_fps_cb() - int camera_attr_foreach_supported_fps_by_resolution( - camera_h camera, - int width, - int height, - camera_attr_supported_fps_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_foreach_supported_fps_by_resolution( - camera, - width, - height, - callback, - user_data, - ); - } - - late final _camera_attr_foreach_supported_fps_by_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Int, ffi.Int, - camera_attr_supported_fps_cb, ffi.Pointer)>>( - 'camera_attr_foreach_supported_fps_by_resolution'); - late final _camera_attr_foreach_supported_fps_by_resolution = - _camera_attr_foreach_supported_fps_by_resolutionPtr.asFunction< - int Function(camera_h, int, int, camera_attr_supported_fps_cb, - ffi.Pointer)>(); - - /// @brief Sets quality of the image. - /// @details The range for image quality is 1 to 100. If @a quality is out of range, #CAMERA_ERROR_INVALID_PARAMETER error occurred. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] quality The quality of image (1 ~ 100) - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_start_preview() - /// @see camera_attr_get_image_quality() - int camera_attr_set_image_quality( - camera_h camera, - int quality, - ) { - return _camera_attr_set_image_quality( - camera, - quality, - ); - } - - late final _camera_attr_set_image_qualityPtr = - _lookup>( - 'camera_attr_set_image_quality'); - late final _camera_attr_set_image_quality = _camera_attr_set_image_qualityPtr - .asFunction(); - - /// @brief Gets the quality of a still image, which is captured. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] quality The quality of the image(1 ~ 100) - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_image_quality() - int camera_attr_get_image_quality( - camera_h camera, - ffi.Pointer quality, - ) { - return _camera_attr_get_image_quality( - camera, - quality, - ); - } - - late final _camera_attr_get_image_qualityPtr = _lookup< - ffi.NativeFunction)>>( - 'camera_attr_get_image_quality'); - late final _camera_attr_get_image_quality = _camera_attr_get_image_qualityPtr - .asFunction)>(); - - /// @brief Gets the bit rate of encoded preview. - /// @since_tizen 3.0 - /// @param[in] camera The handle to the camera - /// @param[out] bitrate The bit rate of encoded preview - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_encoded_preview_bitrate() - int camera_attr_get_encoded_preview_bitrate( - camera_h camera, - ffi.Pointer bitrate, - ) { - return _camera_attr_get_encoded_preview_bitrate( - camera, - bitrate, - ); - } - - late final _camera_attr_get_encoded_preview_bitratePtr = _lookup< - ffi.NativeFunction)>>( - 'camera_attr_get_encoded_preview_bitrate'); - late final _camera_attr_get_encoded_preview_bitrate = - _camera_attr_get_encoded_preview_bitratePtr - .asFunction)>(); - - /// @brief Sets the bit rate of encoded preview. - /// @since_tizen 3.0 - /// @remarks The recommended range is from 1,000 (1 kbps) to 100,000,000 (100 Mbps). \n - /// But, due to codec limitations, it may not apply. - /// @param[in] camera The handle to the camera - /// @param[in] bitrate The bit rate of encoded preview - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_get_encoded_preview_bitrate() - int camera_attr_set_encoded_preview_bitrate( - camera_h camera, - int bitrate, - ) { - return _camera_attr_set_encoded_preview_bitrate( - camera, - bitrate, - ); - } - - late final _camera_attr_set_encoded_preview_bitratePtr = - _lookup>( - 'camera_attr_set_encoded_preview_bitrate'); - late final _camera_attr_set_encoded_preview_bitrate = - _camera_attr_set_encoded_preview_bitratePtr - .asFunction(); - - /// @brief Gets the GOP(Group Of Pictures) interval of encoded preview. - /// @since_tizen 3.0 - /// @param[in] camera The handle to the camera - /// @param[out] interval the GOP interval of encoded preview (millisecond) - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_encoded_preview_gop_interval() - int camera_attr_get_encoded_preview_gop_interval( - camera_h camera, - ffi.Pointer interval, - ) { - return _camera_attr_get_encoded_preview_gop_interval( - camera, - interval, - ); - } - - late final _camera_attr_get_encoded_preview_gop_intervalPtr = _lookup< - ffi.NativeFunction)>>( - 'camera_attr_get_encoded_preview_gop_interval'); - late final _camera_attr_get_encoded_preview_gop_interval = - _camera_attr_get_encoded_preview_gop_intervalPtr - .asFunction)>(); - - /// @brief Sets the GOP(Group Of Pictures) interval of encoded preview. - /// @since_tizen 3.0 - /// @remarks The recommended range is from 1,000 (1 second) to 600,000 (10 minutes). \n - /// But, due to codec limitations, it may not apply. - /// @param[in] camera The handle to the camera - /// @param[in] interval the GOP interval of encoded preview (millisecond) - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_get_encoded_preview_gop_interval() - int camera_attr_set_encoded_preview_gop_interval( - camera_h camera, - int interval, - ) { - return _camera_attr_set_encoded_preview_gop_interval( - camera, - interval, - ); - } - - late final _camera_attr_set_encoded_preview_gop_intervalPtr = - _lookup>( - 'camera_attr_set_encoded_preview_gop_interval'); - late final _camera_attr_set_encoded_preview_gop_interval = - _camera_attr_set_encoded_preview_gop_intervalPtr - .asFunction(); - - /// @brief Sets the zoom level. - /// @details The range for the zoom level is received from camera_attr_get_zoom_range(). If @a zoom is out of range, the #CAMERA_ERROR_INVALID_PARAMETER error occurs. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] zoom The zoom level - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_get_zoom() - /// @see camera_attr_get_zoom_range() - int camera_attr_set_zoom( - camera_h camera, - int zoom, - ) { - return _camera_attr_set_zoom( - camera, - zoom, - ); - } - - late final _camera_attr_set_zoomPtr = - _lookup>( - 'camera_attr_set_zoom'); - late final _camera_attr_set_zoom = - _camera_attr_set_zoomPtr.asFunction(); - - /// @brief Gets the zoom level. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] zoom The zoom level - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_zoom() - /// @see camera_attr_get_zoom_range() - int camera_attr_get_zoom( - camera_h camera, - ffi.Pointer zoom, - ) { - return _camera_attr_get_zoom( - camera, - zoom, - ); - } - - late final _camera_attr_get_zoomPtr = _lookup< - ffi.NativeFunction)>>( - 'camera_attr_get_zoom'); - late final _camera_attr_get_zoom = _camera_attr_get_zoomPtr - .asFunction)>(); - - /// @brief Gets the available zoom level. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If the min value is greater than the max value, it means that this feature is not supported. - /// @param[in] camera The handle to the camera - /// @param[out] min The minimum zoom level - /// @param[out] max The maximum zoom level - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_zoom() - /// @see camera_attr_get_zoom() - int camera_attr_get_zoom_range( - camera_h camera, - ffi.Pointer min, - ffi.Pointer max, - ) { - return _camera_attr_get_zoom_range( - camera, - min, - max, - ); - } - - late final _camera_attr_get_zoom_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Pointer, - ffi.Pointer)>>('camera_attr_get_zoom_range'); - late final _camera_attr_get_zoom_range = - _camera_attr_get_zoom_rangePtr.asFunction< - int Function(camera_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the auto focus mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] mode The auto focus mode - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_get_af_mode() - /// @see camera_attr_foreach_supported_af_mode() - /// @see #camera_attr_af_mode_e - int camera_attr_set_af_mode( - camera_h camera, - int mode, - ) { - return _camera_attr_set_af_mode( - camera, - mode, - ); - } - - late final _camera_attr_set_af_modePtr = - _lookup>( - 'camera_attr_set_af_mode'); - late final _camera_attr_set_af_mode = - _camera_attr_set_af_modePtr.asFunction(); - - /// @brief Gets the auto focus mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] mode The auto focus mode - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_foreach_supported_af_mode() - /// @see camera_attr_set_af_mode() - /// @see #camera_attr_af_mode_e - int camera_attr_get_af_mode( - camera_h camera, - ffi.Pointer mode, - ) { - return _camera_attr_get_af_mode( - camera, - mode, - ); - } - - late final _camera_attr_get_af_modePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_get_af_mode'); - late final _camera_attr_get_af_mode = _camera_attr_get_af_modePtr - .asFunction)>(); - - /// @brief Sets auto focus area. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This API is invalid in the #CAMERA_ATTR_AF_NONE mode.\n - /// The coordinates are mapped to preview area. - /// @param[in] camera The handle to the camera - /// @param[in] x The x coordinates of the focus area - /// @param[in] y The y coordinates of the focus area - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_set_af_mode() - /// @see camera_attr_clear_af_area() - int camera_attr_set_af_area( - camera_h camera, - int x, - int y, - ) { - return _camera_attr_set_af_area( - camera, - x, - y, - ); - } - - late final _camera_attr_set_af_areaPtr = - _lookup>( - 'camera_attr_set_af_area'); - late final _camera_attr_set_af_area = _camera_attr_set_af_areaPtr - .asFunction(); - - /// @brief Clears the auto focus area. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The focusing area is set to the center. - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_af_mode() - /// @see camera_attr_set_af_area() - int camera_attr_clear_af_area( - camera_h camera, - ) { - return _camera_attr_clear_af_area( - camera, - ); - } - - late final _camera_attr_clear_af_areaPtr = - _lookup>( - 'camera_attr_clear_af_area'); - late final _camera_attr_clear_af_area = - _camera_attr_clear_af_areaPtr.asFunction(); - - /// @brief Retrieves all supported auto focus modes by invoking the callback function once for each supported auto focus mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_attr_supported_af_mode_cb() to get all the supported auto focus modes. - /// @see camera_attr_set_af_mode() - /// @see camera_attr_get_af_mode() - /// @see camera_attr_supported_af_mode_cb() - int camera_attr_foreach_supported_af_mode( - camera_h camera, - camera_attr_supported_af_mode_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_foreach_supported_af_mode( - camera, - callback, - user_data, - ); - } - - late final _camera_attr_foreach_supported_af_modePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_attr_supported_af_mode_cb, - ffi.Pointer)>>('camera_attr_foreach_supported_af_mode'); - late final _camera_attr_foreach_supported_af_mode = - _camera_attr_foreach_supported_af_modePtr.asFunction< - int Function(camera_h, camera_attr_supported_af_mode_cb, - ffi.Pointer)>(); - - /// @brief Sets the exposure mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] mode The exposure mode - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_get_exposure_mode() - /// @see camera_attr_foreach_supported_exposure_mode() - int camera_attr_set_exposure_mode( - camera_h camera, - int mode, - ) { - return _camera_attr_set_exposure_mode( - camera, - mode, - ); - } - - late final _camera_attr_set_exposure_modePtr = - _lookup>( - 'camera_attr_set_exposure_mode'); - late final _camera_attr_set_exposure_mode = _camera_attr_set_exposure_modePtr - .asFunction(); - - /// @brief Gets the exposure mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] mode The exposure mode - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_exposure_mode() - /// @see camera_attr_foreach_supported_exposure_mode() - int camera_attr_get_exposure_mode( - camera_h camera, - ffi.Pointer mode, - ) { - return _camera_attr_get_exposure_mode( - camera, - mode, - ); - } - - late final _camera_attr_get_exposure_modePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_get_exposure_mode'); - late final _camera_attr_get_exposure_mode = _camera_attr_get_exposure_modePtr - .asFunction)>(); - - /// @brief Retrieves all supported exposure modes by invoking the callback function once for each supported exposure mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_attr_supported_exposure_mode_cb() to get all the supported exposure modes. - /// @see camera_attr_set_exposure_mode() - /// @see camera_attr_get_exposure_mode() - /// @see camera_attr_supported_exposure_mode_cb() - int camera_attr_foreach_supported_exposure_mode( - camera_h camera, - camera_attr_supported_exposure_mode_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_foreach_supported_exposure_mode( - camera, - callback, - user_data, - ); - } - - late final _camera_attr_foreach_supported_exposure_modePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_attr_supported_exposure_mode_cb, - ffi.Pointer)>>( - 'camera_attr_foreach_supported_exposure_mode'); - late final _camera_attr_foreach_supported_exposure_mode = - _camera_attr_foreach_supported_exposure_modePtr.asFunction< - int Function(camera_h, camera_attr_supported_exposure_mode_cb, - ffi.Pointer)>(); - - /// @brief Sets the exposure value. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] value The exposure value - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_get_exposure() - int camera_attr_set_exposure( - camera_h camera, - int value, - ) { - return _camera_attr_set_exposure( - camera, - value, - ); - } - - late final _camera_attr_set_exposurePtr = - _lookup>( - 'camera_attr_set_exposure'); - late final _camera_attr_set_exposure = - _camera_attr_set_exposurePtr.asFunction(); - - /// @brief Gets the exposure value. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] value The exposure value - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_exposure() - int camera_attr_get_exposure( - camera_h camera, - ffi.Pointer value, - ) { - return _camera_attr_get_exposure( - camera, - value, - ); - } - - late final _camera_attr_get_exposurePtr = _lookup< - ffi.NativeFunction)>>( - 'camera_attr_get_exposure'); - late final _camera_attr_get_exposure = _camera_attr_get_exposurePtr - .asFunction)>(); - - /// @brief Gets the available exposure value. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If the min value is greater than the max value, it means that this feature is not supported. - /// @param[in] camera The handle to the camera - /// @param[out] min The minimum exposure value - /// @param[out] max The maximum exposure value - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_exposure() - int camera_attr_get_exposure_range( - camera_h camera, - ffi.Pointer min, - ffi.Pointer max, - ) { - return _camera_attr_get_exposure_range( - camera, - min, - max, - ); - } - - late final _camera_attr_get_exposure_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Pointer, - ffi.Pointer)>>('camera_attr_get_exposure_range'); - late final _camera_attr_get_exposure_range = - _camera_attr_get_exposure_rangePtr.asFunction< - int Function(camera_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the ISO level. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] iso The ISO level - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_get_iso() - /// @see camera_attr_foreach_supported_iso() - int camera_attr_set_iso( - camera_h camera, - int iso, - ) { - return _camera_attr_set_iso( - camera, - iso, - ); - } - - late final _camera_attr_set_isoPtr = - _lookup>( - 'camera_attr_set_iso'); - late final _camera_attr_set_iso = - _camera_attr_set_isoPtr.asFunction(); - - /// @brief Gets the ISO level. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] iso The ISO level - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_iso() - /// @see camera_attr_foreach_supported_iso() - int camera_attr_get_iso( - camera_h camera, - ffi.Pointer iso, - ) { - return _camera_attr_get_iso( - camera, - iso, - ); - } - - late final _camera_attr_get_isoPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_get_iso'); - late final _camera_attr_get_iso = _camera_attr_get_isoPtr - .asFunction)>(); - - /// @brief Retrieves all supported ISO levels by invoking the callback function once for each supported ISO level. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_attr_supported_iso_cb() to get all the supported ISO levels. - /// @see camera_attr_set_iso() - /// @see camera_attr_get_iso() - /// @see camera_attr_supported_iso_cb() - int camera_attr_foreach_supported_iso( - camera_h camera, - camera_attr_supported_iso_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_foreach_supported_iso( - camera, - callback, - user_data, - ); - } - - late final _camera_attr_foreach_supported_isoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_attr_supported_iso_cb, - ffi.Pointer)>>('camera_attr_foreach_supported_iso'); - late final _camera_attr_foreach_supported_iso = - _camera_attr_foreach_supported_isoPtr.asFunction< - int Function( - camera_h, camera_attr_supported_iso_cb, ffi.Pointer)>(); - - /// @brief Sets the theater mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If you want to display the preview image on the external display with the full screen mode, use this function. - /// @param[in] camera The handle to the camera - /// @param[in] mode The mode to change - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre This function is valid only when the external display is connected. - /// @see camera_attr_get_theater_mode() - int camera_attr_set_theater_mode( - camera_h camera, - int mode, - ) { - return _camera_attr_set_theater_mode( - camera, - mode, - ); - } - - late final _camera_attr_set_theater_modePtr = - _lookup>( - 'camera_attr_set_theater_mode'); - late final _camera_attr_set_theater_mode = _camera_attr_set_theater_modePtr - .asFunction(); - - /// @brief Gets the theater mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] mode Current theater mode - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_get_theater_mode() - int camera_attr_get_theater_mode( - camera_h camera, - ffi.Pointer mode, - ) { - return _camera_attr_get_theater_mode( - camera, - mode, - ); - } - - late final _camera_attr_get_theater_modePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_get_theater_mode'); - late final _camera_attr_get_theater_mode = _camera_attr_get_theater_modePtr - .asFunction)>(); - - /// @brief Retrieves all supported theater modes by invoking callback function once for each supported theater modes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_attr_supported_theater_mode_cb() to get all supported theater modes. - /// @see camera_attr_set_theater_mode() - /// @see camera_attr_get_theater_mode() - /// @see camera_attr_supported_theater_mode_cb() - int camera_attr_foreach_supported_theater_mode( - camera_h camera, - camera_attr_supported_theater_mode_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_foreach_supported_theater_mode( - camera, - callback, - user_data, - ); - } - - late final _camera_attr_foreach_supported_theater_modePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_attr_supported_theater_mode_cb, - ffi.Pointer)>>( - 'camera_attr_foreach_supported_theater_mode'); - late final _camera_attr_foreach_supported_theater_mode = - _camera_attr_foreach_supported_theater_modePtr.asFunction< - int Function(camera_h, camera_attr_supported_theater_mode_cb, - ffi.Pointer)>(); - - /// @brief Sets the brightness level. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If the min value is greater than the max value from camera_attr_get_brightness_range(), \n - /// it means that this feature is not supported. - /// @param[in] camera The handle to the camera - /// @param[in] level The brightness level - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_get_brightness() - /// @see camera_attr_get_brightness_range() - int camera_attr_set_brightness( - camera_h camera, - int level, - ) { - return _camera_attr_set_brightness( - camera, - level, - ); - } - - late final _camera_attr_set_brightnessPtr = - _lookup>( - 'camera_attr_set_brightness'); - late final _camera_attr_set_brightness = - _camera_attr_set_brightnessPtr.asFunction(); - - /// @brief Gets the brightness level. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] level The brightness level - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_brightness() - /// @see camera_attr_get_brightness_range() - int camera_attr_get_brightness( - camera_h camera, - ffi.Pointer level, - ) { - return _camera_attr_get_brightness( - camera, - level, - ); - } - - late final _camera_attr_get_brightnessPtr = _lookup< - ffi.NativeFunction)>>( - 'camera_attr_get_brightness'); - late final _camera_attr_get_brightness = _camera_attr_get_brightnessPtr - .asFunction)>(); - - /// @brief Gets the available brightness level. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If the min value is greater than the max value, it means that this feature is not supported. - /// @param[in] camera The handle to the camera - /// @param[out] min The minimum brightness level - /// @param[out] max The maximum brightness level - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_brightness() - /// @see camera_attr_get_brightness() - int camera_attr_get_brightness_range( - camera_h camera, - ffi.Pointer min, - ffi.Pointer max, - ) { - return _camera_attr_get_brightness_range( - camera, - min, - max, - ); - } - - late final _camera_attr_get_brightness_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Pointer, - ffi.Pointer)>>('camera_attr_get_brightness_range'); - late final _camera_attr_get_brightness_range = - _camera_attr_get_brightness_rangePtr.asFunction< - int Function(camera_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the contrast level. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] level The contrast level - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_get_contrast() - /// @see camera_attr_get_contrast_range() - int camera_attr_set_contrast( - camera_h camera, - int level, - ) { - return _camera_attr_set_contrast( - camera, - level, - ); - } - - late final _camera_attr_set_contrastPtr = - _lookup>( - 'camera_attr_set_contrast'); - late final _camera_attr_set_contrast = - _camera_attr_set_contrastPtr.asFunction(); - - /// @brief Gets the contrast level. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] level The contrast level - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_contrast() - /// @see camera_attr_get_contrast_range() - int camera_attr_get_contrast( - camera_h camera, - ffi.Pointer level, - ) { - return _camera_attr_get_contrast( - camera, - level, - ); - } - - late final _camera_attr_get_contrastPtr = _lookup< - ffi.NativeFunction)>>( - 'camera_attr_get_contrast'); - late final _camera_attr_get_contrast = _camera_attr_get_contrastPtr - .asFunction)>(); - - /// @brief Gets the available contrast level. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If the min value is greater than the max value, it means that this feature is not supported. - /// @param[in] camera The handle to the camera - /// @param[out] min The minimum contrast level - /// @param[out] max The maximum contrast level - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_contrast() - /// @see camera_attr_get_contrast() - int camera_attr_get_contrast_range( - camera_h camera, - ffi.Pointer min, - ffi.Pointer max, - ) { - return _camera_attr_get_contrast_range( - camera, - min, - max, - ); - } - - late final _camera_attr_get_contrast_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Pointer, - ffi.Pointer)>>('camera_attr_get_contrast_range'); - late final _camera_attr_get_contrast_range = - _camera_attr_get_contrast_rangePtr.asFunction< - int Function(camera_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the hue level. - /// @since_tizen 5.0 - /// @param[in] camera The handle to the camera - /// @param[in] level The hue level - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @see camera_attr_get_hue() - /// @see camera_attr_get_hue_range() - int camera_attr_set_hue( - camera_h camera, - int level, - ) { - return _camera_attr_set_hue( - camera, - level, - ); - } - - late final _camera_attr_set_huePtr = - _lookup>( - 'camera_attr_set_hue'); - late final _camera_attr_set_hue = - _camera_attr_set_huePtr.asFunction(); - - /// @brief Gets the hue level. - /// @since_tizen 5.0 - /// @param[in] camera The handle to the camera - /// @param[out] level The hue level - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @see camera_attr_set_hue() - /// @see camera_attr_get_hue_range() - int camera_attr_get_hue( - camera_h camera, - ffi.Pointer level, - ) { - return _camera_attr_get_hue( - camera, - level, - ); - } - - late final _camera_attr_get_huePtr = _lookup< - ffi.NativeFunction)>>( - 'camera_attr_get_hue'); - late final _camera_attr_get_hue = _camera_attr_get_huePtr - .asFunction)>(); - - /// @brief Gets the available hue level. - /// @since_tizen 5.0 - /// @remarks If the min value is greater than the max value, it means that this feature is not supported. - /// @param[in] camera The handle to the camera - /// @param[out] min The minimum hue level - /// @param[out] max The maximum hue level - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @see camera_attr_set_hue() - /// @see camera_attr_get_hue() - int camera_attr_get_hue_range( - camera_h camera, - ffi.Pointer min, - ffi.Pointer max, - ) { - return _camera_attr_get_hue_range( - camera, - min, - max, - ); - } - - late final _camera_attr_get_hue_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Pointer, - ffi.Pointer)>>('camera_attr_get_hue_range'); - late final _camera_attr_get_hue_range = - _camera_attr_get_hue_rangePtr.asFunction< - int Function(camera_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the white balance mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] whitebalance The white balance mode - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_foreach_supported_whitebalance() - /// @see camera_attr_get_whitebalance() - int camera_attr_set_whitebalance( - camera_h camera, - int whitebalance, - ) { - return _camera_attr_set_whitebalance( - camera, - whitebalance, - ); - } - - late final _camera_attr_set_whitebalancePtr = - _lookup>( - 'camera_attr_set_whitebalance'); - late final _camera_attr_set_whitebalance = _camera_attr_set_whitebalancePtr - .asFunction(); - - /// @brief Gets the white balance mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] whitebalance The white balance mode - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_foreach_supported_whitebalance() - /// @see camera_attr_set_whitebalance() - int camera_attr_get_whitebalance( - camera_h camera, - ffi.Pointer whitebalance, - ) { - return _camera_attr_get_whitebalance( - camera, - whitebalance, - ); - } - - late final _camera_attr_get_whitebalancePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_get_whitebalance'); - late final _camera_attr_get_whitebalance = _camera_attr_get_whitebalancePtr - .asFunction)>(); - - /// @brief Retrieves all supported white balances by invoking the callback function once for each supported white balance. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_attr_supported_whitebalance_cb() to get all the supported white balances. - /// @see camera_attr_set_whitebalance() - /// @see camera_attr_get_whitebalance() - /// @see camera_attr_supported_whitebalance_cb() - int camera_attr_foreach_supported_whitebalance( - camera_h camera, - camera_attr_supported_whitebalance_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_foreach_supported_whitebalance( - camera, - callback, - user_data, - ); - } - - late final _camera_attr_foreach_supported_whitebalancePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_attr_supported_whitebalance_cb, - ffi.Pointer)>>( - 'camera_attr_foreach_supported_whitebalance'); - late final _camera_attr_foreach_supported_whitebalance = - _camera_attr_foreach_supported_whitebalancePtr.asFunction< - int Function(camera_h, camera_attr_supported_whitebalance_cb, - ffi.Pointer)>(); - - /// @brief Sets the camera effect mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] effect The camera effect mode - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_foreach_supported_effect() - /// @see camera_attr_get_effect() - int camera_attr_set_effect( - camera_h camera, - int effect, - ) { - return _camera_attr_set_effect( - camera, - effect, - ); - } - - late final _camera_attr_set_effectPtr = - _lookup>( - 'camera_attr_set_effect'); - late final _camera_attr_set_effect = - _camera_attr_set_effectPtr.asFunction(); - - /// @brief Gets the camera effect mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] effect The camera effect mode - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_foreach_supported_effect() - /// @see camera_attr_set_effect() - int camera_attr_get_effect( - camera_h camera, - ffi.Pointer effect, - ) { - return _camera_attr_get_effect( - camera, - effect, - ); - } - - late final _camera_attr_get_effectPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_get_effect'); - late final _camera_attr_get_effect = _camera_attr_get_effectPtr - .asFunction)>(); - - /// @brief Retrieves all supported effect modes by invoking the callback function once for each supported effect mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_attr_supported_effect_cb() to get all the supported effect modes. - /// @see camera_attr_set_effect() - /// @see camera_attr_get_effect() - /// @see camera_attr_supported_effect_cb() - int camera_attr_foreach_supported_effect( - camera_h camera, - camera_attr_supported_effect_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_foreach_supported_effect( - camera, - callback, - user_data, - ); - } - - late final _camera_attr_foreach_supported_effectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_attr_supported_effect_cb, - ffi.Pointer)>>('camera_attr_foreach_supported_effect'); - late final _camera_attr_foreach_supported_effect = - _camera_attr_foreach_supported_effectPtr.asFunction< - int Function(camera_h, camera_attr_supported_effect_cb, - ffi.Pointer)>(); - - /// @brief Sets the scene mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] mode The scene mode - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_foreach_supported_scene_mode() - /// @see camera_attr_get_scene_mode() - int camera_attr_set_scene_mode( - camera_h camera, - int mode, - ) { - return _camera_attr_set_scene_mode( - camera, - mode, - ); - } - - late final _camera_attr_set_scene_modePtr = - _lookup>( - 'camera_attr_set_scene_mode'); - late final _camera_attr_set_scene_mode = - _camera_attr_set_scene_modePtr.asFunction(); - - /// @brief Gets the scene mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] mode The scene mode - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_foreach_supported_scene_mode() - /// @see camera_attr_set_scene_mode() - int camera_attr_get_scene_mode( - camera_h camera, - ffi.Pointer mode, - ) { - return _camera_attr_get_scene_mode( - camera, - mode, - ); - } - - late final _camera_attr_get_scene_modePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_get_scene_mode'); - late final _camera_attr_get_scene_mode = _camera_attr_get_scene_modePtr - .asFunction)>(); - - /// @brief Retrieves all supported scene modes by invoking the callback function once for each supported scene mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_attr_supported_scene_mode_cb() to get all the supported scene modes. - /// @see camera_attr_set_scene_mode() - /// @see camera_attr_get_scene_mode() - /// @see camera_attr_supported_scene_mode_cb() - int camera_attr_foreach_supported_scene_mode( - camera_h camera, - camera_attr_supported_scene_mode_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_foreach_supported_scene_mode( - camera, - callback, - user_data, - ); - } - - late final _camera_attr_foreach_supported_scene_modePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_attr_supported_scene_mode_cb, - ffi.Pointer)>>( - 'camera_attr_foreach_supported_scene_mode'); - late final _camera_attr_foreach_supported_scene_mode = - _camera_attr_foreach_supported_scene_modePtr.asFunction< - int Function(camera_h, camera_attr_supported_scene_mode_cb, - ffi.Pointer)>(); - - /// @brief Enables to write EXIF(Exchangeable image file format) tags in a JPEG file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] enable If @c true writing EXIF tags in a JPEG file is enabled, otherwise @c false - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_is_enabled_tag() - int camera_attr_enable_tag( - camera_h camera, - bool enable, - ) { - return _camera_attr_enable_tag( - camera, - enable, - ); - } - - late final _camera_attr_enable_tagPtr = - _lookup>( - 'camera_attr_enable_tag'); - late final _camera_attr_enable_tag = - _camera_attr_enable_tagPtr.asFunction(); - - /// @brief Gets the value that indicates whether writing EXIF(Exchangeable image file format) tags in a JPEG file is enabled. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] enabled If @c true camera information is enabled, otherwise @c false - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_enable_tag() - int camera_attr_is_enabled_tag( - camera_h camera, - ffi.Pointer enabled, - ) { - return _camera_attr_is_enabled_tag( - camera, - enabled, - ); - } - - late final _camera_attr_is_enabled_tagPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_is_enabled_tag'); - late final _camera_attr_is_enabled_tag = _camera_attr_is_enabled_tagPtr - .asFunction)>(); - - /// @brief Sets the camera image description in the EXIF(Exchangeable image file format) tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] description The string with description - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_get_tag_image_description() - int camera_attr_set_tag_image_description( - camera_h camera, - ffi.Pointer description, - ) { - return _camera_attr_set_tag_image_description( - camera, - description, - ); - } - - late final _camera_attr_set_tag_image_descriptionPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_set_tag_image_description'); - late final _camera_attr_set_tag_image_description = - _camera_attr_set_tag_image_descriptionPtr - .asFunction)>(); - - /// @brief Gets the camera image description in EXIF(Exchangeable image file format) tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a description using free(). - /// @param[in] camera The handle to the camera - /// @param[out] description A pointer to a string - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_tag_image_description() - int camera_attr_get_tag_image_description( - camera_h camera, - ffi.Pointer> description, - ) { - return _camera_attr_get_tag_image_description( - camera, - description, - ); - } - - late final _camera_attr_get_tag_image_descriptionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Pointer>)>>( - 'camera_attr_get_tag_image_description'); - late final _camera_attr_get_tag_image_description = - _camera_attr_get_tag_image_descriptionPtr.asFunction< - int Function(camera_h, ffi.Pointer>)>(); - - /// @brief Sets the camera orientation in the EXIF(Exchangeable image file format) tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] orientation The camera orientation - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_get_tag_orientation() - int camera_attr_set_tag_orientation( - camera_h camera, - int orientation, - ) { - return _camera_attr_set_tag_orientation( - camera, - orientation, - ); - } - - late final _camera_attr_set_tag_orientationPtr = - _lookup>( - 'camera_attr_set_tag_orientation'); - late final _camera_attr_set_tag_orientation = - _camera_attr_set_tag_orientationPtr - .asFunction(); - - /// @brief Gets the camera orientation in the EXIF(Exchangeable image file format) tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] orientation The camera orientation - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_tag_orientation() - int camera_attr_get_tag_orientation( - camera_h camera, - ffi.Pointer orientation, - ) { - return _camera_attr_get_tag_orientation( - camera, - orientation, - ); - } - - late final _camera_attr_get_tag_orientationPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_get_tag_orientation'); - late final _camera_attr_get_tag_orientation = - _camera_attr_get_tag_orientationPtr - .asFunction)>(); - - /// @brief Sets the software information in the EXIF(Exchangeable image file format) tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] software The software information tag - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_get_tag_software() - int camera_attr_set_tag_software( - camera_h camera, - ffi.Pointer software, - ) { - return _camera_attr_set_tag_software( - camera, - software, - ); - } - - late final _camera_attr_set_tag_softwarePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_set_tag_software'); - late final _camera_attr_set_tag_software = _camera_attr_set_tag_softwarePtr - .asFunction)>(); - - /// @brief Gets the software information in the EXIF(Exchangeable image file format) tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a software using free(). - /// @param[in] camera The handle to the camera - /// @param[out] software A pointer to a string - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_tag_software() - int camera_attr_get_tag_software( - camera_h camera, - ffi.Pointer> software, - ) { - return _camera_attr_get_tag_software( - camera, - software, - ); - } - - late final _camera_attr_get_tag_softwarePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Pointer>)>>( - 'camera_attr_get_tag_software'); - late final _camera_attr_get_tag_software = _camera_attr_get_tag_softwarePtr - .asFunction>)>(); - - /// @brief Sets the geotag(GPS data) in the EXIF(Exchangeable image file format) tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] latitude The latitude data - /// @param[in] longitude The longitude data - /// @param[in] altitude The altitude data - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_get_geotag() - /// @see camera_attr_remove_geotag() - int camera_attr_set_geotag( - camera_h camera, - double latitude, - double longitude, - double altitude, - ) { - return _camera_attr_set_geotag( - camera, - latitude, - longitude, - altitude, - ); - } - - late final _camera_attr_set_geotagPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Double, ffi.Double, - ffi.Double)>>('camera_attr_set_geotag'); - late final _camera_attr_set_geotag = _camera_attr_set_geotagPtr - .asFunction(); - - /// @brief Gets the geotag(GPS data) in the EXIF(Exchangeable image file format) tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] latitude The latitude data - /// @param[out] longitude The longitude data - /// @param[out] altitude The altitude data - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_geotag() - /// @see camera_attr_remove_geotag() - int camera_attr_get_geotag( - camera_h camera, - ffi.Pointer latitude, - ffi.Pointer longitude, - ffi.Pointer altitude, - ) { - return _camera_attr_get_geotag( - camera, - latitude, - longitude, - altitude, - ); - } - - late final _camera_attr_get_geotagPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - camera_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('camera_attr_get_geotag'); - late final _camera_attr_get_geotag = _camera_attr_get_geotagPtr.asFunction< - int Function(camera_h, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Removes the geotag(GPS data) in the EXIF(Exchangeable image file format) tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_set_geotag() - /// @see camera_attr_get_geotag() - int camera_attr_remove_geotag( - camera_h camera, - ) { - return _camera_attr_remove_geotag( - camera, - ); - } - - late final _camera_attr_remove_geotagPtr = - _lookup>( - 'camera_attr_remove_geotag'); - late final _camera_attr_remove_geotag = - _camera_attr_remove_geotagPtr.asFunction(); - - /// @brief Sets the camera's flash mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, while setting the flash mode, if the flash was preempted by other APIs,\n - /// then this function returns #CAMERA_ERROR_DEVICE_BUSY error. - /// @param[in] camera The handle to the camera - /// @param[in] mode The flash mode - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @retval #CAMERA_ERROR_DEVICE_BUSY The flash was preempted by other API - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_foreach_supported_flash_mode() - /// @see camera_attr_get_flash_mode() - int camera_attr_set_flash_mode( - camera_h camera, - int mode, - ) { - return _camera_attr_set_flash_mode( - camera, - mode, - ); - } - - late final _camera_attr_set_flash_modePtr = - _lookup>( - 'camera_attr_set_flash_mode'); - late final _camera_attr_set_flash_mode = - _camera_attr_set_flash_modePtr.asFunction(); - - /// @brief Gets the camera's flash mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] mode The flash mode - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_foreach_supported_flash_mode() - /// @see camera_attr_set_flash_mode() - int camera_attr_get_flash_mode( - camera_h camera, - ffi.Pointer mode, - ) { - return _camera_attr_get_flash_mode( - camera, - mode, - ); - } - - late final _camera_attr_get_flash_modePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_get_flash_mode'); - late final _camera_attr_get_flash_mode = _camera_attr_get_flash_modePtr - .asFunction)>(); - - /// @brief Retrieves all supported flash modes by invoking the callback function once for each supported flash mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data passed to the callback registration function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_attr_supported_flash_mode_cb() to get all supported flash modes. - /// @see camera_attr_set_flash_mode() - /// @see camera_attr_get_flash_mode() - /// @see camera_attr_supported_flash_mode_cb() - int camera_attr_foreach_supported_flash_mode( - camera_h camera, - camera_attr_supported_flash_mode_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_foreach_supported_flash_mode( - camera, - callback, - user_data, - ); - } - - late final _camera_attr_foreach_supported_flash_modePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_attr_supported_flash_mode_cb, - ffi.Pointer)>>( - 'camera_attr_foreach_supported_flash_mode'); - late final _camera_attr_foreach_supported_flash_mode = - _camera_attr_foreach_supported_flash_modePtr.asFunction< - int Function(camera_h, camera_attr_supported_flash_mode_cb, - ffi.Pointer)>(); - - /// @brief Gets the camera len's orientation angle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] angle The orientation angle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_set_display_rotation() - int camera_attr_get_lens_orientation( - camera_h camera, - ffi.Pointer angle, - ) { - return _camera_attr_get_lens_orientation( - camera, - angle, - ); - } - - late final _camera_attr_get_lens_orientationPtr = _lookup< - ffi.NativeFunction)>>( - 'camera_attr_get_lens_orientation'); - late final _camera_attr_get_lens_orientation = - _camera_attr_get_lens_orientationPtr - .asFunction)>(); - - /// @brief Sets the stream rotation. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] rotation The stream rotation - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED. - /// @see camera_attr_get_stream_rotation() - int camera_attr_set_stream_rotation( - camera_h camera, - int rotation, - ) { - return _camera_attr_set_stream_rotation( - camera, - rotation, - ); - } - - late final _camera_attr_set_stream_rotationPtr = - _lookup>( - 'camera_attr_set_stream_rotation'); - late final _camera_attr_set_stream_rotation = - _camera_attr_set_stream_rotationPtr - .asFunction(); - - /// @brief Gets the stream rotation. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] rotation The stream rotation - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED. - /// @see camera_attr_set_stream_rotation() - int camera_attr_get_stream_rotation( - camera_h camera, - ffi.Pointer rotation, - ) { - return _camera_attr_get_stream_rotation( - camera, - rotation, - ); - } - - late final _camera_attr_get_stream_rotationPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_get_stream_rotation'); - late final _camera_attr_get_stream_rotation = - _camera_attr_get_stream_rotationPtr - .asFunction)>(); - - /// @brief Retrieves all supported stream rotation modes by invoking callback function once for each supported stream rotation mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_attr_supported_stream_rotation_cb() to get all supported stream rotation mode. - /// @see camera_attr_set_stream_rotation() - /// @see camera_attr_get_stream_rotation() - /// @see camera_attr_supported_stream_rotation_cb() - int camera_attr_foreach_supported_stream_rotation( - camera_h camera, - camera_attr_supported_stream_rotation_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_foreach_supported_stream_rotation( - camera, - callback, - user_data, - ); - } - - late final _camera_attr_foreach_supported_stream_rotationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - camera_h, - camera_attr_supported_stream_rotation_cb, - ffi.Pointer)>>( - 'camera_attr_foreach_supported_stream_rotation'); - late final _camera_attr_foreach_supported_stream_rotation = - _camera_attr_foreach_supported_stream_rotationPtr.asFunction< - int Function(camera_h, camera_attr_supported_stream_rotation_cb, - ffi.Pointer)>(); - - /// @brief Sets the stream flip. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] flip The stream flip - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED. - /// @see camera_attr_set_stream_rotation() - int camera_attr_set_stream_flip( - camera_h camera, - int flip, - ) { - return _camera_attr_set_stream_flip( - camera, - flip, - ); - } - - late final _camera_attr_set_stream_flipPtr = - _lookup>( - 'camera_attr_set_stream_flip'); - late final _camera_attr_set_stream_flip = - _camera_attr_set_stream_flipPtr.asFunction(); - - /// @brief Gets the stream flip. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] flip The stream flip - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED. - /// @see camera_attr_set_stream_rotation() - int camera_attr_get_stream_flip( - camera_h camera, - ffi.Pointer flip, - ) { - return _camera_attr_get_stream_flip( - camera, - flip, - ); - } - - late final _camera_attr_get_stream_flipPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_get_stream_flip'); - late final _camera_attr_get_stream_flip = _camera_attr_get_stream_flipPtr - .asFunction)>(); - - /// @brief Retrieves all supported stream flip modes by invoking callback function once for each supported stream flip mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_attr_supported_stream_flip_cb() to get all supported stream flip mode. - /// @see camera_attr_set_stream_flip() - /// @see camera_attr_get_stream_flip() - /// @see camera_attr_supported_stream_flip_cb() - int camera_attr_foreach_supported_stream_flip( - camera_h camera, - camera_attr_supported_stream_flip_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_foreach_supported_stream_flip( - camera, - callback, - user_data, - ); - } - - late final _camera_attr_foreach_supported_stream_flipPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_attr_supported_stream_flip_cb, - ffi.Pointer)>>( - 'camera_attr_foreach_supported_stream_flip'); - late final _camera_attr_foreach_supported_stream_flip = - _camera_attr_foreach_supported_stream_flipPtr.asFunction< - int Function(camera_h, camera_attr_supported_stream_flip_cb, - ffi.Pointer)>(); - - /// @brief Sets the mode of HDR(High dynamic range) capture. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks Taking multiple pictures at different exposure levels and intelligently stitching them together so that we eventually arrive at a picture that is representative in both dark and bright areas.\n - /// If this attribute is set to @c true. camera_attr_hdr_progress_cb() is invoked during capture.\n - /// If you set #CAMERA_ATTR_HDR_MODE_KEEP_ORIGINAL, the capturing callback is invoked twice. The first callback is delivering origin image data. The second callback is delivering improved image data. - /// @param[in] camera The handle to the camera - /// @param[in] mode The mode of HDR capture - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_get_hdr_mode() - /// @see camera_attr_set_hdr_capture_progress_cb() - /// @see camera_attr_unset_hdr_capture_progress_cb() - /// @see camera_attr_is_supported_hdr_capture() - int camera_attr_set_hdr_mode( - camera_h camera, - int mode, - ) { - return _camera_attr_set_hdr_mode( - camera, - mode, - ); - } - - late final _camera_attr_set_hdr_modePtr = - _lookup>( - 'camera_attr_set_hdr_mode'); - late final _camera_attr_set_hdr_mode = - _camera_attr_set_hdr_modePtr.asFunction(); - - /// @brief Gets the mode of HDR(High dynamic range) capture. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] mode The mode of HDR capture - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_hdr_mode() - /// @see camera_attr_set_hdr_capture_progress_cb() - /// @see camera_attr_unset_hdr_capture_progress_cb() - /// @see camera_attr_is_supported_hdr_capture() - int camera_attr_get_hdr_mode( - camera_h camera, - ffi.Pointer mode, - ) { - return _camera_attr_get_hdr_mode( - camera, - mode, - ); - } - - late final _camera_attr_get_hdr_modePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_get_hdr_mode'); - late final _camera_attr_get_hdr_mode = _camera_attr_get_hdr_modePtr - .asFunction)>(); - - /// @brief Registers a callback function to be called when HDR capture is progressing. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This callback notifies progress of the HDR process. - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data passed to the callback registration function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_hdr_mode() - /// @see camera_attr_get_hdr_mode() - /// @see camera_attr_unset_hdr_capture_progress_cb() - /// @see camera_attr_is_supported_hdr_capture() - int camera_attr_set_hdr_capture_progress_cb( - camera_h camera, - camera_attr_hdr_progress_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_set_hdr_capture_progress_cb( - camera, - callback, - user_data, - ); - } - - late final _camera_attr_set_hdr_capture_progress_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_attr_hdr_progress_cb, - ffi.Pointer)>>( - 'camera_attr_set_hdr_capture_progress_cb'); - late final _camera_attr_set_hdr_capture_progress_cb = - _camera_attr_set_hdr_capture_progress_cbPtr.asFunction< - int Function( - camera_h, camera_attr_hdr_progress_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_hdr_mode() - /// @see camera_attr_get_hdr_mode() - /// @see camera_attr_set_hdr_capture_progress_cb() - /// @see camera_attr_is_supported_hdr_capture() - int camera_attr_unset_hdr_capture_progress_cb( - camera_h camera, - ) { - return _camera_attr_unset_hdr_capture_progress_cb( - camera, - ); - } - - late final _camera_attr_unset_hdr_capture_progress_cbPtr = - _lookup>( - 'camera_attr_unset_hdr_capture_progress_cb'); - late final _camera_attr_unset_hdr_capture_progress_cb = - _camera_attr_unset_hdr_capture_progress_cbPtr - .asFunction(); - - /// @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE - /// @brief Gets the support state of HDR capture. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] camera The handle to the camera - /// @return @c true if supported, otherwise @c false - /// @exception #CAMERA_ERROR_NONE Successful - /// @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @see camera_attr_set_hdr_mode() - /// @see camera_attr_get_hdr_mode() - /// @see camera_attr_set_hdr_capture_progress_cb() - /// @see camera_attr_unset_hdr_capture_progress_cb() - bool camera_attr_is_supported_hdr_capture( - camera_h camera, - ) { - return _camera_attr_is_supported_hdr_capture( - camera, - ); - } - - late final _camera_attr_is_supported_hdr_capturePtr = - _lookup>( - 'camera_attr_is_supported_hdr_capture'); - late final _camera_attr_is_supported_hdr_capture = - _camera_attr_is_supported_hdr_capturePtr - .asFunction(); - - /// @brief Enables/Disables the anti-shake feature. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This feature is used for image capture. - /// @param[in] camera The handle to the camera - /// @param[in] enable If @c true the anti-shake feature is enabled, otherwise @c false - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_is_enabled_anti_shake() - /// @see camera_attr_is_supported_anti_shake() - int camera_attr_enable_anti_shake( - camera_h camera, - bool enable, - ) { - return _camera_attr_enable_anti_shake( - camera, - enable, - ); - } - - late final _camera_attr_enable_anti_shakePtr = - _lookup>( - 'camera_attr_enable_anti_shake'); - late final _camera_attr_enable_anti_shake = _camera_attr_enable_anti_shakePtr - .asFunction(); - - /// @brief Gets the state of the anti-shake feature. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] enabled The state of anti-shake - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_enable_anti_shake() - /// @see camera_attr_is_supported_anti_shake() - int camera_attr_is_enabled_anti_shake( - camera_h camera, - ffi.Pointer enabled, - ) { - return _camera_attr_is_enabled_anti_shake( - camera, - enabled, - ); - } - - late final _camera_attr_is_enabled_anti_shakePtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_is_enabled_anti_shake'); - late final _camera_attr_is_enabled_anti_shake = - _camera_attr_is_enabled_anti_shakePtr - .asFunction)>(); - - /// @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE - /// @brief Gets the support state of the anti-shake feature. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] camera The handle to the camera - /// @return @c true if supported, otherwise @c false - /// @exception #CAMERA_ERROR_NONE Successful - /// @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @see camera_attr_enable_anti_shake() - /// @see camera_attr_is_enabled_anti_shake() - bool camera_attr_is_supported_anti_shake( - camera_h camera, - ) { - return _camera_attr_is_supported_anti_shake( - camera, - ); - } - - late final _camera_attr_is_supported_anti_shakePtr = - _lookup>( - 'camera_attr_is_supported_anti_shake'); - late final _camera_attr_is_supported_anti_shake = - _camera_attr_is_supported_anti_shakePtr - .asFunction(); - - /// @brief Enables/Disables the video stabilization feature. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If video stabilization is enabled, zero shutter lag is disabled.\n - /// This feature is used to record a video. - /// @param[in] camera The handle to the camera - /// @param[in] enable If @c true video stabilization is enabled, otherwise @c false - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_is_enabled_video_stabilization() - /// @see camera_attr_is_supported_video_stabilization() - int camera_attr_enable_video_stabilization( - camera_h camera, - bool enable, - ) { - return _camera_attr_enable_video_stabilization( - camera, - enable, - ); - } - - late final _camera_attr_enable_video_stabilizationPtr = - _lookup>( - 'camera_attr_enable_video_stabilization'); - late final _camera_attr_enable_video_stabilization = - _camera_attr_enable_video_stabilizationPtr - .asFunction(); - - /// @brief Gets the state of the video stabilization feature. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] enabled The state of video stabilization - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_enable_video_stabilization() - /// @see camera_attr_is_supported_video_stabilization() - int camera_attr_is_enabled_video_stabilization( - camera_h camera, - ffi.Pointer enabled, - ) { - return _camera_attr_is_enabled_video_stabilization( - camera, - enabled, - ); - } - - late final _camera_attr_is_enabled_video_stabilizationPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_is_enabled_video_stabilization'); - late final _camera_attr_is_enabled_video_stabilization = - _camera_attr_is_enabled_video_stabilizationPtr - .asFunction)>(); - - /// @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE - /// @brief Gets the support state of the video stabilization feature. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] camera The handle to the camera - /// @return @c true if supported, otherwise @c false - /// @exception #CAMERA_ERROR_NONE Successful - /// @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @see camera_attr_enable_video_stabilization() - /// @see camera_attr_is_enabled_video_stabilization() - bool camera_attr_is_supported_video_stabilization( - camera_h camera, - ) { - return _camera_attr_is_supported_video_stabilization( - camera, - ); - } - - late final _camera_attr_is_supported_video_stabilizationPtr = - _lookup>( - 'camera_attr_is_supported_video_stabilization'); - late final _camera_attr_is_supported_video_stabilization = - _camera_attr_is_supported_video_stabilizationPtr - .asFunction(); - - /// @brief Enables/Disables auto contrast. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[in] enable If @c true auto contrast is enabled, otherwise @c false - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW. - /// @see camera_attr_is_enabled_auto_contrast() - int camera_attr_enable_auto_contrast( - camera_h camera, - bool enable, - ) { - return _camera_attr_enable_auto_contrast( - camera, - enable, - ); - } - - late final _camera_attr_enable_auto_contrastPtr = - _lookup>( - 'camera_attr_enable_auto_contrast'); - late final _camera_attr_enable_auto_contrast = - _camera_attr_enable_auto_contrastPtr - .asFunction(); - - /// @brief Gets the state of auto contrast. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] camera The handle to the camera - /// @param[out] enabled The state of auto contrast - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_enable_auto_contrast() - int camera_attr_is_enabled_auto_contrast( - camera_h camera, - ffi.Pointer enabled, - ) { - return _camera_attr_is_enabled_auto_contrast( - camera, - enabled, - ); - } - - late final _camera_attr_is_enabled_auto_contrastPtr = _lookup< - ffi - .NativeFunction)>>( - 'camera_attr_is_enabled_auto_contrast'); - late final _camera_attr_is_enabled_auto_contrast = - _camera_attr_is_enabled_auto_contrastPtr - .asFunction)>(); - - /// @brief Gets state of support of auto contrast feature. - /// @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] camera The handle to the camera - /// @return true on supported, otherwise false - /// @exception #CAMERA_ERROR_NONE Successful - /// @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @see camera_attr_enable_auto_contrast() - /// @see camera_attr_is_enabled_auto_contrast() - bool camera_attr_is_supported_auto_contrast( - camera_h camera, - ) { - return _camera_attr_is_supported_auto_contrast( - camera, - ); - } - - late final _camera_attr_is_supported_auto_contrastPtr = - _lookup>( - 'camera_attr_is_supported_auto_contrast'); - late final _camera_attr_is_supported_auto_contrast = - _camera_attr_is_supported_auto_contrastPtr - .asFunction(); - - /// @brief Disables shutter sound. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks In some countries, this operation is not permitted. - /// @param[in] camera The handle to the camera - /// @param[in] disable If @c true shutter sound is disabled, otherwise @c false - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_OPERATION Disabling shutter sound is not permitted - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - int camera_attr_disable_shutter_sound( - camera_h camera, - bool disable, - ) { - return _camera_attr_disable_shutter_sound( - camera, - disable, - ); - } - - late final _camera_attr_disable_shutter_soundPtr = - _lookup>( - 'camera_attr_disable_shutter_sound'); - late final _camera_attr_disable_shutter_sound = - _camera_attr_disable_shutter_soundPtr - .asFunction(); - - /// @brief Sets the position to move horizontally. - /// @since_tizen 3.0 - /// @param[in] camera The handle to the camera - /// @param[in] move_type The PTZ(Pan Tilt Zoom) move type - /// @param[in] pan_step The step to move the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_PREVIEW. - /// @see camera_attr_get_pan() - /// @see camera_attr_get_pan_range() - int camera_attr_set_pan( - camera_h camera, - int move_type, - int pan_step, - ) { - return _camera_attr_set_pan( - camera, - move_type, - pan_step, - ); - } - - late final _camera_attr_set_panPtr = _lookup< - ffi.NativeFunction>( - 'camera_attr_set_pan'); - late final _camera_attr_set_pan = - _camera_attr_set_panPtr.asFunction(); - - /// @brief Gets the current position of the camera. - /// @since_tizen 3.0 - /// @param[in] camera The handle to the camera - /// @param[out] pan_step The current horizontal distance from the starting point. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_pan() - /// @see camera_attr_get_pan_range() - int camera_attr_get_pan( - camera_h camera, - ffi.Pointer pan_step, - ) { - return _camera_attr_get_pan( - camera, - pan_step, - ); - } - - late final _camera_attr_get_panPtr = _lookup< - ffi.NativeFunction)>>( - 'camera_attr_get_pan'); - late final _camera_attr_get_pan = _camera_attr_get_panPtr - .asFunction)>(); - - /// @brief Gets lower limit and upper limit for pan position. - /// @since_tizen 3.0 - /// @remarks If the min value is greater than the max value, it means that this feature is not supported. - /// @param[in] camera The handle to the camera - /// @param[out] min The lower limit for pan - /// @param[out] max The upper limit for pan - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_pan() - /// @see camera_attr_get_pan() - int camera_attr_get_pan_range( - camera_h camera, - ffi.Pointer min, - ffi.Pointer max, - ) { - return _camera_attr_get_pan_range( - camera, - min, - max, - ); - } - - late final _camera_attr_get_pan_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Pointer, - ffi.Pointer)>>('camera_attr_get_pan_range'); - late final _camera_attr_get_pan_range = - _camera_attr_get_pan_rangePtr.asFunction< - int Function(camera_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the position to move vertically. - /// @since_tizen 3.0 - /// @param[in] camera The handle to the camera - /// @param[in] move_type The PTZ(Pan Tilt Zoom) move type - /// @param[in] tilt_step The step to move the camera - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_PREVIEW. - /// @see camera_attr_get_tilt() - /// @see camera_attr_get_tilt_range() - int camera_attr_set_tilt( - camera_h camera, - int move_type, - int tilt_step, - ) { - return _camera_attr_set_tilt( - camera, - move_type, - tilt_step, - ); - } - - late final _camera_attr_set_tiltPtr = _lookup< - ffi.NativeFunction>( - 'camera_attr_set_tilt'); - late final _camera_attr_set_tilt = - _camera_attr_set_tiltPtr.asFunction(); - - /// @brief Gets the current position of the camera. - /// @since_tizen 3.0 - /// @param[in] camera The handle to the camera - /// @param[out] tilt_step The current vertical distance from the starting point. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_tilt() - /// @see camera_attr_get_tilt_range() - int camera_attr_get_tilt( - camera_h camera, - ffi.Pointer tilt_step, - ) { - return _camera_attr_get_tilt( - camera, - tilt_step, - ); - } - - late final _camera_attr_get_tiltPtr = _lookup< - ffi.NativeFunction)>>( - 'camera_attr_get_tilt'); - late final _camera_attr_get_tilt = _camera_attr_get_tiltPtr - .asFunction)>(); - - /// @brief Gets lower limit and upper limit for tilt position. - /// @since_tizen 3.0 - /// @remarks If the min value is greater than the max value, it means that this feature is not supported. - /// @param[in] camera The handle to the camera - /// @param[out] min The lower limit for tilt - /// @param[out] max The upper limit for tilt - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_tilt() - /// @see camera_attr_get_tilt() - int camera_attr_get_tilt_range( - camera_h camera, - ffi.Pointer min, - ffi.Pointer max, - ) { - return _camera_attr_get_tilt_range( - camera, - min, - max, - ); - } - - late final _camera_attr_get_tilt_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Pointer, - ffi.Pointer)>>('camera_attr_get_tilt_range'); - late final _camera_attr_get_tilt_range = - _camera_attr_get_tilt_rangePtr.asFunction< - int Function(camera_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the type of PTZ(Pan Tilt Zoom). - /// @since_tizen 3.0 - /// @param[in] camera The handle to the camera - /// @param[in] ptz_type PTZ type - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_INVALID_STATE Invalid state - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The camera state must be set to #CAMERA_STATE_PREVIEW. - /// @see camera_attr_get_pan() - /// @see camera_attr_set_pan() - /// @see camera_attr_get_pan_range() - /// @see camera_attr_get_tilt() - /// @see camera_attr_set_tilt() - /// @see camera_attr_get_tilt_range() - /// @see camera_attr_foreach_supported_ptz_type() - int camera_attr_set_ptz_type( - camera_h camera, - int ptz_type, - ) { - return _camera_attr_set_ptz_type( - camera, - ptz_type, - ); - } - - late final _camera_attr_set_ptz_typePtr = - _lookup>( - 'camera_attr_set_ptz_type'); - late final _camera_attr_set_ptz_type = - _camera_attr_set_ptz_typePtr.asFunction(); - - /// @brief Retrieves all supported PTZ(Pan Tilt Zoom) types by invoking callback function once for each supported ptz type. - /// @since_tizen 3.0 - /// @param[in] camera The handle to the camera - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes camera_attr_supported_ptz_type_cb() to get all supported ptz type. - /// @see camera_attr_set_ptz_type() - int camera_attr_foreach_supported_ptz_type( - camera_h camera, - camera_attr_supported_ptz_type_cb callback, - ffi.Pointer user_data, - ) { - return _camera_attr_foreach_supported_ptz_type( - camera, - callback, - user_data, - ); - } - - late final _camera_attr_foreach_supported_ptz_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, camera_attr_supported_ptz_type_cb, - ffi.Pointer)>>( - 'camera_attr_foreach_supported_ptz_type'); - late final _camera_attr_foreach_supported_ptz_type = - _camera_attr_foreach_supported_ptz_typePtr.asFunction< - int Function(camera_h, camera_attr_supported_ptz_type_cb, - ffi.Pointer)>(); - - /// @brief Sets the ROI(Region Of Interest) area of display. - /// @since_tizen 3.0 - /// @remarks If no display is set, no operation is performed and - /// the ROI area is valid only in #CAMERA_DISPLAY_MODE_CUSTOM_ROI display mode. - /// @remarks The minimum value of width and height are 1. - /// @remarks ROI area can be set before setting ROI display mode. (since 4.0) - /// @param[in] camera The handle to the camera - /// @param[in] x X coordinate of area - /// @param[in] y Y coordinate of area - /// @param[in] width Width of area - /// @param[in] height Height of area - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_get_display_roi_area() - int camera_attr_set_display_roi_area( - camera_h camera, - int x, - int y, - int width, - int height, - ) { - return _camera_attr_set_display_roi_area( - camera, - x, - y, - width, - height, - ); - } - - late final _camera_attr_set_display_roi_areaPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(camera_h, ffi.Int, ffi.Int, ffi.Int, - ffi.Int)>>('camera_attr_set_display_roi_area'); - late final _camera_attr_set_display_roi_area = - _camera_attr_set_display_roi_areaPtr - .asFunction(); - - /// @brief Gets the ROI(Region Of Interest) area of display. - /// @since_tizen 3.0 - /// @param[in] camera The handle to the camera - /// @param[out] x X coordinate of area - /// @param[out] y Y coordinate of area - /// @param[out] width Width of area - /// @param[out] height Height of area - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CAMERA_ERROR_NONE Successful - /// @retval #CAMERA_ERROR_INVALID_OPERATION Internal error - /// @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see camera_attr_set_display_roi_area() - int camera_attr_get_display_roi_area( - camera_h camera, - ffi.Pointer x, - ffi.Pointer y, - ffi.Pointer width, - ffi.Pointer height, - ) { - return _camera_attr_get_display_roi_area( - camera, - x, - y, - width, - height, - ); - } - - late final _camera_attr_get_display_roi_areaPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - camera_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('camera_attr_get_display_roi_area'); - late final _camera_attr_get_display_roi_area = - _camera_attr_get_display_roi_areaPtr.asFunction< - int Function(camera_h, ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Creates a handle to image util decoding. - /// @details This function creates a handle to image util decoding. - /// @since_tizen 3.0 - /// - /// @remarks The @a handle should be released using image_util_decode_destroy(). - /// - /// @param[out] handle A handle to image util decoding - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see image_util_decode_destroy() - int image_util_decode_create( - ffi.Pointer handle, - ) { - return _image_util_decode_create( - handle, - ); - } - - late final _image_util_decode_createPtr = _lookup< - ffi - .NativeFunction)>>( - 'image_util_decode_create'); - late final _image_util_decode_create = _image_util_decode_createPtr - .asFunction)>(); - - /// @brief Sets the input file path from which to decode. - /// @since_tizen 3.0 - /// - /// @remarks One of image_util_decode_set_input_path() or image_util_decode_set_input_buffer() should be set.\n - /// If both are set then the latest input set, is considered.\n - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage.\n - /// Finds out image type by reading the header of the image provided in input path. - /// - /// @param[in] handle The handle to image util decoding - /// @param[in] path The path to input image - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_NO_SUCH_FILE No such file - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// @retval #IMAGE_UTIL_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IMAGE_UTIL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT Format not supported - /// - /// @pre image_util_decode_create() - /// - /// @post image_util_decode_run() / image_util_decode_run_async() - /// @post image_util_decode_destroy() - /// - /// @see image_util_decode_create() - /// @see image_util_decode_set_output_buffer() - /// @see image_util_decode_run() - /// @see image_util_decode_run_async() - /// @see image_util_decode_destroy() - int image_util_decode_set_input_path( - image_util_decode_h handle, - ffi.Pointer path, - ) { - return _image_util_decode_set_input_path( - handle, - path, - ); - } - - late final _image_util_decode_set_input_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(image_util_decode_h, - ffi.Pointer)>>('image_util_decode_set_input_path'); - late final _image_util_decode_set_input_path = - _image_util_decode_set_input_pathPtr.asFunction< - int Function(image_util_decode_h, ffi.Pointer)>(); - - /// @brief Sets the input buffer from which to decode. - /// @since_tizen 3.0 - /// - /// @remarks One of image_util_decode_set_input_path() or image_util_decode_set_input_buffer() should be set.\n - /// If both are set then the latest input set, is considered.\n - /// Finds out image type by reading the header of the image provided in input buffer. - /// - /// @param[in] handle The handle to image util decoding - /// @param[in] src_buffer The input image buffer - /// @param[in] src_size The input image buffer size - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// @retval #IMAGE_UTIL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT Format not supported - /// - /// @pre image_util_decode_create() - /// - /// @post image_util_decode_run() / image_util_decode_run_async() - /// @post image_util_decode_destroy() - /// - /// @see image_util_decode_create() - /// @see image_util_decode_set_output_buffer() - /// @see image_util_decode_run() - /// @see image_util_decode_run_async() - /// @see image_util_decode_destroy() - int image_util_decode_set_input_buffer( - image_util_decode_h handle, - ffi.Pointer src_buffer, - int src_size, - ) { - return _image_util_decode_set_input_buffer( - handle, - src_buffer, - src_size, - ); - } - - late final _image_util_decode_set_input_bufferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(image_util_decode_h, ffi.Pointer, - ffi.UnsignedLongLong)>>('image_util_decode_set_input_buffer'); - late final _image_util_decode_set_input_buffer = - _image_util_decode_set_input_bufferPtr.asFunction< - int Function( - image_util_decode_h, ffi.Pointer, int)>(); - - /// @brief Sets the output buffer to which the decoded buffer will be written to. - /// @since_tizen 3.0 - /// - /// @remarks Either image_util_decode_set_input_path() or image_util_decode_set_input_buffer() should be set.\n - /// By default the decoded output buffer colorspace will be IMAGE_UTIL_COLORSPACE_RGBA8888. - /// Use image_util_decode_set_colorspace to change the colorspace. - /// @a dst_buffer should be released after @c image_util_decode_run() or @c image_util_decode_run_async(). - /// - /// @param[in] handle The handle to image util decoding - /// @param[in] dst_buffer The decoded output buffer - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre image_util_decode_create() - /// - /// @post image_util_decode_run() / image_util_decode_run_async() - /// @post image_util_decode_destroy() - /// - /// @see image_util_decode_create() - /// @see image_util_decode_set_input_path() - /// @see image_util_decode_set_input_buffer() - /// @see image_util_decode_run() - /// @see image_util_decode_run_async() - /// @see image_util_decode_destroy() - int image_util_decode_set_output_buffer( - image_util_decode_h handle, - ffi.Pointer> dst_buffer, - ) { - return _image_util_decode_set_output_buffer( - handle, - dst_buffer, - ); - } - - late final _image_util_decode_set_output_bufferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(image_util_decode_h, - ffi.Pointer>)>>( - 'image_util_decode_set_output_buffer'); - late final _image_util_decode_set_output_buffer = - _image_util_decode_set_output_bufferPtr.asFunction< - int Function(image_util_decode_h, - ffi.Pointer>)>(); - - /// @brief Sets the decoded image colorspace format. - /// @since_tizen 3.0 - /// - /// @remarks The default colorspace is IMAGE_UTIL_COLORSPACE_RGBA8888.\n - /// Use image_util_foreach_supported_colorspace to get supported colorspaces for each image format.\n - /// Errors would be returned if not supported. - /// - /// @param[in] handle The handle to image util decoding - /// @param[in] colorspace The decoded image colorspace - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT Format not supported - /// - /// @pre image_util_decode_create() - /// @pre image_util_decode_set_input_path() / image_util_decode_set_input_buffer() - /// - /// @post image_util_decode_run() / image_util_decode_run_async() - /// @post image_util_decode_destroy() - /// - /// @see image_util_supported_colorspace_cb() - /// @see image_util_foreach_supported_colorspace() - /// @see image_util_decode_create() - /// @see image_util_decode_set_input_path() - /// @see image_util_decode_set_input_buffer() - /// @see image_util_decode_set_output_buffer() - /// @see image_util_decode_run() - /// @see image_util_decode_run_async() - /// @see image_util_decode_destroy() - int image_util_decode_set_colorspace( - image_util_encode_h handle, - int colorspace, - ) { - return _image_util_decode_set_colorspace( - handle, - colorspace, - ); - } - - late final _image_util_decode_set_colorspacePtr = _lookup< - ffi.NativeFunction>( - 'image_util_decode_set_colorspace'); - late final _image_util_decode_set_colorspace = - _image_util_decode_set_colorspacePtr - .asFunction(); - - /// @brief Sets the downscale value at which JPEG image should be decoded. - /// @since_tizen 3.0 - /// - /// @remarks This is API is supported only for JPEG decoding. - /// - /// @param[in] handle The handle to image util decoding - /// @param[in] down_scale The downscale at which image is to be decoded - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT Format not supported - /// - /// @pre image_util_decode_create() - /// @pre image_util_decode_set_input_path() / image_util_decode_set_input_buffer() - /// - /// @post image_util_decode_run() / image_util_decode_run_async() - /// @post image_util_decode_destroy() - /// - /// @see image_util_decode_create() - /// @see image_util_decode_set_input_path() - /// @see image_util_decode_set_input_buffer() - /// @see image_util_decode_set_output_buffer() - /// @see image_util_decode_run() - /// @see image_util_decode_run_async() - /// @see image_util_decode_destroy() - int image_util_decode_set_jpeg_downscale( - image_util_encode_h handle, - int down_scale, - ) { - return _image_util_decode_set_jpeg_downscale( - handle, - down_scale, - ); - } - - late final _image_util_decode_set_jpeg_downscalePtr = _lookup< - ffi.NativeFunction>( - 'image_util_decode_set_jpeg_downscale'); - late final _image_util_decode_set_jpeg_downscale = - _image_util_decode_set_jpeg_downscalePtr - .asFunction(); - - /// @brief Starts decoding of the image and fills the output buffer set using image_util_decode_set_output_buffer(). - /// @since_tizen 3.0 - /// - /// @remarks The output will be stored in the pointer set using image_util_decode_set_output_buffer().\n - /// The function executes synchronously.\n - /// When any of the @pre functions are not called, IMAGE_UTIL_ERROR_INVALID_PARAMETER is returned. - /// - /// @param[in] handle The handle to image util decoding - /// @param[out] width Width of the decoded image - /// @param[out] height Height of the decoded image - /// @param[out] size Size of the decoded image - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre image_util_decode_create() - /// @pre image_util_decode_set_input_buffer() / image_util_decode_set_input_path(). - /// @pre image_util_decode_set_output_buffer() - /// - /// @post image_util_decode_destroy() - /// - /// @see image_util_decode_create() - /// @see image_util_decode_set_input_path() - /// @see image_util_decode_set_input_buffer() - /// @see image_util_decode_set_output_buffer() - /// @see image_util_decode_destroy() - int image_util_decode_run( - image_util_decode_h handle, - ffi.Pointer width, - ffi.Pointer height, - ffi.Pointer size, - ) { - return _image_util_decode_run( - handle, - width, - height, - size, - ); - } - - late final _image_util_decode_runPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - image_util_decode_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('image_util_decode_run'); - late final _image_util_decode_run = _image_util_decode_runPtr.asFunction< - int Function(image_util_decode_h, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Starts decoding of the image and fills the output buffer set using image_util_decode_set_output_buffer(). - /// @since_tizen 3.0 - /// - /// @remarks The output will be stored in the pointer set using image_util_decode_set_output_buffer().\n - /// The function executes asynchronously, which contains complete callback.\n - /// When any of the @pre functions are not called, IMAGE_UTIL_ERROR_INVALID_PARAMETER is returned. - /// - /// @param[in] handle The handle to image util decoding - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre image_util_decode_create() - /// @pre image_util_decode_set_input_buffer() / image_util_decode_set_input_path(). - /// @pre image_util_decode_set_output_buffer() - /// - /// @post image_util_decode_destroy() - /// - /// @see image_util_decode_create() - /// @see image_util_decode_set_input_path() - /// @see image_util_decode_set_input_buffer() - /// @see image_util_decode_set_output_buffer() - /// @see image_util_decode_destroy() - int image_util_decode_run_async( - image_util_decode_h handle, - image_util_decode_completed_cb callback, - ffi.Pointer user_data, - ) { - return _image_util_decode_run_async( - handle, - callback, - user_data, - ); - } - - late final _image_util_decode_run_asyncPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(image_util_decode_h, image_util_decode_completed_cb, - ffi.Pointer)>>('image_util_decode_run_async'); - late final _image_util_decode_run_async = - _image_util_decode_run_asyncPtr.asFunction< - int Function(image_util_decode_h, image_util_decode_completed_cb, - ffi.Pointer)>(); - - /// @brief Destroys the image decoding handle. - /// @since_tizen 3.0 - /// - /// @remarks Any image handle created should be destroyed. - /// - /// @param[in] handle The handle to image util decoding - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre image_util_decode_create() - /// - /// @see image_util_decode_create() - int image_util_decode_destroy( - image_util_decode_h handle, - ) { - return _image_util_decode_destroy( - handle, - ); - } - - late final _image_util_decode_destroyPtr = - _lookup>( - 'image_util_decode_destroy'); - late final _image_util_decode_destroy = _image_util_decode_destroyPtr - .asFunction(); - - /// @brief Creates a handle to image util encoding. - /// @details This function creates a handle to image util encoding. - /// @since_tizen 3.0 - /// - /// @remarks The @a handle should be released using image_util_encode_destroy(). - /// - /// @param[in] image_type The type of output image for which to create encode handle. - /// @param[out] handle A handle to image util encoding - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see image_util_encode_destroy() - int image_util_encode_create( - int image_type, - ffi.Pointer handle, - ) { - return _image_util_encode_create( - image_type, - handle, - ); - } - - late final _image_util_encode_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, - ffi.Pointer)>>('image_util_encode_create'); - late final _image_util_encode_create = _image_util_encode_createPtr - .asFunction)>(); - - /// @brief Sets the resolution of the encoded image. - /// @since_tizen 3.0 - /// - /// @remarks This should be called before calling image_util_encode_run().\n - /// While encoding animated gif image, resolution should be set for each frame. - /// - /// @param[in] handle The handle to image util encoding - /// @param[in] width Width of the original image - /// @param[in] height Height of the original image - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre image_util_encode_create() - /// - /// @post image_util_encode_run() / image_util_encode_run_async() - /// @post image_util_encode_destroy() - /// - /// @see image_util_encode_create() - /// @see image_util_encode_set_input_buffer() - /// @see image_util_encode_set_output_path() - /// @see image_util_encode_set_output_buffer() - /// @see image_util_encode_run() - /// @see image_util_encode_run_async() - /// @see image_util_encode_destroy() - int image_util_encode_set_resolution( - image_util_encode_h handle, - int width, - int height, - ) { - return _image_util_encode_set_resolution( - handle, - width, - height, - ); - } - - late final _image_util_encode_set_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(image_util_encode_h, ffi.UnsignedLong, - ffi.UnsignedLong)>>('image_util_encode_set_resolution'); - late final _image_util_encode_set_resolution = - _image_util_encode_set_resolutionPtr - .asFunction(); - - /// @brief Sets the colorspace format for image encoding. - /// @since_tizen 3.0 - /// - /// @remarks The default colorspace is IMAGE_UTIL_COLORSPACE_RGBA8888.\n - /// Use image_util_foreach_supported_colorspace to get supported colorspaces for each image format.\n - /// Errors would be returned if not supported. - /// - /// @param[in] handle The handle to image util encoding - /// @param[in] colorspace The colorspace of the input image to encode - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT Format not supported - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre image_util_encode_create() - /// - /// @post image_util_encode_run() / image_util_encode_run_async() - /// @post image_util_encode_destroy() - /// - /// @see image_util_supported_colorspace_cb() - /// @see image_util_foreach_supported_colorspace() - /// @see image_util_encode_create() - /// @see image_util_encode_set_resolution() - /// @see image_util_encode_set_input_buffer() - /// @see image_util_encode_set_output_path() - /// @see image_util_encode_set_output_buffer() - /// @see image_util_encode_run() - /// @see image_util_encode_run_async() - /// @see image_util_encode_destroy() - int image_util_encode_set_colorspace( - image_util_encode_h handle, - int colorspace, - ) { - return _image_util_encode_set_colorspace( - handle, - colorspace, - ); - } - - late final _image_util_encode_set_colorspacePtr = _lookup< - ffi.NativeFunction>( - 'image_util_encode_set_colorspace'); - late final _image_util_encode_set_colorspace = - _image_util_encode_set_colorspacePtr - .asFunction(); - - /// @brief Sets the quality for image encoding. - /// @since_tizen 3.0 - /// - /// @remarks If application does not set this, then by default quality of 75 is set.\n - /// Quality is supported for JPEG format. IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT will be returned for other formats. - /// - /// @param[in] handle The handle to image util encoding - /// @param[in] quality Encoding quality from 1~100 - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT Format not supported - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre image_util_encode_create() - /// - /// @post image_util_encode_run() / image_util_encode_run_async() - /// @post image_util_encode_destroy() - /// - /// @see image_util_encode_create() - /// @see image_util_encode_set_resolution() - /// @see image_util_encode_set_input_buffer() - /// @see image_util_encode_set_output_path() - /// @see image_util_encode_set_output_buffer() - /// @see image_util_encode_run() - /// @see image_util_encode_run_async() - /// @see image_util_encode_destroy() - int image_util_encode_set_quality( - image_util_encode_h handle, - int quality, - ) { - return _image_util_encode_set_quality( - handle, - quality, - ); - } - - late final _image_util_encode_set_qualityPtr = _lookup< - ffi.NativeFunction>( - 'image_util_encode_set_quality'); - late final _image_util_encode_set_quality = _image_util_encode_set_qualityPtr - .asFunction(); - - /// @brief Sets the compression value of png image encoding(0~9). - /// @since_tizen 3.0 - /// - /// @remarks If application does not set this, then default compression of 6 is set. - /// - /// @param[in] handle The handle to image util encoding - /// @param[in] compression The compression value valid from 0~9 - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT Format not supported - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre image_util_encode_create() - /// - /// @post image_util_encode_run() / image_util_encode_run_async() - /// @post image_util_encode_destroy() - /// - /// @see image_util_encode_create() - /// @see image_util_encode_set_resolution() - /// @see image_util_encode_set_input_buffer() - /// @see image_util_encode_set_output_path() - /// @see image_util_encode_set_output_buffer() - /// @see image_util_encode_run() - /// @see image_util_encode_run_async() - /// @see image_util_encode_destroy() - int image_util_encode_set_png_compression( - image_util_encode_h handle, - int compression, - ) { - return _image_util_encode_set_png_compression( - handle, - compression, - ); - } - - late final _image_util_encode_set_png_compressionPtr = _lookup< - ffi.NativeFunction>( - 'image_util_encode_set_png_compression'); - late final _image_util_encode_set_png_compression = - _image_util_encode_set_png_compressionPtr - .asFunction(); - - /// @brief Sets the time delay between each frame in the encoded animated gif image. - /// @since_tizen 3.0 - /// - /// @remarks In case animated gif image if this is not set then there will be no delay between each frame.\n - /// This should be set for each frame in the animated gif image.\n - /// This can be set a different value for each frame, which results in different delay time between different frames. - /// - /// @param[in] handle The handle to image util encoding - /// @param[in] delay_time Time delay between each frame in the encoded image, in 0.01sec units. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT Format not supported - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre image_util_encode_create() - /// - /// @post image_util_encode_run() / image_util_encode_run_async() - /// @post image_util_encode_destroy() - /// - /// @see image_util_encode_create() - /// @see image_util_encode_set_resolution() - /// @see image_util_encode_set_input_buffer() - /// @see image_util_encode_set_output_path() - /// @see image_util_encode_set_output_buffer() - /// @see image_util_encode_run() - /// @see image_util_encode_run_async() - /// @see image_util_encode_destroy() - int image_util_encode_set_gif_frame_delay_time( - image_util_encode_h handle, - int delay_time, - ) { - return _image_util_encode_set_gif_frame_delay_time( - handle, - delay_time, - ); - } - - late final _image_util_encode_set_gif_frame_delay_timePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(image_util_encode_h, ffi.UnsignedLongLong)>>( - 'image_util_encode_set_gif_frame_delay_time'); - late final _image_util_encode_set_gif_frame_delay_time = - _image_util_encode_set_gif_frame_delay_timePtr - .asFunction(); - - /// @brief Sets the input buffer from which to encode. - /// @since_tizen 3.0 - /// - /// @remarks Either image_util_encode_set_output_path() or image_util_encode_set_output_buffer() should be set.\n - /// By default the input buffer colorspace will be considered as IMAGE_UTIL_COLORSPACE_RGBA8888.\n - /// Use image_util_encode_set_colorspace to change the colorspace.\n - /// While encoding animated gif image, input buffer should be set for each frame. - /// - /// @param[in] handle The handle to image util decoding - /// @param[in] src_buffer The input image buffer - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre image_util_encode_create() - /// - /// @post image_util_encode_run() / image_util_encode_run_async() - /// @post image_util_encode_destroy() - /// - /// @see image_util_encode_create() - /// @see image_util_encode_set_resolution() - /// @see image_util_encode_set_input_buffer() - /// @see image_util_encode_set_output_path() - /// @see image_util_encode_set_output_buffer() - /// @see image_util_encode_run() - /// @see image_util_encode_run_async() - /// @see image_util_encode_destroy() - int image_util_encode_set_input_buffer( - image_util_encode_h handle, - ffi.Pointer src_buffer, - ) { - return _image_util_encode_set_input_buffer( - handle, - src_buffer, - ); - } - - late final _image_util_encode_set_input_bufferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - image_util_encode_h, ffi.Pointer)>>( - 'image_util_encode_set_input_buffer'); - late final _image_util_encode_set_input_buffer = - _image_util_encode_set_input_bufferPtr.asFunction< - int Function(image_util_encode_h, ffi.Pointer)>(); - - /// @brief Sets the output path to which to encoded buffer will be written to. - /// @since_tizen 3.0 - /// - /// @remarks One of image_util_encode_set_output_path() or image_util_encode_set_output_buffer() should be set.\n - /// If both are set then the latest output set is considered.\n - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. - /// - /// @param[in] handle The handle to image util encoding - /// @param[in] path The output file path - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_NO_SUCH_FILE No such file - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// @retval #IMAGE_UTIL_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// - /// @pre image_util_encode_create() - /// - /// @post image_util_encode_run() / image_util_encode_run_async() - /// @post image_util_encode_destroy() - /// - /// @see image_util_encode_create() - /// @see image_util_encode_set_resolution() - /// @see image_util_encode_set_input_buffer() - /// @see image_util_encode_run() - /// @see image_util_encode_run_async() - /// @see image_util_encode_destroy() - int image_util_encode_set_output_path( - image_util_encode_h handle, - ffi.Pointer path, - ) { - return _image_util_encode_set_output_path( - handle, - path, - ); - } - - late final _image_util_encode_set_output_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(image_util_encode_h, - ffi.Pointer)>>('image_util_encode_set_output_path'); - late final _image_util_encode_set_output_path = - _image_util_encode_set_output_pathPtr.asFunction< - int Function(image_util_encode_h, ffi.Pointer)>(); - - /// @brief Sets the output buffer to which to encoded buffer will be written to. - /// @since_tizen 3.0 - /// - /// @remarks One of image_util_encode_set_output_path() or image_util_encode_set_output_buffer() should be set.\n - /// If both are set then the latest output set is considered.\n - /// Before 4.0, output buffer setting is not supported for bmp. IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT will be returned for bmp.\n - /// Since 4.0, output buffer setting has been supported for bmp. Applications can set the output buffer to write encoded bmp.\n - /// In case of gif encoding, the output buffer will be completely available only after image_util_encode_destroy(). - /// @a dst_buffer should be released after @c image_util_encode_run() or @c image_util_encode_run_async(). - /// - /// @param[in] handle The handle to image util encoding - /// @param[in] dst_buffer The output image buffer - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// @retval #IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT Format not supported - /// - /// @pre image_util_encode_create() - /// - /// @post image_util_encode_run() / image_util_encode_run_async() - /// @post image_util_encode_destroy() - /// - /// @see image_util_encode_create() - /// @see image_util_encode_set_resolution() - /// @see image_util_encode_set_input_buffer() - /// @see image_util_encode_run() - /// @see image_util_encode_run_async() - /// @see image_util_encode_destroy() - int image_util_encode_set_output_buffer( - image_util_encode_h handle, - ffi.Pointer> dst_buffer, - ) { - return _image_util_encode_set_output_buffer( - handle, - dst_buffer, - ); - } - - late final _image_util_encode_set_output_bufferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(image_util_encode_h, - ffi.Pointer>)>>( - 'image_util_encode_set_output_buffer'); - late final _image_util_encode_set_output_buffer = - _image_util_encode_set_output_bufferPtr.asFunction< - int Function(image_util_encode_h, - ffi.Pointer>)>(); - - /// @brief Starts encoding of the image and fills the output buffer, set using image_util_encode_set_output_buffer() or image_util_encode_set_output_path(). - /// @since_tizen 3.0 - /// - /// @remarks The output will be stored in the pointer set to image_util_encode_set_output_buffer() or image_util_encode_set_output_path().\n - /// The function executes synchronously.\n - /// When any of the @pre functions are not called, IMAGE_UTIL_ERROR_INVALID_PARAMETER is returned.\n - /// In case of animated gif encoding, image_util_encode_set_resolution(), image_util_encode_set_input_buffer() and\n - /// image_util_encode_set_gif_frame_delay_time() MUST be called for each frame. - /// In case of animated gif encoding, call image_util_encode_run() for each frame to encode progressively. - /// - /// @param[in] handle The handle to image util encoding - /// @param[out] size Size of the encoded image - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre image_util_encode_create() - /// @pre image_util_encode_set_resolution() - /// @pre image_util_encode_set_input_buffer() - /// @pre image_util_encode_set_output_buffer() / image_util_encode_set_output_path() - /// - /// @post image_util_encode_destroy() - /// - /// @see image_util_encode_create() - /// @see image_util_encode_set_resolution() - /// @see image_util_encode_set_input_buffer() - /// @see image_util_encode_set_gif_frame_delay_time() - /// @see image_util_encode_set_output_path() - /// @see image_util_encode_set_output_buffer() - /// @see image_util_encode_destroy() - int image_util_encode_run( - image_util_encode_h handle, - ffi.Pointer size, - ) { - return _image_util_encode_run( - handle, - size, - ); - } - - late final _image_util_encode_runPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(image_util_encode_h, - ffi.Pointer)>>('image_util_encode_run'); - late final _image_util_encode_run = _image_util_encode_runPtr.asFunction< - int Function(image_util_encode_h, ffi.Pointer)>(); - - /// @brief Starts encoding of the image and fills the output buffer, set using image_util_encode_set_output_buffer() or image_util_encode_set_output_path(). - /// @since_tizen 3.0 - /// - /// @remarks The output will be stored in the pointer set to image_util_encode_set_output_buffer() or image_util_encode_set_output_path().\n - /// The function executes asynchronously, which contains complete callback.\n - /// When any of the @pre functions are not called, IMAGE_UTIL_ERROR_INVALID_PARAMETER is returned.\n - /// In case of animated gif encoding, image_util_encode_set_resolution(), image_util_encode_set_input_buffer() and\n - /// image_util_encode_set_gif_frame_delay_time() MUST be called for each frame. - /// In case of animated gif encoding, call image_util_encode_run_async() for each frame to encode progressively. - /// - /// @param[in] handle The handle to image util encoding - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre image_util_encode_create() - /// @pre image_util_encode_set_resolution() - /// @pre image_util_encode_set_input_buffer() - /// @pre image_util_encode_set_output_buffer() / image_util_encode_set_output_path() - /// - /// @post image_util_encode_destroy() - /// - /// @see image_util_encode_create() - /// @see image_util_encode_set_resolution() - /// @see image_util_encode_set_input_buffer() - /// @see image_util_encode_set_gif_frame_delay_time() - /// @see image_util_encode_set_output_path() - /// @see image_util_encode_set_output_buffer() - /// @see image_util_encode_destroy() - int image_util_encode_run_async( - image_util_encode_h handle, - image_util_encode_completed_cb callback, - ffi.Pointer user_data, - ) { - return _image_util_encode_run_async( - handle, - callback, - user_data, - ); - } - - late final _image_util_encode_run_asyncPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(image_util_encode_h, image_util_encode_completed_cb, - ffi.Pointer)>>('image_util_encode_run_async'); - late final _image_util_encode_run_async = - _image_util_encode_run_asyncPtr.asFunction< - int Function(image_util_encode_h, image_util_encode_completed_cb, - ffi.Pointer)>(); - - /// @brief Destroys the image encoding handle. - /// @since_tizen 3.0 - /// - /// @remarks Any image handle created should be destroyed. - /// - /// @param[in] handle The handle to image util encoding - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre image_util_encode_create() - /// - /// @see image_util_encode_create() - int image_util_encode_destroy( - image_util_encode_h handle, - ) { - return _image_util_encode_destroy( - handle, - ); - } - - late final _image_util_encode_destroyPtr = - _lookup>( - 'image_util_encode_destroy'); - late final _image_util_encode_destroy = _image_util_encode_destroyPtr - .asFunction(); - - /// @brief Calculates the size of the image buffer for the specified resolution and colorspace. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] width The image width - /// @param[in] height The image height - /// @param[in] colorspace The image colorspace - /// @param[out] size The Calculated buffer size - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see image_util_transform_run() - int image_util_calculate_buffer_size( - int width, - int height, - int colorspace, - ffi.Pointer size, - ) { - return _image_util_calculate_buffer_size( - width, - height, - colorspace, - size, - ); - } - - late final _image_util_calculate_buffer_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Int, ffi.Int32, ffi.Pointer)>>( - 'image_util_calculate_buffer_size'); - late final _image_util_calculate_buffer_size = - _image_util_calculate_buffer_sizePtr.asFunction< - int Function(int, int, int, ffi.Pointer)>(); - - /// @brief Extracts representative color from an image buffer. - /// @since_tizen 3.0 - /// @remarks @a image_buffer should be RGB888 colorspace. - /// - /// @param[in] image_buffer The original image buffer - /// @param[in] width The image width - /// @param[in] height The image height - /// @param[out] rgb_r The red color in RGB color space - /// @param[out] rgb_g The green color in RGB color space - /// @param[out] rgb_b The blue color in RGB color space - /// - /// @return 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation - int image_util_extract_color_from_memory( - ffi.Pointer image_buffer, - int width, - int height, - ffi.Pointer rgb_r, - ffi.Pointer rgb_g, - ffi.Pointer rgb_b, - ) { - return _image_util_extract_color_from_memory( - image_buffer, - width, - height, - rgb_r, - rgb_g, - rgb_b, - ); - } - - late final _image_util_extract_color_from_memoryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'image_util_extract_color_from_memory'); - late final _image_util_extract_color_from_memory = - _image_util_extract_color_from_memoryPtr.asFunction< - int Function( - ffi.Pointer, - int, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Creates a handle to image util transform. - /// @details This function creates a handle to image util transform. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a handle should be released using image_util_transform_destroy(). - /// - /// @param[out] handle A handle to image util transform - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see image_util_transform_destroy() - int image_util_transform_create( - ffi.Pointer handle, - ) { - return _image_util_transform_create( - handle, - ); - } - - late final _image_util_transform_createPtr = _lookup< - ffi.NativeFunction)>>( - 'image_util_transform_create'); - late final _image_util_transform_create = _image_util_transform_createPtr - .asFunction)>(); - - /// @deprecated Deprecated since 5.0. - /// @brief Sets the image util's accurate mode. - /// @details This function set if you use hardware acceleration or not. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// - /// @remarks The value returned will be IMAGE_UTIL_ERROR_NOT_SUPPORTED, if H/W acceleration doesn't support on the device. - /// - /// @param[in] handle The handle to image util - /// @param[in] mode Set @c true, user can use the hardware acceleration\n - /// otherwise set @c false if user can only software image processing - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// @retval #IMAGE_UTIL_ERROR_NOT_SUPPORTED The application does not have the hardware acceleration - /// - /// @pre image_util_transform_create(). - /// - /// @see image_util_transform_create() - /// @see image_util_transform_destroy() - int image_util_transform_set_hardware_acceleration( - transformation_h handle, - bool mode, - ) { - return _image_util_transform_set_hardware_acceleration( - handle, - mode, - ); - } - - late final _image_util_transform_set_hardware_accelerationPtr = - _lookup>( - 'image_util_transform_set_hardware_acceleration'); - late final _image_util_transform_set_hardware_acceleration = - _image_util_transform_set_hardware_accelerationPtr - .asFunction(); - - /// @brief Sets the information of the converting. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] handle The handle to image util transform - /// @param[in] colorspace The colorspace of the image buffer - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// @retval #IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT Not supported format - /// - /// @pre image_util_transform_create(). - /// - /// @see image_util_transform_create() - /// @see image_util_transform_run() - /// @see image_util_transform_destroy() - int image_util_transform_set_colorspace( - transformation_h handle, - int colorspace, - ) { - return _image_util_transform_set_colorspace( - handle, - colorspace, - ); - } - - late final _image_util_transform_set_colorspacePtr = _lookup< - ffi.NativeFunction>( - 'image_util_transform_set_colorspace'); - late final _image_util_transform_set_colorspace = - _image_util_transform_set_colorspacePtr - .asFunction(); - - /// @brief Sets the information of the resizing. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks image_util_transform_set_resolution and image_util_transform_set_crop_area can't do that at the same time. - /// - /// @param[in] handle The handle to image util transform - /// @param[in] width The width of image buffer - /// @param[in] height The height of image buffer - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre image_util_transform_create(). - /// - /// @see image_util_transform_create() - /// @see image_util_transform_run() - /// @see image_util_transform_destroy() - int image_util_transform_set_resolution( - transformation_h handle, - int width, - int height, - ) { - return _image_util_transform_set_resolution( - handle, - width, - height, - ); - } - - late final _image_util_transform_set_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(transformation_h, ffi.UnsignedInt, - ffi.UnsignedInt)>>('image_util_transform_set_resolution'); - late final _image_util_transform_set_resolution = - _image_util_transform_set_resolutionPtr - .asFunction(); - - /// @brief Sets the information of the rotating. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] handle The handle to image util transform - /// @param[in] rotation The rotation value of image buffer - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre image_util_transform_create(). - /// - /// @see image_util_transform_create() - /// @see image_util_transform_run() - /// @see image_util_transform_destroy() - int image_util_transform_set_rotation( - transformation_h handle, - int rotation, - ) { - return _image_util_transform_set_rotation( - handle, - rotation, - ); - } - - late final _image_util_transform_set_rotationPtr = _lookup< - ffi.NativeFunction>( - 'image_util_transform_set_rotation'); - late final _image_util_transform_set_rotation = - _image_util_transform_set_rotationPtr - .asFunction(); - - /// @brief Sets the information of the cropping. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks image_util_transform_set_resolution and image_util_transform_set_crop_area can't do that at the same time. - /// - /// @param[in] handle The handle to image util transform - /// @param[in] start_x The start x position of cropped image buffer - /// @param[in] start_y The start y position of cropped image buffer - /// @param[in] end_x The end x position of cropped image buffer - /// @param[in] end_y The end y position of cropped image buffer - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre image_util_transform_create(). - /// - /// @see image_util_transform_create() - /// @see image_util_transform_run() - /// @see image_util_transform_destroy() - int image_util_transform_set_crop_area( - transformation_h handle, - int start_x, - int start_y, - int end_x, - int end_y, - ) { - return _image_util_transform_set_crop_area( - handle, - start_x, - start_y, - end_x, - end_y, - ); - } - - late final _image_util_transform_set_crop_areaPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - transformation_h, - ffi.UnsignedInt, - ffi.UnsignedInt, - ffi.UnsignedInt, - ffi.UnsignedInt)>>('image_util_transform_set_crop_area'); - late final _image_util_transform_set_crop_area = - _image_util_transform_set_crop_areaPtr - .asFunction(); - - /// @brief Gets the colorspace of the image buffer. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] handle The handle to image util transform - /// @param[in,out] colorspace The colorspace of the image buffer - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// @retval #IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT Not supported format - /// - /// @pre image_util_transform_create().\n - /// image_util_transform_set_crop_area(). - /// - /// @see image_util_transform_create() - /// @see image_util_transform_destroy() - int image_util_transform_get_colorspace( - transformation_h handle, - ffi.Pointer colorspace, - ) { - return _image_util_transform_get_colorspace( - handle, - colorspace, - ); - } - - late final _image_util_transform_get_colorspacePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(transformation_h, - ffi.Pointer)>>('image_util_transform_get_colorspace'); - late final _image_util_transform_get_colorspace = - _image_util_transform_get_colorspacePtr - .asFunction)>(); - - /// @brief Gets the resolution of the image buffer. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] handle The handle to image util transform - /// @param[in,out] width The width of source image buffer - /// @param[in,out] height The height of source image buffer - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre image_util_transform_create().\n - /// image_util_transform_set_resolution(). - /// - /// @see image_util_transform_create() - /// @see image_util_transform_destroy() - int image_util_transform_get_resolution( - transformation_h handle, - ffi.Pointer width, - ffi.Pointer height, - ) { - return _image_util_transform_get_resolution( - handle, - width, - height, - ); - } - - late final _image_util_transform_get_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(transformation_h, ffi.Pointer, - ffi.Pointer)>>( - 'image_util_transform_get_resolution'); - late final _image_util_transform_get_resolution = - _image_util_transform_get_resolutionPtr.asFunction< - int Function(transformation_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the information of the rotating. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] handle The handle to image util transform - /// @param[in,out] rotation The rotation value of image buffer - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre image_util_transform_create().\n - /// image_util_transform_set_rotation(). - /// - /// @see image_util_transform_create() - /// @see image_util_transform_destroy() - int image_util_transform_get_rotation( - transformation_h handle, - ffi.Pointer rotation, - ) { - return _image_util_transform_get_rotation( - handle, - rotation, - ); - } - - late final _image_util_transform_get_rotationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(transformation_h, - ffi.Pointer)>>('image_util_transform_get_rotation'); - late final _image_util_transform_get_rotation = - _image_util_transform_get_rotationPtr - .asFunction)>(); - - /// @brief Gets the information of the cropping. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] handle The handle to image util transform - /// @param[in,out] start_x The start x position of cropped source image buffer - /// @param[in,out] start_y The start y position of cropped source image buffer - /// @param[in,out] end_x The end x position of cropped source image buffer - /// @param[in,out] end_y The end y position of cropped source image buffer - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre image_util_transform_create().\n - /// image_util_transform_set_crop_area(). - /// - /// @see image_util_transform_create() - /// @see image_util_transform_destroy() - int image_util_transform_get_crop_area( - transformation_h handle, - ffi.Pointer start_x, - ffi.Pointer start_y, - ffi.Pointer end_x, - ffi.Pointer end_y, - ) { - return _image_util_transform_get_crop_area( - handle, - start_x, - start_y, - end_x, - end_y, - ); - } - - late final _image_util_transform_get_crop_areaPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - transformation_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'image_util_transform_get_crop_area'); - late final _image_util_transform_get_crop_area = - _image_util_transform_get_crop_areaPtr.asFunction< - int Function( - transformation_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Transforms the image for given image util handle. - /// @details The function execute asynchronously, which contains complete callback \n - /// If you set more than two transforming, the order of running is crop or resolution, colorspace converting, rotation. \n - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks If H/W acceleration is not set, transformation is done via S/W acceleration. - /// - /// @param[in] handle The handle of transform - /// @param[in] src The handle to image util transform - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see image_util_transform_create() - /// @see image_util_transform_destroy() - int image_util_transform_run( - transformation_h handle, - media_packet_h src, - image_util_transform_completed_cb callback, - ffi.Pointer user_data, - ) { - return _image_util_transform_run( - handle, - src, - callback, - user_data, - ); - } - - late final _image_util_transform_runPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - transformation_h, - media_packet_h, - image_util_transform_completed_cb, - ffi.Pointer)>>('image_util_transform_run'); - late final _image_util_transform_run = - _image_util_transform_runPtr.asFunction< - int Function(transformation_h, media_packet_h, - image_util_transform_completed_cb, ffi.Pointer)>(); - - /// @brief Destroys a handle to image util. - /// @details The function frees all resources related to the image util handle. The image util - /// handle no longer can be used to perform any operations. A new image util handle - /// has to be created before the next usage. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] handle The handle to image util transform - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see image_util_transform_create() - int image_util_transform_destroy( - transformation_h handle, - ) { - return _image_util_transform_destroy( - handle, - ); - } - - late final _image_util_transform_destroyPtr = - _lookup>( - 'image_util_transform_destroy'); - late final _image_util_transform_destroy = _image_util_transform_destroyPtr - .asFunction(); - - /// @brief Retrieves all supported image encoding/decoding colorspace by invoking a callback function once for each one. - /// @since_tizen 3.0 - /// - /// @param[in] image_type The type of supported image for which to create encode/decode handle - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, - /// otherwise a negative error value - /// - /// @retval #IMAGE_UTIL_ERROR_NONE Successful - /// @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @post This function invokes image_util_supported_colorspace_cb() repeatedly to retrieve each supported image encoding/decoding colorspace. - /// - /// @see image_util_supported_colorspace_cb() - /// @see image_util_encode_create() - /// @see image_util_decode_create() - int image_util_foreach_supported_colorspace( - int image_type, - image_util_supported_colorspace_cb callback, - ffi.Pointer user_data, - ) { - return _image_util_foreach_supported_colorspace( - image_type, - callback, - user_data, - ); - } - - late final _image_util_foreach_supported_colorspacePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, image_util_supported_colorspace_cb, - ffi.Pointer)>>( - 'image_util_foreach_supported_colorspace'); - late final _image_util_foreach_supported_colorspace = - _image_util_foreach_supported_colorspacePtr.asFunction< - int Function(int, image_util_supported_colorspace_cb, - ffi.Pointer)>(); - - /// @brief Creates a media packet pool to handle the media packets. - /// @details It creates a media packet pool instance - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a pool must be released by using packet_pool_destroy(). - /// @param[out] pool The media packet pool handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_OUT_OF_MEMORY Out of memory - int media_packet_pool_create( - ffi.Pointer pool, - ) { - return _media_packet_pool_create( - pool, - ); - } - - late final _media_packet_pool_createPtr = _lookup< - ffi - .NativeFunction)>>( - 'media_packet_pool_create'); - late final _media_packet_pool_create = _media_packet_pool_createPtr - .asFunction)>(); - - /// @brief Sets the media format for the media packet pool. - /// - /// @since_tizen 3.0 - /// - /// @param[in] pool The media packet pool handle - /// @param[in] fmt The #media_format_h allocated by the caller - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre Must have media_format_h instance by media_format_create(). - /// @post Must do media_format_unref(). - int media_packet_pool_set_media_format( - media_packet_pool_h pool, - media_format_h fmt, - ) { - return _media_packet_pool_set_media_format( - pool, - fmt, - ); - } - - late final _media_packet_pool_set_media_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_pool_h, - media_format_h)>>('media_packet_pool_set_media_format'); - late final _media_packet_pool_set_media_format = - _media_packet_pool_set_media_formatPtr - .asFunction(); - - /// @brief Sets the media packet pool size. - /// @details Sets the number of packets to allocate with given parameters. - /// The media packet pool will be allocated with @a min_buffers when media_pacet_pool_allocate() is called. - /// When there are no media packets available, it will be increased to @a max_buffers of given parameter. - /// - /// @since_tizen 3.0 - /// - /// @param[in] pool The allocated pool handle - /// @param[in] min_buffers The minimum number of buffers to allocate - /// @param[in] max_buffers The maximum number of buffers to allocate - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_OUT_OF_MEMORY Out of memory - /// @post After the pool has been configured, it can be allocated with media_packet_pool_allocate(). - /// @see media_packet_pool_get_size() - int media_packet_pool_set_size( - media_packet_pool_h pool, - int min_buffers, - int max_buffers, - ) { - return _media_packet_pool_set_size( - pool, - min_buffers, - max_buffers, - ); - } - - late final _media_packet_pool_set_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_pool_h, ffi.Int, - ffi.Int)>>('media_packet_pool_set_size'); - late final _media_packet_pool_set_size = _media_packet_pool_set_sizePtr - .asFunction(); - - /// @brief Gets the media packet pool size. - /// @details Gets the configuration values from the pool. - /// - /// @since_tizen 3.0 - /// - /// @param[in] pool The allocated pool handle - /// @param[out] min_buffers The minimum number of buffers to allocate - /// @param[out] max_buffers The maximum number of buffers to allocate - /// @param[out] curr_buffers The current number of allocated buffers - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @post After the pool has been configured, it can be allocated with media_packet_pool_allocate(). - /// @see media_packet_pool_set_size() - int media_packet_pool_get_size( - media_packet_pool_h pool, - ffi.Pointer min_buffers, - ffi.Pointer max_buffers, - ffi.Pointer curr_buffers, - ) { - return _media_packet_pool_get_size( - pool, - min_buffers, - max_buffers, - curr_buffers, - ); - } - - late final _media_packet_pool_get_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_packet_pool_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('media_packet_pool_get_size'); - late final _media_packet_pool_get_size = - _media_packet_pool_get_sizePtr.asFunction< - int Function(media_packet_pool_h, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Allocates the media packet pool. - /// @details It will allocate media packets with @a min_buffers which given to media_packet_pool_set_size(). - /// - /// @since_tizen 3.0 - /// - /// @param[in] pool The allocated pool handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION The user set the invalid format with media_packet_pool_set_format() or set the invalid size with media_packet_pool_set_size().\n - /// The user already allocate the pool. - /// @pre media_packet_pool_set_media_format() and media_pool_set_size() should be called before calling media_packet_pool_allocate() - /// @post The pool will be allocated. When the pool is allocated, media_packet_pool_acquire_packet() can be used to retrieve a packet from the pool. - /// @see media_packet_pool_set_media_format() - /// @see media_packet_pool_set_size() - int media_packet_pool_allocate( - media_packet_pool_h pool, - ) { - return _media_packet_pool_allocate( - pool, - ); - } - - late final _media_packet_pool_allocatePtr = - _lookup>( - 'media_packet_pool_allocate'); - late final _media_packet_pool_allocate = _media_packet_pool_allocatePtr - .asFunction(); - - /// @brief Acquires a media packet from the media packet pool. - /// @details It will take a media packet from the queue and block until media packet is released into the pool again. - /// When there are no media packets available, it will be increased to @a max_buffers of given parameter. - /// - /// @since_tizen 3.0 - /// - /// @param[in] pool The media packet pool handle - /// @param[out] pkt The media packet handle - /// @param[in] timeout It indicates the millisecond-timeouts to block - /// while waiting for one of acquired packet to be released. - /// If the value of timeout is -1, the pool blocks indefinitely until media packet into the pool. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION The user does not allocate the pool.\n - /// The pool should be allocated with media_packet_pool_allocate() before acquiring media packet from the pool. - /// @retval #MEDIA_PACKET_ERROR_NO_AVAILABLE_PACKET No available packet - /// @see media_pakcet_pool_set_size() - /// @see media_packet_pool_release_packet() - int media_packet_pool_acquire_packet( - media_packet_pool_h pool, - ffi.Pointer pkt, - int timeout, - ) { - return _media_packet_pool_acquire_packet( - pool, - pkt, - timeout, - ); - } - - late final _media_packet_pool_acquire_packetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_pool_h, ffi.Pointer, - ffi.Long)>>('media_packet_pool_acquire_packet'); - late final _media_packet_pool_acquire_packet = - _media_packet_pool_acquire_packetPtr.asFunction< - int Function( - media_packet_pool_h, ffi.Pointer, int)>(); - - /// @brief Releases the media packet to pool. - /// @details Rlease a packet back in the pool. It will put the packet back in the queue. - /// - /// @since_tizen 3.0 - /// - /// @param[in] pool The media packet pool handle - /// @param[in] pkt The packet to release, the pkt should have previously been acquired from the pool with media_packet_pool_acquire_packet() - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION The user releases media packet which is not associated with a given pool. - /// @see media_packet_pool_acquire_packet() - int media_packet_pool_release_packet( - media_packet_pool_h pool, - media_packet_h pkt, - ) { - return _media_packet_pool_release_packet( - pool, - pkt, - ); - } - - late final _media_packet_pool_release_packetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_packet_pool_h, - media_packet_h)>>('media_packet_pool_release_packet'); - late final _media_packet_pool_release_packet = - _media_packet_pool_release_packetPtr - .asFunction(); - - /// @brief Deallocates all the media packets. - /// @details Deallocates the packets allocated with media_packet_pool_allocate(). - /// - /// @since_tizen 3.0 - /// - /// @param[in] pool The media packet pool handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION The user does not release all media packets to the pool. - /// - /// @pre media packet should be released before calling media_packet_pool_deallocate(). - /// @post The pool will be deallocated. media_packet_pool_acquire_packet() calls will return an error. - /// @see media_packet_pool_allocate() - int media_packet_pool_deallocate( - media_packet_pool_h pool, - ) { - return _media_packet_pool_deallocate( - pool, - ); - } - - late final _media_packet_pool_deallocatePtr = - _lookup>( - 'media_packet_pool_deallocate'); - late final _media_packet_pool_deallocate = _media_packet_pool_deallocatePtr - .asFunction(); - - /// @brief Destroys the media packet pool. - /// @details Destroys the media packet pool handle and releases all its resources. - /// - /// @since_tizen 3.0 - /// - /// @param[in] pool The handle to media packet pool to be destroyed - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_PACKET_ERROR_NONE Successful - /// @retval #MEDIA_PACKET_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_PACKET_ERROR_INVALID_OPERATION The user does not create media packet pool instance, or not deallocate all media packets with media_packet_pool_deallocate(). - /// - /// @see media_packet_pool_create() - int media_packet_pool_destroy( - media_packet_pool_h pool, - ) { - return _media_packet_pool_destroy( - pool, - ); - } - - late final _media_packet_pool_destroyPtr = - _lookup>( - 'media_packet_pool_destroy'); - late final _media_packet_pool_destroy = _media_packet_pool_destroyPtr - .asFunction(); - - /// @brief Creates a mediacodec handle for decoding/encoding. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks you must release @a mediacodec using mediacodec_destroy().\n - /// Although you can create multiple mediacodec handles at the same time, - /// the mediacodec cannot guarantee proper operation because of limited resources, like - /// audio or display device. - /// - /// @param[out] mediacodec A new handle to mediacodec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIACODEC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - int mediacodec_create( - ffi.Pointer mediacodec, - ) { - return _mediacodec_create( - mediacodec, - ); - } - - late final _mediacodec_createPtr = - _lookup)>>( - 'mediacodec_create'); - late final _mediacodec_create = _mediacodec_createPtr - .asFunction)>(); - - /// @brief Destroys the mediacodec handle and releases all its resources. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks To completely shutdown the mediacodec operation, call this function with a valid player handle from any - /// mediacodec - /// - /// @param[in] mediacodec The handle to mediacodec to be destroyed. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIACODEC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - int mediacodec_destroy( - mediacodec_h mediacodec, - ) { - return _mediacodec_destroy( - mediacodec, - ); - } - - late final _mediacodec_destroyPtr = - _lookup>( - 'mediacodec_destroy'); - late final _mediacodec_destroy = - _mediacodec_destroyPtr.asFunction(); - - /// @brief Sets the codec type and decoder/encoder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If this codec is to be used as a decoder, pass the #MEDIACODEC_DECODER flag. - /// If this codec is to be used as an encoder, pass the #MEDIACODEC_ENCODER flag.\n - /// The software codec is used as default setting(#MEDIACODEC_SUPPORT_TYPE_SW) if user doesn't set hardware flag. - /// If user wants to use h/w decoder, user needs to pass the #MEDIACODEC_DECODER | #MEDIACODEC_SUPPORT_TYPE_HW. - /// @param[in] mediacodec The handle of mediacodec - /// @param[in] codec_type The identifier of the codec type of the decoder/encoder - /// @param[in] flags The encoding/decoding scheme, defined by #mediacodec_support_type_e - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIACODEC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIACODEC_ERROR_CODEC_NOT_FOUND Codec not found - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - int mediacodec_set_codec( - mediacodec_h mediacodec, - int codec_type, - int flags, - ) { - return _mediacodec_set_codec( - mediacodec, - codec_type, - flags, - ); - } - - late final _mediacodec_set_codecPtr = _lookup< - ffi - .NativeFunction>( - 'mediacodec_set_codec'); - late final _mediacodec_set_codec = _mediacodec_set_codecPtr - .asFunction(); - - /// @brief Sets the default info for the video decoder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @param[in] width The width for video decoding. - /// @param[in] height The height for video decoding. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIACODEC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - int mediacodec_set_vdec_info( - mediacodec_h mediacodec, - int width, - int height, - ) { - return _mediacodec_set_vdec_info( - mediacodec, - width, - height, - ); - } - - late final _mediacodec_set_vdec_infoPtr = _lookup< - ffi.NativeFunction>( - 'mediacodec_set_vdec_info'); - late final _mediacodec_set_vdec_info = _mediacodec_set_vdec_infoPtr - .asFunction(); - - /// @brief Sets the default info for the video encoder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The frame rate is the speed of recording and the speed of playback. - /// If user wants the default setting for ratecontrol, set @a target_bits to @c 0. - /// @param[in] mediacodec The handle to mediacodec - /// @param[in] width The width for video encoding. - /// @param[in] height The height for video encoding. - /// @param[in] fps The frame rate in frames per second. - /// @param[in] target_bits The target bitrates in bits per second.(a unit of kbit) - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIACODEC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - int mediacodec_set_venc_info( - mediacodec_h mediacodec, - int width, - int height, - int fps, - int target_bits, - ) { - return _mediacodec_set_venc_info( - mediacodec, - width, - height, - fps, - target_bits, - ); - } - - late final _mediacodec_set_venc_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediacodec_h, ffi.Int, ffi.Int, ffi.Int, - ffi.Int)>>('mediacodec_set_venc_info'); - late final _mediacodec_set_venc_info = _mediacodec_set_venc_infoPtr - .asFunction(); - - /// @brief Sets the default info for the audio decoder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @param[in] samplerate The samplerate for audio decoding. - /// @param[in] channel The channels for audio decoding. - /// @param[in] bit The bits resolution for audio decoding. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIACODEC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - int mediacodec_set_adec_info( - mediacodec_h mediacodec, - int samplerate, - int channel, - int bit, - ) { - return _mediacodec_set_adec_info( - mediacodec, - samplerate, - channel, - bit, - ); - } - - late final _mediacodec_set_adec_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediacodec_h, ffi.Int, ffi.Int, - ffi.Int)>>('mediacodec_set_adec_info'); - late final _mediacodec_set_adec_info = _mediacodec_set_adec_infoPtr - .asFunction(); - - /// @brief Sets the default info for the audio encoder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @param[in] samplerate The samplerate for audio encoding. - /// @param[in] channel The channels for audio encoding. - /// @param[in] bit The bits resolution for audio encoding. - /// @param[in] bitrate The bitrate for audio encoding. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIACODEC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - int mediacodec_set_aenc_info( - mediacodec_h mediacodec, - int samplerate, - int channel, - int bit, - int bitrate, - ) { - return _mediacodec_set_aenc_info( - mediacodec, - samplerate, - channel, - bit, - bitrate, - ); - } - - late final _mediacodec_set_aenc_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediacodec_h, ffi.Int, ffi.Int, ffi.Int, - ffi.Int)>>('mediacodec_set_aenc_info'); - late final _mediacodec_set_aenc_info = _mediacodec_set_aenc_infoPtr - .asFunction(); - - /// @brief Sets the codec type and codec default info via media format. - /// @details Sets the value via media format instead of mediacodec_set_codec(), mediacodec_set_venc_info(), - /// mediacodec_set_vdec_info(), mediacodec_set_aenc_info(), and mediacodec_set_adec_info(). - /// @since_tizen 4.0 - /// @remarks When using the @a format parameter from the output of the media demuxer, you can use media format via media_packet_get_format(). - /// Otherwise, you must set the following values after creating media format. - /// Set the audio or video codec type via media_format_set_video_mime() or media_format_set_audio_mime(). - /// For video decoding, width, height must be set via media_format_set_video_width() and media_format_set_video_height(). - /// For video encoding, width, height, target bitrate, and frame rate must be set via media_format_set_video_avg_bps() and media_format_set_video_frame_rate(). - /// For audio decoding, samplerate, channel, and bit must be set via media_format_set_audio_samplerate(), media_format_set_audio_channel() and media_format_set_audio_bit(). - /// For audio encoding, samplerate, channel, bit, and bitrate must be set via media_format_set_audio_avg_bps().\n - /// If this codec is to be used as a decoder, pass the #MEDIACODEC_DECODER flag. - /// If this codec is to be used as an encoder, pass the #MEDIACODEC_ENCODER flag.\n - /// The software codec is used as default setting (#MEDIACODEC_SUPPORT_TYPE_SW) if user doesn't set hardware flag. - /// If you wants to use h/w decoder, you needs to pass the #MEDIACODEC_DECODER | #MEDIACODEC_SUPPORT_TYPE_HW. - /// @param[in] mediacodec The mediacodec handle - /// @param[in] format The #media_format_h of input data - /// @param[in] flags The encoding/decoding scheme, - /// values of #mediacodec_support_type_e combined with bitwise 'or' - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_CODEC_NOT_FOUND Unsupported codec - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @pre The media format has been created and the required values for configuration have been set. - /// @see media_format_set_video_mime() - /// @see media_format_set_audio_mime() - /// @see media_format_set_video_width() - /// @see media_format_set_video_height() - /// @see media_format_set_video_avg_bps() - /// @see media_format_set_video_frame_rate() - /// @see media_format_set_audio_channel() - /// @see media_format_set_audio_samplerate() - /// @see media_format_set_audio_bit() - /// @see media_format_set_audio_avg_bps() - int mediacodec_configure_from_media_format( - mediacodec_h mediacodec, - media_format_h format, - int flags, - ) { - return _mediacodec_configure_from_media_format( - mediacodec, - format, - flags, - ); - } - - late final _mediacodec_configure_from_media_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediacodec_h, media_format_h, - ffi.Int)>>('mediacodec_configure_from_media_format'); - late final _mediacodec_configure_from_media_format = - _mediacodec_configure_from_media_formatPtr - .asFunction(); - - /// @brief Prepares @a mediacodec for encoding/decoding. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIACODEC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @retval #MEDIACODEC_ERROR_RESOURCE_OVERLOADED Exceed the instance limits (Since 5.0) - /// @retval #MEDIACODEC_ERROR_INTERNAL Internal error (Since 5.0) - /// @pre The mediacodec should call mediacodec_set_codec()and mediacodec_set_vdec_info()/mediacodec_set_venc_info() before calling mediacodec_prepare() - /// If the decoder is set by mediacodec_set_codec(), mediacodec_set_vdec_info() should be called. If the encoder is set by - /// mediacodec_set_codec(), mediacodec_set_venc_info() should be called. - int mediacodec_prepare( - mediacodec_h mediacodec, - ) { - return _mediacodec_prepare( - mediacodec, - ); - } - - late final _mediacodec_preparePtr = - _lookup>( - 'mediacodec_prepare'); - late final _mediacodec_prepare = - _mediacodec_preparePtr.asFunction(); - - /// @brief Unprepares @a mediacodec for encoding/decoding. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIACODEC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - int mediacodec_unprepare( - mediacodec_h mediacodec, - ) { - return _mediacodec_unprepare( - mediacodec, - ); - } - - late final _mediacodec_unpreparePtr = - _lookup>( - 'mediacodec_unprepare'); - late final _mediacodec_unprepare = - _mediacodec_unpreparePtr.asFunction(); - - /// @brief Decodes/Encodes a packet. The function passed undecoded/unencoded packet to the input queue and decode/encode a - /// frame sequentially. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @param[in] inbuf The current input format for the decoder/encoder - /// @param[in] timeOutUs The timeout in microseconds. \n - /// The input buffer wait up to "timeOutUs" microseconds. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIACODEC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIACODEC_ERROR_OVERFLOW_INBUFFER Overflow inputbuffer - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - int mediacodec_process_input( - mediacodec_h mediacodec, - media_packet_h inbuf, - int timeOutUs, - ) { - return _mediacodec_process_input( - mediacodec, - inbuf, - timeOutUs, - ); - } - - late final _mediacodec_process_inputPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediacodec_h, media_packet_h, - ffi.Uint64)>>('mediacodec_process_input'); - late final _mediacodec_process_input = _mediacodec_process_inputPtr - .asFunction(); - - /// @brief Gets the decoded or encoded packet from the output queue. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The @a packet should be released using media_packet_destroy(). - /// @param[in] mediacodec The handle to mediacodec - /// @param[out] packet The current output of the decoder/encoder. - /// this function passed decoded/encoded frame to output queue. - /// @param[in] timeOutUs The timeout in microseconds. \n - /// The input buffer wait up to "timeOutUs" microseconds. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIACODEC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - int mediacodec_get_output( - mediacodec_h mediacodec, - ffi.Pointer packet, - int timeOutUs, - ) { - return _mediacodec_get_output( - mediacodec, - packet, - timeOutUs, - ); - } - - late final _mediacodec_get_outputPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediacodec_h, ffi.Pointer, - ffi.Uint64)>>('mediacodec_get_output'); - late final _mediacodec_get_output = _mediacodec_get_outputPtr.asFunction< - int Function(mediacodec_h, ffi.Pointer, int)>(); - - /// @brief Flushes both input and output buffers. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - int mediacodec_flush_buffers( - mediacodec_h mediacodec, - ) { - return _mediacodec_flush_buffers( - mediacodec, - ); - } - - late final _mediacodec_flush_buffersPtr = - _lookup>( - 'mediacodec_flush_buffers'); - late final _mediacodec_flush_buffers = - _mediacodec_flush_buffersPtr.asFunction(); - - /// @brief Sets empty buffer callback the media codec for process, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @pre mediacodec_set_input_buffer_used_cb() should be called before mediacodec_preare(). - /// @post mediacodec_input_buffer_used_cb() will be invoked. - /// @see mediacodec_set_input_buffer_used_cb() - /// @see mediacodec_unset_input_buffer_used_cb() - int mediacodec_set_input_buffer_used_cb( - mediacodec_h mediacodec, - mediacodec_input_buffer_used_cb callback, - ffi.Pointer user_data, - ) { - return _mediacodec_set_input_buffer_used_cb( - mediacodec, - callback, - user_data, - ); - } - - late final _mediacodec_set_input_buffer_used_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediacodec_h, mediacodec_input_buffer_used_cb, - ffi.Pointer)>>('mediacodec_set_input_buffer_used_cb'); - late final _mediacodec_set_input_buffer_used_cb = - _mediacodec_set_input_buffer_used_cbPtr.asFunction< - int Function(mediacodec_h, mediacodec_input_buffer_used_cb, - ffi.Pointer)>(); - - /// @brief Unsets input buffer used callback the media codec for process, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @see mediacodec_set_input_buffer_used_cb() - int mediacodec_unset_input_buffer_used_cb( - mediacodec_h mediacodec, - ) { - return _mediacodec_unset_input_buffer_used_cb( - mediacodec, - ); - } - - late final _mediacodec_unset_input_buffer_used_cbPtr = - _lookup>( - 'mediacodec_unset_input_buffer_used_cb'); - late final _mediacodec_unset_input_buffer_used_cb = - _mediacodec_unset_input_buffer_used_cbPtr - .asFunction(); - - /// @brief Sets output buffer available callback the media codec for process, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @pre mediacodec_set_output_buffer_available_cb() should be called before mediacodec_preare(). - /// @post mediacodec_output_buffer_available_cb() will be invoked. - /// @see mediacodec_set_output_buffer_available_cb() - /// @see mediacodec_unset_output_buffer_available_cb() - int mediacodec_set_output_buffer_available_cb( - mediacodec_h mediacodec, - mediacodec_output_buffer_available_cb callback, - ffi.Pointer user_data, - ) { - return _mediacodec_set_output_buffer_available_cb( - mediacodec, - callback, - user_data, - ); - } - - late final _mediacodec_set_output_buffer_available_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mediacodec_h, - mediacodec_output_buffer_available_cb, - ffi.Pointer)>>( - 'mediacodec_set_output_buffer_available_cb'); - late final _mediacodec_set_output_buffer_available_cb = - _mediacodec_set_output_buffer_available_cbPtr.asFunction< - int Function(mediacodec_h, mediacodec_output_buffer_available_cb, - ffi.Pointer)>(); - - /// @brief unsets output buffer available callback the media codec for process, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @see mediacodec_set_output_buffer_available_cb() - int mediacodec_unset_output_buffer_available_cb( - mediacodec_h mediacodec, - ) { - return _mediacodec_unset_output_buffer_available_cb( - mediacodec, - ); - } - - late final _mediacodec_unset_output_buffer_available_cbPtr = - _lookup>( - 'mediacodec_unset_output_buffer_available_cb'); - late final _mediacodec_unset_output_buffer_available_cb = - _mediacodec_unset_output_buffer_available_cbPtr - .asFunction(); - - /// @brief Sets error callback the media codec for process, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @pre mediacodec_set_error_cb() should be called before mediacodec_preare(). - /// @post mediacodec_error_cb() will be invoked. - /// @see mediacodec_set_error_cb() - /// @see mediacodec_unset_error_cb() - int mediacodec_set_error_cb( - mediacodec_h mediacodec, - mediacodec_error_cb callback, - ffi.Pointer user_data, - ) { - return _mediacodec_set_error_cb( - mediacodec, - callback, - user_data, - ); - } - - late final _mediacodec_set_error_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediacodec_h, mediacodec_error_cb, - ffi.Pointer)>>('mediacodec_set_error_cb'); - late final _mediacodec_set_error_cb = _mediacodec_set_error_cbPtr.asFunction< - int Function(mediacodec_h, mediacodec_error_cb, ffi.Pointer)>(); - - /// @brief Unsets error callback the media codec for process, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @see mediacodec_set_error_cb() - int mediacodec_unset_error_cb( - mediacodec_h mediacodec, - ) { - return _mediacodec_unset_error_cb( - mediacodec, - ); - } - - late final _mediacodec_unset_error_cbPtr = - _lookup>( - 'mediacodec_unset_error_cb'); - late final _mediacodec_unset_error_cb = - _mediacodec_unset_error_cbPtr.asFunction(); - - /// @brief Sets eos callback the media codec for process, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @pre mediacodec_set_eos_cb() should be called before mediacodec_preare(). - /// @post mediacodec_eos_cb() will be invoked. - /// @see mediacodec_set_eos_cb() - /// @see mediacodec_unset_eos_cb() - int mediacodec_set_eos_cb( - mediacodec_h mediacodec, - mediacodec_eos_cb callback, - ffi.Pointer user_data, - ) { - return _mediacodec_set_eos_cb( - mediacodec, - callback, - user_data, - ); - } - - late final _mediacodec_set_eos_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediacodec_h, mediacodec_eos_cb, - ffi.Pointer)>>('mediacodec_set_eos_cb'); - late final _mediacodec_set_eos_cb = _mediacodec_set_eos_cbPtr.asFunction< - int Function(mediacodec_h, mediacodec_eos_cb, ffi.Pointer)>(); - - /// @brief unsets eos callback the media codec for process, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @see mediacodec_set_event_handler_cb() - int mediacodec_unset_eos_cb( - mediacodec_h mediacodec, - ) { - return _mediacodec_unset_eos_cb( - mediacodec, - ); - } - - late final _mediacodec_unset_eos_cbPtr = - _lookup>( - 'mediacodec_unset_eos_cb'); - late final _mediacodec_unset_eos_cb = - _mediacodec_unset_eos_cbPtr.asFunction(); - - /// @brief Sets a callback function to be invoked when the mediacodec needs more data or has enough data. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @pre mediacodec_set_buffer_status_cb() should be called before mediacodec_preare(). - /// @post mediacodec_buffer_status_cb() will be invoked. - /// @see mediacodec_set_buffer_status_cb() - /// @see mediacodec_unset_buffer_status_cb() - int mediacodec_set_buffer_status_cb( - mediacodec_h mediacodec, - mediacodec_buffer_status_cb callback, - ffi.Pointer user_data, - ) { - return _mediacodec_set_buffer_status_cb( - mediacodec, - callback, - user_data, - ); - } - - late final _mediacodec_set_buffer_status_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediacodec_h, mediacodec_buffer_status_cb, - ffi.Pointer)>>('mediacodec_set_buffer_status_cb'); - late final _mediacodec_set_buffer_status_cb = - _mediacodec_set_buffer_status_cbPtr.asFunction< - int Function(mediacodec_h, mediacodec_buffer_status_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - int mediacodec_unset_buffer_status_cb( - mediacodec_h mediacodec, - ) { - return _mediacodec_unset_buffer_status_cb( - mediacodec, - ); - } - - late final _mediacodec_unset_buffer_status_cbPtr = - _lookup>( - 'mediacodec_unset_buffer_status_cb'); - late final _mediacodec_unset_buffer_status_cb = - _mediacodec_unset_buffer_status_cbPtr - .asFunction(); - - /// @brief Retrieves all supported codecs by invoking callback function once for each supported codecs. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @see mediacodec_foreach_supported_codec() - int mediacodec_foreach_supported_codec( - mediacodec_h mediacodec, - mediacodec_supported_codec_cb callback, - ffi.Pointer user_data, - ) { - return _mediacodec_foreach_supported_codec( - mediacodec, - callback, - user_data, - ); - } - - late final _mediacodec_foreach_supported_codecPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediacodec_h, mediacodec_supported_codec_cb, - ffi.Pointer)>>('mediacodec_foreach_supported_codec'); - late final _mediacodec_foreach_supported_codec = - _mediacodec_foreach_supported_codecPtr.asFunction< - int Function(mediacodec_h, mediacodec_supported_codec_cb, - ffi.Pointer)>(); - - /// @brief Verifies whether encoding can be performed with codec_type or not. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] mediacodec The handle to mediacodec - /// @param[in] codec_type The identifier of the codec type of the encoder. - /// @param[in] encoder Whether the encoder or decoder : (@c true = encoder, @c false = decoder). - /// @param[out] support_type (@c #MEDIACODEC_SUPPORT_TYPE_HW = mediacodec can be performed with hardware codec, @c #MEDIACODEC_SUPPORT_TYPE_SW = mediacodec can be performed with software codec) - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @code - /// #include - /// mediacodec_h mediacodec; - /// mediacodec_support_type_e type; - /// mediacodec_codec_type_e codec_type = MEDIACODEC_H264; - /// - /// mediacodec_create(&mediacodec); - /// mediacodec_get_supported_type(mediacodec, codec_type, 1, &type); - /// - /// if(type == MEDIACODEC_SUPPORT_TYPE_HW) - /// // only h/w supported - /// else if (type == MEDIACODEC_SUPPORT_TYPE_SW) - /// // only s/w supported - /// else if (type == (MEDIACODEC_SUPPORT_TYPE_HW|MEDIACODEC_SUPPORT_TYPE_SW) - /// // both supported - /// - /// mediacodec_set_codec(mediacodec, codec_type, MEDIACODEC_ENCODER | MEDIACODEC_SUPPORT_TYPE_HW); - /// @endcode - int mediacodec_get_supported_type( - mediacodec_h mediacodec, - int codec_type, - bool encoder, - ffi.Pointer support_type, - ) { - return _mediacodec_get_supported_type( - mediacodec, - codec_type, - encoder, - support_type, - ); - } - - late final _mediacodec_get_supported_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediacodec_h, ffi.Int32, ffi.Bool, - ffi.Pointer)>>('mediacodec_get_supported_type'); - late final _mediacodec_get_supported_type = - _mediacodec_get_supported_typePtr.asFunction< - int Function(mediacodec_h, int, bool, ffi.Pointer)>(); - - /// @brief Gets the media packet pool allocated for recycling media packets. - /// @details The user can get the pool allocated with the number of packets are required to be used in codecs.\n - /// It is recommended to use media packet pool for better stability and performance. - /// @since_tizen 3.0 - /// @remarks The @a pool should be released using media_packet_pool_deallocate() and destroyed using media_packet_pool_destroy(). - /// @param[in] mediacodec The mediacodec handle - /// @param[out] pool The allocated pool handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIACODEC_ERROR_NONE Successful - /// @retval #MEDIACODEC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIACODEC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIACODEC_ERROR_INVALID_OPERATION The user calls mediacodec_get_packet_pool() before calling mediacodec_prepare(). - /// @retval #MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE Not supported on device (Since 4.0) - /// @pre mediacodec_get_packet_pool() should be called after calling mediacodec_prepare(). - /// @post If the pool is used, media_packet_pool_deallocate() and media_packet_pool_destroy() should be called. - /// @see media_packet_pool_acquire_packet() - /// @see media_packet_pool_release_packet() - /// @see media_packet_pool_deallocate() - /// @see media_packet_pool_destroy() - int mediacodec_get_packet_pool( - mediacodec_h mediacodec, - ffi.Pointer pool, - ) { - return _mediacodec_get_packet_pool( - mediacodec, - pool, - ); - } - - late final _mediacodec_get_packet_poolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediacodec_h, - ffi.Pointer)>>('mediacodec_get_packet_pool'); - late final _mediacodec_get_packet_pool = - _mediacodec_get_packet_poolPtr.asFunction< - int Function(mediacodec_h, ffi.Pointer)>(); - - /// @brief Gets the name of the playlist. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @remarks The @a playlist_name should be released using free(). - /// - /// @param[in] playlist The handle to the media controller playlist - /// @param[out] playlist_name The name of the playlist - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @pre You can get playlist handle using mc_server_foreach_playlist() if you are media controller server, or mc_client_foreach_server_playlist() if you are media controller client. - /// - /// @see mc_server_foreach_playlist() - /// @see mc_client_foreach_server_playlist() - /// @see mc_playlist_destroy() - int mc_playlist_get_name( - mc_playlist_h playlist, - ffi.Pointer> playlist_name, - ) { - return _mc_playlist_get_name( - playlist, - playlist_name, - ); - } - - late final _mc_playlist_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_playlist_h, - ffi.Pointer>)>>('mc_playlist_get_name'); - late final _mc_playlist_get_name = _mc_playlist_get_namePtr.asFunction< - int Function(mc_playlist_h, ffi.Pointer>)>(); - - /// @brief Iterates through media items in a playlist. - /// @details This function gets all items in a playlist. - /// The callback function will be invoked for every retrieved playlist item. - /// If there are no items on the playlist, the callback will not be invoked. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @param[in] playlist The handle to the media controller playlist - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @pre You can get playlist handle using mc_server_foreach_playlist() if you are media controller server, or mc_client_foreach_server_playlist() if you are media controller client. - /// @post This function invokes mc_playlist_item_cb(). - /// - /// @see mc_server_foreach_playlist() - /// @see mc_client_foreach_server_playlist() - /// @see mc_playlist_item_cb() - /// @see mc_playlist_destroy() - int mc_playlist_foreach_item( - mc_playlist_h playlist, - mc_playlist_item_cb callback, - ffi.Pointer user_data, - ) { - return _mc_playlist_foreach_item( - playlist, - callback, - user_data, - ); - } - - late final _mc_playlist_foreach_itemPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_playlist_h, mc_playlist_item_cb, - ffi.Pointer)>>('mc_playlist_foreach_item'); - late final _mc_playlist_foreach_item = - _mc_playlist_foreach_itemPtr.asFunction< - int Function( - mc_playlist_h, mc_playlist_item_cb, ffi.Pointer)>(); - - /// @brief Clones a media controller playlist handle. - /// @details This function copies the media controller playlist handle from a source to - /// destination. The #mc_playlist_h is created internally and available through media controller playlist functions. - /// - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @remarks The @a dst should be released using mc_playlist_destroy(). - /// - /// @param[in] src The source handle to the media controller playlist - /// @param[out] dst The destination handle to the media controller playlist - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see mc_playlist_destroy() - int mc_playlist_clone( - mc_playlist_h src, - ffi.Pointer dst, - ) { - return _mc_playlist_clone( - src, - dst, - ); - } - - late final _mc_playlist_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_playlist_h, ffi.Pointer)>>('mc_playlist_clone'); - late final _mc_playlist_clone = _mc_playlist_clonePtr - .asFunction)>(); - - /// @brief Destroys a media controller playlist handle. - /// @details This function frees all resources related to the media controller playlist handle. This - /// handle no longer can be used to perform any operations. A new handle has to - /// be created before next usage. - /// - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @param[in] playlist The handle to the media controller playlist - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see mc_playlist_clone() - int mc_playlist_destroy( - mc_playlist_h playlist, - ) { - return _mc_playlist_destroy( - playlist, - ); - } - - late final _mc_playlist_destroyPtr = - _lookup>( - 'mc_playlist_destroy'); - late final _mc_playlist_destroy = - _mc_playlist_destroyPtr.asFunction(); - - /// @brief Clones a media controller metadata handle. - /// @details This function copies the media controller metadata handle from a source to - /// destination. The #mc_metadata_h is created internally and available through media controller metadata functions. - /// - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @remarks The @a dst should be released using @c mc_metadata_destroy(). - /// - /// @param[in] src The source handle to the media controller metadata - /// @param[out] dst The destination handle to the media controller metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see mc_metadata_destroy() - int mc_metadata_clone( - mc_metadata_h src, - ffi.Pointer dst, - ) { - return _mc_metadata_clone( - src, - dst, - ); - } - - late final _mc_metadata_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_metadata_h, ffi.Pointer)>>('mc_metadata_clone'); - late final _mc_metadata_clone = _mc_metadata_clonePtr - .asFunction)>(); - - /// @brief Destroys a media controller metadata handle. - /// @details This function frees all resources related to the media controller metadata handle. This - /// handle no longer can be used to perform any operations. A new handle has to - /// be created before next usage. - /// - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @param[in] metadata The handle to the media controller metadata - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see mc_metadata_clone() - int mc_metadata_destroy( - mc_metadata_h metadata, - ) { - return _mc_metadata_destroy( - metadata, - ); - } - - late final _mc_metadata_destroyPtr = - _lookup>( - 'mc_metadata_destroy'); - late final _mc_metadata_destroy = - _mc_metadata_destroyPtr.asFunction(); - - /// @brief Gets the metadata. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @remarks The @a value should be released using free(). \n - /// If the attribute value of the metadata is empty, return value is NULL. - /// - /// @param[in] metadata The handle to metadata - /// @param[in] attribute The key attribute name to get - /// @param[out] value The value of the attribute - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @pre Sets mc_client_set_metadata_update_cb() function to get the metadata if you are media controller client. \n - /// and also you can use this function when get the metadata when callback function invoked in @c mc_playlist_foreach_item(). - /// - /// @see mc_client_set_metadata_update_cb() - /// @see mc_playlist_foreach_item() - int mc_metadata_get( - mc_metadata_h metadata, - int attribute, - ffi.Pointer> value, - ) { - return _mc_metadata_get( - metadata, - attribute, - value, - ); - } - - late final _mc_metadata_getPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_metadata_h, ffi.Int32, - ffi.Pointer>)>>('mc_metadata_get'); - late final _mc_metadata_get = _mc_metadata_getPtr.asFunction< - int Function(mc_metadata_h, int, ffi.Pointer>)>(); - - /// @brief Clones a playback ability handle. - /// @details This function copies the playback ability handle from a source to - /// destination. The #mc_playback_ability_h is created internally and available through playback ability functions. - /// - /// @since_tizen 5.0 - /// - /// @remarks The @a dst should be released using @c mc_playback_ability_destroy(). - /// - /// @param[in] src The source handle to the playback ability - /// @param[out] dst The destination handle to the playback ability - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see mc_playback_ability_destroy() - int mc_playback_ability_clone( - mc_playback_ability_h src, - ffi.Pointer dst, - ) { - return _mc_playback_ability_clone( - src, - dst, - ); - } - - late final _mc_playback_ability_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_playback_ability_h, ffi.Pointer)>>( - 'mc_playback_ability_clone'); - late final _mc_playback_ability_clone = - _mc_playback_ability_clonePtr.asFunction< - int Function( - mc_playback_ability_h, ffi.Pointer)>(); - - /// @brief Destroys a playback ability handle. - /// @details This function frees all resources related to the playback ability handle. This - /// handle no longer can be used to perform any operations. A new handle has to - /// be created before next use. - /// - /// @since_tizen 5.0 - /// - /// @param[in] ability The handle to the playback ability - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see mc_playback_ability_clone() - int mc_playback_ability_destroy( - mc_playback_ability_h ability, - ) { - return _mc_playback_ability_destroy( - ability, - ); - } - - late final _mc_playback_ability_destroyPtr = - _lookup>( - 'mc_playback_ability_destroy'); - late final _mc_playback_ability_destroy = _mc_playback_ability_destroyPtr - .asFunction(); - - /// @brief Gets the support value of the playback ability. - /// @since_tizen 5.0 - /// - /// @remarks If the ability's support is not set, the result value is #MC_ABILITY_SUPPORTED_UNDECIDED. - /// - /// @param[in] ability The handle to ability - /// @param[in] action The playback action to get - /// @param[out] supported The support value of the ability - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @pre Call the mc_client_set_playback_ability_updated_cb() function to get the ability if you are the media controller client. - /// - /// @see mc_client_set_playback_ability_updated_cb() - /// @see mc_client_get_server_playback_ability() - int mc_playback_action_is_supported( - mc_playback_ability_h ability, - int action, - ffi.Pointer supported, - ) { - return _mc_playback_action_is_supported( - ability, - action, - supported, - ); - } - - late final _mc_playback_action_is_supportedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_playback_ability_h, ffi.Int32, - ffi.Pointer)>>('mc_playback_action_is_supported'); - late final _mc_playback_action_is_supported = - _mc_playback_action_is_supportedPtr.asFunction< - int Function(mc_playback_ability_h, int, ffi.Pointer)>(); - - /// @brief Creates a media controller search handle. - /// @since_tizen 5.0 - /// - /// @remarks The @a search should be released using @c mc_search_destroy(). - /// - /// @param[out] search The handle to search - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @see mc_search_set_condition() - /// @see mc_search_foreach_condition() - int mc_search_create( - ffi.Pointer search, - ) { - return _mc_search_create( - search, - ); - } - - late final _mc_search_createPtr = - _lookup)>>( - 'mc_search_create'); - late final _mc_search_create = - _mc_search_createPtr.asFunction)>(); - - /// @brief Sets the information to search. - /// @details Sets the information to search. You can set various search condition by calling this function for the same search handle. \n - /// But it's not allowed to set more than 20 conditions. If you try to set more than 20 conditions, this function will return #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER. - /// @since_tizen 5.0 - /// - /// @param[in] search The handle to search - /// @param[in] content_type The content type to search - /// @param[in] category The category to search - /// @param[in] search_keyword The key word to search - /// @param[in] data The extra data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @pre mc_search_create() - /// @see mc_search_foreach_condition() - int mc_search_set_condition( - mc_search_h search, - int content_type, - int category, - ffi.Pointer search_keyword, - ffi.Pointer data, - ) { - return _mc_search_set_condition( - search, - content_type, - category, - search_keyword, - data, - ); - } - - late final _mc_search_set_conditionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_search_h, - ffi.Int32, - ffi.Int32, - ffi.Pointer, - ffi.Pointer)>>('mc_search_set_condition'); - late final _mc_search_set_condition = _mc_search_set_conditionPtr.asFunction< - int Function( - mc_search_h, int, int, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys search. - /// @since_tizen 5.0 - /// @param[in] search The handle to search - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a media controller search handle by calling mc_search_create(). - /// @see mc_search_create() - int mc_search_destroy( - mc_search_h search, - ) { - return _mc_search_destroy( - search, - ); - } - - late final _mc_search_destroyPtr = - _lookup>( - 'mc_search_destroy'); - late final _mc_search_destroy = - _mc_search_destroyPtr.asFunction(); - - /// @brief Retrieves all search conditions. - /// @details This function gets all search conditions set. - /// The callback function will be invoked for every retrieved search condition. - /// If there were no search conditions set with mc_search_set_condition(), this function will return #MEDIA_CONTROLLER_ERROR_NONE, and the callback will not be invoked. - /// @since_tizen 5.0 - /// - /// @param[in] search The handle to search - /// @param[in] callback The callback function to be invoked. - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre Create a media controller search handle by calling mc_search_create(). - /// @pre Set the search conditions by calling mc_search_set_condition(). - /// @see mc_search_create() - /// @see mc_search_set_condition() - int mc_search_foreach_condition( - mc_search_h search, - mc_search_condition_cb callback, - ffi.Pointer user_data, - ) { - return _mc_search_foreach_condition( - search, - callback, - user_data, - ); - } - - late final _mc_search_foreach_conditionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_search_h, mc_search_condition_cb, - ffi.Pointer)>>('mc_search_foreach_condition'); - late final _mc_search_foreach_condition = - _mc_search_foreach_conditionPtr.asFunction< - int Function( - mc_search_h, mc_search_condition_cb, ffi.Pointer)>(); - - /// @brief Clones a media controller search handle. - /// @details This function copies the media controller search handle from a source to - /// destination. The #mc_search_h is created internally and available through media controller search functions. - /// - /// @since_tizen 5.0 - /// - /// @remarks The @a dst should be released using @c mc_search_destroy(). - /// - /// @param[in] src The source handle to the media controller search - /// @param[out] dst The destination handle to the media controller search - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see mc_search_destroy() - int mc_search_clone( - mc_search_h src, - ffi.Pointer dst, - ) { - return _mc_search_clone( - src, - dst, - ); - } - - late final _mc_search_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_search_h, ffi.Pointer)>>('mc_search_clone'); - late final _mc_search_clone = _mc_search_clonePtr - .asFunction)>(); - - /// @brief Creates a media controller server. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @remarks The @a server should be released using mc_server_destroy(). You can create only one server handle for each process. - /// - /// @param[out] server The handle to media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @see mc_server_destroy() - int mc_server_create( - ffi.Pointer server, - ) { - return _mc_server_create( - server, - ); - } - - late final _mc_server_createPtr = - _lookup)>>( - 'mc_server_create'); - late final _mc_server_create = - _mc_server_createPtr.asFunction)>(); - - /// @brief Sets the playback state to update the latest state info. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @param[in] state The state to set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @post Apply the updated playback information by calling mc_server_update_playback_info(). - /// @see mc_server_create() - /// @see mc_server_destroy() - /// @see mc_server_update_playback_info() - int mc_server_set_playback_state( - mc_server_h server, - int state, - ) { - return _mc_server_set_playback_state( - server, - state, - ); - } - - late final _mc_server_set_playback_statePtr = - _lookup>( - 'mc_server_set_playback_state'); - late final _mc_server_set_playback_state = _mc_server_set_playback_statePtr - .asFunction(); - - /// @brief Sets the playback position to update the latest playback info. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @param[in] position The position to set in milliseconds - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @post Apply the updated playback information by calling mc_server_update_playback_info(). - /// @see mc_server_create() - /// @see mc_server_destroy() - /// @see mc_server_update_playback_info() - int mc_server_set_playback_position( - mc_server_h server, - int position, - ) { - return _mc_server_set_playback_position( - server, - position, - ); - } - - late final _mc_server_set_playback_positionPtr = _lookup< - ffi - .NativeFunction>( - 'mc_server_set_playback_position'); - late final _mc_server_set_playback_position = - _mc_server_set_playback_positionPtr - .asFunction(); - - /// @deprecated Deprecated since 5.0. Use mc_server_set_playlist_item_info() instead. - /// @brief Sets the index of the current playing media in the playlist to update the latest playback info. - /// @details If a media controller server has a playlist, the server can register and share it with media controller client. A playlist is a set of "index" and "media metadata".\n - /// The media controller server can let media controller clients know the index of current playing media by using this function. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @param[in] index The index of the current playing media in the playlist - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @post Apply the updated playback information by calling mc_server_update_playback_info(). - /// @see mc_server_create() - /// @see mc_server_destroy() - /// @see mc_server_update_playback_info() - /// @see mc_server_create_playlist() - int mc_server_set_playlist_item_index( - mc_server_h server, - ffi.Pointer index, - ) { - return _mc_server_set_playlist_item_index( - server, - index, - ); - } - - late final _mc_server_set_playlist_item_indexPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_server_h, - ffi.Pointer)>>('mc_server_set_playlist_item_index'); - late final _mc_server_set_playlist_item_index = - _mc_server_set_playlist_item_indexPtr - .asFunction)>(); - - /// @brief Sets the playlist name and index of the current playing media in the playlist to update the latest playback info. - /// @details If a media controller server has a playlist, the server can register and share it with media controller client. A playlist is a set of "index" and "media metadata".\n - /// The media controller server can let media controller clients know the playlist name and index of current playing media by using this function. - /// @since_tizen 5.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @param[in] playlist_name The name of the playlist. The length of the playlist name should be less than 4096 bytes - /// @param[in] index The index of the current playing media in the playlist - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @post Apply the updated playback information by calling mc_server_update_playback_info(). - /// @see mc_server_create() - /// @see mc_server_destroy() - /// @see mc_server_update_playback_info() - /// @see mc_server_create_playlist() - int mc_server_set_playlist_item_info( - mc_server_h server, - ffi.Pointer playlist_name, - ffi.Pointer index, - ) { - return _mc_server_set_playlist_item_info( - server, - playlist_name, - index, - ); - } - - late final _mc_server_set_playlist_item_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_server_h, ffi.Pointer, - ffi.Pointer)>>('mc_server_set_playlist_item_info'); - late final _mc_server_set_playlist_item_info = - _mc_server_set_playlist_item_infoPtr.asFunction< - int Function( - mc_server_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the playback content type to update the latest playback info. - /// @details If this function is called, the updated content type information will be sent to all clients. - /// @since_tizen 5.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @param[in] content_type The content type to set the latest status - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @post Apply the updated playback information by calling mc_server_update_playback_info(). - /// @see mc_server_create() - /// @see mc_server_destroy() - /// @see mc_server_update_playback_info() - int mc_server_set_playback_content_type( - mc_server_h server, - int content_type, - ) { - return _mc_server_set_playback_content_type( - server, - content_type, - ); - } - - late final _mc_server_set_playback_content_typePtr = - _lookup>( - 'mc_server_set_playback_content_type'); - late final _mc_server_set_playback_content_type = - _mc_server_set_playback_content_typePtr - .asFunction(); - - /// @brief Sets the content age rating to update the latest playback info. - /// @details If this function is called, the updated age rating information will be sent to all clients. Default value is #MC_CONTENT_RATING_ALL. - /// @since_tizen 5.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @param[in] age_rating Age rating of the content - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @post Apply the updated age rating information by calling mc_server_update_playback_info(). - /// @see mc_server_create() - /// @see mc_server_destroy() - /// @see mc_server_update_playback_info() - int mc_server_set_content_age_rating( - mc_server_h server, - int age_rating, - ) { - return _mc_server_set_content_age_rating( - server, - age_rating, - ); - } - - late final _mc_server_set_content_age_ratingPtr = - _lookup>( - 'mc_server_set_content_age_rating'); - late final _mc_server_set_content_age_rating = - _mc_server_set_content_age_ratingPtr - .asFunction(); - - /// @brief Updates the modified playback info. - /// @details If this function is called, the updated playback information will be sent to the controller. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_update_playback_info( - mc_server_h server, - ) { - return _mc_server_update_playback_info( - server, - ); - } - - late final _mc_server_update_playback_infoPtr = - _lookup>( - 'mc_server_update_playback_info'); - late final _mc_server_update_playback_info = - _mc_server_update_playback_infoPtr - .asFunction(); - - /// @brief Sets the metadata to update the latest metadata info. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @param[in] attribute The key attribute name to set - /// @param[in] value The value of the attribute - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @post Apply the updated metadata information by calling mc_server_update_metadata(). - /// @see mc_server_create() - /// @see mc_server_destroy() - /// @see mc_server_update_metadata() - int mc_server_set_metadata( - mc_server_h server, - int attribute, - ffi.Pointer value, - ) { - return _mc_server_set_metadata( - server, - attribute, - value, - ); - } - - late final _mc_server_set_metadataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_server_h, ffi.Int32, - ffi.Pointer)>>('mc_server_set_metadata'); - late final _mc_server_set_metadata = _mc_server_set_metadataPtr - .asFunction)>(); - - /// @brief Updates the modified metadata info. - /// @details If this function is called, the updated metadata will be sent to all clients. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_update_metadata( - mc_server_h server, - ) { - return _mc_server_update_metadata( - server, - ); - } - - late final _mc_server_update_metadataPtr = - _lookup>( - 'mc_server_update_metadata'); - late final _mc_server_update_metadata = - _mc_server_update_metadataPtr.asFunction(); - - /// @brief Updates the modified shuffle mode. - /// @details If this function is called, the updated mode information will be sent to all clients. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @param[in] mode The shuffle mode to update the latest status - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_update_shuffle_mode( - mc_server_h server, - int mode, - ) { - return _mc_server_update_shuffle_mode( - server, - mode, - ); - } - - late final _mc_server_update_shuffle_modePtr = - _lookup>( - 'mc_server_update_shuffle_mode'); - late final _mc_server_update_shuffle_mode = _mc_server_update_shuffle_modePtr - .asFunction(); - - /// @brief Updates the modified repeat mode. - /// @details If this function is called, the updated mode information will be sent to all clients. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @param[in] mode The repeat mode to update the latest status - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_update_repeat_mode( - mc_server_h server, - int mode, - ) { - return _mc_server_update_repeat_mode( - server, - mode, - ); - } - - late final _mc_server_update_repeat_modePtr = - _lookup>( - 'mc_server_update_repeat_mode'); - late final _mc_server_update_repeat_mode = _mc_server_update_repeat_modePtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. Use mc_server_set_playback_action_cmd_received_cb() instead. - /// @brief Sets the callback for receiving playback state command from client. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @param[in] callback The callback to be invoked when media controller server receives playback command from client. - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_set_playback_state_command_received_cb( - mc_server_h server, - mc_server_playback_state_command_received_cb callback, - ffi.Pointer user_data, - ) { - return _mc_server_set_playback_state_command_received_cb( - server, - callback, - user_data, - ); - } - - late final _mc_server_set_playback_state_command_received_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_server_h, - mc_server_playback_state_command_received_cb, - ffi.Pointer)>>( - 'mc_server_set_playback_state_command_received_cb'); - late final _mc_server_set_playback_state_command_received_cb = - _mc_server_set_playback_state_command_received_cbPtr.asFunction< - int Function( - mc_server_h, - mc_server_playback_state_command_received_cb, - ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. Use mc_server_unset_playback_action_cmd_received_cb() instead. - /// @brief Unsets the callback for receiving playback state command from client. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_unset_playback_state_command_received_cb( - mc_server_h server, - ) { - return _mc_server_unset_playback_state_command_received_cb( - server, - ); - } - - late final _mc_server_unset_playback_state_command_received_cbPtr = - _lookup>( - 'mc_server_unset_playback_state_command_received_cb'); - late final _mc_server_unset_playback_state_command_received_cb = - _mc_server_unset_playback_state_command_received_cbPtr - .asFunction(); - - /// @brief Sets the callback for receiving playback action command from client. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @param[in] callback The callback to be invoked when media controller server receives playback action from client. - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_set_playback_action_cmd_received_cb( - mc_server_h server, - mc_server_playback_action_cmd_received_cb callback, - ffi.Pointer user_data, - ) { - return _mc_server_set_playback_action_cmd_received_cb( - server, - callback, - user_data, - ); - } - - late final _mc_server_set_playback_action_cmd_received_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_server_h, - mc_server_playback_action_cmd_received_cb, - ffi.Pointer)>>( - 'mc_server_set_playback_action_cmd_received_cb'); - late final _mc_server_set_playback_action_cmd_received_cb = - _mc_server_set_playback_action_cmd_received_cbPtr.asFunction< - int Function(mc_server_h, mc_server_playback_action_cmd_received_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback for receiving playback action command from client. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_unset_playback_action_cmd_received_cb( - mc_server_h server, - ) { - return _mc_server_unset_playback_action_cmd_received_cb( - server, - ); - } - - late final _mc_server_unset_playback_action_cmd_received_cbPtr = - _lookup>( - 'mc_server_unset_playback_action_cmd_received_cb'); - late final _mc_server_unset_playback_action_cmd_received_cb = - _mc_server_unset_playback_action_cmd_received_cbPtr - .asFunction(); - - /// @brief Sets the callback for receiving playback position command from client. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @param[in] callback The callback to be invoked when media controller server receives position command from client. - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_set_playback_position_cmd_received_cb( - mc_server_h server, - mc_server_playback_position_cmd_received_cb callback, - ffi.Pointer user_data, - ) { - return _mc_server_set_playback_position_cmd_received_cb( - server, - callback, - user_data, - ); - } - - late final _mc_server_set_playback_position_cmd_received_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_server_h, - mc_server_playback_position_cmd_received_cb, - ffi.Pointer)>>( - 'mc_server_set_playback_position_cmd_received_cb'); - late final _mc_server_set_playback_position_cmd_received_cb = - _mc_server_set_playback_position_cmd_received_cbPtr.asFunction< - int Function(mc_server_h, mc_server_playback_position_cmd_received_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback for receiving playback position command from client. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_unset_playback_position_cmd_received_cb( - mc_server_h server, - ) { - return _mc_server_unset_playback_position_cmd_received_cb( - server, - ); - } - - late final _mc_server_unset_playback_position_cmd_received_cbPtr = - _lookup>( - 'mc_server_unset_playback_position_cmd_received_cb'); - late final _mc_server_unset_playback_position_cmd_received_cb = - _mc_server_unset_playback_position_cmd_received_cbPtr - .asFunction(); - - /// @brief Sets the callback for receiving shuffle mode command from client. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @param[in] callback The callback to be invoked when media controller server receives shuffle mode from client. - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_set_shuffle_mode_cmd_received_cb( - mc_server_h server, - mc_server_shuffle_mode_cmd_received_cb callback, - ffi.Pointer user_data, - ) { - return _mc_server_set_shuffle_mode_cmd_received_cb( - server, - callback, - user_data, - ); - } - - late final _mc_server_set_shuffle_mode_cmd_received_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_server_h, - mc_server_shuffle_mode_cmd_received_cb, - ffi.Pointer)>>( - 'mc_server_set_shuffle_mode_cmd_received_cb'); - late final _mc_server_set_shuffle_mode_cmd_received_cb = - _mc_server_set_shuffle_mode_cmd_received_cbPtr.asFunction< - int Function(mc_server_h, mc_server_shuffle_mode_cmd_received_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback for receiving shuffle mode command from client. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_unset_shuffle_mode_cmd_received_cb( - mc_server_h server, - ) { - return _mc_server_unset_shuffle_mode_cmd_received_cb( - server, - ); - } - - late final _mc_server_unset_shuffle_mode_cmd_received_cbPtr = - _lookup>( - 'mc_server_unset_shuffle_mode_cmd_received_cb'); - late final _mc_server_unset_shuffle_mode_cmd_received_cb = - _mc_server_unset_shuffle_mode_cmd_received_cbPtr - .asFunction(); - - /// @brief Sets the callback for receiving repeat mode command from client. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @param[in] callback The callback to be invoked when media controller server receives repeat mode from client. - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_set_repeat_mode_cmd_received_cb( - mc_server_h server, - mc_server_repeat_mode_cmd_received_cb callback, - ffi.Pointer user_data, - ) { - return _mc_server_set_repeat_mode_cmd_received_cb( - server, - callback, - user_data, - ); - } - - late final _mc_server_set_repeat_mode_cmd_received_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_server_h, - mc_server_repeat_mode_cmd_received_cb, - ffi.Pointer)>>( - 'mc_server_set_repeat_mode_cmd_received_cb'); - late final _mc_server_set_repeat_mode_cmd_received_cb = - _mc_server_set_repeat_mode_cmd_received_cbPtr.asFunction< - int Function(mc_server_h, mc_server_repeat_mode_cmd_received_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback for receiving repeat mode command from client. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_unset_repeat_mode_cmd_received_cb( - mc_server_h server, - ) { - return _mc_server_unset_repeat_mode_cmd_received_cb( - server, - ); - } - - late final _mc_server_unset_repeat_mode_cmd_received_cbPtr = - _lookup>( - 'mc_server_unset_repeat_mode_cmd_received_cb'); - late final _mc_server_unset_repeat_mode_cmd_received_cb = - _mc_server_unset_repeat_mode_cmd_received_cbPtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. Use mc_server_set_custom_cmd_received_cb() instead. - /// @brief Sets the callback for receiving custom command from client. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @param[in] callback The callback to be invoked when media controller server receives custom command from client. - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_set_custom_command_received_cb( - mc_server_h server, - mc_server_custom_command_received_cb callback, - ffi.Pointer user_data, - ) { - return _mc_server_set_custom_command_received_cb( - server, - callback, - user_data, - ); - } - - late final _mc_server_set_custom_command_received_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_server_h, - mc_server_custom_command_received_cb, - ffi.Pointer)>>( - 'mc_server_set_custom_command_received_cb'); - late final _mc_server_set_custom_command_received_cb = - _mc_server_set_custom_command_received_cbPtr.asFunction< - int Function(mc_server_h, mc_server_custom_command_received_cb, - ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. Use mc_server_unset_custom_cmd_received_cb() instead. - /// @brief Unsets the callback for receiving custom command from client. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_unset_custom_command_received_cb( - mc_server_h server, - ) { - return _mc_server_unset_custom_command_received_cb( - server, - ); - } - - late final _mc_server_unset_custom_command_received_cbPtr = - _lookup>( - 'mc_server_unset_custom_command_received_cb'); - late final _mc_server_unset_custom_command_received_cb = - _mc_server_unset_custom_command_received_cbPtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. Use mc_server_send_cmd_reply() instead. - /// @brief Sends a reply for the requested command to the client. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @remarks When server receive command, this function can be called by mc_server_custom_command_received_cb(). - /// - /// @param[in] server The handle to media controller server - /// @param[in] client_name The app_id of the media controller client - /// @param[in] result_code The result code of custom command - /// @param[in] data The extra data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @pre mc_server_set_custom_command_received_cb() - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_send_command_reply( - mc_server_h server, - ffi.Pointer client_name, - int result_code, - ffi.Pointer data, - ) { - return _mc_server_send_command_reply( - server, - client_name, - result_code, - data, - ); - } - - late final _mc_server_send_command_replyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_server_h, ffi.Pointer, ffi.Int, - ffi.Pointer)>>('mc_server_send_command_reply'); - late final _mc_server_send_command_reply = - _mc_server_send_command_replyPtr.asFunction< - int Function( - mc_server_h, ffi.Pointer, int, ffi.Pointer)>(); - - /// @brief Sets the callback for receiving playlist command from client. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @param[in] callback The callback to be invoked when media controller server receives playlist command from client. - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_set_playlist_cmd_received_cb( - mc_server_h server, - mc_server_playlist_cmd_received_cb callback, - ffi.Pointer user_data, - ) { - return _mc_server_set_playlist_cmd_received_cb( - server, - callback, - user_data, - ); - } - - late final _mc_server_set_playlist_cmd_received_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_server_h, mc_server_playlist_cmd_received_cb, - ffi.Pointer)>>( - 'mc_server_set_playlist_cmd_received_cb'); - late final _mc_server_set_playlist_cmd_received_cb = - _mc_server_set_playlist_cmd_received_cbPtr.asFunction< - int Function(mc_server_h, mc_server_playlist_cmd_received_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback for receiving playlist command from client. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_unset_playlist_cmd_received_cb( - mc_server_h server, - ) { - return _mc_server_unset_playlist_cmd_received_cb( - server, - ); - } - - late final _mc_server_unset_playlist_cmd_received_cbPtr = - _lookup>( - 'mc_server_unset_playlist_cmd_received_cb'); - late final _mc_server_unset_playlist_cmd_received_cb = - _mc_server_unset_playlist_cmd_received_cbPtr - .asFunction(); - - /// @brief Sets the callback for receiving custom command from client. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @param[in] callback The callback to be invoked when media controller server receives custom command from client. - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_set_custom_cmd_received_cb( - mc_server_h server, - mc_server_custom_cmd_received_cb callback, - ffi.Pointer user_data, - ) { - return _mc_server_set_custom_cmd_received_cb( - server, - callback, - user_data, - ); - } - - late final _mc_server_set_custom_cmd_received_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_server_h, mc_server_custom_cmd_received_cb, - ffi.Pointer)>>('mc_server_set_custom_cmd_received_cb'); - late final _mc_server_set_custom_cmd_received_cb = - _mc_server_set_custom_cmd_received_cbPtr.asFunction< - int Function(mc_server_h, mc_server_custom_cmd_received_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback for receiving custom command from client. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_unset_custom_cmd_received_cb( - mc_server_h server, - ) { - return _mc_server_unset_custom_cmd_received_cb( - server, - ); - } - - late final _mc_server_unset_custom_cmd_received_cbPtr = - _lookup>( - 'mc_server_unset_custom_cmd_received_cb'); - late final _mc_server_unset_custom_cmd_received_cb = - _mc_server_unset_custom_cmd_received_cbPtr - .asFunction(); - - /// @brief Replies the result of the requested command to the client. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @remarks When the server receives a command, this function can be called by mc_server_playback_action_cmd_received_cb(), mc_server_playback_position_cmd_received_cb(), mc_server_shuffle_mode_cmd_received_cb(), mc_server_repeat_mode_cmd_received_cb(), mc_server_playlist_cmd_received_cb() and mc_server_custom_cmd_received_cb().\n - /// If @a request_id is null, this function will return #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER. - /// - /// @param[in] server The handle to media controller server - /// @param[in] client_name The app_id of the media controller client - /// @param[in] request_id The id of the command request, received in the mc_server_custom_cmd_received_cb() function. - /// @param[in] result_code The result code of custom command - /// @param[in] data The extra data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_playback_action_cmd_received_cb() - /// @see mc_server_playback_position_cmd_received_cb() - /// @see mc_server_shuffle_mode_cmd_received_cb() - /// @see mc_server_repeat_mode_cmd_received_cb() - /// @see mc_server_playlist_cmd_received_cb() - /// @see mc_server_custom_cmd_received_cb() - /// @see mc_server_destroy() - int mc_server_send_cmd_reply( - mc_server_h server, - ffi.Pointer client_name, - ffi.Pointer request_id, - int result_code, - ffi.Pointer data, - ) { - return _mc_server_send_cmd_reply( - server, - client_name, - request_id, - result_code, - data, - ); - } - - late final _mc_server_send_cmd_replyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_server_h, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer)>>('mc_server_send_cmd_reply'); - late final _mc_server_send_cmd_reply = - _mc_server_send_cmd_replyPtr.asFunction< - int Function(mc_server_h, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - /// @brief Retrieves all created clients. - /// @details This function gets all created media controller clients. - /// The callback function will be invoked for every created media controller client. - /// If there are no media controller clients, the callback will not be invoked. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @param[in] callback The callback function to be invoked, will be called for each client - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_activated_client_cb() - /// @see mc_server_destroy() - int mc_server_foreach_client( - mc_server_h server, - mc_activated_client_cb callback, - ffi.Pointer user_data, - ) { - return _mc_server_foreach_client( - server, - callback, - user_data, - ); - } - - late final _mc_server_foreach_clientPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_server_h, mc_activated_client_cb, - ffi.Pointer)>>('mc_server_foreach_client'); - late final _mc_server_foreach_client = - _mc_server_foreach_clientPtr.asFunction< - int Function( - mc_server_h, mc_activated_client_cb, ffi.Pointer)>(); - - /// @brief Sends the customized event with the bundle data. - /// @details If the event is needed in the client, this function should be called. @a data is a bundle. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @remarks The @a request_id should be released using free().\n - /// If the @a request_id is null, the client will not send the reply of the custom event. - /// - /// @param[in] server The handle to media controller server - /// @param[in] client_name The name of the client which receive the event - /// @param[in] event The name of the event - /// @param[in] data The data can include other information associated with the event - /// @param[out] request_id The id of the event request, it will be passed to the mc_server_event_reply_received_cb() function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_event_reply_received_cb() - /// @see mc_server_set_event_reply_received_cb() - /// @see mc_server_destroy() - int mc_server_send_custom_event( - mc_server_h server, - ffi.Pointer client_name, - ffi.Pointer event, - ffi.Pointer data, - ffi.Pointer> request_id, - ) { - return _mc_server_send_custom_event( - server, - client_name, - event, - data, - request_id, - ); - } - - late final _mc_server_send_custom_eventPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_server_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>( - 'mc_server_send_custom_event'); - late final _mc_server_send_custom_event = - _mc_server_send_custom_eventPtr.asFunction< - int Function( - mc_server_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Sets the callback for receiving the result of the event from the media controller client. - /// @details The media controller server which calls this function will receive the result of the event from all media controller clients. - /// The media controller server can send event by using mc_server_send_custom_event(). - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to the media controller server - /// @param[in] callback The callback to be invoked when the reply is received - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @pre mc_server_send_custom_event(). - /// @see mc_server_create() - /// @see mc_server_unset_event_reply_received_cb() - /// @see mc_server_destroy() - int mc_server_set_event_reply_received_cb( - mc_server_h server, - mc_server_event_reply_received_cb callback, - ffi.Pointer user_data, - ) { - return _mc_server_set_event_reply_received_cb( - server, - callback, - user_data, - ); - } - - late final _mc_server_set_event_reply_received_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_server_h, mc_server_event_reply_received_cb, - ffi.Pointer)>>('mc_server_set_event_reply_received_cb'); - late final _mc_server_set_event_reply_received_cb = - _mc_server_set_event_reply_received_cbPtr.asFunction< - int Function(mc_server_h, mc_server_event_reply_received_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback for receiving event reply of the media controller client. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to the media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_server_create() - /// @see mc_server_set_event_reply_received_cb() - /// @see mc_server_destroy() - int mc_server_unset_event_reply_received_cb( - mc_server_h server, - ) { - return _mc_server_unset_event_reply_received_cb( - server, - ); - } - - late final _mc_server_unset_event_reply_received_cbPtr = - _lookup>( - 'mc_server_unset_event_reply_received_cb'); - late final _mc_server_unset_event_reply_received_cb = - _mc_server_unset_event_reply_received_cbPtr - .asFunction(); - - /// @brief Sets the callback for receiving search command from client. - /// @since_tizen 5.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @param[in] callback The callback to be invoked when media controller server receives search command from client. - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_set_search_cmd_received_cb( - mc_server_h server, - mc_server_search_cmd_received_cb callback, - ffi.Pointer user_data, - ) { - return _mc_server_set_search_cmd_received_cb( - server, - callback, - user_data, - ); - } - - late final _mc_server_set_search_cmd_received_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_server_h, mc_server_search_cmd_received_cb, - ffi.Pointer)>>('mc_server_set_search_cmd_received_cb'); - late final _mc_server_set_search_cmd_received_cb = - _mc_server_set_search_cmd_received_cbPtr.asFunction< - int Function(mc_server_h, mc_server_search_cmd_received_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback for receiving search command from client. - /// @since_tizen 5.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - /// @see mc_server_set_search_cmd_received_cb() - int mc_server_unset_search_cmd_received_cb( - mc_server_h server, - ) { - return _mc_server_unset_search_cmd_received_cb( - server, - ); - } - - late final _mc_server_unset_search_cmd_received_cbPtr = - _lookup>( - 'mc_server_unset_search_cmd_received_cb'); - late final _mc_server_unset_search_cmd_received_cb = - _mc_server_unset_search_cmd_received_cbPtr - .asFunction(); - - /// @brief Destroys media controller server. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] server The handle to media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - int mc_server_destroy( - mc_server_h server, - ) { - return _mc_server_destroy( - server, - ); - } - - late final _mc_server_destroyPtr = - _lookup>( - 'mc_server_destroy'); - late final _mc_server_destroy = - _mc_server_destroyPtr.asFunction(); - - /// @brief Creates a new playlist with the given name. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @remarks The @a playlist should be released using mc_playlist_destroy(). - /// When the server is destroyed, all its playlists will be deleted automatically. - /// - /// @param[in] server The handle to media controller server - /// @param[in] playlist_name The name of the created playlist. It should not be NULL. - /// @param[out] playlist The handle to the media controller playlist - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @post You can call mc_server_add_item_to_playlist() if you have items to add in the playlist and should call @c mc_server_update_playlist_done() to register it. - /// @see mc_server_create() - /// @see mc_server_destroy() - /// @see mc_server_add_item_to_playlist() - /// @see mc_server_update_playlist_done() - /// @see mc_server_delete_playlist() - /// @see mc_playlist_destroy() - int mc_server_create_playlist( - mc_server_h server, - ffi.Pointer playlist_name, - ffi.Pointer playlist, - ) { - return _mc_server_create_playlist( - server, - playlist_name, - playlist, - ); - } - - late final _mc_server_create_playlistPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_server_h, ffi.Pointer, - ffi.Pointer)>>('mc_server_create_playlist'); - late final _mc_server_create_playlist = - _mc_server_create_playlistPtr.asFunction< - int Function(mc_server_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Adds a new item to the playlist. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @remarks It's possible to add at most 100 items at once. \n - /// If you have more items, register the first 100 items by calling mc_server_update_playlist_done(), then add the remaining items. - /// - /// @param[in] server The handle to media controller server - /// @param[in] playlist The handle to the media controller playlist - /// @param[in] index The index of the playlist item. It should not be NULL - /// @param[in] attribute The key attribute name to set - /// @param[in] value The value of the attribute - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @pre Create a media controller playlist handle by calling mc_server_create_playlist(). - /// @post You should call @c mc_server_update_playlist_done() to register it. - /// @see mc_server_create() - /// @see mc_server_destroy() - /// @see mc_server_create_playlist() - /// @see mc_server_update_playlist_done() - /// @see mc_playlist_destroy() - int mc_server_add_item_to_playlist( - mc_server_h server, - mc_playlist_h playlist, - ffi.Pointer index, - int attribute, - ffi.Pointer value, - ) { - return _mc_server_add_item_to_playlist( - server, - playlist, - index, - attribute, - value, - ); - } - - late final _mc_server_add_item_to_playlistPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_server_h, - mc_playlist_h, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('mc_server_add_item_to_playlist'); - late final _mc_server_add_item_to_playlist = - _mc_server_add_item_to_playlistPtr.asFunction< - int Function(mc_server_h, mc_playlist_h, ffi.Pointer, int, - ffi.Pointer)>(); - - /// @brief Registers items to the playlist. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @param[in] playlist The handle to the media controller playlist - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @pre Create a media controller playlist handle by calling mc_server_create_playlist(). - /// @see mc_server_create() - /// @see mc_server_destroy() - /// @see mc_server_create_playlist() - /// @see mc_playlist_destroy() - int mc_server_update_playlist_done( - mc_server_h server, - mc_playlist_h playlist, - ) { - return _mc_server_update_playlist_done( - server, - playlist, - ); - } - - late final _mc_server_update_playlist_donePtr = - _lookup>( - 'mc_server_update_playlist_done'); - late final _mc_server_update_playlist_done = - _mc_server_update_playlist_donePtr - .asFunction(); - - /// @brief Deletes the playlist of the media controller server. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @param[in] playlist The handle to the media controller playlist - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @pre Create a media controller playlist handle by calling mc_server_create_playlist(). - /// @see mc_server_create() - /// @see mc_server_destroy() - /// @see mc_server_create_playlist() - /// @see mc_playlist_destroy() - int mc_server_delete_playlist( - mc_server_h server, - mc_playlist_h playlist, - ) { - return _mc_server_delete_playlist( - server, - playlist, - ); - } - - late final _mc_server_delete_playlistPtr = - _lookup>( - 'mc_server_delete_playlist'); - late final _mc_server_delete_playlist = _mc_server_delete_playlistPtr - .asFunction(); - - /// @brief Retrieves all playlists of the media controller server. - /// @details This function gets all playlists of the media controller server. - /// The callback function will be invoked for every retrieved playlist. - /// If there are no playlists, callback will not be invoked. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @param[in] callback The callback function to be invoked, will be called for each playlist - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - /// @see mc_playlist_cb() - int mc_server_foreach_playlist( - mc_server_h server, - mc_playlist_cb callback, - ffi.Pointer user_data, - ) { - return _mc_server_foreach_playlist( - server, - callback, - user_data, - ); - } - - late final _mc_server_foreach_playlistPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_server_h, mc_playlist_cb, - ffi.Pointer)>>('mc_server_foreach_playlist'); - late final _mc_server_foreach_playlist = - _mc_server_foreach_playlistPtr.asFunction< - int Function(mc_server_h, mc_playlist_cb, ffi.Pointer)>(); - - /// @brief Sets the playback ability's support of the media controller. - /// @since_tizen 5.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @remarks If @a support is #MC_ABILITY_SUPPORTED_UNDECIDED, this function will return #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER. - /// - /// @param[in] server The handle to media controller server - /// @param[in] action The playback action - /// @param[in] support The support value of the ability - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @post Update abilities of a media controller server by calling mc_server_update_playback_ability(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_set_playback_ability( - mc_server_h server, - int action, - int support, - ) { - return _mc_server_set_playback_ability( - server, - action, - support, - ); - } - - late final _mc_server_set_playback_abilityPtr = _lookup< - ffi - .NativeFunction>( - 'mc_server_set_playback_ability'); - late final _mc_server_set_playback_ability = - _mc_server_set_playback_abilityPtr - .asFunction(); - - /// @brief Updates the modified ability info. - /// @details If this function is called, the updated ability will be sent to all clients. - /// @since_tizen 5.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @param[in] server The handle to media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @pre Set abilities of a media controller server by calling mc_server_set_playback_ability(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_update_playback_ability( - mc_server_h server, - ) { - return _mc_server_update_playback_ability( - server, - ); - } - - late final _mc_server_update_playback_abilityPtr = - _lookup>( - 'mc_server_update_playback_ability'); - late final _mc_server_update_playback_ability = - _mc_server_update_playback_abilityPtr - .asFunction(); - - /// @brief Sets the shuffle ability's support of the media controller. - /// @since_tizen 5.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @remarks If @a support is #MC_ABILITY_SUPPORTED_UNDECIDED, this function will return #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER. - /// - /// @param[in] server The handle to media controller server - /// @param[in] support The support value of the ability - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_set_shuffle_ability( - mc_server_h server, - int support, - ) { - return _mc_server_set_shuffle_ability( - server, - support, - ); - } - - late final _mc_server_set_shuffle_abilityPtr = - _lookup>( - 'mc_server_set_shuffle_ability'); - late final _mc_server_set_shuffle_ability = _mc_server_set_shuffle_abilityPtr - .asFunction(); - - /// @brief Sets the repeat ability's support of the media controller. - /// @since_tizen 5.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @remarks If @a support is #MC_ABILITY_SUPPORTED_UNDECIDED, this function will return #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER. - /// - /// @param[in] server The handle to media controller server - /// @param[in] support The support value of the ability - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_set_repeat_ability( - mc_server_h server, - int support, - ) { - return _mc_server_set_repeat_ability( - server, - support, - ); - } - - late final _mc_server_set_repeat_abilityPtr = - _lookup>( - 'mc_server_set_repeat_ability'); - late final _mc_server_set_repeat_ability = _mc_server_set_repeat_abilityPtr - .asFunction(); - - /// @brief Sets the icon URI of media controller server. - /// @since_tizen 5.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.server - /// - /// @remarks It's possible to set URI to NULL if there is no icon. - /// - /// @param[in] server The handle to media controller server - /// @param[in] uri The icon URI - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_server_create() - /// @see mc_server_destroy() - int mc_server_set_icon( - mc_server_h server, - ffi.Pointer uri, - ) { - return _mc_server_set_icon( - server, - uri, - ); - } - - late final _mc_server_set_iconPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_server_h, ffi.Pointer)>>('mc_server_set_icon'); - late final _mc_server_set_icon = _mc_server_set_iconPtr - .asFunction)>(); - - /// @brief Creates a media controller client. - /// @details The media controller client binds the latest media controller server when handlers are created. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @remarks The @a client should be released using @c mc_client_destroy(). You can create only one client handle for each process. - /// - /// @param[out] client The handle to the media controller client - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @see mc_client_destroy() - int mc_client_create( - ffi.Pointer client, - ) { - return _mc_client_create( - client, - ); - } - - late final _mc_client_createPtr = - _lookup)>>( - 'mc_client_create'); - late final _mc_client_create = - _mc_client_createPtr.asFunction)>(); - - /// @deprecated Deprecated since 4.0. Use mc_client_set_server_updated_cb() instead. - /// @brief Sets the callback for monitoring status of the media controller server. - /// @details The media controller client which calls this function will receive notifications from all media controller servers. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @param[in] callback The callback to be invoked when the media controller server status is changed - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_set_server_update_cb( - mc_client_h client, - mc_server_state_updated_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_set_server_update_cb( - client, - callback, - user_data, - ); - } - - late final _mc_client_set_server_update_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, mc_server_state_updated_cb, - ffi.Pointer)>>('mc_client_set_server_update_cb'); - late final _mc_client_set_server_update_cb = - _mc_client_set_server_update_cbPtr.asFunction< - int Function(mc_client_h, mc_server_state_updated_cb, - ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. Use mc_client_unset_server_updated_cb() instead. - /// @brief Unsets the callback for monitoring status of the media controller server. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_unset_server_update_cb( - mc_client_h client, - ) { - return _mc_client_unset_server_update_cb( - client, - ); - } - - late final _mc_client_unset_server_update_cbPtr = - _lookup>( - 'mc_client_unset_server_update_cb'); - late final _mc_client_unset_server_update_cb = - _mc_client_unset_server_update_cbPtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. Use mc_client_set_playback_updated_cb() instead. - /// @brief Sets the callback for monitoring playback status of the media controller server. - /// @details The media controller client which calls this function will receive notifications from all media controller servers. \n - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @param[in] callback The callback to be invoked when the playback status is changed - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_set_playback_update_cb( - mc_client_h client, - mc_playback_updated_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_set_playback_update_cb( - client, - callback, - user_data, - ); - } - - late final _mc_client_set_playback_update_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, mc_playback_updated_cb, - ffi.Pointer)>>('mc_client_set_playback_update_cb'); - late final _mc_client_set_playback_update_cb = - _mc_client_set_playback_update_cbPtr.asFunction< - int Function( - mc_client_h, mc_playback_updated_cb, ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. Use mc_client_unset_playback_updated_cb() instead. - /// @brief Unsets the callback for monitoring playback status of the media controller server. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_unset_playback_update_cb( - mc_client_h client, - ) { - return _mc_client_unset_playback_update_cb( - client, - ); - } - - late final _mc_client_unset_playback_update_cbPtr = - _lookup>( - 'mc_client_unset_playback_update_cb'); - late final _mc_client_unset_playback_update_cb = - _mc_client_unset_playback_update_cbPtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. Use mc_client_set_metadata_updated_cb() instead. - /// @brief Sets the callback for monitoring metadata status of the media controller server. - /// @details The media controller client which calls this function will receive notifications from all media controller servers. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @param[in] callback The callback to be invoked when the metadata status is changed - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_set_metadata_update_cb( - mc_client_h client, - mc_metadata_updated_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_set_metadata_update_cb( - client, - callback, - user_data, - ); - } - - late final _mc_client_set_metadata_update_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, mc_metadata_updated_cb, - ffi.Pointer)>>('mc_client_set_metadata_update_cb'); - late final _mc_client_set_metadata_update_cb = - _mc_client_set_metadata_update_cbPtr.asFunction< - int Function( - mc_client_h, mc_metadata_updated_cb, ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. Use mc_client_unset_metadata_updated_cb() instead. - /// @brief Unsets the callback for monitoring metadata status of the media controller server. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_unset_metadata_update_cb( - mc_client_h client, - ) { - return _mc_client_unset_metadata_update_cb( - client, - ); - } - - late final _mc_client_unset_metadata_update_cbPtr = - _lookup>( - 'mc_client_unset_metadata_update_cb'); - late final _mc_client_unset_metadata_update_cb = - _mc_client_unset_metadata_update_cbPtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. Use mc_client_set_shuffle_mode_updated_cb() instead. - /// @brief Sets the callback for monitoring shuffle mode of the media controller server. - /// @details The media controller client which calls this function will receive notifications from all media controller servers. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @param[in] callback The callback to be invoked when the shuffle mode is changed - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_set_shuffle_mode_update_cb( - mc_client_h client, - mc_shuffle_mode_changed_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_set_shuffle_mode_update_cb( - client, - callback, - user_data, - ); - } - - late final _mc_client_set_shuffle_mode_update_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, mc_shuffle_mode_changed_cb, - ffi.Pointer)>>('mc_client_set_shuffle_mode_update_cb'); - late final _mc_client_set_shuffle_mode_update_cb = - _mc_client_set_shuffle_mode_update_cbPtr.asFunction< - int Function(mc_client_h, mc_shuffle_mode_changed_cb, - ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. Use mc_client_unset_shuffle_mode_updated_cb() instead. - /// @brief Unsets the callback for monitoring shuffle mode of the media controller server. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_unset_shuffle_mode_update_cb( - mc_client_h client, - ) { - return _mc_client_unset_shuffle_mode_update_cb( - client, - ); - } - - late final _mc_client_unset_shuffle_mode_update_cbPtr = - _lookup>( - 'mc_client_unset_shuffle_mode_update_cb'); - late final _mc_client_unset_shuffle_mode_update_cb = - _mc_client_unset_shuffle_mode_update_cbPtr - .asFunction(); - - /// @deprecated Deprecated since 4.0. Use mc_client_set_repeat_mode_updated_cb() instead. - /// @brief Sets the callback for monitoring repeat mode of the media controller server. - /// @details The media controller client which calls this function will receive notifications from all media controller servers. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @param[in] callback The callback to be invoked when the repeat mode is changed - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_set_repeat_mode_update_cb( - mc_client_h client, - mc_repeat_mode_changed_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_set_repeat_mode_update_cb( - client, - callback, - user_data, - ); - } - - late final _mc_client_set_repeat_mode_update_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, mc_repeat_mode_changed_cb, - ffi.Pointer)>>('mc_client_set_repeat_mode_update_cb'); - late final _mc_client_set_repeat_mode_update_cb = - _mc_client_set_repeat_mode_update_cbPtr.asFunction< - int Function( - mc_client_h, mc_repeat_mode_changed_cb, ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. Use mc_client_unset_repeat_mode_updated_cb() instead. - /// @brief Unsets the callback for monitoring repeat mode of the media controller server. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_unset_repeat_mode_update_cb( - mc_client_h client, - ) { - return _mc_client_unset_repeat_mode_update_cb( - client, - ); - } - - late final _mc_client_unset_repeat_mode_update_cbPtr = - _lookup>( - 'mc_client_unset_repeat_mode_update_cb'); - late final _mc_client_unset_repeat_mode_update_cb = - _mc_client_unset_repeat_mode_update_cbPtr - .asFunction(); - - /// @brief Sets the callback for monitoring status of the media controller server. - /// @details The media controller client which calls this function will receive notifications from all media controller servers. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @param[in] callback The callback to be invoked when the media controller server status is changed - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_set_server_updated_cb( - mc_client_h client, - mc_server_state_updated_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_set_server_updated_cb( - client, - callback, - user_data, - ); - } - - late final _mc_client_set_server_updated_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, mc_server_state_updated_cb, - ffi.Pointer)>>('mc_client_set_server_updated_cb'); - late final _mc_client_set_server_updated_cb = - _mc_client_set_server_updated_cbPtr.asFunction< - int Function(mc_client_h, mc_server_state_updated_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback for monitoring status of the media controller server. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_unset_server_updated_cb( - mc_client_h client, - ) { - return _mc_client_unset_server_updated_cb( - client, - ); - } - - late final _mc_client_unset_server_updated_cbPtr = - _lookup>( - 'mc_client_unset_server_updated_cb'); - late final _mc_client_unset_server_updated_cb = - _mc_client_unset_server_updated_cbPtr - .asFunction(); - - /// @brief Sets the callback for monitoring playback status of the media controller server. - /// @details The media controller client which calls this function will receive notifications from all media controller servers. \n - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @param[in] callback The callback to be invoked when the playback status is changed - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_set_playback_updated_cb( - mc_client_h client, - mc_playback_updated_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_set_playback_updated_cb( - client, - callback, - user_data, - ); - } - - late final _mc_client_set_playback_updated_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, mc_playback_updated_cb, - ffi.Pointer)>>('mc_client_set_playback_updated_cb'); - late final _mc_client_set_playback_updated_cb = - _mc_client_set_playback_updated_cbPtr.asFunction< - int Function( - mc_client_h, mc_playback_updated_cb, ffi.Pointer)>(); - - /// @brief Unsets the callback for monitoring playback status of the media controller server. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_unset_playback_updated_cb( - mc_client_h client, - ) { - return _mc_client_unset_playback_updated_cb( - client, - ); - } - - late final _mc_client_unset_playback_updated_cbPtr = - _lookup>( - 'mc_client_unset_playback_updated_cb'); - late final _mc_client_unset_playback_updated_cb = - _mc_client_unset_playback_updated_cbPtr - .asFunction(); - - /// @brief Sets the callback for monitoring metadata status of the media controller server. - /// @details The media controller client which calls this function will receive notifications from all media controller servers. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @param[in] callback The callback to be invoked when the metadata status is changed - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_set_metadata_updated_cb( - mc_client_h client, - mc_metadata_updated_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_set_metadata_updated_cb( - client, - callback, - user_data, - ); - } - - late final _mc_client_set_metadata_updated_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, mc_metadata_updated_cb, - ffi.Pointer)>>('mc_client_set_metadata_updated_cb'); - late final _mc_client_set_metadata_updated_cb = - _mc_client_set_metadata_updated_cbPtr.asFunction< - int Function( - mc_client_h, mc_metadata_updated_cb, ffi.Pointer)>(); - - /// @brief Unsets the callback for monitoring metadata status of the media controller server. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_unset_metadata_updated_cb( - mc_client_h client, - ) { - return _mc_client_unset_metadata_updated_cb( - client, - ); - } - - late final _mc_client_unset_metadata_updated_cbPtr = - _lookup>( - 'mc_client_unset_metadata_updated_cb'); - late final _mc_client_unset_metadata_updated_cb = - _mc_client_unset_metadata_updated_cbPtr - .asFunction(); - - /// @brief Sets the callback for monitoring shuffle mode of the media controller server. - /// @details The media controller client which calls this function will receive notifications from all media controller servers. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @param[in] callback The callback to be invoked when the shuffle mode is changed - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_set_shuffle_mode_updated_cb( - mc_client_h client, - mc_shuffle_mode_updated_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_set_shuffle_mode_updated_cb( - client, - callback, - user_data, - ); - } - - late final _mc_client_set_shuffle_mode_updated_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, mc_shuffle_mode_updated_cb, - ffi.Pointer)>>('mc_client_set_shuffle_mode_updated_cb'); - late final _mc_client_set_shuffle_mode_updated_cb = - _mc_client_set_shuffle_mode_updated_cbPtr.asFunction< - int Function(mc_client_h, mc_shuffle_mode_updated_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback for monitoring shuffle mode of the media controller server. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_unset_shuffle_mode_updated_cb( - mc_client_h client, - ) { - return _mc_client_unset_shuffle_mode_updated_cb( - client, - ); - } - - late final _mc_client_unset_shuffle_mode_updated_cbPtr = - _lookup>( - 'mc_client_unset_shuffle_mode_updated_cb'); - late final _mc_client_unset_shuffle_mode_updated_cb = - _mc_client_unset_shuffle_mode_updated_cbPtr - .asFunction(); - - /// @brief Sets the callback for monitoring repeat mode of the media controller server. - /// @details The media controller client which calls this function will receive notifications from all media controller servers. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @param[in] callback The callback to be invoked when the repeat mode is changed - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_set_repeat_mode_updated_cb( - mc_client_h client, - mc_repeat_mode_updated_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_set_repeat_mode_updated_cb( - client, - callback, - user_data, - ); - } - - late final _mc_client_set_repeat_mode_updated_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, mc_repeat_mode_updated_cb, - ffi.Pointer)>>('mc_client_set_repeat_mode_updated_cb'); - late final _mc_client_set_repeat_mode_updated_cb = - _mc_client_set_repeat_mode_updated_cbPtr.asFunction< - int Function( - mc_client_h, mc_repeat_mode_updated_cb, ffi.Pointer)>(); - - /// @brief Unsets the callback for monitoring repeat mode of the media controller server. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_unset_repeat_mode_updated_cb( - mc_client_h client, - ) { - return _mc_client_unset_repeat_mode_updated_cb( - client, - ); - } - - late final _mc_client_unset_repeat_mode_updated_cbPtr = - _lookup>( - 'mc_client_unset_repeat_mode_updated_cb'); - late final _mc_client_unset_repeat_mode_updated_cb = - _mc_client_unset_repeat_mode_updated_cbPtr - .asFunction(); - - /// @brief Sets the callback for monitoring the playback ability of the media controller server. - /// @details The media controller client which calls this function will receive notifications from all media controller servers. - /// @since_tizen 5.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @param[in] callback The callback to be invoked when the ability is changed - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_set_playback_ability_updated_cb( - mc_client_h client, - mc_playback_ability_updated_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_set_playback_ability_updated_cb( - client, - callback, - user_data, - ); - } - - late final _mc_client_set_playback_ability_updated_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, mc_playback_ability_updated_cb, - ffi.Pointer)>>( - 'mc_client_set_playback_ability_updated_cb'); - late final _mc_client_set_playback_ability_updated_cb = - _mc_client_set_playback_ability_updated_cbPtr.asFunction< - int Function(mc_client_h, mc_playback_ability_updated_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback for monitoring the playback ability of the media controller server. - /// @since_tizen 5.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_unset_playback_ability_updated_cb( - mc_client_h client, - ) { - return _mc_client_unset_playback_ability_updated_cb( - client, - ); - } - - late final _mc_client_unset_playback_ability_updated_cbPtr = - _lookup>( - 'mc_client_unset_playback_ability_updated_cb'); - late final _mc_client_unset_playback_ability_updated_cb = - _mc_client_unset_playback_ability_updated_cbPtr - .asFunction(); - - /// @brief Sets the callback for monitoring the shuffle ability of the media controller server. - /// @details The media controller client which calls this function will receive notifications from all media controller servers. - /// @since_tizen 5.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @param[in] callback The callback to be invoked when the ability is changed - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_set_shuffle_ability_updated_cb( - mc_client_h client, - mc_shuffle_ability_updated_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_set_shuffle_ability_updated_cb( - client, - callback, - user_data, - ); - } - - late final _mc_client_set_shuffle_ability_updated_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, mc_shuffle_ability_updated_cb, - ffi.Pointer)>>( - 'mc_client_set_shuffle_ability_updated_cb'); - late final _mc_client_set_shuffle_ability_updated_cb = - _mc_client_set_shuffle_ability_updated_cbPtr.asFunction< - int Function(mc_client_h, mc_shuffle_ability_updated_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback for monitoring the shuffle ability of the media controller server. - /// @since_tizen 5.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_unset_shuffle_ability_updated_cb( - mc_client_h client, - ) { - return _mc_client_unset_shuffle_ability_updated_cb( - client, - ); - } - - late final _mc_client_unset_shuffle_ability_updated_cbPtr = - _lookup>( - 'mc_client_unset_shuffle_ability_updated_cb'); - late final _mc_client_unset_shuffle_ability_updated_cb = - _mc_client_unset_shuffle_ability_updated_cbPtr - .asFunction(); - - /// @brief Sets the callback for monitoring the repeat ability of the media controller server. - /// @details The media controller client which calls this function will receive notifications from all media controller servers. - /// @since_tizen 5.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @param[in] callback The callback to be invoked when the ability is changed - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_set_repeat_ability_updated_cb( - mc_client_h client, - mc_repeat_ability_updated_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_set_repeat_ability_updated_cb( - client, - callback, - user_data, - ); - } - - late final _mc_client_set_repeat_ability_updated_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, mc_repeat_ability_updated_cb, - ffi.Pointer)>>( - 'mc_client_set_repeat_ability_updated_cb'); - late final _mc_client_set_repeat_ability_updated_cb = - _mc_client_set_repeat_ability_updated_cbPtr.asFunction< - int Function(mc_client_h, mc_repeat_ability_updated_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback for monitoring the repeat ability of the media controller server. - /// @since_tizen 5.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - int mc_client_unset_repeat_ability_updated_cb( - mc_client_h client, - ) { - return _mc_client_unset_repeat_ability_updated_cb( - client, - ); - } - - late final _mc_client_unset_repeat_ability_updated_cbPtr = - _lookup>( - 'mc_client_unset_repeat_ability_updated_cb'); - late final _mc_client_unset_repeat_ability_updated_cb = - _mc_client_unset_repeat_ability_updated_cbPtr - .asFunction(); - - /// @brief Sets the callback for receiving the result of the command from the media controller server. - /// @details The media controller client which calls this function will receives the result of the command from all media controller servers. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @param[in] callback The callback to be invoked when the reply is received - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_unset_cmd_reply_received_cb() - /// @see mc_client_destroy() - int mc_client_set_cmd_reply_received_cb( - mc_client_h client, - mc_cmd_reply_received_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_set_cmd_reply_received_cb( - client, - callback, - user_data, - ); - } - - late final _mc_client_set_cmd_reply_received_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, mc_cmd_reply_received_cb, - ffi.Pointer)>>('mc_client_set_cmd_reply_received_cb'); - late final _mc_client_set_cmd_reply_received_cb = - _mc_client_set_cmd_reply_received_cbPtr.asFunction< - int Function( - mc_client_h, mc_cmd_reply_received_cb, ffi.Pointer)>(); - - /// @brief Unsets the callback for receiving common reply of the media controller server. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_set_cmd_reply_received_cb() - /// @see mc_client_destroy() - int mc_client_unset_cmd_reply_received_cb( - mc_client_h client, - ) { - return _mc_client_unset_cmd_reply_received_cb( - client, - ); - } - - late final _mc_client_unset_cmd_reply_received_cbPtr = - _lookup>( - 'mc_client_unset_cmd_reply_received_cb'); - late final _mc_client_unset_cmd_reply_received_cb = - _mc_client_unset_cmd_reply_received_cbPtr - .asFunction(); - - /// @brief Sets the callback for monitoring playlist status of the media controller server. - /// @details The media controller client which calls this function will receive notifications from all media controller servers. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @param[in] callback The callback to be invoked when the playlist status is changed - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - /// @see mc_playlist_updated_cb() - /// @see mc_client_unset_playlist_updated_cb() - int mc_client_set_playlist_updated_cb( - mc_client_h client, - mc_playlist_updated_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_set_playlist_updated_cb( - client, - callback, - user_data, - ); - } - - late final _mc_client_set_playlist_updated_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, mc_playlist_updated_cb, - ffi.Pointer)>>('mc_client_set_playlist_updated_cb'); - late final _mc_client_set_playlist_updated_cb = - _mc_client_set_playlist_updated_cbPtr.asFunction< - int Function( - mc_client_h, mc_playlist_updated_cb, ffi.Pointer)>(); - - /// @brief Unsets the callback for monitoring playlist status of the media controller server. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - /// @see mc_client_set_playlist_updated_cb() - int mc_client_unset_playlist_updated_cb( - mc_client_h client, - ) { - return _mc_client_unset_playlist_updated_cb( - client, - ); - } - - late final _mc_client_unset_playlist_updated_cbPtr = - _lookup>( - 'mc_client_unset_playlist_updated_cb'); - late final _mc_client_unset_playlist_updated_cb = - _mc_client_unset_playlist_updated_cbPtr - .asFunction(); - - /// @brief Sets the callback for receiving the custom event from a media controller server. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to media controller client - /// @param[in] callback The callback to be invoked when the media controller client receives custom event from a media controller server. - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_client_create() - /// @see mc_client_custom_event_received_cb() - /// @see mc_client_unset_custom_event_received_cb() - /// @see mc_client_send_event_reply() - /// @see mc_client_destroy() - int mc_client_set_custom_event_received_cb( - mc_client_h client, - mc_client_custom_event_received_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_set_custom_event_received_cb( - client, - callback, - user_data, - ); - } - - late final _mc_client_set_custom_event_received_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, mc_client_custom_event_received_cb, - ffi.Pointer)>>( - 'mc_client_set_custom_event_received_cb'); - late final _mc_client_set_custom_event_received_cb = - _mc_client_set_custom_event_received_cbPtr.asFunction< - int Function(mc_client_h, mc_client_custom_event_received_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback for receiving the custom event from a media controller server. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_client_create() - /// @see mc_client_custom_event_received_cb() - /// @see mc_client_set_custom_event_received_cb() - /// @see mc_client_destroy() - int mc_client_unset_custom_event_received_cb( - mc_client_h client, - ) { - return _mc_client_unset_custom_event_received_cb( - client, - ); - } - - late final _mc_client_unset_custom_event_received_cbPtr = - _lookup>( - 'mc_client_unset_custom_event_received_cb'); - late final _mc_client_unset_custom_event_received_cb = - _mc_client_unset_custom_event_received_cbPtr - .asFunction(); - - /// @brief Replies with the result of the requested event to the media controller server. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @remarks The media controller client get the @a server_name and @a request_id through the mc_client_custom_event_received_cb(). - /// If @a request_id is not null there, the media controller client should send the reply to the media controller server with the @a request_id. \n - /// If @a request_id is null, this function will return #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER. - /// - /// @param[in] client The handle to the media controller client - /// @param[in] server_name The app_id of the media controller server - /// @param[in] request_id The id of the event request, received in the mc_client_set_custom_event_received_cb() function. - /// @param[in] result_code The result code of custom event - /// @param[in] data The extra data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller server handle by calling mc_server_create(). - /// @see mc_client_create() - /// @see mc_client_set_custom_event_received_cb() - /// @see mc_client_unset_custom_event_received_cb() - /// @see mc_client_destroy() - int mc_client_send_event_reply( - mc_client_h client, - ffi.Pointer server_name, - ffi.Pointer request_id, - int result_code, - ffi.Pointer data, - ) { - return _mc_client_send_event_reply( - client, - server_name, - request_id, - result_code, - data, - ); - } - - late final _mc_client_send_event_replyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_client_h, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer)>>('mc_client_send_event_reply'); - late final _mc_client_send_event_reply = - _mc_client_send_event_replyPtr.asFunction< - int Function(mc_client_h, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - /// @brief Subscribes media controller server for monitoring status. - /// @details If media controller client subscribe media controller server, \n - /// the media controller client receive callback from subscribed media controller server. \n - /// If media controller client subscribe media controller server one or more, \n - /// the media controller client can receive callback from only subscribed media controller server. \n - /// If you want to subscribe for the all media controller server again, \n - /// unset mode update callback and set the callback for the monitoring status again. \n - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @param[in] subscription_type The subscription type - /// @param[in] server_name The app_id of the media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create() - /// @pre Set the callback for monitoring status of the media controller server - /// @post Unsubscribe the media controller server for monitoring status by calling mc_client_unsubscribe() - /// @see mc_client_create() - /// @see mc_client_unsubscribe() - int mc_client_subscribe( - mc_client_h client, - int subscription_type, - ffi.Pointer server_name, - ) { - return _mc_client_subscribe( - client, - subscription_type, - server_name, - ); - } - - late final _mc_client_subscribePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, ffi.Int32, - ffi.Pointer)>>('mc_client_subscribe'); - late final _mc_client_subscribe = _mc_client_subscribePtr - .asFunction)>(); - - /// @brief Unsubscribes media controller server for monitoring status. - /// @details If media controller client unsubscribe media controller server, \n - /// the media controller client don't receive callback from unsubscribed media controller server. \n - /// If media controller client unsubscribe all subscribed media controller server, \n - /// the media controller client don't receive callback from all media controller server. \n - /// After unset and set update callback function is called again, the media controller client can receive callback from all media controller servers. \n - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @param[in] subscription_type The subscription type - /// @param[in] server_name The app_id of the media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create() - /// @pre Subscribe the media controller server for monitoring status by calling mc_client_subscribe() - /// @see mc_client_create() - /// @see mc_client_subscribe() - int mc_client_unsubscribe( - mc_client_h client, - int subscription_type, - ffi.Pointer server_name, - ) { - return _mc_client_unsubscribe( - client, - subscription_type, - server_name, - ); - } - - late final _mc_client_unsubscribePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, ffi.Int32, - ffi.Pointer)>>('mc_client_unsubscribe'); - late final _mc_client_unsubscribe = _mc_client_unsubscribePtr - .asFunction)>(); - - /// @brief Retrieves all subscribed Server. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @param[in] subscription_type The subscription type - /// @param[in] callback The callback to be invoked when the list of the subscribed media controller server. - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create() - /// @pre Subscribe the media controller server for monitoring status by calling mc_client_subscribe() - /// @see mc_client_create() - /// @see mc_client_subscribe() - int mc_client_foreach_server_subscribed( - mc_client_h client, - int subscription_type, - mc_subscribed_server_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_foreach_server_subscribed( - client, - subscription_type, - callback, - user_data, - ); - } - - late final _mc_client_foreach_server_subscribedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, ffi.Int32, mc_subscribed_server_cb, - ffi.Pointer)>>('mc_client_foreach_server_subscribed'); - late final _mc_client_foreach_server_subscribed = - _mc_client_foreach_server_subscribedPtr.asFunction< - int Function(mc_client_h, int, mc_subscribed_server_cb, - ffi.Pointer)>(); - - /// @brief Gets the playback state. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] playback The handle to playback - /// @param[out] state The state of the playback - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre The playback update callback should be set with mc_client_set_playback_updated_cb(). - /// @see mc_client_set_playback_updated_cb() - int mc_client_get_playback_state( - mc_playback_h playback, - ffi.Pointer state, - ) { - return _mc_client_get_playback_state( - playback, - state, - ); - } - - late final _mc_client_get_playback_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_playback_h, - ffi.Pointer)>>('mc_client_get_playback_state'); - late final _mc_client_get_playback_state = _mc_client_get_playback_statePtr - .asFunction)>(); - - /// @brief Gets the playback position. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] playback The handle to playback - /// @param[out] position The position of the playback in milliseconds - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre The playback update callback should be set with mc_client_set_playback_updated_cb(). - /// @see mc_client_set_playback_updated_cb() - int mc_client_get_playback_position( - mc_playback_h playback, - ffi.Pointer position, - ) { - return _mc_client_get_playback_position( - playback, - position, - ); - } - - late final _mc_client_get_playback_positionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_playback_h, ffi.Pointer)>>( - 'mc_client_get_playback_position'); - late final _mc_client_get_playback_position = - _mc_client_get_playback_positionPtr.asFunction< - int Function(mc_playback_h, ffi.Pointer)>(); - - /// @deprecated Deprecated since 5.0. Use mc_client_get_playlist_item_info() instead. - /// @brief Gets the index of the media in playlist. - /// @details Gets the index of the current playing media in a playlist. If the media controller server didn't set the index, the value is NULL. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @remarks The @a index should be released using free(). - /// - /// @param[in] playback The handle to playback - /// @param[out] index The index of the media - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre The playback update callback should be set with mc_client_set_playback_updated_cb(). - /// @see mc_client_set_playback_updated_cb() - /// @see mc_client_foreach_server_playlist() - int mc_client_get_playlist_item_index( - mc_playback_h playback, - ffi.Pointer> index, - ) { - return _mc_client_get_playlist_item_index( - playback, - index, - ); - } - - late final _mc_client_get_playlist_item_indexPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_playback_h, ffi.Pointer>)>>( - 'mc_client_get_playlist_item_index'); - late final _mc_client_get_playlist_item_index = - _mc_client_get_playlist_item_indexPtr.asFunction< - int Function(mc_playback_h, ffi.Pointer>)>(); - - /// @brief Gets the playlist name and index of the media in playlist. - /// @details Gets the playlist name and index of the current playing media in a playlist. If the media controller server didn't set the info, @a playlist_name and @a index will be set to NULL. - /// @since_tizen 5.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @remarks The @a playlist_name and @a index should be released using free(). - /// - /// @param[in] playback The handle to playback - /// @param[out] playlist_name The playlist name media included - /// @param[out] index The index of the media - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre The playback update callback should be set with mc_client_set_playback_updated_cb(). - /// @see mc_client_set_playback_updated_cb() - /// @see mc_client_foreach_server_playlist() - int mc_client_get_playlist_item_info( - mc_playback_h playback, - ffi.Pointer> playlist_name, - ffi.Pointer> index, - ) { - return _mc_client_get_playlist_item_info( - playback, - playlist_name, - index, - ); - } - - late final _mc_client_get_playlist_item_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_playback_h, - ffi.Pointer>, - ffi.Pointer>)>>( - 'mc_client_get_playlist_item_info'); - late final _mc_client_get_playlist_item_info = - _mc_client_get_playlist_item_infoPtr.asFunction< - int Function(mc_playback_h, ffi.Pointer>, - ffi.Pointer>)>(); - - /// @brief Gets the playback content type. - /// @details Gets the content type of the current playing media. If there is no content type info, result value is #MC_CONTENT_TYPE_UNDECIDED. - /// @since_tizen 5.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] playback The handle to playback - /// @param[out] content_type The content type of the playback - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre The playback update callback should be set with mc_client_set_playback_updated_cb(). - /// @see mc_client_set_playback_updated_cb() - int mc_client_get_playback_content_type( - mc_playback_h playback, - ffi.Pointer content_type, - ) { - return _mc_client_get_playback_content_type( - playback, - content_type, - ); - } - - late final _mc_client_get_playback_content_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_playback_h, - ffi.Pointer)>>('mc_client_get_playback_content_type'); - late final _mc_client_get_playback_content_type = - _mc_client_get_playback_content_typePtr - .asFunction)>(); - - /// @brief Gets the age rating of the content. - /// @details Gets the age rating of the current playing media. - /// @since_tizen 5.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] playback The handle to playback - /// @param[out] age_rating Age rating of the content - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre The playback update callback should be set with mc_client_set_playback_updated_cb(). - /// @see mc_client_set_playback_updated_cb() - int mc_client_get_age_rating( - mc_playback_h playback, - ffi.Pointer age_rating, - ) { - return _mc_client_get_age_rating( - playback, - age_rating, - ); - } - - late final _mc_client_get_age_ratingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_playback_h, - ffi.Pointer)>>('mc_client_get_age_rating'); - late final _mc_client_get_age_rating = _mc_client_get_age_ratingPtr - .asFunction)>(); - - /// @brief Destroys playback. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] playback The handle to playback - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see mc_client_set_playback_updated_cb() - /// @see mc_client_get_server_playback_info() - int mc_client_destroy_playback( - mc_playback_h playback, - ) { - return _mc_client_destroy_playback( - playback, - ); - } - - late final _mc_client_destroy_playbackPtr = - _lookup>( - 'mc_client_destroy_playback'); - late final _mc_client_destroy_playback = - _mc_client_destroy_playbackPtr.asFunction(); - - /// @deprecated Deprecated since 4.0. Use mc_metadata_get() instead. - /// @brief Gets the metadata. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks The @a metadata should be released using @c mc_client_destroy_metadata(). \n - /// And also The @a value should be released using free(). - /// If the attribute value of the metadata is empty, return value is NULL. - /// - /// @param[in] metadata The handle to metadata - /// @param[in] attribute The key attribute name to get - /// @param[out] value The value of the attribute - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Sets mc_client_set_metadata_update_cb() function to get the metadata - /// @see mc_client_set_metadata_update_cb() - int mc_client_get_metadata( - mc_metadata_h metadata, - int attribute, - ffi.Pointer> value, - ) { - return _mc_client_get_metadata( - metadata, - attribute, - value, - ); - } - - late final _mc_client_get_metadataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_metadata_h, ffi.Int32, - ffi.Pointer>)>>('mc_client_get_metadata'); - late final _mc_client_get_metadata = _mc_client_get_metadataPtr.asFunction< - int Function(mc_metadata_h, int, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. Use mc_metadata_destroy() instead. - /// @brief Destroys metadata. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] metadata The handle to metadata - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Sets mc_client_set_metadata_update_cb() function to create metadata - /// @see mc_client_set_metadata_update_cb() - int mc_client_destroy_metadata( - mc_metadata_h metadata, - ) { - return _mc_client_destroy_metadata( - metadata, - ); - } - - late final _mc_client_destroy_metadataPtr = - _lookup>( - 'mc_client_destroy_metadata'); - late final _mc_client_destroy_metadata = - _mc_client_destroy_metadataPtr.asFunction(); - - /// @brief Gets the latest media controller server info. - /// @details The media controller client will get the most recently updated information by the server. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @remarks The @a server_name should be released using free(). \n - /// If there is no activated media controller server, return value of the server name is NULL. \n - /// Before a media controller server sets the playback state to #MC_PLAYBACK_STATE_PLAYING, the @a server_state is #MC_SERVER_STATE_NONE. - /// After a media controller server sets the playback state to #MC_PLAYBACK_STATE_PLAYING, the @a server_state is #MC_SERVER_STATE_ACTIVATE. - /// After a media controller server is destroyed, @a server_state is #MC_SERVER_STATE_DEACTIVATE. - /// - /// @param[in] client The handle to the media controller client - /// @param[out] server_name The app_id of the latest media controller server - /// @param[out] server_state The state of the latest media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - int mc_client_get_latest_server_info( - mc_client_h client, - ffi.Pointer> server_name, - ffi.Pointer server_state, - ) { - return _mc_client_get_latest_server_info( - client, - server_name, - server_state, - ); - } - - late final _mc_client_get_latest_server_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, ffi.Pointer>, - ffi.Pointer)>>('mc_client_get_latest_server_info'); - late final _mc_client_get_latest_server_info = - _mc_client_get_latest_server_infoPtr.asFunction< - int Function(mc_client_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Gets the latest playback info. - /// @details The media controller client will get the most recently updated information from @a server_name. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @remarks The @a playback should be released using @c mc_client_destroy_playback(). \n - /// If there is no playback info, return value of the playback is NULL. - /// - /// @param[in] client The handle to the media controller client - /// @param[in] server_name The app_id of the media controller server - /// @param[out] playback The handle to playback - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - int mc_client_get_server_playback_info( - mc_client_h client, - ffi.Pointer server_name, - ffi.Pointer playback, - ) { - return _mc_client_get_server_playback_info( - client, - server_name, - playback, - ); - } - - late final _mc_client_get_server_playback_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, ffi.Pointer, - ffi.Pointer)>>( - 'mc_client_get_server_playback_info'); - late final _mc_client_get_server_playback_info = - _mc_client_get_server_playback_infoPtr.asFunction< - int Function(mc_client_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the latest metadata. - /// @details The media controller client will get the most recently updated information from @a server_name. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @remarks The @a metadata should be released using @c mc_metadata_destroy(). \n - /// If there is no metadata, return value of the metadata is NULL. - /// - /// @param[in] client The handle to the media controller client - /// @param[in] server_name The app_id of the media controller server - /// @param[out] metadata The handle to metadata - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - int mc_client_get_server_metadata( - mc_client_h client, - ffi.Pointer server_name, - ffi.Pointer metadata, - ) { - return _mc_client_get_server_metadata( - client, - server_name, - metadata, - ); - } - - late final _mc_client_get_server_metadataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, ffi.Pointer, - ffi.Pointer)>>('mc_client_get_server_metadata'); - late final _mc_client_get_server_metadata = - _mc_client_get_server_metadataPtr.asFunction< - int Function(mc_client_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the latest shuffle mode. - /// @details The media controller client will get the most recently updated information from @a server_name. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @remarks If there is no shuffle mode info, return value is #MC_SHUFFLE_MODE_OFF. - /// - /// @param[in] client The handle to the media controller client - /// @param[in] server_name The app_id of the media controller server - /// @param[out] mode The info of the latest shuffle mode - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - int mc_client_get_server_shuffle_mode( - mc_client_h client, - ffi.Pointer server_name, - ffi.Pointer mode, - ) { - return _mc_client_get_server_shuffle_mode( - client, - server_name, - mode, - ); - } - - late final _mc_client_get_server_shuffle_modePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, ffi.Pointer, - ffi.Pointer)>>('mc_client_get_server_shuffle_mode'); - late final _mc_client_get_server_shuffle_mode = - _mc_client_get_server_shuffle_modePtr.asFunction< - int Function( - mc_client_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the latest repeat mode. - /// @details The media controller client will get the most recently updated information from @a server_name. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @remarks If there is no repeat mode info, return value is #MC_REPEAT_MODE_OFF. - /// - /// @param[in] client The handle to the media controller client - /// @param[in] server_name The app_id of the media controller server - /// @param[out] mode The info of the latest shuffle mode - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - int mc_client_get_server_repeat_mode( - mc_client_h client, - ffi.Pointer server_name, - ffi.Pointer mode, - ) { - return _mc_client_get_server_repeat_mode( - client, - server_name, - mode, - ); - } - - late final _mc_client_get_server_repeat_modePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, ffi.Pointer, - ffi.Pointer)>>('mc_client_get_server_repeat_mode'); - late final _mc_client_get_server_repeat_mode = - _mc_client_get_server_repeat_modePtr.asFunction< - int Function( - mc_client_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the icon URI of the media controller server. - /// @since_tizen 5.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @remarks The @a uri should be released using @c free(). \n - /// If there is no URI info, return value of the uri is NULL. - /// - /// @param[in] client The handle to the media controller client - /// @param[in] server_name The app_id of the media controller server - /// @param[out] uri The icon URI - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - /// @see mc_client_foreach_server_playlist() - int mc_client_get_server_icon( - mc_client_h client, - ffi.Pointer server_name, - ffi.Pointer> uri, - ) { - return _mc_client_get_server_icon( - client, - server_name, - uri, - ); - } - - late final _mc_client_get_server_iconPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, ffi.Pointer, - ffi.Pointer>)>>( - 'mc_client_get_server_icon'); - late final _mc_client_get_server_icon = - _mc_client_get_server_iconPtr.asFunction< - int Function(mc_client_h, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets the playback ability of the media controller server. - /// @since_tizen 5.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @remarks The @a ability should be released using @c mc_playback_ability_destroy(). - /// - /// @param[in] client The handle to the media controller client - /// @param[in] server_name The app_id of the media controller server - /// @param[out] ability The handle to ability - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @pre Get a server name handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - /// @see mc_client_get_latest_server_info() - /// @see mc_client_foreach_server() - /// @see mc_playback_action_is_supported() - int mc_client_get_server_playback_ability( - mc_client_h client, - ffi.Pointer server_name, - ffi.Pointer ability, - ) { - return _mc_client_get_server_playback_ability( - client, - server_name, - ability, - ); - } - - late final _mc_client_get_server_playback_abilityPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, ffi.Pointer, - ffi.Pointer)>>( - 'mc_client_get_server_playback_ability'); - late final _mc_client_get_server_playback_ability = - _mc_client_get_server_playback_abilityPtr.asFunction< - int Function(mc_client_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the support value of the shuffle ability of the updated media controller server. - /// @since_tizen 5.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @remarks If the ability's support is not set, the result value is #MC_ABILITY_SUPPORTED_UNDECIDED. - /// - /// @param[in] client The handle to the media controller client - /// @param[in] server_name The app_id of the media controller server - /// @param[out] support The support value of the shuffle ability - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @pre Get a server name handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - /// @see mc_client_get_latest_server_info() - /// @see mc_client_foreach_server() - int mc_client_get_server_shuffle_ability_support( - mc_client_h client, - ffi.Pointer server_name, - ffi.Pointer support, - ) { - return _mc_client_get_server_shuffle_ability_support( - client, - server_name, - support, - ); - } - - late final _mc_client_get_server_shuffle_ability_supportPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_client_h, ffi.Pointer, ffi.Pointer)>>( - 'mc_client_get_server_shuffle_ability_support'); - late final _mc_client_get_server_shuffle_ability_support = - _mc_client_get_server_shuffle_ability_supportPtr.asFunction< - int Function( - mc_client_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the support value of the repeat ability of the updated media controller server. - /// @since_tizen 5.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @remarks If the ability's support is not set, the result value is #MC_ABILITY_SUPPORTED_UNDECIDED. - /// - /// @param[in] client The handle to the media controller client - /// @param[in] server_name The app_id of the media controller server - /// @param[out] support The support value of the repeat ability - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @pre Get a server name handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_destroy() - /// @see mc_client_get_latest_server_info() - /// @see mc_client_foreach_server() - int mc_client_get_server_repeat_ability_support( - mc_client_h client, - ffi.Pointer server_name, - ffi.Pointer support, - ) { - return _mc_client_get_server_repeat_ability_support( - client, - server_name, - support, - ); - } - - late final _mc_client_get_server_repeat_ability_supportPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_client_h, ffi.Pointer, ffi.Pointer)>>( - 'mc_client_get_server_repeat_ability_support'); - late final _mc_client_get_server_repeat_ability_support = - _mc_client_get_server_repeat_ability_supportPtr.asFunction< - int Function( - mc_client_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Retrieves all created servers. - /// @details This function gets all created media controller servers. - /// The callback function will be invoked for every created media controller server. - /// If there are no media controller servers, the callback will not be invoked. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @param[in] callback The callback function to be invoked, will be called for each server - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - int mc_client_foreach_server( - mc_client_h client, - mc_activated_server_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_foreach_server( - client, - callback, - user_data, - ); - } - - late final _mc_client_foreach_serverPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, mc_activated_server_cb, - ffi.Pointer)>>('mc_client_foreach_server'); - late final _mc_client_foreach_server = - _mc_client_foreach_serverPtr.asFunction< - int Function( - mc_client_h, mc_activated_server_cb, ffi.Pointer)>(); - - /// @brief Retrieves all playlists of the media controller server. - /// @details This function gets all playlists of the media controller server. - /// The callback function will be invoked for every retrieved playlist. - /// If there are no playlists, the callback will not be invoked. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @param[in] server_name The app_id of the media controller server - /// @param[in] callback The callback function to be invoked. - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_playlist_cb() - int mc_client_foreach_server_playlist( - mc_client_h client, - ffi.Pointer server_name, - mc_playlist_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_foreach_server_playlist( - client, - server_name, - callback, - user_data, - ); - } - - late final _mc_client_foreach_server_playlistPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, ffi.Pointer, mc_playlist_cb, - ffi.Pointer)>>('mc_client_foreach_server_playlist'); - late final _mc_client_foreach_server_playlist = - _mc_client_foreach_server_playlistPtr.asFunction< - int Function(mc_client_h, ffi.Pointer, mc_playlist_cb, - ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. Use mc_client_send_playback_action_cmd() instead. - /// @brief Sends the playback state command to server. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @param[in] server_name The app_id of the media controller server - /// @param[in] state The playback state to send to media controller server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_get_server_playback_info() - int mc_client_send_playback_state_command( - mc_client_h client, - ffi.Pointer server_name, - int state, - ) { - return _mc_client_send_playback_state_command( - client, - server_name, - state, - ); - } - - late final _mc_client_send_playback_state_commandPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, ffi.Pointer, - ffi.Int32)>>('mc_client_send_playback_state_command'); - late final _mc_client_send_playback_state_command = - _mc_client_send_playback_state_commandPtr - .asFunction, int)>(); - - /// @brief Sends the playback action command to server. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @remarks The @a request_id should be released using free().\n - /// If the @a request_id is null, the server will not send the reply of the command. - /// - /// @param[in] client The handle to the media controller client - /// @param[in] server_name The app_id of the media controller server - /// @param[in] action The playback action command to send to the media controller server - /// @param[out] request_id The id of the command request, it will be passed to the mc_cmd_reply_received_cb() function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_get_server_playback_info() - /// @see mc_client_set_cmd_reply_received_cb() - int mc_client_send_playback_action_cmd( - mc_client_h client, - ffi.Pointer server_name, - int action, - ffi.Pointer> request_id, - ) { - return _mc_client_send_playback_action_cmd( - client, - server_name, - action, - request_id, - ); - } - - late final _mc_client_send_playback_action_cmdPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, ffi.Pointer, ffi.Int32, - ffi.Pointer>)>>( - 'mc_client_send_playback_action_cmd'); - late final _mc_client_send_playback_action_cmd = - _mc_client_send_playback_action_cmdPtr.asFunction< - int Function(mc_client_h, ffi.Pointer, int, - ffi.Pointer>)>(); - - /// @brief Sends the playback position command to server. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @remarks The @a request_id should be released using free().\n - /// If the @a request_id is null, the server will not send the reply of the command. - /// - /// @param[in] client The handle to the media controller client - /// @param[in] server_name The app_id of the media controller server - /// @param[in] position The position of the playback in milliseconds to send to media controller server. - /// @param[out] request_id The id of the command request, it will be passed to the mc_cmd_reply_received_cb() function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_get_server_playback_info() - /// @see mc_client_set_cmd_reply_received_cb() - int mc_client_send_playback_position_cmd( - mc_client_h client, - ffi.Pointer server_name, - int position, - ffi.Pointer> request_id, - ) { - return _mc_client_send_playback_position_cmd( - client, - server_name, - position, - request_id, - ); - } - - late final _mc_client_send_playback_position_cmdPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, ffi.Pointer, - ffi.UnsignedLongLong, ffi.Pointer>)>>( - 'mc_client_send_playback_position_cmd'); - late final _mc_client_send_playback_position_cmd = - _mc_client_send_playback_position_cmdPtr.asFunction< - int Function(mc_client_h, ffi.Pointer, int, - ffi.Pointer>)>(); - - /// @brief Sends the shuffle mode command to server. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @remarks The @a request_id should be released using free().\n - /// If the @a request_id is null, the server will not send the reply of the command. - /// - /// @param[in] client The handle to the media controller client - /// @param[in] server_name The app_id of the media controller server - /// @param[in] shuffle_mode The shuffle mode to send to media controller server - /// @param[out] request_id The id of the command request, it will be passed to the mc_cmd_reply_received_cb() function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_get_server_playback_info() - /// @see mc_client_set_cmd_reply_received_cb() - int mc_client_send_shuffle_mode_cmd( - mc_client_h client, - ffi.Pointer server_name, - int shuffle_mode, - ffi.Pointer> request_id, - ) { - return _mc_client_send_shuffle_mode_cmd( - client, - server_name, - shuffle_mode, - request_id, - ); - } - - late final _mc_client_send_shuffle_mode_cmdPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, ffi.Pointer, ffi.Int32, - ffi.Pointer>)>>( - 'mc_client_send_shuffle_mode_cmd'); - late final _mc_client_send_shuffle_mode_cmd = - _mc_client_send_shuffle_mode_cmdPtr.asFunction< - int Function(mc_client_h, ffi.Pointer, int, - ffi.Pointer>)>(); - - /// @brief Sends the repeat mode command to server. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @remarks The @a request_id should be released using free().\n - /// If the @a request_id is null, the server will not send the reply of the command. - /// - /// @param[in] client The handle to the media controller client - /// @param[in] server_name The app_id of the media controller server - /// @param[in] repeat_mode The repeat mode to send to media controller server - /// @param[out] request_id The id of the command request, it will be passed to the mc_cmd_reply_received_cb() function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_get_server_playback_info() - /// @see mc_client_set_cmd_reply_received_cb() - int mc_client_send_repeat_mode_cmd( - mc_client_h client, - ffi.Pointer server_name, - int repeat_mode, - ffi.Pointer> request_id, - ) { - return _mc_client_send_repeat_mode_cmd( - client, - server_name, - repeat_mode, - request_id, - ); - } - - late final _mc_client_send_repeat_mode_cmdPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, ffi.Pointer, ffi.Int32, - ffi.Pointer>)>>( - 'mc_client_send_repeat_mode_cmd'); - late final _mc_client_send_repeat_mode_cmd = - _mc_client_send_repeat_mode_cmdPtr.asFunction< - int Function(mc_client_h, ffi.Pointer, int, - ffi.Pointer>)>(); - - /// @deprecated Deprecated since 4.0. Use mc_client_send_custom_cmd() instead. - /// @brief Sends the custom command to server. - /// @details If there is the result for command from server, the media controller client will get the result of the custom command by mc_command_reply_received_cb() callback. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @param[in] client The handle to the media controller client - /// @param[in] server_name The app_id of the media controller server - /// @param[in] command The command to be sent - /// @param[in] data The extra data - /// @param[in] callback The callback to be invoked when the custom command execute completely. - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - int mc_client_send_custom_command( - mc_client_h client, - ffi.Pointer server_name, - ffi.Pointer command, - ffi.Pointer data, - mc_command_reply_received_cb callback, - ffi.Pointer user_data, - ) { - return _mc_client_send_custom_command( - client, - server_name, - command, - data, - callback, - user_data, - ); - } - - late final _mc_client_send_custom_commandPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_client_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - mc_command_reply_received_cb, - ffi.Pointer)>>('mc_client_send_custom_command'); - late final _mc_client_send_custom_command = - _mc_client_send_custom_commandPtr.asFunction< - int Function( - mc_client_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - mc_command_reply_received_cb, - ffi.Pointer)>(); - - /// @brief Sends the playlist command to server. - /// @details The media controller client can send "index" of the playlist to the media controller server with playback action and position. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @remarks The @a request_id should be released using free().\n - /// If the @a request_id is null, the server will not send the reply of the command. - /// - /// @param[in] client The handle to the media controller client - /// @param[in] server_name The app_id of the media controller server - /// @param[in] playlist_name The playlist name of the server - /// @param[in] index The index of the media in playlist to send to the media controller server - /// @param[in] action The playback action command to send to the media controller server - /// @param[in] position The position of the playback in milliseconds to send to media controller server - /// @param[out] request_id The id of the command request, it will be passed to the mc_cmd_reply_received_cb() function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_set_cmd_reply_received_cb() - int mc_client_send_playlist_cmd( - mc_client_h client, - ffi.Pointer server_name, - ffi.Pointer playlist_name, - ffi.Pointer index, - int action, - int position, - ffi.Pointer> request_id, - ) { - return _mc_client_send_playlist_cmd( - client, - server_name, - playlist_name, - index, - action, - position, - request_id, - ); - } - - late final _mc_client_send_playlist_cmdPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_client_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.UnsignedLongLong, - ffi.Pointer>)>>( - 'mc_client_send_playlist_cmd'); - late final _mc_client_send_playlist_cmd = - _mc_client_send_playlist_cmdPtr.asFunction< - int Function( - mc_client_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer>)>(); - - /// @brief Sends the custom command to server. - /// @details If the server sends the result of the command, the media controller client will get the result of the custom command by mc_cmd_reply_received_cb() callback. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @remarks The @a request_id should be released using free().\n - /// If the @a request_id is null, the server will not send the reply of the command. - /// - /// @param[in] client The handle to the media controller client - /// @param[in] server_name The app_id of the media controller server - /// @param[in] command The command to be sent - /// @param[in] data The extra data - /// @param[out] request_id The id of the command request, it will be passed to the mc_cmd_reply_received_cb() function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - /// @see mc_client_set_cmd_reply_received_cb() - int mc_client_send_custom_cmd( - mc_client_h client, - ffi.Pointer server_name, - ffi.Pointer command, - ffi.Pointer data, - ffi.Pointer> request_id, - ) { - return _mc_client_send_custom_cmd( - client, - server_name, - command, - data, - request_id, - ); - } - - late final _mc_client_send_custom_cmdPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mc_client_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>( - 'mc_client_send_custom_cmd'); - late final _mc_client_send_custom_cmd = - _mc_client_send_custom_cmdPtr.asFunction< - int Function( - mc_client_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Sends the search command to server. - /// @details If the server sends the result of the command, the media controller client will get the result of the search command by mc_cmd_reply_received_cb() callback. - /// @since_tizen 5.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/mediacontroller.client - /// - /// @remarks The @a request_id should be released using free().\n - /// If the @a request_id is null, the server will not send the reply of the command. - /// - /// @param[in] client The handle to the media controller client - /// @param[in] server_name The app_id of the media controller server - /// @param[in] search The search handle to be sent - /// @param[out] request_id The id of the command request, it will be passed to the mc_cmd_reply_received_cb() function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @pre Create search handle and set data by calling mc_search_create() and mc_search_set_condition(). - /// @see mc_client_create() - /// @see mc_client_set_cmd_reply_received_cb() - /// @see mc_search_create() - /// @see mc_search_set_condition() - int mc_client_send_search_cmd( - mc_client_h client, - ffi.Pointer server_name, - mc_search_h search, - ffi.Pointer> request_id, - ) { - return _mc_client_send_search_cmd( - client, - server_name, - search, - request_id, - ); - } - - late final _mc_client_send_search_cmdPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mc_client_h, ffi.Pointer, mc_search_h, - ffi.Pointer>)>>( - 'mc_client_send_search_cmd'); - late final _mc_client_send_search_cmd = - _mc_client_send_search_cmdPtr.asFunction< - int Function(mc_client_h, ffi.Pointer, mc_search_h, - ffi.Pointer>)>(); - - /// @brief Destroys client. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] client The handle to the media controller client - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a media controller client handle by calling mc_client_create(). - /// @see mc_client_create() - int mc_client_destroy( - mc_client_h client, - ) { - return _mc_client_destroy( - client, - ); - } - - late final _mc_client_destroyPtr = - _lookup>( - 'mc_client_destroy'); - late final _mc_client_destroy = - _mc_client_destroyPtr.asFunction(); - - /// @brief Creates a media demuxer handle for demuxing. - /// @since_tizen 3.0 - /// @remarks You must release @a demuxer using mediademuxer_destroy() function. - /// @param[out] demuxer A new handle to media demuxer - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @retval #MEDIADEMUXER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @post The media demuxer state will be #MEDIADEMUXER_STATE_IDLE. - /// @see mediademuxer_destroy() - int mediademuxer_create( - ffi.Pointer demuxer, - ) { - return _mediademuxer_create( - demuxer, - ); - } - - late final _mediademuxer_createPtr = _lookup< - ffi.NativeFunction)>>( - 'mediademuxer_create'); - late final _mediademuxer_create = _mediademuxer_createPtr - .asFunction)>(); - - /// @brief Sets the source path of input stream. - /// @since_tizen 3.0 - /// @remarks The mediastorage privilege(http://tizen.org/privilege/mediastorage) should be added if any video/audio files are used to play located in the internal storage. - /// @remarks The externalstorage privilege(http://tizen.org/privilege/externalstorage) should be added if any video/audio files are used to play located in the external storage. - /// @remarks You must release @a demuxer using mediademuxer_destroy() function. - /// @param[in] demuxer The media demuxer handle - /// @param[in] path The content location, such as the file path - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @retval #MEDIADEMUXER_ERROR_INVALID_PATH Invalid path - /// @pre The media muxer state will be #MEDIADEMUXER_STATE_IDLE by calling mediademuxer_create() function. - int mediademuxer_set_data_source( - mediademuxer_h demuxer, - ffi.Pointer path, - ) { - return _mediademuxer_set_data_source( - demuxer, - path, - ); - } - - late final _mediademuxer_set_data_sourcePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediademuxer_h, - ffi.Pointer)>>('mediademuxer_set_data_source'); - late final _mediademuxer_set_data_source = _mediademuxer_set_data_sourcePtr - .asFunction)>(); - - /// @brief Prepares the media demuxer for demuxing. - /// @since_tizen 3.0 - /// @remarks User should call this before mediademuxer_start() function. - /// @param[in] demuxer The media demuxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @pre The media demuxer state should be #MEDIADEMUXER_STATE_IDLE. - /// @pre mediademuxer_set_error_cb should be called before mediademuxer_prepare(). - /// @post The media demuxer state will be #MEDIADEMUXER_STATE_READY. - /// @see mediademuxer_set_data_source() - /// @see mediademuxer_unprepare() - int mediademuxer_prepare( - mediademuxer_h demuxer, - ) { - return _mediademuxer_prepare( - demuxer, - ); - } - - late final _mediademuxer_preparePtr = - _lookup>( - 'mediademuxer_prepare'); - late final _mediademuxer_prepare = - _mediademuxer_preparePtr.asFunction(); - - /// @brief Gets the total track count present in the container stream. - /// @since_tizen 3.0 - /// @param[in] demuxer The media demuxer handle - /// @param[out] count The number of tracks present - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @pre The media demuxer state should be #MEDIADEMUXER_STATE_READY. - /// @see mediademuxer_prepare() - /// @see mediademuxer_select_track() - int mediademuxer_get_track_count( - mediademuxer_h demuxer, - ffi.Pointer count, - ) { - return _mediademuxer_get_track_count( - demuxer, - count, - ); - } - - late final _mediademuxer_get_track_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediademuxer_h, - ffi.Pointer)>>('mediademuxer_get_track_count'); - late final _mediademuxer_get_track_count = _mediademuxer_get_track_countPtr - .asFunction)>(); - - /// @brief Selects the track to be performed. - /// @since_tizen 3.0 - /// @param[in] demuxer The media demuxer handle - /// @param[in] track_index The track index on which is selected for read - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @pre The media demuxer state should be #MEDIADEMUXER_STATE_READY. - /// @see mediademuxer_get_track_count() - /// @see mediademuxer_start() - int mediademuxer_select_track( - mediademuxer_h demuxer, - int track_index, - ) { - return _mediademuxer_select_track( - demuxer, - track_index, - ); - } - - late final _mediademuxer_select_trackPtr = - _lookup>( - 'mediademuxer_select_track'); - late final _mediademuxer_select_track = _mediademuxer_select_trackPtr - .asFunction(); - - /// @brief Starts the media demuxer. - /// @since_tizen 3.0 - /// @remarks User should call this before mediademuxer_read_sample() function. - /// @param[in] demuxer The media demuxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @pre The media demuxer state should be #MEDIADEMUXER_STATE_READY. - /// @post The media demuxer state will be #MEDIADEMUXER_STATE_DEMUXING. - /// @see mediademuxer_prepare() - /// @see mediademuxer_get_track_count() - /// @see mediademuxer_select_track() - /// @see mediademuxer_get_track_info() - int mediademuxer_start( - mediademuxer_h demuxer, - ) { - return _mediademuxer_start( - demuxer, - ); - } - - late final _mediademuxer_startPtr = - _lookup>( - 'mediademuxer_start'); - late final _mediademuxer_start = - _mediademuxer_startPtr.asFunction(); - - /// @brief Retrieves the track format of the read sample. - /// @since_tizen 3.0 - /// @remarks The @a format should be released using media_format_unref() function. - /// @param[in] demuxer The media demuxer handle - /// @param[in] track_index The index of the track - /// @param[out] format The media format handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @pre The media demuxer state must be set to #MEDIADEMUXER_STATE_DEMUXING by calling - /// mediademuxer_start() or set to #MEDIADEMUXER_STATE_READY by calling mediademuxer_prepare(). - /// @see mediademuxer_get_track_count() - /// @see mediademuxer_select_track() - /// @see media_format_unref() - /// @see #media_format_h - int mediademuxer_get_track_info( - mediademuxer_h demuxer, - int track_index, - ffi.Pointer format, - ) { - return _mediademuxer_get_track_info( - demuxer, - track_index, - format, - ); - } - - late final _mediademuxer_get_track_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediademuxer_h, ffi.Int, - ffi.Pointer)>>('mediademuxer_get_track_info'); - late final _mediademuxer_get_track_info = - _mediademuxer_get_track_infoPtr.asFunction< - int Function(mediademuxer_h, int, ffi.Pointer)>(); - - /// @brief Reads a frame(sample) of one single track. - /// @since_tizen 3.0 - /// @remarks The @a outbuf should be released using media_packet_destroy() function. - /// @remarks Once this function is called, user app can call the mediatool APIs to extract - /// side information such as pts, size, duration, flags etc. - /// @param[in] demuxer The media demuxer handle - /// @param[in] track_index The index of track of which data is needed - /// @param[out] outbuf The media packet handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @pre The media demuxer state should be #MEDIADEMUXER_STATE_DEMUXING. - /// @see mediademuxer_start() - /// @see mediademuxer_get_track_info() - /// @see mediademuxer_seek() if need to seek to a particular location - /// @see mediademuxer_unselect_track() - /// @see mediademuxer_stop() - /// @see media_packet_destroy() - /// @see #media_packet_h - int mediademuxer_read_sample( - mediademuxer_h demuxer, - int track_index, - ffi.Pointer outbuf, - ) { - return _mediademuxer_read_sample( - demuxer, - track_index, - outbuf, - ); - } - - late final _mediademuxer_read_samplePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediademuxer_h, ffi.Int, - ffi.Pointer)>>('mediademuxer_read_sample'); - late final _mediademuxer_read_sample = - _mediademuxer_read_samplePtr.asFunction< - int Function(mediademuxer_h, int, ffi.Pointer)>(); - - /// @brief Seeks to a particular instance of time (in milli seconds). - /// @since_tizen 3.0 - /// @remarks If mediademuxer_seek() is followed by mediademuxer_read_sample(), outbuf will be the key frame right before the seek position. - /// @param[in] demuxer The media demuxer handle - /// @param[in] pos The value of the new start position - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @pre The media demuxer state should be #MEDIADEMUXER_STATE_DEMUXING. - /// @see mediademuxer_read_sample() - /// @see mediademuxer_stop() - int mediademuxer_seek( - mediademuxer_h demuxer, - int pos, - ) { - return _mediademuxer_seek( - demuxer, - pos, - ); - } - - late final _mediademuxer_seekPtr = - _lookup>( - 'mediademuxer_seek'); - late final _mediademuxer_seek = - _mediademuxer_seekPtr.asFunction(); - - /// @brief Unselects the selected track. - /// @since_tizen 3.0 - /// @param[in] demuxer The media demuxer handle - /// @param[in] track_index The track index to be unselected - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @pre The media demuxer state must be set to #MEDIADEMUXER_STATE_DEMUXING by calling - /// mediademuxer_read_sample() or set to #MEDIADEMUXER_STATE_READY by calling mediademuxer_select_track(). - /// @see mediademuxer_select_track() - /// @see mediademuxer_read_sample() - int mediademuxer_unselect_track( - mediademuxer_h demuxer, - int track_index, - ) { - return _mediademuxer_unselect_track( - demuxer, - track_index, - ); - } - - late final _mediademuxer_unselect_trackPtr = - _lookup>( - 'mediademuxer_unselect_track'); - late final _mediademuxer_unselect_track = _mediademuxer_unselect_trackPtr - .asFunction(); - - /// @brief Stops the media demuxer. - /// @since_tizen 3.0 - /// @remarks User can call this if need to stop demuxing if needed. - /// @param[in] demuxer The media demuxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @pre The media demuxer state must be set to #MEDIADEMUXER_STATE_DEMUXING. - /// @post The media demuxer state will be in #MEDIADEMUXER_STATE_READY. - /// @see mediademuxer_start() - /// @see mediademuxer_unprepare() - int mediademuxer_stop( - mediademuxer_h demuxer, - ) { - return _mediademuxer_stop( - demuxer, - ); - } - - late final _mediademuxer_stopPtr = - _lookup>( - 'mediademuxer_stop'); - late final _mediademuxer_stop = - _mediademuxer_stopPtr.asFunction(); - - /// @brief Resets the media demuxer. - /// @since_tizen 3.0 - /// @remarks User should call this before mediademuxer_destroy() function. - /// @param[in] demuxer The media demuxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @pre The media demuxer state should be #MEDIADEMUXER_STATE_READY. - /// @post The media demuxer state will be #MEDIADEMUXER_STATE_IDLE. - /// @see mediademuxer_prepare() - int mediademuxer_unprepare( - mediademuxer_h demuxer, - ) { - return _mediademuxer_unprepare( - demuxer, - ); - } - - late final _mediademuxer_unpreparePtr = - _lookup>( - 'mediademuxer_unprepare'); - late final _mediademuxer_unprepare = - _mediademuxer_unpreparePtr.asFunction(); - - /// @brief Removes the instance of media demuxer and clear all its context memory. - /// @since_tizen 3.0 - /// @param[in] demuxer The media demuxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @pre Create a media demuxer handle by calling mediademuxer_create() function. - /// @post The media demuxer state will be #MEDIADEMUXER_STATE_NONE. - /// @see mediademuxer_create() - int mediademuxer_destroy( - mediademuxer_h demuxer, - ) { - return _mediademuxer_destroy( - demuxer, - ); - } - - late final _mediademuxer_destroyPtr = - _lookup>( - 'mediademuxer_destroy'); - late final _mediademuxer_destroy = - _mediademuxer_destroyPtr.asFunction(); - - /// @brief Gets media demuxer state. - /// @since_tizen 3.0 - /// @param[in] demuxer The media demuxer handle - /// @param[out] state The media demuxer sate - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a media demuxer handle by calling mediademuxer_create() function. - /// @see #mediademuxer_state - int mediademuxer_get_state( - mediademuxer_h demuxer, - ffi.Pointer state, - ) { - return _mediademuxer_get_state( - demuxer, - state, - ); - } - - late final _mediademuxer_get_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediademuxer_h, - ffi.Pointer)>>('mediademuxer_get_state'); - late final _mediademuxer_get_state = _mediademuxer_get_statePtr - .asFunction)>(); - - /// @brief Sets an error callback function to be invoked when an error occurs. - /// @since_tizen 3.0 - /// @param[in] demuxer The media demuxer handle - /// @param[in] callback Callback function pointer - /// @param[in] user_data The user data passed from the code where - /// mediademuxer_set_error_cb() was invoked - /// This data will be accessible from mediademuxer_error_cb() - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @pre Create a media demuxer handle by calling mediademuxer_create() function. - /// @post mediademuxer_error_cb() will be invoked. - /// @see mediademuxer_unset_error_cb() - /// @see mediademuxer_error_cb() - int mediademuxer_set_error_cb( - mediademuxer_h demuxer, - mediademuxer_error_cb callback, - ffi.Pointer user_data, - ) { - return _mediademuxer_set_error_cb( - demuxer, - callback, - user_data, - ); - } - - late final _mediademuxer_set_error_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediademuxer_h, mediademuxer_error_cb, - ffi.Pointer)>>('mediademuxer_set_error_cb'); - late final _mediademuxer_set_error_cb = - _mediademuxer_set_error_cbPtr.asFunction< - int Function( - mediademuxer_h, mediademuxer_error_cb, ffi.Pointer)>(); - - /// @brief Unsets the error callback function. - /// @since_tizen 3.0 - /// @param[in] demuxer The media demuxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @see mediademuxer_error_cb() - int mediademuxer_unset_error_cb( - mediademuxer_h demuxer, - ) { - return _mediademuxer_unset_error_cb( - demuxer, - ); - } - - late final _mediademuxer_unset_error_cbPtr = - _lookup>( - 'mediademuxer_unset_error_cb'); - late final _mediademuxer_unset_error_cb = _mediademuxer_unset_error_cbPtr - .asFunction(); - - /// @brief Sets an eos callback function to be invoked when an eos occurs. - /// @since_tizen 3.0 - /// @param[in] demuxer The media demuxer handle - /// @param[in] callback Callback function pointer - /// @param[in] user_data The user data passed from the code where - /// mediademuxer_set_eos_cb() was invoked - /// This data will be accessible from mediademuxer_eos_cb() - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @pre Create a media demuxer handle by calling mediademuxer_create() function. - /// @post mediademuxer_eos_cb() will be invoked. - /// @see mediademuxer_unset_eos_cb() - /// @see mediademuxer_eos_cb() - int mediademuxer_set_eos_cb( - mediademuxer_h demuxer, - mediademuxer_eos_cb callback, - ffi.Pointer user_data, - ) { - return _mediademuxer_set_eos_cb( - demuxer, - callback, - user_data, - ); - } - - late final _mediademuxer_set_eos_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediademuxer_h, mediademuxer_eos_cb, - ffi.Pointer)>>('mediademuxer_set_eos_cb'); - late final _mediademuxer_set_eos_cb = _mediademuxer_set_eos_cbPtr.asFunction< - int Function( - mediademuxer_h, mediademuxer_eos_cb, ffi.Pointer)>(); - - /// @brief Unsets the eos callback function. - /// @since_tizen 3.0 - /// @param[in] demuxer The media demuxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIADEMUXER_ERROR_NONE Successful - /// @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state - /// @see mediademuxer_eos_cb() - int mediademuxer_unset_eos_cb( - mediademuxer_h demuxer, - ) { - return _mediademuxer_unset_eos_cb( - demuxer, - ); - } - - late final _mediademuxer_unset_eos_cbPtr = - _lookup>( - 'mediademuxer_unset_eos_cb'); - late final _mediademuxer_unset_eos_cb = - _mediademuxer_unset_eos_cbPtr.asFunction(); - - /// @brief Creates a media muxer handle for muxing. - /// @since_tizen 3.0 - /// @remarks You must release @a muxer using mediamuxer_destroy() function. - /// @param[out] muxer A new handle to media muxer - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid Operation - /// @retval #MEDIAMUXER_ERROR_OUT_OF_MEMORY Allocation Failed, Out of Memory. - /// @post The media muxer state will be #MEDIAMUXER_STATE_IDLE. - /// @see mediamuxer_destroy() - int mediamuxer_create( - ffi.Pointer muxer, - ) { - return _mediamuxer_create( - muxer, - ); - } - - late final _mediamuxer_createPtr = - _lookup)>>( - 'mediamuxer_create'); - late final _mediamuxer_create = _mediamuxer_createPtr - .asFunction)>(); - - /// @brief Sets the sink path of output stream. - /// @since_tizen 3.0 - /// @remarks The mediastorage privilege(http://tizen.org/privilege/mediastorage) should be added if any video/audio files are to be saved in the internal storage. - /// @remarks The externalstorage privilege(http://tizen.org/privilege/externalstorage) should be added if any video/audio files are to be saved in the external storage. - /// @param[in] muxer A new handle to media muxer - /// @param[in] path The location of the output media file, such as the file path - /// This is the path at which the muxed file should be saved. - /// @param[in] format The format of the output media file - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIAMUXER_ERROR_INVALID_PATH Invalid path - /// @pre The media muxer state will be #MEDIAMUXER_STATE_IDLE by calling mediamuxer_create - /// @see #mediamuxer_output_format_e - int mediamuxer_set_data_sink( - mediamuxer_h muxer, - ffi.Pointer path, - int format, - ) { - return _mediamuxer_set_data_sink( - muxer, - path, - format, - ); - } - - late final _mediamuxer_set_data_sinkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediamuxer_h, ffi.Pointer, - ffi.Int32)>>('mediamuxer_set_data_sink'); - late final _mediamuxer_set_data_sink = _mediamuxer_set_data_sinkPtr - .asFunction, int)>(); - - /// @brief Adds the media track of interest to the muxer handle. - /// @since_tizen 3.0 - /// @param[in] muxer The media muxer handle - /// @param[in] media_format The format of media muxer - /// @param[out] track_index The index of the media track - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state - /// @pre The media muxer state must be set to #MEDIAMUXER_STATE_IDLE. - /// @see #media_format_h - /// @see mediamuxer_create() - /// @see mediamuxer_prepare() - int mediamuxer_add_track( - mediamuxer_h muxer, - media_format_h media_format, - ffi.Pointer track_index, - ) { - return _mediamuxer_add_track( - muxer, - media_format, - track_index, - ); - } - - late final _mediamuxer_add_trackPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediamuxer_h, media_format_h, - ffi.Pointer)>>('mediamuxer_add_track'); - late final _mediamuxer_add_track = _mediamuxer_add_trackPtr.asFunction< - int Function(mediamuxer_h, media_format_h, ffi.Pointer)>(); - - /// @brief Prepares the media muxer. - /// @since_tizen 3.0 - /// @remarks Initiates the necessary parameters. - /// @param[in] muxer The media muxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state - /// @pre The media muxer state must be set to #MEDIAMUXER_STATE_IDLE. - /// @post The media muxer state will be #MEDIAMUXER_STATE_READY. - /// @see mediamuxer_create() - /// @see mediamuxer_unprepare() - int mediamuxer_prepare( - mediamuxer_h muxer, - ) { - return _mediamuxer_prepare( - muxer, - ); - } - - late final _mediamuxer_preparePtr = - _lookup>( - 'mediamuxer_prepare'); - late final _mediamuxer_prepare = - _mediamuxer_preparePtr.asFunction(); - - /// @brief Starts the media muxer. - /// @since_tizen 3.0 - /// @remarks Keeps the muxer ready for writing data. - /// @param[in] muxer The media muxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state - /// @pre The media muxer state must be set to #MEDIAMUXER_STATE_READY. - /// @post The media muxer state will be #MEDIAMUXER_STATE_MUXING. - /// @see mediamuxer_prepare() - /// @see mediamuxer_stop() - int mediamuxer_start( - mediamuxer_h muxer, - ) { - return _mediamuxer_start( - muxer, - ); - } - - late final _mediamuxer_startPtr = - _lookup>( - 'mediamuxer_start'); - late final _mediamuxer_start = - _mediamuxer_startPtr.asFunction(); - - /// @brief Writes the media packet of interest to the muxer handle. - /// @since_tizen 3.0 - /// @param[in] muxer The media muxer handle - /// @param[in] track_index The index of the media track - /// @param[in] inbuf The packet of media muxer - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state - /// @pre The media muxer state must be set to #MEDIAMUXER_STATE_READY by calling mediamuxer_prepare() or - /// set to #MEDIAMUXER_STATE_PAUSED by calling mediamuxer_pause(). - /// @post The media muxer state will be #MEDIAMUXER_STATE_MUXING. - /// @see mediamuxer_prepare() - /// @see mediamuxer_close_track() - /// @see mediamuxer_pause() - /// @see #media_packet_h - int mediamuxer_write_sample( - mediamuxer_h muxer, - int track_index, - media_packet_h inbuf, - ) { - return _mediamuxer_write_sample( - muxer, - track_index, - inbuf, - ); - } - - late final _mediamuxer_write_samplePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediamuxer_h, ffi.Int, - media_packet_h)>>('mediamuxer_write_sample'); - late final _mediamuxer_write_sample = _mediamuxer_write_samplePtr - .asFunction(); - - /// @brief Closes the track from further writing of data. - /// @since_tizen 3.0 - /// @remarks For each added track, user needs to call this function to indicate the end of stream. - /// @param[in] muxer The media muxer handle - /// @param[in] track_index The selected track index - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The media muxer state must be set to #MEDIAMUXER_STATE_MUXING. - /// @see mediamuxer_write_sample() - /// @see mediamuxer_pause() - /// @see mediamuxer_unprepare() - /// @see #mediamuxer_error_e - int mediamuxer_close_track( - mediamuxer_h muxer, - int track_index, - ) { - return _mediamuxer_close_track( - muxer, - track_index, - ); - } - - late final _mediamuxer_close_trackPtr = - _lookup>( - 'mediamuxer_close_track'); - late final _mediamuxer_close_track = - _mediamuxer_close_trackPtr.asFunction(); - - /// @brief Pauses the media muxer. - /// @since_tizen 3.0 - /// @remarks To temporarily disable writing data for muxing. This function pauses a playing muxer - /// If the prior state of the muxer is not in PLAYING, no action will be taken. - /// @param[in] muxer The media muxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state - /// @pre The media muxer state must be set to #MEDIAMUXER_STATE_MUXING. - /// @post The media muxer state will be #MEDIAMUXER_STATE_PAUSED. - /// @see mediamuxer_write_sample() - /// @see mediamuxer_resume() - int mediamuxer_pause( - mediamuxer_h muxer, - ) { - return _mediamuxer_pause( - muxer, - ); - } - - late final _mediamuxer_pausePtr = - _lookup>( - 'mediamuxer_pause'); - late final _mediamuxer_pause = - _mediamuxer_pausePtr.asFunction(); - - /// @brief Resumes the media muxer. - /// @since_tizen 3.0 - /// @remarks Make it ready for any further writing. This function will resume a paused muxer. - /// If the prior state of the muxer is not playing, no action will be taken. - /// @param[in] muxer The media muxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state - /// @pre The media muxer state must be set to #MEDIAMUXER_STATE_PAUSED. - /// @post The media muxer state will be #MEDIAMUXER_STATE_MUXING. - /// @see mediamuxer_pause() - int mediamuxer_resume( - mediamuxer_h muxer, - ) { - return _mediamuxer_resume( - muxer, - ); - } - - late final _mediamuxer_resumePtr = - _lookup>( - 'mediamuxer_resume'); - late final _mediamuxer_resume = - _mediamuxer_resumePtr.asFunction(); - - /// @brief Stops the media muxer. - /// @since_tizen 3.0 - /// @remarks Keeps the muxer ready for writing data. - /// @param[in] muxer The media muxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state - /// @pre The media muxer state must be set to #MEDIAMUXER_STATE_MUXING - /// or #MEDIAMUXER_STATE_PAUSED. - /// @post The media muxer state will be #MEDIAMUXER_STATE_READY. - /// @see mediamuxer_start() - /// @see mediamuxer_unprepare() - int mediamuxer_stop( - mediamuxer_h muxer, - ) { - return _mediamuxer_stop( - muxer, - ); - } - - late final _mediamuxer_stopPtr = - _lookup>( - 'mediamuxer_stop'); - late final _mediamuxer_stop = - _mediamuxer_stopPtr.asFunction(); - - /// @brief Unprepares the media muxer. - /// @since_tizen 3.0 - /// @remarks Unrefs the variables created after calling mediamuxer_prepare(). - /// @param[in] muxer The media muxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state - /// @pre The media muxer state must be set to #MEDIAMUXER_STATE_READY or - /// set to #MEDIAMUXER_STATE_PAUSED by calling mediamuxer_pause(). - /// @post The media muxer state will be #MEDIAMUXER_STATE_IDLE. - /// @see mediamuxer_write_sample() - /// @see mediamuxer_pause() - /// @see mediamuxer_destroy() - int mediamuxer_unprepare( - mediamuxer_h muxer, - ) { - return _mediamuxer_unprepare( - muxer, - ); - } - - late final _mediamuxer_unpreparePtr = - _lookup>( - 'mediamuxer_unprepare'); - late final _mediamuxer_unprepare = - _mediamuxer_unpreparePtr.asFunction(); - - /// @brief Removes the instance of media muxer and clear all its context memory. - /// @since_tizen 3.0 - /// @param[in] muxer The media muxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state - /// @pre Create a media muxer handle by calling mediamuxer_create() function. - /// @post The media muxer state will be #MEDIAMUXER_STATE_NONE. - /// @see mediamuxer_create() - int mediamuxer_destroy( - mediamuxer_h muxer, - ) { - return _mediamuxer_destroy( - muxer, - ); - } - - late final _mediamuxer_destroyPtr = - _lookup>( - 'mediamuxer_destroy'); - late final _mediamuxer_destroy = - _mediamuxer_destroyPtr.asFunction(); - - /// @brief Gets media muxer state. - /// @since_tizen 3.0 - /// @param[in] muxer The media muxer handle - /// @param[out] state The media muxer sate - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a media muxer handle by calling mediamuxer_create() function. - /// @see #mediamuxer_state_e - int mediamuxer_get_state( - mediamuxer_h muxer, - ffi.Pointer state, - ) { - return _mediamuxer_get_state( - muxer, - state, - ); - } - - late final _mediamuxer_get_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mediamuxer_h, ffi.Pointer)>>('mediamuxer_get_state'); - late final _mediamuxer_get_state = _mediamuxer_get_statePtr - .asFunction)>(); - - /// @brief Sets a error callback function to be invoked when an error occurs. - /// @since_tizen 3.0 - /// @param[in] muxer The media muxer handle - /// @param[in] callback Callback function pointer - /// @param[in] user_data The user data passed from the code where - /// mediamuxer_set_error_cb() was invoked - /// This data will be accessible from @a user_data mediamuxer_error_cb - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre Create a media muxer handle by calling mediamuxer_create() function. - /// @post mediamuxer_error_cb() will be invoked. - /// @see mediamuxer_unset_error_cb() - /// @see mediamuxer_error_cb() - int mediamuxer_set_error_cb( - mediamuxer_h muxer, - mediamuxer_error_cb callback, - ffi.Pointer user_data, - ) { - return _mediamuxer_set_error_cb( - muxer, - callback, - user_data, - ); - } - - late final _mediamuxer_set_error_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediamuxer_h, mediamuxer_error_cb, - ffi.Pointer)>>('mediamuxer_set_error_cb'); - late final _mediamuxer_set_error_cb = _mediamuxer_set_error_cbPtr.asFunction< - int Function(mediamuxer_h, mediamuxer_error_cb, ffi.Pointer)>(); - - /// @brief Unsets the error callback function. - /// @since_tizen 3.0 - /// @param[in] muxer The media muxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see mediamuxer_error_cb() - int mediamuxer_unset_error_cb( - mediamuxer_h muxer, - ) { - return _mediamuxer_unset_error_cb( - muxer, - ); - } - - late final _mediamuxer_unset_error_cbPtr = - _lookup>( - 'mediamuxer_unset_error_cb'); - late final _mediamuxer_unset_error_cb = - _mediamuxer_unset_error_cbPtr.asFunction(); - - /// @brief Sets an EOS (end of stream) callback function to be invoked when an EOS occurs. - /// @since_tizen 4.0 - /// @param[in] muxer The media muxer handle - /// @param[in] callback Callback function pointer - /// @param[in] user_data The user data passed from the code where - /// mediamuxer_set_eos_cb() was invoked;\n - /// this data will be accessible from mediamuxer_eos_cb() - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state - /// @pre Create a media muxer handle by calling mediamuxer_create() function. - /// @post mediamuxer_eos_cb() will be invoked. - /// @see mediamuxer_unset_eos_cb() - /// @see mediamuxer_eos_cb() - int mediamuxer_set_eos_cb( - mediamuxer_h muxer, - mediamuxer_eos_cb callback, - ffi.Pointer user_data, - ) { - return _mediamuxer_set_eos_cb( - muxer, - callback, - user_data, - ); - } - - late final _mediamuxer_set_eos_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mediamuxer_h, mediamuxer_eos_cb, - ffi.Pointer)>>('mediamuxer_set_eos_cb'); - late final _mediamuxer_set_eos_cb = _mediamuxer_set_eos_cbPtr.asFunction< - int Function(mediamuxer_h, mediamuxer_eos_cb, ffi.Pointer)>(); - - /// @brief Unsets the EOS (end of stream) callback function. - /// @since_tizen 4.0 - /// @param[in] muxer The media muxer handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIAMUXER_ERROR_NONE Successful - /// @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state - /// @see mediamuxer_eos_cb() - int mediamuxer_unset_eos_cb( - mediamuxer_h muxer, - ) { - return _mediamuxer_unset_eos_cb( - muxer, - ); - } - - late final _mediamuxer_unset_eos_cbPtr = - _lookup>( - 'mediamuxer_unset_eos_cb'); - late final _mediamuxer_unset_eos_cb = - _mediamuxer_unset_eos_cbPtr.asFunction(); - - /// @brief Sets a error callback function to be invoked when an error occurs. - /// @details Following error codes can be delivered by error callback. - /// #MEDIA_STREAMER_ERROR_INVALID_OPERATION, - /// #MEDIA_STREAMER_ERROR_FILE_NO_SPACE_ON_DEVICE, - /// #MEDIA_STREAMER_ERROR_NOT_SUPPORTED, - /// #MEDIA_STREAMER_ERROR_CONNECTION_FAILED, - /// #MEDIA_STREAMER_ERROR_RESOURCE_CONFLICT - /// @since_tizen 3.0 - /// @param[in] streamer Media streamer handle - /// @param[in] callback Callback function pointer - /// @param[in] user_data The user data passed from the code where - /// media_streamer_set_error_cb() was invoked - /// This data will be accessible from media_streamer_error_cb - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a media streamer handle by calling media_streamer_create() function - /// @post media_streamer_error_cb() will be invoked. - /// @see media_streamer_unset_error_cb() - /// @see media_streamer_error_cb() - int media_streamer_set_error_cb( - media_streamer_h streamer, - media_streamer_error_cb callback, - ffi.Pointer user_data, - ) { - return _media_streamer_set_error_cb( - streamer, - callback, - user_data, - ); - } - - late final _media_streamer_set_error_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_h, media_streamer_error_cb, - ffi.Pointer)>>('media_streamer_set_error_cb'); - late final _media_streamer_set_error_cb = - _media_streamer_set_error_cbPtr.asFunction< - int Function(media_streamer_h, media_streamer_error_cb, - ffi.Pointer)>(); - - /// @brief Unsets the error callback function. - /// @since_tizen 3.0 - /// @param[in] streamer Media streamer handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @see media_streamer_error_cb() - int media_streamer_unset_error_cb( - media_streamer_h streamer, - ) { - return _media_streamer_unset_error_cb( - streamer, - ); - } - - late final _media_streamer_unset_error_cbPtr = - _lookup>( - 'media_streamer_unset_error_cb'); - late final _media_streamer_unset_error_cb = _media_streamer_unset_error_cbPtr - .asFunction(); - - /// @brief Sets a callback that will be triggered after media streamer state is changed. - /// @since_tizen 3.0 - /// @param[in] streamer Media streamer handle - /// @param[in] callback Callback function pointer - /// @param[in] user_data The user data passed from the code - /// where media_streamer_set_state_change_cb() was invoked - /// This data will be accessible from media_streamer_state_changed_cb - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a media streamer handle by calling media_streamer_create() function - /// @post media_streamer_state_changed_cb() will be invoked. - /// @see media_streamer_unset_state_change_cb() - /// @see media_streamer_state_change_cb() - int media_streamer_set_state_change_cb( - media_streamer_h streamer, - media_streamer_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _media_streamer_set_state_change_cb( - streamer, - callback, - user_data, - ); - } - - late final _media_streamer_set_state_change_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_h, media_streamer_state_changed_cb, - ffi.Pointer)>>('media_streamer_set_state_change_cb'); - late final _media_streamer_set_state_change_cb = - _media_streamer_set_state_change_cbPtr.asFunction< - int Function(media_streamer_h, media_streamer_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Unsets the state changed callback function. - /// @since_tizen 3.0 - /// @param[in] streamer Media streamer handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @see media_streamer_set_state_change_cb() - int media_streamer_unset_state_change_cb( - media_streamer_h streamer, - ) { - return _media_streamer_unset_state_change_cb( - streamer, - ); - } - - late final _media_streamer_unset_state_change_cbPtr = - _lookup>( - 'media_streamer_unset_state_change_cb'); - late final _media_streamer_unset_state_change_cb = - _media_streamer_unset_state_change_cbPtr - .asFunction(); - - /// @brief Sets a callback function to be invoked when the media streamer is interrupted. - /// @since_tizen 3.0 - /// @param[in] streamer Media streamer handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @post media_streamer_interrupted_cb() will be invoked. - /// @see media_streamer_unset_interrupted_cb() - /// @see #media_streamer_interrupted_code_e - int media_streamer_set_interrupted_cb( - media_streamer_h streamer, - media_streamer_interrupted_cb callback, - ffi.Pointer user_data, - ) { - return _media_streamer_set_interrupted_cb( - streamer, - callback, - user_data, - ); - } - - late final _media_streamer_set_interrupted_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_h, media_streamer_interrupted_cb, - ffi.Pointer)>>('media_streamer_set_interrupted_cb'); - late final _media_streamer_set_interrupted_cb = - _media_streamer_set_interrupted_cbPtr.asFunction< - int Function(media_streamer_h, media_streamer_interrupted_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback function. - /// @since_tizen 3.0 - /// @param[in] streamer Media streamer handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @see media_streamer_set_interrupted_cb() - int media_streamer_unset_interrupted_cb( - media_streamer_h streamer, - ) { - return _media_streamer_unset_interrupted_cb( - streamer, - ); - } - - late final _media_streamer_unset_interrupted_cbPtr = - _lookup>( - 'media_streamer_unset_interrupted_cb'); - late final _media_streamer_unset_interrupted_cb = - _media_streamer_unset_interrupted_cbPtr - .asFunction(); - - /// @brief Sets a callback function to be invoked when buffer underrun or overflow is occurred. - /// @details This function can be called only for MEDIA_STREAMER_NODE_SRC_TYPE_CUSTOM source type - /// @since_tizen 3.0 - /// @remarks This function is used for media stream playback only. - /// @param[in] source Media streamer source node handle - /// @param[in] callback The buffer status callback function to register - /// @param[in] user_data The user data passed from the code where - /// media_streamer_src_set_buffer_status_cb() was invoked - /// This data will be accessible from media_streamer_custom_buffer_status_cb() - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a media streamer source node handle by calling media_streamer_node_create_src() function - /// @pre Add created media streamer source node to media streamer by calling media_streamer_node_add() function - /// @post media_streamer_custom_buffer_status_cb() will be invoked. - /// @see media_streamer_src_unset_buffer_status_cb() - /// @see media_streamer_custom_buffer_status_cb() - int media_streamer_src_set_buffer_status_cb( - media_streamer_node_h source, - media_streamer_custom_buffer_status_cb callback, - ffi.Pointer user_data, - ) { - return _media_streamer_src_set_buffer_status_cb( - source, - callback, - user_data, - ); - } - - late final _media_streamer_src_set_buffer_status_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_streamer_node_h, - media_streamer_custom_buffer_status_cb, - ffi.Pointer)>>( - 'media_streamer_src_set_buffer_status_cb'); - late final _media_streamer_src_set_buffer_status_cb = - _media_streamer_src_set_buffer_status_cbPtr.asFunction< - int Function(media_streamer_node_h, - media_streamer_custom_buffer_status_cb, ffi.Pointer)>(); - - /// @brief Unsets the src buffer status callback function. - /// @since_tizen 3.0 - /// @param[in] source Media streamer source node handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @see media_streamer_src_set_buffer_status_cb() - int media_streamer_src_unset_buffer_status_cb( - media_streamer_node_h source, - ) { - return _media_streamer_src_unset_buffer_status_cb( - source, - ); - } - - late final _media_streamer_src_unset_buffer_status_cbPtr = - _lookup>( - 'media_streamer_src_unset_buffer_status_cb'); - late final _media_streamer_src_unset_buffer_status_cb = - _media_streamer_src_unset_buffer_status_cbPtr - .asFunction(); - - /// @brief Sets a callback function to be called when the custom sink is ready for data processing. - /// @details This function can be called only for MEDIA_STREAMER_NODE_SINK_TYPE_CUSTOM sink type - /// @since_tizen 3.0 - /// @param[in] sink Media streamer sink node handle - /// @param[in] callback Callback function pointer - /// @param[in] user_data The user data passed from the code where - /// media_streamer_sink_set_data_ready_cb() was invoked - /// This data will be accessible from media_streamer_sink_data_ready_cb - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a media streamer sink handle by calling media_streamer_node_create_sink() function - /// @pre Add created media streamer sink node to media streamer by calling media_streamer_node_add() function - /// @post media_streamer_sink_data_ready_cb() will be invoked. - /// @see media_streamer_sink_unset_data_ready_cb() - /// @see media_streamer_sink_data_ready_cb() - int media_streamer_sink_set_data_ready_cb( - media_streamer_node_h sink, - media_streamer_sink_data_ready_cb callback, - ffi.Pointer user_data, - ) { - return _media_streamer_sink_set_data_ready_cb( - sink, - callback, - user_data, - ); - } - - late final _media_streamer_sink_set_data_ready_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_streamer_node_h, - media_streamer_sink_data_ready_cb, - ffi.Pointer)>>('media_streamer_sink_set_data_ready_cb'); - late final _media_streamer_sink_set_data_ready_cb = - _media_streamer_sink_set_data_ready_cbPtr.asFunction< - int Function(media_streamer_node_h, media_streamer_sink_data_ready_cb, - ffi.Pointer)>(); - - /// @brief Unsets the sink data ready callback function. - /// @since_tizen 3.0 - /// @param[in] sink Media streamer sink node handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @see media_streamer_sink_set_data_ready_cb() - int media_streamer_sink_unset_data_ready_cb( - media_streamer_node_h sink, - ) { - return _media_streamer_sink_unset_data_ready_cb( - sink, - ); - } - - late final _media_streamer_sink_unset_data_ready_cbPtr = - _lookup>( - 'media_streamer_sink_unset_data_ready_cb'); - late final _media_streamer_sink_unset_data_ready_cb = - _media_streamer_sink_unset_data_ready_cbPtr - .asFunction(); - - /// @brief Sets a callback function to be called when custom sink detect the end-of-stream. - /// @since_tizen 3.0 - /// @param[in] sink Media streamer sink node handle - /// @param[in] callback Callback function pointer - /// @param[in] user_data The user data passed from the code where - /// media_streamer_sink_set_eos_cb() was invoked. - /// This data will be accessible from media_streamer_sink_eos_cb - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a media streamer sink handle by calling media_streamer_node_create_sink() function - /// @pre Add created media streamer sink node to media streamer by calling media_streamer_node_add() function - /// @post media_streamer_sink_eos_cb() will be invoked. - /// @see media_streamer_sink_unset_eos_cb() - /// @see media_streamer_sink_eos_cb() - int media_streamer_sink_set_eos_cb( - media_streamer_node_h sink, - media_streamer_sink_eos_cb callback, - ffi.Pointer user_data, - ) { - return _media_streamer_sink_set_eos_cb( - sink, - callback, - user_data, - ); - } - - late final _media_streamer_sink_set_eos_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_node_h, media_streamer_sink_eos_cb, - ffi.Pointer)>>('media_streamer_sink_set_eos_cb'); - late final _media_streamer_sink_set_eos_cb = - _media_streamer_sink_set_eos_cbPtr.asFunction< - int Function(media_streamer_node_h, media_streamer_sink_eos_cb, - ffi.Pointer)>(); - - /// @brief Unsets the sink end-of-stream callback function. - /// @since_tizen 3.0 - /// @param[in] sink Media streamer sink node handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @see media_streamer_sink_set_eos_cb() - int media_streamer_sink_unset_eos_cb( - media_streamer_node_h sink, - ) { - return _media_streamer_sink_unset_eos_cb( - sink, - ); - } - - late final _media_streamer_sink_unset_eos_cbPtr = - _lookup>( - 'media_streamer_sink_unset_eos_cb'); - late final _media_streamer_sink_unset_eos_cb = - _media_streamer_sink_unset_eos_cbPtr - .asFunction(); - - /// @brief Creates an instance of media streamer and - /// passes the handle to the caller. - /// @since_tizen 3.0 - /// @remarks You must release @a streamer using media_streamer_destroy() - /// @param[out] streamer Media streamer handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @post The media streamer state will be #MEDIA_STREAMER_STATE_IDLE. - /// @see media_streamer_destroy() - int media_streamer_create( - ffi.Pointer streamer, - ) { - return _media_streamer_create( - streamer, - ); - } - - late final _media_streamer_createPtr = _lookup< - ffi.NativeFunction)>>( - 'media_streamer_create'); - late final _media_streamer_create = _media_streamer_createPtr - .asFunction)>(); - - /// @brief Sets media streamer state to MEDIA_STREAMER_STATE_READY. - /// @since_tizen 3.0 - /// @param[in] streamer Media streamer handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The media streamer state must be set to MEDIA_STREAMER_STATE_IDLE - /// by calling media_streamer_create() or media_streamer_unprepare(). - /// @pre At least one src and one sink should be added and linked in the streamer - /// by calling media_streamer_node_create_src(), media_streamer_node_create_sink() and media_streamer_node_link(). - /// @post The media streamer state will be #MEDIA_STREAMER_STATE_READY. - /// @see media_streamer_unprepare() - /// @see media_streamer_create() - int media_streamer_prepare( - media_streamer_h streamer, - ) { - return _media_streamer_prepare( - streamer, - ); - } - - late final _media_streamer_preparePtr = - _lookup>( - 'media_streamer_prepare'); - late final _media_streamer_prepare = - _media_streamer_preparePtr.asFunction(); - - /// @brief Sets media streamer state to MEDIA_STREAMER_STATE_IDLE. - /// @details The most recently used media is reset and no longer associated with the media streamer. - /// @since_tizen 3.0 - /// @param[in] streamer Media streamer handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The media streamer state should be higher than #MEDIA_STREAMER_STATE_IDLE. - /// @post The media streamer state will be #MEDIA_STREAMER_STATE_IDLE. - /// @see media_streamer_prepare() - int media_streamer_unprepare( - media_streamer_h streamer, - ) { - return _media_streamer_unprepare( - streamer, - ); - } - - late final _media_streamer_unpreparePtr = - _lookup>( - 'media_streamer_unprepare'); - late final _media_streamer_unprepare = - _media_streamer_unpreparePtr.asFunction(); - - /// @brief Sets media streamer state to MEDIA_STREAMER_STATE_PLAYING. - /// @details Start running the current streamer, or resumes it if paused. - /// @since_tizen 3.0 - /// @param[in] streamer Media streamer handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The media streamer state must be set to #MEDIA_STREAMER_STATE_READY by calling media_streamer_prepare() or - /// set to #MEDIA_STREAMER_STATE_PAUSED by calling media_streamer_pause(). - /// @post The media streamer state will be #MEDIA_STREAMER_STATE_PLAYING. - /// @see media_streamer_create() - /// @see media_streamer_pause() - /// @see media_streamer_stop() - int media_streamer_play( - media_streamer_h streamer, - ) { - return _media_streamer_play( - streamer, - ); - } - - late final _media_streamer_playPtr = - _lookup>( - 'media_streamer_play'); - late final _media_streamer_play = - _media_streamer_playPtr.asFunction(); - - /// @brief Pauses the media streamer. - /// @since_tizen 3.0 - /// @param[in] streamer Media streamer handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The media streamer state must be set to #MEDIA_STREAMER_STATE_PLAYING. - /// @post The media streamer state will be #MEDIA_STREAMER_STATE_READY. - /// @see media_streamer_create() - /// @see media_streamer_play() - int media_streamer_pause( - media_streamer_h streamer, - ) { - return _media_streamer_pause( - streamer, - ); - } - - late final _media_streamer_pausePtr = - _lookup>( - 'media_streamer_pause'); - late final _media_streamer_pause = - _media_streamer_pausePtr.asFunction(); - - /// @brief Stops the media streamer. - /// @since_tizen 3.0 - /// @param[in] streamer Media streamer handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The media streamer state must be set to #MEDIA_STREAMER_STATE_PLAYING by calling media_streamer_play() or - /// set to #MEDIA_STREAMER_STATE_PAUSED by calling media_streamer_pause(). - /// @post The media streamer state will be #MEDIA_STREAMER_STATE_READY. - /// @see media_streamer_create() - /// @see media_streamer_play() - /// @see media_streamer_pause() - int media_streamer_stop( - media_streamer_h streamer, - ) { - return _media_streamer_stop( - streamer, - ); - } - - late final _media_streamer_stopPtr = - _lookup>( - 'media_streamer_stop'); - late final _media_streamer_stop = - _media_streamer_stopPtr.asFunction(); - - /// @brief Destroys media streamer. - /// @since_tizen 3.0 - /// @remarks Nodes in streamer will be removed automatically. - /// Don't need to remove nodes by calling media_streamer_node_remove(). - /// If you want to change the node without destroying streamer handle, - /// you can call the media_streamer_node_remove() function - /// after setting the streamer state to MEDIA_STREAMER_STATE_IDLE state. - /// @param[in] streamer Media streamer handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a media streamer handle by calling media_streamer_create() function - /// @post The media streamer state will be #MEDIA_STREAMER_STATE_NONE. - /// @see media_streamer_create() - int media_streamer_destroy( - media_streamer_h streamer, - ) { - return _media_streamer_destroy( - streamer, - ); - } - - late final _media_streamer_destroyPtr = - _lookup>( - 'media_streamer_destroy'); - late final _media_streamer_destroy = - _media_streamer_destroyPtr.asFunction(); - - /// @brief Changes playback position to the defined time value, asynchronously. - /// @since_tizen 3.0 - /// @param[in] streamer Media streamer handle - /// @param[in] time Time in millisecond - /// @param[in] accurate If @c true, it will seek to the accurate position, but this might be considerably slower for some formats, - /// otherwise @c false, it will seek to the nearest keyframe - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_STREAMER_ERROR_SEEK_FAILED Seek operation failure - /// @pre The media streamer state must be one of these: #MEDIA_STREAMER_STATE_PAUSED, or #MEDIA_STREAMER_STATE_PLAYING. - /// @post It invokes media_streamer_set_play_position() when seek operation completes, if you set a callback. - /// @see media_streamer_get_play_position() - int media_streamer_set_play_position( - media_streamer_h streamer, - int time, - bool accurate, - media_streamer_position_changed_cb callback, - ffi.Pointer user_data, - ) { - return _media_streamer_set_play_position( - streamer, - time, - accurate, - callback, - user_data, - ); - } - - late final _media_streamer_set_play_positionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_streamer_h, - ffi.Int, - ffi.Bool, - media_streamer_position_changed_cb, - ffi.Pointer)>>('media_streamer_set_play_position'); - late final _media_streamer_set_play_position = - _media_streamer_set_play_positionPtr.asFunction< - int Function(media_streamer_h, int, bool, - media_streamer_position_changed_cb, ffi.Pointer)>(); - - /// @brief Gets the current position in milliseconds. - /// @since_tizen 3.0 - /// @param[in] streamer Media streamer handle - /// @param[out] time The current position in milliseconds - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The media streamer state must be one of these: #MEDIA_STREAMER_STATE_PAUSED, or #MEDIA_STREAMER_STATE_PLAYING. - /// @see media_streamer_set_play_position() - int media_streamer_get_play_position( - media_streamer_h streamer, - ffi.Pointer time, - ) { - return _media_streamer_get_play_position( - streamer, - time, - ); - } - - late final _media_streamer_get_play_positionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_h, - ffi.Pointer)>>('media_streamer_get_play_position'); - late final _media_streamer_get_play_position = - _media_streamer_get_play_positionPtr - .asFunction)>(); - - /// @brief Gets the total running time of the associated media. - /// @since_tizen 3.0 - /// @remarks The streamer's src node type should be MEDIA_STREAMER_NODE_SRC_TYPE_FILE or MEDIA_STREAMER_NODE_SRC_TYPE_HTTP. - /// If not, return value will be MEDIA_STREAMER_ERROR_NONE and duration will be -1. - /// @param[in] streamer Media streamer handle - /// @param[out] duration The duration in milliseconds - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The media streamer state must be one of these: #MEDIA_STREAMER_STATE_PAUSED, or #MEDIA_STREAMER_STATE_PLAYING. - int media_streamer_get_duration( - media_streamer_h streamer, - ffi.Pointer duration, - ) { - return _media_streamer_get_duration( - streamer, - duration, - ); - } - - late final _media_streamer_get_durationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_h, - ffi.Pointer)>>('media_streamer_get_duration'); - late final _media_streamer_get_duration = _media_streamer_get_durationPtr - .asFunction)>(); - - /// @brief Gets media streamer state. - /// @since_tizen 3.0 - /// @param[in] streamer Media streamer handle - /// @param[out] state Media streamer state - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a media streamer handle by calling media_streamer_create() function - /// @see #media_streamer_state_e - int media_streamer_get_state( - media_streamer_h streamer, - ffi.Pointer state, - ) { - return _media_streamer_get_state( - streamer, - state, - ); - } - - late final _media_streamer_get_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_h, - ffi.Pointer)>>('media_streamer_get_state'); - late final _media_streamer_get_state = _media_streamer_get_statePtr - .asFunction)>(); - - /// @brief Creates media streamer source node. - /// @since_tizen 3.0 - /// @privilege http://tizen.org/privilege/internet - /// http://tizen.org/privilege/camera - /// http://tizen.org/privilege/recorder - /// @remarks The internet privilege(http://tizen.org/privilege/internet) should be added if any URIs are used to play from network. - /// The camera privilege(http://tizen.org/privilege/camera) should be added if the src node handle the camera device. - /// The recorder privilege(http://tizen.org/privilege/recorder) should be added if the src node handle the recorder device. - /// You can release source node using media_streamer_node_destroy() function. - /// @param[in] type Media streamer source node type - /// @param[out] src Media streamer source node handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_STREAMER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_STREAMER_ERROR_NOT_SUPPORTED Not supported - /// @see #media_streamer_node_src_type_e - /// @see media_streamer_node_destroy() - int media_streamer_node_create_src( - int type, - ffi.Pointer src, - ) { - return _media_streamer_node_create_src( - type, - src, - ); - } - - late final _media_streamer_node_create_srcPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer)>>( - 'media_streamer_node_create_src'); - late final _media_streamer_node_create_src = - _media_streamer_node_create_srcPtr - .asFunction)>(); - - /// @brief Pushes packet into custom source node. - /// @details This function can be called only for MEDIA_STREAMER_NODE_SRC_TYPE_CUSTOM. - /// @since_tizen 3.0 - /// @param[in] src Media streamer source node handle - /// @param[in] packet Media packet handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a source node handle by calling media_streamer_node_create_src() function - /// @pre The media streamer state must be set to #MEDIA_STREAMER_STATE_IDLE at least. - /// @see #media_packet_h - int media_streamer_node_push_packet( - media_streamer_node_h src, - media_packet_h packet, - ) { - return _media_streamer_node_push_packet( - src, - packet, - ); - } - - late final _media_streamer_node_push_packetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_node_h, - media_packet_h)>>('media_streamer_node_push_packet'); - late final _media_streamer_node_push_packet = - _media_streamer_node_push_packetPtr - .asFunction(); - - /// @brief Creates media streamer sink node. - /// @since_tizen 3.0 - /// @privilege http://tizen.org/privilege/internet - /// @remarks The internet privilege(http://tizen.org/privilege/internet) should be added if any URIs are used to transmit the output data. - /// You can release @a sink node using media_streamer_node_destroy() - /// @remarks If @a type is #MEDIA_STREAMER_NODE_SINK_TYPE_ADAPTIVE, the HTTP server will be started and the server will be able to transmit the output data to the other device. - /// The application must have an authentication responsibility between a server and client because the data transmission is not secure. - /// @param[in] type Type of sink node to be created - /// @param[out] sink Media streamer sink node handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_STREAMER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_STREAMER_ERROR_NOT_SUPPORTED Not supported - /// @see #media_streamer_node_sink_type_e - /// @see media_streamer_node_destroy() - int media_streamer_node_create_sink( - int type, - ffi.Pointer sink, - ) { - return _media_streamer_node_create_sink( - type, - sink, - ); - } - - late final _media_streamer_node_create_sinkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer)>>( - 'media_streamer_node_create_sink'); - late final _media_streamer_node_create_sink = - _media_streamer_node_create_sinkPtr - .asFunction)>(); - - /// @brief Pulls packet from custom sink node. - /// @details This function can be called only for MEDIA_STREAMER_NODE_SINK_TYPE_CUSTOM - /// @since_tizen 3.0 - /// @param[in] sink Media streamer sink node handle - /// @param[out] packet Media packet handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a sink node handle by calling media_streamer_node_create_sink() function - /// @pre Set media_streamer_data_ready_cb by calling media_streamer_set_data_ready_cb() function. - /// @see #media_packet_h - /// @see media_streamer_node_create_sink() - int media_streamer_node_pull_packet( - media_streamer_node_h sink, - ffi.Pointer packet, - ) { - return _media_streamer_node_pull_packet( - sink, - packet, - ); - } - - late final _media_streamer_node_pull_packetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_node_h, - ffi.Pointer)>>('media_streamer_node_pull_packet'); - late final _media_streamer_node_pull_packet = - _media_streamer_node_pull_packetPtr.asFunction< - int Function(media_streamer_node_h, ffi.Pointer)>(); - - /// @brief Creates media streamer node except MEDIA_STREAMER_NODE_TYPE_SRC and MEDIA_STREAMER_NODE_TYPE_SINK. - /// @details Creates node specific @a type with specific format of input - /// and output data. - /// @since_tizen 3.0 - /// @remarks The node type should not be MEDIA_STREAMER_NODE_TYPE_SRC and MEDIA_STREAMER_NODE_TYPE_SINK. - /// To create src/sink type node, media_streamer_node_create_src()/media_streamer_node_create_sink() should be called. - /// You can release @a node using media_streamer_node_destroy() function - /// @param[in] type Created node type - /// @param[in] in_fmt Media format handle for input data - /// @param[in] out_fmt Media format handle for output data - /// @param[out] node Media streamer node handle to be created - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @see #media_streamer_node_type_e - /// @see #media_format_h - /// @see media_streamer_node_destroy() - int media_streamer_node_create( - int type, - media_format_h in_fmt, - media_format_h out_fmt, - ffi.Pointer node, - ) { - return _media_streamer_node_create( - type, - in_fmt, - out_fmt, - node, - ); - } - - late final _media_streamer_node_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, media_format_h, media_format_h, - ffi.Pointer)>>( - 'media_streamer_node_create'); - late final _media_streamer_node_create = - _media_streamer_node_createPtr.asFunction< - int Function(int, media_format_h, media_format_h, - ffi.Pointer)>(); - - /// @brief Adds node to media streamer. - /// @since_tizen 3.0 - /// @param[in] streamer Media streamer handle - /// @param[in] node Media streamer node handle to be added - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create media streamer handle by calling media_streamer_create() function - /// @pre Create node handle by calling media_streamer_node_create() function - /// @see media_streamer_create() - /// @see media_streamer_node_create() - /// @see media_streamer_node_create_src() - /// @see media_streamer_node_create_sink() - int media_streamer_node_add( - media_streamer_h streamer, - media_streamer_node_h node, - ) { - return _media_streamer_node_add( - streamer, - node, - ); - } - - late final _media_streamer_node_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_h, - media_streamer_node_h)>>('media_streamer_node_add'); - late final _media_streamer_node_add = _media_streamer_node_addPtr - .asFunction(); - - /// @brief Destroys media streamer node. - /// @since_tizen 3.0 - /// @param[in] node Media streamer node handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create node handle by calling media_streamer_node_create() function - /// @pre If the node was added to media streamer, it have to be removed by calling media_streamer_node_remove() function - /// @see media_streamer_node_create() - /// @see media_streamer_node_create_src() - /// @see media_streamer_node_create_sink() - /// @see media_streamer_node_remove() - int media_streamer_node_destroy( - media_streamer_node_h node, - ) { - return _media_streamer_node_destroy( - node, - ); - } - - late final _media_streamer_node_destroyPtr = - _lookup>( - 'media_streamer_node_destroy'); - late final _media_streamer_node_destroy = _media_streamer_node_destroyPtr - .asFunction(); - - /// @brief Removes media streamer node from streamer. - /// @since_tizen 3.0 - /// @remarks To remove node without error posting, the state of streamer should be MEDIA_STREAMER_STATE_IDLE. - /// If the node is linked, it will be unlinked before removing. - /// @param[in] streamer Media streamer handle - /// @param[in] node Media streamer node handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Add node to streamer by calling media_streamer_node_add() function - /// @see media_streamer_node_add() - int media_streamer_node_remove( - media_streamer_h streamer, - media_streamer_node_h node, - ) { - return _media_streamer_node_remove( - streamer, - node, - ); - } - - late final _media_streamer_node_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_h, - media_streamer_node_h)>>('media_streamer_node_remove'); - late final _media_streamer_node_remove = _media_streamer_node_removePtr - .asFunction(); - - /// @brief Links two media streamer nodes. - /// @since_tizen 3.0 - /// @remarks Pads are node's input and output, where you can connect other nodes. - /// (src_node) - (sink_node) - /// src_node and sink_node is determined relatively. - /// In case of (A)-(B)-(C), - /// (B) can be sink_node with (A) or (B) can be src_node with (C). - /// However, src type node is always src node and sink type node is always sink node. - /// (A) is src node and can not be sink node at all. - /// (C) is sink node and can not be src node at all. - /// @param[in] src_node Media streamer node handle - /// @param[in] src_pad_name The name of the source pad of the source node - /// @param[in] dest_node The destination media streamer node handle - /// @param[in] sink_pad_name The name of the sink pad of the destination node - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a source node and a destination node handles - /// by calling media_streamer_node_create() function - /// and add the nodes into streamer by calling media_streamer_node_add() function. - /// @see media_streamer_node_create() - /// @see media_streamer_node_add() - int media_streamer_node_link( - media_streamer_node_h src_node, - ffi.Pointer src_pad_name, - media_streamer_node_h dest_node, - ffi.Pointer sink_pad_name, - ) { - return _media_streamer_node_link( - src_node, - src_pad_name, - dest_node, - sink_pad_name, - ); - } - - late final _media_streamer_node_linkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_streamer_node_h, - ffi.Pointer, - media_streamer_node_h, - ffi.Pointer)>>('media_streamer_node_link'); - late final _media_streamer_node_link = - _media_streamer_node_linkPtr.asFunction< - int Function(media_streamer_node_h, ffi.Pointer, - media_streamer_node_h, ffi.Pointer)>(); - - /// @brief Sets media format for pad of media streamer node. - /// @since_tizen 3.0 - /// @param[in] node Media streamer node handle - /// @param[in] pad_name Pad name - /// @param[in] fmt Media format handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a node handle by calling media_streamer_node_createxxx() function - /// @pre Get pad name by calling media_streamer_node_get_pad_name() function - /// @see #media_format_h - int media_streamer_node_set_pad_format( - media_streamer_node_h node, - ffi.Pointer pad_name, - media_format_h fmt, - ) { - return _media_streamer_node_set_pad_format( - node, - pad_name, - fmt, - ); - } - - late final _media_streamer_node_set_pad_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_node_h, ffi.Pointer, - media_format_h)>>('media_streamer_node_set_pad_format'); - late final _media_streamer_node_set_pad_format = - _media_streamer_node_set_pad_formatPtr.asFunction< - int Function( - media_streamer_node_h, ffi.Pointer, media_format_h)>(); - - /// @brief Gets media format for pad of media streamer node. - /// @since_tizen 3.0 - /// @param[in] node Media streamer node handle - /// @param[in] pad_name Pad name - /// @param[out] fmt Media format handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a node handle by calling media_streamer_node_createxxx() function - /// @pre Get pad name by calling media_streamer_node_get_pad_name() function - /// @see #media_format_h - int media_streamer_node_get_pad_format( - media_streamer_node_h node, - ffi.Pointer pad_name, - ffi.Pointer fmt, - ) { - return _media_streamer_node_get_pad_format( - node, - pad_name, - fmt, - ); - } - - late final _media_streamer_node_get_pad_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_node_h, ffi.Pointer, - ffi.Pointer)>>( - 'media_streamer_node_get_pad_format'); - late final _media_streamer_node_get_pad_format = - _media_streamer_node_get_pad_formatPtr.asFunction< - int Function(media_streamer_node_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets name of node pads. - /// @since_tizen 3.0 - /// @remarks After using the src_pad_name and sink_pad_name, it have to be free. - /// src_pad_name or sink_pad_name can be null according to the node type. - /// In case of src type node, sink_pad_name will be null. - /// In case of sink type node, src_pad_name will be null. - /// @param[in] node Media streamer node handle - /// @param[out] src_pad_name Array of source pad name - /// @param[out] src_pad_num The number of source pads - /// @param[out] sink_pad_name Array of sink pad name - /// @param[out] sink_pad_num The number of sink pads - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a node handle by calling media_streamer_node_createxxx() function - /// @see media_streamer_node_create() - /// @see media_streamer_node_create_src() - /// @see media_streamer_node_create_sink() - int media_streamer_node_get_pad_name( - media_streamer_node_h node, - ffi.Pointer>> src_pad_name, - ffi.Pointer src_pad_num, - ffi.Pointer>> sink_pad_name, - ffi.Pointer sink_pad_num, - ) { - return _media_streamer_node_get_pad_name( - node, - src_pad_name, - src_pad_num, - sink_pad_name, - sink_pad_num, - ); - } - - late final _media_streamer_node_get_pad_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_streamer_node_h, - ffi.Pointer>>, - ffi.Pointer, - ffi.Pointer>>, - ffi.Pointer)>>('media_streamer_node_get_pad_name'); - late final _media_streamer_node_get_pad_name = - _media_streamer_node_get_pad_namePtr.asFunction< - int Function( - media_streamer_node_h, - ffi.Pointer>>, - ffi.Pointer, - ffi.Pointer>>, - ffi.Pointer)>(); - - /// @brief Sets parameters of node. - /// @details Many parameters can be set at one time all together by using bundle. - /// @since_tizen 3.0 - /// @privilege http://tizen.org/privilege/mediastorage - /// http://tizen.org/privilege/externalstorage - /// @remarks The mediastorage privilege(http://tizen.org/privilege/mediastorage) should be added if any video/audio files are written in the internal storage devices. - /// The externalstorage privilege(http://tizen.org/privilege/externalstorage) should be added if any video/audio files are written in the external storage devices. - /// @param[in] node Media streamer node handle - /// @param[in] param_list Key value array of media streamer node parameters - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_STREAMER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a node handle by calling media_streamer_node_createXXX() function. - /// @pre Get param list to set by calling media_streamer_node_get_params() function. - /// @see media_streamer_node_create() - /// @see media_streamer_node_create_src() - /// @see media_streamer_node_create_sink() - /// @see media_streamer_node_get_params() - int media_streamer_node_set_params( - media_streamer_node_h node, - ffi.Pointer param_list, - ) { - return _media_streamer_node_set_params( - node, - param_list, - ); - } - - late final _media_streamer_node_set_paramsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_node_h, - ffi.Pointer)>>('media_streamer_node_set_params'); - late final _media_streamer_node_set_params = - _media_streamer_node_set_paramsPtr.asFunction< - int Function(media_streamer_node_h, ffi.Pointer)>(); - - /// @brief Gets node parameter list. - /// @since_tizen 3.0 - /// @remarks After using param_list, it have to be free by calling bundle_free() in bundle.h - /// Refer to the "Parameter information of node" in this file to get info. - /// @param[in] node Media streamer node handle - /// @param[out] param_list Key value array of media streamer node parameters - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a node handle by calling media_streamer_node_createXXX() function - /// @post Set params which are needed to set by calling media_streamer_node_set_params() or media_streamer_node_set_param() function. - /// @see media_streamer_node_create() - /// @see media_streamer_src_create() - /// @see media_streamer_sink_create() - /// @see media_streamer_node_set_params() - /// @see media_streamer_node_set_param() - int media_streamer_node_get_params( - media_streamer_node_h node, - ffi.Pointer> param_list, - ) { - return _media_streamer_node_get_params( - node, - param_list, - ); - } - - late final _media_streamer_node_get_paramsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_streamer_node_h, ffi.Pointer>)>>( - 'media_streamer_node_get_params'); - late final _media_streamer_node_get_params = - _media_streamer_node_get_paramsPtr.asFunction< - int Function( - media_streamer_node_h, ffi.Pointer>)>(); - - /// @brief Sets single parameter of node. - /// @details Sets parameter one by one without creating param bundle. - /// @since_tizen 3.0 - /// @privilege http://tizen.org/privilege/mediastorage - /// http://tizen.org/privilege/externalstorage - /// @remarks The mediastorage privilege(http://tizen.org/privilege/mediastorage) should be added if any video/audio files are written in the internal storage devices. - /// The externalstorage privilege(http://tizen.org/privilege/externalstorage) should be added if any video/audio files are written in the external storage devices. - /// @param[in] node Media streamer node handle - /// @param[in] param_name Param name of node - /// @param[in] param_value Param value of node - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_STREAMER_ERROR_PERMISSION_DENIED Permission denied - /// @pre Create a node handle by calling media_streamer_node_createXXX() function. - /// @pre Get param list to set by calling media_streamer_node_get_params() function. - /// @see media_streamer_node_create() - /// @see media_streamer_src_create() - /// @see media_streamer_sink_create() - /// @see media_streamer_node_get_params() - /// @see media_streamer_node_get_param() - int media_streamer_node_set_param( - media_streamer_node_h node, - ffi.Pointer param_name, - ffi.Pointer param_value, - ) { - return _media_streamer_node_set_param( - node, - param_name, - param_value, - ); - } - - late final _media_streamer_node_set_paramPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_node_h, ffi.Pointer, - ffi.Pointer)>>('media_streamer_node_set_param'); - late final _media_streamer_node_set_param = - _media_streamer_node_set_paramPtr.asFunction< - int Function(media_streamer_node_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets value of parameter. - /// @details Gets parameter one by one without creating param bundle. - /// @since_tizen 3.0 - /// @param[in] node Media streamer node handle - /// @param[in] param_name Param name of node - /// @param[out] param_value Param value of node - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_STREAMER_ERROR_NONE Successful - /// @retval #MEDIA_STREAMER_ERROR_INVALID_STATE Invalid state - /// @retval #MEDIA_STREAMER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_STREAMER_ERROR_INVALID_OPERATION Invalid operation - /// @pre Create a node handle by calling media_streamer_node_createXXX() function. - /// @pre Get param list to know the param name by calling media_streamer_node_get_params() function. - /// @see media_streamer_node_create() - /// @see media_streamer_src_create() - /// @see media_streamer_sink_create() - /// @see media_streamer_node_get_params() - /// @see media_streamer_node_set_param() - int media_streamer_node_get_param( - media_streamer_node_h node, - ffi.Pointer param_name, - ffi.Pointer> param_value, - ) { - return _media_streamer_node_get_param( - node, - param_name, - param_value, - ); - } - - late final _media_streamer_node_get_paramPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(media_streamer_node_h, ffi.Pointer, - ffi.Pointer>)>>( - 'media_streamer_node_get_param'); - late final _media_streamer_node_get_param = - _media_streamer_node_get_paramPtr.asFunction< - int Function(media_streamer_node_h, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Creates a source handle. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @remarks You must release @a source by using @ref mv_destroy_source(). - /// @param [out] source A new handle to the source - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_destroy_source() - int mv_create_source( - ffi.Pointer source, - ) { - return _mv_create_source( - source, - ); - } - - late final _mv_create_sourcePtr = - _lookup)>>( - 'mv_create_source'); - late final _mv_create_source = - _mv_create_sourcePtr.asFunction)>(); - - /// @brief Destroys the source handle and releases all its resources. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in] source The handle to the source to be destroyed - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_create_source() - int mv_destroy_source( - mv_source_h source, - ) { - return _mv_destroy_source( - source, - ); - } - - late final _mv_destroy_sourcePtr = - _lookup>( - 'mv_destroy_source'); - late final _mv_destroy_source = - _mv_destroy_sourcePtr.asFunction(); - - /// @brief Fills the media source based on the media packet. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in,out] source The handle to the source - /// @param [in] media_packet The handle to the media packet from which - /// will be filled the source - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Not supported format - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create a source handle by calling @ref mv_create_source() - /// - /// @see mv_create_source() - /// @see mv_destroy_source() - int mv_source_fill_by_media_packet( - mv_source_h source, - media_packet_h media_packet, - ) { - return _mv_source_fill_by_media_packet( - source, - media_packet, - ); - } - - late final _mv_source_fill_by_media_packetPtr = _lookup< - ffi.NativeFunction>( - 'mv_source_fill_by_media_packet'); - late final _mv_source_fill_by_media_packet = - _mv_source_fill_by_media_packetPtr - .asFunction(); - - /// @brief Fills the media source based on the buffer and metadata. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in,out] source The handle to the source - /// @param [in] data_buffer The buffer of image data - /// @param [in] buffer_size The buffer size - /// @param [in] image_width The width of image data - /// @param [in] image_height The height of image data - /// @param [in] image_colorspace The image colorspace - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create a source handle by calling @ref mv_create_source() - /// - /// @see mv_source_clear() - int mv_source_fill_by_buffer( - mv_source_h source, - ffi.Pointer data_buffer, - int buffer_size, - int image_width, - int image_height, - int image_colorspace, - ) { - return _mv_source_fill_by_buffer( - source, - data_buffer, - buffer_size, - image_width, - image_height, - image_colorspace, - ); - } - - late final _mv_source_fill_by_bufferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_source_h, - ffi.Pointer, - ffi.UnsignedInt, - ffi.UnsignedInt, - ffi.UnsignedInt, - ffi.Int32)>>('mv_source_fill_by_buffer'); - late final _mv_source_fill_by_buffer = - _mv_source_fill_by_bufferPtr.asFunction< - int Function(mv_source_h, ffi.Pointer, int, int, - int, int)>(); - - /// @brief Clears the buffer of the media source. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in,out] source The handle to the source - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_source_fill_by_buffer() - int mv_source_clear( - mv_source_h source, - ) { - return _mv_source_clear( - source, - ); - } - - late final _mv_source_clearPtr = - _lookup>( - 'mv_source_clear'); - late final _mv_source_clear = - _mv_source_clearPtr.asFunction(); - - /// @brief Gets buffer of the media source. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @remarks Note that the retrieved buffer will be destroyed when - /// @ref mv_destroy_source() or @ref mv_source_clear() function - /// is called for the @a source. - /// - /// @param [in] source The handle to the source - /// @param [out] data_buffer The buffer of the source - /// @param [out] buffer_size The size of buffer - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_source_get_width() - /// @see mv_source_get_height() - /// @see mv_source_get_colorspace() - int mv_source_get_buffer( - mv_source_h source, - ffi.Pointer> data_buffer, - ffi.Pointer buffer_size, - ) { - return _mv_source_get_buffer( - source, - data_buffer, - buffer_size, - ); - } - - late final _mv_source_get_bufferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_source_h, - ffi.Pointer>, - ffi.Pointer)>>('mv_source_get_buffer'); - late final _mv_source_get_buffer = _mv_source_get_bufferPtr.asFunction< - int Function(mv_source_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Gets height of the media source. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in] source The handle to the source - /// @param [out] image_height The height of an image in the source - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_source_get_width() - /// @see mv_source_get_colorspace() - /// @see mv_source_get_buffer() - int mv_source_get_height( - mv_source_h source, - ffi.Pointer image_height, - ) { - return _mv_source_get_height( - source, - image_height, - ); - } - - late final _mv_source_get_heightPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_source_h, - ffi.Pointer)>>('mv_source_get_height'); - late final _mv_source_get_height = _mv_source_get_heightPtr - .asFunction)>(); - - /// @brief Gets width of the media source. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in] source The handle to the source - /// @param [out] image_width The width of an image in the source - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_source_get_height() - /// @see mv_source_get_colorspace() - /// @see mv_source_get_buffer() - int mv_source_get_width( - mv_source_h source, - ffi.Pointer image_width, - ) { - return _mv_source_get_width( - source, - image_width, - ); - } - - late final _mv_source_get_widthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_source_h, - ffi.Pointer)>>('mv_source_get_width'); - late final _mv_source_get_width = _mv_source_get_widthPtr - .asFunction)>(); - - /// @brief Gets colorspace of the media source. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in] source The handle to the source - /// @param [out] image_colorspace The colorspace of an image in the source - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_source_get_width() - /// @see mv_source_get_height() - /// @see mv_source_get_buffer() - int mv_source_get_colorspace( - mv_source_h source, - ffi.Pointer image_colorspace, - ) { - return _mv_source_get_colorspace( - source, - image_colorspace, - ); - } - - late final _mv_source_get_colorspacePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_source_h, - ffi.Pointer)>>('mv_source_get_colorspace'); - late final _mv_source_get_colorspace = _mv_source_get_colorspacePtr - .asFunction)>(); - - /// @brief Creates the handle to the configuration of engine. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @remarks Available engine configuration attributes can be get by using - /// @ref mv_engine_config_foreach_supported_attribute(). - /// The attributes can be changed by @ref mv_engine_config_h - /// related setters. Default values are used if the attributes - /// are not changed. - /// @param [out] engine_cfg The handle to the engine to be created - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_engine_config_h - /// @see mv_destroy_engine_config() - /// @see mv_engine_config_set_double_attribute() - /// @see mv_engine_config_set_int_attribute() - /// @see mv_engine_config_set_bool_attribute() - /// @see mv_engine_config_set_string_attribute() - /// @see mv_engine_config_get_double_attribute() - /// @see mv_engine_config_get_int_attribute() - /// @see mv_engine_config_get_bool_attribute() - /// @see mv_engine_config_get_string_attribute() - int mv_create_engine_config( - ffi.Pointer engine_cfg, - ) { - return _mv_create_engine_config( - engine_cfg, - ); - } - - late final _mv_create_engine_configPtr = _lookup< - ffi - .NativeFunction)>>( - 'mv_create_engine_config'); - late final _mv_create_engine_config = _mv_create_engine_configPtr - .asFunction)>(); - - /// @brief Destroys the engine configuration handle and releases all its - /// resources. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in] engine_cfg The handle to the engine configuration - /// to be destroyed - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_engine_config_h - /// @see mv_create_engine_config() - int mv_destroy_engine_config( - mv_engine_config_h engine_cfg, - ) { - return _mv_destroy_engine_config( - engine_cfg, - ); - } - - late final _mv_destroy_engine_configPtr = - _lookup>( - 'mv_destroy_engine_config'); - late final _mv_destroy_engine_config = _mv_destroy_engine_configPtr - .asFunction(); - - /// @brief Sets the double attribute to the configuration. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in] engine_cfg Engine configuration for which @a value has - /// to be set - /// @param [in] name String key of the attribute will be used for - /// storing the @a value into configuration - /// dictionary - /// @param [in] value The double value of the attribute - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE Attribute key isn't available - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_engine_config_get_double_attribute() - /// @see mv_engine_config_set_int_attribute() - /// @see mv_engine_config_set_bool_attribute() - /// @see mv_engine_config_set_string_attribute() - int mv_engine_config_set_double_attribute( - mv_engine_config_h engine_cfg, - ffi.Pointer name, - double value, - ) { - return _mv_engine_config_set_double_attribute( - engine_cfg, - name, - value, - ); - } - - late final _mv_engine_config_set_double_attributePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_engine_config_h, ffi.Pointer, - ffi.Double)>>('mv_engine_config_set_double_attribute'); - late final _mv_engine_config_set_double_attribute = - _mv_engine_config_set_double_attributePtr.asFunction< - int Function(mv_engine_config_h, ffi.Pointer, double)>(); - - /// @brief Sets the integer attribute to the configuration. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in] engine_cfg Engine configuration for which @a value has - /// to be set - /// @param [in] name String key of the attribute will be used for - /// storing the @a value into configuration - /// dictionary - /// @param [in] value The integer value of the attribute - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE Attribute key isn't available - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_engine_config_get_int_attribute() - /// @see mv_engine_config_set_double_attribute() - /// @see mv_engine_config_set_bool_attribute() - /// @see mv_engine_config_set_string_attribute() - /// @see mv_barcode_detect_attr_target_e - /// @see mv_barcode_generate_attr_text_e - int mv_engine_config_set_int_attribute( - mv_engine_config_h engine_cfg, - ffi.Pointer name, - int value, - ) { - return _mv_engine_config_set_int_attribute( - engine_cfg, - name, - value, - ); - } - - late final _mv_engine_config_set_int_attributePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_engine_config_h, ffi.Pointer, - ffi.Int)>>('mv_engine_config_set_int_attribute'); - late final _mv_engine_config_set_int_attribute = - _mv_engine_config_set_int_attributePtr.asFunction< - int Function(mv_engine_config_h, ffi.Pointer, int)>(); - - /// @brief Sets the boolean attribute to the configuration. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in] engine_cfg Engine configuration for which @a value has - /// to be set - /// @param [in] name String key of the attribute will be used for - /// storing the @a value into configuration - /// dictionary - /// @param [in] value The boolean value of the attribute - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE Attribute key isn't available - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_engine_config_get_bool_attribute() - /// @see mv_engine_config_set_double_attribute() - /// @see mv_engine_config_set_int_attribute() - /// @see mv_engine_config_set_string_attribute() - int mv_engine_config_set_bool_attribute( - mv_engine_config_h engine_cfg, - ffi.Pointer name, - bool value, - ) { - return _mv_engine_config_set_bool_attribute( - engine_cfg, - name, - value, - ); - } - - late final _mv_engine_config_set_bool_attributePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_engine_config_h, ffi.Pointer, - ffi.Bool)>>('mv_engine_config_set_bool_attribute'); - late final _mv_engine_config_set_bool_attribute = - _mv_engine_config_set_bool_attributePtr.asFunction< - int Function(mv_engine_config_h, ffi.Pointer, bool)>(); - - /// @brief Sets the string attribute to the configuration. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in] engine_cfg Engine configuration for which @a value has - /// to be set - /// @param [in] name String key of the attribute will be used for - /// storing the @a value into configuration - /// dictionary - /// @param [in] value The string value of the attribute - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE Attribute key isn't available - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_engine_config_get_string_attribute() - /// @see mv_engine_config_set_double_attribute() - /// @see mv_engine_config_set_int_attribute() - /// @see mv_engine_config_set_bool_attribute() - int mv_engine_config_set_string_attribute( - mv_engine_config_h engine_cfg, - ffi.Pointer name, - ffi.Pointer value, - ) { - return _mv_engine_config_set_string_attribute( - engine_cfg, - name, - value, - ); - } - - late final _mv_engine_config_set_string_attributePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_engine_config_h, ffi.Pointer, - ffi.Pointer)>>('mv_engine_config_set_string_attribute'); - late final _mv_engine_config_set_string_attribute = - _mv_engine_config_set_string_attributePtr.asFunction< - int Function(mv_engine_config_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the double attribute from the configuration dictionary. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in] engine_cfg Engine configuration from which @a value - /// has to be gotten - /// @param [in] name String key of the attribute will be used for - /// getting the @a value from the - /// configuration dictionary - /// @param [out] value The attribute to be filled with double value - /// from dictionary - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE Attribute key isn't available - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_engine_config_set_double_attribute() - /// @see mv_engine_config_get_int_attribute() - /// @see mv_engine_config_get_bool_attribute() - /// @see mv_engine_config_get_string_attribute() - int mv_engine_config_get_double_attribute( - mv_engine_config_h engine_cfg, - ffi.Pointer name, - ffi.Pointer value, - ) { - return _mv_engine_config_get_double_attribute( - engine_cfg, - name, - value, - ); - } - - late final _mv_engine_config_get_double_attributePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_engine_config_h, ffi.Pointer, - ffi.Pointer)>>( - 'mv_engine_config_get_double_attribute'); - late final _mv_engine_config_get_double_attribute = - _mv_engine_config_get_double_attributePtr.asFunction< - int Function(mv_engine_config_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the integer attribute from the configuration dictionary. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in] engine_cfg Engine configuration from which @a value - /// has to be gotten - /// @param [in] name String key of the attribute will be used for - /// getting the @a value from the - /// configuration dictionary - /// @param [out] value The attribute to be filled with integer value - /// from dictionary - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE Attribute key isn't available - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_engine_config_set_int_attribute() - /// @see mv_engine_config_get_double_attribute() - /// @see mv_engine_config_get_bool_attribute() - /// @see mv_engine_config_get_string_attribute() - /// @see mv_barcode_detect_attr_target_e - /// @see mv_barcode_generate_attr_text_e - int mv_engine_config_get_int_attribute( - mv_engine_config_h engine_cfg, - ffi.Pointer name, - ffi.Pointer value, - ) { - return _mv_engine_config_get_int_attribute( - engine_cfg, - name, - value, - ); - } - - late final _mv_engine_config_get_int_attributePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_engine_config_h, ffi.Pointer, - ffi.Pointer)>>('mv_engine_config_get_int_attribute'); - late final _mv_engine_config_get_int_attribute = - _mv_engine_config_get_int_attributePtr.asFunction< - int Function(mv_engine_config_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the boolean attribute from the configuration dictionary. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in] engine_cfg Engine configuration from which @a value - /// has to be gotten - /// @param [in] name String key of the attribute will be used for - /// getting the @a value from the - /// configuration dictionary - /// @param [out] value The attribute to be filled with boolean value - /// from dictionary - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE Attribute key isn't available - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_engine_config_set_bool_attribute() - /// @see mv_engine_config_get_double_attribute() - /// @see mv_engine_config_get_int_attribute() - /// @see mv_engine_config_get_string_attribute() - int mv_engine_config_get_bool_attribute( - mv_engine_config_h engine_cfg, - ffi.Pointer name, - ffi.Pointer value, - ) { - return _mv_engine_config_get_bool_attribute( - engine_cfg, - name, - value, - ); - } - - late final _mv_engine_config_get_bool_attributePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_engine_config_h, ffi.Pointer, - ffi.Pointer)>>('mv_engine_config_get_bool_attribute'); - late final _mv_engine_config_get_bool_attribute = - _mv_engine_config_get_bool_attributePtr.asFunction< - int Function(mv_engine_config_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the string attribute from the configuration dictionary. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @remarks Function allocates memory required for output @a value, so - /// it has to be removed by the user himself. - /// @param [in] engine_cfg Engine configuration from which @a value - /// has to be gotten - /// @param [in] name String key of the attribute will be used for - /// getting the @a value from the - /// configuration dictionary - /// @param [out] value The attribute to be filled with string value - /// from dictionary - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE Attribute key isn't available - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_engine_config_set_string_attribute() - /// @see mv_engine_config_get_double_attribute() - /// @see mv_engine_config_get_int_attribute() - /// @see mv_engine_config_get_bool_attribute() - int mv_engine_config_get_string_attribute( - mv_engine_config_h engine_cfg, - ffi.Pointer name, - ffi.Pointer> value, - ) { - return _mv_engine_config_get_string_attribute( - engine_cfg, - name, - value, - ); - } - - late final _mv_engine_config_get_string_attributePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_engine_config_h, ffi.Pointer, - ffi.Pointer>)>>( - 'mv_engine_config_get_string_attribute'); - late final _mv_engine_config_get_string_attribute = - _mv_engine_config_get_string_attributePtr.asFunction< - int Function(mv_engine_config_h, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Traverses the list of supported attribute names and types. - /// @details Using this function names of supported attributes can be obtained. - /// Names of the attributes can be used with @ref mv_engine_config_h - /// related getters and setters to get/set appropriate attribute values. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @remarks If @a callback is called zero times after - /// @ref mv_engine_config_foreach_supported_attribute() call, then - /// engine configuration is not supported and setting of attributes will - /// cause no effect. In this case for all Media Vision functions which - /// require @ref mv_engine_config_h handle as in parameter this - /// parameter can be set NULL. - /// @remarks If @a callback is called at least once, then attribute names and - /// types obtained in the @ref mv_supported_attribute_cb callback can be - /// changed after mv_engine_config_h handle creation (with - /// @ref mv_create_engine_config() function) by corresponding setters. - /// Although, if attributes aren't changed by setters, then default - /// values will be used.\n - /// Changing of attribute values will affect internal functionality - /// provided by concrete library underlying Media Vision API. - /// @param [in] callback The iteration callback function - /// @param [in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_NO_DATA Can't determine list of supported attributes - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_engine_config_set_double_attribute() - /// @see mv_engine_config_set_int_attribute() - /// @see mv_engine_config_set_bool_attribute() - /// @see mv_engine_config_set_string_attribute() - /// @see mv_engine_config_get_double_attribute() - /// @see mv_engine_config_get_int_attribute() - /// @see mv_engine_config_get_bool_attribute() - /// @see mv_engine_config_get_string_attribute() - int mv_engine_config_foreach_supported_attribute( - mv_supported_attribute_cb callback, - ffi.Pointer user_data, - ) { - return _mv_engine_config_foreach_supported_attribute( - callback, - user_data, - ); - } - - late final _mv_engine_config_foreach_supported_attributePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_supported_attribute_cb, ffi.Pointer)>>( - 'mv_engine_config_foreach_supported_attribute'); - late final _mv_engine_config_foreach_supported_attribute = - _mv_engine_config_foreach_supported_attributePtr.asFunction< - int Function(mv_supported_attribute_cb, ffi.Pointer)>(); - - /// @brief Detects barcode(s) on source and reads message from it. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @param [in] source The media source handle - /// @param [in] engine_cfg The handle to the configuration of the engine - /// @param [in] roi Region of interest - rectangular area on the - /// @a source which will be used for barcode detection - /// Note that @a roi should be inside area on the - /// @a source. - /// @param [in] detect_cb The callback for result handling - /// @param [in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Not supported format - /// @retval #MEDIA_VISION_ERROR_INTERNAL Internal error - /// - /// @pre Create a source handle by calling @ref mv_create_source() - /// @pre Create an engine configuration handle by calling - /// @ref mv_create_engine_config(), otherwise use NULL - /// - /// @see mv_barcode_detected_cb() - int mv_barcode_detect( - mv_source_h source, - mv_engine_config_h engine_cfg, - mv_rectangle_s roi, - mv_barcode_detected_cb detect_cb, - ffi.Pointer user_data, - ) { - return _mv_barcode_detect( - source, - engine_cfg, - roi, - detect_cb, - user_data, - ); - } - - late final _mv_barcode_detectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_source_h, - mv_engine_config_h, - mv_rectangle_s, - mv_barcode_detected_cb, - ffi.Pointer)>>('mv_barcode_detect'); - late final _mv_barcode_detect = _mv_barcode_detectPtr.asFunction< - int Function(mv_source_h, mv_engine_config_h, mv_rectangle_s, - mv_barcode_detected_cb, ffi.Pointer)>(); - - /// @brief Generates @ref mv_source_h with barcode image. - /// @details Pay attention that for EAN-8 and EAN-13 barcode types the barcode - /// type may be selected automatically and this selection depends on the input - /// message length. Also for QR codes the version may be selected as minimum - /// required to generate QR code with the input message length. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @remarks If the text attribute of engine configuration is set to - /// MV_BARCODE_GENERATE_ATTR_TEXT_VISIBLE, - /// MEDIA_VISION_ERROR_INVALID_OPERATION will be return - /// when @a type is MV_BARCODE_QR - /// - /// @param [in] engine_cfg The handle to the configuration of the engine - /// @param [in] message The message to be encoded in the barcode - /// @param [in] type Type of the barcode to be generated - /// @param [in] qr_enc_mode Encoding mode for the message (only for QR codes; - /// for 1D barcodes set this parameter to - /// @a MV_BARCODE_QR_MODE_UNAVAILABLE) - /// @param [in] qr_ecc Error correction level (only for QR codes; for - /// 1D barcodes set this parameter to - /// @a MV_BARCODE_QR_ECC_UNAVAILABLE) - /// @param [in] qr_version QR code version (for 1D barcodes set this - /// parameter to 0) - /// @param [in, out] image The media source handle which will be used to - /// fill by the buffer with generated image - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_MSG_TOO_LONG Too long or short message - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// @retval #MEDIA_VISION_ERROR_INVALID_DATA Invalid data - /// @retval #MEDIA_VISION_ERROR_INTERNAL Internal error - /// @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre Create an engine configuration handle by calling - /// @ref mv_create_engine_config(), otherwise use NULL - /// - /// @see mv_barcode_generate_image() - int mv_barcode_generate_source( - mv_engine_config_h engine_cfg, - ffi.Pointer message, - int type, - int qr_enc_mode, - int qr_ecc, - int qr_version, - mv_source_h image, - ) { - return _mv_barcode_generate_source( - engine_cfg, - message, - type, - qr_enc_mode, - qr_ecc, - qr_version, - image, - ); - } - - late final _mv_barcode_generate_sourcePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_engine_config_h, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Int32, - ffi.Int, - mv_source_h)>>('mv_barcode_generate_source'); - late final _mv_barcode_generate_source = - _mv_barcode_generate_sourcePtr.asFunction< - int Function(mv_engine_config_h, ffi.Pointer, int, int, int, - int, mv_source_h)>(); - - /// @brief Generates image file with barcode. - /// @details Pay attention that for EAN-8 and EAN-13 barcode types the barcode - /// type may be selected automatically and this selection depends on the input - /// message length. Also for QR codes the version may be selected as minimum - /// required to generate QR code with the input message length. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @remarks If the text attribute of engine configuration is set to - /// MV_BARCODE_GENERATE_ATTR_TEXT_VISIBLE, - /// MEDIA_VISION_ERROR_INVALID_OPERATION will be return - /// when @a type is MV_BARCODE_QR - /// - /// @remarks The mediastorage privilege http://tizen.org/privilege/mediastorage is needed \n - /// if @a image_path is relevant to media storage.\n - /// The externalstorage privilege http://tizen.org/privilege/externalstorage is needed \n - /// if @a image_path is relevant to external storage. - /// @param [in] engine_cfg The handle to the configuration of the engine - /// @param [in] message The message to be encoded in the barcode - /// @param [in] image_width The width of the generated image - /// @param [in] image_height The height of the generated image - /// @param [in] type Type of the barcode to be generated - /// @param [in] qr_enc_mode Encoding mode for the message (only for QR codes; - /// for 1D barcodes set this parameter to - /// @a MV_BARCODE_QR_MODE_UNAVAILABLE) - /// @param [in] qr_ecc Error correction level (only for QR codes; for - /// 1D barcodes set this parameter to - /// @a MV_BARCODE_QR_ECC_UNAVAILABLE) - /// @param [in] qr_version QR code version (for 1D barcodes set this - /// parameter to 0) - /// @param [in] image_path The path to the file that has to be generated - /// @param [in] image_format The format of the output image - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_MSG_TOO_LONG Too long or short message - /// @retval #MEDIA_VISION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// @retval #MEDIA_VISION_ERROR_INVALID_DATA Invalid data - /// @retval #MEDIA_VISION_ERROR_INVALID_PATH Invalid path - /// @retval #MEDIA_VISION_ERROR_INTERNAL Internal error - /// @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre Create an engine configuration handle by calling - /// @ref mv_create_engine_config(), otherwise use NULL - /// - /// @see mv_barcode_generate_source() - int mv_barcode_generate_image( - mv_engine_config_h engine_cfg, - ffi.Pointer message, - int image_width, - int image_height, - int type, - int qr_enc_mode, - int qr_ecc, - int qr_version, - ffi.Pointer image_path, - int image_format, - ) { - return _mv_barcode_generate_image( - engine_cfg, - message, - image_width, - image_height, - type, - qr_enc_mode, - qr_ecc, - qr_version, - image_path, - image_format, - ); - } - - late final _mv_barcode_generate_imagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_engine_config_h, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Int32, - ffi.Int32, - ffi.Int32, - ffi.Int, - ffi.Pointer, - ffi.Int32)>>('mv_barcode_generate_image'); - late final _mv_barcode_generate_image = - _mv_barcode_generate_imagePtr.asFunction< - int Function(mv_engine_config_h, ffi.Pointer, int, int, int, - int, int, int, ffi.Pointer, int)>(); - - /// @brief Performs face detection on the @a source for the @a engine_conf. - /// @details Use this function to launch face detection algorithm configured by - /// @a engine_conf configuration. Each time when mv_face_detect is - /// called, @a detected_cb will receive a set of the detected - /// faces at the media source. - /// - /// @since_tizen 3.0 - /// @param [in] source The handle to the source of the media where faces - /// will be detected - /// @param [in] engine_cfg The handle to the configuration of engine will be - /// used for detecting. If NULL, then default settings - /// will be used. - /// @param [in] detected_cb The callback which will be called for all face - /// locations detected on media source. This callback - /// will receive detecting results - /// @param [in] user_data The user data passed from the code where - /// @ref mv_face_detect() is invoked. This data will - /// be accessible from @a detected_cb callback. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Source colorspace - /// isn't supported - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create a source handle by calling @ref mv_create_source() - /// @post @a detected_cb will be called to process detection results - /// - /// @see mv_face_detected_cb - int mv_face_detect( - mv_source_h source, - mv_engine_config_h engine_cfg, - mv_face_detected_cb detected_cb, - ffi.Pointer user_data, - ) { - return _mv_face_detect( - source, - engine_cfg, - detected_cb, - user_data, - ); - } - - late final _mv_face_detectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_source_h, mv_engine_config_h, mv_face_detected_cb, - ffi.Pointer)>>('mv_face_detect'); - late final _mv_face_detect = _mv_face_detectPtr.asFunction< - int Function(mv_source_h, mv_engine_config_h, mv_face_detected_cb, - ffi.Pointer)>(); - - /// @brief Performs face recognition on the @a source image. - /// @details Use this function to launch face recognition algorithm configured by - /// @a engine_conf configuration using @a recognition_model recognition - /// model. Each time when @ref mv_face_recognize() is called, - /// @a recognized_cb will receive recognition results:\n - /// - Location in the @a source of the face has been recognized; - /// - Label of the face has been recognized; - /// - Confidence of the @a recognition_model that face has been - /// recognized correctly (value from 0.0 to 1.0). - /// - /// @since_tizen 3.0 - /// @remarks Using of untrained or weakly trained recognition models will cause - /// not accurate results even if resulting confidence will be high. - /// Use @ref mv_face_recognition_model_learn() function before - /// @ref mv_face_recognize() call. Best results can be achieved when big - /// set of face image examples were added by - /// @ref mv_face_recognition_model_add() before - /// @ref mv_face_recognition_model_learn() call. - /// @param [in] source The handle to the source of the media to - /// recognize face(s) for - /// @param [in] recognition_model The handle to the model will be used for - /// recognition - /// @param [in] engine_cfg The handle to the configuration of engine - /// will be used for recognition. If NULL, then - /// default settings will be used - /// @param [in] face_location Rectangular box bounding face image on the - /// @a source. If NULL, then full source will be - /// analyzed - /// @param [in] recognized_cb The callback which will be called for the - /// face recognition results on the @a source. - /// @param [in] user_data The user data passed from the code where - /// @ref mv_face_recognize() is invoked. This - /// data will be accessible from @a recognized_cb - /// callback - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Source colorspace - /// isn't supported - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create a source handle by calling @ref mv_create_source() - /// @pre Create a face recognition model handle by calling - /// @ref mv_face_recognition_model_create() - /// @post @a recognized_cb will be called to process recognition results - /// - /// @see mv_face_recognized_cb - int mv_face_recognize( - mv_source_h source, - mv_face_recognition_model_h recognition_model, - mv_engine_config_h engine_cfg, - ffi.Pointer face_location, - mv_face_recognized_cb recognized_cb, - ffi.Pointer user_data, - ) { - return _mv_face_recognize( - source, - recognition_model, - engine_cfg, - face_location, - recognized_cb, - user_data, - ); - } - - late final _mv_face_recognizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_source_h, - mv_face_recognition_model_h, - mv_engine_config_h, - ffi.Pointer, - mv_face_recognized_cb, - ffi.Pointer)>>('mv_face_recognize'); - late final _mv_face_recognize = _mv_face_recognizePtr.asFunction< - int Function( - mv_source_h, - mv_face_recognition_model_h, - mv_engine_config_h, - ffi.Pointer, - mv_face_recognized_cb, - ffi.Pointer)>(); - - /// @brief Performs face tracking on the @a source for the @a tracking_model. - /// @details Use this function to launch face tracking algorithm configured by - /// @a engine_conf configuration using @a tracking_model tracking - /// model. Each time when this function is called, @a tracked_cb - /// will receive updated @a tracking_model, new location determined for - /// the tracked face and model confidence that location is determined - /// correctly. - /// - /// @since_tizen 3.0 - /// @remarks To allow correct tracking @a tracking_model has to be already used - /// in previous tracking process(es) or prepared with - /// @ref mv_face_tracking_model_prepare(). Preparation requires - /// specifying the face location for the @a source on which tracking was - /// started. I.e. @ref mv_face_tracking_model_prepare() function has to - /// be called at least once before this method call. - /// @param [in] source The handle to the source of the media to - /// recognize face for - /// @param [in] tracking_model The handle to the model will be used for - /// tracking - /// @param [in] engine_cfg The handle to the configuration of engine will - /// be used for tracking. If NULL, the default - /// configuration will be used. - /// @param [in] tracked_cb The callback which will be called for tracking - /// event on the @a source where face would be - /// tracked. This callback will receive tracking - /// results - /// @param [in] do_learn The model learning flag. If it is set @c true - /// then model will try to learn (if it supports - /// learning feature), otherwise model will be not - /// learned during the invoking tracking iteration. - /// Learning process improves tracking correctness, - /// but can decrease tracking performance - /// @param [in] user_data The user data passed from the code where - /// @ref mv_face_track() is invoked. This data will - /// be accessible from @a tracked_cb callback - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Source colorspace - /// isn't supported - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create a source handle by calling @ref mv_create_source() - /// @pre Create a face tracking model handle by calling - /// @ref mv_face_tracking_model_create() - /// @post @a tracked_cb will be called to process tracking results - /// - /// @see mv_face_tracked_cb - int mv_face_track( - mv_source_h source, - mv_face_tracking_model_h tracking_model, - mv_engine_config_h engine_cfg, - mv_face_tracked_cb tracked_cb, - bool do_learn, - ffi.Pointer user_data, - ) { - return _mv_face_track( - source, - tracking_model, - engine_cfg, - tracked_cb, - do_learn, - user_data, - ); - } - - late final _mv_face_trackPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_source_h, - mv_face_tracking_model_h, - mv_engine_config_h, - mv_face_tracked_cb, - ffi.Bool, - ffi.Pointer)>>('mv_face_track'); - late final _mv_face_track = _mv_face_trackPtr.asFunction< - int Function(mv_source_h, mv_face_tracking_model_h, mv_engine_config_h, - mv_face_tracked_cb, bool, ffi.Pointer)>(); - - /// @brief Determines eye-blink condition for @a face_location on media @a source. - /// @details Use this function to recognize eye-blink condition for the face - /// bounded by @a face_location at @a source. - /// - /// @since_tizen 3.0 - /// @param [in] source The handle to the source of the media to - /// recognize eye-blink condition for - /// @param [in] engine_cfg The handle to the configuration of engine - /// will be used for eye-blink condition - /// recognition. If NULL, the default configuration - /// will be used. - /// @param [in] face_location The location bounding the face at the @a source - /// @param [in] eye_condition_recognized_cb The callback for processing result - /// of eye-blink condition recognition - /// @param [in] user_data The user data passed from the code where - /// mv_face_eye_condition_recognize() is invoked. - /// This data will be accessible from - /// @a eye_condition_recognized_cb callback. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Source colorspace - /// isn't supported - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create a source handle by calling mv_create_source() - /// - /// @see mv_face_eye_condition_recognized_cb - int mv_face_eye_condition_recognize( - mv_source_h source, - mv_engine_config_h engine_cfg, - mv_rectangle_s face_location, - mv_face_eye_condition_recognized_cb eye_condition_recognized_cb, - ffi.Pointer user_data, - ) { - return _mv_face_eye_condition_recognize( - source, - engine_cfg, - face_location, - eye_condition_recognized_cb, - user_data, - ); - } - - late final _mv_face_eye_condition_recognizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_source_h, - mv_engine_config_h, - mv_rectangle_s, - mv_face_eye_condition_recognized_cb, - ffi.Pointer)>>('mv_face_eye_condition_recognize'); - late final _mv_face_eye_condition_recognize = - _mv_face_eye_condition_recognizePtr.asFunction< - int Function(mv_source_h, mv_engine_config_h, mv_rectangle_s, - mv_face_eye_condition_recognized_cb, ffi.Pointer)>(); - - /// @brief Determines facial expression for @a face_location on media @a source. - /// @details Use this function to determine facial expression for the face - /// bounded by @a face_location at @a source. - /// - /// @since_tizen 3.0 - /// @param [in] source The handle to the source of the media - /// to recognize facial expression for - /// @param [in] engine_cfg The handle to the configuration of - /// engine will be used for expression recognition - /// @param [in] face_location The location bounding the face at the @a source - /// @param [in] expression_recognized_cb The callback for processing result - /// of facial expression determining - /// @param [in] user_data The user data passed from the code where - /// mv_face_facial_expression_recognize() is invoked. - /// This data will be accessible from - /// @a expression_recognized_cb callback. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Source colorspace - /// isn't supported - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create a source handle by calling mv_create_source() - /// @pre Create a face engine configuration handle by calling @ref mv_create_engine_config() - /// - /// @see mv_face_facial_expression_recognized_cb - int mv_face_facial_expression_recognize( - mv_source_h source, - mv_engine_config_h engine_cfg, - mv_rectangle_s face_location, - mv_face_facial_expression_recognized_cb expression_recognized_cb, - ffi.Pointer user_data, - ) { - return _mv_face_facial_expression_recognize( - source, - engine_cfg, - face_location, - expression_recognized_cb, - user_data, - ); - } - - late final _mv_face_facial_expression_recognizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_source_h, - mv_engine_config_h, - mv_rectangle_s, - mv_face_facial_expression_recognized_cb, - ffi.Pointer)>>('mv_face_facial_expression_recognize'); - late final _mv_face_facial_expression_recognize = - _mv_face_facial_expression_recognizePtr.asFunction< - int Function( - mv_source_h, - mv_engine_config_h, - mv_rectangle_s, - mv_face_facial_expression_recognized_cb, - ffi.Pointer)>(); - - /// @brief Creates a face recognition model handle. - /// @details Use this function to create default face recognition model. Creating - /// process is defined by concrete face engine library. After creation - /// recognition model has to be learned with - /// @ref mv_face_recognition_model_learn() function to provide - /// appropriate results of face recognition functionality. Or learned - /// earlier model can be loaded by @ref mv_face_recognition_model_load() - /// function. - /// - /// @since_tizen 3.0 - /// @remarks It can cause incompatibility issues when saved models (see - /// @ref mv_face_recognition_model_save(), - /// @ref mv_face_recognition_model_load() - /// functions documentation) are used in applications for different - /// platforms which use different computer vision libraries underlying - /// this API. - /// @remarks You must release @a recognition_model by using - /// @ref mv_face_recognition_model_destroy() function. - /// @param [out] recognition_model The handle to the recognition model to be - /// created - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @post Model can be loaded from the file after creation. Use - /// @ref mv_face_recognition_model_load() function to load it from file - /// @post Release @a recognition_model by using - /// @ref mv_face_recognition_model_destroy() function when it is not needed - /// anymore - /// - /// @see mv_face_recognition_model_destroy() - int mv_face_recognition_model_create( - ffi.Pointer recognition_model, - ) { - return _mv_face_recognition_model_create( - recognition_model, - ); - } - - late final _mv_face_recognition_model_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'mv_face_recognition_model_create'); - late final _mv_face_recognition_model_create = - _mv_face_recognition_model_createPtr - .asFunction)>(); - - /// @brief Destroys the face recognition model handle and releases all its - /// resources. - /// - /// @since_tizen 3.0 - /// @param [in] recognition_model The handle to the face recognition model to - /// be destroyed - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create recognition model by using @ref mv_face_recognition_model_create() - /// - /// @see mv_face_recognition_model_create() - int mv_face_recognition_model_destroy( - mv_face_recognition_model_h recognition_model, - ) { - return _mv_face_recognition_model_destroy( - recognition_model, - ); - } - - late final _mv_face_recognition_model_destroyPtr = _lookup< - ffi.NativeFunction>( - 'mv_face_recognition_model_destroy'); - late final _mv_face_recognition_model_destroy = - _mv_face_recognition_model_destroyPtr - .asFunction(); - - /// @brief Creates a copy of existed recognition model handle and clones all its - /// resources. - /// - /// @since_tizen 3.0 - /// @remarks Cloning perform not only handle copy, but also copies all internal - /// resources of the model. @a dst must be released using - /// @ref mv_face_recognition_model_destroy(). - /// @param [in] src The handle to the recognition model to be copied - /// @param [out] dst The handle to the copy of existed recognition model - /// specified as @a src - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create face recognition handles by calling - /// @ref mv_face_recognition_model_create() - /// - /// @see mv_face_recognition_model_create() - int mv_face_recognition_model_clone( - mv_face_recognition_model_h src, - ffi.Pointer dst, - ) { - return _mv_face_recognition_model_clone( - src, - dst, - ); - } - - late final _mv_face_recognition_model_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_face_recognition_model_h, - ffi.Pointer)>>( - 'mv_face_recognition_model_clone'); - late final _mv_face_recognition_model_clone = - _mv_face_recognition_model_clonePtr.asFunction< - int Function(mv_face_recognition_model_h, - ffi.Pointer)>(); - - /// @brief Saves recognition model to the file. - /// - /// @since_tizen 3.0 - /// @remarks This function doesn't save face image examples (image itself) added by - /// @ref mv_face_recognition_model_add() function. - /// This examples can be removed by - /// @ref mv_face_recognition_model_reset() function if - /// it is needed to clear the memory. - /// @remarks @a recognition_model is saved to the absolute path directory. - /// Use @ref app_get_data_path for the private app storage path. - /// After model is saved to the file, it can be loaded from this file - /// by @ref mv_face_recognition_model_load() function. - /// @param [in] file_name Name of the path/file to save the model - /// @param [in] recognition_model The handle to the recognition model to be - /// saved to the file - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_VISION_ERROR_INVALID_PATH Invalid path - /// @retval #MEDIA_VISION_ERROR_PERMISSION_DENIED Not permitted - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Not supported model format - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create a face recognition handle by calling - /// @ref mv_face_recognition_model_create() function - /// @post Saved model can be loaded later by calling - /// @ref mv_face_recognition_model_load() function - /// - /// @see mv_face_recognition_model_load() - /// @see mv_face_recognition_model_create() - /// @see app_get_data_path() - int mv_face_recognition_model_save( - ffi.Pointer file_name, - mv_face_recognition_model_h recognition_model, - ) { - return _mv_face_recognition_model_save( - file_name, - recognition_model, - ); - } - - late final _mv_face_recognition_model_savePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - mv_face_recognition_model_h)>>('mv_face_recognition_model_save'); - late final _mv_face_recognition_model_save = - _mv_face_recognition_model_savePtr.asFunction< - int Function(ffi.Pointer, mv_face_recognition_model_h)>(); - - /// @brief Loads recognition model from file. - /// - /// @since_tizen 3.0 - /// @remarks This function doesn't modify the set of face image examples added - /// with @ref mv_face_recognition_model_add() function. - /// Model will be loaded from file without loss of collected examples. - /// If you want to free memory from examples, use - /// @ref mv_face_recognition_model_reset() function. It - /// is recommended to clear the memory if learning algorithm doesn't - /// support reinforcement learning. - /// @remarks @a recognition_model is loaded from the absolute path directory. - /// Use @ref app_get_data_path for the private app storage path. - /// @a recognition_model must be destroyed using - /// @ref mv_face_recognition_model_destroy(). - /// @param [in] file_name Name of path/file to load the model - /// @param [out] recognition_model The handle to the recognition model - /// to be loaded from the file - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_INVALID_PATH Invalid path - /// @retval #MEDIA_VISION_ERROR_PERMISSION_DENIED Not permitted - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Not supported model format - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Recognition model can be preliminary saved with - /// @ref mv_face_recognition_model_save() function - /// - /// @see mv_face_recognition_model_save() - /// @see mv_face_recognition_model_destroy() - /// @see app_get_data_path() - int mv_face_recognition_model_load( - ffi.Pointer file_name, - ffi.Pointer recognition_model, - ) { - return _mv_face_recognition_model_load( - file_name, - recognition_model, - ); - } - - late final _mv_face_recognition_model_loadPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>( - 'mv_face_recognition_model_load'); - late final _mv_face_recognition_model_load = - _mv_face_recognition_model_loadPtr.asFunction< - int Function(ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Adds face image example to be used for face recognition model learning - /// with @ref mv_face_recognition_model_learn(). - /// - /// @since_tizen 3.0 - /// @remarks It is possible to destroy @a source after calling this method. - /// Source isn't used for learning directly. - /// @remarks Face image @a example_location location can be determined using - /// @ref mv_face_detect function. - /// @param [in] source The handle to @a source that contains face - /// image - /// @param [in] recognition_model The handle to the recognition model which - /// could be learned based on example - /// @param [in] example_location The pointer to the rectangular location of - /// the face image at the source image. If NULL, - /// then full image will be analyzed as the face - /// image - /// @param [in] face_label The label that identifies face for which - /// example is adding. Specify the same labels - /// for the face images of a single person when - /// calling this method. Has to be unique for - /// each face - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Source colorspace - /// isn't supported - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create a face recognition handle by calling - /// @ref mv_face_recognition_model_create() function - /// @post When appropriate amount of face image examples is added to the - /// @a recognition_model, this model has to be learned by - /// @ref mv_face_recognition_model_learn() function call. Only after - /// learning of the model it can be used for face recognition with - /// @ref mv_face_recognize() function - /// - /// @see mv_face_recognition_model_reset() - /// @see mv_face_recognition_model_learn() - int mv_face_recognition_model_add( - mv_source_h source, - mv_face_recognition_model_h recognition_model, - ffi.Pointer example_location, - int face_label, - ) { - return _mv_face_recognition_model_add( - source, - recognition_model, - example_location, - face_label, - ); - } - - late final _mv_face_recognition_model_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_source_h, - mv_face_recognition_model_h, - ffi.Pointer, - ffi.Int)>>('mv_face_recognition_model_add'); - late final _mv_face_recognition_model_add = - _mv_face_recognition_model_addPtr.asFunction< - int Function(mv_source_h, mv_face_recognition_model_h, - ffi.Pointer, int)>(); - - /// @brief Removes from @a recognition_model all collected with - /// @ref mv_face_recognition_model_add() function - /// face examples labeled with @a face_label. - /// - /// @since_tizen 3.0 - /// @remarks Be aware that if this function is called before - /// @ref mv_face_recognition_model_learn() function call, all or part of - /// the required for learning data will be lost. It means that face - /// image examples determined by the @a face_label label will be removed - /// from the model and not taken into account when - /// @ref mv_face_recognition_model_learn() will be called next time. - /// @remarks Call of this function will free all the memory has been allocated - /// during previous @ref mv_face_recognition_model_add() - /// calls for the corresponding @a face_label label. - /// @param [in] recognition_model The handle to the recognition model for - /// which face image examples will be reset. - /// @param [in] face_label The label that identifies face for which - /// examples will be removed from the - /// @a recognition_model. If NULL, then all - /// known by @a recognition_model face image - /// examples will be removed - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE Key not available - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_face_recognition_model_add() - /// @see mv_face_recognition_model_learn() - int mv_face_recognition_model_reset( - mv_face_recognition_model_h recognition_model, - ffi.Pointer face_label, - ) { - return _mv_face_recognition_model_reset( - recognition_model, - face_label, - ); - } - - late final _mv_face_recognition_model_resetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_face_recognition_model_h, - ffi.Pointer)>>('mv_face_recognition_model_reset'); - late final _mv_face_recognition_model_reset = - _mv_face_recognition_model_resetPtr.asFunction< - int Function(mv_face_recognition_model_h, ffi.Pointer)>(); - - /// @brief Learns face recognition model. - /// @details Before you start learning process, face recognition models has to be - /// filled with training data - face image examples. These examples has - /// to be provided by - /// @ref mv_face_recognition_model_add() function. - /// Usually, recognition accuracy is increased when number of not - /// identical examples is large. But it depends on the used learning - /// algorithm. - /// - /// @since_tizen 3.0 - /// @remarks Common flow is to collect face examples as much as possible, add - /// them to the recognition model with - /// @ref mv_face_recognition_model_add(), then call - /// @ref mv_face_recognition_model_learn() for this recognition model to - /// learn it (or update the model if updating is supported by the used - /// algorithm). - /// @remarks Selection of the learning algorithm can be performed by setting - /// corresponding attributes for the @a engine_cfg. You can check - /// supported by @a engine_cfg attributes using - /// @ref mv_engine_config_foreach_supported_attribute() function call. - /// By default, Local Binary Patterns Histograms (LBPH) based - /// recognition algorithm will be used. - /// @param [in] engine_cfg The handle to the configuration of - /// engine will be used for learning of the - /// recognition models. If NULL, then - /// default settings will be used - /// @param [in,out] recognition_model The model which will be learned. After - /// learning process these model may be - /// changed, so @ref mv_face_recognize() - /// results may differ before and after - /// method call respectively to the face - /// examples collected for the - /// @a recognition_model - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NO_DATA No data - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create a face engine configuration handle by calling - /// @ref mv_create_engine_config() and set supported parameters if - /// needed. Or just set @a engine_cfg as NULL to learn with default settings - /// @pre Create a face recognition model handles by calling - /// @ref mv_face_recognition_model_create() function - /// @pre Add face image examples to the @a recognition_model by calling - /// @ref mv_face_recognition_model_add() function - /// @post If it is not planned to learn the model again, clear memory by - /// @ref mv_face_recognition_model_reset() function - /// @post When model has been learned, it can be used for face recognition with - /// @ref mv_face_recognize() function - /// - /// @see mv_face_recognition_model_add() - /// @see mv_face_recognition_model_reset() - /// @see mv_face_recognize() - int mv_face_recognition_model_learn( - mv_engine_config_h engine_cfg, - mv_face_recognition_model_h recognition_model, - ) { - return _mv_face_recognition_model_learn( - engine_cfg, - recognition_model, - ); - } - - late final _mv_face_recognition_model_learnPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_engine_config_h, - mv_face_recognition_model_h)>>('mv_face_recognition_model_learn'); - late final _mv_face_recognition_model_learn = - _mv_face_recognition_model_learnPtr.asFunction< - int Function(mv_engine_config_h, mv_face_recognition_model_h)>(); - - /// @brief Queries labels list and number of labels had been learned by the model. - /// - /// @since_tizen 3.0 - /// @remarks @a labels array has to be released using free(). - /// @param [in] recognition_model The handle to the recognition model for - /// which set of the learned labels will be - /// queried - /// @param [out] labels The array which will be filled with labels - /// had been learned by the model - /// @param [out] number_of_labels The number of labels in @a labels array - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Add face image examples with labels to the @a recognition_model by - /// calling the @ref mv_face_recognition_model_add() function - /// @pre Learn the @a recognition_model by labeled examples using - /// @ref mv_face_recognition_model_learn() function - /// @post @a labels array has to be freed in the function invoking code - /// - /// @see mv_face_recognition_model_add() - /// @see mv_face_recognition_model_reset() - /// @see mv_face_recognition_model_learn() - int mv_face_recognition_model_query_labels( - mv_face_recognition_model_h recognition_model, - ffi.Pointer> labels, - ffi.Pointer number_of_labels, - ) { - return _mv_face_recognition_model_query_labels( - recognition_model, - labels, - number_of_labels, - ); - } - - late final _mv_face_recognition_model_query_labelsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_face_recognition_model_h, - ffi.Pointer>, - ffi.Pointer)>>( - 'mv_face_recognition_model_query_labels'); - late final _mv_face_recognition_model_query_labels = - _mv_face_recognition_model_query_labelsPtr.asFunction< - int Function( - mv_face_recognition_model_h, - ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Calls this function to create a face tracking model handle. - /// @details Use this function to create default face tracking model handle. - /// After creation this handle has to be initialized with - /// @ref mv_face_tracking_model_prepare() function to provide - /// appropriate results of face tracking functionality. When handle is - /// prepared, it is possible to use it for tracking on continuous - /// sequence of the sources. Call @ref mv_face_tracking_model_prepare() - /// function each time before starting tracking on the new sequence. - /// The exception is situation when the new sequence is continuation - /// of the previous sequence for which model has been tracked. - /// - /// @since_tizen 3.0 - /// @param [out] tracking_model The pointer to the handle to the tracking - /// model that will be created - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @post Model can be loaded from the file after creation. Use - /// @ref mv_face_tracking_model_load() function to load it from file - /// @post Use @ref mv_face_tracking_model_prepare() function before tracking on - /// the new video or continuous images sequence - /// @post Release @a tracking_model by using - /// @ref mv_face_tracking_model_destroy() function when it is not needed - /// anymore - /// - /// @see mv_face_tracking_model_destroy() - /// @see mv_face_tracking_model_prepare() - /// @see mv_face_tracking_model_load() - int mv_face_tracking_model_create( - ffi.Pointer tracking_model, - ) { - return _mv_face_tracking_model_create( - tracking_model, - ); - } - - late final _mv_face_tracking_model_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'mv_face_tracking_model_create'); - late final _mv_face_tracking_model_create = _mv_face_tracking_model_createPtr - .asFunction)>(); - - /// @brief Calls this function to destroy the face tracking model handle and - /// release all its resources. - /// - /// @since_tizen 3.0 - /// @param [in] tracking_model The handle to the face tracking model that - /// will be destroyed - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create tracking model by using @ref mv_face_tracking_model_create() - /// - /// @see mv_face_tracking_model_create() - int mv_face_tracking_model_destroy( - mv_face_tracking_model_h tracking_model, - ) { - return _mv_face_tracking_model_destroy( - tracking_model, - ); - } - - late final _mv_face_tracking_model_destroyPtr = - _lookup>( - 'mv_face_tracking_model_destroy'); - late final _mv_face_tracking_model_destroy = - _mv_face_tracking_model_destroyPtr - .asFunction(); - - /// @brief Calls this function to initialize tracking model by the location of the - /// face to be tracked. - /// @details This function is usually called once after tracking model is created - /// and each time before tracking is started for the new sequence of - /// sources which is not the direct continuation of the sequence for - /// which tracking has been performed before. But it is allowed to call - /// it between tracking sessions to allow Media Vision start to track - /// more accurately. - /// - /// @since_tizen 3.0 - /// @param [in] tracking_model The handle to the tracking model that will be - /// prepared for tracking on new video or image - /// sequence - /// @param [in] engine_cfg The handle to the configuration of engine - /// will be used for model preparing. If NULL, then - /// default settings will be used. - /// @param [in] source The handle to the source where face @a location - /// is specified. Usually it is the first frame of - /// the video or the first image in the continuous - /// image sequence planned to be used for tracking - /// @param [in] location The quadrangle-shaped location (actually, - /// rectangle can be used) determining position - /// of the face to be tracked on the @a source. If - /// @c NULL, then tracking model will try to find - /// previously tracked face by itself. Don't set - /// NULL when called first time for the tracking - /// model. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create a face tracking model handle by calling - /// @ref mv_face_tracking_model_create() function - /// @pre Create a source handle by calling @ref mv_create_source() function - /// @post When model is prepared, @ref mv_face_track() function can be used to - /// track on the video or continuous image sequence - /// - /// @see mv_face_tracking_model_create() - /// @see mv_face_track() - int mv_face_tracking_model_prepare( - mv_face_tracking_model_h tracking_model, - mv_engine_config_h engine_cfg, - mv_source_h source, - ffi.Pointer location, - ) { - return _mv_face_tracking_model_prepare( - tracking_model, - engine_cfg, - source, - location, - ); - } - - late final _mv_face_tracking_model_preparePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_face_tracking_model_h, - mv_engine_config_h, - mv_source_h, - ffi.Pointer)>>('mv_face_tracking_model_prepare'); - late final _mv_face_tracking_model_prepare = - _mv_face_tracking_model_preparePtr.asFunction< - int Function(mv_face_tracking_model_h, mv_engine_config_h, - mv_source_h, ffi.Pointer)>(); - - /// @brief Calls this function to make a copy of existed tracking model handle and - /// clone all its resources to the copy. - /// - /// @since_tizen 3.0 - /// @remarks Cloning performs not only handle copy, but also copies all internal - /// resources of the model. @a dst must be released using - /// mv_face_tracking_model_destroy(). - /// @param [in] src The handle to the tracking model to be copied - /// @param [out] dst The handle to the copy of existed tracking model - /// specified as @a src - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create face tracking @a src handle by calling - /// @ref mv_face_tracking_model_create() - /// - /// @see mv_face_tracking_model_create() - int mv_face_tracking_model_clone( - mv_face_tracking_model_h src, - ffi.Pointer dst, - ) { - return _mv_face_tracking_model_clone( - src, - dst, - ); - } - - late final _mv_face_tracking_model_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_face_tracking_model_h, - ffi.Pointer)>>( - 'mv_face_tracking_model_clone'); - late final _mv_face_tracking_model_clone = - _mv_face_tracking_model_clonePtr.asFunction< - int Function(mv_face_tracking_model_h, - ffi.Pointer)>(); - - /// @brief Calls this method to save tracking model to the file. - /// - /// @since_tizen 3.0 - /// @remarks @a tracking_model is saved to the absolute path directory. - /// Use @ref app_get_data_path for the private app storage path. - /// After model is saved to the file, it can be loaded from this file - /// with @ref mv_face_tracking_model_load() function. - /// @param [in] file_name Name of the path/file to save the model - /// @param [in] tracking_model The handle to the tracking model to be - /// saved to the file - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_VISION_ERROR_INVALID_PATH Invalid path - /// @retval #MEDIA_VISION_ERROR_PERMISSION_DENIED Not permitted - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Not supported model format - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create a face tracking handle by calling - /// @ref mv_face_tracking_model_create() - /// @post Saved model can be loaded from file using - /// @ref mv_face_tracking_model_load() function - /// - /// @see mv_face_tracking_model_load() - /// @see mv_face_tracking_model_create() - /// @see app_get_data_path() - int mv_face_tracking_model_save( - ffi.Pointer file_name, - mv_face_tracking_model_h tracking_model, - ) { - return _mv_face_tracking_model_save( - file_name, - tracking_model, - ); - } - - late final _mv_face_tracking_model_savePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - mv_face_tracking_model_h)>>('mv_face_tracking_model_save'); - late final _mv_face_tracking_model_save = - _mv_face_tracking_model_savePtr.asFunction< - int Function(ffi.Pointer, mv_face_tracking_model_h)>(); - - /// @brief Calls this method to load a tracking model from file. - /// - /// @since_tizen 3.0 - /// @remarks @a tracking_model is loaded from the absolute path directory. - /// Use @ref app_get_data_path for the private app storage path. - /// @a tracking_model must be destroyed using - /// @ref mv_face_tracking_model_destroy. - /// @param [in] file_name Name of path/file to load the model - /// @param [out] tracking_model The handle to the tracking model to be - /// loaded from file - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation - /// @retval #MEDIA_VISION_ERROR_INVALID_PATH Invalid path - /// @retval #MEDIA_VISION_ERROR_PERMISSION_DENIED Not permitted - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Not supported model format - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Models has been saved by @ref mv_face_tracking_model_save() function - /// can be loaded with this function - /// @post After model has been loaded and if further tracking will be performed - /// on the video which is not continuation of the last tracking performed - /// for the model, it is recommended to call - /// @ref mv_face_tracking_model_prepare() function - /// - /// @see mv_face_tracking_model_save() - /// @see mv_face_tracking_model_destroy() - /// @see app_get_data_path() - int mv_face_tracking_model_load( - ffi.Pointer file_name, - ffi.Pointer tracking_model, - ) { - return _mv_face_tracking_model_load( - file_name, - tracking_model, - ); - } - - late final _mv_face_tracking_model_loadPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>( - 'mv_face_tracking_model_load'); - late final _mv_face_tracking_model_load = - _mv_face_tracking_model_loadPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Recognizes the given image objects on the source image. - /// @details Use this function to launch image recognition algorithm configured - /// by @a engine_conf configuration. - /// - /// @since_tizen 3.0 - /// @param [in] source The handle to the source image on which image - /// objects will be recognized - /// @param [in] image_objects The set of handles to the image objects which - /// will be processed as targets of recognition - /// @param [in] number_of_objects The number of image objects - /// @param [in] engine_cfg The handle to the configuration of engine - /// which will be used for recognition. If NULL, - /// then default settings will be used. - /// @param [in] recognized_cb The callback which will be called in order to - /// process recognition result - /// @param [in] user_data The user data to be passed to the - /// @a recognized_cb - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Source colorspace - /// isn't supported - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create a set of image objects using @ref mv_image_object_create() for - /// each of them and construct (fill / load / clone) them on images that - /// will be recognized - /// @pre Create a source handle by calling @ref mv_create_source() and fill - /// by the image for which recognition will be performed - /// @post @a mv_image_recognized_cb will be called to process recognition result - /// @post Release source image by using @ref mv_destroy_source() - /// @post Release image objects by using @ref mv_image_object_destroy() for each - /// handle from @a image_objects set - /// - /// @see mv_image_recognized_cb - /// @see mv_source_h - /// @see mv_create_source() - /// @see mv_destroy_source() - /// @see mv_image_object_h - /// @see mv_image_object_create() - /// @see mv_image_object_destroy() - /// @see mv_engine_config_h - int mv_image_recognize( - mv_source_h source, - ffi.Pointer image_objects, - int number_of_objects, - mv_engine_config_h engine_cfg, - mv_image_recognized_cb recognized_cb, - ffi.Pointer user_data, - ) { - return _mv_image_recognize( - source, - image_objects, - number_of_objects, - engine_cfg, - recognized_cb, - user_data, - ); - } - - late final _mv_image_recognizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_source_h, - ffi.Pointer, - ffi.Int, - mv_engine_config_h, - mv_image_recognized_cb, - ffi.Pointer)>>('mv_image_recognize'); - late final _mv_image_recognize = _mv_image_recognizePtr.asFunction< - int Function(mv_source_h, ffi.Pointer, int, - mv_engine_config_h, mv_image_recognized_cb, ffi.Pointer)>(); - - /// @brief Tracks the given image tracking model on the current frame - /// @details Image tracking on a sequence of frames assumes calling this - /// function for each frame in the correct order. - /// @a tracked_cb will be called for result processing. - /// - /// @since_tizen 3.0 - /// @remarks Tracking algorithm is usually using for recognition of image object - /// on the sequence of images that are organized by time. For example, - /// it may be the sequence of frames from a video stream. - /// @remarks If object is lost during the tracking, system tries to find it - /// further for the following frames. Therefore, tracking will be - /// recovered when object appears again. - /// @remarks Previous calls of @ref mv_image_track() for this - /// @a image_tracking_model will affect on current call - /// @param [in] source The handle to the current image of - /// sequence where image tracking model - /// will be tracked - /// @param [in,out] image_tracking_model The handle to the image tracking model - /// which processed as target of tracking - /// @param [in] engine_cfg The handle to the configuration of - /// engine which will be used for tracking. - /// If NULL, then default settings will be - /// used. - /// @param [in] tracked_cb The callback which will receive - /// tracking results - /// @param [in] user_data The user data to be passed to the - /// @a tracked_cb - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Source colorspace - /// isn't supported - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create image tracking model by calling - /// @ref mv_image_tracking_model_create() and set target by calling - /// @ref mv_image_tracking_model_set_target() - /// @pre Create a source images by calling @ref mv_create_source() for each of - /// them and construct them based on sequence of images for which will be - /// held image tracking - /// @post @a tracked_cb will be called to process tracking result - /// @post Release image tracking model by using - /// @ref mv_image_tracking_model_destroy() - /// - /// @see mv_image_tracked_cb - /// @see mv_source_h - /// @see image_tracking_model_h - /// @see mv_image_tracking_model_create() - /// @see mv_image_tracking_model_set_target() - /// @see mv_image_tracking_model_destroy() - int mv_image_track( - mv_source_h source, - mv_image_tracking_model_h image_tracking_model, - mv_engine_config_h engine_cfg, - mv_image_tracked_cb tracked_cb, - ffi.Pointer user_data, - ) { - return _mv_image_track( - source, - image_tracking_model, - engine_cfg, - tracked_cb, - user_data, - ); - } - - late final _mv_image_trackPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_source_h, - mv_image_tracking_model_h, - mv_engine_config_h, - mv_image_tracked_cb, - ffi.Pointer)>>('mv_image_track'); - late final _mv_image_track = _mv_image_trackPtr.asFunction< - int Function(mv_source_h, mv_image_tracking_model_h, mv_engine_config_h, - mv_image_tracked_cb, ffi.Pointer)>(); - - /// @brief Creates an image object. - /// - /// @since_tizen 3.0 - /// @param [out] image_object A new handle to the image object - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @post Release image object by using @ref mv_image_object_destroy() - /// - /// @see mv_image_object_destroy() - /// @see mv_image_object_h - int mv_image_object_create( - ffi.Pointer image_object, - ) { - return _mv_image_object_create( - image_object, - ); - } - - late final _mv_image_object_createPtr = _lookup< - ffi.NativeFunction)>>( - 'mv_image_object_create'); - late final _mv_image_object_create = _mv_image_object_createPtr - .asFunction)>(); - - /// @brief Destroys the image object. - /// - /// @since_tizen 3.0 - /// @param [in] image_object The handle to the image object to be destroyed - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create image object by using @ref mv_image_object_create() - /// - /// @see mv_image_object_create() - /// @see mv_image_object_h - int mv_image_object_destroy( - mv_image_object_h image_object, - ) { - return _mv_image_object_destroy( - image_object, - ); - } - - late final _mv_image_object_destroyPtr = - _lookup>( - 'mv_image_object_destroy'); - late final _mv_image_object_destroy = - _mv_image_object_destroyPtr.asFunction(); - - /// @brief Fills the image object. - /// @details Extracts data from @a source image which will be needed for - /// recognition of depicted object in @a location. - /// - /// @since_tizen 3.0 - /// @remarks After filling the image object it can be evaluated by - /// @ref mv_image_object_get_recognition_rate(). If recognition rate - /// is too low, try to use another image of object or change - /// configuration parameters (see @ref mv_engine_config_h) and construct - /// the image object again. - /// @param [in,out] image_object The handle to the image object which will be - /// filled and can be recognized in future - /// @param [in] engine_cfg The handle to the configuration of engine - /// which will be used for extract recognition - /// data from @a source. If NULL, then default - /// settings will be used. - /// @param [in] source The source image where image object is depicted - /// @param [in] location The pointer to location of the image object - /// on the source image, or NULL if the object is - /// shown in full - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Source colorspace - /// isn't supported - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create image object by using @ref mv_image_object_create() - /// @post Release image object by using @ref mv_image_object_destroy() - /// - /// @see mv_image_object_h - /// @see mv_image_object_create() - /// @see mv_image_object_get_recognition_rate() - /// @see mv_image_recognize() - /// @see mv_image_object_destroy() - /// @see mv_engine_config_h - int mv_image_object_fill( - mv_image_object_h image_object, - mv_engine_config_h engine_cfg, - mv_source_h source, - ffi.Pointer location, - ) { - return _mv_image_object_fill( - image_object, - engine_cfg, - source, - location, - ); - } - - late final _mv_image_object_fillPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_image_object_h, mv_engine_config_h, mv_source_h, - ffi.Pointer)>>('mv_image_object_fill'); - late final _mv_image_object_fill = _mv_image_object_fillPtr.asFunction< - int Function(mv_image_object_h, mv_engine_config_h, mv_source_h, - ffi.Pointer)>(); - - /// @brief Gets a value that determines how well an image object can be recognized. - /// @details Recognition rate determines how well an image object can be - /// recognized. This value can be from 0 to 1. If the recognition rate - /// is 0 object can not be recognized and the bigger it is the more - /// likely to recognize the object. - /// - /// @since_tizen 3.0 - /// @remarks If recognition rate is too low, try to use another image of object - /// or change some configuration parameters (see @ref mv_engine_config_h) - /// and fill the image object again (see @ref mv_image_object_fill()). - /// @param [in] image_object The handle to the image object which will be - /// evaluated by this function - /// @param [out] recognition_rate A value that determines how well an image - /// object can be recognized, if 0 then object - /// can not be recognized - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create image object by using @ref mv_image_object_create() - /// @post Release image object by using @ref mv_image_object_destroy() - /// - /// @see mv_image_object_h - /// @see mv_image_object_create() - /// @see mv_image_object_fill() - /// @see mv_image_object_destroy() - /// @see mv_engine_config_h - int mv_image_object_get_recognition_rate( - mv_image_object_h image_object, - ffi.Pointer recognition_rate, - ) { - return _mv_image_object_get_recognition_rate( - image_object, - recognition_rate, - ); - } - - late final _mv_image_object_get_recognition_ratePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_image_object_h, ffi.Pointer)>>( - 'mv_image_object_get_recognition_rate'); - late final _mv_image_object_get_recognition_rate = - _mv_image_object_get_recognition_ratePtr.asFunction< - int Function(mv_image_object_h, ffi.Pointer)>(); - - /// @brief Sets a label for the image object. - /// - /// @since_tizen 3.0 - /// @param [in] image_object The handle to the image object for which the label - /// will be assigned - /// @param [in] label The label which will be assigned to the image - /// object - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create image object by using @ref mv_image_object_create() - /// @post Label could be received by using @ref mv_image_object_get_label() - /// @post Release image object by using @ref mv_image_object_destroy() - /// - /// @see mv_image_object_get_label() - /// @see mv_image_object_h - /// @see mv_image_object_create() - /// @see mv_image_object_destroy() - int mv_image_object_set_label( - mv_image_object_h image_object, - int label, - ) { - return _mv_image_object_set_label( - image_object, - label, - ); - } - - late final _mv_image_object_set_labelPtr = - _lookup>( - 'mv_image_object_set_label'); - late final _mv_image_object_set_label = _mv_image_object_set_labelPtr - .asFunction(); - - /// @brief Gets a label of image object. - /// - /// @since_tizen 3.0 - /// @remarks If @a image_object have not a label, this function return - /// MEDIA_VISION_ERROR_NO_DATA value. - /// @param [in] image_object The handle to the image object from which a - /// label will be received - /// @param [out] label The label of image object - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NO_DATA Image object hasn't label - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create image object by using @ref mv_image_object_create() - /// @pre Set label for the image object by using @ref mv_image_object_set_label() - /// @post Release image object by using @ref mv_image_object_destroy() - /// - /// @see mv_image_object_set_label() - /// @see mv_image_object_h - /// @see mv_image_object_create() - /// @see mv_image_object_destroy() - int mv_image_object_get_label( - mv_image_object_h image_object, - ffi.Pointer label, - ) { - return _mv_image_object_get_label( - image_object, - label, - ); - } - - late final _mv_image_object_get_labelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_image_object_h, - ffi.Pointer)>>('mv_image_object_get_label'); - late final _mv_image_object_get_label = _mv_image_object_get_labelPtr - .asFunction)>(); - - /// @brief Clones the image object. - /// - /// @since_tizen 3.0 - /// @remarks @a dst must be released using mv_image_object_destroy(). - /// @param [in] src The handle to the source image object - /// @param [out] dst The handle to the destination image object - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @pre Create image object handles by calling mv_image_object_create() - /// - /// @see mv_image_object_create() - /// @see mv_image_object_destroy() - int mv_image_object_clone( - mv_image_object_h src, - ffi.Pointer dst, - ) { - return _mv_image_object_clone( - src, - dst, - ); - } - - late final _mv_image_object_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_image_object_h, - ffi.Pointer)>>('mv_image_object_clone'); - late final _mv_image_object_clone = _mv_image_object_clonePtr.asFunction< - int Function(mv_image_object_h, ffi.Pointer)>(); - - /// @brief Saves the image object. - /// - /// @since_tizen 3.0 - /// @remarks @a image_object is saved to the absolute path directory. - /// Use @ref app_get_data_path for the private app storage path. - /// @param [in] file_name Name of the file to path/save the image object - /// @param [in] image_object The handle to the image object which will be saved - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_INVALID_PATH Invalid path - /// @retval #MEDIA_VISION_ERROR_PERMISSION_DENIED Not permitted - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create image object handle by calling mv_image_object_create() - /// @post Saved model can be loaded later by calling - /// mv_image_object_load() function - /// - /// @see mv_image_object_create() - /// @see mv_image_object_load() - /// @see mv_image_object_destroy() - int mv_image_object_save( - ffi.Pointer file_name, - mv_image_object_h image_object, - ) { - return _mv_image_object_save( - file_name, - image_object, - ); - } - - late final _mv_image_object_savePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - mv_image_object_h)>>('mv_image_object_save'); - late final _mv_image_object_save = _mv_image_object_savePtr - .asFunction, mv_image_object_h)>(); - - /// @brief Loads an image object from the file. - /// - /// @since_tizen 3.0 - /// @remarks @a image_object is loaded from the absolute path directory. - /// Use @ref app_get_data_path for the private app storage path. - /// @a image_object must be destroyed using - /// @ref mv_image_object_destroy(). - /// @param [in] file_name Name of path/file to load the image object - /// @param [out] image_object The handle to the image object which will be - /// filled - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_INVALID_PATH Invalid path - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_VISION_ERROR_PERMISSION_DENIED Not permitted - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Image object can be preliminary saved with mv_image_object_save() - /// function - /// - /// @see mv_image_object_save() - /// @see mv_image_object_destroy() - int mv_image_object_load( - ffi.Pointer file_name, - ffi.Pointer image_object, - ) { - return _mv_image_object_load( - file_name, - image_object, - ); - } - - late final _mv_image_object_loadPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('mv_image_object_load'); - late final _mv_image_object_load = _mv_image_object_loadPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Creates an image tracking model. - /// - /// @since_tizen 3.0 - /// @param [out] image_tracking_model A new handle to the image tracking model - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @post Release image tracking model by using mv_image_tracking_model_destroy() - /// - /// @see mv_image_tracking_model_destroy() - int mv_image_tracking_model_create( - ffi.Pointer image_tracking_model, - ) { - return _mv_image_tracking_model_create( - image_tracking_model, - ); - } - - late final _mv_image_tracking_model_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'mv_image_tracking_model_create'); - late final _mv_image_tracking_model_create = - _mv_image_tracking_model_createPtr - .asFunction)>(); - - /// @brief Sets target of image tracking model. - /// @details Sets image object which will be tracked by using tracking - /// functionality with @a image_tracking_model. - /// - /// @since_tizen 3.0 - /// @param [in] image_object Image object which will be set - /// as target for tracking - /// @param [in] image_tracking_model Handle to the image tracking model - /// for which will be set a new target - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create image tracking model by calling - /// @ref mv_image_tracking_model_create() - /// @pre Create an image object using @ref mv_image_object_create() and construct - /// (fill / load / clone) it on image that will be tracking - /// @post Release image object by using @ref mv_image_object_destroy() - /// @post Release image tracking model by using - /// @ref mv_image_tracking_model_destroy() - /// - /// @see mv_image_object_h - /// @see mv_image_tracking_model_h - /// @see mv_image_object_create() - /// @see mv_image_object_destroy() - /// @see mv_image_tracking_model_create() - /// @see mv_image_track() - /// @see mv_image_tracking_model_destroy() - int mv_image_tracking_model_set_target( - mv_image_object_h image_object, - mv_image_tracking_model_h image_tracking_model, - ) { - return _mv_image_tracking_model_set_target( - image_object, - image_tracking_model, - ); - } - - late final _mv_image_tracking_model_set_targetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_image_object_h, mv_image_tracking_model_h)>>( - 'mv_image_tracking_model_set_target'); - late final _mv_image_tracking_model_set_target = - _mv_image_tracking_model_set_targetPtr.asFunction< - int Function(mv_image_object_h, mv_image_tracking_model_h)>(); - - /// @brief Destroys the image tracking model. - /// - /// @since_tizen 3.0 - /// @param [in] image_tracking_model The handle to the image tracking model - /// to be destroyed - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create image tracking model by using mv_image_tracking_model_create() - /// - /// @see mv_image_tracking_model_create() - int mv_image_tracking_model_destroy( - mv_image_tracking_model_h image_tracking_model, - ) { - return _mv_image_tracking_model_destroy( - image_tracking_model, - ); - } - - late final _mv_image_tracking_model_destroyPtr = - _lookup>( - 'mv_image_tracking_model_destroy'); - late final _mv_image_tracking_model_destroy = - _mv_image_tracking_model_destroyPtr - .asFunction(); - - /// @brief Refreshes the state of image tracking model. - /// @details Clears moving history and change state to undetected. This function - /// is usually called each time before tracking is started for the new - /// sequence of sources which is not the direct continuation of the - /// sequence for which tracking has been performed before. Tracking - /// algorithm will try to find image by itself. - /// - /// @since_tizen 3.0 - /// @param [in] image_tracking_model The handle to the image tracking model - /// which will be refreshed - /// @param [in] engine_cfg The handle to the configuration of - /// engine which will be used. If NULL, - /// then default settings will be used. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create image tracking model by calling - /// @ref mv_image_tracking_model_create() - /// @post Release image tracking model by using - /// @ref mv_image_tracking_model_destroy() - /// - /// @see mv_image_tracking_model_h - /// @see mv_image_tracking_model_create() - /// @see mv_image_track() - /// @see mv_image_tracking_model_destroy() - int mv_image_tracking_model_refresh( - mv_image_tracking_model_h image_tracking_model, - mv_engine_config_h engine_cfg, - ) { - return _mv_image_tracking_model_refresh( - image_tracking_model, - engine_cfg, - ); - } - - late final _mv_image_tracking_model_refreshPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_image_tracking_model_h, - mv_engine_config_h)>>('mv_image_tracking_model_refresh'); - late final _mv_image_tracking_model_refresh = - _mv_image_tracking_model_refreshPtr.asFunction< - int Function(mv_image_tracking_model_h, mv_engine_config_h)>(); - - /// @brief Clones the image tracking model. - /// - /// @since_tizen 3.0 - /// @remarks @a dst must be released using mv_image_tracking_model_destroy(). - /// @param [in] src The handle to the source image tracking model - /// @param [out] dst The handle to the destination image tracking model - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @pre Create image tracking model handles by calling - /// mv_image_tracking_model_create() - /// - /// @see mv_image_tracking_model_create() - /// @see mv_image_tracking_model_destroy() - int mv_image_tracking_model_clone( - mv_image_tracking_model_h src, - ffi.Pointer dst, - ) { - return _mv_image_tracking_model_clone( - src, - dst, - ); - } - - late final _mv_image_tracking_model_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_image_tracking_model_h, - ffi.Pointer)>>( - 'mv_image_tracking_model_clone'); - late final _mv_image_tracking_model_clone = - _mv_image_tracking_model_clonePtr.asFunction< - int Function(mv_image_tracking_model_h, - ffi.Pointer)>(); - - /// @brief Saves the image tracking model. - /// - /// @since_tizen 3.0 - /// @remarks @a image_tracking_model is saved to the absolute path directory. - /// Use @ref app_get_data_path for the private app storage path. - /// @param [in] file_name Name of path/file to save the model - /// @param [in] image_tracking_model The handle to the image tracking model - /// to be saved - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_INVALID_PATH Invalid path - /// @retval #MEDIA_VISION_ERROR_PERMISSION_DENIED Not permitted - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Create image tracking model handle by calling - /// mv_image_tracking_model_create() - /// @post Saved model can be loaded later by calling - /// mv_image_tracking_model_load() function - /// - /// @see mv_image_tracking_model_create() - /// @see mv_image_tracking_model_load() - /// @see mv_image_tracking_model_destroy() - int mv_image_tracking_model_save( - ffi.Pointer file_name, - mv_image_tracking_model_h image_tracking_model, - ) { - return _mv_image_tracking_model_save( - file_name, - image_tracking_model, - ); - } - - late final _mv_image_tracking_model_savePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - mv_image_tracking_model_h)>>('mv_image_tracking_model_save'); - late final _mv_image_tracking_model_save = - _mv_image_tracking_model_savePtr.asFunction< - int Function(ffi.Pointer, mv_image_tracking_model_h)>(); - - /// @brief Loads an image tracking model from the file. - /// - /// @since_tizen 3.0 - /// @remarks @a image_tracking_model is loaded from the absolute path directory. - /// Use @ref app_get_data_path for the private app storage path. - /// @a image_tracking_model must be destroyed using - /// @ref mv_image_tracking_model_destroy. - /// @param [in] file_name Name of path/file to load model - /// @param [out] image_tracking_model The handle to the image tracking - /// model to be filled - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_INVALID_PATH Invalid path - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_VISION_ERROR_PERMISSION_DENIED Not permitted - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Image tracking model handle can be preliminary saved with - /// mv_image_tracking_model_save() function - /// - /// @see mv_image_tracking_model_save() - /// @see mv_image_tracking_model_destroy() - int mv_image_tracking_model_load( - ffi.Pointer file_name, - ffi.Pointer image_tracking_model, - ) { - return _mv_image_tracking_model_load( - file_name, - image_tracking_model, - ); - } - - late final _mv_image_tracking_model_loadPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>( - 'mv_image_tracking_model_load'); - late final _mv_image_tracking_model_load = - _mv_image_tracking_model_loadPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Creates surveillance event trigger handle. - /// - /// @since_tizen 3.0 - /// @remarks List of supported event types can be obtained by - /// @ref mv_surveillance_foreach_supported_event_type function - /// @remarks You must release @a trigger by using - /// @ref mv_surveillance_event_trigger_destroy() - /// @param [in] event_type Name of the event type to be supported by the - /// @a trigger - /// @param [out] trigger A new handle to the event trigger - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_surveillance_event_trigger_destroy() - /// @see mv_surveillance_foreach_supported_event_type() - int mv_surveillance_event_trigger_create( - ffi.Pointer event_type, - ffi.Pointer trigger, - ) { - return _mv_surveillance_event_trigger_create( - event_type, - trigger, - ); - } - - late final _mv_surveillance_event_trigger_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>( - 'mv_surveillance_event_trigger_create'); - late final _mv_surveillance_event_trigger_create = - _mv_surveillance_event_trigger_createPtr.asFunction< - int Function(ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Destroys the surveillance event trigger handle and releases all its - /// resources. - /// - /// @since_tizen 3.0 - /// @param [in] trigger The handle to the event trigger to be destroyed - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_surveillance_event_trigger_create - int mv_surveillance_event_trigger_destroy( - mv_surveillance_event_trigger_h trigger, - ) { - return _mv_surveillance_event_trigger_destroy( - trigger, - ); - } - - late final _mv_surveillance_event_trigger_destroyPtr = _lookup< - ffi - .NativeFunction>( - 'mv_surveillance_event_trigger_destroy'); - late final _mv_surveillance_event_trigger_destroy = - _mv_surveillance_event_trigger_destroyPtr - .asFunction(); - - /// @brief Gets the surveillance event trigger type as character string. - /// - /// @since_tizen 3.0 - /// @remarks The @a event_type should be freed using free() - /// @param [in] trigger The handle to the event trigger - /// @param [out] event_type The pointer to the character string which will be - /// filled by textual name of the event type - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Event trigger has to be created by - /// @ref mv_surveillance_event_trigger_create() function - int mv_surveillance_get_event_trigger_type( - mv_surveillance_event_trigger_h trigger, - ffi.Pointer> event_type, - ) { - return _mv_surveillance_get_event_trigger_type( - trigger, - event_type, - ); - } - - late final _mv_surveillance_get_event_trigger_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_surveillance_event_trigger_h, - ffi.Pointer>)>>( - 'mv_surveillance_get_event_trigger_type'); - late final _mv_surveillance_get_event_trigger_type = - _mv_surveillance_get_event_trigger_typePtr.asFunction< - int Function(mv_surveillance_event_trigger_h, - ffi.Pointer>)>(); - - /// @brief Sets ROI (Region Of Interest) to the event trigger. - /// @details When ROI is set for the event trigger, then event check for this - /// @a trigger will be performed only inside the polygonal region - /// determined by @a roi parameter. - /// If this method has been never called for the @a trigger, then event - /// will be checked for the whole input frame (event check is performed - /// for each @ref mv_surveillance_push_source() function call). - /// It is possible to change the ROI between - /// @ref mv_surveillance_push_source() calls. - /// - /// @since_tizen 3.0 - /// @param [in] trigger The handle to the event trigger - /// @param [in] number_of_points The number of ROI points - /// @param [in] roi The input array with ROI points - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Event trigger has to be created by - /// @ref mv_surveillance_event_trigger_create() function - /// - /// @see mv_surveillance_event_trigger_h - /// @see mv_surveillance_get_event_trigger_roi() - int mv_surveillance_set_event_trigger_roi( - mv_surveillance_event_trigger_h trigger, - int number_of_points, - ffi.Pointer roi, - ) { - return _mv_surveillance_set_event_trigger_roi( - trigger, - number_of_points, - roi, - ); - } - - late final _mv_surveillance_set_event_trigger_roiPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_surveillance_event_trigger_h, ffi.Int, - ffi.Pointer)>>( - 'mv_surveillance_set_event_trigger_roi'); - late final _mv_surveillance_set_event_trigger_roi = - _mv_surveillance_set_event_trigger_roiPtr.asFunction< - int Function( - mv_surveillance_event_trigger_h, int, ffi.Pointer)>(); - - /// @brief Gets ROI (Region Of Interest) from the event trigger. - /// - /// @since_tizen 3.0 - /// @remark If @ref mv_surveillance_set_event_trigger_roi() has been never - /// called for @a trigger, then @a number_of_points output value will be - /// zero and @a roi pointer will be not changed. - /// @param [in] trigger The handle to the event trigger - /// @param [out] number_of_points The number of ROI points - /// @param [out] roi The output array with ROI points - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Event trigger has to be created by - /// @ref mv_surveillance_event_trigger_create() function - /// - /// @post Memory for @a roi array must be released - /// - /// @see mv_surveillance_event_trigger_h - /// @see mv_surveillance_set_event_trigger_roi() - int mv_surveillance_get_event_trigger_roi( - mv_surveillance_event_trigger_h trigger, - ffi.Pointer number_of_points, - ffi.Pointer> roi, - ) { - return _mv_surveillance_get_event_trigger_roi( - trigger, - number_of_points, - roi, - ); - } - - late final _mv_surveillance_get_event_trigger_roiPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_surveillance_event_trigger_h, - ffi.Pointer, ffi.Pointer>)>>( - 'mv_surveillance_get_event_trigger_roi'); - late final _mv_surveillance_get_event_trigger_roi = - _mv_surveillance_get_event_trigger_roiPtr.asFunction< - int Function(mv_surveillance_event_trigger_h, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Subscribes @a trigger to process sources pushed from video identified - /// by @a video_stream_id. - /// @details When @a trigger is subscribed, then each time when function - /// @ref mv_surveillance_push_source() is called for @a video_stream_id, - /// event occurrence is checked. If this check is successful, - /// @a callback is invoked. Details on occurred event can be obtained - /// using @ref mv_surveillance_result_h handle from @a callback. - /// - /// @since_tizen 3.0 - /// @remarks Use @ref mv_surveillance_unsubscribe_event_trigger() function for - /// the same @a trigger and @a video_stream_id parameters to stop - /// subscription. - /// @param [in] trigger The handle to the event trigger activating - /// calls of the @a callback function - /// @param [in] video_stream_id The identifier of the video stream for which - /// event trigger activation will be checked - /// @param [in] engine_cfg The engine configuration of the event - /// @param [in] callback Callback to be called each time when event - /// occurrence is detected - /// @param [in] user_data The user data to be passed to the @a callback - /// function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @post @ref mv_surveillance_event_occurred_cb will be called each time - /// @a trigger is activated after @ref mv_surveillance_push_source() call - /// - /// @see mv_surveillance_event_trigger_h - /// @see mv_surveillance_unsubscribe_event_trigger() - /// @see mv_surveillance_push_source() - int mv_surveillance_subscribe_event_trigger( - mv_surveillance_event_trigger_h trigger, - int video_stream_id, - mv_engine_config_h engine_cfg, - mv_surveillance_event_occurred_cb callback, - ffi.Pointer user_data, - ) { - return _mv_surveillance_subscribe_event_trigger( - trigger, - video_stream_id, - engine_cfg, - callback, - user_data, - ); - } - - late final _mv_surveillance_subscribe_event_triggerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_surveillance_event_trigger_h, - ffi.Int, - mv_engine_config_h, - mv_surveillance_event_occurred_cb, - ffi.Pointer)>>( - 'mv_surveillance_subscribe_event_trigger'); - late final _mv_surveillance_subscribe_event_trigger = - _mv_surveillance_subscribe_event_triggerPtr.asFunction< - int Function(mv_surveillance_event_trigger_h, int, mv_engine_config_h, - mv_surveillance_event_occurred_cb, ffi.Pointer)>(); - - /// @brief Unsubscribes @a trigger from the event and stop calling @a callback. - /// - /// @since_tizen 3.0 - /// @remarks To start handling trigger activation use - /// @ref mv_surveillance_subscribe_event_trigger(). - /// @param [in] trigger The handle to the event trigger for which - /// subscription will be stopped - /// @param [in] video_stream_id The identifier of the video source for which - /// subscription will be stopped - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre To stop subscription it has to be created earlier with - /// @ref mv_surveillance_subscribe_event_trigger() function - /// - /// @see mv_surveillance_event_trigger_h - /// @see mv_surveillance_subscribe_event_trigger() - int mv_surveillance_unsubscribe_event_trigger( - mv_surveillance_event_trigger_h trigger, - int video_stream_id, - ) { - return _mv_surveillance_unsubscribe_event_trigger( - trigger, - video_stream_id, - ); - } - - late final _mv_surveillance_unsubscribe_event_triggerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_surveillance_event_trigger_h, - ffi.Int)>>('mv_surveillance_unsubscribe_event_trigger'); - late final _mv_surveillance_unsubscribe_event_trigger = - _mv_surveillance_unsubscribe_event_triggerPtr - .asFunction(); - - /// @brief Pushes source to the surveillance system to detect events. - /// @details mv_surveillance_event_occurred_cb() will be called when any - /// subscribing event detected. - /// - /// @since_tizen 3.0 - /// @remarks @ref mv_surveillance_set_event_trigger_roi() function can be used - /// to specify the polygon region where event can be detected only - /// @param [in] source The handle to the media source - /// @param [in] video_stream_id The identifier of video stream from which - /// @a source is coming - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre To receive surveillance results, some event triggers has to be - /// subscribed by @ref mv_surveillance_subscribe_event_trigger() function - /// before @ref mv_surveillance_push_source() calls - /// @pre Before calling of this method @a source has to be correctly filled. - /// @ref mv_source_fill_by_media_packet(), @ref mv_source_fill_by_buffer() - /// functions can be used to fill @a source - /// - /// @see mv_surveillance_event_trigger_h - /// @see mv_surveillance_event_occurred_cb - /// @see mv_surveillance_subscribe_event_trigger() - /// @see mv_surveillance_unsubscribe_event_trigger() - int mv_surveillance_push_source( - mv_source_h source, - int video_stream_id, - ) { - return _mv_surveillance_push_source( - source, - video_stream_id, - ); - } - - late final _mv_surveillance_push_sourcePtr = - _lookup>( - 'mv_surveillance_push_source'); - late final _mv_surveillance_push_source = _mv_surveillance_push_sourcePtr - .asFunction(); - - /// @brief Starts traversing through list of supported event types. - /// - /// @since_tizen 3.0 - /// @remarks Supported event types and their descriptions can be found in - /// @ref CAPI_MEDIA_VISION_SURVEILLANCE_EVENT_TYPES documentation - /// section - /// @param [in] callback The callback function to be called for each - /// supported event type - /// @param [in] user_data The user data to be passed to the @a callback - /// function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_surveillance_event_type_cb - /// @see mv_surveillance_foreach_event_result_name() - int mv_surveillance_foreach_supported_event_type( - mv_surveillance_event_type_cb callback, - ffi.Pointer user_data, - ) { - return _mv_surveillance_foreach_supported_event_type( - callback, - user_data, - ); - } - - late final _mv_surveillance_foreach_supported_event_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - mv_surveillance_event_type_cb, ffi.Pointer)>>( - 'mv_surveillance_foreach_supported_event_type'); - late final _mv_surveillance_foreach_supported_event_type = - _mv_surveillance_foreach_supported_event_typePtr.asFunction< - int Function(mv_surveillance_event_type_cb, ffi.Pointer)>(); - - /// @brief Starts traversing through list of supported event result value names. - /// - /// @since_tizen 3.0 - /// @remarks Supported event types, event result value names and their - /// descriptions can be found in - /// @ref CAPI_MEDIA_VISION_SURVEILLANCE_EVENT_TYPES documentation - /// section - /// @param [in] event_type The name of the event type for which result value - /// names will be passed to the @a callback. Can be - /// set @c NULL. If set @c NULL then all supported - /// event result value names will be traversed - /// @param [in] callback The callback function to be called for each - /// supported event result value name - /// @param [in] user_data The user data to be passed to the @a callback - /// function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @see mv_surveillance_event_result_name_cb - /// @see mv_surveillance_foreach_supported_event_type() - /// @see mv_surveillance_get_result_value() - int mv_surveillance_foreach_event_result_name( - ffi.Pointer event_type, - mv_surveillance_event_result_name_cb callback, - ffi.Pointer user_data, - ) { - return _mv_surveillance_foreach_event_result_name( - event_type, - callback, - user_data, - ); - } - - late final _mv_surveillance_foreach_event_result_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - mv_surveillance_event_result_name_cb, - ffi.Pointer)>>( - 'mv_surveillance_foreach_event_result_name'); - late final _mv_surveillance_foreach_event_result_name = - _mv_surveillance_foreach_event_result_namePtr.asFunction< - int Function(ffi.Pointer, - mv_surveillance_event_result_name_cb, ffi.Pointer)>(); - - /// @brief Gets result value. - /// @details See the output values names in the event types descriptions located - /// in @ref CAPI_MEDIA_VISION_SURVEILLANCE_EVENT_TYPES documentation - /// section. - /// - /// @since_tizen 3.0 - /// @remarks The name can be obtained by - /// @ref mv_surveillance_foreach_event_result_name function - /// @param [in] result The handle to the event result - /// @param [in] name The name of the value to be gotten - /// @param [in, out] value The pointer to variable which will be filled - /// by result value. To find the type of @a value - /// please refer to the - /// @ref CAPI_MEDIA_VISION_SURVEILLANCE_EVENT_TYPES - /// documentation section - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MEDIA_VISION_ERROR_NONE Successful - /// @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Memory for value has to be allocated - /// - /// @see mv_surveillance_event_trigger_h - /// @see mv_surveillance_event_occurred_cb - /// @see mv_surveillance_subscribe_event_trigger() - /// @see mv_surveillance_unsubscribe_event_trigger() - /// @see mv_surveillance_foreach_supported_event_type() - /// @see mv_surveillance_foreach_event_result_name() - int mv_surveillance_get_result_value( - mv_surveillance_result_h result, - ffi.Pointer name, - ffi.Pointer value, - ) { - return _mv_surveillance_get_result_value( - result, - name, - value, - ); - } - - late final _mv_surveillance_get_result_valuePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(mv_surveillance_result_h, ffi.Pointer, - ffi.Pointer)>>('mv_surveillance_get_result_value'); - late final _mv_surveillance_get_result_value = - _mv_surveillance_get_result_valuePtr.asFunction< - int Function(mv_surveillance_result_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Creates metadata. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks The @a metadata should be released using metadata_editor_destroy(). - /// - /// @param[in] metadata The handle to metadata - /// @return 0 on success, otherwise a negative error value - /// @retval #METADATA_EDITOR_ERROR_NONE Successful - /// @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Out of memory - /// @see metadata_editor_destroy() - int metadata_editor_create( - ffi.Pointer metadata, - ) { - return _metadata_editor_create( - metadata, - ); - } - - late final _metadata_editor_createPtr = _lookup< - ffi.NativeFunction)>>( - 'metadata_editor_create'); - late final _metadata_editor_create = _metadata_editor_createPtr - .asFunction)>(); - - /// @brief Sets file path to read or write metadata. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - /// For example, if you get the specific path by using storage_get_directory(). you should add privilege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. - /// - /// @param[in] metadata The handle to metadata - /// @param[in] path path to read or write metadata - /// @return 0 on success, otherwise a negative error value - /// @retval #METADATA_EDITOR_ERROR_NONE Successful - /// @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EDITOR_ERROR_FILE_EXISTS File not exist - /// @retval #METADATA_EDITOR_ERROR_NOT_SUPPORTED unsupported file type - /// @retval #METADATA_EDITOR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #METADATA_EDITOR_ERROR_OPERATION_FAILED Internal Operation Fail - /// @pre Create metadata handle by calling metadata_editor_create() - /// @see metadata_editor_create(), metadata_editor_destroy() - int metadata_editor_set_path( - metadata_editor_h metadata, - ffi.Pointer path, - ) { - return _metadata_editor_set_path( - metadata, - path, - ); - } - - late final _metadata_editor_set_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(metadata_editor_h, - ffi.Pointer)>>('metadata_editor_set_path'); - late final _metadata_editor_set_path = _metadata_editor_set_pathPtr - .asFunction)>(); - - /// @brief Gets the metadata corresponding to the attribute. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks The @a value should be released using free(). \n - /// If the attribute value of the metadata is empty, return value is NULL. \n - /// In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - /// For example, if you get the specific path by using storage_get_directory(). you should add privilege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. - /// - /// @param[in] metadata The handle to metadata - /// @param[in] attribute key attribute name to get - /// @param[out] value The value of the attribute - /// @return 0 on success, otherwise a negative error value - /// @retval #METADATA_EDITOR_ERROR_NONE Successful - /// @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #METADATA_EDITOR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #METADATA_EDITOR_ERROR_OPERATION_FAILED Internal Operation Fail - /// @pre Set path to read or write metadata by calling metadata_editor_set_path() - /// @see metadata_editor_create(), metadata_editor_destroy() - int metadata_editor_get_metadata( - metadata_editor_h metadata, - int attribute, - ffi.Pointer> value, - ) { - return _metadata_editor_get_metadata( - metadata, - attribute, - value, - ); - } - - late final _metadata_editor_get_metadataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(metadata_editor_h, ffi.Int32, - ffi.Pointer>)>>( - 'metadata_editor_get_metadata'); - late final _metadata_editor_get_metadata = - _metadata_editor_get_metadataPtr.asFunction< - int Function( - metadata_editor_h, int, ffi.Pointer>)>(); - - /// @brief Sets the attribute of the metadata. - /// @details This function set the attribute of the metadata for updating the metadata. \n - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks The @a value should be released using free(). \n - /// You must call metadata_editor_update_metadata() for applying to the metadata of the media file. if not, you will see the existing metadata when you call metadata_editor_get_metadata(). - /// - /// @param[in] metadata The handle to metadata - /// @param[in] attribute key attribute name to get - /// @param[in] value The value of the attribute - /// @return 0 on success, otherwise a negative error value - /// @retval #METADATA_EDITOR_ERROR_NONE Successful - /// @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #METADATA_EDITOR_ERROR_OPERATION_FAILED Internal Operation Fail - /// @pre Set path to read or write metadata by calling metadata_editor_set_path() - /// @see metadata_editor_create(), metadata_editor_update_metadata(), metadata_editor_destroy() - int metadata_editor_set_metadata( - metadata_editor_h metadata, - int attribute, - ffi.Pointer value, - ) { - return _metadata_editor_set_metadata( - metadata, - attribute, - value, - ); - } - - late final _metadata_editor_set_metadataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(metadata_editor_h, ffi.Int32, - ffi.Pointer)>>('metadata_editor_set_metadata'); - late final _metadata_editor_set_metadata = - _metadata_editor_set_metadataPtr.asFunction< - int Function(metadata_editor_h, int, ffi.Pointer)>(); - - /// @brief Updates the modified metadata. - /// @details This function update the metadata in the media file that is modified by metadata_editor_set_metadata(). - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - /// For example, if you get the specific path by using storage_get_directory(). you should add privilege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. - /// - /// @param[in] metadata The handle to metadata - /// @return 0 on success, otherwise a negative error value - /// @retval #METADATA_EDITOR_ERROR_NONE Successful - /// @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #METADATA_EDITOR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #METADATA_EDITOR_ERROR_OPERATION_FAILED Internal Operation Fail - /// @pre Set path to read or write metadata by calling metadata_editor_set_path() - /// @see metadata_editor_create(), metadata_editor_destroy() - int metadata_editor_update_metadata( - metadata_editor_h metadata, - ) { - return _metadata_editor_update_metadata( - metadata, - ); - } - - late final _metadata_editor_update_metadataPtr = - _lookup>( - 'metadata_editor_update_metadata'); - late final _metadata_editor_update_metadata = - _metadata_editor_update_metadataPtr - .asFunction(); - - /// @brief Gets the picture in the media file. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks The @a picture and @a mime_type should be released using free(). \n - /// In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - /// For example, if you get the specific path by using storage_get_directory(). you should add privilege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. - /// - /// @param[in] metadata The handle to metadata - /// @param[in] index picture order - /// @param[out] picture encoded picture - /// @param[out] size encoded picture size - /// @param[out] mime_type the MIME of the picture - /// @return 0 on success, otherwise a negative error value - /// @retval #METADATA_EDITOR_ERROR_NONE Successful - /// @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #METADATA_EDITOR_ERROR_OPERATION_FAILED Internal Operation Fail - /// @retval #METADATA_EDITOR_ERROR_PERMISSION_DENIED Permission denied - /// @pre Set path to read or write metadata by calling metadata_editor_set_path() - /// @see metadata_editor_create(), metadata_editor_destroy() - int metadata_editor_get_picture( - metadata_editor_h metadata, - int index, - ffi.Pointer> picture, - ffi.Pointer size, - ffi.Pointer> mime_type, - ) { - return _metadata_editor_get_picture( - metadata, - index, - picture, - size, - mime_type, - ); - } - - late final _metadata_editor_get_picturePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - metadata_editor_h, - ffi.Int, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>)>>( - 'metadata_editor_get_picture'); - late final _metadata_editor_get_picture = - _metadata_editor_get_picturePtr.asFunction< - int Function( - metadata_editor_h, - int, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Appends the picture to the media file. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks You must call metadata_editor_update_metadata() for applying to the metadata of the media file. if not, you will see the existing metadata when you call metadata_editor_get_metadata(). \n - /// Image type of the metadata supports jpeg and png. \n - /// In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - /// For example, if you get the specific path by using storage_get_directory(). you should add privilege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. - /// - /// @param[in] metadata The handle to metadata - /// @param[in] picture_path The path of picture for adding to the metadata - /// @return 0 on success, otherwise a negative error value - /// @retval #METADATA_EDITOR_ERROR_NONE Successful - /// @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #METADATA_EDITOR_ERROR_NOT_SUPPORTED unsupported file type - /// @retval #METADATA_EDITOR_ERROR_OPERATION_FAILED Internal Operation Fail - /// @retval #METADATA_EDITOR_ERROR_PERMISSION_DENIED Permission denied - /// @pre Set path to read or write metadata by calling metadata_editor_set_path() - /// @see metadata_editor_create(), metadata_editor_destroy() - int metadata_editor_append_picture( - metadata_editor_h metadata, - ffi.Pointer picture_path, - ) { - return _metadata_editor_append_picture( - metadata, - picture_path, - ); - } - - late final _metadata_editor_append_picturePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(metadata_editor_h, - ffi.Pointer)>>('metadata_editor_append_picture'); - late final _metadata_editor_append_picture = - _metadata_editor_append_picturePtr - .asFunction)>(); - - /// @brief Removes artwork image from media file. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks You must call metadata_editor_update_metadata() for applying to the metadata of the media file. if not, you will see the existing metadata when you call metadata_editor_get_metadata(). \n - /// In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - /// For example, if you get the specific path by using storage_get_directory(). you should add privilege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. - /// - /// @param[in] metadata The handle to metadata - /// @param[in] index artwork image order - /// @return 0 on success, otherwise a negative error value - /// @retval #METADATA_EDITOR_ERROR_NONE Successful - /// @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #METADATA_EDITOR_ERROR_OPERATION_FAILED Internal Operation Fail - /// @retval #METADATA_EDITOR_ERROR_PERMISSION_DENIED Permission denied - /// @pre Set path to read or write metadata by calling metadata_editor_set_path() - /// @see metadata_editor_create(), metadata_editor_destroy() - int metadata_editor_remove_picture( - metadata_editor_h metadata, - int index, - ) { - return _metadata_editor_remove_picture( - metadata, - index, - ); - } - - late final _metadata_editor_remove_picturePtr = - _lookup>( - 'metadata_editor_remove_picture'); - late final _metadata_editor_remove_picture = - _metadata_editor_remove_picturePtr - .asFunction(); - - /// @brief Destroys metadata. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] metadata The handle to metadata - /// @return 0 on success, otherwise a negative error value - /// @retval #METADATA_EDITOR_ERROR_NONE Successful - /// @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EDITOR_ERROR_OPERATION_FAILED Internal Operation Fail - /// @pre Create metadata handle by calling metadata_editor_create() - /// @see metadata_editor_create() - int metadata_editor_destroy( - metadata_editor_h metadata, - ) { - return _metadata_editor_destroy( - metadata, - ); - } - - late final _metadata_editor_destroyPtr = - _lookup>( - 'metadata_editor_destroy'); - late final _metadata_editor_destroy = - _metadata_editor_destroyPtr.asFunction(); - - /// @brief Creates metadata. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The @a metadata should be released using metadata_extractor_destroy(). - /// - /// @param[in] metadata The handle to metadata - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #METADATA_EXTRACTOR_ERROR_NONE Successful - /// @retval #METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EXTRACTOR_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see metadata_extractor_destroy() - int metadata_extractor_create( - ffi.Pointer metadata, - ) { - return _metadata_extractor_create( - metadata, - ); - } - - late final _metadata_extractor_createPtr = _lookup< - ffi - .NativeFunction)>>( - 'metadata_extractor_create'); - late final _metadata_extractor_create = _metadata_extractor_createPtr - .asFunction)>(); - - /// @brief Sets the file path to extract. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] metadata The handle to metadata - /// @param[in] path The path to extract metadata - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #METADATA_EXTRACTOR_ERROR_NONE Successful - /// @retval #METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EXTRACTOR_ERROR_FILE_EXISTS File does not exist - /// @retval #METADATA_EXTRACTOR_ERROR_OPERATION_FAILED Internal operation failed - /// - /// @pre Create a metadata handle by calling metadata_extractor_create(). - /// @see metadata_extractor_create() - /// @see metadata_extractor_destroy() - int metadata_extractor_set_path( - metadata_extractor_h metadata, - ffi.Pointer path, - ) { - return _metadata_extractor_set_path( - metadata, - path, - ); - } - - late final _metadata_extractor_set_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(metadata_extractor_h, - ffi.Pointer)>>('metadata_extractor_set_path'); - late final _metadata_extractor_set_path = _metadata_extractor_set_pathPtr - .asFunction)>(); - - /// @brief Sets the buffer to extract. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] metadata The handle to metadata - /// @param[in] buffer The buffer to extract metadata - /// @param[in] size The buffer size - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #METADATA_EXTRACTOR_ERROR_NONE Successful - /// @retval #METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EXTRACTOR_ERROR_OPERATION_FAILED Internal operation failed - /// - /// @pre Create a metadata handle by calling metadata_extractor_create(). - /// @see metadata_extractor_create() - /// @see metadata_extractor_destroy() - int metadata_extractor_set_buffer( - metadata_extractor_h metadata, - ffi.Pointer buffer, - int size, - ) { - return _metadata_extractor_set_buffer( - metadata, - buffer, - size, - ); - } - - late final _metadata_extractor_set_bufferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(metadata_extractor_h, ffi.Pointer, - ffi.Int)>>('metadata_extractor_set_buffer'); - late final _metadata_extractor_set_buffer = - _metadata_extractor_set_bufferPtr.asFunction< - int Function(metadata_extractor_h, ffi.Pointer, int)>(); - - /// @brief Destroys metadata. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] metadata The handle to metadata - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #METADATA_EXTRACTOR_ERROR_NONE Successful - /// @retval #METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EXTRACTOR_ERROR_OPERATION_FAILED Internal operation failed - /// - /// @pre Create a metadata handle by calling metadata_extractor_create(). - /// @see metadata_extractor_create() - int metadata_extractor_destroy( - metadata_extractor_h metadata, - ) { - return _metadata_extractor_destroy( - metadata, - ); - } - - late final _metadata_extractor_destroyPtr = - _lookup>( - 'metadata_extractor_destroy'); - late final _metadata_extractor_destroy = _metadata_extractor_destroyPtr - .asFunction(); - - /// @brief Gets metadata. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a value should be released using free(). \n - /// In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - /// For example, if you get the specific path by using storage_get_directory(). you should add privilege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. - /// - /// @param[in] metadata The handle to metadata - /// @param[in] attribute The key attribute name to get - /// @param[out] value The value of the attribute - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #METADATA_EXTRACTOR_ERROR_NONE Successful - /// @retval #METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EXTRACTOR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #METADATA_EXTRACTOR_ERROR_OPERATION_FAILED Internal operation failed - /// @retval #METADATA_EXTRACTOR_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Set the path to extract by calling metadata_extractor_set_path(). - /// @see metadata_extractor_create() - /// @see metadata_extractor_destroy() - int metadata_extractor_get_metadata( - metadata_extractor_h metadata, - int attribute, - ffi.Pointer> value, - ) { - return _metadata_extractor_get_metadata( - metadata, - attribute, - value, - ); - } - - late final _metadata_extractor_get_metadataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(metadata_extractor_h, ffi.Int32, - ffi.Pointer>)>>( - 'metadata_extractor_get_metadata'); - late final _metadata_extractor_get_metadata = - _metadata_extractor_get_metadataPtr.asFunction< - int Function( - metadata_extractor_h, int, ffi.Pointer>)>(); - - /// @brief Gets the artwork image in a media file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a artwork and @a mime_type should be released using free(). \n - /// In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - /// For example, if you get the specific path by using storage_get_directory(). you should add privilege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. - /// - /// @param[in] metadata The handle to metadata - /// @param[out] artwork The encoded artwork image - /// @param[out] size The encoded artwork size - /// @param[out] mime_type The MIME of the artwork - /// @return @c 0 on success, otherwise a negative error value - /// - /// @retval #METADATA_EXTRACTOR_ERROR_NONE Successful - /// @retval #METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EXTRACTOR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #METADATA_EXTRACTOR_ERROR_OPERATION_FAILED Internal operation failed - /// @retval #METADATA_EXTRACTOR_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Set the path to extract by calling metadata_extractor_set_path(). - /// @see metadata_extractor_create() - /// @see metadata_extractor_destroy() - int metadata_extractor_get_artwork( - metadata_extractor_h metadata, - ffi.Pointer> artwork, - ffi.Pointer size, - ffi.Pointer> mime_type, - ) { - return _metadata_extractor_get_artwork( - metadata, - artwork, - size, - mime_type, - ); - } - - late final _metadata_extractor_get_artworkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - metadata_extractor_h, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>)>>( - 'metadata_extractor_get_artwork'); - late final _metadata_extractor_get_artwork = - _metadata_extractor_get_artworkPtr.asFunction< - int Function(metadata_extractor_h, ffi.Pointer>, - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Gets the frame of a video media file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a frame should be released using free(). - /// In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - /// For example, if you get the specific path by using storage_get_directory(). you should add privilege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. - /// - /// @param[in] metadata The handle to metadata - /// @param[out] frame The raw frame data in RGB888 - /// @param[out] size The frame data size - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #METADATA_EXTRACTOR_ERROR_NONE Successful - /// @retval #METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EXTRACTOR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #METADATA_EXTRACTOR_ERROR_OPERATION_FAILED Internal operation failed - /// @retval #METADATA_EXTRACTOR_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Set the path to extract by calling metadata_extractor_set_path(). - /// @see metadata_extractor_create() - /// @see metadata_extractor_destroy() - int metadata_extractor_get_frame( - metadata_extractor_h metadata, - ffi.Pointer> frame, - ffi.Pointer size, - ) { - return _metadata_extractor_get_frame( - metadata, - frame, - size, - ); - } - - late final _metadata_extractor_get_framePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - metadata_extractor_h, - ffi.Pointer>, - ffi.Pointer)>>('metadata_extractor_get_frame'); - late final _metadata_extractor_get_frame = - _metadata_extractor_get_framePtr.asFunction< - int Function(metadata_extractor_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Gets the synclyrics of a media file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a lyrics should be released using free(). - /// In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - /// For example, if you get the specific path by using storage_get_directory(). you should add privilege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. - /// - /// @param[in] metadata The handle to metadata - /// @param[in] index The index of time/lyrics to set - /// @param[out] time_stamp The time information of the index - /// @param[out] lyrics The lyrics of the index - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #METADATA_EXTRACTOR_ERROR_NONE Successful - /// @retval #METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EXTRACTOR_ERROR_OPERATION_FAILED Internal operation failed - /// @retval #METADATA_EXTRACTOR_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Set the path to extract by calling metadata_extractor_set_path(). - /// @pre Get the time/lyrics set number by calling metadata_extractor_get_metadata(METADATA_SYNCLYRICS_NUM). - /// @see metadata_extractor_create() - /// @see metadata_extractor_destroy() - int metadata_extractor_get_synclyrics( - metadata_extractor_h metadata, - int index, - ffi.Pointer time_stamp, - ffi.Pointer> lyrics, - ) { - return _metadata_extractor_get_synclyrics( - metadata, - index, - time_stamp, - lyrics, - ); - } - - late final _metadata_extractor_get_synclyricsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - metadata_extractor_h, - ffi.Int, - ffi.Pointer, - ffi.Pointer>)>>( - 'metadata_extractor_get_synclyrics'); - late final _metadata_extractor_get_synclyrics = - _metadata_extractor_get_synclyricsPtr.asFunction< - int Function(metadata_extractor_h, int, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets the frame of a video media. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a frame should be released using free(). - /// In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - /// For example, if you get the specific path by using storage_get_directory(). you should add privilege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. - /// - /// @param[in] metadata The handle to metadata - /// @param[in] timestamp The timestamp in milliseconds - /// @param[in] is_accurate If @c true the user can get an accurate frame for the given timestamp,\n - /// otherwise @c false if the user can only get the nearest i-frame of the video rapidly - /// @param[out] frame The raw frame data in RGB888 - /// @param[out] size The frame data size - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #METADATA_EXTRACTOR_ERROR_NONE Successful - /// @retval #METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #METADATA_EXTRACTOR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #METADATA_EXTRACTOR_ERROR_OPERATION_FAILED Internal operation failed - /// @retval #METADATA_EXTRACTOR_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Set the path to extract by calling metadata_extractor_set_path(). - /// @see metadata_extractor_create() - /// @see metadata_extractor_destroy() - int metadata_extractor_get_frame_at_time( - metadata_extractor_h metadata, - int timestamp, - bool is_accurate, - ffi.Pointer> frame, - ffi.Pointer size, - ) { - return _metadata_extractor_get_frame_at_time( - metadata, - timestamp, - is_accurate, - frame, - size, - ); - } - - late final _metadata_extractor_get_frame_at_timePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - metadata_extractor_h, - ffi.UnsignedLong, - ffi.Bool, - ffi.Pointer>, - ffi.Pointer)>>('metadata_extractor_get_frame_at_time'); - late final _metadata_extractor_get_frame_at_time = - _metadata_extractor_get_frame_at_timePtr.asFunction< - int Function(metadata_extractor_h, int, bool, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Creates a player handle for playing multimedia content. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks You must release @a player by using player_destroy().\n - /// Although you can create multiple player handles at the same time, - /// the player cannot guarantee proper operation because of limited resources, such as - /// audio or display device. - /// - /// @param[out] player A new handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_RESOURCE_LIMIT Cannot create more instance due to resource(socket, thread, etc) limitation on system. - /// @post The player state will be #PLAYER_STATE_IDLE. - /// @see player_destroy() - int player_create( - ffi.Pointer player, - ) { - return _player_create( - player, - ); - } - - late final _player_createPtr = - _lookup)>>( - 'player_create'); - late final _player_create = - _player_createPtr.asFunction)>(); - - /// @brief Destroys the media player handle and releases all its resources. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks To completely shutdown player operation, call this function with a valid player handle from any player state. - /// @param[in] player The handle to the media player to be destroyed - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @post The player state will be #PLAYER_STATE_NONE. - /// @see player_create() - int player_destroy( - player_h player, - ) { - return _player_destroy( - player, - ); - } - - late final _player_destroyPtr = - _lookup>('player_destroy'); - late final _player_destroy = - _player_destroyPtr.asFunction(); - - /// @brief Prepares the media player for playback. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks The mediastorage privilege(http://tizen.org/privilege/mediastorage) must be added if any video/audio files are used to play located in the internal storage. - /// @remarks The externalstorage privilege(http://tizen.org/privilege/externalstorage) must be added if any video/audio files are used to play located in the external storage. - /// @remarks The internet privilege(http://tizen.org/privilege/internet) must be added if any URLs are used to play from network. - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_URI Invalid URI - /// @retval #PLAYER_ERROR_NO_SUCH_FILE File not found - /// @retval #PLAYER_ERROR_NOT_SUPPORTED_FILE File not supported - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PLAYER_ERROR_NOT_SUPPORTED_AUDIO_CODEC Not support audio codec format (Since 4.0) - /// @retval #PLAYER_ERROR_NOT_SUPPORTED_VIDEO_CODEC Not support video codec format (Since 4.0) - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). After that, call player_set_uri() to load the media content you want to play. - /// @post The player state will be #PLAYER_STATE_READY. - /// @see player_prepare_async() - /// @see player_unprepare() - /// @see player_set_uri() - int player_prepare( - player_h player, - ) { - return _player_prepare( - player, - ); - } - - late final _player_preparePtr = - _lookup>('player_prepare'); - late final _player_prepare = - _player_preparePtr.asFunction(); - - /// @brief Prepares the media player for playback, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks The mediastorage privilege(http://tizen.org/privilege/mediastorage) must be added if any video/audio files are used to play located in the internal storage. - /// The externalstorage privilege(http://tizen.org/privilege/externalstorage) must be added if any video/audio files are used to play located in the external storage. - /// The internet privilege(http://tizen.org/privilege/internet) must be added if any URLs are used to play from network. \n - /// Since 5.0: To cancel the asynchronous preparing, call player_unprepare() even in #PLAYER_STATE_IDLE state. - /// @param[in] player The handle to the media player - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_URI Invalid URI - /// @retval #PLAYER_ERROR_NO_SUCH_FILE File not found - /// @retval #PLAYER_ERROR_NOT_SUPPORTED_FILE File not supported - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_PERMISSION_DENIED Permission denied - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). After that, call player_set_uri() to load the media content you want to play. - /// @post It invokes player_prepared_cb() when playback is prepared. - /// @see player_prepare() - /// @see player_prepared_cb() - /// @see player_unprepare() - /// @see player_set_uri() - int player_prepare_async( - player_h player, - player_prepared_cb callback, - ffi.Pointer user_data, - ) { - return _player_prepare_async( - player, - callback, - user_data, - ); - } - - late final _player_prepare_asyncPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, player_prepared_cb, - ffi.Pointer)>>('player_prepare_async'); - late final _player_prepare_async = _player_prepare_asyncPtr.asFunction< - int Function(player_h, player_prepared_cb, ffi.Pointer)>(); - - /// @brief Resets the media player. - /// @details The most recently used media is reset and no longer associated with the player. - /// Playback is no longer possible. If you want to use the player again, you must set the data URI and call - /// player_prepare() again. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre Before 5.0: The player state must be one of: #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, #PLAYER_STATE_PAUSED. \n - /// @pre Since 5.0: The player state must be one of: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, #PLAYER_STATE_PAUSED. - /// #PLAYER_STATE_IDLE is allowed only if player preparation was started with player_prepare_async(). - /// @post The player state will be #PLAYER_STATE_IDLE. - /// @see player_prepare() - int player_unprepare( - player_h player, - ) { - return _player_unprepare( - player, - ); - } - - late final _player_unpreparePtr = - _lookup>( - 'player_unprepare'); - late final _player_unprepare = - _player_unpreparePtr.asFunction(); - - /// @brief Sets the data source (file-path, HTTP or RTSP URI) to use. - /// - /// @details Associates media contents, referred to by the URI, with the player. - /// If the function call is successful, subsequent calls to player_prepare() and player_start() will start playing the media. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks If you use HTTP or RTSP, URI must start with "http://" or "rtsp://". The default protocol is "file://". - /// If you provide an invalid URI, you won't receive an error message until you call player_start(). - /// @remarks This function must be called before calling the player_prepare() or player_prepare_async() to build the player based on the URI information. - /// @remarks The mediastorage privilege(http://tizen.org/privilege/mediastorage) must be added if any video/audio files are used to play located in the internal storage. - /// @remarks The externalstorage privilege(http://tizen.org/privilege/externalstorage) must be added if any video/audio files are used to play located in the external storage. - /// @remarks The internet privilege(http://tizen.org/privilege/internet) must be added if any URLs are used to play from network. - /// - /// @param[in] player The handle to the media player - /// @param[in] uri The content location, such as the file path, the URI of the HTTP or RTSP stream you want to play - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_PERMISSION_DENIED Permission denied - /// @if WEARABLE @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature @endif - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). - /// @see player_set_memory_buffer() - int player_set_uri( - player_h player, - ffi.Pointer uri, - ) { - return _player_set_uri( - player, - uri, - ); - } - - late final _player_set_uriPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer)>>('player_set_uri'); - late final _player_set_uri = _player_set_uriPtr - .asFunction)>(); - - /// @brief Sets memory as the data source. - /// - /// @details Associates media content, cached in memory, with the player. Unlike the case of player_set_uri(), the media resides in memory. - /// If the function call is successful, subsequent calls to player_prepare() and player_start() will start playing the media. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks If you provide an invalid data, you won't receive an error message until you call player_start(). - /// @remarks This function must be called before calling the player_prepare() or player_prepare_async() - /// to build the player based on the data. - /// - /// @param[in] player The handle to the media player - /// @param[in] data The memory pointer of media data - /// @param[in] size The size of media data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). - /// @see player_set_uri() - int player_set_memory_buffer( - player_h player, - ffi.Pointer data, - int size, - ) { - return _player_set_memory_buffer( - player, - data, - size, - ); - } - - late final _player_set_memory_bufferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer, - ffi.Int)>>('player_set_memory_buffer'); - late final _player_set_memory_buffer = _player_set_memory_bufferPtr - .asFunction, int)>(); - - /// @brief Gets the player's current state. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[out] state The current state of the player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see #player_state_e - int player_get_state( - player_h player, - ffi.Pointer state, - ) { - return _player_get_state( - player, - state, - ); - } - - late final _player_get_statePtr = _lookup< - ffi - .NativeFunction)>>( - 'player_get_state'); - late final _player_get_state = _player_get_statePtr - .asFunction)>(); - - /// @brief Sets the player's volume. - /// @details Setting this volume adjusts the player's instance volume, not the system volume. - /// The valid range is from 0 to 1.0, inclusive (1.0 = 100%). Default value is 1.0. - /// To change system volume, use the @ref CAPI_MEDIA_SOUND_MANAGER_MODULE API. - /// Finally, it does not support to set other value into each channel currently. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[in] left The left volume scalar - /// @param[in] right The right volume scalar - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_get_volume() - int player_set_volume( - player_h player, - double left, - double right, - ) { - return _player_set_volume( - player, - left, - right, - ); - } - - late final _player_set_volumePtr = _lookup< - ffi.NativeFunction>( - 'player_set_volume'); - late final _player_set_volume = _player_set_volumePtr - .asFunction(); - - /// @brief Gets the player's current volume factor. - /// @details The range of @a left and @a right is from @c 0 to @c 1.0, inclusive (1.0 = 100%). - /// This function gets the player volume, not the system volume. - /// To get the system volume, use the @ref CAPI_MEDIA_SOUND_MANAGER_MODULE API. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[out] left The current left volume scalar - /// @param[out] right The current right volume scalar - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_set_volume() - int player_get_volume( - player_h player, - ffi.Pointer left, - ffi.Pointer right, - ) { - return _player_get_volume( - player, - left, - right, - ); - } - - late final _player_get_volumePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer, - ffi.Pointer)>>('player_get_volume'); - late final _player_get_volume = _player_get_volumePtr.asFunction< - int Function(player_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the player's sound manager stream information. - /// @since_tizen 3.0 - /// @remarks You can set sound stream information including audio routing and volume type. - /// For more details, please refer to sound_manager.h - /// @remarks This function must be called before calling the player_prepare() or player_prepare_async() - /// to reflect the sound stream information when the player is building. - /// @remarks This function is related to the following feature:\n - /// %http://tizen.org/feature/multimedia.player.stream_info\n - /// If this feature is not supported, the stream_type of the player is fixed to the #SOUND_STREAM_TYPE_MEDIA. - /// @param[in] player The handle to the media player - /// @param[in] stream_info The sound manager info type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create(). - /// @see #sound_stream_info_h - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - /// @par Example - /// @code - /// #include - /// #include - /// ... - /// player_h player = NULL; - /// sound_stream_info_h stream_info = NULL; - /// sound_stream_type_e stream_type = SOUND_STREAM_TYPE_MEDIA; - /// ... - /// sound_manager_create_stream_information (stream_type, _focus_callback, use_data, &stream_info); - /// player_create (&player); - /// player_set_sound_stream_info (player, stream_info); - /// ... - /// player_prepare_async (player, _prepared_cb, udata); - /// ... - /// @endcode - int player_set_sound_stream_info( - player_h player, - sound_stream_info_h stream_info, - ) { - return _player_set_sound_stream_info( - player, - stream_info, - ); - } - - late final _player_set_sound_stream_infoPtr = _lookup< - ffi.NativeFunction>( - 'player_set_sound_stream_info'); - late final _player_set_sound_stream_info = _player_set_sound_stream_infoPtr - .asFunction(); - - /// @brief Sets the audio latency mode. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks The default audio latency mode of the player is #AUDIO_LATENCY_MODE_MID. - /// To get the current audio latency mode, use player_get_audio_latency_mode(). - /// If it's high mode, audio output interval can be increased so, it can keep more audio data to play. - /// But, state transition like pause or resume can be more slower than default(mid) mode. - /// - /// @param[in] player The handle to the media player - /// @param[in] latency_mode The latency mode to be applied to the audio - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see #audio_latency_mode_e - /// @see player_get_audio_latency_mode() - int player_set_audio_latency_mode( - player_h player, - int latency_mode, - ) { - return _player_set_audio_latency_mode( - player, - latency_mode, - ); - } - - late final _player_set_audio_latency_modePtr = - _lookup>( - 'player_set_audio_latency_mode'); - late final _player_set_audio_latency_mode = _player_set_audio_latency_modePtr - .asFunction(); - - /// @brief Gets the current audio latency mode. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[out] latency_mode The latency mode to get from the audio - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see #audio_latency_mode_e - /// @see player_set_audio_latency_mode() - int player_get_audio_latency_mode( - player_h player, - ffi.Pointer latency_mode, - ) { - return _player_get_audio_latency_mode( - player, - latency_mode, - ); - } - - late final _player_get_audio_latency_modePtr = _lookup< - ffi - .NativeFunction)>>( - 'player_get_audio_latency_mode'); - late final _player_get_audio_latency_mode = _player_get_audio_latency_modePtr - .asFunction)>(); - - /// @brief Starts or resumes playback. - /// @details Plays current media content, or resumes playback if the player is paused or buffering during HTTP streaming play. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks Even if you don't set visible to true by calling player_set_display_visible(), the video will be shown on #PLAYER_STATE_PLAYING state. - /// @remarks Since 3.0: \n - /// Sound can be mixed with other sounds, if you don't control the stream focus in sound-manager module.\n - /// You can refer to @ref CAPI_MEDIA_SOUND_MANAGER_MODULE. - /// @remarks Since 5.0: \n - /// In case of HTTP streaming playback, the player could be internally paused for buffering. - /// If the application calls this function during the buffering, the playback will be resumed by force - /// and the buffering message posting by player_buffering_cb() will be stopped. - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_CONNECTION_FAILED Network connection failed - /// @retval #PLAYER_ERROR_SOUND_POLICY Sound policy error - /// @pre Before 5.0: The player state must be #PLAYER_STATE_READY or #PLAYER_STATE_PAUSED. \n - /// @pre Since 5.0: The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @post The player state will be #PLAYER_STATE_PLAYING. - /// @post It invokes player_completed_cb() when playback completes, if you set a callback with player_set_completed_cb(). - /// @see player_prepare() - /// @see player_prepare_async() - /// @see player_stop() - /// @see player_pause() - /// @see player_set_completed_cb() - /// @see player_completed_cb() - /// @see player_set_display_visible() - /// @see player_set_buffering_cb() - /// @see player_buffering_cb() - int player_start( - player_h player, - ) { - return _player_start( - player, - ); - } - - late final _player_startPtr = - _lookup>('player_start'); - late final _player_start = - _player_startPtr.asFunction(); - - /// @brief Stops playing media content. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid state - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_SOUND_POLICY Sound policy error - /// @pre The player state must be set to #PLAYER_STATE_PLAYING by calling player_start() or set to #PLAYER_STATE_PAUSED by calling player_pause(). - /// @post The player state will be #PLAYER_STATE_READY. - /// @post The downloading will be aborted if you use progressive download. - /// @see player_start() - /// @see player_pause() - int player_stop( - player_h player, - ) { - return _player_stop( - player, - ); - } - - late final _player_stopPtr = - _lookup>('player_stop'); - late final _player_stop = - _player_stopPtr.asFunction(); - - /// @brief Pauses the player. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks You can resume playback using player_start(). - /// - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid state - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_SOUND_POLICY Sound policy error - /// @pre The player state must be set to #PLAYER_STATE_PLAYING. - /// @post The player state will be #PLAYER_STATE_PAUSED. - /// @see player_start() - int player_pause( - player_h player, - ) { - return _player_pause( - player, - ); - } - - late final _player_pausePtr = - _lookup>('player_pause'); - late final _player_pause = - _player_pausePtr.asFunction(); - - /// @brief Sets the seek position for playback, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks This function will trigger the seeking operation on player instance like in the case of player_set_play_position_nsec(). - /// Normally application needs to wait for player_seek_completed_cb() before calling setting position function again. - /// Otherwise it will return #PLAYER_ERROR_SEEK_FAILED. - /// @remarks Calling player_pause() or player_start() before player_seek_completed_cb() is invoked will cause #PLAYER_ERROR_INVALID_OPERATION to be returned. - /// @remarks Please note that if application is playing external media data via player_set_media_stream_info(), - /// then consecutive calling of this function will always succeed and there is no need to wait for player_seek_completed_cb() - /// before next calling of this function.(since_tizen 3.0) - /// @remarks Even if you don't set visible to true by calling player_set_display_visible(), - /// the video will be shown when the player_seek_completed_cb() is invoked. - /// @remarks In case of non-seekable content, the function will return #PLAYER_ERROR_INVALID_OPERATION - /// and the player will keep playing without changing the play position. - /// @param[in] player The handle to the media player - /// @param[in] milliseconds The position in milliseconds from the start to the seek point - /// @param[in] accurate If @c true the selected position is returned, but this might be considerably slow, - /// if @c false the nearest key frame position is returned, this might be faster but less accurate. - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_SEEK_FAILED Seek operation failure - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @post It invokes player_seek_completed_cb() when seek operation completes, if you set a callback. - /// @see player_get_play_position() - /// @see player_set_play_position_nsec() - /// @see player_get_play_position_nsec() - int player_set_play_position( - player_h player, - int milliseconds, - bool accurate, - player_seek_completed_cb callback, - ffi.Pointer user_data, - ) { - return _player_set_play_position( - player, - milliseconds, - accurate, - callback, - user_data, - ); - } - - late final _player_set_play_positionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - player_h, - ffi.Int, - ffi.Bool, - player_seek_completed_cb, - ffi.Pointer)>>('player_set_play_position'); - late final _player_set_play_position = - _player_set_play_positionPtr.asFunction< - int Function(player_h, int, bool, player_seek_completed_cb, - ffi.Pointer)>(); - - /// @brief Sets the seek position in nanoseconds for playback, asynchronously. - /// @since_tizen 5.0 - /// @remarks This function will trigger the seeking operation on player instance like in the case of player_set_play_position(). - /// Normally application needs to wait for player_seek_completed_cb() before calling setting position function again. - /// Otherwise it will return #PLAYER_ERROR_SEEK_FAILED. - /// @remarks Calling player_pause() or player_start() before player_seek_completed_cb() is invoked will cause #PLAYER_ERROR_INVALID_OPERATION to be returned. - /// @remarks Please note that if application is playing external media data via player_set_media_stream_info(), - /// then consecutive calling of this function will always succeed and there is no need to wait for player_seek_completed_cb() - /// before next calling of this function. - /// @remarks Even if you don't set visible to true by calling player_set_display_visible(), - /// the video will be shown when the player_seek_completed_cb() is invoked. - /// @remarks In case of non-seekable content, the function will return #PLAYER_ERROR_INVALID_OPERATION - /// and the player will keep playing without changing the play position. - /// @param[in] player The handle to the media player - /// @param[in] nanoseconds The position in nanoseconds from the start to the seek point - /// @param[in] accurate If @c true the selected position is returned, but this might be considerably slow, - /// if @c false the nearest key frame position is returned, this might be faster but less accurate. - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_SEEK_FAILED Seek operation failure - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @post It invokes player_seek_completed_cb() when seek operation completes, if you set a callback. - /// @see player_set_play_position() - /// @see player_get_play_position() - /// @see player_get_play_position_nsec() - int player_set_play_position_nsec( - player_h player, - int nanoseconds, - bool accurate, - player_seek_completed_cb callback, - ffi.Pointer user_data, - ) { - return _player_set_play_position_nsec( - player, - nanoseconds, - accurate, - callback, - user_data, - ); - } - - late final _player_set_play_position_nsecPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - player_h, - ffi.Int64, - ffi.Bool, - player_seek_completed_cb, - ffi.Pointer)>>('player_set_play_position_nsec'); - late final _player_set_play_position_nsec = - _player_set_play_position_nsecPtr.asFunction< - int Function(player_h, int, bool, player_seek_completed_cb, - ffi.Pointer)>(); - - /// @brief Gets the current position in milliseconds. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[out] milliseconds The current position in milliseconds - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_SEEK_FAILED Seek operation failure - /// @see player_set_play_position() - /// @see player_set_play_position_nsec() - /// @see player_get_play_position_nsec() - int player_get_play_position( - player_h player, - ffi.Pointer milliseconds, - ) { - return _player_get_play_position( - player, - milliseconds, - ); - } - - late final _player_get_play_positionPtr = _lookup< - ffi.NativeFunction)>>( - 'player_get_play_position'); - late final _player_get_play_position = _player_get_play_positionPtr - .asFunction)>(); - - /// @brief Gets the current position in nanoseconds. - /// @since_tizen 5.0 - /// @param[in] player The handle to the media player - /// @param[out] nanoseconds The current position in nanoseconds - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_SEEK_FAILED Seek operation failure - /// @see player_set_play_position() - /// @see player_get_play_position() - /// @see player_set_play_position_nsec() - int player_get_play_position_nsec( - player_h player, - ffi.Pointer nanoseconds, - ) { - return _player_get_play_position_nsec( - player, - nanoseconds, - ); - } - - late final _player_get_play_position_nsecPtr = _lookup< - ffi - .NativeFunction)>>( - 'player_get_play_position_nsec'); - late final _player_get_play_position_nsec = _player_get_play_position_nsecPtr - .asFunction)>(); - - /// @brief Sets the player's mute status. - /// @details If the mute status is @c true, no sounds are played. - /// If it is @c false, sounds are played at the previously set volume level. - /// Until this function is called, by default the player is not muted. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[in] muted The new mute status: (@c true = mute, @c false = not muted) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_is_muted() - int player_set_mute( - player_h player, - bool muted, - ) { - return _player_set_mute( - player, - muted, - ); - } - - late final _player_set_mutePtr = - _lookup>( - 'player_set_mute'); - late final _player_set_mute = - _player_set_mutePtr.asFunction(); - - /// @brief Gets the player's mute status. - /// @details If the mute status is @c true, no sounds are played. - /// If it is @c false, sounds are played at the previously set volume level. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[out] muted The current mute status: (@c true = mute, @c false = not muted) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_set_mute() - int player_is_muted( - player_h player, - ffi.Pointer muted, - ) { - return _player_is_muted( - player, - muted, - ); - } - - late final _player_is_mutedPtr = _lookup< - ffi - .NativeFunction)>>( - 'player_is_muted'); - late final _player_is_muted = _player_is_mutedPtr - .asFunction)>(); - - /// @brief Sets the player's looping status. - /// @details If the looping status is @c true, playback automatically restarts upon finishing. - /// If it is @c false, it won't. The default value is @c false. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[in] looping The new looping status: (@c true = looping, @c false = non-looping ) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_is_looping() - int player_set_looping( - player_h player, - bool looping, - ) { - return _player_set_looping( - player, - looping, - ); - } - - late final _player_set_loopingPtr = - _lookup>( - 'player_set_looping'); - late final _player_set_looping = - _player_set_loopingPtr.asFunction(); - - /// @brief Gets the player's looping status. - /// @details If the looping status is @c true, playback automatically restarts upon finishing. - /// If it is @c false, it won't. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[out] looping The looping status: (@c true = looping, @c false = non-looping ) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_set_looping() - int player_is_looping( - player_h player, - ffi.Pointer looping, - ) { - return _player_is_looping( - player, - looping, - ); - } - - late final _player_is_loopingPtr = _lookup< - ffi - .NativeFunction)>>( - 'player_is_looping'); - late final _player_is_looping = _player_is_loopingPtr - .asFunction)>(); - - /// @brief Sets the video display. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks To get @a display to set, use #GET_DISPLAY(). - /// @remarks We are not supporting changing display. - /// @remarks This function must be called before calling the player_prepare() or player_prepare_async() \n - /// to reflect the display type. - /// @remarks This function must be called in main thread of application. - /// Otherwise, it will return #PLAYER_ERROR_INVALID_OPERATION by internal restriction. - /// To avoid #PLAYER_ERROR_INVALID_OPERATION in sub thread, ecore_thread_main_loop_begin() and - /// ecore_thread_main_loop_end() can be used, but deadlock can be also occurred if main thread is busy. - /// So, it's not recommended to use them. (since 5.0) - /// @param[in] player The handle to the media player - /// @param[in] type The display type - /// @param[in] display The handle to display - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). - /// @see #player_display_type_e - /// @see player_set_display_mode() - /// @see player_set_display_roi_area() - /// @see player_set_display_visible() - /// @see player_set_display_rotation() - /// @see ecore_thread_main_loop_begin() - /// @see ecore_thread_main_loop_end() - int player_set_display( - player_h player, - int type, - player_display_h display, - ) { - return _player_set_display( - player, - type, - display, - ); - } - - late final _player_set_displayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - player_h, ffi.Int32, player_display_h)>>('player_set_display'); - late final _player_set_display = _player_set_displayPtr - .asFunction(); - - /// @brief Sets a media packet video callback function to be called once per frame. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks This function must be called before calling player_prepare() or player_prepare_async().\n - /// A registered callback is called in a separate thread (not in the main loop).\n - /// A video frame can be retrieved using a registered callback as a media packet.\n - /// The callback function holds the same buffer that will be drawn on the display device.\n - /// So if you change the media packet in a registered callback, it will be displayed on the device\n - /// and the media packet is available until it's destroyed by media_packet_destroy().\n - /// The packet have to be destroyed as quickly as possible after rendering the packet\n - /// and all the packets have to be destroyed before player_unprepare() is called.\n - /// @param[in] player The handle to the media player - /// @param[in] callback The callback function to be registered - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid state - /// @pre The player's state must be #PLAYER_STATE_IDLE. And, #PLAYER_DISPLAY_TYPE_NONE must be set by calling player_set_display(). - /// @see player_unset_media_packet_video_frame_decoded_cb() - int player_set_media_packet_video_frame_decoded_cb( - player_h player, - player_media_packet_video_decoded_cb callback, - ffi.Pointer user_data, - ) { - return _player_set_media_packet_video_frame_decoded_cb( - player, - callback, - user_data, - ); - } - - late final _player_set_media_packet_video_frame_decoded_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, player_media_packet_video_decoded_cb, - ffi.Pointer)>>( - 'player_set_media_packet_video_frame_decoded_cb'); - late final _player_set_media_packet_video_frame_decoded_cb = - _player_set_media_packet_video_frame_decoded_cbPtr.asFunction< - int Function(player_h, player_media_packet_video_decoded_cb, - ffi.Pointer)>(); - - /// @brief Unsets the media packet video frame callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The player's state must be #PLAYER_STATE_READY or #PLAYER_STATE_IDLE - /// @see player_set_media_packet_video_frame_decoded_cb() - int player_unset_media_packet_video_frame_decoded_cb( - player_h player, - ) { - return _player_unset_media_packet_video_frame_decoded_cb( - player, - ); - } - - late final _player_unset_media_packet_video_frame_decoded_cbPtr = - _lookup>( - 'player_unset_media_packet_video_frame_decoded_cb'); - late final _player_unset_media_packet_video_frame_decoded_cb = - _player_unset_media_packet_video_frame_decoded_cbPtr - .asFunction(); - - /// @brief Pushes elementary stream to decode audio or video. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @remarks player_set_media_stream_info() must be called before using this function. - /// @remarks The available buffer size can be set by calling player_set_media_stream_buffer_max_size(). - /// If there is no available buffer space, this function will return error since 3.0. - /// @param[in] player The handle to media player - /// @param[in] packet The media packet to decode - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid state - /// @retval #PLAYER_ERROR_NOT_SUPPORTED_FILE File not supported - /// @retval #PLAYER_ERROR_BUFFER_SPACE No buffer space available (since 3.0) - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation (since 3.0) - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED. - /// @see player_set_media_stream_info() - /// @see player_set_media_stream_buffer_max_size() - int player_push_media_stream( - player_h player, - media_packet_h packet, - ) { - return _player_push_media_stream( - player, - packet, - ); - } - - late final _player_push_media_streamPtr = - _lookup>( - 'player_push_media_stream'); - late final _player_push_media_stream = _player_push_media_streamPtr - .asFunction(); - - /// @brief Sets contents information for media stream. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @remarks AV format must be set before pushing elementary stream with player_push_media_stream(). - /// @remarks This function must be called before calling the player_prepare() or player_prepare_async() - /// to reflect the media information. - /// @remarks AAC can be supported. - /// @remarks H.264 can be supported. - /// @param[in] player The handle to media player - /// @param[in] type The type of target stream - /// @param[in] format The media format to set audio information - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid state - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). - /// @see player_push_media_stream() - int player_set_media_stream_info( - player_h player, - int type, - media_format_h format, - ) { - return _player_set_media_stream_info( - player, - type, - format, - ); - } - - late final _player_set_media_stream_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Int32, - media_format_h)>>('player_set_media_stream_info'); - late final _player_set_media_stream_info = _player_set_media_stream_infoPtr - .asFunction(); - - /// @brief Sets a callback function to be invoked when buffer underrun or overflow is occurred. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @remarks This function is used for media stream playback only. - /// @remarks The callback is called in a separate thread (not in the main loop). - /// @param[in] player The handle to the media player - /// @param[in] type The type of target stream - /// @param[in] callback The buffer status callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). - /// @post player_media_stream_buffer_status_cb() will be invoked. - /// @see player_unset_media_stream_buffer_status_cb() - /// @see player_media_stream_buffer_status_cb() - int player_set_media_stream_buffer_status_cb( - player_h player, - int type, - player_media_stream_buffer_status_cb callback, - ffi.Pointer user_data, - ) { - return _player_set_media_stream_buffer_status_cb( - player, - type, - callback, - user_data, - ); - } - - late final _player_set_media_stream_buffer_status_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - player_h, - ffi.Int32, - player_media_stream_buffer_status_cb, - ffi.Pointer)>>( - 'player_set_media_stream_buffer_status_cb'); - late final _player_set_media_stream_buffer_status_cb = - _player_set_media_stream_buffer_status_cbPtr.asFunction< - int Function(player_h, int, player_media_stream_buffer_status_cb, - ffi.Pointer)>(); - - /// @brief Unsets the buffer status callback function. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @remarks This function is used for media stream playback only. - /// @param[in] player The handle to the media player - /// @param[in] type The type of target stream - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see player_set_media_stream_buffer_status_cb() - int player_unset_media_stream_buffer_status_cb( - player_h player, - int type, - ) { - return _player_unset_media_stream_buffer_status_cb( - player, - type, - ); - } - - late final _player_unset_media_stream_buffer_status_cbPtr = - _lookup>( - 'player_unset_media_stream_buffer_status_cb'); - late final _player_unset_media_stream_buffer_status_cb = - _player_unset_media_stream_buffer_status_cbPtr - .asFunction(); - - /// @brief Sets a callback function to be invoked when seeking is occurred. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @remarks This function is used for media stream playback only. - /// @remarks The callback is called in a separate thread (not in the main loop). - /// @param[in] player The handle to the media player - /// @param[in] type The type of target stream - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). - /// @post player_media_stream_seek_cb() will be invoked. - /// @see player_unset_media_stream_seek_cb() - /// @see player_media_stream_seek_cb() - int player_set_media_stream_seek_cb( - player_h player, - int type, - player_media_stream_seek_cb callback, - ffi.Pointer user_data, - ) { - return _player_set_media_stream_seek_cb( - player, - type, - callback, - user_data, - ); - } - - late final _player_set_media_stream_seek_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Int32, player_media_stream_seek_cb, - ffi.Pointer)>>('player_set_media_stream_seek_cb'); - late final _player_set_media_stream_seek_cb = - _player_set_media_stream_seek_cbPtr.asFunction< - int Function(player_h, int, player_media_stream_seek_cb, - ffi.Pointer)>(); - - /// @brief Unsets the seek callback function. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @param[in] player The handle to the media player - /// @param[in] type The type of target stream - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see player_set_media_stream_seek_cb() - int player_unset_media_stream_seek_cb( - player_h player, - int type, - ) { - return _player_unset_media_stream_seek_cb( - player, - type, - ); - } - - late final _player_unset_media_stream_seek_cbPtr = - _lookup>( - 'player_unset_media_stream_seek_cb'); - late final _player_unset_media_stream_seek_cb = - _player_unset_media_stream_seek_cbPtr - .asFunction(); - - /// @brief Sets the max size bytes of buffer. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @remarks This function is used for media stream playback only. - /// @remarks If the buffer level over the max size, player_media_stream_buffer_status_cb() will be invoked with overflow status. - /// @param[in] player The handle to the media player - /// @param[in] type The type of target stream - /// @param[in] max_size The max bytes of buffer, it has to be bigger than zero. (default: 200000) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see player_get_media_stream_buffer_max_size() - /// @see player_media_stream_buffer_status_cb() - int player_set_media_stream_buffer_max_size( - player_h player, - int type, - int max_size, - ) { - return _player_set_media_stream_buffer_max_size( - player, - type, - max_size, - ); - } - - late final _player_set_media_stream_buffer_max_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Int32, ffi.UnsignedLongLong)>>( - 'player_set_media_stream_buffer_max_size'); - late final _player_set_media_stream_buffer_max_size = - _player_set_media_stream_buffer_max_sizePtr - .asFunction(); - - /// @brief Gets the max size bytes of buffer. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @remarks This function is used for media stream playback only. - /// @remarks If the buffer level over the max size, player_media_stream_buffer_status_cb() will be invoked with overflow status. - /// @param[in] player The handle to the media player - /// @param[in] type The type of target stream - /// @param[out] max_size The max bytes of buffer - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see player_set_media_stream_buffer_max_size() - /// @see player_media_stream_buffer_status_cb() - int player_get_media_stream_buffer_max_size( - player_h player, - int type, - ffi.Pointer max_size, - ) { - return _player_get_media_stream_buffer_max_size( - player, - type, - max_size, - ); - } - - late final _player_get_media_stream_buffer_max_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - player_h, ffi.Int32, ffi.Pointer)>>( - 'player_get_media_stream_buffer_max_size'); - late final _player_get_media_stream_buffer_max_size = - _player_get_media_stream_buffer_max_sizePtr.asFunction< - int Function(player_h, int, ffi.Pointer)>(); - - /// @brief Sets the buffer threshold percent of buffer. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @remarks This function is used for media stream playback only. - /// @remarks If the buffer level drops below the percent value, player_media_stream_buffer_status_cb() will be invoked with underrun status. - /// @param[in] player The handle to the media player - /// @param[in] type The type of target stream - /// @param[in] percent The minimum threshold(0~100) of buffer (default: 0) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see player_get_media_stream_buffer_min_threshold() - /// @see player_media_stream_buffer_status_cb() - int player_set_media_stream_buffer_min_threshold( - player_h player, - int type, - int percent, - ) { - return _player_set_media_stream_buffer_min_threshold( - player, - type, - percent, - ); - } - - late final _player_set_media_stream_buffer_min_thresholdPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Int32, ffi.UnsignedInt)>>( - 'player_set_media_stream_buffer_min_threshold'); - late final _player_set_media_stream_buffer_min_threshold = - _player_set_media_stream_buffer_min_thresholdPtr - .asFunction(); - - /// @brief Gets the buffer threshold percent of buffer. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @remarks This function is used for media stream playback only. - /// @remarks If the buffer level drops below the percent value, player_media_stream_buffer_status_cb() will be invoked with underrun status. - /// @param[in] player The handle to the media player - /// @param[in] type The type of target stream - /// @param[out] percent The minimum threshold(0~100) of buffer - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see player_set_media_stream_buffer_min_threshold() - /// @see player_media_stream_buffer_status_cb() - int player_get_media_stream_buffer_min_threshold( - player_h player, - int type, - ffi.Pointer percent, - ) { - return _player_get_media_stream_buffer_min_threshold( - player, - type, - percent, - ); - } - - late final _player_get_media_stream_buffer_min_thresholdPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - player_h, ffi.Int32, ffi.Pointer)>>( - 'player_get_media_stream_buffer_min_threshold'); - late final _player_get_media_stream_buffer_min_threshold = - _player_get_media_stream_buffer_min_thresholdPtr.asFunction< - int Function(player_h, int, ffi.Pointer)>(); - - /// @brief Sets the video display mode. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks If no display is set, no operation is performed. - /// @param[in] player The handle to the media player - /// @param[in] mode The display mode - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see #player_display_mode_e - /// @see player_set_display() - /// @see player_get_display_mode() - int player_set_display_mode( - player_h player, - int mode, - ) { - return _player_set_display_mode( - player, - mode, - ); - } - - late final _player_set_display_modePtr = - _lookup>( - 'player_set_display_mode'); - late final _player_set_display_mode = - _player_set_display_modePtr.asFunction(); - - /// @brief Gets the video display mode. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks If no display is set, no operation is performed. - /// @param[in] player The handle to the media player - /// @param[out] mode The current display mode - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see #player_display_mode_e - /// @see player_set_display_mode() - int player_get_display_mode( - player_h player, - ffi.Pointer mode, - ) { - return _player_get_display_mode( - player, - mode, - ); - } - - late final _player_get_display_modePtr = _lookup< - ffi - .NativeFunction)>>( - 'player_get_display_mode'); - late final _player_get_display_mode = _player_get_display_modePtr - .asFunction)>(); - - /// @brief Sets the ROI (Region Of Interest) area of display. - /// @since_tizen 3.0 - /// @remarks If no display is set, no operation is performed and - /// the ROI area is valid only in #PLAYER_DISPLAY_MODE_DST_ROI display mode. - /// @remarks The minimum value of width and height are 1. - /// @remarks ROI area can be set before setting ROI display mode. (since 4.0) - /// @param[in] player The handle to the media player - /// @param[in] x X coordinate of area - /// @param[in] y Y coordinate of area - /// @param[in] width Width of area - /// @param[in] height Height of area - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_set_display() - /// @see player_set_display_mode() - int player_set_display_roi_area( - player_h player, - int x, - int y, - int width, - int height, - ) { - return _player_set_display_roi_area( - player, - x, - y, - width, - height, - ); - } - - late final _player_set_display_roi_areaPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Int, ffi.Int, ffi.Int, - ffi.Int)>>('player_set_display_roi_area'); - late final _player_set_display_roi_area = _player_set_display_roi_areaPtr - .asFunction(); - - /// @brief Sets the visibility of the video display. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks If no display is set, no operation is performed. - /// @remarks If you set visible before calling player_set_display(), it will be applied on #PLAYER_STATE_READY state. - /// @param[in] player The handle to the media player - /// @param[in] visible The visibility of the display (@c true = visible, @c false = non-visible ) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_set_display() - /// @see player_is_display_visible() - int player_set_display_visible( - player_h player, - bool visible, - ) { - return _player_set_display_visible( - player, - visible, - ); - } - - late final _player_set_display_visiblePtr = - _lookup>( - 'player_set_display_visible'); - late final _player_set_display_visible = - _player_set_display_visiblePtr.asFunction(); - - /// @brief Gets the visibility of the video display. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[out] visible The current visibility of the display (@c true = visible, @c false = non-visible ) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_set_display_visible() - int player_is_display_visible( - player_h player, - ffi.Pointer visible, - ) { - return _player_is_display_visible( - player, - visible, - ); - } - - late final _player_is_display_visiblePtr = _lookup< - ffi - .NativeFunction)>>( - 'player_is_display_visible'); - late final _player_is_display_visible = _player_is_display_visiblePtr - .asFunction)>(); - - /// @brief Sets the rotation settings of the video surface display. - /// @details Use this function to change the video orientation to portrait mode. - /// The video out will be rotated in a counterclockwise direction. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks If no display is set, no operation is performed. - /// @param[in] player The handle to the media player - /// @param[in] rotation The rotation of the display - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see #player_display_rotation_e - /// @see player_set_display() - /// @see player_get_display_rotation() - int player_set_display_rotation( - player_h player, - int rotation, - ) { - return _player_set_display_rotation( - player, - rotation, - ); - } - - late final _player_set_display_rotationPtr = - _lookup>( - 'player_set_display_rotation'); - late final _player_set_display_rotation = - _player_set_display_rotationPtr.asFunction(); - - /// @brief Gets the rotation of the video surface display. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[out] rotation The current rotation of the display - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see #player_display_rotation_e - /// @see player_set_display_rotation() - int player_get_display_rotation( - player_h player, - ffi.Pointer rotation, - ) { - return _player_get_display_rotation( - player, - rotation, - ); - } - - late final _player_get_display_rotationPtr = _lookup< - ffi - .NativeFunction)>>( - 'player_get_display_rotation'); - late final _player_get_display_rotation = _player_get_display_rotationPtr - .asFunction)>(); - - /// @brief Gets the media content information. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks You must release @a value using @c free(). - /// @remarks The playback type should be local playback or HTTP streaming playback. - /// @param[in] player The handle to the media player - /// @param[in] key The key attribute name to get - /// @param[out] value The value of the key attribute \n - /// It can be an empty string if there is no content information. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_OUT_OF_MEMORY Not enough memory is available - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED. - int player_get_content_info( - player_h player, - int key, - ffi.Pointer> value, - ) { - return _player_get_content_info( - player, - key, - value, - ); - } - - late final _player_get_content_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Int32, - ffi.Pointer>)>>('player_get_content_info'); - late final _player_get_content_info = _player_get_content_infoPtr.asFunction< - int Function(player_h, int, ffi.Pointer>)>(); - - /// @brief Gets the audio and video codec information. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks You must release @a audio_codec and @a video_codec using free(). - /// @remarks The playback type should be local playback or HTTP streaming playback. - /// @param[in] player The handle to the media player - /// @param[out] audio_codec The name of the audio codec \n - /// It can be @c NULL if there is no audio codec. - /// @param[out] video_codec The name of the video codec \n - /// It can be @c NULL if there is no video codec. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED. - int player_get_codec_info( - player_h player, - ffi.Pointer> audio_codec, - ffi.Pointer> video_codec, - ) { - return _player_get_codec_info( - player, - audio_codec, - video_codec, - ); - } - - late final _player_get_codec_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer>, - ffi.Pointer>)>>('player_get_codec_info'); - late final _player_get_codec_info = _player_get_codec_infoPtr.asFunction< - int Function(player_h, ffi.Pointer>, - ffi.Pointer>)>(); - - /// @brief Gets the audio stream information. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks The playback type should be local playback or HTTP streaming playback. - /// @param[in] player The handle to the media player - /// @param[out] sample_rate The audio sample rate [Hz] \n - /// Value can be invalid if there is no audio stream information. - /// @param[out] channel The audio channel (1: mono, 2: stereo) \n - /// Value can be invalid if there is no audio stream information. - /// @param[out] bit_rate The audio bit rate [Hz] \n - /// Value can be invalid if there is no audio stream information. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED. - int player_get_audio_stream_info( - player_h player, - ffi.Pointer sample_rate, - ffi.Pointer channel, - ffi.Pointer bit_rate, - ) { - return _player_get_audio_stream_info( - player, - sample_rate, - channel, - bit_rate, - ); - } - - late final _player_get_audio_stream_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('player_get_audio_stream_info'); - late final _player_get_audio_stream_info = - _player_get_audio_stream_infoPtr.asFunction< - int Function(player_h, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the video stream information. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks The playback type should be local playback or HTTP streaming playback. - /// @param[in] player The handle to the media player - /// @param[out] fps The frame per second of the video \n - /// It can be @c 0 if there is no video stream information. - /// @param[out] bit_rate The video bit rate [Hz] \n - /// It can be an invalid value if there is no video stream information. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED. - int player_get_video_stream_info( - player_h player, - ffi.Pointer fps, - ffi.Pointer bit_rate, - ) { - return _player_get_video_stream_info( - player, - fps, - bit_rate, - ); - } - - late final _player_get_video_stream_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer, - ffi.Pointer)>>('player_get_video_stream_info'); - late final _player_get_video_stream_info = - _player_get_video_stream_infoPtr.asFunction< - int Function(player_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the video display's height and width. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks The playback type should be local playback or HTTP streaming playback. - /// @param[in] player The handle to the media player - /// @param[out] width The width of the video \n - /// Value can be invalid if there is no video or no display is set. - /// @param[out] height The height of the video \n - /// Value can be invalid value if there is no video or no display is set. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED. - int player_get_video_size( - player_h player, - ffi.Pointer width, - ffi.Pointer height, - ) { - return _player_get_video_size( - player, - width, - height, - ); - } - - late final _player_get_video_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer, - ffi.Pointer)>>('player_get_video_size'); - late final _player_get_video_size = _player_get_video_sizePtr.asFunction< - int Function(player_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the album art in the media resource. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks You must not release @a album_art. - /// The @a album_art is managed by the platform and will be released - /// when the player is unprepared or destroyed by calling player_unprepare() or player_destroy(). - /// @param[in] player The handle to the media player - /// @param[out] album_art The encoded artwork image - /// @param[out] size The encoded artwork size - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED. - int player_get_album_art( - player_h player, - ffi.Pointer> album_art, - ffi.Pointer size, - ) { - return _player_get_album_art( - player, - album_art, - size, - ); - } - - late final _player_get_album_artPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer>, - ffi.Pointer)>>('player_get_album_art'); - late final _player_get_album_art = _player_get_album_artPtr.asFunction< - int Function(player_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Gets the total running time of the associated media. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks The media source is associated with the player, using either player_set_uri() or player_set_memory_buffer(). - /// @remarks The playback type should be local playback or HTTP streaming playback. - /// @param[in] player The handle to the media player - /// @param[out] milliseconds The duration in milliseconds - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED. - /// @see player_set_uri() - /// @see player_set_memory_buffer() - /// @see player_get_duration_nsec() - int player_get_duration( - player_h player, - ffi.Pointer milliseconds, - ) { - return _player_get_duration( - player, - milliseconds, - ); - } - - late final _player_get_durationPtr = _lookup< - ffi.NativeFunction)>>( - 'player_get_duration'); - late final _player_get_duration = _player_get_durationPtr - .asFunction)>(); - - /// @brief Gets the total running time in nanoseconds of the associated media. - /// @since_tizen 5.0 - /// @param[in] player The handle to the media player - /// @param[out] nanoseconds The duration time in nanoseconds - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED. - /// @see player_set_uri() - /// @see player_set_memory_buffer() - /// @see player_get_duration() - int player_get_duration_nsec( - player_h player, - ffi.Pointer nanoseconds, - ) { - return _player_get_duration_nsec( - player, - nanoseconds, - ); - } - - late final _player_get_duration_nsecPtr = _lookup< - ffi - .NativeFunction)>>( - 'player_get_duration_nsec'); - late final _player_get_duration_nsec = _player_get_duration_nsecPtr - .asFunction)>(); - - /// @brief Gets the number of equalizer bands. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[out] count The number of equalizer bands - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see player_audio_effect_equalizer_is_available() - /// @see player_audio_effect_set_equalizer_band_level() - /// @see player_audio_effect_set_equalizer_all_bands() - int player_audio_effect_get_equalizer_bands_count( - player_h player, - ffi.Pointer count, - ) { - return _player_audio_effect_get_equalizer_bands_count( - player, - count, - ); - } - - late final _player_audio_effect_get_equalizer_bands_countPtr = _lookup< - ffi.NativeFunction)>>( - 'player_audio_effect_get_equalizer_bands_count'); - late final _player_audio_effect_get_equalizer_bands_count = - _player_audio_effect_get_equalizer_bands_countPtr - .asFunction)>(); - - /// @brief Sets the gain set for the given equalizer band. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[in] index The index of the equalizer band to be set - /// @param[in] level The new gain in decibel that is set to the given band [dB] - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_audio_effect_equalizer_is_available() - /// @see player_audio_effect_get_equalizer_bands_count() - /// @see player_audio_effect_get_equalizer_level_range() - /// @see player_audio_effect_get_equalizer_band_level() - /// @see player_audio_effect_set_equalizer_all_bands() - int player_audio_effect_set_equalizer_band_level( - player_h player, - int index, - int level, - ) { - return _player_audio_effect_set_equalizer_band_level( - player, - index, - level, - ); - } - - late final _player_audio_effect_set_equalizer_band_levelPtr = - _lookup>( - 'player_audio_effect_set_equalizer_band_level'); - late final _player_audio_effect_set_equalizer_band_level = - _player_audio_effect_set_equalizer_band_levelPtr - .asFunction(); - - /// @brief Gets the gain set for the given equalizer band. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[in] index The index of the requested equalizer band - /// @param[out] level The gain in decibel of the given band [dB] - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see player_audio_effect_equalizer_is_available() - /// @see player_audio_effect_set_equalizer_band_level() - int player_audio_effect_get_equalizer_band_level( - player_h player, - int index, - ffi.Pointer level, - ) { - return _player_audio_effect_get_equalizer_band_level( - player, - index, - level, - ); - } - - late final _player_audio_effect_get_equalizer_band_levelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Int, ffi.Pointer)>>( - 'player_audio_effect_get_equalizer_band_level'); - late final _player_audio_effect_get_equalizer_band_level = - _player_audio_effect_get_equalizer_band_levelPtr - .asFunction)>(); - - /// @brief Sets all bands of the equalizer. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[in] band_levels The list of band levels to be set - /// @param[in] length The length of the band level - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_audio_effect_equalizer_is_available() - /// @see player_audio_effect_get_equalizer_bands_count() - /// @see player_audio_effect_get_equalizer_level_range() - /// @see player_audio_effect_set_equalizer_band_level() - int player_audio_effect_set_equalizer_all_bands( - player_h player, - ffi.Pointer band_levels, - int length, - ) { - return _player_audio_effect_set_equalizer_all_bands( - player, - band_levels, - length, - ); - } - - late final _player_audio_effect_set_equalizer_all_bandsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer, - ffi.Int)>>('player_audio_effect_set_equalizer_all_bands'); - late final _player_audio_effect_set_equalizer_all_bands = - _player_audio_effect_set_equalizer_all_bandsPtr - .asFunction, int)>(); - - /// @brief Gets the valid band level range of the equalizer. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[out] min The minimum value to be set [dB] - /// @param[out] max The maximum value to be set [dB] - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_audio_effect_equalizer_is_available() - /// @see player_audio_effect_set_equalizer_band_level() - /// @see player_audio_effect_set_equalizer_all_bands() - int player_audio_effect_get_equalizer_level_range( - player_h player, - ffi.Pointer min, - ffi.Pointer max, - ) { - return _player_audio_effect_get_equalizer_level_range( - player, - min, - max, - ); - } - - late final _player_audio_effect_get_equalizer_level_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - player_h, ffi.Pointer, ffi.Pointer)>>( - 'player_audio_effect_get_equalizer_level_range'); - late final _player_audio_effect_get_equalizer_level_range = - _player_audio_effect_get_equalizer_level_rangePtr.asFunction< - int Function(player_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the band frequency of the equalizer. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[in] index The index of the requested equalizer band - /// @param[out] frequency The frequency of the given band [dB] - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see player_audio_effect_equalizer_is_available() - int player_audio_effect_get_equalizer_band_frequency( - player_h player, - int index, - ffi.Pointer frequency, - ) { - return _player_audio_effect_get_equalizer_band_frequency( - player, - index, - frequency, - ); - } - - late final _player_audio_effect_get_equalizer_band_frequencyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Int, ffi.Pointer)>>( - 'player_audio_effect_get_equalizer_band_frequency'); - late final _player_audio_effect_get_equalizer_band_frequency = - _player_audio_effect_get_equalizer_band_frequencyPtr - .asFunction)>(); - - /// @brief Gets the band frequency range of the equalizer. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[in] index The index of the requested equalizer band - /// @param[out] range The frequency range of the given band [dB] - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see player_audio_effect_equalizer_is_available() - int player_audio_effect_get_equalizer_band_frequency_range( - player_h player, - int index, - ffi.Pointer range, - ) { - return _player_audio_effect_get_equalizer_band_frequency_range( - player, - index, - range, - ); - } - - late final _player_audio_effect_get_equalizer_band_frequency_rangePtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Int, ffi.Pointer)>>( - 'player_audio_effect_get_equalizer_band_frequency_range'); - late final _player_audio_effect_get_equalizer_band_frequency_range = - _player_audio_effect_get_equalizer_band_frequency_rangePtr - .asFunction)>(); - - /// @brief Clears the equalizer effect. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_audio_effect_equalizer_is_available() - /// @see player_audio_effect_set_equalizer_band_level() - /// @see player_audio_effect_set_equalizer_all_bands() - int player_audio_effect_equalizer_clear( - player_h player, - ) { - return _player_audio_effect_equalizer_clear( - player, - ); - } - - late final _player_audio_effect_equalizer_clearPtr = - _lookup>( - 'player_audio_effect_equalizer_clear'); - late final _player_audio_effect_equalizer_clear = - _player_audio_effect_equalizer_clearPtr - .asFunction(); - - /// @brief Checks whether the custom equalizer effect is available. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[out] available If @c true the specified audio effect is available, - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see player_audio_effect_set_equalizer_band_level() - /// @see player_audio_effect_set_equalizer_all_bands() - int player_audio_effect_equalizer_is_available( - player_h player, - ffi.Pointer available, - ) { - return _player_audio_effect_equalizer_is_available( - player, - available, - ); - } - - late final _player_audio_effect_equalizer_is_availablePtr = _lookup< - ffi - .NativeFunction)>>( - 'player_audio_effect_equalizer_is_available'); - late final _player_audio_effect_equalizer_is_available = - _player_audio_effect_equalizer_is_availablePtr - .asFunction)>(); - - /// @brief Captures the video frame, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be set to #PLAYER_STATE_PLAYING by calling player_start() or set to #PLAYER_STATE_PAUSED by calling player_pause(). - /// @pre Video display type should be set by calling player_set_display() otherwise, audio stream is only processed even though video file is set. - /// @post It invokes player_video_captured_cb() when capture completes, if you set a callback. - /// @see player_video_captured_cb() - int player_capture_video( - player_h player, - player_video_captured_cb callback, - ffi.Pointer user_data, - ) { - return _player_capture_video( - player, - callback, - user_data, - ); - } - - late final _player_capture_videoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, player_video_captured_cb, - ffi.Pointer)>>('player_capture_video'); - late final _player_capture_video = _player_capture_videoPtr.asFunction< - int Function( - player_h, player_video_captured_cb, ffi.Pointer)>(); - - /// @brief Sets the cookie for streaming playback. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks This function must be called before calling the player_prepare() or player_prepare_async() - /// to reflect the cookie information when the streaming connection is set up. - /// @param[in] player The handle to the media player - /// @param[in] cookie The cookie to set - /// @param[in] size The size of the cookie - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). - /// @see player_set_uri() - /// @see player_set_streaming_user_agent() - int player_set_streaming_cookie( - player_h player, - ffi.Pointer cookie, - int size, - ) { - return _player_set_streaming_cookie( - player, - cookie, - size, - ); - } - - late final _player_set_streaming_cookiePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer, - ffi.Int)>>('player_set_streaming_cookie'); - late final _player_set_streaming_cookie = _player_set_streaming_cookiePtr - .asFunction, int)>(); - - /// @brief Sets the streaming user agent for playback. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks This function must be called before calling the player_prepare() or player_prepare_async() - /// to reflect the user agent information when the streaming connection is set up. - /// @param[in] player The handle to the media player - /// @param[in] user_agent The user agent to set - /// @param[in] size The size of the user agent - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). - /// @see player_set_uri() - /// @see player_set_streaming_cookie() - int player_set_streaming_user_agent( - player_h player, - ffi.Pointer user_agent, - int size, - ) { - return _player_set_streaming_user_agent( - player, - user_agent, - size, - ); - } - - late final _player_set_streaming_user_agentPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer, - ffi.Int)>>('player_set_streaming_user_agent'); - late final _player_set_streaming_user_agent = - _player_set_streaming_user_agentPtr - .asFunction, int)>(); - - /// @brief Gets the download progress for streaming playback. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[out] start The starting position in percentage [0, 100] - /// @param[out] current The current position in percentage [0, 100] - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be set to #PLAYER_STATE_PLAYING by calling player_start() or set to #PLAYER_STATE_PAUSED by calling player_pause(). - int player_get_streaming_download_progress( - player_h player, - ffi.Pointer start, - ffi.Pointer current, - ) { - return _player_get_streaming_download_progress( - player, - start, - current, - ); - } - - late final _player_get_streaming_download_progressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer, - ffi.Pointer)>>('player_get_streaming_download_progress'); - late final _player_get_streaming_download_progress = - _player_get_streaming_download_progressPtr.asFunction< - int Function(player_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets a callback function to be invoked when the playback is finished. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @post player_completed_cb() will be invoked. - /// @see player_unset_completed_cb() - /// @see player_completed_cb() - /// @see player_start() - int player_set_completed_cb( - player_h player, - player_completed_cb callback, - ffi.Pointer user_data, - ) { - return _player_set_completed_cb( - player, - callback, - user_data, - ); - } - - late final _player_set_completed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, player_completed_cb, - ffi.Pointer)>>('player_set_completed_cb'); - late final _player_set_completed_cb = _player_set_completed_cbPtr.asFunction< - int Function(player_h, player_completed_cb, ffi.Pointer)>(); - - /// @brief Unsets the playback completed callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_set_completed_cb() - int player_unset_completed_cb( - player_h player, - ) { - return _player_unset_completed_cb( - player, - ); - } - - late final _player_unset_completed_cbPtr = - _lookup>( - 'player_unset_completed_cb'); - late final _player_unset_completed_cb = - _player_unset_completed_cbPtr.asFunction(); - - /// @brief Sets a callback function to be invoked when the playback is interrupted or the interrupt is completed. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @post player_interrupted_cb() will be invoked. - /// @see player_unset_interrupted_cb() - /// @see #player_interrupted_code_e - /// @see player_interrupted_cb() - int player_set_interrupted_cb( - player_h player, - player_interrupted_cb callback, - ffi.Pointer user_data, - ) { - return _player_set_interrupted_cb( - player, - callback, - user_data, - ); - } - - late final _player_set_interrupted_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, player_interrupted_cb, - ffi.Pointer)>>('player_set_interrupted_cb'); - late final _player_set_interrupted_cb = - _player_set_interrupted_cbPtr.asFunction< - int Function( - player_h, player_interrupted_cb, ffi.Pointer)>(); - - /// @brief Unsets the interrupted callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_set_interrupted_cb() - int player_unset_interrupted_cb( - player_h player, - ) { - return _player_unset_interrupted_cb( - player, - ); - } - - late final _player_unset_interrupted_cbPtr = - _lookup>( - 'player_unset_interrupted_cb'); - late final _player_unset_interrupted_cb = - _player_unset_interrupted_cbPtr.asFunction(); - - /// @brief Sets a callback function to be invoked when an error occurs. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @post player_error_cb() will be invoked. - /// @see player_unset_error_cb() - /// @see player_error_cb() - int player_set_error_cb( - player_h player, - player_error_cb callback, - ffi.Pointer user_data, - ) { - return _player_set_error_cb( - player, - callback, - user_data, - ); - } - - late final _player_set_error_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, player_error_cb, - ffi.Pointer)>>('player_set_error_cb'); - late final _player_set_error_cb = _player_set_error_cbPtr.asFunction< - int Function(player_h, player_error_cb, ffi.Pointer)>(); - - /// @brief Unsets the error callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_set_error_cb() - int player_unset_error_cb( - player_h player, - ) { - return _player_unset_error_cb( - player, - ); - } - - late final _player_unset_error_cbPtr = - _lookup>( - 'player_unset_error_cb'); - late final _player_unset_error_cb = - _player_unset_error_cbPtr.asFunction(); - - /// @brief Sets a callback function to be invoked when there is a change in the buffering status of a media stream. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks The media resource should be streamed over the network. - /// @param[in] player The handle to the media player - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @if WEARABLE @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature @endif - /// @post player_buffering_cb() will be invoked. - /// @see player_unset_buffering_cb() - /// @see player_set_uri() - /// @see player_buffering_cb() - int player_set_buffering_cb( - player_h player, - player_buffering_cb callback, - ffi.Pointer user_data, - ) { - return _player_set_buffering_cb( - player, - callback, - user_data, - ); - } - - late final _player_set_buffering_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, player_buffering_cb, - ffi.Pointer)>>('player_set_buffering_cb'); - late final _player_set_buffering_cb = _player_set_buffering_cbPtr.asFunction< - int Function(player_h, player_buffering_cb, ffi.Pointer)>(); - - /// @brief Unsets the buffering callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_set_buffering_cb() - int player_unset_buffering_cb( - player_h player, - ) { - return _player_unset_buffering_cb( - player, - ); - } - - late final _player_unset_buffering_cbPtr = - _lookup>( - 'player_unset_buffering_cb'); - late final _player_unset_buffering_cb = - _player_unset_buffering_cbPtr.asFunction(); - - /// @deprecated Deprecated since 4.0. - /// @brief Sets a path to download, progressively. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks Progressive download will be started when you invoke player_start(). - /// @remarks This function must be called before calling the player_prepare() or player_prepare_async() to reflect the download path when the player is building. - /// @remarks The mediastorage privilege(http://tizen.org/privilege/mediastorage) must be added if any files are used to download and play located in the internal storage. - /// @remarks The externalstorage privilege(http://tizen.org/privilege/externalstorage) must be added if any files are used to download and play located in the external storage. - /// - /// @param[in] player The handle to the media player - /// @param[in] path The absolute path to download - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @if WEARABLE @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature @endif - /// @retval #PLAYER_ERROR_PERMISSION_DENIED Permission denied - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). - int player_set_progressive_download_path( - player_h player, - ffi.Pointer path, - ) { - return _player_set_progressive_download_path( - player, - path, - ); - } - - late final _player_set_progressive_download_pathPtr = _lookup< - ffi - .NativeFunction)>>( - 'player_set_progressive_download_path'); - late final _player_set_progressive_download_path = - _player_set_progressive_download_pathPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Gets the status of progressive download. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[out] current The current download position (bytes) - /// @param[out] total_size The total size of the file (bytes) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The progressive download path must be set by calling player_set_progressive_download_path(). - /// @pre The player state must be set to #PLAYER_STATE_PLAYING by calling player_start() or set to #PLAYER_STATE_PAUSED by calling player_pause(). - int player_get_progressive_download_status( - player_h player, - ffi.Pointer current, - ffi.Pointer total_size, - ) { - return _player_get_progressive_download_status( - player, - current, - total_size, - ); - } - - late final _player_get_progressive_download_statusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer, - ffi.Pointer)>>( - 'player_get_progressive_download_status'); - late final _player_get_progressive_download_status = - _player_get_progressive_download_statusPtr.asFunction< - int Function(player_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Sets a callback function to be invoked when progressive download is started or completed. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @if WEARABLE @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature @endif - /// @pre The path to download must be set by calling player_set_progressive_download_path(). - /// @post player_pd_message_cb() will be invoked. - int player_set_progressive_download_message_cb( - player_h player, - player_pd_message_cb callback, - ffi.Pointer user_data, - ) { - return _player_set_progressive_download_message_cb( - player, - callback, - user_data, - ); - } - - late final _player_set_progressive_download_message_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - player_h, player_pd_message_cb, ffi.Pointer)>>( - 'player_set_progressive_download_message_cb'); - late final _player_set_progressive_download_message_cb = - _player_set_progressive_download_message_cbPtr.asFunction< - int Function( - player_h, player_pd_message_cb, ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Unsets the progressive download message callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - int player_unset_progressive_download_message_cb( - player_h player, - ) { - return _player_unset_progressive_download_message_cb( - player, - ); - } - - late final _player_unset_progressive_download_message_cbPtr = - _lookup>( - 'player_unset_progressive_download_message_cb'); - late final _player_unset_progressive_download_message_cb = - _player_unset_progressive_download_message_cbPtr - .asFunction(); - - /// @brief Sets the playback rate. - /// @details The default value is @c 1.0. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks #PLAYER_ERROR_INVALID_OPERATION occurs when streaming playback. - /// @remarks No operation is performed, if @a rate is @c 0. - /// @remarks The sound is muted, when playback rate is under @c 0.0 and over @c 2.0. - /// @param[in] player The handle to the media player - /// @param[in] rate The playback rate (-5.0x ~ 5.0x) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - int player_set_playback_rate( - player_h player, - double rate, - ) { - return _player_set_playback_rate( - player, - rate, - ); - } - - late final _player_set_playback_ratePtr = - _lookup>( - 'player_set_playback_rate'); - late final _player_set_playback_rate = - _player_set_playback_ratePtr.asFunction(); - - /// @brief Sets a subtitle path. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks Only MicroDVD/SubViewer(*.sub), SAMI(*.smi), and SubRip(*.srt) subtitle formats are supported. - /// @remarks The mediastorage privilege(http://tizen.org/privilege/mediastorage) must be added if any files are used to play located in the internal storage. - /// @remarks The externalstorage privilege(http://tizen.org/privilege/externalstorage) must be added if any files are used to play located in the external storage. - /// @remarks The path value can be @c NULL for reset before calling player_prepare() or player_prepare_async(). - /// - /// @param[in] player The handle to the media player - /// @param[in] path The absolute path of the subtitle file, it can be @c NULL in the #PLAYER_STATE_IDLE state. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PLAYER_ERROR_NO_SUCH_FILE File not found (Since 4.0) - int player_set_subtitle_path( - player_h player, - ffi.Pointer path, - ) { - return _player_set_subtitle_path( - player, - path, - ); - } - - late final _player_set_subtitle_pathPtr = _lookup< - ffi - .NativeFunction)>>( - 'player_set_subtitle_path'); - late final _player_set_subtitle_path = _player_set_subtitle_pathPtr - .asFunction)>(); - - /// @brief Sets a callback function to be invoked when a subtitle updates. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks The callback is called in a separate thread (not in the main loop). - /// @param[in] player The handle to the media player - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The subtitle must be set by calling player_set_subtitle_path(). - /// @post player_subtitle_updated_cb() will be invoked. - /// @see player_unset_subtitle_updated_cb() - /// @see player_subtitle_updated_cb() - /// @see player_set_subtitle_path() - int player_set_subtitle_updated_cb( - player_h player, - player_subtitle_updated_cb callback, - ffi.Pointer user_data, - ) { - return _player_set_subtitle_updated_cb( - player, - callback, - user_data, - ); - } - - late final _player_set_subtitle_updated_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, player_subtitle_updated_cb, - ffi.Pointer)>>('player_set_subtitle_updated_cb'); - late final _player_set_subtitle_updated_cb = - _player_set_subtitle_updated_cbPtr.asFunction< - int Function( - player_h, player_subtitle_updated_cb, ffi.Pointer)>(); - - /// @brief Unsets the subtitle updated callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_set_subtitle_updated_cb() - int player_unset_subtitle_updated_cb( - player_h player, - ) { - return _player_unset_subtitle_updated_cb( - player, - ); - } - - late final _player_unset_subtitle_updated_cbPtr = - _lookup>( - 'player_unset_subtitle_updated_cb'); - late final _player_unset_subtitle_updated_cb = - _player_unset_subtitle_updated_cbPtr.asFunction(); - - /// @brief Sets the seek position for the subtitle. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif.1 - /// @remarks Only MicroDVD/SubViewer(*.sub), SAMI(*.smi), and SubRip(*.srt) subtitle formats are supported. - /// @param[in] player The handle to the media player - /// @param[in] milliseconds The position in milliseconds from the start to the seek point - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The subtitle must be set by calling player_set_subtitle_path(). - /// @pre The player state must be one of #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED. - int player_set_subtitle_position_offset( - player_h player, - int milliseconds, - ) { - return _player_set_subtitle_position_offset( - player, - milliseconds, - ); - } - - late final _player_set_subtitle_position_offsetPtr = - _lookup>( - 'player_set_subtitle_position_offset'); - late final _player_set_subtitle_position_offset = - _player_set_subtitle_position_offsetPtr - .asFunction(); - - /// @brief Sets a callback function to be invoked when video stream is changed. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @remarks The stream changing is detected just before rendering operation. - /// @remarks The callback is called in a separate thread (not in the main loop). - /// @remarks This function must be called before calling the player_prepare() or player_prepare_async() - /// to reflect the requirement when the player is building. - /// @param[in] player The handle to the media player - /// @param[in] callback The stream changed callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare(). - /// @post player_video_stream_changed_cb() will be invoked. - /// @see player_unset_video_stream_changed_cb() - /// @see player_video_stream_changed_cb() - int player_set_video_stream_changed_cb( - player_h player, - player_video_stream_changed_cb callback, - ffi.Pointer user_data, - ) { - return _player_set_video_stream_changed_cb( - player, - callback, - user_data, - ); - } - - late final _player_set_video_stream_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, player_video_stream_changed_cb, - ffi.Pointer)>>('player_set_video_stream_changed_cb'); - late final _player_set_video_stream_changed_cb = - _player_set_video_stream_changed_cbPtr.asFunction< - int Function(player_h, player_video_stream_changed_cb, - ffi.Pointer)>(); - - /// @brief Unsets the video stream changed callback function. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @param[in] player The handle to the media player - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see player_set_video_stream_changed_cb() - int player_unset_video_stream_changed_cb( - player_h player, - ) { - return _player_unset_video_stream_changed_cb( - player, - ); - } - - late final _player_unset_video_stream_changed_cbPtr = - _lookup>( - 'player_unset_video_stream_changed_cb'); - late final _player_unset_video_stream_changed_cb = - _player_unset_video_stream_changed_cbPtr - .asFunction(); - - /// @brief Gets current track index. - /// @details Index starts from 0. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @param[in] player The handle to the media player - /// @param[in] type The type of target stream which is #PLAYER_STREAM_TYPE_AUDIO or #PLAYER_STREAM_TYPE_TEXT - /// @param[out] index The index of track - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED - int player_get_current_track( - player_h player, - int type, - ffi.Pointer index, - ) { - return _player_get_current_track( - player, - type, - index, - ); - } - - late final _player_get_current_trackPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Int32, - ffi.Pointer)>>('player_get_current_track'); - late final _player_get_current_track = _player_get_current_trackPtr - .asFunction)>(); - - /// @brief Gets language code of a track. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @remarks @a code must be released with @c free() by caller - /// @param[in] player The handle to the media player - /// @param[in] type The type of target stream which is #PLAYER_STREAM_TYPE_AUDIO or #PLAYER_STREAM_TYPE_TEXT - /// @param[in] index The index of track - /// @param[out] code A language code in ISO 639-1. "und" will be returned if the language is undefined. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED - int player_get_track_language_code( - player_h player, - int type, - int index, - ffi.Pointer> code, - ) { - return _player_get_track_language_code( - player, - type, - index, - code, - ); - } - - late final _player_get_track_language_codePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Int32, ffi.Int, - ffi.Pointer>)>>( - 'player_get_track_language_code'); - late final _player_get_track_language_code = - _player_get_track_language_codePtr.asFunction< - int Function( - player_h, int, int, ffi.Pointer>)>(); - - /// @brief Gets the track count. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @param[in] player The handle to the media player - /// @param[in] type The type of target stream which is #PLAYER_STREAM_TYPE_AUDIO or #PLAYER_STREAM_TYPE_TEXT - /// @param[out] count The number of track - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED - int player_get_track_count( - player_h player, - int type, - ffi.Pointer count, - ) { - return _player_get_track_count( - player, - type, - count, - ); - } - - late final _player_get_track_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Int32, - ffi.Pointer)>>('player_get_track_count'); - late final _player_get_track_count = _player_get_track_countPtr - .asFunction)>(); - - /// @brief Selects a track to play. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @param[in] player The handle to the media player - /// @param[in] type The type of target stream which is #PLAYER_STREAM_TYPE_AUDIO or #PLAYER_STREAM_TYPE_TEXT - /// @param[in] index The index of track - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED - /// @see player_get_current_track() - int player_select_track( - player_h player, - int type, - int index, - ) { - return _player_select_track( - player, - type, - index, - ); - } - - late final _player_select_trackPtr = _lookup< - ffi.NativeFunction>( - 'player_select_track'); - late final _player_select_track = - _player_select_trackPtr.asFunction(); - - /// @brief Retrieves all the streaming variant information. - /// @since_tizen 4.0 - /// @remarks This function is used for adaptive streaming(hls/mpeg dash) only. - /// @param[in] player The handle to the media player - /// @param[in] callback The iteration callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED - /// @see player_adaptive_variant_cb() - int player_foreach_adaptive_variant( - player_h player, - player_adaptive_variant_cb callback, - ffi.Pointer user_data, - ) { - return _player_foreach_adaptive_variant( - player, - callback, - user_data, - ); - } - - late final _player_foreach_adaptive_variantPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, player_adaptive_variant_cb, - ffi.Pointer)>>('player_foreach_adaptive_variant'); - late final _player_foreach_adaptive_variant = - _player_foreach_adaptive_variantPtr.asFunction< - int Function( - player_h, player_adaptive_variant_cb, ffi.Pointer)>(); - - /// @brief Sets the maximum limit of the streaming variant. - /// @since_tizen 4.0 - /// @remarks This function is used for adaptive streaming(hls/mpeg dash) only. - /// @remarks The bandwidth setting can only be applied if there is no width, height information at streaming variant header. - /// Application can get all the variant information by calling player_foreach_adaptive_variant() function. - /// @remarks If there is no affordable stream for the condition, the minimum bandwidth stream will be selected. - /// @param[in] player The handle to the media player - /// @param[in] bandwidth The max bandwidth limit of the stream variant (default: -1) - /// @param[in] width The max width limit of the stream variant (default: -1) - /// @param[in] height The max height limit of the stream variant (default: -1) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_foreach_adaptive_variant() - /// @see player_get_max_adaptive_variant_limit() - int player_set_max_adaptive_variant_limit( - player_h player, - int bandwidth, - int width, - int height, - ) { - return _player_set_max_adaptive_variant_limit( - player, - bandwidth, - width, - height, - ); - } - - late final _player_set_max_adaptive_variant_limitPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Int, ffi.Int, - ffi.Int)>>('player_set_max_adaptive_variant_limit'); - late final _player_set_max_adaptive_variant_limit = - _player_set_max_adaptive_variant_limitPtr - .asFunction(); - - /// @brief Gets the maximum limit of the streaming variant. - /// @since_tizen 4.0 - /// @remarks This function is used for adaptive streaming(hls/mpeg dash) only. - /// @param[in] player The handle to the media player - /// @param[out] bandwidth The max bandwidth limit of the stream variant (default: -1) - /// @param[out] width The max width limit of the stream variant (default: -1) - /// @param[out] height The max height limit of the stream variant (default: -1) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_foreach_adaptive_variant() - /// @see player_set_max_adaptive_variant_limit() - int player_get_max_adaptive_variant_limit( - player_h player, - ffi.Pointer bandwidth, - ffi.Pointer width, - ffi.Pointer height, - ) { - return _player_get_max_adaptive_variant_limit( - player, - bandwidth, - width, - height, - ); - } - - late final _player_get_max_adaptive_variant_limitPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('player_get_max_adaptive_variant_limit'); - late final _player_get_max_adaptive_variant_limit = - _player_get_max_adaptive_variant_limitPtr.asFunction< - int Function(player_h, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Sets the audio only mode. - /// @details This function is used to disable or enable video rendering during playback. - /// @since_tizen 4.0 - /// @param[in] player The handle to the media player - /// @param[in] audio_only The new audio only status: (@c true = enable audio only, @c false = disable audio only) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @pre The player state must be one of: #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - /// @see player_is_audio_only() - int player_set_audio_only( - player_h player, - bool audio_only, - ) { - return _player_set_audio_only( - player, - audio_only, - ); - } - - late final _player_set_audio_onlyPtr = - _lookup>( - 'player_set_audio_only'); - late final _player_set_audio_only = - _player_set_audio_onlyPtr.asFunction(); - - /// @brief Gets the audio only mode status. - /// @since_tizen 4.0 - /// @param[in] player The handle to the media player - /// @param[out] audio_only The current audio only status: (@c true = audio only enabled, @c false = audio only disabled) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_set_audio_only() - int player_is_audio_only( - player_h player, - ffi.Pointer audio_only, - ) { - return _player_is_audio_only( - player, - audio_only, - ); - } - - late final _player_is_audio_onlyPtr = _lookup< - ffi - .NativeFunction)>>( - 'player_is_audio_only'); - late final _player_is_audio_only = _player_is_audio_onlyPtr - .asFunction)>(); - - /// @brief Sets the player's replaygain status. - /// @details If the replaygain status is @c true, replaygain is applied (if contents has a replaygain tag). - /// If it is @c false, the replaygain isn't affected by tag and properties. - /// @since_tizen 5.0 - /// @param[in] player The handle to the media player - /// @param[in] enabled The new replaygain status: (@c true = enable, @c false = disable) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_is_replaygain_enabled() - int player_set_replaygain_enabled( - player_h player, - bool enabled, - ) { - return _player_set_replaygain_enabled( - player, - enabled, - ); - } - - late final _player_set_replaygain_enabledPtr = - _lookup>( - 'player_set_replaygain_enabled'); - late final _player_set_replaygain_enabled = _player_set_replaygain_enabledPtr - .asFunction(); - - /// @brief Gets the player's replaygain status. - /// @since_tizen 5.0 - /// @param[in] player The handle to the media player - /// @param[out] enabled Pointer to store current replaygain status: - /// (@c true = enabled replaygain, - /// @c false = disabled replaygain) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see player_set_replaygain_enable() - int player_is_replaygain_enabled( - player_h player, - ffi.Pointer enabled, - ) { - return _player_is_replaygain_enabled( - player, - enabled, - ); - } - - late final _player_is_replaygain_enabledPtr = _lookup< - ffi - .NativeFunction)>>( - 'player_is_replaygain_enabled'); - late final _player_is_replaygain_enabled = _player_is_replaygain_enabledPtr - .asFunction)>(); - - /// @brief Sets the ROI (Region Of Interest) area of the content video source. - /// @details This function is to set the ROI area of video content to render it - /// on #PLAYER_DISPLAY_TYPE_OVERLAY display with current display mode. - /// It can be regarded as zooming operation because the selected video area will be rendered fit to the display. - /// @since_tizen 5.0 - /// @remarks This function requires the ratio value of the each coordinate and size based on the video resolution size - /// to consider the dynamic resolution video content. - /// @remarks This function have to be called after calling player_set_display() and the ROI area is valid only in #PLAYER_DISPLAY_TYPE_OVERLAY. - /// @param[in] player The handle to the media player - /// @param[in] x_scale X coordinate ratio value of the video source area based on the video width size \n - /// Valid range is 0.0~1.0. - /// @param[in] y_scale Y coordinate ratio value of the video source area based on the video height size \n - /// Valid range is 0.0~1.0. - /// @param[in] w_scale Width ratio value of the video source area based on the video width size \n - /// Valid range is from greater than 0.0 to 1.0. - /// @param[in] h_scale Height ratio value of the video source area based on the video height size \n - /// Valid range is from greater than 0.0 to 1.0. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see #player_display_type_e - /// @see player_set_display() - /// @see player_set_display_mode() - /// @see player_get_video_size() - /// @see player_get_video_roi_area() - /// @par Example - /// @code - /// #include - /// ... - /// player_h player = NULL; - /// player_display_h display = NULL; - /// int width = 0, height = 0; - /// ... - /// player_set_display (player, PLAYER_DISPLAY_TYPE_OVERLAY, display); - /// player_get_video_size (player, &width, &height); - /// ... - /// player_set_video_roi_area (30/(double)width, 30/(double)height, 480/(double)width, 270/(double)height); - /// ... - /// @endcode - int player_set_video_roi_area( - player_h player, - double x_scale, - double y_scale, - double w_scale, - double h_scale, - ) { - return _player_set_video_roi_area( - player, - x_scale, - y_scale, - w_scale, - h_scale, - ); - } - - late final _player_set_video_roi_areaPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Double, ffi.Double, ffi.Double, - ffi.Double)>>('player_set_video_roi_area'); - late final _player_set_video_roi_area = _player_set_video_roi_areaPtr - .asFunction(); - - /// @brief Gets the ROI (Region Of Interest) area of the content video source. - /// @since_tizen 5.0 - /// @remarks This function gets the ratio value of the each coordinate and size based on the video resolution size. - /// @remarks The ROI area is valid only in #PLAYER_DISPLAY_TYPE_OVERLAY. - /// @param[in] player The handle to the media player - /// @param[out] x_scale The current X coordinate ratio value of the video source area based on the video width size - /// @param[out] y_scale The current Y coordinate ratio value of the video source area based on the video height size - /// @param[out] w_scale The current width ratio value of the video source area based on the video width size - /// @param[out] h_scale The current height ratio value of the video source area based on the video height size - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @see #player_display_type_e - /// @see player_set_display() - /// @see player_get_video_size() - /// @see player_set_video_roi_area() - int player_get_video_roi_area( - player_h player, - ffi.Pointer x_scale, - ffi.Pointer y_scale, - ffi.Pointer w_scale, - ffi.Pointer h_scale, - ) { - return _player_get_video_roi_area( - player, - x_scale, - y_scale, - w_scale, - h_scale, - ); - } - - late final _player_get_video_roi_areaPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - player_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('player_get_video_roi_area'); - late final _player_get_video_roi_area = - _player_get_video_roi_areaPtr.asFunction< - int Function( - player_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Sets the streaming buffering time. - /// @since_tizen 4.0 - /// @param[in] player The handle to the media player - /// @param[in] prebuffer_ms The time duration of buffering data that must be prerolled to start playback. - /// @param[in] rebuffer_ms The time duration of buffering data that must be prerolled to resume playback - /// if player is paused for buffering internally. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid state - /// @if WEARABLE @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature @endif - /// @pre The player state must be #PLAYER_STATE_IDLE. - /// @see player_get_streaming_buffering_time() - int player_set_streaming_buffering_time( - player_h player, - int prebuffer_ms, - int rebuffer_ms, - ) { - return _player_set_streaming_buffering_time( - player, - prebuffer_ms, - rebuffer_ms, - ); - } - - late final _player_set_streaming_buffering_timePtr = - _lookup>( - 'player_set_streaming_buffering_time'); - late final _player_set_streaming_buffering_time = - _player_set_streaming_buffering_timePtr - .asFunction(); - - /// @brief Gets the streaming buffering time. - /// @since_tizen 4.0 - /// @param[in] player The handle to the media player - /// @param[out] prebuffer_ms The time duration of buffering data that must be prerolled to start playback. - /// @param[out] rebuffer_ms The time duration of buffering data that must be prerolled to resume playback - /// if player enters pause state for buffering. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @if WEARABLE @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature @endif - /// @see player_get_streaming_buffering_time() - int player_get_streaming_buffering_time( - player_h player, - ffi.Pointer prebuffer_ms, - ffi.Pointer rebuffer_ms, - ) { - return _player_get_streaming_buffering_time( - player, - prebuffer_ms, - rebuffer_ms, - ); - } - - late final _player_get_streaming_buffering_timePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer, - ffi.Pointer)>>('player_get_streaming_buffering_time'); - late final _player_get_streaming_buffering_time = - _player_get_streaming_buffering_timePtr.asFunction< - int Function(player_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets information whether the current content of the player is spherical. - /// @since_tizen 5.0 - /// @remarks This function is related to the following features:\n - /// %http://tizen.org/feature/multimedia.player.spherical_video\n - /// %http://tizen.org/feature/opengles.version.2_0\n - /// @param[in] player The handle to the media player - /// @param[out] is_spherical The value indicating whether the content is spherical - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature - /// @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED. - int player_360_is_content_spherical( - player_h player, - ffi.Pointer is_spherical, - ) { - return _player_360_is_content_spherical( - player, - is_spherical, - ); - } - - late final _player_360_is_content_sphericalPtr = _lookup< - ffi - .NativeFunction)>>( - 'player_360_is_content_spherical'); - late final _player_360_is_content_spherical = - _player_360_is_content_sphericalPtr - .asFunction)>(); - - /// @brief Sets the 360 video mode. - /// @details In case the media content is spherical, display mode can be selected by this function. - /// @since_tizen 5.0 - /// @remarks This function is related to the following features:\n - /// %http://tizen.org/feature/multimedia.player.spherical_video\n - /// %http://tizen.org/feature/opengles.version.2_0\n - /// @param[in] player The handle to the media player - /// @param[in] enabled The 360 video display status: @c true = display with 360 video mode, - /// @c false = display with full panorama mode. The default value is @c true. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature - /// @see player_360_is_enabled() - int player_360_set_enabled( - player_h player, - bool enabled, - ) { - return _player_360_set_enabled( - player, - enabled, - ); - } - - late final _player_360_set_enabledPtr = - _lookup>( - 'player_360_set_enabled'); - late final _player_360_set_enabled = - _player_360_set_enabledPtr.asFunction(); - - /// @brief Gets the 360 video display mode. - /// @since_tizen 5.0 - /// @remarks This function is related to the following features:\n - /// %http://tizen.org/feature/multimedia.player.spherical_video\n - /// %http://tizen.org/feature/opengles.version.2_0\n - /// @param[in] player The handle to the media player - /// @param[out] enabled Pointer to store current 360 video display mode: - /// (@c true = display with 360 video mode, - /// @c false = display with full panorama mode) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature - /// @see player_360_set_enabled() - int player_360_is_enabled( - player_h player, - ffi.Pointer enabled, - ) { - return _player_360_is_enabled( - player, - enabled, - ); - } - - late final _player_360_is_enabledPtr = _lookup< - ffi - .NativeFunction)>>( - 'player_360_is_enabled'); - late final _player_360_is_enabled = _player_360_is_enabledPtr - .asFunction)>(); - - /// @brief Sets the 360 video direction of view. - /// @details This function is to set horizontal (yaw) and vertical (pitch) angles - /// of current direction of view in radians. Default direction of view - /// is taken from meta-data stored in the media. If meta-data omits - /// these values, zeros are assumed to be equal to the centre of the - /// panorama image. - /// @since_tizen 5.0 - /// @remarks This function is related to the following features:\n - /// %http://tizen.org/feature/multimedia.player.spherical_video\n - /// %http://tizen.org/feature/opengles.version.2_0\n - /// @param[in] player The handle to the media player - /// @param[in] yaw The angle value around vertical axis. Valid values are in - /// range [-PI, PI]. Default value is 0. - /// @param[in] pitch The angle value around lateral axis. Valid values are in - /// range [-PI/2, PI/2]. Default value is 0. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature - /// @see player_360_get_direction_of_view() - int player_360_set_direction_of_view( - player_h player, - double yaw, - double pitch, - ) { - return _player_360_set_direction_of_view( - player, - yaw, - pitch, - ); - } - - late final _player_360_set_direction_of_viewPtr = _lookup< - ffi.NativeFunction>( - 'player_360_set_direction_of_view'); - late final _player_360_set_direction_of_view = - _player_360_set_direction_of_viewPtr - .asFunction(); - - /// @brief Gets the 360 video direction of view. - /// @details This function is to get horizontal (yaw) and vertical (pitch) angles - /// of current direction of view in radians. - /// @since_tizen 5.0 - /// @remarks This function is related to the following features:\n - /// %http://tizen.org/feature/multimedia.player.spherical_video\n - /// %http://tizen.org/feature/opengles.version.2_0\n - /// @param[in] player The handle to the media player - /// @param[out] yaw Pointer to store current value of direction of view - /// angle around vertical axis - /// @param[out] pitch Pointer to store current value of direction of view - /// angle around lateral axis - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature - /// @see player_360_set_direction_of_view() - int player_360_get_direction_of_view( - player_h player, - ffi.Pointer yaw, - ffi.Pointer pitch, - ) { - return _player_360_get_direction_of_view( - player, - yaw, - pitch, - ); - } - - late final _player_360_get_direction_of_viewPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer, - ffi.Pointer)>>('player_360_get_direction_of_view'); - late final _player_360_get_direction_of_view = - _player_360_get_direction_of_viewPtr.asFunction< - int Function( - player_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the zoom level of 360 video. - /// @details The zoom means scaling of the flat image cut from the panorama. - /// The valid range is from 1.0 to 10.0, where 1.0 is the actual image and - /// values above are zoom-in factor. Default value is 1.0 - no zoom. - /// @since_tizen 5.0 - /// @remarks This function is related to the following features:\n - /// %http://tizen.org/feature/multimedia.player.spherical_video\n - /// %http://tizen.org/feature/opengles.version.2_0\n - /// @param[in] player The handle to the media player - /// @param[in] level The zoom level\n - /// Valid range is 1.0~10.0. Default value is 1.0. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature - /// @see player_360_get_zoom() - int player_360_set_zoom( - player_h player, - double level, - ) { - return _player_360_set_zoom( - player, - level, - ); - } - - late final _player_360_set_zoomPtr = - _lookup>( - 'player_360_set_zoom'); - late final _player_360_set_zoom = - _player_360_set_zoomPtr.asFunction(); - - /// @brief Gets the current zoom level of 360 video. - /// @details The zoom means scaling of the flat image cut from the panorama. - /// The valid range is from 1.0 to 10.0. Where 1.0 is actual image and - /// values above are zoom-in factor. Default value is 1.0 - no zoom. - /// @since_tizen 5.0 - /// @remarks This function is related to the following features:\n - /// %http://tizen.org/feature/multimedia.player.spherical_video\n - /// %http://tizen.org/feature/opengles.version.2_0\n - /// @param[in] player The handle to the media player - /// @param[out] level Pointer to store current value of zoom level - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature - /// @see player_360_set_zoom() - int player_360_get_zoom( - player_h player, - ffi.Pointer level, - ) { - return _player_360_get_zoom( - player, - level, - ); - } - - late final _player_360_get_zoomPtr = _lookup< - ffi - .NativeFunction)>>( - 'player_360_get_zoom'); - late final _player_360_get_zoom = _player_360_get_zoomPtr - .asFunction)>(); - - /// @brief Sets the field of view information of 360 video. - /// @details This function is to set the field of view to decide the output frame size. - /// @since_tizen 5.0 - /// @remarks values above the default ones extend the field of view to significantly - /// distorted areas and will not be useful in most cases. - /// @remarks This function is related to the following features:\n - /// %http://tizen.org/feature/multimedia.player.spherical_video\n - /// %http://tizen.org/feature/opengles.version.2_0\n - /// @param[in] player The handle to the media player - /// @param[in] horizontal_degrees The horizontal field of view to display in degrees\n - /// Valid range is 1~360 degrees. Default value is 120 degrees. - /// @param[in] vertical_degrees The vertical field of view to display in degrees\n - /// Valid range is 1~180 degrees. Default value is 67 degrees. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature - /// @see player_360_get_field_of_view() - int player_360_set_field_of_view( - player_h player, - int horizontal_degrees, - int vertical_degrees, - ) { - return _player_360_set_field_of_view( - player, - horizontal_degrees, - vertical_degrees, - ); - } - - late final _player_360_set_field_of_viewPtr = - _lookup>( - 'player_360_set_field_of_view'); - late final _player_360_set_field_of_view = _player_360_set_field_of_viewPtr - .asFunction(); - - /// @brief Gets the field of view information of 360 video. - /// @details This function is to get the field of view information. - /// @since_tizen 5.0 - /// @remarks This function is related to the following features:\n - /// %http://tizen.org/feature/multimedia.player.spherical_video\n - /// %http://tizen.org/feature/opengles.version.2_0\n - /// @param[in] player The handle to the media player - /// @param[out] horizontal_degrees Pointer to store current value of horizontal - /// field of view to display in degrees. - /// @param[out] vertical_degrees Pointer to store current value of vertical - /// field of view to display in degrees. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature - /// @see player_360_set_field_of_view() - int player_360_get_field_of_view( - player_h player, - ffi.Pointer horizontal_degrees, - ffi.Pointer vertical_degrees, - ) { - return _player_360_get_field_of_view( - player, - horizontal_degrees, - vertical_degrees, - ); - } - - late final _player_360_get_field_of_viewPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Pointer, - ffi.Pointer)>>('player_360_get_field_of_view'); - late final _player_360_get_field_of_view = - _player_360_get_field_of_viewPtr.asFunction< - int Function(player_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the zoom level with field of view information of 360 video. - /// @details This function is provided to reduce the distortion of zoom operation. - /// The zoom means scaling of the flat image cut from the panorama - /// which is decided by the field of view data. - /// The zoom level valid range is from 1.0 to 10.0, where 1.0 is the actual image and - /// values above are zoom-in factor. Default value is 1.0 - no zoom. - /// @since_tizen 5.0 - /// @remarks The degree values above the default ones extend the field of view to significantly - /// distorted areas and will not be useful in most cases. - /// @remarks This function is related to the following features:\n - /// %http://tizen.org/feature/multimedia.player.spherical_video\n - /// %http://tizen.org/feature/opengles.version.2_0\n - /// @param[in] player The handle to the media player - /// @param[in] level The zoom level\n - /// Valid range is 1.0~10.0. Default value is 1.0. - /// @param[in] horizontal_degrees The horizontal field of view to display in degrees\n - /// Valid range is 1~360 degrees. Default value is 120 degrees. - /// @param[in] vertical_degrees The vertical field of view to display in degrees\n - /// Valid range is 1~180 degrees. Default value is 67 degrees. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PLAYER_ERROR_NONE Successful - /// @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature - /// @see player_360_set_zoom() - /// @see player_360_get_zoom() - /// @see player_360_set_field_of_view() - /// @see player_360_get_field_of_view() - int player_360_set_zoom_with_field_of_view( - player_h player, - double level, - int horizontal_degrees, - int vertical_degrees, - ) { - return _player_360_set_zoom_with_field_of_view( - player, - level, - horizontal_degrees, - vertical_degrees, - ); - } - - late final _player_360_set_zoom_with_field_of_viewPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(player_h, ffi.Float, ffi.Int, - ffi.Int)>>('player_360_set_zoom_with_field_of_view'); - late final _player_360_set_zoom_with_field_of_view = - _player_360_set_zoom_with_field_of_viewPtr - .asFunction(); - - /// @brief Creates a radio handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a radio using radio_destroy(). - /// @param[out] radio A new handle to radio - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RADIO_ERROR_NONE Successful - /// @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RADIO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RADIO_ERROR_NOT_SUPPORTED Not supported - /// @see radio_destroy() - int radio_create( - ffi.Pointer radio, - ) { - return _radio_create( - radio, - ); - } - - late final _radio_createPtr = - _lookup)>>( - 'radio_create'); - late final _radio_create = - _radio_createPtr.asFunction)>(); - - /// @brief Destroys the radio handle and releases all its resources. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks To completely shutdown the radio operation, call this function with a valid radio handle. - /// - /// @param[in] radio The handle to radio to be destroyed - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RADIO_ERROR_NONE Successful - /// @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RADIO_ERROR_NOT_SUPPORTED Not supported - /// @see radio_create() - int radio_destroy( - radio_h radio, - ) { - return _radio_destroy( - radio, - ); - } - - late final _radio_destroyPtr = - _lookup>('radio_destroy'); - late final _radio_destroy = - _radio_destroyPtr.asFunction(); - - /// @brief Gets the radio's current state. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] radio The handle to radio - /// @param[out] state The current state of the radio - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RADIO_ERROR_NONE Successful - /// @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RADIO_ERROR_NOT_SUPPORTED Not supported - int radio_get_state( - radio_h radio, - ffi.Pointer state, - ) { - return _radio_get_state( - radio, - state, - ); - } - - late final _radio_get_statePtr = _lookup< - ffi - .NativeFunction)>>( - 'radio_get_state'); - late final _radio_get_state = _radio_get_statePtr - .asFunction)>(); - - /// @brief Starts playing the radio. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] radio The handle to radio - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RADIO_ERROR_NONE Successful - /// @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RADIO_ERROR_INVALID_STATE Invalid radio state - /// @retval #RADIO_ERROR_SOUND_POLICY Sound policy error - /// @retval #RADIO_ERROR_NOT_SUPPORTED Not supported - /// @retval #RADIO_ERROR_NO_ANTENNA No Antenna error - /// @pre The radio state must be set to #RADIO_STATE_READY by calling radio_create(). - /// @post The radio state will be #RADIO_STATE_PLAYING. - /// @see radio_stop() - int radio_start( - radio_h radio, - ) { - return _radio_start( - radio, - ); - } - - late final _radio_startPtr = - _lookup>('radio_start'); - late final _radio_start = _radio_startPtr.asFunction(); - - /// @brief Stops playing the radio. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] radio The handle to radio - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RADIO_ERROR_NONE Successful - /// @retval #RADIO_ERROR_INVALID_PARAMETER Invalid state - /// @retval #RADIO_ERROR_INVALID_STATE Invalid radio state - /// @retval #RADIO_ERROR_NOT_SUPPORTED Not supported - /// @pre The radio state must be set to #RADIO_STATE_PLAYING by calling radio_start(). - /// @post The radio state will be #RADIO_STATE_READY. - /// @see radio_start() - /// @see radio_scan_start() - int radio_stop( - radio_h radio, - ) { - return _radio_stop( - radio, - ); - } - - late final _radio_stopPtr = - _lookup>('radio_stop'); - late final _radio_stop = _radio_stopPtr.asFunction(); - - /// @brief Seeks up the effective frequency of the radio, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] radio The handle to radio - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RADIO_ERROR_NONE Successful - /// @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RADIO_ERROR_INVALID_STATE Invalid radio state - /// @retval #RADIO_ERROR_NOT_SUPPORTED Not supported - /// @pre The radio state must be set to #RADIO_STATE_PLAYING by calling radio_start(). - /// @post It invokes radio_seek_completed_cb() when the seek completes. - /// @see radio_seek_down() - int radio_seek_up( - radio_h radio, - radio_seek_completed_cb callback, - ffi.Pointer user_data, - ) { - return _radio_seek_up( - radio, - callback, - user_data, - ); - } - - late final _radio_seek_upPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(radio_h, radio_seek_completed_cb, - ffi.Pointer)>>('radio_seek_up'); - late final _radio_seek_up = _radio_seek_upPtr.asFunction< - int Function(radio_h, radio_seek_completed_cb, ffi.Pointer)>(); - - /// @brief Seeks down the effective frequency of the radio, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] radio The handle to radio - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RADIO_ERROR_NONE Successful - /// @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RADIO_ERROR_INVALID_STATE Invalid radio state - /// @retval #RADIO_ERROR_NOT_SUPPORTED Not supported - /// @pre The radio state must be set to #RADIO_STATE_PLAYING by calling radio_start(). - /// @post It invokes radio_seek_completed_cb() when the seek completes. - /// @see radio_seek_up() - int radio_seek_down( - radio_h radio, - radio_seek_completed_cb callback, - ffi.Pointer user_data, - ) { - return _radio_seek_down( - radio, - callback, - user_data, - ); - } - - late final _radio_seek_downPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(radio_h, radio_seek_completed_cb, - ffi.Pointer)>>('radio_seek_down'); - late final _radio_seek_down = _radio_seek_downPtr.asFunction< - int Function(radio_h, radio_seek_completed_cb, ffi.Pointer)>(); - - /// @brief Sets the radio frequency. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] radio The handle to radio - /// @param[in] frequency The frequency to set [87500 ~ 108000] (kHz) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RADIO_ERROR_NONE Successful - /// @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RADIO_ERROR_NOT_SUPPORTED Not supported - /// @see radio_get_frequency() - int radio_set_frequency( - radio_h radio, - int frequency, - ) { - return _radio_set_frequency( - radio, - frequency, - ); - } - - late final _radio_set_frequencyPtr = - _lookup>( - 'radio_set_frequency'); - late final _radio_set_frequency = - _radio_set_frequencyPtr.asFunction(); - - /// @brief Gets the current frequency of the radio. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] radio The handle to radio - /// @param[out] frequency The current frequency [87500 ~ 108000] (kHz) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RADIO_ERROR_NONE Successful - /// @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RADIO_ERROR_NOT_SUPPORTED Not supported - /// @see radio_set_frequency() - int radio_get_frequency( - radio_h radio, - ffi.Pointer frequency, - ) { - return _radio_get_frequency( - radio, - frequency, - ); - } - - late final _radio_get_frequencyPtr = _lookup< - ffi.NativeFunction)>>( - 'radio_get_frequency'); - late final _radio_get_frequency = _radio_get_frequencyPtr - .asFunction)>(); - - /// @brief Gets the current signal strength of the radio. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] radio The handle to radio - /// @param[out] strength The current signal strength [-128 ~ 128] (dBm) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RADIO_ERROR_NONE Successful - /// @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RADIO_ERROR_NOT_SUPPORTED Not supported - int radio_get_signal_strength( - radio_h radio, - ffi.Pointer strength, - ) { - return _radio_get_signal_strength( - radio, - strength, - ); - } - - late final _radio_get_signal_strengthPtr = _lookup< - ffi.NativeFunction)>>( - 'radio_get_signal_strength'); - late final _radio_get_signal_strength = _radio_get_signal_strengthPtr - .asFunction)>(); - - /// @brief Starts scanning radio signals, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] radio The handle to radio - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RADIO_ERROR_NONE Successful - /// @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RADIO_ERROR_INVALID_STATE Invalid radio state - /// @retval #RADIO_ERROR_NOT_SUPPORTED Not supported - /// @pre The radio state must be set to #RADIO_STATE_READY or #RADIO_STATE_PLAYING. - /// @post The radio state will be #RADIO_STATE_SCANNING during a search. After the scan is completed, the radio state will be set back to the state from before the function call(#RADIO_STATE_READY or #RADIO_STATE_PLAYING). - /// @post It invokes radio_scan_updated_cb() when the scan information updates. - /// @post It invokes radio_scan_completed_cb() when the scan completes, if you set a callback with radio_set_scan_completed_cb(). - /// @see radio_scan_stop() - /// @see radio_set_scan_completed_cb() - /// @see radio_scan_completed_cb() - int radio_scan_start( - radio_h radio, - radio_scan_updated_cb callback, - ffi.Pointer user_data, - ) { - return _radio_scan_start( - radio, - callback, - user_data, - ); - } - - late final _radio_scan_startPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(radio_h, radio_scan_updated_cb, - ffi.Pointer)>>('radio_scan_start'); - late final _radio_scan_start = _radio_scan_startPtr.asFunction< - int Function(radio_h, radio_scan_updated_cb, ffi.Pointer)>(); - - /// @brief Stops scanning radio signals, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] radio The handle to radio - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RADIO_ERROR_NONE Successful - /// @retval #RADIO_ERROR_INVALID_PARAMETER Invalid state - /// @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RADIO_ERROR_INVALID_STATE Invalid radio state - /// @retval #RADIO_ERROR_NOT_SUPPORTED Not supported - /// @pre The radio state must be set to #RADIO_STATE_SCANNING by calling radio_scan_start(). - /// @post It invokes radio_scan_stopped_cb() when the scan stops. - /// @post After the scan stopped, the radio state will be set back to the state from before the radio_scan_start() function call(#RADIO_STATE_READY or #RADIO_STATE_PLAYING). - /// @see radio_scan_start() - int radio_scan_stop( - radio_h radio, - radio_scan_stopped_cb callback, - ffi.Pointer user_data, - ) { - return _radio_scan_stop( - radio, - callback, - user_data, - ); - } - - late final _radio_scan_stopPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(radio_h, radio_scan_stopped_cb, - ffi.Pointer)>>('radio_scan_stop'); - late final _radio_scan_stop = _radio_scan_stopPtr.asFunction< - int Function(radio_h, radio_scan_stopped_cb, ffi.Pointer)>(); - - /// @brief Sets the radio's mute status. - /// @details If the mute status is @c true, no sounds will be played. If @c false, sounds will be played. Until this function is called, by default the radio is not muted. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] radio The handle to radio - /// @param[in] muted The new mute status: (@c true = mute, @c false = not muted) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RADIO_ERROR_NONE Successful - /// @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RADIO_ERROR_NOT_SUPPORTED Not supported - /// @see radio_is_muted() - int radio_set_mute( - radio_h radio, - bool muted, - ) { - return _radio_set_mute( - radio, - muted, - ); - } - - late final _radio_set_mutePtr = - _lookup>( - 'radio_set_mute'); - late final _radio_set_mute = - _radio_set_mutePtr.asFunction(); - - /// @brief Gets the radio's mute status. - /// @details If the mute status is @c true, no sounds are played. If @c false, sounds are played. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] radio The handle to radio - /// @param[out] muted The current mute status: (@c true = mute, @c false = not muted) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RADIO_ERROR_NONE Successful - /// @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RADIO_ERROR_NOT_SUPPORTED Not supported - /// @see radio_set_mute() - int radio_is_muted( - radio_h radio, - ffi.Pointer muted, - ) { - return _radio_is_muted( - radio, - muted, - ); - } - - late final _radio_is_mutedPtr = _lookup< - ffi.NativeFunction)>>( - 'radio_is_muted'); - late final _radio_is_muted = _radio_is_mutedPtr - .asFunction)>(); - - /// @brief Sets a callback function to be invoked when the scan finishes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] radio The handle to radio - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RADIO_ERROR_NONE Successful - /// @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RADIO_ERROR_NOT_SUPPORTED Not supported - /// @post radio_scan_completed_cb() will be invoked. - /// @see radio_unset_scan_completed_cb() - /// @see radio_scan_completed_cb() - int radio_set_scan_completed_cb( - radio_h radio, - radio_scan_completed_cb callback, - ffi.Pointer user_data, - ) { - return _radio_set_scan_completed_cb( - radio, - callback, - user_data, - ); - } - - late final _radio_set_scan_completed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(radio_h, radio_scan_completed_cb, - ffi.Pointer)>>('radio_set_scan_completed_cb'); - late final _radio_set_scan_completed_cb = - _radio_set_scan_completed_cbPtr.asFunction< - int Function( - radio_h, radio_scan_completed_cb, ffi.Pointer)>(); - - /// @brief Unsets the scan completed callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] radio The handle to radio - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RADIO_ERROR_NONE Successful - /// @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RADIO_ERROR_NOT_SUPPORTED Not supported - /// @see radio_set_scan_completed_cb() - int radio_unset_scan_completed_cb( - radio_h radio, - ) { - return _radio_unset_scan_completed_cb( - radio, - ); - } - - late final _radio_unset_scan_completed_cbPtr = - _lookup>( - 'radio_unset_scan_completed_cb'); - late final _radio_unset_scan_completed_cb = - _radio_unset_scan_completed_cbPtr.asFunction(); - - /// @brief Sets a callback function to be invoked when the radio is interrupted. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] radio The handle to radio - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RADIO_ERROR_NONE Successful - /// @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RADIO_ERROR_NOT_SUPPORTED Not supported - /// @post radio_interrupted_cb() will be invoked. - /// @see radio_unset_interrupted_cb() - /// @see #radio_interrupted_code_e - /// @see radio_interrupted_cb() - int radio_set_interrupted_cb( - radio_h radio, - radio_interrupted_cb callback, - ffi.Pointer user_data, - ) { - return _radio_set_interrupted_cb( - radio, - callback, - user_data, - ); - } - - late final _radio_set_interrupted_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(radio_h, radio_interrupted_cb, - ffi.Pointer)>>('radio_set_interrupted_cb'); - late final _radio_set_interrupted_cb = - _radio_set_interrupted_cbPtr.asFunction< - int Function(radio_h, radio_interrupted_cb, ffi.Pointer)>(); - - /// @brief Unsets the interrupted callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] radio The handle to radio - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RADIO_ERROR_NONE Successful - /// @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RADIO_ERROR_NOT_SUPPORTED Not supported - /// @see radio_set_interrupted_cb() - int radio_unset_interrupted_cb( - radio_h radio, - ) { - return _radio_unset_interrupted_cb( - radio, - ); - } - - late final _radio_unset_interrupted_cbPtr = - _lookup>( - 'radio_unset_interrupted_cb'); - late final _radio_unset_interrupted_cb = - _radio_unset_interrupted_cbPtr.asFunction(); - - /// @brief Gets the min, max frequency of the region. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] radio The handle to radio - /// @param[out] min_freq The min frequency [87500 ~ 108000] (kHz) - /// @param[out] max_freq The max frequency [87500 ~ 108000] (kHz) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RADIO_ERROR_NONE Successful - /// @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RADIO_ERROR_NOT_SUPPORTED Not supported - int radio_get_frequency_range( - radio_h radio, - ffi.Pointer min_freq, - ffi.Pointer max_freq, - ) { - return _radio_get_frequency_range( - radio, - min_freq, - max_freq, - ); - } - - late final _radio_get_frequency_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(radio_h, ffi.Pointer, - ffi.Pointer)>>('radio_get_frequency_range'); - late final _radio_get_frequency_range = - _radio_get_frequency_rangePtr.asFunction< - int Function(radio_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets channel spacing. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] radio The handle to radio - /// @param[out] channel_spacing The channel spacing value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RADIO_ERROR_NONE Successful - /// @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RADIO_ERROR_NOT_SUPPORTED Not supported - int radio_get_channel_spacing( - radio_h radio, - ffi.Pointer channel_spacing, - ) { - return _radio_get_channel_spacing( - radio, - channel_spacing, - ); - } - - late final _radio_get_channel_spacingPtr = _lookup< - ffi.NativeFunction)>>( - 'radio_get_channel_spacing'); - late final _radio_get_channel_spacing = _radio_get_channel_spacingPtr - .asFunction)>(); - - /// @brief Sets the radio's volume. - /// @details Setting this volume adjusts the radio's instance volume, not the system volume. - /// The valid range is from 0 to 1.0, inclusive (1.0 = 100%). Default value is 1.0. - /// To change system volume, use the @ref CAPI_MEDIA_SOUND_MANAGER_MODULE API. - /// Finally, it does not support to set other value into each channel currently. - /// @since_tizen 3.0 - /// @param[in] radio The handle to radio - /// @param[in] volume The volume to set [0.0 ~ 1.0](1.0 = 100%) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RADIO_ERROR_NONE Successful - /// @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RADIO_ERROR_NOT_SUPPORTED Not supported - /// @see radio_get_volume() - int radio_set_volume( - radio_h radio, - double volume, - ) { - return _radio_set_volume( - radio, - volume, - ); - } - - late final _radio_set_volumePtr = - _lookup>( - 'radio_set_volume'); - late final _radio_set_volume = - _radio_set_volumePtr.asFunction(); - - /// @brief Gets the radio's current volume. - /// @details The range of @a volume is from @c 0 to @c 1.0, inclusive (1.0 = 100%). - /// This function gets the radio volume, not the system volume. - /// To get the system volume, use the @ref CAPI_MEDIA_SOUND_MANAGER_MODULE API. - /// @since_tizen 3.0 - /// @param[in] radio The handle to radio - /// @param[out] volume The current volume [0.0 ~ 1.0](1.0 = 100%) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RADIO_ERROR_NONE Successful - /// @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RADIO_ERROR_NOT_SUPPORTED Not supported - /// @see radio_set_volume() - int radio_get_volume( - radio_h radio, - ffi.Pointer volume, - ) { - return _radio_get_volume( - radio, - volume, - ); - } - - late final _radio_get_volumePtr = _lookup< - ffi - .NativeFunction)>>( - 'radio_get_volume'); - late final _radio_get_volume = _radio_get_volumePtr - .asFunction)>(); - - /// @brief Creates a recorder handle to record a video. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a recorder using recorder_destroy(). \n - /// The @a camera handle also could be used for capturing images. \n - /// If the camera state was #CAMERA_STATE_CREATED, the preview format will be changed to the recommended preview format for recording. - /// @remarks The created recorder state will be different according to camera state : \n - /// #CAMERA_STATE_CREATED -> #RECORDER_STATE_CREATED\n - /// #CAMERA_STATE_PREVIEW -> #RECORDER_STATE_READY\n - /// #CAMERA_STATE_CAPTURED -> #RECORDER_STATE_READY - /// @remarks The privilege %http://tizen.org/privilege/recorder is not required since 4.0,\n - /// but it is required in all earlier versions. - /// @remarks Since 4.0, It's related to the following feature: %http://tizen.org/feature/media.video_recording \n - /// instead of using %http://tizen.org/feature/microphone - /// @param[in] camera The handle to the camera - /// @param[out] recorder A handle to the recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @see camera_create() - /// @see camera_stop_preview() - /// @see recorder_destroy() - int recorder_create_videorecorder( - camera_h camera, - ffi.Pointer recorder, - ) { - return _recorder_create_videorecorder( - camera, - recorder, - ); - } - - late final _recorder_create_videorecorderPtr = _lookup< - ffi - .NativeFunction)>>( - 'recorder_create_videorecorder'); - late final _recorder_create_videorecorder = _recorder_create_videorecorderPtr - .asFunction)>(); - - /// @brief Creates a recorder handle to record an audio. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a recorder using recorder_destroy(). - /// @remarks The privilege %http://tizen.org/privilege/recorder is not required since 4.0,\n - /// but it is required in all earlier versions. - /// @remarks Since 4.0, It's related to the following feature: %http://tizen.org/feature/media.audio_recording \n - /// instead of using %http://tizen.org/feature/microphone - /// @param[out] recorder A handle to the recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @post The recorder state will be #RECORDER_STATE_CREATED. - /// @see recorder_destroy() - int recorder_create_audiorecorder( - ffi.Pointer recorder, - ) { - return _recorder_create_audiorecorder( - recorder, - ); - } - - late final _recorder_create_audiorecorderPtr = - _lookup)>>( - 'recorder_create_audiorecorder'); - late final _recorder_create_audiorecorder = _recorder_create_audiorecorderPtr - .asFunction)>(); - - /// @brief Destroys the recorder handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The video recorder's camera handle is not released by this function. - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @pre The recorder state should be #RECORDER_STATE_CREATED. - /// @post The recorder state will be #RECORDER_STATE_NONE. - /// @see camera_destroy() - /// @see recorder_create_videorecorder() - /// @see recorder_create_audiorecorder() - int recorder_destroy( - recorder_h recorder, - ) { - return _recorder_destroy( - recorder, - ); - } - - late final _recorder_destroyPtr = - _lookup>( - 'recorder_destroy'); - late final _recorder_destroy = - _recorder_destroyPtr.asFunction(); - - /// @brief Prepares the media recorder for recording. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks Before calling the function, it is required to properly set audio encoder (recorder_set_audio_encoder()), - /// video encoder(recorder_set_video_encoder()) and file format (recorder_set_file_format()). - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_RESOURCE_CONFLICT Resource conflict error - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state should be #RECORDER_STATE_CREATED by recorder_create_videorecorder(), recorder_create_audiorecorder() or recorder_unprepare(). - /// @post The recorder state will be #RECORDER_STATE_READY. - /// @post If recorder handle is created by recorder_create_videorecorder(), the camera state will be changed to #CAMERA_STATE_PREVIEW. - /// @see recorder_create_videorecorder() - /// @see recorder_create_audiorecorder() - /// @see recorder_unprepare() - /// @see recorder_set_audio_encoder() - /// @see recorder_set_video_encoder() - /// @see recorder_set_file_format() - int recorder_prepare( - recorder_h recorder, - ) { - return _recorder_prepare( - recorder, - ); - } - - late final _recorder_preparePtr = - _lookup>( - 'recorder_prepare'); - late final _recorder_prepare = - _recorder_preparePtr.asFunction(); - - /// @brief Resets the media recorder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state should be #RECORDER_STATE_READY set by recorder_prepare(), recorder_cancel() or recorder_commit(). - /// @post The recorder state will be #RECORDER_STATE_CREATED. - /// @post If the recorder handle is created by recorder_create_videorecorder(), camera state will be changed to #CAMERA_STATE_CREATED. - /// @see recorder_prepare() - /// @see recorder_cancel() - /// @see recorder_commit() - int recorder_unprepare( - recorder_h recorder, - ) { - return _recorder_unprepare( - recorder, - ); - } - - late final _recorder_unpreparePtr = - _lookup>( - 'recorder_unprepare'); - late final _recorder_unprepare = - _recorder_unpreparePtr.asFunction(); - - /// @brief Starts the recording. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks If file path has been set to an existing file, this file is removed automatically and updated by new one. \n - /// In the video recorder, some preview format does not support record mode. It will return #RECORDER_ERROR_INVALID_OPERATION error. \n - /// You should use default preview format or #CAMERA_PIXEL_FORMAT_NV12 in the record mode. \n - /// When you want to record audio or video file, you need to add privilege according to rules below additionally. \n - /// If you want to save contents to internal storage, you should add mediastorage privilege. \n - /// If you want to save contents to external storage, you should add externalstorage privilege. \n - /// The filename should be set before this function is invoked. - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_READY by recorder_prepare() or #RECORDER_STATE_PAUSED by recorder_pause(). \n - /// The filename should be set by recorder_set_filename(). - /// @post The recorder state will be #RECORDER_STATE_RECORDING. - /// @see recorder_pause() - /// @see recorder_commit() - /// @see recorder_cancel() - /// @see recorder_set_audio_encoder() - /// @see recorder_set_filename() - /// @see recorder_set_file_format() - /// @see recorder_recording_status_cb() - /// @see recorder_set_filename() - int recorder_start( - recorder_h recorder, - ) { - return _recorder_start( - recorder, - ); - } - - late final _recorder_startPtr = - _lookup>( - 'recorder_start'); - late final _recorder_start = - _recorder_startPtr.asFunction(); - - /// @brief Pauses the recording. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks Recording can be resumed with recorder_start(). - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_RECORDING. - /// @post The recorder state will be #RECORDER_STATE_PAUSED. - /// @see recorder_pause() - /// @see recorder_commit() - /// @see recorder_cancel() - int recorder_pause( - recorder_h recorder, - ) { - return _recorder_pause( - recorder, - ); - } - - late final _recorder_pausePtr = - _lookup>( - 'recorder_pause'); - late final _recorder_pause = - _recorder_pausePtr.asFunction(); - - /// @brief Stops recording and saves the result. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks When you want to record audio or video file, you need to add privilege according to rules below additionally. \n - /// If you want to save contents to internal storage, you should add mediastorage privilege. \n - /// If you want to save contents to external storage, you should add externalstorage privilege. - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_RECORDING set by recorder_start() or #RECORDER_STATE_PAUSED by recorder_pause(). - /// @post The recorder state will be #RECORDER_STATE_READY. - /// @see recorder_pause() - /// @see recorder_cancel() - /// @see recorder_set_filename() - /// @see recorder_start() - int recorder_commit( - recorder_h recorder, - ) { - return _recorder_commit( - recorder, - ); - } - - late final _recorder_commitPtr = - _lookup>( - 'recorder_commit'); - late final _recorder_commit = - _recorder_commitPtr.asFunction(); - - /// @brief Cancels the recording. - /// @details The recording data is discarded and not written in the recording file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks When you want to record audio or video file, you need to add privilege according to rules below additionally. \n - /// If you want to save contents to internal storage, you should add mediastorage privilege. \n - /// If you want to save contents to external storage, you should add externalstorage privilege. - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_RECORDING set by recorder_start() or #RECORDER_STATE_PAUSED by recorder_pause(). - /// @post The recorder state will be #RECORDER_STATE_READY. - /// @see recorder_pause() - /// @see recorder_commit() - /// @see recorder_cancel() - /// @see recorder_start() - int recorder_cancel( - recorder_h recorder, - ) { - return _recorder_cancel( - recorder, - ); - } - - late final _recorder_cancelPtr = - _lookup>( - 'recorder_cancel'); - late final _recorder_cancel = - _recorder_cancelPtr.asFunction(); - - /// @brief Gets the recorder's current state. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[out] state The current state of the recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - int recorder_get_state( - recorder_h recorder, - ffi.Pointer state, - ) { - return _recorder_get_state( - recorder, - state, - ); - } - - late final _recorder_get_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - recorder_h, ffi.Pointer)>>('recorder_get_state'); - late final _recorder_get_state = _recorder_get_statePtr - .asFunction)>(); - - /// @brief Gets the peak audio input level that was sampled since the last call to this function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks @c 0 dB indicates maximum input level, @c -300 dB indicates minimum input level. - /// @param[in] recorder The handle to the media recorder - /// @param[out] dB The audio input level in dB - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_RECORDING or #RECORDER_STATE_PAUSED. - int recorder_get_audio_level( - recorder_h recorder, - ffi.Pointer dB, - ) { - return _recorder_get_audio_level( - recorder, - dB, - ); - } - - late final _recorder_get_audio_levelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, - ffi.Pointer)>>('recorder_get_audio_level'); - late final _recorder_get_audio_level = _recorder_get_audio_levelPtr - .asFunction)>(); - - /// @brief Sets the file path to record. - /// @details This function sets file path which defines where newly recorded data should be stored. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If the same file already exists in the file system, then old file will be overwritten. - /// @param[in] recorder The handle to the media recorder - /// @param[in] path The recording file path - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY. - /// @see recorder_get_filename() - int recorder_set_filename( - recorder_h recorder, - ffi.Pointer path, - ) { - return _recorder_set_filename( - recorder, - path, - ); - } - - late final _recorder_set_filenamePtr = _lookup< - ffi - .NativeFunction)>>( - 'recorder_set_filename'); - late final _recorder_set_filename = _recorder_set_filenamePtr - .asFunction)>(); - - /// @brief Gets the file path to record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a path using free(). - /// @param[in] recorder The handle to the media recorder - /// @param[out] path The recording file path - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_set_filename() - int recorder_get_filename( - recorder_h recorder, - ffi.Pointer> path, - ) { - return _recorder_get_filename( - recorder, - path, - ); - } - - late final _recorder_get_filenamePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, - ffi.Pointer>)>>('recorder_get_filename'); - late final _recorder_get_filename = _recorder_get_filenamePtr.asFunction< - int Function(recorder_h, ffi.Pointer>)>(); - - /// @brief Sets the file format for recording media stream. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks Since 2.3.1, it could be returned #RECORDER_ERROR_INVALID_OPERATION \n - /// when it's audio recorder and its state is #RECORDER_STATE_READY \n - /// because of checking codec compatibility with current encoder. - /// @param[in] recorder The handle to the media recorder - /// @param[in] format The media file format - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation (Since 2.3.1) - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY (for video recorder only).\n - /// Since 2.3.1, this API also works for audio recorder when its state is #RECORDER_STATE_READY. - /// @see recorder_get_file_format() - /// @see recorder_foreach_supported_file_format() - int recorder_set_file_format( - recorder_h recorder, - int format, - ) { - return _recorder_set_file_format( - recorder, - format, - ); - } - - late final _recorder_set_file_formatPtr = - _lookup>( - 'recorder_set_file_format'); - late final _recorder_set_file_format = - _recorder_set_file_formatPtr.asFunction(); - - /// @brief Gets the file format for recording media stream. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[out] format The media file format - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_set_file_format() - /// @see recorder_foreach_supported_file_format() - int recorder_get_file_format( - recorder_h recorder, - ffi.Pointer format, - ) { - return _recorder_get_file_format( - recorder, - format, - ); - } - - late final _recorder_get_file_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - recorder_h, ffi.Pointer)>>('recorder_get_file_format'); - late final _recorder_get_file_format = _recorder_get_file_formatPtr - .asFunction)>(); - - /// @brief Sets the recorder's sound manager stream information. - /// @since_tizen 3.0 - /// @remarks You can set sound stream information including audio routing. - /// For more details, please refer to @ref CAPI_MEDIA_SOUND_MANAGER_MODULE - /// @param[in] recorder The handle to the media recorder - /// @param[in] stream_info The sound manager info - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY - /// @see #sound_stream_info_h - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - int recorder_set_sound_stream_info( - recorder_h recorder, - sound_stream_info_h stream_info, - ) { - return _recorder_set_sound_stream_info( - recorder, - stream_info, - ); - } - - late final _recorder_set_sound_stream_infoPtr = _lookup< - ffi - .NativeFunction>( - 'recorder_set_sound_stream_info'); - late final _recorder_set_sound_stream_info = - _recorder_set_sound_stream_infoPtr - .asFunction(); - - /// @brief Retrieves all supported file formats by invoking a specific callback for each supported file format. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[in] callback The iteration callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post recorder_supported_file_format_cb() will be invoked. - /// @see recorder_get_file_format() - /// @see recorder_set_file_format() - /// @see recorder_supported_file_format_cb() - int recorder_foreach_supported_file_format( - recorder_h recorder, - recorder_supported_file_format_cb callback, - ffi.Pointer user_data, - ) { - return _recorder_foreach_supported_file_format( - recorder, - callback, - user_data, - ); - } - - late final _recorder_foreach_supported_file_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, recorder_supported_file_format_cb, - ffi.Pointer)>>( - 'recorder_foreach_supported_file_format'); - late final _recorder_foreach_supported_file_format = - _recorder_foreach_supported_file_formatPtr.asFunction< - int Function(recorder_h, recorder_supported_file_format_cb, - ffi.Pointer)>(); - - /// @brief Sets the audio codec for encoding an audio stream. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You can get available audio encoders by using recorder_foreach_supported_audio_encoder(). \n - /// If set to #RECORDER_AUDIO_CODEC_DISABLE, the audio track is not created in recording files.\n - /// Since 2.3.1, it could be returned #RECORDER_ERROR_INVALID_OPERATION \n - /// when it's audio recorder and its state is #RECORDER_STATE_READY \n - /// because of checking codec compatibility with current file format. - /// @param[in] recorder The handle to the media recorder - /// @param[in] codec The audio codec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation (Since 2.3.1) - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY. - /// @see recorder_get_audio_encoder() - /// @see recorder_foreach_supported_audio_encoder() - int recorder_set_audio_encoder( - recorder_h recorder, - int codec, - ) { - return _recorder_set_audio_encoder( - recorder, - codec, - ); - } - - late final _recorder_set_audio_encoderPtr = - _lookup>( - 'recorder_set_audio_encoder'); - late final _recorder_set_audio_encoder = _recorder_set_audio_encoderPtr - .asFunction(); - - /// @brief Gets the audio codec for encoding an audio stream. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[out] codec The audio codec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_set_audio_encoder() - /// @see recorder_foreach_supported_audio_encoder() - int recorder_get_audio_encoder( - recorder_h recorder, - ffi.Pointer codec, - ) { - return _recorder_get_audio_encoder( - recorder, - codec, - ); - } - - late final _recorder_get_audio_encoderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, - ffi.Pointer)>>('recorder_get_audio_encoder'); - late final _recorder_get_audio_encoder = _recorder_get_audio_encoderPtr - .asFunction)>(); - - /// @brief Retrieves all supported audio encoders by invoking a specific callback for each supported audio encoder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[in] callback The iteration callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post recorder_supported_audio_encoder_cb() will be invoked. - /// @see recorder_set_audio_encoder() - /// @see recorder_get_audio_encoder() - /// @see recorder_supported_audio_encoder_cb() - int recorder_foreach_supported_audio_encoder( - recorder_h recorder, - recorder_supported_audio_encoder_cb callback, - ffi.Pointer user_data, - ) { - return _recorder_foreach_supported_audio_encoder( - recorder, - callback, - user_data, - ); - } - - late final _recorder_foreach_supported_audio_encoderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, recorder_supported_audio_encoder_cb, - ffi.Pointer)>>( - 'recorder_foreach_supported_audio_encoder'); - late final _recorder_foreach_supported_audio_encoder = - _recorder_foreach_supported_audio_encoderPtr.asFunction< - int Function(recorder_h, recorder_supported_audio_encoder_cb, - ffi.Pointer)>(); - - /// @brief Sets the resolution of the video recording. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This function should be called before recording (recorder_start()). - /// @param[in] recorder The handle to the media recorder - /// @param[in] width The video width - /// @param[in] height The video height - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY. - /// @see recorder_start() - /// @see recorder_get_video_resolution() - /// @see recorder_foreach_supported_video_resolution() - int recorder_set_video_resolution( - recorder_h recorder, - int width, - int height, - ) { - return _recorder_set_video_resolution( - recorder, - width, - height, - ); - } - - late final _recorder_set_video_resolutionPtr = _lookup< - ffi.NativeFunction>( - 'recorder_set_video_resolution'); - late final _recorder_set_video_resolution = _recorder_set_video_resolutionPtr - .asFunction(); - - /// @brief Gets the resolution of the video recording. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[out] width The video width - /// @param[out] height The video height - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_set_video_resolution() - /// @see recorder_foreach_supported_video_resolution() - int recorder_get_video_resolution( - recorder_h recorder, - ffi.Pointer width, - ffi.Pointer height, - ) { - return _recorder_get_video_resolution( - recorder, - width, - height, - ); - } - - late final _recorder_get_video_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, ffi.Pointer, - ffi.Pointer)>>('recorder_get_video_resolution'); - late final _recorder_get_video_resolution = - _recorder_get_video_resolutionPtr.asFunction< - int Function( - recorder_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Retrieves all supported video resolutions by invoking callback function once for each supported video resolution. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[in] foreach_cb The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function invokes recorder_supported_video_resolution_cb() repeatedly to retrieve each supported video resolution. - /// @see recorder_set_video_resolution() - /// @see recorder_get_video_resolution() - /// @see recorder_supported_video_resolution_cb() - int recorder_foreach_supported_video_resolution( - recorder_h recorder, - recorder_supported_video_resolution_cb foreach_cb, - ffi.Pointer user_data, - ) { - return _recorder_foreach_supported_video_resolution( - recorder, - foreach_cb, - user_data, - ); - } - - late final _recorder_foreach_supported_video_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - recorder_h, - recorder_supported_video_resolution_cb, - ffi.Pointer)>>( - 'recorder_foreach_supported_video_resolution'); - late final _recorder_foreach_supported_video_resolution = - _recorder_foreach_supported_video_resolutionPtr.asFunction< - int Function(recorder_h, recorder_supported_video_resolution_cb, - ffi.Pointer)>(); - - /// @brief Sets the video codec for encoding video stream. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You can get available video encoders by using recorder_foreach_supported_video_encoder(). - /// @param[in] recorder The handle to the media recorder - /// @param[in] codec The video codec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY. - /// @see recorder_get_video_encoder() - /// @see recorder_foreach_supported_video_encoder() - int recorder_set_video_encoder( - recorder_h recorder, - int codec, - ) { - return _recorder_set_video_encoder( - recorder, - codec, - ); - } - - late final _recorder_set_video_encoderPtr = - _lookup>( - 'recorder_set_video_encoder'); - late final _recorder_set_video_encoder = _recorder_set_video_encoderPtr - .asFunction(); - - /// @brief Gets the video codec for encoding video stream. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[out] codec The video codec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_set_video_encoder() - /// @see recorder_foreach_supported_video_encoder() - int recorder_get_video_encoder( - recorder_h recorder, - ffi.Pointer codec, - ) { - return _recorder_get_video_encoder( - recorder, - codec, - ); - } - - late final _recorder_get_video_encoderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, - ffi.Pointer)>>('recorder_get_video_encoder'); - late final _recorder_get_video_encoder = _recorder_get_video_encoderPtr - .asFunction)>(); - - /// @brief Retrieves all supported video encoders by invoking a specific callback for each supported video encoder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[in] callback The iteration callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post recorder_supported_video_encoder_cb() will be invoked. - /// @see recorder_set_video_encoder() - /// @see recorder_get_video_encoder() - /// @see recorder_supported_video_encoder_cb() - int recorder_foreach_supported_video_encoder( - recorder_h recorder, - recorder_supported_video_encoder_cb callback, - ffi.Pointer user_data, - ) { - return _recorder_foreach_supported_video_encoder( - recorder, - callback, - user_data, - ); - } - - late final _recorder_foreach_supported_video_encoderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, recorder_supported_video_encoder_cb, - ffi.Pointer)>>( - 'recorder_foreach_supported_video_encoder'); - late final _recorder_foreach_supported_video_encoder = - _recorder_foreach_supported_video_encoderPtr.asFunction< - int Function(recorder_h, recorder_supported_video_encoder_cb, - ffi.Pointer)>(); - - /// @brief Registers the callback function that will be invoked when the recorder state changes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[in] callback The function pointer of user callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post recorder_state_changed_cb() will be invoked. - /// @see recorder_unset_state_changed_cb() - /// @see recorder_state_changed_cb() - int recorder_set_state_changed_cb( - recorder_h recorder, - recorder_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _recorder_set_state_changed_cb( - recorder, - callback, - user_data, - ); - } - - late final _recorder_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, recorder_state_changed_cb, - ffi.Pointer)>>('recorder_set_state_changed_cb'); - late final _recorder_set_state_changed_cb = - _recorder_set_state_changed_cbPtr.asFunction< - int Function( - recorder_h, recorder_state_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_set_state_changed_cb() - int recorder_unset_state_changed_cb( - recorder_h recorder, - ) { - return _recorder_unset_state_changed_cb( - recorder, - ); - } - - late final _recorder_unset_state_changed_cbPtr = - _lookup>( - 'recorder_unset_state_changed_cb'); - late final _recorder_unset_state_changed_cb = - _recorder_unset_state_changed_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be called when the media recorder is interrupted according to a policy. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_unset_interrupted_cb() - /// @see recorder_interrupted_cb() - int recorder_set_interrupted_cb( - recorder_h recorder, - recorder_interrupted_cb callback, - ffi.Pointer user_data, - ) { - return _recorder_set_interrupted_cb( - recorder, - callback, - user_data, - ); - } - - late final _recorder_set_interrupted_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, recorder_interrupted_cb, - ffi.Pointer)>>('recorder_set_interrupted_cb'); - late final _recorder_set_interrupted_cb = - _recorder_set_interrupted_cbPtr.asFunction< - int Function( - recorder_h, recorder_interrupted_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_set_interrupted_cb() - int recorder_unset_interrupted_cb( - recorder_h recorder, - ) { - return _recorder_unset_interrupted_cb( - recorder, - ); - } - - late final _recorder_unset_interrupted_cbPtr = - _lookup>( - 'recorder_unset_interrupted_cb'); - late final _recorder_unset_interrupted_cb = - _recorder_unset_interrupted_cbPtr.asFunction(); - - /// @brief Registers a callback function to be called when the media recorder interrupt is started according to a policy. - /// @since_tizen 4.0 - /// @param[in] recorder The handle to the media recorder - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see recorder_unset_interrupt_started_cb() - /// @see recorder_interrupt_started_cb() - int recorder_set_interrupt_started_cb( - recorder_h recorder, - recorder_interrupt_started_cb callback, - ffi.Pointer user_data, - ) { - return _recorder_set_interrupt_started_cb( - recorder, - callback, - user_data, - ); - } - - late final _recorder_set_interrupt_started_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, recorder_interrupt_started_cb, - ffi.Pointer)>>('recorder_set_interrupt_started_cb'); - late final _recorder_set_interrupt_started_cb = - _recorder_set_interrupt_started_cbPtr.asFunction< - int Function(recorder_h, recorder_interrupt_started_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen 4.0 - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see recorder_set_interrupt_started_cb() - int recorder_unset_interrupt_started_cb( - recorder_h recorder, - ) { - return _recorder_unset_interrupt_started_cb( - recorder, - ); - } - - late final _recorder_unset_interrupt_started_cbPtr = - _lookup>( - 'recorder_unset_interrupt_started_cb'); - late final _recorder_unset_interrupt_started_cb = - _recorder_unset_interrupt_started_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be called when audio stream data is being delivered. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This callback function holds the same buffer that will be recorded. \n - /// Therefore if an user changes the buffer, the result file will have the buffer. \n - /// @remarks The callback is called via internal thread of Frameworks. Therefore do not invoke UI API, recorder_unprepare(), recorder_commit() and recorder_cancel() in callback.\n - /// This callback function to be called in #RECORDER_STATE_RECORDING and #RECORDER_STATE_PAUSED state. - /// - /// @param[in] recorder The handle to the recorder - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state should be #RECORDER_STATE_READY or #RECORDER_STATE_CREATED. - /// @see recorder_unset_audio_stream_cb() - /// @see recorder_audio_stream_cb() - int recorder_set_audio_stream_cb( - recorder_h recorder, - recorder_audio_stream_cb callback, - ffi.Pointer user_data, - ) { - return _recorder_set_audio_stream_cb( - recorder, - callback, - user_data, - ); - } - - late final _recorder_set_audio_stream_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, recorder_audio_stream_cb, - ffi.Pointer)>>('recorder_set_audio_stream_cb'); - late final _recorder_set_audio_stream_cb = - _recorder_set_audio_stream_cbPtr.asFunction< - int Function( - recorder_h, recorder_audio_stream_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_set_audio_stream_cb() - int recorder_unset_audio_stream_cb( - recorder_h recorder, - ) { - return _recorder_unset_audio_stream_cb( - recorder, - ); - } - - late final _recorder_unset_audio_stream_cbPtr = - _lookup>( - 'recorder_unset_audio_stream_cb'); - late final _recorder_unset_audio_stream_cb = - _recorder_unset_audio_stream_cbPtr.asFunction(); - - /// @brief Registers a callback function to be called when muxed stream data is delivered. - /// @since_tizen 4.0 - /// @remarks This callback receives the data that will be recorded, \n - /// but any changes to this data will not affect the recorded file. - /// @param[in] recorder The handle to the recorder - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @pre The recorder state should be #RECORDER_STATE_READY or #RECORDER_STATE_CREATED. - /// @see recorder_unset_muxed_stream_cb() - /// @see recorder_muxed_stream_cb() - int recorder_set_muxed_stream_cb( - recorder_h recorder, - recorder_muxed_stream_cb callback, - ffi.Pointer user_data, - ) { - return _recorder_set_muxed_stream_cb( - recorder, - callback, - user_data, - ); - } - - late final _recorder_set_muxed_stream_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, recorder_muxed_stream_cb, - ffi.Pointer)>>('recorder_set_muxed_stream_cb'); - late final _recorder_set_muxed_stream_cb = - _recorder_set_muxed_stream_cbPtr.asFunction< - int Function( - recorder_h, recorder_muxed_stream_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen 4.0 - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @pre The recorder state should be #RECORDER_STATE_READY or #RECORDER_STATE_CREATED. - /// @see recorder_set_muxed_stream_cb() - int recorder_unset_muxed_stream_cb( - recorder_h recorder, - ) { - return _recorder_unset_muxed_stream_cb( - recorder, - ); - } - - late final _recorder_unset_muxed_stream_cbPtr = - _lookup>( - 'recorder_unset_muxed_stream_cb'); - late final _recorder_unset_muxed_stream_cb = - _recorder_unset_muxed_stream_cbPtr.asFunction(); - - /// @brief Registers a callback function to be invoked when the recording information changes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[in] callback The function pointer of user callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post recorder_recording_status_cb() will be invoked. - /// @see recorder_unset_recording_status_cb() - /// @see recorder_recording_status_cb() - int recorder_set_recording_status_cb( - recorder_h recorder, - recorder_recording_status_cb callback, - ffi.Pointer user_data, - ) { - return _recorder_set_recording_status_cb( - recorder, - callback, - user_data, - ); - } - - late final _recorder_set_recording_status_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, recorder_recording_status_cb, - ffi.Pointer)>>('recorder_set_recording_status_cb'); - late final _recorder_set_recording_status_cb = - _recorder_set_recording_status_cbPtr.asFunction< - int Function(recorder_h, recorder_recording_status_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_set_recording_status_cb() - int recorder_unset_recording_status_cb( - recorder_h recorder, - ) { - return _recorder_unset_recording_status_cb( - recorder, - ); - } - - late final _recorder_unset_recording_status_cbPtr = - _lookup>( - 'recorder_unset_recording_status_cb'); - late final _recorder_unset_recording_status_cb = - _recorder_unset_recording_status_cbPtr - .asFunction(); - - /// @brief Registers the callback function to be run when reached the recording limit. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to media recorder - /// @param[in] callback The function pointer of user callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post recorder_recording_limit_reached_cb() will be invoked. - /// @see recorder_unset_recording_limit_reached_cb() - /// @see recorder_attr_set_size_limit() - /// @see recorder_attr_set_time_limit() - /// @see recorder_recording_limit_reached_cb() - int recorder_set_recording_limit_reached_cb( - recorder_h recorder, - recorder_recording_limit_reached_cb callback, - ffi.Pointer user_data, - ) { - return _recorder_set_recording_limit_reached_cb( - recorder, - callback, - user_data, - ); - } - - late final _recorder_set_recording_limit_reached_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, recorder_recording_limit_reached_cb, - ffi.Pointer)>>( - 'recorder_set_recording_limit_reached_cb'); - late final _recorder_set_recording_limit_reached_cb = - _recorder_set_recording_limit_reached_cbPtr.asFunction< - int Function(recorder_h, recorder_recording_limit_reached_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_set_recording_limit_reached_cb() - int recorder_unset_recording_limit_reached_cb( - recorder_h recorder, - ) { - return _recorder_unset_recording_limit_reached_cb( - recorder, - ); - } - - late final _recorder_unset_recording_limit_reached_cbPtr = - _lookup>( - 'recorder_unset_recording_limit_reached_cb'); - late final _recorder_unset_recording_limit_reached_cb = - _recorder_unset_recording_limit_reached_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be called when an asynchronous operation error occurred. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This callback informs critical error situation.\n - /// When this callback is invoked, user should release the resource and terminate the application. \n - /// These error codes will occur. \n - /// #RECORDER_ERROR_DEVICE \n - /// #RECORDER_ERROR_INVALID_OPERATION \n - /// #RECORDER_ERROR_OUT_OF_MEMORY - /// @param[in] recorder The handle to the recorder - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @post This function will invoke recorder_error_cb() when an asynchronous operation error occur. - /// @see recorder_unset_error_cb() - /// @see recorder_error_cb() - int recorder_set_error_cb( - recorder_h recorder, - recorder_error_cb callback, - ffi.Pointer user_data, - ) { - return _recorder_set_error_cb( - recorder, - callback, - user_data, - ); - } - - late final _recorder_set_error_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, recorder_error_cb, - ffi.Pointer)>>('recorder_set_error_cb'); - late final _recorder_set_error_cb = _recorder_set_error_cbPtr.asFunction< - int Function(recorder_h, recorder_error_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the recorder - /// @return @c on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_set_error_cb() - int recorder_unset_error_cb( - recorder_h recorder, - ) { - return _recorder_unset_error_cb( - recorder, - ); - } - - late final _recorder_unset_error_cbPtr = - _lookup>( - 'recorder_unset_error_cb'); - late final _recorder_unset_error_cb = - _recorder_unset_error_cbPtr.asFunction(); - - /// @brief Gets the state of recorder device. - /// @since_tizen 3.0 - /// @param[in] type The recorder type - /// @param[out] state The current state of the device - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - int recorder_get_device_state( - int type, - ffi.Pointer state, - ) { - return _recorder_get_device_state( - type, - state, - ); - } - - late final _recorder_get_device_statePtr = _lookup< - ffi - .NativeFunction)>>( - 'recorder_get_device_state'); - late final _recorder_get_device_state = _recorder_get_device_statePtr - .asFunction)>(); - - /// @brief Registers a callback function to be called when the recorder device state changes. - /// @since_tizen 3.0 - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] cb_id The id of the registered callback - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @post This function will invoke recorder_device_state_changed_cb() when the recorder device's state changes. - /// @see recorder_remove_device_state_changed_cb() - /// @see recorder_device_state_changed_cb() - int recorder_add_device_state_changed_cb( - recorder_device_state_changed_cb callback, - ffi.Pointer user_data, - ffi.Pointer cb_id, - ) { - return _recorder_add_device_state_changed_cb( - callback, - user_data, - cb_id, - ); - } - - late final _recorder_add_device_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - recorder_device_state_changed_cb, - ffi.Pointer, - ffi.Pointer)>>('recorder_add_device_state_changed_cb'); - late final _recorder_add_device_state_changed_cb = - _recorder_add_device_state_changed_cbPtr.asFunction< - int Function(recorder_device_state_changed_cb, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Unregisters a callback function. - /// @since_tizen 3.0 - /// @param[in] cb_id The id of the registered callback - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @see recorder_add_device_state_changed_cb() - int recorder_remove_device_state_changed_cb( - int cb_id, - ) { - return _recorder_remove_device_state_changed_cb( - cb_id, - ); - } - - late final _recorder_remove_device_state_changed_cbPtr = - _lookup>( - 'recorder_remove_device_state_changed_cb'); - late final _recorder_remove_device_state_changed_cb = - _recorder_remove_device_state_changed_cbPtr - .asFunction(); - - /// @brief Sets the maximum size of a recording file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks After reaching the limitation, the recording data is discarded and not written in the recording file. - /// @param[in] recorder The handle to the media recorder - /// @param[in] kbyte The maximum size of the recording file(KB) \n - /// @c 0 means unlimited recording size. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY. - /// @see recorder_attr_get_size_limit() - /// @see recorder_attr_set_time_limit() - int recorder_attr_set_size_limit( - recorder_h recorder, - int kbyte, - ) { - return _recorder_attr_set_size_limit( - recorder, - kbyte, - ); - } - - late final _recorder_attr_set_size_limitPtr = - _lookup>( - 'recorder_attr_set_size_limit'); - late final _recorder_attr_set_size_limit = _recorder_attr_set_size_limitPtr - .asFunction(); - - /// @brief Gets the maximum size of a recording file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[out] kbyte The maximum size of recording file (KB) \n - /// @c 0 means unlimited recording size. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_attr_set_size_limit() - /// @see recorder_attr_get_time_limit() - int recorder_attr_get_size_limit( - recorder_h recorder, - ffi.Pointer kbyte, - ) { - return _recorder_attr_get_size_limit( - recorder, - kbyte, - ); - } - - late final _recorder_attr_get_size_limitPtr = _lookup< - ffi - .NativeFunction)>>( - 'recorder_attr_get_size_limit'); - late final _recorder_attr_get_size_limit = _recorder_attr_get_size_limitPtr - .asFunction)>(); - - /// @brief Sets the time limit of a recording file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks After reaching the limitation, the recording data is discarded and not written in the recording file. - /// @param[in] recorder The handle to the media recorder - /// @param[in] second The time limit of the recording file (in seconds) \n - /// @c 0 means unlimited recording size. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY. - /// @see recorder_attr_get_time_limit() - /// @see recorder_attr_set_size_limit() - int recorder_attr_set_time_limit( - recorder_h recorder, - int second, - ) { - return _recorder_attr_set_time_limit( - recorder, - second, - ); - } - - late final _recorder_attr_set_time_limitPtr = - _lookup>( - 'recorder_attr_set_time_limit'); - late final _recorder_attr_set_time_limit = _recorder_attr_set_time_limitPtr - .asFunction(); - - /// @brief Gets the time limit of a recording file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[out] second The time limit of the recording file (in seconds) \n - /// @c 0 means unlimited recording time. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_attr_set_time_limit() - /// @see recorder_attr_get_size_limit() - int recorder_attr_get_time_limit( - recorder_h recorder, - ffi.Pointer second, - ) { - return _recorder_attr_get_time_limit( - recorder, - second, - ); - } - - late final _recorder_attr_get_time_limitPtr = _lookup< - ffi - .NativeFunction)>>( - 'recorder_attr_get_time_limit'); - late final _recorder_attr_get_time_limit = _recorder_attr_get_time_limitPtr - .asFunction)>(); - - /// @brief Sets the audio device for recording. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[in] device The type of an audio device - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY (for video recorder only).\n - /// Since 2.3.1, this API also works for audio recorder when its state is #RECORDER_STATE_READY. - /// @see recorder_attr_get_audio_device() - int recorder_attr_set_audio_device( - recorder_h recorder, - int device, - ) { - return _recorder_attr_set_audio_device( - recorder, - device, - ); - } - - late final _recorder_attr_set_audio_devicePtr = - _lookup>( - 'recorder_attr_set_audio_device'); - late final _recorder_attr_set_audio_device = - _recorder_attr_set_audio_devicePtr - .asFunction(); - - /// @brief Gets the audio device for recording. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[out] device The type of an audio device - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_attr_set_audio_device() - int recorder_attr_get_audio_device( - recorder_h recorder, - ffi.Pointer device, - ) { - return _recorder_attr_get_audio_device( - recorder, - device, - ); - } - - late final _recorder_attr_get_audio_devicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, - ffi.Pointer)>>('recorder_attr_get_audio_device'); - late final _recorder_attr_get_audio_device = - _recorder_attr_get_audio_devicePtr - .asFunction)>(); - - /// @brief Sets the sampling rate of an audio stream. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[in] samplerate The sample rate in Hertz - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY (for video recorder only).\n - /// Since 2.3.1, this API also works for audio recorder when its state is #RECORDER_STATE_READY. - /// @see recorder_attr_get_audio_samplerate() - int recorder_attr_set_audio_samplerate( - recorder_h recorder, - int samplerate, - ) { - return _recorder_attr_set_audio_samplerate( - recorder, - samplerate, - ); - } - - late final _recorder_attr_set_audio_sampleratePtr = - _lookup>( - 'recorder_attr_set_audio_samplerate'); - late final _recorder_attr_set_audio_samplerate = - _recorder_attr_set_audio_sampleratePtr - .asFunction(); - - /// @brief Gets the sampling rate of an audio stream. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[out] samplerate The sample rate in Hertz - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_attr_set_audio_samplerate() - int recorder_attr_get_audio_samplerate( - recorder_h recorder, - ffi.Pointer samplerate, - ) { - return _recorder_attr_get_audio_samplerate( - recorder, - samplerate, - ); - } - - late final _recorder_attr_get_audio_sampleratePtr = _lookup< - ffi - .NativeFunction)>>( - 'recorder_attr_get_audio_samplerate'); - late final _recorder_attr_get_audio_samplerate = - _recorder_attr_get_audio_sampleratePtr - .asFunction)>(); - - /// @brief Sets the bitrate of an audio encoder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[in] bitrate The bitrate (for mms : 12200[bps], normal : 288000[bps]) - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY. - /// @see recorder_attr_get_audio_encoder_bitrate() - int recorder_attr_set_audio_encoder_bitrate( - recorder_h recorder, - int bitrate, - ) { - return _recorder_attr_set_audio_encoder_bitrate( - recorder, - bitrate, - ); - } - - late final _recorder_attr_set_audio_encoder_bitratePtr = - _lookup>( - 'recorder_attr_set_audio_encoder_bitrate'); - late final _recorder_attr_set_audio_encoder_bitrate = - _recorder_attr_set_audio_encoder_bitratePtr - .asFunction(); - - /// @brief Sets the bitrate of a video encoder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[in] bitrate The bitrate in bits per second - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY. - /// @see recorder_attr_get_video_encoder_bitrate() - int recorder_attr_set_video_encoder_bitrate( - recorder_h recorder, - int bitrate, - ) { - return _recorder_attr_set_video_encoder_bitrate( - recorder, - bitrate, - ); - } - - late final _recorder_attr_set_video_encoder_bitratePtr = - _lookup>( - 'recorder_attr_set_video_encoder_bitrate'); - late final _recorder_attr_set_video_encoder_bitrate = - _recorder_attr_set_video_encoder_bitratePtr - .asFunction(); - - /// @brief Gets the bitrate of an audio encoder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[out] bitrate The bitrate in bits per second - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_attr_set_audio_encoder_bitrate() - int recorder_attr_get_audio_encoder_bitrate( - recorder_h recorder, - ffi.Pointer bitrate, - ) { - return _recorder_attr_get_audio_encoder_bitrate( - recorder, - bitrate, - ); - } - - late final _recorder_attr_get_audio_encoder_bitratePtr = _lookup< - ffi - .NativeFunction)>>( - 'recorder_attr_get_audio_encoder_bitrate'); - late final _recorder_attr_get_audio_encoder_bitrate = - _recorder_attr_get_audio_encoder_bitratePtr - .asFunction)>(); - - /// @brief Gets the bitrate of a video encoder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[out] bitrate The bitrate in bits per second - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_attr_set_audio_encoder_bitrate() - int recorder_attr_get_video_encoder_bitrate( - recorder_h recorder, - ffi.Pointer bitrate, - ) { - return _recorder_attr_get_video_encoder_bitrate( - recorder, - bitrate, - ); - } - - late final _recorder_attr_get_video_encoder_bitratePtr = _lookup< - ffi - .NativeFunction)>>( - 'recorder_attr_get_video_encoder_bitrate'); - late final _recorder_attr_get_video_encoder_bitrate = - _recorder_attr_get_video_encoder_bitratePtr - .asFunction)>(); - - /// @brief Sets the mute state of a recorder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[in] enable The mute state - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_attr_is_muted() - int recorder_attr_set_mute( - recorder_h recorder, - bool enable, - ) { - return _recorder_attr_set_mute( - recorder, - enable, - ); - } - - late final _recorder_attr_set_mutePtr = - _lookup>( - 'recorder_attr_set_mute'); - late final _recorder_attr_set_mute = - _recorder_attr_set_mutePtr.asFunction(); - - /// @brief Gets the mute state of a recorder. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @return @c true if the recorder is not recording any sound, - /// otherwise @c false if the recorder is recording - /// @exception #RECORDER_ERROR_NONE Successful - /// @exception #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @exception #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @see recorder_attr_set_mute() - bool recorder_attr_is_muted( - recorder_h recorder, - ) { - return _recorder_attr_is_muted( - recorder, - ); - } - - late final _recorder_attr_is_mutedPtr = - _lookup>( - 'recorder_attr_is_muted'); - late final _recorder_attr_is_muted = - _recorder_attr_is_mutedPtr.asFunction(); - - /// @brief Sets the recording motion rate. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This attribute is valid only in a video recorder. \n - /// If the rate bigger than @c 0 and smaller than @c 1, video is recorded in a slow motion mode. \n - /// If the rate bigger than @c 1, video is recorded in a fast motion mode (time lapse recording). - /// @remarks Audio data is not recorded. \n - /// To reset slow motion recording, set the rate to @c 1. - /// @param[in] recorder The handle to the media recorder - /// @param[in] rate The recording motion rate \n - /// It is computed with fps. (@c 0>( - 'recorder_attr_set_recording_motion_rate'); - late final _recorder_attr_set_recording_motion_rate = - _recorder_attr_set_recording_motion_ratePtr - .asFunction(); - - /// @brief Gets the recording motion rate. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This attribute is valid only in a video recorder. \n - /// If the rate bigger than @c 0 and smaller than @c 1, video is recorded in a slow motion mode. \n - /// If the rate bigger than @c 1, video is recorded in a fast motion mode (time lapse recording). - /// @remarks Audio data is not recorded. \n - /// To reset slow motion recording, set the rate to @c 1. - /// @param[in] recorder The handle to the media recorder - /// @param[out] rate The recording motion rate \n - /// It is computed with fps. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_attr_set_recording_motion_rate() - int recorder_attr_get_recording_motion_rate( - recorder_h recorder, - ffi.Pointer rate, - ) { - return _recorder_attr_get_recording_motion_rate( - recorder, - rate, - ); - } - - late final _recorder_attr_get_recording_motion_ratePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, ffi.Pointer)>>( - 'recorder_attr_get_recording_motion_rate'); - late final _recorder_attr_get_recording_motion_rate = - _recorder_attr_get_recording_motion_ratePtr - .asFunction)>(); - - /// @brief Sets the number of the audio channel. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This attribute is applied only in RECORDER_STATE_CREATED state. \n - /// For mono recording, setting channel to @c 1. \n - /// For stereo recording, setting channel to @c 2. - /// @param[in] recorder The handle to the media recorder - /// @param[in] channel_count The number of the audio channel - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY (for video recorder only).\n - /// Since 2.3.1, this API also works for audio recorder when its state is #RECORDER_STATE_READY. - /// @see recorder_attr_get_audio_channel() - int recorder_attr_set_audio_channel( - recorder_h recorder, - int channel_count, - ) { - return _recorder_attr_set_audio_channel( - recorder, - channel_count, - ); - } - - late final _recorder_attr_set_audio_channelPtr = - _lookup>( - 'recorder_attr_set_audio_channel'); - late final _recorder_attr_set_audio_channel = - _recorder_attr_set_audio_channelPtr - .asFunction(); - - /// @brief Gets the number of the audio channel. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to the media recorder - /// @param[out] channel_count The number of the audio channel - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_attr_set_audio_channel() - int recorder_attr_get_audio_channel( - recorder_h recorder, - ffi.Pointer channel_count, - ) { - return _recorder_attr_get_audio_channel( - recorder, - channel_count, - ); - } - - late final _recorder_attr_get_audio_channelPtr = _lookup< - ffi - .NativeFunction)>>( - 'recorder_attr_get_audio_channel'); - late final _recorder_attr_get_audio_channel = - _recorder_attr_get_audio_channelPtr - .asFunction)>(); - - /// @brief Sets the video orientation in a video metadata tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to a media recorder - /// @param[in] orientation The information of the video orientation - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_attr_get_orientation_tag() - int recorder_attr_set_orientation_tag( - recorder_h recorder, - int orientation, - ) { - return _recorder_attr_set_orientation_tag( - recorder, - orientation, - ); - } - - late final _recorder_attr_set_orientation_tagPtr = - _lookup>( - 'recorder_attr_set_orientation_tag'); - late final _recorder_attr_set_orientation_tag = - _recorder_attr_set_orientation_tagPtr - .asFunction(); - - /// @brief Gets the video orientation in a video metadata tag. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] recorder The handle to a media recorder - /// @param[out] orientation The information of the video orientation - /// @return @c 0 on success, otherwise a negative error value - /// @retval #RECORDER_ERROR_NONE Successful - /// @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #RECORDER_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected - /// @see recorder_attr_set_orientation_tag() - int recorder_attr_get_orientation_tag( - recorder_h recorder, - ffi.Pointer orientation, - ) { - return _recorder_attr_get_orientation_tag( - recorder, - orientation, - ); - } - - late final _recorder_attr_get_orientation_tagPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(recorder_h, - ffi.Pointer)>>('recorder_attr_get_orientation_tag'); - late final _recorder_attr_get_orientation_tag = - _recorder_attr_get_orientation_tagPtr - .asFunction)>(); - - /// @brief Creates a new screen mirroring sink handle. - /// @since_tizen 2.4 - /// - /// @remarks You must release @a scmirroring_sink using scmirroring_sink_destroy(). - /// - /// @param[out] scmirroring_sink A newly returned handle to the screen mirroring sink - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SCMIRRORING_ERROR_NONE Successful - /// @retval #SCMIRRORING_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SCMIRRORING_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SCMIRRORING_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SCMIRRORING_ERROR_NOT_SUPPORTED Not supported - /// @retval #SCMIRRORING_ERROR_UNKNOWN Unknown Error - /// - /// @post The screen mirroring state will be #SCMIRRORING_SINK_STATE_NULL - /// - /// @see scmirroring_sink_destroy() - int scmirroring_sink_create( - ffi.Pointer scmirroring_sink, - ) { - return _scmirroring_sink_create( - scmirroring_sink, - ); - } - - late final _scmirroring_sink_createPtr = _lookup< - ffi - .NativeFunction)>>( - 'scmirroring_sink_create'); - late final _scmirroring_sink_create = _scmirroring_sink_createPtr - .asFunction)>(); - - /// @brief Registers a callback function to be called when state change happens. - /// @details This function registers user callback and this callback is called when each status is changed. - /// - /// @since_tizen 2.4 - /// - /// @param[in] scmirroring_sink The handle to the screen mirroring sink - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data passed to the callback registration function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SCMIRRORING_ERROR_NONE Successful - /// @retval #SCMIRRORING_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SCMIRRORING_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SCMIRRORING_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SCMIRRORING_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SCMIRRORING_ERROR_NOT_SUPPORTED Not supported - /// @retval #SCMIRRORING_ERROR_UNKNOWN Unknown Error - /// - /// @pre Create a screen mirroring sink handle by calling scmirroring_sink_create(). - /// - /// @see scmirroring_sink_create() - int scmirroring_sink_set_state_changed_cb( - scmirroring_sink_h scmirroring_sink, - scmirroring_sink_state_cb callback, - ffi.Pointer user_data, - ) { - return _scmirroring_sink_set_state_changed_cb( - scmirroring_sink, - callback, - user_data, - ); - } - - late final _scmirroring_sink_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(scmirroring_sink_h, scmirroring_sink_state_cb, - ffi.Pointer)>>('scmirroring_sink_set_state_changed_cb'); - late final _scmirroring_sink_set_state_changed_cb = - _scmirroring_sink_set_state_changed_cbPtr.asFunction< - int Function(scmirroring_sink_h, scmirroring_sink_state_cb, - ffi.Pointer)>(); - - /// @brief Sets server IP and port. - /// - /// @since_tizen 2.4 - /// - /// @param[in] scmirroring_sink The handle to the screen mirroring sink - /// @param[in] ip The server IP address to connect to - /// @param[in] port The server port to connect to - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SCMIRRORING_ERROR_NONE Successful - /// @retval #SCMIRRORING_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SCMIRRORING_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SCMIRRORING_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SCMIRRORING_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SCMIRRORING_ERROR_NOT_SUPPORTED Not supported - /// @retval #SCMIRRORING_ERROR_UNKNOWN Unknown Error - /// - /// @pre Create a screen mirroring sink handle by calling scmirroring_sink_create(). - /// - /// @see scmirroring_sink_create() - int scmirroring_sink_set_ip_and_port( - scmirroring_sink_h scmirroring_sink, - ffi.Pointer ip, - ffi.Pointer port, - ) { - return _scmirroring_sink_set_ip_and_port( - scmirroring_sink, - ip, - port, - ); - } - - late final _scmirroring_sink_set_ip_and_portPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(scmirroring_sink_h, ffi.Pointer, - ffi.Pointer)>>('scmirroring_sink_set_ip_and_port'); - late final _scmirroring_sink_set_ip_and_port = - _scmirroring_sink_set_ip_and_portPtr.asFunction< - int Function(scmirroring_sink_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Pass window handle created by application and surface type(x11/evas). - /// @details This function will use handle created by the application to set the overlay & - /// display on the surface passed by the application - /// - /// @since_tizen 2.4 - /// - /// @param[in] scmirroring_sink The handle to the screen mirroring sink - /// @param[in] type Surface type(x11/evas) - /// @param[in] display_surface The display_surface created by application to force sink to display content over it - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SCMIRRORING_ERROR_NONE Successful - /// @retval #SCMIRRORING_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SCMIRRORING_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SCMIRRORING_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SCMIRRORING_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SCMIRRORING_ERROR_NOT_SUPPORTED Not supported - /// @retval #SCMIRRORING_ERROR_UNKNOWN Unknown Error - /// - /// @pre Create a screen mirroring sink handle by calling scmirroring_sink_create(). - /// - /// @see scmirroring_sink_create() - int scmirroring_sink_set_display( - scmirroring_sink_h scmirroring_sink, - int type, - ffi.Pointer display_surface, - ) { - return _scmirroring_sink_set_display( - scmirroring_sink, - type, - display_surface, - ); - } - - late final _scmirroring_sink_set_displayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(scmirroring_sink_h, ffi.Int32, - ffi.Pointer)>>('scmirroring_sink_set_display'); - late final _scmirroring_sink_set_display = - _scmirroring_sink_set_displayPtr.asFunction< - int Function(scmirroring_sink_h, int, ffi.Pointer)>(); - - /// @brief Sets resolutions of screen mirroring sink. - /// @details This function sets resolutions of screen mirroring sink using scmirroring_resolution_e as following. - /// (ex. SCMIRRORING_RESOLUTION_1920x1080_P30 | SCMIRRORING_RESOLUTION_1280x720_P30) - /// Use it only when you want to set specific resolutions but if screen mirroring source dose not support - /// the resolutions which you set, the screen mirroring sink will be disconnected. - /// - /// @since_tizen 2.4 - /// - /// @param[in] scmirroring_sink The handle to the screen mirroring sink - /// @param[in] resolution Resolution of screen mirroring sink - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SCMIRRORING_ERROR_NONE Successful - /// @retval #SCMIRRORING_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SCMIRRORING_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SCMIRRORING_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SCMIRRORING_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SCMIRRORING_ERROR_NOT_SUPPORTED Not supported - /// @retval #SCMIRRORING_ERROR_UNKNOWN Unknown Error - /// - /// @pre Create a screen mirroring sink handle by calling scmirroring_sink_create(). - /// - /// @see scmirroring_sink_create() - int scmirroring_sink_set_resolution( - scmirroring_sink_h scmirroring_sink, - int resolution, - ) { - return _scmirroring_sink_set_resolution( - scmirroring_sink, - resolution, - ); - } - - late final _scmirroring_sink_set_resolutionPtr = _lookup< - ffi.NativeFunction>( - 'scmirroring_sink_set_resolution'); - late final _scmirroring_sink_set_resolution = - _scmirroring_sink_set_resolutionPtr - .asFunction(); - - /// @brief Prepares the screen mirroring sink handle and allocates specific resources. - /// @since_tizen 2.4 - /// - /// @param[in] scmirroring_sink The handle to the screen mirroring sink - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SCMIRRORING_ERROR_NONE Successful - /// @retval #SCMIRRORING_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SCMIRRORING_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SCMIRRORING_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SCMIRRORING_ERROR_NOT_SUPPORTED Not supported - /// @retval #SCMIRRORING_ERROR_UNKNOWN Unknown Error - /// - /// @pre Create a screen mirroring sink handle by calling scmirroring_sink_create(). - /// @pre Register user callback by calling scmirroring_sink_set_state_changed_cb(). - /// @pre The screen mirroring state should be #SCMIRRORING_SINK_STATE_NULL - /// @post The screen mirroring state will be #SCMIRRORING_SINK_STATE_PREPARED - /// - /// @see scmirroring_sink_create() - /// @see scmirroring_sink_set_state_changed_cb() - int scmirroring_sink_prepare( - scmirroring_sink_h scmirroring_sink, - ) { - return _scmirroring_sink_prepare( - scmirroring_sink, - ); - } - - late final _scmirroring_sink_preparePtr = - _lookup>( - 'scmirroring_sink_prepare'); - late final _scmirroring_sink_prepare = _scmirroring_sink_preparePtr - .asFunction(); - - /// @brief Creates connection and prepare for receiving data from SCMIRRORING source. - /// - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// - /// @param[in] scmirroring_sink The handle to the screen mirroring sink - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SCMIRRORING_ERROR_NONE Successful - /// @retval #SCMIRRORING_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SCMIRRORING_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SCMIRRORING_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SCMIRRORING_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SCMIRRORING_ERROR_NOT_SUPPORTED Not supported - /// @retval #SCMIRRORING_ERROR_UNKNOWN Unknown Error - /// - /// @pre Create a screen mirroring sink handle by calling scmirroring_sink_create(). - /// @pre Register user callback by calling scmirroring_sink_set_state_changed_cb(). - /// @pre Call scmirroring_sink_prepare() - /// @pre The screen mirroring state should be #SCMIRRORING_SINK_STATE_PREPARED - /// @post The screen mirroring state will be #SCMIRRORING_SINK_STATE_CONNECTED - /// - /// @see scmirroring_sink_create() - /// @see scmirroring_sink_set_state_changed_cb() - /// @see scmirroring_sink_prepare() - int scmirroring_sink_connect( - scmirroring_sink_h scmirroring_sink, - ) { - return _scmirroring_sink_connect( - scmirroring_sink, - ); - } - - late final _scmirroring_sink_connectPtr = - _lookup>( - 'scmirroring_sink_connect'); - late final _scmirroring_sink_connect = _scmirroring_sink_connectPtr - .asFunction(); - - /// @brief Starts receiving data from the SCMIRRORING source and display it(mirror). - /// - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// - /// @param[in] scmirroring_sink The handle to the screen mirroring sink - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SCMIRRORING_ERROR_NONE Successful - /// @retval #SCMIRRORING_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SCMIRRORING_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SCMIRRORING_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SCMIRRORING_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SCMIRRORING_ERROR_NOT_SUPPORTED Not supported - /// @retval #SCMIRRORING_ERROR_UNKNOWN Unknown Error - /// - /// @pre Create a screen mirroring sink handle by calling scmirroring_sink_create(). - /// @pre Register user callback by calling scmirroring_sink_set_state_changed_cb(). - /// @pre Call scmirroring_sink_prepare() - /// @pre Call scmirroring_sink_connect() - /// @pre The screen mirroring state should be #SCMIRRORING_SINK_STATE_CONNECTED - /// @post The screen mirroring state will be #SCMIRRORING_SINK_STATE_PLAYING - /// - /// @see scmirroring_sink_create() - /// @see scmirroring_sink_set_state_changed_cb() - /// @see scmirroring_sink_prepare() - /// @see scmirroring_sink_connect() - int scmirroring_sink_start( - scmirroring_sink_h scmirroring_sink, - ) { - return _scmirroring_sink_start( - scmirroring_sink, - ); - } - - late final _scmirroring_sink_startPtr = - _lookup>( - 'scmirroring_sink_start'); - late final _scmirroring_sink_start = - _scmirroring_sink_startPtr.asFunction(); - - /// @brief Pauses receiving data from the SCMIRRORING source. - /// @details This function pauses receiving data from the SCMIRRORING source, - /// which means it sends RTSP PAUSE message to source. - /// - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// - /// @param[in] scmirroring_sink The handle to the screen mirroring sink - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SCMIRRORING_ERROR_NONE Successful - /// @retval #SCMIRRORING_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SCMIRRORING_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SCMIRRORING_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SCMIRRORING_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SCMIRRORING_ERROR_NOT_SUPPORTED Not supported - /// @retval #SCMIRRORING_ERROR_UNKNOWN Unknown Error - /// - /// @pre The screen mirroring state should be #SCMIRRORING_SINK_STATE_PLAYING - /// @post The screen mirroring state will be #SCMIRRORING_SINK_STATE_PAUSED - /// - /// @see scmirroring_sink_create() - /// @see scmirroring_sink_set_state_changed_cb() - /// @see scmirroring_sink_prepare() - /// @see scmirroring_sink_connect() - /// @see scmirroring_sink_start() - int scmirroring_sink_pause( - scmirroring_sink_h scmirroring_sink, - ) { - return _scmirroring_sink_pause( - scmirroring_sink, - ); - } - - late final _scmirroring_sink_pausePtr = - _lookup>( - 'scmirroring_sink_pause'); - late final _scmirroring_sink_pause = - _scmirroring_sink_pausePtr.asFunction(); - - /// @brief Resumes receiving data from the SCMIRRORING source. - /// @details This function pauses receiving data from the SCMIRRORING source, which means it sends RTSP PLAY message to source. - /// - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// - /// @param[in] scmirroring_sink The handle to the screen mirroring sink - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SCMIRRORING_ERROR_NONE Successful - /// @retval #SCMIRRORING_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SCMIRRORING_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SCMIRRORING_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SCMIRRORING_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SCMIRRORING_ERROR_NOT_SUPPORTED Not supported - /// @retval #SCMIRRORING_ERROR_UNKNOWN Unknown Error - /// - /// @pre The screen mirroring state should be #SCMIRRORING_SINK_STATE_PAUSED - /// @post The screen mirroring state will be #SCMIRRORING_SINK_STATE_PLAYING - /// - /// @see scmirroring_sink_pause() - int scmirroring_sink_resume( - scmirroring_sink_h scmirroring_sink, - ) { - return _scmirroring_sink_resume( - scmirroring_sink, - ); - } - - late final _scmirroring_sink_resumePtr = - _lookup>( - 'scmirroring_sink_resume'); - late final _scmirroring_sink_resume = _scmirroring_sink_resumePtr - .asFunction(); - - /// @brief Disconnects and stops receiving data from the SCMIRRORING source. - /// - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// - /// @param[in] scmirroring_sink The handle to the screen mirroring sink - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SCMIRRORING_ERROR_NONE Successful - /// @retval #SCMIRRORING_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SCMIRRORING_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SCMIRRORING_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SCMIRRORING_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SCMIRRORING_ERROR_NOT_SUPPORTED Not supported - /// @retval #SCMIRRORING_ERROR_UNKNOWN Unknown Error - /// - /// @pre The screen mirroring state should be #SCMIRRORING_SINK_STATE_CONNECTED - /// or #SCMIRRORING_SINK_STATE_PLAYING or #SCMIRRORING_SINK_STATE_PAUSED - /// @post The screen mirroring state will be #SCMIRRORING_SINK_STATE_DISCONNECTED - /// - /// @see scmirroring_sink_create() - /// @see scmirroring_sink_set_state_changed_cb() - /// @see scmirroring_sink_prepare() - /// @see scmirroring_sink_connect() - /// @see scmirroring_sink_start() - int scmirroring_sink_disconnect( - scmirroring_sink_h scmirroring_sink, - ) { - return _scmirroring_sink_disconnect( - scmirroring_sink, - ); - } - - late final _scmirroring_sink_disconnectPtr = - _lookup>( - 'scmirroring_sink_disconnect'); - late final _scmirroring_sink_disconnect = _scmirroring_sink_disconnectPtr - .asFunction(); - - /// @brief Unprepares screen mirroring. - /// @details This function unprepares screen mirroring, which closes specific resources. - /// - /// @since_tizen 2.4 - /// - /// @param[in] scmirroring_sink The handle to the screen mirroring sink - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SCMIRRORING_ERROR_NONE Successful - /// @retval #SCMIRRORING_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SCMIRRORING_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SCMIRRORING_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SCMIRRORING_ERROR_NOT_SUPPORTED Not supported - /// @retval #SCMIRRORING_ERROR_UNKNOWN Unknown Error - /// - /// @pre Create a screen mirroring sink handle by calling scmirroring_sink_create(). - /// @pre Register user callback by calling scmirroring_sink_set_state_changed_cb(). - /// @pre Call scmirroring_sink_prepare() - /// @post The screen mirroring state will be #SCMIRRORING_SINK_STATE_NULL - /// - /// @see scmirroring_sink_create() - /// @see scmirroring_sink_set_state_changed_cb() - /// @see scmirroring_sink_prepare() - int scmirroring_sink_unprepare( - scmirroring_sink_h scmirroring_sink, - ) { - return _scmirroring_sink_unprepare( - scmirroring_sink, - ); - } - - late final _scmirroring_sink_unpreparePtr = - _lookup>( - 'scmirroring_sink_unprepare'); - late final _scmirroring_sink_unprepare = _scmirroring_sink_unpreparePtr - .asFunction(); - - /// @brief Unregisters the callback function user registered. - /// - /// @since_tizen 2.4 - /// - /// @param[in] scmirroring_sink The handle to the screen mirroring sink - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SCMIRRORING_ERROR_NONE Successful - /// @retval #SCMIRRORING_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SCMIRRORING_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SCMIRRORING_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SCMIRRORING_ERROR_NOT_SUPPORTED Not supported - /// @retval #SCMIRRORING_ERROR_UNKNOWN Unknown Error - /// - /// @pre Create a screen mirroring sink handle by calling scmirroring_sink_create(). - /// @pre Register user callback by calling scmirroring_sink_set_state_changed_cb(). - /// - /// @see scmirroring_sink_create() - /// @see scmirroring_sink_set_state_changed_cb() - int scmirroring_sink_unset_state_changed_cb( - scmirroring_sink_h scmirroring_sink, - ) { - return _scmirroring_sink_unset_state_changed_cb( - scmirroring_sink, - ); - } - - late final _scmirroring_sink_unset_state_changed_cbPtr = - _lookup>( - 'scmirroring_sink_unset_state_changed_cb'); - late final _scmirroring_sink_unset_state_changed_cb = - _scmirroring_sink_unset_state_changed_cbPtr - .asFunction(); - - /// @brief Destroys screen mirroring sink handle. - /// - /// @since_tizen 2.4 - /// - /// @param[in] scmirroring_sink The handle to the screen mirroring sink - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SCMIRRORING_ERROR_NONE Successful - /// @retval #SCMIRRORING_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SCMIRRORING_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SCMIRRORING_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SCMIRRORING_ERROR_NOT_SUPPORTED Not supported - /// @retval #SCMIRRORING_ERROR_UNKNOWN Unknown Error - /// - /// @pre Create a screen mirroring sink handle by calling scmirroring_sink_create(). - /// @pre The screen mirroring state should be #SCMIRRORING_SINK_STATE_NULL - /// - /// @see scmirroring_sink_create() - int scmirroring_sink_destroy( - scmirroring_sink_h scmirroring_sink, - ) { - return _scmirroring_sink_destroy( - scmirroring_sink, - ); - } - - late final _scmirroring_sink_destroyPtr = - _lookup>( - 'scmirroring_sink_destroy'); - late final _scmirroring_sink_destroy = _scmirroring_sink_destroyPtr - .asFunction(); - - /// @brief Gets negotiated video codec of screen mirroring sink. - /// @details The video codec is negotiated by screen mirroring source. - /// - /// @since_tizen 2.4 - /// - /// @param[in] scmirroring_sink The handle to the screen mirroring sink - /// @param[out] codec Codec of video - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SCMIRRORING_ERROR_NONE Successful - /// @retval #SCMIRRORING_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SCMIRRORING_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SCMIRRORING_ERROR_NOT_SUPPORTED Not supported - /// @retval #SCMIRRORING_ERROR_UNKNOWN Unknown Error - /// - /// @pre Create a screen mirroring sink handle by calling scmirroring_sink_create(). - /// @pre Register user callback by calling scmirroring_sink_set_state_changed_cb(). - /// @pre Call scmirroring_sink_prepare() - /// @pre Call scmirroring_sink_connect() - /// @pre The screen mirroring state must be #SCMIRRORING_SINK_STATE_CONNECTED or #SCMIRRORING_SINK_STATE_PLAYING - int scmirroring_sink_get_negotiated_video_codec( - ffi.Pointer scmirroring_sink, - ffi.Pointer codec, - ) { - return _scmirroring_sink_get_negotiated_video_codec( - scmirroring_sink, - codec, - ); - } - - late final _scmirroring_sink_get_negotiated_video_codecPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>( - 'scmirroring_sink_get_negotiated_video_codec'); - late final _scmirroring_sink_get_negotiated_video_codec = - _scmirroring_sink_get_negotiated_video_codecPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets negotiated video resolution of screen mirroring sink. - /// @details The video resolution is negotiated by screen mirroring source. - /// - /// @since_tizen 2.4 - /// - /// @param[in] scmirroring_sink The handle to the screen mirroring sink - /// @param[out] width Width of video - /// @param[out] height Height of video - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SCMIRRORING_ERROR_NONE Successful - /// @retval #SCMIRRORING_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SCMIRRORING_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SCMIRRORING_ERROR_NOT_SUPPORTED Not supported - /// @retval #SCMIRRORING_ERROR_UNKNOWN Unknown Error - /// - /// @pre Create a screen mirroring sink handle by calling scmirroring_sink_create(). - /// @pre Register user callback by calling scmirroring_sink_set_state_changed_cb(). - /// @pre Call scmirroring_sink_prepare() - /// @pre Call scmirroring_sink_connect() - /// @pre The screen mirroring state must be #SCMIRRORING_SINK_STATE_CONNECTED or #SCMIRRORING_SINK_STATE_PLAYING - int scmirroring_sink_get_negotiated_video_resolution( - ffi.Pointer scmirroring_sink, - ffi.Pointer width, - ffi.Pointer height, - ) { - return _scmirroring_sink_get_negotiated_video_resolution( - scmirroring_sink, - width, - height, - ); - } - - late final _scmirroring_sink_get_negotiated_video_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>( - 'scmirroring_sink_get_negotiated_video_resolution'); - late final _scmirroring_sink_get_negotiated_video_resolution = - _scmirroring_sink_get_negotiated_video_resolutionPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets negotiated frame rate of screen mirroring sink. - /// @details The video frame rate is negotiated by screen mirroring source. - /// - /// @since_tizen 2.4 - /// - /// @param[in] scmirroring_sink The handle to the screen mirroring sink - /// @param[out] frame_rate Frame rate of video - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SCMIRRORING_ERROR_NONE Successful - /// @retval #SCMIRRORING_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SCMIRRORING_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SCMIRRORING_ERROR_NOT_SUPPORTED Not supported - /// @retval #SCMIRRORING_ERROR_UNKNOWN Unknown Error - /// - /// @pre Create a screen mirroring sink handle by calling scmirroring_sink_create(). - /// @pre Register user callback by calling scmirroring_sink_set_state_changed_cb(). - /// @pre Call scmirroring_sink_prepare() - /// @pre Call scmirroring_sink_connect() - /// @pre The screen mirroring state must be #SCMIRRORING_SINK_STATE_CONNECTED or #SCMIRRORING_SINK_STATE_PLAYING - int scmirroring_sink_get_negotiated_video_frame_rate( - ffi.Pointer scmirroring_sink, - ffi.Pointer frame_rate, - ) { - return _scmirroring_sink_get_negotiated_video_frame_rate( - scmirroring_sink, - frame_rate, - ); - } - - late final _scmirroring_sink_get_negotiated_video_frame_ratePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>( - 'scmirroring_sink_get_negotiated_video_frame_rate'); - late final _scmirroring_sink_get_negotiated_video_frame_rate = - _scmirroring_sink_get_negotiated_video_frame_ratePtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets negotiated audio codec of screen mirroring sink. - /// @details The audio codec is negotiated by screen mirroring source. - /// - /// @since_tizen 2.4 - /// - /// @param[in] scmirroring_sink The handle to the screen mirroring sink - /// @param[out] codec Codec of audio - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SCMIRRORING_ERROR_NONE Successful - /// @retval #SCMIRRORING_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SCMIRRORING_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SCMIRRORING_ERROR_NOT_SUPPORTED Not supported - /// @retval #SCMIRRORING_ERROR_UNKNOWN Unknown Error - /// - /// @pre Create a screen mirroring sink handle by calling scmirroring_sink_create(). - /// @pre Register user callback by calling scmirroring_sink_set_state_changed_cb(). - /// @pre Call scmirroring_sink_prepare() - /// @pre Call scmirroring_sink_connect() - /// @pre The screen mirroring state must be #SCMIRRORING_SINK_STATE_CONNECTED or #SCMIRRORING_SINK_STATE_PLAYING - int scmirroring_sink_get_negotiated_audio_codec( - ffi.Pointer scmirroring_sink, - ffi.Pointer codec, - ) { - return _scmirroring_sink_get_negotiated_audio_codec( - scmirroring_sink, - codec, - ); - } - - late final _scmirroring_sink_get_negotiated_audio_codecPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>( - 'scmirroring_sink_get_negotiated_audio_codec'); - late final _scmirroring_sink_get_negotiated_audio_codec = - _scmirroring_sink_get_negotiated_audio_codecPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets negotiated audio channel of screen mirroring sink. - /// @details The audio channel is negotiated by screen mirroring source. - /// - /// @since_tizen 2.4 - /// - /// @param[in] scmirroring_sink The handle to the screen mirroring sink - /// @param[out] channel Channel of audio - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SCMIRRORING_ERROR_NONE Successful - /// @retval #SCMIRRORING_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SCMIRRORING_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SCMIRRORING_ERROR_NOT_SUPPORTED Not supported - /// @retval #SCMIRRORING_ERROR_UNKNOWN Unknown Error - /// - /// @pre Create a screen mirroring sink handle by calling scmirroring_sink_create(). - /// @pre Register user callback by calling scmirroring_sink_set_state_changed_cb(). - /// @pre Call scmirroring_sink_prepare() - /// @pre Call scmirroring_sink_connect() - /// @pre The screen mirroring state must be #SCMIRRORING_SINK_STATE_CONNECTED or #SCMIRRORING_SINK_STATE_PLAYING - int scmirroring_sink_get_negotiated_audio_channel( - ffi.Pointer scmirroring_sink, - ffi.Pointer channel, - ) { - return _scmirroring_sink_get_negotiated_audio_channel( - scmirroring_sink, - channel, - ); - } - - late final _scmirroring_sink_get_negotiated_audio_channelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>( - 'scmirroring_sink_get_negotiated_audio_channel'); - late final _scmirroring_sink_get_negotiated_audio_channel = - _scmirroring_sink_get_negotiated_audio_channelPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets negotiated audio sample rate of screen mirroring sink. - /// @details The audio sample rate is negotiated by screen mirroring source. - /// - /// @since_tizen 2.4 - /// - /// @param[in] scmirroring_sink The handle to the screen mirroring sink - /// @param[out] sample_rate Sample rate of audio - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SCMIRRORING_ERROR_NONE Successful - /// @retval #SCMIRRORING_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SCMIRRORING_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SCMIRRORING_ERROR_NOT_SUPPORTED Not supported - /// @retval #SCMIRRORING_ERROR_UNKNOWN Unknown Error - /// - /// @pre Create a screen mirroring sink handle by calling scmirroring_sink_create(). - /// @pre Register user callback by calling scmirroring_sink_set_state_changed_cb(). - /// @pre Call scmirroring_sink_prepare() - /// @pre Call scmirroring_sink_connect() - /// @pre The screen mirroring state must be #SCMIRRORING_SINK_STATE_CONNECTED or #SCMIRRORING_SINK_STATE_PLAYING - int scmirroring_sink_get_negotiated_audio_sample_rate( - ffi.Pointer scmirroring_sink, - ffi.Pointer sample_rate, - ) { - return _scmirroring_sink_get_negotiated_audio_sample_rate( - scmirroring_sink, - sample_rate, - ); - } - - late final _scmirroring_sink_get_negotiated_audio_sample_ratePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>( - 'scmirroring_sink_get_negotiated_audio_sample_rate'); - late final _scmirroring_sink_get_negotiated_audio_sample_rate = - _scmirroring_sink_get_negotiated_audio_sample_ratePtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets negotiated audio bitwidth of screen mirroring sink. - /// @details The audio bitwidth is negotiated by screen mirroring source. - /// - /// @since_tizen 2.4 - /// - /// @param[in] scmirroring_sink The handle to the screen mirroring sink - /// @param[out] bitwidth Bitwidth of audio - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SCMIRRORING_ERROR_NONE Successful - /// @retval #SCMIRRORING_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SCMIRRORING_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SCMIRRORING_ERROR_NOT_SUPPORTED Not supported - /// @retval #SCMIRRORING_ERROR_UNKNOWN Unknown Error - /// - /// @pre Create a screen mirroring sink handle by calling scmirroring_sink_create(). - /// @pre Register user callback by calling scmirroring_sink_set_state_changed_cb(). - /// @pre Call scmirroring_sink_prepare() - /// @pre Call scmirroring_sink_connect() - /// @pre The screen mirroring state must be #SCMIRRORING_SINK_STATE_CONNECTED or #SCMIRRORING_SINK_STATE_PLAYING - int scmirroring_sink_get_negotiated_audio_bitwidth( - ffi.Pointer scmirroring_sink, - ffi.Pointer bitwidth, - ) { - return _scmirroring_sink_get_negotiated_audio_bitwidth( - scmirroring_sink, - bitwidth, - ); - } - - late final _scmirroring_sink_get_negotiated_audio_bitwidthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>( - 'scmirroring_sink_get_negotiated_audio_bitwidth'); - late final _scmirroring_sink_get_negotiated_audio_bitwidth = - _scmirroring_sink_get_negotiated_audio_bitwidthPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the current state of screen mirroring sink. - /// @details The current state of screen mirroring sink is changed by calling CAPIs. And it provides the state of screen mirroring sink the time this api is called. - /// - /// @since_tizen 5.0 - /// - /// @param[in] scmirroring_sink The handle to the screen mirroring sink - /// @param[out] state The current state of screen mirroring sink - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SCMIRRORING_ERROR_NONE Successful - /// @retval #SCMIRRORING_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SCMIRRORING_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SCMIRRORING_ERROR_NOT_SUPPORTED Not supported - /// @retval #SCMIRRORING_ERROR_UNKNOWN Unknown Error - /// - /// @pre Create a screen mirroring sink handle by calling scmirroring_sink_create(). - int scmirroring_sink_get_current_state( - scmirroring_sink_h scmirroring_sink, - ffi.Pointer state, - ) { - return _scmirroring_sink_get_current_state( - scmirroring_sink, - state, - ); - } - - late final _scmirroring_sink_get_current_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(scmirroring_sink_h, - ffi.Pointer)>>('scmirroring_sink_get_current_state'); - late final _scmirroring_sink_get_current_state = - _scmirroring_sink_get_current_statePtr.asFunction< - int Function(scmirroring_sink_h, ffi.Pointer)>(); - - /// @brief Creates a sound pool instance that can be used for sound sources - /// loading/unloading. - /// @details Up to 8 sound pools can be created. Several pools can be active - /// at the same time. Streams can be in playing state only when pool is - /// active. Memory is allocated for sound pool. User should aware that - /// creation of more number of pools means more memory is allocated. - /// @since_tizen 4.0 - /// @remarks When pool has been created, pool state is - /// #SOUND_POOL_STATE_INACTIVE. To activate the pool use - /// sound_pool_activate() function. - /// When no longer needed, @a pool should be destroyed with sound_pool_destroy(). - /// - /// @param[out] pool The created sound pool handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER - /// Invalid parameter (@a pool is NULL) - /// @retval #SOUND_POOL_ERROR_OUT_OF_MEMORY - /// Not enough memory to create sound pool - /// @retval #SOUND_POOL_ERROR_INVALID_OPERATION - /// Maximal amount of sound pools is exceeded (maximum 8 pools allowed) - /// - /// @see sound_pool_destroy() - int sound_pool_create( - ffi.Pointer pool, - ) { - return _sound_pool_create( - pool, - ); - } - - late final _sound_pool_createPtr = - _lookup)>>( - 'sound_pool_create'); - late final _sound_pool_create = _sound_pool_createPtr - .asFunction)>(); - - /// @brief Destroys a sound pool and cleans allocated memory. - /// @details Stops all streams and unloads all sources associated with pool. - /// - /// @since_tizen 4.0 - /// @remarks @a pool should be destroyed with sound_pool_destroy(). - /// @param[in] pool The sound pool handle will be destroyed - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER - /// Invalid parameter (@a pool is NULL or corrupted) - /// @retval #SOUND_POOL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre Create sound pool handle by calling sound_pool_create() - /// - /// @see sound_pool_create() - int sound_pool_destroy( - sound_pool_h pool, - ) { - return _sound_pool_destroy( - pool, - ); - } - - late final _sound_pool_destroyPtr = - _lookup>( - 'sound_pool_destroy'); - late final _sound_pool_destroy = - _sound_pool_destroyPtr.asFunction(); - - /// @brief Loads sound source data from a file to the pool. - /// @details After calling this routine the source can be accessed by its @a tag. - /// @since_tizen 4.0 - /// @remarks Input data can be either raw or encoded. - /// Each of loaded sources must have unique @a tag - /// It is synchronous operation. - /// - /// @param[in] pool The sound pool handle - /// @param[in] file_name The name of the file that contains sound data - /// @param[in] tag Unique string that will be used to identify source - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER - /// Invalid parameter (@a pool is NULL or corrupted, @a file_name is - /// NULL, @a tag is NULL or @a tag/@a file_name length is too long) - /// @retval #SOUND_POOL_ERROR_OUT_OF_MEMORY Not enough memory to allocate source - /// @retval #SOUND_POOL_ERROR_NO_SUCH_FILE No file determined by @a file_name - /// @retval #SOUND_POOL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// @post Unload source from the pool by calling sound_pool_unload_source() - /// - /// @see sound_pool_create() - /// @see sound_pool_destroy() - /// @see sound_pool_unload_source() - int sound_pool_load_source_from_file( - sound_pool_h pool, - ffi.Pointer file_name, - ffi.Pointer tag, - ) { - return _sound_pool_load_source_from_file( - pool, - file_name, - tag, - ); - } - - late final _sound_pool_load_source_from_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_pool_h, ffi.Pointer, - ffi.Pointer)>>('sound_pool_load_source_from_file'); - late final _sound_pool_load_source_from_file = - _sound_pool_load_source_from_filePtr.asFunction< - int Function( - sound_pool_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Unloads source from the @a pool. - /// @details Cleans memory. This operation is synchronous. - /// @since_tizen 4.0 - /// @remarks The usage of @a tag name that was associated with unloaded source - /// has no effect. It can be reused as well. - /// - /// @param[in] pool The sound pool handle - /// @param[in] tag Unique string that identifies the source - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER - /// Invalid parameter (@a pool is NULL or corrupted, @a tag is NULL) - /// @retval #SOUND_POOL_ERROR_KEY_NOT_AVAILABLE No sources tagged by @a tag exist - /// in the pool - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// @pre Load source to the pool by calling sound_pool_load_source_from_file() - /// - /// @see sound_pool_create() - /// @see sound_pool_load_source_from_file() - int sound_pool_unload_source( - sound_pool_h pool, - ffi.Pointer tag, - ) { - return _sound_pool_unload_source( - pool, - tag, - ); - } - - late final _sound_pool_unload_sourcePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_pool_h, - ffi.Pointer)>>('sound_pool_unload_source'); - late final _sound_pool_unload_source = _sound_pool_unload_sourcePtr - .asFunction)>(); - - /// @brief Changes the current @a state of a @a pool to #SOUND_POOL_STATE_ACTIVE. - /// @since_tizen 4.0 - /// @remarks When activation is performed, all suspended streams with highest - /// priority in the pool will resume their playback. Paused streams will - /// remain their state. - /// - /// @param[in] pool The sound pool handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted) - /// @retval #SOUND_POOL_ERROR_INVALID_OPERATION Invalid operation or sound pool - /// is already in #SOUND_POOL_STATE_ACTIVE state - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// - /// @see sound_pool_create() - /// @see sound_pool_get_state() - /// @see sound_pool_deactivate() - /// @see sound_pool_state_e - int sound_pool_activate( - sound_pool_h pool, - ) { - return _sound_pool_activate( - pool, - ); - } - - late final _sound_pool_activatePtr = - _lookup>( - 'sound_pool_activate'); - late final _sound_pool_activate = - _sound_pool_activatePtr.asFunction(); - - /// @brief Changes the current @a state of a @a pool to #SOUND_POOL_STATE_INACTIVE. - /// @since_tizen 4.0 - /// @remarks When deactivation is performed, all playing streams in the pool will - /// be suspended (change state to #SOUND_POOL_STREAM_STATE_SUSPENDED). - /// Paused streams will remain in their state. - /// - /// @param[in] pool The sound pool handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted) - /// @retval #SOUND_POOL_ERROR_INVALID_OPERATION Invalid operation or sound pool - /// is already in @c #SOUND_POOL_STATE_INACTIVE state - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// @pre @a pool has to be in #SOUND_POOL_STATE_ACTIVE state - /// - /// @see sound_pool_create() - /// @see sound_pool_get_state() - /// @see sound_pool_activate() - /// @see sound_pool_state_e - int sound_pool_deactivate( - sound_pool_h pool, - ) { - return _sound_pool_deactivate( - pool, - ); - } - - late final _sound_pool_deactivatePtr = - _lookup>( - 'sound_pool_deactivate'); - late final _sound_pool_deactivate = - _sound_pool_deactivatePtr.asFunction(); - - /// @brief Sets the pool's global volume parameter. - /// @details Volume of all streams related to the @a pool will be scaled - /// in accordance to global pool volume parameter - /// (i.e. [stream real volume] = [global volume] * [stream volume], - /// where [stream volume] is the volume parameter of arbitrary stream). - /// - /// @since_tizen 4.0 - /// @param[in] pool The sound pool handle - /// @param[in] volume Pool global volume in 0.0~1.0 range - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted, or @a volume isn't in 0.0~1.0 range) - /// @retval #SOUND_POOL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// - /// @see sound_pool_create() - int sound_pool_set_volume( - sound_pool_h pool, - double volume, - ) { - return _sound_pool_set_volume( - pool, - volume, - ); - } - - late final _sound_pool_set_volumePtr = - _lookup>( - 'sound_pool_set_volume'); - late final _sound_pool_set_volume = _sound_pool_set_volumePtr - .asFunction(); - - /// @brief Gets the pool's global volume parameter. - /// - /// @since_tizen 4.0 - /// @param[in] pool The sound pool handle - /// @param[out] volume Pool global volume in 0.0~1.0 range - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted, or @a volume is NULL) - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// - /// @see sound_pool_create() - int sound_pool_get_volume( - sound_pool_h pool, - ffi.Pointer volume, - ) { - return _sound_pool_get_volume( - pool, - volume, - ); - } - - late final _sound_pool_get_volumePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - sound_pool_h, ffi.Pointer)>>('sound_pool_get_volume'); - late final _sound_pool_get_volume = _sound_pool_get_volumePtr - .asFunction)>(); - - /// @brief Gets the current @a state of @a pool. - /// - /// @since_tizen 4.0 - /// @param[in] pool The sound pool handle - /// @param[out] state Current state of @a pool - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER - /// Invalid parameter (@a pool is NULL or corrupted, @a tag is NULL) - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// - /// @see sound_pool_create() - /// @see sound_pool_state_e - int sound_pool_get_state( - sound_pool_h pool, - ffi.Pointer state, - ) { - return _sound_pool_get_state( - pool, - state, - ); - } - - late final _sound_pool_get_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - sound_pool_h, ffi.Pointer)>>('sound_pool_get_state'); - late final _sound_pool_get_state = _sound_pool_get_statePtr - .asFunction)>(); - - /// @brief Sets the callback for handling sound @a pool state change. - /// - /// @since_tizen 4.0 - /// @param[in] pool The sound pool handle - /// @param[in] callback The callback that will be called after pool state - /// will be changed. @a callback will be called - /// synchronously - /// @param[in] user_data The user data to be passed to the @a callback - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted, or @a callback is NULL) - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// @post Use sound_pool_unset_state_changed_cb() function to unset the - /// @a callback - /// - /// @see sound_pool_create() - /// @see sound_pool_pool_state_change_cb - int sound_pool_set_state_changed_cb( - sound_pool_h pool, - sound_pool_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _sound_pool_set_state_changed_cb( - pool, - callback, - user_data, - ); - } - - late final _sound_pool_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_pool_h, sound_pool_state_changed_cb, - ffi.Pointer)>>('sound_pool_set_state_changed_cb'); - late final _sound_pool_set_state_changed_cb = - _sound_pool_set_state_changed_cbPtr.asFunction< - int Function(sound_pool_h, sound_pool_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback for handling sound @a pool state change. - /// - /// @since_tizen 4.0 - /// @param[in] pool The sound pool handle - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted) - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// @pre Set state change callback by calling - /// sound_pool_set_state_changed_cb() - /// - /// @see sound_pool_create() - /// @see sound_pool_set_state_changed_cb() - int sound_pool_unset_state_changed_cb( - sound_pool_h pool, - ) { - return _sound_pool_unset_state_changed_cb( - pool, - ); - } - - late final _sound_pool_unset_state_changed_cbPtr = - _lookup>( - 'sound_pool_unset_state_changed_cb'); - late final _sound_pool_unset_state_changed_cb = - _sound_pool_unset_state_changed_cbPtr - .asFunction(); - - /// @brief Plays a source by @a tag. - /// @details Creates stream with @a id that can be used to change parameters and - /// get additional information. - /// Sets stream state to #SOUND_POOL_STREAM_STATE_PLAYING. - /// If a callback is set with sound_pool_stream_play(), and another - /// callback is set with sound_pool_stream_set_state_changed_cb(), - /// the second callback will overwrite the first one. - /// @since_tizen 4.0 - /// @remarks Resultant stream volume will depend on global pool volume. - /// - /// @param[in] pool The sound pool handle - /// @param[in] tag Unique string that identifies source - /// @param[in] loop Number of times stream will be repeated - /// (pass 0 if stream should be repeated continuously) - /// @param[in] volume Stream volume in 0.0~1.0 range - /// @param[in] priority Stream priority (0 = lowest priority). Check - /// sound_pool_stream_set_priority() documentation - /// for details on prioritization rules. - /// @param[in] priority_policy Stream priority policy.\n - /// (#SOUND_POOL_STREAM_PRIORITY_POLICY_MUTE - Mute)\n - /// (#SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED - Suspended)\n - /// If priority_policy is set to Mute, the stream will be - /// playing with mute even in the presence of high priority - /// stream and it will not be Suspended. - /// @param[in] callback The callback that will be called after stream state - /// will be changed, or NULL if this callback call - /// isn't needed. If @a callback is set, then it will - /// be called asynchronously. - /// @param[in] user_data The user data to be passed to the @a callback - /// @param[out] id Unique stream identifier that can be used to - /// change parameters and get additional information - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted, @a tag is NULL, @a volume is out of - /// 0.0~1.0 range, or @a id is NULL) - /// @retval #SOUND_POOL_ERROR_KEY_NOT_AVAILABLE No sources tagged by @a tag exist - /// in the pool - /// @retval #SOUND_POOL_ERROR_OUT_OF_MEMORY Not enough memory to allocate new - /// sound stream - /// @retval #SOUND_POOL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre Create sound pool handle by calling sound_pool_create() - /// @pre Load source to @a pool by calling sound_pool_load_source_from_file() - /// @post When playback is finished normally (i.e. sound_pool_stream_stop() - /// will be not used for stream termination) state will be changed to - /// #SOUND_POOL_STREAM_STATE_FINISHED and memory will be cleared from the - /// stream allocated resources automatically - /// - /// @see sound_pool_create() - /// @see sound_pool_load_source_from_file() - /// @see sound_pool_set_volume() - /// @see sound_pool_get_volume() - int sound_pool_stream_play( - sound_pool_h pool, - ffi.Pointer tag, - int loop, - double volume, - int priority, - int priority_policy, - sound_pool_stream_state_changed_cb callback, - ffi.Pointer user_data, - ffi.Pointer id, - ) { - return _sound_pool_stream_play( - pool, - tag, - loop, - volume, - priority, - priority_policy, - callback, - user_data, - id, - ); - } - - late final _sound_pool_stream_playPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - sound_pool_h, - ffi.Pointer, - ffi.UnsignedInt, - ffi.Float, - ffi.UnsignedInt, - ffi.Int32, - sound_pool_stream_state_changed_cb, - ffi.Pointer, - ffi.Pointer)>>('sound_pool_stream_play'); - late final _sound_pool_stream_play = _sound_pool_stream_playPtr.asFunction< - int Function( - sound_pool_h, - ffi.Pointer, - int, - double, - int, - int, - sound_pool_stream_state_changed_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Pauses a stream by @a id. - /// @details Sets stream state to #SOUND_POOL_STREAM_STATE_PAUSED. - /// @since_tizen 4.0 - /// @remarks Stream state has to be #SOUND_POOL_STREAM_STATE_PLAYING. - /// - /// @param[in] pool The sound pool handle - /// @param[in] id Unique stream identifier - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted) - /// @retval #SOUND_POOL_ERROR_KEY_NOT_AVAILABLE No streams identified by @a id - /// exist in the pool - /// @retval #SOUND_POOL_ERROR_INVALID_OPERATION Invalid operation or stream is in - /// the state which is not allowed for pause operation - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// @pre Load source to @a pool by calling sound_pool_load_source_from_file() - /// @pre Start stream playback by calling sound_pool_stream_play() - /// - /// @see sound_pool_create() - /// @see sound_pool_load_source_from_file() - /// @see sound_pool_stream_play() - int sound_pool_stream_pause( - sound_pool_h pool, - int id, - ) { - return _sound_pool_stream_pause( - pool, - id, - ); - } - - late final _sound_pool_stream_pausePtr = _lookup< - ffi.NativeFunction>( - 'sound_pool_stream_pause'); - late final _sound_pool_stream_pause = - _sound_pool_stream_pausePtr.asFunction(); - - /// @brief Resumes a stream by @a id. - /// @details Sets stream state to #SOUND_POOL_STREAM_STATE_PLAYING. - /// @since_tizen 4.0 - /// @remarks Stream state has to be #SOUND_POOL_STREAM_STATE_PAUSED. - /// - /// @param[in] pool The sound pool handle - /// @param[in] id Unique stream identifier - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted) - /// @retval #SOUND_POOL_ERROR_KEY_NOT_AVAILABLE No streams identified by @a id - /// exist in the pool - /// @retval #SOUND_POOL_ERROR_INVALID_OPERATION Invalid operation or stream is in - /// the state which is not allowed for resume operation - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// @pre Load source to @a pool by calling sound_pool_load_source_from_file() - /// @pre Start stream playback by calling sound_pool_stream_play() - /// @pre Pause stream playback by calling sound_pool_stream_pause() - /// - /// @see sound_pool_create() - /// @see sound_pool_load_source_from_file() - /// @see sound_pool_stream_play() - /// @see sound_pool_stream_pause() - int sound_pool_stream_resume( - sound_pool_h pool, - int id, - ) { - return _sound_pool_stream_resume( - pool, - id, - ); - } - - late final _sound_pool_stream_resumePtr = _lookup< - ffi.NativeFunction>( - 'sound_pool_stream_resume'); - late final _sound_pool_stream_resume = _sound_pool_stream_resumePtr - .asFunction(); - - /// @brief Stops a stream by @a id. - /// @details Sets stream state to #SOUND_POOL_STREAM_STATE_STOPPED. - /// After stream was stopped it can not be resumed and @a id value - /// becomes invalid. Moreover, stream will never gets - /// #SOUND_POOL_STREAM_STATE_FINISHED state as it will be terminated - /// after this function call. - /// - /// @since_tizen 4.0 - /// @param[in] pool The sound pool handle - /// @param[in] id Unique stream identifier - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted) - /// @retval #SOUND_POOL_ERROR_KEY_NOT_AVAILABLE No streams identified by @a id - /// exist in the pool - /// @retval #SOUND_POOL_ERROR_INVALID_OPERATION Invalid operation or stream is in - /// the state which is not allowed for stop operation - /// - /// @pre Create sound pool handle by calling sound_pool_create() - /// @pre Load source to @a pool by calling sound_pool_load_source_from_file() - /// @pre Start stream playback by calling sound_pool_stream_play() - /// - /// @see sound_pool_create() - /// @see sound_pool_load_source_from_file() - /// @see sound_pool_stream_play() - int sound_pool_stream_stop( - sound_pool_h pool, - int id, - ) { - return _sound_pool_stream_stop( - pool, - id, - ); - } - - late final _sound_pool_stream_stopPtr = _lookup< - ffi.NativeFunction>( - 'sound_pool_stream_stop'); - late final _sound_pool_stream_stop = - _sound_pool_stream_stopPtr.asFunction(); - - /// @brief Sets the stream's volume parameters by stream @a id. - /// @since_tizen 4.0 - /// @remarks Resultant stream volume will depend on global pool volume. - /// - /// @param[in] pool The sound pool handle - /// @param[in] id Unique stream identifier - /// @param[in] volume Stream volume in 0.0~1.0 range - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted, or @a volume isn't in 0.0~1.0 range) - /// @retval #SOUND_POOL_ERROR_KEY_NOT_AVAILABLE No streams identified by @a id - /// exist in the pool - /// @retval #SOUND_POOL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// @pre Load source to @a pool by calling sound_pool_load_source_from_file() - /// @pre Start stream playback by calling sound_pool_stream_play() - /// - /// @see sound_pool_create() - /// @see sound_pool_load_source_from_file() - /// @see sound_pool_stream_play() - /// @see sound_pool_set_volume - /// @see sound_pool_get_volume - int sound_pool_stream_set_volume( - sound_pool_h pool, - int id, - double volume, - ) { - return _sound_pool_stream_set_volume( - pool, - id, - volume, - ); - } - - late final _sound_pool_stream_set_volumePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_pool_h, ffi.UnsignedInt, - ffi.Float)>>('sound_pool_stream_set_volume'); - late final _sound_pool_stream_set_volume = _sound_pool_stream_set_volumePtr - .asFunction(); - - /// @brief Gets the stream's volume parameters by stream @a id. - /// - /// @since_tizen 4.0 - /// @param[in] pool The sound pool handle - /// @param[in] id Unique stream identifier - /// @param[out] volume Stream volume in 0.0~1.0 range - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted, or @a volume is NULL) - /// @retval #SOUND_POOL_ERROR_KEY_NOT_AVAILABLE No streams identified by @a id - /// exist in the pool - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// @pre Load source to @a pool by calling sound_pool_load_source_from_file() - /// @pre Start stream playback by calling sound_pool_stream_play() - /// - /// @see sound_pool_create() - /// @see sound_pool_load_source_from_file() - /// @see sound_pool_stream_play() - int sound_pool_stream_get_volume( - sound_pool_h pool, - int id, - ffi.Pointer volume, - ) { - return _sound_pool_stream_get_volume( - pool, - id, - volume, - ); - } - - late final _sound_pool_stream_get_volumePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_pool_h, ffi.UnsignedInt, - ffi.Pointer)>>('sound_pool_stream_get_volume'); - late final _sound_pool_stream_get_volume = _sound_pool_stream_get_volumePtr - .asFunction)>(); - - /// @brief Sets the stream's priority parameter by stream @a id. - /// @since_tizen 4.0 - /// @details The below rules are applicable for streams with priority policy - /// #SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED. - /// Only streams with highest priority in the active Sound Pool can be - /// played. If at least one stream with highest priority enters - /// #SOUND_POOL_STREAM_STATE_PLAYING state, then all streams currently - /// being played with lower priorities will be transferred to the - /// #SOUND_POOL_STREAM_STATE_SUSPENDED state. If there are no more - /// playing streams in a given priority group (group of streams with the - /// same priority), then all previously suspended streams in the group - /// with one level lower priority will be resumed. - /// - /// For example, if we have N suspended streams in 'LOW' group, M - /// suspended streams in 'MEDIUM' group and K playing streams in 'HIGH' - /// group. Then the following rules are valid: When all K streams in HIGH - /// priority group will be finished, paused, or stopped and Sound Pool is - /// in active state, only then M streams from MEDIUM priority group will - /// be resumed. When all M+K streams from HIGH and MEDIUM priority groups - /// are finished, paused or stopped and Sound Pool is in active state, - /// only then N streams from LOW priority group will be resumed. - /// Transferring at least one stream from higher priority group will lead - /// to suspending of all the streams from lower priorities group(s). - /// - /// Priorities don't take any effect in inactive Sound Pools. But after - /// pool activation, all mentioned rules will be applied. - /// - /// If stream priority policy is set to mute - /// #SOUND_POOL_STREAM_PRIORITY_POLICY_MUTE, all above rules are not valid - /// for the stream and it will be played with mute even in the presence - /// of high priority steams. - /// streams. - /// @param[in] pool The sound pool handle - /// @param[in] id Unique stream identifier - /// @param[in] priority Stream priority (0 = lowest priority) - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted) - /// @retval #SOUND_POOL_ERROR_KEY_NOT_AVAILABLE No streams identified by @a id - /// exist in the pool - /// @retval #SOUND_POOL_ERROR_INVALID_OPERATION Invalid operation - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// @pre Load source to @a pool by calling sound_pool_load_source_from_file() - /// @pre Start stream playback by calling sound_pool_stream_play() - /// - /// @see sound_pool_create() - /// @see sound_pool_load_source_from_file() - /// @see sound_pool_stream_play() - int sound_pool_stream_set_priority( - sound_pool_h pool, - int id, - int priority, - ) { - return _sound_pool_stream_set_priority( - pool, - id, - priority, - ); - } - - late final _sound_pool_stream_set_priorityPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_pool_h, ffi.UnsignedInt, - ffi.UnsignedInt)>>('sound_pool_stream_set_priority'); - late final _sound_pool_stream_set_priority = - _sound_pool_stream_set_priorityPtr - .asFunction(); - - /// @brief Gets the stream's priority parameter by stream @a id. - /// - /// @since_tizen 4.0 - /// @param[in] pool The sound pool handle - /// @param[in] id Unique stream identifier - /// @param[out] priority Stream priority (0 = lowest priority). Check - /// sound_pool_stream_set_priority() documentation - /// for details on prioritization rules. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted, or @a priority is NULL) - /// @retval #SOUND_POOL_ERROR_KEY_NOT_AVAILABLE No streams identified by @a id - /// exist in the pool - /// - /// @pre Create a sound @a pool handle by calling sound_pool_create() - /// @pre Load source to @a pool by calling sound_pool_load_source_from_file() - /// @pre Start stream playback by calling sound_pool_stream_play() - /// - /// @see sound_pool_create() - /// @see sound_pool_load_source_from_file() - /// @see sound_pool_stream_play() - int sound_pool_stream_get_priority( - sound_pool_h pool, - int id, - ffi.Pointer priority, - ) { - return _sound_pool_stream_get_priority( - pool, - id, - priority, - ); - } - - late final _sound_pool_stream_get_priorityPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_pool_h, ffi.UnsignedInt, - ffi.Pointer)>>('sound_pool_stream_get_priority'); - late final _sound_pool_stream_get_priority = - _sound_pool_stream_get_priorityPtr.asFunction< - int Function(sound_pool_h, int, ffi.Pointer)>(); - - /// @brief Gets the current @a state of stream by @a id. - /// - /// @since_tizen 4.0 - /// @param[in] pool The sound pool handle - /// @param[in] id Unique stream identifier - /// @param[out] state Current state of stream - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SOUND_POOL_ERROR_NONE Successful - /// @retval #SOUND_POOL_ERROR_INVALID_PARAMETER Invalid parameter - /// (@a pool is NULL or corrupted, or @a state is NULL) - /// @retval #SOUND_POOL_ERROR_KEY_NOT_AVAILABLE No streams identified by @a id - /// exist in the pool - /// - /// @pre Create sound pool handle by calling sound_pool_create() - /// @pre Load source to @a pool by calling sound_pool_load_source_from_file() - /// @pre Start stream playback by calling sound_pool_stream_play() - /// - /// @see sound_pool_create() - /// @see sound_pool_load_source_from_file() - /// @see sound_pool_stream_play() - /// @see sound_pool_stream_state_e - int sound_pool_stream_get_state( - sound_pool_h pool, - int id, - ffi.Pointer state, - ) { - return _sound_pool_stream_get_state( - pool, - id, - state, - ); - } - - late final _sound_pool_stream_get_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sound_pool_h, ffi.UnsignedInt, - ffi.Pointer)>>('sound_pool_stream_get_state'); - late final _sound_pool_stream_get_state = _sound_pool_stream_get_statePtr - .asFunction)>(); - - /// @brief Creates a streamrecorder handle to record a video or audio - /// @since_tizen 3.0 - /// @remarks You must release @a recorder using streamrecorder_destroy(). - /// @param[out] recorder A handle to the streamrecorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation - int streamrecorder_create( - ffi.Pointer recorder, - ) { - return _streamrecorder_create( - recorder, - ); - } - - late final _streamrecorder_createPtr = _lookup< - ffi.NativeFunction)>>( - 'streamrecorder_create'); - late final _streamrecorder_create = _streamrecorder_createPtr - .asFunction)>(); - - /// @brief Destroys the streamrecorder handle - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @pre The recorder state should be #STREAMRECORDER_STATE_CREATED. - /// @post The recorder state will be #STREAMRECORDER_STATE_NONE. - int streamrecorder_destroy( - streamrecorder_h recorder, - ) { - return _streamrecorder_destroy( - recorder, - ); - } - - late final _streamrecorder_destroyPtr = - _lookup>( - 'streamrecorder_destroy'); - late final _streamrecorder_destroy = - _streamrecorder_destroyPtr.asFunction(); - - /// @brief Prepares the streamrecorder for recording. - /// @since_tizen 3.0 - /// @remarks Before calling the function, it is required to properly set streamrecorder_enable_source_buffer(), - /// audio encoder (streamrecorder_set_audio_encoder()), - /// video encoder(streamrecorder_set_video_encoder()) and file format (streamrecorder_set_file_format()). - /// @param[in] recorder The handle to the streamrecorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @pre The recorder state should be #STREAMRECORDER_STATE_CREATED. \n - /// The streamrecorder_enable_source_buffer() should be invoked before this function. - /// @post The streamrecorder state will be #STREAMRECORDER_STATE_PREPARED - /// @see streamrecorder_unprepare() - /// @see streamrecorder_set_audio_encoder() - /// @see streamrecorder_set_video_encoder() - /// @see streamrecorder_set_file_format() - int streamrecorder_prepare( - streamrecorder_h recorder, - ) { - return _streamrecorder_prepare( - recorder, - ); - } - - late final _streamrecorder_preparePtr = - _lookup>( - 'streamrecorder_prepare'); - late final _streamrecorder_prepare = - _streamrecorder_preparePtr.asFunction(); - - /// @brief Resets the streamrecorder. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @pre The streamrecorder state should be #STREAMRECORDER_STATE_PREPARED set by streamrecorder_prepare(), streamrecorder_cancel() or streamrecorder_commit(). - /// @post The streamrecorder state will be #STREAMRECORDER_STATE_CREATED. - /// @see streamrecorder_prepare() - /// @see streamrecorder_cancel() - /// @see streamrecorder_commit() - int streamrecorder_unprepare( - streamrecorder_h recorder, - ) { - return _streamrecorder_unprepare( - recorder, - ); - } - - late final _streamrecorder_unpreparePtr = - _lookup>( - 'streamrecorder_unprepare'); - late final _streamrecorder_unprepare = - _streamrecorder_unpreparePtr.asFunction(); - - /// @brief Starts the recording. - /// @since_tizen 3.0 - /// @remarks If file path has been set to an existing file, this file is removed automatically and updated by new one. \n - /// When you want to record audio or video file, you need to add privilege according to rules below additionally. \n - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. - /// The filename should be set before this function is invoked. - /// @param[in] recorder The handle to the streamrecorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #STREAMRECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_PREPARED by streamrecorder_prepare() or #STREAMRECORDER_STATE_PAUSED by streamrecorder_pause(). \n - /// The filename should be set by streamrecorder_set_filename(). - /// @post The recorder state will be #STREAMRECORDER_STATE_RECORDING. - /// @see streamrecorder_pause() - /// @see streamrecorder_commit() - /// @see streamrecorder_cancel() - /// @see streamrecorder_set_audio_encoder() - /// @see streamrecorder_set_filename() - /// @see streamrecorder_set_file_format() - /// @see streamrecorder_recording_status_cb() - /// @see streamrecorder_set_filename() - int streamrecorder_start( - streamrecorder_h recorder, - ) { - return _streamrecorder_start( - recorder, - ); - } - - late final _streamrecorder_startPtr = - _lookup>( - 'streamrecorder_start'); - late final _streamrecorder_start = - _streamrecorder_startPtr.asFunction(); - - /// @brief Pauses the recording. - /// @since_tizen 3.0 - /// @remarks Recording can be resumed with streamrecorder_start(). - /// @param[in] recorder The handle to the streamrecorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_RECORDING. - /// @post The streamrecorder state will be #STREAMRECORDER_STATE_PAUSED. - /// @see streamrecorder_pause() - /// @see streamrecorder_commit() - /// @see streamrecorder_cancel() - int streamrecorder_pause( - streamrecorder_h recorder, - ) { - return _streamrecorder_pause( - recorder, - ); - } - - late final _streamrecorder_pausePtr = - _lookup>( - 'streamrecorder_pause'); - late final _streamrecorder_pause = - _streamrecorder_pausePtr.asFunction(); - - /// @brief Stops recording and saves the result. - /// @since_tizen 3.0 - /// @remarks When you want to record audio or video file, you need to add privilege according to rules below additionally. \n - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. - /// @param[in] recorder The handle to the streamrecorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #STREAMRECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_RECORDING set by streamrecorder_start() or #STREAMRECORDER_STATE_PAUSED by streamrecorder_pause(). - /// @post The streamrecorder state will be #STREAMRECORDER_STATE_PREPARED. - /// @see streamrecorder_pause() - /// @see streamrecorder_cancel() - /// @see streamrecorder_set_filename() - /// @see streamrecorder_start() - int streamrecorder_commit( - streamrecorder_h recorder, - ) { - return _streamrecorder_commit( - recorder, - ); - } - - late final _streamrecorder_commitPtr = - _lookup>( - 'streamrecorder_commit'); - late final _streamrecorder_commit = - _streamrecorder_commitPtr.asFunction(); - - /// @brief Cancels the recording. - /// @details The recording data is discarded and not written in the recording file. - /// @since_tizen 3.0 - /// @remarks When you want to record audio or video file, you need to add privilege according to rules below additionally. \n - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. - /// @param[in] recorder The handle to the streamrecorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #STREAMRECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_RECORDING set by streamrecorder_start() or #STREAMRECORDER_STATE_PAUSED by streamrecorder_pause(). - /// @post The streamrecorder state will be #STREAMRECORDER_STATE_PREPARED. - /// @see streamrecorder_pause() - /// @see streamrecorder_commit() - /// @see streamrecorder_cancel() - /// @see streamrecorder_start() - int streamrecorder_cancel( - streamrecorder_h recorder, - ) { - return _streamrecorder_cancel( - recorder, - ); - } - - late final _streamrecorder_cancelPtr = - _lookup>( - 'streamrecorder_cancel'); - late final _streamrecorder_cancel = - _streamrecorder_cancelPtr.asFunction(); - - /// @brief Pushes buffer to StreamRecorder to record audio/video - /// @since_tizen 3.0 - /// @remarks When you want to record audio or video file, you need to add privilege according to rules below additionally. \n - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] inbuf The media packet containing buffer and other associated values - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted - int streamrecorder_push_stream_buffer( - streamrecorder_h recorder, - media_packet_h inbuf, - ) { - return _streamrecorder_push_stream_buffer( - recorder, - inbuf, - ); - } - - late final _streamrecorder_push_stream_bufferPtr = _lookup< - ffi - .NativeFunction>( - 'streamrecorder_push_stream_buffer'); - late final _streamrecorder_push_stream_buffer = - _streamrecorder_push_stream_bufferPtr - .asFunction(); - - /// @brief Sets the video source as live buffer to be used for recording - /// @since_tizen 3.0 - /// @remarks if you want to enable video or audio or both recording, call before streamrecorder_prepare() - /// @param[in] recorder A handle to the streamrecorder - /// @param[in] type The type of source input - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @pre The streamrecorder state must be only #STREAMRECORDER_STATE_CREATED - int streamrecorder_enable_source_buffer( - streamrecorder_h recorder, - int type, - ) { - return _streamrecorder_enable_source_buffer( - recorder, - type, - ); - } - - late final _streamrecorder_enable_source_bufferPtr = _lookup< - ffi.NativeFunction>( - 'streamrecorder_enable_source_buffer'); - late final _streamrecorder_enable_source_buffer = - _streamrecorder_enable_source_bufferPtr - .asFunction(); - - /// @brief Gets the streamrecorder's current state. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[out] state The current state of the streamrecorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - int streamrecorder_get_state( - streamrecorder_h recorder, - ffi.Pointer state, - ) { - return _streamrecorder_get_state( - recorder, - state, - ); - } - - late final _streamrecorder_get_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, - ffi.Pointer)>>('streamrecorder_get_state'); - late final _streamrecorder_get_state = _streamrecorder_get_statePtr - .asFunction)>(); - - /// @brief Sets the file path to record. - /// @details This function sets file path which defines where newly recorded data should be stored. - /// @since_tizen 3.0 - /// @remarks If the same file already exists in the file system, then old file will be overwritten. - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] path The recording file path - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n - /// streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_get_filename() - int streamrecorder_set_filename( - streamrecorder_h recorder, - ffi.Pointer path, - ) { - return _streamrecorder_set_filename( - recorder, - path, - ); - } - - late final _streamrecorder_set_filenamePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, - ffi.Pointer)>>('streamrecorder_set_filename'); - late final _streamrecorder_set_filename = _streamrecorder_set_filenamePtr - .asFunction)>(); - - /// @brief Gets the file path to record. - /// @since_tizen 3.0 - /// @remarks You must release @a path using free(). - /// @param[in] recorder The handle to the streamrecorder - /// @param[out] path The recording file path - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_set_filename() - int streamrecorder_get_filename( - streamrecorder_h recorder, - ffi.Pointer> path, - ) { - return _streamrecorder_get_filename( - recorder, - path, - ); - } - - late final _streamrecorder_get_filenamePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - streamrecorder_h, ffi.Pointer>)>>( - 'streamrecorder_get_filename'); - late final _streamrecorder_get_filename = - _streamrecorder_get_filenamePtr.asFunction< - int Function(streamrecorder_h, ffi.Pointer>)>(); - - /// @brief Sets the file format for recording media stream. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] format The media file format - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n - /// streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_get_file_format() - /// @see streamrecorder_foreach_supported_file_format() - int streamrecorder_set_file_format( - streamrecorder_h recorder, - int format, - ) { - return _streamrecorder_set_file_format( - recorder, - format, - ); - } - - late final _streamrecorder_set_file_formatPtr = _lookup< - ffi.NativeFunction>( - 'streamrecorder_set_file_format'); - late final _streamrecorder_set_file_format = - _streamrecorder_set_file_formatPtr - .asFunction(); - - /// @brief Gets the file format for recording media stream. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[out] format The media file format - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_set_file_format() - /// @see streamrecorder_foreach_supported_file_format() - int streamrecorder_get_file_format( - streamrecorder_h recorder, - ffi.Pointer format, - ) { - return _streamrecorder_get_file_format( - recorder, - format, - ); - } - - late final _streamrecorder_get_file_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, - ffi.Pointer)>>('streamrecorder_get_file_format'); - late final _streamrecorder_get_file_format = - _streamrecorder_get_file_formatPtr - .asFunction)>(); - - /// @brief Sets the audio codec for encoding an audio stream. - /// @since_tizen 3.0 - /// @remarks You can get available audio encoders by using streamrecorder_foreach_supported_audio_encoder(). \n - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] codec The audio codec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n - /// streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_get_audio_encoder() - /// @see streamrecorder_foreach_supported_audio_encoder() - int streamrecorder_set_audio_encoder( - streamrecorder_h recorder, - int codec, - ) { - return _streamrecorder_set_audio_encoder( - recorder, - codec, - ); - } - - late final _streamrecorder_set_audio_encoderPtr = _lookup< - ffi.NativeFunction>( - 'streamrecorder_set_audio_encoder'); - late final _streamrecorder_set_audio_encoder = - _streamrecorder_set_audio_encoderPtr - .asFunction(); - - /// @brief Gets the audio codec for encoding an audio stream. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[out] codec The audio codec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @pre The streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_set_audio_encoder() - /// @see streamrecorder_foreach_supported_audio_encoder() - int streamrecorder_get_audio_encoder( - streamrecorder_h recorder, - ffi.Pointer codec, - ) { - return _streamrecorder_get_audio_encoder( - recorder, - codec, - ); - } - - late final _streamrecorder_get_audio_encoderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, - ffi.Pointer)>>('streamrecorder_get_audio_encoder'); - late final _streamrecorder_get_audio_encoder = - _streamrecorder_get_audio_encoderPtr - .asFunction)>(); - - /// @brief Sets the resolution of the video recording. - /// @since_tizen 3.0 - /// @remarks This function should be called before recording (streamrecorder_start()). - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] width The input width - /// @param[in] height The input height - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n - /// streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_start() - /// @see streamrecorder_get_video_resolution() - /// @see streamrecorder_foreach_supported_video_resolution() - int streamrecorder_set_video_resolution( - streamrecorder_h recorder, - int width, - int height, - ) { - return _streamrecorder_set_video_resolution( - recorder, - width, - height, - ); - } - - late final _streamrecorder_set_video_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, ffi.Int, - ffi.Int)>>('streamrecorder_set_video_resolution'); - late final _streamrecorder_set_video_resolution = - _streamrecorder_set_video_resolutionPtr - .asFunction(); - - /// @brief Gets the resolution of the video recording. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[out] width The video width - /// @param[out] height The video height - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @pre The streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_set_video_resolution() - /// @see streamrecorder_foreach_supported_video_resolution() - int streamrecorder_get_video_resolution( - streamrecorder_h recorder, - ffi.Pointer width, - ffi.Pointer height, - ) { - return _streamrecorder_get_video_resolution( - recorder, - width, - height, - ); - } - - late final _streamrecorder_get_video_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, ffi.Pointer, - ffi.Pointer)>>('streamrecorder_get_video_resolution'); - late final _streamrecorder_get_video_resolution = - _streamrecorder_get_video_resolutionPtr.asFunction< - int Function( - streamrecorder_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the video codec for encoding video stream. - /// @since_tizen 3.0 - /// @remarks You can get available video encoders by using recorder_foreach_supported_video_encoder(). - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] codec The video codec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n - /// streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_get_video_encoder() - /// @see streamrecorder_foreach_supported_video_encoder() - int streamrecorder_set_video_encoder( - streamrecorder_h recorder, - int codec, - ) { - return _streamrecorder_set_video_encoder( - recorder, - codec, - ); - } - - late final _streamrecorder_set_video_encoderPtr = _lookup< - ffi.NativeFunction>( - 'streamrecorder_set_video_encoder'); - late final _streamrecorder_set_video_encoder = - _streamrecorder_set_video_encoderPtr - .asFunction(); - - /// @brief Gets the video codec for encoding video stream. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[out] codec The video codec - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED The feature is not supported - /// @pre The streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_set_video_encoder() - /// @see streamrecorder_foreach_supported_video_encoder() - int streamrecorder_get_video_encoder( - streamrecorder_h recorder, - ffi.Pointer codec, - ) { - return _streamrecorder_get_video_encoder( - recorder, - codec, - ); - } - - late final _streamrecorder_get_video_encoderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, - ffi.Pointer)>>('streamrecorder_get_video_encoder'); - late final _streamrecorder_get_video_encoder = - _streamrecorder_get_video_encoderPtr - .asFunction)>(); - - /// @brief Sets the recording frame rate. - /// @since_tizen 3.0 - /// @remarks This function should be called before prepared state. - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] framerate The frame rate for recording - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @see streamrecorder_get_video_framerate() - int streamrecorder_set_video_framerate( - streamrecorder_h recorder, - int framerate, - ) { - return _streamrecorder_set_video_framerate( - recorder, - framerate, - ); - } - - late final _streamrecorder_set_video_frameratePtr = - _lookup>( - 'streamrecorder_set_video_framerate'); - late final _streamrecorder_set_video_framerate = - _streamrecorder_set_video_frameratePtr - .asFunction(); - - /// @brief Gets the recording frame rate. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the camera - /// @param[out] framerate The frame rate for recording that already is set - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see streamrecorder_set_video_framerate() - int streamrecorder_get_video_framerate( - streamrecorder_h recorder, - ffi.Pointer framerate, - ) { - return _streamrecorder_get_video_framerate( - recorder, - framerate, - ); - } - - late final _streamrecorder_get_video_frameratePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, - ffi.Pointer)>>('streamrecorder_get_video_framerate'); - late final _streamrecorder_get_video_framerate = - _streamrecorder_get_video_frameratePtr - .asFunction)>(); - - /// @brief Sets the video source format. - /// @since_tizen 3.0 - /// @remarks This function should be called before prepared state. - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] format The color type of video source - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @see streamrecorder_get_video_source_format() - int streamrecorder_set_video_source_format( - streamrecorder_h recorder, - int format, - ) { - return _streamrecorder_set_video_source_format( - recorder, - format, - ); - } - - late final _streamrecorder_set_video_source_formatPtr = _lookup< - ffi.NativeFunction>( - 'streamrecorder_set_video_source_format'); - late final _streamrecorder_set_video_source_format = - _streamrecorder_set_video_source_formatPtr - .asFunction(); - - /// @brief Gets the video source format. - /// @since_tizen 3.0 - /// @remarks This function should be called before prepared state. - /// @param[in] recorder The handle to the streamrecorder - /// @param[out] format The color type of video source that already is set - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see streamrecorder_set_video_source_format() - int streamrecorder_get_video_source_format( - streamrecorder_h recorder, - ffi.Pointer format, - ) { - return _streamrecorder_get_video_source_format( - recorder, - format, - ); - } - - late final _streamrecorder_get_video_source_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, ffi.Pointer)>>( - 'streamrecorder_get_video_source_format'); - late final _streamrecorder_get_video_source_format = - _streamrecorder_get_video_source_formatPtr - .asFunction)>(); - - /// @brief Sets the maximum size of a recording file. - /// @since_tizen 3.0 - /// @remarks After reaching the limitation, the recording data is discarded and not written in the recording file. - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] type The recording limit type - /// @param[in] limit If limit type is STREAMRECORDER_RECORDING_LIMIT_TYPE_SIZE, the limit value is the maximum size of the recording file(KB), \n - /// otherwise limit value is the maximum time of the recording file (in seconds) \n - /// @c 0 means unlimited recording size or time. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n - /// streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_get_recording_limit() - int streamrecorder_set_recording_limit( - streamrecorder_h recorder, - int type, - int limit, - ) { - return _streamrecorder_set_recording_limit( - recorder, - type, - limit, - ); - } - - late final _streamrecorder_set_recording_limitPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, ffi.Int32, - ffi.Int)>>('streamrecorder_set_recording_limit'); - late final _streamrecorder_set_recording_limit = - _streamrecorder_set_recording_limitPtr - .asFunction(); - - /// @brief Gets the maximum size of a recording file. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] type The recording limit type - /// @param[out] limit If limit type is STREAMRECORDER_RECORDING_LIMIT_TYPE_SIZE, the limit value is the maximum size of the recording file(KB), \n - /// otherwise limit value is the maximum time of the recording file (in seconds) \n - /// @c 0 means unlimited recording size or time. - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_set_recording_limit() - int streamrecorder_get_recording_limit( - streamrecorder_h recorder, - int type, - ffi.Pointer limit, - ) { - return _streamrecorder_get_recording_limit( - recorder, - type, - limit, - ); - } - - late final _streamrecorder_get_recording_limitPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, ffi.Int32, - ffi.Pointer)>>('streamrecorder_get_recording_limit'); - late final _streamrecorder_get_recording_limit = - _streamrecorder_get_recording_limitPtr.asFunction< - int Function(streamrecorder_h, int, ffi.Pointer)>(); - - /// @brief Sets the sampling rate of an audio stream. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] samplerate The sample rate in Hertz - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n - /// streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_get_audio_samplerate() - int streamrecorder_set_audio_samplerate( - streamrecorder_h recorder, - int samplerate, - ) { - return _streamrecorder_set_audio_samplerate( - recorder, - samplerate, - ); - } - - late final _streamrecorder_set_audio_sampleratePtr = - _lookup>( - 'streamrecorder_set_audio_samplerate'); - late final _streamrecorder_set_audio_samplerate = - _streamrecorder_set_audio_sampleratePtr - .asFunction(); - - /// @brief Gets the sampling rate of an audio stream. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[out] samplerate The sample rate in Hertz - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_set_audio_samplerate() - int streamrecorder_get_audio_samplerate( - streamrecorder_h recorder, - ffi.Pointer samplerate, - ) { - return _streamrecorder_get_audio_samplerate( - recorder, - samplerate, - ); - } - - late final _streamrecorder_get_audio_sampleratePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, - ffi.Pointer)>>('streamrecorder_get_audio_samplerate'); - late final _streamrecorder_get_audio_samplerate = - _streamrecorder_get_audio_sampleratePtr - .asFunction)>(); - - /// @brief Sets the bitrate of an audio encoder. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] bitrate The bitrate (for mms : 12200[bps], normal : 288000[bps]) - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n - /// streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_get_audio_encoder_bitrate() - int streamrecorder_set_audio_encoder_bitrate( - streamrecorder_h recorder, - int bitrate, - ) { - return _streamrecorder_set_audio_encoder_bitrate( - recorder, - bitrate, - ); - } - - late final _streamrecorder_set_audio_encoder_bitratePtr = - _lookup>( - 'streamrecorder_set_audio_encoder_bitrate'); - late final _streamrecorder_set_audio_encoder_bitrate = - _streamrecorder_set_audio_encoder_bitratePtr - .asFunction(); - - /// @brief Sets the bitrate of a video encoder. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] bitrate The bitrate in bits per second - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n - /// streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_get_video_encoder_bitrate() - int streamrecorder_set_video_encoder_bitrate( - streamrecorder_h recorder, - int bitrate, - ) { - return _streamrecorder_set_video_encoder_bitrate( - recorder, - bitrate, - ); - } - - late final _streamrecorder_set_video_encoder_bitratePtr = - _lookup>( - 'streamrecorder_set_video_encoder_bitrate'); - late final _streamrecorder_set_video_encoder_bitrate = - _streamrecorder_set_video_encoder_bitratePtr - .asFunction(); - - /// @brief Gets the bitrate of an audio encoder. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[out] bitrate The bitrate in bits per second - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_set_audio_encoder_bitrate() - int streamrecorder_get_audio_encoder_bitrate( - streamrecorder_h recorder, - ffi.Pointer bitrate, - ) { - return _streamrecorder_get_audio_encoder_bitrate( - recorder, - bitrate, - ); - } - - late final _streamrecorder_get_audio_encoder_bitratePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, ffi.Pointer)>>( - 'streamrecorder_get_audio_encoder_bitrate'); - late final _streamrecorder_get_audio_encoder_bitrate = - _streamrecorder_get_audio_encoder_bitratePtr - .asFunction)>(); - - /// @brief Gets the bitrate of a video encoder. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[out] bitrate The bitrate in bits per second - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_set_audio_encoder_bitrate() - int streamrecorder_get_video_encoder_bitrate( - streamrecorder_h recorder, - ffi.Pointer bitrate, - ) { - return _streamrecorder_get_video_encoder_bitrate( - recorder, - bitrate, - ); - } - - late final _streamrecorder_get_video_encoder_bitratePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, ffi.Pointer)>>( - 'streamrecorder_get_video_encoder_bitrate'); - late final _streamrecorder_get_video_encoder_bitrate = - _streamrecorder_get_video_encoder_bitratePtr - .asFunction)>(); - - /// @brief Sets the number of the audio channel. - /// @since_tizen 3.0 - /// @remarks This attribute is applied only in STREAMRECORDER_STATE_CREATED state. \n - /// For mono recording, setting channel to @c 1. \n - /// For stereo recording, setting channel to @c 2. - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] channel_count The number of the audio channel - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state - /// @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED.\n - /// streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_get_audio_channel() - int streamrecorder_set_audio_channel( - streamrecorder_h recorder, - int channel_count, - ) { - return _streamrecorder_set_audio_channel( - recorder, - channel_count, - ); - } - - late final _streamrecorder_set_audio_channelPtr = - _lookup>( - 'streamrecorder_set_audio_channel'); - late final _streamrecorder_set_audio_channel = - _streamrecorder_set_audio_channelPtr - .asFunction(); - - /// @brief Gets the number of the audio channel. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[out] channel_count The number of the audio channel - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The streamrecorder_enable_source_buffer() should be invoked before this function. - /// @see streamrecorder_set_audio_channel() - int streamrecorder_get_audio_channel( - streamrecorder_h recorder, - ffi.Pointer channel_count, - ) { - return _streamrecorder_get_audio_channel( - recorder, - channel_count, - ); - } - - late final _streamrecorder_get_audio_channelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, - ffi.Pointer)>>('streamrecorder_get_audio_channel'); - late final _streamrecorder_get_audio_channel = - _streamrecorder_get_audio_channelPtr - .asFunction)>(); - - /// @brief Retrieves all supported file formats by invoking a specific callback for each supported file format. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] callback The iteration callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @post streamrecorder_supported_file_format_cb() will be invoked. - /// @see streamrecorder_get_file_format() - /// @see streamrecorder_set_file_format() - /// @see streamrecorder_supported_file_format_cb() - int streamrecorder_foreach_supported_file_format( - streamrecorder_h recorder, - streamrecorder_supported_file_format_cb callback, - ffi.Pointer user_data, - ) { - return _streamrecorder_foreach_supported_file_format( - recorder, - callback, - user_data, - ); - } - - late final _streamrecorder_foreach_supported_file_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - streamrecorder_h, - streamrecorder_supported_file_format_cb, - ffi.Pointer)>>( - 'streamrecorder_foreach_supported_file_format'); - late final _streamrecorder_foreach_supported_file_format = - _streamrecorder_foreach_supported_file_formatPtr.asFunction< - int Function( - streamrecorder_h, - streamrecorder_supported_file_format_cb, - ffi.Pointer)>(); - - /// @brief Retrieves all supported audio encoders by invoking a specific callback for each supported audio encoder. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] callback The iteration callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @post streamrecorder_supported_audio_encoder_cb() will be invoked. - /// @see streamrecorder_set_audio_encoder() - /// @see streamrecorder_get_audio_encoder() - /// @see streamrecorder_supported_audio_encoder_cb() - int streamrecorder_foreach_supported_audio_encoder( - streamrecorder_h recorder, - streamrecorder_supported_audio_encoder_cb callback, - ffi.Pointer user_data, - ) { - return _streamrecorder_foreach_supported_audio_encoder( - recorder, - callback, - user_data, - ); - } - - late final _streamrecorder_foreach_supported_audio_encoderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - streamrecorder_h, - streamrecorder_supported_audio_encoder_cb, - ffi.Pointer)>>( - 'streamrecorder_foreach_supported_audio_encoder'); - late final _streamrecorder_foreach_supported_audio_encoder = - _streamrecorder_foreach_supported_audio_encoderPtr.asFunction< - int Function( - streamrecorder_h, - streamrecorder_supported_audio_encoder_cb, - ffi.Pointer)>(); - - /// @brief Retrieves all supported video encoders by invoking a specific callback for each supported video encoder. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] callback The iteration callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @post streamrecorder_supported_video_encoder_cb() will be invoked. - /// @see streamrecorder_set_video_encoder() - /// @see streamrecorder_get_video_encoder() - /// @see streamrecorder_supported_video_encoder_cb() - int streamrecorder_foreach_supported_video_encoder( - streamrecorder_h recorder, - streamrecorder_supported_video_encoder_cb callback, - ffi.Pointer user_data, - ) { - return _streamrecorder_foreach_supported_video_encoder( - recorder, - callback, - user_data, - ); - } - - late final _streamrecorder_foreach_supported_video_encoderPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - streamrecorder_h, - streamrecorder_supported_video_encoder_cb, - ffi.Pointer)>>( - 'streamrecorder_foreach_supported_video_encoder'); - late final _streamrecorder_foreach_supported_video_encoder = - _streamrecorder_foreach_supported_video_encoderPtr.asFunction< - int Function( - streamrecorder_h, - streamrecorder_supported_video_encoder_cb, - ffi.Pointer)>(); - - /// @brief Retrieves all supported video resolutions by invoking callback function once for each supported video resolution. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] foreach_cb The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @post This function invokes streamrecorder_supported_video_resolution_cb() repeatedly to retrieve each supported video resolution. - /// @see streamrecorder_set_video_resolution() - /// @see streamrecorder_get_video_resolution() - /// @see streamrecorder_supported_video_resolution_cb() - int streamrecorder_foreach_supported_video_resolution( - streamrecorder_h recorder, - streamrecorder_supported_video_resolution_cb foreach_cb, - ffi.Pointer user_data, - ) { - return _streamrecorder_foreach_supported_video_resolution( - recorder, - foreach_cb, - user_data, - ); - } - - late final _streamrecorder_foreach_supported_video_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - streamrecorder_h, - streamrecorder_supported_video_resolution_cb, - ffi.Pointer)>>( - 'streamrecorder_foreach_supported_video_resolution'); - late final _streamrecorder_foreach_supported_video_resolution = - _streamrecorder_foreach_supported_video_resolutionPtr.asFunction< - int Function( - streamrecorder_h, - streamrecorder_supported_video_resolution_cb, - ffi.Pointer)>(); - - /// @brief Registers the callback function that will be invoked when the streamrecorder get some notification. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] callback The function pointer of user callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @post streamrecorder_notify_cb() will be invoked. - /// @see streamrecorder_unset_notify_cb() - /// @see streamrecorder_notify_cb() - int streamrecorder_set_notify_cb( - streamrecorder_h recorder, - streamrecorder_notify_cb callback, - ffi.Pointer user_data, - ) { - return _streamrecorder_set_notify_cb( - recorder, - callback, - user_data, - ); - } - - late final _streamrecorder_set_notify_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, streamrecorder_notify_cb, - ffi.Pointer)>>('streamrecorder_set_notify_cb'); - late final _streamrecorder_set_notify_cb = - _streamrecorder_set_notify_cbPtr.asFunction< - int Function(streamrecorder_h, streamrecorder_notify_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see streamrecorder_set_notify_cb() - int streamrecorder_unset_notify_cb( - streamrecorder_h recorder, - ) { - return _streamrecorder_unset_notify_cb( - recorder, - ); - } - - late final _streamrecorder_unset_notify_cbPtr = - _lookup>( - 'streamrecorder_unset_notify_cb'); - late final _streamrecorder_unset_notify_cb = - _streamrecorder_unset_notify_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be invoked when the recording information changes. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] callback The function pointer of user callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @post streamrecorder_recording_status_cb() will be invoked. - /// @see streamrecorder_unset_recording_status_cb() - /// @see streamrecorder_recording_status_cb() - int streamrecorder_set_recording_status_cb( - streamrecorder_h recorder, - streamrecorder_recording_status_cb callback, - ffi.Pointer user_data, - ) { - return _streamrecorder_set_recording_status_cb( - recorder, - callback, - user_data, - ); - } - - late final _streamrecorder_set_recording_status_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, - streamrecorder_recording_status_cb, ffi.Pointer)>>( - 'streamrecorder_set_recording_status_cb'); - late final _streamrecorder_set_recording_status_cb = - _streamrecorder_set_recording_status_cbPtr.asFunction< - int Function(streamrecorder_h, streamrecorder_recording_status_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see streamrecorder_set_recording_status_cb() - int streamrecorder_unset_recording_status_cb( - streamrecorder_h recorder, - ) { - return _streamrecorder_unset_recording_status_cb( - recorder, - ); - } - - late final _streamrecorder_unset_recording_status_cbPtr = - _lookup>( - 'streamrecorder_unset_recording_status_cb'); - late final _streamrecorder_unset_recording_status_cb = - _streamrecorder_unset_recording_status_cbPtr - .asFunction(); - - /// @brief Registers the callback function to be run when reached the recording limit. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to streamrecorder - /// @param[in] callback The function pointer of user callback - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @post streamrecorder_recording_limit_reached_cb() will be invoked. - /// @see streamrecorder_unset_recording_limit_reached_cb() - /// @see streamrecorder_set_size_limit() - /// @see streamrecorder_set_time_limit() - /// @see streamrecorder_recording_limit_reached_cb() - int streamrecorder_set_recording_limit_reached_cb( - streamrecorder_h recorder, - streamrecorder_recording_limit_reached_cb callback, - ffi.Pointer user_data, - ) { - return _streamrecorder_set_recording_limit_reached_cb( - recorder, - callback, - user_data, - ); - } - - late final _streamrecorder_set_recording_limit_reached_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - streamrecorder_h, - streamrecorder_recording_limit_reached_cb, - ffi.Pointer)>>( - 'streamrecorder_set_recording_limit_reached_cb'); - late final _streamrecorder_set_recording_limit_reached_cb = - _streamrecorder_set_recording_limit_reached_cbPtr.asFunction< - int Function( - streamrecorder_h, - streamrecorder_recording_limit_reached_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see streamrecorder_set_recording_limit_reached_cb() - int streamrecorder_unset_recording_limit_reached_cb( - streamrecorder_h recorder, - ) { - return _streamrecorder_unset_recording_limit_reached_cb( - recorder, - ); - } - - late final _streamrecorder_unset_recording_limit_reached_cbPtr = - _lookup>( - 'streamrecorder_unset_recording_limit_reached_cb'); - late final _streamrecorder_unset_recording_limit_reached_cb = - _streamrecorder_unset_recording_limit_reached_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be called when an asynchronous operation error occurred. - /// @since_tizen 3.0 - /// @remarks This callback informs critical error situation.\n - /// When this callback is invoked, user should release the resource and terminate the application. \n - /// These error codes will occur. \n - /// #STREAMRECORDER_ERROR_INVALID_OPERATION \n - /// #STREAMRECORDER_ERROR_OUT_OF_MEMORY - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @post This function will invoke streamrecorder_error_cb() when an asynchronous operation error occur. - /// @see streamrecorder_unset_error_cb() - /// @see streamrecorder_error_cb() - int streamrecorder_set_error_cb( - streamrecorder_h recorder, - streamrecorder_error_cb callback, - ffi.Pointer user_data, - ) { - return _streamrecorder_set_error_cb( - recorder, - callback, - user_data, - ); - } - - late final _streamrecorder_set_error_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, streamrecorder_error_cb, - ffi.Pointer)>>('streamrecorder_set_error_cb'); - late final _streamrecorder_set_error_cb = - _streamrecorder_set_error_cbPtr.asFunction< - int Function(streamrecorder_h, streamrecorder_error_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @return @c on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see streamrecorder_set_error_cb() - int streamrecorder_unset_error_cb( - streamrecorder_h recorder, - ) { - return _streamrecorder_unset_error_cb( - recorder, - ); - } - - late final _streamrecorder_unset_error_cbPtr = - _lookup>( - 'streamrecorder_unset_error_cb'); - late final _streamrecorder_unset_error_cb = _streamrecorder_unset_error_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be called when asynchronous buffers are consumed. - /// @since_tizen 3.0 - /// @remarks This callback informs to user dealloc buffer.\n - /// When this callback is invoked, user should release the buffer or media packet. \n - /// @param[in] recorder The handle to the streamrecorder - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see streamrecorder_unset_buffer_consume_completed_cb() - /// @see streamrecorder_push_stream_buffer() - int streamrecorder_set_buffer_consume_completed_cb( - streamrecorder_h recorder, - streamrecorder_consume_completed_cb callback, - ffi.Pointer user_data, - ) { - return _streamrecorder_set_buffer_consume_completed_cb( - recorder, - callback, - user_data, - ); - } - - late final _streamrecorder_set_buffer_consume_completed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(streamrecorder_h, - streamrecorder_consume_completed_cb, ffi.Pointer)>>( - 'streamrecorder_set_buffer_consume_completed_cb'); - late final _streamrecorder_set_buffer_consume_completed_cb = - _streamrecorder_set_buffer_consume_completed_cbPtr.asFunction< - int Function(streamrecorder_h, streamrecorder_consume_completed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen 3.0 - /// @param[in] recorder The handle to the streamrecorder - /// @return @c on success, otherwise a negative error value - /// @retval #STREAMRECORDER_ERROR_NONE Successful - /// @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter - /// @see streamrecorder_set_buffer_consume_completed_cb() - int streamrecorder_unset_buffer_consume_completed_cb( - streamrecorder_h recorder, - ) { - return _streamrecorder_unset_buffer_consume_completed_cb( - recorder, - ); - } - - late final _streamrecorder_unset_buffer_consume_completed_cbPtr = - _lookup>( - 'streamrecorder_unset_buffer_consume_completed_cb'); - late final _streamrecorder_unset_buffer_consume_completed_cb = - _streamrecorder_unset_buffer_consume_completed_cbPtr - .asFunction(); - - /// @deprecated Deprecated since 5.0. - /// @brief Creates thumbnail info handle. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks The @a thumb info should be released using thumbnail_util_destroy(). - /// - /// @param[in] thumb The handle to thumbnail info - /// - /// @return @c 0 on success, otherwise a negative error value - /// - /// @retval #THUMBNAIL_UTIL_ERROR_NONE Successful - /// @retval #THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #THUMBNAIL_UTIL_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @see thumbnail_util_destroy() - int thumbnail_util_create( - ffi.Pointer thumb, - ) { - return _thumbnail_util_create( - thumb, - ); - } - - late final _thumbnail_util_createPtr = - _lookup)>>( - 'thumbnail_util_create'); - late final _thumbnail_util_create = _thumbnail_util_createPtr - .asFunction)>(); - - /// @deprecated Deprecated since 5.0. Use thumbnail_util_extract_to_file() or thumbnail_util_extract_to_buffer() instead. - /// @brief Extracts the thumbnail for the given media, asynchronously. - /// @details This function extracts the thumbnail for given media item and calls registered - /// callback function for completion of extracting the thumbnail.\n - /// You can distinguish generated thumbnails by @a request_id. Therefore, the @a request_id must be maintained until the request is completed. \n - /// And the @a request_id is also used to cancel the request. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @remarks The @a request_id should be released using free(). \n - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage. \n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n - /// If you don't set the size, the thumbnail size will be set default size. Default size is 320x240. \n - /// Color space of the generated thumbnail is BGRA. \n - /// Since 3.0, http://tizen.org/privilege/content.write privilege is not required. \n - /// - /// @param[in] thumb The thumbnail info handle - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] request_id The request id for the thumbnail extraction request - /// - /// @return @c 0 on success, otherwise a negative error value - /// - /// @retval #THUMBNAIL_UTIL_ERROR_NONE Successful - /// @retval #THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #THUMBNAIL_UTIL_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre Create a thumbnail info handle by calling thumbnail_util_create(). \n - /// The content path that you want to generate thumbnail must be set by calling thumbnail_util_set_path(). - /// @post Thumbnail extraction result except canceled is provided by thumbnail_extracted_cb(). - /// @see thumbnail_util_create() - /// @see thumbnail_util_set_path() - /// @see thumbnail_util_set_size() - /// @see thumbnail_extracted_cb() - /// @see thumbnail_util_cancel() - /// @see thumbnail_util_destroy() - int thumbnail_util_extract( - thumbnail_h thumb, - thumbnail_extracted_cb callback, - ffi.Pointer user_data, - ffi.Pointer> request_id, - ) { - return _thumbnail_util_extract( - thumb, - callback, - user_data, - request_id, - ); - } - - late final _thumbnail_util_extractPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - thumbnail_h, - thumbnail_extracted_cb, - ffi.Pointer, - ffi.Pointer>)>>('thumbnail_util_extract'); - late final _thumbnail_util_extract = _thumbnail_util_extractPtr.asFunction< - int Function(thumbnail_h, thumbnail_extracted_cb, ffi.Pointer, - ffi.Pointer>)>(); - - /// @deprecated Deprecated since 5.0. - /// @brief Sets the path of original media file. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] thumb The thumbnail info handle - /// @param[in] path The path of the original media file - /// - /// @return @c 0 on success, otherwise a negative error value - /// - /// @retval #THUMBNAIL_UTIL_ERROR_NONE Successful - /// @retval #THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre Create a thumbnail info handle by calling thumbnail_util_create(). - /// @see thumbnail_util_create() - /// @see thumbnail_util_set_size() - /// @see thumbnail_util_destroy() - int thumbnail_util_set_path( - thumbnail_h thumb, - ffi.Pointer path, - ) { - return _thumbnail_util_set_path( - thumb, - path, - ); - } - - late final _thumbnail_util_set_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - thumbnail_h, ffi.Pointer)>>('thumbnail_util_set_path'); - late final _thumbnail_util_set_path = _thumbnail_util_set_pathPtr - .asFunction)>(); - - /// @deprecated Deprecated since 5.0. - /// @brief Sets the size of thumbnail to be extracted. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks If you don't set the size, the thumbnail size will be set default size. Default size is 320x240. \n - /// If the set width is not a multiple of 8, it can be changed by inner process. the width will be a multiple of 8 greater than the set value. - /// - /// @param[in] thumb The thumbnail info handle - /// @param[in] width The width of the thumbnail - /// @param[in] height The height of the thumbnail - /// - /// @return @c 0 on success, otherwise a negative error value - /// - /// @retval #THUMBNAIL_UTIL_ERROR_NONE Successful - /// @retval #THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre Create a thumbnail info handle by calling thumbnail_util_create(). - /// @see thumbnail_util_create() - /// @see thumbnail_util_set_path() - /// @see thumbnail_util_destroy() - int thumbnail_util_set_size( - thumbnail_h thumb, - int width, - int height, - ) { - return _thumbnail_util_set_size( - thumb, - width, - height, - ); - } - - late final _thumbnail_util_set_sizePtr = _lookup< - ffi.NativeFunction>( - 'thumbnail_util_set_size'); - late final _thumbnail_util_set_size = _thumbnail_util_set_sizePtr - .asFunction(); - - /// @deprecated Deprecated since 5.0. - /// @brief Cancels the thumbnail extraction request for the given media. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks If there is no item you want to cancel, this function return MEDIA_CONTENT_ERROR_INVALID_OPERATION - /// - /// @param[in] thumb The media thumbnail info handle - /// @param[in] request_id The generated request id by thumbnail extraction request - /// - /// @return @c 0 on success, otherwise a negative error value - /// - /// @retval #THUMBNAIL_UTIL_ERROR_NONE Successful - /// @retval #THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre It is available before thumbnail_extracted_cb() is called. - /// @see thumbnail_util_extract() - int thumbnail_util_cancel( - thumbnail_h thumb, - ffi.Pointer request_id, - ) { - return _thumbnail_util_cancel( - thumb, - request_id, - ); - } - - late final _thumbnail_util_cancelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - thumbnail_h, ffi.Pointer)>>('thumbnail_util_cancel'); - late final _thumbnail_util_cancel = _thumbnail_util_cancelPtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. - /// @brief Cancels all thumbnail extraction requests associated with the given thumbnail info handle. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks If there is no item you want to cancel, this function return MEDIA_CONTENT_ERROR_INVALID_OPERATION - /// - /// @param[in] thumb The media thumbnail info handle - /// - /// @return @c 0 on success, otherwise a negative error value - /// - /// @retval #THUMBNAIL_UTIL_ERROR_NONE Successful - /// @retval #THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre It is available before thumbnail_extracted_cb() is called. - /// @see thumbnail_util_extract() - int thumbnail_util_cancel_all( - thumbnail_h thumb, - ) { - return _thumbnail_util_cancel_all( - thumb, - ); - } - - late final _thumbnail_util_cancel_allPtr = - _lookup>( - 'thumbnail_util_cancel_all'); - late final _thumbnail_util_cancel_all = - _thumbnail_util_cancel_allPtr.asFunction(); - - /// @deprecated Deprecated since 5.0. - /// @brief Destroys thumbnail info handle. - /// @details The function frees all resources related to the thumbnail info handle. This handle - /// can no longer be used to perform any operations. New thumbnail info handle has to - /// be created before the next usage. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// - /// @param[in] thumb The thumbnail info handle - /// - /// @return @c 0 on success, otherwise a negative error value - /// - /// @retval #THUMBNAIL_UTIL_ERROR_NONE Successful - /// @retval #THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre Create a thumbnail info handle by calling thumbnail_util_create(). - /// @see thumbnail_util_create() - int thumbnail_util_destroy( - thumbnail_h thumb, - ) { - return _thumbnail_util_destroy( - thumb, - ); - } - - late final _thumbnail_util_destroyPtr = - _lookup>( - 'thumbnail_util_destroy'); - late final _thumbnail_util_destroy = - _thumbnail_util_destroyPtr.asFunction(); - - /// @brief Extracts the thumbnail for the given media into a file, synchronously. - /// @details This function creates thumbnail from a given media file. \n - /// The generated thumbnail is saved in the given thumbnail path. \n - /// The format of the thumbnail file is determined by the extension of the thumbnail path - /// (e.g. path is input.jpg and thumbnail_path is thumbnail.png then thumbnail.png is encoded in the PNG format). \n - /// If the extension is missing or the format is not supported, the thumbnail is encoded in the same format as the given media - /// (e.g. path is input.jpg and thumbnail_path is thumbnail.out then thumbnail.out is encoded in the JPEG format). \n - /// Supported image formats are as follows: \n - /// - GIF, JPEG, PNG, BMP, WBMP \n - /// Video files only support JPEG format thumbnail. - /// - /// @since_tizen 5.0 - /// - /// @remarks http://tizen.org/privilege/mediastorage is needed if input or output path points to media storage. \n - /// http://tizen.org/privilege/externalstorage is needed if input or output path points to external storage. \n - /// The width and height of the thumbnail to be generated cannot exceed 2000. \n - /// - /// @param[in] path The path of the original media file - /// @param[in] width The width of the thumbnail - /// @param[in] height The height of the thumbnail - /// @param[in] thumbnail_path The path to save the generated thumbnail - /// - /// @return @c 0 on success, otherwise a negative error value - /// - /// @retval #THUMBNAIL_UTIL_ERROR_NONE Successful - /// @retval #THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #THUMBNAIL_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// @retval #THUMBNAIL_UTIL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #THUMBNAIL_UTIL_ERROR_PERMISSION_DENIED Permission denied - int thumbnail_util_extract_to_file( - ffi.Pointer path, - int width, - int height, - ffi.Pointer thumbnail_path, - ) { - return _thumbnail_util_extract_to_file( - path, - width, - height, - thumbnail_path, - ); - } - - late final _thumbnail_util_extract_to_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.UnsignedInt, - ffi.UnsignedInt, - ffi.Pointer)>>('thumbnail_util_extract_to_file'); - late final _thumbnail_util_extract_to_file = - _thumbnail_util_extract_to_filePtr.asFunction< - int Function( - ffi.Pointer, int, int, ffi.Pointer)>(); - - /// @brief Extracts the thumbnail for the given media into a buffer, synchronously. - /// @details This function creates thumbnails from a given media file. \n - /// The generated thumbnail is returned as a raw data stream. - /// - /// @since_tizen 5.0 - /// - /// @remarks http://tizen.org/privilege/mediastorage is needed if input or output path points to media storage. \n - /// http://tizen.org/privilege/externalstorage is needed if input or output path points to external storage. \n - /// The width and height of the thumbnail to be generated cannot exceed 2000. \n - /// In the case of video file, color space of the generated thumbnail is RGB. \n - /// In the case of image file, color space of the generated thumbnail is BGRA. \n - /// The @a thumb_buffer should be released using free(). - /// - /// @param[in] path The path of the original media file - /// @param[in] width The width of the thumbnail - /// @param[in] height The height of the thumbnail - /// @param[out] thumb_buffer The raw data of the thumbnail which is generated - /// @param[out] thumb_size The size of the thumbnail which is generated - /// @param[out] thumb_width The width of the thumbnail which is generated - /// @param[out] thumb_height The height of the thumbnail which is generated - /// - /// @return @c 0 on success, otherwise a negative error value - /// - /// @retval #THUMBNAIL_UTIL_ERROR_NONE Successful - /// @retval #THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #THUMBNAIL_UTIL_ERROR_INVALID_OPERATION Invalid operation - /// @retval #THUMBNAIL_UTIL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #THUMBNAIL_UTIL_ERROR_PERMISSION_DENIED Permission denied - int thumbnail_util_extract_to_buffer( - ffi.Pointer path, - int width, - int height, - ffi.Pointer> thumb_buffer, - ffi.Pointer thumb_size, - ffi.Pointer thumb_width, - ffi.Pointer thumb_height, - ) { - return _thumbnail_util_extract_to_buffer( - path, - width, - height, - thumb_buffer, - thumb_size, - thumb_width, - thumb_height, - ); - } - - late final _thumbnail_util_extract_to_bufferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.UnsignedInt, - ffi.UnsignedInt, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'thumbnail_util_extract_to_buffer'); - late final _thumbnail_util_extract_to_buffer = - _thumbnail_util_extract_to_bufferPtr.asFunction< - int Function( - ffi.Pointer, - int, - int, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Plays a tone with stream information of sound-manager. - /// - /// @since_tizen 3.0 - /// - /// @remarks Voice Recognition stream type is not supported in this API. - /// - /// @param[in] tone The tone type to play - /// @param[in] stream_info The sound stream information handle - /// @param[in] duration_ms The tone duration in milliseconds \n - /// @c -1 indicates an infinite duration. - /// @param[out] id The tone player ID ( can be set to @c NULL ) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TONE_PLAYER_ERROR_NONE Successful - /// @retval #TONE_PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TONE_PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #TONE_PLAYER_ERROR_NOT_SUPPORTED_TYPE Not supported stream type - /// - /// @see tone_player_stop() - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - int tone_player_start_new( - int tone, - sound_stream_info_h stream_info, - int duration_ms, - ffi.Pointer id, - ) { - return _tone_player_start_new( - tone, - stream_info, - duration_ms, - id, - ); - } - - late final _tone_player_start_newPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, sound_stream_info_h, ffi.Int, - ffi.Pointer)>>('tone_player_start_new'); - late final _tone_player_start_new = _tone_player_start_newPtr.asFunction< - int Function(int, sound_stream_info_h, int, ffi.Pointer)>(); - - /// @brief Stops playing the tone. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] id The tone player ID to stop - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #TONE_PLAYER_ERROR_NONE Successful - /// @retval #TONE_PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TONE_PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see tone_player_start_new() - int tone_player_stop( - int id, - ) { - return _tone_player_stop( - id, - ); - } - - late final _tone_player_stopPtr = - _lookup>( - 'tone_player_stop'); - late final _tone_player_stop = - _tone_player_stopPtr.asFunction(); - - /// @brief Plays a WAV file with stream information of sound-manager. - /// @since_tizen 3.0 - /// - /// @remarks Voice Recognition and VOIP stream types are not supported in this API. - /// - /// @param[in] path The file path to play - /// @param[in] stream_info The sound stream information handle - /// @param[in] callback The callback function to be invoked when a WAV file is no longer being played - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] id The WAV player ID (can be set to @c NULL) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WAV_PLAYER_ERROR_NONE Successful - /// @retval #WAV_PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WAV_PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WAV_PLAYER_ERROR_FORMAT_NOT_SUPPORTED Not supported format - /// @retval #WAV_PLAYER_ERROR_NOT_SUPPORTED_TYPE Not supported stream type - /// - /// @post It invokes wav_player_playback_completed_cb() when a WAV file is no longer being played. - /// @see wav_player_stop() - /// @see wav_player_playback_completed_cb() - /// @see sound_manager_create_stream_information() - /// @see sound_manager_destroy_stream_information() - int wav_player_start_new( - ffi.Pointer path, - sound_stream_info_h stream_info, - wav_player_playback_completed_cb callback, - ffi.Pointer user_data, - ffi.Pointer id, - ) { - return _wav_player_start_new( - path, - stream_info, - callback, - user_data, - id, - ); - } - - late final _wav_player_start_newPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - sound_stream_info_h, - wav_player_playback_completed_cb, - ffi.Pointer, - ffi.Pointer)>>('wav_player_start_new'); - late final _wav_player_start_new = _wav_player_start_newPtr.asFunction< - int Function( - ffi.Pointer, - sound_stream_info_h, - wav_player_playback_completed_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Stops playing the WAV file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] id The WAV player ID to stop - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #WAV_PLAYER_ERROR_NONE Successful - /// @retval #WAV_PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WAV_PLAYER_ERROR_INVALID_OPERATION Invalid operation - /// - /// @see wav_player_start_new() - int wav_player_stop( - int id, - ) { - return _wav_player_stop( - id, - ); - } - - late final _wav_player_stopPtr = - _lookup>('wav_player_stop'); - late final _wav_player_stop = - _wav_player_stopPtr.asFunction(); - - /// @brief Initializes Application Service Platform (ASP). - /// @since_tizen 4.0 - /// @return 0 on success, otherwise a negative error value. - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_RESOURCE_BUSY Device or resource busy - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @see asp_deinitialize() - int asp_initialize() { - return _asp_initialize(); - } - - late final _asp_initializePtr = - _lookup>('asp_initialize'); - late final _asp_initialize = _asp_initializePtr.asFunction(); - - /// @brief Deinitializes Application Service Platform (ASP). - /// @since_tizen 4.0 - /// @privilege http://tizen.org/privilege/wifidirect - /// @return 0 on success, otherwise a negative error value. - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_COMMUNICATION_FAILED Communication failed - /// @pre Application Service Platform (ASP) must be initialized by asp_initialize(). - /// @see asp_initialize() - int asp_deinitialize() { - return _asp_deinitialize(); - } - - late final _asp_deinitializePtr = - _lookup>('asp_deinitialize'); - late final _asp_deinitialize = - _asp_deinitializePtr.asFunction(); - - /// @brief Registers the callback function that will be invoked when a service found. - /// @since_tizen 4.0 - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data passed from the callback registration function - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @pre Application Service Platform (ASP) must be initialized by asp_initialize(). - /// @post asp_search_result_cb will be called under certain conditions, - /// after calling asp_seek_start() - /// @see asp_initialize() - /// @see asp_seek_unset_search_result_cb() - /// @see asp_seek_start() - int asp_seek_set_search_result_cb( - asp_seek_search_result_cb cb, - ffi.Pointer user_data, - ) { - return _asp_seek_set_search_result_cb( - cb, - user_data, - ); - } - - late final _asp_seek_set_search_result_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_seek_search_result_cb, - ffi.Pointer)>>('asp_seek_set_search_result_cb'); - late final _asp_seek_set_search_result_cb = - _asp_seek_set_search_result_cbPtr.asFunction< - int Function(asp_seek_search_result_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function that will invoked when a service found. - /// @since_tizen 4.0 - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @pre Application Service Platform (ASP) must be initialized by asp_initialize(). - /// @see asp_initialize() - /// @see asp_seek_set_search_result_cb() - int asp_seek_unset_search_result_cb() { - return _asp_seek_unset_search_result_cb(); - } - - late final _asp_seek_unset_search_result_cbPtr = - _lookup>( - 'asp_seek_unset_search_result_cb'); - late final _asp_seek_unset_search_result_cb = - _asp_seek_unset_search_result_cbPtr.asFunction(); - - /// @brief Registers the callback function that will invoked when the status of an advertisement to a service is changed. - /// @since_tizen 4.0 - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data passed from the callback registration function - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @pre Application Service Platform (ASP) must be initialized by asp_initialize(). - /// @post asp_seek_search_result_cb() will be called under certain conditions, - /// after calling asp_seek_start() - /// @see asp_initialize() - /// @see asp_advert_unset_status_changed_cb() - /// @see asp_advert_start_advertising() - int asp_advert_set_status_changed_cb( - asp_advert_status_changed_cb cb, - ffi.Pointer user_data, - ) { - return _asp_advert_set_status_changed_cb( - cb, - user_data, - ); - } - - late final _asp_advert_set_status_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_advert_status_changed_cb, - ffi.Pointer)>>('asp_advert_set_status_changed_cb'); - late final _asp_advert_set_status_changed_cb = - _asp_advert_set_status_changed_cbPtr.asFunction< - int Function(asp_advert_status_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function that will invoked when the status of an advertisement to a service is changed. - /// @since_tizen 4.0 - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @pre Application Service Platform (ASP) must be initialized by asp_initialize(). - /// @see asp_initialize() - /// @see asp_advert_set_status_changed_cb() - int asp_advert_unset_status_changed_cb() { - return _asp_advert_unset_status_changed_cb(); - } - - late final _asp_advert_unset_status_changed_cbPtr = - _lookup>( - 'asp_advert_unset_status_changed_cb'); - late final _asp_advert_unset_status_changed_cb = - _asp_advert_unset_status_changed_cbPtr.asFunction(); - - /// @brief Registers the callback called when ASP session connection is requested. - /// @since_tizen 4.0 - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data passed from the callback registration function - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @pre Application Service Platform (ASP) must be initialized by asp_initialize(). - /// @see asp_initialize() - /// @see asp_session_unset_request_cb() - int asp_session_set_request_cb( - asp_session_request_cb cb, - ffi.Pointer user_data, - ) { - return _asp_session_set_request_cb( - cb, - user_data, - ); - } - - late final _asp_session_set_request_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_session_request_cb, - ffi.Pointer)>>('asp_session_set_request_cb'); - late final _asp_session_set_request_cb = - _asp_session_set_request_cbPtr.asFunction< - int Function(asp_session_request_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback called ASP when session connection is requested. - /// @since_tizen 4.0 - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @pre Application Service Platform (ASP) must be initialized by asp_initialize(). - /// @see asp_initialize() - /// @see asp_session_set_request_cb() - int asp_session_unset_request_cb() { - return _asp_session_unset_request_cb(); - } - - late final _asp_session_unset_request_cbPtr = - _lookup>( - 'asp_session_unset_request_cb'); - late final _asp_session_unset_request_cb = - _asp_session_unset_request_cbPtr.asFunction(); - - /// @brief Registers the callback called when the session configuration is requested. - /// @since_tizen 4.0 - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data passed from the callback registration function - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @pre Application Service Platform (ASP) must be initialized by asp_initialize(). - /// @see asp_initialize() - /// @see asp_session_unset_config_request_cb() - /// @see asp_session_config_request_cb() - int asp_session_set_config_request_cb( - asp_session_config_request_cb cb, - ffi.Pointer user_data, - ) { - return _asp_session_set_config_request_cb( - cb, - user_data, - ); - } - - late final _asp_session_set_config_request_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_session_config_request_cb, - ffi.Pointer)>>('asp_session_set_config_request_cb'); - late final _asp_session_set_config_request_cb = - _asp_session_set_config_request_cbPtr.asFunction< - int Function(asp_session_config_request_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback called when the session configuration is requested. - /// @since_tizen 4.0 - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @pre Application Service Platform (ASP) must be initialized by asp_initialize(). - /// @see asp_initialize() - /// @see asp_session_config_request_cb() - int asp_session_unset_config_request_cb() { - return _asp_session_unset_config_request_cb(); - } - - late final _asp_session_unset_config_request_cbPtr = - _lookup>( - 'asp_session_unset_config_request_cb'); - late final _asp_session_unset_config_request_cb = - _asp_session_unset_config_request_cbPtr.asFunction(); - - /// @brief Registers the callback called when the state of the session connection is changed. - /// @since_tizen 4.0 - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data passed from the callback registration function - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @pre Application Service Platform (ASP) must be initialized by asp_initialize(). - /// @see asp_initialize() - /// @see asp_session_unset_connection_status_changed_cb() - /// @see asp_session_connect_status_cb() - int asp_session_set_connect_status_cb( - asp_session_connect_status_cb cb, - ffi.Pointer user_data, - ) { - return _asp_session_set_connect_status_cb( - cb, - user_data, - ); - } - - late final _asp_session_set_connect_status_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_session_connect_status_cb, - ffi.Pointer)>>('asp_session_set_connect_status_cb'); - late final _asp_session_set_connect_status_cb = - _asp_session_set_connect_status_cbPtr.asFunction< - int Function(asp_session_connect_status_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback called when the state of the session connection is changed. - /// @since_tizen 4.0 - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @pre Application Service Platform (ASP) must be initialized by asp_initialize(). - /// @see asp_initialize() - /// @see asp_session_set_connection_status_changed_cb() - int asp_session_unset_connect_status_cb() { - return _asp_session_unset_connect_status_cb(); - } - - late final _asp_session_unset_connect_status_cbPtr = - _lookup>( - 'asp_session_unset_connect_status_cb'); - late final _asp_session_unset_connect_status_cb = - _asp_session_unset_connect_status_cbPtr.asFunction(); - - /// @brief Registers the callback called when the state of the session is changed. - /// @since_tizen 4.0 - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data passed from the callback registration function - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @pre Application Service Platform (ASP) must be initialized by asp_initialize(). - /// @see asp_initialize() - /// @see asp_session_unset_status_cb() - /// @see asp_session_status_cb() - int asp_session_set_status_cb( - asp_session_status_cb cb, - ffi.Pointer user_data, - ) { - return _asp_session_set_status_cb( - cb, - user_data, - ); - } - - late final _asp_session_set_status_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_session_status_cb, - ffi.Pointer)>>('asp_session_set_status_cb'); - late final _asp_session_set_status_cb = _asp_session_set_status_cbPtr - .asFunction)>(); - - /// @brief Unregisters the callback called when the state of the session is changed. - /// @since_tizen 4.0 - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @pre Application Service Platform (ASP) must be initialized by asp_initialize(). - /// @see asp_initialize() - /// @see asp_session_set_status_cb() - int asp_session_unset_status_cb() { - return _asp_session_unset_status_cb(); - } - - late final _asp_session_unset_status_cbPtr = - _lookup>( - 'asp_session_unset_status_cb'); - late final _asp_session_unset_status_cb = - _asp_session_unset_status_cbPtr.asFunction(); - - /// @brief Registers the callback called when the state of the port is changed. - /// @since_tizen 4.0 - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data passed from the callback registration function - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @pre Application Service Platform (ASP) must be initialized by asp_initialize(). - /// @see asp_initialize() - /// @see asp_session_unset_status_cb() - int asp_session_set_port_status_cb( - asp_session_port_status_cb cb, - ffi.Pointer user_data, - ) { - return _asp_session_set_port_status_cb( - cb, - user_data, - ); - } - - late final _asp_session_set_port_status_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_session_port_status_cb, - ffi.Pointer)>>('asp_session_set_port_status_cb'); - late final _asp_session_set_port_status_cb = - _asp_session_set_port_status_cbPtr.asFunction< - int Function(asp_session_port_status_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback called when the state of the port is changed. - /// @since_tizen 4.0 - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @pre Application Service Platform (ASP) must be initialized by asp_initialize(). - /// @see asp_initialize() - /// @see asp_session_set_port_status_cb() - int asp_session_unset_port_status_cb() { - return _asp_session_unset_port_status_cb(); - } - - late final _asp_session_unset_port_status_cbPtr = - _lookup>( - 'asp_session_unset_port_status_cb'); - late final _asp_session_unset_port_status_cb = - _asp_session_unset_port_status_cbPtr.asFunction(); - - /// @brief Creates the description of a service to be advertised. - /// @since_tizen 4.0 - /// @remarks The @a adv_service should be released using asp_advert_destroy(). - /// @param[in] instance_name Service instance name of a service type to be advertised. - /// The length of this parameter be 63 byte or less and - /// encoding shall be single-byte or multi-byte UTF-8 characters. - /// If you want to advertise one of the original P2PS defined services, - /// this shall be NULL. - /// @param[out] adv_service service descriptor handle - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @pre Application Service Platform (ASP) must be initialized by asp_initialize(). - /// @see asp_advert_destroy() - int asp_advert_create( - ffi.Pointer instance_name, - ffi.Pointer adv_service, - ) { - return _asp_advert_create( - instance_name, - adv_service, - ); - } - - late final _asp_advert_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('asp_advert_create'); - late final _asp_advert_create = _asp_advert_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys the description of a service to be advertised. - /// @details If asp_advert_start_advertising() was called for a service, - /// asp_advert_stop_advertising() should be called for it before destroying it. - /// @since_tizen 4.0 - /// @param[in] adv_service Service descriptor handle provided by the asp_advert_create() - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SERVICE_NOT_FOUND Service not found - /// @pre This API needs asp_create_service() before use - /// @see asp_advert_create() - int asp_advert_destroy( - asp_advert_service_h adv_service, - ) { - return _asp_advert_destroy( - adv_service, - ); - } - - late final _asp_advert_destroyPtr = - _lookup>( - 'asp_advert_destroy'); - late final _asp_advert_destroy = - _asp_advert_destroyPtr.asFunction(); - - /// @brief Sets the service type for a service to be advertised. - /// @details Application should set service type after creating service using - /// asp_advert_create() and before advertising service using - /// asp_advert_start_advertising(). - /// @since_tizen 4.0 - /// @param[in] adv_service Service descriptor handle provided by the asp_advert_create() - /// @param[in] service_type The unique type of a particular service. - /// this shall be at least 1 character and no more than 15 characters long - /// contain only US-ASCII [ANSI.X3.4-1986] letters 'A' - 'Z' and - /// 'a' - 'z', digits '0' - '9', and hyphens ('-', ASCII 0x2D or decimal 45) - /// contain at least one letter ('A' - 'Z' or 'a' - ‘z') - /// not begin or end with a hyphen. If you want to advertise one of the - /// original P2PS defined services, this means service name. - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SERVICE_NOT_FOUND Service not found - /// @pre This API needs asp_advert_create() before use - /// @see asp_advert_create() - int asp_advert_set_service_type( - asp_advert_service_h adv_service, - ffi.Pointer service_type, - ) { - return _asp_advert_set_service_type( - adv_service, - service_type, - ); - } - - late final _asp_advert_set_service_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_advert_service_h, - ffi.Pointer)>>('asp_advert_set_service_type'); - late final _asp_advert_set_service_type = _asp_advert_set_service_typePtr - .asFunction)>(); - - /// @brief Sets auto accept for a service to be advertised. - /// @details Application should set service auto accept after creating service using - /// asp_advert_create() and before advertising service using - /// asp_advert_start_advertising(). - /// @since_tizen 4.0 - /// @param[in] adv_service Service descriptor handle provided by the asp_advert_create() - /// @param[in] auto_accept Enables/Disables auto accept based on the value TRUE/FALSE - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SERVICE_NOT_FOUND Service not found - /// @pre This API needs asp_advert_create() before use - /// @see asp_advert_create() - int asp_advert_set_auto_accept( - asp_advert_service_h adv_service, - bool auto_accept, - ) { - return _asp_advert_set_auto_accept( - adv_service, - auto_accept, - ); - } - - late final _asp_advert_set_auto_acceptPtr = _lookup< - ffi.NativeFunction>( - 'asp_advert_set_auto_accept'); - late final _asp_advert_set_auto_accept = _asp_advert_set_auto_acceptPtr - .asFunction(); - - /// @brief Adds the information for a service to be advertised. - /// @details Application should set service information after creating service using - /// asp_advert_create() and before advertising service using - /// asp_advert_start_advertising(). - /// @since_tizen 4.0 - /// @param[in] adv_service Service descriptor handle provided by the asp_advert_create() - /// @param[in] key Service-defined key data specified in Section 6 of RFC6763 - /// @param[in] value Service-defined value data specified in Section 6 of RFC6763 - /// Only one value can be added for a given key. If a value is set for a key, - /// and another value was set for the key before, the old value will be - /// overwritten with the new one. - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SERVICE_NOT_FOUND Service not found - /// @pre This API needs asp_advert_create() before use - /// @see asp_advert_create() - int asp_advert_add_info( - asp_advert_service_h adv_service, - ffi.Pointer key, - ffi.Pointer value, - ) { - return _asp_advert_add_info( - adv_service, - key, - value, - ); - } - - late final _asp_advert_add_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_advert_service_h, ffi.Pointer, - ffi.Pointer)>>('asp_advert_add_info'); - late final _asp_advert_add_info = _asp_advert_add_infoPtr.asFunction< - int Function(asp_advert_service_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Sets the information for a service to be advertised. - /// @details Application should set service information after creating service using - /// asp_advert_create() and before advertising service using - /// asp_advert_start_advertising(). - /// @since_tizen 4.0 - /// @remarks @a value should not be freed. - /// It is recommended to make a copy of it to use. - /// @param[in] adv_service Service descriptor handle provided by the asp_advert_create() - /// @param[in] key Service-defined key data specified in Section 6 of RFC6763 - /// @param[in] length Length of service-defined value data specified in Section 6 of RFC6763 - /// @param[in] value Service-defined value data specified in Section 6 of RFC6763 - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SERVICE_NOT_FOUND Service not found - /// @pre This API needs asp_advert_create() before use - /// @see asp_advert_create() - int asp_advert_get_info( - asp_advert_service_h adv_service, - ffi.Pointer key, - ffi.Pointer length, - ffi.Pointer> value, - ) { - return _asp_advert_get_info( - adv_service, - key, - length, - value, - ); - } - - late final _asp_advert_get_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - asp_advert_service_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('asp_advert_get_info'); - late final _asp_advert_get_info = _asp_advert_get_infoPtr.asFunction< - int Function(asp_advert_service_h, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Sets the information for a service to be advertised. - /// @details Application should set service information after creating service using - /// asp_advert_create() and before advertising service using - /// asp_advert_start_advertising(). - /// @since_tizen 4.0 - /// @param[in] adv_service Service descriptor handle provided by the asp_advert_create() - /// @param[in] key Service-defined key data specified to be removed - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SERVICE_NOT_FOUND Service not found - /// @pre This API needs asp_advert_create() before use - /// @see asp_advert_create() - int asp_advert_remove_info( - asp_advert_service_h adv_service, - ffi.Pointer key, - ) { - return _asp_advert_remove_info( - adv_service, - key, - ); - } - - late final _asp_advert_remove_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_advert_service_h, - ffi.Pointer)>>('asp_advert_remove_info'); - late final _asp_advert_remove_info = _asp_advert_remove_infoPtr - .asFunction)>(); - - /// @brief Sets the status for a service to be advertised. - /// @details Application should set service status after creating service using - /// asp_advert_create() and before advertising service using - /// asp_advert_start_advertising(). - /// @since_tizen 4.0 - /// @param[in] adv_service Service descriptor handle provided by the asp_advert_create() - /// @param[in] status Status of the service: - /// (@c 1 = available to use, @c 0 = not available to use, - /// @c 2-255 = service specific information) - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SERVICE_NOT_FOUND Service not found - /// @pre This API needs asp_advert_create() before use - /// @see asp_advert_create() - int asp_advert_set_status( - asp_advert_service_h adv_service, - int status, - ) { - return _asp_advert_set_status( - adv_service, - status, - ); - } - - late final _asp_advert_set_statusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_advert_service_h, - ffi.UnsignedChar)>>('asp_advert_set_status'); - late final _asp_advert_set_status = _asp_advert_set_statusPtr - .asFunction(); - - /// @brief Sets the discovery mechanism for a service to be advertised. - /// @details Application should set discovery mechanism after creating service using - /// asp_advert_create() and before advertising service using - /// asp_advert_start_advertising(). - /// @since_tizen 4.0 - /// @param[in] adv_service Service descriptor handle provided by the asp_advert_create() - /// @param[in] discovery_tech The discovery mechanism; values of - /// #asp_discovery_tech_e combined with bitwise 'or' - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SERVICE_NOT_FOUND Service not found - /// @pre This API needs asp_advert_create() before use - /// @see asp_advert_create() - int asp_advert_set_discovery_tech( - asp_advert_service_h adv_service, - int discovery_tech, - ) { - return _asp_advert_set_discovery_tech( - adv_service, - discovery_tech, - ); - } - - late final _asp_advert_set_discovery_techPtr = _lookup< - ffi.NativeFunction>( - 'asp_advert_set_discovery_tech'); - late final _asp_advert_set_discovery_tech = _asp_advert_set_discovery_techPtr - .asFunction(); - - /// @brief Sets the preferred connection for a service to be advertised. - /// @details Application should set preferred connection after creating service using - /// asp_advert_create() and before advertising service using - /// asp_advert_start_advertising(). - /// @since_tizen 4.0 - /// @param[in] adv_service Service descriptor handle provided by the asp_advert_create() - /// @param[in] preferred_connection The preferred connection - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SERVICE_NOT_FOUND Service not found - /// @pre This API needs asp_advert_create() before use - /// @see asp_advert_create() - int asp_advert_set_preferred_connection( - asp_advert_service_h adv_service, - int preferred_connection, - ) { - return _asp_advert_set_preferred_connection( - adv_service, - preferred_connection, - ); - } - - late final _asp_advert_set_preferred_connectionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_advert_service_h, - ffi.UnsignedChar)>>('asp_advert_set_preferred_connection'); - late final _asp_advert_set_preferred_connection = - _asp_advert_set_preferred_connectionPtr - .asFunction(); - - /// @brief Sets the Wi-Fi P2P role for a service to be advertised. - /// @details Application should set role after creating service using - /// asp_advert_create() and before advertising service using - /// asp_advert_start_advertising(). - /// @since_tizen 4.0 - /// @param[in] adv_service Service descriptor handle provided by the asp_advert_create() - /// @param[in] role The role of the service: \n - /// #ASP_ADVERT_P2P_ROLE_SCHEME_ANY - All roles are acceptable \n - /// #ASP_ADVERT_P2P_ROLE_SCHEME_GO - The receiving interface should assume \n - /// the GO role, if it's not possible, #ASP_ERROR_NETWORK_ROLE_REJECTED \n - /// is returned \n - /// #ASP_ADVERT_P2P_ROLE_SCHEME_GC - - /// The receiving interface should assume the GC role - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SERVICE_NOT_FOUND Service not found - /// @retval #ASP_ERROR_NETWORK_ROLE_REJECTED Network role rejected - /// @pre This API needs asp_advert_create() before use - /// @see asp_advert_create() - int asp_advert_set_p2p_role_scheme( - asp_advert_service_h adv_service, - int role, - ) { - return _asp_advert_set_p2p_role_scheme( - adv_service, - role, - ); - } - - late final _asp_advert_set_p2p_role_schemePtr = _lookup< - ffi - .NativeFunction>( - 'asp_advert_set_p2p_role_scheme'); - late final _asp_advert_set_p2p_role_scheme = - _asp_advert_set_p2p_role_schemePtr - .asFunction(); - - /// @brief Gets the Wi-Fi P2P role for a service to be advertised. - /// @details Application should Get role after creating service using - /// asp_advert_create() and before advertising service using - /// asp_advert_start_advertising(). - /// @since_tizen 4.0 - /// @param[in] adv_service Service descriptor handle provided by the asp_advert_create() - /// @param[in] role The role of the service: \n - /// #ASP_ADVERT_P2P_ROLE_SCHEME_ANY - All roles are acceptable \n - /// #ASP_ADVERT_P2P_ROLE_SCHEME_GO - The receiving interface should assume \n - /// the GO role \n - /// #ASP_ADVERT_P2P_ROLE_SCHEME_GC - - /// The receiving interface should assume the GC role - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SERVICE_NOT_FOUND Service not found - /// @pre This API needs asp_advert_create() before use - /// @see asp_advert_create() - int asp_advert_get_p2p_role_scheme( - asp_advert_service_h adv_service, - ffi.Pointer role, - ) { - return _asp_advert_get_p2p_role_scheme( - adv_service, - role, - ); - } - - late final _asp_advert_get_p2p_role_schemePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_advert_service_h, - ffi.Pointer)>>('asp_advert_get_p2p_role_scheme'); - late final _asp_advert_get_p2p_role_scheme = - _asp_advert_get_p2p_role_schemePtr.asFunction< - int Function(asp_advert_service_h, ffi.Pointer)>(); - - /// @brief Sets the P2P configuration method for a service to be advertised. - /// @details Application should set configuration method after creating service using - /// asp_advert_create() and before advertising service using - /// asp_advert_start_advertising(). - /// @since_tizen 4.0 - /// @param[in] adv_service Service descriptor handle provided by the asp_advert_create() - /// @param[in] config_method preferred Wi-Fi Simple Config (WSC) configuration method. - /// Default value is ASP_WPS_TYPE_DEFAULT. - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SERVICE_NOT_FOUND Service not found - /// @pre This API needs asp_advert_create() before use - /// @see asp_advert_create() - int asp_advert_set_p2p_config_method( - asp_advert_service_h adv_service, - int config_method, - ) { - return _asp_advert_set_p2p_config_method( - adv_service, - config_method, - ); - } - - late final _asp_advert_set_p2p_config_methodPtr = _lookup< - ffi - .NativeFunction>( - 'asp_advert_set_p2p_config_method'); - late final _asp_advert_set_p2p_config_method = - _asp_advert_set_p2p_config_methodPtr - .asFunction(); - - /// @brief Gets the P2P configuration method for a service to be advertised. - /// @details Application should Get configuration method after creating service using - /// asp_advert_create() and before advertising service using - /// asp_advert_start_advertising(). - /// @since_tizen 4.0 - /// @param[in] adv_service Service descriptor handle provided by the asp_advert_create() - /// @param[in] config_method preferred Wi-Fi Simple Config (WSC)configuration method. - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SERVICE_NOT_FOUND Service not found - /// @pre This API needs asp_advert_create() before use - /// @see asp_advert_create() - int asp_advert_get_p2p_config_method( - asp_advert_service_h adv_service, - ffi.Pointer config_method, - ) { - return _asp_advert_get_p2p_config_method( - adv_service, - config_method, - ); - } - - late final _asp_advert_get_p2p_config_methodPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_advert_service_h, - ffi.Pointer)>>('asp_advert_get_p2p_config_method'); - late final _asp_advert_get_p2p_config_method = - _asp_advert_get_p2p_config_methodPtr.asFunction< - int Function(asp_advert_service_h, ffi.Pointer)>(); - - /// @brief Sets the service response for an advertised service. - /// @details Application should set service response after creating service using - /// asp_advert_create() and before advertising service using - /// asp_advert_create(). - /// @since_tizen 4.0 - /// @param[in] adv_service Service descriptor handle provided by the asp_advert_create() - /// @param[in] rsp_info Specified for a particular service up to 144 bytes. - /// You can refer to Wi-Fi Peer-to-Peer Services Technical Specification, - /// Wi-Fi Alliance. Available at:http://www.wi-fi.org - /// @param[in] length The length of @a rsp_info in bytes, maximum length is 144 - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SERVICE_NOT_FOUND Service not found - /// @pre This API needs asp_advert_create() before use - /// @see asp_advert_create() - int asp_advert_set_p2p_response( - asp_advert_service_h adv_service, - ffi.Pointer rsp_info, - int length, - ) { - return _asp_advert_set_p2p_response( - adv_service, - rsp_info, - length, - ); - } - - late final _asp_advert_set_p2p_responsePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_advert_service_h, ffi.Pointer, - ffi.Int)>>('asp_advert_set_p2p_response'); - late final _asp_advert_set_p2p_response = - _asp_advert_set_p2p_responsePtr.asFunction< - int Function(asp_advert_service_h, ffi.Pointer, int)>(); - - /// @brief Starts to advertise a service. - /// @details Application should start to advertise after creating service using - /// asp_advert_create(). If the service is being advertised, no changes can be made to it. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] adv_service Service descriptor handle provided by the asp_advert_create() - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_PERMISSION_DENIED Permission denied - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SERVICE_NOT_FOUND Service not found - /// @pre This API needs asp_advert_create() before use - /// @see asp_advert_create() - /// @see asp_advert_stop_advertising() - int asp_advert_start_advertising( - asp_advert_service_h adv_service, - ) { - return _asp_advert_start_advertising( - adv_service, - ); - } - - late final _asp_advert_start_advertisingPtr = - _lookup>( - 'asp_advert_start_advertising'); - late final _asp_advert_start_advertising = _asp_advert_start_advertisingPtr - .asFunction(); - - /// @brief Stops a service advertisement. - /// @details Application should cancel to advertise after advertising service using - /// asp_advert_start_advertising(). - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] adv_service Service descriptor handle provided by the asp_advert_create() - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_PERMISSION_DENIED Permission denied - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SERVICE_NOT_FOUND Service not found - /// @pre This API needs asp_advert_start_advertising() before use - /// @see asp_advert_start_advertising() - int asp_advert_stop_advertising( - asp_advert_service_h adv_service, - ) { - return _asp_advert_stop_advertising( - adv_service, - ); - } - - late final _asp_advert_stop_advertisingPtr = - _lookup>( - 'asp_advert_stop_advertising'); - late final _asp_advert_stop_advertising = _asp_advert_stop_advertisingPtr - .asFunction(); - - /// @brief Changes the advertising service status. - /// @details Application should change the advertising service - /// status after advertising service using asp_advert_start_advertising(). - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] adv_service Service descriptor handle provided by the asp_create_service() - /// @param[in] status Status of the service: - /// (@c 1 = available to use, @c 0 = not available to use, - /// @c 2-255 = service specific information) - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_PERMISSION_DENIED Permission denied - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SERVICE_NOT_FOUND Service not found - /// @pre This API needs asp_advert_start_advertising() before use - /// @see asp_advert_start_advertising() - int asp_advert_change_service_status( - asp_advert_service_h adv_service, - int status, - ) { - return _asp_advert_change_service_status( - adv_service, - status, - ); - } - - late final _asp_advert_change_service_statusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_advert_service_h, - ffi.UnsignedChar)>>('asp_advert_change_service_status'); - late final _asp_advert_change_service_status = - _asp_advert_change_service_statusPtr - .asFunction(); - - /// @brief Creates the description of a seek operation. - /// @remarks The @a seek_service should be released using asp_seek_destroy(). - /// @since_tizen 4.0 - /// @param[in] service_type Service Type of a service being searched. - /// this shall be at least 1 character and no more than 15 characters long - /// contain only US-ASCII [ANSI.X3.4-1986] letters 'A' - 'Z' and - /// 'a' - 'z', digits '0' - '9', and hyphens ('-', ASCII 0x2D or decimal 45) - /// contain at least one letter ('A' - 'Z' or 'a' - ‘z') - /// not begin or end with a hyphen. If you want to seek one of the - /// original P2PS defined services, this means service name. - /// @param[out] seek_service Service seek handle - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @pre Application Service Platform (ASP) must be initialized by asp_initialize(). - /// @see asp_seek_destroy() - int asp_seek_create( - ffi.Pointer service_type, - ffi.Pointer seek_service, - ) { - return _asp_seek_create( - service_type, - seek_service, - ); - } - - late final _asp_seek_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('asp_seek_create'); - late final _asp_seek_create = _asp_seek_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys the description of a seek operation. - /// @details If asp_seek_start() was called for a service, - /// asp_seek_stop() should be called for it before destroying it. - /// asp_seek_stop(). - /// @since_tizen 4.0 - /// @param[in] seek_service Service seek handle provided by the asp_seek_create() - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SERVICE_NOT_FOUND Service not found - /// @pre A seek service handle must be created with asp_seek_create(). - /// @see asp_seek_create - int asp_seek_destroy( - asp_seek_service_h seek_service, - ) { - return _asp_seek_destroy( - seek_service, - ); - } - - late final _asp_seek_destroyPtr = - _lookup>( - 'asp_seek_destroy'); - late final _asp_seek_destroy = - _asp_seek_destroyPtr.asFunction(); - - /// @brief Adds the information for a service to be sought. - /// @details Application should set service information after creating service using - /// asp_seek_create() and before seeking service using asp_seek_start(). - /// @since_tizen 4.0 - /// @privlevel public - /// @param[in] seek_service Service descriptor handle provided by the asp_seek_create() - /// @param[in] key Service-defined key data to be searched, - /// specified in Section 6 of RFC6763 - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SERVICE_NOT_FOUND Service not found - /// @pre This API needs asp_seek_create() before use - /// @see asp_seek_create() - int asp_seek_add_info( - asp_seek_service_h seek_service, - ffi.Pointer key, - ) { - return _asp_seek_add_info( - seek_service, - key, - ); - } - - late final _asp_seek_add_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - asp_seek_service_h, ffi.Pointer)>>('asp_seek_add_info'); - late final _asp_seek_add_info = _asp_seek_add_infoPtr - .asFunction)>(); - - /// @brief Removes the information for a service to be sought. - /// @details Application should set service information after creating service using - /// asp_seek_create() and before seeking service using asp_seek_start(). - /// @since_tizen 4.0 - /// @param[in] seek_service Service descriptor handle provided by the asp_seek_create() - /// @param[in] key Service-defined key data to be searched, - /// specified in Section 6 of RFC6763 - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SERVICE_NOT_FOUND Service not found - /// @pre This API needs asp_seek_create() before use - /// @see asp_seek_create() - int asp_seek_remove_info( - asp_seek_service_h seek_service, - ffi.Pointer key, - ) { - return _asp_seek_remove_info( - seek_service, - key, - ); - } - - late final _asp_seek_remove_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_seek_service_h, - ffi.Pointer)>>('asp_seek_remove_info'); - late final _asp_seek_remove_info = _asp_seek_remove_infoPtr - .asFunction)>(); - - /// @brief Sets the discovery mechanism for a service to be sought. - /// @details Application should set service information after creating service using - /// asp_seek_create() and before seeking service using asp_seek_start(). - /// @since_tizen 4.0 - /// @param[in] seek_service Service descriptor handle provided by the asp_seek_create() - /// @param[in] discovery_tech The discovery mechanism, values of - /// #asp_discovery_tech_e combined with bitwise 'or' - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SERVICE_NOT_FOUND Service not found - /// @pre This API needs asp_seek_create() before use - /// @see asp_seek_create() - int asp_seek_set_discovery_tech( - asp_seek_service_h seek_service, - int discovery_tech, - ) { - return _asp_seek_set_discovery_tech( - seek_service, - discovery_tech, - ); - } - - late final _asp_seek_set_discovery_techPtr = _lookup< - ffi.NativeFunction>( - 'asp_seek_set_discovery_tech'); - late final _asp_seek_set_discovery_tech = _asp_seek_set_discovery_techPtr - .asFunction(); - - /// @brief Sets the preferred connection for a service to be sought. - /// @details Application should set service information after creating service using - /// asp_seek_create() and before seeking service using asp_seek_start(). - /// @since_tizen 4.0 - /// @param[in] seek_service Service descriptor handle provided by the asp_seek_create() - /// @param[in] preferred_connection The preferred connection - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SERVICE_NOT_FOUND Service not found - /// @pre This API needs asp_seek_create() before use - /// @see asp_seek_create() - int asp_seek_set_preferred_connection( - asp_seek_service_h seek_service, - int preferred_connection, - ) { - return _asp_seek_set_preferred_connection( - seek_service, - preferred_connection, - ); - } - - late final _asp_seek_set_preferred_connectionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_seek_service_h, - ffi.UnsignedChar)>>('asp_seek_set_preferred_connection'); - late final _asp_seek_set_preferred_connection = - _asp_seek_set_preferred_connectionPtr - .asFunction(); - - /// @brief Starts to seek services on peer devices. - /// @details If the service is currently seeking, no changes can be made to it. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] seek_service Service seek handle provided by the asp_seek_create() - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_PERMISSION_DENIED Permission denied - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SERVICE_NOT_FOUND Service not found - /// @pre A seek service handle must be created with asp_seek_create(). - /// @see asp_seek_create() - /// @see asp_seek_stop() - int asp_seek_start( - asp_seek_service_h seek_service, - ) { - return _asp_seek_start( - seek_service, - ); - } - - late final _asp_seek_startPtr = - _lookup>( - 'asp_seek_start'); - late final _asp_seek_start = - _asp_seek_startPtr.asFunction(); - - /// @brief Stops seeking services. - /// @details Application should cancel to seek service after searching service using - /// asp_seek_start(). - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] seek_service Service seek handle provided by the asp_seek_create() - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_PERMISSION_DENIED Permission denied - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SERVICE_NOT_FOUND Service not found - /// @pre A seek service handle must be created with asp_seek_create(). - /// @see asp_seek_start() - int asp_seek_stop( - asp_seek_service_h seek_service, - ) { - return _asp_seek_stop( - seek_service, - ); - } - - late final _asp_seek_stopPtr = - _lookup>( - 'asp_seek_stop'); - late final _asp_seek_stop = - _asp_seek_stopPtr.asFunction(); - - /// @brief Creates a local Application Service Platform (ASP) session. - /// @since_tizen 4.0 - /// @remarks The @a session should be released using asp_session_destroy(). - /// @param[in] service_mac P2P device address of remote P2P device provided by - /// asp_seek_search_result_cb() - /// @param[in] adv_id The advertisement ID provided by - /// asp_seek_search_result_cb() - /// @param[in] session ASP session descriptor handle - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @see asp_session_destroy() - int asp_session_create( - ffi.Pointer service_mac, - int adv_id, - ffi.Pointer session, - ) { - return _asp_session_create( - service_mac, - adv_id, - session, - ); - } - - late final _asp_session_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.UnsignedInt, - ffi.Pointer)>>('asp_session_create'); - late final _asp_session_create = _asp_session_createPtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer)>(); - - /// @brief Destroys a local Application Service Platform (ASP) session. - /// @details Application should create session by asp_session_create(). - /// @since_tizen 4.0 - /// @param[in] session Application Service Platform session descriptor handle - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SESSION_NOT_FOUND Session not found - /// @pre This API needs asp_session_create() before use. - /// @see asp_session_create() - int asp_session_destroy( - asp_session_h session, - ) { - return _asp_session_destroy( - session, - ); - } - - late final _asp_session_destroyPtr = - _lookup>( - 'asp_session_destroy'); - late final _asp_session_destroy = - _asp_session_destroyPtr.asFunction(); - - /// @brief Gets the session MAC for an Application Service Platform session. - /// @details Application should request to connect session by - /// asp_session_connect() or receive request by asp_session_request_cb(). - /// @since_tizen 4.0 - /// @remarks @a session_mac should not be freed. - /// It is recommended to make a copy of it to use. - /// @param[in] session Application Service Platform session descriptor handle - /// @param[out] session_mac The session MAC is the MAC address of - /// P2P device which assigned the session ID - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SESSION_NOT_FOUND Session not found - /// @pre This API needs asp_session_connect() before use. - /// @see asp_session_connect() - /// @see asp_session_request_cb() - int asp_session_get_mac( - asp_session_h session, - ffi.Pointer> session_mac, - ) { - return _asp_session_get_mac( - session, - session_mac, - ); - } - - late final _asp_session_get_macPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_session_h, - ffi.Pointer>)>>('asp_session_get_mac'); - late final _asp_session_get_mac = _asp_session_get_macPtr.asFunction< - int Function(asp_session_h, ffi.Pointer>)>(); - - /// @brief Gets the ID of an Application Service Platform session. - /// @details Application should create local session by - /// asp_session_create() or receive request by asp_session_request_cb(). - /// @since_tizen 4.0 - /// @param[in] session Application Service Platform session descriptor handle - /// @param[out] session_id The session ID - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SESSION_NOT_FOUND Session not found - /// @pre This API needs asp_session_create() before use. - /// @see asp_session_create() - /// @see asp_session_request_cb() - int asp_session_get_id( - asp_session_h session, - ffi.Pointer session_id, - ) { - return _asp_session_get_id( - session, - session_id, - ); - } - - late final _asp_session_get_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_session_h, - ffi.Pointer)>>('asp_session_get_id'); - late final _asp_session_get_id = _asp_session_get_idPtr - .asFunction)>(); - - /// @brief Sets the information for an Application Service Platform session. - /// @details Application should set session_info after creating session by - /// asp_session_create() and before requesting to connect - /// session by asp_session_connect(). - /// @since_tizen 4.0 - /// @param[in] session Application Service Platform session descriptor handle - /// provided by the asp_session_create() - /// @param[in] session_info Detailed information about the session. - /// The session_info parameter is defined for each service section - /// and up to 144 bytes. You can refer to Wi-Fi Peer-to-Peer Services - /// Technical Specification, Wi-Fi Alliance. - /// Available at:http://www.wi-fi.org - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SESSION_NOT_FOUND Session not found - /// @pre This API needs asp_session_create() before use. - /// @see asp_session_create() - int asp_session_set_info( - asp_session_h session, - ffi.Pointer session_info, - ) { - return _asp_session_set_info( - session, - session_info, - ); - } - - late final _asp_session_set_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - asp_session_h, ffi.Pointer)>>('asp_session_set_info'); - late final _asp_session_set_info = _asp_session_set_infoPtr - .asFunction)>(); - - /// @brief Gets the information for an Application Service Platform session. - /// @details Application should get session_info after creating session by - /// asp_session_create() and before requesting to connect - /// session by asp_session_connect(). - /// @since_tizen 4.0 - /// @remarks @a session_info should not be freed. - /// It is recommended to make a copy of it to use. - /// @param[in] session Application Service Platform session descriptor handle - /// provided by the asp_session_create() - /// @param[out] session_info detailed information about session - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SESSION_NOT_FOUND Session not found - /// @pre This API needs asp_session_create() before use. - /// @see asp_session_create() - int asp_session_get_info( - asp_session_h session, - ffi.Pointer> session_info, - ) { - return _asp_session_get_info( - session, - session_info, - ); - } - - late final _asp_session_get_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_session_h, - ffi.Pointer>)>>('asp_session_get_info'); - late final _asp_session_get_info = _asp_session_get_infoPtr.asFunction< - int Function(asp_session_h, ffi.Pointer>)>(); - - /// @brief Sets the Wi-Fi Direct group role in session. - /// @details Application should set role after creating session by - /// asp_session_create() and before requesting to connect - /// session by asp_session_connect(). - /// @since_tizen 4.0 - /// @param[in] session Application Service Platform session descriptor handle - /// provided by the asp_session_create() - /// @param[in] role The role of the service: \n - /// #ASP_ADVERT_P2P_ROLE_SCHEME_ANY - All roles are acceptable \n - /// #ASP_ADVERT_P2P_ROLE_SCHEME_GO - The receiving interface should assume \n - /// the GO role, if it's not possible, #ASP_ERROR_NETWORK_ROLE_REJECTED \n - /// is returned \n - /// #ASP_ADVERT_P2P_ROLE_SCHEME_GC - - /// The receiving interface should assume the GC role - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SESSION_NOT_FOUND Session not found - /// @retval #ASP_ERROR_NETWORK_ROLE_REJECTED Network role rejected - /// @pre This API needs asp_create_service() before use. - /// @see asp_create_session() - int asp_session_set_p2p_role_scheme( - asp_session_h session, - int role, - ) { - return _asp_session_set_p2p_role_scheme( - session, - role, - ); - } - - late final _asp_session_set_p2p_role_schemePtr = - _lookup>( - 'asp_session_set_p2p_role_scheme'); - late final _asp_session_set_p2p_role_scheme = - _asp_session_set_p2p_role_schemePtr - .asFunction(); - - /// @brief Gets the Wi-Fi Direct group role in session. - /// @since_tizen 4.0 - /// @param[in] session Application Service Platform session descriptor handle - /// provided by the asp_session_create() - /// @param[in] role The role of the service: \n - /// #ASP_ADVERT_P2P_ROLE_SCHEME_ANY - All roles are acceptable \n - /// #ASP_ADVERT_P2P_ROLE_SCHEME_GO - The receiving interface should assume \n - /// the GO role\n - /// #ASP_ADVERT_P2P_ROLE_SCHEME_GC - - /// The receiving interface should assume the GC role - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SESSION_NOT_FOUND Session not found - /// @pre This API needs asp_session_create() before use. - /// @see asp_session_create() - int asp_session_get_p2p_role_scheme( - asp_session_h session, - ffi.Pointer role, - ) { - return _asp_session_get_p2p_role_scheme( - session, - role, - ); - } - - late final _asp_session_get_p2p_role_schemePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_session_h, - ffi.Pointer)>>('asp_session_get_p2p_role_scheme'); - late final _asp_session_get_p2p_role_scheme = - _asp_session_get_p2p_role_schemePtr - .asFunction)>(); - - /// @brief Sets the Preferred WSC Configuration method. - /// @details Application should set the config method after creating session by - /// asp_session_create() and before requesting to connect - /// session by asp_session_connect(). - /// @since_tizen 4.0 - /// @param[in] session Application Service Platform session descriptor handle - /// provided by the asp_session_create() - /// @param[in] config_method Preferred WSC Configuration method. - /// Default value is #ASP_WPS_TYPE_DEFAULT. - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SESSION_NOT_FOUND Session not found - /// @pre This API needs asp_session_create() before use. - /// @see asp_session_create() - int asp_session_set_p2p_config_method( - asp_session_h session, - int config_method, - ) { - return _asp_session_set_p2p_config_method( - session, - config_method, - ); - } - - late final _asp_session_set_p2p_config_methodPtr = - _lookup>( - 'asp_session_set_p2p_config_method'); - late final _asp_session_set_p2p_config_method = - _asp_session_set_p2p_config_methodPtr - .asFunction(); - - /// @brief Gets the Preferred WSC Configuration method. - /// @since_tizen 4.0 - /// @param[in] session Application Service Platform session descriptor handle - /// provided by the asp_session_create() - /// @param[out] config_method Preferred WSC Configuration method - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SESSION_NOT_FOUND Session not found - /// @pre This API needs asp_session_create() before use. - /// @see asp_session_create() - int asp_session_get_p2p_config_method( - asp_session_h session, - ffi.Pointer config_method, - ) { - return _asp_session_get_p2p_config_method( - session, - config_method, - ); - } - - late final _asp_session_get_p2p_config_methodPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_session_h, - ffi.Pointer)>>('asp_session_get_p2p_config_method'); - late final _asp_session_get_p2p_config_method = - _asp_session_get_p2p_config_methodPtr - .asFunction)>(); - - /// @brief Gets the session close status. - /// @details This call is valid only for closed sessions (sessions in the #ASP_SESSION_STATE_CLOSED - /// state). If the @a session does not identify a closed session, - /// #ASP_ERROR_NOT_PERMITTED is returned. - /// @since_tizen 4.0 - /// @param[in] session ASP session descriptor handle provided by - /// the asp_session_request_cb() callback, - /// asp_session_create(), or asp_session_get_handle() - /// @param[out] status The session close status - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_SESSION_NOT_FOUND Session not found - int asp_session_get_close_status( - asp_session_h session, - ffi.Pointer status, - ) { - return _asp_session_get_close_status( - session, - status, - ); - } - - late final _asp_session_get_close_statusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_session_h, - ffi.Pointer)>>('asp_session_get_close_status'); - late final _asp_session_get_close_status = _asp_session_get_close_statusPtr - .asFunction)>(); - - /// @brief Starts to connect the Application Service Platform session. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] session Application Service Platform session descriptor handle - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_PERMISSION_DENIED Permission denied - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SESSION_NOT_FOUND Session not found - /// @pre This API needs asp_session_create() before use. - /// @see asp_session_create() - int asp_session_connect( - asp_session_h session, - ) { - return _asp_session_connect( - session, - ); - } - - late final _asp_session_connectPtr = - _lookup>( - 'asp_session_connect'); - late final _asp_session_connect = - _asp_session_connectPtr.asFunction(); - - /// @brief Confirms the Application Service Platform(ASP) session request. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] session ASP session descriptor handle provided by - /// the asp_session_request_cb() callback or - /// asp_session_create() if pin is requested. - /// @param[in] confirmed (@c true = confirm session, @c false = reject session) - /// @param[in] pin If session requests the WSC PIN - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_PERMISSION_DENIED Permission denied - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SESSION_NOT_FOUND Session not found - /// @see asp_advert_start_advertising() - /// @see asp_session_create() - int asp_session_confirm( - asp_session_h session, - bool confirmed, - ffi.Pointer pin, - ) { - return _asp_session_confirm( - session, - confirmed, - pin, - ); - } - - late final _asp_session_confirmPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_session_h, ffi.Bool, - ffi.Pointer)>>('asp_session_confirm'); - late final _asp_session_confirm = _asp_session_confirmPtr - .asFunction)>(); - - /// @brief Gets the Description of Application Service Platform (ASP) session to be connected. - /// @since_tizen 4.0 - /// @param[in] session_mac The MAC address of the P2P device that assigned - /// the value of session_id, as provided by - /// the asp_session_request_cb() callback or - /// asp_session_create() if pin is requested. - /// @param[in] session_id The session ID - /// @param[out] session Peer-to-Peer service session descriptor handle - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SESSION_NOT_FOUND Session not found - /// @see asp_session_create() - int asp_session_get_handle( - ffi.Pointer session_mac, - int session_id, - ffi.Pointer session, - ) { - return _asp_session_get_handle( - session_mac, - session_id, - session, - ); - } - - late final _asp_session_get_handlePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.UnsignedInt, - ffi.Pointer)>>('asp_session_get_handle'); - late final _asp_session_get_handle = _asp_session_get_handlePtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer)>(); - - /// @brief Moves an Application Service Platform (ASP) session from Requested state to the Open state. - /// @since_tizen 4.0 - /// @param[in] session ASP session descriptor handle provided by - /// the asp_session_request_cb() callback - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SESSION_NOT_FOUND Session not found - /// @pre Peer-to-Peer service must be advertised by asp_advert_start_advertising().\n - /// Local device should be listening or finding remote P2P device by - /// asp_advert_start_advertising() - /// @see asp_advert_start_advertising() - int asp_session_set_state_ready( - asp_session_h session, - ) { - return _asp_session_set_state_ready( - session, - ); - } - - late final _asp_session_set_state_readyPtr = - _lookup>( - 'asp_session_set_state_ready'); - late final _asp_session_set_state_ready = - _asp_session_set_state_readyPtr.asFunction(); - - /// @brief Ends an Application Service Platform (ASP) session and releases associated resources. - /// @details The ASP may tear down the underlying ASP P2P group - /// if not other ASP sessions are using it. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] session ASP session descriptor handle provided by - /// the asp_session_request_cb() callback or - /// asp_session_create() - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_PERMISSION_DENIED Permission denied - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SESSION_NOT_FOUND Session not found - /// @see asp_session_create() - /// @see asp_session_request_cb() - int asp_session_close( - asp_session_h session, - ) { - return _asp_session_close( - session, - ); - } - - late final _asp_session_closePtr = - _lookup>( - 'asp_session_close'); - late final _asp_session_close = - _asp_session_closePtr.asFunction(); - - /// @brief Requests that incoming connections be allowed on a given port. - /// @since_tizen 4.0 - /// @param[in] session ASP session descriptor handle provided by - /// the asp_session_request_cb() callback or - /// asp_session_create() - /// @param[in] ip_address The IP address on which the port is being used - /// @param[in] port The port number - /// @param[in] proto The IANA protocol number - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SESSION_NOT_FOUND Session not found - /// @see asp_session_create() - /// @see asp_session_request_cb() - int asp_session_bind_port( - asp_session_h session, - ffi.Pointer ip_address, - int port, - int proto, - ) { - return _asp_session_bind_port( - session, - ip_address, - port, - proto, - ); - } - - late final _asp_session_bind_portPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_session_h, ffi.Pointer, ffi.Int, - ffi.Int)>>('asp_session_bind_port'); - late final _asp_session_bind_port = _asp_session_bind_portPtr.asFunction< - int Function(asp_session_h, ffi.Pointer, int, int)>(); - - /// @brief Indicates that the service is no longer utilizing the port in the ASP session. - /// @since_tizen 4.0 - /// @param[in] session ASP session descriptor handle provided by - /// the asp_session_request_cb() callback or - /// asp_session_create() - /// @param[in] ip_address The IP address on which the port is being used - /// @param[in] port The port number - /// @param[in] proto The IANA protocol number - /// @return 0 on success, otherwise a negative error value - /// @retval #ASP_ERROR_NONE Successful - /// @retval #ASP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #ASP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #ASP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #ASP_ERROR_NOT_SUPPORTED Not supported - /// @retval #ASP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #ASP_ERROR_OPERATION_FAILED Operation failed - /// @retval #ASP_ERROR_SESSION_NOT_FOUND Session not found - /// @see asp_session_create() - /// @see asp_session_request_cb() - int asp_session_release_port( - asp_session_h session, - ffi.Pointer ip_address, - int port, - int proto, - ) { - return _asp_session_release_port( - session, - ip_address, - port, - proto, - ); - } - - late final _asp_session_release_portPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(asp_session_h, ffi.Pointer, ffi.Int, - ffi.Int)>>('asp_session_release_port'); - late final _asp_session_release_port = - _asp_session_release_portPtr.asFunction< - int Function(asp_session_h, ffi.Pointer, int, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_MODULE - /// @brief Initializes the Bluetooth API. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @remarks This function must be called before Bluetooth API starts. \n - /// You must free all resources of the Bluetooth service by calling bt_deinitialize() if Bluetooth service is no longer needed. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_deinitialize() - int bt_initialize() { - return _bt_initialize(); - } - - late final _bt_initializePtr = - _lookup>('bt_initialize'); - late final _bt_initialize = _bt_initializePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_MODULE - /// @brief Releases all resources of the Bluetooth API. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @remarks This function must be called if Bluetooth API is no longer needed. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Bluetooth API must be initialized with bt_initialize(). - /// - /// @see bt_initialize() - int bt_deinitialize() { - return _bt_deinitialize(); - } - - late final _bt_deinitializePtr = - _lookup>('bt_deinitialize'); - late final _bt_deinitialize = - _bt_deinitializePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_MODULE - /// @brief Gets the specification name for the given UUID. - /// @since_tizen 3.0 - /// - /// @remarks The @a name must be released using free(). - /// - /// @param[in] uuid The UUID - /// @param[out] name The specification name defined at www.bluetooth.com - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_get_uuid() - int bt_get_uuid_name( - ffi.Pointer uuid, - ffi.Pointer> name, - ) { - return _bt_get_uuid_name( - uuid, - name, - ); - } - - late final _bt_get_uuid_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer>)>>('bt_get_uuid_name'); - late final _bt_get_uuid_name = _bt_get_uuid_namePtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Gets the current state of local Bluetooth adapter. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[out] adapter_state The current adapter state - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_initialize() - int bt_adapter_get_state( - ffi.Pointer adapter_state, - ) { - return _bt_adapter_get_state( - adapter_state, - ); - } - - late final _bt_adapter_get_statePtr = - _lookup)>>( - 'bt_adapter_get_state'); - late final _bt_adapter_get_state = _bt_adapter_get_statePtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Gets the address of local Bluetooth adapter. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @remarks The @a local_address must be released with free() by you. - /// - /// @param[out] local_address The device address of local Bluetooth adapter - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @see bt_adapter_get_name() - int bt_adapter_get_address( - ffi.Pointer> local_address, - ) { - return _bt_adapter_get_address( - local_address, - ); - } - - late final _bt_adapter_get_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>)>>('bt_adapter_get_address'); - late final _bt_adapter_get_address = _bt_adapter_get_addressPtr - .asFunction>)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Gets the name of local Bluetooth adapter. - /// - /// @details Use this function to get the friendly name associated with Bluetooth \n - /// device, retrieved by the remote Bluetooth devices. - /// - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @remarks The @a local_name must be released with free() by you. - /// - /// @param[out] local_name The local device name - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// - /// @see bt_adapter_set_name() - int bt_adapter_get_name( - ffi.Pointer> local_name, - ) { - return _bt_adapter_get_name( - local_name, - ); - } - - late final _bt_adapter_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>)>>('bt_adapter_get_name'); - late final _bt_adapter_get_name = _bt_adapter_get_namePtr - .asFunction>)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Sets the name of local Bluetooth adapter. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] local_name The name of the Bluetooth device. \n - /// The maximum length is 248 characters. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @post bt_adapter_name_changed_cb() will be invoked if this function returns #BT_ERROR_NONE. - /// - /// @see bt_adapter_get_name() - /// @see bt_adapter_name_changed_cb() - /// @see bt_adapter_set_name_changed_cb() - /// @see bt_adapter_unset_name_changed_cb() - int bt_adapter_set_name( - ffi.Pointer local_name, - ) { - return _bt_adapter_set_name( - local_name, - ); - } - - late final _bt_adapter_set_namePtr = - _lookup)>>( - 'bt_adapter_set_name'); - late final _bt_adapter_set_name = - _bt_adapter_set_namePtr.asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Gets the visibility mode of local Bluetooth adapter. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[out] mode The visibility mode of the Bluetooth device - /// @param[out] duration The duration until the visibility mode is changed to #BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE (in seconds). - /// @a duration is valid only if @a mode is #BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE. This value can be NULL. - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - int bt_adapter_get_visibility( - ffi.Pointer mode, - ffi.Pointer duration, - ) { - return _bt_adapter_get_visibility( - mode, - duration, - ); - } - - late final _bt_adapter_get_visibilityPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('bt_adapter_get_visibility'); - late final _bt_adapter_get_visibility = _bt_adapter_get_visibilityPtr - .asFunction, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Starts the device discovery, asynchronously. - /// - /// @details If a device is discovered, bt_adapter_device_discovery_state_changed_cb() will be invoked \n - /// with #BT_ADAPTER_DEVICE_DISCOVERY_FOUND, and then bt_adapter_device_discovery_state_changed_cb() \n - /// will be called with #BT_ADAPTER_DEVICE_DISCOVERY_FINISHED in case of the completion or cancellation of the discovery. - /// - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @remarks To connect to peer Bluetooth device, you need to know its Bluetooth address. \n - /// The device discovery can be stopped by bt_adapter_stop_device_discovery(). - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOW_IN_PROGRESS Operation is now in progress - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @post This function invokes bt_adapter_device_discovery_state_changed_cb(). - /// - /// @see bt_adapter_is_discovering() - /// @see bt_adapter_stop_device_discovery() - /// @see bt_adapter_device_discovery_state_changed_cb() - /// @see bt_adapter_set_device_discovery_state_changed_cb() - /// @see bt_adapter_unset_device_discovery_state_changed_cb() - int bt_adapter_start_device_discovery() { - return _bt_adapter_start_device_discovery(); - } - - late final _bt_adapter_start_device_discoveryPtr = - _lookup>( - 'bt_adapter_start_device_discovery'); - late final _bt_adapter_start_device_discovery = - _bt_adapter_start_device_discoveryPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Stops the device discovery, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @remarks The device discovery process will take 10 ~ 20 seconds to get all the devices in vicinity. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOT_IN_PROGRESS Operation is not in progress - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The device discovery must be in progress with bt_adapter_start_device_discovery(). - /// @post This function invokes bt_adapter_device_discovery_state_changed_cb(). - /// - /// @see bt_adapter_is_discovering() - /// @see bt_adapter_start_device_discovery() - /// @see bt_adapter_set_device_discovery_state_changed_cb() - /// @see bt_adapter_unset_device_discovery_state_changed_cb() - /// @see bt_adapter_device_discovery_state_changed_cb() - int bt_adapter_stop_device_discovery() { - return _bt_adapter_stop_device_discovery(); - } - - late final _bt_adapter_stop_device_discoveryPtr = - _lookup>( - 'bt_adapter_stop_device_discovery'); - late final _bt_adapter_stop_device_discovery = - _bt_adapter_stop_device_discoveryPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Checks for the device discovery is in progress or not. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @remarks If Bluetooth discovery is in progress, other operations are not allowed and \n - /// you have to either stop the discovery operation, or wait for it to be finished, \n - /// before performing other operations. - /// - /// @param[out] is_discovering The discovering status: (@c true = in progress , @c false = not in progress ) - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// - /// @see bt_adapter_start_device_discovery() - /// @see bt_adapter_stop_device_discovery() - int bt_adapter_is_discovering( - ffi.Pointer is_discovering, - ) { - return _bt_adapter_is_discovering( - is_discovering, - ); - } - - late final _bt_adapter_is_discoveringPtr = - _lookup)>>( - 'bt_adapter_is_discovering'); - late final _bt_adapter_is_discovering = _bt_adapter_is_discoveringPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Gets the service mask from the UUID list. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[in] uuids The UUID list of the device. - /// @param[in] no_of_service The number of the UUID list count. - /// @param[out] service_mask_list Service mask list converted from the given UUID list. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_service_class_t - int bt_device_get_service_mask_from_uuid_list( - ffi.Pointer> uuids, - int no_of_service, - ffi.Pointer service_mask_list, - ) { - return _bt_device_get_service_mask_from_uuid_list( - uuids, - no_of_service, - service_mask_list, - ); - } - - late final _bt_device_get_service_mask_from_uuid_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, ffi.Int, - ffi.Pointer)>>( - 'bt_device_get_service_mask_from_uuid_list'); - late final _bt_device_get_service_mask_from_uuid_list = - _bt_device_get_service_mask_from_uuid_listPtr.asFunction< - int Function(ffi.Pointer>, int, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Retrieves the device information of all bonded devices. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data passed from the foreach function - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @post This function invokes bt_adapter_bonded_device_cb(). - /// - /// @see bt_adapter_bonded_device_cb() - int bt_adapter_foreach_bonded_device( - bt_adapter_bonded_device_cb callback, - ffi.Pointer user_data, - ) { - return _bt_adapter_foreach_bonded_device( - callback, - user_data, - ); - } - - late final _bt_adapter_foreach_bonded_devicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_adapter_bonded_device_cb, - ffi.Pointer)>>('bt_adapter_foreach_bonded_device'); - late final _bt_adapter_foreach_bonded_device = - _bt_adapter_foreach_bonded_devicePtr.asFunction< - int Function(bt_adapter_bonded_device_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Gets the device information of a bonded device. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks The @a device_info must be released with bt_adapter_free_device_info() by you . - /// - /// @param[in] remote_address The address of remote device - /// @param[out] device_info The bonded device information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_BONDED Remote device not bonded - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @post This function invokes bt_adapter_bonded_device_cb(). - /// - /// @see bt_adapter_bonded_device_cb() - int bt_adapter_get_bonded_device_info( - ffi.Pointer remote_address, - ffi.Pointer> device_info, - ) { - return _bt_adapter_get_bonded_device_info( - remote_address, - device_info, - ); - } - - late final _bt_adapter_get_bonded_device_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer>)>>( - 'bt_adapter_get_bonded_device_info'); - late final _bt_adapter_get_bonded_device_info = - _bt_adapter_get_bonded_device_infoPtr.asFunction< - int Function(ffi.Pointer, - ffi.Pointer>)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Frees device info. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[in] device_info The bonded device information - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_adapter_get_bonded_device_info() - int bt_adapter_free_device_info( - ffi.Pointer device_info, - ) { - return _bt_adapter_free_device_info( - device_info, - ); - } - - late final _bt_adapter_free_device_infoPtr = _lookup< - ffi.NativeFunction)>>( - 'bt_adapter_free_device_info'); - late final _bt_adapter_free_device_info = _bt_adapter_free_device_infoPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Checks whether the UUID of service is used or not. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] service_uuid The UUID of service - /// @param[out] used Indicates whether the service is used or not - /// @return true on success, otherwise false. - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_adapter_is_service_used( - ffi.Pointer service_uuid, - ffi.Pointer used, - ) { - return _bt_adapter_is_service_used( - service_uuid, - used, - ); - } - - late final _bt_adapter_is_service_usedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('bt_adapter_is_service_used'); - late final _bt_adapter_is_service_used = _bt_adapter_is_service_usedPtr - .asFunction, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Registers a callback function to be invoked when the Bluetooth adapter state changes. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_adapter_state_changed_cb() will be invoked. - /// - /// @see bt_initialize() - /// @see bt_adapter_state_changed_cb() - /// @see bt_adapter_set_state_changed_cb() - /// @see bt_adapter_unset_state_changed_cb() - int bt_adapter_set_state_changed_cb( - bt_adapter_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_adapter_set_state_changed_cb( - callback, - user_data, - ); - } - - late final _bt_adapter_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_adapter_state_changed_cb, - ffi.Pointer)>>('bt_adapter_set_state_changed_cb'); - late final _bt_adapter_set_state_changed_cb = - _bt_adapter_set_state_changed_cbPtr.asFunction< - int Function(bt_adapter_state_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_initialize() - /// @see bt_adapter_set_state_changed_cb() - int bt_adapter_unset_state_changed_cb() { - return _bt_adapter_unset_state_changed_cb(); - } - - late final _bt_adapter_unset_state_changed_cbPtr = - _lookup>( - 'bt_adapter_unset_state_changed_cb'); - late final _bt_adapter_unset_state_changed_cb = - _bt_adapter_unset_state_changed_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Registers a callback function to be invoked when the name of Bluetooth adapter changes. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_adapter_name_changed_cb() will be invoked. - /// - /// @see bt_initialize() - /// @see bt_adapter_name_changed_cb() - /// @see bt_adapter_unset_name_changed_cb() - int bt_adapter_set_name_changed_cb( - bt_adapter_name_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_adapter_set_name_changed_cb( - callback, - user_data, - ); - } - - late final _bt_adapter_set_name_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_adapter_name_changed_cb, - ffi.Pointer)>>('bt_adapter_set_name_changed_cb'); - late final _bt_adapter_set_name_changed_cb = - _bt_adapter_set_name_changed_cbPtr.asFunction< - int Function(bt_adapter_name_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_initialize() - /// @see bt_adapter_set_name_changed_cb() - int bt_adapter_unset_name_changed_cb() { - return _bt_adapter_unset_name_changed_cb(); - } - - late final _bt_adapter_unset_name_changed_cbPtr = - _lookup>( - 'bt_adapter_unset_name_changed_cb'); - late final _bt_adapter_unset_name_changed_cb = - _bt_adapter_unset_name_changed_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Registers a callback function to be invoked when the visibility mode changes. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_adapter_visibility_mode_changed_cb() will be invoked. - /// - /// @see bt_initialize() - /// @see bt_adapter_visibility_mode_changed_cb() - /// @see bt_adapter_unset_visibility_mode_changed_cb() - int bt_adapter_set_visibility_mode_changed_cb( - bt_adapter_visibility_mode_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_adapter_set_visibility_mode_changed_cb( - callback, - user_data, - ); - } - - late final _bt_adapter_set_visibility_mode_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_adapter_visibility_mode_changed_cb, - ffi.Pointer)>>( - 'bt_adapter_set_visibility_mode_changed_cb'); - late final _bt_adapter_set_visibility_mode_changed_cb = - _bt_adapter_set_visibility_mode_changed_cbPtr.asFunction< - int Function( - bt_adapter_visibility_mode_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_initialize() - /// @see bt_adapter_set_visibility_mode_changed_cb() - int bt_adapter_unset_visibility_mode_changed_cb() { - return _bt_adapter_unset_visibility_mode_changed_cb(); - } - - late final _bt_adapter_unset_visibility_mode_changed_cbPtr = - _lookup>( - 'bt_adapter_unset_visibility_mode_changed_cb'); - late final _bt_adapter_unset_visibility_mode_changed_cb = - _bt_adapter_unset_visibility_mode_changed_cbPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Registers a callback function to be invoked every second. - /// - /// @details When you set visibility mode as #BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE, \n - /// @a callback will be called every second until visibility mode is changed to #BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE. - /// - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// until the visibility mode is changed from #BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE - /// to #BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE. - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized by bt_initialize(). - /// @post bt_adapter_visibility_duration_changed_cb() will be invoked. - /// @see bt_initialize() - /// @see bt_adapter_visibility_duration_changed_cb() - /// @see bt_adapter_unset_visibility_duration_changed_cb() - int bt_adapter_set_visibility_duration_changed_cb( - bt_adapter_visibility_duration_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_adapter_set_visibility_duration_changed_cb( - callback, - user_data, - ); - } - - late final _bt_adapter_set_visibility_duration_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_adapter_visibility_duration_changed_cb, - ffi.Pointer)>>( - 'bt_adapter_set_visibility_duration_changed_cb'); - late final _bt_adapter_set_visibility_duration_changed_cb = - _bt_adapter_set_visibility_duration_changed_cbPtr.asFunction< - int Function(bt_adapter_visibility_duration_changed_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_adapter_set_visibility_duration_changed_cb() - int bt_adapter_unset_visibility_duration_changed_cb() { - return _bt_adapter_unset_visibility_duration_changed_cb(); - } - - late final _bt_adapter_unset_visibility_duration_changed_cbPtr = - _lookup>( - 'bt_adapter_unset_visibility_duration_changed_cb'); - late final _bt_adapter_unset_visibility_duration_changed_cb = - _bt_adapter_unset_visibility_duration_changed_cbPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Registers a callback function to be invoked when the device discovery state changes. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_adapter_device_discovery_state_changed_cb() will be invoked. - /// - /// @see bt_initialize() - /// @see bt_adapter_device_discovery_state_changed_cb() - /// @see bt_adapter_set_device_discovery_state_changed_cb() - /// @see bt_adapter_unset_device_discovery_state_changed_cb() - int bt_adapter_set_device_discovery_state_changed_cb( - bt_adapter_device_discovery_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_adapter_set_device_discovery_state_changed_cb( - callback, - user_data, - ); - } - - late final _bt_adapter_set_device_discovery_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_adapter_device_discovery_state_changed_cb, - ffi.Pointer)>>( - 'bt_adapter_set_device_discovery_state_changed_cb'); - late final _bt_adapter_set_device_discovery_state_changed_cb = - _bt_adapter_set_device_discovery_state_changed_cbPtr.asFunction< - int Function(bt_adapter_device_discovery_state_changed_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_initialize() - /// @see bt_adapter_set_device_discovery_state_changed_cb() - int bt_adapter_unset_device_discovery_state_changed_cb() { - return _bt_adapter_unset_device_discovery_state_changed_cb(); - } - - late final _bt_adapter_unset_device_discovery_state_changed_cbPtr = - _lookup>( - 'bt_adapter_unset_device_discovery_state_changed_cb'); - late final _bt_adapter_unset_device_discovery_state_changed_cb = - _bt_adapter_unset_device_discovery_state_changed_cbPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OOB_MODULE - /// @brief Gets the Hash and Randmoizer value, synchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[out] hash The hash value received from the controller - /// @param[out] randomizer The hash value received from the controller - /// @param[out] hash_len The length of the hash value - /// @param[out] randomizer_len The length of the randomizer value - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - int bt_adapter_get_local_oob_data( - ffi.Pointer> hash, - ffi.Pointer> randomizer, - ffi.Pointer hash_len, - ffi.Pointer randomizer_len, - ) { - return _bt_adapter_get_local_oob_data( - hash, - randomizer, - hash_len, - randomizer_len, - ); - } - - late final _bt_adapter_get_local_oob_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>>('bt_adapter_get_local_oob_data'); - late final _bt_adapter_get_local_oob_data = - _bt_adapter_get_local_oob_dataPtr.asFunction< - int Function( - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OOB_MODULE - /// @brief Sets the Hash and Randmoizer value, synchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] remote_address Remote device address - /// @param[in] hash The hash value received from the controller - /// @param[in] randomizer The hash value received from the controller - /// @param[in] hash_len The length of the hash value. Allowed value is 16 - /// @param[in] randomizer_len The length of the randomizer value. Allowed value is 16 - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - int bt_adapter_set_remote_oob_data( - ffi.Pointer remote_address, - ffi.Pointer hash, - ffi.Pointer randomizer, - int hash_len, - int randomizer_len, - ) { - return _bt_adapter_set_remote_oob_data( - remote_address, - hash, - randomizer, - hash_len, - randomizer_len, - ); - } - - late final _bt_adapter_set_remote_oob_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Int)>>('bt_adapter_set_remote_oob_data'); - late final _bt_adapter_set_remote_oob_data = - _bt_adapter_set_remote_oob_dataPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OOB_MODULE - /// @brief Gets the Hash and Randmoizer value, synchronously. - /// @since_tizen 3.0 - /// - /// @remarks The @a hash192, randomizer192, hash256 and randomizer256 must be released using free(). - /// - /// @param[out] hash192 The hash value derived from the P-192 public key - /// @param[out] randomizer192 The randomizer value associated with the P-192 public key - /// @param[out] hash192_len The length of @a hash192 - /// @param[out] randomizer192_len The length of @a randomizer192 - /// @param[out] hash256 The hash value derived from the P-256 public key - /// @param[out] randomizer256 The randomizer value associated with the P-256 public key - /// @param[out] hash256_len The length of @a hash256 - /// @param[out] randomizer256_len The length of @a randomizer256 - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - int bt_adapter_get_local_oob_ext_data( - ffi.Pointer> hash192, - ffi.Pointer> randomizer192, - ffi.Pointer hash192_len, - ffi.Pointer randomizer192_len, - ffi.Pointer> hash256, - ffi.Pointer> randomizer256, - ffi.Pointer hash256_len, - ffi.Pointer randomizer256_len, - ) { - return _bt_adapter_get_local_oob_ext_data( - hash192, - randomizer192, - hash192_len, - randomizer192_len, - hash256, - randomizer256, - hash256_len, - randomizer256_len, - ); - } - - late final _bt_adapter_get_local_oob_ext_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>>('bt_adapter_get_local_oob_ext_data'); - late final _bt_adapter_get_local_oob_ext_data = - _bt_adapter_get_local_oob_ext_dataPtr.asFunction< - int Function( - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OOB_MODULE - /// @brief Sets the Hash and Randmoizer value, synchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] remote_address Remote device address - /// @param[in] hash192 The P-192 hash value received via OOB from remote device - /// @param[in] randomizer192 The P-192 randomizer value received via OOB from remote device - /// @param[in] hash192_len The length of @a hash192 - /// @param[in] randomizer192_len The length of @a randomizer192 - /// @param[in] hash256 The P-256 hash value received via OOB from remote device - /// @param[in] randomizer256 The P-256 randomizer value received via OOB from remote device - /// @param[in] hash256_len The length of @a hash256 - /// @param[in] randomizer256_len The length of @a randomizer256 - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - int bt_adapter_set_remote_oob_ext_data( - ffi.Pointer remote_address, - ffi.Pointer hash192, - ffi.Pointer randomizer192, - int hash192_len, - int randomizer192_len, - ffi.Pointer hash256, - ffi.Pointer randomizer256, - int hash256_len, - int randomizer256_len, - ) { - return _bt_adapter_set_remote_oob_ext_data( - remote_address, - hash192, - randomizer192, - hash192_len, - randomizer192_len, - hash256, - randomizer256, - hash256_len, - randomizer256_len, - ); - } - - late final _bt_adapter_set_remote_oob_ext_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Int)>>('bt_adapter_set_remote_oob_ext_data'); - late final _bt_adapter_set_remote_oob_ext_data = - _bt_adapter_set_remote_oob_ext_dataPtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer, - ffi.Pointer, - int, - int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OOB_MODULE - /// @brief Deletes the Hash and Randomizer value, synchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] remote_address Remote device address - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - int bt_adapter_remove_remote_oob_data( - ffi.Pointer remote_address, - ) { - return _bt_adapter_remove_remote_oob_data( - remote_address, - ); - } - - late final _bt_adapter_remove_remote_oob_dataPtr = - _lookup)>>( - 'bt_adapter_remove_remote_oob_data'); - late final _bt_adapter_remove_remote_oob_data = - _bt_adapter_remove_remote_oob_dataPtr - .asFunction)>(); - - /// @MOBILE_ONLY - /// @deprecated Deprecated since 2.3.1 - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Checks for the LE device discovery is in progress or not. - /// @since_tizen 2.3 - /// - /// @remarks If Bluetooth LE scan is in progress, other operations are not allowed and \n - /// you have to either stop the LE scan operation, or wait for it to be finished, \n - /// before performing other operations. - /// - /// @param[out] is_discovering The discovering status: (@c true = in progress , @c false = not in progress ) - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - int bt_adapter_le_is_discovering( - ffi.Pointer is_discovering, - ) { - return _bt_adapter_le_is_discovering( - is_discovering, - ); - } - - late final _bt_adapter_le_is_discoveringPtr = - _lookup)>>( - 'bt_adapter_le_is_discovering'); - late final _bt_adapter_le_is_discovering = _bt_adapter_le_is_discoveringPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Starts the LE scan to find LE advertisement. - /// - /// @details If a LE advertisement is found, bt_adapter_le_scan_result_cb() will be invoked. - /// - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] cb The callback to report the result of this function - /// @param[in] user_data The user data to be passed when callback is called - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOW_IN_PROGRESS Operation is now in progress - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @post This function invokes bt_adapter_le_scan_result_cb(). - /// - /// @see bt_adapter_le_scan_result_cb() - int bt_adapter_le_start_scan( - bt_adapter_le_scan_result_cb cb, - ffi.Pointer user_data, - ) { - return _bt_adapter_le_start_scan( - cb, - user_data, - ); - } - - late final _bt_adapter_le_start_scanPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_adapter_le_scan_result_cb, - ffi.Pointer)>>('bt_adapter_le_start_scan'); - late final _bt_adapter_le_start_scan = - _bt_adapter_le_start_scanPtr.asFunction< - int Function(bt_adapter_le_scan_result_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Stops the LE scan. - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOT_IN_PROGRESS Operation is not in progress - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The LE scan must be in progress with bt_adapter_le_start_scan(). - /// - /// @see bt_adapter_le_start_scan() - int bt_adapter_le_stop_scan() { - return _bt_adapter_le_stop_scan(); - } - - late final _bt_adapter_le_stop_scanPtr = - _lookup>( - 'bt_adapter_le_stop_scan'); - late final _bt_adapter_le_stop_scan = - _bt_adapter_le_stop_scanPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Gets the service UUID list from the scan result information. - /// @since_tizen 2.3.1 - /// - /// @remarks The @a uuids must be iterated as count and each pointed data must be released with free(). - /// Then @a uuids must be released with free(). \n - /// 16-bit service UUID or 128-bit service UUID is supported. (e.g. 180F, 0000180F-0000-1000-8000-00805F9B34FB) - /// - /// @param[in] info The scan result information - /// @param[in] pkt_type The packet type - /// @param[out] uuids The list of string of the service UUID - /// @param[out] count The count of the service UUIDs - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NO_DATA No data available - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_scan_result_cb() - int bt_adapter_le_get_scan_result_service_uuids( - ffi.Pointer info, - int pkt_type, - ffi.Pointer>> uuids, - ffi.Pointer count, - ) { - return _bt_adapter_le_get_scan_result_service_uuids( - info, - pkt_type, - uuids, - count, - ); - } - - late final _bt_adapter_le_get_scan_result_service_uuidsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Pointer>>, - ffi.Pointer)>>( - 'bt_adapter_le_get_scan_result_service_uuids'); - late final _bt_adapter_le_get_scan_result_service_uuids = - _bt_adapter_le_get_scan_result_service_uuidsPtr.asFunction< - int Function( - ffi.Pointer, - int, - ffi.Pointer>>, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Gets the device name from the scan result information. - /// @since_tizen 2.3.1 - /// - /// @remarks The @a name must be released with free() by you. - /// - /// @param[in] info The scan result information - /// @param[in] pkt_type The packet type - /// @param[out] name The device name - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NO_DATA No data available - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_scan_result_cb() - int bt_adapter_le_get_scan_result_device_name( - ffi.Pointer info, - int pkt_type, - ffi.Pointer> name, - ) { - return _bt_adapter_le_get_scan_result_device_name( - info, - pkt_type, - name, - ); - } - - late final _bt_adapter_le_get_scan_result_device_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>( - 'bt_adapter_le_get_scan_result_device_name'); - late final _bt_adapter_le_get_scan_result_device_name = - _bt_adapter_le_get_scan_result_device_namePtr.asFunction< - int Function(ffi.Pointer, - int, ffi.Pointer>)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Gets the transmission power level from the scan result information. - /// @since_tizen 2.3.1 - /// - /// @param[in] info The scan result information - /// @param[in] pkt_type The packet type - /// @param[out] power_level The transmission power level in dBm - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NO_DATA No data available - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_scan_result_cb() - int bt_adapter_le_get_scan_result_tx_power_level( - ffi.Pointer info, - int pkt_type, - ffi.Pointer power_level, - ) { - return _bt_adapter_le_get_scan_result_tx_power_level( - info, - pkt_type, - power_level, - ); - } - - late final _bt_adapter_le_get_scan_result_tx_power_levelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>( - 'bt_adapter_le_get_scan_result_tx_power_level'); - late final _bt_adapter_le_get_scan_result_tx_power_level = - _bt_adapter_le_get_scan_result_tx_power_levelPtr.asFunction< - int Function(ffi.Pointer, - int, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Gets the service solicitation UUID list from the scan result information. - /// @since_tizen 2.3.1 - /// - /// @remarks The @a uuids must be iterated as count and each pointed data must be released with free(). - /// Then @a uuids must be released with free(). \n - /// 16-bit service solicitation UUID or 128-bit service solicitation UUID is supported. - /// (e.g. 180F, 0000180F-0000-1000-8000-00805F9B34FB) - /// - /// @param[in] info The scan result information - /// @param[in] pkt_type The packet type - /// @param[out] uuids The list of string of the service solicitation UUID - /// @param[out] count The count of the service UUIDs - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NO_DATA No data available - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_scan_result_cb() - int bt_adapter_le_get_scan_result_service_solicitation_uuids( - ffi.Pointer info, - int pkt_type, - ffi.Pointer>> uuids, - ffi.Pointer count, - ) { - return _bt_adapter_le_get_scan_result_service_solicitation_uuids( - info, - pkt_type, - uuids, - count, - ); - } - - late final _bt_adapter_le_get_scan_result_service_solicitation_uuidsPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Pointer>>, - ffi.Pointer)>>( - 'bt_adapter_le_get_scan_result_service_solicitation_uuids'); - late final _bt_adapter_le_get_scan_result_service_solicitation_uuids = - _bt_adapter_le_get_scan_result_service_solicitation_uuidsPtr.asFunction< - int Function( - ffi.Pointer, - int, - ffi.Pointer>>, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Gets the service data list from the scan result information. - /// @since_tizen 2.3.1 - /// - /// @remarks The @a data_list must be released with bt_adapter_le_free_service_data_list() by you . - /// - /// @param[in] info The scan result information - /// @param[in] pkt_type The packet type - /// @param[out] data_list The list of the service data - /// @param[out] count The count of the service data list - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NO_DATA No data available - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_scan_result_cb() - int bt_adapter_le_get_scan_result_service_data_list( - ffi.Pointer info, - int pkt_type, - ffi.Pointer> data_list, - ffi.Pointer count, - ) { - return _bt_adapter_le_get_scan_result_service_data_list( - info, - pkt_type, - data_list, - count, - ); - } - - late final _bt_adapter_le_get_scan_result_service_data_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Pointer>, - ffi.Pointer)>>( - 'bt_adapter_le_get_scan_result_service_data_list'); - late final _bt_adapter_le_get_scan_result_service_data_list = - _bt_adapter_le_get_scan_result_service_data_listPtr.asFunction< - int Function( - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Frees service data list. - /// @since_tizen 2.3.1 - /// - /// @param[in] data_list The list of the service data - /// @param[in] count The count of the service data list - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_adapter_le_get_scan_result_service_data_list() - int bt_adapter_le_free_service_data_list( - ffi.Pointer data_list, - int count, - ) { - return _bt_adapter_le_free_service_data_list( - data_list, - count, - ); - } - - late final _bt_adapter_le_free_service_data_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Int)>>('bt_adapter_le_free_service_data_list'); - late final _bt_adapter_le_free_service_data_list = - _bt_adapter_le_free_service_data_listPtr.asFunction< - int Function(ffi.Pointer, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Gets the appearance from the scan result information. - /// @since_tizen 2.3.1 - /// - /// @param[in] info The scan result information - /// @param[in] pkt_type The packet type - /// @param[out] appearance The appearance - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NO_DATA No data available - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_scan_result_cb() - int bt_adapter_le_get_scan_result_appearance( - ffi.Pointer info, - int pkt_type, - ffi.Pointer appearance, - ) { - return _bt_adapter_le_get_scan_result_appearance( - info, - pkt_type, - appearance, - ); - } - - late final _bt_adapter_le_get_scan_result_appearancePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>( - 'bt_adapter_le_get_scan_result_appearance'); - late final _bt_adapter_le_get_scan_result_appearance = - _bt_adapter_le_get_scan_result_appearancePtr.asFunction< - int Function(ffi.Pointer, - int, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Gets the manufacturer data from the scan result information. - /// @since_tizen 2.3.1 - /// - /// @remarks The @a manufacturer_data must be released with free() by you. - /// - /// @param[in] info The scan result information - /// @param[in] pkt_type The packet type - /// @param[out] manufacturer_id The manufacturer ID - /// @param[out] manufacturer_data The manufacturer data (byte array) - /// @param[out] manufacturer_data_len The length of manufacturer data - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NO_DATA No data available - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_scan_result_cb() - int bt_adapter_le_get_scan_result_manufacturer_data( - ffi.Pointer info, - int pkt_type, - ffi.Pointer manufacturer_id, - ffi.Pointer> manufacturer_data, - ffi.Pointer manufacturer_data_len, - ) { - return _bt_adapter_le_get_scan_result_manufacturer_data( - info, - pkt_type, - manufacturer_id, - manufacturer_data, - manufacturer_data_len, - ); - } - - late final _bt_adapter_le_get_scan_result_manufacturer_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>( - 'bt_adapter_le_get_scan_result_manufacturer_data'); - late final _bt_adapter_le_get_scan_result_manufacturer_data = - _bt_adapter_le_get_scan_result_manufacturer_dataPtr.asFunction< - int Function( - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Gets iBeacon format's data from the scan result information. - /// @since_tizen 4.0 - /// - /// @remarks The @a ibeacon_info must be released with bt_adapter_le_free_ibeacon_report(). - /// - /// @param[in] info The scan result information - /// @param[in] pkt_type The packet type - /// @param[out] ibeacon_info The iBeacon format's scan result data - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NO_DATA No data available - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_scan_result_cb() - int bt_adapter_le_get_scan_result_ibeacon_report( - ffi.Pointer info, - int pkt_type, - ffi.Pointer> - ibeacon_info, - ) { - return _bt_adapter_le_get_scan_result_ibeacon_report( - info, - pkt_type, - ibeacon_info, - ); - } - - late final _bt_adapter_le_get_scan_result_ibeacon_reportPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Pointer< - ffi.Pointer>)>>( - 'bt_adapter_le_get_scan_result_ibeacon_report'); - late final _bt_adapter_le_get_scan_result_ibeacon_report = - _bt_adapter_le_get_scan_result_ibeacon_reportPtr.asFunction< - int Function( - ffi.Pointer, - int, - ffi.Pointer< - ffi.Pointer>)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Frees iBeacon information. - /// @since_tizen 4.0 - /// - /// @param[in] ibeacon_info The iBeacon format's scan result data - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_adapter_le_get_scan_result_service_data_list() - int bt_adapter_le_free_ibeacon_report( - ffi.Pointer ibeacon_info, - ) { - return _bt_adapter_le_free_ibeacon_report( - ibeacon_info, - ); - } - - late final _bt_adapter_le_free_ibeacon_reportPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer)>>( - 'bt_adapter_le_free_ibeacon_report'); - late final _bt_adapter_le_free_ibeacon_report = - _bt_adapter_le_free_ibeacon_reportPtr.asFunction< - int Function( - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Creates advertiser to advertise device's existence or respond to LE scanning request. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[out] advertiser The handle of advertiser - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_destroy_advertiser() - int bt_adapter_le_create_advertiser( - ffi.Pointer advertiser, - ) { - return _bt_adapter_le_create_advertiser( - advertiser, - ); - } - - late final _bt_adapter_le_create_advertiserPtr = _lookup< - ffi.NativeFunction)>>( - 'bt_adapter_le_create_advertiser'); - late final _bt_adapter_le_create_advertiser = - _bt_adapter_le_create_advertiserPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Destroys advertiser. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[out] advertiser The handle of advertiser - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_create_advertiser() - int bt_adapter_le_destroy_advertiser( - bt_advertiser_h advertiser, - ) { - return _bt_adapter_le_destroy_advertiser( - advertiser, - ); - } - - late final _bt_adapter_le_destroy_advertiserPtr = - _lookup>( - 'bt_adapter_le_destroy_advertiser'); - late final _bt_adapter_le_destroy_advertiser = - _bt_adapter_le_destroy_advertiserPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_IPSP_MODULE - /// @brief Initializes the Bluetooth IPSP (Internet Protocol Support Profile) service. - /// @since_tizen 4.0 - /// @param[in] callback The callback called when the initialization is finished - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - int bt_ipsp_initialize( - bt_ipsp_init_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_ipsp_initialize( - callback, - user_data, - ); - } - - late final _bt_ipsp_initializePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_ipsp_init_state_changed_cb, - ffi.Pointer)>>('bt_ipsp_initialize'); - late final _bt_ipsp_initialize = _bt_ipsp_initializePtr.asFunction< - int Function(bt_ipsp_init_state_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_IPSP_MODULE - /// @brief Deinitializes the Bluetooth IPSP (Internet Protocol Support Profile) service. - /// @since_tizen 4.0 - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - int bt_ipsp_deinitialize() { - return _bt_ipsp_deinitialize(); - } - - late final _bt_ipsp_deinitializePtr = - _lookup>('bt_ipsp_deinitialize'); - late final _bt_ipsp_deinitialize = - _bt_ipsp_deinitializePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_IPSP_MODULE - /// @brief Connects to a remote device's IPSP service over LE, asynchronously. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] remote_address The remote address - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @post bt_ipsp_set_connection_state_changed_cb() will be invoked. - /// @see bt_ipsp_set_connection_state_changed_cb() - int bt_ipsp_connect( - ffi.Pointer remote_address, - ) { - return _bt_ipsp_connect( - remote_address, - ); - } - - late final _bt_ipsp_connectPtr = - _lookup)>>( - 'bt_ipsp_connect'); - late final _bt_ipsp_connect = - _bt_ipsp_connectPtr.asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_IPSP_MODULE - /// @brief Disconnects from a remote device's IPSP service, asynchronously. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] remote_address The remote address - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected by bt_ipsp_connect(). - /// @post bt_ipsp_set_connection_state_changed_cb() will be invoked. - /// @see bt_ipsp_connect() - /// @see bt_ipsp_set_connection_state_changed_cb() - int bt_ipsp_disconnect( - ffi.Pointer remote_address, - ) { - return _bt_ipsp_disconnect( - remote_address, - ); - } - - late final _bt_ipsp_disconnectPtr = - _lookup)>>( - 'bt_ipsp_disconnect'); - late final _bt_ipsp_disconnect = - _bt_ipsp_disconnectPtr.asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_IPSP_MODULE - /// @brief Registers a callback function that will be invoked when the connection state changes. - /// @since_tizen 4.0 - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - int bt_ipsp_set_connection_state_changed_cb( - bt_ipsp_connection_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_ipsp_set_connection_state_changed_cb( - callback, - user_data, - ); - } - - late final _bt_ipsp_set_connection_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_ipsp_connection_state_changed_cb, ffi.Pointer)>>( - 'bt_ipsp_set_connection_state_changed_cb'); - late final _bt_ipsp_set_connection_state_changed_cb = - _bt_ipsp_set_connection_state_changed_cbPtr.asFunction< - int Function( - bt_ipsp_connection_state_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_IPSP_MODULE - /// @brief Unregisters the callback function called when the connection state changes. - /// @since_tizen 4.0 - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - int bt_ipsp_unset_connection_state_changed_cb() { - return _bt_ipsp_unset_connection_state_changed_cb(); - } - - late final _bt_ipsp_unset_connection_state_changed_cbPtr = - _lookup>( - 'bt_ipsp_unset_connection_state_changed_cb'); - late final _bt_ipsp_unset_connection_state_changed_cb = - _bt_ipsp_unset_connection_state_changed_cbPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Adds a service UUID to advertise or scan response data. - /// The maximum advertised or responded data size is 31 bytes - /// including data type and system wide data. - /// @since_tizen 2.3.1 - /// - /// @remarks 16-bit UUID or 128-bit UUID is supported. (e.g. 180F, 0000180F-0000-1000-8000-00805F9B34FB). - /// - /// @param[in] advertiser The handle of advertiser - /// @param[in] pkt_type The packet type - /// @param[in] uuid The string of the service UUID. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_QUOTA_EXCEEDED Quota exceeded - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_clear_advertising_data() - int bt_adapter_le_add_advertising_service_uuid( - bt_advertiser_h advertiser, - int pkt_type, - ffi.Pointer uuid, - ) { - return _bt_adapter_le_add_advertising_service_uuid( - advertiser, - pkt_type, - uuid, - ); - } - - late final _bt_adapter_le_add_advertising_service_uuidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_advertiser_h, ffi.Int32, ffi.Pointer)>>( - 'bt_adapter_le_add_advertising_service_uuid'); - late final _bt_adapter_le_add_advertising_service_uuid = - _bt_adapter_le_add_advertising_service_uuidPtr.asFunction< - int Function(bt_advertiser_h, int, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Adds a service solicitation UUID to advertise or scan response data. - /// The maximum advertised or responded data size is 31 bytes - /// including data type and system wide data. - /// @since_tizen 2.3.1 - /// - /// @remarks 16-bit service solicitation UUID or 128-bit service solicitation UUID is supported. - /// (e.g. 180F, 0000180F-0000-1000-8000-00805F9B34FB) - /// - /// @param[in] advertiser The handle of advertiser - /// @param[in] pkt_type The packet type - /// @param[in] uuid The string of the service solicitation UUID. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_QUOTA_EXCEEDED Quota exceeded - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_clear_advertising_data() - int bt_adapter_le_add_advertising_service_solicitation_uuid( - bt_advertiser_h advertiser, - int pkt_type, - ffi.Pointer uuid, - ) { - return _bt_adapter_le_add_advertising_service_solicitation_uuid( - advertiser, - pkt_type, - uuid, - ); - } - - late final _bt_adapter_le_add_advertising_service_solicitation_uuidPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_advertiser_h, ffi.Int32, ffi.Pointer)>>( - 'bt_adapter_le_add_advertising_service_solicitation_uuid'); - late final _bt_adapter_le_add_advertising_service_solicitation_uuid = - _bt_adapter_le_add_advertising_service_solicitation_uuidPtr.asFunction< - int Function(bt_advertiser_h, int, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Adds service data to advertise or scan response data. - /// The maximum advertised or responded data size is 31 bytes - /// including data type and system wide data. - /// @since_tizen 2.3.1 - /// - /// @remarks 16-bit UUID is supported. (e.g. 180F). - /// - /// @param[in] advertiser The handle of advertiser - /// @param[in] pkt_type The packet type - /// @param[in] uuid 16-bit UUID of the service - /// @param[in] service_data The service data - /// @param[in] service_data_len The data length of service data - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_QUOTA_EXCEEDED Quota exceeded - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_clear_advertising_data() - int bt_adapter_le_add_advertising_service_data( - bt_advertiser_h advertiser, - int pkt_type, - ffi.Pointer uuid, - ffi.Pointer service_data, - int service_data_len, - ) { - return _bt_adapter_le_add_advertising_service_data( - advertiser, - pkt_type, - uuid, - service_data, - service_data_len, - ); - } - - late final _bt_adapter_le_add_advertising_service_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_advertiser_h, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Int)>>('bt_adapter_le_add_advertising_service_data'); - late final _bt_adapter_le_add_advertising_service_data = - _bt_adapter_le_add_advertising_service_dataPtr.asFunction< - int Function(bt_advertiser_h, int, ffi.Pointer, - ffi.Pointer, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets the external appearance of this device to advertise or scan response data. - /// Please refer to the adopted Bluetooth specification for the the appearance. - /// @since_tizen 2.3.1 - /// - /// @param[in] advertiser The handle of advertiser - /// @param[in] pkt_type The packet type - /// @param[in] appearance The external appearance of device - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_QUOTA_EXCEEDED Quota exceeded - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_clear_advertising_data() - int bt_adapter_le_set_advertising_appearance( - bt_advertiser_h advertiser, - int pkt_type, - int appearance, - ) { - return _bt_adapter_le_set_advertising_appearance( - advertiser, - pkt_type, - appearance, - ); - } - - late final _bt_adapter_le_set_advertising_appearancePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_advertiser_h, ffi.Int32, - ffi.Int)>>('bt_adapter_le_set_advertising_appearance'); - late final _bt_adapter_le_set_advertising_appearance = - _bt_adapter_le_set_advertising_appearancePtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Adds manufacturer specific data to advertise or scan response data. - /// Please refer to the Bluetooth Assigned Numbers provided by the Bluetooth SIG for a list of existing company identifiers. - /// The maximum advertised or responded data size is 31 bytes - /// including data type and system wide data. - /// @since_tizen 2.3.1 - /// - /// - /// @param[in] advertiser The handle of advertiser - /// @param[in] pkt_type The packet type - /// @param[in] manufacturer_id Manufacturer identifier - /// @param[in] manufacturer_data The manufacturer specific data - /// @param[in] manufacturer_data_len The data length of manufacturer data - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_QUOTA_EXCEEDED Quota exceeded - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_clear_advertising_data() - int bt_adapter_le_add_advertising_manufacturer_data( - bt_advertiser_h advertiser, - int pkt_type, - int manufacturer_id, - ffi.Pointer manufacturer_data, - int manufacturer_data_len, - ) { - return _bt_adapter_le_add_advertising_manufacturer_data( - advertiser, - pkt_type, - manufacturer_id, - manufacturer_data, - manufacturer_data_len, - ); - } - - late final _bt_adapter_le_add_advertising_manufacturer_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_advertiser_h, - ffi.Int32, - ffi.Int, - ffi.Pointer, - ffi.Int)>>('bt_adapter_le_add_advertising_manufacturer_data'); - late final _bt_adapter_le_add_advertising_manufacturer_data = - _bt_adapter_le_add_advertising_manufacturer_dataPtr.asFunction< - int Function( - bt_advertiser_h, int, int, ffi.Pointer, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets whether the device name should be included in advertise or scan response data. - /// The maximum advertised or responded data size is 31 bytes - /// including data type and system wide data. - /// @since_tizen 2.3.1 - /// - /// @param[in] advertiser The handle of advertiser - /// @param[in] pkt_type The packet type - /// @param[in] include_name Whether the device name should be included - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_QUOTA_EXCEEDED Quota exceeded - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_clear_advertising_data() - int bt_adapter_le_set_advertising_device_name( - bt_advertiser_h advertiser, - int pkt_type, - bool include_name, - ) { - return _bt_adapter_le_set_advertising_device_name( - advertiser, - pkt_type, - include_name, - ); - } - - late final _bt_adapter_le_set_advertising_device_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_advertiser_h, ffi.Int32, - ffi.Bool)>>('bt_adapter_le_set_advertising_device_name'); - late final _bt_adapter_le_set_advertising_device_name = - _bt_adapter_le_set_advertising_device_namePtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets whether the transmission power level should be included in advertise or scan response data. - /// The maximum advertised or responded data size is 31 bytes - /// including data type and system wide data. - /// @since_tizen 2.3.1 - /// - /// @param[in] advertiser The handle of advertiser - /// @param[in] pkt_type The packet type - /// @param[in] include_tx_power Whether the transmission power level should be included - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_QUOTA_EXCEEDED Quota exceeded - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_clear_advertising_data() - int bt_adapter_le_set_advertising_tx_power_level( - bt_advertiser_h advertiser, - int pkt_type, - bool include_tx_power, - ) { - return _bt_adapter_le_set_advertising_tx_power_level( - advertiser, - pkt_type, - include_tx_power, - ); - } - - late final _bt_adapter_le_set_advertising_tx_power_levelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_advertiser_h, ffi.Int32, - ffi.Bool)>>('bt_adapter_le_set_advertising_tx_power_level'); - late final _bt_adapter_le_set_advertising_tx_power_level = - _bt_adapter_le_set_advertising_tx_power_levelPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Clears all data to be advertised or responded to scan request from LE scanning device. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[in] advertiser The handle of advertiser - /// @param[in] pkt_type The packet type to be cleared - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_clear_advertising_data( - bt_advertiser_h advertiser, - int pkt_type, - ) { - return _bt_adapter_le_clear_advertising_data( - advertiser, - pkt_type, - ); - } - - late final _bt_adapter_le_clear_advertising_dataPtr = - _lookup>( - 'bt_adapter_le_clear_advertising_data'); - late final _bt_adapter_le_clear_advertising_data = - _bt_adapter_le_clear_advertising_dataPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Stops the advertising. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] advertiser The handle of advertiser - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOT_IN_PROGRESS Operation is not in progress - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The advertising must be going on with bt_adapter_le_start_advertising_new(). - /// @post This function invokes bt_adapter_le_advertising_state_changed_cb(). - /// - /// @see bt_adapter_le_start_advertising_new() - /// @see bt_adapter_le_advertising_state_changed_cb() - int bt_adapter_le_stop_advertising( - bt_advertiser_h advertiser, - ) { - return _bt_adapter_le_stop_advertising( - advertiser, - ); - } - - late final _bt_adapter_le_stop_advertisingPtr = - _lookup>( - 'bt_adapter_le_stop_advertising'); - late final _bt_adapter_le_stop_advertising = - _bt_adapter_le_stop_advertisingPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Starts advertising with passed advertiser and advertising parameters. - /// - /// @details Once Bluetooth advertising is started, nearby Bluetooth LE (Low Energy) supported \n - /// devices can know this device's existence. And one of them can make a connection request, \n - /// if it is allowed. - /// - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] advertiser The handle of advertiser - /// @param[in] cb The callback to report the result of this function - /// @param[in] user_data The user data to be passed when callback is called - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOW_IN_PROGRESS Operation is now in progress - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post This function invokes bt_adapter_le_advertising_state_changed_cb(). - /// - /// @see bt_adapter_le_stop_advertising() - /// @see bt_adapter_le_advertising_state_changed_cb() - int bt_adapter_le_start_advertising_new( - bt_advertiser_h advertiser, - bt_adapter_le_advertising_state_changed_cb cb, - ffi.Pointer user_data, - ) { - return _bt_adapter_le_start_advertising_new( - advertiser, - cb, - user_data, - ); - } - - late final _bt_adapter_le_start_advertising_newPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_advertiser_h, - bt_adapter_le_advertising_state_changed_cb, - ffi.Pointer)>>('bt_adapter_le_start_advertising_new'); - late final _bt_adapter_le_start_advertising_new = - _bt_adapter_le_start_advertising_newPtr.asFunction< - int Function( - bt_advertiser_h, - bt_adapter_le_advertising_state_changed_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets advertising mode to control the advertising power and latency. - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] advertiser The handle of advertiser - /// @param[in] mode The mode of advertising - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOW_IN_PROGRESS Operation is now in progress - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_start_advertising_new() - int bt_adapter_le_set_advertising_mode( - bt_advertiser_h advertiser, - int mode, - ) { - return _bt_adapter_le_set_advertising_mode( - advertiser, - mode, - ); - } - - late final _bt_adapter_le_set_advertising_modePtr = - _lookup>( - 'bt_adapter_le_set_advertising_mode'); - late final _bt_adapter_le_set_advertising_mode = - _bt_adapter_le_set_advertising_modePtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets whether the advertising type should be connectable or non-connectable. - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] advertiser The handle of advertiser - /// @param[in] connectable The type of advertising - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOW_IN_PROGRESS Operation is now in progress - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_start_advertising_new() - int bt_adapter_le_set_advertising_connectable( - bt_advertiser_h advertiser, - bool connectable, - ) { - return _bt_adapter_le_set_advertising_connectable( - advertiser, - connectable, - ); - } - - late final _bt_adapter_le_set_advertising_connectablePtr = - _lookup>( - 'bt_adapter_le_set_advertising_connectable'); - late final _bt_adapter_le_set_advertising_connectable = - _bt_adapter_le_set_advertising_connectablePtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets Bluetooth LE scan mode. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] scan_mode The scan mode - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled - /// @retval #BT_ERROR_INVALID_PARAMETER Parameter is invalid - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// @pre The state of local bluetooth must be #BT_ADAPTER_ENABLED. - /// @pre The bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - int bt_adapter_le_set_scan_mode( - int scan_mode, - ) { - return _bt_adapter_le_set_scan_mode( - scan_mode, - ); - } - - late final _bt_adapter_le_set_scan_modePtr = - _lookup>( - 'bt_adapter_le_set_scan_mode'); - late final _bt_adapter_le_set_scan_mode = - _bt_adapter_le_set_scan_modePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Creates a bond with a remote Bluetooth device, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @remarks A bond can be destroyed by bt_device_destroy_bond().\n - /// The bonding request can be cancelled by bt_device_cancel_bonding(). - /// - /// @param[in] remote_address The address of the remote Bluetooth device with which the bond should be created - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_RESOURCE_BUSY Device or resource busy - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @pre The remote device must be discoverable with bt_adapter_start_device_discovery(). - /// @post This function invokes bt_device_bond_created_cb(). - /// - /// @see bt_adapter_start_device_discovery() - /// @see bt_device_bond_created_cb() - /// @see bt_device_cancel_bonding() - /// @see bt_device_destroy_bond() - /// @see bt_device_set_bond_created_cb() - /// @see bt_device_unset_bond_created_cb() - int bt_device_create_bond( - ffi.Pointer remote_address, - ) { - return _bt_device_create_bond( - remote_address, - ); - } - - late final _bt_device_create_bondPtr = - _lookup)>>( - 'bt_device_create_bond'); - late final _bt_device_create_bond = _bt_device_create_bondPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Cancels the bonding process. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @remarks Use this function when the remote Bluetooth device is not responding to the \n - /// bond request or you wish to cancel the bonding request. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOT_IN_PROGRESS Operation not in progress - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The creating a bond must be in progress by bt_device_create_bond(). - /// - /// @see bt_device_create_bond() - /// @see bt_device_bond_created_cb() - /// @see bt_device_set_bond_created_cb() - /// @see bt_device_unset_bond_created_cb() - int bt_device_cancel_bonding() { - return _bt_device_cancel_bonding(); - } - - late final _bt_device_cancel_bondingPtr = - _lookup>( - 'bt_device_cancel_bonding'); - late final _bt_device_cancel_bonding = - _bt_device_cancel_bondingPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Destroys the bond, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] remote_address The address of the remote Bluetooth device to remove bonding - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_RESOURCE_BUSY Device or resource busy - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_BONDED Remote device not bonded - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @pre The bond with the remote device must be created with bt_device_create_bond(). - /// @post This function invokes bt_device_bond_destroyed_cb(). - /// - /// @see bt_device_create_bond() - /// @see bt_device_bond_destroyed_cb() - /// @see bt_device_set_bond_destroyed_cb() - /// @see bt_device_unset_bond_destroyed_cb() - int bt_device_destroy_bond( - ffi.Pointer remote_address, - ) { - return _bt_device_destroy_bond( - remote_address, - ); - } - - late final _bt_device_destroy_bondPtr = - _lookup)>>( - 'bt_device_destroy_bond'); - late final _bt_device_destroy_bond = _bt_device_destroy_bondPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Sets an alias for the bonded device. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] remote_address The address of the remote Bluetooth device - /// @param[in] alias The alias of the remote Bluetooth device - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_BONDED Remote device not bonded - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @pre The bond with the remote device must be created with bt_device_create_bond(). - /// - /// @see bt_device_create_bond() - int bt_device_set_alias( - ffi.Pointer remote_address, - ffi.Pointer alias, - ) { - return _bt_device_set_alias( - remote_address, - alias, - ); - } - - late final _bt_device_set_aliasPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('bt_device_set_alias'); - late final _bt_device_set_alias = _bt_device_set_aliasPtr - .asFunction, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Sets the authorization of a bonded device, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @remarks Once a device is authorized, you don't need to receive a confirmation. - /// - /// @param[in] remote_address The address of the remote Bluetooth device to authorize - /// @param[in] authorization_state The Bluetooth authorization state - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_BONDED Remote device not bonded - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @pre The bond with the remote device must be created with bt_device_create_bond(). - /// @post bt_device_authorization_changed_cb() will be invoked. - /// - /// @see bt_device_create_bond() - /// @see bt_device_authorization_changed_cb() - /// @see bt_device_set_authorization_changed_cb() - /// @see bt_device_unset_authorization_changed_cb() - int bt_device_set_authorization( - ffi.Pointer remote_address, - int authorization_state, - ) { - return _bt_device_set_authorization( - remote_address, - authorization_state, - ); - } - - late final _bt_device_set_authorizationPtr = _lookup< - ffi - .NativeFunction, ffi.Int32)>>( - 'bt_device_set_authorization'); - late final _bt_device_set_authorization = _bt_device_set_authorizationPtr - .asFunction, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Starts the search for services supported by the specified device, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @remarks If creating a bond succeeds, which means bt_device_bond_created_cb() is called with result #BT_ERROR_NONE, \n - /// then you don't need to run this function.\n - /// The service search takes a couple of seconds to complete normally. - /// - /// @param[in] remote_address The address of the remote Bluetooth device whose services need to be checked - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_BONDED Remote device not bonded - /// @retval #BT_ERROR_SERVICE_SEARCH_FAILED Service search failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @pre The remote device must be discoverable with bt_adapter_start_device_discovery(). - /// @pre The bond with the remote device must be created with bt_device_create_bond(). - /// @post This function invokes bt_device_service_searched_cb(). - /// - /// @see bt_adapter_start_device_discovery() - /// @see bt_device_create_bond() - /// @see bt_device_bond_created_cb() - /// @see bt_device_service_searched_cb() - /// @see bt_device_set_service_searched_cb() - /// @see bt_device_unset_service_searched_cb() - int bt_device_start_service_search( - ffi.Pointer remote_address, - ) { - return _bt_device_start_service_search( - remote_address, - ); - } - - late final _bt_device_start_service_searchPtr = - _lookup)>>( - 'bt_device_start_service_search'); - late final _bt_device_start_service_search = - _bt_device_start_service_searchPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Gets the connected profiles. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] remote_address The address of the remote device - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @post bt_device_connected_profile() will be invoked. - /// @see bt_device_connected_profile() - int bt_device_foreach_connected_profiles( - ffi.Pointer remote_address, - bt_device_connected_profile callback, - ffi.Pointer user_data, - ) { - return _bt_device_foreach_connected_profiles( - remote_address, - callback, - user_data, - ); - } - - late final _bt_device_foreach_connected_profilesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, bt_device_connected_profile, - ffi.Pointer)>>('bt_device_foreach_connected_profiles'); - late final _bt_device_foreach_connected_profiles = - _bt_device_foreach_connected_profilesPtr.asFunction< - int Function(ffi.Pointer, bt_device_connected_profile, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Gets the profile connected status. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] remote_address The address of the remote device - /// @param[in] bt_profile wish to know bt_profile - /// @param[out] connected_status the connected status - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_BONDED Remote device not bonded - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - int bt_device_is_profile_connected( - ffi.Pointer remote_address, - int bt_profile, - ffi.Pointer connected_status, - ) { - return _bt_device_is_profile_connected( - remote_address, - bt_profile, - connected_status, - ); - } - - late final _bt_device_is_profile_connectedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int32, - ffi.Pointer)>>('bt_device_is_profile_connected'); - late final _bt_device_is_profile_connected = - _bt_device_is_profile_connectedPtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Updates a LE connection mode. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] remote_address The address of the remote Bluetooth device - /// @param[in] mode The LE connection mode - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_device_update_le_connection_mode( - ffi.Pointer remote_address, - int mode, - ) { - return _bt_device_update_le_connection_mode( - remote_address, - mode, - ); - } - - late final _bt_device_update_le_connection_modePtr = _lookup< - ffi - .NativeFunction, ffi.Int32)>>( - 'bt_device_update_le_connection_mode'); - late final _bt_device_update_le_connection_mode = - _bt_device_update_le_connection_modePtr - .asFunction, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Registers a callback function to be invoked when the bond creates. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_device_bond_created_cb() will be invoked. - /// @see bt_initialize() - /// @see bt_device_bond_created_cb() - /// @see bt_device_unset_bond_created_cb() - int bt_device_set_bond_created_cb( - bt_device_bond_created_cb callback, - ffi.Pointer user_data, - ) { - return _bt_device_set_bond_created_cb( - callback, - user_data, - ); - } - - late final _bt_device_set_bond_created_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_device_bond_created_cb, - ffi.Pointer)>>('bt_device_set_bond_created_cb'); - late final _bt_device_set_bond_created_cb = - _bt_device_set_bond_created_cbPtr.asFunction< - int Function(bt_device_bond_created_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_device_set_bond_created_cb() - int bt_device_unset_bond_created_cb() { - return _bt_device_unset_bond_created_cb(); - } - - late final _bt_device_unset_bond_created_cbPtr = - _lookup>( - 'bt_device_unset_bond_created_cb'); - late final _bt_device_unset_bond_created_cb = - _bt_device_unset_bond_created_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Registers a callback function to be invoked when the bond destroys. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_device_bond_destroyed_cb() will be invoked. - /// @see bt_initialize() - /// @see bt_device_bond_destroyed_cb() - /// @see bt_device_unset_bond_destroyed_cb() - int bt_device_set_bond_destroyed_cb( - bt_device_bond_destroyed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_device_set_bond_destroyed_cb( - callback, - user_data, - ); - } - - late final _bt_device_set_bond_destroyed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_device_bond_destroyed_cb, - ffi.Pointer)>>('bt_device_set_bond_destroyed_cb'); - late final _bt_device_set_bond_destroyed_cb = - _bt_device_set_bond_destroyed_cbPtr.asFunction< - int Function(bt_device_bond_destroyed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_device_set_bond_destroyed_cb() - int bt_device_unset_bond_destroyed_cb() { - return _bt_device_unset_bond_destroyed_cb(); - } - - late final _bt_device_unset_bond_destroyed_cbPtr = - _lookup>( - 'bt_device_unset_bond_destroyed_cb'); - late final _bt_device_unset_bond_destroyed_cb = - _bt_device_unset_bond_destroyed_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Registers a callback function to be invoked when the authorization of device changes. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_device_authorization_changed_cb() will be invoked. - /// @see bt_initialize() - /// @see bt_device_authorization_changed_cb() - /// @see bt_device_set_authorization_changed_cb() - /// @see bt_device_unset_authorization_changed_cb() - int bt_device_set_authorization_changed_cb( - bt_device_authorization_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_device_set_authorization_changed_cb( - callback, - user_data, - ); - } - - late final _bt_device_set_authorization_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_device_authorization_changed_cb, ffi.Pointer)>>( - 'bt_device_set_authorization_changed_cb'); - late final _bt_device_set_authorization_changed_cb = - _bt_device_set_authorization_changed_cbPtr.asFunction< - int Function( - bt_device_authorization_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_device_set_authorization_changed_cb() - int bt_device_unset_authorization_changed_cb() { - return _bt_device_unset_authorization_changed_cb(); - } - - late final _bt_device_unset_authorization_changed_cbPtr = - _lookup>( - 'bt_device_unset_authorization_changed_cb'); - late final _bt_device_unset_authorization_changed_cb = - _bt_device_unset_authorization_changed_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Registers a callback function to be invoked when the process of service search finishes. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_device_service_searched_cb() will be invoked. - /// @see bt_initialize() - /// @see bt_device_service_searched_cb() - /// @see bt_device_unset_service_searched_cb() - int bt_device_set_service_searched_cb( - bt_device_service_searched_cb callback, - ffi.Pointer user_data, - ) { - return _bt_device_set_service_searched_cb( - callback, - user_data, - ); - } - - late final _bt_device_set_service_searched_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_device_service_searched_cb, - ffi.Pointer)>>('bt_device_set_service_searched_cb'); - late final _bt_device_set_service_searched_cb = - _bt_device_set_service_searched_cbPtr.asFunction< - int Function(bt_device_service_searched_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_device_set_service_searched_cb() - int bt_device_unset_service_searched_cb() { - return _bt_device_unset_service_searched_cb(); - } - - late final _bt_device_unset_service_searched_cbPtr = - _lookup>( - 'bt_device_unset_service_searched_cb'); - late final _bt_device_unset_service_searched_cb = - _bt_device_unset_service_searched_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Registers a callback function to be invoked when the connection state is changed. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_device_connection_state_changed_cb() will be invoked. - /// @see bt_initialize() - /// @see bt_device_connection_state_changed_cb() - /// @see bt_device_unset_connection_state_changed_cb() - int bt_device_set_connection_state_changed_cb( - bt_device_connection_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_device_set_connection_state_changed_cb( - callback, - user_data, - ); - } - - late final _bt_device_set_connection_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_device_connection_state_changed_cb, - ffi.Pointer)>>( - 'bt_device_set_connection_state_changed_cb'); - late final _bt_device_set_connection_state_changed_cb = - _bt_device_set_connection_state_changed_cbPtr.asFunction< - int Function( - bt_device_connection_state_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE - /// @brief Unregisters the callback function to be invoked when the connection state is changed. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_device_set_connection_state_changed_cb() - int bt_device_unset_connection_state_changed_cb() { - return _bt_device_unset_connection_state_changed_cb(); - } - - late final _bt_device_unset_connection_state_changed_cbPtr = - _lookup>( - 'bt_device_unset_connection_state_changed_cb'); - late final _bt_device_unset_connection_state_changed_cb = - _bt_device_unset_connection_state_changed_cbPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE - /// @brief Registers a RFCOMM server socket with a specific UUID. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @remarks A socket can be destroyed by bt_socket_destroy_rfcomm(). - /// - /// @param[in] service_uuid The UUID of service to provide - /// @param[out] socket_fd The file descriptor of socket to listen - /// @return 0 on success, otherwise a negative error value. - /// - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// - /// @see bt_socket_listen_and_accept_rfcomm() - /// @see bt_socket_destroy_rfcomm() - int bt_socket_create_rfcomm( - ffi.Pointer service_uuid, - ffi.Pointer socket_fd, - ) { - return _bt_socket_create_rfcomm( - service_uuid, - socket_fd, - ); - } - - late final _bt_socket_create_rfcommPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('bt_socket_create_rfcomm'); - late final _bt_socket_create_rfcomm = _bt_socket_create_rfcommPtr - .asFunction, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE - /// @brief Removes the RFCOMM server socket which was created using bt_socket_create_rfcomm(). - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @remarks If callback function bt_socket_connection_state_changed_cb() is set and the remote Bluetooth device is connected, \n - /// then bt_socket_connection_state_changed_cb() will be called when this function is finished successfully. - /// - /// @param[in] socket_fd The file descriptor of socket (which was created using bt_socket_create_rfcomm()) to destroy - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The socket must be created with bt_socket_create_rfcomm(). - /// @post If callback function bt_socket_connection_state_changed_cb() is set and the remote Bluetooth device is connected, - /// then bt_socket_connection_state_changed_cb() will be called. - /// @see bt_socket_create_rfcomm() - /// @see bt_socket_connection_state_changed_cb() - /// @see bt_socket_set_connection_state_changed_cb() - /// @see bt_socket_unset_connection_state_changed_cb() - int bt_socket_destroy_rfcomm( - int socket_fd, - ) { - return _bt_socket_destroy_rfcomm( - socket_fd, - ); - } - - late final _bt_socket_destroy_rfcommPtr = - _lookup>( - 'bt_socket_destroy_rfcomm'); - late final _bt_socket_destroy_rfcomm = - _bt_socket_destroy_rfcommPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE - /// @brief Starts listening on passed RFCOMM socket and accepts connection requests. - /// @details Pop-up is shown automatically when a RFCOMM connection is requested. \n - /// bt_socket_connection_state_changed_cb() will be called with \n - /// #BT_SOCKET_CONNECTED if you click "yes" and connection is finished successfully. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] socket_fd The file descriptor of socket on which start to listen - /// @param[in] max_pending_connections The maximum number of pending connections - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The socket must be created with bt_socket_create_rfcomm(). - /// @post If callback function bt_socket_connection_state_changed_cb() is set, - /// then bt_socket_connection_state_changed_cb() will be called when the remote Bluetooth device is connected. - /// @see bt_socket_create_rfcomm() - /// @see bt_socket_connection_state_changed_cb() - /// @see bt_socket_set_connection_state_changed_cb() - /// @see bt_socket_unset_connection_state_changed_cb() - int bt_socket_listen_and_accept_rfcomm( - int socket_fd, - int max_pending_connections, - ) { - return _bt_socket_listen_and_accept_rfcomm( - socket_fd, - max_pending_connections, - ); - } - - late final _bt_socket_listen_and_accept_rfcommPtr = - _lookup>( - 'bt_socket_listen_and_accept_rfcomm'); - late final _bt_socket_listen_and_accept_rfcomm = - _bt_socket_listen_and_accept_rfcommPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE - /// @brief Connects to a specific RFCOMM based service on a remote Bluetooth device UUID, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @remarks A connection can be disconnected by bt_socket_disconnect_rfcomm(). - /// - /// @param[in] remote_address The address of the remote Bluetooth device - /// @param[in] service_uuid The UUID of service provided by the remote Bluetooth device - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @pre The remote device must be discoverable with bt_adapter_start_device_discovery(). - /// @pre The bond with the remote device must be created with bt_device_create_bond(). - /// @post This function invokes bt_socket_connection_state_changed_cb(). - /// - /// @see bt_device_create_bond() - /// @see bt_adapter_start_device_discovery() - /// @see bt_device_start_service_search() - /// @see bt_socket_disconnect_rfcomm() - /// @see bt_socket_connection_state_changed_cb() - /// @see bt_socket_set_connection_state_changed_cb() - /// @see bt_socket_unset_connection_state_changed_cb() - int bt_socket_connect_rfcomm( - ffi.Pointer remote_address, - ffi.Pointer service_uuid, - ) { - return _bt_socket_connect_rfcomm( - remote_address, - service_uuid, - ); - } - - late final _bt_socket_connect_rfcommPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('bt_socket_connect_rfcomm'); - late final _bt_socket_connect_rfcomm = _bt_socket_connect_rfcommPtr - .asFunction, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE - /// @brief Disconnects the RFCOMM connection with the given file descriptor of connected socket. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] socket_fd The file descriptor of socket to close which was received using bt_socket_connection_state_changed_cb(). - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The connection must be established. - /// - /// @see bt_socket_connection_state_changed_cb() - /// @see bt_socket_set_connection_state_changed_cb() - /// @see bt_socket_unset_connection_state_changed_cb() - int bt_socket_disconnect_rfcomm( - int socket_fd, - ) { - return _bt_socket_disconnect_rfcomm( - socket_fd, - ); - } - - late final _bt_socket_disconnect_rfcommPtr = - _lookup>( - 'bt_socket_disconnect_rfcomm'); - late final _bt_socket_disconnect_rfcomm = - _bt_socket_disconnect_rfcommPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE - /// @brief Sends data to the connected device. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// - /// @param[in] socket_fd The file descriptor of connected socket which was received using bt_socket_connection_state_changed_cb() - /// @param[in] data The data to be sent - /// @param[in] length The length of data to be sent - /// - /// @return the number of bytes written (zero indicates nothing was written). - /// @retval On error, -1 is returned, and errno is set appropriately. See write 2 man page. - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception BT_ERROR_PERMISSION_DENIED Permission denied - /// @exception BT_ERROR_AGAIN Resource temporarily unavailable - /// - /// @pre The connection must be established. - /// - /// @see bt_socket_connection_state_changed_cb() - /// @see bt_socket_set_connection_state_changed_cb() - /// @see bt_socket_unset_connection_state_changed_cb() - int bt_socket_send_data( - int socket_fd, - ffi.Pointer data, - int length, - ) { - return _bt_socket_send_data( - socket_fd, - data, - length, - ); - } - - late final _bt_socket_send_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Int)>>('bt_socket_send_data'); - late final _bt_socket_send_data = _bt_socket_send_dataPtr - .asFunction, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE - /// @brief Registers a callback function that will be invoked when you receive data. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_socket_data_received_cb() will be invoked. - /// @see bt_initialize() - /// @see bt_socket_data_received_cb() - /// @see bt_socket_set_data_received_cb() - /// @see bt_socket_unset_data_received_cb() - int bt_socket_set_data_received_cb( - bt_socket_data_received_cb callback, - ffi.Pointer user_data, - ) { - return _bt_socket_set_data_received_cb( - callback, - user_data, - ); - } - - late final _bt_socket_set_data_received_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_socket_data_received_cb, - ffi.Pointer)>>('bt_socket_set_data_received_cb'); - late final _bt_socket_set_data_received_cb = - _bt_socket_set_data_received_cbPtr.asFunction< - int Function(bt_socket_data_received_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_socket_data_received_cb() - /// @see bt_socket_set_data_received_cb() - int bt_socket_unset_data_received_cb() { - return _bt_socket_unset_data_received_cb(); - } - - late final _bt_socket_unset_data_received_cbPtr = - _lookup>( - 'bt_socket_unset_data_received_cb'); - late final _bt_socket_unset_data_received_cb = - _bt_socket_unset_data_received_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE - /// @brief Registers a callback function that will be invoked when a RFCOMM connection is requested. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_socket_connection_requested_cb() will be invoked. - /// @see bt_initialize() - /// @see bt_socket_unset_connection_requested_cb() - int bt_socket_set_connection_requested_cb( - bt_socket_connection_requested_cb callback, - ffi.Pointer user_data, - ) { - return _bt_socket_set_connection_requested_cb( - callback, - user_data, - ); - } - - late final _bt_socket_set_connection_requested_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_socket_connection_requested_cb, - ffi.Pointer)>>('bt_socket_set_connection_requested_cb'); - late final _bt_socket_set_connection_requested_cb = - _bt_socket_set_connection_requested_cbPtr.asFunction< - int Function( - bt_socket_connection_requested_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_socket_set_connection_requested_cb() - /// @see bt_socket_connection_requested_cb() - int bt_socket_unset_connection_requested_cb() { - return _bt_socket_unset_connection_requested_cb(); - } - - late final _bt_socket_unset_connection_requested_cbPtr = - _lookup>( - 'bt_socket_unset_connection_requested_cb'); - late final _bt_socket_unset_connection_requested_cb = - _bt_socket_unset_connection_requested_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE - /// @brief Registers a callback function that will be invoked when the connection state changes. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_socket_connection_state_changed_cb() will be invoked. - /// @see bt_initialize() - /// @see bt_socket_connection_state_changed_cb() - /// @see bt_socket_unset_connection_state_changed_cb() - int bt_socket_set_connection_state_changed_cb( - bt_socket_connection_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_socket_set_connection_state_changed_cb( - callback, - user_data, - ); - } - - late final _bt_socket_set_connection_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_socket_connection_state_changed_cb, - ffi.Pointer)>>( - 'bt_socket_set_connection_state_changed_cb'); - late final _bt_socket_set_connection_state_changed_cb = - _bt_socket_set_connection_state_changed_cbPtr.asFunction< - int Function( - bt_socket_connection_state_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_socket_connection_state_changed_cb() - /// @see bt_socket_set_connection_state_changed_cb() - int bt_socket_unset_connection_state_changed_cb() { - return _bt_socket_unset_connection_state_changed_cb(); - } - - late final _bt_socket_unset_connection_state_changed_cbPtr = - _lookup>( - 'bt_socket_unset_connection_state_changed_cb'); - late final _bt_socket_unset_connection_state_changed_cb = - _bt_socket_unset_connection_state_changed_cbPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_SERVER_MODULE - /// @brief Initializes the Bluetooth OPP server requested by bt_opp_server_connection_requested_cb(). - /// @details No popup appears when an OPP connection is requested from a remote device. \n - /// Instead, @a connection_requested_cb() will be called. \n - /// At that time, you can call either bt_opp_server_accept() or bt_opp_server_reject(). - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks This function must be called to start Bluetooth OPP server. \n - /// You must free all resources of the Bluetooth service by calling bt_opp_server_deinitialize() if Bluetooth OPP service is no longer needed. - /// @param[in] destination The destination path - /// @param[in] connection_requested_cb The callback called when an OPP connection is requested - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_RESOURCE_BUSY Device or resource busy - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_opp_server_connection_requested_cb() - /// @see bt_opp_server_deinitialize() - /// @see bt_opp_server_accept() - /// @see bt_opp_server_reject() - int bt_opp_server_initialize_by_connection_request( - ffi.Pointer destination, - bt_opp_server_connection_requested_cb connection_requested_cb, - ffi.Pointer user_data, - ) { - return _bt_opp_server_initialize_by_connection_request( - destination, - connection_requested_cb, - user_data, - ); - } - - late final _bt_opp_server_initialize_by_connection_requestPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - bt_opp_server_connection_requested_cb, - ffi.Pointer)>>( - 'bt_opp_server_initialize_by_connection_request'); - late final _bt_opp_server_initialize_by_connection_request = - _bt_opp_server_initialize_by_connection_requestPtr.asFunction< - int Function(ffi.Pointer, - bt_opp_server_connection_requested_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_SERVER_MODULE - /// @brief Deinitializes the Bluetooth OPP server. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_opp_server_deinitialize() - int bt_opp_server_deinitialize() { - return _bt_opp_server_deinitialize(); - } - - late final _bt_opp_server_deinitializePtr = - _lookup>( - 'bt_opp_server_deinitialize'); - late final _bt_opp_server_deinitialize = - _bt_opp_server_deinitializePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_SERVER_MODULE - /// @brief Accepts the push request from the remote device. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @remarks If you initialize OPP server by bt_opp_server_initialize_by_connection_request(), then name is ignored. - /// You can cancel the pushes by bt_opp_server_cancel_transfer() with transfer_id. - /// @param[in] progress_cb The callback called when a file is being transferred - /// @param[in] finished_cb The callback called when a transfer is finished - /// @param[in] name The name to store. This can be NULL if you initialize OPP server by bt_opp_server_initialize_by_connection_request(). - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] transfer_id The ID of transfer - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOW_IN_PROGRESS Operation now in progress - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_opp_server_reject() - int bt_opp_server_accept( - bt_opp_server_transfer_progress_cb progress_cb, - bt_opp_server_transfer_finished_cb finished_cb, - ffi.Pointer name, - ffi.Pointer user_data, - ffi.Pointer transfer_id, - ) { - return _bt_opp_server_accept( - progress_cb, - finished_cb, - name, - user_data, - transfer_id, - ); - } - - late final _bt_opp_server_acceptPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_opp_server_transfer_progress_cb, - bt_opp_server_transfer_finished_cb, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('bt_opp_server_accept'); - late final _bt_opp_server_accept = _bt_opp_server_acceptPtr.asFunction< - int Function( - bt_opp_server_transfer_progress_cb, - bt_opp_server_transfer_finished_cb, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_SERVER_MODULE - /// @brief Rejects the push request from the remote device. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_opp_server_accept() - int bt_opp_server_reject() { - return _bt_opp_server_reject(); - } - - late final _bt_opp_server_rejectPtr = - _lookup>('bt_opp_server_reject'); - late final _bt_opp_server_reject = - _bt_opp_server_rejectPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_SERVER_MODULE - /// @brief Cancels the transfer. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] transfer_id The ID of transfer - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_opp_server_accept() - int bt_opp_server_cancel_transfer( - int transfer_id, - ) { - return _bt_opp_server_cancel_transfer( - transfer_id, - ); - } - - late final _bt_opp_server_cancel_transferPtr = - _lookup>( - 'bt_opp_server_cancel_transfer'); - late final _bt_opp_server_cancel_transfer = - _bt_opp_server_cancel_transferPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_SERVER_MODULE - /// @brief Sets the destination path of file to be pushed. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] destination The destination path of file to be pushed - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_opp_server_set_destination( - ffi.Pointer destination, - ) { - return _bt_opp_server_set_destination( - destination, - ); - } - - late final _bt_opp_server_set_destinationPtr = - _lookup)>>( - 'bt_opp_server_set_destination'); - late final _bt_opp_server_set_destination = _bt_opp_server_set_destinationPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_CLIENT_MODULE - /// @brief Initializes the Bluetooth OPP client. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks This function must be called before Bluetooth OPP client starts. \n - /// You must free all resources of the Bluetooth service by calling bt_opp_client_deinitialize() \n - /// if Bluetooth OPP service is no longer needed. - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_RESOURCE_BUSY Device or resource busy - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_opp_client_deinitialize() - int bt_opp_client_initialize() { - return _bt_opp_client_initialize(); - } - - late final _bt_opp_client_initializePtr = - _lookup>( - 'bt_opp_client_initialize'); - late final _bt_opp_client_initialize = - _bt_opp_client_initializePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_CLIENT_MODULE - /// @brief Deinitializes the Bluetooth OPP client. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_opp_client_initialize() - int bt_opp_client_deinitialize() { - return _bt_opp_client_deinitialize(); - } - - late final _bt_opp_client_deinitializePtr = - _lookup>( - 'bt_opp_client_deinitialize'); - late final _bt_opp_client_deinitialize = - _bt_opp_client_deinitializePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_CLIENT_MODULE - /// @brief Adds file to be pushed. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] file The path of file to be pushed - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see bt_opp_client_clear_files() - /// @see bt_opp_client_push_files() - int bt_opp_client_add_file( - ffi.Pointer file, - ) { - return _bt_opp_client_add_file( - file, - ); - } - - late final _bt_opp_client_add_filePtr = - _lookup)>>( - 'bt_opp_client_add_file'); - late final _bt_opp_client_add_file = _bt_opp_client_add_filePtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_CLIENT_MODULE - /// @brief Adds file to be pushed. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_opp_client_add_file() - /// @see bt_opp_client_push_files() - int bt_opp_client_clear_files() { - return _bt_opp_client_clear_files(); - } - - late final _bt_opp_client_clear_filesPtr = - _lookup>( - 'bt_opp_client_clear_files'); - late final _bt_opp_client_clear_files = - _bt_opp_client_clear_filesPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_CLIENT_MODULE - /// @brief Pushes the file to the remote device, asynchronously. - /// - /// @details At first, bt_opp_client_push_responded_cb() will be called when OPP server responds to the push request. \n - /// After connection is established, bt_opp_client_push_progress_cb() will be called repeatedly until a file is transferred completely. \n - /// If you send several files, then bt_opp_client_push_progress_cb() with another file will be called repeatedly until the file is transferred completely. \n - /// bt_opp_client_push_finished_cb() will be called when the push request is finished. - /// - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] remote_address The remote address - /// @param[in] responded_cb The callback called when OPP server responds to the push request - /// @param[in] progress_cb The callback called when each file is being transferred - /// @param[in] finished_cb The callback called when the push request is finished - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOW_IN_PROGRESS Operation now in progress - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_opp_client_initialize() - /// @see bt_opp_client_cancel_push() - int bt_opp_client_push_files( - ffi.Pointer remote_address, - bt_opp_client_push_responded_cb responded_cb, - bt_opp_client_push_progress_cb progress_cb, - bt_opp_client_push_finished_cb finished_cb, - ffi.Pointer user_data, - ) { - return _bt_opp_client_push_files( - remote_address, - responded_cb, - progress_cb, - finished_cb, - user_data, - ); - } - - late final _bt_opp_client_push_filesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - bt_opp_client_push_responded_cb, - bt_opp_client_push_progress_cb, - bt_opp_client_push_finished_cb, - ffi.Pointer)>>('bt_opp_client_push_files'); - late final _bt_opp_client_push_files = - _bt_opp_client_push_filesPtr.asFunction< - int Function( - ffi.Pointer, - bt_opp_client_push_responded_cb, - bt_opp_client_push_progress_cb, - bt_opp_client_push_finished_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_CLIENT_MODULE - /// @brief Cancels the push request in progress, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre bt_opp_client_push_files() must be called. - /// @post bt_opp_client_push_finished_cb() will be invoked with result #BT_ERROR_CANCELLED, - /// which is a parameter of bt_opp_client_push_files(). - /// @see bt_opp_client_initialize() - /// @see bt_opp_client_push_files() - int bt_opp_client_cancel_push() { - return _bt_opp_client_cancel_push(); - } - - late final _bt_opp_client_cancel_pushPtr = - _lookup>( - 'bt_opp_client_cancel_push'); - late final _bt_opp_client_cancel_push = - _bt_opp_client_cancel_pushPtr.asFunction(); - - /// @ingroup @if WEARABLE CAPI_NETWORK_BLUETOOTH_HID_HOST_MODULE CAPI @else_NETWORK_BLUETOOTH_HID_MODULE @endif - /// @brief Initializes the Bluetooth HID (Human Interface Device) Host. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks This function must be called before Bluetooth HID Host starts. \n - /// You must free all resources of the Bluetooth service by calling bt_hid_host_deinitialize() \n - /// if Bluetooth HID Host service is no longer needed. - /// @param[in] connection_cb The callback called when the connection state is changed - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_hid_host_deinitialize() - int bt_hid_host_initialize( - bt_hid_host_connection_state_changed_cb connection_cb, - ffi.Pointer user_data, - ) { - return _bt_hid_host_initialize( - connection_cb, - user_data, - ); - } - - late final _bt_hid_host_initializePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_hid_host_connection_state_changed_cb, - ffi.Pointer)>>('bt_hid_host_initialize'); - late final _bt_hid_host_initialize = _bt_hid_host_initializePtr.asFunction< - int Function( - bt_hid_host_connection_state_changed_cb, ffi.Pointer)>(); - - /// @ingroup @if WEARABLE CAPI_NETWORK_BLUETOOTH_HID_HOST_MODULE CAPI @else_NETWORK_BLUETOOTH_HID_MODULE @endif - /// @brief Deinitializes the Bluetooth HID (Human Interface Device) Host. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth HID service must be initialized with bt_hid_host_initialize(). - /// @see bt_hid_host_initialize() - int bt_hid_host_deinitialize() { - return _bt_hid_host_deinitialize(); - } - - late final _bt_hid_host_deinitializePtr = - _lookup>( - 'bt_hid_host_deinitialize'); - late final _bt_hid_host_deinitialize = - _bt_hid_host_deinitializePtr.asFunction(); - - /// @ingroup @if WEARABLE CAPI_NETWORK_BLUETOOTH_HID_HOST_MODULE CAPI @else_NETWORK_BLUETOOTH_HID_MODULE @endif - /// @brief Connects the remote device with the HID (Human Interface Device) service, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] remote_address The remote address - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The local device must be bonded with the remote device by bt_device_create_bond(). - /// @pre The Bluetooth HID service must be initialized with bt_hid_host_initialize(). - /// @post bt_hid_host_connection_state_changed_cb() will be invoked. - /// @see bt_hid_host_disconnect() - /// @see bt_hid_host_connection_state_changed_cb() - int bt_hid_host_connect( - ffi.Pointer remote_address, - ) { - return _bt_hid_host_connect( - remote_address, - ); - } - - late final _bt_hid_host_connectPtr = - _lookup)>>( - 'bt_hid_host_connect'); - late final _bt_hid_host_connect = - _bt_hid_host_connectPtr.asFunction)>(); - - /// @ingroup @if WEARABLE CAPI_NETWORK_BLUETOOTH_HID_HOST_MODULE CAPI @else_NETWORK_BLUETOOTH_HID_MODULE @endif - /// @brief Disconnects the remote device with the HID (Human Interface Device) service, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] remote_address The remote address - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected by bt_hid_host_connect(). - /// @post bt_hid_host_connection_state_changed_cb() will be invoked. - /// @see bt_hid_host_connect() - /// @see bt_hid_host_connection_state_changed_cb() - int bt_hid_host_disconnect( - ffi.Pointer remote_address, - ) { - return _bt_hid_host_disconnect( - remote_address, - ); - } - - late final _bt_hid_host_disconnectPtr = - _lookup)>>( - 'bt_hid_host_disconnect'); - late final _bt_hid_host_disconnect = _bt_hid_host_disconnectPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE - /// @brief Activates the Bluetooth HID Device role. - /// @since_tizen @if WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @remarks This function must be called to register HID UUID. \n - /// Only then a remote device is able to identify this one as a HID device. - /// - /// @param[in] callback The callback called when the connection state is changed - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOW_IN_PROGRESS Already activated - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_hid_device_deactivate() - int bt_hid_device_activate( - bt_hid_device_connection_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_hid_device_activate( - callback, - user_data, - ); - } - - late final _bt_hid_device_activatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_hid_device_connection_state_changed_cb, - ffi.Pointer)>>('bt_hid_device_activate'); - late final _bt_hid_device_activate = _bt_hid_device_activatePtr.asFunction< - int Function( - bt_hid_device_connection_state_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE - /// @brief Deactivates the Bluetooth HID Device role. - /// @since_tizen @if WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @remarks This function must be called to deregister the HID UUID. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOT_IN_PROGRESS Not activated - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_hid_device_activate() - int bt_hid_device_deactivate() { - return _bt_hid_device_deactivate(); - } - - late final _bt_hid_device_deactivatePtr = - _lookup>( - 'bt_hid_device_deactivate'); - late final _bt_hid_device_deactivate = - _bt_hid_device_deactivatePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE - /// @brief Initiates the HID device connection with the Device role, asynchronously. - /// @since_tizen @if WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @remarks This function must be called to Initiate the HID device role connection. - /// - /// @param[in] remote_address The remote device's address. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_NOT_IN_PROGRESS Not activated - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_ALREADY_DONE Already connected - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @pre The local device must be bonded with the remote device by bt_device_create_bond(). - /// @see bt_initialize() - /// @see bt_hid_device_activate() - int bt_hid_device_connect( - ffi.Pointer remote_address, - ) { - return _bt_hid_device_connect( - remote_address, - ); - } - - late final _bt_hid_device_connectPtr = - _lookup)>>( - 'bt_hid_device_connect'); - late final _bt_hid_device_connect = _bt_hid_device_connectPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE - /// @brief Disconnects from the HID Host device, asynchronously. - /// @since_tizen @if WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] remote_address The remote device's address. - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_hid_device_connection_state_changed_cb() - int bt_hid_device_disconnect( - ffi.Pointer remote_address, - ) { - return _bt_hid_device_disconnect( - remote_address, - ); - } - - late final _bt_hid_device_disconnectPtr = - _lookup)>>( - 'bt_hid_device_disconnect'); - late final _bt_hid_device_disconnect = _bt_hid_device_disconnectPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE - /// @brief Sends the mouse event data to the remote device. - /// @since_tizen @if WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] remote_address The remote device's address. - /// @param[in] mouse_data The mouse data to be passed to the remote device. - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The HID connection must be established. - /// @see bt_hid_device_connection_state_changed_cb() - int bt_hid_device_send_mouse_event( - ffi.Pointer remote_address, - ffi.Pointer mouse_data, - ) { - return _bt_hid_device_send_mouse_event( - remote_address, - mouse_data, - ); - } - - late final _bt_hid_device_send_mouse_eventPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>( - 'bt_hid_device_send_mouse_event'); - late final _bt_hid_device_send_mouse_event = - _bt_hid_device_send_mouse_eventPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE - /// @brief Sends the keyboard event data to the remote device. - /// @since_tizen @if WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] remote_address The remote device's address. - /// @param[in] key_data The key data to be passed to the remote device - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The HID connection must be established. - /// @see bt_hid_device_connection_state_changed_cb() - int bt_hid_device_send_key_event( - ffi.Pointer remote_address, - ffi.Pointer key_data, - ) { - return _bt_hid_device_send_key_event( - remote_address, - key_data, - ); - } - - late final _bt_hid_device_send_key_eventPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('bt_hid_device_send_key_event'); - late final _bt_hid_device_send_key_event = - _bt_hid_device_send_key_eventPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE - /// @brief Sets the callback called when the device receives data from the HID Host. - /// @since_tizen @if WEARABLE 3.0 @endif - /// - /// @param[in] callback The callback function to be set when data is received. - /// @param[in] user_data The user data to be passed to the callback. - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_hid_device_connection_state_changed_cb() - int bt_hid_device_set_data_received_cb( - bt_hid_device_data_received_cb callback, - ffi.Pointer user_data, - ) { - return _bt_hid_device_set_data_received_cb( - callback, - user_data, - ); - } - - late final _bt_hid_device_set_data_received_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_hid_device_data_received_cb, - ffi.Pointer)>>('bt_hid_device_set_data_received_cb'); - late final _bt_hid_device_set_data_received_cb = - _bt_hid_device_set_data_received_cbPtr.asFunction< - int Function( - bt_hid_device_data_received_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE - /// @brief Unsets the data received callback. - /// @since_tizen @if WEARABLE 3.0 @endif - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_hid_device_connection_state_changed_cb() - int bt_hid_device_unset_data_received_cb() { - return _bt_hid_device_unset_data_received_cb(); - } - - late final _bt_hid_device_unset_data_received_cbPtr = - _lookup>( - 'bt_hid_device_unset_data_received_cb'); - late final _bt_hid_device_unset_data_received_cb = - _bt_hid_device_unset_data_received_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE - /// @brief Responds to reports from the HID Host. - /// @since_tizen @if WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] remote_address The remote device's address. - /// @param[in] header_type The response header type - /// @param[in] param_type The response parameter type - /// @param[in] data The response data - /// @param[in] data_len The length of the response data - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The HID connection must be established. - /// @see bt_hid_device_connection_state_changed_cb() - int bt_hid_device_reply_to_report( - ffi.Pointer remote_address, - int header_type, - int param_type, - ffi.Pointer data, - int data_len, - ) { - return _bt_hid_device_reply_to_report( - remote_address, - header_type, - param_type, - data, - data_len, - ); - } - - late final _bt_hid_device_reply_to_reportPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Pointer, - ffi.UnsignedInt)>>('bt_hid_device_reply_to_report'); - late final _bt_hid_device_reply_to_report = - _bt_hid_device_reply_to_reportPtr.asFunction< - int Function( - ffi.Pointer, int, int, ffi.Pointer, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE - /// @brief Initializes the Bluetooth profiles related with audio. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks This function must be called before Bluetooth profiles related with audio starts. \n - /// You must free all resources of the this service by calling bt_audio_deinitialize() \n - /// if Bluetooth profiles related with audio service is no longer needed. - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_audio_deinitialize() - int bt_audio_initialize() { - return _bt_audio_initialize(); - } - - late final _bt_audio_initializePtr = - _lookup>('bt_audio_initialize'); - late final _bt_audio_initialize = - _bt_audio_initializePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE - /// @brief Deinitializes the Bluetooth profiles related with audio. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth audio service must be initialized with bt_audio_initialize(). - /// @see bt_audio_initialize() - int bt_audio_deinitialize() { - return _bt_audio_deinitialize(); - } - - late final _bt_audio_deinitializePtr = - _lookup>('bt_audio_deinitialize'); - late final _bt_audio_deinitialize = - _bt_audio_deinitializePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE - /// @brief Connects the remote device with the given audio profile, asynchronously. - /// @details If you input type as #BT_AUDIO_PROFILE_TYPE_ALL and connection request succeeds, then bt_audio_connection_state_changed_cb() will be called twice \n - /// when #BT_AUDIO_PROFILE_TYPE_HSP_HFP is connected and #BT_AUDIO_PROFILE_TYPE_A2DP is connected. - /// - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] remote_address The remote address - /// @param[in] type The type of audio profile - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth audio service must be initialized with bt_audio_initialize(). - /// @pre The local device must be bonded with the remote device by bt_device_create_bond(). - /// @post bt_audio_connection_state_changed_cb() will be invoked. - /// @see bt_audio_disconnect() - /// @see bt_audio_connection_state_changed_cb() - int bt_audio_connect( - ffi.Pointer remote_address, - int type, - ) { - return _bt_audio_connect( - remote_address, - type, - ); - } - - late final _bt_audio_connectPtr = _lookup< - ffi - .NativeFunction, ffi.Int32)>>( - 'bt_audio_connect'); - late final _bt_audio_connect = _bt_audio_connectPtr - .asFunction, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE - /// @brief Disconnects the remote device with the given audio profile, asynchronously. - /// @details If you input type as #BT_AUDIO_PROFILE_TYPE_ALL and disconnection request succeeds, then bt_audio_connection_state_changed_cb() will be called twice \n - /// when #BT_AUDIO_PROFILE_TYPE_HSP_HFP is disconnected and #BT_AUDIO_PROFILE_TYPE_A2DP is disconnected. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] remote_address The remote address - /// @param[in] type The type of audio profile - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected by bt_audio_connect(). - /// @post bt_audio_connection_state_changed_cb() will be invoked. - /// @see bt_audio_connect() - /// @see bt_audio_connection_state_changed_cb() - int bt_audio_disconnect( - ffi.Pointer remote_address, - int type, - ) { - return _bt_audio_disconnect( - remote_address, - type, - ); - } - - late final _bt_audio_disconnectPtr = _lookup< - ffi - .NativeFunction, ffi.Int32)>>( - 'bt_audio_disconnect'); - late final _bt_audio_disconnect = _bt_audio_disconnectPtr - .asFunction, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE - /// @brief Registers a callback function that will be invoked when the connection state is changed. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth audio service must be initialized with bt_audio_initialize(). - /// @see bt_audio_initialize() - /// @see bt_audio_connection_state_changed_cb() - int bt_audio_set_connection_state_changed_cb( - bt_audio_connection_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_audio_set_connection_state_changed_cb( - callback, - user_data, - ); - } - - late final _bt_audio_set_connection_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_audio_connection_state_changed_cb, - ffi.Pointer)>>( - 'bt_audio_set_connection_state_changed_cb'); - late final _bt_audio_set_connection_state_changed_cb = - _bt_audio_set_connection_state_changed_cbPtr.asFunction< - int Function( - bt_audio_connection_state_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE - /// @brief Unregisters a callback function that will be invoked when the connection state is changed. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth audio service must be initialized with bt_audio_initialize(). - /// @see bt_audio_initialize() - /// @see bt_audio_connection_state_changed_cb() - /// @see bt_audio_set_connection_state_changed_cb() - int bt_audio_unset_connection_state_changed_cb() { - return _bt_audio_unset_connection_state_changed_cb(); - } - - late final _bt_audio_unset_connection_state_changed_cbPtr = - _lookup>( - 'bt_audio_unset_connection_state_changed_cb'); - late final _bt_audio_unset_connection_state_changed_cb = - _bt_audio_unset_connection_state_changed_cbPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_TARGET_MODULE - /// @brief Initializes the Bluetooth AVRCP (Audio/Video Remote Control Profile) target service. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @remarks This function must be called before any other AVRCP target functions are called. \n - /// You must free all resources of the this service by calling bt_avrcp_target_deinitialize() \n - /// if Bluetooth AVRCP service is no longer needed. - /// @param[in] callback The callback function called when the connection state is changed - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_avrcp_target_deinitialize() - int bt_avrcp_target_initialize( - bt_avrcp_target_connection_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_avrcp_target_initialize( - callback, - user_data, - ); - } - - late final _bt_avrcp_target_initializePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_avrcp_target_connection_state_changed_cb, - ffi.Pointer)>>('bt_avrcp_target_initialize'); - late final _bt_avrcp_target_initialize = - _bt_avrcp_target_initializePtr.asFunction< - int Function(bt_avrcp_target_connection_state_changed_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_TARGET_MODULE - /// @brief Deinitializes the Bluetooth AVRCP (Audio/Video Remote Control Profile) target service. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth audio service must be initialized with bt_avrcp_target_initialize(). - /// @see bt_avrcp_target_initialize() - int bt_avrcp_target_deinitialize() { - return _bt_avrcp_target_deinitialize(); - } - - late final _bt_avrcp_target_deinitializePtr = - _lookup>( - 'bt_avrcp_target_deinitialize'); - late final _bt_avrcp_target_deinitialize = - _bt_avrcp_target_deinitializePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_TARGET_MODULE - /// @brief Notifies the equalizer state to the remote device. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] state The state of equalizer - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_target_notify_equalizer_state( - int state, - ) { - return _bt_avrcp_target_notify_equalizer_state( - state, - ); - } - - late final _bt_avrcp_target_notify_equalizer_statePtr = - _lookup>( - 'bt_avrcp_target_notify_equalizer_state'); - late final _bt_avrcp_target_notify_equalizer_state = - _bt_avrcp_target_notify_equalizer_statePtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_TARGET_MODULE - /// @brief Notifies the repeat mode to the remote device. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] mode The repeat mode - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_target_notify_repeat_mode( - int mode, - ) { - return _bt_avrcp_target_notify_repeat_mode( - mode, - ); - } - - late final _bt_avrcp_target_notify_repeat_modePtr = - _lookup>( - 'bt_avrcp_target_notify_repeat_mode'); - late final _bt_avrcp_target_notify_repeat_mode = - _bt_avrcp_target_notify_repeat_modePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_TARGET_MODULE - /// @brief Notifies the shuffle mode to the remote device. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] mode The repeat mode - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_target_notify_shuffle_mode( - int mode, - ) { - return _bt_avrcp_target_notify_shuffle_mode( - mode, - ); - } - - late final _bt_avrcp_target_notify_shuffle_modePtr = - _lookup>( - 'bt_avrcp_target_notify_shuffle_mode'); - late final _bt_avrcp_target_notify_shuffle_mode = - _bt_avrcp_target_notify_shuffle_modePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_TARGET_MODULE - /// @brief Notifies the scan mode to the remote device. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] mode The scan mode - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_target_notify_scan_mode( - int mode, - ) { - return _bt_avrcp_target_notify_scan_mode( - mode, - ); - } - - late final _bt_avrcp_target_notify_scan_modePtr = - _lookup>( - 'bt_avrcp_target_notify_scan_mode'); - late final _bt_avrcp_target_notify_scan_mode = - _bt_avrcp_target_notify_scan_modePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_TARGET_MODULE - /// @brief Notifies the player state to the remote device. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] state The player state - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_target_notify_player_state( - int state, - ) { - return _bt_avrcp_target_notify_player_state( - state, - ); - } - - late final _bt_avrcp_target_notify_player_statePtr = - _lookup>( - 'bt_avrcp_target_notify_player_state'); - late final _bt_avrcp_target_notify_player_state = - _bt_avrcp_target_notify_player_statePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_TARGET_MODULE - /// @brief Notifies the current position of song to the remote device. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] position The current position in milliseconds - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_target_notify_position( - int position, - ) { - return _bt_avrcp_target_notify_position( - position, - ); - } - - late final _bt_avrcp_target_notify_positionPtr = - _lookup>( - 'bt_avrcp_target_notify_position'); - late final _bt_avrcp_target_notify_position = - _bt_avrcp_target_notify_positionPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_TARGET_MODULE - /// @brief Notifies the track to the remote device. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] title The title of track - /// @param[in] artist The artist of track - /// @param[in] album The album of track - /// @param[in] genre The genre of track - /// @param[in] track_num The track number - /// @param[in] total_tracks The number of all tracks - /// @param[in] duration The duration of track in milliseconds - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_target_notify_track( - ffi.Pointer title, - ffi.Pointer artist, - ffi.Pointer album, - ffi.Pointer genre, - int track_num, - int total_tracks, - int duration, - ) { - return _bt_avrcp_target_notify_track( - title, - artist, - album, - genre, - track_num, - total_tracks, - duration, - ); - } - - late final _bt_avrcp_target_notify_trackPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.UnsignedInt, - ffi.UnsignedInt)>>('bt_avrcp_target_notify_track'); - late final _bt_avrcp_target_notify_track = - _bt_avrcp_target_notify_trackPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, int, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Registers a callback function that will be invoked when the equalizer state is changed. (e.g., by a TV remote control or other input devices). - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_unset_equalizer_state_changed_cb() - int bt_avrcp_set_equalizer_state_changed_cb( - bt_avrcp_equalizer_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_avrcp_set_equalizer_state_changed_cb( - callback, - user_data, - ); - } - - late final _bt_avrcp_set_equalizer_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_avrcp_equalizer_state_changed_cb, ffi.Pointer)>>( - 'bt_avrcp_set_equalizer_state_changed_cb'); - late final _bt_avrcp_set_equalizer_state_changed_cb = - _bt_avrcp_set_equalizer_state_changed_cbPtr.asFunction< - int Function( - bt_avrcp_equalizer_state_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Unregisters a callback function that will be invoked when the equalizer state is changed. (e.g., by a TV remote control or other input devices). - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_set_equalizer_state_changed_cb() - int bt_avrcp_unset_equalizer_state_changed_cb() { - return _bt_avrcp_unset_equalizer_state_changed_cb(); - } - - late final _bt_avrcp_unset_equalizer_state_changed_cbPtr = - _lookup>( - 'bt_avrcp_unset_equalizer_state_changed_cb'); - late final _bt_avrcp_unset_equalizer_state_changed_cb = - _bt_avrcp_unset_equalizer_state_changed_cbPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Registers a callback function that will be invoked when the repeat mode is changed. (e.g., by a TV remote control or other input devices). - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_unset_repeat_mode_changed_cb() - int bt_avrcp_set_repeat_mode_changed_cb( - bt_avrcp_repeat_mode_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_avrcp_set_repeat_mode_changed_cb( - callback, - user_data, - ); - } - - late final _bt_avrcp_set_repeat_mode_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_avrcp_repeat_mode_changed_cb, - ffi.Pointer)>>('bt_avrcp_set_repeat_mode_changed_cb'); - late final _bt_avrcp_set_repeat_mode_changed_cb = - _bt_avrcp_set_repeat_mode_changed_cbPtr.asFunction< - int Function( - bt_avrcp_repeat_mode_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Unregisters a callback function that will be invoked when the repeat mode is changed. (e.g., by a TV remote control or other input devices). - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_set_repeat_mode_changed_cb() - int bt_avrcp_unset_repeat_mode_changed_cb() { - return _bt_avrcp_unset_repeat_mode_changed_cb(); - } - - late final _bt_avrcp_unset_repeat_mode_changed_cbPtr = - _lookup>( - 'bt_avrcp_unset_repeat_mode_changed_cb'); - late final _bt_avrcp_unset_repeat_mode_changed_cb = - _bt_avrcp_unset_repeat_mode_changed_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Registers a callback function that will be invoked when the shuffle mode is changed. (e.g., by a TV remote control or other input devices). - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_unset_shuffle_mode_changed_cb() - int bt_avrcp_set_shuffle_mode_changed_cb( - bt_avrcp_shuffle_mode_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_avrcp_set_shuffle_mode_changed_cb( - callback, - user_data, - ); - } - - late final _bt_avrcp_set_shuffle_mode_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_avrcp_shuffle_mode_changed_cb, - ffi.Pointer)>>('bt_avrcp_set_shuffle_mode_changed_cb'); - late final _bt_avrcp_set_shuffle_mode_changed_cb = - _bt_avrcp_set_shuffle_mode_changed_cbPtr.asFunction< - int Function( - bt_avrcp_shuffle_mode_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Unregisters a callback function that will be invoked when the shuffle mode is changed. (e.g., by a TV remote control or other input devices). - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_set_shuffle_mode_changed_cb() - int bt_avrcp_unset_shuffle_mode_changed_cb() { - return _bt_avrcp_unset_shuffle_mode_changed_cb(); - } - - late final _bt_avrcp_unset_shuffle_mode_changed_cbPtr = - _lookup>( - 'bt_avrcp_unset_shuffle_mode_changed_cb'); - late final _bt_avrcp_unset_shuffle_mode_changed_cb = - _bt_avrcp_unset_shuffle_mode_changed_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Registers a callback function that will be invoked when the scan mode is changed. (e.g., by a TV remote control or other input devices). - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_unset_scan_mode_changed_cb() - int bt_avrcp_set_scan_mode_changed_cb( - bt_avrcp_scan_mode_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_avrcp_set_scan_mode_changed_cb( - callback, - user_data, - ); - } - - late final _bt_avrcp_set_scan_mode_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_avrcp_scan_mode_changed_cb, - ffi.Pointer)>>('bt_avrcp_set_scan_mode_changed_cb'); - late final _bt_avrcp_set_scan_mode_changed_cb = - _bt_avrcp_set_scan_mode_changed_cbPtr.asFunction< - int Function(bt_avrcp_scan_mode_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Unregisters a callback function that will be invoked when the scan mode is changed. (e.g., by a TV remote control or other input devices). - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_set_scan_mode_changed_cb() - int bt_avrcp_unset_scan_mode_changed_cb() { - return _bt_avrcp_unset_scan_mode_changed_cb(); - } - - late final _bt_avrcp_unset_scan_mode_changed_cbPtr = - _lookup>( - 'bt_avrcp_unset_scan_mode_changed_cb'); - late final _bt_avrcp_unset_scan_mode_changed_cb = - _bt_avrcp_unset_scan_mode_changed_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Registers a callback function that will be invoked when the song position is changed. (e.g., by a TV remote control or other input devices). - /// @since_tizen 3.0 - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_set_position_changed_cb() - int bt_avrcp_set_position_changed_cb( - bt_avrcp_position_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_avrcp_set_position_changed_cb( - callback, - user_data, - ); - } - - late final _bt_avrcp_set_position_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_avrcp_position_changed_cb, - ffi.Pointer)>>('bt_avrcp_set_position_changed_cb'); - late final _bt_avrcp_set_position_changed_cb = - _bt_avrcp_set_position_changed_cbPtr.asFunction< - int Function(bt_avrcp_position_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Unregisters a callback function that will be invoked when the song position is changed. (e.g., by a TV remote control or other input devices). - /// @since_tizen 3.0 - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_set_position_changed_cb() - int bt_avrcp_unset_position_changed_cb() { - return _bt_avrcp_unset_position_changed_cb(); - } - - late final _bt_avrcp_unset_position_changed_cbPtr = - _lookup>( - 'bt_avrcp_unset_position_changed_cb'); - late final _bt_avrcp_unset_position_changed_cb = - _bt_avrcp_unset_position_changed_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Registers a callback function that will be invoked when the Play status is changed. (e.g., by a TV remote control or other input devices). - /// @since_tizen 3.0 - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_unset_play_status_changed_cb() - int bt_avrcp_set_play_status_changed_cb( - bt_avrcp_play_status_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_avrcp_set_play_status_changed_cb( - callback, - user_data, - ); - } - - late final _bt_avrcp_set_play_status_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_avrcp_play_status_changed_cb, - ffi.Pointer)>>('bt_avrcp_set_play_status_changed_cb'); - late final _bt_avrcp_set_play_status_changed_cb = - _bt_avrcp_set_play_status_changed_cbPtr.asFunction< - int Function( - bt_avrcp_play_status_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Unregisters a callback function that will be invoked when the Play status is changed. (e.g., by a TV remote control or other input devices). - /// @since_tizen 3.0 - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_unset_play_status_changed_cb() - int bt_avrcp_unset_play_status_changed_cb() { - return _bt_avrcp_unset_play_status_changed_cb(); - } - - late final _bt_avrcp_unset_play_status_changed_cbPtr = - _lookup>( - 'bt_avrcp_unset_play_status_changed_cb'); - late final _bt_avrcp_unset_play_status_changed_cb = - _bt_avrcp_unset_play_status_changed_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Registers a callback function that will be invoked when the track metadata is changed. (e.g., by a TV remote control or other input devices). - /// @since_tizen 3.0 - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_unset_track_info_changed_cb() - int bt_avrcp_set_track_info_changed_cb( - bt_avrcp_track_info_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_avrcp_set_track_info_changed_cb( - callback, - user_data, - ); - } - - late final _bt_avrcp_set_track_info_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_avrcp_track_info_changed_cb, - ffi.Pointer)>>('bt_avrcp_set_track_info_changed_cb'); - late final _bt_avrcp_set_track_info_changed_cb = - _bt_avrcp_set_track_info_changed_cbPtr.asFunction< - int Function( - bt_avrcp_track_info_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE - /// @brief Unregisters a callback function that will be invoked when the track metadata is changed. (e.g., by a TV remote control or other input devices). - /// @since_tizen 3.0 - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize(). - /// @see bt_avrcp_target_initialize() - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_set_track_info_changed_cb() - int bt_avrcp_unset_track_info_changed_cb() { - return _bt_avrcp_unset_track_info_changed_cb(); - } - - late final _bt_avrcp_unset_track_info_changed_cbPtr = - _lookup>( - 'bt_avrcp_unset_track_info_changed_cb'); - late final _bt_avrcp_unset_track_info_changed_cb = - _bt_avrcp_unset_track_info_changed_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Initializes the Bluetooth AVRCP (Audio/Video Remote Control Profile) controller service. - /// @since_tizen 3.0 - /// @remarks This function must be called before any other AVRCP controller functions are called. \n - /// You must free all resources of the this service by calling bt_avrcp_control_deinitialize() \n - /// if Bluetooth AVRCP service is no longer needed. - /// @param[in] callback The callback function called when the connection state is changed - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_avrcp_control_deinitialize() - int bt_avrcp_control_initialize( - bt_avrcp_control_connection_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_avrcp_control_initialize( - callback, - user_data, - ); - } - - late final _bt_avrcp_control_initializePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_avrcp_control_connection_state_changed_cb, - ffi.Pointer)>>('bt_avrcp_control_initialize'); - late final _bt_avrcp_control_initialize = - _bt_avrcp_control_initializePtr.asFunction< - int Function(bt_avrcp_control_connection_state_changed_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Deinitializes the Bluetooth AVRCP (Audio/Video Remote Control Profile) controller service. - /// @since_tizen 3.0 - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// @pre The Bluetooth audio service must be initialized with bt_avrcp_control_initialize(). - /// @see bt_avrcp_control_initialize() - int bt_avrcp_control_deinitialize() { - return _bt_avrcp_control_deinitialize(); - } - - late final _bt_avrcp_control_deinitializePtr = - _lookup>( - 'bt_avrcp_control_deinitialize'); - late final _bt_avrcp_control_deinitialize = - _bt_avrcp_control_deinitializePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Connects the AVRCP (Audio/Video Remote Control Profile) target device. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] remote_address The remote address - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The Bluetooth audio service must be initialized with bt_avrcp_control_initialize(). - /// @see bt_avrcp_control_initialize() - int bt_avrcp_control_connect( - ffi.Pointer remote_address, - ) { - return _bt_avrcp_control_connect( - remote_address, - ); - } - - late final _bt_avrcp_control_connectPtr = - _lookup)>>( - 'bt_avrcp_control_connect'); - late final _bt_avrcp_control_connect = _bt_avrcp_control_connectPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Disconnects from the AVRCP (Audio/Video Remote Control Profile) target device. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] remote_address The remote address - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The Bluetooth audio service must be initialized with bt_avrcp_control_initialize(). - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_control_connect() - int bt_avrcp_control_disconnect( - ffi.Pointer remote_address, - ) { - return _bt_avrcp_control_disconnect( - remote_address, - ); - } - - late final _bt_avrcp_control_disconnectPtr = - _lookup)>>( - 'bt_avrcp_control_disconnect'); - late final _bt_avrcp_control_disconnect = _bt_avrcp_control_disconnectPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Sends a command to the target device. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] cmd The commands, one of: Play, Pause, Next, Rewind. - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// @pre The Bluetooth audio service must be initialized with bt_avrcp_control_initialize(). - /// @see bt_avrcp_control_initialize() - /// @see bt_avrcp_control_connect() - int bt_avrcp_control_send_player_command( - int cmd, - ) { - return _bt_avrcp_control_send_player_command( - cmd, - ); - } - - late final _bt_avrcp_control_send_player_commandPtr = - _lookup>( - 'bt_avrcp_control_send_player_command'); - late final _bt_avrcp_control_send_player_command = - _bt_avrcp_control_send_player_commandPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Sends the equalizer state change request to the remote device. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] state The new equalizer state, one of: ON, OFF - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_control_set_equalizer_state( - int state, - ) { - return _bt_avrcp_control_set_equalizer_state( - state, - ); - } - - late final _bt_avrcp_control_set_equalizer_statePtr = - _lookup>( - 'bt_avrcp_control_set_equalizer_state'); - late final _bt_avrcp_control_set_equalizer_state = - _bt_avrcp_control_set_equalizer_statePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Gets the the equalizer state of the remote device. - /// @since_tizen 3.0 - /// @param[out] state The equalizer state, one of: ON, OFF - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_control_get_equalizer_state( - ffi.Pointer state, - ) { - return _bt_avrcp_control_get_equalizer_state( - state, - ); - } - - late final _bt_avrcp_control_get_equalizer_statePtr = - _lookup)>>( - 'bt_avrcp_control_get_equalizer_state'); - late final _bt_avrcp_control_get_equalizer_state = - _bt_avrcp_control_get_equalizer_statePtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Sends the repeat change request to the remote device. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] mode The new repeat mode, one of: OFF, SINGLE, ALL - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_control_set_repeat_mode( - int mode, - ) { - return _bt_avrcp_control_set_repeat_mode( - mode, - ); - } - - late final _bt_avrcp_control_set_repeat_modePtr = - _lookup>( - 'bt_avrcp_control_set_repeat_mode'); - late final _bt_avrcp_control_set_repeat_mode = - _bt_avrcp_control_set_repeat_modePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Gets the repeat state of the remote device. - /// @since_tizen 3.0 - /// @param[out] mode The repeat mode, one of: OFF, SINGLE, ALL - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_control_get_repeat_mode( - ffi.Pointer mode, - ) { - return _bt_avrcp_control_get_repeat_mode( - mode, - ); - } - - late final _bt_avrcp_control_get_repeat_modePtr = - _lookup)>>( - 'bt_avrcp_control_get_repeat_mode'); - late final _bt_avrcp_control_get_repeat_mode = - _bt_avrcp_control_get_repeat_modePtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Sends the shuffle mode change request to the remote device. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] mode The new shuffle mode, one of: OFF, GROUP, ALL - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_control_set_shuffle_mode( - int mode, - ) { - return _bt_avrcp_control_set_shuffle_mode( - mode, - ); - } - - late final _bt_avrcp_control_set_shuffle_modePtr = - _lookup>( - 'bt_avrcp_control_set_shuffle_mode'); - late final _bt_avrcp_control_set_shuffle_mode = - _bt_avrcp_control_set_shuffle_modePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Gets the shuffle mode of the remote device. - /// @since_tizen 3.0 - /// @param[out] mode The shuffle mode, one of: OFF, GROUP, ALL - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_control_get_shuffle_mode( - ffi.Pointer mode, - ) { - return _bt_avrcp_control_get_shuffle_mode( - mode, - ); - } - - late final _bt_avrcp_control_get_shuffle_modePtr = - _lookup)>>( - 'bt_avrcp_control_get_shuffle_mode'); - late final _bt_avrcp_control_get_shuffle_mode = - _bt_avrcp_control_get_shuffle_modePtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Sends the scan mode change request to the remote device. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @param[in] mode The new scan mode, one of: OFF, GROUP, ALL - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_control_set_scan_mode( - int mode, - ) { - return _bt_avrcp_control_set_scan_mode( - mode, - ); - } - - late final _bt_avrcp_control_set_scan_modePtr = - _lookup>( - 'bt_avrcp_control_set_scan_mode'); - late final _bt_avrcp_control_set_scan_mode = - _bt_avrcp_control_set_scan_modePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Gets the scan mode of the remote device. - /// @since_tizen 3.0 - /// @param[out] mode The scan mode, one of: OFF, GROUP, ALL - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_control_get_scan_mode( - ffi.Pointer mode, - ) { - return _bt_avrcp_control_get_scan_mode( - mode, - ); - } - - late final _bt_avrcp_control_get_scan_modePtr = - _lookup)>>( - 'bt_avrcp_control_get_scan_mode'); - late final _bt_avrcp_control_get_scan_mode = - _bt_avrcp_control_get_scan_modePtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Gets the position of the song played by the remote device. - /// @since_tizen 3.0 - /// @param[out] position The position, in milliseconds - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_control_get_position( - ffi.Pointer position, - ) { - return _bt_avrcp_control_get_position( - position, - ); - } - - late final _bt_avrcp_control_get_positionPtr = _lookup< - ffi.NativeFunction)>>( - 'bt_avrcp_control_get_position'); - late final _bt_avrcp_control_get_position = _bt_avrcp_control_get_positionPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Gets the play status of the remote device. - /// @since_tizen 3.0 - /// @param[out] status The play status, one of: PLAYING, STOPPED... - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_control_get_play_status( - ffi.Pointer status, - ) { - return _bt_avrcp_control_get_play_status( - status, - ); - } - - late final _bt_avrcp_control_get_play_statusPtr = - _lookup)>>( - 'bt_avrcp_control_get_play_status'); - late final _bt_avrcp_control_get_play_status = - _bt_avrcp_control_get_play_statusPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Gets the metadata of the track played by the remote device. - /// @since_tizen 3.0 - /// @remarks The @a track must be released using bt_avrcp_control_free_track_info(). - /// @param[out] track The track metadata. - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_avrcp_target_connection_state_changed_cb() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_control_get_track_info( - ffi.Pointer> track, - ) { - return _bt_avrcp_control_get_track_info( - track, - ); - } - - late final _bt_avrcp_control_get_track_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer< - ffi.Pointer>)>>( - 'bt_avrcp_control_get_track_info'); - late final _bt_avrcp_control_get_track_info = - _bt_avrcp_control_get_track_infoPtr.asFunction< - int Function( - ffi.Pointer>)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_CONTROL_MODULE - /// @brief Frees the track metadata. - /// @since_tizen 3.0 - /// @param[in] track The track metadata. - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// @pre track should point to valid metadata address. - /// @see bt_avrcp_control_get_track_info() - /// @see bt_avrcp_target_initialize() - int bt_avrcp_control_free_track_info( - ffi.Pointer track, - ) { - return _bt_avrcp_control_free_track_info( - track, - ); - } - - late final _bt_avrcp_control_free_track_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer)>>( - 'bt_avrcp_control_free_track_info'); - late final _bt_avrcp_control_free_track_info = - _bt_avrcp_control_free_track_infoPtr.asFunction< - int Function(ffi.Pointer)>(); - - /// @deprecated Deprecated since 5.0. - /// @ingroup CAPI_NETWORK_BLUETOOTH_HDP_MODULE - /// @brief Registers an application that acts as the Sink role of HDP (Health Device Profile). - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @remarks The @a app_id must be released with free() by you. \n - /// Deprecated, because of no usecase and supported devices. - /// @param[in] data_type The data type of MDEP. This value is defined in ISO/IEEE 11073-20601 spec. - /// For example, pulse oximeter is 0x1004 and blood pressure monitor is 0x1007. - /// @param[out] app_id The ID of application - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @see bt_hdp_unregister_sink_app() - int bt_hdp_register_sink_app( - int data_type, - ffi.Pointer> app_id, - ) { - return _bt_hdp_register_sink_app( - data_type, - app_id, - ); - } - - late final _bt_hdp_register_sink_appPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.UnsignedShort, - ffi.Pointer>)>>('bt_hdp_register_sink_app'); - late final _bt_hdp_register_sink_app = _bt_hdp_register_sink_appPtr - .asFunction>)>(); - - /// @deprecated Deprecated since 5.0. - /// @ingroup CAPI_NETWORK_BLUETOOTH_HDP_MODULE - /// @brief Unregisters the given application that acts as the Sink role of HDP (Health Device Profile). - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @remarks Deprecated, because of no usecase and supported devices. - /// @param[in] app_id The ID of application - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_hdp_register_sink_app() - int bt_hdp_unregister_sink_app( - ffi.Pointer app_id, - ) { - return _bt_hdp_unregister_sink_app( - app_id, - ); - } - - late final _bt_hdp_unregister_sink_appPtr = - _lookup)>>( - 'bt_hdp_unregister_sink_app'); - late final _bt_hdp_unregister_sink_app = _bt_hdp_unregister_sink_appPtr - .asFunction)>(); - - /// @deprecated Deprecated since 5.0. - /// @ingroup CAPI_NETWORK_BLUETOOTH_HDP_MODULE - /// @brief Connects the remote device which acts as Source role, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @remarks Deprecated, because of no usecase and supported devices. - /// @param[in] remote_address The remote address - /// @param[in] app_id The ID of application - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Sink role of HDP must be registered with bt_hdp_register_sink_app(). - /// @pre The local device must be bonded with the remote device by bt_device_create_bond(). - /// @post bt_hdp_connected_cb() will be invoked. - /// @see bt_hdp_disconnect() - /// @see bt_hdp_set_connection_state_changed_cb() - /// @see bt_hdp_unset_connection_state_changed_cb() - int bt_hdp_connect_to_source( - ffi.Pointer remote_address, - ffi.Pointer app_id, - ) { - return _bt_hdp_connect_to_source( - remote_address, - app_id, - ); - } - - late final _bt_hdp_connect_to_sourcePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('bt_hdp_connect_to_source'); - late final _bt_hdp_connect_to_source = _bt_hdp_connect_to_sourcePtr - .asFunction, ffi.Pointer)>(); - - /// @deprecated Deprecated since 5.0. - /// @ingroup CAPI_NETWORK_BLUETOOTH_HDP_MODULE - /// @brief Disconnects the remote device, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @remarks Deprecated, because of no usecase and supported devices. - /// @param[in] remote_address The remote address - /// @param[in] channel The connected data channel - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED Remote device is not connected - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @post bt_hdp_disconnected_cb() will be invoked. - /// @see bt_hdp_set_connection_state_changed_cb() - /// @see bt_hdp_unset_connection_state_changed_cb() - int bt_hdp_disconnect( - ffi.Pointer remote_address, - int channel, - ) { - return _bt_hdp_disconnect( - remote_address, - channel, - ); - } - - late final _bt_hdp_disconnectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.UnsignedInt)>>('bt_hdp_disconnect'); - late final _bt_hdp_disconnect = _bt_hdp_disconnectPtr - .asFunction, int)>(); - - /// @deprecated Deprecated since 5.0. - /// @ingroup CAPI_NETWORK_BLUETOOTH_HDP_MODULE - /// @brief Sends the data to the remote device. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// @remarks Deprecated, because of no usecase and supported devices. - /// @param[in] channel The connected data channel - /// @param[in] data The data to send - /// @param[in] size The size of data to send (byte) - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The remote device must be connected. - /// @see bt_hdp_data_received_cb() - /// @see bt_hdp_set_data_received_cb() - /// @see bt_hdp_unset_data_received_cb() - int bt_hdp_send_data( - int channel, - ffi.Pointer data, - int size, - ) { - return _bt_hdp_send_data( - channel, - data, - size, - ); - } - - late final _bt_hdp_send_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.UnsignedInt, ffi.Pointer, - ffi.UnsignedInt)>>('bt_hdp_send_data'); - late final _bt_hdp_send_data = _bt_hdp_send_dataPtr - .asFunction, int)>(); - - /// @deprecated Deprecated since 5.0. - /// @ingroup CAPI_NETWORK_BLUETOOTH_HDP_MODULE - /// @brief Registers a callback function that will be invoked when the connection state is changed. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks Deprecated, because of no usecase and supported devices. - /// @param[in] connected_cb The callback function called when a connection is established - /// @param[in] disconnected_cb The callback function called when a connection is disconnected - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_hdp_unset_connection_state_changed_cb() - int bt_hdp_set_connection_state_changed_cb( - bt_hdp_connected_cb connected_cb, - bt_hdp_disconnected_cb disconnected_cb, - ffi.Pointer user_data, - ) { - return _bt_hdp_set_connection_state_changed_cb( - connected_cb, - disconnected_cb, - user_data, - ); - } - - late final _bt_hdp_set_connection_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_hdp_connected_cb, bt_hdp_disconnected_cb, - ffi.Pointer)>>( - 'bt_hdp_set_connection_state_changed_cb'); - late final _bt_hdp_set_connection_state_changed_cb = - _bt_hdp_set_connection_state_changed_cbPtr.asFunction< - int Function(bt_hdp_connected_cb, bt_hdp_disconnected_cb, - ffi.Pointer)>(); - - /// @deprecated Deprecated since 5.0. - /// @ingroup CAPI_NETWORK_BLUETOOTH_HDP_MODULE - /// @brief Unregisters a callback function that will be invoked when the connection state is changed. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks Deprecated, because of no usecase and supported devices. - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_hdp_set_connection_state_changed_cb() - int bt_hdp_unset_connection_state_changed_cb() { - return _bt_hdp_unset_connection_state_changed_cb(); - } - - late final _bt_hdp_unset_connection_state_changed_cbPtr = - _lookup>( - 'bt_hdp_unset_connection_state_changed_cb'); - late final _bt_hdp_unset_connection_state_changed_cb = - _bt_hdp_unset_connection_state_changed_cbPtr.asFunction(); - - /// @deprecated Deprecated since 5.0. - /// @ingroup CAPI_NETWORK_BLUETOOTH_HDP_MODULE - /// @brief Registers a callback function that will be invoked when you receive the data. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks Deprecated, because of no usecase and supported devices. - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_hdp_unset_data_received_cb() - int bt_hdp_set_data_received_cb( - bt_hdp_data_received_cb callback, - ffi.Pointer user_data, - ) { - return _bt_hdp_set_data_received_cb( - callback, - user_data, - ); - } - - late final _bt_hdp_set_data_received_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_hdp_data_received_cb, - ffi.Pointer)>>('bt_hdp_set_data_received_cb'); - late final _bt_hdp_set_data_received_cb = - _bt_hdp_set_data_received_cbPtr.asFunction< - int Function(bt_hdp_data_received_cb, ffi.Pointer)>(); - - /// @deprecated Deprecated since 5.0. - /// @ingroup CAPI_NETWORK_BLUETOOTH_HDP_MODULE - /// @brief Unregisters a callback function that will be invoked when you receive the data. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @remarks Deprecated, because of no usecase and supported devices. - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_hdp_set_data_received_cb() - int bt_hdp_unset_data_received_cb() { - return _bt_hdp_unset_data_received_cb(); - } - - late final _bt_hdp_unset_data_received_cbPtr = - _lookup>( - 'bt_hdp_unset_data_received_cb'); - late final _bt_hdp_unset_data_received_cb = - _bt_hdp_unset_data_received_cbPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets the value of a characteristic or descriptor's GATT handle. - /// @since_tizen 2.3.1 - /// - /// @remarks @a value must be released using free(). \n - /// When @a gatt_handle is associated with bt_gatt_client_h, bt_gatt_client_read_value() must be used prior to this function \n - /// in order to get the remote device's current value. - /// - /// @param[in] gatt_handle The handle of a characteristic or descriptor - /// @param[out] value The value of @a gatt_handle. It is a byte stream type. - /// @param[out] value_length The length of @a value - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_get_value( - bt_gatt_h gatt_handle, - ffi.Pointer> value, - ffi.Pointer value_length, - ) { - return _bt_gatt_get_value( - gatt_handle, - value, - value_length, - ); - } - - late final _bt_gatt_get_valuePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_h, ffi.Pointer>, - ffi.Pointer)>>('bt_gatt_get_value'); - late final _bt_gatt_get_value = _bt_gatt_get_valuePtr.asFunction< - int Function(bt_gatt_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets the value of a characteristic or descriptor's GATT handle as an integer type. - /// @since_tizen 2.3.1 - /// - /// @remarks This function returns a locally saved value in @a gatt_handle. \n - /// When @a gatt_handle is associated with bt_gatt_client_h, bt_gatt_client_read_value() must be used prior to this function \n - /// in order to get the remote device's current value. - /// - /// @param[in] gatt_handle The handle of a characteristic or descriptor - /// @param[in] type The type of a saved value in @a gatt_handle - /// @param[in] offset The offset from where a value will be read from @a gatt_handle as an integer type - /// @param[out] value The integer type's value of @a gatt_handle - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_get_int_value( - bt_gatt_h gatt_handle, - int type, - int offset, - ffi.Pointer value, - ) { - return _bt_gatt_get_int_value( - gatt_handle, - type, - offset, - value, - ); - } - - late final _bt_gatt_get_int_valuePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_h, ffi.Int32, ffi.Int, - ffi.Pointer)>>('bt_gatt_get_int_value'); - late final _bt_gatt_get_int_value = _bt_gatt_get_int_valuePtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets the value of a characteristic or descriptor's GATT handle as a float type. - /// @since_tizen 2.3.1 - /// - /// @remarks This function returns a locally saved value in @a gatt_handle. \n - /// When @a gatt_handle is associated with bt_gatt_client_h, bt_gatt_client_read_value() must be used prior to this function \n - /// in order to get the remote device's current value. - /// - /// @param[in] gatt_handle The handle of a characteristic or descriptor - /// @param[in] type The type of a saved value in @a gatt_handle - /// @param[in] offset The offset from where a value will be read from @a gatt_handle as an integer type - /// @param[out] value The float type's value of @a gatt_handle - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_get_float_value( - bt_gatt_h gatt_handle, - int type, - int offset, - ffi.Pointer value, - ) { - return _bt_gatt_get_float_value( - gatt_handle, - type, - offset, - value, - ); - } - - late final _bt_gatt_get_float_valuePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_h, ffi.Int32, ffi.Int, - ffi.Pointer)>>('bt_gatt_get_float_value'); - late final _bt_gatt_get_float_value = _bt_gatt_get_float_valuePtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Updates the value of a characteristic or descriptor's GATT handle. - /// @since_tizen 2.3.1 - /// - /// @remarks This function updates a value of @a gatt_handle locally. \n - /// When @a gatt_handle is associated with bt_gatt_client_h, bt_gatt_client_write_value() can be used after this function \n - /// in order to update the remote device's value. \n - /// - /// @param[in] gatt_handle The handle of a characteristic or descriptor - /// @param[in] value The value to be updated - /// @param[in] value_length The length of @a value - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_set_value( - bt_gatt_h gatt_handle, - ffi.Pointer value, - int value_length, - ) { - return _bt_gatt_set_value( - gatt_handle, - value, - value_length, - ); - } - - late final _bt_gatt_set_valuePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_h, ffi.Pointer, ffi.Int)>>('bt_gatt_set_value'); - late final _bt_gatt_set_value = _bt_gatt_set_valuePtr - .asFunction, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Updates the value of a characteristic or descriptor's GATT handle using a integer type's value. - /// @since_tizen 2.3.1 - /// - /// @remarks This function updates a value of @a gatt_handle locally. \n - /// When @a gatt_handle is associated with bt_gatt_client_h, bt_gatt_client_write_value() can be used after this function \n - /// in order to update the remote device's value. - /// - /// @param[in] gatt_handle The handle of a characteristic or descriptor - /// @param[in] type @a value will be saved in @a gatt_handle as this type - /// @param[in] value The integer type's value to be updated - /// @param[in] offset The offset from where @a value will be saved in @a gatt_handle - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_set_int_value( - bt_gatt_h gatt_handle, - int type, - int value, - int offset, - ) { - return _bt_gatt_set_int_value( - gatt_handle, - type, - value, - offset, - ); - } - - late final _bt_gatt_set_int_valuePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_h, ffi.Int32, ffi.Int, - ffi.Int)>>('bt_gatt_set_int_value'); - late final _bt_gatt_set_int_value = _bt_gatt_set_int_valuePtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Updates the value of a characteristic or descriptor's GATT handle using a float type's value. - /// @since_tizen 2.3.1 - /// - /// @remarks This function updates a value of @a gatt_handle locally. \n - /// When @a gatt_handle is associated with bt_gatt_client_h, bt_gatt_client_write_value() can be used after this function \n - /// in order to update the remote device's value. - /// - /// @param[in] gatt_handle The handle of a characteristic or descriptor - /// @param[in] type @a mantissa and @a exponent will be saved in @a gatt_handle as this type - /// @param[in] mantissa The mantissa of float type's value to be updated - /// @param[in] exponent The exponent of float type's value to be updated - /// @param[in] offset The offset from where @a mantissa and @a exponent will be saved in @a gatt_handle - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_set_float_value( - bt_gatt_h gatt_handle, - int type, - int mantissa, - int exponent, - int offset, - ) { - return _bt_gatt_set_float_value( - gatt_handle, - type, - mantissa, - exponent, - offset, - ); - } - - late final _bt_gatt_set_float_valuePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_h, ffi.Int32, ffi.Int, ffi.Int, - ffi.Int)>>('bt_gatt_set_float_value'); - late final _bt_gatt_set_float_value = _bt_gatt_set_float_valuePtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets the UUID of a service, characteristic or descriptor's GATT handle. - /// @since_tizen 2.3.1 - /// - /// @remarks @a uuid must be released using free(). \n - /// 16-bit UUID or 128-bit UUID is supported. (e.g. 2A19, 00002A19-0000-1000-8000-00805F9B34FB). - /// - /// @param[in] gatt_handle The handle of a service, characteristic or descriptor - /// @param[out] uuid The string of the UUID of @a gatt_handle - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_get_uuid( - bt_gatt_h gatt_handle, - ffi.Pointer> uuid, - ) { - return _bt_gatt_get_uuid( - gatt_handle, - uuid, - ); - } - - late final _bt_gatt_get_uuidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_h, - ffi.Pointer>)>>('bt_gatt_get_uuid'); - late final _bt_gatt_get_uuid = _bt_gatt_get_uuidPtr.asFunction< - int Function(bt_gatt_h, ffi.Pointer>)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets the type of GATT handle. - /// @since_tizen 2.3.1 - /// - /// @param[in] gatt_handle The GATT handle - /// @param[out] gatt_type The type of @a gatt_handle - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_get_type( - bt_gatt_h gatt_handle, - ffi.Pointer gatt_type, - ) { - return _bt_gatt_get_type( - gatt_handle, - gatt_type, - ); - } - - late final _bt_gatt_get_typePtr = _lookup< - ffi - .NativeFunction)>>( - 'bt_gatt_get_type'); - late final _bt_gatt_get_type = _bt_gatt_get_typePtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Gets the GATT client handle which the specified service belongs to. - /// @since_tizen 2.3.1 - /// - /// @remarks This function doesn't allocate new memory for GATT client handle. \n - /// The returned GATT client handle is the same one which was got from bt_gatt_client_create(). \n - /// So if it is destroyed by bt_gatt_client_destroy(), all related GATT handles are freed also. - /// - /// @param[in] service The service's GATT handle - /// @param[out] client The GATT client handle which @a service belongs to - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_client_create() - int bt_gatt_service_get_client( - bt_gatt_h service, - ffi.Pointer client, - ) { - return _bt_gatt_service_get_client( - service, - client, - ); - } - - late final _bt_gatt_service_get_clientPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_h, - ffi.Pointer)>>('bt_gatt_service_get_client'); - late final _bt_gatt_service_get_client = _bt_gatt_service_get_clientPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets a characteristic's GATT handle which has specific UUID. - /// @since_tizen 2.3.1 - /// - /// @remarks The returned GATT handle must not be freed by application. \n - /// It will be freed when an associated client is destroyed by bt_gatt_client_destroy(). \n - /// If there are multiple characteristics which have same UUID, only the first matched one will be returned. - /// - /// @param[in] service The service's GATT handle - /// @param[in] uuid The characteristic's GATT handle which has this UUID will be returned if it exists - /// @param[out] characteristic The characteristic's GATT handle which has @a uuid if it exists - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NO_DATA No data available - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_service_get_characteristic( - bt_gatt_h service, - ffi.Pointer uuid, - ffi.Pointer characteristic, - ) { - return _bt_gatt_service_get_characteristic( - service, - uuid, - characteristic, - ); - } - - late final _bt_gatt_service_get_characteristicPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_h, ffi.Pointer, - ffi.Pointer)>>('bt_gatt_service_get_characteristic'); - late final _bt_gatt_service_get_characteristic = - _bt_gatt_service_get_characteristicPtr.asFunction< - int Function( - bt_gatt_h, ffi.Pointer, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Invokes @a callback function on each characteristic that belongs to the specified service. - /// @since_tizen 2.3.1 - /// - /// @param[in] service The service's GATT handle - /// @param[in] callback The function to be invoked on each characteristic - /// @param[in] user_data The user data to be passed to @a callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_foreach_cb() - int bt_gatt_service_foreach_characteristics( - bt_gatt_h service, - bt_gatt_foreach_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_service_foreach_characteristics( - service, - callback, - user_data, - ); - } - - late final _bt_gatt_service_foreach_characteristicsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_h, bt_gatt_foreach_cb, ffi.Pointer)>>( - 'bt_gatt_service_foreach_characteristics'); - late final _bt_gatt_service_foreach_characteristics = - _bt_gatt_service_foreach_characteristicsPtr.asFunction< - int Function(bt_gatt_h, bt_gatt_foreach_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets an included service's GATT handle which has specific UUID. - /// @since_tizen 2.3.1 - /// - /// @remarks The returned GATT handle must not be freed by application. \n - /// It will be freed when an associated client is destroyed by bt_gatt_client_destroy(). \n - /// If there are multiple included services which have same UUID, only the first matched one will be returned. - /// - /// @param[in] service The service's GATT handle - /// @param[in] uuid The included service's GATT handle which has this UUID will be returned if it exists - /// @param[out] included_service The included service's GATT handle which has @a uuid if it exists - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NO_DATA No data available - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_service_get_included_service( - bt_gatt_h service, - ffi.Pointer uuid, - ffi.Pointer included_service, - ) { - return _bt_gatt_service_get_included_service( - service, - uuid, - included_service, - ); - } - - late final _bt_gatt_service_get_included_servicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_h, ffi.Pointer, - ffi.Pointer)>>('bt_gatt_service_get_included_service'); - late final _bt_gatt_service_get_included_service = - _bt_gatt_service_get_included_servicePtr.asFunction< - int Function( - bt_gatt_h, ffi.Pointer, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Invokes @a callback function on each included service that belongs to the specified service. - /// @since_tizen 2.3.1 - /// - /// @param[in] service The service's GATT handle - /// @param[in] callback The function to be invoked on each included service - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_foreach_cb() - int bt_gatt_service_foreach_included_services( - bt_gatt_h service, - bt_gatt_foreach_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_service_foreach_included_services( - service, - callback, - user_data, - ); - } - - late final _bt_gatt_service_foreach_included_servicesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_h, bt_gatt_foreach_cb, ffi.Pointer)>>( - 'bt_gatt_service_foreach_included_services'); - late final _bt_gatt_service_foreach_included_services = - _bt_gatt_service_foreach_included_servicesPtr.asFunction< - int Function(bt_gatt_h, bt_gatt_foreach_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets the service's GATT handle which the specified characteristic belongs to. - /// @since_tizen 2.3.1 - /// - /// @remarks The returned GATT handle must not be freed by application. \n - /// It will be freed when an associated client is destroyed by bt_gatt_client_destroy(). - /// - /// @param[in] characteristic The characteristic's GATT handle - /// @param[out] service The service's GATT handle which @a characteristic belongs to - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_characteristic_get_service( - bt_gatt_h characteristic, - ffi.Pointer service, - ) { - return _bt_gatt_characteristic_get_service( - characteristic, - service, - ); - } - - late final _bt_gatt_characteristic_get_servicePtr = _lookup< - ffi - .NativeFunction)>>( - 'bt_gatt_characteristic_get_service'); - late final _bt_gatt_characteristic_get_service = - _bt_gatt_characteristic_get_servicePtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets the properties which a characteristic's GATT handle has. - /// @since_tizen 2.3.1 - /// - /// @param[in] characteristic The characteristic's GATT handle - /// @param[out] properties The properties which a characteristic's GATT handle has - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_property_e - int bt_gatt_characteristic_get_properties( - bt_gatt_h characteristic, - ffi.Pointer properties, - ) { - return _bt_gatt_characteristic_get_properties( - characteristic, - properties, - ); - } - - late final _bt_gatt_characteristic_get_propertiesPtr = _lookup< - ffi - .NativeFunction)>>( - 'bt_gatt_characteristic_get_properties'); - late final _bt_gatt_characteristic_get_properties = - _bt_gatt_characteristic_get_propertiesPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets the write type of the specified characteristic. - /// @since_tizen 2.3.1 - /// - /// @param[in] characteristic The characteristic's GATT handle - /// @param[out] write_type The write type of the specified characteristic - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_write_type_e - int bt_gatt_characteristic_get_write_type( - bt_gatt_h characteristic, - ffi.Pointer write_type, - ) { - return _bt_gatt_characteristic_get_write_type( - characteristic, - write_type, - ); - } - - late final _bt_gatt_characteristic_get_write_typePtr = _lookup< - ffi - .NativeFunction)>>( - 'bt_gatt_characteristic_get_write_type'); - late final _bt_gatt_characteristic_get_write_type = - _bt_gatt_characteristic_get_write_typePtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Updates the write type of the specified characteristic. - /// @since_tizen 2.3.1 - /// - /// @param[in] characteristic The characteristic's GATT handle - /// @param[in] write_type The write type to be updated - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_client_write_value() - /// @see bt_gatt_write_type_e - int bt_gatt_characteristic_set_write_type( - bt_gatt_h characteristic, - int write_type, - ) { - return _bt_gatt_characteristic_set_write_type( - characteristic, - write_type, - ); - } - - late final _bt_gatt_characteristic_set_write_typePtr = - _lookup>( - 'bt_gatt_characteristic_set_write_type'); - late final _bt_gatt_characteristic_set_write_type = - _bt_gatt_characteristic_set_write_typePtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets a descriptor's GATT handle which has specific UUID. - /// @since_tizen 2.3.1 - /// - /// @remarks The returned GATT handle must not be freed by application. \n - /// It will be freed when an associated client is destroyed by bt_gatt_client_destroy(). \n - /// If there are multiple descriptors which have same UUID, only the first matched one will be returned. - /// - /// @param[in] characteristic The characteristic's GATT handle - /// @param[in] uuid The descriptor's GATT handle which has this UUID will be returned if it exists - /// @param[out] descriptor The descriptor's GATT handle which has @a uuid if it exists - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NO_DATA No data available - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_characteristic_get_descriptor( - bt_gatt_h characteristic, - ffi.Pointer uuid, - ffi.Pointer descriptor, - ) { - return _bt_gatt_characteristic_get_descriptor( - characteristic, - uuid, - descriptor, - ); - } - - late final _bt_gatt_characteristic_get_descriptorPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_h, ffi.Pointer, ffi.Pointer)>>( - 'bt_gatt_characteristic_get_descriptor'); - late final _bt_gatt_characteristic_get_descriptor = - _bt_gatt_characteristic_get_descriptorPtr.asFunction< - int Function( - bt_gatt_h, ffi.Pointer, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Invokes @a callback function on each descriptor that belongs to the specified characteristic. - /// @since_tizen 2.3.1 - /// - /// @param[in] characteristic The characteristic's GATT handle - /// @param[in] callback The function to be invoked on each descriptor - /// @param[in] user_data The user data to be passed to @a callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_foreach_cb() - int bt_gatt_characteristic_foreach_descriptors( - bt_gatt_h characteristic, - bt_gatt_foreach_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_characteristic_foreach_descriptors( - characteristic, - callback, - user_data, - ); - } - - late final _bt_gatt_characteristic_foreach_descriptorsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_h, bt_gatt_foreach_cb, ffi.Pointer)>>( - 'bt_gatt_characteristic_foreach_descriptors'); - late final _bt_gatt_characteristic_foreach_descriptors = - _bt_gatt_characteristic_foreach_descriptorsPtr.asFunction< - int Function(bt_gatt_h, bt_gatt_foreach_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets the characteristic's GATT handle which the specified descriptor belongs to. - /// @since_tizen 2.3.1 - /// - /// @remarks The returned GATT handle must not be freed by application. \n - /// It will be freed when an associated client is destroyed by bt_gatt_client_destroy(). - /// - /// @param[in] descriptor The descriptor's GATT handle - /// @param[out] characteristic The characteristic's GATT handle which @a descriptor belongs to - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_descriptor_get_characteristic( - bt_gatt_h descriptor, - ffi.Pointer characteristic, - ) { - return _bt_gatt_descriptor_get_characteristic( - descriptor, - characteristic, - ); - } - - late final _bt_gatt_descriptor_get_characteristicPtr = _lookup< - ffi - .NativeFunction)>>( - 'bt_gatt_descriptor_get_characteristic'); - late final _bt_gatt_descriptor_get_characteristic = - _bt_gatt_descriptor_get_characteristicPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Creates the GATT client handle. - /// @since_tizen 2.3.1 - /// - /// @remarks The GATT client handle must be freed by bt_gatt_client_destroy() after use. - /// - /// @param[in] remote_address The address of the remote device - /// @param[out] client The created GATT client's handle - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_ALREADY_DONE Operation is already done - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_client_destroy() - int bt_gatt_client_create( - ffi.Pointer remote_address, - ffi.Pointer client, - ) { - return _bt_gatt_client_create( - remote_address, - client, - ); - } - - late final _bt_gatt_client_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('bt_gatt_client_create'); - late final _bt_gatt_client_create = _bt_gatt_client_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Destroys the GATT client's handle. - /// @since_tizen 2.3.1 - /// - /// @remarks All related service, characteristic and descriptor's GATT handles are freed also. - /// - /// @param[in] client The GATT client's handle - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_client_create() - int bt_gatt_client_destroy( - bt_gatt_client_h client, - ) { - return _bt_gatt_client_destroy( - client, - ); - } - - late final _bt_gatt_client_destroyPtr = - _lookup>( - 'bt_gatt_client_destroy'); - late final _bt_gatt_client_destroy = - _bt_gatt_client_destroyPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Gets the address of remote device. - /// @since_tizen 2.3.1 - /// - /// @param[in] client The created GATT client's handle - /// @param[out] remote_address The address of the remote device which is associated with @a client - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_client_create() - int bt_gatt_client_get_remote_address( - bt_gatt_client_h client, - ffi.Pointer> remote_address, - ) { - return _bt_gatt_client_get_remote_address( - client, - remote_address, - ); - } - - late final _bt_gatt_client_get_remote_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_client_h, ffi.Pointer>)>>( - 'bt_gatt_client_get_remote_address'); - late final _bt_gatt_client_get_remote_address = - _bt_gatt_client_get_remote_addressPtr.asFunction< - int Function(bt_gatt_client_h, ffi.Pointer>)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Reads the value of a characteristic or descriptor from the remote device asynchronously. - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] gatt_handle The GATT handle of a characteristic or descriptor - /// @param[in] callback When a read request is completed, this callback function will be called - /// @param[in] user_data The user data to be passed to @a callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOW_IN_PROGRESS Operation now in progress - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_client_create() - /// @see bt_gatt_client_request_completed_cb() - int bt_gatt_client_read_value( - bt_gatt_h gatt_handle, - bt_gatt_client_request_completed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_client_read_value( - gatt_handle, - callback, - user_data, - ); - } - - late final _bt_gatt_client_read_valuePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_h, bt_gatt_client_request_completed_cb, - ffi.Pointer)>>('bt_gatt_client_read_value'); - late final _bt_gatt_client_read_value = - _bt_gatt_client_read_valuePtr.asFunction< - int Function(bt_gatt_h, bt_gatt_client_request_completed_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Writes the value of a characteristic or descriptor to the remote device asynchronously. - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] gatt_handle The GATT handle of a characteristic or descriptor - /// @param[in] callback When a write request is completed, this callback function will be called - /// @param[in] user_data The user data to be passed to @a callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOW_IN_PROGRESS Operation now in progress - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_client_create() - /// @see bt_gatt_characteristic_set_write_type() - /// @see bt_gatt_set_value() - /// @see bt_gatt_set_int_value() - /// @see bt_gatt_set_float_value() - /// @see bt_gatt_client_request_completed_cb() - int bt_gatt_client_write_value( - bt_gatt_h gatt_handle, - bt_gatt_client_request_completed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_client_write_value( - gatt_handle, - callback, - user_data, - ); - } - - late final _bt_gatt_client_write_valuePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_h, bt_gatt_client_request_completed_cb, - ffi.Pointer)>>('bt_gatt_client_write_value'); - late final _bt_gatt_client_write_value = - _bt_gatt_client_write_valuePtr.asFunction< - int Function(bt_gatt_h, bt_gatt_client_request_completed_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Requests a change of the ATT MTU value. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] client The created GATT client's handle - /// @param[in] mtu The new MTU value - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// @see bt_gatt_client_set_att_mtu_changed_cb() - int bt_gatt_client_request_att_mtu_change( - bt_gatt_client_h client, - int mtu, - ) { - return _bt_gatt_client_request_att_mtu_change( - client, - mtu, - ); - } - - late final _bt_gatt_client_request_att_mtu_changePtr = _lookup< - ffi - .NativeFunction>( - 'bt_gatt_client_request_att_mtu_change'); - late final _bt_gatt_client_request_att_mtu_change = - _bt_gatt_client_request_att_mtu_changePtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Gets the ATT MTU value set for a connection. - /// @since_tizen 4.0 - /// - /// @param[in] client The created GATT client's handle - /// @param[out] mtu The MTU value set for a connection - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_client_get_att_mtu( - bt_gatt_client_h client, - ffi.Pointer mtu, - ) { - return _bt_gatt_client_get_att_mtu( - client, - mtu, - ); - } - - late final _bt_gatt_client_get_att_mtuPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_client_h, - ffi.Pointer)>>('bt_gatt_client_get_att_mtu'); - late final _bt_gatt_client_get_att_mtu = - _bt_gatt_client_get_att_mtuPtr.asFunction< - int Function(bt_gatt_client_h, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Registers a callback function to be invoked when the ATT MTU is changed. - /// @since_tizen 4.0 - /// @param[in] client The created GATT client's handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @post bt_device_connection_state_changed_cb() will be invoked. - /// @see bt_initialize() - /// @see bt_gatt_client_request_att_mtu_change() - /// @see bt_gatt_client_unset_att_mtu_changed_cb() - int bt_gatt_client_set_att_mtu_changed_cb( - bt_gatt_client_h client, - bt_gatt_client_att_mtu_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_client_set_att_mtu_changed_cb( - client, - callback, - user_data, - ); - } - - late final _bt_gatt_client_set_att_mtu_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_client_h, bt_gatt_client_att_mtu_changed_cb, - ffi.Pointer)>>('bt_gatt_client_set_att_mtu_changed_cb'); - late final _bt_gatt_client_set_att_mtu_changed_cb = - _bt_gatt_client_set_att_mtu_changed_cbPtr.asFunction< - int Function(bt_gatt_client_h, bt_gatt_client_att_mtu_changed_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Unregisters the callback function to be invoked when the ATT MTU is changed. - /// @since_tizen 4.0 - /// @param[in] client The created GATT client's handle - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @see bt_initialize() - /// @see bt_gatt_client_request_att_mtu_change() - /// @see bt_gatt_client_set_att_mtu_changed_cb() - int bt_gatt_client_unset_att_mtu_changed_cb( - bt_gatt_client_h client, - ) { - return _bt_gatt_client_unset_att_mtu_changed_cb( - client, - ); - } - - late final _bt_gatt_client_unset_att_mtu_changed_cbPtr = - _lookup>( - 'bt_gatt_client_unset_att_mtu_changed_cb'); - late final _bt_gatt_client_unset_att_mtu_changed_cb = - _bt_gatt_client_unset_att_mtu_changed_cbPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Registers a callback function to be invoked when the characteristic value is changed on the remote device. - /// @since_tizen 2.3.1 - /// - /// @param[in] characteristic The characteristic's GATT handle - /// @param[in] callback The callback to be invoked when the value is changed and it is informed - /// @param[in] user_data The user data to be passed to @a callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_client_characteristic_value_changed_cb() - /// @see bt_gatt_client_unset_characteristic_value_change() - int bt_gatt_client_set_characteristic_value_changed_cb( - bt_gatt_h characteristic, - bt_gatt_client_characteristic_value_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_client_set_characteristic_value_changed_cb( - characteristic, - callback, - user_data, - ); - } - - late final _bt_gatt_client_set_characteristic_value_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_h, - bt_gatt_client_characteristic_value_changed_cb, - ffi.Pointer)>>( - 'bt_gatt_client_set_characteristic_value_changed_cb'); - late final _bt_gatt_client_set_characteristic_value_changed_cb = - _bt_gatt_client_set_characteristic_value_changed_cbPtr.asFunction< - int Function( - bt_gatt_h, - bt_gatt_client_characteristic_value_changed_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Unregisters a callback function to be invoked when the characteristic value is changed on the remote device. - /// @since_tizen 2.3.1 - /// - /// @param[in] characteristic The characteristic's GATT handle, whose value change will not be informed - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_client_set_characteristic_value_changed_cb() - int bt_gatt_client_unset_characteristic_value_changed_cb( - bt_gatt_h characteristic, - ) { - return _bt_gatt_client_unset_characteristic_value_changed_cb( - characteristic, - ); - } - - late final _bt_gatt_client_unset_characteristic_value_changed_cbPtr = - _lookup>( - 'bt_gatt_client_unset_characteristic_value_changed_cb'); - late final _bt_gatt_client_unset_characteristic_value_changed_cb = - _bt_gatt_client_unset_characteristic_value_changed_cbPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Gets a service's GATT handle which has specific UUID. - /// @since_tizen 2.3.1 - /// - /// @remarks The returned GATT handle must not be freed by application. \n - /// It will be freed when an associated client is destroyed by bt_gatt_client_destroy(). \n - /// If there are multiple services which have same UUID, only the first matched one will be returned. - /// - /// @param[in] client The GATT client's handle - /// @param[in] uuid The service's GATT handle which has this UUID will be returned if it exists - /// @param[out] service The service's GATT handle which has @a uuid if it exists - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NO_DATA No data available - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_client_get_service( - bt_gatt_client_h client, - ffi.Pointer uuid, - ffi.Pointer service, - ) { - return _bt_gatt_client_get_service( - client, - uuid, - service, - ); - } - - late final _bt_gatt_client_get_servicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_client_h, ffi.Pointer, - ffi.Pointer)>>('bt_gatt_client_get_service'); - late final _bt_gatt_client_get_service = - _bt_gatt_client_get_servicePtr.asFunction< - int Function(bt_gatt_client_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Invokes @a callback function on each service that belongs to the specified GATT client. - /// @since_tizen 2.3.1 - /// - /// @param[in] client The GATT client's handle - /// @param[in] callback The function to be invoked on each service - /// @param[in] user_data The user data to be passed to @a callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_foreach_cb() - int bt_gatt_client_foreach_services( - bt_gatt_client_h client, - bt_gatt_foreach_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_client_foreach_services( - client, - callback, - user_data, - ); - } - - late final _bt_gatt_client_foreach_servicesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_client_h, bt_gatt_foreach_cb, - ffi.Pointer)>>('bt_gatt_client_foreach_services'); - late final _bt_gatt_client_foreach_services = - _bt_gatt_client_foreach_servicesPtr.asFunction< - int Function( - bt_gatt_client_h, bt_gatt_foreach_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Registers a callback function to be invoked when service is changed from a remote device(GATT server). - /// @since_tizen 3.0 - /// - /// @param[in] client The GATT client's handle - /// @param[in] callback The callback to be invoked - /// @param[in] user_data The user data to be passed to @a callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_client_unset_service_changed_cb() - int bt_gatt_client_set_service_changed_cb( - bt_gatt_client_h client, - bt_gatt_client_service_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_client_set_service_changed_cb( - client, - callback, - user_data, - ); - } - - late final _bt_gatt_client_set_service_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_client_h, bt_gatt_client_service_changed_cb, - ffi.Pointer)>>('bt_gatt_client_set_service_changed_cb'); - late final _bt_gatt_client_set_service_changed_cb = - _bt_gatt_client_set_service_changed_cbPtr.asFunction< - int Function(bt_gatt_client_h, bt_gatt_client_service_changed_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Unregisters a callback function. - /// @since_tizen 3.0 - /// - /// @param[in] client The GATT client's handle - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_client_set_service_changed_cb() - int bt_gatt_client_unset_service_changed_cb( - bt_gatt_client_h client, - ) { - return _bt_gatt_client_unset_service_changed_cb( - client, - ); - } - - late final _bt_gatt_client_unset_service_changed_cbPtr = - _lookup>( - 'bt_gatt_client_unset_service_changed_cb'); - late final _bt_gatt_client_unset_service_changed_cb = - _bt_gatt_client_unset_service_changed_cbPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Connects to a specific LE based service on a remote bluetooth device address, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @remarks A connection can be disconnected by bt_gatt_disconnect(). - /// - /// @param[in] address The address of the remote Bluetooth device. - /// @param[in] auto_connect The flag of the auto connection. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// @pre The remote device must support le connection. - /// @post This function invokes bt_gatt_connection_state_changed_cb(). - /// - /// @see bt_initialize() - /// @see bt_gatt_disconnect() - /// @see bt_gatt_set_connection_state_changed_cb() - /// @see bt_gatt_unset_connection_state_changed_cb() - /// @see bt_gatt_connection_state_changed_cb() - int bt_gatt_connect( - ffi.Pointer address, - bool auto_connect, - ) { - return _bt_gatt_connect( - address, - auto_connect, - ); - } - - late final _bt_gatt_connectPtr = _lookup< - ffi - .NativeFunction, ffi.Bool)>>( - 'bt_gatt_connect'); - late final _bt_gatt_connect = _bt_gatt_connectPtr - .asFunction, bool)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Disconnects to LE connection with the given remote Bluetooth device address, asynchronously. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] address The address of the remote Bluetooth device - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The connection must be established. - /// @post This function invokes bt_gatt_connection_state_changed_cb(). - /// - /// @see bt_initialize() - /// @see bt_gatt_connect() - /// @see bt_gatt_set_connection_state_changed_cb() - /// @see bt_gatt_unset_connection_state_changed_cb() - /// @see bt_gatt_connection_state_changed_cb() - int bt_gatt_disconnect( - ffi.Pointer address, - ) { - return _bt_gatt_disconnect( - address, - ); - } - - late final _bt_gatt_disconnectPtr = - _lookup)>>( - 'bt_gatt_disconnect'); - late final _bt_gatt_disconnect = - _bt_gatt_disconnectPtr.asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Registers a callback function that will be invoked when the connection state is changed. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[in] callback The callback function to register. - /// @param[in] user_data The user data to be passed to the callback function. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_connect() - /// @see bt_gatt_disconnect() - /// @see bt_gatt_unset_connection_state_changed_cb() - int bt_gatt_set_connection_state_changed_cb( - bt_gatt_connection_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_set_connection_state_changed_cb( - callback, - user_data, - ); - } - - late final _bt_gatt_set_connection_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_connection_state_changed_cb, ffi.Pointer)>>( - 'bt_gatt_set_connection_state_changed_cb'); - late final _bt_gatt_set_connection_state_changed_cb = - _bt_gatt_set_connection_state_changed_cbPtr.asFunction< - int Function( - bt_gatt_connection_state_changed_cb, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE - /// @brief Unregisters a callback function that will be invoked when the connection state is changed. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_connect() - /// @see bt_gatt_disconnect() - /// @see bt_gatt_connection_state_changed_cb() - int bt_gatt_unset_connection_state_changed_cb() { - return _bt_gatt_unset_connection_state_changed_cb(); - } - - late final _bt_gatt_unset_connection_state_changed_cbPtr = - _lookup>( - 'bt_gatt_unset_connection_state_changed_cb'); - late final _bt_gatt_unset_connection_state_changed_cb = - _bt_gatt_unset_connection_state_changed_cbPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Destroys the GATT handle of service. - /// @since_tizen 3.0 - /// - /// @param[in] gatt_handle The handle of service - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_service_create() - int bt_gatt_service_destroy( - bt_gatt_h gatt_handle, - ) { - return _bt_gatt_service_destroy( - gatt_handle, - ); - } - - late final _bt_gatt_service_destroyPtr = - _lookup>( - 'bt_gatt_service_destroy'); - late final _bt_gatt_service_destroy = - _bt_gatt_service_destroyPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Destroys the GATT handle of characteristic. - /// @since_tizen 3.0 - /// - /// @param[in] gatt_handle The handle of characteristic - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_characteristic_create() - int bt_gatt_characteristic_destroy( - bt_gatt_h gatt_handle, - ) { - return _bt_gatt_characteristic_destroy( - gatt_handle, - ); - } - - late final _bt_gatt_characteristic_destroyPtr = - _lookup>( - 'bt_gatt_characteristic_destroy'); - late final _bt_gatt_characteristic_destroy = - _bt_gatt_characteristic_destroyPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Destroys the GATT handle of descriptor. - /// @since_tizen 3.0 - /// - /// @param[in] gatt_handle The handle of descriptor - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_descriptor_create() - int bt_gatt_descriptor_destroy( - bt_gatt_h gatt_handle, - ) { - return _bt_gatt_descriptor_destroy( - gatt_handle, - ); - } - - late final _bt_gatt_descriptor_destroyPtr = - _lookup>( - 'bt_gatt_descriptor_destroy'); - late final _bt_gatt_descriptor_destroy = - _bt_gatt_descriptor_destroyPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets the permissions which a characteristic's GATT handle has. - /// @since_tizen 3.0 - /// - /// @remarks The @a permissions can be one or more values of #bt_gatt_permission_e, combined with bitwise 'or'. - /// - /// @param[in] gatt_handle The handle of a characteristic - /// @param[out] permissions The permissions which a characteristic's GATT handle has - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_characteristic_create() - /// @see bt_gatt_permission_e - int bt_gatt_characteristic_get_permissions( - bt_gatt_h gatt_handle, - ffi.Pointer permissions, - ) { - return _bt_gatt_characteristic_get_permissions( - gatt_handle, - permissions, - ); - } - - late final _bt_gatt_characteristic_get_permissionsPtr = _lookup< - ffi - .NativeFunction)>>( - 'bt_gatt_characteristic_get_permissions'); - late final _bt_gatt_characteristic_get_permissions = - _bt_gatt_characteristic_get_permissionsPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Gets the permissions which a descriptor's GATT handle has. - /// @since_tizen 3.0 - /// - /// @remarks The @a permissions can be one or more values of #bt_gatt_permission_e, combined with bitwise 'or'. - /// - /// @param[in] gatt_handle The handle of a descriptor - /// @param[out] permissions The permissions which a descriptor's GATT handle has - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_descriptor_create() - /// @see bt_gatt_permission_e - int bt_gatt_descriptor_get_permissions( - bt_gatt_h gatt_handle, - ffi.Pointer permissions, - ) { - return _bt_gatt_descriptor_get_permissions( - gatt_handle, - permissions, - ); - } - - late final _bt_gatt_descriptor_get_permissionsPtr = _lookup< - ffi - .NativeFunction)>>( - 'bt_gatt_descriptor_get_permissions'); - late final _bt_gatt_descriptor_get_permissions = - _bt_gatt_descriptor_get_permissionsPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Creates the GATT service. - /// @since_tizen 3.0 - /// - /// @remarks The @a service should be destroyed by using bt_gatt_service_destroy(). - /// - /// @param[in] uuid The UUID of the service - /// @param[in] type The type of the service - /// @param[out] service The GATT handle of the created service - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_service_destroy() - int bt_gatt_service_create( - ffi.Pointer uuid, - int type, - ffi.Pointer service, - ) { - return _bt_gatt_service_create( - uuid, - type, - service, - ); - } - - late final _bt_gatt_service_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int32, - ffi.Pointer)>>('bt_gatt_service_create'); - late final _bt_gatt_service_create = _bt_gatt_service_createPtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Adds a characteristic to a specified service. - /// @since_tizen 3.0 - /// - /// @param[in] service The service's GATT handle - /// @param[in] characteristic The characteristic's GATT handle to be added - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_service_create() - /// @see bt_gatt_characteristic_create() - int bt_gatt_service_add_characteristic( - bt_gatt_h service, - bt_gatt_h characteristic, - ) { - return _bt_gatt_service_add_characteristic( - service, - characteristic, - ); - } - - late final _bt_gatt_service_add_characteristicPtr = - _lookup>( - 'bt_gatt_service_add_characteristic'); - late final _bt_gatt_service_add_characteristic = - _bt_gatt_service_add_characteristicPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Adds a service to a specified service as included service. - /// @since_tizen 3.0 - /// - /// @param[in] service The service's GATT handle - /// @param[in] included_service The service's GATT handle to be added as included service - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_service_create() - int bt_gatt_service_add_included_service( - bt_gatt_h service, - bt_gatt_h included_service, - ) { - return _bt_gatt_service_add_included_service( - service, - included_service, - ); - } - - late final _bt_gatt_service_add_included_servicePtr = - _lookup>( - 'bt_gatt_service_add_included_service'); - late final _bt_gatt_service_add_included_service = - _bt_gatt_service_add_included_servicePtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Gets the GATT server handle to which the specified service belongs. - /// @since_tizen 3.0 - /// - /// @remarks The returned Server handle must not be freed by application. - /// - /// @param[in] service The service's GATT handle - /// @param[out] server The GATT server handle to which @a service belongs - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_server_create() - /// @see bt_gatt_service_create() - /// @see bt_gatt_server_register_service() - int bt_gatt_service_get_server( - bt_gatt_h service, - ffi.Pointer server, - ) { - return _bt_gatt_service_get_server( - service, - server, - ); - } - - late final _bt_gatt_service_get_serverPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_h, - ffi.Pointer)>>('bt_gatt_service_get_server'); - late final _bt_gatt_service_get_server = _bt_gatt_service_get_serverPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Creates the GATT characteristic. - /// @since_tizen 3.0 - /// - /// @remarks The @a permissions can be one or more values of #bt_gatt_permission_e, combined with bitwise 'or'. \n - /// @remarks The @a properties can be one or more values of #bt_gatt_property_e, combined with bitwise 'or'. \n - /// @remarks The @a characteristic should be destroyed by using bt_gatt_characteristic_destroy(). - /// - /// @param[in] uuid The UUID of the characteristic - /// @param[in] permissions the permissions of the characteristic - /// @param[in] properties The properties of the characteristic - /// @param[in] value The value(byte stream) of the characteristic - /// @param[in] value_length The length of @a value - /// @param[out] characteristic The GATT handle of the created characteristic - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_characteristic_destroy() - int bt_gatt_characteristic_create( - ffi.Pointer uuid, - int permissions, - int properties, - ffi.Pointer value, - int value_length, - ffi.Pointer characteristic, - ) { - return _bt_gatt_characteristic_create( - uuid, - permissions, - properties, - value, - value_length, - characteristic, - ); - } - - late final _bt_gatt_characteristic_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.Pointer)>>('bt_gatt_characteristic_create'); - late final _bt_gatt_characteristic_create = - _bt_gatt_characteristic_createPtr.asFunction< - int Function(ffi.Pointer, int, int, ffi.Pointer, - int, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Adds a descriptor to a specified characteristic. - /// @since_tizen 3.0 - /// - /// @param[in] characteristic The GATT handle of the characteristic - /// @param[in] descriptor The descriptor's GATT handle to be added - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_characteristic_create() - /// @see bt_gatt_descriptor_create() - int bt_gatt_characteristic_add_descriptor( - bt_gatt_h characteristic, - bt_gatt_h descriptor, - ) { - return _bt_gatt_characteristic_add_descriptor( - characteristic, - descriptor, - ); - } - - late final _bt_gatt_characteristic_add_descriptorPtr = - _lookup>( - 'bt_gatt_characteristic_add_descriptor'); - late final _bt_gatt_characteristic_add_descriptor = - _bt_gatt_characteristic_add_descriptorPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE - /// @brief Creates the GATT characteristic descriptor. - /// @since_tizen 3.0 - /// - /// @remarks The @a permissions can be one or more values of #bt_gatt_permission_e, combined with bitwise 'or'. \n - /// @remarks The @a descriptor should be destroyed by using bt_gatt_descriptor_destroy(). - /// - /// @param[in] uuid The UUID of the descriptor - /// @param[in] permissions The permissions of the descriptor - /// @param[in] value The value(byte stream) associated with the descriptor - /// @param[in] value_length The length of @a value - /// @param[out] descriptor The GATT handle of the created characteristic descriptor - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_descriptor_destroy() - int bt_gatt_descriptor_create( - ffi.Pointer uuid, - int permissions, - ffi.Pointer value, - int value_length, - ffi.Pointer descriptor, - ) { - return _bt_gatt_descriptor_create( - uuid, - permissions, - value, - value_length, - descriptor, - ); - } - - late final _bt_gatt_descriptor_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.Pointer)>>('bt_gatt_descriptor_create'); - late final _bt_gatt_descriptor_create = - _bt_gatt_descriptor_createPtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer, int, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Initializes the GATT Server. - /// @since_tizen 3.0 - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @see bt_gatt_server_deinitialize() - int bt_gatt_server_initialize() { - return _bt_gatt_server_initialize(); - } - - late final _bt_gatt_server_initializePtr = - _lookup>( - 'bt_gatt_server_initialize'); - late final _bt_gatt_server_initialize = - _bt_gatt_server_initializePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief DeInitializes the GATT server. - /// @since_tizen 3.0 - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - /// @see bt_gatt_server_initialize() - int bt_gatt_server_deinitialize() { - return _bt_gatt_server_deinitialize(); - } - - late final _bt_gatt_server_deinitializePtr = - _lookup>( - 'bt_gatt_server_deinitialize'); - late final _bt_gatt_server_deinitialize = - _bt_gatt_server_deinitializePtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Creates the GATT server's handle. - /// @since_tizen 3.0 - /// - /// @remarks The @a server handle should be destroyed by using bt_gatt_server_destroy(). - /// - /// @param[out] server The GATT server's handle - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_server_destroy() - int bt_gatt_server_create( - ffi.Pointer server, - ) { - return _bt_gatt_server_create( - server, - ); - } - - late final _bt_gatt_server_createPtr = _lookup< - ffi.NativeFunction)>>( - 'bt_gatt_server_create'); - late final _bt_gatt_server_create = _bt_gatt_server_createPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Destroys the GATT server's handle. - /// @since_tizen 3.0 - /// - /// @remarks All registered services to GATT server are unregistered. - /// - /// @param[in] server The GATT server's handle - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_server_create() - int bt_gatt_server_destroy( - bt_gatt_server_h server, - ) { - return _bt_gatt_server_destroy( - server, - ); - } - - late final _bt_gatt_server_destroyPtr = - _lookup>( - 'bt_gatt_server_destroy'); - late final _bt_gatt_server_destroy = - _bt_gatt_server_destroyPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Registers a callback function to be invoked when a read request for a specified characteristic or descriptor is issued from a remote device(GATT client). - /// @since_tizen 3.0 - /// - /// @param[in] gatt_handle The GATT handle of a characteristic or descriptor - /// @param[in] callback The callback to be invoked - /// @param[in] user_data The user data to be passed to @a callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_server_read_value_requested_cb() - /// @see bt_gatt_server_send_response() - int bt_gatt_server_set_read_value_requested_cb( - bt_gatt_h gatt_handle, - bt_gatt_server_read_value_requested_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_server_set_read_value_requested_cb( - gatt_handle, - callback, - user_data, - ); - } - - late final _bt_gatt_server_set_read_value_requested_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_h, - bt_gatt_server_read_value_requested_cb, - ffi.Pointer)>>( - 'bt_gatt_server_set_read_value_requested_cb'); - late final _bt_gatt_server_set_read_value_requested_cb = - _bt_gatt_server_set_read_value_requested_cbPtr.asFunction< - int Function(bt_gatt_h, bt_gatt_server_read_value_requested_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Registers a callback function to be invoked when the remote device enables or disables the Notification/Indication for particular characteristics. - /// @since_tizen 3.0 - /// - /// @param[in] gatt_handle The GATT handle of a characteristic - /// @param[in] callback The callback to be invoked - /// @param[in] user_data The user data to be passed to @a callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_server_characteristic_notification_state_changed_cb() - int bt_gatt_server_set_characteristic_notification_state_change_cb( - bt_gatt_h gatt_handle, - bt_gatt_server_characteristic_notification_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_server_set_characteristic_notification_state_change_cb( - gatt_handle, - callback, - user_data, - ); - } - - late final _bt_gatt_server_set_characteristic_notification_state_change_cbPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_h, - bt_gatt_server_characteristic_notification_state_changed_cb, - ffi.Pointer)>>( - 'bt_gatt_server_set_characteristic_notification_state_change_cb'); - late final _bt_gatt_server_set_characteristic_notification_state_change_cb = - _bt_gatt_server_set_characteristic_notification_state_change_cbPtr - .asFunction< - int Function( - bt_gatt_h, - bt_gatt_server_characteristic_notification_state_changed_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Registers a callback function to be invoked when a value of a characteristic or descriptor has been changed by a remote device(GATT client)'s request. - /// @since_tizen 3.0 - /// - /// @param[in] gatt_handle The GATT handle of a characteristic or descriptor - /// @param[in] callback The callback to be invoked - /// @param[in] user_data The user data to be passed to @a callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_server_write_value_requested_cb() - int bt_gatt_server_set_write_value_requested_cb( - bt_gatt_h gatt_handle, - bt_gatt_server_write_value_requested_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_server_set_write_value_requested_cb( - gatt_handle, - callback, - user_data, - ); - } - - late final _bt_gatt_server_set_write_value_requested_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_gatt_h, - bt_gatt_server_write_value_requested_cb, - ffi.Pointer)>>( - 'bt_gatt_server_set_write_value_requested_cb'); - late final _bt_gatt_server_set_write_value_requested_cb = - _bt_gatt_server_set_write_value_requested_cbPtr.asFunction< - int Function(bt_gatt_h, bt_gatt_server_write_value_requested_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Registers a specified service to the specified GATT server that the local device is hosting. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] server The GATT server that local device is hosting - /// @param[in] service The service, which needs to be registered in @a server - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_ALREADY_DONE Operation is already done - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_server_create() - /// @see bt_gatt_service_create() - /// @see bt_gatt_server_start() - /// @see bt_gatt_server_unregister_service() - int bt_gatt_server_register_service( - bt_gatt_server_h server, - bt_gatt_h service, - ) { - return _bt_gatt_server_register_service( - server, - service, - ); - } - - late final _bt_gatt_server_register_servicePtr = _lookup< - ffi.NativeFunction>( - 'bt_gatt_server_register_service'); - late final _bt_gatt_server_register_service = - _bt_gatt_server_register_servicePtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Unregisters a specified service from the specified GATT server that the local device is hosting. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] server The GATT server that local device is hosting - /// @param[in] service The service, which needs to be unregistered from @a server - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_SERVICE_NOT_FOUND Service not found - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_server_register_service() - int bt_gatt_server_unregister_service( - bt_gatt_server_h server, - bt_gatt_h service, - ) { - return _bt_gatt_server_unregister_service( - server, - service, - ); - } - - late final _bt_gatt_server_unregister_servicePtr = _lookup< - ffi.NativeFunction>( - 'bt_gatt_server_unregister_service'); - late final _bt_gatt_server_unregister_service = - _bt_gatt_server_unregister_servicePtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Unregisters all services from the specified GATT server that the local device is hosting. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] server The GATT server that local device is hosting - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_server_register_service() - int bt_gatt_server_unregister_all_services( - bt_gatt_server_h server, - ) { - return _bt_gatt_server_unregister_all_services( - server, - ); - } - - late final _bt_gatt_server_unregister_all_servicesPtr = - _lookup>( - 'bt_gatt_server_unregister_all_services'); - late final _bt_gatt_server_unregister_all_services = - _bt_gatt_server_unregister_all_servicesPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Registers the application along with the GATT services of the application it is hosting. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_ALREADY_DONE Operation is already done - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_server_initialize() - /// @see bt_gatt_server_create() - /// @see bt_gatt_service_create() - /// @see bt_gatt_server_unregister_service() - int bt_gatt_server_start() { - return _bt_gatt_server_start(); - } - - late final _bt_gatt_server_startPtr = - _lookup>('bt_gatt_server_start'); - late final _bt_gatt_server_start = - _bt_gatt_server_startPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Sends a response to the remote device as a result of a read/write request. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @remarks Until this function is called, a read/write request is not finished. - /// - /// @param[in] request_id The identification of a read/write request - /// @param[in] request_type The request type for read/write - /// @param[in] offset The offset from where a value is read - /// @param[in] resp_status The application error if any occurred or BT_ERROR_NONE for successful. - /// @param[in] value The value to be sent. It will be sent from @a offset. If it is NULL, a requested GATT handle's value will be sent from @a offset. - /// @param[in] value_length Value Length - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_server_read_value_requested_cb() - int bt_gatt_server_send_response( - int request_id, - int request_type, - int offset, - int resp_status, - ffi.Pointer value, - int value_length, - ) { - return _bt_gatt_server_send_response( - request_id, - request_type, - offset, - resp_status, - value, - value_length, - ); - } - - late final _bt_gatt_server_send_responsePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Int32, ffi.Int, ffi.Int, - ffi.Pointer, ffi.Int)>>('bt_gatt_server_send_response'); - late final _bt_gatt_server_send_response = - _bt_gatt_server_send_responsePtr.asFunction< - int Function(int, int, int, int, ffi.Pointer, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Notifies value change of the characteristic to the remote devices which enable a Client Characteristic Configuration Descriptor. - /// @since_tizen 3.0 - /// - /// @param[in] characteristic The characteristic which has a changed value - /// @param[in] callback The function to be invoked on each remote device when a sending operation is done - /// @param[in] device_address Remote device address to send notify or indicate and if set to NULL then notify/indicate all is enabled. - /// @param[in] user_data The user data to be passed to @a callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_server_notification_sent_cb() - int bt_gatt_server_notify_characteristic_changed_value( - bt_gatt_h characteristic, - bt_gatt_server_notification_sent_cb callback, - ffi.Pointer device_address, - ffi.Pointer user_data, - ) { - return _bt_gatt_server_notify_characteristic_changed_value( - characteristic, - callback, - device_address, - user_data, - ); - } - - late final _bt_gatt_server_notify_characteristic_changed_valuePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_h, bt_gatt_server_notification_sent_cb, - ffi.Pointer, ffi.Pointer)>>( - 'bt_gatt_server_notify_characteristic_changed_value'); - late final _bt_gatt_server_notify_characteristic_changed_value = - _bt_gatt_server_notify_characteristic_changed_valuePtr.asFunction< - int Function(bt_gatt_h, bt_gatt_server_notification_sent_cb, - ffi.Pointer, ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Gets a service's GATT handle which has specific UUID. - /// @since_tizen 3.0 - /// - /// @remarks The returned GATT handle must not be freed by application. \n - /// It will be freed when an associated server is destroyed by bt_gatt_server_destroy(). \n - /// If there are multiple services which have same UUID, only the first matched one will be returned. - /// - /// @param[in] server The GATT server's handle - /// @param[in] uuid The service's GATT handle which has this UUID will be returned if it exists - /// @param[out] service The service's GATT handle which has @a uuid if it exists - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NO_DATA No data available - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - int bt_gatt_server_get_service( - bt_gatt_server_h server, - ffi.Pointer uuid, - ffi.Pointer service, - ) { - return _bt_gatt_server_get_service( - server, - uuid, - service, - ); - } - - late final _bt_gatt_server_get_servicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_server_h, ffi.Pointer, - ffi.Pointer)>>('bt_gatt_server_get_service'); - late final _bt_gatt_server_get_service = - _bt_gatt_server_get_servicePtr.asFunction< - int Function(bt_gatt_server_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE - /// @brief Invokes @a callback function on each service that belongs to the specified GATT server. - /// @since_tizen 3.0 - /// - /// @param[in] server The GATT server's handle - /// @param[in] callback The function to be invoked on each service - /// @param[in] user_data The user data to be passed to @a callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @see bt_gatt_foreach_cb() - int bt_gatt_server_foreach_services( - bt_gatt_server_h server, - bt_gatt_foreach_cb callback, - ffi.Pointer user_data, - ) { - return _bt_gatt_server_foreach_services( - server, - callback, - user_data, - ); - } - - late final _bt_gatt_server_foreach_servicesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_gatt_server_h, bt_gatt_foreach_cb, - ffi.Pointer)>>('bt_gatt_server_foreach_services'); - late final _bt_gatt_server_foreach_services = - _bt_gatt_server_foreach_servicesPtr.asFunction< - int Function( - bt_gatt_server_h, bt_gatt_foreach_cb, ffi.Pointer)>(); - - /// @WEARABLE_ONLY - /// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE - /// @brief Initializes the Bluetooth PBAP Client. - /// @details This initialization is necessary to call other PBAP client APIs. - /// @since_tizen 3.0 - /// - /// @remarks This function must be called to initialize Bluetooth PBAP client. You must free all resources of the Bluetooth service \n - /// by calling bt_pbap_client_deinitialize() if Bluetooth PBAP Client is no longer needed. - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of the local Bluetooth adapter must be #BT_ADAPTER_ENABLED. - /// - /// @see bt_pbap_client_deinitialize() - /// @see bt_pbap_client_connect() - /// @see bt_pbap_client_disconnect() - /// @see bt_pbap_client_get_phone_book_size() - /// @see bt_pbap_client_get_phone_book() - /// @see bt_pbap_client_get_list() - /// @see bt_pbap_client_pull_vcard() - /// @see bt_pbap_client_search_phone_book() - int bt_pbap_client_initialize() { - return _bt_pbap_client_initialize(); - } - - late final _bt_pbap_client_initializePtr = - _lookup>( - 'bt_pbap_client_initialize'); - late final _bt_pbap_client_initialize = - _bt_pbap_client_initializePtr.asFunction(); - - /// @WEARABLE_ONLY - /// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE - /// @brief Deinitializes the Bluetooth PBAP Client. - /// @details This deinitialization must be done to free resources when the PBAP client is not longer needed. - /// @since_tizen 3.0 - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_ENABLED Not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of the local Bluetooth adapter must be #BT_ADAPTER_ENABLED. - /// The PBAP client must be initialized with bt_pbap_client_initialize(). - /// @see bt_pbap_client_deinitialize() - /// @see bt_pbap_client_connect() - /// @see bt_pbap_client_disconnect() - /// @see bt_pbap_client_get_phone_book_size() - /// @see bt_pbap_client_get_phone_book() - /// @see bt_pbap_client_get_list() - /// @see bt_pbap_client_pull_vcard() - /// @see bt_pbap_client_search_phone_book() - int bt_pbap_client_deinitialize() { - return _bt_pbap_client_deinitialize(); - } - - late final _bt_pbap_client_deinitializePtr = - _lookup>( - 'bt_pbap_client_deinitialize'); - late final _bt_pbap_client_deinitialize = - _bt_pbap_client_deinitializePtr.asFunction(); - - /// @WEARABLE_ONLY - /// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE - /// @brief Registers a callback function that will be invoked when the connection state is changed. - /// @since_tizen 3.0 - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The PBAP client must be initialized with bt_pbap_client_initialize(). - /// @see bt_pbap_client_initialize() - int bt_pbap_client_set_connection_state_changed_cb( - bt_pbap_connection_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _bt_pbap_client_set_connection_state_changed_cb( - callback, - user_data, - ); - } - - late final _bt_pbap_client_set_connection_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_pbap_connection_state_changed_cb, ffi.Pointer)>>( - 'bt_pbap_client_set_connection_state_changed_cb'); - late final _bt_pbap_client_set_connection_state_changed_cb = - _bt_pbap_client_set_connection_state_changed_cbPtr.asFunction< - int Function( - bt_pbap_connection_state_changed_cb, ffi.Pointer)>(); - - /// @WEARABLE_ONLY - /// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE - /// @brief Unregisters a callback function that will be invoked when the connection state is changed. - /// @since_tizen 3.0 - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The PBAP client must be initialized with bt_pbap_client_initialize(). - /// @see bt_pbap_client_initialize() - int bt_pbap_client_unset_connection_state_changed_cb() { - return _bt_pbap_client_unset_connection_state_changed_cb(); - } - - late final _bt_pbap_client_unset_connection_state_changed_cbPtr = - _lookup>( - 'bt_pbap_client_unset_connection_state_changed_cb'); - late final _bt_pbap_client_unset_connection_state_changed_cb = - _bt_pbap_client_unset_connection_state_changed_cbPtr - .asFunction(); - - /// @WEARABLE_ONLY - /// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE - /// @brief Connects to PBAP server, asynchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/bluetooth - /// - /// @param[in] address The other device's address - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of the local Bluetooth adapter must be #BT_ADAPTER_ENABLED. - /// @pre The PBAP client must be initialized with bt_pbap_client_initialize(). - /// @pre The local device must be bonded with the remote device by bt_device_create_bond(). - /// @post bt_pbap_connection_state_changed_cb() will be invoked. - /// @see bt_pbap_client_disconnect() - /// @see bt_pbap_client_set_connection_state_changed_cb() - int bt_pbap_client_connect( - ffi.Pointer address, - ) { - return _bt_pbap_client_connect( - address, - ); - } - - late final _bt_pbap_client_connectPtr = - _lookup)>>( - 'bt_pbap_client_connect'); - late final _bt_pbap_client_connect = _bt_pbap_client_connectPtr - .asFunction)>(); - - /// @WEARABLE_ONLY - /// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE - /// @brief Disconnects from PBAP server, asynchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/bluetooth - /// - /// @param[in] address The other device's address - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of the local Bluetooth adapter must be #BT_ADAPTER_ENABLED. - /// @pre The PBAP client must be initialized with bt_pbap_client_initialize(). - /// @pre PBAP connection must be created with bt_pbap_client_connect(). - /// @post bt_pbap_connection_state_changed_cb() will be invoked. - /// @see bt_pbap_client_connect() - /// @see bt_pbap_client_set_connection_state_changed_cb() - int bt_pbap_client_disconnect( - ffi.Pointer address, - ) { - return _bt_pbap_client_disconnect( - address, - ); - } - - late final _bt_pbap_client_disconnectPtr = - _lookup)>>( - 'bt_pbap_client_disconnect'); - late final _bt_pbap_client_disconnect = _bt_pbap_client_disconnectPtr - .asFunction)>(); - - /// @WEARABLE_ONLY - /// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE - /// @brief Gets size of phone book from PBAP server, asynchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/bluetooth - /// - /// @param[in] address The other device's address - /// @param[in] source Source of the phone book (Phone/SIM) - /// @param[in] folder_type Type of folder - /// @param[in] callback The callback function called when PBAP phone book size is returned. - /// @param[in] user_data Data to be passed to the PBAP phone book size callback. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of the local Bluetooth adapter must be #BT_ADAPTER_ENABLED. - /// @pre The PBAP client must be initialized with bt_pbap_client_initialize(). - /// @pre PBAP connection must be created with bt_pbap_client_connect(). - /// - /// @see bt_pbap_client_connect() - int bt_pbap_client_get_phone_book_size( - ffi.Pointer address, - int source, - int folder_type, - bt_pbap_phone_book_size_cb callback, - ffi.Pointer user_data, - ) { - return _bt_pbap_client_get_phone_book_size( - address, - source, - folder_type, - callback, - user_data, - ); - } - - late final _bt_pbap_client_get_phone_book_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Int32, - bt_pbap_phone_book_size_cb, - ffi.Pointer)>>('bt_pbap_client_get_phone_book_size'); - late final _bt_pbap_client_get_phone_book_size = - _bt_pbap_client_get_phone_book_sizePtr.asFunction< - int Function(ffi.Pointer, int, int, - bt_pbap_phone_book_size_cb, ffi.Pointer)>(); - - /// @WEARABLE_ONLY - /// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE - /// @brief Gets all contacts and call logs as vCard from PBAP server, asynchronously. - /// @details The received phone book file will be saved in the platform downloads folder. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/bluetooth - /// http://tizen.org/privilege/mediastorage - /// - /// @param[in] address The other device's address - /// @param[in] source Source of phone book (Phone/SIM) - /// @param[in] folder_type Type of folder - /// @param[in] format The vCard format - /// @param[in] order Specifies which field shall be used to sort vCards. - /// @param[in] offset The number of vCards to be excluded, counting from the beginning - /// @param[in] max_list_count The maximum number of vCards to be fetched - /// @param[in] fields vCard fields to be fetched; one or more #bt_pbap_field_e values combined with bitwise 'or' - /// @param[in] callback The callback function called when PBAP phone book is Pulled. - /// @param[in] user_data Data to be passed to the PBAP phone book pulling callback. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of the local Bluetooth adapter must be #BT_ADAPTER_ENABLED. - /// @pre The PBAP client must be initialized with bt_pbap_client_initialize(). - /// @pre PBAP connection must be created with bt_pbap_client_connect(). - /// - /// @see bt_pbap_client_connect() - int bt_pbap_client_get_phone_book( - ffi.Pointer address, - int source, - int folder_type, - int format, - int order, - int offset, - int max_list_count, - int fields, - bt_pbap_phone_book_received_cb callback, - ffi.Pointer user_data, - ) { - return _bt_pbap_client_get_phone_book( - address, - source, - folder_type, - format, - order, - offset, - max_list_count, - fields, - callback, - user_data, - ); - } - - late final _bt_pbap_client_get_phone_bookPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Int32, - ffi.Int32, - ffi.UnsignedShort, - ffi.UnsignedShort, - ffi.UnsignedInt, - bt_pbap_phone_book_received_cb, - ffi.Pointer)>>('bt_pbap_client_get_phone_book'); - late final _bt_pbap_client_get_phone_book = - _bt_pbap_client_get_phone_bookPtr.asFunction< - int Function(ffi.Pointer, int, int, int, int, int, int, int, - bt_pbap_phone_book_received_cb, ffi.Pointer)>(); - - /// @WEARABLE_ONLY - /// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE - /// @brief Gets contact and call log information from the PBAP server, asynchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/bluetooth - /// - /// @param[in] address The other device's address - /// @param[in] source Source of phone book (Phone/SIM) - /// @param[in] folder_type Type of folder - /// @param[in] order Specifies which field shall be used to sort vCards. - /// @param[in] offset vCards to be excluded from beginning. - /// @param[in] max_list_count Maximum number of vCards to be fetched - /// @param[in] callback The callback function called when PBAP List is returned. - /// @param[in] user_data Data to be passed to the PBAP phone book pulling callback. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of the local Bluetooth adapter must be #BT_ADAPTER_ENABLED. - /// @pre The PBAP client must be initialized with bt_pbap_client_initialize(). - /// @pre PBAP connection must be created with bt_pbap_client_connect(). - /// - /// @see bt_pbap_client_connect() - int bt_pbap_client_get_list( - ffi.Pointer address, - int source, - int folder_type, - int order, - int offset, - int max_list_count, - bt_pbap_list_vcards_cb callback, - ffi.Pointer user_data, - ) { - return _bt_pbap_client_get_list( - address, - source, - folder_type, - order, - offset, - max_list_count, - callback, - user_data, - ); - } - - late final _bt_pbap_client_get_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Int32, - ffi.UnsignedShort, - ffi.UnsignedShort, - bt_pbap_list_vcards_cb, - ffi.Pointer)>>('bt_pbap_client_get_list'); - late final _bt_pbap_client_get_list = _bt_pbap_client_get_listPtr.asFunction< - int Function(ffi.Pointer, int, int, int, int, int, - bt_pbap_list_vcards_cb, ffi.Pointer)>(); - - /// @WEARABLE_ONLY - /// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE - /// @brief Gets the selected contact using the index parameter as vCard from PBAP server, asynchronously. - /// @details The received phone book file will be saved in the platform downloads folder. - /// The @a index value should be equal to the value of the @a index field in the #bt_pbap_vcard_info_s structure, - /// which can be obtained with bt_pbap_client_get_list() or bt_pbap_client_search_phone_book(). - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/bluetooth - /// http://tizen.org/privilege/mediastorage - /// - /// @param[in] address The other device's address - /// @param[in] source Source of phone book (Phone/SIM) - /// @param[in] folder_type Type of folder - /// @param[in] index The handle index of vCard to be fetched - /// @param[in] format Format of vCard - /// @param[in] fields vCard fields to be fetched; one or more #bt_pbap_field_e values combined with bitwise 'or' - /// @param[in] callback The callback function called when PBAP phone book is Pulled. - /// @param[in] user_data Data to be passed to the PBAP phone book Pulling callback. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of the local Bluetooth adapter must be #BT_ADAPTER_ENABLED. - /// @pre The PBAP client must be initialized with bt_pbap_client_initialize(). - /// @pre PBAP connection must be created with bt_pbap_client_connect(). - /// @pre The vCard information (#bt_pbap_vcard_info_s) must be obtained with bt_pbap_client_get_list() or bt_pbap_client_search_phone_book(). - /// @see bt_pbap_client_connect() - /// @see bt_pbap_client_get_list() - /// @see bt_pbap_client_search_phone_book() - int bt_pbap_client_pull_vcard( - ffi.Pointer address, - int source, - int folder_type, - int index, - int format, - int fields, - bt_pbap_phone_book_received_cb callback, - ffi.Pointer user_data, - ) { - return _bt_pbap_client_pull_vcard( - address, - source, - folder_type, - index, - format, - fields, - callback, - user_data, - ); - } - - late final _bt_pbap_client_pull_vcardPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Int, - ffi.Int32, - ffi.UnsignedInt, - bt_pbap_phone_book_received_cb, - ffi.Pointer)>>('bt_pbap_client_pull_vcard'); - late final _bt_pbap_client_pull_vcard = - _bt_pbap_client_pull_vcardPtr.asFunction< - int Function(ffi.Pointer, int, int, int, int, int, - bt_pbap_phone_book_received_cb, ffi.Pointer)>(); - - /// @WEARABLE_ONLY - /// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE - /// @brief Finds and fetches the contact and call log information from the PBAP server, asynchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/bluetooth - /// - /// @param[in] address The other device's address - /// @param[in] source Source of phone book (Phone/SIM) - /// @param[in] folder_type Type of folder - /// @param[in] search_attribute field to be search - /// @param[in] search_value pattern to be searched for - /// @param[in] order Specifies which field shall be used to sort vCards. - /// @param[in] offset vCards to be excluded from beginning. - /// @param[in] max_list_count Maximum number of vCards to be fetched - /// @param[in] callback The callback function called when PBAP List is returned. - /// @param[in] user_data Data to be passed to the PBAP phone book pulling callback. - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of the local Bluetooth adapter must be #BT_ADAPTER_ENABLED. - /// @pre The PBAP client must be initialized with bt_pbap_client_initialize(). - /// @pre PBAP connection must be created with bt_pbap_client_connect(). - /// - /// @see bt_pbap_client_connect() - int bt_pbap_client_search_phone_book( - ffi.Pointer address, - int source, - int folder_type, - int search_attribute, - ffi.Pointer search_value, - int order, - int offset, - int max_list_count, - bt_pbap_list_vcards_cb callback, - ffi.Pointer user_data, - ) { - return _bt_pbap_client_search_phone_book( - address, - source, - folder_type, - search_attribute, - search_value, - order, - offset, - max_list_count, - callback, - user_data, - ); - } - - late final _bt_pbap_client_search_phone_bookPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Int32, - ffi.Pointer, - ffi.Int32, - ffi.UnsignedShort, - ffi.UnsignedShort, - bt_pbap_list_vcards_cb, - ffi.Pointer)>>('bt_pbap_client_search_phone_book'); - late final _bt_pbap_client_search_phone_book = - _bt_pbap_client_search_phone_bookPtr.asFunction< - int Function( - ffi.Pointer, - int, - int, - int, - ffi.Pointer, - int, - int, - int, - bt_pbap_list_vcards_cb, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Creates a scan filter to find only LE advertisements which match specific requirements. - /// @details If the filter's attribute is not set, then the filter will accept - /// all values of that attribute. If an attribute is set, the filter - /// will accept only advertisements which match the set attribute. - /// - /// For example, if device name is set with - /// bt_adapter_le_scan_filter_set_device_name(), the filter will accept - /// only advertisements from devices with the given name. If device name - /// is not set, advertisements will be filtered without regard to device - /// names. - /// @since_tizen 4.0 - /// - /// @remarks The @a scan_filter should be destroyed with bt_adapter_le_scan_filter_destroy(). - /// - /// @param[out] scan_filter The scan filter handle - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_scan_filter_destroy() - int bt_adapter_le_scan_filter_create( - ffi.Pointer scan_filter, - ) { - return _bt_adapter_le_scan_filter_create( - scan_filter, - ); - } - - late final _bt_adapter_le_scan_filter_createPtr = _lookup< - ffi.NativeFunction)>>( - 'bt_adapter_le_scan_filter_create'); - late final _bt_adapter_le_scan_filter_create = - _bt_adapter_le_scan_filter_createPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Destroys a scan filter. - /// @since_tizen 4.0 - /// - /// @param[in] scan_filter The scan filter handle - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - /// - /// @see bt_adapter_le_scan_filter_create() - int bt_adapter_le_scan_filter_destroy( - bt_scan_filter_h scan_filter, - ) { - return _bt_adapter_le_scan_filter_destroy( - scan_filter, - ); - } - - late final _bt_adapter_le_scan_filter_destroyPtr = - _lookup>( - 'bt_adapter_le_scan_filter_destroy'); - late final _bt_adapter_le_scan_filter_destroy = - _bt_adapter_le_scan_filter_destroyPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets the device address for the advertisements filter. - /// @since_tizen 4.0 - /// - /// @param[in] scan_filter The scan filter handle - /// @param[in] address The device address by which advertisements will be filtered - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_set_device_address( - bt_scan_filter_h scan_filter, - ffi.Pointer address, - ) { - return _bt_adapter_le_scan_filter_set_device_address( - scan_filter, - address, - ); - } - - late final _bt_adapter_le_scan_filter_set_device_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_scan_filter_h, ffi.Pointer)>>( - 'bt_adapter_le_scan_filter_set_device_address'); - late final _bt_adapter_le_scan_filter_set_device_address = - _bt_adapter_le_scan_filter_set_device_addressPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets the device name for the advertisements filter. - /// @details Any previously set value will be overwritten. - /// @since_tizen 4.0 - /// - /// @param[in] scan_filter The scan filter handle - /// @param[in] name The device name by which advertisements will be filtered - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_set_device_name( - bt_scan_filter_h scan_filter, - ffi.Pointer name, - ) { - return _bt_adapter_le_scan_filter_set_device_name( - scan_filter, - name, - ); - } - - late final _bt_adapter_le_scan_filter_set_device_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_scan_filter_h, ffi.Pointer)>>( - 'bt_adapter_le_scan_filter_set_device_name'); - late final _bt_adapter_le_scan_filter_set_device_name = - _bt_adapter_le_scan_filter_set_device_namePtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets the service UUID for the advertisements filter. - /// @details Any previously set value will be overwritten. - /// @since_tizen 4.0 - /// - /// @param[in] scan_filter The scan filter handle - /// @param[in] uuid The service UUID by which advertisements will be filtered - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_set_service_uuid( - bt_scan_filter_h scan_filter, - ffi.Pointer uuid, - ) { - return _bt_adapter_le_scan_filter_set_service_uuid( - scan_filter, - uuid, - ); - } - - late final _bt_adapter_le_scan_filter_set_service_uuidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_scan_filter_h, ffi.Pointer)>>( - 'bt_adapter_le_scan_filter_set_service_uuid'); - late final _bt_adapter_le_scan_filter_set_service_uuid = - _bt_adapter_le_scan_filter_set_service_uuidPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets the service UUID and the mask for the advertisements filter, - /// to use for filtering by partial data. - /// @details Any previously set value will be overwritten. The mask works as follows: - /// For each bit set to 1 in the mask, the corresponding bits in @a uuid - /// and in the filtered data will have to be equal. If the mask bit is set to 0, - /// the corresponding bits will be ignored. - /// @since_tizen 4.0 - /// - /// @remarks The @a mask and the service @a uuid must have equal lengths. - /// - /// @param[in] scan_filter The scan filter handle - /// @param[in] uuid The service UUID by which advertisements will be filtered - /// @param[in] mask The mask to filter advertisements - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_set_service_uuid_with_mask( - bt_scan_filter_h scan_filter, - ffi.Pointer uuid, - ffi.Pointer mask, - ) { - return _bt_adapter_le_scan_filter_set_service_uuid_with_mask( - scan_filter, - uuid, - mask, - ); - } - - late final _bt_adapter_le_scan_filter_set_service_uuid_with_maskPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_scan_filter_h, ffi.Pointer, - ffi.Pointer)>>( - 'bt_adapter_le_scan_filter_set_service_uuid_with_mask'); - late final _bt_adapter_le_scan_filter_set_service_uuid_with_mask = - _bt_adapter_le_scan_filter_set_service_uuid_with_maskPtr.asFunction< - int Function(bt_scan_filter_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets the service solicitation UUID for the advertisements filter. - /// @details Any previously set value will be overwritten. - /// @since_tizen 4.0 - /// - /// @param[in] scan_filter The scan filter handle - /// @param[in] uuid The service solicitation UUID by which advertisements will be filtered - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_set_service_solicitation_uuid( - bt_scan_filter_h scan_filter, - ffi.Pointer uuid, - ) { - return _bt_adapter_le_scan_filter_set_service_solicitation_uuid( - scan_filter, - uuid, - ); - } - - late final _bt_adapter_le_scan_filter_set_service_solicitation_uuidPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_scan_filter_h, ffi.Pointer)>>( - 'bt_adapter_le_scan_filter_set_service_solicitation_uuid'); - late final _bt_adapter_le_scan_filter_set_service_solicitation_uuid = - _bt_adapter_le_scan_filter_set_service_solicitation_uuidPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets the service solicitation UUID and the mask for the advertisements filter, - /// to use for filtering by partial data. - /// @details Any previously set value will be overwritten. The mask works as follows: - /// For each bit set to 1 in the mask, the corresponding bits in @a uuid - /// and in the filtered data will have to be equal. If the mask bit is set to 0, - /// the corresponding bits will be ignored. - /// @since_tizen 4.0 - /// - /// @remarks The @a mask and the service solicitation @a uuid must have equal lengths. - /// - /// @param[in] scan_filter The scan filter handle - /// @param[in] uuid The service solicitation UUID by which advertisements will be filtered - /// @param[in] mask The mask by which advertisements will be filtered - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_set_service_solicitation_uuid_with_mask( - bt_scan_filter_h scan_filter, - ffi.Pointer uuid, - ffi.Pointer mask, - ) { - return _bt_adapter_le_scan_filter_set_service_solicitation_uuid_with_mask( - scan_filter, - uuid, - mask, - ); - } - - late final _bt_adapter_le_scan_filter_set_service_solicitation_uuid_with_maskPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_scan_filter_h, ffi.Pointer, - ffi.Pointer)>>( - 'bt_adapter_le_scan_filter_set_service_solicitation_uuid_with_mask'); - late final _bt_adapter_le_scan_filter_set_service_solicitation_uuid_with_mask = - _bt_adapter_le_scan_filter_set_service_solicitation_uuid_with_maskPtr - .asFunction< - int Function(bt_scan_filter_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets the service data for the advertisements filter. - /// @details Any previously set value will be overwritten. - /// @since_tizen 4.0 - /// - /// @param[in] scan_filter The scan filter handle - /// @param[in] uuid The service UUID by which advertisements will be filtered - /// @param[in] data The service data by which advertisements will be filtered - /// @param[in] data_len The length of the service data - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_set_service_data( - bt_scan_filter_h scan_filter, - ffi.Pointer uuid, - ffi.Pointer data, - int data_len, - ) { - return _bt_adapter_le_scan_filter_set_service_data( - scan_filter, - uuid, - data, - data_len, - ); - } - - late final _bt_adapter_le_scan_filter_set_service_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_scan_filter_h, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt)>>('bt_adapter_le_scan_filter_set_service_data'); - late final _bt_adapter_le_scan_filter_set_service_data = - _bt_adapter_le_scan_filter_set_service_dataPtr.asFunction< - int Function(bt_scan_filter_h, ffi.Pointer, - ffi.Pointer, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets the service data and the mask for the advertisements filter, - /// to use for filtering by partial data. - /// @details Any previously set value will be overwritten. The mask works as follows: - /// For each bit set to 1 in the mask, the corresponding bits in @a data - /// and in the filtered data will have to be equal. If the mask bit is set to 0, - /// the corresponding bits will be ignored. - /// @since_tizen 4.0 - /// - /// @remarks The @a mask and the service @a data must have equal lengths. - /// - /// @param[in] scan_filter The scan filter handle - /// @param[in] uuid The service UUID by which advertisements will be filtered - /// @param[in] data The service data by which advertisements will be filtered - /// @param[in] data_len The length of the service data - /// @param[in] mask The mask by which advertisements will be filtered - /// @param[in] mask_len The length of the mask - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_set_service_data_with_mask( - bt_scan_filter_h scan_filter, - ffi.Pointer uuid, - ffi.Pointer data, - int data_len, - ffi.Pointer mask, - int mask_len, - ) { - return _bt_adapter_le_scan_filter_set_service_data_with_mask( - scan_filter, - uuid, - data, - data_len, - mask, - mask_len, - ); - } - - late final _bt_adapter_le_scan_filter_set_service_data_with_maskPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_scan_filter_h, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.Pointer, - ffi.UnsignedInt)>>( - 'bt_adapter_le_scan_filter_set_service_data_with_mask'); - late final _bt_adapter_le_scan_filter_set_service_data_with_mask = - _bt_adapter_le_scan_filter_set_service_data_with_maskPtr.asFunction< - int Function(bt_scan_filter_h, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets the manufacturer data for the advertisements filter. - /// @details Any previously set value will be overwritten. - /// @since_tizen 4.0 - /// - /// @param[in] scan_filter The scan filter handle - /// @param[in] manufacturer_id The manufacturer ID (0x0000 ~ 0xFFFF) - /// @param[in] data The manufacturer data (byte array) - /// @param[in] data_len The length of the manufacturer data - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_set_manufacturer_data( - bt_scan_filter_h scan_filter, - int manufacturer_id, - ffi.Pointer data, - int data_len, - ) { - return _bt_adapter_le_scan_filter_set_manufacturer_data( - scan_filter, - manufacturer_id, - data, - data_len, - ); - } - - late final _bt_adapter_le_scan_filter_set_manufacturer_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(bt_scan_filter_h, ffi.Int, ffi.Pointer, - ffi.UnsignedInt)>>( - 'bt_adapter_le_scan_filter_set_manufacturer_data'); - late final _bt_adapter_le_scan_filter_set_manufacturer_data = - _bt_adapter_le_scan_filter_set_manufacturer_dataPtr.asFunction< - int Function(bt_scan_filter_h, int, ffi.Pointer, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets the manufacturer data and the mask for the advertisements filter, - /// to use for filtering by partial data. - /// @details Any previously set value will be overwritten. The mask works as follows: - /// For each bit set to 1 in the mask, the corresponding bits in @a data - /// and in the filtered data will have to be equal. If the mask bit is set to 0, - /// the corresponding bits will be ignored. - /// @since_tizen 4.0 - /// - /// @remarks The @a mask and the manufacturer @a data must have equal lengths. - /// - /// @param[in] scan_filter The scan filter handle - /// @param[in] manufacturer_id The manufacturer ID (0x0000 ~ 0xFFFF) - /// @param[in] data The manufacturer data (byte array) - /// @param[in] data_len The length of the manufacturer data - /// @param[in] mask The mask by which advertisements will be filtered - /// @param[in] mask_len The length of the mask - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_set_manufacturer_data_with_mask( - bt_scan_filter_h scan_filter, - int manufacturer_id, - ffi.Pointer data, - int data_len, - ffi.Pointer mask, - int mask_len, - ) { - return _bt_adapter_le_scan_filter_set_manufacturer_data_with_mask( - scan_filter, - manufacturer_id, - data, - data_len, - mask, - mask_len, - ); - } - - late final _bt_adapter_le_scan_filter_set_manufacturer_data_with_maskPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - bt_scan_filter_h, - ffi.Int, - ffi.Pointer, - ffi.UnsignedInt, - ffi.Pointer, - ffi.UnsignedInt)>>( - 'bt_adapter_le_scan_filter_set_manufacturer_data_with_mask'); - late final _bt_adapter_le_scan_filter_set_manufacturer_data_with_mask = - _bt_adapter_le_scan_filter_set_manufacturer_data_with_maskPtr.asFunction< - int Function(bt_scan_filter_h, int, ffi.Pointer, int, - ffi.Pointer, int)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Sets the scan filter type for the advertisements filter. - /// @details The filter type is used when searching only for iBeacon or proximity - /// type's advertising data. If the type is not set, LE scanner will - /// search devices as with regard to other filtered attributes. - /// If the type is set, all other attributes set for the filter are ignored. - /// @since_tizen 4.0 - /// - /// @param[in] scan_filter The scan filter handle - /// @param[in] mode The scan filter type - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_set_type( - bt_scan_filter_h scan_filter, - int mode, - ) { - return _bt_adapter_le_scan_filter_set_type( - scan_filter, - mode, - ); - } - - late final _bt_adapter_le_scan_filter_set_typePtr = _lookup< - ffi.NativeFunction>( - 'bt_adapter_le_scan_filter_set_type'); - late final _bt_adapter_le_scan_filter_set_type = - _bt_adapter_le_scan_filter_set_typePtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Registers a scan filter to use for scanning. - /// @details If the filter is registered, it cannot be changed. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @remarks Several scan filters can be registered. If an advertisement passes \n - /// any of the registered scan filters, it will be included in the results. - /// - /// @param[in] scan_filter The scan filter handle - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOW_IN_PROGRESS Scan is in progress - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_register( - bt_scan_filter_h scan_filter, - ) { - return _bt_adapter_le_scan_filter_register( - scan_filter, - ); - } - - late final _bt_adapter_le_scan_filter_registerPtr = - _lookup>( - 'bt_adapter_le_scan_filter_register'); - late final _bt_adapter_le_scan_filter_register = - _bt_adapter_le_scan_filter_registerPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Unregisters all registered scan filters. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @param[in] scan_filter The scan filter handle - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOW_IN_PROGRESS Scan is in progress - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_unregister( - bt_scan_filter_h scan_filter, - ) { - return _bt_adapter_le_scan_filter_unregister( - scan_filter, - ); - } - - late final _bt_adapter_le_scan_filter_unregisterPtr = - _lookup>( - 'bt_adapter_le_scan_filter_unregister'); - late final _bt_adapter_le_scan_filter_unregister = - _bt_adapter_le_scan_filter_unregisterPtr - .asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE - /// @brief Unregisters all registered scan filters. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/bluetooth - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_NOW_IN_PROGRESS Scan is in progress - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// @retval #BT_ERROR_PERMISSION_DENIED Permission denied - /// - /// @pre The Bluetooth service must be initialized with bt_initialize(). - int bt_adapter_le_scan_filter_unregister_all() { - return _bt_adapter_le_scan_filter_unregister_all(); - } - - late final _bt_adapter_le_scan_filter_unregister_allPtr = - _lookup>( - 'bt_adapter_le_scan_filter_unregister_all'); - late final _bt_adapter_le_scan_filter_unregister_all = - _bt_adapter_le_scan_filter_unregister_allPtr.asFunction(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_50_MODULE - /// @brief Checks if LE 2M PHY feature is supported or not. - /// @since_tizen 5.0 - /// - /// @remarks The LE 2M PHY feature was introduced in the BT 5.0 core specification. - /// - /// @param[out] is_supported The LE 2M PHY feature support: (@c true = supported , @c false = not supported) - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - int bt_adapter_le_is_2m_phy_supported( - ffi.Pointer is_supported, - ) { - return _bt_adapter_le_is_2m_phy_supported( - is_supported, - ); - } - - late final _bt_adapter_le_is_2m_phy_supportedPtr = - _lookup)>>( - 'bt_adapter_le_is_2m_phy_supported'); - late final _bt_adapter_le_is_2m_phy_supported = - _bt_adapter_le_is_2m_phy_supportedPtr - .asFunction)>(); - - /// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_50_MODULE - /// @brief Checks if LE CODED PHY feature is supported or not. - /// @since_tizen 5.0 - /// - /// @remarks The LE CODED PHY feature was introduced in the BT 5.0 core specification. - /// - /// @param[out] is_supported The LE CODED PHY feature support: (@c true = supported , @c false = not supported) - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #BT_ERROR_NONE Successful - /// @retval #BT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled - /// @retval #BT_ERROR_OPERATION_FAILED Operation failed - /// @retval #BT_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED. - int bt_adapter_le_is_coded_phy_supported( - ffi.Pointer is_supported, - ) { - return _bt_adapter_le_is_coded_phy_supported( - is_supported, - ); - } - - late final _bt_adapter_le_is_coded_phy_supportedPtr = - _lookup)>>( - 'bt_adapter_le_is_coded_phy_supported'); - late final _bt_adapter_le_is_coded_phy_supported = - _bt_adapter_le_is_coded_phy_supportedPtr - .asFunction)>(); - - /// @brief Creates a profile handle. - /// @details The profile name, which you get from connection_profile_get_name() - /// will include the keyword you set. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @remarks You must release @a profile using connection_profile_destroy(). - /// @param[in] type The type of profile \n - /// #CONNECTION_PROFILE_TYPE_CELLULAR and #CONNECTION_PROFILE_TYPE_WIFI are supported - /// @param[in] keyword The keyword included in profile name - /// @param[out] profile The handle of the profile - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - /// @see connection_profile_destroy() - /// @see connection_profile_get_name() - int connection_profile_create( - int type, - ffi.Pointer keyword, - ffi.Pointer profile, - ) { - return _connection_profile_create( - type, - keyword, - profile, - ); - } - - late final _connection_profile_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer, - ffi.Pointer)>>('connection_profile_create'); - late final _connection_profile_create = - _connection_profile_createPtr.asFunction< - int Function( - int, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys a profile handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[out] profile The handle to the profile - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @see connection_profile_create() - int connection_profile_destroy( - connection_profile_h profile, - ) { - return _connection_profile_destroy( - profile, - ); - } - - late final _connection_profile_destroyPtr = - _lookup>( - 'connection_profile_destroy'); - late final _connection_profile_destroy = _connection_profile_destroyPtr - .asFunction(); - - /// @brief Clones a profile handle. - /// @since_tizen 2.3 - /// @remarks You must release @a cloned_profile using connection_profile_destroy(). - /// @param[out] cloned_profile The handle of the cloned profile - /// @param[in] origin_profile The handle of the origin profile - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @see connection_profile_destroy() - int connection_profile_clone( - ffi.Pointer cloned_profile, - connection_profile_h origin_profile, - ) { - return _connection_profile_clone( - cloned_profile, - origin_profile, - ); - } - - late final _connection_profile_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - connection_profile_h)>>('connection_profile_clone'); - late final _connection_profile_clone = - _connection_profile_clonePtr.asFunction< - int Function( - ffi.Pointer, connection_profile_h)>(); - - /// @brief Gets the profile ID. - /// @details The separate profiles can have the same name. - /// So, you must use this function instead of connection_profile_get_name() - /// if you want to get the unique identification. - /// In case you create a profile, this value will be determined when you add the profile. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a profile_id using free(). - /// @param[in] profile The profile handle - /// @param[out] profile_id The ID of the profile - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @see connection_profile_get_name() - /// @see connection_add_profile() - int connection_profile_get_id( - connection_profile_h profile, - ffi.Pointer> profile_id, - ) { - return _connection_profile_get_id( - profile, - profile_id, - ); - } - - late final _connection_profile_get_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_profile_h, ffi.Pointer>)>>( - 'connection_profile_get_id'); - late final _connection_profile_get_id = - _connection_profile_get_idPtr.asFunction< - int Function( - connection_profile_h, ffi.Pointer>)>(); - - /// @brief Gets the profile name. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a profile_name using free(). - /// @param[in] profile The profile handle - /// @param[out] profile_name The name of the profile - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @see connection_profile_get_id() - int connection_profile_get_name( - connection_profile_h profile, - ffi.Pointer> profile_name, - ) { - return _connection_profile_get_name( - profile, - profile_name, - ); - } - - late final _connection_profile_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_profile_h, ffi.Pointer>)>>( - 'connection_profile_get_name'); - late final _connection_profile_get_name = - _connection_profile_get_namePtr.asFunction< - int Function( - connection_profile_h, ffi.Pointer>)>(); - - /// @brief Gets the network type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[out] type The type of the profile - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_profile_get_type( - connection_profile_h profile, - ffi.Pointer type, - ) { - return _connection_profile_get_type( - profile, - type, - ); - } - - late final _connection_profile_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, - ffi.Pointer)>>('connection_profile_get_type'); - late final _connection_profile_get_type = _connection_profile_get_typePtr - .asFunction)>(); - - /// @brief Gets the name of the network interface, e.g. eth0 and pdp0. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a interface_name using free(). - /// @param[in] profile The profile handle - /// @param[out] interface_name The name of the network interface - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - int connection_profile_get_network_interface_name( - connection_profile_h profile, - ffi.Pointer> interface_name, - ) { - return _connection_profile_get_network_interface_name( - profile, - interface_name, - ); - } - - late final _connection_profile_get_network_interface_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_profile_h, ffi.Pointer>)>>( - 'connection_profile_get_network_interface_name'); - late final _connection_profile_get_network_interface_name = - _connection_profile_get_network_interface_namePtr.asFunction< - int Function( - connection_profile_h, ffi.Pointer>)>(); - - /// @brief Refreshes the profile information. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @remarks You should call this function in order to get the current information - /// because the profile information can be changed. - /// @param[in] profile The profile handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - int connection_profile_refresh( - connection_profile_h profile, - ) { - return _connection_profile_refresh( - profile, - ); - } - - late final _connection_profile_refreshPtr = - _lookup>( - 'connection_profile_refresh'); - late final _connection_profile_refresh = _connection_profile_refreshPtr - .asFunction(); - - /// @brief Gets the network state. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[out] state The state of the profile - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_profile_get_state( - connection_profile_h profile, - ffi.Pointer state, - ) { - return _connection_profile_get_state( - profile, - state, - ); - } - - late final _connection_profile_get_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, - ffi.Pointer)>>('connection_profile_get_state'); - late final _connection_profile_get_state = _connection_profile_get_statePtr - .asFunction)>(); - - /// @brief Gets the IP config type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[out] type The type of the IP config - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_profile_get_ip_config_type( - connection_profile_h profile, - int address_family, - ffi.Pointer type, - ) { - return _connection_profile_get_ip_config_type( - profile, - address_family, - type, - ); - } - - late final _connection_profile_get_ip_config_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_profile_h, ffi.Int32, ffi.Pointer)>>( - 'connection_profile_get_ip_config_type'); - late final _connection_profile_get_ip_config_type = - _connection_profile_get_ip_config_typePtr.asFunction< - int Function(connection_profile_h, int, ffi.Pointer)>(); - - /// @brief Gets the IP address. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a ip_address using free(). - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[out] ip_address The IP address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_profile_get_ip_address( - connection_profile_h profile, - int address_family, - ffi.Pointer> ip_address, - ) { - return _connection_profile_get_ip_address( - profile, - address_family, - ip_address, - ); - } - - late final _connection_profile_get_ip_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int32, - ffi.Pointer>)>>( - 'connection_profile_get_ip_address'); - late final _connection_profile_get_ip_address = - _connection_profile_get_ip_addressPtr.asFunction< - int Function( - connection_profile_h, int, ffi.Pointer>)>(); - - /// @brief Gets the Subnet Mask. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a subnet_mask using free(). - /// This function is supported only for IPv4 address family. - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[out] subnet_mask The subnet mask - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_profile_get_subnet_mask( - connection_profile_h profile, - int address_family, - ffi.Pointer> subnet_mask, - ) { - return _connection_profile_get_subnet_mask( - profile, - address_family, - subnet_mask, - ); - } - - late final _connection_profile_get_subnet_maskPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int32, - ffi.Pointer>)>>( - 'connection_profile_get_subnet_mask'); - late final _connection_profile_get_subnet_mask = - _connection_profile_get_subnet_maskPtr.asFunction< - int Function( - connection_profile_h, int, ffi.Pointer>)>(); - - /// @brief Gets the Gateway address. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a gateway_address using free(). - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[out] gateway_address The gateway address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_profile_get_gateway_address( - connection_profile_h profile, - int address_family, - ffi.Pointer> gateway_address, - ) { - return _connection_profile_get_gateway_address( - profile, - address_family, - gateway_address, - ); - } - - late final _connection_profile_get_gateway_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int32, - ffi.Pointer>)>>( - 'connection_profile_get_gateway_address'); - late final _connection_profile_get_gateway_address = - _connection_profile_get_gateway_addressPtr.asFunction< - int Function( - connection_profile_h, int, ffi.Pointer>)>(); - - /// @brief Gets the DHCP Server address. - /// @since_tizen 4.0 - /// @remarks You must release @a dhcp_server using free(). - /// This function is supported only for IPv4 address family. - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[out] dhcp_server The DHCP Server address - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_profile_get_dhcp_server_address( - connection_profile_h profile, - int address_family, - ffi.Pointer> dhcp_server, - ) { - return _connection_profile_get_dhcp_server_address( - profile, - address_family, - dhcp_server, - ); - } - - late final _connection_profile_get_dhcp_server_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int32, - ffi.Pointer>)>>( - 'connection_profile_get_dhcp_server_address'); - late final _connection_profile_get_dhcp_server_address = - _connection_profile_get_dhcp_server_addressPtr.asFunction< - int Function( - connection_profile_h, int, ffi.Pointer>)>(); - - /// @brief Gets the DHCP lease duration. - /// @since_tizen 4.0 - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[out] dhcp_lease_duration The DHCP lease duration in seconds - /// @return @c 0 on success, otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_dhcp_lease_duration( - connection_profile_h profile, - int address_family, - ffi.Pointer dhcp_lease_duration, - ) { - return _connection_profile_get_dhcp_lease_duration( - profile, - address_family, - dhcp_lease_duration, - ); - } - - late final _connection_profile_get_dhcp_lease_durationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_profile_h, ffi.Int32, ffi.Pointer)>>( - 'connection_profile_get_dhcp_lease_duration'); - late final _connection_profile_get_dhcp_lease_duration = - _connection_profile_get_dhcp_lease_durationPtr.asFunction< - int Function(connection_profile_h, int, ffi.Pointer)>(); - - /// @brief Gets the DNS address. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The allowance of the DNS address is @c 2. You must release @a dns_address using free(). - /// @param[in] profile The profile handle - /// @param[in] order The order of DNS address \n - /// It starts from 1, which means first DNS address - /// @param[in] address_family The address family - /// @param[out] dns_address The DNS address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_profile_get_dns_address( - connection_profile_h profile, - int order, - int address_family, - ffi.Pointer> dns_address, - ) { - return _connection_profile_get_dns_address( - profile, - order, - address_family, - dns_address, - ); - } - - late final _connection_profile_get_dns_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int, ffi.Int32, - ffi.Pointer>)>>( - 'connection_profile_get_dns_address'); - late final _connection_profile_get_dns_address = - _connection_profile_get_dns_addressPtr.asFunction< - int Function(connection_profile_h, int, int, - ffi.Pointer>)>(); - - /// @brief Gets the Proxy type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[out] type The type of the proxy - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_profile_get_proxy_type( - connection_profile_h profile, - ffi.Pointer type, - ) { - return _connection_profile_get_proxy_type( - profile, - type, - ); - } - - late final _connection_profile_get_proxy_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, - ffi.Pointer)>>('connection_profile_get_proxy_type'); - late final _connection_profile_get_proxy_type = - _connection_profile_get_proxy_typePtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Gets the Proxy address. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a proxy_address using free(). - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[out] proxy_address The proxy address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_profile_get_proxy_address( - connection_profile_h profile, - int address_family, - ffi.Pointer> proxy_address, - ) { - return _connection_profile_get_proxy_address( - profile, - address_family, - proxy_address, - ); - } - - late final _connection_profile_get_proxy_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int32, - ffi.Pointer>)>>( - 'connection_profile_get_proxy_address'); - late final _connection_profile_get_proxy_address = - _connection_profile_get_proxy_addressPtr.asFunction< - int Function( - connection_profile_h, int, ffi.Pointer>)>(); - - /// @brief Sets the IP config type. - /// @details If you set IP config type to #CONNECTION_IP_CONFIG_TYPE_STATIC, - /// then IP address, Gateway and Subnet mask will be set to the initial value "0.0.0.0". - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[in] type The type of the IP config - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_profile_set_ip_config_type( - connection_profile_h profile, - int address_family, - int type, - ) { - return _connection_profile_set_ip_config_type( - profile, - address_family, - type, - ); - } - - late final _connection_profile_set_ip_config_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int32, - ffi.Int32)>>('connection_profile_set_ip_config_type'); - late final _connection_profile_set_ip_config_type = - _connection_profile_set_ip_config_typePtr - .asFunction(); - - /// @brief Sets the IP address. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a ip_address using free(). - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[in] ip_address The IP address \n - /// If you set this value to @c NULL, then the existing value will be deleted - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @see connection_update_profile() - int connection_profile_set_ip_address( - connection_profile_h profile, - int address_family, - ffi.Pointer ip_address, - ) { - return _connection_profile_set_ip_address( - profile, - address_family, - ip_address, - ); - } - - late final _connection_profile_set_ip_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int32, - ffi.Pointer)>>('connection_profile_set_ip_address'); - late final _connection_profile_set_ip_address = - _connection_profile_set_ip_addressPtr.asFunction< - int Function(connection_profile_h, int, ffi.Pointer)>(); - - /// @brief Sets the Subnet Mask. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a subnet_mask using free(). - /// This function is supported only for IPv4 address family. - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[in] subnet_mask The subnet mask \n - /// If you set this value to @c NULL, then the existing value will be deleted - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @see connection_update_profile() - int connection_profile_set_subnet_mask( - connection_profile_h profile, - int address_family, - ffi.Pointer subnet_mask, - ) { - return _connection_profile_set_subnet_mask( - profile, - address_family, - subnet_mask, - ); - } - - late final _connection_profile_set_subnet_maskPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int32, - ffi.Pointer)>>('connection_profile_set_subnet_mask'); - late final _connection_profile_set_subnet_mask = - _connection_profile_set_subnet_maskPtr.asFunction< - int Function(connection_profile_h, int, ffi.Pointer)>(); - - /// @brief Sets the Gateway address. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a gateway_address using free(). - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[in] gateway_address The gateway address \n - /// If you set this value to @c NULL, then the existing value will be deleted - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @see connection_update_profile() - int connection_profile_set_gateway_address( - connection_profile_h profile, - int address_family, - ffi.Pointer gateway_address, - ) { - return _connection_profile_set_gateway_address( - profile, - address_family, - gateway_address, - ); - } - - late final _connection_profile_set_gateway_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_profile_h, ffi.Int32, ffi.Pointer)>>( - 'connection_profile_set_gateway_address'); - late final _connection_profile_set_gateway_address = - _connection_profile_set_gateway_addressPtr.asFunction< - int Function(connection_profile_h, int, ffi.Pointer)>(); - - /// @brief Sets the DNS address. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The allowance of the DNS address is @c 2. - /// @remarks You must release @a dns_address using free(). - /// @param[in] profile The profile handle - /// @param[in] order The order of the DNS address \n - /// It starts from @c 1, which means first DNS address - /// @param[in] address_family The address family - /// @param[in] dns_address The DNS address \n - /// If you set this value to NULL then the existing value will be deleted - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @see connection_update_profile() - int connection_profile_set_dns_address( - connection_profile_h profile, - int order, - int address_family, - ffi.Pointer dns_address, - ) { - return _connection_profile_set_dns_address( - profile, - order, - address_family, - dns_address, - ); - } - - late final _connection_profile_set_dns_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int, ffi.Int32, - ffi.Pointer)>>('connection_profile_set_dns_address'); - late final _connection_profile_set_dns_address = - _connection_profile_set_dns_addressPtr.asFunction< - int Function( - connection_profile_h, int, int, ffi.Pointer)>(); - - /// @brief Sets the Proxy type. - /// @details If you set the Proxy type to #CONNECTION_PROXY_TYPE_AUTO or - /// #CONNECTION_PROXY_TYPE_MANUAL, then Proxy will be restored. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[in] type The type of the proxy - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @see connection_update_profile() - int connection_profile_set_proxy_type( - connection_profile_h profile, - int type, - ) { - return _connection_profile_set_proxy_type( - profile, - type, - ); - } - - late final _connection_profile_set_proxy_typePtr = _lookup< - ffi - .NativeFunction>( - 'connection_profile_set_proxy_type'); - late final _connection_profile_set_proxy_type = - _connection_profile_set_proxy_typePtr - .asFunction(); - - /// @brief Sets the Proxy address. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a proxy_address using free(). - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[in] proxy_address The proxy address \n - /// If you set this value to @c NULL, then the existing value will be deleted - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @see connection_update_profile() - int connection_profile_set_proxy_address( - connection_profile_h profile, - int address_family, - ffi.Pointer proxy_address, - ) { - return _connection_profile_set_proxy_address( - profile, - address_family, - proxy_address, - ); - } - - late final _connection_profile_set_proxy_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int32, - ffi.Pointer)>>('connection_profile_set_proxy_address'); - late final _connection_profile_set_proxy_address = - _connection_profile_set_proxy_addressPtr.asFunction< - int Function(connection_profile_h, int, ffi.Pointer)>(); - - /// @brief Sets the callback that is called when the state of profile is changed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @post connection_opened_cb() is invoked when the state of profile is changed. - /// @see connection_profile_state_changed_cb() - /// @see connection_profile_unset_state_changed_cb() - int connection_profile_set_state_changed_cb( - connection_profile_h profile, - connection_profile_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _connection_profile_set_state_changed_cb( - profile, - callback, - user_data, - ); - } - - late final _connection_profile_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, - connection_profile_state_changed_cb, ffi.Pointer)>>( - 'connection_profile_set_state_changed_cb'); - late final _connection_profile_set_state_changed_cb = - _connection_profile_set_state_changed_cbPtr.asFunction< - int Function(connection_profile_h, - connection_profile_state_changed_cb, ffi.Pointer)>(); - - /// @brief Unsets the callback that is called when the state of profile is changed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @see connection_profile_state_changed_cb() - /// @see connection_profile_set_state_changed_cb() - int connection_profile_unset_state_changed_cb( - connection_profile_h profile, - ) { - return _connection_profile_unset_state_changed_cb( - profile, - ); - } - - late final _connection_profile_unset_state_changed_cbPtr = - _lookup>( - 'connection_profile_unset_state_changed_cb'); - late final _connection_profile_unset_state_changed_cb = - _connection_profile_unset_state_changed_cbPtr - .asFunction(); - - /// @brief Gets the IPv6 network state. - /// @since_tizen 4.0 - /// @param[in] profile The profile handle - /// @param[out] state The profile state - /// @return 0 on success, otherwise negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_ipv6_state( - connection_profile_h profile, - ffi.Pointer state, - ) { - return _connection_profile_get_ipv6_state( - profile, - state, - ); - } - - late final _connection_profile_get_ipv6_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, - ffi.Pointer)>>('connection_profile_get_ipv6_state'); - late final _connection_profile_get_ipv6_state = - _connection_profile_get_ipv6_statePtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Sets the DNS config type. - /// @since_tizen 4.0 - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[in] type The DNS config type - /// @return 0 on success, otherwise negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_set_dns_config_type( - connection_profile_h profile, - int address_family, - int type, - ) { - return _connection_profile_set_dns_config_type( - profile, - address_family, - type, - ); - } - - late final _connection_profile_set_dns_config_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int32, - ffi.Int32)>>('connection_profile_set_dns_config_type'); - late final _connection_profile_set_dns_config_type = - _connection_profile_set_dns_config_typePtr - .asFunction(); - - /// @brief Gets the DNS config type. - /// @since_tizen 4.0 - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[out] type The DNS config type - /// @return 0 on success, otherwise negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_dns_config_type( - connection_profile_h profile, - int address_family, - ffi.Pointer type, - ) { - return _connection_profile_get_dns_config_type( - profile, - address_family, - type, - ); - } - - late final _connection_profile_get_dns_config_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_profile_h, ffi.Int32, ffi.Pointer)>>( - 'connection_profile_get_dns_config_type'); - late final _connection_profile_get_dns_config_type = - _connection_profile_get_dns_config_typePtr.asFunction< - int Function(connection_profile_h, int, ffi.Pointer)>(); - - /// @brief Gets the network prefix length. - /// @since_tizen 4.0 - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[out] prefix_len The network prefix length \n - /// In case of IPv4, it means netmask length - /// (also called a prefix, e.g. 8, 16, 24, 32) - /// @return 0 on success, otherwise negative error value. - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_prefix_length( - connection_profile_h profile, - int address_family, - ffi.Pointer prefix_len, - ) { - return _connection_profile_get_prefix_length( - profile, - address_family, - prefix_len, - ); - } - - late final _connection_profile_get_prefix_lengthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int32, - ffi.Pointer)>>('connection_profile_get_prefix_length'); - late final _connection_profile_get_prefix_length = - _connection_profile_get_prefix_lengthPtr.asFunction< - int Function(connection_profile_h, int, ffi.Pointer)>(); - - /// @brief Sets the network prefix length. - /// @since_tizen 4.0 - /// @param[in] profile The profile handle - /// @param[in] address_family The address family - /// @param[in] prefix_len The network prefix length - /// In case of IPv4, it means netmask length - /// (also called a prefix, e.g. 8, 16, 24, 32) - /// @return 0 on success, otherwise negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - /// @see connection_update_profile() - int connection_profile_set_prefix_length( - connection_profile_h profile, - int address_family, - int prefix_len, - ) { - return _connection_profile_set_prefix_length( - profile, - address_family, - prefix_len, - ); - } - - late final _connection_profile_set_prefix_lengthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int32, - ffi.Int)>>('connection_profile_set_prefix_length'); - late final _connection_profile_set_prefix_length = - _connection_profile_set_prefix_lengthPtr - .asFunction(); - - /// @brief Gets the ESSID (Extended Service Set Identifier). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a essid using free(). - /// @param[in] profile The profile handle - /// @param[out] essid The ESSID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_wifi_essid( - connection_profile_h profile, - ffi.Pointer> essid, - ) { - return _connection_profile_get_wifi_essid( - profile, - essid, - ); - } - - late final _connection_profile_get_wifi_essidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_profile_h, ffi.Pointer>)>>( - 'connection_profile_get_wifi_essid'); - late final _connection_profile_get_wifi_essid = - _connection_profile_get_wifi_essidPtr.asFunction< - int Function( - connection_profile_h, ffi.Pointer>)>(); - - /// @brief Gets the BSSID (Basic Service Set Identifier). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a bssid using free(). - /// @param[in] profile The profile handle - /// @param[out] bssid The BSSID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_wifi_bssid( - connection_profile_h profile, - ffi.Pointer> bssid, - ) { - return _connection_profile_get_wifi_bssid( - profile, - bssid, - ); - } - - late final _connection_profile_get_wifi_bssidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_profile_h, ffi.Pointer>)>>( - 'connection_profile_get_wifi_bssid'); - late final _connection_profile_get_wifi_bssid = - _connection_profile_get_wifi_bssidPtr.asFunction< - int Function( - connection_profile_h, ffi.Pointer>)>(); - - /// @brief Gets the RSSI. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[out] rssi The RSSI - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_wifi_rssi( - connection_profile_h profile, - ffi.Pointer rssi, - ) { - return _connection_profile_get_wifi_rssi( - profile, - rssi, - ); - } - - late final _connection_profile_get_wifi_rssiPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, - ffi.Pointer)>>('connection_profile_get_wifi_rssi'); - late final _connection_profile_get_wifi_rssi = - _connection_profile_get_wifi_rssiPtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Gets the frequency (MHz). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[out] frequency The frequency - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_wifi_frequency( - connection_profile_h profile, - ffi.Pointer frequency, - ) { - return _connection_profile_get_wifi_frequency( - profile, - frequency, - ); - } - - late final _connection_profile_get_wifi_frequencyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, - ffi.Pointer)>>('connection_profile_get_wifi_frequency'); - late final _connection_profile_get_wifi_frequency = - _connection_profile_get_wifi_frequencyPtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Gets the max speed (Mbps). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[out] max_speed The max speed - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_wifi_max_speed( - connection_profile_h profile, - ffi.Pointer max_speed, - ) { - return _connection_profile_get_wifi_max_speed( - profile, - max_speed, - ); - } - - late final _connection_profile_get_wifi_max_speedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, - ffi.Pointer)>>('connection_profile_get_wifi_max_speed'); - late final _connection_profile_get_wifi_max_speed = - _connection_profile_get_wifi_max_speedPtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Gets the security type of Wi-Fi. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[out] type The type of Wi-Fi security - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_wifi_security_type( - connection_profile_h profile, - ffi.Pointer type, - ) { - return _connection_profile_get_wifi_security_type( - profile, - type, - ); - } - - late final _connection_profile_get_wifi_security_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Pointer)>>( - 'connection_profile_get_wifi_security_type'); - late final _connection_profile_get_wifi_security_type = - _connection_profile_get_wifi_security_typePtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Gets the encryption type of Wi-Fi. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[out] type The type of Wi-Fi security - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_wifi_encryption_type( - connection_profile_h profile, - ffi.Pointer type, - ) { - return _connection_profile_get_wifi_encryption_type( - profile, - type, - ); - } - - late final _connection_profile_get_wifi_encryption_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Pointer)>>( - 'connection_profile_get_wifi_encryption_type'); - late final _connection_profile_get_wifi_encryption_type = - _connection_profile_get_wifi_encryption_typePtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Checks whether passphrase is required. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks This function is not valid if security type is #CONNECTION_WIFI_SECURITY_TYPE_EAP. - /// @param[in] profile The profile handle - /// @param[out] required @c true if a passphrase is required, - /// otherwise @c false if a passphrase is not required - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_is_wifi_passphrase_required( - connection_profile_h profile, - ffi.Pointer required1, - ) { - return _connection_profile_is_wifi_passphrase_required( - profile, - required1, - ); - } - - late final _connection_profile_is_wifi_passphrase_requiredPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Pointer)>>( - 'connection_profile_is_wifi_passphrase_required'); - late final _connection_profile_is_wifi_passphrase_required = - _connection_profile_is_wifi_passphrase_requiredPtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Sets the passphrase of the Wi-Fi WPA. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a passphrase using free(). - /// @param[in] profile The profile handle - /// @param[in] passphrase The passphrase of Wi-Fi security - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - /// @see connection_update_profile() - int connection_profile_set_wifi_passphrase( - connection_profile_h profile, - ffi.Pointer passphrase, - ) { - return _connection_profile_set_wifi_passphrase( - profile, - passphrase, - ); - } - - late final _connection_profile_set_wifi_passphrasePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Pointer)>>( - 'connection_profile_set_wifi_passphrase'); - late final _connection_profile_set_wifi_passphrase = - _connection_profile_set_wifi_passphrasePtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Checks whether the WPS (Wi-Fi Protected Setup) is supported. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If WPS is supported, you can connect the access point with WPS by wifi_connect_with_wps(). - /// @param[in] profile The profile handle - /// @param[out] supported @c true if WPS is supported, - /// otherwise @c false if WPS is not supported - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_is_wifi_wps_supported( - connection_profile_h profile, - ffi.Pointer supported, - ) { - return _connection_profile_is_wifi_wps_supported( - profile, - supported, - ); - } - - late final _connection_profile_is_wifi_wps_supportedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Pointer)>>( - 'connection_profile_is_wifi_wps_supported'); - late final _connection_profile_is_wifi_wps_supported = - _connection_profile_is_wifi_wps_supportedPtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Gets the service type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[out] type The type of the cellular service - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_cellular_service_type( - connection_profile_h profile, - ffi.Pointer type, - ) { - return _connection_profile_get_cellular_service_type( - profile, - type, - ); - } - - late final _connection_profile_get_cellular_service_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Pointer)>>( - 'connection_profile_get_cellular_service_type'); - late final _connection_profile_get_cellular_service_type = - _connection_profile_get_cellular_service_typePtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Gets the APN (access point name). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a apn using free(). - /// @param[in] profile The profile handle - /// @param[out] apn The name of the APN - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_cellular_apn( - connection_profile_h profile, - ffi.Pointer> apn, - ) { - return _connection_profile_get_cellular_apn( - profile, - apn, - ); - } - - late final _connection_profile_get_cellular_apnPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_profile_h, ffi.Pointer>)>>( - 'connection_profile_get_cellular_apn'); - late final _connection_profile_get_cellular_apn = - _connection_profile_get_cellular_apnPtr.asFunction< - int Function( - connection_profile_h, ffi.Pointer>)>(); - - /// @brief Gets the authentication information. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a user_name and @a password using free(). - /// @param[in] profile The profile handle - /// @param[out] type The type of the authentication - /// @param[out] user_name The user name - /// @param[out] password The password - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_cellular_auth_info( - connection_profile_h profile, - ffi.Pointer type, - ffi.Pointer> user_name, - ffi.Pointer> password, - ) { - return _connection_profile_get_cellular_auth_info( - profile, - type, - user_name, - password, - ); - } - - late final _connection_profile_get_cellular_auth_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_profile_h, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>>( - 'connection_profile_get_cellular_auth_info'); - late final _connection_profile_get_cellular_auth_info = - _connection_profile_get_cellular_auth_infoPtr.asFunction< - int Function( - connection_profile_h, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>(); - - /// @brief Gets the home URL. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a home_url using free(). - /// @param[in] profile The profile handle - /// @param[out] home_url The home URL - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_cellular_home_url( - connection_profile_h profile, - ffi.Pointer> home_url, - ) { - return _connection_profile_get_cellular_home_url( - profile, - home_url, - ); - } - - late final _connection_profile_get_cellular_home_urlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_profile_h, ffi.Pointer>)>>( - 'connection_profile_get_cellular_home_url'); - late final _connection_profile_get_cellular_home_url = - _connection_profile_get_cellular_home_urlPtr.asFunction< - int Function( - connection_profile_h, ffi.Pointer>)>(); - - /// @brief Gets the cellular pdn type. - /// @since_tizen 3.0 - /// @param[in] profile The profile handle - /// @param[out] type The cellular pdn type - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_cellular_pdn_type( - connection_profile_h profile, - ffi.Pointer type, - ) { - return _connection_profile_get_cellular_pdn_type( - profile, - type, - ); - } - - late final _connection_profile_get_cellular_pdn_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Pointer)>>( - 'connection_profile_get_cellular_pdn_type'); - late final _connection_profile_get_cellular_pdn_type = - _connection_profile_get_cellular_pdn_typePtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Gets the cellular roam pdn type. - /// @since_tizen 3.0 - /// @param[in] profile The profile handle - /// @param[out] type The cellular pdn type - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_get_cellular_roam_pdn_type( - connection_profile_h profile, - ffi.Pointer type, - ) { - return _connection_profile_get_cellular_roam_pdn_type( - profile, - type, - ); - } - - late final _connection_profile_get_cellular_roam_pdn_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Pointer)>>( - 'connection_profile_get_cellular_roam_pdn_type'); - late final _connection_profile_get_cellular_roam_pdn_type = - _connection_profile_get_cellular_roam_pdn_typePtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Checks whether the connection is in roaming state. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[out] is_roaming @c true if the cellular is roaming, - /// otherwise @c false if it is not roaming - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_is_cellular_roaming( - connection_profile_h profile, - ffi.Pointer is_roaming, - ) { - return _connection_profile_is_cellular_roaming( - profile, - is_roaming, - ); - } - - late final _connection_profile_is_cellular_roamingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Pointer)>>( - 'connection_profile_is_cellular_roaming'); - late final _connection_profile_is_cellular_roaming = - _connection_profile_is_cellular_roamingPtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Checks whether the profile is hidden. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[out] is_hidden @c true if the profile is in hidden, - /// otherwise @c false if the profile is not hidden - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_is_cellular_hidden( - connection_profile_h profile, - ffi.Pointer is_hidden, - ) { - return _connection_profile_is_cellular_hidden( - profile, - is_hidden, - ); - } - - late final _connection_profile_is_cellular_hiddenPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, - ffi.Pointer)>>('connection_profile_is_cellular_hidden'); - late final _connection_profile_is_cellular_hidden = - _connection_profile_is_cellular_hiddenPtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Checks whether the profile is editable. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[out] is_editable @c true if the profile is editable, - /// otherwise @c false if the profile is not editable - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_is_cellular_editable( - connection_profile_h profile, - ffi.Pointer is_editable, - ) { - return _connection_profile_is_cellular_editable( - profile, - is_editable, - ); - } - - late final _connection_profile_is_cellular_editablePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Pointer)>>( - 'connection_profile_is_cellular_editable'); - late final _connection_profile_is_cellular_editable = - _connection_profile_is_cellular_editablePtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Checks whether the profile is default. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[out] is_default @c true if the profile is default, - /// otherwise @c false if the profile is not default - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_is_cellular_default( - connection_profile_h profile, - ffi.Pointer is_default, - ) { - return _connection_profile_is_cellular_default( - profile, - is_default, - ); - } - - late final _connection_profile_is_cellular_defaultPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Pointer)>>( - 'connection_profile_is_cellular_default'); - late final _connection_profile_is_cellular_default = - _connection_profile_is_cellular_defaultPtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Sets the service type. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile The profile handle - /// @param[in] service_type The type of cellular service - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - /// @see connection_update_profile() - int connection_profile_set_cellular_service_type( - connection_profile_h profile, - int service_type, - ) { - return _connection_profile_set_cellular_service_type( - profile, - service_type, - ); - } - - late final _connection_profile_set_cellular_service_typePtr = _lookup< - ffi - .NativeFunction>( - 'connection_profile_set_cellular_service_type'); - late final _connection_profile_set_cellular_service_type = - _connection_profile_set_cellular_service_typePtr - .asFunction(); - - /// @brief Sets the APN (Access Point Name). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a apn using free(). - /// @param[in] profile The profile handle - /// @param[in] apn The name of APN - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - /// @see connection_update_profile() - int connection_profile_set_cellular_apn( - connection_profile_h profile, - ffi.Pointer apn, - ) { - return _connection_profile_set_cellular_apn( - profile, - apn, - ); - } - - late final _connection_profile_set_cellular_apnPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, - ffi.Pointer)>>('connection_profile_set_cellular_apn'); - late final _connection_profile_set_cellular_apn = - _connection_profile_set_cellular_apnPtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Sets the Authentication information. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a user_name using free(). - /// @param[in] profile The profile handle - /// @param[in] type The type of the authentication - /// @param[in] user_name The user name - /// @param[in] password The password - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - /// @see connection_update_profile() - int connection_profile_set_cellular_auth_info( - connection_profile_h profile, - int type, - ffi.Pointer user_name, - ffi.Pointer password, - ) { - return _connection_profile_set_cellular_auth_info( - profile, - type, - user_name, - password, - ); - } - - late final _connection_profile_set_cellular_auth_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Int32, - ffi.Pointer, ffi.Pointer)>>( - 'connection_profile_set_cellular_auth_info'); - late final _connection_profile_set_cellular_auth_info = - _connection_profile_set_cellular_auth_infoPtr.asFunction< - int Function(connection_profile_h, int, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Sets the home URL. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a home_url using free(). - /// @param[in] profile The profile handle - /// @param[in] home_url The home URL - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - /// @see connection_update_profile() - int connection_profile_set_cellular_home_url( - connection_profile_h profile, - ffi.Pointer home_url, - ) { - return _connection_profile_set_cellular_home_url( - profile, - home_url, - ); - } - - late final _connection_profile_set_cellular_home_urlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_h, ffi.Pointer)>>( - 'connection_profile_set_cellular_home_url'); - late final _connection_profile_set_cellular_home_url = - _connection_profile_set_cellular_home_urlPtr.asFunction< - int Function(connection_profile_h, ffi.Pointer)>(); - - /// @brief Sets the cellular pdn type. - /// @since_tizen 3.0 - /// @param[in] profile The profile handle - /// @param[in] type The cellular pdn type - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_set_cellular_pdn_type( - connection_profile_h profile, - int type, - ) { - return _connection_profile_set_cellular_pdn_type( - profile, - type, - ); - } - - late final _connection_profile_set_cellular_pdn_typePtr = _lookup< - ffi - .NativeFunction>( - 'connection_profile_set_cellular_pdn_type'); - late final _connection_profile_set_cellular_pdn_type = - _connection_profile_set_cellular_pdn_typePtr - .asFunction(); - - /// @brief Sets the cellular roam pdn type. - /// @since_tizen 3.0 - /// @param[in] profile The profile handle - /// @param[in] type The cellular pdn type - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_profile_set_cellular_roam_pdn_type( - connection_profile_h profile, - int type, - ) { - return _connection_profile_set_cellular_roam_pdn_type( - profile, - type, - ); - } - - late final _connection_profile_set_cellular_roam_pdn_typePtr = _lookup< - ffi - .NativeFunction>( - 'connection_profile_set_cellular_roam_pdn_type'); - late final _connection_profile_set_cellular_roam_pdn_type = - _connection_profile_set_cellular_roam_pdn_typePtr - .asFunction(); - - /// @brief Creates a handle for managing data connections. - /// @details If you do not use this function and use other functions, - /// you will get the #CONNECTION_ERROR_NOT_INITIALIZED error. - /// If you put an invalid handle, you will get the #CONNECTION_ERROR_INVALID_PARAMETER error. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @remarks You must release @a connection using connection_destroy(). - /// @param[out] connection The connection handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_ALREADY_INITIALIZED Already initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @see connection_destroy() - int connection_create( - ffi.Pointer connection, - ) { - return _connection_create( - connection, - ); - } - - late final _connection_createPtr = - _lookup)>>( - 'connection_create'); - late final _connection_create = _connection_createPtr - .asFunction)>(); - - /// @brief Destroys the connection handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] connection The connection handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @see connection_create() - int connection_destroy( - connection_h connection, - ) { - return _connection_destroy( - connection, - ); - } - - late final _connection_destroyPtr = - _lookup>( - 'connection_destroy'); - late final _connection_destroy = - _connection_destroyPtr.asFunction(); - - /// @brief Gets the type of the current profile for data connection. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] connection The connection handle - /// @param[out] type The type of the network - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_get_type( - connection_h connection, - ffi.Pointer type, - ) { - return _connection_get_type( - connection, - type, - ); - } - - late final _connection_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, ffi.Pointer)>>('connection_get_type'); - late final _connection_get_type = _connection_get_typePtr - .asFunction)>(); - - /// @brief Gets the IP address of the current connection. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a ip_address using free(). - /// @param[in] connection The connection handle - /// @param[in] address_family The address family - /// @param[out] ip_address The pointer to the IP address string - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - int connection_get_ip_address( - connection_h connection, - int address_family, - ffi.Pointer> ip_address, - ) { - return _connection_get_ip_address( - connection, - address_family, - ip_address, - ); - } - - late final _connection_get_ip_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, ffi.Int32, - ffi.Pointer>)>>( - 'connection_get_ip_address'); - late final _connection_get_ip_address = - _connection_get_ip_addressPtr.asFunction< - int Function( - connection_h, int, ffi.Pointer>)>(); - - /// @brief Gets the proxy address of the current connection. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks You must release @a proxy using free(). - /// @param[in] connection The connection handle - /// @param[in] address_family The address family - /// @param[out] proxy The proxy address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - int connection_get_proxy( - connection_h connection, - int address_family, - ffi.Pointer> proxy, - ) { - return _connection_get_proxy( - connection, - address_family, - proxy, - ); - } - - late final _connection_get_proxyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, ffi.Int32, - ffi.Pointer>)>>('connection_get_proxy'); - late final _connection_get_proxy = _connection_get_proxyPtr.asFunction< - int Function(connection_h, int, ffi.Pointer>)>(); - - /// @brief Gets the MAC address of the Wi-Fi or ethernet. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks @a mac_addr must be released with free() by you. - /// @param[in] connection The handle of the connection - /// @param[in] type The type of current network connection - /// @param[out] mac_addr The MAC address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - int connection_get_mac_address( - connection_h connection, - int type, - ffi.Pointer> mac_addr, - ) { - return _connection_get_mac_address( - connection, - type, - mac_addr, - ); - } - - late final _connection_get_mac_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, ffi.Int32, - ffi.Pointer>)>>( - 'connection_get_mac_address'); - late final _connection_get_mac_address = - _connection_get_mac_addressPtr.asFunction< - int Function( - connection_h, int, ffi.Pointer>)>(); - - /// @brief Gets if the current connection is metered. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] connection The connection handle - /// @param[out] is_metered The value indicating whether it is metered - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_is_metered_network( - connection_h connection, - ffi.Pointer is_metered, - ) { - return _connection_is_metered_network( - connection, - is_metered, - ); - } - - late final _connection_is_metered_networkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, - ffi.Pointer)>>('connection_is_metered_network'); - late final _connection_is_metered_network = _connection_is_metered_networkPtr - .asFunction)>(); - - /// @brief Gets the state of cellular connection. - /// @details The returned state is for the cellular connection state. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] connection The connection handle - /// @param[out] state The state of the cellular connection - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_get_cellular_state( - connection_h connection, - ffi.Pointer state, - ) { - return _connection_get_cellular_state( - connection, - state, - ); - } - - late final _connection_get_cellular_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, - ffi.Pointer)>>('connection_get_cellular_state'); - late final _connection_get_cellular_state = _connection_get_cellular_statePtr - .asFunction)>(); - - /// @brief Gets the state of the Wi-Fi. - /// @details The returned state is for the Wi-Fi connection state. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] connection The connection handle - /// @param[out] state The state of Wi-Fi connection - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_get_wifi_state( - connection_h connection, - ffi.Pointer state, - ) { - return _connection_get_wifi_state( - connection, - state, - ); - } - - late final _connection_get_wifi_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, - ffi.Pointer)>>('connection_get_wifi_state'); - late final _connection_get_wifi_state = _connection_get_wifi_statePtr - .asFunction)>(); - - /// @brief Gets the state of the Ethernet. - /// @details The returned state is for the Ethernet connection state. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] connection The connection handle - /// @param[out] state The state of Ethernet connection - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_get_ethernet_state( - connection_h connection, - ffi.Pointer state, - ) { - return _connection_get_ethernet_state( - connection, - state, - ); - } - - late final _connection_get_ethernet_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, - ffi.Pointer)>>('connection_get_ethernet_state'); - late final _connection_get_ethernet_state = _connection_get_ethernet_statePtr - .asFunction)>(); - - /// @brief Checks for ethernet cable is attached or not. - /// @details The returned state is for the ethernet cable state. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] connection The handle of the connection - /// @param[in] state The state of ethernet cable - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - int connection_get_ethernet_cable_state( - connection_h connection, - ffi.Pointer state, - ) { - return _connection_get_ethernet_cable_state( - connection, - state, - ); - } - - late final _connection_get_ethernet_cable_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, - ffi.Pointer)>>('connection_get_ethernet_cable_state'); - late final _connection_get_ethernet_cable_state = - _connection_get_ethernet_cable_statePtr - .asFunction)>(); - - /// @deprecated Deprecated since 4.0. Use connection_set_ethernet_cable_state_changed_cb() instead. - /// @brief Sets callback for ethernet cable is plugged [in/out] event. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] connection The handle of connection - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_set_ethernet_cable_state_chaged_cb( - connection_h connection, - connection_ethernet_cable_state_chaged_cb callback, - ffi.Pointer user_data, - ) { - return _connection_set_ethernet_cable_state_chaged_cb( - connection, - callback, - user_data, - ); - } - - late final _connection_set_ethernet_cable_state_chaged_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, - connection_ethernet_cable_state_chaged_cb, - ffi.Pointer)>>( - 'connection_set_ethernet_cable_state_chaged_cb'); - late final _connection_set_ethernet_cable_state_chaged_cb = - _connection_set_ethernet_cable_state_chaged_cbPtr.asFunction< - int Function(connection_h, connection_ethernet_cable_state_chaged_cb, - ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. Use connection_unset_ethernet_cable_state_changed_cb() instead. - /// @brief Unsets callback for ethernet cable is plugged [in/out] event. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] connection The handle of connection - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_unset_ethernet_cable_state_chaged_cb( - connection_h connection, - ) { - return _connection_unset_ethernet_cable_state_chaged_cb( - connection, - ); - } - - late final _connection_unset_ethernet_cable_state_chaged_cbPtr = - _lookup>( - 'connection_unset_ethernet_cable_state_chaged_cb'); - late final _connection_unset_ethernet_cable_state_chaged_cb = - _connection_unset_ethernet_cable_state_chaged_cbPtr - .asFunction(); - - /// @brief Sets callback for ethernet cable is plugged [in/out] event. - /// @since_tizen 4.0 - /// @param[in] connection The handle of connection - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_set_ethernet_cable_state_changed_cb( - connection_h connection, - connection_ethernet_cable_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _connection_set_ethernet_cable_state_changed_cb( - connection, - callback, - user_data, - ); - } - - late final _connection_set_ethernet_cable_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, - connection_ethernet_cable_state_changed_cb, - ffi.Pointer)>>( - 'connection_set_ethernet_cable_state_changed_cb'); - late final _connection_set_ethernet_cable_state_changed_cb = - _connection_set_ethernet_cable_state_changed_cbPtr.asFunction< - int Function(connection_h, connection_ethernet_cable_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Unsets callback for ethernet cable is plugged [in/out] event. - /// @since_tizen 4.0 - /// @param[in] connection The handle of connection - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_unset_ethernet_cable_state_changed_cb( - connection_h connection, - ) { - return _connection_unset_ethernet_cable_state_changed_cb( - connection, - ); - } - - late final _connection_unset_ethernet_cable_state_changed_cbPtr = - _lookup>( - 'connection_unset_ethernet_cable_state_changed_cb'); - late final _connection_unset_ethernet_cable_state_changed_cb = - _connection_unset_ethernet_cable_state_changed_cbPtr - .asFunction(); - - /// @brief Gets the state of the Bluetooth. - /// @details The returned state is for the Bluetooth connection state. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] connection The connection handle - /// @param[out] state The state of the Bluetooth connection - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_get_bt_state( - connection_h connection, - ffi.Pointer state, - ) { - return _connection_get_bt_state( - connection, - state, - ); - } - - late final _connection_get_bt_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, - ffi.Pointer)>>('connection_get_bt_state'); - late final _connection_get_bt_state = _connection_get_bt_statePtr - .asFunction)>(); - - /// @brief Sets the callback that is called when the type of the current connection is changed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] connection The connection handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_set_type_changed_cb( - connection_h connection, - connection_type_changed_cb callback, - ffi.Pointer user_data, - ) { - return _connection_set_type_changed_cb( - connection, - callback, - user_data, - ); - } - - late final _connection_set_type_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, connection_type_changed_cb, - ffi.Pointer)>>('connection_set_type_changed_cb'); - late final _connection_set_type_changed_cb = - _connection_set_type_changed_cbPtr.asFunction< - int Function(connection_h, connection_type_changed_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback that is called when the type of current connection is changed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] connection The connection handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_unset_type_changed_cb( - connection_h connection, - ) { - return _connection_unset_type_changed_cb( - connection, - ); - } - - late final _connection_unset_type_changed_cbPtr = - _lookup>( - 'connection_unset_type_changed_cb'); - late final _connection_unset_type_changed_cb = - _connection_unset_type_changed_cbPtr - .asFunction(); - - /// @brief Sets the callback that is called when the IP address is changed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] connection The connection handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_set_ip_address_changed_cb( - connection_h connection, - connection_address_changed_cb callback, - ffi.Pointer user_data, - ) { - return _connection_set_ip_address_changed_cb( - connection, - callback, - user_data, - ); - } - - late final _connection_set_ip_address_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, connection_address_changed_cb, - ffi.Pointer)>>('connection_set_ip_address_changed_cb'); - late final _connection_set_ip_address_changed_cb = - _connection_set_ip_address_changed_cbPtr.asFunction< - int Function(connection_h, connection_address_changed_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback that is called when the IP address is changed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] connection The connection handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_unset_ip_address_changed_cb( - connection_h connection, - ) { - return _connection_unset_ip_address_changed_cb( - connection, - ); - } - - late final _connection_unset_ip_address_changed_cbPtr = - _lookup>( - 'connection_unset_ip_address_changed_cb'); - late final _connection_unset_ip_address_changed_cb = - _connection_unset_ip_address_changed_cbPtr - .asFunction(); - - /// @brief Sets the callback that is called when the proxy address is changed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] connection The connection handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_set_proxy_address_changed_cb( - connection_h connection, - connection_address_changed_cb callback, - ffi.Pointer user_data, - ) { - return _connection_set_proxy_address_changed_cb( - connection, - callback, - user_data, - ); - } - - late final _connection_set_proxy_address_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, connection_address_changed_cb, - ffi.Pointer)>>( - 'connection_set_proxy_address_changed_cb'); - late final _connection_set_proxy_address_changed_cb = - _connection_set_proxy_address_changed_cbPtr.asFunction< - int Function(connection_h, connection_address_changed_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback that is called when the proxy address is changed. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] connection The connection handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - int connection_unset_proxy_address_changed_cb( - connection_h connection, - ) { - return _connection_unset_proxy_address_changed_cb( - connection, - ); - } - - late final _connection_unset_proxy_address_changed_cbPtr = - _lookup>( - 'connection_unset_proxy_address_changed_cb'); - late final _connection_unset_proxy_address_changed_cb = - _connection_unset_proxy_address_changed_cbPtr - .asFunction(); - - /// @brief Adds a new profile which is created by connection_profile_create(). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile - /// @remarks You can only add a profile of the cellular type. - /// @param[in] connection The connection handle - /// @param[in] profile The profile handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_add_profile( - connection_h connection, - connection_profile_h profile, - ) { - return _connection_add_profile( - connection, - profile, - ); - } - - late final _connection_add_profilePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, connection_profile_h)>>('connection_add_profile'); - late final _connection_add_profile = _connection_add_profilePtr - .asFunction(); - - /// @brief Removes an existing profile. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] connection The connection handle - /// @param[in] profile The profile handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_remove_profile( - connection_h connection, - connection_profile_h profile, - ) { - return _connection_remove_profile( - connection, - profile, - ); - } - - late final _connection_remove_profilePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, - connection_profile_h)>>('connection_remove_profile'); - late final _connection_remove_profile = _connection_remove_profilePtr - .asFunction(); - - /// @brief Updates an existing profile. - /// @details When a profile is changed, these changes will be not applied to the - /// Connection Manager immediately. - /// When you call this function, your changes affect the Connection Manager - /// and the existing profile is updated. - /// In addition, the existing profile will be updated if you call connection_open_profile(). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] connection The connection handle - /// @param[in] profile The profile handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - /// @see connection_open_profile() - int connection_update_profile( - connection_h connection, - connection_profile_h profile, - ) { - return _connection_update_profile( - connection, - profile, - ); - } - - late final _connection_update_profilePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, - connection_profile_h)>>('connection_update_profile'); - late final _connection_update_profile = _connection_update_profilePtr - .asFunction(); - - /// @brief Gets a profiles iterator. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @remarks You must release @a profile_iterator using connection_destroy(). - /// @param[in] connection The connection handle - /// @param[in] type The type of the connection iterator - /// @param[out] profile_iterator The iterator of profile - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - int connection_get_profile_iterator( - connection_h connection, - int type, - ffi.Pointer profile_iterator, - ) { - return _connection_get_profile_iterator( - connection, - type, - profile_iterator, - ); - } - - late final _connection_get_profile_iteratorPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, ffi.Int32, - ffi.Pointer)>>( - 'connection_get_profile_iterator'); - late final _connection_get_profile_iterator = - _connection_get_profile_iteratorPtr.asFunction< - int Function( - connection_h, int, ffi.Pointer)>(); - - /// @brief Moves the profile iterator to the next position and gets a profile handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile_iterator The iterator of profile - /// @param[out] profile The profile handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_ITERATOR_END End of iteration - int connection_profile_iterator_next( - connection_profile_iterator_h profile_iterator, - ffi.Pointer profile, - ) { - return _connection_profile_iterator_next( - profile_iterator, - profile, - ); - } - - late final _connection_profile_iterator_nextPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_profile_iterator_h, - ffi.Pointer)>>( - 'connection_profile_iterator_next'); - late final _connection_profile_iterator_next = - _connection_profile_iterator_nextPtr.asFunction< - int Function(connection_profile_iterator_h, - ffi.Pointer)>(); - - /// @brief Checks whether the next element of a profile iterator exists or not. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. - /// Error codes are described in Exception section. - /// @param[in] profile_iterator The iterator of profile - /// @return @c true if next element exists, - /// otherwise @c false if next element doesn't exist - /// @exception #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @exception #CONNECTION_ERROR_NOT_SUPPORTED Not supported - /// @see get_last_result() - bool connection_profile_iterator_has_next( - connection_profile_iterator_h profile_iterator, - ) { - return _connection_profile_iterator_has_next( - profile_iterator, - ); - } - - late final _connection_profile_iterator_has_nextPtr = _lookup< - ffi.NativeFunction>( - 'connection_profile_iterator_has_next'); - late final _connection_profile_iterator_has_next = - _connection_profile_iterator_has_nextPtr - .asFunction(); - - /// @brief Destroys a profiles iterator. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] profile_iterator The iterator of the profile - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - int connection_destroy_profile_iterator( - connection_profile_iterator_h profile_iterator, - ) { - return _connection_destroy_profile_iterator( - profile_iterator, - ); - } - - late final _connection_destroy_profile_iteratorPtr = _lookup< - ffi.NativeFunction>( - 'connection_destroy_profile_iterator'); - late final _connection_destroy_profile_iterator = - _connection_destroy_profile_iteratorPtr - .asFunction(); - - /// @brief Gets the name of the default profile. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @remarks You must release @a profile using connection_profile_destroy(). - /// @param[in] connection The connection handle - /// @param[out] profile The profile handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NO_CONNECTION There is no connection - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - int connection_get_current_profile( - connection_h connection, - ffi.Pointer profile, - ) { - return _connection_get_current_profile( - connection, - profile, - ); - } - - late final _connection_get_current_profilePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, ffi.Pointer)>>( - 'connection_get_current_profile'); - late final _connection_get_current_profile = - _connection_get_current_profilePtr.asFunction< - int Function(connection_h, ffi.Pointer)>(); - - /// @brief Gets the default profile which provides the given cellular service. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @remarks You must release @a profile using connection_profile_destroy(). - /// @param[in] connection The connection handle - /// @param[in] type The type of cellular service \n - /// #CONNECTION_CELLULAR_SERVICE_TYPE_APPLICATION is not permitted - /// @param[out] profile The profile handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_get_default_cellular_service_profile( - connection_h connection, - int type, - ffi.Pointer profile, - ) { - return _connection_get_default_cellular_service_profile( - connection, - type, - profile, - ); - } - - late final _connection_get_default_cellular_service_profilePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, ffi.Int32, ffi.Pointer)>>( - 'connection_get_default_cellular_service_profile'); - late final _connection_get_default_cellular_service_profile = - _connection_get_default_cellular_service_profilePtr.asFunction< - int Function(connection_h, int, ffi.Pointer)>(); - - /// @brief Sets the default profile which provides the given cellular service. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] connection The connection handle - /// @param[in] type The type of cellular service \n - /// Only #CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET and - /// #CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_INTERNET are permitted - /// @param[in] profile The profile handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_set_default_cellular_service_profile( - connection_h connection, - int type, - connection_profile_h profile, - ) { - return _connection_set_default_cellular_service_profile( - connection, - type, - profile, - ); - } - - late final _connection_set_default_cellular_service_profilePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, ffi.Int32, connection_profile_h)>>( - 'connection_set_default_cellular_service_profile'); - late final _connection_set_default_cellular_service_profile = - _connection_set_default_cellular_service_profilePtr - .asFunction(); - - /// @brief Sets the default profile which provides the given cellular service, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] connection The connection handle - /// @param[in] type The type of cellular service \n - /// Only #CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET and - /// #CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_INTERNET are permitted - /// @param[in] profile The profile handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_set_default_cellular_service_profile_async( - connection_h connection, - int type, - connection_profile_h profile, - connection_set_default_cb callback, - ffi.Pointer user_data, - ) { - return _connection_set_default_cellular_service_profile_async( - connection, - type, - profile, - callback, - user_data, - ); - } - - late final _connection_set_default_cellular_service_profile_asyncPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, - ffi.Int32, - connection_profile_h, - connection_set_default_cb, - ffi.Pointer)>>( - 'connection_set_default_cellular_service_profile_async'); - late final _connection_set_default_cellular_service_profile_async = - _connection_set_default_cellular_service_profile_asyncPtr.asFunction< - int Function(connection_h, int, connection_profile_h, - connection_set_default_cb, ffi.Pointer)>(); - - /// @brief Opens a connection of profile, asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] connection The connection handle - /// @param[in] profile The profile handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @post connection_opened_cb() will be invoked. - /// @see connection_opened_cb() - /// @see connection_close_profile() - /// @see connection_profile_set_state_changed_cb() - /// @see connection_profile_unset_state_changed_cb() - /// @see connection_profile_state_changed_cb() - int connection_open_profile( - connection_h connection, - connection_profile_h profile, - connection_opened_cb callback, - ffi.Pointer user_data, - ) { - return _connection_open_profile( - connection, - profile, - callback, - user_data, - ); - } - - late final _connection_open_profilePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, - connection_profile_h, - connection_opened_cb, - ffi.Pointer)>>('connection_open_profile'); - late final _connection_open_profile = _connection_open_profilePtr.asFunction< - int Function(connection_h, connection_profile_h, connection_opened_cb, - ffi.Pointer)>(); - - /// @brief Closes a connection of profile. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// @param[in] connection The connection handle - /// @param[in] profile The profile handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @post connection_closed_cb() will be invoked. - /// @see connection_closed_cb() - /// @see connection_open_profile() - /// @see connection_profile_set_state_changed_cb() - /// @see connection_profile_unset_state_changed_cb() - /// @see connection_profile_state_changed_cb() - int connection_close_profile( - connection_h connection, - connection_profile_h profile, - connection_closed_cb callback, - ffi.Pointer user_data, - ) { - return _connection_close_profile( - connection, - profile, - callback, - user_data, - ); - } - - late final _connection_close_profilePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, - connection_profile_h, - connection_closed_cb, - ffi.Pointer)>>('connection_close_profile'); - late final _connection_close_profile = - _connection_close_profilePtr.asFunction< - int Function(connection_h, connection_profile_h, connection_closed_cb, - ffi.Pointer)>(); - - /// @brief Resets the cellular profile. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] connection The connection handle - /// @param[in] type The type of reset - /// @param[in] id The subscriber identity module ID to reset - /// (The sim index starts from 0.) - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - /// @post connection_reset_cb() will be invoked. - int connection_reset_profile( - connection_h connection, - int type, - int id, - connection_reset_cb callback, - ffi.Pointer user_data, - ) { - return _connection_reset_profile( - connection, - type, - id, - callback, - user_data, - ); - } - - late final _connection_reset_profilePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, - ffi.Int32, - ffi.Int, - connection_reset_cb, - ffi.Pointer)>>('connection_reset_profile'); - late final _connection_reset_profile = - _connection_reset_profilePtr.asFunction< - int Function(connection_h, int, int, connection_reset_cb, - ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. Use connection_add_route_entry() instead. - /// @brief Adds a IPv4 route to the routing table. - /// @details You can get the @a interface_name from - /// connection_profile_get_network_interface_name() of opened profile. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// @param[in] connection The connection handle - /// @param[in] interface_name The name of network interface - /// @param[in] host_address The IP address of the host - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_ALREADY_EXISTS Already exists - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @see connection_profile_get_network_interface_name() - int connection_add_route( - connection_h connection, - ffi.Pointer interface_name, - ffi.Pointer host_address, - ) { - return _connection_add_route( - connection, - interface_name, - host_address, - ); - } - - late final _connection_add_routePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, ffi.Pointer, - ffi.Pointer)>>('connection_add_route'); - late final _connection_add_route = _connection_add_routePtr.asFunction< - int Function( - connection_h, ffi.Pointer, ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. Use connection_remove_route_entry() instead. - /// @brief Removes a IPv4 route from the routing table. - /// @details You can get the @a interface_name from - /// connection_profile_get_network_interface_name() of opened profile. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// @param[in] connection The connection handle - /// @param[in] interface_name The name of network interface - /// @param[in] host_address The IP address of the host - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @see connection_profile_get_network_interface_name() - int connection_remove_route( - connection_h connection, - ffi.Pointer interface_name, - ffi.Pointer host_address, - ) { - return _connection_remove_route( - connection, - interface_name, - host_address, - ); - } - - late final _connection_remove_routePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, ffi.Pointer, - ffi.Pointer)>>('connection_remove_route'); - late final _connection_remove_route = _connection_remove_routePtr.asFunction< - int Function( - connection_h, ffi.Pointer, ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. Use connection_add_route_entry() instead. - /// @brief Adds a IPv6 route to the routing table. - /// @details You can get the @a interface_name from - /// connection_profile_get_network_interface_name() of opened profile. - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// @param[in] connection The connection handle - /// @param[in] interface_name The name of network interface - /// @param[in] host_address The IP address of the host - /// @param[in] gateway The gateway address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_ALREADY_EXISTS Already exists - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @see connection_profile_get_network_interface_name() - int connection_add_route_ipv6( - connection_h connection, - ffi.Pointer interface_name, - ffi.Pointer host_address, - ffi.Pointer gateway, - ) { - return _connection_add_route_ipv6( - connection, - interface_name, - host_address, - gateway, - ); - } - - late final _connection_add_route_ipv6Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('connection_add_route_ipv6'); - late final _connection_add_route_ipv6 = - _connection_add_route_ipv6Ptr.asFunction< - int Function(connection_h, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - /// @deprecated Deprecated since 4.0. Use connection_remove_route_entry() instead. - /// @brief Removes a IPV6 route from the routing table. - /// @details You can get the @a interface_name from - /// connection_profile_get_network_interface_name() of opened profile. - /// @since_tizen 2.3.1 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// @param[in] connection The connection handle - /// @param[in] interface_name The name of network interface - /// @param[in] host_address The IP address of the host - /// @param[in] gateway The gateway address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @see connection_profile_get_network_interface_name() - int connection_remove_route_ipv6( - connection_h connection, - ffi.Pointer interface_name, - ffi.Pointer host_address, - ffi.Pointer gateway, - ) { - return _connection_remove_route_ipv6( - connection, - interface_name, - host_address, - gateway, - ); - } - - late final _connection_remove_route_ipv6Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('connection_remove_route_ipv6'); - late final _connection_remove_route_ipv6 = - _connection_remove_route_ipv6Ptr.asFunction< - int Function(connection_h, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Adds a route to the routing table. - /// @details You can get the @a interface_name from \n - /// connection_profile_get_network_interface_name() of opened profile. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// @param[in] connection The connection handle - /// @param[in] address_family The address family - /// @param[in] interface_name The name of network interface - /// @param[in] host_address The IP address of the host (e.g., single IP address such as - /// 163.152.10.2,192.168.1.2), group's IP address (e.g., 163.152.10.0, 192.168.0.0) - /// is not allowed - /// @param[in] gateway The gateway address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_ALREADY_EXISTS Already exists - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @see connection_profile_get_network_interface_name() - int connection_add_route_entry( - connection_h connection, - int address_family, - ffi.Pointer interface_name, - ffi.Pointer host_address, - ffi.Pointer gateway, - ) { - return _connection_add_route_entry( - connection, - address_family, - interface_name, - host_address, - gateway, - ); - } - - late final _connection_add_route_entryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('connection_add_route_entry'); - late final _connection_add_route_entry = - _connection_add_route_entryPtr.asFunction< - int Function(connection_h, int, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Removes a route from the routing table. - /// @details You can get the @a interface_name from \n - /// connection_profile_get_network_interface_name() of opened profile. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// @param[in] connection The connection handle - /// @param[in] address_family The address family - /// @param[in] interface_name The name of network interface - /// @param[in] host_address The IP address of the host (e.g., single IP address such as - /// 163.152.10.2,192.168.1.2), group's IP address (e.g., 163.152.10.0, 192.168.0.0) - /// is not allowed - /// @param[in] gateway The gateway address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @see connection_profile_get_network_interface_name() - int connection_remove_route_entry( - connection_h connection, - int address_family, - ffi.Pointer interface_name, - ffi.Pointer host_address, - ffi.Pointer gateway, - ) { - return _connection_remove_route_entry( - connection, - address_family, - interface_name, - host_address, - gateway, - ); - } - - late final _connection_remove_route_entryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - connection_h, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('connection_remove_route_entry'); - late final _connection_remove_route_entry = - _connection_remove_route_entryPtr.asFunction< - int Function(connection_h, int, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets all IPv6 addresses assigned to the network interface. - /// @since_tizen 4.0 - /// @param[in] connection The connection handle - /// @param[in] connection_type The connection type - /// @param[in] callback The callback to be called for each IPv6 address - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value. - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_foreach_ipv6_address( - connection_h connection, - int connection_type, - connection_ipv6_address_cb callback, - ffi.Pointer user_data, - ) { - return _connection_foreach_ipv6_address( - connection, - connection_type, - callback, - user_data, - ); - } - - late final _connection_foreach_ipv6_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, ffi.Int32, connection_ipv6_address_cb, - ffi.Pointer)>>('connection_foreach_ipv6_address'); - late final _connection_foreach_ipv6_address = - _connection_foreach_ipv6_addressPtr.asFunction< - int Function(connection_h, int, connection_ipv6_address_cb, - ffi.Pointer)>(); - - /// @brief Gets the statistics information. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] connection The connection handle - /// @param[in] connection_type The type of connection \n - /// Only #CONNECTION_TYPE_WIFI and #CONNECTION_TYPE_CELLULAR are supported - /// @param[in] statistics_type The type of statistics - /// @param[out] size The received data size of the last cellular packet data connection (bytes) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_get_statistics( - connection_h connection, - int connection_type, - int statistics_type, - ffi.Pointer size, - ) { - return _connection_get_statistics( - connection, - connection_type, - statistics_type, - size, - ); - } - - late final _connection_get_statisticsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, ffi.Int32, ffi.Int32, - ffi.Pointer)>>('connection_get_statistics'); - late final _connection_get_statistics = - _connection_get_statisticsPtr.asFunction< - int Function(connection_h, int, int, ffi.Pointer)>(); - - /// @brief Resets the statistics information. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// @param[in] connection The connection handle - /// @param[in] connection_type The type of connection \n - /// Only #CONNECTION_TYPE_WIFI and #CONNECTION_TYPE_CELLULAR are supported - /// @param[in] statistics_type The type of statistics - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONNECTION_ERROR_NONE Successful - /// @retval #CONNECTION_ERROR_NOT_INITIALIZED Not initialized - /// @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed - /// @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported - int connection_reset_statistics( - connection_h connection, - int connection_type, - int statistics_type, - ) { - return _connection_reset_statistics( - connection, - connection_type, - statistics_type, - ); - } - - late final _connection_reset_statisticsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(connection_h, ffi.Int32, - ffi.Int32)>>('connection_reset_statistics'); - late final _connection_reset_statistics = _connection_reset_statisticsPtr - .asFunction(); - - /// @brief Initializes DNSSD. - /// @since_tizen 3.0 - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - int dnssd_initialize() { - return _dnssd_initialize(); - } - - late final _dnssd_initializePtr = - _lookup>('dnssd_initialize'); - late final _dnssd_initialize = - _dnssd_initializePtr.asFunction(); - - /// @brief Deinitializes DNSSD. - /// @since_tizen 3.0 - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_INVALID_OPERATION Invalid Operation - /// @pre DNS-SD service must be initialized by dnssd_initialize(). - int dnssd_deinitialize() { - return _dnssd_deinitialize(); - } - - late final _dnssd_deinitializePtr = - _lookup>('dnssd_deinitialize'); - late final _dnssd_deinitialize = - _dnssd_deinitializePtr.asFunction(); - - /// @brief Creates a DNSSD local service handle. - /// @since_tizen 3.0 - /// @remarks You must release @a dnssd_service using dnssd_destroy_local_service(). - /// @param[in] service_type The DNSSD service type. It is expressed as type - /// followed by protocol, separated by a dot(e.g. "_ftp._tcp"). It - /// must begin with an underscore, followed by 1-15 characters which - /// may be letters, digits, or hyphens. The transport protocol must be - /// "_tcp" or "_udp". New service types should be registered at - /// http://www.dns-sd.org/ServiceTypes.html. - /// @param[out] dnssd_service The DNSSD local handle - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - /// @see dnssd_destroy_local_service() - /// @pre This API needs dnssd_initialize() before use - int dnssd_create_local_service( - ffi.Pointer service_type, - ffi.Pointer dnssd_service, - ) { - return _dnssd_create_local_service( - service_type, - dnssd_service, - ); - } - - late final _dnssd_create_local_servicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('dnssd_create_local_service'); - late final _dnssd_create_local_service = - _dnssd_create_local_servicePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys the DNSSD local service handle. - /// @details Destroying a local service doesn't deregister local service. If - /// local service was registered using dnssd_register_local_service(), - /// then it must be deregistered using dnssd_deregister_local_service() - /// before destroying the local service. - /// @since_tizen 3.0 - /// @remarks You must destroy only local services created using dnssd_create_local_service(). - /// @param[in] dnssd_service The DNSSD local service handle - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - /// @see dnssd_create_local_service() - /// @pre This API needs dnssd_create_local_service() before use. - int dnssd_destroy_local_service( - int dnssd_service, - ) { - return _dnssd_destroy_local_service( - dnssd_service, - ); - } - - late final _dnssd_destroy_local_servicePtr = - _lookup>( - 'dnssd_destroy_local_service'); - late final _dnssd_destroy_local_service = - _dnssd_destroy_local_servicePtr.asFunction(); - - /// @brief Sets the name of DNSSD local service. - /// @details Application should set name after creating local service using - /// dnssd_create_local_service() and before registering the local - /// service using dnssd_register_local_service(). - /// @since_tizen 3.0 - /// @remarks You must pass only local services created using dnssd_create_local_service(). - /// @param[in] local_service The DNSSD local service handle - /// @param[in] service_name The name of DNSSD local service - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - /// @see dnssd_create_local_service() - /// @pre This API needs dnssd_create_local_service() before use. - int dnssd_service_set_name( - int local_service, - ffi.Pointer service_name, - ) { - return _dnssd_service_set_name( - local_service, - service_name, - ); - } - - late final _dnssd_service_set_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(dnssd_service_h, - ffi.Pointer)>>('dnssd_service_set_name'); - late final _dnssd_service_set_name = _dnssd_service_set_namePtr - .asFunction)>(); - - /// @brief Sets the port number of DNSSD local service. - /// @details Application should set port after creating local service using - /// dnssd_create_local_service() and before registering the local - /// service using dnssd_register_local_service(). - /// @since_tizen 3.0 - /// @remarks You must pass only local services created using dnssd_create_local_service(). - /// @param[in] local_service The DNSSD local service handle - /// @param[in] port The port number of DNSSD local service - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - /// @see dnssd_create_local_service() - /// @pre This API needs dnssd_create_local_service() before use. - int dnssd_service_set_port( - int local_service, - int port, - ) { - return _dnssd_service_set_port( - local_service, - port, - ); - } - - late final _dnssd_service_set_portPtr = - _lookup>( - 'dnssd_service_set_port'); - late final _dnssd_service_set_port = - _dnssd_service_set_portPtr.asFunction(); - - /// @brief Adds the TXT record. - /// @details TXT record gives additional information about the service. - /// Some services discovered via dnssd_start_browsing_service() may - /// need more than just IP address and port number to completely - /// identify the service instance. For example, A web server typically - /// has multiple pages, each identified by its own URL. - /// So additional data is stored in a TXT record. Check Section 6 of - /// http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt - /// for details. TXT record of known service types can be found at - /// http://www.dns-sd.org/ServiceTypes.html. TXT record is stored in a - /// structured form using key/value pairs. - /// @since_tizen 3.0 - /// @remarks You must pass only local services created using dnssd_create_local_service(). - /// @param[in] local_service The DNSSD local service handle - /// @param[in] key The key of the TXT record. A null-terminated string which only - /// contains printable ASCII values (0x20-0x7E), excluding '=' (0x3D). - /// Keys should be 9 characters or fewer excluding NULL. Keys are case - /// insensitive. Keys for known service types can be found at - /// http://www.dns-sd.org/ServiceTypes.html. For details, see section - /// 6.4 of http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt. - /// @param[in] length The length of the value of the TXT record in bytes. The - /// total size of a typical DNS-SD TXT record is intended to be small - /// (upto 200 bytes). For details, see section 6.2 of - /// http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt - /// @param[in] value The value of the TXT record. It can be any binary value. For - /// value that represents textual data, UTF-8 is STRONGLY recommended. - /// For value that represents textual data, value_length should NOT - /// include the terminating null (if any) at the end of the string. If - /// NULL, then "key" will be added with no value. If non-NULL but - /// value_length is zero, then "key=" will be added with empty value. - /// For details see section 6.5 of - /// http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_SERVICE_NOT_RUNNING Service Not Running - /// @retval #DNSSD_ERROR_ALREADY_REGISTERED Already Registered - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - /// @retval #DNSSD_ERROR_OUT_OF_MEMORY Out of Memory - /// @see dnssd_create_local_service() - /// @pre This API needs dnssd_create_local_service() before use. - int dnssd_service_add_txt_record( - int local_service, - ffi.Pointer key, - int length, - ffi.Pointer value, - ) { - return _dnssd_service_add_txt_record( - local_service, - key, - length, - value, - ); - } - - late final _dnssd_service_add_txt_recordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - dnssd_service_h, - ffi.Pointer, - ffi.UnsignedShort, - ffi.Pointer)>>('dnssd_service_add_txt_record'); - late final _dnssd_service_add_txt_record = - _dnssd_service_add_txt_recordPtr.asFunction< - int Function( - int, ffi.Pointer, int, ffi.Pointer)>(); - - /// @brief Removes the TXT record. - /// @since_tizen 3.0 - /// @remarks You must pass only local services created using dnssd_create_local_service(). - /// @param[in] local_service The DNSSD local service handle - /// @param[in] key The key of the TXT record to be removed - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_SERVICE_NOT_RUNNING Service Not Running - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - /// @see dnssd_create_local_service() - /// @see dnssd_service_add_txt_record() - /// @pre This API needs dnssd_create_local_service() before use. - int dnssd_service_remove_txt_record( - int local_service, - ffi.Pointer key, - ) { - return _dnssd_service_remove_txt_record( - local_service, - key, - ); - } - - late final _dnssd_service_remove_txt_recordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(dnssd_service_h, - ffi.Pointer)>>('dnssd_service_remove_txt_record'); - late final _dnssd_service_remove_txt_record = - _dnssd_service_remove_txt_recordPtr - .asFunction)>(); - - /// @brief Sets/updates the DNS resource record. - /// @details If the resource record for the type has been previously added using - /// dnssd_service_set_record(), then the record will be updated. DNS - /// resource record can be set only after local_service is registered - /// using dnssd_register_local_service(). Data is added using - /// dnssd_service_add_txt_record() and then obtained using - /// dnssd_service_get_all_txt_record() to pass here. - /// @since_tizen 3.0 - /// @remarks You must pass only local services created using dnssd_create_local_service(). - /// @param[in] local_service The DNSSD local service handle - /// @param[in] type The resource record type. For details see, RFC 1035 and RFC 2782 - /// @param[in] length The length of the resource record in bytes - /// @param[in] data The data contained in resource record to be added - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_OPERATION_FAILED Operation failed - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_SERVICE_NOT_RUNNING Service Not Running - /// @retval #DNSSD_ERROR_ALREADY_REGISTERED Already Registered - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - /// @retval #DNSSD_ERROR_OUT_OF_MEMORY Out of Memory - /// @see dnssd_create_local_service() - /// @pre This API needs dnssd_create_local_service() before use. - int dnssd_service_set_record( - int local_service, - int type, - int length, - ffi.Pointer data, - ) { - return _dnssd_service_set_record( - local_service, - type, - length, - data, - ); - } - - late final _dnssd_service_set_recordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - dnssd_service_h, - ffi.UnsignedShort, - ffi.UnsignedShort, - ffi.Pointer)>>('dnssd_service_set_record'); - late final _dnssd_service_set_record = _dnssd_service_set_recordPtr - .asFunction)>(); - - /// @brief Unsets the DNS resource record. DNS resource record for the given type - /// must be set using dnssd_service_set_record(). - /// @since_tizen 3.0 - /// @remarks You must pass only local services created using dnssd_create_local_service(). - /// @param[in] local_service The DNSSD local service handle - /// @param[in] type The resource record type. For details, see RFC 1035 and RFC 2782 - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_OPERATION_FAILED Operation failed - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_SERVICE_NOT_RUNNING Service Not Running - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - /// @see dnssd_create_local_service() - /// @pre This API needs dnssd_create_local_service() before use. - int dnssd_service_unset_record( - int local_service, - int type, - ) { - return _dnssd_service_unset_record( - local_service, - type, - ); - } - - late final _dnssd_service_unset_recordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(dnssd_service_h, - ffi.UnsignedShort)>>('dnssd_service_unset_record'); - late final _dnssd_service_unset_record = - _dnssd_service_unset_recordPtr.asFunction(); - - /// @brief Registers the DNSSD local service for publishing. - /// @since_tizen 3.0 - /// @remarks You must pass only local services created using dnssd_create_local_service(). - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] local_service The DNSSD local service handle - /// @param[in] register_cb The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_OPERATION_FAILED Operation failed - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_SERVICE_NOT_RUNNING Service Not Running - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - /// @retval #DNSSD_ERROR_PERMISSION_DENIED Permission Denied - /// @see dnssd_create_local_service() - /// @pre This API needs dnssd_create_local_service() before use. - int dnssd_register_local_service( - int local_service, - dnssd_registered_cb register_cb, - ffi.Pointer user_data, - ) { - return _dnssd_register_local_service( - local_service, - register_cb, - user_data, - ); - } - - late final _dnssd_register_local_servicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(dnssd_service_h, dnssd_registered_cb, - ffi.Pointer)>>('dnssd_register_local_service'); - late final _dnssd_register_local_service = - _dnssd_register_local_servicePtr.asFunction< - int Function(int, dnssd_registered_cb, ffi.Pointer)>(); - - /// @brief Deregisters the DNSSD local service. - /// @since_tizen 3.0 - /// @remarks You must pass only local services registered using dnssd_register_local_service(). - /// @param[in] local_service The DNSSD local service handle - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_SERVICE_NOT_RUNNING Service Not Running - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - /// @see dnssd_create_local_service() - /// @see dnssd_register_local_service() - /// @pre This API needs dnssd_register_local_service() before use. - int dnssd_deregister_local_service( - int local_service, - ) { - return _dnssd_deregister_local_service( - local_service, - ); - } - - late final _dnssd_deregister_local_servicePtr = - _lookup>( - 'dnssd_deregister_local_service'); - late final _dnssd_deregister_local_service = - _dnssd_deregister_local_servicePtr.asFunction(); - - /// @brief Starts browsing the DNSSD remote service. - /// @details found_cb would be called only if there are any services available of - /// service_type provided in the argument. Application will keep - /// browsing for available/unavailable services until it calls - /// dnssd_stop_browsing_service(). - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] service_type The DNSSD service type to browse. It is expressed - /// as type followed by protocol, separated by a dot(e.g. "_ftp._tcp"). - /// It must begin with an underscore, followed by 1-15 characters - /// which may be letters, digits, or hyphens. The transport protocol - /// must be "_tcp" or "_udp". New service types should be registered - /// at http://www.dns-sd.org/ServiceTypes.html - /// @param[out] dnssd_service The DNSSD browse service handle - /// @param[in] found_cb The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_SERVICE_NOT_RUNNING Service Not Running - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - /// @retval #DNSSD_ERROR_PERMISSION_DENIED Permission Denied - /// @pre This API needs dnssd_initialize() before use. - int dnssd_start_browsing_service( - ffi.Pointer service_type, - ffi.Pointer dnssd_service, - dnssd_found_cb found_cb, - ffi.Pointer user_data, - ) { - return _dnssd_start_browsing_service( - service_type, - dnssd_service, - found_cb, - user_data, - ); - } - - late final _dnssd_start_browsing_servicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - dnssd_found_cb, - ffi.Pointer)>>('dnssd_start_browsing_service'); - late final _dnssd_start_browsing_service = - _dnssd_start_browsing_servicePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - dnssd_found_cb, ffi.Pointer)>(); - - /// @brief Stops browsing the DNSSD remote service. - /// @since_tizen 3.0 - /// @param[in] dnssd_service The DNSSD browse service handle returned by - /// dnssd_start_browsing_service() - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_SERVICE_NOT_RUNNING Service Not Running - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - /// @pre This API needs dnssd_start_browsing_service() before use. - int dnssd_stop_browsing_service( - int dnssd_service, - ) { - return _dnssd_stop_browsing_service( - dnssd_service, - ); - } - - late final _dnssd_stop_browsing_servicePtr = - _lookup>( - 'dnssd_stop_browsing_service'); - late final _dnssd_stop_browsing_service = - _dnssd_stop_browsing_servicePtr.asFunction(); - - /// @brief Gets the type of DNSSD local/remote service. - /// @since_tizen 3.0 - /// @remarks You must release @a service_type using free(). - /// @param[in] dnssd_service The DNSSD local/remote service handle - /// @param[out] service_type The type of DNSSD service. It is expressed as type - /// followed by protocol, separated by a dot(e.g. "_ftp._tcp"). It - /// must begin with an underscore, followed by 1-15 characters which - /// may be letters, digits, or hyphens. The transport protocol must be - /// "_tcp" or "_udp". New service types should be registered at - /// http://www.dns-sd.org/ServiceTypes.html - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - int dnssd_service_get_type( - int dnssd_service, - ffi.Pointer> service_type, - ) { - return _dnssd_service_get_type( - dnssd_service, - service_type, - ); - } - - late final _dnssd_service_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(dnssd_service_h, - ffi.Pointer>)>>('dnssd_service_get_type'); - late final _dnssd_service_get_type = _dnssd_service_get_typePtr - .asFunction>)>(); - - /// @brief Gets the name of DNSSD local/remote service. - /// @since_tizen 3.0 - /// @remarks You must release @a service_name using free(). - /// @param[in] dnssd_service The DNSSD local/remote service handle - /// @param[out] service_name The name of DNSSD service - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - int dnssd_service_get_name( - int dnssd_service, - ffi.Pointer> service_name, - ) { - return _dnssd_service_get_name( - dnssd_service, - service_name, - ); - } - - late final _dnssd_service_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(dnssd_service_h, - ffi.Pointer>)>>('dnssd_service_get_name'); - late final _dnssd_service_get_name = _dnssd_service_get_namePtr - .asFunction>)>(); - - /// @brief Gets the IP of DNSSD remote service. - /// @since_tizen 3.0 - /// @remarks You must release @a ip_v4_address, @a ip_v6_address using free(). - /// @param[in] dnssd_service The DNSSD remote service handle - /// @param[out] ip_v4_address The IP version 4 address of DNSSD service. If there - /// is no IPv4 Address, then it would contain NULL and should not be freed - /// @param[out] ip_v6_address The IP version 6 address of DNSSD service. If there - /// is no IPv6 Address, then it would contain NULL and should not be freed - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - int dnssd_service_get_ip( - int dnssd_service, - ffi.Pointer> ip_v4_address, - ffi.Pointer> ip_v6_address, - ) { - return _dnssd_service_get_ip( - dnssd_service, - ip_v4_address, - ip_v6_address, - ); - } - - late final _dnssd_service_get_ipPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(dnssd_service_h, ffi.Pointer>, - ffi.Pointer>)>>('dnssd_service_get_ip'); - late final _dnssd_service_get_ip = _dnssd_service_get_ipPtr.asFunction< - int Function(int, ffi.Pointer>, - ffi.Pointer>)>(); - - /// @brief Gets the port number of DNSSD local/remote service. - /// @since_tizen 3.0 - /// @param[in] dnssd_service The DNSSD service local/remote handle - /// @param[out] port The port number of DNSSD service - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - int dnssd_service_get_port( - int dnssd_service, - ffi.Pointer port, - ) { - return _dnssd_service_get_port( - dnssd_service, - port, - ); - } - - late final _dnssd_service_get_portPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(dnssd_service_h, - ffi.Pointer)>>('dnssd_service_get_port'); - late final _dnssd_service_get_port = _dnssd_service_get_portPtr - .asFunction)>(); - - /// @brief Gets the TXT record. - /// @details TXT record gives additional information about the service. Some - /// services discovered via dnssd_start_browsing_service() may need - /// more than just IP address and port number to completely identify - /// the service instance. For example, a web server typically has - /// multiple pages, each identified by its own URL. So additional data - /// is stored in a TXT record. Check Section 6 of - /// http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt for - /// details. TXT record of known service types can be found at - /// http://www.dns-sd.org/ServiceTypes.html. TXT record is stored in a - /// structured form using key/value pairs. - /// @since_tizen 3.0 - /// @remarks You must release @a value using free(). - /// @param[in] dnssd_service The DNSSD local/remote service handle - /// @param[out] length The length of the value of the TXT record in bytes - /// @param[out] value The value of the TXT record - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #DNSSD_ERROR_NONE Successful - /// @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported - /// @retval #DNSSD_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #DNSSD_ERROR_SERVICE_NOT_RUNNING Service Not Running - /// @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized - int dnssd_service_get_all_txt_record( - int dnssd_service, - ffi.Pointer length, - ffi.Pointer> value, - ) { - return _dnssd_service_get_all_txt_record( - dnssd_service, - length, - value, - ); - } - - late final _dnssd_service_get_all_txt_recordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(dnssd_service_h, ffi.Pointer, - ffi.Pointer>)>>( - 'dnssd_service_get_all_txt_record'); - late final _dnssd_service_get_all_txt_record = - _dnssd_service_get_all_txt_recordPtr.asFunction< - int Function(int, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Initializes the HTTP module. - /// @since_tizen 3.0 - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_OPERATION_FAILED Operation failed - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - /// @see http_deinit() - int http_init() { - return _http_init(); - } - - late final _http_initPtr = - _lookup>('http_init'); - late final _http_init = _http_initPtr.asFunction(); - - /// @brief Deinitializes the HTTP module. - /// @since_tizen 3.0 - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_OPERATION_FAILED Operation failed - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - /// @see http_init() - int http_deinit() { - return _http_deinit(); - } - - late final _http_deinitPtr = - _lookup>('http_deinit'); - late final _http_deinit = _http_deinitPtr.asFunction(); - - /// @brief Creates the HTTP session handle. - /// @since_tizen 3.0 - /// @remarks The @a http_session should be released using http_session_destroy(). - /// Opened transactions can't be submitted after destroying session handle. - /// @param[in] mode The HTTP session mode - /// @param[out] http_session The HTTP session handle - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - /// @see http_session_destroy() - int http_session_create( - int mode, - ffi.Pointer http_session, - ) { - return _http_session_create( - mode, - http_session, - ); - } - - late final _http_session_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, ffi.Pointer)>>('http_session_create'); - late final _http_session_create = _http_session_createPtr - .asFunction)>(); - - /// @brief Destroys the HTTP session handle. - /// @since_tizen 3.0 - /// @remarks http_session should be set to NULL after using it - /// @param[in] http_session The HTTP session handle - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - /// @see http_session_create() - int http_session_destroy( - http_session_h http_session, - ) { - return _http_session_destroy( - http_session, - ); - } - - late final _http_session_destroyPtr = - _lookup>( - 'http_session_destroy'); - late final _http_session_destroy = - _http_session_destroyPtr.asFunction(); - - /// @brief Opens HTTP transaction from the HTTP Session. - /// @since_tizen 3.0 - /// @remarks The @a http_transaction should be released using http_transaction_destroy(). - /// @param[in] http_session The HTTP session handle - /// @param[in] method The HTTP request method - /// @param[out] http_transaction The HTTP transaction handle - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_session_open_transaction( - http_session_h http_session, - int method, - ffi.Pointer http_transaction, - ) { - return _http_session_open_transaction( - http_session, - method, - http_transaction, - ); - } - - late final _http_session_open_transactionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - http_session_h, ffi.Int32, ffi.Pointer)>>( - 'http_session_open_transaction'); - late final _http_session_open_transaction = - _http_session_open_transactionPtr.asFunction< - int Function(http_session_h, int, ffi.Pointer)>(); - - /// @brief Sets the value to redirect the HTTP request automatically. - /// @since_tizen 3.0 - /// @param[in] http_session The HTTP session handle - /// @param[in] auto_redirection The value which determines whether allow redirection or not - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - /// @see http_session_get_auto_redirection() - int http_session_set_auto_redirection( - http_session_h http_session, - bool auto_redirection, - ) { - return _http_session_set_auto_redirection( - http_session, - auto_redirection, - ); - } - - late final _http_session_set_auto_redirectionPtr = - _lookup>( - 'http_session_set_auto_redirection'); - late final _http_session_set_auto_redirection = - _http_session_set_auto_redirectionPtr - .asFunction(); - - /// @brief Gets the auto redirection for the HTTP request. - /// @since_tizen 3.0 - /// @param[in] http_session The HTTP session handle - /// @param[out] auto_redirect The value of auto redirect - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - /// @see http_session_set_auto_redirection() - int http_session_get_auto_redirection( - http_session_h http_session, - ffi.Pointer auto_redirect, - ) { - return _http_session_get_auto_redirection( - http_session, - auto_redirect, - ); - } - - late final _http_session_get_auto_redirectionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_session_h, - ffi.Pointer)>>('http_session_get_auto_redirection'); - late final _http_session_get_auto_redirection = - _http_session_get_auto_redirectionPtr - .asFunction)>(); - - /// @brief Gets the number of active transactions in the current session. - /// @since_tizen 3.0 - /// @param[in] http_session The HTTP session handle - /// @param[out] active_transaction_count The number of activated transactions - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_session_get_active_transaction_count( - http_session_h http_session, - ffi.Pointer active_transaction_count, - ) { - return _http_session_get_active_transaction_count( - http_session, - active_transaction_count, - ); - } - - late final _http_session_get_active_transaction_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_session_h, ffi.Pointer)>>( - 'http_session_get_active_transaction_count'); - late final _http_session_get_active_transaction_count = - _http_session_get_active_transaction_countPtr - .asFunction)>(); - - /// @brief Gets the maximum number of transactions for the current session. - /// @since_tizen 3.0 - /// @param[in] http_session The HTTP session handle - /// @param[out] transaction_count The maximum transaction count - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_session_get_max_transaction_count( - http_session_h http_session, - ffi.Pointer transaction_count, - ) { - return _http_session_get_max_transaction_count( - http_session, - transaction_count, - ); - } - - late final _http_session_get_max_transaction_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_session_h, - ffi.Pointer)>>('http_session_get_max_transaction_count'); - late final _http_session_get_max_transaction_count = - _http_session_get_max_transaction_countPtr - .asFunction)>(); - - /// @brief Destroys all transactions. - /// @since_tizen 3.0 - /// @remarks All http_transactions should be set to NULL after using it - /// @param[in] http_session The HTTP session handle - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_OPERATION_FAILED Operation failed - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_session_destroy_all_transactions( - http_session_h http_session, - ) { - return _http_session_destroy_all_transactions( - http_session, - ); - } - - late final _http_session_destroy_all_transactionsPtr = - _lookup>( - 'http_session_destroy_all_transactions'); - late final _http_session_destroy_all_transactions = - _http_session_destroy_all_transactionsPtr - .asFunction(); - - /// @brief Submits the HTTP request. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet \n - /// %http://tizen.org/privilege/network.get - /// @param[in] http_transaction The HTTP transaction handle - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - /// @retval #HTTP_ERROR_PERMISSION_DENIED Permission denied - int http_transaction_submit( - http_transaction_h http_transaction, - ) { - return _http_transaction_submit( - http_transaction, - ); - } - - late final _http_transaction_submitPtr = - _lookup>( - 'http_transaction_submit'); - late final _http_transaction_submit = _http_transaction_submitPtr - .asFunction(); - - /// @brief Closes the HTTP transaction handle. - /// @since_tizen 3.0 - /// @remarks The @a http_transaction is released by http_transaction_destroy(). - /// http_transaction should be set to NULL after using it. - /// @param[in] http_transaction The HTTP transaction handle - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - /// @see http_transaction_create() - int http_transaction_destroy( - http_transaction_h http_transaction, - ) { - return _http_transaction_destroy( - http_transaction, - ); - } - - late final _http_transaction_destroyPtr = - _lookup>( - 'http_transaction_destroy'); - late final _http_transaction_destroy = _http_transaction_destroyPtr - .asFunction(); - - /// @brief Registers callback called when receives header. - /// @since_tizen 3.0 - /// @param[in] http_transaction The HTTP transaction handle - /// @param[in] header_cb The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_set_received_header_cb( - http_transaction_h http_transaction, - http_transaction_header_cb header_cb, - ffi.Pointer user_data, - ) { - return _http_transaction_set_received_header_cb( - http_transaction, - header_cb, - user_data, - ); - } - - late final _http_transaction_set_received_header_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_transaction_h, http_transaction_header_cb, - ffi.Pointer)>>( - 'http_transaction_set_received_header_cb'); - late final _http_transaction_set_received_header_cb = - _http_transaction_set_received_header_cbPtr.asFunction< - int Function(http_transaction_h, http_transaction_header_cb, - ffi.Pointer)>(); - - /// @brief Registers callback called when receives body. - /// @since_tizen 3.0 - /// @param[in] http_transaction The HTTP transaction handle - /// @param[in] body_cb The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_set_received_body_cb( - http_transaction_h http_transaction, - http_transaction_body_cb body_cb, - ffi.Pointer user_data, - ) { - return _http_transaction_set_received_body_cb( - http_transaction, - body_cb, - user_data, - ); - } - - late final _http_transaction_set_received_body_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_transaction_h, http_transaction_body_cb, - ffi.Pointer)>>('http_transaction_set_received_body_cb'); - late final _http_transaction_set_received_body_cb = - _http_transaction_set_received_body_cbPtr.asFunction< - int Function(http_transaction_h, http_transaction_body_cb, - ffi.Pointer)>(); - - /// @brief Registers callback called when writes data. - /// @since_tizen 3.0 - /// @param[in] http_transaction The HTTP transaction handle - /// @param[in] write_cb The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_set_uploaded_cb( - http_transaction_h http_transaction, - http_transaction_write_cb write_cb, - ffi.Pointer user_data, - ) { - return _http_transaction_set_uploaded_cb( - http_transaction, - write_cb, - user_data, - ); - } - - late final _http_transaction_set_uploaded_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_transaction_h, http_transaction_write_cb, - ffi.Pointer)>>('http_transaction_set_uploaded_cb'); - late final _http_transaction_set_uploaded_cb = - _http_transaction_set_uploaded_cbPtr.asFunction< - int Function(http_transaction_h, http_transaction_write_cb, - ffi.Pointer)>(); - - /// @brief Registers callback called when transaction is completed. - /// @since_tizen 3.0 - /// @param[in] http_transaction The HTTP transaction handle - /// @param[in] completed_cb The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_set_completed_cb( - http_transaction_h http_transaction, - http_transaction_completed_cb completed_cb, - ffi.Pointer user_data, - ) { - return _http_transaction_set_completed_cb( - http_transaction, - completed_cb, - user_data, - ); - } - - late final _http_transaction_set_completed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_transaction_h, http_transaction_completed_cb, - ffi.Pointer)>>('http_transaction_set_completed_cb'); - late final _http_transaction_set_completed_cb = - _http_transaction_set_completed_cbPtr.asFunction< - int Function(http_transaction_h, http_transaction_completed_cb, - ffi.Pointer)>(); - - /// @brief Registers callback called when transaction is aborted. - /// @since_tizen 3.0 - /// @param[in] http_transaction The HTTP transaction handle - /// @param[in] aborted_cb The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_set_aborted_cb( - http_transaction_h http_transaction, - http_transaction_aborted_cb aborted_cb, - ffi.Pointer user_data, - ) { - return _http_transaction_set_aborted_cb( - http_transaction, - aborted_cb, - user_data, - ); - } - - late final _http_transaction_set_aborted_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_transaction_h, http_transaction_aborted_cb, - ffi.Pointer)>>('http_transaction_set_aborted_cb'); - late final _http_transaction_set_aborted_cb = - _http_transaction_set_aborted_cbPtr.asFunction< - int Function(http_transaction_h, http_transaction_aborted_cb, - ffi.Pointer)>(); - - /// @brief Registers the progress callbacks. - /// @details Registers callback that is called when data is uploaded/downloaded. - /// @since_tizen 3.0 - /// @param[in] http_transaction The HTTP transaction handle - /// @param[in] progress_cb The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_set_progress_cb( - http_transaction_h http_transaction, - http_transaction_progress_cb progress_cb, - ffi.Pointer user_data, - ) { - return _http_transaction_set_progress_cb( - http_transaction, - progress_cb, - user_data, - ); - } - - late final _http_transaction_set_progress_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_transaction_h, http_transaction_progress_cb, - ffi.Pointer)>>('http_transaction_set_progress_cb'); - late final _http_transaction_set_progress_cb = - _http_transaction_set_progress_cbPtr.asFunction< - int Function(http_transaction_h, http_transaction_progress_cb, - ffi.Pointer)>(); - - /// @brief Sets the timeout in seconds that is the timeout for waiting the transaction. - /// @details Sets the timeout in seconds that is the timeout for waiting the transaction. \n - /// A timeout value of zero means an infinite timeout. - /// @since_tizen 3.0 - /// @param[in] http_transaction The HTTP transaction handle - /// @param[in] timeout The timeout in seconds - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_set_timeout( - http_transaction_h http_transaction, - int timeout, - ) { - return _http_transaction_set_timeout( - http_transaction, - timeout, - ); - } - - late final _http_transaction_set_timeoutPtr = _lookup< - ffi.NativeFunction>( - 'http_transaction_set_timeout'); - late final _http_transaction_set_timeout = _http_transaction_set_timeoutPtr - .asFunction(); - - /// @brief Gets the timeout in seconds for the transaction. - /// @since_tizen 3.0 - /// @param[in] http_transaction The HTTP transaction handle - /// @param[out] timeout The timeout in seconds - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_get_timeout( - http_transaction_h http_transaction, - ffi.Pointer timeout, - ) { - return _http_transaction_get_timeout( - http_transaction, - timeout, - ); - } - - late final _http_transaction_get_timeoutPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_transaction_h, - ffi.Pointer)>>('http_transaction_get_timeout'); - late final _http_transaction_get_timeout = _http_transaction_get_timeoutPtr - .asFunction)>(); - - /// @brief Resumes the transaction. - /// @since_tizen 3.0 - /// @param[in] http_transaction The HTTP transaction handle - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_OPERATION_FAILED Operation failed - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_resume( - http_transaction_h http_transaction, - ) { - return _http_transaction_resume( - http_transaction, - ); - } - - late final _http_transaction_resumePtr = - _lookup>( - 'http_transaction_resume'); - late final _http_transaction_resume = _http_transaction_resumePtr - .asFunction(); - - /// @brief Pauses the transaction. - /// @since_tizen 3.0 - /// @param[in] http_transaction The HTTP transaction handle - /// @param[in] pause_type The pause type of the connection - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_OPERATION_FAILED Operation failed - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_pause( - http_transaction_h http_transaction, - int pause_type, - ) { - return _http_transaction_pause( - http_transaction, - pause_type, - ); - } - - late final _http_transaction_pausePtr = _lookup< - ffi.NativeFunction>( - 'http_transaction_pause'); - late final _http_transaction_pause = _http_transaction_pausePtr - .asFunction(); - - /// @brief Cancels the transaction. - /// @details This function cancels the transaction.\n - /// The aborted callback is invoked after using it. - /// @since_tizen 3.0 - /// @param[in] http_transaction The HTTP transaction handle - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_OPERATION_FAILED Operation failed - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_cancel( - http_transaction_h http_transaction, - ) { - return _http_transaction_cancel( - http_transaction, - ); - } - - late final _http_transaction_cancelPtr = - _lookup>( - 'http_transaction_cancel'); - late final _http_transaction_cancel = _http_transaction_cancelPtr - .asFunction(); - - /// @brief Sets ready to write event for a transaction. - /// @since_tizen 3.0 - /// @param[in] http_transaction The HTTP transaction handle - /// @param[out] read_to_write Enable/disable ready to write - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_set_ready_to_write( - http_transaction_h http_transaction, - bool read_to_write, - ) { - return _http_transaction_set_ready_to_write( - http_transaction, - read_to_write, - ); - } - - late final _http_transaction_set_ready_to_writePtr = _lookup< - ffi.NativeFunction>( - 'http_transaction_set_ready_to_write'); - late final _http_transaction_set_ready_to_write = - _http_transaction_set_ready_to_writePtr - .asFunction(); - - /// @brief Sets the interface name. - /// @since_tizen 3.0 - /// @param[in] http_transaction The HTTP transaction handle - /// @param[in] interface_name The interface name to use as outgoing network interface - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_set_interface_name( - http_transaction_h http_transaction, - ffi.Pointer interface_name, - ) { - return _http_transaction_set_interface_name( - http_transaction, - interface_name, - ); - } - - late final _http_transaction_set_interface_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_transaction_h, - ffi.Pointer)>>('http_transaction_set_interface_name'); - late final _http_transaction_set_interface_name = - _http_transaction_set_interface_namePtr.asFunction< - int Function(http_transaction_h, ffi.Pointer)>(); - - /// @brief Gets the interface name. - /// @since_tizen 3.0 - /// @remarks The @a interface_name should be freed using free(). - /// @param[in] http_transaction The HTTP transaction handle - /// @param[out] interface_name The interface name - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_get_interface_name( - http_transaction_h http_transaction, - ffi.Pointer> interface_name, - ) { - return _http_transaction_get_interface_name( - http_transaction, - interface_name, - ); - } - - late final _http_transaction_get_interface_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - http_transaction_h, ffi.Pointer>)>>( - 'http_transaction_get_interface_name'); - late final _http_transaction_get_interface_name = - _http_transaction_get_interface_namePtr.asFunction< - int Function( - http_transaction_h, ffi.Pointer>)>(); - - /// @brief Sets the flag to verify a server certificate. - /// @details The verify determines whether verifies the peer's certificate. - /// @since_tizen 3.0 - /// @param[in] http_transaction The HTTP transaction handle - /// @param[in] verify The flag to verify a server certificate; true means verifies; false means it doesn't. - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_set_server_certificate_verification( - http_transaction_h http_transaction, - bool verify, - ) { - return _http_transaction_set_server_certificate_verification( - http_transaction, - verify, - ); - } - - late final _http_transaction_set_server_certificate_verificationPtr = _lookup< - ffi.NativeFunction>( - 'http_transaction_set_server_certificate_verification'); - late final _http_transaction_set_server_certificate_verification = - _http_transaction_set_server_certificate_verificationPtr - .asFunction(); - - /// @brief Gets the flag to verify a server certificate. - /// @since_tizen 3.0 - /// @param[in] http_transaction The HTTP transaction handle - /// @param[out] verify The flag to verify a server certificate; true means verifies; false means it doesn't. - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_get_server_certificate_verification( - http_transaction_h http_transaction, - ffi.Pointer verify, - ) { - return _http_transaction_get_server_certificate_verification( - http_transaction, - verify, - ); - } - - late final _http_transaction_get_server_certificate_verificationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_transaction_h, ffi.Pointer)>>( - 'http_transaction_get_server_certificate_verification'); - late final _http_transaction_get_server_certificate_verification = - _http_transaction_get_server_certificate_verificationPtr.asFunction< - int Function(http_transaction_h, ffi.Pointer)>(); - - /// @brief Sets the flag to allow TCP Fast Open. - /// @since_tizen 5.0 - /// @remarks TCP Fast Open depends on kernel version.\n - /// #HTTP_ERROR_NOT_SUPPORTED error will be returned for kernel version less than 3.13. - /// @param[in] http_transaction The HTTP transaction handle - /// @param[in] enable The flag to enable TCP Fast Open - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_set_tcp_fastopen( - http_transaction_h http_transaction, - bool enable, - ) { - return _http_transaction_set_tcp_fastopen( - http_transaction, - enable, - ); - } - - late final _http_transaction_set_tcp_fastopenPtr = _lookup< - ffi.NativeFunction>( - 'http_transaction_set_tcp_fastopen'); - late final _http_transaction_set_tcp_fastopen = - _http_transaction_set_tcp_fastopenPtr - .asFunction(); - - /// @brief Gets the flag to allow TCP Fast Open. - /// @since_tizen 5.0 - /// @remarks TCP Fast Open depends on kernel version.\n - /// #HTTP_ERROR_NOT_SUPPORTED error will be returned for kernel version less than 3.13. - /// @param[in] http_transaction The HTTP transaction handle - /// @param[out] enable The flag to enable TCP Fast Open - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_get_tcp_fastopen( - http_transaction_h http_transaction, - ffi.Pointer enable, - ) { - return _http_transaction_get_tcp_fastopen( - http_transaction, - enable, - ); - } - - late final _http_transaction_get_tcp_fastopenPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_transaction_h, - ffi.Pointer)>>('http_transaction_get_tcp_fastopen'); - late final _http_transaction_get_tcp_fastopen = - _http_transaction_get_tcp_fastopenPtr.asFunction< - int Function(http_transaction_h, ffi.Pointer)>(); - - /// @brief Adds a named field to header. - /// @details Adds a named field, which is a <@c fieldName, @c fieldValue> pair, to the current instance of HTTP Transaction. - /// @since_tizen 3.0 - /// @param[in] http_transaction The HTTP transaction handle - /// @param[in] field_name The HTTP Header Field name - /// @param[in] field_value The HTTP Header Field value - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_header_add_field( - http_transaction_h http_transaction, - ffi.Pointer field_name, - ffi.Pointer field_value, - ) { - return _http_transaction_header_add_field( - http_transaction, - field_name, - field_value, - ); - } - - late final _http_transaction_header_add_fieldPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_transaction_h, ffi.Pointer, - ffi.Pointer)>>('http_transaction_header_add_field'); - late final _http_transaction_header_add_field = - _http_transaction_header_add_fieldPtr.asFunction< - int Function(http_transaction_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Removes the named field from header. - /// @details Remove the named field, which is a <@c fieldName, @c fieldValue> pair, from the current instance of HTTP Transaction. - /// @since_tizen 3.0 - /// @param[in] http_transaction The HTTP transaction handle - /// @param[in] field_name The HTTP Header Field name - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_header_remove_field( - http_transaction_h http_transaction, - ffi.Pointer field_name, - ) { - return _http_transaction_header_remove_field( - http_transaction, - field_name, - ); - } - - late final _http_transaction_header_remove_fieldPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_transaction_h, - ffi.Pointer)>>('http_transaction_header_remove_field'); - late final _http_transaction_header_remove_field = - _http_transaction_header_remove_fieldPtr.asFunction< - int Function(http_transaction_h, ffi.Pointer)>(); - - /// @brief Gets the HTTP Header Field value from custom header. - /// @since_tizen 3.0 - /// @remarks The @a field_value should be freed using free(). - /// @param[in] http_transaction The HTTP transaction handle - /// @param[in] field_name The HTTP Header Field name - /// @param[out] field_value The HTTP Header Field value - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_header_get_field_value( - http_transaction_h http_transaction, - ffi.Pointer field_name, - ffi.Pointer> field_value, - ) { - return _http_transaction_header_get_field_value( - http_transaction, - field_name, - field_value, - ); - } - - late final _http_transaction_header_get_field_valuePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_transaction_h, ffi.Pointer, - ffi.Pointer>)>>( - 'http_transaction_header_get_field_value'); - late final _http_transaction_header_get_field_value = - _http_transaction_header_get_field_valuePtr.asFunction< - int Function(http_transaction_h, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Sets an HTTP method of the request header. - /// @details Sets an HTTP method such as GET, POST, PUT and etc. - /// @since_tizen 3.0 - /// @remarks The default method is GET. - /// @param[in] http_transaction The HTTP transaction handle - /// @param[in] method The HTTP method - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_request_set_method( - http_transaction_h http_transaction, - int method, - ) { - return _http_transaction_request_set_method( - http_transaction, - method, - ); - } - - late final _http_transaction_request_set_methodPtr = _lookup< - ffi.NativeFunction>( - 'http_transaction_request_set_method'); - late final _http_transaction_request_set_method = - _http_transaction_request_set_methodPtr - .asFunction(); - - /// @brief Gets the HTTP method from request header. - /// @since_tizen 3.0 - /// @param[in] http_transaction The HTTP transaction handle - /// @param[out] method The HTTP method - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_request_get_method( - http_transaction_h http_transaction, - ffi.Pointer method, - ) { - return _http_transaction_request_get_method( - http_transaction, - method, - ); - } - - late final _http_transaction_request_get_methodPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_transaction_h, - ffi.Pointer)>>('http_transaction_request_get_method'); - late final _http_transaction_request_get_method = - _http_transaction_request_get_methodPtr.asFunction< - int Function(http_transaction_h, ffi.Pointer)>(); - - /// @brief Sets an HTTP version of the request header. - /// @since_tizen 3.0 - /// @remarks The default version is HTTP 1.1. - /// @param[in] http_transaction The HTTP transaction handle - /// @param[in] version The HTTP version - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_request_set_version( - http_transaction_h http_transaction, - int version, - ) { - return _http_transaction_request_set_version( - http_transaction, - version, - ); - } - - late final _http_transaction_request_set_versionPtr = _lookup< - ffi.NativeFunction>( - 'http_transaction_request_set_version'); - late final _http_transaction_request_set_version = - _http_transaction_request_set_versionPtr - .asFunction(); - - /// @brief Gets the HTTP version from request header. - /// @details Gets the HTTP version. - /// @since_tizen 3.0 - /// @param[in] http_transaction The HTTP transaction handle - /// @param[out] version The HTTP version - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_request_get_version( - http_transaction_h http_transaction, - ffi.Pointer version, - ) { - return _http_transaction_request_get_version( - http_transaction, - version, - ); - } - - late final _http_transaction_request_get_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_transaction_h, - ffi.Pointer)>>('http_transaction_request_get_version'); - late final _http_transaction_request_get_version = - _http_transaction_request_get_versionPtr.asFunction< - int Function(http_transaction_h, ffi.Pointer)>(); - - /// @brief Sets a URI of the request header. - /// @details Sets a URI of the request header. - /// @since_tizen 3.0 - /// @remarks It should be used before http_transaction_submit(). - /// @param[in] http_transaction The HTTP transaction handle - /// @param[in] host_uri The URI to use in the request - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_request_set_uri( - http_transaction_h http_transaction, - ffi.Pointer host_uri, - ) { - return _http_transaction_request_set_uri( - http_transaction, - host_uri, - ); - } - - late final _http_transaction_request_set_uriPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_transaction_h, - ffi.Pointer)>>('http_transaction_request_set_uri'); - late final _http_transaction_request_set_uri = - _http_transaction_request_set_uriPtr.asFunction< - int Function(http_transaction_h, ffi.Pointer)>(); - - /// @brief Gets the URI. - /// @since_tizen 3.0 - /// @remarks The @a host_uri should be freed using free(). - /// @param[in] http_transaction The HTTP transaction handle - /// @param[out] host_uri The host URI - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_request_get_uri( - http_transaction_h http_transaction, - ffi.Pointer> host_uri, - ) { - return _http_transaction_request_get_uri( - http_transaction, - host_uri, - ); - } - - late final _http_transaction_request_get_uriPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - http_transaction_h, ffi.Pointer>)>>( - 'http_transaction_request_get_uri'); - late final _http_transaction_request_get_uri = - _http_transaction_request_get_uriPtr.asFunction< - int Function( - http_transaction_h, ffi.Pointer>)>(); - - /// @brief Sets the Accept-Encoding header field of HTTP Request. - /// @details The Accept-Encoding header enables automatic decompression of HTTP downloads. - /// @since_tizen 3.0 - /// @remarks If empty string is set, an Accept-Encoding header contains all supported built-in compressions. - /// @param[in] http_transaction The HTTP transaction handle - /// @param[in] encoding The encoding algorithms (e.g. gzip, deflate) - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_request_set_accept_encoding( - http_transaction_h http_transaction, - ffi.Pointer encoding, - ) { - return _http_transaction_request_set_accept_encoding( - http_transaction, - encoding, - ); - } - - late final _http_transaction_request_set_accept_encodingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_transaction_h, ffi.Pointer)>>( - 'http_transaction_request_set_accept_encoding'); - late final _http_transaction_request_set_accept_encoding = - _http_transaction_request_set_accept_encodingPtr.asFunction< - int Function(http_transaction_h, ffi.Pointer)>(); - - /// @brief Gets the Accept-Encoding header field of HTTP Request. - /// @since_tizen 3.0 - /// @remarks The @a encoding should be freed using free(). - /// @param[in] http_transaction The HTTP transaction handle - /// @param[out] encoding The encoding algorithms - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_request_get_accept_encoding( - http_transaction_h http_transaction, - ffi.Pointer> encoding, - ) { - return _http_transaction_request_get_accept_encoding( - http_transaction, - encoding, - ); - } - - late final _http_transaction_request_get_accept_encodingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - http_transaction_h, ffi.Pointer>)>>( - 'http_transaction_request_get_accept_encoding'); - late final _http_transaction_request_get_accept_encoding = - _http_transaction_request_get_accept_encodingPtr.asFunction< - int Function( - http_transaction_h, ffi.Pointer>)>(); - - /// @brief Sets a cookie in the HTTP request. - /// @since_tizen 3.0 - /// @remarks The format of string should be NME=CONTENTS (e.g. "name1=hello; name2=tizen;") - /// @param[in] http_transaction The HTTP transaction handle - /// @param[in] cookie The cookie - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_request_set_cookie( - http_transaction_h http_transaction, - ffi.Pointer cookie, - ) { - return _http_transaction_request_set_cookie( - http_transaction, - cookie, - ); - } - - late final _http_transaction_request_set_cookiePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_transaction_h, - ffi.Pointer)>>('http_transaction_request_set_cookie'); - late final _http_transaction_request_set_cookie = - _http_transaction_request_set_cookiePtr.asFunction< - int Function(http_transaction_h, ffi.Pointer)>(); - - /// @brief Gets a cookie in the HTTP request. - /// @since_tizen 3.0 - /// @remarks The @a cookie should be freed using free(). - /// @param[in] http_transaction The HTTP transaction handle - /// @param[out] cookie The cookie - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_request_get_cookie( - http_transaction_h http_transaction, - ffi.Pointer> cookie, - ) { - return _http_transaction_request_get_cookie( - http_transaction, - cookie, - ); - } - - late final _http_transaction_request_get_cookiePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - http_transaction_h, ffi.Pointer>)>>( - 'http_transaction_request_get_cookie'); - late final _http_transaction_request_get_cookie = - _http_transaction_request_get_cookiePtr.asFunction< - int Function( - http_transaction_h, ffi.Pointer>)>(); - - /// @brief Writes the request message body. - /// @details This function writes the request message body in the internal queue. \n - /// The written queue for request body is uploaded after invoking http_transaction_submit(). - /// @since_tizen 3.0 - /// @param[in] http_transaction The HTTP transaction handle - /// @param[in] body The message body data - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_request_write_body( - http_transaction_h http_transaction, - ffi.Pointer body, - ) { - return _http_transaction_request_write_body( - http_transaction, - body, - ); - } - - late final _http_transaction_request_write_bodyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_transaction_h, - ffi.Pointer)>>('http_transaction_request_write_body'); - late final _http_transaction_request_write_body = - _http_transaction_request_write_bodyPtr.asFunction< - int Function(http_transaction_h, ffi.Pointer)>(); - - /// @brief Sets the file path for uploading a file. - /// @since_tizen 3.0 - /// @remarks It is used with #HTTP_METHOD_PUT. \n - /// http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage. \n - /// http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. - /// @param[in] http_transaction The HTTP transaction handle - /// @param[in] file_path The path for file - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - /// @retval #HTTP_ERROR_PERMISSION_DENIED Permission denied - int http_transaction_request_set_upload_file( - http_transaction_h http_transaction, - ffi.Pointer file_path, - ) { - return _http_transaction_request_set_upload_file( - http_transaction, - file_path, - ); - } - - late final _http_transaction_request_set_upload_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_transaction_h, ffi.Pointer)>>( - 'http_transaction_request_set_upload_file'); - late final _http_transaction_request_set_upload_file = - _http_transaction_request_set_upload_filePtr.asFunction< - int Function(http_transaction_h, ffi.Pointer)>(); - - /// @brief Gets the HTTP status code from HTTP Response. - /// @since_tizen 3.0 - /// @param[in] http_transaction The HTTP transaction handle - /// @param[out] status_code The HTTP status code - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_response_get_status_code( - http_transaction_h http_transaction, - ffi.Pointer status_code, - ) { - return _http_transaction_response_get_status_code( - http_transaction, - status_code, - ); - } - - late final _http_transaction_response_get_status_codePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_transaction_h, ffi.Pointer)>>( - 'http_transaction_response_get_status_code'); - late final _http_transaction_response_get_status_code = - _http_transaction_response_get_status_codePtr.asFunction< - int Function(http_transaction_h, ffi.Pointer)>(); - - /// @brief Gets the HTTP status text from HTTP Response. - /// @since_tizen 3.0 - /// @remarks The @a status_text should be freed using free(). - /// @param[in] http_transaction The HTTP transaction handle - /// @param[out] status_text The HTTP status text - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_response_get_status_text( - http_transaction_h http_transaction, - ffi.Pointer> status_text, - ) { - return _http_transaction_response_get_status_text( - http_transaction, - status_text, - ); - } - - late final _http_transaction_response_get_status_textPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - http_transaction_h, ffi.Pointer>)>>( - 'http_transaction_response_get_status_text'); - late final _http_transaction_response_get_status_text = - _http_transaction_response_get_status_textPtr.asFunction< - int Function( - http_transaction_h, ffi.Pointer>)>(); - - /// @brief Gets the HTTP version from HTTP Response. - /// @since_tizen 3.0 - /// @param[in] http_transaction The HTTP transaction handle - /// @param[out] version The HTTP version - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_response_get_version( - http_transaction_h http_transaction, - ffi.Pointer version, - ) { - return _http_transaction_response_get_version( - http_transaction, - version, - ); - } - - late final _http_transaction_response_get_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_transaction_h, ffi.Pointer)>>( - 'http_transaction_response_get_version'); - late final _http_transaction_response_get_version = - _http_transaction_response_get_versionPtr.asFunction< - int Function(http_transaction_h, ffi.Pointer)>(); - - /// @brief Opens HTTP transaction with authentication information. - /// @since_tizen 3.0 - /// @remarks The @a http_auth_transaction should be released using http_transaction_destroy(). - /// @param[in] http_transaction The HTTP transaction handle - /// @param[out] http_auth_transaction The HTTP transaction handle - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_open_authentication( - http_transaction_h http_transaction, - ffi.Pointer http_auth_transaction, - ) { - return _http_transaction_open_authentication( - http_transaction, - http_auth_transaction, - ); - } - - late final _http_transaction_open_authenticationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - http_transaction_h, ffi.Pointer)>>( - 'http_transaction_open_authentication'); - late final _http_transaction_open_authentication = - _http_transaction_open_authenticationPtr.asFunction< - int Function(http_transaction_h, ffi.Pointer)>(); - - /// @brief Sets an HTTP credentials. - /// @details Sets an HTTP authentication scheme such as username and password. - /// @since_tizen 3.0 - /// @param[in] http_transaction The HTTP transaction handle - /// @param[in] user_name The HTTP user name - /// @param[in] password The HTTP password - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_set_credentials( - http_transaction_h http_transaction, - ffi.Pointer user_name, - ffi.Pointer password, - ) { - return _http_transaction_set_credentials( - http_transaction, - user_name, - password, - ); - } - - late final _http_transaction_set_credentialsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_transaction_h, ffi.Pointer, - ffi.Pointer)>>('http_transaction_set_credentials'); - late final _http_transaction_set_credentials = - _http_transaction_set_credentialsPtr.asFunction< - int Function(http_transaction_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the username & password for the HTTP credential. - /// @since_tizen 3.0 - /// @remarks The @a user_name & @a password should be freed using free(). - /// @param[in] http_transaction The HTTP transaction handle - /// @param[out] user_name The HTTP credential user name - /// @param[out] password The HTTP credential password - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_get_credentials( - http_transaction_h http_transaction, - ffi.Pointer> user_name, - ffi.Pointer> password, - ) { - return _http_transaction_get_credentials( - http_transaction, - user_name, - password, - ); - } - - late final _http_transaction_get_credentialsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - http_transaction_h, - ffi.Pointer>, - ffi.Pointer>)>>( - 'http_transaction_get_credentials'); - late final _http_transaction_get_credentials = - _http_transaction_get_credentialsPtr.asFunction< - int Function(http_transaction_h, ffi.Pointer>, - ffi.Pointer>)>(); - - /// @brief Sets an HTTP authentication scheme. - /// @details Set an HTTP authentication scheme such as BASIC, MD5, NTLM and etc. - /// @since_tizen 3.0 - /// @param[in] http_transaction The HTTP transaction handle - /// @param[in] auth_scheme The HTTP authentication scheme - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_set_http_auth_scheme( - http_transaction_h http_transaction, - int auth_scheme, - ) { - return _http_transaction_set_http_auth_scheme( - http_transaction, - auth_scheme, - ); - } - - late final _http_transaction_set_http_auth_schemePtr = _lookup< - ffi.NativeFunction>( - 'http_transaction_set_http_auth_scheme'); - late final _http_transaction_set_http_auth_scheme = - _http_transaction_set_http_auth_schemePtr - .asFunction(); - - /// @brief Gets the HTTP authentication scheme. - /// @since_tizen 3.0 - /// @param[in] http_transaction The HTTP transaction handle - /// @param[out] auth_scheme The HTTP auth scheme value - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_get_http_auth_scheme( - http_transaction_h http_transaction, - ffi.Pointer auth_scheme, - ) { - return _http_transaction_get_http_auth_scheme( - http_transaction, - auth_scheme, - ); - } - - late final _http_transaction_get_http_auth_schemePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(http_transaction_h, ffi.Pointer)>>( - 'http_transaction_get_http_auth_scheme'); - late final _http_transaction_get_http_auth_scheme = - _http_transaction_get_http_auth_schemePtr.asFunction< - int Function(http_transaction_h, ffi.Pointer)>(); - - /// @brief Gets the HTTP authentication realm. - /// @since_tizen 3.0 - /// @remarks The @a realm should be freed using free(). - /// @param[in] http_transaction The HTTP transaction handle - /// @param[out] realm The HTTP authentication realm value - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #HTTP_ERROR_NONE Successful - /// @retval #HTTP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #HTTP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #HTTP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #HTTP_ERROR_NOT_SUPPORTED Not Supported - int http_transaction_get_realm( - http_transaction_h http_transaction, - ffi.Pointer> realm, - ) { - return _http_transaction_get_realm( - http_transaction, - realm, - ); - } - - late final _http_transaction_get_realmPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - http_transaction_h, ffi.Pointer>)>>( - 'http_transaction_get_realm'); - late final _http_transaction_get_realm = - _http_transaction_get_realmPtr.asFunction< - int Function( - http_transaction_h, ffi.Pointer>)>(); - - /// @brief Creates a new list handle. - /// @since_tizen 3.0 - /// @remarks You must destroy @a list by calling iotcon_list_destroy() if @a list is no longer needed. - /// @param[in] type The type of list - /// @param[out] list A newly allocated list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_list_create( - int type, - ffi.Pointer list, - ) { - return _iotcon_list_create( - type, - list, - ); - } - - late final _iotcon_list_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, ffi.Pointer)>>('iotcon_list_create'); - late final _iotcon_list_create = _iotcon_list_createPtr - .asFunction)>(); - - /// @brief Destroys a list handle. - /// @details Releases a @a list and its internal data. - /// @since_tizen 3.0 - /// @param[in] list The handle to the list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_list_destroy( - iotcon_list_h list, - ) { - return _iotcon_list_destroy( - list, - ); - } - - late final _iotcon_list_destroyPtr = - _lookup>( - 'iotcon_list_destroy'); - late final _iotcon_list_destroy = - _iotcon_list_destroyPtr.asFunction(); - - /// @brief Adds a new element integer value into the list at the given position. - /// @details If @a pos is negative, or is larger than the number of elements in the list, the new value is added on to the end of the list. - /// @since_tizen 3.0 - /// @param[in] list The list handle - /// @param[in] val The new integer value - /// @param[in] pos The position to insert value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_list_add_int( - iotcon_list_h list, - int val, - int pos, - ) { - return _iotcon_list_add_int( - list, - val, - pos, - ); - } - - late final _iotcon_list_add_intPtr = _lookup< - ffi - .NativeFunction>( - 'iotcon_list_add_int'); - late final _iotcon_list_add_int = _iotcon_list_add_intPtr - .asFunction(); - - /// @brief Adds a new element boolean value into the list at the given position. - /// @details If @a pos is negative, or is larger than the number of elements in the list, the new value is added on to the end of the list. - /// @since_tizen 3.0 - /// @param[in] list The list handle - /// @param[in] val The new boolean value - /// @param[in] pos The position to insert value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_list_add_bool( - iotcon_list_h list, - bool val, - int pos, - ) { - return _iotcon_list_add_bool( - list, - val, - pos, - ); - } - - late final _iotcon_list_add_boolPtr = _lookup< - ffi - .NativeFunction>( - 'iotcon_list_add_bool'); - late final _iotcon_list_add_bool = _iotcon_list_add_boolPtr - .asFunction(); - - /// @brief Adds a new element double value into the list at the given position. - /// @details If @a pos is negative, or is larger than the number of elements in the list, the new value is added on to the end of the list. - /// @since_tizen 3.0 - /// @param[in] list The list handle - /// @param[in] val The new double value - /// @param[in] pos The position to insert value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_list_add_double( - iotcon_list_h list, - double val, - int pos, - ) { - return _iotcon_list_add_double( - list, - val, - pos, - ); - } - - late final _iotcon_list_add_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_list_h, ffi.Double, ffi.Int)>>('iotcon_list_add_double'); - late final _iotcon_list_add_double = _iotcon_list_add_doublePtr - .asFunction(); - - /// @brief Adds a new element string value into the list at the given position. - /// @details If @a pos is negative, or is larger than the number of elements in the list, the new value is added on to the end of the list. - /// @since_tizen 3.0 - /// @param[in] list The list handle - /// @param[in] val The new char value - /// @param[in] pos The position to insert value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_list_add_str( - iotcon_list_h list, - ffi.Pointer val, - int pos, - ) { - return _iotcon_list_add_str( - list, - val, - pos, - ); - } - - late final _iotcon_list_add_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, ffi.Pointer, - ffi.Int)>>('iotcon_list_add_str'); - late final _iotcon_list_add_str = _iotcon_list_add_strPtr - .asFunction, int)>(); - - /// @brief Adds a new element byte string value into the list at the given position. - /// @details If @a pos is negative, or is larger than the number of elements in the list, the new value is added on to the end of the list. - /// @since_tizen 3.0 - /// @param[in] list The list handle - /// @param[in] val The new byte string value - /// @param[in] len The length of @a val - /// @param[in] pos The position to insert value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_list_add_byte_str( - iotcon_list_h list, - ffi.Pointer val, - int len, - int pos, - ) { - return _iotcon_list_add_byte_str( - list, - val, - len, - pos, - ); - } - - late final _iotcon_list_add_byte_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, ffi.Pointer, - ffi.Int, ffi.Int)>>('iotcon_list_add_byte_str'); - late final _iotcon_list_add_byte_str = - _iotcon_list_add_byte_strPtr.asFunction< - int Function( - iotcon_list_h, ffi.Pointer, int, int)>(); - - /// @brief Adds a new element list into the list at the given position. - /// @details If @a pos is negative, or is larger than the number of elements in the list, the new value is added on to the end of the list. - /// @since_tizen 3.0 - /// @param[in] list The list handle - /// @param[in] val The new list value - /// @param[in] pos The position to insert value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_list_add_list( - iotcon_list_h list, - iotcon_list_h val, - int pos, - ) { - return _iotcon_list_add_list( - list, - val, - pos, - ); - } - - late final _iotcon_list_add_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_list_h, iotcon_list_h, ffi.Int)>>('iotcon_list_add_list'); - late final _iotcon_list_add_list = _iotcon_list_add_listPtr - .asFunction(); - - /// @brief Adds a new element attributes value into the list at the given position. - /// @details If @a pos is negative, or is larger than the number of elements in the list, the new value is added on to the end of the list. - /// @since_tizen 3.0 - /// @param[in] list The list handle - /// @param[in] val The new attributes value - /// @param[in] pos The position to insert value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_list_add_attributes( - iotcon_list_h list, - iotcon_attributes_h val, - int pos, - ) { - return _iotcon_list_add_attributes( - list, - val, - pos, - ); - } - - late final _iotcon_list_add_attributesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, iotcon_attributes_h, - ffi.Int)>>('iotcon_list_add_attributes'); - late final _iotcon_list_add_attributes = _iotcon_list_add_attributesPtr - .asFunction(); - - /// @brief Gets the integer value at the given position. - /// @details Iterates over the list until it reaches the @a pos-1 position. - /// @since_tizen 3.0 - /// @param[in] list The list handle - /// @param[in] pos The position - /// @param[out] val The integer value to get - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_REPRESENTATION Representation errors - int iotcon_list_get_nth_int( - iotcon_list_h list, - int pos, - ffi.Pointer val, - ) { - return _iotcon_list_get_nth_int( - list, - pos, - val, - ); - } - - late final _iotcon_list_get_nth_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, ffi.Int, - ffi.Pointer)>>('iotcon_list_get_nth_int'); - late final _iotcon_list_get_nth_int = _iotcon_list_get_nth_intPtr - .asFunction)>(); - - /// @brief Gets the boolean value at the given position. - /// @details Iterates over the list until it reaches the @a pos-1 position. - /// @since_tizen 3.0 - /// @param[in] list The list handle - /// @param[in] pos The position - /// @param[out] val The boolean value to get - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_REPRESENTATION Representation errors - int iotcon_list_get_nth_bool( - iotcon_list_h list, - int pos, - ffi.Pointer val, - ) { - return _iotcon_list_get_nth_bool( - list, - pos, - val, - ); - } - - late final _iotcon_list_get_nth_boolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, ffi.Int, - ffi.Pointer)>>('iotcon_list_get_nth_bool'); - late final _iotcon_list_get_nth_bool = _iotcon_list_get_nth_boolPtr - .asFunction)>(); - - /// @brief Gets the double value at the given position. - /// @details Iterates over the list until it reaches the @a pos-1 position. - /// @since_tizen 3.0 - /// @param[in] list The list handle - /// @param[in] pos The position - /// @param[out] val The double value to get - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_REPRESENTATION Representation errors - int iotcon_list_get_nth_double( - iotcon_list_h list, - int pos, - ffi.Pointer val, - ) { - return _iotcon_list_get_nth_double( - list, - pos, - val, - ); - } - - late final _iotcon_list_get_nth_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, ffi.Int, - ffi.Pointer)>>('iotcon_list_get_nth_double'); - late final _iotcon_list_get_nth_double = _iotcon_list_get_nth_doublePtr - .asFunction)>(); - - /// @brief Gets the string value at the given position. - /// @details Iterates over the list until it reaches the @a pos-1 position. - /// @since_tizen 3.0 - /// @remarks @a val must not be released using free(). - /// @param[in] list The list handle - /// @param[in] pos The position - /// @param[out] val The string value to get - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_REPRESENTATION Representation errors - int iotcon_list_get_nth_str( - iotcon_list_h list, - int pos, - ffi.Pointer> val, - ) { - return _iotcon_list_get_nth_str( - list, - pos, - val, - ); - } - - late final _iotcon_list_get_nth_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, ffi.Int, - ffi.Pointer>)>>('iotcon_list_get_nth_str'); - late final _iotcon_list_get_nth_str = _iotcon_list_get_nth_strPtr.asFunction< - int Function(iotcon_list_h, int, ffi.Pointer>)>(); - - /// @brief Gets the string value at the given position. - /// @details Iterates over the list until it reaches the @a pos-1 position. - /// @since_tizen 3.0 - /// @remarks @a val must not be released using free(). - /// @param[in] list The list handle - /// @param[in] pos The position - /// @param[out] val The byte string value to get - /// @param[out] len The length of the @a val - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_REPRESENTATION Representation errors - int iotcon_list_get_nth_byte_str( - iotcon_list_h list, - int pos, - ffi.Pointer> val, - ffi.Pointer len, - ) { - return _iotcon_list_get_nth_byte_str( - list, - pos, - val, - len, - ); - } - - late final _iotcon_list_get_nth_byte_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_list_h, - ffi.Int, - ffi.Pointer>, - ffi.Pointer)>>('iotcon_list_get_nth_byte_str'); - late final _iotcon_list_get_nth_byte_str = - _iotcon_list_get_nth_byte_strPtr.asFunction< - int Function( - iotcon_list_h, - int, - ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Gets the list value at the given position. - /// @details Iterates over the list until it reaches the @a pos-1 position. - /// @since_tizen 3.0 - /// @remarks @a dest must not be released using iotcon_list_destroy(). - /// @param[in] src The list handle - /// @param[in] pos The position - /// @param[out] dest The list value to get - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_REPRESENTATION Representation errors - int iotcon_list_get_nth_list( - iotcon_list_h src, - int pos, - ffi.Pointer dest, - ) { - return _iotcon_list_get_nth_list( - src, - pos, - dest, - ); - } - - late final _iotcon_list_get_nth_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, ffi.Int, - ffi.Pointer)>>('iotcon_list_get_nth_list'); - late final _iotcon_list_get_nth_list = - _iotcon_list_get_nth_listPtr.asFunction< - int Function(iotcon_list_h, int, ffi.Pointer)>(); - - /// @brief Gets the attributes value at the given position. - /// @details Iterates over the list until it reaches the @a pos-1 position. - /// @since_tizen 3.0 - /// @remarks @a attributes must not be released using iotcon_attributes_destroy(). - /// @param[in] list The list handle - /// @param[in] pos The position - /// @param[out] attributes The attributes value to get - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_REPRESENTATION Representation errors - int iotcon_list_get_nth_attributes( - iotcon_list_h list, - int pos, - ffi.Pointer attributes, - ) { - return _iotcon_list_get_nth_attributes( - list, - pos, - attributes, - ); - } - - late final _iotcon_list_get_nth_attributesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_list_h, ffi.Int, ffi.Pointer)>>( - 'iotcon_list_get_nth_attributes'); - late final _iotcon_list_get_nth_attributes = - _iotcon_list_get_nth_attributesPtr.asFunction< - int Function(iotcon_list_h, int, ffi.Pointer)>(); - - /// @brief Removes the value at the given position. - /// @details Iterates over the list until it reaches the @a pos-1 position. - /// @since_tizen 3.0 - /// @param[in] list The list handle - /// @param[in] pos The position to delete - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - int iotcon_list_remove_nth( - iotcon_list_h list, - int pos, - ) { - return _iotcon_list_remove_nth( - list, - pos, - ); - } - - late final _iotcon_list_remove_nthPtr = - _lookup>( - 'iotcon_list_remove_nth'); - late final _iotcon_list_remove_nth = - _iotcon_list_remove_nthPtr.asFunction(); - - /// @brief Gets the type of the list. - /// @details It gets the data type of value related to the @a key in @a attributes. - /// The data type could be one of #iotcon_type_e. - /// @since_tizen 3.0 - /// @param[in] list The list handle - /// @param[out] type The data type of list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_list_get_type( - iotcon_list_h list, - ffi.Pointer type, - ) { - return _iotcon_list_get_type( - list, - type, - ); - } - - late final _iotcon_list_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_list_h, ffi.Pointer)>>('iotcon_list_get_type'); - late final _iotcon_list_get_type = _iotcon_list_get_typePtr - .asFunction)>(); - - /// @brief Gets the number of elements in a list. - /// @since_tizen 3.0 - /// @param[in] list The handle to the list - /// @param[out] length The length of list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_list_get_length( - iotcon_list_h list, - ffi.Pointer length, - ) { - return _iotcon_list_get_length( - list, - length, - ); - } - - late final _iotcon_list_get_lengthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, - ffi.Pointer)>>('iotcon_list_get_length'); - late final _iotcon_list_get_length = _iotcon_list_get_lengthPtr - .asFunction)>(); - - /// @brief Gets all integer values of the given list by invoking the callback function. - /// @details iotcon_list_int_cb() will be called for each child. - /// @since_tizen 3.0 - /// @param[in] list The handle to the list - /// @param[in] cb The callback function to get each integer value - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @post iotcon_list_int_cb() will be called for each item. - /// @see iotcon_list_int_cb() - int iotcon_list_foreach_int( - iotcon_list_h list, - iotcon_list_int_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_list_foreach_int( - list, - cb, - user_data, - ); - } - - late final _iotcon_list_foreach_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, iotcon_list_int_cb, - ffi.Pointer)>>('iotcon_list_foreach_int'); - late final _iotcon_list_foreach_int = _iotcon_list_foreach_intPtr.asFunction< - int Function(iotcon_list_h, iotcon_list_int_cb, ffi.Pointer)>(); - - /// @brief Gets all boolean values of the given list by invoking the callback function. - /// @details iotcon_list_bool_cb() will be called for each child. - /// @since_tizen 3.0 - /// @param[in] list The handle to the list - /// @param[in] cb The callback function to get each boolean value - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @post iotcon_list_bool_cb() will be called for each item. - /// @see iotcon_list_bool_cb() - int iotcon_list_foreach_bool( - iotcon_list_h list, - iotcon_list_bool_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_list_foreach_bool( - list, - cb, - user_data, - ); - } - - late final _iotcon_list_foreach_boolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, iotcon_list_bool_cb, - ffi.Pointer)>>('iotcon_list_foreach_bool'); - late final _iotcon_list_foreach_bool = - _iotcon_list_foreach_boolPtr.asFunction< - int Function( - iotcon_list_h, iotcon_list_bool_cb, ffi.Pointer)>(); - - /// @brief Gets all double values of the given list by invoking the callback function. - /// @details iotcon_list_double_cb() will be called for each child. - /// @since_tizen 3.0 - /// @param[in] list The handle to the list - /// @param[in] cb The callback function to get each double value - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @post iotcon_list_double_cb() will be called for each item. - /// @see iotcon_list_double_cb() - int iotcon_list_foreach_double( - iotcon_list_h list, - iotcon_list_double_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_list_foreach_double( - list, - cb, - user_data, - ); - } - - late final _iotcon_list_foreach_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, iotcon_list_double_cb, - ffi.Pointer)>>('iotcon_list_foreach_double'); - late final _iotcon_list_foreach_double = - _iotcon_list_foreach_doublePtr.asFunction< - int Function( - iotcon_list_h, iotcon_list_double_cb, ffi.Pointer)>(); - - /// @brief Gets all string values of the given list by invoking the callback function. - /// @details iotcon_list_byte_str_cb() will be called for each child. - /// @since_tizen 3.0 - /// @param[in] list The handle to the list - /// @param[in] cb The callback function to get each string value - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @post iotcon_list_byte_str_cb() will be called for each item. - /// @see iotcon_list_byte_str_cb() - int iotcon_list_foreach_byte_str( - iotcon_list_h list, - iotcon_list_byte_str_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_list_foreach_byte_str( - list, - cb, - user_data, - ); - } - - late final _iotcon_list_foreach_byte_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, iotcon_list_byte_str_cb, - ffi.Pointer)>>('iotcon_list_foreach_byte_str'); - late final _iotcon_list_foreach_byte_str = - _iotcon_list_foreach_byte_strPtr.asFunction< - int Function( - iotcon_list_h, iotcon_list_byte_str_cb, ffi.Pointer)>(); - - /// @brief Gets all string values of the given list by invoking the callback function. - /// @details iotcon_list_str_cb() will be called for each child. - /// @since_tizen 3.0 - /// @param[in] list The handle to the list - /// @param[in] cb The callback function to get each string value - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @post iotcon_list_str_cb() will be called for each item. - /// @see iotcon_list_str_cb() - int iotcon_list_foreach_str( - iotcon_list_h list, - iotcon_list_str_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_list_foreach_str( - list, - cb, - user_data, - ); - } - - late final _iotcon_list_foreach_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, iotcon_list_str_cb, - ffi.Pointer)>>('iotcon_list_foreach_str'); - late final _iotcon_list_foreach_str = _iotcon_list_foreach_strPtr.asFunction< - int Function(iotcon_list_h, iotcon_list_str_cb, ffi.Pointer)>(); - - /// @brief Gets all sub lists of the given list by invoking the callback function. - /// @details iotcon_list_list_cb() will be called for each child. - /// @since_tizen 3.0 - /// @param[in] list The handle to the origin list - /// @param[in] cb The callback function to get each sub list - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @post iotcon_list_list_cb() will be called for each item. - /// @see iotcon_list_list_cb() - int iotcon_list_foreach_list( - iotcon_list_h list, - iotcon_list_list_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_list_foreach_list( - list, - cb, - user_data, - ); - } - - late final _iotcon_list_foreach_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, iotcon_list_list_cb, - ffi.Pointer)>>('iotcon_list_foreach_list'); - late final _iotcon_list_foreach_list = - _iotcon_list_foreach_listPtr.asFunction< - int Function( - iotcon_list_h, iotcon_list_list_cb, ffi.Pointer)>(); - - /// @brief Gets all attributes of the given list by invoking the callback function. - /// @details iotcon_list_attributes_cb() will be called for each child. - /// @since_tizen 3.0 - /// @param[in] list The handle to the list - /// @param[in] cb The callback function to get each attributes - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @post iotcon_list_attributes_cb() will be called for each item. - /// @see iotcon_list_attributes_cb() - int iotcon_list_foreach_attributes( - iotcon_list_h list, - iotcon_list_attributes_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_list_foreach_attributes( - list, - cb, - user_data, - ); - } - - late final _iotcon_list_foreach_attributesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_list_h, iotcon_list_attributes_cb, - ffi.Pointer)>>('iotcon_list_foreach_attributes'); - late final _iotcon_list_foreach_attributes = - _iotcon_list_foreach_attributesPtr.asFunction< - int Function(iotcon_list_h, iotcon_list_attributes_cb, - ffi.Pointer)>(); - - /// @brief Creates a new query handle. - /// @since_tizen 3.0 - /// @remarks You must destroy @a query by calling iotcon_query_destroy() if @a query is no longer needed. - /// @param[out] query A newly allocated query handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_query_destroy() - /// @see iotcon_query_add() - /// @see iotcon_query_remove() - /// @see iotcon_query_lookup() - int iotcon_query_create( - ffi.Pointer query, - ) { - return _iotcon_query_create( - query, - ); - } - - late final _iotcon_query_createPtr = _lookup< - ffi.NativeFunction)>>( - 'iotcon_query_create'); - late final _iotcon_query_create = _iotcon_query_createPtr - .asFunction)>(); - - /// @brief Destroys a query handle. - /// @since_tizen 3.0 - /// @param[in] query The handle of the query - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_query_create() - /// @see iotcon_query_add() - /// @see iotcon_query_remove() - /// @see iotcon_query_lookup() - int iotcon_query_destroy( - iotcon_query_h query, - ) { - return _iotcon_query_destroy( - query, - ); - } - - late final _iotcon_query_destroyPtr = - _lookup>( - 'iotcon_query_destroy'); - late final _iotcon_query_destroy = - _iotcon_query_destroyPtr.asFunction(); - - /// @brief Gets resource type from the query. - /// @since_tizen 3.0 - /// @remarks @a resource_type must not be released using free(). - /// @a resource_type must start with a lowercase alphabetic character, followed by a sequence - /// of lowercase alphabetic, numeric, ".", or "-" characters, and contains no white space. - /// @param[in] query The handle of the query - /// @param[out] resource_type Found resource type from query - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @see iotcon_query_create() - /// @see iotcon_query_destroy() - /// @see iotcon_query_add() - /// @see iotcon_query_remove() - /// @see iotcon_query_set_resource_type() - int iotcon_query_get_resource_type( - iotcon_query_h query, - ffi.Pointer> resource_type, - ) { - return _iotcon_query_get_resource_type( - query, - resource_type, - ); - } - - late final _iotcon_query_get_resource_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_query_h, ffi.Pointer>)>>( - 'iotcon_query_get_resource_type'); - late final _iotcon_query_get_resource_type = - _iotcon_query_get_resource_typePtr.asFunction< - int Function(iotcon_query_h, ffi.Pointer>)>(); - - /// @brief Gets resource interface from the query. - /// @since_tizen 3.0 - /// @remarks @a resource_iface could be a value such as #IOTCON_INTERFACE_DEFAULT. - /// @remarks @a resource_iface must not be released using free(). - /// @param[in] query The handle of the query - /// @param[out] resource_iface Found resource interface from query - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @see iotcon_query_create() - /// @see iotcon_query_destroy() - /// @see iotcon_query_add() - /// @see iotcon_query_remove() - /// @see iotcon_query_set_interface() - int iotcon_query_get_interface( - iotcon_query_h query, - ffi.Pointer> resource_iface, - ) { - return _iotcon_query_get_interface( - query, - resource_iface, - ); - } - - late final _iotcon_query_get_interfacePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_query_h, ffi.Pointer>)>>( - 'iotcon_query_get_interface'); - late final _iotcon_query_get_interface = - _iotcon_query_get_interfacePtr.asFunction< - int Function(iotcon_query_h, ffi.Pointer>)>(); - - /// @brief Sets the resource type into the query. - /// @since_tizen 3.0 - /// @param[in] query The handle of the query - /// @param[in] resource_type The resource type to set into the query - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_query_create() - /// @see iotcon_query_destroy() - /// @see iotcon_query_add() - /// @see iotcon_query_remove() - /// @see iotcon_query_lookup() - /// @see iotcon_query_get_resource_type() - int iotcon_query_set_resource_type( - iotcon_query_h query, - ffi.Pointer resource_type, - ) { - return _iotcon_query_set_resource_type( - query, - resource_type, - ); - } - - late final _iotcon_query_set_resource_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_query_h, - ffi.Pointer)>>('iotcon_query_set_resource_type'); - late final _iotcon_query_set_resource_type = - _iotcon_query_set_resource_typePtr - .asFunction)>(); - - /// @brief Sets the resource interface into the query. - /// @since_tizen 3.0 - /// @remarks @a resource_iface could be a value such as #IOTCON_INTERFACE_DEFAULT. - /// @param[in] query The handle of the query - /// @param[in] resource_iface The resource interface to add into the query - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_query_create() - /// @see iotcon_query_destroy() - /// @see iotcon_query_add() - /// @see iotcon_query_remove() - /// @see iotcon_query_lookup() - /// @see iotcon_query_get_interface() - int iotcon_query_set_interface( - iotcon_query_h query, - ffi.Pointer resource_iface, - ) { - return _iotcon_query_set_interface( - query, - resource_iface, - ); - } - - late final _iotcon_query_set_interfacePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_query_h, - ffi.Pointer)>>('iotcon_query_set_interface'); - late final _iotcon_query_set_interface = _iotcon_query_set_interfacePtr - .asFunction)>(); - - /// @brief Adds a new key and corresponding value into the query. - /// @since_tizen 3.0 - /// @remarks The full length of query should be less than or equal to 64. - /// @param[in] query The handle of the query - /// @param[in] key The key of the query to insert - /// @param[in] value The string data to insert into the query - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_query_create() - /// @see iotcon_query_destroy() - /// @see iotcon_query_remove() - /// @see iotcon_query_lookup() - int iotcon_query_add( - iotcon_query_h query, - ffi.Pointer key, - ffi.Pointer value, - ) { - return _iotcon_query_add( - query, - key, - value, - ); - } - - late final _iotcon_query_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_query_h, ffi.Pointer, - ffi.Pointer)>>('iotcon_query_add'); - late final _iotcon_query_add = _iotcon_query_addPtr.asFunction< - int Function( - iotcon_query_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Removes the key and its associated value from the query. - /// @since_tizen 3.0 - /// @param[in] query The handle of the query - /// @param[in] key The key of the option to delete - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_query_create() - /// @see iotcon_query_destroy() - /// @see iotcon_query_add() - /// @see iotcon_query_lookup() - int iotcon_query_remove( - iotcon_query_h query, - ffi.Pointer key, - ) { - return _iotcon_query_remove( - query, - key, - ); - } - - late final _iotcon_query_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_query_h, ffi.Pointer)>>('iotcon_query_remove'); - late final _iotcon_query_remove = _iotcon_query_removePtr - .asFunction)>(); - - /// @brief Looks up data at the given key from the query. - /// @since_tizen 3.0 - /// @remarks @a data must not be released using free(). - /// @param[in] query The handle of the query - /// @param[in] key The key of the query to lookup - /// @param[out] data Found data from query - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_query_create() - /// @see iotcon_query_destroy() - /// @see iotcon_query_add() - /// @see iotcon_query_remove() - int iotcon_query_lookup( - iotcon_query_h query, - ffi.Pointer key, - ffi.Pointer> data, - ) { - return _iotcon_query_lookup( - query, - key, - data, - ); - } - - late final _iotcon_query_lookupPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_query_h, ffi.Pointer, - ffi.Pointer>)>>('iotcon_query_lookup'); - late final _iotcon_query_lookup = _iotcon_query_lookupPtr.asFunction< - int Function(iotcon_query_h, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets all data of the query by invoking the callback function. - /// @details iotcon_query_foreach_cb() will be called for each query. \n - /// If iotcon_query_foreach_cb() returns false, iteration will be stopped. - /// @since_tizen 3.0 - /// @param[in] query The handle of the query - /// @param[in] cb The callback function to get data - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @post iotcon_query_foreach_cb() will be called for each query. - /// @see iotcon_query_foreach_cb() - int iotcon_query_foreach( - iotcon_query_h query, - iotcon_query_foreach_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_query_foreach( - query, - cb, - user_data, - ); - } - - late final _iotcon_query_foreachPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_query_h, iotcon_query_foreach_cb, - ffi.Pointer)>>('iotcon_query_foreach'); - late final _iotcon_query_foreach = _iotcon_query_foreachPtr.asFunction< - int Function( - iotcon_query_h, iotcon_query_foreach_cb, ffi.Pointer)>(); - - /// @brief Creates a new attributes handle. - /// @since_tizen 3.0 - /// @remarks You must destroy @a attributes by calling iotcon_attributes_destroy() if @a attributes is no longer needed. - /// @param[out] attributes A newly allocated attributes handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_attributes_destroy() - int iotcon_attributes_create( - ffi.Pointer attributes, - ) { - return _iotcon_attributes_create( - attributes, - ); - } - - late final _iotcon_attributes_createPtr = _lookup< - ffi - .NativeFunction)>>( - 'iotcon_attributes_create'); - late final _iotcon_attributes_create = _iotcon_attributes_createPtr - .asFunction)>(); - - /// @brief Destroys the attributes. - /// @details Releases @a attributes and its internal data. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle to free - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_attributes_create() - int iotcon_attributes_destroy( - iotcon_attributes_h attributes, - ) { - return _iotcon_attributes_destroy( - attributes, - ); - } - - late final _iotcon_attributes_destroyPtr = - _lookup>( - 'iotcon_attributes_destroy'); - late final _iotcon_attributes_destroy = _iotcon_attributes_destroyPtr - .asFunction(); - - /// @brief Clones the attributes handle. - /// @since_tizen 3.0 - /// @remarks You must destroy @a attributes_clone by calling iotcon_attributes_destroy() if @a attributes_clone is no longer needed. - /// @param[in] attributes The attributes handle - /// @param[out] attributes_clone The cloned attributes handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_attributes_create() - /// @see iotcon_attributes_destroy() - int iotcon_attributes_clone( - iotcon_attributes_h attributes, - ffi.Pointer attributes_clone, - ) { - return _iotcon_attributes_clone( - attributes, - attributes_clone, - ); - } - - late final _iotcon_attributes_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, - ffi.Pointer)>>('iotcon_attributes_clone'); - late final _iotcon_attributes_clone = _iotcon_attributes_clonePtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer)>(); - - /// @brief Adds a new key and integer value into the attributes. - /// @details If @a key is already exists, current value will be replaced with new @a val. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[in] val The value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_attributes_add_int( - iotcon_attributes_h attributes, - ffi.Pointer key, - int val, - ) { - return _iotcon_attributes_add_int( - attributes, - key, - val, - ); - } - - late final _iotcon_attributes_add_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Int)>>('iotcon_attributes_add_int'); - late final _iotcon_attributes_add_int = - _iotcon_attributes_add_intPtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, int)>(); - - /// @brief Adds a new key and boolean value into the attributes. - /// @details If @a key is already exists, current value will be replaced with new @a val. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[in] val The value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_attributes_add_bool( - iotcon_attributes_h attributes, - ffi.Pointer key, - bool val, - ) { - return _iotcon_attributes_add_bool( - attributes, - key, - val, - ); - } - - late final _iotcon_attributes_add_boolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Bool)>>('iotcon_attributes_add_bool'); - late final _iotcon_attributes_add_bool = - _iotcon_attributes_add_boolPtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, bool)>(); - - /// @brief Adds a new key and double value into the attributes. - /// @details If @a key is already exists, current value will be replaced with new @a val. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[in] val The value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_attributes_add_double( - iotcon_attributes_h attributes, - ffi.Pointer key, - double val, - ) { - return _iotcon_attributes_add_double( - attributes, - key, - val, - ); - } - - late final _iotcon_attributes_add_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Double)>>('iotcon_attributes_add_double'); - late final _iotcon_attributes_add_double = - _iotcon_attributes_add_doublePtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, double)>(); - - /// @brief Adds a new key and string value into the attributes. - /// @details If @a key is already exists, current value will be replaced with new @a val. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[in] val The value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_attributes_add_str( - iotcon_attributes_h attributes, - ffi.Pointer key, - ffi.Pointer val, - ) { - return _iotcon_attributes_add_str( - attributes, - key, - val, - ); - } - - late final _iotcon_attributes_add_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>>('iotcon_attributes_add_str'); - late final _iotcon_attributes_add_str = - _iotcon_attributes_add_strPtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Adds a new key and byte string value into the attributes. - /// @details If @a key is already exists, current value will be replaced with new @a val. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[in] val The value - /// @param[in] len The length of @a val - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_attributes_add_byte_str( - iotcon_attributes_h attributes, - ffi.Pointer key, - ffi.Pointer val, - int len, - ) { - return _iotcon_attributes_add_byte_str( - attributes, - key, - val, - len, - ); - } - - late final _iotcon_attributes_add_byte_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_attributes_h, - ffi.Pointer, - ffi.Pointer, - ffi.Int)>>('iotcon_attributes_add_byte_str'); - late final _iotcon_attributes_add_byte_str = - _iotcon_attributes_add_byte_strPtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer, int)>(); - - /// @brief Adds a new key and list value into the attributes. - /// @details If @a key already exists, current list will be replaced with new @a list. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[in] list The value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_attributes_add_list( - iotcon_attributes_h attributes, - ffi.Pointer key, - iotcon_list_h list, - ) { - return _iotcon_attributes_add_list( - attributes, - key, - list, - ); - } - - late final _iotcon_attributes_add_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - iotcon_list_h)>>('iotcon_attributes_add_list'); - late final _iotcon_attributes_add_list = - _iotcon_attributes_add_listPtr.asFunction< - int Function( - iotcon_attributes_h, ffi.Pointer, iotcon_list_h)>(); - - /// @brief Adds a new key and attributes value into the attributes. - /// @details If @a key already exists, current attributes will be replaced with new @a src. - /// @since_tizen 3.0 - /// @param[in] dest The attributes handle - /// @param[in] key The key - /// @param[in] src The attributes handle to set newly - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_attributes_add_attributes( - iotcon_attributes_h dest, - ffi.Pointer key, - iotcon_attributes_h src, - ) { - return _iotcon_attributes_add_attributes( - dest, - key, - src, - ); - } - - late final _iotcon_attributes_add_attributesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - iotcon_attributes_h)>>('iotcon_attributes_add_attributes'); - late final _iotcon_attributes_add_attributes = - _iotcon_attributes_add_attributesPtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, - iotcon_attributes_h)>(); - - /// @brief Adds a new key with NULL value into the attributes. - /// @details If @a key already exists, current value will be replaced with NULL. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] key The key to be set NULL - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_attributes_add_null( - iotcon_attributes_h attributes, - ffi.Pointer key, - ) { - return _iotcon_attributes_add_null( - attributes, - key, - ); - } - - late final _iotcon_attributes_add_nullPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, - ffi.Pointer)>>('iotcon_attributes_add_null'); - late final _iotcon_attributes_add_null = _iotcon_attributes_add_nullPtr - .asFunction)>(); - - /// @brief Gets the integer value from the given key. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[out] val The integer value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_attributes_get_int( - iotcon_attributes_h attributes, - ffi.Pointer key, - ffi.Pointer val, - ) { - return _iotcon_attributes_get_int( - attributes, - key, - val, - ); - } - - late final _iotcon_attributes_get_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>>('iotcon_attributes_get_int'); - late final _iotcon_attributes_get_int = - _iotcon_attributes_get_intPtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the boolean value from the given key. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[out] val The boolean value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_attributes_get_bool( - iotcon_attributes_h attributes, - ffi.Pointer key, - ffi.Pointer val, - ) { - return _iotcon_attributes_get_bool( - attributes, - key, - val, - ); - } - - late final _iotcon_attributes_get_boolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>>('iotcon_attributes_get_bool'); - late final _iotcon_attributes_get_bool = - _iotcon_attributes_get_boolPtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the double value from the given key. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[out] val The double value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_attributes_get_double( - iotcon_attributes_h attributes, - ffi.Pointer key, - ffi.Pointer val, - ) { - return _iotcon_attributes_get_double( - attributes, - key, - val, - ); - } - - late final _iotcon_attributes_get_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>>('iotcon_attributes_get_double'); - late final _iotcon_attributes_get_double = - _iotcon_attributes_get_doublePtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the string value from the given key. - /// @since_tizen 3.0 - /// @remarks @a val must not be released using free(). - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[out] val The string value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_attributes_get_str( - iotcon_attributes_h attributes, - ffi.Pointer key, - ffi.Pointer> val, - ) { - return _iotcon_attributes_get_str( - attributes, - key, - val, - ); - } - - late final _iotcon_attributes_get_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer>)>>( - 'iotcon_attributes_get_str'); - late final _iotcon_attributes_get_str = - _iotcon_attributes_get_strPtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets the byte string value from the given key. - /// @since_tizen 3.0 - /// @remarks @a val must not be released using free(). - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[out] val The byte string value - /// @param[out] len The length of @a val - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_attributes_get_byte_str( - iotcon_attributes_h attributes, - ffi.Pointer key, - ffi.Pointer> val, - ffi.Pointer len, - ) { - return _iotcon_attributes_get_byte_str( - attributes, - key, - val, - len, - ); - } - - late final _iotcon_attributes_get_byte_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_attributes_h, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('iotcon_attributes_get_byte_str'); - late final _iotcon_attributes_get_byte_str = - _iotcon_attributes_get_byte_strPtr.asFunction< - int Function( - iotcon_attributes_h, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Gets the list value from the given key. - /// @since_tizen 3.0 - /// @remarks @a list must not be released using iotcon_list_destroy(). - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[out] list The list value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_attributes_get_list( - iotcon_attributes_h attributes, - ffi.Pointer key, - ffi.Pointer list, - ) { - return _iotcon_attributes_get_list( - attributes, - key, - list, - ); - } - - late final _iotcon_attributes_get_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>>('iotcon_attributes_get_list'); - late final _iotcon_attributes_get_list = - _iotcon_attributes_get_listPtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the attributes value from the given key. - /// @since_tizen 3.0 - /// @remarks @a attributes must not be released using iotcon_attributes_destroy(). - /// @param[in] src The attributes handle - /// @param[in] key The key - /// @param[out] dest The attributes value at the key - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @retval #IOTCON_ERROR_INVALID_TYPE Invalid type - int iotcon_attributes_get_attributes( - iotcon_attributes_h src, - ffi.Pointer key, - ffi.Pointer dest, - ) { - return _iotcon_attributes_get_attributes( - src, - key, - dest, - ); - } - - late final _iotcon_attributes_get_attributesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>>( - 'iotcon_attributes_get_attributes'); - late final _iotcon_attributes_get_attributes = - _iotcon_attributes_get_attributesPtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Checks whether the value of given key is NULL or not. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[out] is_null true if the type of the given key is null, - /// otherwise false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_attributes_is_null( - iotcon_attributes_h attributes, - ffi.Pointer key, - ffi.Pointer is_null, - ) { - return _iotcon_attributes_is_null( - attributes, - key, - is_null, - ); - } - - late final _iotcon_attributes_is_nullPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>>('iotcon_attributes_is_null'); - late final _iotcon_attributes_is_null = - _iotcon_attributes_is_nullPtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Removes the key and its associated value from the attributes. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - int iotcon_attributes_remove( - iotcon_attributes_h attributes, - ffi.Pointer key, - ) { - return _iotcon_attributes_remove( - attributes, - key, - ); - } - - late final _iotcon_attributes_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, - ffi.Pointer)>>('iotcon_attributes_remove'); - late final _iotcon_attributes_remove = _iotcon_attributes_removePtr - .asFunction)>(); - - /// @brief Gets the type of a value at the given key. - /// @details It gets the data type of value related to the @a key in @a attributes. - /// The data type could be one of #iotcon_type_e. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] key The key - /// @param[out] type The data type of value related to the key in attributes handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - int iotcon_attributes_get_type( - iotcon_attributes_h attributes, - ffi.Pointer key, - ffi.Pointer type, - ) { - return _iotcon_attributes_get_type( - attributes, - key, - type, - ); - } - - late final _iotcon_attributes_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>>('iotcon_attributes_get_type'); - late final _iotcon_attributes_get_type = - _iotcon_attributes_get_typePtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Calls a function for each element of attributes. - /// @details iotcon_attributes_cb() will be called for each child. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @post iotcon_attributes_cb() will be called for each child. - /// @see iotcon_attributes_cb() - int iotcon_attributes_foreach( - iotcon_attributes_h attributes, - iotcon_attributes_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_attributes_foreach( - attributes, - cb, - user_data, - ); - } - - late final _iotcon_attributes_foreachPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_attributes_h, iotcon_attributes_cb, - ffi.Pointer)>>('iotcon_attributes_foreach'); - late final _iotcon_attributes_foreach = - _iotcon_attributes_foreachPtr.asFunction< - int Function(iotcon_attributes_h, iotcon_attributes_cb, - ffi.Pointer)>(); - - /// @brief Gets the number of keys in the attributes. - /// @since_tizen 3.0 - /// @param[in] attributes The attributes handle - /// @param[out] count The number of keys - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_attributes_get_keys_count( - iotcon_attributes_h attributes, - ffi.Pointer count, - ) { - return _iotcon_attributes_get_keys_count( - attributes, - count, - ); - } - - late final _iotcon_attributes_get_keys_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_attributes_h, ffi.Pointer)>>( - 'iotcon_attributes_get_keys_count'); - late final _iotcon_attributes_get_keys_count = - _iotcon_attributes_get_keys_countPtr.asFunction< - int Function(iotcon_attributes_h, ffi.Pointer)>(); - - /// @brief Creates a new option handle. - /// @since_tizen 3.0 - /// @remarks You must destroy @a options by calling iotcon_options_destroy() if @a options is no longer needed. - /// @param[out] options A newly allocated option handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_options_destroy() - /// @see iotcon_options_add() - /// @see iotcon_options_remove() - /// @see iotcon_options_lookup() - int iotcon_options_create( - ffi.Pointer options, - ) { - return _iotcon_options_create( - options, - ); - } - - late final _iotcon_options_createPtr = _lookup< - ffi.NativeFunction)>>( - 'iotcon_options_create'); - late final _iotcon_options_create = _iotcon_options_createPtr - .asFunction)>(); - - /// @brief Destroys an option handle. - /// @since_tizen 3.0 - /// @param[in] options The handle of the options - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_options_create() - /// @see iotcon_options_add() - /// @see iotcon_options_remove() - /// @see iotcon_options_lookup() - int iotcon_options_destroy( - iotcon_options_h options, - ) { - return _iotcon_options_destroy( - options, - ); - } - - late final _iotcon_options_destroyPtr = - _lookup>( - 'iotcon_options_destroy'); - late final _iotcon_options_destroy = - _iotcon_options_destroyPtr.asFunction(); - - /// @brief Adds a new ID and a corresponding data into the options. - /// @since_tizen 3.0 - /// @remarks iotcon_options_h can have up to 2 options. \n - /// Option ID is always situated between 2048 and 3000. \n - /// Length of option data is less than or equal to 15. - /// @param[in] options The handle of the options - /// @param[in] id The ID of the option to insert - /// @param[in] data The string data to insert into the options - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_options_create() - /// @see iotcon_options_destroy() - /// @see iotcon_options_remove() - /// @see iotcon_options_lookup() - int iotcon_options_add( - iotcon_options_h options, - int id, - ffi.Pointer data, - ) { - return _iotcon_options_add( - options, - id, - data, - ); - } - - late final _iotcon_options_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_options_h, ffi.UnsignedShort, - ffi.Pointer)>>('iotcon_options_add'); - late final _iotcon_options_add = _iotcon_options_addPtr - .asFunction)>(); - - /// @brief Removes the ID and its associated data from the options. - /// @since_tizen 3.0 - /// @param[in] options The handle of the options - /// @param[in] id The ID of the option to delete - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_options_create() - /// @see iotcon_options_destroy() - /// @see iotcon_options_add() - /// @see iotcon_options_lookup() - int iotcon_options_remove( - iotcon_options_h options, - int id, - ) { - return _iotcon_options_remove( - options, - id, - ); - } - - late final _iotcon_options_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_options_h, ffi.UnsignedShort)>>('iotcon_options_remove'); - late final _iotcon_options_remove = _iotcon_options_removePtr - .asFunction(); - - /// @brief Looks up data at the given ID from the options. - /// @since_tizen 3.0 - /// @remarks @a data must not be released using free(). - /// @param[in] options The handle of the options - /// @param[in] id The ID of the option to lookup - /// @param[out] data Found data from options - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_options_create() - /// @see iotcon_options_destroy() - /// @see iotcon_options_add() - /// @see iotcon_options_remove() - int iotcon_options_lookup( - iotcon_options_h options, - int id, - ffi.Pointer> data, - ) { - return _iotcon_options_lookup( - options, - id, - data, - ); - } - - late final _iotcon_options_lookupPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_options_h, ffi.UnsignedShort, - ffi.Pointer>)>>('iotcon_options_lookup'); - late final _iotcon_options_lookup = _iotcon_options_lookupPtr.asFunction< - int Function( - iotcon_options_h, int, ffi.Pointer>)>(); - - /// @brief Gets all data of the options by invoking the callback function. - /// @details iotcon_options_foreach_cb() will be called for each option. \n - /// If iotcon_options_foreach_cb() returns false, iteration will be stopped. - /// @since_tizen 3.0 - /// @param[in] options The handle of the options - /// @param[in] cb The callback function to get data - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @post iotcon_options_foreach_cb() will be called for each option. - /// @see iotcon_options_foreach_cb() - int iotcon_options_foreach( - iotcon_options_h options, - iotcon_options_foreach_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_options_foreach( - options, - cb, - user_data, - ); - } - - late final _iotcon_options_foreachPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_options_h, iotcon_options_foreach_cb, - ffi.Pointer)>>('iotcon_options_foreach'); - late final _iotcon_options_foreach = _iotcon_options_foreachPtr.asFunction< - int Function(iotcon_options_h, iotcon_options_foreach_cb, - ffi.Pointer)>(); - - /// @brief Creates a new Representation handle. - /// @since_tizen 3.0 - /// @remarks You must destroy @a repr by calling iotcon_representation_destroy() if @a repr is no longer needed. - /// @param[out] repr A newly allocated Representation handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_representation_destroy() - int iotcon_representation_create( - ffi.Pointer repr, - ) { - return _iotcon_representation_create( - repr, - ); - } - - late final _iotcon_representation_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'iotcon_representation_create'); - late final _iotcon_representation_create = _iotcon_representation_createPtr - .asFunction)>(); - - /// @brief Destroys a Representation. - /// @details Releases @a Representation and its internal data. - /// @since_tizen 3.0 - /// @param[in] repr The representation handle to free - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_representation_create() - int iotcon_representation_destroy( - iotcon_representation_h repr, - ) { - return _iotcon_representation_destroy( - repr, - ); - } - - late final _iotcon_representation_destroyPtr = - _lookup>( - 'iotcon_representation_destroy'); - late final _iotcon_representation_destroy = _iotcon_representation_destroyPtr - .asFunction(); - - /// @brief Clones from the source Representation. - /// @details Makes a deep copy of a source Representation. - /// @since_tizen 3.0 - /// @remarks You must destroy @a dest by calling iotcon_representation_destroy() if @a dest is no longer needed. - /// @param[in] src Source of Representation to be copied - /// @param[out] dest Clone of a source Representation - /// @return Clone of a source Representation, - /// otherwise NULL on failure - /// @retval iotcon_representation_h Success - /// @retval NULL Failure - int iotcon_representation_clone( - iotcon_representation_h src, - ffi.Pointer dest, - ) { - return _iotcon_representation_clone( - src, - dest, - ); - } - - late final _iotcon_representation_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_representation_h, - ffi.Pointer)>>( - 'iotcon_representation_clone'); - late final _iotcon_representation_clone = - _iotcon_representation_clonePtr.asFunction< - int Function( - iotcon_representation_h, ffi.Pointer)>(); - - /// @brief Appends resource type name. - /// @since_tizen 3.0 - /// @remarks Stored string is replaced with @a uri_path. If @a uri_path is NULL, stored string is set to NULL. - /// @param[in] repr The handle to the Representation - /// @param[in] uri_path The URI of resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_representation_set_uri_path( - iotcon_representation_h repr, - ffi.Pointer uri_path, - ) { - return _iotcon_representation_set_uri_path( - repr, - uri_path, - ); - } - - late final _iotcon_representation_set_uri_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_representation_h, - ffi.Pointer)>>('iotcon_representation_set_uri_path'); - late final _iotcon_representation_set_uri_path = - _iotcon_representation_set_uri_pathPtr.asFunction< - int Function(iotcon_representation_h, ffi.Pointer)>(); - - /// @brief Gets a URI path from the Representation. - /// @since_tizen 3.0 - /// @remarks @a uri_path must not be released using free(). - /// @param[in] repr The Representation handle - /// @param[out] uri_path The URI path to get - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - int iotcon_representation_get_uri_path( - iotcon_representation_h repr, - ffi.Pointer> uri_path, - ) { - return _iotcon_representation_get_uri_path( - repr, - uri_path, - ); - } - - late final _iotcon_representation_get_uri_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_representation_h, - ffi.Pointer>)>>( - 'iotcon_representation_get_uri_path'); - late final _iotcon_representation_get_uri_path = - _iotcon_representation_get_uri_pathPtr.asFunction< - int Function( - iotcon_representation_h, ffi.Pointer>)>(); - - /// @brief Sets resource type list to the Representation. - /// @since_tizen 3.0 - /// @remarks Stored list is replaced with @a types. If @a types is NULL, stored list is set to NULL. - /// @param[in] repr The handle to the Representation - /// @param[in] types The resource type list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_representation_set_resource_types( - iotcon_representation_h repr, - iotcon_resource_types_h types, - ) { - return _iotcon_representation_set_resource_types( - repr, - types, - ); - } - - late final _iotcon_representation_set_resource_typesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_representation_h, iotcon_resource_types_h)>>( - 'iotcon_representation_set_resource_types'); - late final _iotcon_representation_set_resource_types = - _iotcon_representation_set_resource_typesPtr.asFunction< - int Function(iotcon_representation_h, iotcon_resource_types_h)>(); - - /// @brief Gets list of resource type from the Representation. - /// @since_tizen 3.0 - /// @remarks @a types must not be released using iotcon_resource_types_destroy(). - /// @param[in] repr The Representation handle - /// @param[out] types The list of resource types to get - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_representation_get_resource_types( - iotcon_representation_h repr, - ffi.Pointer types, - ) { - return _iotcon_representation_get_resource_types( - repr, - types, - ); - } - - late final _iotcon_representation_get_resource_typesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_representation_h, - ffi.Pointer)>>( - 'iotcon_representation_get_resource_types'); - late final _iotcon_representation_get_resource_types = - _iotcon_representation_get_resource_typesPtr.asFunction< - int Function( - iotcon_representation_h, ffi.Pointer)>(); - - /// @brief Sets list of resource interfaces to the Representation. - /// @since_tizen 3.0 - /// @remarks Stored list is replaced with @a ifaces. If @a ifaces is NULL, stored list is set to NULL. - /// @param[in] repr The Representation handle - /// @param[in] ifaces The list of resource interfaces - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_representation_set_resource_interfaces( - iotcon_representation_h repr, - iotcon_resource_interfaces_h ifaces, - ) { - return _iotcon_representation_set_resource_interfaces( - repr, - ifaces, - ); - } - - late final _iotcon_representation_set_resource_interfacesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_representation_h, iotcon_resource_interfaces_h)>>( - 'iotcon_representation_set_resource_interfaces'); - late final _iotcon_representation_set_resource_interfaces = - _iotcon_representation_set_resource_interfacesPtr.asFunction< - int Function( - iotcon_representation_h, iotcon_resource_interfaces_h)>(); - - /// @brief Gets list of resource interfaces from the Representation. - /// @since_tizen 3.0 - /// @remarks @a ifaces must not be released using iotcon_resource_interfaces_destroy(). - /// @param[in] repr The Representation handle - /// @param[out] ifaces The list of resource interfaces to get - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_representation_get_resource_interfaces( - iotcon_representation_h repr, - ffi.Pointer ifaces, - ) { - return _iotcon_representation_get_resource_interfaces( - repr, - ifaces, - ); - } - - late final _iotcon_representation_get_resource_interfacesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_representation_h, - ffi.Pointer)>>( - 'iotcon_representation_get_resource_interfaces'); - late final _iotcon_representation_get_resource_interfaces = - _iotcon_representation_get_resource_interfacesPtr.asFunction< - int Function(iotcon_representation_h, - ffi.Pointer)>(); - - /// @brief Sets a new attributes handle into the Representation. - /// @since_tizen 3.0 - /// @param[in] repr The Representation handle - /// @param[in] attributes The attributes handle to be set newly - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_representation_set_attributes( - iotcon_representation_h repr, - iotcon_attributes_h attributes, - ) { - return _iotcon_representation_set_attributes( - repr, - attributes, - ); - } - - late final _iotcon_representation_set_attributesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_representation_h, - iotcon_attributes_h)>>('iotcon_representation_set_attributes'); - late final _iotcon_representation_set_attributes = - _iotcon_representation_set_attributesPtr.asFunction< - int Function(iotcon_representation_h, iotcon_attributes_h)>(); - - /// @brief Gets the attributes handle in the Representation. - /// @since_tizen 3.0 - /// @remarks @a attributes must not be released using iotcon_attributes_destroy(). - /// @param[in] repr The Representation handle - /// @param[in] attributes The attributes handle to get - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_representation_get_attributes( - iotcon_representation_h repr, - ffi.Pointer attributes, - ) { - return _iotcon_representation_get_attributes( - repr, - attributes, - ); - } - - late final _iotcon_representation_get_attributesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_representation_h, ffi.Pointer)>>( - 'iotcon_representation_get_attributes'); - late final _iotcon_representation_get_attributes = - _iotcon_representation_get_attributesPtr.asFunction< - int Function( - iotcon_representation_h, ffi.Pointer)>(); - - /// @brief Adds a new child Representation on to the end of the parent Representation. - /// @details Duplicated child Representation is allowed to append. - /// @since_tizen 3.0 - /// @param[in] parent The parent Representation handle - /// @param[in] child The child Representation handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_representation_add_child( - iotcon_representation_h parent, - iotcon_representation_h child, - ) { - return _iotcon_representation_add_child( - parent, - child, - ); - } - - late final _iotcon_representation_add_childPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_representation_h, - iotcon_representation_h)>>('iotcon_representation_add_child'); - late final _iotcon_representation_add_child = - _iotcon_representation_add_childPtr.asFunction< - int Function(iotcon_representation_h, iotcon_representation_h)>(); - - /// @brief Removes a child Representation from parent Representation without freeing. - /// @since_tizen 3.0 - /// @param[in] parent The parent Representation handle - /// @param[in] child The child Representation handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_representation_remove_child( - iotcon_representation_h parent, - iotcon_representation_h child, - ) { - return _iotcon_representation_remove_child( - parent, - child, - ); - } - - late final _iotcon_representation_remove_childPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_representation_h, - iotcon_representation_h)>>('iotcon_representation_remove_child'); - late final _iotcon_representation_remove_child = - _iotcon_representation_remove_childPtr.asFunction< - int Function(iotcon_representation_h, iotcon_representation_h)>(); - - /// @brief Calls a function for each child Representation of parent. - /// @details iotcon_children_cb() will be called for each child. - /// @since_tizen 3.0 - /// @param[in] parent The parent Representation handle - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @post iotcon_children_cb() will be called for each child. - /// @see iotcon_children_cb() - int iotcon_representation_foreach_children( - iotcon_representation_h parent, - iotcon_children_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_representation_foreach_children( - parent, - cb, - user_data, - ); - } - - late final _iotcon_representation_foreach_childrenPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_representation_h, iotcon_children_cb, - ffi.Pointer)>>( - 'iotcon_representation_foreach_children'); - late final _iotcon_representation_foreach_children = - _iotcon_representation_foreach_childrenPtr.asFunction< - int Function(iotcon_representation_h, iotcon_children_cb, - ffi.Pointer)>(); - - /// @brief Gets the number of child Representations in the parent Representation. - /// @since_tizen 3.0 - /// @param[in] parent The parent Representation handle - /// @param[out] count The number of child Representations - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_representation_get_child_count( - iotcon_representation_h parent, - ffi.Pointer count, - ) { - return _iotcon_representation_get_child_count( - parent, - count, - ); - } - - late final _iotcon_representation_get_child_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_representation_h, ffi.Pointer)>>( - 'iotcon_representation_get_child_count'); - late final _iotcon_representation_get_child_count = - _iotcon_representation_get_child_countPtr.asFunction< - int Function( - iotcon_representation_h, ffi.Pointer)>(); - - /// @brief Gets the child Representation at the given position. - /// @details Iterates over the parent until it reaches the @a pos-1 position. - /// @since_tizen 3.0 - /// @remarks @a child must not be released using iotcon_representation_destroy(). - /// @param[in] parent The parent Representation handle - /// @param[in] pos The position of the child Representation - /// @param[out] child The handle to the child Representation - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - int iotcon_representation_get_nth_child( - iotcon_representation_h parent, - int pos, - ffi.Pointer child, - ) { - return _iotcon_representation_get_nth_child( - parent, - pos, - child, - ); - } - - late final _iotcon_representation_get_nth_childPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_representation_h, ffi.Int, - ffi.Pointer)>>( - 'iotcon_representation_get_nth_child'); - late final _iotcon_representation_get_nth_child = - _iotcon_representation_get_nth_childPtr.asFunction< - int Function(iotcon_representation_h, int, - ffi.Pointer)>(); - - /// @brief Creates a new resource types handle. - /// @since_tizen 3.0 - /// @remarks You must destroy @a types by calling iotcon_resource_types_destroy() if @a types is no longer needed. - /// @param[out] types A newly allocated list of resource types handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_resource_types_destroy() - /// @see iotcon_resource_types_add() - /// @see iotcon_resource_types_remove() - /// @see iotcon_resource_types_clone() - int iotcon_resource_types_create( - ffi.Pointer types, - ) { - return _iotcon_resource_types_create( - types, - ); - } - - late final _iotcon_resource_types_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'iotcon_resource_types_create'); - late final _iotcon_resource_types_create = _iotcon_resource_types_createPtr - .asFunction)>(); - - /// @brief Destroys a resource types handle. - /// @since_tizen 3.0 - /// @param[in] types The handle of the resource types - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_resource_types_create() - /// @see iotcon_resource_types_add() - /// @see iotcon_resource_types_remove() - /// @see iotcon_resource_types_clone() - int iotcon_resource_types_destroy( - iotcon_resource_types_h types, - ) { - return _iotcon_resource_types_destroy( - types, - ); - } - - late final _iotcon_resource_types_destroyPtr = - _lookup>( - 'iotcon_resource_types_destroy'); - late final _iotcon_resource_types_destroy = _iotcon_resource_types_destroyPtr - .asFunction(); - - /// @brief Inserts a resource types into the list. - /// @since_tizen 3.0 - /// @remarks The length of @a type should be less than or equal to 61.\n - /// The @a type must start with a lowercase alphabetic character, followed by a sequence - /// of lowercase alphabetic, numeric, ".", or "-" characters, and contains no white space.\n - /// Duplicate strings are not allowed. - /// @param[in] types The handle of the resource types - /// @param[in] type The string data to insert into the resource types (e.g. "org.tizen.light") - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_ALREADY Already done - /// @see iotcon_resource_types_create() - /// @see iotcon_resource_types_destroy() - /// @see iotcon_resource_types_remove() - /// @see iotcon_resource_types_clone() - int iotcon_resource_types_add( - iotcon_resource_types_h types, - ffi.Pointer type, - ) { - return _iotcon_resource_types_add( - types, - type, - ); - } - - late final _iotcon_resource_types_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_types_h, - ffi.Pointer)>>('iotcon_resource_types_add'); - late final _iotcon_resource_types_add = - _iotcon_resource_types_addPtr.asFunction< - int Function(iotcon_resource_types_h, ffi.Pointer)>(); - - /// @brief Deletes a resource types from the list. - /// @since_tizen 3.0 - /// @param[in] types The handle of the resource types - /// @param[in] type The string data to delete from the resource types - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @see iotcon_resource_types_create() - /// @see iotcon_resource_types_destroy() - /// @see iotcon_resource_types_add() - /// @see iotcon_resource_types_clone() - int iotcon_resource_types_remove( - iotcon_resource_types_h types, - ffi.Pointer type, - ) { - return _iotcon_resource_types_remove( - types, - type, - ); - } - - late final _iotcon_resource_types_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_types_h, - ffi.Pointer)>>('iotcon_resource_types_remove'); - late final _iotcon_resource_types_remove = - _iotcon_resource_types_removePtr.asFunction< - int Function(iotcon_resource_types_h, ffi.Pointer)>(); - - /// @brief Gets all of the resource types of the list by invoking the callback function. - /// @details iotcon_resource_types_foreach_cb() will be called for each type. \n - /// If iotcon_resource_types_foreach_cb() returns false, iteration will be stopped. - /// @since_tizen 3.0 - /// @param[in] types The handle of resource types - /// @param[in] cb The callback function to get data - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @post iotcon_resource_types_foreach() will be called for each type. - /// @see iotcon_resource_types_foreach_cb() - int iotcon_resource_types_foreach( - iotcon_resource_types_h types, - iotcon_resource_types_foreach_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_resource_types_foreach( - types, - cb, - user_data, - ); - } - - late final _iotcon_resource_types_foreachPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_resource_types_h, - iotcon_resource_types_foreach_cb, - ffi.Pointer)>>('iotcon_resource_types_foreach'); - late final _iotcon_resource_types_foreach = - _iotcon_resource_types_foreachPtr.asFunction< - int Function(iotcon_resource_types_h, - iotcon_resource_types_foreach_cb, ffi.Pointer)>(); - - /// @brief Clones the resource types handle. - /// @details Makes a deep copy of a source list of resource types. - /// @since_tizen 3.0 - /// @remarks You must @a destroy dest by calling iotcon_resource_types_destroy() if @a dest is no longer needed. - /// @param[in] src The origin handle of the resource types - /// @param[out] dest Clone of a source list of resource types - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_resource_types_create() - /// @see iotcon_resource_types_destroy() - /// @see iotcon_resource_types_add() - /// @see iotcon_resource_types_remove() - int iotcon_resource_types_clone( - iotcon_resource_types_h src, - ffi.Pointer dest, - ) { - return _iotcon_resource_types_clone( - src, - dest, - ); - } - - late final _iotcon_resource_types_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_types_h, - ffi.Pointer)>>( - 'iotcon_resource_types_clone'); - late final _iotcon_resource_types_clone = - _iotcon_resource_types_clonePtr.asFunction< - int Function( - iotcon_resource_types_h, ffi.Pointer)>(); - - /// @brief Creates a new resource interfaces handle. - /// @since_tizen 3.0 - /// @remarks You must destroy @a ifaces by calling iotcon_resource_interfaces_destroy() if @a ifaces is no longer needed. - /// @param[out] ifaces A newly allocated list of resource ifaces handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_resource_interfaces_destroy() - /// @see iotcon_resource_interfaces_add() - /// @see iotcon_resource_interfaces_remove() - /// @see iotcon_resource_interfaces_clone() - int iotcon_resource_interfaces_create( - ffi.Pointer ifaces, - ) { - return _iotcon_resource_interfaces_create( - ifaces, - ); - } - - late final _iotcon_resource_interfaces_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'iotcon_resource_interfaces_create'); - late final _iotcon_resource_interfaces_create = - _iotcon_resource_interfaces_createPtr.asFunction< - int Function(ffi.Pointer)>(); - - /// @brief Destroys a resource ifaces handle. - /// @since_tizen 3.0 - /// @param[in] ifaces The handle of the resource ifaces - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_resource_interfaces_create() - /// @see iotcon_resource_interfaces_add() - /// @see iotcon_resource_interfaces_remove() - /// @see iotcon_resource_interfaces_clone() - int iotcon_resource_interfaces_destroy( - iotcon_resource_interfaces_h ifaces, - ) { - return _iotcon_resource_interfaces_destroy( - ifaces, - ); - } - - late final _iotcon_resource_interfaces_destroyPtr = _lookup< - ffi.NativeFunction>( - 'iotcon_resource_interfaces_destroy'); - late final _iotcon_resource_interfaces_destroy = - _iotcon_resource_interfaces_destroyPtr - .asFunction(); - - /// @brief Inserts a resource iface into the list. - /// @since_tizen 3.0 - /// @remarks @a iface could be a value such as #IOTCON_INTERFACE_DEFAULT. - /// @param[in] ifaces The handle of the resource ifaces - /// @param[in] iface The string data to insert into the resource ifaces - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_ALREADY Already done - /// @see iotcon_resource_interfaces_create() - /// @see iotcon_resource_interfaces_destroy() - /// @see iotcon_resource_interfaces_remove() - /// @see iotcon_resource_interfaces_clone() - int iotcon_resource_interfaces_add( - iotcon_resource_interfaces_h ifaces, - ffi.Pointer iface, - ) { - return _iotcon_resource_interfaces_add( - ifaces, - iface, - ); - } - - late final _iotcon_resource_interfaces_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_interfaces_h, - ffi.Pointer)>>('iotcon_resource_interfaces_add'); - late final _iotcon_resource_interfaces_add = - _iotcon_resource_interfaces_addPtr.asFunction< - int Function(iotcon_resource_interfaces_h, ffi.Pointer)>(); - - /// @brief Deletes a resource iface from the list. - /// @since_tizen 3.0 - /// @remarks @a iface could be a value such as #IOTCON_INTERFACE_DEFAULT. - /// @param[in] ifaces The handle of the resource ifaces - /// @param[in] iface The string data to delete from the resource ifaces - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @see iotcon_resource_interfaces_create() - /// @see iotcon_resource_interfaces_destroy() - /// @see iotcon_resource_interfaces_add() - /// @see iotcon_resource_interfaces_clone() - int iotcon_resource_interfaces_remove( - iotcon_resource_interfaces_h ifaces, - ffi.Pointer iface, - ) { - return _iotcon_resource_interfaces_remove( - ifaces, - iface, - ); - } - - late final _iotcon_resource_interfaces_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_interfaces_h, - ffi.Pointer)>>('iotcon_resource_interfaces_remove'); - late final _iotcon_resource_interfaces_remove = - _iotcon_resource_interfaces_removePtr.asFunction< - int Function(iotcon_resource_interfaces_h, ffi.Pointer)>(); - - /// @brief Gets all of the resource ifaces of the list by invoking the callback function. - /// @details iotcon_resource_interfaces_foreach_cb() will be called for each iface. \n - /// If iotcon_resource_interfaces_foreach_cb() returns false, iteration will be stopped. - /// @since_tizen 3.0 - /// @param[in] ifaces The handle of resource ifaces - /// @param[in] cb The callback function to get data - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @post iotcon_resource_interfaces_foreach() will be called for each iface. - /// @see iotcon_resource_interfaces_foreach_cb() - int iotcon_resource_interfaces_foreach( - iotcon_resource_interfaces_h ifaces, - iotcon_resource_interfaces_foreach_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_resource_interfaces_foreach( - ifaces, - cb, - user_data, - ); - } - - late final _iotcon_resource_interfaces_foreachPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_resource_interfaces_h, - iotcon_resource_interfaces_foreach_cb, - ffi.Pointer)>>('iotcon_resource_interfaces_foreach'); - late final _iotcon_resource_interfaces_foreach = - _iotcon_resource_interfaces_foreachPtr.asFunction< - int Function(iotcon_resource_interfaces_h, - iotcon_resource_interfaces_foreach_cb, ffi.Pointer)>(); - - /// @brief Clones the resource ifaces handle. - /// @details Makes a deep copy of a source list of resource ifaces. - /// @since_tizen 3.0 - /// @remarks You must @a destroy dest by calling iotcon_resource_interfaces_destroy() if @a dest is no longer needed. - /// @param[in] src The origin handle of the resource ifaces - /// @param[out] dest Clone of a source list of resource ifaces - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_resource_interfaces_create() - /// @see iotcon_resource_interfaces_destroy() - /// @see iotcon_resource_interfaces_add() - /// @see iotcon_resource_interfaces_remove() - int iotcon_resource_interfaces_clone( - iotcon_resource_interfaces_h src, - ffi.Pointer dest, - ) { - return _iotcon_resource_interfaces_clone( - src, - dest, - ); - } - - late final _iotcon_resource_interfaces_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_interfaces_h, - ffi.Pointer)>>( - 'iotcon_resource_interfaces_clone'); - late final _iotcon_resource_interfaces_clone = - _iotcon_resource_interfaces_clonePtr.asFunction< - int Function(iotcon_resource_interfaces_h, - ffi.Pointer)>(); - - /// @brief Creates a resource handle and registers the resource in server. - /// @details Registers a resource specified by @a uri_path, @a res_types, @a ifaces which has @a properties in IoTCon server. \n - /// When client finds the registered resource, iotcon_request_handler_cb() will be called automatically. \n - /// @a uri_path format would be relative URI path like '/a/light' \n - /// @a res_types is a list of resource types. Create a iotcon_resource_types_h handle and add types string to it. \n - /// @a ifaces is a list of resource interfaces. Create a iotcon_resource_interfaces_h handle and add interfaces string to it. \n - /// @a policies also can contain multiple policies like IOTCON_RESOURCE_DISCOVERABLE | IOTCON_RESOURCE_OBSERVABLE. \n - /// iotcon_request_handler_cb() will be called when receive CRUD request to the registered resource. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @remarks @a uri_path length must be less than 128. \n - /// You must destroy @a resource by calling iotcon_resource_destroy() if @a resource is no longer needed. - /// @param[in] uri_path The URI path of the resource - /// @param[in] res_types The list of type of the resource - /// @param[in] ifaces The list of interface of the resource - /// @param[in] policies The policies of the resource \n - /// Set of #iotcon_resource_policy_e - /// @param[in] cb The request handler callback function - /// @param[in] user_data The user data to pass to the callback function - /// @param[out] resource_handle The handle of the resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_IOTIVITY IoTivity errors - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @post When the resource receive CRUD request, iotcon_request_handler_cb() will be called. - /// @see iotcon_resource_destroy() - /// @see iotcon_resource_bind_interface() - /// @see iotcon_resource_bind_type() - /// @see iotcon_resource_set_request_handler() - /// @see iotcon_resource_bind_child_resource() - /// @see iotcon_resource_unbind_child_resource() - /// @see iotcon_request_handler_cb() - int iotcon_resource_create( - ffi.Pointer uri_path, - iotcon_resource_types_h res_types, - iotcon_resource_interfaces_h ifaces, - int policies, - iotcon_request_handler_cb cb, - ffi.Pointer user_data, - ffi.Pointer resource_handle, - ) { - return _iotcon_resource_create( - uri_path, - res_types, - ifaces, - policies, - cb, - user_data, - resource_handle, - ); - } - - late final _iotcon_resource_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - iotcon_resource_types_h, - iotcon_resource_interfaces_h, - ffi.Uint8, - iotcon_request_handler_cb, - ffi.Pointer, - ffi.Pointer)>>('iotcon_resource_create'); - late final _iotcon_resource_create = _iotcon_resource_createPtr.asFunction< - int Function( - ffi.Pointer, - iotcon_resource_types_h, - iotcon_resource_interfaces_h, - int, - iotcon_request_handler_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Destroys the resource and releases its data. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @remarks When a normal variable is used, there is only permission denied error. - /// If the errors of this API are not handled, then you must check an application has the privileges for the API. - /// @param[in] resource_handle The handle of the resource to be unregistered - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_resource_create() - /// @see iotcon_resource_bind_interface() - /// @see iotcon_resource_bind_type() - /// @see iotcon_resource_set_request_handler() - /// @see iotcon_resource_bind_child_resource() - /// @see iotcon_resource_unbind_child_resource() - /// @see iotcon_request_handler_cb() - int iotcon_resource_destroy( - iotcon_resource_h resource_handle, - ) { - return _iotcon_resource_destroy( - resource_handle, - ); - } - - late final _iotcon_resource_destroyPtr = - _lookup>( - 'iotcon_resource_destroy'); - late final _iotcon_resource_destroy = - _iotcon_resource_destroyPtr.asFunction(); - - /// @brief Binds an interface to the resource. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @remarks @a iface could be a value such as #IOTCON_INTERFACE_DEFAULT. - /// @param[in] resource The handle of the resource - /// @param[in] iface The interface to be bound to the resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @retval #IOTCON_ERROR_ALREADY Already done - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_resource_create() - /// @see iotcon_resource_destroy() - /// @see iotcon_resource_bind_type() - /// @see iotcon_resource_set_request_handler() - /// @see iotcon_resource_bind_child_resource() - /// @see iotcon_resource_unbind_child_resource() - /// @see iotcon_request_handler_cb() - int iotcon_resource_bind_interface( - iotcon_resource_h resource, - ffi.Pointer iface, - ) { - return _iotcon_resource_bind_interface( - resource, - iface, - ); - } - - late final _iotcon_resource_bind_interfacePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_h, - ffi.Pointer)>>('iotcon_resource_bind_interface'); - late final _iotcon_resource_bind_interface = - _iotcon_resource_bind_interfacePtr - .asFunction)>(); - - /// @brief Binds a type to the resource. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @remarks The length of @a resource_type should be less than or equal to 61.\n - /// The @a resource_type must start with a lowercase alphabetic character, followed by a sequence - /// of lowercase alphabetic, numeric, ".", or "-" characters, and contains no white space. - /// @param[in] resource_handle The handle of the resource - /// @param[in] resource_type The type to be bound to the resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @retval #IOTCON_ERROR_ALREADY Already done - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_resource_create() - /// @see iotcon_resource_destroy() - /// @see iotcon_resource_bind_interface() - /// @see iotcon_resource_set_request_handler() - /// @see iotcon_resource_bind_child_resource() - /// @see iotcon_resource_unbind_child_resource() - /// @see iotcon_request_handler_cb() - int iotcon_resource_bind_type( - iotcon_resource_h resource_handle, - ffi.Pointer resource_type, - ) { - return _iotcon_resource_bind_type( - resource_handle, - resource_type, - ); - } - - late final _iotcon_resource_bind_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_h, - ffi.Pointer)>>('iotcon_resource_bind_type'); - late final _iotcon_resource_bind_type = _iotcon_resource_bind_typePtr - .asFunction)>(); - - /// @brief Sets a request handler to the resource. - /// @details When the resource receive CRUD request, iotcon_request_handler_cb() will be called. - /// @since_tizen 3.0 - /// @remarks Registered callback function will be replaced with the new @a cb. - /// @param[in] resource The handle of the resource - /// @param[in] cb The request handler to be bound to the resource - /// @param[in] user_data The user data to pass to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_resource_create() - /// @see iotcon_resource_destroy() - /// @see iotcon_resource_bind_interface() - /// @see iotcon_resource_bind_type() - /// @see iotcon_resource_bind_child_resource() - /// @see iotcon_resource_unbind_child_resource() - /// @see iotcon_request_handler_cb() - int iotcon_resource_set_request_handler( - iotcon_resource_h resource, - iotcon_request_handler_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_resource_set_request_handler( - resource, - cb, - user_data, - ); - } - - late final _iotcon_resource_set_request_handlerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_h, iotcon_request_handler_cb, - ffi.Pointer)>>('iotcon_resource_set_request_handler'); - late final _iotcon_resource_set_request_handler = - _iotcon_resource_set_request_handlerPtr.asFunction< - int Function(iotcon_resource_h, iotcon_request_handler_cb, - ffi.Pointer)>(); - - /// @brief Binds a child resource into the parent resource. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] parent The handle of the parent resource - /// @param[in] child The handle of the child resource to be added to the parent resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_ALREADY Already done - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_resource_create() - /// @see iotcon_resource_destroy() - /// @see iotcon_resource_bind_interface() - /// @see iotcon_resource_bind_type() - /// @see iotcon_resource_set_request_handler() - /// @see iotcon_resource_unbind_child_resource() - /// @see iotcon_request_handler_cb() - int iotcon_resource_bind_child_resource( - iotcon_resource_h parent, - iotcon_resource_h child, - ) { - return _iotcon_resource_bind_child_resource( - parent, - child, - ); - } - - late final _iotcon_resource_bind_child_resourcePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_h, - iotcon_resource_h)>>('iotcon_resource_bind_child_resource'); - late final _iotcon_resource_bind_child_resource = - _iotcon_resource_bind_child_resourcePtr - .asFunction(); - - /// @brief Unbinds a child resource from the parent resource. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] parent The handle of the parent resource - /// @param[in] child The handle of the child resource to be unbound from the parent resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_resource_create() - /// @see iotcon_resource_destroy() - /// @see iotcon_resource_bind_interface() - /// @see iotcon_resource_bind_type() - /// @see iotcon_resource_set_request_handler() - /// @see iotcon_resource_bind_child_resource() - /// @see iotcon_request_handler_cb() - int iotcon_resource_unbind_child_resource( - iotcon_resource_h parent, - iotcon_resource_h child, - ) { - return _iotcon_resource_unbind_child_resource( - parent, - child, - ); - } - - late final _iotcon_resource_unbind_child_resourcePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_h, - iotcon_resource_h)>>('iotcon_resource_unbind_child_resource'); - late final _iotcon_resource_unbind_child_resource = - _iotcon_resource_unbind_child_resourcePtr - .asFunction(); - - /// @brief Notifies specific clients that resource's attributes have changed. - /// @details If @a observers is @c NULL, the @a msg will notify to all observers. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] resource The handle of the resource - /// @param[in] repr The handle of the representation - /// @param[in] observers The handle of the observers - /// @param[in] qos The quality of service for message transfer - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_REPRESENTATION Representation error - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_remote_resource_observe_cb() - /// @see iotcon_remote_resource_observe_register() - /// @see iotcon_remote_resource_observe_deregister() - /// @see iotcon_observers_create() - /// @see iotcon_observers_destroy() - /// @see iotcon_observers_add() - /// @see iotcon_observers_remove() - int iotcon_resource_notify( - iotcon_resource_h resource, - iotcon_representation_h repr, - iotcon_observers_h observers, - int qos, - ) { - return _iotcon_resource_notify( - resource, - repr, - observers, - qos, - ); - } - - late final _iotcon_resource_notifyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_h, iotcon_representation_h, - iotcon_observers_h, ffi.Int32)>>('iotcon_resource_notify'); - late final _iotcon_resource_notify = _iotcon_resource_notifyPtr.asFunction< - int Function(iotcon_resource_h, iotcon_representation_h, - iotcon_observers_h, int)>(); - - /// @brief Gets the number of child resources of the resource. - /// @since_tizen 3.0 - /// @param[in] resource The handle of the resource - /// @param[out] count The number of child resources - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_resource_get_nth_child() - /// @see iotcon_resource_get_uri_path() - /// @see iotcon_resource_get_types() - /// @see iotcon_resource_get_interfaces() - /// @see iotcon_resource_get_policies() - int iotcon_resource_get_child_count( - iotcon_resource_h resource, - ffi.Pointer count, - ) { - return _iotcon_resource_get_child_count( - resource, - count, - ); - } - - late final _iotcon_resource_get_child_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_resource_h, ffi.Pointer)>>( - 'iotcon_resource_get_child_count'); - late final _iotcon_resource_get_child_count = - _iotcon_resource_get_child_countPtr.asFunction< - int Function(iotcon_resource_h, ffi.Pointer)>(); - - /// @brief Gets the child resource at the given index in the parent resource. - /// @since_tizen 3.0 - /// @remarks @a child must not be released using iotcon_resource_destroy(). - /// @param[in] parent The handle of the parent resource - /// @param[in] index The index of the child resource - /// @param[out] child The child resource at the index - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @see iotcon_resource_get_child_count() - /// @see iotcon_resource_get_uri_path() - /// @see iotcon_resource_get_types() - /// @see iotcon_resource_get_interfaces() - /// @see iotcon_resource_get_policies() - int iotcon_resource_get_nth_child( - iotcon_resource_h parent, - int index, - ffi.Pointer child, - ) { - return _iotcon_resource_get_nth_child( - parent, - index, - child, - ); - } - - late final _iotcon_resource_get_nth_childPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_resource_h, ffi.Int, ffi.Pointer)>>( - 'iotcon_resource_get_nth_child'); - late final _iotcon_resource_get_nth_child = - _iotcon_resource_get_nth_childPtr.asFunction< - int Function( - iotcon_resource_h, int, ffi.Pointer)>(); - - /// @brief Gets an URI path of the resource. - /// @since_tizen 3.0 - /// @remarks @a uri_path must not be released using free(). - /// @param[in] resource The handle of the resource - /// @param[out] uri_path The URI path of the resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_resource_get_child_count() - /// @see iotcon_resource_get_nth_child() - /// @see iotcon_resource_get_types() - /// @see iotcon_resource_get_interfaces() - /// @see iotcon_resource_get_policies() - int iotcon_resource_get_uri_path( - iotcon_resource_h resource, - ffi.Pointer> uri_path, - ) { - return _iotcon_resource_get_uri_path( - resource, - uri_path, - ); - } - - late final _iotcon_resource_get_uri_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_resource_h, ffi.Pointer>)>>( - 'iotcon_resource_get_uri_path'); - late final _iotcon_resource_get_uri_path = - _iotcon_resource_get_uri_pathPtr.asFunction< - int Function( - iotcon_resource_h, ffi.Pointer>)>(); - - /// @brief Gets the list of types in the resource. - /// @since_tizen 3.0 - /// @remarks @a types must not be released using iotcon_resource_types_destroy(). - /// @param[in] resource The handle of the resource - /// @param[out] types The types of the resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_resource_get_child_count() - /// @see iotcon_resource_get_nth_child() - /// @see iotcon_resource_get_uri_path() - /// @see iotcon_resource_get_interfaces() - /// @see iotcon_resource_get_policies() - int iotcon_resource_get_types( - iotcon_resource_h resource, - ffi.Pointer types, - ) { - return _iotcon_resource_get_types( - resource, - types, - ); - } - - late final _iotcon_resource_get_typesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_resource_h, ffi.Pointer)>>( - 'iotcon_resource_get_types'); - late final _iotcon_resource_get_types = - _iotcon_resource_get_typesPtr.asFunction< - int Function( - iotcon_resource_h, ffi.Pointer)>(); - - /// @brief Gets the interfaces of the resource. - /// @since_tizen 3.0 - /// @remarks @a ifaces must not be released using iotcon_resource_interfaces_destroy(). - /// @param[in] resource The handle of the resource - /// @param[out] ifaces The interfaces of the resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_resource_get_child_count() - /// @see iotcon_resource_get_nth_child() - /// @see iotcon_resource_get_uri_path() - /// @see iotcon_resource_get_types() - /// @see iotcon_resource_get_policies() - int iotcon_resource_get_interfaces( - iotcon_resource_h resource, - ffi.Pointer ifaces, - ) { - return _iotcon_resource_get_interfaces( - resource, - ifaces, - ); - } - - late final _iotcon_resource_get_interfacesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_h, - ffi.Pointer)>>( - 'iotcon_resource_get_interfaces'); - late final _iotcon_resource_get_interfaces = - _iotcon_resource_get_interfacesPtr.asFunction< - int Function( - iotcon_resource_h, ffi.Pointer)>(); - - /// @brief Gets the policies in the resource. - /// @details @a policies can contain multiple policies like IOTCON_RESOURCE_DISCOVERABLE | IOTCON_RESOURCE_OBSERVABLE. - /// @since_tizen 3.0 - /// @param[in] resource The handle of the resource - /// @param[out] policies The policies of resource \n - /// Set of #iotcon_resource_policy_e - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_resource_get_child_count() - /// @see iotcon_resource_get_nth_child() - /// @see iotcon_resource_get_uri_path() - /// @see iotcon_resource_get_types() - /// @see iotcon_resource_get_interfaces() - int iotcon_resource_get_policies( - iotcon_resource_h resource, - ffi.Pointer policies, - ) { - return _iotcon_resource_get_policies( - resource, - policies, - ); - } - - late final _iotcon_resource_get_policiesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_resource_h, - ffi.Pointer)>>('iotcon_resource_get_policies'); - late final _iotcon_resource_get_policies = _iotcon_resource_get_policiesPtr - .asFunction)>(); - - /// @brief Creates a lite resource handle and registers the resource in server. - /// @details Registers a resource specified by @a uri_path, @a res_types, @a attributes which have @a properties in IoTCon server. \n - /// When client requests some operations, it send a response to client, automatically.\n - /// The @a policies can contain multiple policies like IOTCON_RESOURCE_DISCOVERABLE | IOTCON_RESOURCE_OBSERVABLE. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @remarks @a uri_path length must be less than 128. \n - /// You must destroy @a resource_handle by calling iotcon_lite_resource_destroy() if @a remote_handle is no longer needed. - /// @param[in] uri_path The URI path of the resource - /// @param[in] res_types The list of type of the resource - /// @param[in] policies The policies of the resource \n - /// Set of #iotcon_resource_policy_e - /// @param[in] attributes The attributes handle to set - /// @param[in] cb The callback function to add into callback list - /// @param[in] user_data The user data to pass to the callback function - /// @param[out] resource_handle The handle of the resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_IOTIVITY IoTivity errors - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_lite_resource_destroy() - int iotcon_lite_resource_create( - ffi.Pointer uri_path, - iotcon_resource_types_h res_types, - int policies, - iotcon_attributes_h attributes, - iotcon_lite_resource_post_request_cb cb, - ffi.Pointer user_data, - ffi.Pointer resource_handle, - ) { - return _iotcon_lite_resource_create( - uri_path, - res_types, - policies, - attributes, - cb, - user_data, - resource_handle, - ); - } - - late final _iotcon_lite_resource_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - iotcon_resource_types_h, - ffi.Uint8, - iotcon_attributes_h, - iotcon_lite_resource_post_request_cb, - ffi.Pointer, - ffi.Pointer)>>( - 'iotcon_lite_resource_create'); - late final _iotcon_lite_resource_create = - _iotcon_lite_resource_createPtr.asFunction< - int Function( - ffi.Pointer, - iotcon_resource_types_h, - int, - iotcon_attributes_h, - iotcon_lite_resource_post_request_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Destroys the resource and releases its data. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @remarks When a normal variable is used, there is only permission denied error. - /// If the errors of this API are not handled, then you must check an application having the privileges for the API. - /// @param[in] resource The handle of the lite resource to be unregistered - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_lite_resource_create() - int iotcon_lite_resource_destroy( - iotcon_lite_resource_h resource, - ) { - return _iotcon_lite_resource_destroy( - resource, - ); - } - - late final _iotcon_lite_resource_destroyPtr = - _lookup>( - 'iotcon_lite_resource_destroy'); - late final _iotcon_lite_resource_destroy = _iotcon_lite_resource_destroyPtr - .asFunction(); - - /// @brief Updates attributes into the lite resource handle. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] resource The handle of the lite resource - /// @param[in] attributes The attributes handle to update - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_lite_resource_get_attributes() - int iotcon_lite_resource_update_attributes( - iotcon_lite_resource_h resource, - iotcon_attributes_h attributes, - ) { - return _iotcon_lite_resource_update_attributes( - resource, - attributes, - ); - } - - late final _iotcon_lite_resource_update_attributesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_lite_resource_h, - iotcon_attributes_h)>>('iotcon_lite_resource_update_attributes'); - late final _iotcon_lite_resource_update_attributes = - _iotcon_lite_resource_update_attributesPtr.asFunction< - int Function(iotcon_lite_resource_h, iotcon_attributes_h)>(); - - /// @brief Gets attributes from the lite resource handle. - /// @since_tizen 3.0 - /// @remarks @a attributes must not be released using iotcon_attributes_destroy(). - /// @param[in] resource The handle of the lite resource - /// @param[out] attributes The attributes handle of the lite resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_lite_resource_update_attributes() - int iotcon_lite_resource_get_attributes( - iotcon_lite_resource_h resource, - ffi.Pointer attributes, - ) { - return _iotcon_lite_resource_get_attributes( - resource, - attributes, - ); - } - - late final _iotcon_lite_resource_get_attributesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_lite_resource_h, ffi.Pointer)>>( - 'iotcon_lite_resource_get_attributes'); - late final _iotcon_lite_resource_get_attributes = - _iotcon_lite_resource_get_attributesPtr.asFunction< - int Function( - iotcon_lite_resource_h, ffi.Pointer)>(); - - /// @brief Creates a response handle. - /// @since_tizen 3.0 - /// @remarks You must destroy @a response by calling iotcon_response_destroy() if @a response is no longer needed. - /// @param[in] request The handle of received request handle - /// @param[out] response Generated response handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @see iotcon_response_destroy() - int iotcon_response_create( - iotcon_request_h request, - ffi.Pointer response, - ) { - return _iotcon_response_create( - request, - response, - ); - } - - late final _iotcon_response_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_request_h, - ffi.Pointer)>>('iotcon_response_create'); - late final _iotcon_response_create = _iotcon_response_createPtr.asFunction< - int Function(iotcon_request_h, ffi.Pointer)>(); - - /// @brief Destroys a response handle. - /// @since_tizen 3.0 - /// @param[in] resp The handle of the response - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_response_create() - int iotcon_response_destroy( - iotcon_response_h resp, - ) { - return _iotcon_response_destroy( - resp, - ); - } - - late final _iotcon_response_destroyPtr = - _lookup>( - 'iotcon_response_destroy'); - late final _iotcon_response_destroy = - _iotcon_response_destroyPtr.asFunction(); - - /// @brief Gets header options of the response. - /// @since_tizen 3.0 - /// @remarks @a options must not be released using iotcon_options_destroy(). - /// @param[in] resp The handle of the response - /// @param[out] options The handle of the header options - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_response_get_representation() - /// @see iotcon_response_get_result() - int iotcon_response_get_options( - iotcon_response_h resp, - ffi.Pointer options, - ) { - return _iotcon_response_get_options( - resp, - options, - ); - } - - late final _iotcon_response_get_optionsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_response_h, - ffi.Pointer)>>('iotcon_response_get_options'); - late final _iotcon_response_get_options = - _iotcon_response_get_optionsPtr.asFunction< - int Function(iotcon_response_h, ffi.Pointer)>(); - - /// @brief Gets representation of the response. - /// @since_tizen 3.0 - /// @remarks @a repr must not be released using iotcon_representation_destroy(). - /// @param[in] resp The handle of the response - /// @param[out] repr The handle of the representation - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data - /// @see iotcon_response_get_options() - /// @see iotcon_response_get_result() - int iotcon_response_get_representation( - iotcon_response_h resp, - ffi.Pointer repr, - ) { - return _iotcon_response_get_representation( - resp, - repr, - ); - } - - late final _iotcon_response_get_representationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_response_h, ffi.Pointer)>>( - 'iotcon_response_get_representation'); - late final _iotcon_response_get_representation = - _iotcon_response_get_representationPtr.asFunction< - int Function( - iotcon_response_h, ffi.Pointer)>(); - - /// @brief Gets result of the response. - /// @since_tizen 3.0 - /// @param[in] resp The handle of the response - /// @param[out] result The result of the response - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_response_get_options() - /// @see iotcon_response_get_representation() - int iotcon_response_get_result( - iotcon_response_h resp, - ffi.Pointer result, - ) { - return _iotcon_response_get_result( - resp, - result, - ); - } - - late final _iotcon_response_get_resultPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_response_h, - ffi.Pointer)>>('iotcon_response_get_result'); - late final _iotcon_response_get_result = _iotcon_response_get_resultPtr - .asFunction)>(); - - /// @brief Sets result into the response. - /// @details The @a result could be one of #iotcon_response_result_e. - /// @since_tizen 3.0 - /// @param[in] resp The handle of the response - /// @param[in] result The result to set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @see iotcon_response_create() - /// @see iotcon_response_destroy() - int iotcon_response_set_result( - iotcon_response_h resp, - int result, - ) { - return _iotcon_response_set_result( - resp, - result, - ); - } - - late final _iotcon_response_set_resultPtr = _lookup< - ffi.NativeFunction>( - 'iotcon_response_set_result'); - late final _iotcon_response_set_result = _iotcon_response_set_resultPtr - .asFunction(); - - /// @brief Sets representation into the response. - /// @since_tizen 3.0 - /// @param[in] resp The handle of the response - /// @param[in] repr The representation of the response - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @see iotcon_response_create() - /// @see iotcon_response_destroy() - int iotcon_response_set_representation( - iotcon_response_h resp, - iotcon_representation_h repr, - ) { - return _iotcon_response_set_representation( - resp, - repr, - ); - } - - late final _iotcon_response_set_representationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_response_h, - iotcon_representation_h)>>('iotcon_response_set_representation'); - late final _iotcon_response_set_representation = - _iotcon_response_set_representationPtr.asFunction< - int Function(iotcon_response_h, iotcon_representation_h)>(); - - /// @brief Sets header options into the response. - /// @since_tizen 3.0 - /// @param[in] resp The handle of the response - /// @param[in] options The header options of the response - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @see iotcon_response_create() - /// @see iotcon_response_destroy() - int iotcon_response_set_options( - iotcon_response_h resp, - iotcon_options_h options, - ) { - return _iotcon_response_set_options( - resp, - options, - ); - } - - late final _iotcon_response_set_optionsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_response_h, - iotcon_options_h)>>('iotcon_response_set_options'); - late final _iotcon_response_set_options = _iotcon_response_set_optionsPtr - .asFunction(); - - /// @brief Sends response for incoming request. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] resp The handle of the response to send - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - int iotcon_response_send( - iotcon_response_h resp, - ) { - return _iotcon_response_send( - resp, - ); - } - - late final _iotcon_response_sendPtr = - _lookup>( - 'iotcon_response_send'); - late final _iotcon_response_send = - _iotcon_response_sendPtr.asFunction(); - - /// @brief Creates a new observers handle. - /// @since_tizen 3.0 - /// @remarks You must destroy @a observers by calling iotcon_observers_destroy() if @a observers is no longer needed. - /// @param[out] observers A newly allocated list of observers handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @see iotcon_observers_destroy() - /// @see iotcon_observers_add() - /// @see iotcon_observers_remove() - int iotcon_observers_create( - ffi.Pointer observers, - ) { - return _iotcon_observers_create( - observers, - ); - } - - late final _iotcon_observers_createPtr = _lookup< - ffi - .NativeFunction)>>( - 'iotcon_observers_create'); - late final _iotcon_observers_create = _iotcon_observers_createPtr - .asFunction)>(); - - /// @brief Destroys a observers handle. - /// @since_tizen 3.0 - /// @param[in] observers The handle of the observers - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_observers_create() - /// @see iotcon_observers_add() - /// @see iotcon_observers_remove() - int iotcon_observers_destroy( - iotcon_observers_h observers, - ) { - return _iotcon_observers_destroy( - observers, - ); - } - - late final _iotcon_observers_destroyPtr = - _lookup>( - 'iotcon_observers_destroy'); - late final _iotcon_observers_destroy = _iotcon_observers_destroyPtr - .asFunction(); - - /// @brief Adds an observers ID into the observers handle. - /// @since_tizen 3.0 - /// @param[in] observers The handle of the observers - /// @param[in] obs_id The ID to be appended to observers - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_observers_create() - /// @see iotcon_observers_destroy() - /// @see iotcon_observers_remove() - int iotcon_observers_add( - iotcon_observers_h observers, - int obs_id, - ) { - return _iotcon_observers_add( - observers, - obs_id, - ); - } - - late final _iotcon_observers_addPtr = _lookup< - ffi.NativeFunction>( - 'iotcon_observers_add'); - late final _iotcon_observers_add = _iotcon_observers_addPtr - .asFunction(); - - /// @brief Removes ID from the observers. - /// @since_tizen 3.0 - /// @param[in] observers observers The handle of the observers - /// @param[in] obs_id The ID to be removed from observers - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_observers_create() - /// @see iotcon_observers_destroy() - /// @see iotcon_observers_add() - int iotcon_observers_remove( - iotcon_observers_h observers, - int obs_id, - ) { - return _iotcon_observers_remove( - observers, - obs_id, - ); - } - - late final _iotcon_observers_removePtr = _lookup< - ffi.NativeFunction>( - 'iotcon_observers_remove'); - late final _iotcon_observers_remove = _iotcon_observers_removePtr - .asFunction(); - - /// @brief Gets host address of the request. - /// @since_tizen 3.0 - /// @remarks @a host_address must not be released using free(). - /// @param[in] request The handle of the request - /// @param[out] host_address The host address of the request - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_request_get_connectivity_type() - /// @see iotcon_request_get_representation() - /// @see iotcon_request_get_request_type() - /// @see iotcon_request_get_options() - /// @see iotcon_request_get_query() - /// @see iotcon_request_get_observe_type() - /// @see iotcon_request_get_observe_id() - int iotcon_request_get_host_address( - iotcon_request_h request, - ffi.Pointer> host_address, - ) { - return _iotcon_request_get_host_address( - request, - host_address, - ); - } - - late final _iotcon_request_get_host_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_request_h, ffi.Pointer>)>>( - 'iotcon_request_get_host_address'); - late final _iotcon_request_get_host_address = - _iotcon_request_get_host_addressPtr.asFunction< - int Function(iotcon_request_h, ffi.Pointer>)>(); - - /// @brief Gets connectivity type of the request. - /// @since_tizen 3.0 - /// @param[in] request The handle of the request - /// @param[out] connectivity_type The connectivity type of the request - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_request_get_host_address() - /// @see iotcon_request_get_representation() - /// @see iotcon_request_get_request_type() - /// @see iotcon_request_get_options() - /// @see iotcon_request_get_query() - /// @see iotcon_request_get_observe_type() - /// @see iotcon_request_get_observe_id() - int iotcon_request_get_connectivity_type( - iotcon_request_h request, - ffi.Pointer connectivity_type, - ) { - return _iotcon_request_get_connectivity_type( - request, - connectivity_type, - ); - } - - late final _iotcon_request_get_connectivity_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_request_h, - ffi.Pointer)>>('iotcon_request_get_connectivity_type'); - late final _iotcon_request_get_connectivity_type = - _iotcon_request_get_connectivity_typePtr - .asFunction)>(); - - /// @brief Gets a representation of the request. - /// @since_tizen 3.0 - /// @remarks @a repr must not be released using iotcon_representation_destroy(). - /// @param[in] request The handle of the request - /// @param[out] repr The representation of the request - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_request_get_host_address() - /// @see iotcon_request_get_connectivity_type() - /// @see iotcon_request_get_request_type() - /// @see iotcon_request_get_options() - /// @see iotcon_request_get_query() - /// @see iotcon_request_get_observe_type() - /// @see iotcon_request_get_observe_id() - int iotcon_request_get_representation( - iotcon_request_h request, - ffi.Pointer repr, - ) { - return _iotcon_request_get_representation( - request, - repr, - ); - } - - late final _iotcon_request_get_representationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_request_h, ffi.Pointer)>>( - 'iotcon_request_get_representation'); - late final _iotcon_request_get_representation = - _iotcon_request_get_representationPtr.asFunction< - int Function( - iotcon_request_h, ffi.Pointer)>(); - - /// @brief Gets type of the request. - /// @details @a type could be one of the #iotcon_request_type_e. - /// @since_tizen 3.0 - /// @param[in] request The handle of the request - /// @param[out] type The types of the request - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_request_get_host_address() - /// @see iotcon_request_get_connectivity_type() - /// @see iotcon_request_get_representation() - /// @see iotcon_request_get_options() - /// @see iotcon_request_get_query() - /// @see iotcon_request_get_observe_type() - /// @see iotcon_request_get_observe_id() - int iotcon_request_get_request_type( - iotcon_request_h request, - ffi.Pointer type, - ) { - return _iotcon_request_get_request_type( - request, - type, - ); - } - - late final _iotcon_request_get_request_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_request_h, - ffi.Pointer)>>('iotcon_request_get_request_type'); - late final _iotcon_request_get_request_type = - _iotcon_request_get_request_typePtr - .asFunction)>(); - - /// @brief Gets options of the request. - /// @since_tizen 3.0 - /// @remarks @a options must not be released using iotcon_options_destroy(). - /// @param[in] request The handle of the request - /// @param[out] options The options of the request - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_request_get_host_address() - /// @see iotcon_request_get_connectivity_type() - /// @see iotcon_request_get_representation() - /// @see iotcon_request_get_request_type() - /// @see iotcon_request_get_query() - /// @see iotcon_request_get_observe_type() - /// @see iotcon_request_get_observe_id() - int iotcon_request_get_options( - iotcon_request_h request, - ffi.Pointer options, - ) { - return _iotcon_request_get_options( - request, - options, - ); - } - - late final _iotcon_request_get_optionsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_request_h, - ffi.Pointer)>>('iotcon_request_get_options'); - late final _iotcon_request_get_options = - _iotcon_request_get_optionsPtr.asFunction< - int Function(iotcon_request_h, ffi.Pointer)>(); - - /// @brief Gets query of the request. - /// @since_tizen 3.0 - /// @remarks @a query must not be released using iotcon_query_destroy(). - /// @param[in] request The handle of the request - /// @param[out] query The query of the request - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_request_get_host_address() - /// @see iotcon_request_get_connectivity_type() - /// @see iotcon_request_get_representation() - /// @see iotcon_request_get_request_type() - /// @see iotcon_request_get_options() - /// @see iotcon_request_get_observe_type() - /// @see iotcon_request_get_observe_id() - int iotcon_request_get_query( - iotcon_request_h request, - ffi.Pointer query, - ) { - return _iotcon_request_get_query( - request, - query, - ); - } - - late final _iotcon_request_get_queryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_request_h, - ffi.Pointer)>>('iotcon_request_get_query'); - late final _iotcon_request_get_query = - _iotcon_request_get_queryPtr.asFunction< - int Function(iotcon_request_h, ffi.Pointer)>(); - - /// @brief Gets observation action of the request. - /// @details The @a observe_type could be one of #iotcon_observe_type_e. - /// @since_tizen 3.0 - /// @param[in] request The handle of the request - /// @param[out] observe_type The observation type of the request - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_request_get_host_address() - /// @see iotcon_request_get_connectivity_type() - /// @see iotcon_request_get_representation() - /// @see iotcon_request_get_request_type() - /// @see iotcon_request_get_options() - /// @see iotcon_request_get_query() - /// @see iotcon_request_get_observe_id() - int iotcon_request_get_observe_type( - iotcon_request_h request, - ffi.Pointer observe_type, - ) { - return _iotcon_request_get_observe_type( - request, - observe_type, - ); - } - - late final _iotcon_request_get_observe_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_request_h, - ffi.Pointer)>>('iotcon_request_get_observe_type'); - late final _iotcon_request_get_observe_type = - _iotcon_request_get_observe_typePtr - .asFunction)>(); - - /// @brief Gets observation ID of the request. - /// @since_tizen 3.0 - /// @param[in] request The handle of the request - /// @param[out] observe_id The ID of the observer - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_request_get_host_address() - /// @see iotcon_request_get_connectivity_type() - /// @see iotcon_request_get_representation() - /// @see iotcon_request_get_request_type() - /// @see iotcon_request_get_options() - /// @see iotcon_request_get_query() - /// @see iotcon_request_get_observe_type() - int iotcon_request_get_observe_id( - iotcon_request_h request, - ffi.Pointer observe_id, - ) { - return _iotcon_request_get_observe_id( - request, - observe_id, - ); - } - - late final _iotcon_request_get_observe_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_request_h, - ffi.Pointer)>>('iotcon_request_get_observe_id'); - late final _iotcon_request_get_observe_id = _iotcon_request_get_observe_idPtr - .asFunction)>(); - - /// @brief Starts presence of a server. - /// @details Use this function to send server's announcements to clients. \n - /// Server can call this function when online for the first time or come back from offline to online. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @remarks If @a time_to_live is 0, server will set default value as 60 seconds. \n - /// If @a time_to_live is very big, server will set maximum value as (60 * 60 * 24) seconds (24 hours). - /// @param[in] time_to_live The interval of announcing presence in seconds - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_stop_presence() - /// @see iotcon_add_presence_cb() - /// @see iotcon_remove_presence_cb() - int iotcon_start_presence( - int time_to_live, - ) { - return _iotcon_start_presence( - time_to_live, - ); - } - - late final _iotcon_start_presencePtr = - _lookup>( - 'iotcon_start_presence'); - late final _iotcon_start_presence = - _iotcon_start_presencePtr.asFunction(); - - /// @brief Stops presence of a server. - /// @details Use this function to stop sending server's announcements to clients. - /// Server can call this function when terminating, entering to offline or out of network. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_start_presence() - /// @see iotcon_add_presence_cb() - /// @see iotcon_remove_presence_cb() - int iotcon_stop_presence() { - return _iotcon_stop_presence(); - } - - late final _iotcon_stop_presencePtr = - _lookup>('iotcon_stop_presence'); - late final _iotcon_stop_presence = - _iotcon_stop_presencePtr.asFunction(); - - /// @brief Sets the device name. - /// @details The function sets the name of the local device (the device calling the function). - /// If the device name is set, clients can get the name using iotcon_device_info_get_property() or iotcon_remote_resource_get_device_name(). - /// @since_tizen 3.0 - /// @remarks @a device_name may not be an empty string. - /// @param[in] device_name The device name - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_IOTIVITY Iotivity errors - /// @see iotcon_get_device_info() - /// @see iotcon_device_info_get_property() - /// @see iotcon_remote_resource_get_device_name() - int iotcon_set_device_name( - ffi.Pointer device_name, - ) { - return _iotcon_set_device_name( - device_name, - ); - } - - late final _iotcon_set_device_namePtr = - _lookup)>>( - 'iotcon_set_device_name'); - late final _iotcon_set_device_name = _iotcon_set_device_namePtr - .asFunction)>(); - - /// @brief Creates a new resource handle. - /// @details Creates a resource proxy object so that iotcon_remote_resource_get(), - /// iotcon_remote_resource_put(), iotcon_remote_resource_post(), - /// iotcon_remote_resource_delete(), iotcon_remote_resource_observe_register(), - /// iotcon_remote_resource_start_caching() and iotcon_remote_resource_start_monitoring() - /// API can be used without discovering the object in advance.\n - /// To use this API, you should provide all of the details required to correctly contact and observe the object.\n - /// If not, you should discover the resource object manually.\n - /// The @a policies can contain multiple policies like IOTCON_RESOURCE_DISCOVERABLE | IOTCON_RESOURCE_OBSERVABLE. - /// @since_tizen 3.0 - /// @remarks You must destroy @a remote_resource by calling iotcon_remote_resource_destroy() if @a remote_resource is no longer needed. - /// @param[in] host_address The host address of the resource - /// @param[in] connectivity_type The connectivity type. Can not use @a IOTCON_CONNECTIVITY_ALL. \n - /// Connectivity type of specific remote resource(It has specific host address, not @a IOTCON_MULTICAST_ADDRESS) is already decided. \n - /// Use specific connectivity type of the remote resource. \n - /// You can refer to the @a iotcon_remote_resource_get_connectivity_type(). - /// @param[in] uri_path The URI path of the resource - /// @param[in] policies The policies of the resource \n - /// Set of #iotcon_resource_policy_e - /// @param[in] resource_types The resource types of the resource. For example, "core.light" - /// @param[in] resource_ifaces The resource interfaces of the resource - /// @param[out] remote_resource Generated resource handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_IOTIVITY IoTivity errors - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @see iotcon_remote_resource_destroy() - /// @see iotcon_remote_resource_clone() - int iotcon_remote_resource_create( - ffi.Pointer host_address, - int connectivity_type, - ffi.Pointer uri_path, - int policies, - iotcon_resource_types_h resource_types, - iotcon_resource_interfaces_h resource_ifaces, - ffi.Pointer remote_resource, - ) { - return _iotcon_remote_resource_create( - host_address, - connectivity_type, - uri_path, - policies, - resource_types, - resource_ifaces, - remote_resource, - ); - } - - late final _iotcon_remote_resource_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Uint8, - iotcon_resource_types_h, - iotcon_resource_interfaces_h, - ffi.Pointer)>>( - 'iotcon_remote_resource_create'); - late final _iotcon_remote_resource_create = - _iotcon_remote_resource_createPtr.asFunction< - int Function( - ffi.Pointer, - int, - ffi.Pointer, - int, - iotcon_resource_types_h, - iotcon_resource_interfaces_h, - ffi.Pointer)>(); - - /// @brief Destroys a resource handle. - /// @since_tizen 3.0 - /// @param[in] resource The handle of the resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_remote_resource_create() - /// @see iotcon_remote_resource_clone() - int iotcon_remote_resource_destroy( - iotcon_remote_resource_h resource, - ) { - return _iotcon_remote_resource_destroy( - resource, - ); - } - - late final _iotcon_remote_resource_destroyPtr = - _lookup>( - 'iotcon_remote_resource_destroy'); - late final _iotcon_remote_resource_destroy = - _iotcon_remote_resource_destroyPtr - .asFunction(); - - /// @brief Clones a clone of a remote resource. - /// @since_tizen 3.0 - /// @remarks You must destroy @a dest by calling iotcon_remote_resource_destroy() if @a dest is no longer needed. - /// @param[in] src The Source of resource - /// @param[out] dest The cloned resource handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_remote_resource_create() - /// @see iotcon_remote_resource_destroy() - int iotcon_remote_resource_clone( - iotcon_remote_resource_h src, - ffi.Pointer dest, - ) { - return _iotcon_remote_resource_clone( - src, - dest, - ); - } - - late final _iotcon_remote_resource_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_remote_resource_h, - ffi.Pointer)>>( - 'iotcon_remote_resource_clone'); - late final _iotcon_remote_resource_clone = - _iotcon_remote_resource_clonePtr.asFunction< - int Function(iotcon_remote_resource_h, - ffi.Pointer)>(); - - /// @brief Registers observe callback on the resource. - /// @details When server sends notification message, iotcon_remote_resource_observe_cb() will be called. - /// The @a observe_policy could be one of #iotcon_observe_policy_e. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] resource The handle of the resource - /// @param[in] observe_policy The type to specify how client wants to observe - /// @param[in] query The query to send to server - /// @param[in] cb The callback function to get notifications from server - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_IOTIVITY IoTivity errors - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @post When the @a resource receive notification message, iotcon_remote_resource_observe_cb() will be called. - /// @see iotcon_remote_resource_observe_cb() - /// @see iotcon_remote_resource_observe_deregister() - /// @see iotcon_resource_notify() - int iotcon_remote_resource_observe_register( - iotcon_remote_resource_h resource, - int observe_policy, - iotcon_query_h query, - iotcon_remote_resource_observe_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_remote_resource_observe_register( - resource, - observe_policy, - query, - cb, - user_data, - ); - } - - late final _iotcon_remote_resource_observe_registerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_remote_resource_h, - ffi.Int32, - iotcon_query_h, - iotcon_remote_resource_observe_cb, - ffi.Pointer)>>( - 'iotcon_remote_resource_observe_register'); - late final _iotcon_remote_resource_observe_register = - _iotcon_remote_resource_observe_registerPtr.asFunction< - int Function(iotcon_remote_resource_h, int, iotcon_query_h, - iotcon_remote_resource_observe_cb, ffi.Pointer)>(); - - /// @brief Deregisters observe callback on the resource. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] resource The handle of the resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_remote_resource_observe_cb() - /// @see iotcon_remote_resource_observe_register() - /// @see iotcon_resource_notify() - int iotcon_remote_resource_observe_deregister( - iotcon_remote_resource_h resource, - ) { - return _iotcon_remote_resource_observe_deregister( - resource, - ); - } - - late final _iotcon_remote_resource_observe_deregisterPtr = - _lookup>( - 'iotcon_remote_resource_observe_deregister'); - late final _iotcon_remote_resource_observe_deregister = - _iotcon_remote_resource_observe_deregisterPtr - .asFunction(); - - /// @brief Gets the attributes of a resource asynchronously. - /// @details When server sends response on get request, iotcon_remote_resource_response_cb() will be called. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] resource The handle of the resource - /// @param[in] query The query to send to server - /// @param[in] cb The callback function - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @post When the client receive get response, iotcon_remote_resource_response_cb() will be called. - /// @see iotcon_remote_resource_response_cb() - /// @see iotcon_set_timeout() - int iotcon_remote_resource_get( - iotcon_remote_resource_h resource, - iotcon_query_h query, - iotcon_remote_resource_response_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_remote_resource_get( - resource, - query, - cb, - user_data, - ); - } - - late final _iotcon_remote_resource_getPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_remote_resource_h, - iotcon_query_h, - iotcon_remote_resource_response_cb, - ffi.Pointer)>>('iotcon_remote_resource_get'); - late final _iotcon_remote_resource_get = - _iotcon_remote_resource_getPtr.asFunction< - int Function(iotcon_remote_resource_h, iotcon_query_h, - iotcon_remote_resource_response_cb, ffi.Pointer)>(); - - /// @brief Puts the representation of a resource asynchronously. - /// @details When server sends response on put request, iotcon_remote_resource_response_cb() will be called. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] resource The handle of the resource - /// @param[in] repr The handle of the representation - /// @param[in] query The query to send to server - /// @param[in] cb The callback function - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @post When the client receive put response, iotcon_remote_resource_response_cb() will be called. - /// @see iotcon_remote_resource_response_cb() - /// @see iotcon_set_timeout() - int iotcon_remote_resource_put( - iotcon_remote_resource_h resource, - iotcon_representation_h repr, - iotcon_query_h query, - iotcon_remote_resource_response_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_remote_resource_put( - resource, - repr, - query, - cb, - user_data, - ); - } - - late final _iotcon_remote_resource_putPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_remote_resource_h, - iotcon_representation_h, - iotcon_query_h, - iotcon_remote_resource_response_cb, - ffi.Pointer)>>('iotcon_remote_resource_put'); - late final _iotcon_remote_resource_put = - _iotcon_remote_resource_putPtr.asFunction< - int Function( - iotcon_remote_resource_h, - iotcon_representation_h, - iotcon_query_h, - iotcon_remote_resource_response_cb, - ffi.Pointer)>(); - - /// @brief Posts on a resource asynchronously. - /// @details When server sends response on post request, iotcon_remote_resource_response_cb() will be called. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] resource The handle of the resource - /// @param[in] repr The handle of the representation - /// @param[in] query The query to send to server - /// @param[in] cb The callback function - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @post When the client receive post response, iotcon_remote_resource_response_cb() will be called. - /// @see iotcon_remote_resource_response_cb() - /// @see iotcon_set_timeout() - int iotcon_remote_resource_post( - iotcon_remote_resource_h resource, - iotcon_representation_h repr, - iotcon_query_h query, - iotcon_remote_resource_response_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_remote_resource_post( - resource, - repr, - query, - cb, - user_data, - ); - } - - late final _iotcon_remote_resource_postPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_remote_resource_h, - iotcon_representation_h, - iotcon_query_h, - iotcon_remote_resource_response_cb, - ffi.Pointer)>>('iotcon_remote_resource_post'); - late final _iotcon_remote_resource_post = - _iotcon_remote_resource_postPtr.asFunction< - int Function( - iotcon_remote_resource_h, - iotcon_representation_h, - iotcon_query_h, - iotcon_remote_resource_response_cb, - ffi.Pointer)>(); - - /// @brief Deletes a resource asynchronously. - /// @details When server sends response on delete request, iotcon_remote_resource_response_cb() will be called. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] resource The handle of the resource - /// @param[in] cb The callback function - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @post When the client receive delete response, iotcon_remote_resource_response_cb() will be called. - /// @see iotcon_remote_resource_response_cb() - /// @see iotcon_set_timeout() - int iotcon_remote_resource_delete( - iotcon_remote_resource_h resource, - iotcon_remote_resource_response_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_remote_resource_delete( - resource, - cb, - user_data, - ); - } - - late final _iotcon_remote_resource_deletePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_remote_resource_h, - iotcon_remote_resource_response_cb, - ffi.Pointer)>>('iotcon_remote_resource_delete'); - late final _iotcon_remote_resource_delete = - _iotcon_remote_resource_deletePtr.asFunction< - int Function(iotcon_remote_resource_h, - iotcon_remote_resource_response_cb, ffi.Pointer)>(); - - /// @brief Starts caching of a remote resource. - /// @details Use this function to start caching the resource's attribute. \n - /// Although, remote resource is not observable, it keeps the representation up-to-date. - /// Because it checks whether representation is changed periodically. \n - /// Therefore, you can get the cached representation even when the remote resource is off-line. - /// The default checking interval is 10 seconds. - /// It can be changed by iotcon_remote_resource_set_checking_interval(). - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] resource The handle of the remote resource to be cached - /// @param[in] cb The callback function to add into callback list - /// @param[in] user_data The user data to pass to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_ALREADY Already done - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_remote_resource_stop_caching() - /// @see iotcon_remote_resource_cached_representation_changed_cb() - int iotcon_remote_resource_start_caching( - iotcon_remote_resource_h resource, - iotcon_remote_resource_cached_representation_changed_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_remote_resource_start_caching( - resource, - cb, - user_data, - ); - } - - late final _iotcon_remote_resource_start_cachingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_remote_resource_h, - iotcon_remote_resource_cached_representation_changed_cb, - ffi.Pointer)>>('iotcon_remote_resource_start_caching'); - late final _iotcon_remote_resource_start_caching = - _iotcon_remote_resource_start_cachingPtr.asFunction< - int Function( - iotcon_remote_resource_h, - iotcon_remote_resource_cached_representation_changed_cb, - ffi.Pointer)>(); - - /// @brief Stops caching of a remote resource. - /// @details Use this function to stop caching the resource's attribute. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] resource The handle of the remote resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_remote_resource_start_caching() - /// @see iotcon_remote_resource_cached_representation_changed_cb() - int iotcon_remote_resource_stop_caching( - iotcon_remote_resource_h resource, - ) { - return _iotcon_remote_resource_stop_caching( - resource, - ); - } - - late final _iotcon_remote_resource_stop_cachingPtr = - _lookup>( - 'iotcon_remote_resource_stop_caching'); - late final _iotcon_remote_resource_stop_caching = - _iotcon_remote_resource_stop_cachingPtr - .asFunction(); - - /// @brief Starts monitoring of a remote resource. - /// @details When remote resource's state is changed, registered callbacks will be called in turn. - /// Although, remote resource does not call iotcon_start_presence(), it knows the state of resource. - /// Because it checks the state of resource, periodically. \n - /// The default checking interval is 10 seconds. - /// It can be changed by iotcon_remote_resource_set_checking_interval(). - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] resource The handle of the remote resource - /// @param[in] cb The callback function to add into callback list - /// @param[in] user_data The user data to pass to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_ALREADY Already done - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_remote_resource_stop_monitoring() - /// @see iotcon_remote_resource_state_changed_cb() - int iotcon_remote_resource_start_monitoring( - iotcon_remote_resource_h resource, - iotcon_remote_resource_state_changed_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_remote_resource_start_monitoring( - resource, - cb, - user_data, - ); - } - - late final _iotcon_remote_resource_start_monitoringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_remote_resource_h, - iotcon_remote_resource_state_changed_cb, - ffi.Pointer)>>( - 'iotcon_remote_resource_start_monitoring'); - late final _iotcon_remote_resource_start_monitoring = - _iotcon_remote_resource_start_monitoringPtr.asFunction< - int Function( - iotcon_remote_resource_h, - iotcon_remote_resource_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Stops monitoring of a remote resource. - /// @details Use this function to stop monitoring the remote resource. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] resource The handle of the remote resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_remote_resource_start_monitoring() - /// @see iotcon_remote_resource_state_changed_cb() - int iotcon_remote_resource_stop_monitoring( - iotcon_remote_resource_h resource, - ) { - return _iotcon_remote_resource_stop_monitoring( - resource, - ); - } - - late final _iotcon_remote_resource_stop_monitoringPtr = - _lookup>( - 'iotcon_remote_resource_stop_monitoring'); - late final _iotcon_remote_resource_stop_monitoring = - _iotcon_remote_resource_stop_monitoringPtr - .asFunction(); - - /// @brief Gets an URI path of the remote resource. - /// @since_tizen 3.0 - /// @remarks @a uri_path must not be released using free(). - /// @param[in] resource The handle of the remote resource - /// @param[out] uri_path The URI path of the remote resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_remote_resource_get_host_address() - /// @see iotcon_remote_resource_get_connectivity_type() - /// @see iotcon_remote_resource_get_device_id() - /// @see iotcon_remote_resource_get_device_name() - /// @see iotcon_remote_resource_get_types() - /// @see iotcon_remote_resource_get_interfaces() - /// @see iotcon_remote_resource_get_policies() - /// @see iotcon_remote_resource_set_options() - int iotcon_remote_resource_get_uri_path( - iotcon_remote_resource_h resource, - ffi.Pointer> uri_path, - ) { - return _iotcon_remote_resource_get_uri_path( - resource, - uri_path, - ); - } - - late final _iotcon_remote_resource_get_uri_pathPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_remote_resource_h, - ffi.Pointer>)>>( - 'iotcon_remote_resource_get_uri_path'); - late final _iotcon_remote_resource_get_uri_path = - _iotcon_remote_resource_get_uri_pathPtr.asFunction< - int Function( - iotcon_remote_resource_h, ffi.Pointer>)>(); - - /// @brief Gets a connectivity type of the remote resource. - /// @since_tizen 3.0 - /// @param[in] resource The handle of the remote resource - /// @param[out] connectivity_type The connectivity type of the remote resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_remote_resource_get_uri_path() - /// @see iotcon_remote_resource_get_host_address() - /// @see iotcon_remote_resource_get_connectivity_type() - /// @see iotcon_remote_resource_get_device_id() - /// @see iotcon_remote_resource_get_device_name() - /// @see iotcon_remote_resource_get_types() - /// @see iotcon_remote_resource_get_interfaces() - /// @see iotcon_remote_resource_get_policies() - /// @see iotcon_remote_resource_set_options() - int iotcon_remote_resource_get_connectivity_type( - iotcon_remote_resource_h resource, - ffi.Pointer connectivity_type, - ) { - return _iotcon_remote_resource_get_connectivity_type( - resource, - connectivity_type, - ); - } - - late final _iotcon_remote_resource_get_connectivity_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_remote_resource_h, ffi.Pointer)>>( - 'iotcon_remote_resource_get_connectivity_type'); - late final _iotcon_remote_resource_get_connectivity_type = - _iotcon_remote_resource_get_connectivity_typePtr.asFunction< - int Function(iotcon_remote_resource_h, ffi.Pointer)>(); - - /// @brief Gets a host address of the remote resource. - /// @since_tizen 3.0 - /// @remarks @a host_address must not be released using free(). - /// @param[in] resource The handle of the remote resource - /// @param[out] host_address The host address of the remote resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_remote_resource_get_connectivity_type() - /// @see iotcon_remote_resource_get_uri_path() - /// @see iotcon_remote_resource_get_device_id() - /// @see iotcon_remote_resource_get_device_name() - /// @see iotcon_remote_resource_get_types() - /// @see iotcon_remote_resource_get_interfaces() - /// @see iotcon_remote_resource_get_policies() - /// @see iotcon_remote_resource_set_options() - int iotcon_remote_resource_get_host_address( - iotcon_remote_resource_h resource, - ffi.Pointer> host_address, - ) { - return _iotcon_remote_resource_get_host_address( - resource, - host_address, - ); - } - - late final _iotcon_remote_resource_get_host_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_remote_resource_h, - ffi.Pointer>)>>( - 'iotcon_remote_resource_get_host_address'); - late final _iotcon_remote_resource_get_host_address = - _iotcon_remote_resource_get_host_addressPtr.asFunction< - int Function( - iotcon_remote_resource_h, ffi.Pointer>)>(); - - /// @brief Gets a device ID of the remote resource. - /// @since_tizen 3.0 - /// @remarks @a device_id must not be released using free().\n - /// If @a resource is created by calling iotcon_remote_resource_create(), you cannot get @a device_id. - /// In this case, the return value of this function is #IOTCON_ERROR_NO_DATA. - /// @param[in] resource The handle of the remote resource - /// @param[out] device_id The device ID of the remote resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @see iotcon_remote_resource_get_uri_path() - /// @see iotcon_remote_resource_get_device_name() - /// @see iotcon_remote_resource_get_host_address() - /// @see iotcon_remote_resource_get_connectivity_type() - /// @see iotcon_remote_resource_get_types() - /// @see iotcon_remote_resource_get_interfaces() - /// @see iotcon_remote_resource_get_policies() - /// @see iotcon_remote_resource_set_options() - int iotcon_remote_resource_get_device_id( - iotcon_remote_resource_h resource, - ffi.Pointer> device_id, - ) { - return _iotcon_remote_resource_get_device_id( - resource, - device_id, - ); - } - - late final _iotcon_remote_resource_get_device_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_remote_resource_h, - ffi.Pointer>)>>( - 'iotcon_remote_resource_get_device_id'); - late final _iotcon_remote_resource_get_device_id = - _iotcon_remote_resource_get_device_idPtr.asFunction< - int Function( - iotcon_remote_resource_h, ffi.Pointer>)>(); - - /// @brief Gets the device name of the remote resource. - /// @since_tizen 3.0 - /// @remarks @a device_name must not be released using free().\n - /// If @a resource is created by calling iotcon_remote_resource_create(), you cannot get @a device_name. - /// In this case, the return value of this function is #IOTCON_ERROR_NO_DATA. - /// @param[in] resource The handle of the remote resource - /// @param[out] device_name The device name of the remote resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @see iotcon_set_device_name() - /// @see iotcon_remote_resource_get_uri_path() - /// @see iotcon_remote_resource_get_device_id() - /// @see iotcon_remote_resource_get_device_name() - /// @see iotcon_remote_resource_get_host_address() - /// @see iotcon_remote_resource_get_connectivity_type() - /// @see iotcon_remote_resource_get_types() - /// @see iotcon_remote_resource_get_interfaces() - /// @see iotcon_remote_resource_get_properties() - /// @see iotcon_remote_resource_set_options() - int iotcon_remote_resource_get_device_name( - iotcon_remote_resource_h resource, - ffi.Pointer> device_name, - ) { - return _iotcon_remote_resource_get_device_name( - resource, - device_name, - ); - } - - late final _iotcon_remote_resource_get_device_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_remote_resource_h, - ffi.Pointer>)>>( - 'iotcon_remote_resource_get_device_name'); - late final _iotcon_remote_resource_get_device_name = - _iotcon_remote_resource_get_device_namePtr.asFunction< - int Function( - iotcon_remote_resource_h, ffi.Pointer>)>(); - - /// @brief Gets resource types of the remote resource. - /// @since_tizen 3.0 - /// @remarks @a types must not be released using iotcon_resource_types_destroy(). - /// @param[in] resource The handle of the remote resource - /// @param[out] types The resource types of the remote resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_remote_resource_get_uri_path() - /// @see iotcon_remote_resource_get_host_address() - /// @see iotcon_remote_resource_get_connectivity_type() - /// @see iotcon_remote_resource_get_device_id() - /// @see iotcon_remote_resource_get_device_name() - /// @see iotcon_remote_resource_get_interfaces() - /// @see iotcon_remote_resource_get_policies() - /// @see iotcon_remote_resource_set_options() - int iotcon_remote_resource_get_types( - iotcon_remote_resource_h resource, - ffi.Pointer types, - ) { - return _iotcon_remote_resource_get_types( - resource, - types, - ); - } - - late final _iotcon_remote_resource_get_typesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_remote_resource_h, - ffi.Pointer)>>( - 'iotcon_remote_resource_get_types'); - late final _iotcon_remote_resource_get_types = - _iotcon_remote_resource_get_typesPtr.asFunction< - int Function(iotcon_remote_resource_h, - ffi.Pointer)>(); - - /// @brief Gets resource interfaces of the remote resource. - /// @since_tizen 3.0 - /// @remarks @a ifaces must not be released using iotcon_resource_interfaces_destroy(). - /// @param[in] resource The handle of the remote resource - /// @param[out] ifaces The resource interfaces of the remote resource - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_remote_resource_get_uri_path() - /// @see iotcon_remote_resource_get_host_address() - /// @see iotcon_remote_resource_get_connectivity_type() - /// @see iotcon_remote_resource_get_device_id() - /// @see iotcon_remote_resource_get_device_name() - /// @see iotcon_remote_resource_get_types() - /// @see iotcon_remote_resource_get_policies() - /// @see iotcon_remote_resource_set_options() - int iotcon_remote_resource_get_interfaces( - iotcon_remote_resource_h resource, - ffi.Pointer ifaces, - ) { - return _iotcon_remote_resource_get_interfaces( - resource, - ifaces, - ); - } - - late final _iotcon_remote_resource_get_interfacesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_remote_resource_h, - ffi.Pointer)>>( - 'iotcon_remote_resource_get_interfaces'); - late final _iotcon_remote_resource_get_interfaces = - _iotcon_remote_resource_get_interfacesPtr.asFunction< - int Function(iotcon_remote_resource_h, - ffi.Pointer)>(); - - /// @brief Checks whether the remote resource is observable or not. - /// @details The @a policies can contain multiple policies like IOTCON_RESOURCE_DISCOVERABLE | IOTCON_RESOURCE_OBSERVABLE. - /// @since_tizen 3.0 - /// @param[in] resource The handle of the resource - /// @param[out] policies The policies of the resource \n - /// Set of #iotcon_resource_policy_e - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_remote_resource_get_uri_path() - /// @see iotcon_remote_resource_get_host_address() - /// @see iotcon_remote_resource_get_connectivity_type() - /// @see iotcon_remote_resource_get_device_id() - /// @see iotcon_remote_resource_get_device_name() - /// @see iotcon_remote_resource_get_types() - /// @see iotcon_remote_resource_get_interfaces() - /// @see iotcon_remote_resource_set_options() - int iotcon_remote_resource_get_policies( - iotcon_remote_resource_h resource, - ffi.Pointer policies, - ) { - return _iotcon_remote_resource_get_policies( - resource, - policies, - ); - } - - late final _iotcon_remote_resource_get_policiesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_remote_resource_h, - ffi.Pointer)>>('iotcon_remote_resource_get_policies'); - late final _iotcon_remote_resource_get_policies = - _iotcon_remote_resource_get_policiesPtr.asFunction< - int Function(iotcon_remote_resource_h, ffi.Pointer)>(); - - /// @brief Gets options of the remote resource. - /// @since_tizen 3.0 - /// @remarks @a options must not be released using iotcon_options_destroy(). - /// @param[in] resource The handle of the remote resource - /// @param[out] options The handle of the header options - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_remote_resource_get_uri_path() - /// @see iotcon_remote_resource_get_host_address() - /// @see iotcon_remote_resource_get_connectivity_type() - /// @see iotcon_remote_resource_get_device_id() - /// @see iotcon_remote_resource_get_device_name() - /// @see iotcon_remote_resource_get_types() - /// @see iotcon_remote_resource_get_interfaces() - /// @see iotcon_remote_resource_set_options() - /// @see iotcon_remote_resource_get_policies() - int iotcon_remote_resource_get_options( - iotcon_remote_resource_h resource, - ffi.Pointer options, - ) { - return _iotcon_remote_resource_get_options( - resource, - options, - ); - } - - late final _iotcon_remote_resource_get_optionsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_remote_resource_h, ffi.Pointer)>>( - 'iotcon_remote_resource_get_options'); - late final _iotcon_remote_resource_get_options = - _iotcon_remote_resource_get_optionsPtr.asFunction< - int Function( - iotcon_remote_resource_h, ffi.Pointer)>(); - - /// @brief Sets options into the remote resource. - /// @since_tizen 3.0 - /// @param[in] resource The handle of the remote resource - /// @param[in] options The handle of the header options - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_remote_resource_get_uri_path() - /// @see iotcon_remote_resource_get_host_address() - /// @see iotcon_remote_resource_get_connectivity_type() - /// @see iotcon_remote_resource_get_device_id() - /// @see iotcon_remote_resource_get_device_name() - /// @see iotcon_remote_resource_get_types() - /// @see iotcon_remote_resource_get_interfaces() - /// @see iotcon_remote_resource_get_options() - /// @see iotcon_remote_resource_get_policies() - int iotcon_remote_resource_set_options( - iotcon_remote_resource_h resource, - iotcon_options_h options, - ) { - return _iotcon_remote_resource_set_options( - resource, - options, - ); - } - - late final _iotcon_remote_resource_set_optionsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_remote_resource_h, - iotcon_options_h)>>('iotcon_remote_resource_set_options'); - late final _iotcon_remote_resource_set_options = - _iotcon_remote_resource_set_optionsPtr.asFunction< - int Function(iotcon_remote_resource_h, iotcon_options_h)>(); - - /// @brief Gets cached representation from the remote resource. - /// @since_tizen 3.0 - /// @remarks @a representation must not be released using iotcon_representation_destroy(). - /// @param[in] resource The handle of the remote resource - /// @param[out] representation The handle of the representation - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - int iotcon_remote_resource_get_cached_representation( - iotcon_remote_resource_h resource, - ffi.Pointer representation, - ) { - return _iotcon_remote_resource_get_cached_representation( - resource, - representation, - ); - } - - late final _iotcon_remote_resource_get_cached_representationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_remote_resource_h, - ffi.Pointer)>>( - 'iotcon_remote_resource_get_cached_representation'); - late final _iotcon_remote_resource_get_cached_representation = - _iotcon_remote_resource_get_cached_representationPtr.asFunction< - int Function(iotcon_remote_resource_h, - ffi.Pointer)>(); - - /// @brief Gets the checking interval which is using on the monitoring & caching of remote resource. - /// @details This API get the checking interval which is using in the process of monitoring and caching() of remote resource. \n - /// The monitoring and caching will operate "GET method" with the checking interval. - /// Default checking interval is 10 seconds. - /// @since_tizen 3.0 - /// @param[in] resource The handle of the remote resource - /// @param[out] interval Seconds for time interval - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_remote_resource_set_checking_interval() - /// @see iotcon_remote_resource_start_monitoring() - /// @see iotcon_remote_resource_start_caching() - int iotcon_remote_resource_get_checking_interval( - iotcon_remote_resource_h resource, - ffi.Pointer interval, - ) { - return _iotcon_remote_resource_get_checking_interval( - resource, - interval, - ); - } - - late final _iotcon_remote_resource_get_checking_intervalPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_remote_resource_h, ffi.Pointer)>>( - 'iotcon_remote_resource_get_checking_interval'); - late final _iotcon_remote_resource_get_checking_interval = - _iotcon_remote_resource_get_checking_intervalPtr.asFunction< - int Function(iotcon_remote_resource_h, ffi.Pointer)>(); - - /// @brief Sets the checking interval which is using on the monitoring & caching of remote resource. - /// @details This API set the checking interval which is using in the process of monitoring and caching() of remote resource. \n - /// The monitoring and caching will operate "GET method" with the checking interval changed by this function. - /// Default checking interval is 10 seconds. - /// @since_tizen 3.0 - /// @param[in] resource The handle of the remote resource - /// @param[in] interval Seconds for time interval (must be in range from 1 to 3600) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_remote_resource_get_checking_interval() - /// @see iotcon_remote_resource_start_monitoring() - /// @see iotcon_remote_resource_start_caching() - int iotcon_remote_resource_set_checking_interval( - iotcon_remote_resource_h resource, - int interval, - ) { - return _iotcon_remote_resource_set_checking_interval( - resource, - interval, - ); - } - - late final _iotcon_remote_resource_set_checking_intervalPtr = _lookup< - ffi - .NativeFunction>( - 'iotcon_remote_resource_set_checking_interval'); - late final _iotcon_remote_resource_set_checking_interval = - _iotcon_remote_resource_set_checking_intervalPtr - .asFunction(); - - /// @brief Adds callback to a server to receive presence events. - /// @details Request to receive presence to an interested server's resource with @a resource_type. \n - /// If succeeded to subscribe, iotcon_presence_cb() will be invoked when the server sends presence. \n - /// A server sends presence events when adds/removes/alters a resource or start/stop presence. \n - /// @a host_address could be #IOTCON_MULTICAST_ADDRESS for IPv4 multicast. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @remarks The length of @a resource_type should be less than or equal to 61.\n - /// The @a resource_type must start with a lowercase alphabetic character, followed by a sequence - /// of lowercase alphabetic, numeric, ".", or "-" characters, and contains no white space.\n - /// You must destroy @a presence by calling iotcon_unsubscribe_presence() - /// if @a presence is no longer needed. - /// @param[in] host_address The address or addressable name of the server - /// @param[in] connectivity_type The connectivity type - /// @param[in] resource_type A resource type that a client is interested in - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data to pass to the function - /// @param[out] presence_handle The generated presence handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_IOTIVITY IoTivity errors - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @post When the resource receive presence, iotcon_presence_cb() will be called. - /// @see iotcon_start_presence() - /// @see iotcon_stop_presence() - /// @see iotcon_remove_presence_cb() - /// @see iotcon_presence_cb() - int iotcon_add_presence_cb( - ffi.Pointer host_address, - int connectivity_type, - ffi.Pointer resource_type, - iotcon_presence_cb cb, - ffi.Pointer user_data, - ffi.Pointer presence_handle, - ) { - return _iotcon_add_presence_cb( - host_address, - connectivity_type, - resource_type, - cb, - user_data, - presence_handle, - ); - } - - late final _iotcon_add_presence_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - iotcon_presence_cb, - ffi.Pointer, - ffi.Pointer)>>('iotcon_add_presence_cb'); - late final _iotcon_add_presence_cb = _iotcon_add_presence_cbPtr.asFunction< - int Function( - ffi.Pointer, - int, - ffi.Pointer, - iotcon_presence_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Removes callback to a server's presence events. - /// @details Request not to receive server's presence any more. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] presence_handle The presence handle to be unsubscribed - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_start_presence() - /// @see iotcon_stop_presence() - /// @see iotcon_add_presence_cb() - /// @see iotcon_presence_cb() - int iotcon_remove_presence_cb( - iotcon_presence_h presence_handle, - ) { - return _iotcon_remove_presence_cb( - presence_handle, - ); - } - - late final _iotcon_remove_presence_cbPtr = - _lookup>( - 'iotcon_remove_presence_cb'); - late final _iotcon_remove_presence_cb = _iotcon_remove_presence_cbPtr - .asFunction(); - - /// @brief Gets host address from the presence handle. - /// @since_tizen 3.0 - /// @remarks @a host_address must not be released using free(). - /// @param[in] presence The handle of the presence - /// @param[out] host_address The host address of the presence - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_presence_get_connectivity_type() - /// @see iotcon_presence_get_resource_type() - int iotcon_presence_get_host_address( - iotcon_presence_h presence, - ffi.Pointer> host_address, - ) { - return _iotcon_presence_get_host_address( - presence, - host_address, - ); - } - - late final _iotcon_presence_get_host_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_presence_h, ffi.Pointer>)>>( - 'iotcon_presence_get_host_address'); - late final _iotcon_presence_get_host_address = - _iotcon_presence_get_host_addressPtr.asFunction< - int Function( - iotcon_presence_h, ffi.Pointer>)>(); - - /// @brief Gets connectivity type from the presence handle. - /// @details The @a connectivity_type could be one of #iotcon_connectivity_type_e. - /// @since_tizen 3.0 - /// @param[in] presence The handle of the presence - /// @param[out] connectivity_type The connectivity type of the presence - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_presence_get_host_address() - /// @see iotcon_presence_get_resource_type() - int iotcon_presence_get_connectivity_type( - iotcon_presence_h presence, - ffi.Pointer connectivity_type, - ) { - return _iotcon_presence_get_connectivity_type( - presence, - connectivity_type, - ); - } - - late final _iotcon_presence_get_connectivity_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_presence_h, ffi.Pointer)>>( - 'iotcon_presence_get_connectivity_type'); - late final _iotcon_presence_get_connectivity_type = - _iotcon_presence_get_connectivity_typePtr.asFunction< - int Function(iotcon_presence_h, ffi.Pointer)>(); - - /// @brief Gets resource type from the presence handle. - /// @since_tizen 3.0 - /// @remarks @a resource_type must not be released using free(). - /// @param[in] presence The handle of the presence - /// @param[out] resource_type The resource type of the presence - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_presence_get_host_address() - /// @see iotcon_presence_get_connectivity_type() - int iotcon_presence_get_resource_type( - iotcon_presence_h presence, - ffi.Pointer> resource_type, - ) { - return _iotcon_presence_get_resource_type( - presence, - resource_type, - ); - } - - late final _iotcon_presence_get_resource_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_presence_h, ffi.Pointer>)>>( - 'iotcon_presence_get_resource_type'); - late final _iotcon_presence_get_resource_type = - _iotcon_presence_get_resource_typePtr.asFunction< - int Function( - iotcon_presence_h, ffi.Pointer>)>(); - - /// @brief Gets result from the presence response handle. - /// @details The @a result could be one of #iotcon_presence_result_e. - /// @since_tizen 3.0 - /// @param[in] response The handle of the presence response - /// @param[out] result The result code - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_presence_response_get_trigger() - /// @see iotcon_presence_response_get_host_address() - /// @see iotcon_presence_response_get_connectivity_type() - /// @see iotcon_presence_response_get_resource_type() - int iotcon_presence_response_get_result( - iotcon_presence_response_h response, - ffi.Pointer result, - ) { - return _iotcon_presence_response_get_result( - response, - result, - ); - } - - late final _iotcon_presence_response_get_resultPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_presence_response_h, - ffi.Pointer)>>('iotcon_presence_response_get_result'); - late final _iotcon_presence_response_get_result = - _iotcon_presence_response_get_resultPtr.asFunction< - int Function(iotcon_presence_response_h, ffi.Pointer)>(); - - /// @brief Gets trigger from the presence response handle. - /// @details The @a trigger could be one of #iotcon_presence_trigger_e. - /// It is set only if a response result is IOTCON_PRESENCE_OK. - /// @since_tizen 3.0 - /// @param[in] response The handle of the presence response - /// @param[out] trigger The presence trigger value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_presence_response_get_result() - /// @see iotcon_presence_response_get_host_address() - /// @see iotcon_presence_response_get_connectivity_type() - /// @see iotcon_presence_response_get_resource_type() - int iotcon_presence_response_get_trigger( - iotcon_presence_response_h response, - ffi.Pointer trigger, - ) { - return _iotcon_presence_response_get_trigger( - response, - trigger, - ); - } - - late final _iotcon_presence_response_get_triggerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_presence_response_h, - ffi.Pointer)>>('iotcon_presence_response_get_trigger'); - late final _iotcon_presence_response_get_trigger = - _iotcon_presence_response_get_triggerPtr.asFunction< - int Function(iotcon_presence_response_h, ffi.Pointer)>(); - - /// @brief Gets host address from the presence response handle. - /// @since_tizen 3.0 - /// @remarks @a host_address must not be released using free(). - /// @param[in] response The handle of the presence response - /// @param[out] host_address The host address of the presence response - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see iotcon_presence_response_get_result() - /// @see iotcon_presence_response_get_trigger() - /// @see iotcon_presence_response_get_connectivity_type() - /// @see iotcon_presence_response_get_resource_type() - int iotcon_presence_response_get_host_address( - iotcon_presence_response_h response, - ffi.Pointer> host_address, - ) { - return _iotcon_presence_response_get_host_address( - response, - host_address, - ); - } - - late final _iotcon_presence_response_get_host_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_presence_response_h, - ffi.Pointer>)>>( - 'iotcon_presence_response_get_host_address'); - late final _iotcon_presence_response_get_host_address = - _iotcon_presence_response_get_host_addressPtr.asFunction< - int Function(iotcon_presence_response_h, - ffi.Pointer>)>(); - - /// @brief Gets connectivity type from the presence response handle. - /// @details The @a connectivity_type could be one of #iotcon_connectivity_type_e. - /// @since_tizen 3.0 - /// @param[in] response The handle of the presence response - /// @param[out] connectivity_type The connectivity type of the presence response - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_presence_response_get_result() - /// @see iotcon_presence_response_get_trigger() - /// @see iotcon_presence_response_get_host_address() - /// @see iotcon_presence_response_get_resource_type() - int iotcon_presence_response_get_connectivity_type( - iotcon_presence_response_h response, - ffi.Pointer connectivity_type, - ) { - return _iotcon_presence_response_get_connectivity_type( - response, - connectivity_type, - ); - } - - late final _iotcon_presence_response_get_connectivity_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - iotcon_presence_response_h, ffi.Pointer)>>( - 'iotcon_presence_response_get_connectivity_type'); - late final _iotcon_presence_response_get_connectivity_type = - _iotcon_presence_response_get_connectivity_typePtr.asFunction< - int Function(iotcon_presence_response_h, ffi.Pointer)>(); - - /// @brief Gets resource type from the presence response handle. - /// @since_tizen 3.0 - /// @remarks @a resource_type must not be released using free(). - /// @param[in] response The handle of the presence response - /// @param[out] resource_type The resource type of the presence response - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_presence_response_get_result() - /// @see iotcon_presence_response_get_trigger() - /// @see iotcon_presence_response_get_host_address() - /// @see iotcon_presence_response_get_connectivity_type() - int iotcon_presence_response_get_resource_type( - iotcon_presence_response_h response, - ffi.Pointer> resource_type, - ) { - return _iotcon_presence_response_get_resource_type( - response, - resource_type, - ); - } - - late final _iotcon_presence_response_get_resource_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_presence_response_h, - ffi.Pointer>)>>( - 'iotcon_presence_response_get_resource_type'); - late final _iotcon_presence_response_get_resource_type = - _iotcon_presence_response_get_resource_typePtr.asFunction< - int Function(iotcon_presence_response_h, - ffi.Pointer>)>(); - - /// @brief Finds resources asynchronously. - /// @details Request to find a resource of @a host_address server with @a query.\n - /// @a host_address could be #IOTCON_MULTICAST_ADDRESS for multicast.\n - /// If succeeded to find the resource, iotcon_found_resource_cb() will be invoked with information of the resource. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @remarks @a host_address should be in the format coap://address:port. \n - /// (ex. coaps://[fe80::ae5a:14ff:fe24:b8fe]:12345, or coaps://192.168.1.10:12345)\n - /// @a connectivity_type can be set with extra options. - /// If @a connectivity_type is set without IOTCON_CONNECTIVITY_IPV4_ONLY - /// and IOTCON_CONNECTIVITY_IPV6_ONLY, the resources are discovered by default setting - /// of IoTivity(IPv6 is preferred over IPv4). \n - /// If there are no preference options(PREFER_XXX), resources will reply using each of - /// opened protocol(TCP/UDP). - /// Therefore, you can get remote resource handles which include different host address, - /// but indicates same resource. \n - /// (coaps://192.168.0.2:1234/res/light, coaps+tcp://192.168.0.2/1235/res/light) - /// @a query can be set using specific resource types, or resource interfaces. - /// If @a query is NULL, every resource discovered is listed. - /// @param[in] host_address The address or addressable name of server - /// @param[in] connectivity_type The connectivity type - /// @param[in] query The query specified as a filter for the resource - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @post iotcon_found_resource_cb() will be invoked. - /// @see iotcon_found_resource_cb() - /// @see iotcon_set_timeout() - int iotcon_find_resource( - ffi.Pointer host_address, - int connectivity_type, - iotcon_query_h query, - iotcon_found_resource_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_find_resource( - host_address, - connectivity_type, - query, - cb, - user_data, - ); - } - - late final _iotcon_find_resourcePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - iotcon_query_h, - iotcon_found_resource_cb, - ffi.Pointer)>>('iotcon_find_resource'); - late final _iotcon_find_resource = _iotcon_find_resourcePtr.asFunction< - int Function(ffi.Pointer, int, iotcon_query_h, - iotcon_found_resource_cb, ffi.Pointer)>(); - - /// @brief Finds the device information of remote server asynchronously. - /// @details Request device information to server and pass the information by calling iotcon_device_info_cb(). \n - /// @a host_address could be #IOTCON_MULTICAST_ADDRESS for multicast. \n - /// If succeeded in getting device information, iotcon_device_info_cb() will be invoked with information. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @remarks @a host_address should be in the format coap://address:port. \n - /// (ex. coap://[fe80::ae5a:14ff:fe24:b8fe]:12345, or coap://192.168.1.10:12345) \n - /// @a connectivity_type can be set with extra options. - /// If @a connectivity_type is set without IOTCON_CONNECTIVITY_IPV4_ONLY - /// and IOTCON_CONNECTIVITY_IPV6_ONLY, device informations are discovered by default setting - /// of IoTivity(IPv6 is preferred over IPv4). \n - /// If there are no preference options(PREFER_XXX), it will reply using UDP. - /// @param[in] host_address The host address of remote server - /// @param[in] connectivity_type The connectivity type - /// @param[in] query The query specified as a filter for the device information - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @post iotcon_device_info_cb() will be invoked. - /// @see iotcon_set_device_name() - /// @see iotcon_device_info_cb() - /// @see iotcon_device_info_get_property() - /// @see iotcon_set_timeout() - int iotcon_find_device_info( - ffi.Pointer host_address, - int connectivity_type, - iotcon_query_h query, - iotcon_device_info_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_find_device_info( - host_address, - connectivity_type, - query, - cb, - user_data, - ); - } - - late final _iotcon_find_device_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - iotcon_query_h, - iotcon_device_info_cb, - ffi.Pointer)>>('iotcon_find_device_info'); - late final _iotcon_find_device_info = _iotcon_find_device_infoPtr.asFunction< - int Function(ffi.Pointer, int, iotcon_query_h, - iotcon_device_info_cb, ffi.Pointer)>(); - - /// @brief Gets device properties from the device information handle. - /// @since_tizen 3.0 - /// @remarks @a value must not be released using free(). - /// @param[in] device_info The handle of the device information - /// @param[in] property The properties of the device information - /// @param[out] value The value of the property - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_set_device_name() - /// @see iotcon_device_info_cb() - /// @see iotcon_find_device_info() - int iotcon_device_info_get_property( - iotcon_device_info_h device_info, - int property, - ffi.Pointer> value, - ) { - return _iotcon_device_info_get_property( - device_info, - property, - value, - ); - } - - late final _iotcon_device_info_get_propertyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_device_info_h, ffi.Int32, - ffi.Pointer>)>>( - 'iotcon_device_info_get_property'); - late final _iotcon_device_info_get_property = - _iotcon_device_info_get_propertyPtr.asFunction< - int Function( - iotcon_device_info_h, int, ffi.Pointer>)>(); - - /// @brief Finds the platform information of remote server asynchronously. - /// @details Request platform information to server and pass the information by calling iotcon_platform_info_cb(). \n - /// @a host_address could be #IOTCON_MULTICAST_ADDRESS for multicast. \n - /// If succeeded in getting platform information, iotcon_platform_info_cb() will be invoked with information. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @remarks @a host_address should be in the format coap://address:port. \n - /// (ex. coap://[fe80::ae5a:14ff:fe24:b8fe]:12345, or coap://192.168.1.10:12345) \n - /// @a connectivity_type can be set with extra options. - /// If @a connectivity_type is set without IOTCON_CONNECTIVITY_IPV4_ONLY - /// and IOTCON_CONNECTIVITY_IPV6_ONLY, platform informations are discovered by default setting - /// of IoTivity(IPv6 is preferred over IPv4). \n - /// If there are no preference options(PREFER_XXX), it will reply using UDP. - /// @param[in] host_address The host address of remote server - /// @param[in] connectivity_type The connectivity type - /// @param[in] query The query specified as a filter for the platform information - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_SYSTEM System error - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @pre iotcon_initialize() should be called to initialize. - /// @post iotcon_platform_info_cb() will be invoked. - /// @see iotcon_platform_info_cb() - /// @see iotcon_platform_info_get_property() - /// @see iotcon_set_timeout() - int iotcon_find_platform_info( - ffi.Pointer host_address, - int connectivity_type, - iotcon_query_h query, - iotcon_platform_info_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_find_platform_info( - host_address, - connectivity_type, - query, - cb, - user_data, - ); - } - - late final _iotcon_find_platform_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - iotcon_query_h, - iotcon_platform_info_cb, - ffi.Pointer)>>('iotcon_find_platform_info'); - late final _iotcon_find_platform_info = - _iotcon_find_platform_infoPtr.asFunction< - int Function(ffi.Pointer, int, iotcon_query_h, - iotcon_platform_info_cb, ffi.Pointer)>(); - - /// @brief Gets platform properties from the platform information handle. - /// @since_tizen 3.0 - /// @remarks @a value must not be released using free(). - /// @param[in] platform_info The handle of the platform information - /// @param[in] property The properties of the platform information - /// @param[out] value The value of the property - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @see iotcon_platform_info_cb() - /// @see iotcon_find_platform_info() - int iotcon_platform_info_get_property( - iotcon_platform_info_h platform_info, - int property, - ffi.Pointer> value, - ) { - return _iotcon_platform_info_get_property( - platform_info, - property, - value, - ); - } - - late final _iotcon_platform_info_get_propertyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_platform_info_h, ffi.Int32, - ffi.Pointer>)>>( - 'iotcon_platform_info_get_property'); - late final _iotcon_platform_info_get_property = - _iotcon_platform_info_get_propertyPtr.asFunction< - int Function(iotcon_platform_info_h, int, - ffi.Pointer>)>(); - - /// @brief Initializes IoTCon. - /// @details Calls this function to start IoTCon. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @privilege %http://tizen.org/privilege/internet - /// @remarks The @a file_path point to a file for handling secure virtual resources. - /// The file that is CBOR(Concise Binary Object Representation)-format must already exist in @a file_path. - /// We recommend to use application-local file for @a file_path. \n - /// You must call iotcon_deinitialize() if IoTCon API is no longer needed. - /// @param[in] file_path The path of SVR(Secure Virtual Resources) DB - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied - /// @see iotcon_deinitialize() - int iotcon_initialize( - ffi.Pointer file_path, - ) { - return _iotcon_initialize( - file_path, - ); - } - - late final _iotcon_initializePtr = - _lookup)>>( - 'iotcon_initialize'); - late final _iotcon_initialize = - _iotcon_initializePtr.asFunction)>(); - - /// @brief Deinitializes IoTCon. - /// @details Frees the resources allocated to IoTCon. - /// @since_tizen 3.0 - /// @remarks This function must be called if IoTCon API is no longer needed. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_initialize() - int iotcon_deinitialize() { - return _iotcon_deinitialize(); - } - - late final _iotcon_deinitializePtr = - _lookup>('iotcon_deinitialize'); - late final _iotcon_deinitialize = - _iotcon_deinitializePtr.asFunction(); - - /// @brief Gets the timeout seconds of asynchronous API. - /// @details This API get the timeout of iotcon_find_device_info(), - /// iotcon_find_platform_info(), iotcon_find_resource(), - /// iotcon_remote_resource_get(), iotcon_remote_resource_put(), - /// iotcon_remote_resource_post() and iotcon_remote_resource_delete(). - /// @since_tizen 3.0 - /// @param[out] timeout_seconds Seconds for timeout - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_set_timeout() - int iotcon_get_timeout( - ffi.Pointer timeout_seconds, - ) { - return _iotcon_get_timeout( - timeout_seconds, - ); - } - - late final _iotcon_get_timeoutPtr = - _lookup)>>( - 'iotcon_get_timeout'); - late final _iotcon_get_timeout = - _iotcon_get_timeoutPtr.asFunction)>(); - - /// @brief Sets the timeout seconds of asynchronous APIs. - /// @details This API set the timeout of iotcon_find_device_info(), - /// iotcon_find_platform_info(), iotcon_find_resource(), - /// iotcon_remote_resource_get(), iotcon_remote_resource_put(), - /// iotcon_remote_resource_post() and iotcon_remote_resource_delete().\n - /// Default timeout interval value is 30. - /// @since_tizen 3.0 - /// @param[in] timeout_seconds Seconds for timeout (must be in range from 1 to 3600) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_get_timeout() - int iotcon_set_timeout( - int timeout_seconds, - ) { - return _iotcon_set_timeout( - timeout_seconds, - ); - } - - late final _iotcon_set_timeoutPtr = - _lookup>( - 'iotcon_set_timeout'); - late final _iotcon_set_timeout = - _iotcon_set_timeoutPtr.asFunction(); - - /// @brief Gets the polling interval(milliseconds) of IoTCon. - /// @details This API gets the polling interval of IoTCon. - /// Default polling interval is 100 milliseconds. - /// @since_tizen 3.0 - /// @param[out] interval Milliseconds for polling interval - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_set_timeout() - int iotcon_polling_get_interval( - ffi.Pointer interval, - ) { - return _iotcon_polling_get_interval( - interval, - ); - } - - late final _iotcon_polling_get_intervalPtr = - _lookup)>>( - 'iotcon_polling_get_interval'); - late final _iotcon_polling_get_interval = _iotcon_polling_get_intervalPtr - .asFunction)>(); - - /// @brief Sets the polling interval(milliseconds) of IoTCon. - /// @details This API sets the polling interval of IoTCon. - /// The closer to 0, the faster it operates. It is invoked immediately for changing the interval. - /// Default polling interval is 100 milliseconds. If you want the faster operation, - /// we recommend you set 10 milliseconds for polling interval. - /// @since_tizen 3.0 - /// @param[in] interval Milliseconds for polling interval (must be in range from 1 to 999) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_polling_get_interval() - int iotcon_polling_set_interval( - int interval, - ) { - return _iotcon_polling_set_interval( - interval, - ); - } - - late final _iotcon_polling_set_intervalPtr = - _lookup>( - 'iotcon_polling_set_interval'); - late final _iotcon_polling_set_interval = - _iotcon_polling_set_intervalPtr.asFunction(); - - /// @brief Invokes a next message from a queue for receiving messages from others immediately. - /// @details This API invokes a next message from a queue for receiving messages from others immediately. \n - /// After calling the API, it continues the polling with existing interval. - /// @since_tizen 3.0 - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @pre iotcon_initialize() should be called to initialize. - int iotcon_polling_invoke() { - return _iotcon_polling_invoke(); - } - - late final _iotcon_polling_invokePtr = - _lookup>('iotcon_polling_invoke'); - late final _iotcon_polling_invoke = - _iotcon_polling_invokePtr.asFunction(); - - /// @brief Adds callback to show pin number which is generated automatically. - /// @details When a provisioning tool tries to register this device using random pin based \n - /// ownership transfer method, it makes pin number which is generated automatically be shown. - /// @since_tizen 3.0 - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data to pass to the function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_ALREADY Already done - /// @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory - /// @pre iotcon_initialize() should be called to initialize. - /// @post When the device is registered by provisioning tool, iotcon_generated_pin_cb() will be called. - /// @see iotcon_remove_generated_pin_cb() - int iotcon_add_generated_pin_cb( - iotcon_generated_pin_cb cb, - ffi.Pointer user_data, - ) { - return _iotcon_add_generated_pin_cb( - cb, - user_data, - ); - } - - late final _iotcon_add_generated_pin_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(iotcon_generated_pin_cb, - ffi.Pointer)>>('iotcon_add_generated_pin_cb'); - late final _iotcon_add_generated_pin_cb = - _iotcon_add_generated_pin_cbPtr.asFunction< - int Function(iotcon_generated_pin_cb, ffi.Pointer)>(); - - /// @brief Removes callback to show pin number which is generated automatically. - /// @details If this function is called, @a cb will be not called anymore. \n - /// For removing @a cb that is used at iotcon_add_generated_pin_cb() should be used. - /// @since_tizen 3.0 - /// @param[in] cb The callback function to invoke - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IOTCON_ERROR_NONE Successful - /// @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported - /// @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IOTCON_ERROR_NO_DATA No data available - /// @pre iotcon_initialize() should be called to initialize. - /// @see iotcon_add_generated_pin_cb() - int iotcon_remove_generated_pin_cb( - iotcon_generated_pin_cb cb, - ) { - return _iotcon_remove_generated_pin_cb( - cb, - ); - } - - late final _iotcon_remove_generated_pin_cbPtr = - _lookup>( - 'iotcon_remove_generated_pin_cb'); - late final _iotcon_remove_generated_pin_cb = - _iotcon_remove_generated_pin_cbPtr - .asFunction(); - - /// @brief Initializes SSDP. - /// @since_tizen 3.0 - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #SSDP_ERROR_NONE Successful - /// @retval #SSDP_ERROR_OPERATION_FAILED Operation failed - /// @retval #SSDP_ERROR_NOT_SUPPORTED Not supported - int ssdp_initialize() { - return _ssdp_initialize(); - } - - late final _ssdp_initializePtr = - _lookup>('ssdp_initialize'); - late final _ssdp_initialize = - _ssdp_initializePtr.asFunction(); - - /// @brief Deinitializes SSDP. - /// @since_tizen 3.0 - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #SSDP_ERROR_NONE Successful - /// @retval #SSDP_ERROR_NOT_SUPPORTED Not supported - int ssdp_deinitialize() { - return _ssdp_deinitialize(); - } - - late final _ssdp_deinitializePtr = - _lookup>('ssdp_deinitialize'); - late final _ssdp_deinitialize = - _ssdp_deinitializePtr.asFunction(); - - /// @brief Creates a SSDP local service handle. - /// @since_tizen 3.0 - /// @remarks You must release @a local_service using ssdp_destroy_local_service(). - /// @param[in] target The SSDP local service's target. It may be a device type or a service type specified in UPnP forum (http://upnp.org) - /// @param[out] local_service The SSDP local service handle - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #SSDP_ERROR_NONE Successful - /// @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #SSDP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SSDP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SSDP_ERROR_NOT_SUPPORTED Not supported - /// @see ssdp_destroy_local_service() - /// @pre This API needs ssdp_initialize() before use. - int ssdp_create_local_service( - ffi.Pointer target, - ffi.Pointer local_service, - ) { - return _ssdp_create_local_service( - target, - local_service, - ); - } - - late final _ssdp_create_local_servicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('ssdp_create_local_service'); - late final _ssdp_create_local_service = - _ssdp_create_local_servicePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys the SSDP local service handle. - /// @details You must call ssdp_deregister_local_service() before destroying the local service. - /// @since_tizen 3.0 - /// @param[in] local_service The SSDP local service handle - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #SSDP_ERROR_NONE Successful - /// @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #SSDP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found - /// @retval #SSDP_ERROR_NOT_SUPPORTED Not supported - /// @see ssdp_create_local_service() - int ssdp_destroy_local_service( - int local_service, - ) { - return _ssdp_destroy_local_service( - local_service, - ); - } - - late final _ssdp_destroy_local_servicePtr = - _lookup>( - 'ssdp_destroy_local_service'); - late final _ssdp_destroy_local_service = - _ssdp_destroy_local_servicePtr.asFunction(); - - /// @brief Sets the USN (Unique Service Name) of SSDP local service. The USN format is specified in UPnP forum (http://upnp.org). - /// @since_tizen 3.0 - /// @remarks You must pass only @a unregistered local_service created using ssdp_create_local_service(). - /// If @a local_service is already registered, you cannot set @a usn. - /// @param[in] local_service The SSDP local service handle - /// @param[in] usn The USN of SSDP local service - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #SSDP_ERROR_NONE Successful - /// @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found - /// @retval #SSDP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SSDP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SSDP_ERROR_NOT_SUPPORTED Not supported - int ssdp_service_set_usn( - int local_service, - ffi.Pointer usn, - ) { - return _ssdp_service_set_usn( - local_service, - usn, - ); - } - - late final _ssdp_service_set_usnPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ssdp_service_h, ffi.Pointer)>>('ssdp_service_set_usn'); - late final _ssdp_service_set_usn = _ssdp_service_set_usnPtr - .asFunction)>(); - - /// @brief Sets the URL (Uniform Resource Locator) for description of SSDP local service. See RFC 3986. - /// @since_tizen 3.0 - /// @remarks You must pass only unregistered @a local_service created using ssdp_create_local_service(). - /// If @a local_service is already registered, you cannot set @a url. - /// @param[in] local_service The SSDP local service handle - /// @param[in] url The URL of SSDP local service - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #SSDP_ERROR_NONE Successful - /// @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found - /// @retval #SSDP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SSDP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SSDP_ERROR_NOT_SUPPORTED Not supported - int ssdp_service_set_url( - int local_service, - ffi.Pointer url, - ) { - return _ssdp_service_set_url( - local_service, - url, - ); - } - - late final _ssdp_service_set_urlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ssdp_service_h, ffi.Pointer)>>('ssdp_service_set_url'); - late final _ssdp_service_set_url = _ssdp_service_set_urlPtr - .asFunction)>(); - - /// @brief Gets the target of SSDP service. - /// @since_tizen 3.0 - /// @remarks You must release @a target using free(). - /// @param[in] service The SSDP service handle - /// @param[out] target The target of SSDP service - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #SSDP_ERROR_NONE Successful - /// @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found - /// @retval #SSDP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SSDP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SSDP_ERROR_NOT_SUPPORTED Not supported - int ssdp_service_get_target( - int service, - ffi.Pointer> target, - ) { - return _ssdp_service_get_target( - service, - target, - ); - } - - late final _ssdp_service_get_targetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ssdp_service_h, - ffi.Pointer>)>>('ssdp_service_get_target'); - late final _ssdp_service_get_target = _ssdp_service_get_targetPtr - .asFunction>)>(); - - /// @brief Gets the USN of SSDP service. - /// @since_tizen 3.0 - /// @remarks You must release @a usn using free(). - /// @param[in] service The SSDP service handle - /// @param[out] usn The USN of SSDP service - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #SSDP_ERROR_NONE Successful - /// @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found - /// @retval #SSDP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SSDP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SSDP_ERROR_NOT_SUPPORTED Not supported - int ssdp_service_get_usn( - int service, - ffi.Pointer> usn, - ) { - return _ssdp_service_get_usn( - service, - usn, - ); - } - - late final _ssdp_service_get_usnPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ssdp_service_h, - ffi.Pointer>)>>('ssdp_service_get_usn'); - late final _ssdp_service_get_usn = _ssdp_service_get_usnPtr - .asFunction>)>(); - - /// @brief Gets the URL of SSDP service. - /// @since_tizen 3.0 - /// @remarks You must release @a url using free(). - /// @param[in] service The SSDP service handle - /// @param[out] url The URL of SSDP service - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #SSDP_ERROR_NONE Successful - /// @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found - /// @retval #SSDP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SSDP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SSDP_ERROR_NOT_SUPPORTED Not supported - int ssdp_service_get_url( - int service, - ffi.Pointer> url, - ) { - return _ssdp_service_get_url( - service, - url, - ); - } - - late final _ssdp_service_get_urlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ssdp_service_h, - ffi.Pointer>)>>('ssdp_service_get_url'); - late final _ssdp_service_get_url = _ssdp_service_get_urlPtr - .asFunction>)>(); - - /// @brief Registers the SSDP local service for publishing. - /// @details You must set a USN and a URL of the local service before ssdp_register_local_service() is called. - /// @since_tizen 3.0 - /// @remarks You must pass only local_service created using ssdp_create_local_service(). - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] local_service The SSDP local service handle - /// @param[in] registered_cb The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #SSDP_ERROR_NONE Successful - /// @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found - /// @retval #SSDP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SSDP_ERROR_OPERATION_FAILED Operation failed - /// @retval #SSDP_ERROR_NOT_SUPPORTED Not supported - /// @retval #SSDP_ERROR_SERVICE_ALREADY_REGISTERED Service already registered - /// @retval #SSDP_ERROR_PERMISSION_DENIED Permission Denied - /// @pre This API needs ssdp_service_set_usn() and ssdp_service_set_url() before use. - int ssdp_register_local_service( - int local_service, - ssdp_registered_cb registered_cb, - ffi.Pointer user_data, - ) { - return _ssdp_register_local_service( - local_service, - registered_cb, - user_data, - ); - } - - late final _ssdp_register_local_servicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ssdp_service_h, ssdp_registered_cb, - ffi.Pointer)>>('ssdp_register_local_service'); - late final _ssdp_register_local_service = - _ssdp_register_local_servicePtr.asFunction< - int Function(int, ssdp_registered_cb, ffi.Pointer)>(); - - /// @brief Deregisters the SSDP local service. - /// @since_tizen 3.0 - /// @remarks You must pass only local_service created using ssdp_create_local_service(). - /// @param[in] local_service The SSDP local service handle - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #SSDP_ERROR_NONE Successful - /// @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found - /// @retval #SSDP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SSDP_ERROR_NOT_SUPPORTED Not supported - int ssdp_deregister_local_service( - int local_service, - ) { - return _ssdp_deregister_local_service( - local_service, - ); - } - - late final _ssdp_deregister_local_servicePtr = - _lookup>( - 'ssdp_deregister_local_service'); - late final _ssdp_deregister_local_service = - _ssdp_deregister_local_servicePtr.asFunction(); - - /// @brief Starts browsing the SSDP remote service. - /// @details ssdp_start_browsing_service() keeps browsing services until calling ssdp_stop_browsing_service(). - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @param[in] target The target to browse - /// @param[out] ssdp_browser The SSDP browser handle - /// @param[in] found_cb The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #SSDP_ERROR_NONE Successful - /// @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found - /// @retval #SSDP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SSDP_ERROR_OPERATION_FAILED Operation failed - /// @retval #SSDP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SSDP_ERROR_NOT_SUPPORTED Not supported - /// @retval #SSDP_ERROR_PERMISSION_DENIED Permission Denied - int ssdp_start_browsing_service( - ffi.Pointer target, - ffi.Pointer ssdp_browser, - ssdp_found_cb found_cb, - ffi.Pointer user_data, - ) { - return _ssdp_start_browsing_service( - target, - ssdp_browser, - found_cb, - user_data, - ); - } - - late final _ssdp_start_browsing_servicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ssdp_found_cb, - ffi.Pointer)>>('ssdp_start_browsing_service'); - late final _ssdp_start_browsing_service = - _ssdp_start_browsing_servicePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ssdp_found_cb, ffi.Pointer)>(); - - /// @brief Stops browsing the SSDP remote service. - /// @since_tizen 3.0 - /// @param[in] ssdp_browser The SSDP browser handle - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #SSDP_ERROR_NONE Successful - /// @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized - /// @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found - /// @retval #SSDP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SSDP_ERROR_NOT_SUPPORTED Not supported - int ssdp_stop_browsing_service( - int ssdp_browser, - ) { - return _ssdp_stop_browsing_service( - ssdp_browser, - ); - } - - late final _ssdp_stop_browsing_servicePtr = - _lookup>( - 'ssdp_stop_browsing_service'); - late final _ssdp_stop_browsing_service = - _ssdp_stop_browsing_servicePtr.asFunction(); - - /// @brief Initializes STC (Smart Traffic Control). - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @remarks You must release @a handle using stc_deinitialize(). - /// - /// @param[out] stc The STC handle - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #STC_ERROR_NONE Successful - /// @retval #STC_ERROR_OPERATION_FAILED General error - /// @retval #STC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STC_ERROR_NOT_SUPPORTED Not supported - /// @retval #STC_ERROR_PERMISSION_DENIED Permission denied - /// - /// @see stc_h - /// @see stc_deinitialize() - int stc_initialize( - ffi.Pointer stc, - ) { - return _stc_initialize( - stc, - ); - } - - late final _stc_initializePtr = - _lookup)>>( - 'stc_initialize'); - late final _stc_initialize = - _stc_initializePtr.asFunction)>(); - - /// @brief Deinitializes STC. - /// @since_tizen 4.0 - /// - /// @param[in] stc The STC handle - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #STC_ERROR_NONE Successful - /// @retval #STC_ERROR_OPERATION_FAILED General error - /// @retval #STC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STC_ERROR_NOT_INITIALIZED Not initialized - /// @retval #STC_ERROR_NOT_SUPPORTED Not supported - /// - /// @see stc_h - /// @see stc_initialize() - int stc_deinitialize( - stc_h stc, - ) { - return _stc_deinitialize( - stc, - ); - } - - late final _stc_deinitializePtr = - _lookup>('stc_deinitialize'); - late final _stc_deinitialize = - _stc_deinitializePtr.asFunction(); - - /// @brief Gets the statistics information an application matched rule asynchronously. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// - /// @param[in] stc The STC handle - /// @param[in] rule The statistics rule handle - /// @param[in] info_cb The callback is called for each application - /// that used network in between timestamps specified - /// @param[in] user_data The user data passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #STC_ERROR_NONE Successful - /// @retval #STC_ERROR_OPERATION_FAILED General error - /// @retval #STC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STC_ERROR_NOT_INITIALIZED Not initialized - /// @retval #STC_ERROR_NOT_SUPPORTED Not supported - /// @retval #STC_ERROR_PERMISSION_DENIED Permission denied - /// - /// @see stc_h - /// @see stc_stats_rule_h - /// @see stc_initialize() - /// @see stc_stats_rule_create() - /// @see stc_stats_rule_destroy() - /// @see stc_stats_rule_set_app_id() - /// @see stc_stats_rule_set_time_interval() - /// @see stc_stats_rule_set_iface_type() - /// @see stc_stats_rule_set_time_period() - /// @see stc_stats_rule_get_app_id() - /// @see stc_stats_rule_get_time_interval() - /// @see stc_stats_rule_get_iface_type() - /// @see stc_stats_rule_get_time_period() - /// @see stc_stats_info_cb() - /// @see stc_foreach_stats() - /// @see stc_get_total_stats() - int stc_get_stats( - stc_h stc, - stc_stats_rule_h rule, - stc_stats_info_cb info_cb, - ffi.Pointer user_data, - ) { - return _stc_get_stats( - stc, - rule, - info_cb, - user_data, - ); - } - - late final _stc_get_statsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stc_h, stc_stats_rule_h, stc_stats_info_cb, - ffi.Pointer)>>('stc_get_stats'); - late final _stc_get_stats = _stc_get_statsPtr.asFunction< - int Function( - stc_h, stc_stats_rule_h, stc_stats_info_cb, ffi.Pointer)>(); - - /// @brief Gets the statistics information of each application asynchronously. - /// @details The callback is called for each application that used network - /// in between timestamps specified. - /// If interface name is not specified, each application will only appear - /// once with the total traffic used over all interfaces. - /// - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// - /// @param[in] stc The STC handle - /// @param[in] rule The statistics rule handle - /// @param[in] info_cb The callback is called for each application - /// that used network in between timestamps specified - /// @param[in] user_data The user data passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #STC_ERROR_NONE Successful - /// @retval #STC_ERROR_OPERATION_FAILED General error - /// @retval #STC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STC_ERROR_NOT_INITIALIZED Not initialized - /// @retval #STC_ERROR_NOT_SUPPORTED Not supported - /// @retval #STC_ERROR_PERMISSION_DENIED Permission denied - /// - /// @see stc_h - /// @see stc_stats_rule_h - /// @see stc_initialize() - /// @see stc_stats_rule_create() - /// @see stc_stats_rule_destroy() - /// @see stc_stats_rule_set_app_id() - /// @see stc_stats_rule_set_time_interval() - /// @see stc_stats_rule_set_iface_type() - /// @see stc_stats_rule_set_time_period() - /// @see stc_stats_rule_get_app_id() - /// @see stc_stats_rule_get_time_interval() - /// @see stc_stats_rule_get_iface_type() - /// @see stc_stats_rule_get_time_period() - /// @see stc_stats_info_cb() - /// @see stc_get_stats() - /// @see stc_get_total_stats() - int stc_foreach_stats( - stc_h stc, - stc_stats_rule_h rule, - stc_stats_info_cb info_cb, - ffi.Pointer user_data, - ) { - return _stc_foreach_stats( - stc, - rule, - info_cb, - user_data, - ); - } - - late final _stc_foreach_statsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stc_h, stc_stats_rule_h, stc_stats_info_cb, - ffi.Pointer)>>('stc_foreach_stats'); - late final _stc_foreach_stats = _stc_foreach_statsPtr.asFunction< - int Function( - stc_h, stc_stats_rule_h, stc_stats_info_cb, ffi.Pointer)>(); - - /// @brief Gets the total statistics information by interface type asynchronously. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// - /// @param[in] stc The STC handle - /// @param[in] rule The statistics rule handle - /// @param[in] info_cb The callback is called for each application - /// that used network in between timestamps specified - /// @param[in] user_data The user data passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #STC_ERROR_NONE Successful - /// @retval #STC_ERROR_OPERATION_FAILED General error - /// @retval #STC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STC_ERROR_NOT_INITIALIZED Not initialized - /// @retval #STC_ERROR_NOT_SUPPORTED Not supported - /// @retval #STC_ERROR_PERMISSION_DENIED Permission denied - /// - /// @see stc_h - /// @see stc_stats_rule_h - /// @see stc_initialize() - /// @see stc_stats_rule_create() - /// @see stc_stats_rule_destroy() - /// @see stc_stats_rule_set_app_id() - /// @see stc_stats_rule_set_time_interval() - /// @see stc_stats_rule_set_iface_type() - /// @see stc_stats_rule_set_time_period() - /// @see stc_stats_rule_get_app_id() - /// @see stc_stats_rule_get_time_interval() - /// @see stc_stats_rule_get_iface_type() - /// @see stc_stats_rule_get_time_period() - /// @see stc_stats_info_cb() - /// @see stc_get_stats() - /// @see stc_foreach_stats() - int stc_get_total_stats( - stc_h stc, - stc_stats_rule_h rule, - stc_stats_info_cb info_cb, - ffi.Pointer user_data, - ) { - return _stc_get_total_stats( - stc, - rule, - info_cb, - user_data, - ); - } - - late final _stc_get_total_statsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stc_h, stc_stats_rule_h, stc_stats_info_cb, - ffi.Pointer)>>('stc_get_total_stats'); - late final _stc_get_total_stats = _stc_get_total_statsPtr.asFunction< - int Function( - stc_h, stc_stats_rule_h, stc_stats_info_cb, ffi.Pointer)>(); - - /// @brief Creates the statistics rule handle. - /// @since_tizen 4.0 - /// @remarks You must release @a handle using stc_stats_rule_destroy(). - /// - /// @param[in] stc The STC handle - /// @param[out] rule The statistics rule handle - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #STC_ERROR_NONE Successful - /// @retval #STC_ERROR_OPERATION_FAILED General error - /// @retval #STC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STC_ERROR_NOT_INITIALIZED Not initialized - /// @retval #STC_ERROR_NOT_SUPPORTED Not supported - /// - /// @see stc_h - /// @see stc_stats_rule_h - /// @see stc_initialize() - /// @see stc_stats_rule_destroy() - int stc_stats_rule_create( - stc_h stc, - ffi.Pointer rule, - ) { - return _stc_stats_rule_create( - stc, - rule, - ); - } - - late final _stc_stats_rule_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - stc_h, ffi.Pointer)>>('stc_stats_rule_create'); - late final _stc_stats_rule_create = _stc_stats_rule_createPtr - .asFunction)>(); - - /// @brief Destroys the statistics rule handle. - /// @since_tizen 4.0 - /// - /// @param[in] rule The statistics rule handle - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #STC_ERROR_NONE Successful - /// @retval #STC_ERROR_OPERATION_FAILED General error - /// @retval #STC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STC_ERROR_NOT_INITIALIZED Not initialized - /// @retval #STC_ERROR_NOT_SUPPORTED Not supported - /// - /// @see stc_stats_rule_h - /// @see stc_stats_rule_create() - int stc_stats_rule_destroy( - stc_stats_rule_h rule, - ) { - return _stc_stats_rule_destroy( - rule, - ); - } - - late final _stc_stats_rule_destroyPtr = - _lookup>( - 'stc_stats_rule_destroy'); - late final _stc_stats_rule_destroy = - _stc_stats_rule_destroyPtr.asFunction(); - - /// @brief Sets the application ID for statistics rule. - /// @since_tizen 4.0 - /// - /// @param[in] rule The statistics rule handle - /// @param[in] app_id The application ID - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #STC_ERROR_NONE Successful - /// @retval #STC_ERROR_OPERATION_FAILED General error - /// @retval #STC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STC_ERROR_NOT_INITIALIZED Not initialized - /// @retval #STC_ERROR_NOT_SUPPORTED Not supported - /// - /// @see stc_stats_rule_h - /// @see stc_stats_rule_create() - /// @see stc_stats_rule_destroy() - /// @see stc_stats_rule_get_app_id() - int stc_stats_rule_set_app_id( - stc_stats_rule_h rule, - ffi.Pointer app_id, - ) { - return _stc_stats_rule_set_app_id( - rule, - app_id, - ); - } - - late final _stc_stats_rule_set_app_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stc_stats_rule_h, - ffi.Pointer)>>('stc_stats_rule_set_app_id'); - late final _stc_stats_rule_set_app_id = _stc_stats_rule_set_app_idPtr - .asFunction)>(); - - /// @brief Sets the time interval for statistics rule. - /// @since_tizen 4.0 - /// - /// @param[in] rule The statistics rule handle - /// @param[in] from The beginning of the time interval - /// @param[in] to The end of the time interval - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #STC_ERROR_NONE Successful - /// @retval #STC_ERROR_OPERATION_FAILED General error - /// @retval #STC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STC_ERROR_NOT_INITIALIZED Not initialized - /// @retval #STC_ERROR_NOT_SUPPORTED Not supported - /// - /// @see stc_stats_rule_h - /// @see stc_stats_rule_create() - /// @see stc_stats_rule_destroy() - /// @see stc_stats_rule_get_time_interval() - int stc_stats_rule_set_time_interval( - stc_stats_rule_h rule, - int from, - int to, - ) { - return _stc_stats_rule_set_time_interval( - rule, - from, - to, - ); - } - - late final _stc_stats_rule_set_time_intervalPtr = _lookup< - ffi - .NativeFunction>( - 'stc_stats_rule_set_time_interval'); - late final _stc_stats_rule_set_time_interval = - _stc_stats_rule_set_time_intervalPtr - .asFunction(); - - /// @brief Sets the interface type for statistics rule. - /// @since_tizen 4.0 - /// - /// @param[in] rule The stats rule handle - /// @param[in] iface_type The interface type - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #STC_ERROR_NONE Successful - /// @retval #STC_ERROR_OPERATION_FAILED General error - /// @retval #STC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STC_ERROR_NOT_INITIALIZED Not initialized - /// @retval #STC_ERROR_NOT_SUPPORTED Not supported - /// - /// @see stc_stats_rule_h - /// @see stc_iface_type_e - /// @see stc_stats_rule_create() - /// @see stc_stats_rule_destroy() - /// @see stc_stats_rule_get_iface_type() - int stc_stats_rule_set_iface_type( - stc_stats_rule_h rule, - int iface_type, - ) { - return _stc_stats_rule_set_iface_type( - rule, - iface_type, - ); - } - - late final _stc_stats_rule_set_iface_typePtr = _lookup< - ffi.NativeFunction>( - 'stc_stats_rule_set_iface_type'); - late final _stc_stats_rule_set_iface_type = _stc_stats_rule_set_iface_typePtr - .asFunction(); - - /// @brief Sets the time period for statistics rule. - /// @since_tizen 4.0 - /// - /// @param[in] rule The statistics rule handle - /// @param[in] time_period The time period - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #STC_ERROR_NONE Successful - /// @retval #STC_ERROR_OPERATION_FAILED General error - /// @retval #STC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STC_ERROR_NOT_INITIALIZED Not initialized - /// @retval #STC_ERROR_NOT_SUPPORTED Not supported - /// - /// @see stc_stats_rule_h - /// @see stc_time_period_e - /// @see stc_stats_rule_create() - /// @see stc_stats_rule_destroy() - /// @see stc_stats_rule_get_time_period() - int stc_stats_rule_set_time_period( - stc_stats_rule_h rule, - int time_period, - ) { - return _stc_stats_rule_set_time_period( - rule, - time_period, - ); - } - - late final _stc_stats_rule_set_time_periodPtr = _lookup< - ffi.NativeFunction>( - 'stc_stats_rule_set_time_period'); - late final _stc_stats_rule_set_time_period = - _stc_stats_rule_set_time_periodPtr - .asFunction(); - - /// @brief Gets the application ID for statistics rule. - /// @since_tizen 4.0 - /// @remarks You must release @a app_id using free(). - /// - /// @param[in] rule The statistics rule handle - /// @param[out] app_id The application ID - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #STC_ERROR_NONE Successful - /// @retval #STC_ERROR_OPERATION_FAILED General error - /// @retval #STC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STC_ERROR_NOT_INITIALIZED Not initialized - /// @retval #STC_ERROR_NOT_SUPPORTED Not supported - /// - /// @see stc_stats_rule_h - /// @see stc_stats_rule_create() - /// @see stc_stats_rule_destroy() - /// @see stc_stats_rule_set_app_id() - int stc_stats_rule_get_app_id( - stc_stats_rule_h rule, - ffi.Pointer> app_id, - ) { - return _stc_stats_rule_get_app_id( - rule, - app_id, - ); - } - - late final _stc_stats_rule_get_app_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - stc_stats_rule_h, ffi.Pointer>)>>( - 'stc_stats_rule_get_app_id'); - late final _stc_stats_rule_get_app_id = - _stc_stats_rule_get_app_idPtr.asFunction< - int Function(stc_stats_rule_h, ffi.Pointer>)>(); - - /// @brief Gets the time interval for statistics rule. - /// @since_tizen 4.0 - /// - /// @param[in] rule The statistics rule handle - /// @param[out] from The beginning of the time interval - /// @param[out] to The end of the time interval - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #STC_ERROR_NONE Successful - /// @retval #STC_ERROR_OPERATION_FAILED General error - /// @retval #STC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STC_ERROR_NOT_INITIALIZED Not initialized - /// @retval #STC_ERROR_NOT_SUPPORTED Not supported - /// - /// @see stc_stats_rule_h - /// @see stc_stats_rule_create() - /// @see stc_stats_rule_destroy() - /// @see stc_stats_rule_set_time_interval() - int stc_stats_rule_get_time_interval( - stc_stats_rule_h rule, - ffi.Pointer from, - ffi.Pointer to, - ) { - return _stc_stats_rule_get_time_interval( - rule, - from, - to, - ); - } - - late final _stc_stats_rule_get_time_intervalPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stc_stats_rule_h, ffi.Pointer, - ffi.Pointer)>>('stc_stats_rule_get_time_interval'); - late final _stc_stats_rule_get_time_interval = - _stc_stats_rule_get_time_intervalPtr.asFunction< - int Function( - stc_stats_rule_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the interface type for statistics rule. - /// @since_tizen 4.0 - /// - /// @param[in] rule The statistics rule handle - /// @param[out] iface_type The interface type - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #STC_ERROR_NONE Successful - /// @retval #STC_ERROR_OPERATION_FAILED General error - /// @retval #STC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STC_ERROR_NOT_INITIALIZED Not initialized - /// @retval #STC_ERROR_NOT_SUPPORTED Not supported - /// - /// @see stc_stats_rule_h - /// @see stc_iface_type_e - /// @see stc_stats_rule_create() - /// @see stc_stats_rule_destroy() - /// @see stc_stats_rule_set_iface_type() - int stc_stats_rule_get_iface_type( - stc_stats_rule_h rule, - ffi.Pointer iface_type, - ) { - return _stc_stats_rule_get_iface_type( - rule, - iface_type, - ); - } - - late final _stc_stats_rule_get_iface_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stc_stats_rule_h, - ffi.Pointer)>>('stc_stats_rule_get_iface_type'); - late final _stc_stats_rule_get_iface_type = _stc_stats_rule_get_iface_typePtr - .asFunction)>(); - - /// @brief Gets the time period for statistics rule. - /// @since_tizen 4.0 - /// - /// @param[in] rule The statistics rule handle - /// @param[out] time_period The time period - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #STC_ERROR_NONE Successful - /// @retval #STC_ERROR_OPERATION_FAILED General error - /// @retval #STC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STC_ERROR_NOT_INITIALIZED Not initialized - /// @retval #STC_ERROR_NOT_SUPPORTED Not supported - /// - /// @see stc_stats_rule_h - /// @see stc_time_period_e - /// @see stc_stats_rule_create() - /// @see stc_stats_rule_destroy() - /// @see stc_stats_rule_set_time_period() - int stc_stats_rule_get_time_period( - stc_stats_rule_h rule, - ffi.Pointer time_period, - ) { - return _stc_stats_rule_get_time_period( - rule, - time_period, - ); - } - - late final _stc_stats_rule_get_time_periodPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stc_stats_rule_h, - ffi.Pointer)>>('stc_stats_rule_get_time_period'); - late final _stc_stats_rule_get_time_period = - _stc_stats_rule_get_time_periodPtr - .asFunction)>(); - - /// @brief Gets the application ID from statistics information. - /// @since_tizen 4.0 - /// @remarks You must release @a app_id using free(). - /// - /// @param[in] info The statistics information handle - /// @param[out] app_id The application ID - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #STC_ERROR_NONE Successful - /// @retval #STC_ERROR_OPERATION_FAILED General error - /// @retval #STC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STC_ERROR_NOT_INITIALIZED Not initialized - /// @retval #STC_ERROR_NOT_SUPPORTED Not supported - /// - /// @see stc_stats_info_h - /// @see stc_stats_info_cb() - int stc_stats_info_get_app_id( - stc_stats_info_h info, - ffi.Pointer> app_id, - ) { - return _stc_stats_info_get_app_id( - info, - app_id, - ); - } - - late final _stc_stats_info_get_app_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - stc_stats_info_h, ffi.Pointer>)>>( - 'stc_stats_info_get_app_id'); - late final _stc_stats_info_get_app_id = - _stc_stats_info_get_app_idPtr.asFunction< - int Function(stc_stats_info_h, ffi.Pointer>)>(); - - /// @brief Gets the interface name from statistics information. - /// @since_tizen 4.0 - /// @remarks You must release @a iface_name using free(). - /// - /// @param[in] info The statistics information handle - /// @param[out] iface_name The interface name - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #STC_ERROR_NONE Successful - /// @retval #STC_ERROR_OPERATION_FAILED General error - /// @retval #STC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STC_ERROR_NOT_INITIALIZED Not initialized - /// @retval #STC_ERROR_NOT_SUPPORTED Not supported - /// - /// @see stc_stats_info_h - /// @see stc_stats_info_cb() - int stc_stats_info_get_iface_name( - stc_stats_info_h info, - ffi.Pointer> iface_name, - ) { - return _stc_stats_info_get_iface_name( - info, - iface_name, - ); - } - - late final _stc_stats_info_get_iface_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - stc_stats_info_h, ffi.Pointer>)>>( - 'stc_stats_info_get_iface_name'); - late final _stc_stats_info_get_iface_name = - _stc_stats_info_get_iface_namePtr.asFunction< - int Function(stc_stats_info_h, ffi.Pointer>)>(); - - /// @brief Gets the time interval from statistics information. - /// @since_tizen 4.0 - /// - /// @param[in] info The statistics information handle - /// @param[out] from The beginning of the time interval - /// @param[out] to The end of the time interval - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #STC_ERROR_NONE Successful - /// @retval #STC_ERROR_OPERATION_FAILED General error - /// @retval #STC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STC_ERROR_NOT_INITIALIZED Not initialized - /// @retval #STC_ERROR_NOT_SUPPORTED Not supported - /// - /// @see stc_stats_info_h - /// @see stc_stats_info_cb() - int stc_stats_info_get_time_interval( - stc_stats_info_h info, - ffi.Pointer from, - ffi.Pointer to, - ) { - return _stc_stats_info_get_time_interval( - info, - from, - to, - ); - } - - late final _stc_stats_info_get_time_intervalPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stc_stats_info_h, ffi.Pointer, - ffi.Pointer)>>('stc_stats_info_get_time_interval'); - late final _stc_stats_info_get_time_interval = - _stc_stats_info_get_time_intervalPtr.asFunction< - int Function( - stc_stats_info_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the interface type from statistics information. - /// @since_tizen 4.0 - /// - /// @param[in] info The statistics information handle - /// @param[out] iface_type The interface type - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #STC_ERROR_NONE Successful - /// @retval #STC_ERROR_OPERATION_FAILED General error - /// @retval #STC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STC_ERROR_NOT_INITIALIZED Not initialized - /// @retval #STC_ERROR_NOT_SUPPORTED Not supported - /// - /// @see stc_stats_info_h - /// @see stc_iface_type_e - /// @see stc_stats_info_cb() - int stc_stats_info_get_iface_type( - stc_stats_info_h info, - ffi.Pointer iface_type, - ) { - return _stc_stats_info_get_iface_type( - info, - iface_type, - ); - } - - late final _stc_stats_info_get_iface_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stc_stats_info_h, - ffi.Pointer)>>('stc_stats_info_get_iface_type'); - late final _stc_stats_info_get_iface_type = _stc_stats_info_get_iface_typePtr - .asFunction)>(); - - /// @brief Gets the counters from statistics information. - /// @since_tizen 4.0 - /// - /// @param[in] info The statistics information handle - /// @param[out] incoming The incoming counter - /// @param[out] outgoing The outgoing counter - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #STC_ERROR_NONE Successful - /// @retval #STC_ERROR_OPERATION_FAILED General error - /// @retval #STC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STC_ERROR_NOT_INITIALIZED Not initialized - /// @retval #STC_ERROR_NOT_SUPPORTED Not supported - /// - /// @see stc_stats_info_h - /// @see stc_stats_info_cb() - int stc_stats_info_get_counter( - stc_stats_info_h info, - ffi.Pointer incoming, - ffi.Pointer outgoing, - ) { - return _stc_stats_info_get_counter( - info, - incoming, - outgoing, - ); - } - - late final _stc_stats_info_get_counterPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stc_stats_info_h, ffi.Pointer, - ffi.Pointer)>>('stc_stats_info_get_counter'); - late final _stc_stats_info_get_counter = - _stc_stats_info_get_counterPtr.asFunction< - int Function(stc_stats_info_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the roaming type from statistics information. - /// @since_tizen 4.0 - /// - /// @param[in] info The statistics information handle - /// @param[out] roaming_type The roaming type - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #STC_ERROR_NONE Successful - /// @retval #STC_ERROR_OPERATION_FAILED General error - /// @retval #STC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STC_ERROR_NOT_INITIALIZED Not initialized - /// @retval #STC_ERROR_NOT_SUPPORTED Not supported - /// - /// @see stc_stats_info_h - /// @see stc_roaming_type_e - /// @see stc_stats_info_cb() - int stc_stats_info_get_roaming_type( - stc_stats_info_h info, - ffi.Pointer roaming_type, - ) { - return _stc_stats_info_get_roaming_type( - info, - roaming_type, - ); - } - - late final _stc_stats_info_get_roaming_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stc_stats_info_h, - ffi.Pointer)>>('stc_stats_info_get_roaming_type'); - late final _stc_stats_info_get_roaming_type = - _stc_stats_info_get_roaming_typePtr - .asFunction)>(); - - /// @brief Gets the protocol type from statistics information. - /// @since_tizen 4.0 - /// - /// @param[in] info The statistics information handle - /// @param[out] protocol The protocol type - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #STC_ERROR_NONE Successful - /// @retval #STC_ERROR_OPERATION_FAILED General error - /// @retval #STC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STC_ERROR_NOT_INITIALIZED Not initialized - /// @retval #STC_ERROR_NOT_SUPPORTED Not supported - /// - /// @see stc_stats_info_h - /// @see stc_protocol_type_e - /// @see stc_stats_info_cb() - int stc_stats_info_get_protocol_type( - stc_stats_info_h info, - ffi.Pointer protocol, - ) { - return _stc_stats_info_get_protocol_type( - info, - protocol, - ); - } - - late final _stc_stats_info_get_protocol_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stc_stats_info_h, - ffi.Pointer)>>('stc_stats_info_get_protocol_type'); - late final _stc_stats_info_get_protocol_type = - _stc_stats_info_get_protocol_typePtr - .asFunction)>(); - - /// @brief Gets the process state from statistics information. - /// @since_tizen 4.0 - /// - /// @param[in] info The statistics information handle - /// @param[out] state The process state - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #STC_ERROR_NONE Successful - /// @retval #STC_ERROR_OPERATION_FAILED General error - /// @retval #STC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STC_ERROR_INVALID_OPERATION Invalid operation - /// @retval #STC_ERROR_NOT_INITIALIZED Not initialized - /// @retval #STC_ERROR_NOT_SUPPORTED Not supported - /// - /// @see stc_stats_info_h - /// @see stc_process_state_e - /// @see stc_stats_info_cb() - int stc_stats_info_get_process_state( - stc_stats_info_h info, - ffi.Pointer state, - ) { - return _stc_stats_info_get_process_state( - info, - state, - ); - } - - late final _stc_stats_info_get_process_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stc_stats_info_h, - ffi.Pointer)>>('stc_stats_info_get_process_state'); - late final _stc_stats_info_get_process_state = - _stc_stats_info_get_process_statePtr - .asFunction)>(); - - /// @brief Creates the handle for SoftAP. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @remarks The @a softap should be released using softap_destroy(). - /// @param[out] softap A handle of a new mobile ap handle on success - /// @return 0 on success, otherwise a negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_destroy() - int softap_create( - ffi.Pointer softap, - ) { - return _softap_create( - softap, - ); - } - - late final _softap_createPtr = - _lookup)>>( - 'softap_create'); - late final _softap_create = - _softap_createPtr.asFunction)>(); - - /// @brief Destroys the handle for SoftAP. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @param[in] softap The SoftAP handle - /// @return 0 on success, otherwise a negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_create() - int softap_destroy( - softap_h softap, - ) { - return _softap_destroy( - softap, - ); - } - - late final _softap_destroyPtr = - _lookup>('softap_destroy'); - late final _softap_destroy = - _softap_destroyPtr.asFunction(); - - /// @platform - /// @brief Enables the SoftAP, asynchronously. - /// @since_tizen 5.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/softap.admin - /// @param[in] softap The SoftAP handle - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOFTAP_ERROR_RESOURCE_BUSY Device or resource busy - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @post softap_enabled_cb() will be invoked. - /// @see softap_is_enabled() - /// @see softap_disable() - int softap_enable( - softap_h softap, - ) { - return _softap_enable( - softap, - ); - } - - late final _softap_enablePtr = - _lookup>('softap_enable'); - late final _softap_enable = - _softap_enablePtr.asFunction(); - - /// @platform - /// @brief Disables the SoftAP, asynchronously. - /// @since_tizen 5.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/softap.admin - /// @param[in] softap The SoftAP handle - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @post softap_disabled_cb() will be invoked. - /// @see softap_is_enabled() - /// @see softap_enable() - int softap_disable( - softap_h softap, - ) { - return _softap_disable( - softap, - ); - } - - late final _softap_disablePtr = - _lookup>('softap_disable'); - late final _softap_disable = - _softap_disablePtr.asFunction(); - - /// @brief Checks whether the SoftAP is enabled or not. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @param[in] softap The SoftAP handle - /// @param[out] enable @c true if SoftAP is enabled, \n @c false if SoftAP is disabled - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_OPERATION_FAILED Operation failed - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - int softap_is_enabled( - softap_h softap, - ffi.Pointer enable, - ) { - return _softap_is_enabled( - softap, - enable, - ); - } - - late final _softap_is_enabledPtr = _lookup< - ffi - .NativeFunction)>>( - 'softap_is_enabled'); - late final _softap_is_enabled = _softap_is_enabledPtr - .asFunction)>(); - - /// @brief Gets the MAC address of local device as "FC:A1:3E:D6:B1:B1". - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @remarks The @a mac_address should be released using free(). - /// @param[in] softap The SoftAP handle - /// @param[out] mac_address The MAC address - /// @return 0 on success, otherwise a negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SOFTAP_ERROR_OPERATION_FAILED Operation failed - /// @retval #SOFTAP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @pre The SoftAP must be enabled. - /// @see softap_is_enabled() - /// @see softap_enable() - int softap_get_mac_address( - softap_h softap, - ffi.Pointer> mac_address, - ) { - return _softap_get_mac_address( - softap, - mac_address, - ); - } - - late final _softap_get_mac_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(softap_h, - ffi.Pointer>)>>('softap_get_mac_address'); - late final _softap_get_mac_address = _softap_get_mac_addressPtr - .asFunction>)>(); - - /// @brief Gets the name of network interface (e.g. wlan0). - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @remarks The @a interface_name should be released using free(). - /// @param[in] softap The SoftAP handle - /// @param[out] interface_name The name of the network interface - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SOFTAP_ERROR_OPERATION_FAILED Operation failed - /// @retval #SOFTAP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @pre The SoftAP must be enabled. - /// @see softap_is_enabled() - /// @see softap_enable() - int softap_get_network_interface_name( - softap_h softap, - ffi.Pointer> interface_name, - ) { - return _softap_get_network_interface_name( - softap, - interface_name, - ); - } - - late final _softap_get_network_interface_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(softap_h, ffi.Pointer>)>>( - 'softap_get_network_interface_name'); - late final _softap_get_network_interface_name = - _softap_get_network_interface_namePtr.asFunction< - int Function(softap_h, ffi.Pointer>)>(); - - /// @brief Sets the local IP address. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @remarks This change is applied next time SoftAP is enabled. - /// You can use softap_enable() or softap_reload_settings() to enable SoftAP. - /// @param[in] softap The SoftAP handle - /// @param[in] address_family The address family of IP address (currently only #SOFTAP_ADDRESS_FAMILY_IPV4 is supported) - /// @param[in] ip_address The local IP address - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - int softap_set_ip_address( - softap_h softap, - int address_family, - ffi.Pointer ip_address, - ) { - return _softap_set_ip_address( - softap, - address_family, - ip_address, - ); - } - - late final _softap_set_ip_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(softap_h, ffi.Int32, - ffi.Pointer)>>('softap_set_ip_address'); - late final _softap_set_ip_address = _softap_set_ip_addressPtr - .asFunction)>(); - - /// @brief Gets the local IP address. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @remarks The @a ip_address should be released using free(). - /// @param[in] softap The SoftAP handle - /// @param[in] address_family The address family of IP address (currently only #SOFTAP_ADDRESS_FAMILY_IPV4 is supported) - /// @param[out] ip_address The local IP address - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SOFTAP_ERROR_OPERATION_FAILED Operation failed - /// @retval #SOFTAP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @pre The SoftAP must be enabled. - /// @see softap_is_enabled() - /// @see softap_enable() - int softap_get_ip_address( - softap_h softap, - int address_family, - ffi.Pointer> ip_address, - ) { - return _softap_get_ip_address( - softap, - address_family, - ip_address, - ); - } - - late final _softap_get_ip_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(softap_h, ffi.Int32, - ffi.Pointer>)>>('softap_get_ip_address'); - late final _softap_get_ip_address = _softap_get_ip_addressPtr.asFunction< - int Function(softap_h, int, ffi.Pointer>)>(); - - /// @brief Gets the Gateway address. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @remarks The @a gateway_address should be released using free(). - /// @param[in] softap The SoftAP handle - /// @param[in] address_family The address family of IP address (currently only #SOFTAP_ADDRESS_FAMILY_IPV4 is supported) - /// @param[out] gateway_address Gateway address - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SOFTAP_ERROR_OPERATION_FAILED Operation failed - /// @retval #SOFTAP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @pre The SoftAP must be enabled. - /// @see softap_is_enabled() - /// @see softap_enable() - int softap_get_gateway_address( - softap_h softap, - int address_family, - ffi.Pointer> gateway_address, - ) { - return _softap_get_gateway_address( - softap, - address_family, - gateway_address, - ); - } - - late final _softap_get_gateway_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - softap_h, ffi.Int32, ffi.Pointer>)>>( - 'softap_get_gateway_address'); - late final _softap_get_gateway_address = - _softap_get_gateway_addressPtr.asFunction< - int Function(softap_h, int, ffi.Pointer>)>(); - - /// @brief Gets the Subnet Mask. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @remarks The @a subnet_mask should be released using free(). - /// @param[in] softap The SoftAP handle - /// @param[in] address_family The address family of IP address (currently only #SOFTAP_ADDRESS_FAMILY_IPV4 is supported) - /// @param[out] subnet_mask Subnet mask - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SOFTAP_ERROR_OPERATION_FAILED Operation failed - /// @retval #SOFTAP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @pre The SoftAP must be enabled. - /// @see softap_is_enabled() - /// @see softap_enable() - int softap_get_subnet_mask( - softap_h softap, - int address_family, - ffi.Pointer> subnet_mask, - ) { - return _softap_get_subnet_mask( - softap, - address_family, - subnet_mask, - ); - } - - late final _softap_get_subnet_maskPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(softap_h, ffi.Int32, - ffi.Pointer>)>>('softap_get_subnet_mask'); - late final _softap_get_subnet_mask = _softap_get_subnet_maskPtr.asFunction< - int Function(softap_h, int, ffi.Pointer>)>(); - - /// @brief Gets the clients which are connected. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @param[in] softap The SoftAP handle - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_INVALID_OPERATION Invalid operation - /// @retval #SOFTAP_ERROR_OPERATION_FAILED Operation failed - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @pre The SoftAP must be enabled. - /// @see softap_is_enabled() - /// @see softap_enable() - int softap_foreach_connected_clients( - softap_h softap, - softap_connected_client_cb callback, - ffi.Pointer user_data, - ) { - return _softap_foreach_connected_clients( - softap, - callback, - user_data, - ); - } - - late final _softap_foreach_connected_clientsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(softap_h, softap_connected_client_cb, - ffi.Pointer)>>('softap_foreach_connected_clients'); - late final _softap_foreach_connected_clients = - _softap_foreach_connected_clientsPtr.asFunction< - int Function( - softap_h, softap_connected_client_cb, ffi.Pointer)>(); - - /// @brief Sets the callback function, which is called when SoftAP is enabled. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @param[in] softap The SoftAP handle - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_unset_enabled_cb() - int softap_set_enabled_cb( - softap_h softap, - softap_enabled_cb callback, - ffi.Pointer user_data, - ) { - return _softap_set_enabled_cb( - softap, - callback, - user_data, - ); - } - - late final _softap_set_enabled_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(softap_h, softap_enabled_cb, - ffi.Pointer)>>('softap_set_enabled_cb'); - late final _softap_set_enabled_cb = _softap_set_enabled_cbPtr.asFunction< - int Function(softap_h, softap_enabled_cb, ffi.Pointer)>(); - - /// @brief Unsets the callback function, which is called when SoftAP is enabled. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @param[in] softap The SoftAP handle - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_set_enabled_cb() - int softap_unset_enabled_cb( - softap_h softap, - ) { - return _softap_unset_enabled_cb( - softap, - ); - } - - late final _softap_unset_enabled_cbPtr = - _lookup>( - 'softap_unset_enabled_cb'); - late final _softap_unset_enabled_cb = - _softap_unset_enabled_cbPtr.asFunction(); - - /// @brief Sets the callback function called when SoftAP is disabled. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @param[in] softap The SoftAP handle - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_unset_disabled_cb() - int softap_set_disabled_cb( - softap_h softap, - softap_disabled_cb callback, - ffi.Pointer user_data, - ) { - return _softap_set_disabled_cb( - softap, - callback, - user_data, - ); - } - - late final _softap_set_disabled_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(softap_h, softap_disabled_cb, - ffi.Pointer)>>('softap_set_disabled_cb'); - late final _softap_set_disabled_cb = _softap_set_disabled_cbPtr.asFunction< - int Function(softap_h, softap_disabled_cb, ffi.Pointer)>(); - - /// @brief Unsets the callback function, which is called when SoftAP is disabled. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @param[in] softap The SoftAP handle - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_set_disabled_cb() - int softap_unset_disabled_cb( - softap_h softap, - ) { - return _softap_unset_disabled_cb( - softap, - ); - } - - late final _softap_unset_disabled_cbPtr = - _lookup>( - 'softap_unset_disabled_cb'); - late final _softap_unset_disabled_cb = - _softap_unset_disabled_cbPtr.asFunction(); - - /// @brief Sets the callback function, which is called when the state of connection is changed. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @param[in] softap The SoftAP handle - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_unset_client_connection_state_changed_cb() - int softap_set_client_connection_state_changed_cb( - softap_h softap, - softap_client_connection_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _softap_set_client_connection_state_changed_cb( - softap, - callback, - user_data, - ); - } - - late final _softap_set_client_connection_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - softap_h, - softap_client_connection_state_changed_cb, - ffi.Pointer)>>( - 'softap_set_client_connection_state_changed_cb'); - late final _softap_set_client_connection_state_changed_cb = - _softap_set_client_connection_state_changed_cbPtr.asFunction< - int Function(softap_h, softap_client_connection_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback function, which is called when the state of connection is changed. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @param[in] softap The SoftAP handle - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_set_client_connection_state_changed_cb() - int softap_unset_client_connection_state_changed_cb( - softap_h softap, - ) { - return _softap_unset_client_connection_state_changed_cb( - softap, - ); - } - - late final _softap_unset_client_connection_state_changed_cbPtr = - _lookup>( - 'softap_unset_client_connection_state_changed_cb'); - late final _softap_unset_client_connection_state_changed_cb = - _softap_unset_client_connection_state_changed_cbPtr - .asFunction(); - - /// @brief Sets the callback function, which is called when the security type of SoftAP is changed. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @param[in] softap The SoftAP handle - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_unset_security_type_changed_cb() - int softap_set_security_type_changed_cb( - softap_h softap, - softap_security_type_changed_cb callback, - ffi.Pointer user_data, - ) { - return _softap_set_security_type_changed_cb( - softap, - callback, - user_data, - ); - } - - late final _softap_set_security_type_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(softap_h, softap_security_type_changed_cb, - ffi.Pointer)>>('softap_set_security_type_changed_cb'); - late final _softap_set_security_type_changed_cb = - _softap_set_security_type_changed_cbPtr.asFunction< - int Function(softap_h, softap_security_type_changed_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback function, which is called when the security type of SoftAP is changed. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @param[in] softap The SoftAP handle - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_set_security_type_changed_cb() - int softap_unset_security_type_changed_cb( - softap_h softap, - ) { - return _softap_unset_security_type_changed_cb( - softap, - ); - } - - late final _softap_unset_security_type_changed_cbPtr = - _lookup>( - 'softap_unset_security_type_changed_cb'); - late final _softap_unset_security_type_changed_cb = - _softap_unset_security_type_changed_cbPtr - .asFunction(); - - /// @brief Sets the callback function , which is called when the visibility of SSID is changed. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @param[in] softap The SoftAP handle - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_unset_ssid_visibility_changed_cb_cb() - int softap_set_ssid_visibility_changed_cb( - softap_h softap, - softap_ssid_visibility_changed_cb callback, - ffi.Pointer user_data, - ) { - return _softap_set_ssid_visibility_changed_cb( - softap, - callback, - user_data, - ); - } - - late final _softap_set_ssid_visibility_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(softap_h, softap_ssid_visibility_changed_cb, - ffi.Pointer)>>('softap_set_ssid_visibility_changed_cb'); - late final _softap_set_ssid_visibility_changed_cb = - _softap_set_ssid_visibility_changed_cbPtr.asFunction< - int Function(softap_h, softap_ssid_visibility_changed_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback function, which is called when the visibility of SSID is changed. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @param[in] softap The SoftAP handle - /// @return 0 on success, otherwise a negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_wifi_set_ssid_visibility_changed_cb() - int softap_unset_ssid_visibility_changed_cb( - softap_h softap, - ) { - return _softap_unset_ssid_visibility_changed_cb( - softap, - ); - } - - late final _softap_unset_ssid_visibility_changed_cbPtr = - _lookup>( - 'softap_unset_ssid_visibility_changed_cb'); - late final _softap_unset_ssid_visibility_changed_cb = - _softap_unset_ssid_visibility_changed_cbPtr - .asFunction(); - - /// @brief Sets the callback function, which is called when the passphrase of SoftAP is changed. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @param[in] softap The SoftAP handle - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_unset_passphrase_changed_cb() - int softap_set_passphrase_changed_cb( - softap_h softap, - softap_passphrase_changed_cb callback, - ffi.Pointer user_data, - ) { - return _softap_set_passphrase_changed_cb( - softap, - callback, - user_data, - ); - } - - late final _softap_set_passphrase_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(softap_h, softap_passphrase_changed_cb, - ffi.Pointer)>>('softap_set_passphrase_changed_cb'); - late final _softap_set_passphrase_changed_cb = - _softap_set_passphrase_changed_cbPtr.asFunction< - int Function( - softap_h, softap_passphrase_changed_cb, ffi.Pointer)>(); - - /// @brief Unsets the callback function, which is called when the passphrase of SoftAP is changed. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @param[in] softap The SoftAP handle - /// @return 0 on success, otherwise a negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_set_passphrase_changed_cb() - int softap_unset_passphrase_changed_cb( - softap_h softap, - ) { - return _softap_unset_passphrase_changed_cb( - softap, - ); - } - - late final _softap_unset_passphrase_changed_cbPtr = - _lookup>( - 'softap_unset_passphrase_changed_cb'); - late final _softap_unset_passphrase_changed_cb = - _softap_unset_passphrase_changed_cbPtr - .asFunction(); - - /// @brief Sets the security type of SoftAP. - /// @details If security type is not set, WPA2_PSK is used. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @remarks This change is applied next time SoftAP is enabled. \ - /// You can use softap_enable() or softap_reload_settings() to enable SoftAP. - /// @param[in] softap The SoftAP handle - /// @param[in] type The security type - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_OPERATION_FAILED Operation failed - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_get_security_type() - int softap_set_security_type( - softap_h softap, - int type, - ) { - return _softap_set_security_type( - softap, - type, - ); - } - - late final _softap_set_security_typePtr = - _lookup>( - 'softap_set_security_type'); - late final _softap_set_security_type = - _softap_set_security_typePtr.asFunction(); - - /// @brief Gets the security type of SoftAP. - /// @details If security type is not set, WPA2_PSK is used. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @param[in] softap The SoftAP handle - /// @param[out] type The security type - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_set_security_type() - int softap_get_security_type( - softap_h softap, - ffi.Pointer type, - ) { - return _softap_get_security_type( - softap, - type, - ); - } - - late final _softap_get_security_typePtr = _lookup< - ffi - .NativeFunction)>>( - 'softap_get_security_type'); - late final _softap_get_security_type = _softap_get_security_typePtr - .asFunction)>(); - - /// @brief Sets the SSID (service set identifier) for SoftAP. - /// @details The SSID cannot exceed 32 bytes. If SSID is not set, device name is used as SSID. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @remarks This change is applied next time SoftAP is enabled. \n - /// You can use softap_enable() or softap_reload_settings() to enable SoftAP. - /// @param[in] softap The SoftAP handle - /// @param[in] ssid The SSID - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_get_ssid() - int softap_set_ssid( - softap_h softap, - ffi.Pointer ssid, - ) { - return _softap_set_ssid( - softap, - ssid, - ); - } - - late final _softap_set_ssidPtr = _lookup< - ffi - .NativeFunction)>>( - 'softap_set_ssid'); - late final _softap_set_ssid = _softap_set_ssidPtr - .asFunction)>(); - - /// @brief Gets the SSID (service set identifier) for SoftAP. - /// @details If SSID is not set, Device name is used as SSID. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @remarks The @a ssid should be released using free(). - /// @param[in] softap The SoftAP handle - /// @param[out] ssid The SSID - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_set_ssid() - int softap_get_ssid( - softap_h softap, - ffi.Pointer> ssid, - ) { - return _softap_get_ssid( - softap, - ssid, - ); - } - - late final _softap_get_ssidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(softap_h, - ffi.Pointer>)>>('softap_get_ssid'); - late final _softap_get_ssid = _softap_get_ssidPtr - .asFunction>)>(); - - /// @brief Sets the visibility of SSID (service set identifier) for SoftAP. - /// @details If you set the visibility to invisible, then the SSID of this device is hidden and Wi-Fi scan won't find your device. - /// @details By default visibility is set to @c true. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @remarks This change is applied next time SoftAP is enabled. \n - /// You can use softap_enable() or softap_reload_settings() to enable SoftAP. - /// @param[in] softap The SoftAP handle - /// @param[in] visible The visibility of SSID: (@c true = visible, @c false = invisible) - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_OPERATION_FAILED Operation failed - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_get_ssid_visibility() - int softap_set_ssid_visibility( - softap_h softap, - bool visible, - ) { - return _softap_set_ssid_visibility( - softap, - visible, - ); - } - - late final _softap_set_ssid_visibilityPtr = - _lookup>( - 'softap_set_ssid_visibility'); - late final _softap_set_ssid_visibility = - _softap_set_ssid_visibilityPtr.asFunction(); - - /// @brief Gets the visibility of SSID (service set identifier) for SoftAP. - /// @details If the visibility is set to invisible, then the SSID of this device is hidden and Wi-Fi scan won't find your device. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @param[in] softap The SoftAP handle - /// @param[out] visible The visibility of SSID: (@c true = visible, @c false = invisible) - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_set_ssid_visibility() - int softap_get_ssid_visibility( - softap_h softap, - ffi.Pointer visible, - ) { - return _softap_get_ssid_visibility( - softap, - visible, - ); - } - - late final _softap_get_ssid_visibilityPtr = _lookup< - ffi - .NativeFunction)>>( - 'softap_get_ssid_visibility'); - late final _softap_get_ssid_visibility = _softap_get_ssid_visibilityPtr - .asFunction)>(); - - /// @brief Sets the passphrase for SoftAP. - /// @details If the passphrase is not set, random string of 8 characters is used. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @remarks This change is applied next time SoftAP is enabled. \n - /// You can use softap_enable() or softap_reload_settings() to enable SoftAP. - /// @param[in] softap The SoftAP handle - /// @param[in] passphrase The passphrase - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_get_passphrase() - int softap_set_passphrase( - softap_h softap, - ffi.Pointer passphrase, - ) { - return _softap_set_passphrase( - softap, - passphrase, - ); - } - - late final _softap_set_passphrasePtr = _lookup< - ffi - .NativeFunction)>>( - 'softap_set_passphrase'); - late final _softap_set_passphrase = _softap_set_passphrasePtr - .asFunction)>(); - - /// @brief Gets the passphrase for SoftAP. - /// @details If the passphrase is not set, random string of 8 characters will be used. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @remarks The @a passphrase should be released using free(). - /// @param[in] softap The SoftAP handle - /// @param[out] passphrase The passphrase - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_set_passphrase() - int softap_get_passphrase( - softap_h softap, - ffi.Pointer> passphrase, - ) { - return _softap_get_passphrase( - softap, - passphrase, - ); - } - - late final _softap_get_passphrasePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(softap_h, - ffi.Pointer>)>>('softap_get_passphrase'); - late final _softap_get_passphrase = _softap_get_passphrasePtr - .asFunction>)>(); - - /// @platform - /// @brief Reloads the settings (SSID / Passphrase / Security type / SSID visibility) for SoftAP. - /// @since_tizen 5.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/softap.admin - /// @remarks Devices connected via MobileAP will be disconnected when the settings are reloaded. - /// @param[in] softap The SoftAP handle - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_OPERATION_FAILED Operation failed - /// @retval #SOFTAP_ERROR_RESOURCE_BUSY Device or resource busy - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - int softap_reload_settings( - softap_h softap, - softap_settings_reloaded_cb callback, - ffi.Pointer user_data, - ) { - return _softap_reload_settings( - softap, - callback, - user_data, - ); - } - - late final _softap_reload_settingsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(softap_h, softap_settings_reloaded_cb, - ffi.Pointer)>>('softap_reload_settings'); - late final _softap_reload_settings = _softap_reload_settingsPtr.asFunction< - int Function( - softap_h, softap_settings_reloaded_cb, ffi.Pointer)>(); - - /// @brief Pushes the WPS button to connect with SoftAP client(WPS PBC). - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @remarks The WPS button should be pushed when client tries to connect with SoftAP by using WPS PBC. - /// @param[in] softap The SoftAP handle - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_OPERATION_FAILED Operation failed - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - int softap_push_wps_button( - softap_h softap, - ) { - return _softap_push_wps_button( - softap, - ); - } - - late final _softap_push_wps_buttonPtr = - _lookup>( - 'softap_push_wps_button'); - late final _softap_push_wps_button = - _softap_push_wps_buttonPtr.asFunction(); - - /// @brief Sets the WPS PIN to connect with SoftAP client(WPS PIN). - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @remarks The WPS PIN should be inserted when client tries to connect with SoftAP by using WPS PIN. - /// @param[in] softap The SoftAP handle - /// @param[in] wps_pin The WPS PIN - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_OPERATION_FAILED Operation failed - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - int softap_set_wps_pin( - softap_h softap, - ffi.Pointer wps_pin, - ) { - return _softap_set_wps_pin( - softap, - wps_pin, - ); - } - - late final _softap_set_wps_pinPtr = _lookup< - ffi - .NativeFunction)>>( - 'softap_set_wps_pin'); - late final _softap_set_wps_pin = _softap_set_wps_pinPtr - .asFunction)>(); - - /// @brief Sets vendor specific elements for Beacon and Probe Response frames. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @remarks The format for vendor parameter should be a hex dump of the raw information elements. \n - /// This change is applied next time SoftAP is enabled. \n - /// You can use softap_enable() or softap_reload_settings() to enable SoftAP. - /// @param[in] softap The SoftAP handle - /// @param[in] vendor_element The vendor specific elements - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_get_vendor_element() - int softap_set_vendor_element( - softap_h softap, - ffi.Pointer vendor_element, - ) { - return _softap_set_vendor_element( - softap, - vendor_element, - ); - } - - late final _softap_set_vendor_elementPtr = _lookup< - ffi - .NativeFunction)>>( - 'softap_set_vendor_element'); - late final _softap_set_vendor_element = _softap_set_vendor_elementPtr - .asFunction)>(); - - /// @brief Gets vendor specific elements for Beacon and Probe Response frames. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @remarks The format for vendor parameter should be a hex dump of the raw information elements. \n - /// The @a vendor_element should be released using free(). - /// @param[in] softap The SoftAP handle - /// @param[out] vendor_element The vendor specific elements - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_set_vendor_element() - int softap_get_vendor_element( - softap_h softap, - ffi.Pointer> vendor_element, - ) { - return _softap_get_vendor_element( - softap, - vendor_element, - ); - } - - late final _softap_get_vendor_elementPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(softap_h, ffi.Pointer>)>>( - 'softap_get_vendor_element'); - late final _softap_get_vendor_element = _softap_get_vendor_elementPtr - .asFunction>)>(); - - /// @brief Sets the channel for SoftAP. - /// @details If channel is not set, channel 1 is used as default. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @remarks This change is applied next time SoftAP is enabled.\n - /// You can use softap_enable() or softap_reload_settings() to enable SoftAP.\n - /// If @a channel is 0, the channel can be selected automatically at run time.\n - /// (ACS: Automatic Channel Selection) - /// @param[in] softap The SoftAP handle - /// @param[in] channel The channel number - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_get_channel() - int softap_set_channel( - softap_h softap, - int channel, - ) { - return _softap_set_channel( - softap, - channel, - ); - } - - late final _softap_set_channelPtr = - _lookup>( - 'softap_set_channel'); - late final _softap_set_channel = - _softap_set_channelPtr.asFunction(); - - /// @brief Gets the channel for SoftAP. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @param[in] softap The SoftAP handle - /// @param[out] channel The channel number - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_set_channel() - int softap_get_channel( - softap_h softap, - ffi.Pointer channel, - ) { - return _softap_get_channel( - softap, - channel, - ); - } - - late final _softap_get_channelPtr = _lookup< - ffi.NativeFunction)>>( - 'softap_get_channel'); - late final _softap_get_channel = _softap_get_channelPtr - .asFunction)>(); - - /// @brief Enables the DHCP server. - /// @details Enable/disable the DHCP server. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @param[in] softap The SoftAP handle - /// @return 0 on success, otherwise negative error value. - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_disable_dhcp() - int softap_enable_dhcp( - softap_h softap, - ) { - return _softap_enable_dhcp( - softap, - ); - } - - late final _softap_enable_dhcpPtr = - _lookup>( - 'softap_enable_dhcp'); - late final _softap_enable_dhcp = - _softap_enable_dhcpPtr.asFunction(); - - /// @brief Disables the DHCP server. - /// @details Enable/disable the DHCP server. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @param[in] softap The SoftAP handle - /// @return 0 on success, otherwise negative error value. - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_enable_dhcp() - /// @see softap_enable_dhcp_with_range() - int softap_disable_dhcp( - softap_h softap, - ) { - return _softap_disable_dhcp( - softap, - ); - } - - late final _softap_disable_dhcpPtr = - _lookup>( - 'softap_disable_dhcp'); - late final _softap_disable_dhcp = - _softap_disable_dhcpPtr.asFunction(); - - /// @brief Checks whether the DHCP is enabled or not. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @param[in] softap The SoftAP handle - /// @param[out] dhcp_enabled @c true if DHCP is enabled, \n @c false if DHCP is disabled - /// @return 0 on success, otherwise a negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - int softap_is_dhcp_enabled( - softap_h softap, - ffi.Pointer dhcp_enabled, - ) { - return _softap_is_dhcp_enabled( - softap, - dhcp_enabled, - ); - } - - late final _softap_is_dhcp_enabledPtr = _lookup< - ffi - .NativeFunction)>>( - 'softap_is_dhcp_enabled'); - late final _softap_is_dhcp_enabled = _softap_is_dhcp_enabledPtr - .asFunction)>(); - - /// @brief Enables the DHCP server with the address range. - /// @details Enable the DHCP server with the address range. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @param[in] softap The handle of softap - /// @param[in] rangestart Start address range - /// @param[in] rangestop End address range - /// @return 0 on success, otherwise negative error value. - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_disable_dhcp() - int softap_enable_dhcp_with_range( - softap_h softap, - ffi.Pointer rangestart, - ffi.Pointer rangestop, - ) { - return _softap_enable_dhcp_with_range( - softap, - rangestart, - rangestop, - ); - } - - late final _softap_enable_dhcp_with_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(softap_h, ffi.Pointer, - ffi.Pointer)>>('softap_enable_dhcp_with_range'); - late final _softap_enable_dhcp_with_range = - _softap_enable_dhcp_with_rangePtr.asFunction< - int Function( - softap_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the wireless mode for SoftAP. - /// @details If wireless mode is not set, IEEE 802.11g is used as default. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @param[in] softap The SoftAP handle - /// @param[in] mode The mode - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_get_mode() - int softap_set_mode( - softap_h softap, - int mode, - ) { - return _softap_set_mode( - softap, - mode, - ); - } - - late final _softap_set_modePtr = - _lookup>( - 'softap_set_mode'); - late final _softap_set_mode = - _softap_set_modePtr.asFunction(); - - /// @brief Gets the wireless mode for SoftAP. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @param[in] softap The SoftAP handle - /// @param[out] mode The wireless mode - /// @return 0 on success, otherwise negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_set_mode() - int softap_get_mode( - softap_h softap, - ffi.Pointer mode, - ) { - return _softap_get_mode( - softap, - mode, - ); - } - - late final _softap_get_modePtr = _lookup< - ffi - .NativeFunction)>>( - 'softap_get_mode'); - late final _softap_get_mode = _softap_get_modePtr - .asFunction)>(); - - /// @brief Clones the handle of a client. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @remarks The @a dest should be released using softap_client_destroy(). - /// @param[out] dest The cloned client handle - /// @param[in] origin The origin client handle - /// @return 0 on success, otherwise a negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_client_destroy() - int softap_client_clone( - ffi.Pointer dest, - softap_client_h origin, - ) { - return _softap_client_clone( - dest, - origin, - ); - } - - late final _softap_client_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - softap_client_h)>>('softap_client_clone'); - late final _softap_client_clone = _softap_client_clonePtr.asFunction< - int Function(ffi.Pointer, softap_client_h)>(); - - /// @brief Destroys the handle of a client. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @param[in] client The client handle - /// @return 0 on success, otherwise a negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_client_clone() - int softap_client_destroy( - softap_client_h client, - ) { - return _softap_client_destroy( - client, - ); - } - - late final _softap_client_destroyPtr = - _lookup>( - 'softap_client_destroy'); - late final _softap_client_destroy = - _softap_client_destroyPtr.asFunction(); - - /// @brief Gets the name of a client. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @remarks The @a name should be released using free(). - /// @param[in] client The client handle - /// @param[out] name The name of the client - /// @return 0 on success, otherwise a negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_client_connection_state_changed_cb() - int softap_client_get_name( - softap_client_h client, - ffi.Pointer> name, - ) { - return _softap_client_get_name( - client, - name, - ); - } - - late final _softap_client_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(softap_client_h, - ffi.Pointer>)>>('softap_client_get_name'); - late final _softap_client_get_name = _softap_client_get_namePtr.asFunction< - int Function(softap_client_h, ffi.Pointer>)>(); - - /// @brief Gets the IP address of a client. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @remarks The @a ip_address should be released using free(). - /// @param[in] client The client handle - /// @param[in] address_family The address family of IP address. Currently, #SOFTAP_ADDRESS_FAMILY_IPV4 is only supported - /// @param[out] ip_address The IP address - /// @return 0 on success, otherwise a negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_client_connection_state_changed_cb() - int softap_client_get_ip_address( - softap_client_h client, - int address_family, - ffi.Pointer> ip_address, - ) { - return _softap_client_get_ip_address( - client, - address_family, - ip_address, - ); - } - - late final _softap_client_get_ip_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(softap_client_h, ffi.Int32, - ffi.Pointer>)>>( - 'softap_client_get_ip_address'); - late final _softap_client_get_ip_address = - _softap_client_get_ip_addressPtr.asFunction< - int Function( - softap_client_h, int, ffi.Pointer>)>(); - - /// @brief Gets the MAC address of a client. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @remarks The @a mac_address should be released using free(). - /// @param[in] client The client handle - /// @param[out] mac_address The MAC address - /// @return 0 on success, otherwise a negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_client_connection_state_changed_cb() - int softap_client_get_mac_address( - softap_client_h client, - ffi.Pointer> mac_address, - ) { - return _softap_client_get_mac_address( - client, - mac_address, - ); - } - - late final _softap_client_get_mac_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - softap_client_h, ffi.Pointer>)>>( - 'softap_client_get_mac_address'); - late final _softap_client_get_mac_address = - _softap_client_get_mac_addressPtr.asFunction< - int Function(softap_client_h, ffi.Pointer>)>(); - - /// @brief Gets the connection time of a client. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/softap - /// @param[in] client The client handle - /// @param[out] timestamp The connected time of the client - /// @return 0 on success, otherwise a negative error value - /// @retval #SOFTAP_ERROR_NONE Successful - /// @retval #SOFTAP_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SOFTAP_ERROR_NOT_SUPPORTED API is not supported - /// @retval #SOFTAP_ERROR_PERMISSION_DENIED Permission denied - /// @see softap_client_connection_state_changed_cb() - int softap_client_get_time( - softap_client_h client, - ffi.Pointer timestamp, - ) { - return _softap_client_get_time( - client, - timestamp, - ); - } - - late final _softap_client_get_timePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - softap_client_h, ffi.Pointer)>>('softap_client_get_time'); - late final _softap_client_get_time = _softap_client_get_timePtr - .asFunction)>(); - - /// @brief Initializes VPN interface. - /// @details You should call vpnsvc_get_iface_name() for checking the actual initialized VPN interface name. (In case of duplicated interface name) - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/vpnservice \n - /// %http://tizen.org/privilege/internet - /// @remarks The @a handle should be released using vpnsvc_deinit(). - /// @param[in] iface_name The VPN interface name - /// @param[out] handle The VPN interface handle - /// @return 0 on success. otherwise, a negative error value. - /// @retval #VPNSVC_ERROR_NONE Success - /// @retval #VPNSVC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VPNSVC_ERROR_IO_ERROR I/O Error (e.g. socket I/O error) - /// @retval #VPNSVC_ERROR_IPC_FAILED Cannot connect to service daemon - /// @retval #VPNSVC_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #VPNSVC_ERROR_NOT_SUPPORTED Not Supported - /// @post Please call vpnsvc_deinit() if you want to de-initialize VPN interface. - /// @post Please call vpnsvc_get_iface_fd() if you want to know the fd(file descriptor) of VPN interface. - /// @post Please call vpnsvc_get_iface_index() if you want to know the index of VPN interface. - /// @post Please call vpnsvc_get_iface_name() if you want to know the name of VPN interface. - /// @see vpnsvc_deinit() - /// @see vpnsvc_get_iface_fd() - /// @see vpnsvc_get_iface_index() - /// @see vpnsvc_get_iface_name() - int vpnsvc_init( - ffi.Pointer iface_name, - ffi.Pointer handle, - ) { - return _vpnsvc_init( - iface_name, - handle, - ); - } - - late final _vpnsvc_initPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('vpnsvc_init'); - late final _vpnsvc_init = _vpnsvc_initPtr - .asFunction, ffi.Pointer)>(); - - /// @brief De-Initializes VPN interface. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/vpnservice \n - /// %http://tizen.org/privilege/internet - /// @param[in] handle The VPN interface handle - /// @return 0 on success. otherwise, a negative error value. - /// @retval #VPNSVC_ERROR_NONE Success - /// @retval #VPNSVC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VPNSVC_ERROR_IPC_FAILED Cannot connect to service daemon - /// @retval #VPNSVC_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #VPNSVC_ERROR_NOT_SUPPORTED Not Supported - /// @pre Before calling this function, VPN interface should be initialized already. - /// @see vpnsvc_init() - int vpnsvc_deinit( - vpnsvc_h handle, - ) { - return _vpnsvc_deinit( - handle, - ); - } - - late final _vpnsvc_deinitPtr = - _lookup>('vpnsvc_deinit'); - late final _vpnsvc_deinit = - _vpnsvc_deinitPtr.asFunction(); - - /// @brief Protect a socket from VPN connections. - /// @details After protecting, data sent through this socket will go directly to the underlying network. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/vpnservice \n - /// %http://tizen.org/privilege/internet - /// @param[in] handle The VPN interface handle - /// @param[in] socket_fd The opened socket file descriptor - /// @param[in] iface_name The network interface name (e.g., interface name such as eth0, ppp0, etc) through which the VPN is working - /// @return 0 on success. otherwise, a negative error value. - /// @retval #VPNSVC_ERROR_NONE Success - /// @retval #VPNSVC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VPNSVC_ERROR_IO_ERROR I/O Error (e.g. socket I/O error) - /// @retval #VPNSVC_ERROR_IPC_FAILED Cannot connect to service daemon - /// @retval #VPNSVC_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #VPNSVC_ERROR_NOT_SUPPORTED Not Supported - int vpnsvc_protect( - vpnsvc_h handle, - int socket_fd, - ffi.Pointer iface_name, - ) { - return _vpnsvc_protect( - handle, - socket_fd, - iface_name, - ); - } - - late final _vpnsvc_protectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - vpnsvc_h, ffi.Int, ffi.Pointer)>>('vpnsvc_protect'); - late final _vpnsvc_protect = _vpnsvc_protectPtr - .asFunction)>(); - - /// @brief Waits for the read event on VPN interface descriptor, but no more than the indicated timeout in milliseconds. - /// @since_tizen 3.0 - /// @param[in] handle The VPN interface handle - /// @param[in] timeout_ms The value of timeout (milliseconds) - /// @return 0 on success. otherwise, a negative error value. - /// @retval #VPNSVC_ERROR_NONE Success - /// @retval #VPNSVC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VPNSVC_ERROR_IO_ERROR I/O Error (e.g. socket I/O error) - /// @retval #VPNSVC_ERROR_TIMEOUT Timeout (no answer in timeout_ms) - /// @retval #VPNSVC_ERROR_NOT_SUPPORTED Not Supported - /// @pre The VPN interface should be initialized already. - /// @see vpnsvc_init() - int vpnsvc_read( - vpnsvc_h handle, - int timeout_ms, - ) { - return _vpnsvc_read( - handle, - timeout_ms, - ); - } - - late final _vpnsvc_readPtr = - _lookup>( - 'vpnsvc_read'); - late final _vpnsvc_read = - _vpnsvc_readPtr.asFunction(); - - /// @brief Writes the data supplied into the VPN interface. - /// @since_tizen 3.0 - /// @param[in] handle The VPN interface handle - /// @param[in] data Data writing to VPN interface - /// @param[in] size The size of data - /// @return On success, the number of bytes written is returned (zero indicates nothing was written). Otherwise, a negative error value. - /// @retval #VPNSVC_ERROR_NONE Success - /// @retval #VPNSVC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VPNSVC_ERROR_NOT_SUPPORTED Not Supported - /// @retval In case of negative error, please refer to standard posix write API's error code. - /// @pre The VPN interface should be initialized already. - /// @see vpnsvc_init() - int vpnsvc_write( - vpnsvc_h handle, - ffi.Pointer data, - int size, - ) { - return _vpnsvc_write( - handle, - data, - size, - ); - } - - late final _vpnsvc_writePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - vpnsvc_h, ffi.Pointer, ffi.Size)>>('vpnsvc_write'); - late final _vpnsvc_write = _vpnsvc_writePtr - .asFunction, int)>(); - - /// @brief Blocks all traffics except specified allowing networks. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/vpnservice \n - /// %http://tizen.org/privilege/internet - /// @param[in] handle The VPN interface handle - /// @param[in] routes_dest_vpn_addr Destination address of the routes, the list of allowing networks over VPN interface (e.g., VPN interface such as tun0, etc). - /// @param[in] routes_vpn_prefix The prefix of VPN interface, netmask length (also called a prefix, e.g. 8, 16, 24, 32). - /// @param[in] num_allow_routes_vpn The number of allowing networks over VPN interface - /// @param[in] routes_dest_orig_addr Destination address of the routes, the list of allowing networks over the original interface (e.g., original interface such as eth0, wlan0, etc). - /// @param[in] routes_orig_prefix The prefix of Original interface, netmask length (also called a prefix, e.g. 8, 16, 24, 32). - /// @param[in] num_allow_routes_orig The number of allowing networks over the original interface - /// @return 0 on success. otherwise, a negative error value. - /// @retval #VPNSVC_ERROR_NONE Success - /// @retval #VPNSVC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VPNSVC_ERROR_IPC_FAILED Cannot connect to service daemon - /// @retval #VPNSVC_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #VPNSVC_ERROR_NOT_SUPPORTED Not Supported - /// @post Please call vpnsvc_unblock_networks() if you want to allow all traffics. - /// @see vpnsvc_unblock_networks() - int vpnsvc_block_networks( - vpnsvc_h handle, - ffi.Pointer> routes_dest_vpn_addr, - ffi.Pointer routes_vpn_prefix, - int num_allow_routes_vpn, - ffi.Pointer> routes_dest_orig_addr, - ffi.Pointer routes_orig_prefix, - int num_allow_routes_orig, - ) { - return _vpnsvc_block_networks( - handle, - routes_dest_vpn_addr, - routes_vpn_prefix, - num_allow_routes_vpn, - routes_dest_orig_addr, - routes_orig_prefix, - num_allow_routes_orig, - ); - } - - late final _vpnsvc_block_networksPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - vpnsvc_h, - ffi.Pointer>, - ffi.Pointer, - ffi.Size, - ffi.Pointer>, - ffi.Pointer, - ffi.Size)>>('vpnsvc_block_networks'); - late final _vpnsvc_block_networks = _vpnsvc_block_networksPtr.asFunction< - int Function( - vpnsvc_h, - ffi.Pointer>, - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer, - int)>(); - - /// @brief Removes any restrictions imposed by vpnsvc_block_networks(). - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/vpnservice \n - /// %http://tizen.org/privilege/internet - /// @param[in] handle The VPN interface handle - /// @return 0 on success. otherwise, a negative error value. - /// @retval #VPNSVC_ERROR_NONE Success - /// @retval #VPNSVC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VPNSVC_ERROR_IPC_FAILED Cannot connect to service daemon - /// @retval #VPNSVC_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #VPNSVC_ERROR_NOT_SUPPORTED Not Supported - int vpnsvc_unblock_networks( - vpnsvc_h handle, - ) { - return _vpnsvc_unblock_networks( - handle, - ); - } - - late final _vpnsvc_unblock_networksPtr = - _lookup>( - 'vpnsvc_unblock_networks'); - late final _vpnsvc_unblock_networks = - _vpnsvc_unblock_networksPtr.asFunction(); - - /// @brief Updates settings (Local IP / Remote IP / MTU). - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/vpnservice - /// @param[in] handle The VPN interface handle - /// @return 0 on success. Otherwise, a negative error value. - /// @retval #VPNSVC_ERROR_NONE Success - /// @retval #VPNSVC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VPNSVC_ERROR_IPC_FAILED Cannot connect to service daemon - /// @retval #VPNSVC_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #VPNSVC_ERROR_NOT_SUPPORTED Not Supported - /// @pre The VPN interface should be initialized already. - /// @see vpnsvc_init() - int vpnsvc_update_settings( - vpnsvc_h handle, - ) { - return _vpnsvc_update_settings( - handle, - ); - } - - late final _vpnsvc_update_settingsPtr = - _lookup>( - 'vpnsvc_update_settings'); - late final _vpnsvc_update_settings = - _vpnsvc_update_settingsPtr.asFunction(); - - /// @brief Gets the fd of the VPN interface. - /// @since_tizen 3.0 - /// @param[in] handle The VPN interface handle - /// @param[out] iface_fd The vpn interface fd - /// @return The fd value of VPN interface. Otherwise, a negative error value. - /// @retval #VPNSVC_ERROR_NONE Success - /// @retval #VPNSVC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VPNSVC_ERROR_NOT_SUPPORTED Not Supported - int vpnsvc_get_iface_fd( - vpnsvc_h handle, - ffi.Pointer iface_fd, - ) { - return _vpnsvc_get_iface_fd( - handle, - iface_fd, - ); - } - - late final _vpnsvc_get_iface_fdPtr = _lookup< - ffi.NativeFunction)>>( - 'vpnsvc_get_iface_fd'); - late final _vpnsvc_get_iface_fd = _vpnsvc_get_iface_fdPtr - .asFunction)>(); - - /// @brief Gets the index of VPN interface. - /// @since_tizen 3.0 - /// @param[in] handle The VPN interface handle - /// @param[out] iface_index The VPN interface index - /// @return The index of the VPN interface. otherwise, a negative error value. - /// @retval #VPNSVC_ERROR_NONE Success - /// @retval #VPNSVC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VPNSVC_ERROR_NOT_SUPPORTED Not Supported - /// @pre Before calling this function, VPN interface should be initialized already. - /// @see vpnsvc_init() - int vpnsvc_get_iface_index( - vpnsvc_h handle, - ffi.Pointer iface_index, - ) { - return _vpnsvc_get_iface_index( - handle, - iface_index, - ); - } - - late final _vpnsvc_get_iface_indexPtr = _lookup< - ffi.NativeFunction)>>( - 'vpnsvc_get_iface_index'); - late final _vpnsvc_get_iface_index = _vpnsvc_get_iface_indexPtr - .asFunction)>(); - - /// @brief Gets the name of VPN interface. - /// @since_tizen 3.0 - /// @remarks The @a iface_name should be released using free() - /// @param[in] handle The VPN interface handle - /// @param[out] iface_name The name of VPN interface name - /// @return 0 on success. Otherwise, a negative error value. - /// @retval #VPNSVC_ERROR_NONE Success - /// @retval #VPNSVC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VPNSVC_ERROR_NOT_SUPPORTED Not Supported - /// @pre Before calling this function, VPN interface should be initialized already. - /// @see vpnsvc_init() - int vpnsvc_get_iface_name( - vpnsvc_h handle, - ffi.Pointer> iface_name, - ) { - return _vpnsvc_get_iface_name( - handle, - iface_name, - ); - } - - late final _vpnsvc_get_iface_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(vpnsvc_h, - ffi.Pointer>)>>('vpnsvc_get_iface_name'); - late final _vpnsvc_get_iface_name = _vpnsvc_get_iface_namePtr - .asFunction>)>(); - - /// @brief Sets the MTU of the VPN interface. - /// @since_tizen 3.0 - /// @remarks vpnsvc_update_settings() should be invoked after setting MTU. - /// @param[in] handle The VPN interface handle - /// @param[in] mtu The MTU (Maximum Transmission Unit) value to be set for VPN interface. Default MTU size is 1500. - /// @return 0 on success. Otherwise, a negative error value. - /// @retval #VPNSVC_ERROR_NONE Success - /// @retval #VPNSVC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VPNSVC_ERROR_IO_ERROR I/O Error (e.g. socket I/O error) - /// @retval #VPNSVC_ERROR_NOT_SUPPORTED Not Supported - /// @pre Before calling this function, VPN interface should be initialized already. - /// @see vpnsvc_init() - int vpnsvc_set_mtu( - vpnsvc_h handle, - int mtu, - ) { - return _vpnsvc_set_mtu( - handle, - mtu, - ); - } - - late final _vpnsvc_set_mtuPtr = - _lookup>( - 'vpnsvc_set_mtu'); - late final _vpnsvc_set_mtu = - _vpnsvc_set_mtuPtr.asFunction(); - - /// @brief Sets blocking mode of the file descriptor of VPN interface. - /// @since_tizen 3.0 - /// @param[in] handle The VPN interface handle - /// @param[in] blocking The blocking mode flag; True = BLOCKING, False = NON_BLOCKING (Default : BLOCKING) - /// @return 0 on success. Otherwise, a negative error value. - /// @retval #VPNSVC_ERROR_NONE Success - /// @retval #VPNSVC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VPNSVC_ERROR_IO_ERROR Failed to set the blocking flags - /// @retval #VPNSVC_ERROR_NOT_SUPPORTED Not Supported - /// @pre Before calling this function, VPN interface should be initialized already. - /// @see vpnsvc_init() - int vpnsvc_set_blocking( - vpnsvc_h handle, - bool blocking, - ) { - return _vpnsvc_set_blocking( - handle, - blocking, - ); - } - - late final _vpnsvc_set_blockingPtr = - _lookup>( - 'vpnsvc_set_blocking'); - late final _vpnsvc_set_blocking = - _vpnsvc_set_blockingPtr.asFunction(); - - /// @brief Sets the session name for the VPN. (It will be displayed in system-managed dialogs and notifications.) - /// @since_tizen 3.0 - /// @param[in] handle The VPN interface handle - /// @param[in] session The Session Name - /// @return 0 on success. Otherwise, a negative error value. - /// @retval #VPNSVC_ERROR_NONE Success - /// @retval #VPNSVC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VPNSVC_ERROR_NOT_SUPPORTED Not Supported - /// @pre Before calling this function, VPN interface should be initialized already. - /// @see vpnsvc_init() - int vpnsvc_set_session( - vpnsvc_h handle, - ffi.Pointer session, - ) { - return _vpnsvc_set_session( - handle, - session, - ); - } - - late final _vpnsvc_set_sessionPtr = _lookup< - ffi - .NativeFunction)>>( - 'vpnsvc_set_session'); - late final _vpnsvc_set_session = _vpnsvc_set_sessionPtr - .asFunction)>(); - - /// @brief Gets the session name for the VPN. - /// @since_tizen 3.0 - /// @remarks The @a session should be released using free() - /// @param[in] handle The VPN interface handle - /// @param[out] session The Session Name returned - /// @return 0 on success. Otherwise, a negative error value. - /// @retval #VPNSVC_ERROR_NONE Success - /// @retval #VPNSVC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VPNSVC_ERROR_NOT_SUPPORTED Not Supported - /// @pre Before calling this function, VPN interface should be initialized already. - /// @see vpnsvc_init() - int vpnsvc_get_session( - vpnsvc_h handle, - ffi.Pointer> session, - ) { - return _vpnsvc_get_session( - handle, - session, - ); - } - - late final _vpnsvc_get_sessionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(vpnsvc_h, - ffi.Pointer>)>>('vpnsvc_get_session'); - late final _vpnsvc_get_session = _vpnsvc_get_sessionPtr - .asFunction>)>(); - - /// @brief Sets the VPN client IP address. - /// @since_tizen 3.0 - /// @remarks The local address should be set before enabling VPN interface. \n - /// vpnsvc_update_settings() should be invoked after setting local IP address. - /// @param[in] handle The VPN interface handle - /// @param[in] local_ip The local (VPN client) IP address (IPv4 only) - /// - /// @return 0 on success. Otherwise, a negative error value. - /// @retval #VPNSVC_ERROR_NONE Success - /// @retval #VPNSVC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VPNSVC_ERROR_IO_ERROR I/O Error (e.g. socket I/O error) - /// @retval #VPNSVC_ERROR_NOT_SUPPORTED Not Supported - /// @pre The VPN interface should be initialized already. - /// @see vpnsvc_init() - int vpnsvc_set_local_ip_address( - vpnsvc_h handle, - ffi.Pointer local_ip, - ) { - return _vpnsvc_set_local_ip_address( - handle, - local_ip, - ); - } - - late final _vpnsvc_set_local_ip_addressPtr = _lookup< - ffi - .NativeFunction)>>( - 'vpnsvc_set_local_ip_address'); - late final _vpnsvc_set_local_ip_address = _vpnsvc_set_local_ip_addressPtr - .asFunction)>(); - - /// @brief Sets the VPN server IP address. - /// @since_tizen 3.0 - /// @remarks The remote address should be set before enabling VPN interface. \n - /// vpnsvc_update_settings() should be invoked after setting remote IP address. - /// @param[in] handle The VPN interface handle - /// @param[in] remote_ip The remote (VPN server) IP address (IPv4 only) - /// @return 0 on success. Otherwise, a negative error value. - /// @retval #VPNSVC_ERROR_NONE Success - /// @retval #VPNSVC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VPNSVC_ERROR_IO_ERROR I/O Error (e.g. socket I/O error) - /// @retval #VPNSVC_ERROR_NOT_SUPPORTED Not Supported - /// @pre The VPN interface should be initialized already. - /// @see vpnsvc_init() - int vpnsvc_set_remote_ip_address( - vpnsvc_h handle, - ffi.Pointer remote_ip, - ) { - return _vpnsvc_set_remote_ip_address( - handle, - remote_ip, - ); - } - - late final _vpnsvc_set_remote_ip_addressPtr = _lookup< - ffi - .NativeFunction)>>( - 'vpnsvc_set_remote_ip_address'); - late final _vpnsvc_set_remote_ip_address = _vpnsvc_set_remote_ip_addressPtr - .asFunction)>(); - - /// @brief Adds the route address. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/vpnservice - /// @remarks The route address should be set after enabling VPN interface. - /// @param[in] handle The VPN interface handle - /// @param[in] route_address Destination address of the routes (IPv4 only) - /// @param[in] prefix The prefix of routes, netmask length (also called a prefix, e.g. 8, 16, 24, 32) - /// @return 0 on success. Otherwise, a negative error value. - /// @retval #VPNSVC_ERROR_NONE Success - /// @retval #VPNSVC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VPNSVC_ERROR_IO_ERROR I/O Error (e.g. socket I/O error) - /// @retval #VPNSVC_ERROR_NOT_SUPPORTED Not Supported - /// @pre The VPN interface should be initialized already. - /// @see vpnsvc_init() - int vpnsvc_add_route( - vpnsvc_h handle, - ffi.Pointer route_address, - int prefix, - ) { - return _vpnsvc_add_route( - handle, - route_address, - prefix, - ); - } - - late final _vpnsvc_add_routePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - vpnsvc_h, ffi.Pointer, ffi.Int)>>('vpnsvc_add_route'); - late final _vpnsvc_add_route = _vpnsvc_add_routePtr - .asFunction, int)>(); - - /// @brief Removes the route address. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/vpnservice - /// @param[in] handle The VPN interface handle - /// @param[in] route_address Destination address of the routes (IPv4 only) - /// @param[in] prefix The prefix of routes, netmask length (also called a prefix, e.g. 8, 16, 24, 32) - /// @return 0 on success. Otherwise, a negative error value. - /// @retval #VPNSVC_ERROR_NONE Success - /// @retval #VPNSVC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VPNSVC_ERROR_IO_ERROR I/O Error (e.g. socket I/O error) - /// @retval #VPNSVC_ERROR_NOT_SUPPORTED Not Supported - /// @pre The VPN interface should be initialized already. - /// @see vpnsvc_init() - int vpnsvc_remove_route( - vpnsvc_h handle, - ffi.Pointer route_address, - int prefix, - ) { - return _vpnsvc_remove_route( - handle, - route_address, - prefix, - ); - } - - late final _vpnsvc_remove_routePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(vpnsvc_h, ffi.Pointer, - ffi.Int)>>('vpnsvc_remove_route'); - late final _vpnsvc_remove_route = _vpnsvc_remove_routePtr - .asFunction, int)>(); - - /// @brief Adds the DNS server name. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/vpnservice - /// @remarks The dns address should be set after enabling VPN interface. - /// @param[in] handle The VPN interface handle - /// @param[in] dns_server The DNS server address (IPv4 only) - /// @return 0 on success. Otherwise, a negative error value. - /// @retval #VPNSVC_ERROR_NONE Success - /// @retval #VPNSVC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VPNSVC_ERROR_IO_ERROR I/O Error (e.g. socket I/O error) - /// @retval #VPNSVC_ERROR_NOT_SUPPORTED Not Supported - /// @pre The VPN interface should be initialized already. - /// @see vpnsvc_init() - int vpnsvc_add_dns_server( - vpnsvc_h handle, - ffi.Pointer dns_server, - ) { - return _vpnsvc_add_dns_server( - handle, - dns_server, - ); - } - - late final _vpnsvc_add_dns_serverPtr = _lookup< - ffi - .NativeFunction)>>( - 'vpnsvc_add_dns_server'); - late final _vpnsvc_add_dns_server = _vpnsvc_add_dns_serverPtr - .asFunction)>(); - - /// @brief Removes the DNS server name. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/vpnservice - /// @param[in] handle The VPN interface handle - /// @param[in] dns_server The DNS server address (IPv4 only) - /// @return 0 on success. Otherwise, a negative error value. - /// @retval #VPNSVC_ERROR_NONE Success - /// @retval #VPNSVC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VPNSVC_ERROR_IO_ERROR I/O Error (e.g. socket I/O error) - /// @retval #VPNSVC_ERROR_NOT_SUPPORTED Not Supported - /// @pre The VPN interface should be initialized already. - /// @see vpnsvc_init() - int vpnsvc_remove_dns_server( - vpnsvc_h handle, - ffi.Pointer dns_server, - ) { - return _vpnsvc_remove_dns_server( - handle, - dns_server, - ); - } - - late final _vpnsvc_remove_dns_serverPtr = _lookup< - ffi - .NativeFunction)>>( - 'vpnsvc_remove_dns_server'); - late final _vpnsvc_remove_dns_server = _vpnsvc_remove_dns_serverPtr - .asFunction)>(); - - /// @brief Initializes Wi-Fi. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @remarks You must release @a wifi using wifi_manager_deinitialize(). - /// @param[out] wifi The Wi-Fi handle - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_ALREADY_INITIALIZED Already initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_initialize( - ffi.Pointer wifi, - ) { - return _wifi_manager_initialize( - wifi, - ); - } - - late final _wifi_manager_initializePtr = _lookup< - ffi.NativeFunction)>>( - 'wifi_manager_initialize'); - late final _wifi_manager_initialize = _wifi_manager_initializePtr - .asFunction)>(); - - /// @brief Deinitializes Wi-Fi. - /// @since_tizen 3.0 - /// @param[in] wifi The Wi-Fi handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_deinitialize( - wifi_manager_h wifi, - ) { - return _wifi_manager_deinitialize( - wifi, - ); - } - - late final _wifi_manager_deinitializePtr = - _lookup>( - 'wifi_manager_deinitialize'); - late final _wifi_manager_deinitialize = - _wifi_manager_deinitializePtr.asFunction(); - - /// @brief Activates Wi-Fi asynchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called \n - /// This can be @c NULL if you don't want to get the notification. - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_SECURITY_RESTRICTED Restricted by security system policy - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post wifi_manager_activated_cb() will be invoked. - /// @see wifi_manager_activated_cb() - /// @see wifi_manager_deactivate() - int wifi_manager_activate( - wifi_manager_h wifi, - wifi_manager_activated_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_activate( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_activatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_activated_cb, - ffi.Pointer)>>('wifi_manager_activate'); - late final _wifi_manager_activate = _wifi_manager_activatePtr.asFunction< - int Function( - wifi_manager_h, wifi_manager_activated_cb, ffi.Pointer)>(); - - /// @brief Activates Wi-Fi asynchronously and displays Wi-Fi picker (popup) when Wi-Fi is not automatically connected. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called \n - /// This can be @c NULL if you don't want to get the notification. - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_SECURITY_RESTRICTED Restricted by security system policy - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post wifi_manager_activated_cb() will be invoked. - /// @see wifi_manager_activated_cb() - /// @see wifi_manager_deactivate() - int wifi_manager_activate_with_wifi_picker_tested( - wifi_manager_h wifi, - wifi_manager_activated_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_activate_with_wifi_picker_tested( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_activate_with_wifi_picker_testedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_activated_cb, - ffi.Pointer)>>( - 'wifi_manager_activate_with_wifi_picker_tested'); - late final _wifi_manager_activate_with_wifi_picker_tested = - _wifi_manager_activate_with_wifi_picker_testedPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_activated_cb, - ffi.Pointer)>(); - - /// @brief Deactivates Wi-Fi asynchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called \n - /// This can be @c NULL if you don't want to get the notification. - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post wifi_manager_deactivated_cb() will be invoked. - /// @see wifi_manager_deactivated_cb() - /// @see wifi_manager_activate() - int wifi_manager_deactivate( - wifi_manager_h wifi, - wifi_manager_deactivated_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_deactivate( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_deactivatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_deactivated_cb, - ffi.Pointer)>>('wifi_manager_deactivate'); - late final _wifi_manager_deactivate = _wifi_manager_deactivatePtr.asFunction< - int Function(wifi_manager_h, wifi_manager_deactivated_cb, - ffi.Pointer)>(); - - /// @brief Checks whether Wi-Fi is activated. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] wifi The Wi-Fi handle - /// @param[out] activated @c true if Wi-Fi is activated, - /// otherwise @c false if Wi-Fi is not activated. - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_is_activated( - wifi_manager_h wifi, - ffi.Pointer activated, - ) { - return _wifi_manager_is_activated( - wifi, - activated, - ); - } - - late final _wifi_manager_is_activatedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, - ffi.Pointer)>>('wifi_manager_is_activated'); - late final _wifi_manager_is_activated = _wifi_manager_is_activatedPtr - .asFunction)>(); - - /// @brief Gets the local MAC address. - /// @since_tizen 3.0 - /// @remarks You must release @a mac_address using free(). - /// @param[in] wifi The Wi-Fi handle - /// @param[out] mac_address The MAC address - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_get_mac_address( - wifi_manager_h wifi, - ffi.Pointer> mac_address, - ) { - return _wifi_manager_get_mac_address( - wifi, - mac_address, - ); - } - - late final _wifi_manager_get_mac_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, ffi.Pointer>)>>( - 'wifi_manager_get_mac_address'); - late final _wifi_manager_get_mac_address = - _wifi_manager_get_mac_addressPtr.asFunction< - int Function(wifi_manager_h, ffi.Pointer>)>(); - - /// @brief Gets the name of the network interface. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @remarks You must release @a name using free(). - /// @param[in] wifi The Wi-Fi handle - /// @param[out] name The name of network interface - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_get_network_interface_name( - wifi_manager_h wifi, - ffi.Pointer> name, - ) { - return _wifi_manager_get_network_interface_name( - wifi, - name, - ); - } - - late final _wifi_manager_get_network_interface_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, ffi.Pointer>)>>( - 'wifi_manager_get_network_interface_name'); - late final _wifi_manager_get_network_interface_name = - _wifi_manager_get_network_interface_namePtr.asFunction< - int Function(wifi_manager_h, ffi.Pointer>)>(); - - /// @brief Starts scan asynchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_manager_scan_finished_cb(). - int wifi_manager_scan( - wifi_manager_h wifi, - wifi_manager_scan_finished_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_scan( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_scanPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_scan_finished_cb, - ffi.Pointer)>>('wifi_manager_scan'); - late final _wifi_manager_scan = _wifi_manager_scanPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_scan_finished_cb, - ffi.Pointer)>(); - - /// @brief Gets the Wi-Fi scan state. - /// @since_tizen 4.0 - /// @param[in] wifi The Wi-Fi handle - /// @param[in] scan_state The Wi-Fi scan state - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_get_scan_state( - wifi_manager_h wifi, - ffi.Pointer scan_state, - ) { - return _wifi_manager_get_scan_state( - wifi, - scan_state, - ); - } - - late final _wifi_manager_get_scan_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, - ffi.Pointer)>>('wifi_manager_get_scan_state'); - late final _wifi_manager_get_scan_state = _wifi_manager_get_scan_statePtr - .asFunction)>(); - - /// @brief Starts specific AP scan, asynchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] essid The essid of specific AP - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value. - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_manager_scan_finished_cb(). - int wifi_manager_scan_specific_ap( - wifi_manager_h wifi, - ffi.Pointer essid, - wifi_manager_scan_finished_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_scan_specific_ap( - wifi, - essid, - callback, - user_data, - ); - } - - late final _wifi_manager_scan_specific_apPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, - ffi.Pointer, - wifi_manager_scan_finished_cb, - ffi.Pointer)>>('wifi_manager_scan_specific_ap'); - late final _wifi_manager_scan_specific_ap = - _wifi_manager_scan_specific_apPtr.asFunction< - int Function(wifi_manager_h, ffi.Pointer, - wifi_manager_scan_finished_cb, ffi.Pointer)>(); - - /// @brief Creates a Wi-Fi specific AP scan handle. - /// @since_tizen 4.0 - /// @remarks You must release @a specific_scan using wifi_manager_specific_scan_destroy(). - /// @param[in] wifi The Wi-Fi handle - /// @param[out] specific_scan The Wi-Fi specific AP scan handle - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @pre This function needs a wifi_manager_initialize() call before use. - /// @see wifi_manager_specific_scan_create() - int wifi_manager_specific_scan_create( - wifi_manager_h wifi, - ffi.Pointer specific_scan, - ) { - return _wifi_manager_specific_scan_create( - wifi, - specific_scan, - ); - } - - late final _wifi_manager_specific_scan_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, ffi.Pointer)>>( - 'wifi_manager_specific_scan_create'); - late final _wifi_manager_specific_scan_create = - _wifi_manager_specific_scan_createPtr.asFunction< - int Function( - wifi_manager_h, ffi.Pointer)>(); - - /// @brief Destroys a Wi-Fi specific AP scan handle. - /// @since_tizen 4.0 - /// @param[in] wifi The Wi-Fi handle - /// @param[in] specific_scan The Wi-Fi specific AP scan handle - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @pre This function needs a wifi_manager_initialize() call before use. - /// @see wifi_manager_specific_scan_destroy() - int wifi_manager_specific_scan_destroy( - wifi_manager_h wifi, - wifi_manager_specific_scan_h specific_scan, - ) { - return _wifi_manager_specific_scan_destroy( - wifi, - specific_scan, - ); - } - - late final _wifi_manager_specific_scan_destroyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_specific_scan_h)>>( - 'wifi_manager_specific_scan_destroy'); - late final _wifi_manager_specific_scan_destroy = - _wifi_manager_specific_scan_destroyPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_specific_scan_h)>(); - - /// @brief Sets the SSID of a specific AP scan. - /// @since_tizen 4.0 - /// @param[in] specific_scan The Wi-Fi specific AP scan handle - /// @param[in] essid The SSID of specific AP scan - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_specific_scan_set_ssid() - int wifi_manager_specific_scan_set_ssid( - wifi_manager_specific_scan_h specific_scan, - ffi.Pointer essid, - ) { - return _wifi_manager_specific_scan_set_ssid( - specific_scan, - essid, - ); - } - - late final _wifi_manager_specific_scan_set_ssidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_specific_scan_h, - ffi.Pointer)>>('wifi_manager_specific_scan_set_ssid'); - late final _wifi_manager_specific_scan_set_ssid = - _wifi_manager_specific_scan_set_ssidPtr.asFunction< - int Function(wifi_manager_specific_scan_h, ffi.Pointer)>(); - - /// @brief Sets the channel frequency of a specific AP scan. - /// @since_tizen 4.0 - /// @param[in] specific_scan The Wi-Fi specific AP scan handle - /// @param[in] freq The channel frequency of specific AP scan - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_specific_scan_set_freq() - int wifi_manager_specific_scan_set_freq( - wifi_manager_specific_scan_h specific_scan, - int freq, - ) { - return _wifi_manager_specific_scan_set_freq( - specific_scan, - freq, - ); - } - - late final _wifi_manager_specific_scan_set_freqPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_specific_scan_h, - ffi.Int)>>('wifi_manager_specific_scan_set_freq'); - late final _wifi_manager_specific_scan_set_freq = - _wifi_manager_specific_scan_set_freqPtr - .asFunction(); - - /// @brief Starts multi SSID and multi channel specific scan, asynchronously. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] specific_scan The Wi-Fi specific AP scan handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value. - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_manager_scan_finished_cb(). - int wifi_manager_specific_ap_start_multi_scan( - wifi_manager_h wifi, - wifi_manager_specific_scan_h specific_scan, - wifi_manager_scan_finished_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_specific_ap_start_multi_scan( - wifi, - specific_scan, - callback, - user_data, - ); - } - - late final _wifi_manager_specific_ap_start_multi_scanPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_specific_scan_h, - wifi_manager_scan_finished_cb, ffi.Pointer)>>( - 'wifi_manager_specific_ap_start_multi_scan'); - late final _wifi_manager_specific_ap_start_multi_scan = - _wifi_manager_specific_ap_start_multi_scanPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_specific_scan_h, - wifi_manager_scan_finished_cb, ffi.Pointer)>(); - - /// @brief Connects to the hidden AP, asynchronously. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get \n - /// %http://tizen.org/privilege/network.profile - /// @remarks This function needs all listed privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] essid The ESSID of the hidden AP - /// @param[in] sec_type The security type of the hidden AP - /// @param[in] passphrase The passphrase of the hidden AP - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value. - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @pre This function needs wifi_manager_scan() before use. - /// @post This function invokes wifi_manager_connected_cb(). - int wifi_manager_connect_hidden_ap( - wifi_manager_h wifi, - ffi.Pointer essid, - int sec_type, - ffi.Pointer passphrase, - wifi_manager_connected_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_connect_hidden_ap( - wifi, - essid, - sec_type, - passphrase, - callback, - user_data, - ); - } - - late final _wifi_manager_connect_hidden_apPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - wifi_manager_connected_cb, - ffi.Pointer)>>('wifi_manager_connect_hidden_ap'); - late final _wifi_manager_connect_hidden_ap = - _wifi_manager_connect_hidden_apPtr.asFunction< - int Function( - wifi_manager_h, - ffi.Pointer, - int, - ffi.Pointer, - wifi_manager_connected_cb, - ffi.Pointer)>(); - - /// @brief Gets the handle of the connected access point. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @remarks You must release @a ap using wifi_manager_ap_destroy(). - /// @param[in] wifi The Wi-Fi handle - /// @param[out] ap The access point handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NO_CONNECTION There is no connected AP - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_get_connected_ap( - wifi_manager_h wifi, - ffi.Pointer ap, - ) { - return _wifi_manager_get_connected_ap( - wifi, - ap, - ); - } - - late final _wifi_manager_get_connected_apPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, ffi.Pointer)>>( - 'wifi_manager_get_connected_ap'); - late final _wifi_manager_get_connected_ap = - _wifi_manager_get_connected_apPtr.asFunction< - int Function(wifi_manager_h, ffi.Pointer)>(); - - /// @brief Gets the result of the scan. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_manager_found_ap_cb(). - int wifi_manager_foreach_found_ap( - wifi_manager_h wifi, - wifi_manager_found_ap_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_foreach_found_ap( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_foreach_found_apPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_found_ap_cb, - ffi.Pointer)>>('wifi_manager_foreach_found_ap'); - late final _wifi_manager_foreach_found_ap = - _wifi_manager_foreach_found_apPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_found_ap_cb, - ffi.Pointer)>(); - - /// @brief Gets the result of specific AP scan. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value. - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_manager_found_ap_cb(). - /// @see wifi_manager_scan_specific_ap() - int wifi_manager_foreach_found_specific_ap( - wifi_manager_h wifi, - wifi_manager_found_ap_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_foreach_found_specific_ap( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_foreach_found_specific_apPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_found_ap_cb, - ffi.Pointer)>>( - 'wifi_manager_foreach_found_specific_ap'); - late final _wifi_manager_foreach_found_specific_ap = - _wifi_manager_foreach_found_specific_apPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_found_ap_cb, - ffi.Pointer)>(); - - /// @brief Gets the result of the BSSID scan (i.e. BSSID, ESSID & RSSI). - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_manager_found_ap_cb(). - /// @see wifi_manager_scan_ap() - /// @see wifi_manager_scan_specific_ap() - int wifi_manager_foreach_found_bssid_ap( - wifi_manager_h wifi, - wifi_manager_found_ap_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_foreach_found_bssid_ap( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_foreach_found_bssid_apPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_found_ap_cb, - ffi.Pointer)>>('wifi_manager_foreach_found_bssid_ap'); - late final _wifi_manager_foreach_found_bssid_ap = - _wifi_manager_foreach_found_bssid_apPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_found_ap_cb, - ffi.Pointer)>(); - - /// @brief Connects to the access point asynchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] ap The access point handle - /// @param[in] callback The callback function to be called \n - /// This can be @c NULL if you don't want to get the notification. - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_manager_connected_cb(). - /// @see wifi_manager_connected_cb() - /// @see wifi_manager_connect_by_wps_pbc() - /// @see wifi_manager_connect_by_wps_pin() - /// @see wifi_manager_disconnect() - int wifi_manager_connect( - wifi_manager_h wifi, - wifi_manager_ap_h ap, - wifi_manager_connected_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_connect( - wifi, - ap, - callback, - user_data, - ); - } - - late final _wifi_manager_connectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, - wifi_manager_ap_h, - wifi_manager_connected_cb, - ffi.Pointer)>>('wifi_manager_connect'); - late final _wifi_manager_connect = _wifi_manager_connectPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_ap_h, wifi_manager_connected_cb, - ffi.Pointer)>(); - - /// @brief Disconnects to the access point asynchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] ap The access point handle - /// @param[in] callback The callback function to be called \n - /// This can be @c NULL if you don't want to get the notification. - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_manager_disconnected_cb(). - /// @see wifi_manager_disconnected_cb() - /// @see wifi_manager_connect_by_wps_pbc() - /// @see wifi_manager_connect_by_wps_pin() - /// @see wifi_manager_connect() - int wifi_manager_disconnect( - wifi_manager_h wifi, - wifi_manager_ap_h ap, - wifi_manager_disconnected_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_disconnect( - wifi, - ap, - callback, - user_data, - ); - } - - late final _wifi_manager_disconnectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, - wifi_manager_ap_h, - wifi_manager_disconnected_cb, - ffi.Pointer)>>('wifi_manager_disconnect'); - late final _wifi_manager_disconnect = _wifi_manager_disconnectPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_ap_h, - wifi_manager_disconnected_cb, ffi.Pointer)>(); - - /// @brief Connects to the access point with WPS PBC asynchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] ap The access point handle - /// @param[in] callback The callback function to be called \n - /// This can be NULL if you don't want to get the notification. - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_manager_connected_cb(). - /// @see wifi_manager_connected_cb() - /// @see wifi_manager_connect() - /// @see wifi_manager_disconnect() - /// @see wifi_manager_ap_is_wps_supported() - int wifi_manager_connect_by_wps_pbc( - wifi_manager_h wifi, - wifi_manager_ap_h ap, - wifi_manager_connected_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_connect_by_wps_pbc( - wifi, - ap, - callback, - user_data, - ); - } - - late final _wifi_manager_connect_by_wps_pbcPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, - wifi_manager_ap_h, - wifi_manager_connected_cb, - ffi.Pointer)>>('wifi_manager_connect_by_wps_pbc'); - late final _wifi_manager_connect_by_wps_pbc = - _wifi_manager_connect_by_wps_pbcPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_ap_h, - wifi_manager_connected_cb, ffi.Pointer)>(); - - /// @brief Connects to the access point with WPS PIN asynchronously. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] ap The access point handle - /// @param[in] pin The WPS PIN is a non-NULL string with length greater than 0 and less than or equal to 8 - /// @param[in] callback The callback function to be called (this can be NULL if you don't want to get the notification) - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_manager_connected_cb(). - /// @see wifi_manager_connected_cb() - /// @see wifi_manager_connect() - /// @see wifi_manager_disconnect() - /// @see wifi_manager_ap_is_wps_supported() - int wifi_manager_connect_by_wps_pin( - wifi_manager_h wifi, - wifi_manager_ap_h ap, - ffi.Pointer pin, - wifi_manager_connected_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_connect_by_wps_pin( - wifi, - ap, - pin, - callback, - user_data, - ); - } - - late final _wifi_manager_connect_by_wps_pinPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, - wifi_manager_ap_h, - ffi.Pointer, - wifi_manager_connected_cb, - ffi.Pointer)>>('wifi_manager_connect_by_wps_pin'); - late final _wifi_manager_connect_by_wps_pin = - _wifi_manager_connect_by_wps_pinPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_ap_h, ffi.Pointer, - wifi_manager_connected_cb, ffi.Pointer)>(); - - /// @brief Connects to the access point with WPS PBC without entering SSID. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get \n - /// %http://tizen.org/privilege/network.profile - /// @remarks This function needs all listed privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called \n - /// This can be NULL if you don't want to get the notification. - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_connected_cb(). - /// @see wifi_manager_connected_cb() - /// @see wifi_manager_connect() - /// @see wifi_manager_disconnect() - /// @see wifi_manager_ap_is_wps_supported() - int wifi_manager_connect_by_wps_pbc_without_ssid( - wifi_manager_h wifi, - wifi_manager_connected_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_connect_by_wps_pbc_without_ssid( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_connect_by_wps_pbc_without_ssidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_connected_cb, - ffi.Pointer)>>( - 'wifi_manager_connect_by_wps_pbc_without_ssid'); - late final _wifi_manager_connect_by_wps_pbc_without_ssid = - _wifi_manager_connect_by_wps_pbc_without_ssidPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_connected_cb, - ffi.Pointer)>(); - - /// @brief Connects to the access point with WPS PIN without entering SSID. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get \n - /// %http://tizen.org/privilege/network.profile - /// @remarks This function needs all listed privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] pin The WPS PIN, a non-NULL string with length greater \n - /// than 0 and less than or equal to 8 - /// @param[in] callback The callback function to be called \n - /// This can be NULL if you don't want to get the notification. - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_connected_cb(). - /// @see wifi_manager_connected_cb() - /// @see wifi_manager_connect() - /// @see wifi_manager_disconnect() - /// @see wifi_manager_ap_is_wps_supported() - int wifi_manager_connect_by_wps_pin_without_ssid( - wifi_manager_h wifi, - ffi.Pointer pin, - wifi_manager_connected_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_connect_by_wps_pin_without_ssid( - wifi, - pin, - callback, - user_data, - ); - } - - late final _wifi_manager_connect_by_wps_pin_without_ssidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, ffi.Pointer, - wifi_manager_connected_cb, ffi.Pointer)>>( - 'wifi_manager_connect_by_wps_pin_without_ssid'); - late final _wifi_manager_connect_by_wps_pin_without_ssid = - _wifi_manager_connect_by_wps_pin_without_ssidPtr.asFunction< - int Function(wifi_manager_h, ffi.Pointer, - wifi_manager_connected_cb, ffi.Pointer)>(); - - /// @brief Stops ongoing WPS provisioning / disconnects from the connected access point. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_cancel_wps( - wifi_manager_h wifi, - ) { - return _wifi_manager_cancel_wps( - wifi, - ); - } - - late final _wifi_manager_cancel_wpsPtr = - _lookup>( - 'wifi_manager_cancel_wps'); - late final _wifi_manager_cancel_wps = - _wifi_manager_cancel_wpsPtr.asFunction(); - - /// @brief Gets the WPS generated PIN code. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/network.get - /// @remarks You must release @a wps_pin using free(). - /// @param[in] wifi The Wi-Fi handle - /// @param[out] wps_pin The WPS PIN - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_get_wps_generated_pin( - wifi_manager_h wifi, - ffi.Pointer> wps_pin, - ) { - return _wifi_manager_get_wps_generated_pin( - wifi, - wps_pin, - ); - } - - late final _wifi_manager_get_wps_generated_pinPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, ffi.Pointer>)>>( - 'wifi_manager_get_wps_generated_pin'); - late final _wifi_manager_get_wps_generated_pin = - _wifi_manager_get_wps_generated_pinPtr.asFunction< - int Function(wifi_manager_h, ffi.Pointer>)>(); - - /// @brief Deletes the information of a stored access point and disconnects from it if it was connected to. - /// @details If an AP is connected to, then connection information will be stored. - /// This information is used when a connection to that AP is established automatically. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] ap The access point handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_forget_ap( - wifi_manager_h wifi, - wifi_manager_ap_h ap, - ) { - return _wifi_manager_forget_ap( - wifi, - ap, - ); - } - - late final _wifi_manager_forget_apPtr = _lookup< - ffi - .NativeFunction>( - 'wifi_manager_forget_ap'); - late final _wifi_manager_forget_ap = _wifi_manager_forget_apPtr - .asFunction(); - - /// @brief Deletes stored access point's information and disconnects from it if connected, asynchronously. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] ap The access point handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_manager_forget_ap_finished_cb(). - int wifi_manager_forget_ap_async( - wifi_manager_h wifi, - wifi_manager_ap_h ap, - wifi_manager_forget_ap_finished_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_forget_ap_async( - wifi, - ap, - callback, - user_data, - ); - } - - late final _wifi_manager_forget_ap_asyncPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, - wifi_manager_ap_h, - wifi_manager_forget_ap_finished_cb, - ffi.Pointer)>>('wifi_manager_forget_ap_async'); - late final _wifi_manager_forget_ap_async = - _wifi_manager_forget_ap_asyncPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_ap_h, - wifi_manager_forget_ap_finished_cb, ffi.Pointer)>(); - - /// @brief Updates an existing AP. - /// @details When a AP is changed, these changes will be not applied to the Connection Manager immediately. - /// When you call this function, your changes affect the Connection Manager and the existing AP is updated. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] ap The access point handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_update_ap( - wifi_manager_h wifi, - wifi_manager_ap_h ap, - ) { - return _wifi_manager_update_ap( - wifi, - ap, - ); - } - - late final _wifi_manager_update_apPtr = _lookup< - ffi - .NativeFunction>( - 'wifi_manager_update_ap'); - late final _wifi_manager_update_ap = _wifi_manager_update_apPtr - .asFunction(); - - /// @brief Adds the Wi-Fi Vendor Specific Information Element (VSIE) to a specific frame type. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/network.set - /// @remarks @a vsie_str for @a frame_id will be in effect until Wi-Fi is deactivated. - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] frame_id The frame ID for setting VSIE - /// @param[in] vsie_str The VSIE data - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @pre Wi-Fi service must be activated by wifi_manager_activate(). - /// @see wifi_manager_activate() - /// @see wifi_manager_remove_vsie() - /// @see wifi_manager_get_vsie() - int wifi_manager_add_vsie( - wifi_manager_h wifi, - int frame_id, - ffi.Pointer vsie_str, - ) { - return _wifi_manager_add_vsie( - wifi, - frame_id, - vsie_str, - ); - } - - late final _wifi_manager_add_vsiePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, ffi.Int32, - ffi.Pointer)>>('wifi_manager_add_vsie'); - late final _wifi_manager_add_vsie = _wifi_manager_add_vsiePtr - .asFunction)>(); - - /// @brief Gets the Wi-Fi Vendor Specific Information Elements (VSIE) from a specific frame. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/network.get - /// @remarks @a vsie_str must be released with free(). - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] frame_id The frame ID for getting VSIE - /// @param[out] vsie_str The VSIE data - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @pre Wi-Fi service must be activated by wifi_manager_activate() - /// and VSIE for a specific frame must be set with wifi_manager_add_vsie(). - /// @see wifi_manager_activate() - /// @see wifi_manager_remove_vsie() - /// @see wifi_manager_add_vsie() - int wifi_manager_get_vsie( - wifi_manager_h wifi, - int frame_id, - ffi.Pointer> vsie_str, - ) { - return _wifi_manager_get_vsie( - wifi, - frame_id, - vsie_str, - ); - } - - late final _wifi_manager_get_vsiePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, ffi.Int32, - ffi.Pointer>)>>('wifi_manager_get_vsie'); - late final _wifi_manager_get_vsie = _wifi_manager_get_vsiePtr.asFunction< - int Function(wifi_manager_h, int, ffi.Pointer>)>(); - - /// @brief Removes the Wi-Fi Vendor Specific Information Element (VSIE) from specific frame. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/network.set - /// @remarks @a vsie_str for @a frame_id will be in effect until Wi-Fi is deactivated. - /// - /// @param[in] wifi The wifi handle - /// @param[in] frame_id The frame ID for removing VSIE - /// @param[in] vsie_str The VSIE data - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @pre Wi-Fi service must be activated by wifi_manager_activate() - /// and VSIE for a specific frame must be set with wifi_manager_add_vsie(). - /// @see wifi_manager_activate() - /// @see wifi_manager_get_vsie() - /// @see wifi_manager_add_vsie() - int wifi_manager_remove_vsie( - wifi_manager_h wifi, - int frame_id, - ffi.Pointer vsie_str, - ) { - return _wifi_manager_remove_vsie( - wifi, - frame_id, - vsie_str, - ); - } - - late final _wifi_manager_remove_vsiePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, ffi.Int32, - ffi.Pointer)>>('wifi_manager_remove_vsie'); - late final _wifi_manager_remove_vsie = _wifi_manager_remove_vsiePtr - .asFunction)>(); - - /// @brief Gets the connection state. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] wifi The Wi-Fi handle - /// @param[out] connection_state The connection state - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_get_connection_state( - wifi_manager_h wifi, - ffi.Pointer connection_state, - ) { - return _wifi_manager_get_connection_state( - wifi, - connection_state, - ); - } - - late final _wifi_manager_get_connection_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, - ffi.Pointer)>>('wifi_manager_get_connection_state'); - late final _wifi_manager_get_connection_state = - _wifi_manager_get_connection_statePtr - .asFunction)>(); - - /// @brief Registers the callback called when the device state is changed. - /// @since_tizen 3.0 - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_set_device_state_changed_cb( - wifi_manager_h wifi, - wifi_manager_device_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_set_device_state_changed_cb( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_set_device_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, - wifi_manager_device_state_changed_cb, - ffi.Pointer)>>( - 'wifi_manager_set_device_state_changed_cb'); - late final _wifi_manager_set_device_state_changed_cb = - _wifi_manager_set_device_state_changed_cbPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_device_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback called when the device state is changed. - /// @since_tizen 3.0 - /// @param[in] wifi The Wi-Fi handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_unset_device_state_changed_cb( - wifi_manager_h wifi, - ) { - return _wifi_manager_unset_device_state_changed_cb( - wifi, - ); - } - - late final _wifi_manager_unset_device_state_changed_cbPtr = - _lookup>( - 'wifi_manager_unset_device_state_changed_cb'); - late final _wifi_manager_unset_device_state_changed_cb = - _wifi_manager_unset_device_state_changed_cbPtr - .asFunction(); - - /// @brief Registers the callback called when the background scan is finished. - /// @since_tizen 3.0 - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_set_background_scan_cb( - wifi_manager_h wifi, - wifi_manager_scan_finished_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_set_background_scan_cb( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_set_background_scan_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_scan_finished_cb, - ffi.Pointer)>>('wifi_manager_set_background_scan_cb'); - late final _wifi_manager_set_background_scan_cb = - _wifi_manager_set_background_scan_cbPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_scan_finished_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback called when the scan is finished. - /// @since_tizen 3.0 - /// @param[in] wifi The Wi-Fi handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_unset_background_scan_cb( - wifi_manager_h wifi, - ) { - return _wifi_manager_unset_background_scan_cb( - wifi, - ); - } - - late final _wifi_manager_unset_background_scan_cbPtr = - _lookup>( - 'wifi_manager_unset_background_scan_cb'); - late final _wifi_manager_unset_background_scan_cb = - _wifi_manager_unset_background_scan_cbPtr - .asFunction(); - - /// @brief Registers the callback called when the scanning state is changed. - /// @since_tizen 4.0 - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_set_scan_state_changed_cb( - wifi_manager_h wifi, - wifi_manager_scan_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_set_scan_state_changed_cb( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_set_scan_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, - wifi_manager_scan_state_changed_cb, ffi.Pointer)>>( - 'wifi_manager_set_scan_state_changed_cb'); - late final _wifi_manager_set_scan_state_changed_cb = - _wifi_manager_set_scan_state_changed_cbPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_scan_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback called when the scanning state is changed. - /// @since_tizen 4.0 - /// @param[in] wifi The Wi-Fi handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_unset_scan_state_changed_cb( - wifi_manager_h wifi, - ) { - return _wifi_manager_unset_scan_state_changed_cb( - wifi, - ); - } - - late final _wifi_manager_unset_scan_state_changed_cbPtr = - _lookup>( - 'wifi_manager_unset_scan_state_changed_cb'); - late final _wifi_manager_unset_scan_state_changed_cb = - _wifi_manager_unset_scan_state_changed_cbPtr - .asFunction(); - - /// @brief Registers the callback called when the connection state is changed. - /// @since_tizen 3.0 - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_set_connection_state_changed_cb( - wifi_manager_h wifi, - wifi_manager_connection_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_set_connection_state_changed_cb( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_set_connection_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, - wifi_manager_connection_state_changed_cb, - ffi.Pointer)>>( - 'wifi_manager_set_connection_state_changed_cb'); - late final _wifi_manager_set_connection_state_changed_cb = - _wifi_manager_set_connection_state_changed_cbPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_connection_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback called when the connection state is changed. - /// @since_tizen 3.0 - /// @param[in] wifi The Wi-Fi handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_unset_connection_state_changed_cb( - wifi_manager_h wifi, - ) { - return _wifi_manager_unset_connection_state_changed_cb( - wifi, - ); - } - - late final _wifi_manager_unset_connection_state_changed_cbPtr = - _lookup>( - 'wifi_manager_unset_connection_state_changed_cb'); - late final _wifi_manager_unset_connection_state_changed_cb = - _wifi_manager_unset_connection_state_changed_cbPtr - .asFunction(); - - /// @brief Registers callback called when the RSSI of connected Wi-Fi is changed. - /// @since_tizen 3.0 - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_set_rssi_level_changed_cb( - wifi_manager_h wifi, - wifi_manager_rssi_level_changed_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_set_rssi_level_changed_cb( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_set_rssi_level_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, - wifi_manager_rssi_level_changed_cb, ffi.Pointer)>>( - 'wifi_manager_set_rssi_level_changed_cb'); - late final _wifi_manager_set_rssi_level_changed_cb = - _wifi_manager_set_rssi_level_changed_cbPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_rssi_level_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters callback called when the RSSI of connected Wi-Fi is changed. - /// @since_tizen 3.0 - /// @param[in] wifi The Wi-Fi handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_unset_rssi_level_changed_cb( - wifi_manager_h wifi, - ) { - return _wifi_manager_unset_rssi_level_changed_cb( - wifi, - ); - } - - late final _wifi_manager_unset_rssi_level_changed_cbPtr = - _lookup>( - 'wifi_manager_unset_rssi_level_changed_cb'); - late final _wifi_manager_unset_rssi_level_changed_cb = - _wifi_manager_unset_rssi_level_changed_cbPtr - .asFunction(); - - /// @brief Registers a callback called when the Wi-Fi Module state is changed. - /// @since_tizen 4.0 - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_module_state_changed_cb() - /// @see wifi_manager_unset_module_state_changed_cb() - int wifi_manager_set_module_state_changed_cb( - wifi_manager_h wifi, - wifi_manager_module_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_set_module_state_changed_cb( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_set_module_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, - wifi_manager_module_state_changed_cb, - ffi.Pointer)>>( - 'wifi_manager_set_module_state_changed_cb'); - late final _wifi_manager_set_module_state_changed_cb = - _wifi_manager_set_module_state_changed_cbPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_module_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback called when the Wi-Fi Module state is changed. - /// @since_tizen 4.0 - /// @param[in] wifi The Wi-Fi handle - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_module_state_changed_cb() - /// @see wifi_manager_set_module_state_changed_cb() - int wifi_manager_unset_module_state_changed_cb( - wifi_manager_h wifi, - ) { - return _wifi_manager_unset_module_state_changed_cb( - wifi, - ); - } - - late final _wifi_manager_unset_module_state_changed_cbPtr = - _lookup>( - 'wifi_manager_unset_module_state_changed_cb'); - late final _wifi_manager_unset_module_state_changed_cb = - _wifi_manager_unset_module_state_changed_cbPtr - .asFunction(); - - /// @brief Gets the Wi-Fi Module state. - /// @since_tizen 4.0 - /// @param[in] wifi The Wi-Fi handle - /// @param[out] state The Wi-Fi Module state - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_get_module_state( - wifi_manager_h wifi, - ffi.Pointer state, - ) { - return _wifi_manager_get_module_state( - wifi, - state, - ); - } - - late final _wifi_manager_get_module_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, - ffi.Pointer)>>('wifi_manager_get_module_state'); - late final _wifi_manager_get_module_state = _wifi_manager_get_module_statePtr - .asFunction)>(); - - /// @brief Starts BSSID scan asynchronously. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set \n - /// %http://tizen.org/privilege/network.get - /// @remarks This function needs both privileges. - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_manager_bssid_scan_finished_cb(). - int wifi_manager_bssid_scan( - wifi_manager_h wifi, - wifi_manager_bssid_scan_finished_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_bssid_scan( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_bssid_scanPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_bssid_scan_finished_cb, - ffi.Pointer)>>('wifi_manager_bssid_scan'); - late final _wifi_manager_bssid_scan = _wifi_manager_bssid_scanPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_bssid_scan_finished_cb, - ffi.Pointer)>(); - - /// @brief Creates the access point handle. - /// @since_tizen 3.0 - /// @remarks You must release @a ap using wifi_manager_ap_destroy(). - /// @param[in] wifi The Wi-Fi handle - /// @param[in] essid The ESSID (Extended Service Set Identifier) should be null-terminated and can be UTF-8 encoded - /// @param[out] ap The access point handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_ap_destroy() - int wifi_manager_ap_create( - wifi_manager_h wifi, - ffi.Pointer essid, - ffi.Pointer ap, - ) { - return _wifi_manager_ap_create( - wifi, - essid, - ap, - ); - } - - late final _wifi_manager_ap_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, ffi.Pointer, - ffi.Pointer)>>('wifi_manager_ap_create'); - late final _wifi_manager_ap_create = _wifi_manager_ap_createPtr.asFunction< - int Function(wifi_manager_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Creates the hidden access point handle. - /// @since_tizen 3.0 - /// @remarks You must release @a ap using wifi_manager_ap_destroy(). - /// @param[in] wifi The Wi-Fi handle - /// @param[in] essid The ESSID (Extended Service Set Identifier) should be null-terminated and can be UTF-8 encoded - /// @param[out] ap The access point handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_ap_destroy() - int wifi_manager_ap_hidden_create( - wifi_manager_h wifi, - ffi.Pointer essid, - ffi.Pointer ap, - ) { - return _wifi_manager_ap_hidden_create( - wifi, - essid, - ap, - ); - } - - late final _wifi_manager_ap_hidden_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, ffi.Pointer, - ffi.Pointer)>>( - 'wifi_manager_ap_hidden_create'); - late final _wifi_manager_ap_hidden_create = - _wifi_manager_ap_hidden_createPtr.asFunction< - int Function(wifi_manager_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Destroys the access point handle. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_ap_create() - int wifi_manager_ap_destroy( - wifi_manager_ap_h ap, - ) { - return _wifi_manager_ap_destroy( - ap, - ); - } - - late final _wifi_manager_ap_destroyPtr = - _lookup>( - 'wifi_manager_ap_destroy'); - late final _wifi_manager_ap_destroy = - _wifi_manager_ap_destroyPtr.asFunction(); - - /// @brief Clones the access point handle. - /// @since_tizen 3.0 - /// @remarks You must release @a cloned_ap using wifi_manager_ap_destroy(). - /// @param[out] cloned_ap The cloned access point handle - /// @param[in] origin The origin access point handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_ap_destroy() - int wifi_manager_ap_clone( - ffi.Pointer cloned_ap, - wifi_manager_ap_h origin, - ) { - return _wifi_manager_ap_clone( - cloned_ap, - origin, - ); - } - - late final _wifi_manager_ap_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - wifi_manager_ap_h)>>('wifi_manager_ap_clone'); - late final _wifi_manager_ap_clone = _wifi_manager_ap_clonePtr.asFunction< - int Function(ffi.Pointer, wifi_manager_ap_h)>(); - - /// @brief Refreshes the access point information. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @remarks You should call this function in order to get the current access point information, because the information can be changed. - /// @param[in] ap The access point handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_refresh( - wifi_manager_ap_h ap, - ) { - return _wifi_manager_ap_refresh( - ap, - ); - } - - late final _wifi_manager_ap_refreshPtr = - _lookup>( - 'wifi_manager_ap_refresh'); - late final _wifi_manager_ap_refresh = - _wifi_manager_ap_refreshPtr.asFunction(); - - /// @brief Gets ESSID (Extended Service Set Identifier). - /// @since_tizen 3.0 - /// @remarks You must release @a essid using free(). - /// @param[in] ap The access point handle - /// @param[out] essid The ESSID - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_essid( - wifi_manager_ap_h ap, - ffi.Pointer> essid, - ) { - return _wifi_manager_ap_get_essid( - ap, - essid, - ); - } - - late final _wifi_manager_ap_get_essidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_ap_h, ffi.Pointer>)>>( - 'wifi_manager_ap_get_essid'); - late final _wifi_manager_ap_get_essid = - _wifi_manager_ap_get_essidPtr.asFunction< - int Function( - wifi_manager_ap_h, ffi.Pointer>)>(); - - /// @brief Gets raw SSID (Service Set Identifier). - /// @since_tizen 4.0 - /// @remarks You must release @a ssid using free(). - /// @param[in] ap The access point handle - /// @param[out] ssid The raw SSID bytes - /// @param[out] ssid_len The raw SSID length - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_raw_ssid( - wifi_manager_ap_h ap, - ffi.Pointer> ssid, - ffi.Pointer ssid_len, - ) { - return _wifi_manager_ap_get_raw_ssid( - ap, - ssid, - ssid_len, - ); - } - - late final _wifi_manager_ap_get_raw_ssidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_ap_h, - ffi.Pointer>, - ffi.Pointer)>>('wifi_manager_ap_get_raw_ssid'); - late final _wifi_manager_ap_get_raw_ssid = - _wifi_manager_ap_get_raw_ssidPtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Gets BSSID (Basic Service Set Identifier). - /// @since_tizen 3.0 - /// @remarks You must release @a bssid using free(). - /// @param[in] ap The access point handle - /// @param[out] bssid The BSSID - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_bssid( - wifi_manager_ap_h ap, - ffi.Pointer> bssid, - ) { - return _wifi_manager_ap_get_bssid( - ap, - bssid, - ); - } - - late final _wifi_manager_ap_get_bssidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_ap_h, ffi.Pointer>)>>( - 'wifi_manager_ap_get_bssid'); - late final _wifi_manager_ap_get_bssid = - _wifi_manager_ap_get_bssidPtr.asFunction< - int Function( - wifi_manager_ap_h, ffi.Pointer>)>(); - - /// @brief Gets the RSSI. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[out] rssi The RSSI value (in dBm) - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_rssi( - wifi_manager_ap_h ap, - ffi.Pointer rssi, - ) { - return _wifi_manager_ap_get_rssi( - ap, - rssi, - ); - } - - late final _wifi_manager_ap_get_rssiPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_get_rssi'); - late final _wifi_manager_ap_get_rssi = _wifi_manager_ap_get_rssiPtr - .asFunction)>(); - - /// @brief Gets the RSSI level. - /// @since_tizen 4.0 - /// @param[in] ap The access point handle - /// @param[out] rssi_level The RSSI level - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_rssi_level( - wifi_manager_ap_h ap, - ffi.Pointer rssi_level, - ) { - return _wifi_manager_ap_get_rssi_level( - ap, - rssi_level, - ); - } - - late final _wifi_manager_ap_get_rssi_levelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_get_rssi_level'); - late final _wifi_manager_ap_get_rssi_level = - _wifi_manager_ap_get_rssi_levelPtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer)>(); - - /// @brief Gets the frequency band (MHz). - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[out] frequency The frequency - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_frequency( - wifi_manager_ap_h ap, - ffi.Pointer frequency, - ) { - return _wifi_manager_ap_get_frequency( - ap, - frequency, - ); - } - - late final _wifi_manager_ap_get_frequencyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_get_frequency'); - late final _wifi_manager_ap_get_frequency = _wifi_manager_ap_get_frequencyPtr - .asFunction)>(); - - /// @brief Gets the max speed (Mbps). - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[out] max_speed The max speed - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_max_speed( - wifi_manager_ap_h ap, - ffi.Pointer max_speed, - ) { - return _wifi_manager_ap_get_max_speed( - ap, - max_speed, - ); - } - - late final _wifi_manager_ap_get_max_speedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_get_max_speed'); - late final _wifi_manager_ap_get_max_speed = _wifi_manager_ap_get_max_speedPtr - .asFunction)>(); - - /// @brief Checks whether the access point is favorite or not. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[out] favorite @c true if access point is favorite, - /// otherwise @c false if access point is not favorite - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_is_favorite( - wifi_manager_ap_h ap, - ffi.Pointer favorite, - ) { - return _wifi_manager_ap_is_favorite( - ap, - favorite, - ); - } - - late final _wifi_manager_ap_is_favoritePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_is_favorite'); - late final _wifi_manager_ap_is_favorite = _wifi_manager_ap_is_favoritePtr - .asFunction)>(); - - /// @brief Checks whether the access point is passpoint or not. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[out] passpoint @c true if access point is passpoint, - /// otherwise @c false if access point is not passpoint. - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_is_passpoint( - wifi_manager_ap_h ap, - ffi.Pointer passpoint, - ) { - return _wifi_manager_ap_is_passpoint( - ap, - passpoint, - ); - } - - late final _wifi_manager_ap_is_passpointPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_is_passpoint'); - late final _wifi_manager_ap_is_passpoint = _wifi_manager_ap_is_passpointPtr - .asFunction)>(); - - /// @brief Gets the connection state. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[out] state The connection state - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_connection_state( - wifi_manager_ap_h ap, - ffi.Pointer state, - ) { - return _wifi_manager_ap_get_connection_state( - ap, - state, - ); - } - - late final _wifi_manager_ap_get_connection_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_get_connection_state'); - late final _wifi_manager_ap_get_connection_state = - _wifi_manager_ap_get_connection_statePtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer)>(); - - /// @brief Gets the config type of IP. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[out] type The type of IP config - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_ip_config_type( - wifi_manager_ap_h ap, - int address_family, - ffi.Pointer type, - ) { - return _wifi_manager_ap_get_ip_config_type( - ap, - address_family, - type, - ); - } - - late final _wifi_manager_ap_get_ip_config_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Pointer)>>('wifi_manager_ap_get_ip_config_type'); - late final _wifi_manager_ap_get_ip_config_type = - _wifi_manager_ap_get_ip_config_typePtr.asFunction< - int Function(wifi_manager_ap_h, int, ffi.Pointer)>(); - - /// @brief Sets the config type of IP. - /// @details If you set IP config type to #WIFI_MANAGER_IP_CONFIG_TYPE_STATIC, - /// then IP address, Gateway and Subnet mask will be set to the initial value "0.0.0.0". - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[in] type The type of IP config - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_update_ap() - int wifi_manager_ap_set_ip_config_type( - wifi_manager_ap_h ap, - int address_family, - int type, - ) { - return _wifi_manager_ap_set_ip_config_type( - ap, - address_family, - type, - ); - } - - late final _wifi_manager_ap_set_ip_config_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Int32)>>('wifi_manager_ap_set_ip_config_type'); - late final _wifi_manager_ap_set_ip_config_type = - _wifi_manager_ap_set_ip_config_typePtr - .asFunction(); - - /// @brief Gets the IP address. - /// @since_tizen 3.0 - /// @remarks You must release @a ip_address using free(). - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[out] ip_address The IP address; this value is for default address \n - /// e.g, IPv6 can have multiple addresses. but you can only obtain a representative address \n - /// if you want to get all IPv6 address, you can use the wifi_manager_ap_foreach_ipv6_address(). - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_ap_foreach_ipv6_address() - int wifi_manager_ap_get_ip_address( - wifi_manager_ap_h ap, - int address_family, - ffi.Pointer> ip_address, - ) { - return _wifi_manager_ap_get_ip_address( - ap, - address_family, - ip_address, - ); - } - - late final _wifi_manager_ap_get_ip_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Pointer>)>>( - 'wifi_manager_ap_get_ip_address'); - late final _wifi_manager_ap_get_ip_address = - _wifi_manager_ap_get_ip_addressPtr.asFunction< - int Function( - wifi_manager_ap_h, int, ffi.Pointer>)>(); - - /// @brief Sets the IP address. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[in] ip_address The IP address; if you set this value to NULL, then the existing value will be deleted - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_update_ap() - int wifi_manager_ap_set_ip_address( - wifi_manager_ap_h ap, - int address_family, - ffi.Pointer ip_address, - ) { - return _wifi_manager_ap_set_ip_address( - ap, - address_family, - ip_address, - ); - } - - late final _wifi_manager_ap_set_ip_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Pointer)>>('wifi_manager_ap_set_ip_address'); - late final _wifi_manager_ap_set_ip_address = - _wifi_manager_ap_set_ip_addressPtr.asFunction< - int Function(wifi_manager_ap_h, int, ffi.Pointer)>(); - - /// @brief Gets all IPv6 addresses assigned to the Wi-Fi interface. - /// @since_tizen 4.0 - /// @param[in] ap The access point handle - /// @param[in] callback The callback to be called for each IPv6 address - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value. - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_foreach_ipv6_address( - wifi_manager_ap_h ap, - wifi_manager_ap_ipv6_address_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_ap_foreach_ipv6_address( - ap, - callback, - user_data, - ); - } - - late final _wifi_manager_ap_foreach_ipv6_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, wifi_manager_ap_ipv6_address_cb, - ffi.Pointer)>>('wifi_manager_ap_foreach_ipv6_address'); - late final _wifi_manager_ap_foreach_ipv6_address = - _wifi_manager_ap_foreach_ipv6_addressPtr.asFunction< - int Function(wifi_manager_ap_h, wifi_manager_ap_ipv6_address_cb, - ffi.Pointer)>(); - - /// @brief Gets the subnet mask. - /// @since_tizen 3.0 - /// @remarks You must release @a subnet_mask using free(). - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[out] subnet_mask The subnet mask - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_subnet_mask( - wifi_manager_ap_h ap, - int address_family, - ffi.Pointer> subnet_mask, - ) { - return _wifi_manager_ap_get_subnet_mask( - ap, - address_family, - subnet_mask, - ); - } - - late final _wifi_manager_ap_get_subnet_maskPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Pointer>)>>( - 'wifi_manager_ap_get_subnet_mask'); - late final _wifi_manager_ap_get_subnet_mask = - _wifi_manager_ap_get_subnet_maskPtr.asFunction< - int Function( - wifi_manager_ap_h, int, ffi.Pointer>)>(); - - /// @brief Sets the subnet mask. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[in] subnet_mask The subnet mask; if you set this value to NULL, then the existing value will be deleted - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_update_ap() - int wifi_manager_ap_set_subnet_mask( - wifi_manager_ap_h ap, - int address_family, - ffi.Pointer subnet_mask, - ) { - return _wifi_manager_ap_set_subnet_mask( - ap, - address_family, - subnet_mask, - ); - } - - late final _wifi_manager_ap_set_subnet_maskPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Pointer)>>('wifi_manager_ap_set_subnet_mask'); - late final _wifi_manager_ap_set_subnet_mask = - _wifi_manager_ap_set_subnet_maskPtr.asFunction< - int Function(wifi_manager_ap_h, int, ffi.Pointer)>(); - - /// @brief Gets the gateway address. - /// @since_tizen 3.0 - /// @remarks You must release @a gateway_address using free(). - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[out] gateway_address The gateway address - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_gateway_address( - wifi_manager_ap_h ap, - int address_family, - ffi.Pointer> gateway_address, - ) { - return _wifi_manager_ap_get_gateway_address( - ap, - address_family, - gateway_address, - ); - } - - late final _wifi_manager_ap_get_gateway_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Pointer>)>>( - 'wifi_manager_ap_get_gateway_address'); - late final _wifi_manager_ap_get_gateway_address = - _wifi_manager_ap_get_gateway_addressPtr.asFunction< - int Function( - wifi_manager_ap_h, int, ffi.Pointer>)>(); - - /// @brief Sets the gateway address. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[in] gateway_address The gateway address \n - /// If you set this value to @c NULL, then the existing value will be deleted. - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_update_ap() - int wifi_manager_ap_set_gateway_address( - wifi_manager_ap_h ap, - int address_family, - ffi.Pointer gateway_address, - ) { - return _wifi_manager_ap_set_gateway_address( - ap, - address_family, - gateway_address, - ); - } - - late final _wifi_manager_ap_set_gateway_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Pointer)>>('wifi_manager_ap_set_gateway_address'); - late final _wifi_manager_ap_set_gateway_address = - _wifi_manager_ap_set_gateway_addressPtr.asFunction< - int Function(wifi_manager_ap_h, int, ffi.Pointer)>(); - - /// @brief Gets the DHCP Server address. - /// @since_tizen 4.0 - /// @remarks You must release @a dhcp_server using g_free(). - /// This function is supported only for IPv4 address family. - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[out] dhcp_server The DHCP server address - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_dhcp_server_address( - wifi_manager_ap_h ap, - int address_family, - ffi.Pointer> dhcp_server, - ) { - return _wifi_manager_ap_get_dhcp_server_address( - ap, - address_family, - dhcp_server, - ); - } - - late final _wifi_manager_ap_get_dhcp_server_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Pointer>)>>( - 'wifi_manager_ap_get_dhcp_server_address'); - late final _wifi_manager_ap_get_dhcp_server_address = - _wifi_manager_ap_get_dhcp_server_addressPtr.asFunction< - int Function( - wifi_manager_ap_h, int, ffi.Pointer>)>(); - - /// @brief Gets the DHCP lease duration. - /// @since_tizen 4.0 - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[out] dhcp_lease_duration The DHCP lease duration in seconds - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_dhcp_lease_duration( - wifi_manager_ap_h ap, - int address_family, - ffi.Pointer dhcp_lease_duration, - ) { - return _wifi_manager_ap_get_dhcp_lease_duration( - ap, - address_family, - dhcp_lease_duration, - ); - } - - late final _wifi_manager_ap_get_dhcp_lease_durationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_ap_h, ffi.Int32, ffi.Pointer)>>( - 'wifi_manager_ap_get_dhcp_lease_duration'); - late final _wifi_manager_ap_get_dhcp_lease_duration = - _wifi_manager_ap_get_dhcp_lease_durationPtr.asFunction< - int Function(wifi_manager_ap_h, int, ffi.Pointer)>(); - - /// @brief Gets the proxy address. - /// @since_tizen 3.0 - /// @remarks You must release @a proxy_address using free(). - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[out] proxy_address The proxy address - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_proxy_address( - wifi_manager_ap_h ap, - int address_family, - ffi.Pointer> proxy_address, - ) { - return _wifi_manager_ap_get_proxy_address( - ap, - address_family, - proxy_address, - ); - } - - late final _wifi_manager_ap_get_proxy_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Pointer>)>>( - 'wifi_manager_ap_get_proxy_address'); - late final _wifi_manager_ap_get_proxy_address = - _wifi_manager_ap_get_proxy_addressPtr.asFunction< - int Function( - wifi_manager_ap_h, int, ffi.Pointer>)>(); - - /// @brief Sets the proxy address. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[in] proxy_address The proxy address \n - /// If you set this value to @c NULL, then the existing value will be deleted. - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_update_ap() - int wifi_manager_ap_set_proxy_address( - wifi_manager_ap_h ap, - int address_family, - ffi.Pointer proxy_address, - ) { - return _wifi_manager_ap_set_proxy_address( - ap, - address_family, - proxy_address, - ); - } - - late final _wifi_manager_ap_set_proxy_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Pointer)>>('wifi_manager_ap_set_proxy_address'); - late final _wifi_manager_ap_set_proxy_address = - _wifi_manager_ap_set_proxy_addressPtr.asFunction< - int Function(wifi_manager_ap_h, int, ffi.Pointer)>(); - - /// @brief Gets the Proxy type. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[out] proxy_type The type of proxy - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_proxy_type( - wifi_manager_ap_h ap, - ffi.Pointer proxy_type, - ) { - return _wifi_manager_ap_get_proxy_type( - ap, - proxy_type, - ); - } - - late final _wifi_manager_ap_get_proxy_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_get_proxy_type'); - late final _wifi_manager_ap_get_proxy_type = - _wifi_manager_ap_get_proxy_typePtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer)>(); - - /// @brief Sets the Proxy address. - /// @details If you set Proxy type to #WIFI_MANAGER_PROXY_TYPE_AUTO or #WIFI_MANAGER_PROXY_TYPE_MANUAL, then Proxy will be restored. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[in] proxy_type The type of proxy - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_update_ap() - int wifi_manager_ap_set_proxy_type( - wifi_manager_ap_h ap, - int proxy_type, - ) { - return _wifi_manager_ap_set_proxy_type( - ap, - proxy_type, - ); - } - - late final _wifi_manager_ap_set_proxy_typePtr = _lookup< - ffi.NativeFunction>( - 'wifi_manager_ap_set_proxy_type'); - late final _wifi_manager_ap_set_proxy_type = - _wifi_manager_ap_set_proxy_typePtr - .asFunction(); - - /// @brief Gets the DNS address. - /// @since_tizen 3.0 - /// @remarks The allowance of DNS address is @c 2.You must release @a dns_address using free(). - /// @param[in] ap The access point handle - /// @param[in] order The order of DNS address; it starts from 1, which means first DNS address - /// @param[in] address_family The address family - /// @param[out] dns_address The DNS address - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_dns_address( - wifi_manager_ap_h ap, - int order, - int address_family, - ffi.Pointer> dns_address, - ) { - return _wifi_manager_ap_get_dns_address( - ap, - order, - address_family, - dns_address, - ); - } - - late final _wifi_manager_ap_get_dns_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int, ffi.Int32, - ffi.Pointer>)>>( - 'wifi_manager_ap_get_dns_address'); - late final _wifi_manager_ap_get_dns_address = - _wifi_manager_ap_get_dns_addressPtr.asFunction< - int Function(wifi_manager_ap_h, int, int, - ffi.Pointer>)>(); - - /// @brief Sets the DNS address. - /// @since_tizen 3.0 - /// @remarks The allowance of DNS address is @c 2 \n - /// @param[in] ap The access point handle - /// @param[in] order The order of DNS address \n - /// It starts from @c 1, which means first DNS address. - /// @param[in] address_family The address family - /// @param[in] dns_address The DNS address \n - /// If you set this value to @c NULL, then the existing value will be deleted. - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_update_ap() - int wifi_manager_ap_set_dns_address( - wifi_manager_ap_h ap, - int order, - int address_family, - ffi.Pointer dns_address, - ) { - return _wifi_manager_ap_set_dns_address( - ap, - order, - address_family, - dns_address, - ); - } - - late final _wifi_manager_ap_set_dns_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int, ffi.Int32, - ffi.Pointer)>>('wifi_manager_ap_set_dns_address'); - late final _wifi_manager_ap_set_dns_address = - _wifi_manager_ap_set_dns_addressPtr.asFunction< - int Function(wifi_manager_ap_h, int, int, ffi.Pointer)>(); - - /// @brief Gets the DNS config type. - /// @since_tizen 4.0 - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[out] type The DNS config type - /// @return 0 on success, otherwise negative error value. - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_dns_config_type( - wifi_manager_ap_h ap, - int address_family, - ffi.Pointer type, - ) { - return _wifi_manager_ap_get_dns_config_type( - ap, - address_family, - type, - ); - } - - late final _wifi_manager_ap_get_dns_config_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Pointer)>>('wifi_manager_ap_get_dns_config_type'); - late final _wifi_manager_ap_get_dns_config_type = - _wifi_manager_ap_get_dns_config_typePtr.asFunction< - int Function(wifi_manager_ap_h, int, ffi.Pointer)>(); - - /// @brief Sets the DNS config type. - /// @since_tizen 4.0 - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[in] type The DNS config type - /// @return 0 on success, otherwise negative error value. - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_update_ap() - int wifi_manager_ap_set_dns_config_type( - wifi_manager_ap_h ap, - int address_family, - int type, - ) { - return _wifi_manager_ap_set_dns_config_type( - ap, - address_family, - type, - ); - } - - late final _wifi_manager_ap_set_dns_config_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Int32)>>('wifi_manager_ap_set_dns_config_type'); - late final _wifi_manager_ap_set_dns_config_type = - _wifi_manager_ap_set_dns_config_typePtr - .asFunction(); - - /// @brief Gets the network prefix length. - /// @since_tizen 4.0 - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[out] prefix_len The network prefix length. \n - /// In case of IPv4, it means netmask length \n - /// (also called a prefix, e.g. 8, 16, 24, 32) - /// @return 0 on success, otherwise negative error value. - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_prefix_length( - wifi_manager_ap_h ap, - int address_family, - ffi.Pointer prefix_len, - ) { - return _wifi_manager_ap_get_prefix_length( - ap, - address_family, - prefix_len, - ); - } - - late final _wifi_manager_ap_get_prefix_lengthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Pointer)>>('wifi_manager_ap_get_prefix_length'); - late final _wifi_manager_ap_get_prefix_length = - _wifi_manager_ap_get_prefix_lengthPtr.asFunction< - int Function(wifi_manager_ap_h, int, ffi.Pointer)>(); - - /// @brief Sets the network prefix length. - /// @since_tizen 4.0 - /// @param[in] ap The access point handle - /// @param[in] address_family The address family - /// @param[in] prefix_len The network prefix length. \n - /// In case of IPv4, it means netmask length \n - /// (also called a prefix, e.g. 8, 16, 24, 32) - /// @return 0 on success, otherwise negative error value. - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_update_ap() - int wifi_manager_ap_set_prefix_length( - wifi_manager_ap_h ap, - int address_family, - int prefix_len, - ) { - return _wifi_manager_ap_set_prefix_length( - ap, - address_family, - prefix_len, - ); - } - - late final _wifi_manager_ap_set_prefix_lengthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Int32, - ffi.Int)>>('wifi_manager_ap_set_prefix_length'); - late final _wifi_manager_ap_set_prefix_length = - _wifi_manager_ap_set_prefix_lengthPtr - .asFunction(); - - /// @brief Gets the Wi-Fi disconnect reason from the supplicant. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[out] disconnect_reason The supplicant disconnect reason - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_disconnect_reason( - wifi_manager_ap_h ap, - ffi.Pointer disconnect_reason, - ) { - return _wifi_manager_ap_get_disconnect_reason( - ap, - disconnect_reason, - ); - } - - late final _wifi_manager_ap_get_disconnect_reasonPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Pointer)>>( - 'wifi_manager_ap_get_disconnect_reason'); - late final _wifi_manager_ap_get_disconnect_reason = - _wifi_manager_ap_get_disconnect_reasonPtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer)>(); - - /// @brief Gets the error state. - /// @since_tizen 4.0 - /// @param[in] ap The access point handle - /// @param[out] error_state The Wi-Fi connection error state - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_error_state( - wifi_manager_ap_h ap, - ffi.Pointer error_state, - ) { - return _wifi_manager_ap_get_error_state( - ap, - error_state, - ); - } - - late final _wifi_manager_ap_get_error_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_get_error_state'); - late final _wifi_manager_ap_get_error_state = - _wifi_manager_ap_get_error_statePtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer)>(); - - /// @brief Gets the Wi-Fi Association Status Code from the supplicant. - /// @since_tizen 5.0 - /// @param[in] ap The access point handle - /// @param[out] status_code The supplicant Wi-Fi association status code - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_assoc_status_code( - wifi_manager_ap_h ap, - ffi.Pointer status_code, - ) { - return _wifi_manager_ap_get_assoc_status_code( - ap, - status_code, - ); - } - - late final _wifi_manager_ap_get_assoc_status_codePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Pointer)>>( - 'wifi_manager_ap_get_assoc_status_code'); - late final _wifi_manager_ap_get_assoc_status_code = - _wifi_manager_ap_get_assoc_status_codePtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer)>(); - - /// @brief Gets all VSIE of AP. - /// @since_tizen 5.0 - /// @param[in] ap The access point handle - /// @param[in] callback The callback to be called for each VSIE of AP - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value. - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_foreach_vsie( - wifi_manager_ap_h ap, - wifi_manager_ap_vsie_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_ap_foreach_vsie( - ap, - callback, - user_data, - ); - } - - late final _wifi_manager_ap_foreach_vsiePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, wifi_manager_ap_vsie_cb, - ffi.Pointer)>>('wifi_manager_ap_foreach_vsie'); - late final _wifi_manager_ap_foreach_vsie = - _wifi_manager_ap_foreach_vsiePtr.asFunction< - int Function(wifi_manager_ap_h, wifi_manager_ap_vsie_cb, - ffi.Pointer)>(); - - /// @brief Gets the raw country code. - /// @since_tizen 5.0 - /// @remarks You must release @a country_code using free(). - /// @param[in] ap The access point handle - /// @param[out] country_code The country code, NULL if M/W does not have the country code - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_countrycode( - wifi_manager_ap_h ap, - ffi.Pointer> country_code, - ) { - return _wifi_manager_ap_get_countrycode( - ap, - country_code, - ); - } - - late final _wifi_manager_ap_get_countrycodePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_ap_h, ffi.Pointer>)>>( - 'wifi_manager_ap_get_countrycode'); - late final _wifi_manager_ap_get_countrycode = - _wifi_manager_ap_get_countrycodePtr.asFunction< - int Function( - wifi_manager_ap_h, ffi.Pointer>)>(); - - /// @brief Gets the BSSID list. - /// @since_tizen 5.0 - /// @param[in] ap The access point handle - /// @param[in] callback The callback to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @post This function invokes wifi_manager_found_bssid_cb(). - int wifi_manager_foreach_found_bssid( - wifi_manager_ap_h ap, - wifi_manager_found_bssid_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_foreach_found_bssid( - ap, - callback, - user_data, - ); - } - - late final _wifi_manager_foreach_found_bssidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, wifi_manager_found_bssid_cb, - ffi.Pointer)>>('wifi_manager_foreach_found_bssid'); - late final _wifi_manager_foreach_found_bssid = - _wifi_manager_foreach_found_bssidPtr.asFunction< - int Function(wifi_manager_ap_h, wifi_manager_found_bssid_cb, - ffi.Pointer)>(); - - /// @brief Gets the Wi-Fi security mode. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[out] type The type of Wi-Fi security - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_security_type( - wifi_manager_ap_h ap, - ffi.Pointer type, - ) { - return _wifi_manager_ap_get_security_type( - ap, - type, - ); - } - - late final _wifi_manager_ap_get_security_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_get_security_type'); - late final _wifi_manager_ap_get_security_type = - _wifi_manager_ap_get_security_typePtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer)>(); - - /// @brief Sets the Wi-Fi security mode. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[in] type The type of Wi-Fi security - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_set_security_type( - wifi_manager_ap_h ap, - int type, - ) { - return _wifi_manager_ap_set_security_type( - ap, - type, - ); - } - - late final _wifi_manager_ap_set_security_typePtr = _lookup< - ffi.NativeFunction>( - 'wifi_manager_ap_set_security_type'); - late final _wifi_manager_ap_set_security_type = - _wifi_manager_ap_set_security_typePtr - .asFunction(); - - /// @brief Gets the Wi-Fi encryption type. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[out] type The type of Wi-Fi encryption - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_encryption_type( - wifi_manager_ap_h ap, - ffi.Pointer type, - ) { - return _wifi_manager_ap_get_encryption_type( - ap, - type, - ); - } - - late final _wifi_manager_ap_get_encryption_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_get_encryption_type'); - late final _wifi_manager_ap_get_encryption_type = - _wifi_manager_ap_get_encryption_typePtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer)>(); - - /// @brief Sets the Wi-Fi encryption type. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[in] type The type of Wi-Fi encryption - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_set_encryption_type( - wifi_manager_ap_h ap, - int type, - ) { - return _wifi_manager_ap_set_encryption_type( - ap, - type, - ); - } - - late final _wifi_manager_ap_set_encryption_typePtr = _lookup< - ffi.NativeFunction>( - 'wifi_manager_ap_set_encryption_type'); - late final _wifi_manager_ap_set_encryption_type = - _wifi_manager_ap_set_encryption_typePtr - .asFunction(); - - /// @brief Checks whether the passphrase is required or not. - /// @since_tizen 3.0 - /// @remarks This function is not valid if security type is #WIFI_MANAGER_SECURITY_TYPE_EAP. - /// @param[in] ap The access point handle - /// @param[out] required @c true if passphrase is required, - /// @c false if passphrase is not required. - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_is_passphrase_required( - wifi_manager_ap_h ap, - ffi.Pointer required1, - ) { - return _wifi_manager_ap_is_passphrase_required( - ap, - required1, - ); - } - - late final _wifi_manager_ap_is_passphrase_requiredPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Pointer)>>( - 'wifi_manager_ap_is_passphrase_required'); - late final _wifi_manager_ap_is_passphrase_required = - _wifi_manager_ap_is_passphrase_requiredPtr - .asFunction)>(); - - /// @brief Sets the passphrase. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[in] passphrase The passphrase of access point - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_set_passphrase( - wifi_manager_ap_h ap, - ffi.Pointer passphrase, - ) { - return _wifi_manager_ap_set_passphrase( - ap, - passphrase, - ); - } - - late final _wifi_manager_ap_set_passphrasePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_set_passphrase'); - late final _wifi_manager_ap_set_passphrase = - _wifi_manager_ap_set_passphrasePtr - .asFunction)>(); - - /// @brief Checks whether the WPS(Wi-Fi Protected Setup) is supported or not. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[out] supported @c true if WPS is supported, - /// otherwise @c false is WPS is not supported. - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_connect_by_wps_pbc() - /// @see wifi_manager_connect_by_wps_pin() - int wifi_manager_ap_is_wps_supported( - wifi_manager_ap_h ap, - ffi.Pointer supported, - ) { - return _wifi_manager_ap_is_wps_supported( - ap, - supported, - ); - } - - late final _wifi_manager_ap_is_wps_supportedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_is_wps_supported'); - late final _wifi_manager_ap_is_wps_supported = - _wifi_manager_ap_is_wps_supportedPtr - .asFunction)>(); - - /// @brief Sets the passphrase of EAP. - /// @details You can set one of @a user_name and @a password as @c NULL. - /// In this case, the value of a parameter which is set as @c NULL will be the previous value. - /// But it is not allowed that both @a user_name and @a password are set as @c NULL. - /// @since_tizen 3.0 - /// @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_PEAP or #WIFI_MANAGER_EAP_TYPE_TTLS. - /// @param[in] ap The access point handle - /// @param[in] user_name The user name \n - /// This value can be @c NULL. - /// @param[in] password The password \n - /// This value can be @c NULL. - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_set_eap_passphrase( - wifi_manager_ap_h ap, - ffi.Pointer user_name, - ffi.Pointer password, - ) { - return _wifi_manager_ap_set_eap_passphrase( - ap, - user_name, - password, - ); - } - - late final _wifi_manager_ap_set_eap_passphrasePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Pointer, - ffi.Pointer)>>('wifi_manager_ap_set_eap_passphrase'); - late final _wifi_manager_ap_set_eap_passphrase = - _wifi_manager_ap_set_eap_passphrasePtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the passphrase of EAP. - /// @since_tizen 3.0 - /// @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_PEAP or #WIFI_MANAGER_EAP_TYPE_TTLS. - /// You must release @a user_name using free(). - /// @param[in] ap The access point handle - /// @param[out] user_name The user name - /// @param[out] is_password_set @c true if password is set, - /// otherwise @c false if password is not set. - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_eap_passphrase( - wifi_manager_ap_h ap, - ffi.Pointer> user_name, - ffi.Pointer is_password_set, - ) { - return _wifi_manager_ap_get_eap_passphrase( - ap, - user_name, - is_password_set, - ); - } - - late final _wifi_manager_ap_get_eap_passphrasePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_ap_h, - ffi.Pointer>, - ffi.Pointer)>>('wifi_manager_ap_get_eap_passphrase'); - late final _wifi_manager_ap_get_eap_passphrase = - _wifi_manager_ap_get_eap_passphrasePtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Gets the CA Certificate of EAP. - /// @since_tizen 3.0 - /// @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_TLS. - /// You must release @a file using free(). - /// @param[in] ap The access point handle - /// @param[out] file The file path of CA Certificate - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_eap_ca_cert_file( - wifi_manager_ap_h ap, - ffi.Pointer> file, - ) { - return _wifi_manager_ap_get_eap_ca_cert_file( - ap, - file, - ); - } - - late final _wifi_manager_ap_get_eap_ca_cert_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_ap_h, ffi.Pointer>)>>( - 'wifi_manager_ap_get_eap_ca_cert_file'); - late final _wifi_manager_ap_get_eap_ca_cert_file = - _wifi_manager_ap_get_eap_ca_cert_filePtr.asFunction< - int Function( - wifi_manager_ap_h, ffi.Pointer>)>(); - - /// @brief Sets the CA Certificate of EAP. - /// @since_tizen 3.0 - /// @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_TLS. - /// @param[in] ap The access point handle - /// @param[in] file The file path of CA Certificate - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_set_eap_ca_cert_file( - wifi_manager_ap_h ap, - ffi.Pointer file, - ) { - return _wifi_manager_ap_set_eap_ca_cert_file( - ap, - file, - ); - } - - late final _wifi_manager_ap_set_eap_ca_cert_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_set_eap_ca_cert_file'); - late final _wifi_manager_ap_set_eap_ca_cert_file = - _wifi_manager_ap_set_eap_ca_cert_filePtr - .asFunction)>(); - - /// @brief Gets the Client Certificate of EAP. - /// @since_tizen 3.0 - /// @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_TLS. - /// You must release @a file using free(). - /// @param[in] ap The access point handle - /// @param[out] file The file path of Client Certificate - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_eap_client_cert_file( - wifi_manager_ap_h ap, - ffi.Pointer> file, - ) { - return _wifi_manager_ap_get_eap_client_cert_file( - ap, - file, - ); - } - - late final _wifi_manager_ap_get_eap_client_cert_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_ap_h, ffi.Pointer>)>>( - 'wifi_manager_ap_get_eap_client_cert_file'); - late final _wifi_manager_ap_get_eap_client_cert_file = - _wifi_manager_ap_get_eap_client_cert_filePtr.asFunction< - int Function( - wifi_manager_ap_h, ffi.Pointer>)>(); - - /// @brief Sets the CA Certificate of EAP. - /// @since_tizen 3.0 - /// @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_TLS. - /// @param[in] ap The access point handle - /// @param[in] file The file path of Client Certificate - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_set_eap_client_cert_file( - wifi_manager_ap_h ap, - ffi.Pointer file, - ) { - return _wifi_manager_ap_set_eap_client_cert_file( - ap, - file, - ); - } - - late final _wifi_manager_ap_set_eap_client_cert_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Pointer)>>( - 'wifi_manager_ap_set_eap_client_cert_file'); - late final _wifi_manager_ap_set_eap_client_cert_file = - _wifi_manager_ap_set_eap_client_cert_filePtr - .asFunction)>(); - - /// @brief Gets the private key file of EAP. - /// @since_tizen 3.0 - /// @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_TLS. - /// You must release @a file using free(). - /// @param[in] ap The access point handle - /// @param[out] file The file path of private key - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_eap_private_key_file( - wifi_manager_ap_h ap, - ffi.Pointer> file, - ) { - return _wifi_manager_ap_get_eap_private_key_file( - ap, - file, - ); - } - - late final _wifi_manager_ap_get_eap_private_key_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_ap_h, ffi.Pointer>)>>( - 'wifi_manager_ap_get_eap_private_key_file'); - late final _wifi_manager_ap_get_eap_private_key_file = - _wifi_manager_ap_get_eap_private_key_filePtr.asFunction< - int Function( - wifi_manager_ap_h, ffi.Pointer>)>(); - - /// @brief Sets the private key information of EAP. - /// @since_tizen 3.0 - /// @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_TLS. - /// @param[in] ap The access point handle - /// @param[in] file The file path of private key - /// @param[in] password The password - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_set_eap_private_key_info( - wifi_manager_ap_h ap, - ffi.Pointer file, - ffi.Pointer password, - ) { - return _wifi_manager_ap_set_eap_private_key_info( - ap, - file, - password, - ); - } - - late final _wifi_manager_ap_set_eap_private_key_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, ffi.Pointer, - ffi.Pointer)>>( - 'wifi_manager_ap_set_eap_private_key_info'); - late final _wifi_manager_ap_set_eap_private_key_info = - _wifi_manager_ap_set_eap_private_key_infoPtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the EAP type of Wi-Fi. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[out] type The type of EAP - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_eap_type( - wifi_manager_ap_h ap, - ffi.Pointer type, - ) { - return _wifi_manager_ap_get_eap_type( - ap, - type, - ); - } - - late final _wifi_manager_ap_get_eap_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_get_eap_type'); - late final _wifi_manager_ap_get_eap_type = _wifi_manager_ap_get_eap_typePtr - .asFunction)>(); - - /// @brief Sets the EAP type of Wi-Fi. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[in] type The type of EAP - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_set_eap_type( - wifi_manager_ap_h ap, - int type, - ) { - return _wifi_manager_ap_set_eap_type( - ap, - type, - ); - } - - late final _wifi_manager_ap_set_eap_typePtr = _lookup< - ffi.NativeFunction>( - 'wifi_manager_ap_set_eap_type'); - late final _wifi_manager_ap_set_eap_type = _wifi_manager_ap_set_eap_typePtr - .asFunction(); - - /// @brief Gets the type of EAP phase2 authentication of Wi-Fi. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[out] type The type of EAP phase2 authentication - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_get_eap_auth_type( - wifi_manager_ap_h ap, - ffi.Pointer type, - ) { - return _wifi_manager_ap_get_eap_auth_type( - ap, - type, - ); - } - - late final _wifi_manager_ap_get_eap_auth_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_ap_h, - ffi.Pointer)>>('wifi_manager_ap_get_eap_auth_type'); - late final _wifi_manager_ap_get_eap_auth_type = - _wifi_manager_ap_get_eap_auth_typePtr.asFunction< - int Function(wifi_manager_ap_h, ffi.Pointer)>(); - - /// @brief Sets the type of EAP phase2 authentication of Wi-Fi. - /// @since_tizen 3.0 - /// @param[in] ap The access point handle - /// @param[in] type The type of EAP phase2 authentication - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ap_set_eap_auth_type( - wifi_manager_ap_h ap, - int type, - ) { - return _wifi_manager_ap_set_eap_auth_type( - ap, - type, - ); - } - - late final _wifi_manager_ap_set_eap_auth_typePtr = _lookup< - ffi.NativeFunction>( - 'wifi_manager_ap_set_eap_auth_type'); - late final _wifi_manager_ap_set_eap_auth_type = - _wifi_manager_ap_set_eap_auth_typePtr - .asFunction(); - - /// @brief Gets access point configuration handle. - /// @since_tizen 3.0 - /// @remarks You must release @a config using wifi_manager_config_destroy(). - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] name The access point name - /// @param[in] passphrase The access point passphrase - /// @param[in] security_type The access point security type - /// @param[out] config The access point configuration handle - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @pre This function needs a wifi_manager_initialize() call before use - /// @see wifi_manager_config_destroy() - int wifi_manager_config_create( - wifi_manager_h wifi, - ffi.Pointer name, - ffi.Pointer passphrase, - int security_type, - ffi.Pointer config, - ) { - return _wifi_manager_config_create( - wifi, - name, - passphrase, - security_type, - config, - ); - } - - late final _wifi_manager_config_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>( - 'wifi_manager_config_create'); - late final _wifi_manager_config_create = - _wifi_manager_config_createPtr.asFunction< - int Function( - wifi_manager_h, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - - /// @brief Clones the access point configuration handle. - /// @since_tizen 3.0 - /// @remarks You must release @a cloned_config using wifi_manager_config_destroy(). - /// - /// @param[in] origin The origin access point configuration handle - /// @param[out] cloned_config The cloned access point configuration handle - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_config_destroy() - int wifi_manager_config_clone( - wifi_manager_config_h origin, - ffi.Pointer cloned_config, - ) { - return _wifi_manager_config_clone( - origin, - cloned_config, - ); - } - - late final _wifi_manager_config_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_config_h, ffi.Pointer)>>( - 'wifi_manager_config_clone'); - late final _wifi_manager_config_clone = - _wifi_manager_config_clonePtr.asFunction< - int Function( - wifi_manager_config_h, ffi.Pointer)>(); - - /// @brief Destroys the access point configuration handle. - /// @since_tizen 3.0 - /// - /// @param[in] config The access point configuration handle - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_config_create() - /// @see wifi_manager_config_clone() - int wifi_manager_config_destroy( - wifi_manager_config_h config, - ) { - return _wifi_manager_config_destroy( - config, - ); - } - - late final _wifi_manager_config_destroyPtr = - _lookup>( - 'wifi_manager_config_destroy'); - late final _wifi_manager_config_destroy = _wifi_manager_config_destroyPtr - .asFunction(); - - /// @brief Saves Wi-Fi configuration of access point. - /// @details When a configuration is changed, these changes will be not applied to the Connection Manager immediately.\n - /// When you call this function, your changes affect the Connection Manager and the existing configuration is updated. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] config The access point configuration handle - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_config_create() - int wifi_manager_config_save( - wifi_manager_h wifi, - wifi_manager_config_h config, - ) { - return _wifi_manager_config_save( - wifi, - config, - ); - } - - late final _wifi_manager_config_savePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, - wifi_manager_config_h)>>('wifi_manager_config_save'); - late final _wifi_manager_config_save = _wifi_manager_config_savePtr - .asFunction(); - - /// @brief Removes Wi-Fi configuration of access point. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] config The access point configuration handle - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_config_create() - /// @see wifi_manager_config_foreach_configuration() - int wifi_manager_config_remove( - wifi_manager_h wifi, - wifi_manager_config_h config, - ) { - return _wifi_manager_config_remove( - wifi, - config, - ); - } - - late final _wifi_manager_config_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, - wifi_manager_config_h)>>('wifi_manager_config_remove'); - late final _wifi_manager_config_remove = _wifi_manager_config_removePtr - .asFunction(); - - /// @brief Gets configurations of an access point. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.profile - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback to be called - /// @param[in] user_data The user data passed to the callback function - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @pre This function needs wifi_manager_initialize() before use. - /// @post This function invokes wifi_manager_config_list_cb(). - int wifi_manager_config_foreach_configuration( - wifi_manager_h wifi, - wifi_manager_config_list_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_config_foreach_configuration( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_config_foreach_configurationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_config_list_cb, - ffi.Pointer)>>( - 'wifi_manager_config_foreach_configuration'); - late final _wifi_manager_config_foreach_configuration = - _wifi_manager_config_foreach_configurationPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_config_list_cb, - ffi.Pointer)>(); - - /// @brief Gets the name of access point from configuration. - /// @since_tizen 3.0 - /// @remarks You must release @a name using free(). - /// - /// @param[in] config The access point configuration handle - /// @param[out] name The name of access point - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_config_get_name( - wifi_manager_config_h config, - ffi.Pointer> name, - ) { - return _wifi_manager_config_get_name( - config, - name, - ); - } - - late final _wifi_manager_config_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_config_h, ffi.Pointer>)>>( - 'wifi_manager_config_get_name'); - late final _wifi_manager_config_get_name = - _wifi_manager_config_get_namePtr.asFunction< - int Function( - wifi_manager_config_h, ffi.Pointer>)>(); - - /// @brief Gets the security type of access point from configuration. - /// @since_tizen 3.0 - /// - /// @param[in] config The access point configuration handle - /// @param[out] security_type The security type of access point - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_config_get_security_type( - wifi_manager_config_h config, - ffi.Pointer security_type, - ) { - return _wifi_manager_config_get_security_type( - config, - security_type, - ); - } - - late final _wifi_manager_config_get_security_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Pointer)>>( - 'wifi_manager_config_get_security_type'); - late final _wifi_manager_config_get_security_type = - _wifi_manager_config_get_security_typePtr.asFunction< - int Function(wifi_manager_config_h, ffi.Pointer)>(); - - /// @brief Sets access point proxy address configuration. - /// @since_tizen 3.0 - /// - /// @param[in] config The access point configuration handle - /// @param[in] address_family The address family - /// @param[in] proxy_address The proxy address - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_config_save() - int wifi_manager_config_set_proxy_address( - wifi_manager_config_h config, - int address_family, - ffi.Pointer proxy_address, - ) { - return _wifi_manager_config_set_proxy_address( - config, - address_family, - proxy_address, - ); - } - - late final _wifi_manager_config_set_proxy_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Int32, - ffi.Pointer)>>('wifi_manager_config_set_proxy_address'); - late final _wifi_manager_config_set_proxy_address = - _wifi_manager_config_set_proxy_addressPtr.asFunction< - int Function(wifi_manager_config_h, int, ffi.Pointer)>(); - - /// @brief Gets the proxy address of access point from configuration. - /// @since_tizen 3.0 - /// @remarks You must release @a proxy_address using free(). - /// - /// @param[in] config The access point configuration handle - /// @param[out] address_family The address family - /// @param[out] proxy_address The proxy address - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_config_get_proxy_address( - wifi_manager_config_h config, - ffi.Pointer address_family, - ffi.Pointer> proxy_address, - ) { - return _wifi_manager_config_get_proxy_address( - config, - address_family, - proxy_address, - ); - } - - late final _wifi_manager_config_get_proxy_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Pointer, - ffi.Pointer>)>>( - 'wifi_manager_config_get_proxy_address'); - late final _wifi_manager_config_get_proxy_address = - _wifi_manager_config_get_proxy_addressPtr.asFunction< - int Function(wifi_manager_config_h, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Sets the hidden property of access point from the configuration. - /// @since_tizen 3.0 - /// - /// @param[in] config The access point configuration handle - /// @param[in] is_hidden The new value of the hidden property - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_config_save() - int wifi_manager_config_set_hidden_ap_property( - wifi_manager_config_h config, - bool is_hidden, - ) { - return _wifi_manager_config_set_hidden_ap_property( - config, - is_hidden, - ); - } - - late final _wifi_manager_config_set_hidden_ap_propertyPtr = _lookup< - ffi - .NativeFunction>( - 'wifi_manager_config_set_hidden_ap_property'); - late final _wifi_manager_config_set_hidden_ap_property = - _wifi_manager_config_set_hidden_ap_propertyPtr - .asFunction(); - - /// @brief Gets the hidden property of access point from the configuration. - /// @since_tizen 3.0 - /// - /// @param[in] config The access point configuration handle - /// @param[out] is_hidden The hidden property of access point - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_config_get_hidden_ap_property( - wifi_manager_config_h config, - ffi.Pointer is_hidden, - ) { - return _wifi_manager_config_get_hidden_ap_property( - config, - is_hidden, - ); - } - - late final _wifi_manager_config_get_hidden_ap_propertyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Pointer)>>( - 'wifi_manager_config_get_hidden_ap_property'); - late final _wifi_manager_config_get_hidden_ap_property = - _wifi_manager_config_get_hidden_ap_propertyPtr.asFunction< - int Function(wifi_manager_config_h, ffi.Pointer)>(); - - /// @brief Gets access point IP config type from configuration. - /// @since_tizen 5.0 - /// - /// @param[in] config The access point configuration handle - /// @param[in] address_family The address family - /// @param[out] type The type of IP configuration - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_config_get_ip_config_type( - wifi_manager_config_h config, - int address_family, - ffi.Pointer type, - ) { - return _wifi_manager_config_get_ip_config_type( - config, - address_family, - type, - ); - } - - late final _wifi_manager_config_get_ip_config_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_config_h, ffi.Int32, ffi.Pointer)>>( - 'wifi_manager_config_get_ip_config_type'); - late final _wifi_manager_config_get_ip_config_type = - _wifi_manager_config_get_ip_config_typePtr.asFunction< - int Function(wifi_manager_config_h, int, ffi.Pointer)>(); - - /// @brief Sets access point IP config type to configuration. - /// @since_tizen 5.0 - /// - /// @param[in] config The access point configuration handle - /// @param[in] address_family The address family - /// @param[in] type The type of IP configuration - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_config_save() - int wifi_manager_config_set_ip_config_type( - wifi_manager_config_h config, - int address_family, - int type, - ) { - return _wifi_manager_config_set_ip_config_type( - config, - address_family, - type, - ); - } - - late final _wifi_manager_config_set_ip_config_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Int32, - ffi.Int32)>>('wifi_manager_config_set_ip_config_type'); - late final _wifi_manager_config_set_ip_config_type = - _wifi_manager_config_set_ip_config_typePtr - .asFunction(); - - /// @brief Gets access point IP address from configuration. - /// @since_tizen 5.0 - /// @remarks You must release @a ip_address using free(). - /// - /// @param[in] config The access point configuration handle - /// @param[in] address_family The address family - /// @param[out] ip_address The IP address; this value is for default address - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_config_get_ip_address( - wifi_manager_config_h config, - int address_family, - ffi.Pointer> ip_address, - ) { - return _wifi_manager_config_get_ip_address( - config, - address_family, - ip_address, - ); - } - - late final _wifi_manager_config_get_ip_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Int32, - ffi.Pointer>)>>( - 'wifi_manager_config_get_ip_address'); - late final _wifi_manager_config_get_ip_address = - _wifi_manager_config_get_ip_addressPtr.asFunction< - int Function(wifi_manager_config_h, int, - ffi.Pointer>)>(); - - /// @brief Sets access point IP address to configuration. - /// @since_tizen 5.0 - /// - /// @param[in] config The access point configuration handle - /// @param[in] address_family The address family - /// @param[in] ip_address The IP address; if you set this value to NULL, then - /// the existing value will be deleted. - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_config_save() - int wifi_manager_config_set_ip_address( - wifi_manager_config_h config, - int address_family, - ffi.Pointer ip_address, - ) { - return _wifi_manager_config_set_ip_address( - config, - address_family, - ip_address, - ); - } - - late final _wifi_manager_config_set_ip_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Int32, - ffi.Pointer)>>('wifi_manager_config_set_ip_address'); - late final _wifi_manager_config_set_ip_address = - _wifi_manager_config_set_ip_addressPtr.asFunction< - int Function(wifi_manager_config_h, int, ffi.Pointer)>(); - - /// @brief Gets access point subnet mask from configuration. - /// @since_tizen 5.0 - /// @remarks You must release @a subnet_mask using free(). - /// - /// @param[in] config The access point configuration handle - /// @param[in] address_family The address family - /// @param[out] subnet_mask The subnet mask - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_config_get_subnet_mask( - wifi_manager_config_h config, - int address_family, - ffi.Pointer> subnet_mask, - ) { - return _wifi_manager_config_get_subnet_mask( - config, - address_family, - subnet_mask, - ); - } - - late final _wifi_manager_config_get_subnet_maskPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Int32, - ffi.Pointer>)>>( - 'wifi_manager_config_get_subnet_mask'); - late final _wifi_manager_config_get_subnet_mask = - _wifi_manager_config_get_subnet_maskPtr.asFunction< - int Function(wifi_manager_config_h, int, - ffi.Pointer>)>(); - - /// @brief Sets access point subnet mask to configuration. - /// @since_tizen 5.0 - /// - /// @param[in] config The access point configuration handle - /// @param[in] address_family The address family - /// @param[in] subnet_mask The subnet mask; if you set this value to NULL, then - /// the existing value will be deleted. - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_config_save() - int wifi_manager_config_set_subnet_mask( - wifi_manager_config_h config, - int address_family, - ffi.Pointer subnet_mask, - ) { - return _wifi_manager_config_set_subnet_mask( - config, - address_family, - subnet_mask, - ); - } - - late final _wifi_manager_config_set_subnet_maskPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Int32, - ffi.Pointer)>>('wifi_manager_config_set_subnet_mask'); - late final _wifi_manager_config_set_subnet_mask = - _wifi_manager_config_set_subnet_maskPtr.asFunction< - int Function(wifi_manager_config_h, int, ffi.Pointer)>(); - - /// @brief Gets the network prefix length from configuration. - /// @since_tizen 5.0 - /// - /// @param[in] config The access point configuration handle - /// @param[in] address_family The address family - /// @param[out] prefix_len The network prefix length. \n - /// In case of IPv4, it means netmask length \n - /// (also called a prefix, e.g. 8, 16, 24, 32) - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_config_get_prefix_length( - wifi_manager_config_h config, - int address_family, - ffi.Pointer prefix_len, - ) { - return _wifi_manager_config_get_prefix_length( - config, - address_family, - prefix_len, - ); - } - - late final _wifi_manager_config_get_prefix_lengthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Int32, - ffi.Pointer)>>('wifi_manager_config_get_prefix_length'); - late final _wifi_manager_config_get_prefix_length = - _wifi_manager_config_get_prefix_lengthPtr.asFunction< - int Function(wifi_manager_config_h, int, ffi.Pointer)>(); - - /// @brief Sets the network prefix length to configuration. - /// @since_tizen 5.0 - /// - /// @param[in] config The access point configuration handle - /// @param[in] address_family The address family - /// @param[in] prefix_len The network prefix length. \n - /// In case of IPv4, it means netmask length \n - /// (also called a prefix, e.g. 8, 16, 24, 32) - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_config_save() - int wifi_manager_config_set_prefix_length( - wifi_manager_config_h config, - int address_family, - int prefix_len, - ) { - return _wifi_manager_config_set_prefix_length( - config, - address_family, - prefix_len, - ); - } - - late final _wifi_manager_config_set_prefix_lengthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Int32, - ffi.Int)>>('wifi_manager_config_set_prefix_length'); - late final _wifi_manager_config_set_prefix_length = - _wifi_manager_config_set_prefix_lengthPtr - .asFunction(); - - /// @brief Gets access point gateway address from configuration. - /// @since_tizen 5.0 - /// @remarks You must release @a gateway_address using free(). - /// - /// @param[in] config The access point configuration handle - /// @param[in] address_family The address family - /// @param[out] gateway_address The gateway address; this value is for default address - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_config_get_gateway_address( - wifi_manager_config_h config, - int address_family, - ffi.Pointer> gateway_address, - ) { - return _wifi_manager_config_get_gateway_address( - config, - address_family, - gateway_address, - ); - } - - late final _wifi_manager_config_get_gateway_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Int32, - ffi.Pointer>)>>( - 'wifi_manager_config_get_gateway_address'); - late final _wifi_manager_config_get_gateway_address = - _wifi_manager_config_get_gateway_addressPtr.asFunction< - int Function(wifi_manager_config_h, int, - ffi.Pointer>)>(); - - /// @brief Sets access point gateway address to configuration. - /// @since_tizen 5.0 - /// - /// @param[in] config The access point configuration handle - /// @param[in] address_family The address family - /// @param[in] gateway_address The gateway address; if you set this value to NULL, then - /// the existing value will be deleted. - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_config_save() - int wifi_manager_config_set_gateway_address( - wifi_manager_config_h config, - int address_family, - ffi.Pointer gateway_address, - ) { - return _wifi_manager_config_set_gateway_address( - config, - address_family, - gateway_address, - ); - } - - late final _wifi_manager_config_set_gateway_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_config_h, ffi.Int32, ffi.Pointer)>>( - 'wifi_manager_config_set_gateway_address'); - late final _wifi_manager_config_set_gateway_address = - _wifi_manager_config_set_gateway_addressPtr.asFunction< - int Function(wifi_manager_config_h, int, ffi.Pointer)>(); - - /// @brief Gets access point dns config type from configuration. - /// @since_tizen 5.0 - /// - /// @param[in] config The access point configuration handle - /// @param[in] address_family The address family - /// @param[out] type The type of dns configuration - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_config_get_dns_config_type( - wifi_manager_config_h config, - int address_family, - ffi.Pointer type, - ) { - return _wifi_manager_config_get_dns_config_type( - config, - address_family, - type, - ); - } - - late final _wifi_manager_config_get_dns_config_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_config_h, ffi.Int32, ffi.Pointer)>>( - 'wifi_manager_config_get_dns_config_type'); - late final _wifi_manager_config_get_dns_config_type = - _wifi_manager_config_get_dns_config_typePtr.asFunction< - int Function(wifi_manager_config_h, int, ffi.Pointer)>(); - - /// @brief Sets access point dns config type to configuration. - /// @since_tizen 5.0 - /// - /// @param[in] config The access point configuration handle - /// @param[in] address_family The address family - /// @param[in] type The type of DNS configuration - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_config_save() - int wifi_manager_config_set_dns_config_type( - wifi_manager_config_h config, - int address_family, - int type, - ) { - return _wifi_manager_config_set_dns_config_type( - config, - address_family, - type, - ); - } - - late final _wifi_manager_config_set_dns_config_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Int32, - ffi.Int32)>>('wifi_manager_config_set_dns_config_type'); - late final _wifi_manager_config_set_dns_config_type = - _wifi_manager_config_set_dns_config_typePtr - .asFunction(); - - /// @brief Gets access point dns address from configuration. - /// @since_tizen 5.0 - /// @remarks The allowance of DNS address is @c 2.You must release @a dns_address using free(). - /// - /// @param[in] config The access point configuration handle - /// @param[in] order The order of DNS address; it starts from 1, which means first DNS address - /// @param[in] address_family The address family - /// @param[out] dns_address The DNS address - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_config_get_dns_address( - wifi_manager_config_h config, - int order, - int address_family, - ffi.Pointer> dns_address, - ) { - return _wifi_manager_config_get_dns_address( - config, - order, - address_family, - dns_address, - ); - } - - late final _wifi_manager_config_get_dns_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Int, ffi.Int32, - ffi.Pointer>)>>( - 'wifi_manager_config_get_dns_address'); - late final _wifi_manager_config_get_dns_address = - _wifi_manager_config_get_dns_addressPtr.asFunction< - int Function(wifi_manager_config_h, int, int, - ffi.Pointer>)>(); - - /// @brief Sets access point dns address to configuration. - /// @since_tizen 5.0 - /// - /// @param[in] config The access point configuration handle - /// @param[in] order The order of DNS address \n - /// It starts from 1, which means first DNS address. - /// @param[in] address_family The address family - /// @param[in] dns_address The dns address; if you set this value to NULL, then - /// the existing value will be deleted. - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_config_save() - int wifi_manager_config_set_dns_address( - wifi_manager_config_h config, - int order, - int address_family, - ffi.Pointer dns_address, - ) { - return _wifi_manager_config_set_dns_address( - config, - order, - address_family, - dns_address, - ); - } - - late final _wifi_manager_config_set_dns_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Int, ffi.Int32, - ffi.Pointer)>>('wifi_manager_config_set_dns_address'); - late final _wifi_manager_config_set_dns_address = - _wifi_manager_config_set_dns_addressPtr.asFunction< - int Function( - wifi_manager_config_h, int, int, ffi.Pointer)>(); - - /// @brief Gets access point anonymous identity from configuration. - /// @since_tizen 3.0 - /// @remarks You must release @a anonymous_identity using free(). - /// - /// @param[in] config The access point configuration handle - /// @param[out] anonymous_identity The anonymous identity of access point - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int wifi_manager_config_get_eap_anonymous_identity( - wifi_manager_config_h config, - ffi.Pointer> anonymous_identity, - ) { - return _wifi_manager_config_get_eap_anonymous_identity( - config, - anonymous_identity, - ); - } - - late final _wifi_manager_config_get_eap_anonymous_identityPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_config_h, ffi.Pointer>)>>( - 'wifi_manager_config_get_eap_anonymous_identity'); - late final _wifi_manager_config_get_eap_anonymous_identity = - _wifi_manager_config_get_eap_anonymous_identityPtr.asFunction< - int Function( - wifi_manager_config_h, ffi.Pointer>)>(); - - /// @brief Sets access point anonymous identity to configuration. - /// @since_tizen 3.0 - /// - /// @param[in] config The access point configuration handle - /// @param[in] anonymous_identity The anonymous identity - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @see wifi_manager_config_save() - int wifi_manager_config_set_eap_anonymous_identity( - wifi_manager_config_h config, - ffi.Pointer anonymous_identity, - ) { - return _wifi_manager_config_set_eap_anonymous_identity( - config, - anonymous_identity, - ); - } - - late final _wifi_manager_config_set_eap_anonymous_identityPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Pointer)>>( - 'wifi_manager_config_set_eap_anonymous_identity'); - late final _wifi_manager_config_set_eap_anonymous_identity = - _wifi_manager_config_set_eap_anonymous_identityPtr.asFunction< - int Function(wifi_manager_config_h, ffi.Pointer)>(); - - /// @brief Gets access point cacert file from configuration. - /// @since_tizen 3.0 - /// @remarks You must release @a ca_cert using free(). - /// @remarks The mediastorage privilege http://tizen.org/privilege/mediastorage is needed \n - /// if @a ca_cert is relevant to media storage.\n - /// The externalstorage privilege http://tizen.org/privilege/externalstorage is needed \n - /// if @a ca_cert is relevant to external storage. - /// - /// @param[in] config The access point configuration handle - /// @param[out] ca_cert The certification authority(CA) certificates file of access point - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int wifi_manager_config_get_eap_ca_cert_file( - wifi_manager_config_h config, - ffi.Pointer> ca_cert, - ) { - return _wifi_manager_config_get_eap_ca_cert_file( - config, - ca_cert, - ); - } - - late final _wifi_manager_config_get_eap_ca_cert_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_config_h, ffi.Pointer>)>>( - 'wifi_manager_config_get_eap_ca_cert_file'); - late final _wifi_manager_config_get_eap_ca_cert_file = - _wifi_manager_config_get_eap_ca_cert_filePtr.asFunction< - int Function( - wifi_manager_config_h, ffi.Pointer>)>(); - - /// @brief Sets access point cacert file to configuration. - /// @since_tizen 3.0 - /// @remarks The mediastorage privilege http://tizen.org/privilege/mediastorage is needed \n - /// if @a ca_cert is relevant to media storage.\n - /// The externalstorage privilege http://tizen.org/privilege/externalstorage is needed \n - /// if @a ca_cert is relevant to external storage. - /// - /// @param[in] config The access point configuration handle - /// @param[in] ca_cert The certification authority(CA) certificates file of access point - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @see wifi_manager_config_save() - int wifi_manager_config_set_eap_ca_cert_file( - wifi_manager_config_h config, - ffi.Pointer ca_cert, - ) { - return _wifi_manager_config_set_eap_ca_cert_file( - config, - ca_cert, - ); - } - - late final _wifi_manager_config_set_eap_ca_cert_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Pointer)>>( - 'wifi_manager_config_set_eap_ca_cert_file'); - late final _wifi_manager_config_set_eap_ca_cert_file = - _wifi_manager_config_set_eap_ca_cert_filePtr.asFunction< - int Function(wifi_manager_config_h, ffi.Pointer)>(); - - /// @brief Gets access point client cert file from configuration. - /// @since_tizen 3.0 - /// @remarks You must release @a client_cert using free(). - /// - /// @param[in] config The access point configuration handle - /// @param[out] client_cert The certification authority(CA) certificates file of access point - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int wifi_manager_config_get_eap_client_cert_file( - wifi_manager_config_h config, - ffi.Pointer> client_cert, - ) { - return _wifi_manager_config_get_eap_client_cert_file( - config, - client_cert, - ); - } - - late final _wifi_manager_config_get_eap_client_cert_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_config_h, ffi.Pointer>)>>( - 'wifi_manager_config_get_eap_client_cert_file'); - late final _wifi_manager_config_get_eap_client_cert_file = - _wifi_manager_config_get_eap_client_cert_filePtr.asFunction< - int Function( - wifi_manager_config_h, ffi.Pointer>)>(); - - /// @brief Sets access point client cert file to configuration. - /// @since_tizen 3.0 - /// - /// @param[in] config The access point configuration handle - /// @param[in] private_key The private key file - /// @param[in] client_cert The certification authority(CA) certificates file of access point - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @see wifi_manager_config_save() - int wifi_manager_config_set_eap_client_cert_file( - wifi_manager_config_h config, - ffi.Pointer private_key, - ffi.Pointer client_cert, - ) { - return _wifi_manager_config_set_eap_client_cert_file( - config, - private_key, - client_cert, - ); - } - - late final _wifi_manager_config_set_eap_client_cert_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Pointer, - ffi.Pointer)>>( - 'wifi_manager_config_set_eap_client_cert_file'); - late final _wifi_manager_config_set_eap_client_cert_file = - _wifi_manager_config_set_eap_client_cert_filePtr.asFunction< - int Function(wifi_manager_config_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the private key file of EAP. - /// @since_tizen 5.0 - /// @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_TLS. - /// You must release @a file using free(). - /// - /// @param[in] config The access point configuration handle - /// @param[out] file The file path of private key - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_config_get_eap_private_key_file( - wifi_manager_config_h config, - ffi.Pointer> file, - ) { - return _wifi_manager_config_get_eap_private_key_file( - config, - file, - ); - } - - late final _wifi_manager_config_get_eap_private_key_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_config_h, ffi.Pointer>)>>( - 'wifi_manager_config_get_eap_private_key_file'); - late final _wifi_manager_config_get_eap_private_key_file = - _wifi_manager_config_get_eap_private_key_filePtr.asFunction< - int Function( - wifi_manager_config_h, ffi.Pointer>)>(); - - /// @brief Sets the private key information of EAP. - /// @since_tizen 5.0 - /// @remarks This function is valid only if the EAP type is #WIFI_MANAGER_EAP_TYPE_TLS. - /// - /// @param[in] config The access point configuration handle - /// @param[in] file The file path of private key - /// @param[in] password The password - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_manager_config_save() - int wifi_manager_config_set_eap_private_key_info( - wifi_manager_config_h config, - ffi.Pointer file, - ffi.Pointer password, - ) { - return _wifi_manager_config_set_eap_private_key_info( - config, - file, - password, - ); - } - - late final _wifi_manager_config_set_eap_private_key_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Pointer, - ffi.Pointer)>>( - 'wifi_manager_config_set_eap_private_key_info'); - late final _wifi_manager_config_set_eap_private_key_info = - _wifi_manager_config_set_eap_private_key_infoPtr.asFunction< - int Function(wifi_manager_config_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets access point identity from configuration. - /// @since_tizen 3.0 - /// @remarks You must release @a identity using free(). - /// - /// @param[in] config The access point configuration handle - /// @param[out] identity The identity of access point - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int wifi_manager_config_get_eap_identity( - wifi_manager_config_h config, - ffi.Pointer> identity, - ) { - return _wifi_manager_config_get_eap_identity( - config, - identity, - ); - } - - late final _wifi_manager_config_get_eap_identityPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_config_h, ffi.Pointer>)>>( - 'wifi_manager_config_get_eap_identity'); - late final _wifi_manager_config_get_eap_identity = - _wifi_manager_config_get_eap_identityPtr.asFunction< - int Function( - wifi_manager_config_h, ffi.Pointer>)>(); - - /// @brief Sets access point identity to configuration. - /// @since_tizen 3.0 - /// - /// @param[in] config The access point configuration handle - /// @param[in] identity The identity - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @see wifi_manager_config_save() - int wifi_manager_config_set_eap_identity( - wifi_manager_config_h config, - ffi.Pointer identity, - ) { - return _wifi_manager_config_set_eap_identity( - config, - identity, - ); - } - - late final _wifi_manager_config_set_eap_identityPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, - ffi.Pointer)>>('wifi_manager_config_set_eap_identity'); - late final _wifi_manager_config_set_eap_identity = - _wifi_manager_config_set_eap_identityPtr.asFunction< - int Function(wifi_manager_config_h, ffi.Pointer)>(); - - /// @brief Gets access point EAP type from configuration. - /// @since_tizen 3.0 - /// - /// @param[in] config The access point configuration handle - /// @param[out] eap_type The EAP type of access point - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int wifi_manager_config_get_eap_type( - wifi_manager_config_h config, - ffi.Pointer eap_type, - ) { - return _wifi_manager_config_get_eap_type( - config, - eap_type, - ); - } - - late final _wifi_manager_config_get_eap_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, - ffi.Pointer)>>('wifi_manager_config_get_eap_type'); - late final _wifi_manager_config_get_eap_type = - _wifi_manager_config_get_eap_typePtr.asFunction< - int Function(wifi_manager_config_h, ffi.Pointer)>(); - - /// @brief Sets access point EAP type to configuration. - /// @since_tizen 3.0 - /// - /// @param[in] config The access point configuration handle - /// @param[in] eap_type The EAP type - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @see wifi_manager_config_save() - int wifi_manager_config_set_eap_type( - wifi_manager_config_h config, - int eap_type, - ) { - return _wifi_manager_config_set_eap_type( - config, - eap_type, - ); - } - - late final _wifi_manager_config_set_eap_typePtr = _lookup< - ffi - .NativeFunction>( - 'wifi_manager_config_set_eap_type'); - late final _wifi_manager_config_set_eap_type = - _wifi_manager_config_set_eap_typePtr - .asFunction(); - - /// @brief Gets access point EAP auth type from configuration. - /// @since_tizen 3.0 - /// - /// @param[in] config The access point configuration handle - /// @param[out] eap_auth_type The EAP auth type of access point - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int wifi_manager_config_get_eap_auth_type( - wifi_manager_config_h config, - ffi.Pointer eap_auth_type, - ) { - return _wifi_manager_config_get_eap_auth_type( - config, - eap_auth_type, - ); - } - - late final _wifi_manager_config_get_eap_auth_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Pointer)>>( - 'wifi_manager_config_get_eap_auth_type'); - late final _wifi_manager_config_get_eap_auth_type = - _wifi_manager_config_get_eap_auth_typePtr.asFunction< - int Function(wifi_manager_config_h, ffi.Pointer)>(); - - /// @brief Sets access point EAP auth type to configuration. - /// @since_tizen 3.0 - /// - /// @param[in] config The access point configuration handle - /// @param[in] eap_auth_type The EAP auth type - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @see wifi_manager_config_save() - int wifi_manager_config_set_eap_auth_type( - wifi_manager_config_h config, - int eap_auth_type, - ) { - return _wifi_manager_config_set_eap_auth_type( - config, - eap_auth_type, - ); - } - - late final _wifi_manager_config_set_eap_auth_typePtr = _lookup< - ffi - .NativeFunction>( - 'wifi_manager_config_set_eap_auth_type'); - late final _wifi_manager_config_set_eap_auth_type = - _wifi_manager_config_set_eap_auth_typePtr - .asFunction(); - - /// @brief Gets access point subject match from configuration. - /// @since_tizen 3.0 - /// @remarks You must release @a subject_match using free(). - /// - /// @param[in] config The access point configuration handle - /// @param[out] subject_match The subject match of access point - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - int wifi_manager_config_get_eap_subject_match( - wifi_manager_config_h config, - ffi.Pointer> subject_match, - ) { - return _wifi_manager_config_get_eap_subject_match( - config, - subject_match, - ); - } - - late final _wifi_manager_config_get_eap_subject_matchPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_config_h, ffi.Pointer>)>>( - 'wifi_manager_config_get_eap_subject_match'); - late final _wifi_manager_config_get_eap_subject_match = - _wifi_manager_config_get_eap_subject_matchPtr.asFunction< - int Function( - wifi_manager_config_h, ffi.Pointer>)>(); - - /// @brief Sets access point subject match to configuration. - /// @since_tizen 3.0 - /// - /// @param[in] config The access point configuration handle - /// @param[in] subject_match The subject match - /// - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @see wifi_manager_config_save() - int wifi_manager_config_set_eap_subject_match( - wifi_manager_config_h config, - ffi.Pointer subject_match, - ) { - return _wifi_manager_config_set_eap_subject_match( - config, - subject_match, - ); - } - - late final _wifi_manager_config_set_eap_subject_matchPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_config_h, ffi.Pointer)>>( - 'wifi_manager_config_set_eap_subject_match'); - late final _wifi_manager_config_set_eap_subject_match = - _wifi_manager_config_set_eap_subject_matchPtr.asFunction< - int Function(wifi_manager_config_h, ffi.Pointer)>(); - - /// @brief Registers the callback called when a TDLS device is found. - /// @since_tizen 4.0 - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_tdls_set_discovered_cb( - wifi_manager_h wifi, - wifi_manager_tdls_discovered_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_tdls_set_discovered_cb( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_tdls_set_discovered_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_tdls_discovered_cb, - ffi.Pointer)>>('wifi_manager_tdls_set_discovered_cb'); - late final _wifi_manager_tdls_set_discovered_cb = - _wifi_manager_tdls_set_discovered_cbPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_tdls_discovered_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback called when TDLS device is found. - /// @since_tizen 4.0 - /// - /// @param[in] wifi The Wi-Fi handle - /// - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_tdls_unset_discovered_cb( - wifi_manager_h wifi, - ) { - return _wifi_manager_tdls_unset_discovered_cb( - wifi, - ); - } - - late final _wifi_manager_tdls_unset_discovered_cbPtr = - _lookup>( - 'wifi_manager_tdls_unset_discovered_cb'); - late final _wifi_manager_tdls_unset_discovered_cb = - _wifi_manager_tdls_unset_discovered_cbPtr - .asFunction(); - - /// @brief Discovers devices that support TDLS. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] peer_mac_addr The MAC address (e.g., ff:ff:ff:ff:ff:ff, - /// AA:BB:CC:DD:EE:FF) of the peer to be discovered - /// - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_tdls_start_discovery( - wifi_manager_h wifi, - ffi.Pointer peer_mac_addr, - ) { - return _wifi_manager_tdls_start_discovery( - wifi, - peer_mac_addr, - ); - } - - late final _wifi_manager_tdls_start_discoveryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, - ffi.Pointer)>>('wifi_manager_tdls_start_discovery'); - late final _wifi_manager_tdls_start_discovery = - _wifi_manager_tdls_start_discoveryPtr - .asFunction)>(); - - /// @brief Connects to a peer device. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] peer_mac_addr The MAC address of the peer device to be connected - /// - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_tdls_connect( - wifi_manager_h wifi, - ffi.Pointer peer_mac_addr, - ) { - return _wifi_manager_tdls_connect( - wifi, - peer_mac_addr, - ); - } - - late final _wifi_manager_tdls_connectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, - ffi.Pointer)>>('wifi_manager_tdls_connect'); - late final _wifi_manager_tdls_connect = _wifi_manager_tdls_connectPtr - .asFunction)>(); - - /// @brief Disconnects the connected peer. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] peer_mac_addr The MAC address of the connected peer - /// - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_tdls_disconnect( - wifi_manager_h wifi, - ffi.Pointer peer_mac_addr, - ) { - return _wifi_manager_tdls_disconnect( - wifi, - peer_mac_addr, - ); - } - - late final _wifi_manager_tdls_disconnectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, - ffi.Pointer)>>('wifi_manager_tdls_disconnect'); - late final _wifi_manager_tdls_disconnect = _wifi_manager_tdls_disconnectPtr - .asFunction)>(); - - /// @brief Gets Peer Mac address of Connected peer. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// - /// @remarks The @a peer_mac_addr should be freed using free(). - /// @param[in] wifi The Wi-Fi handle - /// @param[out] peer_mac_addr The MAC address of the connected peer - /// - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_NO_CONNECTION No active TDLS Connection - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_tdls_get_connected_peer( - wifi_manager_h wifi, - ffi.Pointer> peer_mac_addr, - ) { - return _wifi_manager_tdls_get_connected_peer( - wifi, - peer_mac_addr, - ); - } - - late final _wifi_manager_tdls_get_connected_peerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_manager_h, ffi.Pointer>)>>( - 'wifi_manager_tdls_get_connected_peer'); - late final _wifi_manager_tdls_get_connected_peer = - _wifi_manager_tdls_get_connected_peerPtr.asFunction< - int Function(wifi_manager_h, ffi.Pointer>)>(); - - /// @brief Registers the callback called when TDLS state is changed. - /// @since_tizen 3.0 - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_tdls_set_state_changed_cb( - wifi_manager_h wifi, - wifi_manager_tdls_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_tdls_set_state_changed_cb( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_tdls_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, - wifi_manager_tdls_state_changed_cb, ffi.Pointer)>>( - 'wifi_manager_tdls_set_state_changed_cb'); - late final _wifi_manager_tdls_set_state_changed_cb = - _wifi_manager_tdls_set_state_changed_cbPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_tdls_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback called when TDLS state is changed. - /// @since_tizen 3.0 - /// - /// @param[in] wifi The Wi-Fi handle - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_tdls_unset_state_changed_cb( - wifi_manager_h wifi, - ) { - return _wifi_manager_tdls_unset_state_changed_cb( - wifi, - ); - } - - late final _wifi_manager_tdls_unset_state_changed_cbPtr = - _lookup>( - 'wifi_manager_tdls_unset_state_changed_cb'); - late final _wifi_manager_tdls_unset_state_changed_cb = - _wifi_manager_tdls_unset_state_changed_cbPtr - .asFunction(); - - /// @brief Enables a TDLS channel switching request. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] peer_mac_addr The MAC address of the connected TDLS peer - /// @param[in] freq The new frequency [MHz] - /// - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_tdls_enable_channel_switching( - wifi_manager_h wifi, - ffi.Pointer peer_mac_addr, - int freq, - ) { - return _wifi_manager_tdls_enable_channel_switching( - wifi, - peer_mac_addr, - freq, - ); - } - - late final _wifi_manager_tdls_enable_channel_switchingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, ffi.Pointer, - ffi.Int)>>('wifi_manager_tdls_enable_channel_switching'); - late final _wifi_manager_tdls_enable_channel_switching = - _wifi_manager_tdls_enable_channel_switchingPtr.asFunction< - int Function(wifi_manager_h, ffi.Pointer, int)>(); - - /// @brief Disables a TDLS channel switching request. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] peer_mac_addr The MAC address of the connected TDLS peer - /// - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_tdls_disable_channel_switching( - wifi_manager_h wifi, - ffi.Pointer peer_mac_addr, - ) { - return _wifi_manager_tdls_disable_channel_switching( - wifi, - peer_mac_addr, - ); - } - - late final _wifi_manager_tdls_disable_channel_switchingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, ffi.Pointer)>>( - 'wifi_manager_tdls_disable_channel_switching'); - late final _wifi_manager_tdls_disable_channel_switching = - _wifi_manager_tdls_disable_channel_switchingPtr - .asFunction)>(); - - /// @brief Registers the callback called when IP conflict state is changed. - /// @since_tizen 5.0 - /// @param[in] wifi The Wi-Fi handle - /// @param[in] callback The callback function to be called - /// @param[in] user_data The user data passed to the callback function - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_set_ip_conflict_cb( - wifi_manager_h wifi, - wifi_manager_ip_conflict_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_manager_set_ip_conflict_cb( - wifi, - callback, - user_data, - ); - } - - late final _wifi_manager_set_ip_conflict_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, wifi_manager_ip_conflict_cb, - ffi.Pointer)>>('wifi_manager_set_ip_conflict_cb'); - late final _wifi_manager_set_ip_conflict_cb = - _wifi_manager_set_ip_conflict_cbPtr.asFunction< - int Function(wifi_manager_h, wifi_manager_ip_conflict_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the callback called when IP conflict state is changed. - /// @since_tizen 5.0 - /// @param[in] wifi The Wi-Fi handle - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_unset_ip_conflict_cb( - wifi_manager_h wifi, - ) { - return _wifi_manager_unset_ip_conflict_cb( - wifi, - ); - } - - late final _wifi_manager_unset_ip_conflict_cbPtr = - _lookup>( - 'wifi_manager_unset_ip_conflict_cb'); - late final _wifi_manager_unset_ip_conflict_cb = - _wifi_manager_unset_ip_conflict_cbPtr - .asFunction(); - - /// @brief Enables or disables IP conflict detection. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.set - /// - /// @param[in] wifi The Wi-Fi handle - /// @param[in] detect True or false boolean to enable or disable - /// - /// @return @c 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_set_ip_conflict_detect_enable( - wifi_manager_h wifi, - bool detect, - ) { - return _wifi_manager_set_ip_conflict_detect_enable( - wifi, - detect, - ); - } - - late final _wifi_manager_set_ip_conflict_detect_enablePtr = - _lookup>( - 'wifi_manager_set_ip_conflict_detect_enable'); - late final _wifi_manager_set_ip_conflict_detect_enable = - _wifi_manager_set_ip_conflict_detect_enablePtr - .asFunction(); - - /// @brief Checks whether IP conflict detection is enabled. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] wifi The Wi-Fi handle - /// @param[out] state @c true if IP conflict detection is enabled, - /// otherwise @c false if IP conflict detection is disabled. - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_ip_conflict_detect_is_enabled( - wifi_manager_h wifi, - ffi.Pointer state, - ) { - return _wifi_manager_ip_conflict_detect_is_enabled( - wifi, - state, - ); - } - - late final _wifi_manager_ip_conflict_detect_is_enabledPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, ffi.Pointer)>>( - 'wifi_manager_ip_conflict_detect_is_enabled'); - late final _wifi_manager_ip_conflict_detect_is_enabled = - _wifi_manager_ip_conflict_detect_is_enabledPtr - .asFunction)>(); - - /// @brief Gets the state of the IP conflict. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/network.get - /// @param[in] wifi The Wi-Fi handle - /// @param[out] state The current state of IP conflict - /// @return 0 on success, otherwise negative error value - /// @retval #WIFI_MANAGER_ERROR_NONE Successful - /// @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied - /// @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported - int wifi_manager_get_ip_conflict_state( - wifi_manager_h wifi, - ffi.Pointer state, - ) { - return _wifi_manager_get_ip_conflict_state( - wifi, - state, - ); - } - - late final _wifi_manager_get_ip_conflict_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_manager_h, - ffi.Pointer)>>('wifi_manager_get_ip_conflict_state'); - late final _wifi_manager_get_ip_conflict_state = - _wifi_manager_get_ip_conflict_statePtr - .asFunction)>(); - - /// @brief Initializes Wi-Fi Direct service. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_direct_deinitialize() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// void function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_initialize(); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to initialize\n"); - /// return; - /// } - /// - /// printf("Initialized Successfully\n"); - /// } - /// - /// int main() - /// { - /// function(); // initialize Wi-Fi Direct - /// wifi_direct_deinitialize(); // deinitizlize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_initialize() { - return _wifi_direct_initialize(); - } - - late final _wifi_direct_initializePtr = - _lookup>('wifi_direct_initialize'); - late final _wifi_direct_initialize = - _wifi_direct_initializePtr.asFunction(); - - /// @brief Deinitializes Wi-Fi Direct service. - /// @since_tizen 2.3 - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// void function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_deinitialize(); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to deinitialize\n"); - /// return; - /// } - /// - /// printf("Deinitialized Successfully\n"); - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // initialize Wi-Fi Direct - /// function(); // deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_deinitialize() { - return _wifi_direct_deinitialize(); - } - - late final _wifi_direct_deinitializePtr = - _lookup>( - 'wifi_direct_deinitialize'); - late final _wifi_direct_deinitialize = - _wifi_direct_deinitializePtr.asFunction(); - - /// @brief Sets the callback called when the state of device is changed. - /// @since_tizen 2.3 - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_unset_device_state_changed_cb() - /// @see wifi_direct_device_state_changed_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// void callback(int error_code, - /// Wifi_direct_device_state_e device_state, - /// void *user_data) - /// { - /// switch (device_state) { - /// case WIFI_DIRECT_DEVICE_STATE_ACTIVATED: - /// printf("device activated\n"); - /// - /// //Do stuff here when Wi-Fi Direct is activated - /// - /// break; - /// - /// case WIFI_DIRECT_DEVICE_STATE_DEACTIVATED: - /// printf("device deactivated\n"); - /// - /// //Do stuff here when Wi-Fi Direct is deactivated - /// - /// break; - /// - /// default: - /// break; - /// } - /// } - /// - /// void function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_set_device_state_changed_cb(callback, NULL); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to register callback\n"); - /// return; - /// } - /// - /// printf("callback registered Successfully\n"); - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// function(); - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_set_device_state_changed_cb( - wifi_direct_device_state_changed_cb cb, - ffi.Pointer user_data, - ) { - return _wifi_direct_set_device_state_changed_cb( - cb, - user_data, - ); - } - - late final _wifi_direct_set_device_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_direct_device_state_changed_cb, ffi.Pointer)>>( - 'wifi_direct_set_device_state_changed_cb'); - late final _wifi_direct_set_device_state_changed_cb = - _wifi_direct_set_device_state_changed_cbPtr.asFunction< - int Function( - wifi_direct_device_state_changed_cb, ffi.Pointer)>(); - - /// @brief Unsets the callback called when the state of device is changed. - /// @since_tizen 2.3 - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_set_device_state_changed_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// void function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_unset_device_state_changed_cb(); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to deregister callback\n"); - /// return; - /// } - /// - /// printf("callback deregistered Successfully\n"); - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // initialize Wi-Fi Direct - /// function(); - /// wifi_direct_deinitialize(); // deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_unset_device_state_changed_cb() { - return _wifi_direct_unset_device_state_changed_cb(); - } - - late final _wifi_direct_unset_device_state_changed_cbPtr = - _lookup>( - 'wifi_direct_unset_device_state_changed_cb'); - late final _wifi_direct_unset_device_state_changed_cb = - _wifi_direct_unset_device_state_changed_cbPtr - .asFunction(); - - /// @brief Sets the callback called when the state of discovery is changed. - /// @since_tizen 2.3 - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_unset_discovery_state_changed_cb() - /// @see wifi_direct_discovery_state_chagned_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// void callback(int error_code, - /// wifi_direct_discovery_state_e discovery_state, - /// void *user_data) - /// { - /// switch(discovery_state) { - /// case WIFI_DIRECT_DISCOVERY_STARTED: - /// printf("Discovery started\n"); - /// break; - /// - /// case WIFI_DIRECT_ONLY_LISTEN_STARTED: - /// printf("listen started\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FINISHED: - /// printf("Discovery finished\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FOUND: - /// printf("peer devices found\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_LOST: - /// printf("Discovery lost\n"); - /// break; - /// - /// default: - /// break; - /// } - /// - /// } - /// - /// void function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_set_discovery_state_changed_cb(callback, NULL); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to register callback\n"); - /// return; - /// } - /// - /// printf("callback registered Successfully\n"); - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// function(); - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deintialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_set_discovery_state_changed_cb( - wifi_direct_discovery_state_chagned_cb cb, - ffi.Pointer user_data, - ) { - return _wifi_direct_set_discovery_state_changed_cb( - cb, - user_data, - ); - } - - late final _wifi_direct_set_discovery_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_direct_discovery_state_chagned_cb, - ffi.Pointer)>>( - 'wifi_direct_set_discovery_state_changed_cb'); - late final _wifi_direct_set_discovery_state_changed_cb = - _wifi_direct_set_discovery_state_changed_cbPtr.asFunction< - int Function( - wifi_direct_discovery_state_chagned_cb, ffi.Pointer)>(); - - /// @brief Unsets the callback called when the state of discovery is changed. - /// @since_tizen 2.3 - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_set_discovery_state_changed_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// void function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_unset_discovery_state_changed_cb(); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to deregister callback\n"); - /// return; - /// } - /// - /// printf("callback deregistered Successfully\n"); - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-FI Direct - /// function(); - /// wifi_direct_deactivate(); // Deactivate Wi-FI Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_unset_discovery_state_changed_cb() { - return _wifi_direct_unset_discovery_state_changed_cb(); - } - - late final _wifi_direct_unset_discovery_state_changed_cbPtr = - _lookup>( - 'wifi_direct_unset_discovery_state_changed_cb'); - late final _wifi_direct_unset_discovery_state_changed_cb = - _wifi_direct_unset_discovery_state_changed_cbPtr - .asFunction(); - - /// @brief Sets the callback called when the peer is found. - /// @since_tizen 2.3 - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_unset_peer_found_cb() - /// @see wifi_direct_peer_found_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// void callback(int error_code, - /// wifi_direct_discovery_state_e discovery_state, - /// const char *mac_address, - /// void *user_data) - /// { - /// switch (discovery_state) { - /// case WIFI_DIRECT_DISCOVERY_FOUND: - /// printf("Peer found\n"); - /// printf("MAC Address=%s\n", mac_address); - /// - /// // Do stuff here for discovered devices - /// - /// break; - /// - /// default: - /// break; - /// } - /// } - /// - /// void function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_set_peer_found_cb(callback, NULL); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to register callback\n"); - /// return; - /// } - /// - /// printf("callback registered Successfully\n"); - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// function(); - /// wifi_direct_deactivate(); // Deactivate Wi-FI Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_set_peer_found_cb( - wifi_direct_peer_found_cb cb, - ffi.Pointer user_data, - ) { - return _wifi_direct_set_peer_found_cb( - cb, - user_data, - ); - } - - late final _wifi_direct_set_peer_found_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_direct_peer_found_cb, - ffi.Pointer)>>('wifi_direct_set_peer_found_cb'); - late final _wifi_direct_set_peer_found_cb = - _wifi_direct_set_peer_found_cbPtr.asFunction< - int Function(wifi_direct_peer_found_cb, ffi.Pointer)>(); - - /// @brief Unsets the callback called when the peer is found. - /// @since_tizen 2.3 - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_set_peer_found_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// void function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_unset_peer_found_cb(); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to deregister callback\n"); - /// return; - /// } - /// - /// printf("callback deregistered Successfully\n"); - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// function(); - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_unset_peer_found_cb() { - return _wifi_direct_unset_peer_found_cb(); - } - - late final _wifi_direct_unset_peer_found_cbPtr = - _lookup>( - 'wifi_direct_unset_peer_found_cb'); - late final _wifi_direct_unset_peer_found_cb = - _wifi_direct_unset_peer_found_cbPtr.asFunction(); - - /// @brief Sets the callback called when the state of connection is changed. - /// @since_tizen 2.3 - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_unset_connection_state_changed_cb() - /// @see wifi_direct_connection_state_changed_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// void callback(int error_code, - /// wifi_direct_connection_state_e connection_state, - /// const char *mac_address, - /// void *user_data) - /// { - /// char *ip; - /// bool owner; - /// int wps_mode; - /// - /// switch (connection_state) { - /// - /// case WIFI_DIRECT_CONNECTION_IN_PROGRESS: - /// printf("Connection in progress\n"); - /// break; - /// - /// case WIFI_DIRECT_CONNECTION_RSP: - /// if (error_code == WIFI_DIRECT_ERROR_NONE) { - /// printf("Peer Device Connected\n"); // device is connected - /// - /// printf("MAC=%s\n", mac_address); // device's MAC address - /// - /// wifi_direct_get_ip_address(&ip); - /// printf("IP=%s\n", ip); //device's IP address - /// - /// wifi_direct_is_group_owner(&owner); - /// printf("Ownership=%s\n", (owner)? "GO":"STA"); // (GO or client role) - /// - /// } else if (error_code == WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT) { - /// printf("Connection timeout occurred\n"); - /// } else if (error_code == WIFI_DIRECT_ERROR_AUTH_FAILED) { - /// printf("Connection authorization Failed\n"); - /// } else - /// printf("Connection failed\n"); - /// break; - /// - /// case WIFI_DIRECT_CONNECTION_WPS_REQ: - /// - /// wifi_direct_get_local_wps_type(&wps_mode); - /// - /// if (wps_mode == WIFI_DIRECT_WPS_TYPE_PBC) { - /// printf("Connection type WPS PBC\n"); - /// // Handle WPS PBC case here - /// } - /// - /// if (wps_mode == WIFI_DIRECT_WPS_TYPE_PIN_DISPLAY) { - /// printf("Connection type WPS PIN DISPLAY\n"); - /// // Handle WPS PIN Display case here - /// } - /// - /// if (wps_mode == WIFI_DIRECT_WPS_PIN_KEYPAD) { - /// printf("Connection type WPS PIN KEYPAD\n"); - /// // Handle WPS PIN Keypad case here - /// } - /// break; - /// - /// case WIFI_DIRECT_CONNECTION_REQ: - /// printf("Connection request from MAC %s\n", mac_address); - /// - /// // Handle the connection request from peer device here - /// // 1. WPS PBC - /// // 2. WPS PIN Display - /// // 3. WPS PIN Keypad - /// - /// wifi_direct_accept_connection(mac_address); - /// break; - /// - /// case WIFI_DIRECT_DISCONNECTION_IND: - /// if (error_code == WIFI_DIRECT_ERROR_NONE) - /// printf("peer device disconnected MAC %s\n", mac_address); - /// break; - /// - /// case WIFI_DIRECT_DISCONNECTION_RSP: - /// if (error_code == WIFI_DIRECT_ERROR_NONE) - /// printf("peer device disconnection response MAC %s\n", mac_address); - /// break; - /// - /// case WIFI_DIRECT_CONNECTION_DISASSOCIATION_IND: - /// if (error_code == WIFI_DIRECT_ERROR_NONE) - /// printf("peer device disassociation MAC %s\n", mac_address); - /// break; - /// - /// case WIFI_DIRECT_GROUP_CREATED: - /// printf("Group Created\n"); - /// break; - /// - /// case WIFI_DIRECT_GROUP_DESTROYED: - /// printf("Group Destroyed\n"); - /// break; - /// - /// default: - /// break; - /// } - /// } - /// - /// void function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_set_connection_state_changed_cb(callback, - /// NULL); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to register callback\n"); - /// return; - /// } - /// - /// printf("callback registered Successfully\n"); - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// function(); - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_set_connection_state_changed_cb( - wifi_direct_connection_state_changed_cb cb, - ffi.Pointer user_data, - ) { - return _wifi_direct_set_connection_state_changed_cb( - cb, - user_data, - ); - } - - late final _wifi_direct_set_connection_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_direct_connection_state_changed_cb, - ffi.Pointer)>>( - 'wifi_direct_set_connection_state_changed_cb'); - late final _wifi_direct_set_connection_state_changed_cb = - _wifi_direct_set_connection_state_changed_cbPtr.asFunction< - int Function(wifi_direct_connection_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback called when the state of connection is changed. - /// @since_tizen 2.3 - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_set_connection_state_changed_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// void function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_unset_connection_state_changed_cb(); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to deregister callback\n"); - /// return; - /// } - /// - /// printf("callback deregistered Successfully\n"); - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// function(); - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_unset_connection_state_changed_cb() { - return _wifi_direct_unset_connection_state_changed_cb(); - } - - late final _wifi_direct_unset_connection_state_changed_cbPtr = - _lookup>( - 'wifi_direct_unset_connection_state_changed_cb'); - late final _wifi_direct_unset_connection_state_changed_cb = - _wifi_direct_unset_connection_state_changed_cbPtr - .asFunction(); - - /// @brief Sets the callback called when the state of connection is changed. - /// @since_tizen 5.0 - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_unset_peer_info_connection_state_changed_cb() - /// @see wifi_direct_peer_info_connection_state_changed_cb() - int wifi_direct_set_peer_info_connection_state_changed_cb( - wifi_direct_peer_info_connection_state_changed_cb cb, - ffi.Pointer user_data, - ) { - return _wifi_direct_set_peer_info_connection_state_changed_cb( - cb, - user_data, - ); - } - - late final _wifi_direct_set_peer_info_connection_state_changed_cbPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_direct_peer_info_connection_state_changed_cb, - ffi.Pointer)>>( - 'wifi_direct_set_peer_info_connection_state_changed_cb'); - late final _wifi_direct_set_peer_info_connection_state_changed_cb = - _wifi_direct_set_peer_info_connection_state_changed_cbPtr.asFunction< - int Function(wifi_direct_peer_info_connection_state_changed_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback called when the state of connection is changed. - /// @since_tizen 5.0 - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_set_peer_info_connection_state_changed_cb() - int wifi_direct_unset_peer_info_connection_state_changed_cb() { - return _wifi_direct_unset_peer_info_connection_state_changed_cb(); - } - - late final _wifi_direct_unset_peer_info_connection_state_changed_cbPtr = - _lookup>( - 'wifi_direct_unset_peer_info_connection_state_changed_cb'); - late final _wifi_direct_unset_peer_info_connection_state_changed_cb = - _wifi_direct_unset_peer_info_connection_state_changed_cbPtr - .asFunction(); - - /// @brief Sets the callback called when the IP address of the client is assigned - /// if your device is the group owner. - /// @since_tizen 2.3 - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_unset_client_ip_address_assigned_cb() - /// @see wifi_direct_client_ip_address_assigned_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// void callback(const char *mac_address, - /// const char *ip_address, - /// const char *interface_address, - /// void *user_data); - /// { - /// printf("IP Assigned to the client device\n"); - /// - /// printf("mac=%s\n", mac_address); - /// printf("ip=%s\n", ip_address); - /// printf("iface=%s\n", interface_address); - /// } - /// - /// void function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_set_client_ip_address_assigned_cb(callback, - /// NULL); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to register callback\n"); - /// return; - /// } - /// - /// printf("callback registered Successfully\n"); - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// function(); - /// wifi_direct_deactivate(); // deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_set_client_ip_address_assigned_cb( - wifi_direct_client_ip_address_assigned_cb cb, - ffi.Pointer user_data, - ) { - return _wifi_direct_set_client_ip_address_assigned_cb( - cb, - user_data, - ); - } - - late final _wifi_direct_set_client_ip_address_assigned_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_direct_client_ip_address_assigned_cb, - ffi.Pointer)>>( - 'wifi_direct_set_client_ip_address_assigned_cb'); - late final _wifi_direct_set_client_ip_address_assigned_cb = - _wifi_direct_set_client_ip_address_assigned_cbPtr.asFunction< - int Function(wifi_direct_client_ip_address_assigned_cb, - ffi.Pointer)>(); - - /// @brief Unsets the callback called when the IP address of the client is assigned - /// if your device is the group owner. - /// @since_tizen 2.3 - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_set_connection_state_changed_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// void function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_unset_client_ip_address_assigned_cb(); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to deregister callback\n"); - /// return; - /// } - /// - /// printf("callback deregistered Successfully\n"); - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// function(); - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_unset_client_ip_address_assigned_cb() { - return _wifi_direct_unset_client_ip_address_assigned_cb(); - } - - late final _wifi_direct_unset_client_ip_address_assigned_cbPtr = - _lookup>( - 'wifi_direct_unset_client_ip_address_assigned_cb'); - late final _wifi_direct_unset_client_ip_address_assigned_cb = - _wifi_direct_unset_client_ip_address_assigned_cbPtr - .asFunction(); - - /// @brief Sets the callback called when the state of the service discovery is changed. - /// @since_tizen 2.3 - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_unset_service_state_changed_cb() - /// @see wifi_direct_service_state_changed_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// void callback(int error_code, - /// wifi_direct_service_discovery_state_e discovery_state, - /// wifi_direct_service_type_e service_type, - /// void *response_data, - /// const char *mac_address, - /// void *user_data); - /// { - /// switch (discovery_state) { - /// case WIFI_DIRECT_SERVICE_DISCOVERY_STARTED: - /// printf("Discovery Started\n"); - /// break; - /// - /// case WIFI_DIRECT_SERVICE_DISCOVERY_FINISHED: - /// printf("Discovery finished\n"); - /// break; - /// - /// case WIFI_DIRECT_SERVICE_DISCOVERY_FOUND: - /// printf("Discovery found\n"); - /// if (mac_address != NULL) - /// printf("Peer MAC=%s\n", mac_address); - /// - /// if (response_data != NULL) - /// printf("Peer response=%s\n", (char *)response_data); - /// - /// if (service_type == WIFI_DIRECT_SERVICE_TYPE_ALL) - /// printf("service type all\n"); - /// if (service_type == WIFI_DIRECT_SERVICE_TYPE_BONJOUR) - /// printf("service type bonjour\n"); - /// if (service_type == WIFI_DIRECT_SERVICE_TYPE_UPNP) - /// printf("service type UPNP\n"); - /// if (service_type == WIFI_DIRECT_SERVICE_TYPE_BT_ADDR) - /// printf("service type BT_ADDR\n"); - /// if (service_type == WIFI_DIRECT_SERVICE_TYPE_CONTACT_INFO)\ - /// printf("service type contact info\n"); - /// break; - /// - /// default: - /// break; - /// } - /// } - /// - /// void function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_set_service_state_changed_cb(callback, - /// NULL); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to register callback\n"); - /// return; - /// } - /// - /// printf("callback registered Successfully\n"); - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// function(); - /// wifi_direct_deactivate(); // deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_set_service_state_changed_cb( - wifi_direct_service_state_changed_cb cb, - ffi.Pointer user_data, - ) { - return _wifi_direct_set_service_state_changed_cb( - cb, - user_data, - ); - } - - late final _wifi_direct_set_service_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_direct_service_state_changed_cb, - ffi.Pointer)>>( - 'wifi_direct_set_service_state_changed_cb'); - late final _wifi_direct_set_service_state_changed_cb = - _wifi_direct_set_service_state_changed_cbPtr.asFunction< - int Function( - wifi_direct_service_state_changed_cb, ffi.Pointer)>(); - - /// @brief Unsets the callback called when the state of the service discovery is changed. - /// @since_tizen 2.3 - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_set_service_state_changed_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// void function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_unset_service_state_changed_cb(); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to deregister callback\n"); - /// return; - /// } - /// - /// printf("callback deregistered Successfully\n"); - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// function(); - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_unset_service_state_changed_cb() { - return _wifi_direct_unset_service_state_changed_cb(); - } - - late final _wifi_direct_unset_service_state_changed_cbPtr = - _lookup>( - 'wifi_direct_unset_service_state_changed_cb'); - late final _wifi_direct_unset_service_state_changed_cb = - _wifi_direct_unset_service_state_changed_cbPtr - .asFunction(); - - /// @brief Sets the callback called when the state of Wi-Fi Direct is changed. - /// @since_tizen 3.0 - /// @param[in] cb The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation Failed - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_direct_unset_state_changed_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// char* print_link_state(wifi_direct_state_e state) - /// { - /// if (state == WIFI_DIRECT_STATE_DEACTIVATED) - /// return "DEACTIVATED"; - /// if (state == WIFI_DIRECT_STATE_ACTIVATING) - /// return "ACTIVATING"; - /// if (state == WIFI_DIRECT_STATE_ACTIVATED) - /// return "ACTIVATED"; - /// if (state == WIFI_DIRECT_STATE_DISCOVERING) - /// return "DISCOVERING"; - /// if (state == WIFI_DIRECT_STATE_CONNECTING) - /// return "CONNECTING"; - /// if (state == WIFI_DIRECT_STATE_DISCONNECTING) - /// return "DISCONNECTING"; - /// if (state == WIFI_DIRECT_STATE_CONNECTED) - /// return "CONNECTED"; - /// if (state == WIFI_DIRECT_STATE_GROUP_OWNER) - /// return "GROUP OWNER"; - /// return "Unknown state"; - /// } - /// - /// void callback(wifi_direct_state_e state, - /// void *user_data); - /// { - /// printf("State changed [%s]\n", print_link_state(state)); - /// } - /// - /// void function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_set_state_changed_cb(callback, - /// NULL); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to register callback\n"); - /// return; - /// } - /// - /// printf("callback registered Successfully\n"); - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// function(); - /// wifi_direct_deactivate(); // deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_set_state_changed_cb( - wifi_direct_state_changed_cb cb, - ffi.Pointer user_data, - ) { - return _wifi_direct_set_state_changed_cb( - cb, - user_data, - ); - } - - late final _wifi_direct_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_direct_state_changed_cb, - ffi.Pointer)>>('wifi_direct_set_state_changed_cb'); - late final _wifi_direct_set_state_changed_cb = - _wifi_direct_set_state_changed_cbPtr.asFunction< - int Function(wifi_direct_state_changed_cb, ffi.Pointer)>(); - - /// @brief Unsets the callback called when the state of Wi-Fi Direct is changed. - /// @since_tizen 3.0 - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation Failed - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @see wifi_direct_initialize() - /// @see wifi_direct_set_state_changed_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// void function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_unset_state_changed_cb(); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to deregister callback\n"); - /// return; - /// } - /// - /// printf("callback deregistered Successfully\n"); - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// function(); - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_unset_state_changed_cb() { - return _wifi_direct_unset_state_changed_cb(); - } - - late final _wifi_direct_unset_state_changed_cbPtr = - _lookup>( - 'wifi_direct_unset_state_changed_cb'); - late final _wifi_direct_unset_state_changed_cb = - _wifi_direct_unset_state_changed_cbPtr.asFunction(); - - /// @brief Activates the Wi-Fi Direct service, asynchronously. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @retval #WIFI_DIRECT_ERROR_WIFI_USED Wi-Fi is being used - /// @retval #WIFI_DIRECT_ERROR_MOBILE_AP_USED Mobile AP is being used - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @post wifi_direct_device_state_changed_cb() will be invoked. - /// @see wifi_direct_initialize() - /// @see wifi_direct_deactivate() - /// @see wifi_direct_device_state_changed_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to activate Wi-Fi Direct\n"); - /// return -1; - /// } - /// - /// printf("Wi-Fi Direct Activated\n"); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// function(); - /// wifi_direct_deactivate(); // deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_activate() { - return _wifi_direct_activate(); - } - - late final _wifi_direct_activatePtr = - _lookup>('wifi_direct_activate'); - late final _wifi_direct_activate = - _wifi_direct_activatePtr.asFunction(); - - /// @brief Deactivates the Wi-Fi Direct service, asynchronously. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @post wifi_direct_device_state_changed_cb() will be invoked. - /// @see wifi_direct_activate() - /// @see wifi_direct_device_state_changed_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to deactivate Wi-Fi Direct\n"); - /// return -1; - /// } - /// - /// printf("Wi-Fi Direct Deactivated\n"); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activated Wi-Fi Direct - /// function(); - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_deactivate() { - return _wifi_direct_deactivate(); - } - - late final _wifi_direct_deactivatePtr = - _lookup>('wifi_direct_deactivate'); - late final _wifi_direct_deactivate = - _wifi_direct_deactivatePtr.asFunction(); - - /// @brief Starts discovery to find all P2P capable devices, asynchronously. - /// @details If application developers call wifi_direct_start_discovery() with @a listen_only as @c true, - /// then skip the initial 802.11 Scan and then enter Listen state instead of - /// cycling between Scan and Listen. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @remarks The function can be called if the Wi-Fi Direct state is one of:\n - /// #WIFI_DIRECT_STATE_ACTIVATED\n - /// #WIFI_DIRECT_STATE_DISCOVERING\n - /// #WIFI_DIRECT_STATE_GROUP_OWNER\n - /// The function can be called even if there is another discovery in progress. - /// All started processes will run simultaneously. Each process will receive - /// #WIFI_DIRECT_DISCOVERY_FINISHED - /// event in wifi_direct_discovery_state_chagned_cb(). - /// @param[in] listen_only The status of listen only: (@c true = listen only, - /// @c false = cycling between Scan and Listen) - /// @param[in] timeout Specifies the duration of discovery period, in seconds. - /// If @c 0, then there is no limit on how long the discovery takes. - /// The actual limit (and time after which discovery stops) depends on - /// the vendor's hardware and firmware - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @post wifi_direct_discovery_state_chagned_cb() will be invoked. - /// @see wifi_direct_activate() - /// @see wifi_direct_cancel_discovery() - /// @see wifi_direct_discovery_state_chagned_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// void callback(int error_code, - /// wifi_direct_discovery_state_e discovery_state, - /// void *user_data) - /// { - /// switch(discovery_state) { - /// case WIFI_DIRECT_DISCOVERY_STARTED: - /// printf("Discovery started\n"); - /// break; - /// - /// case WIFI_DIRECT_ONLY_LISTEN_STARTED: - /// printf("listen started\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FINISHED: - /// printf("Discovery finished\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FOUND: - /// printf("peer devices found\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_LOST: - /// printf("Discovery lost\n"); - /// break; - /// - /// default: - /// break; - /// } - /// } - /// - /// int function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_start_discovery(TRUE, 15); // Start discovery with listen only - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to start scan\n"); - /// return -1; - /// } - /// - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_set_discovery_state_changed_cb(callback, - /// NULL); // Register callback - /// wifi_direct_activate(); // Activated Wi-Fi Direct - /// - /// function(); - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_unset_discovery_state_changed_cb(); // Deregister callback - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_start_discovery( - bool listen_only, - int timeout, - ) { - return _wifi_direct_start_discovery( - listen_only, - timeout, - ); - } - - late final _wifi_direct_start_discoveryPtr = - _lookup>( - 'wifi_direct_start_discovery'); - late final _wifi_direct_start_discovery = - _wifi_direct_start_discoveryPtr.asFunction(); - - /// @brief Starts discovery to find all P2P capable devices with specified channel, asynchronously. - /// @details If you call this function with @a channel as @c #WIFI_DIRECT_DISCOVERY_FULL_SCAN - /// it works same as wifi_direct_start_discovery() API. - /// If application developers call this function with @a channel as @c #WIFI_DIRECT_DISCOVERY_SOCIAL_CHANNEL, - /// then will search only the devices on the social channels(channel 1 or 6 or 11). - /// If application developers call this function with @a channel as @c #WIFI_DIRECT_DISCOVERY_CHANNEL1, - /// then will search only the devices on the channel 1. - /// If application developers call this function with @a channel as @c #WIFI_DIRECT_DISCOVERY_CHANNEL6, - /// then will search only the devices on the channel 6. - /// If application developers call this function with @a channel as @c #WIFI_DIRECT_DISCOVERY_CHANNEL11, - /// then will search only the devices on the channel 11. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @remarks The function can be called if the Wi-Fi Direct state is one of:\n - /// #WIFI_DIRECT_STATE_ACTIVATED\n - /// #WIFI_DIRECT_STATE_DISCOVERING\n - /// #WIFI_DIRECT_STATE_GROUP_OWNER\n - /// The function can be called even if there is another discovery in progress. - /// All started processes will run simultaneously. Each process will receive - /// #WIFI_DIRECT_DISCOVERY_FINISHED - /// event in wifi_direct_discovery_state_chagned_cb(). - /// @param[in] listen_only The status of listen only: (@c true = listen only, - /// @c false = cycling between Scan and Listen) - /// @param[in] timeout Specifies the duration of discovery period, in seconds. - /// If @c 0, then there is no limit on how long the discovery takes. - /// The actual limit (and time after which discovery stops) depends on - /// the vendor's hardware and firmware - /// @param[in] channel Specifies the discovery channel. (Full scan, social channels, channel 1, 6, 11) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @post wifi_direct_discovery_state_chagned_cb() will be invoked. - /// @see wifi_direct_activate() - /// @see wifi_direct_cancel_discovery() - /// @see wifi_direct_discovery_state_chagned_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// void callback(int error_code, - /// wifi_direct_discovery_state_e discovery_state, - /// void *user_data) - /// { - /// switch(discovery_state) { - /// case WIFI_DIRECT_DISCOVERY_STARTED: - /// printf("Discovery started\n"); - /// break; - /// - /// case WIFI_DIRECT_ONLY_LISTEN_STARTED: - /// printf("listen started\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FINISHED: - /// printf("Discovery finished\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FOUND: - /// printf("peer devices found\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_LOST: - /// printf("Discovery lost\n"); - /// break; - /// - /// default: - /// break; - /// } - /// } - /// - /// int function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_start_discovery_specific_channel(TRUE, 15, // start discovery with 15sec timeout - /// WIFI_DIRECT_DISCOVERY_FULL_SCAN); // scan all channels - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to start scan\n"); - /// return -1; - /// } - /// - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_set_discovery_state_changed_cb(callback, - /// NULL); // Register callback - /// wifi_direct_activate(); // Activated Wi-Fi Direct - /// - /// function(); - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_unset_discovery_state_changed_cb(); // Deregister callback - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_start_discovery_specific_channel( - bool listen_only, - int timeout, - int channel, - ) { - return _wifi_direct_start_discovery_specific_channel( - listen_only, - timeout, - channel, - ); - } - - late final _wifi_direct_start_discovery_specific_channelPtr = _lookup< - ffi.NativeFunction>( - 'wifi_direct_start_discovery_specific_channel'); - late final _wifi_direct_start_discovery_specific_channel = - _wifi_direct_start_discovery_specific_channelPtr - .asFunction(); - - /// @brief Starts discovery to find all P2P capable devices with specified frequency, asynchronously. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @remarks The function can be called if the Wi-Fi Direct state is one of:\n - /// #WIFI_DIRECT_STATE_ACTIVATED\n - /// #WIFI_DIRECT_STATE_DISCOVERING\n - /// #WIFI_DIRECT_STATE_GROUP_OWNER\n - /// The function can be called even if there is another discovery in progress. - /// All started processes will run simultaneously. Each process will receive - /// #WIFI_DIRECT_DISCOVERY_FINISHED - /// event in wifi_direct_discovery_state_chagned_cb(). - /// @param[in] listen_only Indicates mode in which the discovery service will work. - /// If @c true, the service will only listen, otherwise - /// it will cycle between scanning and listening - /// @param[in] timeout Specifies the duration of discovery period, in seconds. - /// If @c 0, then there is no limit on how long the discovery takes. - /// The actual limit (and time after which discovery stops) depends on - /// the vendor's hardware and firmware - /// @param[in] frequency Specifies the discovery frequency in MHz - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @post wifi_direct_discovery_state_chagned_cb() will be invoked. - /// @see wifi_direct_activate() - /// @see wifi_direct_cancel_discovery() - /// @see wifi_direct_discovery_state_chagned_cb() - /// @see wifi_direct_discovered_peer_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// void callback(int error_code, - /// wifi_direct_discovery_state_e discovery_state, - /// void *user_data) - /// { - /// switch(discovery_state) { - /// case WIFI_DIRECT_DISCOVERY_STARTED: - /// printf("Discovery started\n"); - /// break; - /// - /// case WIFI_DIRECT_ONLY_LISTEN_STARTED: - /// printf("listen started\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FINISHED: - /// printf("Discovery finished\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FOUND: - /// printf("peer devices found\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_LOST: - /// printf("Discovery lost\n"); - /// break; - /// - /// default: - /// break; - /// } - /// } - /// - /// int function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_start_discovery_specific_freq(TRUE, 15, // start discovery with 15sec timeout - /// 2437); // scan for 2437 MHz frequency (Channel 6) - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to start scan\n"); - /// return -1; - /// } - /// - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_set_discovery_state_changed_cb(callback, - /// NULL); // Register callback - /// wifi_direct_activate(); // Activated Wi-Fi Direct - /// - /// function(); - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_unset_discovery_state_changed_cb(); // Deregister callback - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_start_discovery_specific_freq( - bool listen_only, - int timeout, - int frequency, - ) { - return _wifi_direct_start_discovery_specific_freq( - listen_only, - timeout, - frequency, - ); - } - - late final _wifi_direct_start_discovery_specific_freqPtr = - _lookup>( - 'wifi_direct_start_discovery_specific_freq'); - late final _wifi_direct_start_discovery_specific_freq = - _wifi_direct_start_discovery_specific_freqPtr - .asFunction(); - - /// @brief Cancels discovery process, asynchronously. - /// @details This function stops all discovery processes started with - /// wifi_direct_start_discovery() functions. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Discovery must be started by wifi_direct_start_discovery(). - /// @post wifi_direct_discovery_state_chagned_cb() will be invoked. - /// @see wifi_direct_start_discovery() - /// @see wifi_direct_start_discovery_specific_channel() - /// @see wifi_direct_start_discovery_specific_freq() - /// @see wifi_direct_discovery_state_chagned_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// void callback(int error_code, - /// wifi_direct_discovery_state_e discovery_state, - /// void *user_data) - /// { - /// switch(discovery_state) { - /// case WIFI_DIRECT_DISCOVERY_STARTED: - /// printf("Discovery started\n"); - /// break; - /// - /// case WIFI_DIRECT_ONLY_LISTEN_STARTED: - /// printf("listen started\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FINISHED: - /// printf("Discovery finished\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FOUND: - /// printf("peer devices found\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_LOST: - /// printf("Discovery lost\n"); - /// break; - /// - /// default: - /// break; - /// } - /// } - /// - /// int function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_cancel_discovery(); // Cancel ongoing discovery - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to cancel discovery\n"); - /// return -1; - /// } - /// - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_set_discovery_state_changed_cb(callback, NULL); // Register callback - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// wifi_direct_start_discovery(TRUE, 15); // Start discovery - /// - /// function(); - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_unset_discovery_state_changed_cb(); // Deregister callback - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_cancel_discovery() { - return _wifi_direct_cancel_discovery(); - } - - late final _wifi_direct_cancel_discoveryPtr = - _lookup>( - 'wifi_direct_cancel_discovery'); - late final _wifi_direct_cancel_discovery = - _wifi_direct_cancel_discoveryPtr.asFunction(); - - /// @brief Gets the information of discovered peers. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// @see wifi_direct_discovered_peer_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// void function_cb(wifi_direct_discovered_peer_info_s* peer, - /// void *user_data) - /// { - /// if (peer) - /// printf("peer device=%s MAC=%s\n", peer->device_name, peer->mac_address); - /// } - /// - /// int function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_foreach_discovered_peers(function_cb, NULL); // get discovered peer devices info - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get discovered peers\n"); - /// return -1; - /// } - /// - /// return 0; - /// } - /// - /// void callback(int error_code, - /// wifi_direct_discovery_state_e discovery_state, - /// void *user_data) - /// { - /// switch(discovery_state) { - /// case WIFI_DIRECT_DISCOVERY_STARTED: - /// printf("Discovery started\n"); - /// break; - /// - /// case WIFI_DIRECT_ONLY_LISTEN_STARTED: - /// printf("listen started\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FINISHED: - /// printf("Discovery finished\n"); - /// - /// function(); - /// - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FOUND: - /// printf("peer devices found\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_LOST: - /// printf("Discovery lost\n"); - /// break; - /// - /// default: - /// break; - /// } - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_set_discovery_state_changed_cb(callback, NULL); // Register callback - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// wifi_direct_start_discovery(TRUE, 15); // Start discovery - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_unset_discovery_state_changed_cb(); // Deregister callback - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_foreach_discovered_peers( - wifi_direct_discovered_peer_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_direct_foreach_discovered_peers( - callback, - user_data, - ); - } - - late final _wifi_direct_foreach_discovered_peersPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_direct_discovered_peer_cb, - ffi.Pointer)>>('wifi_direct_foreach_discovered_peers'); - late final _wifi_direct_foreach_discovered_peers = - _wifi_direct_foreach_discovered_peersPtr.asFunction< - int Function( - wifi_direct_discovered_peer_cb, ffi.Pointer)>(); - - /// @brief Connects to a specified peer, asynchronously. - /// @details This function connects to specified peer by automatically determining - /// whether to perform group formation, join an existing group, invite, re-invoke a group. - /// The decision is based on the current state of the peers (i.e. GO, STA, not connected) - /// and the availability of persistent data. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] mac_address The MAC address of remote device - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_TOO_MANY_CLIENT Too many client - /// @retval #WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT Connection timed out - /// @retval #WIFI_DIRECT_ERROR_CONNECTION_FAILED Connection failed - /// @retval #WIFI_DIRECT_ERROR_AUTH_FAILED Authentication failed - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @post wifi_direct_connection_state_changed_cb() will be invoked. - /// @see wifi_direct_activate() - /// @see wifi_direct_disconnect() - /// @see wifi_direct_disconnect_all() - /// @see wifi_direct_connection_state_changed_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// bool device_selected = false; - /// - /// void peers_cb(wifi_direct_discovered_peer_info_s* peer, - /// void *user_data) - /// { - /// if (peer && !device_selected) { - /// printf("peer device=%s MAC=%s\n", peer->device_name, peer->mac_address); - /// - /// device_selected = true; - /// - /// function(peer->mac_address); // Connect to the first discovered peer - /// } - /// } - /// - /// int function(const char *mac) - /// { - /// int ret; - /// - /// ret = wifi_direct_connect(mac); // connect to the peer device - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to connect the peer\n"); - /// return -1; - /// } - /// - /// return 0; - /// } - /// - /// void callback_2(int error_code, - /// wifi_direct_connection_state_e state, - /// const char *mac, void *user_data) - /// { - /// switch (state) { - /// case WIFI_DIRECT_CONNECTION_IN_PROGRESS: - /// printf("Connection in progress\n"); - /// break; - /// - /// case WIFI_DIRECT_CONNECTON_RSP: - /// printf("Connected\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCONNECTION_IND: - /// printf("Disconnection IND\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCONNECTION_RSP; - /// printf("Disconnected\n"); - /// break; - /// } - /// } - /// - /// void callback_1(int error_code, - /// wifi_direct_discovery_state_e discovery_state, - /// void *user_data) - /// { - /// switch(discovery_state) { - /// case WIFI_DIRECT_DISCOVERY_STARTED: - /// printf("Discovery started\n"); - /// break; - /// - /// case WIFI_DIRECT_ONLY_LISTEN_STARTED: - /// printf("listen started\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FINISHED: - /// printf("Discovery finished\n"); - /// - /// wifi_direct_foreach_discovered_peers(peers_cb, - /// NULL); // Get discovered peer - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FOUND: - /// printf("peer devices found\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_LOST: - /// printf("Discovery lost\n"); - /// break; - /// - /// default: - /// break; - /// } - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_set_discovery_state_changed_cb(callback_1, NULL); // Register callback 1 - /// wifi_direct_set_connection_state_changed_cb(callback_2, NULL); // Register callback 2 - /// - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// wifi_direct_start_discovery(TRUE, 15); // Start discovery - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_unset_discovery_state_changed_cb(); // Deregister callback - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_connect( - ffi.Pointer mac_address, - ) { - return _wifi_direct_connect( - mac_address, - ); - } - - late final _wifi_direct_connectPtr = - _lookup)>>( - 'wifi_direct_connect'); - late final _wifi_direct_connect = - _wifi_direct_connectPtr.asFunction)>(); - - /// @brief Cancels the connection now in progress. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] mac_address The MAC address of rejected device - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// bool peer_selected = false; - /// int connection_timeout = 0; - /// int count = 0; // counter to wait for connection - /// - /// int function(char *mac); - /// - /// gboolean connection_timeout_cb(gpointer data) - /// { - /// char *mac = (char *)data; - /// - /// if (count < 3) { - /// count++; - /// return TRUE; - /// } - /// - /// function(mac); // cancel ongoing connection - /// g_free(mac); - /// return FALSE; - /// } - /// - /// void peers_cb(wifi_direct_discovered_peer_info_s* peer, - /// void *user_data) - /// { - /// char *mac; - /// - /// if (peer && !peer_selected) { - /// printf("peer device=%s MAC=%s\n", peer->device_name, peer->mac_address); - /// - /// mac = g_strdup(peer->mac_address); - /// peer_selected = true; - /// - /// wifi_direct_connect(mac); // Connect to the selected peer - /// connection_timeout = g_timeout_add(1000, - /// connection_timeout_cb, - /// mac); // Add 3secs timeout - /// } - /// } - /// - /// int function(char *mac) - /// { - /// int ret; - /// - /// ret = wifi_direct_cancel_connection(mac); // cancel connection - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to cancel the ongoing connection\n"); - /// return -1; - /// } - /// - /// return 0; - /// } - /// - /// void callback_2(int error_code, - /// wifi_direct_connection_state_e state, - /// const char *mac, void *user_data) - /// { - /// switch (state) { - /// case WIFI_DIRECT_CONNECTION_IN_PROGRESS: - /// printf("Connection in progress\n"); - /// break; - /// - /// case WIFI_DIRECT_CONNECTON_RSP: - /// printf("Connected\n"); - /// g_source_remove(connection_timeout); - /// break; - /// - /// case WIFI_DIRECT_DISCONNECTION_IND: - /// printf("Disconnection IND\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCONNECTION_RSP; - /// printf("Disconnected\n"); - /// break; - /// } - /// } - /// - /// void callback_1(int error_code, - /// wifi_direct_discovery_state_e discovery_state, - /// void *user_data) - /// { - /// switch(discovery_state) { - /// case WIFI_DIRECT_DISCOVERY_STARTED: - /// printf("Discovery started\n"); - /// break; - /// - /// case WIFI_DIRECT_ONLY_LISTEN_STARTED: - /// printf("listen started\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FINISHED: - /// printf("Discovery finished\n"); - /// - /// wifi_direct_foreach_discovered_peers(peers_cb, - /// NULL); // Get discovered peer - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FOUND: - /// printf("peer devices found\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_LOST: - /// printf("Discovery lost\n"); - /// break; - /// - /// default: - /// break; - /// } - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_set_discovery_state_changed_cb(callback_1, NULL); // Register callback 1 - /// wifi_direct_set_connection_state_changed_cb(callback_2, NULL); // Register callback 2 - /// - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// wifi_direct_start_discovery(TRUE, 15); // Start discovery - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_unset_connection_state_changed_cb(); // Deregister callback 2 - /// wifi_direct_unset_discovery_state_changed_cb(); // Deregister callback 1 - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_cancel_connection( - ffi.Pointer mac_address, - ) { - return _wifi_direct_cancel_connection( - mac_address, - ); - } - - late final _wifi_direct_cancel_connectionPtr = - _lookup)>>( - 'wifi_direct_cancel_connection'); - late final _wifi_direct_cancel_connection = _wifi_direct_cancel_connectionPtr - .asFunction)>(); - - /// @brief Disconnects all connected links to peers, asynchronously. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @post wifi_direct_connection_state_changed_cb() will be invoked. - /// @see wifi_direct_activate() - /// @see wifi_direct_disconnect() - /// @see wifi_direct_connection_state_changed_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// void callback(int error_code, - /// wifi_direct_connection_state_e state, - /// const char *mac, void *user_data) - /// { - /// switch (state) { - /// case WIFI_DIRECT_CONNECTION_IN_PROGRESS: - /// printf("Connection in progress\n"); - /// break; - /// - /// case WIFI_DIRECT_CONNECTON_RSP: - /// printf("Connected\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCONNECTION_IND: - /// printf("Disconnection IND\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCONNECTION_RSP; - /// printf("Disconnected\n"); // disconnect notification - /// break; - /// } - /// } - /// - /// int function(void) - /// { - /// int res; - /// - /// res = wifi_direct_disconnect_all(); // disconnect all the connected peers - /// - /// if (res != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to disconnect all clients\n"); - /// return -1; - /// } - /// - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_set_connection_state_changed_cb(callback, NULL); // Register callback - /// wifi_direct_activate(); // Activate Wi-Fi Direct * - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_unset_connection_state_changed_cb(); // Deregister callback - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_disconnect_all() { - return _wifi_direct_disconnect_all(); - } - - late final _wifi_direct_disconnect_allPtr = - _lookup>( - 'wifi_direct_disconnect_all'); - late final _wifi_direct_disconnect_all = - _wifi_direct_disconnect_allPtr.asFunction(); - - /// @brief Disconnects the specified peer, asynchronously. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] mac_address The MAC address of remote device - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @post wifi_direct_connection_state_changed_cb() will be invoked. - /// @see wifi_direct_activate() - /// @see wifi_direct_disconnect() - /// @see wifi_direct_connection_state_changed_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// bool callback_2(wifi_direct_connected_peer_info_s* peer, - /// void* user_data) - /// { - /// if (peer) { - /// printf("connected device=%s mac=%s\n", - /// peer->device_name, peer->mac_address); - /// } - /// } - /// - /// void callback_1(int error_code, - /// wifi_direct_connection_state_e state, - /// const char *mac, void *user_data) - /// { - /// switch (state) { - /// case WIFI_DIRECT_CONNECTION_IN_PROGRESS: - /// printf("Connection in progress\n"); - /// break; - /// - /// case WIFI_DIRECT_CONNECTON_RSP: - /// printf("Connected\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCONNECTION_IND: - /// printf("Disconnection IND\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCONNECTION_RSP; - /// printf("Disconnected mac=%s\n", mac_address); // disconnect notification - /// break; - /// } - /// } - /// - /// int function(char *mac) - /// { - /// int res; - /// - /// res = wifi_direct_disconnect(mac); // disconnect the connected peer with input mac - /// - /// if (res != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to disconnect all clients\n"); - /// return -1; - /// } - /// - /// return 0; - /// } - /// - /// int main() - /// { - /// char mac[16] = {0,}; - /// - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_set_connection_state_changed_cb(callback_1, NULL); // Register callback_1 - /// wifi_direct_activate(); // Activate Wi-Fi Direct * - /// - /// wifi_direct_foreach_connected_peers(callback_2, NULL); // Register callback_2 - /// - /// printf("Enter the connected peer mac address\n"); - /// read(stdin, mac, 15); - /// - /// function(mac); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_unset_connection_state_changed_cb(); // Deregister callback - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_disconnect( - ffi.Pointer mac_address, - ) { - return _wifi_direct_disconnect( - mac_address, - ); - } - - late final _wifi_direct_disconnectPtr = - _lookup)>>( - 'wifi_direct_disconnect'); - late final _wifi_direct_disconnect = _wifi_direct_disconnectPtr - .asFunction)>(); - - /// @brief Gets the information of connected peers. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// @see wifi_direct_discovered_peer_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// bool callback_1(wifi_direct_connected_peer_info_s* peer, - /// void* user_data) - /// { - /// if (peer) { - /// printf("connected device=%s mac=%s\n", - /// peer->device_name, peer->mac_address); - /// } - /// } - /// - /// int function(char *mac) - /// { - /// int res; - /// - /// res = wifi_direct_foreach_connected_peers(callback_1, NULL) // Get connected peers - /// - /// if (res != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get connected peers\n"); - /// return -1; - /// } - /// - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_foreach_connected_peers( - wifi_direct_connected_peer_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_direct_foreach_connected_peers( - callback, - user_data, - ); - } - - late final _wifi_direct_foreach_connected_peersPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_direct_connected_peer_cb, - ffi.Pointer)>>('wifi_direct_foreach_connected_peers'); - late final _wifi_direct_foreach_connected_peers = - _wifi_direct_foreach_connected_peersPtr.asFunction< - int Function(wifi_direct_connected_peer_cb, ffi.Pointer)>(); - - /// @brief Creates a Wi-Fi Direct Group, asynchronously. - /// @details This function sets up device as the Group Owner and waits for clients to connect. - /// In addition, a soft AP will be created, the WPS registrar and the DHCP server will be started. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @retval #WIFI_DIRECT_ERROR_AUTH_FAILED Authentication failed - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @post wifi_direct_connection_state_changed_cb() will be invoked with #WIFI_DIRECT_GROUP_CREATED. - /// @see wifi_direct_activate() - /// @see wifi_direct_destroy_group() - /// @see wifi_direct_connection_state_changed_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// void callback_1(int error_code, - /// wifi_direct_connection_state_e state, - /// const char *mac, void *user_data) - /// { - /// if (state == WIFI_DIRECT_GROUP_CREATED) { - /// printf("Group created\n"); - /// } - /// } - /// - /// int function(void) - /// { - /// int res; - /// - /// res = wifi_direct_create_group() // create autonomous group - /// - /// if (res != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to create group\n"); - /// return -1; - /// } - /// - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_set_connection_state_changed_cb(callback_1, NULL); // Register callback_1 - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_unset_connection_state_changed_cb(); // Deregister callback_1 - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_create_group() { - return _wifi_direct_create_group(); - } - - late final _wifi_direct_create_groupPtr = - _lookup>( - 'wifi_direct_create_group'); - late final _wifi_direct_create_group = - _wifi_direct_create_groupPtr.asFunction(); - - /// @brief Creates a Wi-Fi Direct Group, asynchronously with given SSID name. - /// @details This function sets up device as the Group Owner and waits for clients to connect. - /// In addition, a soft AP will be created, the WPS registrar and the DHCP server will be started. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] ssid Referred to as a network name, it is a name that identifies a wireless network - /// @return 0 on success, otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameters - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @retval #WIFI_DIRECT_ERROR_AUTH_FAILED Authentication failed - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @post wifi_direct_connection_state_changed_cb() will be invoked with #WIFI_DIRECT_GROUP_CREATED. - /// @see wifi_direct_activate() - /// @see wifi_direct_destroy_group() - /// @see wifi_direct_connection_state_changed_cb() - int wifi_direct_create_group_with_ssid( - ffi.Pointer ssid, - ) { - return _wifi_direct_create_group_with_ssid( - ssid, - ); - } - - late final _wifi_direct_create_group_with_ssidPtr = - _lookup)>>( - 'wifi_direct_create_group_with_ssid'); - late final _wifi_direct_create_group_with_ssid = - _wifi_direct_create_group_with_ssidPtr - .asFunction)>(); - - /// @brief Destroys the Wi-Fi Direct Group, asynchronously. - /// @details This function destroys the Wi-Fi Direct Group owned by a local device. - /// If creating a Group is in progress, this function cancels that creating. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @retval #WIFI_DIRECT_ERROR_AUTH_FAILED Authentication failed - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @post wifi_direct_connection_state_changed_cb() will be invoked with #WIFI_DIRECT_GROUP_DESTROYED. - /// @see wifi_direct_activate() - /// @see wifi_direct_create_group() - /// @see wifi_direct_connection_state_changed_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// void callback_1(int error_code, - /// wifi_direct_connection_state_e state, - /// const char *mac, void *user_data) - /// { - /// if (state == WIFI_DIRECT_GROUP_DESTROYED) { - /// printf("Group destroyed\n"); - /// } - /// } - /// - /// int function(void) - /// { - /// int res; - /// - /// res = wifi_direct_destroy_group() // destroy autonomous group - /// - /// if (res != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to destroy group\n"); - /// return -1; - /// } - /// - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_set_connection_state_changed_cb(callback_1, NULL); // Register callback_1 - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_unset_connection_state_changed_cb(); // Deregister callback_1 - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_destroy_group() { - return _wifi_direct_destroy_group(); - } - - late final _wifi_direct_destroy_groupPtr = - _lookup>( - 'wifi_direct_destroy_group'); - late final _wifi_direct_destroy_group = - _wifi_direct_destroy_groupPtr.asFunction(); - - /// @brief Checks whether this device is the group owner or not. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[out] is_group_owner Indicates whether this device is the group owner or not - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// int function(void) - /// { - /// int res; - /// bool owner; - /// - /// res = wifi_direct_is_group_owner(&owner); // destroy autonomous group - /// - /// if (res != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get ownership role\n"); - /// return -1; - /// } - /// - /// printf("role = %s\n", (owner)?"GO":"STA"); - /// return 0; - /// } - /// - /// void callback_1(int error_code, - /// wifi_direct_connection_state_e state, - /// const char *mac, void *user_data) - /// { - /// if (state == WIFI_DIRECT_GROUP_DESTROYED) { - /// printf("Group destroyed\n"); - /// - /// function(); - /// } - /// - /// if (state == WIFI_DIRECT_GROUP_CREATED) { - /// printf("Group created\n"); - /// - /// function(); - /// } - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_set_connection_state_changed_cb(callback_1, NULL); // Register callback_1 - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// wifi_direct_create_group(); - /// - /// wifi_direct_destroy_group(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_unset_connection_state_changed_cb(); // Deregister callback_1 - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_is_group_owner( - ffi.Pointer is_group_owner, - ) { - return _wifi_direct_is_group_owner( - is_group_owner, - ); - } - - late final _wifi_direct_is_group_ownerPtr = - _lookup)>>( - 'wifi_direct_is_group_owner'); - late final _wifi_direct_is_group_owner = _wifi_direct_is_group_ownerPtr - .asFunction)>(); - - /// @brief Checks whether the current group is the autonomous group or not. - /// @details If you create a group by wifi_direct_create_group(), - /// then the current group is the autonomous group. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[out] is_autonomous_group Indicates whether the current group is the autonomous group or not - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// @see wifi_direct_create_group() - /// @see wifi_direct_destroy_group() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// int function(void) - /// { - /// int res; - /// bool owner; - /// - /// res = wifi_direct_is_autonomous_group(&owner); // autonomous group - /// - /// if (res != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get ownership role\n"); - /// return -1; - /// } - /// - /// printf("Group = %s\n", (owner)?"Auto":"Non-Auto"); - /// return 0; - /// } - /// - /// void callback_1(int error_code, - /// wifi_direct_connection_state_e state, - /// const char *mac, void *user_data) - /// { - /// if (state == WIFI_DIRECT_GROUP_DESTROYED) { - /// printf("Group destroyed\n"); - /// } - /// - /// if (state == WIFI_DIRECT_GROUP_CREATED) { - /// printf("Group created\n"); - /// - /// function(); - /// } - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_set_connection_state_changed_cb(callback_1, NULL); // Register callback_1 - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// wifi_direct_create_group(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_unset_connection_state_changed_cb(); // Deregister callback_1 - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_is_autonomous_group( - ffi.Pointer is_autonomous_group, - ) { - return _wifi_direct_is_autonomous_group( - is_autonomous_group, - ); - } - - late final _wifi_direct_is_autonomous_groupPtr = - _lookup)>>( - 'wifi_direct_is_autonomous_group'); - late final _wifi_direct_is_autonomous_group = - _wifi_direct_is_autonomous_groupPtr - .asFunction)>(); - - /// @brief Sets the friendly name of a local device. - /// @details This device name is shown to other devices during device discovery. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @remarks The name set is only valid during activated state. - /// After Wi-Fi Direct is deactivated, this name will be same as the phone name. - /// @param[in] device_name The name of a local device - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// @see wifi_direct_get_device_name() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// int function(char *name) - /// { - /// int res; - /// - /// res = wifi_direct_set_device_name(&name); // set device name - /// - /// if (res != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to set device name\n"); - /// return -1; - /// } - /// - /// return 0; - /// } - /// - /// int main() - /// { - /// char name[256] = {0, }; - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// printf("Enter the device name\n"); - /// read(stdin, name, 255); - /// - /// function(name); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_set_device_name( - ffi.Pointer device_name, - ) { - return _wifi_direct_set_device_name( - device_name, - ); - } - - late final _wifi_direct_set_device_namePtr = - _lookup)>>( - 'wifi_direct_set_device_name'); - late final _wifi_direct_set_device_name = _wifi_direct_set_device_namePtr - .asFunction)>(); - - /// @brief Gets the name of a local device. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @remarks @a device_name must be released with free(). - /// @param[out] device_name The name of a local device - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_set_device_name() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// int function(void) - /// { - /// int res; - /// char *name; - /// - /// res = wifi_direct_get_device_name(&name); // get device name - /// - /// if (res != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get device name\n"); - /// return -1; - /// } - /// - /// printf("device name = %s\n", name); - /// g_free(name); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_device_name( - ffi.Pointer> device_name, - ) { - return _wifi_direct_get_device_name( - device_name, - ); - } - - late final _wifi_direct_get_device_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>)>>( - 'wifi_direct_get_device_name'); - late final _wifi_direct_get_device_name = _wifi_direct_get_device_namePtr - .asFunction>)>(); - - /// @brief Gets SSID (Service Set Identifier) of a local device. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @remarks @a ssid must be released using free(). - /// @param[out] ssid The SSID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// int function(void) - /// { - /// int res; - /// char *ssid; - /// - /// res = wifi_direct_get_ssid(&ssid); // get SSID - /// - /// if (res != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get ssid name\n"); - /// return -1; - /// } - /// - /// printf("SSID name = %s\n", ssid); - /// g_free(ssid); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_ssid( - ffi.Pointer> ssid, - ) { - return _wifi_direct_get_ssid( - ssid, - ); - } - - late final _wifi_direct_get_ssidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>)>>('wifi_direct_get_ssid'); - late final _wifi_direct_get_ssid = _wifi_direct_get_ssidPtr - .asFunction>)>(); - - /// @brief Gets the name of network interface (for example: eth0, pdp0). - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @remarks @a name must be released using free(). - /// @param[out] name The name of the network interface - /// @return @c 0 on success, - /// otherwise negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// int function(void) - /// { - /// int res; - /// char *iface_name; - /// - /// res = wifi_direct_get_network_interface_name(&iface_name); // get interface name - /// - /// if (res != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get interface name\n"); - /// return -1; - /// } - /// - /// printf("interface = %s\n", iface_name); - /// g_free(iface_name); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_network_interface_name( - ffi.Pointer> name, - ) { - return _wifi_direct_get_network_interface_name( - name, - ); - } - - late final _wifi_direct_get_network_interface_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>)>>( - 'wifi_direct_get_network_interface_name'); - late final _wifi_direct_get_network_interface_name = - _wifi_direct_get_network_interface_namePtr - .asFunction>)>(); - - /// @brief Gets IP address of a local device. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @remarks @a ip_address must be released using free(). - /// @param[out] ip_address The IP address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// int function(void); - /// - /// bool device_selected = false; - /// - /// void peers_cb(wifi_direct_discovered_peer_info_s* peer, - /// void *user_data) - /// { - /// if (peer && !device_selected) { - /// printf("peer device=%s MAC=%s\n", peer->device_name, peer->mac_address); - /// - /// device_selected = true; - /// - /// wifi_direct_connect(peer->mac_address); // Connect to the first discovered peer - /// } - /// } - /// - /// int function(void) - /// { - /// int ret; - /// char *ip; - /// - /// ret = wifi_direct_get_ip_address(&ip); // get ip address - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to connect the peer\n"); - /// return -1; - /// } - /// - /// printf("IP address=%s\n", ip); - /// g_free(ip); - /// return 0; - /// } - /// - /// void callback_2(int error_code, - /// wifi_direct_connection_state_e state, - /// const char *mac, void *user_data) - /// { - /// switch (state) { - /// case WIFI_DIRECT_CONNECTION_IN_PROGRESS: - /// printf("Connection in progress\n"); - /// break; - /// - /// case WIFI_DIRECT_CONNECTON_RSP: - /// printf("Connected\n"); - /// - /// function(); - /// break; - /// - /// case WIFI_DIRECT_DISCONNECTION_IND: - /// printf("Disconnection IND\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCONNECTION_RSP; - /// printf("Disconnected\n"); - /// break; - /// } - /// } - /// - /// void callback_1(int error_code, - /// wifi_direct_discovery_state_e discovery_state, - /// void *user_data) - /// { - /// switch(discovery_state) { - /// case WIFI_DIRECT_DISCOVERY_STARTED: - /// printf("Discovery started\n"); - /// break; - /// - /// case WIFI_DIRECT_ONLY_LISTEN_STARTED: - /// printf("listen started\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FINISHED: - /// printf("Discovery finished\n"); - /// - /// wifi_direct_foreach_discovered_peers(peers_cb, - /// NULL); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FOUND: - /// printf("peer devices found\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_LOST: - /// printf("Discovery lost\n"); - /// break; - /// - /// default: - /// break; - /// } - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_set_discovery_state_changed_cb(callback_1, NULL); // Register callback 1 - /// wifi_direct_set_connection_state_changed_cb(callback_2, NULL); // Register callback 2 - /// - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// wifi_direct_start_discovery(TRUE, 15); // Start discovery - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_unset_discovery_state_changed_cb(); // Deregister callback - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_ip_address( - ffi.Pointer> ip_address, - ) { - return _wifi_direct_get_ip_address( - ip_address, - ); - } - - late final _wifi_direct_get_ip_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>)>>( - 'wifi_direct_get_ip_address'); - late final _wifi_direct_get_ip_address = _wifi_direct_get_ip_addressPtr - .asFunction>)>(); - - /// @brief Gets the Subnet Mask. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @remarks @a subnet_mask must be released using free(). - /// @param[out] subnet_mask The subnet mask - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// int function(void); - /// - /// bool device_selected = false; - /// - /// void peers_cb(wifi_direct_discovered_peer_info_s* peer, - /// void *user_data) - /// { - /// if (peer && !device_selected) { - /// printf("peer device=%s MAC=%s\n", peer->device_name, peer->mac_address); - /// - /// device_selected = true; - /// - /// wifi_direct_connect(peer->mac_address); // Connect to the first discovered peer - /// } - /// } - /// - /// int function(void) - /// { - /// int ret; - /// char *subnet; - /// char *ip; - /// - /// wifi_direct_get_ip_address(&ip); // get ip address - /// - /// ret = wifi_direct_get_subnetmask(&subnet); // get subnet mask - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get subnet mask\n"); - /// return -1; - /// } - /// - /// printf("subnet address=%s\n", subnet); - /// g_free(ip); - /// g_free(subnet); - /// return 0; - /// } - /// - /// void callback_2(int error_code, - /// wifi_direct_connection_state_e state, - /// const char *mac, void *user_data) - /// { - /// switch (state) { - /// case WIFI_DIRECT_CONNECTION_IN_PROGRESS: - /// printf("Connection in progress\n"); - /// break; - /// - /// case WIFI_DIRECT_CONNECTON_RSP: - /// printf("Connected\n"); - /// - /// function(); - /// break; - /// - /// case WIFI_DIRECT_DISCONNECTION_IND: - /// printf("Disconnection IND\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCONNECTION_RSP; - /// printf("Disconnected\n"); - /// break; - /// } - /// } - /// - /// void callback_1(int error_code, - /// wifi_direct_discovery_state_e discovery_state, - /// void *user_data) - /// { - /// switch(discovery_state) { - /// case WIFI_DIRECT_DISCOVERY_STARTED: - /// printf("Discovery started\n"); - /// break; - /// - /// case WIFI_DIRECT_ONLY_LISTEN_STARTED: - /// printf("listen started\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FINISHED: - /// printf("Discovery finished\n"); - /// - /// wifi_direct_foreach_discovered_peers(peers_cb, - /// NULL); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FOUND: - /// printf("peer devices found\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_LOST: - /// printf("Discovery lost\n"); - /// break; - /// - /// default: - /// break; - /// } - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_set_discovery_state_changed_cb(callback_1, NULL); // Register callback 1 - /// wifi_direct_set_connection_state_changed_cb(callback_2, NULL); // Register callback 2 - /// - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// wifi_direct_start_discovery(TRUE, 15); // Start discovery - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_unset_discovery_state_changed_cb(); // Deregister callback - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_subnet_mask( - ffi.Pointer> subnet_mask, - ) { - return _wifi_direct_get_subnet_mask( - subnet_mask, - ); - } - - late final _wifi_direct_get_subnet_maskPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>)>>( - 'wifi_direct_get_subnet_mask'); - late final _wifi_direct_get_subnet_mask = _wifi_direct_get_subnet_maskPtr - .asFunction>)>(); - - /// @brief Gets the Gateway address. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @remarks @a gateway_address must be released using free(). - /// @param[out] gateway_address The gateway address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// int function(void); - /// - /// bool device_selected = false; - /// - /// void peers_cb(wifi_direct_discovered_peer_info_s* peer, - /// void *user_data) - /// { - /// if (peer && !device_selected) { - /// printf("peer device=%s MAC=%s\n", peer->device_name, peer->mac_address); - /// - /// device_selected = true; - /// - /// wifi_direct_connect(peer->mac_address); // Connect to the first discovered peer - /// } - /// } - /// - /// int function(void) - /// { - /// int ret; - /// char *gateway; - /// char *ip; - /// - /// wifi_direct_get_ip_address(&ip); // get ip address - /// - /// ret = wifi_direct_get_gateway_address(&gateway); // get gateway address - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get gateway address\n"); - /// return -1; - /// } - /// - /// printf("gateway address=%s\n", gateway); - /// g_free(ip); - /// g_free(gateway); - /// return 0; - /// } - /// - /// void callback_2(int error_code, - /// wifi_direct_connection_state_e state, - /// const char *mac, void *user_data) - /// { - /// switch (state) { - /// case WIFI_DIRECT_CONNECTION_IN_PROGRESS: - /// printf("Connection in progress\n"); - /// break; - /// - /// case WIFI_DIRECT_CONNECTON_RSP: - /// printf("Connected\n"); - /// - /// function(); - /// break; - /// - /// case WIFI_DIRECT_DISCONNECTION_IND: - /// printf("Disconnection IND\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCONNECTION_RSP; - /// printf("Disconnected\n"); - /// break; - /// } - /// } - /// - /// void callback_1(int error_code, - /// wifi_direct_discovery_state_e discovery_state, - /// void *user_data) - /// { - /// switch(discovery_state) { - /// case WIFI_DIRECT_DISCOVERY_STARTED: - /// printf("Discovery started\n"); - /// break; - /// - /// case WIFI_DIRECT_ONLY_LISTEN_STARTED: - /// printf("listen started\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FINISHED: - /// printf("Discovery finished\n"); - /// - /// wifi_direct_foreach_discovered_peers(peers_cb, - /// NULL); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FOUND: - /// printf("peer devices found\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_LOST: - /// printf("Discovery lost\n"); - /// break; - /// - /// default: - /// break; - /// } - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_set_discovery_state_changed_cb(callback_1, NULL); // Register callback 1 - /// wifi_direct_set_connection_state_changed_cb(callback_2, NULL); // Register callback 2 - /// - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// wifi_direct_start_discovery(TRUE, 15); // Start discovery - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_unset_connection_state_changed_cb(); // Deregister callback - /// wifi_direct_unset_discovery_state_changed_cb(); // Deregister callback - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_gateway_address( - ffi.Pointer> gateway_address, - ) { - return _wifi_direct_get_gateway_address( - gateway_address, - ); - } - - late final _wifi_direct_get_gateway_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>)>>( - 'wifi_direct_get_gateway_address'); - late final _wifi_direct_get_gateway_address = - _wifi_direct_get_gateway_addressPtr - .asFunction>)>(); - - /// @brief Gets MAC address of a local device. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @remarks @a mac_address must be released using free(). - /// @param[out] mac_address The MAC address - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// int function(void); - /// - /// bool device_selected = false; - /// - /// void peers_cb(wifi_direct_discovered_peer_info_s* peer, - /// void *user_data) - /// { - /// if (peer && !device_selected) { - /// printf("peer device=%s MAC=%s\n", peer->device_name, peer->mac_address); - /// - /// device_selected = true; - /// - /// wifi_direct_connect(peer->mac_address); // Connect to the first discovered peer - /// } - /// } - /// - /// int function(void) - /// { - /// int ret; - /// char *mac; - /// char *ip; - /// - /// wifi_direct_get_ip_address(&ip); // get ip address - /// - /// ret = wifi_direct_get_mac_address(&mac); // get MAC address - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get mac address\n"); - /// return -1; - /// } - /// - /// printf("MAC address=%s\n", mac); - /// g_free(ip); - /// g_free(mac); - /// return 0; - /// } - /// - /// void callback_2(int error_code, - /// wifi_direct_connection_state_e state, - /// const char *mac, void *user_data) - /// { - /// switch (state) { - /// case WIFI_DIRECT_CONNECTION_IN_PROGRESS: - /// printf("Connection in progress\n"); - /// break; - /// - /// case WIFI_DIRECT_CONNECTON_RSP: - /// printf("Connected\n"); - /// - /// function(); - /// break; - /// - /// case WIFI_DIRECT_DISCONNECTION_IND: - /// printf("Disconnection IND\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCONNECTION_RSP; - /// printf("Disconnected\n"); - /// break; - /// } - /// } - /// - /// void callback_1(int error_code, - /// wifi_direct_discovery_state_e discovery_state, - /// void *user_data) - /// { - /// switch(discovery_state) { - /// case WIFI_DIRECT_DISCOVERY_STARTED: - /// printf("Discovery started\n"); - /// break; - /// - /// case WIFI_DIRECT_ONLY_LISTEN_STARTED: - /// printf("listen started\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FINISHED: - /// printf("Discovery finished\n"); - /// - /// wifi_direct_foreach_discovered_peers(peers_cb, - /// NULL); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FOUND: - /// printf("peer devices found\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_LOST: - /// printf("Discovery lost\n"); - /// break; - /// - /// default: - /// break; - /// } - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_set_discovery_state_changed_cb(callback_1, NULL); // Register callback 1 - /// wifi_direct_set_connection_state_changed_cb(callback_2, NULL); // Register callback 2 - /// - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// wifi_direct_start_discovery(TRUE, 15); // Start discovery - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_unset_connection_state_changed_cb(); // Deregister callback - /// wifi_direct_unset_discovery_state_changed_cb(); // Deregister callback - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_mac_address( - ffi.Pointer> mac_address, - ) { - return _wifi_direct_get_mac_address( - mac_address, - ); - } - - late final _wifi_direct_get_mac_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>)>>( - 'wifi_direct_get_mac_address'); - late final _wifi_direct_get_mac_address = _wifi_direct_get_mac_addressPtr - .asFunction>)>(); - - /// @brief Gets the state of Wi-Fi Direct service. - /// @since_tizen 2.3 - /// @param[out] state The state of Wi-Fi Direct service - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// char* print_state(wifi_direct_state_e state) - /// { - /// if (state == WIFI_DIRECT_STATE_DEACTIVATED) - /// return "DEACTIVATED"; - /// if (state == WIFI_DIRECT_STATE_ACTIVATING) - /// return "ACTIVATING"; - /// if (state == WIFI_DIRECT_STATE_ACTIVATED) - /// return "ACTIVATED"; - /// if (state == WIFI_DIRECT_STATE_DISCOVERING) - /// return "DISCOVERING"; - /// if (state == WIFI_DIRECT_STATE_CONNECTING) - /// return "CONNECTING"; - /// if (state == WIFI_DIRECT_STATE_DISCONNECTING) - /// return "DISCONNECTING"; - /// if (state == WIFI_DIRECT_STATE_CONNECTED) - /// return "CONNECTED"; - /// if (state == WIFI_DIRECT_STATE_GROUP_OWNER) - /// return "GROUP OWNER"; - /// - /// return "Unknown state"; - /// } - /// - /// int function(void) - /// { - /// int ret; - /// int state; - /// - /// ret = wifi_direct_get_state(&state); // get Wi-Fi Direct state - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get state\n"); - /// return -1; - /// } - /// - /// printf(Wi-Fi Direct State = %s\n, print_state(state)); - /// - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_state( - ffi.Pointer state, - ) { - return _wifi_direct_get_state( - state, - ); - } - - late final _wifi_direct_get_statePtr = - _lookup)>>( - 'wifi_direct_get_state'); - late final _wifi_direct_get_state = _wifi_direct_get_statePtr - .asFunction)>(); - - /// @brief Checks whether this device is discoverable or not by P2P discovery. - /// @details If you call wifi_direct_start_discovery(), then your device can be discoverable. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[out] discoverable The status of discoverable: - /// (@c true = discoverable, @c false = non-discoverable) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_start_discovery() - /// @see wifi_direct_cancel_discovery() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// int function(void) - /// { - /// int ret; - /// bool discoverable; - /// - /// ret = wifi_direct_is_discoverable(&discoverable); // check if device is discoverable - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get discoverable property\n"); - /// return -1; - /// } - /// - /// printf("discoverable=%s\n", discoverable?"Yes":"No"); - /// - /// return 0; - /// } - /// - /// void callback_1(int error_code, - /// wifi_direct_discovery_state_e discovery_state, - /// void *user_data) - /// { - /// switch(discovery_state) { - /// case WIFI_DIRECT_DISCOVERY_STARTED: - /// printf("Discovery started\n"); - /// - /// function(); - /// break; - /// - /// case WIFI_DIRECT_ONLY_LISTEN_STARTED: - /// printf("listen started\n"); - /// - /// function(); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FINISHED: - /// printf("Discovery finished\n"); - /// - /// function(); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FOUND: - /// printf("peer devices found\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_LOST: - /// printf("Discovery lost\n"); - /// break; - /// - /// default: - /// break; - /// } - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// wifi_direct_set_discovery_state_changed_cb(callback_1, NULL); // Register callback 1 - /// - /// wifi_direct_start_discovery(TRUE, 15); // Start discovery - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_unset_discovery_state_changed_cb(); // Deregister callback - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_is_discoverable( - ffi.Pointer discoverable, - ) { - return _wifi_direct_is_discoverable( - discoverable, - ); - } - - late final _wifi_direct_is_discoverablePtr = - _lookup)>>( - 'wifi_direct_is_discoverable'); - late final _wifi_direct_is_discoverable = _wifi_direct_is_discoverablePtr - .asFunction)>(); - - /// @brief Checks whether the local device is listening only. - /// @details If you call wifi_direct_start_discovery() with @a listen_only as @c true, - /// it does not support specific channel but the initial 802.11. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[out] listen_only The status of listen only:(@c true = listen only, @c false = - /// cycling between Scan and Listen or not in discovery state) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// @see wifi_direct_start_discovery() - /// @see wifi_direct_cancel_discovery() - /// @see wifi_direct_is_discoverable() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// int function(void) - /// { - /// int ret; - /// bool listen_only; - /// - /// ret = wifi_direct_is_listening_only(&listen_only); // check if device is listening - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get discoverable property\n"); - /// return -1; - /// } - /// - /// printf("listening=%s\n", listen_only?"Yes":"No"); - /// - /// return 0; - /// } - /// - /// void callback_1(int error_code, - /// wifi_direct_discovery_state_e discovery_state, - /// void *user_data) - /// { - /// switch(discovery_state) { - /// case WIFI_DIRECT_DISCOVERY_STARTED: - /// printf("Discovery started\n"); - /// break; - /// - /// case WIFI_DIRECT_ONLY_LISTEN_STARTED: - /// printf("listen started\n"); - /// - /// function(); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FINISHED: - /// printf("Discovery finished\n"); - /// - /// function(); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FOUND: - /// printf("peer devices found\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_LOST: - /// printf("Discovery lost\n"); - /// break; - /// - /// default: - /// break; - /// } - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// wifi_direct_set_discovery_state_changed_cb(callback_1, NULL); // Register callback 1 - /// - /// wifi_direct_start_discovery(TRUE, 15); // Start discovery - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_unset_discovery_state_changed_cb(); // Deregister callback - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_is_listening_only( - ffi.Pointer listen_only, - ) { - return _wifi_direct_is_listening_only( - listen_only, - ); - } - - late final _wifi_direct_is_listening_onlyPtr = - _lookup)>>( - 'wifi_direct_is_listening_only'); - late final _wifi_direct_is_listening_only = _wifi_direct_is_listening_onlyPtr - .asFunction)>(); - - /// @brief Gets the primary device type of a local device. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[out] type The primary device type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// char* print_type(wifi_direct_primary_device_type_e type) - /// { - /// if (type == WIFI_DIRECT_PRIMARY_DEVICE_TYPE_COMPUTER) - /// return "Computer"; - /// if (state == WIFI_DIRECT_PRIMARY_DEVICE_TYPE_CAMERA) - /// return "Camera"; - /// if (state == WIFI_DIRECT_PRIMARY_DEVICE_TYPE_STORAGE) - /// return "Storage"; - /// if (state == WIFI_DIRECT_PRIMARY_DEVICE_TYPE_DISPLAY) - /// return "Display"; - /// if (state == WIFI_DIRECT_PRIMARY_DEVICE_TYPE_TELEPHONE) - /// return "Telephone"; - /// - /// // Refer wifi_direct_primary_device_type_e enum for all devices - /// } - /// - /// int function(void) - /// { - /// int ret; - /// int type; - /// - /// ret = wifi_direct_get_primary_device_type(&type); // get primary device type - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get primary device type\n"); - /// return -1; - /// } - /// - /// printf("primary Device = %s\n", print_type(type)); - /// - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_primary_device_type( - ffi.Pointer type, - ) { - return _wifi_direct_get_primary_device_type( - type, - ); - } - - late final _wifi_direct_get_primary_device_typePtr = - _lookup)>>( - 'wifi_direct_get_primary_device_type'); - late final _wifi_direct_get_primary_device_type = - _wifi_direct_get_primary_device_typePtr - .asFunction)>(); - - /// @brief Gets the secondary device type of a local device. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[out] type The secondary device type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// char* print_type(wifi_direct_primary_device_type_e type) - /// { - /// if (type == WIFI_DIRECT_SECONDARY_DEVICE_TYPE_COMPUTER_PC) - /// return "Computer pc"; - /// if (state == WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_KEYBOARD) - /// return "input Keyboard"; - /// if (state == WIFI_DIRECT_SECONDARY_DEVICE_TYPE_CAMERA_VIDEO) - /// return "Camera Video"; - /// if (state == WIFI_DIRECT_SECONDARY_DEVICE_TYPE_STORAGE_NAS) - /// return "Storage NAS"; - /// if (state == WIFI_DIRECT_SECONDARY_DEVICE_TYPE_DISPLAY_TV) - /// return "Display TV"; - /// - /// // Refer wifi_direct_secondary_device_type_e enum for all devices - /// } - /// - /// int function(void) - /// { - /// int ret; - /// int type; - /// - /// ret = wifi_direct_get_secondary_device_type(&type); // get secondary device type - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get secondary device type\n"); - /// return -1; - /// } - /// - /// printf("secondary Device = %s\n", print_type(type)); - /// - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_secondary_device_type( - ffi.Pointer type, - ) { - return _wifi_direct_get_secondary_device_type( - type, - ); - } - - late final _wifi_direct_get_secondary_device_typePtr = - _lookup)>>( - 'wifi_direct_get_secondary_device_type'); - late final _wifi_direct_get_secondary_device_type = - _wifi_direct_get_secondary_device_typePtr - .asFunction)>(); - - /// @brief Sets the WPS config PBC as preferred method for connection. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// int function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_activate_pushbutton(); // Activate WPS PBC Push Button - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to activate push button\n"); - /// return -1; - /// } - /// - /// printf("Push button Activated successfully\n"); - /// - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_activate_pushbutton() { - return _wifi_direct_activate_pushbutton(); - } - - late final _wifi_direct_activate_pushbuttonPtr = - _lookup>( - 'wifi_direct_activate_pushbutton'); - late final _wifi_direct_activate_pushbutton = - _wifi_direct_activate_pushbuttonPtr.asFunction(); - - /// @brief Sets or updates the WPS PIN number user expects. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] pin New pin to set. Application must set the new pin number before - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// @see wifi_direct_get_wps_pin() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// char pin[9] = {0, }; - /// - /// printf("Input 8 digit PIN to set the WPS PIN mode\n"); - /// read(stdin, pin, 8); - /// - /// ret = wifi_direct_set_wps_pin(pin); // Set the WPS PIN for connection - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to set the WPS PIN\n"); - /// return -1; - /// } - /// - /// printf("WPS PIN set success\n"); - /// return 0; - /// } - /// - /// void callback(int error_code, - /// wifi_direct_connection_state_e connection_state, - /// const char *mac_address, - /// void *user_data) - /// { - /// char *ip; - /// bool owner; - /// int wps_mode; - /// - /// switch (connection_state) { - /// - /// case WIFI_DIRECT_CONNECTION_IN_PROGRESS: - /// printf("Connection in progress\n"); - /// break; - /// - /// case WIFI_DIRECT_CONNECTION_RSP: - /// if (error_code == WIFI_DIRECT_ERROR_NONE) { - /// printf("Peer Device Connected\n"); // device is connected - /// - /// printf("MAC=%s\n", mac_address); // device's MAC address - /// - /// wifi_direct_get_ip_address(&ip); - /// printf("IP=%s\n", ip); //device's IP address - /// - /// wifi_direct_is_group_owner(&owner); - /// printf("Ownership=%s\n", (owner)? "GO":"STA"); // (GO or client role) - /// - /// } else if (error_code == WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT) { - /// printf("Connection timeout occurred\n"); - /// } else if (error_code == WIFI_DIRECT_ERROR_AUTH_FAILED) { - /// printf("Connection authorization Failed\n"); - /// } else - /// printf("Connection failed\n"); - /// break; - /// - /// case WIFI_DIRECT_CONNECTION_WPS_REQ: - /// - /// wifi_direct_get_local_wps_type(&wps_mode); - /// - /// if (wps_mode == WIFI_DIRECT_WPS_TYPE_PBC) { - /// printf("Connection type WPS PBC\n"); - /// // Handle WPS PBC case here - /// } - /// - /// if (wps_mode == WIFI_DIRECT_WPS_TYPE_PIN_DISPLAY) { - /// printf("Connection type WPS PIN DISPLAY\n"); - /// // Handle WPS PIN Display case here - /// } - /// - /// if (wps_mode == WIFI_DIRECT_WPS_PIN_KEYPAD) { - /// printf("Connection type WPS PIN KEYPAD\n"); - /// - /// // Set 8 digit WPS PIN here - /// // Since the device has received the wps mode as PIN Keypad - /// // User need to set the WPS PIN for peer - /// // device connection using PIN method. - /// - /// if (function() == 0) - /// wifi_direct_accept_connection(mac_address); // Accept the requested connection - /// - /// } - /// break; - /// - /// case WIFI_DIRECT_CONNECTION_REQ: - /// printf("Connection request from MAC %s\n", mac_address); - /// - /// // Handle the connection request from peer device here - /// // 1. WPS PBC - /// // 2. WPS PIN Display - /// // 3. WPS PIN Keypad - /// - /// wifi_direct_accept_connection(mac_address); - /// break; - /// - /// case WIFI_DIRECT_DISCONNECTION_IND: - /// if (error_code == WIFI_DIRECT_ERROR_NONE) - /// printf("peer device disconnected MAC %s\n", mac_address); - /// break; - /// - /// case WIFI_DIRECT_DISCONNECTION_RSP: - /// if (error_code == WIFI_DIRECT_ERROR_NONE) - /// printf("peer device disconnection response MAC %s\n", mac_address); - /// break; - /// - /// case WIFI_DIRECT_CONNECTION_DISASSOCIATION_IND: - /// if (error_code == WIFI_DIRECT_ERROR_NONE) - /// printf("peer device disassociation MAC %s\n", mac_address); - /// break; - /// - /// case WIFI_DIRECT_GROUP_CREATED: - /// printf("Group Created\n"); - /// break; - /// - /// case WIFI_DIRECT_GROUP_DESTROYED: - /// printf("Group Destroyed\n"); - /// break; - /// - /// default: - /// break; - /// } - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_set_connection_state_changed_cb(callback, NULL); // Register callback - /// - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// - /// wifi_direct_set_connection_state_changed_cb(callback, NULL); // Deregister callback - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_set_wps_pin( - ffi.Pointer pin, - ) { - return _wifi_direct_set_wps_pin( - pin, - ); - } - - late final _wifi_direct_set_wps_pinPtr = - _lookup)>>( - 'wifi_direct_set_wps_pin'); - late final _wifi_direct_set_wps_pin = _wifi_direct_set_wps_pinPtr - .asFunction)>(); - - /// @brief Gets the WPS PIN number. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @remarks @a pin must be released with free(). - /// @param[out] pin Pointer to store pin number. Application must free this memory - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// @see wifi_direct_set_wps_pin() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// char *pin; - /// - /// ret = wifi_direct_get_wps_pin(&pin); // Get the WPS PIN - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get the WPS PIN\n"); - /// return -1; - /// } - /// - /// printf("WPS PIN : %s\n", pin); - /// g_free(pin); - /// return 0; - /// } - /// - /// void callback(int error_code, - /// wifi_direct_connection_state_e connection_state, - /// const char *mac_address, - /// void *user_data) - /// { - /// char *ip; - /// bool owner; - /// int wps_mode; - /// - /// switch (connection_state) { - /// - /// case WIFI_DIRECT_CONNECTION_IN_PROGRESS: - /// printf("Connection in progress\n"); - /// break; - /// - /// case WIFI_DIRECT_CONNECTION_RSP: - /// if (error_code == WIFI_DIRECT_ERROR_NONE) { - /// printf("Peer Device Connected\n"); // device is connected - /// - /// printf("MAC=%s\n", mac_address); // device's MAC address - /// - /// wifi_direct_get_ip_address(&ip); - /// printf("IP=%s\n", ip); //device's IP address - /// - /// wifi_direct_is_group_owner(&owner); - /// printf("Ownership=%s\n", (owner)? "GO":"STA"); // (GO or client role) - /// - /// } else if (error_code == WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT) { - /// printf("Connection timeout occurred\n"); - /// } else if (error_code == WIFI_DIRECT_ERROR_AUTH_FAILED) { - /// printf("Connection authorization Failed\n"); - /// } else - /// printf("Connection failed\n"); - /// break; - /// - /// case WIFI_DIRECT_CONNECTION_WPS_REQ: - /// - /// wifi_direct_get_local_wps_type(&wps_mode); - /// - /// if (wps_mode == WIFI_DIRECT_WPS_TYPE_PBC) { - /// printf("Connection type WPS PBC\n"); - /// // Handle WPS PBC case here - /// } - /// - /// if (wps_mode == WIFI_DIRECT_WPS_TYPE_PIN_DISPLAY) { - /// printf("Connection type WPS PIN DISPLAY\n"); - /// // Handle WPS PIN Display case here - /// - /// - /// // Display WPS PIN here - /// // Since the device received WPS PIN Display connection request - /// // user need to display the WPS PIN which is shared by peer device - /// function(); - /// - /// } - /// - /// if (wps_mode == WIFI_DIRECT_WPS_PIN_KEYPAD) { - /// printf("Connection type WPS PIN KEYPAD\n"); - /// // Handle WPS PIN Keypad case here - /// } - /// break; - /// - /// case WIFI_DIRECT_CONNECTION_REQ: - /// printf("Connection request from MAC %s\n", mac_address); - /// - /// // Handle the connection request from peer device here - /// // 1. WPS PBC - /// // 2. WPS PIN Display - /// // 3. WPS PIN Keypad - /// - /// wifi_direct_accept_connection(mac_address); - /// break; - /// - /// case WIFI_DIRECT_DISCONNECTION_IND: - /// if (error_code == WIFI_DIRECT_ERROR_NONE) - /// printf("peer device disconnected MAC %s\n", mac_address); - /// break; - /// - /// case WIFI_DIRECT_DISCONNECTION_RSP: - /// if (error_code == WIFI_DIRECT_ERROR_NONE) - /// printf("peer device disconnection response MAC %s\n", mac_address); - /// break; - /// - /// case WIFI_DIRECT_CONNECTION_DISASSOCIATION_IND: - /// if (error_code == WIFI_DIRECT_ERROR_NONE) - /// printf("peer device disassociation MAC %s\n", mac_address); - /// break; - /// - /// case WIFI_DIRECT_GROUP_CREATED: - /// printf("Group Created\n"); - /// break; - /// - /// case WIFI_DIRECT_GROUP_DESTROYED: - /// printf("Group Destroyed\n"); - /// break; - /// - /// default: - /// break; - /// } - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_set_connection_state_changed_cb(callback, NULL); // Register callback - /// - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// - /// wifi_direct_set_connection_state_changed_cb(callback, NULL); // Deregister callback - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_wps_pin( - ffi.Pointer> pin, - ) { - return _wifi_direct_get_wps_pin( - pin, - ); - } - - late final _wifi_direct_get_wps_pinPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>)>>('wifi_direct_get_wps_pin'); - late final _wifi_direct_get_wps_pin = _wifi_direct_get_wps_pinPtr - .asFunction>)>(); - - /// @brief Gets all the supported WPS (Wi-Fi Protected Setup) types at local device. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[out] wps_mode Supported WPS mode for local device - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// int function(void) - /// { - /// int ret; - /// int wps_mode; - /// - /// ret = wifi_direct_get_supported_wps_mode(&wps_mode); // Get supported WPS mode - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get supported wps mode\n"); - /// return -1; - /// } - /// - /// switch (wps_mode) { - /// case WIFI_DIRECT_WPS_TYPE_PBC: - /// printf("mode is WPS PBC\n"); - /// break; - /// - /// case WIFI_DIRECT_WPS_TYPE_PIN_DISPLAY: - /// printf("mode is WPS PIN Display\n"); - /// break; - /// - /// case WIFI_DIRECT_WPS_TYPE_PIN_KEYPAD: - /// printf("mode is WPS PIN Keypad\n"); - /// break; - /// } - /// - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_supported_wps_mode( - ffi.Pointer wps_mode, - ) { - return _wifi_direct_get_supported_wps_mode( - wps_mode, - ); - } - - late final _wifi_direct_get_supported_wps_modePtr = - _lookup)>>( - 'wifi_direct_get_supported_wps_mode'); - late final _wifi_direct_get_supported_wps_mode = - _wifi_direct_get_supported_wps_modePtr - .asFunction)>(); - - /// @brief Gets the supported WPS (Wi-Fi Protected Setup) types. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_supported_wps_type_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// bool callback(wifi_direct_wps_types_e type, void *user_data) - /// { - /// switch (type) { - /// case WIFI_DIRECT_WPS_TYPE_PBC: - /// printf("mode is WPS PBC\n"); - /// break; - /// - /// case WIFI_DIRECT_WPS_TYPE_PIN_DISPLAY: - /// printf("mode is WPS PIN Display\n"); - /// break; - /// - /// case WIFI_DIRECT_WPS_TYPE_PIN_KEYPAD: - /// printf("mode is WPS PIN Keypad\n"); - /// break; - /// } - /// } - /// - /// int function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_foreach_supported_wps_types(callback, NULL); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get supported wps types\n"); - /// return -1; - /// } - /// - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_foreach_supported_wps_types( - wifi_direct_supported_wps_type_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_direct_foreach_supported_wps_types( - callback, - user_data, - ); - } - - late final _wifi_direct_foreach_supported_wps_typesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - wifi_direct_supported_wps_type_cb, ffi.Pointer)>>( - 'wifi_direct_foreach_supported_wps_types'); - late final _wifi_direct_foreach_supported_wps_types = - _wifi_direct_foreach_supported_wps_typesPtr.asFunction< - int Function( - wifi_direct_supported_wps_type_cb, ffi.Pointer)>(); - - /// @brief Gets the WPS (Wi-Fi Protected Setup) type. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[out] type The type of WPS - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_foreach_supported_wps_types() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// int wps_type; - /// - /// ret = wifi_direct_get_local_wps_type(&wps_type); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get supported wps types\n"); - /// return -1; - /// } - /// - /// switch (wps_type) { - /// case WIFI_DIRECT_WPS_TYPE_PBC: - /// printf("mode is WPS PBC\n"); - /// break; - /// - /// case WIFI_DIRECT_WPS_TYPE_PIN_DISPLAY: - /// printf("mode is WPS PIN Display\n"); - /// break; - /// - /// case WIFI_DIRECT_WPS_TYPE_PIN_KEYPAD: - /// printf("mode is WPS PIN Keypad\n"); - /// break; - /// } - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_local_wps_type( - ffi.Pointer type, - ) { - return _wifi_direct_get_local_wps_type( - type, - ); - } - - late final _wifi_direct_get_local_wps_typePtr = - _lookup)>>( - 'wifi_direct_get_local_wps_type'); - late final _wifi_direct_get_local_wps_type = - _wifi_direct_get_local_wps_typePtr - .asFunction)>(); - - /// @brief Sets the requested WPS (Wi-Fi Protected Setup) type. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] type The type of WPS - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_foreach_supported_wps_types() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// int wps_type; - /// int option; - /// - /// printf("Input new WPS mode\n"); - /// printf("1. WPS Type PBC\n"); - /// printf("2. WPS Type PIN Display\n"); - /// printf("3. WPS Type PIN Keypad\n"); - /// scanf("%1d", &option); - /// - /// switch (input) { - /// case 1: - /// wps_type = WIFI_DIRECT_WPS_TYPE_PBC; - /// break; - /// - /// case 2: - /// wps_type = WIFI_DIRECT_WPS_TYPE_PIN_DISPLAY; - /// break; - /// - /// case 3: - /// wps_type = WIFI_DIRECT_WPS_TYPE_PIN_KEYPAD; - /// break; - /// } - /// - /// ret = wifi_direct_set_req_wps_type(wps_type); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to set requested wps types\n"); - /// return -1; - /// } - /// - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_set_req_wps_type( - int type, - ) { - return _wifi_direct_set_req_wps_type( - type, - ); - } - - late final _wifi_direct_set_req_wps_typePtr = - _lookup>( - 'wifi_direct_set_req_wps_type'); - late final _wifi_direct_set_req_wps_type = - _wifi_direct_set_req_wps_typePtr.asFunction(); - - /// @brief Gets the requested WPS (Wi-Fi Protected Setup) type. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[out] type The type of WPS - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_foreach_supported_wps_types() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// int wps_type; - /// - /// ret = wifi_direct_get_req_wps_type(&wps_type); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get supported wps types\n"); - /// return -1; - /// } - /// - /// switch (wps_type) { - /// case WIFI_DIRECT_WPS_TYPE_PBC: - /// printf("mode is WPS PBC\n"); - /// break; - /// - /// case WIFI_DIRECT_WPS_TYPE_PIN_DISPLAY: - /// printf("mode is WPS PIN Display\n"); - /// break; - /// - /// case WIFI_DIRECT_WPS_TYPE_PIN_KEYPAD: - /// printf("mode is WPS PIN Keypad\n"); - /// break; - /// } - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_req_wps_type( - ffi.Pointer type, - ) { - return _wifi_direct_get_req_wps_type( - type, - ); - } - - late final _wifi_direct_get_req_wps_typePtr = - _lookup)>>( - 'wifi_direct_get_req_wps_type'); - late final _wifi_direct_get_req_wps_type = _wifi_direct_get_req_wps_typePtr - .asFunction)>(); - - /// @brief Sets the intent of the group owner. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @remarks The range of intent is 0 - 15. The higher the @a intent is, - /// the higher the probability to be the group owner is. - /// @param[in] intent The intent of the group owner - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_get_group_owner_intent() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// int go_intent; - /// - /// printf("Input the GO Intent range(0~15)\n"); - /// scanf("%2d", &go_intent); - /// - /// ret = wifi_direct_set_group_owner_intent(go_intent); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to set go intent\n"); - /// return -1; - /// } - /// - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_set_group_owner_intent( - int intent, - ) { - return _wifi_direct_set_group_owner_intent( - intent, - ); - } - - late final _wifi_direct_set_group_owner_intentPtr = - _lookup>( - 'wifi_direct_set_group_owner_intent'); - late final _wifi_direct_set_group_owner_intent = - _wifi_direct_set_group_owner_intentPtr.asFunction(); - - /// @brief Sets the intent of the group owner for each connection type. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @remarks The range of intent is 0 - 15. The higher the @a intent is, the higher the probability to be the group owner is. - /// @param[in] type The type of connection for a peer device - /// @param[in] intent The intent of the group owner - /// @return 0 on success, otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_get_go_intent_per_type() - int wifi_direct_set_go_intent_per_type( - int type, - int intent, - ) { - return _wifi_direct_set_go_intent_per_type( - type, - intent, - ); - } - - late final _wifi_direct_set_go_intent_per_typePtr = - _lookup>( - 'wifi_direct_set_go_intent_per_type'); - late final _wifi_direct_set_go_intent_per_type = - _wifi_direct_set_go_intent_per_typePtr - .asFunction(); - - /// @brief Gets the intent of the group owner. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[out] intent The intent of the group owner - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_set_group_owner_intent() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// int go_intent; - /// - /// ret = wifi_direct_get_group_owner_intent(&go_intent); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get go intent\n"); - /// return -1; - /// } - /// - /// printf("Current GO Intent = %d\n", go_intent); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_group_owner_intent( - ffi.Pointer intent, - ) { - return _wifi_direct_get_group_owner_intent( - intent, - ); - } - - late final _wifi_direct_get_group_owner_intentPtr = - _lookup)>>( - 'wifi_direct_get_group_owner_intent'); - late final _wifi_direct_get_group_owner_intent = - _wifi_direct_get_group_owner_intentPtr - .asFunction)>(); - - /// @brief Gets the intent of the group owner for each connection type. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] type The type of connection for a peer device - /// @param[out] intent The intent of the group owner - /// @return 0 on success, otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_set_go_intent_per_type() - int wifi_direct_get_go_intent_per_type( - int type, - ffi.Pointer intent, - ) { - return _wifi_direct_get_go_intent_per_type( - type, - intent, - ); - } - - late final _wifi_direct_get_go_intent_per_typePtr = _lookup< - ffi.NativeFunction)>>( - 'wifi_direct_get_go_intent_per_type'); - late final _wifi_direct_get_go_intent_per_type = - _wifi_direct_get_go_intent_per_typePtr - .asFunction)>(); - - /// @brief Sets the max number of clients. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] max The max number of clients - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_get_max_clients() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// int max_client; - /// - /// printf("Input the maximum clients to be connected\n"); - /// scanf("%4d", &max_client); - /// - /// ret = wifi_direct_set_max_clients(max_client); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to set max clients\n"); - /// return -1; - /// } - /// - /// printf("max client set success\n"); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_set_max_clients( - int max, - ) { - return _wifi_direct_set_max_clients( - max, - ); - } - - late final _wifi_direct_set_max_clientsPtr = - _lookup>( - 'wifi_direct_set_max_clients'); - late final _wifi_direct_set_max_clients = - _wifi_direct_set_max_clientsPtr.asFunction(); - - /// @brief Gets the max number of clients. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] max The max number of clients - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_set_max_clients() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// int max_client; - /// - /// ret = wifi_direct_get_max_clients(&max_client); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get max clients\n"); - /// return -1; - /// } - /// - /// printf("max client = %d\n", max_client); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_max_clients( - ffi.Pointer max, - ) { - return _wifi_direct_get_max_clients( - max, - ); - } - - late final _wifi_direct_get_max_clientsPtr = - _lookup)>>( - 'wifi_direct_get_max_clients'); - late final _wifi_direct_get_max_clients = _wifi_direct_get_max_clientsPtr - .asFunction)>(); - - /// @brief Sets or updates Wi-Fi Protected Access (WPA) password. - /// When creating Wi-Fi Direct Group, this password will be used. - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @remarks A peer can connect to this group as Wi-Fi Infrastructured mode with a passphrase. - /// @param[in] passphrase new wpa password to set. Application must set the new password before. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// @see wifi_direct_get_passphrase() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// char key[65] = {0, }; - /// - /// printf("Input the passphrase\n"); - /// read(stdin, key, 64); - /// - /// ret = wifi_direct_set_passphrase(key); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to set passphrase\n"); - /// return -1; - /// } - /// - /// printf("passphrase set success\n"); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_set_passphrase( - ffi.Pointer passphrase, - ) { - return _wifi_direct_set_passphrase( - passphrase, - ); - } - - late final _wifi_direct_set_passphrasePtr = - _lookup)>>( - 'wifi_direct_set_passphrase'); - late final _wifi_direct_set_passphrase = _wifi_direct_set_passphrasePtr - .asFunction)>(); - - /// @brief Gets the Wi-Fi Protected Access (WPA) password when creating Wi-Fi Direct Group. - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @remarks @a passphrase must be released with free(). - /// @param[out] passphrase Pointer to store wpa password. Application must free this memory - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// @see wifi_direct_set_passphrase() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// char *key; - /// - /// ret = wifi_direct_get_passphrase(&key); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get passphrase\n"); - /// return -1; - /// } - /// - /// printf("passphrase = %s\n", key); - /// g_free(key); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_passphrase( - ffi.Pointer> passphrase, - ) { - return _wifi_direct_get_passphrase( - passphrase, - ); - } - - late final _wifi_direct_get_passphrasePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>)>>( - 'wifi_direct_get_passphrase'); - late final _wifi_direct_get_passphrase = _wifi_direct_get_passphrasePtr - .asFunction>)>(); - - /// @brief Gets the operating channel. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[out] channel The operating channel - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// int channel; - /// - /// ret = wifi_direct_get_operating_channel(&channel); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get operating channel\n"); - /// return -1; - /// } - /// - /// printf("operating channel = %d\n", channel); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_operating_channel( - ffi.Pointer channel, - ) { - return _wifi_direct_get_operating_channel( - channel, - ); - } - - late final _wifi_direct_get_operating_channelPtr = - _lookup)>>( - 'wifi_direct_get_operating_channel'); - late final _wifi_direct_get_operating_channel = - _wifi_direct_get_operating_channelPtr - .asFunction)>(); - - /// @brief Sets the Autoconnection mode. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] mode Describes the mode of connection. In case of TRUE \n - /// auto-connection will be taken care by framework - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_foreach_supported_wps_types() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// int auto_connect; - /// - /// printf("enable auto connect mode (yes[1] or no[2])\n"); - /// scanf("%1d", &auto_connect); - /// - /// if (auto_connect) - /// ret = wifi_direct_set_autoconnection_mode(true); - /// else - /// ret = wifi_direct_set_sutoconnection_mode(false); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to set autoconnection mode\n"); - /// return -1; - /// } - /// - /// printf("Auto connect mode enabled\n"); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_set_autoconnection_mode( - bool mode, - ) { - return _wifi_direct_set_autoconnection_mode( - mode, - ); - } - - late final _wifi_direct_set_autoconnection_modePtr = - _lookup>( - 'wifi_direct_set_autoconnection_mode'); - late final _wifi_direct_set_autoconnection_mode = - _wifi_direct_set_autoconnection_modePtr.asFunction(); - - /// @brief Gets the Autoconnection mode status. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[out] mode Describes the auto connection mode of framework has set. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_foreach_supported_wps_types() - /// @see wifi_direct_initialize() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// bool status; - /// - /// ret = wifi_direct_is_autoconnection_mode(&status); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get autoconnection mode\n"); - /// return -1; - /// } - /// - /// printf("auto connect mode = %s\n", (status)?"Yes":"No"); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_is_autoconnection_mode( - ffi.Pointer mode, - ) { - return _wifi_direct_is_autoconnection_mode( - mode, - ); - } - - late final _wifi_direct_is_autoconnection_modePtr = - _lookup)>>( - 'wifi_direct_is_autoconnection_mode'); - late final _wifi_direct_is_autoconnection_mode = - _wifi_direct_is_autoconnection_modePtr - .asFunction)>(); - - /// @brief Allows a device to connect automatically. - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] mac_address Device MAC address to allow autoconnection - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// bool peer_selected = false; - /// int connection_timeout = 0; - /// int count = 0; // counter to wait for connection - /// - /// int function(char *mac); - /// - /// void peers_cb(wifi_direct_discovered_peer_info_s* peer, - /// void *user_data) - /// { - /// char *mac; - /// - /// if (peer && !peer_selected) { - /// printf("peer device=%s MAC=%s\n", peer->device_name, peer->mac_address); - /// - /// peer_selected = true; - /// - /// function(peer->mac_address); - /// - /// wifi_direct_connect(peer->mac_address); // Connect to the selected peer - /// } - /// } - /// - /// int function(char *mac) - /// { - /// int ret; - /// - /// ret = wifi_direct_set_autoconnection_peer(mac); // set autoconnection - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to set autoconnection for peer\n"); - /// return -1; - /// } - /// - /// printf("set auto-connection success\n"); - /// return 0; - /// } - /// - /// void callback_2(int error_code, - /// wifi_direct_connection_state_e state, - /// const char *mac, void *user_data) - /// { - /// switch (state) { - /// case WIFI_DIRECT_CONNECTION_IN_PROGRESS: - /// printf("Connection in progress\n"); - /// break; - /// - /// case WIFI_DIRECT_CONNECTON_RSP: - /// printf("Connected\n"); - /// g_source_remove(connection_timeout); - /// break; - /// - /// case WIFI_DIRECT_DISCONNECTION_IND: - /// printf("Disconnection IND\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCONNECTION_RSP; - /// printf("Disconnected\n"); - /// break; - /// } - /// } - /// - /// void callback_1(int error_code, - /// wifi_direct_discovery_state_e discovery_state, - /// void *user_data) - /// { - /// switch(discovery_state) { - /// case WIFI_DIRECT_DISCOVERY_STARTED: - /// printf("Discovery started\n"); - /// break; - /// - /// case WIFI_DIRECT_ONLY_LISTEN_STARTED: - /// printf("listen started\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FINISHED: - /// printf("Discovery finished\n"); - /// - /// wifi_direct_foreach_discovered_peers(peers_cb, - /// NULL); // Get discovered peer - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FOUND: - /// printf("peer devices found\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_LOST: - /// printf("Discovery lost\n"); - /// break; - /// - /// default: - /// break; - /// } - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_set_discovery_state_changed_cb(callback_1, NULL); // Register callback 1 - /// wifi_direct_set_connection_state_changed_cb(callback_2, NULL); // Register callback 2 - /// - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// wifi_direct_start_discovery(TRUE, 15); // Start discovery - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_unset_connection_state_changed_cb(); // Deregister callback 2 - /// wifi_direct_unset_discovery_state_changed_cb(); // Deregister callback 1 - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_set_autoconnection_peer( - ffi.Pointer mac_address, - ) { - return _wifi_direct_set_autoconnection_peer( - mac_address, - ); - } - - late final _wifi_direct_set_autoconnection_peerPtr = - _lookup)>>( - 'wifi_direct_set_autoconnection_peer'); - late final _wifi_direct_set_autoconnection_peer = - _wifi_direct_set_autoconnection_peerPtr - .asFunction)>(); - - /// @brief Enables the persistent group. - /// @details If @a enabled is true, then P2P persistent group will be used - /// while creating a group and establishing a connection. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] enabled The status of persistent group: (@c true = enabled, @c false = disabled) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_is_persistent_group_enabled() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_set_persistence_group_enabled(true); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to set persistence group enabled\n"); - /// return -1; - /// } - /// - /// printf("persistence group enabled success\n"); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_set_persistent_group_enabled( - bool enabled, - ) { - return _wifi_direct_set_persistent_group_enabled( - enabled, - ); - } - - late final _wifi_direct_set_persistent_group_enabledPtr = - _lookup>( - 'wifi_direct_set_persistent_group_enabled'); - late final _wifi_direct_set_persistent_group_enabled = - _wifi_direct_set_persistent_group_enabledPtr - .asFunction(); - - /// @brief Checks whether the persistent group is enabled or disabled. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[out] enabled The status of the persistent group: (@c true = enabled, @c false = disabled) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_set_persistent_group_enabled() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// bool status; - /// - /// ret = wifi_direct_is_persistent_group_enabled(&status); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get status of persistence group enabled\n"); - /// return -1; - /// } - /// - /// printf("persistence group status = %s\n", status?"Yes":"No"); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_is_persistent_group_enabled( - ffi.Pointer enabled, - ) { - return _wifi_direct_is_persistent_group_enabled( - enabled, - ); - } - - late final _wifi_direct_is_persistent_group_enabledPtr = - _lookup)>>( - 'wifi_direct_is_persistent_group_enabled'); - late final _wifi_direct_is_persistent_group_enabled = - _wifi_direct_is_persistent_group_enabledPtr - .asFunction)>(); - - /// @brief Gets the persistent groups. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @post wifi_direct_persistent_group_cb() will be called. - /// @see wifi_direct_initialize() - /// @see wifi_direct_persistent_group_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// bool callback(const char *mac_address, - /// const char *ssid, - /// void *user_data) - /// { - /// if (mac_address) - /// printf("mac = %s\n", mac_address); - /// - /// if (ssid) - /// printf("ssid = %s\n", ssid); - /// - /// return true; - /// } - /// - /// int function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_foreach_persistent_groups(callback, NULL); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to set callback to get persistent groups\n"); - /// return -1; - /// } - /// - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_foreach_persistent_groups( - wifi_direct_persistent_group_cb callback, - ffi.Pointer user_data, - ) { - return _wifi_direct_foreach_persistent_groups( - callback, - user_data, - ); - } - - late final _wifi_direct_foreach_persistent_groupsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(wifi_direct_persistent_group_cb, - ffi.Pointer)>>('wifi_direct_foreach_persistent_groups'); - late final _wifi_direct_foreach_persistent_groups = - _wifi_direct_foreach_persistent_groupsPtr.asFunction< - int Function( - wifi_direct_persistent_group_cb, ffi.Pointer)>(); - - /// @brief Removes a persistent group. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] mac_address The MAC address of the persistent group owner - /// @param[in] ssid The SSID (Service Set Identifier) of the persistent group owner - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - /// @see wifi_direct_foreach_persistent_groups() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// char *mac = NULL; - /// char *ssid = NULL; - /// - /// printf("Input MAC\n"); - /// scanf("%18ms", &mac); - /// - /// printf("Input SSID\n"); - /// scanf("%33ms", &ssid); - /// - /// ret = wifi_direct_remove_persistent_group(mac, ssid); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to remove persistent group\n"); - /// return -1; - /// } - /// - /// printf("persistent group with MAC (%s) is removed\n", mac); - /// free(mac); - /// free(ssid); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_remove_persistent_group( - ffi.Pointer mac_address, - ffi.Pointer ssid, - ) { - return _wifi_direct_remove_persistent_group( - mac_address, - ssid, - ); - } - - late final _wifi_direct_remove_persistent_groupPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('wifi_direct_remove_persistent_group'); - late final _wifi_direct_remove_persistent_group = - _wifi_direct_remove_persistent_groupPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Starts wifi direct service discovery. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] mac_address The MAC address of servicing device. A broadcast \n - /// will be sent when MAC is SET to ZERO - /// @param[in] service_type Describes the type of service - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @post wifi_direct_set_service_state_changed_cb() will be invoked. - /// @see wifi_direct_activate() - /// @see wifi_direct_set_service_state_changed_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// void callback(int error_code, - /// wifi_direct_service_discovery_state_e discovery_state, - /// wifi_direct_service_type_e service_type, - /// void *response_data, const char * mac_address, - /// void *user_data) - /// { - /// switch (discovery_state) { - /// case WIFI_DIRECT_SERVICE_DISCOVERY_STARTED: - /// printf("Service discovery started\n"); - /// break; - /// - /// case WIFI_DIRECT_SERVICE_DISCOVERY_FINISHED: - /// printf("Service discovery finished\n"); - /// break; - /// - /// case WIFI_DIRECT_SERVICE_DISCOVERY_FOUND: - /// printf("Service discovery found\n"); - /// break; - /// } - /// } - /// - /// int function(void) - /// { - /// int ret; - /// int option; - /// wifi_direct_service_type_e type = WIFI_DIRECT_SERVICE_TYPE_ALL; - /// - /// printf("Input service type\n"); - /// scanf("%1d", &option); - /// - /// printf("1. WIFI_DIRECT_SERVICE_TYPE_ALL\n"); - /// printf("2. WIFI_DIRECT_SERVICE_TYPE_BONJOUR\n"); - /// printf("3. WIFI_DIRECT_SERVICE_TYPE_UPNP\n"); - /// printf("4. WIFI_DIRECT_SERVICE_TYPE_BT_ADDR\n"); - /// printf("5. WIFI_DIRECT_SERVICE_TYPE_CONTACT_INFO\n"); - /// - /// switch (option) { - /// case 1: - /// type = WIFI_DIRECT_SERVICE_TYPE_ALL; - /// break; - /// - /// case 2: - /// type = WIFI_DIRECT_SERVICE_TYPE_BONJOUR; - /// break; - /// - /// case 3: - /// type = WIFI_DIRECT_SERVICE_TYPE_UPNP; - /// break; - /// - /// case 4: - /// type = WIFI_DIRECT_SERVICE_TYPE_BT_ADDR; - /// break; - /// - /// case 5: - /// type = WIFI_DIRECT_SERVICE_TYPE_CONTACT_INFO; - /// break; - /// } - /// - /// ret = wifi_direct_start_service_discovery(NULL, type); // start broadcast service discovery - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to start service discovery\n"); - /// return -1; - /// } - /// - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_set_service_state_changed_cb(callback, NULL); - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_unset_service_state_changed_cb(); - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_start_service_discovery( - ffi.Pointer mac_address, - int service_type, - ) { - return _wifi_direct_start_service_discovery( - mac_address, - service_type, - ); - } - - late final _wifi_direct_start_service_discoveryPtr = _lookup< - ffi - .NativeFunction, ffi.Int32)>>( - 'wifi_direct_start_service_discovery'); - late final _wifi_direct_start_service_discovery = - _wifi_direct_start_service_discoveryPtr - .asFunction, int)>(); - - /// @brief Cancels an ongoing wifi direct service discovery. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] mac_address The MAC address of servicing device. A broadcast \n - /// will be sent when MAC is SET to ZERO - /// @param[in] service_type Describes the type of service - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// void callback(int error_code, - /// wifi_direct_service_discovery_state_e discovery_state, - /// wifi_direct_service_type_e service_type, - /// void *response_data, const char * mac_address, - /// void *user_data) - /// { - /// switch (discovery_state) { - /// case WIFI_DIRECT_SERVICE_DISCOVERY_STARTED: - /// printf("Service discovery started\n"); - /// break; - /// - /// case WIFI_DIRECT_SERVICE_DISCOVERY_FINISHED: - /// printf("Service discovery finished\n"); - /// break; - /// - /// case WIFI_DIRECT_SERVICE_DISCOVERY_FOUND: - /// printf("Service discovery found\n"); - /// break; - /// } - /// } - /// - /// int function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_cancel_service_discovery(NULL, - /// WIFI_DIRECT_SERVICE_TYPE_ALL); // cancel the ongoing service discovery - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to cancel service discovery\n"); - /// return -1; - /// } - /// - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_set_service_state_changed_cb(callback, NULL); - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// wifi_direct_start_service_discovery(NULL, - /// WIFI_DIRECT_SERVICE_TYPE); // start broadcast service discovery - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_unset_service_state_changed_cb(); - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_cancel_service_discovery( - ffi.Pointer mac_address, - int service_type, - ) { - return _wifi_direct_cancel_service_discovery( - mac_address, - service_type, - ); - } - - late final _wifi_direct_cancel_service_discoveryPtr = _lookup< - ffi - .NativeFunction, ffi.Int32)>>( - 'wifi_direct_cancel_service_discovery'); - late final _wifi_direct_cancel_service_discovery = - _wifi_direct_cancel_service_discoveryPtr - .asFunction, int)>(); - - /// @brief Registers for a service using Wi-Fi Direct Service Discovery. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] service_type Describes the type of service. - /// @param[in] info1 Describes the information of service. It is service-specific - /// @param[in] info2 Describes the information of service. It is service-specific - /// @param[out] service_id A Service ID will be assigned to service getting registered - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// void callback(int error_code, - /// wifi_direct_service_discovery_state_e discovery_state, - /// wifi_direct_service_type_e service_type, - /// void *response_data, const char * mac_address, - /// void *user_data) - /// { - /// switch (discovery_state) { - /// case WIFI_DIRECT_SERVICE_DISCOVERY_STARTED: - /// printf("Service discovery started\n"); - /// break; - /// - /// case WIFI_DIRECT_SERVICE_DISCOVERY_FINISHED: - /// printf("Service discovery finished\n"); - /// break; - /// - /// case WIFI_DIRECT_SERVICE_DISCOVERY_FOUND: - /// printf("Service discovery found\n"); - /// break; - /// } - /// } - /// - /// int function(void) - /// { - /// int ret; - /// int option; - /// char *info1; - /// char *info2; - /// wifi_direct_service_type_e type = WIFI_DIRECT_SERVICE_TYPE_ALL; - /// - /// printf("Input service type\n"); - /// scanf("%1d", &option); - /// - /// printf("1. WIFI_DIRECT_SERVICE_TYPE_ALL\n"); - /// printf("2. WIFI_DIRECT_SERVICE_TYPE_BONJOUR\n"); - /// printf("3. WIFI_DIRECT_SERVICE_TYPE_UPNP\n"); - /// printf("4. WIFI_DIRECT_SERVICE_TYPE_BT_ADDR\n"); - /// printf("5. WIFI_DIRECT_SERVICE_TYPE_CONTACT_INFO\n"); - /// - /// switch (option) { - /// case 1: - /// type = WIFI_DIRECT_SERVICE_TYPE_ALL; - /// break; - /// - /// case 2: - /// type = WIFI_DIRECT_SERVICE_TYPE_BONJOUR; - /// - /// printf("Enter the info 1\n"); - /// scanf("%50ms", &info1); - /// - /// printf("Enter the info 2\n"); - /// scanf("%50ms", &info2); - /// break; - /// - /// case 3: - /// type = WIFI_DIRECT_SERVICE_TYPE_UPNP; - /// - /// printf("Enter the info 1\n"); - /// scanf("%50ms", &info1); - /// - /// printf("Enter the info 2\n"); - /// scanf("%50ms", &info2); - /// break; - /// - /// case 4: - /// type = WIFI_DIRECT_SERVICE_TYPE_BT_ADDR; - /// break; - /// - /// case 5: - /// type = WIFI_DIRECT_SERVICE_TYPE_CONTACT_INFO; - /// - /// printf("Enter the info 1\n"); - /// scanf("%50ms", &info1); - /// break; - /// } - /// - /// ret = wifi_direct_register_service(type, info1, info2, &option); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to start service discovery\n"); - /// return -1; - /// } - /// - /// wifi_direct_start_service_discovery(NULL, type); - /// - /// free(info1); - /// free(info2); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_set_service_state_changed_cb(callback, NULL); - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_unset_service_state_changed_cb(); - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_register_service( - int service_type, - ffi.Pointer info1, - ffi.Pointer info2, - ffi.Pointer service_id, - ) { - return _wifi_direct_register_service( - service_type, - info1, - info2, - service_id, - ); - } - - late final _wifi_direct_register_servicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('wifi_direct_register_service'); - late final _wifi_direct_register_service = - _wifi_direct_register_servicePtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Deregisters for a service used for Wi-Fi Direct Service Discovery. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] service_id A Service ID for which service has to be deregistered - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// int input; - /// - /// printf("Enter the service id\n"); - /// scanf("%5d", &input); - /// - /// ret = wifi_direct_deregister_service(input); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to deregister service\n"); - /// return -1; - /// } - /// - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_deregister_service( - int service_id, - ) { - return _wifi_direct_deregister_service( - service_id, - ); - } - - late final _wifi_direct_deregister_servicePtr = - _lookup>( - 'wifi_direct_deregister_service'); - late final _wifi_direct_deregister_service = - _wifi_direct_deregister_servicePtr.asFunction(); - - /// @brief Initializes OR Deintializes the WiFi Direct Display (MIRACAST) service. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] enable Enables/Disables Service based on the value TRUE/FALSE - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_init_miracast(true); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to init miracast\n"); - /// return -1; - /// } - /// - /// printf("init miracast success\n"); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_init_miracast( - bool enable, - ) { - return _wifi_direct_init_miracast( - enable, - ); - } - - late final _wifi_direct_init_miracastPtr = - _lookup>( - 'wifi_direct_init_miracast'); - late final _wifi_direct_init_miracast = - _wifi_direct_init_miracastPtr.asFunction(); - - /// @brief Gets the information of a discovered peer. - /// @since_tizen 2.3 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] mac_address The MAC address of peer to get - /// @param[out] peer_info The peer information to be passed - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// @see wifi_direct_foreach_discovered_peers() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// char mac[19] = {0, }; - /// wifi_direct_discovered_peer_info_s *peer_info; - /// - /// printf("Input peer MAC address\n"); - /// read(stdin, mac, 18); - /// - /// ret = wifi_direct_get_peer_info(mac, &peer_info); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get peer info\n"); - /// return -1; - /// } - /// - /// printf("get peer info success\n"); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_peer_info( - ffi.Pointer mac_address, - ffi.Pointer> peer_info, - ) { - return _wifi_direct_get_peer_info( - mac_address, - peer_info, - ); - } - - late final _wifi_direct_get_peer_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer< - ffi.Pointer>)>>( - 'wifi_direct_get_peer_info'); - late final _wifi_direct_get_peer_info = - _wifi_direct_get_peer_infoPtr.asFunction< - int Function(ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Enables Wi-Fi Display (WFD) functionality and initialize the various variables required for WFD. - /// @details Starts listening in only assigned channel. Device will be discoverable - /// only in assigned listen channel. - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate() - /// @see wifi_direct_activate() - /// @see wifi_direct_deinit_display() - /// @see wifi_direct_set_display() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_init_display(); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to init display\n"); - /// return -1; - /// } - /// - /// printf("init display success\n"); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_init_display() { - return _wifi_direct_init_display(); - } - - late final _wifi_direct_init_displayPtr = - _lookup>( - 'wifi_direct_init_display'); - late final _wifi_direct_init_display = - _wifi_direct_init_displayPtr.asFunction(); - - /// @brief Disables Wi-Fi Display functionality & disables the support of WFD Information Element (IE). - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate() - /// and Wi-Fi Display must be enabled by wifi_direct_init_display(). - /// @see wifi_direct_activate() - /// @see wifi_direct_init_display() - /// @see wifi_direct_set_display() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// - /// wifi_direct_init_display(); - /// - /// ret = wifi_direct_deinit_display(); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to deinit display\n"); - /// return -1; - /// } - /// - /// printf("deinit display success\n"); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_deinit_display() { - return _wifi_direct_deinit_display(); - } - - late final _wifi_direct_deinit_displayPtr = - _lookup>( - 'wifi_direct_deinit_display'); - late final _wifi_direct_deinit_display = - _wifi_direct_deinit_displayPtr.asFunction(); - - /// @brief Sets the Wi-Fi Display parameters for the WFD IE of local device. - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] type WFD Device Type: define the Role of WFD device like source or sink - /// @param[in] port Specifies Session Management Control Port number. It should be 2 bytes (0~65535) - /// @param[in] hdcp CP support bit: (@c 1 = enable the hdcp support, @c 0 = disable the hdcp support) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate() - /// and Wi-Fi Display must be enabled by wifi_direct_init_display(). - /// @see wifi_direct_activate() - /// @see wifi_direct_init_display() - /// @see wifi_direct_deinit_display() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_set_display(WIFI_DIRECT_DISPLAY_SOURCE, 7236, 1); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to set display property\n"); - /// return -1; - /// } - /// - /// printf("set display param success\n"); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_set_display( - int type, - int port, - int hdcp, - ) { - return _wifi_direct_set_display( - type, - port, - hdcp, - ); - } - - late final _wifi_direct_set_displayPtr = _lookup< - ffi.NativeFunction>( - 'wifi_direct_set_display'); - late final _wifi_direct_set_display = - _wifi_direct_set_displayPtr.asFunction(); - - /// @brief Sets the Wi-Fi Display Session Availability. - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] availability Wi-Fi Display Session Availability - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate() - /// and enable Wi-Fi Display by wifi_direct_init_display(). - /// @see wifi_direct_activate() - /// @see wifi_direct_init_display() - /// @see wifi_direct_deinit_display() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// int availability; - /// - /// printf("Input the Wi-FI Display availability\n"); - /// scanf("%1d", &availability); - /// - /// ret = wifi_direct_set_display_availability(availability); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to set display availability\n"); - /// return -1; - /// } - /// - /// printf("set display availability success\n"); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_set_display_availability( - bool availability, - ) { - return _wifi_direct_set_display_availability( - availability, - ); - } - - late final _wifi_direct_set_display_availabilityPtr = - _lookup>( - 'wifi_direct_set_display_availability'); - late final _wifi_direct_set_display_availability = - _wifi_direct_set_display_availabilityPtr.asFunction(); - - /// @brief Gets the Wi-Fi Display parameters for the WFD IE of local device. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[out] type WFD device type: role of WFD device like source or sink - /// @param[out] port Session management control port number, it will be of 2 bytes (0~65535) - /// @param[out] hdcp CP support bit: (@c 1 = hdcp support is enabled, @c 0 = hdcp support is disabled) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate() - /// and enable Wi-Fi Display by wifi_direct_init_display(). - /// @see wifi_direct_activate() - /// @see wifi_direct_init_display() - /// @see wifi_direct_deinit_display() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// wifi_direct_display_type_e type; - /// int port; - /// int hdcp; - /// - /// ret = wifi_direct_get_display(&type, &port, &hdcp); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get display property\n"); - /// return -1; - /// } - /// - /// printf("get display param success [type:%d], [port:%d], [hdcp:%d]\n", type, port, hdcp); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_display( - ffi.Pointer type, - ffi.Pointer port, - ffi.Pointer hdcp, - ) { - return _wifi_direct_get_display( - type, - port, - hdcp, - ); - } - - late final _wifi_direct_get_displayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('wifi_direct_get_display'); - late final _wifi_direct_get_display = _wifi_direct_get_displayPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the Wi-Fi Display Session Availability. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[out] availability Wi-Fi display session availability - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate() - /// and enable Wi-Fi Display by wifi_direct_init_display(). - /// @see wifi_direct_activate() - /// @see wifi_direct_init_display() - /// @see wifi_direct_deinit_display() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// int availability; - /// - /// ret = wifi_direct_get_display_availability(&availability); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get display availability\n"); - /// return -1; - /// } - /// - /// printf("get display availability success [%d]\n", availability); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_display_availability( - ffi.Pointer availability, - ) { - return _wifi_direct_get_display_availability( - availability, - ); - } - - late final _wifi_direct_get_display_availabilityPtr = - _lookup)>>( - 'wifi_direct_get_display_availability'); - late final _wifi_direct_get_display_availability = - _wifi_direct_get_display_availabilityPtr - .asFunction)>(); - - /// @brief Gets the information of a peer's Wi-Fi Display device type. - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] mac_address MAC Address of the PEER - /// @param[out] type The information of a peer's Wi-Fi Display device type - /// if there's Wi-Fi Direct information, this will be NULL - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// @see wifi_direct_foreach_discovered_peers() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// char *mac = NULL; - /// wifi_direct_display_type_e type; - /// - /// printf("Input the peer mac\n"); - /// scanf("%18ms", &mac); - /// - /// ret = wifi_direct_get_peer_display_type(mac, &type); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get peer display type\n"); - /// return -1; - /// } - /// - /// printf("peer display type = %d\n", type); - /// free(mac); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_peer_display_type( - ffi.Pointer mac_address, - ffi.Pointer type, - ) { - return _wifi_direct_get_peer_display_type( - mac_address, - type, - ); - } - - late final _wifi_direct_get_peer_display_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('wifi_direct_get_peer_display_type'); - late final _wifi_direct_get_peer_display_type = - _wifi_direct_get_peer_display_typePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the information of a peer's Wi-Fi Display session availability. - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] mac_address MAC Address of the PEER - /// @param[out] availability The information of a peer's Wi-Fi Display session availability - /// if there's Wi-Fi Direct information, this will be NULL - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// @see wifi_direct_foreach_discovered_peers() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// bool availability; - /// char *mac = NULL; - /// - /// printf("Input the peer mac\n"); - /// scanf("%18ms", &mac); - /// - /// ret = wifi_direct_get_peer_display_availability(mac, &availability); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get peer display availability\n"); - /// return -1; - /// } - /// - /// printf("peer display avialability = %s\n", availability?"yes":"no"); - /// free(mac); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_peer_display_availability( - ffi.Pointer mac_address, - ffi.Pointer availability, - ) { - return _wifi_direct_get_peer_display_availability( - mac_address, - availability, - ); - } - - late final _wifi_direct_get_peer_display_availabilityPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>>( - 'wifi_direct_get_peer_display_availability'); - late final _wifi_direct_get_peer_display_availability = - _wifi_direct_get_peer_display_availabilityPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the information of a peer's Wi-Fi Display HDCP support. - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] mac_address MAC Address of the PEER - /// @param[out] hdcp The information of a peer's Wi-Fi Display HDCP support - /// if there's Wi-Fi Direct information, this will be NULL - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// @see wifi_direct_foreach_discovered_peers() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// int hdcp; - /// char *mac = NULL; - /// - /// printf("Input the peer mac\n"); - /// scanf("%18ms", &mac); - /// - /// ret = wifi_direct_get_peer_display_hdcp(mac, &hdcp); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get peer display hdcp\n"); - /// return -1; - /// } - /// - /// printf("peer display hdcp = %d\n", hdcp); - /// free(mac); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_peer_display_hdcp( - ffi.Pointer mac_address, - ffi.Pointer hdcp, - ) { - return _wifi_direct_get_peer_display_hdcp( - mac_address, - hdcp, - ); - } - - late final _wifi_direct_get_peer_display_hdcpPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('wifi_direct_get_peer_display_hdcp'); - late final _wifi_direct_get_peer_display_hdcp = - _wifi_direct_get_peer_display_hdcpPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the information of a peer's Wi-Fi Display RTSP control port. - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] mac_address MAC Address of the PEER - /// @param[out] port The information of a peer's Wi-Fi Display RTSP control port - /// if there's Wi-Fi Direct information, this will be NULL - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// @see wifi_direct_foreach_discovered_peers() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// int port; - /// char *mac = NULL; - /// - /// printf("Input the peer mac\n"); - /// scanf("%18ms", &mac); - /// - /// ret = wifi_direct_get_peer_display_port(mac, &port); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get peer display port\n"); - /// return -1; - /// } - /// - /// printf("peer display port = %d\n", port); - /// free(mac); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_peer_display_port( - ffi.Pointer mac_address, - ffi.Pointer port, - ) { - return _wifi_direct_get_peer_display_port( - mac_address, - port, - ); - } - - late final _wifi_direct_get_peer_display_portPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('wifi_direct_get_peer_display_port'); - late final _wifi_direct_get_peer_display_port = - _wifi_direct_get_peer_display_portPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the information of a peer's Wi-Fi Display max throughput. - /// @since_tizen 2.4 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] mac_address MAC Address of the PEER - /// @param[out] throughput The information of a peer's Wi-Fi Display max throughput (Mbps) - /// if there's Wi-Fi Direct information, this will be NULL - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// @see wifi_direct_foreach_discovered_peers() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// int tput; - /// char *mac = NULL; - /// - /// printf("Input the peer mac\n"); - /// scanf("%18ms", &mac); - /// - /// ret = wifi_direct_get_peer_display_throughput(mac, &tput); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get peer display throughput\n"); - /// return -1; - /// } - /// - /// printf("peer display throughtput = %d\n", tput); - /// free(mac); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_peer_display_throughput( - ffi.Pointer mac_address, - ffi.Pointer throughput, - ) { - return _wifi_direct_get_peer_display_throughput( - mac_address, - throughput, - ); - } - - late final _wifi_direct_get_peer_display_throughputPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>>( - 'wifi_direct_get_peer_display_throughput'); - late final _wifi_direct_get_peer_display_throughput = - _wifi_direct_get_peer_display_throughputPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Enables / Disables automatic group removal feature when all peers are disconnected. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] enable Enables/Disables Group Removal feature based on the value TRUE/FALSE - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @post wifi_direct_connection_state_changed_cb() will be invoked with - /// #WIFI_DIRECT_GROUP_DESTROYED when there's no connected Group Client - /// if device is Group Owner and this feature is enabled. - /// @see wifi_direct_activate() - /// @see wifi_direct_create_group() - /// @see wifi_direct_connection_state_changed_cb() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// - /// ret = wifi_direct_set_auto_group_removal(true); // Enable auto group removal - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to set auto group removal\n"); - /// return -1; - /// } - /// - /// printf("set auto group removal success\n"); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_set_auto_group_removal( - bool enable, - ) { - return _wifi_direct_set_auto_group_removal( - enable, - ); - } - - late final _wifi_direct_set_auto_group_removalPtr = - _lookup>( - 'wifi_direct_set_auto_group_removal'); - late final _wifi_direct_set_auto_group_removal = - _wifi_direct_set_auto_group_removalPtr.asFunction(); - - /// @brief Sets the timer which is used to expire the connection session. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] seconds Set the connection session timer value in seconds - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// int session_timeout; - /// - /// printf("Input the time for session timer\n"); - /// scanf("%2d", &session_timeout); - /// - /// ret = wifi_direct_set_session_timer(session_timeout); // set session timer - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to set session timer\n"); - /// return -1; - /// } - /// - /// printf("set session timer success\n"); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_set_session_timer( - int seconds, - ) { - return _wifi_direct_set_session_timer( - seconds, - ); - } - - late final _wifi_direct_set_session_timerPtr = - _lookup>( - 'wifi_direct_set_session_timer'); - late final _wifi_direct_set_session_timer = - _wifi_direct_set_session_timerPtr.asFunction(); - - /// @brief Gets the timer which is used to expire the connection session. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[out] seconds Connection session timer value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// int session_timeout; - /// - /// ret = wifi_direct_get_session_timer(&session_timeout); // get session timer - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get session timer\n"); - /// return -1; - /// } - /// - /// printf("session timer = %d\n", session_timeout); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_session_timer( - ffi.Pointer seconds, - ) { - return _wifi_direct_get_session_timer( - seconds, - ); - } - - late final _wifi_direct_get_session_timerPtr = - _lookup)>>( - 'wifi_direct_get_session_timer'); - late final _wifi_direct_get_session_timer = _wifi_direct_get_session_timerPtr - .asFunction)>(); - - /// @brief Gets the information of a peer's RSSI value. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] mac_address MAC Address of the peer device - /// @param[out] rssi RSSI value of the peer device - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_activate() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// int rssi; - /// char *mac = NULL; - /// - /// printf("Input the peer mac\n"); - /// scanf("%18ms", &mac); - /// - /// ret = wifi_direct_get_peer_rssi(mac, &rssi); // get peer rssi - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get peer rssi\n"); - /// return -1; - /// } - /// - /// printf("peer rssi = %d\n", rssi); - /// free(mac); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_peer_rssi( - ffi.Pointer mac_address, - ffi.Pointer rssi, - ) { - return _wifi_direct_get_peer_rssi( - mac_address, - rssi, - ); - } - - late final _wifi_direct_get_peer_rssiPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('wifi_direct_get_peer_rssi'); - late final _wifi_direct_get_peer_rssi = _wifi_direct_get_peer_rssiPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Adds the Wi-Fi Vendor Specific Information Element (VSIE) to specific frame type. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @remarks @a vsie_str for @a frame_id will be in effect until Wi-Fi Direct is deactivated. - /// @param[in] frame_id frame ID for setting VSIE - /// @param[in] vsie_str VSIE data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// @see wifi_direct_remove_vsie() - /// @see wifi_direct_get_vsie() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// char *vsie = NULL; - /// unsigned int frame_id; - /// - /// printf("Input the frame id\n"); - /// scanf("%2u", &frame_id); - /// - /// printf("Input the vsie\n"); - /// scanf("%100ms", &vsie); - /// - /// ret = wifi_direct_add_vsie(frame_id, vsie); // add vsie - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to add vsie\n"); - /// return -1; - /// } - /// - /// printf("vsie added success"); - /// free(vsie); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_add_vsie( - int frame_id, - ffi.Pointer vsie_str, - ) { - return _wifi_direct_add_vsie( - frame_id, - vsie_str, - ); - } - - late final _wifi_direct_add_vsiePtr = _lookup< - ffi - .NativeFunction)>>( - 'wifi_direct_add_vsie'); - late final _wifi_direct_add_vsie = _wifi_direct_add_vsiePtr - .asFunction)>(); - - /// @brief Gets the Wi-Fi Vendor Specific Information Elements (VSIE) from specific frame. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @remarks @a vsie_str must be released with free(). - /// @param[in] frame_id frame ID for setting VSIE - /// @param[out] vsie_str VSIE data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate() - /// and set VSIE for specific frame by wifi_direct_add_vsie(). - /// @see wifi_direct_activate() - /// @see wifi_direct_add_vsie() - /// @see wifi_direct_remove_vsie() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// char *vsie = NULL; - /// unsigned int frame_id; - /// - /// printf("Input the frame id\n"); - /// scanf("%2u", &frame_id); - /// - /// ret = wifi_direct_get_vsie(frame_id, &vsie); // get vsie - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get vsie\n"); - /// return -1; - /// } - /// - /// printf("vsie = %s\n", vsie); - /// free(vsie); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_vsie( - int frame_id, - ffi.Pointer> vsie_str, - ) { - return _wifi_direct_get_vsie( - frame_id, - vsie_str, - ); - } - - late final _wifi_direct_get_vsiePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, - ffi.Pointer>)>>('wifi_direct_get_vsie'); - late final _wifi_direct_get_vsie = _wifi_direct_get_vsiePtr - .asFunction>)>(); - - /// @brief Removes the Wi-Fi Vendor Specific Information Element (VSIE) from specific frame. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @remarks @a vsie_str for @a frame_id will be in effect until Wi-Fi Direct is deactivated. - /// @param[in] frame_id frame ID for removing VSIE - /// @param[in] vsie_str VSIE data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate() - /// and set VSIE for specific frame by wifi_direct_add_vsie(). - /// @see wifi_direct_activate() - /// @see wifi_direct_add_vsie() - /// @see wifi_direct_get_vsie() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// int function(void) - /// { - /// int ret; - /// char *vsie = NULL; - /// unsigned int frame_id; - /// - /// printf("Input the frame id\n"); - /// scanf("%2u", &frame_id); - /// - /// printf("Input the vsie\n"); - /// scanf("%100ms", &vsie); - /// - /// ret = wifi_direct_remove_vsie(frame_id, vsie); // remove vsie - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to remove vsie\n"); - /// return -1; - /// } - /// - /// printf("vsie removed success\n"); - /// free(vsie); - /// return 0; - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// - /// function(); - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_remove_vsie( - int frame_id, - ffi.Pointer vsie_str, - ) { - return _wifi_direct_remove_vsie( - frame_id, - vsie_str, - ); - } - - late final _wifi_direct_remove_vsiePtr = _lookup< - ffi - .NativeFunction)>>( - 'wifi_direct_remove_vsie'); - late final _wifi_direct_remove_vsie = _wifi_direct_remove_vsiePtr - .asFunction)>(); - - /// @brief Gets the information of peer devices which is in the connecting state. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @remarks @a peer_info must be released with free(). - /// @param[out] peer_info connecting peer device data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be connecting state by wifi_direct_connect() - /// or by receiving connection request from p2p peer device. - /// @see wifi_direct_activate() - /// @see wifi_direct_connect() - /// - /// - /// Here is an example of the usage: - /// @code - /// #include - /// #include - /// - /// - /// bool device_selected = false; - /// - /// void peers_cb(wifi_direct_discovered_peer_info_s* peer, - /// void *user_data) - /// { - /// if (peer && !device_selected) { - /// printf("peer device=%s MAC=%s\n", peer->device_name, peer->mac_address); - /// - /// device_selected = true; - /// - /// wifi_direct_connect(peer->mac_address); // Connect to the first discovered peer - /// } - /// } - /// - /// int function(void) - /// { - /// int ret; - /// wifi_direct_discovered_peer_info_s *peer = NULL; - /// - /// ret = wifi_direct_get_connecting_peer_info(&peer); - /// - /// if (ret != WIFI_DIRECT_ERROR_NONE) { - /// printf("Failed to get connecting peer info\n"); - /// return -1; - /// } - /// - /// printf("peer device name (%s) mac (%s)\n", peer->device_name, - /// peer->mac_address); - /// return 0; - /// } - /// - /// void callback_2(int error_code, - /// wifi_direct_connection_state_e state, - /// const char *mac, void *user_data) - /// { - /// switch (state) { - /// case WIFI_DIRECT_CONNECTION_IN_PROGRESS: - /// printf("Connection in progress\n"); - /// - /// function(); // get the connecting peer info - /// - /// break; - /// - /// case WIFI_DIRECT_CONNECTON_RSP: - /// printf("Connected\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCONNECTION_IND: - /// printf("Disconnection IND\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCONNECTION_RSP; - /// printf("Disconnected\n"); - /// break; - /// } - /// } - /// - /// void callback_1(int error_code, - /// wifi_direct_discovery_state_e discovery_state, - /// void *user_data) - /// { - /// switch(discovery_state) { - /// case WIFI_DIRECT_DISCOVERY_STARTED: - /// printf("Discovery started\n"); - /// break; - /// - /// case WIFI_DIRECT_ONLY_LISTEN_STARTED: - /// printf("listen started\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FINISHED: - /// printf("Discovery finished\n"); - /// - /// wifi_direct_foreach_discovered_peers(peers_cb, - /// NULL); // Get discovered peer - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_FOUND: - /// printf("peer devices found\n"); - /// break; - /// - /// case WIFI_DIRECT_DISCOVERY_LOST: - /// printf("Discovery lost\n"); - /// break; - /// - /// default: - /// break; - /// } - /// } - /// - /// int main() - /// { - /// wifi_direct_initialize(); // Initialize Wi-Fi Direct - /// wifi_direct_set_discovery_state_changed_cb(callback_1, NULL); // Register callback 1 - /// wifi_direct_set_connection_state_changed_cb(callback_2, NULL); // Register callback 2 - /// - /// wifi_direct_activate(); // Activate Wi-Fi Direct - /// wifi_direct_start_discovery(TRUE, 15); // Start discovery - /// - /// // APP CODE HERE - /// - /// // App must clean up Wi-Fi Direct before exiting - /// - /// wifi_direct_deactivate(); // Deactivate Wi-Fi Direct - /// wifi_direct_unset_discovery_state_changed_cb(); // Deregister callback - /// wifi_direct_deinitialize(); // Deinitialize Wi-Fi Direct - /// return 0; - /// } - /// @endcode - int wifi_direct_get_connecting_peer_info( - ffi.Pointer> peer_info, - ) { - return _wifi_direct_get_connecting_peer_info( - peer_info, - ); - } - - late final _wifi_direct_get_connecting_peer_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer< - ffi.Pointer>)>>( - 'wifi_direct_get_connecting_peer_info'); - late final _wifi_direct_get_connecting_peer_info = - _wifi_direct_get_connecting_peer_infoPtr.asFunction< - int Function( - ffi.Pointer>)>(); - - /// @brief Gets the vendor specific information element (VSIE) of a peer. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @remarks @a vsie must be released with free(). - /// @param[in] mac_address MAC Address of the PEER - /// @param[out] vsie The vendor specific information element (VSIE) of peer - /// if Wi-Fi Direct information is available, else it will be NULL. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_activate() - /// @see wifi_direct_foreach_discovered_peers() - int wifi_direct_get_peer_vsie( - ffi.Pointer mac_address, - ffi.Pointer> vsie, - ) { - return _wifi_direct_get_peer_vsie( - mac_address, - vsie, - ); - } - - late final _wifi_direct_get_peer_vsiePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer>)>>( - 'wifi_direct_get_peer_vsie'); - late final _wifi_direct_get_peer_vsie = - _wifi_direct_get_peer_vsiePtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Sets the advertizing WPS (Wi-Fi Protected Setup) type. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] type The type of WPS. composition of #wifi_direct_config_method_type_e - /// for example #WIFI_DIRECT_CONFIG_METHOD_PBC|#WIFI_DIRECT_CONFIG_METHOD_PIN_DISPLAY - /// Use #WIFI_DIRECT_CONFIG_METHOD_DEFAULT to reset to default value - /// @return 0 on success, otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_activate(). - /// @see wifi_direct_initialize() - int wifi_direct_set_wps_config_method( - int type, - ) { - return _wifi_direct_set_wps_config_method( - type, - ); - } - - late final _wifi_direct_set_wps_config_methodPtr = - _lookup>( - 'wifi_direct_set_wps_config_method'); - late final _wifi_direct_set_wps_config_method = - _wifi_direct_set_wps_config_methodPtr.asFunction(); - - /// @brief Gets the advertizing WPS (Wi-Fi Protected Setup) type. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[out] type The type of WPS. composition of #wifi_direct_config_method_type_e - /// @return 0 on success, otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @pre Wi-Fi Direct service must be activated by wifi_direct_activate(). - /// @see wifi_direct_initialize() - int wifi_direct_get_wps_config_method( - ffi.Pointer type, - ) { - return _wifi_direct_get_wps_config_method( - type, - ); - } - - late final _wifi_direct_get_wps_config_methodPtr = - _lookup)>>( - 'wifi_direct_get_wps_config_method'); - late final _wifi_direct_get_wps_config_method = - _wifi_direct_get_wps_config_methodPtr - .asFunction)>(); - - /// @brief Removes a persistent device. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @param[in] mac_address The MAC address of the persistent group owner - /// @return 0 on success, otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - int wifi_direct_remove_persistent_device( - ffi.Pointer mac_address, - ) { - return _wifi_direct_remove_persistent_device( - mac_address, - ); - } - - late final _wifi_direct_remove_persistent_devicePtr = - _lookup)>>( - 'wifi_direct_remove_persistent_device'); - late final _wifi_direct_remove_persistent_device = - _wifi_direct_remove_persistent_devicePtr - .asFunction)>(); - - /// @brief Removes all persistent devices. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege http://tizen.org/privilege/wifidirect - /// @return 0 on success, otherwise a negative error value - /// @retval #WIFI_DIRECT_ERROR_NONE Successful - /// @retval #WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed - /// @retval #WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed - /// @retval #WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported - /// @retval #WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized - /// @retval #WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy - /// @pre Wi-Fi Direct service must be initialized by wifi_direct_initialize(). - /// @see wifi_direct_initialize() - int wifi_direct_remove_all_persistent_devices() { - return _wifi_direct_remove_all_persistent_devices(); - } - - late final _wifi_direct_remove_all_persistent_devicesPtr = - _lookup>( - 'wifi_direct_remove_all_persistent_devices'); - late final _wifi_direct_remove_all_persistent_devices = - _wifi_direct_remove_all_persistent_devicesPtr - .asFunction(); - - /// @platform - /// @brief Gets the handle of a current engine information. - /// @since_tizen 3.0 - /// @remarks @a engine should be released using csr_engine_destroy(). - /// @param[in] id Engine identifier to get handle - /// @param[out] engine A pointer of the engine information handle - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_PARAMETER @a engine is invalid - /// @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists - /// @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_engine_destroy() - int csr_get_current_engine( - int id, - ffi.Pointer engine, - ) { - return _csr_get_current_engine( - id, - engine, - ); - } - - late final _csr_get_current_enginePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, ffi.Pointer)>>('csr_get_current_engine'); - late final _csr_get_current_engine = _csr_get_current_enginePtr - .asFunction)>(); - - /// @platform - /// @brief Extracts a vendor name from the engine information handle. - /// @since_tizen 3.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/antivirus.admin - /// @remarks @a vendor must be released using free(). - /// @param[in] engine The engine information handle - /// @param[out] vendor A pointer of the engine's vendor name - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a vendor is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_get_current_engine() - int csr_engine_get_vendor( - csr_engine_h engine, - ffi.Pointer> vendor, - ) { - return _csr_engine_get_vendor( - engine, - vendor, - ); - } - - late final _csr_engine_get_vendorPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_engine_h, - ffi.Pointer>)>>('csr_engine_get_vendor'); - late final _csr_engine_get_vendor = _csr_engine_get_vendorPtr.asFunction< - int Function(csr_engine_h, ffi.Pointer>)>(); - - /// @platform - /// @brief Extracts an engine name from the engine information handle. - /// @since_tizen 3.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/antivirus.admin - /// @remarks @a name must be released using free(). - /// @param[in] engine The engine information handle - /// @param[out] name A pointer of the engine's name - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a name is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_get_current_engine() - int csr_engine_get_name( - csr_engine_h engine, - ffi.Pointer> name, - ) { - return _csr_engine_get_name( - engine, - name, - ); - } - - late final _csr_engine_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_engine_h, - ffi.Pointer>)>>('csr_engine_get_name'); - late final _csr_engine_get_name = _csr_engine_get_namePtr.asFunction< - int Function(csr_engine_h, ffi.Pointer>)>(); - - /// @platform - /// @brief Extracts an engine version from the engine information handle. - /// @since_tizen 3.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/antivirus.admin - /// @remarks @a version must be released using free(). - /// @param[in] engine An engine information handle - /// @param[out] version A pointer of the engine's version - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a version is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_get_current_engine() - int csr_engine_get_version( - csr_engine_h engine, - ffi.Pointer> version, - ) { - return _csr_engine_get_version( - engine, - version, - ); - } - - late final _csr_engine_get_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_engine_h, - ffi.Pointer>)>>('csr_engine_get_version'); - late final _csr_engine_get_version = _csr_engine_get_versionPtr.asFunction< - int Function(csr_engine_h, ffi.Pointer>)>(); - - /// @platform - /// @brief Extracts an engine's data version from the engine information handle. - /// @since_tizen 3.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/antivirus.admin - /// @remarks @a version must be released using free(). - /// @param[in] engine The engine information handle - /// @param[out] version A pointer of the data version. It can be null - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a version is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_get_current_engine() - int csr_engine_get_data_version( - csr_engine_h engine, - ffi.Pointer> version, - ) { - return _csr_engine_get_data_version( - engine, - version, - ); - } - - late final _csr_engine_get_data_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - csr_engine_h, ffi.Pointer>)>>( - 'csr_engine_get_data_version'); - late final _csr_engine_get_data_version = - _csr_engine_get_data_versionPtr.asFunction< - int Function(csr_engine_h, ffi.Pointer>)>(); - - /// @platform - /// @brief Extracts the latest update time of an engine from the engine information handle. - /// @since_tizen 3.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/antivirus.admin - /// @param[in] engine The engine information handle - /// @param[out] time A pointer of lasted update time - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a time is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_get_current_engine() - int csr_engine_get_latest_update_time( - csr_engine_h engine, - ffi.Pointer time, - ) { - return _csr_engine_get_latest_update_time( - engine, - time, - ); - } - - late final _csr_engine_get_latest_update_timePtr = _lookup< - ffi - .NativeFunction)>>( - 'csr_engine_get_latest_update_time'); - late final _csr_engine_get_latest_update_time = - _csr_engine_get_latest_update_timePtr - .asFunction)>(); - - /// @platform - /// @brief Extracts the state of engine activation from the engine information handle. - /// @since_tizen 3.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/antivirus.admin - /// @param[in] engine The engine information handle - /// @param[out] activated A pointer of the engine activation state - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a activated is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_get_current_engine() - int csr_engine_get_activated( - csr_engine_h engine, - ffi.Pointer activated, - ) { - return _csr_engine_get_activated( - engine, - activated, - ); - } - - late final _csr_engine_get_activatedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_engine_h, - ffi.Pointer)>>('csr_engine_get_activated'); - late final _csr_engine_get_activated = _csr_engine_get_activatedPtr - .asFunction)>(); - - /// @platform - /// @brief Enable or disable an engine. - /// @since_tizen 3.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/antivirus.admin - /// @remarks If an engine is disabled, all major operations would be failed with #CSR_ERROR_ENGINE_DISABLED error code. - /// @param[in] engine The engine information handle - /// @param[in] state The engine state - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a state is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_get_current_engine() - int csr_engine_set_state( - csr_engine_h engine, - int state, - ) { - return _csr_engine_set_state( - engine, - state, - ); - } - - late final _csr_engine_set_statePtr = - _lookup>( - 'csr_engine_set_state'); - late final _csr_engine_set_state = - _csr_engine_set_statePtr.asFunction(); - - /// @platform - /// @brief Gets the engine state. - /// @since_tizen 3.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/antivirus.admin - /// @param[in] engine The engine information handle - /// @param[out] state A pointer of the engine state - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a state is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_get_current_engine() - int csr_engine_get_state( - csr_engine_h engine, - ffi.Pointer state, - ) { - return _csr_engine_get_state( - engine, - state, - ); - } - - late final _csr_engine_get_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - csr_engine_h, ffi.Pointer)>>('csr_engine_get_state'); - late final _csr_engine_get_state = _csr_engine_get_statePtr - .asFunction)>(); - - /// @platform - /// @brief Releases all system resources associated with a engine information handle. - /// @since_tizen 3.0 - /// @param[in] engine The engine information handle - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle - int csr_engine_destroy( - csr_engine_h engine, - ) { - return _csr_engine_destroy( - engine, - ); - } - - late final _csr_engine_destroyPtr = - _lookup>( - 'csr_engine_destroy'); - late final _csr_engine_destroy = - _csr_engine_destroyPtr.asFunction(); - - /// @partner - /// @brief Initializes and returns a Content Screening API handle. - /// @details A Content Screening API handle (or CSR CS handle) is obtained by this method. - /// The handle is required for subsequent CSR CS API calls. - /// @since_tizen 3.0 - /// @remarks @a handle should be released using csr_cs_context_destroy(). - /// @remarks Multiple handles can be obtained. - /// @param[out] handle A pointer of CSR CS context handle - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE @a handle may be null - /// @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_context_destroy() - int csr_cs_context_create( - ffi.Pointer handle, - ) { - return _csr_cs_context_create( - handle, - ); - } - - late final _csr_cs_context_createPtr = _lookup< - ffi.NativeFunction)>>( - 'csr_cs_context_create'); - late final _csr_cs_context_create = _csr_cs_context_createPtr - .asFunction)>(); - - /// @partner - /// @brief Releases all system resources associated with a Content Screening API handle. - /// @since_tizen 3.0 - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_SOCKET Socket error between client and server - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_context_create() - int csr_cs_context_destroy( - csr_cs_context_h handle, - ) { - return _csr_cs_context_destroy( - handle, - ); - } - - late final _csr_cs_context_destroyPtr = - _lookup>( - 'csr_cs_context_destroy'); - late final _csr_cs_context_destroy = - _csr_cs_context_destroyPtr.asFunction(); - - /// @partner - /// @brief Sets a popup option for malware detected. - /// @details If #CSR_CS_ASK_USER_YES is set, a popup will be prompted to a user when a malware is detected. - /// If #CSR_CS_ASK_USER_NO is set which is default value, no popup will be prompted even if a malware is detected. - /// User can allow, disallow, and remove detected malware by popup. - /// Selection can be different between malware's severity. - /// @since_tizen 3.0 - /// @remarks This option is disabled(#CSR_CS_ASK_USER_NO) as a default. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] ask_user Popup option to set or unset - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a ask_user is invalid - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_context_create() - /// @see csr_cs_context_destroy() - int csr_cs_set_ask_user( - csr_cs_context_h handle, - int ask_user, - ) { - return _csr_cs_set_ask_user( - handle, - ask_user, - ); - } - - late final _csr_cs_set_ask_userPtr = _lookup< - ffi.NativeFunction>( - 'csr_cs_set_ask_user'); - late final _csr_cs_set_ask_user = - _csr_cs_set_ask_userPtr.asFunction(); - - /// @partner - /// @brief Sets a popup message of a client in case that a malware is detected. - /// @details Default message is "Malware which may harm your device is detected." - /// @since_tizen 3.0 - /// @remarks Meaningful only when ask user option is set by csr_cs_set_ask_user(). - /// @remarks The message will be printed on popup for user. - /// @remarks Default popup message will be used if it isn't set. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] message A message to print on a popup - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a message is too long or empty. Max size is 64 bytes - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_context_create() - /// @see csr_cs_context_destroy() - int csr_cs_set_popup_message( - csr_cs_context_h handle, - ffi.Pointer message, - ) { - return _csr_cs_set_popup_message( - handle, - message, - ); - } - - late final _csr_cs_set_popup_messagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_context_h, - ffi.Pointer)>>('csr_cs_set_popup_message'); - late final _csr_cs_set_popup_message = _csr_cs_set_popup_messagePtr - .asFunction)>(); - - /// @partner - /// @brief Sets a maximum core usage during scanning. - /// @since_tizen 3.0 - /// @remarks If a core usage is not set, #CSR_CS_CORE_USAGE_DEFAULT will be used. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] usage A maximum core usage during scanning - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a usage is invalid - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_context_create() - /// @see csr_cs_context_destroy() - int csr_cs_set_core_usage( - csr_cs_context_h handle, - int usage, - ) { - return _csr_cs_set_core_usage( - handle, - usage, - ); - } - - late final _csr_cs_set_core_usagePtr = _lookup< - ffi.NativeFunction>( - 'csr_cs_set_core_usage'); - late final _csr_cs_set_core_usage = _csr_cs_set_core_usagePtr - .asFunction(); - - /// @partner - /// @brief Sets a scan on cloud option. - /// @since_tizen 3.0 - /// @remarks Scan on cloud option is turned off as a default. - /// @remarks If an engine does not support "scanning on cloud", this option is silently ignored. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] scan_on_cloud Flag of scanning on cloud option - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_context_create() - /// @see csr_cs_context_destroy() - int csr_cs_set_scan_on_cloud( - csr_cs_context_h handle, - bool scan_on_cloud, - ) { - return _csr_cs_set_scan_on_cloud( - handle, - scan_on_cloud, - ); - } - - late final _csr_cs_set_scan_on_cloudPtr = - _lookup>( - 'csr_cs_set_scan_on_cloud'); - late final _csr_cs_set_scan_on_cloud = _csr_cs_set_scan_on_cloudPtr - .asFunction(); - - /// @partner - /// @brief Scans a data buffer for malware. - /// @details @a malware result of this method is not available for being judged by - /// csr_cs_judge_detected_malware() because it's data and not a file, so it cannot be removed or ignored. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/antivirus.scan - /// @remarks Scan data synchronously. - /// @remarks @a malware will be released when @a handle is released using csr_cs_context_destroy(). - /// @remarks If multiple malwares exists in @a data, the malware with the highest severity will be returned. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] data A scan target data - /// @param[in] length A size of a scan target data - /// @param[out] malware A pointer of the detected malware handle. It can be null when no malware detected - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory - /// @retval #CSR_ERROR_INVALID_PARAMETER @a data or @a malware is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED No privilege to call - /// @retval #CSR_ERROR_NOT_SUPPORTED Device needed to run API is not supported - /// @retval #CSR_ERROR_SOCKET Socket error between client and server - /// @retval #CSR_ERROR_SERVER Server has been failed for some reason - /// @retval #CSR_ERROR_USER_RESPONSE_FAILED Getting user response is failed. - /// @a malware will be allocated on this error - /// @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists - /// @retval #CSR_ERROR_ENGINE_DISABLED Engine is in disabled state - /// @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_context_create() - /// @see csr_cs_context_destroy() - int csr_cs_scan_data( - csr_cs_context_h handle, - ffi.Pointer data, - int length, - ffi.Pointer malware, - ) { - return _csr_cs_scan_data( - handle, - data, - length, - malware, - ); - } - - late final _csr_cs_scan_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_context_h, ffi.Pointer, - ffi.Size, ffi.Pointer)>>('csr_cs_scan_data'); - late final _csr_cs_scan_data = _csr_cs_scan_dataPtr.asFunction< - int Function(csr_cs_context_h, ffi.Pointer, int, - ffi.Pointer)>(); - - /// @partner - /// @brief Scans a file specified by file path for malware. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/antivirus.scan - /// @remarks Scan file synchronously. - /// @remarks @a malware will be released when @a handle is released using csr_cs_context_destroy(). - /// @remarks If multiple malwares exists in a file, the malware with the highest severity will be returned. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] file_path A path of scan target file - /// @param[out] malware A pointer of the detected malware handle. It can be null when no malware detected - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory - /// @retval #CSR_ERROR_INVALID_PARAMETER @a file_path or @a malware is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED Access denied - /// @retval #CSR_ERROR_NOT_SUPPORTED Device needed to run API is not supported - /// @retval #CSR_ERROR_DB DB transaction error - /// @retval #CSR_ERROR_REMOVE_FAILED Removing file or application is failed when malware exist and user select to remove by popup. - /// @a malware will be allocated on this error - /// @retval #CSR_ERROR_USER_RESPONSE_FAILED Getting user response is failed - /// @a malware will be allocated on this error - /// @retval #CSR_ERROR_FILE_DO_NOT_EXIST File not found - /// @retval #CSR_ERROR_SOCKET Socket error between client and server - /// @retval #CSR_ERROR_SERVER Server has been failed for some reason - /// @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists - /// @retval #CSR_ERROR_ENGINE_DISABLED Engine is in disabled state - /// @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated - /// @retval #CSR_ERROR_ENGINE_PERMISSION Insufficient permission of engine - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_context_create() - /// @see csr_cs_context_destroy() - int csr_cs_scan_file( - csr_cs_context_h handle, - ffi.Pointer file_path, - ffi.Pointer malware, - ) { - return _csr_cs_scan_file( - handle, - file_path, - malware, - ); - } - - late final _csr_cs_scan_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_context_h, ffi.Pointer, - ffi.Pointer)>>('csr_cs_scan_file'); - late final _csr_cs_scan_file = _csr_cs_scan_filePtr.asFunction< - int Function(csr_cs_context_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @partner - /// @brief Sets a callback function for the case that a file scan is completed. - /// @since_tizen 3.0 - /// @remarks Callback for asynchronous scan functions. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] callback A callback function for each file or application scanning done without any malware. - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a callback is invalid - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_scan_files_async() - /// @see csr_cs_scan_dir_async() - /// @see csr_cs_scan_dirs_async() - int csr_cs_set_file_scanned_cb( - csr_cs_context_h handle, - csr_cs_file_scanned_cb callback, - ) { - return _csr_cs_set_file_scanned_cb( - handle, - callback, - ); - } - - late final _csr_cs_set_file_scanned_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_context_h, - csr_cs_file_scanned_cb)>>('csr_cs_set_file_scanned_cb'); - late final _csr_cs_set_file_scanned_cb = _csr_cs_set_file_scanned_cbPtr - .asFunction(); - - /// @partner - /// @brief Sets a callback function for detection of a malware. - /// @since_tizen 3.0 - /// @remarks Callback for asynchronous scan functions. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] callback A callback function for each file or application scanning done with malware detected - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a callback is invalid - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_scan_files_async() - /// @see csr_cs_scan_dir_async() - /// @see csr_cs_scan_dirs_async() - int csr_cs_set_detected_cb( - csr_cs_context_h handle, - csr_cs_detected_cb callback, - ) { - return _csr_cs_set_detected_cb( - handle, - callback, - ); - } - - late final _csr_cs_set_detected_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - csr_cs_context_h, csr_cs_detected_cb)>>('csr_cs_set_detected_cb'); - late final _csr_cs_set_detected_cb = _csr_cs_set_detected_cbPtr - .asFunction(); - - /// @partner - /// @brief Sets a callback function for scanning completed without an error. - /// @since_tizen 3.0 - /// @remarks Callback for asynchronous scan functions. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] callback A callback function for scanning completed successfully - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a callback is invalid - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_scan_files_async() - /// @see csr_cs_scan_dir_async() - /// @see csr_cs_scan_dirs_async() - int csr_cs_set_completed_cb( - csr_cs_context_h handle, - csr_cs_completed_cb callback, - ) { - return _csr_cs_set_completed_cb( - handle, - callback, - ); - } - - late final _csr_cs_set_completed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_context_h, - csr_cs_completed_cb)>>('csr_cs_set_completed_cb'); - late final _csr_cs_set_completed_cb = _csr_cs_set_completed_cbPtr - .asFunction(); - - /// @partner - /// @brief Sets a callback function for scanning cancelled. - /// @since_tizen 3.0 - /// @remarks Callback for asynchronous scan functions. - /// @remarks Client can cancel asynchronous scanning by csr_cs_cancel_scanning(). - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] callback A callback function for scanning cancelled - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a callback is invalid - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_scan_files_async() - /// @see csr_cs_scan_dir_async() - /// @see csr_cs_scan_dirs_async() - /// @see csr_cs_cancel_scanning() - int csr_cs_set_cancelled_cb( - csr_cs_context_h handle, - csr_cs_cancelled_cb callback, - ) { - return _csr_cs_set_cancelled_cb( - handle, - callback, - ); - } - - late final _csr_cs_set_cancelled_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_context_h, - csr_cs_cancelled_cb)>>('csr_cs_set_cancelled_cb'); - late final _csr_cs_set_cancelled_cb = _csr_cs_set_cancelled_cbPtr - .asFunction(); - - /// @partner - /// @brief Sets a callback function for scanning stopped with an error. - /// @since_tizen 3.0 - /// @remarks Callback for asynchronous scan functions. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] callback A callback function for scanning stopped due to an error - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a callback is invalid - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_scan_files_async() - /// @see csr_cs_scan_dir_async() - /// @see csr_cs_scan_dirs_async() - int csr_cs_set_error_cb( - csr_cs_context_h handle, - csr_cs_error_cb callback, - ) { - return _csr_cs_set_error_cb( - handle, - callback, - ); - } - - late final _csr_cs_set_error_cbPtr = _lookup< - ffi - .NativeFunction>( - 'csr_cs_set_error_cb'); - late final _csr_cs_set_error_cb = _csr_cs_set_error_cbPtr - .asFunction(); - - /// @partner - /// @brief Scan files specified by an array of file paths for malware. - /// @details If scanning of the single file is done without detected malware, - /// csr_cs_file_scanned_cb() is called and else if malware detected - /// csr_cs_detected_cb() is called. If scanning is cancelled by - /// csr_cs_cancel_scanning(), csr_cs_cancelled_cb() is called. If scanning is failed - /// with error, csr_cs_error_cb() is called. If scanning is completed without - /// error, csr_cs_completed_cb(). Every callbacks are registered by callback - /// setter methods to @a handle and if callback is not registered, it will be just skipped to be called. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/antivirus.scan - /// @remarks Asynchronous function. - /// @remarks The caller should set callback functions before calling this method. - /// @remarks Detected malware which is provided to the callback will be released when - /// @a handle is released using csr_cs_context_destroy(). - /// @remarks If multiple malwares exists in a file, the malware with the highest - /// severity will be returned for the file via csr_cs_set_detected_cb(). - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] file_paths An array of scan target files - /// @param[in] count A number of scan target files - /// @param[in] user_data The pointer of a user data. It can be null. - /// It is delivered back to the client when a callback function is called - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory - /// @retval #CSR_ERROR_INVALID_PARAMETER @a file_paths is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED Access denied - /// @retval #CSR_ERROR_NOT_SUPPORTED Device needed to run API is not supported - /// @retval #CSR_ERROR_BUSY Busy for processing another request - /// @retval #CSR_ERROR_FILE_DO_NOT_EXIST File not found - /// @retval #CSR_ERROR_SOCKET Socket error between client and server - /// @retval #CSR_ERROR_SERVER Server has been failed for some reason - /// @retval #CSR_ERROR_DB DB transaction error - /// @retval #CSR_ERROR_ENGINE_PERMISSION Insufficient permission of engine - /// @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists - /// @retval #CSR_ERROR_ENGINE_DISABLED Engine is in disabled state - /// @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @pre It is required to set callbacks, csr_cs_completed_cb, csr_cs_error_cb(), - /// csr_cs_cancel_scanning(), csr_cs_detected_cb(), and/or csr_cs_file_scanned_cb(). - /// @see csr_cs_set_file_scanned_cb() - /// @see csr_cs_set_detected_cb() - /// @see csr_cs_set_completed_cb() - /// @see csr_cs_set_cancelled_cb() - /// @see csr_cs_set_error_cb() - /// @see csr_cs_cancel_scanning() - int csr_cs_scan_files_async( - csr_cs_context_h handle, - ffi.Pointer> file_paths, - int count, - ffi.Pointer user_data, - ) { - return _csr_cs_scan_files_async( - handle, - file_paths, - count, - user_data, - ); - } - - late final _csr_cs_scan_files_asyncPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_context_h, ffi.Pointer>, - ffi.Size, ffi.Pointer)>>('csr_cs_scan_files_async'); - late final _csr_cs_scan_files_async = _csr_cs_scan_files_asyncPtr.asFunction< - int Function(csr_cs_context_h, ffi.Pointer>, int, - ffi.Pointer)>(); - - /// @partner - /// @brief Scans a directory specified by directory path for malware. - /// @details If scanning of the single file is done without detected malware, - /// csr_cs_file_scanned_cb() is called and else if malware detected - /// csr_cs_detected_cb() is called. If scanning is cancelled by - /// csr_cs_cancel_scanning(), csr_cs_cancelled_cb() is called. If scanning is failed - /// with error, csr_cs_error_cb() is called. If scanning is completed without - /// error, csr_cs_completed_cb(). Every callbacks are registered by callback - /// setter methods to @a handle and if callback is not registered, it will be just skipped to be called. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/antivirus.scan - /// @remarks Asynchronous function. - /// @remarks The caller should set callback functions before calling this method. - /// @remarks Detected malware which is provided to the callback will be released when - /// @a handle is released using csr_cs_context_destroy(). - /// @remarks If multiple malwares exists in a file, the malware with the highest - /// severity will be returned for the file via csr_cs_set_detected_cb(). - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] dir_path A path of scan target directory - /// @param[in] user_data The pointer of a user data. It can be null. - /// It is used on the callback functions which are registered to @a handle - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory - /// @retval #CSR_ERROR_INVALID_PARAMETER @a dir_path is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED Access denied - /// @retval #CSR_ERROR_NOT_SUPPORTED Device needed to run API is not supported - /// @retval #CSR_ERROR_BUSY Busy for processing another request - /// @retval #CSR_ERROR_FILE_DO_NOT_EXIST File not found - /// @retval #CSR_ERROR_FILE_SYSTEM File type is invalid. It should be directory - /// @retval #CSR_ERROR_SOCKET Socket error between client and server - /// @retval #CSR_ERROR_SERVER Server has been failed for some reason - /// @retval #CSR_ERROR_DB DB transaction error - /// @retval #CSR_ERROR_ENGINE_PERMISSION Insufficient permission of engine - /// @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists - /// @retval #CSR_ERROR_ENGINE_DISABLED Engine is in disabled state - /// @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @pre It is required to set callbacks, csr_cs_completed_cb, csr_cs_error_cb(), - /// csr_cs_cancel_scanning(), csr_cs_detected_cb(), and/or csr_cs_file_scanned_cb(). - /// @see csr_cs_set_file_scanned_cb() - /// @see csr_cs_set_detected_cb() - /// @see csr_cs_set_completed_cb() - /// @see csr_cs_set_cancelled_cb() - /// @see csr_cs_set_error_cb() - /// @see csr_cs_cancel_scanning() - int csr_cs_scan_dir_async( - csr_cs_context_h handle, - ffi.Pointer dir_path, - ffi.Pointer user_data, - ) { - return _csr_cs_scan_dir_async( - handle, - dir_path, - user_data, - ); - } - - late final _csr_cs_scan_dir_asyncPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_context_h, ffi.Pointer, - ffi.Pointer)>>('csr_cs_scan_dir_async'); - late final _csr_cs_scan_dir_async = _csr_cs_scan_dir_asyncPtr.asFunction< - int Function( - csr_cs_context_h, ffi.Pointer, ffi.Pointer)>(); - - /// @partner - /// @brief Scan directories specified by an array of directory paths for malware. - /// @details If scanning of the single file is done without detected malware, - /// csr_cs_file_scanned_cb() is called and else if malware detected - /// csr_cs_detected_cb() is called. If scanning is cancelled by - /// csr_cs_cancel_scanning(), csr_cs_cancelled_cb() is called. If scanning is failed - /// with error, csr_cs_error_cb() is called. If scanning is completed without - /// error, csr_cs_completed_cb(). Every callbacks are registered by callback - /// setter methods to @a handle and if callback is not registered, it will just be skipped to be called. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/antivirus.scan - /// @remarks Asynchronous function. - /// @remarks The caller should set callback functions before calls this method. - /// @remarks Detected malware which is provided to the callback will be released when - /// @a handle is released using csr_cs_context_destroy(). - /// @remarks If multiple malwares exists in a file, the malware with the highest - /// severity will be returned for the file via csr_cs_set_detected_cb(). - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] dir_paths An array of scan target directories - /// @param[in] count A number of scan target directories - /// @param[in] user_data The pointer of a user data. It can be null. It is used on - /// the callback functions which are registered to @a handle - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory - /// @retval #CSR_ERROR_INVALID_PARAMETER @a dir_paths is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED Access denied - /// @retval #CSR_ERROR_NOT_SUPPORTED Device needed to run API is not supported - /// @retval #CSR_ERROR_BUSY Busy for processing another request - /// @retval #CSR_ERROR_FILE_DO_NOT_EXIST File not found - /// @retval #CSR_ERROR_FILE_SYSTEM File type is invalid. It should be directory - /// @retval #CSR_ERROR_SOCKET Socket error between client and server - /// @retval #CSR_ERROR_SERVER Server has been failed for some reason - /// @retval #CSR_ERROR_DB DB transaction error - /// @retval #CSR_ERROR_ENGINE_PERMISSION Insufficient permission of engine - /// @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists - /// @retval #CSR_ERROR_ENGINE_DISABLED Engine is in disabled state - /// @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @pre It is required to set callbacks, csr_cs_completed_cb, csr_cs_error_cb(), - /// csr_cs_cancel_scanning(), csr_cs_detected_cb(), and/or csr_cs_file_scanned_cb(). - /// @see csr_cs_set_file_scanned_cb() - /// @see csr_cs_set_detected_cb() - /// @see csr_cs_set_completed_cb() - /// @see csr_cs_set_cancelled_cb() - /// @see csr_cs_set_error_cb() - /// @see csr_cs_cancel_scanning() - int csr_cs_scan_dirs_async( - csr_cs_context_h handle, - ffi.Pointer> dir_paths, - int count, - ffi.Pointer user_data, - ) { - return _csr_cs_scan_dirs_async( - handle, - dir_paths, - count, - user_data, - ); - } - - late final _csr_cs_scan_dirs_asyncPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_context_h, ffi.Pointer>, - ffi.Size, ffi.Pointer)>>('csr_cs_scan_dirs_async'); - late final _csr_cs_scan_dirs_async = _csr_cs_scan_dirs_asyncPtr.asFunction< - int Function(csr_cs_context_h, ffi.Pointer>, int, - ffi.Pointer)>(); - - /// @partner - /// @brief Cancels a running scanning task, asynchronously. - /// @since_tizen 3.0 - /// @remarks Only for asynchronous scan functions. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_NO_TASK No task to cancel - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_scan_files_async() - /// @see csr_cs_scan_dir_async() - /// @see csr_cs_scan_dirs_async() - int csr_cs_cancel_scanning( - csr_cs_context_h handle, - ) { - return _csr_cs_cancel_scanning( - handle, - ); - } - - late final _csr_cs_cancel_scanningPtr = - _lookup>( - 'csr_cs_cancel_scanning'); - late final _csr_cs_cancel_scanning = - _csr_cs_cancel_scanningPtr.asFunction(); - - /// @partner - /// @brief Extracts the severity of a detected malware from the detected malware handle. - /// @since_tizen 3.0 - /// @param[in] malware A detected malware handle returned by csr_cs_scan_data(), - /// csr_cs_scan_file() or csr_cs_malware_list_get_malware() - /// @param[out] severity A pointer of the severity of a detected malware - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid detected malware handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a severity is invalid - /// @retval #CSR_ERROR_SYSTEM System error - int csr_cs_malware_get_severity( - csr_cs_malware_h malware, - ffi.Pointer severity, - ) { - return _csr_cs_malware_get_severity( - malware, - severity, - ); - } - - late final _csr_cs_malware_get_severityPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_malware_h, - ffi.Pointer)>>('csr_cs_malware_get_severity'); - late final _csr_cs_malware_get_severity = _csr_cs_malware_get_severityPtr - .asFunction)>(); - - /// @partner - /// @brief Extracts the name of a detected malware from the detected malware handle. - /// @since_tizen 3.0 - /// @remarks @a name must be released using free(). - /// @param[in] malware A detected malware handle - /// @param[out] name A pointer of the name of a detected malware - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid detected malware handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a name is invalid - /// @retval #CSR_ERROR_SYSTEM System error - int csr_cs_malware_get_name( - csr_cs_malware_h malware, - ffi.Pointer> name, - ) { - return _csr_cs_malware_get_name( - malware, - name, - ); - } - - late final _csr_cs_malware_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_malware_h, - ffi.Pointer>)>>('csr_cs_malware_get_name'); - late final _csr_cs_malware_get_name = _csr_cs_malware_get_namePtr.asFunction< - int Function(csr_cs_malware_h, ffi.Pointer>)>(); - - /// @partner - /// @brief Extracts an url that contains detailed information on vendor's web site from the detected malware handle. - /// @since_tizen 3.0 - /// @remarks @a detailed_url must be released using free(). - /// @param[in] malware A detected malware handle - /// @param[out] detailed_url A pointer of an url that contains detailed information on - /// vendor's web site. It can be null if a vendor doesn't provide this information - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid detected malware handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a detailed_url is invalid. - /// @retval #CSR_ERROR_SYSTEM System error - int csr_cs_malware_get_detailed_url( - csr_cs_malware_h malware, - ffi.Pointer> detailed_url, - ) { - return _csr_cs_malware_get_detailed_url( - malware, - detailed_url, - ); - } - - late final _csr_cs_malware_get_detailed_urlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - csr_cs_malware_h, ffi.Pointer>)>>( - 'csr_cs_malware_get_detailed_url'); - late final _csr_cs_malware_get_detailed_url = - _csr_cs_malware_get_detailed_urlPtr.asFunction< - int Function(csr_cs_malware_h, ffi.Pointer>)>(); - - /// @partner - /// @brief Extracts the time stamp when a malware is detected from the detected malware handle. - /// @since_tizen 3.0 - /// @param[in] malware A detected malware handle - /// @param[out] timestamp A pointer of the time stamp in milli second when a malware is detected - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid detected malware handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a timestamp is invalid - /// @retval #CSR_ERROR_SYSTEM System error - int csr_cs_malware_get_timestamp( - csr_cs_malware_h malware, - ffi.Pointer timestamp, - ) { - return _csr_cs_malware_get_timestamp( - malware, - timestamp, - ); - } - - late final _csr_cs_malware_get_timestampPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_malware_h, - ffi.Pointer)>>('csr_cs_malware_get_timestamp'); - late final _csr_cs_malware_get_timestamp = _csr_cs_malware_get_timestampPtr - .asFunction)>(); - - /// @partner - /// @brief Extracts the file name where a malware is detected from the detected malware handle. - /// @since_tizen 3.0 - /// @remarks @a file_name must be released using free(). - /// @param[in] malware A detected malware handle - /// @param[out] file_name A pointer of the file name where a malware is detected. The file name is null for csr_cs_scan_data() - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid detected malware handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a file_name is invalid - /// @retval #CSR_ERROR_SYSTEM System error - int csr_cs_malware_get_file_name( - csr_cs_malware_h malware, - ffi.Pointer> file_name, - ) { - return _csr_cs_malware_get_file_name( - malware, - file_name, - ); - } - - late final _csr_cs_malware_get_file_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - csr_cs_malware_h, ffi.Pointer>)>>( - 'csr_cs_malware_get_file_name'); - late final _csr_cs_malware_get_file_name = - _csr_cs_malware_get_file_namePtr.asFunction< - int Function(csr_cs_malware_h, ffi.Pointer>)>(); - - /// @partner - /// @brief Extracts a user response of a popup from the detected malware handle. - /// @since_tizen 3.0 - /// @param[in] malware A detected malware handle - /// @param[out] response A pointer of the user response - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid result handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a response is invalid - /// @retval #CSR_ERROR_SYSTEM System error - int csr_cs_malware_get_user_response( - csr_cs_malware_h malware, - ffi.Pointer response, - ) { - return _csr_cs_malware_get_user_response( - malware, - response, - ); - } - - late final _csr_cs_malware_get_user_responsePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_malware_h, - ffi.Pointer)>>('csr_cs_malware_get_user_response'); - late final _csr_cs_malware_get_user_response = - _csr_cs_malware_get_user_responsePtr - .asFunction)>(); - - /// @partner - /// @brief Checks if a malware was detected in an application or in a file. - /// @since_tizen 3.0 - /// @param[in] malware A detected malware handle - /// @param[out] is_app A pointer of a flag indicating the position where a malware was detected. - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid result handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a is_app is invalid - /// @retval #CSR_ERROR_SYSTEM System error - int csr_cs_malware_is_app( - csr_cs_malware_h malware, - ffi.Pointer is_app, - ) { - return _csr_cs_malware_is_app( - malware, - is_app, - ); - } - - late final _csr_cs_malware_is_appPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_malware_h, - ffi.Pointer)>>('csr_cs_malware_is_app'); - late final _csr_cs_malware_is_app = _csr_cs_malware_is_appPtr - .asFunction)>(); - - /// @partner - /// @brief Extracts the package id of an application where a malware is detected from detected malware handle. - /// @since_tizen 3.0 - /// @remarks @a pkg_id must be released using free(). - /// @param[in] malware A detected malware handle - /// @param[out] pkg_id A pointer of the package id where a malware is detected. - /// It is null when a malware was not detected in an application - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid detected malware handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a pkg_id is invalid - /// @retval #CSR_ERROR_SYSTEM System error - int csr_cs_malware_get_pkg_id( - csr_cs_malware_h malware, - ffi.Pointer> pkg_id, - ) { - return _csr_cs_malware_get_pkg_id( - malware, - pkg_id, - ); - } - - late final _csr_cs_malware_get_pkg_idPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - csr_cs_malware_h, ffi.Pointer>)>>( - 'csr_cs_malware_get_pkg_id'); - late final _csr_cs_malware_get_pkg_id = - _csr_cs_malware_get_pkg_idPtr.asFunction< - int Function(csr_cs_malware_h, ffi.Pointer>)>(); - - /// @platform - /// @brief Judges how a detected malware file is handled. - /// @details Detected malware will be removed by #CSR_CS_ACTION_REMOVE action. - /// File or application which contains malware will be removed. - /// Detected malware will be ignored by #CSR_CS_ACTION_IGNORE action. - /// File or application which contains malware will be ignored and will not be treated - /// as malware until this API is called with #CSR_CS_ACTION_UNIGNORE action. - /// @since_tizen 3.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/antivirus.admin - /// @remarks Detected malware can be removed or ignored. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] malware A handle of a detected malware - /// @param[in] action An action to be taken - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory - /// @retval #CSR_ERROR_INVALID_PARAMETER @a malware or @a action is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED No permission to remove - /// @retval #CSR_ERROR_FILE_DO_NOT_EXIST File to take action on not found - /// @retval #CSR_ERROR_FILE_CHANGED File to take action on changed after detection - /// @retval #CSR_ERROR_SOCKET Socket error between client and server - /// @retval #CSR_ERROR_SERVER Server has been failed for some reason - /// @retval #CSR_ERROR_DB DB transaction error - /// @retval #CSR_ERROR_REMOVE_FAILED Removing file or application is failed - /// @retval #CSR_ERROR_SYSTEM System error - int csr_cs_judge_detected_malware( - csr_cs_context_h handle, - csr_cs_malware_h malware, - int action, - ) { - return _csr_cs_judge_detected_malware( - handle, - malware, - action, - ); - } - - late final _csr_cs_judge_detected_malwarePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_context_h, csr_cs_malware_h, - ffi.Int32)>>('csr_cs_judge_detected_malware'); - late final _csr_cs_judge_detected_malware = _csr_cs_judge_detected_malwarePtr - .asFunction(); - - /// @partner - /// @brief Gets information on a detected malware file specified by file path. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/antivirus.scan - /// @remarks @a malware will be released when @a handle is destroyed. - /// @remarks @a file_path will be null if it's result of csr_cs_scan_data(). - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] file_path A path of a detected malware file - /// @param[out] malware A pointer of the detected malware handle. It can be null when no malware file - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory - /// @retval #CSR_ERROR_INVALID_PARAMETER @a file_path or @a malware is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED No permission to remove - /// @retval #CSR_ERROR_FILE_DO_NOT_EXIST No malware file - /// @retval #CSR_ERROR_SOCKET Socket error between client and server - /// @retval #CSR_ERROR_SERVER Server has been failed for some reason - /// @retval #CSR_ERROR_DB DB transaction error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_cs_scan_data() - /// @see csr_cs_scan_file() - /// @see csr_cs_detected_cb - int csr_cs_get_detected_malware( - csr_cs_context_h handle, - ffi.Pointer file_path, - ffi.Pointer malware, - ) { - return _csr_cs_get_detected_malware( - handle, - file_path, - malware, - ); - } - - late final _csr_cs_get_detected_malwarePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_context_h, ffi.Pointer, - ffi.Pointer)>>('csr_cs_get_detected_malware'); - late final _csr_cs_get_detected_malware = - _csr_cs_get_detected_malwarePtr.asFunction< - int Function(csr_cs_context_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @partner - /// @brief Gets information on a detected malware files specified by directory path. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/antivirus.scan - /// @remarks @a list will be released when @a handle is destroyed. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] dir_paths A directory path where detected malware files exists - /// @param[in] count Count of array element of @a dir_paths - /// @param[out] list A pointer of the detected malware list handle. It can be null when there is no malware file - /// @param[out] list_count Count of detected malware files which existed in the specified directory - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory - /// @retval #CSR_ERROR_INVALID_PARAMETER @a dir_paths, @a list, or @a count is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED No permission to remove - /// @retval #CSR_ERROR_FILE_DO_NOT_EXIST No malware file - /// @retval #CSR_ERROR_SOCKET Socket error between client and server - /// @retval #CSR_ERROR_SERVER Server has been failed for some reason - /// @retval #CSR_ERROR_DB DB transaction error - /// @retval #CSR_ERROR_SYSTEM System error - int csr_cs_get_detected_malwares( - csr_cs_context_h handle, - ffi.Pointer> dir_paths, - int count, - ffi.Pointer list, - ffi.Pointer list_count, - ) { - return _csr_cs_get_detected_malwares( - handle, - dir_paths, - count, - list, - list_count, - ); - } - - late final _csr_cs_get_detected_malwaresPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - csr_cs_context_h, - ffi.Pointer>, - ffi.Size, - ffi.Pointer, - ffi.Pointer)>>('csr_cs_get_detected_malwares'); - late final _csr_cs_get_detected_malwares = - _csr_cs_get_detected_malwaresPtr.asFunction< - int Function( - csr_cs_context_h, - ffi.Pointer>, - int, - ffi.Pointer, - ffi.Pointer)>(); - - /// @partner - /// @brief Gets information on a ignored malware file specified by file path. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/antivirus.scan - /// @remarks @a malware will be released when @a handle is destroyed. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] file_path A path of a ignored malware file - /// @param[out] malware A pointer of the detected malware handle. It can be null when no ignored file - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory - /// @retval #CSR_ERROR_INVALID_PARAMETER @a file_path or @a malware is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED No permission to remove - /// @retval #CSR_ERROR_FILE_DO_NOT_EXIST No ignored file - /// @retval #CSR_ERROR_SOCKET Socket error between client and server - /// @retval #CSR_ERROR_SERVER Server has been failed for some reason - /// @retval #CSR_ERROR_DB DB transaction error - /// @retval #CSR_ERROR_SYSTEM System error - int csr_cs_get_ignored_malware( - csr_cs_context_h handle, - ffi.Pointer file_path, - ffi.Pointer malware, - ) { - return _csr_cs_get_ignored_malware( - handle, - file_path, - malware, - ); - } - - late final _csr_cs_get_ignored_malwarePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_context_h, ffi.Pointer, - ffi.Pointer)>>('csr_cs_get_ignored_malware'); - late final _csr_cs_get_ignored_malware = - _csr_cs_get_ignored_malwarePtr.asFunction< - int Function(csr_cs_context_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @partner - /// @brief Gets information on ignored malware files specified by directory path. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/antivirus.scan - /// @remarks @a list will be released when @a handle is destroyed. - /// @param[in] handle CSR CS context handle returned by csr_cs_context_create() - /// @param[in] dir_paths A directory path where ignored malware files exists - /// @param[in] count Count of array element of @a dir_paths - /// @param[out] list A pointer of the detected malware list handle. It can be null when no ignored file - /// @param[out] list_count Count of ignored malware files which existed in the specified directory - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory - /// @retval #CSR_ERROR_INVALID_PARAMETER @a dir_paths, @a list, or @a count is invalid - /// @retval #CSR_ERROR_PERMISSION_DENIED No permission to remove - /// @retval #CSR_ERROR_FILE_DO_NOT_EXIST No ignored file - /// @retval #CSR_ERROR_SOCKET Socket error between client and server - /// @retval #CSR_ERROR_SERVER Server has been failed for some reason - /// @retval #CSR_ERROR_DB DB transaction error - /// @retval #CSR_ERROR_SYSTEM System error - int csr_cs_get_ignored_malwares( - csr_cs_context_h handle, - ffi.Pointer> dir_paths, - int count, - ffi.Pointer list, - ffi.Pointer list_count, - ) { - return _csr_cs_get_ignored_malwares( - handle, - dir_paths, - count, - list, - list_count, - ); - } - - late final _csr_cs_get_ignored_malwaresPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - csr_cs_context_h, - ffi.Pointer>, - ffi.Size, - ffi.Pointer, - ffi.Pointer)>>('csr_cs_get_ignored_malwares'); - late final _csr_cs_get_ignored_malwares = - _csr_cs_get_ignored_malwaresPtr.asFunction< - int Function( - csr_cs_context_h, - ffi.Pointer>, - int, - ffi.Pointer, - ffi.Pointer)>(); - - /// @partner - /// @brief Extracts the detected malware handle from the detected malware list handle. - /// @since_tizen 3.0 - /// @remarks @a malware will be released when a context is released using csr_cs_context_destroy(). - /// @param[in] list A detected malware list handle returned by csr_cs_get_detected_malwares() or csr_cs_get_ignored_malwares() - /// @param[in] index An index of a target detected malware handle to get - /// @param[out] malware A pointer of the detected malware handle. It can be null when index is invalid - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid list - /// @retval #CSR_ERROR_INVALID_PARAMETER @a index or @a malware is invalid - /// @retval #CSR_ERROR_SYSTEM System error - int csr_cs_malware_list_get_malware( - csr_cs_malware_list_h list, - int index, - ffi.Pointer malware, - ) { - return _csr_cs_malware_list_get_malware( - list, - index, - malware, - ); - } - - late final _csr_cs_malware_list_get_malwarePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_cs_malware_list_h, ffi.Size, - ffi.Pointer)>>( - 'csr_cs_malware_list_get_malware'); - late final _csr_cs_malware_list_get_malware = - _csr_cs_malware_list_get_malwarePtr.asFunction< - int Function( - csr_cs_malware_list_h, int, ffi.Pointer)>(); - - /// @partner - /// @brief Initializes and returns a CSR Web Protection API handle. - /// @details A Web Protection API handle (or CSR WP handle) is obtained by this method. - /// The handle is required for subsequent CSR WP API calls. - /// @since_tizen 3.0 - /// @remarks @a handle should be released using csr_wp_context_destroy(). - /// @remarks Multiple handles can be obtained. - /// @param[out] handle A pointer of CSR WP context handle - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory - /// @retval #CSR_ERROR_INVALID_PARAMETER @a handle is invalid - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_wp_context_destroy() - int csr_wp_context_create( - ffi.Pointer handle, - ) { - return _csr_wp_context_create( - handle, - ); - } - - late final _csr_wp_context_createPtr = _lookup< - ffi.NativeFunction)>>( - 'csr_wp_context_create'); - late final _csr_wp_context_create = _csr_wp_context_createPtr - .asFunction)>(); - - /// @partner - /// @brief Releases all system resources associated with a Web Protection API handle. - /// @since_tizen 3.0 - /// @param[in] handle CSR WP context handle returned by csr_wp_context_create() - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_SOCKET Socket error between client and server - /// @retval #CSR_ERROR_SERVER Server has been failed for some reason - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_wp_context_create() - int csr_wp_context_destroy( - csr_wp_context_h handle, - ) { - return _csr_wp_context_destroy( - handle, - ); - } - - late final _csr_wp_context_destroyPtr = - _lookup>( - 'csr_wp_context_destroy'); - late final _csr_wp_context_destroy = - _csr_wp_context_destroyPtr.asFunction(); - - /// @partner - /// @brief Sets a popup option for risky URL checked. - /// @details If #CSR_WP_ASK_USER_YES is set, a popup will be prompted to a user when a URL turns out risky. - /// If #CSR_WP_ASK_USER_NO is set, no popup will be prompted even when a URL turns out risky. - /// @since_tizen 3.0 - /// @remarks This option is disabled(#CSR_WP_ASK_USER_NO) as a default. - /// @param[in] handle CSR WP context handle returned by csr_wp_context_create() - /// @param[in] ask_user A popup option in case for a risky URL - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a ask_user is invalid - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_wp_context_create() - int csr_wp_set_ask_user( - csr_wp_context_h handle, - int ask_user, - ) { - return _csr_wp_set_ask_user( - handle, - ask_user, - ); - } - - late final _csr_wp_set_ask_userPtr = _lookup< - ffi.NativeFunction>( - 'csr_wp_set_ask_user'); - late final _csr_wp_set_ask_user = - _csr_wp_set_ask_userPtr.asFunction(); - - /// @partner - /// @brief Sets a popup message of a client in case for a risky URL. - /// @details Default message is "Risky URL which may harm your device is detected". - /// @since_tizen 3.0 - /// @remarks Meaningful only when ask user option is set by csr_wp_set_ask_user(). - /// @remarks The message will be printed on popup for user. - /// @remarks Default popup message will be used if it isn't set. - /// @param[in] handle CSR WP context handle returned by csr_wp_context_create() - /// @param[in] message A message to print on a popup - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a message is too long or empty. Max size is 64 bytes - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_wp_context_create() - int csr_wp_set_popup_message( - csr_wp_context_h handle, - ffi.Pointer message, - ) { - return _csr_wp_set_popup_message( - handle, - message, - ); - } - - late final _csr_wp_set_popup_messagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_wp_context_h, - ffi.Pointer)>>('csr_wp_set_popup_message'); - late final _csr_wp_set_popup_message = _csr_wp_set_popup_messagePtr - .asFunction)>(); - - /// @partner - /// @brief Checks URL reputation against the engine vendor's database. - /// @details Checks whether accessing the URL is risky or not and returns a result handle with the risk level for the URL. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/antivirus.webprotect - /// @remarks @a result will be released when @a handle is released using csr_wp_context_destroy(). - /// @param[in] handle CSR WP context handle returned by csr_wp_context_create() - /// @param[in] url URL to check - /// @param[out] result A pointer of the result handle with the Risk level for the URL - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid handle - /// @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory - /// @retval #CSR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CSR_ERROR_NOT_SUPPORTED Device needed to run API is not supported - /// @retval #CSR_ERROR_INVALID_PARAMETER @a url or @a result is invalid - /// @retval #CSR_ERROR_SOCKET Socket error between client and server - /// @retval #CSR_ERROR_SERVER Server has been failed for some reason - /// @retval #CSR_ERROR_USER_RESPONSE_FAILED Getting user response is failed. - /// @a result will be allocated on this error - /// @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists - /// @retval #CSR_ERROR_ENGINE_DISABLED Engine is in disabled state - /// @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated - /// @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_wp_context_create() - /// @see csr_wp_set_ask_user() - /// @see csr_wp_set_popup_message() - int csr_wp_check_url( - csr_wp_context_h handle, - ffi.Pointer url, - ffi.Pointer result, - ) { - return _csr_wp_check_url( - handle, - url, - result, - ); - } - - late final _csr_wp_check_urlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_wp_context_h, ffi.Pointer, - ffi.Pointer)>>('csr_wp_check_url'); - late final _csr_wp_check_url = _csr_wp_check_urlPtr.asFunction< - int Function(csr_wp_context_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @partner - /// @brief Extracts a risk level of the url from the result handle. - /// @since_tizen 3.0 - /// @param[in] result A result handle returned by csr_wp_check_url() - /// @param[out] level A pointer of the risk level for the given URL - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid result handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a level is invalid - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_wp_check_url() - int csr_wp_result_get_risk_level( - csr_wp_check_result_h result, - ffi.Pointer level, - ) { - return _csr_wp_result_get_risk_level( - result, - level, - ); - } - - late final _csr_wp_result_get_risk_levelPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_wp_check_result_h, - ffi.Pointer)>>('csr_wp_result_get_risk_level'); - late final _csr_wp_result_get_risk_level = - _csr_wp_result_get_risk_levelPtr.asFunction< - int Function(csr_wp_check_result_h, ffi.Pointer)>(); - - /// @partner - /// @brief Extracts an url of vendor's web site that contains detailed information about the risk from the result handle. - /// @since_tizen 3.0 - /// @remarks @a detailed_url must be released using free(). - /// @param[in] result A result handle returned by csr_wp_check_url() - /// @param[out] detailed_url A pointer of an url that contains detailed information about the risk - /// If the risk level is #CSR_WP_RISK_MEDIUM or #CSR_WP_RISK_HIGH, - /// this url should be provided by the engine - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid result handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a detailed_url is invalid - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_wp_check_url() - int csr_wp_result_get_detailed_url( - csr_wp_check_result_h result, - ffi.Pointer> detailed_url, - ) { - return _csr_wp_result_get_detailed_url( - result, - detailed_url, - ); - } - - late final _csr_wp_result_get_detailed_urlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - csr_wp_check_result_h, ffi.Pointer>)>>( - 'csr_wp_result_get_detailed_url'); - late final _csr_wp_result_get_detailed_url = - _csr_wp_result_get_detailed_urlPtr.asFunction< - int Function( - csr_wp_check_result_h, ffi.Pointer>)>(); - - /// @partner - /// @brief Extracts a user response of a popup from the result handle. - /// @since_tizen 3.0 - /// @param[in] result A result handle returned by csr_wp_check_url() - /// @param[out] response A pointer of the user response - /// @return #CSR_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CSR_ERROR_NONE Successful - /// @retval #CSR_ERROR_INVALID_HANDLE Invalid result handle - /// @retval #CSR_ERROR_INVALID_PARAMETER @a response is invalid - /// @retval #CSR_ERROR_SYSTEM System error - /// @see csr_wp_check_url() - /// @see #csr_wp_user_response_e - int csr_wp_result_get_user_response( - csr_wp_check_result_h result, - ffi.Pointer response, - ) { - return _csr_wp_result_get_user_response( - result, - response, - ); - } - - late final _csr_wp_result_get_user_responsePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(csr_wp_check_result_h, - ffi.Pointer)>>('csr_wp_result_get_user_response'); - late final _csr_wp_result_get_user_response = - _csr_wp_result_get_user_responsePtr.asFunction< - int Function(csr_wp_check_result_h, ffi.Pointer)>(); - - /// @platform - /// @brief Creates a new key context based on specific name indication (service name, key usage, key type). - /// @since_tizen 5.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/devicecertificate - /// - /// @remarks The @a key_ctx should be freed with dcm_free_key_context() after use. - /// - /// @param[in] service Service name indicates first category name (if null, default value is used) - /// @param[in] usage Usage name indicates sub-category name (if null, default value is used) - /// @param[in] key_type Key type name indication (if null, default value is used) - /// @param[out] key_ctx Newly created key context - /// @return #DCM_ERROR_NONE on success, - /// otherwise a negative error value - /// - /// @retval #DCM_ERROR_NONE Successful - /// @retval #DCM_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #DCM_ERROR_OUT_OF_MEMORY Out of memory during processing - /// @retval #DCM_ERROR_PERMISSION_DENIED Failed to access device certificate manager - /// @retval #DCM_ERROR_NOT_SUPPORTED Feature needed to run API is not supported - /// @retval #DCM_ERROR_SOCKET Socket error between client and server - /// @retval #DCM_ERROR_UNKNOWN Unknown error - /// - /// @see dcm_free_key_context() - int dcm_create_key_context( - ffi.Pointer service, - ffi.Pointer usage, - ffi.Pointer key_type, - ffi.Pointer> key_ctx, - ) { - return _dcm_create_key_context( - service, - usage, - key_type, - key_ctx, - ); - } - - late final _dcm_create_key_contextPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('dcm_create_key_context'); - late final _dcm_create_key_context = _dcm_create_key_contextPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - /// @platform - /// @brief Destroys the key context that was created by calling dcm_create_key_context(). - /// @since_tizen 5.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/devicecertificate - /// - /// @param[in] key_ctx Key context object to be deallocated - /// @return #DCM_ERROR_NONE on success, - /// otherwise a negative error value - /// - /// @retval #DCM_ERROR_NONE Successful - /// @retval #DCM_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #DCM_ERROR_OUT_OF_MEMORY Out of memory during processing - /// @retval #DCM_ERROR_PERMISSION_DENIED Failed to access device certificate manager - /// @retval #DCM_ERROR_NOT_SUPPORTED Feature needed to run API is not supported - /// @retval #DCM_ERROR_SOCKET Socket error between client and server - /// @retval #DCM_ERROR_NO_DATA No such key context object - /// @retval #DCM_ERROR_UNKNOWN Unknown error - /// - /// @see dcm_create_key_context() - int dcm_free_key_context( - ffi.Pointer key_ctx, - ) { - return _dcm_free_key_context( - key_ctx, - ); - } - - late final _dcm_free_key_contextPtr = - _lookup)>>( - 'dcm_free_key_context'); - late final _dcm_free_key_context = _dcm_free_key_contextPtr - .asFunction)>(); - - /// @platform - /// @brief Returns a certificate chain which was pre-injected in device. - /// @since_tizen 5.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/devicecertificate - /// - /// @remarks The @a cert_chain should be freed using free(). - /// - /// @param[in] key_ctx Key context object that identifies proper certificate chain - /// @param[out] cert_chain Certificate chain in binary, will be allocated by the library - /// @param[out] cert_chain_len The total length of certificate chain - /// @return #DCM_ERROR_NONE on success, - /// otherwise a negative error value - /// - /// @retval #DCM_ERROR_NONE Successful - /// @retval #DCM_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #DCM_ERROR_OUT_OF_MEMORY Out of memory during processing - /// @retval #DCM_ERROR_PERMISSION_DENIED Failed to access device certificate manager - /// @retval #DCM_ERROR_NOT_SUPPORTED Feature needed to run API is not supported - /// @retval #DCM_ERROR_SOCKET Socket error between client and server - /// @retval #DCM_ERROR_NO_DATA No certificate chain available - /// @retval #DCM_ERROR_UNKNOWN Unknown error - int dcm_get_certificate_chain( - ffi.Pointer key_ctx, - ffi.Pointer> cert_chain, - ffi.Pointer cert_chain_len, - ) { - return _dcm_get_certificate_chain( - key_ctx, - cert_chain, - cert_chain_len, - ); - } - - late final _dcm_get_certificate_chainPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('dcm_get_certificate_chain'); - late final _dcm_get_certificate_chain = - _dcm_get_certificate_chainPtr.asFunction< - int Function(ffi.Pointer, - ffi.Pointer>, ffi.Pointer)>(); - - /// @platform - /// @brief Returns the key size in bits for a given key context. - /// @since_tizen 5.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/devicecertificate - /// - /// @param[in] key_ctx Key context object that identifies proper certificate chain - /// @param[out] key_bit_len Key length in bits - /// @return #DCM_ERROR_NONE on success, - /// otherwise a negative error value - /// - /// @retval #DCM_ERROR_NONE Successful - /// @retval #DCM_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #DCM_ERROR_OUT_OF_MEMORY Out of memory during processing - /// @retval #DCM_ERROR_PERMISSION_DENIED Failed to access device certificate manager - /// @retval #DCM_ERROR_NOT_SUPPORTED Feature needed to run API is not supported - /// @retval #DCM_ERROR_SOCKET Socket error between client and server - /// @retval #DCM_ERROR_NO_DATA No certificate chain available - /// @retval #DCM_ERROR_UNKNOWN Unknown error - int dcm_get_key_bit_length( - ffi.Pointer key_ctx, - ffi.Pointer key_bit_len, - ) { - return _dcm_get_key_bit_length( - key_ctx, - key_bit_len, - ); - } - - late final _dcm_get_key_bit_lengthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('dcm_get_key_bit_length'); - late final _dcm_get_key_bit_length = _dcm_get_key_bit_lengthPtr - .asFunction, ffi.Pointer)>(); - - /// @platform - /// @brief Returns the key type name for a given key context. - /// @since_tizen 5.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/devicecertificate - /// - /// @remarks The @a key_type should be freed using free(). - /// - /// @param[in] key_ctx Key context object that identifies proper certificate chain - /// @param[out] key_type Key type name (UNKNOWN, RSA or ECDSA), will be allocated by the library - /// @return #DCM_ERROR_NONE on success, - /// otherwise a negative error value - /// - /// @retval #DCM_ERROR_NONE Successful - /// @retval #DCM_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #DCM_ERROR_OUT_OF_MEMORY Out of memory during processing - /// @retval #DCM_ERROR_PERMISSION_DENIED Failed to access device certificate manager - /// @retval #DCM_ERROR_NOT_SUPPORTED Feature needed to run API is not supported - /// @retval #DCM_ERROR_SOCKET Socket error between client and server - /// @retval #DCM_ERROR_NO_DATA No certificate chain available - /// @retval #DCM_ERROR_UNKNOWN Unknown error - int dcm_get_key_type( - ffi.Pointer key_ctx, - ffi.Pointer> key_type, - ) { - return _dcm_get_key_type( - key_ctx, - key_type, - ); - } - - late final _dcm_get_key_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer>)>>('dcm_get_key_type'); - late final _dcm_get_key_type = _dcm_get_key_typePtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @platform - /// @brief Creates a signature on a given data using a private key and returns the signature. - /// @since_tizen 5.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/devicecertificate - /// - /// @remarks The private key is identified by @a key_ctx. - /// @remarks The @a message can be NULL but then @a message_len must be 0. - /// @remarks The @a signature should be freed using free(). - /// - /// @param[in] key_ctx Key context object that identifies a proper private key for signing - /// @param[in] md Message digest algorithm used in creating signature - /// @param[in] message Message that is signed with a key - /// @param[in] message_len Length of the message - /// @param[out] signature Newly created signature, will be allocated by the library - /// @param[out] signature_len Length of a newly created signature - /// @return #DCM_ERROR_NONE on success, - /// otherwise a negative error value - /// - /// @retval #DCM_ERROR_NONE Successful - /// @retval #DCM_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #DCM_ERROR_OUT_OF_MEMORY Out of memory during processing - /// @retval #DCM_ERROR_PERMISSION_DENIED Failed to access device certificate manager - /// @retval #DCM_ERROR_NOT_SUPPORTED Feature needed to run API is not supported - /// @retval #DCM_ERROR_SOCKET Socket error between client and server - /// @retval #DCM_ERROR_UNKNOWN Unknown error - int dcm_create_signature( - ffi.Pointer key_ctx, - int md, - ffi.Pointer message, - int message_len, - ffi.Pointer> signature, - ffi.Pointer signature_len, - ) { - return _dcm_create_signature( - key_ctx, - md, - message, - message_len, - signature, - signature_len, - ); - } - - late final _dcm_create_signaturePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Size, - ffi.Pointer>, - ffi.Pointer)>>('dcm_create_signature'); - late final _dcm_create_signature = _dcm_create_signaturePtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer, int, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Creates the device policy manager handle. - /// @details This API creates device policy manager handle required to - /// the device policy APIs. - /// This API is also used to verify whether caller is authorized - /// or not. - /// @since_tizen 3.0 - /// @return Device policy manager handle on success, otherwise NULL - /// @remarks The specific error code can be obtained by using the - /// get_last_result() method. Error codes are described in - /// exception section. - /// The returned handle should be released using dpm_manager_destroy(). - /// @exception #DPM_ERROR_NONE No error - /// @exception #DPM_ERROR_CONNECTION_REFUSED Connection refused - /// @exception #DPM_ERROR_OUT_OF_MEMORY Out of memory - /// @see dpm_manager_destroy() - /// @see get_last_result() - device_policy_manager_h dpm_manager_create() { - return _dpm_manager_create(); - } - - late final _dpm_manager_createPtr = - _lookup>( - 'dpm_manager_create'); - late final _dpm_manager_create = - _dpm_manager_createPtr.asFunction(); - - /// @brief Releases the device policy manager handle. - /// @details This API must be called if interaction with the device - /// policy manager is no longer required. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_manager_destroy( - device_policy_manager_h handle, - ) { - return _dpm_manager_destroy( - handle, - ); - } - - late final _dpm_manager_destroyPtr = - _lookup>( - 'dpm_manager_destroy'); - late final _dpm_manager_destroy = _dpm_manager_destroyPtr - .asFunction(); - - /// @brief Adds policy change callback to the device policy - /// manager. - /// @details This API can be used to subscribe policy change callback. - /// The callback specified to this API is asynchronously called when - /// policy is changed on runtime. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[in] name Policy name to subscribe(see @ref CAPI_SECURITY_DPM_MODULE_POLICY) - /// @param[in] callback The callback when policy is changed - /// @param[in] user_data User specified data passed to the callback - /// @param[out] id Policy change callback identifier - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @remark See @ref CAPI_SECURITY_DPM_MODULE_POLICY section for available policy name - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_remove_policy_changed_cb() - int dpm_add_policy_changed_cb( - device_policy_manager_h handle, - ffi.Pointer name, - dpm_policy_changed_cb callback, - ffi.Pointer user_data, - ffi.Pointer id, - ) { - return _dpm_add_policy_changed_cb( - handle, - name, - callback, - user_data, - id, - ); - } - - late final _dpm_add_policy_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - device_policy_manager_h, - ffi.Pointer, - dpm_policy_changed_cb, - ffi.Pointer, - ffi.Pointer)>>('dpm_add_policy_changed_cb'); - late final _dpm_add_policy_changed_cb = - _dpm_add_policy_changed_cbPtr.asFunction< - int Function( - device_policy_manager_h, - ffi.Pointer, - dpm_policy_changed_cb, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Removes policy change callback from the device policy - /// manager. - /// @details This API should be called if policy change subscription is no longer - /// required. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[in] id Policy change callback identifier - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @pre The handle must be created by dpm_manager_create(). - /// @pre The callback identifier must be created by dpm_manager_add_policy_changed_cb(). - /// @see dpm_manager_create() - /// @see dpm_add_policy_changed_cb() - int dpm_remove_policy_changed_cb( - device_policy_manager_h handle, - int id, - ) { - return _dpm_remove_policy_changed_cb( - handle, - id, - ); - } - - late final _dpm_remove_policy_changed_cbPtr = _lookup< - ffi - .NativeFunction>( - 'dpm_remove_policy_changed_cb'); - late final _dpm_remove_policy_changed_cb = _dpm_remove_policy_changed_cbPtr - .asFunction(); - - /// @brief Adds signal callback. - /// @details This API can be used to receive signals raised by the device policy manager. - /// The callback specified to this function is automatically called when - /// the device policy manager raises signal. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[in] signal The signal name to receive(see @ref CAPI_DPM_SECURITY_MODULE_SIGNAL) - /// @param[in] callback The signal callback - /// @param[in] user_data The user data passed to the callback function - /// @param[out] id Signal identifier - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @remark See @ref CAPI_DPM_SECURITY_MODULE_SIGNAL section for signals - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_manager_destroy() - /// @see dpm_remove_signal_cb() - int dpm_add_signal_cb( - device_policy_manager_h handle, - ffi.Pointer signal, - dpm_signal_cb callback, - ffi.Pointer user_data, - ffi.Pointer id, - ) { - return _dpm_add_signal_cb( - handle, - signal, - callback, - user_data, - id, - ); - } - - late final _dpm_add_signal_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - device_policy_manager_h, - ffi.Pointer, - dpm_signal_cb, - ffi.Pointer, - ffi.Pointer)>>('dpm_add_signal_cb'); - late final _dpm_add_signal_cb = _dpm_add_signal_cbPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer, - dpm_signal_cb, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Removes signal callback. - /// @details This API removes signal callback. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[in] id Signal identifier - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @pre The context must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_manager_destroy() - /// @see dpm_add_signal_cb() - int dpm_remove_signal_cb( - device_policy_manager_h handle, - int id, - ) { - return _dpm_remove_signal_cb( - handle, - id, - ); - } - - late final _dpm_remove_signal_cbPtr = _lookup< - ffi - .NativeFunction>( - 'dpm_remove_signal_cb'); - late final _dpm_remove_signal_cb = _dpm_remove_signal_cbPtr - .asFunction(); - - /// @partner - /// @brief Sets password quality. - /// @details An administrator can set the password restrictions it is imposing. - /// After setting this, the user will not be able to - /// enter a new password that is not at least as restrictive as what has been set. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[in] quality Password quality type, values of #dpm_password_quality_e combined with bitwise 'or' - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_set_quality( - device_policy_manager_h handle, - int quality, - ) { - return _dpm_password_set_quality( - handle, - quality, - ); - } - - late final _dpm_password_set_qualityPtr = _lookup< - ffi - .NativeFunction>( - 'dpm_password_set_quality'); - late final _dpm_password_set_quality = _dpm_password_set_qualityPtr - .asFunction(); - - /// @partner - /// @brief Gets password quality. - /// @details An administrator can get the password restrictions it is imposing. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[out] quality Password quality type, values of #dpm_password_quality_e combined with bitwise 'or' - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_get_quality( - device_policy_manager_h handle, - ffi.Pointer quality, - ) { - return _dpm_password_get_quality( - handle, - quality, - ); - } - - late final _dpm_password_get_qualityPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_password_get_quality'); - late final _dpm_password_get_quality = - _dpm_password_get_qualityPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Sets password minimum length. - /// @details Sets the minimum allowed password length. After setting this, - /// the user will not be able to enter a new password that is - /// shorter than the setting length. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[in] value Allowed minimum password length - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_set_minimum_length( - device_policy_manager_h handle, - int value, - ) { - return _dpm_password_set_minimum_length( - handle, - value, - ); - } - - late final _dpm_password_set_minimum_lengthPtr = _lookup< - ffi - .NativeFunction>( - 'dpm_password_set_minimum_length'); - late final _dpm_password_set_minimum_length = - _dpm_password_set_minimum_lengthPtr - .asFunction(); - - /// @partner - /// @brief Gets password minimum length. - /// @details Gets the minimum allowed password length. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[out] value Allowed minimum password length - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_get_minimum_length( - device_policy_manager_h handle, - ffi.Pointer value, - ) { - return _dpm_password_get_minimum_length( - handle, - value, - ); - } - - late final _dpm_password_get_minimum_lengthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_password_get_minimum_length'); - late final _dpm_password_get_minimum_length = - _dpm_password_get_minimum_lengthPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Sets minimum complex char in password. - /// @details Complex characters are all non-alphabetic characters; - /// that is, numbers and symbols. Admin can configure this - /// setting and make the password more secure. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[in] value Number of minimum complex char in password. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_set_min_complex_chars( - device_policy_manager_h handle, - int value, - ) { - return _dpm_password_set_min_complex_chars( - handle, - value, - ); - } - - late final _dpm_password_set_min_complex_charsPtr = _lookup< - ffi - .NativeFunction>( - 'dpm_password_set_min_complex_chars'); - late final _dpm_password_set_min_complex_chars = - _dpm_password_set_min_complex_charsPtr - .asFunction(); - - /// @partner - /// @brief Gets minimum complex char in password. - /// @details Complex characters are all non-alphabetic characters; - /// that is, numbers and symbols. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[out] value Number of minimum complex char in password. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_get_min_complex_chars( - device_policy_manager_h handle, - ffi.Pointer value, - ) { - return _dpm_password_get_min_complex_chars( - handle, - value, - ); - } - - late final _dpm_password_get_min_complex_charsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_password_get_min_complex_chars'); - late final _dpm_password_get_min_complex_chars = - _dpm_password_get_min_complex_charsPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Sets maximum number of failed attempts before device is wiped. - /// @details If user fails the last attempt, device will be wiped. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[in] value Maximum count for failed passwords. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_set_maximum_failed_attempts_for_wipe( - device_policy_manager_h handle, - int value, - ) { - return _dpm_password_set_maximum_failed_attempts_for_wipe( - handle, - value, - ); - } - - late final _dpm_password_set_maximum_failed_attempts_for_wipePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_password_set_maximum_failed_attempts_for_wipe'); - late final _dpm_password_set_maximum_failed_attempts_for_wipe = - _dpm_password_set_maximum_failed_attempts_for_wipePtr - .asFunction(); - - /// @partner - /// @brief Gets maximum number of failed attempts before device is wiped. - /// @details If user fails the last attempt, device will be wiped. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[out] value Maximum count for failed passwords. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_get_maximum_failed_attempts_for_wipe( - device_policy_manager_h handle, - ffi.Pointer value, - ) { - return _dpm_password_get_maximum_failed_attempts_for_wipe( - handle, - value, - ); - } - - late final _dpm_password_get_maximum_failed_attempts_for_wipePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer)>>( - 'dpm_password_get_maximum_failed_attempts_for_wipe'); - late final _dpm_password_get_maximum_failed_attempts_for_wipe = - _dpm_password_get_maximum_failed_attempts_for_wipePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Sets the number of days password expires. - /// @details An administrator can configure the password age to force - /// the user to enter a new password after every expiration period. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[in] value Number of days after which the password expires. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_set_expires( - device_policy_manager_h handle, - int value, - ) { - return _dpm_password_set_expires( - handle, - value, - ); - } - - late final _dpm_password_set_expiresPtr = _lookup< - ffi - .NativeFunction>( - 'dpm_password_set_expires'); - late final _dpm_password_set_expires = _dpm_password_set_expiresPtr - .asFunction(); - - /// @partner - /// @brief Gets the number of days password expires. - /// @details An administrator can get the password age to force - /// the user to enter a new password after every expiration period. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[out] value Number of days after which the password expires. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_get_expires( - device_policy_manager_h handle, - ffi.Pointer value, - ) { - return _dpm_password_get_expires( - handle, - value, - ); - } - - late final _dpm_password_get_expiresPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_password_get_expires'); - late final _dpm_password_get_expires = - _dpm_password_get_expiresPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Sets the number of min password history to avoid previous password. - /// @details An administrator can configure the number of previous - /// passwords which cannot be used when entering a new password. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[in] value Number of previous passwords which cannot be used when - /// settings a new password. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_set_history( - device_policy_manager_h handle, - int value, - ) { - return _dpm_password_set_history( - handle, - value, - ); - } - - late final _dpm_password_set_historyPtr = _lookup< - ffi - .NativeFunction>( - 'dpm_password_set_history'); - late final _dpm_password_set_history = _dpm_password_set_historyPtr - .asFunction(); - - /// @partner - /// @brief Gets the number of min password history to avoid previous password. - /// @details An administrator can get the number of previous - /// passwords which cannot be used when entering a new password. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[out] value Number of previous passwords which cannot be used when - /// settings a new password. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_get_history( - device_policy_manager_h handle, - ffi.Pointer value, - ) { - return _dpm_password_get_history( - handle, - value, - ); - } - - late final _dpm_password_get_historyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_password_get_history'); - late final _dpm_password_get_history = - _dpm_password_get_historyPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Sets the required password pattern. - /// @details An administrator can force User to enter password based on - /// a regular expression. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[in] pattern Password pattern. If regular expression is - /// [a-zA-Z]{4}[0-9]{4}, we can force user to enter a 8 character - /// password with first 4 alphabetic characters and next 4 - /// numeric characters. An administrator must take care when - /// setting this pattern. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_set_pattern( - device_policy_manager_h handle, - ffi.Pointer pattern, - ) { - return _dpm_password_set_pattern( - handle, - pattern, - ); - } - - late final _dpm_password_set_patternPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_password_set_pattern'); - late final _dpm_password_set_pattern = - _dpm_password_set_patternPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Resets password. - /// @details This takes effect immediately to the device password. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[in] password New password - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_reset( - device_policy_manager_h handle, - ffi.Pointer password, - ) { - return _dpm_password_reset( - handle, - password, - ); - } - - late final _dpm_password_resetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_password_reset'); - late final _dpm_password_reset = _dpm_password_resetPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Enforces password change. - /// @details An administrator can enforce password change. PasswordPolicy - /// change setting is launched. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_enforce_change( - device_policy_manager_h handle, - ) { - return _dpm_password_enforce_change( - handle, - ); - } - - late final _dpm_password_enforce_changePtr = - _lookup>( - 'dpm_password_enforce_change'); - late final _dpm_password_enforce_change = _dpm_password_enforce_changePtr - .asFunction(); - - /// @partner - /// @brief Sets the maximum number of seconds of inactivity time - /// before the screen timeout occurs. - /// @details An administrator sets the maximum number of seconds of inactivity - /// time before the screen timeout occurs and a device user must - /// type the password to unlock the device. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[in] value Maximum inactivity time for device lock. Specifies how soon - /// the device can be unlocked again after use, without reprompting for - /// the passcode. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_set_max_inactivity_time_device_lock( - device_policy_manager_h handle, - int value, - ) { - return _dpm_password_set_max_inactivity_time_device_lock( - handle, - value, - ); - } - - late final _dpm_password_set_max_inactivity_time_device_lockPtr = _lookup< - ffi - .NativeFunction>( - 'dpm_password_set_max_inactivity_time_device_lock'); - late final _dpm_password_set_max_inactivity_time_device_lock = - _dpm_password_set_max_inactivity_time_device_lockPtr - .asFunction(); - - /// @partner - /// @brief Gets the maximum number of seconds of inactivity time - /// before the screen timeout occurs. - /// @details Called by an application that is managing the device to get - /// the value of timeout period. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[out] value Pointer of Maximum inactivity time for device lock. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_get_max_inactivity_time_device_lock( - device_policy_manager_h handle, - ffi.Pointer value, - ) { - return _dpm_password_get_max_inactivity_time_device_lock( - handle, - value, - ); - } - - late final _dpm_password_get_max_inactivity_time_device_lockPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer)>>( - 'dpm_password_get_max_inactivity_time_device_lock'); - late final _dpm_password_get_max_inactivity_time_device_lock = - _dpm_password_get_max_inactivity_time_device_lockPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Sets password status - /// @details An administrator can know password status for this API. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[in] status Password status - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_set_status( - device_policy_manager_h handle, - int status, - ) { - return _dpm_password_set_status( - handle, - status, - ); - } - - late final _dpm_password_set_statusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - device_policy_manager_h, ffi.Int32)>>('dpm_password_set_status'); - late final _dpm_password_set_status = _dpm_password_set_statusPtr - .asFunction(); - - /// @partner - /// @brief Gets password status - /// @details An administrator can know password status for this API. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] status Password status - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_get_status( - device_policy_manager_h handle, - ffi.Pointer status, - ) { - return _dpm_password_get_status( - handle, - status, - ); - } - - late final _dpm_password_get_statusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_password_get_status'); - late final _dpm_password_get_status = _dpm_password_get_statusPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Removes all password patterns. - /// @details An administrator can remove all password patterns. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_delete_pattern( - device_policy_manager_h handle, - ) { - return _dpm_password_delete_pattern( - handle, - ); - } - - late final _dpm_password_delete_patternPtr = - _lookup>( - 'dpm_password_delete_pattern'); - late final _dpm_password_delete_pattern = _dpm_password_delete_patternPtr - .asFunction(); - - /// @partner - /// @brief Gets password pattern. - /// @details This API can be used for applying complexity on new password value. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @remarks The @a pattern should be freed using free(). - /// @param[in] handle Device policy manager handle - /// @param[out] pattern Password pattern - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_get_pattern( - device_policy_manager_h handle, - ffi.Pointer> pattern, - ) { - return _dpm_password_get_pattern( - handle, - pattern, - ); - } - - late final _dpm_password_get_patternPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer>)>>('dpm_password_get_pattern'); - late final _dpm_password_get_pattern = - _dpm_password_get_patternPtr.asFunction< - int Function( - device_policy_manager_h, ffi.Pointer>)>(); - - /// @partner - /// @brief Sets the maximum number of times a character can occur in - /// the device password. - /// @details Called by an admin that is managing the device to specify that - /// any character in the device password cannot occur more than - /// the specified maximum number of times. Characters can be numeric - /// or alphabetic or symbolic. "aaabcde" has 'a' which occurs 3 times, - /// "1b1c1de" has '1' which occurs 3 times and "a@b@c@" has '@' which - /// occurs 3 times. A value of '0' specifies that no restrictions are - /// applied. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[in] value Maximum character occurrences - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_set_maximum_character_occurrences( - device_policy_manager_h handle, - int value, - ) { - return _dpm_password_set_maximum_character_occurrences( - handle, - value, - ); - } - - late final _dpm_password_set_maximum_character_occurrencesPtr = _lookup< - ffi - .NativeFunction>( - 'dpm_password_set_maximum_character_occurrences'); - late final _dpm_password_set_maximum_character_occurrences = - _dpm_password_set_maximum_character_occurrencesPtr - .asFunction(); - - /// @partner - /// @brief Gets the maximum number of times a character can occur in - /// the device password. - /// @details An administrator can retrieve the maximum number of times - /// a character can occur in the device password. If more than - /// one admin has set this value then the least value will take - /// preference. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[out] value Pointer of Maximum Character Occurrences - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_get_maximum_character_occurrences( - device_policy_manager_h handle, - ffi.Pointer value, - ) { - return _dpm_password_get_maximum_character_occurrences( - handle, - value, - ); - } - - late final _dpm_password_get_maximum_character_occurrencesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer)>>( - 'dpm_password_get_maximum_character_occurrences'); - late final _dpm_password_get_maximum_character_occurrences = - _dpm_password_get_maximum_character_occurrencesPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Sets the maximum length of the numeric sequence - /// which is allowed in the device password. - /// @details Called by an administrator that is managing the device to set - /// the maximum numeric sequence length. This specifies that - /// the device password must not contain numeric sequences greater - /// than the given length. - /// Numeric sequences can be increasing successively by one like - /// "12345", or decreasing successively by one like "98765", or - /// repeating like "55555". - /// These are all numeric sequences of length '5'. - /// If maximum value is set to '5' then "123456" or "987654" or - /// "555555" are not allowed. - /// A value of '0' specifies that no such numeric sequence - /// restrictions are applied. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[in] value Maximum numeric sequence length - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_set_maximum_numeric_sequence_length( - device_policy_manager_h handle, - int value, - ) { - return _dpm_password_set_maximum_numeric_sequence_length( - handle, - value, - ); - } - - late final _dpm_password_set_maximum_numeric_sequence_lengthPtr = _lookup< - ffi - .NativeFunction>( - 'dpm_password_set_maximum_numeric_sequence_length'); - late final _dpm_password_set_maximum_numeric_sequence_length = - _dpm_password_set_maximum_numeric_sequence_lengthPtr - .asFunction(); - - /// @partner - /// @brief Gets the maximum numeric sequence length allowed in - /// the device password. - /// @details An administrator can retrieve the length of numeric sequences - /// which are allowed in the device password. - /// For instance, if the return value is '3' then "123", "987", - /// "555" would all be numeric sequences of length '3' and will be - /// allowed in the device password. - /// If more than one admin has set this value then the least value - /// will take preference. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[out] value Pointer of maximum numeric sequence length - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_get_maximum_numeric_sequence_length( - device_policy_manager_h handle, - ffi.Pointer value, - ) { - return _dpm_password_get_maximum_numeric_sequence_length( - handle, - value, - ); - } - - late final _dpm_password_get_maximum_numeric_sequence_lengthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer)>>( - 'dpm_password_get_maximum_numeric_sequence_length'); - late final _dpm_password_get_maximum_numeric_sequence_length = - _dpm_password_get_maximum_numeric_sequence_lengthPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Creates a password forbidden string list iterator. - /// @details The password forbidden string list iterator can be used to get all forbidden strings. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @return A password forbidden string list iterator on success, otherwise - /// null value - /// @remarks The specific error code can be obtained by using the - /// get_last_result() method. Error codes are described in - /// exception section. - /// The returned iterator should be released using dpm_password_destroy_iterator(). - /// @exception #DPM_ERROR_NONE No error - /// @exception #DPM_ERROR_OUT_OF_MEMORY Out of memory - /// @exception #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #DPM_ERROR_TIMED_OUT Time out - /// @exception #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_password_iterator_next() - /// @see dpm_password_destroy_iterator() - /// @see get_last_result() - dpm_password_iterator_h dpm_password_create_iterator( - device_policy_manager_h handle, - ) { - return _dpm_password_create_iterator( - handle, - ); - } - - late final _dpm_password_create_iteratorPtr = _lookup< - ffi.NativeFunction< - dpm_password_iterator_h Function( - device_policy_manager_h)>>('dpm_password_create_iterator'); - late final _dpm_password_create_iterator = _dpm_password_create_iteratorPtr - .asFunction(); - - /// @partner - /// @brief Fetches a password forbidden string and forwards the iterator. - /// @details This API returns a password forbidden string indicated by the iterator, and then - /// the iterator is moved to the next position. If the iterator reaches - /// the end of the list, null value will be returned. - /// @since_tizen 3.0 - /// @param[in] iter The iterator to be controlled - /// @param[out] forbidden_string The forbidden string got from the iterator - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @remarks The @a forbidden_string should not be freed using free(). - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @pre The iter must be created by dpm_password_create_iterator(). - /// @see dpm_passsword_create_iterator() - /// @see dpm_password_destroy_iterator() - int dpm_password_iterator_next( - dpm_password_iterator_h iter, - ffi.Pointer> forbidden_string, - ) { - return _dpm_password_iterator_next( - iter, - forbidden_string, - ); - } - - late final _dpm_password_iterator_nextPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(dpm_password_iterator_h, - ffi.Pointer>)>>( - 'dpm_password_iterator_next'); - late final _dpm_password_iterator_next = - _dpm_password_iterator_nextPtr.asFunction< - int Function( - dpm_password_iterator_h, ffi.Pointer>)>(); - - /// @partner - /// @brief Frees the password forbidden string iterator. - /// @details This API frees the password forbidden string iterator. This API must be called - /// if the iterator no longer used. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] iter The iterator to be removed - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The iter must be created by dpm_password_create_iterator() - /// @see dpm_password_create_iterator() - /// @see dpm_password_iterator_next() - int dpm_password_destroy_iterator( - dpm_password_iterator_h iter, - ) { - return _dpm_password_destroy_iterator( - iter, - ); - } - - late final _dpm_password_destroy_iteratorPtr = - _lookup>( - 'dpm_password_destroy_iterator'); - late final _dpm_password_destroy_iterator = _dpm_password_destroy_iteratorPtr - .asFunction(); - - /// @partner - /// @brief Sets strings which are forbidden in the device password. - /// @details Called by an admin that is managing the device to set strings that are forbidden to be used in the device password. - /// This specifies any strings which must not be present in the device password such as personal data (variations on the user's name, email address or X400 address), or any other strings. - /// If the parameter list has only one blank string(""), then the stored strings are cleared. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.password - /// @param[in] handle Device policy manager handle - /// @param[in] strings The forbidden strings - /// @param[in] length The length of the strings - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_password_set_forbidden_strings( - device_policy_manager_h handle, - ffi.Pointer> strings, - int length, - ) { - return _dpm_password_set_forbidden_strings( - handle, - strings, - length, - ); - } - - late final _dpm_password_set_forbidden_stringsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - device_policy_manager_h, - ffi.Pointer>, - ffi.Int)>>('dpm_password_set_forbidden_strings'); - late final _dpm_password_set_forbidden_strings = - _dpm_password_set_forbidden_stringsPtr.asFunction< - int Function(device_policy_manager_h, - ffi.Pointer>, int)>(); - - /// @partner - /// @brief Allows or disallows the use of camera. - /// @details An administrator can use this API to set whether the use of camera - /// is allowed or not. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.camera - /// @param[in] handle Device policy manager handle - /// @param[in] allow If true, allow the use of camera, if false, disallow the use of camera - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_get_camera_state() - int dpm_restriction_set_camera_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_camera_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_camera_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_camera_state'); - late final _dpm_restriction_set_camera_state = - _dpm_restriction_set_camera_statePtr - .asFunction(); - - /// @brief Check whether the use of camera is allowed or not. - /// @details An administrator can use this API to check whether the use of camera - /// is allowed or not. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the use of camera is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_set_camera_state() - int dpm_restriction_get_camera_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_camera_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_camera_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_restriction_get_camera_state'); - late final _dpm_restriction_get_camera_state = - _dpm_restriction_get_camera_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows the use of microphone. - /// @details An administrator can use this API to set whether the use of microphone - /// is allowed or not. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.microphone - /// @param[in] handle Device policy manager handle - /// @param[in] allow If true, allow the use of microphone, - /// if false, disallow the use of microphone - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_get_microphone_state() - int dpm_restriction_set_microphone_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_microphone_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_microphone_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_microphone_state'); - late final _dpm_restriction_set_microphone_state = - _dpm_restriction_set_microphone_statePtr - .asFunction(); - - /// @brief Checks whether the use of microphone is allowed or not. - /// @details An administrator can use this API to check whether the use of microphone - /// is allowed of not. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the use of microphone is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_set_microphone_state() - int dpm_restriction_get_microphone_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_microphone_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_microphone_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_restriction_get_microphone_state'); - late final _dpm_restriction_get_microphone_state = - _dpm_restriction_get_microphone_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows user to change the location state. - /// @details An administrator can use this API to allow or disallow user to change - /// the location state. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.location - /// @param[in] handle Device policy manager handle - /// @param[in] allow If true, allow user to change the location state, if false, disallow - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_get_location_state() - int dpm_restriction_set_location_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_location_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_location_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_location_state'); - late final _dpm_restriction_set_location_state = - _dpm_restriction_set_location_statePtr - .asFunction(); - - /// @brief Check whether user is allowed to change location state or not. - /// @details An administrator can use this API to check whether user is allowed to change - /// the location state or not. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the location state change is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_set_location_state() - int dpm_restriction_get_location_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_location_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_location_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_restriction_get_location_state'); - late final _dpm_restriction_get_location_state = - _dpm_restriction_get_location_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows user to use usb mass storage. - /// @details An administrator can use this API to set whether the usb mass - /// storage is allowed or not. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.storage - /// @param[in] handle Device policy manager handle - /// @param[in] allow If true, allow user to use the external storages, if false, disallow - /// the external storage - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_storage_get_external_storage_state() - int dpm_restriction_set_external_storage_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_external_storage_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_external_storage_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_external_storage_state'); - late final _dpm_restriction_set_external_storage_state = - _dpm_restriction_set_external_storage_statePtr - .asFunction(); - - /// @brief Checks whether the use of external storage is allowed or not. - /// @details An administrator can use this API to check whether the use of external storage is - /// allowed or not. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the use of external storage is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_storage_set_external_storage_state() - int dpm_restriction_get_external_storage_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_external_storage_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_external_storage_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer)>>( - 'dpm_restriction_get_external_storage_state'); - late final _dpm_restriction_get_external_storage_state = - _dpm_restriction_get_external_storage_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows user to access the clipboard. - /// @details An administrator can use this API to set whether the clipboard access. - /// is allowed or not - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.clipboard - /// @param[in] handle Device policy manager handle - /// @param[in] allow If true, allow the clipboard access, if false, disallow the clipboard access. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_get_clipboard_state() - int dpm_restriction_set_clipboard_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_clipboard_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_clipboard_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_clipboard_state'); - late final _dpm_restriction_set_clipboard_state = - _dpm_restriction_set_clipboard_statePtr - .asFunction(); - - /// @brief Checks whether the clipboard access is allowed or not. - /// @details An administrator can use this API to check whether the clipboard access - /// is allowed or not. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the access is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_set_clipboard_state() - int dpm_restriction_get_clipboard_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_clipboard_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_clipboard_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_restriction_get_clipboard_state'); - late final _dpm_restriction_get_clipboard_state = - _dpm_restriction_get_clipboard_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows the usb debugging. - /// @details An administrator can use this API to set whether the usb debugging - /// is allowed or not. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.debugging - /// @param[in] handle Device policy manager handle - /// @param[in] allow If true, allow the usb debugging, if false, disallow the usb - /// debugging - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_get_usb_debugging_state() - int dpm_restriction_set_usb_debugging_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_usb_debugging_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_usb_debugging_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_usb_debugging_state'); - late final _dpm_restriction_set_usb_debugging_state = - _dpm_restriction_set_usb_debugging_statePtr - .asFunction(); - - /// @brief Checks whether the usb debugging is allowed or not. - /// @details An administrator can use this API to check whether the usb debugging - /// is allowed or not. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the usb debugging is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_set_usb_debugging_state() - int dpm_restriction_get_usb_debugging_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_usb_debugging_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_usb_debugging_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer)>>( - 'dpm_restriction_get_usb_debugging_state'); - late final _dpm_restriction_get_usb_debugging_state = - _dpm_restriction_get_usb_debugging_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows user to change the Wi-Fi state. - /// @details An administrator can use this API to allow or disallow user to - /// change the Wi-Fi state. If it is disallowed, user does not have UI - /// access to change the state. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.wifi - /// @param[in] handle Device policy manager handle - /// @param[in] allow If true, allow user to change Wi-Fi state, - /// if false, disallow user to change Wi-Fi state. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_get_wifi_state() - int dpm_restriction_set_wifi_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_wifi_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_wifi_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_wifi_state'); - late final _dpm_restriction_set_wifi_state = - _dpm_restriction_set_wifi_statePtr - .asFunction(); - - /// @brief Checks whether the Wi-Fi state change is allowed or not. - /// @details An administrator can use this API to check whether user is - /// allowed to change Wi-Fi state or not. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the change is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_set_wifi_state() - int dpm_restriction_get_wifi_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_wifi_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_wifi_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_restriction_get_wifi_state'); - late final _dpm_restriction_get_wifi_state = - _dpm_restriction_get_wifi_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows user to change Wi-Fi hotspot state change. - /// @details An administrator can use this API to allow or disallow user to change Wi-Fi - /// hotspot state. When it is disallowed, the UI is grayed out so user cannot - /// change Wi-Fi hotspot state. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.wifi - /// @param[in] handle Device policy manager handle - /// @param[in] allow If true, allow user to change Wi-Fi hostspot state, - /// if false, disallow user to change Wi-Fi hotspot state. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_get_wifi_hotspot_state() - int dpm_restriction_set_wifi_hotspot_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_wifi_hotspot_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_wifi_hotspot_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_wifi_hotspot_state'); - late final _dpm_restriction_set_wifi_hotspot_state = - _dpm_restriction_set_wifi_hotspot_statePtr - .asFunction(); - - /// @brief Checks whether the the Wi-Fi hotspot state change is allowed or not. - /// @details An administrator can use this API to check whether user is allowed to change - /// Wi-Fi hotspot state or not. - /// If the Wi-Fi hotspot state change is disallowed, the UI is grayed out so user can not - /// change its state. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the state change is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_set_wifi_hotspot_state() - int dpm_restriction_get_wifi_hotspot_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_wifi_hotspot_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_wifi_hotspot_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_restriction_get_wifi_hotspot_state'); - late final _dpm_restriction_get_wifi_hotspot_state = - _dpm_restriction_get_wifi_hotspot_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows user to change the bluetooth tethering state. - /// @details An administrator can use this API to allow of disallow user - /// to change the bluetooth tethering state. - /// When disallowed, the UI is grayed out so user cannot change the state. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.bluetooth - /// @param[in] handle Device policy manager handle - /// @param[in] allow If true, allow user to change the bluetooth tethering state, - /// if false, disallow user to change the bluetooth tethering state. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_get_bluetooth_tethering_state() - int dpm_restriction_set_bluetooth_tethering_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_bluetooth_tethering_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_bluetooth_tethering_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_bluetooth_tethering_state'); - late final _dpm_restriction_set_bluetooth_tethering_state = - _dpm_restriction_set_bluetooth_tethering_statePtr - .asFunction(); - - /// @brief Checks whether the bluetooth tethering state change is allowed. - /// @details An administrator can use this API to check whether user is allowed - /// to change bluetooth tethering state. - /// is allowed or not. - /// If the bluetooth tethering state change is disallowed, the UI is grayed out - /// so user can not change its state. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the change is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_set_bluetooth_tethering_state() - int dpm_restriction_get_bluetooth_tethering_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_bluetooth_tethering_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_bluetooth_tethering_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer)>>( - 'dpm_restriction_get_bluetooth_tethering_state'); - late final _dpm_restriction_get_bluetooth_tethering_state = - _dpm_restriction_get_bluetooth_tethering_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows user to change USB tethering settings. - /// @details An administrator can use this API to allow or disallow user - /// to change USB tethering settings. - /// When disallowed, the UI is grayed out so user cannot change the state. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.usb - /// @param[in] handle Device policy manager handle - /// @param[in] allow If true, allow USB tethering state change, - /// if false, disallow USB tethering state change. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_get_usb_tethering_state() - int dpm_restriction_set_usb_tethering_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_usb_tethering_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_usb_tethering_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_usb_tethering_state'); - late final _dpm_restriction_set_usb_tethering_state = - _dpm_restriction_set_usb_tethering_statePtr - .asFunction(); - - /// @brief Checks whether the USB tethering state change is allowed. - /// @details An administrator can use this API to check whether the USB tethering state change - /// is allowed or not. - /// If the USB tethering state change is disallowed, the UI is grayed out - /// so user can not change its state. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the change is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_set_usb_tethering_state() - int dpm_restriction_get_usb_tethering_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_usb_tethering_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_usb_tethering_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer)>>( - 'dpm_restriction_get_usb_tethering_state'); - late final _dpm_restriction_get_usb_tethering_state = - _dpm_restriction_get_usb_tethering_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows user to change the bluetooth state. - /// @details An administrator can use this API to allow or disallow user - /// to change the bluetooth state. - /// When disallowed, the UI is grayed out so user cannot change the state. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.bluetooth - /// @param[in] handle Device policy manager handle - /// @param[in] allow If true, allow user to change bluetooth state, - /// if false, disallow user to change bluetooth state. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_get_bluetooth_mode_change_state() - int dpm_restriction_set_bluetooth_mode_change_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_bluetooth_mode_change_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_bluetooth_mode_change_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_bluetooth_mode_change_state'); - late final _dpm_restriction_set_bluetooth_mode_change_state = - _dpm_restriction_set_bluetooth_mode_change_statePtr - .asFunction(); - - /// @brief Checks whether the the bluetooth state change is allowed of not. - /// @details An administrator can use this API to check whether the bluetooth state change - /// is allowed or not. - /// If the bluetooth state change is disallowed, the UI is grayed out - /// so user can not change its state. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the change is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_set_bluetooth_mode_change_state() - int dpm_restriction_get_bluetooth_mode_change_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_bluetooth_mode_change_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_bluetooth_mode_change_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer)>>( - 'dpm_restriction_get_bluetooth_mode_change_state'); - late final _dpm_restriction_get_bluetooth_mode_change_state = - _dpm_restriction_get_bluetooth_mode_change_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows the bluetooth desktop connectivity. - /// @details An administrator can use this API to allow or disallow the bluetooth - /// desktop connectivity. - /// If the bluetooth desktop connectivity is disallowed, the UI is grayed out - /// so user can not - /// change its state. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.bluetooth - /// @param[in] handle Device policy manager handle - /// @param[out] allow If true, allow the bluetooth desktop connectivity, - /// if false, disallow the bluetooth desktop connectivity - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_get_bluetooth_desktop_connectivity_state() - int dpm_restriction_set_bluetooth_desktop_connectivity_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_bluetooth_desktop_connectivity_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_bluetooth_desktop_connectivity_statePtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Int)>>( - 'dpm_restriction_set_bluetooth_desktop_connectivity_state'); - late final _dpm_restriction_set_bluetooth_desktop_connectivity_state = - _dpm_restriction_set_bluetooth_desktop_connectivity_statePtr - .asFunction(); - - /// @brief Checks whether the the Bluetooth desktop connectivity is allowed or not. - /// @details An administrator can use this API to check whether the Bluetooth desktop - /// connectivity is allowed or not. - /// If the Bluetooth desktop connectivity is disallowed, the UI is grayed out - /// so user can not change its state. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the connectivity is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_set_bluetooth_desktop_connectivity_state() - int dpm_restriction_get_bluetooth_desktop_connectivity_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_bluetooth_desktop_connectivity_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_bluetooth_desktop_connectivity_statePtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - device_policy_manager_h, ffi.Pointer)>>( - 'dpm_restriction_get_bluetooth_desktop_connectivity_state'); - late final _dpm_restriction_get_bluetooth_desktop_connectivity_state = - _dpm_restriction_get_bluetooth_desktop_connectivity_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows user to change the bluetooth pairing. - /// @details An administrator can use this API to allow or disallow the bluetooth pairing. - /// If the bluetooth pairing is disallowed, the UI is grayed out - /// so user can not change its state. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.bluetooth - /// @param[in] handle Device policy manager handle - /// @param[out] allow If true, allow the bluetooth pairing, if false, disallow the bluetooth pairing. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_get_bluetooth_pairing_state() - int dpm_restriction_set_bluetooth_pairing_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_bluetooth_pairing_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_bluetooth_pairing_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_bluetooth_pairing_state'); - late final _dpm_restriction_set_bluetooth_pairing_state = - _dpm_restriction_set_bluetooth_pairing_statePtr - .asFunction(); - - /// @brief Checks whether the the bluetooth pairing is allowed or not. - /// @details An administrator can use this API to check whether the bluetooth - /// pairing is allowed or not. - /// If the bluetooth pairing is disallowed, the UI is grayed out - /// so user can not change its state. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the pairing is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_restriction_set_bluetooth_pairing_state() - int dpm_restriction_get_bluetooth_pairing_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_bluetooth_pairing_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_bluetooth_pairing_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer)>>( - 'dpm_restriction_get_bluetooth_pairing_state'); - late final _dpm_restriction_get_bluetooth_pairing_state = - _dpm_restriction_get_bluetooth_pairing_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows user to use of SMS or text messaging. - /// @details An administrator can disable the text messaging capability - /// without any user interaction - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.message - /// @param[in] handle Device policy manager handle - /// @param[in] sim_id SIM identifier - /// @param[in] allow If true, allow the use of SMS or text messaging, - /// if false, disallow the use of SMS or text messaging. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_restriction_get_messaging_state() - int dpm_restriction_set_messaging_state( - device_policy_manager_h handle, - ffi.Pointer sim_id, - int allow, - ) { - return _dpm_restriction_set_messaging_state( - handle, - sim_id, - allow, - ); - } - - late final _dpm_restriction_set_messaging_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer, - ffi.Int)>>('dpm_restriction_set_messaging_state'); - late final _dpm_restriction_set_messaging_state = - _dpm_restriction_set_messaging_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer, int)>(); - - /// @brief Checks whether the text messaging is allowed or not. - /// @details An administrator can use this API to check whether text messaging capability - /// is enabled or not. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[in] sim_id SIM identifier - /// @param[out] is_allowed true if the messaging is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_restriction_set_messaging_state() - int dpm_restriction_get_messaging_state( - device_policy_manager_h handle, - ffi.Pointer sim_id, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_messaging_state( - handle, - sim_id, - is_allowed, - ); - } - - late final _dpm_restriction_get_messaging_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer, - ffi.Pointer)>>('dpm_restriction_get_messaging_state'); - late final _dpm_restriction_get_messaging_state = - _dpm_restriction_get_messaging_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows the access to POP or IMAP email. - /// @details An administrator can disable the email capability without any user interaction - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.email - /// @param[in] handle Device policy manager handle - /// @param[in] allow If true, allow POP or IMAP email, if false, disallow POP or IMAP email. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_restriction_get_popimap_email_state() - int dpm_restriction_set_popimap_email_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_popimap_email_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_popimap_email_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_popimap_email_state'); - late final _dpm_restriction_set_popimap_email_state = - _dpm_restriction_set_popimap_email_statePtr - .asFunction(); - - /// @brief Checks whether the access to POP or IMAP email is allowed or not. - /// @details An administrator can use this API to check the access to POP or IMAP email - /// is allowed or not. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the POP or IMAP email is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_restriction_set_popimap_email_state() - int dpm_restriction_get_popimap_email_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_popimap_email_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_popimap_email_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer)>>( - 'dpm_restriction_get_popimap_email_state'); - late final _dpm_restriction_get_popimap_email_state = - _dpm_restriction_get_popimap_email_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Allows or disallows the use of web browser. - /// @details An administrator can allows or disallow the use of web browser without - /// any user interaction - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.browser - /// @param[in] handle Device policy manager handle - /// @param[in] allow If true, allow the use of web browser, - /// if false, disallow the use of web browser. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_restriction_get_browser_state() - int dpm_restriction_set_browser_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_browser_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_browser_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_browser_state'); - late final _dpm_restriction_set_browser_state = - _dpm_restriction_set_browser_statePtr - .asFunction(); - - /// @brief Checks whether the use of web browser is allowed or not. - /// @details An administrator can use this API to check whether the use of web browser - /// is allowed or not. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_allowed true if the use of web browser is allowed, false otherwise. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_restriction_set_browser_state() - int dpm_restriction_get_browser_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_browser_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_browser_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_restriction_get_browser_state'); - late final _dpm_restriction_get_browser_state = - _dpm_restriction_get_browser_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - int dpm_restriction_set_usb_client_state( - device_policy_manager_h handle, - int allow, - ) { - return _dpm_restriction_set_usb_client_state( - handle, - allow, - ); - } - - late final _dpm_restriction_set_usb_client_statePtr = _lookup< - ffi - .NativeFunction>( - 'dpm_restriction_set_usb_client_state'); - late final _dpm_restriction_set_usb_client_state = - _dpm_restriction_set_usb_client_statePtr - .asFunction(); - - int dpm_restriction_get_usb_client_state( - device_policy_manager_h handle, - ffi.Pointer is_allowed, - ) { - return _dpm_restriction_get_usb_client_state( - handle, - is_allowed, - ); - } - - late final _dpm_restriction_get_usb_client_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_restriction_get_usb_client_state'); - late final _dpm_restriction_get_usb_client_state = - _dpm_restriction_get_usb_client_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Locks device screen immediately. - /// @details An administrator can use this API to lock the device screen - /// immediately - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.lock - /// @param[in] handle Device policy manager handle - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_security_lockout_screen( - device_policy_manager_h handle, - ) { - return _dpm_security_lockout_screen( - handle, - ); - } - - late final _dpm_security_lockout_screenPtr = - _lookup>( - 'dpm_security_lockout_screen'); - late final _dpm_security_lockout_screen = _dpm_security_lockout_screenPtr - .asFunction(); - - /// @partner - /// @brief Encrypts or decrypts internal storage. - /// @details An administrator can use this API to enable full device - /// encryption, which includes device memory and internal SD card. - /// Before calling this API, administrator must ensure that - /// the device password is set to alphanumeric quality. - /// The administrator can set an alphanumeric password by using - /// dpm_set_password_quality() API - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.security - /// @param[in] handle Device policy manager handle - /// @param[in] encrypt true if encryption is required, false if decryption is - /// required - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_security_is_internal_storage_encrypted() - int dpm_security_set_internal_storage_encryption( - device_policy_manager_h handle, - int encrypt, - ) { - return _dpm_security_set_internal_storage_encryption( - handle, - encrypt, - ); - } - - late final _dpm_security_set_internal_storage_encryptionPtr = _lookup< - ffi - .NativeFunction>( - 'dpm_security_set_internal_storage_encryption'); - late final _dpm_security_set_internal_storage_encryption = - _dpm_security_set_internal_storage_encryptionPtr - .asFunction(); - - /// @brief Checks the internal storage encryption state. - /// @details An administrator can use this API to check whether internal - /// storage encryption is enabled. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_encrypted true if internal storage is encrypted or being encrypted, - /// else false. - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_security_set_internal_storage_encryption() - int dpm_security_is_internal_storage_encrypted( - device_policy_manager_h handle, - ffi.Pointer is_encrypted, - ) { - return _dpm_security_is_internal_storage_encrypted( - handle, - is_encrypted, - ); - } - - late final _dpm_security_is_internal_storage_encryptedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer)>>( - 'dpm_security_is_internal_storage_encrypted'); - late final _dpm_security_is_internal_storage_encrypted = - _dpm_security_is_internal_storage_encryptedPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Encrypts or decrypts external storage. - /// @details An administrator can use this API to enable external SD card - /// encryption. Before calling this API, administrator must - /// ensure that the device password is set to alphanumeric quality. - /// The administrator can set an alphanumeric password by using - /// dpm_set_password_quality() API - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.security - /// @param[in] handle Device policy manager handle - /// @param[in] encrypt true if encryption is required, false if decryption is - /// required - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_security_is_external_storage_encryped() - int dpm_security_set_external_storage_encryption( - device_policy_manager_h handle, - int encrypt, - ) { - return _dpm_security_set_external_storage_encryption( - handle, - encrypt, - ); - } - - late final _dpm_security_set_external_storage_encryptionPtr = _lookup< - ffi - .NativeFunction>( - 'dpm_security_set_external_storage_encryption'); - late final _dpm_security_set_external_storage_encryption = - _dpm_security_set_external_storage_encryptionPtr - .asFunction(); - - /// @brief Checks the external storage encryption state. - /// @details An administrator can use this API to check whether external - /// storage encryption is enabled. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[out] is_encrypted true if external storage is encrypted or being encrypted, - /// else false - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_security_set_external_storage_encryption() - int dpm_security_is_external_storage_encrypted( - device_policy_manager_h handle, - ffi.Pointer is_encrypted, - ) { - return _dpm_security_is_external_storage_encrypted( - handle, - is_encrypted, - ); - } - - late final _dpm_security_is_external_storage_encryptedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer)>>( - 'dpm_security_is_external_storage_encrypted'); - late final _dpm_security_is_external_storage_encrypted = - _dpm_security_is_external_storage_encryptedPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @partner - /// @brief Wipes external memory, internal memory, or both selectively. - /// @details Device Admin can use this API to wipe both SD card data - /// and application data. - /// Calling this API may require rebooting the device. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.wipe - /// @param[in] handle Device policy manager handle - /// @param[in] type The target storage for wipe - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - int dpm_security_wipe_data( - device_policy_manager_h handle, - int type, - ) { - return _dpm_security_wipe_data( - handle, - type, - ); - } - - late final _dpm_security_wipe_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - device_policy_manager_h, ffi.Int32)>>('dpm_security_wipe_data'); - late final _dpm_security_wipe_data = _dpm_security_wipe_dataPtr - .asFunction(); - - /// @partner - /// @brief Creates a new zone. - /// @details An administrator can use this API to create a container. Once the container - /// is created, the admin package given to the parameter will be installed inside - /// the container. Then ownership of the container gets transferred to the admin - /// package from the client which triggered the container creation process. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.zone - /// @param[in] handle Device policy manager handle - /// @param[in] name The zone name to be created - /// @param[in] pkgname Admin package container ownership will be transferred - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_zone_destroy() - /// @see dpm_zone_create_iterator() - int dpm_zone_create( - device_policy_manager_h handle, - ffi.Pointer name, - ffi.Pointer pkgname, - ) { - return _dpm_zone_create( - handle, - name, - pkgname, - ); - } - - late final _dpm_zone_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer, - ffi.Pointer)>>('dpm_zone_create'); - late final _dpm_zone_create = _dpm_zone_createPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @partner - /// @brief Removes existing zone. - /// @details Administrator can use this API to remove zone. All file system objects - /// created for the zone will be also erased. - /// @since_tizen 3.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/dpm.zone - /// @param[in] handle Device policy manager handle - /// @param[in] name The zone name to be removed - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_PERMISSION_DENIED The application does not have - /// the privilege to call this API or the caller is not the owner - /// of the zone - /// @pre The handle must be created by dpm_manager_create(). - /// @pre The zone corresponding to the given name must be - /// created before use of this API. - /// @see dpm_manager_create() - /// @see dpm_zone_create() - /// @see dpm_zone_create_iterator() - int dpm_zone_destroy( - device_policy_manager_h handle, - ffi.Pointer name, - ) { - return _dpm_zone_destroy( - handle, - name, - ); - } - - late final _dpm_zone_destroyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, - ffi.Pointer)>>('dpm_zone_destroy'); - late final _dpm_zone_destroy = _dpm_zone_destroyPtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer)>(); - - /// @brief Gets the zone state. - /// @details This API can be used to get the state of the zone. The zone can - /// have one of the three states(running, locked). - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[in] name The zone name - /// @param[out] state The zone state - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_NO_DATA No such zone to get state - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_zone_create() - /// @see dpm_zone_destroy() - int dpm_zone_get_state( - device_policy_manager_h handle, - ffi.Pointer name, - ffi.Pointer state, - ) { - return _dpm_zone_get_state( - handle, - name, - state, - ); - } - - late final _dpm_zone_get_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(device_policy_manager_h, ffi.Pointer, - ffi.Pointer)>>('dpm_zone_get_state'); - late final _dpm_zone_get_state = _dpm_zone_get_statePtr.asFunction< - int Function(device_policy_manager_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Retrieves all the name of created zones - /// @details This API calls dpm_zone_foreach_cb() once for each zone name - /// with traversing the created zones list. - /// @since_tizen 3.0 - /// @param[in] handle Device policy manager handle - /// @param[in] state a combination of the zone state to look - /// @param[in] callback The iteration callback function - /// @param[in] user_data The user data passed to the callback function - /// @return #DPM_ERROR_NONE on success, otherwise a negative value - /// @retval #DPM_ERROR_NONE Successful - /// @retval #DPM_ERROR_TIMED_OUT Time out - /// @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre The handle must be created by dpm_manager_create(). - /// @see dpm_manager_create() - /// @see dpm_zone_create() - /// @see dpm_zone_destroy() - int dpm_zone_foreach_name( - device_policy_manager_h handle, - int state, - dpm_zone_foreach_name_cb callback, - ffi.Pointer user_data, - ) { - return _dpm_zone_foreach_name( - handle, - state, - callback, - user_data, - ); - } - - late final _dpm_zone_foreach_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - device_policy_manager_h, - ffi.Int32, - dpm_zone_foreach_name_cb, - ffi.Pointer)>>('dpm_zone_foreach_name'); - late final _dpm_zone_foreach_name = _dpm_zone_foreach_namePtr.asFunction< - int Function(device_policy_manager_h, int, dpm_zone_foreach_name_cb, - ffi.Pointer)>(); - - /// @deprecated Deprecated since 3.0. [Use ckmc_owner_id_separator instead] - /// @brief Separator between alias and label. - /// @since_tizen 2.3 - /// @remarks Alias can be provided as an alias alone, or together with label - in this - /// case, separator " " (space bar) is used to separate label and alias. - /// @see #ckmc_owner_id_separator - late final ffi.Pointer> _ckmc_label_name_separator = - _lookup>('ckmc_label_name_separator'); - - ffi.Pointer get ckmc_label_name_separator => - _ckmc_label_name_separator.value; - - /// @brief Separator between alias and owner id. - /// @since_tizen 3.0 - /// @remarks Alias can be provided as an alias alone, or together with owner id. - /// In this case, separator " " (space bar) is used to separate id and alias. - /// @see ckmc_alias_new() - late final ffi.Pointer> _ckmc_owner_id_separator = - _lookup>('ckmc_owner_id_separator'); - - ffi.Pointer get ckmc_owner_id_separator => - _ckmc_owner_id_separator.value; - - /// @brief The owner of system database. - /// @since_tizen 3.0 - /// @remarks #ckmc_owner_id_system contains id connected with all system applications that run with uid less than 5000. - /// Client should use #ckmc_owner_id_system to access data owned by system application and stored in system database. - /// Client must have permission to access proper row. - /// @see ckmc_alias_new() - late final ffi.Pointer> _ckmc_owner_id_system = - _lookup>('ckmc_owner_id_system'); - - ffi.Pointer get ckmc_owner_id_system => _ckmc_owner_id_system.value; - - /// @brief Creates a new full alias which is a concatenation of @a owner_id and @a alias. - /// @since_tizen 3.0 - /// @remarks @a full_alias should be freed with free() after use. - /// @remarks Returns #CKMC_ERROR_INVALID_PARAMETER if any of parameter is NULL. - /// @remarks Returns #CKMC_ERROR_INVALID_PARAMETER if @a owner_id is empty. - /// @param[in] owner_id Data owner's id. This should be package id if data owner is - /// application. If you want to access data stored by system - /// services, it should be #ckmc_owner_id_system - /// @param[in] alias Data alias - /// @param[out] full_alias The newly created alias which is a concatenation of - /// @a owner_id, #ckmc_owner_id_separator and @a alias. - /// Destroy by free() after use - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_OUT_OF_MEMORY Not enough memory - /// @see #ckmc_owner_id_separator - /// @see #ckmc_owner_id_system - int ckmc_alias_new( - ffi.Pointer owner_id, - ffi.Pointer alias, - ffi.Pointer> full_alias, - ) { - return _ckmc_alias_new( - owner_id, - alias, - full_alias, - ); - } - - late final _ckmc_alias_newPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('ckmc_alias_new'); - late final _ckmc_alias_new = _ckmc_alias_newPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Creates a new #ckmc_key_s handle and returns it. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks You must destroy the newly created #ckmc_key_s by calling ckmc_key_free() if it is no longer needed. - /// @param[in] raw_key The byte array of key \n - /// @a raw_key may be encrypted with password - /// @param[in] key_size The byte size of @a raw_key - /// @param[in] key_type The @a raw_key's type - /// @param[in] password The byte array used to decrypt @a raw_key inside key manager \n - /// If @a raw_key is not encrypted, @a password can be null - /// @param[out] ppkey The pointer to a newly created #ckmc_key_s handle - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_OUT_OF_MEMORY Not enough memory - /// @see ckmc_key_free() - /// @see #ckmc_key_s - int ckmc_key_new( - ffi.Pointer raw_key, - int key_size, - int key_type, - ffi.Pointer password, - ffi.Pointer> ppkey, - ) { - return _ckmc_key_new( - raw_key, - key_size, - key_type, - password, - ppkey, - ); - } - - late final _ckmc_key_newPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Size, - ffi.Int32, - ffi.Pointer, - ffi.Pointer>)>>('ckmc_key_new'); - late final _ckmc_key_new = _ckmc_key_newPtr.asFunction< - int Function(ffi.Pointer, int, int, - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Destroys the #ckmc_key_s handle and releases all its resources. - /// @since_tizen 2.3 - /// @param[in] key The #ckmc_key_s handle to destroy - void ckmc_key_free( - ffi.Pointer key, - ) { - return _ckmc_key_free( - key, - ); - } - - late final _ckmc_key_freePtr = - _lookup)>>( - 'ckmc_key_free'); - late final _ckmc_key_free = - _ckmc_key_freePtr.asFunction)>(); - - /// @brief Creates a new #ckmc_raw_buffer_s handle and returns it. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks You must destroy the newly created #ckmc_raw_buffer_s by calling ckmc_buffer_free() if it is no longer needed. - /// @param[in] data The byte array of buffer - /// @param[in] size The byte size of buffer - /// @param[out] ppbuffer The pointer to a newly created #ckmc_raw_buffer_s handle - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_OUT_OF_MEMORY Not enough memory - /// @see ckmc_buffer_free() - /// @see #ckmc_raw_buffer_s - int ckmc_buffer_new( - ffi.Pointer data, - int size, - ffi.Pointer> ppbuffer, - ) { - return _ckmc_buffer_new( - data, - size, - ppbuffer, - ); - } - - late final _ckmc_buffer_newPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, - ffi.Pointer>)>>('ckmc_buffer_new'); - late final _ckmc_buffer_new = _ckmc_buffer_newPtr.asFunction< - int Function(ffi.Pointer, int, - ffi.Pointer>)>(); - - /// @brief Destroys the #ckmc_raw_buffer_s handle and releases all its resources. - /// @since_tizen 2.3 - /// @param[in] buffer The #ckmc_raw_buffer_s structure to destroy - void ckmc_buffer_free( - ffi.Pointer buffer, - ) { - return _ckmc_buffer_free( - buffer, - ); - } - - late final _ckmc_buffer_freePtr = _lookup< - ffi - .NativeFunction)>>( - 'ckmc_buffer_free'); - late final _ckmc_buffer_free = _ckmc_buffer_freePtr - .asFunction)>(); - - /// @brief Creates a new #ckmc_cert_s handle and returns it. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks You must destroy the newly created #ckmc_cert_s by calling ckmc_cert_free() if it is no longer needed. - /// @param[in] raw_cert The byte array of certificate - /// @param[in] cert_size The byte size of raw_cert - /// @param[in] data_format The encoding format of raw_cert - /// @param[out] ppcert The pointer to a newly created #ckmc_cert_s handle - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_OUT_OF_MEMORY Not enough memory - /// @see ckmc_cert_free() - /// @see ckmc_load_cert_from_file() - /// @see #ckmc_cert_s - int ckmc_cert_new( - ffi.Pointer raw_cert, - int cert_size, - int data_format, - ffi.Pointer> ppcert, - ) { - return _ckmc_cert_new( - raw_cert, - cert_size, - data_format, - ppcert, - ); - } - - late final _ckmc_cert_newPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Int32, - ffi.Pointer>)>>('ckmc_cert_new'); - late final _ckmc_cert_new = _ckmc_cert_newPtr.asFunction< - int Function(ffi.Pointer, int, int, - ffi.Pointer>)>(); - - /// @brief Destroys the #ckmc_cert_s handle and releases all its resources. - /// @since_tizen 2.3 - /// @param[in] cert The #ckmc_cert_s handle to destroy - /// @see ckmc_load_cert_from_file() - void ckmc_cert_free( - ffi.Pointer cert, - ) { - return _ckmc_cert_free( - cert, - ); - } - - late final _ckmc_cert_freePtr = - _lookup)>>( - 'ckmc_cert_free'); - late final _ckmc_cert_free = - _ckmc_cert_freePtr.asFunction)>(); - - /// @brief Creates a new #ckmc_cert_s handle from a given file and returns it. - /// @since_tizen 2.3 - /// @remarks You must destroy the newly created #ckmc_cert_s by calling ckmc_cert_free() if it is no longer needed. - /// @param[in] file_path The path of certificate file to be loaded \n - /// The only DER or PEM encoded certificate file is supported - /// @param[out] cert The pointer of newly created #ckmc_cert_s handle - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_OUT_OF_MEMORY Not enough memory space - /// @retval #CKMC_ERROR_INVALID_FORMAT Invalid certificate file format - /// @retval #CKMC_ERROR_FILE_ACCESS_DENIED Provided file does not exist or cannot be accessed - /// @see ckmc_cert_free() - /// @see #ckmc_cert_s - int ckmc_load_cert_from_file( - ffi.Pointer file_path, - ffi.Pointer> cert, - ) { - return _ckmc_load_cert_from_file( - file_path, - cert, - ); - } - - late final _ckmc_load_cert_from_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer>)>>( - 'ckmc_load_cert_from_file'); - late final _ckmc_load_cert_from_file = - _ckmc_load_cert_from_filePtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Creates a new #ckmc_pkcs12_s handle and returns it. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks You must destroy the newly created #ckmc_pkcs12_s by calling ckmc_pkcs12_free() if it is no longer needed. - /// @remarks On success, private_key, cert && ca_cert_list ownership is transferred into newly returned ckmc_pkcs12_s. - /// @param[in] private_key #ckmc_key_s handle to the private key (optional) - /// @param[in] cert #ckmc_cert_s handle to the certificate (optional) - /// @param[in] ca_cert_list #ckmc_cert_list_s list of chain certificate handles (optional) - /// @param[out] pkcs12_bundle The pointer to a newly created #ckmc_pkcs12_s handle - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid or private_key, cert and ca_cert_list all are null - /// @retval #CKMC_ERROR_OUT_OF_MEMORY Not enough memory - /// @see ckmc_pkcs12_free() - /// @see ckmc_pkcs12_load() - /// @see #ckmc_key_s - /// @see #ckmc_cert_s - /// @see #ckmc_cert_list_s - /// @see #ckmc_pkcs12_s - int ckmc_pkcs12_new( - ffi.Pointer private_key, - ffi.Pointer cert, - ffi.Pointer ca_cert_list, - ffi.Pointer> pkcs12_bundle, - ) { - return _ckmc_pkcs12_new( - private_key, - cert, - ca_cert_list, - pkcs12_bundle, - ); - } - - late final _ckmc_pkcs12_newPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('ckmc_pkcs12_new'); - late final _ckmc_pkcs12_new = _ckmc_pkcs12_newPtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4. @elseif WEARABLE 3.0. @endif [Use ckmc_pkcs12_load() instead] - /// @brief Creates a new #ckmc_key_s (@a private_key), #ckmc_cert_s (@a cert), and #ckmc_cert_list_s (@a ca_cert_list) handle from a given PKCS#12 file and returns them. - /// @since_tizen 2.3 - /// @remarks You must destroy the newly created #ckmc_key_s, #ckmc_cert_s, and - /// #ckmc_cert_list_s by calling ckmc_key_free(), ckmc_cert_free(), and - /// ckmc_cert_list_all_free() if they are no longer needed. - /// @param[in] file_path The path of PKCS12 file to be loaded - /// @param[in] passphrase The passphrase used to decrypt the PCKS12 file \n - /// If PKCS12 file is not encrypted, passphrase can be null - /// @param[out] private_key The pointer of newly created #ckmc_key_s handle for a private key - /// @param[out] cert The pointer of newly created #ckmc_cert_s handle for a certificate \n - /// It is null if the PKCS12 file does not contain a certificate - /// @param[out] ca_cert_list The pointer of newly created #ckmc_cert_list_s handle for CA certificates \n - /// It is null if the PKCS12 file does not contain CA certificates - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_OUT_OF_MEMORY Not enough memory space - /// @retval #CKMC_ERROR_INVALID_FORMAT Invalid PKCS12 file format - /// @retval #CKMC_ERROR_FILE_ACCESS_DENIED Provided file does not exist or cannot be accessed - /// @see ckmc_pkcs12_new() - /// @see ckmc_pkcs12_load() - /// @see ckmc_key_free() - /// @see ckmc_cert_free() - /// @see ckmc_cert_list_all_free() - /// @see #ckmc_key_s - /// @see #ckmc_cert_s - /// @see #ckmc_cert_list_s - int ckmc_load_from_pkcs12_file( - ffi.Pointer file_path, - ffi.Pointer passphrase, - ffi.Pointer> private_key, - ffi.Pointer> cert, - ffi.Pointer> ca_cert_list, - ) { - return _ckmc_load_from_pkcs12_file( - file_path, - passphrase, - private_key, - cert, - ca_cert_list, - ); - } - - late final _ckmc_load_from_pkcs12_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer>)>>( - 'ckmc_load_from_pkcs12_file'); - late final _ckmc_load_from_pkcs12_file = - _ckmc_load_from_pkcs12_filePtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer>)>(); - - /// @brief Creates a new #ckmc_pkcs12_s handle from a given PKCS#12 file and returns it. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks You must destroy the newly created #ckmc_pkcs12_s by calling ckmc_pkcs12_free() if they are no longer needed. - /// @param[in] file_path The path of PKCS12 file to be loaded - /// @param[in] passphrase The passphrase used to decrypt the PCKS12 file \n - /// If PKCS12 file is not encrypted, passphrase can be null - /// @param[out] pkcs12_bundle The pointer of newly created #ckmc_cert_list_s handle for CA certificates \n - /// It is null if the PKCS12 file does not contain CA certificates - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_OUT_OF_MEMORY Not enough memory space - /// @retval #CKMC_ERROR_INVALID_FORMAT Invalid PKCS12 file format - /// @retval #CKMC_ERROR_FILE_ACCESS_DENIED Provided file does not exist or cannot be accessed - /// @see ckmc_pkcs12_free() - /// @see #ckmc_pkcs12_s - int ckmc_pkcs12_load( - ffi.Pointer file_path, - ffi.Pointer passphrase, - ffi.Pointer> pkcs12_bundle, - ) { - return _ckmc_pkcs12_load( - file_path, - passphrase, - pkcs12_bundle, - ); - } - - late final _ckmc_pkcs12_loadPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('ckmc_pkcs12_load'); - late final _ckmc_pkcs12_load = _ckmc_pkcs12_loadPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Destroys the #ckmc_pkcs12_s handle and releases all its resources. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] pkcs12 The #ckmc_pkcs12_s handle to destroy - /// @see ckmc_pkcs12_new() - /// @see ckmc_pkcs12_load() - void ckmc_pkcs12_free( - ffi.Pointer pkcs12, - ) { - return _ckmc_pkcs12_free( - pkcs12, - ); - } - - late final _ckmc_pkcs12_freePtr = _lookup< - ffi.NativeFunction)>>( - 'ckmc_pkcs12_free'); - late final _ckmc_pkcs12_free = _ckmc_pkcs12_freePtr - .asFunction)>(); - - /// @brief Creates a new #ckmc_alias_list_s handle and returns it. - /// The alias pointer in the returned #ckmc_alias_list_s handle points to the provided characters and next is null. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks You must destroy the newly created #ckmc_alias_list_s - /// by calling ckmc_alias_list_free() or ckmc_alias_list_all_free() if it is no longer needed. - /// @param[in] alias The first item to be set in the newly created #ckmc_alias_list_s - /// @param[out] ppalias_list The pointer to a newly created #ckmc_alias_list_s handle - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_OUT_OF_MEMORY Not enough memory - /// @see ckmc_alias_list_all_free() - /// @see #ckmc_alias_list_s - int ckmc_alias_list_new( - ffi.Pointer alias, - ffi.Pointer> ppalias_list, - ) { - return _ckmc_alias_list_new( - alias, - ppalias_list, - ); - } - - late final _ckmc_alias_list_newPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer>)>>( - 'ckmc_alias_list_new'); - late final _ckmc_alias_list_new = _ckmc_alias_list_newPtr.asFunction< - int Function(ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Creates a new #ckmc_alias_list_s handle, adds it to a previous #ckmc_alias_list_s and returns it. - /// The alias pointer in the returned #ckmc_alias_list_s handle points to the provided characters and next is null. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] previous The last #ckmc_alias_list_s handle to which a newly created #ckmc_alias_list_s is added - /// @param[in] alias The item to be set in the newly created #ckmc_alias_list_s - /// @param[out] pplast The pointer to a newly created and added #ckmc_alias_list_s handle - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_OUT_OF_MEMORY Not enough memory - /// @see ckmc_alias_list_all_free() - /// @see #ckmc_alias_list_s - int ckmc_alias_list_add( - ffi.Pointer previous, - ffi.Pointer alias, - ffi.Pointer> pplast, - ) { - return _ckmc_alias_list_add( - previous, - alias, - pplast, - ); - } - - late final _ckmc_alias_list_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>( - 'ckmc_alias_list_add'); - late final _ckmc_alias_list_add = _ckmc_alias_list_addPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Destroys the #ckmc_alias_list_s handle and releases resources of #ckmc_alias_list_s from the provided first handle cascadingly. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks It does not destroy an alias itself in #ckmc_alias_list_s. - /// @param[in] first The first #ckmc_alias_list_s handle to destroy - /// @see ckmc_alias_list_all_free() - /// @see #ckmc_alias_list_s - void ckmc_alias_list_free( - ffi.Pointer first, - ) { - return _ckmc_alias_list_free( - first, - ); - } - - late final _ckmc_alias_list_freePtr = _lookup< - ffi - .NativeFunction)>>( - 'ckmc_alias_list_free'); - late final _ckmc_alias_list_free = _ckmc_alias_list_freePtr - .asFunction)>(); - - /// @brief Destroys the #ckmc_alias_list_s handle and releases all its resources from the provided first handle cascadingly. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks It also destroys the alias in #ckmc_alias_list_s. - /// @param[in] first The first #ckmc_alias_list_s handle to destroy - /// @see #ckmc_alias_list_s - void ckmc_alias_list_all_free( - ffi.Pointer first, - ) { - return _ckmc_alias_list_all_free( - first, - ); - } - - late final _ckmc_alias_list_all_freePtr = _lookup< - ffi - .NativeFunction)>>( - 'ckmc_alias_list_all_free'); - late final _ckmc_alias_list_all_free = _ckmc_alias_list_all_freePtr - .asFunction)>(); - - /// @brief Creates a new #ckmc_cert_list_s handle and returns it. - /// The cert pointer in the returned #ckmc_cert_list_s handle points to the provided #ckmc_cert_s and next is null. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks You must destroy the newly created #ckmc_cert_list_s by calling ckmc_cert_list_free() or ckmc_cert_list_all_free() if it is no longer needed. - /// @param[in] cert The first item to be set in the newly created #ckmc_cert_list_s - /// @param[out] ppalias_list The pointer to a newly created #ckmc_alias_list_s handle - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_OUT_OF_MEMORY Not enough memory - /// @see ckmc_cert_list_all_free() - /// @see #ckmc_cert_list_s - int ckmc_cert_list_new( - ffi.Pointer cert, - ffi.Pointer> ppalias_list, - ) { - return _ckmc_cert_list_new( - cert, - ppalias_list, - ); - } - - late final _ckmc_cert_list_newPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer>)>>( - 'ckmc_cert_list_new'); - late final _ckmc_cert_list_new = _ckmc_cert_list_newPtr.asFunction< - int Function(ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Creates a new #ckmc_cert_list_s handle, adds it to a previous #ckmc_cert_list_s and returns it. - /// The cert pointer in the returned #ckmc_alias_list_s handle points to the provided #ckmc_cert_s and next is null. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] previous The last #ckmc_cert_list_s handle to which a newly created #ckmc_cert_list_s is added - /// @param[in] cert The item to be set in the newly created #ckmc_cert_list_s - /// @param[out] pplast The pointer to a newly created and added #ckmc_alias_list_s handle - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_OUT_OF_MEMORY Not enough memory - /// @see ckmc_cert_list_all_free() - /// @see #ckmc_cert_list_s - int ckmc_cert_list_add( - ffi.Pointer previous, - ffi.Pointer cert, - ffi.Pointer> pplast, - ) { - return _ckmc_cert_list_add( - previous, - cert, - pplast, - ); - } - - late final _ckmc_cert_list_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>( - 'ckmc_cert_list_add'); - late final _ckmc_cert_list_add = _ckmc_cert_list_addPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Destroys the #ckmc_cert_list_s handle and releases resources of #ckmc_cert_list_s from the provided first handle cascadingly. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks It does not destroy #ckmc_cert_s itself in #ckmc_cert_list_s. - /// @param[in] first The first #ckmc_cert_list_s handle to destroy - /// @see ckmc_cert_list_all_free() - /// @see #ckmc_cert_list_s - void ckmc_cert_list_free( - ffi.Pointer first, - ) { - return _ckmc_cert_list_free( - first, - ); - } - - late final _ckmc_cert_list_freePtr = _lookup< - ffi.NativeFunction)>>( - 'ckmc_cert_list_free'); - late final _ckmc_cert_list_free = _ckmc_cert_list_freePtr - .asFunction)>(); - - /// @brief Destroys the #ckmc_cert_list_s handle and releases all its resources from the provided first handle cascadingly. - /// @since_tizen 2.3 - /// @remarks It also destroys #ckmc_cert_s in #ckmc_cert_list_s. - /// @param[in] first The first #ckmc_cert_list_s handle to destroy - /// @see #ckmc_cert_list_s - void ckmc_cert_list_all_free( - ffi.Pointer first, - ) { - return _ckmc_cert_list_all_free( - first, - ); - } - - late final _ckmc_cert_list_all_freePtr = _lookup< - ffi.NativeFunction)>>( - 'ckmc_cert_list_all_free'); - late final _ckmc_cert_list_all_free = _ckmc_cert_list_all_freePtr - .asFunction)>(); - - /// @brief Creates new parameter list. - /// @since_tizen 3.0 - /// @remarks Caller is responsible for freeing it with ckmc_param_list_free(). - /// @param[in] pparams Double pointer to the handle of param list to which the newly created algorithm param list will be assigned - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @see ckmc_param_list_set_integer() - /// @see ckmc_param_list_set_buffer() - /// @see ckmc_param_list_free() - /// @see ckmc_generate_new_params() - /// @see #ckmc_param_list_h - /// @see #ckmc_param_name_e - /// @see #ckmc_algo_type_e - int ckmc_param_list_new( - ffi.Pointer pparams, - ) { - return _ckmc_param_list_new( - pparams, - ); - } - - late final _ckmc_param_list_newPtr = _lookup< - ffi.NativeFunction)>>( - 'ckmc_param_list_new'); - late final _ckmc_param_list_new = _ckmc_param_list_newPtr - .asFunction)>(); - - /// @brief Sets integer parameter to the list. - /// @since_tizen 3.0 - /// @remarks Caller is responsible for #ckmc_param_list_h creation. - /// @param[in] params Algorithm param list handle created with ckmc_param_list_new() or ckmc_generate_new_params() \n - /// New param with @a name and @a value will be set here - /// @param[in] name Name of parameter to set \n - /// Existing parameter will be overwritten \n - /// Passing invalid parameter name will result in an error - /// @param[in] value Value of the parameter in form of a integer - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @see ckmc_param_list_new() - /// @see ckmc_param_list_set_buffer() - /// @see ckmc_param_list_get_integer() - /// @see ckmc_param_list_get_buffer() - /// @see ckmc_param_list_free() - /// @see ckmc_generate_new_params() - /// @see #ckmc_param_list_h - /// @see #ckmc_param_name_e - /// @see #ckmc_algo_type_e - int ckmc_param_list_set_integer( - ckmc_param_list_h params, - int name, - int value, - ) { - return _ckmc_param_list_set_integer( - params, - name, - value, - ); - } - - late final _ckmc_param_list_set_integerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ckmc_param_list_h, ffi.Int32, - ffi.Uint64)>>('ckmc_param_list_set_integer'); - late final _ckmc_param_list_set_integer = _ckmc_param_list_set_integerPtr - .asFunction(); - - /// @brief Sets buffer parameter to the list. - /// @since_tizen 3.0 - /// @remarks Caller is responsible for #ckmc_param_list_h creation. - /// @param[in] params Algorithm param list handle created with ckmc_param_list_new() or ckmc_generate_new_params() - /// New param with @a name and @a buffer will be set here - /// @param[in] name Name of parameter to set \n - /// Existing parameter will be overwritten \n - /// Passing invalid parameter name will result in an error - /// @param[in] buffer Value of the parameter in form of a buffer \n - /// Caller is responsible for creating and freeing the buffer - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @see ckmc_param_list_new() - /// @see ckmc_param_list_set_integer() - /// @see ckmc_param_list_get_integer() - /// @see ckmc_param_list_get_buffer() - /// @see ckmc_param_list_free() - /// @see ckmc_generate_new_params() - /// @see #ckmc_param_list_h - /// @see #ckmc_param_name_e - /// @see #ckmc_algo_type_e - int ckmc_param_list_set_buffer( - ckmc_param_list_h params, - int name, - ffi.Pointer buffer, - ) { - return _ckmc_param_list_set_buffer( - params, - name, - buffer, - ); - } - - late final _ckmc_param_list_set_bufferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ckmc_param_list_h, ffi.Int32, - ffi.Pointer)>>('ckmc_param_list_set_buffer'); - late final _ckmc_param_list_set_buffer = - _ckmc_param_list_set_bufferPtr.asFunction< - int Function( - ckmc_param_list_h, int, ffi.Pointer)>(); - - /// @brief Gets integer parameter from the list. - /// @since_tizen 3.0 - /// @remarks Caller is responsible for #ckmc_param_list_h creation. - /// @param[in] params Algorithm param list handle created with ckmc_param_list_new() or ckmc_generate_new_params() - /// which contains param with @a name - /// @param[in] name Name of parameter to get - /// @param[out] pvalue Value of the parameter in form of a integer - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @see ckmc_param_list_new() - /// @see ckmc_param_list_set_integer() - /// @see ckmc_param_list_set_buffer() - /// @see ckmc_param_list_get_buffer() - /// @see ckmc_param_list_free() - /// @see ckmc_generate_new_params() - /// @see #ckmc_param_list_h - /// @see #ckmc_param_name_e - /// @see #ckmc_algo_type_e - int ckmc_param_list_get_integer( - ckmc_param_list_h params, - int name, - ffi.Pointer pvalue, - ) { - return _ckmc_param_list_get_integer( - params, - name, - pvalue, - ); - } - - late final _ckmc_param_list_get_integerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ckmc_param_list_h, ffi.Int32, - ffi.Pointer)>>('ckmc_param_list_get_integer'); - late final _ckmc_param_list_get_integer = - _ckmc_param_list_get_integerPtr.asFunction< - int Function(ckmc_param_list_h, int, ffi.Pointer)>(); - - /// @brief Gets buffer parameter from the list. - /// @since_tizen 3.0 - /// @remarks Caller is responsible for #ckmc_param_list_h creation. - /// @param[in] params Algorithm param list handle created with ckmc_param_list_new() or ckmc_generate_new_params() - /// which contains param with @a name - /// @param[in] name Name of parameter to get - /// @param[out] ppbuffer Value of the parameter in form of a buffer \n - /// Caller is responsible for creating and freeing the buffer - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @see ckmc_param_list_new() - /// @see ckmc_param_list_set_integer() - /// @see ckmc_param_list_set_buffer() - /// @see ckmc_param_list_get_integer() - /// @see ckmc_param_list_free() - /// @see ckmc_generate_new_params() - /// @see ckmc_buffer_free() - /// @see #ckmc_param_list_h - /// @see #ckmc_param_name_e - /// @see #ckmc_algo_type_e - int ckmc_param_list_get_buffer( - ckmc_param_list_h params, - int name, - ffi.Pointer> ppbuffer, - ) { - return _ckmc_param_list_get_buffer( - params, - name, - ppbuffer, - ); - } - - late final _ckmc_param_list_get_bufferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ckmc_param_list_h, ffi.Int32, - ffi.Pointer>)>>( - 'ckmc_param_list_get_buffer'); - late final _ckmc_param_list_get_buffer = - _ckmc_param_list_get_bufferPtr.asFunction< - int Function(ckmc_param_list_h, int, - ffi.Pointer>)>(); - - /// @brief Frees previously allocated list of algorithm params. - /// @since_tizen 3.0 - /// @param[in] params First element of the list to be freed - /// @see ckmc_param_list_new() - /// @see ckmc_param_list_set_integer() - /// @see ckmc_param_list_set_buffer() - /// @see ckmc_param_list_get_integer() - /// @see ckmc_param_list_get_buffer() - /// @see ckmc_generate_new_params() - /// @see #ckmc_param_list_h - /// @see #ckmc_param_name_e - /// @see #ckmc_algo_type_e - void ckmc_param_list_free( - ckmc_param_list_h params, - ) { - return _ckmc_param_list_free( - params, - ); - } - - late final _ckmc_param_list_freePtr = - _lookup>( - 'ckmc_param_list_free'); - late final _ckmc_param_list_free = - _ckmc_param_list_freePtr.asFunction(); - - /// @brief Generates algorithm parameters for a given algorithm type and set them to the list. - /// @since_tizen 3.0 - /// @remarks Caller is responsible for #ckmc_param_list_h destruction. - /// @remarks Algorithm parameters are set to default values. Optional fields are left empty. - /// Initialization vectors are left empty (they have to be set manually). - /// Caller is responsible for freeing the list with ckmc_param_list_free(). - /// @remarks If the function returns error, provided param list may contain some of default parameters. - /// @param[in] type Type of the algorithm - /// @param[out] pparams Newly generated handle of param list which should be freed by caller after use - /// @return #CKMC_ERROR_NONE on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @see ckmc_param_list_new() - /// @see ckmc_param_list_set_integer() - /// @see ckmc_param_list_set_buffer() - /// @see ckmc_param_list_get_integer() - /// @see ckmc_param_list_get_buffer() - /// @see ckmc_param_list_free() - /// @see #ckmc_param_list_h - /// @see #ckmc_param_name_e - /// @see #ckmc_algo_type_e - int ckmc_generate_new_params( - int type, - ffi.Pointer pparams, - ) { - return _ckmc_generate_new_params( - type, - pparams, - ); - } - - late final _ckmc_generate_new_paramsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, - ffi.Pointer)>>('ckmc_generate_new_params'); - late final _ckmc_generate_new_params = _ckmc_generate_new_paramsPtr - .asFunction)>(); - - /// @brief Stores a key inside key manager based on the provided policy. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks Currently API supports seven types of keys. These are RSA public/private key, DSA public/private key, ECDSA public/private key, and AES symmetric key. - /// @remarks key_type in key may be set to #CKMC_KEY_NONE as an input. key_type is determined inside key manager during storing keys. - /// @remarks Some private key files are protected by a password. If raw_key in key read from those encrypted files is encrypted with a password, the password should be provided in the #ckmc_key_s structure. - /// @remarks If password in policy is provided, the key is additionally encrypted with the password in the policy. - /// @param[in] alias The name of a key to be stored - /// @param[in] key The key's binary value to be stored - /// @param[in] policy The policy about how to store a key securely - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ALIAS_EXISTS Alias already exists - /// @retval #CKMC_ERROR_INVALID_FORMAT The format of raw_key is not valid - /// @retval #CKMC_ERROR_DB_ERROR Failed due to a database error - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_remove_alias() - /// @see ckmc_get_key() - /// @see ckmc_get_key_alias_list() - /// @see #ckmc_key_s - /// @see #ckmc_policy_s - int ckmc_save_key( - ffi.Pointer alias, - ckmc_key_s key, - ckmc_policy_s policy, - ) { - return _ckmc_save_key( - alias, - key, - policy, - ); - } - - late final _ckmc_save_keyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ckmc_key_s, - ckmc_policy_s)>>('ckmc_save_key'); - late final _ckmc_save_key = _ckmc_save_keyPtr.asFunction< - int Function(ffi.Pointer, ckmc_key_s, ckmc_policy_s)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4. @elseif WEARABLE 3.0. @endif [Use ckmc_remove_alias() instead] - /// @brief Removes a key from key manager. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks To remove key, client must have remove permission to the specified key. - /// @remarks The key owner can remove by default. - /// @param[in] alias The name of a key to be removed - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to a database error - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_save_key() - /// @see ckmc_get_key() - /// @see ckmc_get_key_alias_list() - int ckmc_remove_key( - ffi.Pointer alias, - ) { - return _ckmc_remove_key( - alias, - ); - } - - late final _ckmc_remove_keyPtr = - _lookup)>>( - 'ckmc_remove_key'); - late final _ckmc_remove_key = - _ckmc_remove_keyPtr.asFunction)>(); - - /// @brief Gets a key from key manager. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks A client can access only data stored by the client. - /// @remarks You must destroy the newly created @a ppkey by calling ckmc_key_free() if it is no longer needed. - /// @param[in] alias The name of a key to retrieve - /// @param[in] password The password used in decrypting a key value \n - /// If password of policy is provided in ckmc_save_key(), the same password should be provided - /// @param[out] ppkey The pointer to a newly created ckmc_key_s handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to a database error - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @retval #CKMC_ERROR_AUTHENTICATION_FAILED Decryption failed because password is incorrect - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_save_key() - /// @see ckmc_remove_alias() - /// @see ckmc_get_key_alias_list() - int ckmc_get_key( - ffi.Pointer alias, - ffi.Pointer password, - ffi.Pointer> ppkey, - ) { - return _ckmc_get_key( - alias, - password, - ppkey, - ); - } - - late final _ckmc_get_keyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('ckmc_get_key'); - late final _ckmc_get_key = _ckmc_get_keyPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets all the alias of keys that the client can access. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks A client can access only data stored by the client. - /// @remarks You must destroy the newly created @a ppalias_list by calling ckmc_alias_list_all_free() - /// if it is no longer needed. - /// @param[out] ppalias_list The pointer to a newly created ckmc_alias_list_s handle containing all - /// available alias of keys \n - /// If there is no available key alias, *ppalias_list will be null - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to a database error - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_save_key() - /// @see ckmc_remove_alias() - /// @see ckmc_get_key() - int ckmc_get_key_alias_list( - ffi.Pointer> ppalias_list, - ) { - return _ckmc_get_key_alias_list( - ppalias_list, - ); - } - - late final _ckmc_get_key_alias_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>)>>( - 'ckmc_get_key_alias_list'); - late final _ckmc_get_key_alias_list = _ckmc_get_key_alias_listPtr - .asFunction>)>(); - - /// @brief Stores a certificate inside key manager based on the provided policy. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0 - /// @remarks The certificate's binary value will be converted and saved as binary DER encoded certificates. - /// @param[in] alias The name of a certificate to be stored - /// @param[in] cert The certificate's binary value to be stored - /// @param[in] policy The policy about how to store a certificate securely - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ALIAS_EXISTS Alias already exists - /// @retval #CKMC_ERROR_INVALID_FORMAT The format of raw_cert is not valid - /// @retval #CKMC_ERROR_DB_ERROR Failed due to a database error - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_remove_alias() - /// @see ckmc_get_cert() - /// @see ckmc_get_cert_alias_list() - /// @see #ckmc_cert_s - /// @see #ckmc_policy_s - int ckmc_save_cert( - ffi.Pointer alias, - ckmc_cert_s cert, - ckmc_policy_s policy, - ) { - return _ckmc_save_cert( - alias, - cert, - policy, - ); - } - - late final _ckmc_save_certPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ckmc_cert_s, - ckmc_policy_s)>>('ckmc_save_cert'); - late final _ckmc_save_cert = _ckmc_save_certPtr.asFunction< - int Function(ffi.Pointer, ckmc_cert_s, ckmc_policy_s)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4. @elseif WEARABLE 3.0. @endif [Use ckmc_remove_alias() instead] - /// @brief Removes a certificate from key manager. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks To remove certificate, client must have remove permission to the specified certificate. - /// @remarks The key owner can remove by default. - /// @param[in] alias The name of a certificate to be removed - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to a database error - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_save_cert() - /// @see ckmc_get_cert() - /// @see ckmc_get_cert_alias_list() - int ckmc_remove_cert( - ffi.Pointer alias, - ) { - return _ckmc_remove_cert( - alias, - ); - } - - late final _ckmc_remove_certPtr = - _lookup)>>( - 'ckmc_remove_cert'); - late final _ckmc_remove_cert = - _ckmc_remove_certPtr.asFunction)>(); - - /// @brief Gets a certificate from key manager. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks A client can access only certificate stored by the client. - /// @remarks A DER encoded certificate will be returned as a return value. - /// @remarks You must destroy the newly created @a ppcert by calling ckmc_cert_free() if it is no longer needed. - /// @param[in] alias The name of a certificate to retrieve - /// @param[in] password The password used in decrypting a certificate value \n - /// If password of policy is provided in ckmc_save_cert(), the same password - /// should be provided - /// @param[out] ppcert The pointer to a newly created ckmc_cert_s handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to a database error - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exists - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @retval #CKMC_ERROR_AUTHENTICATION_FAILED Decryption failed because password is incorrect - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_save_cert() - /// @see ckmc_remove_alias() - /// @see ckmc_get_cert_alias_list() - int ckmc_get_cert( - ffi.Pointer alias, - ffi.Pointer password, - ffi.Pointer> ppcert, - ) { - return _ckmc_get_cert( - alias, - password, - ppcert, - ); - } - - late final _ckmc_get_certPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('ckmc_get_cert'); - late final _ckmc_get_cert = _ckmc_get_certPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets all alias of certificates which the client can access. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks A client can access only data stored by the client. - /// @remarks You must destroy the newly created @a ppalias_list by calling ckmc_alias_list_all_free() if it is no longer needed. - /// @param[out] ppalias_list The pointer to a newly created ckmc_alias_list_s handle containing all available alias of keys \n - /// If there is no available key alias, *ppalias_list will be null - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to a database error - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_save_cert() - /// @see ckmc_remove_alias() - /// @see ckmc_get_cert() - int ckmc_get_cert_alias_list( - ffi.Pointer> ppalias_list, - ) { - return _ckmc_get_cert_alias_list( - ppalias_list, - ); - } - - late final _ckmc_get_cert_alias_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>)>>( - 'ckmc_get_cert_alias_list'); - late final _ckmc_get_cert_alias_list = _ckmc_get_cert_alias_listPtr - .asFunction>)>(); - - /// @brief Stores PKCS12's contents inside key manager based on the provided policies. All items from the PKCS12 will use the same alias. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @param[in] alias The name of a data to be stored - /// @param[in] pkcs Pointer to the pkcs12 structure to be saved - /// @param[in] key_policy The policy about how to store pkcs's private key - /// @param[in] cert_policy The policy about how to store pkcs's certificate - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ALIAS_EXISTS Alias already exists - /// @retval #CKMC_ERROR_DB_ERROR Failed due to a database error - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_remove_alias() - /// @see ckmc_get_pkcs12() - /// @see ckmc_get_data_alias_list() - /// @see ckmc_pkcs12_load() - /// @see #ckmc_pkcs12_s - /// @see #ckmc_policy_s - int ckmc_save_pkcs12( - ffi.Pointer alias, - ffi.Pointer pkcs, - ckmc_policy_s key_policy, - ckmc_policy_s cert_policy, - ) { - return _ckmc_save_pkcs12( - alias, - pkcs, - key_policy, - cert_policy, - ); - } - - late final _ckmc_save_pkcs12Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ckmc_policy_s, ckmc_policy_s)>>('ckmc_save_pkcs12'); - late final _ckmc_save_pkcs12 = _ckmc_save_pkcs12Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ckmc_policy_s, ckmc_policy_s)>(); - - /// @brief Gets a pkcs12 from key manager. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks A client can access only data stored by the client. - /// @remarks You must destroy the newly created @a pkcs12 by calling ckmc_pkcs12_free() if it is no longer needed. - /// @param[in] alias The name of a data to retrieve - /// @param[in] key_password Password that was used to encrypt privateKey (may be NULL) - /// @param[in] cert_password Password used to encrypt certificates (may be NULL) - /// @param[out] pkcs12 The pointer to a newly created ckmc_pkcs12_s handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to a database error - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @retval #CKMC_ERROR_AUTHENTICATION_FAILED key_password or cert_password does not match with password used to encrypt data - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_save_pkcs12() - /// @see ckmc_remove_alias() - int ckmc_get_pkcs12( - ffi.Pointer alias, - ffi.Pointer key_password, - ffi.Pointer cert_password, - ffi.Pointer> pkcs12, - ) { - return _ckmc_get_pkcs12( - alias, - key_password, - cert_password, - pkcs12, - ); - } - - late final _ckmc_get_pkcs12Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('ckmc_get_pkcs12'); - late final _ckmc_get_pkcs12 = _ckmc_get_pkcs12Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Stores a data inside key manager based on the provided policy. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @param[in] alias The name of a data to be stored - /// @param[in] data The binary value to be stored - /// @param[in] policy The policy about how to store a data securely - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ALIAS_EXISTS Alias already exists - /// @retval #CKMC_ERROR_DB_ERROR Failed due to a database error - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_remove_alias() - /// @see ckmc_get_data() - /// @see ckmc_get_data_alias_list() - /// @see #ckmc_raw_buffer_s - /// @see #ckmc_policy_s - int ckmc_save_data( - ffi.Pointer alias, - ckmc_raw_buffer_s data, - ckmc_policy_s policy, - ) { - return _ckmc_save_data( - alias, - data, - policy, - ); - } - - late final _ckmc_save_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ckmc_raw_buffer_s, - ckmc_policy_s)>>('ckmc_save_data'); - late final _ckmc_save_data = _ckmc_save_dataPtr.asFunction< - int Function(ffi.Pointer, ckmc_raw_buffer_s, ckmc_policy_s)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4. @elseif WEARABLE 3.0. @endif [Use ckmc_remove_alias() instead] - /// @brief Removes a data from key manager. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks To remove data, client must have remove permission to the specified data object. - /// @remarks The data owner can remove by default. - /// @param[in] alias The name of a data to be removed - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to the error with unknown reason - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_save_data() - /// @see ckmc_get_data() - /// @see ckmc_get_data_alias_list() - int ckmc_remove_data( - ffi.Pointer alias, - ) { - return _ckmc_remove_data( - alias, - ); - } - - late final _ckmc_remove_dataPtr = - _lookup)>>( - 'ckmc_remove_data'); - late final _ckmc_remove_data = - _ckmc_remove_dataPtr.asFunction)>(); - - /// @brief Gets a data from key manager. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks A client can access only data stored by the client. - /// @remarks You must destroy the newly created @a ppdata by calling ckmc_buffer_free() if it is no longer needed. - /// @param[in] alias The name of a data to retrieve - /// @param[in] password The password used in decrypting a data value \n - /// If password of policy is provided in ckmc_save_data(), the same password - /// should be provided - /// @param[out] ppdata The pointer to a newly created ckmc_raw_buffer_s handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to the error with unknown reason - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @retval #CKMC_ERROR_AUTHENTICATION_FAILED Decryption failed because password is incorrect - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_save_data() - /// @see ckmc_remove_alias() - /// @see ckmc_get_data_alias_list() - int ckmc_get_data( - ffi.Pointer alias, - ffi.Pointer password, - ffi.Pointer> ppdata, - ) { - return _ckmc_get_data( - alias, - password, - ppdata, - ); - } - - late final _ckmc_get_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('ckmc_get_data'); - late final _ckmc_get_data = _ckmc_get_dataPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets all alias of data which the client can access. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks A client can access only data stored by the client. - /// @remarks You must destroy the newly created @a ppalias_list by calling ckmc_alias_list_all_free() if it is no longer needed. - /// @param[out] ppalias_list The pointer to a newly created ckmc_alias_list_s handle containing all available alias of keys \n - /// If there is no available key alias, *ppalias_list will be null - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to the error with unknown reason - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_save_data() - /// @see ckmc_remove_alias() - /// @see ckmc_get_data() - int ckmc_get_data_alias_list( - ffi.Pointer> ppalias_list, - ) { - return _ckmc_get_data_alias_list( - ppalias_list, - ); - } - - late final _ckmc_get_data_alias_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>)>>( - 'ckmc_get_data_alias_list'); - late final _ckmc_get_data_alias_list = _ckmc_get_data_alias_listPtr - .asFunction>)>(); - - /// @brief Creates RSA private/public key pair and stores them inside key manager based on each policy. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks If password in the policy is provided, the key is additionally encrypted with the password in the policy. - /// @param[in] size The size of key strength to be created \n - /// @c 1024, @c 2048, and @c 4096 are supported - /// @param[in] private_key_alias The name of private key to be stored - /// @param[in] public_key_alias The name of public key to be stored - /// @param[in] policy_private_key The policy about how to store a private key securely - /// @param[in] policy_public_key The policy about how to store a public key securely - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ALIAS_EXISTS Alias already exists - /// @retval #CKMC_ERROR_DB_ERROR Failed due to other DB transaction unexpectedly - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_create_key_pair_dsa() - /// @see ckmc_create_key_pair_ecdsa() - /// @see ckmc_create_signature() - /// @see ckmc_verify_signature() - int ckmc_create_key_pair_rsa( - int size, - ffi.Pointer private_key_alias, - ffi.Pointer public_key_alias, - ckmc_policy_s policy_private_key, - ckmc_policy_s policy_public_key, - ) { - return _ckmc_create_key_pair_rsa( - size, - private_key_alias, - public_key_alias, - policy_private_key, - policy_public_key, - ); - } - - late final _ckmc_create_key_pair_rsaPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Size, - ffi.Pointer, - ffi.Pointer, - ckmc_policy_s, - ckmc_policy_s)>>('ckmc_create_key_pair_rsa'); - late final _ckmc_create_key_pair_rsa = - _ckmc_create_key_pair_rsaPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, - ckmc_policy_s, ckmc_policy_s)>(); - - /// @brief Creates DSA private/public key pair and stores them inside key manager based on each policy. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks If password in the policy is provided, the key is additionally encrypted with the password in the policy. - /// @param[in] size The size of key strength to be created \n - /// @c 1024, @c 2048, @c 3072 and @c 4096 are supported - /// @param[in] private_key_alias The name of private key to be stored - /// @param[in] public_key_alias The name of public key to be stored - /// @param[in] policy_private_key The policy about how to store a private key securely - /// @param[in] policy_public_key The policy about how to store a public key securely - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ALIAS_EXISTS Alias already exists - /// @retval #CKMC_ERROR_DB_ERROR Failed due to other DB transaction unexpectedly - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_create_key_pair_rsa() - /// @see ckmc_create_key_pair_ecdsa() - /// @see ckmc_create_signature() - /// @see ckmc_verify_signature() - int ckmc_create_key_pair_dsa( - int size, - ffi.Pointer private_key_alias, - ffi.Pointer public_key_alias, - ckmc_policy_s policy_private_key, - ckmc_policy_s policy_public_key, - ) { - return _ckmc_create_key_pair_dsa( - size, - private_key_alias, - public_key_alias, - policy_private_key, - policy_public_key, - ); - } - - late final _ckmc_create_key_pair_dsaPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Size, - ffi.Pointer, - ffi.Pointer, - ckmc_policy_s, - ckmc_policy_s)>>('ckmc_create_key_pair_dsa'); - late final _ckmc_create_key_pair_dsa = - _ckmc_create_key_pair_dsaPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, - ckmc_policy_s, ckmc_policy_s)>(); - - /// @brief Creates ECDSA private/public key pair and stores them inside key manager based on each policy. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks If password in the policy is provided, the key is additionally encrypted with the password in the policy. - /// @param[in] type The type of elliptic curve of ECDSA - /// @param[in] private_key_alias The name of private key to be stored - /// @param[in] public_key_alias The name of public key to be stored - /// @param[in] policy_private_key The policy about how to store a private key securely - /// @param[in] policy_public_key The policy about how to store a public key securely - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ALIAS_EXISTS Alias already exists - /// @retval #CKMC_ERROR_DB_ERROR Failed due to other DB transaction unexpectedly - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_create_key_pair_rsa() - /// @see ckmc_create_key_pair_dsa() - /// @see ckmc_create_signature() - /// @see ckmc_verify_signature() - /// @see #ckmc_ec_type_e - int ckmc_create_key_pair_ecdsa( - int type, - ffi.Pointer private_key_alias, - ffi.Pointer public_key_alias, - ckmc_policy_s policy_private_key, - ckmc_policy_s policy_public_key, - ) { - return _ckmc_create_key_pair_ecdsa( - type, - private_key_alias, - public_key_alias, - policy_private_key, - policy_public_key, - ); - } - - late final _ckmc_create_key_pair_ecdsaPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ckmc_policy_s, - ckmc_policy_s)>>('ckmc_create_key_pair_ecdsa'); - late final _ckmc_create_key_pair_ecdsa = - _ckmc_create_key_pair_ecdsaPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, - ckmc_policy_s, ckmc_policy_s)>(); - - /// @brief Creates AES key and stores it inside key manager based on the policy. - /// @since_tizen 3.0 - /// @remarks If password in the policy is provided, the key is additionally encrypted with the password in the policy. - /// @param[in] size The size of key strength to be created \n - /// @c 128, @c 192 and @c 256 are supported - /// @param[in] key_alias The name of key to be stored - /// @param[in] key_policy The policy about how to store the key securely - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ALIAS_EXISTS Alias already exists - /// @retval #CKMC_ERROR_DB_ERROR Failed due to other DB transaction unexpectedly - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_create_key_pair_rsa() - /// @see ckmc_create_key_pair_dsa() - /// @see ckmc_create_key_pair_ecdsa() - /// @see #ckmc_policy_s - int ckmc_create_key_aes( - int size, - ffi.Pointer key_alias, - ckmc_policy_s key_policy, - ) { - return _ckmc_create_key_aes( - size, - key_alias, - key_policy, - ); - } - - late final _ckmc_create_key_aesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Size, ffi.Pointer, - ckmc_policy_s)>>('ckmc_create_key_aes'); - late final _ckmc_create_key_aes = _ckmc_create_key_aesPtr - .asFunction, ckmc_policy_s)>(); - - /// @brief Creates a signature on a given message using a private key and returns the signature. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks If password of policy is provided during storing a key, the same password should be provided. - /// @remarks You must destroy the newly created @a ppsignature by calling ckmc_buffer_free() if it is no longer needed. - /// @param[in] private_key_alias The name of private key - /// @param[in] password The password used in decrypting a private key value - /// @param[in] message The message that is signed with a private key - /// @param[in] hash The hash algorithm used in creating signature - /// @param[in] padding The RSA padding algorithm used in creating signature \n - /// It is used only when the signature algorithm is RSA. If - /// @a padding is CKMC_NONE_PADDING you must use CKMC_HASH_NONE - /// and the message must be equal to key length - /// @param[out] ppsignature The pointer to a newly created signature \n - /// If an error occurs, @a *ppsignature will be null - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to the error with unknown reason - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @retval #CKMC_ERROR_AUTHENTICATION_FAILED Decryption failed because password is incorrect - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_create_key_pair_rsa() - /// @see ckmc_create_key_pair_ecdsa() - /// @see ckmc_verify_signature() - /// @see ckmc_buffer_free() - /// @see #ckmc_hash_algo_e - /// @see #ckmc_rsa_padding_algo_e - int ckmc_create_signature( - ffi.Pointer private_key_alias, - ffi.Pointer password, - ckmc_raw_buffer_s message, - int hash, - int padding, - ffi.Pointer> ppsignature, - ) { - return _ckmc_create_signature( - private_key_alias, - password, - message, - hash, - padding, - ppsignature, - ); - } - - late final _ckmc_create_signaturePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ckmc_raw_buffer_s, - ffi.Int32, - ffi.Int32, - ffi.Pointer>)>>( - 'ckmc_create_signature'); - late final _ckmc_create_signature = _ckmc_create_signaturePtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ckmc_raw_buffer_s, - int, - int, - ffi.Pointer>)>(); - - /// @brief Verifies a given signature on a given message using a public key and returns the signature status. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks If password of policy is provided during storing a key, the same password should be provided. - /// @param[in] public_key_alias The name of public key - /// @param[in] password The password used in decrypting a public key value - /// @param[in] message The input on which the signature is created - /// @param[in] signature The signature that is verified with public key - /// @param[in] hash The hash algorithm used in verifying signature - /// @param[in] padding The RSA padding algorithm used in verifying signature \n - /// It is used only when the signature algorithm is RSA. If - /// @a padding is CKMC_NONE_PADDING you must use CKMC_HASH_NONE - /// and the message must be equal to key length - /// @return @c 0 on success and the signature is valid, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_VERIFICATION_FAILED The signature is invalid - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to the error with unknown reason - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @retval #CKMC_ERROR_AUTHENTICATION_FAILED Decryption failed because password is incorrect - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_create_key_pair_rsa() - /// @see ckmc_create_key_pair_ecdsa() - /// @see ckmc_verify_signature() - /// @see #ckmc_hash_algo_e - /// @see #ckmc_rsa_padding_algo_e - int ckmc_verify_signature( - ffi.Pointer public_key_alias, - ffi.Pointer password, - ckmc_raw_buffer_s message, - ckmc_raw_buffer_s signature, - int hash, - int padding, - ) { - return _ckmc_verify_signature( - public_key_alias, - password, - message, - signature, - hash, - padding, - ); - } - - late final _ckmc_verify_signaturePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ckmc_raw_buffer_s, - ckmc_raw_buffer_s, - ffi.Int32, - ffi.Int32)>>('ckmc_verify_signature'); - late final _ckmc_verify_signature = _ckmc_verify_signaturePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ckmc_raw_buffer_s, ckmc_raw_buffer_s, int, int)>(); - - /// @brief Verifies a certificate chain and returns that chain. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks The trusted root certificate of the chain should exist in the system's certificate storage. - /// @remarks You must destroy the newly created @a ppcert_chain_list by calling ckmc_cert_list_all_free() if it is no longer needed. - /// @param[in] cert The certificate to be verified - /// @param[in] untrustedcerts The untrusted CA certificates to be used in verifying a certificate chain - /// @param[out] ppcert_chain_list The pointer to a newly created certificate chain's handle \n - /// If an error occurs, @a *ppcert_chain_list will be null - /// @return @c 0 on success and the signature is valid, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_VERIFICATION_FAILED The certificate chain is not valid - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to the error with unknown reason - /// @retval #CKMC_ERROR_INVALID_FORMAT The format of certificate is not valid - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @retval #CKMC_ERROR_AUTHENTICATION_FAILED Decryption failed because password is incorrect - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_cert_list_all_free() - int ckmc_get_cert_chain( - ffi.Pointer cert, - ffi.Pointer untrustedcerts, - ffi.Pointer> ppcert_chain_list, - ) { - return _ckmc_get_cert_chain( - cert, - untrustedcerts, - ppcert_chain_list, - ); - } - - late final _ckmc_get_cert_chainPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>( - 'ckmc_get_cert_chain'); - late final _ckmc_get_cert_chain = _ckmc_get_cert_chainPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4. @elseif WEARABLE 3.0. @endif [Use ckmc_get_cert_chain() instead] - /// @brief Verifies a certificate chain using an alias list of untrusted certificates and return that chain. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks The trusted root certificate of the chain should exist in the system's certificate storage. - /// @remarks You must destroy the newly created @a ppcert_chain_list by calling ckmc_cert_list_all_free() if it is no longer needed. - /// @remarks @a untrustedcerts shouldn't be protected with optional password. - /// @param[in] cert The certificate to be verified - /// @param[in] untrustedcerts The alias list of untrusted CA certificates stored in key manager to be used in verifying a certificate chain - /// @param[out] ppcert_chain_list The pointer to a newly created certificate chain's handle \n - /// If an error occurs, @a *ppcert_chain_list will be null - /// @return @c 0 on success and the signature is valid, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_VERIFICATION_FAILED The certificate chain is not valid - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to the error with unknown reason - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_INVALID_FORMAT The format of certificate is not valid - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @retval #CKMC_ERROR_AUTHENTICATION_FAILED Some certificates were encrypted with password and could not be used - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_get_cert_chain() - /// @see ckmc_cert_list_all_free() - int ckmc_get_cert_chain_with_alias( - ffi.Pointer cert, - ffi.Pointer untrustedcerts, - ffi.Pointer> ppcert_chain_list, - ) { - return _ckmc_get_cert_chain_with_alias( - cert, - untrustedcerts, - ppcert_chain_list, - ); - } - - late final _ckmc_get_cert_chain_with_aliasPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>( - 'ckmc_get_cert_chain_with_alias'); - late final _ckmc_get_cert_chain_with_alias = - _ckmc_get_cert_chain_with_aliasPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Verifies a certificate chain and returns that chain using user-entered, trusted, and untrusted CA certificates. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks If the trusted root certificates are provided as a user input, these certificates do not need to exist in the system's certificate storage. - /// @remarks You must destroy the newly created @a ppcert_chain_list by calling ckmc_cert_list_all_free() if it is no longer needed. - /// @param[in] cert The certificate to be verified - /// @param[in] untrustedcerts The untrusted CA certificates to be used in verifying a certificate chain - /// @param[in] trustedcerts The trusted CA certificates to be used in verifying a certificate chain - /// @param[in] use_trustedsystemcerts The flag indicating the use of the trusted root certificates in the system's certificate storage - /// @param[out] ppcert_chain_list The pointer to a newly created certificate chain's handle \n - /// If an error occurs, @a *ppcert_chain_list will be null - /// @return @c 0 on success and the signature is valid, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_VERIFICATION_FAILED The certificate chain is not valid - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to the error with unknown reason - /// @retval #CKMC_ERROR_INVALID_FORMAT The format of certificate is not valid - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_cert_list_all_free() - int ckmc_get_cert_chain_with_trustedcert( - ffi.Pointer cert, - ffi.Pointer untrustedcerts, - ffi.Pointer trustedcerts, - bool use_trustedsystemcerts, - ffi.Pointer> ppcert_chain_list, - ) { - return _ckmc_get_cert_chain_with_trustedcert( - cert, - untrustedcerts, - trustedcerts, - use_trustedsystemcerts, - ppcert_chain_list, - ); - } - - late final _ckmc_get_cert_chain_with_trustedcertPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer>)>>( - 'ckmc_get_cert_chain_with_trustedcert'); - late final _ckmc_get_cert_chain_with_trustedcert = - _ckmc_get_cert_chain_with_trustedcertPtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer>)>(); - - /// @brief Perform OCSP that checks certificate is whether revoked or not. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/internet - /// @remarks %http://tizen.org/privilege/internet (public level privilege) is required to use this API instead of %http://tizen.org/privilege/keymanager (public level privilege) since 3.0. - /// @param[in] pcert_chain_list Valid certificate chain to perform OCSP check - /// @param[out] ocsp_status The pointer to status result of OCSP check - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @retval #CKMC_ERROR_NOT_SUPPORTED Device needed to run API is not supported - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @pre @a pcert_chain_list is created with ckmc_get_certificate_chain() or - /// ckmc_get_certificate_chain_with_alias(). - /// @see ckmc_get_cert_chain()) - /// @see ckmc_cert_list_all_free() - int ckmc_ocsp_check( - ffi.Pointer pcert_chain_list, - ffi.Pointer ocsp_status, - ) { - return _ckmc_ocsp_check( - pcert_chain_list, - ocsp_status, - ); - } - - late final _ckmc_ocsp_checkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('ckmc_ocsp_check'); - late final _ckmc_ocsp_check = _ckmc_ocsp_checkPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4. @elseif WEARABLE 3.0. @endif [Use ckmc_set_permission() instead] - /// @brief Allows another application to access client's application data. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks Data identified by @a alias should exist. - /// @param[in] alias Data alias for which access will be granted - /// @param[in] accessor Package id of the application that will gain access rights - /// @param[in] granted Rights granted for @a accessor application - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to the error with unknown reason - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_deny_access() - int ckmc_allow_access( - ffi.Pointer alias, - ffi.Pointer accessor, - int granted, - ) { - return _ckmc_allow_access( - alias, - accessor, - granted, - ); - } - - late final _ckmc_allow_accessPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('ckmc_allow_access'); - late final _ckmc_allow_access = _ckmc_allow_accessPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); - - /// @brief Allows another application to access client's application data. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks Data identified by @a alias should exist. - /// @param[in] alias Data alias for which access will be granted - /// @param[in] accessor Package id of the application that will gain access rights - /// @param[in] permissions Mask of permissions granted for @a accessor application - /// (#ckmc_permission_e) - /// (previous permission mask will be replaced with the new mask value) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to the error with unknown reason - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - int ckmc_set_permission( - ffi.Pointer alias, - ffi.Pointer accessor, - int permissions, - ) { - return _ckmc_set_permission( - alias, - accessor, - permissions, - ); - } - - late final _ckmc_set_permissionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Int)>>('ckmc_set_permission'); - late final _ckmc_set_permission = _ckmc_set_permissionPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); - - /// @deprecated Deprecated since @if MOBILE 2.4. @elseif WEARABLE 3.0. @endif [Use ckmc_set_permission() instead] - /// @brief Revokes another application's access to client's application data. - /// @since_tizen 2.3 - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks Data identified by @a alias should exist. - /// @remarks Only access previously granted with ckmc_allow_access can be revoked. - /// @param[in] alias Data alias for which access will be revoked - /// @param[in] accessor Package id of the application that will lose access rights - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid or the @a accessor doesn't have access to @a alias - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to the error with unknown reason - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_allow_access() - /// @see ckmc_set_permission() - int ckmc_deny_access( - ffi.Pointer alias, - ffi.Pointer accessor, - ) { - return _ckmc_deny_access( - alias, - accessor, - ); - } - - late final _ckmc_deny_accessPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('ckmc_deny_access'); - late final _ckmc_deny_access = _ckmc_deny_accessPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Removes an entry (no matter of type) from the key manager. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks %http://tizen.org/privilege/keymanager (public level privilege) is no longer required to use this API since 3.0. - /// @remarks To remove item, client must have remove permission to the specified item. - /// @remarks The item owner can remove by default. - /// @param[in] alias Item alias to be removed - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to a database error - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_save_key() - /// @see ckmc_save_cert() - /// @see ckmc_save_data() - /// @see ckmc_save_pkcs12() - /// @see ckmc_create_key_pair_rsa() - /// @see ckmc_create_key_pair_dsa() - /// @see ckmc_create_key_pair_ecdsa() - int ckmc_remove_alias( - ffi.Pointer alias, - ) { - return _ckmc_remove_alias( - alias, - ); - } - - late final _ckmc_remove_aliasPtr = - _lookup)>>( - 'ckmc_remove_alias'); - late final _ckmc_remove_alias = - _ckmc_remove_aliasPtr.asFunction)>(); - - /// @brief Encrypts data using selected key and algorithm. - /// @since_tizen 3.0 - /// @remarks Key identified by @a key_alias should exist. - /// @param[in] params Algorithm parameter list handle. See #ckmc_param_list_h and - /// #ckmc_algo_type_e for details - /// @param[in] key_alias Alias of the key to be used for encryption - /// @param[in] password The password used in decrypting a key value \n - /// If password of the policy is provided in ckmc_save_key(), the same - /// password should be provided - /// @param[in] decrypted Data to be encrypted. In case of AES algorithm there are no restrictions on the size of data, - /// if S/W backend is used. If module uses TEE backend (since Tizen 5.0 on chosen images), - /// maximum size of data is implementation-specific and at least 500 kB. - /// For RSA the size must be smaller or equal to key size in bytes - 42. - /// Example: for 1024 RSA key the maximum data size is 1024/8 - 42 = 86. - /// @param[out] ppencrypted Encrypted data (some algorithms may return additional information embedded in encrypted data. - /// AES GCM is an example) \n - /// The caller is responsible for freeing @a encrypted with ckmc_buffer_free() - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid (missing or invalid - /// mandatory algorithm parameter or RSA data too long, decrypted = NULL, - /// ppencrypted = NULL) - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to the error with unknown reason - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Key with given alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @retval #CKMC_ERROR_AUTHENTICATION_FAILED Key decryption failed because password is incorrect - /// @retval #CKMC_ERROR_SERVER_ERROR Too big data size or unsupported GCM mode (32 and 64 bit tag lengths not supported on TEE backend) or internal error - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_buffer_free() - /// @see ckmc_param_list_new() - /// @see ckmc_param_list_free() - /// @see ckmc_param_list_set_integer() - /// @see ckmc_param_list_set_buffer() - /// @see ckmc_generate_new_params() - /// @see #ckmc_param_list_h - /// @see #ckmc_param_name_e - /// @see #ckmc_algo_type_e - int ckmc_encrypt_data( - ckmc_param_list_h params, - ffi.Pointer key_alias, - ffi.Pointer password, - ckmc_raw_buffer_s decrypted, - ffi.Pointer> ppencrypted, - ) { - return _ckmc_encrypt_data( - params, - key_alias, - password, - decrypted, - ppencrypted, - ); - } - - late final _ckmc_encrypt_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ckmc_param_list_h, - ffi.Pointer, - ffi.Pointer, - ckmc_raw_buffer_s, - ffi.Pointer>)>>( - 'ckmc_encrypt_data'); - late final _ckmc_encrypt_data = _ckmc_encrypt_dataPtr.asFunction< - int Function( - ckmc_param_list_h, - ffi.Pointer, - ffi.Pointer, - ckmc_raw_buffer_s, - ffi.Pointer>)>(); - - /// @brief Decrypts data using selected key and algorithm. - /// @since_tizen 3.0 - /// @remarks Key identified by @a key_alias should exist. - /// @param[in] params Algorithm parameter list handle. You should use the same parameters that were used for encryption. - /// See #ckmc_param_list_h and #ckmc_algo_type_e for details - /// @param[in] key_alias Alias of the key to be used for encryption - /// @param[in] password The password used in decrypting a key value \n - /// If password of the policy is provided in ckmc_save_key(), the same password should be provided - /// @param[in] encrypted Data to be decrypted (some algorithms may require additional information embedded in encrypted data. AES GCM is an example) - /// Since Tizen 5.0, on chosen images where module is using TEE backend, data size is limited to at least 500 kB - /// (TEE implementation-specific). - /// @param[out] ppdecrypted Decrypted data \n - /// The caller is responsible for freeing @a decrypted with ckmc_buffer_free() - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CKMC_ERROR_NONE Successful - /// @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid (missing or invalid - /// mandatory algorithm parameter, GCM tag authentication failed, key or data is wrong, - /// in case of RSA key is wrong or data too long, encrypted = NULL, ppdecrypted = NULL) - /// @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged in) - /// @retval #CKMC_ERROR_DB_ERROR Failed due to the error with unknown reason - /// @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN Key with given alias does not exist - /// @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager - /// @retval #CKMC_ERROR_AUTHENTICATION_FAILED Key decryption failed because password is incorrect - /// @retval #CKMC_ERROR_SERVER_ERROR Too big data size or unsupported GCM mode (32 and 64 bit tag lengths not supported on TEE backend) or internal error - /// @pre User is already logged in and the user key is already loaded into memory in plain text form. - /// @see ckmc_buffer_free() - /// @see ckmc_param_list_new() - /// @see ckmc_param_list_free() - /// @see ckmc_param_list_set_integer() - /// @see ckmc_param_list_set_buffer() - /// @see ckmc_generate_new_params() - /// @see #ckmc_param_list_h - /// @see #ckmc_param_name_e - /// @see #ckmc_algo_type_e - int ckmc_decrypt_data( - ckmc_param_list_h params, - ffi.Pointer key_alias, - ffi.Pointer password, - ckmc_raw_buffer_s encrypted, - ffi.Pointer> ppdecrypted, - ) { - return _ckmc_decrypt_data( - params, - key_alias, - password, - encrypted, - ppdecrypted, - ); - } - - late final _ckmc_decrypt_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ckmc_param_list_h, - ffi.Pointer, - ffi.Pointer, - ckmc_raw_buffer_s, - ffi.Pointer>)>>( - 'ckmc_decrypt_data'); - late final _ckmc_decrypt_data = _ckmc_decrypt_dataPtr.asFunction< - int Function( - ckmc_param_list_h, - ffi.Pointer, - ffi.Pointer, - ckmc_raw_buffer_s, - ffi.Pointer>)>(); - - /// @brief Checks if an application, which calls this function, has permission to use the - /// given privilege. - /// - /// @since_tizen 4.0 - /// - /// @param[in] privilege The privilege that is to be checked. - /// @param[out] result The result of the privilege check. - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_NONE Successful - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_UNKNOWN Unknown error - int ppm_check_permission( - ffi.Pointer privilege, - ffi.Pointer result, - ) { - return _ppm_check_permission( - privilege, - result, - ); - } - - late final _ppm_check_permissionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('ppm_check_permission'); - late final _ppm_check_permission = _ppm_check_permissionPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @platform - /// @brief Checks if an application, with given app_id, has permission to use the - /// given privilege. - /// - /// @since_tizen 5.0 - /// - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/permission.check - /// - /// @param[in] app_id The app_id of the app that is to be checked. - /// @param[in] privilege The privilege that is to be checked. - /// @param[out] result The result of the privilege check. - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_NONE Successful - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_UNKNOWN Unknown error - int ppm_check_app_permission( - ffi.Pointer app_id, - ffi.Pointer privilege, - ffi.Pointer result, - ) { - return _ppm_check_app_permission( - app_id, - privilege, - result, - ); - } - - late final _ppm_check_app_permissionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('ppm_check_app_permission'); - late final _ppm_check_app_permission = - _ppm_check_app_permissionPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Checks if an application, which calls this function, has permission to use the - /// given privileges. - /// - /// @since_tizen 5.0 - /// - /// @param[in] privileges The privileges array that is to be checked. - /// @param[in] privileges_count The number of elements in the privileges and results arrays. - /// @param[out] results The results of the privilege check. Caller is responsible for - /// allocating this array with proper size and freeing it afterwards. - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_NONE Successful - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_INVALID_PARAMETER Non unique privileges passed - /// in first argument, privileges_count is more than 100 or other invalid parameter - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_UNKNOWN Unknown error - int ppm_check_permissions( - ffi.Pointer> privileges, - int privileges_count, - ffi.Pointer results, - ) { - return _ppm_check_permissions( - privileges, - privileges_count, - results, - ); - } - - late final _ppm_check_permissionsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, ffi.Size, - ffi.Pointer)>>('ppm_check_permissions'); - late final _ppm_check_permissions = _ppm_check_permissionsPtr.asFunction< - int Function( - ffi.Pointer>, int, ffi.Pointer)>(); - - /// @platform - /// @brief Checks if an application, with given app_id, has permission to use the - /// given privileges. - /// - /// @since_tizen 5.0 - /// - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/permission.check - /// - /// @param[in] app_id The app_id of the app that is to be checked. - /// @param[in] privileges The privileges array that is to be checked. - /// @param[in] privileges_count The number of elements in the privileges and results arrays. - /// @param[out] results The results of the privilege check. Caller is responsible for - /// allocating this array with proper size and freeing it afterwards. - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_NONE Successful - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_INVALID_PARAMETER Non unique privileges passed - /// in first argument, privileges_count is more than 100 or other invalid parameter - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_UNKNOWN Unknown error - int ppm_check_app_permissions( - ffi.Pointer app_id, - ffi.Pointer> privileges, - int privileges_count, - ffi.Pointer results, - ) { - return _ppm_check_app_permissions( - app_id, - privileges, - privileges_count, - results, - ); - } - - late final _ppm_check_app_permissionsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Size, - ffi.Pointer)>>('ppm_check_app_permissions'); - late final _ppm_check_app_permissions = - _ppm_check_app_permissionsPtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer>, - int, - ffi.Pointer)>(); - - /// @brief Requests a user's response to obtain permission for using the given privilege. - /// - /// @details When this function is called, an underlying service may show an appropriate - /// UI dialogue box (pop-up) with a question about granting the application access - /// to the given privilege. Once a user makes a decision, the service may modify - /// the privacy policy (when it is a definitive decision). After that, the service - /// sends the response back to the application. The possible response values are as follows: - /// #PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_ALLOW_FOREVER\n - /// #PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_DENY_FOREVER\n - /// #PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_DENY_ONCE\n - /// The application receives #PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_DENY_ONCE value after - /// pressing 'Deny' button while not having selected the 'Don't ask again?' checkbox. If the device - /// has the home and back buttons, pressing either of them gives the - /// #PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_DENY_ONCE response. - /// The application is informed about the user's decision by invoking ppm_request_response_cb(). - /// When a privacy policy for the given privilege has already been resolved, no pop-up will - /// be shown and the service will reply immediately with an appropriate result: - /// #PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_ALLOW_FOREVER\n - /// #PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_DENY_FOREVER\n - /// - /// @since_tizen 4.0 - /// - /// @remarks Before calling this function, call ppm_check_permission() to check if the application has - /// permission to use the given privilege. If the result of calling ppm_check_permission() is - /// #PRIVACY_PRIVILEGE_MANAGER_CHECK_RESULT_ASK, the application should call - /// this function to determine access to the privilege. - /// - /// @param[in] privilege The given privilege for which a pop-up must be shown. - /// @param[in] callback The given callback function which will be invoked - /// when the API receives a response. - /// @param[in] user_data User specific data which will be passed to - /// the given callback. - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_NONE Successful - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_ALREADY_IN_PROGRESS Operation already in progress - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_UNKNOWN Unknown error - /// - /// @post ppm_request_response_cb() will be invoked. - /// @see ppm_request_response_cb() - int ppm_request_permission( - ffi.Pointer privilege, - ppm_request_response_cb callback, - ffi.Pointer user_data, - ) { - return _ppm_request_permission( - privilege, - callback, - user_data, - ); - } - - late final _ppm_request_permissionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ppm_request_response_cb, - ffi.Pointer)>>('ppm_request_permission'); - late final _ppm_request_permission = _ppm_request_permissionPtr.asFunction< - int Function(ffi.Pointer, ppm_request_response_cb, - ffi.Pointer)>(); - - /// @brief Requests a user's response to obtain permission for using the given privileges. - /// - /// @details When this function is called, an underlying service may show an appropriate - /// UI dialogue box (pop-up) with a question about granting the application access - /// to the given privileges. Once a user makes a decision, the service may modify - /// the privacy policy (when it is a definitive decision). After that, the service - /// sends the response back to the application. The possible response values are as follows:\n - /// #PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_ALLOW_FOREVER\n - /// #PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_DENY_FOREVER\n - /// #PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_DENY_ONCE\n - /// The application receives #PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_DENY_ONCE value after - /// pressing 'Deny' button while not having selected the 'Don't ask again?' checkbox. If the device - /// has the home and back buttons, pressing either of them gives the - /// #PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_DENY_ONCE response. - /// The application is informed about the user's decision by invoking ppm_request_multiple_response_cb(). - /// When a privacy policy for the given privileges has already been resolved, no pop-up will - /// be shown and the service will reply immediately with an appropriate results:\n - /// #PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_ALLOW_FOREVER\n - /// #PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_DENY_FOREVER\n - /// - /// @since_tizen 5.0 - /// - /// @remarks Before calling this function, call ppm_check_permission() or ppm_check_permissions() - /// to check if the application has permission to use the given privileges. - /// This function should be called for each privilege with result - /// #PRIVACY_PRIVILEGE_MANAGER_CHECK_RESULT_ASK returned from ppm_check_permission() or ppm_check_permissions(). - /// - /// @param[in] privileges The given privileges array for which a pop-up must be shown. - /// @param[in] privileges_count The number of elements in the privileges array. - /// @param[in] callback The given callback function which will be invoked - /// when the API receives a response. - /// @param[in] user_data User specific data which will be passed to - /// the given callback. - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_NONE Successful - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_IO_ERROR I/O error - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_INVALID_PARAMETER Non unique privileges passed - /// in first argument, privileges_count is more than 100 or other invalid parameter - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_ALREADY_IN_PROGRESS Operation already in progress - /// @retval #PRIVACY_PRIVILEGE_MANAGER_ERROR_UNKNOWN Unknown error - /// - /// @post ppm_request_multiple_response_cb() will be invoked. - /// @see ppm_request_multiple_response_cb() - int ppm_request_permissions( - ffi.Pointer> privileges, - int privileges_count, - ppm_request_multiple_response_cb callback, - ffi.Pointer user_data, - ) { - return _ppm_request_permissions( - privileges, - privileges_count, - callback, - user_data, - ); - } - - late final _ppm_request_permissionsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>, - ffi.Size, - ppm_request_multiple_response_cb, - ffi.Pointer)>>('ppm_request_permissions'); - late final _ppm_request_permissions = _ppm_request_permissionsPtr.asFunction< - int Function(ffi.Pointer>, int, - ppm_request_multiple_response_cb, ffi.Pointer)>(); - - /// @brief Gets the display name of the given privilege. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @remarks @a display_name must be released using free(). - /// @param[in] api_version The API version of the application to get privilege information - /// @param[in] privilege The privilege - /// @param[out] display_name The display name of the privilege - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PRVINFO_ERROR_NONE Successful - /// @retval #PRVINFO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PRVINFO_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #PRVINFO_ERROR_INTERNAL_ERROR Unknown error - int privilege_info_get_display_name( - ffi.Pointer api_version, - ffi.Pointer privilege, - ffi.Pointer> display_name, - ) { - return _privilege_info_get_display_name( - api_version, - privilege, - display_name, - ); - } - - late final _privilege_info_get_display_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>( - 'privilege_info_get_display_name'); - late final _privilege_info_get_display_name = - _privilege_info_get_display_namePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets the display name of the given privilege. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @remarks @a display_name must be released using free(). - /// @remarks package_type must be one of followings: PRVINFO_PACKAGE_TYPE_NATIVE, PRVINFO_PACKAGE_TYPE_WEB - /// @param[in] package_type The type of application package - /// @param[in] api_version The API version of the application to get privilege information - /// @param[in] privilege The privilege - /// @param[out] display_name The display name of the privilege - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PRVINFO_ERROR_NONE Successful - /// @retval #PRVINFO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PRVINFO_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #PRVINFO_ERROR_INTERNAL_ERROR Unknown error - int privilege_info_get_display_name_by_pkgtype( - ffi.Pointer package_type, - ffi.Pointer api_version, - ffi.Pointer privilege, - ffi.Pointer> display_name, - ) { - return _privilege_info_get_display_name_by_pkgtype( - package_type, - api_version, - privilege, - display_name, - ); - } - - late final _privilege_info_get_display_name_by_pkgtypePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>>( - 'privilege_info_get_display_name_by_pkgtype'); - late final _privilege_info_get_display_name_by_pkgtype = - _privilege_info_get_display_name_by_pkgtypePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Gets the description of the given privilege. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @remarks @a description must be released using free(). - /// @param[in] api_version The API version of the application to get privilege information - /// @param[in] privilege The privilege - /// @param[out] description The description of the privilege - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PRVINFO_ERROR_NONE Successful - /// @retval #PRVINFO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PRVINFO_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #PRVINFO_ERROR_INTERNAL_ERROR Unknown error - int privilege_info_get_description( - ffi.Pointer api_version, - ffi.Pointer privilege, - ffi.Pointer> description, - ) { - return _privilege_info_get_description( - api_version, - privilege, - description, - ); - } - - late final _privilege_info_get_descriptionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>( - 'privilege_info_get_description'); - late final _privilege_info_get_description = - _privilege_info_get_descriptionPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - /// @brief Gets the description of the given privilege. - /// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - /// @remarks @a description must be released using free(). - /// @remarks package_type must be one of followings: PRVINFO_PACKAGE_TYPE_NATIVE, PRVINFO_PACKAGE_TYPE_WEB - /// @param[in] package_type The type of application package - /// @param[in] api_version The API version of the application to get privilege information - /// @param[in] privilege The privilege - /// @param[out] description The description of the privilege - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PRVINFO_ERROR_NONE Successful - /// @retval #PRVINFO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PRVINFO_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #PRVINFO_ERROR_INTERNAL_ERROR Unknown error - int privilege_info_get_description_by_pkgtype( - ffi.Pointer package_type, - ffi.Pointer api_version, - ffi.Pointer privilege, - ffi.Pointer> description, - ) { - return _privilege_info_get_description_by_pkgtype( - package_type, - api_version, - privilege, - description, - ); - } - - late final _privilege_info_get_description_by_pkgtypePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>>( - 'privilege_info_get_description_by_pkgtype'); - late final _privilege_info_get_description_by_pkgtype = - _privilege_info_get_description_by_pkgtypePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Gets the display name of the privacy group in which the given privilege is included. - /// @since_tizen 3.0 - /// @remarks @a privacy_name must be released using free(). - /// @remarks @a privilege must be privacy related, otherwise #PRVINFO_ERROR_INVALID_PARAMETER is returned. - /// @param[in] privilege The privilege - /// @param[out] privacy_name The privacy group's display name that the given privilege is included in - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PRVINFO_ERROR_NONE Successful - /// @retval #PRVINFO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PRVINFO_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #PRVINFO_ERROR_INTERNAL_ERROR Unknown error - /// @retval #PRVINFO_ERROR_NOT_SUPPORTED Not supported - int privilege_info_get_privacy_display_name( - ffi.Pointer privilege, - ffi.Pointer> privacy_name, - ) { - return _privilege_info_get_privacy_display_name( - privilege, - privacy_name, - ); - } - - late final _privilege_info_get_privacy_display_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer>)>>( - 'privilege_info_get_privacy_display_name'); - late final _privilege_info_get_privacy_display_name = - _privilege_info_get_privacy_display_namePtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @deprecated Deprecated since 5.0. Use ppm_check_permission() instead. You can refer to @ref CAPI_PRIVACY_PRIVILEGE_MANAGER_MODULE. - /// @brief Gets the status of the given privacy related privilege. - /// @since_tizen 3.0 - /// @remarks @a privilege must be privacy related, otherwise #PRVINFO_ERROR_INVALID_PARAMETER is returned. - /// In case of errors, @a status is set to @c true. - /// @param[in] privilege The privilege - /// @param[out] status @c true if the privilege is on, - /// and @c false if the privilege is off - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PRVINFO_ERROR_NONE Successful - /// @retval #PRVINFO_ERROR_INVALID_PARAMETER Invalid function parameter - /// @retval #PRVINFO_ERROR_INTERNAL_ERROR Unknown error - /// @retval #PRVINFO_ERROR_NOT_SUPPORTED Not supported - int privilege_info_get_privacy_privilege_status( - ffi.Pointer privilege, - ffi.Pointer status, - ) { - return _privilege_info_get_privacy_privilege_status( - privilege, - status, - ); - } - - late final _privilege_info_get_privacy_privilege_statusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>>( - 'privilege_info_get_privacy_privilege_status'); - late final _privilege_info_get_privacy_privilege_status = - _privilege_info_get_privacy_privilege_statusPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Initializes the library. Must be called before any other crypto - /// function. Should be called once in each thread that uses yaca. - /// - /// @since_tizen 3.0 - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_cleanup() - int yaca_initialize() { - return _yaca_initialize(); - } - - late final _yaca_initializePtr = - _lookup>('yaca_initialize'); - late final _yaca_initialize = - _yaca_initializePtr.asFunction(); - - /// @brief Cleans up the library. Must be called before exiting the thread that - /// called yaca_initialize(). - /// - /// @since_tizen 3.0 - /// - /// @see yaca_initialize() - void yaca_cleanup() { - return _yaca_cleanup(); - } - - late final _yaca_cleanupPtr = - _lookup>('yaca_cleanup'); - late final _yaca_cleanup = _yaca_cleanupPtr.asFunction(); - - /// @brief Allocates the memory. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a memory should be freed using yaca_free(). - /// - /// @param[in] size Size of the allocation (bytes) - /// @param[out] memory Allocated memory - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// - /// @see yaca_zalloc() - /// @see yaca_realloc() - /// @see yaca_free() - int yaca_malloc( - int size, - ffi.Pointer> memory, - ) { - return _yaca_malloc( - size, - memory, - ); - } - - late final _yaca_mallocPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Size, ffi.Pointer>)>>('yaca_malloc'); - late final _yaca_malloc = _yaca_mallocPtr - .asFunction>)>(); - - /// @brief Allocates the zeroed memory. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a memory should be freed using yaca_free(). - /// - /// @param[in] size Size of the allocation (bytes) - /// @param[out] memory Allocated memory - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// - /// @see yaca_malloc() - /// @see yaca_realloc() - /// @see yaca_free() - int yaca_zalloc( - int size, - ffi.Pointer> memory, - ) { - return _yaca_zalloc( - size, - memory, - ); - } - - late final _yaca_zallocPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Size, ffi.Pointer>)>>('yaca_zalloc'); - late final _yaca_zalloc = _yaca_zallocPtr - .asFunction>)>(); - - /// @brief Re-allocates the memory. - /// - /// @since_tizen 3.0 - /// - /// @remarks In case of failure the function doesn't free the memory pointed by @a memory. - /// - /// @remarks If @a memory is NULL then the call is equivalent to yaca_malloc(). - /// - /// @remarks If the function fails the contents of @a memory will be left unchanged. - /// - /// @remarks The @a memory should be freed using yaca_free(). - /// - /// @param[in] size Size of the new allocation (bytes) - /// @param[in,out] memory Memory to be reallocated - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// - /// @see yaca_malloc() - /// @see yaca_zalloc() - /// @see yaca_free() - int yaca_realloc( - int size, - ffi.Pointer> memory, - ) { - return _yaca_realloc( - size, - memory, - ); - } - - late final _yaca_reallocPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Size, ffi.Pointer>)>>('yaca_realloc'); - late final _yaca_realloc = _yaca_reallocPtr - .asFunction>)>(); - - /// @brief Frees the memory allocated by yaca_malloc(), yaca_zalloc(), - /// yaca_realloc() or one of the cryptographic operations. - /// - /// @since_tizen 3.0 - /// - /// @param[in] memory Pointer to the memory to be freed - /// - /// @see yaca_malloc() - /// @see yaca_zalloc() - /// @see yaca_realloc() - void yaca_free( - ffi.Pointer memory, - ) { - return _yaca_free( - memory, - ); - } - - late final _yaca_freePtr = - _lookup)>>( - 'yaca_free'); - late final _yaca_free = - _yaca_freePtr.asFunction)>(); - - /// @brief Safely compares first @a len bytes of two buffers. - /// - /// @since_tizen 3.0 - /// - /// @param[in] first Pointer to the first buffer - /// @param[in] second Pointer to the second buffer - /// @param[in] len Length to compare - /// - /// @return #YACA_ERROR_NONE when buffers are equal otherwise #YACA_ERROR_DATA_MISMATCH - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0) - /// @retval #YACA_ERROR_DATA_MISMATCH Buffers are different - int yaca_memcmp( - ffi.Pointer first, - ffi.Pointer second, - int len, - ) { - return _yaca_memcmp( - first, - second, - len, - ); - } - - late final _yaca_memcmpPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('yaca_memcmp'); - late final _yaca_memcmp = _yaca_memcmpPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); - - /// @brief Generates random data. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] data Pointer to the memory to be randomized - /// @param[in] data_len Length of the memory to be randomized - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0) - /// @retval #YACA_ERROR_INTERNAL Internal error - int yaca_randomize_bytes( - ffi.Pointer data, - int data_len, - ) { - return _yaca_randomize_bytes( - data, - data_len, - ); - } - - late final _yaca_randomize_bytesPtr = _lookup< - ffi - .NativeFunction, ffi.Size)>>( - 'yaca_randomize_bytes'); - late final _yaca_randomize_bytes = _yaca_randomize_bytesPtr - .asFunction, int)>(); - - /// @brief Sets the non-standard context properties. Can only be called on an - /// initialized context. - /// - /// @remarks The @a value has to be of type appropriate for given property. See #yaca_property_e - /// for details on corresponding types. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] ctx Previously initialized crypto context - /// @param[in] property Property to be set - /// @param[in] value Property value - /// @param[in] value_len Length of the property value - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0, - /// invalid @a ctx or @a property) - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_property_e - /// @see yaca_context_get_property() - int yaca_context_set_property( - yaca_context_h ctx, - int property, - ffi.Pointer value, - int value_len, - ) { - return _yaca_context_set_property( - ctx, - property, - value, - value_len, - ); - } - - late final _yaca_context_set_propertyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_context_h, ffi.Int32, ffi.Pointer, - ffi.Size)>>('yaca_context_set_property'); - late final _yaca_context_set_property = - _yaca_context_set_propertyPtr.asFunction< - int Function(yaca_context_h, int, ffi.Pointer, int)>(); - - /// @brief Returns the non-standard context properties. Can only be called on an - /// initialized context. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a value should be freed using yaca_free(). - /// - /// @remarks The @a value has to be of type appropriate for given property. See #yaca_property_e - /// for details on corresponding types. - /// - /// @remarks The @a value_len can be NULL if returned @a value is a single object - /// (i.e. not an array/buffer). - /// - /// @param[in] ctx Previously initialized crypto context - /// @param[in] property Property to be read - /// @param[out] value Copy of the property value - /// @param[out] value_len Length of the property value will be returned here - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a ctx or @a property) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_property_e - /// @see yaca_context_set_property() - /// @see yaca_free() - int yaca_context_get_property( - yaca_context_h ctx, - int property, - ffi.Pointer> value, - ffi.Pointer value_len, - ) { - return _yaca_context_get_property( - ctx, - property, - value, - value_len, - ); - } - - late final _yaca_context_get_propertyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - yaca_context_h, - ffi.Int32, - ffi.Pointer>, - ffi.Pointer)>>('yaca_context_get_property'); - late final _yaca_context_get_property = - _yaca_context_get_propertyPtr.asFunction< - int Function(yaca_context_h, int, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Returns the minimum required size of the output buffer for a single crypto function call. - /// - /// @since_tizen 3.0 - /// - /// @remarks This function should be used to learn the required size of the output buffer - /// for a single function call (eg. *_update or *_finalize). The actual output length - /// (number of bytes that has been used) will be returned by the function call itself. - /// - /// @remarks In case the function call has no output (e.g. yaca_sign_update(), - /// yaca_digest_update()), there is no need to use this function. - /// - /// @remarks In case the function call has no input (eg. *_finalize), the value of - /// @a input_len has to be set to 0. - /// - /// @param[in] ctx Previously initialized crypto context - /// @param[in] input_len Length of the input data to be processed - /// @param[out] output_len Required length of the output - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a ctx or too big @a input_len) - /// @retval #YACA_ERROR_INTERNAL Internal error - int yaca_context_get_output_length( - yaca_context_h ctx, - int input_len, - ffi.Pointer output_len, - ) { - return _yaca_context_get_output_length( - ctx, - input_len, - output_len, - ); - } - - late final _yaca_context_get_output_lengthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_context_h, ffi.Size, - ffi.Pointer)>>('yaca_context_get_output_length'); - late final _yaca_context_get_output_length = - _yaca_context_get_output_lengthPtr.asFunction< - int Function(yaca_context_h, int, ffi.Pointer)>(); - - /// @brief Destroys the crypto context. Must be called on all contexts that are - /// no longer used. Passing #YACA_CONTEXT_NULL is allowed. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] ctx Crypto context - /// - /// @see #yaca_context_h - void yaca_context_destroy( - yaca_context_h ctx, - ) { - return _yaca_context_destroy( - ctx, - ); - } - - late final _yaca_context_destroyPtr = - _lookup>( - 'yaca_context_destroy'); - late final _yaca_context_destroy = - _yaca_context_destroyPtr.asFunction(); - - /// @brief Returns the recommended/default length of the Initialization Vector - /// for a given encryption configuration. - /// - /// @since_tizen 3.0 - /// - /// @remarks If returned @a iv_bit_len equals 0 that means that for this - /// specific algorithm and its parameters Initialization Vector is not used. - /// - /// @param[in] algo Encryption algorithm - /// @param[in] bcm Chain mode - /// @param[in] key_bit_len Key length in bits - /// @param[out] iv_bit_len Recommended Initialization Vector length in bits - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a algo, @a bcm or @a key_bit_len) - /// @retval #YACA_ERROR_INTERNAL Internal error - int yaca_encrypt_get_iv_bit_length( - int algo, - int bcm, - int key_bit_len, - ffi.Pointer iv_bit_len, - ) { - return _yaca_encrypt_get_iv_bit_length( - algo, - bcm, - key_bit_len, - iv_bit_len, - ); - } - - late final _yaca_encrypt_get_iv_bit_lengthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Int32, ffi.Size, - ffi.Pointer)>>('yaca_encrypt_get_iv_bit_length'); - late final _yaca_encrypt_get_iv_bit_length = - _yaca_encrypt_get_iv_bit_lengthPtr - .asFunction)>(); - - /// @brief Initializes an encryption context. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a ctx should be released using yaca_context_destroy(). - /// - /// @param[out] ctx Newly created context - /// @param[in] algo Encryption algorithm that will be used - /// @param[in] bcm Chaining mode that will be used - /// @param[in] sym_key Symmetric key that will be used - /// @param[in] iv Initialization Vector that will be used - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a algo, @a bcm, @a sym_key or @a iv) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_encrypt_algorithm_e - /// @see #yaca_block_cipher_mode_e - /// @see yaca_encrypt_update() - /// @see yaca_encrypt_finalize() - /// @see yaca_context_destroy() - int yaca_encrypt_initialize( - ffi.Pointer ctx, - int algo, - int bcm, - yaca_key_h sym_key, - yaca_key_h iv, - ) { - return _yaca_encrypt_initialize( - ctx, - algo, - bcm, - sym_key, - iv, - ); - } - - late final _yaca_encrypt_initializePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int32, ffi.Int32, - yaca_key_h, yaca_key_h)>>('yaca_encrypt_initialize'); - late final _yaca_encrypt_initialize = _yaca_encrypt_initializePtr.asFunction< - int Function( - ffi.Pointer, int, int, yaca_key_h, yaca_key_h)>(); - - /// @brief Encrypts chunk of the data. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] ctx Context created by yaca_encrypt_initialize() - /// @param[in] plaintext Plaintext to be encrypted - /// @param[in] plaintext_len Length of the plaintext - /// @param[out] ciphertext Buffer for the encrypted data - /// (must be allocated by client, see yaca_context_get_output_length()) - /// @param[out] ciphertext_len Length of the encrypted data, - /// actual number of bytes written will be returned here - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0, - /// invalid @a ctx) - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_encrypt_initialize() - /// @see yaca_encrypt_finalize() - /// @see yaca_context_get_output_length() - int yaca_encrypt_update( - yaca_context_h ctx, - ffi.Pointer plaintext, - int plaintext_len, - ffi.Pointer ciphertext, - ffi.Pointer ciphertext_len, - ) { - return _yaca_encrypt_update( - ctx, - plaintext, - plaintext_len, - ciphertext, - ciphertext_len, - ); - } - - late final _yaca_encrypt_updatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - yaca_context_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Pointer)>>('yaca_encrypt_update'); - late final _yaca_encrypt_update = _yaca_encrypt_updatePtr.asFunction< - int Function(yaca_context_h, ffi.Pointer, int, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Encrypts the final chunk of the data. - /// - /// @remarks Skipping yaca_encrypt_update() and calling only yaca_encrypt_finalize() will produce an - /// encryption of an empty message. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] ctx A valid encrypt context - /// @param[out] ciphertext Final piece of the encrypted data - /// (must be allocated by client, see yaca_context_get_output_length()) - /// @param[out] ciphertext_len Length of the final piece, - /// actual number of bytes written will be returned here - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a ctx) - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_encrypt_initialize() - /// @see yaca_encrypt_update() - /// @see yaca_context_get_output_length() - int yaca_encrypt_finalize( - yaca_context_h ctx, - ffi.Pointer ciphertext, - ffi.Pointer ciphertext_len, - ) { - return _yaca_encrypt_finalize( - ctx, - ciphertext, - ciphertext_len, - ); - } - - late final _yaca_encrypt_finalizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_context_h, ffi.Pointer, - ffi.Pointer)>>('yaca_encrypt_finalize'); - late final _yaca_encrypt_finalize = _yaca_encrypt_finalizePtr.asFunction< - int Function( - yaca_context_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Initializes an decryption context. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a ctx should be released using yaca_context_destroy(). - /// - /// @param[out] ctx Newly created context - /// @param[in] algo Encryption algorithm that was used to encrypt the data - /// @param[in] bcm Chaining mode that was used to encrypt the data - /// @param[in] sym_key Symmetric key that was used to encrypt the data - /// @param[in] iv Initialization Vector that was used to encrypt the data - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a algo, @a bcm, @a sym_key or @a iv) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_encrypt_algorithm_e - /// @see #yaca_block_cipher_mode_e - /// @see yaca_decrypt_update() - /// @see yaca_decrypt_finalize() - /// @see yaca_context_destroy() - int yaca_decrypt_initialize( - ffi.Pointer ctx, - int algo, - int bcm, - yaca_key_h sym_key, - yaca_key_h iv, - ) { - return _yaca_decrypt_initialize( - ctx, - algo, - bcm, - sym_key, - iv, - ); - } - - late final _yaca_decrypt_initializePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int32, ffi.Int32, - yaca_key_h, yaca_key_h)>>('yaca_decrypt_initialize'); - late final _yaca_decrypt_initialize = _yaca_decrypt_initializePtr.asFunction< - int Function( - ffi.Pointer, int, int, yaca_key_h, yaca_key_h)>(); - - /// @brief Decrypts chunk of the data. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] ctx Context created by yaca_decrypt_initialize() - /// @param[in] ciphertext Ciphertext to be decrypted - /// @param[in] ciphertext_len Length of the ciphertext - /// @param[out] plaintext Buffer for the decrypted data - /// (must be allocated by client, see yaca_context_get_output_length()) - /// @param[out] plaintext_len Length of the decrypted data, - /// actual number of bytes written will be returned here - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0, - /// invalid @a ctx), wrong #YACA_PROPERTY_CCM_AAD or - /// wrong #YACA_PROPERTY_CCM_TAG was used - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_decrypt_initialize() - /// @see yaca_decrypt_finalize() - /// @see yaca_context_get_output_length() - int yaca_decrypt_update( - yaca_context_h ctx, - ffi.Pointer ciphertext, - int ciphertext_len, - ffi.Pointer plaintext, - ffi.Pointer plaintext_len, - ) { - return _yaca_decrypt_update( - ctx, - ciphertext, - ciphertext_len, - plaintext, - plaintext_len, - ); - } - - late final _yaca_decrypt_updatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - yaca_context_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Pointer)>>('yaca_decrypt_update'); - late final _yaca_decrypt_update = _yaca_decrypt_updatePtr.asFunction< - int Function(yaca_context_h, ffi.Pointer, int, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Decrypts the final chunk of the data. - /// - /// @remarks Skipping yaca_decrypt_update() and calling only yaca_decrypt_finalize() will produce a - /// decryption of an empty ciphertext. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] ctx A valid decrypt context - /// @param[out] plaintext Final piece of the decrypted data - /// (must be allocated by client, see yaca_context_get_output_length()) - /// @param[out] plaintext_len Length of the final piece, - /// actual number of bytes written will be returned here - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a ctx), wrong #YACA_PROPERTY_GCM_AAD or - /// wrong #YACA_PROPERTY_GCM_TAG was used - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_decrypt_initialize() - /// @see yaca_decrypt_update() - /// @see yaca_context_get_output_length() - int yaca_decrypt_finalize( - yaca_context_h ctx, - ffi.Pointer plaintext, - ffi.Pointer plaintext_len, - ) { - return _yaca_decrypt_finalize( - ctx, - plaintext, - plaintext_len, - ); - } - - late final _yaca_decrypt_finalizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_context_h, ffi.Pointer, - ffi.Pointer)>>('yaca_decrypt_finalize'); - late final _yaca_decrypt_finalize = _yaca_decrypt_finalizePtr.asFunction< - int Function( - yaca_context_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Initializes an asymmetric encryption context and generates - /// symmetric key and Initialization Vector. - /// - /// @remarks Generated symmetric key is encrypted with public key, - /// so can be only used with yaca_open_initialize(). It can be exported, - /// but after import it can be only used with yaca_open_initialize() as well. - /// - /// @remarks The @a ctx should be released using yaca_context_destroy(). - /// - /// @remarks The @a pub_key must be #YACA_KEY_TYPE_RSA_PUB. - /// - /// @remarks The @a sym_key_bit_len must be at least 88 bits shorter than the @a pub_key bit length. - /// - /// @remarks The @a sym_key should be released using yaca_key_destroy(). - /// - /// @remarks The @a iv should be released using yaca_key_destroy(). - /// - /// @since_tizen 3.0 - /// - /// @param[out] ctx Newly created context - /// @param[in] pub_key Public key of the peer that will receive the encrypted data - /// @param[in] algo Symmetric algorithm that will be used - /// @param[in] bcm Block chaining mode for the symmetric algorithm - /// @param[in] sym_key_bit_len Symmetric key length (in bits) that will be generated - /// @param[out] sym_key Generated symmetric key that will be used, - /// it is encrypted with peer's public key - /// @param[out] iv Generated Initialization Vector that will be used - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a algo, @a bcm, @a sym_key_bit_len or @a pub_key) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_encrypt_algorithm_e - /// @see #yaca_block_cipher_mode_e - /// @see #yaca_key_bit_length_e - /// @see yaca_seal_update() - /// @see yaca_seal_finalize() - /// @see yaca_open_initialize() - /// @see yaca_key_destroy() - /// @see yaca_context_destroy() - int yaca_seal_initialize( - ffi.Pointer ctx, - yaca_key_h pub_key, - int algo, - int bcm, - int sym_key_bit_len, - ffi.Pointer sym_key, - ffi.Pointer iv, - ) { - return _yaca_seal_initialize( - ctx, - pub_key, - algo, - bcm, - sym_key_bit_len, - sym_key, - iv, - ); - } - - late final _yaca_seal_initializePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - yaca_key_h, - ffi.Int32, - ffi.Int32, - ffi.Size, - ffi.Pointer, - ffi.Pointer)>>('yaca_seal_initialize'); - late final _yaca_seal_initialize = _yaca_seal_initializePtr.asFunction< - int Function(ffi.Pointer, yaca_key_h, int, int, int, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Encrypts piece of the data. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] ctx Context created by yaca_seal_initialize() - /// @param[in] plaintext Plaintext to be encrypted - /// @param[in] plaintext_len Length of the plaintext - /// @param[out] ciphertext Buffer for the encrypted data - /// (must be allocated by client, see yaca_context_get_output_length()) - /// @param[out] ciphertext_len Length of the encrypted data, - /// actual number of bytes written will be returned here - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0, - /// invalid @a ctx) - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_seal_initialize() - /// @see yaca_seal_finalize() - /// @see yaca_context_get_output_length() - int yaca_seal_update( - yaca_context_h ctx, - ffi.Pointer plaintext, - int plaintext_len, - ffi.Pointer ciphertext, - ffi.Pointer ciphertext_len, - ) { - return _yaca_seal_update( - ctx, - plaintext, - plaintext_len, - ciphertext, - ciphertext_len, - ); - } - - late final _yaca_seal_updatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - yaca_context_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Pointer)>>('yaca_seal_update'); - late final _yaca_seal_update = _yaca_seal_updatePtr.asFunction< - int Function(yaca_context_h, ffi.Pointer, int, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Encrypts the final piece of the data. - /// - /// @remarks Skipping yaca_seal_update() and calling only yaca_seal_finalize() will produce an - /// encryption of an empty message. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] ctx A valid seal context - /// @param[out] ciphertext Final piece of the encrypted data - /// (must be allocated by client, see yaca_context_get_output_length()) - /// @param[out] ciphertext_len Length of the final piece, - /// actual number of bytes written will be returned here - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a ctx) - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_seal_initialize() - /// @see yaca_seal_update() - /// @see yaca_context_get_output_length() - int yaca_seal_finalize( - yaca_context_h ctx, - ffi.Pointer ciphertext, - ffi.Pointer ciphertext_len, - ) { - return _yaca_seal_finalize( - ctx, - ciphertext, - ciphertext_len, - ); - } - - late final _yaca_seal_finalizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_context_h, ffi.Pointer, - ffi.Pointer)>>('yaca_seal_finalize'); - late final _yaca_seal_finalize = _yaca_seal_finalizePtr.asFunction< - int Function( - yaca_context_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Initializes an asymmetric decryption context. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a ctx should be released using yaca_context_destroy(). - /// - /// @remarks The @a prv_key must be #YACA_KEY_TYPE_RSA_PRIV. - /// - /// @param[out] ctx Newly created context - /// @param[in] prv_key Private key, part of the pair that was used for the encryption - /// @param[in] algo Symmetric algorithm that was used for the encryption - /// @param[in] bcm Block chaining mode for the symmetric algorithm - /// @param[in] sym_key_bit_len Symmetric key length (in bits) that was used for the encryption - /// @param[in] sym_key Symmetric key, encrypted with the public key, - /// that was used to encrypt the data - /// @param[in] iv Initialization Vector that was used for the encryption - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, invalid - /// @a algo, @a bcm, @a sym_key_bit_len, @a prv_key, - /// @a sym_key or @a iv) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_encrypt_algorithm_e - /// @see #yaca_block_cipher_mode_e - /// @see #yaca_key_bit_length_e - /// @see yaca_open_update() - /// @see yaca_open_finalize() - /// @see yaca_context_destroy() - int yaca_open_initialize( - ffi.Pointer ctx, - yaca_key_h prv_key, - int algo, - int bcm, - int sym_key_bit_len, - yaca_key_h sym_key, - yaca_key_h iv, - ) { - return _yaca_open_initialize( - ctx, - prv_key, - algo, - bcm, - sym_key_bit_len, - sym_key, - iv, - ); - } - - late final _yaca_open_initializePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - yaca_key_h, - ffi.Int32, - ffi.Int32, - ffi.Size, - yaca_key_h, - yaca_key_h)>>('yaca_open_initialize'); - late final _yaca_open_initialize = _yaca_open_initializePtr.asFunction< - int Function(ffi.Pointer, yaca_key_h, int, int, int, - yaca_key_h, yaca_key_h)>(); - - /// @brief Decrypts piece of the data. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] ctx Context created by yaca_open_initialize() - /// @param[in] ciphertext Ciphertext to be decrypted - /// @param[in] ciphertext_len Length of the ciphertext - /// @param[out] plaintext Buffer for the decrypted data - /// (must be allocated by client, see yaca_context_get_output_length()) - /// @param[out] plaintext_len Length of the decrypted data, - /// actual number of bytes written will be returned here - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0, - /// invalid @a ctx), wrong #YACA_PROPERTY_CCM_AAD or - /// wrong #YACA_PROPERTY_CCM_TAG was used - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_open_initialize() - /// @see yaca_open_finalize() - /// @see yaca_context_get_output_length() - int yaca_open_update( - yaca_context_h ctx, - ffi.Pointer ciphertext, - int ciphertext_len, - ffi.Pointer plaintext, - ffi.Pointer plaintext_len, - ) { - return _yaca_open_update( - ctx, - ciphertext, - ciphertext_len, - plaintext, - plaintext_len, - ); - } - - late final _yaca_open_updatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - yaca_context_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Pointer)>>('yaca_open_update'); - late final _yaca_open_update = _yaca_open_updatePtr.asFunction< - int Function(yaca_context_h, ffi.Pointer, int, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Decrypts last chunk of sealed message. - /// - /// @remarks Skipping yaca_open_update() and calling only yaca_open_finalize() will produce a - /// decryption of an empty ciphertext. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] ctx A valid open context - /// @param[out] plaintext Final piece of the decrypted data - /// (must be allocated by client, see yaca_context_get_output_length()) - /// @param[out] plaintext_len Length of the final piece, - /// actual number of bytes written will be returned here - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a ctx), wrong #YACA_PROPERTY_GCM_AAD or - /// wrong #YACA_PROPERTY_GCM_TAG was used - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_open_initialize() - /// @see yaca_open_update() - /// @see yaca_context_get_output_length() - int yaca_open_finalize( - yaca_context_h ctx, - ffi.Pointer plaintext, - ffi.Pointer plaintext_len, - ) { - return _yaca_open_finalize( - ctx, - plaintext, - plaintext_len, - ); - } - - late final _yaca_open_finalizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_context_h, ffi.Pointer, - ffi.Pointer)>>('yaca_open_finalize'); - late final _yaca_open_finalize = _yaca_open_finalizePtr.asFunction< - int Function( - yaca_context_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Initializes a signature context for asymmetric signatures. - /// - /// @since_tizen 3.0 - /// - /// @remarks For verification use yaca_verify_initialize(), yaca_verify_update() and - /// yaca_verify_finalize() functions with matching public key. - /// - /// @remarks For RSA operations the default padding used is #YACA_PADDING_PKCS1. It can be - /// changed using yaca_context_set_property() with #YACA_PROPERTY_PADDING. - /// - /// @remarks For #YACA_DIGEST_SHA384 and #YACA_DIGEST_SHA512 the RSA key size must be bigger than - /// #YACA_KEY_LENGTH_512BIT. - /// - /// @remarks Using of #YACA_DIGEST_MD5 algorithm for DSA and ECDSA operations is prohibited. - /// - /// @remarks Using of #YACA_DIGEST_MD5 or #YACA_DIGEST_SHA224 with #YACA_PADDING_X931 is prohibited. - /// - /// @remarks The @a ctx should be released using yaca_context_destroy(). - /// - /// @param[out] ctx Newly created context - /// @param[in] algo Digest algorithm that will be used - /// @param[in] prv_key Private key that will be used, algorithm is deduced based - /// on key type, supported key types: - /// - #YACA_KEY_TYPE_RSA_PRIV, - /// - #YACA_KEY_TYPE_DSA_PRIV, - /// - #YACA_KEY_TYPE_EC_PRIV - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a algo or @a prv_key) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_type_e - /// @see #yaca_digest_algorithm_e - /// @see #yaca_padding_e - /// @see yaca_context_set_property() - /// @see yaca_sign_update() - /// @see yaca_sign_finalize() - /// @see yaca_verify_initialize() - /// @see yaca_verify_update() - /// @see yaca_verify_finalize() - /// @see yaca_context_destroy() - int yaca_sign_initialize( - ffi.Pointer ctx, - int algo, - yaca_key_h prv_key, - ) { - return _yaca_sign_initialize( - ctx, - algo, - prv_key, - ); - } - - late final _yaca_sign_initializePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int32, - yaca_key_h)>>('yaca_sign_initialize'); - late final _yaca_sign_initialize = _yaca_sign_initializePtr - .asFunction, int, yaca_key_h)>(); - - /// @brief Initializes a signature context for HMAC. - /// - /// @since_tizen 3.0 - /// - /// @remarks For verification, calculate message HMAC and compare with received MAC using - /// yaca_memcmp(). - /// - /// @remarks The @a ctx should be released using yaca_context_destroy(). - /// - /// @param[out] ctx Newly created context - /// @param[in] algo Digest algorithm that will be used - /// @param[in] sym_key Symmetric key that will be used, supported key types: - /// - #YACA_KEY_TYPE_SYMMETRIC, - /// - #YACA_KEY_TYPE_DES - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a algo or @a sym_key) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_type_e - /// @see #yaca_digest_algorithm_e - /// @see yaca_sign_update() - /// @see yaca_sign_finalize() - /// @see yaca_memcmp() - /// @see yaca_context_destroy() - int yaca_sign_initialize_hmac( - ffi.Pointer ctx, - int algo, - yaca_key_h sym_key, - ) { - return _yaca_sign_initialize_hmac( - ctx, - algo, - sym_key, - ); - } - - late final _yaca_sign_initialize_hmacPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int32, - yaca_key_h)>>('yaca_sign_initialize_hmac'); - late final _yaca_sign_initialize_hmac = _yaca_sign_initialize_hmacPtr - .asFunction, int, yaca_key_h)>(); - - /// @brief Initializes a signature context for CMAC. - /// - /// @since_tizen 3.0 - /// - /// @remarks For verification, calculate message CMAC and compare with received MAC using - /// yaca_memcmp(). - /// - /// @remarks The @a ctx should be released using yaca_context_destroy(). - /// - /// @param[out] ctx Newly created context - /// @param[in] algo Encryption algorithm that will be used - /// @param[in] sym_key Symmetric key that will be used, supported key types: - /// - #YACA_KEY_TYPE_SYMMETRIC, - /// - #YACA_KEY_TYPE_DES - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a algo or @a sym_key) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_type_e - /// @see #yaca_encrypt_algorithm_e - /// @see yaca_sign_update() - /// @see yaca_sign_finalize() - /// @see yaca_memcmp() - /// @see yaca_context_destroy() - int yaca_sign_initialize_cmac( - ffi.Pointer ctx, - int algo, - yaca_key_h sym_key, - ) { - return _yaca_sign_initialize_cmac( - ctx, - algo, - sym_key, - ); - } - - late final _yaca_sign_initialize_cmacPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int32, - yaca_key_h)>>('yaca_sign_initialize_cmac'); - late final _yaca_sign_initialize_cmac = _yaca_sign_initialize_cmacPtr - .asFunction, int, yaca_key_h)>(); - - /// @brief Feeds the message into the digital signature or MAC algorithm. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] ctx Context created by yaca_sign_initialize(), - /// yaca_sign_initialize_hmac() or yaca_sign_initialize_cmac() - /// @param[in] message Message to be signed - /// @param[in] message_len Length of the message - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0, - /// invalid @a ctx) - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_sign_initialize() - /// @see yaca_sign_finalize() - /// @see yaca_sign_initialize_hmac() - /// @see yaca_sign_initialize_cmac() - int yaca_sign_update( - yaca_context_h ctx, - ffi.Pointer message, - int message_len, - ) { - return _yaca_sign_update( - ctx, - message, - message_len, - ); - } - - late final _yaca_sign_updatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_context_h, ffi.Pointer, - ffi.Size)>>('yaca_sign_update'); - late final _yaca_sign_update = _yaca_sign_updatePtr - .asFunction, int)>(); - - /// @brief Calculates the final signature or MAC. - /// - /// @since_tizen 3.0 - /// - /// @remarks Skipping yaca_sign_update() and calling only yaca_sign_finalize() will produce a - /// signature or MAC of an empty message. - /// - /// @param[in,out] ctx A valid sign context - /// @param[out] signature Buffer for the MAC or the message signature - /// (must be allocated by client, see yaca_context_get_output_length()) - /// @param[out] signature_len Length of the MAC or the signature, - /// actual number of bytes written will be returned here - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a ctx) - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_sign_initialize() - /// @see yaca_sign_update() - /// @see yaca_sign_initialize_hmac() - /// @see yaca_sign_initialize_cmac() - /// @see yaca_context_get_output_length() - int yaca_sign_finalize( - yaca_context_h ctx, - ffi.Pointer signature, - ffi.Pointer signature_len, - ) { - return _yaca_sign_finalize( - ctx, - signature, - signature_len, - ); - } - - late final _yaca_sign_finalizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_context_h, ffi.Pointer, - ffi.Pointer)>>('yaca_sign_finalize'); - late final _yaca_sign_finalize = _yaca_sign_finalizePtr.asFunction< - int Function( - yaca_context_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Initializes a signature verification context for asymmetric signatures. - /// - /// @since_tizen 3.0 - /// - /// @remarks For RSA operations the default padding used is #YACA_PADDING_PKCS1. It can be - /// changed using yaca_context_set_property() with #YACA_PROPERTY_PADDING. - /// For verify to succeed it has to be set to the same value it was signed with. - /// - /// @remarks The @a ctx should be released using yaca_context_destroy(). - /// - /// @param[out] ctx Newly created context - /// @param[in] algo Digest algorithm that will be used - /// @param[in] pub_key Public key that will be used, algorithm is deduced based on - /// key type, supported key types: - /// - #YACA_KEY_TYPE_RSA_PUB, - /// - #YACA_KEY_TYPE_DSA_PUB, - /// - #YACA_KEY_TYPE_EC_PUB - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a algo or @a pub_key) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_type_e - /// @see #yaca_digest_algorithm_e - /// @see #yaca_padding_e - /// @see yaca_context_set_property() - /// @see yaca_verify_update() - /// @see yaca_verify_finalize() - /// @see yaca_context_destroy() - int yaca_verify_initialize( - ffi.Pointer ctx, - int algo, - yaca_key_h pub_key, - ) { - return _yaca_verify_initialize( - ctx, - algo, - pub_key, - ); - } - - late final _yaca_verify_initializePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int32, - yaca_key_h)>>('yaca_verify_initialize'); - late final _yaca_verify_initialize = _yaca_verify_initializePtr - .asFunction, int, yaca_key_h)>(); - - /// @brief Feeds the message into the digital signature verification algorithm. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] ctx Context created by yaca_verify_initialize() - /// @param[in] message Message - /// @param[in] message_len Length of the message - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0, - /// invalid @a ctx) - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_verify_initialize() - /// @see yaca_verify_finalize() - int yaca_verify_update( - yaca_context_h ctx, - ffi.Pointer message, - int message_len, - ) { - return _yaca_verify_update( - ctx, - message, - message_len, - ); - } - - late final _yaca_verify_updatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_context_h, ffi.Pointer, - ffi.Size)>>('yaca_verify_update'); - late final _yaca_verify_update = _yaca_verify_updatePtr - .asFunction, int)>(); - - /// @brief Performs the verification. - /// - /// @since_tizen 3.0 - /// - /// @remarks Skipping yaca_verify_update() and calling only yaca_verify_finalize() will verify - /// the signature of an empty message. - /// - /// @param[in,out] ctx A valid verify context - /// @param[in] signature Message signature to be verified - /// @param[in] signature_len Length of the signature - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a ctx) - /// @retval #YACA_ERROR_INTERNAL Internal error - /// @retval #YACA_ERROR_DATA_MISMATCH The verification failed - /// - /// @see yaca_verify_initialize() - /// @see yaca_verify_update() - /// @see yaca_sign_finalize() - int yaca_verify_finalize( - yaca_context_h ctx, - ffi.Pointer signature, - int signature_len, - ) { - return _yaca_verify_finalize( - ctx, - signature, - signature_len, - ); - } - - late final _yaca_verify_finalizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_context_h, ffi.Pointer, - ffi.Size)>>('yaca_verify_finalize'); - late final _yaca_verify_finalize = _yaca_verify_finalizePtr - .asFunction, int)>(); - - /// @brief Initializes a digest context. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a ctx should be released using yaca_context_destroy(). - /// - /// @param[out] ctx Newly created context - /// @param[in] algo Digest algorithm that will be used - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a algo) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_digest_algorithm_e - /// @see yaca_digest_update() - /// @see yaca_digest_finalize() - /// @see yaca_context_destroy() - int yaca_digest_initialize( - ffi.Pointer ctx, - int algo, - ) { - return _yaca_digest_initialize( - ctx, - algo, - ); - } - - late final _yaca_digest_initializePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Int32)>>('yaca_digest_initialize'); - late final _yaca_digest_initialize = _yaca_digest_initializePtr - .asFunction, int)>(); - - /// @brief Feeds the message into the message digest algorithm. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] ctx Context created by yaca_digest_initialize() - /// @param[in] message Message from which the digest is to be calculated - /// @param[in] message_len Length of the message - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0, - /// invalid @a ctx) - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_digest_initialize() - /// @see yaca_digest_finalize() - int yaca_digest_update( - yaca_context_h ctx, - ffi.Pointer message, - int message_len, - ) { - return _yaca_digest_update( - ctx, - message, - message_len, - ); - } - - late final _yaca_digest_updatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_context_h, ffi.Pointer, - ffi.Size)>>('yaca_digest_update'); - late final _yaca_digest_update = _yaca_digest_updatePtr - .asFunction, int)>(); - - /// @brief Calculates the final digest. - /// - /// @since_tizen 3.0 - /// - /// @remarks Skipping yaca_digest_update() and calling only yaca_digest_finalize() will produce an - /// empty message digest. - /// - /// @param[in,out] ctx A valid digest context - /// @param[out] digest Buffer for the message digest - /// (must be allocated by client, see yaca_context_get_output_length()) - /// @param[out] digest_len Length of the digest, - /// actual number of bytes written will be returned here - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a ctx) - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_digest_initialize() - /// @see yaca_digest_update() - /// @see yaca_context_get_output_length() - int yaca_digest_finalize( - yaca_context_h ctx, - ffi.Pointer digest, - ffi.Pointer digest_len, - ) { - return _yaca_digest_finalize( - ctx, - digest, - digest_len, - ); - } - - late final _yaca_digest_finalizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_context_h, ffi.Pointer, - ffi.Pointer)>>('yaca_digest_finalize'); - late final _yaca_digest_finalize = _yaca_digest_finalizePtr.asFunction< - int Function( - yaca_context_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets key's type. - /// - /// @since_tizen 3.0 - /// - /// @param[in] key Key which type we return - /// @param[out] key_type Key type - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Either of the params is NULL - /// - /// @see #yaca_key_type_e - int yaca_key_get_type( - yaca_key_h key, - ffi.Pointer key_type, - ) { - return _yaca_key_get_type( - key, - key_type, - ); - } - - late final _yaca_key_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - yaca_key_h, ffi.Pointer)>>('yaca_key_get_type'); - late final _yaca_key_get_type = _yaca_key_get_typePtr - .asFunction)>(); - - /// @brief Gets key's length (in bits). - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a key can be any symmetric (including an Initialization Vector) or - /// asymmetric key (including key generation parameters). - /// - /// @remarks For Diffie-Helmann @a key_bit_len returns prime length in bits. Values - /// used to generate the key/parameters in yaca_key_generate() are not - /// restored. Neither generator number nor values from #yaca_key_bit_length_dh_rfc_e. - /// - /// @remarks For Elliptic Curves @a key_bit_len returns values from #yaca_key_bit_length_ec_e. - /// - /// @param[in] key Key which length we return - /// @param[out] key_bit_len Key length in bits - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Either of the params is NULL - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_bit_length_e - /// @see #yaca_key_bit_length_dh_rfc_e - /// @see #yaca_key_bit_length_ec_e - int yaca_key_get_bit_length( - yaca_key_h key, - ffi.Pointer key_bit_len, - ) { - return _yaca_key_get_bit_length( - key, - key_bit_len, - ); - } - - late final _yaca_key_get_bit_lengthPtr = _lookup< - ffi - .NativeFunction)>>( - 'yaca_key_get_bit_length'); - late final _yaca_key_get_bit_length = _yaca_key_get_bit_lengthPtr - .asFunction)>(); - - /// @brief Imports a key or key generation parameters. - /// - /// @since_tizen 3.0 - /// - /// @remarks Everywhere where either a key (of any type) or an asymmetric key is referred - /// in the documentation of this function key generator parameters are also included. - /// - /// @remarks This function imports a key trying to match it to the @a key_type specified. - /// It should autodetect both the key format and the file format. - /// - /// @remarks For symmetric, Initialization Vector and DES keys RAW binary format and BASE64 encoded - /// binary format are supported. - /// For asymmetric keys PEM and DER file formats are supported. - /// - /// @remarks Asymmetric keys can be in their default ASN1 structure formats (like - /// PKCS#1, SSleay or PKCS#3). Private asymmetric keys can also be in - /// PKCS#8 format. Additionally it is possible to import public RSA/DSA/EC - /// keys from X509 certificate. - /// - /// @remarks If the key is encrypted the algorithm will be autodetected and password - /// used. If it's not known if the key is encrypted one should pass NULL as - /// password and check for the #YACA_ERROR_INVALID_PASSWORD return code. - /// - /// @remarks If the imported key will be detected as a format that does not support - /// encryption and password was passed #YACA_ERROR_INVALID_PARAMETER will - /// be returned. For a list of keys and formats that do support encryption - /// see yaca_key_export() documentation. - /// - /// @remarks The @a key should be released using yaca_key_destroy(). - /// - /// @param[in] key_type Type of the key - /// @param[in] password Null-terminated password for the key (can be NULL) - /// @param[in] data Blob containing the key - /// @param[in] data_len Size of the blob - /// @param[out] key Returned key - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0, - /// invalid @a key_type or @a data_len too big) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// @retval #YACA_ERROR_INVALID_PASSWORD Invalid @a password given or @a password was required - /// and none was given - /// - /// @see #yaca_key_type_e - /// @see yaca_key_export() - /// @see yaca_key_destroy() - int yaca_key_import( - int key_type, - ffi.Pointer password, - ffi.Pointer data, - int data_len, - ffi.Pointer key, - ) { - return _yaca_key_import( - key_type, - password, - data, - data_len, - key, - ); - } - - late final _yaca_key_importPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.Pointer)>>('yaca_key_import'); - late final _yaca_key_import = _yaca_key_importPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - /// @brief Exports a key or key generation parameters to arbitrary format. - /// - /// @since_tizen 3.0 - /// - /// @remarks Everywhere where either a key (of any type) or an asymmetric key is referred - /// in the documentation of this function key generator parameters are also included. - /// - /// @remarks This function exports the key to an arbitrary key format and key file format. - /// - /// @remarks For key formats two values are allowed: - /// - #YACA_KEY_FORMAT_DEFAULT: this is the only option possible in case of symmetric keys - /// (or Initialization Vector), for asymmetric keys it will - /// export to their default ASN1 structure format - /// (e.g. PKCS#1, SSLeay, PKCS#3). - /// - #YACA_KEY_FORMAT_PKCS8: this will only work for private asymmetric keys. - /// - /// @remarks The following file formats are supported: - /// - #YACA_KEY_FILE_FORMAT_RAW: used only for symmetric, raw binary format - /// - #YACA_KEY_FILE_FORMAT_BASE64: used only for symmetric, BASE64 encoded binary form - /// - #YACA_KEY_FILE_FORMAT_PEM: used only for asymmetric, PEM file format - /// - #YACA_KEY_FILE_FORMAT_DER: used only for asymmetric, DER file format - /// - /// @remarks Encryption is supported and optional for RSA/DSA private keys in the - /// #YACA_KEY_FORMAT_DEFAULT with #YACA_KEY_FILE_FORMAT_PEM format. If no password is - /// provided the exported key will be unencrypted. The encryption algorithm used - /// in this case is AES-256-CBC. - /// - /// @remarks Encryption is obligatory for #YACA_KEY_FORMAT_PKCS8 format (for both, PEM and DER - /// file formats). If no password is provided the #YACA_ERROR_INVALID_PARAMETER will - /// be returned. The encryption algorithm used in this case is AES-256-CBC. The key is - /// generated from password using PBKDF2 with HMAC-SHA1 function and 2048 iterations. - /// - /// @remarks Encryption is not supported for the symmetric, public keys and key generation - /// parameters in all their supported formats. If a password is provided in such - /// case the #YACA_ERROR_INVALID_PARAMETER will be returned. - /// - /// @param[in] key Key to be exported - /// @param[in] key_fmt Format of the key - /// @param[in] key_file_fmt Format of the key file - /// @param[in] password Password used for the encryption (can be NULL) - /// @param[out] data Data, allocated by the library, containing exported key - /// (must be freed with yaca_free()) - /// @param[out] data_len Size of the output data - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0, - /// invalid @a key_fmt, @a key_file_fmt or @a data_len too big) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_format_e - /// @see #yaca_key_file_format_e - /// @see yaca_key_import() - /// @see yaca_key_destroy() - int yaca_key_export( - yaca_key_h key, - int key_fmt, - int key_file_fmt, - ffi.Pointer password, - ffi.Pointer> data, - ffi.Pointer data_len, - ) { - return _yaca_key_export( - key, - key_fmt, - key_file_fmt, - password, - data, - data_len, - ); - } - - late final _yaca_key_exportPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - yaca_key_h, - ffi.Int32, - ffi.Int32, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('yaca_key_export'); - late final _yaca_key_export = _yaca_key_exportPtr.asFunction< - int Function(yaca_key_h, int, int, ffi.Pointer, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Generates a secure key or key generation parameters (or an Initialization Vector). - /// - /// @since_tizen 3.0 - /// - /// @remarks This function is used to generate symmetric keys, private asymmetric keys - /// or key generation parameters for key types that support them (DSA, DH and EC). - /// - /// @remarks Supported key lengths: - /// - RSA: length >= 512bits - /// - DSA: length >= 512bits, multiple of 64 - /// - DH: a value taken from #yaca_key_bit_length_dh_rfc_e or - /// (YACA_KEY_LENGTH_DH_GENERATOR_* | prime_length_in_bits), - /// where prime_length_in_bits can be any positive number - /// - EC: a value taken from #yaca_key_bit_length_ec_e - /// - /// @remarks The @a key should be released using yaca_key_destroy(). - /// - /// @param[in] key_type Type of the key to be generated - /// @param[in] key_bit_len Length of the key (in bits) to be generated - /// @param[out] key Newly generated key - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER @a key is NULL, incorrect @a key_type or - /// @a key_bit_len is not dividable by 8 - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_type_e - /// @see #yaca_key_bit_length_e - /// @see #yaca_key_bit_length_dh_rfc_e - /// @see #YACA_KEY_LENGTH_DH_GENERATOR_2 - /// @see #YACA_KEY_LENGTH_DH_GENERATOR_5 - /// @see #yaca_key_bit_length_ec_e - /// @see yaca_key_destroy() - int yaca_key_generate( - int key_type, - int key_bit_len, - ffi.Pointer key, - ) { - return _yaca_key_generate( - key_type, - key_bit_len, - key, - ); - } - - late final _yaca_key_generatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Size, - ffi.Pointer)>>('yaca_key_generate'); - late final _yaca_key_generate = _yaca_key_generatePtr - .asFunction)>(); - - /// @brief Generates a secure private asymmetric key from parameters. - /// - /// @since_tizen 3.0 - /// - /// @remarks This function is used to generate private asymmetric keys - /// based on pre-generated parameters. - /// - /// @remarks The @a key should be released using yaca_key_destroy(). - /// - /// @param[in] params Pre-generated parameters - /// @param[out] prv_key Newly generated private key - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER @a prv_key is NULL or incorrect @a params - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_key_destroy() - /// @see yaca_key_generate() - /// @see yaca_key_extract_parameters() - int yaca_key_generate_from_parameters( - yaca_key_h params, - ffi.Pointer prv_key, - ) { - return _yaca_key_generate_from_parameters( - params, - prv_key, - ); - } - - late final _yaca_key_generate_from_parametersPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_key_h, - ffi.Pointer)>>('yaca_key_generate_from_parameters'); - late final _yaca_key_generate_from_parameters = - _yaca_key_generate_from_parametersPtr - .asFunction)>(); - - /// @brief Extracts public key from a private one. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a pub_key should be released using yaca_key_destroy(). - /// - /// @param[in] prv_key Private key to extract the public one from - /// @param[out] pub_key Extracted public key - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER @a prv_key is of invalid type or @a pub_key is NULL - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_key_generate() - /// @see yaca_key_import() - /// @see yaca_key_destroy() - int yaca_key_extract_public( - yaca_key_h prv_key, - ffi.Pointer pub_key, - ) { - return _yaca_key_extract_public( - prv_key, - pub_key, - ); - } - - late final _yaca_key_extract_publicPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - yaca_key_h, ffi.Pointer)>>('yaca_key_extract_public'); - late final _yaca_key_extract_public = _yaca_key_extract_publicPtr - .asFunction)>(); - - /// @brief Extracts parameters from a private or a public key. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a params should be released using yaca_key_destroy(). - /// - /// @param[in] key A key to extract the parameters from - /// @param[out] params Extracted parameters - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER @a key is of invalid type or @a params is NULL - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_key_generate() - /// @see yaca_key_generate_from_parameters() - /// @see yaca_key_import() - /// @see yaca_key_destroy() - int yaca_key_extract_parameters( - yaca_key_h key, - ffi.Pointer params, - ) { - return _yaca_key_extract_parameters( - key, - params, - ); - } - - late final _yaca_key_extract_parametersPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(yaca_key_h, - ffi.Pointer)>>('yaca_key_extract_parameters'); - late final _yaca_key_extract_parameters = _yaca_key_extract_parametersPtr - .asFunction)>(); - - /// @brief Derives a shared secret using Diffie-Helmann or EC Diffie-Helmann key exchange protocol. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a secret should not be used as a symmetric key, - /// to produce a symmetric key pass the secret to a key derivation function (KDF) - /// or a message digest function. - /// - /// @remarks The @a secret should be freed with yaca_free(). - /// - /// @param[in] prv_key Our private key - /// @param[in] pub_key Peer public key - /// @param[out] secret Generated shared secret - /// @param[out] secret_len Size of the shared secret - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values - /// (invalid @a prv_key or @a pub_key) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see yaca_key_derive_kdf() - /// @see yaca_simple_calculate_digest() - /// @see yaca_free() - int yaca_key_derive_dh( - yaca_key_h prv_key, - yaca_key_h pub_key, - ffi.Pointer> secret, - ffi.Pointer secret_len, - ) { - return _yaca_key_derive_dh( - prv_key, - pub_key, - secret, - secret_len, - ); - } - - late final _yaca_key_derive_dhPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - yaca_key_h, - yaca_key_h, - ffi.Pointer>, - ffi.Pointer)>>('yaca_key_derive_dh'); - late final _yaca_key_derive_dh = _yaca_key_derive_dhPtr.asFunction< - int Function(yaca_key_h, yaca_key_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Derives a key material from shared secret. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a info parameter is ANSI X9.42 OtherInfo or ANSI X9.62 SharedInfo structure, - /// more information can be found in ANSI X9.42/62 standard specification. - /// - /// @remarks The @a key_material or separate parts of it can be used to import a symmetric key - /// with yaca_key_import(). - /// - /// @remarks The @a key_material should be freed using yaca_free(). - /// - /// @param[in] kdf Key derivation function - /// @param[in] algo Digest algorithm that should be used in key derivation - /// @param[in] secret Shared secret - /// @param[in] secret_len Size of the shared secret - /// @param[in] info Optional additional info, use NULL if not appending extra info - /// @param[in] info_len Length of additional info, use 0 if not using additional info - /// @param[in] key_material_len Length of a key material to be generated - /// @param[out] key_material Newly generated key material - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0, - /// invalid @a algo or @a kdf) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_kdf_e - /// @see #yaca_digest_algorithm_e - /// @see yaca_key_derive_dh() - /// @see yaca_key_import() - /// @see yaca_free() - int yaca_key_derive_kdf( - int kdf, - int algo, - ffi.Pointer secret, - int secret_len, - ffi.Pointer info, - int info_len, - int key_material_len, - ffi.Pointer> key_material, - ) { - return _yaca_key_derive_kdf( - kdf, - algo, - secret, - secret_len, - info, - info_len, - key_material_len, - key_material, - ); - } - - late final _yaca_key_derive_kdfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - ffi.Int32, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Pointer>)>>('yaca_key_derive_kdf'); - late final _yaca_key_derive_kdf = _yaca_key_derive_kdfPtr.asFunction< - int Function(int, int, ffi.Pointer, int, ffi.Pointer, - int, int, ffi.Pointer>)>(); - - /// @brief Derives a key from user password (PKCS #5 a.k.a. pbkdf2 algorithm). - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a key should be released using yaca_key_destroy(). - /// - /// @param[in] password User password as a null-terminated string - /// @param[in] salt Salt, should be a non-empty string - /// @param[in] salt_len Length of the salt - /// @param[in] iterations Number of iterations - /// @param[in] algo Digest algorithm that should be used in key generation - /// @param[in] key_bit_len Length of a key (in bits) to be generated - /// @param[out] key Newly generated key - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0, - /// invalid @a algo or @a key_bit_len not dividable by 8) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_digest_algorithm_e - /// @see yaca_key_destroy() - int yaca_key_derive_pbkdf2( - ffi.Pointer password, - ffi.Pointer salt, - int salt_len, - int iterations, - int algo, - int key_bit_len, - ffi.Pointer key, - ) { - return _yaca_key_derive_pbkdf2( - password, - salt, - salt_len, - iterations, - algo, - key_bit_len, - key, - ); - } - - late final _yaca_key_derive_pbkdf2Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Int32, - ffi.Size, - ffi.Pointer)>>('yaca_key_derive_pbkdf2'); - late final _yaca_key_derive_pbkdf2 = _yaca_key_derive_pbkdf2Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, int, int, - int, ffi.Pointer)>(); - - /// @brief Release the key created by the library. Passing YACA_KEY_NULL is allowed. - /// - /// @since_tizen 3.0 - /// - /// @param[in,out] key Key to be released - /// - /// @see yaca_key_import() - /// @see yaca_key_export() - /// @see yaca_key_generate() - void yaca_key_destroy( - yaca_key_h key, - ) { - return _yaca_key_destroy( - key, - ); - } - - late final _yaca_key_destroyPtr = - _lookup>( - 'yaca_key_destroy'); - late final _yaca_key_destroy = - _yaca_key_destroyPtr.asFunction(); - - /// @brief Encrypts data using a RSA public key (low-level encrypt equivalent). - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a ciphertext should be freed using yaca_free(). - /// - /// @remarks The @a pub_key used has to be of a #YACA_KEY_TYPE_RSA_PUB type. - /// - /// @remarks The maximum length of plaintext depends on the key length and padding method. - /// See #yaca_padding_e for details. - /// - /// @remarks The @a plaintext can be NULL but then the @a plaintext_len must be 0. - /// - /// @param[in] padding Padding method - /// @param[in] pub_key Public RSA key (see yaca_key.h for key generation functions) - /// @param[in] plaintext Plaintext to be encrypted - /// @param[in] plaintext_len Length of the plaintext - /// @param[out] ciphertext Encrypted data, will be allocated by the library - /// @param[out] ciphertext_len Length of the encrypted data (may be larger than decrypted) - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0 - /// invalid @a padding, @a pub_key or @a plaintext_len) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_type_e - /// @see #yaca_padding_e - /// @see yaca_rsa_private_decrypt() - /// @see yaca_free() - int yaca_rsa_public_encrypt( - int padding, - yaca_key_h pub_key, - ffi.Pointer plaintext, - int plaintext_len, - ffi.Pointer> ciphertext, - ffi.Pointer ciphertext_len, - ) { - return _yaca_rsa_public_encrypt( - padding, - pub_key, - plaintext, - plaintext_len, - ciphertext, - ciphertext_len, - ); - } - - late final _yaca_rsa_public_encryptPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - yaca_key_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer>, - ffi.Pointer)>>('yaca_rsa_public_encrypt'); - late final _yaca_rsa_public_encrypt = _yaca_rsa_public_encryptPtr.asFunction< - int Function(int, yaca_key_h, ffi.Pointer, int, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Decrypts data using a RSA private key (low-level decrypt equivalent). - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a plaintext should be freed using yaca_free(). - /// - /// @remarks The @a prv_key used has to be of a #YACA_KEY_TYPE_RSA_PRIV type. - /// - /// @param[in] padding Padding method - /// @param[in] prv_key Private RSA key matching the public one used to encrypt the data - /// @param[in] ciphertext Ciphertext to be decrypted - /// @param[in] ciphertext_len Length of ciphertext - /// @param[out] plaintext Decrypted data, will be allocated by the library - /// @param[out] plaintext_len Length of the decrypted data - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0 - /// invalid @a padding or @a prv_key), padding check failed - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_type_e - /// @see #yaca_padding_e - /// @see yaca_rsa_public_encrypt() - /// @see yaca_free() - int yaca_rsa_private_decrypt( - int padding, - yaca_key_h prv_key, - ffi.Pointer ciphertext, - int ciphertext_len, - ffi.Pointer> plaintext, - ffi.Pointer plaintext_len, - ) { - return _yaca_rsa_private_decrypt( - padding, - prv_key, - ciphertext, - ciphertext_len, - plaintext, - plaintext_len, - ); - } - - late final _yaca_rsa_private_decryptPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - yaca_key_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer>, - ffi.Pointer)>>('yaca_rsa_private_decrypt'); - late final _yaca_rsa_private_decrypt = - _yaca_rsa_private_decryptPtr.asFunction< - int Function(int, yaca_key_h, ffi.Pointer, int, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Encrypts data using a RSA private key (low-level sign equivalent). - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a ciphertext should be freed using yaca_free(). - /// - /// @remarks The @a prv_key used has to be of a #YACA_KEY_TYPE_RSA_PRIV type. - /// - /// @remarks The maximum length of plaintext depends on the key length and padding method, - /// see #yaca_padding_e for details. - /// - /// @remarks The @a plaintext can be NULL but then the @a plaintext_len must be 0. - /// - /// @param[in] padding Padding method - /// @param[in] prv_key Private RSA key (see yaca_key.h for key generation functions) - /// @param[in] plaintext Plaintext to be encrypted - /// @param[in] plaintext_len Length of the plaintext - /// @param[out] ciphertext Encrypted data, will be allocated by the library - /// @param[out] ciphertext_len Length of the encrypted data (may be larger than decrypted) - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0 - /// invalid @a padding, @a prv_key or @a plaintext_len) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_type_e - /// @see #yaca_padding_e - /// @see yaca_rsa_public_decrypt() - /// @see yaca_free() - int yaca_rsa_private_encrypt( - int padding, - yaca_key_h prv_key, - ffi.Pointer plaintext, - int plaintext_len, - ffi.Pointer> ciphertext, - ffi.Pointer ciphertext_len, - ) { - return _yaca_rsa_private_encrypt( - padding, - prv_key, - plaintext, - plaintext_len, - ciphertext, - ciphertext_len, - ); - } - - late final _yaca_rsa_private_encryptPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - yaca_key_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer>, - ffi.Pointer)>>('yaca_rsa_private_encrypt'); - late final _yaca_rsa_private_encrypt = - _yaca_rsa_private_encryptPtr.asFunction< - int Function(int, yaca_key_h, ffi.Pointer, int, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Decrypts data using a RSA public key (low-level verify equivalent). - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a plaintext should be freed using yaca_free(). - /// - /// @remarks The @a pub_key used has to be of a #YACA_KEY_TYPE_RSA_PUB type. - /// - /// @param[in] padding Padding method - /// @param[in] pub_key Public RSA key matching the private one used to encrypt the data - /// @param[in] ciphertext Ciphertext to be decrypted - /// @param[in] ciphertext_len Length of ciphertext - /// @param[out] plaintext Decrypted data, will be allocated by the library - /// @param[out] plaintext_len Length of the decrypted data - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0 - /// invalid @a padding or @a pub_key), padding check failed - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_type_e - /// @see #yaca_padding_e - /// @see yaca_rsa_private_encrypt() - /// @see yaca_free() - int yaca_rsa_public_decrypt( - int padding, - yaca_key_h pub_key, - ffi.Pointer ciphertext, - int ciphertext_len, - ffi.Pointer> plaintext, - ffi.Pointer plaintext_len, - ) { - return _yaca_rsa_public_decrypt( - padding, - pub_key, - ciphertext, - ciphertext_len, - plaintext, - plaintext_len, - ); - } - - late final _yaca_rsa_public_decryptPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - yaca_key_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer>, - ffi.Pointer)>>('yaca_rsa_public_decrypt'); - late final _yaca_rsa_public_decrypt = _yaca_rsa_public_decryptPtr.asFunction< - int Function(int, yaca_key_h, ffi.Pointer, int, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Encrypts data using a symmetric cipher. - /// - /// @since_tizen 3.0 - /// - /// @remarks yaca_simple_encrypt() doesn't support #YACA_BCM_GCM and #YACA_BCM_CCM. - /// - /// @remarks The @a ciphertext should be freed using yaca_free(). - /// - /// @remarks The @a plaintext can be NULL but then @a plaintext_len must be 0. - /// - /// @param[in] algo Encryption algorithm (select #YACA_ENCRYPT_AES if unsure) - /// @param[in] bcm Chaining mode (select #YACA_BCM_CBC if unsure) - /// @param[in] sym_key Symmetric encryption key (see yaca_key.h for key generation functions) - /// @param[in] iv Initialization Vector - /// @param[in] plaintext Plaintext to be encrypted - /// @param[in] plaintext_len Length of the plaintext - /// @param[out] ciphertext Encrypted data, will be allocated by the library - /// @param[out] ciphertext_len Length of the encrypted data (may be larger than decrypted) - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0 - /// invalid @a algo, @a bcm, @a sym_key or @a iv) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_encrypt_algorithm_e - /// @see #yaca_block_cipher_mode_e - /// @see yaca_simple_decrypt() - /// @see yaca_free() - int yaca_simple_encrypt( - int algo, - int bcm, - yaca_key_h sym_key, - yaca_key_h iv, - ffi.Pointer plaintext, - int plaintext_len, - ffi.Pointer> ciphertext, - ffi.Pointer ciphertext_len, - ) { - return _yaca_simple_encrypt( - algo, - bcm, - sym_key, - iv, - plaintext, - plaintext_len, - ciphertext, - ciphertext_len, - ); - } - - late final _yaca_simple_encryptPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - ffi.Int32, - yaca_key_h, - yaca_key_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer>, - ffi.Pointer)>>('yaca_simple_encrypt'); - late final _yaca_simple_encrypt = _yaca_simple_encryptPtr.asFunction< - int Function(int, int, yaca_key_h, yaca_key_h, ffi.Pointer, int, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Decrypts data using a symmetric cipher. - /// - /// @since_tizen 3.0 - /// - /// @remarks yaca_simple_decrypt() doesn't support #YACA_BCM_GCM and #YACA_BCM_CCM. - /// - /// @remarks The @a plaintext should be freed using yaca_free(). - /// - /// @remarks The @a ciphertext can be NULL but then @a ciphertext_len must be 0. - /// - /// @param[in] algo Decryption algorithm that was used to encrypt the data - /// @param[in] bcm Chaining mode that was used to encrypt the data - /// @param[in] sym_key Symmetric encryption key that was used to encrypt the data - /// @param[in] iv Initialization Vector that was used to encrypt the data - /// @param[in] ciphertext Ciphertext to be decrypted - /// @param[in] ciphertext_len Length of ciphertext - /// @param[out] plaintext Decrypted data, will be allocated by the library - /// @param[out] plaintext_len Length of the decrypted data - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0 - /// invalid @a algo, @a bcm, @a sym_key or @a iv) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_encrypt_algorithm_e - /// @see #yaca_block_cipher_mode_e - /// @see yaca_simple_encrypt() - /// @see yaca_free() - int yaca_simple_decrypt( - int algo, - int bcm, - yaca_key_h sym_key, - yaca_key_h iv, - ffi.Pointer ciphertext, - int ciphertext_len, - ffi.Pointer> plaintext, - ffi.Pointer plaintext_len, - ) { - return _yaca_simple_decrypt( - algo, - bcm, - sym_key, - iv, - ciphertext, - ciphertext_len, - plaintext, - plaintext_len, - ); - } - - late final _yaca_simple_decryptPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - ffi.Int32, - yaca_key_h, - yaca_key_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer>, - ffi.Pointer)>>('yaca_simple_decrypt'); - late final _yaca_simple_decrypt = _yaca_simple_decryptPtr.asFunction< - int Function(int, int, yaca_key_h, yaca_key_h, ffi.Pointer, int, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Calculates a digest of a message. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a digest should be freed using yaca_free(). - /// - /// @remarks The @a message can be NULL but then @a message_len must be 0. - /// - /// @param[in] algo Digest algorithm (select #YACA_DIGEST_SHA256 if unsure) - /// @param[in] message Message from which the digest is to be calculated - /// @param[in] message_len Length of the message - /// @param[out] digest Message digest, will be allocated by the library - /// @param[out] digest_len Length of message digest (depends on algorithm) - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, - /// invalid @a algo) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_digest_algorithm_e - /// @see yaca_free() - int yaca_simple_calculate_digest( - int algo, - ffi.Pointer message, - int message_len, - ffi.Pointer> digest, - ffi.Pointer digest_len, - ) { - return _yaca_simple_calculate_digest( - algo, - message, - message_len, - digest, - digest_len, - ); - } - - late final _yaca_simple_calculate_digestPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - ffi.Pointer, - ffi.Size, - ffi.Pointer>, - ffi.Pointer)>>('yaca_simple_calculate_digest'); - late final _yaca_simple_calculate_digest = - _yaca_simple_calculate_digestPtr.asFunction< - int Function(int, ffi.Pointer, int, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Creates a signature using asymmetric private key. - /// - /// @since_tizen 3.0 - /// - /// @remarks For #YACA_DIGEST_SHA384 and #YACA_DIGEST_SHA512 the RSA key size must be bigger than - /// #YACA_KEY_LENGTH_512BIT. - /// - /// @remarks Using of #YACA_DIGEST_MD5 algorithm for DSA and ECDSA operations is prohibited. - /// - /// @remarks The @a signature should be freed using yaca_free(). - /// - /// @remarks The @a message can be NULL but then @a message_len must be 0. - /// - /// @param[in] algo Digest algorithm that will be used - /// @param[in] prv_key Private key that will be used, algorithm is - /// deduced based on key type, supported key types: - /// - #YACA_KEY_TYPE_RSA_PRIV, - /// - #YACA_KEY_TYPE_DSA_PRIV, - /// - #YACA_KEY_TYPE_EC_PRIV - /// @param[in] message Message to be signed - /// @param[in] message_len Length of the message - /// @param[out] signature Message signature, will be allocated by the library - /// @param[out] signature_len Length of the signature - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0 - /// invalid @a algo or @a prv_key) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_type_e - /// @see #yaca_digest_algorithm_e - /// @see yaca_simple_verify_signature() - /// @see yaca_free() - int yaca_simple_calculate_signature( - int algo, - yaca_key_h prv_key, - ffi.Pointer message, - int message_len, - ffi.Pointer> signature, - ffi.Pointer signature_len, - ) { - return _yaca_simple_calculate_signature( - algo, - prv_key, - message, - message_len, - signature, - signature_len, - ); - } - - late final _yaca_simple_calculate_signaturePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - yaca_key_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer>, - ffi.Pointer)>>('yaca_simple_calculate_signature'); - late final _yaca_simple_calculate_signature = - _yaca_simple_calculate_signaturePtr.asFunction< - int Function(int, yaca_key_h, ffi.Pointer, int, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Verifies a signature using asymmetric public key. - /// - /// @since_tizen 3.0 - /// - /// @remarks The @a message can be NULL but then @a message_len must be 0. - /// - /// @param[in] algo Digest algorithm that will be used - /// @param[in] pub_key Public key that will be used, algorithm is - /// deduced based on key type, supported key types: - /// - #YACA_KEY_TYPE_RSA_PUB, - /// - #YACA_KEY_TYPE_DSA_PUB, - /// - #YACA_KEY_TYPE_EC_PUB - /// @param[in] message Message - /// @param[in] message_len Length of the message - /// @param[in] signature Message signature to be verified - /// @param[in] signature_len Length of the signature - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0 - /// invalid @a algo or @a pub_key) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// @retval #YACA_ERROR_DATA_MISMATCH The verification failed - /// - /// @see #yaca_key_type_e - /// @see #yaca_digest_algorithm_e - /// @see yaca_simple_calculate_signature() - int yaca_simple_verify_signature( - int algo, - yaca_key_h pub_key, - ffi.Pointer message, - int message_len, - ffi.Pointer signature, - int signature_len, - ) { - return _yaca_simple_verify_signature( - algo, - pub_key, - message, - message_len, - signature, - signature_len, - ); - } - - late final _yaca_simple_verify_signaturePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - yaca_key_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Size)>>('yaca_simple_verify_signature'); - late final _yaca_simple_verify_signature = - _yaca_simple_verify_signaturePtr.asFunction< - int Function(int, yaca_key_h, ffi.Pointer, int, - ffi.Pointer, int)>(); - - /// @brief Calculates a HMAC of given message using symmetric key. - /// - /// @since_tizen 3.0 - /// - /// @remarks For verification, calculate message HMAC and compare with received MAC using - /// yaca_memcmp(). - /// - /// @remarks The @a mac should be freed using yaca_free(). - /// - /// @remarks The @a message can be NULL but then @a message_len must be 0. - /// - /// @param[in] algo Digest algorithm that will be used - /// @param[in] sym_key Key that will be used, supported key types: - /// - #YACA_KEY_TYPE_SYMMETRIC, - /// - #YACA_KEY_TYPE_DES - /// @param[in] message Message to calculate HMAC from - /// @param[in] message_len Length of the message - /// @param[out] mac MAC, will be allocated by the library - /// @param[out] mac_len Length of the MAC - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0 - /// invalid @a algo or @a sym_key) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_type_e - /// @see #yaca_digest_algorithm_e - /// @see yaca_memcmp() - /// @see yaca_free() - int yaca_simple_calculate_hmac( - int algo, - yaca_key_h sym_key, - ffi.Pointer message, - int message_len, - ffi.Pointer> mac, - ffi.Pointer mac_len, - ) { - return _yaca_simple_calculate_hmac( - algo, - sym_key, - message, - message_len, - mac, - mac_len, - ); - } - - late final _yaca_simple_calculate_hmacPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - yaca_key_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer>, - ffi.Pointer)>>('yaca_simple_calculate_hmac'); - late final _yaca_simple_calculate_hmac = - _yaca_simple_calculate_hmacPtr.asFunction< - int Function(int, yaca_key_h, ffi.Pointer, int, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Calculates a CMAC of given message using symmetric key. - /// - /// @since_tizen 3.0 - /// - /// @remarks For verification, calculate message CMAC and compare with received MAC using - /// yaca_memcmp(). - /// - /// @remarks The @a mac should be freed using yaca_free(). - /// - /// @remarks The @a message can be NULL but then @a message_len must be 0. - /// - /// @param[in] algo Encryption algorithm that will be used - /// @param[in] sym_key Key that will be used, supported key types: - /// - #YACA_KEY_TYPE_SYMMETRIC, - /// - #YACA_KEY_TYPE_DES - /// @param[in] message Message to calculate CMAC from - /// @param[in] message_len Length of the message - /// @param[out] mac MAC, will be allocated by the library - /// @param[out] mac_len Length of the MAC - /// - /// @return #YACA_ERROR_NONE on success, negative on error - /// @retval #YACA_ERROR_NONE Successful - /// @retval #YACA_ERROR_INVALID_PARAMETER Required parameters have incorrect values (NULL, 0 - /// invalid @a algo or @a sym_key) - /// @retval #YACA_ERROR_OUT_OF_MEMORY Out of memory error - /// @retval #YACA_ERROR_INTERNAL Internal error - /// - /// @see #yaca_key_type_e - /// @see #yaca_encrypt_algorithm_e - /// @see yaca_memcmp() - /// @see yaca_free() - int yaca_simple_calculate_cmac( - int algo, - yaca_key_h sym_key, - ffi.Pointer message, - int message_len, - ffi.Pointer> mac, - ffi.Pointer mac_len, - ) { - return _yaca_simple_calculate_cmac( - algo, - sym_key, - message, - message_len, - mac, - mac_len, - ); - } - - late final _yaca_simple_calculate_cmacPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - yaca_key_h, - ffi.Pointer, - ffi.Size, - ffi.Pointer>, - ffi.Pointer)>>('yaca_simple_calculate_cmac'); - late final _yaca_simple_calculate_cmac = - _yaca_simple_calculate_cmacPtr.asFunction< - int Function(int, yaca_key_h, ffi.Pointer, int, - ffi.Pointer>, ffi.Pointer)>(); - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_book _calendar_book view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// Currently NOT Used - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID Read, Write Description
string _uri read only Identifier of this calendar book view
integer id read only DB record ID of the calendar book
string uid read, write Unique identifier
string name read, write Calendar book name
string description read, write Calendar book description
string color read, write Calendar book color for UX
string location read, write Location of the event
integer visibility read, write Visibility of the calendar book for UX
integer sync_event read, write
integer account_id read, write once Account for this calendar
integer store_type read, write Type of calendar contents(refer to the @ref calendar_book_type_e)
string sync_data1 read, write Generic data for use by syncing
string sync_data2 read, write Generic data for use by syncing
string sync_data3 read, write Generic data for use by syncing
string sync_data4 read, write Generic data for use by syncing
integer mode read, write Calendar book mode (refer to the @ref calendar_book_mode_e)
- late final ffi.Pointer<_calendar_book_property_ids> __calendar_book = - _lookup<_calendar_book_property_ids>('_calendar_book'); - - _calendar_book_property_ids get _calendar_book => __calendar_book.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event _calendar_event view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// Refer to the @ref calendar_event_priority_e - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// The timezone of the start_time - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID Read, Write Description
string _uri read only Identifier of this event view
integer id read only DB record ID of the event
integer calendar_book_id read, write ID of the calendar book to which the event belongs
string summary read, write The short description of the event
string description read, write The description of the event
string location read, write The location of the event
string categories read, write The category of the event. For example APPOINTMENT, BIRTHDAY
string exdate read, write The exception list of the event. If this event has a recurrence rule, the instance of the exdate is removed. Format is "YYYYMMDD"(allday event) or "YYYYMMDDTHHMMSS". Multiple exceptions can be included with a comma
integer event_status read, write Refer to the @ref calendar_event_status_e
integer priority read, write
integer timezone read, write The timezone_id of the event if it exists. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_timezone
integer person_id read, write The person_id of the event if the event is a birthday. Refer to the contacts-service
integer busy_status read, write Refer to the @ref calendar_event_busy_status_e
integer sensitivity read, write Refer to the @ref calendar_sensitivity_e
string uid read, write The unique ID of the event
string organizer_name read, write The name of organizer of the event
string organizer_email read, write The email address of the organizer of the event
integer meeting_status read, write Refer to the @ref calendar_meeting_status_e
integer original_event_id read, write The ID of the original event if the event is an exception.
double latitude read, write The latitude of the location of the event
double longitude read, write The longitude of the location of the event
integer email_id read, write ID of the email_id. Refer to the email-service.
long long int created_time read, write The time when the event is created
long long int last_modified_time read only The time when the event is updated
integer is_deleted read only
integer freq read, write The frequent type of event recurrence. Refer to the @ref calendar_recurrence_frequency_e
integer range_type read, write Refer to the @ref calendar_range_type_e
calendar time until_time read, write The end time of the event recurrence. If the range_type is @ref CALENDAR_RANGE_UNTIL
integer count read, write The count of the event recurrence. If the range_type is @ref CALENDAR_RANGE_COUNT
integer interval read, write The interval of the event recurrence
string bysecond read, write The second list of the event recurrence. The value can be from 0 to 59. The list is seperated by commas
string byminute read, write The minute list of the event recurrence. The value can be from 0 to 59. The list is seperated by commas
string byhour read, write The hour list of the event recurrence. The value can be from 0 to 23. The list is seperated by commas
string byday read, write The day list of the event recurrence. The value can be SU, MO, TU, WE, TH, FR, SA. The list is seperated by commas
string bymonthday read, write The month day list of the event recurrence. The value can be from 1 to 31 and from -31 to -1. The list is seperated by commas
string byyearday read, write The year day list of the event recurrence. The value can be from 1 to 366 and from -366 to -1. The list is seperated by commas
string byweekno read, write The week number list of the event recurrence. The value can be from 1 to 53 and from -53 to -1. The list is seperated by commas
string bymonth read, write The month list of the event recurrence. The value can be from 1 to 12. The list is seperated by commas
string bysetpos read, write The position list of the event recurrence. The value can be from 1 to 366 and from -366 to -1. The list is seperated by commas
integer wkst read, write The start day of the week. Refer to the @ref calendar_days_of_week_e
string recurrence_id read, write RECURRENCE-ID of RFC #2445
string rdate read, write RDATE of RFC #2445
integer has_attendee read only Whether or not the event has an attendee list
integer has_alarm read only Whether or not the event has an alarm list
integer calendar_system_type read, write Refer to the @ref calendar_system_type_e
string sync_data1 read, write The sync data of the event. If developer need to save some information related to the event, they can use this property
string sync_data2 read, write The sync data of the event. If developer need to save some information related to the event, they can use this property
string sync_data3 read, write The sync data of the event. If developer need to save some information related to the event, they can use this property
string sync_data4 read, write The sync data of the event. If developer need to save some information related to the event, they can use this property
calendar time start_time read, write The start time of the event
string start_tzid read, write
calendar time end_time read, write The end time of the event
string end_tzid read, write The timezone of the end_time
child list calendar_alarm read, write The alarm list of the event. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_alarm
child list calendar_attendee read, write The attendee list of the event. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_attendee
child list exception read, write The exception mod event list of the event
child list extended read, write The extended property list of the event. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_extended_property
integer is_allday read only The event is an allday event or not
integer link_count read only The event is a linked event (Since 4.0)
integer link_base_id read only The event is a base linked event (Since 4.0)
- late final ffi.Pointer<_calendar_event_property_ids> __calendar_event = - _lookup<_calendar_event_property_ids>('_calendar_event'); - - _calendar_event_property_ids get _calendar_event => __calendar_event.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_todo _calendar_todo view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// The timezone of the start_time - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID Read, Write Description
string _uri read only Identifier of this todo view
integer id read only DB record ID of the todo
integer calendar_book_id read, write ID of the calendar book to which the todo belongs
string summary read, write The short description of the todo
string description read, write The description of the todo
string location read, write The location of the todo
string categories read, write The category of the todo. For example APPOINTMENT, BIRTHDAY
integer todo_status read, write Refer to the @ref calendar_todo_status_e
integer priority read, write Refer to the @ref calendar_todo_priority_e
integer sensitivity read, write Refer to the @ref calendar_sensitivity_e
string uid read, write The unique ID of the todo
double latitude read, write The latitude of the location of the todo
double longitude read, write The longitude of the location of the todo
long long int created_time read, write The time when the todo is created
long long int last_modified_time read only The time when the todo is updated
long long int completed_time read, write The time when the todo is completed
integer progress read, write The progression of the todo. The value can be from 0 to 100
integer is_deleted read only
integer freq read, write The frequent type of todo recurrence. Refer to the @ref calendar_recurrence_frequency_e
integer range_type read, write Refer to the @ref calendar_range_type_e
calendar time until_time read, write The end time of the todo recurrence. If the range_type is CALENDAR_RANGE_UNTIL
integer count read, write The count of the todo recurrence. If the range_type is CALENDAR_RANGE_COUNT
integer interval read, write The interval of the todo recurrence
string bysecond read, write The second list of the todo recurrence. The value can be from 0 to 59. The list is seperated by commas
string byminute read, write The minute list of the todo recurrence. The value can be from 0 to 59. The list is seperated by commas
string byhour read, write The hour list of the todo recurrence. The value can be from 0 to 23. The list is seperated by commas
string byday read, write The day list of the todo recurrence. The value can be SU, MO, TU, WE, TH, FR, SA. The list is seperated by commas
string bymonthday read, write The month day list of the todo recurrence. The value can be from 1 to 31 and from -31 to -1. The list is seperated by commas
string byyearday read, write The year day list of the todo recurrence. The value can be from 1 to 366 and from -366 to -1. The list is seperated by commas
string byweekno read, write The week number list of the todo recurrence. The value can be from 1 to 53 and from -53 to -1. The list is seperated by commas
string bymonth read, write The month list of the todo recurrence. The value can be from 1 to 12. The list is seperated by commas
string bysetpos read, write The position list of the todo recurrence. The value can be from 1 to 366 and from -366 to -1. The list is seperated by commas
integer wkst read, write The start day of the week. Refer to the @ref calendar_days_of_week_e
integer has_alarm read only Whether or not the todo has an alarm list
string sync_data1 read, write The sync data of the todo. If developers need to save some information related to the todo, they can use this property
string sync_data2 read, write The sync data of the todo. If developers need to save some information related to the todo, they can use this property
string sync_data3 read, write The sync data of the todo. If developers need to save some information related to the todo, they can use this property
string sync_data4 read, write The sync data of the todo. If developers need to save some information related to the todo, they can use this property
calendar time start_time read, write The start time of the todo
string start_tzid read, write
calendar time due_time read, write The due time of the todo
string due_tzid read, write The timezone of the due_time
child list calendar_alarm read, write The alarm list of the todo. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_alarm
string organizer_name read, write The name of the organizer of the event
string organizer_email read, write The email address of the organizer of the event
integer has_attendee read only Whether or not the todo has an attendee list
child list calendar_attendee read, write The attendee list of the todo. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_attendee
child list extended read, write The extended property list of the todo. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_extended_property
integer is_allday read only The todo is an allday event or not
- late final ffi.Pointer<_calendar_todo_property_ids> __calendar_todo = - _lookup<_calendar_todo_property_ids>('_calendar_todo'); - - _calendar_todo_property_ids get _calendar_todo => __calendar_todo.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_timezone _calendar_timezone view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID Read, Write Description
string _uri read only Identifier of this timezone view
integer id read only DB record ID of the timezone
integer calendar_book_id read, write DB record ID of a related calendar book
integer tz_offset_from_gmt read, write UTC offset which is in use when the onset of this time zone observance begins. Valid values are -720(-12:00) to 840(+14:00)
string standard_name read, write Name of the Standard Time
integer standard_start_month read, write Starting month of the Standard Time. Month is 0-based. eg, 0 for January
integer standard_start_position_of_week read, write Starting day-of-week-in-month of the Standard Time. Day is 1-based
integer standard_start_day read, write Starting day-of-week of the Standard Time. Valid values are 1(SUNDAY) to 7(SATURDAY)
integer standard_start_hour read, write Starting hour of the Standard Time. Valid values are 0 to 23
integer standard_bias read, write The number of minutes added during the Standard Time
string day_light_name read, write Name of Daylight
integer day_light_start_month read, write Starting month of Daylight. Month is 0-based. eg, 0 for January
integer day_light_start_position_of_week read, write Starting day-of-week-in-month of Daylight. Day is 1-based
integer day_light_start_day read, write Starting day-of-week of Daylight. Valid values are 1(SUNDAY) to 7(SATURDAY)
integer day_light_start_hour read, write Starting hour of Daylight. Valid values are 0 to 23
integer day_light_bias read, write The number of minutes added during Daylight Time
- late final ffi.Pointer<_calendar_timezone_property_ids> __calendar_timezone = - _lookup<_calendar_timezone_property_ids>('_calendar_timezone'); - - _calendar_timezone_property_ids get _calendar_timezone => - __calendar_timezone.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_attendee _calendar_attendee view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID Read, Write Description
string _uri read only Identifier of this calendar attendee view
integer event_id read only Event/TODO that the attendee belongs to
string number read, write The number of the attendee
integer cutype read, write The type of attendee (one of CALENDAR_ATTENDEE_CUTYPE_INDIVIDUAL, CALENDAR_ATTENDEE_CUTYPE_GROUP, CALENDAR_ATTENDEE_CUTYPE_RESOURCE, CALENDAR_ATTENDEE_CUTYPE_ROOM, CALENDAR_ATTENDEE_CUTYPE_UNKNOWN)
integer person_id read, write Person ID that the attendee belongs to
string uid read, write Unique identifier
string email read, write The email address of the attendee
integer role read, write Attendee role (one of CALENDAR_ATTENDEE_ROLE_REQ_PARTICIPANT, CALENDAR_ATTENDEE_ROLE_OPT_PARTICIPANT, CALENDAR_ATTENDEE_ROLE_NON_PARTICIPANT, CALENDAR_ATTENDEE_ROLE_CHAIR)
integer status read, write Attendee status (one of CALENDAR_ATTENDEE_STATUS_PENDING, CALENDAR_ATTENDEE_STATUS_ACCEPTED, CALENDAR_ATTENDEE_STATUS_DECLINED, CALENDAR_ATTENDEE_STATUS_TENTATIVE, CALENDAR_ATTENDEE_STATUS_DELEGATED, CALENDAR_ATTENDEE_STATUS_COMPLETED, CALENDAR_ATTENDEE_STATUS_IN_PROCESS)
integer rsvp read, write RSVP invitation reply (one of true, false)
string delegatee_uri read, write Delegatee (DELEGATED-TO)
string delegator_uri read, write Delegator (DELEGATED-FROM)
string name read, write Attendee name
string member read, write Group that the attendee belongs to
- late final ffi.Pointer<_calendar_attendee_property_ids> __calendar_attendee = - _lookup<_calendar_attendee_property_ids>('_calendar_attendee'); - - _calendar_attendee_property_ids get _calendar_attendee => - __calendar_attendee.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_alarm _calendar_alarm view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID Read, Write Description
string _uri read only Identifier of this calendar alarm view
integer parent_id read only Event that the alarm belongs to
integer type read, write Currently NOT used
long long int time read, write The alarm time of the event(This represents the number of seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000(UTC)). This MUST be used with CALENDAR_ALARM_TIME_UNIT_SPECIFIC
integer tick read, write The number of unit before start time. This MUST be used with one of CALENDAR_ALARM_TIME_UNIT_MINUTE, CALENDAR_ALARM_TIME_UNIT_HOUR, CALENDAR_ALARM_TIME_UNIT_DAY, CALENDAR_ALARM_TIME_UNIT_WEEK.
integer tick_unit read, write Reminder tick time unit (one of CALENDAR_ALARM_NONE, CALENDAR_ALARM_TIME_UNIT_SPECIFIC, CALENDAR_ALARM_TIME_UNIT_MINUTE, CALENDAR_ALARM_TIME_UNIT_HOUR, CALENDAR_ALARM_TIME_UNIT_DAY, CALENDAR_ALARM_TIME_UNIT_WEEK)
string attach read, write Alarm tone path
string summary read, write Alarm summary
string description read, write Alarm description
integer action read, write Action of alarm (one of CALENDAR_ALARM_ACTION_AUDIO, CALENDAR_ALARM_ACTION_DISPLAY, CALENDAR_ALARM_ACTION_EMAIL)
calendar time alarm_time read, write The alarm time
- late final ffi.Pointer<_calendar_alarm_property_ids> __calendar_alarm = - _lookup<_calendar_alarm_property_ids>('_calendar_alarm'); - - _calendar_alarm_property_ids get _calendar_alarm => __calendar_alarm.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_updated_info _calendar_updated_info view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID Description
string _uri Identifier of this updated_info view
integer id Modified event(or todo) record ID
integer calendar_book_id Calendar book ID of the modified event(or todo) record
integer modified_status Enumeration value of the modified status (@ref calendar_record_modified_status_e)
integer version Version after change
- late final ffi.Pointer<_calendar_updated_info_property_ids> - __calendar_updated_info = - _lookup<_calendar_updated_info_property_ids>('_calendar_updated_info'); - - _calendar_updated_info_property_ids get _calendar_updated_info => - __calendar_updated_info.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event_calendar_book _calendar_event_calendar_book view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID
string _uri
integer event_id
integer calendar_book_id
string summary
string description
string location
string categories
string exdate
integer event_status
integer priority
integer timezone
integer person_id
integer busy_status
integer sensitivity
string uid
string organizer_name
string organizer_email
integer meeting_status
integer original_event_id
double latitude
double longitude
integer email_id
long long int created_time
long long int last_modified_time
integer freq
integer range_type
calendar time until_time
integer count
integer interval
string bysecond
string byminute
string byhour
string byday
string bymonthday
string byyearday
string byweekno
string bymonth
string bysetpos
integer wkst
string recurrence_id
string rdate
integer has_attendee
integer has_alarm
integer calendar_system_type
string sync_data1
string sync_data2
string sync_data3
string sync_data4
calendar time start_time
string start_tzid
calendar time end_time
string end_tzid
filter integer calendar_book_visibility
filter integer calendar_book_account_id
- late final ffi.Pointer<_calendar_event_calendar_book_property_ids> - __calendar_event_calendar_book = - _lookup<_calendar_event_calendar_book_property_ids>( - '_calendar_event_calendar_book'); - - _calendar_event_calendar_book_property_ids - get _calendar_event_calendar_book => __calendar_event_calendar_book.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_todo_calendar_book _calendar_todo_calendar_book view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID
string _uri
integer todo_id
integer calendar_book_id
string summary
string description
string location
string categories
integer todo_status
integer priority
integer sensitivity
string uid
double latitude
double longitude
long long int created_time
long long int last_modified_time
long long int completed_time
integer progress
integer freq
integer range_type
calendar time until_time
integer count
integer interval
string bysecond
string byminute
string byhour
string byday
string bymonthday
string byyearday
string byweekno
string bymonth
string bysetpos
integer wkst
integer has_alarm
string sync_data1
string sync_data2
string sync_data3
string sync_data4
calendar time start_time
string start_tzid
calendar time due_time
string due_tzid
filter integer calendar_book_visibility
filter integer calendar_book_account_id
- late final ffi.Pointer<_calendar_todo_calendar_book_property_ids> - __calendar_todo_calendar_book = - _lookup<_calendar_todo_calendar_book_property_ids>( - '_calendar_todo_calendar_book'); - - _calendar_todo_calendar_book_property_ids get _calendar_todo_calendar_book => - __calendar_todo_calendar_book.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event_calendar_book_attendee _calendar_event_calendar_book_attendee view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID
string _uri
integer event_id
integer calendar_book_id
string summary
string description
string location
string categories
string exdate
integer event_status
integer priority
integer timezone
integer person_id
integer busy_status
integer sensitivity
string uid
string organizer_name
string organizer_email
integer meeting_status
integer original_event_id
double latitude
double longitude
integer email_id
long long int created_time
long long int last_modified_time
integer freq
integer range_type
calendar time until_time
integer count
integer interval
string bysecond
string byminute
string byhour
string byday
string bymonthday
string byyearday
string byweekno
string bymonth
string bysetpos
integer wkst
string recurrence_id
string rdate
integer has_attendee
integer has_alarm
integer calendar_system_type
string sync_data1
string sync_data2
string sync_data3
string sync_data4
calendar time start_time
string start_tzid
calendar time end_time
string end_tzid
filter integer calendar_book_visibility
filter integer calendar_book_account_id
filter string attendee_email
filter string attendee_name
filter string attendee_member
- late final ffi.Pointer<_calendar_event_calendar_book_attendee_property_ids> - __calendar_event_calendar_book_attendee = - _lookup<_calendar_event_calendar_book_attendee_property_ids>( - '_calendar_event_calendar_book_attendee'); - - _calendar_event_calendar_book_attendee_property_ids - get _calendar_event_calendar_book_attendee => - __calendar_event_calendar_book_attendee.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_instance_utime_calendar_book _calendar_instance_utime_calendar_book view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID
string _uri
integer event_id
calendar time start_time
calendar time end_time
string summary
string location
integer calendar_book_id
string description
integer busy_status
integer event_status
integer priority
integer sensitivity
integer has_rrule
double latitude
double longitude
integer has_alarm
integer original_event_id
filter integer calendar_book_visibility
filter integer calendar_book_account_id
long long int last_modified_time
string sync_data1
- late final ffi.Pointer<_calendar_instance_utime_calendar_book_property_ids> - __calendar_instance_utime_calendar_book = - _lookup<_calendar_instance_utime_calendar_book_property_ids>( - '_calendar_instance_utime_calendar_book'); - - _calendar_instance_utime_calendar_book_property_ids - get _calendar_instance_utime_calendar_book => - __calendar_instance_utime_calendar_book.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_instance_localtime_calendar_book _calendar_instance_localtime_calendar_book view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID
string _uri
integer event_id
calendar time start_time
calendar time end_time
string summary
string location
integer calendar_book_id
string description
integer busy_status
integer event_status
integer priority
integer sensitivity
integer has_rrule
double latitude
double longitude
integer has_alarm
integer original_event_id
filter integer calendar_book_visibility
filter integer calendar_book_account_id
long long int last_modified_time
string sync_data1
int is_allday
- late final ffi - .Pointer<_calendar_instance_localtime_calendar_book_property_ids> - __calendar_instance_localtime_calendar_book = - _lookup<_calendar_instance_localtime_calendar_book_property_ids>( - '_calendar_instance_localtime_calendar_book'); - - _calendar_instance_localtime_calendar_book_property_ids - get _calendar_instance_localtime_calendar_book => - __calendar_instance_localtime_calendar_book.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_instance_utime_calendar_book_extended _calendar_instance_utime_calendar_book_extended view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID
string _uri
integer event_id
calendar time start_time
calendar time end_time
string summary
string location
integer calendar_book_id
string description
integer busy_status
integer event_status
integer priority
integer sensitivity
integer has_rrule
double latitude
double longitude
integer has_alarm
integer original_event_id
filter integer calendar_book_visibility
filter integer calendar_book_account_id
string organizer_name
string categories
integer has_attendee
string sync_data1
string sync_data2
string sync_data3
string sync_data4
- late final ffi - .Pointer<_calendar_instance_utime_calendar_book_extended_property_ids> - __calendar_instance_utime_calendar_book_extended = - _lookup<_calendar_instance_utime_calendar_book_extended_property_ids>( - '_calendar_instance_utime_calendar_book_extended'); - - _calendar_instance_utime_calendar_book_extended_property_ids - get _calendar_instance_utime_calendar_book_extended => - __calendar_instance_utime_calendar_book_extended.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_instance_localtime_calendar_book_extended _calendar_instance_localtime_calendar_book_extended view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
Type Property ID
string _uri
integer event_id
calendar time start_time
calendar time end_time
string summary
string location
integer calendar_book_id
string description
integer busy_status
integer event_status
integer priority
integer sensitivity
integer has_rrule
double latitude
double longitude
integer has_alarm
integer original_event_id
filter integer calendar_book_visibility
filter integer calendar_book_account_id
string organizer_name
string categories
integer has_attendee
string sync_data1
string sync_data2
string sync_data3
string sync_data4
- late final ffi - .Pointer<_calendar_instance_localtime_calendar_book_extended_property_ids> - __calendar_instance_localtime_calendar_book_extended = - _lookup<_calendar_instance_localtime_calendar_book_extended_property_ids>( - '_calendar_instance_localtime_calendar_book_extended'); - - _calendar_instance_localtime_calendar_book_extended_property_ids - get _calendar_instance_localtime_calendar_book_extended => - __calendar_instance_localtime_calendar_book_extended.ref; - - /// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE - /// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_extended_property _calendar_extended_property view (read only) - /// - /// - /// - /// - /// - /// - /// - /// Identifier of this extended_property view - /// - /// - /// - /// - /// - ///
Type Property ID Read, Write Description
string _uri read only
integer id read only DB record ID of the extended_property
integer record_id read,write Related record ID
integer record_type read, write Enumeration value of the record type (@ref calendar_record_type_e)
string key read, write The key of the property
string value read, write The value of the property
- late final ffi.Pointer<_calendar_extended_property_property_ids> - __calendar_extended_property = - _lookup<_calendar_extended_property_property_ids>( - '_calendar_extended_property'); - - _calendar_extended_property_property_ids get _calendar_extended_property => - __calendar_extended_property.ref; - - /// @brief Inserts a record into the calendar database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.write - /// @param[in] record The record handle - /// @param[out] record_id The record ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_NO_DATA Data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_db_update_record() - /// @see calendar_db_delete_record() - /// @see calendar_db_get_record() - int calendar_db_insert_record( - calendar_record_h record, - ffi.Pointer record_id, - ) { - return _calendar_db_insert_record( - record, - record_id, - ); - } - - late final _calendar_db_insert_recordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, - ffi.Pointer)>>('calendar_db_insert_record'); - late final _calendar_db_insert_record = _calendar_db_insert_recordPtr - .asFunction)>(); - - /// @brief Gets a record from the calendar database. - /// @details This function creates a new record handle from the calendar database by the given @a record_id. \n - /// @a record will be created and filled with record information. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.read - /// @remarks You must release @a record using calendar_record_destroy(). - /// @param[in] view_uri The view URI of a record - /// @param[in] record_id The record ID - /// @param[out] record The record handle associated with the record ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_NO_DATA Data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_record_destroy() - int calendar_db_get_record( - ffi.Pointer view_uri, - int record_id, - ffi.Pointer record, - ) { - return _calendar_db_get_record( - view_uri, - record_id, - record, - ); - } - - late final _calendar_db_get_recordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, - ffi.Pointer)>>('calendar_db_get_record'); - late final _calendar_db_get_record = _calendar_db_get_recordPtr.asFunction< - int Function( - ffi.Pointer, int, ffi.Pointer)>(); - - /// @brief Updates a record in the calendar database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.write - /// @param[in] record The record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_NO_DATA Data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_db_insert_record() - /// @see calendar_db_delete_record() - /// @see calendar_db_get_record() - int calendar_db_update_record( - calendar_record_h record, - ) { - return _calendar_db_update_record( - record, - ); - } - - late final _calendar_db_update_recordPtr = - _lookup>( - 'calendar_db_update_record'); - late final _calendar_db_update_record = _calendar_db_update_recordPtr - .asFunction(); - - /// @brief Deletes a record from the calendar database with related child records. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.write - /// @param[in] view_uri The view URI of a record - /// @param[in] record_id The record ID to be deleted - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found - /// @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_NO_DATA Data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_db_insert_record() - int calendar_db_delete_record( - ffi.Pointer view_uri, - int record_id, - ) { - return _calendar_db_delete_record( - view_uri, - record_id, - ); - } - - late final _calendar_db_delete_recordPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'calendar_db_delete_record'); - late final _calendar_db_delete_record = _calendar_db_delete_recordPtr - .asFunction, int)>(); - - /// @brief Retrieves all records as a list. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.read - /// @remarks You must release @a record_list using calendar_list_destroy(). - /// @param[in] view_uri The view URI to get records from - /// @param[in] offset The index from which results are received - /// @param[in] limit The maximum number of results(value 0 is used for all records) - /// @param[out] record_list The record list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_NO_DATA Data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_list_destroy() - int calendar_db_get_all_records( - ffi.Pointer view_uri, - int offset, - int limit, - ffi.Pointer record_list, - ) { - return _calendar_db_get_all_records( - view_uri, - offset, - limit, - record_list, - ); - } - - late final _calendar_db_get_all_recordsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int, - ffi.Pointer)>>('calendar_db_get_all_records'); - late final _calendar_db_get_all_records = - _calendar_db_get_all_recordsPtr.asFunction< - int Function( - ffi.Pointer, int, int, ffi.Pointer)>(); - - /// @brief Retrieves records using a query handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.read - /// @remarks You must release @a record_list using calendar_list_destroy(). - /// @param[in] query The query handle used to filter results - /// @param[in] offset The index from which results are received - /// @param[in] limit The maximum number of results(value 0 is used for all records) - /// @param[out] record_list The record list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_NO_DATA Data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_list_destroy() - int calendar_db_get_records_with_query( - calendar_query_h query, - int offset, - int limit, - ffi.Pointer record_list, - ) { - return _calendar_db_get_records_with_query( - query, - offset, - limit, - record_list, - ); - } - - late final _calendar_db_get_records_with_queryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_query_h, ffi.Int, ffi.Int, - ffi.Pointer)>>( - 'calendar_db_get_records_with_query'); - late final _calendar_db_get_records_with_query = - _calendar_db_get_records_with_queryPtr.asFunction< - int Function( - calendar_query_h, int, int, ffi.Pointer)>(); - - /// @brief Gets the record count of a specific view. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.read - /// @param[in] view_uri The view URI to get records from - /// @param[out] count The number of records - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_NO_DATA Data does not exist - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre This function requires an open connection to the calendar service using calendar_connect2(). - /// @see calendar_connect() - int calendar_db_get_count( - ffi.Pointer view_uri, - ffi.Pointer count, - ) { - return _calendar_db_get_count( - view_uri, - count, - ); - } - - late final _calendar_db_get_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('calendar_db_get_count'); - late final _calendar_db_get_count = _calendar_db_get_countPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Gets the record count with a query handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.read - /// @param[in] query The query handle used for filtering the results - /// @param[out] count The number of records - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_NO_DATA Data does not exist - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre This function requires an open connection to the calendar service using calendar_connect2(). - /// @see calendar_connect2() - int calendar_db_get_count_with_query( - calendar_query_h query, - ffi.Pointer count, - ) { - return _calendar_db_get_count_with_query( - query, - count, - ); - } - - late final _calendar_db_get_count_with_queryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_query_h, - ffi.Pointer)>>('calendar_db_get_count_with_query'); - late final _calendar_db_get_count_with_query = - _calendar_db_get_count_with_queryPtr - .asFunction)>(); - - /// @brief Inserts multiple records into the calendar database as a batch operation. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.write - /// @param[in] record_list The record list handle - /// @param[out] record_id_array The array of record IDs - /// @param[out] count The number of record IDs - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_NO_DATA Data does not exist - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_db_update_records() - /// @see calendar_db_delete_records() - int calendar_db_insert_records( - calendar_list_h record_list, - ffi.Pointer> record_id_array, - ffi.Pointer count, - ) { - return _calendar_db_insert_records( - record_list, - record_id_array, - count, - ); - } - - late final _calendar_db_insert_recordsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_list_h, ffi.Pointer>, - ffi.Pointer)>>('calendar_db_insert_records'); - late final _calendar_db_insert_records = - _calendar_db_insert_recordsPtr.asFunction< - int Function(calendar_list_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Updates multiple records into the calendar database as a batch operation. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.write - /// @param[in] record_list The record list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_NO_DATA Data does not exist - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_db_insert_records() - /// @see calendar_db_delete_records() - int calendar_db_update_records( - calendar_list_h record_list, - ) { - return _calendar_db_update_records( - record_list, - ); - } - - late final _calendar_db_update_recordsPtr = - _lookup>( - 'calendar_db_update_records'); - late final _calendar_db_update_records = _calendar_db_update_recordsPtr - .asFunction(); - - /// @brief Deletes multiple records with related child records from the calendar database as a batch operation. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.write - /// @param[in] view_uri The view URI of the records to delete - /// @param[in] record_id_array The record IDs to delete - /// @param[in] count The number of records - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found - /// @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_db_insert_records() - /// @see calendar_db_delete_records() - int calendar_db_delete_records( - ffi.Pointer view_uri, - ffi.Pointer record_id_array, - int count, - ) { - return _calendar_db_delete_records( - view_uri, - record_id_array, - count, - ); - } - - late final _calendar_db_delete_recordsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Int)>>('calendar_db_delete_records'); - late final _calendar_db_delete_records = - _calendar_db_delete_recordsPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); - - /// @brief Gets the current calendar database version. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.read - /// @param[out] calendar_db_version The calendar database version - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre This function requires an open connection to the calendar service using calendar_connect(). - /// @see calendar_connect() - /// @see calendar_db_get_changes_by_version() - int calendar_db_get_current_version( - ffi.Pointer calendar_db_version, - ) { - return _calendar_db_get_current_version( - calendar_db_version, - ); - } - - late final _calendar_db_get_current_versionPtr = - _lookup)>>( - 'calendar_db_get_current_version'); - late final _calendar_db_get_current_version = - _calendar_db_get_current_versionPtr - .asFunction)>(); - - /// @brief Registers a callback function to be invoked when a record changes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.read - /// @remarks If successive change notification produced on the view_uri are identical, - /// then they are coalesced into a single notification if the older notification has not yet been called - /// because default main loop is doing something. - /// But it means that a callback function is not called to reliably count of change. - /// This API supports only @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_book view, @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event view, - /// @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_todo view. - /// @param[in] view_uri The view URI of the record to subscribe for change notifications - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre This function requires an open connection to the calendar service using calendar_connect(). - /// @post calendar_db_changed_cb() will be invoked when the designated view changes. - /// @see calendar_connect() - /// @see calendar_db_changed_cb() - /// @see calendar_db_remove_changed_cb() - int calendar_db_add_changed_cb( - ffi.Pointer view_uri, - calendar_db_changed_cb callback, - ffi.Pointer user_data, - ) { - return _calendar_db_add_changed_cb( - view_uri, - callback, - user_data, - ); - } - - late final _calendar_db_add_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, calendar_db_changed_cb, - ffi.Pointer)>>('calendar_db_add_changed_cb'); - late final _calendar_db_add_changed_cb = - _calendar_db_add_changed_cbPtr.asFunction< - int Function(ffi.Pointer, calendar_db_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters a callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.read - /// @param[in] view_uri The view URI of the record to subscribe for change notifications - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre This function requires an open connection to the calendar service using calendar_connect(). - /// @see calendar_connect() - /// @see calendar_db_changed_cb() - /// @see calendar_db_add_changed_cb() - int calendar_db_remove_changed_cb( - ffi.Pointer view_uri, - calendar_db_changed_cb callback, - ffi.Pointer user_data, - ) { - return _calendar_db_remove_changed_cb( - view_uri, - callback, - user_data, - ); - } - - late final _calendar_db_remove_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, calendar_db_changed_cb, - ffi.Pointer)>>('calendar_db_remove_changed_cb'); - late final _calendar_db_remove_changed_cb = - _calendar_db_remove_changed_cbPtr.asFunction< - int Function(ffi.Pointer, calendar_db_changed_cb, - ffi.Pointer)>(); - - /// @brief Retrieves records with the given calendar database version. - /// @details This function finds all the changed records since the given @a calendar_db_version. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.read - /// @remarks You must release @a change_record_list using calendar_list_destroy(). - /// @param[in] view_uri The view URI to get records from - /// @param[in] calendar_book_id The calendar book ID to filter - /// @param[in] calendar_db_version The calendar database version - /// @param[out] record_list The record list - /// @param[out] current_calendar_db_version The current calendar database version - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_list_destroy() - int calendar_db_get_changes_by_version( - ffi.Pointer view_uri, - int calendar_book_id, - int calendar_db_version, - ffi.Pointer record_list, - ffi.Pointer current_calendar_db_version, - ) { - return _calendar_db_get_changes_by_version( - view_uri, - calendar_book_id, - calendar_db_version, - record_list, - current_calendar_db_version, - ); - } - - late final _calendar_db_get_changes_by_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Pointer, - ffi.Pointer)>>('calendar_db_get_changes_by_version'); - late final _calendar_db_get_changes_by_version = - _calendar_db_get_changes_by_versionPtr.asFunction< - int Function(ffi.Pointer, int, int, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Inserts a vcalendar stream into the calendar database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.write - /// @param[in] vcalendar_stream The vcalendar stream - /// @param[out] record_id_array The record IDs to delete - /// @param[out] count The number of record ID arrays - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_NO_DATA Data does not exist - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_db_replace_vcalendars() - int calendar_db_insert_vcalendars( - ffi.Pointer vcalendar_stream, - ffi.Pointer> record_id_array, - ffi.Pointer count, - ) { - return _calendar_db_insert_vcalendars( - vcalendar_stream, - record_id_array, - count, - ); - } - - late final _calendar_db_insert_vcalendarsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('calendar_db_insert_vcalendars'); - late final _calendar_db_insert_vcalendars = - _calendar_db_insert_vcalendarsPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Replaces a vcalendar stream in the calendar database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.write - /// @param[in] vcalendar_stream The vcalendar stream - /// @param[in] record_id_array The record IDs to replace - /// @param[in] count The number of record ID arrays - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_NO_DATA Data does not exist - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_DB_RECORD_NOT_FOUND Database not found - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre This function requires an open connection to the calendar service by calendar_connect(). - /// @see calendar_connect() - /// @see calendar_db_replace_vcalendars() - int calendar_db_replace_vcalendars( - ffi.Pointer vcalendar_stream, - ffi.Pointer record_id_array, - int count, - ) { - return _calendar_db_replace_vcalendars( - vcalendar_stream, - record_id_array, - count, - ); - } - - late final _calendar_db_replace_vcalendarsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Int)>>('calendar_db_replace_vcalendars'); - late final _calendar_db_replace_vcalendars = - _calendar_db_replace_vcalendarsPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); - - /// @brief Replaces a record in the calendar database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.write - /// @param[in] record The record handle - /// @param[in] record_id The record ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_db_update_record() - /// @see calendar_db_delete_record() - /// @see calendar_db_get_record() - int calendar_db_replace_record( - calendar_record_h record, - int record_id, - ) { - return _calendar_db_replace_record( - record, - record_id, - ); - } - - late final _calendar_db_replace_recordPtr = - _lookup>( - 'calendar_db_replace_record'); - late final _calendar_db_replace_record = _calendar_db_replace_recordPtr - .asFunction(); - - /// @brief Replaces multiple records in the calendar database as a batch operation. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.write - /// @param[in] record_list The record list handle - /// @param[in] record_id_array The record IDs - /// @param[in] count The number of record ID arrays - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_db_update_records() - /// @see calendar_db_delete_records() - /// @see calendar_db_replace_record() - int calendar_db_replace_records( - calendar_list_h record_list, - ffi.Pointer record_id_array, - int count, - ) { - return _calendar_db_replace_records( - record_list, - record_id_array, - count, - ); - } - - late final _calendar_db_replace_recordsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_list_h, ffi.Pointer, - ffi.Int)>>('calendar_db_replace_records'); - late final _calendar_db_replace_records = _calendar_db_replace_recordsPtr - .asFunction, int)>(); - - /// @brief Gets the last successful change version of the database on the current connection. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.read - /// @param[out] last_change_version The calendar database version on the current connection - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre This function requires an open connection to the calendar service using calendar_connect(). - /// @see calendar_connect() - /// @see calendar_db_get_current_version() - int calendar_db_get_last_change_version( - ffi.Pointer last_change_version, - ) { - return _calendar_db_get_last_change_version( - last_change_version, - ); - } - - late final _calendar_db_get_last_change_versionPtr = - _lookup)>>( - 'calendar_db_get_last_change_version'); - late final _calendar_db_get_last_change_version = - _calendar_db_get_last_change_versionPtr - .asFunction)>(); - - /// @brief Retrieves changed exception records since the given calendar database version. - /// Exceptions are the modified or deleted instances in a recurring event. - /// @details This function finds all the changed records since the given @a calendar_db_version. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.read - /// @remarks You must release @a change_record_list using calendar_list_destroy(). - /// @param[in] view_uri The view URI to get records from - /// @param[in] original_event_id The original event ID - /// @param[in] calendar_db_version The calendar database version starting from which to get records - /// @param[out] list The record list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - /// @see calendar_list_destroy() - int calendar_db_get_changes_exception_by_version( - ffi.Pointer view_uri, - int original_event_id, - int calendar_db_version, - ffi.Pointer list, - ) { - return _calendar_db_get_changes_exception_by_version( - view_uri, - original_event_id, - calendar_db_version, - list, - ); - } - - late final _calendar_db_get_changes_exception_by_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int, - ffi.Pointer)>>( - 'calendar_db_get_changes_exception_by_version'); - late final _calendar_db_get_changes_exception_by_version = - _calendar_db_get_changes_exception_by_versionPtr.asFunction< - int Function( - ffi.Pointer, int, int, ffi.Pointer)>(); - - /// @brief Cleans the data after sync. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.write - /// @param[in] calendar_book_id The calendar book ID - /// @param[in] calendar_db_version The calendar database version - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_NO_DATA Data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - int calendar_db_clean_after_sync( - int calendar_book_id, - int calendar_db_version, - ) { - return _calendar_db_clean_after_sync( - calendar_book_id, - calendar_db_version, - ); - } - - late final _calendar_db_clean_after_syncPtr = - _lookup>( - 'calendar_db_clean_after_sync'); - late final _calendar_db_clean_after_sync = - _calendar_db_clean_after_syncPtr.asFunction(); - - /// @brief Links a record to another record. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.write - /// @param[in] base_id The base record ID - /// @param[in] record_id The record ID to link to - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - int calendar_db_link_record( - int base_id, - int record_id, - ) { - return _calendar_db_link_record( - base_id, - record_id, - ); - } - - late final _calendar_db_link_recordPtr = - _lookup>( - 'calendar_db_link_record'); - late final _calendar_db_link_record = - _calendar_db_link_recordPtr.asFunction(); - - /// @brief Unlinks a record from base record. - /// @since_tizen 4.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.write - /// @param[in] record_id The record ID to unlink - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #CALENDAR_ERROR_FILE_NO_SPACE File system is full - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to open a connection to the calendar service. - /// @see calendar_connect() - int calendar_db_unlink_record( - int record_id, - ) { - return _calendar_db_unlink_record( - record_id, - ); - } - - late final _calendar_db_unlink_recordPtr = - _lookup>( - 'calendar_db_unlink_record'); - late final _calendar_db_unlink_record = - _calendar_db_unlink_recordPtr.asFunction(); - - /// @brief Creates a filter handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks You must release @a filter using calendar_filter_destroy(). - /// @param[in] view_uri The view URI of a filter - /// @param[out] filter The filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to initialize. - /// @see calendar_filter_destroy() - int calendar_filter_create( - ffi.Pointer view_uri, - ffi.Pointer filter, - ) { - return _calendar_filter_create( - view_uri, - filter, - ); - } - - late final _calendar_filter_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('calendar_filter_create'); - late final _calendar_filter_create = _calendar_filter_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys a filter handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] filter The filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_filter_create() - int calendar_filter_destroy( - calendar_filter_h filter, - ) { - return _calendar_filter_destroy( - filter, - ); - } - - late final _calendar_filter_destroyPtr = - _lookup>( - 'calendar_filter_destroy'); - late final _calendar_filter_destroy = - _calendar_filter_destroyPtr.asFunction(); - - /// @brief Adds a condition for the string type property. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] filter The filter handle - /// @param[in] property_id The property ID to add a condition - /// @param[in] match The match flag - /// @param[in] match_value The match value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_filter_add_operator() - int calendar_filter_add_str( - calendar_filter_h filter, - int property_id, - int match, - ffi.Pointer match_value, - ) { - return _calendar_filter_add_str( - filter, - property_id, - match, - match_value, - ); - } - - late final _calendar_filter_add_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_filter_h, ffi.UnsignedInt, ffi.Int32, - ffi.Pointer)>>('calendar_filter_add_str'); - late final _calendar_filter_add_str = _calendar_filter_add_strPtr.asFunction< - int Function(calendar_filter_h, int, int, ffi.Pointer)>(); - - /// @brief Adds a condition for the integer type property. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] filter The filter handle - /// @param[in] property_id The property ID to add a condition - /// @param[in] match The match flag - /// @param[in] match_value The match value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_filter_add_operator() - int calendar_filter_add_int( - calendar_filter_h filter, - int property_id, - int match, - int match_value, - ) { - return _calendar_filter_add_int( - filter, - property_id, - match, - match_value, - ); - } - - late final _calendar_filter_add_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_filter_h, ffi.UnsignedInt, ffi.Int32, - ffi.Int)>>('calendar_filter_add_int'); - late final _calendar_filter_add_int = _calendar_filter_add_intPtr - .asFunction(); - - /// @brief Adds a condition for the double type property. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] filter The filter handle - /// @param[in] property_id The property ID to add a condition - /// @param[in] match The match flag - /// @param[in] match_value The match value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_filter_add_operator() - int calendar_filter_add_double( - calendar_filter_h filter, - int property_id, - int match, - double match_value, - ) { - return _calendar_filter_add_double( - filter, - property_id, - match, - match_value, - ); - } - - late final _calendar_filter_add_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_filter_h, ffi.UnsignedInt, ffi.Int32, - ffi.Double)>>('calendar_filter_add_double'); - late final _calendar_filter_add_double = _calendar_filter_add_doublePtr - .asFunction(); - - /// @brief Adds a condition for the long long int type property. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] filter The filter handle - /// @param[in] property_id The property ID to add a condition - /// @param[in] match The match flag - /// @param[in] match_value The match value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_filter_add_operator() - int calendar_filter_add_lli( - calendar_filter_h filter, - int property_id, - int match, - int match_value, - ) { - return _calendar_filter_add_lli( - filter, - property_id, - match, - match_value, - ); - } - - late final _calendar_filter_add_lliPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_filter_h, ffi.UnsignedInt, ffi.Int32, - ffi.LongLong)>>('calendar_filter_add_lli'); - late final _calendar_filter_add_lli = _calendar_filter_add_lliPtr - .asFunction(); - - /// @brief Adds a condition for the calendar_time_s type property. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] filter The filter handle - /// @param[in] property_id The property ID to add a condition - /// @param[in] match The match flag - /// @param[in] match_value The match value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_filter_add_operator() - int calendar_filter_add_caltime( - calendar_filter_h filter, - int property_id, - int match, - calendar_time_s match_value, - ) { - return _calendar_filter_add_caltime( - filter, - property_id, - match, - match_value, - ); - } - - late final _calendar_filter_add_caltimePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_filter_h, ffi.UnsignedInt, ffi.Int32, - calendar_time_s)>>('calendar_filter_add_caltime'); - late final _calendar_filter_add_caltime = _calendar_filter_add_caltimePtr - .asFunction(); - - /// @brief Adds a child filter to a parent filter. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] parent_filter The parent filter handle - /// @param[in] child_filter The child filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_filter_add_operator() - int calendar_filter_add_filter( - calendar_filter_h parent_filter, - calendar_filter_h child_filter, - ) { - return _calendar_filter_add_filter( - parent_filter, - child_filter, - ); - } - - late final _calendar_filter_add_filterPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_filter_h, - calendar_filter_h)>>('calendar_filter_add_filter'); - late final _calendar_filter_add_filter = _calendar_filter_add_filterPtr - .asFunction(); - - /// @brief Adds an operator between conditions. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] filter The filter handle - /// @param[in] operator_type The operator type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_filter_add_str() - /// @see calendar_filter_add_int() - /// @see calendar_filter_add_double() - /// @see calendar_filter_add_caltime() - /// @see calendar_filter_add_filter() - int calendar_filter_add_operator( - calendar_filter_h filter, - int operator_type, - ) { - return _calendar_filter_add_operator( - filter, - operator_type, - ); - } - - late final _calendar_filter_add_operatorPtr = _lookup< - ffi.NativeFunction>( - 'calendar_filter_add_operator'); - late final _calendar_filter_add_operator = _calendar_filter_add_operatorPtr - .asFunction(); - - /// @brief Creates a calendar list handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks You must release @a calendar_list using calendar_list_destroy(). - /// @param[out] out_list The calendar list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_list_destroy() - int calendar_list_create( - ffi.Pointer out_list, - ) { - return _calendar_list_create( - out_list, - ); - } - - late final _calendar_list_createPtr = _lookup< - ffi.NativeFunction)>>( - 'calendar_list_create'); - late final _calendar_list_create = _calendar_list_createPtr - .asFunction)>(); - - /// @brief Destroys a calendar list handle and releases all its resources. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] list The calendar list handle - /// @param[in] delete_record If @c true, child records are destroyed automatically, - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_list_create() - int calendar_list_destroy( - calendar_list_h list, - bool delete_record, - ) { - return _calendar_list_destroy( - list, - delete_record, - ); - } - - late final _calendar_list_destroyPtr = - _lookup>( - 'calendar_list_destroy'); - late final _calendar_list_destroy = _calendar_list_destroyPtr - .asFunction(); - - /// @brief Retrieves the number of calendar entities in a calendar list. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] list The calendar list handle - /// @param[out] count The count of the calendar entity - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_list_add() - int calendar_list_get_count( - calendar_list_h list, - ffi.Pointer count, - ) { - return _calendar_list_get_count( - list, - count, - ); - } - - late final _calendar_list_get_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_list_h, - ffi.Pointer)>>('calendar_list_get_count'); - late final _calendar_list_get_count = _calendar_list_get_countPtr - .asFunction)>(); - - /// @brief Adds a record to the calendar list. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] list The calendar list handle - /// @param[in] record The record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_list_remove() - int calendar_list_add( - calendar_list_h list, - calendar_record_h record, - ) { - return _calendar_list_add( - list, - record, - ); - } - - late final _calendar_list_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - calendar_list_h, calendar_record_h)>>('calendar_list_add'); - late final _calendar_list_add = _calendar_list_addPtr - .asFunction(); - - /// @brief Removes a record from the calendar list. - /// @details If the record is the current record, then the current record is changed to the next record.\n - /// If the record is the last record then the current record will be @c NULL. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] list The calendar list handle - /// @param[in] record The record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_list_add() - int calendar_list_remove( - calendar_list_h list, - calendar_record_h record, - ) { - return _calendar_list_remove( - list, - record, - ); - } - - late final _calendar_list_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - calendar_list_h, calendar_record_h)>>('calendar_list_remove'); - late final _calendar_list_remove = _calendar_list_removePtr - .asFunction(); - - /// @brief Retrieves a record from the calendar list. - /// @details The default current record is the first record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks You MUST NOT destroy the @a record handle. - /// It is destroyed automatically when the @a list is destroyed. - /// @param[in] list The calendar list handle - /// @param[out] record The record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - int calendar_list_get_current_record_p( - calendar_list_h list, - ffi.Pointer record, - ) { - return _calendar_list_get_current_record_p( - list, - record, - ); - } - - late final _calendar_list_get_current_record_pPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - calendar_list_h, ffi.Pointer)>>( - 'calendar_list_get_current_record_p'); - late final _calendar_list_get_current_record_p = - _calendar_list_get_current_record_pPtr.asFunction< - int Function(calendar_list_h, ffi.Pointer)>(); - - /// @brief Moves a calendar list to the previous position. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] list The calendar list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_list_next() - int calendar_list_prev( - calendar_list_h list, - ) { - return _calendar_list_prev( - list, - ); - } - - late final _calendar_list_prevPtr = - _lookup>( - 'calendar_list_prev'); - late final _calendar_list_prev = - _calendar_list_prevPtr.asFunction(); - - /// @brief Moves a calendar list to the next position. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] list The calendar list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_list_prev() - int calendar_list_next( - calendar_list_h list, - ) { - return _calendar_list_next( - list, - ); - } - - late final _calendar_list_nextPtr = - _lookup>( - 'calendar_list_next'); - late final _calendar_list_next = - _calendar_list_nextPtr.asFunction(); - - /// @brief Moves a calendar list to the first position. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] list The calendar list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_list_last() - int calendar_list_first( - calendar_list_h list, - ) { - return _calendar_list_first( - list, - ); - } - - late final _calendar_list_firstPtr = - _lookup>( - 'calendar_list_first'); - late final _calendar_list_first = - _calendar_list_firstPtr.asFunction(); - - /// @brief Moves a calendar list to the last position. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] list The calendar list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_list_first() - int calendar_list_last( - calendar_list_h list, - ) { - return _calendar_list_last( - list, - ); - } - - late final _calendar_list_lastPtr = - _lookup>( - 'calendar_list_last'); - late final _calendar_list_last = - _calendar_list_lastPtr.asFunction(); - - /// @brief Creates a query handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks You must release @a query using calendar_query_destroy(). - /// @param[in] view_uri The view URI of a query - /// @param[out] query The filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to initialize. - /// @see calendar_query_destroy() - int calendar_query_create( - ffi.Pointer view_uri, - ffi.Pointer query, - ) { - return _calendar_query_create( - view_uri, - query, - ); - } - - late final _calendar_query_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('calendar_query_create'); - late final _calendar_query_create = _calendar_query_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys a query handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] query The query handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_query_create() - int calendar_query_destroy( - calendar_query_h query, - ) { - return _calendar_query_destroy( - query, - ); - } - - late final _calendar_query_destroyPtr = - _lookup>( - 'calendar_query_destroy'); - late final _calendar_query_destroy = - _calendar_query_destroyPtr.asFunction(); - - /// @brief Adds property IDs for projection. - /// @details Property IDs can be of one of the properties of view_uri which is used in calendar_query_create(). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] query The query handle - /// @param[in] property_id_array The property ID array - /// @param[in] count The number of property IDs - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - int calendar_query_set_projection( - calendar_query_h query, - ffi.Pointer property_id_array, - int count, - ) { - return _calendar_query_set_projection( - query, - property_id_array, - count, - ); - } - - late final _calendar_query_set_projectionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_query_h, ffi.Pointer, - ffi.Int)>>('calendar_query_set_projection'); - late final _calendar_query_set_projection = - _calendar_query_set_projectionPtr.asFunction< - int Function(calendar_query_h, ffi.Pointer, int)>(); - - /// @brief Sets the "distinct" option for projection. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] query The query handle - /// @param[in] set If @c true it is set, - /// otherwise if @c false it is unset - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - int calendar_query_set_distinct( - calendar_query_h query, - bool set1, - ) { - return _calendar_query_set_distinct( - query, - set1, - ); - } - - late final _calendar_query_set_distinctPtr = - _lookup>( - 'calendar_query_set_distinct'); - late final _calendar_query_set_distinct = _calendar_query_set_distinctPtr - .asFunction(); - - /// @brief Sets the filter for a query. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] query The query handle - /// @param[in] filter The filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_query_add_operator() - int calendar_query_set_filter( - calendar_query_h query, - calendar_filter_h filter, - ) { - return _calendar_query_set_filter( - query, - filter, - ); - } - - late final _calendar_query_set_filterPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_query_h, - calendar_filter_h)>>('calendar_query_set_filter'); - late final _calendar_query_set_filter = _calendar_query_set_filterPtr - .asFunction(); - - /// @brief Sets the sort mode for a query. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] query The query handle - /// @param[in] property_id The property ID to sort - /// @param[in] is_ascending If @c true it sorts in the ascending order, - /// otherwise if @c false it sorts in the descending order - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - int calendar_query_set_sort( - calendar_query_h query, - int property_id, - bool is_ascending, - ) { - return _calendar_query_set_sort( - query, - property_id, - is_ascending, - ); - } - - late final _calendar_query_set_sortPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_query_h, ffi.UnsignedInt, - ffi.Bool)>>('calendar_query_set_sort'); - late final _calendar_query_set_sort = _calendar_query_set_sortPtr - .asFunction(); - - /// @brief Creates a record handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks You must release @a record using calendar_record_destroy(). - /// @param[in] view_uri The view URI - /// @param[out] out_record The record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to initialize. - /// @see calendar_record_destroy() - int calendar_record_create( - ffi.Pointer view_uri, - ffi.Pointer out_record, - ) { - return _calendar_record_create( - view_uri, - out_record, - ); - } - - late final _calendar_record_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('calendar_record_create'); - late final _calendar_record_create = _calendar_record_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys a record handle and releases all its resources. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The record handle - /// @param[in] delete_child If @c true, child records are destroyed automatically, - /// otherwise @c false - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_create() - int calendar_record_destroy( - calendar_record_h record, - bool delete_child, - ) { - return _calendar_record_destroy( - record, - delete_child, - ); - } - - late final _calendar_record_destroyPtr = _lookup< - ffi.NativeFunction>( - 'calendar_record_destroy'); - late final _calendar_record_destroy = _calendar_record_destroyPtr - .asFunction(); - - /// @brief Makes a clone of a record handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks You must release @a cloned_record using calendar_record_destroy(). - /// @param[in] record The record handle - /// @param[out] out_record The cloned record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_destroy() - int calendar_record_clone( - calendar_record_h record, - ffi.Pointer out_record, - ) { - return _calendar_record_clone( - record, - out_record, - ); - } - - late final _calendar_record_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, - ffi.Pointer)>>('calendar_record_clone'); - late final _calendar_record_clone = _calendar_record_clonePtr.asFunction< - int Function(calendar_record_h, ffi.Pointer)>(); - - /// @brief Gets a URI string from a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The record handle - /// @param[out] uri The URI of the record - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - int calendar_record_get_uri_p( - calendar_record_h record, - ffi.Pointer> uri, - ) { - return _calendar_record_get_uri_p( - record, - uri, - ); - } - - late final _calendar_record_get_uri_pPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - calendar_record_h, ffi.Pointer>)>>( - 'calendar_record_get_uri_p'); - late final _calendar_record_get_uri_p = - _calendar_record_get_uri_pPtr.asFunction< - int Function( - calendar_record_h, ffi.Pointer>)>(); - - /// @brief Gets a string from a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks You must release @a value using free(). - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] out_str The result value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_get_str_p() - /// @see calendar_record_set_str() - int calendar_record_get_str( - calendar_record_h record, - int property_id, - ffi.Pointer> out_str, - ) { - return _calendar_record_get_str( - record, - property_id, - out_str, - ); - } - - late final _calendar_record_get_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - ffi.Pointer>)>>('calendar_record_get_str'); - late final _calendar_record_get_str = _calendar_record_get_strPtr.asFunction< - int Function( - calendar_record_h, int, ffi.Pointer>)>(); - - /// @brief Gets a string pointer from a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks You MUST NOT release @a value. - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] out_str The result value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_get_str() - /// @see calendar_record_set_str() - int calendar_record_get_str_p( - calendar_record_h record, - int property_id, - ffi.Pointer> out_str, - ) { - return _calendar_record_get_str_p( - record, - property_id, - out_str, - ); - } - - late final _calendar_record_get_str_pPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - ffi.Pointer>)>>( - 'calendar_record_get_str_p'); - late final _calendar_record_get_str_p = - _calendar_record_get_str_pPtr.asFunction< - int Function( - calendar_record_h, int, ffi.Pointer>)>(); - - /// @brief Gets an integer value from a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] out_value The result value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_set_int() - int calendar_record_get_int( - calendar_record_h record, - int property_id, - ffi.Pointer out_value, - ) { - return _calendar_record_get_int( - record, - property_id, - out_value, - ); - } - - late final _calendar_record_get_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - ffi.Pointer)>>('calendar_record_get_int'); - late final _calendar_record_get_int = _calendar_record_get_intPtr - .asFunction)>(); - - /// @brief Gets a double value from a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] out_value The result value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_set_double() - int calendar_record_get_double( - calendar_record_h record, - int property_id, - ffi.Pointer out_value, - ) { - return _calendar_record_get_double( - record, - property_id, - out_value, - ); - } - - late final _calendar_record_get_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - ffi.Pointer)>>('calendar_record_get_double'); - late final _calendar_record_get_double = - _calendar_record_get_doublePtr.asFunction< - int Function(calendar_record_h, int, ffi.Pointer)>(); - - /// @brief Gets a long long integer value from a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] out_value The result value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_set_lli() - int calendar_record_get_lli( - calendar_record_h record, - int property_id, - ffi.Pointer out_value, - ) { - return _calendar_record_get_lli( - record, - property_id, - out_value, - ); - } - - late final _calendar_record_get_lliPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - ffi.Pointer)>>('calendar_record_get_lli'); - late final _calendar_record_get_lli = _calendar_record_get_lliPtr.asFunction< - int Function(calendar_record_h, int, ffi.Pointer)>(); - - /// @brief Gets a calendar_caltime_s value from a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] out_value The result value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_set_caltime() - int calendar_record_get_caltime( - calendar_record_h record, - int property_id, - ffi.Pointer out_value, - ) { - return _calendar_record_get_caltime( - record, - property_id, - out_value, - ); - } - - late final _calendar_record_get_caltimePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - ffi.Pointer)>>('calendar_record_get_caltime'); - late final _calendar_record_get_caltime = - _calendar_record_get_caltimePtr.asFunction< - int Function(calendar_record_h, int, ffi.Pointer)>(); - - /// @brief Sets a string to a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[in] value The value to be set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_get_str() - /// @see calendar_record_get_str_p() - int calendar_record_set_str( - calendar_record_h record, - int property_id, - ffi.Pointer value, - ) { - return _calendar_record_set_str( - record, - property_id, - value, - ); - } - - late final _calendar_record_set_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - ffi.Pointer)>>('calendar_record_set_str'); - late final _calendar_record_set_str = _calendar_record_set_strPtr.asFunction< - int Function(calendar_record_h, int, ffi.Pointer)>(); - - /// @brief Sets an integer value to a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[in] value The value to be set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_get_int() - int calendar_record_set_int( - calendar_record_h record, - int property_id, - int value, - ) { - return _calendar_record_set_int( - record, - property_id, - value, - ); - } - - late final _calendar_record_set_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - ffi.Int)>>('calendar_record_set_int'); - late final _calendar_record_set_int = _calendar_record_set_intPtr - .asFunction(); - - /// @brief Sets a double value to a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[in] value The value to be set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_get_double() - int calendar_record_set_double( - calendar_record_h record, - int property_id, - double value, - ) { - return _calendar_record_set_double( - record, - property_id, - value, - ); - } - - late final _calendar_record_set_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - ffi.Double)>>('calendar_record_set_double'); - late final _calendar_record_set_double = _calendar_record_set_doublePtr - .asFunction(); - - /// @brief Sets a long long integer value to a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[in] value The value to be set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_get_lli() - int calendar_record_set_lli( - calendar_record_h record, - int property_id, - int value, - ) { - return _calendar_record_set_lli( - record, - property_id, - value, - ); - } - - late final _calendar_record_set_lliPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - ffi.LongLong)>>('calendar_record_set_lli'); - late final _calendar_record_set_lli = _calendar_record_set_lliPtr - .asFunction(); - - /// @brief Sets a calendar_time_s value to a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[in] value The value to be set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_get_caltime() - int calendar_record_set_caltime( - calendar_record_h record, - int property_id, - calendar_time_s value, - ) { - return _calendar_record_set_caltime( - record, - property_id, - value, - ); - } - - late final _calendar_record_set_caltimePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - calendar_time_s)>>('calendar_record_set_caltime'); - late final _calendar_record_set_caltime = _calendar_record_set_caltimePtr - .asFunction(); - - /// @brief Adds a child record to the parent record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The parent record handle - /// @param[in] property_id The property ID - /// @param[in] child_record The handle of the child record to be added to the parent record - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_remove_child_record() - int calendar_record_add_child_record( - calendar_record_h record, - int property_id, - calendar_record_h child_record, - ) { - return _calendar_record_add_child_record( - record, - property_id, - child_record, - ); - } - - late final _calendar_record_add_child_recordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - calendar_record_h)>>('calendar_record_add_child_record'); - late final _calendar_record_add_child_record = - _calendar_record_add_child_recordPtr.asFunction< - int Function(calendar_record_h, int, calendar_record_h)>(); - - /// @brief Removes a child record from the parent record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The parent record handle - /// @param[in] property_id The property ID - /// @param[in] child_record The handle of the child record to be removed from the parent record - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_add_child_record() - int calendar_record_remove_child_record( - calendar_record_h record, - int property_id, - calendar_record_h child_record, - ) { - return _calendar_record_remove_child_record( - record, - property_id, - child_record, - ); - } - - late final _calendar_record_remove_child_recordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - calendar_record_h)>>('calendar_record_remove_child_record'); - late final _calendar_record_remove_child_record = - _calendar_record_remove_child_recordPtr.asFunction< - int Function(calendar_record_h, int, calendar_record_h)>(); - - /// @brief Gets the number of child records in a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] record The parent record handle - /// @param[in] property_id The property ID - /// @param[out] count The child record count - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_add_child_record() - /// @see calendar_record_remove_child_record() - int calendar_record_get_child_record_count( - calendar_record_h record, - int property_id, - ffi.Pointer count, - ) { - return _calendar_record_get_child_record_count( - record, - property_id, - count, - ); - } - - late final _calendar_record_get_child_record_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - ffi.Pointer)>>( - 'calendar_record_get_child_record_count'); - late final _calendar_record_get_child_record_count = - _calendar_record_get_child_record_countPtr.asFunction< - int Function(calendar_record_h, int, ffi.Pointer)>(); - - /// @brief Gets a child record handle pointer from the parent record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks You MUST NOT release @a child_record. \n - /// It is released when the parent record handle is destroyed. - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[in] index The index of the child record - /// @param[out] child_record The child record handle pointer - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_record_add_child_record() - /// @see calendar_record_remove_child_record() - /// @see calendar_record_get_child_record_count() - int calendar_record_get_child_record_at_p( - calendar_record_h record, - int property_id, - int index, - ffi.Pointer child_record, - ) { - return _calendar_record_get_child_record_at_p( - record, - property_id, - index, - child_record, - ); - } - - late final _calendar_record_get_child_record_at_pPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, ffi.Int, - ffi.Pointer)>>( - 'calendar_record_get_child_record_at_p'); - late final _calendar_record_get_child_record_at_p = - _calendar_record_get_child_record_at_pPtr.asFunction< - int Function( - calendar_record_h, int, int, ffi.Pointer)>(); - - /// @brief Makes a clone of a given record's child record list. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks You must release @a cloned_list using calendar_list_destroy(). - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] out_list The cloned list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_list_destroy() - int calendar_record_clone_child_record_list( - calendar_record_h record, - int property_id, - ffi.Pointer out_list, - ) { - return _calendar_record_clone_child_record_list( - record, - property_id, - out_list, - ); - } - - late final _calendar_record_clone_child_record_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_record_h, ffi.UnsignedInt, - ffi.Pointer)>>( - 'calendar_record_clone_child_record_list'); - late final _calendar_record_clone_child_record_list = - _calendar_record_clone_child_record_listPtr.asFunction< - int Function(calendar_record_h, int, ffi.Pointer)>(); - - /// @brief - ffi.Pointer cal_caltime_create() { - return _cal_caltime_create(); - } - - late final _cal_caltime_createPtr = - _lookup Function()>>( - 'cal_caltime_create'); - late final _cal_caltime_create = _cal_caltime_createPtr - .asFunction Function()>(); - - void cal_caltime_destroy( - ffi.Pointer caltime, - ) { - return _cal_caltime_destroy( - caltime, - ); - } - - late final _cal_caltime_destroyPtr = _lookup< - ffi.NativeFunction)>>( - 'cal_caltime_destroy'); - late final _cal_caltime_destroy = _cal_caltime_destroyPtr - .asFunction)>(); - - int cal_caltime_get_local_type( - ffi.Pointer caltime, - ) { - return _cal_caltime_get_local_type( - caltime, - ); - } - - late final _cal_caltime_get_local_typePtr = _lookup< - ffi.NativeFunction)>>( - 'cal_caltime_get_local_type'); - late final _cal_caltime_get_local_type = _cal_caltime_get_local_typePtr - .asFunction)>(); - - int cal_caltime_set_local_type( - ffi.Pointer caltime, - int type, - ) { - return _cal_caltime_set_local_type( - caltime, - type, - ); - } - - late final _cal_caltime_set_local_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Int32)>>('cal_caltime_set_local_type'); - late final _cal_caltime_set_local_type = _cal_caltime_set_local_typePtr - .asFunction, int)>(); - - int cal_caltime_get_local_utime( - ffi.Pointer caltime, - ) { - return _cal_caltime_get_local_utime( - caltime, - ); - } - - late final _cal_caltime_get_local_utimePtr = _lookup< - ffi - .NativeFunction)>>( - 'cal_caltime_get_local_utime'); - late final _cal_caltime_get_local_utime = _cal_caltime_get_local_utimePtr - .asFunction)>(); - - int cal_caltime_set_local_utime( - ffi.Pointer caltime, - int utime, - ) { - return _cal_caltime_set_local_utime( - caltime, - utime, - ); - } - - late final _cal_caltime_set_local_utimePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.LongLong)>>('cal_caltime_set_local_utime'); - late final _cal_caltime_set_local_utime = _cal_caltime_set_local_utimePtr - .asFunction, int)>(); - - int cal_caltime_get_local_year( - ffi.Pointer caltime, - ) { - return _cal_caltime_get_local_year( - caltime, - ); - } - - late final _cal_caltime_get_local_yearPtr = _lookup< - ffi.NativeFunction)>>( - 'cal_caltime_get_local_year'); - late final _cal_caltime_get_local_year = _cal_caltime_get_local_yearPtr - .asFunction)>(); - - int cal_caltime_set_local_year( - ffi.Pointer caltime, - int year, - ) { - return _cal_caltime_set_local_year( - caltime, - year, - ); - } - - late final _cal_caltime_set_local_yearPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Int)>>('cal_caltime_set_local_year'); - late final _cal_caltime_set_local_year = _cal_caltime_set_local_yearPtr - .asFunction, int)>(); - - int cal_caltime_get_local_month( - ffi.Pointer caltime, - ) { - return _cal_caltime_get_local_month( - caltime, - ); - } - - late final _cal_caltime_get_local_monthPtr = _lookup< - ffi.NativeFunction)>>( - 'cal_caltime_get_local_month'); - late final _cal_caltime_get_local_month = _cal_caltime_get_local_monthPtr - .asFunction)>(); - - int cal_caltime_set_local_month( - ffi.Pointer caltime, - int month, - ) { - return _cal_caltime_set_local_month( - caltime, - month, - ); - } - - late final _cal_caltime_set_local_monthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Int)>>('cal_caltime_set_local_month'); - late final _cal_caltime_set_local_month = _cal_caltime_set_local_monthPtr - .asFunction, int)>(); - - int cal_caltime_get_local_mday( - ffi.Pointer caltime, - ) { - return _cal_caltime_get_local_mday( - caltime, - ); - } - - late final _cal_caltime_get_local_mdayPtr = _lookup< - ffi.NativeFunction)>>( - 'cal_caltime_get_local_mday'); - late final _cal_caltime_get_local_mday = _cal_caltime_get_local_mdayPtr - .asFunction)>(); - - int cal_caltime_set_local_mday( - ffi.Pointer caltime, - int mday, - ) { - return _cal_caltime_set_local_mday( - caltime, - mday, - ); - } - - late final _cal_caltime_set_local_mdayPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Int)>>('cal_caltime_set_local_mday'); - late final _cal_caltime_set_local_mday = _cal_caltime_set_local_mdayPtr - .asFunction, int)>(); - - int cal_caltime_get_local_hour( - ffi.Pointer caltime, - ) { - return _cal_caltime_get_local_hour( - caltime, - ); - } - - late final _cal_caltime_get_local_hourPtr = _lookup< - ffi.NativeFunction)>>( - 'cal_caltime_get_local_hour'); - late final _cal_caltime_get_local_hour = _cal_caltime_get_local_hourPtr - .asFunction)>(); - - int cal_caltime_set_local_hour( - ffi.Pointer caltime, - int hour, - ) { - return _cal_caltime_set_local_hour( - caltime, - hour, - ); - } - - late final _cal_caltime_set_local_hourPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Int)>>('cal_caltime_set_local_hour'); - late final _cal_caltime_set_local_hour = _cal_caltime_set_local_hourPtr - .asFunction, int)>(); - - int cal_caltime_get_local_minute( - ffi.Pointer caltime, - ) { - return _cal_caltime_get_local_minute( - caltime, - ); - } - - late final _cal_caltime_get_local_minutePtr = _lookup< - ffi.NativeFunction)>>( - 'cal_caltime_get_local_minute'); - late final _cal_caltime_get_local_minute = _cal_caltime_get_local_minutePtr - .asFunction)>(); - - int cal_caltime_set_local_minute( - ffi.Pointer caltime, - int minute, - ) { - return _cal_caltime_set_local_minute( - caltime, - minute, - ); - } - - late final _cal_caltime_set_local_minutePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Int)>>('cal_caltime_set_local_minute'); - late final _cal_caltime_set_local_minute = _cal_caltime_set_local_minutePtr - .asFunction, int)>(); - - int cal_caltime_get_local_second( - ffi.Pointer caltime, - ) { - return _cal_caltime_get_local_second( - caltime, - ); - } - - late final _cal_caltime_get_local_secondPtr = _lookup< - ffi.NativeFunction)>>( - 'cal_caltime_get_local_second'); - late final _cal_caltime_get_local_second = _cal_caltime_get_local_secondPtr - .asFunction)>(); - - int cal_caltime_set_local_second( - ffi.Pointer caltime, - int second, - ) { - return _cal_caltime_set_local_second( - caltime, - second, - ); - } - - late final _cal_caltime_set_local_secondPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Int)>>('cal_caltime_set_local_second'); - late final _cal_caltime_set_local_second = _cal_caltime_set_local_secondPtr - .asFunction, int)>(); - - /// @brief Connects to the calendar service. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks Opening the connection is necessary to access the calendar database and perform operations such as fetching, inserting, or updating records.\n - /// The execution of calendar_connect() and calendar_disconnect() could slow down your application, so you are recommended not to call them frequently. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_disconnect() - int calendar_connect() { - return _calendar_connect(); - } - - late final _calendar_connectPtr = - _lookup>('calendar_connect'); - late final _calendar_connect = - _calendar_connectPtr.asFunction(); - - /// @brief Disconnects from the calendar service. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks If there is no open connection, this function returns #CALENDAR_ERROR_DB_FAILED. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_connect() - int calendar_disconnect() { - return _calendar_disconnect(); - } - - late final _calendar_disconnectPtr = - _lookup>('calendar_disconnect'); - late final _calendar_disconnect = - _calendar_disconnectPtr.asFunction(); - - /// @brief Connects to the calendar service on a thread. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks Opening a connection is necessary to access the calendar database and perform operations such as fetching, inserting, or updating records.\n - /// On a thread environment with calendar_connect(), request in one thread could fail, while another request connection is working in the other thread. - /// To prevent request failure, calendar_connect_on_thread() is recommended. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_disconnect_on_thread() - int calendar_connect_on_thread() { - return _calendar_connect_on_thread(); - } - - late final _calendar_connect_on_threadPtr = - _lookup>( - 'calendar_connect_on_thread'); - late final _calendar_connect_on_thread = - _calendar_connect_on_threadPtr.asFunction(); - - /// @brief Disconnects from the calendar service on a thread. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks If there is no open connection, this function returns #CALENDAR_ERROR_DB_FAILED. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_connect_on_thread() - int calendar_disconnect_on_thread() { - return _calendar_disconnect_on_thread(); - } - - late final _calendar_disconnect_on_threadPtr = - _lookup>( - 'calendar_disconnect_on_thread'); - late final _calendar_disconnect_on_thread = - _calendar_disconnect_on_threadPtr.asFunction(); - - /// @brief Connects to the calendar service. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @remarks Opening a connection is necessary to access the calendar database and perform operations such as fetching, inserting, or updating records.\n - /// Before the calendar-service daemon is ready, if you call calendar_connect(), it could fail. - /// It is recommended to call this API with #CALENDAR_CONNECT_FLAG_RETRY flags in such a situation. - /// @param[in] flags calendar_connect_flag - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_disconnect(), CALENDAR_CONNECT_FLAG_RETRY - int calendar_connect_with_flags( - int flags, - ) { - return _calendar_connect_with_flags( - flags, - ); - } - - late final _calendar_connect_with_flagsPtr = - _lookup>( - 'calendar_connect_with_flags'); - late final _calendar_connect_with_flags = - _calendar_connect_with_flagsPtr.asFunction(); - - /// @brief Retrieves a vcalendar stream from a calendar list. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] calendar_list The calendar list handle - /// @param[out] vcalendar_stream The vcalendar stream - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - int calendar_vcalendar_make_from_records( - calendar_list_h calendar_list, - ffi.Pointer> vcalendar_stream, - ) { - return _calendar_vcalendar_make_from_records( - calendar_list, - vcalendar_stream, - ); - } - - late final _calendar_vcalendar_make_from_recordsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - calendar_list_h, ffi.Pointer>)>>( - 'calendar_vcalendar_make_from_records'); - late final _calendar_vcalendar_make_from_records = - _calendar_vcalendar_make_from_recordsPtr.asFunction< - int Function(calendar_list_h, ffi.Pointer>)>(); - - /// @brief Retrieves all calendars from a vcalendar stream. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] vcalendar_stream The vcalendar stream - /// @param[out] calendar_list The calendar list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_NO_DATA Requested data does not exist - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to initialize. - int calendar_vcalendar_parse_to_calendar( - ffi.Pointer vcalendar_stream, - ffi.Pointer calendar_list, - ) { - return _calendar_vcalendar_parse_to_calendar( - vcalendar_stream, - calendar_list, - ); - } - - late final _calendar_vcalendar_parse_to_calendarPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>( - 'calendar_vcalendar_parse_to_calendar'); - late final _calendar_vcalendar_parse_to_calendar = - _calendar_vcalendar_parse_to_calendarPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Retrieves all events or to-dos - /// (\ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event or \ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_todo) from a vCalendar file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] vcalendar_file_path The file path of the vCalendar stream file - /// @param[in] callback The callback function to be invoked - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @pre calendar_connect() should be called to initialize. - /// @post This function invokes calendar_vcalendar_parse_cb(). - /// @see calendar_vcalendar_parse_cb() - /// @see calendar_record_get_uri_p() - int calendar_vcalendar_parse_to_calendar_foreach( - ffi.Pointer vcalendar_file_path, - calendar_vcalendar_parse_cb callback, - ffi.Pointer user_data, - ) { - return _calendar_vcalendar_parse_to_calendar_foreach( - vcalendar_file_path, - callback, - user_data, - ); - } - - late final _calendar_vcalendar_parse_to_calendar_foreachPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - calendar_vcalendar_parse_cb, ffi.Pointer)>>( - 'calendar_vcalendar_parse_to_calendar_foreach'); - late final _calendar_vcalendar_parse_to_calendar_foreach = - _calendar_vcalendar_parse_to_calendar_foreachPtr.asFunction< - int Function(ffi.Pointer, calendar_vcalendar_parse_cb, - ffi.Pointer)>(); - - /// @brief Adds a callback to get a notification when an alarm gives an alert. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/calendar.read - /// @param[in] callback The callback to be added - /// @param[in] user_data The user data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CALENDAR_ERROR_NOT_PERMITTED Operation not permitted - /// @retval #CALENDAR_ERROR_IPC Unknown IPC error - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_reminder_remove_cb() - int calendar_reminder_add_cb( - calendar_reminder_cb callback, - ffi.Pointer user_data, - ) { - return _calendar_reminder_add_cb( - callback, - user_data, - ); - } - - late final _calendar_reminder_add_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_reminder_cb, - ffi.Pointer)>>('calendar_reminder_add_cb'); - late final _calendar_reminder_add_cb = _calendar_reminder_add_cbPtr - .asFunction)>(); - - /// @brief Removes a callback to get a notification when an alarm gives an alert. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif - /// @param[in] callback The callback to be removed - /// @param[in] user_data The user data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CALENDAR_ERROR_NONE Successful - /// @retval #CALENDAR_ERROR_DB_FAILED Database operation failure - /// @retval #CALENDAR_ERROR_SYSTEM Internal system module error - /// @retval #CALENDAR_ERROR_NOT_SUPPORTED Not supported - /// @see calendar_reminder_add_cb() - int calendar_reminder_remove_cb( - calendar_reminder_cb callback, - ffi.Pointer user_data, - ) { - return _calendar_reminder_remove_cb( - callback, - user_data, - ); - } - - late final _calendar_reminder_remove_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(calendar_reminder_cb, - ffi.Pointer)>>('calendar_reminder_remove_cb'); - late final _calendar_reminder_remove_cb = _calendar_reminder_remove_cbPtr - .asFunction)>(); - - /// @brief Connects to the contacts service. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks Connection opening is necessary to access the contacts server such as fetching, inserting, or updating records.\n - /// The execution of contacts_connect() and contacts_disconnect() could slow down your application. So it is not recommended to call them frequently. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM System error - /// @retval #CONTACTS_ERROR_INTERNAL Internal error - /// @see contacts_disconnect() - int contacts_connect() { - return _contacts_connect(); - } - - late final _contacts_connectPtr = - _lookup>('contacts_connect'); - late final _contacts_connect = - _contacts_connectPtr.asFunction(); - - /// @brief Disconnects from the contacts service. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks If there is no opened connection, this function returns #CONTACTS_ERROR_DB. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM System error - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @see contacts_connect() - int contacts_disconnect() { - return _contacts_disconnect(); - } - - late final _contacts_disconnectPtr = - _lookup>('contacts_disconnect'); - late final _contacts_disconnect = - _contacts_disconnectPtr.asFunction(); - - /// @brief Connects to the contacts service with a connection on another thread. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks Opening connection is necessary to access the contact server and to perform operations such as fetching, inserting, or updating records.\n - /// On multiple thread environment with contacts_connect(), request can be failed in one thread, while another request is working by the connection in the other thread. - /// To prevent request fail, contacts_connect_on_thread() is recommended. Then new connection is set for the thread. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM System error - /// @retval #CONTACTS_ERROR_INTERNAL Internal error - /// @see contacts_disconnect_on_thread() - int contacts_connect_on_thread() { - return _contacts_connect_on_thread(); - } - - late final _contacts_connect_on_threadPtr = - _lookup>( - 'contacts_connect_on_thread'); - late final _contacts_connect_on_thread = - _contacts_connect_on_threadPtr.asFunction(); - - /// @brief Disconnects from the contacts service. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks If there is no opened connection, this function returns #CONTACTS_ERROR_DB. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM System error - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @see contacts_connect_on_thread() - int contacts_disconnect_on_thread() { - return _contacts_disconnect_on_thread(); - } - - late final _contacts_disconnect_on_threadPtr = - _lookup>( - 'contacts_disconnect_on_thread'); - late final _contacts_disconnect_on_thread = - _contacts_disconnect_on_threadPtr.asFunction(); - - /// @brief Connects to the contacts service. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] flags Connection flag - /// @remarks Connection opening is necessary to access the contacts server such as fetching, inserting, or updating records.\n - /// Before contacts-service daemon is ready, if you call contacts_connect(), it will fail. - /// To prevent it, if you call this API with @ref CONTACTS_CONNECT_FLAG_RETRY flags, it will retry several time.\n - /// To close the connection, contacts_disconnect() should be called. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM System error - /// @retval #CONTACTS_ERROR_INTERNAL Internal error - /// @see contacts_disconnect() - int contacts_connect_with_flags( - int flags, - ) { - return _contacts_connect_with_flags( - flags, - ); - } - - late final _contacts_connect_with_flagsPtr = - _lookup>( - 'contacts_connect_with_flags'); - late final _contacts_connect_with_flags = - _contacts_connect_with_flagsPtr.asFunction(); - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book _contacts_address_book view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts addressbook view
integer id read only DB record ID of the addressbook
integer account_id read, write once Account ID that the addressbook belongs to
string name read, write It cannot be @c NULL. Duplicate names are not allowed.
integer mode read, write Addressbook mode, refer to the @ref contacts_address_book_mode_e
- late final ffi.Pointer<_contacts_address_book_property_ids> - __contacts_address_book = - _lookup<_contacts_address_book_property_ids>('_contacts_address_book'); - - _contacts_address_book_property_ids get _contacts_address_book => - __contacts_address_book.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group _contacts_group view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts group view
integer id read only DB record ID of the group
integer address_book_id read, write once Addressbook ID that the group belongs to
string name read, write Group name
string ringtone_path read, write Ringtone path of the group
string image_path read, write Image path of the group
string vibration read, write Vibration path of the group
string extra_data read, write Extra data for default group name
boolean is_read_only read, write once The group is read only or not
string message_alert read, write Message alert path of the group
- late final ffi.Pointer<_contacts_group_property_ids> __contacts_group = - _lookup<_contacts_group_property_ids>('_contacts_group'); - - _contacts_group_property_ids get _contacts_group => __contacts_group.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person _contacts_person view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts person view
integer id read only DB record ID of the person
string display_name read only Display name of the person
string display_name_index read only The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id read only Display contact ID that the person belongs to
string ringtone_path read, write Ringtone path of the person
string image_thumbnail_path read only Image thumbnail path of the person
string vibration read, write Vibration path of the person
string message_alert read, write Message alert path of the person
string status read only Status of social account
boolean is_favorite read, write The person is favorite or not
double favorite_priority read only The priority of favorite contacts. it can be used as sorting key, see the @ref contacts_query_set_sort
integer link_count read only Link count of contact records (projection)
string addressbook_ids read only Addressbook IDs that the person belongs to (projection)
boolean has_phonenumber read only The person has phone number or not
boolean has_email read only The person has email or not
integer snippet_type read only keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string read only keyword matched data string (Since 3.0)
- late final ffi.Pointer<_contacts_person_property_ids> __contacts_person = - _lookup<_contacts_person_property_ids>('_contacts_person'); - - _contacts_person_property_ids get _contacts_person => __contacts_person.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_simple_contact _contacts_simple_contact view - /// You can only get simple contact using this view. - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this simple contact view
integerid DB record ID of the contact
stringdisplay_name Display name of the contact
integerdisplay_source_id The source type of display name, refer to the @ref contacts_display_name_source_type_e
integeraddress_book_id Addressbook that the contact belongs to
stringringtone_path Ringtone path of the contact
stringimage_thumbnail_path Image thumbnail path of the contact
booleanis_favorite The contact is favorite or not
booleanhas_phonenumber The contact has phone number or not
booleanhas_email The contact has email or not
integerperson_id Person ID that the contact belongs to
stringuid Unique identifier
stringvibration Vibration path of the contact
stringmessage_alert Message alert path of the contact
integerchanged_time Last changed contact time
- late final ffi.Pointer<_contacts_simple_contact_property_ids> - __contacts_simple_contact = - _lookup<_contacts_simple_contact_property_ids>( - '_contacts_simple_contact'); - - _contacts_simple_contact_property_ids get _contacts_simple_contact => - __contacts_simple_contact.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact _contacts_contact view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contact view
integeridread only DB record ID of the contact
stringdisplay_nameread only Display name of the contact
integerdisplay_source_idread only The source type of display name, refer to the @ref contacts_display_name_source_type_e
integeraddress_book_idread, write once Addressbook ID that the contact belongs to
stringringtone_pathread, write Ringtone path of the contact
stringimage_thumbnail_pathread only Image thumbnail path of the contact
booleanis_favoriteread, write The contact is favorite or not
booleanhas_phonenumberread only The contact has phone number or not
booleanhas_emailread only The contact has email or not
integerperson_idread, write once Person ID that the contact belongs to. If set when inserting, a contact will be linked to person
stringuidread, write Unique identifier
stringvibrationread, write Vibration path of the contact
stringmessage_alertread, write Message alert path of the contact
integerchanged_timeread only Last changed contact time
integerlink_moderead, write once The link mode, refer to the @ref contacts_contact_link_mode_e. If the person_id was set, this value will be ignored
recordnameread, write _contacts_name child record (single)
recordcompanyread, write _contacts_company child record (multiple)
recordnoteread, write _contacts_note child record (multiple)
recordnumberread, write _contacts_number child record (multiple)
recordemailread, write _contacts_email child record (multiple)
recordeventread, write _contacts_event child record (multiple)
recordmessengerread, write _contacts_messenger child record (multiple)
recordaddressread, write _contacts_address child record (multiple)
recordurlread, write _contacts_url child record (multiple)
recordnicknameread, write _contacts_nickname child record (multiple)
recordprofileread, write _contacts_profile child record (multiple)
recordrelationshipread, write _contacts_relationship child record (multiple)
recordimageread, write _contacts_image child record (multiple)
recordgroup_relationread, write _contacts_group_relation child record (multiple)
recordsipread, write _contacts_sip child record (multiple) (Since 3.0)
- late final ffi.Pointer<_contacts_contact_property_ids> __contacts_contact = - _lookup<_contacts_contact_property_ids>('_contacts_contact'); - - _contacts_contact_property_ids get _contacts_contact => - __contacts_contact.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile _contacts_my_profile view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this my profile view
integeridread only DB record ID of the my profile
stringdisplay_nameread only Display name of the profile
integeraddress_book_idread, write once Addressbook ID that the profile belongs to
stringimage_thumbnail_pathread only Image thumbnail path of the profile
stringuidread, write Unique identifier
integerchanged_timeread only Last changed profile time
recordnameread, write _contacts_name child record (single)
recordcompanyread, write _contacts_company child record (multiple)
recordnoteread, write _contacts_note child record (multiple)
recordnumberread, write _contacts_number child record (multiple)
recordemailread, write _contacts_email child record (multiple)
recordeventread, write _contacts_event child record (multiple)
recordmessengerread, write _contacts_messenger child record (multiple)
recordaddressread, write _contacts_address child record (multiple)
recordurlread, write _contacts_url child record (multiple)
recordnicknameread, write _contacts_nickname child record (multiple)
recordprofileread, write _contacts_profile child record (multiple)
recordrelationshipread, write _contacts_relationship child record (multiple)
recordimageread, write _contacts_image child record (multiple)
recordsipread, write _contacts_sip child record (multiple) (Since 3.0)
- late final ffi.Pointer<_contacts_my_profile_property_ids> - __contacts_my_profile = - _lookup<_contacts_my_profile_property_ids>('_contacts_my_profile'); - - _contacts_my_profile_property_ids get _contacts_my_profile => - __contacts_my_profile.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name _contacts_name view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts name view
integer id read only DB record ID of the name
integer contact_id read, write once Contacts ID that the name record belongs to
string first read, write First name
string last read, write Last name
string addition read, write Middle name
string suffix read, write Suffix
string prefix read, write Prefix
string phonetic_first read, write Pronounce the first name
string phonetic_middle read, write Pronounce the middle name
string phonetic_last read, write Pronounce the last name
- late final ffi.Pointer<_contacts_name_property_ids> __contacts_name = - _lookup<_contacts_name_property_ids>('_contacts_name'); - - _contacts_name_property_ids get _contacts_name => __contacts_name.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number _contacts_number view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts number view
integer id read only DB record ID of the number
integer contact_id read, write once Contact ID that the number belongs to
integer type read, write Number type, refer to the @ref contacts_number_type_e
string label read, write Custom number type label, when the number type is #CONTACTS_NUMBER_TYPE_CUSTOM
boolean is_default read, write The number is default number or not
string number read, write Number
string normalized_number filter only You can only use this property for search filter.
string cleaned_number filter only You can only use this property for search filter.
string number_filter filter only You can only use this property for search filter.
- late final ffi.Pointer<_contacts_number_property_ids> __contacts_number = - _lookup<_contacts_number_property_ids>('_contacts_number'); - - _contacts_number_property_ids get _contacts_number => __contacts_number.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email _contacts_email view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts email view
integer id read only DB record ID of the email
integer contact_id read, write once Contact ID that the email belongs to
integer type read, write Email type, refer to the @ref contacts_email_type_e
string label read, write Custom mail type label, when the email type is #CONTACTS_EMAIL_TYPE_CUSTOM
boolean is_default read, write The email is default email or not
string email read, write Email address
- late final ffi.Pointer<_contacts_email_property_ids> __contacts_email = - _lookup<_contacts_email_property_ids>('_contacts_email'); - - _contacts_email_property_ids get _contacts_email => __contacts_email.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address _contacts_address view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts address view
integer id read only DB record ID of the address
integer contact_id read, write once Contact ID that the address belongs to
integer type read, write Address type, refer to the @ref contacts_address_type_e
string label read, write Address type label, when the address type is #CONTACTS_ADDRESS_TYPE_CUSTOM
string postbox read, write Post office box
string postal_code read, write Postal code
string region read, write Region
string locality read, write Locality
string street read, write Street
string country read, write Country
string extended read, write Extended address
boolean is_default read, write The address is default or not
- late final ffi.Pointer<_contacts_address_property_ids> __contacts_address = - _lookup<_contacts_address_property_ids>('_contacts_address'); - - _contacts_address_property_ids get _contacts_address => - __contacts_address.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note _contacts_note view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts note view
integer id read only DB record ID of the note
integer contact_id read, write once Contact ID that the note belongs to
string note read, write Note contents
- late final ffi.Pointer<_contacts_note_property_ids> __contacts_note = - _lookup<_contacts_note_property_ids>('_contacts_note'); - - _contacts_note_property_ids get _contacts_note => __contacts_note.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url _contacts_url view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts URL view
integer id read only DB record ID of the URL
integer contact_id read, write once Contact ID that the URL belongs to
integer type read, write URL type, refer to the @ref contacts_url_type_e
string label read, write Custom URL type label, when the URL type is #CONTACTS_URL_TYPE_CUSTOM
string url read, write URL
- late final ffi.Pointer<_contacts_url_property_ids> __contacts_url = - _lookup<_contacts_url_property_ids>('_contacts_url'); - - _contacts_url_property_ids get _contacts_url => __contacts_url.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event _contacts_event view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts event view
integer id read only DB record ID of the event
integer contact_id read, write once Contact ID that the event belongs to
integer type read, write Event type, refer to the @ref contacts_event_type_e
string label read, write Custom event type label, when the event type is #CONTACTS_EVENT_TYPE_CUSTOM
integer date read, write Event date(YYYYMMDD). e.g. 2014/1/1 : 20140101. Even if the calendar_type is set as CONTACTS_EVENT_CALENDAR_TYPE_CHINESE, you SHOULD set Gregorian date
integer calendar_type read, write Calendar type, refer to the @ref contacts_event_calendar_type_e
bool is_leap_month (Deprecated) read, write The month is leap or not (valid on lunisolar calendar only)
- late final ffi.Pointer<_contacts_event_property_ids> __contacts_event = - _lookup<_contacts_event_property_ids>('_contacts_event'); - - _contacts_event_property_ids get _contacts_event => __contacts_event.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group_relation _contacts_group_relation view - /// Refer @ref contacts_group_add_contact, @ref contacts_group_remove_contact - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this relationship view
integer id read only DB record ID of the group (can not be used as filter)
integer group_id read, write once DB record ID of the group
integer contact_id read, write once DB record ID of the contact
string name read only Group name
- late final ffi.Pointer<_contacts_group_relation_property_ids> - __contacts_group_relation = - _lookup<_contacts_group_relation_property_ids>( - '_contacts_group_relation'); - - _contacts_group_relation_property_ids get _contacts_group_relation => - __contacts_group_relation.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship _contacts_relationship view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this relationship view
integer id read only DB record ID of the relationship
integer contact_id read, write once Contact ID that the relationship belongs to
integer type read, write Relationship type, refer to the @ref contacts_relationship_type_e
string label read, write Custom relationship type label, when the relationship type is CONTACTS_RELATIONSHIP_TYPE_CUSTOM
string name read, write Selected contact name that the relationship belongs to
- late final ffi.Pointer<_contacts_relationship_property_ids> - __contacts_relationship = - _lookup<_contacts_relationship_property_ids>('_contacts_relationship'); - - _contacts_relationship_property_ids get _contacts_relationship => - __contacts_relationship.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image _contacts_image view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts image view
integer id read only DB record ID of the image
integer contact_id read, write once Contact ID that the image belongs to
integer type read, write Image type, refer to the @ref contacts_image_type_e
string label read, write Custom image type label, when the image type is #CONTACTS_IMAGE_TYPE_CUSTOM
string path read, write Image thumbnail path
- late final ffi.Pointer<_contacts_image_property_ids> __contacts_image = - _lookup<_contacts_image_property_ids>('_contacts_image'); - - _contacts_image_property_ids get _contacts_image => __contacts_image.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company _contacts_company view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts company view
integer id read only DB record ID of the company
integer contact_id read, write once Contact ID that the company belongs to
integer type read, write Company type, refer to the @ref contacts_company_type_e
string label read, write Custom company type label, when the company type is #CONTACTS_COMPANY_TYPE_CUSTOM
string name read, write Company name
string department read, write Department
string job_title read, write Job title
string assistant_name read, write Assistant name
string role read, write Role
string logo read, write Company logo image file path
string location read, write Company location
string description read, write Description
string phonetic_name read, write Pronounce the company name
- late final ffi.Pointer<_contacts_company_property_ids> __contacts_company = - _lookup<_contacts_company_property_ids>('_contacts_company'); - - _contacts_company_property_ids get _contacts_company => - __contacts_company.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname _contacts_nickname view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts nickname view
integer id read only DB record ID of the nickname
integer contact_id read, write once Contact ID that the nickname belongs to
string name read, write Nickname
- late final ffi.Pointer<_contacts_nickname_property_ids> __contacts_nickname = - _lookup<_contacts_nickname_property_ids>('_contacts_nickname'); - - _contacts_nickname_property_ids get _contacts_nickname => - __contacts_nickname.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger _contacts_messenger view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts messenger view
integer id read only DB record ID of the messenger
integer contact_id read, write once Contact ID that the messenger belongs to
integer type read, write Messenger type, refer to the @ref contacts_messenger_type_e
string label read, write Custom messenger type label, when the messenger type is #CONTACTS_MESSENGER_TYPE_CUSTOM
string im_id read, write Messenger ID (email address or email ID...)
- late final ffi.Pointer<_contacts_messenger_property_ids> - __contacts_messenger = - _lookup<_contacts_messenger_property_ids>('_contacts_messenger'); - - _contacts_messenger_property_ids get _contacts_messenger => - __contacts_messenger.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension _contacts_extension view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts extension view
integer id read only DB record ID of the contact extension
integer contact_id read, write once Contact ID that the contact extension belongs to
integer data1 read, write The extra child record format for non-provided from contacts-service
string data2 read, write The extra child record format for non-provided from contacts-service
string data3 read, write The extra child record format for non-provided from contacts-service
string data4 read, write The extra child record format for non-provided from contacts-service
string data5 read, write The extra child record format for non-provided from contacts-service
string data6 read, write The extra child record format for non-provided from contacts-service
string data7 read, write The extra child record format for non-provided from contacts-service
string data8 read, write The extra child record format for non-provided from contacts-service
string data9 read, write The extra child record format for non-provided from contacts-service
string data10 read, write The extra child record format for non-provided from contacts-service
string data11 read, write The extra child record format for non-provided from contacts-service
string data12 read, write The extra child record format for non-provided from contacts-service
- late final ffi.Pointer<_contacts_extension_property_ids> - __contacts_extension = - _lookup<_contacts_extension_property_ids>('_contacts_extension'); - - _contacts_extension_property_ids get _contacts_extension => - __contacts_extension.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_sdn _contacts_sdn view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts sdn view
integer id read only DB record ID of the sdn
string name read only Provided name of sdn
string number read only Provided number of sdn
integer sim_slot_no read onlyIt is related to the SIM slot number. sim_slot_no 0 means first SIM card, sim_slot_no 1 means second SIM. It is same with handle index of telephony handle list. Refer to the telephony_init()
- late final ffi.Pointer<_contacts_sdn_property_ids> __contacts_sdn = - _lookup<_contacts_sdn_property_ids>('_contacts_sdn'); - - _contacts_sdn_property_ids get _contacts_sdn => __contacts_sdn.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile _contacts_profile view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts profile view
integer id read only DB record ID of profile
integer contact_id read, write once Contacts ID that the profile belongs to
string uid read, write Unique identifier
string text read, write Profile contents
integer order read, write Priority to display the profile
string service_operation read, write Data for app_control_set_operation
string mime read, write Data for app_control_set_mime
string app_id read, write Data for app_control_set_app_id
string uri read, write Data for app_control_set_uri
string category read, write Data for app_control_set_category
string extra_data read, write It includes "key:value,key:value," pairs. You should parse it. And you must base64 encode each key and value
- late final ffi.Pointer<_contacts_profile_property_ids> __contacts_profile = - _lookup<_contacts_profile_property_ids>('_contacts_profile'); - - _contacts_profile_property_ids get _contacts_profile => - __contacts_profile.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo _contacts_activity_photo view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contact activity photo view
integer id read only DB record ID of activity photo
integer activity_id read, write once Activity ID that the activity photo belongs to
string photo_url read, write Photo URL
integer sort_index read, write Sorted photo index
- late final ffi.Pointer<_contacts_activity_photo_property_ids> - __contacts_activity_photo = - _lookup<_contacts_activity_photo_property_ids>( - '_contacts_activity_photo'); - - _contacts_activity_photo_property_ids get _contacts_activity_photo => - __contacts_activity_photo.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity _contacts_activity view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this activity view
integer id read only DB record ID of activity
integer contact_id read, write once Contact ID that the activity belongs to
string source_name read, write Account name that the activity belongs to
int timestamp read, write Published time of activity
string status read, write Activity status
string service_operation read, write Data for app_control_set_operation
string uri read, write Data for app_control_set_uri
record photo read, write _contacts_activity_photo child record (multiple)
- late final ffi.Pointer<_contacts_activity_property_ids> __contacts_activity = - _lookup<_contacts_activity_property_ids>('_contacts_activity'); - - _contacts_activity_property_ids get _contacts_activity => - __contacts_activity.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial _contacts_speeddial view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contact speed dial view
integer speeddial_number read, write once Stored speed dial number
integer number_id read, write Number ID that the speed dial belongs to
string number read only Contact number of specified speed dial
string number_label read only Contact number label of specified speed dial, when the number type is CONTACTS_NUMBER_TYPE_CUSTOM
integer number_type read only Contact number type, refer to the @ref contacts_number_type_e
integer person_id read only Person ID that the speed dial belongs to
string display_name read only Display name that the speed dial belongs to
string image_thumbnail_path read only Image thumbnail path that the speed dial belongs to
string normalized_number filter only You can only use this property for search filter
string cleaned_number filter only You can only use this property for search filter
string number_filter filter only If you add filter with this property, the string will be normalized as minmatch length internally and the match rule will be applied CONTACTS_MATCH_EXACTLY
- late final ffi.Pointer<_contacts_speeddial_property_ids> - __contacts_speeddial = - _lookup<_contacts_speeddial_property_ids>('_contacts_speeddial'); - - _contacts_speeddial_property_ids get _contacts_speeddial => - __contacts_speeddial.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log _contacts_phone_log view - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this phone log view
integer id read only DB record ID of phone log
integer person_id read, write once Person ID that the phone log belongs to
string address read, write once Number or Email that the phone log displays
integer log_time read, write once Call end time. The value means number of seconds since 1970-01-01 00:00:00 (UTC)
integer log_type read, write Log type, refer to the @ref contacts_phone_log_type_e
integer extra_data1 read, write once You can set the related integer data (e.g. message_id, email_id or duration(seconds) of call)
string extra_data2 read, write once You can set the related string data (e.g. short message, subject)
string normalized_address filter only You can only use this property for search filter
string cleaned_address filter only You can only use this property for search filter
string address_filter filter only You can only use this property for search filter
integer sim_slot_no read, write once You can set the related SIM slot number. sim_slot_no 0 means first SIM card, sim_slot_no 1 means second SIM. It is same with handle index of telephony handle list. Refer to the telephony_init()
- late final ffi.Pointer<_contacts_phone_log_property_ids> - __contacts_phone_log = - _lookup<_contacts_phone_log_property_ids>('_contacts_phone_log'); - - _contacts_phone_log_property_ids get _contacts_phone_log => - __contacts_phone_log.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact_updated_info _contacts_contact_updated_info view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this contact updated info view
integer contact_id Updated contact ID
integer address_book_id Addressbook ID that the updated contact belongs to
integer type Contact updated type, refer to the @ref contacts_changed_e
integer version Updated version
boolean image_changed Contact image is changed or not
- late final ffi.Pointer<_contacts_contact_updated_info_property_ids> - __contacts_contact_updated_info = - _lookup<_contacts_contact_updated_info_property_ids>( - '_contacts_contact_updated_info'); - - _contacts_contact_updated_info_property_ids - get _contacts_contact_updated_info => __contacts_contact_updated_info.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile_updated_info _contacts_my_profile_updated_info view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this my profile updated info view
integer address_book_id Address book ID that the updated my profile belongs to
integer last_changed_type Changed update type, refer to the @ref contacts_changed_e
integer version Updated version
- late final ffi.Pointer<_contacts_my_profile_updated_info_property_ids> - __contacts_my_profile_updated_info = - _lookup<_contacts_my_profile_updated_info_property_ids>( - '_contacts_my_profile_updated_info'); - - _contacts_my_profile_updated_info_property_ids - get _contacts_my_profile_updated_info => - __contacts_my_profile_updated_info.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group_updated_info _contacts_group_updated_info view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this group updated info view
integer group_id Updated group ID
integer address_book_id Address book ID that the updated group belongs to
integer type Changed update type, refer to the @ref contacts_changed_e
integer version Updated version
- late final ffi.Pointer<_contacts_group_updated_info_property_ids> - __contacts_group_updated_info = - _lookup<_contacts_group_updated_info_property_ids>( - '_contacts_group_updated_info'); - - _contacts_group_updated_info_property_ids get _contacts_group_updated_info => - __contacts_group_updated_info.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group_member_updated_info _contacts_group_member_updated_info view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this group member updated info view
integer group_id Updated group ID
integer address_book_id Address book ID that the updated group belongs to
integer version Updated version
- late final ffi.Pointer<_contacts_group_member_updated_info_property_ids> - __contacts_group_member_updated_info = - _lookup<_contacts_group_member_updated_info_property_ids>( - '_contacts_group_member_updated_info'); - - _contacts_group_member_updated_info_property_ids - get _contacts_group_member_updated_info => - __contacts_group_member_updated_info.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_grouprel_updated_info _contacts_grouprel_updated_info view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this group relation updated info view
integer group_id Group ID of group relation
integer contact_id Contact ID of the updated group relation
integer address_book_id Address book ID of contact that the updated group relation
integer type Changed update type, refer to the @ref contacts_changed_e
integer version Updated version
- late final ffi.Pointer<_contacts_grouprel_updated_info_property_ids> - __contacts_grouprel_updated_info = - _lookup<_contacts_grouprel_updated_info_property_ids>( - '_contacts_grouprel_updated_info'); - - _contacts_grouprel_updated_info_property_ids - get _contacts_grouprel_updated_info => - __contacts_grouprel_updated_info.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact _contacts_person_contact view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this person contact view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
string status Status of social account (projection)
boolean is_favorite The person is favorite or not
integer link_count Link count of contact records (projection)
integer contact_id Contact ID that the person belongs to
string addressbook_ids Addressbook IDs that the person belongs to (projection)
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer address_book_id Addressbook ID that the person belongs to
integer address_book_mode Addressbook mode, refer to the @ref contacts_address_book_mode_e
string address_book_name Addressbook name that the person belongs to
integer snippet_type keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string keyword matched data string (Since 3.0)
- late final ffi.Pointer<_contacts_person_contact_property_ids> - __contacts_person_contact = - _lookup<_contacts_person_contact_property_ids>( - '_contacts_person_contact'); - - _contacts_person_contact_property_ids get _contacts_person_contact => - __contacts_person_contact.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_number _contacts_person_number view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this person number view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
boolean is_favorite The person is favorite or not
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer number_id Number ID that the person belongs to
integer type Number type, refer to the @ref contacts_number_type_e (projection)
string label Custom number type label, when the number type is #CONTACTS_NUMBER_TYPE_CUSTOM (projection)
boolean is_primary_default The number is default number or not
string number Number
string number_filter If you add filter with this property, the string will be normalized as minmatch length internally and the match rule will be applied CONTACTS_MATCH_EXACTLY
string normalized_number You can only use this property for search filter
string cleaned_number You can only use this property for search filter
integer snippet_type keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string keyword matched data string (Since 3.0)
- late final ffi.Pointer<_contacts_person_number_property_ids> - __contacts_person_number = - _lookup<_contacts_person_number_property_ids>('_contacts_person_number'); - - _contacts_person_number_property_ids get _contacts_person_number => - __contacts_person_number.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_email _contacts_person_email view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this person email view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
boolean is_favorite The person is favorite or not
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer email_id Email ID that the person belongs to
integer type Email type, refer to the @ref contacts_email_type_e (projection)
string label Custom mail type label, when the email type is #CONTACTS_EMAIL_TYPE_CUSTOM (projection)
boolean is_primary_default The email is default email or not
string email Email address
integer snippet_type keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string keyword matched data string (Since 3.0)
- late final ffi.Pointer<_contacts_person_email_property_ids> - __contacts_person_email = - _lookup<_contacts_person_email_property_ids>('_contacts_person_email'); - - _contacts_person_email_property_ids get _contacts_person_email => - __contacts_person_email.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel _contacts_person_grouprel view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this person group relation view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
string status Status of social account (projection)
boolean is_favorite The person is favorite or not
integer link_count Link count of contact records (projection)
string addressbook_ids Addressbook IDs that the person belongs to (projection)
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer address_book_id Addressbook ID that the person belongs to
integer address_book_mode Addressbook mode, refer to the @ref contacts_address_book_mode_e
string address_book_name Addressbook name that the person belongs to
integer group_id Group ID that the person belongs to
integer contact_id Contact ID that the person belongs to (projection)
integer snippet_type keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string keyword matched data string (Since 3.0)
- late final ffi.Pointer<_contacts_person_grouprel_property_ids> - __contacts_person_grouprel = - _lookup<_contacts_person_grouprel_property_ids>( - '_contacts_person_grouprel'); - - _contacts_person_grouprel_property_ids get _contacts_person_grouprel => - __contacts_person_grouprel.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned _contacts_person_group_assigned view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this person group assigned view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
string status Status of social account (projection)
boolean is_favorite The person is favorite or not
integer link_count Link count of contact records (projection)
string linked_address_book_ids Addressbook IDs that the linked person belongs to (projection)
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer address_book_id Addressbook ID that the person belongs to
integer address_book_mode Addressbook mode, refer to the @ref contacts_address_book_mode_e
integer group_id Group ID that the person belongs to
integer contact_id Contact ID that the person belongs to (projection)
integer snippet_type keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string keyword matched data string (Since 3.0)
- late final ffi.Pointer<_contacts_person_group_assigned_property_ids> - __contacts_person_group_assigned = - _lookup<_contacts_person_group_assigned_property_ids>( - '_contacts_person_group_assigned'); - - _contacts_person_group_assigned_property_ids - get _contacts_person_group_assigned => - __contacts_person_group_assigned.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned _contacts_person_group_not_assigned view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this person group not assigned view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
string status Status of social account (projection)
boolean is_favorite The person is favorite or not
integer link_count Link count of contact records (projection)
string linked_address_book_ids Addressbook IDs that the linked person belongs to (projection)
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer address_book_id Addressbook ID that the person belongs to
integer address_book_mode Addressbook mode, refer to the @ref contacts_address_book_mode_e
integer contact_id Contact ID that the person belongs to (projection)
integer snippet_type keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string keyword matched data string (Since 3.0)
- late final ffi.Pointer<_contacts_person_group_not_assigned_property_ids> - __contacts_person_group_not_assigned = - _lookup<_contacts_person_group_not_assigned_property_ids>( - '_contacts_person_group_not_assigned'); - - _contacts_person_group_not_assigned_property_ids - get _contacts_person_group_not_assigned => - __contacts_person_group_not_assigned.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_phone_log _contacts_person_phone_log view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this phone log view
integer person_id DB record ID of person
string display_name Display name of the person
string image_thumbnail_path Image thumbnail path of the person (projection)
integer log_id DB record ID of phone log
string address Number or Email that the phone log displays
integer address_type Number or Email type (projection)
integer log_time Call end time. The value means number of seconds since 1970-01-01 00:00:00 (UTC)
integer log_type Log type, refer to the @ref contacts_phone_log_type_e
integer extra_data1 You can set the related integer data (e.g. message_id, email_id or duration(seconds) of call) (projection)
string extra_data2 You can set the related string data (e.g. short message, subject) (projection)
string normalized_address You can only use this property for search filter
string cleaned_address You can only use this property for search filter
string address_filter You can only use this property for search filter
integer sim_slot_no It is related to the SIM slot number. sim_slot_no 0 means first SIM card, sim_slot_no 1 means second SIM. It is same with handle index of telephony handle list. Refer to the telephony_init()
- late final ffi.Pointer<_contacts_person_phone_log_property_ids> - __contacts_person_phone_log = - _lookup<_contacts_person_phone_log_property_ids>( - '_contacts_person_phone_log'); - - _contacts_person_phone_log_property_ids get _contacts_person_phone_log => - __contacts_person_phone_log.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_usage _contacts_person_usage view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this person usage view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
boolean is_favorite The person is favorite or not
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer usage_type Usage type, refer to the @ref contacts_usage_type_e
integer times_used Usage number of person
- late final ffi.Pointer<_contacts_person_usage_property_ids> - __contacts_person_usage = - _lookup<_contacts_person_usage_property_ids>('_contacts_person_usage'); - - _contacts_person_usage_property_ids get _contacts_person_usage => - __contacts_person_usage.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact_number _contacts_contact_number view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this contacts number view
integercontact_id Contact ID that the number belongs to
stringdisplay_name Display name of contact that the number belongs to
integerdisplay_source_type The source type of display name, refer to the @ref contacts_display_name_source_type_e (projection)
integeraddress_book_id Addressbook ID that the number belongs to
integerperson_id Person ID that the number belongs to
stringringtone_path Ringtone path that the number belongs to (projection)
stringimage_thumbnail_path Image thumbnail path that the number belongs to (projection)
integer number_id DB record ID of the number
integer type Number type, refer to the @ref contacts_number_type_e (projection)
string label Custom number type label, when the number type is #CONTACTS_NUMBER_TYPE_CUSTOM (projection)
boolean is_default The number is default number or not
string number Number
string number_filter If you add filter with this property, the string will be normalized as minmatch length internally and the match rule will be applied CONTACTS_MATCH_EXACTLY
string normalized_number You can only use this property for search filter
string cleaned_number You can only use this property for search filter
- late final ffi.Pointer<_contacts_contact_number_property_ids> - __contacts_contact_number = - _lookup<_contacts_contact_number_property_ids>( - '_contacts_contact_number'); - - _contacts_contact_number_property_ids get _contacts_contact_number => - __contacts_contact_number.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact_email _contacts_contact_email view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this contacts email view
integercontact_id Contact ID that the email belongs to
stringdisplay_name Display name that the email belongs to
integerdisplay_source_type The source type of display name that the email belongs to (projection)
integeraddress_book_id Addressbook ID that the email belongs to
integerperson_id Person ID that the email belongs to
stringringtone_path Ringtone path that the email belongs to (projection)
stringimage_thumbnail_path Image thumbnail path that the email belongs to (projection)
integer email_id DB record ID of the email
integer type Email type, refer to the @ref contacts_email_type_e (projection)
string label Custom mail type label, when the email type is #CONTACTS_EMAIL_TYPE_CUSTOM (projection)
boolean is_default Email is default email or not
string email Email address
- late final ffi.Pointer<_contacts_contact_email_property_ids> - __contacts_contact_email = - _lookup<_contacts_contact_email_property_ids>('_contacts_contact_email'); - - _contacts_contact_email_property_ids get _contacts_contact_email => - __contacts_contact_email.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact_grouprel _contacts_contact_grouprel view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this contact grouprel view
integercontact_id Contact ID that the contact group relation belongs to
stringdisplay_name Display name of the group relation
integerdisplay_source_type The source type of display name (projection)
integeraddress_book_id Addressbook ID that the group relation belongs to
integerperson_id Person ID that the group relation belongs to
stringringtone_path Ringtone path of the group relation (projection)
stringimage_thumbnail_path Image thumbnail path of the group relation (projection)
integer group_id DB record ID of the group relation
string group_name Group name (projection)
- late final ffi.Pointer<_contacts_contact_grouprel_property_ids> - __contacts_contact_grouprel = - _lookup<_contacts_contact_grouprel_property_ids>( - '_contacts_contact_grouprel'); - - _contacts_contact_grouprel_property_ids get _contacts_contact_grouprel => - __contacts_contact_grouprel.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact_activity _contacts_contact_activity view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this contact activity view
integercontact_id Contact ID that the activity belongs to
stringdisplay_name Display name of the contact that the activity belongs to
integerdisplay_source_type The source type of display name that the activity belongs to
integeraddress_book_id Addressbook that the activity belongs to
integerperson_id Person ID that the activity belongs to
stringringtone_path Ringtone path of the contact that the activity belongs to (projection)
stringimage_thumbnail_path Image thumbnail path of the contact that the activity belongs to (projection)
integer activity_id DB record ID of the activity
string source_name Account name that the activity belongs to
string status Activity status (projection)
integer timestamp Published time of activity
string service_operation Data for service_set_operation
string uri Data for service_set_uri
- late final ffi.Pointer<_contacts_contact_activity_property_ids> - __contacts_contact_activity = - _lookup<_contacts_contact_activity_property_ids>( - '_contacts_contact_activity'); - - _contacts_contact_activity_property_ids get _contacts_contact_activity => - __contacts_contact_activity.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log_stat _contacts_phone_log_stat view (read only) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDDescription
string_uri Identifier of this log stat view
integer log_count Log count (projection)
integer log_type Log type, see the @ref contacts_phone_log_type_e
integer sim_slot_no It is related to the SIM slot number. sim_slot_no 0 means first SIM card, sim_slot_no 1 means second SIM. It is same with handle index of telephony handle list. Refer to the telephony_init() (Since 3.0)
- late final ffi.Pointer<_contacts_phone_log_stat_property_ids> - __contacts_phone_log_stat = - _lookup<_contacts_phone_log_stat_property_ids>( - '_contacts_phone_log_stat'); - - _contacts_phone_log_stat_property_ids get _contacts_phone_log_stat => - __contacts_phone_log_stat.ref; - - /// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property - /// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_sip _contacts_sip view (Since 3.0) - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - ///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts sip view
integer id read only DB record ID of the sip
integer contact_id read, write once Contact ID that the sip belongs to
string address read, write SIP address
integer type read, write sip type, refer to the @ref contacts_sip_type_e
string label read, write Custom sip type label, when the sip type is #CONTACTS_SIP_TYPE_CUSTOM
- late final ffi.Pointer<_contacts_sip_property_ids> __contacts_sip = - _lookup<_contacts_sip_property_ids>('_contacts_sip'); - - _contacts_sip_property_ids get _contacts_sip => __contacts_sip.ref; - - /// @brief Creates a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a record using contacts_record_destroy(). - /// @param[in] view_uri The view URI - /// @param[out] record The record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to initialize. - /// @see contacts_record_destroy() - int contacts_record_create( - ffi.Pointer view_uri, - ffi.Pointer record, - ) { - return _contacts_record_create( - view_uri, - record, - ); - } - - late final _contacts_record_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('contacts_record_create'); - late final _contacts_record_create = _contacts_record_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys a record and releases its all resources. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The record handle - /// @param[in] delete_child Set @c true to destroy child records automatically, - /// otherwise set @c false to not destroy child records automatically - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_create() - int contacts_record_destroy( - contacts_record_h record, - bool delete_child, - ) { - return _contacts_record_destroy( - record, - delete_child, - ); - } - - late final _contacts_record_destroyPtr = _lookup< - ffi.NativeFunction>( - 'contacts_record_destroy'); - late final _contacts_record_destroy = _contacts_record_destroyPtr - .asFunction(); - - /// @brief Makes a clone of a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a cloned_record using contacts_record_destroy(). - /// @param[in] record The record handle - /// @param[out] cloned_record The cloned record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_destroy() - int contacts_record_clone( - contacts_record_h record, - ffi.Pointer cloned_record, - ) { - return _contacts_record_clone( - record, - cloned_record, - ); - } - - late final _contacts_record_clonePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, - ffi.Pointer)>>('contacts_record_clone'); - late final _contacts_record_clone = _contacts_record_clonePtr.asFunction< - int Function(contacts_record_h, ffi.Pointer)>(); - - /// @brief Gets a string from the record handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a value using free(). - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] value The value to be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_get_str_p() - /// @see contacts_record_set_str() - int contacts_record_get_str( - contacts_record_h record, - int property_id, - ffi.Pointer> value, - ) { - return _contacts_record_get_str( - record, - property_id, - value, - ); - } - - late final _contacts_record_get_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - ffi.Pointer>)>>('contacts_record_get_str'); - late final _contacts_record_get_str = _contacts_record_get_strPtr.asFunction< - int Function( - contacts_record_h, int, ffi.Pointer>)>(); - - /// @brief Gets a string pointer from the record handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You MUST NOT release @a value. - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] value The value to be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_get_str() - /// @see contacts_record_set_str() - int contacts_record_get_str_p( - contacts_record_h record, - int property_id, - ffi.Pointer> value, - ) { - return _contacts_record_get_str_p( - record, - property_id, - value, - ); - } - - late final _contacts_record_get_str_pPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - ffi.Pointer>)>>( - 'contacts_record_get_str_p'); - late final _contacts_record_get_str_p = - _contacts_record_get_str_pPtr.asFunction< - int Function( - contacts_record_h, int, ffi.Pointer>)>(); - - /// @brief Sets a string to a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[in] value The value to set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_get_str() - /// @see contacts_record_get_str_p() - int contacts_record_set_str( - contacts_record_h record, - int property_id, - ffi.Pointer value, - ) { - return _contacts_record_set_str( - record, - property_id, - value, - ); - } - - late final _contacts_record_set_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - ffi.Pointer)>>('contacts_record_set_str'); - late final _contacts_record_set_str = _contacts_record_set_strPtr.asFunction< - int Function(contacts_record_h, int, ffi.Pointer)>(); - - /// @brief Gets a record's integer value. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] value The value to be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_set_int() - int contacts_record_get_int( - contacts_record_h record, - int property_id, - ffi.Pointer value, - ) { - return _contacts_record_get_int( - record, - property_id, - value, - ); - } - - late final _contacts_record_get_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - ffi.Pointer)>>('contacts_record_get_int'); - late final _contacts_record_get_int = _contacts_record_get_intPtr - .asFunction)>(); - - /// @brief Sets an integer value to a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[in] value The value to set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_get_int() - int contacts_record_set_int( - contacts_record_h record, - int property_id, - int value, - ) { - return _contacts_record_set_int( - record, - property_id, - value, - ); - } - - late final _contacts_record_set_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - ffi.Int)>>('contacts_record_set_int'); - late final _contacts_record_set_int = _contacts_record_set_intPtr - .asFunction(); - - /// @brief Gets a record's long integer value. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] value The value to be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_set_lli() - int contacts_record_get_lli( - contacts_record_h record, - int property_id, - ffi.Pointer value, - ) { - return _contacts_record_get_lli( - record, - property_id, - value, - ); - } - - late final _contacts_record_get_lliPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - ffi.Pointer)>>('contacts_record_get_lli'); - late final _contacts_record_get_lli = _contacts_record_get_lliPtr.asFunction< - int Function(contacts_record_h, int, ffi.Pointer)>(); - - /// @brief Sets a long long integer value to a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[in] value The value to set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_get_lli() - int contacts_record_set_lli( - contacts_record_h record, - int property_id, - int value, - ) { - return _contacts_record_set_lli( - record, - property_id, - value, - ); - } - - late final _contacts_record_set_lliPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - ffi.LongLong)>>('contacts_record_set_lli'); - late final _contacts_record_set_lli = _contacts_record_set_lliPtr - .asFunction(); - - /// @brief Gets a record's boolean value. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] value The value to be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_set_bool() - int contacts_record_get_bool( - contacts_record_h record, - int property_id, - ffi.Pointer value, - ) { - return _contacts_record_get_bool( - record, - property_id, - value, - ); - } - - late final _contacts_record_get_boolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - ffi.Pointer)>>('contacts_record_get_bool'); - late final _contacts_record_get_bool = - _contacts_record_get_boolPtr.asFunction< - int Function(contacts_record_h, int, ffi.Pointer)>(); - - /// @brief Sets a boolean value to a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[in] value The value to set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_get_bool() - int contacts_record_set_bool( - contacts_record_h record, - int property_id, - bool value, - ) { - return _contacts_record_set_bool( - record, - property_id, - value, - ); - } - - late final _contacts_record_set_boolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - ffi.Bool)>>('contacts_record_set_bool'); - late final _contacts_record_set_bool = _contacts_record_set_boolPtr - .asFunction(); - - /// @brief Gets a record's double value. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] value The value to be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_set_double() - int contacts_record_get_double( - contacts_record_h record, - int property_id, - ffi.Pointer value, - ) { - return _contacts_record_get_double( - record, - property_id, - value, - ); - } - - late final _contacts_record_get_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - ffi.Pointer)>>('contacts_record_get_double'); - late final _contacts_record_get_double = - _contacts_record_get_doublePtr.asFunction< - int Function(contacts_record_h, int, ffi.Pointer)>(); - - /// @brief Sets a double value to a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[in] value The value to set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_get_double() - int contacts_record_set_double( - contacts_record_h record, - int property_id, - double value, - ) { - return _contacts_record_set_double( - record, - property_id, - value, - ); - } - - late final _contacts_record_set_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - ffi.Double)>>('contacts_record_set_double'); - late final _contacts_record_set_double = _contacts_record_set_doublePtr - .asFunction(); - - /// @brief Adds a child record to the parent record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The parent record handle - /// @param[in] property_id The property ID - /// @param[in] child_record The child record handle to be added to parent record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_remove_child_record() - int contacts_record_add_child_record( - contacts_record_h record, - int property_id, - contacts_record_h child_record, - ) { - return _contacts_record_add_child_record( - record, - property_id, - child_record, - ); - } - - late final _contacts_record_add_child_recordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - contacts_record_h)>>('contacts_record_add_child_record'); - late final _contacts_record_add_child_record = - _contacts_record_add_child_recordPtr.asFunction< - int Function(contacts_record_h, int, contacts_record_h)>(); - - /// @brief Removes a child record from the parent record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The parent record handle - /// @param[in] property_id The property ID - /// @param[in] child_record The child record handle to be removed from parent record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_add_child_record() - int contacts_record_remove_child_record( - contacts_record_h record, - int property_id, - contacts_record_h child_record, - ) { - return _contacts_record_remove_child_record( - record, - property_id, - child_record, - ); - } - - late final _contacts_record_remove_child_recordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - contacts_record_h)>>('contacts_record_remove_child_record'); - late final _contacts_record_remove_child_record = - _contacts_record_remove_child_recordPtr.asFunction< - int Function(contacts_record_h, int, contacts_record_h)>(); - - /// @brief Gets the number of child records of a parent record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The parent record handle - /// @param[in] property_id The property ID - /// @param[out] count The child record count - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_add_child_record() - /// @see contacts_record_remove_child_record() - int contacts_record_get_child_record_count( - contacts_record_h record, - int property_id, - ffi.Pointer count, - ) { - return _contacts_record_get_child_record_count( - record, - property_id, - count, - ); - } - - late final _contacts_record_get_child_record_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - ffi.Pointer)>>('contacts_record_get_child_record_count'); - late final _contacts_record_get_child_record_count = - _contacts_record_get_child_record_countPtr.asFunction< - int Function(contacts_record_h, int, ffi.Pointer)>(); - - /// @brief Gets a child record handle pointer from the parent record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You MUST NOT release @a child_record. It is released when the parent record is destroyed. - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[in] index The index of child record - /// @param[out] child_record The child record handle pointer - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NO_DATA - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_record_add_child_record() - /// @see contacts_record_remove_child_record() - /// @see contacts_record_get_child_record_count() - int contacts_record_get_child_record_at_p( - contacts_record_h record, - int property_id, - int index, - ffi.Pointer child_record, - ) { - return _contacts_record_get_child_record_at_p( - record, - property_id, - index, - child_record, - ); - } - - late final _contacts_record_get_child_record_at_pPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, ffi.Int, - ffi.Pointer)>>( - 'contacts_record_get_child_record_at_p'); - late final _contacts_record_get_child_record_at_p = - _contacts_record_get_child_record_at_pPtr.asFunction< - int Function( - contacts_record_h, int, int, ffi.Pointer)>(); - - /// @brief Clones a child record list of the given parent record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a cloned_list using contacts_list_destroy(). - /// @param[in] record The record handle - /// @param[in] property_id The property ID - /// @param[out] cloned_list The cloned list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_list_destroy() - int contacts_record_clone_child_record_list( - contacts_record_h record, - int property_id, - ffi.Pointer cloned_list, - ) { - return _contacts_record_clone_child_record_list( - record, - property_id, - cloned_list, - ); - } - - late final _contacts_record_clone_child_record_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, ffi.UnsignedInt, - ffi.Pointer)>>( - 'contacts_record_clone_child_record_list'); - late final _contacts_record_clone_child_record_list = - _contacts_record_clone_child_record_listPtr.asFunction< - int Function(contacts_record_h, int, ffi.Pointer)>(); - - /// @brief Gets URI string from a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] record The record handle - /// @param[out] view_uri The URI of record - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - int contacts_record_get_uri_p( - contacts_record_h record, - ffi.Pointer> view_uri, - ) { - return _contacts_record_get_uri_p( - record, - view_uri, - ); - } - - late final _contacts_record_get_uri_pPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - contacts_record_h, ffi.Pointer>)>>( - 'contacts_record_get_uri_p'); - late final _contacts_record_get_uri_p = - _contacts_record_get_uri_pPtr.asFunction< - int Function( - contacts_record_h, ffi.Pointer>)>(); - - /// @brief Creates a contacts list. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a contacts_list using contacts_list_destroy(). - /// @param[out] contacts_list The contacts list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_list_destroy() - int contacts_list_create( - ffi.Pointer contacts_list, - ) { - return _contacts_list_create( - contacts_list, - ); - } - - late final _contacts_list_createPtr = _lookup< - ffi.NativeFunction)>>( - 'contacts_list_create'); - late final _contacts_list_create = _contacts_list_createPtr - .asFunction)>(); - - /// @brief Destroys a contacts list and releases its all resources. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] contacts_list The contacts list handle - /// @param[in] delete_child Set @c true to destroy child records automatically, - /// otherwise set @c false to not destroy child records automatically - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_list_create() - int contacts_list_destroy( - contacts_list_h contacts_list, - bool delete_child, - ) { - return _contacts_list_destroy( - contacts_list, - delete_child, - ); - } - - late final _contacts_list_destroyPtr = - _lookup>( - 'contacts_list_destroy'); - late final _contacts_list_destroy = _contacts_list_destroyPtr - .asFunction(); - - /// @brief Retrieves the number of contact entities from a contacts list. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] contacts_list The contacts list handle - /// @param[out] count The count of contact entity - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_list_add() - int contacts_list_get_count( - contacts_list_h contacts_list, - ffi.Pointer count, - ) { - return _contacts_list_get_count( - contacts_list, - count, - ); - } - - late final _contacts_list_get_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_list_h, - ffi.Pointer)>>('contacts_list_get_count'); - late final _contacts_list_get_count = _contacts_list_get_countPtr - .asFunction)>(); - - /// @brief Adds a record to a contacts list. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks Same kind of record can be added. - /// @param[in] contacts_list The contacts list handle - /// @param[in] record The record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_list_remove() - int contacts_list_add( - contacts_list_h contacts_list, - contacts_record_h record, - ) { - return _contacts_list_add( - contacts_list, - record, - ); - } - - late final _contacts_list_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - contacts_list_h, contacts_record_h)>>('contacts_list_add'); - late final _contacts_list_add = _contacts_list_addPtr - .asFunction(); - - /// @brief Removes a record from the contacts list. - /// @details If the record is current record, then current record is changed the next record. \n - /// If the record is the last record, then current record will be @c NULL. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] contacts_list The contacts list handle - /// @param[in] record The record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_list_add() - int contacts_list_remove( - contacts_list_h contacts_list, - contacts_record_h record, - ) { - return _contacts_list_remove( - contacts_list, - record, - ); - } - - late final _contacts_list_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - contacts_list_h, contacts_record_h)>>('contacts_list_remove'); - late final _contacts_list_remove = _contacts_list_removePtr - .asFunction(); - - /// @brief Retrieves a record from the contacts list. - /// @details The default current record is the first record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You MUST NOT destroy the @a record. - /// It is destroyed automatically when the @a contacts_list is destroyed. - /// @param[in] contacts_list The contacts list handle - /// @param[out] record The record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - int contacts_list_get_current_record_p( - contacts_list_h contacts_list, - ffi.Pointer record, - ) { - return _contacts_list_get_current_record_p( - contacts_list, - record, - ); - } - - late final _contacts_list_get_current_record_pPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - contacts_list_h, ffi.Pointer)>>( - 'contacts_list_get_current_record_p'); - late final _contacts_list_get_current_record_p = - _contacts_list_get_current_record_pPtr.asFunction< - int Function(contacts_list_h, ffi.Pointer)>(); - - /// @brief Moves a contacts list to the previous position. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] contacts_list The contacts list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_list_next() - int contacts_list_prev( - contacts_list_h contacts_list, - ) { - return _contacts_list_prev( - contacts_list, - ); - } - - late final _contacts_list_prevPtr = - _lookup>( - 'contacts_list_prev'); - late final _contacts_list_prev = - _contacts_list_prevPtr.asFunction(); - - /// @brief Moves a contacts list to the next position. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] contacts_list The contacts list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_list_prev() - int contacts_list_next( - contacts_list_h contacts_list, - ) { - return _contacts_list_next( - contacts_list, - ); - } - - late final _contacts_list_nextPtr = - _lookup>( - 'contacts_list_next'); - late final _contacts_list_next = - _contacts_list_nextPtr.asFunction(); - - /// @brief Moves a contacts list to the first position. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] contacts_list The contacts list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_list_last() - int contacts_list_first( - contacts_list_h contacts_list, - ) { - return _contacts_list_first( - contacts_list, - ); - } - - late final _contacts_list_firstPtr = - _lookup>( - 'contacts_list_first'); - late final _contacts_list_first = - _contacts_list_firstPtr.asFunction(); - - /// @brief Moves a contacts list to the last position. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] contacts_list The contacts list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_list_first() - int contacts_list_last( - contacts_list_h contacts_list, - ) { - return _contacts_list_last( - contacts_list, - ); - } - - late final _contacts_list_lastPtr = - _lookup>( - 'contacts_list_last'); - late final _contacts_list_last = - _contacts_list_lastPtr.asFunction(); - - /// @brief Creates a filter. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a filter using contacts_filter_destroy(). - /// @param[in] view_uri The view URI of a filter - /// @param[out] filter The filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to initialize - /// @see contacts_filter_destroy() - int contacts_filter_create( - ffi.Pointer view_uri, - ffi.Pointer filter, - ) { - return _contacts_filter_create( - view_uri, - filter, - ); - } - - late final _contacts_filter_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('contacts_filter_create'); - late final _contacts_filter_create = _contacts_filter_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys a filter. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] filter The filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_filter_create() - int contacts_filter_destroy( - contacts_filter_h filter, - ) { - return _contacts_filter_destroy( - filter, - ); - } - - late final _contacts_filter_destroyPtr = - _lookup>( - 'contacts_filter_destroy'); - late final _contacts_filter_destroy = - _contacts_filter_destroyPtr.asFunction(); - - /// @brief Adds a condition for a string type property. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] filter The filter handle - /// @param[in] property_id The property ID to add a condition - /// @param[in] match The match flag - /// @param[in] match_value The match value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_filter_add_operator() - int contacts_filter_add_str( - contacts_filter_h filter, - int property_id, - int match, - ffi.Pointer match_value, - ) { - return _contacts_filter_add_str( - filter, - property_id, - match, - match_value, - ); - } - - late final _contacts_filter_add_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_filter_h, ffi.UnsignedInt, ffi.Int32, - ffi.Pointer)>>('contacts_filter_add_str'); - late final _contacts_filter_add_str = _contacts_filter_add_strPtr.asFunction< - int Function(contacts_filter_h, int, int, ffi.Pointer)>(); - - /// @brief Adds a condition for an integer type property. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] filter The filter handle - /// @param[in] property_id The property ID to add a condition - /// @param[in] match The match flag - /// @param[in] match_value The match value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_filter_add_operator() - int contacts_filter_add_int( - contacts_filter_h filter, - int property_id, - int match, - int match_value, - ) { - return _contacts_filter_add_int( - filter, - property_id, - match, - match_value, - ); - } - - late final _contacts_filter_add_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_filter_h, ffi.UnsignedInt, ffi.Int32, - ffi.Int)>>('contacts_filter_add_int'); - late final _contacts_filter_add_int = _contacts_filter_add_intPtr - .asFunction(); - - /// @brief Adds a condition for a long int type property. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] filter The filter handle - /// @param[in] property_id The property ID to add a condition - /// @param[in] match The match flag - /// @param[in] match_value The match value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_filter_add_operator() - int contacts_filter_add_lli( - contacts_filter_h filter, - int property_id, - int match, - int match_value, - ) { - return _contacts_filter_add_lli( - filter, - property_id, - match, - match_value, - ); - } - - late final _contacts_filter_add_lliPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_filter_h, ffi.UnsignedInt, ffi.Int32, - ffi.LongLong)>>('contacts_filter_add_lli'); - late final _contacts_filter_add_lli = _contacts_filter_add_lliPtr - .asFunction(); - - /// @brief Adds a condition for a double type property. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] filter The filter handle - /// @param[in] property_id The property ID to add a condition - /// @param[in] match The match flag - /// @param[in] match_value The match value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_filter_add_operator() - int contacts_filter_add_double( - contacts_filter_h filter, - int property_id, - int match, - double match_value, - ) { - return _contacts_filter_add_double( - filter, - property_id, - match, - match_value, - ); - } - - late final _contacts_filter_add_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_filter_h, ffi.UnsignedInt, ffi.Int32, - ffi.Double)>>('contacts_filter_add_double'); - late final _contacts_filter_add_double = _contacts_filter_add_doublePtr - .asFunction(); - - /// @brief Adds a condition for a boolean type property. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] filter The filter handle - /// @param[in] property_id The property ID to add a condition - /// @param[in] match_value The match value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_filter_add_operator() - int contacts_filter_add_bool( - contacts_filter_h filter, - int property_id, - bool match_value, - ) { - return _contacts_filter_add_bool( - filter, - property_id, - match_value, - ); - } - - late final _contacts_filter_add_boolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_filter_h, ffi.UnsignedInt, - ffi.Bool)>>('contacts_filter_add_bool'); - late final _contacts_filter_add_bool = _contacts_filter_add_boolPtr - .asFunction(); - - /// @brief Adds an operator between conditions. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] filter The filter handle - /// @param[in] operator_type The operator type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_filter_add_str() - /// @see contacts_filter_add_int() - /// @see contacts_filter_add_bool() - int contacts_filter_add_operator( - contacts_filter_h filter, - int operator_type, - ) { - return _contacts_filter_add_operator( - filter, - operator_type, - ); - } - - late final _contacts_filter_add_operatorPtr = _lookup< - ffi.NativeFunction>( - 'contacts_filter_add_operator'); - late final _contacts_filter_add_operator = _contacts_filter_add_operatorPtr - .asFunction(); - - /// @brief Adds a filter to a given filter. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] parent_filter The parent filter handle - /// @param[in] child_filter The child filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_filter_add_operator() - int contacts_filter_add_filter( - contacts_filter_h parent_filter, - contacts_filter_h child_filter, - ) { - return _contacts_filter_add_filter( - parent_filter, - child_filter, - ); - } - - late final _contacts_filter_add_filterPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_filter_h, - contacts_filter_h)>>('contacts_filter_add_filter'); - late final _contacts_filter_add_filter = _contacts_filter_add_filterPtr - .asFunction(); - - /// @brief Creates a query. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a query using contacts_query_destroy(). - /// @param[in] view_uri The view URI of a query - /// @param[out] query The filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to initialize - /// @see contacts_query_destroy() - int contacts_query_create( - ffi.Pointer view_uri, - ffi.Pointer query, - ) { - return _contacts_query_create( - view_uri, - query, - ); - } - - late final _contacts_query_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('contacts_query_create'); - late final _contacts_query_create = _contacts_query_createPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Destroys a query. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] query The query handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_query_create() - int contacts_query_destroy( - contacts_query_h query, - ) { - return _contacts_query_destroy( - query, - ); - } - - late final _contacts_query_destroyPtr = - _lookup>( - 'contacts_query_destroy'); - late final _contacts_query_destroy = - _contacts_query_destroyPtr.asFunction(); - - /// @brief Adds property IDs for projection. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] query The query handle - /// @param[in] property_id_array The property ID array - /// @param[in] count The number of property IDs - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - int contacts_query_set_projection( - contacts_query_h query, - ffi.Pointer property_id_array, - int count, - ) { - return _contacts_query_set_projection( - query, - property_id_array, - count, - ); - } - - late final _contacts_query_set_projectionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_query_h, ffi.Pointer, - ffi.Int)>>('contacts_query_set_projection'); - late final _contacts_query_set_projection = - _contacts_query_set_projectionPtr.asFunction< - int Function(contacts_query_h, ffi.Pointer, int)>(); - - /// @brief Sets the "distinct" option for projection. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] query The query handle - /// @param[in] set Set @c true to set the distinct option for projection, - /// otherwise @c false to unset the distinct option - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - int contacts_query_set_distinct( - contacts_query_h query, - bool set1, - ) { - return _contacts_query_set_distinct( - query, - set1, - ); - } - - late final _contacts_query_set_distinctPtr = - _lookup>( - 'contacts_query_set_distinct'); - late final _contacts_query_set_distinct = _contacts_query_set_distinctPtr - .asFunction(); - - /// @brief Sets a filter for query. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] query The query handle - /// @param[in] filter The filter handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @see contacts_filter_create() - int contacts_query_set_filter( - contacts_query_h query, - contacts_filter_h filter, - ) { - return _contacts_query_set_filter( - query, - filter, - ); - } - - late final _contacts_query_set_filterPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_query_h, - contacts_filter_h)>>('contacts_query_set_filter'); - late final _contacts_query_set_filter = _contacts_query_set_filterPtr - .asFunction(); - - /// @brief Sets a sort mode for query. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] query The query handle - /// @param[in] property_id The property ID to sort - /// @param[in] is_ascending Set @c true for ascending sort mode, - /// otherwise @c false for descending sort mode - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - int contacts_query_set_sort( - contacts_query_h query, - int property_id, - bool is_ascending, - ) { - return _contacts_query_set_sort( - query, - property_id, - is_ascending, - ); - } - - late final _contacts_query_set_sortPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_query_h, ffi.UnsignedInt, - ffi.Bool)>>('contacts_query_set_sort'); - late final _contacts_query_set_sort = _contacts_query_set_sortPtr - .asFunction(); - - /// @brief Inserts a record to the contacts database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @privilege %http://tizen.org/privilege/callhistory.write - /// @remarks %http://tizen.org/privilege/contact.write is needed for record which is created with @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, \n @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial. \n - /// %http://tizen.org/privilege/callhistory.write is needed for record which is created with @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log. - /// @param[in] record The record handle - /// @param[out] id The ID of inserted record - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @post contacts_db_changed_cb() callback will be called upon success. - /// @see contacts_connect() - /// @see contacts_db_update_record() - /// @see contacts_db_delete_record() - /// @see contacts_db_get_record() - int contacts_db_insert_record( - contacts_record_h record, - ffi.Pointer id, - ) { - return _contacts_db_insert_record( - record, - id, - ); - } - - late final _contacts_db_insert_recordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_record_h, - ffi.Pointer)>>('contacts_db_insert_record'); - late final _contacts_db_insert_record = _contacts_db_insert_recordPtr - .asFunction)>(); - - /// @brief Gets a record from the contacts database. - /// @details This function creates a new contact handle from the contacts database by the given @a record_id. \n - /// @a record will be created, which is filled with contact information. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @privilege %http://tizen.org/privilege/callhistory.read - /// @remarks %http://tizen.org/privilege/contact.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_simple_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_sdn. \n - /// %http://tizen.org/privilege/callhistory.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log. - /// @remarks You must release @a record using contacts_record_destroy(). - /// @param[in] view_uri The view URI of a record - /// @param[in] record_id The record ID to get from database - /// @param[out] record The record handle associated with the record ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_record_destroy() - int contacts_db_get_record( - ffi.Pointer view_uri, - int record_id, - ffi.Pointer record, - ) { - return _contacts_db_get_record( - view_uri, - record_id, - record, - ); - } - - late final _contacts_db_get_recordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, - ffi.Pointer)>>('contacts_db_get_record'); - late final _contacts_db_get_record = _contacts_db_get_recordPtr.asFunction< - int Function( - ffi.Pointer, int, ffi.Pointer)>(); - - /// @brief Updates a record in the contacts database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @privilege %http://tizen.org/privilege/callhistory.write - /// @remarks %http://tizen.org/privilege/contact.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, \n @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial. \n - /// %http://tizen.org/privilege/callhistory.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log. - /// @param[in] record The record handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @post contacts_db_changed_cb() callback will be called upon success. - /// @see contacts_connect() - /// @see contacts_db_insert_record() - /// @see contacts_db_delete_record() - /// @see contacts_db_get_record() - int contacts_db_update_record( - contacts_record_h record, - ) { - return _contacts_db_update_record( - record, - ); - } - - late final _contacts_db_update_recordPtr = - _lookup>( - 'contacts_db_update_record'); - late final _contacts_db_update_record = _contacts_db_update_recordPtr - .asFunction(); - - /// @brief Deletes a record from the contacts database with related child records. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @privilege %http://tizen.org/privilege/callhistory.write - /// @remarks %http://tizen.org/privilege/contact.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, \n @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial. \n - /// %http://tizen.org/privilege/callhistory.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log. - /// @param[in] view_uri The view URI of a record - /// @param[in] record_id The record ID to delete - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @post contacts_db_changed_cb() callback will be called upon success. - /// @see contacts_connect() - /// @see contacts_db_insert_record() - int contacts_db_delete_record( - ffi.Pointer view_uri, - int record_id, - ) { - return _contacts_db_delete_record( - view_uri, - record_id, - ); - } - - late final _contacts_db_delete_recordPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'contacts_db_delete_record'); - late final _contacts_db_delete_record = _contacts_db_delete_recordPtr - .asFunction, int)>(); - - /// @brief Replaces an id-identified record with the given record. - /// @details Now, this API supports only _contacts_contact view_uri. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @remarks The write-once value of @a record is not replaced. \n - /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact. - /// @param[in] record The new record handle to replace - /// @param[in] id The DB record ID to be replaced - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @post contacts_db_changed_cb() callback will be called upon success. - /// @see contacts_connect() - /// @see contacts_db_update_record() - /// @see contacts_db_delete_record() - /// @see contacts_db_get_record() - int contacts_db_replace_record( - contacts_record_h record, - int id, - ) { - return _contacts_db_replace_record( - record, - id, - ); - } - - late final _contacts_db_replace_recordPtr = - _lookup>( - 'contacts_db_replace_record'); - late final _contacts_db_replace_record = _contacts_db_replace_recordPtr - .asFunction(); - - /// @brief Retrieves all records and returns the results list. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @privilege %http://tizen.org/privilege/callhistory.read - /// @remarks You must release @a record_list using contacts_list_destroy(). \n - /// %http://tizen.org/privilege/contact.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_simple_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_sdn and all read-only views except views which are related to phone log. \n - /// %http://tizen.org/privilege/callhistory.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log_stat. \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_phone_log view is needed both privileges. - /// @param[in] view_uri The view URI to get records - /// @param[in] offset The index from which to get results - /// @param[in] limit The number to limit results(value 0 is used for all records) - /// @param[out] record_list The record list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_list_destroy() - int contacts_db_get_all_records( - ffi.Pointer view_uri, - int offset, - int limit, - ffi.Pointer record_list, - ) { - return _contacts_db_get_all_records( - view_uri, - offset, - limit, - record_list, - ); - } - - late final _contacts_db_get_all_recordsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int, - ffi.Pointer)>>('contacts_db_get_all_records'); - late final _contacts_db_get_all_records = - _contacts_db_get_all_recordsPtr.asFunction< - int Function( - ffi.Pointer, int, int, ffi.Pointer)>(); - - /// @brief Uses a query to find records. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @privilege %http://tizen.org/privilege/callhistory.read - /// @remarks You must release @a record_list using contacts_list_destroy(). \n - /// %http://tizen.org/privilege/contact.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_simple_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_sdn and all read-only views except views which are related to phone log. \n - /// %http://tizen.org/privilege/callhistory.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log_stat. \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_phone_log view is needed both privileges. - /// @param[in] query The query to filter the results - /// @param[in] offset The index from which to get results - /// @param[in] limit The number to limit results(value 0 is used for get all records) - /// @param[out] record_list The record list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_list_destroy() - int contacts_db_get_records_with_query( - contacts_query_h query, - int offset, - int limit, - ffi.Pointer record_list, - ) { - return _contacts_db_get_records_with_query( - query, - offset, - limit, - record_list, - ); - } - - late final _contacts_db_get_records_with_queryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_query_h, ffi.Int, ffi.Int, - ffi.Pointer)>>( - 'contacts_db_get_records_with_query'); - late final _contacts_db_get_records_with_query = - _contacts_db_get_records_with_queryPtr.asFunction< - int Function( - contacts_query_h, int, int, ffi.Pointer)>(); - - /// @brief Inserts multiple records to the contacts database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @privilege %http://tizen.org/privilege/callhistory.write - /// @remarks %http://tizen.org/privilege/contact.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, \n @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial. \n - /// %http://tizen.org/privilege/callhistory.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log. - /// @param[in] record_list The record list handle - /// @param[out] ids The IDs of inserted records - /// @param[out] count The number of IDs - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @post contacts_db_changed_cb() callback will be called upon success. - /// @see contacts_connect() - /// @see contacts_db_update_records() - /// @see contacts_db_delete_records() - int contacts_db_insert_records( - contacts_list_h record_list, - ffi.Pointer> ids, - ffi.Pointer count, - ) { - return _contacts_db_insert_records( - record_list, - ids, - count, - ); - } - - late final _contacts_db_insert_recordsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_list_h, ffi.Pointer>, - ffi.Pointer)>>('contacts_db_insert_records'); - late final _contacts_db_insert_records = - _contacts_db_insert_recordsPtr.asFunction< - int Function(contacts_list_h, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Updates multiple records in the contacts database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @privilege %http://tizen.org/privilege/callhistory.write - /// @remarks %http://tizen.org/privilege/contact.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, \n @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial. \n - /// %http://tizen.org/privilege/callhistory.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log. - /// @param[in] record_list The record list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @post contacts_db_changed_cb() callback will be called upon success. - /// @see contacts_connect() - /// @see contacts_db_insert_records() - /// @see contacts_db_delete_records() - int contacts_db_update_records( - contacts_list_h record_list, - ) { - return _contacts_db_update_records( - record_list, - ); - } - - late final _contacts_db_update_recordsPtr = - _lookup>( - 'contacts_db_update_records'); - late final _contacts_db_update_records = _contacts_db_update_recordsPtr - .asFunction(); - - /// @brief Deletes multiple records in the contacts database with related child records. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @privilege %http://tizen.org/privilege/callhistory.write - /// @remarks %http://tizen.org/privilege/contact.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, \n @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial. \n - /// %http://tizen.org/privilege/callhistory.write is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log. - /// @param[in] view_uri The view URI of records - /// @param[in] record_id_array The record IDs to delete - /// @param[in] count The size of record ID array - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @post contacts_db_changed_cb() callback will be called upon success. - /// @see contacts_connect() - /// @see contacts_db_insert_records() - /// @see contacts_db_update_records() - int contacts_db_delete_records( - ffi.Pointer view_uri, - ffi.Pointer record_id_array, - int count, - ) { - return _contacts_db_delete_records( - view_uri, - record_id_array, - count, - ); - } - - late final _contacts_db_delete_recordsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Int)>>('contacts_db_delete_records'); - late final _contacts_db_delete_records = - _contacts_db_delete_recordsPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); - - /// @brief Replaces database records identified by given ids with a given record list. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @remarks The write-once value of record is not replaced. \n - /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact. - /// @param[in] list The new record list handle to replace - /// @param[in] record_id_array The record IDs to replace - /// @param[in] count The size of record ID array - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @post contacts_db_changed_cb() callback will be called upon success. - /// @see contacts_connect() - /// @see contacts_db_update_record() - /// @see contacts_db_delete_record() - /// @see contacts_db_get_record() - int contacts_db_replace_records( - contacts_list_h list, - ffi.Pointer record_id_array, - int count, - ) { - return _contacts_db_replace_records( - list, - record_id_array, - count, - ); - } - - late final _contacts_db_replace_recordsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_list_h, ffi.Pointer, - ffi.Int)>>('contacts_db_replace_records'); - late final _contacts_db_replace_records = _contacts_db_replace_recordsPtr - .asFunction, int)>(); - - /// @brief Gets the current contacts database version. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @privilege %http://tizen.org/privilege/callhistory.read - /// @param[out] contacts_db_version The contacts database version - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_db_get_changes_by_version() - int contacts_db_get_current_version( - ffi.Pointer contacts_db_version, - ) { - return _contacts_db_get_current_version( - contacts_db_version, - ); - } - - late final _contacts_db_get_current_versionPtr = - _lookup)>>( - 'contacts_db_get_current_version'); - late final _contacts_db_get_current_version = - _contacts_db_get_current_versionPtr - .asFunction)>(); - - /// @brief Registers a callback function to be invoked when a record changes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @privilege %http://tizen.org/privilege/callhistory.read - /// @remarks %http://tizen.org/privilege/contact.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_simple_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_sdn, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group_relation.\n - /// %http://tizen.org/privilege/callhistory.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log. - /// If successive change notification produced on the view_uri are identical, - /// then they are coalesced into a single notification if the older notification has not yet been called - /// because default main loop is doing something. - /// But, it means that a callback function is not called to reliably count of change. - /// @param[in] view_uri The view URI of records whose changes are monitored - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM System error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @post contacts_db_changed_cb() will be invoked when the designated view changes. - /// @see contacts_connect() - /// @see contacts_db_changed_cb() - /// @see contacts_db_remove_changed_cb() - int contacts_db_add_changed_cb( - ffi.Pointer view_uri, - contacts_db_changed_cb callback, - ffi.Pointer user_data, - ) { - return _contacts_db_add_changed_cb( - view_uri, - callback, - user_data, - ); - } - - late final _contacts_db_add_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, contacts_db_changed_cb, - ffi.Pointer)>>('contacts_db_add_changed_cb'); - late final _contacts_db_add_changed_cb = - _contacts_db_add_changed_cbPtr.asFunction< - int Function(ffi.Pointer, contacts_db_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters a callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] view_uri The view URI of records whose changes are monitored - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM System error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_db_changed_cb() - /// @see contacts_db_add_changed_cb() - int contacts_db_remove_changed_cb( - ffi.Pointer view_uri, - contacts_db_changed_cb callback, - ffi.Pointer user_data, - ) { - return _contacts_db_remove_changed_cb( - view_uri, - callback, - user_data, - ); - } - - late final _contacts_db_remove_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, contacts_db_changed_cb, - ffi.Pointer)>>('contacts_db_remove_changed_cb'); - late final _contacts_db_remove_changed_cb = - _contacts_db_remove_changed_cbPtr.asFunction< - int Function(ffi.Pointer, contacts_db_changed_cb, - ffi.Pointer)>(); - - /// @brief Retrieves records changes since the given database version. - /// @details This function will find all changed records since the given @a contacts_db_version. \n - /// Now, support @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact_updated_info, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group_updated_info \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile_updated_info and @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_grouprel_updated_info. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @remarks You must release @a record_list using contacts_list_destroy(). - /// @param[in] view_uri The view URI to get records - /// @param[in] address_book_id The address book ID to filter - /// @param[in] contacts_db_version The contacts database version - /// @param[out] change_record_list The record list - /// @param[out] current_contacts_db_version The current contacts database version - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_list_destroy() - int contacts_db_get_changes_by_version( - ffi.Pointer view_uri, - int address_book_id, - int contacts_db_version, - ffi.Pointer change_record_list, - ffi.Pointer current_contacts_db_version, - ) { - return _contacts_db_get_changes_by_version( - view_uri, - address_book_id, - contacts_db_version, - change_record_list, - current_contacts_db_version, - ); - } - - late final _contacts_db_get_changes_by_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Pointer, - ffi.Pointer)>>('contacts_db_get_changes_by_version'); - late final _contacts_db_get_changes_by_version = - _contacts_db_get_changes_by_versionPtr.asFunction< - int Function(ffi.Pointer, int, int, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Finds records based on a given keyword. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @remarks You must release @a record_list using contacts_list_destroy(). \n - /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned \n - /// and @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned. - /// @param[in] view_uri The view URI to get records - /// @param[in] keyword The keyword - /// @param[in] offset The index from which to get results - /// @param[in] limit The number to limit results(value 0 is used for get all records) - /// @param[out] record_list The record list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_list_destroy() - int contacts_db_search_records( - ffi.Pointer view_uri, - ffi.Pointer keyword, - int offset, - int limit, - ffi.Pointer record_list, - ) { - return _contacts_db_search_records( - view_uri, - keyword, - offset, - limit, - record_list, - ); - } - - late final _contacts_db_search_recordsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Pointer)>>('contacts_db_search_records'); - late final _contacts_db_search_records = - _contacts_db_search_recordsPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, int, - ffi.Pointer)>(); - - /// @brief Finds records based on given query and keyword. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @remarks You must release @a record_list using contacts_list_destroy(). \n - /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned \n - /// and @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned. - /// @param[in] query The query handle to filter - /// @param[in] keyword The keyword - /// @param[in] offset The index from which to get results - /// @param[in] limit The number to limit results(value 0 used for get all records) - /// @param[out] record_list The record list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_list_destroy() - int contacts_db_search_records_with_query( - contacts_query_h query, - ffi.Pointer keyword, - int offset, - int limit, - ffi.Pointer record_list, - ) { - return _contacts_db_search_records_with_query( - query, - keyword, - offset, - limit, - record_list, - ); - } - - late final _contacts_db_search_records_with_queryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_query_h, ffi.Pointer, ffi.Int, - ffi.Int, ffi.Pointer)>>( - 'contacts_db_search_records_with_query'); - late final _contacts_db_search_records_with_query = - _contacts_db_search_records_with_queryPtr.asFunction< - int Function(contacts_query_h, ffi.Pointer, int, int, - ffi.Pointer)>(); - - /// @brief Finds records based on a keyword and range. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @remarks You must release @a record_list using contacts_list_destroy(). \n - /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned. These views can search records with range @ref CONTACTS_SEARCH_RANGE_NAME, @ref CONTACTS_SEARCH_RANGE_NUMBER, @ref CONTACTS_SEARCH_RANGE_DATA. \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_number can search records with @ref CONTACTS_SEARCH_RANGE_NAME and @ref CONTACTS_SEARCH_RANGE_NUMBER.\n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_email can search records with @ref CONTACTS_SEARCH_RANGE_NAME and @ref CONTACTS_SEARCH_RANGE_EMAIL. - /// @param[in] view_uri The view URI - /// @param[in] keyword The keyword - /// @param[in] offset The index from which to get results - /// @param[in] limit The number to limit results(value 0 is used for get all records) - /// @param[in] range The search range - /// @param[out] record_list The record list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_list_destroy() - int contacts_db_search_records_with_range( - ffi.Pointer view_uri, - ffi.Pointer keyword, - int offset, - int limit, - int range, - ffi.Pointer record_list, - ) { - return _contacts_db_search_records_with_range( - view_uri, - keyword, - offset, - limit, - range, - record_list, - ); - } - - late final _contacts_db_search_records_with_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Int, ffi.Int, ffi.Int, ffi.Pointer)>>( - 'contacts_db_search_records_with_range'); - late final _contacts_db_search_records_with_range = - _contacts_db_search_records_with_rangePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, int, - int, ffi.Pointer)>(); - - /// @brief Finds records based on a given keyword for snippet. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @remarks You must release @a record_list using contacts_list_destroy(). \n - /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned \n - /// and @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned. \n - /// Because start match and end match is needed to be composed with keyword, this API performance is lower than contacts_db_search_records(). - /// @param[in] view_uri The view URI to get records - /// @param[in] keyword The keyword - /// @param[in] offset The index from which to get results - /// @param[in] limit The number to limit results(value 0 used for get all records) - /// @param[in] start_match The text which is inserted into the fragment before the keyword(If NULL, default is "[") - /// @param[in] end_match The text which is inserted into the fragment after the keyword(If NULL, default is "]") - /// @param[in] token_number The one side extra number of tokens near keyword(If negative value, full sentence is printed. e.g. if token number is 3 with 'abc' keyword, "my name is [abc]de and my home") - /// @param[out] record_list The record list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_list_destroy() - int contacts_db_search_records_for_snippet( - ffi.Pointer view_uri, - ffi.Pointer keyword, - int offset, - int limit, - ffi.Pointer start_match, - ffi.Pointer end_match, - int token_number, - ffi.Pointer record_list, - ) { - return _contacts_db_search_records_for_snippet( - view_uri, - keyword, - offset, - limit, - start_match, - end_match, - token_number, - record_list, - ); - } - - late final _contacts_db_search_records_for_snippetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer)>>( - 'contacts_db_search_records_for_snippet'); - late final _contacts_db_search_records_for_snippet = - _contacts_db_search_records_for_snippetPtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - - /// @brief Finds records based on given query and keyword for snippet. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @remarks You must release @a record_list using contacts_list_destroy(). \n - /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned \n - /// and @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned. \n - /// Because start match and end match is needed to be composed with keyword, this API performance is lower than contacts_db_search_records_with_query(). - /// @param[in] query The query handle to filter - /// @param[in] keyword The keyword - /// @param[in] offset The index from which to get results - /// @param[in] limit The number to limit results(value 0 used for get all records) - /// @param[in] start_match The text which is inserted into the fragment before the keyword(If NULL, default is "[") - /// @param[in] end_match The text which is inserted into the fragment after the keyword(If NULL, default is "]") - /// @param[in] token_number The one side extra number of tokens near keyword(If negative value, full sentence is printed. e.g. if token number is 3 with 'abc' keyword, "my name is [abc]de and my home") - /// @param[out] record_list The record list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_list_destroy() - int contacts_db_search_records_with_query_for_snippet( - contacts_query_h query, - ffi.Pointer keyword, - int offset, - int limit, - ffi.Pointer start_match, - ffi.Pointer end_match, - int token_number, - ffi.Pointer record_list, - ) { - return _contacts_db_search_records_with_query_for_snippet( - query, - keyword, - offset, - limit, - start_match, - end_match, - token_number, - record_list, - ); - } - - late final _contacts_db_search_records_with_query_for_snippetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - contacts_query_h, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer)>>( - 'contacts_db_search_records_with_query_for_snippet'); - late final _contacts_db_search_records_with_query_for_snippet = - _contacts_db_search_records_with_query_for_snippetPtr.asFunction< - int Function( - contacts_query_h, - ffi.Pointer, - int, - int, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - - /// @brief Finds records based on a keyword and range for snippet. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @remarks You must release @a record_list using contacts_list_destroy(). \n - /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned. These views can search records with range @ref CONTACTS_SEARCH_RANGE_NAME, @ref CONTACTS_SEARCH_RANGE_NUMBER, @ref CONTACTS_SEARCH_RANGE_DATA. \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_number can search records with @ref CONTACTS_SEARCH_RANGE_NAME and @ref CONTACTS_SEARCH_RANGE_NUMBER.\n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_email can search records with @ref CONTACTS_SEARCH_RANGE_NAME and @ref CONTACTS_SEARCH_RANGE_EMAIL. \n - /// Because start match and end match is needed to be composed with keyword, this API performance is lower than contacts_db_search_records_with_range(). - /// @param[in] view_uri The view URI - /// @param[in] keyword The keyword - /// @param[in] offset The index from which to get results - /// @param[in] limit The number to limit results(value 0 is used for get all records) - /// @param[in] range The search range - /// @param[in] start_match The text which is inserted into the fragment before the keyword(If NULL, default is "[") - /// @param[in] end_match The text which is inserted into the fragment after the keyword(If NULL, default is "]") - /// @param[in] token_number The one side extra number of tokens near keyword(If negative value, full sentence is printed. e.g. if token number is 3 with 'abc' keyword, "my name is [abc]de and my home") - /// @param[out] record_list The record list - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_list_destroy() - int contacts_db_search_records_with_range_for_snippet( - ffi.Pointer view_uri, - ffi.Pointer keyword, - int offset, - int limit, - int range, - ffi.Pointer start_match, - ffi.Pointer end_match, - int token_number, - ffi.Pointer record_list, - ) { - return _contacts_db_search_records_with_range_for_snippet( - view_uri, - keyword, - offset, - limit, - range, - start_match, - end_match, - token_number, - record_list, - ); - } - - late final _contacts_db_search_records_with_range_for_snippetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer)>>( - 'contacts_db_search_records_with_range_for_snippet'); - late final _contacts_db_search_records_with_range_for_snippet = - _contacts_db_search_records_with_range_for_snippetPtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - int, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - - /// @brief Gets the number of records in a specific view. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @privilege %http://tizen.org/privilege/callhistory.read - /// @remarks %http://tizen.org/privilege/contact.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_simple_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_sdn and all read-only views except views which is related to phone log. \n - /// %http://tizen.org/privilege/callhistory.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log_stat. \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_phone_log view is needed both privilege. - /// @param[in] view_uri The view URI - /// @param[out] count The count of records - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_db_get_count( - ffi.Pointer view_uri, - ffi.Pointer count, - ) { - return _contacts_db_get_count( - view_uri, - count, - ); - } - - late final _contacts_db_get_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('contacts_db_get_count'); - late final _contacts_db_get_count = _contacts_db_get_countPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Gets the number of records matching a query. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @privilege %http://tizen.org/privilege/callhistory.read - /// @remarks %http://tizen.org/privilege/contact.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_simple_contact, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo, \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_sdn and all read-only views except views which is related to phone log. \n - /// %http://tizen.org/privilege/callhistory.read is needed for record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log_stat. \n - /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_phone_log view is needed both privilege. - /// @param[in] query The query handle - /// @param[out] count The count of records - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_db_get_count_with_query( - contacts_query_h query, - ffi.Pointer count, - ) { - return _contacts_db_get_count_with_query( - query, - count, - ); - } - - late final _contacts_db_get_count_with_queryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_query_h, - ffi.Pointer)>>('contacts_db_get_count_with_query'); - late final _contacts_db_get_count_with_query = - _contacts_db_get_count_with_queryPtr - .asFunction)>(); - - /// @brief Gets the last successful changed contacts database version on the current connection. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @privilege %http://tizen.org/privilege/callhistory.read - /// @param[out] last_change_version The database version - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_db_get_current_version() - int contacts_db_get_last_change_version( - ffi.Pointer last_change_version, - ) { - return _contacts_db_get_last_change_version( - last_change_version, - ); - } - - late final _contacts_db_get_last_change_versionPtr = - _lookup)>>( - 'contacts_db_get_last_change_version'); - late final _contacts_db_get_last_change_version = - _contacts_db_get_last_change_versionPtr - .asFunction)>(); - - /// @brief Gets the contacts name display order. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @param[out] name_display_order The name display order - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_IPC Unknown IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_setting_get_name_display_order( - ffi.Pointer name_display_order, - ) { - return _contacts_setting_get_name_display_order( - name_display_order, - ); - } - - late final _contacts_setting_get_name_display_orderPtr = - _lookup)>>( - 'contacts_setting_get_name_display_order'); - late final _contacts_setting_get_name_display_order = - _contacts_setting_get_name_display_orderPtr - .asFunction)>(); - - /// @brief Sets the contacts name display order. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @param[in] name_display_order The name display order - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_IPC Unknown IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @post contacts_setting_name_display_order_changed_cb() callback will be called upon success. - /// @see contacts_connect() - int contacts_setting_set_name_display_order( - int name_display_order, - ) { - return _contacts_setting_set_name_display_order( - name_display_order, - ); - } - - late final _contacts_setting_set_name_display_orderPtr = - _lookup>( - 'contacts_setting_set_name_display_order'); - late final _contacts_setting_set_name_display_order = - _contacts_setting_set_name_display_orderPtr - .asFunction(); - - /// @brief Gets the contacts name sorting order in which contacts are returned. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @param[out] name_sorting_order The name sorting order - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_IPC Unknown IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_setting_get_name_sorting_order( - ffi.Pointer name_sorting_order, - ) { - return _contacts_setting_get_name_sorting_order( - name_sorting_order, - ); - } - - late final _contacts_setting_get_name_sorting_orderPtr = - _lookup)>>( - 'contacts_setting_get_name_sorting_order'); - late final _contacts_setting_get_name_sorting_order = - _contacts_setting_get_name_sorting_orderPtr - .asFunction)>(); - - /// @brief Sets the contacts name sorting order in which contacts are returned. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @param[in] name_sorting_order The name sorting order - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_IPC Unknown IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @post contacts_setting_name_sorting_order_changed_cb() callback will be called upon success. - /// @see contacts_connect() - int contacts_setting_set_name_sorting_order( - int name_sorting_order, - ) { - return _contacts_setting_set_name_sorting_order( - name_sorting_order, - ); - } - - late final _contacts_setting_set_name_sorting_orderPtr = - _lookup>( - 'contacts_setting_set_name_sorting_order'); - late final _contacts_setting_set_name_sorting_order = - _contacts_setting_set_name_sorting_orderPtr - .asFunction(); - - /// @brief Registers a callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_IPC Unknown IPC error - /// @retval #CONTACTS_ERROR_INTERNAL Implementation Error, Temporary Use - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @post contacts_setting_name_display_order_changed_cb() will be called under certain conditions, after calling contacts_setting_set_name_display_order(). - /// @see contacts_connect() - /// @see contacts_setting_remove_name_display_order_changed_cb() - int contacts_setting_add_name_display_order_changed_cb( - contacts_setting_name_display_order_changed_cb callback, - ffi.Pointer user_data, - ) { - return _contacts_setting_add_name_display_order_changed_cb( - callback, - user_data, - ); - } - - late final _contacts_setting_add_name_display_order_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_setting_name_display_order_changed_cb, - ffi.Pointer)>>( - 'contacts_setting_add_name_display_order_changed_cb'); - late final _contacts_setting_add_name_display_order_changed_cb = - _contacts_setting_add_name_display_order_changed_cbPtr.asFunction< - int Function(contacts_setting_name_display_order_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters a callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_INTERNAL Implementation Error, Temporary Use - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_setting_add_name_display_order_changed_cb() - int contacts_setting_remove_name_display_order_changed_cb( - contacts_setting_name_display_order_changed_cb callback, - ffi.Pointer user_data, - ) { - return _contacts_setting_remove_name_display_order_changed_cb( - callback, - user_data, - ); - } - - late final _contacts_setting_remove_name_display_order_changed_cbPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - contacts_setting_name_display_order_changed_cb, - ffi.Pointer)>>( - 'contacts_setting_remove_name_display_order_changed_cb'); - late final _contacts_setting_remove_name_display_order_changed_cb = - _contacts_setting_remove_name_display_order_changed_cbPtr.asFunction< - int Function(contacts_setting_name_display_order_changed_cb, - ffi.Pointer)>(); - - /// @brief Registers a callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_IPC Unknown IPC error - /// @retval #CONTACTS_ERROR_INTERNAL Implementation Error, Temporary Use - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @post contacts_setting_name_sorting_order_changed_cb() will be called under certain conditions, after calling contacts_setting_set_name_sorting_order(). - /// @see contacts_connect() - /// @see contacts_setting_remove_name_sorting_order_changed_cb() - int contacts_setting_add_name_sorting_order_changed_cb( - contacts_setting_name_sorting_order_changed_cb callback, - ffi.Pointer user_data, - ) { - return _contacts_setting_add_name_sorting_order_changed_cb( - callback, - user_data, - ); - } - - late final _contacts_setting_add_name_sorting_order_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_setting_name_sorting_order_changed_cb, - ffi.Pointer)>>( - 'contacts_setting_add_name_sorting_order_changed_cb'); - late final _contacts_setting_add_name_sorting_order_changed_cb = - _contacts_setting_add_name_sorting_order_changed_cbPtr.asFunction< - int Function(contacts_setting_name_sorting_order_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters a callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_INTERNAL Implementation Error, Temporary Use - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_setting_add_name_sorting_order_changed_cb() - int contacts_setting_remove_name_sorting_order_changed_cb( - contacts_setting_name_sorting_order_changed_cb callback, - ffi.Pointer user_data, - ) { - return _contacts_setting_remove_name_sorting_order_changed_cb( - callback, - user_data, - ); - } - - late final _contacts_setting_remove_name_sorting_order_changed_cbPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - contacts_setting_name_sorting_order_changed_cb, - ffi.Pointer)>>( - 'contacts_setting_remove_name_sorting_order_changed_cb'); - late final _contacts_setting_remove_name_sorting_order_changed_cb = - _contacts_setting_remove_name_sorting_order_changed_cbPtr.asFunction< - int Function(contacts_setting_name_sorting_order_changed_cb, - ffi.Pointer)>(); - - /// @brief Links a person to another person. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @param[in] base_person_id The base person ID - /// @param[in] person_id The person ID to link to - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_person_link_person( - int base_person_id, - int person_id, - ) { - return _contacts_person_link_person( - base_person_id, - person_id, - ); - } - - late final _contacts_person_link_personPtr = - _lookup>( - 'contacts_person_link_person'); - late final _contacts_person_link_person = - _contacts_person_link_personPtr.asFunction(); - - /// @brief Unlinks a contact from a person. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @param[in] person_id The person ID - /// @param[in] contact_id The contact ID to unlink - /// @param[out] unlinked_person_id The person ID generated - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_person_unlink_contact( - int person_id, - int contact_id, - ffi.Pointer unlinked_person_id, - ) { - return _contacts_person_unlink_contact( - person_id, - contact_id, - unlinked_person_id, - ); - } - - late final _contacts_person_unlink_contactPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Int, - ffi.Pointer)>>('contacts_person_unlink_contact'); - late final _contacts_person_unlink_contact = - _contacts_person_unlink_contactPtr - .asFunction)>(); - - /// @brief Resets a person's usage count. - /// @details The person is no longer in the most frequently contacted person list. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @param[in] person_id The person ID - /// @param[in] type The type to reset - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_person_reset_usage( - int person_id, - int type, - ) { - return _contacts_person_reset_usage( - person_id, - type, - ); - } - - late final _contacts_person_reset_usagePtr = - _lookup>( - 'contacts_person_reset_usage'); - late final _contacts_person_reset_usage = - _contacts_person_reset_usagePtr.asFunction(); - - /// @brief Sets the order of a (favorite) contact. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @param[in] person_id The person ID to move - /// @param[in] previous_person_id The previous person ID - /// @param[in] next_person_id The back person ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_person_set_favorite_order( - int person_id, - int previous_person_id, - int next_person_id, - ) { - return _contacts_person_set_favorite_order( - person_id, - previous_person_id, - next_person_id, - ); - } - - late final _contacts_person_set_favorite_orderPtr = - _lookup>( - 'contacts_person_set_favorite_order'); - late final _contacts_person_set_favorite_order = - _contacts_person_set_favorite_orderPtr - .asFunction(); - - /// @brief Sets a record's default property. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @remarks @a id can be contact_id, number_id, email_id, image_id. - /// @param[in] property #contacts_person_property_e - /// @param[in] person_id The person ID - /// @param[in] id The record ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_person_set_default_property( - int property, - int person_id, - int id, - ) { - return _contacts_person_set_default_property( - property, - person_id, - id, - ); - } - - late final _contacts_person_set_default_propertyPtr = _lookup< - ffi.NativeFunction>( - 'contacts_person_set_default_property'); - late final _contacts_person_set_default_property = - _contacts_person_set_default_propertyPtr - .asFunction(); - - /// @brief Gets a default property for a record. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @remarks @a id can be contact_id, number_id, email_id, image_id. - /// @param[in] property #contacts_person_property_e - /// @param[in] person_id The person ID - /// @param[out] id The record ID of the property to be set as default - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_person_get_default_property( - int property, - int person_id, - ffi.Pointer id, - ) { - return _contacts_person_get_default_property( - property, - person_id, - id, - ); - } - - late final _contacts_person_get_default_propertyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Int, - ffi.Pointer)>>('contacts_person_get_default_property'); - late final _contacts_person_get_default_property = - _contacts_person_get_default_propertyPtr - .asFunction)>(); - - /// @brief Gets aggregation suggestions. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @remarks You must release @a record_list using contacts_list_destroy(). - /// @remarks This may take a long time. If you need to use it in bulk, make sure the user experience is acceptable while running it. - /// @param[in] person_id The person ID - /// @param[in] limit The number to limit results(value 0 is used for get all records) - /// @param[out] record_list The list of person records - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_person_get_aggregation_suggestions( - int person_id, - int limit, - ffi.Pointer record_list, - ) { - return _contacts_person_get_aggregation_suggestions( - person_id, - limit, - record_list, - ); - } - - late final _contacts_person_get_aggregation_suggestionsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Int, ffi.Pointer)>>( - 'contacts_person_get_aggregation_suggestions'); - late final _contacts_person_get_aggregation_suggestions = - _contacts_person_get_aggregation_suggestionsPtr - .asFunction)>(); - - /// @brief Adds a contact and a group relationship to the contacts database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @param[in] group_id The group ID - /// @param[in] contact_id The contact ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_group_remove_contact() - int contacts_group_add_contact( - int group_id, - int contact_id, - ) { - return _contacts_group_add_contact( - group_id, - contact_id, - ); - } - - late final _contacts_group_add_contactPtr = - _lookup>( - 'contacts_group_add_contact'); - late final _contacts_group_add_contact = - _contacts_group_add_contactPtr.asFunction(); - - /// @brief Removes a contact and a group relationship from the contacts database. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @param[in] group_id The group ID - /// @param[in] contact_id The contact ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_group_add_contact() - int contacts_group_remove_contact( - int group_id, - int contact_id, - ) { - return _contacts_group_remove_contact( - group_id, - contact_id, - ); - } - - late final _contacts_group_remove_contactPtr = - _lookup>( - 'contacts_group_remove_contact'); - late final _contacts_group_remove_contact = - _contacts_group_remove_contactPtr.asFunction(); - - /// @brief Sets a group between the previous group and the next group. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @param[in] group_id The group ID to move - /// @param[in] previous_group_id The previous group ID - /// @param[in] next_group_id The back group ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_group_set_group_order( - int group_id, - int previous_group_id, - int next_group_id, - ) { - return _contacts_group_set_group_order( - group_id, - previous_group_id, - next_group_id, - ); - } - - late final _contacts_group_set_group_orderPtr = - _lookup>( - 'contacts_group_set_group_order'); - late final _contacts_group_set_group_order = - _contacts_group_set_group_orderPtr - .asFunction(); - - /// @deprecated Deprecated since 3.0. Use contacts_sim_import_all_contacts_by_sim_slot_no() instead. - /// @brief Imports all contacts from first SIM to Contacts Database. - /// @since_tizen @if MOBILE 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_IPC Unknown IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @retval #CONTACTS_ERROR_INTERNAL Implementation Error, Temporary Use - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_sim_import_all_contacts() { - return _contacts_sim_import_all_contacts(); - } - - late final _contacts_sim_import_all_contactsPtr = - _lookup>( - 'contacts_sim_import_all_contacts'); - late final _contacts_sim_import_all_contacts = - _contacts_sim_import_all_contactsPtr.asFunction(); - - /// @deprecated Deprecated since 3.0. Use contacts_sim_get_initialization_status_by_sim_slot_no() instead. - /// @brief Checks whether first SIM initialization is completed. - /// @since_tizen @if MOBILE 2.3 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @param[out] completed @c true if SIM is initialized, - /// otherwise @c false if SIM is not initialized - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_IPC Unknown IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_sim_get_initialization_status( - ffi.Pointer completed, - ) { - return _contacts_sim_get_initialization_status( - completed, - ); - } - - late final _contacts_sim_get_initialization_statusPtr = - _lookup)>>( - 'contacts_sim_get_initialization_status'); - late final _contacts_sim_get_initialization_status = - _contacts_sim_get_initialization_statusPtr - .asFunction)>(); - - /// @brief Imports all contacts from SIM of the given SIM slot number to the Contacts Database. - /// @details This function invokes contacts_sim_import_progress_cb() to indicate the progress of imports whenever a contact is imported. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @param[in] sim_slot_no The SIM slot number; 0 means first SIM, 1 means second SIM - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_IPC Unknown IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - /// @see contacts_sim_import_progress_cb() - int contacts_sim_import_all_contacts_by_sim_slot_no( - int sim_slot_no, - contacts_sim_import_progress_cb callback, - ffi.Pointer user_data, - ) { - return _contacts_sim_import_all_contacts_by_sim_slot_no( - sim_slot_no, - callback, - user_data, - ); - } - - late final _contacts_sim_import_all_contacts_by_sim_slot_noPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, contacts_sim_import_progress_cb, - ffi.Pointer)>>( - 'contacts_sim_import_all_contacts_by_sim_slot_no'); - late final _contacts_sim_import_all_contacts_by_sim_slot_no = - _contacts_sim_import_all_contacts_by_sim_slot_noPtr.asFunction< - int Function( - int, contacts_sim_import_progress_cb, ffi.Pointer)>(); - - /// @brief Checks whether SIM of the given SIM slot number is initialized. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @param[in] sim_slot_no The SIM slot number; 0 means first SIM, 1 means second SIM - /// @param[out] completed @c true if SIM is initialized, - /// otherwise @c false if SIM is not initialized - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_IPC Unknown IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_sim_get_initialization_status_by_sim_slot_no( - int sim_slot_no, - ffi.Pointer completed, - ) { - return _contacts_sim_get_initialization_status_by_sim_slot_no( - sim_slot_no, - completed, - ); - } - - late final _contacts_sim_get_initialization_status_by_sim_slot_noPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer)>>( - 'contacts_sim_get_initialization_status_by_sim_slot_no'); - late final _contacts_sim_get_initialization_status_by_sim_slot_no = - _contacts_sim_get_initialization_status_by_sim_slot_noPtr - .asFunction)>(); - - /// @brief Retrieves all contacts with a record handle (_contacts_contact) from a vCard file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] vcard_file_path The file path of vCard stream file - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_NO_DATA Requested data does not exist - /// @retval #CONTACTS_ERROR_SYSTEM System error - /// @pre contacts_connect() should be called to initialize. - /// @post This function invokes contacts_vcard_parse_cb(). - /// @see contacts_vcard_parse_cb() - int contacts_vcard_parse_to_contact_foreach( - ffi.Pointer vcard_file_path, - contacts_vcard_parse_cb callback, - ffi.Pointer user_data, - ) { - return _contacts_vcard_parse_to_contact_foreach( - vcard_file_path, - callback, - user_data, - ); - } - - late final _contacts_vcard_parse_to_contact_foreachPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, contacts_vcard_parse_cb, - ffi.Pointer)>>( - 'contacts_vcard_parse_to_contact_foreach'); - late final _contacts_vcard_parse_to_contact_foreach = - _contacts_vcard_parse_to_contact_foreachPtr.asFunction< - int Function(ffi.Pointer, contacts_vcard_parse_cb, - ffi.Pointer)>(); - - /// @brief Retrieves all contacts with a contacts list from a vCard stream. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] vcard_stream The vCard stream - /// @param[out] contacts_list The contacts list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to initialize. - int contacts_vcard_parse_to_contacts( - ffi.Pointer vcard_stream, - ffi.Pointer contacts_list, - ) { - return _contacts_vcard_parse_to_contacts( - vcard_stream, - contacts_list, - ); - } - - late final _contacts_vcard_parse_to_contactsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>( - 'contacts_vcard_parse_to_contacts'); - late final _contacts_vcard_parse_to_contacts = - _contacts_vcard_parse_to_contactsPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Retrieves the vCard stream from a contact. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] contact The contact record handle - /// @param[out] vcard_stream The vCard stream - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - int contacts_vcard_make_from_contact( - contacts_record_h contact, - ffi.Pointer> vcard_stream, - ) { - return _contacts_vcard_make_from_contact( - contact, - vcard_stream, - ); - } - - late final _contacts_vcard_make_from_contactPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - contacts_record_h, ffi.Pointer>)>>( - 'contacts_vcard_make_from_contact'); - late final _contacts_vcard_make_from_contact = - _contacts_vcard_make_from_contactPtr.asFunction< - int Function( - contacts_record_h, ffi.Pointer>)>(); - - /// @brief Retrieves the vCard stream from a contact. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] my_profile The my_profile record handle - /// @param[out] vcard_stream The vCard stream - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - int contacts_vcard_make_from_my_profile( - contacts_record_h my_profile, - ffi.Pointer> vcard_stream, - ) { - return _contacts_vcard_make_from_my_profile( - my_profile, - vcard_stream, - ); - } - - late final _contacts_vcard_make_from_my_profilePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - contacts_record_h, ffi.Pointer>)>>( - 'contacts_vcard_make_from_my_profile'); - late final _contacts_vcard_make_from_my_profile = - _contacts_vcard_make_from_my_profilePtr.asFunction< - int Function( - contacts_record_h, ffi.Pointer>)>(); - - /// @brief Retrieves the vCard stream from a person. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @param[in] person The person record handle - /// @param[out] vcard_stream The vCard stream - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB DB error - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to initialize. - int contacts_vcard_make_from_person( - contacts_record_h person, - ffi.Pointer> vcard_stream, - ) { - return _contacts_vcard_make_from_person( - person, - vcard_stream, - ); - } - - late final _contacts_vcard_make_from_personPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - contacts_record_h, ffi.Pointer>)>>( - 'contacts_vcard_make_from_person'); - late final _contacts_vcard_make_from_person = - _contacts_vcard_make_from_personPtr.asFunction< - int Function( - contacts_record_h, ffi.Pointer>)>(); - - /// @brief Retrieves the count of contact entities from a vCard file. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] vcard_file_path The person record handle - /// @param[out] count The count of contact entity - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM System error - int contacts_vcard_get_entity_count( - ffi.Pointer vcard_file_path, - ffi.Pointer count, - ) { - return _contacts_vcard_get_entity_count( - vcard_file_path, - count, - ); - } - - late final _contacts_vcard_get_entity_countPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('contacts_vcard_get_entity_count'); - late final _contacts_vcard_get_entity_count = - _contacts_vcard_get_entity_countPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the limit size of width and height of photos to append in vCard streams. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.read - /// @param[out] limit_size The limit size of width and height of photos to append in vCard streams. It's in pixels - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - int contacts_vcard_get_limit_size_of_photo( - ffi.Pointer limit_size, - ) { - return _contacts_vcard_get_limit_size_of_photo( - limit_size, - ); - } - - late final _contacts_vcard_get_limit_size_of_photoPtr = _lookup< - ffi.NativeFunction)>>( - 'contacts_vcard_get_limit_size_of_photo'); - late final _contacts_vcard_get_limit_size_of_photo = - _contacts_vcard_get_limit_size_of_photoPtr - .asFunction)>(); - - /// @brief Sets the limit size of width and height of photos to append to vCard streams. - /// @details This function can be used for getting reduced vCard stream. \n - /// When making vCard stream by using contacts_vcard_make_from_person(), contacts_vcard_make_from_my_profile(), contacts_vcard_make_from_contact(), \n - /// if width or height of the photo to append is bigger than the limit size, it is reduced to the limit size while maintaining original aspect ratio, \n - /// so that vCard stream size can be reduced. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @remarks The limit_size should be bigger than or equal to 8 and smaller than 1080. - /// @param[in] limit_size The limit size of width and height of photos to append in vCard streams. It's in pixels - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - int contacts_vcard_set_limit_size_of_photo( - int limit_size, - ) { - return _contacts_vcard_set_limit_size_of_photo( - limit_size, - ); - } - - late final _contacts_vcard_set_limit_size_of_photoPtr = - _lookup>( - 'contacts_vcard_set_limit_size_of_photo'); - late final _contacts_vcard_set_limit_size_of_photo = - _contacts_vcard_set_limit_size_of_photoPtr - .asFunction(); - - /// @brief Deletes an activity record from the contacts database by contact ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @param[in] contact_id The contact ID to delete - /// @return @c 0 on success, - /// otherwise a negative error value (#contacts_error_e) - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_activity_delete_by_contact_id( - int contact_id, - ) { - return _contacts_activity_delete_by_contact_id( - contact_id, - ); - } - - late final _contacts_activity_delete_by_contact_idPtr = - _lookup>( - 'contacts_activity_delete_by_contact_id'); - late final _contacts_activity_delete_by_contact_id = - _contacts_activity_delete_by_contact_idPtr - .asFunction(); - - /// @brief Deletes an activity record from the contacts database by account ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/contact.write - /// @param[in] account_id The account ID to delete - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_activity_delete_by_account_id( - int account_id, - ) { - return _contacts_activity_delete_by_account_id( - account_id, - ); - } - - late final _contacts_activity_delete_by_account_idPtr = - _lookup>( - 'contacts_activity_delete_by_account_id'); - late final _contacts_activity_delete_by_account_id = - _contacts_activity_delete_by_account_idPtr - .asFunction(); - - /// @brief Resets the phone log's count. - /// @details The number of all types in the phone log will be @c 0. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/callhistory.write - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_phone_log_reset_statistics() { - return _contacts_phone_log_reset_statistics(); - } - - late final _contacts_phone_log_reset_statisticsPtr = - _lookup>( - 'contacts_phone_log_reset_statistics'); - late final _contacts_phone_log_reset_statistics = - _contacts_phone_log_reset_statisticsPtr.asFunction(); - - /// @brief Resets the phone log's count by sim slot no. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/callhistory.write - /// @param[in] sim_slot_no It is related to the SIM slot number. sim_slot_no 0 means first SIM, sim_slot_no 1 means second SIM - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #CONTACTS_ERROR_FILE_NO_SPACE FS Full - /// @retval #CONTACTS_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_DB Database operation failure - /// @retval #CONTACTS_ERROR_IPC IPC error - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre contacts_connect() should be called to open a connection to the contacts service. - /// @see contacts_connect() - int contacts_phone_log_reset_statistics_by_sim( - int sim_slot_no, - ) { - return _contacts_phone_log_reset_statistics_by_sim( - sim_slot_no, - ); - } - - late final _contacts_phone_log_reset_statistics_by_simPtr = - _lookup>( - 'contacts_phone_log_reset_statistics_by_sim'); - late final _contacts_phone_log_reset_statistics_by_sim = - _contacts_phone_log_reset_statistics_by_simPtr - .asFunction(); - - /// @brief Gets the current status of server. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] status The current status of server - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre This function requires an open connection to the contacts service by contacts_connect(). - /// @see contacts_connect() - int contacts_db_get_status( - ffi.Pointer status, - ) { - return _contacts_db_get_status( - status, - ); - } - - late final _contacts_db_get_statusPtr = - _lookup)>>( - 'contacts_db_get_status'); - late final _contacts_db_get_status = _contacts_db_get_statusPtr - .asFunction)>(); - - /// @brief Registers a callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre This function requires an open connection to the contacts service by contacts_connect(). - /// @see contacts_connect() - /// @see contacts_db_remove_status_changed_cb() - int contacts_db_add_status_changed_cb( - contacts_db_status_changed_cb callback, - ffi.Pointer user_data, - ) { - return _contacts_db_add_status_changed_cb( - callback, - user_data, - ); - } - - late final _contacts_db_add_status_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_db_status_changed_cb, - ffi.Pointer)>>('contacts_db_add_status_changed_cb'); - late final _contacts_db_add_status_changed_cb = - _contacts_db_add_status_changed_cbPtr.asFunction< - int Function(contacts_db_status_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters a callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CONTACTS_ERROR_NONE Successful - /// @retval #CONTACTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #CONTACTS_ERROR_NOT_SUPPORTED Not supported - /// @retval #CONTACTS_ERROR_SYSTEM Internal system module error - /// @pre This function requires an open connection to the contacts service by contacts_connect(). - /// @see contacts_connect() - /// @see contacts_db_add_status_changed_cb() - int contacts_db_remove_status_changed_cb( - contacts_db_status_changed_cb callback, - ffi.Pointer user_data, - ) { - return _contacts_db_remove_status_changed_cb( - callback, - user_data, - ); - } - - late final _contacts_db_remove_status_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(contacts_db_status_changed_cb, - ffi.Pointer)>>('contacts_db_remove_status_changed_cb'); - late final _contacts_db_remove_status_changed_cb = - _contacts_db_remove_status_changed_cbPtr.asFunction< - int Function(contacts_db_status_changed_cb, ffi.Pointer)>(); - - /// @brief Creates a blocking rule. - /// - /// @since_tizen 4.0 - /// - /// @remarks You must release @a rule using phone_number_blocking_rule_destroy(). - /// - /// @param[out] rule The blocking rule handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// - /// @pre phone_number_connect() should be called to initialize. - /// - /// @see phone_number_blocking_rule_destroy() - int phone_number_blocking_rule_create( - ffi.Pointer rule, - ) { - return _phone_number_blocking_rule_create( - rule, - ); - } - - late final _phone_number_blocking_rule_createPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'phone_number_blocking_rule_create'); - late final _phone_number_blocking_rule_create = - _phone_number_blocking_rule_createPtr.asFunction< - int Function(ffi.Pointer)>(); - - /// @brief Destroys a blocking rule and releases all its resources. - /// - /// @since_tizen 4.0 - /// - /// @param[in] rule The blocking rule handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// - /// @see phone_number_blocking_rule_create() - int phone_number_blocking_rule_destroy( - phone_number_blocking_rule_h rule, - ) { - return _phone_number_blocking_rule_destroy( - rule, - ); - } - - late final _phone_number_blocking_rule_destroyPtr = _lookup< - ffi.NativeFunction>( - 'phone_number_blocking_rule_destroy'); - late final _phone_number_blocking_rule_destroy = - _phone_number_blocking_rule_destroyPtr - .asFunction(); - - /// @brief Gets a blocked number from a rule. - /// - /// @since_tizen 4.0 - /// - /// @remarks You must release @a number using free(). - /// - /// @param[in] rule The blocking rule handle - /// @param[out] number The blocked number - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// - /// @see phone_number_blocking_rule_set_number() - int phone_number_blocking_rule_get_number( - phone_number_blocking_rule_h rule, - ffi.Pointer> number, - ) { - return _phone_number_blocking_rule_get_number( - rule, - number, - ); - } - - late final _phone_number_blocking_rule_get_numberPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(phone_number_blocking_rule_h, - ffi.Pointer>)>>( - 'phone_number_blocking_rule_get_number'); - late final _phone_number_blocking_rule_get_number = - _phone_number_blocking_rule_get_numberPtr.asFunction< - int Function(phone_number_blocking_rule_h, - ffi.Pointer>)>(); - - /// @brief Gets a rule's match type. - /// - /// @since_tizen 4.0 - /// - /// @param[in] rule The blocking rule handle - /// @param[out] match_type The match type of blocked number - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// - /// @see phone_number_blocking_rule_set_match_type() - int phone_number_blocking_rule_get_match_type( - phone_number_blocking_rule_h rule, - ffi.Pointer match_type, - ) { - return _phone_number_blocking_rule_get_match_type( - rule, - match_type, - ); - } - - late final _phone_number_blocking_rule_get_match_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - phone_number_blocking_rule_h, ffi.Pointer)>>( - 'phone_number_blocking_rule_get_match_type'); - late final _phone_number_blocking_rule_get_match_type = - _phone_number_blocking_rule_get_match_typePtr.asFunction< - int Function(phone_number_blocking_rule_h, ffi.Pointer)>(); - - /// @brief Sets a blocked number to a rule. - /// - /// @since_tizen 4.0 - /// - /// @param[in] rule The blocking rule handle - /// @param[in] number The blocked number - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// - /// @see phone_number_blocking_rule_get_number() - int phone_number_blocking_rule_set_number( - phone_number_blocking_rule_h rule, - ffi.Pointer number, - ) { - return _phone_number_blocking_rule_set_number( - rule, - number, - ); - } - - late final _phone_number_blocking_rule_set_numberPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(phone_number_blocking_rule_h, - ffi.Pointer)>>('phone_number_blocking_rule_set_number'); - late final _phone_number_blocking_rule_set_number = - _phone_number_blocking_rule_set_numberPtr.asFunction< - int Function(phone_number_blocking_rule_h, ffi.Pointer)>(); - - /// @brief Sets a rule's match type. - /// - /// @since_tizen 4.0 - /// - /// @param[in] rule The blocking rule handle - /// @param[in] match_type The match type of blocked number - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// - /// @see phone_number_blocking_rule_get_match_type() - int phone_number_blocking_rule_set_match_type( - phone_number_blocking_rule_h rule, - int match_type, - ) { - return _phone_number_blocking_rule_set_match_type( - rule, - match_type, - ); - } - - late final _phone_number_blocking_rule_set_match_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(phone_number_blocking_rule_h, - ffi.Int32)>>('phone_number_blocking_rule_set_match_type'); - late final _phone_number_blocking_rule_set_match_type = - _phone_number_blocking_rule_set_match_typePtr - .asFunction(); - - /// @brief Connects to the phonenumber-utils service. - /// @since_tizen 3.0 - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// @see phone_number_disconnect() - int phone_number_connect() { - return _phone_number_connect(); - } - - late final _phone_number_connectPtr = - _lookup>('phone_number_connect'); - late final _phone_number_connect = - _phone_number_connectPtr.asFunction(); - - /// @brief Disconnects from the phonenumber-utils service. - /// @since_tizen 3.0 - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// @see phone_number_connect() - int phone_number_disconnect() { - return _phone_number_disconnect(); - } - - late final _phone_number_disconnectPtr = - _lookup>( - 'phone_number_disconnect'); - late final _phone_number_disconnect = - _phone_number_disconnectPtr.asFunction(); - - /// @brief Gets the location string from number, region, and language. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a location using free(). - /// @remarks The phonenumber-utils is changed to client/server architecture for performance improvement since 3.0. - /// phone_number_connect()/phone_number_disconnect() should be called. - /// @param[in] number The number - /// @param[in] region The region of number - /// @param[in] language The language of location - /// @param[out] location The location string to be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_FILE_NO_SPACE_ON_DEVICE FS Full - /// @retval #PHONE_NUMBER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_NO_DATA Requested data does not exist - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// @pre phone_number_connect() should be called to open a connection to the phonenumber-utils service. (Since 3.0) - /// @post phone_number_disconnect() should be called to close a connection to the phonenumber-utils service. (Since 3.0) - int phone_number_get_location_from_number( - ffi.Pointer number, - int region, - int language, - ffi.Pointer> location, - ) { - return _phone_number_get_location_from_number( - number, - region, - language, - location, - ); - } - - late final _phone_number_get_location_from_numberPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int32, ffi.Int32, - ffi.Pointer>)>>( - 'phone_number_get_location_from_number'); - late final _phone_number_get_location_from_number = - _phone_number_get_location_from_numberPtr.asFunction< - int Function(ffi.Pointer, int, int, - ffi.Pointer>)>(); - - /// @brief Gets the formatted number. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks You must release @a formatted_number using free(). - /// @remarks The phonenumber-utils is changed to client/server architecture for performance improvement since 3.0. - /// phone_number_connect()/phone_number_disconnect() should be called. - /// @param[in] number The number - /// @param[in] region The region of number - /// @param[out] formatted_number The formatted number string to be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_FILE_NO_SPACE_ON_DEVICE FS Full - /// @retval #PHONE_NUMBER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_NO_DATA Requested data does not exist - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// @pre phone_number_connect() should be called to open a connection to the phonenumber-utils service. (Since 3.0) - /// @post phone_number_disconnect() should be called to close a connection to the phonenumber-utils service. (Since 3.0) - int phone_number_get_formatted_number( - ffi.Pointer number, - int region, - ffi.Pointer> formatted_number, - ) { - return _phone_number_get_formatted_number( - number, - region, - formatted_number, - ); - } - - late final _phone_number_get_formatted_numberPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int32, - ffi.Pointer>)>>( - 'phone_number_get_formatted_number'); - late final _phone_number_get_formatted_number = - _phone_number_get_formatted_numberPtr.asFunction< - int Function(ffi.Pointer, int, - ffi.Pointer>)>(); - - /// @brief Gets the normalized number. - /// @details Normalized number starts with plus('+') and country code, and excludes the separators such - /// as dash or space. It is a format of E.164 standard including the country code based on current network. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/telephony - /// @remarks You must release @a normalized_number using free(). - /// @remarks The phonenumber-utils is changed to client/server architecture for performance improvement since 3.0. - /// phone_number_connect()/phone_number_disconnect() should be called. - /// @param[in] number The number - /// @param[out] normalized_number The normalized number string to be returned - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_NO_DATA Requested data does not exist - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// @pre phone_number_connect() should be called to open a connection to the phonenumber-utils service. (Since 3.0) - /// @post phone_number_disconnect() should be called to close a connection to the phonenumber-utils service. (Since 3.0) - int phone_number_get_normalized_number( - ffi.Pointer number, - ffi.Pointer> normalized_number, - ) { - return _phone_number_get_normalized_number( - number, - normalized_number, - ); - } - - late final _phone_number_get_normalized_numberPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer>)>>( - 'phone_number_get_normalized_number'); - late final _phone_number_get_normalized_number = - _phone_number_get_normalized_numberPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Adds a blocking rule to the phone number database. - /// - /// @since_tizen 4.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/blocknumber.write - /// - /// @param[in] rule The blocking rule handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_DB_FAILED Database operation failure - /// @retval #PHONE_NUMBER_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_IPC Unknown IPC error - /// @retval #PHONE_NUMBER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// @pre phone_number_connect() should be called to open a connection to the phonenumber-utils service. - /// @post phone_number_disconnect() should be called to close a connection to the phonenumber-utils service. - /// @see phone_number_remove_blocking_rule() - int phone_number_add_blocking_rule( - phone_number_blocking_rule_h rule, - ) { - return _phone_number_add_blocking_rule( - rule, - ); - } - - late final _phone_number_add_blocking_rulePtr = _lookup< - ffi.NativeFunction>( - 'phone_number_add_blocking_rule'); - late final _phone_number_add_blocking_rule = - _phone_number_add_blocking_rulePtr - .asFunction(); - - /// @brief Removes a blocking rule from the phone number database. - /// - /// @since_tizen 4.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/blocknumber.write - /// - /// @remarks The blocking rule to remove should have been gotten from the phone number database using phone_number_get_blocking_rules(). - /// - /// @param[in] rule The blocking rule handle - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_DB_FAILED Database operation failure - /// @retval #PHONE_NUMBER_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_IPC Unknown IPC error - /// @retval #PHONE_NUMBER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// @pre phone_number_connect() should be called to open a connection to the phonenumber-utils service. - /// @post phone_number_disconnect() should be called to close a connection to the phonenumber-utils service. - /// @see phone_number_add_blocking_rule() - int phone_number_remove_blocking_rule( - phone_number_blocking_rule_h rule, - ) { - return _phone_number_remove_blocking_rule( - rule, - ); - } - - late final _phone_number_remove_blocking_rulePtr = _lookup< - ffi.NativeFunction>( - 'phone_number_remove_blocking_rule'); - late final _phone_number_remove_blocking_rule = - _phone_number_remove_blocking_rulePtr - .asFunction(); - - /// @brief Retrieves blocking rules as an array. - /// - /// @since_tizen 4.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/blocknumber.read - /// - /// @remarks You must release each blocking rule in the array with phone_number_blocking_rule_destroy() and @a rules using free(). - /// - /// @param[in] offset The index from which to get results - /// @param[in] limit The number to limit results (value 0 is used for all blocking rules) - /// @param[out] rules The array of blocking rule handles - /// @param[out] length The number of blocking rule handles in the array - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_DB_FAILED Database operation failure - /// @retval #PHONE_NUMBER_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_IPC Unknown IPC error - /// @retval #PHONE_NUMBER_ERROR_NO_DATA Data does not exist - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// @pre phone_number_connect() should be called to open a connection to the phonenumber-utils service. - /// @post phone_number_disconnect() should be called to close a connection to the phonenumber-utils service. - int phone_number_get_blocking_rules( - int offset, - int limit, - ffi.Pointer> rules, - ffi.Pointer length, - ) { - return _phone_number_get_blocking_rules( - offset, - limit, - rules, - length, - ); - } - - late final _phone_number_get_blocking_rulesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Int, - ffi.Pointer>, - ffi.Pointer)>>('phone_number_get_blocking_rules'); - late final _phone_number_get_blocking_rules = - _phone_number_get_blocking_rulesPtr.asFunction< - int Function( - int, - int, - ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Retrieves blocking rules that block a specific number. - /// - /// @since_tizen 4.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/blocknumber.read - /// - /// @remarks You must release each blocking rule in the array with phone_number_blocking_rule_destroy() and @a rules using free(). - /// - /// @param[in] number The number to get blocking rules related with - /// @param[out] rules The array of blocking rule handles - /// @param[out] length The number of blocking rule handles in the array - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_DB_FAILED Database operation failure - /// @retval #PHONE_NUMBER_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_IPC Unknown IPC error - /// @retval #PHONE_NUMBER_ERROR_NO_DATA Data does not exist - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// @pre phone_number_connect() should be called to open a connection to the phonenumber-utils service. - /// @post phone_number_disconnect() should be called to close a connection to the phonenumber-utils service. - int phone_number_get_blocking_rules_related( - ffi.Pointer number, - ffi.Pointer> rules, - ffi.Pointer length, - ) { - return _phone_number_get_blocking_rules_related( - number, - rules, - length, - ); - } - - late final _phone_number_get_blocking_rules_relatedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>( - 'phone_number_get_blocking_rules_related'); - late final _phone_number_get_blocking_rules_related = - _phone_number_get_blocking_rules_relatedPtr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Checks if a specific number is blocked or not. - /// - /// @since_tizen 4.0 - /// @privlevel partner - /// @privilege %http://tizen.org/privilege/blocknumber.read - /// - /// @param[in] number The number to check blocking - /// @param[out] is_blocked The blocking result - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #PHONE_NUMBER_ERROR_NONE Successful - /// @retval #PHONE_NUMBER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PHONE_NUMBER_ERROR_DB_FAILED Database operation failure - /// @retval #PHONE_NUMBER_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. - /// @retval #PHONE_NUMBER_ERROR_NOT_SUPPORTED Not supported - /// @retval #PHONE_NUMBER_ERROR_IPC Unknown IPC error - /// @retval #PHONE_NUMBER_ERROR_SYSTEM Internal error - /// @pre phone_number_connect() should be called to open a connection to the phonenumber-utils service. - /// @post phone_number_disconnect() should be called to close a connection to the phonenumber-utils service. - int phone_number_check_blocking( - ffi.Pointer number, - ffi.Pointer is_blocked, - ) { - return _phone_number_check_blocking( - number, - is_blocked, - ); - } - - late final _phone_number_check_blockingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('phone_number_check_blocking'); - late final _phone_number_check_blocking = _phone_number_check_blockingPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Gets the battery charge percentage. - /// @details It returns an integer value from @c 0 to @c 100 that indicates remaining battery charge - /// as a percentage of the maximum level. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks In order to be notified when the battery state changes, use system_info_set_changed_cb(). - /// @param[out] percent The remaining battery charge percentage (@c 0 ~ @c 100) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - int device_battery_get_percent( - ffi.Pointer percent, - ) { - return _device_battery_get_percent( - percent, - ); - } - - late final _device_battery_get_percentPtr = - _lookup)>>( - 'device_battery_get_percent'); - late final _device_battery_get_percent = _device_battery_get_percentPtr - .asFunction)>(); - - /// @brief Gets the charging state. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[out] charging The battery charging state - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - /// @see device_add_callback - /// @see device_remove_callback - /// @see #DEVICE_CALLBACK_BATTERY_CHARGING - int device_battery_is_charging( - ffi.Pointer charging, - ) { - return _device_battery_is_charging( - charging, - ); - } - - late final _device_battery_is_chargingPtr = - _lookup)>>( - 'device_battery_is_charging'); - late final _device_battery_is_charging = _device_battery_is_chargingPtr - .asFunction)>(); - - /// @brief Gets the battery level status. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[out] status The battery level status - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - /// @see device_battery_level_e - /// @see device_add_callback - /// @see device_remove_callback - /// @see #DEVICE_CALLBACK_BATTERY_LEVEL - int device_battery_get_level_status( - ffi.Pointer status, - ) { - return _device_battery_get_level_status( - status, - ); - } - - late final _device_battery_get_level_statusPtr = - _lookup)>>( - 'device_battery_get_level_status'); - late final _device_battery_get_level_status = - _device_battery_get_level_statusPtr - .asFunction)>(); - - /// @brief Gets the battery health information. - /// @since_tizen 3.0 - /// @param[out] health The battery health information - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - int device_battery_get_health( - ffi.Pointer health, - ) { - return _device_battery_get_health( - health, - ); - } - - late final _device_battery_get_healthPtr = - _lookup)>>( - 'device_battery_get_health'); - late final _device_battery_get_health = _device_battery_get_healthPtr - .asFunction)>(); - - /// @brief Gets the battery power source information. - /// @since_tizen 3.0 - /// @param[out] source The battery power source information - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - int device_battery_get_power_source( - ffi.Pointer source, - ) { - return _device_battery_get_power_source( - source, - ); - } - - late final _device_battery_get_power_sourcePtr = - _lookup)>>( - 'device_battery_get_power_source'); - late final _device_battery_get_power_source = - _device_battery_get_power_sourcePtr - .asFunction)>(); - - /// @brief Gets the battery properties. - /// @since_tizen 3.0 - /// @param[in] property The property type - /// @param[out] value The battery information for the property given - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - int device_battery_get_property( - int property, - ffi.Pointer value, - ) { - return _device_battery_get_property( - property, - value, - ); - } - - late final _device_battery_get_propertyPtr = _lookup< - ffi - .NativeFunction)>>( - 'device_battery_get_property'); - late final _device_battery_get_property = _device_battery_get_propertyPtr - .asFunction)>(); - - /// @brief Gets the battery status information. - /// @since_tizen 3.0 - /// @param[out] status The battery status information - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - int device_battery_get_status( - ffi.Pointer status, - ) { - return _device_battery_get_status( - status, - ); - } - - late final _device_battery_get_statusPtr = - _lookup)>>( - 'device_battery_get_status'); - late final _device_battery_get_status = _device_battery_get_statusPtr - .asFunction)>(); - - /// @brief Adds a callback to the observing device state. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] type The device type to monitor - /// @param[in] callback The callback function to add - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_ALREADY_IN_PROGRESS Operation already - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - int device_add_callback( - int type, - device_changed_cb callback, - ffi.Pointer user_data, - ) { - return _device_add_callback( - type, - callback, - user_data, - ); - } - - late final _device_add_callbackPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, device_changed_cb, - ffi.Pointer)>>('device_add_callback'); - late final _device_add_callback = _device_add_callbackPtr.asFunction< - int Function(int, device_changed_cb, ffi.Pointer)>(); - - /// @brief Removes a device callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] type The device type to monitor - /// @param[in] callback The callback function to remove - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - int device_remove_callback( - int type, - device_changed_cb callback, - ) { - return _device_remove_callback( - type, - callback, - ); - } - - late final _device_remove_callbackPtr = _lookup< - ffi.NativeFunction>( - 'device_remove_callback'); - late final _device_remove_callback = _device_remove_callbackPtr - .asFunction(); - - /// @brief Gets the number of display devices. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/display - /// @param[out] device_number The total number of displays - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @see device_display_get_brightness() - /// @see device_display_set_brightness() - /// @see device_display_get_max_brightness() - int device_display_get_numbers( - ffi.Pointer device_number, - ) { - return _device_display_get_numbers( - device_number, - ); - } - - late final _device_display_get_numbersPtr = - _lookup)>>( - 'device_display_get_numbers'); - late final _device_display_get_numbers = _device_display_get_numbersPtr - .asFunction)>(); - - /// @brief Gets the maximum brightness value that can be set. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/display - /// @param[in] display_index The index of the display \n - /// It can be greater than or equal to @c 0 and less than the number of displays returned by device_display_get_numbers(). \n - /// The index zero is always assigned to the main display - /// @param[out] max_brightness The maximum brightness value of the display - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @see device_display_get_numbers() - /// @see device_display_set_brightness() - /// @see device_display_get_brightness() - int device_display_get_max_brightness( - int display_index, - ffi.Pointer max_brightness, - ) { - return _device_display_get_max_brightness( - display_index, - max_brightness, - ); - } - - late final _device_display_get_max_brightnessPtr = _lookup< - ffi.NativeFunction)>>( - 'device_display_get_max_brightness'); - late final _device_display_get_max_brightness = - _device_display_get_max_brightnessPtr - .asFunction)>(); - - /// @brief Gets the display brightness value. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/display - /// @param[in] display_index The index of the display \n - /// It can be greater than or equal to @c 0 and less than the number of displays returned by device_display_get_numbers(). \n - /// The index zero is always assigned to the main display - /// @param[out] brightness The current brightness value of the display - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @see device_display_get_numbers() - /// @see device_display_set_brightness() - /// @see device_display_get_max_brightness() - int device_display_get_brightness( - int display_index, - ffi.Pointer brightness, - ) { - return _device_display_get_brightness( - display_index, - brightness, - ); - } - - late final _device_display_get_brightnessPtr = _lookup< - ffi.NativeFunction)>>( - 'device_display_get_brightness'); - late final _device_display_get_brightness = _device_display_get_brightnessPtr - .asFunction)>(); - - /// @brief Sets the display brightness value. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/display - /// @param[in] display_index The index of the display \n - /// It can be greater than or equal to @c 0 and less than the number of displays returned by device_display_get_numbers(). \n - /// The index zero is always assigned to the main display - /// @param[in] brightness The new brightness value to set \n - /// The maximum value can be represented by device_display_get_max_brightness() - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @see device_display_get_numbers() - /// @see device_display_get_max_brightness() - /// @see device_display_get_brightness() - int device_display_set_brightness( - int display_index, - int brightness, - ) { - return _device_display_set_brightness( - display_index, - brightness, - ); - } - - late final _device_display_set_brightnessPtr = - _lookup>( - 'device_display_set_brightness'); - late final _device_display_set_brightness = - _device_display_set_brightnessPtr.asFunction(); - - /// @brief Gets the current display state. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[out] state The display state - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @see device_add_callback - /// @see device_remove_callback - /// @see #DEVICE_CALLBACK_DISPLAY_STATE - int device_display_get_state( - ffi.Pointer state, - ) { - return _device_display_get_state( - state, - ); - } - - late final _device_display_get_statePtr = - _lookup)>>( - 'device_display_get_state'); - late final _device_display_get_state = _device_display_get_statePtr - .asFunction)>(); - - /// @brief Changes the display state by force. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/display - /// @remarks This API triggers display change process and then updates the status when it completes. While the operation is on-going, the device_display_get_state() function returns previous display state. - /// @remarks #DEVICE_ERROR_NOT_SUPPORTED is returned, when the following feature is not supported: %http://tizen.org/feature/display.state. - /// @param[in] state The display state - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - /// @see device_power_request_lock() - /// @see device_power_release_lock() - /// @see device_add_callback - /// @see device_remove_callback - /// @see #DEVICE_CALLBACK_DISPLAY_STATE - /// - /// @par Example - /// @code - /// ... - /// result = device_display_change_state(DISPLAY_STATE_SCREEN_OFF); - /// if (result < 0) - /// dlog_print(DLOG_ERROR, LOG_TAG, "[ERROR] return value result =%d, \n",result); - /// else - /// dlog_print(DLOG_DEBUG, LOG_TAG, "[SUCCESS] return value result =%d \n",result); - /// ... - /// @endcode - int device_display_change_state( - int state, - ) { - return _device_display_change_state( - state, - ); - } - - late final _device_display_change_statePtr = - _lookup>( - 'device_display_change_state'); - late final _device_display_change_state = - _device_display_change_statePtr.asFunction(); - - /// @brief Gets the number of vibrators. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/haptic - /// @param[in] device_number The number of vibrators - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - int device_haptic_get_count( - ffi.Pointer device_number, - ) { - return _device_haptic_get_count( - device_number, - ); - } - - late final _device_haptic_get_countPtr = - _lookup)>>( - 'device_haptic_get_count'); - late final _device_haptic_get_count = _device_haptic_get_countPtr - .asFunction)>(); - - /// @brief Opens a haptic-vibration device. - /// @details Internally, it makes a connection to the vibrator. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/haptic - /// @remarks You must close the Haptic API using device_haptic_close(). - /// @param[in] device_index The index of device what you want to vibrate \n - /// The index starts from @c 0 - /// @param[out] device_handle The handle of vibrator - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - /// @see device_haptic_close() - int device_haptic_open( - int device_index, - ffi.Pointer device_handle, - ) { - return _device_haptic_open( - device_index, - device_handle, - ); - } - - late final _device_haptic_openPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer)>>('device_haptic_open'); - late final _device_haptic_open = _device_haptic_openPtr - .asFunction)>(); - - /// @brief Closes a haptic-vibration device. - /// @details Internally, it disconnects the connection to the vibrator. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/haptic - /// @param[in] device_handle The device handle from device_haptic_open() - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - /// @see device_haptic_open() - int device_haptic_close( - haptic_device_h device_handle, - ) { - return _device_haptic_close( - device_handle, - ); - } - - late final _device_haptic_closePtr = - _lookup>( - 'device_haptic_close'); - late final _device_haptic_close = - _device_haptic_closePtr.asFunction(); - - /// @brief Vibrates during the specified time with a constant intensity. - /// @details This function can be used to start monotonous vibration for the specified time. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/haptic - /// @remarks @a feedback level is reserved for auto changing to save variable in the settings. - /// @remarks @a effect_handle effect_handle value can be @c 0(zero). - /// @param[in] device_handle The device handle from device_haptic_open() - /// @param[in] duration The play duration in milliseconds - /// @param[in] feedback The amount of the intensity variation (@c 0 ~ @c 100) - /// @param[out] effect_handle The pointer to the variable that will receive a handle to the playing effect - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - /// @see device_haptic_stop() - int device_haptic_vibrate( - haptic_device_h device_handle, - int duration, - int feedback, - ffi.Pointer effect_handle, - ) { - return _device_haptic_vibrate( - device_handle, - duration, - feedback, - effect_handle, - ); - } - - late final _device_haptic_vibratePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(haptic_device_h, ffi.Int, ffi.Int, - ffi.Pointer)>>('device_haptic_vibrate'); - late final _device_haptic_vibrate = _device_haptic_vibratePtr.asFunction< - int Function(haptic_device_h, int, int, ffi.Pointer)>(); - - /// @brief Stops all vibration effects which are being played. - /// @details This function can be used to stop all effects started by device_haptic_vibrate(). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/haptic - /// @param[in] device_handle The device handle from device_haptic_open() - /// @param[in] effect_handle The effect handle from device_haptic_vibrate() - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - /// @see device_haptic_vibrate() - int device_haptic_stop( - haptic_device_h device_handle, - haptic_effect_h effect_handle, - ) { - return _device_haptic_stop( - device_handle, - effect_handle, - ); - } - - late final _device_haptic_stopPtr = _lookup< - ffi - .NativeFunction>( - 'device_haptic_stop'); - late final _device_haptic_stop = _device_haptic_stopPtr - .asFunction(); - - /// @brief Gets the information whether IR module is available. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/use_ir - /// @param[out] available The information whether IR is available - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - int device_ir_is_available( - ffi.Pointer available, - ) { - return _device_ir_is_available( - available, - ); - } - - late final _device_ir_is_availablePtr = - _lookup)>>( - 'device_ir_is_available'); - late final _device_ir_is_available = _device_ir_is_availablePtr - .asFunction)>(); - - /// @brief Transmits IR command. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/use_ir - /// @param[in] carrier_frequency Carrier frequency to transmit IR command (Hertz) - /// @param[in] pattern Integer array of IR command - /// @param[in] size Size of IR command pattern - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - int device_ir_transmit( - int carrier_frequency, - ffi.Pointer pattern, - int size, - ) { - return _device_ir_transmit( - carrier_frequency, - pattern, - size, - ); - } - - late final _device_ir_transmitPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Int)>>('device_ir_transmit'); - late final _device_ir_transmit = _device_ir_transmitPtr - .asFunction, int)>(); - - /// @brief Gets the max brightness value of a LED that is located next to the camera. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/led - /// @remarks This API is related to the following feature: %http://tizen.org/feature/camera.back.flash - /// @param[out] max_brightness The max brightness value of the LED - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - int device_flash_get_max_brightness( - ffi.Pointer max_brightness, - ) { - return _device_flash_get_max_brightness( - max_brightness, - ); - } - - late final _device_flash_get_max_brightnessPtr = - _lookup)>>( - 'device_flash_get_max_brightness'); - late final _device_flash_get_max_brightness = - _device_flash_get_max_brightnessPtr - .asFunction)>(); - - /// @brief Gets the brightness value of a LED that is located next to the camera. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/led - /// @remarks This API is related to the following feature: %http://tizen.org/feature/camera.back.flash - /// @param[out] brightness The brightness value of LED (@c 0 ~ MAX) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - int device_flash_get_brightness( - ffi.Pointer brightness, - ) { - return _device_flash_get_brightness( - brightness, - ); - } - - late final _device_flash_get_brightnessPtr = - _lookup)>>( - 'device_flash_get_brightness'); - late final _device_flash_get_brightness = _device_flash_get_brightnessPtr - .asFunction)>(); - - /// @brief Sets the brightness value of a LED that is located next to the camera. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/led - /// @remarks Since @if Mobile 2.4 @elseif WEARABLE 3.0 @endif, this API check camera flash status whether camera API preempted flash or not, so it could be failed if flash was preempted by camera API. In this case, API will return #DEVICE_ERROR_RESOURCE_BUSY error. - /// This API is related to the following feature: %http://tizen.org/feature/camera.back.flash - /// @param[in] brightness The brightness value of LED (@c 0 ~ MAX) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - /// @retval #DEVICE_ERROR_RESOURCE_BUSY Device or resource busy - int device_flash_set_brightness( - int brightness, - ) { - return _device_flash_set_brightness( - brightness, - ); - } - - late final _device_flash_set_brightnessPtr = - _lookup>( - 'device_flash_set_brightness'); - late final _device_flash_set_brightness = - _device_flash_set_brightnessPtr.asFunction(); - - /// @brief Plays the custom effect of the service LED that is located to the front of a device. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/led - /// @remarks This API is related to the following feature: %http://tizen.org/feature/led - /// @param[in] on Turn on time in milliseconds - /// @param[in] off Turn off time in milliseconds - /// @param[in] color The Color value \n - /// The first byte means opaque and the other 3 bytes are RGB values - /// @param[in] flags The combination of enum #led_custom_flags - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - int device_led_play_custom( - int on1, - int off, - int color, - int flags, - ) { - return _device_led_play_custom( - on1, - off, - color, - flags, - ); - } - - late final _device_led_play_customPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Int, ffi.UnsignedInt, - ffi.UnsignedInt)>>('device_led_play_custom'); - late final _device_led_play_custom = - _device_led_play_customPtr.asFunction(); - - /// @brief Stops the custom effect of the service LED that is located to the front of a device. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/led - /// @remarks This API is related to the following feature: %http://tizen.org/feature/led - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - int device_led_stop_custom() { - return _device_led_stop_custom(); - } - - late final _device_led_stop_customPtr = - _lookup>('device_led_stop_custom'); - late final _device_led_stop_custom = - _device_led_stop_customPtr.asFunction(); - - /// @brief Locks the given lock state for a specified time. - /// @details After the given @a timeout_ms (in milliseconds), unlock the given lock state automatically. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/display - /// @remarks If the process dies, then every lock will be removed. - /// @param[in] type The power type to request lock - /// @param[in] timeout_ms The positive number in milliseconds or @c 0 for permanent lock \n - /// So you must release the permanent lock of power state with #device_power_release_lock() if @a timeout_ms is zero - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @see device_power_release_lock() - int device_power_request_lock( - int type, - int timeout_ms, - ) { - return _device_power_request_lock( - type, - timeout_ms, - ); - } - - late final _device_power_request_lockPtr = - _lookup>( - 'device_power_request_lock'); - late final _device_power_request_lock = - _device_power_request_lockPtr.asFunction(); - - /// @brief Releases the given lock state which was locked before. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/display - /// @param[in] type The power type to release lock - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @see device_power_request_lock() - int device_power_release_lock( - int type, - ) { - return _device_power_release_lock( - type, - ); - } - - late final _device_power_release_lockPtr = - _lookup>( - 'device_power_release_lock'); - late final _device_power_release_lock = - _device_power_release_lockPtr.asFunction(); - - /// @deprecated Deprecated Since @if WEARABLE 3.0 @else 2.4 @endif - /// @brief Changes the current power state to the normal/dim state. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/display - /// @remarks This API triggers turn on process and then updates the status when it completes. While the operation is on-going, the device_display_get_state() function returns previous display state. - /// @remarks #DEVICE_ERROR_NOT_SUPPORTED is returned, when the following feature is not supported: %http://tizen.org/feature/display.state. - /// @param[in] dim Set @c true to set the dim state, - /// otherwise set @c false to not set the dim state - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - /// @retval #DEVICE_ERROR_NOT_SUPPORTED Not supported device - /// @post The device will be in #DISPLAY_STATE_NORMAL state. - int device_power_wakeup( - bool dim, - ) { - return _device_power_wakeup( - dim, - ); - } - - late final _device_power_wakeupPtr = - _lookup>( - 'device_power_wakeup'); - late final _device_power_wakeup = - _device_power_wakeupPtr.asFunction(); - - /// @platform - /// @brief Reboots the device. - /// @details Will not return if the reboot is successful. \n - /// It operates asynchronously. - /// @since_tizen 2.3.1 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/reboot - /// @param[in] reason Pass to the platform and kernel to request special reboot reason, or null - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #DEVICE_ERROR_NONE Successful - /// @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed - int device_power_reboot( - ffi.Pointer reason, - ) { - return _device_power_reboot( - reason, - ); - } - - late final _device_power_rebootPtr = - _lookup)>>( - 'device_power_reboot'); - late final _device_power_reboot = - _device_power_rebootPtr.asFunction)>(); - - /// @brief Sends log with priority and tag. - /// @details for application. - /// @if MOBILE @since_tizen 2.3 @elseif WEARABLE @since_tizen 2.3.1 @endif - /// @param[in] prio priority level of type #log_priority - /// @param[in] tag tag - a null-terminated string - /// @param[in] fmt format string - same as printf - /// @return On success, the function returns the number of bytes written. - /// On error, a negative errno-style error code - /// @retval #DLOG_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DLOG_ERROR_NOT_PERMITTED Operation not permitted - /// @pre none - /// @post none - /// @see dlog_vprint - /// - /// @code - /// #include - /// int main(void) - /// { - /// int integer = 21; - /// char string[] = "test dlog"; - /// - /// dlog_print(DLOG_INFO, "USR_TAG", "test dlog"); - /// dlog_print(DLOG_INFO, "USR_TAG", "%s, %d", string, integer); - /// return 0; - /// } - /// @endcode - int dlog_print( - int prio, - ffi.Pointer tag, - ffi.Pointer fmt, - ) { - return _dlog_print( - prio, - tag, - fmt, - ); - } - - late final _dlog_printPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer, - ffi.Pointer)>>('dlog_print'); - late final _dlog_print = _dlog_printPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sends log with priority, tag, and va_list. - /// @details for application. - /// @if MOBILE @since_tizen 2.3 @elseif WEARABLE @since_tizen 2.3.1 @endif - /// @param[in] prio priority level of type #log_priority - /// @param[in] tag tag - a null-terminated string - /// @param[in] fmt format string - same as printf - /// @param[in] ap va_list - /// @return On success, the function returns the number of bytes written. - /// On error, a negative errno-style error code - /// @retval #DLOG_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #DLOG_ERROR_NOT_PERMITTED Operation not permitted - /// @pre none - /// @post none - /// @see dlog_print - /// - /// @code - /// #include - /// void my_debug_print(char *format, ...) - /// { - /// va_list ap; - /// - /// va_start(ap, format); - /// dlog_vprint(DLOG_INFO, "USR_TAG", format, ap); - /// va_end(ap); - /// } - /// - /// int main(void) - /// { - /// my_debug_print("%s", "test dlog"); - /// my_debug_print("%s, %d", "test dlog", 21); - /// return 0; - /// } - /// @endcode - int dlog_vprint( - int prio, - ffi.Pointer tag, - ffi.Pointer fmt, - va_list ap, - ) { - return _dlog_vprint( - prio, - tag, - fmt, - ap, - ); - } - - late final _dlog_vprintPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer, - ffi.Pointer, va_list)>>('dlog_vprint'); - late final _dlog_vprint = _dlog_vprintPtr.asFunction< - int Function( - int, ffi.Pointer, ffi.Pointer, va_list)>(); - - /// @brief Initializes feedback API. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks If this function is not called in advance, other function will return #FEEDBACK_ERROR_NOT_INITIALIZED. - /// And for controlling haptic device, the privilege should be set to, %http://tizen.org/privilege/haptic. - /// If you don't have the haptic privilege, this function initializes only sound. - /// It does not return any error in this case. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FEEDBACK_ERROR_NONE Successful - /// @retval #FEEDBACK_ERROR_NOT_SUPPORTED Not supported device - /// @post feedback_deinitialize() - /// @see feedback_deinitialize() - int feedback_initialize() { - return _feedback_initialize(); - } - - late final _feedback_initializePtr = - _lookup>('feedback_initialize'); - late final _feedback_initialize = - _feedback_initializePtr.asFunction(); - - /// @brief Deinitializes feedback API. - /// @details This function must be called when feedback functions are no longer needed. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks If you don't want to use feedback anymore, you need to deinitialize with this function. - /// And for controlling haptic device, the privilege should be set to, %http://tizen.org/privilege/haptic. - /// If you don't have the haptic privilege, this function deinitializes only sound. - /// It does not return any error in this case. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FEEDBACK_ERROR_NONE Successful - /// @retval #FEEDBACK_ERROR_NOT_INITIALIZED Not initialized - /// @retval #FEEDBACK_ERROR_NOT_SUPPORTED Not supported device - /// @pre feedback_initialize() - /// @see feedback_initialize() - int feedback_deinitialize() { - return _feedback_deinitialize(); - } - - late final _feedback_deinitializePtr = - _lookup>('feedback_deinitialize'); - late final _feedback_deinitialize = - _feedback_deinitializePtr.asFunction(); - - /// @brief Plays various types of reactions that are pre-defined. - /// @details This function can be used to react to pre-defined actions. \n - /// It play various types of system pre-defined media or vibration patterns. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks Currently, there are two types of reactions: sound and vibration. \n - /// Depending on the settings, some types cannot operate. - /// For example, when set to silent mode, the device doesn't produce any sound. - /// If to play one of the devices is successful, this function regards as success. - /// And for controlling haptic device, the privilege should be set to, %http://tizen.org/privilege/haptic. - /// If you don't have the haptic privilege, it only works sound operation. - /// It does not return any error in this case. - /// @param[in] pattern The pre-defined pattern - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FEEDBACK_ERROR_NONE Successful - /// @retval #FEEDBACK_ERROR_OPERATION_FAILED Operation not permitted - /// @retval #FEEDBACK_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #FEEDBACK_ERROR_NOT_SUPPORTED Not supported device - /// @retval #FEEDBACK_ERROR_NOT_INITIALIZED Not initialized - /// @pre feedback_initialize() - int feedback_play( - int pattern, - ) { - return _feedback_play( - pattern, - ); - } - - late final _feedback_playPtr = - _lookup>('feedback_play'); - late final _feedback_play = _feedback_playPtr.asFunction(); - - /// @brief Plays specific type of reactions that are pre-defined. - /// @details This function can be used to react to pre-defined actions. \n - /// It play specific type of system pre-defined pattern. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks Currently, there are two types of reactions: sound and vibration. \n - /// Depending on the settings, some types cannot operate. - /// For example, when set to silent mode, the device doesn't produce any sound. - /// And for controlling haptic device, the privilege should be set to, %http://tizen.org/privilege/haptic. - /// If you don't have the haptic privilege, it returns FEEDBACK_ERROR_PERMISSION_DENIED error. - /// @param[in] type The pattern type - /// @param[in] pattern The pre-defined pattern - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FEEDBACK_ERROR_NONE Successful - /// @retval #FEEDBACK_ERROR_OPERATION_FAILED Operation not permitted - /// @retval #FEEDBACK_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #FEEDBACK_ERROR_NOT_SUPPORTED Not supported device - /// @retval #FEEDBACK_ERROR_PERMISSION_DENIED Permission denied - /// @retval #FEEDBACK_ERROR_NOT_INITIALIZED Not initialized - /// @pre feedback_initialize() - int feedback_play_type( - int type, - int pattern, - ) { - return _feedback_play_type( - type, - pattern, - ); - } - - late final _feedback_play_typePtr = - _lookup>( - 'feedback_play_type'); - late final _feedback_play_type = - _feedback_play_typePtr.asFunction(); - - /// @brief Stops various types of reactions. - /// @details This function can be used to stop reaction to pre-defined actions. \n - /// It stops system pre-defined vibration patterns. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks This function does not support to stop media sound actions. \n - /// In this case, it will return FEEDBACK_ERROR_NOT_SUPPORTED error. - /// And for controlling haptic device, the privilege should be set to, %http://tizen.org/privilege/haptic. - /// If you don't have the haptic privilege, it only works sound operation. - /// It does not return any error in this case. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FEEDBACK_ERROR_NONE Successful - /// @retval #FEEDBACK_ERROR_OPERATION_FAILED Operation not permitted - /// @retval #FEEDBACK_ERROR_NOT_SUPPORTED Not supported device - /// @retval #FEEDBACK_ERROR_PERMISSION_DENIED Permission denied - /// @retval #FEEDBACK_ERROR_NOT_INITIALIZED Not initialized - /// @pre feedback_initialize() - int feedback_stop() { - return _feedback_stop(); - } - - late final _feedback_stopPtr = - _lookup>('feedback_stop'); - late final _feedback_stop = _feedback_stopPtr.asFunction(); - - /// @brief Checks if the pattern is supported. - /// @details This function can be used to check if a specific pattern is supported. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] type The pattern type - /// @param[in] pattern The pre-defined pattern - /// @param[out] status True means the pattern is supported, - /// otherwise not supported - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #FEEDBACK_ERROR_NONE Successful - /// @retval #FEEDBACK_ERROR_OPERATION_FAILED Operation not permitted - /// @retval #FEEDBACK_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #FEEDBACK_ERROR_NOT_SUPPORTED Not supported device - /// @retval #FEEDBACK_ERROR_NOT_INITIALIZED Not initialized - /// @pre feedback_initialize() - int feedback_is_supported_pattern( - int type, - int pattern, - ffi.Pointer status, - ) { - return _feedback_is_supported_pattern( - type, - pattern, - status, - ); - } - - late final _feedback_is_supported_patternPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Int32, - ffi.Pointer)>>('feedback_is_supported_pattern'); - late final _feedback_is_supported_pattern = _feedback_is_supported_patternPtr - .asFunction)>(); - - /// @brief Registers a change event callback for all media keys. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_KEY_ERROR_NONE Successful - /// @retval #MEDIA_KEY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_KEY_ERROR_OPERATION_FAILED Reserve key failed - /// @see media_key_release() - int media_key_reserve( - media_key_event_cb callback, - ffi.Pointer user_data, - ) { - return _media_key_reserve( - callback, - user_data, - ); - } - - late final _media_key_reservePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - media_key_event_cb, ffi.Pointer)>>('media_key_reserve'); - late final _media_key_reserve = _media_key_reservePtr - .asFunction)>(); - - /// @brief Unregisters the change event callback function. - /// - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #MEDIA_KEY_ERROR_NONE Successful - /// @retval #MEDIA_KEY_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MEDIA_KEY_ERROR_OPERATION_FAILED Release key failed - /// @see media_key_reserve() - int media_key_release() { - return _media_key_release(); - } - - late final _media_key_releasePtr = - _lookup>('media_key_release'); - late final _media_key_release = - _media_key_releasePtr.asFunction(); - - /// @platform - /// @brief Opens a GPIO pin. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// @remarks @a gpio should be released with peripheral_gpio_close() - /// - /// @param[in] gpio_pin The GPIO pin number - /// @param[out] gpio The GPIO handle is created on success - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_OUT_OF_MEMORY Memory allocation failed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_RESOURCE_BUSY Device is in use - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @post peripheral_gpio_close() - int peripheral_gpio_open( - int gpio_pin, - ffi.Pointer gpio, - ) { - return _peripheral_gpio_open( - gpio_pin, - gpio, - ); - } - - late final _peripheral_gpio_openPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, - ffi.Pointer)>>('peripheral_gpio_open'); - late final _peripheral_gpio_open = _peripheral_gpio_openPtr - .asFunction)>(); - - /// @platform - /// @brief Closes a GPIO pin. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] gpio The GPIO handle - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @pre peripheral_gpio_open() - int peripheral_gpio_close( - peripheral_gpio_h gpio, - ) { - return _peripheral_gpio_close( - gpio, - ); - } - - late final _peripheral_gpio_closePtr = - _lookup>( - 'peripheral_gpio_close'); - late final _peripheral_gpio_close = - _peripheral_gpio_closePtr.asFunction(); - - /// @platform - /// @brief Sets the GPIO direction. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// @remarks To set the direction to #PERIPHERAL_GPIO_DIRECTION_OUT_INITIALLY_HIGH or #PERIPHERAL_GPIO_DIRECTION_OUT_INITIALLY_LOW, the edge mode must be set to #PERIPHERAL_GPIO_EDGE_NONE. - /// - /// @param[in] gpio The GPIO handle - /// @param[in] direction The direction of the GPIO pin - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_gpio_direction_e - /// @see peripheral_gpio_set_edge_mode() - int peripheral_gpio_set_direction( - peripheral_gpio_h gpio, - int direction, - ) { - return _peripheral_gpio_set_direction( - gpio, - direction, - ); - } - - late final _peripheral_gpio_set_directionPtr = _lookup< - ffi.NativeFunction>( - 'peripheral_gpio_set_direction'); - late final _peripheral_gpio_set_direction = _peripheral_gpio_set_directionPtr - .asFunction(); - - /// @platform - /// @brief Sets the GPIO edge mode. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// @remarks To set the edge mode to #PERIPHERAL_GPIO_EDGE_RISING, #PERIPHERAL_GPIO_EDGE_FALLING, #PERIPHERAL_GPIO_EDGE_BOTH, the data direction must be set to the #PERIPHERAL_GPIO_DIRECTION_IN. - /// - /// @param[in] gpio The GPIO handle - /// @param[in] edge The edge mode of the GPIO pin - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_gpio_edge_e - /// @see peripheral_gpio_set_direction() - int peripheral_gpio_set_edge_mode( - peripheral_gpio_h gpio, - int edge, - ) { - return _peripheral_gpio_set_edge_mode( - gpio, - edge, - ); - } - - late final _peripheral_gpio_set_edge_modePtr = _lookup< - ffi.NativeFunction>( - 'peripheral_gpio_set_edge_mode'); - late final _peripheral_gpio_set_edge_mode = _peripheral_gpio_set_edge_modePtr - .asFunction(); - - /// @platform - /// @brief Sets the GPIO interrupted callback to be invoked when the GPIO interrupt is triggered. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// @remarks The interrupted callback is unset when called peripheral_gpio_unset_interrupted_cb() or callback receives an error value other than #PERIPHERAL_ERROR_NONE. - /// - /// @param[in] gpio The GPIO handle - /// @param[in] callback The GPIO interrupted callback function to set - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// - /// @post peripheral_gpio_unset_interrupted_cb() - /// @see peripheral_gpio_set_edge_mode() - int peripheral_gpio_set_interrupted_cb( - peripheral_gpio_h gpio, - peripheral_gpio_interrupted_cb callback, - ffi.Pointer user_data, - ) { - return _peripheral_gpio_set_interrupted_cb( - gpio, - callback, - user_data, - ); - } - - late final _peripheral_gpio_set_interrupted_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_gpio_h, peripheral_gpio_interrupted_cb, - ffi.Pointer)>>('peripheral_gpio_set_interrupted_cb'); - late final _peripheral_gpio_set_interrupted_cb = - _peripheral_gpio_set_interrupted_cbPtr.asFunction< - int Function(peripheral_gpio_h, peripheral_gpio_interrupted_cb, - ffi.Pointer)>(); - - /// @platform - /// @brief Unsets the GPIO interrupted callback. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] gpio The GPIO handle - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// - /// @pre peripheral_gpio_set_interrupted_cb() - int peripheral_gpio_unset_interrupted_cb( - peripheral_gpio_h gpio, - ) { - return _peripheral_gpio_unset_interrupted_cb( - gpio, - ); - } - - late final _peripheral_gpio_unset_interrupted_cbPtr = - _lookup>( - 'peripheral_gpio_unset_interrupted_cb'); - late final _peripheral_gpio_unset_interrupted_cb = - _peripheral_gpio_unset_interrupted_cbPtr - .asFunction(); - - /// @platform - /// @brief Gets the current value of the GPIO pin. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] gpio The GPIO handle - /// @param[out] value The value to get - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_gpio_write() - int peripheral_gpio_read( - peripheral_gpio_h gpio, - ffi.Pointer value, - ) { - return _peripheral_gpio_read( - gpio, - value, - ); - } - - late final _peripheral_gpio_readPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_gpio_h, - ffi.Pointer)>>('peripheral_gpio_read'); - late final _peripheral_gpio_read = _peripheral_gpio_readPtr - .asFunction)>(); - - /// @platform - /// @brief Sets the value of the GPIO pin. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// @remarks To write binary data, the direction must be set to #PERIPHERAL_GPIO_DIRECTION_OUT_INITIALLY_HIGH or #PERIPHERAL_GPIO_DIRECTION_OUT_INITIALLY_LOW. - /// - /// @param[in] gpio The GPIO handle - /// @param[in] value The value to set (must be 0 or 1) - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_gpio_read() - /// @see peripheral_gpio_set_direction() - int peripheral_gpio_write( - peripheral_gpio_h gpio, - int value, - ) { - return _peripheral_gpio_write( - gpio, - value, - ); - } - - late final _peripheral_gpio_writePtr = _lookup< - ffi.NativeFunction>( - 'peripheral_gpio_write'); - late final _peripheral_gpio_write = _peripheral_gpio_writePtr - .asFunction(); - - /// @platform - /// @brief Opens an I2C slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// @remarks @a i2c should be released with peripheral_i2c_close() - /// - /// @param[in] bus The I2C bus number that the slave device is connected - /// @param[in] address The address of the slave device - /// @param[out] i2c The I2C handle is created on success - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_OUT_OF_MEMORY Memory allocation failed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_RESOURCE_BUSY Device is in use - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @post peripheral_i2c_close() - int peripheral_i2c_open( - int bus, - int address, - ffi.Pointer i2c, - ) { - return _peripheral_i2c_open( - bus, - address, - i2c, - ); - } - - late final _peripheral_i2c_openPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Int, - ffi.Pointer)>>('peripheral_i2c_open'); - late final _peripheral_i2c_open = _peripheral_i2c_openPtr - .asFunction)>(); - - /// @platform - /// @brief Closes an I2C slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] i2c The I2C handle - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @pre peripheral_i2c_open() - int peripheral_i2c_close( - peripheral_i2c_h i2c, - ) { - return _peripheral_i2c_close( - i2c, - ); - } - - late final _peripheral_i2c_closePtr = - _lookup>( - 'peripheral_i2c_close'); - late final _peripheral_i2c_close = - _peripheral_i2c_closePtr.asFunction(); - - /// @platform - /// @brief Reads the bytes data from the I2C slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] i2c The I2C handle - /// @param[out] data The data buffer to read - /// @param[in] length The size of data buffer (in bytes) - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_i2c_write() - int peripheral_i2c_read( - peripheral_i2c_h i2c, - ffi.Pointer data, - int length, - ) { - return _peripheral_i2c_read( - i2c, - data, - length, - ); - } - - late final _peripheral_i2c_readPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_i2c_h, ffi.Pointer, - ffi.Uint32)>>('peripheral_i2c_read'); - late final _peripheral_i2c_read = _peripheral_i2c_readPtr.asFunction< - int Function(peripheral_i2c_h, ffi.Pointer, int)>(); - - /// @platform - /// @brief Writes the bytes data to the I2C slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] i2c The I2C handle - /// @param[in] data The data buffer to write - /// @param[in] length The size of data buffer (in bytes) - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_i2c_read() - int peripheral_i2c_write( - peripheral_i2c_h i2c, - ffi.Pointer data, - int length, - ) { - return _peripheral_i2c_write( - i2c, - data, - length, - ); - } - - late final _peripheral_i2c_writePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_i2c_h, ffi.Pointer, - ffi.Uint32)>>('peripheral_i2c_write'); - late final _peripheral_i2c_write = _peripheral_i2c_writePtr.asFunction< - int Function(peripheral_i2c_h, ffi.Pointer, int)>(); - - /// @platform - /// @brief Reads single byte data from the register of the I2C slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] i2c The I2C handle - /// @param[in] reg The register address of the I2C slave device to read - /// @param[out] data The single byte data to read - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_i2c_write_register_byte() - int peripheral_i2c_read_register_byte( - peripheral_i2c_h i2c, - int reg, - ffi.Pointer data, - ) { - return _peripheral_i2c_read_register_byte( - i2c, - reg, - data, - ); - } - - late final _peripheral_i2c_read_register_bytePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_i2c_h, ffi.Uint8, - ffi.Pointer)>>('peripheral_i2c_read_register_byte'); - late final _peripheral_i2c_read_register_byte = - _peripheral_i2c_read_register_bytePtr.asFunction< - int Function(peripheral_i2c_h, int, ffi.Pointer)>(); - - /// @platform - /// @brief Writes single byte data to the register of the I2C slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] i2c The I2C handle - /// @param[in] reg The register address of the I2C slave device to write - /// @param[in] data The single byte data to write - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_i2c_read_register_byte() - int peripheral_i2c_write_register_byte( - peripheral_i2c_h i2c, - int reg, - int data, - ) { - return _peripheral_i2c_write_register_byte( - i2c, - reg, - data, - ); - } - - late final _peripheral_i2c_write_register_bytePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_i2c_h, ffi.Uint8, - ffi.Uint8)>>('peripheral_i2c_write_register_byte'); - late final _peripheral_i2c_write_register_byte = - _peripheral_i2c_write_register_bytePtr - .asFunction(); - - /// @platform - /// @brief Reads word data from the register of the I2C slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] i2c The I2C handle - /// @param[in] reg The register address of the I2C slave device to read - /// @param[out] data The word(2 bytes) data to read - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_i2c_write_register_word() - int peripheral_i2c_read_register_word( - peripheral_i2c_h i2c, - int reg, - ffi.Pointer data, - ) { - return _peripheral_i2c_read_register_word( - i2c, - reg, - data, - ); - } - - late final _peripheral_i2c_read_register_wordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_i2c_h, ffi.Uint8, - ffi.Pointer)>>('peripheral_i2c_read_register_word'); - late final _peripheral_i2c_read_register_word = - _peripheral_i2c_read_register_wordPtr.asFunction< - int Function(peripheral_i2c_h, int, ffi.Pointer)>(); - - /// @platform - /// @brief Writes word data to the register of the I2C slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] i2c The I2C handle - /// @param[in] reg The register address of the I2C slave device to write - /// @param[in] data The word(2 bytes) data to write - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_i2c_read_register_word() - int peripheral_i2c_write_register_word( - peripheral_i2c_h i2c, - int reg, - int data, - ) { - return _peripheral_i2c_write_register_word( - i2c, - reg, - data, - ); - } - - late final _peripheral_i2c_write_register_wordPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_i2c_h, ffi.Uint8, - ffi.Uint16)>>('peripheral_i2c_write_register_word'); - late final _peripheral_i2c_write_register_word = - _peripheral_i2c_write_register_wordPtr - .asFunction(); - - /// @platform - /// @brief Opens the PWM pin. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// @remarks @a pwm should be released with peripheral_pwm_close() - /// - /// @param[in] chip The PWM chip number - /// @param[in] pin The PWM pin(channel) number to control - /// @param[out] pwm The PWM handle is created on success - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_OUT_OF_MEMORY Memory allocation failed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_RESOURCE_BUSY Device is in use - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @post peripheral_pwm_close() - int peripheral_pwm_open( - int chip, - int pin, - ffi.Pointer pwm, - ) { - return _peripheral_pwm_open( - chip, - pin, - pwm, - ); - } - - late final _peripheral_pwm_openPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Int, - ffi.Pointer)>>('peripheral_pwm_open'); - late final _peripheral_pwm_open = _peripheral_pwm_openPtr - .asFunction)>(); - - /// @platform - /// @brief Closes the PWM pin. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] pwm The PWM handle - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @pre peripheral_pwm_open() - int peripheral_pwm_close( - peripheral_pwm_h pwm, - ) { - return _peripheral_pwm_close( - pwm, - ); - } - - late final _peripheral_pwm_closePtr = - _lookup>( - 'peripheral_pwm_close'); - late final _peripheral_pwm_close = - _peripheral_pwm_closePtr.asFunction(); - - /// @platform - /// @brief Sets period of the PWM pin. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] pwm The PWM handle - /// @param[in] period_ns The total period of the PWM pin (in nanoseconds) - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - int peripheral_pwm_set_period( - peripheral_pwm_h pwm, - int period_ns, - ) { - return _peripheral_pwm_set_period( - pwm, - period_ns, - ); - } - - late final _peripheral_pwm_set_periodPtr = _lookup< - ffi.NativeFunction>( - 'peripheral_pwm_set_period'); - late final _peripheral_pwm_set_period = _peripheral_pwm_set_periodPtr - .asFunction(); - - /// @platform - /// @brief Sets duty cycle of the PWM pin. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] pwm The PWM handle - /// @param[in] duty_cycle_ns The duty cycle of the PWM pin (in nanoseconds) - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - int peripheral_pwm_set_duty_cycle( - peripheral_pwm_h pwm, - int duty_cycle_ns, - ) { - return _peripheral_pwm_set_duty_cycle( - pwm, - duty_cycle_ns, - ); - } - - late final _peripheral_pwm_set_duty_cyclePtr = _lookup< - ffi.NativeFunction>( - 'peripheral_pwm_set_duty_cycle'); - late final _peripheral_pwm_set_duty_cycle = _peripheral_pwm_set_duty_cyclePtr - .asFunction(); - - /// @platform - /// @brief Sets polarity of the PWM pin. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] pwm The PWM handle - /// @param[in] polarity The polarity of the PWM pin - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_pwm_polarity_e - int peripheral_pwm_set_polarity( - peripheral_pwm_h pwm, - int polarity, - ) { - return _peripheral_pwm_set_polarity( - pwm, - polarity, - ); - } - - late final _peripheral_pwm_set_polarityPtr = _lookup< - ffi.NativeFunction>( - 'peripheral_pwm_set_polarity'); - late final _peripheral_pwm_set_polarity = _peripheral_pwm_set_polarityPtr - .asFunction(); - - /// @platform - /// @brief Enables the PWM pin. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] pwm The PWM handle - /// @param[in] enabled Enable/disable the PWM pin - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - int peripheral_pwm_set_enabled( - peripheral_pwm_h pwm, - bool enabled, - ) { - return _peripheral_pwm_set_enabled( - pwm, - enabled, - ); - } - - late final _peripheral_pwm_set_enabledPtr = - _lookup>( - 'peripheral_pwm_set_enabled'); - late final _peripheral_pwm_set_enabled = _peripheral_pwm_set_enabledPtr - .asFunction(); - - /// @platform - /// @brief Opens the ADC pin. - /// @since_tizen 5.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// @remarks @a adc should be released with peripheral_adc_close() - /// - /// @param[in] device The ADC device number - /// @param[in] channel The ADC channel number to control - /// @param[out] adc The ADC handle is created on success - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_OUT_OF_MEMORY Memory allocation failed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_RESOURCE_BUSY Device is in use - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @post peripheral_adc_close() - int peripheral_adc_open( - int device, - int channel, - ffi.Pointer adc, - ) { - return _peripheral_adc_open( - device, - channel, - adc, - ); - } - - late final _peripheral_adc_openPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Int, - ffi.Pointer)>>('peripheral_adc_open'); - late final _peripheral_adc_open = _peripheral_adc_openPtr - .asFunction)>(); - - /// @platform - /// @brief Closes the ADC pin. - /// @since_tizen 5.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] adc The ADC handle - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @pre peripheral_adc_open() - int peripheral_adc_close( - peripheral_adc_h adc, - ) { - return _peripheral_adc_close( - adc, - ); - } - - late final _peripheral_adc_closePtr = - _lookup>( - 'peripheral_adc_close'); - late final _peripheral_adc_close = - _peripheral_adc_closePtr.asFunction(); - - /// @platform - /// @brief Gets the current value of the ADC pin. - /// @since_tizen 5.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] adc The ADC handle - /// @param[out] value The value to get - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - int peripheral_adc_read( - peripheral_adc_h adc, - ffi.Pointer value, - ) { - return _peripheral_adc_read( - adc, - value, - ); - } - - late final _peripheral_adc_readPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_adc_h, - ffi.Pointer)>>('peripheral_adc_read'); - late final _peripheral_adc_read = _peripheral_adc_readPtr - .asFunction)>(); - - /// @platform - /// @brief Opens the UART slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// @remarks @a uart should be released with peripheral_uart_close() - /// - /// @param[in] port The UART port number that the slave device is connected - /// @param[out] uart The UART handle is created on success - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_OUT_OF_MEMORY Memory allocation failed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_RESOURCE_BUSY Device is in use - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @post peripheral_uart_close() - int peripheral_uart_open( - int port, - ffi.Pointer uart, - ) { - return _peripheral_uart_open( - port, - uart, - ); - } - - late final _peripheral_uart_openPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, - ffi.Pointer)>>('peripheral_uart_open'); - late final _peripheral_uart_open = _peripheral_uart_openPtr - .asFunction)>(); - - /// @platform - /// @brief Closes the UART slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] uart The UART handle - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @pre peripheral_uart_open() - int peripheral_uart_close( - peripheral_uart_h uart, - ) { - return _peripheral_uart_close( - uart, - ); - } - - late final _peripheral_uart_closePtr = - _lookup>( - 'peripheral_uart_close'); - late final _peripheral_uart_close = - _peripheral_uart_closePtr.asFunction(); - - /// @platform - /// @brief Sets baud rate of the UART slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] uart The UART handle - /// @param[in] baud Baud rate of the UART slave device - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_uart_baud_rate_e - int peripheral_uart_set_baud_rate( - peripheral_uart_h uart, - int baud, - ) { - return _peripheral_uart_set_baud_rate( - uart, - baud, - ); - } - - late final _peripheral_uart_set_baud_ratePtr = _lookup< - ffi.NativeFunction>( - 'peripheral_uart_set_baud_rate'); - late final _peripheral_uart_set_baud_rate = _peripheral_uart_set_baud_ratePtr - .asFunction(); - - /// @platform - /// @brief Sets byte size of the UART slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] uart The UART handle - /// @param[in] byte_size Byte size of the UART slave device - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_uart_byte_size_e - int peripheral_uart_set_byte_size( - peripheral_uart_h uart, - int byte_size, - ) { - return _peripheral_uart_set_byte_size( - uart, - byte_size, - ); - } - - late final _peripheral_uart_set_byte_sizePtr = _lookup< - ffi.NativeFunction>( - 'peripheral_uart_set_byte_size'); - late final _peripheral_uart_set_byte_size = _peripheral_uart_set_byte_sizePtr - .asFunction(); - - /// @platform - /// @brief Sets parity bit of the UART slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] uart The UART handle - /// @param[in] parity Parity bit of the UART slave device - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_uart_parity_e - int peripheral_uart_set_parity( - peripheral_uart_h uart, - int parity, - ) { - return _peripheral_uart_set_parity( - uart, - parity, - ); - } - - late final _peripheral_uart_set_parityPtr = _lookup< - ffi.NativeFunction>( - 'peripheral_uart_set_parity'); - late final _peripheral_uart_set_parity = _peripheral_uart_set_parityPtr - .asFunction(); - - /// @platform - /// @brief Sets stop bits of the UART slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] uart The UART handle - /// @param[in] stop_bits Stop bits of the UART slave device - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_uart_stop_bits_e - int peripheral_uart_set_stop_bits( - peripheral_uart_h uart, - int stop_bits, - ) { - return _peripheral_uart_set_stop_bits( - uart, - stop_bits, - ); - } - - late final _peripheral_uart_set_stop_bitsPtr = _lookup< - ffi.NativeFunction>( - 'peripheral_uart_set_stop_bits'); - late final _peripheral_uart_set_stop_bits = _peripheral_uart_set_stop_bitsPtr - .asFunction(); - - /// @platform - /// @brief Sets flow control of the UART slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] uart The UART handle - /// @param[in] sw_flow_control Software flow control (Turns a transmitter on or off) - /// @param[in] hw_flow_control Hardware flow control (Turns "Request to Send/Clear to Send" on or off) - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_uart_software_flow_control_e - /// @see peripheral_uart_hardware_flow_control_e - int peripheral_uart_set_flow_control( - peripheral_uart_h uart, - int sw_flow_control, - int hw_flow_control, - ) { - return _peripheral_uart_set_flow_control( - uart, - sw_flow_control, - hw_flow_control, - ); - } - - late final _peripheral_uart_set_flow_controlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_uart_h, ffi.Int32, - ffi.Int32)>>('peripheral_uart_set_flow_control'); - late final _peripheral_uart_set_flow_control = - _peripheral_uart_set_flow_controlPtr - .asFunction(); - - /// @platform - /// @brief Reads data from the UART slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] uart The UART handle - /// @param[out] data The buffer to read - /// @param[out] length The size of buffer (in bytes) - /// - /// @return the number of bytes read on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_TRY_AGAIN Try again - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_uart_write() - int peripheral_uart_read( - peripheral_uart_h uart, - ffi.Pointer data, - int length, - ) { - return _peripheral_uart_read( - uart, - data, - length, - ); - } - - late final _peripheral_uart_readPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_uart_h, ffi.Pointer, - ffi.Uint32)>>('peripheral_uart_read'); - late final _peripheral_uart_read = _peripheral_uart_readPtr.asFunction< - int Function(peripheral_uart_h, ffi.Pointer, int)>(); - - /// @platform - /// @brief Writes data to the UART slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] uart The UART handle - /// @param[in] data The buffer to write - /// @param[in] length The size of buffer (in bytes) - /// - /// @return the number of bytes write on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_TRY_AGAIN Try again - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_uart_read() - int peripheral_uart_write( - peripheral_uart_h uart, - ffi.Pointer data, - int length, - ) { - return _peripheral_uart_write( - uart, - data, - length, - ); - } - - late final _peripheral_uart_writePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_uart_h, ffi.Pointer, - ffi.Uint32)>>('peripheral_uart_write'); - late final _peripheral_uart_write = _peripheral_uart_writePtr.asFunction< - int Function(peripheral_uart_h, ffi.Pointer, int)>(); - - /// @platform - /// @brief Opens a SPI slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// @remarks @a spi should be released with peripheral_spi_close() - /// - /// @param[in] bus The SPI bus number - /// @param[in] cs The SPI chip select number - /// @param[out] spi The SPI slave device handle - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_OUT_OF_MEMORY Memory allocation failed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_RESOURCE_BUSY Device is in use - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @post peripheral_spi_close() - int peripheral_spi_open( - int bus, - int cs, - ffi.Pointer spi, - ) { - return _peripheral_spi_open( - bus, - cs, - spi, - ); - } - - late final _peripheral_spi_openPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Int, - ffi.Pointer)>>('peripheral_spi_open'); - late final _peripheral_spi_open = _peripheral_spi_openPtr - .asFunction)>(); - - /// @platform - /// @brief Closes the SPI slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] spi The SPI slave device handle - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_spi_open() - int peripheral_spi_close( - peripheral_spi_h spi, - ) { - return _peripheral_spi_close( - spi, - ); - } - - late final _peripheral_spi_closePtr = - _lookup>( - 'peripheral_spi_close'); - late final _peripheral_spi_close = - _peripheral_spi_closePtr.asFunction(); - - /// @platform - /// @brief Sets the SPI transfer mode. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] spi The SPI slave device handle - /// @param[in] mode The SPI transfer mode - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_spi_mode_e - int peripheral_spi_set_mode( - peripheral_spi_h spi, - int mode, - ) { - return _peripheral_spi_set_mode( - spi, - mode, - ); - } - - late final _peripheral_spi_set_modePtr = _lookup< - ffi.NativeFunction>( - 'peripheral_spi_set_mode'); - late final _peripheral_spi_set_mode = _peripheral_spi_set_modePtr - .asFunction(); - - /// @platform - /// @brief Sets the SPI bit order. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// @remarks ARTIK530 and Raspberry Pi 3 do not support LSB first bit order. - /// - /// @param[in] spi The SPI slave device handle - /// @param[in] bit_order The transfer bit order - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_spi_bit_order_e - int peripheral_spi_set_bit_order( - peripheral_spi_h spi, - int bit_order, - ) { - return _peripheral_spi_set_bit_order( - spi, - bit_order, - ); - } - - late final _peripheral_spi_set_bit_orderPtr = _lookup< - ffi.NativeFunction>( - 'peripheral_spi_set_bit_order'); - late final _peripheral_spi_set_bit_order = _peripheral_spi_set_bit_orderPtr - .asFunction(); - - /// @platform - /// @brief Sets the number of bits per word. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] spi The SPI slave device handle - /// @param[in] bits The number of bits per word (in bits) - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - int peripheral_spi_set_bits_per_word( - peripheral_spi_h spi, - int bits, - ) { - return _peripheral_spi_set_bits_per_word( - spi, - bits, - ); - } - - late final _peripheral_spi_set_bits_per_wordPtr = _lookup< - ffi.NativeFunction>( - 'peripheral_spi_set_bits_per_word'); - late final _peripheral_spi_set_bits_per_word = - _peripheral_spi_set_bits_per_wordPtr - .asFunction(); - - /// @platform - /// @brief Sets the frequency of the SPI bus. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// @remarks The frequencies supported are board dependent. - /// - /// @param[in] spi The SPI slave device handle - /// @param[in] freq_hz Frequency to set (in Hz) - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - int peripheral_spi_set_frequency( - peripheral_spi_h spi, - int freq_hz, - ) { - return _peripheral_spi_set_frequency( - spi, - freq_hz, - ); - } - - late final _peripheral_spi_set_frequencyPtr = _lookup< - ffi.NativeFunction>( - 'peripheral_spi_set_frequency'); - late final _peripheral_spi_set_frequency = _peripheral_spi_set_frequencyPtr - .asFunction(); - - /// @platform - /// @brief Reads the bytes data from the SPI slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] spi The SPI slave device handle - /// @param[out] data The data buffer to read - /// @param[in] length The size of data buffer (in bytes) - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_spi_write() - int peripheral_spi_read( - peripheral_spi_h spi, - ffi.Pointer data, - int length, - ) { - return _peripheral_spi_read( - spi, - data, - length, - ); - } - - late final _peripheral_spi_readPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_spi_h, ffi.Pointer, - ffi.Uint32)>>('peripheral_spi_read'); - late final _peripheral_spi_read = _peripheral_spi_readPtr.asFunction< - int Function(peripheral_spi_h, ffi.Pointer, int)>(); - - /// @platform - /// @brief Writes the bytes data to the SPI slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] spi The SPI slave device handle - /// @param[in] data The data buffer to write - /// @param[in] length The size of data buffer (in bytes) - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_spi_read() - int peripheral_spi_write( - peripheral_spi_h spi, - ffi.Pointer data, - int length, - ) { - return _peripheral_spi_write( - spi, - data, - length, - ); - } - - late final _peripheral_spi_writePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_spi_h, ffi.Pointer, - ffi.Uint32)>>('peripheral_spi_write'); - late final _peripheral_spi_write = _peripheral_spi_writePtr.asFunction< - int Function(peripheral_spi_h, ffi.Pointer, int)>(); - - /// @platform - /// @brief Exchanges the bytes data to the SPI slave device. - /// @since_tizen 4.0 - /// @privlevel platform - /// @privilege http://tizen.org/privilege/peripheralio - /// - /// @param[in] spi The SPI slave device handle - /// @param[in] txdata The data buffer to write - /// @param[out] rxdata The data buffer to read - /// @param[in] length The size of txdata and rxdata buffer (in bytes) - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #PERIPHERAL_ERROR_NONE Successful - /// @retval #PERIPHERAL_ERROR_IO_ERROR I/O operation failed - /// @retval #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed - /// @retval #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported - /// @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error - /// - /// @see peripheral_spi_read() - /// @see peripheral_spi_write() - int peripheral_spi_transfer( - peripheral_spi_h spi, - ffi.Pointer txdata, - ffi.Pointer rxdata, - int length, - ) { - return _peripheral_spi_transfer( - spi, - txdata, - rxdata, - length, - ); - } - - late final _peripheral_spi_transferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(peripheral_spi_h, ffi.Pointer, - ffi.Pointer, ffi.Uint32)>>('peripheral_spi_transfer'); - late final _peripheral_spi_transfer = _peripheral_spi_transferPtr.asFunction< - int Function(peripheral_spi_h, ffi.Pointer, - ffi.Pointer, int)>(); - - /// @brief Gets the integer value of the runtime information. - /// @details This function gets current state of the given key which represents specific runtime information. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[in] key The runtime information status key from which data should be read - /// @param[out] value The current value of the given key - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An input/output error occurred when read value from system - /// @retval #RUNTIME_INFO_ERROR_PERMISSION_DENIED No permission to use the api - /// @retval #RUNTIME_INFO_ERROR_NOT_SUPPORTED Not supported parameter - int runtime_info_get_value_int( - int key, - ffi.Pointer value, - ) { - return _runtime_info_get_value_int( - key, - value, - ); - } - - late final _runtime_info_get_value_intPtr = _lookup< - ffi - .NativeFunction)>>( - 'runtime_info_get_value_int'); - late final _runtime_info_get_value_int = _runtime_info_get_value_intPtr - .asFunction)>(); - - /// @brief Gets the boolean value from the runtime information. - /// @details This function gets current state of the given key which represents specific runtime information. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[in] key The runtime information key from which data should be read - /// @param[out] value The current value of the given key - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An input/output error occurred when read value from system - /// @retval #RUNTIME_INFO_ERROR_PERMISSION_DENIED No permission to use the api - /// @retval #RUNTIME_INFO_ERROR_NOT_SUPPORTED Not supported parameter - int runtime_info_get_value_bool( - int key, - ffi.Pointer value, - ) { - return _runtime_info_get_value_bool( - key, - value, - ); - } - - late final _runtime_info_get_value_boolPtr = _lookup< - ffi - .NativeFunction)>>( - 'runtime_info_get_value_bool'); - late final _runtime_info_get_value_bool = _runtime_info_get_value_boolPtr - .asFunction)>(); - - /// @brief Gets the double value from the runtime information. - /// @details This function gets current state of the given key which represents specific runtime information. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[in] key The runtime information key from which data should be read - /// @param[out] value The current value of the given key - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An input/output error occurred when read value from system - /// @retval #RUNTIME_INFO_ERROR_PERMISSION_DENIED No permission to use the api - /// @retval #RUNTIME_INFO_ERROR_NOT_SUPPORTED Not supported parameter - int runtime_info_get_value_double( - int key, - ffi.Pointer value, - ) { - return _runtime_info_get_value_double( - key, - value, - ); - } - - late final _runtime_info_get_value_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, - ffi.Pointer)>>('runtime_info_get_value_double'); - late final _runtime_info_get_value_double = _runtime_info_get_value_doublePtr - .asFunction)>(); - - /// @brief Gets the string value for specified runtime information. - /// @details This function gets current state of the given key which represents specific runtime information. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @remarks You must release @a value using free(). - /// - /// @param[in] key The runtime information key from which data should be read - /// @param[out] value The current value of the given key - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An input/output error occurred when read value from system - /// @retval #RUNTIME_INFO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #RUNTIME_INFO_ERROR_PERMISSION_DENIED No permission to use the api - /// @retval #RUNTIME_INFO_ERROR_NOT_SUPPORTED Not supported parameter - int runtime_info_get_value_string( - int key, - ffi.Pointer> value, - ) { - return _runtime_info_get_value_string( - key, - value, - ); - } - - late final _runtime_info_get_value_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer>)>>( - 'runtime_info_get_value_string'); - late final _runtime_info_get_value_string = _runtime_info_get_value_stringPtr - .asFunction>)>(); - - /// @brief Registers a change event callback for given runtime information key. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[in] key The runtime information type - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_PERMISSION_DENIED No permission to use the api - /// @retval #RUNTIME_INFO_ERROR_NOT_SUPPORTED Not supported parameter - /// - /// @post runtime_info_changed_cb() will be invoked. - /// @see runtime_info_unset_changed_cb() - /// @see runtime_info_changed_cb() - int runtime_info_set_changed_cb( - int key, - runtime_info_changed_cb callback, - ffi.Pointer user_data, - ) { - return _runtime_info_set_changed_cb( - key, - callback, - user_data, - ); - } - - late final _runtime_info_set_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, runtime_info_changed_cb, - ffi.Pointer)>>('runtime_info_set_changed_cb'); - late final _runtime_info_set_changed_cb = - _runtime_info_set_changed_cbPtr.asFunction< - int Function(int, runtime_info_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif - /// - /// @param[in] key The runtime information type - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see runtime_info_set_changed_cb() - int runtime_info_unset_changed_cb( - int key, - ) { - return _runtime_info_unset_changed_cb( - key, - ); - } - - late final _runtime_info_unset_changed_cbPtr = - _lookup>( - 'runtime_info_unset_changed_cb'); - late final _runtime_info_unset_changed_cb = - _runtime_info_unset_changed_cbPtr.asFunction(); - - /// @brief Gets system memory information. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// - /// @param[out] info The system memory information structure - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An Input/Output error occurred while reading from system - /// - /// @see runtime_info_get_process_memory_info() - int runtime_info_get_system_memory_info( - ffi.Pointer info, - ) { - return _runtime_info_get_system_memory_info( - info, - ); - } - - late final _runtime_info_get_system_memory_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'runtime_info_get_system_memory_info'); - late final _runtime_info_get_system_memory_info = - _runtime_info_get_system_memory_infoPtr - .asFunction)>(); - - /// @brief Gets memory information per process. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/systemmonitor - /// @remarks You must release @a s value using free(). \n - /// The size of @a s is the same with @a size. - /// - /// @param[in] pid The process unique id array - /// @param[in] size The size of pid array - /// @param[out] info The memory information structure array of the processes - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_OUT_OF_MEMORY Not able to allocate memory (for output param/other operations) - /// @retval #RUNTIME_INFO_ERROR_REMOTE_IO Call to resource daemon failed (dbus errors/resource daemon errors) - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An I/O error during dbus message operations - /// @retval #RUNTIME_INFO_ERROR_PERMISSION_DENIED Process not authorized to request process usage info - /// - /// @see runtime_info_get_system_memory_info() - int runtime_info_get_process_memory_info( - ffi.Pointer pid, - int size, - ffi.Pointer> info, - ) { - return _runtime_info_get_process_memory_info( - pid, - size, - info, - ); - } - - late final _runtime_info_get_process_memory_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, - ffi.Pointer>)>>( - 'runtime_info_get_process_memory_info'); - late final _runtime_info_get_process_memory_info = - _runtime_info_get_process_memory_infoPtr.asFunction< - int Function(ffi.Pointer, int, - ffi.Pointer>)>(); - - /// @brief Gets CPU information. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// - /// @param[out] usage The CPU usage structure - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An input/output error occurred while reading from system - /// - /// @see runtime_info_get_process_cpu_usage() - int runtime_info_get_cpu_usage( - ffi.Pointer usage, - ) { - return _runtime_info_get_cpu_usage( - usage, - ); - } - - late final _runtime_info_get_cpu_usagePtr = _lookup< - ffi - .NativeFunction)>>( - 'runtime_info_get_cpu_usage'); - late final _runtime_info_get_cpu_usage = _runtime_info_get_cpu_usagePtr - .asFunction)>(); - - /// @brief Gets CPU usage per process. - /// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/systemmonitor - /// @remarks You must release @a s value using free(). \n - /// The size of @a s is the same with @a size. - /// - /// @param[in] pid The process unique id array - /// @param[in] size The size of pid array - /// @param[out] usage The CPU usage structure array of the processes - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_OUT_OF_MEMORY Not able to allocate memory (for output param/other operations) - /// @retval #RUNTIME_INFO_ERROR_REMOTE_IO Call to resource daemon failed (dbus errors/resource daemon errors) - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An I/O error occurred (during dbus message operations/other IO operations) - /// @retval #RUNTIME_INFO_ERROR_PERMISSION_DENIED Process not authorized to request process usage info - /// - /// @see runtime_info_get_cpu_usage() - int runtime_info_get_process_cpu_usage( - ffi.Pointer pid, - int size, - ffi.Pointer> usage, - ) { - return _runtime_info_get_process_cpu_usage( - pid, - size, - usage, - ); - } - - late final _runtime_info_get_process_cpu_usagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, - ffi.Pointer>)>>( - 'runtime_info_get_process_cpu_usage'); - late final _runtime_info_get_process_cpu_usage = - _runtime_info_get_process_cpu_usagePtr.asFunction< - int Function(ffi.Pointer, int, - ffi.Pointer>)>(); - - /// @brief Gets the number of processors. - /// @since_tizen 3.0 - /// - /// @param[out] num_core The number of whole processors - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An I/O error occurred (during file open operation) - int runtime_info_get_processor_count( - ffi.Pointer num_core, - ) { - return _runtime_info_get_processor_count( - num_core, - ); - } - - late final _runtime_info_get_processor_countPtr = - _lookup)>>( - 'runtime_info_get_processor_count'); - late final _runtime_info_get_processor_count = - _runtime_info_get_processor_countPtr - .asFunction)>(); - - /// @brief Gets the current frequency of processor. - /// @since_tizen 3.0 - /// - /// @param[in] core_idx The index (from 0) of CPU core that you want to know the frequency - /// @param[out] cpu_freq The current frequency(MHz) of processor - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An I/O error occurred (during file open operation) - /// @retval #RUNTIME_INFO_ERROR_NO_DATA No data available (Since 3.0) - int runtime_info_get_processor_current_frequency( - int core_idx, - ffi.Pointer cpu_freq, - ) { - return _runtime_info_get_processor_current_frequency( - core_idx, - cpu_freq, - ); - } - - late final _runtime_info_get_processor_current_frequencyPtr = _lookup< - ffi.NativeFunction)>>( - 'runtime_info_get_processor_current_frequency'); - late final _runtime_info_get_processor_current_frequency = - _runtime_info_get_processor_current_frequencyPtr - .asFunction)>(); - - /// @brief Gets the max frequency of processor. - /// @since_tizen 3.0 - /// - /// @param[in] core_idx The index (from 0) of CPU core that you want to know the frequency - /// @param[out] cpu_freq The max frequency(MHz) of processor - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An I/O error occurred (during file open operation) - /// @retval #RUNTIME_INFO_ERROR_NO_DATA No data available (Since 3.0) - int runtime_info_get_processor_max_frequency( - int core_idx, - ffi.Pointer cpu_freq, - ) { - return _runtime_info_get_processor_max_frequency( - core_idx, - cpu_freq, - ); - } - - late final _runtime_info_get_processor_max_frequencyPtr = _lookup< - ffi.NativeFunction)>>( - 'runtime_info_get_processor_max_frequency'); - late final _runtime_info_get_processor_max_frequency = - _runtime_info_get_processor_max_frequencyPtr - .asFunction)>(); - - /// @brief Gets the physical memory size. - /// @since_tizen 4.0 - /// - /// @param[out] size Physical memory size (KiB) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An I/O error occurred (during file open operation) - int runtime_info_get_physical_memory_size( - ffi.Pointer size, - ) { - return _runtime_info_get_physical_memory_size( - size, - ); - } - - late final _runtime_info_get_physical_memory_sizePtr = - _lookup)>>( - 'runtime_info_get_physical_memory_size'); - late final _runtime_info_get_physical_memory_size = - _runtime_info_get_physical_memory_sizePtr - .asFunction)>(); - - /// @brief Frees an app usage handle. - /// @since_tizen 4.0 - /// - /// @param[in] handle App usage handle to free - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - int runtime_info_app_usage_destroy( - app_usage_h handle, - ) { - return _runtime_info_app_usage_destroy( - handle, - ); - } - - late final _runtime_info_app_usage_destroyPtr = - _lookup>( - 'runtime_info_app_usage_destroy'); - late final _runtime_info_app_usage_destroy = - _runtime_info_app_usage_destroyPtr - .asFunction(); - - /// @brief Gets the app count from an app usage handle. - /// @since_tizen 4.0 - /// - /// @param[in] handle The app usage handle - /// @param[out] count The number of apps on the app list - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see runtime_info_get_all_apps_memory_usage() - /// @see runtime_info_get_all_apps_cpu_rate() - int runtime_info_app_usage_get_count( - app_usage_h handle, - ffi.Pointer count, - ) { - return _runtime_info_app_usage_get_count( - handle, - count, - ); - } - - late final _runtime_info_app_usage_get_countPtr = _lookup< - ffi - .NativeFunction)>>( - 'runtime_info_app_usage_get_count'); - late final _runtime_info_app_usage_get_count = - _runtime_info_app_usage_get_countPtr - .asFunction)>(); - - /// @brief Gets the app ID from an app usage handle. - /// @since_tizen 4.0 - /// - /// @remarks You must release @a appid using free(). - /// - /// @param[in] handle The app usage handle - /// @param[in] index The index in the app list; should be between 0 and @a count - 1 (inclusive), \n - /// where @a count is provided by runtime_info_app_usage_get_count() - /// @param[out] appid The app ID - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see runtime_info_get_all_apps_memory_usage() - /// @see runtime_info_get_all_apps_cpu_rate() - int runtime_info_app_usage_get_appid( - app_usage_h handle, - int index, - ffi.Pointer> appid, - ) { - return _runtime_info_app_usage_get_appid( - handle, - index, - appid, - ); - } - - late final _runtime_info_app_usage_get_appidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - app_usage_h, ffi.Int, ffi.Pointer>)>>( - 'runtime_info_app_usage_get_appid'); - late final _runtime_info_app_usage_get_appid = - _runtime_info_app_usage_get_appidPtr.asFunction< - int Function(app_usage_h, int, ffi.Pointer>)>(); - - /// @brief Gets resource usage from an app usage handle. - /// @since_tizen 4.0 - /// - /// @remarks The meaning of @a usage depends on which function was used to create @a handle. - /// - /// @param[in] handle The app usage handle - /// @param[in] index The index in the app list; should be between 0 and @a count - 1 (inclusive), \n - /// where @a count is provided by runtime_info_app_usage_get_count() - /// @param[out] usage Resource usage - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see runtime_info_get_all_apps_memory_usage() - /// @see runtime_info_get_all_apps_cpu_rate() - int runtime_info_app_usage_get_usage( - app_usage_h handle, - int index, - ffi.Pointer usage, - ) { - return _runtime_info_app_usage_get_usage( - handle, - index, - usage, - ); - } - - late final _runtime_info_app_usage_get_usagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - app_usage_h, ffi.Int, ffi.Pointer)>>( - 'runtime_info_app_usage_get_usage'); - late final _runtime_info_app_usage_get_usage = - _runtime_info_app_usage_get_usagePtr.asFunction< - int Function(app_usage_h, int, ffi.Pointer)>(); - - /// @brief Gets memory usage of all apps. - /// @since_tizen 4.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/systemmonitor - /// @remarks You must release @a usage using runtime_info_app_usage_destroy(). - /// - /// @param[out] usage An array of each app's memory usage (KB) - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_OUT_OF_MEMORY Not able to allocate memory (for output param/other operations) - /// @retval #RUNTIME_INFO_ERROR_REMOTE_IO Call to resource daemon failed (dbus errors/resource daemon errors) - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An I/O error during dbus message operations - /// @retval #RUNTIME_INFO_ERROR_PERMISSION_DENIED Process not authorized to request app usage info - /// @retval #RUNTIME_INFO_ERROR_NO_DATA No app running - /// - /// @code - /// #include - /// - /// void print_memory_usage(void) - /// { - /// int i; - /// int count; - /// app_usage_h mem_usage_handle; - /// char *appid; - /// unsigned int usage; - /// - /// runtime_info_get_all_apps_memory_usage(&mem_usage_handle); - /// runtime_info_app_usage_get_count(mem_usage_handle, &count); - /// - /// for (i = 0; i < count; i++) { - /// runtime_info_app_usage_get_appid(mem_usage_handle, i, &appid); - /// runtime_info_app_usage_get_usage(mem_usage_handle, i, &usage); - /// printf("appid = %s, usage = %u KB\n", appid, usage); - /// free(appid); - /// } - /// - /// runtime_info_app_usage_destroy(mem_usage_handle); - /// - /// } - /// @endcode - int runtime_info_get_all_apps_memory_usage( - ffi.Pointer usage, - ) { - return _runtime_info_get_all_apps_memory_usage( - usage, - ); - } - - late final _runtime_info_get_all_apps_memory_usagePtr = - _lookup)>>( - 'runtime_info_get_all_apps_memory_usage'); - late final _runtime_info_get_all_apps_memory_usage = - _runtime_info_get_all_apps_memory_usagePtr - .asFunction)>(); - - /// @brief Gets CPU rate of all apps. - /// @since_tizen 4.0 - /// - /// @privlevel public - /// @privilege %http://tizen.org/privilege/systemmonitor - /// @remarks You must release @a rate using runtime_info_app_usage_destroy(). - /// - /// @param[out] rate An array of each app's CPU usage rate (%), the values are rounded down. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #RUNTIME_INFO_ERROR_NONE Successful - /// @retval #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #RUNTIME_INFO_ERROR_OUT_OF_MEMORY Not able to allocate memory (for output param/other operations) - /// @retval #RUNTIME_INFO_ERROR_REMOTE_IO Call to resource daemon failed (dbus errors/resource daemon errors) - /// @retval #RUNTIME_INFO_ERROR_IO_ERROR An I/O error during dbus message operations - /// @retval #RUNTIME_INFO_ERROR_PERMISSION_DENIED Process not authorized to request app usage info - /// @retval #RUNTIME_INFO_ERROR_NO_DATA No app running - /// - /// @code - /// #include - /// - /// void print_cpu_usage(void) - /// { - /// int i; - /// int count; - /// app_usage_h cpu_rate_handle; - /// char *appid; - /// unsigned int rate; - /// - /// runtime_info_get_all_apps_cpu_rate(&cpu_rate_handle); - /// runtime_info_app_usage_get_count(cpu_rate_handle, &count); - /// - /// for (i = 0; i < count; i++) { - /// runtime_info_app_usage_get_appid(cpu_rate_handle, i, &appid); - /// runtime_info_app_usage_get_usage(cpu_rate_handle, i, &rate); - /// printf("appid = %s, rate = %u %%\n", appid, rate); - /// free(appid); - /// } - /// - /// runtime_info_app_usage_destroy(cpu_rate_handle); - /// - /// } - /// @endcode - int runtime_info_get_all_apps_cpu_rate( - ffi.Pointer rate, - ) { - return _runtime_info_get_all_apps_cpu_rate( - rate, - ); - } - - late final _runtime_info_get_all_apps_cpu_ratePtr = - _lookup)>>( - 'runtime_info_get_all_apps_cpu_rate'); - late final _runtime_info_get_all_apps_cpu_rate = - _runtime_info_get_all_apps_cpu_ratePtr - .asFunction)>(); - - /// @brief Checks whether a given sensor type is supported in the current device. - /// @details If the given sensor type is not supported, sensor_get_default_sensor() will return an error. - /// It is thus recommended to check the availability of the sensor before actually acquiring #sensor_h. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] type A sensor type to check - /// @param[out] supported If supported, @c true; Otherwise @c false - /// - /// @return #SENSOR_ERROR_NONE on success; Otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see sensor_is_supported_by_uri() - int sensor_is_supported( - int type, - ffi.Pointer supported, - ) { - return _sensor_is_supported( - type, - supported, - ); - } - - late final _sensor_is_supportedPtr = _lookup< - ffi - .NativeFunction)>>( - 'sensor_is_supported'); - late final _sensor_is_supported = _sensor_is_supportedPtr - .asFunction)>(); - - /// @brief Checks whether a sensor corresponding to a given URI is supported in the current device. - /// @details To correctly check the availability of a sensor, a valid URI should be provided. - /// The valid form of URIs is explained in \ref CAPI_SYSTEM_SENSOR_LISTENER_MODULE_URI.\n - /// If a URI with the sensor's name is given, for example, %http://tizen.org/sensor/general/light/front, - /// the availability of the @"front@" light sensor is checked. - /// Otherwise, if a URI without the name, %http://tizen.org/sensor/general/light, is given, - /// this function checks the availability of any light sensor in the device.\n - /// It is recommended to check the availability of the sensors corresponding to the URI - /// before actually acquiring #sensor_h. - /// @since_tizen 4.0 - /// - /// @param[in] uri A sensor or a sensor type URI to check - /// @param[out] supported If supported, @c true, otherwise @c false - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see sensor_is_supported() - int sensor_is_supported_by_uri( - ffi.Pointer uri, - ffi.Pointer supported, - ) { - return _sensor_is_supported_by_uri( - uri, - supported, - ); - } - - late final _sensor_is_supported_by_uriPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('sensor_is_supported_by_uri'); - late final _sensor_is_supported_by_uri = _sensor_is_supported_by_uriPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Checks whether a given sensor is a wake-up sensor or not. - /// @details If a sensor is a wake-up sensor, the sensor is able to wake-up the system - /// to report its sensor data even if the system is in sleep mode. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @param[in] sensor A sensor handle to check - /// @param[out] wakeup If the sensor is a wake-up sensor, @c true; - /// Otherwise @c false - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre The handle @c sensor needs to be initialized using - /// sensor_get_default_sensor() or sensor_get_sensor_list() in advance. - int sensor_is_wake_up( - sensor_h sensor, - ffi.Pointer wakeup, - ) { - return _sensor_is_wake_up( - sensor, - wakeup, - ); - } - - late final _sensor_is_wake_upPtr = _lookup< - ffi - .NativeFunction)>>( - 'sensor_is_wake_up'); - late final _sensor_is_wake_up = _sensor_is_wake_upPtr - .asFunction)>(); - - /// @brief Gets the handle for the default sensor of a given type. - /// @details This function returns the handle for the sensor of a given type. - /// If the device has more than one sensor of the given type, - /// this function returns the default sensor of the given type, - /// which is designated by the device. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks Some sensor types are privileged. An application should have the privilege - /// http://tizen.org/privilege/healthinfo to get handles for the following sensors: - /// #SENSOR_HRM, #SENSOR_HRM_LED_GREEN, #SENSOR_HRM_LED_IR, #SENSOR_HRM_LED_RED, - /// #SENSOR_HUMAN_PEDOMETER, #SENSOR_HUMAN_SLEEP_MONITOR, #SENSOR_HUMAN_SLEEP_DETECTOR, - /// and #SENSOR_HUMAN_STRESS_MONITOR. - /// - /// @param[in] type A sensor type to get the handle of its default sensor - /// @param[out] sensor The sensor handle of the default sensor - /// - /// @return #SENSOR_ERROR_NONE on success; Otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_NOT_SUPPORTED The sensor type is not supported in the current device - /// @retval #SENSOR_ERROR_PERMISSION_DENIED Permission denied - /// - /// @see sensor_get_default_sensor_by_uri() - /// @see sensor_get_sensor_list() - int sensor_get_default_sensor( - int type, - ffi.Pointer sensor, - ) { - return _sensor_get_default_sensor( - type, - sensor, - ); - } - - late final _sensor_get_default_sensorPtr = _lookup< - ffi - .NativeFunction)>>( - 'sensor_get_default_sensor'); - late final _sensor_get_default_sensor = _sensor_get_default_sensorPtr - .asFunction)>(); - - /// @brief Gets the handle for the default sensor of a given sensor URI. - /// @details This function returns the handle for the sensor of a given URI. - /// If the device has more than one sensor of the given URI, - /// this function returns the default sensor of the URI, which is designated by the device.\n - /// See \ref CAPI_SYSTEM_SENSOR_LISTENER_MODULE_URI for more details about the URI format. - /// @since_tizen 4.0 - /// - /// @remarks Some sensor types are privileged. An application should have the privilege - /// http://tizen.org/privilege/healthinfo to get handles for the sensor URIs of @"healthinfo@" category. - /// See \ref CAPI_SYSTEM_SENSOR_LISTENER_MODULE_URI to find the @"healthinfo@" category sensor URIs. - /// - /// @param[in] uri A sensor or a sensor type URI to get the handle of its default sensor - /// @param[out] sensor The default sensor handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_NOT_SUPPORTED The URI is not supported in the current device - /// @retval #SENSOR_ERROR_PERMISSION_DENIED Permission denied - /// - /// @see sensor_get_default_sensor() - /// @see sensor_get_sensor_list_by_uri() - int sensor_get_default_sensor_by_uri( - ffi.Pointer uri, - ffi.Pointer sensor, - ) { - return _sensor_get_default_sensor_by_uri( - uri, - sensor, - ); - } - - late final _sensor_get_default_sensor_by_uriPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('sensor_get_default_sensor_by_uri'); - late final _sensor_get_default_sensor_by_uri = - _sensor_get_default_sensor_by_uriPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the handle list of the sensors of a given type. - /// @details A device may have more than one sensors of the given type. - /// In such case, this function can be used to get the handles of all sensors of the type.@n - /// The first element of the @a list denotes the default sensor, - /// which can be retrieved by sensor_get_default_sensor(). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks Some sensor types are privileged. An application should have the privilege - /// http://tizen.org/privilege/healthinfo to get handles for the following sensors: - /// #SENSOR_HRM, #SENSOR_HRM_LED_GREEN, #SENSOR_HRM_LED_IR, #SENSOR_HRM_LED_RED, - /// #SENSOR_HUMAN_PEDOMETER, #SENSOR_HUMAN_SLEEP_MONITOR, #SENSOR_HUMAN_SLEEP_DETECTOR, - /// and #SENSOR_HUMAN_STRESS_MONITOR.@n - /// Instead of specifying a sensor type, by using #SENSOR_ALL, - /// applications can get the list of handles for all available sensors.@n - /// The @a list must be released using free(), if not being used anymore.@n - /// - /// @param[in] type A sensor type to get the list of sensor handles - /// @param[out] list An array of the sensor handles - /// @param[out] sensor_count The number of handles contained in @a list - /// - /// @return #SENSOR_ERROR_NONE on success; Otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_NOT_SUPPORTED The sensor type is not supported in the current device - /// @retval #SENSOR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SENSOR_ERROR_OUT_OF_MEMORY Out of memory - int sensor_get_sensor_list( - int type, - ffi.Pointer> list, - ffi.Pointer sensor_count, - ) { - return _sensor_get_sensor_list( - type, - list, - sensor_count, - ); - } - - late final _sensor_get_sensor_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer>, - ffi.Pointer)>>('sensor_get_sensor_list'); - late final _sensor_get_sensor_list = _sensor_get_sensor_listPtr.asFunction< - int Function( - int, ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Gets the handle list of the sensors of a given URI. - /// @details A device may have more than one sensor of the given URI. - /// In such case, this function can be used to get the handles of all sensors of the given URI.\n - /// See \ref CAPI_SYSTEM_SENSOR_LISTENER_MODULE_URI for more details about the URI format. - /// @since_tizen 4.0 - /// - /// @remarks Some sensors require one or more privileges. An application should have the corresponding privilege - /// to get handles for such sensors. - /// See sensor_get_default_sensor_by_uri() for more details.@n - /// The @a list must be released using free(), if not being used anymore. - /// - /// @param[in] uri A sensor or a sensor type URI to get the list of sensor handles - /// @param[out] list An array of the sensor handles - /// @param[out] sensor_count The number of handles contained in @a list - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_NOT_SUPPORTED The URI is not supported in the current device - /// @retval #SENSOR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SENSOR_ERROR_OUT_OF_MEMORY Out of memory - int sensor_get_sensor_list_by_uri( - ffi.Pointer uri, - ffi.Pointer> list, - ffi.Pointer sensor_count, - ) { - return _sensor_get_sensor_list_by_uri( - uri, - list, - sensor_count, - ); - } - - late final _sensor_get_sensor_list_by_uriPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('sensor_get_sensor_list_by_uri'); - late final _sensor_get_sensor_list_by_uri = - _sensor_get_sensor_list_by_uriPtr.asFunction< - int Function(ffi.Pointer, - ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Gets the URI of a sensor. - /// @since_tizen 4.0 - /// - /// @remarks The @a uri must be released using free(), if not being used anymore. - /// - /// @param[in] sensor A sensor handle - /// @param[out] uri The URI of the sensor - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - int sensor_get_uri( - sensor_h sensor, - ffi.Pointer> uri, - ) { - return _sensor_get_uri( - sensor, - uri, - ); - } - - late final _sensor_get_uriPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - sensor_h, ffi.Pointer>)>>('sensor_get_uri'); - late final _sensor_get_uri = _sensor_get_uriPtr - .asFunction>)>(); - - /// @brief Gets the name of a sensor. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a name must be released using free(), if not being used anymore. - /// - /// @param[in] sensor A sensor handle - /// @param[out] name The name of the sensor - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - int sensor_get_name( - sensor_h sensor, - ffi.Pointer> name, - ) { - return _sensor_get_name( - sensor, - name, - ); - } - - late final _sensor_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_h, - ffi.Pointer>)>>('sensor_get_name'); - late final _sensor_get_name = _sensor_get_namePtr - .asFunction>)>(); - - /// @brief Gets the vendor of a sensor. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a vendor must be released using free(), if not being used anymore. - /// - /// @param[in] sensor A sensor handle - /// @param[out] vendor The vendor of the sensor - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - int sensor_get_vendor( - sensor_h sensor, - ffi.Pointer> vendor, - ) { - return _sensor_get_vendor( - sensor, - vendor, - ); - } - - late final _sensor_get_vendorPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_h, - ffi.Pointer>)>>('sensor_get_vendor'); - late final _sensor_get_vendor = _sensor_get_vendorPtr - .asFunction>)>(); - - /// @brief Gets the type of a sensor, if it belongs to the known types defined in #sensor_type_e. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] sensor A sensor handle - /// @param[out] type The type of the sensor - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_NO_DATA No known sensor type for the given sensor - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_get_type( - sensor_h sensor, - ffi.Pointer type, - ) { - return _sensor_get_type( - sensor, - type, - ); - } - - late final _sensor_get_typePtr = _lookup< - ffi - .NativeFunction)>>( - 'sensor_get_type'); - late final _sensor_get_type = _sensor_get_typePtr - .asFunction)>(); - - /// @brief Gets the lower bound of the sensor reading of a sensor. - /// @details This function returns the lower bound of the range of possible sensor values, - /// which are generated by the corresponding sensor denoted by a sensor handle.@n - /// If all sensor values are in the same unit, e.g., \f$\mbox{m/s}^2\f$ or degrees, - /// the lower bound of all sensor values is returned. - /// Otherwise, the lower bound of the representative sensor value, e.g., - /// the step count of #SENSOR_HUMAN_PEDOMETER, is returned. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] sensor A sensor handle - /// @param[out] min_range The lower bound - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_get_max_range() - int sensor_get_min_range( - sensor_h sensor, - ffi.Pointer min_range, - ) { - return _sensor_get_min_range( - sensor, - min_range, - ); - } - - late final _sensor_get_min_rangePtr = _lookup< - ffi - .NativeFunction)>>( - 'sensor_get_min_range'); - late final _sensor_get_min_range = _sensor_get_min_rangePtr - .asFunction)>(); - - /// @brief Gets the upper bound of the sensor readings of a sensor. - /// @details This function returns the upper bound of the range of possible sensor values, - /// which are generated by the corresponding sensor denoted by a sensor handle.@n - /// If all sensor values are in the same unit, e.g., \f$\mbox{m/s}^2\f$ or degrees, - /// the upper bound of all sensor values is returned. - /// Otherwise, the upper bound of the representative sensor value, e.g., - /// the step count of #SENSOR_HUMAN_PEDOMETER, is returned. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] sensor A sensor handle - /// @param[out] max_range The upper bound - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_get_min_range() - int sensor_get_max_range( - sensor_h sensor, - ffi.Pointer max_range, - ) { - return _sensor_get_max_range( - sensor, - max_range, - ); - } - - late final _sensor_get_max_rangePtr = _lookup< - ffi - .NativeFunction)>>( - 'sensor_get_max_range'); - late final _sensor_get_max_range = _sensor_get_max_rangePtr - .asFunction)>(); - - /// @brief Gets the resolution of the sensor readings of a sensor. - /// @details This function returns the resolution of the sensor readings. - /// The resolution denotes the smallest difference between sensor readings, - /// each of which is in the range that can be verified by - /// sensor_get_min_range() and sensor_get_max_range(). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] sensor A sensor handle - /// @param[out] resolution The resolution - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_get_resolution( - sensor_h sensor, - ffi.Pointer resolution, - ) { - return _sensor_get_resolution( - sensor, - resolution, - ); - } - - late final _sensor_get_resolutionPtr = _lookup< - ffi - .NativeFunction)>>( - 'sensor_get_resolution'); - late final _sensor_get_resolution = _sensor_get_resolutionPtr - .asFunction)>(); - - /// @brief Gets the possible shorted update interval of a sensor. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] sensor A sensor handle - /// @param[out] min_interval The shorted interval in milliseconds - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_get_min_interval( - sensor_h sensor, - ffi.Pointer min_interval, - ) { - return _sensor_get_min_interval( - sensor, - min_interval, - ); - } - - late final _sensor_get_min_intervalPtr = _lookup< - ffi.NativeFunction)>>( - 'sensor_get_min_interval'); - late final _sensor_get_min_interval = _sensor_get_min_intervalPtr - .asFunction)>(); - - /// @brief Gets the size of the hardware FIFO of a sensor. - /// @details This function returns the size of the hardware FIFO that may be used by - /// a specific sensor to support batching. - /// However, regarding the underlying hardware configuration, - /// the returned count may not mean the maximum number of sensor data that can be batched. - /// See sensor_get_max_batch_count() for such purpose, finding out the - /// possible maximum number of batched data. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] sensor A sensor handle - /// @param[out] fifo_count The FIFO count - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_get_fifo_count( - sensor_h sensor, - ffi.Pointer fifo_count, - ) { - return _sensor_get_fifo_count( - sensor, - fifo_count, - ); - } - - late final _sensor_get_fifo_countPtr = _lookup< - ffi.NativeFunction)>>( - 'sensor_get_fifo_count'); - late final _sensor_get_fifo_count = _sensor_get_fifo_countPtr - .asFunction)>(); - - /// @brief Gets the maximum batch count of a sensor. - /// @details This function returns the maximum number of sensor data events - /// that can be possibly delivered when the batched data are flushed. - /// Therefore, this count can be used to check whether the sensor supports - /// batching or not.@n - /// If this returns a positive count, i.e., the sensor supports batching, - /// the count also can be used to guess the possible longest batch latency - /// of the sensor, with respect to the update interval to use. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] sensor A sensor handle - /// @param[out] max_batch_count If the sensor does not support batching, 0; - /// Otherwise a positive integer. - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_listener_set_max_batch_latency() - int sensor_get_max_batch_count( - sensor_h sensor, - ffi.Pointer max_batch_count, - ) { - return _sensor_get_max_batch_count( - sensor, - max_batch_count, - ); - } - - late final _sensor_get_max_batch_countPtr = _lookup< - ffi.NativeFunction)>>( - 'sensor_get_max_batch_count'); - late final _sensor_get_max_batch_count = _sensor_get_max_batch_countPtr - .asFunction)>(); - - /// @brief Adds a callback function to be invoked when a new sensor is added. - /// @since_tizen 4.0 - /// - /// @param[in] callback A callback function to be added - /// @param[in] user_data A user data to be passed to the callback function - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_remove_sensor_added_cb() - int sensor_add_sensor_added_cb( - sensor_added_cb callback, - ffi.Pointer user_data, - ) { - return _sensor_add_sensor_added_cb( - callback, - user_data, - ); - } - - late final _sensor_add_sensor_added_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_added_cb, - ffi.Pointer)>>('sensor_add_sensor_added_cb'); - late final _sensor_add_sensor_added_cb = _sensor_add_sensor_added_cbPtr - .asFunction)>(); - - /// @brief Removes a callback function added using sensor_add_sensor_added_cb(). - /// @since_tizen 4.0 - /// - /// @param[in] callback A callback function to be removed - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_add_sensor_added_cb() - int sensor_remove_sensor_added_cb( - sensor_added_cb callback, - ) { - return _sensor_remove_sensor_added_cb( - callback, - ); - } - - late final _sensor_remove_sensor_added_cbPtr = - _lookup>( - 'sensor_remove_sensor_added_cb'); - late final _sensor_remove_sensor_added_cb = _sensor_remove_sensor_added_cbPtr - .asFunction(); - - /// @brief Adds a callback function to be invoked when a sensor is removed. - /// @since_tizen 4.0 - /// - /// @param[in] callback A callback function to be removed - /// @param[in] user_data A user data to be passed to the callback function - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_remove_sensor_removed_cb() - int sensor_add_sensor_removed_cb( - sensor_removed_cb callback, - ffi.Pointer user_data, - ) { - return _sensor_add_sensor_removed_cb( - callback, - user_data, - ); - } - - late final _sensor_add_sensor_removed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_removed_cb, - ffi.Pointer)>>('sensor_add_sensor_removed_cb'); - late final _sensor_add_sensor_removed_cb = _sensor_add_sensor_removed_cbPtr - .asFunction)>(); - - /// @brief Removes a callback function added using sensor_add_sensor_removed_cb(). - /// @since_tizen 4.0 - /// - /// @param[in] callback A callback function to be removed - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_add_sensor_removed_cb() - int sensor_remove_sensor_removed_cb( - sensor_removed_cb callback, - ) { - return _sensor_remove_sensor_removed_cb( - callback, - ); - } - - late final _sensor_remove_sensor_removed_cbPtr = - _lookup>( - 'sensor_remove_sensor_removed_cb'); - late final _sensor_remove_sensor_removed_cb = - _sensor_remove_sensor_removed_cbPtr - .asFunction(); - - /// @brief Creates a sensor listener. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks The @a listener must be released using sensor_destroy_listener(). - /// - /// @param[in] sensor A sensor handle - /// @param[out] listener A listener handle of @a sensor - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @pre The handle @a sensor needs to be initialized using - /// sensor_get_default_sensor() or sensor_get_sensor_list() in advance. - int sensor_create_listener( - sensor_h sensor, - ffi.Pointer listener, - ) { - return _sensor_create_listener( - sensor, - listener, - ); - } - - late final _sensor_create_listenerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_h, - ffi.Pointer)>>('sensor_create_listener'); - late final _sensor_create_listener = _sensor_create_listenerPtr - .asFunction)>(); - - /// @brief Releases all the resources allocated for a listener. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks If this function is called while the sensor is still running, - /// that is, sensor_listener_start() was called but sensor_listener_stop() was not, - /// then it is implicitly stopped. - /// - /// @param[in] listener A listener handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see sensor_create_listener() - int sensor_destroy_listener( - sensor_listener_h listener, - ) { - return _sensor_destroy_listener( - listener, - ); - } - - late final _sensor_destroy_listenerPtr = - _lookup>( - 'sensor_destroy_listener'); - late final _sensor_destroy_listener = - _sensor_destroy_listenerPtr.asFunction(); - - /// @brief Starts observing the sensor events regarding a given sensor listener. - /// @details If a sensor listener is started, its event callback function starts to be called - /// whenever the corresponding sensor events occur.@n - /// For example, #SENSOR_ACCELEROMETER reports its sensor readings repeatedly, - /// with a specific update interval. - /// Note that, unlike the accelerometer, sensors like #SENSOR_PROXIMITY emit events - /// only if their states change. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] listener A listener handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @pre The @a listener needs to be created in advance, by using sensor_create_listener(). - /// Then the callback function needs to be attached to the @a listener, by using - /// sensor_listener_set_event_cb(). - /// @see sensor_listener_stop() - int sensor_listener_start( - sensor_listener_h listener, - ) { - return _sensor_listener_start( - listener, - ); - } - - late final _sensor_listener_startPtr = - _lookup>( - 'sensor_listener_start'); - late final _sensor_listener_start = - _sensor_listener_startPtr.asFunction(); - - /// @brief Stops observing the sensor events regarding a given sensor listener. - /// @details The listener's event callback function stops being called. - /// But the sensor itself may not be stopped if there are other listeners - /// that are using the same sensor. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] listener A listener handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_listener_start() - int sensor_listener_stop( - sensor_listener_h listener, - ) { - return _sensor_listener_stop( - listener, - ); - } - - late final _sensor_listener_stopPtr = - _lookup>( - 'sensor_listener_stop'); - late final _sensor_listener_stop = - _sensor_listener_stopPtr.asFunction(); - - /// @brief Registers the callback function to be invoked when sensor events are delivered via a sensor listener. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] listener A listener handle - /// @param[in] interval_ms A desired update interval between sensor events in milliseconds.@n - /// If 0, it will be automatically set to the default interval of the corresponding sensor.@n - /// See sensor_listener_set_interval() for more details. - /// @param[in] callback A callback function to attach with the @a listener handle - /// @param[in] data A user data to be passed to the callback function - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_listener_unset_event_cb() - int sensor_listener_set_event_cb( - sensor_listener_h listener, - int interval_ms, - sensor_event_cb callback, - ffi.Pointer data, - ) { - return _sensor_listener_set_event_cb( - listener, - interval_ms, - callback, - data, - ); - } - - late final _sensor_listener_set_event_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_listener_h, ffi.UnsignedInt, sensor_event_cb, - ffi.Pointer)>>('sensor_listener_set_event_cb'); - late final _sensor_listener_set_event_cb = - _sensor_listener_set_event_cbPtr.asFunction< - int Function(sensor_listener_h, int, sensor_event_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the sensor event callback function attached to a given sensor listener. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] listener A listener handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_listener_set_event_cb() - int sensor_listener_unset_event_cb( - sensor_listener_h listener, - ) { - return _sensor_listener_unset_event_cb( - listener, - ); - } - - late final _sensor_listener_unset_event_cbPtr = - _lookup>( - 'sensor_listener_unset_event_cb'); - late final _sensor_listener_unset_event_cb = - _sensor_listener_unset_event_cbPtr - .asFunction(); - - /// @brief Registers the callback function to be invoked when the accuracy of a sensor changes. - /// @details In addition to sensor_event_cb(), sensor_accuracy_changed_cb() also can be attached - /// to sensor listeners. With this accuracy callback function, applications can be notified - /// the changes of the corresponding sensors separately. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] listener A listener handle - /// @param[in] callback A callback function to attach with the @a listener handle - /// @param[in] data A user data to be passed to the callback function - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @pre The @a listener needs to be started to get the change callbacks. - /// @see sensor_listener_unset_accuracy_cb() - int sensor_listener_set_accuracy_cb( - sensor_listener_h listener, - sensor_accuracy_changed_cb callback, - ffi.Pointer data, - ) { - return _sensor_listener_set_accuracy_cb( - listener, - callback, - data, - ); - } - - late final _sensor_listener_set_accuracy_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_listener_h, sensor_accuracy_changed_cb, - ffi.Pointer)>>('sensor_listener_set_accuracy_cb'); - late final _sensor_listener_set_accuracy_cb = - _sensor_listener_set_accuracy_cbPtr.asFunction< - int Function(sensor_listener_h, sensor_accuracy_changed_cb, - ffi.Pointer)>(); - - /// @brief Unregisters the sensor accuracy change callback function attached to a given sensor listener. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] listener A listener handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_listener_set_accuracy_cb() - int sensor_listener_unset_accuracy_cb( - sensor_listener_h listener, - ) { - return _sensor_listener_unset_accuracy_cb( - listener, - ); - } - - late final _sensor_listener_unset_accuracy_cbPtr = - _lookup>( - 'sensor_listener_unset_accuracy_cb'); - late final _sensor_listener_unset_accuracy_cb = - _sensor_listener_unset_accuracy_cbPtr - .asFunction(); - - /// @brief Reads the current sensor data via a given sensor listener. - /// @details This function synchronously reads the sensor reading of the corresponding sensor, if available. - /// Otherwise, if the sensor is not ready to report its values, this function fails and returns - /// #SENSOR_ERROR_OPERATION_FAILED. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remark As a sensor usually works in an event-driven manner, it may not be able to read its data on demand. - /// Then this function tries to return the last known values.@n - /// To be able to read the current values or the last known values, the sensor needs to be - /// enabled in advance. As an application cannot be sure that the sensor is already enabled - /// by other applications, it is recommended to start the sensor explicitly by using sensor_listener_start().@n - /// But note that, even if the sensor is started, on-demand reading can fail always, - /// thus it would be better to use the asynchronous callback approach. - /// - /// @param[in] listener A listener handle - /// @param[out] event The retrieved sensor data - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_listener_read_data( - sensor_listener_h listener, - ffi.Pointer event, - ) { - return _sensor_listener_read_data( - listener, - event, - ); - } - - late final _sensor_listener_read_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_listener_h, - ffi.Pointer)>>('sensor_listener_read_data'); - late final _sensor_listener_read_data = - _sensor_listener_read_dataPtr.asFunction< - int Function(sensor_listener_h, ffi.Pointer)>(); - - /// @brief Changes the update interval of a sensor. - /// @details The specified interval is only a suggested interval between sensor measurements. - /// You will get at least one sensor measurement within the interval you specify, - /// but the actual interval between sensor measurements can be affected by other applications and the system. - /// To reduce the system overhead, it is recommended to set the longest interval that you can, - /// because the system usually chooses the shortest interval among all intervals specified. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks Normally, a sensor's default update interval is 100 ms, - /// and you can use the default interval by setting the interval to 0. - /// However, please note that, the default interval varies with the sensor and the device.@n - /// In addition, a sensor has the lower and the upper bound of its update interval, - /// usually 10 and 1000 ms respectively. - /// These lower and upper bounds also can vary with the sensor and the device, - /// any invalid input values exceeding the bounds will be implicitly adjusted into the valid range. - /// - /// @param[in] listener A listener handle - /// @param[in] interval_ms A desired update interval between sensor events in milliseconds. - /// If 0, it will be automatically set to the default interval of the corresponding sensor. - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_get_min_interval() - int sensor_listener_set_interval( - sensor_listener_h listener, - int interval_ms, - ) { - return _sensor_listener_set_interval( - listener, - interval_ms, - ); - } - - late final _sensor_listener_set_intervalPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_listener_h, - ffi.UnsignedInt)>>('sensor_listener_set_interval'); - late final _sensor_listener_set_interval = _sensor_listener_set_intervalPtr - .asFunction(); - - /// @brief Sets the desired max batch latency of a sensor. - /// @details Sensors that support batching may allow applications to change their maximum batch latencies. - /// For example, if you set the latency as 10,000 ms, the sensor may store its data - /// up to 10,000 ms, before delivering the data through the HAL.@n - /// In cases of non-batching sensors, this function returns #SENSOR_ERROR_NONE, - /// but nothing is affected by the input latency value. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks Even if you set a batch latency, the sensor may not work as you intended, - /// as one sensor can be used by more than one listeners. - /// In addition, some batch sensors may already have fixed batching latency - /// or batching queue size, which cannot be altered by applications. - /// - /// @param[in] listener A listener handle - /// @param[in] max_batch_latency A desired batch latency in milliseconds - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - int sensor_listener_set_max_batch_latency( - sensor_listener_h listener, - int max_batch_latency, - ) { - return _sensor_listener_set_max_batch_latency( - listener, - max_batch_latency, - ); - } - - late final _sensor_listener_set_max_batch_latencyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_listener_h, - ffi.UnsignedInt)>>('sensor_listener_set_max_batch_latency'); - late final _sensor_listener_set_max_batch_latency = - _sensor_listener_set_max_batch_latencyPtr - .asFunction(); - - /// @brief Sets an attribute to control the behavior of a sensor listener. - /// @details Applications can change the behavior of a sensor listener, for example, - /// what is the reference coordinate of the sensor values, - /// and when the system is allowed to turn off the sensor implicitly to reduce the power consumption. - /// See #sensor_attribute_e for more details about the available control parameters. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @param[in] listener A listener handle - /// @param[in] attribute An attribute to change - /// @param[in] value An attribute value - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - int sensor_listener_set_attribute_int( - sensor_listener_h listener, - int attribute, - int value, - ) { - return _sensor_listener_set_attribute_int( - listener, - attribute, - value, - ); - } - - late final _sensor_listener_set_attribute_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_listener_h, ffi.Int32, - ffi.Int)>>('sensor_listener_set_attribute_int'); - late final _sensor_listener_set_attribute_int = - _sensor_listener_set_attribute_intPtr - .asFunction(); - - /// @brief Changes the power-saving behavior of a sensor listener. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remark sensor_listener_set_attribute_int() with #SENSOR_ATTRIBUTE_PAUSE_POLICY replaces this function. - /// - /// @param[in] listener A listener handle - /// @param[in] option A sensor option - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_listener_set_option( - sensor_listener_h listener, - int option, - ) { - return _sensor_listener_set_option( - listener, - option, - ); - } - - late final _sensor_listener_set_optionPtr = _lookup< - ffi.NativeFunction>( - 'sensor_listener_set_option'); - late final _sensor_listener_set_option = _sensor_listener_set_optionPtr - .asFunction(); - - /// @brief Creates a sensor provider. - /// @details This function creates a sensor provider handle with a given URI. - /// The URI should be in the valid form described in \ref CAPI_SYSTEM_SENSOR_LISTENER_MODULE_URI. - /// In addition, it is not allowed to set the vendor in the URI to @"tizen.org@", - /// as it is pre-assigned to the platform-defined sensors.\n - /// @since_tizen 4.0 - /// - /// @remarks If your application needs to publish health-related sensor data, - /// the URI category should be @"healthinfo@". - /// Then the applications without the privilege http://tizen.org/privilege/healthinfo - /// are not allowed to listen your application's health-related sensor. - /// - /// @remarks The @a provider must be released using sensor_destroy_provider(). - /// - /// @param[in] uri The URI of sensor to be created - /// @param[out] provider The sensor provider handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_destroy_provider() - int sensor_create_provider( - ffi.Pointer uri, - ffi.Pointer provider, - ) { - return _sensor_create_provider( - uri, - provider, - ); - } - - late final _sensor_create_providerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('sensor_create_provider'); - late final _sensor_create_provider = _sensor_create_providerPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Registers the sensor provider. - /// @details A sensor provider is created via sensor_create_provider(), - /// and the three callback functions sensor_provider_start_cb(), sensor_provider_stop_cb(), - /// and sensor_provider_set_interval_changed_cb() should be set in advance. - /// @since_tizen 4.0 - /// - /// @param[in] provider The sensor provider handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_remove_provider() - int sensor_add_provider( - sensor_provider_h provider, - ) { - return _sensor_add_provider( - provider, - ); - } - - late final _sensor_add_providerPtr = - _lookup>( - 'sensor_add_provider'); - late final _sensor_add_provider = - _sensor_add_providerPtr.asFunction(); - - /// @brief Unregisters the sensor provider. - /// @since_tizen 4.0 - /// - /// @param[in] provider The sensor provider handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_add_provider() - int sensor_remove_provider( - sensor_provider_h provider, - ) { - return _sensor_remove_provider( - provider, - ); - } - - late final _sensor_remove_providerPtr = - _lookup>( - 'sensor_remove_provider'); - late final _sensor_remove_provider = - _sensor_remove_providerPtr.asFunction(); - - /// @brief Releases all the resources allocated for the sensor provider. - /// @since_tizen 4.0 - /// - /// @remarks If this function is called before sensor_remove_provider() is called, - /// then the sensor provider will be implicitly unregistered. - /// - /// @param[in] provider The sensor provider handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see sensor_create_provider() - int sensor_destroy_provider( - sensor_provider_h provider, - ) { - return _sensor_destroy_provider( - provider, - ); - } - - late final _sensor_destroy_providerPtr = - _lookup>( - 'sensor_destroy_provider'); - late final _sensor_destroy_provider = - _sensor_destroy_providerPtr.asFunction(); - - /// @brief Sets the name to the sensor provider. - /// @since_tizen 4.0 - /// - /// @param[in] provider The sensor provider handle - /// @param[in] name The name of the sensor - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre sensor_create_provider() - /// @see sensor_provider_set_vendor() - /// sensor_provider_set_range() - /// sensor_provider_set_resolution() - int sensor_provider_set_name( - sensor_provider_h provider, - ffi.Pointer name, - ) { - return _sensor_provider_set_name( - provider, - name, - ); - } - - late final _sensor_provider_set_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_provider_h, - ffi.Pointer)>>('sensor_provider_set_name'); - late final _sensor_provider_set_name = _sensor_provider_set_namePtr - .asFunction)>(); - - /// @brief Sets the vendor to the sensor provider. - /// @since_tizen 4.0 - /// - /// @param[in] provider The sensor provider handle - /// @param[in] vendor The vendor of the sensor - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre sensor_create_provider() - /// @see sensor_provider_set_name() - /// sensor_provider_set_range() - /// sensor_provider_set_resolution() - int sensor_provider_set_vendor( - sensor_provider_h provider, - ffi.Pointer vendor, - ) { - return _sensor_provider_set_vendor( - provider, - vendor, - ); - } - - late final _sensor_provider_set_vendorPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_provider_h, - ffi.Pointer)>>('sensor_provider_set_vendor'); - late final _sensor_provider_set_vendor = _sensor_provider_set_vendorPtr - .asFunction)>(); - - /// @brief Sets the range of possible sensor values to the sensor provider. - /// @since_tizen 4.0 - /// - /// @remarks If the application does not set the range, the default values are 0 and 1. - /// - /// @param[in] provider The sensor provider handle - /// @param[in] min_range The lower bound - /// @param[in] max_range The upper bound - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre sensor_create_provider() - /// @see sensor_provider_set_name() - /// sensor_provider_set_vendor() - /// sensor_provider_set_resolution() - int sensor_provider_set_range( - sensor_provider_h provider, - double min_range, - double max_range, - ) { - return _sensor_provider_set_range( - provider, - min_range, - max_range, - ); - } - - late final _sensor_provider_set_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_provider_h, ffi.Float, - ffi.Float)>>('sensor_provider_set_range'); - late final _sensor_provider_set_range = _sensor_provider_set_rangePtr - .asFunction(); - - /// @brief Sets the resolution of sensor values to the sensor provider. - /// @since_tizen 4.0 - /// - /// @remarks If the application does not set the resolution, the default value is 1. - /// - /// @param[in] provider The sensor provider handle - /// @param[in] resolution The resolution - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre sensor_create_provider() - /// @see sensor_provider_set_name() - /// sensor_provider_set_vendor() - /// sensor_provider_set_range() - int sensor_provider_set_resolution( - sensor_provider_h provider, - double resolution, - ) { - return _sensor_provider_set_resolution( - provider, - resolution, - ); - } - - late final _sensor_provider_set_resolutionPtr = _lookup< - ffi.NativeFunction>( - 'sensor_provider_set_resolution'); - late final _sensor_provider_set_resolution = - _sensor_provider_set_resolutionPtr - .asFunction(); - - /// @brief Registers the callback function to be invoked when a listener starts the sensor provider. - /// @since_tizen 4.0 - /// - /// @param[in] provider The provider handle - /// @param[in] callback The callback function to attach to the @a provider handle - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_provider_set_start_cb( - sensor_provider_h provider, - sensor_provider_start_cb callback, - ffi.Pointer user_data, - ) { - return _sensor_provider_set_start_cb( - provider, - callback, - user_data, - ); - } - - late final _sensor_provider_set_start_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_provider_h, sensor_provider_start_cb, - ffi.Pointer)>>('sensor_provider_set_start_cb'); - late final _sensor_provider_set_start_cb = - _sensor_provider_set_start_cbPtr.asFunction< - int Function(sensor_provider_h, sensor_provider_start_cb, - ffi.Pointer)>(); - - /// @brief Registers the callback function to be invoked when a sensor listener stops the sensor provider. - /// @since_tizen 4.0 - /// - /// @param[in] provider The sensor provider handle - /// @param[in] callback The callback function to attach to the @a provider handle - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_provider_set_stop_cb( - sensor_provider_h provider, - sensor_provider_stop_cb callback, - ffi.Pointer user_data, - ) { - return _sensor_provider_set_stop_cb( - provider, - callback, - user_data, - ); - } - - late final _sensor_provider_set_stop_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_provider_h, sensor_provider_stop_cb, - ffi.Pointer)>>('sensor_provider_set_stop_cb'); - late final _sensor_provider_set_stop_cb = - _sensor_provider_set_stop_cbPtr.asFunction< - int Function(sensor_provider_h, sensor_provider_stop_cb, - ffi.Pointer)>(); - - /// @brief Registers the callback function to be invoked when the interval is changed. - /// @since_tizen 4.0 - /// - /// @param[in] provider The sensor provider handle - /// @param[in] callback The callback function to attach to the @a provider handle - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_provider_set_interval_changed_cb( - sensor_provider_h provider, - sensor_provider_interval_changed_cb callback, - ffi.Pointer user_data, - ) { - return _sensor_provider_set_interval_changed_cb( - provider, - callback, - user_data, - ); - } - - late final _sensor_provider_set_interval_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_provider_h, - sensor_provider_interval_changed_cb, ffi.Pointer)>>( - 'sensor_provider_set_interval_changed_cb'); - late final _sensor_provider_set_interval_changed_cb = - _sensor_provider_set_interval_changed_cbPtr.asFunction< - int Function(sensor_provider_h, sensor_provider_interval_changed_cb, - ffi.Pointer)>(); - - /// @brief Publishes a sensor event through the declared sensor. - /// @details This function publishes a sensor's data to its listeners. - /// @since_tizen 4.0 - /// - /// @param[in] provider The sensor provider handle - /// @param[out] event The sensor event - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_provider_publish( - sensor_provider_h provider, - sensor_event_s event, - ) { - return _sensor_provider_publish( - provider, - event, - ); - } - - late final _sensor_provider_publishPtr = _lookup< - ffi - .NativeFunction>( - 'sensor_provider_publish'); - late final _sensor_provider_publish = _sensor_provider_publishPtr - .asFunction(); - - /// @brief Checks whether it is supported to record a given sensor type. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @param[in] type A sensor type to check - /// @param[out] supported If supported, @c true; Otherwise @c false - /// - /// @return #SENSOR_ERROR_NONE on success; Otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_recorder_is_supported( - int type, - ffi.Pointer supported, - ) { - return _sensor_recorder_is_supported( - type, - supported, - ); - } - - late final _sensor_recorder_is_supportedPtr = _lookup< - ffi - .NativeFunction)>>( - 'sensor_recorder_is_supported'); - late final _sensor_recorder_is_supported = _sensor_recorder_is_supportedPtr - .asFunction)>(); - - /// @brief Starts to record a given sensor type. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @remarks Some sensor types are privileged. An application should have the privilege - /// http://tizen.org/privilege/healthinfo to get access to the following sensors: - /// #SENSOR_HRM, #SENSOR_HRM_LED_GREEN, #SENSOR_HRM_LED_IR, #SENSOR_HRM_LED_RED, - /// #SENSOR_HUMAN_PEDOMETER, #SENSOR_HUMAN_SLEEP_MONITOR, #SENSOR_HUMAN_SLEEP_DETECTOR, - /// and #SENSOR_HUMAN_STRESS_MONITOR. - /// - /// @param[in] type A sensor type to be recorded - /// @param[in] option Option - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_NOT_SUPPORTED Not supported to record the sensor type - /// @retval #SENSOR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// @retval #SENSOR_ERROR_NOT_AVAILABLE The sensor is already being recorded by the request of the current application - /// - /// @see sensor_recorder_stop() - int sensor_recorder_start( - int type, - sensor_recorder_option_h option, - ) { - return _sensor_recorder_start( - type, - option, - ); - } - - late final _sensor_recorder_startPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, sensor_recorder_option_h)>>('sensor_recorder_start'); - late final _sensor_recorder_start = _sensor_recorder_startPtr - .asFunction(); - - /// @brief Stops recording a given sensor type. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @param[in] type A sensor type being recorded - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_NOT_SUPPORTED The sensor type is not supported - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_recorder_start() - int sensor_recorder_stop( - int type, - ) { - return _sensor_recorder_stop( - type, - ); - } - - late final _sensor_recorder_stopPtr = - _lookup>( - 'sensor_recorder_stop'); - late final _sensor_recorder_stop = - _sensor_recorder_stopPtr.asFunction(); - - /// @brief Creates a recorder option handle. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @remarks The @a option must be released using sensor_recorder_destroy_option(). - /// - /// @param[out] option Option handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_recorder_create_option( - ffi.Pointer option, - ) { - return _sensor_recorder_create_option( - option, - ); - } - - late final _sensor_recorder_create_optionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'sensor_recorder_create_option'); - late final _sensor_recorder_create_option = _sensor_recorder_create_optionPtr - .asFunction)>(); - - /// @brief Destroys a recorder option handle. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @param[in] option Option handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_recorder_destroy_option( - sensor_recorder_option_h option, - ) { - return _sensor_recorder_destroy_option( - option, - ); - } - - late final _sensor_recorder_destroy_optionPtr = - _lookup>( - 'sensor_recorder_destroy_option'); - late final _sensor_recorder_destroy_option = - _sensor_recorder_destroy_optionPtr - .asFunction(); - - /// @brief Sets a recording option parameter. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @param[in] option Option handle - /// @param[in] param Option parameter - /// @param[in] value Value - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_recorder_option_set_int( - sensor_recorder_option_h option, - int param, - int value, - ) { - return _sensor_recorder_option_set_int( - option, - param, - value, - ); - } - - late final _sensor_recorder_option_set_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_recorder_option_h, ffi.Int32, - ffi.Int)>>('sensor_recorder_option_set_int'); - late final _sensor_recorder_option_set_int = - _sensor_recorder_option_set_intPtr - .asFunction(); - - /// @brief Creates a recorder query handle. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @remarks The @a query must be released using sensor_recorder_destroy_query(). - /// - /// @param[out] query Query handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_recorder_create_query( - ffi.Pointer query, - ) { - return _sensor_recorder_create_query( - query, - ); - } - - late final _sensor_recorder_create_queryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>( - 'sensor_recorder_create_query'); - late final _sensor_recorder_create_query = _sensor_recorder_create_queryPtr - .asFunction)>(); - - /// @brief Destroys a recorder query handle. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @param[in] query Query handle - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_recorder_destroy_query( - sensor_recorder_query_h query, - ) { - return _sensor_recorder_destroy_query( - query, - ); - } - - late final _sensor_recorder_destroy_queryPtr = - _lookup>( - 'sensor_recorder_destroy_query'); - late final _sensor_recorder_destroy_query = _sensor_recorder_destroy_queryPtr - .asFunction(); - - /// @brief Sets an integer-type query parameter - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @param[in] query Query handle - /// @param[in] param Query parameter - /// @param[in] value Value - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_recorder_query_set_int( - sensor_recorder_query_h query, - int param, - int value, - ) { - return _sensor_recorder_query_set_int( - query, - param, - value, - ); - } - - late final _sensor_recorder_query_set_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_recorder_query_h, ffi.Int32, - ffi.Int)>>('sensor_recorder_query_set_int'); - late final _sensor_recorder_query_set_int = _sensor_recorder_query_set_intPtr - .asFunction(); - - /// @brief Sets a time-type query parameter. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @param[in] query Query handle - /// @param[in] param Query parameter - /// @param[in] t Time - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_recorder_query_set_time( - sensor_recorder_query_h query, - int param, - int t, - ) { - return _sensor_recorder_query_set_time( - query, - param, - t, - ); - } - - late final _sensor_recorder_query_set_timePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_recorder_query_h, ffi.Int32, - time_t)>>('sensor_recorder_query_set_time'); - late final _sensor_recorder_query_set_time = - _sensor_recorder_query_set_timePtr - .asFunction(); - - /// @brief Queries the recorded data asynchronously. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @remarks Some sensor types are privileged. An application should have the privilege - /// http://tizen.org/privilege/healthinfo to get access to the following sensors: - /// #SENSOR_HRM, #SENSOR_HRM_LED_GREEN, #SENSOR_HRM_LED_IR, #SENSOR_HRM_LED_RED, - /// #SENSOR_HUMAN_PEDOMETER, #SENSOR_HUMAN_SLEEP_MONITOR, #SENSOR_HUMAN_SLEEP_DETECTOR, - /// and #SENSOR_HUMAN_STRESS_MONITOR. - /// - /// @param[in] type Sensor type - /// @param[in] query Query handle - /// @param[in] cb Callback function to receive the queried data - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_NOT_SUPPORTED Not supported to record the sensor type - /// @retval #SENSOR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// - /// @see sensor_recorder_read_sync() - int sensor_recorder_read( - int type, - sensor_recorder_query_h query, - sensor_recorder_data_cb cb, - ffi.Pointer user_data, - ) { - return _sensor_recorder_read( - type, - query, - cb, - user_data, - ); - } - - late final _sensor_recorder_readPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - sensor_recorder_query_h, - sensor_recorder_data_cb, - ffi.Pointer)>>('sensor_recorder_read'); - late final _sensor_recorder_read = _sensor_recorder_readPtr.asFunction< - int Function(int, sensor_recorder_query_h, sensor_recorder_data_cb, - ffi.Pointer)>(); - - /// @brief Queries the recorded data synchronously. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @remarks Some sensor types are privileged. An application should have the privilege - /// http://tizen.org/privilege/healthinfo to get access to the following sensors: - /// #SENSOR_HRM, #SENSOR_HRM_LED_GREEN, #SENSOR_HRM_LED_IR, #SENSOR_HRM_LED_RED, - /// #SENSOR_HUMAN_PEDOMETER, #SENSOR_HUMAN_SLEEP_MONITOR, #SENSOR_HUMAN_SLEEP_DETECTOR, - /// and #SENSOR_HUMAN_STRESS_MONITOR. - /// - /// @param[in] type Sensor type - /// @param[in] query Query handle - /// @param[in] cb Callback function to receive the queried data - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_NOT_SUPPORTED Not supported to record the sensor type - /// @retval #SENSOR_ERROR_PERMISSION_DENIED Permission denied - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// @retval #SENSOR_ERROR_NO_DATA No data retrieved - /// - /// @see sensor_recorder_read() - int sensor_recorder_read_sync( - int type, - sensor_recorder_query_h query, - sensor_recorder_data_cb cb, - ffi.Pointer user_data, - ) { - return _sensor_recorder_read_sync( - type, - query, - cb, - user_data, - ); - } - - late final _sensor_recorder_read_syncPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - sensor_recorder_query_h, - sensor_recorder_data_cb, - ffi.Pointer)>>('sensor_recorder_read_sync'); - late final _sensor_recorder_read_sync = - _sensor_recorder_read_syncPtr.asFunction< - int Function(int, sensor_recorder_query_h, sensor_recorder_data_cb, - ffi.Pointer)>(); - - /// @brief Gets the start and the end time of the time period of a given record data. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @param[in] data Record data handle - /// @param[out] start_time Start time of the time period of the record - /// @param[out] end_time End time of the time period of the record - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - int sensor_recorder_data_get_time( - sensor_recorder_data_h data, - ffi.Pointer start_time, - ffi.Pointer end_time, - ) { - return _sensor_recorder_data_get_time( - data, - start_time, - end_time, - ); - } - - late final _sensor_recorder_data_get_timePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_recorder_data_h, ffi.Pointer, - ffi.Pointer)>>('sensor_recorder_data_get_time'); - late final _sensor_recorder_data_get_time = - _sensor_recorder_data_get_timePtr.asFunction< - int Function(sensor_recorder_data_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets an integer value from a record data. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @param[in] data Record data handle - /// @param[in] key Data attribute to retrieve - /// @param[out] value Retrieved value - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// @retval #SENSOR_ERROR_NO_DATA No data retrieved - int sensor_recorder_data_get_int( - sensor_recorder_data_h data, - int key, - ffi.Pointer value, - ) { - return _sensor_recorder_data_get_int( - data, - key, - value, - ); - } - - late final _sensor_recorder_data_get_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_recorder_data_h, ffi.Int32, - ffi.Pointer)>>('sensor_recorder_data_get_int'); - late final _sensor_recorder_data_get_int = - _sensor_recorder_data_get_intPtr.asFunction< - int Function(sensor_recorder_data_h, int, ffi.Pointer)>(); - - /// @brief Gets a double value from a record data. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// - /// @param[in] data Record data handle - /// @param[in] key Data attribute to retrieve - /// @param[out] value Retrieved value - /// - /// @return #SENSOR_ERROR_NONE on success, otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SENSOR_ERROR_OPERATION_FAILED Operation failed - /// @retval #SENSOR_ERROR_NO_DATA No data retrieved - int sensor_recorder_data_get_double( - sensor_recorder_data_h data, - int key, - ffi.Pointer value, - ) { - return _sensor_recorder_data_get_double( - data, - key, - value, - ); - } - - late final _sensor_recorder_data_get_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(sensor_recorder_data_h, ffi.Int32, - ffi.Pointer)>>('sensor_recorder_data_get_double'); - late final _sensor_recorder_data_get_double = - _sensor_recorder_data_get_doublePtr.asFunction< - int Function(sensor_recorder_data_h, int, ffi.Pointer)>(); - - /// @brief Gets the inclination matrix @"I@" and rotation matrix @"R@" transforming a vector from the device coordinate to the world's coordinate. - /// - /// @details [0 0 g] = R * gravity (g = magnitude of gravity) \n - /// [0 m 0] = I * R * geomagnetic (m = magnitude of the geomagnetic field) \n - /// R is the identity matrix when the device is aligned with the world's coordinate system, that is, when the device's X axis points towards the East, the Y axis points to the North Pole and the device is facing the sky. \n - /// I is a rotation matrix transforming the geomagnetic vector into the same coordinate space as gravity (the world's coordinate space). I is a simple rotation around the X axis. \n - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks Parameters Gx, Gy, and Gz can be obtained from the values returned by #SENSOR_GRAVITY. \n - /// Parameters Mx, My, and Mz can be obtained from the values returned by #SENSOR_MAGNETIC. - /// Output parameter R and I are always returned as a 3x3 matrix array of 9 floats like this form: - ///
-  /// { R[0], R[1], R[2],
-  /// R[3], R[4], R[5],
-  /// R[6], R[7], R[6] }
-  /// 
- /// - /// - /// @param[in] Gx The X-axis gravity vector in the device's coordinate - /// @param[in] Gy The Y-axis gravity vector in the device's coordinate - /// @param[in] Gz The Z-axis gravity vector in the device's coordinate - /// @param[in] Mx The X-axis geomagnetic vector in the device's coordinate - /// @param[in] My The Y-axis geomagnetic vector in the device's coordinate - /// @param[in] Mz The Z-axis geomagnetic vector in the device's coordinate - /// @param[out] R The array of 9 floats that represent the rotation matrix @"R@" \n - /// It can be null. - /// @param[out] I The array of 9 floats that represent the inclination matrix @"I@" \n - /// It can be null. - /// - /// @return #SENSOR_ERROR_NONE on success; Otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - int sensor_util_get_rotation_matrix( - double Gx, - double Gy, - double Gz, - double Mx, - double My, - double Mz, - ffi.Pointer R, - ffi.Pointer I, - ) { - return _sensor_util_get_rotation_matrix( - Gx, - Gy, - Gz, - Mx, - My, - Mz, - R, - I, - ); - } - - late final _sensor_util_get_rotation_matrixPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Float, - ffi.Float, - ffi.Float, - ffi.Float, - ffi.Float, - ffi.Float, - ffi.Pointer, - ffi.Pointer)>>('sensor_util_get_rotation_matrix'); - late final _sensor_util_get_rotation_matrix = - _sensor_util_get_rotation_matrixPtr.asFunction< - int Function(double, double, double, double, double, double, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Converts a rotation vector to a rotation matrix. - /// - /// @details Rotation vectors (Vx, Vy, Vz) can be obtained from #SENSOR_ROTATION_VECTOR. - /// It returns a 9 element rotation matrix in the array R. R must have length as 9. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] Vx The X-axis rotation vector - /// @param[in] Vy The Y-axis rotation vector - /// @param[in] Vz The Z-axis rotation vector - /// @param[out] R A 9 element rotation matrix in the array R that must have length as 9 - /// - /// @return #SENSOR_ERROR_NONE on success; Otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - int sensor_util_get_rotation_matrix_from_vector( - double Vx, - double Vy, - double Vz, - ffi.Pointer R, - ) { - return _sensor_util_get_rotation_matrix_from_vector( - Vx, - Vy, - Vz, - R, - ); - } - - late final _sensor_util_get_rotation_matrix_from_vectorPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Float, ffi.Float, ffi.Float, ffi.Pointer)>>( - 'sensor_util_get_rotation_matrix_from_vector'); - late final _sensor_util_get_rotation_matrix_from_vector = - _sensor_util_get_rotation_matrix_from_vectorPtr.asFunction< - int Function(double, double, double, ffi.Pointer)>(); - - /// @brief Rotates the supplied rotation matrix so that it is expressed in a different coordinate system. - /// - /// @details This is typically used when an application needs to compute the three orientation angles of the device in a different coordinate system. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks inR and outR can be the same array, but this is not recommended for performance reasons. - /// This returns an error when X and Y define the same axis. - /// - /// @param[in] inR The rotation matrix (3x3) to be transformed - /// @param[in] x The world axis and direction on which the X axis of the device is mapped - /// @param[in] y The world axis and direction on which the Y axis of the device is mapped - /// @param[out] outR The transformed rotation matrix (3x3) - /// - /// @return #SENSOR_ERROR_NONE on success; Otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - int sensor_util_remap_coordinate_system( - ffi.Pointer inR, - int x, - int y, - ffi.Pointer outR, - ) { - return _sensor_util_remap_coordinate_system( - inR, - x, - y, - outR, - ); - } - - late final _sensor_util_remap_coordinate_systemPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int32, ffi.Int32, - ffi.Pointer)>>('sensor_util_remap_coordinate_system'); - late final _sensor_util_remap_coordinate_system = - _sensor_util_remap_coordinate_systemPtr.asFunction< - int Function( - ffi.Pointer, int, int, ffi.Pointer)>(); - - /// @brief Computes the geomagnetic inclination angle in radians from the inclination matrix I returned by sensor_util_get_rotation_matrix(). - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] I The inclination matrix from sensor_util_get_rotation_matrix() - /// @param[out] inclination The geomagnetic inclination angle in radians - /// - /// @return #SENSOR_ERROR_NONE on success; Otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see sensor_util_get_rotation_matrix() - int sensor_util_get_inclination( - ffi.Pointer I, - ffi.Pointer inclination, - ) { - return _sensor_util_get_inclination( - I, - inclination, - ); - } - - late final _sensor_util_get_inclinationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('sensor_util_get_inclination'); - late final _sensor_util_get_inclination = - _sensor_util_get_inclinationPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Computes the device's orientation based on the rotation matrix. - /// - /// @details When it returns, the array values are filled with the result: - /// - values[0]: azimuth, rotation around the Z axis. - /// - values[1]: pitch, rotation around the X axis. - /// - values[2]: roll, rotation around the Y axis. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks Parameter R must be an array of 9 floats from sensor_util_get_rotation_matrix() \n - /// Returned values are always arrays of 3 floats. - /// - /// @param[in] R A 9 element rotation matrix in the array - /// @param[out] values An array of 3 floats to hold the result - /// - /// @return #SENSOR_ERROR_NONE on success; Otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @see sensor_util_get_rotation_matrix() - int sensor_util_get_orientation( - ffi.Pointer R, - ffi.Pointer values, - ) { - return _sensor_util_get_orientation( - R, - values, - ); - } - - late final _sensor_util_get_orientationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('sensor_util_get_orientation'); - late final _sensor_util_get_orientation = - _sensor_util_get_orientationPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Computes the angle change between two rotation matrices. - /// - /// @details Given a current rotation matrix (R) and a previous rotation matrix (prevR), it computes - /// the rotation around the x,y, and z axes which transforms prevR to R. - /// It outputs a 3 element vector containing the x,y, and z angle change at indexes 0, 1, and 2 respectively. \n - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @remarks Each input matrix is a 3x3 matrix like this form: - ///
-  /// { R[0], R[1], R[2],
-  /// R[3], R[4], R[5],
-  /// R[6], R[7], R[6] }
-  /// 
- /// - /// @param[in] R The current rotation matrix - /// @param[in] prevR The previous rotation matrix - /// @param[out] angleChange An array of floats in which the angle change is stored - /// - /// @return #SENSOR_ERROR_NONE on success; Otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - int sensor_util_get_angle_change( - ffi.Pointer R, - ffi.Pointer prevR, - ffi.Pointer angleChange, - ) { - return _sensor_util_get_angle_change( - R, - prevR, - angleChange, - ); - } - - late final _sensor_util_get_angle_changePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('sensor_util_get_angle_change'); - late final _sensor_util_get_angle_change = - _sensor_util_get_angle_changePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the declination of the horizontal component of the magnetic field from true north, in degrees. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// - /// @param[in] latitude The latitude in geodetic coordinates - /// @param[in] longitude The longitude in geodetic coordinates - /// @param[in] altitude The altitude in geodetic coordinates - /// @param[out] declination The declination of the horizontal component of the magnetic field in degrees - /// - /// @return #SENSOR_ERROR_NONE on success; Otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - int sensor_util_get_declination( - double latitude, - double longitude, - double altitude, - ffi.Pointer declination, - ) { - return _sensor_util_get_declination( - latitude, - longitude, - altitude, - declination, - ); - } - - late final _sensor_util_get_declinationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Float, ffi.Float, ffi.Float, - ffi.Pointer)>>('sensor_util_get_declination'); - late final _sensor_util_get_declination = - _sensor_util_get_declinationPtr.asFunction< - int Function(double, double, double, ffi.Pointer)>(); - - /// @brief Gets the altitude from the atmospheric pressure, the pressure at sea level and temperature, in meters. - /// @since_tizen 4.0 - /// - /// @param[in] pressure The atmospheric pressure (hPa) - /// @param[in] sea_level_pressure The sea level pressure (hPa) @n - /// If the sea level pressure is not known, you can use 1013.25 hPa, mean sea level pressure - /// @param[in] temperature The temperature (degrees Celsius) @n - /// If the temperature is not known, you can use 15 degrees Celsius - /// @param[out] altitude The altitude (meters) - /// - /// @return #SENSOR_ERROR_NONE on success; Otherwise a negative error value - /// @retval #SENSOR_ERROR_NONE Successful - /// @retval #SENSOR_ERROR_INVALID_PARAMETER Invalid parameter - int sensor_util_get_altitude( - double pressure, - double sea_level_pressure, - double temperature, - ffi.Pointer altitude, - ) { - return _sensor_util_get_altitude( - pressure, - sea_level_pressure, - temperature, - altitude, - ); - } - - late final _sensor_util_get_altitudePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Float, ffi.Float, ffi.Float, - ffi.Pointer)>>('sensor_util_get_altitude'); - late final _sensor_util_get_altitude = - _sensor_util_get_altitudePtr.asFunction< - int Function(double, double, double, ffi.Pointer)>(); - - /// @brief Retrieves all the storage in a device. - /// @details This function invokes the callback function once for each storage in a device. \n - /// If storage_device_supported_cb() returns @c false, then the iteration will be finished. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] callback The iteration callback function - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STORAGE_ERROR_NONE Successful - /// @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @post This function invokes storage_device_supported_cb() repeatedly for each supported device. - /// @see storage_device_supported_cb() - int storage_foreach_device_supported( - storage_device_supported_cb callback, - ffi.Pointer user_data, - ) { - return _storage_foreach_device_supported( - callback, - user_data, - ); - } - - late final _storage_foreach_device_supportedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(storage_device_supported_cb, - ffi.Pointer)>>('storage_foreach_device_supported'); - late final _storage_foreach_device_supported = - _storage_foreach_device_supportedPtr.asFunction< - int Function(storage_device_supported_cb, ffi.Pointer)>(); - - /// @brief Gets the absolute path to the root directory of the given storage. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks Files saved on the internal/external storage are readable or writable by all applications.\n - /// When an application is uninstalled, the files written by that application are not removed from the internal/external storage.\n - /// If you want to access files or directories in internal storage, you must declare http://tizen.org/privilege/mediastorage.\n - /// If you want to access files or directories in external storage, you must declare http://tizen.org/privilege/externalstorage.\n - /// You must release @a path using free(). - /// @param[in] storage_id The storage device - /// @param[out] path The absolute path to the storage directory - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STORAGE_ERROR_NONE Successful - /// @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STORAGE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STORAGE_ERROR_NOT_SUPPORTED Storage not supported - /// @see storage_get_state() - int storage_get_root_directory( - int storage_id, - ffi.Pointer> path, - ) { - return _storage_get_root_directory( - storage_id, - path, - ); - } - - late final _storage_get_root_directoryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer>)>>( - 'storage_get_root_directory'); - late final _storage_get_root_directory = _storage_get_root_directoryPtr - .asFunction>)>(); - - /// @brief Gets the absolute path to the each directory of the given storage. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks Files saved on the internal/external storage are readable or writable by all applications.\n - /// When an application is uninstalled, the files written by that application are not removed from the internal/external storage.\n - /// The directory path may not exist, so you must make sure that it exists before using it.\n - /// If you want to access files or directories in internal storage except #STORAGE_DIRECTORY_SYSTEM_RINGTONES, you must declare http://tizen.org/privilege/mediastorage.\n - /// If you want to access files or directories in #STORAGE_DIRECTORY_SYSTEM_RINGTONES, you must declare %http://tizen.org/privilege/systemsettings.\n - /// If you want to access files or directories in external storage, you must declare http://tizen.org/privilege/externalstorage.\n - /// You must release @a path using free(). - /// @param[in] storage_id The storage device - /// @param[in] type The directory type - /// @param[out] path The absolute path to the directory type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STORAGE_ERROR_NONE Successful - /// @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STORAGE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STORAGE_ERROR_NOT_SUPPORTED Storage not supported - /// @see storage_get_state() - int storage_get_directory( - int storage_id, - int type, - ffi.Pointer> path, - ) { - return _storage_get_directory( - storage_id, - type, - path, - ); - } - - late final _storage_get_directoryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Int32, - ffi.Pointer>)>>('storage_get_directory'); - late final _storage_get_directory = _storage_get_directoryPtr - .asFunction>)>(); - - /// @brief Gets the type of the given storage. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] storage_id The storage device - /// @param[out] type The type of the storage - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STORAGE_ERROR_NONE Successful - /// @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STORAGE_ERROR_NOT_SUPPORTED Storage not supported - int storage_get_type( - int storage_id, - ffi.Pointer type, - ) { - return _storage_get_type( - storage_id, - type, - ); - } - - late final _storage_get_typePtr = _lookup< - ffi - .NativeFunction)>>( - 'storage_get_type'); - late final _storage_get_type = _storage_get_typePtr - .asFunction)>(); - - /// @brief Gets the current state of the given storage. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] storage_id The storage device - /// @param[out] state The current state of the storage - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STORAGE_ERROR_NONE Successful - /// @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STORAGE_ERROR_NOT_SUPPORTED Storage not supported - /// @see storage_get_root_directory() - /// @see storage_get_total_space() - /// @see storage_get_available_space() - int storage_get_state( - int storage_id, - ffi.Pointer state, - ) { - return _storage_get_state( - storage_id, - state, - ); - } - - late final _storage_get_statePtr = _lookup< - ffi - .NativeFunction)>>( - 'storage_get_state'); - late final _storage_get_state = _storage_get_statePtr - .asFunction)>(); - - /// @brief Registers a callback function to be invoked when the state of the storage changes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] storage_id The storage device - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STORAGE_ERROR_NONE Successful - /// @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STORAGE_ERROR_NOT_SUPPORTED Storage not supported - /// @retval #STORAGE_ERROR_OPERATION_FAILED Operation failed - /// @post storage_state_changed_cb() will be invoked if the state of the registered storage changes. - /// @see storage_state_changed_cb() - /// @see storage_unset_state_changed_cb() - int storage_set_state_changed_cb( - int storage_id, - storage_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _storage_set_state_changed_cb( - storage_id, - callback, - user_data, - ); - } - - late final _storage_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, storage_state_changed_cb, - ffi.Pointer)>>('storage_set_state_changed_cb'); - late final _storage_set_state_changed_cb = - _storage_set_state_changed_cbPtr.asFunction< - int Function(int, storage_state_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] storage_id The storage device to monitor - /// @param[in] callback The callback function to register - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STORAGE_ERROR_NONE Successful - /// @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STORAGE_ERROR_NOT_SUPPORTED Storage not supported - /// @retval #STORAGE_ERROR_OPERATION_FAILED Operation failed - /// @see storage_state_changed_cb() - /// @see storage_set_state_changed_cb() - int storage_unset_state_changed_cb( - int storage_id, - storage_state_changed_cb callback, - ) { - return _storage_unset_state_changed_cb( - storage_id, - callback, - ); - } - - late final _storage_unset_state_changed_cbPtr = _lookup< - ffi - .NativeFunction>( - 'storage_unset_state_changed_cb'); - late final _storage_unset_state_changed_cb = - _storage_unset_state_changed_cbPtr - .asFunction(); - - /// @brief Registers a callback function to be invoked when the state of the specified storage device type changes. - /// @since_tizen 3.0 - /// @param[in] type The type of the storage device - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STORAGE_ERROR_NONE Successful - /// @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STORAGE_ERROR_NOT_SUPPORTED Storage not supported - /// @retval #STORAGE_ERROR_OPERATION_FAILED Operation failed - /// @post storage_changed_cb() will be invoked if the state of the registered storage type changes. - /// @see storage_changed_cb() - /// @see storage_unset_changed_cb() - int storage_set_changed_cb( - int type, - storage_changed_cb callback, - ffi.Pointer user_data, - ) { - return _storage_set_changed_cb( - type, - callback, - user_data, - ); - } - - late final _storage_set_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, storage_changed_cb, - ffi.Pointer)>>('storage_set_changed_cb'); - late final _storage_set_changed_cb = _storage_set_changed_cbPtr.asFunction< - int Function(int, storage_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function for storage type state changes. - /// @since_tizen 3.0 - /// @param[in] type The type of the the storage device - /// @param[in] callback The callback function to unregister - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STORAGE_ERROR_NONE Successful - /// @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STORAGE_ERROR_NOT_SUPPORTED Storage not supported - /// @retval #STORAGE_ERROR_OPERATION_FAILED Operation failed - /// @see storage_changed_cb() - /// @see storage_set_changed_cb() - int storage_unset_changed_cb( - int type, - storage_changed_cb callback, - ) { - return _storage_unset_changed_cb( - type, - callback, - ); - } - - late final _storage_unset_changed_cbPtr = _lookup< - ffi.NativeFunction>( - 'storage_unset_changed_cb'); - late final _storage_unset_changed_cb = _storage_unset_changed_cbPtr - .asFunction(); - - /// @brief Gets the total space of the given storage in bytes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] storage_id The storage device - /// @param[out] bytes The total space size of the storage (bytes) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STORAGE_ERROR_NONE Successful - /// @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STORAGE_ERROR_NOT_SUPPORTED Storage not supported - /// @retval #STORAGE_ERROR_OPERATION_FAILED Operation failed - /// @see storage_get_state() - /// @see storage_get_available_space() - int storage_get_total_space( - int storage_id, - ffi.Pointer bytes, - ) { - return _storage_get_total_space( - storage_id, - bytes, - ); - } - - late final _storage_get_total_spacePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, - ffi.Pointer)>>('storage_get_total_space'); - late final _storage_get_total_space = _storage_get_total_spacePtr - .asFunction)>(); - - /// @brief Gets the available space size of the given storage in bytes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] storage_id The storage device - /// @param[out] bytes The available space size of the storage (bytes) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STORAGE_ERROR_NONE Successful - /// @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STORAGE_ERROR_NOT_SUPPORTED Storage not supported - /// @retval #STORAGE_ERROR_OPERATION_FAILED Operation failed - /// @see storage_get_state() - /// @see storage_get_total_space() - int storage_get_available_space( - int storage_id, - ffi.Pointer bytes, - ) { - return _storage_get_available_space( - storage_id, - bytes, - ); - } - - late final _storage_get_available_spacePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer)>>( - 'storage_get_available_space'); - late final _storage_get_available_space = _storage_get_available_spacePtr - .asFunction)>(); - - /// @brief Gets the type and the kind of external device for the given storage id. - /// - /// @since_tizen 5.0 - /// - /// @remarks This function works only for external storages. - /// If @a type is #STORAGE_TYPE_INTERNAL, this function returns #STORAGE_ERROR_INVALID_PARAMETER and @a dev is unchanged. - /// - /// @param[in] storage_id The storage id - /// @param[out] type The storage @a type (internal or external). If @a type is #STORAGE_TYPE_INTERNAL, this function returns #STORAGE_ERROR_INVALID_PARAMETER and @a dev is unchanged. - /// @param[out] dev The storage device for external storage. - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// - /// @retval #STORAGE_ERROR_NONE Successful - /// @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STORAGE_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STORAGE_ERROR_NOT_SUPPORTED Storage not supported - /// @retval #STORAGE_ERROR_OPERATION_FAILED Operation failed - int storage_get_type_dev( - int storage_id, - ffi.Pointer type, - ffi.Pointer dev, - ) { - return _storage_get_type_dev( - storage_id, - type, - dev, - ); - } - - late final _storage_get_type_devPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, - ffi.Pointer)>>('storage_get_type_dev'); - late final _storage_get_type_dev = _storage_get_type_devPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); - - int storage_get_internal_memory_size( - ffi.Pointer buf, - ) { - return _storage_get_internal_memory_size( - buf, - ); - } - - late final _storage_get_internal_memory_sizePtr = - _lookup)>>( - 'storage_get_internal_memory_size'); - late final _storage_get_internal_memory_size = - _storage_get_internal_memory_sizePtr - .asFunction)>(); - - int storage_get_external_memory_size( - ffi.Pointer buf, - ) { - return _storage_get_external_memory_size( - buf, - ); - } - - late final _storage_get_external_memory_sizePtr = - _lookup)>>( - 'storage_get_external_memory_size'); - late final _storage_get_external_memory_size = - _storage_get_external_memory_sizePtr - .asFunction)>(); - - /// @brief Gets the boolean value of the @a platform feature. - /// @since_tizen 2.3 - /// @param[in] key The name of the platform feature to get - /// @param[out] value The value of the given platform feature - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SYSTEM_INFO_ERROR_NONE Successful - /// @retval #SYSTEM_INFO_ERROR_INVALID_PARAMETER Cannot find the @a key in the model config file - /// @retval #SYSTEM_INFO_ERROR_IO_ERROR An input/output error occurred while reading the @a value from the model config file - /// @retval #SYSTEM_INFO_ERROR_PERMISSION_DENIED No permission to use the API - int system_info_get_platform_bool( - ffi.Pointer key, - ffi.Pointer value, - ) { - return _system_info_get_platform_bool( - key, - value, - ); - } - - late final _system_info_get_platform_boolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('system_info_get_platform_bool'); - late final _system_info_get_platform_bool = _system_info_get_platform_boolPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Gets the integer value of the @a platform feature. - /// @since_tizen 2.3 - /// @param[in] key The name of the platform feature to get - /// @param[out] value The value of the given platform feature - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SYSTEM_INFO_ERROR_NONE Successful - /// @retval #SYSTEM_INFO_ERROR_INVALID_PARAMETER Cannot find the @a key in the model config file - /// @retval #SYSTEM_INFO_ERROR_IO_ERROR An input/output error occurred while reading the @a value from the model config file - /// @retval #SYSTEM_INFO_ERROR_PERMISSION_DENIED No permission to use the API - int system_info_get_platform_int( - ffi.Pointer key, - ffi.Pointer value, - ) { - return _system_info_get_platform_int( - key, - value, - ); - } - - late final _system_info_get_platform_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('system_info_get_platform_int'); - late final _system_info_get_platform_int = _system_info_get_platform_intPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Gets the double value of the @a platform feature. - /// @since_tizen 2.3 - /// @param[in] key The name of the platform feature to get - /// @param[out] value The value of the given platform feature - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SYSTEM_INFO_ERROR_NONE Successful - /// @retval #SYSTEM_INFO_ERROR_INVALID_PARAMETER Cannot find the @a key in the model config file - /// @retval #SYSTEM_INFO_ERROR_IO_ERROR An input/output error occurred while reading the @a value from the model config file - /// @retval #SYSTEM_INFO_ERROR_PERMISSION_DENIED No permission to use the API - int system_info_get_platform_double( - ffi.Pointer key, - ffi.Pointer value, - ) { - return _system_info_get_platform_double( - key, - value, - ); - } - - late final _system_info_get_platform_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('system_info_get_platform_double'); - late final _system_info_get_platform_double = - _system_info_get_platform_doublePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the string value of the @a platform feature. - /// @since_tizen 2.3 - /// @remarks You must release the @a value using free(). - /// @param[in] key The name of the platform feature to get - /// @param[out] value The value of the given platform feature - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SYSTEM_INFO_ERROR_NONE Successful - /// @retval #SYSTEM_INFO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SYSTEM_INFO_ERROR_INVALID_PARAMETER Cannot find the @a key in the model config file - /// @retval #SYSTEM_INFO_ERROR_IO_ERROR An input/output error occurred while reading the @a value from the model config file - /// @retval #SYSTEM_INFO_ERROR_PERMISSION_DENIED No permission to use the API - int system_info_get_platform_string( - ffi.Pointer key, - ffi.Pointer> value, - ) { - return _system_info_get_platform_string( - key, - value, - ); - } - - late final _system_info_get_platform_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer>)>>( - 'system_info_get_platform_string'); - late final _system_info_get_platform_string = - _system_info_get_platform_stringPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Gets the boolean value of the @a custom feature. - /// @since_tizen 2.3 - /// @param[in] key The name of the custom feature to get. NOTE: This custom function uses a custom key which is provided by OEM's - /// @param[out] value The value of the given custom feature - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SYSTEM_INFO_ERROR_NONE Successful - /// @retval #SYSTEM_INFO_ERROR_INVALID_PARAMETER Cannot find the @a key in the model config file - /// @retval #SYSTEM_INFO_ERROR_IO_ERROR An input/output error occurred while reading the @a value from the model config file - /// @retval #SYSTEM_INFO_ERROR_PERMISSION_DENIED No permission to use the API - int system_info_get_custom_bool( - ffi.Pointer key, - ffi.Pointer value, - ) { - return _system_info_get_custom_bool( - key, - value, - ); - } - - late final _system_info_get_custom_boolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('system_info_get_custom_bool'); - late final _system_info_get_custom_bool = _system_info_get_custom_boolPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Gets the integer value of the @a custom feature. - /// @since_tizen 2.3 - /// @param[in] key The name of the custom feature to get. NOTE: This custom function uses a custom key which is provided by OEM's - /// @param[out] value The value of the given custom feature - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SYSTEM_INFO_ERROR_NONE Successful - /// @retval #SYSTEM_INFO_ERROR_INVALID_PARAMETER Cannot the find @a key in the model config file - /// @retval #SYSTEM_INFO_ERROR_IO_ERROR An input/output error occurred while reading the @a value from the model config file - /// @retval #SYSTEM_INFO_ERROR_PERMISSION_DENIED No permission to use the API - int system_info_get_custom_int( - ffi.Pointer key, - ffi.Pointer value, - ) { - return _system_info_get_custom_int( - key, - value, - ); - } - - late final _system_info_get_custom_intPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('system_info_get_custom_int'); - late final _system_info_get_custom_int = _system_info_get_custom_intPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Gets the double value of the @a custom feature. - /// @since_tizen 2.3 - /// @param[in] key The name of the custom feature to get. NOTE: This custom function uses a custom key which is provided by OEM's - /// @param[out] value The value of the given custom feature - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SYSTEM_INFO_ERROR_NONE Successful - /// @retval #SYSTEM_INFO_ERROR_INVALID_PARAMETER Cannot find the @a key in the model config file - /// @retval #SYSTEM_INFO_ERROR_IO_ERROR An input/output error occurred while reading the @a value from the model config file - /// @retval #SYSTEM_INFO_ERROR_PERMISSION_DENIED No permission to use the API - int system_info_get_custom_double( - ffi.Pointer key, - ffi.Pointer value, - ) { - return _system_info_get_custom_double( - key, - value, - ); - } - - late final _system_info_get_custom_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('system_info_get_custom_double'); - late final _system_info_get_custom_double = - _system_info_get_custom_doublePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the string value of the @a custom feature. - /// @since_tizen 2.3 - /// @remarks You must release the @a value using free(). - /// @param[in] key The name of the custom feature to get. NOTE: This custom function uses a custom key which is provided by OEM's - /// @param[out] value The value of the given custom feature - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #SYSTEM_INFO_ERROR_NONE Successful - /// @retval #SYSTEM_INFO_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #SYSTEM_INFO_ERROR_INVALID_PARAMETER Cannot find the @a key in the model config file - /// @retval #SYSTEM_INFO_ERROR_IO_ERROR An input/output error occurred while reading the @a value from the model config file - /// @retval #SYSTEM_INFO_ERROR_PERMISSION_DENIED No permission to use the API - int system_info_get_custom_string( - ffi.Pointer key, - ffi.Pointer> value, - ) { - return _system_info_get_custom_string( - key, - value, - ); - } - - late final _system_info_get_custom_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer>)>>( - 'system_info_get_custom_string'); - late final _system_info_get_custom_string = - _system_info_get_custom_stringPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @internal - /// @brief Do not use it. It will be removed. - int system_info_get_value_int( - int key, - ffi.Pointer value, - ) { - return _system_info_get_value_int( - key, - value, - ); - } - - late final _system_info_get_value_intPtr = _lookup< - ffi - .NativeFunction)>>( - 'system_info_get_value_int'); - late final _system_info_get_value_int = _system_info_get_value_intPtr - .asFunction)>(); - - /// @internal - /// @brief Do not use it. It will be removed. - int system_info_get_value_bool( - int key, - ffi.Pointer value, - ) { - return _system_info_get_value_bool( - key, - value, - ); - } - - late final _system_info_get_value_boolPtr = _lookup< - ffi - .NativeFunction)>>( - 'system_info_get_value_bool'); - late final _system_info_get_value_bool = _system_info_get_value_boolPtr - .asFunction)>(); - - /// @internal - /// @brief Do not use it. It will be removed. - int system_info_get_value_double( - int key, - ffi.Pointer value, - ) { - return _system_info_get_value_double( - key, - value, - ); - } - - late final _system_info_get_value_doublePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, - ffi.Pointer)>>('system_info_get_value_double'); - late final _system_info_get_value_double = _system_info_get_value_doublePtr - .asFunction)>(); - - /// @internal - /// @brief Do not use it. It will be removed. - int system_info_get_value_string( - int key, - ffi.Pointer> value, - ) { - return _system_info_get_value_string( - key, - value, - ); - } - - late final _system_info_get_value_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer>)>>( - 'system_info_get_value_string'); - late final _system_info_get_value_string = _system_info_get_value_stringPtr - .asFunction>)>(); - - /// @internal - /// @brief It is not decided if it should be opened to public. - int system_info_get_platform_type( - ffi.Pointer key, - ffi.Pointer type, - ) { - return _system_info_get_platform_type( - key, - type, - ); - } - - late final _system_info_get_platform_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('system_info_get_platform_type'); - late final _system_info_get_platform_type = - _system_info_get_platform_typePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @internal - /// @brief It is not decided if it should be opened to public. - int system_info_get_custom_type( - ffi.Pointer key, - ffi.Pointer type, - ) { - return _system_info_get_custom_type( - key, - type, - ); - } - - late final _system_info_get_custom_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('system_info_get_custom_type'); - late final _system_info_get_custom_type = - _system_info_get_custom_typePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @platform - /// @brief Sets the system settings value associated with the given key as an integer. - /// @since_tizen 2.3 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/systemsettings.admin - /// @remarks When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned. - /// @param[in] key The key name of the system settings - /// @param[out] value The new system settings value of the given key - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SYSTEM_SETTINGS_ERROR_NONE Successful - /// @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error - /// @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - /// @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device - int system_settings_set_value_int( - int key, - int value, - ) { - return _system_settings_set_value_int( - key, - value, - ); - } - - late final _system_settings_set_value_intPtr = - _lookup>( - 'system_settings_set_value_int'); - late final _system_settings_set_value_int = - _system_settings_set_value_intPtr.asFunction(); - - /// @brief Gets the system settings value associated with the given key as an integer. - /// @since_tizen 2.3 - /// @remarks When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned. - /// @param[in] key The key name of the system settings - /// @param[out] value The current system settings value of the given key - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SYSTEM_SETTINGS_ERROR_NONE Successful - /// @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error - /// @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - /// @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device - /// @warning %http://tizen.org/privilege/systemsettings (public level privilege) MUST NOT be declared to use this function since 2.3.1. - int system_settings_get_value_int( - int key, - ffi.Pointer value, - ) { - return _system_settings_get_value_int( - key, - value, - ); - } - - late final _system_settings_get_value_intPtr = _lookup< - ffi - .NativeFunction)>>( - 'system_settings_get_value_int'); - late final _system_settings_get_value_int = _system_settings_get_value_intPtr - .asFunction)>(); - - /// @platform - /// @brief Sets the system settings value associated with the given key as a boolean. - /// @since_tizen 2.3 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/systemsettings.admin - /// @remarks When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned. - /// @param[in] key The key name of the system settings - /// @param[out] value The new system settings value of the given key - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SYSTEM_SETTINGS_ERROR_NONE Successful - /// @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error - /// @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - /// @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device - int system_settings_set_value_bool( - int key, - bool value, - ) { - return _system_settings_set_value_bool( - key, - value, - ); - } - - late final _system_settings_set_value_boolPtr = - _lookup>( - 'system_settings_set_value_bool'); - late final _system_settings_set_value_bool = - _system_settings_set_value_boolPtr.asFunction(); - - /// @brief Gets the system settings value associated with the given key as a boolean. - /// @since_tizen 2.3 - /// @remarks When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned. - /// @param[in] key The key name of the system settings - /// @param[out] value The current system settings value of the given key - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SYSTEM_SETTINGS_ERROR_NONE Successful - /// @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error - /// @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - /// @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device - /// @warning %http://tizen.org/privilege/systemsettings (public level privilege) MUST NOT be declared to use this function since 2.3.1. - int system_settings_get_value_bool( - int key, - ffi.Pointer value, - ) { - return _system_settings_get_value_bool( - key, - value, - ); - } - - late final _system_settings_get_value_boolPtr = _lookup< - ffi - .NativeFunction)>>( - 'system_settings_get_value_bool'); - late final _system_settings_get_value_bool = - _system_settings_get_value_boolPtr - .asFunction)>(); - - /// @platform - /// @brief Sets the system settings value associated with the given key as a string. - /// @since_tizen 2.3 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/systemsettings.admin - /// @remarks #SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE is not available for setting. When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned. - /// @param[in] key The key name of the system settings - /// @param[out] value The new system settings value of the given key - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SYSTEM_SETTINGS_ERROR_NONE Successful - /// @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error - /// @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - /// @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device - int system_settings_set_value_string( - int key, - ffi.Pointer value, - ) { - return _system_settings_set_value_string( - key, - value, - ); - } - - late final _system_settings_set_value_stringPtr = _lookup< - ffi - .NativeFunction)>>( - 'system_settings_set_value_string'); - late final _system_settings_set_value_string = - _system_settings_set_value_stringPtr - .asFunction)>(); - - /// @brief Gets the system settings value associated with the given key as a string. - /// @since_tizen 2.3 - /// @remarks You must release @a value using free(). When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned. - /// @param[in] key The key name of the system settings - /// @param[out] value The current system settings value of the given key - /// @return 0 on success, otherwise a negative error value - /// @retval #SYSTEM_SETTINGS_ERROR_NONE Successful - /// @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error - /// @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - /// @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device - /// @warning %http://tizen.org/privilege/systemsettings (public level privilege) MUST NOT be declared to use this function since 2.3.1. - int system_settings_get_value_string( - int key, - ffi.Pointer> value, - ) { - return _system_settings_get_value_string( - key, - value, - ); - } - - late final _system_settings_get_value_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer>)>>( - 'system_settings_get_value_string'); - late final _system_settings_get_value_string = - _system_settings_get_value_stringPtr - .asFunction>)>(); - - /// @brief Sets a change event callback for the given system settings key. - /// @since_tizen 2.3 - /// @remarks #SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE is not available for set_changed_cb. When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned. - /// @param[in] key The key name of the system settings - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #SYSTEM_SETTINGS_ERROR_NONE Successful - /// @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - /// @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device - /// @post system_settings_changed_cb() will be invoked. - /// - /// @see system_settings_unset_changed_cb() - /// @see system_settings_changed_cb() - /// @warning %http://tizen.org/privilege/systemsettings (public level privilege) MUST NOT be declared to use this function since 2.3.1. - int system_settings_set_changed_cb( - int key, - system_settings_changed_cb callback, - ffi.Pointer user_data, - ) { - return _system_settings_set_changed_cb( - key, - callback, - user_data, - ); - } - - late final _system_settings_set_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, system_settings_changed_cb, - ffi.Pointer)>>('system_settings_set_changed_cb'); - late final _system_settings_set_changed_cb = - _system_settings_set_changed_cbPtr.asFunction< - int Function( - int, system_settings_changed_cb, ffi.Pointer)>(); - - /// @brief Unsets the callback function. - /// @since_tizen 2.3 - /// @remarks #SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE is not available for set_changed_cb. When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned. - /// @param[in] key The key name of the system settings - /// @return 0 on success, otherwise a negative error value - /// @retval #SYSTEM_SETTINGS_ERROR_NONE Successful - /// @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - /// @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device - /// - /// @see system_settings_set_changed_cb() - /// @warning %http://tizen.org/privilege/systemsettings (public level privilege) MUST NOT be declared to use this function since 2.3.1. - int system_settings_unset_changed_cb( - int key, - ) { - return _system_settings_unset_changed_cb( - key, - ); - } - - late final _system_settings_unset_changed_cbPtr = - _lookup>( - 'system_settings_unset_changed_cb'); - late final _system_settings_unset_changed_cb = - _system_settings_unset_changed_cbPtr.asFunction(); - - /// @platform - /// @brief Iterate the system settings value associated with the given key as a string type. - /// @since_tizen 3.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/systemsettings.admin - /// @remarks When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned. - /// @param[in] key The key name of the system settings - /// @param[in] callback The callback-function name for iteration - /// @param[in] user_data The user data passed from caller-side - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SYSTEM_SETTINGS_ERROR_NONE Successful - /// @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error - /// @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - /// @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device - int system_settings_foreach_value_string( - int key, - system_settings_iter_cb callback, - ffi.Pointer user_data, - ) { - return _system_settings_foreach_value_string( - key, - callback, - user_data, - ); - } - - late final _system_settings_foreach_value_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, system_settings_iter_cb, - ffi.Pointer)>>('system_settings_foreach_value_string'); - late final _system_settings_foreach_value_string = - _system_settings_foreach_value_stringPtr.asFunction< - int Function(int, system_settings_iter_cb, ffi.Pointer)>(); - - /// @platform - /// @brief Adds the system settings value associated with the given key as a string type if it supports List iteration. - /// @since_tizen 3.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/systemsettings.admin - /// @remarks When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned. - /// @param[in] key The key name of the system settings - /// @param[in] value string typed value to be appended - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SYSTEM_SETTINGS_ERROR_NONE Successful - /// @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error - /// @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - /// @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device - int system_settings_add_value_string( - int key, - ffi.Pointer value, - ) { - return _system_settings_add_value_string( - key, - value, - ); - } - - late final _system_settings_add_value_stringPtr = _lookup< - ffi - .NativeFunction)>>( - 'system_settings_add_value_string'); - late final _system_settings_add_value_string = - _system_settings_add_value_stringPtr - .asFunction)>(); - - /// @platform - /// @brief Delete the system settings value associated with the given key as an string type if it supports List iteration. - /// @since_tizen 3.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/systemsettings.admin - /// @remarks When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned. - /// @param[in] key The key name of the system settings - /// @param[in] value string typed value to be removed - /// @return @c 0 on success, otherwise a negative error value - /// @retval #SYSTEM_SETTINGS_ERROR_NONE Successful - /// @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error - /// @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - /// @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device - int system_settings_delete_value_string( - int key, - ffi.Pointer value, - ) { - return _system_settings_delete_value_string( - key, - value, - ); - } - - late final _system_settings_delete_value_stringPtr = _lookup< - ffi - .NativeFunction)>>( - 'system_settings_delete_value_string'); - late final _system_settings_delete_value_string = - _system_settings_delete_value_stringPtr - .asFunction)>(); - - /// @brief Adds a change event callback for the given system settings key. - /// @details The difference between this function and system_settings_set_changed_cb() is that system_settings_set_changed_cb() can set only one callback for a given key, while system_settings_add_changed_cb() can set multiple callbacks for a given key. - /// @since_tizen 5.0 - /// @remarks The @a key cannot be #SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE. When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned. - /// - /// @param[in] key The key name of the system settings - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #SYSTEM_SETTINGS_ERROR_NONE Successful - /// @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device - /// @post system_settings_changed_cb() will be invoked. - /// - /// @see system_settings_remove_changed_cb() - /// @see system_settings_changed_cb() - int system_settings_add_changed_cb( - int key, - system_settings_changed_cb callback, - ffi.Pointer user_data, - ) { - return _system_settings_add_changed_cb( - key, - callback, - user_data, - ); - } - - late final _system_settings_add_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, system_settings_changed_cb, - ffi.Pointer)>>('system_settings_add_changed_cb'); - late final _system_settings_add_changed_cb = - _system_settings_add_changed_cbPtr.asFunction< - int Function( - int, system_settings_changed_cb, ffi.Pointer)>(); - - /// @brief Removes a change event callback function. - /// @details The difference between this function and system_settings_unset_changed_cb() is that system_settings_unset_changed_cb() unsets the callback set with system_settings_set_changed_cb(), while system_settings_remove_changed_cb() removes callbacks added with system_settings_add_changed_cb() - /// @since_tizen 5.0 - /// @remarks The @a key cannot be #SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE. When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned. - /// @param[in] key The key name of the system settings - /// @param[in] callback The callback function to be removed - /// @return 0 on success, otherwise a negative error value - /// @retval #SYSTEM_SETTINGS_ERROR_NONE Successful - /// @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device - /// - /// @see system_settings_add_changed_cb() - int system_settings_remove_changed_cb( - int key, - system_settings_changed_cb callback, - ) { - return _system_settings_remove_changed_cb( - key, - callback, - ); - } - - late final _system_settings_remove_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, system_settings_changed_cb)>>( - 'system_settings_remove_changed_cb'); - late final _system_settings_remove_changed_cb = - _system_settings_remove_changed_cbPtr - .asFunction(); - - /// @brief Writes a trace event to indicate that a synchronous event has begun. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] name The name of event (optionally containing format specifiers) - /// @exception TRACE_ERROR_NONE Success - /// @exception TRACE_ERROR_IO_ERROR I/O error - /// @see trace_end() - void trace_begin( - ffi.Pointer name, - ) { - return _trace_begin( - name, - ); - } - - late final _trace_beginPtr = - _lookup)>>( - 'trace_begin'); - late final _trace_begin = - _trace_beginPtr.asFunction)>(); - - /// @brief Writes a trace event to indicate that the synchronous event has ended. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif - /// @remarks trace_end() ends the most recently called trace_begin(). - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @exception TRACE_ERROR_NONE Success - /// @exception TRACE_ERROR_IO_ERROR I/O error - /// @see trace_begin() - void trace_end() { - return _trace_end(); - } - - late final _trace_endPtr = - _lookup>('trace_end'); - late final _trace_end = _trace_endPtr.asFunction(); - - /// @brief Writes a trace event to indicate that an asynchronous event has begun. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] cookie An unique identifier for distinguishing simultaneous events - /// @param[in] name The name of event (optionally containing format specifiers) - /// @exception TRACE_ERROR_NONE Success - /// @exception TRACE_ERROR_IO_ERROR I/O error - /// @see trace_async_end() - void trace_async_begin( - int cookie, - ffi.Pointer name, - ) { - return _trace_async_begin( - cookie, - name, - ); - } - - late final _trace_async_beginPtr = _lookup< - ffi - .NativeFunction)>>( - 'trace_async_begin'); - late final _trace_async_begin = _trace_async_beginPtr - .asFunction)>(); - - /// @brief Writes a trace event to indicate that the asynchronous event has ended. - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif - /// @remarks trace_async_end() ends matched trace_async_begin() which has same cookie and name. - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] cookie An unique identifier for distinguishing simultaneous events - /// @param[in] name The name of event (optionally containing format specifiers) - /// @exception TRACE_ERROR_NONE Success - /// @exception TRACE_ERROR_IO_ERROR I/O error - /// @see trace_async_begin() - void trace_async_end( - int cookie, - ffi.Pointer name, - ) { - return _trace_async_end( - cookie, - name, - ); - } - - late final _trace_async_endPtr = _lookup< - ffi - .NativeFunction)>>( - 'trace_async_end'); - late final _trace_async_end = _trace_async_endPtr - .asFunction)>(); - - /// @brief Writes a trace event to track change of integer counter - /// - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif - /// @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - /// @param[in] value The counter value - /// @param[in] name The name of event (optionally containing format specifiers) - /// @exception TRACE_ERROR_NONE Success - /// @exception TRACE_ERROR_IO_ERROR I/O error - void trace_update_counter( - int value, - ffi.Pointer name, - ) { - return _trace_update_counter( - value, - name, - ); - } - - late final _trace_update_counterPtr = _lookup< - ffi - .NativeFunction)>>( - 'trace_update_counter'); - late final _trace_update_counter = _trace_update_counterPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_MODULE - /// @brief Initializes usb_host context. - /// @details This function must be called before any other function from this module. - /// @since_tizen 3.0 - /// @remarks @a ctx should be destroyed by calling usb_host_destroy() when no longer needed. - /// @param[out] ctx Context pointer - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NONE Successful - /// @post usb_host_destroy() should be called to free resources allocated for ctx by this function. - int usb_host_create( - ffi.Pointer ctx, - ) { - return _usb_host_create( - ctx, - ); - } - - late final _usb_host_createPtr = _lookup< - ffi - .NativeFunction)>>( - 'usb_host_create'); - late final _usb_host_create = _usb_host_createPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_MODULE - /// @brief Deinitializes usb_host context. - /// @details This function must be called after closing all devices - /// and before application close. It has to be called to clean - /// the memory used by library. - /// @since_tizen 3.0 - /// @param[in] ctx Context to deinitialize - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Success - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @pre Context must be initialized by usb_host_create(). - int usb_host_destroy( - usb_host_context_h ctx, - ) { - return _usb_host_destroy( - ctx, - ); - } - - late final _usb_host_destroyPtr = - _lookup>( - 'usb_host_destroy'); - late final _usb_host_destroy = - _usb_host_destroyPtr.asFunction(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets USB device list. - /// @details This function returns list of USB devices attached to system. - /// To free obtained device list usb_host_free_device_list() should be used, this - /// function can also unref devices. Do not unref device and then open it. - /// - /// All devices have reference counter. Functions usb_host_ref_device() and - /// usb_host_unref_device() are used to ref or unref device. When ref counter - /// reaches 0 device will be freed. - /// Devices reached by calling usb_host_get_device_list() have a reference count of - /// 1, and usb_host_free_device_list() can optionally decrease the reference count - /// on all devices in the list. usb_host_device_open() adds another reference which is - /// later destroyed by usb_host_device_close(). - /// - /// @since_tizen 3.0 - /// @param[in] ctx Context handle - /// @param[out] devs An array of devices - /// @param[out] length Number of devices - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Operation not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @post @a devs must be freed with usb_host_free_device_list() when no longer needed. - int usb_host_get_device_list( - usb_host_context_h ctx, - ffi.Pointer> devs, - ffi.Pointer length, - ) { - return _usb_host_get_device_list( - ctx, - devs, - length, - ); - } - - late final _usb_host_get_device_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - usb_host_context_h, - ffi.Pointer>, - ffi.Pointer)>>('usb_host_get_device_list'); - late final _usb_host_get_device_list = - _usb_host_get_device_listPtr.asFunction< - int Function( - usb_host_context_h, - ffi.Pointer>, - ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Frees devices list. - /// @details This function needs to be called to free device list. This - /// function can also unref devices if unref_devices is set to non-zero value. - /// Do not unref device and then open it. - /// @since_tizen 3.0 - /// @param[in] devs List of devices - /// @param[in] unref_devices Set to true to unreference devices, set to false to not unref - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @pre usb_host_get_device_list() must be called before using this function. - int usb_host_free_device_list( - ffi.Pointer devs, - bool unref_devices, - ) { - return _usb_host_free_device_list( - devs, - unref_devices, - ); - } - - late final _usb_host_free_device_listPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Bool)>>('usb_host_free_device_list'); - late final _usb_host_free_device_list = _usb_host_free_device_listPtr - .asFunction, bool)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Refs a device. - /// @details Increment ref count of device. - /// @since_tizen 3.0 - /// @param[in] dev Device to reference - /// @return 0 on success, error code otherwise - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_ref_device( - usb_host_device_h dev, - ) { - return _usb_host_ref_device( - dev, - ); - } - - late final _usb_host_ref_devicePtr = - _lookup>( - 'usb_host_ref_device'); - late final _usb_host_ref_device = - _usb_host_ref_devicePtr.asFunction(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Unrefs a device. - /// @details Decrements ref count of device. If ref count reaches zero, - /// device will be destroyed. - /// @since_tizen 3.0 - /// @param[in] dev Device to unreference - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_unref_device( - usb_host_device_h dev, - ) { - return _usb_host_unref_device( - dev, - ); - } - - late final _usb_host_unref_devicePtr = - _lookup>( - 'usb_host_unref_device'); - late final _usb_host_unref_device = - _usb_host_unref_devicePtr.asFunction(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Opens a device. - /// @details This function opens a device, which allows performing operations on it - /// (including transfer operations and strings introspection). - /// @since_tizen 3.0 - /// @param[in] dev Device to open - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_OUT_OF_MEMORY Memory allocation failure - /// @retval #USB_HOST_ERROR_NO_SUCH_DEVICE There is no device connected - /// @retval #USB_HOST_ERROR_PERMISSION_DENIED No proper permission to access device - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Operation not supported - /// @see usb_host_is_device_opened() - int usb_host_device_open( - usb_host_device_h dev, - ) { - return _usb_host_device_open( - dev, - ); - } - - late final _usb_host_device_openPtr = - _lookup>( - 'usb_host_device_open'); - late final _usb_host_device_open = - _usb_host_device_openPtr.asFunction(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Closes device. - /// @details Function should be called before usb_host_destroy(). - /// It destroys reference that was added by usb_host_device_open(). - /// @since_tizen 3.0 - /// @param[in] dev Device that should be closed - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_DEVICE_NOT_OPENED If device is not opened - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_device_close( - usb_host_device_h dev, - ) { - return _usb_host_device_close( - dev, - ); - } - - late final _usb_host_device_closePtr = - _lookup>( - 'usb_host_device_close'); - late final _usb_host_device_close = - _usb_host_device_closePtr.asFunction(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Opens device with valid idVendor and idProduct. - /// @details This function can be used to open device with known idVendor and - /// idProduct. If two or more devices have same vendor and product id only - /// first will be opened. - /// @since_tizen 3.0 - /// @param[in] ctx Context - /// @param[in] vendor_id idVendor of connected device - /// @param[in] product_id idProduct of connected device - /// @param[out] device_handle Opened device handle - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_OUT_OF_MEMORY Insufficient memory - /// @retval #USB_HOST_ERROR_NO_SUCH_DEVICE No device - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_device_open_with_vid_pid( - usb_host_context_h ctx, - int vendor_id, - int product_id, - ffi.Pointer device_handle, - ) { - return _usb_host_device_open_with_vid_pid( - ctx, - vendor_id, - product_id, - device_handle, - ); - } - - late final _usb_host_device_open_with_vid_pidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_context_h, ffi.Int, ffi.Int, - ffi.Pointer)>>( - 'usb_host_device_open_with_vid_pid'); - late final _usb_host_device_open_with_vid_pid = - _usb_host_device_open_with_vid_pidPtr.asFunction< - int Function( - usb_host_context_h, int, int, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets bus number. - /// @details Gets device bus number. This is number of the bus - /// that device is connected to. - /// @since_tizen 3.0 - /// @param[in] dev Device handle - /// @param[out] bus_number Device bus number - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - int usb_host_device_get_bus_number( - usb_host_device_h dev, - ffi.Pointer bus_number, - ) { - return _usb_host_device_get_bus_number( - dev, - bus_number, - ); - } - - late final _usb_host_device_get_bus_numberPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, - ffi.Pointer)>>('usb_host_device_get_bus_number'); - late final _usb_host_device_get_bus_number = - _usb_host_device_get_bus_numberPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets address. - /// @details Gets device address. This is address of device on the bus - /// that device is connected to. - /// @since_tizen 3.0 - /// @param[in] dev Device - /// @param[out] device_address Device address - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - int usb_host_device_get_address( - usb_host_device_h dev, - ffi.Pointer device_address, - ) { - return _usb_host_device_get_address( - dev, - device_address, - ); - } - - late final _usb_host_device_get_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, - ffi.Pointer)>>('usb_host_device_get_address'); - late final _usb_host_device_get_address = _usb_host_device_get_addressPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets list of port numbers. - /// @details Gets list of all port numbers from a device. - /// @since_tizen 3.0 - /// @param[in] dev Device - /// @param[out] port_numbers Array to be filled with port numbers - /// @param[in] port_numbers_len Max length of array - /// @param[out] ports_count Number of all ports obtained from device - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_OUT_OF_MEMORY Insufficient memory - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - int usb_host_device_get_port_numbers( - usb_host_device_h dev, - ffi.Pointer port_numbers, - int port_numbers_len, - ffi.Pointer ports_count, - ) { - return _usb_host_device_get_port_numbers( - dev, - port_numbers, - port_numbers_len, - ports_count, - ); - } - - late final _usb_host_device_get_port_numbersPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, ffi.Pointer, ffi.Int, - ffi.Pointer)>>('usb_host_device_get_port_numbers'); - late final _usb_host_device_get_port_numbers = - _usb_host_device_get_port_numbersPtr.asFunction< - int Function(usb_host_device_h, ffi.Pointer, int, - ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets a configuration. - /// @details Gets a USB configuration from a device. - /// @since_tizen 3.0 - /// @remarks @a config must be freed with usb_host_config_destroy(). - /// @param[in] dev Device - /// @param[in] config_index index of configuration to retrieve (counting from 0) - /// @param[out] config Output location for USB configuration - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_FOUND The configuration does not exist - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @post Returned configuration should be destroyed by usb_host_config_destroy() - /// when no longer needed. - int usb_host_device_get_config( - usb_host_device_h dev, - int config_index, - ffi.Pointer config, - ) { - return _usb_host_device_get_config( - dev, - config_index, - config, - ); - } - - late final _usb_host_device_get_configPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, ffi.Int, - ffi.Pointer)>>('usb_host_device_get_config'); - late final _usb_host_device_get_config = - _usb_host_device_get_configPtr.asFunction< - int Function( - usb_host_device_h, int, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets an active config. - /// @details Gets handle to active configuration. - /// This function will return 0 value in config parameter :if device is unconfigured. - /// @since_tizen 3.0 - /// @param[in] dev A device - /// @param[out] config Handle to active configuration - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NO_SUCH_DEVICE the dev has been disconnected - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_DEVICE_NOT_OPENED The device was not opened - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @post Obtained configuration should be destroyed by usb_host_config_destroy() - /// when no longer needed. - int usb_host_get_active_config( - usb_host_device_h dev, - ffi.Pointer config, - ) { - return _usb_host_get_active_config( - dev, - config, - ); - } - - late final _usb_host_get_active_configPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, - ffi.Pointer)>>('usb_host_get_active_config'); - late final _usb_host_get_active_config = - _usb_host_get_active_configPtr.asFunction< - int Function(usb_host_device_h, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Sets a configuration. - /// @details Set active configuration for a device. - /// @since_tizen 3.0 - /// @param[in] configuration Handle to configuration to be activated - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_FOUND Requested configuration does not exist - /// @retval #USB_HOST_ERROR_RESOURCE_BUSY Interfaces are currently claimed - /// @retval #USB_HOST_ERROR_NO_SUCH_DEVICE The device has been disconnected - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_DEVICE_NOT_OPENED The device was not opened - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - int usb_host_set_config( - usb_host_config_h configuration, - ) { - return _usb_host_set_config( - configuration, - ); - } - - late final _usb_host_set_configPtr = - _lookup>( - 'usb_host_set_config'); - late final _usb_host_set_config = - _usb_host_set_configPtr.asFunction(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Puts a device in unconfigured state. - /// @since_tizen 4.0 - /// @param[in] dev Device to be unconfigured - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_RESOURCE_BUSY Interfaces are currently claimed - /// @retval #USB_HOST_ERROR_NO_SUCH_DEVICE Device has been disconnected - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_device_unconfigure( - usb_host_device_h dev, - ) { - return _usb_host_device_unconfigure( - dev, - ); - } - - late final _usb_host_device_unconfigurePtr = - _lookup>( - 'usb_host_device_unconfigure'); - late final _usb_host_device_unconfigure = _usb_host_device_unconfigurePtr - .asFunction(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets USB specification release number. - /// @details Gets binary-coded decimal USB specification release number. - /// This value is equal to bcdUSB field of device descriptor. See USB specification - /// for more info. - /// @since_tizen 3.0 - /// @param[in] dev A device - /// @param[out] bcd_usb Bcd release number of USB - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_device_get_bcd_usb( - usb_host_device_h dev, - ffi.Pointer bcd_usb, - ) { - return _usb_host_device_get_bcd_usb( - dev, - bcd_usb, - ); - } - - late final _usb_host_device_get_bcd_usbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, - ffi.Pointer)>>('usb_host_device_get_bcd_usb'); - late final _usb_host_device_get_bcd_usb = _usb_host_device_get_bcd_usbPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets device class. - /// @since_tizen 3.0 - /// @param[in] dev A device - /// @param[out] device_class Device class - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_device_get_class( - usb_host_device_h dev, - ffi.Pointer device_class, - ) { - return _usb_host_device_get_class( - dev, - device_class, - ); - } - - late final _usb_host_device_get_classPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, - ffi.Pointer)>>('usb_host_device_get_class'); - late final _usb_host_device_get_class = _usb_host_device_get_classPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets device sub class. - /// @since_tizen 3.0 - /// @param[in] dev A device - /// @param[out] subclass Device subclass - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_device_get_sub_class( - usb_host_device_h dev, - ffi.Pointer subclass, - ) { - return _usb_host_device_get_sub_class( - dev, - subclass, - ); - } - - late final _usb_host_device_get_sub_classPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, - ffi.Pointer)>>('usb_host_device_get_sub_class'); - late final _usb_host_device_get_sub_class = _usb_host_device_get_sub_classPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets device protocol. - /// @since_tizen 3.0 - /// @param[in] dev A device - /// @param[out] protocol Device protocol - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_device_get_protocol( - usb_host_device_h dev, - ffi.Pointer protocol, - ) { - return _usb_host_device_get_protocol( - dev, - protocol, - ); - } - - late final _usb_host_device_get_protocolPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, - ffi.Pointer)>>('usb_host_device_get_protocol'); - late final _usb_host_device_get_protocol = _usb_host_device_get_protocolPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets maximum packet size for endpoint 0. - /// @since_tizen 3.0 - /// @param[in] dev A device - /// @param[out] max_packet_size Maximum size of single packet, in bytes - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_device_get_max_packet_size_0( - usb_host_device_h dev, - ffi.Pointer max_packet_size, - ) { - return _usb_host_device_get_max_packet_size_0( - dev, - max_packet_size, - ); - } - - late final _usb_host_device_get_max_packet_size_0Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, - ffi.Pointer)>>('usb_host_device_get_max_packet_size_0'); - late final _usb_host_device_get_max_packet_size_0 = - _usb_host_device_get_max_packet_size_0Ptr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets vendor id. - /// @since_tizen 3.0 - /// @param[in] dev A device - /// @param[out] vendor_id Vendor id of @a dev - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_device_get_id_vendor( - usb_host_device_h dev, - ffi.Pointer vendor_id, - ) { - return _usb_host_device_get_id_vendor( - dev, - vendor_id, - ); - } - - late final _usb_host_device_get_id_vendorPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, - ffi.Pointer)>>('usb_host_device_get_id_vendor'); - late final _usb_host_device_get_id_vendor = _usb_host_device_get_id_vendorPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets product id. - /// @since_tizen 3.0 - /// @param[in] dev A device - /// @param[out] product_id Product id of @a dev - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_device_get_id_product( - usb_host_device_h dev, - ffi.Pointer product_id, - ) { - return _usb_host_device_get_id_product( - dev, - product_id, - ); - } - - late final _usb_host_device_get_id_productPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, - ffi.Pointer)>>('usb_host_device_get_id_product'); - late final _usb_host_device_get_id_product = - _usb_host_device_get_id_productPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets device release number in binary-coded decimal. - /// @since_tizen 3.0 - /// @param[in] dev A device - /// @param[out] device_bcd Device release number - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_device_get_bcd_device( - usb_host_device_h dev, - ffi.Pointer device_bcd, - ) { - return _usb_host_device_get_bcd_device( - dev, - device_bcd, - ); - } - - late final _usb_host_device_get_bcd_devicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, - ffi.Pointer)>>('usb_host_device_get_bcd_device'); - late final _usb_host_device_get_bcd_device = - _usb_host_device_get_bcd_devicePtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets number of configurations for given device. - /// @since_tizen 3.0 - /// @param[in] dev A device - /// @param[out] num_configurations Number of configurations for given device - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_device_get_num_configurations( - usb_host_device_h dev, - ffi.Pointer num_configurations, - ) { - return _usb_host_device_get_num_configurations( - dev, - num_configurations, - ); - } - - late final _usb_host_device_get_num_configurationsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, - ffi.Pointer)>>('usb_host_device_get_num_configurations'); - late final _usb_host_device_get_num_configurations = - _usb_host_device_get_num_configurationsPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Checks if device is opened. - /// @since_tizen 3.0 - /// @param[in] dev A device - /// @param[out] is_opened True if device is opened, false otherwise - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_is_device_opened( - usb_host_device_h dev, - ffi.Pointer is_opened, - ) { - return _usb_host_is_device_opened( - dev, - is_opened, - ); - } - - late final _usb_host_is_device_openedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, - ffi.Pointer)>>('usb_host_is_device_opened'); - late final _usb_host_is_device_opened = _usb_host_is_device_openedPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets string describing device manufacturer, in ASCII. - /// @since_tizen 3.0 - /// @param[in] dev A handle to opened device - /// @param[in, out] length Data buffer size/how much was actually used - /// @param[out] data Buffer to store string - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_OVERFLOW There was no space in buffer - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @pre dev must point to device opened by usb_host_device_open() or usb_host_device_open_with_vid_pid(). - int usb_host_device_get_manufacturer_str( - usb_host_device_h dev, - ffi.Pointer length, - ffi.Pointer data, - ) { - return _usb_host_device_get_manufacturer_str( - dev, - length, - data, - ); - } - - late final _usb_host_device_get_manufacturer_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, ffi.Pointer, - ffi.Pointer)>>( - 'usb_host_device_get_manufacturer_str'); - late final _usb_host_device_get_manufacturer_str = - _usb_host_device_get_manufacturer_strPtr.asFunction< - int Function(usb_host_device_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets product string of device, in ASCII. - /// @since_tizen 3.0 - /// @param[in] dev A handle to opened device - /// @param[in, out] length Data buffer size/how much was actually used - /// @param[out] data Buffer to store string - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_OVERFLOW There was no space in buffer - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @pre dev must point to device opened by usb_host_device_open() or usb_host_device_open_with_vid_pid(). - int usb_host_device_get_product_str( - usb_host_device_h dev, - ffi.Pointer length, - ffi.Pointer data, - ) { - return _usb_host_device_get_product_str( - dev, - length, - data, - ); - } - - late final _usb_host_device_get_product_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, ffi.Pointer, - ffi.Pointer)>>( - 'usb_host_device_get_product_str'); - late final _usb_host_device_get_product_str = - _usb_host_device_get_product_strPtr.asFunction< - int Function(usb_host_device_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_DEV_MODULE - /// @brief Gets serial number of a device, in ASCII. - /// @since_tizen 3.0 - /// @param[in] dev A handle to opened device - /// @param[in, out] length Data buffer size/how much was actually used - /// @param[out] data Buffer to store string - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_OVERFLOW There was no space in buffer - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @pre dev must point to device opened by usb_host_device_open() or usb_host_device_open_with_vid_pid(). - int usb_host_device_get_serial_number_str( - usb_host_device_h dev, - ffi.Pointer length, - ffi.Pointer data, - ) { - return _usb_host_device_get_serial_number_str( - dev, - length, - data, - ); - } - - late final _usb_host_device_get_serial_number_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_device_h, ffi.Pointer, - ffi.Pointer)>>( - 'usb_host_device_get_serial_number_str'); - late final _usb_host_device_get_serial_number_str = - _usb_host_device_get_serial_number_strPtr.asFunction< - int Function(usb_host_device_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_CONFIG_MODULE - /// @brief Gets number of interfaces for given configuration. - /// @since_tizen 3.0 - /// @param[in] config A configuration - /// @param[out] num_interfaces Number of interfaces - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_config_get_num_interfaces( - usb_host_config_h config, - ffi.Pointer num_interfaces, - ) { - return _usb_host_config_get_num_interfaces( - config, - num_interfaces, - ); - } - - late final _usb_host_config_get_num_interfacesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_config_h, - ffi.Pointer)>>('usb_host_config_get_num_interfaces'); - late final _usb_host_config_get_num_interfaces = - _usb_host_config_get_num_interfacesPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_CONFIG_MODULE - /// @brief Checks if device is self-powered in given configuration. - /// @since_tizen 3.0 - /// @param[in] config A configuration - /// @param[out] self_powered True if device is self-powered in given configuration, - /// false otherwise - /// @return 0 on success, negative error code otherwise - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - int usb_host_config_is_self_powered( - usb_host_config_h config, - ffi.Pointer self_powered, - ) { - return _usb_host_config_is_self_powered( - config, - self_powered, - ); - } - - late final _usb_host_config_is_self_poweredPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_config_h, - ffi.Pointer)>>('usb_host_config_is_self_powered'); - late final _usb_host_config_is_self_powered = - _usb_host_config_is_self_poweredPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_CONFIG_MODULE - /// @brief Checks if device in given configuration supports remote wakeup. - /// @since_tizen 3.0 - /// @param[in] config A configuration - /// @param[out] remote_wakeup True if device supports remote wakeup in given configuration, - /// false otherwise - /// @return 0 on success, negative error code otherwise - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval @USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - int usb_host_config_support_remote_wakeup( - usb_host_config_h config, - ffi.Pointer remote_wakeup, - ) { - return _usb_host_config_support_remote_wakeup( - config, - remote_wakeup, - ); - } - - late final _usb_host_config_support_remote_wakeupPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_config_h, - ffi.Pointer)>>('usb_host_config_support_remote_wakeup'); - late final _usb_host_config_support_remote_wakeup = - _usb_host_config_support_remote_wakeupPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_CONFIG_MODULE - /// @brief Gets maximum power in given configuration, in mA. - /// @since_tizen 3.0 - /// @param[in] config A configuration - /// @param[out] max_power Maximum power, in mA - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_config_get_max_power( - usb_host_config_h config, - ffi.Pointer max_power, - ) { - return _usb_host_config_get_max_power( - config, - max_power, - ); - } - - late final _usb_host_config_get_max_powerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_config_h, - ffi.Pointer)>>('usb_host_config_get_max_power'); - late final _usb_host_config_get_max_power = _usb_host_config_get_max_powerPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_CONFIG_MODULE - /// @brief Gets string describing a configuration. - /// @since_tizen 3.0 - /// @param[in] config A configuration - /// @param[in, out] length Data buffer size/how much was actually used - /// @param[out] data Buffer to store string - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_OVERFLOW There was no space in buffer - /// @retval #USB_HOST_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @pre config must be configuration of device opened by usb_host_device_open() or - /// usb_host_device_open_with_vid_pid() - int usb_host_device_get_config_str( - usb_host_config_h config, - ffi.Pointer length, - ffi.Pointer data, - ) { - return _usb_host_device_get_config_str( - config, - length, - data, - ); - } - - late final _usb_host_device_get_config_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_config_h, ffi.Pointer, - ffi.Pointer)>>( - 'usb_host_device_get_config_str'); - late final _usb_host_device_get_config_str = - _usb_host_device_get_config_strPtr.asFunction< - int Function(usb_host_config_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_CONFIG_MODULE - /// @brief Gets an interface from configuration. - /// @details Gets a USB interface from configuration by its index. - /// @since_tizen 3.0 - /// @param[in] config Configuration handle - /// @param[in] interface_index index of interface to retrieve (counting from 0) - /// @param[out] interface Interface handle - /// @remarks There is no need to destroy the @a interface handle. It is no longer valid - /// when config is destroyed. - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_FOUND Configuration does not exist - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_config_get_interface( - usb_host_config_h config, - int interface_index, - ffi.Pointer interface1, - ) { - return _usb_host_config_get_interface( - config, - interface_index, - interface1, - ); - } - - late final _usb_host_config_get_interfacePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_config_h, ffi.Int, - ffi.Pointer)>>( - 'usb_host_config_get_interface'); - late final _usb_host_config_get_interface = - _usb_host_config_get_interfacePtr.asFunction< - int Function( - usb_host_config_h, int, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_CONFIG_MODULE - /// @brief Frees configuration. - /// @details Frees configuration obtained from usb_host_device_get_config(). - /// @since_tizen 3.0 - /// @param[in] config Configuration to free - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @pre config must be obtained by usb_host_device_get_config(). - int usb_host_config_destroy( - usb_host_config_h config, - ) { - return _usb_host_config_destroy( - config, - ); - } - - late final _usb_host_config_destroyPtr = - _lookup>( - 'usb_host_config_destroy'); - late final _usb_host_config_destroy = - _usb_host_config_destroyPtr.asFunction(); - - /// @ingroup CAPI_USB_HOST_INTERFACE_MODULE - /// @brief Claims interface. - /// @details Claims interface on a device. - /// To perform I/O operations on interface user has to claim it. - /// Remember to call usb_host_release_interface() when communication - /// with the device is finished. - /// @since_tizen 3.0 - /// @param[in] interface The bInterfaceNumber of interface to claim - /// @param[in] force Set to true to auto detach kernel driver, set to false to not detach it - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_FOUND Requested interface does not exist - /// @retval #USB_HOST_ERROR_RESOURCE_BUSY Another program or driver has claimed the - /// interface - /// @retval #USB_HOST_ERROR_NO_SUCH_DEVICE Device has been disconnected - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_DEVICE_NOT_OPENED The device was not opened - int usb_host_claim_interface( - usb_host_interface_h interface1, - bool force, - ) { - return _usb_host_claim_interface( - interface1, - force, - ); - } - - late final _usb_host_claim_interfacePtr = _lookup< - ffi.NativeFunction>( - 'usb_host_claim_interface'); - late final _usb_host_claim_interface = _usb_host_claim_interfacePtr - .asFunction(); - - /// @ingroup CAPI_USB_HOST_INTERFACE_MODULE - /// @brief Releases interface. - /// @details Releases interface previously claimed by usb_host_claim_interface(). - /// This is a blocking function. - /// @since_tizen 3.0 - /// @param[in] interface The bInterfaceNumber of interface to release - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_FOUND Interface was not claimed - /// @retval #USB_HOST_ERROR_NO_SUCH_DEVICE Device has been disconnected - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_DEVICE_NOT_OPENED The device was not opened - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - int usb_host_release_interface( - usb_host_interface_h interface1, - ) { - return _usb_host_release_interface( - interface1, - ); - } - - late final _usb_host_release_interfacePtr = - _lookup>( - 'usb_host_release_interface'); - late final _usb_host_release_interface = _usb_host_release_interfacePtr - .asFunction(); - - /// @ingroup CAPI_USB_HOST_INTERFACE_MODULE - /// @brief Gets number of given interface. - /// @since_tizen 3.0 - /// @param[in] interface An interface - /// @param[out] number Number of given interface - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_interface_get_number( - usb_host_interface_h interface1, - ffi.Pointer number, - ) { - return _usb_host_interface_get_number( - interface1, - number, - ); - } - - late final _usb_host_interface_get_numberPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_interface_h, - ffi.Pointer)>>('usb_host_interface_get_number'); - late final _usb_host_interface_get_number = _usb_host_interface_get_numberPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_INTERFACE_MODULE - /// @brief Gets number of endpoints in given interface. - /// @since_tizen 3.0 - /// @param[in] interface An interface - /// @param[out] num_endpoints Number of endpoints in @a interface - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_interface_get_num_endpoints( - usb_host_interface_h interface1, - ffi.Pointer num_endpoints, - ) { - return _usb_host_interface_get_num_endpoints( - interface1, - num_endpoints, - ); - } - - late final _usb_host_interface_get_num_endpointsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_interface_h, - ffi.Pointer)>>('usb_host_interface_get_num_endpoints'); - late final _usb_host_interface_get_num_endpoints = - _usb_host_interface_get_num_endpointsPtr.asFunction< - int Function(usb_host_interface_h, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_INTERFACE_MODULE - /// @brief Gets an endpoint from interface. - /// @details Get a USB endpoint from interface by its index. - /// @since_tizen 3.0 - /// @param[in] interface Interface handle - /// @param[in] ep_index index of endpoint to retrieve (counting from 0) - /// @param[out] ep Endpoint handle - /// @remarks @a ep handle is no longer valid when config will be destroyed. There is no need to destroy it, - /// it is done automatically when the configuration is destroyed. - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_interface_get_endpoint( - usb_host_interface_h interface1, - int ep_index, - ffi.Pointer ep, - ) { - return _usb_host_interface_get_endpoint( - interface1, - ep_index, - ep, - ); - } - - late final _usb_host_interface_get_endpointPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_interface_h, ffi.Int, - ffi.Pointer)>>( - 'usb_host_interface_get_endpoint'); - late final _usb_host_interface_get_endpoint = - _usb_host_interface_get_endpointPtr.asFunction< - int Function( - usb_host_interface_h, int, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_INTERFACE_MODULE - /// @brief Sets alternative setting for interface. - /// @since_tizen 3.0 - /// @param[in] interface Interface handle - /// @param[in] altsetting Index of new alternative setting for given interface - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_interface_set_altsetting( - usb_host_interface_h interface1, - int altsetting, - ) { - return _usb_host_interface_set_altsetting( - interface1, - altsetting, - ); - } - - late final _usb_host_interface_set_altsettingPtr = _lookup< - ffi.NativeFunction>( - 'usb_host_interface_set_altsetting'); - late final _usb_host_interface_set_altsetting = - _usb_host_interface_set_altsettingPtr - .asFunction(); - - /// @ingroup CAPI_USB_HOST_INTERFACE_MODULE - /// @brief Gets current alternative setting from an interface. - /// @since_tizen 4.0 - /// @param[in] interface Interface handle - /// @param[out] altsetting Index of alternative setting set for the given interface - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_interface_get_altsetting( - usb_host_interface_h interface1, - ffi.Pointer altsetting, - ) { - return _usb_host_interface_get_altsetting( - interface1, - altsetting, - ); - } - - late final _usb_host_interface_get_altsettingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_interface_h, - ffi.Pointer)>>('usb_host_interface_get_altsetting'); - late final _usb_host_interface_get_altsetting = - _usb_host_interface_get_altsettingPtr.asFunction< - int Function(usb_host_interface_h, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_INTERFACE_MODULE - /// @brief Gets string describing an interface. - /// @since_tizen 3.0 - /// @param[in] interface An interface - /// @param[in, out] length Data buffer size/how much was actually used - /// @param[out] data Buffer to store string - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_OVERFLOW There was no space in buffer - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @pre device which interface is part of must be opened by usb_host_device_open() or - /// usb_host_device_open_with_vid_pid() - int usb_host_interface_get_str( - usb_host_interface_h interface1, - ffi.Pointer length, - ffi.Pointer data, - ) { - return _usb_host_interface_get_str( - interface1, - length, - data, - ); - } - - late final _usb_host_interface_get_strPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_interface_h, ffi.Pointer, - ffi.Pointer)>>('usb_host_interface_get_str'); - late final _usb_host_interface_get_str = - _usb_host_interface_get_strPtr.asFunction< - int Function(usb_host_interface_h, ffi.Pointer, - ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_ENDPOINT_MODULE - /// @brief Gets number of given endpoint. - /// @since_tizen 3.0 - /// @param[in] ep An endpoint - /// @param[out] number Number of given endpoint - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_endpoint_get_number( - usb_host_endpoint_h ep, - ffi.Pointer number, - ) { - return _usb_host_endpoint_get_number( - ep, - number, - ); - } - - late final _usb_host_endpoint_get_numberPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_endpoint_h, - ffi.Pointer)>>('usb_host_endpoint_get_number'); - late final _usb_host_endpoint_get_number = _usb_host_endpoint_get_numberPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_ENDPOINT_MODULE - /// @brief Gets direction of an endpoint. - /// @since_tizen 3.0 - /// @param[in] ep An endpoint - /// @param[out] direction Direction of endpoint (a value from enum #usb_host_endpoint_direction_e) - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_endpoint_get_direction( - usb_host_endpoint_h ep, - ffi.Pointer direction, - ) { - return _usb_host_endpoint_get_direction( - ep, - direction, - ); - } - - late final _usb_host_endpoint_get_directionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_endpoint_h, - ffi.Pointer)>>('usb_host_endpoint_get_direction'); - late final _usb_host_endpoint_get_direction = - _usb_host_endpoint_get_directionPtr.asFunction< - int Function(usb_host_endpoint_h, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_ENDPOINT_MODULE - /// @brief Gets transfer type of given endpoint. - /// @since_tizen 3.0 - /// @param[in] ep An endpoint - /// @param[out] transfer_type Transfer type (a value from enum #usb_host_transfer_type_e) - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_endpoint_get_transfer_type( - usb_host_endpoint_h ep, - ffi.Pointer transfer_type, - ) { - return _usb_host_endpoint_get_transfer_type( - ep, - transfer_type, - ); - } - - late final _usb_host_endpoint_get_transfer_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_endpoint_h, - ffi.Pointer)>>('usb_host_endpoint_get_transfer_type'); - late final _usb_host_endpoint_get_transfer_type = - _usb_host_endpoint_get_transfer_typePtr.asFunction< - int Function(usb_host_endpoint_h, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_ENDPOINT_MODULE - /// @brief Gets synchronization type of given endpoint. - /// @since_tizen 3.0 - /// @param[in] ep An endpoint - /// @param[out] synch_type Synch type (a value from enum #usb_host_iso_sync_type_e) - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_endpoint_get_synch_type( - usb_host_endpoint_h ep, - ffi.Pointer synch_type, - ) { - return _usb_host_endpoint_get_synch_type( - ep, - synch_type, - ); - } - - late final _usb_host_endpoint_get_synch_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_endpoint_h, - ffi.Pointer)>>('usb_host_endpoint_get_synch_type'); - late final _usb_host_endpoint_get_synch_type = - _usb_host_endpoint_get_synch_typePtr.asFunction< - int Function(usb_host_endpoint_h, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_ENDPOINT_MODULE - /// @brief Gets usage type of given endpoint. - /// @since_tizen 3.0 - /// @param[in] ep An endpoint - /// @param[out] usage_type Usage type (a value from enum #usb_host_usage_type_e) - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_endpoint_get_usage_type( - usb_host_endpoint_h ep, - ffi.Pointer usage_type, - ) { - return _usb_host_endpoint_get_usage_type( - ep, - usage_type, - ); - } - - late final _usb_host_endpoint_get_usage_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_endpoint_h, - ffi.Pointer)>>('usb_host_endpoint_get_usage_type'); - late final _usb_host_endpoint_get_usage_type = - _usb_host_endpoint_get_usage_typePtr.asFunction< - int Function(usb_host_endpoint_h, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_ENDPOINT_MODULE - /// @brief Gets max packet size of given endpoint. - /// @since_tizen 3.0 - /// @param[in] ep An endpoint - /// @param[out] max_packet_size Max packet size, in bytes - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_endpoint_get_max_packet_size( - usb_host_endpoint_h ep, - ffi.Pointer max_packet_size, - ) { - return _usb_host_endpoint_get_max_packet_size( - ep, - max_packet_size, - ); - } - - late final _usb_host_endpoint_get_max_packet_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_endpoint_h, - ffi.Pointer)>>('usb_host_endpoint_get_max_packet_size'); - late final _usb_host_endpoint_get_max_packet_size = - _usb_host_endpoint_get_max_packet_sizePtr.asFunction< - int Function(usb_host_endpoint_h, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_ENDPOINT_MODULE - /// @brief Gets interval for polling endpoint for data transfers. - /// @since_tizen 3.0 - /// @param[in] ep An endpoint - /// @param[out] interval Interval for polling, in frame counts (refer to USB protocol specification) - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_endpoint_get_interval( - usb_host_endpoint_h ep, - ffi.Pointer interval, - ) { - return _usb_host_endpoint_get_interval( - ep, - interval, - ); - } - - late final _usb_host_endpoint_get_intervalPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_endpoint_h, - ffi.Pointer)>>('usb_host_endpoint_get_interval'); - late final _usb_host_endpoint_get_interval = - _usb_host_endpoint_get_intervalPtr.asFunction< - int Function(usb_host_endpoint_h, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_SYNCIO_MODULE - /// @brief Performs USB control transfer. - /// @details For more explanation about the values please refer to USB protocol specification - /// @since_tizen 3.0 - /// @remarks The wValue, wIndex and wLength fields values should be given in host-endian - /// byte order. - /// @param[in] dev Device handle - /// @param[in] bm_request_type bmRequestType type field for the setup packet - /// @param[in] b_request bRequest field for the setup packet - /// @param[in] w_value wValue field for the setup packet - /// @param[in] w_index wIndex field for the setup packet - /// @param[in] data Suitably-sized data buffer for either input or output - /// (depending on direction bits within bmRequestType) - /// @param[in] w_length wLength field for the setup packet. The data buffer should - /// be at least this size - /// @param[in] timeout Timeout (in milliseconds) that this function should wait - /// before giving up due to no response being received. For an unlimited - /// @param[out] transferred Number of transferred bytes - /// timeout, 0 value should be used. - /// @return 0 on success, negative error code otherwise - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_TIMED_OUT Transfer timed out - /// @retval #USB_HOST_ERROR_BROKEN_PIPE Control request was not supported by the device - /// @retval #USB_HOST_ERROR_NO_SUCH_DEVICE The device has been disconnected - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_DEVICE_NOT_OPENED The device was not opened - /// @retval #USB_HOST_ERROR_OVERFLOW Device offered more data - /// @pre dev must point to device opened by usb_host_device_open() or usb_host_device_open_with_vid_pid() - int usb_host_control_transfer( - usb_host_device_h dev, - int bm_request_type, - int b_request, - int w_value, - int w_index, - ffi.Pointer data, - int w_length, - int timeout, - ffi.Pointer transferred, - ) { - return _usb_host_control_transfer( - dev, - bm_request_type, - b_request, - w_value, - w_index, - data, - w_length, - timeout, - transferred, - ); - } - - late final _usb_host_control_transferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - usb_host_device_h, - ffi.Uint8, - ffi.Uint8, - ffi.Uint16, - ffi.Uint16, - ffi.Pointer, - ffi.Uint16, - ffi.UnsignedInt, - ffi.Pointer)>>('usb_host_control_transfer'); - late final _usb_host_control_transfer = - _usb_host_control_transferPtr.asFunction< - int Function(usb_host_device_h, int, int, int, int, - ffi.Pointer, int, int, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_SYNCIO_MODULE - /// @brief Performs transfer on given endpoint. - /// @details Performs a USB transfer on given endpoint. Direction of transfer is - /// determined by the endpoint. - /// @since_tizen 3.0 - /// @param[in] ep Endpoint handle - /// @param[in] data Suitably-sized data buffer for either input or output - /// (depending on endpoint) - /// @param[in] length For writes, the number of bytes from data to be sent, for - /// reads the maximum number of bytes to receive into the data buffer - /// @param[out] transferred number of bytes actually transferred - /// @param[in] timeout Timeout (in milliseconds) that this function should wait - /// before giving up due to no response being received (for an unlimited - /// timeout 0 value should be used) - /// @return 0 on success (and populates @a transferred), negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_TIMED_OUT Transfer timed out - /// @retval #USB_HOST_ERROR_BROKEN_PIPE Endpoint halted - /// @retval #USB_HOST_ERROR_OVERFLOW Device offered more data - /// @retval #USB_HOST_ERROR_NO_SUCH_DEVICE Device has been disconnected - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_DEVICE_NOT_OPENED The device was not opened - /// @pre ep must be a valid endpoint received from usb_host_interface_get_endpoint(). - /// @pre ep must be an endpoint of device opened by usb_host_device_open() or - /// usb_host_device_open_with_vid_pid(). - int usb_host_transfer( - usb_host_endpoint_h ep, - ffi.Pointer data, - int length, - ffi.Pointer transferred, - int timeout, - ) { - return _usb_host_transfer( - ep, - data, - length, - transferred, - timeout, - ); - } - - late final _usb_host_transferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - usb_host_endpoint_h, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.UnsignedInt)>>('usb_host_transfer'); - late final _usb_host_transfer = _usb_host_transferPtr.asFunction< - int Function(usb_host_endpoint_h, ffi.Pointer, int, - ffi.Pointer, int)>(); - - /// @ingroup CAPI_USB_HOST_HOTPLUG_MODULE - /// @brief Sets a callback function to be invoked when a device is connected or disconnected. - /// @since_tizen 4.0 - /// @param[in] ctx Context handle - /// @param[in] cb The callback function to be registered - /// @param[in] event Event that will trigger registered callback - /// @param[in] user_data The user data to be passed to the callback function - /// @param[out] handle Handle of the registered callback - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_OUT_OF_MEMORY Out of memory - int usb_host_set_hotplug_cb( - usb_host_context_h ctx, - usb_host_hotplug_cb cb, - int event, - ffi.Pointer user_data, - ffi.Pointer handle, - ) { - return _usb_host_set_hotplug_cb( - ctx, - cb, - event, - user_data, - handle, - ); - } - - late final _usb_host_set_hotplug_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - usb_host_context_h, - usb_host_hotplug_cb, - ffi.Int32, - ffi.Pointer, - ffi.Pointer)>>('usb_host_set_hotplug_cb'); - late final _usb_host_set_hotplug_cb = _usb_host_set_hotplug_cbPtr.asFunction< - int Function(usb_host_context_h, usb_host_hotplug_cb, int, - ffi.Pointer, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_HOTPLUG_MODULE - /// @brief Unsets the hotplug callback function. - /// @since_tizen 4.0 - /// @param[in] handle Handle of the callback to be unregistered - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - int usb_host_unset_hotplug_cb( - usb_host_hotplug_h handle, - ) { - return _usb_host_unset_hotplug_cb( - handle, - ); - } - - late final _usb_host_unset_hotplug_cbPtr = - _lookup>( - 'usb_host_unset_hotplug_cb'); - late final _usb_host_unset_hotplug_cb = _usb_host_unset_hotplug_cbPtr - .asFunction(); - - /// @ingroup CAPI_USB_HOST_ASYNC_MODULE - /// @brief Prepares an asynchronous USB transfer. - /// @details This function prepares transfer handle for asynchronous communication. - /// Transfer handle can be used for multiple transfers after this initialization. - /// @since_tizen 5.0 - /// @param[in] ep Endpoint handle - /// @param[in] callback Callback to be called when transfer is finished - /// @param[in] data Suitably-sized data buffer, similar to synchronized transfer - /// @param[in] length For writes, the number of bytes from data to be sent; for - /// reads, the maximum number of bytes to receive into the data buffer - /// @param[in] user_data Pointer to data which will be passed to callback function later on - /// @param[in] timeout Timeout (in milliseconds) that transfer should wait before giving up - /// due to no response being received (for an unlimited timeout use value of 0) - /// @param[out] transfer Transfer handle - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_OUT_OF_MEMORY Out of memory - /// @pre @a ep must be a valid endpoint received from usb_host_interface_get_endpoint(). - /// @post @a transfer should be destroyed by calling usb_host_transfer_destroy() when it's no longer needed. - int usb_host_create_transfer( - usb_host_endpoint_h ep, - usb_host_transferred_cb callback, - ffi.Pointer data, - int length, - ffi.Pointer user_data, - int timeout, - ffi.Pointer transfer, - ) { - return _usb_host_create_transfer( - ep, - callback, - data, - length, - user_data, - timeout, - transfer, - ); - } - - late final _usb_host_create_transferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - usb_host_endpoint_h, - usb_host_transferred_cb, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.UnsignedInt, - ffi.Pointer)>>('usb_host_create_transfer'); - late final _usb_host_create_transfer = - _usb_host_create_transferPtr.asFunction< - int Function( - usb_host_endpoint_h, - usb_host_transferred_cb, - ffi.Pointer, - int, - ffi.Pointer, - int, - ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_ASYNC_MODULE - /// @brief Prepares an asynchronous USB isochronous transfer. - /// @details This function prepares transfer handle for asynchronous communication. - /// Usage is similar to usb_host_create_transfer(), except this function is intended for - /// isochronous endpoints. Transfer handle can be used for multiple transfers after this initialization. - /// Note however, that this function needs to allocate memory for @a num_iso_packets isochronous packets and - /// it will be the limit for number of them in this transfer. - /// @since_tizen 5.0 - /// @param[in] ep Endpoint handle - /// @param[in] callback Callback to be called when transfer is finished - /// @param[in] data Suitably-sized data buffer, similar to synchronized transfer - /// @param[in] length For writes, the number of bytes from data to be sent; for - /// reads, the maximum number of bytes to receive into the data buffer - /// @param[in] num_iso_packets Number of isochronous packets - /// @param[in] user_data Pointer to data which will be passed to callback function later on - /// @param[in] timeout Timeout (in milliseconds) that transfer should wait before giving up - /// due to no response being received (for an unlimited timeout use value of 0) - /// @param[out] transfer Transfer handle - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_OUT_OF_MEMORY Out of memory - /// @pre @a ep must be a valid endpoint received from usb_host_interface_get_endpoint(). - /// @post @a transfer should be destroyed by calling usb_host_transfer_destroy() when it's no longer needed. - int usb_host_create_isochronous_transfer( - usb_host_endpoint_h ep, - usb_host_transferred_cb callback, - ffi.Pointer data, - int length, - int num_iso_packets, - ffi.Pointer user_data, - int timeout, - ffi.Pointer transfer, - ) { - return _usb_host_create_isochronous_transfer( - ep, - callback, - data, - length, - num_iso_packets, - user_data, - timeout, - transfer, - ); - } - - late final _usb_host_create_isochronous_transferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - usb_host_endpoint_h, - usb_host_transferred_cb, - ffi.Pointer, - ffi.Int, - ffi.UnsignedInt, - ffi.Pointer, - ffi.UnsignedInt, - ffi.Pointer)>>( - 'usb_host_create_isochronous_transfer'); - late final _usb_host_create_isochronous_transfer = - _usb_host_create_isochronous_transferPtr.asFunction< - int Function( - usb_host_endpoint_h, - usb_host_transferred_cb, - ffi.Pointer, - int, - int, - ffi.Pointer, - int, - ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_ASYNC_MODULE - /// @brief Prepares an asynchronous USB control transfer. - /// @details This function prepares control transfer handle. Transfer handle can - /// be used for multiple transfers after this initialization. Note, that first - /// 8 bytes of data buffer are interpreted as control setup packet. You may use - /// usb_host_control_transfer_set_* functions to set the setup packet fields. - /// @since_tizen 5.0 - /// @param[in] dev Device handle - /// @param[in] callback Callback to be called when transfer is finished - /// @param[in] data Suitably-sized data buffer - /// @param[in] length For writes, the number of bytes from data to be sent, for - /// reads, the maximum number of bytes to receive into the data buffer - /// @param[in] user_data Pointer to data which will be passed to callback function later on - /// @param[in] timeout Timeout (in milliseconds) that transfer should wait before giving up - /// due to no response being received (for an unlimited timeout use value of 0) - /// @param[out] transfer Transfer handle - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_OUT_OF_MEMORY Out of memory - /// @pre @a dev must be an opened device handle - /// @post @a transfer should be destroyed by calling usb_host_transfer_destroy() when it's no longer needed. - int usb_host_create_control_transfer( - usb_host_device_h dev, - usb_host_transferred_cb callback, - ffi.Pointer data, - int length, - ffi.Pointer user_data, - int timeout, - ffi.Pointer transfer, - ) { - return _usb_host_create_control_transfer( - dev, - callback, - data, - length, - user_data, - timeout, - transfer, - ); - } - - late final _usb_host_create_control_transferPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - usb_host_device_h, - usb_host_transferred_cb, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.UnsignedInt, - ffi.Pointer)>>( - 'usb_host_create_control_transfer'); - late final _usb_host_create_control_transfer = - _usb_host_create_control_transferPtr.asFunction< - int Function( - usb_host_device_h, - usb_host_transferred_cb, - ffi.Pointer, - int, - ffi.Pointer, - int, - ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_ASYNC_MODULE - /// @brief Sets an endpoint for asynchronous transfer. - /// @details This function changes the endpoint on which given transfer is performed. Next submissions will be - /// performed on this endpoint. - /// @since_tizen 5.0 - /// @param[in] transfer A transfer handle - /// @param[in] ep An endpoint handle - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @pre @a transfer should be created by usb_host_create_transfer() or usb_host_create_isochronous_transfer(). - int usb_host_transfer_set_ep( - usb_host_transfer_h transfer, - usb_host_endpoint_h ep, - ) { - return _usb_host_transfer_set_ep( - transfer, - ep, - ); - } - - late final _usb_host_transfer_set_epPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_transfer_h, - usb_host_endpoint_h)>>('usb_host_transfer_set_ep'); - late final _usb_host_transfer_set_ep = _usb_host_transfer_set_epPtr - .asFunction(); - - /// @ingroup CAPI_USB_HOST_ASYNC_MODULE - /// @brief Sets a callback for asynchronous transfer. - /// @details This function changes the callback to be called on transfer completion. - /// @since_tizen 5.0 - /// @param[in] transfer A transfer handle - /// @param[in] callback A callback function - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @pre @a transfer should be created by usb_host_create_transfer() or usb_host_create_isochronous_transfer(). - int usb_host_transfer_set_callback( - usb_host_transfer_h transfer, - usb_host_transferred_cb callback, - ) { - return _usb_host_transfer_set_callback( - transfer, - callback, - ); - } - - late final _usb_host_transfer_set_callbackPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_transfer_h, - usb_host_transferred_cb)>>('usb_host_transfer_set_callback'); - late final _usb_host_transfer_set_callback = - _usb_host_transfer_set_callbackPtr.asFunction< - int Function(usb_host_transfer_h, usb_host_transferred_cb)>(); - - /// @ingroup CAPI_USB_HOST_ASYNC_MODULE - /// @brief Sets data buffer for asynchronous transfer. - /// @details This function changes the data buffer used for this transfer. - /// @since_tizen 5.0 - /// @param[in] transfer A transfer handle - /// @param[in] data A data buffer - /// @param[in] length Length of data buffer - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @pre @a transfer should be created by usb_host_create_transfer() or usb_host_create_isochronous_transfer(). - int usb_host_transfer_set_data( - usb_host_transfer_h transfer, - ffi.Pointer data, - int length, - ) { - return _usb_host_transfer_set_data( - transfer, - data, - length, - ); - } - - late final _usb_host_transfer_set_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_transfer_h, ffi.Pointer, - ffi.Int)>>('usb_host_transfer_set_data'); - late final _usb_host_transfer_set_data = - _usb_host_transfer_set_dataPtr.asFunction< - int Function( - usb_host_transfer_h, ffi.Pointer, int)>(); - - /// @ingroup CAPI_USB_HOST_ASYNC_MODULE - /// @brief Sets timeout for asynchronous transfer. - /// @details This function changes the timeout after which transfer will be stopped due to - /// no response being received. - /// @since_tizen 5.0 - /// @param[in] transfer A transfer handle - /// @param[in] timeout A timeout in milliseconds - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @pre @a transfer should be created by usb_host_create_transfer() or usb_host_create_isochronous_transfer(). - int usb_host_transfer_set_timeout( - usb_host_transfer_h transfer, - int timeout, - ) { - return _usb_host_transfer_set_timeout( - transfer, - timeout, - ); - } - - late final _usb_host_transfer_set_timeoutPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_transfer_h, - ffi.UnsignedInt)>>('usb_host_transfer_set_timeout'); - late final _usb_host_transfer_set_timeout = _usb_host_transfer_set_timeoutPtr - .asFunction(); - - /// @ingroup CAPI_USB_HOST_ASYNC_MODULE - /// @brief Sets number of isochronous packet for isochronous transfer. - /// @details This function changes the number of isochronous packets in transfer. - /// This parameter affects only isochronous transfers (i.e. transfers on isochronous endpoints). - /// Use usb_host_endpoint_get_transfer_type() for checking types of your endpoints. - /// @since_tizen 5.0 - /// @param[in] transfer A transfer handle - /// @param[in] num_iso_packets Number of isochronous packets in this transfer - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_OUT_OF_MEMORY Out of memory (too many packets) - /// @pre @a transfer should be created by usb_host_create_transfer() or usb_host_create_isochronous_transfer(). - int usb_host_transfer_set_num_iso_packets( - usb_host_transfer_h transfer, - int num_iso_packets, - ) { - return _usb_host_transfer_set_num_iso_packets( - transfer, - num_iso_packets, - ); - } - - late final _usb_host_transfer_set_num_iso_packetsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_transfer_h, - ffi.UnsignedInt)>>('usb_host_transfer_set_num_iso_packets'); - late final _usb_host_transfer_set_num_iso_packets = - _usb_host_transfer_set_num_iso_packetsPtr - .asFunction(); - - /// @ingroup CAPI_USB_HOST_ASYNC_MODULE - /// @brief Sets request type for control transfer setup packet. - /// @since_tizen 5.0 - /// @param[in] transfer A transfer handle - /// @param[in] bm_request_type bmRequestType type field for the setup packet - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @pre @a transfer should be created by usb_host_create_control_transfer(). - int usb_host_control_transfer_set_request_type( - usb_host_transfer_h transfer, - int bm_request_type, - ) { - return _usb_host_control_transfer_set_request_type( - transfer, - bm_request_type, - ); - } - - late final _usb_host_control_transfer_set_request_typePtr = _lookup< - ffi.NativeFunction>( - 'usb_host_control_transfer_set_request_type'); - late final _usb_host_control_transfer_set_request_type = - _usb_host_control_transfer_set_request_typePtr - .asFunction(); - - /// @ingroup CAPI_USB_HOST_ASYNC_MODULE - /// @brief Sets request field for control transfer setup packet. - /// @since_tizen 5.0 - /// @param[in] transfer A transfer handle - /// @param[in] b_request bRequest field for the setup packet - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @pre @a transfer should be created by usb_host_create_control_transfer(). - int usb_host_control_transfer_set_request( - usb_host_transfer_h transfer, - int b_request, - ) { - return _usb_host_control_transfer_set_request( - transfer, - b_request, - ); - } - - late final _usb_host_control_transfer_set_requestPtr = _lookup< - ffi.NativeFunction>( - 'usb_host_control_transfer_set_request'); - late final _usb_host_control_transfer_set_request = - _usb_host_control_transfer_set_requestPtr - .asFunction(); - - /// @ingroup CAPI_USB_HOST_ASYNC_MODULE - /// @brief Sets w_value field for control transfer setup packet. - /// @since_tizen 5.0 - /// @param[in] transfer A transfer handle - /// @param[in] w_value wValue field for the setup packet - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @pre @a transfer should be created by usb_host_create_control_transfer(). - int usb_host_control_transfer_set_value( - usb_host_transfer_h transfer, - int w_value, - ) { - return _usb_host_control_transfer_set_value( - transfer, - w_value, - ); - } - - late final _usb_host_control_transfer_set_valuePtr = _lookup< - ffi - .NativeFunction>( - 'usb_host_control_transfer_set_value'); - late final _usb_host_control_transfer_set_value = - _usb_host_control_transfer_set_valuePtr - .asFunction(); - - /// @ingroup CAPI_USB_HOST_ASYNC_MODULE - /// @brief Sets w_index field for control transfer setup packet. - /// @since_tizen 5.0 - /// @param[in] transfer A transfer handle - /// @param[in] w_index wIndex field for the setup packet - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @pre @a transfer should be created by usb_host_create_control_transfer(). - int usb_host_control_transfer_set_index( - usb_host_transfer_h transfer, - int w_index, - ) { - return _usb_host_control_transfer_set_index( - transfer, - w_index, - ); - } - - late final _usb_host_control_transfer_set_indexPtr = _lookup< - ffi - .NativeFunction>( - 'usb_host_control_transfer_set_index'); - late final _usb_host_control_transfer_set_index = - _usb_host_control_transfer_set_indexPtr - .asFunction(); - - /// @ingroup CAPI_USB_HOST_ASYNC_MODULE - /// @brief Gets the transfer status. - /// @since_tizen 5.0 - /// @param[in] transfer Transfer handle - /// @param[out] status Status of this transfer - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_transfer_get_status( - usb_host_transfer_h transfer, - ffi.Pointer status, - ) { - return _usb_host_transfer_get_status( - transfer, - status, - ); - } - - late final _usb_host_transfer_get_statusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_transfer_h, - ffi.Pointer)>>('usb_host_transfer_get_status'); - late final _usb_host_transfer_get_status = _usb_host_transfer_get_statusPtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_ASYNC_MODULE - /// @brief Gets the transfer data. - /// @since_tizen 5.0 - /// @remarks @a data is part of the transfer object and should not be released - /// separately. It should not be accessed after @a transfer is destroyed. - /// @param[in] transfer Transfer handle - /// @param[out] data Data buffer of this transfer - /// @param[out] actual_length Actual length of transferred data - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_transfer_get_data( - usb_host_transfer_h transfer, - ffi.Pointer> data, - ffi.Pointer actual_length, - ) { - return _usb_host_transfer_get_data( - transfer, - data, - actual_length, - ); - } - - late final _usb_host_transfer_get_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - usb_host_transfer_h, - ffi.Pointer>, - ffi.Pointer)>>('usb_host_transfer_get_data'); - late final _usb_host_transfer_get_data = - _usb_host_transfer_get_dataPtr.asFunction< - int Function( - usb_host_transfer_h, - ffi.Pointer>, - ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_ASYNC_MODULE - /// @brief Gets the *control* transfer data. - /// @since_tizen 5.0 - /// @remarks @a data is part of the transfer object and should not be released - /// separately. It should not be accessed after @a transfer is destroyed. - /// @param[in] transfer Control transfer handle - /// @param[out] data Data buffer of this transfer - /// @param[out] actual_length Actual length of transferred data - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_control_transfer_get_data( - usb_host_transfer_h transfer, - ffi.Pointer> data, - ffi.Pointer actual_length, - ) { - return _usb_host_control_transfer_get_data( - transfer, - data, - actual_length, - ); - } - - late final _usb_host_control_transfer_get_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - usb_host_transfer_h, - ffi.Pointer>, - ffi.Pointer)>>( - 'usb_host_control_transfer_get_data'); - late final _usb_host_control_transfer_get_data = - _usb_host_control_transfer_get_dataPtr.asFunction< - int Function( - usb_host_transfer_h, - ffi.Pointer>, - ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_ASYNC_MODULE - /// @brief Gets length of data buffer. - /// @details This functions gets length that was set for data buffer, not the actual transferred data length. - /// For length of transferred data see usb_host_transfer_get_data(). - /// @since_tizen 5.0 - /// @param[in] transfer Transfer handle - /// @param[out] length Length of data buffer for this transfer - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_transfer_get_length( - usb_host_transfer_h transfer, - ffi.Pointer length, - ) { - return _usb_host_transfer_get_length( - transfer, - length, - ); - } - - late final _usb_host_transfer_get_lengthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_transfer_h, - ffi.Pointer)>>('usb_host_transfer_get_length'); - late final _usb_host_transfer_get_length = - _usb_host_transfer_get_lengthPtr.asFunction< - int Function(usb_host_transfer_h, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_ASYNC_MODULE - /// @brief Gets number of isochronous packets for this transfer. - /// @since_tizen 5.0 - /// @param[in] transfer Transfer handle - /// @param[out] num_iso_packets Number of isochronous packets - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_transfer_get_num_iso_packets( - usb_host_transfer_h transfer, - ffi.Pointer num_iso_packets, - ) { - return _usb_host_transfer_get_num_iso_packets( - transfer, - num_iso_packets, - ); - } - - late final _usb_host_transfer_get_num_iso_packetsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - usb_host_transfer_h, ffi.Pointer)>>( - 'usb_host_transfer_get_num_iso_packets'); - late final _usb_host_transfer_get_num_iso_packets = - _usb_host_transfer_get_num_iso_packetsPtr.asFunction< - int Function(usb_host_transfer_h, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_ASYNC_MODULE - /// @brief Sets an isochronous packet length. - /// @details This function sets length of individual packet. - /// @since_tizen 5.0 - /// @param[in] transfer Transfer handle - /// @param[in] packet_number Number of isochronous packet - /// @param[in] length Length of the packet handle - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NOT_FOUND Packet of given number not found - /// @retval #USB_HOST_ERROR_OVERFLOW Not enough space for this packet in data buffer - int usb_host_transfer_set_iso_packet_length( - usb_host_transfer_h transfer, - int packet_number, - int length, - ) { - return _usb_host_transfer_set_iso_packet_length( - transfer, - packet_number, - length, - ); - } - - late final _usb_host_transfer_set_iso_packet_lengthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_transfer_h, ffi.UnsignedInt, - ffi.Int)>>('usb_host_transfer_set_iso_packet_length'); - late final _usb_host_transfer_set_iso_packet_length = - _usb_host_transfer_set_iso_packet_lengthPtr - .asFunction(); - - /// @ingroup CAPI_USB_HOST_ASYNC_MODULE - /// @brief Gets an isochronous packet status. - /// @since_tizen 5.0 - /// @param[in] transfer Transfer handle - /// @param[in] packet_number Number of isochronous packet - /// @param[out] status Status of selected packet - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NOT_FOUND Packet of given number not found - int usb_host_transfer_get_iso_packet_status( - usb_host_transfer_h transfer, - int packet_number, - ffi.Pointer status, - ) { - return _usb_host_transfer_get_iso_packet_status( - transfer, - packet_number, - status, - ); - } - - late final _usb_host_transfer_get_iso_packet_statusPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - usb_host_transfer_h, ffi.UnsignedInt, ffi.Pointer)>>( - 'usb_host_transfer_get_iso_packet_status'); - late final _usb_host_transfer_get_iso_packet_status = - _usb_host_transfer_get_iso_packet_statusPtr.asFunction< - int Function(usb_host_transfer_h, int, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_ASYNC_MODULE - /// @brief Gets data buffer of isochronous packet. - /// @since_tizen 5.0 - /// @remarks @a data is part of the transfer object and should not be released - /// separately. It should not be accessed after @a transfer is destroyed. - /// @param[in] transfer Transfer handle - /// @param[in] packet_number Number of isochronous packet - /// @param[out] data Data buffer for this packet - /// @param[out] actual_length Length of transferred data - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NOT_FOUND Packet of given number not found - int usb_host_transfer_get_iso_packet_data( - usb_host_transfer_h transfer, - int packet_number, - ffi.Pointer> data, - ffi.Pointer actual_length, - ) { - return _usb_host_transfer_get_iso_packet_data( - transfer, - packet_number, - data, - actual_length, - ); - } - - late final _usb_host_transfer_get_iso_packet_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - usb_host_transfer_h, - ffi.UnsignedInt, - ffi.Pointer>, - ffi.Pointer)>>('usb_host_transfer_get_iso_packet_data'); - late final _usb_host_transfer_get_iso_packet_data = - _usb_host_transfer_get_iso_packet_dataPtr.asFunction< - int Function( - usb_host_transfer_h, - int, - ffi.Pointer>, - ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_ASYNC_MODULE - /// @brief Gets isochronous packet data buffer length. - /// @since_tizen 5.0 - /// @param[in] transfer Transfer handle - /// @param[in] packet_number Number of isochronous packet - /// @param[out] length Length of data buffer - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @retval #USB_HOST_ERROR_NOT_FOUND Packet of given number not found - int usb_host_transfer_get_iso_packet_length( - usb_host_transfer_h transfer, - int packet_number, - ffi.Pointer length, - ) { - return _usb_host_transfer_get_iso_packet_length( - transfer, - packet_number, - length, - ); - } - - late final _usb_host_transfer_get_iso_packet_lengthPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - usb_host_transfer_h, ffi.UnsignedInt, ffi.Pointer)>>( - 'usb_host_transfer_get_iso_packet_length'); - late final _usb_host_transfer_get_iso_packet_length = - _usb_host_transfer_get_iso_packet_lengthPtr.asFunction< - int Function(usb_host_transfer_h, int, ffi.Pointer)>(); - - /// @ingroup CAPI_USB_HOST_ENDPOINT_MODULE - /// @brief Gets type of a transfer. - /// @since_tizen 5.0 - /// @param[in] transfer Transfer handle - /// @param[out] transfer_type Transfer type (a value from enum #usb_host_transfer_type_e) - /// @return 0 on success, otherwise a negative error value - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_transfer_get_type( - usb_host_transfer_h transfer, - ffi.Pointer transfer_type, - ) { - return _usb_host_transfer_get_type( - transfer, - transfer_type, - ); - } - - late final _usb_host_transfer_get_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(usb_host_transfer_h, - ffi.Pointer)>>('usb_host_transfer_get_type'); - late final _usb_host_transfer_get_type = _usb_host_transfer_get_typePtr - .asFunction)>(); - - /// @ingroup CAPI_USB_HOST_ASYNC_MODULE - /// @brief Destroys an asynchronous transfer structure. - /// @details When no longer needed, transfer should be destroyed by this function. - /// It frees memory allocated for the transfer. You cannot destroy unfinished transfer, - /// wait for its completion or cancel it. - /// @since_tizen 5.0 - /// @param[in] transfer Transfer handle to be destroyed - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_transfer_destroy( - usb_host_transfer_h transfer, - ) { - return _usb_host_transfer_destroy( - transfer, - ); - } - - late final _usb_host_transfer_destroyPtr = - _lookup>( - 'usb_host_transfer_destroy'); - late final _usb_host_transfer_destroy = _usb_host_transfer_destroyPtr - .asFunction(); - - /// @ingroup CAPI_USB_HOST_ASYNC_MODULE - /// @brief Submits an asynchronous USB transfer. - /// @details Calling this will start actual transfer. - /// @since_tizen 5.0 - /// @param[in] transfer Transfer handle to be submitted - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - /// @pre @a transfer should be initialized by one of initialization functions: - /// usb_host_create_transfer(), usb_host_create_isochronous_transfer() or usb_host_create_control_transfer(). - int usb_host_transfer_submit( - usb_host_transfer_h transfer, - ) { - return _usb_host_transfer_submit( - transfer, - ); - } - - late final _usb_host_transfer_submitPtr = - _lookup>( - 'usb_host_transfer_submit'); - late final _usb_host_transfer_submit = _usb_host_transfer_submitPtr - .asFunction(); - - /// @ingroup CAPI_USB_HOST_ASYNC_MODULE - /// @brief Cancels an asynchronous USB transfer. - /// @details After calling this function the transfer will be cancelled, if only - /// it was not finished already. The transfer callback will be called with #USB_HOST_TRANSFER_CANCELLED status. - /// @since_tizen 5.0 - /// @param[in] transfer Transfer handle to be cancelled - /// @return 0 on success, negative error code on error - /// @retval #USB_HOST_ERROR_NONE Successful - /// @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported - /// @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed - int usb_host_transfer_cancel( - usb_host_transfer_h transfer, - ) { - return _usb_host_transfer_cancel( - transfer, - ); - } - - late final _usb_host_transfer_cancelPtr = - _lookup>( - 'usb_host_transfer_cancel'); - late final _usb_host_transfer_cancel = _usb_host_transfer_cancelPtr - .asFunction(); - - /// @brief Initializes the update controller. - /// - /// @since_tizen 5.0 - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #UPDATE_CONTROL_ERROR_NONE Successful - /// @retval #UPDATE_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #UPDATE_CONTROL_ERROR_SYSTEM_ERROR System error - /// @retval #UPDATE_CONTROL_ERROR_INVALID_OPERATION Function not implemented - /// @retval #UPDATE_CONTROL_ERROR_NOT_SUPPORTED Not supported - /// @see update_control_deinitialize() - int update_control_initialize() { - return _update_control_initialize(); - } - - late final _update_control_initializePtr = - _lookup>( - 'update_control_initialize'); - late final _update_control_initialize = - _update_control_initializePtr.asFunction(); - - /// @brief Deinitializes the update controller. - /// - /// @since_tizen 5.0 - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #UPDATE_CONTROL_ERROR_NONE Successful - /// @retval #UPDATE_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #UPDATE_CONTROL_ERROR_SYSTEM_ERROR System error - /// @retval #UPDATE_CONTROL_ERROR_INVALID_OPERATION Function not implemented - /// @retval #UPDATE_CONTROL_ERROR_NOT_SUPPORTED Not supported - /// @see update_control_initialize() - int update_control_deinitialize() { - return _update_control_deinitialize(); - } - - late final _update_control_deinitializePtr = - _lookup>( - 'update_control_deinitialize'); - late final _update_control_deinitialize = - _update_control_deinitializePtr.asFunction(); - - /// @brief Requests checking new version of firmware. - /// - /// @since_tizen 5.0 - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #UPDATE_CONTROL_ERROR_NONE Successful - /// @retval #UPDATE_CONTROL_ERROR_CONNECTION_REFUSED Connection refused - /// @retval #UPDATE_CONTROL_ERROR_SYSTEM_ERROR System error - /// @retval #UPDATE_CONTROL_ERROR_INVALID_OPERATION Function not implemented - /// @retval #UPDATE_CONTROL_ERROR_NOT_SUPPORTED Not supported - int update_control_check_new_version() { - return _update_control_check_new_version(); - } - - late final _update_control_check_new_versionPtr = - _lookup>( - 'update_control_check_new_version'); - late final _update_control_check_new_version = - _update_control_check_new_versionPtr.asFunction(); - - /// @brief Requests downloading new version of firmware. - /// - /// @since_tizen 5.0 - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #UPDATE_CONTROL_ERROR_NONE Successful - /// @retval #UPDATE_CONTROL_ERROR_FILE_NO_SPACE_ON_DEVICE No space left on device - /// @retval #UPDATE_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #UPDATE_CONTROL_ERROR_CONNECTION_REFUSED Connection refused - /// @retval #UPDATE_CONTROL_ERROR_CONNECTION_ABORTED Software caused connection abort - /// @retval #UPDATE_CONTROL_ERROR_PROTOCOL_NOT_SUPPORTED Protocol not supported - /// @retval #UPDATE_CONTROL_ERROR_INVALID_URI Invalid URI - /// @retval #UPDATE_CONTROL_ERROR_SYSTEM_ERROR System error - /// @retval #UPDATE_CONTROL_ERROR_INVALID_OPERATION Function not implemented - /// @retval #UPDATE_CONTROL_ERROR_NOT_SUPPORTED Not supported - int update_control_download_package() { - return _update_control_download_package(); - } - - late final _update_control_download_packagePtr = - _lookup>( - 'update_control_download_package'); - late final _update_control_download_package = - _update_control_download_packagePtr.asFunction(); - - /// @platform - /// @brief Requests triggering update to new firmware. - /// - /// @since_tizen 5.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/updatecontrol.admin - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #UPDATE_CONTROL_ERROR_NONE Successful - /// @retval #UPDATE_CONTROL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #UPDATE_CONTROL_ERROR_TIMED_OUT Time out - /// @retval #UPDATE_CONTROL_ERROR_INVALID_PACKAGE Invalid package - /// @retval #UPDATE_CONTROL_ERROR_PACKAGE_NOT_SUPPORTED Package type not supported - /// @retval #UPDATE_CONTROL_ERROR_SYSTEM_ERROR System error - /// @retval #UPDATE_CONTROL_ERROR_INVALID_OPERATION Function not implemented - /// @retval #UPDATE_CONTROL_ERROR_NOT_SUPPORTED Not supported - int update_control_do_update() { - return _update_control_do_update(); - } - - late final _update_control_do_updatePtr = - _lookup>( - 'update_control_do_update'); - late final _update_control_do_update = - _update_control_do_updatePtr.asFunction(); - - /// @platform - /// @brief Makes reservation for update. - /// @details Makes update reservation at a specific time. At the given time, it automatically checks, downloads and updates to a new version. To cancel the reservation, call update_control_cancel_reservation(). - /// - /// @since_tizen 5.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/updatecontrol.admin - /// @remarks Only one reservation can be used at any given time. If a new reservation is made, the previous one will be removed. - /// @param[in] reservation_time The time to start update - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #UPDATE_CONTROL_ERROR_NONE Successful - /// @retval #UPDATE_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #UPDATE_CONTROL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #UPDATE_CONTROL_ERROR_SYSTEM_ERROR System error - /// @retval #UPDATE_CONTROL_ERROR_INVALID_OPERATION Function not implemented - /// @retval #UPDATE_CONTROL_ERROR_NOT_SUPPORTED Not supported - int update_control_make_reservation( - ffi.Pointer reservation_time, - ) { - return _update_control_make_reservation( - reservation_time, - ); - } - - late final _update_control_make_reservationPtr = - _lookup)>>( - 'update_control_make_reservation'); - late final _update_control_make_reservation = - _update_control_make_reservationPtr - .asFunction)>(); - - /// @platform - /// @brief Cancels the update reservation. - /// - /// @since_tizen 5.0 - /// @privlevel platform - /// @privilege %http://tizen.org/privilege/updatecontrol.admin - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #UPDATE_CONTROL_ERROR_NONE Successful - /// @retval #UPDATE_CONTROL_ERROR_PERMISSION_DENIED Permission denied - /// @retval #UPDATE_CONTROL_ERROR_SYSTEM_ERROR System error - /// @retval #UPDATE_CONTROL_ERROR_INVALID_OPERATION Function not implemented - /// @retval #UPDATE_CONTROL_ERROR_NOT_SUPPORTED Not supported - int update_control_cancel_reservation() { - return _update_control_cancel_reservation(); - } - - late final _update_control_cancel_reservationPtr = - _lookup>( - 'update_control_cancel_reservation'); - late final _update_control_cancel_reservation = - _update_control_cancel_reservationPtr.asFunction(); - - /// @brief Gets the update property of the given key. - /// - /// @since_tizen 5.0 - /// @remarks The @a value must be released using free() - /// @param[in] property The key of property to get - /// @param[out] value The value of given property - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #UPDATE_CONTROL_ERROR_NONE Successful - /// @retval #UPDATE_CONTROL_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #UPDATE_CONTROL_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #UPDATE_CONTROL_ERROR_KEY_NOT_FOUND Specified property not found - /// @retval #UPDATE_CONTROL_ERROR_KEY_REJECTED Specified property not available - /// @retval #UPDATE_CONTROL_ERROR_SYSTEM_ERROR System error - /// @retval #UPDATE_CONTROL_ERROR_INVALID_OPERATION Function not implemented - /// @retval #UPDATE_CONTROL_ERROR_NOT_SUPPORTED Not supported - int update_control_get_property( - int property, - ffi.Pointer> value, - ) { - return _update_control_get_property( - property, - value, - ); - } - - late final _update_control_get_propertyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer>)>>( - 'update_control_get_property'); - late final _update_control_get_property = _update_control_get_propertyPtr - .asFunction>)>(); - - /// @brief Creates and initializes clipboard handle. - /// @since_tizen 3.0 - /// @param[out] cbhm_handle Clipboard handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - /// @retval #CBHM_ERROR_OUT_OF_MEMORY Out of memory - /// @see cbhm_close_service() - int cbhm_open_service( - ffi.Pointer cbhm_handle, - ) { - return _cbhm_open_service( - cbhm_handle, - ); - } - - late final _cbhm_open_servicePtr = - _lookup)>>( - 'cbhm_open_service'); - late final _cbhm_open_service = - _cbhm_open_servicePtr.asFunction)>(); - - /// @brief Closes clipboard handle. - /// @since_tizen 3.0 - /// @param[in] cbhm_handle Clipboard handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - /// @see cbhm_open_service() - int cbhm_close_service( - cbhm_h cbhm_handle, - ) { - return _cbhm_close_service( - cbhm_handle, - ); - } - - late final _cbhm_close_servicePtr = - _lookup>( - 'cbhm_close_service'); - late final _cbhm_close_service = - _cbhm_close_servicePtr.asFunction(); - - /// @brief Shows clipboard. - /// @since_tizen 3.0 - /// @param[in] cbhm_handle Clipboard handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - /// @see cbhm_hide() - int cbhm_show( - cbhm_h cbhm_handle, - ) { - return _cbhm_show( - cbhm_handle, - ); - } - - late final _cbhm_showPtr = - _lookup>('cbhm_show'); - late final _cbhm_show = _cbhm_showPtr.asFunction(); - - /// @brief Hides clipboard. - /// @since_tizen 3.0 - /// @param[in] cbhm_handle Clipboard handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - /// @see cbhm_show() - int cbhm_hide( - cbhm_h cbhm_handle, - ) { - return _cbhm_hide( - cbhm_handle, - ); - } - - late final _cbhm_hidePtr = - _lookup>('cbhm_hide'); - late final _cbhm_hide = _cbhm_hidePtr.asFunction(); - - /// @brief Sets clipboard selection type. - /// @since_tizen 3.0 - /// @param[in] cbhm_handle Clipboard handle - /// @param[in] type Selection type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - /// @see cbhm_selection_type_get() - int cbhm_selection_type_set( - cbhm_h cbhm_handle, - int type, - ) { - return _cbhm_selection_type_set( - cbhm_handle, - type, - ); - } - - late final _cbhm_selection_type_setPtr = - _lookup>( - 'cbhm_selection_type_set'); - late final _cbhm_selection_type_set = - _cbhm_selection_type_setPtr.asFunction(); - - /// @brief Gets clipboard selection type. - /// @since_tizen 3.0 - /// @param[in] cbhm_handle Clipboard handle - /// @param[out] type Selection type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - /// @see cbhm_selection_type_set() - int cbhm_selection_type_get( - cbhm_h cbhm_handle, - ffi.Pointer type, - ) { - return _cbhm_selection_type_get( - cbhm_handle, - type, - ); - } - - late final _cbhm_selection_type_getPtr = _lookup< - ffi.NativeFunction)>>( - 'cbhm_selection_type_get'); - late final _cbhm_selection_type_get = _cbhm_selection_type_getPtr - .asFunction)>(); - - /// @brief Adds event callback function of selecting a clipboard item. - /// @since_tizen 3.0 - /// @param[in] cbhm_handle Clipboard handle - /// @param[in] callback Callback function called when a clipboard item is selected - /// @param[in] user_data User data to be passed to the given event callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - /// @retval #CBHM_ERROR_OUT_OF_MEMORY Out of memory - int cbhm_item_selected_callback_add( - cbhm_h cbhm_handle, - cbhm_selected_cb callback, - ffi.Pointer user_data, - ) { - return _cbhm_item_selected_callback_add( - cbhm_handle, - callback, - user_data, - ); - } - - late final _cbhm_item_selected_callback_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(cbhm_h, cbhm_selected_cb, - ffi.Pointer)>>('cbhm_item_selected_callback_add'); - late final _cbhm_item_selected_callback_add = - _cbhm_item_selected_callback_addPtr.asFunction< - int Function(cbhm_h, cbhm_selected_cb, ffi.Pointer)>(); - - /// @brief Removes event callback function for selecting a clipboard item. - /// @since_tizen 4.0 - /// @param[in] cbhm_handle The clipboard handle - /// @param[in] callback The callback function to be deleted - /// @param[in] user_data User data to be passed to the given event callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - int cbhm_item_selected_callback_remove( - cbhm_h cbhm_handle, - cbhm_selected_cb callback, - ffi.Pointer user_data, - ) { - return _cbhm_item_selected_callback_remove( - cbhm_handle, - callback, - user_data, - ); - } - - late final _cbhm_item_selected_callback_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(cbhm_h, cbhm_selected_cb, - ffi.Pointer)>>('cbhm_item_selected_callback_remove'); - late final _cbhm_item_selected_callback_remove = - _cbhm_item_selected_callback_removePtr.asFunction< - int Function(cbhm_h, cbhm_selected_cb, ffi.Pointer)>(); - - /// @brief Sends data to clipboard. - /// @since_tizen 3.0 - /// @param[in] cbhm_handle Clipboard handle - /// @param[in] type Selection type - /// @param[in] data Data to be sent - /// @param[in] len The length of data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - /// @retval #CBHM_ERROR_OUT_OF_MEMORY Out of memory - /// @see cbhm_selection_get() - int cbhm_selection_set( - cbhm_h cbhm_handle, - int type, - ffi.Pointer data, - int len, - ) { - return _cbhm_selection_set( - cbhm_handle, - type, - data, - len, - ); - } - - late final _cbhm_selection_setPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(cbhm_h, ffi.Int32, ffi.Pointer, - ffi.Size)>>('cbhm_selection_set'); - late final _cbhm_selection_set = _cbhm_selection_setPtr - .asFunction, int)>(); - - /// @brief Receives data from clipboard. - /// @since_tizen 3.0 - /// @param[in] cbhm_handle Clipboard handle - /// @param[in] type Selection type - /// @param[in] callback Callback function receiving data from clipboard - /// @param[in] user_data User data to be passed to the given event callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - /// @retval #CBHM_ERROR_NO_DATA No data available - /// @see cbhm_selection_set() - int cbhm_selection_get( - cbhm_h cbhm_handle, - int type, - cbhm_selection_data_cb callback, - ffi.Pointer user_data, - ) { - return _cbhm_selection_get( - cbhm_handle, - type, - callback, - user_data, - ); - } - - late final _cbhm_selection_getPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(cbhm_h, ffi.Int32, cbhm_selection_data_cb, - ffi.Pointer)>>('cbhm_selection_get'); - late final _cbhm_selection_get = _cbhm_selection_getPtr.asFunction< - int Function( - cbhm_h, int, cbhm_selection_data_cb, ffi.Pointer)>(); - - /// @brief Gets the count of clipboard items. - /// @since_tizen 3.0 - /// @param[in] cbhm_handle Clipboard handle - /// @return The count of clipboard items - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - int cbhm_item_count_get( - cbhm_h cbhm_handle, - ) { - return _cbhm_item_count_get( - cbhm_handle, - ); - } - - late final _cbhm_item_count_getPtr = - _lookup>( - 'cbhm_item_count_get'); - late final _cbhm_item_count_get = - _cbhm_item_count_getPtr.asFunction(); - - /// @brief Gets the type of the latest item in clipboard. - /// @since_tizen 4.0 - /// @param[in] cbhm_handle The clipboard handle - /// @param[out] type The type of the latest item - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - /// @see cbhm_selection_type_set() - int cbhm_latest_item_type_get( - cbhm_h cbhm_handle, - ffi.Pointer type, - ) { - return _cbhm_latest_item_type_get( - cbhm_handle, - type, - ); - } - - late final _cbhm_latest_item_type_getPtr = _lookup< - ffi.NativeFunction)>>( - 'cbhm_latest_item_type_get'); - late final _cbhm_latest_item_type_get = _cbhm_latest_item_type_getPtr - .asFunction)>(); - - /// @brief Adds event callback function for receiving changed event of clipboard items. - /// @since_tizen 4.0 - /// @param[in] cbhm_handle The clipboard handle - /// @param[in] callback The callback function called when a clipboard item is changed - /// @param[in] user_data User data to be passed to the given event callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - /// @retval #CBHM_ERROR_OUT_OF_MEMORY Out of memory - int cbhm_item_changed_callback_add( - cbhm_h cbhm_handle, - cbhm_item_changed_cb callback, - ffi.Pointer user_data, - ) { - return _cbhm_item_changed_callback_add( - cbhm_handle, - callback, - user_data, - ); - } - - late final _cbhm_item_changed_callback_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(cbhm_h, cbhm_item_changed_cb, - ffi.Pointer)>>('cbhm_item_changed_callback_add'); - late final _cbhm_item_changed_callback_add = - _cbhm_item_changed_callback_addPtr.asFunction< - int Function(cbhm_h, cbhm_item_changed_cb, ffi.Pointer)>(); - - /// @brief Removes event callback function for receiving changed event of clipboard items. - /// @since_tizen 4.0 - /// @param[in] cbhm_handle The clipboard handle - /// @param[in] callback The callback function to be removed - /// @param[in] user_data User data to be passed to the given event callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - int cbhm_item_changed_callback_remove( - cbhm_h cbhm_handle, - cbhm_item_changed_cb callback, - ffi.Pointer user_data, - ) { - return _cbhm_item_changed_callback_remove( - cbhm_handle, - callback, - user_data, - ); - } - - late final _cbhm_item_changed_callback_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(cbhm_h, cbhm_item_changed_cb, - ffi.Pointer)>>('cbhm_item_changed_callback_remove'); - late final _cbhm_item_changed_callback_remove = - _cbhm_item_changed_callback_removePtr.asFunction< - int Function(cbhm_h, cbhm_item_changed_cb, ffi.Pointer)>(); - - /// @brief Gets the clipboard state. - /// @since_tizen 4.0 - /// @param[in] cbhm_handle Clipboard handle - /// @param[out] type State type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - int cbhm_state_get( - cbhm_h cbhm_handle, - ffi.Pointer type, - ) { - return _cbhm_state_get( - cbhm_handle, - type, - ); - } - - late final _cbhm_state_getPtr = _lookup< - ffi.NativeFunction)>>( - 'cbhm_state_get'); - late final _cbhm_state_get = _cbhm_state_getPtr - .asFunction)>(); - - /// @brief Adds event callback function of receiving monitored event of clipboard. - /// @since_tizen 4.0 - /// @param[in] cbhm_handle Clipboard handle - /// @param[in] callback Callback function called when clipboard becomes active or inactive - /// @param[in] user_data User data to be passed to the given event callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - /// @retval #CBHM_ERROR_OUT_OF_MEMORY Out of memory - /// @see cbhm_monitor_callback_remove() - int cbhm_monitor_callback_add( - cbhm_h cbhm_handle, - cbhm_monitor_cb callback, - ffi.Pointer user_data, - ) { - return _cbhm_monitor_callback_add( - cbhm_handle, - callback, - user_data, - ); - } - - late final _cbhm_monitor_callback_addPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(cbhm_h, cbhm_monitor_cb, - ffi.Pointer)>>('cbhm_monitor_callback_add'); - late final _cbhm_monitor_callback_add = - _cbhm_monitor_callback_addPtr.asFunction< - int Function(cbhm_h, cbhm_monitor_cb, ffi.Pointer)>(); - - /// @brief Deletes event callback function of receiving monitored event of clipboard. - /// @since_tizen 4.0 - /// @param[in] cbhm_handle Clipboard handle - /// @param[in] callback Callback function to be deleted - /// @param[in] user_data User data to be passed to the given event callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #CBHM_ERROR_NONE Successful - /// @retval #CBHM_ERROR_INVALID_PARAMETER Invalid function parameters - /// @see cbhm_monitor_callback_add() - int cbhm_monitor_callback_remove( - cbhm_h cbhm_handle, - cbhm_monitor_cb callback, - ffi.Pointer user_data, - ) { - return _cbhm_monitor_callback_remove( - cbhm_handle, - callback, - user_data, - ); - } - - late final _cbhm_monitor_callback_removePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(cbhm_h, cbhm_monitor_cb, - ffi.Pointer)>>('cbhm_monitor_callback_remove'); - late final _cbhm_monitor_callback_remove = - _cbhm_monitor_callback_removePtr.asFunction< - int Function(cbhm_h, cbhm_monitor_cb, ffi.Pointer)>(); - - /// @brief Initializes External Output Manager (EOM). - /// @details User should call this function previously for using EOM. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks After all using, call eom_deinit() function for resource returning. - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_CONNECTION_FAILURE The EOM connection failure - /// @see eom_deinit() - /// @see #eom_error_e - int eom_init() { - return _eom_init(); - } - - late final _eom_initPtr = - _lookup>('eom_init'); - late final _eom_init = _eom_initPtr.asFunction(); - - /// @brief Finalizes External Output Manager (EOM). - /// @details User should call this function after using EOM to release all - /// resources of EOM. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @see eom_init() - void eom_deinit() { - return _eom_deinit(); - } - - late final _eom_deinitPtr = - _lookup>('eom_deinit'); - late final _eom_deinit = _eom_deinitPtr.asFunction(); - - /// @brief Registers a callback function to get output connection notification - /// from External Output Manager (EOM) module. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] callback The function pointer of eom_output_added_cb callback - /// function - /// @param[in] user_data The pointer of user data which is passed to - /// eom_output_added_cb function - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_OUT_OF_MEMORY Memory allocation failure - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see eom_unset_output_added_cb() - /// @see #eom_output_added_cb - int eom_set_output_added_cb( - eom_output_added_cb callback, - ffi.Pointer user_data, - ) { - return _eom_set_output_added_cb( - callback, - user_data, - ); - } - - late final _eom_set_output_added_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(eom_output_added_cb, - ffi.Pointer)>>('eom_set_output_added_cb'); - late final _eom_set_output_added_cb = _eom_set_output_added_cbPtr - .asFunction)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] callback The function pointer of eom_output_added_cb callback - /// function - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see eom_set_output_added_cb() - /// @see #eom_output_added_cb - int eom_unset_output_added_cb( - eom_output_added_cb callback, - ) { - return _eom_unset_output_added_cb( - callback, - ); - } - - late final _eom_unset_output_added_cbPtr = - _lookup>( - 'eom_unset_output_added_cb'); - late final _eom_unset_output_added_cb = _eom_unset_output_added_cbPtr - .asFunction(); - - /// @brief Registers a callback function to get output disconnection - /// notification from External Output Manager (EOM) module. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] callback The function pointer of eom_output_removed_cb callback - /// function - /// @param[in] user_data The pointer of user data which is passed to - /// eom_output_removed_cb function - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_OUT_OF_MEMORY Memory allocation failure - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see eom_unset_output_removed_cb() - /// @see #eom_output_removed_cb - int eom_set_output_removed_cb( - eom_output_removed_cb callback, - ffi.Pointer user_data, - ) { - return _eom_set_output_removed_cb( - callback, - user_data, - ); - } - - late final _eom_set_output_removed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(eom_output_removed_cb, - ffi.Pointer)>>('eom_set_output_removed_cb'); - late final _eom_set_output_removed_cb = _eom_set_output_removed_cbPtr - .asFunction)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] callback The function pointer of eom_output_removed_cb callback - /// function - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see eom_set_output_removed_cb() - /// @see #eom_output_removed_cb - int eom_unset_output_removed_cb( - eom_output_removed_cb callback, - ) { - return _eom_unset_output_removed_cb( - callback, - ); - } - - late final _eom_unset_output_removed_cbPtr = - _lookup>( - 'eom_unset_output_removed_cb'); - late final _eom_unset_output_removed_cb = _eom_unset_output_removed_cbPtr - .asFunction(); - - /// @brief Registers a callback function to get output mode changing - /// notification from External Output Manager (EOM) module. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] callback The function pointer of eom_mode_changed_cb callback - /// function - /// @param[in] user_data The pointer of user data which is passed to - /// eom_mode_changed_cb function - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_OUT_OF_MEMORY Memory allocation failure - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see eom_unset_mode_changed_cb() - /// @see #eom_mode_changed_cb - int eom_set_mode_changed_cb( - eom_mode_changed_cb callback, - ffi.Pointer user_data, - ) { - return _eom_set_mode_changed_cb( - callback, - user_data, - ); - } - - late final _eom_set_mode_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(eom_mode_changed_cb, - ffi.Pointer)>>('eom_set_mode_changed_cb'); - late final _eom_set_mode_changed_cb = _eom_set_mode_changed_cbPtr - .asFunction)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] callback The function pointer of eom_mode_changed_cb callback - /// function - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see eom_set_mode_changed_cb() - /// @see #eom_mode_changed_cb - int eom_unset_mode_changed_cb( - eom_mode_changed_cb callback, - ) { - return _eom_unset_mode_changed_cb( - callback, - ); - } - - late final _eom_unset_mode_changed_cbPtr = - _lookup>( - 'eom_unset_mode_changed_cb'); - late final _eom_unset_mode_changed_cb = _eom_unset_mode_changed_cbPtr - .asFunction(); - - /// @brief Registers a callback function to get output attribute changing - /// notification from External Output Manager (EOM) module. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] callback The function pointer of eom_attribute_changed_cb - /// callback function - /// @param[in] user_data The pointer of user data which is passed to - /// eom_attribute_changed_cb function - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_OUT_OF_MEMORY Memory allocation failure - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see eom_unset_attribute_changed_cb() - /// @see #eom_attribute_changed_cb - int eom_set_attribute_changed_cb( - eom_attribute_changed_cb callback, - ffi.Pointer user_data, - ) { - return _eom_set_attribute_changed_cb( - callback, - user_data, - ); - } - - late final _eom_set_attribute_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(eom_attribute_changed_cb, - ffi.Pointer)>>('eom_set_attribute_changed_cb'); - late final _eom_set_attribute_changed_cb = - _eom_set_attribute_changed_cbPtr.asFunction< - int Function(eom_attribute_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] callback The function pointer of eom_attribute_changed_cb - /// callback function - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see eom_set_attribute_changed_cb() - /// @see #eom_attribute_changed_cb - int eom_unset_attribute_changed_cb( - eom_attribute_changed_cb callback, - ) { - return _eom_unset_attribute_changed_cb( - callback, - ); - } - - late final _eom_unset_attribute_changed_cbPtr = - _lookup>( - 'eom_unset_attribute_changed_cb'); - late final _eom_unset_attribute_changed_cb = - _eom_unset_attribute_changed_cbPtr - .asFunction(); - - /// @brief Gets the IDs and count of external output. - /// @details This function returns the IDs of external output which are - /// available to connect to target device, and the count of them - /// also. User can get the id of external output. - /// which user want to watch. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks User should free return value by using free(). - /// The specific error code can be obtained using the get_last_result() method. - /// Error codes are described in Exception section. - /// @param[out] count The count of the eom_output_id supported by system - /// @return The array of the eom_output_id if this function succeeds, otherwise - /// NULL - /// @retval The pointer of #eom_output_id - /// @exception #EOM_ERROR_NONE Successful - /// @exception #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @exception #EOM_ERROR_OUT_OF_MEMORY Memory allocation failure - /// @pre eom_init() - /// @see #eom_output_id - /// @see #eom_error_e - ffi.Pointer eom_get_eom_output_ids( - ffi.Pointer count, - ) { - return _eom_get_eom_output_ids( - count, - ); - } - - late final _eom_get_eom_output_idsPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('eom_get_eom_output_ids'); - late final _eom_get_eom_output_ids = _eom_get_eom_output_idsPtr - .asFunction Function(ffi.Pointer)>(); - - /// @brief Gets type of external output. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks The specific error code can be obtained using the get_last_result() - /// method. Error codes are described in Exception section. - /// @param[in] output_id The id of external output device - /// @param[out] type The type of external output instance - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see #eom_output_id - /// @see #eom_error_e - /// @see #eom_output_type_e - int eom_get_output_type( - int output_id, - ffi.Pointer type, - ) { - return _eom_get_output_type( - output_id, - type, - ); - } - - late final _eom_get_output_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - eom_output_id, ffi.Pointer)>>('eom_get_output_type'); - late final _eom_get_output_type = _eom_get_output_typePtr - .asFunction)>(); - - /// @brief Gets mode of external output. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks The specific error code can be obtained using the get_last_result() - /// method. Error codes are described in Exception section. - /// @param[in] output_id The id of external output device - /// @param[out] mode The mode of external output instance - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EOM_ERROR_NO_SUCH_DEVICE Invalid external output instance - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see #eom_output_id - /// @see #eom_error_e - /// @see #eom_output_mode_e - int eom_get_output_mode( - int output_id, - ffi.Pointer mode, - ) { - return _eom_get_output_mode( - output_id, - mode, - ); - } - - late final _eom_get_output_modePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - eom_output_id, ffi.Pointer)>>('eom_get_output_mode'); - late final _eom_get_output_mode = _eom_get_output_modePtr - .asFunction)>(); - - /// @brief Gets attribute of external output. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks The specific error code can be obtained using the get_last_result() - /// method. Error codes are described in Exception section. - /// @param[in] output_id The id of external output device - /// @param[out] attribute The attribute of external output instance - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EOM_ERROR_NO_SUCH_DEVICE Invalid external output instance - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see #eom_output_id - /// @see #eom_error_e - /// @see #eom_output_attribute_e - int eom_get_output_attribute( - int output_id, - ffi.Pointer attribute, - ) { - return _eom_get_output_attribute( - output_id, - attribute, - ); - } - - late final _eom_get_output_attributePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(eom_output_id, - ffi.Pointer)>>('eom_get_output_attribute'); - late final _eom_get_output_attribute = _eom_get_output_attributePtr - .asFunction)>(); - - /// @brief Gets attribute state of external output. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @remarks The specific error code can be obtained using the get_last_result() - /// method. Error codes are described in Exception section. - /// @param[in] output_id The id of external output device - /// @param[out] state The attribute state of external output instance - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EOM_ERROR_NO_SUCH_DEVICE Invalid external output instance - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see #eom_output_id - /// @see #eom_error_e - /// @see #eom_output_attribute_state_e - int eom_get_output_attribute_state( - int output_id, - ffi.Pointer state, - ) { - return _eom_get_output_attribute_state( - output_id, - state, - ); - } - - late final _eom_get_output_attribute_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(eom_output_id, - ffi.Pointer)>>('eom_get_output_attribute_state'); - late final _eom_get_output_attribute_state = - _eom_get_output_attribute_statePtr - .asFunction)>(); - - /// @brief Gets resolution of external output. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] output_id The id of external output device - /// @param[out] width The width of external output instance - /// @param[out] height The height of external output instance - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EOM_ERROR_NO_SUCH_DEVICE Invalid external output instance - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see #eom_output_id - /// @see #eom_error_e - int eom_get_output_resolution( - int output_id, - ffi.Pointer width, - ffi.Pointer height, - ) { - return _eom_get_output_resolution( - output_id, - width, - height, - ); - } - - late final _eom_get_output_resolutionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(eom_output_id, ffi.Pointer, - ffi.Pointer)>>('eom_get_output_resolution'); - late final _eom_get_output_resolution = - _eom_get_output_resolutionPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets physical width/height (millimeters) of external output. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] output_id The id of external output device - /// @param[out] phy_width The physical mm width of external output instance - /// @param[out] phy_height The physical mm height of external output instance - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EOM_ERROR_NO_SUCH_DEVICE Invalid external output instance - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see #eom_output_id - /// @see #eom_error_e - int eom_get_output_physical_size( - int output_id, - ffi.Pointer phy_width, - ffi.Pointer phy_height, - ) { - return _eom_get_output_physical_size( - output_id, - phy_width, - phy_height, - ); - } - - late final _eom_get_output_physical_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(eom_output_id, ffi.Pointer, - ffi.Pointer)>>('eom_get_output_physical_size'); - late final _eom_get_output_physical_size = - _eom_get_output_physical_sizePtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the attribute of the external output ID. - /// @details The application can set the External Output Manager (EOM) attribute - /// to the external output ID. - /// The EOM module manages the windows to display on external output and - /// control the policy of external output. The application can recognize - /// the attribute state and manage the resources when the application receives - /// several notification callback from EOM module. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] output_id The id of external output device - /// @param[in] attr The attribute of the external output - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EOM_ERROR_NO_SUCH_DEVICE Invalid external output instance - /// @retval #EOM_ERROR_MESSAGE_SENDING_FAILURE Communication failure with EOM - /// module - /// @retval #EOM_ERROR_MESSAGE_OPERATION_FAILURE Operation failure - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see #eom_output_id - /// @see #eom_error_e - int eom_set_output_attribute( - int output_id, - int attr, - ) { - return _eom_set_output_attribute( - output_id, - attr, - ); - } - - late final _eom_set_output_attributePtr = - _lookup>( - 'eom_set_output_attribute'); - late final _eom_set_output_attribute = - _eom_set_output_attributePtr.asFunction(); - - /// @brief Sets window to the external output best resolution of external output - /// device. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @param[in] output_id The id of external output device - /// @param[in] win The pointer of evas object - /// @return 0 on success, otherwise a negative error value - /// @retval #EOM_ERROR_NONE Successful - /// @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #EOM_ERROR_NO_SUCH_DEVICE Invalid external output instance - /// @retval #EOM_ERROR_MESSAGE_SENDING_FAILURE Communication failure with EOM - /// module - /// @retval #EOM_ERROR_MESSAGE_OPERATION_FAILURE Operation failure - /// @pre eom_init() - /// @pre eom_get_eom_output_ids() - /// @see #eom_output_id - /// @see #eom_error_e - int eom_set_output_window( - int output_id, - ffi.Pointer win, - ) { - return _eom_set_output_window( - output_id, - win, - ); - } - - late final _eom_set_output_windowPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(eom_output_id, - ffi.Pointer)>>('eom_set_output_window'); - late final _eom_set_output_window = _eom_set_output_windowPtr - .asFunction)>(); - - /// @brief Runs the main loop of IME application. - /// - /// @details This function starts to run IME application's main loop. The ime_create_cb() - /// callback function is called to initialize IME application before the main loop starts up. And - /// the ime_terminate_cb() callback function is called when IME application is terminated. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks IME application MUST implement ime_app_main() function which is the main - /// entry point of IME application. In ime_app_main() function, the ime_run() - /// function MUST be called with the necessary callback functions; ime_create_cb(), - /// ime_terminate_cb(), ime_show_cb(), and ime_hide_cb() callback functions - /// are mandatory for IME application. - /// - /// @param[in] basic_cb The structure pointer of the essential callback functions - /// @param[in] user_data User data to be passed to the callback functions - /// - /// @return 0 if IME application ends successfully, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NO_CALLBACK_FUNCTION Necessary callback function is not set - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @pre The ime_event_set_***() functions can be called to set the event handling callback functions. - /// - /// @see ime_callback_s() - /// @see ime_event_set_focus_in_cb() - /// @see ime_event_set_focus_out_cb() - /// @see ime_event_set_surrounding_text_updated_cb() - /// @see ime_event_set_input_context_reset_cb() - /// @see ime_event_set_cursor_position_updated_cb() - /// @see ime_event_set_language_requested_cb() - /// @see ime_event_set_language_set_cb() - /// @see ime_event_set_imdata_set_cb() - /// @see ime_event_set_layout_set_cb() - /// @see ime_event_set_return_key_type_set_cb() - /// @see ime_event_set_return_key_state_set_cb() - /// @see ime_event_set_geometry_requested_cb() - /// @see ime_event_set_display_language_changed_cb() - /// @see ime_event_set_rotation_degree_changed_cb() - /// @see ime_event_set_accessibility_state_changed_cb() - /// @see ime_event_set_option_window_created_cb() - /// @see ime_event_set_option_window_destroyed_cb() - /// @see ime_event_set_prediction_hint_set_cb() - /// - /// @code - /// static void inputmethod_create_cb(void *user_data); - /// static void inputmethod_terminate_cb(void *user_data); - /// static void inputmethod_show_cb(int context_id, ime_context_h context, void *user_data); - /// static void inputmethod_hide_cb(int context_id, void *user_data); - /// static void inputmethod_focus_in_cb(int context_id, void *user_data); - /// static void inputmethod_focus_out_cb(int context_id, void *user_data); - /// static void inputmethod_cursor_position_updated_cb(int cursor_pos, void *user_data); - /// - /// static void inputmethod_create_cb(void *user_data) - /// { - /// Evas_Object *ime_win = NULL; - /// - /// ime_set_size(480, 400, 800, 400); - /// ime_win = ime_get_main_window(); - /// if (ime_win) { - /// // Prepare before showing IME window. - /// } - /// } - /// - /// static void inputmethod_show_cb(int context_id, ime_context_h context, void *user_data) - /// { - /// Ecore_IMF_Input_Panel_Layout layout; - /// ime_layout_variation_e layout_variation; - /// Evas_Object *ime_win; - /// - /// ime_context_get_layout(context, &layout); - /// ime_context_get_layout_variation(context, &layout_variation); - /// - /// ime_win = ime_get_main_window(); - /// if (ime_win) { - /// // Compose IME UI properly with the context information and show. - /// - /// evas_object_show(ime_win); - /// } - /// } - /// - /// static void inputmethod_hide_cb(int context_id, void *user_data) - /// { - /// Evas_Object *ime_win = ime_get_main_window(); - /// if (ime_win) { - /// evas_object_hide(ime_win); - /// } - /// } - /// - /// void ime_app_main(int argc, char **argv) - /// { - /// ime_callback_s basic_callback = { - /// inputmethod_create_cb, - /// inputmethod_terminate_cb, - /// inputmethod_show_cb, - /// inputmethod_hide_cb, - /// }; - /// - /// ime_event_set_focus_in_cb(inputmethod_focus_in_cb, NULL); - /// ime_event_set_focus_out_cb(inputmethod_focus_out_cb, NULL); - /// ime_event_set_cursor_position_updated_cb(inputmethod_cursor_position_updated_cb, NULL); - /// - /// ime_run(&basic_callback, NULL); - /// } - /// @endcode - int ime_run( - ffi.Pointer basic_cb, - ffi.Pointer user_data, - ) { - return _ime_run( - basic_cb, - user_data, - ); - } - - late final _ime_runPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('ime_run'); - late final _ime_run = _ime_runPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets @c focus_in event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_focus_in_cb() callback function is called when an associated text input - /// UI control has focus. - /// - /// @param[in] callback_func @c focus_in event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_focus_in_cb() - /// @see ime_run() - int ime_event_set_focus_in_cb( - ime_focus_in_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_focus_in_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_focus_in_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_focus_in_cb, - ffi.Pointer)>>('ime_event_set_focus_in_cb'); - late final _ime_event_set_focus_in_cb = _ime_event_set_focus_in_cbPtr - .asFunction)>(); - - /// @brief Sets @c focus_out event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_focus_out_cb() callback function is called when an associated text input - /// UI control loses focus. - /// - /// @param[in] callback_func @c focus_out event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_focus_out_cb() - /// @see ime_run() - int ime_event_set_focus_out_cb( - ime_focus_out_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_focus_out_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_focus_out_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_focus_out_cb, - ffi.Pointer)>>('ime_event_set_focus_out_cb'); - late final _ime_event_set_focus_out_cb = _ime_event_set_focus_out_cbPtr - .asFunction)>(); - - /// @brief Sets @c surrounding_text_updated event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_surrounding_text_updated_cb() callback function is called when an - /// associated text input UI control responds to a request with the surrounding text. - /// - /// @param[in] callback_func @c surrounding_text_updated event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_surrounding_text_updated_cb() - /// @see ime_run() - int ime_event_set_surrounding_text_updated_cb( - ime_surrounding_text_updated_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_surrounding_text_updated_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_surrounding_text_updated_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ime_surrounding_text_updated_cb, ffi.Pointer)>>( - 'ime_event_set_surrounding_text_updated_cb'); - late final _ime_event_set_surrounding_text_updated_cb = - _ime_event_set_surrounding_text_updated_cbPtr.asFunction< - int Function( - ime_surrounding_text_updated_cb, ffi.Pointer)>(); - - /// @brief Sets @c input_context_reset event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_input_context_reset_cb() callback function is called to reset the input - /// context of an associated text input UI control. - /// - /// @param[in] callback_func @c input_context_reset event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_input_context_reset_cb() - /// @see ime_run() - int ime_event_set_input_context_reset_cb( - ime_input_context_reset_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_input_context_reset_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_input_context_reset_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_input_context_reset_cb, - ffi.Pointer)>>('ime_event_set_input_context_reset_cb'); - late final _ime_event_set_input_context_reset_cb = - _ime_event_set_input_context_reset_cbPtr.asFunction< - int Function(ime_input_context_reset_cb, ffi.Pointer)>(); - - /// @brief Sets @c cursor_position_updated event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_cursor_position_updated_cb() callback function is called when the position - /// of the cursor in an associated text input UI control changes. - /// - /// @param[in] callback_func @c cursor_position_updated event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_cursor_position_updated_cb() - /// @see ime_run() - int ime_event_set_cursor_position_updated_cb( - ime_cursor_position_updated_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_cursor_position_updated_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_cursor_position_updated_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ime_cursor_position_updated_cb, ffi.Pointer)>>( - 'ime_event_set_cursor_position_updated_cb'); - late final _ime_event_set_cursor_position_updated_cb = - _ime_event_set_cursor_position_updated_cbPtr.asFunction< - int Function( - ime_cursor_position_updated_cb, ffi.Pointer)>(); - - /// @brief Sets @c language_requested event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_language_requested_cb() callback function is called when an associated - /// text input UI control requests the language from the input panel. - /// - /// @param[in] callback_func @c language_requested event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_language_requested_cb() - /// @see ime_run() - int ime_event_set_language_requested_cb( - ime_language_requested_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_language_requested_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_language_requested_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_language_requested_cb, - ffi.Pointer)>>('ime_event_set_language_requested_cb'); - late final _ime_event_set_language_requested_cb = - _ime_event_set_language_requested_cbPtr.asFunction< - int Function(ime_language_requested_cb, ffi.Pointer)>(); - - /// @brief Sets @c language_set event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_language_set_cb() callback function is called to set the preferred - /// language to the input panel. - /// - /// @param[in] callback_func @c language_set event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_language_set_cb() - /// @see ime_run() - int ime_event_set_language_set_cb( - ime_language_set_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_language_set_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_language_set_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_language_set_cb, - ffi.Pointer)>>('ime_event_set_language_set_cb'); - late final _ime_event_set_language_set_cb = _ime_event_set_language_set_cbPtr - .asFunction)>(); - - /// @brief Sets @c imdata_set event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_imdata_set_cb() callback function is called to set the application - /// specific data to deliver to the input panel. - /// - /// @param[in] callback_func @c imdata_set event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_imdata_set_cb() - /// @see ime_event_set_imdata_requested_cb() - /// @see ime_run() - int ime_event_set_imdata_set_cb( - ime_imdata_set_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_imdata_set_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_imdata_set_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_imdata_set_cb, - ffi.Pointer)>>('ime_event_set_imdata_set_cb'); - late final _ime_event_set_imdata_set_cb = _ime_event_set_imdata_set_cbPtr - .asFunction)>(); - - /// @brief Sets @c imdata_requested event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_imdata_requested_cb() callback function is called when an associated - /// text input UI control requests the application specific data from the input panel. - /// - /// @param[in] callback_func @c imdata_requested event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_imdata_requested_cb() - /// @see ime_event_set_imdata_set_cb() - /// @see ime_run() - int ime_event_set_imdata_requested_cb( - ime_imdata_requested_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_imdata_requested_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_imdata_requested_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_imdata_requested_cb, - ffi.Pointer)>>('ime_event_set_imdata_requested_cb'); - late final _ime_event_set_imdata_requested_cb = - _ime_event_set_imdata_requested_cbPtr.asFunction< - int Function(ime_imdata_requested_cb, ffi.Pointer)>(); - - /// @brief Sets @c layout_set event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_layout_set_cb() callback function is called when an associated text input - /// UI control requests the input panel to set its layout. - /// - /// @param[in] callback_func @c layout_set event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_layout_set_cb() - /// @see ime_run() - int ime_event_set_layout_set_cb( - ime_layout_set_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_layout_set_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_layout_set_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_layout_set_cb, - ffi.Pointer)>>('ime_event_set_layout_set_cb'); - late final _ime_event_set_layout_set_cb = _ime_event_set_layout_set_cbPtr - .asFunction)>(); - - /// @brief Sets @c return_key_type_set event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_return_key_type_set_cb() callback function is called when an associated - /// text input UI control requests the input panel to set the @c Return key label. - /// - /// @param[in] callback_func @c return_key_type_set event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_return_key_type_set_cb() - /// @see ime_run() - int ime_event_set_return_key_type_set_cb( - ime_return_key_type_set_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_return_key_type_set_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_return_key_type_set_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_return_key_type_set_cb, - ffi.Pointer)>>('ime_event_set_return_key_type_set_cb'); - late final _ime_event_set_return_key_type_set_cb = - _ime_event_set_return_key_type_set_cbPtr.asFunction< - int Function(ime_return_key_type_set_cb, ffi.Pointer)>(); - - /// @brief Sets @c return_key_state_set event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_return_key_state_set_cb() callback function is called when an associated - /// text input UI control requests the input panel to enable or disable the @c Return key state. - /// - /// @param[in] callback_func @c return_key_state_set event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_return_key_state_set_cb() - /// @see ime_run() - int ime_event_set_return_key_state_set_cb( - ime_return_key_state_set_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_return_key_state_set_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_return_key_state_set_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_return_key_state_set_cb, - ffi.Pointer)>>('ime_event_set_return_key_state_set_cb'); - late final _ime_event_set_return_key_state_set_cb = - _ime_event_set_return_key_state_set_cbPtr.asFunction< - int Function(ime_return_key_state_set_cb, ffi.Pointer)>(); - - /// @brief Sets @c geometry_requested event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_geometry_requested_cb() callback function is called when an associated - /// text input UI control requests the position and size from the input panel. - /// - /// @param[in] callback_func @c geometry_requested event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_geometry_requested_cb() - /// @see ime_run() - int ime_event_set_geometry_requested_cb( - ime_geometry_requested_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_geometry_requested_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_geometry_requested_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_geometry_requested_cb, - ffi.Pointer)>>('ime_event_set_geometry_requested_cb'); - late final _ime_event_set_geometry_requested_cb = - _ime_event_set_geometry_requested_cbPtr.asFunction< - int Function(ime_geometry_requested_cb, ffi.Pointer)>(); - - /// @brief Sets @c process_key_event event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_process_key_event_cb() callback function is called when the key event - /// is received from the external keyboard devices or ime_send_key_event() function. - /// - /// @param[in] callback_func @c process_key_event event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_process_key_event_cb() - /// @see ime_run() - /// - /// @code - /// static void inputmethod_create_cb(void *user_data); - /// static void inputmethod_terminate_cb(void *user_data); - /// static void inputmethod_show_cb(int context_id, ime_context_h context, void *user_data); - /// static void inputmethod_hide_cb(int context_id, void *user_data); - /// - /// static bool inputmethod_process_key_event_cb(ime_key_code_e keycode, ime_key_mask_e keymask, void *user_data); - /// { - /// if (keymask & IME_KEY_MASK_CONTROL) { - /// return false; // e.g., Control+C key event would be forwarded to UI control of the client application - /// } - /// if (keymask & IME_KEY_MASK_ALT) { - /// return false; - /// } - /// - /// if (!(keymask & IME_KEY_MASK_RELEASED)) { // The key is pressed - /// if (keycode == IME_KEY_1) { - /// ime_update_preedit_string("1"); // Show "1" preedit string - /// return true; - /// } - /// else if (keycode == IME_KEY_2) { - /// ime_commit_string("12"); // Input "12" string - /// return true; - /// } - /// } - /// - /// return false; - /// } - /// - /// void ime_app_main(int argc, char **argv) - /// { - /// ime_callback_s basic_callback = { - /// inputmethod_create_cb, - /// inputmethod_terminate_cb, - /// inputmethod_show_cb, - /// inputmethod_hide_cb, - /// }; - /// - /// ime_event_set_process_key_event_cb(inputmethod_process_key_event_cb, NULL); - /// - /// ime_run(&basic_callback, NULL); - /// } - /// @endcode - int ime_event_set_process_key_event_cb( - ime_process_key_event_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_process_key_event_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_process_key_event_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_process_key_event_cb, - ffi.Pointer)>>('ime_event_set_process_key_event_cb'); - late final _ime_event_set_process_key_event_cb = - _ime_event_set_process_key_event_cbPtr.asFunction< - int Function(ime_process_key_event_cb, ffi.Pointer)>(); - - /// @brief Sets @c display_language_changed event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_display_language_changed_cb() callback function is called when the system - /// display language is changed. - /// - /// @param[in] callback_func @c display_language_changed event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_display_language_changed_cb() - /// @see ime_run() - int ime_event_set_display_language_changed_cb( - ime_display_language_changed_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_display_language_changed_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_display_language_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ime_display_language_changed_cb, ffi.Pointer)>>( - 'ime_event_set_display_language_changed_cb'); - late final _ime_event_set_display_language_changed_cb = - _ime_event_set_display_language_changed_cbPtr.asFunction< - int Function( - ime_display_language_changed_cb, ffi.Pointer)>(); - - /// @brief Sets @c rotation_degree_changed event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_rotation_degree_changed_cb() callback function is called when the device - /// is rotated. - /// - /// @param[in] callback_func @c rotation_degree_changed event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_rotation_degree_changed_cb() - /// @see ime_run() - int ime_event_set_rotation_degree_changed_cb( - ime_rotation_degree_changed_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_rotation_degree_changed_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_rotation_degree_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ime_rotation_degree_changed_cb, ffi.Pointer)>>( - 'ime_event_set_rotation_degree_changed_cb'); - late final _ime_event_set_rotation_degree_changed_cb = - _ime_event_set_rotation_degree_changed_cbPtr.asFunction< - int Function( - ime_rotation_degree_changed_cb, ffi.Pointer)>(); - - /// @brief Sets @c accessibility_state_changed event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_accessibility_state_changed_cb() callback function is called when - /// Accessibility in Settings application is on or off. - /// - /// @param[in] callback_func @c accessibility_state_changed event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_accessibility_state_changed_cb() - /// @see ime_run() - int ime_event_set_accessibility_state_changed_cb( - ime_accessibility_state_changed_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_accessibility_state_changed_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_accessibility_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ime_accessibility_state_changed_cb, ffi.Pointer)>>( - 'ime_event_set_accessibility_state_changed_cb'); - late final _ime_event_set_accessibility_state_changed_cb = - _ime_event_set_accessibility_state_changed_cbPtr.asFunction< - int Function( - ime_accessibility_state_changed_cb, ffi.Pointer)>(); - - /// @brief Sets @c option_window_created event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_option_window_created_cb() callback function is called to create the option window. - /// - /// @param[in] callback_func @c option_window_created event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_option_window_created_cb() - /// @see ime_run() - int ime_event_set_option_window_created_cb( - ime_option_window_created_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_option_window_created_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_option_window_created_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ime_option_window_created_cb, ffi.Pointer)>>( - 'ime_event_set_option_window_created_cb'); - late final _ime_event_set_option_window_created_cb = - _ime_event_set_option_window_created_cbPtr.asFunction< - int Function(ime_option_window_created_cb, ffi.Pointer)>(); - - /// @brief Sets @c option_window_destroyed event callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_option_window_destroyed_cb() callback function is called to destroy the option window. - /// - /// @param[in] callback_func @c option_window_destroyed event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_option_window_destroyed_cb() - /// @see ime_run() - int ime_event_set_option_window_destroyed_cb( - ime_option_window_destroyed_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_option_window_destroyed_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_option_window_destroyed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ime_option_window_destroyed_cb, ffi.Pointer)>>( - 'ime_event_set_option_window_destroyed_cb'); - late final _ime_event_set_option_window_destroyed_cb = - _ime_event_set_option_window_destroyed_cbPtr.asFunction< - int Function( - ime_option_window_destroyed_cb, ffi.Pointer)>(); - - /// @brief Sends a key event to the associated text input UI control. - /// - /// @details This function sends key down or up event with key mask to the client application. - /// If @a forward_key is @c true, this key event goes to the edit field directly. And if @a forward_key - /// is @c false, the ime_process_key_event_cb() callback function receives the key event before the edit field. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] keycode The key code to be sent - /// @param[in] keymask The modifier key mask - /// @param[in] forward_key The flag to send the key event directly to the edit field - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @post If @a forward_key is @c false, the ime_process_key_event_cb() callback function can compose the text with the key events. - /// - /// @see ime_key_code_e - /// @see ime_key_mask_e - /// @see ime_process_key_event_cb() - int ime_send_key_event( - int keycode, - int keymask, - bool forward_key, - ) { - return _ime_send_key_event( - keycode, - keymask, - forward_key, - ); - } - - late final _ime_send_key_eventPtr = _lookup< - ffi.NativeFunction>( - 'ime_send_key_event'); - late final _ime_send_key_event = - _ime_send_key_eventPtr.asFunction(); - - /// @brief Sends the text to the associated text input UI control. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] str The UTF-8 string to be committed - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @see ime_show_preedit_string() - /// @see ime_hide_preedit_string() - /// @see ime_update_preedit_string() - int ime_commit_string( - ffi.Pointer str, - ) { - return _ime_commit_string( - str, - ); - } - - late final _ime_commit_stringPtr = - _lookup)>>( - 'ime_commit_string'); - late final _ime_commit_string = - _ime_commit_stringPtr.asFunction)>(); - - /// @brief Requests to show preedit string. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @see ime_commit_string() - /// @see ime_hide_preedit_string() - /// @see ime_update_preedit_string() - int ime_show_preedit_string() { - return _ime_show_preedit_string(); - } - - late final _ime_show_preedit_stringPtr = - _lookup>( - 'ime_show_preedit_string'); - late final _ime_show_preedit_string = - _ime_show_preedit_stringPtr.asFunction(); - - /// @brief Requests to hide preedit string. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @see ime_commit_string() - /// @see ime_show_preedit_string() - /// @see ime_update_preedit_string() - int ime_hide_preedit_string() { - return _ime_hide_preedit_string(); - } - - late final _ime_hide_preedit_stringPtr = - _lookup>( - 'ime_hide_preedit_string'); - late final _ime_hide_preedit_string = - _ime_hide_preedit_stringPtr.asFunction(); - - /// @brief Updates a new preedit string. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] str The UTF-8 string to be updated in preedit - /// @param[in] attrs The Eina_List which has #ime_preedit_attribute lists; @a str can be composed of multiple - /// string attributes: underline, highlight color and reversal color. The @a attrs will be released internally - /// on success and it can be NULL if no attributes to set - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @post This function is supposed to be followed by the ime_show_preedit_string() function. - /// - /// @see ime_preedit_attribute - /// @see ime_commit_string() - /// @see ime_show_preedit_string() - /// @see ime_hide_preedit_string() - /// - /// @code - /// { - /// int ret; - /// Eina_List *list = NULL; - /// - /// ime_preedit_attribute *attr = calloc(1, sizeof(ime_preedit_attribute)); - /// attr->start = 0; - /// attr->length = 1; - /// attr->type = IME_ATTR_FONTSTYLE; - /// attr->value = IME_ATTR_FONTSTYLE_UNDERLINE; - /// list = eina_list_append(list, attr); - /// - /// attr = calloc(1, sizeof(ime_preedit_attribute)); - /// attr->start = 1; - /// attr->length = 1; - /// attr->type = IME_ATTR_FONTSTYLE; - /// attr->value = IME_ATTR_FONTSTYLE_HIGHLIGHT; - /// list = eina_list_append(list, attr); - /// - /// attr = calloc(1, sizeof(ime_preedit_attribute)); - /// attr->start = 2; - /// attr->length = 1; - /// attr->type = IME_ATTR_FONTSTYLE; - /// attr->value = IME_ATTR_FONTSTYLE_REVERSAL; - /// list = eina_list_append(list, attr); - /// - /// ret = ime_update_preedit_string("abcd", list); - /// if (ret != IME_ERROR_NONE) { - /// EINA_LIST_FREE(list, attr) - /// free(attr); - /// } - /// } - /// @endcode - int ime_update_preedit_string( - ffi.Pointer str, - ffi.Pointer attrs, - ) { - return _ime_update_preedit_string( - str, - attrs, - ); - } - - late final _ime_update_preedit_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('ime_update_preedit_string'); - late final _ime_update_preedit_string = - _ime_update_preedit_stringPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - /// @brief Requests the surrounding text from the position of the cursor, asynchronously. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] maxlen_before The maximum length of string to be retrieved before the cursor; -1 means unlimited - /// @param[in] maxlen_after The maximum length of string to be retrieved after the cursor; -1 means unlimited - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NO_CALLBACK_FUNCTION Necessary callback function is not set - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @pre The ime_surrounding_text_updated_cb() callback function MUST be set by ime_event_set_surrounding_text_updated_cb(). - /// - /// @post The requested surrounding text can be received using the ime_surrounding_text_updated_cb() callback function. - /// - /// @see ime_delete_surrounding_text() - /// @see ime_event_set_surrounding_text_updated_cb() - /// @see ime_surrounding_text_updated_cb() - int ime_request_surrounding_text( - int maxlen_before, - int maxlen_after, - ) { - return _ime_request_surrounding_text( - maxlen_before, - maxlen_after, - ); - } - - late final _ime_request_surrounding_textPtr = - _lookup>( - 'ime_request_surrounding_text'); - late final _ime_request_surrounding_text = - _ime_request_surrounding_textPtr.asFunction(); - - /// @brief Requests to delete surrounding text. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] offset The offset value from the cursor position - /// @param[in] len The length of the text to delete - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @see ime_request_surrounding_text() - int ime_delete_surrounding_text( - int offset, - int len, - ) { - return _ime_delete_surrounding_text( - offset, - len, - ); - } - - late final _ime_delete_surrounding_textPtr = - _lookup>( - 'ime_delete_surrounding_text'); - late final _ime_delete_surrounding_text = - _ime_delete_surrounding_textPtr.asFunction(); - - /// @brief Gets the surrounding text from the position of the cursor, synchronously. - /// - /// @since_tizen 3.0 - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks @a text must be released using free(). - /// - /// @param[in] maxlen_before The maximum length of string to be retrieved before the cursor; -1 means unlimited - /// @param[in] maxlen_after The maximum length of string to be retrieved after the cursor; -1 means unlimited - /// @param[out] text The surrounding text - /// @param[out] cursor_pos The cursor position - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// @retval #IME_ERROR_OUT_OF_MEMORY Failed to obtain text due to out of memory - /// - /// @see ime_delete_surrounding_text() - int ime_get_surrounding_text( - int maxlen_before, - int maxlen_after, - ffi.Pointer> text, - ffi.Pointer cursor_pos, - ) { - return _ime_get_surrounding_text( - maxlen_before, - maxlen_after, - text, - cursor_pos, - ); - } - - late final _ime_get_surrounding_textPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Int, ffi.Pointer>, - ffi.Pointer)>>('ime_get_surrounding_text'); - late final _ime_get_surrounding_text = - _ime_get_surrounding_textPtr.asFunction< - int Function(int, int, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Requests to set selection. - /// - /// @since_tizen 3.0 - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] start The start cursor position in text (in characters not bytes) - /// @param[in] end The end cursor position in text (in characters not bytes) - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - int ime_set_selection( - int start, - int end, - ) { - return _ime_set_selection( - start, - end, - ); - } - - late final _ime_set_selectionPtr = - _lookup>( - 'ime_set_selection'); - late final _ime_set_selection = - _ime_set_selectionPtr.asFunction(); - - /// @brief Gets the selected text synchronously. - /// - /// @details If multi-line text is selected, the result will contain '\n' for each newline character. - /// And if the selected text is empty, the result will be an empty string. - /// - /// @since_tizen 4.0 - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks @a text must be released using free(). - /// - /// @param[out] text The selected text - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - int ime_get_selected_text( - ffi.Pointer> text, - ) { - return _ime_get_selected_text( - text, - ); - } - - late final _ime_get_selected_textPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>)>>('ime_get_selected_text'); - late final _ime_get_selected_text = _ime_get_selected_textPtr - .asFunction>)>(); - - /// @brief This API returns the pointer of input panel main window. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The specific error code can be obtained using the get_last_result() method if this function returns NULL. - /// - /// @return The input panel main window object on success, otherwise NULL - /// - /// @exception #IME_ERROR_NONE Successful - /// @exception #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @exception #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// @exception #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @see get_last_result() - /// @see ime_create_cb() - /// @see ime_terminate_cb() - /// @see ime_show_cb() - /// @see ime_hide_cb() - ffi.Pointer ime_get_main_window() { - return _ime_get_main_window(); - } - - late final _ime_get_main_windowPtr = - _lookup Function()>>( - 'ime_get_main_window'); - late final _ime_get_main_window = - _ime_get_main_windowPtr.asFunction Function()>(); - - /// @brief This API updates the input panel window's size information. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] portrait_width The width in portrait mode - /// @param[in] portrait_height The height in portrait mode - /// @param[in] landscape_width The width in landscape mode - /// @param[in] landscape_height The height in landscape mode - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @see ime_create_cb() - int ime_set_size( - int portrait_width, - int portrait_height, - int landscape_width, - int landscape_height, - ) { - return _ime_set_size( - portrait_width, - portrait_height, - landscape_width, - landscape_height, - ); - } - - late final _ime_set_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Int, ffi.Int, ffi.Int)>>('ime_set_size'); - late final _ime_set_size = - _ime_set_sizePtr.asFunction(); - - /// @brief Requests to create an option window from the input panel. - /// - /// @details The input panel can call this function to open the option window. This - /// function calls ime_option_window_created_cb() callback function with - /// #IME_OPTION_WINDOW_TYPE_KEYBOARD parameter. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NO_CALLBACK_FUNCTION Necessary callback function is not set - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// @retval #IME_ERROR_OPERATION_FAILED Operation failed - /// - /// @pre The ime_option_window_created_cb() and ime_option_window_destroyed_cb() - /// callback functions MUST be set by ime_event_set_option_window_created_cb() and - /// ime_event_set_option_window_destroyed_cb() respectively. - /// - /// @post This function calls ime_option_window_created_cb() callback function to - /// create the option window. And ime_destroy_option_window() function can be called - /// to close the option window. - /// - /// @see ime_event_set_option_window_created_cb() - /// @see ime_option_window_created_cb() - /// @see ime_destroy_option_window() - int ime_create_option_window() { - return _ime_create_option_window(); - } - - late final _ime_create_option_windowPtr = - _lookup>( - 'ime_create_option_window'); - late final _ime_create_option_window = - _ime_create_option_windowPtr.asFunction(); - - /// @brief Requests to destroy an option window. - /// - /// @details The input panel can call this function to close the option window which - /// is created from either the input panel or Settings application. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] window The option window to destroy - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NO_CALLBACK_FUNCTION Necessary callback function is not set - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @pre The ime_option_window_created_cb() and ime_option_window_destroyed_cb() - /// callback functions MUST be set by ime_event_set_option_window_created_cb() and - /// ime_event_set_option_window_destroyed_cb() respectively. - /// - /// @post This function calls ime_option_window_destroyed_cb() callback function - /// to destroy the option window. - /// - /// @see ime_event_set_option_window_destroyed_cb() - /// @see ime_option_window_destroyed_cb() - /// @see ime_create_option_window() - int ime_destroy_option_window( - ffi.Pointer window, - ) { - return _ime_destroy_option_window( - window, - ); - } - - late final _ime_destroy_option_windowPtr = - _lookup)>>( - 'ime_destroy_option_window'); - late final _ime_destroy_option_window = _ime_destroy_option_windowPtr - .asFunction)>(); - - /// @brief Gets the layout information from the given input context. - /// - /// @details Each edit field has various attributes for input panel. This function can be - /// called to get the layout information in ime_show_cb() callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] context The input context information of an associated text input UI control - /// @param[out] layout Layout information - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @post Input panel UI should be drawn or operated by this information accordingly. - /// - /// @see ime_show_cb() - /// @see ime_layout_set_cb() - int ime_context_get_layout( - ime_context_h context, - ffi.Pointer layout, - ) { - return _ime_context_get_layout( - context, - layout, - ); - } - - late final _ime_context_get_layoutPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_context_h, - ffi.Pointer)>>('ime_context_get_layout'); - late final _ime_context_get_layout = _ime_context_get_layoutPtr - .asFunction)>(); - - /// @brief Gets the layout variation information from the given input context. - /// - /// @details Each edit field has various attributes for input panel. This function can be - /// called to get the layout variation information in ime_show_cb() callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] context The input context information of an associated text input UI control - /// @param[out] layout_variation Layout variation information - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @post Input panel UI should be drawn or operated by this information accordingly. - /// - /// @see ime_show_cb() - /// @see ime_layout_variation_e - int ime_context_get_layout_variation( - ime_context_h context, - ffi.Pointer layout_variation, - ) { - return _ime_context_get_layout_variation( - context, - layout_variation, - ); - } - - late final _ime_context_get_layout_variationPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_context_h, - ffi.Pointer)>>('ime_context_get_layout_variation'); - late final _ime_context_get_layout_variation = - _ime_context_get_layout_variationPtr - .asFunction)>(); - - /// @brief Gets the cursor position information from the given input context. - /// - /// @details Each edit field has various attributes for input panel. This function can be - /// called to get the cursor position information in ime_show_cb() callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] context The input context information of an associated text input UI control - /// @param[out] cursor_pos Cursor position information - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @post Input panel UI should be drawn or operated by this information accordingly. - /// - /// @see ime_show_cb() - /// @see ime_cursor_position_updated_cb() - int ime_context_get_cursor_position( - ime_context_h context, - ffi.Pointer cursor_pos, - ) { - return _ime_context_get_cursor_position( - context, - cursor_pos, - ); - } - - late final _ime_context_get_cursor_positionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_context_h, - ffi.Pointer)>>('ime_context_get_cursor_position'); - late final _ime_context_get_cursor_position = - _ime_context_get_cursor_positionPtr - .asFunction)>(); - - /// @brief Gets the autocapital type information from the given input context. - /// - /// @details Each edit field has various attributes for input panel. This function can be - /// called to get the autocapital type information in ime_show_cb() callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] context The input context information of an associated text input UI control - /// @param[out] autocapital_type Autocapital type information - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @post Input panel UI should be drawn or operated by this information accordingly. - /// - /// @see ime_show_cb() - int ime_context_get_autocapital_type( - ime_context_h context, - ffi.Pointer autocapital_type, - ) { - return _ime_context_get_autocapital_type( - context, - autocapital_type, - ); - } - - late final _ime_context_get_autocapital_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_context_h, - ffi.Pointer)>>('ime_context_get_autocapital_type'); - late final _ime_context_get_autocapital_type = - _ime_context_get_autocapital_typePtr - .asFunction)>(); - - /// @brief Gets the @c Return key label type information from the given input context. - /// - /// @details Each edit field has various attributes for input panel. This function can be - /// called to get the @c Return key label type information in ime_show_cb() callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] context The input context information of an associated text input UI control - /// @param[out] return_key_type The @c Return key label type information - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @post Input panel UI should be drawn or operated by this information accordingly. - /// - /// @see ime_show_cb() - /// @see ime_return_key_type_set_cb() - int ime_context_get_return_key_type( - ime_context_h context, - ffi.Pointer return_key_type, - ) { - return _ime_context_get_return_key_type( - context, - return_key_type, - ); - } - - late final _ime_context_get_return_key_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_context_h, - ffi.Pointer)>>('ime_context_get_return_key_type'); - late final _ime_context_get_return_key_type = - _ime_context_get_return_key_typePtr - .asFunction)>(); - - /// @brief Gets the @c Return key state information from the given input context. - /// - /// @details Each edit field has various attributes for input panel. This function can be - /// called to get the @c Return key state information in ime_show_cb() callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] context The input context information of an associated text input UI control - /// @param[out] return_key_state The @c Return key state information \n @c true to enable @c Return key - /// button, @c false to disable @c Return key button - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @post Input panel UI should be drawn or operated by this information accordingly. - /// - /// @see ime_show_cb() - /// @see ime_return_key_state_set_cb() - int ime_context_get_return_key_state( - ime_context_h context, - ffi.Pointer return_key_state, - ) { - return _ime_context_get_return_key_state( - context, - return_key_state, - ); - } - - late final _ime_context_get_return_key_statePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_context_h, - ffi.Pointer)>>('ime_context_get_return_key_state'); - late final _ime_context_get_return_key_state = - _ime_context_get_return_key_statePtr - .asFunction)>(); - - /// @brief Gets the prediction mode information from the given input context. - /// - /// @details Each edit field has various attributes for input panel. This function can be - /// called to get the prediction mode information in ime_show_cb() callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] context The input context information of an associated text input UI control - /// @param[out] prediction_mode Prediction mode information \n @c true to allow the predictive - /// text feature if available, @c false to disable the predictive text feature - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @post Input panel UI should be drawn or operated by this information accordingly. - /// - /// @see ime_show_cb() - int ime_context_get_prediction_mode( - ime_context_h context, - ffi.Pointer prediction_mode, - ) { - return _ime_context_get_prediction_mode( - context, - prediction_mode, - ); - } - - late final _ime_context_get_prediction_modePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_context_h, - ffi.Pointer)>>('ime_context_get_prediction_mode'); - late final _ime_context_get_prediction_mode = - _ime_context_get_prediction_modePtr - .asFunction)>(); - - /// @brief Gets the password mode information from the given input context. - /// - /// @details Each edit field has various attributes for input panel. This function can be - /// called to get the password mode information in ime_show_cb() callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks If @a password_mode is @c true, the input panel is advised not to support the predictive text. - /// - /// @param[in] context The input context information of an associated text input UI control - /// @param[out] password_mode Password mode information \n @c true to indicate that a password being inputted, - /// @c false to indicate non-password edit field. - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @post Input panel UI should be drawn or operated by this information accordingly. - /// - /// @see ime_show_cb() - int ime_context_get_password_mode( - ime_context_h context, - ffi.Pointer password_mode, - ) { - return _ime_context_get_password_mode( - context, - password_mode, - ); - } - - late final _ime_context_get_password_modePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_context_h, - ffi.Pointer)>>('ime_context_get_password_mode'); - late final _ime_context_get_password_mode = _ime_context_get_password_modePtr - .asFunction)>(); - - /// @brief Gets the input hint information from the given input context. - /// - /// @details Each edit field has various attributes for input panel. This function can be - /// called to get the input hint information in ime_show_cb() callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks @a input_hint is a bit-wise value which recommends the input panel provide - /// an auto completion and so on if it is capable of supporting such features. - /// - /// @param[in] context The input context information of an associated text input UI control - /// @param[out] input_hint Input hint information - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @post Input panel UI should be drawn or operated by this information accordingly. - /// - /// @see ime_show_cb() - int ime_context_get_input_hint( - ime_context_h context, - ffi.Pointer input_hint, - ) { - return _ime_context_get_input_hint( - context, - input_hint, - ); - } - - late final _ime_context_get_input_hintPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_context_h, - ffi.Pointer)>>('ime_context_get_input_hint'); - late final _ime_context_get_input_hint = _ime_context_get_input_hintPtr - .asFunction)>(); - - /// @brief Gets the text bidirectional information from the given input context. - /// - /// @details Each edit field has various attributes for input panel. This function can be - /// called to get the bidirectional information in ime_show_cb() callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] context The input context information of an associated text input UI control - /// @param[out] bidi Text bidirectional information - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @post Input panel UI should be drawn or operated by this information accordingly. - /// - /// @see ime_show_cb() - int ime_context_get_bidi_direction( - ime_context_h context, - ffi.Pointer bidi, - ) { - return _ime_context_get_bidi_direction( - context, - bidi, - ); - } - - late final _ime_context_get_bidi_directionPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_context_h, - ffi.Pointer)>>('ime_context_get_bidi_direction'); - late final _ime_context_get_bidi_direction = - _ime_context_get_bidi_directionPtr - .asFunction)>(); - - /// @brief Gets the preferred language information from the given input context. - /// - /// @details Each edit field has various attributes for input panel. This function can be - /// called to get the preferred language information in ime_show_cb() callback function. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] context The input context information of an associated text input UI control - /// @param[out] language Preferred language information - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @post Input panel UI should be drawn or operated by this information accordingly. - /// - /// @see ime_show_cb() - int ime_context_get_language( - ime_context_h context, - ffi.Pointer language, - ) { - return _ime_context_get_language( - context, - language, - ); - } - - late final _ime_context_get_languagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_context_h, - ffi.Pointer)>>('ime_context_get_language'); - late final _ime_context_get_language = _ime_context_get_languagePtr - .asFunction)>(); - - /// @brief Gets the device name of the key event. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks @a dev_name must be released using free(). - /// - /// @param[in] dev_info The device information from the key event - /// @param[out] dev_name The name of key input device. This can be an empty string if the device name is not available - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @see ime_process_key_event_cb() - /// @see ime_device_info_get_class() - /// @see ime_device_info_get_subclass() - int ime_device_info_get_name( - ime_device_info_h dev_info, - ffi.Pointer> dev_name, - ) { - return _ime_device_info_get_name( - dev_info, - dev_name, - ); - } - - late final _ime_device_info_get_namePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_device_info_h, - ffi.Pointer>)>>('ime_device_info_get_name'); - late final _ime_device_info_get_name = - _ime_device_info_get_namePtr.asFunction< - int Function( - ime_device_info_h, ffi.Pointer>)>(); - - /// @brief Gets the device class of the key event. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] dev_info The device information from the key event - /// @param[out] dev_class The class of key input device. This can be #ECORE_IMF_DEVICE_CLASS_NONE if the device class is not available - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @see ime_process_key_event_cb() - /// @see ime_device_info_get_name() - /// @see ime_device_info_get_subclass() - int ime_device_info_get_class( - ime_device_info_h dev_info, - ffi.Pointer dev_class, - ) { - return _ime_device_info_get_class( - dev_info, - dev_class, - ); - } - - late final _ime_device_info_get_classPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_device_info_h, - ffi.Pointer)>>('ime_device_info_get_class'); - late final _ime_device_info_get_class = _ime_device_info_get_classPtr - .asFunction)>(); - - /// @brief Gets the device subclass of the key event. - /// - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] dev_info The device information from the key event - /// @param[out] dev_subclass The subclass of key input device. This can be #ECORE_IMF_DEVICE_SUBCLASS_NONE if the device subclass is not available - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @see ime_process_key_event_cb() - /// @see ime_device_info_get_name() - /// @see ime_device_info_get_class() - int ime_device_info_get_subclass( - ime_device_info_h dev_info, - ffi.Pointer dev_subclass, - ) { - return _ime_device_info_get_subclass( - dev_info, - dev_subclass, - ); - } - - late final _ime_device_info_get_subclassPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_device_info_h, - ffi.Pointer)>>('ime_device_info_get_subclass'); - late final _ime_device_info_get_subclass = _ime_device_info_get_subclassPtr - .asFunction)>(); - - /// @brief Sets prediction hint event callback function. - /// - /// @since_tizen 4.0 - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_prediction_hint_set_cb() callback function is called to set the prediction - /// hint string to deliver to the input panel. - /// - /// @param[in] callback_func The prediction hint event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_prediction_hint_set_cb() - /// @see ime_run() - int ime_event_set_prediction_hint_set_cb( - ime_prediction_hint_set_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_prediction_hint_set_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_prediction_hint_set_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ime_prediction_hint_set_cb, - ffi.Pointer)>>('ime_event_set_prediction_hint_set_cb'); - late final _ime_event_set_prediction_hint_set_cb = - _ime_event_set_prediction_hint_set_cbPtr.asFunction< - int Function(ime_prediction_hint_set_cb, ffi.Pointer)>(); - - /// @brief Sets MIME type event callback function. - /// - /// @since_tizen 4.0 - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_mime_type_set_request_cb() callback function is called when an associated text input - /// UI control requests the text entry to set the MIME type. - /// - /// @param[in] callback_func MIME type event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_mime_type_set_request_cb() - /// @see ime_run() - int ime_event_set_mime_type_set_request_cb( - ime_mime_type_set_request_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_mime_type_set_request_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_mime_type_set_request_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ime_mime_type_set_request_cb, ffi.Pointer)>>( - 'ime_event_set_mime_type_set_request_cb'); - late final _ime_event_set_mime_type_set_request_cb = - _ime_event_set_mime_type_set_request_cbPtr.asFunction< - int Function(ime_mime_type_set_request_cb, ffi.Pointer)>(); - - /// @brief Sends a private command to the associated text input UI control. - /// - /// @details This can be used by IME to deliver specific data to an application. - /// The data format MUST be negotiated by both application and IME. - /// - /// @since_tizen 4.0 - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] command The UTF-8 string to be sent - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - int ime_send_private_command( - ffi.Pointer command, - ) { - return _ime_send_private_command( - command, - ); - } - - late final _ime_send_private_commandPtr = - _lookup)>>( - 'ime_send_private_command'); - late final _ime_send_private_command = _ime_send_private_commandPtr - .asFunction)>(); - - /// @brief Commits contents such as image to the associated text input UI control. - /// - /// @since_tizen 4.0 - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] content The content URI to be sent - /// @param[in] description The content description - /// @param[in] mime_type The MIME type received from the ime_mime_type_set_request_cb() - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @see ime_mime_type_set_request_cb() - /// @see ime_event_set_mime_type_set_request_cb() - int ime_commit_content( - ffi.Pointer content, - ffi.Pointer description, - ffi.Pointer mime_type, - ) { - return _ime_commit_content( - content, - description, - mime_type, - ); - } - - late final _ime_commit_contentPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('ime_commit_content'); - late final _ime_commit_content = _ime_commit_contentPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Sets the floating mode or not. - /// - /// @since_tizen 4.0 - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @param[in] floating_mode @c true - floating mode on, @c false - floating mode off - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @see ime_set_floating_drag_start() - /// @see ime_set_floating_drag_end() - int ime_set_floating_mode( - bool floating_mode, - ) { - return _ime_set_floating_mode( - floating_mode, - ); - } - - late final _ime_set_floating_modePtr = - _lookup>( - 'ime_set_floating_mode'); - late final _ime_set_floating_mode = - _ime_set_floating_modePtr.asFunction(); - - /// @brief Allows the floating input panel window to move along with the mouse pointer when the mouse is pressed. - /// - /// @since_tizen 4.0 - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks This function can be used in floating mode. If the floating mode is deactivated, calling this function has no effect. - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @pre The floating mode was turned on with ime_set_floating_mode(). - /// - /// @see ime_set_floating_mode() - /// @see ime_set_floating_drag_end() - int ime_set_floating_drag_start() { - return _ime_set_floating_drag_start(); - } - - late final _ime_set_floating_drag_startPtr = - _lookup>( - 'ime_set_floating_drag_start'); - late final _ime_set_floating_drag_start = - _ime_set_floating_drag_startPtr.asFunction(); - - /// @brief Disallows the movement of the floating input panel window with the mouse pointer when the mouse is pressed. - /// - /// @details This function must be called after invoking ime_set_floating_drag_start(). Otherwise the call is ignored. - /// - /// @since_tizen 4.0 - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks This function can be used in floating mode. If the floating mode is deactivated, calling this function has no effect. - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - /// - /// @pre The floating mode was turned on with ime_set_floating_mode(). - /// @pre ime_set_floating_drag_start() was called before. - /// - /// @see ime_set_floating_mode() - /// @see ime_set_floating_drag_start() - int ime_set_floating_drag_end() { - return _ime_set_floating_drag_end(); - } - - late final _ime_set_floating_drag_endPtr = - _lookup>( - 'ime_set_floating_drag_end'); - late final _ime_set_floating_drag_end = - _ime_set_floating_drag_endPtr.asFunction(); - - /// @brief Sets prediction hint data event callback function. - /// - /// @since_tizen 5.0 - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @remarks The ime_prediction_hint_data_set_cb() callback function is called to set the prediction - /// hint key and value to deliver to the input panel. - /// - /// @param[in] callback_func The prediction hint event callback function - /// @param[in] user_data User data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// - /// @post The ime_run() function should be called to start to run IME application's main loop. - /// - /// @see ime_prediction_hint_data_set_cb() - /// @see ime_run() - int ime_event_set_prediction_hint_data_set_cb( - ime_prediction_hint_data_set_cb callback_func, - ffi.Pointer user_data, - ) { - return _ime_event_set_prediction_hint_data_set_cb( - callback_func, - user_data, - ); - } - - late final _ime_event_set_prediction_hint_data_set_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ime_prediction_hint_data_set_cb, ffi.Pointer)>>( - 'ime_event_set_prediction_hint_data_set_cb'); - late final _ime_event_set_prediction_hint_data_set_cb = - _ime_event_set_prediction_hint_data_set_cbPtr.asFunction< - int Function( - ime_prediction_hint_data_set_cb, ffi.Pointer)>(); - - /// @brief Sends the request to hide IME. - /// - /// @since_tizen 5.0 - /// - /// @privlevel public - /// - /// @privilege %http://tizen.org/privilege/ime - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #IME_ERROR_NONE No error - /// @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet - int ime_request_hide() { - return _ime_request_hide(); - } - - late final _ime_request_hidePtr = - _lookup>('ime_request_hide'); - late final _ime_request_hide = - _ime_request_hidePtr.asFunction(); - - /// @brief Requests to open the installed IME list menu. - /// @details This function provides the installed IME list menu for the IME developers who might want to open it to enable their IME. - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/imemanager - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IME_MANAGER_ERROR_NONE No error - /// @retval #IME_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @see ime_manager_show_ime_selector() - int ime_manager_show_ime_list() { - return _ime_manager_show_ime_list(); - } - - late final _ime_manager_show_ime_listPtr = - _lookup>( - 'ime_manager_show_ime_list'); - late final _ime_manager_show_ime_list = - _ime_manager_show_ime_listPtr.asFunction(); - - /// @brief Requests to open the IME selector menu. - /// @details This function provides the IME selector menu for the IME or other application developers who might want to change the default IME. - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/imemanager - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IME_MANAGER_ERROR_NONE No error - /// @retval #IME_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @see ime_manager_show_ime_list() - int ime_manager_show_ime_selector() { - return _ime_manager_show_ime_selector(); - } - - late final _ime_manager_show_ime_selectorPtr = - _lookup>( - 'ime_manager_show_ime_selector'); - late final _ime_manager_show_ime_selector = - _ime_manager_show_ime_selectorPtr.asFunction(); - - /// @brief Checks if the specific IME is enabled or disabled in the system keyboard setting. - /// @details The IME developers can use this function to check their IME is enabled or not. - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/imemanager - /// @param[in] app_id The application ID of the IME - /// @param[out] enabled The On (enabled) and Off (disabled) state of the IME - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IME_MANAGER_ERROR_NONE No error - /// @retval #IME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @see ime_manager_show_ime_list() - int ime_manager_is_ime_enabled( - ffi.Pointer app_id, - ffi.Pointer enabled, - ) { - return _ime_manager_is_ime_enabled( - app_id, - enabled, - ); - } - - late final _ime_manager_is_ime_enabledPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('ime_manager_is_ime_enabled'); - late final _ime_manager_is_ime_enabled = _ime_manager_is_ime_enabledPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Checks which IME is the current activated (selected) IME. - /// @since_tizen @if MOBILE 2.4 @else 3.0 @endif - /// @remarks @a app_id must be released using free(). - /// @privlevel public - /// @privilege %http://tizen.org/privilege/imemanager - /// @param[out] app_id The application ID of the active IME - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IME_MANAGER_ERROR_NONE No error - /// @retval #IME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #IME_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @see ime_manager_show_ime_selector() - int ime_manager_get_active_ime( - ffi.Pointer> app_id, - ) { - return _ime_manager_get_active_ime( - app_id, - ); - } - - late final _ime_manager_get_active_imePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>)>>( - 'ime_manager_get_active_ime'); - late final _ime_manager_get_active_ime = _ime_manager_get_active_imePtr - .asFunction>)>(); - - /// @brief Gets the number of IMEs which are enabled (usable). - /// @since_tizen 3.0 - /// @remarks The specific error code can be obtained using the get_last_result() method. - /// Error codes are described in Exception section. - /// @privlevel public - /// @privilege %http://tizen.org/privilege/imemanager - /// @return The @a number of enabled IMEs on success, - /// otherwise @c 0 - /// @exception IME_MANAGER_ERROR_NONE Successful - /// @exception IME_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @exception IME_MANAGER_ERROR_OPERATION_FAILED Operation failed - /// @see ime_manager_is_ime_enabled() - /// @see ime_manager_show_ime_selector() - int ime_manager_get_enabled_ime_count() { - return _ime_manager_get_enabled_ime_count(); - } - - late final _ime_manager_get_enabled_ime_countPtr = - _lookup>( - 'ime_manager_get_enabled_ime_count'); - late final _ime_manager_get_enabled_ime_count = - _ime_manager_get_enabled_ime_countPtr.asFunction(); - - /// @brief Requests to pre-launch the IME. - /// @details The developers can use this function to launch IME in On-demand mode. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/imemanager - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #IME_MANAGER_ERROR_NONE No error - /// @retval #IME_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function - /// @retval #IME_MANAGER_ERROR_OPERATION_FAILED Operation failed - int ime_manager_prelaunch_ime() { - return _ime_manager_prelaunch_ime(); - } - - late final _ime_manager_prelaunch_imePtr = - _lookup>( - 'ime_manager_prelaunch_ime'); - late final _ime_manager_prelaunch_ime = - _ime_manager_prelaunch_imePtr.asFunction(); - - /// @brief Initializes multi-assistant client. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MA_ERROR_NONE Successful - /// @retval #MA_ERROR_NOT_SUPPORTED Not supported - /// @retval #MA_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MA_ERROR_OPERATION_FAILED Operation failed - /// @retval #MA_ERROR_OUT_OF_MEMORY Out of memory - /// - /// @post If this function is called, the state will be #MA_STATE_INITIALIZED. - /// @see ma_deinitialize() - int ma_initialize() { - return _ma_initialize(); - } - - late final _ma_initializePtr = - _lookup>('ma_initialize'); - late final _ma_initialize = _ma_initializePtr.asFunction(); - - /// @brief Deinitializes multi-assistant client. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MA_ERROR_NONE Successful - /// @retval #MA_ERROR_NOT_SUPPORTED Not supported - /// @retval #MA_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MA_ERROR_INVALID_STATE Invalid state - /// - /// @post If this function is called, the state will be #MA_STATE_NONE. - /// @see ma_initialize() - int ma_deinitialize() { - return _ma_deinitialize(); - } - - late final _ma_deinitializePtr = - _lookup>('ma_deinitialize'); - late final _ma_deinitialize = - _ma_deinitializePtr.asFunction(); - - /// @brief Prepares multi-assistant client. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MA_ERROR_NONE Successful - /// @retval #MA_ERROR_NOT_SUPPORTED Not supported - /// @retval #MA_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MA_ERROR_INVALID_STATE Invalid state - /// - /// @pre The state should be #MA_STATE_INITIALIZED. - /// @post If this function is called, the state will be #MA_STATE_READY. - /// @see ma_unprepare() - int ma_prepare() { - return _ma_prepare(); - } - - late final _ma_preparePtr = - _lookup>('ma_prepare'); - late final _ma_prepare = _ma_preparePtr.asFunction(); - - /// @brief Unprepares multi-assistant client. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MA_ERROR_NONE Successful - /// @retval #MA_ERROR_NOT_SUPPORTED Not supported - /// @retval #MA_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MA_ERROR_INVALID_STATE Invalid state - /// - /// @pre The state should be #MA_STATE_READY. - /// @post If this function is called, the state will be #MA_STATE_INITIALIZED. - /// @see ma_prepare() - int ma_unprepare() { - return _ma_unprepare(); - } - - late final _ma_unpreparePtr = - _lookup>('ma_unprepare'); - late final _ma_unprepare = _ma_unpreparePtr.asFunction(); - - /// @brief Gets the current state of the multi-assistant client. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// - /// @param[out] state The current state - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MA_ERROR_NONE Successful - /// @retval #MA_ERROR_NOT_SUPPORTED Not supported - /// @retval #MA_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MA_ERROR_INVALID_STATE Invalid state - /// @retval #MA_ERROR_INVALID_PARAMETER Invalid parameter - int ma_get_state( - ffi.Pointer state, - ) { - return _ma_get_state( - state, - ); - } - - late final _ma_get_statePtr = - _lookup)>>( - 'ma_get_state'); - late final _ma_get_state = - _ma_get_statePtr.asFunction)>(); - - /// @brief Gets the current language of multi-assistant client. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// - /// @remarks The @a language should be released using free(). - /// @param[out] language The current language - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MA_ERROR_NONE Successful - /// @retval #MA_ERROR_NOT_SUPPORTED Not supported - /// @retval #MA_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MA_ERROR_INVALID_PARAMETER Invalid parameter - int ma_get_current_language( - ffi.Pointer> language, - ) { - return _ma_get_current_language( - language, - ); - } - - late final _ma_get_current_languagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>)>>('ma_get_current_language'); - late final _ma_get_current_language = _ma_get_current_languagePtr - .asFunction>)>(); - - /// @brief Gets the recording audio format. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// - /// @param[out] rate The audio sampling rate - /// @param[out] channel The audio channel - /// @param[out] audio_type The audio type - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MA_ERROR_NONE Successful - /// @retval #MA_ERROR_NOT_SUPPORTED Not supported - /// @retval #MA_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MA_ERROR_INVALID_STATE Invalid state - /// @retval #MA_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #MA_ERROR_OPERATION_FAILED Operation failed - /// - /// @pre The state should be #MA_STATE_READY. - int ma_get_recording_audio_format( - ffi.Pointer rate, - ffi.Pointer channel, - ffi.Pointer audio_type, - ) { - return _ma_get_recording_audio_format( - rate, - channel, - audio_type, - ); - } - - late final _ma_get_recording_audio_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('ma_get_recording_audio_format'); - late final _ma_get_recording_audio_format = - _ma_get_recording_audio_formatPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Sets a state changed callback. - /// @since_tizen 5.0 - /// - /// @param[in] callback The callback - /// @param[in] user_data The user data passed to the callback function - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MA_ERROR_NONE Successful - /// @retval #MA_ERROR_NOT_SUPPORTED Not supported - /// @retval #MA_ERROR_INVALID_STATE Invalid state - /// @retval #MA_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre The state should be #MA_STATE_INITIALIZED. - /// @see ma_state_changed_cb() - /// @see ma_unset_state_changed_cb() - int ma_set_state_changed_cb( - ma_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _ma_set_state_changed_cb( - callback, - user_data, - ); - } - - late final _ma_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ma_state_changed_cb, - ffi.Pointer)>>('ma_set_state_changed_cb'); - late final _ma_set_state_changed_cb = _ma_set_state_changed_cbPtr - .asFunction)>(); - - /// @brief Unsets a state changed callback. - /// @since_tizen 5.0 - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MA_ERROR_NONE Successful - /// @retval #MA_ERROR_NOT_SUPPORTED Not supported - /// @retval #MA_ERROR_INVALID_STATE Invalid state - /// - /// @pre The state should be #MA_STATE_INITIALIZED. - /// @see ma_state_changed_cb() - /// @see ma_set_state_changed_cb() - int ma_unset_state_changed_cb() { - return _ma_unset_state_changed_cb(); - } - - late final _ma_unset_state_changed_cbPtr = - _lookup>( - 'ma_unset_state_changed_cb'); - late final _ma_unset_state_changed_cb = - _ma_unset_state_changed_cbPtr.asFunction(); - - /// @brief Sets an error callback. - /// @since_tizen 5.0 - /// - /// @param[in] callback The callback - /// @param[in] user_data The user data passed to the callback function - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MA_ERROR_NONE Successful - /// @retval #MA_ERROR_NOT_SUPPORTED Not supported - /// @retval #MA_ERROR_INVALID_STATE Invalid state - /// @retval #MA_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre The state should be #MA_STATE_INITIALIZED. - /// @see ma_error_cb() - /// @see ma_unset_errord_cb() - int ma_set_error_cb( - ma_error_cb callback, - ffi.Pointer user_data, - ) { - return _ma_set_error_cb( - callback, - user_data, - ); - } - - late final _ma_set_error_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ma_error_cb, ffi.Pointer)>>('ma_set_error_cb'); - late final _ma_set_error_cb = _ma_set_error_cbPtr - .asFunction)>(); - - /// @brief Unsets an error callback. - /// @since_tizen 5.0 - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MA_ERROR_NONE Successful - /// @retval #MA_ERROR_NOT_SUPPORTED Not supported - /// @retval #MA_ERROR_INVALID_STATE Invalid state - /// - /// @pre The state should be #MA_STATE_INITIALIZED. - /// @see ma_error_cb() - /// @see ma_set_error_cb() - int ma_unset_error_cb() { - return _ma_unset_error_cb(); - } - - late final _ma_unset_error_cbPtr = - _lookup>('ma_unset_error_cb'); - late final _ma_unset_error_cb = - _ma_unset_error_cbPtr.asFunction(); - - /// @brief Sets a language changed callback. - /// @since_tizen 5.0 - /// - /// @param[in] callback The callback - /// @param[in] user_data The user data passed to the callback function - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MA_ERROR_NONE Successful - /// @retval #MA_ERROR_NOT_SUPPORTED Not supported - /// @retval #MA_ERROR_INVALID_STATE Invalid state - /// @retval #MA_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre The state should be #MA_STATE_INITIALIZED. - /// @see ma_language_changed_cb() - /// @see ma_unset_language_changed_cb() - int ma_set_language_changed_cb( - ma_language_changed_cb callback, - ffi.Pointer user_data, - ) { - return _ma_set_language_changed_cb( - callback, - user_data, - ); - } - - late final _ma_set_language_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ma_language_changed_cb, - ffi.Pointer)>>('ma_set_language_changed_cb'); - late final _ma_set_language_changed_cb = - _ma_set_language_changed_cbPtr.asFunction< - int Function(ma_language_changed_cb, ffi.Pointer)>(); - - /// @brief Unsets a language changed callback. - /// @since_tizen 5.0 - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MA_ERROR_NONE Successful - /// @retval #MA_ERROR_NOT_SUPPORTED Not supported - /// @retval #MA_ERROR_INVALID_STATE Invalid state - /// - /// @pre The state should be #MA_STATE_INITIALIZED. - /// @see ma_language_changed_cb() - /// @see ma_set_language_changed_cb() - int ma_unset_language_changed_cb() { - return _ma_unset_language_changed_cb(); - } - - late final _ma_unset_language_changed_cbPtr = - _lookup>( - 'ma_unset_language_changed_cb'); - late final _ma_unset_language_changed_cb = - _ma_unset_language_changed_cbPtr.asFunction(); - - /// @brief Sets an audio streaming callback. - /// @since_tizen 5.0 - /// - /// @param[in] callback The callback - /// @param[in] user_data The user data passed to the callback function - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MA_ERROR_NONE Successful - /// @retval #MA_ERROR_NOT_SUPPORTED Not supported - /// @retval #MA_ERROR_INVALID_STATE Invalid state - /// @retval #MA_ERROR_INVALID_PARAMETER Invalid parameter - /// - /// @pre The state should be #MA_STATE_INITIALIZED. - /// @see ma_audio_streaming_cb() - /// @see ma_unset_audio_streaming_cb() - int ma_set_audio_streaming_cb( - ma_audio_streaming_cb callback, - ffi.Pointer user_data, - ) { - return _ma_set_audio_streaming_cb( - callback, - user_data, - ); - } - - late final _ma_set_audio_streaming_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ma_audio_streaming_cb, - ffi.Pointer)>>('ma_set_audio_streaming_cb'); - late final _ma_set_audio_streaming_cb = _ma_set_audio_streaming_cbPtr - .asFunction)>(); - - /// @brief Unsets an audio streaming callback. - /// @since_tizen 5.0 - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MA_ERROR_NONE Successful - /// @retval #MA_ERROR_NOT_SUPPORTED Not supported - /// @retval #MA_ERROR_INVALID_STATE Invalid state - /// - /// @pre The state should be #MA_STATE_INITIALIZED. - /// @see ma_audio_streaming_cb() - /// @see ma_set_audio_streaming_cb() - int ma_unset_audio_streaming_cb() { - return _ma_unset_audio_streaming_cb(); - } - - late final _ma_unset_audio_streaming_cbPtr = - _lookup>( - 'ma_unset_audio_streaming_cb'); - late final _ma_unset_audio_streaming_cb = - _ma_unset_audio_streaming_cbPtr.asFunction(); - - /// @brief Sends ASR(auto speech recognition) results to the multi-assistant service. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// - /// @param[in] event The ASR result event (e.g. #MA_ASR_RESULT_EVENT_FINAL_RESULT) - /// @param[in] asr_result The ASR result text - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MA_ERROR_NONE Successful - /// @retval #MA_ERROR_NOT_SUPPORTED Not supported - /// @retval #MA_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MA_ERROR_INVALID_PARAMETER Invalid parameter - int ma_send_asr_result( - int event, - ffi.Pointer asr_result, - ) { - return _ma_send_asr_result( - event, - asr_result, - ); - } - - late final _ma_send_asr_resultPtr = _lookup< - ffi - .NativeFunction)>>( - 'ma_send_asr_result'); - late final _ma_send_asr_result = _ma_send_asr_resultPtr - .asFunction)>(); - - /// @brief Sends results to the multi-assistant service. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// - /// @param[in] display_text The text shown on the display - /// @param[in] utterance_text The utterance text - /// @param[in] result_json The result data (JSON format) - /// - /// @return @c 0 on success, otherwise a negative error value - /// @retval #MA_ERROR_NONE Successful - /// @retval #MA_ERROR_NOT_SUPPORTED Not supported - /// @retval #MA_ERROR_PERMISSION_DENIED Permission denied - /// @retval #MA_ERROR_INVALID_PARAMETER Invalid parameter - int ma_send_result( - ffi.Pointer display_text, - ffi.Pointer utterance_text, - ffi.Pointer result_json, - ) { - return _ma_send_result( - display_text, - utterance_text, - result_json, - ); - } - - late final _ma_send_resultPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('ma_send_result'); - late final _ma_send_result = _ma_send_resultPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Creates a STT handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks If the function succeeds, @a stt handle must be released with stt_destroy(). - /// @param[out] stt The STT handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @post If this function is called, the STT state will be #STT_STATE_CREATED. - /// @see stt_destroy() - int stt_create( - ffi.Pointer stt, - ) { - return _stt_create( - stt, - ); - } - - late final _stt_createPtr = - _lookup)>>( - 'stt_create'); - late final _stt_create = - _stt_createPtr.asFunction)>(); - - /// @brief Destroys a STT handle. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @see stt_create() - int stt_destroy( - stt_h stt, - ) { - return _stt_destroy( - stt, - ); - } - - late final _stt_destroyPtr = - _lookup>('stt_destroy'); - late final _stt_destroy = _stt_destroyPtr.asFunction(); - - /// @brief Retrieves supported engine information using a callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Success - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE STT Not initialized - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_CREATED. - /// @post This function invokes stt_supported_engine_cb() repeatedly for getting engine information. - /// @see stt_supported_engine_cb() - int stt_foreach_supported_engines( - stt_h stt, - stt_supported_engine_cb callback, - ffi.Pointer user_data, - ) { - return _stt_foreach_supported_engines( - stt, - callback, - user_data, - ); - } - - late final _stt_foreach_supported_enginesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stt_h, stt_supported_engine_cb, - ffi.Pointer)>>('stt_foreach_supported_engines'); - late final _stt_foreach_supported_engines = - _stt_foreach_supported_enginesPtr.asFunction< - int Function( - stt_h, stt_supported_engine_cb, ffi.Pointer)>(); - - /// @brief Gets the current engine ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks If the function is success, @a engine_id must be released using free(). - /// @param[in] stt The STT handle - /// @param[out] engine_id Engine ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Success - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE STT Not initialized - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_CREATED. - /// @see stt_set_engine() - int stt_get_engine( - stt_h stt, - ffi.Pointer> engine_id, - ) { - return _stt_get_engine( - stt, - engine_id, - ); - } - - late final _stt_get_enginePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - stt_h, ffi.Pointer>)>>('stt_get_engine'); - late final _stt_get_engine = _stt_get_enginePtr - .asFunction>)>(); - - /// @brief Sets the engine ID. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @privilege %http://tizen.org/privilege/appmanager.launch - /// @remarks A privilege (%http://tizen.org/privilege/appmanager.launch) is necessary since 3.0. - /// @param[in] stt The STT handle - /// @param[in] engine_id Engine ID - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Success - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE STT Not initialized - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_CREATED. - /// @see stt_get_engine() - int stt_set_engine( - stt_h stt, - ffi.Pointer engine_id, - ) { - return _stt_set_engine( - stt, - engine_id, - ); - } - - late final _stt_set_enginePtr = _lookup< - ffi.NativeFunction)>>( - 'stt_set_engine'); - late final _stt_set_engine = _stt_set_enginePtr - .asFunction)>(); - - /// @brief Sets the app credential. - /// @details Using this API, the application can set a credential. - /// The credential is a key to verify the authorization about using the engine. - /// If the application sets the credential, it will be able to use functions of the engine entirely. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @remarks The necessity of the credential depends on the engine. In case of the engine which is basically embedded in Tizen, the credential is not necessary so far. - /// However, if the user wants to apply the 3rd party's engine, the credential may be necessary. In that case, please follow the policy provided by the corresponding engine. - /// @param[in] stt The STT handle - /// @param[in] credential The app credential - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Success - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @pre The state should be #STT_STATE_CREATED or #STT_STATE_READY. - /// @see stt_start() - int stt_set_credential( - stt_h stt, - ffi.Pointer credential, - ) { - return _stt_set_credential( - stt, - credential, - ); - } - - late final _stt_set_credentialPtr = _lookup< - ffi.NativeFunction)>>( - 'stt_set_credential'); - late final _stt_set_credential = _stt_set_credentialPtr - .asFunction)>(); - - /// @brief Sets the private data to stt engine. - /// @details The private data is the setting parameter for applying keys provided by the engine. - /// Using this API, the application can set the private data and use the corresponding key of the engine. - /// For example, if the engine provides 'partial recognition' as a recognition type, the application can set the private data as the following. - /// int ret = stt_set_private_data(stt_h, "recognition_type", "PARTIAL"); - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @remarks If the engine is replaced with the other engine, the key may be ignored. - /// @param[in] stt The STT handle - /// @param[in] key The field name of private data - /// @param[in] data The data for set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_TIMED_OUT No answer from the STT service - /// @pre The state should be #STT_STATE_READY. - /// @see stt_get_private_data() - int stt_set_private_data( - stt_h stt, - ffi.Pointer key, - ffi.Pointer data, - ) { - return _stt_set_private_data( - stt, - key, - data, - ); - } - - late final _stt_set_private_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stt_h, ffi.Pointer, - ffi.Pointer)>>('stt_set_private_data'); - late final _stt_set_private_data = _stt_set_private_dataPtr.asFunction< - int Function(stt_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the private data from stt engine. - /// @details The private data is the information provided by the engine. - /// Using this API, the application can get the private data which corresponds to the key from the engine. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @remarks If the engine is replaced with the other engine, the key may be ignored. - /// @remarks The @a data must be released using free() when it is no longer required. - /// @param[in] stt The STT handle - /// @param[in] key The field name of private data - /// @param[out] data The data field of private data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_TIMED_OUT No answer from the STT service - /// @pre The state should be #STT_STATE_READY. - /// @see stt_set_private_data() - int stt_get_private_data( - stt_h stt, - ffi.Pointer key, - ffi.Pointer> data, - ) { - return _stt_get_private_data( - stt, - key, - data, - ); - } - - late final _stt_get_private_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stt_h, ffi.Pointer, - ffi.Pointer>)>>('stt_get_private_data'); - late final _stt_get_private_data = _stt_get_private_dataPtr.asFunction< - int Function( - stt_h, ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Connects the STT service asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_CREATED. - /// @post If this function is successful, the STT state will be #STT_STATE_READY. - /// If this function is failed, the error callback is called. (e.g. #STT_ERROR_ENGINE_NOT_FOUND) - /// @see stt_unprepare() - int stt_prepare( - stt_h stt, - ) { - return _stt_prepare( - stt, - ); - } - - late final _stt_preparePtr = - _lookup>('stt_prepare'); - late final _stt_prepare = _stt_preparePtr.asFunction(); - - /// @brief Disconnects the STT service. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_READY. - /// @post If this function is called, the STT state will be #STT_STATE_CREATED. - /// @see stt_prepare() - int stt_unprepare( - stt_h stt, - ) { - return _stt_unprepare( - stt, - ); - } - - late final _stt_unpreparePtr = - _lookup>('stt_unprepare'); - late final _stt_unprepare = - _stt_unpreparePtr.asFunction(); - - /// @brief Retrieves all supported languages of current engine using callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_ENGINE_NOT_FOUND No available engine - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @post This function invokes stt_supported_language_cb() repeatedly for getting languages. - /// @see stt_supported_language_cb() - /// @see stt_get_default_language() - int stt_foreach_supported_languages( - stt_h stt, - stt_supported_language_cb callback, - ffi.Pointer user_data, - ) { - return _stt_foreach_supported_languages( - stt, - callback, - user_data, - ); - } - - late final _stt_foreach_supported_languagesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stt_h, stt_supported_language_cb, - ffi.Pointer)>>('stt_foreach_supported_languages'); - late final _stt_foreach_supported_languages = - _stt_foreach_supported_languagesPtr.asFunction< - int Function( - stt_h, stt_supported_language_cb, ffi.Pointer)>(); - - /// @brief Gets the default language set by the user. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks The language is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code. - /// For example, "ko_KR" for Korean, "en_US" for American English. - /// If the function succeeds, @a language must be released using free() when it is no longer required. - /// @param[in] stt The STT handle - /// @param[out] language The language - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @see stt_foreach_supported_languages() - int stt_get_default_language( - stt_h stt, - ffi.Pointer> language, - ) { - return _stt_get_default_language( - stt, - language, - ); - } - - late final _stt_get_default_languagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stt_h, - ffi.Pointer>)>>('stt_get_default_language'); - late final _stt_get_default_language = _stt_get_default_languagePtr - .asFunction>)>(); - - /// @brief Gets the current STT state. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @param[out] state The current STT state - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @see stt_start() - /// @see stt_stop() - /// @see stt_cancel() - /// @see stt_state_changed_cb() - int stt_get_state( - stt_h stt, - ffi.Pointer state, - ) { - return _stt_get_state( - stt, - state, - ); - } - - late final _stt_get_statePtr = _lookup< - ffi.NativeFunction)>>( - 'stt_get_state'); - late final _stt_get_state = _stt_get_statePtr - .asFunction)>(); - - /// @brief Gets the current error message. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @remarks This function should be called during an stt error callback. If not, the error as operation failure will be returned. - /// If the function succeeds, @a err_msg must be released using free() when it is no longer required. - /// @param[in] stt The STT handle - /// @param[out] err_msg The current error message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @see stt_set_error_cb() - /// @see stt_unset_error_cb() - int stt_get_error_message( - stt_h stt, - ffi.Pointer> err_msg, - ) { - return _stt_get_error_message( - stt, - err_msg, - ); - } - - late final _stt_get_error_messagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stt_h, - ffi.Pointer>)>>('stt_get_error_message'); - late final _stt_get_error_message = _stt_get_error_messagePtr - .asFunction>)>(); - - /// @brief Checks whether the recognition type is supported. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @param[in] type The type for recognition (e.g. #STT_RECOGNITION_TYPE_FREE, #STT_RECOGNITION_TYPE_FREE_PARTIAL) - /// @param[out] support The result status @c true = supported, - /// @c false = not supported - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_READY. - int stt_is_recognition_type_supported( - stt_h stt, - ffi.Pointer type, - ffi.Pointer support, - ) { - return _stt_is_recognition_type_supported( - stt, - type, - support, - ); - } - - late final _stt_is_recognition_type_supportedPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stt_h, ffi.Pointer, - ffi.Pointer)>>('stt_is_recognition_type_supported'); - late final _stt_is_recognition_type_supported = - _stt_is_recognition_type_supportedPtr.asFunction< - int Function(stt_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets the silence detection. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @param[in] type The option type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED_FEATURE Not supported feature of current engine - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_READY. - int stt_set_silence_detection( - stt_h stt, - int type, - ) { - return _stt_set_silence_detection( - stt, - type, - ); - } - - late final _stt_set_silence_detectionPtr = - _lookup>( - 'stt_set_silence_detection'); - late final _stt_set_silence_detection = - _stt_set_silence_detectionPtr.asFunction(); - - /// @brief Sets the sound to start recording. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks Sound file type should be wav type. - /// @param[in] stt The STT handle - /// @param[in] filename The sound file path - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_READY. - int stt_set_start_sound( - stt_h stt, - ffi.Pointer filename, - ) { - return _stt_set_start_sound( - stt, - filename, - ); - } - - late final _stt_set_start_soundPtr = _lookup< - ffi.NativeFunction)>>( - 'stt_set_start_sound'); - late final _stt_set_start_sound = _stt_set_start_soundPtr - .asFunction)>(); - - /// @brief Unsets the sound to start recording. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_READY. - int stt_unset_start_sound( - stt_h stt, - ) { - return _stt_unset_start_sound( - stt, - ); - } - - late final _stt_unset_start_soundPtr = - _lookup>( - 'stt_unset_start_sound'); - late final _stt_unset_start_sound = - _stt_unset_start_soundPtr.asFunction(); - - /// @brief Sets the sound to stop recording. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks Sound file type should be wav type. - /// @param[in] stt The STT handle - /// @param[in] filename The sound file path - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_READY. - int stt_set_stop_sound( - stt_h stt, - ffi.Pointer filename, - ) { - return _stt_set_stop_sound( - stt, - filename, - ); - } - - late final _stt_set_stop_soundPtr = _lookup< - ffi.NativeFunction)>>( - 'stt_set_stop_sound'); - late final _stt_set_stop_sound = _stt_set_stop_soundPtr - .asFunction)>(); - - /// @brief Unsets the sound to stop recording. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_READY. - int stt_unset_stop_sound( - stt_h stt, - ) { - return _stt_unset_stop_sound( - stt, - ); - } - - late final _stt_unset_stop_soundPtr = - _lookup>( - 'stt_unset_stop_sound'); - late final _stt_unset_stop_sound = - _stt_unset_stop_soundPtr.asFunction(); - - /// @brief Starts recording and recognition asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks This function starts recording in the STT service and sending recording data to engine. - /// This work continues until stt_stop(), stt_cancel() or silence detected by engine. - /// @param[in] stt The STT handle - /// @param[in] language The language selected from stt_foreach_supported_languages() - /// @param[in] type The type for recognition (e.g. #STT_RECOGNITION_TYPE_FREE, #STT_RECOGNITION_TYPE_FREE_PARTIAL) - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_RECORDER_BUSY Recorder busy - /// @retval #STT_ERROR_INVALID_LANGUAGE Invalid language - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #STT_ERROR_IN_PROGRESS_TO_RECORDING Progress to recording is not finished - /// @pre The state should be #STT_STATE_READY. - /// @post It will invoke stt_state_changed_cb(), if you register a callback with stt_state_changed_cb(). - /// If this function succeeds, the STT state will be #STT_STATE_RECORDING. - /// If you call this function again before state changes, you will receive STT_ERROR_IN_PROGRESS_TO_RECORDING. - /// @see stt_stop() - /// @see stt_cancel() - /// @see stt_state_changed_cb() - int stt_start( - stt_h stt, - ffi.Pointer language, - ffi.Pointer type, - ) { - return _stt_start( - stt, - language, - type, - ); - } - - late final _stt_startPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stt_h, ffi.Pointer, - ffi.Pointer)>>('stt_start'); - late final _stt_start = _stt_startPtr.asFunction< - int Function(stt_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Finishes the recording and starts recognition processing in engine asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #STT_ERROR_IN_PROGRESS_TO_READY Progress to ready is not finished - /// @retval #STT_ERROR_IN_PROGRESS_TO_RECORDING Progress to recording is not finished - /// @retval #STT_ERROR_IN_PROGRESS_TO_PROCESSING Progress to processing is not finished - /// @pre The state should be #STT_STATE_RECORDING. - /// @post It will invoke stt_state_changed_cb(), if you register a callback with stt_state_changed_cb(). - /// If this function succeeds, the STT state will be #STT_STATE_PROCESSING. - /// If you call this function again before state changes, you will receive STT_ERROR_IN_PROGRESS_TO_PROCESSING. - /// After processing of engine, stt_result_cb() is called. - /// @see stt_start() - /// @see stt_cancel() - /// @see stt_state_changed_cb() - int stt_stop( - stt_h stt, - ) { - return _stt_stop( - stt, - ); - } - - late final _stt_stopPtr = - _lookup>('stt_stop'); - late final _stt_stop = _stt_stopPtr.asFunction(); - - /// @brief Cancels processing recognition and recording asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks This function cancels recording and engine cancels recognition processing. - /// After successful cancel, stt_state_changed_cb() is called otherwise if error is occurred, stt_error_cb() is called. - /// @param[in] stt The STT handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @retval #STT_ERROR_IN_PROGRESS_TO_READY Progress to ready is not finished - /// @retval #STT_ERROR_IN_PROGRESS_TO_RECORDING Progress to recording is not finished - /// @retval #STT_ERROR_IN_PROGRESS_TO_PROCESSING Progress to processing is not finished - /// @pre The state should be #STT_STATE_RECORDING or #STT_STATE_PROCESSING. - /// @post It will invoke stt_state_changed_cb(), if you register a callback with stt_state_changed_cb(). - /// If this function succeeds, the STT state will be #STT_STATE_READY. - /// If you call this function again before state changes, you will receive STT_ERROR_IN_PROGRESS_TO_READY. - /// @see stt_start() - /// @see stt_stop() - /// @see stt_state_changed_cb() - int stt_cancel( - stt_h stt, - ) { - return _stt_cancel( - stt, - ); - } - - late final _stt_cancelPtr = - _lookup>('stt_cancel'); - late final _stt_cancel = _stt_cancelPtr.asFunction(); - - /// @brief Gets the microphone volume during recording. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @param[out] volume Recording volume - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_RECORDING. - /// @see stt_start() - int stt_get_recording_volume( - stt_h stt, - ffi.Pointer volume, - ) { - return _stt_get_recording_volume( - stt, - volume, - ); - } - - late final _stt_get_recording_volumePtr = _lookup< - ffi.NativeFunction)>>( - 'stt_get_recording_volume'); - late final _stt_get_recording_volume = _stt_get_recording_volumePtr - .asFunction)>(); - - /// @brief Retrieves the time stamp of the current recognition result using the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks This function should be called in stt_recognition_result_cb(). - /// After stt_recognition_result_cb(), result data is NOT valid. - /// @param[in] stt The STT handle - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_OPERATION_FAILED Operation failure - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre This function should be called in stt_recognition_result_cb(). - /// @post This function invokes stt_result_time_cb() repeatedly for getting time information. - /// @see stt_result_time_cb() - /// @see stt_recognition_result_cb() - int stt_foreach_detailed_result( - stt_h stt, - stt_result_time_cb callback, - ffi.Pointer user_data, - ) { - return _stt_foreach_detailed_result( - stt, - callback, - user_data, - ); - } - - late final _stt_foreach_detailed_resultPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stt_h, stt_result_time_cb, - ffi.Pointer)>>('stt_foreach_detailed_result'); - late final _stt_foreach_detailed_result = - _stt_foreach_detailed_resultPtr.asFunction< - int Function(stt_h, stt_result_time_cb, ffi.Pointer)>(); - - /// @brief Registers a callback function to get the recognition result. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_CREATED. - /// @see stt_recognition_result_cb() - /// @see stt_unset_recognition_result_cb() - int stt_set_recognition_result_cb( - stt_h stt, - stt_recognition_result_cb callback, - ffi.Pointer user_data, - ) { - return _stt_set_recognition_result_cb( - stt, - callback, - user_data, - ); - } - - late final _stt_set_recognition_result_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stt_h, stt_recognition_result_cb, - ffi.Pointer)>>('stt_set_recognition_result_cb'); - late final _stt_set_recognition_result_cb = - _stt_set_recognition_result_cbPtr.asFunction< - int Function( - stt_h, stt_recognition_result_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_CREATED. - /// @see stt_set_recognition_result_cb() - int stt_unset_recognition_result_cb( - stt_h stt, - ) { - return _stt_unset_recognition_result_cb( - stt, - ); - } - - late final _stt_unset_recognition_result_cbPtr = - _lookup>( - 'stt_unset_recognition_result_cb'); - late final _stt_unset_recognition_result_cb = - _stt_unset_recognition_result_cbPtr.asFunction(); - - /// @brief Registers a callback function to be called when STT state changes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_CREATED. - /// @see stt_state_changed_cb() - /// @see stt_unset_state_changed_cb() - int stt_set_state_changed_cb( - stt_h stt, - stt_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _stt_set_state_changed_cb( - stt, - callback, - user_data, - ); - } - - late final _stt_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stt_h, stt_state_changed_cb, - ffi.Pointer)>>('stt_set_state_changed_cb'); - late final _stt_set_state_changed_cb = - _stt_set_state_changed_cbPtr.asFunction< - int Function(stt_h, stt_state_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_CREATED. - /// @see stt_set_state_changed_cb() - int stt_unset_state_changed_cb( - stt_h stt, - ) { - return _stt_unset_state_changed_cb( - stt, - ); - } - - late final _stt_unset_state_changed_cbPtr = - _lookup>( - 'stt_unset_state_changed_cb'); - late final _stt_unset_state_changed_cb = - _stt_unset_state_changed_cbPtr.asFunction(); - - /// @brief Registers a callback function to be called when an error occurred. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_CREATED. - /// @see stt_error_cb() - /// @see stt_unset_error_cb() - int stt_set_error_cb( - stt_h stt, - stt_error_cb callback, - ffi.Pointer user_data, - ) { - return _stt_set_error_cb( - stt, - callback, - user_data, - ); - } - - late final _stt_set_error_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - stt_h, stt_error_cb, ffi.Pointer)>>('stt_set_error_cb'); - late final _stt_set_error_cb = _stt_set_error_cbPtr - .asFunction)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_CREATED. - /// @see stt_set_error_cb() - int stt_unset_error_cb( - stt_h stt, - ) { - return _stt_unset_error_cb( - stt, - ); - } - - late final _stt_unset_error_cbPtr = - _lookup>( - 'stt_unset_error_cb'); - late final _stt_unset_error_cb = - _stt_unset_error_cbPtr.asFunction(); - - /// @brief Registers a callback function to detect the default language change. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_CREATED. - /// @see stt_default_language_changed_cb() - /// @see stt_unset_default_language_changed_cb() - int stt_set_default_language_changed_cb( - stt_h stt, - stt_default_language_changed_cb callback, - ffi.Pointer user_data, - ) { - return _stt_set_default_language_changed_cb( - stt, - callback, - user_data, - ); - } - - late final _stt_set_default_language_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stt_h, stt_default_language_changed_cb, - ffi.Pointer)>>('stt_set_default_language_changed_cb'); - late final _stt_set_default_language_changed_cb = - _stt_set_default_language_changed_cbPtr.asFunction< - int Function( - stt_h, stt_default_language_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] stt The STT handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @retval #STT_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #STT_STATE_CREATED. - /// @see stt_set_default_language_changed_cb() - int stt_unset_default_language_changed_cb( - stt_h stt, - ) { - return _stt_unset_default_language_changed_cb( - stt, - ); - } - - late final _stt_unset_default_language_changed_cbPtr = - _lookup>( - 'stt_unset_default_language_changed_cb'); - late final _stt_unset_default_language_changed_cb = - _stt_unset_default_language_changed_cbPtr - .asFunction(); - - /// @brief Registers a callback function to detect the engine change. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @param[in] stt The STT handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @pre The state should be #STT_STATE_CREATED. - /// @see stt_engine_changed_cb() - /// @see stt_unset_engine_changed_cb() - int stt_set_engine_changed_cb( - stt_h stt, - stt_engine_changed_cb callback, - ffi.Pointer user_data, - ) { - return _stt_set_engine_changed_cb( - stt, - callback, - user_data, - ); - } - - late final _stt_set_engine_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(stt_h, stt_engine_changed_cb, - ffi.Pointer)>>('stt_set_engine_changed_cb'); - late final _stt_set_engine_changed_cb = - _stt_set_engine_changed_cbPtr.asFunction< - int Function(stt_h, stt_engine_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @param[in] stt The STT handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STT_ERROR_NONE Successful - /// @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STT_ERROR_INVALID_STATE Invalid state - /// @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - /// @pre The state should be #STT_STATE_CREATED. - /// @see stt_set_engine_changed_cb() - int stt_unset_engine_changed_cb( - stt_h stt, - ) { - return _stt_unset_engine_changed_cb( - stt, - ); - } - - late final _stt_unset_engine_changed_cbPtr = - _lookup>( - 'stt_unset_engine_changed_cb'); - late final _stt_unset_engine_changed_cb = - _stt_unset_engine_changed_cbPtr.asFunction(); - - /// @brief Main function for Speech-To-Text (STT) engine. - /// @details This function is the main function for operating STT engine. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks The service_app_main() should be used for working the engine after this function. - /// @param[in] argc The argument count(original) - /// @param[in] argv The argument(original) - /// @param[in] callback The structure of engine request callback function - /// @return This function returns @c zero on success, - /// or negative with error code on failure - /// @retval #STTE_ERROR_NONE Successful - /// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STTE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #STTE_ERROR_NOT_SUPPORTED Not supported - /// @retval #STTE_ERROR_OPERATION_FAILED Operation failure - /// @see stte_request_callback_s - /// @code - /// #include - /// - /// // Required callback functions - MUST BE IMPLEMENTED - /// static int sttengine_get_info_cb(char** engine_uuid, char** engine_name, char** engine_setting, bool* use_network); - /// static int sttengine_initialize_cb(void); - /// static int sttengine_deinitialize_cb(void); - /// static int sttengine_is_valid_language_cb(const char* language, bool* is_valid); - /// static int sttengine_foreach_supported_langs_cb(stte_supported_language_cb callback, void* user_data); - /// static bool sttengine_support_silence_detection_cb(void); - /// static int sttengine_set_silence_detection_cb(bool is_set); - /// static int sttengine_support_recognition_type_cb(const char* type, bool* is_supported); - /// static int sttengine_get_recording_format_cb(stte_audio_type_e* types, int* rate, int* channels); - /// static int sttengine_set_recording_data_cb(const void* data, unsigned int length); - /// static int sttengine_foreach_result_time_cb(void* time_info, stte_result_time_cb callback, void* user_data); - /// static int sttengine_start_cb(const char* language, const char* type, const char* appid, const char* credential, void *user_data); - /// static int sttengine_stop_cb(void); - /// static int sttengine_cancel_cb(void); - /// static int sttengine_check_app_agreed_cb(const char* appid, bool* is_agreed); - /// static bool sttengine_need_app_credential_cb(void); - /// - /// // Optional callback function - /// static int sttengine_private_data_set_cb(const char* key, const char* data); - /// - /// int main(int argc, char* argv[]) - /// { - /// // 1. Create a structure 'stte_request_callback_s' - /// stte_request_callback_s engine_callback = { 0, }; - /// - /// engine_callback.size = sizeof(stte_request_callback_s); - /// engine_callback.version = 1; - /// engine_callback.get_info = sttengine_get_info_cb; - /// - /// engine_callback.initialize = sttengine_initialize_cb; - /// engine_callback.deinitialize = sttengine_deinitialize_cb; - /// - /// engine_callback.foreach_langs = sttengine_foreach_supported_langs_cb; - /// engine_callback.is_valid_lang = sttengine_is_valid_language_cb; - /// engine_callback.support_silence = sttengine_support_silence_detection_cb; - /// engine_callback.support_recognition_type = sttengine_support_recognition_type_cb; - /// - /// engine_callback.get_audio_format = sttengine_get_recording_format_cb; - /// engine_callback.foreach_result_time = sttengine_foreach_result_time_cb; - /// - /// engine_callback.set_silence_detection = sttengine_set_silence_detection_cb; - /// - /// engine_callback.start = sttengine_start_cb; - /// engine_callback.set_recording = sttengine_set_recording_data_cb; - /// engine_callback.stop = sttengine_stop_cb; - /// engine_callback.cancel = sttengine_cancel_cb; - /// - /// engine_callback.check_app_agreed = sttengine_check_app_agreed_cb; - /// engine_callback.need_app_credential = sttengine_need_app_credential_cb; - /// - /// // 2. Run 'stte_main()' - /// if (0 != stte_main(argc, argv, &engine_callback)) { - /// return -1; - /// } - /// - /// // Optional - /// stte_set_private_data_set_cb(sttengine_private_data_set_cb); - /// - /// // 3. Set event callbacks for service app and Run 'service_app_main()' - /// char ad[50] = { 0, }; - /// - /// service_app_lifecycle_callback_s event_callback; - /// app_event_handler_h handlers[5] = { NULL, }; - /// - /// event_callback.create = service_app_create; - /// event_callback.terminate = service_app_terminate; - /// event_callback.app_control = service_app_control; - /// - /// service_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, service_app_low_battery, &ad); - /// service_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, service_app_low_memory, &ad); - /// service_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, service_app_lang_changed, &ad); - /// service_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, service_app_region_changed, &ad); - /// - /// return service_app_main(argc, argv, &event_callback, ad); - /// } - /// - /// @endcode - int stte_main( - int argc, - ffi.Pointer> argv, - ffi.Pointer callback, - ) { - return _stte_main( - argc, - argv, - callback, - ); - } - - late final _stte_mainPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer>, - ffi.Pointer)>>('stte_main'); - late final _stte_main = _stte_mainPtr.asFunction< - int Function(int, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Sends the recognition result to the engine service user. - /// @since_tizen 3.0 - /// @remarks This API is used in stte_set_recording_data_cb() and stte_stop_cb(), when STT engine sends the recognition result to the engine service user. - /// This function is called in the following situations; 1) after stte_stop_cb() is called, 2) the end point of speech is detected from recording, or 3) partial result is occurred. - /// The recognition result and @a user_data must be transferred to the engine service user through this function. - /// Also, @a time_info must be transferred to stte_foreach_result_time_cb(). The type of @a time_info is up to the STT engine developer. - /// @param[in] event The result event - /// @param[in] type The recognition type (e.g. #STTE_RECOGNITION_TYPE_FREE, #STTE_RECOGNITION_TYPE_FREE_PARTIAL) - /// @param[in] result Result texts - /// @param[in] result_count Result text count - /// @param[in] msg Engine message (e.g. #STTE_RESULT_MESSAGE_NONE, #STTE_RESULT_MESSAGE_ERROR_TOO_SHORT) - /// @param[in] time_info The time information - /// @param[in] user_data The user data passed from stte_start_cb() - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STTE_ERROR_NONE Successful - /// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STTE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #STTE_ERROR_NOT_SUPPORTED Not supported - /// @retval #STTE_ERROR_OPERATION_FAILED Operation failure - /// @pre The stte_main() function should be invoked before this function is called. - /// stte_stop_cb() will invoke this function. - /// @post This function invokes stte_foreach_result_time_cb(). - /// @see stte_start_cb() - /// @see stte_set_recording_data_cb() - /// @see stte_stop_cb() - /// @see stte_foreach_result_time_cb() - int stte_send_result( - int event, - ffi.Pointer type, - ffi.Pointer> result, - int result_count, - ffi.Pointer msg, - ffi.Pointer time_info, - ffi.Pointer user_data, - ) { - return _stte_send_result( - event, - type, - result, - result_count, - msg, - time_info, - user_data, - ); - } - - late final _stte_send_resultPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - ffi.Pointer, - ffi.Pointer>, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('stte_send_result'); - late final _stte_send_result = _stte_send_resultPtr.asFunction< - int Function( - int, - ffi.Pointer, - ffi.Pointer>, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Sends the error to the engine service user. - /// @details The following error codes can be delivered. - /// #STTE_ERROR_NONE, - /// #STTE_ERROR_OUT_OF_MEMORY, - /// #STTE_ERROR_IO_ERROR, - /// #STTE_ERROR_INVALID_PARAMETER, - /// #STTE_ERROR_NETWORK_DOWN, - /// #STTE_ERROR_INVALID_STATE, - /// #STTE_ERROR_INVALID_LANGUAGE, - /// #STTE_ERROR_OPERATION_FAILED, - /// #STTE_ERROR_NOT_SUPPORTED_FEATURE, - /// #STTE_ERROR_NOT_SUPPORTED, - /// #STTE_ERROR_PERMISSION_DENIED, - /// #STTE_ERROR_RECORDING_TIMED_OUT. - /// @since_tizen 3.0 - /// @param[in] error The error reason - /// @param[in] msg The error message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STTE_ERROR_NONE Successful - /// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STTE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #STTE_ERROR_NOT_SUPPORTED Not supported - /// @retval #STTE_ERROR_OPERATION_FAILED Operation failure - /// @pre The stte_main() function should be invoked before this function is called. - int stte_send_error( - int error, - ffi.Pointer msg, - ) { - return _stte_send_error( - error, - msg, - ); - } - - late final _stte_send_errorPtr = _lookup< - ffi - .NativeFunction)>>( - 'stte_send_error'); - late final _stte_send_error = _stte_send_errorPtr - .asFunction)>(); - - /// @brief Sends the speech status to the engine service user when STT engine notifies the change of the speech status. - /// @since_tizen 3.0 - /// @remarks This API is invoked when STT engine wants to notify the change of the speech status anytime. - /// NOTE that this API can be invoked for recognizing the speech. - /// @param[in] status The status of speech (e.g. STTE_SPEECH_STATUS_START_POINT_DETECTED or STTE_SPEECH_STATUS_END_POINT_DETECTED) - /// @param[in] user_data The user data passed from the start function. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STTE_ERROR_NONE Successful - /// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STTE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #STTE_ERROR_NOT_SUPPORTED Not supported - /// @retval #STTE_ERROR_OPERATION_FAILED Operation failure - /// @pre The stte_main() function should be invoked before this function is called. - /// stte_start_cb() and stte_set_recording_data_cb() will invoke this function. - /// @see stte_start_cb() - /// @see stte_set_recording_data_cb() - int stte_send_speech_status( - int status, - ffi.Pointer user_data, - ) { - return _stte_send_speech_status( - status, - user_data, - ); - } - - late final _stte_send_speech_statusPtr = _lookup< - ffi - .NativeFunction)>>( - 'stte_send_speech_status'); - late final _stte_send_speech_status = _stte_send_speech_statusPtr - .asFunction)>(); - - /// @brief Sets a callback function for setting the private data. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks The stte_private_data_set_cb() function is called when the engine service user sends the private data. - /// @param[in] callback_func stte_private_data_set event callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STTE_ERROR_NONE Successful - /// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STTE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #STTE_ERROR_NOT_SUPPORTED Not supported - /// @retval #STTE_ERROR_OPERATION_FAILED Operation failure - /// @pre The stte_main() function should be invoked before this function is called. - /// @see stte_private_data_set_cb() - int stte_set_private_data_set_cb( - stte_private_data_set_cb callback_func, - ) { - return _stte_set_private_data_set_cb( - callback_func, - ); - } - - late final _stte_set_private_data_set_cbPtr = - _lookup>( - 'stte_set_private_data_set_cb'); - late final _stte_set_private_data_set_cb = _stte_set_private_data_set_cbPtr - .asFunction(); - - /// @brief Sets a callback function for requesting the private data. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks The stte_private_data_requested_cb() function is called when the engine service user gets the private data from STT engine. - /// @param[in] callback_func stte_private_data_requested event callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #STTE_ERROR_NONE Successful - /// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #STTE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #STTE_ERROR_NOT_SUPPORTED Not supported - /// @retval #STTE_ERROR_OPERATION_FAILED Operation failure - /// @pre The stte_main() function should be invoked before this function is called. - /// @see stte_private_data_requested_cb() - int stte_set_private_data_requested_cb( - stte_private_data_requested_cb callback_func, - ) { - return _stte_set_private_data_requested_cb( - callback_func, - ); - } - - late final _stte_set_private_data_requested_cbPtr = _lookup< - ffi.NativeFunction>( - 'stte_set_private_data_requested_cb'); - late final _stte_set_private_data_requested_cb = - _stte_set_private_data_requested_cbPtr - .asFunction(); - - /// @brief Creates a handle for TTS. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If the function succeeds, @a tts handle must be released with tts_destroy(). - /// @param[out] tts The TTS handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_ENGINE_NOT_FOUND Engine not found - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @post If this function is called, the TTS state will be #TTS_STATE_CREATED. - /// @see tts_destroy() - int tts_create( - ffi.Pointer tts, - ) { - return _tts_create( - tts, - ); - } - - late final _tts_createPtr = - _lookup)>>( - 'tts_create'); - late final _tts_create = - _tts_createPtr.asFunction)>(); - - /// @brief Destroys the handle and disconnects the daemon. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @see tts_create() - int tts_destroy( - tts_h tts, - ) { - return _tts_destroy( - tts, - ); - } - - late final _tts_destroyPtr = - _lookup>('tts_destroy'); - late final _tts_destroy = _tts_destroyPtr.asFunction(); - - /// @brief Sets the TTS mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @param[in] mode The mode - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_get_mode() - int tts_set_mode( - tts_h tts, - int mode, - ) { - return _tts_set_mode( - tts, - mode, - ); - } - - late final _tts_set_modePtr = - _lookup>( - 'tts_set_mode'); - late final _tts_set_mode = - _tts_set_modePtr.asFunction(); - - /// @brief Gets the TTS mode. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @param[out] mode The mode - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_set_mode() - int tts_get_mode( - tts_h tts, - ffi.Pointer mode, - ) { - return _tts_get_mode( - tts, - mode, - ); - } - - late final _tts_get_modePtr = _lookup< - ffi.NativeFunction)>>( - 'tts_get_mode'); - late final _tts_get_mode = _tts_get_modePtr - .asFunction)>(); - - /// @brief Sets the app credential. - /// @details Using this API, the application can set a credential. - /// The credential is a key to verify the authorization about using the engine. - /// If the application sets the credential, it will be able to use functions of the engine entirely. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @remarks The necessity of the credential depends on the engine. In case of the engine which is basically embedded in Tizen, the credential is not necessary so far. - /// However, if the user wants to apply the 3rd party's engine, the credential may be necessary. In that case, please follow the policy provided by the corresponding engine. - /// @param[in] tts The TTS handle - /// @param[in] credential The app credential - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Success - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED or #TTS_STATE_READY. - /// @see tts_play() - int tts_set_credential( - tts_h tts, - ffi.Pointer credential, - ) { - return _tts_set_credential( - tts, - credential, - ); - } - - late final _tts_set_credentialPtr = _lookup< - ffi.NativeFunction)>>( - 'tts_set_credential'); - late final _tts_set_credential = _tts_set_credentialPtr - .asFunction)>(); - - /// @brief Connects the daemon asynchronously. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @post If this function is successful, the TTS state will be #TTS_STATE_READY. - /// If this function is failed, the error callback is called. (e.g. #TTS_ERROR_ENGINE_NOT_FOUND) - /// @see tts_unprepare() - int tts_prepare( - tts_h tts, - ) { - return _tts_prepare( - tts, - ); - } - - late final _tts_preparePtr = - _lookup>('tts_prepare'); - late final _tts_prepare = _tts_preparePtr.asFunction(); - - /// @brief Disconnects the daemon. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_READY. - /// @post If this function is called, the TTS state will be #TTS_STATE_CREATED. - /// @see tts_prepare() - int tts_unprepare( - tts_h tts, - ) { - return _tts_unprepare( - tts, - ); - } - - late final _tts_unpreparePtr = - _lookup>('tts_unprepare'); - late final _tts_unprepare = - _tts_unpreparePtr.asFunction(); - - /// @brief Retrieves all supported voices of the current engine using callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_ENGINE_NOT_FOUND Engine not found - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @post This function invokes tts_supported_voice_cb() repeatedly for getting voices. - /// @see tts_get_default_voice() - int tts_foreach_supported_voices( - tts_h tts, - tts_supported_voice_cb callback, - ffi.Pointer user_data, - ) { - return _tts_foreach_supported_voices( - tts, - callback, - user_data, - ); - } - - late final _tts_foreach_supported_voicesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tts_h, tts_supported_voice_cb, - ffi.Pointer)>>('tts_foreach_supported_voices'); - late final _tts_foreach_supported_voices = - _tts_foreach_supported_voicesPtr.asFunction< - int Function(tts_h, tts_supported_voice_cb, ffi.Pointer)>(); - - /// @brief Gets the default voice set by the user. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks If the function succeeds, @a language must be released with free(). - /// @param[in] tts The TTS handle - /// @param[out] language Language specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code (for example, "ko_KR" for Korean, "en_US" for American English) - /// @param[out] voice_type The voice type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_ENGINE_NOT_FOUND Engine not found - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @see tts_foreach_supported_voices() - int tts_get_default_voice( - tts_h tts, - ffi.Pointer> language, - ffi.Pointer voice_type, - ) { - return _tts_get_default_voice( - tts, - language, - voice_type, - ); - } - - late final _tts_get_default_voicePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tts_h, ffi.Pointer>, - ffi.Pointer)>>('tts_get_default_voice'); - late final _tts_get_default_voice = _tts_get_default_voicePtr.asFunction< - int Function( - tts_h, ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Sets the private data to tts engine. - /// @details The private data is the setting parameter for applying keys provided by the engine. - /// Using this API, the application can set the private data and use the corresponding key of the engine. - /// For example, if the engine provides 'girl's voice' as a voice type, the application can set the private data as the following. - /// int ret = tts_set_private_data(tts_h, "voice_type", "GIRL"); - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @remarks If the engine is replaced with the other engine, the key may be ignored. - /// @param[in] tts The TTS handle - /// @param[in] key The field name of private data - /// @param[in] data The data for set - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_ENGINE_NOT_FOUND Engine not found - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_READY. - /// @see tts_get_private_data() - int tts_set_private_data( - tts_h tts, - ffi.Pointer key, - ffi.Pointer data, - ) { - return _tts_set_private_data( - tts, - key, - data, - ); - } - - late final _tts_set_private_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tts_h, ffi.Pointer, - ffi.Pointer)>>('tts_set_private_data'); - late final _tts_set_private_data = _tts_set_private_dataPtr.asFunction< - int Function(tts_h, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the private data from tts engine. - /// @details The private data is the information provided by the engine. - /// Using this API, the application can get the private data which corresponds to the key from the engine. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @remarks The @a data must be released using free() when it is no longer required. - /// If the engine is replaced with the other engine, the key may be ignored. - /// @param[in] tts The TTS handle - /// @param[in] key The field name of private data - /// @param[out] data The data field of private data - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_ENGINE_NOT_FOUND Engine not found - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_READY. - /// @see tts_set_private_data() - int tts_get_private_data( - tts_h tts, - ffi.Pointer key, - ffi.Pointer> data, - ) { - return _tts_get_private_data( - tts, - key, - data, - ); - } - - late final _tts_get_private_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tts_h, ffi.Pointer, - ffi.Pointer>)>>('tts_get_private_data'); - late final _tts_get_private_data = _tts_get_private_dataPtr.asFunction< - int Function( - tts_h, ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Gets the maximum byte size for text. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @param[out] size The maximum byte size for text - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_READY. - /// @see tts_add_text() - int tts_get_max_text_size( - tts_h tts, - ffi.Pointer size, - ) { - return _tts_get_max_text_size( - tts, - size, - ); - } - - late final _tts_get_max_text_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - tts_h, ffi.Pointer)>>('tts_get_max_text_size'); - late final _tts_get_max_text_size = _tts_get_max_text_sizePtr - .asFunction)>(); - - /// @brief Gets the current state of TTS. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @param[out] state The current state of TTS - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @see tts_play() - /// @see tts_stop() - /// @see tts_pause() - int tts_get_state( - tts_h tts, - ffi.Pointer state, - ) { - return _tts_get_state( - tts, - state, - ); - } - - late final _tts_get_statePtr = _lookup< - ffi.NativeFunction)>>( - 'tts_get_state'); - late final _tts_get_state = _tts_get_statePtr - .asFunction)>(); - - /// @brief Gets the speed range. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @param[out] min The minimum speed value - /// @param[out] normal The normal speed value - /// @param[out] max The maximum speed value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_add_text() - int tts_get_speed_range( - tts_h tts, - ffi.Pointer min, - ffi.Pointer normal, - ffi.Pointer max, - ) { - return _tts_get_speed_range( - tts, - min, - normal, - max, - ); - } - - late final _tts_get_speed_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tts_h, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('tts_get_speed_range'); - late final _tts_get_speed_range = _tts_get_speed_rangePtr.asFunction< - int Function(tts_h, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Gets the current error message. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @remarks This function should be called from a tts error callback. Calling in any other context will result in an Operation failed error. - /// A successful call will allocate @a err_msg, which must be released by calling free() when it is no longer required. - /// @param[in] tts The TTS handle - /// @param[out] err_msg The current error message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @see tts_set_error_cb() - /// @see tts_unset_error_cb() - int tts_get_error_message( - tts_h tts, - ffi.Pointer> err_msg, - ) { - return _tts_get_error_message( - tts, - err_msg, - ); - } - - late final _tts_get_error_messagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tts_h, - ffi.Pointer>)>>('tts_get_error_message'); - late final _tts_get_error_message = _tts_get_error_messagePtr - .asFunction>)>(); - - /// @brief Adds a text to the queue. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @remarks Locale(e.g. setlocale()) MUST be set for utf8 text validation check. - /// @param[in] tts The TTS handle - /// @param[in] text An input text based utf8 - /// @param[in] language The language selected from the tts_foreach_supported_voices() (e.g. 'NULL'(Automatic), 'en_US') - /// @param[in] voice_type The voice type selected from the tts_foreach_supported_voices() (e.g. #TTS_VOICE_TYPE_AUTO, #TTS_VOICE_TYPE_FEMALE) - /// @param[in] speed A speaking speed (e.g. #TTS_SPEED_AUTO or the value from tts_get_speed_range()) - /// @param[out] utt_id The utterance ID passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_INVALID_VOICE Invalid voice about language, voice type - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @retval #TTS_ERROR_PERMISSION_DENIED Permission denied - /// @pre The state should be #TTS_STATE_READY, #TTS_STATE_PLAYING or #TTS_STATE_PAUSED. - /// @see tts_get_max_text_size() - /// @see tts_set_credential() - int tts_add_text( - tts_h tts, - ffi.Pointer text, - ffi.Pointer language, - int voice_type, - int speed, - ffi.Pointer utt_id, - ) { - return _tts_add_text( - tts, - text, - language, - voice_type, - speed, - utt_id, - ); - } - - late final _tts_add_textPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tts_h, ffi.Pointer, ffi.Pointer, - ffi.Int, ffi.Int, ffi.Pointer)>>('tts_add_text'); - late final _tts_add_text = _tts_add_textPtr.asFunction< - int Function(tts_h, ffi.Pointer, ffi.Pointer, int, - int, ffi.Pointer)>(); - - /// @brief Starts synthesizing voice from the text and plays the synthesized audio data. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_OUT_OF_NETWORK Out of network - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @retval #TTS_ERROR_PERMISSION_DENIED Permission denied - /// @pre The current state should be #TTS_STATE_READY or #TTS_STATE_PAUSED. - /// @post If this function succeeds, the TTS state will be #TTS_STATE_PLAYING. - /// @see tts_add_text() - /// @see tts_pause() - /// @see tts_stop() - /// @see tts_utterance_started_cb() - /// @see tts_utterance_completed_cb() - /// @see tts_error_cb() - /// @see tts_set_credential() - int tts_play( - tts_h tts, - ) { - return _tts_play( - tts, - ); - } - - late final _tts_playPtr = - _lookup>('tts_play'); - late final _tts_play = _tts_playPtr.asFunction(); - - /// @brief Stops playing the utterance and clears the queue. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The TTS state should be #TTS_STATE_READY or #TTS_STATE_PLAYING or #TTS_STATE_PAUSED. - /// @post If this function succeeds, the TTS state will be #TTS_STATE_READY. - /// This function will remove all text via tts_add_text() and synthesized sound data. - /// @see tts_play() - /// @see tts_pause() - int tts_stop( - tts_h tts, - ) { - return _tts_stop( - tts, - ); - } - - late final _tts_stopPtr = - _lookup>('tts_stop'); - late final _tts_stop = _tts_stopPtr.asFunction(); - - /// @brief Pauses the currently playing utterance. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The TTS state should be #TTS_STATE_PLAYING. - /// @post If this function succeeds, the TTS state will be #TTS_STATE_PAUSED. - /// @see tts_play() - /// @see tts_stop() - /// @see tts_error_cb() - /// @see tts_interrupted_cb() - int tts_pause( - tts_h tts, - ) { - return _tts_pause( - tts, - ); - } - - late final _tts_pausePtr = - _lookup>('tts_pause'); - late final _tts_pause = _tts_pausePtr.asFunction(); - - /// @brief Repeats the last played text. - /// @since_tizen 5.0 - /// @remarks This function repeats the last played text once. If there is no previous text, this function will not work. - /// If the language is changed, the last played text is removed. - /// Before calling this function, please call 'tts_stop()' in order to stop playing the previous one. - /// If this function succeeds, @a text_repeat must be released with free(). - /// @param[in] tts The TTS handle - /// @param[out] text_repeat Texts to be played repeatedly - /// @param[out] utt_id The utterance ID passed to the callback function - /// - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @retval #TTS_ERROR_OPERATION_FAILED Operation failure - /// @pre The state should be #TTS_STATE_READY. - /// @post If this function succeeds, the TTS state will be #TTS_STATE_PLAYING. - /// @see tts_add_text() - /// @see tts_stop() - int tts_repeat( - tts_h tts, - ffi.Pointer> text_repeat, - ffi.Pointer utt_id, - ) { - return _tts_repeat( - tts, - text_repeat, - utt_id, - ); - } - - late final _tts_repeatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tts_h, ffi.Pointer>, - ffi.Pointer)>>('tts_repeat'); - late final _tts_repeat = _tts_repeatPtr.asFunction< - int Function( - tts_h, ffi.Pointer>, ffi.Pointer)>(); - - /// @brief Registers a callback function to be called when the TTS state changes. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_state_changed_cb() - /// @see tts_unset_state_changed_cb() - int tts_set_state_changed_cb( - tts_h tts, - tts_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _tts_set_state_changed_cb( - tts, - callback, - user_data, - ); - } - - late final _tts_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tts_h, tts_state_changed_cb, - ffi.Pointer)>>('tts_set_state_changed_cb'); - late final _tts_set_state_changed_cb = - _tts_set_state_changed_cbPtr.asFunction< - int Function(tts_h, tts_state_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_set_state_changed_cb() - int tts_unset_state_changed_cb( - tts_h tts, - ) { - return _tts_unset_state_changed_cb( - tts, - ); - } - - late final _tts_unset_state_changed_cbPtr = - _lookup>( - 'tts_unset_state_changed_cb'); - late final _tts_unset_state_changed_cb = - _tts_unset_state_changed_cbPtr.asFunction(); - - /// @brief Registers a callback function to detect utterance start. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_utterance_started_cb() - /// @see tts_unset_utterance_started_cb() - int tts_set_utterance_started_cb( - tts_h tts, - tts_utterance_started_cb callback, - ffi.Pointer user_data, - ) { - return _tts_set_utterance_started_cb( - tts, - callback, - user_data, - ); - } - - late final _tts_set_utterance_started_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tts_h, tts_utterance_started_cb, - ffi.Pointer)>>('tts_set_utterance_started_cb'); - late final _tts_set_utterance_started_cb = - _tts_set_utterance_started_cbPtr.asFunction< - int Function( - tts_h, tts_utterance_started_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_set_utterance_started_cb() - int tts_unset_utterance_started_cb( - tts_h tts, - ) { - return _tts_unset_utterance_started_cb( - tts, - ); - } - - late final _tts_unset_utterance_started_cbPtr = - _lookup>( - 'tts_unset_utterance_started_cb'); - late final _tts_unset_utterance_started_cb = - _tts_unset_utterance_started_cbPtr.asFunction(); - - /// @brief Registers a callback function to detect utterance completion. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_utterance_completed_cb() - /// @see tts_unset_utterance_completed_cb() - int tts_set_utterance_completed_cb( - tts_h tts, - tts_utterance_completed_cb callback, - ffi.Pointer user_data, - ) { - return _tts_set_utterance_completed_cb( - tts, - callback, - user_data, - ); - } - - late final _tts_set_utterance_completed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tts_h, tts_utterance_completed_cb, - ffi.Pointer)>>('tts_set_utterance_completed_cb'); - late final _tts_set_utterance_completed_cb = - _tts_set_utterance_completed_cbPtr.asFunction< - int Function( - tts_h, tts_utterance_completed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_set_utterance_completed_cb() - int tts_unset_utterance_completed_cb( - tts_h tts, - ) { - return _tts_unset_utterance_completed_cb( - tts, - ); - } - - late final _tts_unset_utterance_completed_cbPtr = - _lookup>( - 'tts_unset_utterance_completed_cb'); - late final _tts_unset_utterance_completed_cb = - _tts_unset_utterance_completed_cbPtr.asFunction(); - - /// @brief Registers a callback function to detect errors. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_error_cb() - /// @see tts_unset_error_cb() - int tts_set_error_cb( - tts_h tts, - tts_error_cb callback, - ffi.Pointer user_data, - ) { - return _tts_set_error_cb( - tts, - callback, - user_data, - ); - } - - late final _tts_set_error_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - tts_h, tts_error_cb, ffi.Pointer)>>('tts_set_error_cb'); - late final _tts_set_error_cb = _tts_set_error_cbPtr - .asFunction)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_set_error_cb() - int tts_unset_error_cb( - tts_h tts, - ) { - return _tts_unset_error_cb( - tts, - ); - } - - late final _tts_unset_error_cbPtr = - _lookup>( - 'tts_unset_error_cb'); - late final _tts_unset_error_cb = - _tts_unset_error_cbPtr.asFunction(); - - /// @brief Registers a callback function to detect default voice change. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_default_voice_changed_cb() - /// @see tts_unset_default_voice_changed_cb() - int tts_set_default_voice_changed_cb( - tts_h tts, - tts_default_voice_changed_cb callback, - ffi.Pointer user_data, - ) { - return _tts_set_default_voice_changed_cb( - tts, - callback, - user_data, - ); - } - - late final _tts_set_default_voice_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tts_h, tts_default_voice_changed_cb, - ffi.Pointer)>>('tts_set_default_voice_changed_cb'); - late final _tts_set_default_voice_changed_cb = - _tts_set_default_voice_changed_cbPtr.asFunction< - int Function( - tts_h, tts_default_voice_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - /// @param[in] tts The TTS handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_set_default_voice_changed_cb() - int tts_unset_default_voice_changed_cb( - tts_h tts, - ) { - return _tts_unset_default_voice_changed_cb( - tts, - ); - } - - late final _tts_unset_default_voice_changed_cbPtr = - _lookup>( - 'tts_unset_default_voice_changed_cb'); - late final _tts_unset_default_voice_changed_cb = - _tts_unset_default_voice_changed_cbPtr.asFunction(); - - /// @brief Registers a callback function to detect the engine change. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @param[in] tts The TTS handle - /// @param[in] callback The callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_engine_changed_cb() - /// @see tts_unset_engine_changed_cb() - int tts_set_engine_changed_cb( - tts_h tts, - tts_engine_changed_cb callback, - ffi.Pointer user_data, - ) { - return _tts_set_engine_changed_cb( - tts, - callback, - user_data, - ); - } - - late final _tts_set_engine_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(tts_h, tts_engine_changed_cb, - ffi.Pointer)>>('tts_set_engine_changed_cb'); - late final _tts_set_engine_changed_cb = - _tts_set_engine_changed_cbPtr.asFunction< - int Function(tts_h, tts_engine_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - /// @param[in] tts The TTS handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTS_ERROR_NONE Successful - /// @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTS_ERROR_INVALID_STATE Invalid state - /// @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported - /// @pre The state should be #TTS_STATE_CREATED. - /// @see tts_set_engine_changed_cb() - int tts_unset_engine_changed_cb( - tts_h tts, - ) { - return _tts_unset_engine_changed_cb( - tts, - ); - } - - late final _tts_unset_engine_changed_cbPtr = - _lookup>( - 'tts_unset_engine_changed_cb'); - late final _tts_unset_engine_changed_cb = - _tts_unset_engine_changed_cbPtr.asFunction(); - - /// @brief Main function for Text-To-Speech (TTS) engine. - /// @details This function is the main function for operating TTS engine. - /// @since_tizen 3.0 - /// @remarks The service_app_main() should be used for working the engine after this function. - /// @param[in] argc The argument count(original) - /// @param[in] argv The argument(original) - /// @param[in] callback The structure of engine request callback function - /// @return This function returns zero on success, - /// or negative with error code on failure - /// @retval #TTSE_ERROR_NONE Successful - /// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure - /// @retval #TTSE_ERROR_NOT_SUPPORTED Not supported - /// @see ttse_request_callback_s - /// @code - /// #include - /// - /// // Required callback functions - MUST BE IMPLEMENTED - /// static int ttsengine_get_info_cb(char** engine_uuid, char** engine_name, char** engine_setting, bool* use_network); - /// static int ttsengine_initialize_cb(void); - /// static int ttsengine_deinitialize_cb(void); - /// static int ttsengine_is_valid_voice_cb(const char* language, int type, bool* is_valid); - /// static int ttsengine_foreach_supported_voices_cb(ttse_supported_voice_cb callback, void* user_data); - /// static int ttsengine_set_pitch_cb(int pitch); - /// static int ttsengine_load_voice_cb(const char* language, int type); - /// static int ttsengine_unload_voice_cb(const char* language, int type); - /// static int ttsengine_start_synthesis_cb(const char* language, int type, const char* text, int speed, void* user_data); - /// static int ttsengine_cancel_synthesis_cb(void); - /// static int ttsengine_check_app_agreed_cb(const char* appid, bool* is_agreed); - /// static bool ttsengine_need_app_credential_cb(void); - /// - /// // Optional callback function - /// static int ttsengine_private_data_set_cb(const char* key, const char* data); - /// - /// int main(int argc, char* argv[]) - /// { - /// // 1. Create a structure 'ttse_request_callback_s' - /// ttse_request_callback_s engine_callback = { 0, }; - /// - /// engine_callback.size = sizeof(ttse_request_callback_s); - /// engine_callback.version = 1; - /// engine_callback.get_info = ttsengine_get_info_cb; - /// engine_callback.initialize = ttsengine_initialize_cb; - /// engine_callback.deinitialize = ttsengine_deinitialize_cb; - /// engine_callback.foreach_voices = ttsengine_foreach_supported_voices_cb; - /// engine_callback.is_valid_voice = ttsengine_is_valid_voice_cb; - /// engine_callback.set_pitch = ttsengine_set_pitch_cb; - /// engine_callback.load_voice = ttsengine_load_voice_cb; - /// engine_callback.unload_voice = ttsengine_unload_voice_cb; - /// engine_callback.start_synth = ttsengine_start_synthesis_cb; - /// engine_callback.cancel_synth = ttsengine_cancel_synthesis_cb; - /// engine_callback.check_app_agreed = ttsengine_check_app_agreed_cb; - /// engine_callback.need_app_credential = ttsengine_need_app_credential_cb; - /// - /// // 2. Run 'ttse_main()' - /// if (0 != ttse_main(argc, argv, &engine_callback)) { - /// return -1; - /// } - /// - /// // Optional - /// ttse_set_private_data_set_cb(ttsengine_private_data_set_cb); - /// - /// // 3. Set event callbacks for service app and Run 'service_app_main()' - /// char ad[50] = { 0, }; - /// - /// service_app_lifecycle_callback_s event_callback; - /// app_event_handler_h handlers[5] = { NULL, }; - /// - /// event_callback.create = service_app_create; - /// event_callback.terminate = service_app_terminate; - /// event_callback.app_control = service_app_control; - /// - /// service_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, service_app_low_battery, &ad); - /// service_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, service_app_low_memory, &ad); - /// service_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, service_app_lang_changed, &ad); - /// service_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, service_app_region_changed, &ad); - /// - /// return service_app_main(argc, argv, &event_callback, ad); - /// } - /// - /// @endcode - int ttse_main( - int argc, - ffi.Pointer> argv, - ffi.Pointer callback, - ) { - return _ttse_main( - argc, - argv, - callback, - ); - } - - late final _ttse_mainPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer>, - ffi.Pointer)>>('ttse_main'); - late final _ttse_main = _ttse_mainPtr.asFunction< - int Function(int, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Gets the speed range from Tizen platform. - /// @since_tizen 3.0 - /// @remarks This API is used when TTS engine wants to get the speed range from Tizen platform. - /// @param[out] min The minimum speed value - /// @param[out] normal The normal speed value - /// @param[out] max The maximum speed value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTSE_ERROR_NONE Successful - /// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTSE_ERROR_NOT_SUPPORTED Not supported - /// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure - int ttse_get_speed_range( - ffi.Pointer min, - ffi.Pointer normal, - ffi.Pointer max, - ) { - return _ttse_get_speed_range( - min, - normal, - max, - ); - } - - late final _ttse_get_speed_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('ttse_get_speed_range'); - late final _ttse_get_speed_range = _ttse_get_speed_rangePtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Gets the pitch range from Tizen platform. - /// @since_tizen 3.0 - /// @remarks This API is used when TTS engine wants to get the pitch range from Tizen platform. - /// @param[out] min The minimum pitch value - /// @param[out] normal The normal pitch value - /// @param[out] max The maximum pitch value - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTSE_ERROR_NONE Successful - /// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTSE_ERROR_NOT_SUPPORTED Not supported - /// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure - int ttse_get_pitch_range( - ffi.Pointer min, - ffi.Pointer normal, - ffi.Pointer max, - ) { - return _ttse_get_pitch_range( - min, - normal, - max, - ); - } - - late final _ttse_get_pitch_rangePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('ttse_get_pitch_range'); - late final _ttse_get_pitch_range = _ttse_get_pitch_rangePtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sends the synthesized result to the engine service user. - /// @since_tizen 3.0 - /// @remarks This API is used in ttse_start_synthesis_cb(), when TTS engine sends the synthesized result to the engine service user. - /// The synthesized result and @a user_data must be transferred to the engine service user through this function. - /// @param[in] event The result event - /// @param[in] data Result data - /// @param[in] data_size Result data size - /// @param[in] audio_type The audio type - /// @param[in] rate The sample rate - /// @param[in] user_data The user data passed from ttse_start_synthesis_cb() - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTSE_ERROR_NONE Successful - /// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTSE_ERROR_NOT_SUPPORTED Not supported - /// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure - /// @pre The ttse_main() function should be invoked before this function is called. - /// ttse_start_synthesis_cb() will invoke this function. - /// @see ttse_start_synthesis_cb() - int ttse_send_result( - int event, - ffi.Pointer data, - int data_size, - int audio_type, - int rate, - ffi.Pointer user_data, - ) { - return _ttse_send_result( - event, - data, - data_size, - audio_type, - rate, - user_data, - ); - } - - late final _ttse_send_resultPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer, ffi.UnsignedInt, - ffi.Int32, ffi.Int, ffi.Pointer)>>('ttse_send_result'); - late final _ttse_send_result = _ttse_send_resultPtr.asFunction< - int Function( - int, ffi.Pointer, int, int, int, ffi.Pointer)>(); - - /// @brief Sends the error to the engine service user. - /// @details The following error codes can be delivered. - /// #TTSE_ERROR_NONE, - /// #TTSE_ERROR_OUT_OF_MEMORY, - /// #TTSE_ERROR_IO_ERROR, - /// #TTSE_ERROR_INVALID_PARAMETER, - /// #TTSE_ERROR_NETWORK_DOWN, - /// #TTSE_ERROR_PERMISSION_DENIED, - /// #TTSE_ERROR_INVALID_STATE, - /// #TTSE_ERROR_INVALID_VOICE, - /// #TTSE_ERROR_OPERATION_FAILED, - /// #TTSE_ERROR_NOT_SUPPORTED_FEATURE, - /// #TTSE_ERROR_NOT_SUPPORTED. - /// @since_tizen 3.0 - /// @param[in] error The error reason - /// @param[in] msg The error message - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTSE_ERROR_NONE Successful - /// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTSE_ERROR_NOT_SUPPORTED Not supported - /// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure - /// @pre The ttse_main() function should be invoked before this function is called. - int ttse_send_error( - int error, - ffi.Pointer msg, - ) { - return _ttse_send_error( - error, - msg, - ); - } - - late final _ttse_send_errorPtr = _lookup< - ffi - .NativeFunction)>>( - 'ttse_send_error'); - late final _ttse_send_error = _ttse_send_errorPtr - .asFunction)>(); - - /// @brief Sets a callback function for setting the private data. - /// @since_tizen 3.0 - /// @remarks The ttse_private_data_set_cb() function is called when the engine service user sends the private data. - /// @param[in] callback_func ttse_private_data_set event callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTSE_ERROR_NONE Successful - /// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTSE_ERROR_NOT_SUPPORTED Not supported - /// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure - /// @pre The ttse_main() function should be invoked before this function is called. - /// @see ttse_private_data_set_cb() - int ttse_set_private_data_set_cb( - ttse_private_data_set_cb callback_func, - ) { - return _ttse_set_private_data_set_cb( - callback_func, - ); - } - - late final _ttse_set_private_data_set_cbPtr = - _lookup>( - 'ttse_set_private_data_set_cb'); - late final _ttse_set_private_data_set_cb = _ttse_set_private_data_set_cbPtr - .asFunction(); - - /// @brief Sets a callback function for requesting the private data. - /// @since_tizen 3.0 - /// @remarks The ttse_private_data_requested_cb() function is called when the engine service user gets the private data from TTS engine. - /// @param[in] callback_func ttse_private_data_requested event callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #TTSE_ERROR_NONE Successful - /// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #TTSE_ERROR_NOT_SUPPORTED Not supported - /// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure - /// @pre The ttse_main() function should be invoked before this function is called. - /// @see ttse_private_data_requested_cb() - int ttse_set_private_data_requested_cb( - ttse_private_data_requested_cb callback_func, - ) { - return _ttse_set_private_data_requested_cb( - callback_func, - ); - } - - late final _ttse_set_private_data_requested_cbPtr = _lookup< - ffi.NativeFunction>( - 'ttse_set_private_data_requested_cb'); - late final _ttse_set_private_data_requested_cb = - _ttse_set_private_data_requested_cbPtr - .asFunction(); - - /// @brief Initializes voice control. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks If the function succeeds, @a vc must be released with vc_deinitialize(). - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #VC_ERROR_OPERATION_FAILED Operation failure - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @post If this function is called, the state will be #VC_STATE_INITIALIZED. - /// @see vc_deinitialize() - int vc_initialize() { - return _vc_initialize(); - } - - late final _vc_initializePtr = - _lookup>('vc_initialize'); - late final _vc_initialize = _vc_initializePtr.asFunction(); - - /// @brief Deinitializes voice control. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_OPERATION_FAILED Operation failure - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @see vc_deinitialize() - int vc_deinitialize() { - return _vc_deinitialize(); - } - - late final _vc_deinitializePtr = - _lookup>('vc_deinitialize'); - late final _vc_deinitialize = - _vc_deinitializePtr.asFunction(); - - /// @brief Connects the voice control service. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_OPERATION_FAILED Operation failure - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_INITIALIZED. - /// @post If this function is called, the state will be #VC_STATE_READY. - /// @see vc_unprepare() - int vc_prepare() { - return _vc_prepare(); - } - - late final _vc_preparePtr = - _lookup>('vc_prepare'); - late final _vc_prepare = _vc_preparePtr.asFunction(); - - /// @brief Disconnects the voice control service. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_READY. - /// @post If this function is called, the state will be #VC_STATE_INITIALIZED. - /// @see vc_prepare() - int vc_unprepare() { - return _vc_unprepare(); - } - - late final _vc_unpreparePtr = - _lookup>('vc_unprepare'); - late final _vc_unprepare = _vc_unpreparePtr.asFunction(); - - /// @brief Retrieves all supported languages using callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] callback Callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_OPERATION_FAILED Operation failure - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_INITIALIZED or #VC_STATE_READY. - /// @post This function invokes vc_supported_language_cb() repeatedly for getting languages. - /// @see vc_supported_language_cb() - /// @see vc_get_current_language() - int vc_foreach_supported_languages( - vc_supported_language_cb callback, - ffi.Pointer user_data, - ) { - return _vc_foreach_supported_languages( - callback, - user_data, - ); - } - - late final _vc_foreach_supported_languagesPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(vc_supported_language_cb, - ffi.Pointer)>>('vc_foreach_supported_languages'); - late final _vc_foreach_supported_languages = - _vc_foreach_supported_languagesPtr.asFunction< - int Function(vc_supported_language_cb, ffi.Pointer)>(); - - /// @brief Gets current language. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remark If the function succeeds, @a language must be released with free() by you when you no longer need it. - /// @param[out] language A language is specified as an ISO 3166 alpha-2 two letter country-code - /// followed by ISO 639-1 for the two-letter language code. - /// For example, "ko_KR" for Korean, "en_US" for American English - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_OUT_OF_MEMORY Out of memory - /// @retval #VC_ERROR_OPERATION_FAILED Operation failure - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_INITIALIZED or #VC_STATE_READY. - /// @see vc_foreach_supported_languages() - int vc_get_current_language( - ffi.Pointer> language, - ) { - return _vc_get_current_language( - language, - ); - } - - late final _vc_get_current_languagePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>)>>('vc_get_current_language'); - late final _vc_get_current_language = _vc_get_current_languagePtr - .asFunction>)>(); - - /// @brief Gets current state of voice control client. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[out] state The current state - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @see vc_state_changed_cb() - /// @see vc_set_state_changed_cb() - int vc_get_state( - ffi.Pointer state, - ) { - return _vc_get_state( - state, - ); - } - - late final _vc_get_statePtr = - _lookup)>>( - 'vc_get_state'); - late final _vc_get_state = - _vc_get_statePtr.asFunction)>(); - - /// @brief Gets current state of voice control service. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[out] state The current state - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_READY. - /// @see vc_request_start() - /// @see vc_request_stop() - /// @see vc_request_cancel() - /// @see vc_set_service_state_changed_cb() - /// @see vc_unset_service_state_changed_cb() - int vc_get_service_state( - ffi.Pointer state, - ) { - return _vc_get_service_state( - state, - ); - } - - late final _vc_get_service_statePtr = - _lookup)>>( - 'vc_get_service_state'); - late final _vc_get_service_state = _vc_get_service_statePtr - .asFunction)>(); - - /// @brief Gets the system command list. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks In the system command list, there are system commands predefined by product manufacturers. Those commands have the highest priority. - /// Therefore, the user can not set any commands same with the system commands. - /// The @a vc_sys_cmd_list must be released using free() when it is no longer required. - /// @param[out] vc_sys_cmd_list System command list handle - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The service state should be #VC_SERVICE_STATE_READY. - /// @see vc_unset_command_list() - int vc_get_system_command_list( - ffi.Pointer vc_sys_cmd_list, - ) { - return _vc_get_system_command_list( - vc_sys_cmd_list, - ); - } - - late final _vc_get_system_command_listPtr = - _lookup)>>( - 'vc_get_system_command_list'); - late final _vc_get_system_command_list = _vc_get_system_command_listPtr - .asFunction)>(); - - /// @brief Sets the invocation name. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks Invocation name is used to activate background commands. The invocation name can be the same as the application name or any other phrase. - /// For example, an application "Tizen Sample" has a background command, "Play music", and the invocation name of the application is set to "Tizen Sample". - /// In order to activate the background command, users can say "Tizen Sample, Play music". - /// The invocation name is dependent on the current language. For example, if the current language is "en_US"(English), the invocation name is also "en_US". - /// If the current language is "ja_JP"(Japanese) and the invocation name is "en_US", the invocation name will not be recognized. - /// This function should be called before vc_set_command_list(). - /// @param[in] name Invocation name that an application wants to be invoked by - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_READY. - /// @see vc_set_command_list() - int vc_set_invocation_name( - ffi.Pointer name, - ) { - return _vc_set_invocation_name( - name, - ); - } - - late final _vc_set_invocation_namePtr = - _lookup)>>( - 'vc_set_invocation_name'); - late final _vc_set_invocation_name = _vc_set_invocation_namePtr - .asFunction)>(); - - /// @brief Requests to set app id which is to want to ask the server dialogue. - /// @details Using this function, the developer can request registering the application on vc framework. - /// If developer requests to register @a app_id with @a credential which is valid, the application will be set on vc framework. - /// and then, when the developer requests the dialogue using vc_request_dialog(), dialog from specific engine server will be played by vc framework. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] app_id App id which is to want to ask server dialog. - /// @param[in] credential Credential key. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The service state should be #VC_SERVICE_STATE_READY. - /// @see vc_unset_server_dialog() - int vc_set_server_dialog( - ffi.Pointer app_id, - ffi.Pointer credential, - ) { - return _vc_set_server_dialog( - app_id, - credential, - ); - } - - late final _vc_set_server_dialogPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('vc_set_server_dialog'); - late final _vc_set_server_dialog = _vc_set_server_dialogPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Requests to unset app id which is to not want to ask the server dialogue. - /// @details Using this function, the developer can disable function to ask dialog based on server. - /// @since_tizen 5.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] app_id App id which is to not want to ask server dialog. - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The service state should be #VC_SERVICE_STATE_READY. - /// @see vc_set_server_dialog() - int vc_unset_server_dialog( - ffi.Pointer app_id, - ) { - return _vc_unset_server_dialog( - app_id, - ); - } - - late final _vc_unset_server_dialogPtr = - _lookup)>>( - 'vc_unset_server_dialog'); - late final _vc_unset_server_dialog = _vc_unset_server_dialogPtr - .asFunction)>(); - - /// @brief Requests to start the dialogue. - /// @details Using this function, the developer can request starting the dialogue to the framework. - /// When the developer requests the dialogue, two types of texts, @a disp_text and @a utt_text, can be sent by this function. - /// @a disp_text is a text for displaying, and @a utt_text is that for uttering. - /// For example, if @a disp_text is "October 10th" and @a utt_text is "Today is October 10th.", "October 10th" will be displayed on the screen and "Today is October 10th." will be spoken. - /// Also, the developer can set whether the dialogue starts automatically or not, using @a auto_start. - /// If the developer sets @a auto_start as @c true, the framework will start to record next speech and continue the dialogue. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks If @a auto_start is @c true, the recognition will start again. In this case, it can be restarted up to 4 times. - /// @param[in] disp_text Text to be displayed on the screen - /// @param[in] utt_text Text to be spoken - /// @param[in] auto_start A variable for setting whether the dialog session will be restarted automatically or not - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The service state should be #VC_SERVICE_STATE_READY. - int vc_request_dialog( - ffi.Pointer disp_text, - ffi.Pointer utt_text, - bool auto_start, - ) { - return _vc_request_dialog( - disp_text, - utt_text, - auto_start, - ); - } - - late final _vc_request_dialogPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Bool)>>('vc_request_dialog'); - late final _vc_request_dialog = _vc_request_dialogPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, bool)>(); - - /// @brief Sets command list. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks The command type is valid for #VC_COMMAND_TYPE_FOREGROUND or #VC_COMMAND_TYPE_BACKGROUND. - /// The matched commands of command list should be set and they should include type and command text at least. - /// @param[in] vc_cmd_list Command list handle - /// @param[in] type Command type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_READY. - /// @see vc_unset_command_list() - int vc_set_command_list( - vc_cmd_list_h vc_cmd_list, - int type, - ) { - return _vc_set_command_list( - vc_cmd_list, - type, - ); - } - - late final _vc_set_command_listPtr = - _lookup>( - 'vc_set_command_list'); - late final _vc_set_command_list = - _vc_set_command_listPtr.asFunction(); - - /// @brief Unsets command list. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] type Command type - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_READY. - /// @see vc_set_command_list() - int vc_unset_command_list( - int type, - ) { - return _vc_unset_command_list( - type, - ); - } - - late final _vc_unset_command_listPtr = - _lookup>( - 'vc_unset_command_list'); - late final _vc_unset_command_list = - _vc_unset_command_listPtr.asFunction(); - - /// @brief Gets the recognition result. - /// @since_tizen 3.0 - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] callback Callback function to get recognition result - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_READY. - /// @see vc_result_cb() - int vc_get_result( - vc_result_cb callback, - ffi.Pointer user_data, - ) { - return _vc_get_result( - callback, - user_data, - ); - } - - late final _vc_get_resultPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - vc_result_cb, ffi.Pointer)>>('vc_get_result'); - late final _vc_get_result = _vc_get_resultPtr - .asFunction)>(); - - /// @brief Registers a callback function for getting recognition result. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] callback Callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_INITIALIZED. - /// @see vc_result_cb() - /// @see vc_unset_result_cb() - int vc_set_result_cb( - vc_result_cb callback, - ffi.Pointer user_data, - ) { - return _vc_set_result_cb( - callback, - user_data, - ); - } - - late final _vc_set_result_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - vc_result_cb, ffi.Pointer)>>('vc_set_result_cb'); - late final _vc_set_result_cb = _vc_set_result_cbPtr - .asFunction)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_INITIALIZED. - /// @see vc_set_result_cb() - int vc_unset_result_cb() { - return _vc_unset_result_cb(); - } - - late final _vc_unset_result_cbPtr = - _lookup>('vc_unset_result_cb'); - late final _vc_unset_result_cb = - _vc_unset_result_cbPtr.asFunction(); - - /// @brief Registers a callback function to be called when state is changed. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] callback Callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_INITIALIZED. - /// @see vc_service_state_changed_cb() - /// @see vc_unset_service_state_changed_cb() - int vc_set_service_state_changed_cb( - vc_service_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _vc_set_service_state_changed_cb( - callback, - user_data, - ); - } - - late final _vc_set_service_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(vc_service_state_changed_cb, - ffi.Pointer)>>('vc_set_service_state_changed_cb'); - late final _vc_set_service_state_changed_cb = - _vc_set_service_state_changed_cbPtr.asFunction< - int Function(vc_service_state_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_INITIALIZED. - /// @see vc_set_service_state_changed_cb() - int vc_unset_service_state_changed_cb() { - return _vc_unset_service_state_changed_cb(); - } - - late final _vc_unset_service_state_changed_cbPtr = - _lookup>( - 'vc_unset_service_state_changed_cb'); - late final _vc_unset_service_state_changed_cb = - _vc_unset_service_state_changed_cbPtr.asFunction(); - - /// @brief Registers a callback function to be called when state is changed. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] callback Callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_INITIALIZED. - /// @see vc_state_changed_cb() - /// @see vc_unset_state_changed_cb() - int vc_set_state_changed_cb( - vc_state_changed_cb callback, - ffi.Pointer user_data, - ) { - return _vc_set_state_changed_cb( - callback, - user_data, - ); - } - - late final _vc_set_state_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(vc_state_changed_cb, - ffi.Pointer)>>('vc_set_state_changed_cb'); - late final _vc_set_state_changed_cb = _vc_set_state_changed_cbPtr - .asFunction)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_INITIALIZED. - /// @see vc_set_state_changed_cb() - int vc_unset_state_changed_cb() { - return _vc_unset_state_changed_cb(); - } - - late final _vc_unset_state_changed_cbPtr = - _lookup>( - 'vc_unset_state_changed_cb'); - late final _vc_unset_state_changed_cb = - _vc_unset_state_changed_cbPtr.asFunction(); - - /// @brief Registers a callback function to be called when current language is changed. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] callback Callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_INITIALIZED. - /// @see vc_current_language_changed_cb() - /// @see vc_unset_current_language_changed_cb() - int vc_set_current_language_changed_cb( - vc_current_language_changed_cb callback, - ffi.Pointer user_data, - ) { - return _vc_set_current_language_changed_cb( - callback, - user_data, - ); - } - - late final _vc_set_current_language_changed_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(vc_current_language_changed_cb, - ffi.Pointer)>>('vc_set_current_language_changed_cb'); - late final _vc_set_current_language_changed_cb = - _vc_set_current_language_changed_cbPtr.asFunction< - int Function( - vc_current_language_changed_cb, ffi.Pointer)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_INITIALIZED. - /// @see vc_set_current_language_changed_cb() - int vc_unset_current_language_changed_cb() { - return _vc_unset_current_language_changed_cb(); - } - - late final _vc_unset_current_language_changed_cbPtr = - _lookup>( - 'vc_unset_current_language_changed_cb'); - late final _vc_unset_current_language_changed_cb = - _vc_unset_current_language_changed_cbPtr.asFunction(); - - /// @brief Registers a callback function to be called when an error occurred. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] callback Callback function to register - /// @param[in] user_data The user data to be passed to the callback function - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_INITIALIZED. - /// @see vc_error_cb() - /// @see vc_unset_error_cb() - int vc_set_error_cb( - vc_error_cb callback, - ffi.Pointer user_data, - ) { - return _vc_set_error_cb( - callback, - user_data, - ); - } - - late final _vc_set_error_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - vc_error_cb, ffi.Pointer)>>('vc_set_error_cb'); - late final _vc_set_error_cb = _vc_set_error_cbPtr - .asFunction)>(); - - /// @brief Unregisters the callback function. - /// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @return @c 0 on success, - /// otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_INVALID_STATE Invalid state - /// @retval #VC_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// @pre The state should be #VC_STATE_INITIALIZED. - /// @see vc_set_error_cb() - int vc_unset_error_cb() { - return _vc_unset_error_cb(); - } - - late final _vc_unset_error_cbPtr = - _lookup>('vc_unset_error_cb'); - late final _vc_unset_error_cb = - _vc_unset_error_cbPtr.asFunction(); - - /// @brief Starts the main function for Voice Control (VC) engine. - /// @details This function is the main function for operating VC engine. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks The service_app_main() should be used for working the engine after this function. - /// @param[in] argc The argument count(original) - /// @param[in] argv The argument(original) - /// @param[in] callback The structure of engine request callback function - /// @return This function returns @c zero on success, or negative with error code on failure - /// @retval #VCE_ERROR_NONE Successful - /// @retval #VCE_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VCE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VCE_ERROR_NOT_SUPPORTED Not supported - /// @retval #VCE_ERROR_OPERATION_FAILED Operation failed - /// @pre The vce_get_engine_info() should be successful. - /// @see vce_get_engine_info() - /// @see vce_unload_engine() - /// @see vce_request_callback_s - /// @code - /// #include - /// - /// // Required callback functions - MUST BE IMPLEMENTED - /// static int vce_default_initialize(); - /// static int vce_default_deinitialize(void); - /// - /// static int vce_default_get_info(char** engine_uuid, char** engine_name, char** engine_setting, bool* use_network); - /// static int vce_default_get_recording_format(const char* audio_id, vce_audio_type_e* types, int* rate, int* channels); - /// static int vce_default_foreach_langs(vce_supported_language_cb callback, void* user_data); - /// static bool vce_default_is_lang_supported(const char* lang); - /// - /// static int vce_default_set_language(const char* language); - /// static int vce_default_set_commands(vce_cmd_h vc_command); - /// static int vce_default_unset_commands(); - /// - /// static int vce_default_start(bool stop_by_silence); - /// static int vce_default_set_recording(const void* data, unsigned int length, vce_speech_detect_e* silence_detected); - /// static int vce_default_stop(); - /// static int vce_default_cancel(void); - /// - /// static int vce_default_set_audio_type(const char* audio_type); - /// static int vce_default_set_domain(const char* domain); - /// static int vce_default_process_text(const char* text); - /// static int vce_default_process_list_event(const char* event); - /// static int vce_default_process_haptic_event(const char* event); - /// - /// // Optional callback function - /// static int vce_default_private_data_set_cb(const char* key, const char* data); - /// - /// int main(int argc, char* argv[]) - /// { - /// // 1. Create a structure 'vce_request_callback_s' - /// vce_request_callback_s callback = {0,}; - /// - /// callback.version = 1; - /// - /// callback.initialize = vce_default_initialize; - /// callback.deinitialize = vce_default_deinitialize; - /// - /// callback.get_info = vce_default_get_info; - /// callback.get_recording_format = vce_default_get_recording_format; - /// callback.foreach_langs = vce_default_foreach_langs; - /// callback.is_lang_supported = vce_default_is_lang_supported; - /// - /// callback.set_language = vce_default_set_language; - /// callback.set_commands = vce_default_set_commands; - /// callback.unset_commands = vce_default_unset_commands; - /// - /// callback.start = vce_default_start; - /// callback.set_recording = vce_default_set_recording; - /// callback.stop = vce_default_stop; - /// callback.cancel = vce_default_cancel; - /// - /// callback.set_audio_type = vce_default_set_audio_type; - /// callback.set_domain = vce_default_set_domain; - /// callback.process_text = vce_default_process_text; - /// callback.process_list_event = vce_default_process_list_event; - /// callback.process_haptic_event = vce_default_process_haptic_event; - /// - /// // 2. Run 'vce_main()' - /// if (0 != vce_main(argc, argv, &callback)) { - /// SLOG(LOG_ERROR, TAG_VCE, "[ERROR] Fail to vce main"); - /// return -1; - /// } - /// - /// // Optional - /// vce_set_private_data_set_cb(vce_default_private_data_set_cb); - /// - /// // 3. Set event callbacks for service app and Run 'service_app_main()' - /// char ad[50] = {0,}; - /// service_app_lifecycle_callback_s event_callback; - /// app_event_handler_h handlers[5] = {NULL, }; - /// - /// event_callback.create = service_app_create; - /// event_callback.terminate = service_app_terminate; - /// event_callback.app_control = service_app_control; - /// - /// service_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, service_app_low_battery, &ad); - /// service_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, service_app_low_memory, &ad); - /// service_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, service_app_lang_changed, &ad); - /// service_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, service_app_region_changed, &ad); - /// - /// return service_app_main(argc, argv, &event_callback, ad); - /// } - /// - /// @endcode - int vce_main( - int argc, - ffi.Pointer> argv, - ffi.Pointer callback, - ) { - return _vce_main( - argc, - argv, - callback, - ); - } - - late final _vce_mainPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer>, - ffi.Pointer)>>('vce_main'); - late final _vce_main = _vce_mainPtr.asFunction< - int Function(int, ffi.Pointer>, - ffi.Pointer)>(); - - /// @brief Sends the results to the engine service user. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] event A result event - /// @param[in] result_id Result ids - /// @param[in] count Result count - /// @param[in] all_result All result text - /// @param[in] non_fixed_result Non-fixed command result text - /// @param[in] nlu_result NLU result text - /// @param[in] msg Engine message (e.g. #VC_RESULT_MESSAGE_NONE, #VC_RESULT_MESSAGE_ERROR_TOO_LOUD) - /// @param[out] user_info A user info (e.g. If ASR result is consumed, the value is 0x01. If not, the value is 0x00.) - /// @param[in] user_data The user data passed from set callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #VCE_ERROR_NONE Successful - /// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VCE_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #VCE_ERROR_INVALID_STATE Invalid state - /// @retval #VCE_ERROR_OPERATION_FAILED Operation failure - /// @pre The vce_main() function should be invoked before this function is called. - /// vce_stop_cb() will invoke this callback. - /// @see vce_stop_cb() - int vce_send_result( - int event, - ffi.Pointer result_id, - int count, - ffi.Pointer all_result, - ffi.Pointer non_fixed_result, - ffi.Pointer nlu_result, - ffi.Pointer msg, - ffi.Pointer user_info, - ffi.Pointer user_data, - ) { - return _vce_send_result( - event, - result_id, - count, - all_result, - non_fixed_result, - nlu_result, - msg, - user_info, - user_data, - ); - } - - late final _vce_send_resultPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('vce_send_result'); - late final _vce_send_result = _vce_send_resultPtr.asFunction< - int Function( - int, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// @brief Sends the ASR result to the engine service user. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] event A asr result event - /// @param[in] asr_result A asr result text - /// @param[in] user_data The user data passed from the start - /// @return @c 0 on success, otherwise a negative error value - /// @retval #VCE_ERROR_NONE Successful - /// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VCE_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #VCE_ERROR_OPERATION_FAILED Operation failure - /// @pre The vce_main() function should be invoked before this function is called. - /// @see vce_start_cb() - int vce_send_asr_result( - int event, - ffi.Pointer asr_result, - ffi.Pointer user_data, - ) { - return _vce_send_asr_result( - event, - asr_result, - user_data, - ); - } - - late final _vce_send_asr_resultPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer, - ffi.Pointer)>>('vce_send_asr_result'); - late final _vce_send_asr_result = _vce_send_asr_resultPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sends the NLG (Natural Language Generation) result to the engine service user. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] nlg_result A nlg result - /// @param[in] user_data The user data passed from the start - /// @return @c 0 on success, otherwise a negative error value - /// @retval #VCE_ERROR_NONE Successful - /// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VCE_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #VCE_ERROR_OPERATION_FAILED Operation failure - /// @pre The vce_main() function should be invoked before this function is called. - /// @see vce_start_cb() - int vce_send_nlg_result( - ffi.Pointer nlg_result, - ffi.Pointer user_data, - ) { - return _vce_send_nlg_result( - nlg_result, - user_data, - ); - } - - late final _vce_send_nlg_resultPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('vce_send_nlg_result'); - late final _vce_send_nlg_result = _vce_send_nlg_resultPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Sends the specific engine result to the engine service user. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @param[in] engine_app_id A specific engine's app id - /// @param[in] event A specific engine result event - /// @param[in] result A specific engine result text - /// @param[in] user_info The user info passed from the start - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #VCE_ERROR_NONE Successful - /// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VCE_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #VCE_ERROR_OPERATION_FAILED Operation failure - /// @pre The vce_main() function should be invoked before this function is called. - int vce_send_specific_engine_result( - ffi.Pointer engine_app_id, - ffi.Pointer event, - ffi.Pointer result, - ffi.Pointer user_info, - ) { - return _vce_send_specific_engine_result( - engine_app_id, - event, - result, - user_info, - ); - } - - late final _vce_send_specific_engine_resultPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('vce_send_specific_engine_result'); - late final _vce_send_specific_engine_result = - _vce_send_specific_engine_resultPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sends the error to the engine service user. - /// @details The following error codes can be delivered. \n - /// #VCE_ERROR_NONE, \n - /// #VCE_ERROR_OUT_OF_MEMORY, \n - /// #VCE_ERROR_IO_ERROR, \n - /// #VCE_ERROR_INVALID_PARAMETER, \n - /// #VCE_ERROR_OUT_OF_NETWORK, \n - /// #VCE_ERROR_RECORDER_BUSY, \n - /// #VCE_ERROR_NOT_SUPPORTED, \n - /// #VCE_ERROR_INVALID_STATE, \n - /// #VCE_ERROR_INVALID_LANGUAGE, \n - /// #VCE_ERROR_OPERATION_FAILED, \n - /// #VCE_ERROR_PERMISSION_DENIED, \n - /// #VCE_ERROR_NOT_SUPPORTED_FEATURE. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @param[in] error Error type - /// @param[in] msg Error message - /// @param[in] user_data The user data passed from set callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #VCE_ERROR_NONE Successful - /// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VCE_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #VCE_ERROR_OPERATION_FAILED Operation failure - /// @pre The vce_main() function should be invoked before this function is called. - int vce_send_error( - int error, - ffi.Pointer msg, - ffi.Pointer user_data, - ) { - return _vce_send_error( - error, - msg, - user_data, - ); - } - - late final _vce_send_errorPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer, - ffi.Pointer)>>('vce_send_error'); - late final _vce_send_error = _vce_send_errorPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); - - /// @brief Sets a callback function for setting the private data to the engine service. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks The vce_private_data_set_cb() function is called when the engine service user sets the private data to the engine service. - /// @param[in] callback_func vce_private_data_set event callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #VCE_ERROR_NONE Successful - /// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VCE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VCE_ERROR_NOT_SUPPORTED Not supported - /// @retval #VCE_ERROR_OPERATION_FAILED Operation failure - /// @retval #VCE_ERROR_NOT_SUPPORTED_FEATURE Not supported feature - /// @pre The vce_main() function should be invoked before this function is called. - /// @see vce_private_data_set_cb() - int vce_set_private_data_set_cb( - vce_private_data_set_cb callback_func, - ) { - return _vce_set_private_data_set_cb( - callback_func, - ); - } - - late final _vce_set_private_data_set_cbPtr = - _lookup>( - 'vce_set_private_data_set_cb'); - late final _vce_set_private_data_set_cb = _vce_set_private_data_set_cbPtr - .asFunction(); - - /// @brief Sets a callback function for requesting the private data to the engine service. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks The vce_private_data_requested_cb() function is called when the engine service user requests the private data to the engine service. - /// @param[in] callback_func vce_private_data_requested event callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #VCE_ERROR_NONE Successful - /// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VCE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VCE_ERROR_NOT_SUPPORTED Not supported - /// @retval #VCE_ERROR_OPERATION_FAILED Operation failure - /// @see vce_private_data_requested_cb() - int vce_set_private_data_requested_cb( - vce_private_data_requested_cb callback_func, - ) { - return _vce_set_private_data_requested_cb( - callback_func, - ); - } - - late final _vce_set_private_data_requested_cbPtr = _lookup< - ffi.NativeFunction>( - 'vce_set_private_data_requested_cb'); - late final _vce_set_private_data_requested_cb = - _vce_set_private_data_requested_cbPtr - .asFunction(); - - /// @brief Sets a callback function for requesting the NLU base information to the engine service. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @remarks The vce_nlu_base_info_requested_cb() function is called when the engine service user requests the NLU base information to the engine service. - /// @param[in] callback_func vce_nlu_base_info_requested event callback function - /// @return @c 0 on success, otherwise a negative error value - /// @retval #VCE_ERROR_NONE Successful - /// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VCE_ERROR_OPERATION_FAILED Operation failure - /// @retval #VCE_ERROR_NOT_SUPPORTED_FEATURE Not supported feature - /// @see vce_nlu_base_info_requested_cb() - int vce_set_nlu_base_info_requested_cb( - vce_nlu_base_info_requested_cb callback_func, - ) { - return _vce_set_nlu_base_info_requested_cb( - callback_func, - ); - } - - late final _vce_set_nlu_base_info_requested_cbPtr = _lookup< - ffi.NativeFunction>( - 'vce_set_nlu_base_info_requested_cb'); - late final _vce_set_nlu_base_info_requested_cb = - _vce_set_nlu_base_info_requested_cbPtr - .asFunction(); - - /// @brief Sets a callback function for getting the engine service request. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @param[in] callback_func Callback function to register - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #VCE_ERROR_NONE Successful - /// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VCE_ERROR_NOT_SUPPORTED Not supported - /// - /// @see vce_unset_specific_engine_request_cb() - int vce_set_specific_engine_request_cb( - vce_specific_engine_request_cb callback_func, - ) { - return _vce_set_specific_engine_request_cb( - callback_func, - ); - } - - late final _vce_set_specific_engine_request_cbPtr = _lookup< - ffi.NativeFunction>( - 'vce_set_specific_engine_request_cb'); - late final _vce_set_specific_engine_request_cb = - _vce_set_specific_engine_request_cbPtr - .asFunction(); - - /// @brief Unsets the engine service request callback function. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// - /// @see vce_set_specific_engine_request_cb() - int vce_unset_specific_engine_request_cb() { - return _vce_unset_specific_engine_request_cb(); - } - - late final _vce_unset_specific_engine_request_cbPtr = - _lookup>( - 'vce_unset_specific_engine_request_cb'); - late final _vce_unset_specific_engine_request_cb = - _vce_unset_specific_engine_request_cbPtr.asFunction(); - - /// @brief Retrieves all commands using callback function. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @param[in] vce_command The handle to be passed to the vce_set_commands() function - /// @param[in] callback The callback function to invoke - /// @param[in] user_data The user data to be passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #VCE_ERROR_NONE Successful - /// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VCE_ERROR_OPERATION_FAILED Operation failure - /// @retval #VCE_ERROR_INVALID_STATE Invalid state - /// @post This function invokes vce_command_cb() repeatedly for getting commands. - /// @see vce_foreach_command_cb() - /// @see vce_set_commands() - int vce_get_foreach_command( - vce_cmd_h vce_command, - vce_command_cb callback, - ffi.Pointer user_data, - ) { - return _vce_get_foreach_command( - vce_command, - callback, - user_data, - ); - } - - late final _vce_get_foreach_commandPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(vce_cmd_h, vce_command_cb, - ffi.Pointer)>>('vce_get_foreach_command'); - late final _vce_get_foreach_command = _vce_get_foreach_commandPtr.asFunction< - int Function(vce_cmd_h, vce_command_cb, ffi.Pointer)>(); - - /// @brief Gets command length. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @param[in] vce_command The handle to be passed to the vce_set_commands() function - /// @param[out] count The command count value - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #VCE_ERROR_NONE Successful - /// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VCE_ERROR_OPERATION_FAILED Operation failure - /// @see vce_set_commands() - int vce_get_command_count( - vce_cmd_h vce_command, - ffi.Pointer count, - ) { - return _vce_get_command_count( - vce_command, - count, - ); - } - - late final _vce_get_command_countPtr = _lookup< - ffi - .NativeFunction)>>( - 'vce_get_command_count'); - late final _vce_get_command_count = _vce_get_command_countPtr - .asFunction)>(); - - /// @brief Gets current audio type. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks The @a audio_type must be released using free() when it is no longer required. - /// @param[in] audio_type Current audio type (e.g. #VCE_AUDIO_ID_BLUETOOTH or #VCE_AUDIO_ID_WIFI) - /// @return the value greater than 0 on success, otherwise a negative error value - /// @retval #VCE_ERROR_NONE Successful - /// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VCE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VCE_ERROR_NOT_SUPPORTED Not supported - int vce_get_audio_type( - ffi.Pointer> audio_type, - ) { - return _vce_get_audio_type( - audio_type, - ); - } - - late final _vce_get_audio_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>)>>('vce_get_audio_type'); - late final _vce_get_audio_type = _vce_get_audio_typePtr - .asFunction>)>(); - - /// @brief Sets private data to a voice manager client. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @param[in] key Private key - /// @param[in] data Private data - /// @return 0 on success, otherwise a negative error value. - /// @retval #VCE_ERROR_NONE Successful - /// @retval #VCE_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VCE_ERROR_INVALID_STATE Invalid state - /// @retval #VCE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VCE_ERROR_NOT_SUPPORTED Not supported - /// @retval #VCE_ERROR_OPERATION_FAILED Operation failed - int vce_set_private_data( - ffi.Pointer key, - ffi.Pointer data, - ) { - return _vce_set_private_data( - key, - data, - ); - } - - late final _vce_set_private_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('vce_set_private_data'); - late final _vce_set_private_data = _vce_set_private_dataPtr - .asFunction, ffi.Pointer)>(); - - /// @brief Gets private data from a voice manager client. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @remarks The @a data must be released using free() when it is no longer required. - /// @param[in] key Private key - /// @param[out] data Private data - /// @return 0 on success, otherwise a negative error value. - /// @retval #VCE_ERROR_NONE Successful - /// @retval #VCE_ERROR_OUT_OF_MEMORY Out of Memory - /// @retval #VCE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VCE_ERROR_NOT_SUPPORTED Not supported - /// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VCE_ERROR_INVALID_STATE Invalid state - /// @retval #VCE_ERROR_OPERATION_FAILED Operation failed - int vce_get_private_data( - ffi.Pointer key, - ffi.Pointer> data, - ) { - return _vce_get_private_data( - key, - data, - ); - } - - late final _vce_get_private_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer>)>>('vce_get_private_data'); - late final _vce_get_private_data = _vce_get_private_dataPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - /// @brief Starts recording voice. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @return 0 on success, otherwise a negative error value. - /// @retval #VCE_ERROR_NONE Successful - /// @retval #VCE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VCE_ERROR_NOT_SUPPORTED Not supported - /// @retval #VCE_ERROR_OPERATION_FAILED Operation failure - /// @retval #VCE_ERROR_RECORDER_BUSY Busy recorder - int vce_start_recording() { - return _vce_start_recording(); - } - - late final _vce_start_recordingPtr = - _lookup>('vce_start_recording'); - late final _vce_start_recording = - _vce_start_recordingPtr.asFunction(); - - /// @brief Stops recording voice. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// @privlevel public - /// @privilege %http://tizen.org/privilege/recorder - /// @return 0 on success, otherwise a negative error value. - /// @retval #VCE_ERROR_NONE Successful - /// @retval #VCE_ERROR_PERMISSION_DENIED Permission denied - /// @retval #VCE_ERROR_NOT_SUPPORTED Not supported - /// @retval #VCE_ERROR_OPERATION_FAILED Operation failure - int vce_stop_recording() { - return _vce_stop_recording(); - } - - late final _vce_stop_recordingPtr = - _lookup>('vce_stop_recording'); - late final _vce_stop_recording = - _vce_stop_recordingPtr.asFunction(); - - /// @brief Sends audio formats necessary for playing TTS feedback. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @param[in] rate A sampling rate - /// @param[in] channel The audio channel - /// @param[in] audio_type The audio type - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #VCE_ERROR_NONE Successful - /// @retval #VCE_ERROR_NOT_SUPPORTED Not supported - /// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VCE_ERROR_OPERATION_FAILED Operation failure - /// @retval #VCE_ERROR_OUT_OF_MEMORY Out of Memory - int vce_send_feedback_audio_format( - int rate, - int channel, - int audio_type, - ) { - return _vce_send_feedback_audio_format( - rate, - channel, - audio_type, - ); - } - - late final _vce_send_feedback_audio_formatPtr = _lookup< - ffi.NativeFunction>( - 'vce_send_feedback_audio_format'); - late final _vce_send_feedback_audio_format = - _vce_send_feedback_audio_formatPtr - .asFunction(); - - /// @brief Sends audio streaming necessary for playing TTS feedback. - /// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif - /// - /// @param[in] event A feedback event - /// @param[in] buffer The feedback data - /// @param[in] len The length of the feedback data - /// - /// @return 0 on success, otherwise a negative error value. - /// @retval #VCE_ERROR_NONE Successful - /// @retval #VCE_ERROR_NOT_SUPPORTED Not supported - /// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VCE_ERROR_OPERATION_FAILED Operation failure - /// @retval #VCE_ERROR_OUT_OF_MEMORY Out of Memory - int vce_send_feedback_streaming( - int event, - ffi.Pointer buffer, - int len, - ) { - return _vce_send_feedback_streaming( - event, - buffer, - len, - ); - } - - late final _vce_send_feedback_streamingPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer, - ffi.Int)>>('vce_send_feedback_streaming'); - late final _vce_send_feedback_streaming = _vce_send_feedback_streamingPtr - .asFunction, int)>(); - - /// @brief Sets a callback function for getting the request of sending TTS feedback from the engine service user. - /// @since_tizen 5.0 - /// - /// @param[in] callback_func Callback function to be registered - /// @param[in] user_data The user data passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #VCE_ERROR_NONE Successful - /// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VCE_ERROR_NOT_SUPPORTED Not supported - /// - /// @see vce_request_tts_cb() - /// @see vce_unset_request_tts_cb() - int vce_set_request_tts_cb( - vce_request_tts_cb callback_func, - ffi.Pointer user_data, - ) { - return _vce_set_request_tts_cb( - callback_func, - user_data, - ); - } - - late final _vce_set_request_tts_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(vce_request_tts_cb, - ffi.Pointer)>>('vce_set_request_tts_cb'); - late final _vce_set_request_tts_cb = _vce_set_request_tts_cbPtr - .asFunction)>(); - - /// @brief Unsets the TTS feedback request callback function. - /// @since_tizen 5.0 - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// - /// @see vce_set_request_tts_cb() - int vce_unset_request_tts_cb() { - return _vce_unset_request_tts_cb(); - } - - late final _vce_unset_request_tts_cbPtr = - _lookup>( - 'vce_unset_request_tts_cb'); - late final _vce_unset_request_tts_cb = - _vce_unset_request_tts_cbPtr.asFunction(); - - /// @brief Sets a callback function for getting the request of canceling TTS feedback from the engine service user. - /// @since_tizen 5.0 - /// - /// @param[in] callback_func Callback function to be registered - /// @param[in] user_data The user data passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #VCE_ERROR_NONE Successful - /// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VCE_ERROR_NOT_SUPPORTED Not supported - /// - /// @see vce_cancel_tts_cb() - /// @see vce_unset_cancel_tts_cb() - int vce_set_cancel_tts_cb( - vce_cancel_tts_cb callback_func, - ffi.Pointer user_data, - ) { - return _vce_set_cancel_tts_cb( - callback_func, - user_data, - ); - } - - late final _vce_set_cancel_tts_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(vce_cancel_tts_cb, - ffi.Pointer)>>('vce_set_cancel_tts_cb'); - late final _vce_set_cancel_tts_cb = _vce_set_cancel_tts_cbPtr - .asFunction)>(); - - /// @brief Unsets the TTS feedback cancellation callback function. - /// @since_tizen 5.0 - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// - /// @see vce_set_cancel_tts_cb() - int vce_unset_cancel_tts_cb() { - return _vce_unset_cancel_tts_cb(); - } - - late final _vce_unset_cancel_tts_cbPtr = - _lookup>( - 'vce_unset_cancel_tts_cb'); - late final _vce_unset_cancel_tts_cb = - _vce_unset_cancel_tts_cbPtr.asFunction(); - - /// @brief Sets a callback function for sending TTS audio format to the engine service user. - /// @since_tizen 5.0 - /// - /// @param[in] callback_func Callback function to be registered - /// @param[in] user_data The user data passed to the callback function - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #VCE_ERROR_NONE Successful - /// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter - /// @retval #VCE_ERROR_NOT_SUPPORTED Not supported - /// - /// @see vce_tts_audio_format_request_cb() - /// @see vce_unset_get_tts_audio_format_cb() - int vce_set_tts_audio_format_request_cb( - vce_tts_audio_format_request_cb callback_func, - ffi.Pointer user_data, - ) { - return _vce_set_tts_audio_format_request_cb( - callback_func, - user_data, - ); - } - - late final _vce_set_tts_audio_format_request_cbPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(vce_tts_audio_format_request_cb, - ffi.Pointer)>>('vce_set_tts_audio_format_request_cb'); - late final _vce_set_tts_audio_format_request_cb = - _vce_set_tts_audio_format_request_cbPtr.asFunction< - int Function( - vce_tts_audio_format_request_cb, ffi.Pointer)>(); - - /// @brief Unsets the TTS audio format request callback function. - /// @since_tizen 5.0 - /// - /// @return 0 on success, otherwise a negative error value - /// @retval #VC_ERROR_NONE Successful - /// @retval #VC_ERROR_NOT_SUPPORTED Not supported - /// - /// @see vce_set_tts_audio_format_cb() - int vce_unset_get_tts_audio_format_cb() { - return _vce_unset_get_tts_audio_format_cb(); - } - - late final _vce_unset_get_tts_audio_format_cbPtr = - _lookup>( - 'vce_unset_get_tts_audio_format_cb'); - late final _vce_unset_get_tts_audio_format_cb = - _vce_unset_get_tts_audio_format_cbPtr.asFunction(); -} - -/// @brief Enumeration for tizen errors. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class tizen_error_e { - /// < Successful - static const int TIZEN_ERROR_NONE = 0; - - /// < Operation not permitted - static const int TIZEN_ERROR_NOT_PERMITTED = -1; - - /// < No such file or directory - static const int TIZEN_ERROR_NO_SUCH_FILE = -2; - - /// < No such process - static const int TIZEN_ERROR_NO_SUCH_PROCESS = -3; - - /// < Interrupted system call - static const int TIZEN_ERROR_INTERRUPTED_SYS_CALL = -4; - - /// < I/O error - static const int TIZEN_ERROR_IO_ERROR = -5; - - /// < No such device or address - static const int TIZEN_ERROR_NO_SUCH_DEVICE = -6; - - /// < Argument list too long - static const int TIZEN_ERROR_ARGUMENT_LIST_TOO_LONG = -7; - - /// < Exec format error - static const int TIZEN_ERROR_EXEC_FORMAT_ERROR = -8; - - /// < Bad file number - static const int TIZEN_ERROR_BAD_FILE_NUMBER = -9; - - /// < Try again - static const int TIZEN_ERROR_TRY_AGAIN = -11; - - /// < Out of memory - static const int TIZEN_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied - static const int TIZEN_ERROR_PERMISSION_DENIED = -13; - - /// < Bad address - static const int TIZEN_ERROR_BAD_ADDRESS = -14; - - /// < Block device required - static const int TIZEN_ERROR_BLOCK_DEVICE_REQUIRED = -15; - - /// < Device or resource busy - static const int TIZEN_ERROR_RESOURCE_BUSY = -16; - - /// < File exists - static const int TIZEN_ERROR_FILE_EXISTS = -17; - - /// < Cross-device link - static const int TIZEN_ERROR_CROSS_DEVICE_LINK = -18; - - /// < Not a directory - static const int TIZEN_ERROR_NOT_A_DIRECTORY = -20; - - /// < Is a directory - static const int TIZEN_ERROR_IS_A_DIRECTORY = -21; - - /// < Invalid function parameter - static const int TIZEN_ERROR_INVALID_PARAMETER = -22; - - /// < File table overflow - static const int TIZEN_ERROR_FILE_TABLE_OVERFLOW = -23; - - /// < Too many open files - static const int TIZEN_ERROR_TOO_MANY_OPEN_FILES = -24; - - /// < Not a terminal - static const int TIZEN_ERROR_TOO_NOT_A_TERMINAL = -25; - - /// < Not a terminal - static const int TIZEN_ERROR_TOO_TEXT_FILE_BUSY = -26; - - /// < File too large - static const int TIZEN_ERROR_FILE_TOO_LARGE = -27; - - /// < No space left on device - static const int TIZEN_ERROR_FILE_NO_SPACE_ON_DEVICE = -28; - - /// < Illegal seek - static const int TIZEN_ERROR_ILLEGAL_SEEK = -29; - - /// < Read-only file system - static const int TIZEN_ERROR_READ_ONLY_FILESYSTEM = -30; - - /// < No data available - static const int TIZEN_ERROR_NO_DATA = -61; - - /// < Too many links - static const int TIZEN_ERROR_TOO_MANY_LINKS = -31; - - /// < Broken pipe - static const int TIZEN_ERROR_BROKEN_PIPE = -32; - - /// < Math argument out of domain of func - static const int TIZEN_ERROR_ARGUMENT_OUT_OF_DOMAIN = -33; - - /// < Math result not representable - static const int TIZEN_ERROR_RESULT_OUT_OF_RANGE = -34; - - /// < Resource deadlock would occur - static const int TIZEN_ERROR_WOULD_CAUSE_DEADLOCK = -35; - - /// < File name too long - static const int TIZEN_ERROR_FILE_NAME_TOO_LONG = -36; - - /// < No record locks available - static const int TIZEN_ERROR_FILE_NO_LOCKS_AVAILABLE = -37; - - /// < Function not implemented - static const int TIZEN_ERROR_INVALID_OPERATION = -38; - - /// < Directory not empty - static const int TIZEN_ERROR_DIR_NOT_EMPTY = -39; - - /// < Too many symbolic links encountered - static const int TIZEN_ERROR_TOO_MANY_SYMBOLIC_LINKS = -40; - - /// < Operation would block - static const int TIZEN_ERROR_WOULD_BLOCK = -11; - - /// < Accessing a corrupted shared library - static const int TIZEN_ERROR_CORRUPTED_SHARED_LIB = -80; - - /// < .lib section in a.out corrupted - static const int TIZEN_ERROR_LIB_SECTION_CORRUPTED = -81; - - /// < Attempting to link in too many shared libraries - static const int TIZEN_ERROR_LINK_TOO_MANY_SHARED_LIB = -82; - - /// < Cannot exec a shared library directly - static const int TIZEN_ERROR_SHARED_LIB_EXEC = -83; - - /// < Illegal byte sequence - static const int TIZEN_ERROR_ILLEGAL_BYTE_SEQ = -84; - - /// < Interrupted system call should be restarted - static const int TIZEN_ERROR_SYSTEM_CALL_RESTART = -85; - - /// < Streams pipe error - static const int TIZEN_ERROR_STREAMS_PIPE = -86; - - /// < Too many users - static const int TIZEN_ERROR_TOO_MANY_USERS = -87; - - /// < Socket operation on non-socket - static const int TIZEN_ERROR_NON_SOCKET = -88; - - /// < Destination address required - static const int TIZEN_ERROR_NO_DEST_ADDRESS = -89; - - /// < Message too long - static const int TIZEN_ERROR_MSG_TOO_LONG = -90; - - /// < Protocol wrong type for socket - static const int TIZEN_ERROR_PROTOCOL_WRONG_TYPE = -91; - - /// < Protocol not available - static const int TIZEN_ERROR_PROTOCOL_NOT_AVALIABLE = -92; - - /// < Protocol not supported - static const int TIZEN_ERROR_PROTOCOL_NOT_SUPPORTED = -93; - - /// < Socket type not supported - static const int TIZEN_ERROR_SOCKET_TYPE_NOT_SUPPORTED = -94; - - /// < Operation not supported on transport endpoint - static const int TIZEN_ERROR_ENDPOINT_OPERATIN_NOT_SUPPORTED = -95; - - /// < Protocol family not supported - static const int TIZEN_ERROR_PROTOCOL_FAMILY_NOT_SUPPORTED = -96; - - /// < Address family not supported by protocol - static const int TIZEN_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED = -97; - - /// < Address already in use - static const int TIZEN_ERROR_ADDRES_IN_USE = -98; - - /// < Cannot assign requested address - static const int TIZEN_ERROR_CANNOT_ASSIGN_ADDRESS = -99; - - /// < Network is down - static const int TIZEN_ERROR_NETWORK_DOWN = -100; - - /// < Network is unreachable - static const int TIZEN_ERROR_NETWORK_UNREACHABLE = -101; - - /// < Network dropped connection because of reset - static const int TIZEN_ERROR_NETWORK_RESET = -102; - - /// < Software caused connection abort - static const int TIZEN_ERROR_CONNECTION_ABORTED = -103; - - /// < Connection reset by peer - static const int TIZEN_ERROR_CONNECTION_RESET_BY_PEER = -104; - - /// < No buffer space available - static const int TIZEN_ERROR_BUFFER_SPACE = -105; - - /// < Transport endpoint is already connected - static const int TIZEN_ERROR_ENDPOINT_CONNECTED = -106; - - /// < Transport endpoint is not connected - static const int TIZEN_ERROR_ENDPOINT_NOT_CONNECTED = -107; - - /// < Cannot send after transport endpoint shutdown - static const int TIZEN_ERROR_ENDPOINT_SHUTDOWN = -108; - - /// < Too many references: cannot splice - static const int TIZEN_ERROR_TOO_MANY_REFERENCES = -109; - - /// < Connection timed out - static const int TIZEN_ERROR_CONNECTION_TIME_OUT = -110; - - /// < Connection refused - static const int TIZEN_ERROR_CONNECTION_REFUSED = -111; - - /// < Host is down - static const int TIZEN_ERROR_HOST_DOWN = -112; - - /// < No route to host - static const int TIZEN_ERROR_NO_ROUTE_TO_HOST = -113; - - /// < Operation already in progress - static const int TIZEN_ERROR_ALREADY_IN_PROGRESS = -114; - - /// < Operation now in progress - static const int TIZEN_ERROR_NOW_IN_PROGRESS = -115; - - /// < Stale NFS file handle - static const int TIZEN_ERROR_STALE_NFS_FILE_HANDLE = -116; - - /// < Structure needs cleaning - static const int TIZEN_ERROR_STRUCTURE_UNCLEAN = -117; - - /// < Not a XENIX named type file - static const int TIZEN_ERROR_NOT_XENIX_NAMED_TYPE_FILE = -118; - - /// < No XENIX semaphores available - static const int TIZEN_ERROR_NO_XENIX_SEMAPHORES_AVAILABLE = -119; - - /// < Is a named type file - static const int TIZEN_ERROR_IS_NAMED_TYPE_FILE = -120; - - /// < Remote I/O error - static const int TIZEN_ERROR_REMOTE_IO = -121; - - /// < Quota exceeded - static const int TIZEN_ERROR_QUOTA_EXCEEDED = -122; - - /// < No medium found - static const int TIZEN_ERROR_NO_MEDIUM = -123; - - /// < Wrong medium type - static const int TIZEN_ERROR_WRONG_MEDIUM_TYPE = -124; - - /// < Operation Canceled - static const int TIZEN_ERROR_CANCELED = -125; - - /// < Required key not available - static const int TIZEN_ERROR_KEY_NOT_AVAILABLE = -126; - - /// < Key has expired - static const int TIZEN_ERROR_KEY_EXPIRED = -127; - - /// < Key has been revoked - static const int TIZEN_ERROR_KEY_REVOKED = -128; - - /// < Key was rejected by service - static const int TIZEN_ERROR_KEY_REJECTED = -129; - - /// < Owner died (for robust mutexes) - static const int TIZEN_ERROR_OWNER_DEAD = -130; - - /// < Unknown error - static const int TIZEN_ERROR_UNKNOWN = -1073741824; - - /// < Time out - static const int TIZEN_ERROR_TIMED_OUT = -1073741823; - - /// < Not supported - static const int TIZEN_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Not Consented - static const int TIZEN_ERROR_USER_NOT_CONSENTED = -1073741821; - - /// < Restriction by Device Policy - static const int TIZEN_ERROR_DEVICE_POLICY_RESTRICTION = -1073741820; - static const int TIZEN_ERROR_END_OF_COLLECTION = -1073741819; -} - -/// @brief The structure type for the Account handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -typedef account_h = ffi.Pointer; - -final class account_s extends ffi.Opaque {} - -/// @brief Enumeration for the state of capability. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class account_capability_state_e { - /// < Account capability is invalid - static const int ACCOUNT_CAPABILITY_STATE_INVALID = 0; - - /// < Account capability is disabled - static const int ACCOUNT_CAPABILITY_DISABLED = 1; - - /// < Account capability is enabled - static const int ACCOUNT_CAPABILITY_ENABLED = 2; - static const int ACCOUNT_CAPABILITY_STATE_MAX = 3; -} - -/// @brief Called once for each capability of an account in the database. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -/// @param[in] capability_type The capability type -/// @param[in] capability_state The capability state -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// -/// @pre account_query_capability_by_account_id() must be called. -/// -/// @see account_query_capability_by_account_id() -typedef capability_cb = ffi.Pointer>; -typedef capability_cbFunction = ffi.Bool Function( - ffi.Pointer capability_type, - ffi.Int32 capability_state, - ffi.Pointer user_data); -typedef Dartcapability_cbFunction = bool Function( - ffi.Pointer capability_type, - int capability_state, - ffi.Pointer user_data); - -/// @brief Enumeration for the account auth type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class account_auth_type_e { - /// < Auth type is invalid - static const int ACCOUNT_AUTH_TYPE_INVALID = 0; - - /// < XAuth type - static const int ACCOUNT_AUTH_TYPE_XAUTH = 1; - - /// < OAuth type - static const int ACCOUNT_AUTH_TYPE_OAUTH = 2; - - /// < Client-Login type - static const int ACCOUNT_AUTH_TYPE_CLIENT_LOGIN = 3; - static const int ACCOUNT_AUTH_TYPE_MAX = 4; -} - -/// @brief Enumeration for the state of account secrecy. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class account_secrecy_state_e { - /// < Account secrecy is invalid - static const int ACCOUNT_SECRECY_INVALID = 0; - - /// < Account is not visible - static const int ACCOUNT_SECRECY_INVISIBLE = 1; - - /// < Account is visible - static const int ACCOUNT_SECRECY_VISIBLE = 2; - static const int ACCOUNT_SECRECY_MAX = 3; -} - -/// @brief Enumeration for the account sync status. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class account_sync_state_e { - /// < Account sync is invalid - static const int ACCOUNT_SYNC_INVALID = 0; - - /// < Account sync not supported - static const int ACCOUNT_SYNC_NOT_SUPPORT = 1; - - /// < Account sync supported but all synchronization functionalities are off - static const int ACCOUNT_SYNC_STATUS_OFF = 2; - - /// < Account sync support and sync status is idle - static const int ACCOUNT_SYNC_STATUS_IDLE = 3; - - /// < Account sync support and sync status is running - static const int ACCOUNT_SYNC_STATUS_RUNNING = 4; - - /// < NOT USED, WILL BE REMOVED TO PREVENT BUILD ERROR - static const int ACCOUNT_SUPPORTS_SYNC = 5; - - /// < NOT USED, WILL BE REMOVED TO PREVENT BUILD ERROR - static const int ACCOUNT_NOT_SUPPORTS_SYNC = 6; - static const int ACCOUNT_SYNC_MAX = 7; -} - -/// @brief Called once for each custom data of an account in the database. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -/// @param[in] key The user custom key -/// @param[in] value The user custom value of the specific key -/// @param[in] user_data The user data passed -/// -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// -/// @pre account_query_capability_by_account_id() must be called. -/// -/// @see account_query_capability_by_account_id() -typedef account_custom_cb - = ffi.Pointer>; -typedef account_custom_cbFunction = ffi.Bool Function(ffi.Pointer key, - ffi.Pointer value, ffi.Pointer user_data); -typedef Dartaccount_custom_cbFunction = bool Function(ffi.Pointer key, - ffi.Pointer value, ffi.Pointer user_data); - -/// @brief Called once for each account from the database. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -/// @param[in] account The account handle -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// -/// @pre account_foreach_account_from_db(), account_query_account_by_account_id(), account_query_account_by_user_name() or account_query_account_by_package_name() must be called. -/// -/// @see account_foreach_account_from_db() -/// @see account_query_account_by_account_id() -/// @see account_query_account_by_user_name() -/// @see account_query_account_by_package_name() -typedef account_cb = ffi.Pointer>; -typedef account_cbFunction = ffi.Bool Function( - account_h account, ffi.Pointer user_data); -typedef Dartaccount_cbFunction = bool Function( - account_h account, ffi.Pointer user_data); - -/// @brief The structure type for the Account provider handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -typedef account_type_h = ffi.Pointer; - -final class account_type_s extends ffi.Opaque {} - -/// @brief Called once for each capability of an account provider in the database. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -/// @param[in] app_id The application ID -/// @param[in] key The user custom key -/// @param[in] user_data The user data passed -/// -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// -/// @pre account_type_query_provider_feature_by_app_id(), account_type_get_provider_feature_all() must be called. -/// -/// @see account_type_query_provider_feature_by_app_id() -/// @see account_type_get_provider_feature_all() -typedef provider_feature_cb - = ffi.Pointer>; -typedef provider_feature_cbFunction = ffi.Bool Function( - ffi.Pointer app_id, - ffi.Pointer key, - ffi.Pointer user_data); -typedef Dartprovider_feature_cbFunction = bool Function( - ffi.Pointer app_id, - ffi.Pointer key, - ffi.Pointer user_data); - -/// @brief Called once for each account label. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -/// @param[in] app_id The application ID -/// @param[in] label The name of the account depends on the specified locale -/// @param[in] locale The locale is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code.\n -/// For example, "ko_KR" for Korean, "en_US" for American English. -/// @param[in] user_data The user data passed -/// -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// -/// @pre account_type_get_label(), account_type_query_label_by_app_id() must be called. -/// -/// @see account_type_get_label() -/// @see account_type_query_label_by_app_id() -typedef account_label_cb - = ffi.Pointer>; -typedef account_label_cbFunction = ffi.Bool Function( - ffi.Pointer app_id, - ffi.Pointer label, - ffi.Pointer locale, - ffi.Pointer user_data); -typedef Dartaccount_label_cbFunction = bool Function( - ffi.Pointer app_id, - ffi.Pointer label, - ffi.Pointer locale, - ffi.Pointer user_data); - -/// @brief Called once for each account provider in the database. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -/// @param[in] account_type The account provider handle -/// @param[in] user_data The user data passed -/// -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// -/// @pre account_type_foreach_account_type_from_db(), account_type_query_by_provider_feature() must be called. -/// -/// @see account_type_foreach_account_type_from_db() -/// @see account_type_query_by_provider_feature() -typedef account_type_cb - = ffi.Pointer>; -typedef account_type_cbFunction = ffi.Bool Function( - account_type_h account_type, ffi.Pointer user_data); -typedef Dartaccount_type_cbFunction = bool Function( - account_type_h account_type, ffi.Pointer user_data); - -/// @brief The structure type for the Account subscribe handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -typedef account_subscribe_h = ffi.Pointer; - -final class account_subscribe_s extends ffi.Opaque {} - -/// @brief Called once when an event occurs. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -/// @param[in] event_type The account event type -/// @param[in] account_id The account ID to update -/// @param[in] user_data The user data passed -/// -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// -/// @pre account_subscribe_notification() must be called. -/// -/// @see account_subscribe_notification() -typedef account_event_cb - = ffi.Pointer>; -typedef account_event_cbFunction = ffi.Bool Function( - ffi.Pointer event_type, - ffi.Int account_id, - ffi.Pointer user_data); -typedef Dartaccount_event_cbFunction = bool Function( - ffi.Pointer event_type, - int account_id, - ffi.Pointer user_data); - -/// @brief Called once for each result of calling fido_foreach_authenticator() -/// @since_tizen 3.0 -/// -/// @param[in] auth_info The Authenticator info handle. This param will be freed by framework -/// @param[in] user_data The user data that was attached during fido_foreach_authenticator() call -/// @see fido_foreach_authenticator() -typedef fido_authenticator_cb - = ffi.Pointer>; -typedef fido_authenticator_cbFunction = ffi.Void Function( - fido_authenticator_h auth_info, ffi.Pointer user_data); -typedef Dartfido_authenticator_cbFunction = void Function( - fido_authenticator_h auth_info, ffi.Pointer user_data); - -/// @brief The structure type for the Authenticator handle. -/// @since_tizen 3.0 -typedef fido_authenticator_h = ffi.Pointer; - -final class fido_authenticator_s extends ffi.Opaque {} - -/// @brief Authenticator's supported algorithm and encoding. -/// @remarks Refer to FIDO UAF Registry document for more details. -/// @since_tizen 3.0 -abstract class fido_auth_algo_e { - /// < SECP256R1 ECDSA SHA256 Raw - static const int FIDO_AUTH_ALGO_SECP256R1_ECDSA_SHA256_RAW = 1; - - /// < SECP256R1 ECDSA SHA256 DER - static const int FIDO_AUTH_ALGO_SECP256R1_ECDSA_SHA256_DER = 2; - - /// < RSA PSS SHA256 Raw - static const int FIDO_AUTH_ALGO_RSASSA_PSS_SHA256_RAW = 3; - - /// < RSA PSS SHA256 DER - static const int FIDO_AUTH_ALGO_RSASSA_PSS_SHA256_DER = 4; - - /// < SECP256K1 ECDSA SHA256 Raw - static const int FIDO_AUTH_ALGO_SECP256K1_ECDSA_SHA256_RAW = 5; - - /// < SECP256K1 ECDSA SHA256 DER - static const int FIDO_AUTH_ALGO_SECP256K1_ECDSA_SHA256_DER = 6; -} - -/// @brief Called once for each result of calling fido_authenticator_foreach_attestation_type(). -/// @since_tizen 3.0 -/// -/// @param[in] att_type The Authenticator attestation type -/// @param[in] user_data The user data that was attached during fido_authenticator_foreach_attestation_type() call -typedef fido_attestation_type_cb - = ffi.Pointer>; -typedef fido_attestation_type_cbFunction = ffi.Void Function( - ffi.Int32 att_type, ffi.Pointer user_data); -typedef Dartfido_attestation_type_cbFunction = void Function( - int att_type, ffi.Pointer user_data); - -/// @brief Authenticator's supported Attestation type. -/// @remarks Refer to FIDO UAF Registry document for more details. -/// @since_tizen 3.0 -abstract class fido_auth_attestation_type_e { - /// < Full basic attestation. - static const int FIDO_AUTH_ATT_TYPE_BASIC_FULL = 15879; - - /// < Surrogate basic attestation. - static const int FIDO_AUTH_ATT_TYPE_BASIC_SURROGATE = 15880; -} - -/// @brief Authenticator's supported user verification method type. -/// @remarks Refer to FIDO UAF Registry document for more details. -/// @since_tizen 3.0 -abstract class fido_auth_user_verify_type_e { - /// < User presence verification. - static const int FIDO_AUTH_USR_VERIFY_TYPE_PRESENCE = 1; - - /// < User fingerprint verification. - static const int FIDO_AUTH_USR_VERIFY_TYPE_FINGERPRINT = 2; - - /// < User passcode verification. - static const int FIDO_AUTH_USR_VERIFY_TYPE_PASSCODE = 4; - - /// < User voiceprint verification. - static const int FIDO_AUTH_USR_VERIFY_TYPE_VOICEPRINT = 8; - - /// < User faceprint verification. - static const int FIDO_AUTH_USR_VERIFY_TYPE_FACEPRINT = 16; - - /// < User location verification. - static const int FIDO_AUTH_USR_VERIFY_TYPE_LOCATION = 32; - - /// < User eyeprint verification. - static const int FIDO_AUTH_USR_VERIFY_TYPE_EYEPRINT = 64; - - /// < User pattern verification. - static const int FIDO_AUTH_USR_VERIFY_TYPE_PATTERN = 128; - - /// < User handprint verification. - static const int FIDO_AUTH_USR_VERIFY_TYPE_HANDPRINT = 256; - - /// < Silent verification. - static const int FIDO_AUTH_USR_VERIFY_TYPE_NONE = 512; - - /// < If an authenticator sets multiple flags for user verification types, - /// it may also set this flag to indicate that all verification methods will be enforced - /// (e.g. faceprint AND voiceprint). If flags for multiple user verification methods are set - /// and this flag is not set, verification with only one is necessary - /// (e.g. fingerprint OR passcode). - static const int FIDO_AUTH_USR_VERIFY_TYPE_ALL = 1024; -} - -/// @brief Authenticator's supported key protection method type. -/// @remarks Refer to FIDO UAF Registry document for more details. -/// @since_tizen 3.0 -abstract class fido_auth_key_protection_type_e { - /// < Software based key management. - static const int FIDO_AUTH_KEY_PROT_TYPE_SOFTWARE = 1; - - /// < Hardware based key management. - static const int FIDO_AUTH_KEY_PROT_TYPE_HARDWARE = 2; - - /// < Trusted Execution Environment based key management. - static const int FIDO_AUTH_KEY_PROT_TYPE_TEE = 4; - - /// < Secure Element based key management. - static const int FIDO_AUTH_KEY_PROT_TYPE_SECURE_ELEMENT = 8; - - /// < Authenticator does not store (wrapped) UAuth keys at the client, - /// but relies on a server-provided key handle. - static const int FIDO_AUTH_KEY_PROT_TYPE_REMOTE_HANDLE = 16; -} - -/// @brief Authenticator's supported matcher protection type. -/// @remarks Refer to FIDO UAF Registry document for more details. -/// @since_tizen 3.0 -abstract class fido_auth_matcher_protection_type_e { - /// < Authenticator's matcher is running in software. - static const int FIDO_AUTH_MATCH_PROT_TYPE_SOFTWARE = 1; - - /// < Authenticator's matcher is running inside the Trusted Execution Environment. - static const int FIDO_AUTH_MATCH_PROT_TYPE_TEE = 2; - - /// < Authenticator's matcher is running on the chip. - static const int FIDO_AUTH_MATCH_PROT_TYPE_ON_CHIP = 4; -} - -/// @brief Authenticator's supported method to communicate to FIDO user device. -/// @remarks Refer to FIDO UAF Registry document for more details. -/// @since_tizen 3.0 -abstract class fido_auth_attachment_hint_e { - /// < Authenticator is permanently attached to the FIDO User Device. - static const int FIDO_AUTH_ATTACH_HINT_INTERNAL = 1; - - /// < Authenticator is removable or remote from the FIDO User Device. - static const int FIDO_AUTH_ATTACH_HINT_EXTERNAL = 2; - - /// < The external authenticator currently has an exclusive wired connection. - static const int FIDO_AUTH_ATTACH_HINT_WIRED = 4; - - /// < The external authenticator communicates with the FIDO User Device through - /// wireless means. - static const int FIDO_AUTH_ATTACH_HINT_WIRELESS = 8; - - /// < Authenticator is able to communicate by NFC to the FIDO User Device. - static const int FIDO_AUTH_ATTACH_HINT_NFC = 16; - - /// < Authenticator is able to communicate by Bluetooth to the FIDO User Device. - static const int FIDO_AUTH_ATTACH_HINT_BT = 32; - - /// < Authenticator is connected to the FIDO User Device over a non-exclusive network - /// (e.g. over a TCP/IP LAN or WAN, as opposed to a PAN or point-to-point connection). - static const int FIDO_AUTH_ATTACH_HINT_NW = 64; - - /// < The external authenticator is in a "ready" state. - static const int FIDO_AUTH_ATTACH_HINT_READY = 128; - - /// < The external authenticator is able to - /// communicate using WiFi Direct with the FIDO User Device. - static const int FIDO_AUTH_ATTACH_HINT_WIFI_DIRECT = 256; -} - -/// @brief Transaction confirmation display capability type. -/// @remarks Refer to FIDO UAF Registry document for more details. -/// @since_tizen 3.0 -abstract class fido_auth_tc_display_type_e { - /// < Some form of transaction confirmation display is available on this authenticator. - static const int FIDO_AUTH_TC_DISP_TYPE_ANY = 1; - - /// < Software-based transaction confirmation display operating in a - /// privileged context is available on this authenticator. - static const int FIDO_AUTH_TC_DISP_TYPE_PRIVILEGED_SOFTWARE = 2; - - /// < Transaction confirmation display is in a Trusted Execution Environment. - static const int FIDO_AUTH_TC_DISP_TYPE_TEE = 4; - - /// < Transaction confirmation display based on hardware assisted capabilities is available on this authenticator. - static const int FIDO_AUTH_TC_DISP_TYPE_HW = 8; - - /// < Transaction confirmation display is provided on a distinct device from the FIDO User Device. - static const int FIDO_AUTH_TC_DISP_TYPE_REMOTE = 16; -} - -/// @brief Called when fido_uaf_get_response_message() response comes. -/// @details The following error codes can be delivered: -///
-/// #FIDO_ERROR_NONE                        Successful
-/// #FIDO_ERROR_OUT_OF_MEMORY               Out of Memory
-/// #FIDO_ERROR_USER_ACTION_IN_PROGRESS     User action is in progress.
-/// #FIDO_ERROR_USER_CANCELLED              User has cancelled the operation.
-/// #FIDO_ERROR_PERMISSION_DENIED           The application does not have permission to call this
-/// function.
-/// #FIDO_ERROR_UNSUPPORTED_VERSION         The UAF Message does not specify a protocol version
-/// supported by this FIDO UAF Client.
-/// #FIDO_ERROR_NO_SUITABLE_AUTHENTICATOR   No suitable authenticators found.
-/// #FIDO_ERROR_PROTOCOL_ERROR              The interaction may have timed out, or the UAF message
-/// is malformed.
-/// #FIDO_ERROR_UNTRUSTED_FACET_ID          The caller's id is not allowed to use this operation.
-/// 
-/// @since_tizen 3.0 -/// -/// @param[in] tizen_error_code Tizen platform error code -/// @param[in] uaf_response_json FIDO response message in JSON format -/// @param[in] user_data The user data passed from the callback function -/// -/// @pre fido_uaf_get_response_message() must be called to get this callback invoked. -/// @see fido_uaf_get_response_message() -typedef fido_uaf_response_message_cb - = ffi.Pointer>; -typedef fido_uaf_response_message_cbFunction = ffi.Void Function( - ffi.Int32 tizen_error_code, - ffi.Pointer uaf_response_json, - ffi.Pointer user_data); -typedef Dartfido_uaf_response_message_cbFunction = void Function( - int tizen_error_code, - ffi.Pointer uaf_response_json, - ffi.Pointer user_data); - -/// @brief Enumerations of error codes for FIDO APIs. -/// @since_tizen 3.0 -abstract class fido_error_e { - /// < Successful. - static const int FIDO_ERROR_NONE = 0; - - /// < Out of memory. - static const int FIDO_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter. - static const int FIDO_ERROR_INVALID_PARAMETER = -22; - - /// < Empty data. - static const int FIDO_ERROR_NO_DATA = -61; - - /// < Permission Denied. - static const int FIDO_ERROR_PERMISSION_DENIED = -13; - - /// < FIDO is unsupported. - static const int FIDO_ERROR_NOT_SUPPORTED = -1073741822; - - /// < User action is in progress. - static const int FIDO_ERROR_USER_ACTION_IN_PROGRESS = -16973823; - - /// < User has canceled the operation. - static const int FIDO_ERROR_USER_CANCELLED = -16973822; - - /// < UAF message's version is not supported. - static const int FIDO_ERROR_UNSUPPORTED_VERSION = -16973821; - - /// < No suitable authenticators found. - static const int FIDO_ERROR_NO_SUITABLE_AUTHENTICATOR = -16973820; - - /// < Protocol error, the interaction may have timed out, or the UAF message is malformed. - static const int FIDO_ERROR_PROTOCOL_ERROR = -16973819; - - /// < The caller's id is not allowed to use this operation. - static const int FIDO_ERROR_UNTRUSTED_FACET_ID = -16973818; - - /// < Unknown system error. - static const int FIDO_ERROR_UNKNOWN = -1073741824; -} - -/// @brief Enumeration for error codes of Bundle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class bundle_error_e { - /// < Successful - static const int BUNDLE_ERROR_NONE = 0; - - /// < Out of memory - static const int BUNDLE_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int BUNDLE_ERROR_INVALID_PARAMETER = -22; - - /// < Required key not available - static const int BUNDLE_ERROR_KEY_NOT_AVAILABLE = -126; - - /// < Key exists - static const int BUNDLE_ERROR_KEY_EXISTS = -18350079; -} - -final class _bundle_t extends ffi.Opaque {} - -/// @brief Enumeration for key-value pair types. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class bundle_type_property { - /// < Array type - static const int BUNDLE_TYPE_ARRAY = 256; - - /// < Primitive type - static const int BUNDLE_TYPE_PRIMITIVE = 512; - - /// < Measurable type - static const int BUNDLE_TYPE_MEASURABLE = 1024; -} - -/// @brief Enumeration for bundle types. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class bundle_type { - /// < None - static const int BUNDLE_TYPE_NONE = -1; - - /// < Any type - static const int BUNDLE_TYPE_ANY = 0; - - /// < String type (Default) - static const int BUNDLE_TYPE_STR = 1025; - - /// < String array type - static const int BUNDLE_TYPE_STR_ARRAY = 1281; - - /// < Byte type - static const int BUNDLE_TYPE_BYTE = 2; - - /// < Byte array type - static const int BUNDLE_TYPE_BYTE_ARRAY = 258; -} - -final class keyval_t extends ffi.Opaque {} - -/// @brief The bundle handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef bundle = _bundle_t; - -/// @brief Called for every key-value pair. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @see bundle_foreach() -typedef bundle_iterator_t - = ffi.Pointer>; -typedef bundle_iterator_tFunction = ffi.Void Function( - ffi.Pointer key, - ffi.Int type, - ffi.Pointer kv, - ffi.Pointer user_data); -typedef Dartbundle_iterator_tFunction = void Function(ffi.Pointer key, - int type, ffi.Pointer kv, ffi.Pointer user_data); - -/// @brief The key-value pair handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @see bundle_iterator_t -typedef bundle_keyval_t = keyval_t; - -/// @brief The encoded data type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @see bundle_encode() -/// @see bundle_decode() -typedef bundle_raw = ffi.UnsignedChar; -typedef Dartbundle_raw = int; - -/// @brief Enumerations for sync options of sync job request APIs. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class sync_option_e { - /// < Sync job will be operated normally - static const int SYNC_OPTION_NONE = 0; - - /// < Sync job will be operated as soon as possible - static const int SYNC_OPTION_EXPEDITED = 1; - - /// < Sync job will not be performed again when it fails - static const int SYNC_OPTION_NO_RETRY = 2; -} - -/// @brief Enumerations for time intervals of a periodic sync. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class sync_period_e { - /// < Sync within 30 minutes - static const int SYNC_PERIOD_INTERVAL_30MIN = 0; - - /// < Sync within 1 hour - static const int SYNC_PERIOD_INTERVAL_1H = 1; - - /// < Sync within 2 hours - static const int SYNC_PERIOD_INTERVAL_2H = 2; - - /// < Sync within 3 hours - static const int SYNC_PERIOD_INTERVAL_3H = 3; - - /// < Sync within 6 hours - static const int SYNC_PERIOD_INTERVAL_6H = 4; - - /// < Sync within 12 hours - static const int SYNC_PERIOD_INTERVAL_12H = 5; - - /// < Sync within 1 day - static const int SYNC_PERIOD_INTERVAL_1DAY = 6; - static const int SYNC_PERIOD_INTERVAL_MAX = 7; -} - -/// @brief Called to get the information once for each sync job. -/// -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// -/// @remarks @a Release account with account_destroy() after using it.\n\n -/// @a Release sync_job_user_data with bundle_free() after using it. -/// -/// @param[in] account An account handle on which sync operation was requested or @c NULL in the case of accountless sync operation -/// @param[in] sync_job_name A string representing a sync job which has been operated or @c NULL in the case of data change sync operation -/// @param[in] sync_capability A string representing a sync job which has been operated because of data change or @c NULL in the case of on demand and periodic sync operation -/// @param[in] sync_job_id A unique value which can manage sync jobs -/// @param[in] sync_job_user_data User data which contains additional information related registered sync job or it can be @c NULL in the case of requesting without sync_job_user_data -/// @param[in] user_data User data which contains additional information related foreach job or it can be @c NULL in the case of querying without user_data -/// -/// @return @c true to continue with the next iteration of the loop, otherwise @c false to break out of the loop -/// -/// @pre sync_manager_foreach_sync_job() calls this callback. -/// -/// @see sync_adapter_set_callbacks() -/// @see sync_manager_foreach_sync_job() -typedef sync_manager_sync_job_cb - = ffi.Pointer>; -typedef sync_manager_sync_job_cbFunction = ffi.Bool Function( - account_h account, - ffi.Pointer sync_job_name, - ffi.Pointer sync_capability, - ffi.Int sync_job_id, - ffi.Pointer sync_job_user_data, - ffi.Pointer user_data); -typedef Dartsync_manager_sync_job_cbFunction = bool Function( - account_h account, - ffi.Pointer sync_job_name, - ffi.Pointer sync_capability, - int sync_job_id, - ffi.Pointer sync_job_user_data, - ffi.Pointer user_data); - -/// @brief Callback function for Sync Adapter's start sync request. -/// -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @remarks This API only can be called at a service application.\n\n -/// @a Release account with account_destroy() after using it.\n\n -/// @a Release sync_job_user_data with bundle_free() after using it. -/// -/// @param[in] account An account handle on which sync operation was requested or @c NULL in the case of accountless sync operation -/// @param[in] sync_job_name A string representing a sync job which has been operated or @c NULL in the case of data change sync operation -/// @param[in] sync_capability A string representing a sync job which has been operated because of data change or @c NULL in the case of on demand or periodic sync operation -/// @param[in] sync_job_user_data User data which contains additional information related registered sync job -/// -/// @return @c true if sync operation is success, @c false otherwise -/// -/// @pre The callback must be set by using sync_adapter_set_callbacks(). -/// @pre sync_manager_on_demand_sync_job() calls this callback. -/// @pre sync_manager_add_periodic_sync_job() calls this callback. -/// @pre sync_manager_add_data_change_sync_job() calls this callback. -/// -/// @see sync_adapter_set_callbacks() -/// @see sync_manager_on_demand_sync_job() -/// @see sync_manager_add_periodic_sync_job() -/// @see sync_manager_add_data_change_sync_job() -typedef sync_adapter_start_sync_cb - = ffi.Pointer>; -typedef sync_adapter_start_sync_cbFunction = ffi.Bool Function( - account_h account, - ffi.Pointer sync_job_name, - ffi.Pointer sync_capability, - ffi.Pointer sync_job_user_data); -typedef Dartsync_adapter_start_sync_cbFunction = bool Function( - account_h account, - ffi.Pointer sync_job_name, - ffi.Pointer sync_capability, - ffi.Pointer sync_job_user_data); - -/// @brief Callback function for Sync Adapter's cancel sync request. -/// -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @remarks This API only can be called at a service application after calling sync_manager_remove_sync_job().\n\n -/// @a Release account with account_destroy() after using it.\n\n -/// @a Release sync_job_user_data with bundle_free() after using it. -/// -/// @param[in] account An account handle on which sync operation was requested or @c NULL in the case of accountless sync operation -/// @param[in] sync_job_name A string representing a sync job which has been operated or @c NULL in the case of data change sync operation -/// @param[in] sync_capability A string representing a sync job which has been operated because of data change or @c NULL in the case of on demand and periodic sync operation -/// @param[in] sync_job_user_data User data which contains additional information related registered sync job -/// -/// @pre The callback must be set by using sync_adapter_set_callbacks(). -/// @pre sync_manager_remove_sync_job() calls this callback in the case there is removable sync job. -/// -/// @see sync_adapter_set_callbacks() -/// @see sync_manager_remove_sync_job() -typedef sync_adapter_cancel_sync_cb - = ffi.Pointer>; -typedef sync_adapter_cancel_sync_cbFunction = ffi.Void Function( - account_h account, - ffi.Pointer sync_job_name, - ffi.Pointer sync_capability, - ffi.Pointer sync_job_user_data); -typedef Dartsync_adapter_cancel_sync_cbFunction = void Function( - account_h account, - ffi.Pointer sync_job_name, - ffi.Pointer sync_capability, - ffi.Pointer sync_job_user_data); - -final class app_control_s extends ffi.Opaque {} - -/// @brief Enumeration for the application control error. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class app_control_error_e { - /// < Successful - static const int APP_CONTROL_ERROR_NONE = 0; - - /// < Invalid parameter - static const int APP_CONTROL_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int APP_CONTROL_ERROR_OUT_OF_MEMORY = -12; - - /// < The application is not found - static const int APP_CONTROL_ERROR_APP_NOT_FOUND = -17825759; - - /// < Specified key is not found - static const int APP_CONTROL_ERROR_KEY_NOT_FOUND = -126; - - /// < Key is not available - static const int APP_CONTROL_ERROR_KEY_REJECTED = -129; - - /// < Invalid data type - static const int APP_CONTROL_ERROR_INVALID_DATA_TYPE = -17825758; - - /// < The application cannot be launched now - static const int APP_CONTROL_ERROR_LAUNCH_REJECTED = -17825757; - - /// < Permission denied - static const int APP_CONTROL_ERROR_PERMISSION_DENIED = -13; - - /// < Internal launch error - static const int APP_CONTROL_ERROR_LAUNCH_FAILED = -17825756; - - /// < Time out - static const int APP_CONTROL_ERROR_TIMED_OUT = -1073741823; - - /// < IO error - static const int APP_CONTROL_ERROR_IO_ERROR = -5; -} - -/// @brief Enumeration for the application control result. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @see app_control_enable_app_started_result_event() -abstract class app_control_result_e { - /// < Callee application launched actually (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int APP_CONTROL_RESULT_APP_STARTED = 1; - - /// < Operation succeeded - static const int APP_CONTROL_RESULT_SUCCEEDED = 0; - - /// < Operation failed by the callee - static const int APP_CONTROL_RESULT_FAILED = -1; - - /// < Operation canceled by the platform - static const int APP_CONTROL_RESULT_CANCELED = -2; -} - -/// @brief Enumeration for the application control launch mode. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class app_control_launch_mode_e { - /// < Prefer to launch an application as single mode - static const int APP_CONTROL_LAUNCH_MODE_SINGLE = 0; - - /// < Prefer to launch an application as group mode - static const int APP_CONTROL_LAUNCH_MODE_GROUP = 1; -} - -/// @brief The application control handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef app_control_h = ffi.Pointer; - -/// @brief Called to retrieve the extra data contained in the app_control. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks The @a key must not be deallocated by the application. -/// @param[in] app_control The app_control handle -/// @param[in] key The key of the value contained in the app_control -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @pre app_control_foreach_extra_data() will invoke this callback. -/// @see app_control_foreach_extra_data() -typedef app_control_extra_data_cb - = ffi.Pointer>; -typedef app_control_extra_data_cbFunction = ffi.Bool Function( - app_control_h app_control, - ffi.Pointer key, - ffi.Pointer user_data); -typedef Dartapp_control_extra_data_cbFunction = bool Function( - app_control_h app_control, - ffi.Pointer key, - ffi.Pointer user_data); - -/// @brief Called once for each matched application that can be launched to handle the given app_control request. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] app_control The app_control handle -/// @param[in] package The package name of the application that can handle the launch request of the given app_control -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @pre app_control_foreach_app_matched() will invoke this callback. -/// @see app_control_foreach_app_matched() -typedef app_control_app_matched_cb - = ffi.Pointer>; -typedef app_control_app_matched_cbFunction = ffi.Bool Function( - app_control_h app_control, - ffi.Pointer appid, - ffi.Pointer user_data); -typedef Dartapp_control_app_matched_cbFunction = bool Function( - app_control_h app_control, - ffi.Pointer appid, - ffi.Pointer user_data); - -/// @brief Called when the reply of the launch request is delivered. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks The @a request and @a reply must not be deallocated by the application. -/// @param[in] request The app_control handle of the launch request that has been sent -/// @param[in] reply The app_control handle in which the results of the callee are contained -/// @param[in] result The result code of the launch request -/// @param[in] user_data The user data passed from the callback registration function -/// @pre When the callee replies to the launch request, this callback will be invoked. -/// @pre Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, if #APP_CONTROL_RESULT_APP_STARTED event is enabled, -/// this callback will also be invoked when the callee application actually launched. -/// @see app_control_send_launch_request() -/// @see app_control_reply_to_launch_request() -/// @see app_control_enable_app_started_result_event() -/// @see #APP_CONTROL_RESULT_APP_STARTED -typedef app_control_reply_cb - = ffi.Pointer>; -typedef app_control_reply_cbFunction = ffi.Void Function(app_control_h request, - app_control_h reply, ffi.Int32 result, ffi.Pointer user_data); -typedef Dartapp_control_reply_cbFunction = void Function(app_control_h request, - app_control_h reply, int result, ffi.Pointer user_data); - -/// @brief Called when the result of the launch request is delivered. -/// @details Following error codes can be delivered: \n -/// #APP_CONTROL_ERROR_NONE, \n -/// #APP_CONTROL_ERROR_APP_NOT_FOUND, \n -/// #APP_CONTROL_ERROR_PERMISSION_DENIED, \n -/// #APP_CONTROL_ERROR_INVALID_PARAMETER, \n -/// #APP_CONTROL_ERROR_LAUNCH_REJECTED -/// -/// @since_tizen 5.0 -/// @remakrs The @a request is the same object for which app_control_send_launch_request_async() was called. -/// @param[in] request The app_control handle of the launch request that has been sent -/// @param[in] result The result value of the launch request -/// @param[in] user_data The user data passed from the callback registration function -/// @see app_control_send_launch_request_async() -typedef app_control_result_cb - = ffi.Pointer>; -typedef app_control_result_cbFunction = ffi.Void Function( - app_control_h request, ffi.Int32 result, ffi.Pointer user_data); -typedef Dartapp_control_result_cbFunction = void Function( - app_control_h request, int result, ffi.Pointer user_data); - -/// @brief Enumeration for application error. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class app_error_e { - /// < Successful - static const int APP_ERROR_NONE = 0; - - /// < Invalid parameter - static const int APP_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int APP_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid application context - static const int APP_ERROR_INVALID_CONTEXT = -17825791; - - /// < No such file or directory - static const int APP_ERROR_NO_SUCH_FILE = -2; - - /// < Not supported (Since 4.0) - static const int APP_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Application is already running - static const int APP_ERROR_ALREADY_RUNNING = -114; - - /// < Permission denied @if MOBILE (Since 2.3.1) @endif - static const int APP_ERROR_PERMISSION_DENIED = -13; -} - -/// @brief Enumeration for system events. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class app_event_type_e { - /// < The low memory event - static const int APP_EVENT_LOW_MEMORY = 0; - - /// < The low battery event - static const int APP_EVENT_LOW_BATTERY = 1; - - /// < The system language changed event - static const int APP_EVENT_LANGUAGE_CHANGED = 2; - - /// < The device orientation changed event - static const int APP_EVENT_DEVICE_ORIENTATION_CHANGED = 3; - - /// < The region format changed event - static const int APP_EVENT_REGION_FORMAT_CHANGED = 4; - - /// < The suspended state changed event of the application (since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - /// @see app_event_get_suspended_state - static const int APP_EVENT_SUSPENDED_STATE_CHANGED = 5; - - /// < The update requested event (Since 3.0) - /// This event can occur when an app needs to be updated. - /// It is dependent on target devices. - static const int APP_EVENT_UPDATE_REQUESTED = 6; -} - -/// @brief Enumeration for device orientation. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class app_device_orientation_e { - /// < The device is oriented in a natural position - static const int APP_DEVICE_ORIENTATION_0 = 0; - - /// < The device's left side is at the top - static const int APP_DEVICE_ORIENTATION_90 = 90; - - /// < The device is upside down - static const int APP_DEVICE_ORIENTATION_180 = 180; - - /// < The device's right side is at the top - static const int APP_DEVICE_ORIENTATION_270 = 270; -} - -/// @brief Enumeration for low memory status. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class app_event_low_memory_status_e { - /// < Normal status - static const int APP_EVENT_LOW_MEMORY_NORMAL = 1; - - /// < Soft warning status - static const int APP_EVENT_LOW_MEMORY_SOFT_WARNING = 2; - - /// < Hard warning status - static const int APP_EVENT_LOW_MEMORY_HARD_WARNING = 4; -} - -/// @brief Enumeration for battery status. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class app_event_low_battery_status_e { - /// < The battery status is under 1% - static const int APP_EVENT_LOW_BATTERY_POWER_OFF = 1; - - /// < The battery status is under 5% - static const int APP_EVENT_LOW_BATTERY_CRITICAL_LOW = 2; -} - -/// @brief Enumeration for suspended state. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class app_suspended_state_e { - /// < Application will enter the suspended state - static const int APP_SUSPENDED_STATE_WILL_ENTER = 0; - - /// < Application did exit from the suspended state - static const int APP_SUSPENDED_STATE_DID_EXIT = 1; -} - -final class app_event_handler extends ffi.Opaque {} - -final class app_event_info extends ffi.Opaque {} - -/// @brief The system event information handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @see app_event_get_low_memory_status -/// @see app_event_get_low_battery_status -/// @see app_event_get_language -/// @see app_event_get_region_format -/// @see app_event_get_device_orientation -/// @see app_event_get_suspended_state -typedef app_event_info_h = ffi.Pointer; - -/// @brief The structure type containing the set of callback functions for handling application lifecycle events. -/// @details It is one of the input parameters of the ui_app_main() function. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @see ui_app_main() -/// @see app_create_cb() -/// @see app_pause_cb() -/// @see app_resume_cb() -/// @see app_terminate_cb() -/// @see app_control_cb() -final class ui_app_lifecycle_callback_s extends ffi.Struct { - /// < This callback function is called at the start of the application. - external app_create_cb create; - - /// < This callback function is called once after the main loop of the application exits. - external app_terminate_cb terminate; - - /// < This callback function is called each time the application is completely obscured by another application and becomes invisible to the user. - external app_pause_cb pause; - - /// < This callback function is called each time the application becomes visible to the user. - external app_resume_cb resume; - - /// < This callback function is called when another application sends the launch request to the application. - external app_control_cb app_control; -} - -/// @brief Called when the application starts. -/// @details The callback function is called before the main loop of the application starts. -/// In this callback, you can initialize application resources like window creation, data structure, and so on. -/// After this callback function returns @c true, the main loop starts up and app_control_cb() is subsequently called. -/// If this callback function returns @c false, the main loop doesn't start and app_terminate_cb() is subsequently called. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] user_data The user data passed from the callback registration function -/// @return @c true on success, -/// otherwise @c false -/// @pre ui_app_main() will invoke this callback function. -/// @see ui_app_main() -/// @see #ui_app_lifecycle_callback_s -typedef app_create_cb = ffi.Pointer>; -typedef app_create_cbFunction = ffi.Bool Function( - ffi.Pointer user_data); -typedef Dartapp_create_cbFunction = bool Function( - ffi.Pointer user_data); - -/// @brief Called when the application's main loop exits. -/// @details You should release the application's resources in this function. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] user_data The user data passed from the callback registration function -/// @see ui_app_main() -/// @see #ui_app_lifecycle_callback_s -typedef app_terminate_cb - = ffi.Pointer>; -typedef app_terminate_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartapp_terminate_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Called when the application is completely obscured by another application and becomes invisible. -/// @details The application is not terminated and still running in the paused state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] user_data The user data passed from the callback registration function -/// @see ui_app_main() -/// @see #ui_app_lifecycle_callback_s -typedef app_pause_cb = ffi.Pointer>; -typedef app_pause_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartapp_pause_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Called when the application becomes visible. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] user_data The user data passed from the callback registration function -/// @see ui_app_main() -/// @see #ui_app_lifecycle_callback_s -typedef app_resume_cb = ffi.Pointer>; -typedef app_resume_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartapp_resume_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Called when another application sends a launch request to the application. -/// @details When the application is launched, this callback function is called after the main loop of the application starts up. -/// The passed app_control handle describes the launch request and contains the information about why the application is launched. -/// If the launch request is sent to the application in the running or pause state, -/// this callback function can be called again to notify that the application has been asked to launch. -/// The application could be explicitly launched by the user from the application launcher or be launched to perform the specific operation by another application. -/// The application is responsible for handling each launch request and responding appropriately. -/// Using the App Control API, the application can get information about what is to be performed. -/// If the application is launched from the application launcher or explicitly launched by another application, -/// the passed app_control handle may include only the default operation (#APP_CONTROL_OPERATION_DEFAULT) without any data. -/// For more information, see The @ref CAPI_APP_CONTROL_MODULE API description. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks After this callback returns, the handle of the app_control is freed. -/// Therefore, if you want to use the handle after returning this callback, you MUST copy it by using app_control_clone() API. -/// @param[in] app_control The handle to the app_control -/// @param[in] user_data The user data passed from the callback registration function -/// @see ui_app_main() -/// @see #ui_app_lifecycle_callback_s -/// @see @ref CAPI_APP_CONTROL_MODULE API -typedef app_control_cb - = ffi.Pointer>; -typedef app_control_cbFunction = ffi.Void Function( - app_control_h app_control, ffi.Pointer user_data); -typedef Dartapp_control_cbFunction = void Function( - app_control_h app_control, ffi.Pointer user_data); - -/// @brief The event handler that returned from add event handler function to handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @see app_event_type_e -/// @see app_add_event_handler -/// @see app_remove_event_handler -/// @see app_event_info_h -typedef app_event_handler_h = ffi.Pointer; - -/// @brief The system event callback function. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] event_info The system event information -/// @param[in] user_data The user data passed from the add event handler function -/// @see app_add_event_handler -/// @see app_event_info_h -/// @remarks If the given @a event_info has #APP_SUSPENDED_STATE_WILL_ENTER value, -/// the application should not call any asynchronous operations in this callback. -/// After the callback returns, process of the application will be changed to suspended -/// state immediately. Thus, asynchronous operations may work incorrectly. (since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) -typedef app_event_cb = ffi.Pointer>; -typedef app_event_cbFunction = ffi.Void Function( - app_event_info_h event_info, ffi.Pointer user_data); -typedef Dartapp_event_cbFunction = void Function( - app_event_info_h event_info, ffi.Pointer user_data); - -/// @brief Enumeration for notification errors. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_error { - /// < Success - static const int NOTIFICATION_ERROR_NONE = 0; - - /// < Invalid parameter - static const int NOTIFICATION_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int NOTIFICATION_ERROR_OUT_OF_MEMORY = -12; - - /// < I/O error - static const int NOTIFICATION_ERROR_IO_ERROR = -5; - - /// < Permission denied - static const int NOTIFICATION_ERROR_PERMISSION_DENIED = -13; - - /// < Function not implemented (@b Since: @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int NOTIFICATION_ERROR_INVALID_OPERATION = -38; - - /// < Error from DB query - static const int NOTIFICATION_ERROR_FROM_DB = -18087935; - - /// < Already exist private ID - static const int NOTIFICATION_ERROR_ALREADY_EXIST_ID = -18087934; - - /// < Error from DBus - static const int NOTIFICATION_ERROR_FROM_DBUS = -18087933; - - /// < Not exist private ID - static const int NOTIFICATION_ERROR_NOT_EXIST_ID = -18087932; - - /// < No response from notification service - static const int NOTIFICATION_ERROR_SERVICE_NOT_READY = -18087931; - - /// < Max notification count exceeded (@b Since: 3.0) - static const int NOTIFICATION_ERROR_MAX_EXCEEDED = -18087930; -} - -/// @brief Enumeration for notification layout type. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_ly_type { - /// < Default - static const int NOTIFICATION_LY_NONE = 0; - - /// < Layout for notification. Used to inform single event - static const int NOTIFICATION_LY_NOTI_EVENT_SINGLE = 1; - - /// < Layout for notification. Used to inform multiple event - static const int NOTIFICATION_LY_NOTI_EVENT_MULTIPLE = 2; - - /// < Layout for notification. Used to display images - static const int NOTIFICATION_LY_NOTI_THUMBNAIL = 3; - - /// < Layout for ongoing notification. Used to display text message. - /// notifications with NOTIFICATION_LY_ONGOING_EVENT can not be protected from - /// removing by user since tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - static const int NOTIFICATION_LY_ONGOING_EVENT = 4; - - /// < Layout for ongoing notification. Used to display progress - static const int NOTIFICATION_LY_ONGOING_PROGRESS = 5; - - /// < Layout for extended notification (Since 4.0) - static const int NOTIFICATION_LY_EXTENSION = 6; -} - -/// @brief Enumeration for notification launch option type. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_launch_option_type { - /// < Launching with app control - static const int NOTIFICATION_LAUNCH_OPTION_APP_CONTROL = 1; -} - -/// @brief Enumeration for event type on notification. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class notification_event_type { - /// < Event type : Click on button 1 - static const int NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_1 = 0; - - /// < Event type : Click on button 2 - static const int NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_2 = 1; - - /// < Event type : Click on button 3 - static const int NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_3 = 2; - - /// < Event type : Click on button 4 - static const int NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_4 = 3; - - /// < Event type : Click on button 5 - static const int NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_5 = 4; - - /// < Event type : Click on button 6 - static const int NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_6 = 5; - - /// < Event type : Click on icon - static const int NOTIFICATION_EVENT_TYPE_CLICK_ON_ICON = 6; - - /// < Event type : Click on thumbnail - static const int NOTIFICATION_EVENT_TYPE_CLICK_ON_THUMBNAIL = 7; - - /// < Event type : Click on text_input button(Since 3.0) - static const int NOTIFICATION_EVENT_TYPE_CLICK_ON_TEXT_INPUT_BUTTON = 8; - - /// < Event type : Click on button 7 (Since 5.0) - static const int NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_7 = 9; - - /// < Event type : Click on button 8 (Since 5.0) - static const int NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_8 = 10; - - /// < Event type : Click on button 9 (Since 5.0) - static const int NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_9 = 11; - - /// < Event type : Click on button 10 (Since 5.0) - static const int NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_10 = 12; -} - -/// @brief Enumeration for notification sound type. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_sound_type { - /// < Default value. no sound - static const int NOTIFICATION_SOUND_TYPE_NONE = -1; - - /// < Default sound - static const int NOTIFICATION_SOUND_TYPE_DEFAULT = 0; - - /// < User sound data - static const int NOTIFICATION_SOUND_TYPE_USER_DATA = 1; -} - -/// @brief Enumeration for notification vibration type. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_vibration_type { - /// < Default value. No vibration - static const int NOTIFICATION_VIBRATION_TYPE_NONE = -1; - - /// < Default vibrate pattern - static const int NOTIFICATION_VIBRATION_TYPE_DEFAULT = 0; - - /// < User vibration data - static const int NOTIFICATION_VIBRATION_TYPE_USER_DATA = 1; -} - -/// @brief Enumeration for notification LED operation. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_led_op { - /// < Default value. Disable the LED notification - static const int NOTIFICATION_LED_OP_OFF = -1; - - /// < Turn on the LED with default color - static const int NOTIFICATION_LED_OP_ON = 0; - - /// < Turn on the LED with custom color - static const int NOTIFICATION_LED_OP_ON_CUSTOM_COLOR = 1; -} - -/// @deprecated Deprecated since 2.3.1 -/// @brief Enumeration for setting display type of count. -/// @since_tizen 2.3 -abstract class notification_count_display_type { - /// < None - static const int NOTIFICATION_COUNT_DISPLAY_TYPE_NONE = -1; - - /// < The number is placed to left - static const int NOTIFICATION_COUNT_DISPLAY_TYPE_LEFT = 0; - - /// < The number is placed to center - static const int NOTIFICATION_COUNT_DISPLAY_TYPE_IN = 1; - - /// < The number is placed to right - static const int NOTIFICATION_COUNT_DISPLAY_TYPE_RIGHT = 2; -} - -/// @brief Enumeration for button. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class notification_button_index { - /// < button 1 - static const int NOTIFICATION_BUTTON_1 = 1; - - /// < button 2 - static const int NOTIFICATION_BUTTON_2 = 2; - - /// < button 3 - static const int NOTIFICATION_BUTTON_3 = 3; - - /// < button 4 - static const int NOTIFICATION_BUTTON_4 = 4; - - /// < button 5 - static const int NOTIFICATION_BUTTON_5 = 5; - - /// < button 6 - static const int NOTIFICATION_BUTTON_6 = 6; - - /// < button 7 (Since 5.0) - static const int NOTIFICATION_BUTTON_7 = 10; - - /// < button 8 (Since 5.0) - static const int NOTIFICATION_BUTTON_8 = 11; - - /// < button 9 (Since 5.0) - static const int NOTIFICATION_BUTTON_9 = 12; - - /// < button 10 (Since 5.0) - static const int NOTIFICATION_BUTTON_10 = 13; -} - -/// @brief Enumeration for notification text type. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_text_type { - /// < None - static const int NOTIFICATION_TEXT_TYPE_NONE = -1; - - /// < Title - static const int NOTIFICATION_TEXT_TYPE_TITLE = 0; - - /// < Content - static const int NOTIFICATION_TEXT_TYPE_CONTENT = 1; - - /// < Content for content display option is off of the Settings - static const int NOTIFICATION_TEXT_TYPE_CONTENT_FOR_DISPLAY_OPTION_IS_OFF = 2; - - /// < Text to display event count - static const int NOTIFICATION_TEXT_TYPE_EVENT_COUNT = 3; - - /// < Box contents 1 - static const int NOTIFICATION_TEXT_TYPE_INFO_1 = 4; - - /// < Box contents 1-1 - static const int NOTIFICATION_TEXT_TYPE_INFO_SUB_1 = 5; - - /// < Box contents 2 - static const int NOTIFICATION_TEXT_TYPE_INFO_2 = 6; - - /// < Box contents 2-1 - static const int NOTIFICATION_TEXT_TYPE_INFO_SUB_2 = 7; - - /// < Box contents 3 - static const int NOTIFICATION_TEXT_TYPE_INFO_3 = 8; - - /// < Box contents 3-1 - static const int NOTIFICATION_TEXT_TYPE_INFO_SUB_3 = 9; - - /// < Group title - static const int NOTIFICATION_TEXT_TYPE_GROUP_TITLE = 10; - - /// < Group content - static const int NOTIFICATION_TEXT_TYPE_GROUP_CONTENT = 11; - - /// < Group content for content display option is off of the Settings - static const int - NOTIFICATION_TEXT_TYPE_GROUP_CONTENT_FOR_DISPLAY_OPTION_IS_OFF = 12; - - /// < Text on button 1 - static const int NOTIFICATION_TEXT_TYPE_BUTTON_1 = 13; - - /// < Text on button 2 - static const int NOTIFICATION_TEXT_TYPE_BUTTON_2 = 14; - - /// < Text on button 3 - static const int NOTIFICATION_TEXT_TYPE_BUTTON_3 = 15; - - /// < Text on button 4 - static const int NOTIFICATION_TEXT_TYPE_BUTTON_4 = 16; - - /// < Text on button 5 - static const int NOTIFICATION_TEXT_TYPE_BUTTON_5 = 17; - - /// < Text on button 6 - static const int NOTIFICATION_TEXT_TYPE_BUTTON_6 = 18; - - /// < Guide text on the message reply box(Since 3.0) - static const int NOTIFICATION_TEXT_TYPE_TEXT_INPUT_PLACEHOLDER = 19; - - /// < Text on button the on message reply box(Since 3.0) - static const int NOTIFICATION_TEXT_TYPE_TEXT_INPUT_BUTTON = 20; - - /// < Content for extended notification (Since 4.0) - static const int NOTIFICATION_TEXT_TYPE_CONTENT_EXTENSION = 21; - - /// < Text on button 7 (Since 5.0) - static const int NOTIFICATION_TEXT_TYPE_BUTTON_7 = 22; - - /// < Text on button 8 (Since 5.0) - static const int NOTIFICATION_TEXT_TYPE_BUTTON_8 = 23; - - /// < Text on button 9 (Since 5.0) - static const int NOTIFICATION_TEXT_TYPE_BUTTON_9 = 24; - - /// < Text on button 10 (Since 5.0) - static const int NOTIFICATION_TEXT_TYPE_BUTTON_10 = 25; -} - -/// @brief Enumeration for image type. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_image_type { - /// < None - static const int NOTIFICATION_IMAGE_TYPE_NONE = -1; - - /// < Icon - static const int NOTIFICATION_IMAGE_TYPE_ICON = 0; - - /// < Indicator icon - static const int NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR = 1; - - /// < Lock screen icon - static const int NOTIFICATION_IMAGE_TYPE_ICON_FOR_LOCK = 2; - - /// < Thumbnail - static const int NOTIFICATION_IMAGE_TYPE_THUMBNAIL = 3; - - /// < Lock screen thumbnail - static const int NOTIFICATION_IMAGE_TYPE_THUMBNAIL_FOR_LOCK = 4; - - /// < Icon - static const int NOTIFICATION_IMAGE_TYPE_ICON_SUB = 5; - - /// < image displayed on background - static const int NOTIFICATION_IMAGE_TYPE_BACKGROUND = 6; - - /// < Image for thumbnail list - static const int NOTIFICATION_IMAGE_TYPE_LIST_1 = 7; - - /// < Image for thumbnail list - static const int NOTIFICATION_IMAGE_TYPE_LIST_2 = 8; - - /// < Image for thumbnail list - static const int NOTIFICATION_IMAGE_TYPE_LIST_3 = 9; - - /// < Image for thumbnail list - static const int NOTIFICATION_IMAGE_TYPE_LIST_4 = 10; - - /// < Image for thumbnail list - static const int NOTIFICATION_IMAGE_TYPE_LIST_5 = 11; - - /// < Image for button 1 - static const int NOTIFICATION_IMAGE_TYPE_BUTTON_1 = 12; - - /// < Image for button 2 - static const int NOTIFICATION_IMAGE_TYPE_BUTTON_2 = 13; - - /// < Image for button 3 - static const int NOTIFICATION_IMAGE_TYPE_BUTTON_3 = 14; - - /// < Image for button 4 - static const int NOTIFICATION_IMAGE_TYPE_BUTTON_4 = 15; - - /// < Image for button 5 - static const int NOTIFICATION_IMAGE_TYPE_BUTTON_5 = 16; - - /// < Image for button 6 - static const int NOTIFICATION_IMAGE_TYPE_BUTTON_6 = 17; - - /// < Image for message reply(Since 3.0) - static const int NOTIFICATION_IMAGE_TYPE_TEXT_INPUT_BUTTON = 18; - - /// < Image for extended notification (Since 4.0) - static const int NOTIFICATION_IMAGE_TYPE_EXTENSION = 19; - - /// < Image for button 7 (Since 5.0) - static const int NOTIFICATION_IMAGE_TYPE_BUTTON_7 = 20; - - /// < Image for button 8 (Since 5.0) - static const int NOTIFICATION_IMAGE_TYPE_BUTTON_8 = 21; - - /// < Image for button 9 (Since 5.0) - static const int NOTIFICATION_IMAGE_TYPE_BUTTON_9 = 22; - - /// < Image for button 10 (Since 5.0) - static const int NOTIFICATION_IMAGE_TYPE_BUTTON_10 = 23; -} - -/// @brief Enumeration for application execution type. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_execute_type { - /// < No operation - static const int NOTIFICATION_EXECUTE_TYPE_NONE = -1; - - /// < Responding action - static const int NOTIFICATION_EXECUTE_TYPE_RESPONDING = 0; - - /// < Launching when notification data is single - static const int NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH = 1; - - /// < Launching when notification data is grouping(multi) - static const int NOTIFICATION_EXECUTE_TYPE_MULTI_LAUNCH = 2; -} - -/// @brief Enumeration for notification type. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_type { - /// < None - static const int NOTIFICATION_TYPE_NONE = -1; - - /// < Notification type - static const int NOTIFICATION_TYPE_NOTI = 0; - - /// < Ongoing type - static const int NOTIFICATION_TYPE_ONGOING = 1; -} - -/// @brief Enumeration for Group ID. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_group_id { - /// < Not Grouping - static const int NOTIFICATION_GROUP_ID_NONE = -1; - - /// < Notification that has same title is grouping - static const int NOTIFICATION_GROUP_ID_DEFAULT = 0; -} - -/// @brief Enumeration for Private ID. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_priv_id { - /// < Internally set priv_id - static const int NOTIFICATION_PRIV_ID_NONE = -1; -} - -/// @brief Enumeration for notification property. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_property { - /// < Display only SIM card inserted - static const int NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE = 1; - - /// < Disable application launch when it selected - static const int NOTIFICATION_PROP_DISABLE_APP_LAUNCH = 2; - - /// < Disable auto delete when it selected - static const int NOTIFICATION_PROP_DISABLE_AUTO_DELETE = 4; - - /// < Notification Tray should launch application using appsvc API (Deprecated since 2.3.1) - static const int NOTIFICATION_PROP_LAUNCH_UG = 8; - - /// < Use notification_set_display_applist API (Deprecated since 2.3.1) - static const int NOTIFICATION_PROP_DISABLE_TICKERNOTI = 16; - - /// < The notification will not be removed (Deprecated since 2.3.1) - static const int NOTIFICATION_PROP_PERMANENT_DISPLAY = 32; - - /// < Disable update when it inserted. - static const int NOTIFICATION_PROP_DISABLE_UPDATE_ON_INSERT = 64; - - /// < Disable update when it deleted. - static const int NOTIFICATION_PROP_DISABLE_UPDATE_ON_DELETE = 128; - - /// < Deleted when device is rebooted eventhough NOTIFICATION_TYPE_NOTI type - static const int NOTIFICATION_PROP_VOLATILE_DISPLAY = 256; -} - -/// @brief Enumeration for display application list. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_display_applist { - /// < Notification Tray(Quickpanel) - static const int NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY = 1; - - /// < Ticker notification - static const int NOTIFICATION_DISPLAY_APP_TICKER = 2; - - /// < Lock screen - static const int NOTIFICATION_DISPLAY_APP_LOCK = 4; - - /// < Indicator - static const int NOTIFICATION_DISPLAY_APP_INDICATOR = 8; - - /// < Active notification - static const int NOTIFICATION_DISPLAY_APP_ACTIVE = 16; - - /// < All display application except active notification - static const int NOTIFICATION_DISPLAY_APP_ALL = 15; -} - -/// @brief Enumeration for notification operation code. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_op_type { - /// < Default - static const int NOTIFICATION_OP_NONE = 0; - - /// < Notification inserted - static const int NOTIFICATION_OP_INSERT = 1; - - /// < Notification updated - static const int NOTIFICATION_OP_UPDATE = 2; - - /// < Notification deleted - static const int NOTIFICATION_OP_DELETE = 3; - - /// < Notifications deleted - static const int NOTIFICATION_OP_DELETE_ALL = 4; - - /// < (Deprecated Since 2.3.1) - static const int NOTIFICATION_OP_REFRESH = 5; - - /// < Notification service is ready - static const int NOTIFICATION_OP_SERVICE_READY = 6; -} - -/// @brief Enumeration for notification operation data code. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_op_data_type { - /// < Default - static const int NOTIFICATION_OP_DATA_MIN = 0; - - /// < Operation type - static const int NOTIFICATION_OP_DATA_TYPE = 1; - - /// < Private ID - static const int NOTIFICATION_OP_DATA_PRIV_ID = 2; - - /// < Notification handler - static const int NOTIFICATION_OP_DATA_NOTI = 3; - - /// < Reserved - static const int NOTIFICATION_OP_DATA_EXTRA_INFO_1 = 4; - - /// < Reserved - static const int NOTIFICATION_OP_DATA_EXTRA_INFO_2 = 5; -} - -/// @brief Enumeration for notification count position in the text. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notifcation_count_pos_type { - /// < Count data is not displaying in the text - static const int NOTIFICATION_COUNT_POS_NONE = -1; - - /// < Count data is displaying at the left of the text - static const int NOTIFICATION_COUNT_POS_LEFT = 0; - - /// < Count data is displaying in the text - static const int NOTIFICATION_COUNT_POS_IN = 1; - - /// < Count data is displaying at the right of the text - static const int NOTIFICATION_COUNT_POS_RIGHT = 2; -} - -/// @brief Enumeration for notification variable parameter type. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class notification_variable_type { - /// < Variable parameter type is NONE - static const int NOTIFICATION_VARIABLE_TYPE_NONE = -1; - - /// < Variable parameter type is int - static const int NOTIFICATION_VARIABLE_TYPE_INT = 0; - - /// < Variable parameter type is double - static const int NOTIFICATION_VARIABLE_TYPE_DOUBLE = 1; - - /// < Variable parameter type is string - static const int NOTIFICATION_VARIABLE_TYPE_STRING = 2; - - /// < Variable parameter type is count - static const int NOTIFICATION_VARIABLE_TYPE_COUNT = 3; -} - -final class _notification extends ffi.Opaque {} - -/// @brief The structure for notification operation. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -final class _notification_op extends ffi.Struct { - /// < Notification operation type - @ffi.Int32() - external int type; - - /// < private ID - @ffi.Int() - external int priv_id; - - /// < Reserved - @ffi.Int() - external int extra_info_1; - - /// < Reserved - @ffi.Int() - external int extra_info_2; - - /// < Notification handler - external notification_h noti; -} - -/// @brief Notification handle. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -typedef notification_h = ffi.Pointer<_notification>; - -/// @brief Enumeration for permission. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class notification_permission_type { - /// < None - static const int NOTIFICATION_PERMISSION_TYPE_NONE = 0; - - /// < Delete - static const int NOTIFICATION_PERMISSION_TYPE_DELETE = 1; - - /// < Update - static const int NOTIFICATION_PERMISSION_TYPE_UPDATE = 2; -} - -/// @brief Enumeration for notification block state. -/// @since_tizen 3.0 -abstract class notification_block_state { - /// < The app is allowed to post notifications - static const int NOTIFICATION_BLOCK_STATE_ALLOWED = 0; - - /// < The app is not allowed to post any notifications - static const int NOTIFICATION_BLOCK_STATE_BLOCKED = 1; - - /// < User set do not disturb mode - static const int NOTIFICATION_BLOCK_STATE_DO_NOT_DISTURB = 2; -} - -typedef time_t = __time_t; -typedef __time_t = ffi.Long; -typedef Dart__time_t = int; - -/// @brief Enumeration for Alarm Error. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class alarm_error_e { - /// < Successful - static const int ALARM_ERROR_NONE = 0; - - /// < Invalid parameter - static const int ALARM_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid time - static const int ALARM_ERROR_INVALID_TIME = -17825787; - - /// < Invalid date - static const int ALARM_ERROR_INVALID_DATE = -17825786; - - /// < The alarm service connection failed - static const int ALARM_ERROR_CONNECTION_FAIL = -17825785; - - /// < Application is not permitted. (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int ALARM_ERROR_NOT_PERMITTED_APP = -17825784; - - /// < Out of memory - static const int ALARM_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied - static const int ALARM_ERROR_PERMISSION_DENIED = -13; -} - -/// @brief Enumeration for Alarm Week Flag, the days of the week. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class alarm_week_flag_e { - /// < Sunday - static const int ALARM_WEEK_FLAG_SUNDAY = 1; - - /// < Monday - static const int ALARM_WEEK_FLAG_MONDAY = 2; - - /// < Tuesday - static const int ALARM_WEEK_FLAG_TUESDAY = 4; - - /// < Wednesday - static const int ALARM_WEEK_FLAG_WEDNESDAY = 8; - - /// < Thursday - static const int ALARM_WEEK_FLAG_THURSDAY = 16; - - /// < Friday - static const int ALARM_WEEK_FLAG_FRIDAY = 32; - - /// < Saturday - static const int ALARM_WEEK_FLAG_SATURDAY = 64; -} - -final class tm extends ffi.Struct { - @ffi.Int() - external int tm_sec; - - @ffi.Int() - external int tm_min; - - @ffi.Int() - external int tm_hour; - - @ffi.Int() - external int tm_mday; - - @ffi.Int() - external int tm_mon; - - @ffi.Int() - external int tm_year; - - @ffi.Int() - external int tm_wday; - - @ffi.Int() - external int tm_yday; - - @ffi.Int() - external int tm_isdst; - - @ffi.Long() - external int tm_gmtoff; - - external ffi.Pointer tm_zone; -} - -/// @brief Called once for each scheduled alarm to get the alarm ID. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] alarm_id The alarm ID returned when the alarm is scheduled -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @pre alarm_foreach_registered_alarm() will invoke this callback to get all the registered alarm IDs. -/// @see alarm_foreach_registered_alarm() -typedef alarm_registered_alarm_cb - = ffi.Pointer>; -typedef alarm_registered_alarm_cbFunction = ffi.Bool Function( - ffi.Int alarm_id, ffi.Pointer user_data); -typedef Dartalarm_registered_alarm_cbFunction = bool Function( - int alarm_id, ffi.Pointer user_data); - -final class event_handler extends ffi.Opaque {} - -/// @brief Enumeration for Event Error. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class event_error_e { - /// < Successful - static const int EVENT_ERROR_NONE = 0; - - /// < Invalid parameter - static const int EVENT_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int EVENT_ERROR_OUT_OF_MEMORY = -12; - - /// < Time out - static const int EVENT_ERROR_TIMED_OUT = -1073741823; - - /// < IO error - static const int EVENT_ERROR_IO_ERROR = -5; - - /// < Permission denied - static const int EVENT_ERROR_PERMISSION_DENIED = -13; -} - -/// @brief Event callback. -/// -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] event_name The interested event name -/// @param[in] event_data The data of interested event -/// @param[in] user_data The user data set by event_add_event_handler() -/// @see event_add_event_handler -typedef event_cb = ffi.Pointer>; -typedef event_cbFunction = ffi.Void Function(ffi.Pointer event_name, - ffi.Pointer event_data, ffi.Pointer user_data); -typedef Dartevent_cbFunction = void Function(ffi.Pointer event_name, - ffi.Pointer event_data, ffi.Pointer user_data); - -/// @brief Event handle. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -typedef event_handler_h = ffi.Pointer; - -/// @brief Enumeration for job error. -/// @since_tizen 4.0 -abstract class job_error_e { - /// < Successful - static const int JOB_ERROR_NONE = 0; - - /// < Invalid parameter - static const int JOB_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int JOB_ERROR_OUT_OF_MEMORY = -12; - - /// < IO error - static const int JOB_ERROR_IO_ERROR = -5; - - /// < Not initialized - static const int JOB_ERROR_NOT_INITIALIZED = -49938399; - - /// < No such job - static const int JOB_ERROR_NO_SUCH_JOB = -49938398; - - /// < Already exist - static const int JOB_ERROR_ALREADY_EXIST = -49938397; - - /// < Permission denied - static const int JOB_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int JOB_ERROR_NOT_SUPPORTED = -1073741822; -} - -/// @brief Enumeration for the job trigger events. -/// @since_tizen 4.0 -abstract class job_trigger_event_e { - /// < The battery level status: Empty - static const int JOB_TRIGGER_EVENT_BATTERY_LEVEL_EMPTY = 0; - - /// < The battery level status: Critical - static const int JOB_TRIGGER_EVENT_BATTERY_LEVEL_CRITICAL = 1; - - /// < The battery level status: Low - static const int JOB_TRIGGER_EVENT_BATTERY_LEVEL_LOW = 2; - - /// < The battery level status: High - static const int JOB_TRIGGER_EVENT_BATTERY_LEVEL_HIGH = 3; - - /// < The charger state: Connected - static const int JOB_TRIGGER_EVENT_CHARGER_STATE_CONNECTED = 4; - - /// < The charger state: Disconnected - static const int JOB_TRIGGER_EVENT_CHARGER_STATE_DISCONNECTED = 5; - - /// < The display state: On - static const int JOB_TRIGGER_EVENT_DISPLAY_STATE_ON = 6; - - /// < The display state: Off - static const int JOB_TRIGGER_EVENT_DISPLAY_STATE_OFF = 7; - - /// < The display state: Dim - static const int JOB_TRIGGER_EVENT_DISPLAY_STATE_DIM = 8; - - /// < The earjack state: Connected - static const int JOB_TRIGGER_EVENT_EARJACK_STATE_CONNECTED = 9; - - /// < The earjack state: Disconnected - static const int JOB_TRIGGER_EVENT_EARJACK_STATE_DISCONNECTED = 10; - - /// < The GPS state: Disabled - static const int JOB_TRIGGER_EVENT_GPS_STATE_DISABLED = 11; - - /// < The GPS state: Searching - static const int JOB_TRIGGER_EVENT_GPS_STATE_SEARCHING = 12; - - /// < The GPS state: Connected - static const int JOB_TRIGGER_EVENT_GPS_STATE_CONNECTED = 13; - - /// < The Power-saving mode: Enabled - static const int JOB_TRIGGER_EVENT_POWERSAVE_MODE_ENABLED = 14; - - /// < The Power-saving mode: Disabled - static const int JOB_TRIGGER_EVENT_POWERSAVE_MODE_DISABLED = 15; - - /// < The USB state: Connected - static const int JOB_TRIGGER_EVENT_USB_STATE_CONNECTED = 16; - - /// < The USB state: Disconnected - static const int JOB_TRIGGER_EVENT_USB_STATE_DISCONNECTED = 17; - - /// < The WiFi state: Disabled @n Privilege: http://tizen.org/privilege/network.get - static const int JOB_TRIGGER_EVENT_WIFI_STATE_DISABLED = 18; - - /// < The WiFi state: Disconnected @n Privilege: http://tizen.org/privilege/network.get - static const int JOB_TRIGGER_EVENT_WIFI_STATE_DISCONNECTED = 19; - - /// < The WiFi state: Connected @n Privilege: http://tizen.org/privilege/network.get - static const int JOB_TRIGGER_EVENT_WIFI_STATE_CONNECTED = 20; -} - -final class job_info_s extends ffi.Opaque {} - -/// @brief The job info handle. -/// @since_tizen 4.0 -typedef job_info_h = ffi.Pointer; - -final class job_service_s extends ffi.Opaque {} - -/// @brief The structure type containing the set of callback functions for handling jobs. -/// @details It is one of the input parameter of the job_scheduler_service_add() function. -/// @since_tizen 4.0 -/// @see job_scheduler_service_add() -/// @see job_service_start_cb() -/// @see job_service_stop_cb() -final class job_service_callback_s extends ffi.Struct { - /// < This callback function is called at the start of the job. - external job_service_start_cb start; - - /// < This callback function is called at the stop of the job. - external job_service_stop_cb stop; -} - -/// @brief Called when the job starts. -/// @since_tizen 4.0 -/// @remarks The @a job_info MUST NOT be deallocated by the application. -/// The @a job_info is managed by the platform and is valid only in the callback. -/// @param[in] job_info The job info handle -/// @param[in] user_data The user data passed from the callback registration function -/// @see job_scheduler_service_add() -/// @see #job_service_callback_s -typedef job_service_start_cb - = ffi.Pointer>; -typedef job_service_start_cbFunction = ffi.Void Function( - job_info_h job_info, ffi.Pointer user_data); -typedef Dartjob_service_start_cbFunction = void Function( - job_info_h job_info, ffi.Pointer user_data); - -/// @brief Called when the job stops. -/// @since_tizen 4.0 -/// @remarks The @a job_info MUST not be deallocated by the application. -/// The @a job_info is managed by the platform and is valid only in the callback. -/// @param[in] job_info The job info handle -/// @param[in] user_data The user data passed from the callback registration function -/// @see job_scheduler_service_add() -/// @see #job_service_callback_s -typedef job_service_stop_cb - = ffi.Pointer>; -typedef job_service_stop_cbFunction = ffi.Void Function( - job_info_h job_info, ffi.Pointer user_data); -typedef Dartjob_service_stop_cbFunction = void Function( - job_info_h job_info, ffi.Pointer user_data); - -/// @brief Called to retrieve the job information. -/// @since_tizen 4.0 -/// @remarks The @a job_info must not be deallocated by the application. -/// @param[in] job_info The job_info handle -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @pre job_scheduler_foreach_job() will invoke this callback. -/// @see job_scheduler_foreach_job() -typedef job_scheduler_foreach_job_cb - = ffi.Pointer>; -typedef job_scheduler_foreach_job_cbFunction = ffi.Bool Function( - job_info_h job_info, ffi.Pointer user_data); -typedef Dartjob_scheduler_foreach_job_cbFunction = bool Function( - job_info_h job_info, ffi.Pointer user_data); - -/// @brief The job service handle. -/// @since_tizen 4.0 -typedef job_service_h = ffi.Pointer; - -/// @brief Enumeration for Preference Error. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class preference_error_e { - /// < Successful - static const int PREFERENCE_ERROR_NONE = 0; - - /// < Invalid parameter - static const int PREFERENCE_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int PREFERENCE_ERROR_OUT_OF_MEMORY = -12; - - /// < Required key not available - static const int PREFERENCE_ERROR_NO_KEY = -17825744; - - /// < Internal I/O Error - static const int PREFERENCE_ERROR_IO_ERROR = -5; -} - -/// @brief Called when the given key's value in the preference changes. -/// @details When the @a key is added or removed, this callback function is skipped(only update can be handled). -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] key The name of the key in the preference -/// @param[in] user_data The user data passed from the callback registration function -/// @pre This function is invoked when the value of the key is overwritten after you register this callback using preference_set_changed_cb(). -/// @see preference_set_changed_cb() -/// @see preference_unset_changed_cb() -/// @see preference_set_boolean() -/// @see preference_set_int() -/// @see preference_set_string() -/// @see preference_set_double() -typedef preference_changed_cb - = ffi.Pointer>; -typedef preference_changed_cbFunction = ffi.Void Function( - ffi.Pointer key, ffi.Pointer user_data); -typedef Dartpreference_changed_cbFunction = void Function( - ffi.Pointer key, ffi.Pointer user_data); - -/// @brief Called to get key string, once for each key-value pair in the preference. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks You should not free the @a key returned by this function. -/// @param[in] key The key of the value added to the preference -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @pre preference_foreach_item() will invoke this callback function. -/// @see preference_foreach_item() -typedef preference_item_cb - = ffi.Pointer>; -typedef preference_item_cbFunction = ffi.Bool Function( - ffi.Pointer key, ffi.Pointer user_data); -typedef Dartpreference_item_cbFunction = bool Function( - ffi.Pointer key, ffi.Pointer user_data); - -/// @brief Enumeration for Resource Types -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class app_resource_e { - /// ; -typedef pid_t = __pid_t; -typedef __pid_t = ffi.Int; -typedef Dart__pid_t = int; - -/// @brief Enumeration for application component type. -/// @since_tizen 4.0 -/// @details A component is an application considered as a part of a package. -/// The application component type indicates what type of -/// a component an application is in a package. -/// @see PACKAGE_INFO_PROP_APP_COMPONENT_TYPE -/// @see app_info_get_app_component_type() -abstract class app_info_app_component_type_e { - /// < UI application - static const int APP_INFO_APP_COMPONENT_TYPE_UI_APP = 0; - - /// < Service application - static const int APP_INFO_APP_COMPONENT_TYPE_SERVICE_APP = 1; - - /// < Widget application - static const int APP_INFO_APP_COMPONENT_TYPE_WIDGET_APP = 2; - - /// < Watch application - static const int APP_INFO_APP_COMPONENT_TYPE_WATCH_APP = 3; -} - -final class app_info_s extends ffi.Opaque {} - -final class app_info_filter_s extends ffi.Opaque {} - -final class app_info_metadata_filter_s extends ffi.Opaque {} - -/// @brief Application information handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef app_info_h = ffi.Pointer; - -/// @brief Called to get application metadata in app_info_foreach_metadata(). -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] metadata_name The name of the metadata -/// @param[in] metadata_value The value of the metadata -/// @param[in] user_data The user data passed to app_info_foreach_metadata() -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// @pre app_info_foreach_metadata() will invoke this callback. -/// @see app_info_foreach_metadata() -typedef app_info_metadata_cb - = ffi.Pointer>; -typedef app_info_metadata_cbFunction = ffi.Bool Function( - ffi.Pointer metadata_key, - ffi.Pointer metadata_value, - ffi.Pointer user_data); -typedef Dartapp_info_metadata_cbFunction = bool Function( - ffi.Pointer metadata_key, - ffi.Pointer metadata_value, - ffi.Pointer user_data); - -/// @brief Called for each application category in app_info_foreach_category(). -/// @since_tizen 4.0 -/// @remarks @a category will be freed when the application information handle is destroyed -/// using app_info_destroy() -/// @param[in] category The name of the category -/// @param[in] user_data The user data passed to app_info_foreach_category() -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// @pre app_info_foreach_category() will invoke this callback. -/// @see app_info_foreach_category() -typedef app_info_category_cb - = ffi.Pointer>; -typedef app_info_category_cbFunction = ffi.Bool Function( - ffi.Pointer category, ffi.Pointer user_data); -typedef Dartapp_info_category_cbFunction = bool Function( - ffi.Pointer category, ffi.Pointer user_data); - -/// @brief Application filter handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef app_info_filter_h = ffi.Pointer; - -/// @brief Called to get the application information once for each installed application. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] app_info The application information of each installed application -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// @pre app_manager_foreach_app_info() will invoke this callback. -/// @see app_manager_foreach_app_info() -typedef app_info_filter_cb - = ffi.Pointer>; -typedef app_info_filter_cbFunction = ffi.Bool Function( - app_info_h app_info, ffi.Pointer user_data); -typedef Dartapp_info_filter_cbFunction = bool Function( - app_info_h app_info, ffi.Pointer user_data); - -/// @brief Application metadata filter handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef app_info_metadata_filter_h = ffi.Pointer; - -/// @brief Enumerations for Application Manager Error. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class app_manager_error_e { - /// < Successful - static const int APP_MANAGER_ERROR_NONE = 0; - - /// < Invalid parameter - static const int APP_MANAGER_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int APP_MANAGER_ERROR_OUT_OF_MEMORY = -12; - - /// < Internal I/O error - static const int APP_MANAGER_ERROR_IO_ERROR = -5; - - /// < No such application - static const int APP_MANAGER_ERROR_NO_SUCH_APP = -17891327; - - /// < Database error - static const int APP_MANAGER_ERROR_DB_FAILED = -17891325; - - /// < Invalid package name - static const int APP_MANAGER_ERROR_INVALID_PACKAGE = -17891324; - - /// < App is not running - static const int APP_MANAGER_ERROR_APP_NO_RUNNING = -17891323; - - /// < Internal aul request error - static const int APP_MANAGER_ERROR_REQUEST_FAILED = -17891322; - - /// < Permission denied - static const int APP_MANAGER_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported (Since 3.0) - static const int APP_MANAGER_ERROR_NOT_SUPPORTED = -1073741822; -} - -/// @brief Enumeration for app manager status type. -/// @since_tizen 3.0 -abstract class app_manager_event_status_type_e { - /// < All Status - static const int APP_MANAGER_EVENT_STATUS_TYPE_ALL = 0; - - /// < Application enable status - static const int APP_MANAGER_EVENT_STATUS_TYPE_ENABLE = 1; - - /// < Application disable status - static const int APP_MANAGER_EVENT_STATUS_TYPE_DISABLE = 2; -} - -/// @brief Enumeration for app manager event type. -/// @since_tizen 3.0 -abstract class app_manager_event_type_e { - /// < Application enable event - static const int APP_MANAGER_EVENT_ENABLE_APP = 0; - - /// < Application disable event. - static const int APP_MANAGER_EVENT_DISABLE_APP = 1; -} - -/// @brief Enumeration for app manager event state. -/// @since_tizen 3.0 -abstract class app_manager_event_state_e { - /// < Started event state - static const int APP_MANAGER_EVENT_STATE_STARTED = 0; - - /// < Completed event state - static const int APP_MANAGER_EVENT_STATE_COMPLETED = 1; - - /// < Failed event state - static const int APP_MANAGER_EVENT_STATE_FAILED = 2; -} - -final class app_manager_event_s extends ffi.Opaque {} - -/// @brief Called when an application is launched or terminated. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] app_context The application context of the application launched or terminated -/// @param[in] event The application context event -/// @param[in] user_data The user data passed from the foreach function -/// @pre This function is called when an application gets launched or terminated, after you register this callback using app_manager_set_app_context_event_cb(). -/// @see app_manager_set_app_context_event_cb() -/// @see app_manager_unset_app_context_event_cb() -typedef app_manager_app_context_event_cb - = ffi.Pointer>; -typedef app_manager_app_context_event_cbFunction = ffi.Void Function( - app_context_h app_context, - ffi.Int32 event, - ffi.Pointer user_data); -typedef Dartapp_manager_app_context_event_cbFunction = void Function( - app_context_h app_context, int event, ffi.Pointer user_data); - -/// @brief Called to get the application context once for each running application. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] app_context The application context of each running application -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// @pre app_manager_foreach_app_context() will invoke this callback. -/// @see app_manager_foreach_app_context() -typedef app_manager_app_context_cb - = ffi.Pointer>; -typedef app_manager_app_context_cbFunction = ffi.Bool Function( - app_context_h app_context, ffi.Pointer user_data); -typedef Dartapp_manager_app_context_cbFunction = bool Function( - app_context_h app_context, ffi.Pointer user_data); - -/// @brief Called to get the application information once for each installed application. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] app_info The application information of each installed application -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// @pre app_manager_foreach_app_info() will invoke this callback. -/// @see app_manager_foreach_app_info() -typedef app_manager_app_info_cb - = ffi.Pointer>; -typedef app_manager_app_info_cbFunction = ffi.Bool Function( - app_info_h app_info, ffi.Pointer user_data); -typedef Dartapp_manager_app_info_cbFunction = bool Function( - app_info_h app_info, ffi.Pointer user_data); - -/// @brief App manager event handle. -/// @since_tizen 3.0 -typedef app_manager_event_h = ffi.Pointer; - -/// @brief Called when the application is enabled or disabled. -/// @since_tizen 3.0 -/// -/// @param[in] type The type of the app to be enabled or disabled -/// @param[in] app_id The app id to be enabled or disabled -/// @param[in] event_type The event type of the app -/// @param[in] event_state The current event state of the app -/// @param[in] handle The app manager event handle -/// @param[in] user_data The user data passed from app_manager_set_event_cb() -/// @pre This function is called when an application being disabled or enabled, after you register this callback using app_manager_set_event_cb(). -/// -/// @see app_manager_set_event_cb() -/// @see app_manager_unset_event_cb() -typedef app_manager_event_cb - = ffi.Pointer>; -typedef app_manager_event_cbFunction = ffi.Void Function( - ffi.Pointer type, - ffi.Pointer app_id, - ffi.Int32 event_type, - ffi.Int32 event_state, - app_manager_event_h handle, - ffi.Pointer user_data); -typedef Dartapp_manager_event_cbFunction = void Function( - ffi.Pointer type, - ffi.Pointer app_id, - int event_type, - int event_state, - app_manager_event_h handle, - ffi.Pointer user_data); - -/// @brief Enumeration for Badge Error. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class badge_error_e { - /// < Success - static const int BADGE_ERROR_NONE = 0; - - /// < Invalid parameter - static const int BADGE_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int BADGE_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied - static const int BADGE_ERROR_PERMISSION_DENIED = -13; - - /// < Error from I/O - static const int BADGE_ERROR_IO_ERROR = -5; - - /// < Not supported (Since 4.0) - static const int BADGE_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Error from DB - static const int BADGE_ERROR_FROM_DB = -17956863; - - /// < Already exist - static const int BADGE_ERROR_ALREADY_EXIST = -17956862; - - /// < Error from DBus - static const int BADGE_ERROR_FROM_DBUS = -17956861; - - /// < Not exist - static const int BADGE_ERROR_NOT_EXIST = -17956860; - - /// < Error service not ready - static const int BADGE_ERROR_SERVICE_NOT_READY = -17956859; - - /// < The caller application is not signed with the certificate of the badge owner - static const int BADGE_ERROR_INVALID_PACKAGE = -17956858; -} - -/// @brief Callback function for getting result of badge_foreach. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] app_id The id of the application -/// @param[in] count The count of the badge -/// @param[in] user_data The user data passed from the badge_foreach function -/// @return true to continue with the next iteration of the loop, false to break out of the loop -/// @pre badge_foreach() will invoke this callback. -/// @see badge_foreach() -typedef badge_foreach_cb - = ffi.Pointer>; -typedef badge_foreach_cbFunction = ffi.Bool Function( - ffi.Pointer app_id, - ffi.UnsignedInt count, - ffi.Pointer user_data); -typedef Dartbadge_foreach_cbFunction = bool Function( - ffi.Pointer app_id, int count, ffi.Pointer user_data); - -/// @brief Enumeration for Badge Action. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class badge_action { - /// < Badge created - static const int BADGE_ACTION_CREATE = 0; - - /// < Badge removed - static const int BADGE_ACTION_REMOVE = 1; - - /// < Badge updated - static const int BADGE_ACTION_UPDATE = 2; - - /// < The display option of the badge changed - static const int BADGE_ACTION_CHANGED_DISPLAY = 3; - - /// < The badge service is ready - static const int BADGE_ACTION_SERVICE_READY = 4; -} - -/// @brief Called when the badge information is changed. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] action The type of the change. Refer #badge_action -/// @param[in] app_id The name of the application -/// @param[in] count The count of the badge -/// @param[in] user_data The user data passed from the callback register function -/// @pre badge_register_changed_cb() will invoke this callback. -/// @see badge_unregister_changed_cb() -typedef badge_change_cb - = ffi.Pointer>; -typedef badge_change_cbFunction = ffi.Void Function( - ffi.UnsignedInt action, - ffi.Pointer app_id, - ffi.UnsignedInt count, - ffi.Pointer user_data); -typedef Dartbadge_change_cbFunction = void Function(int action, - ffi.Pointer app_id, int count, ffi.Pointer user_data); - -final class data_control_bulk_data_s extends ffi.Opaque {} - -final class data_control_bulk_result_data_s extends ffi.Opaque {} - -final class data_control_s extends ffi.Opaque {} - -/// @brief Enumeration for different types of columns in a SQL table. -/// @since_tizen 2.3 -abstract class data_control_sql_column_type_e { - /// < undefined type - static const int DATA_CONTROL_SQL_COLUMN_TYPE_UNDEFINED = 0; - - /// < integer type - static const int DATA_CONTROL_SQL_COLUMN_TYPE_INT64 = 1; - - /// < double type - static const int DATA_CONTROL_SQL_COLUMN_TYPE_DOUBLE = 2; - - /// < text type - static const int DATA_CONTROL_SQL_COLUMN_TYPE_TEXT = 3; - - /// < blob type - static const int DATA_CONTROL_SQL_COLUMN_TYPE_BLOB = 4; - - /// < null value - static const int DATA_CONTROL_SQL_COLUMN_TYPE_NULL = 5; -} - -/// @brief Enumeration for the various error codes an API can return. -/// @since_tizen 2.3 -abstract class data_control_error_e { - /// < Successful - static const int DATA_CONTROL_ERROR_NONE = 0; - - /// < Out of memory - static const int DATA_CONTROL_ERROR_OUT_OF_MEMORY = -12; - - /// < I/O error - static const int DATA_CONTROL_ERROR_IO_ERROR = -5; - - /// < Invalid parameter - static const int DATA_CONTROL_ERROR_INVALID_PARAMETER = -22; - - /// < Permission denied - static const int DATA_CONTROL_ERROR_PERMISSION_DENIED = -13; - - /// < Too long argument - static const int DATA_CONTROL_ERROR_MAX_EXCEEDED = -18415615; -} - -/// @brief Enumeration for the various data changed notification types. -/// @since_tizen 3.0 -abstract class data_control_data_change_type_e { - /// < Update notification - static const int DATA_CONTROL_DATA_CHANGE_SQL_UPDATE = 0; - - /// < Insert notification - static const int DATA_CONTROL_DATA_CHANGE_SQL_INSERT = 1; - - /// < Delete notification - static const int DATA_CONTROL_DATA_CHANGE_SQL_DELETE = 2; - - /// < Set notification - static const int DATA_CONTROL_DATA_CHANGE_MAP_SET = 3; - - /// < Add notification - static const int DATA_CONTROL_DATA_CHANGE_MAP_ADD = 4; - - /// < Remove notification - static const int DATA_CONTROL_DATA_CHANGE_MAP_REMOVE = 5; -} - -final class result_set_s extends ffi.Opaque {} - -/// @brief The structure type to represent a SQL result set. -/// @details This type can be used to enumerate through the result set of an SQL query. -/// @since_tizen 2.3 -typedef result_set_cursor = ffi.Pointer; - -/// @brief The bulk data handle. -/// @since_tizen 3.0 -typedef data_control_bulk_data_h = ffi.Pointer; - -/// @brief The bulk result data handle. -/// @since_tizen 3.0 -typedef data_control_bulk_result_data_h - = ffi.Pointer; - -/// @brief The structure type to contain the set of callback functions for handling the response events of the SQL-friendly interface based data control. -/// @since_tizen 2.3 -/// -/// @see data_control_sql_select_response_cb() -/// @see data_control_sql_insert_response_cb() -/// @see data_control_sql_update_response_cb() -/// @see data_control_sql_delete_response_cb() -final class data_control_sql_response_cb extends ffi.Struct { - /// < This callback function is called when a response is received for an select operation from an application using the SQL-friendly interface based data control. - external data_control_sql_select_response_cb select_cb; - - /// < This callback function is called when a response is received for an insert operation from an application using the SQL-friendly interface based data control. - external data_control_sql_insert_response_cb insert_cb; - - /// < This callback function is called when a response is received for an update operation from an application using the SQL-friendly interface based data control. - external data_control_sql_update_response_cb update_cb; - - /// < This callback function is called when a response is received for a delete operation from an application using the SQL-friendly interface based data control. - external data_control_sql_delete_response_cb delete_cb; -} - -/// @brief Called when a response is received for a select operation from an application using the SQL-friendly interface based data control. -/// @since_tizen 2.3 -/// -/// @remarks @a enumerator will be removed after the execution of this callback. -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function \n -/// @a provider should not be destroyed -/// @param[in] enumerator The enumerator for navigating the result of data control select request -/// @param[in] provider_result Set to @c true if the data control provider successfully processed, \n -/// otherwise set to @c false -/// @param[in] error The error message from the data control provider -/// @param[in] user_data The user data passed from the register function -typedef data_control_sql_select_response_cb = ffi - .Pointer>; -typedef data_control_sql_select_response_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - result_set_cursor enumerator, - ffi.Bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); -typedef Dartdata_control_sql_select_response_cbFunction = void Function( - int request_id, - data_control_h provider, - result_set_cursor enumerator, - bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); - -/// @brief The structure type for the provider handle. -/// @since_tizen 2.3 -typedef data_control_h = ffi.Pointer; - -/// @brief Called when a response is received for an insert operation from an application using the SQL-friendly interface based data control. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function \n -/// @a provider should not be destroyed -/// @param[in] inserted_row_id The inserted row ID set by the data control -/// @param[in] provider_result Set to @c true if the data control provider successfully processed, \n -/// otherwise set to @c false -/// @param[in] error The error message from the data control provider -/// @param[in] user_data The user data passed from the register function -typedef data_control_sql_insert_response_cb = ffi - .Pointer>; -typedef data_control_sql_insert_response_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.LongLong inserted_row_id, - ffi.Bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); -typedef Dartdata_control_sql_insert_response_cbFunction = void Function( - int request_id, - data_control_h provider, - int inserted_row_id, - bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); - -/// @brief Called when a response is received for an update operation from an application using the SQL-friendly interface based data control. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function \n -/// @a provider should not be destroyed -/// @param[in] provider_result Set to @c true if the data control provider successfully processed, \n -/// otherwise set to @c false -/// @param[in] error The error message from the data control provider -/// @param[in] user_data The user data passed from the register function -typedef data_control_sql_update_response_cb = ffi - .Pointer>; -typedef data_control_sql_update_response_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.Bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); -typedef Dartdata_control_sql_update_response_cbFunction = void Function( - int request_id, - data_control_h provider, - bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); - -/// @brief Called when a response is received for a delete operation from an application using the SQL-friendly interface based data control. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID that identifies the data control -/// @param[in] provider The provider handle. @a provider is valid only inside this function \n -/// @a provider should not be destroyed -/// @param[in] provider_result Set to @c true if the data control provider successfully processed, \n -/// otherwise set to @c false -/// @param[in] error The error message from the data control provider -/// @param[in] user_data The user data passed from the register function -typedef data_control_sql_delete_response_cb = ffi - .Pointer>; -typedef data_control_sql_delete_response_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.Bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); -typedef Dartdata_control_sql_delete_response_cbFunction = void Function( - int request_id, - data_control_h provider, - bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); - -/// @brief Called when a response is received for a bulk operation from a provider application. -/// @since_tizen 3.0 -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function. \n -/// @a provider should not be destroyed. -/// @param[in] bulk_results The result data for each insert request. @a bulk_results is valid only inside this function. \n -/// @a bulk_results should not be freed. -/// @param[in] provider_result Set to @c true if the data control provider successfully processed, \n -/// otherwise set to @c false -/// @param[in] error The error message from the data control provider. @a error is valid only inside this function. \n -/// @a error should not be freed. -/// @param[in] user_data The user data passed from the register function -/// @see data_control_sql_register_insert_bulk_data_response_cb() -/// @see data_control_map_register_add_bulk_data_response_cb() -typedef data_control_bulk_cb - = ffi.Pointer>; -typedef data_control_bulk_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - data_control_bulk_result_data_h bulk_results, - ffi.Bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); -typedef Dartdata_control_bulk_cbFunction = void Function( - int request_id, - data_control_h provider, - data_control_bulk_result_data_h bulk_results, - bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); - -/// @brief The structure type to contain the set of callback functions for handling the response events -/// of the key-value structured data control. -/// @since_tizen 2.3 -/// @see data_control_map_get_response_cb() -/// @see data_control_map_set_response_cb() -/// @see data_control_map_add_response_cb() -/// @see data_control_map_remove_response_cb() -final class data_control_map_response_cb extends ffi.Struct { - /// < This callback function is called when the response is received for a getting value from the key-value structured data control provider. - external data_control_map_get_response_cb get_cb; - - /// < This callback function is called when the response is received for a setting value from the key-value structured data control provider. - external data_control_map_set_response_cb set_cb; - - /// < This callback function is called when the response is received for an adding value from the key-value structured data control provider. - external data_control_map_add_response_cb add_cb; - - /// < This callback function is called when the response is for a removing value received from the key-value structured data control provider. - external data_control_map_remove_response_cb remove_cb; -} - -/// @brief Called when the result value list is received from the key-value structured data control provider. -/// @since_tizen 2.3 -/// @remarks You must release @a result_value_list using free() after it is used. Note that @a result_value list is an array of char *. Its length is @a result_value_count. You should release all the elements in the @a result_value_list array and @a result_value_list itself like the following code. -/// -/// @code -/// -/// int i; -/// for (i = 0; i < resule_value_count; i++) -/// free(result_value_list[i]); -/// free(result_value_list); -/// -/// @endcode -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function \n -/// @a provider should not be destroyed. -/// @param[in] result_value_list The result value list of the data control request that gets the matching values -/// @param[in] result_value_count The number of the values -/// @param[in] provider_result Set to @c true if the data control provider is successfully processed, \n -/// otherwise set to @c false -/// @param[in] error The error message from the data control provider -/// @param[in] user_data The user data passed from the register function -typedef data_control_map_get_response_cb - = ffi.Pointer>; -typedef data_control_map_get_response_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.Pointer> result_value_list, - ffi.Int result_value_count, - ffi.Bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); -typedef Dartdata_control_map_get_response_cbFunction = void Function( - int request_id, - data_control_h provider, - ffi.Pointer> result_value_list, - int result_value_count, - bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); - -/// @brief Called when the response is received for a set operation from the key-value structured data control provider. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID that identifies the data control -/// @param[in] provider The provider handle. @a provider is valid only inside this function \n -/// @a provider should not be destroyed. -/// @param[in] provider_result Set to @c true if the data control provider successfully processed, \n -/// otherwise @c false -/// @param[in] error The error message from the data control provider -/// @param[in] user_data The user data passed from the register function -typedef data_control_map_set_response_cb - = ffi.Pointer>; -typedef data_control_map_set_response_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.Bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); -typedef Dartdata_control_map_set_response_cbFunction = void Function( - int request_id, - data_control_h provider, - bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); - -/// @brief Called when the response is received for an add operation from the key-value structured data control provider. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID that identifies the data control -/// @param[in] provider The provider handle. @a provider is valid only inside this function \n -/// @a provider should not be destroyed. -/// @param[in] provider_result Set to @c true if the data control provider successfully processed, \n -/// otherwise set to @c false -/// @param[in] error The error message from the data control provider -/// @param[in] user_data The user data passed from the register function -typedef data_control_map_add_response_cb - = ffi.Pointer>; -typedef data_control_map_add_response_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.Bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); -typedef Dartdata_control_map_add_response_cbFunction = void Function( - int request_id, - data_control_h provider, - bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); - -/// @brief Called when the response is received for a remove operation from the key-value structured data control provider. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID that identifies the data control -/// @param[in] provider The provider handle. @a provider is valid only inside this function \n -/// @a provider should not be destroyed. -/// @param[in] provider_result Set to @c true if the data control provider successfully processed, \n -/// otherwise set to @c false -/// @param[in] error The error message from the data control provider -/// @param[in] user_data The user data passed from the register function -typedef data_control_map_remove_response_cb = ffi - .Pointer>; -typedef data_control_map_remove_response_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.Bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); -typedef Dartdata_control_map_remove_response_cbFunction = void Function( - int request_id, - data_control_h provider, - bool provider_result, - ffi.Pointer error, - ffi.Pointer user_data); - -/// @brief The structure type to contain the set of callback functions for handling the request events -/// of SQL-friendly interface based data control. -/// @since_tizen 2.3 -/// -/// @see data_control_provider_sql_select_request_cb() -/// @see data_control_provider_sql_insert_request_cb() -/// @see data_control_provider_sql_update_request_cb() -/// @see data_control_provider_sql_delete_request_cb() -final class data_control_provider_sql_cb extends ffi.Struct { - /// < This callback function is called when a request for insert operation is received from other application. - external data_control_provider_sql_insert_request_cb insert_cb; - - /// < This callback function is called when a request for select operation is received from other application. - external data_control_provider_sql_select_request_cb select_cb; - - /// < This callback function is called when a request for update operation is received from other application. - external data_control_provider_sql_update_request_cb update_cb; - - /// < This callback function is called when a request for delete operation is received from other application. - external data_control_provider_sql_delete_request_cb delete_cb; -} - -/// @brief Called when the insert request is received from an application using SQL-friendly interface based data control. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function. \n -/// @a provider should not be freed -/// @param[in] insert_data The column-value pairs to insert \n -/// If the value is a string, the value must be wrapped in single quotes, -/// otherwise it does not need to be wrapped in single quotes. \n -/// To use outside the callback, make a copy by using bundle_dup(). -/// @a insert_data should not be freed. -/// @param[in] user_data The user data passed from the register function -typedef data_control_provider_sql_insert_request_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef data_control_provider_sql_insert_request_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.Pointer insert_data, - ffi.Pointer user_data); -typedef Dartdata_control_provider_sql_insert_request_cbFunction = void Function( - int request_id, - data_control_h provider, - ffi.Pointer insert_data, - ffi.Pointer user_data); - -/// @brief Called when the select request is received from an application using SQL-friendly interface based data control. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function. \n -/// @a provider should not be freed -/// @param[in] column_list The column list to query -/// @param[in] column_count The total number of columns to be queried -/// @param[in] where A filter to select the desired rows \n -/// It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue -/// @param[in] order The sorting order of the rows to query \n -/// It is an SQL 'ORDER BY' clause excluding the 'ORDER BY' itself -/// @param[in] user_data The user data passed from the register function -typedef data_control_provider_sql_select_request_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef data_control_provider_sql_select_request_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.Pointer> column_list, - ffi.Int column_count, - ffi.Pointer where, - ffi.Pointer order, - ffi.Pointer user_data); -typedef Dartdata_control_provider_sql_select_request_cbFunction = void Function( - int request_id, - data_control_h provider, - ffi.Pointer> column_list, - int column_count, - ffi.Pointer where, - ffi.Pointer order, - ffi.Pointer user_data); - -/// @brief Called when the update request is received from an application using SQL-friendly interface based data control. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function. \n -/// @a provider should not be freed -/// @param[in] update_data The column-value pairs to update \n -/// If the value is a string, the value must be wrapped in single quotes, -/// otherwise it does not need to be wrapped in single quotes. \n -/// To use outside the callback, make a copy by using bundle_dup(). -/// @a update_data should not be freed. -/// @param[in] where A filter to select the desired rows to update \n -/// It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue -/// @param[in] user_data The user data passed from the register function -typedef data_control_provider_sql_update_request_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef data_control_provider_sql_update_request_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.Pointer update_data, - ffi.Pointer where, - ffi.Pointer user_data); -typedef Dartdata_control_provider_sql_update_request_cbFunction = void Function( - int request_id, - data_control_h provider, - ffi.Pointer update_data, - ffi.Pointer where, - ffi.Pointer user_data); - -/// @brief Called when the delete request is received from an application using SQL-friendly interface based data control. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function. \n -/// @a provider should not be freed -/// @param[in] where A filter to select the desired rows to delete \n -/// It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as column1 = 'stringValue' and column2 = numericValue -/// @param[in] user_data The user data passed from the register function -typedef data_control_provider_sql_delete_request_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef data_control_provider_sql_delete_request_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.Pointer where, - ffi.Pointer user_data); -typedef Dartdata_control_provider_sql_delete_request_cbFunction = void Function( - int request_id, - data_control_h provider, - ffi.Pointer where, - ffi.Pointer user_data); - -/// @brief The structure type to contain the set of callback functions for handling the request events -/// from the key-value structured data control consumer. -/// @since_tizen 2.3 -/// -/// @see data_control_provider_map_get_value_request_cb() -/// @see data_control_provider_map_set_value_request_cb() -/// @see data_control_provider_map_add_value_request_cb() -/// @see data_control_provider_map_remove_value_request_cb() -final class data_control_provider_map_cb extends ffi.Struct { - /// < This callback function is called when a request for getting value is received from other application. - external data_control_provider_map_get_value_request_cb get_cb; - - /// < This callback function is called when a request for setting value is received from other application. - external data_control_provider_map_set_value_request_cb set_cb; - - /// < This callback function is called when a request for adding value is received from other application. - external data_control_provider_map_add_value_request_cb add_cb; - - /// < This callback function is called when a request for removing value is received from other application. - external data_control_provider_map_remove_value_request_cb remove_cb; -} - -/// @brief Called when the request for obtaining the value list is received from the key-value structured data control consumer. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function. \n -/// @a provider should not be freed -/// @param[in] key The key of the value list to obtain -/// @param[in] user_data The user data passed from the register function -typedef data_control_provider_map_get_value_request_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef data_control_provider_map_get_value_request_cbFunction - = ffi.Void Function(ffi.Int request_id, data_control_h provider, - ffi.Pointer key, ffi.Pointer user_data); -typedef Dartdata_control_provider_map_get_value_request_cbFunction - = void Function(int request_id, data_control_h provider, - ffi.Pointer key, ffi.Pointer user_data); - -/// @brief Called when the request for replacing the value is received from the key-value structured data control consumer. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function. \n -/// @a provider should not be freed -/// @param[in] key The key of the value to replace -/// @param[in] old_value The value to replace -/// @param[in] new_value The new value that replaces the existing value -/// @param[in] user_data The user data passed from the register function -typedef data_control_provider_map_set_value_request_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef data_control_provider_map_set_value_request_cbFunction - = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.Pointer key, - ffi.Pointer old_value, - ffi.Pointer new_value, - ffi.Pointer user_data); -typedef Dartdata_control_provider_map_set_value_request_cbFunction - = void Function( - int request_id, - data_control_h provider, - ffi.Pointer key, - ffi.Pointer old_value, - ffi.Pointer new_value, - ffi.Pointer user_data); - -/// @brief Called when the request for adding the value is received from the key-value structured data control consumer. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function. \n -/// @a provider should not be freed -/// @param[in] key The key of the value to add -/// @param[in] value The value to add -/// @param[in] user_data The user data passed from the register function -typedef data_control_provider_map_add_value_request_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef data_control_provider_map_add_value_request_cbFunction - = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.Pointer key, - ffi.Pointer value, - ffi.Pointer user_data); -typedef Dartdata_control_provider_map_add_value_request_cbFunction - = void Function( - int request_id, - data_control_h provider, - ffi.Pointer key, - ffi.Pointer value, - ffi.Pointer user_data); - -/// @brief Called when the request for removing the value is received from the key-value structured data control consumer. -/// @since_tizen 2.3 -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function. \n -/// @a provider should not be freed -/// @param[in] key The key of the value to remove -/// @param[in] value The value to remove -/// @param[in] user_data The user data passed from the register function -typedef data_control_provider_map_remove_value_request_cb = ffi.Pointer< - ffi - .NativeFunction>; -typedef data_control_provider_map_remove_value_request_cbFunction - = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - ffi.Pointer key, - ffi.Pointer value, - ffi.Pointer user_data); -typedef Dartdata_control_provider_map_remove_value_request_cbFunction - = void Function( - int request_id, - data_control_h provider, - ffi.Pointer key, - ffi.Pointer value, - ffi.Pointer user_data); - -/// @brief Called when a consumer requests a data change callback addition. -/// @details The callback decides - through the return value - whether a consumer application should be allowed to add a data change callback. \n -/// If it returns true, it means the application should be allowed to do so, if it returns false, it means it should be denied. -/// -/// @since_tizen 3.0 -/// @param[in] provider The provider handle. @a provider is valid only inside this function. \n -/// @a provider should not be freed -/// @param[in] consumer_appid The id of the consumer application which requested to add the callback. @a consumer_appid is valid only inside this function. \n -/// To use outside the callback, make a copy. @a consumer_appid should not be freed -/// @param[in] user_data The user data. -/// @return A boolean value indicating whether the consumer application should be allowed to add data change callbacks. -/// @c true let the application add a data change callback, -/// otherwise @c false application not allowed to add data change callback -/// -/// @pre The callback must be registered using data_control_provider_add_data_change_consumer_filter_cb(). \n -/// data_control_add_data_change_cb() must be called to invoke this callback. -/// -/// @see data_control_provider_add_data_change_consumer_filter_cb() -/// @see data_control_provider_remove_data_change_consumer_filter_cb() -typedef data_control_provider_data_change_consumer_filter_cb = ffi.Pointer< - ffi.NativeFunction< - data_control_provider_data_change_consumer_filter_cbFunction>>; -typedef data_control_provider_data_change_consumer_filter_cbFunction - = ffi.Bool Function(data_control_h provider, - ffi.Pointer consumer_appid, ffi.Pointer user_data); -typedef Dartdata_control_provider_data_change_consumer_filter_cbFunction - = bool Function(data_control_h provider, - ffi.Pointer consumer_appid, ffi.Pointer user_data); - -/// @brief Called for each application which successfully added a data change callback. -/// @since_tizen 3.0 -/// -/// @param[in] provider The provider handle. @a provider is valid only inside this function \n -/// @a provider should not be freed -/// @param[in] consumer_appid The id of the consumer application. @a consumer_appid is valid only inside this function \n -/// To use outside the callback, make a copy. @a consumer_appid should not be freed -/// @param[in] user_data The user data -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre data_control_provider_foreach_data_change_consumer() must be called to invoke this callback. -/// @see data_control_provider_foreach_data_change_consumer() -typedef data_control_provider_data_change_consumer_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef data_control_provider_data_change_consumer_cbFunction - = ffi.Bool Function(data_control_h provider, - ffi.Pointer consumer_appid, ffi.Pointer user_data); -typedef Dartdata_control_provider_data_change_consumer_cbFunction - = bool Function(data_control_h provider, - ffi.Pointer consumer_appid, ffi.Pointer user_data); - -/// @brief Called when the bulk data request is received from an consumer application. -/// @since_tizen 3.0 -/// -/// @param[in] request_id The request ID -/// @param[in] provider The provider handle. @a provider is valid only inside this function. \n -/// @a provider should not be freed -/// @param[in] bulk_data The bulk data handle which contains data to be inserted or added -/// @param[in] user_data The user data passed from the register function -/// -/// @see data_control_provider_sql_register_insert_bulk_data_request_cb() -/// @see data_control_provider_map_register_add_bulk_data_request_cb() -/// @see data_control_sql_insert_bulk_data() -/// @see data_control_map_add_bulk_data() -/// @see data_control_bulk_data_add() -typedef data_control_provider_bulk_cb - = ffi.Pointer>; -typedef data_control_provider_bulk_cbFunction = ffi.Void Function( - ffi.Int request_id, - data_control_h provider, - data_control_bulk_data_h bulk_data, - ffi.Pointer user_data); -typedef Dartdata_control_provider_bulk_cbFunction = void Function( - int request_id, - data_control_h provider, - data_control_bulk_data_h bulk_data, - ffi.Pointer user_data); - -/// @brief Called when received data changed notification from provider application. -/// @since_tizen 3.0 -/// @param[in] provider The provider handle. @a provider is valid only inside this function \n -/// @a provider should not be destroyed. -/// @param[in] type Changed data type -/// @param[in] data Data from provider, intended to contain information about changed data \n -/// @a data is valid only inside this function \n -/// To use outside the callback, make a copy. @a data should not be freed -/// @param[in] user_data The user data passed from the add function -/// @pre The callback must be registered using data_control_add_data_change_cb(). \n -/// data_control_provider_send_data_change_noti() must be called to invoke this callback. -/// @see data_control_add_data_change_cb() -/// @see data_control_provider_send_data_change_noti() -typedef data_control_data_change_cb - = ffi.Pointer>; -typedef data_control_data_change_cbFunction = ffi.Void Function( - data_control_h provider, - ffi.Int32 type, - ffi.Pointer data, - ffi.Pointer user_data); -typedef Dartdata_control_data_change_cbFunction = void Function( - data_control_h provider, - int type, - ffi.Pointer data, - ffi.Pointer user_data); - -/// @brief Called when the consumer receives the result of the data change callback adding operation. -/// @details The following error codes can be delivered: \n -/// #DATA_CONTROL_ERROR_NONE, \n -/// #DATA_CONTROL_ERROR_OUT_OF_MEMORY, \n -/// #DATA_CONTROL_ERROR_IO_ERROR, \n -/// #DATA_CONTROL_ERROR_PERMISSION_DENIED, \n -/// #DATA_CONTROL_ERROR_MAX_EXCEEDED -/// @since_tizen 3.0 -/// @remarks DATA_CONTROL_ERROR_PERMISSION_DENIED will be returned when the provider denies to add the callback. -/// @param[in] provider The provider handle. @a provider is valid only inside this function \n -/// @a provider should not be destroyed. -/// @param[in] result Add data change callback result -/// @param[in] callback_id Added callback ID -/// @param[in] user_data The user data passed from the add function -/// @pre The callback must be registered using data_control_add_data_change_cb(). -/// @see data_control_add_data_change_cb() -typedef data_control_add_callback_result_cb = ffi - .Pointer>; -typedef data_control_add_callback_result_cbFunction = ffi.Void Function( - data_control_h provider, - ffi.Int32 result, - ffi.Int callback_id, - ffi.Pointer user_data); -typedef Dartdata_control_add_callback_result_cbFunction = void Function( - data_control_h provider, - int result, - int callback_id, - ffi.Pointer user_data); - -/// @brief Enumeration for error codes of a message port. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class message_port_error_e { - /// < Successful - static const int MESSAGE_PORT_ERROR_NONE = 0; - - /// < Internal I/O error - static const int MESSAGE_PORT_ERROR_IO_ERROR = -5; - - /// < Out of memory - static const int MESSAGE_PORT_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int MESSAGE_PORT_ERROR_INVALID_PARAMETER = -22; - - /// < The message port of the remote application is not found - static const int MESSAGE_PORT_ERROR_PORT_NOT_FOUND = -18022399; - - /// < The remote application is not signed with the same certificate - static const int MESSAGE_PORT_ERROR_CERTIFICATE_NOT_MATCH = -18022398; - - /// < The size of the message has exceeded the maximum limit - static const int MESSAGE_PORT_ERROR_MAX_EXCEEDED = -18022397; - - /// < Resource is temporarily unavailable - static const int MESSAGE_PORT_ERROR_RESOURCE_UNAVAILABLE = -18022396; -} - -/// @brief Called when a message is received. -/// @details The function is called when a message is received from the remote application. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks @a message is automatically freed by framework when callback returned, you can keep @a message using bundle_dup() @n -/// @a remote_port will be set only if the remote application sends a message with its port information using message_port_send_message_with_local_port(), otherwise it is @c NULL @n -/// When message is sent from remote application by message_port_send_message_with_local_port() in bidirectional communication, trusted_remote_port is used to check whether remote port is trusted port or not -/// This callback is called only in the main thread. -/// @param[in] local_port_id The local message port ID returned by message_port_register_local_port() -/// @param[in] remote_app_id The ID of the remote application that sent this message -/// @param[in] remote_port The name of the remote message port -/// @param[in] trusted_remote_port If @c true, the remote port is a trusted port; otherwise if @c false, it is not -/// @param[in] message The message passed from the remote application -/// @param[in] user_data The user data passed from the register function -/// @pre Either message_port_send_message() or message_port_send_message_with_local_port() from the remote application will invoke this function if you register it using message_port_register_local_port() -/// @see message_port_register_local_port() -/// @see message_port_unregister_local_port() -/// @see message_port_send_message() -/// @see message_port_send_message_with_local_port() -typedef message_port_message_cb - = ffi.Pointer>; -typedef message_port_message_cbFunction = ffi.Void Function( - ffi.Int local_port_id, - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - ffi.Bool trusted_remote_port, - ffi.Pointer message, - ffi.Pointer user_data); -typedef Dartmessage_port_message_cbFunction = void Function( - int local_port_id, - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - bool trusted_remote_port, - ffi.Pointer message, - ffi.Pointer user_data); - -/// @brief Called when a trusted message is received. -/// @details This function is called when a trusted message is received from the remote application. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks You can keep @a message using bundle_dup(). @n -/// @a remote_port will be set only if the remote application sends a message with its port information using message_port_send_trusted_message_with_local_port(), otherwise it is @c NULL. @n -/// When message is sent from remote application by message_port_send_trusted_message_with_local_port() in bidirectional communication, trusted_remote_port is used to check whether remote port is trusted port or not. -/// This callback is called only in the main thread. -/// @param[in] trusted_local_port_id The message port ID returned by message_port_register_trusted_local_port() -/// @param[in] remote_app_id The ID of the remote application that sent this message -/// @param[in] remote_port The name of the remote message port -/// @param[in] trusted_remote_port If @c true, the remote port is a trusted port; otherwise if @c false, it is not -/// @param[in] message The message passed from the remote application -/// @param[in] user_data The user data passed from the register function -/// @pre Either message_port_send_trusted_message() or message_port_send_trusted_message_with_local_port() from the remote application will invoke this function if you register it using message_port_register_trusted_local_port(). -/// @see message_port_register_trusted_local_port() -/// @see message_port_unregister_trusted_local_port() -/// @see message_port_send_trusted_message() -/// @see message_port_send_trusted_message_with_local_port() -typedef message_port_trusted_message_cb - = ffi.Pointer>; -typedef message_port_trusted_message_cbFunction = ffi.Void Function( - ffi.Int trusted_local_port_id, - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - ffi.Bool trusted_remote_port, - ffi.Pointer message, - ffi.Pointer user_data); -typedef Dartmessage_port_trusted_message_cbFunction = void Function( - int trusted_local_port_id, - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - bool trusted_remote_port, - ffi.Pointer message, - ffi.Pointer user_data); - -/// @brief Called when a remote port is registered or unregistered. -/// @details The function is called when a remote port is registered or unregistered -/// from the remote application. -/// @since_tizen 4.0 -/// @remarks @a remote_app_id and @a remote_port can be used until -/// message_port_remove_registration_event_cb() is called for the watcher which reported -/// the event. -/// @param[in] remote_app_id The ID of the remote application that sent this message -/// @param[in] remote_port The name of the remote message port -/// @param[in] trusted_remote_port Indicates whether remote port is trusted -/// @param[in] user_data The user data passed from the register function -/// @pre Called when a remote port is registered or unregistered if you add it using -/// message_port_add_registered_cb() or message_port_add_unregistered_cb() respectively. -/// @see message_port_add_registered_cb() -/// @see message_port_add_unregistered_cb() -/// @see message_port_remove_registration_event_cb() -typedef message_port_registration_event_cb = ffi - .Pointer>; -typedef message_port_registration_event_cbFunction = ffi.Void Function( - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - ffi.Bool trusted_remote_port, - ffi.Pointer user_data); -typedef Dartmessage_port_registration_event_cbFunction = void Function( - ffi.Pointer remote_app_id, - ffi.Pointer remote_port, - bool trusted_remote_port, - ffi.Pointer user_data); - -final class package_info_s extends ffi.Opaque {} - -final class package_updateinfo_s extends ffi.Opaque {} - -/// @brief Enumeration for storage type. -/// @since_tizen 2.3 -abstract class package_info_installed_storage_type_e { - /// < Internal storage - static const int PACKAGE_INFO_INTERNAL_STORAGE = 0; - - /// < External storage - static const int PACKAGE_INFO_EXTERNAL_STORAGE = 1; - - /// < Extended storage (Since 5.0) - static const int PACKAGE_INFO_EXTENDED_STORAGE = 2; -} - -/// @brief Enumeration for app component type. -/// @since_tizen 2.3 -abstract class package_info_app_component_type_e { - /// < All application - static const int PACKAGE_INFO_ALLAPP = 0; - - /// < UI application - static const int PACKAGE_INFO_UIAPP = 1; - - /// < Service application - static const int PACKAGE_INFO_SERVICEAPP = 2; - - /// < Widget application (Since 4.0) - static const int PACKAGE_INFO_WIDGETAPP = 3; - - /// < Watch application (Since 4.0) - static const int PACKAGE_INFO_WATCHAPP = 4; -} - -/// @brief Enumeration for certification type. -/// @since_tizen 2.3 -abstract class package_cert_type_e { - /// < Author Root Certificate - static const int PACKAGE_INFO_AUTHOR_ROOT_CERT = 0; - - /// < Author Intermediate Certificate - static const int PACKAGE_INFO_AUTHOR_INTERMEDIATE_CERT = 1; - - /// < Author Signer Certificate - static const int PACKAGE_INFO_AUTHOR_SIGNER_CERT = 2; - - /// < Distributor Root Certificate - static const int PACKAGE_INFO_DISTRIBUTOR_ROOT_CERT = 3; - - /// < Distributor Intermediate Certificate - static const int PACKAGE_INFO_DISTRIBUTOR_INTERMEDIATE_CERT = 4; - - /// < Distributor Signer Certificate - static const int PACKAGE_INFO_DISTRIBUTOR_SIGNER_CERT = 5; - - /// < Distributor2 Root Certificate - static const int PACKAGE_INFO_DISTRIBUTOR2_ROOT_CERT = 6; - - /// < Distributor2 Intermediate Certificate - static const int PACKAGE_INFO_DISTRIBUTOR2_INTERMEDIATE_CERT = 7; - - /// < Distributor2 Signer Certificate - static const int PACKAGE_INFO_DISTRIBUTOR2_SIGNER_CERT = 8; -} - -/// @brief Enumeration for package update info type. -/// @since_tizen 4.0 -abstract class package_updateinfo_type_e { - /// < None type - static const int PACKAGE_UPDATEINFO_TYPE_NONE = 0; - - /// < Force type - static const int PACKAGE_UPDATEINFO_TYPE_FORCE = 1; - - /// < Optional type - static const int PACKAGE_UPDATEINFO_TYPE_OPTIONAL = 2; -} - -/// @brief The package information handle. -/// @since_tizen 2.3 -typedef package_info_h = ffi.Pointer; - -/// @brief Called to get the application ID once for each installed package. -/// @since_tizen 2.3 -/// @param[in] comp_type The Application Component type -/// @param[in] callback The callback function to be invoked -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @pre package_info_foreach_app_from_package() will invoke this callback. -/// @see package_info_foreach_app_from_package() -typedef package_info_app_cb - = ffi.Pointer>; -typedef package_info_app_cbFunction = ffi.Bool Function(ffi.Int32 comp_type, - ffi.Pointer app_id, ffi.Pointer user_data); -typedef Dartpackage_info_app_cbFunction = bool Function(int comp_type, - ffi.Pointer app_id, ffi.Pointer user_data); - -/// @brief Called to get the certification information. -/// @since_tizen 2.3 -/// @param[in] package_info The package info handle -/// @param[in] cert_type The certificate type -/// @param[in] cert_value The certificate value of corresponding certificate key \n -/// This value is base64 encoded data. -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @pre package_info_foreach_cert_info() will invoke this callback. -/// @see package_info_foreach_cert_info() -typedef package_info_cert_info_cb - = ffi.Pointer>; -typedef package_info_cert_info_cbFunction = ffi.Bool Function( - package_info_h handle, - ffi.Int32 cert_type, - ffi.Pointer cert_value, - ffi.Pointer user_data); -typedef Dartpackage_info_cert_info_cbFunction = bool Function( - package_info_h handle, - int cert_type, - ffi.Pointer cert_value, - ffi.Pointer user_data); - -/// @brief Called to get the privilege information. -/// @since_tizen 2.3 -/// @param[in] privilege_name the name of the privilege -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @pre package_info_foreach_privilege_info() will invoke this callback. -/// @see package_info_foreach_privilege_info() -typedef package_info_privilege_info_cb - = ffi.Pointer>; -typedef package_info_privilege_info_cbFunction = ffi.Bool Function( - ffi.Pointer privilege_name, ffi.Pointer user_data); -typedef Dartpackage_info_privilege_info_cbFunction = bool Function( - ffi.Pointer privilege_name, ffi.Pointer user_data); - -/// @brief The package update information handle. -/// @since_tizen 4.0 -typedef package_updateinfo_h = ffi.Pointer; - -/// @brief Called for each update information of all packages. -/// @since_tizen 4.0 -/// @remarks @a info should not be freed and can be used only in the callback. -/// @param[in] info The package update information handle -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @pre package_info_updateinfo_foreach_updateinfo() will invoke this callback. -/// @see package_info_updateinfo_foreach_updateinfo() -typedef package_info_updateinfo_cb - = ffi.Pointer>; -typedef package_info_updateinfo_cbFunction = ffi.Bool Function( - package_updateinfo_h info, ffi.Pointer user_data); -typedef Dartpackage_info_updateinfo_cbFunction = bool Function( - package_updateinfo_h info, ffi.Pointer user_data); - -/// @brief Enumeration for error code. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class package_manager_error_e { - /// < Successful - static const int PACKAGE_MANAGER_ERROR_NONE = 0; - - /// < Invalid parameter - static const int PACKAGE_MANAGER_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY = -12; - - /// < Internal I/O error - static const int PACKAGE_MANAGER_ERROR_IO_ERROR = -5; - - /// < No such package - static const int PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE = -18153359; - - /// < Severe system error - static const int PACKAGE_MANAGER_ERROR_SYSTEM_ERROR = -18153358; - - /// < Permission denied - static const int PACKAGE_MANAGER_ERROR_PERMISSION_DENIED = -13; -} - -/// @brief Enumeration for event type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class package_manager_event_type_e { - /// < Install event type - static const int PACKAGE_MANAGER_EVENT_TYPE_INSTALL = 0; - - /// < Uninstall event type - static const int PACKAGE_MANAGER_EVENT_TYPE_UNINSTALL = 1; - - /// < Update event type - static const int PACKAGE_MANAGER_EVENT_TYPE_UPDATE = 2; - - /// < Move event type (Since 3.0) - static const int PACKAGE_MANAGER_EVENT_TYPE_MOVE = 3; - - /// < Clear event type (Since 3.0) - static const int PACKAGE_MANAGER_EVENT_TYPE_CLEAR = 4; -} - -/// @brief Enumeration for event state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class package_manager_event_state_e { - /// < Started event state - static const int PACKAGE_MANAGER_EVENT_STATE_STARTED = 0; - - /// < Processing event state - static const int PACKAGE_MANAGER_EVENT_STATE_PROCESSING = 1; - - /// < Completed event state - static const int PACKAGE_MANAGER_EVENT_STATE_COMPLETED = 2; - - /// < Failed event state - static const int PACKAGE_MANAGER_EVENT_STATE_FAILED = 3; -} - -/// @brief Enumeration for move type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class package_manager_move_type_e { - /// < Internal type - static const int PACKAGE_MANAGER_REQUEST_MOVE_TO_INTERNAL = 0; - - /// < External type - static const int PACKAGE_MANAGER_REQUEST_MOVE_TO_EXTERNAL = 1; - - /// < Extended type (Since 5.0) - static const int PACKAGE_MANAGER_REQUEST_MOVE_TO_EXTENDED = 2; -} - -/// @brief Enumeration for certification compare type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class package_manager_compare_result_type_e { - /// < Matching certification - static const int PACKAGE_MANAGER_COMPARE_MATCH = 0; - - /// < Mismatching certification - static const int PACKAGE_MANAGER_COMPARE_MISMATCH = 1; - - /// < First package has no certification - static const int PACKAGE_MANAGER_COMPARE_LHS_NO_CERT = 2; - - /// < Second package has no certification - static const int PACKAGE_MANAGER_COMPARE_RHS_NO_CERT = 3; - - /// < Both have no certification - static const int PACKAGE_MANAGER_COMPARE_BOTH_NO_CERT = 4; -} - -/// @brief Enumeration for permission type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class package_manager_permission_type_e { - /// < Normal permission - static const int PACKAGE_MANAGER_PERMISSION_NORMAL = 0; - - /// < Signature permission - static const int PACKAGE_MANAGER_PERMISSION_SIGNATURE = 1; - - /// < Privilege permission - static const int PACKAGE_MANAGER_PERMISSION_PRIVILEGE = 2; -} - -/// @brief Enumeration for status type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class package_manager_status_type_e { - /// < All status - static const int PACKAGE_MANAGER_STATUS_TYPE_ALL = 0; - - /// < Install package status - static const int PACKAGE_MANAGER_STATUS_TYPE_INSTALL = 1; - - /// < Uninstall package status - static const int PACKAGE_MANAGER_STATUS_TYPE_UNINSTALL = 2; - - /// < Upgrade package status - static const int PACKAGE_MANAGER_STATUS_TYPE_UPGRADE = 4; - - /// < Move package status - static const int PACKAGE_MANAGER_STATUS_TYPE_MOVE = 8; - - /// < Clear data status - static const int PACKAGE_MANAGER_STATUS_TYPE_CLEAR_DATA = 16; - - /// < Install progress status - static const int PACKAGE_MANAGER_STATUS_TYPE_INSTALL_PROGRESS = 32; - - /// < Get size status - static const int PACKAGE_MANAGER_STATUS_TYPE_GET_SIZE = 64; -} - -final class package_updateinfo_request_s extends ffi.Opaque {} - -final class package_manager_s extends ffi.Opaque {} - -final class package_manager_filter_s extends ffi.Opaque {} - -/// @brief The Package manager handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef package_manager_h = ffi.Pointer; - -/// @brief Called when the package is installed, uninstalled, or updated, and the progress of the request to the package manager changes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] type The type of the package to be installed, uninstalled, or updated -/// @param[in] package The name of the package to be installed, uninstalled, or updated -/// @param[in] event_type The type of the request to the package manager -/// @param[in] event_state The current state of the request to the package manager -/// @param[in] progress The progress for the request that is being processed by the package manager \n -/// The range of progress is from @c 0 to @c 100 -/// @param[in] error The error code when the package manager failed to process the request -/// @param[in] user_data The user data passed from package_manager_set_event_cb() -/// @see package_manager_set_event_cb() -/// @see package_manager_unset_event_cb() -typedef package_manager_event_cb - = ffi.Pointer>; -typedef package_manager_event_cbFunction = ffi.Void Function( - ffi.Pointer type, - ffi.Pointer package, - ffi.Int32 event_type, - ffi.Int32 event_state, - ffi.Int progress, - ffi.Int32 error, - ffi.Pointer user_data); -typedef Dartpackage_manager_event_cbFunction = void Function( - ffi.Pointer type, - ffi.Pointer package, - int event_type, - int event_state, - int progress, - int error, - ffi.Pointer user_data); - -/// @brief Called to retrieve all packages. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] package_info The package information -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @see package_manager_foreach_package_info() -typedef package_manager_package_info_cb - = ffi.Pointer>; -typedef package_manager_package_info_cbFunction = ffi.Bool Function( - package_info_h package_info, ffi.Pointer user_data); -typedef Dartpackage_manager_package_info_cbFunction = bool Function( - package_info_h package_info, ffi.Pointer user_data); - -final class package_size_info extends ffi.Opaque {} - -/// @brief Called when the package size information is obtained. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] package_id The package ID -/// @param[in] size_info The pointer to the structure including the package size information -/// @param[in] user_data The user data to be passed to the callback function -typedef package_manager_size_info_receive_cb = ffi - .Pointer>; -typedef package_manager_size_info_receive_cbFunction = ffi.Void Function( - ffi.Pointer package_id, - package_size_info_h size_info, - ffi.Pointer user_data); -typedef Dartpackage_manager_size_info_receive_cbFunction = void Function( - ffi.Pointer package_id, - package_size_info_h size_info, - ffi.Pointer user_data); - -/// @brief The package size information handle. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -typedef package_size_info_h = ffi.Pointer; - -/// @platform -/// @brief Called when the total package size information is obtained. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] size_info The pointer to the structure including the package size information -/// @param[in] user_data The user data to be passed to the callback function -typedef package_manager_total_size_info_receive_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef package_manager_total_size_info_receive_cbFunction = ffi.Void Function( - package_size_info_h size_info, ffi.Pointer user_data); -typedef Dartpackage_manager_total_size_info_receive_cbFunction = void Function( - package_size_info_h size_info, ffi.Pointer user_data); - -/// @brief Package manager filter handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef package_manager_filter_h = ffi.Pointer; - -/// @platform -/// @brief Enumeration for request mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class package_manager_request_mode_e { - /// < @platform Default request mode - static const int PACKAGE_MANAGER_REQUEST_MODE_DEFAULT = 0; - - /// < @platform Quiet request mode - static const int PACKAGE_MANAGER_REQUEST_MODE_QUIET = 1; -} - -final class package_manager_request_s extends ffi.Opaque {} - -/// @platform -/// @brief The Package manager request handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef package_manager_request_h = ffi.Pointer; - -/// @platform -/// @brief Called when the progress of the request to the package manager changes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] id The ID of the request to the package manager -/// @param[in] type The type of the package to install, uninstall or update -/// @param[in] package The name of the package to install, uninstall or update -/// @param[in] event_type The type of the request to the package manager -/// @param[in] event_state The current state of the request to the package manager -/// @param[in] progress The progress for the request that is being processed by the package manager \n -/// The range of progress is from @c 0 to @c 100. -/// @param[in] error The error code when the package manager failed to process the request -/// @param[in] user_data The user data passed from package_manager_request_set_event_cb() -/// @see package_manager_request_set_event_cb() -/// @see package_manager_request_unset_event_cb() -typedef package_manager_request_event_cb - = ffi.Pointer>; -typedef package_manager_request_event_cbFunction = ffi.Void Function( - ffi.Int id, - ffi.Pointer type, - ffi.Pointer package, - ffi.Int32 event_type, - ffi.Int32 event_state, - ffi.Int progress, - ffi.Int32 error, - ffi.Pointer user_data); -typedef Dartpackage_manager_request_event_cbFunction = void Function( - int id, - ffi.Pointer type, - ffi.Pointer package, - int event_type, - int event_state, - int progress, - int error, - ffi.Pointer user_data); - -/// @brief The Package manager update info request handle. -/// @since_tizen 4.0 -typedef package_updateinfo_request_h - = ffi.Pointer; - -final class package_archive_info_s extends ffi.Opaque {} - -/// @brief The package archive information handle. -/// @since_tizen 4.0 -typedef package_archive_info_h = ffi.Pointer; - -/// @brief Enumeration for error codes of a rpc port. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -abstract class rpc_port_error_e { - /// < Successful - static const int RPC_PORT_ERROR_NONE = 0; - - /// < Internal I/O error - static const int RPC_PORT_ERROR_IO_ERROR = -5; - - /// < Out of memory - static const int RPC_PORT_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int RPC_PORT_ERROR_INVALID_PARAMETER = -22; - - /// < Permission denied - static const int RPC_PORT_ERROR_PERMISSION_DENIED = -13; -} - -/// @brief Enumeration for types of communication channels. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -abstract class rpc_port_port_type_e { - /// < Main channel - static const int RPC_PORT_PORT_MAIN = 0; - - /// < The channel for callbacks - static const int RPC_PORT_PORT_CALLBACK = 1; -} - -/// @brief The rpc port handle. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -typedef rpc_port_h = ffi.Pointer; - -/// @brief The rpc port proxy handle. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -typedef rpc_port_proxy_h = ffi.Pointer; - -/// @brief Called when the proxy is connected. -/// @details The function is called when the proxy is connected with stub by port. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @param[in] receiver The target stub app id -/// @param[in] port_name The name of the port -/// @param[in] port The rpc port handle for reading and writing -/// @param[in] user_data The user data passed from the register function -typedef rpc_port_proxy_connected_event_cb = ffi - .Pointer>; -typedef rpc_port_proxy_connected_event_cbFunction = ffi.Void Function( - ffi.Pointer receiver, - ffi.Pointer port_name, - rpc_port_h port, - ffi.Pointer user_data); -typedef Dartrpc_port_proxy_connected_event_cbFunction = void Function( - ffi.Pointer receiver, - ffi.Pointer port_name, - rpc_port_h port, - ffi.Pointer user_data); - -/// @brief Called when the proxy is disconnected. -/// @details The function is called when the proxy is disconnected from stub. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @param[in] receiver The target stub app id -/// @param[in] port_name The name of the port -/// @param[in] user_data The user data passed from the register function -typedef rpc_port_proxy_disconnected_event_cb = ffi - .Pointer>; -typedef rpc_port_proxy_disconnected_event_cbFunction = ffi.Void Function( - ffi.Pointer receiver, - ffi.Pointer port_name, - ffi.Pointer user_data); -typedef Dartrpc_port_proxy_disconnected_event_cbFunction = void Function( - ffi.Pointer receiver, - ffi.Pointer port_name, - ffi.Pointer user_data); - -/// @brief Called when the proxy is rejected. -/// @details The function is called when the proxy is rejected to connect stub. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @param[in] receiver The target stub app id -/// @param[in] port_name The name of the port -/// @param[in] user_data The user data passed from the register function -typedef rpc_port_proxy_rejected_event_cb - = ffi.Pointer>; -typedef rpc_port_proxy_rejected_event_cbFunction = ffi.Void Function( - ffi.Pointer receiver, - ffi.Pointer port_name, - ffi.Pointer user_data); -typedef Dartrpc_port_proxy_rejected_event_cbFunction = void Function( - ffi.Pointer receiver, - ffi.Pointer port_name, - ffi.Pointer user_data); - -/// @brief Called when the proxy received data. -/// @details The function is called when the proxy received data from stub. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @param[in] receiver The target stub app id -/// @param[in] port_name The name of the port -/// @param[in] user_data The user data passed from the register function -typedef rpc_port_proxy_received_event_cb - = ffi.Pointer>; -typedef rpc_port_proxy_received_event_cbFunction = ffi.Void Function( - ffi.Pointer receiver, - ffi.Pointer port_name, - ffi.Pointer user_data); -typedef Dartrpc_port_proxy_received_event_cbFunction = void Function( - ffi.Pointer receiver, - ffi.Pointer port_name, - ffi.Pointer user_data); - -/// @brief The rpc port stub handle. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -typedef rpc_port_stub_h = ffi.Pointer; - -/// @brief Called when the proxy is connected with stub. -/// @details The function is called when the proxy is connected with stub. -/// When a proxy connects to stub several times with new port, -/// you can handle each request by using @a instance. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @param[in] sender The target proxy app id -/// @param[in] instance The information of the request -/// @param[in] user_data The user data passed from the register function -typedef rpc_port_stub_connected_event_cb - = ffi.Pointer>; -typedef rpc_port_stub_connected_event_cbFunction = ffi.Void Function( - ffi.Pointer sender, - ffi.Pointer instance, - ffi.Pointer user_data); -typedef Dartrpc_port_stub_connected_event_cbFunction = void Function( - ffi.Pointer sender, - ffi.Pointer instance, - ffi.Pointer user_data); - -/// @brief Called when the proxy is disconnected from stub. -/// @details The function is called when the proxy is disconnected from stub. -/// When a proxy is disconnected, you can check the request -/// by using @a instance. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @param[in] sender The target proxy app id -/// @param[in] instance The information of the request -/// @param[in] user_data The user data passed from the register function -typedef rpc_port_stub_disconnected_event_cb = ffi - .Pointer>; -typedef rpc_port_stub_disconnected_event_cbFunction = ffi.Void Function( - ffi.Pointer sender, - ffi.Pointer instance, - ffi.Pointer user_data); -typedef Dartrpc_port_stub_disconnected_event_cbFunction = void Function( - ffi.Pointer sender, - ffi.Pointer instance, - ffi.Pointer user_data); - -/// @brief Called when the stub received data from proxy. -/// @details The function is called when the stub received data from stub. -/// When a stub received data from several ports, you can handle -/// each request by using @a instance. If the function returns non zero -/// value, the stub is disconnected. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @param[in] sender The target proxy app id -/// @param[in] instance The information of the request -/// @param[in] port The rpc port handle for reading and writing -/// @param[in] user_data The user data passed from the register function -/// @return @c zero to continue receive data with the sender, -/// otherwise @c nonzero to disconnect from the port -typedef rpc_port_stub_received_event_cb - = ffi.Pointer>; -typedef rpc_port_stub_received_event_cbFunction = ffi.Int Function( - ffi.Pointer sender, - ffi.Pointer instance, - rpc_port_h port, - ffi.Pointer user_data); -typedef Dartrpc_port_stub_received_event_cbFunction = int Function( - ffi.Pointer sender, - ffi.Pointer instance, - rpc_port_h port, - ffi.Pointer user_data); - -/// @brief The interface for converting data to/from a parcel. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -final class __rpc_port_parcelable extends ffi.Struct { - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - rpc_port_parcel_h h, ffi.Pointer data)>> to; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - rpc_port_parcel_h h, ffi.Pointer data)>> from; -} - -/// @brief The rpc port parcel handle. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -typedef rpc_port_parcel_h = ffi.Pointer; - -/// @brief The interface for converting data to/from a parcel. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -typedef rpc_port_parcelable_t = __rpc_port_parcelable; - -/// @brief The structure type containing the set of callback functions for handling application events. -/// @details It is one of the input parameters of the service_app_efl_main() function. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @see service_app_main() -/// @see service_app_create_cb() -/// @see service_app_terminate_cb() -/// @see service_app_control_cb() -final class service_app_lifecycle_callback_s extends ffi.Struct { - /// < This callback function is called at the start of the application. - external service_app_create_cb create; - - /// < This callback function is called once after the main loop of the application exits. - external service_app_terminate_cb terminate; - - /// < This callback function is called when another application sends the launch request to the application. - external service_app_control_cb app_control; -} - -/// @brief Called at the start of the agent application. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] user_data The user data passed from the callback registration function -/// @return @c true on success, -/// otherwise @c false -/// @pre service_app_main() will invoke this callback function. -/// @see service_app_main() -/// @see #service_app_lifecycle_callback_s -typedef service_app_create_cb - = ffi.Pointer>; -typedef service_app_create_cbFunction = ffi.Bool Function( - ffi.Pointer user_data); -typedef Dartservice_app_create_cbFunction = bool Function( - ffi.Pointer user_data); - -/// @brief Called once after the main loop of the agent application exits. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] user_data The user data passed from the callback registration function -/// @see service_app_main() -/// @see #service_app_lifecycle_callback_s -typedef service_app_terminate_cb - = ffi.Pointer>; -typedef service_app_terminate_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartservice_app_terminate_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Called when another application sends the launch request to the agent application. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] app_control The handle to the app_control -/// @param[in] user_data The user data passed from the callback registration function -/// @see service_app_main() -/// @see #service_app_lifecycle_callback_s -/// @see @ref CAPI_APP_CONTROL_MODULE API -typedef service_app_control_cb - = ffi.Pointer>; -typedef service_app_control_cbFunction = ffi.Void Function( - app_control_h app_control, ffi.Pointer user_data); -typedef Dartservice_app_control_cbFunction = void Function( - app_control_h app_control, ffi.Pointer user_data); - -/// @brief Enumeration for values of shortcut response types. -/// @since_tizen 2.3 -abstract class shortcut_error_e { - /// < Successful - static const int SHORTCUT_ERROR_NONE = 0; - - /// < Invalid function parameter - static const int SHORTCUT_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int SHORTCUT_ERROR_OUT_OF_MEMORY = -12; - - /// < I/O Error - static const int SHORTCUT_ERROR_IO_ERROR = -5; - - /// < Permission denied - static const int SHORTCUT_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int SHORTCUT_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Device or resource busy - static const int SHORTCUT_ERROR_RESOURCE_BUSY = -16; - - /// < There is no space to add a new shortcut - static const int SHORTCUT_ERROR_NO_SPACE = -18219007; - - /// < Shortcut is already added - static const int SHORTCUT_ERROR_EXIST = -18219006; - - /// < Unrecoverable error - static const int SHORTCUT_ERROR_FAULT = -18219004; - - /// < Not exist shortcut(@b Since: 3.0) - static const int SHORTCUT_ERROR_NOT_EXIST = -18219000; - - /// < Connection not established or communication problem - static const int SHORTCUT_ERROR_COMM = -18218944; -} - -/// @brief Enumeration for shortcut types. -/// @details Basically, two types of shortcuts are defined. -/// Every homescreen developer should support these types of shortcuts. -/// Or return, a proper errno to figure out why the application failed to add a shortcut. -/// #LAUNCH_BY_APP is used for adding a package itself as a shortcut. -/// #LAUNCH_BY_URI is used for adding a shortcut for "uri" data. -/// @since_tizen 2.3 -abstract class shortcut_type { - /// < Launch the application itself - static const int LAUNCH_BY_APP = 0; - - /// < Launch the application with the given data(URI) - static const int LAUNCH_BY_URI = 1; -} - -/// @brief Enumeration for sizes of shortcut widget. -/// @since_tizen 2.4 -abstract class shortcut_widget_size { - /// < Type mask for the normal mode widget , don't use this value for specific size. - static const int WIDGET_SIZE_DEFAULT = 268435456; - - /// < 1x1 - static const int WIDGET_SIZE_1x1 = 268500992; - - /// < 2x1 - static const int WIDGET_SIZE_2x1 = 268566528; - - /// < 2x2 - static const int WIDGET_SIZE_2x2 = 268697600; - - /// < 4x1 - static const int WIDGET_SIZE_4x1 = 268959744; - - /// < 4x2 - static const int WIDGET_SIZE_4x2 = 269484032; - - /// < 4x3 - static const int WIDGET_SIZE_4x3 = 270532608; - - /// < 4x4 - static const int WIDGET_SIZE_4x4 = 272629760; - - /// < 4x5 - static const int WIDGET_SIZE_4x5 = 285212672; - - /// < 4x6 - static const int WIDGET_SIZE_4x6 = 301989888; - - /// < Type mask for the easy mode widget, don't use this value for specific size. - static const int WIDGET_SIZE_EASY_DEFAULT = 805306368; - - /// < Easy mode 1x1 - static const int WIDGET_SIZE_EASY_1x1 = 805371904; - - /// < Easy mode 3x2 - static const int WIDGET_SIZE_EASY_3x1 = 805437440; - - /// < Easy mode 3x3 - static const int WIDGET_SIZE_EASY_3x3 = 805568512; -} - -/// @brief Called to receive the result of shortcut_add_to_home(). -/// @since_tizen 2.3 -/// @param[in] ret The result value, it could be @c 0 if it succeeds to add a shortcut, -/// otherwise it returns an errno -/// @param[in] user_data The callback data -/// @return int @c 0 if there is no error, -/// otherwise errno -/// @see shortcut_add_to_home() -typedef result_cb = ffi.Pointer>; -typedef result_cbFunction = ffi.Int Function( - ffi.Int ret, ffi.Pointer user_data); -typedef Dartresult_cbFunction = int Function( - int ret, ffi.Pointer user_data); - -/// @brief Called to receive the result of shortcut_get_list(). -/// @since_tizen 2.4 -/// @param[in] package_name The name of package -/// @param[in] icon The absolute path of an icon file for this shortcut -/// @param[in] name The name of the created shortcut icon -/// @param[in] extra_key The user data. A property of shortcut element in manifest file -/// @param[in] extra_data The user data. A property of shortcut element in manifest file -/// @param[in] user_data The callback user data -/// @return SHORTCUT_ERROR_NONE to continue with the next iteration of the loop, other error values to break out of the loop -/// @see shortcut_get_list() -typedef shortcut_list_cb - = ffi.Pointer>; -typedef shortcut_list_cbFunction = ffi.Int Function( - ffi.Pointer package_name, - ffi.Pointer icon, - ffi.Pointer name, - ffi.Pointer extra_key, - ffi.Pointer extra_data, - ffi.Pointer user_data); -typedef Dartshortcut_list_cbFunction = int Function( - ffi.Pointer package_name, - ffi.Pointer icon, - ffi.Pointer name, - ffi.Pointer extra_key, - ffi.Pointer extra_data, - ffi.Pointer user_data); - -/// @brief Called to the add_to_home request. -/// @details The homescreen should define a callback as this type and implement the service code -/// for adding a new application shortcut. -/// @since_tizen 2.4 -/// @param[in] package_name The name of package -/// @param[in] name The name of the created shortcut icon -/// @param[in] type One of the three defined types -/// @param[in] content_info The specific information for creating a new shortcut -/// @param[in] icon The absolute path of an icon file for this shortcut -/// @param[in] pid The process ID of who request add_to_home -/// @param[in] period The Update period in seconds -/// @param[in] allow_duplicate @c 1 if the shortcut can be duplicated, -/// otherwise a shourtcut should exist only once -/// @param[in] user_data The callback data -/// @return The result of handling a shortcut creation request\n -/// This returns @c 0 if the add_to_home request is handled successfully, -/// otherwise it returns a proper errno -/// @see shortcut_set_request_cb() -typedef shortcut_request_cb - = ffi.Pointer>; -typedef shortcut_request_cbFunction = ffi.Int Function( - ffi.Pointer package_name, - ffi.Pointer name, - ffi.Int type, - ffi.Pointer content_info, - ffi.Pointer icon, - ffi.Int pid, - ffi.Double period, - ffi.Int allow_duplicate, - ffi.Pointer user_data); -typedef Dartshortcut_request_cbFunction = int Function( - ffi.Pointer package_name, - ffi.Pointer name, - int type, - ffi.Pointer content_info, - ffi.Pointer icon, - int pid, - double period, - int allow_duplicate, - ffi.Pointer user_data); - -/// @brief Called to the shortcut_remove_from_home request. -/// @since_tizen 3.0 -/// @param[in] package_name The name of package -/// @param[in] name The name of the created shortcut icon -/// @param[in] sender_pid The process ID of who request shortcut_remove_from_home -/// @param[in] user_data The user data passed from the callback register function -/// @return The result of handling a shortcut remove request\n -/// This returns @c 0 if the remove_from_home request is handled successfully, -/// otherwise it returns a proper errno. -/// @see shortcut_set_remove_cb() -typedef shortcut_remove_cb - = ffi.Pointer>; -typedef shortcut_remove_cbFunction = ffi.Int Function( - ffi.Pointer package_name, - ffi.Pointer name, - ffi.Int sender_pid, - ffi.Pointer user_data); -typedef Dartshortcut_remove_cbFunction = int Function( - ffi.Pointer package_name, - ffi.Pointer name, - int sender_pid, - ffi.Pointer user_data); - -/// @brief Enumeration for error codes of URL download. -/// @since_tizen 2.3 -abstract class download_error_e { - /// < Successful - static const int DOWNLOAD_ERROR_NONE = 0; - - /// < Invalid parameter - static const int DOWNLOAD_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int DOWNLOAD_ERROR_OUT_OF_MEMORY = -12; - - /// < Network is unreachable - static const int DOWNLOAD_ERROR_NETWORK_UNREACHABLE = -101; - - /// < HTTP session time-out - static const int DOWNLOAD_ERROR_CONNECTION_TIMED_OUT = -110; - - /// < No space left on device - static const int DOWNLOAD_ERROR_NO_SPACE = -28; - - /// < Permission denied - static const int DOWNLOAD_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int DOWNLOAD_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Invalid state - static const int DOWNLOAD_ERROR_INVALID_STATE = -44040159; - - /// < Connection failed - static const int DOWNLOAD_ERROR_CONNECTION_FAILED = -44040158; - - /// < Invalid URL - static const int DOWNLOAD_ERROR_INVALID_URL = -44040156; - - /// < Invalid destination - static const int DOWNLOAD_ERROR_INVALID_DESTINATION = -44040155; - - /// < Too many simultaneous downloads - static const int DOWNLOAD_ERROR_TOO_MANY_DOWNLOADS = -44040154; - - /// < Download server queue is full - static const int DOWNLOAD_ERROR_QUEUE_FULL = -44040153; - - /// < The download is already completed - static const int DOWNLOAD_ERROR_ALREADY_COMPLETED = -44040152; - - /// < Failed to rename the downloaded file - static const int DOWNLOAD_ERROR_FILE_ALREADY_EXISTS = -44040151; - - /// < Cannot resume - static const int DOWNLOAD_ERROR_CANNOT_RESUME = -44040150; - - /// < Specified field not found - static const int DOWNLOAD_ERROR_FIELD_NOT_FOUND = -44040149; - - /// < Too many redirects from HTTP response header - static const int DOWNLOAD_ERROR_TOO_MANY_REDIRECTS = -44040144; - - /// < The download cannot handle the HTTP status value - static const int DOWNLOAD_ERROR_UNHANDLED_HTTP_CODE = -44040143; - - /// < No action after client creates a download ID - static const int DOWNLOAD_ERROR_REQUEST_TIMEOUT = -44040142; - - /// < No call to start API for some time although the download is created - static const int DOWNLOAD_ERROR_RESPONSE_TIMEOUT = -44040141; - - /// < No response from client after rebooting download daemon - static const int DOWNLOAD_ERROR_SYSTEM_DOWN = -44040140; - - /// < Download ID does not exist in download service module - static const int DOWNLOAD_ERROR_ID_NOT_FOUND = -44040139; - - /// < Network bonding is set but network type is not set as DOWNLOAD_NETWORK_ALL - static const int DOWNLOAD_ERROR_INVALID_NETWORK_TYPE = -44040138; - - /// < No data because the set API is not called - static const int DOWNLOAD_ERROR_NO_DATA = -61; - - /// < Internal I/O error - static const int DOWNLOAD_ERROR_IO_ERROR = -5; -} - -/// @brief Enumeration for download states. -/// @since_tizen 2.3 -abstract class download_state_e { - /// < Unhandled exception - static const int DOWNLOAD_STATE_NONE = 0; - - /// < Ready to download - static const int DOWNLOAD_STATE_READY = 1; - - /// < Queued to start downloading - static const int DOWNLOAD_STATE_QUEUED = 2; - - /// < Currently downloading - static const int DOWNLOAD_STATE_DOWNLOADING = 3; - - /// < The download is waiting to resume - static const int DOWNLOAD_STATE_PAUSED = 4; - - /// < The download is completed - static const int DOWNLOAD_STATE_COMPLETED = 5; - - /// < The download failed - static const int DOWNLOAD_STATE_FAILED = 6; - - /// < User canceled the download item - static const int DOWNLOAD_STATE_CANCELED = 7; -} - -/// @brief Enumeration for network type for downloading. -/// @since_tizen 2.3 -abstract class download_network_type_e { - /// < Download is available through data network - static const int DOWNLOAD_NETWORK_DATA_NETWORK = 0; - - /// < Download is available through WiFi - static const int DOWNLOAD_NETWORK_WIFI = 1; - - /// < Download is available through WiFi-Direct - static const int DOWNLOAD_NETWORK_WIFI_DIRECT = 2; - - /// < Download is available through either data network or WiFi - static const int DOWNLOAD_NETWORK_ALL = 3; -} - -/// @brief Enumeration for notification types when a client wants to register. -/// @since_tizen 2.3 -/// -/// @see download_set_notification_type() -/// @see download_get_notification_type() -abstract class download_notification_type_e { - /// < Do not register notification - static const int DOWNLOAD_NOTIFICATION_TYPE_NONE = 0; - - /// < Completion notification for success state and failed state - static const int DOWNLOAD_NOTIFICATION_TYPE_COMPLETE_ONLY = 1; - - /// < All download notifications for ongoing state, success state and failed state - static const int DOWNLOAD_NOTIFICATION_TYPE_ALL = 2; -} - -/// @brief Enumeration for the type of notification app control action which the client wants to set when registering notification. -/// @since_tizen 2.3 -/// -/// @see download_set_notification_app_control() -/// @see download_get_notification_app_control() -abstract class download_notification_app_control_type_e { - /// < App control action for failed and ongoing notification - static const int DOWNLOAD_NOTIFICATION_APP_CONTROL_TYPE_ONGOING = 0; - - /// < App control action for completed notification - static const int DOWNLOAD_NOTIFICATION_APP_CONTROL_TYPE_COMPLETE = 1; - - /// < App control action for failed notification - static const int DOWNLOAD_NOTIFICATION_APP_CONTROL_TYPE_FAILED = 2; -} - -/// @brief Called when a download state is changed. -/// -/// @since_tizen 2.3 -/// -/// @param[in] download_id The download ID -/// @param[in] state The state of download -/// @param[in] user_data The user data passed from download_set_state_changed_cb() -/// -/// @pre download_start() will invoke this callback if you register this callback using download_set_state_changed_cb(). -/// -/// @see download_set_state_changed_cb() -/// @see download_unset_state_changed_cb() -typedef download_state_changed_cb - = ffi.Pointer>; -typedef download_state_changed_cbFunction = ffi.Void Function( - ffi.Int download_id, ffi.Int32 state, ffi.Pointer user_data); -typedef Dartdownload_state_changed_cbFunction = void Function( - int download_id, int state, ffi.Pointer user_data); - -/// @brief Called when the progress of download changes. -/// -/// @since_tizen 2.3 -/// -/// @remarks This callback function is only invoked in the downloading state. -/// -/// @param[in] download_id The download ID -/// @param[in] received The size of the data received in bytes -/// @param[in] user_data The user data passed from download_set_progress_cb() -/// -/// @pre This callback function is invoked if you register this callback using download_set_progress_cb(). -/// -/// @see download_cancel() -/// @see download_set_progress_cb() -/// @see download_unset_progress_cb() -typedef download_progress_cb - = ffi.Pointer>; -typedef download_progress_cbFunction = ffi.Void Function(ffi.Int download_id, - ffi.UnsignedLongLong received, ffi.Pointer user_data); -typedef Dartdownload_progress_cbFunction = void Function( - int download_id, int received, ffi.Pointer user_data); - -/// @brief Enumeration of error code. -abstract class mime_type_error_e { - /// < Successful - static const int MIME_TYPE_ERROR_NONE = 0; - - /// < Invalid parameter - static const int MIME_TYPE_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int MIME_TYPE_ERROR_OUT_OF_MEMORY = -12; - - /// < Internal I/O error - static const int MIME_TYPE_ERROR_IO_ERROR = -5; - - /// < No access for the file (Since 4.0) - static const int MIME_TYPE_ERROR_PERMISSION_DENIED = -13; -} - -/// @ingroup CAPI_MEDIA_CONTENT_MODULE -/// @brief Enumeration for the media file format. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks Since 4.0, #MEDIA_CONTENT_TYPE_OTHERS is related to the following feature:\n -/// %http://tizen.org/feature/content.scanning.others\n -/// If this feature is not supported on the device, #MEDIA_CONTENT_TYPE_OTHERS type file is not scanned. -abstract class media_content_type_e { - /// ; - -/// @ingroup CAPI_CONTENT_MEDIA_FILTER_MODULE -/// @brief The structure type for the Media filter handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef filter_h = ffi.Pointer; - -/// @ingroup CAPI_CONTENT_MEDIA_FOLDER_MODULE -/// @brief Called for every available media folder. -/// @details Iterates over a list of folders. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks To use the @a folder outside this function, copy the handle with the media_folder_clone() function. \n -/// The callback is called in the main loop. -/// -/// @param[in] folder The handle to the media folder -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre media_folder_foreach_folder_from_db() will invoke this function. -/// @see media_folder_clone() -/// @see media_folder_foreach_folder_from_db() -typedef media_folder_cb - = ffi.Pointer>; -typedef media_folder_cbFunction = ffi.Bool Function( - media_folder_h folder, ffi.Pointer user_data); -typedef Dartmedia_folder_cbFunction = bool Function( - media_folder_h folder, ffi.Pointer user_data); - -/// @ingroup CAPI_CONTENT_MEDIA_FOLDER_MODULE -/// @brief The structure type for the Media folder handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef media_folder_h = ffi.Pointer; - -/// @ingroup CAPI_CONTENT_MEDIA_INFO_MODULE -/// @brief Called for every available media info. -/// @details Iterates over a list of media info. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks To use the @a media outside this function, copy the handle with media_info_clone() function. \n -/// The callback is called in the main loop. -/// -/// @param[in] media The handle to the media info -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre media_tag_foreach_media_from_db(), media_playlist_foreach_media_from_db(), media_genre_foreach_media_from_db(), -/// media_info_foreach_media_from_db(), media_folder_foreach_media_from_db() will invoke this function. -/// -/// @see media_info_clone() -/// @see media_album_foreach_media_from_db() -/// @see media_playlist_foreach_media_from_db() -/// @see media_tag_foreach_media_from_db() -/// @see media_info_foreach_media_from_db() -/// @see media_folder_foreach_media_from_db() -typedef media_info_cb = ffi.Pointer>; -typedef media_info_cbFunction = ffi.Bool Function( - media_info_h media, ffi.Pointer user_data); -typedef Dartmedia_info_cbFunction = bool Function( - media_info_h media, ffi.Pointer user_data); - -/// @ingroup CAPI_CONTENT_MEDIA_INFO_MODULE -/// @brief The structure type for the Media info handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef media_info_h = ffi.Pointer; - -/// @ingroup CAPI_CONTENT_MEDIA_IMAGE_MODULE -/// @brief The structure type for the Image metadata handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef image_meta_h = ffi.Pointer; - -/// @ingroup CAPI_CONTENT_MEDIA_INFO_MODULE -/// @brief Called when media items are inserted completely. -/// @details The following error codes can be received: \n -/// #MEDIA_CONTENT_ERROR_NONE : Success \n -/// #MEDIA_CONTENT_ERROR_INVALID_PARAMETER : Invalid parameter \n -/// #MEDIA_CONTENT_ERROR_INVALID_OPERATION : Invalid operation \n -/// #MEDIA_CONTENT_ERROR_PERMISSION_DENIED : Permission denied \n -/// #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY : Out of memory \n -/// #MEDIA_CONTENT_ERROR_DB_FAILED : DB Operation failed \n -/// #MEDIA_CONTENT_ERROR_DB_BUSY : DB Operation busy \n -/// #MEDIA_CONTENT_ERROR_NETWORK : Network fail \n -/// #MEDIA_CONTENT_ERROR_NOT_SUPPORTED : Not supported \n -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks The callback is called in a separate thread(not in the main loop). -/// -/// @param[in] error The error code -/// @param[in] user_data The user data passed from the foreach function -/// -/// @pre media_info_insert_batch_to_db() -/// @see media_info_insert_batch_to_db() -typedef media_insert_completed_cb - = ffi.Pointer>; -typedef media_insert_completed_cbFunction = ffi.Void Function( - ffi.Int32 error, ffi.Pointer user_data); -typedef Dartmedia_insert_completed_cbFunction = void Function( - int error, ffi.Pointer user_data); - -/// @deprecated Deprecated since 4.0. -/// @ingroup CAPI_CONTENT_MEDIA_INFO_MODULE -/// @brief Called when the burst shot is inserted completely. -/// @details The following error codes can be received: \n -/// #MEDIA_CONTENT_ERROR_NONE : Success \n -/// #MEDIA_CONTENT_ERROR_INVALID_PARAMETER : Invalid parameter \n -/// #MEDIA_CONTENT_ERROR_INVALID_OPERATION : Invalid operation \n -/// #MEDIA_CONTENT_ERROR_PERMISSION_DENIED : Permission denied \n -/// #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY : Out of memory \n -/// #MEDIA_CONTENT_ERROR_DB_FAILED : DB Operation failed \n -/// #MEDIA_CONTENT_ERROR_DB_BUSY : DB Operation busy \n -/// #MEDIA_CONTENT_ERROR_NETWORK : Network fail \n -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks The callback is called in a separate thread(not in the main loop). -/// -/// @param[in] error The error code -/// @param[in] user_data The user data passed from the foreach function -/// -/// @pre media_info_insert_burst_shot_to_db() -/// @see media_info_insert_burst_shot_to_db() -typedef media_insert_burst_shot_completed_cb = ffi - .Pointer>; -typedef media_insert_burst_shot_completed_cbFunction = ffi.Void Function( - ffi.Int32 error, ffi.Pointer user_data); -typedef Dartmedia_insert_burst_shot_completed_cbFunction = void Function( - int error, ffi.Pointer user_data); - -/// @ingroup CAPI_CONTENT_MEDIA_TAG_MODULE -/// @brief Called for every tag in the obtained list of tags. -/// @details Iterates over a list of tags. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks To use the @a tag outside this function, copy the handle with the media_tag_clone() function. \n -/// The callback is called in the main loop. -/// -/// @param[in] tag The handle to the media tag -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre media_tag_foreach_tag_from_db(), media_info_foreach_tag_from_db() will invoke this function. -/// -/// @see media_tag_clone() -/// @see media_tag_foreach_tag_from_db() -/// @see media_info_foreach_tag_from_db() -typedef media_tag_cb = ffi.Pointer>; -typedef media_tag_cbFunction = ffi.Bool Function( - media_tag_h tag, ffi.Pointer user_data); -typedef Dartmedia_tag_cbFunction = bool Function( - media_tag_h tag, ffi.Pointer user_data); - -/// @ingroup CAPI_CONTENT_MEDIA_TAG_MODULE -/// @brief The structure type for the Media tag handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef media_tag_h = ffi.Pointer; - -/// @ingroup CAPI_CONTENT_MEDIA_BOOKMARK_MODULE -/// @brief Called for every bookmark in the obtained list of bookmarks. -/// @details Iterates over a bookmark list. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks To use the @a bookmark outside this function, copy the handle with the media_bookmark_clone() function. \n -/// The callback is called in the main loop. -/// -/// @param[in] bookmark The handle to the media bookmark -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre media_info_foreach_bookmark_from_db() will invoke this function. -/// @see media_info_foreach_bookmark_from_db() -typedef media_bookmark_cb - = ffi.Pointer>; -typedef media_bookmark_cbFunction = ffi.Bool Function( - media_bookmark_h bookmark, ffi.Pointer user_data); -typedef Dartmedia_bookmark_cbFunction = bool Function( - media_bookmark_h bookmark, ffi.Pointer user_data); - -/// @ingroup CAPI_CONTENT_MEDIA_BOOKMARK_MODULE -/// @brief The structure type for the Media bookmark handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef media_bookmark_h = ffi.Pointer; - -/// @ingroup CAPI_CONTENT_MEDIA_FACE_MODULE -/// @brief Called for every face in the obtained list of face. -/// @details Iterates over a media face list. -/// -/// @since_tizen 3.0 -/// -/// @remarks You should not destroy @a face returned by this function. \n -/// The callback is called in the main loop. -/// -/// @param[in] face The handle of the media face -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre media_info_foreach_face_from_db() will invoke this function. -/// @see media_info_foreach_face_from_db() -typedef media_face_cb = ffi.Pointer>; -typedef media_face_cbFunction = ffi.Bool Function( - media_face_h face, ffi.Pointer user_data); -typedef Dartmedia_face_cbFunction = bool Function( - media_face_h face, ffi.Pointer user_data); - -/// @ingroup CAPI_CONTENT_MEDIA_FACE_MODULE -/// @brief The structure type for the Media face handle. -/// @since_tizen 3.0 -typedef media_face_h = ffi.Pointer; - -/// @ingroup CAPI_CONTENT_MEDIA_VIDEO_META_MODULE -/// @brief The structure type for the Video metadata handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef video_meta_h = ffi.Pointer; - -/// @deprecated Deprecated since 5.0. -/// @ingroup CAPI_CONTENT_MEDIA_INFO_MODULE -/// @brief Called when creating a thumbnail image. -/// @details This callback is called for completion of generating the thumbnail image. -/// The following error codes can be delivered. \n -/// #MEDIA_CONTENT_ERROR_NONE, \n -/// #MEDIA_CONTENT_ERROR_INVALID_PARAMETER, \n -/// #MEDIA_CONTENT_ERROR_INVALID_OPERATION, \n -/// #MEDIA_CONTENT_ERROR_PERMISSION_DENIED, \n -/// #MEDIA_CONTENT_ERROR_DB_FAILED, \n -/// #MEDIA_CONTENT_ERROR_UNSUPPORTED_CONTENT -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks The callback is called in a separate thread(not in the main loop). -/// -/// @param[in] error The error code -/// @param[in] path The path of the thumbnail which is generated -/// @param[in] user_data The user data passed from the foreach function -/// -/// @pre media_info_create_thumbnail() -/// @see media_info_create_thumbnail() -typedef media_thumbnail_completed_cb - = ffi.Pointer>; -typedef media_thumbnail_completed_cbFunction = ffi.Void Function( - ffi.Int32 error, - ffi.Pointer path, - ffi.Pointer user_data); -typedef Dartmedia_thumbnail_completed_cbFunction = void Function( - int error, ffi.Pointer path, ffi.Pointer user_data); - -/// @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE -/// @brief Called when face detection on the image is completed. -/// -/// @details The following error codes can be delivered. \n -/// #MEDIA_CONTENT_ERROR_NONE, \n -/// #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, \n -/// #MEDIA_CONTENT_ERROR_INVALID_OPERATION, \n -/// #MEDIA_CONTENT_ERROR_DB_FAILED, \n -/// #MEDIA_CONTENT_ERROR_DB_BUSY, \n -/// #MEDIA_CONTENT_ERROR_UNSUPPORTED_CONTENT -/// -/// @since_tizen 3.0 -/// -/// @remarks The callback is called in a separate thread(not in the main loop). -/// -/// @param[in] error The error code -/// @param[in] face_count The number of all detected faces -/// @param[in] user_data The user data passed from the foreach function -/// -/// @pre media_info_start_face_detection() -/// @see media_info_start_face_detection() -typedef media_face_detection_completed_cb = ffi - .Pointer>; -typedef media_face_detection_completed_cbFunction = ffi.Void Function( - ffi.Int32 error, ffi.Int face_count, ffi.Pointer user_data); -typedef Dartmedia_face_detection_completed_cbFunction = void Function( - int error, int face_count, ffi.Pointer user_data); - -/// @ingroup CAPI_CONTENT_MEDIA_ALBUM_MODULE -/// @brief Called for every album in the obtained list of groups. -/// @details Iterates over an album list. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks To use the @a album outside this function, copy the handle with the media_album_clone() function. \n -/// The callback is called in the main loop. -/// -/// @param[in] album The handle to the media album -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre media_album_foreach_album_from_db() will invoke this function. -/// -/// @see media_album_clone() -/// @see media_album_foreach_album_from_db() -typedef media_album_cb - = ffi.Pointer>; -typedef media_album_cbFunction = ffi.Bool Function( - media_album_h album, ffi.Pointer user_data); -typedef Dartmedia_album_cbFunction = bool Function( - media_album_h album, ffi.Pointer user_data); - -/// @ingroup CAPI_CONTENT_MEDIA_ALBUM_MODULE -/// @brief The structure type for the Media album handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef media_album_h = ffi.Pointer; - -/// @ingroup CAPI_CONTENT_MEDIA_GROUP_MODULE -/// @brief Called for every group in the obtained list of groups. -/// @details Iterates over a media group list. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks You should not free @a group_name returned by this function. \n -/// The callback is called in the main loop. -/// -/// @param[in] group_name The name of the media group -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre media_group_foreach_group_from_db() will invoke this function. -/// @see media_group_foreach_group_from_db() -typedef media_group_cb - = ffi.Pointer>; -typedef media_group_cbFunction = ffi.Bool Function( - ffi.Pointer group_name, ffi.Pointer user_data); -typedef Dartmedia_group_cbFunction = bool Function( - ffi.Pointer group_name, ffi.Pointer user_data); - -/// @ingroup CAPI_CONTENT_MEDIA_PLAYLIST_MODULE -/// @brief Called for every playlist in the obtained list of playlists. -/// @details Iterates over a playlist list. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks To use the @a playlist outside this function, copy the handle with the media_playlist_clone() function. \n -/// The callback is called in the main loop. -/// -/// @param[in] playlist The handle to the media playlist -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre media_playlist_foreach_playlist_from_db() will invoke this function. -/// -/// @see media_playlist_clone() -/// @see media_playlist_foreach_playlist_from_db() -typedef media_playlist_cb - = ffi.Pointer>; -typedef media_playlist_cbFunction = ffi.Bool Function( - media_playlist_h playlist, ffi.Pointer user_data); -typedef Dartmedia_playlist_cbFunction = bool Function( - media_playlist_h playlist, ffi.Pointer user_data); - -/// @ingroup CAPI_CONTENT_MEDIA_PLAYLIST_MODULE -/// @brief The structure type for the Media playlist handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef media_playlist_h = ffi.Pointer; - -/// @ingroup CAPI_CONTENT_MEDIA_PLAYLIST_MODULE -/// @brief Called for every media info with playlist member ID in the obtained list of media info. -/// @details Iterates over playlist members. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks To use the @a media outside this function, copy the handle with the media_info_clone() function. \n -/// The callback is called in the main loop. -/// -/// @param[in] playlist_member_id The ID of the playlist member -/// @param[in] media The handle to the media info -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre media_playlist_foreach_media_from_db() will invoke this function. -/// -/// @see media_info_clone() -/// @see media_playlist_foreach_media_from_db() -typedef playlist_member_cb - = ffi.Pointer>; -typedef playlist_member_cbFunction = ffi.Bool Function( - ffi.Int playlist_member_id, - media_info_h media, - ffi.Pointer user_data); -typedef Dartplaylist_member_cbFunction = bool Function(int playlist_member_id, - media_info_h media, ffi.Pointer user_data); - -/// @ingroup CAPI_CONTENT_MEDIA_STORAGE_MODULE -/// @deprecated Deprecated since 5.0. -/// @brief The structure type for the Media storage handle. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -typedef media_storage_h = ffi.Pointer; - -/// @ingroup CAPI_CONTENT_MEDIA_STORAGE_MODULE -/// @deprecated Deprecated since 5.0. -/// @brief Called for every storage in the obtained list of storages. -/// @details Iterates over a media storage list. -/// -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// -/// @remarks You should not destroy @a storage returned by this function. \n -/// The callback is called in the main loop. -/// -/// @param[in] storage The handle of the media storage -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre media_storage_foreach_storage_from_db() will invoke this function. -/// @see media_storage_foreach_storage_from_db() -typedef media_storage_cb - = ffi.Pointer>; -typedef media_storage_cbFunction = ffi.Bool Function( - media_storage_h storage, ffi.Pointer user_data); -typedef Dartmedia_storage_cbFunction = bool Function( - media_storage_h storage, ffi.Pointer user_data); - -/// @ingroup CAPI_MEDIA_CONTENT_MODULE -/// @brief Called when the media scanning is finished. -/// @details The following error codes can be received: \n -/// #MEDIA_CONTENT_ERROR_NONE : Success \n -/// #MEDIA_CONTENT_ERROR_INVALID_PARAMETER : Invalid parameter \n -/// #MEDIA_CONTENT_ERROR_INVALID_OPERATION : Invalid operation \n -/// #MEDIA_CONTENT_ERROR_PERMISSION_DENIED : Permission denied \n -/// #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY : Out of memory \n -/// #MEDIA_CONTENT_ERROR_DB_FAILED : DB Operation failed \n -/// #MEDIA_CONTENT_ERROR_DB_BUSY : DB Operation busy \n -/// #MEDIA_CONTENT_ERROR_NETWORK : Network fail \n -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks The callback is called in a separate thread(not in the main loop). -/// -/// @param[in] error The error code -/// @param[in] user_data The user data passed from the foreach function -/// -/// @pre media_content_scan_folder(). -/// @see media_content_scan_folder() -typedef media_scan_completed_cb - = ffi.Pointer>; -typedef media_scan_completed_cbFunction = ffi.Void Function( - ffi.Int32 error, ffi.Pointer user_data); -typedef Dartmedia_scan_completed_cbFunction = void Function( - int error, ffi.Pointer user_data); - -/// @ingroup CAPI_MEDIA_CONTENT_MODULE -/// @brief Called when the notification of the media DB change is subscribed. -/// @details The following error codes can be received: \n -/// #MEDIA_CONTENT_ERROR_NONE : Success \n -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks The callback is called in a separate thread(not in the main loop). -/// -/// @param[in] error The error code -/// @param[in] pid The PID which publishes notification -/// @param[in] update_item The update item of notification -/// @param[in] update_type The update type of notification -/// @param[in] media_type The type of the media content (#media_content_type_e) -/// @param[in] uuid The UUID of media or directory, which is updated -/// @param[in] path The path of the media or directory -/// @param[in] mime_type The MIME of the media info -/// @param[in] user_data The user data passed from the foreach function -/// -/// @pre media_content_add_db_updated_cb(). -/// @see media_content_add_db_updated_cb() -typedef media_content_db_update_cb - = ffi.Pointer>; -typedef media_content_db_update_cbFunction = ffi.Void Function( - ffi.Int32 error, - ffi.Int pid, - ffi.Int32 update_item, - ffi.Int32 update_type, - ffi.Int32 media_type, - ffi.Pointer uuid, - ffi.Pointer path, - ffi.Pointer mime_type, - ffi.Pointer user_data); -typedef Dartmedia_content_db_update_cbFunction = void Function( - int error, - int pid, - int update_item, - int update_type, - int media_type, - ffi.Pointer uuid, - ffi.Pointer path, - ffi.Pointer mime_type, - ffi.Pointer user_data); - -/// @ingroup CAPI_CONTENT_MEDIA_CONTENT_MODULE -/// @brief The structure type for the Media content noti handle. -/// @since_tizen 3.0 -typedef media_content_noti_h = ffi.Pointer; - -final class _activity_handle_s extends ffi.Opaque {} - -final class _activity_data_s extends ffi.Opaque {} - -/// @brief Enumeration for error codes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class activity_error_e { - /// < Successful - static const int ACTIVITY_ERROR_NONE = 0; - - /// < Invalid function parameter - static const int ACTIVITY_ERROR_INVALID_PARAMETER = -22; - - /// < Function not implemented - static const int ACTIVITY_ERROR_INVALID_OPERATION = -38; - - /// < Out of memory - static const int ACTIVITY_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied - static const int ACTIVITY_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int ACTIVITY_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Recognition is already started - static const int ACTIVITY_ERROR_ALREADY_STARTED = -38273023; - - /// < Recognition is not started - static const int ACTIVITY_ERROR_NOT_STARTED = -38273022; - - /// < Operation failed because of a system error - static const int ACTIVITY_ERROR_OPERATION_FAILED = -38273020; -} - -/// @brief Enumeration for activity types. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class activity_type_e { - /// < Stationary - static const int ACTIVITY_STATIONARY = 1; - - /// < Walking - static const int ACTIVITY_WALK = 2; - - /// < Running - static const int ACTIVITY_RUN = 3; - - /// < In a moving vehicle - static const int ACTIVITY_IN_VEHICLE = 4; -} - -/// @brief Enumeration for recognition accuracy. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class activity_accuracy_e { - /// < Not accurate - static const int ACTIVITY_ACCURACY_LOW = 0; - - /// < Moderate - static const int ACTIVITY_ACCURACY_MID = 1; - - /// < Highly accurate - static const int ACTIVITY_ACCURACY_HIGH = 2; -} - -/// @brief The activity recognizer controlling handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef activity_h = ffi.Pointer<_activity_handle_s>; - -/// @brief Called when a activity is recognized. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @param[in] activity Activity recognized -/// @param[in] data Detailed information of the recognized activity -/// @param[in] timestamp The time when the activity is recognized. Epoch time in seconds. -/// @param[in] error An error value. It can be one of the following error values:@n -/// #ACTIVITY_ERROR_NONE, if the operation succeeded.@n -/// #ACTIVITY_ERROR_NOT_SUPPORTED, if the activity is not supported in the current profile.@n -/// #ACTIVITY_ERROR_OPERATION_FAILED, if the operation failed because of a system error.@n -/// #ACTIVITY_ERROR_PERMISSION_DENIED, if the application has no permission to use this. -/// @param[in] user_data The user data had passed to activity_start_recognition() -/// -/// @pre activity_start_recognition() -/// @see activity_get_accuracy() -typedef activity_recognition_cb - = ffi.Pointer>; -typedef activity_recognition_cbFunction = ffi.Void Function( - ffi.Int32 activity, - activity_data_h data, - ffi.Double timestamp, - ffi.Int32 error, - ffi.Pointer user_data); -typedef Dartactivity_recognition_cbFunction = void Function( - int activity, - activity_data_h data, - double timestamp, - int error, - ffi.Pointer user_data); - -/// @brief Delivery through activity_recognition_cb() of activity data handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef activity_data_h = ffi.Pointer<_activity_data_s>; - -/// @brief Enumeration for errors. -/// @since_tizen 2.4 -abstract class context_history_error_e { - /// < Successful - static const int CONTEXT_HISTORY_ERROR_NONE = 0; - - /// < Invalid parameter - static const int CONTEXT_HISTORY_ERROR_INVALID_PARAMETER = -22; - - /// < Permission denied - static const int CONTEXT_HISTORY_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int CONTEXT_HISTORY_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Memory allocation failed - static const int CONTEXT_HISTORY_ERROR_OUT_OF_MEMORY = -12; - - /// < No Data - static const int CONTEXT_HISTORY_ERROR_NO_DATA = -61; - - /// < Out of range - static const int CONTEXT_HISTORY_ERROR_OUT_OF_RANGE = -38273021; - - /// < Operation failed - static const int CONTEXT_HISTORY_ERROR_OPERATION_FAILED = -38273020; -} - -/// @brief Enumeration for data types of statistics and patterns. -/// @since_tizen 2.4 -abstract class context_history_data_e { - /// < Recently used application @n Privilege : http://tizen.org/privilege/apphistory.read - static const int CONTEXT_HISTORY_RECENTLY_USED_APP = 1; - - /// < Frequently used application @n Privilege : http://tizen.org/privilege/apphistory.read - static const int CONTEXT_HISTORY_FREQUENTLY_USED_APP = 2; - - /// < Rarely used application (Deprecated since 4.0) - /// @n Privilege : http://tizen.org/privilege/apphistory.read - static const int CONTEXT_HISTORY_RARELY_USED_APP = 3; - - /// < Peak time of application use activity (Deprecated since 4.0) - /// @n Privilege : http://tizen.org/privilege/apphistory.read - static const int CONTEXT_HISTORY_PEAK_TIME_FOR_APP = 4; - - /// < Peak time of music listening activity (Deprecated since 4.0) - /// @n Privilege : http://tizen.org/privilege/mediahistory.read - static const int CONTEXT_HISTORY_PEAK_TIME_FOR_MUSIC = 5; - - /// < Peak time of video watching activity (Deprecated since 4.0) - /// @n Privilege : http://tizen.org/privilege/mediahistory.read - static const int CONTEXT_HISTORY_PEAK_TIME_FOR_VIDEO = 6; - - /// < Common setting value of application use activity (Deprecated since 4.0) - /// @n Privilege : http://tizen.org/privilege/apphistory.read - static const int CONTEXT_HISTORY_COMMON_SETTING_FOR_APP = 7; - - /// < Common setting value of music listening activity (Deprecated since 4.0) - /// @n Privilege : http://tizen.org/privilege/mediahistory.read - static const int CONTEXT_HISTORY_COMMON_SETTING_FOR_MUSIC = 8; - - /// < Common setting value of video watching activity (Deprecated since 4.0) - /// @n Privilege : http://tizen.org/privilege/mediahistory.read - static const int CONTEXT_HISTORY_COMMON_SETTING_FOR_VIDEO = 9; - - /// < Frequently communicated address (Deprecated since 4.0) - /// @n Privilege : http://tizen.org/privilege/callhistory.read - static const int CONTEXT_HISTORY_FREQUENTLY_COMMUNICATED_ADDRESS = 10; - - /// < Per-app battery usage in percentage (Since 3.0) - /// @n Privilege : http://tizen.org/privilege/apphistory.read - static const int CONTEXT_HISTORY_BATTERY_USAGE = 11; - - /// < Per-app battery usage in percentage since last charge (Since 3.0) - /// @n Privilege : http://tizen.org/privilege/apphistory.read - static const int CONTEXT_HISTORY_RECENT_BATTERY_USAGE = 12; -} - -/// @brief Enumeration for filters of statistics and patterns. -/// @since_tizen 2.4 -abstract class context_history_filter_e { - /// < Time span of data in days - static const int CONTEXT_HISTORY_FILTER_TIME_SPAN = 1; - - /// < Result size of data records - static const int CONTEXT_HISTORY_FILTER_RESULT_SIZE = 2; - - /// < Application id (Deprecated since 4.0) - static const int CONTEXT_HISTORY_FILTER_APP_ID = 3; - - /// < Weekdays, weekends (Deprecated since 4.0) - static const int CONTEXT_HISTORY_FILTER_DAY_OF_WEEK = 4; - - /// < Start time of data in epoch time - static const int CONTEXT_HISTORY_FILTER_START_TIME = 5; - - /// < End time of data in epoch time - static const int CONTEXT_HISTORY_FILTER_END_TIME = 6; - - /// < Wi-Fi BSSID value (Deprecated since 4.0) - static const int CONTEXT_HISTORY_FILTER_WIFI_BSSID = 7; - - /// < Audio jack status value - static const int CONTEXT_HISTORY_FILTER_AUDIO_JACK = 8; - - /// < Type of phone log (Deprecated since 4.0) - static const int CONTEXT_HISTORY_FILTER_COMMUNICATION_TYPE = 9; -} - -/// @deprecated Deprecated since 4.0. -/// @brief Enumeration for day of week filter. -/// @since_tizen 2.4 -abstract class context_history_filter_day_of_week_e { - /// < Includes only weekdays - static const int CONTEXT_HISTORY_FILTER_DAY_OF_WEEK_WEEKDAYS = 1; - - /// < Includes only weekends - static const int CONTEXT_HISTORY_FILTER_DAY_OF_WEEK_WEEKENDS = 2; - - /// < Includes all days - static const int CONTEXT_HISTORY_FILTER_DAY_OF_WEEK_ALL = 3; -} - -/// @brief Enumeration for audio jack filter. -/// @since_tizen 2.4 -abstract class context_history_filter_audio_jack_e { - /// < Audio jack is not connected - static const int CONTEXT_HISTORY_FILTER_AUDIO_JACK_NOT_CONNECTED = 0; - - /// < Audio jack is connected - static const int CONTEXT_HISTORY_FILTER_AUDIO_JACK_CONNECTED = 1; -} - -/// @deprecated Deprecated since 4.0. -/// @brief Enumeration for log type filter. -/// @since_tizen 2.4 -abstract class context_history_filter_communication_type_e { - /// < Includes only call logs - static const int CONTEXT_HISTORY_FILTER_COMMUNICATION_TYPE_CALL = 1; - - /// < Includes only message logs - static const int CONTEXT_HISTORY_FILTER_COMMUNICATION_TYPE_MESSAGE = 2; - - /// < Includes all logs - static const int CONTEXT_HISTORY_FILTER_COMMUNICATION_TYPE_ALL = 3; -} - -final class _context_history_handle_s extends ffi.Opaque {} - -final class _context_history_filter_handle_s extends ffi.Opaque {} - -final class _context_history_list_handle_s extends ffi.Opaque {} - -final class _context_history_record_handle_s extends ffi.Opaque {} - -/// @brief Retrieving statistics and patterns using context history handle. -/// @since_tizen 2.4 -typedef context_history_h = ffi.Pointer<_context_history_handle_s>; - -/// @brief Computing statistics and patterns using history filter handle. -/// @since_tizen 2.4 -typedef context_history_filter_h - = ffi.Pointer<_context_history_filter_handle_s>; - -/// @brief One or multiple records contained in history list handle. -/// @since_tizen 2.4 -typedef context_history_list_h = ffi.Pointer<_context_history_list_handle_s>; - -/// @brief One or multiple attributes contained in history list handle. -/// @since_tizen 2.4 -typedef context_history_record_h - = ffi.Pointer<_context_history_record_handle_s>; - -/// @brief Enumeration for context trigger API of error codes. -/// @since_tizen 2.4 -abstract class context_trigger_error_e { - /// < Successful - static const int CONTEXT_TRIGGER_ERROR_NONE = 0; - - /// < Invalid function parameter - static const int CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied - static const int CONTEXT_TRIGGER_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int CONTEXT_TRIGGER_ERROR_NOT_SUPPORTED = -1073741822; - - /// < No data - static const int CONTEXT_TRIGGER_ERROR_NO_DATA = -61; - - /// < Operation failed - static const int CONTEXT_TRIGGER_ERROR_OPERATION_FAILED = -38273020; - - /// < Rule is enabled - static const int CONTEXT_TRIGGER_ERROR_RULE_ENABLED = -38273019; - - /// < Rule is not enabled - static const int CONTEXT_TRIGGER_ERROR_RULE_NOT_ENABLED = -38273018; - - /// < Invalid rule - static const int CONTEXT_TRIGGER_ERROR_INVALID_RULE = -38273017; - - /// < Rule does not exist - static const int CONTEXT_TRIGGER_ERROR_RULE_NOT_EXIST = -38273016; - - /// < Data exist (Since 3.0) - static const int CONTEXT_TRIGGER_ERROR_DATA_EXIST = -38273015; - - /// < Invalid data (Since 3.0) - static const int CONTEXT_TRIGGER_ERROR_INVALID_DATA = -38273014; -} - -/// @brief Enumeration for event types. -/// @since_tizen 2.4 -abstract class context_trigger_event_e { - /// < At certain times of day and days of week (Deprecated since 4.0) - /// @n Privilege: http://tizen.org/privilege/alarm.set - static const int CONTEXT_TRIGGER_EVENT_TIME = 65537; - - /// < Battery level changed - static const int CONTEXT_TRIGGER_EVENT_BATTERY = 65792; - - /// < Charger connected/disconnected - static const int CONTEXT_TRIGGER_EVENT_CHARGER = 65793; - - /// < GPS state changed - static const int CONTEXT_TRIGGER_EVENT_GPS = 65794; - - /// < Headphone connected/disconnected - static const int CONTEXT_TRIGGER_EVENT_HEADPHONE = 65795; - - /// < USB connected/disconnected - static const int CONTEXT_TRIGGER_EVENT_USB = 65796; - - /// < WiFi state changed @n Privilege: http://tizen.org/privilege/network.get - static const int CONTEXT_TRIGGER_EVENT_WIFI = 65797; - - /// < Power saving mode enabled/disabled (Deprecated since 4.0) - static const int CONTEXT_TRIGGER_EVENT_POWER_SAVING_MODE = 66048; - - /// < Call state changed (Deprecated since 4.0) @n Privilege: http://tizen.org/privilege/telephony - static const int CONTEXT_TRIGGER_EVENT_CALL = 66304; - - /// < Email sent/received (Deprecated since 4.0) - static const int CONTEXT_TRIGGER_EVENT_EMAIL = 66305; - - /// < Message sent/received (Deprecated since 4.0) @n Privilege: http://tizen.org/privilege/message.read - static const int CONTEXT_TRIGGER_EVENT_MESSAGE = 66306; - - /// < Contacts changed (Since 3.0) @n Privilege: http://tizen.org/privilege/contact.read - static const int CONTEXT_TRIGGER_EVENT_CONTACTS = 66307; - - /// < 'Stationary' activity detected - static const int CONTEXT_TRIGGER_EVENT_ACTIVITY_STATIONARY = 66560; - - /// < 'Walking' activity detected - static const int CONTEXT_TRIGGER_EVENT_ACTIVITY_WALKING = 66561; - - /// < 'Running' activity detected - static const int CONTEXT_TRIGGER_EVENT_ACTIVITY_RUNNING = 66562; - - /// < 'In vehicle' activity detected - static const int CONTEXT_TRIGGER_EVENT_ACTIVITY_IN_VEHICLE = 66563; - - /// < Get in/out to/from a specific user place @n Privilege: http://tizen.org/privilege/location - static const int CONTEXT_TRIGGER_EVENT_PLACE = 66816; -} - -/// @brief Enumeration for condition types. -/// @since_tizen 2.4 -abstract class context_trigger_condition_e { - /// < Time of day - static const int CONTEXT_TRIGGER_CONDITION_TIME = 131073; - - /// < Battery level - static const int CONTEXT_TRIGGER_CONDITION_BATTERY = 131328; - - /// < Charger connection - static const int CONTEXT_TRIGGER_CONDITION_CHARGER = 131329; - - /// < GPS state - static const int CONTEXT_TRIGGER_CONDITION_GPS = 131330; - - /// < Headphone connection - static const int CONTEXT_TRIGGER_CONDITION_HEADPHONE = 131331; - - /// < USB connection - static const int CONTEXT_TRIGGER_CONDITION_USB = 131332; - - /// < WiFi state @n Privilege: http://tizen.org/privilege/network.get - static const int CONTEXT_TRIGGER_CONDITION_WIFI = 131333; - - /// < Power saving mode setting (Deprecated since 4.0) - static const int CONTEXT_TRIGGER_CONDITION_POWER_SAVING_MODE = 131584; - - /// < Call state (Deprecated since 4.0) @n Privilege: http://tizen.org/privilege/telephony - static const int CONTEXT_TRIGGER_CONDITION_CALL = 131840; - - /// < Frequency of app use (Deprecated since 4.0) - /// @n Privilege: http://tizen.org/privilege/apphistory.read - static const int CONTEXT_TRIGGER_CONDITION_APP_USE_FREQUENCY = 132608; - - /// < Frequency of communication via call or message (Deprecated since 4.0) - /// @n Privilege: http://tizen.org/privilege/callhistory.read - static const int CONTEXT_TRIGGER_CONDITION_COMMUNICATION_FREQUENCY = 132609; - - /// < Frequency of music playback (Deprecated since 4.0) - /// @n Privilege: http://tizen.org/privilege/mediahistory.read - static const int CONTEXT_TRIGGER_CONDITION_MUSIC_PLAYBACK_FREQUENCY = 132610; - - /// < Frequency of video playback (Deprecated since 4.0) - /// @n Privilege: http://tizen.org/privilege/mediahistory.read - static const int CONTEXT_TRIGGER_CONDITION_VIDEO_PLAYBACK_FREQUENCY = 132611; -} - -/// @brief Enumeration for logical operation types. -/// @since_tizen 2.4 -abstract class context_trigger_logical_type_e { - /// < Logical conjunction - static const int CONTEXT_TRIGGER_LOGICAL_CONJUNCTION = 1; - - /// < Logical disjunction - static const int CONTEXT_TRIGGER_LOGICAL_DISJUNCTION = 2; -} - -final class _context_trigger_rule_s extends ffi.Opaque {} - -final class _context_trigger_rule_entry_s extends ffi.Opaque {} - -/// @brief Trigger rule editing handle. -/// @since_tizen 2.4 -typedef context_trigger_rule_h = ffi.Pointer<_context_trigger_rule_s>; - -/// @brief Editing an event or a condition, which is added to a rule using handle. -/// @since_tizen 2.4 -typedef context_trigger_rule_entry_h - = ffi.Pointer<_context_trigger_rule_entry_s>; - -final class _gesture_handle_s extends ffi.Opaque {} - -final class _gesture_data_s extends ffi.Opaque {} - -/// @brief Enumeration for error codes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class gesture_error_e { - /// < Successful - static const int GESTURE_ERROR_NONE = 0; - - /// < Invalid function parameter - static const int GESTURE_ERROR_INVALID_PARAMETER = -22; - - /// < Function not implemented - static const int GESTURE_ERROR_INVALID_OPERATION = -38; - - /// < Out of memory - static const int GESTURE_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied - static const int GESTURE_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int GESTURE_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Recognition is already started - static const int GESTURE_ERROR_ALREADY_STARTED = -38273023; - - /// < Recognition is not started - static const int GESTURE_ERROR_NOT_STARTED = -38273022; - - /// < Operation failed because of a system error - static const int GESTURE_ERROR_OPERATION_FAILED = -38273020; -} - -/// @brief Enumeration for gesture types. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class gesture_type_e { - /// < The mobile device is tapped twice - static const int GESTURE_DOUBLE_TAP = 1; - - /// < The mobile device is moved near to an ear - static const int GESTURE_MOVE_TO_EAR = 2; - - /// < The mobile device is being stopped for a while - static const int GESTURE_NO_MOVE = 3; - - /// < The mobile device is picked up - static const int GESTURE_PICK_UP = 4; - - /// < The mobile device is quickly moved back and forth - static const int GESTURE_SHAKE = 5; - - /// < The mobile device is moved along an axis and back - static const int GESTURE_SNAP = 6; - - /// < The mobile device is tilted - static const int GESTURE_TILT = 7; - - /// < The mobile device is flipped from face to back - static const int GESTURE_TURN_FACE_DOWN = 8; - - /// < The wearable device is moved and faced up - static const int GESTURE_WRIST_UP = 9; -} - -/// @brief Enumeration for gesture recognition option. -/// @details If the default option is used, the system tries to reduce power consumption. -/// For example, the recognition engine may stop detecting gestures if the display is turned off. -/// Using #GESTURE_OPTION_ALWAYS_ON disables such power-saving functionalities. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class gesture_option_e { - /// < Running in the default setting - static const int GESTURE_OPTION_DEFAULT = 0; - - /// < Trying to detect gestures always - static const int GESTURE_OPTION_ALWAYS_ON = 1; -} - -/// @brief Enumeration for gesture event types. -/// @details With regards to type of the gesture, gesture_get_event() returns one of the followings. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class gesture_event_e { - /// < Detected nothing - static const int GESTURE_EVENT_NONE = 0; - - /// < Detected the gesture - static const int GESTURE_EVENT_DETECTED = 1; - - /// < Shake gesture started - static const int GESTURE_SHAKE_DETECTED = 1; - - /// < Shake gesture stopped - static const int GESTURE_SHAKE_FINISHED = 2; - - /// < Detected -X snap - static const int GESTURE_SNAP_X_NEGATIVE = 1; - - /// < Detected +X snap - static const int GESTURE_SNAP_X_POSITIVE = 2; - - /// < Detected -Y snap - static const int GESTURE_SNAP_Y_NEGATIVE = 3; - - /// < Detected +Y snap - static const int GESTURE_SNAP_Y_POSITIVE = 4; - - /// < Detected -Z snap - static const int GESTURE_SNAP_Z_NEGATIVE = 5; - - /// < Detected +Z snap - static const int GESTURE_SNAP_Z_POSITIVE = 6; -} - -/// @brief The gesture recognizer controlling handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef gesture_h = ffi.Pointer<_gesture_handle_s>; - -/// @brief Called when a gesture is detected. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @param[in] gesture Gesture type detected -/// @param[in] data Detailed information of the detected gesture.@n -/// gesture_get_event() or gesture_get_tilt() -/// can be used to extract the information from @c data. -/// @param[in] timestamp The time when the gesture is detected. Epoch time in seconds. -/// @param[in] error An error value. It can be one of the following error values:@n -/// #GESTURE_ERROR_NONE, if the operation succeeded.@n -/// #GESTURE_ERROR_NOT_SUPPORTED, if the gesture is not supported in the current profile.@n -/// #GESTURE_ERROR_OPERATION_FAILED, if the operation failed because of a system error.@n -/// #GESTURE_ERROR_PERMISSION_DENIED, if the application has no permission to use this. -/// @param[in] user_data The user data had passed to gesture_start_recognition() -/// -/// @pre gesture_start_recognition() -typedef gesture_recognition_cb - = ffi.Pointer>; -typedef gesture_recognition_cbFunction = ffi.Void Function( - ffi.Int32 gesture, - gesture_data_h data, - ffi.Double timestamp, - ffi.Int32 error, - ffi.Pointer user_data); -typedef Dartgesture_recognition_cbFunction = void Function( - int gesture, - gesture_data_h data, - double timestamp, - int error, - ffi.Pointer user_data); - -/// @brief Delivery through gesture_recognition_cb() of gesture data handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef gesture_data_h = ffi.Pointer<_gesture_data_s>; - -/// @brief Enumeration for Geofence manager of error code. -/// @since_tizen 2.4 -abstract class geofence_manager_error_e { - /// < Success - static const int GEOFENCE_MANAGER_ERROR_NONE = 0; - - /// < Out of memory - static const int GEOFENCE_MANAGER_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER = -22; - - /// < Permission denied - static const int GEOFENCE_MANAGER_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int GEOFENCE_MANAGER_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Geofence Manager is not initialized - static const int GEOFENCE_MANAGER_ERROR_NOT_INITIALIZED = -46202879; - - /// < Invalid geofence ID - static const int GEOFENCE_MANAGER_ERROR_INVALID_ID = -46202878; - - /// < Exception occurs - static const int GEOFENCE_MANAGER_ERROR_EXCEPTION = -46202877; - - /// < Geofencing is already started - static const int GEOFENCE_MANAGER_ERROR_ALREADY_STARTED = -46202876; - - /// < Too many geofence - static const int GEOFENCE_MANAGER_ERROR_TOO_MANY_GEOFENCE = -46202875; - - /// < Error in GPS, Wi-Fi, or BT - static const int GEOFENCE_MANAGER_ERROR_IPC = -46202874; - - /// < DB error in the server side - static const int GEOFENCE_MANAGER_ERROR_DATABASE = -46202873; - - /// < Access to specified place is denied - static const int GEOFENCE_MANAGER_ERROR_PLACE_ACCESS_DENIED = -46202872; - - /// < Access to specified geofence is denied - static const int GEOFENCE_MANAGER_ERROR_GEOFENCE_ACCESS_DENIED = -46202871; -} - -/// @brief Enumeration for the state of geofence manager. -/// @since_tizen 2.4 -abstract class geofence_state_e { - /// < Uncertain state of geofence - static const int GEOFENCE_STATE_UNCERTAIN = 0; - - /// < Geofence In state - static const int GEOFENCE_STATE_IN = 1; - - /// < Geofence Out state - static const int GEOFENCE_STATE_OUT = 2; -} - -/// @brief Enumeration for the state of proximity. -/// @since_tizen 3.0 -abstract class geofence_proximity_state_e { - /// < Uncertain state of proximity - static const int GEOFENCE_PROXIMITY_STATE_UNCERTAIN = 0; - - /// < Far state of proximity - static const int GEOFENCE_PROXIMITY_STATE_FAR = 1; - - /// < Near state of proximity - static const int GEOFENCE_PROXIMITY_STATE_NEAR = 2; - - /// < Immediate state of proximity - static const int GEOFENCE_PROXIMITY_STATE_IMMEDIATE = 3; -} - -/// @brief Enumeration for the provider of proximity. -/// @since_tizen 3.0 -abstract class geofence_proximity_provider_e { - /// < Proximity is specified by geospatial coordinate - static const int GEOFENCE_PROXIMITY_PROVIDER_LOCATION = 0; - - /// < Proximity is specified by Wi-Fi access point - static const int GEOFENCE_PROXIMITY_PROVIDER_WIFI = 1; - - /// < Proximity is specified by Bluetooth device - static const int GEOFENCE_PROXIMITY_PROVIDER_BLUETOOTH = 2; - - /// < Proximity is specified by Bluetooth low energy device - static const int GEOFENCE_PROXIMITY_PROVIDER_BLE = 3; - - /// < Proximity is specified by Sensor - static const int GEOFENCE_PROXIMITY_PROVIDER_SENSOR = 4; -} - -/// @brief Enumeration for geofence type. -/// @since_tizen 2.4 -abstract class geofence_type_e { - /// < Geofence is specified by geospatial coordinate - static const int GEOFENCE_TYPE_GEOPOINT = 1; - - /// < Geofence is specified by Wi-Fi access point - static const int GEOFENCE_TYPE_WIFI = 2; - - /// < Geofence is specified by Bluetooth device - static const int GEOFENCE_TYPE_BT = 3; -} - -/// @brief Enumeration for geofence management events. -/// @since_tizen 2.4 -abstract class geofence_manage_e { - /// < Geofence is added - static const int GEOFENCE_MANAGE_FENCE_ADDED = 0; - - /// < Geofence is removed - static const int GEOFENCE_MANAGE_FENCE_REMOVED = 1; - - /// < Geofencing is started - static const int GEOFENCE_MANAGE_FENCE_STARTED = 2; - - /// < Geofencing is stopped - static const int GEOFENCE_MANAGE_FENCE_STOPPED = 3; - - /// < Place is added - static const int GEOFENCE_MANAGE_PLACE_ADDED = 16; - - /// < Place is removed - static const int GEOFENCE_MANAGE_PLACE_REMOVED = 17; - - /// < Place is updated - static const int GEOFENCE_MANAGE_PLACE_UPDATED = 18; - - /// < Setting for geofencing is enabled - static const int GEOFENCE_MANAGE_SETTING_ENABLED = 32; - - /// < Setting for geofencing is disabled - static const int GEOFENCE_MANAGE_SETTING_DISABLED = 33; -} - -final class geofence_manager_s extends ffi.Opaque {} - -final class geofence_s extends ffi.Opaque {} - -final class geofence_status_s extends ffi.Opaque {} - -/// @brief The geofence manager handle. -/// @since_tizen 2.4 -typedef geofence_manager_h = ffi.Pointer; - -/// @brief The geofence handle. -/// @since_tizen 2.4 -typedef geofence_h = ffi.Pointer; - -/// @brief Called when a device enters or exits the given geofence. -/// @since_tizen 2.4 -/// @param[in] geofence_id The specified geofence ID -/// @param[in] state The geofence state -/// @param[in] user_data The user data passed from callback registration function -/// @pre geofence_manager_start() will invoke this callback if you register this callback using geofence_manager_set_geofence_state_changed_cb(). -/// @see geofence_state_e -/// @see geofence_manager_start() -/// @see geofence_manager_set_geofence_state_changed_cb() -typedef geofence_state_changed_cb - = ffi.Pointer>; -typedef geofence_state_changed_cbFunction = ffi.Void Function( - ffi.Int geofence_id, ffi.Int32 state, ffi.Pointer user_data); -typedef Dartgeofence_state_changed_cbFunction = void Function( - int geofence_id, int state, ffi.Pointer user_data); - -/// @brief Called when the some event occurs in geofence and place such as add, update, etc.. -/// @details The events of public geofence is also received if there are public geofences. -/// @since_tizen 2.4 -/// @remarks The value of place_id or geofence_id is -1 when the place ID or geofence ID is not assigned. -/// @param[in] place_id The place ID -/// @param[in] geofence_id The specified geofence ID -/// @param[in] error The error code for the particular action -/// @param[in] manage The result code for the particular place and geofence management -/// @param[in] user_data The user data passed from callback registration function -/// @pre geofence_manager_start() will invoke this callback if you register this callback using geofence_manager_set_geofence_event_cb() -/// @see geofence_manage_e -/// @see geofence_manager_start() -/// @see geofence_manager_set_geofence_event_cb() -typedef geofence_event_cb - = ffi.Pointer>; -typedef geofence_event_cbFunction = ffi.Void Function( - ffi.Int place_id, - ffi.Int geofence_id, - ffi.Int32 error, - ffi.Int32 manage, - ffi.Pointer user_data); -typedef Dartgeofence_event_cbFunction = void Function(int place_id, - int geofence_id, int error, int manage, ffi.Pointer user_data); - -/// @brief Called when a proximity state of device is changed. -/// @since_tizen 3.0 -/// @param[in] geofence_id The specified geofence ID -/// @param[in] state The proximity state -/// @param[in] provider The proximity provider -/// @param[in] user_data The user data passed from callback registration function -/// @pre geofence_manager_start() will invoke this callback if you register this callback using geofence_manager_set_geofence_proximity_state_changed_cb(). -/// @see geofence_proximity_state_e -/// @see geofence_proximity_provider_e -/// @see geofence_manager_start() -/// @see geofence_manager_set_geofence_proximity_state_changed_cb() -typedef geofence_proximity_state_changed_cb = ffi - .Pointer>; -typedef geofence_proximity_state_changed_cbFunction = ffi.Void Function( - ffi.Int geofence_id, - ffi.Int32 state, - ffi.Int32 provider, - ffi.Pointer user_data); -typedef Dartgeofence_proximity_state_changed_cbFunction = void Function( - int geofence_id, int state, int provider, ffi.Pointer user_data); - -/// @brief Called when the fence list is requested. -/// @since_tizen 2.4 -/// @param[in] geofence_id The geofence ID -/// @param[in] fence The fence handle -/// @param[in] fence_index The index number of the fences in the list -/// @param[in] fence_cnt The total number of fences that exists for the requester -/// @param[in] user_data The user data passed from callback registration function -/// @return @c true to continue iterating, -/// otherwise @c false -/// @pre geofence_manager_foreach_geofence_list() and geofence_manager_foreach_place_geofence_list() will invoke this callback if you specify this callback using geofence_manager_foreach_geofence_list(). -/// @see geofence_manager_foreach_geofence_list() -/// @see geofence_manager_foreach_place_geofence_list() -/// @see geofence_manager_add_fence() -typedef geofence_manager_fence_cb - = ffi.Pointer>; -typedef geofence_manager_fence_cbFunction = ffi.Bool Function( - ffi.Int geofence_id, - geofence_h fence, - ffi.Int fence_index, - ffi.Int fence_cnt, - ffi.Pointer user_data); -typedef Dartgeofence_manager_fence_cbFunction = bool Function( - int geofence_id, - geofence_h fence, - int fence_index, - int fence_cnt, - ffi.Pointer user_data); - -/// @brief Called when the place list is requested. -/// @since_tizen 2.4 -/// @param[in] place_id The current place ID -/// @param[in] place_name The current place name -/// @param[in] place_index The index number of the places in the list -/// @param[in] place_cnt The total number of places that exists for the requester -/// @param[in] user_data The user data passed from callback registration function -/// @return @c true to continue iterating, -/// otherwise @c false -/// @pre geofence_manager_foreach_place_list() will invoke this callback if you specify this callback using geofence_manager_foreach_place_list(). -/// @see geofence_manager_foreach_place_list() -/// @see geofence_manager_add_place() -typedef geofence_manager_place_cb - = ffi.Pointer>; -typedef geofence_manager_place_cbFunction = ffi.Bool Function( - ffi.Int place_id, - ffi.Pointer place_name, - ffi.Int place_index, - ffi.Int place_cnt, - ffi.Pointer user_data); -typedef Dartgeofence_manager_place_cbFunction = bool Function( - int place_id, - ffi.Pointer place_name, - int place_index, - int place_cnt, - ffi.Pointer user_data); - -/// @brief The geofence status handle. -/// @since_tizen 2.4 -typedef geofence_status_h = ffi.Pointer; - -/// @brief The structure type to represent coordinates with latitude and longitude. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -final class location_coords_s extends ffi.Struct { - /// < The latitude [-90.0 ~ 90.0] (degrees) - @ffi.Double() - external double latitude; - - /// < The longitude [-180.0 ~ 180.0] (degrees) - @ffi.Double() - external double longitude; -} - -/// @brief Enumeration for error code for Location manager. -abstract class location_bound_error_e { - /// < Successful - static const int LOCATION_BOUNDS_ERROR_NONE = 0; - - /// < Out of memory - static const int LOCATION_BOUNDS_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int LOCATION_BOUNDS_ERROR_INVALID_PARAMETER = -22; - - /// < Not supported - static const int LOCATION_BOUNDS_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Incorrect bounds type for a given call - static const int LOCATION_BOUNDS_ERROR_INCORRECT_TYPE = -46137311; - - /// < Cannot remove bounds handle from location manager - static const int LOCATION_BOUNDS_ERROR_IS_ADDED = -46137310; -} - -/// @brief Enumeration for Location boundary type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class location_bounds_type_e { - /// < Rectangular geographical area type. - static const int LOCATION_BOUNDS_RECT = 1; - - /// < Circle geographical area type.. - static const int LOCATION_BOUNDS_CIRCLE = 2; - - /// < Polygon geographical area type.. - static const int LOCATION_BOUNDS_POLYGON = 3; -} - -/// @brief Enumeration for the boundary state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class location_boundary_state_e { - /// < Boundary In (Zone In) - static const int LOCATIONS_BOUNDARY_IN = 0; - - /// < Boundary Out (Zone Out) - static const int LOCATIONS_BOUNDARY_OUT = 1; -} - -final class location_bounds_s extends ffi.Opaque {} - -/// @brief The location boundary handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef location_bounds_h = ffi.Pointer; - -/// @brief Gets called iteratively to notify you of coordinates of a polygon. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] coords The coordinates -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n -/// @c false to break out of the loop -/// @pre location_bounds_foreach_polygon_coords() will invoke this callback. -/// @see location_bounds_foreach_polygon_coords() -typedef polygon_coords_cb - = ffi.Pointer>; -typedef polygon_coords_cbFunction = ffi.Bool Function( - location_coords_s coords, ffi.Pointer user_data); -typedef Dartpolygon_coords_cbFunction = bool Function( - location_coords_s coords, ffi.Pointer user_data); - -/// @brief Called when the given boundary is entered or exited. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] state The boundary state -/// @pre location_manager_start() will invoke this callback if you register this callback using location_bounds_set_state_changed_cb(). -/// @see #location_boundary_state_e -/// @see location_manager_start() -/// @see location_bounds_set_state_changed_cb() -typedef location_bounds_state_changed_cb - = ffi.Pointer>; -typedef location_bounds_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 state, ffi.Pointer user_data); -typedef Dartlocation_bounds_state_changed_cbFunction = void Function( - int state, ffi.Pointer user_data); - -/// @brief Enumeration for error code for Location manager. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class location_error_e { - /// < Successful - static const int LOCATIONS_ERROR_NONE = 0; - - /// < Out of memory - static const int LOCATIONS_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int LOCATIONS_ERROR_INVALID_PARAMETER = -22; - - /// < Permission denied - static const int LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED = -13; - - /// < Not supported - static const int LOCATIONS_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Location manager contains incorrect method for a given call - static const int LOCATIONS_ERROR_INCORRECT_METHOD = -46137343; - - /// < Network unavailable - static const int LOCATIONS_ERROR_NETWORK_FAILED = -46137342; - - /// < Location service is not available - static const int LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE = -46137341; - - /// < Setting for GPS, WPS, or MOCK is turned off - static const int LOCATIONS_ERROR_GPS_SETTING_OFF = -46137340; - - /// < Restricted by security system policy - static const int LOCATIONS_ERROR_SECURITY_RESTRICTED = -46137339; - - /// < Setting for GPS, WPS, or MOCK is turned off (Since 3.0) - static const int LOCATIONS_ERROR_SETTING_OFF = -46137340; -} - -/// @brief Enumeration for Location method type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class location_method_e { - /// < Undefined method - static const int LOCATIONS_METHOD_NONE = -1; - - /// < This method selects the best method available at the moment - static const int LOCATIONS_METHOD_HYBRID = 0; - - /// < This method uses Global Positioning System - static const int LOCATIONS_METHOD_GPS = 1; - - /// < This method uses WiFi Positioning System - static const int LOCATIONS_METHOD_WPS = 2; - - /// < This method can be used to passively receive location updates without power consumption (Since 3.0) - static const int LOCATIONS_METHOD_PASSIVE = 3; - - /// < This method uses Fused location (Since 4.0) - static const int LOCATIONS_METHOD_FUSED = 4; -} - -/// @brief Enumeration for Approximate accuracy level of given information. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class location_accuracy_level_e { - /// < Invalid data - static const int LOCATIONS_ACCURACY_NONE = 0; - - /// < Country accuracy level - static const int LOCATIONS_ACCURACY_COUNTRY = 1; - - /// < Regional accuracy level - static const int LOCATIONS_ACCURACY_REGION = 2; - - /// < Local accuracy level - static const int LOCATIONS_ACCURACY_LOCALITY = 3; - - /// < Postal accuracy level - static const int LOCATIONS_ACCURACY_POSTALCODE = 4; - - /// < Street accuracy level - static const int LOCATIONS_ACCURACY_STREET = 5; - - /// < Detailed accuracy level - static const int LOCATIONS_ACCURACY_DETAILED = 6; -} - -/// @brief Enumeration for the state of the location service. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class location_service_state_e { - /// < Service is disabled - static const int LOCATIONS_SERVICE_DISABLED = 0; - - /// < Service is enabled - static const int LOCATIONS_SERVICE_ENABLED = 1; -} - -/// @deprecated Deprecated since 3.0 -/// @brief Enumeration for the location service accessibility state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class location_accessibility_state_e { - /// < Access state is not determined - static const int LOCATIONS_ACCESS_STATE_NONE = 0; - - /// < Access denied - static const int LOCATIONS_ACCESS_STATE_DENIED = 1; - - /// < Access authorized - static const int LOCATIONS_ACCESS_STATE_ALLOWED = 2; -} - -/// @brief Enumeration for the fused location service. -/// @since_tizen 4.0 -abstract class location_fused_mode_e { - /// < High accuracy - static const int LOCATIONS_FUSED_HIGH_ACCURACY = 0; - - /// < Balanced power - static const int LOCATIONS_FUSED_BALANCED_POWER = 1; -} - -final class location_manager_s extends ffi.Opaque {} - -/// @brief The location manager handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef location_manager_h = ffi.Pointer; - -/// @brief Called at defined interval with updated location information. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] error #LOCATIONS_ERROR_NONE Successful -/// @param[in] latitude The updated latitude [-90.0 ~ 90.0] (degrees) -/// @param[in] longitude The updated longitude [-180.0 ~ 180.0] (degrees) -/// @param[in] altitude The updated altitude (meters) -/// @param[in] timestamp The timestamp (time when measurement took place or @c 0 if valid) -/// @param[in] speed The updated speed (km/h) -/// @param[in] direction The updated direction (in degrees from the north) -/// @param[in] climb The updated climb (km/h) -/// @param[in] user_data The user data passed from the callback registration function -/// @pre location_manager_request_single_location() will invoke this callback. -/// @see location_manager_request_single_location() -typedef location_updated_cb - = ffi.Pointer>; -typedef location_updated_cbFunction = ffi.Void Function( - ffi.Int32 error, - ffi.Double latitude, - ffi.Double longitude, - ffi.Double altitude, - time_t timestamp, - ffi.Double speed, - ffi.Double direction, - ffi.Double climb, - ffi.Pointer user_data); -typedef Dartlocation_updated_cbFunction = void Function( - int error, - double latitude, - double longitude, - double altitude, - Dart__time_t timestamp, - double speed, - double direction, - double climb, - ffi.Pointer user_data); - -/// @brief Called once for each location bound. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] bounds The location bounds handle -/// @param[in] user_data The user data passed from the callback registration function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @pre location_manager_foreach_boundary() will invoke this callback. -/// @see location_manager_foreach_boundary() -typedef location_bounds_cb - = ffi.Pointer>; -typedef location_bounds_cbFunction = ffi.Bool Function( - location_bounds_h bounds, ffi.Pointer user_data); -typedef Dartlocation_bounds_cbFunction = bool Function( - location_bounds_h bounds, ffi.Pointer user_data); - -/// @brief Called at defined interval with updated position information. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] latitude The updated latitude [-90.0 ~ 90.0] (degrees) -/// @param[in] longitude The updated longitude [-180.0 ~ 180.0] (degrees) -/// @param[in] altitude The updated altitude (meters) -/// @param[in] timestamp The timestamp (time when measurement took place or @c 0 if valid) -/// @param[in] user_data The user data passed from the call registration function -/// @pre location_manager_start() will invoke this callback if you register this callback using location_manager_set_position_updated_cb(). -/// @see location_manager_start() -/// @see location_manager_set_position_updated_cb() -typedef location_position_updated_cb - = ffi.Pointer>; -typedef location_position_updated_cbFunction = ffi.Void Function( - ffi.Double latitude, - ffi.Double longitude, - ffi.Double altitude, - time_t timestamp, - ffi.Pointer user_data); -typedef Dartlocation_position_updated_cbFunction = void Function( - double latitude, - double longitude, - double altitude, - Dart__time_t timestamp, - ffi.Pointer user_data); - -/// @brief Called at defined interval with updated velocity information. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] speed The updated speed (km/h) -/// @param[in] direction The updated direction (in degrees from the north) -/// @param[in] climb The updated climb (km/h) -/// @param[in] timestamp The timestamp (time when measurement took place or @c 0 if valid) -/// @param[in] user_data The user data passed from the callback registration function -/// @pre location_manager_start() will invoke this callback if you register this callback using location_manager_set_velocity_updated_cb(). -/// @see location_manager_start() -/// @see location_manager_set_velocity_updated_cb() -typedef location_velocity_updated_cb - = ffi.Pointer>; -typedef location_velocity_updated_cbFunction = ffi.Void Function( - ffi.Double speed, - ffi.Double direction, - ffi.Double climb, - time_t timestamp, - ffi.Pointer user_data); -typedef Dartlocation_velocity_updated_cbFunction = void Function( - double speed, - double direction, - double climb, - Dart__time_t timestamp, - ffi.Pointer user_data); - -/// @brief Called when the state of location service is changed from enabled to disabled or vice versa. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] state The service state -/// @param[in] user_data The user data passed from the callback registration function -/// @pre Either location_manager_start() or location_manager_stop() will invoke this callback if you register this callback using location_manager_set_service_state_changed_cb(). -/// @see location_manager_start() -/// @see location_manager_stop() -/// @see location_manager_set_service_state_changed_cb() -/// @see #location_service_state_e -typedef location_service_state_changed_cb = ffi - .Pointer>; -typedef location_service_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 state, ffi.Pointer user_data); -typedef Dartlocation_service_state_changed_cbFunction = void Function( - int state, ffi.Pointer user_data); - -/// @brief Called when the user-defined zones are entered or exited. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] state The boundary state -/// @param[in] latitude The updated latitude [-90.0 ~ 90.0] (degrees) -/// @param[in] longitude The updated longitude [-180.0 ~ 180.0] (degrees) -/// @param[in] altitude The updated altitude (meters) -/// @param[in] timestamp The timestamp (time when measurement took place or @c 0 if valid) -/// @param[in] user_data The user data passed from the callback registration function -/// @pre location_manager_start() will invoke this callback if you register this callback using location_manager_set_zone_changed_cb(). -/// @see #location_boundary_state_e -/// @see location_manager_start() -/// @see location_manager_set_zone_changed_cb() -typedef location_zone_changed_cb - = ffi.Pointer>; -typedef location_zone_changed_cbFunction = ffi.Void Function( - ffi.Int32 state, - ffi.Double latitude, - ffi.Double longitude, - ffi.Double altitude, - time_t timestamp, - ffi.Pointer user_data); -typedef Dartlocation_zone_changed_cbFunction = void Function( - int state, - double latitude, - double longitude, - double altitude, - Dart__time_t timestamp, - ffi.Pointer user_data); - -/// @brief Called when the state of location method is changed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] method The method changed on setting -/// @param[in] enable The setting value changed -/// @param[in] user_data The user data passed from the callback registration function -/// @pre location_setting_changed_cb() will invoke this callback if you register this callback using location_manager_set_setting_changed_cb(). -/// @see location_manager_set_setting_changed_cb() -/// @see location_manager_unset_setting_changed_cb() -typedef location_setting_changed_cb - = ffi.Pointer>; -typedef location_setting_changed_cbFunction = ffi.Void Function( - ffi.Int32 method, ffi.Bool enable, ffi.Pointer user_data); -typedef Dartlocation_setting_changed_cbFunction = void Function( - int method, bool enable, ffi.Pointer user_data); - -/// @brief Called at defined interval with updated location information. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] latitude The updated latitude [-90.0 ~ 90.0] (degrees) -/// @param[in] longitude The updated longitude [-180.0 ~ 180.0] (degrees) -/// @param[in] altitude The updated altitude (meters) -/// @param[in] speed The updated speed (km/h) -/// @param[in] direction The updated direction (in degrees from the north) -/// @param[in] horizontal_accuracy The horizontal accuracy (meters) -/// @param[in] timestamp The timestamp (time when measurement took place or @c 0 if valid) -/// @param[in] user_data The user data passed from the callback registration function -/// @pre location_manager_start() will invoke this callback if you register this callback using location_manager_set_position_updated_cb(). -/// @see location_manager_start() -/// @see location_manager_set_distance_based_location_changed_cb() -/// @see location_manager_set_location_changed_cb() -typedef location_changed_cb - = ffi.Pointer>; -typedef location_changed_cbFunction = ffi.Void Function( - ffi.Double latitude, - ffi.Double longitude, - ffi.Double altitude, - ffi.Double speed, - ffi.Double direction, - ffi.Double horizontal_accuracy, - time_t timestamp, - ffi.Pointer user_data); -typedef Dartlocation_changed_cbFunction = void Function( - double latitude, - double longitude, - double altitude, - double speed, - double direction, - double horizontal_accuracy, - Dart__time_t timestamp, - ffi.Pointer user_data); - -/// @brief Called when the batch interval is expired. -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -/// @param[in] num_of_location The number of location batch data -/// @param[in] user_data The user data passed from the callback registration function -/// @pre location_manager_start_batch() will invoke this callback if you register this callback using location_manager_set_location_batch_cb(). -/// @see location_manager_start_batch() -/// @see location_manager_set_location_batch_cb() -typedef location_batch_cb - = ffi.Pointer>; -typedef location_batch_cbFunction = ffi.Void Function( - ffi.Int num_of_location, ffi.Pointer user_data); -typedef Dartlocation_batch_cbFunction = void Function( - int num_of_location, ffi.Pointer user_data); - -/// @brief Gets iteratively to receive location batch data. -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -/// @param[in] latitude The updated latitude [-90.0 ~ 90.0] (degrees) -/// @param[in] longitude The updated longitude [-180.0 ~ 180.0] (degrees) -/// @param[in] altitude The updated altitude (meters) -/// @param[in] speed The updated speed (km/h) -/// @param[in] direction The updated direction (in degrees from the north) -/// @param[in] horizontal The horizontal accuracy (meters) -/// @param[in] vertical The vertical accuracy (meters) -/// @param[in] timestamp The timestamp (time when measurement took place or @c 0 if valid) -/// @param[in] user_data The user data passed from the callback registration function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @pre location_manager_foreach_location_batch() will invoke this callback. -/// @see location_manager_foreach_location_batch() -typedef location_batch_get_location_cb - = ffi.Pointer>; -typedef location_batch_get_location_cbFunction = ffi.Bool Function( - ffi.Double latitude, - ffi.Double longitude, - ffi.Double altitude, - ffi.Double speed, - ffi.Double direction, - ffi.Double horizontal, - ffi.Double vertical, - time_t timestamp, - ffi.Pointer user_data); -typedef Dartlocation_batch_get_location_cbFunction = bool Function( - double latitude, - double longitude, - double altitude, - double speed, - double direction, - double horizontal, - double vertical, - Dart__time_t timestamp, - ffi.Pointer user_data); - -/// @brief Called at defined interval with updated satellite information. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[out] num_of_active The last number of active satellites -/// @param[out] num_of_inview The last number of satellites in view -/// @param[out] timestamp The last timestamp (time when measurement took place or @c 0 if valid) -/// @param[in] user_data The user data passed from the call registration function -/// @pre location_manager_start() will invoke this callback if you register this callback using location_manager_set_position_updated_cb(). -/// @see location_manager_start() -/// @see location_manager_set_position_updated_cb() -typedef gps_status_satellite_updated_cb - = ffi.Pointer>; -typedef gps_status_satellite_updated_cbFunction = ffi.Void Function( - ffi.Int num_of_active, - ffi.Int num_of_inview, - time_t timestamp, - ffi.Pointer user_data); -typedef Dartgps_status_satellite_updated_cbFunction = void Function( - int num_of_active, - int num_of_inview, - Dart__time_t timestamp, - ffi.Pointer user_data); - -/// @brief Called once for each satellite in range. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] azimuth The azimuth of the satellite (degrees) -/// @param[in] elevation The elevation of the satellite (meters) -/// @param[in] prn The PRN of the satellite -/// @param[in] snr The SNR of the satellite [dB] -/// @param[in] is_active The flag signaling if satellite is in use -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n -/// @c false to break out of the loop -/// @pre gps_status_foreach_satellites_in_view() will invoke this callback. -/// @pre gps_status_foreach_last_satellites_in_view() will invoke this callback. -/// @see gps_status_foreach_satellites_in_view() -typedef gps_status_get_satellites_cb - = ffi.Pointer>; -typedef gps_status_get_satellites_cbFunction = ffi.Bool Function( - ffi.UnsignedInt azimuth, - ffi.UnsignedInt elevation, - ffi.UnsignedInt prn, - ffi.Int snr, - ffi.Bool is_active, - ffi.Pointer user_data); -typedef Dartgps_status_get_satellites_cbFunction = bool Function( - int azimuth, - int elevation, - int prn, - int snr, - bool is_active, - ffi.Pointer user_data); - -final class email_s extends ffi.Opaque {} - -/// @brief Enumeration for the result values of email transport. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class email_sending_e { - /// < Email sending failed - static const int EMAIL_SENDING_FAILED = -1; - - /// < Email sending succeeded - static const int EMAIL_SENDING_SUCCEEDED = 0; -} - -/// @brief Enumeration for the email recipient types. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class email_recipient_type_e { - /// < Normal recipient - static const int EMAIL_RECIPIENT_TYPE_TO = 1; - - /// < CC(carbon copy) recipient - static const int EMAIL_RECIPIENT_TYPE_CC = 2; - - /// < BCC(blind carbon copy) recipient - static const int EMAIL_RECIPIENT_TYPE_BCC = 3; -} - -/// @brief Enumeration for error codes for email API. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class email_error_e { - /// < Successful - static const int EMAILS_ERROR_NONE = 0; - - /// < Memory cannot be allocated - static const int EMAILS_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int EMAILS_ERROR_INVALID_PARAMETER = -22; - - /// < Server not ready - static const int EMAILS_ERROR_SERVER_NOT_READY = -24116736; - - /// < Communication with server failed - static const int EMAILS_ERROR_COMMUNICATION_WITH_SERVER_FAILED = -24116735; - - /// < Operation failed - static const int EMAILS_ERROR_OPERATION_FAILED = -24116734; - - /// < Email account not found - static const int EMAILS_ERROR_ACCOUNT_NOT_FOUND = -24116733; - - /// < Email database failed - static const int EMAILS_ERROR_DB_FAILED = -24116732; - - /// < Permission denied - static const int EMAILS_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported (Since 3.0) - static const int EMAILS_ERROR_NOT_SUPPORTED = -1073741822; -} - -/// @brief The email message handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -typedef email_h = ffi.Pointer; - -/// @brief Called when the process of sending an email finishes. -/// @details You can check whether sending an email succeeds using this function. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -/// @param[in] email The handle to the email message -/// @param[in] result The result of email message sending \n -/// #EMAIL_SENDING_FAILED or #EMAIL_SENDING_SUCCEEDED -/// @param[in] user_data The user data passed from the callback registration function -/// @pre email_send_message() will invoke this callback if you register this callback using email_set_message_sent_cb(). -/// @see email_send_message() -/// @see email_set_message_sent_cb() -/// @see email_unset_message_sent_cb() -typedef email_message_sent_cb - = ffi.Pointer>; -typedef email_message_sent_cbFunction = ffi.Void Function( - email_h email, ffi.Int32 result, ffi.Pointer user_data); -typedef Dartemail_message_sent_cbFunction = void Function( - email_h email, int result, ffi.Pointer user_data); - -/// @brief Enumerations of error codes for push API. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class push_service_error_e { - /// < Successful - static const int PUSH_SERVICE_ERROR_NONE = 0; - - /// < Out of memory - static const int PUSH_SERVICE_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int PUSH_SERVICE_ERROR_INVALID_PARAMETER = -22; - - /// < Not connected - static const int PUSH_SERVICE_ERROR_NOT_CONNECTED = -29425664; - - /// < No data available - static const int PUSH_SERVICE_ERROR_NO_DATA = -61; - - /// < Internal operation failed - static const int PUSH_SERVICE_ERROR_OPERATION_FAILED = -1073741824; - - /// < No privilege to access the push service - static const int PUSH_SERVICE_ERROR_PERMISSION_DENIED = -13; - - /// < Push service not supported - static const int PUSH_SERVICE_ERROR_NOT_SUPPORTED = -1073741822; -} - -/// @brief Enumeration of registration states. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class push_service_state_e { - /// < Registered - static const int PUSH_SERVICE_STATE_REGISTERED = 0; - - /// < Unregistered - static const int PUSH_SERVICE_STATE_UNREGISTERED = 1; - - /// < To change the provisioning server IP - static const int PUSH_SERVICE_STATE_PROVISIONING_IPCHANGE = 2; - - /// < Ping interval is changing - static const int PUSH_SERVICE_STATE_PING_CHANGE = 3; - - /// < Error - static const int PUSH_SERVICE_STATE_ERROR = 4; -} - -/// @brief Enumeration of result. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class push_service_result_e { - /// < Successful - static const int PUSH_SERVICE_RESULT_SUCCESS = 0; - - /// < Request timed out - static const int PUSH_SERVICE_RESULT_TIMEOUT = 1; - - /// < Push server error - static const int PUSH_SERVICE_RESULT_SERVER_ERROR = 2; - - /// < System error - static const int PUSH_SERVICE_RESULT_SYSTEM_ERROR = 3; -} - -final class push_connection_s extends ffi.Opaque {} - -final class push_notification_s extends ffi.Opaque {} - -/// @brief Called when the registration state is refreshed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks This callback will be invoked when the registration state is refreshed. \n -/// If the registration or deregistration has succeeded, then this state callback must be called. \n -/// In addition, the state can be changed if the push server deregisters the application. -/// @param[in] state The registration state -/// @param[in] err The error message -/// @param[in] user_data The user data passed to this callback -/// @see push_service_connect() -typedef push_service_state_cb - = ffi.Pointer>; -typedef push_service_state_cbFunction = ffi.Void Function(ffi.Int32 state, - ffi.Pointer err, ffi.Pointer user_data); -typedef Dartpush_service_state_cbFunction = void Function( - int state, ffi.Pointer err, ffi.Pointer user_data); - -/// @brief Called to handle a notification. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] notification A handle of the notification containing its payload\n -/// The handle is available inside this callback only. -/// @param[in] user_data The user data passed to this callback -/// @see push_service_connect() -/// @see push_service_get_notification_data() -typedef push_service_notify_cb - = ffi.Pointer>; -typedef push_service_notify_cbFunction = ffi.Void Function( - push_service_notification_h noti, ffi.Pointer user_data); -typedef Dartpush_service_notify_cbFunction = void Function( - push_service_notification_h noti, ffi.Pointer user_data); - -/// @brief Notification delivered from the push server handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef push_service_notification_h = ffi.Pointer; - -/// @brief Connection to the push service handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef push_service_connection_h = ffi.Pointer; - -/// @brief Called with the result of a registration/deregistration. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] result The registration/deregistration result -/// @param[in] msg The result message from the push server, -/// otherwise @c NULL -/// @param[in] user_data The user data passed to this callback -/// @see push_service_register() -/// @see push_service_deregister() -typedef push_service_result_cb - = ffi.Pointer>; -typedef push_service_result_cbFunction = ffi.Void Function(ffi.Int32 result, - ffi.Pointer msg, ffi.Pointer user_data); -typedef Dartpush_service_result_cbFunction = void Function( - int result, ffi.Pointer msg, ffi.Pointer user_data); - -/// @brief Enumeration for sound manager's error codes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sound_manager_error_e { - /// < Successful - static const int SOUND_MANAGER_ERROR_NONE = 0; - - /// < Out of memory - static const int SOUND_MANAGER_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int SOUND_MANAGER_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid operation - static const int SOUND_MANAGER_ERROR_INVALID_OPERATION = -38; - - /// < Permission denied - static const int SOUND_MANAGER_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int SOUND_MANAGER_ERROR_NOT_SUPPORTED = -1073741822; - - /// < No data - static const int SOUND_MANAGER_ERROR_NO_DATA = -61; - - /// < Internal error inside the sound system - static const int SOUND_MANAGER_ERROR_INTERNAL = -26607615; - - /// < Noncompliance with the sound system policy - static const int SOUND_MANAGER_ERROR_POLICY = -26607614; - - /// < No playing sound - static const int SOUND_MANAGER_ERROR_NO_PLAYING_SOUND = -26607613; - - /// < Invalid state (Since 3.0) - static const int SOUND_MANAGER_ERROR_INVALID_STATE = -26607612; -} - -/// @brief Enumeration for sound type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sound_type_e { - /// < Sound type for system - static const int SOUND_TYPE_SYSTEM = 0; - - /// < Sound type for notifications - static const int SOUND_TYPE_NOTIFICATION = 1; - - /// < Sound type for alarm - static const int SOUND_TYPE_ALARM = 2; - - /// < Sound type for ringtones (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int SOUND_TYPE_RINGTONE = 3; - - /// < Sound type for media - static const int SOUND_TYPE_MEDIA = 4; - - /// < Sound type for call (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int SOUND_TYPE_CALL = 5; - - /// < Sound type for voip (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int SOUND_TYPE_VOIP = 6; - - /// < Sound type for voice - static const int SOUND_TYPE_VOICE = 7; -} - -final class sound_stream_info_s extends ffi.Opaque {} - -/// @brief Enumeration for sound stream type. -/// @since_tizen 3.0 -abstract class sound_stream_type_e { - /// < Sound stream type for media - static const int SOUND_STREAM_TYPE_MEDIA = 0; - - /// < Sound stream type for system - static const int SOUND_STREAM_TYPE_SYSTEM = 1; - - /// < Sound stream type for alarm - static const int SOUND_STREAM_TYPE_ALARM = 2; - - /// < Sound stream type for notification - static const int SOUND_STREAM_TYPE_NOTIFICATION = 3; - - /// < Sound stream type for emergency - static const int SOUND_STREAM_TYPE_EMERGENCY = 4; - - /// < Sound stream type for voice information - static const int SOUND_STREAM_TYPE_VOICE_INFORMATION = 5; - - /// < Sound stream type for voice recognition - static const int SOUND_STREAM_TYPE_VOICE_RECOGNITION = 6; - - /// < Sound stream type for ringtone for VoIP - static const int SOUND_STREAM_TYPE_RINGTONE_VOIP = 7; - - /// < Sound stream type for VoIP - static const int SOUND_STREAM_TYPE_VOIP = 8; - - /// < Sound stream type for media only for external devices - static const int SOUND_STREAM_TYPE_MEDIA_EXTERNAL_ONLY = 9; -} - -/// @brief Enumeration for change reason of sound stream focus state. -/// @since_tizen 3.0 -abstract class sound_stream_focus_change_reason_e { - /// < Changed by the stream type for media - static const int SOUND_STREAM_FOCUS_CHANGED_BY_MEDIA = 0; - - /// < Changed by the stream type for system - static const int SOUND_STREAM_FOCUS_CHANGED_BY_SYSTEM = 1; - - /// < Changed by the stream type for alarm - static const int SOUND_STREAM_FOCUS_CHANGED_BY_ALARM = 2; - - /// < Changed by the stream type for notification - static const int SOUND_STREAM_FOCUS_CHANGED_BY_NOTIFICATION = 3; - - /// < Changed by the stream type for emergency - static const int SOUND_STREAM_FOCUS_CHANGED_BY_EMERGENCY = 4; - - /// < Changed by the stream type for voice information - static const int SOUND_STREAM_FOCUS_CHANGED_BY_VOICE_INFORMATION = 5; - - /// < Changed by the stream type for voice recognition - static const int SOUND_STREAM_FOCUS_CHANGED_BY_VOICE_RECOGNITION = 6; - - /// < Changed by the stream type for ringtone - static const int SOUND_STREAM_FOCUS_CHANGED_BY_RINGTONE = 7; - - /// < Changed by the stream type for VoIP - static const int SOUND_STREAM_FOCUS_CHANGED_BY_VOIP = 8; - - /// < Changed by the stream type for voice-call or video-call - static const int SOUND_STREAM_FOCUS_CHANGED_BY_CALL = 9; - - /// < Changed by the stream type for media only for external devices - static const int SOUND_STREAM_FOCUS_CHANGED_BY_MEDIA_EXTERNAL_ONLY = 10; -} - -/// @brief Enumeration for sound stream focus mask. -/// @since_tizen 3.0 -abstract class sound_stream_focus_mask_e { - /// < Mask for playback focus - static const int SOUND_STREAM_FOCUS_FOR_PLAYBACK = 1; - - /// < Mask for recording focus - static const int SOUND_STREAM_FOCUS_FOR_RECORDING = 2; - - /// < Mask for both playback and recording focus - static const int SOUND_STREAM_FOCUS_FOR_BOTH = 3; -} - -/// @brief Enumeration for sound stream focus state. -/// @since_tizen 3.0 -abstract class sound_stream_focus_state_e { - /// < Focus state for release - static const int SOUND_STREAM_FOCUS_STATE_RELEASED = 0; - - /// < Focus state for acquisition - static const int SOUND_STREAM_FOCUS_STATE_ACQUIRED = 1; -} - -/// @brief Enumeration for sound behavior. -/// @since_tizen 3.0 -/// @remarks These values can be combined with bitwise 'or'. -/// @see sound_manager_get_current_playback_focus() -/// @see sound_manager_get_current_recording_focus() -abstract class sound_behavior_e { - /// < None (default) - static const int SOUND_BEHAVIOR_NONE = 0; - - /// < No resumption - static const int SOUND_BEHAVIOR_NO_RESUME = 1; - - /// < Fading effect - static const int SOUND_BEHAVIOR_FADING = 2; -} - -/// @brief Enumeration for sound device type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sound_device_type_e { - /// < Built-in speaker - static const int SOUND_DEVICE_BUILTIN_SPEAKER = 0; - - /// < Built-in receiver - static const int SOUND_DEVICE_BUILTIN_RECEIVER = 1; - - /// < Built-in mic - static const int SOUND_DEVICE_BUILTIN_MIC = 2; - - /// < Audio jack that can be connected to wired accessory such as headphone, headset, and so on - static const int SOUND_DEVICE_AUDIO_JACK = 3; - - /// < Bluetooth device representing media (A2DP) profile (Since 3.0) - static const int SOUND_DEVICE_BLUETOOTH_MEDIA = 4; - - /// < HDMI - static const int SOUND_DEVICE_HDMI = 5; - - /// < Device for forwarding (Since 3.0) - static const int SOUND_DEVICE_FORWARDING = 6; - - /// < USB Audio - static const int SOUND_DEVICE_USB_AUDIO = 7; - - /// < Bluetooth device representing voice (SCO) profile (Since 3.0) - static const int SOUND_DEVICE_BLUETOOTH_VOICE = 8; -} - -/// @brief Enumeration for sound device direction. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sound_device_io_direction_e { - /// < Input device - static const int SOUND_DEVICE_IO_DIRECTION_IN = 0; - - /// < Output device - static const int SOUND_DEVICE_IO_DIRECTION_OUT = 1; - - /// < Input/output device (both directions are available) - static const int SOUND_DEVICE_IO_DIRECTION_BOTH = 2; -} - -/// @deprecated Deprecated since 4.0. -/// @brief Enumeration for sound device state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sound_device_state_e { - /// < Deactivated state - static const int SOUND_DEVICE_STATE_DEACTIVATED = 0; - - /// < Activated state - static const int SOUND_DEVICE_STATE_ACTIVATED = 1; -} - -/// @brief Enumeration for sound device mask. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sound_device_mask_e { - /// < Mask for input devices - static const int SOUND_DEVICE_IO_DIRECTION_IN_MASK = 1; - - /// < Mask for output devices - static const int SOUND_DEVICE_IO_DIRECTION_OUT_MASK = 2; - - /// < Mask for input/output devices (both directions are available) - static const int SOUND_DEVICE_IO_DIRECTION_BOTH_MASK = 4; - - /// < Mask for built-in devices - static const int SOUND_DEVICE_TYPE_INTERNAL_MASK = 16; - - /// < Mask for external devices - static const int SOUND_DEVICE_TYPE_EXTERNAL_MASK = 32; - - /// < Mask for deactivated devices (Deprecated since 4.0) - static const int SOUND_DEVICE_STATE_DEACTIVATED_MASK = 4096; - - /// < Mask for activated devices (Deprecated since 4.0) - static const int SOUND_DEVICE_STATE_ACTIVATED_MASK = 8192; - - /// < Mask for all devices - static const int SOUND_DEVICE_ALL_MASK = 65535; -} - -/// @brief Enumeration for sound sample format. -/// @since_tizen 5.0 -abstract class sound_sample_format_e { - /// < Unsigned 8 bit samples - static const int SOUND_SAMPLE_FORMAT_U8 = 0; - - /// < Signed 16 bit samples - static const int SOUND_SAMPLE_FORMAT_S16_LE = 1; - - /// < Signed 24 bit samples - static const int SOUND_SAMPLE_FORMAT_S24_LE = 2; - - /// < Signed 24 bit(packed in 32 bit) samples - static const int SOUND_SAMPLE_FORMAT_S24_32_LE = 3; -} - -/// @brief Enumeration for sound sample rate. -/// @since_tizen 5.0 -abstract class sound_sample_rate_e { - /// < 8000 Hz sample rate - static const int SOUND_SAMPLE_RATE_8000 = 0; - - /// < 16000 Hz sample rate - static const int SOUND_SAMPLE_RATE_16000 = 1; - - /// < 22050 Hz sample rate - static const int SOUND_SAMPLE_RATE_22050 = 2; - - /// < 44100 Hz sample rate - static const int SOUND_SAMPLE_RATE_44100 = 3; - - /// < 48000 Hz sample rate - static const int SOUND_SAMPLE_RATE_48000 = 4; - - /// < 88200 Hz sample rate - static const int SOUND_SAMPLE_RATE_88200 = 5; - - /// < 96000 Hz sample rate - static const int SOUND_SAMPLE_RATE_96000 = 6; - - /// < 192000 Hz sample rate - static const int SOUND_SAMPLE_RATE_192000 = 7; -} - -/// @brief Called when the system volume has changed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] type The sound type of the changed volume -/// @param[in] volume The new volume value -/// @param[in] user_data The user data passed from the callback registration function -/// @pre sound_manager_set_volume() will invoke this callback if you register it using sound_manager_add_volume_changed_cb(). -/// @see sound_manager_add_volume_changed_cb() -/// @see sound_manager_remove_volume_changed_cb() -typedef sound_manager_volume_changed_cb - = ffi.Pointer>; -typedef sound_manager_volume_changed_cbFunction = ffi.Void Function( - ffi.Int32 type, ffi.UnsignedInt volume, ffi.Pointer user_data); -typedef Dartsound_manager_volume_changed_cbFunction = void Function( - int type, int volume, ffi.Pointer user_data); - -/// @brief Called when the state of focus that belongs to the stream_info is changed. -/// @since_tizen 3.0 -/// -/// @remarks This function is issued in the internal thread of the sound manager.\n -/// Therefore it is recommended not to call UI update function in this function. -/// -/// @param[in] stream_info The handle of stream information -/// @param[in] focus_mask The changed focus mask -/// @param[in] focus_state The changed focus state -/// @param[in] reason The reason for state change of the focus -/// @param[in] sound_behavior The requested sound behavior that should be followed, values of #sound_behavior_e combined with bitwise 'or' -/// @param[in] extra_info The extra information -/// @param[in] user_data The user data passed from the callback registration function -/// @pre You should register this callback using sound_manager_create_stream_information(). -/// @see sound_manager_create_stream_information() -/// @see sound_manager_destroy_stream_information() -/// @see sound_manager_get_focus_state() -typedef sound_stream_focus_state_changed_cb = ffi - .Pointer>; -typedef sound_stream_focus_state_changed_cbFunction = ffi.Void Function( - sound_stream_info_h stream_info, - ffi.Int32 focus_mask, - ffi.Int32 focus_state, - ffi.Int32 reason, - ffi.Int sound_behavior, - ffi.Pointer extra_info, - ffi.Pointer user_data); -typedef Dartsound_stream_focus_state_changed_cbFunction = void Function( - sound_stream_info_h stream_info, - int focus_mask, - int focus_state, - int reason, - int sound_behavior, - ffi.Pointer extra_info, - ffi.Pointer user_data); - -/// @brief Sound stream information handle. -/// @since_tizen 3.0 -typedef sound_stream_info_h = ffi.Pointer; - -/// @brief Sound device handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef sound_device_h = ffi.Pointer; - -/// @brief Called when the focus state for each sound stream type is changed regardless of the process. -/// @since_tizen 3.0 -/// -/// @remarks This function is invoked by the internal thread of the sound manager.\n -/// Therefore it is recommended not to call functions which update the UI from this callback. -/// -/// @param[in] id The focus state change watch cb id -/// @param[in] focus_mask The changed focus mask -/// @param[in] focus_state The changed focus state -/// @param[in] reason The reason for state change of the focus -/// @param[in] extra_info The extra information -/// @param[in] user_data The user data passed from the callback registration function -/// @pre You should register this callback using sound_manager_add_focus_state_watch_cb(). -/// @see sound_manager_add_focus_state_watch_cb() -/// @see sound_manager_remove_focus_state_watch_cb() -typedef sound_stream_focus_state_watch_cb = ffi - .Pointer>; -typedef sound_stream_focus_state_watch_cbFunction = ffi.Void Function( - ffi.Int id, - ffi.Int32 focus_mask, - ffi.Int32 focus_state, - ffi.Int32 reason, - ffi.Pointer extra_info, - ffi.Pointer user_data); -typedef Dartsound_stream_focus_state_watch_cbFunction = void Function( - int id, - int focus_mask, - int focus_state, - int reason, - ffi.Pointer extra_info, - ffi.Pointer user_data); - -/// @brief Sound device list handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef sound_device_list_h = ffi.Pointer; - -/// @brief Called when the connection state of a sound device was changed. -/// @since_tizen 3.0 -/// -/// @remarks @a device is freed by the platform after this callback exits. -/// -/// @param[in] device The sound_device -/// @param[in] is_connected The state of device connection: (@c true = connected, @c false = disconnected) -/// @param[in] user_data The user data passed from the callback registration function -/// @pre You should add this callback using sound_manager_add_device_connection_changed_cb(). -/// @see sound_manager_add_device_connection_changed_cb() -/// @see sound_manager_remove_device_connection_changed_cb() -typedef sound_device_connection_changed_cb = ffi - .Pointer>; -typedef sound_device_connection_changed_cbFunction = ffi.Void Function( - sound_device_h device, - ffi.Bool is_connected, - ffi.Pointer user_data); -typedef Dartsound_device_connection_changed_cbFunction = void Function( - sound_device_h device, bool is_connected, ffi.Pointer user_data); - -/// @brief Called when the state of a sound device was changed. -/// @since_tizen 5.0 -/// -/// @remarks @a device is freed by the platform after this callback exits. -/// -/// @param[in] device The sound_device -/// @param[in] is_running The state of the device: (@c true = running, @c false = not running) -/// @param[in] user_data The user data passed from the callback registration function -/// @pre You should add this callback using sound_manager_add_device_running_changed_cb(). -/// @see sound_manager_add_device_running_changed_cb() -/// @see sound_manager_remove_device_running_changed_cb() -typedef sound_device_running_changed_cb - = ffi.Pointer>; -typedef sound_device_running_changed_cbFunction = ffi.Void Function( - sound_device_h device, - ffi.Bool is_running, - ffi.Pointer user_data); -typedef Dartsound_device_running_changed_cbFunction = void Function( - sound_device_h device, bool is_running, ffi.Pointer user_data); - -/// @deprecated Deprecated since 4.0. Use sound_device_running_changed_cb() instead. -/// @brief Called when the state of a sound device was changed. -/// @since_tizen 3.0 -/// -/// @remarks @a device is freed by the platform after this callback exits. -/// -/// @param[in] device The sound_device -/// @param[in] state The state of the device -/// @param[in] user_data The user data passed from the callback registration function -/// @pre You should add this callback using sound_manager_add_device_state_changed_cb(). -/// @see sound_manager_add_device_state_changed_cb() -/// @see sound_manager_remove_device_state_changed_cb() -typedef sound_device_state_changed_cb - = ffi.Pointer>; -typedef sound_device_state_changed_cbFunction = ffi.Void Function( - sound_device_h device, ffi.Int32 state, ffi.Pointer user_data); -typedef Dartsound_device_state_changed_cbFunction = void Function( - sound_device_h device, int state, ffi.Pointer user_data); - -final class audio_io_s extends ffi.Opaque {} - -/// @brief Enumeration for audio sample type with bit depth. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class audio_sample_type_e { - /// < Unsigned 8-bit audio samples - static const int AUDIO_SAMPLE_TYPE_U8 = 112; - - /// < Signed 16-bit audio samples - static const int AUDIO_SAMPLE_TYPE_S16_LE = 113; - - /// < Signed 24-bit audio samples (Since 5.0) - static const int AUDIO_SAMPLE_TYPE_S24_LE = 114; - - /// < Signed 24-bit (packed in 32-bit) audio samples (Since 5.0) - static const int AUDIO_SAMPLE_TYPE_S24_32_LE = 115; -} - -/// @brief Enumeration for audio channel. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class audio_channel_e { - /// < 1 channel, mono - static const int AUDIO_CHANNEL_MONO = 128; - - /// < 2 channel, stereo - static const int AUDIO_CHANNEL_STEREO = 129; -} - -/// @brief Enumeration for audio input and output state. -/// @since_tizen 3.0 -abstract class audio_io_state_e { - /// < Audio-io handle is created, but not prepared - static const int AUDIO_IO_STATE_IDLE = 0; - - /// < Audio-io handle is ready and the stream is running - static const int AUDIO_IO_STATE_RUNNING = 1; - - /// < Audio-io handle is ready and the stream is paused - static const int AUDIO_IO_STATE_PAUSED = 2; -} - -/// @brief Enumeration for audio input and output error. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class audio_io_error_e { - /// < Successful - static const int AUDIO_IO_ERROR_NONE = 0; - - /// < Out of memory - static const int AUDIO_IO_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int AUDIO_IO_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid operation - static const int AUDIO_IO_ERROR_INVALID_OPERATION = -38; - - /// < Device open error by security - static const int AUDIO_IO_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int AUDIO_IO_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Device policy restriction (Since 3.0) - static const int AUDIO_IO_ERROR_DEVICE_POLICY_RESTRICTION = -1073741820; - - /// < Device open error - static const int AUDIO_IO_ERROR_DEVICE_NOT_OPENED = -26214399; - - /// < Device close error - static const int AUDIO_IO_ERROR_DEVICE_NOT_CLOSED = -26214398; - - /// < Invalid buffer pointer - static const int AUDIO_IO_ERROR_INVALID_BUFFER = -26214397; - - /// < Sound policy error - static const int AUDIO_IO_ERROR_SOUND_POLICY = -26214396; - - /// < Invalid state (Since 3.0) - static const int AUDIO_IO_ERROR_INVALID_STATE = -26214395; - - /// < Not supported stream type (Since 3.0) - static const int AUDIO_IO_ERROR_NOT_SUPPORTED_TYPE = -26214394; -} - -/// @brief The audio input handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef audio_in_h = ffi.Pointer; - -/// @brief Called when audio input data is available in asynchronous(event) mode. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks @a use audio_in_peek() to get audio in data inside callback, use audio_in_drop() after use of peeked data. -/// -/// @param[in] handle The handle to the audio input -/// @param[in] nbytes The amount of available audio in data which can be peeked. -/// @param[in] user_data The user data passed from the callback registration function -/// -/// @see audio_in_set_stream_cb() -typedef audio_in_stream_cb - = ffi.Pointer>; -typedef audio_in_stream_cbFunction = ffi.Void Function( - audio_in_h handle, ffi.Size nbytes, ffi.Pointer user_data); -typedef Dartaudio_in_stream_cbFunction = void Function( - audio_in_h handle, int nbytes, ffi.Pointer user_data); - -/// @brief Called when the state of audio input is changed. -/// -/// @since_tizen 3.0 -/// -/// @param[in] handle The handle of the audio input -/// @param[in] previous The previous state of the audio input -/// @param[in] current The current state of the audio input -/// @param[in] by_policy @c true if the state is changed by policy, otherwise @c false if the state is not changed by policy -/// @param[in] user_data The user data passed from the callback registration function -/// -/// @see audio_in_set_state_changed_cb() -/// @see audio_in_unset_state_changed_cb() -typedef audio_in_state_changed_cb - = ffi.Pointer>; -typedef audio_in_state_changed_cbFunction = ffi.Void Function( - audio_in_h handle, - ffi.Int32 previous, - ffi.Int32 current, - ffi.Bool by_policy, - ffi.Pointer user_data); -typedef Dartaudio_in_state_changed_cbFunction = void Function(audio_in_h handle, - int previous, int current, bool by_policy, ffi.Pointer user_data); - -/// @brief The audio output handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef audio_out_h = ffi.Pointer; - -/// @brief Called when audio out data can be written in asynchronous(event) mode. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks @a use audio_out_write() to write pcm data inside this callback. -/// @param[in] handle The handle to the audio output -/// @param[in] nbytes The amount of audio in data which can be written. -/// @param[in] user_data The user data passed from the callback registration function -/// -/// @see audio_out_set_stream_cb() -typedef audio_out_stream_cb - = ffi.Pointer>; -typedef audio_out_stream_cbFunction = ffi.Void Function( - audio_out_h handle, ffi.Size nbytes, ffi.Pointer user_data); -typedef Dartaudio_out_stream_cbFunction = void Function( - audio_out_h handle, int nbytes, ffi.Pointer user_data); - -/// @brief Called when the state of audio output is changed. -/// -/// @since_tizen 3.0 -/// -/// @param[in] handle The handle of the audio output -/// @param[in] previous The previous state of the audio output -/// @param[in] current The current state of the audio output -/// @param[in] by_policy @c true if the state is changed by policy, otherwise @c false if the state is not changed by policy -/// @param[in] user_data The user data passed from the callback registration function -/// -/// @see audio_out_set_state_changed_cb() -/// @see audio_out_unset_state_changed_cb() -typedef audio_out_state_changed_cb - = ffi.Pointer>; -typedef audio_out_state_changed_cbFunction = ffi.Void Function( - audio_out_h handle, - ffi.Int32 previous, - ffi.Int32 current, - ffi.Bool by_policy, - ffi.Pointer user_data); -typedef Dartaudio_out_state_changed_cbFunction = void Function( - audio_out_h handle, - int previous, - int current, - bool by_policy, - ffi.Pointer user_data); - -final class media_format_s extends ffi.Opaque {} - -/// @brief Enumerations of media format error. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class media_format_error_e { - /// < Successful - static const int MEDIA_FORMAT_ERROR_NONE = 0; - - /// < Out of memory - static const int MEDIA_FORMAT_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int MEDIA_FORMAT_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid operation - static const int MEDIA_FORMAT_ERROR_INVALID_OPERATION = -38; - - /// < No space left on device - static const int MEDIA_FORMAT_ERROR_FILE_NO_SPACE_ON_DEVICE = -28; -} - -/// @brief Enumeration for media format type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class media_format_type_e { - /// < media format type is NONE - static const int MEDIA_FORMAT_NONE = 0; - - /// < media format type is AUDIO - static const int MEDIA_FORMAT_AUDIO = 16777216; - - /// < media format type is VIDEO - static const int MEDIA_FORMAT_VIDEO = 33554432; - - /// < media format type is TEXT - static const int MEDIA_FORMAT_TEXT = 50331648; - - /// < media format type is CONTAINER - static const int MEDIA_FORMAT_CONTAINER = 67108864; - - /// < media format type is UNKNOWN - static const int MEDIA_FORMAT_UNKNOWN = 134217728; -} - -/// @brief Enumeration for media format data type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class media_format_data_type_e { - /// < media format data type is encoded type - static const int MEDIA_FORMAT_ENCODED = 268435456; - - /// < media format data type is raw type - static const int MEDIA_FORMAT_RAW = 536870912; -} - -/// @brief Enumeration for media format MIME type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class media_format_mimetype_e { - /// < media format mime type is L16, AUDIO - static const int MEDIA_FORMAT_L16 = 285216784; - - /// < media format mime type is ALAW, AUDIO - static const int MEDIA_FORMAT_ALAW = 285216800; - - /// < media format mime type is ULAW, AUDIO - static const int MEDIA_FORMAT_ULAW = 285216816; - - /// < media format mime type is AMR, AUDIO, indicates MEDIA_FORMAT_AMR_NB (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_AMR = 285216832; - - /// < media format mime type is AMR_NB, AUDIO , (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_AMR_NB = 285216832; - - /// < media format mime type is AMR_WB, AUDIO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_AMR_WB = 285216833; - - /// < media format mime type is G729, AUDIO - static const int MEDIA_FORMAT_G729 = 285216848; - - /// < media format mime type is AAC, AUDIO, indicates MEDIA_FORMAT_AAC_LC (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_AAC = 285216864; - - /// < media format mime type is AAC_LC, AUDIO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_AAC_LC = 285216864; - - /// < media format mime type is AAC_HE, AUDIO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_AAC_HE = 285216865; - - /// < media format mime type is AAC_HE_PS, AUDIO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_AAC_HE_PS = 285216866; - - /// < media format mime type is MP3, AUDIO - static const int MEDIA_FORMAT_MP3 = 285216880; - - /// < media format mime type is MP23, AUDIO, (Since 4.0) - static const int MEDIA_FORMAT_MP2 = 285216881; - - /// < media format mime type is VORBIS, AUDIO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_VORBIS = 285216896; - - /// < media format mime type is FLAC, AUDIO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_FLAC = 285216912; - - /// < media format mime type is WMAV1, AUDIO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_WMAV1 = 285216928; - - /// < media format mime type is WMAV2, AUDIO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_WMAV2 = 285216929; - - /// < media format mime type is WMAVPRO, AUDIO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_WMAPRO = 285216930; - - /// < media format mime type is WMAVLSL, AUDIO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_WMALSL = 285216931; - - /// < media format mime type is AC3, AUDIO, (Since 4.0) - static const int MEDIA_FORMAT_AC3 = 285216945; - - /// < media format mime type is EAC3, AUDIO, (Since 4.0) - static const int MEDIA_FORMAT_EAC3 = 285216946; - - /// < media format mime type is DTS, AUDIO, (Since 4.0) - static const int MEDIA_FORMAT_DTS = 285216961; - - /// < media format mime type is OPUS, AUDIO, (Since 4.0) - static const int MEDIA_FORMAT_OPUS = 285216977; - - /// < media format mime type is PCM, AUDIO, indicates MEDIA_FORMAT_PCM_S16LE (Since 3.0) - static const int MEDIA_FORMAT_PCM = 553653520; - - /// < media format mime type is PCM signed 16-bit little-endian, AUDIO, (Since 3.0) - static const int MEDIA_FORMAT_PCM_S16LE = 553653520; - - /// < media format mime type is PCM signed 24-bit little-endian, AUDIO, (Since 3.0) - static const int MEDIA_FORMAT_PCM_S24LE = 553653521; - - /// < media format mime type is PCM signed 32-bit little-endian, AUDIO, (Since 3.0) - static const int MEDIA_FORMAT_PCM_S32LE = 553653522; - - /// < media format mime type is PCM signed 16-bit big-endian, AUDIO, (Since 3.0) - static const int MEDIA_FORMAT_PCM_S16BE = 553653523; - - /// < media format mime type is PCM signed 24-bit big-endian, AUDIO, (Since 3.0) - static const int MEDIA_FORMAT_PCM_S24BE = 553653524; - - /// < media format mime type is PCM signed 32-bit big-endian, AUDIO, (Since 3.0) - static const int MEDIA_FORMAT_PCM_S32BE = 553653525; - - /// < media format mime type is PCM 32-bit floating point little-endian, AUDIO, (Since 3.0) - static const int MEDIA_FORMAT_PCM_F32LE = 553653526; - - /// < media format mime type is PCM 32-bit floating point big-endian, AUDIO, (Since 3.0) - static const int MEDIA_FORMAT_PCM_F32BE = 553653527; - - /// < media format mime type is PCM unsigned 16-bit little-endian, AUDIO, (Since 4.0) - static const int MEDIA_FORMAT_PCM_U16LE = 553653528; - - /// < media format mime type is PCM unsigned 24-bit little-endian, AUDIO, (Since 4.0) - static const int MEDIA_FORMAT_PCM_U24LE = 553653529; - - /// < media format mime type is PCM unsigned 32-bit little-endian, AUDIO, (Since 4.0) - static const int MEDIA_FORMAT_PCM_U32LE = 553653530; - - /// < media format mime type is PCM unsigned 16-bit big-endian, AUDIO, (Since 4.0) - static const int MEDIA_FORMAT_PCM_U16BE = 553653531; - - /// < media format mime type is PCM unsigned 24-bit big-endian, AUDIO, (Since 4.0) - static const int MEDIA_FORMAT_PCM_U24BE = 553653532; - - /// < media format mime type is PCM unsigned 32-bit big-endian, AUDIO, (Since 4.0) - static const int MEDIA_FORMAT_PCM_U32BE = 553653533; - - /// < media format mime type is PCM A-law, AUDIO - static const int MEDIA_FORMAT_PCMA = 553653536; - - /// < media format mime type is PCM U-law, AUDIO - static const int MEDIA_FORMAT_PCMU = 553653552; - - /// < media format mime type is H261, VIDEO - static const int MEDIA_FORMAT_H261 = 301998096; - - /// < media format mime type is H263, VIDEO - static const int MEDIA_FORMAT_H263 = 301998112; - - /// < media format mime type is H263P, VIDEO - static const int MEDIA_FORMAT_H263P = 301998113; - - /// < media format mime type is H263 Baseline Profile, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_H263_BLP = 301998114; - - /// < media format mime type is H263 H.320 Coding Efficiency Profile, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_H263_H320_CEP = 301998115; - - /// < media format mime type is H263 Backward-Compatibility Profile, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_H263_BCP = 301998116; - - /// < media format mime type is H263 Interactive and Streaming Wireless Profile, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_H263_ISW2P = 301998117; - - /// < media format mime type is H263 Interactive and Streaming Wireless Profile, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_H263_ISW3P = 301998118; - - /// < media format mime type is H263 Conversation High Compression Profile, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_H263_CHCP = 301998119; - - /// < media format mime type is H263 Conversational Internet Profile, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_H263_C_INTERNETP = 301998120; - - /// < media format mime type is H263 Conversational Interlace Profile, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_H263_C_INTERLACEP = 301998121; - - /// < media format mime type is H263 High Latency Profile, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_H263_HLP = 301998122; - - /// < media format mime type is H264 baseline profile, VIDEO - static const int MEDIA_FORMAT_H264_SP = 301998128; - - /// < media format mime type is H264 main profile, VIDEO - static const int MEDIA_FORMAT_H264_MP = 301998129; - - /// < media format mime type is H264 high profile, VIDEO - static const int MEDIA_FORMAT_H264_HP = 301998130; - - /// < media format mime type is H264 Extended Profile, VIDEO (Since 3.0) - static const int MEDIA_FORMAT_H264_EXTP = 301998131; - - /// < media format mime type is H264 High10 Profile, VIDEO (Since 3.0) - static const int MEDIA_FORMAT_H264_H10P = 301998132; - - /// < media format mime type is H264 High422 Profile, VIDEO (Since 3.0) - static const int MEDIA_FORMAT_H264_H422P = 301998133; - - /// < media format mime type is H264 High444 Profile, VIDEO (Since 3.0) - static const int MEDIA_FORMAT_H264_H444P = 301998134; - - /// < media format mime type is H264 CAVLC444 Profile, VIDEO (Since 3.0) - static const int MEDIA_FORMAT_H264_C444P = 301998135; - - /// < media format mime type is MJPEG, VIDEO - static const int MEDIA_FORMAT_MJPEG = 301998144; - - /// < media format mime type is MPEG1, VIDEO - static const int MEDIA_FORMAT_MPEG1 = 301998160; - - /// < media format mime type is MPEG2 simple profile, VIDEO - static const int MEDIA_FORMAT_MPEG2_SP = 301998176; - - /// < media format mime type is MPEG2 main profile, VIDEO - static const int MEDIA_FORMAT_MPEG2_MP = 301998177; - - /// < media format mime type is MPEG2 high profile, VIDEO - static const int MEDIA_FORMAT_MPEG2_HP = 301998178; - - /// < media format mime type is MPEG4 simple profile, VIDEO - static const int MEDIA_FORMAT_MPEG4_SP = 301998192; - - /// < media format mime type is MPEG4 advanced simple profile, VIDEO - static const int MEDIA_FORMAT_MPEG4_ASP = 301998193; - - /// < media format mime type is HEVC, VIDEO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_HEVC = 301998208; - - /// < media format mime type is HEVC Main Profile, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_HEVC_MP = 301998209; - - /// < media format mime type is HEVC Main10 Profile, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_HEVC_M10P = 301998210; - - /// < media format mime type is VP8, VIDEO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_VP8 = 301998224; - - /// < media format mime type is VP9, VIDEO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_VP9 = 301998240; - - /// < media format mime type is VC1, VIDEO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_VC1 = 301998256; - - /// < media format mime type is DIVX4, VIDEO, (Since 4.0) - static const int MEDIA_FORMAT_DIVX4 = 301998276; - - /// < media format mime type is DIVX5, VIDEO, (Since 4.0) - static const int MEDIA_FORMAT_DIVX5 = 301998277; - - /// < media format mime type is XVID, VIDEO, (Since 4.0) - static const int MEDIA_FORMAT_XVID = 301998288; - - /// < media format mime type is I420, VIDEO - static const int MEDIA_FORMAT_I420 = 570434832; - - /// < media format mime type is NV12, VIDEO - static const int MEDIA_FORMAT_NV12 = 570434848; - - /// < media format mime type is NV12T, VIDEO - static const int MEDIA_FORMAT_NV12T = 570434864; - - /// < media format mime type is YV12, VIDEO - static const int MEDIA_FORMAT_YV12 = 570434880; - - /// < media format mime type is NV21, VIDEO - static const int MEDIA_FORMAT_NV21 = 570434896; - - /// < media format mime type is NV16, VIDEO - static const int MEDIA_FORMAT_NV16 = 570434912; - - /// < media format mime type is YUYV, VIDEO - static const int MEDIA_FORMAT_YUYV = 570434928; - - /// < media format mime type is UYVY, VIDEO - static const int MEDIA_FORMAT_UYVY = 570434944; - - /// < media format mime type is 422P, VIDEO - static const int MEDIA_FORMAT_422P = 570434960; - - /// < media format mime type is RGB565, VIDEO - static const int MEDIA_FORMAT_RGB565 = 570434976; - - /// < media format mime type is RGB888, VIDEO - static const int MEDIA_FORMAT_RGB888 = 570434992; - - /// < media format mime type is RGBA, VIDEO - static const int MEDIA_FORMAT_RGBA = 570435008; - - /// < media format mime type is ARGB, VIDEO - static const int MEDIA_FORMAT_ARGB = 570435024; - - /// < media format mime type is BGRA, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_BGRA = 570435040; - - /// < media format mime type is MP4 container, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_CONTAINER_MP4 = 67121168; - - /// < media format mime type is AVI container, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_CONTAINER_AVI = 67121184; - - /// < media format mime type is MPEG2TS container, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_CONTAINER_MPEG2TS = 67121200; - - /// < media format mime type is MPEG2PS container, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_CONTAINER_MPEG2PS = 67121216; - - /// < media format mime type is MATROSKA container, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_CONTAINER_MATROSKA = 67121232; - - /// < media format mime type is WEBM container, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_CONTAINER_WEBM = 67121248; - - /// < media format mime type is 3GP container, VIDEO, (Since 3.0) - static const int MEDIA_FORMAT_CONTAINER_3GP = 67121264; - - /// < media format mime type is WAV container, AUDIO, (Since 3.0) - static const int MEDIA_FORMAT_CONTAINER_WAV = 67125264; - - /// < media format mime type is OGG container, AUDIO, (Since 3.0) - static const int MEDIA_FORMAT_CONTAINER_OGG = 67125280; - - /// < media format mime type is AAC_ADTS container, AUDIO, (Since 3.0) - static const int MEDIA_FORMAT_CONTAINER_AAC_ADTS = 67125296; - - /// < media format mime type is AAC_ADIF container, AUDIO, (Since 3.0) - static const int MEDIA_FORMAT_CONTAINER_AAC_ADIF = 67125297; - - /// < media format mime type is HW dependent, VIDEO, (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIA_FORMAT_NATIVE_VIDEO = 570454016; - - /// < media format mime type is MP4, TEXT, (Since 3.0) - static const int MEDIA_FORMAT_TEXT_MP4 = 318799888; - - /// < media format mime type is 3GP, TEXT, (Since 3.0) - static const int MEDIA_FORMAT_TEXT_3GP = 318799904; - - /// < media format mime type is MEDIA_FORMAT_MAX, Do not use - static const int MEDIA_FORMAT_MAX = 318799905; -} - -/// @brief Enumeration for media color model. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class media_format_color_model_e { - /// < media format color model is NONE - static const int MEDIA_COLOR_MODEL_NONE = 0; - - /// < media format color model is RGB - static const int MEDIA_COLOR_MODEL_RGB = 1; - - /// < media format color model is YUV - static const int MEDIA_COLOR_MODEL_YUV = 2; -} - -/// @brief Enumeration for media format aac header type. -/// @since_tizen 3.0 -abstract class media_format_aac_header_type_e { - /// < media format aac header type is RAW, no header - static const int MEDIA_FORMAT_AAC_HEADER_NONE = 0; - - /// < media format aac header type is ADTS header - static const int MEDIA_FORMAT_AAC_HEADER_ADTS = 1; - - /// < media format aac header type is ADIF header - static const int MEDIA_FORMAT_AAC_HEADER_ADIF = 2; - - /// < media format aac header type is UNKNOWN - static const int MEDIA_FORMAT_AAC_HEADER_UNKNOWN = 3; -} - -/// @brief Enumeration for media format text type. -/// @since_tizen 3.0 -abstract class media_format_text_type_e { - /// < media format text type is none - static const int MEDIA_FORMAT_TEXT_TYPE_NONE = 0; - - /// < media format text type is MPEG-4 Timed Text - static const int MEDIA_FORMAT_TEXT_TYPE_TIMED_TEXT_MP4 = 1; - - /// < media format text type is 3GPP Timed Text - static const int MEDIA_FORMAT_TEXT_TYPE_TIMED_TEXT_3GPP = 2; - - /// < media format text type is unknown - static const int MEDIA_FORMAT_TEXT_TYPE_UNKNOWN = 3; -} - -/// @brief Media Format handle type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef media_format_h = ffi.Pointer; - -/// @brief Enumeration for tbm_surface error type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class tbm_surface_error_e { - /// < Successful - static const int TBM_SURFACE_ERROR_NONE = 0; - - /// < Invalid parameter - static const int TBM_SURFACE_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid Operation - static const int TBM_SURFACE_ERROR_INVALID_OPERATION = -38; -} - -/// @brief Definition for the TBM plane struct. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -final class _tbm_surface_plane extends ffi.Struct { - /// < Plane pointer - external ffi.Pointer ptr; - - /// < Plane size - @ffi.Uint32() - external int size; - - /// < Plane offset - @ffi.Uint32() - external int offset; - - /// < Plane stride - @ffi.Uint32() - external int stride; - - /// < Reserved pointer1 - external ffi.Pointer reserved1; - - /// < Reserved pointer2 - external ffi.Pointer reserved2; - - /// < Reserved pointer3 - external ffi.Pointer reserved3; -} - -/// @brief Definition for the TBM surface information struct. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -final class _tbm_surface_info extends ffi.Struct { - /// < TBM surface width - @ffi.Uint32() - external int width; - - /// < TBM surface height - @ffi.Uint32() - external int height; - - /// < TBM surface format - @tbm_format() - external int format; - - /// < TBM surface bbp - @ffi.Uint32() - external int bpp; - - /// < TBM surface size - @ffi.Uint32() - external int size; - - /// < The number of planes - @ffi.Uint32() - external int num_planes; - - /// < Array of planes - @ffi.Array.multi([4]) - external ffi.Array planes; - - /// < Reserved pointer4 - external ffi.Pointer reserved4; - - /// < Reserved pointer5 - external ffi.Pointer reserved5; - - /// < Reserved pointer6 - external ffi.Pointer reserved6; -} - -/// @brief Definition for the Tizen buffer surface format. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef tbm_format = ffi.Uint32; -typedef Darttbm_format = int; - -/// @brief Definition for the TBM plane struct. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef tbm_surface_plane_s = _tbm_surface_plane; - -/// @brief Definition for the Tizen buffer surface. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef tbm_surface_h = ffi.Pointer<_tbm_surface>; - -final class _tbm_surface extends ffi.Opaque {} - -/// @brief Definition for the TBM surface information struct. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef tbm_surface_info_s = _tbm_surface_info; - -final class media_packet_s extends ffi.Opaque {} - -/// @brief Enumeration for media packet error. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class media_packet_error_e { - /// < Successful - static const int MEDIA_PACKET_ERROR_NONE = 0; - - /// < Out of memory - static const int MEDIA_PACKET_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int MEDIA_PACKET_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid operation - static const int MEDIA_PACKET_ERROR_INVALID_OPERATION = -38; - - /// < No space left on device - static const int MEDIA_PACKET_ERROR_FILE_NO_SPACE_ON_DEVICE = -28; - - /// < No Available packet, (Since 3.0) - static const int MEDIA_PACKET_ERROR_NO_AVAILABLE_PACKET = -27394047; -} - -/// @brief Enumeration for media buffer flag. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class media_buffer_flags_e { - /// < The buffer marked as such contains codec initialization/codec specific data instead of media data - static const int MEDIA_PACKET_CODEC_CONFIG = 1; - - /// < The end of stream - static const int MEDIA_PACKET_END_OF_STREAM = 2; - - /// < The buffer marked as such contains the data for a sync frame - static const int MEDIA_PACKET_SYNC_FRAME = 4; -} - -/// @brief Enumeration for the return values of media packet finalize call back functions. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @see media_packet_finalize_cb() -abstract class finalize_cb_ret { - /// < Packet handle is not destroyed - static const int MEDIA_PACKET_REUSE = 0; - - /// < Destroy packet handle - static const int MEDIA_PACKET_FINALIZE = 1; -} - -/// @brief Enumeration for media packet rotation method. -/// @since_tizen 5.0 -abstract class media_packet_rotate_method_e { - /// < None - static const int MEDIA_PACKET_ROTATE_IDENTITY = 0; - - /// < Rotate 90 degrees - static const int MEDIA_PACKET_ROTATE_90 = 1; - - /// < Rotate 180 degrees - static const int MEDIA_PACKET_ROTATE_180 = 2; - - /// < Rotate 270 degrees - static const int MEDIA_PACKET_ROTATE_270 = 3; - - /// < Flip horizontal - static const int MEDIA_PACKET_ROTATE_HORIZONTAL_FLIP = 4; - - /// < Flip vertical - static const int MEDIA_PACKET_ROTATE_VERTICAL_FLIP = 5; -} - -/// @brief Called when the media packet is destroyed. -/// @details It will be invoked when media_packet_destroy() is called. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @param[in] packet The media packet handle -/// @param[in] error_code The error code of #media_packet_error_e -/// @param[in] user_data The user data passed from the callback registration function -/// @retval #MEDIA_PACKET_REUSE Packet handle is not destroyed, the handle will be reused. -/// @retval #MEDIA_PACKET_FINALIZE Destroy media packet handle, the handle will not be reused. -/// @pre It will be invoked when media packet is destroyed. -/// @see media_packet_destroy() -/// @see media_packet_create_alloc() -/// @see media_packet_create() -/// @see media_packet_copy() -/// @see media_packet_create_from_tbm_surface() -typedef media_packet_finalize_cb - = ffi.Pointer>; -typedef media_packet_finalize_cbFunction = ffi.Int Function( - media_packet_h packet, ffi.Int error_code, ffi.Pointer user_data); -typedef Dartmedia_packet_finalize_cbFunction = int Function( - media_packet_h packet, int error_code, ffi.Pointer user_data); - -/// @brief The Media Packet handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef media_packet_h = ffi.Pointer; - -/// @brief Enumeration for the error codes of Camera. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_error_e { - /// < Successful - static const int CAMERA_ERROR_NONE = 0; - - /// < Invalid parameter - static const int CAMERA_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid state - static const int CAMERA_ERROR_INVALID_STATE = -26279934; - - /// < Out of memory - static const int CAMERA_ERROR_OUT_OF_MEMORY = -12; - - /// < Device error - static const int CAMERA_ERROR_DEVICE = -26279932; - - /// < Internal error - static const int CAMERA_ERROR_INVALID_OPERATION = -38; - - /// < Restricted by security system policy - static const int CAMERA_ERROR_SECURITY_RESTRICTED = -26279929; - - /// < The device is using another application or working on some operation - static const int CAMERA_ERROR_DEVICE_BUSY = -26279928; - - /// < No camera device - static const int CAMERA_ERROR_DEVICE_NOT_FOUND = -26279927; - - /// < ESD situation - static const int CAMERA_ERROR_ESD = -26279924; - - /// < The access to the resources can not be granted - static const int CAMERA_ERROR_PERMISSION_DENIED = -13; - - /// < The feature is not supported - static const int CAMERA_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Blocked by resource conflict (Since 3.0) - static const int CAMERA_ERROR_RESOURCE_CONFLICT = -26279923; - - /// < Socket connection lost (Since 3.0) - static const int CAMERA_ERROR_SERVICE_DISCONNECTED = -26279922; -} - -/// @brief Enumeration for the camera state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_state_e { - /// < Before creating - static const int CAMERA_STATE_NONE = 0; - - /// < Created, but not initialized yet - static const int CAMERA_STATE_CREATED = 1; - - /// < Preview - static const int CAMERA_STATE_PREVIEW = 2; - - /// < While capturing - static const int CAMERA_STATE_CAPTURING = 3; - - /// < After capturing - static const int CAMERA_STATE_CAPTURED = 4; -} - -/// @brief Enumeration for the camera device state. -/// @since_tizen 3.0 -abstract class camera_device_state_e { - /// < Not opened - static const int CAMERA_DEVICE_STATE_NULL = 0; - - /// < Opened - static const int CAMERA_DEVICE_STATE_OPENED = 1; - - /// < Now previewing or capturing or is being used for video recording - static const int CAMERA_DEVICE_STATE_WORKING = 2; -} - -/// @brief Enumeration for the camera device. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_device_e { - /// < Primary camera - static const int CAMERA_DEVICE_CAMERA0 = 0; - - /// < Secondary camera - static const int CAMERA_DEVICE_CAMERA1 = 1; - - /// < Third camera (Since 5.0) - static const int CAMERA_DEVICE_CAMERA2 = 2; - - /// < 4th camera (Since 5.0) - static const int CAMERA_DEVICE_CAMERA3 = 3; - - /// < 5th camera (Since 5.0) - static const int CAMERA_DEVICE_CAMERA4 = 4; - - /// < 6th camera (Since 5.0) - static const int CAMERA_DEVICE_CAMERA5 = 5; - - /// < 7th camera (Since 5.0) - static const int CAMERA_DEVICE_CAMERA6 = 6; - - /// < 8th camera (Since 5.0) - static const int CAMERA_DEVICE_CAMERA7 = 7; - - /// < 9th camera (Since 5.0) - static const int CAMERA_DEVICE_CAMERA8 = 8; - - /// < 10th camera (Since 5.0) - static const int CAMERA_DEVICE_CAMERA9 = 9; -} - -/// @brief Enumeration for the camera pixel format. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks If #CAMERA_PIXEL_FORMAT_INVZ is set, the type of display should be #CAMERA_DISPLAY_TYPE_NONE. \n -/// Otherwise, camera_start_preview() will return #CAMERA_ERROR_INVALID_OPERATION. (Since 5.0) -abstract class camera_pixel_format_e { - /// < Invalid pixel format - static const int CAMERA_PIXEL_FORMAT_INVALID = -1; - - /// < NV12 pixel format - static const int CAMERA_PIXEL_FORMAT_NV12 = 0; - - /// < NV12 Tiled pixel format - static const int CAMERA_PIXEL_FORMAT_NV12T = 1; - - /// < NV16 pixel format - static const int CAMERA_PIXEL_FORMAT_NV16 = 2; - - /// < NV21 pixel format - static const int CAMERA_PIXEL_FORMAT_NV21 = 3; - - /// < YUYV(YUY2) pixel format - static const int CAMERA_PIXEL_FORMAT_YUYV = 4; - - /// < UYVY pixel format - static const int CAMERA_PIXEL_FORMAT_UYVY = 5; - - /// < YUV422(Y:U:V) planar pixel format - static const int CAMERA_PIXEL_FORMAT_422P = 6; - - /// < I420 pixel format - static const int CAMERA_PIXEL_FORMAT_I420 = 7; - - /// < YV12 pixel format - static const int CAMERA_PIXEL_FORMAT_YV12 = 8; - - /// < RGB565 pixel format - static const int CAMERA_PIXEL_FORMAT_RGB565 = 9; - - /// < RGB888 pixel format - static const int CAMERA_PIXEL_FORMAT_RGB888 = 10; - - /// < RGBA pixel format - static const int CAMERA_PIXEL_FORMAT_RGBA = 11; - - /// < ARGB pixel format - static const int CAMERA_PIXEL_FORMAT_ARGB = 12; - - /// < Encoded pixel format - static const int CAMERA_PIXEL_FORMAT_JPEG = 13; - - /// < Encoded pixel format : H264 (Since 3.0) - static const int CAMERA_PIXEL_FORMAT_H264 = 15; - - /// < Depth pixel format : INVZ (Since 5.0) - static const int CAMERA_PIXEL_FORMAT_INVZ = 16; -} - -/// @brief Enumeration for the camera display type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_display_type_e { - /// < Overlay surface display - static const int CAMERA_DISPLAY_TYPE_OVERLAY = 0; - - /// < Evas object surface display - static const int CAMERA_DISPLAY_TYPE_EVAS = 1; - - /// < This disposes off buffers - static const int CAMERA_DISPLAY_TYPE_NONE = 2; -} - -/// @brief Enumeration for the camera policy. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_policy_e { - /// < None - static const int CAMERA_POLICY_NONE = 0; - - /// < Security policy - static const int CAMERA_POLICY_SECURITY = 4; - - /// < Resource conflict (Since 3.0) - static const int CAMERA_POLICY_RESOURCE_CONFLICT = 5; -} - -/// @brief Enumeration for the camera rotation type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_rotation_e { - /// < No rotation - static const int CAMERA_ROTATION_NONE = 0; - - /// < 90 degree rotation - static const int CAMERA_ROTATION_90 = 1; - - /// < 180 degree rotation - static const int CAMERA_ROTATION_180 = 2; - - /// < 270 degree rotation - static const int CAMERA_ROTATION_270 = 3; -} - -/// @brief Enumeration for the camera flip type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_flip_e { - /// < No Flip - static const int CAMERA_FLIP_NONE = 0; - - /// < Horizontal flip - static const int CAMERA_FLIP_HORIZONTAL = 1; - - /// < Vertical flip - static const int CAMERA_FLIP_VERTICAL = 2; - static const int CAMERA_FLIP_BOTH = 3; -} - -/// @brief Enumeration for the camera focus state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_focus_state_e { - /// < Focus released - static const int CAMERA_FOCUS_STATE_RELEASED = 0; - - /// < Focus in progress - static const int CAMERA_FOCUS_STATE_ONGOING = 1; - - /// < Focus succeeded - static const int CAMERA_FOCUS_STATE_FOCUSED = 2; - - /// < Focus failed - static const int CAMERA_FOCUS_STATE_FAILED = 3; -} - -/// @brief Enumeration for the facing direction of camera module -/// @since_tizen 3.0 -abstract class camera_facing_direction_e { - /// < Rear - static const int CAMERA_FACING_DIRECTION_REAR = 0; - - /// < Front - static const int CAMERA_FACING_DIRECTION_FRONT = 1; -} - -/// @brief Enumeration for the current flash state. -/// @since_tizen 3.0 -abstract class camera_flash_state_e { - /// < Flash is not used now through camera API - static const int CAMERA_FLASH_STATE_NOT_USED = 0; - - /// < Flash is used now through camera API - static const int CAMERA_FLASH_STATE_USED = 1; -} - -/// @brief The structure type of the image data. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -final class camera_image_data_s extends ffi.Struct { - /// < The image buffer - external ffi.Pointer data; - - /// < The size of the buffer - @ffi.UnsignedInt() - external int size; - - /// < The width of the image - @ffi.Int() - external int width; - - /// < The height of the image - @ffi.Int() - external int height; - - /// < The format of the image pixel - @ffi.Int32() - external int format; - - /// < The exif raw data - external ffi.Pointer exif; - - /// < The size of the exif data - @ffi.UnsignedInt() - external int exif_size; -} - -/// @brief The structure type for face detection. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -final class camera_detected_face_s extends ffi.Struct { - /// < The ID of each face - @ffi.Int() - external int id; - - /// < The confidence level for the detection of the face - @ffi.Int() - external int score; - - /// < The x coordinates of the face - @ffi.Int() - external int x; - - /// < The y coordinates of the face - @ffi.Int() - external int y; - - /// < The width of the face - @ffi.Int() - external int width; - - /// < The height of the face - @ffi.Int() - external int height; -} - -/// @brief The structure type to preview stream data. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -final class camera_preview_data_s extends ffi.Struct { - /// < The format of the frame pixel - @ffi.Int32() - external int format; - - /// < The width of the frame - @ffi.Int() - external int width; - - /// < The height of the frame - @ffi.Int() - external int height; - - /// < The number of planes - @ffi.Int() - external int num_of_planes; - - /// < The timestamp of the frame - @ffi.UnsignedInt() - external int timestamp; - - external UnnamedUnion1 data; -} - -final class UnnamedUnion1 extends ffi.Union { - /// < Single plane frame data - external UnnamedStruct1 single_plane; - - /// < Double plane frame data - external UnnamedStruct2 double_plane; - - /// < Triple plane frame data - external UnnamedStruct3 triple_plane; - - /// < Encoded plane frame data - external UnnamedStruct4 encoded_plane; - - /// < Depth plane frame data (Since 5.0) - external UnnamedStruct5 depth_plane; - - /// < RGB plane frame data (Since 5.0) - external UnnamedStruct6 rgb_plane; -} - -final class UnnamedStruct1 extends ffi.Struct { - /// < The yuv data pointer - external ffi.Pointer yuv; - - /// < The size of data - @ffi.UnsignedInt() - external int size; -} - -final class UnnamedStruct2 extends ffi.Struct { - /// < The y data pointer - external ffi.Pointer y; - - /// < The uv data pointer - external ffi.Pointer uv; - - /// < The size of y data - @ffi.UnsignedInt() - external int y_size; - - /// < The size of uv data - @ffi.UnsignedInt() - external int uv_size; -} - -final class UnnamedStruct3 extends ffi.Struct { - /// < The y data pointer - external ffi.Pointer y; - - /// < The u data pointer - external ffi.Pointer u; - - /// < The v data pointer - external ffi.Pointer v; - - /// < The size of y data - @ffi.UnsignedInt() - external int y_size; - - /// < The size of u data - @ffi.UnsignedInt() - external int u_size; - - /// < The size of v data - @ffi.UnsignedInt() - external int v_size; -} - -final class UnnamedStruct4 extends ffi.Struct { - /// < The encoded data pointer - external ffi.Pointer data; - - /// < The size of encoded data - @ffi.UnsignedInt() - external int size; -} - -final class UnnamedStruct5 extends ffi.Struct { - /// < The depth data pointer - external ffi.Pointer data; - - /// < The size of depth data - @ffi.UnsignedInt() - external int size; -} - -final class UnnamedStruct6 extends ffi.Struct { - /// < The RGB data pointer - external ffi.Pointer data; - - /// < The size of RGB data - @ffi.UnsignedInt() - external int size; -} - -final class camera_cli_s extends ffi.Opaque {} - -/// @brief Enumeration for the camera display mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_display_mode_e { - /// < Letter box - static const int CAMERA_DISPLAY_MODE_LETTER_BOX = 0; - - /// < Origin size - static const int CAMERA_DISPLAY_MODE_ORIGIN_SIZE = 1; - - /// < Full screen - static const int CAMERA_DISPLAY_MODE_FULL = 2; - - /// < Cropped full screen - static const int CAMERA_DISPLAY_MODE_CROPPED_FULL = 3; - - /// < Original size or letter box (Since 3.0) - static const int CAMERA_DISPLAY_MODE_ORIGIN_OR_LETTER_BOX = 4; - - /// < Custom ROI (Since 3.0) - static const int CAMERA_DISPLAY_MODE_CUSTOM_ROI = 5; -} - -/// @brief Enumeration for the color tone, which provides the impression of looking through a tinted glass. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_attr_effect_mode_e { - /// < None - static const int CAMERA_ATTR_EFFECT_NONE = 0; - - /// < Mono - static const int CAMERA_ATTR_EFFECT_MONO = 1; - - /// < Sepia - static const int CAMERA_ATTR_EFFECT_SEPIA = 2; - - /// < Negative - static const int CAMERA_ATTR_EFFECT_NEGATIVE = 3; - - /// < Blue - static const int CAMERA_ATTR_EFFECT_BLUE = 4; - - /// < Green - static const int CAMERA_ATTR_EFFECT_GREEN = 5; - - /// < Aqua - static const int CAMERA_ATTR_EFFECT_AQUA = 6; - - /// < Violet - static const int CAMERA_ATTR_EFFECT_VIOLET = 7; - - /// < Orange - static const int CAMERA_ATTR_EFFECT_ORANGE = 8; - - /// < Gray - static const int CAMERA_ATTR_EFFECT_GRAY = 9; - - /// < Red - static const int CAMERA_ATTR_EFFECT_RED = 10; - - /// < Antique - static const int CAMERA_ATTR_EFFECT_ANTIQUE = 11; - - /// < Warm - static const int CAMERA_ATTR_EFFECT_WARM = 12; - - /// < Pink - static const int CAMERA_ATTR_EFFECT_PINK = 13; - - /// < Yellow - static const int CAMERA_ATTR_EFFECT_YELLOW = 14; - - /// < Purple - static const int CAMERA_ATTR_EFFECT_PURPLE = 15; - - /// < Emboss - static const int CAMERA_ATTR_EFFECT_EMBOSS = 16; - - /// < Outline - static const int CAMERA_ATTR_EFFECT_OUTLINE = 17; - - /// < Solarization - static const int CAMERA_ATTR_EFFECT_SOLARIZATION = 18; - - /// < Sketch - static const int CAMERA_ATTR_EFFECT_SKETCH = 19; - - /// < Washed - static const int CAMERA_ATTR_EFFECT_WASHED = 20; - - /// < Vintage warm - static const int CAMERA_ATTR_EFFECT_VINTAGE_WARM = 21; - - /// < Vintage cold - static const int CAMERA_ATTR_EFFECT_VINTAGE_COLD = 22; - - /// < Posterization - static const int CAMERA_ATTR_EFFECT_POSTERIZATION = 23; - - /// < Cartoon - static const int CAMERA_ATTR_EFFECT_CARTOON = 24; - - /// < Selective color - Red - static const int CAMERA_ATTR_EFFECT_SELECTIVE_RED = 25; - - /// < Selective color - Green - static const int CAMERA_ATTR_EFFECT_SELECTIVE_GREEN = 26; - - /// < Selective color - Blue - static const int CAMERA_ATTR_EFFECT_SELECTIVE_BLUE = 27; - - /// < Selective color - Yellow - static const int CAMERA_ATTR_EFFECT_SELECTIVE_YELLOW = 28; - - /// < Selective color - Red and Yellow - static const int CAMERA_ATTR_EFFECT_SELECTIVE_RED_YELLOW = 29; - - /// < Other Graphic effects - static const int CAMERA_ATTR_EFFECT_OTHER_GRAPHICS = 30; -} - -/// @brief Enumeration for the white balance levels of the camera. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_attr_whitebalance_e { - /// < None - static const int CAMERA_ATTR_WHITE_BALANCE_NONE = 0; - - /// < Automatic - static const int CAMERA_ATTR_WHITE_BALANCE_AUTOMATIC = 1; - - /// < Daylight - static const int CAMERA_ATTR_WHITE_BALANCE_DAYLIGHT = 2; - - /// < Cloudy - static const int CAMERA_ATTR_WHITE_BALANCE_CLOUDY = 3; - - /// < Fluorescent - static const int CAMERA_ATTR_WHITE_BALANCE_FLUORESCENT = 4; - - /// < Incandescent - static const int CAMERA_ATTR_WHITE_BALANCE_INCANDESCENT = 5; - - /// < Shade - static const int CAMERA_ATTR_WHITE_BALANCE_SHADE = 6; - - /// < Horizon - static const int CAMERA_ATTR_WHITE_BALANCE_HORIZON = 7; - - /// < Flash - static const int CAMERA_ATTR_WHITE_BALANCE_FLASH = 8; - - /// < Custom - static const int CAMERA_ATTR_WHITE_BALANCE_CUSTOM = 9; -} - -/// @brief Enumeration for the scene mode. -/// @details The mode of operation can be in daylight, night, or back-light. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_attr_scene_mode_e { - /// < Normal - static const int CAMERA_ATTR_SCENE_MODE_NORMAL = 0; - - /// < Portrait - static const int CAMERA_ATTR_SCENE_MODE_PORTRAIT = 1; - - /// < Landscape - static const int CAMERA_ATTR_SCENE_MODE_LANDSCAPE = 2; - - /// < Sports - static const int CAMERA_ATTR_SCENE_MODE_SPORTS = 3; - - /// < Party & indoor - static const int CAMERA_ATTR_SCENE_MODE_PARTY_N_INDOOR = 4; - - /// < Beach & indoor - static const int CAMERA_ATTR_SCENE_MODE_BEACH_N_INDOOR = 5; - - /// < Sunset - static const int CAMERA_ATTR_SCENE_MODE_SUNSET = 6; - - /// < Dusk & dawn - static const int CAMERA_ATTR_SCENE_MODE_DUSK_N_DAWN = 7; - - /// < Fall - static const int CAMERA_ATTR_SCENE_MODE_FALL_COLOR = 8; - - /// < Night scene - static const int CAMERA_ATTR_SCENE_MODE_NIGHT_SCENE = 9; - - /// < Firework - static const int CAMERA_ATTR_SCENE_MODE_FIREWORK = 10; - - /// < Text - static const int CAMERA_ATTR_SCENE_MODE_TEXT = 11; - - /// < Show window - static const int CAMERA_ATTR_SCENE_MODE_SHOW_WINDOW = 12; - - /// < Candle light - static const int CAMERA_ATTR_SCENE_MODE_CANDLE_LIGHT = 13; - - /// < Backlight - static const int CAMERA_ATTR_SCENE_MODE_BACKLIGHT = 14; - - /// < Aqua - static const int CAMERA_ATTR_SCENE_MODE_AQUA = 15; -} - -/// @brief Enumeration for the auto focus mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_attr_af_mode_e { - /// < auto-focus is not set - static const int CAMERA_ATTR_AF_NONE = 0; - - /// < auto-focus in the normal mode - static const int CAMERA_ATTR_AF_NORMAL = 1; - - /// < auto-focus in the macro mode(close distance) - static const int CAMERA_ATTR_AF_MACRO = 2; - - /// < auto-focus in the full mode(all range scan, limited by device spec) - static const int CAMERA_ATTR_AF_FULL = 3; -} - -/// @brief Enumeration for the ISO levels of the camera. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_attr_iso_e { - /// < ISO auto mode - static const int CAMERA_ATTR_ISO_AUTO = 0; - - /// < ISO 50 - static const int CAMERA_ATTR_ISO_50 = 1; - - /// < ISO 100 - static const int CAMERA_ATTR_ISO_100 = 2; - - /// < ISO 200 - static const int CAMERA_ATTR_ISO_200 = 3; - - /// < ISO 400 - static const int CAMERA_ATTR_ISO_400 = 4; - - /// < ISO 800 - static const int CAMERA_ATTR_ISO_800 = 5; - - /// < ISO 1600 - static const int CAMERA_ATTR_ISO_1600 = 6; - - /// < ISO 3200 - static const int CAMERA_ATTR_ISO_3200 = 7; -} - -/// @brief Enumeration for the camera exposure modes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_attr_exposure_mode_e { - /// < Off - static const int CAMERA_ATTR_EXPOSURE_MODE_OFF = 0; - - /// < All mode - static const int CAMERA_ATTR_EXPOSURE_MODE_ALL = 1; - - /// < Center mode - static const int CAMERA_ATTR_EXPOSURE_MODE_CENTER = 2; - - /// < Spot mode - static const int CAMERA_ATTR_EXPOSURE_MODE_SPOT = 3; - - /// < Custom mode - static const int CAMERA_ATTR_EXPOSURE_MODE_CUSTOM = 4; -} - -/// @brief Enumeration for the orientation values of tag. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_attr_tag_orientation_e { - /// < Row #0 is at the top, Column #0 is to the left - static const int CAMERA_ATTR_TAG_ORIENTATION_TOP_LEFT = 1; - - /// < Row #0 is at the top, Column #0 is to the right (flipped) - static const int CAMERA_ATTR_TAG_ORIENTATION_TOP_RIGHT = 2; - - /// < Row #0 is at the bottom, Column #0 is to the right - static const int CAMERA_ATTR_TAG_ORIENTATION_BOTTOM_RIGHT = 3; - - /// < Row #0 is at the bottom, Column #0 is to the left (flipped) - static const int CAMERA_ATTR_TAG_ORIENTATION_BOTTOM_LEFT = 4; - - /// < Row #0 is to the left, Column #0 is at the top (flipped) - static const int CAMERA_ATTR_TAG_ORIENTATION_LEFT_TOP = 5; - - /// < Row #0 is to the right, Column #0 is at the top - static const int CAMERA_ATTR_TAG_ORIENTATION_RIGHT_TOP = 6; - - /// < Row #0 is to the right, Column #0 is at the bottom (flipped) - static const int CAMERA_ATTR_TAG_ORIENTATION_RIGHT_BOTTOM = 7; - - /// < Row #0 is to the left, Column #0 is at the bottom - static const int CAMERA_ATTR_TAG_ORIENTATION_LEFT_BOTTOM = 8; -} - -/// @brief Enumeration for the flash mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_attr_flash_mode_e { - /// < Always off - static const int CAMERA_ATTR_FLASH_MODE_OFF = 0; - - /// < Always splashes - static const int CAMERA_ATTR_FLASH_MODE_ON = 1; - - /// < Depending on intensity of light, strobe starts to flash - static const int CAMERA_ATTR_FLASH_MODE_AUTO = 2; - - /// < Red eye reduction. Multiple flash before capturing - static const int CAMERA_ATTR_FLASH_MODE_REDEYE_REDUCTION = 3; - - /// < Slow sync curtain synchronization - static const int CAMERA_ATTR_FLASH_MODE_SLOW_SYNC = 4; - - /// < Front curtain synchronization - static const int CAMERA_ATTR_FLASH_MODE_FRONT_CURTAIN = 5; - - /// < Rear curtain synchronization - static const int CAMERA_ATTR_FLASH_MODE_REAR_CURTAIN = 6; - - /// < Keep turned on until turning off - static const int CAMERA_ATTR_FLASH_MODE_PERMANENT = 7; -} - -/// @brief Enumeration to preview FPS. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_attr_fps_e { - /// < AUTO FPS - static const int CAMERA_ATTR_FPS_AUTO = 0; - - /// < 7 FPS - static const int CAMERA_ATTR_FPS_7 = 7; - - /// < 8 FPS - static const int CAMERA_ATTR_FPS_8 = 8; - - /// < 15 FPS - static const int CAMERA_ATTR_FPS_15 = 15; - - /// < 20 FPS - static const int CAMERA_ATTR_FPS_20 = 20; - - /// < 24 FPS - static const int CAMERA_ATTR_FPS_24 = 24; - - /// < 25 FPS - static const int CAMERA_ATTR_FPS_25 = 25; - - /// < 30 FPS - static const int CAMERA_ATTR_FPS_30 = 30; - - /// < 60 FPS - static const int CAMERA_ATTR_FPS_60 = 60; - - /// < 90 FPS - static const int CAMERA_ATTR_FPS_90 = 90; - - /// < 120 FPS - static const int CAMERA_ATTR_FPS_120 = 120; -} - -/// @brief Enumeration for the theater mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_attr_theater_mode_e { - /// < Disable theater mode - External display shows same image as device display - static const int CAMERA_ATTR_THEATER_MODE_DISABLE = 0; - - /// < Enable theater mode - Preview image is displayed on external display with full screen mode, but preview image is not shown on device display - static const int CAMERA_ATTR_THEATER_MODE_ENABLE = 2; - - /// < Clone mode - Preview image is displayed on external display with full screen mode. Also preview image is shown by the UI on device display - static const int CAMERA_ATTR_THEATER_MODE_CLONE = 1; -} - -/// @brief Enumeration for HDR capture mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class camera_attr_hdr_mode_e { - /// < Disable HDR capture - static const int CAMERA_ATTR_HDR_MODE_DISABLE = 0; - - /// < Enable HDR capture - static const int CAMERA_ATTR_HDR_MODE_ENABLE = 1; - - /// < Enable HDR capture and keep original image data - static const int CAMERA_ATTR_HDR_MODE_KEEP_ORIGINAL = 2; -} - -/// @brief Enumeration for PTZ(Pan Tilt Zoom) type. -/// @since_tizen 3.0 -abstract class camera_attr_ptz_type_e { - /// < Move the camera device physically - static const int CAMERA_ATTR_PTZ_TYPE_MECHANICAL = 0; - - /// < Zoom digitally and move into portion of the image - static const int CAMERA_ATTR_PTZ_TYPE_ELECTRONIC = 1; -} - -/// @brief Enumeration for PTZ(Pan Tilt Zoom) movement type. -/// @since_tizen 3.0 -abstract class camera_attr_ptz_move_type_e { - /// < Move to a specific coordinate position - static const int CAMERA_ATTR_PTZ_MOVE_ABSOLUTE = 0; - - /// < Move a specific distance from the current position - static const int CAMERA_ATTR_PTZ_MOVE_RELATIVE = 1; -} - -/// @brief The Camera handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @see recorder_create_videorecorder() -typedef camera_h = ffi.Pointer; - -/// @brief Called to get information about image data taken by the camera once per frame while capturing. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks This function is issued in the context of internal framework so the UI update code should not be directly invoked. -/// You must not call camera_start_preview() within this callback. -/// -/// @param[in] image The image data of the captured picture -/// @param[in] postview The image data of the postview -/// @param[in] thumbnail The image data of the thumbnail (it should be @c NULL if the available thumbnail data does not exist) -/// @param[in] user_data The user data passed from the callback registration function -/// @pre camera_start_capture() or camera_start_continuous_capture() will invoke this callback function if it is registered using camera_start_capture() or camera_start_continuous_capture(). -/// @see camera_start_capture() -/// @see camera_start_continuous_capture() -/// @see camera_capture_completed_cb() -typedef camera_capturing_cb - = ffi.Pointer>; -typedef camera_capturing_cbFunction = ffi.Void Function( - ffi.Pointer image, - ffi.Pointer postview, - ffi.Pointer thumbnail, - ffi.Pointer user_data); -typedef Dartcamera_capturing_cbFunction = void Function( - ffi.Pointer image, - ffi.Pointer postview, - ffi.Pointer thumbnail, - ffi.Pointer user_data); - -/// @brief Called when the camera capturing completes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks The callback is called after camera_capturing_cb() is completed.\n -/// If you want to show the user a preview after capturing is finished, \n -/// an application can use camera_start_preview() after calling this callback. -/// @param[in] user_data The user data passed from the callback registration function -/// @pre This callback function is invoked if it is registered using camera_start_capture() or camera_start_continuous_capture(). -/// @see camera_start_capture() -/// @see camera_start_continuous_capture() -/// @see camera_capturing_cb() -typedef camera_capture_completed_cb - = ffi.Pointer>; -typedef camera_capture_completed_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartcamera_capture_completed_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief The Camera display handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef camera_display_h = ffi.Pointer; - -/// @brief Called when a face is detected in the preview frame. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] faces The detected face array -/// @param[in] count The length of the array -/// @param[in] user_data The user data passed from the callback registration function -/// @see camera_start_face_detection() -typedef camera_face_detected_cb - = ffi.Pointer>; -typedef camera_face_detected_cbFunction = ffi.Void Function( - ffi.Pointer faces, - ffi.Int count, - ffi.Pointer user_data); -typedef Dartcamera_face_detected_cbFunction = void Function( - ffi.Pointer faces, - int count, - ffi.Pointer user_data); - -/// @brief Called once for each supported preview resolution. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] width The preview image width -/// @param[in] height The preview image height -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre camera_foreach_supported_preview_resolution() will invoke this callback. -/// @see camera_foreach_supported_preview_resolution() -typedef camera_supported_preview_resolution_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef camera_supported_preview_resolution_cbFunction = ffi.Bool Function( - ffi.Int width, ffi.Int height, ffi.Pointer user_data); -typedef Dartcamera_supported_preview_resolution_cbFunction = bool Function( - int width, int height, ffi.Pointer user_data); - -/// @brief Called once for each supported capture resolution. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] width The capture resolution width -/// @param[in] height The capture resolution height -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre camera_foreach_supported_capture_resolution() will invoke this callback. -/// @see camera_foreach_supported_capture_resolution() -typedef camera_supported_capture_resolution_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef camera_supported_capture_resolution_cbFunction = ffi.Bool Function( - ffi.Int width, ffi.Int height, ffi.Pointer user_data); -typedef Dartcamera_supported_capture_resolution_cbFunction = bool Function( - int width, int height, ffi.Pointer user_data); - -/// @brief Called once for the pixel format of each supported capture format. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] format The supported pixel format -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre camera_foreach_supported_capture_format() will invoke this callback. -/// @see camera_foreach_supported_capture_format() -typedef camera_supported_capture_format_cb = ffi - .Pointer>; -typedef camera_supported_capture_format_cbFunction = ffi.Bool Function( - ffi.Int32 format, ffi.Pointer user_data); -typedef Dartcamera_supported_capture_format_cbFunction = bool Function( - int format, ffi.Pointer user_data); - -/// @brief Called once for the pixel format of each supported preview format. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] format The supported preview data format -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre camera_foreach_supported_preview_format() will invoke this callback. -/// @see camera_foreach_supported_preview_format() -typedef camera_supported_preview_format_cb = ffi - .Pointer>; -typedef camera_supported_preview_format_cbFunction = ffi.Bool Function( - ffi.Int32 format, ffi.Pointer user_data); -typedef Dartcamera_supported_preview_format_cbFunction = bool Function( - int format, ffi.Pointer user_data); - -/// @brief Called to register for notifications about delivering a copy of the new preview frame when every preview frame is displayed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks This function is issued in the context of internal framework so the UI update code should not be directly invoked.\n -/// If the camera is used as a recorder then this callback function won't be called. -/// -/// @param[in] frame The reference pointer to preview stream data -/// @param[in] user_data The user data passed from the callback registration function -/// @pre camera_start_preview() will invoke this callback function if you register this callback using camera_set_preview_cb(). -/// @see camera_start_preview() -/// @see camera_set_preview_cb() -/// @see camera_unset_preview_cb() -typedef camera_preview_cb - = ffi.Pointer>; -typedef camera_preview_cbFunction = ffi.Void Function( - ffi.Pointer frame, ffi.Pointer user_data); -typedef Dartcamera_preview_cbFunction = void Function( - ffi.Pointer frame, ffi.Pointer user_data); - -/// @brief Called to register for notifications about delivering media packet when every preview frame is displayed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks This function is issued in the context of internal framework so the UI update code should not be directly invoked.\n -/// If the camera is used as a recorder then this callback function won't be called.\n -/// and the packet should be released by media_packet_destroy() after use. -/// -/// @param[in] pkt Reference pointer to media packet -/// @param[in] user_data The user data passed from the callback registration function -/// @pre camera_start_preview() will invoke this callback function if you register this callback using camera_set_media_packet_preview_cb(). -/// @see camera_start_preview() -/// @see camera_set_media_packet_preview_cb() -/// @see camera_unset_media_packet_preview_cb() -typedef camera_media_packet_preview_cb - = ffi.Pointer>; -typedef camera_media_packet_preview_cbFunction = ffi.Void Function( - media_packet_h pkt, ffi.Pointer user_data); -typedef Dartcamera_media_packet_preview_cbFunction = void Function( - media_packet_h pkt, ffi.Pointer user_data); - -/// @brief Called when the camera state is changed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] previous The previous state of the camera -/// @param[in] current The current state of the camera -/// @param[in] by_policy If @c true the state is changed by policy, otherwise @c false -/// @param[in] user_data The user data passed from the callback registration function -/// @pre camera_start_preview(), camera_start_capture() or camera_stop_preview() -/// will invoke this callback if you register this callback using camera_set_state_changed_cb(). -/// @see camera_set_state_changed_cb() -typedef camera_state_changed_cb - = ffi.Pointer>; -typedef camera_state_changed_cbFunction = ffi.Void Function(ffi.Int32 previous, - ffi.Int32 current, ffi.Bool by_policy, ffi.Pointer user_data); -typedef Dartcamera_state_changed_cbFunction = void Function( - int previous, int current, bool by_policy, ffi.Pointer user_data); - -/// @brief Called when the camera is interrupted by policy. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks This callback is called after interrupt handling is completed. -/// @param[in] policy The policy that interrupted the camera -/// @param[in] previous The previous state of the camera -/// @param[in] current The current state of the camera -/// @param[in] user_data The user data passed from the callback registration function -/// @see camera_set_interrupted_cb() -typedef camera_interrupted_cb - = ffi.Pointer>; -typedef camera_interrupted_cbFunction = ffi.Void Function(ffi.Int32 policy, - ffi.Int32 previous, ffi.Int32 current, ffi.Pointer user_data); -typedef Dartcamera_interrupted_cbFunction = void Function( - int policy, int previous, int current, ffi.Pointer user_data); - -/// @brief Called when the camera interrupt is started by policy. -/// @since_tizen 4.0 -/// @remarks This callback is called before interrupt handling is started. -/// @param[in] policy The policy that is interrupting the camera -/// @param[in] state The current state of the camera -/// @param[in] user_data The user data passed from the callback registration function -/// @see camera_set_interrupt_started_cb() -typedef camera_interrupt_started_cb - = ffi.Pointer>; -typedef camera_interrupt_started_cbFunction = ffi.Void Function( - ffi.Int32 policy, ffi.Int32 state, ffi.Pointer user_data); -typedef Dartcamera_interrupt_started_cbFunction = void Function( - int policy, int state, ffi.Pointer user_data); - -/// @brief Called when the camera focus state is changed. -/// @details When the camera auto focus completes or a change to the focus state occurs, -/// this callback is invoked. \n \n -/// Changes of focus state are as follows: \n -/// #CAMERA_FOCUS_STATE_RELEASED -> start focusing -> #CAMERA_FOCUS_STATE_ONGOING -> working -> -/// #CAMERA_FOCUS_STATE_FOCUSED or #CAMERA_FOCUS_STATE_FAILED. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @param[in] state The current state of the auto-focus -/// @param[in] user_data The user data passed from the callback registration function -/// @pre camera_start_focusing() will invoke this callback if you register it using camera_set_focus_changed_cb(). -/// @see camera_set_focus_changed_cb() -/// @see camera_unset_focus_changed_cb() -/// @see camera_start_focusing() -/// @see camera_cancel_focusing() -typedef camera_focus_changed_cb - = ffi.Pointer>; -typedef camera_focus_changed_cbFunction = ffi.Void Function( - ffi.Int32 state, ffi.Pointer user_data); -typedef Dartcamera_focus_changed_cbFunction = void Function( - int state, ffi.Pointer user_data); - -/// @brief Called when an error occurs. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks This callback informs about a critical error situation.\n -/// When this callback is invoked, the user should release the resource and terminate the application.\n -/// In case of errors, one of these codes occur:\n -/// #CAMERA_ERROR_DEVICE,\n -/// #CAMERA_ERROR_INVALID_OPERATION,\n -/// #CAMERA_ERROR_OUT_OF_MEMORY. -/// @param[in] error The error code -/// @param[in] current_state The current state of the camera -/// @param[in] user_data The user data passed from the callback registration function -/// @pre This callback function is invoked if it is registered using camera_set_error_cb(). -/// @see camera_set_error_cb() -/// @see camera_unset_error_cb() -typedef camera_error_cb - = ffi.Pointer>; -typedef camera_error_cbFunction = ffi.Void Function( - ffi.Int32 error, ffi.Int32 current_state, ffi.Pointer user_data); -typedef Dartcamera_error_cbFunction = void Function( - int error, int current_state, ffi.Pointer user_data); - -/// @brief Called when the camera device state is changed. -/// @since_tizen 3.0 -/// @param[in] device The hardware camera type -/// @param[in] state The state of the camera device -/// @param[in] user_data The user data passed from the callback registration function -/// @see camera_add_device_state_changed_cb() -typedef camera_device_state_changed_cb - = ffi.Pointer>; -typedef camera_device_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 device, ffi.Int32 state, ffi.Pointer user_data); -typedef Dartcamera_device_state_changed_cbFunction = void Function( - int device, int state, ffi.Pointer user_data); - -/// @brief Called to get each supported FPS mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] mode The supported FPS mode -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre camera_attr_foreach_supported_fps() will invoke this callback. -/// @see camera_attr_foreach_supported_fps() -typedef camera_attr_supported_fps_cb - = ffi.Pointer>; -typedef camera_attr_supported_fps_cbFunction = ffi.Bool Function( - ffi.Int32 fps, ffi.Pointer user_data); -typedef Dartcamera_attr_supported_fps_cbFunction = bool Function( - int fps, ffi.Pointer user_data); - -/// @brief Called to get each supported auto-focus mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] mode The supported auto-focus mode -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre camera_attr_foreach_supported_af_mode() will invoke this callback. -/// @see camera_attr_foreach_supported_af_mode() -typedef camera_attr_supported_af_mode_cb - = ffi.Pointer>; -typedef camera_attr_supported_af_mode_cbFunction = ffi.Bool Function( - ffi.Int32 mode, ffi.Pointer user_data); -typedef Dartcamera_attr_supported_af_mode_cbFunction = bool Function( - int mode, ffi.Pointer user_data); - -/// @brief Called to get each supported exposure mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] mode The supported exposure mode -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre camera_attr_foreach_supported_exposure_mode() will invoke this callback. -/// @see camera_attr_foreach_supported_exposure_mode() -/// @see #camera_attr_exposure_mode_e -typedef camera_attr_supported_exposure_mode_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef camera_attr_supported_exposure_mode_cbFunction = ffi.Bool Function( - ffi.Int32 mode, ffi.Pointer user_data); -typedef Dartcamera_attr_supported_exposure_mode_cbFunction = bool Function( - int mode, ffi.Pointer user_data); - -/// @brief Called to get each supported ISO mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] iso The supported ISO mode -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre camera_attr_foreach_supported_iso() will invoke this callback. -/// @see camera_attr_foreach_supported_iso() -typedef camera_attr_supported_iso_cb - = ffi.Pointer>; -typedef camera_attr_supported_iso_cbFunction = ffi.Bool Function( - ffi.Int32 iso, ffi.Pointer user_data); -typedef Dartcamera_attr_supported_iso_cbFunction = bool Function( - int iso, ffi.Pointer user_data); - -/// @brief Called to get each supported theater mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] mode The supported theater mode -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop -/// @pre camera_attr_foreach_supported_theater_mode() will invoke this callback. -/// @see camera_attr_foreach_supported_theater_mode() -typedef camera_attr_supported_theater_mode_cb = ffi - .Pointer>; -typedef camera_attr_supported_theater_mode_cbFunction = ffi.Bool Function( - ffi.Int32 mode, ffi.Pointer user_data); -typedef Dartcamera_attr_supported_theater_mode_cbFunction = bool Function( - int mode, ffi.Pointer user_data); - -/// @brief Called to get each supported white balance. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] wb The supported white balance mode -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre camera_attr_foreach_supported_whitebalance() will invoke this callback. -/// @see camera_attr_foreach_supported_whitebalance() -/// @see #camera_attr_whitebalance_e -typedef camera_attr_supported_whitebalance_cb = ffi - .Pointer>; -typedef camera_attr_supported_whitebalance_cbFunction = ffi.Bool Function( - ffi.Int32 wb, ffi.Pointer user_data); -typedef Dartcamera_attr_supported_whitebalance_cbFunction = bool Function( - int wb, ffi.Pointer user_data); - -/// @brief Called to get each supported effect mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] effect The supported effect mode -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre camera_attr_foreach_supported_effect() will invoke this callback. -/// @see camera_attr_foreach_supported_effect() -typedef camera_attr_supported_effect_cb - = ffi.Pointer>; -typedef camera_attr_supported_effect_cbFunction = ffi.Bool Function( - ffi.Int32 effect, ffi.Pointer user_data); -typedef Dartcamera_attr_supported_effect_cbFunction = bool Function( - int effect, ffi.Pointer user_data); - -/// @brief Called to get each supported scene mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] mode The supported scene mode -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre camera_attr_foreach_supported_scene_mode() will invoke this callback. -/// @see camera_attr_foreach_supported_scene_mode() -/// @see #camera_attr_scene_mode_e -typedef camera_attr_supported_scene_mode_cb = ffi - .Pointer>; -typedef camera_attr_supported_scene_mode_cbFunction = ffi.Bool Function( - ffi.Int32 mode, ffi.Pointer user_data); -typedef Dartcamera_attr_supported_scene_mode_cbFunction = bool Function( - int mode, ffi.Pointer user_data); - -/// @brief Called to get each supported flash mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] mode The supported flash mode -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre camera_attr_foreach_supported_flash_mode() will invoke this callback. -/// @see camera_attr_foreach_supported_flash_mode() -typedef camera_attr_supported_flash_mode_cb = ffi - .Pointer>; -typedef camera_attr_supported_flash_mode_cbFunction = ffi.Bool Function( - ffi.Int32 mode, ffi.Pointer user_data); -typedef Dartcamera_attr_supported_flash_mode_cbFunction = bool Function( - int mode, ffi.Pointer user_data); - -/// @brief Called to get each supported stream rotation mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] mode The supported stream rotation mode -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop -/// @pre camera_attr_foreach_supported_stream_rotation() will invoke this callback. -/// @see camera_attr_foreach_supported_stream_rotation() -typedef camera_attr_supported_stream_rotation_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef camera_attr_supported_stream_rotation_cbFunction = ffi.Bool Function( - ffi.Int32 rotation, ffi.Pointer user_data); -typedef Dartcamera_attr_supported_stream_rotation_cbFunction = bool Function( - int rotation, ffi.Pointer user_data); - -/// @brief Called to get each supported stream flip mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] mode The supported stream flip mode -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop -/// @pre camera_attr_foreach_supported_stream_flip() will invoke this callback. -/// @see camera_attr_foreach_supported_stream_flip() -typedef camera_attr_supported_stream_flip_cb = ffi - .Pointer>; -typedef camera_attr_supported_stream_flip_cbFunction = ffi.Bool Function( - ffi.Int32 flip, ffi.Pointer user_data); -typedef Dartcamera_attr_supported_stream_flip_cbFunction = bool Function( - int flip, ffi.Pointer user_data); - -/// @brief Called when the HDR capture process is updated. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] percent The progress percentage of HDR capture -/// @param[in] user_data The user data passed from the callback registration function -/// @pre camera_start_capture() will invoke this callback if you register it using camera_attr_set_hdr_capture_progress_cb(). -/// @see camera_attr_get_hdr_mode() -/// @see camera_attr_set_hdr_capture_progress_cb() -/// @see camera_attr_unset_hdr_capture_progress_cb() -/// @see camera_attr_is_supported_hdr_capture() -typedef camera_attr_hdr_progress_cb - = ffi.Pointer>; -typedef camera_attr_hdr_progress_cbFunction = ffi.Void Function( - ffi.Int percent, ffi.Pointer user_data); -typedef Dartcamera_attr_hdr_progress_cbFunction = void Function( - int percent, ffi.Pointer user_data); - -/// @brief Called to get each supported PTZ(Pan Tilt Zoom) type. -/// @since_tizen 3.0 -/// @param[in] type The supported ptz type -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop -/// @pre camera_attr_foreach_supported_ptz_mode() will invoke this callback. -/// @see camera_attr_foreach_supported_ptz_mode() -typedef camera_attr_supported_ptz_type_cb = ffi - .Pointer>; -typedef camera_attr_supported_ptz_type_cbFunction = ffi.Bool Function( - ffi.Int32 type, ffi.Pointer user_data); -typedef Dartcamera_attr_supported_ptz_type_cbFunction = bool Function( - int type, ffi.Pointer user_data); - -/// @brief Enumeration for error. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class image_util_error_e { - /// < Successful - static const int IMAGE_UTIL_ERROR_NONE = 0; - - /// < Invalid parameter - static const int IMAGE_UTIL_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int IMAGE_UTIL_ERROR_OUT_OF_MEMORY = -12; - - /// < No such file - static const int IMAGE_UTIL_ERROR_NO_SUCH_FILE = -2; - - /// < Internal error - static const int IMAGE_UTIL_ERROR_INVALID_OPERATION = -38; - - /// < Not supported format - static const int IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT = -26345471; - - /// < Permission denied - static const int IMAGE_UTIL_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int IMAGE_UTIL_ERROR_NOT_SUPPORTED = -1073741822; -} - -/// @brief Enumeration for colorspace. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class image_util_colorspace_e { - /// < YV12 - YCrCb planar format - static const int IMAGE_UTIL_COLORSPACE_YV12 = 0; - - /// < YUV422 - planar - static const int IMAGE_UTIL_COLORSPACE_YUV422 = 1; - - /// < YUV420 - planar - static const int IMAGE_UTIL_COLORSPACE_I420 = 2; - - /// < NV12- planar - static const int IMAGE_UTIL_COLORSPACE_NV12 = 3; - - /// < UYVY - packed - static const int IMAGE_UTIL_COLORSPACE_UYVY = 4; - - /// < YUYV - packed - static const int IMAGE_UTIL_COLORSPACE_YUYV = 5; - - /// < RGB565, high-byte is Blue - static const int IMAGE_UTIL_COLORSPACE_RGB565 = 6; - - /// < RGB888, high-byte is Blue - static const int IMAGE_UTIL_COLORSPACE_RGB888 = 7; - - /// < ARGB8888, high-byte is Blue - static const int IMAGE_UTIL_COLORSPACE_ARGB8888 = 8; - - /// < BGRA8888, high-byte is Alpha - static const int IMAGE_UTIL_COLORSPACE_BGRA8888 = 9; - - /// < RGBA8888, high-byte is Alpha - static const int IMAGE_UTIL_COLORSPACE_RGBA8888 = 10; - - /// < BGRX8888, high-byte is X - static const int IMAGE_UTIL_COLORSPACE_BGRX8888 = 11; - - /// < NV12- planar - static const int IMAGE_UTIL_COLORSPACE_NV21 = 12; - - /// < NV16- planar - static const int IMAGE_UTIL_COLORSPACE_NV16 = 13; - - /// < NV61- planar - static const int IMAGE_UTIL_COLORSPACE_NV61 = 14; -} - -/// @brief Enumeration for rotation. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class image_util_rotation_e { - /// < None - static const int IMAGE_UTIL_ROTATION_NONE = 0; - - /// < Rotation 90 degree - static const int IMAGE_UTIL_ROTATION_90 = 1; - - /// < Rotation 180 degree - static const int IMAGE_UTIL_ROTATION_180 = 2; - - /// < Rotation 270 degree - static const int IMAGE_UTIL_ROTATION_270 = 3; - - /// < Flip horizontal - static const int IMAGE_UTIL_ROTATION_FLIP_HORZ = 4; - - /// < Flip vertical - static const int IMAGE_UTIL_ROTATION_FLIP_VERT = 5; -} - -final class transformation_s extends ffi.Opaque {} - -/// @brief Enumeration for Image types. -/// @since_tizen 3.0 -abstract class image_util_type_e { - /// < Image format JPEG - static const int IMAGE_UTIL_JPEG = 0; - - /// < Image format PNG - static const int IMAGE_UTIL_PNG = 1; - - /// < Image format GIF - static const int IMAGE_UTIL_GIF = 2; - - /// < Image format BMP - static const int IMAGE_UTIL_BMP = 3; -} - -/// @brief Enumeration for scale decoding. -/// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif -abstract class image_util_scale_e { - /// < 1/1 downscale - static const int IMAGE_UTIL_DOWNSCALE_1_1 = 0; - - /// < 1/2 downscale - static const int IMAGE_UTIL_DOWNSCALE_1_2 = 1; - - /// < 1/4 downscale - static const int IMAGE_UTIL_DOWNSCALE_1_4 = 2; - - /// < 1/8 downscale - static const int IMAGE_UTIL_DOWNSCALE_1_8 = 3; -} - -/// @brief Enumeration for PNG compression values. -/// @since_tizen 3.0 -abstract class image_util_png_compression_e { - /// < No compression - static const int IMAGE_UTIL_PNG_COMPRESSION_0 = 0; - - /// < Compression Level 1. Best speed - static const int IMAGE_UTIL_PNG_COMPRESSION_1 = 1; - - /// < Compression Level 2 - static const int IMAGE_UTIL_PNG_COMPRESSION_2 = 2; - - /// < Compression Level 3 - static const int IMAGE_UTIL_PNG_COMPRESSION_3 = 3; - - /// < Compression Level 4 - static const int IMAGE_UTIL_PNG_COMPRESSION_4 = 4; - - /// < Compression Level 5 - static const int IMAGE_UTIL_PNG_COMPRESSION_5 = 5; - - /// < Compression Level 6 - static const int IMAGE_UTIL_PNG_COMPRESSION_6 = 6; - - /// < Compression Level 7 - static const int IMAGE_UTIL_PNG_COMPRESSION_7 = 7; - - /// < Compression Level 8 - static const int IMAGE_UTIL_PNG_COMPRESSION_8 = 8; - - /// < Compression Level 9. Best compression - static const int IMAGE_UTIL_PNG_COMPRESSION_9 = 9; -} - -/// @ingroup CAPI_MEDIA_IMAGE_UTIL_ENCODE_DECODE_MODULE -/// @brief Image-util decoding handle. -/// @since_tizen 3.0 -typedef image_util_decode_h = ffi.Pointer; - -/// @ingroup CAPI_MEDIA_IMAGE_UTIL_ENCODE_DECODE_MODULE -/// @brief Image-util encoding handle. -/// @since_tizen 3.0 -typedef image_util_encode_h = ffi.Pointer; - -/// @ingroup CAPI_MEDIA_IMAGE_UTIL_ENCODE_DECODE_MODULE -/// @brief Called when Image-util decoding is finished just before returning the output. -/// @since_tizen 3.0 -/// -/// @remarks The output will be stored in the pointer set using image_util_decode_set_output_buffer() after this callback. \n -/// The callback is called in a separate thread(not in the main loop). -/// -/// @param[in] error_code The error code of image util decoding -/// #IMAGE_UTIL_ERROR_NONE Successful -/// #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter -/// #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation -/// @param[in] user_data The user data passed from the callback registration function -/// @param[in] width Width of the decoded image -/// @param[in] height Height of the decoded image -/// @param[in] size Size of the decoded image -/// -/// @pre image_util_decode_run() will invoke this function. -typedef image_util_decode_completed_cb - = ffi.Pointer>; -typedef image_util_decode_completed_cbFunction = ffi.Void Function( - ffi.Int error_code, - ffi.Pointer user_data, - ffi.UnsignedLong width, - ffi.UnsignedLong height, - ffi.UnsignedLongLong size); -typedef Dartimage_util_decode_completed_cbFunction = void Function( - int error_code, - ffi.Pointer user_data, - int width, - int height, - int size); - -/// @ingroup CAPI_MEDIA_IMAGE_UTIL_ENCODE_DECODE_MODULE -/// @brief Called when Image-util encoding is finished just before returning the output. -/// @since_tizen 3.0 -/// -/// @remarks The output will be stored in the pointer set using image_util_encode_set_output_buffer() or image_util_encode_set_output_path() after this callback. \n -/// The callback is called in a separate thread(not in the main loop). -/// -/// @param[in] error_code The error code of image util encoding -/// #IMAGE_UTIL_ERROR_NONE Successful -/// #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter -/// #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation -/// @param[in] user_data The user data passed from the callback registration function -/// @param[in] size Size of the encoded image -/// -/// @pre image_util_encode_run() will invoke this function. -typedef image_util_encode_completed_cb - = ffi.Pointer>; -typedef image_util_encode_completed_cbFunction = ffi.Void Function( - ffi.Int error_code, - ffi.Pointer user_data, - ffi.UnsignedLongLong size); -typedef Dartimage_util_encode_completed_cbFunction = void Function( - int error_code, ffi.Pointer user_data, int size); - -/// @ingroup CAPI_MEDIA_IMAGE_UTIL_TRANSFORM_MODULE -/// @brief Image util handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef transformation_h = ffi.Pointer; - -/// @ingroup CAPI_MEDIA_IMAGE_UTIL_TRANSFORM_MODULE -/// @brief Called when transform is finished just before returning the output. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @remarks The @a dst should be released using media_packet_destroy(). \n -/// The callback is called in a separate thread(not in the main loop). -/// -/// @param[in,out] dst The result buffer of image util transform -/// @param[in] error_code The error code of image util transfrom -/// @param[in] user_data The user data passed from the callback registration function -/// @pre image_util_transform_run() will invoke this function. -typedef image_util_transform_completed_cb = ffi - .Pointer>; -typedef image_util_transform_completed_cbFunction = ffi.Void Function( - ffi.Pointer dst, - ffi.Int error_code, - ffi.Pointer user_data); -typedef Dartimage_util_transform_completed_cbFunction = void Function( - ffi.Pointer dst, - int error_code, - ffi.Pointer user_data); - -/// @brief Called once for each supported image encode/decode colorspace. -/// @since_tizen 3.0 -/// -/// @param[in] colorspace The colorspace -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// -/// @pre image_util_foreach_supported_colorspace() invokes this callback. -/// -/// @see image_util_foreach_supported_colorspace() -/// @see image_util_encode_create() -/// @see image_util_decode_create() -typedef image_util_supported_colorspace_cb = ffi - .Pointer>; -typedef image_util_supported_colorspace_cbFunction = ffi.Bool Function( - ffi.Int32 colorspace, ffi.Pointer user_data); -typedef Dartimage_util_supported_colorspace_cbFunction = bool Function( - int colorspace, ffi.Pointer user_data); - -final class media_packet_pool_s extends ffi.Opaque {} - -/// @brief The Media Packet Pool Handle. -/// @since_tizen 3.0 -typedef media_packet_pool_h = ffi.Pointer; - -final class mediacodec_s extends ffi.Opaque {} - -/// @brief Enumeration of media codec support type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks If this codec is to be used as an encoder or decoder, the codec flag must be set to #MEDIACODEC_ENCODER or -/// #MEDIACODEC_DECODER. If user doesn't set optional flag, default flags will be set to #MEDIACODEC_SUPPORT_TYPE_SW. -abstract class mediacodec_support_type_e { - /// < This flag is for using the encoder - static const int MEDIACODEC_ENCODER = 1; - - /// < This flag is for using the decoder - static const int MEDIACODEC_DECODER = 2; - - /// < This is an optional flag for using the h/w codec - static const int MEDIACODEC_SUPPORT_TYPE_HW = 4; - - /// < This is an optional flag for using the s/w codec - static const int MEDIACODEC_SUPPORT_TYPE_SW = 8; -} - -/// @brief Enumerations of media codec type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class mediacodec_codec_type_e { - /// < NONE - static const int MEDIACODEC_NONE = 0; - - /// < L16 - static const int MEDIACODEC_L16 = 4112; - - /// < ALAW - static const int MEDIACODEC_ALAW = 4128; - - /// < ULAW - static const int MEDIACODEC_ULAW = 4144; - - /// < MEDIACDEC_AMR indicates AMR-NB (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_AMR = 4160; - - /// < AMR-NB (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_AMR_NB = 4160; - - /// < AMR-WB (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_AMR_WB = 4161; - - /// < G729 - static const int MEDIACODEC_G729 = 4176; - - /// < MEDIACDEC_AAC indicates AAC-LC (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_AAC = 4192; - - /// < AAC-LC (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_AAC_LC = 4192; - - /// < HE-AAC (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_AAC_HE = 4193; - - /// < HE-AAC-PS (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_AAC_HE_PS = 4194; - - /// < MP3 - static const int MEDIACODEC_MP3 = 4208; - - /// < VORBIS (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_VORBIS = 4224; - - /// < FLAC (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_FLAC = 4240; - - /// < WMA version 1 (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_WMAV1 = 4256; - - /// < WMA version 2 (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_WMAV2 = 4257; - - /// < WMA Professional (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_WMAPRO = 4258; - - /// < WMA Lossless (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_WMALSL = 4259; - - /// < H.261 - static const int MEDIACODEC_H261 = 8208; - - /// < H.263 - static const int MEDIACODEC_H263 = 8224; - - /// < H.264 - static const int MEDIACODEC_H264 = 8240; - - /// < MJPEG - static const int MEDIACODEC_MJPEG = 8256; - - /// < MPEG1 - static const int MEDIACODEC_MPEG1 = 8272; - - /// < MPEG2 - static const int MEDIACODEC_MPEG2 = 8288; - - /// < MPEG4 - static const int MEDIACODEC_MPEG4 = 8304; - - /// < HEVC (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_HEVC = 8320; - - /// < VP8 (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_VP8 = 8336; - - /// < VP9 (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_VP9 = 8352; - - /// < VC1 (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_VC1 = 8368; -} - -/// @brief Enumeration of media codec error. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class mediacodec_error_e { - /// < Successful - static const int MEDIACODEC_ERROR_NONE = 0; - - /// < Out of memory - static const int MEDIACODEC_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int MEDIACODEC_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid operation - static const int MEDIACODEC_ERROR_INVALID_OPERATION = -38; - - /// < Not supported - static const int MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE = -1073741822; - - /// < Permission denied - static const int MEDIACODEC_ERROR_PERMISSION_DENIED = -13; - - /// < Invalid state - static const int MEDIACODEC_ERROR_INVALID_STATE = -26935295; - - /// < Invalid input buffer - static const int MEDIACODEC_ERROR_INVALID_INBUFFER = -26935294; - - /// < Invalid output buffer - static const int MEDIACODEC_ERROR_INVALID_OUTBUFFER = -26935293; - - /// < Internal error - static const int MEDIACODEC_ERROR_INTERNAL = -26935292; - - /// < Not initialized mediacodec - static const int MEDIACODEC_ERROR_NOT_INITIALIZED = -26935291; - - /// < Invalid stream - static const int MEDIACODEC_ERROR_INVALID_STREAM = -26935290; - - /// < Not supported format - static const int MEDIACODEC_ERROR_CODEC_NOT_FOUND = -26935289; - - /// < Error while decoding data - static const int MEDIACODEC_ERROR_DECODE = -26935288; - - /// < Out of storage - static const int MEDIACODEC_ERROR_NO_FREE_SPACE = -26935287; - - /// < Cannot find stream - static const int MEDIACODEC_ERROR_STREAM_NOT_FOUND = -26935286; - - /// < Not supported format - static const int MEDIACODEC_ERROR_NOT_SUPPORTED_FORMAT = -26935285; - - /// < Not available buffer - static const int MEDIACODEC_ERROR_BUFFER_NOT_AVAILABLE = -26935284; - - /// < Overflow input buffer (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_ERROR_OVERFLOW_INBUFFER = -26935283; - - /// < Exceed the instance limits (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int MEDIACODEC_ERROR_RESOURCE_OVERLOADED = -26935282; - - /// < Interrupted by a resource conflict (Since 5.0) - static const int MEDIACODEC_ERROR_RESOURCE_CONFLICT = -26935281; -} - -/// @brief Enumeration of buffer status. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class mediacodec_status_e { - /// < The internal queue is running out of data - static const int MEDIACODEC_NEED_DATA = 0; - - /// < The internal queue is full - static const int MEDIACODEC_ENOUGH_DATA = 1; -} - -/// @brief Media Codec type handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef mediacodec_h = ffi.Pointer; - -/// @brief Called when the input buffer(packet) used up. -/// @details It will be invoked when mediacodec has used input buffer. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks The @a packet should be released using media_packet_destroy(). -/// @param[in] packet The media packet handle -/// @param[in] user_data The user data passed from the callback registration function -/// @pre It will be invoked when input buffer process completed if you register this callback using mediacodec_set_input_buffer_used_cb(). -/// @see mediacodec_set_input_buffer_used_cb() -/// @see mediacodec_unset_input_buffer_used_cb() -typedef mediacodec_input_buffer_used_cb - = ffi.Pointer>; -typedef mediacodec_input_buffer_used_cbFunction = ffi.Void Function( - media_packet_h packet, ffi.Pointer user_data); -typedef Dartmediacodec_input_buffer_used_cbFunction = void Function( - media_packet_h packet, ffi.Pointer user_data); - -/// @brief Called when the output buffer is available. -/// @details It will be invoked when mediacodec has output buffer. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks The @a packet should be released using media_packet_destroy(). -/// @param[in] packet The media packet handle -/// @param[in] user_data The user data passed from the callback registration function -/// @pre It will be invoked when mediacodec process completed(had output buffer) if you register this callback using mediacodec_set_fill_buffer_cb(). -/// @see mediacodec_set_output_buffer_available_cb() -/// @see mediacodec_unset_output_buffer_available_cb() -typedef mediacodec_output_buffer_available_cb = ffi - .Pointer>; -typedef mediacodec_output_buffer_available_cbFunction = ffi.Void Function( - media_packet_h packet, ffi.Pointer user_data); -typedef Dartmediacodec_output_buffer_available_cbFunction = void Function( - media_packet_h packet, ffi.Pointer user_data); - -/// @brief Called when the error has occured. -/// @details It will be invoked when the error has occured. -/// Following error codes can be delivered. -/// #MEDIACODEC_ERROR_INTERNAL, -/// #MEDIACODEC_ERROR_INVALID_STREAM, -/// #MEDIACODEC_ERROR_NOT_SUPPORTED_FORMAT, -/// #MEDIACODEC_ERROR_RESOURCE_CONFLICT -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] error The error code -/// @param[in] user_data The user data passed from the callback registration function -/// @pre It will be invoked when the error has occured if you register this callback using mediacodec_set_error_cb(). -/// @see mediacodec_set_error_cb() -/// @see mediacodec_unset_error_cb() -typedef mediacodec_error_cb - = ffi.Pointer>; -typedef mediacodec_error_cbFunction = ffi.Void Function( - ffi.Int32 error, ffi.Pointer user_data); -typedef Dartmediacodec_error_cbFunction = void Function( - int error, ffi.Pointer user_data); - -/// @brief Called when there is no data to decode/encode. -/// @details It will be invoked when the end-of-stream is reached. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] user_data The user data passed from the callback registration function -/// @pre It will be invoked when the eos event generate if you register this callback using mediacodec_set_eos_cb(). -/// @see mediacodec_set_eos_cb() -/// @see mediacodec_unset_eos_cb() -typedef mediacodec_eos_cb - = ffi.Pointer>; -typedef mediacodec_eos_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartmediacodec_eos_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Called when the mediacodec needs more data or has enough data. -/// @details It is recommended that the application stops calling mediacodec_process_input() when #MEDIACODEC_ENOUGH_DATA -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// is invoked. -/// @param[in] status The state of the buffer -/// @param[in] user_data The user data passed from the callback registration function -/// @see mediacodec_set_buffer_status_cb() -/// @see mediacodec_unset_buffer_status_cb() -typedef mediacodec_buffer_status_cb - = ffi.Pointer>; -typedef mediacodec_buffer_status_cbFunction = ffi.Void Function( - ffi.Int32 status, ffi.Pointer user_data); -typedef Dartmediacodec_buffer_status_cbFunction = void Function( - int status, ffi.Pointer user_data); - -/// @brief Called once for each supported codec types. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] codec_type The codec type -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, @c false to break out of the loop. -/// @pre mediacodec_foreach_supported_codec() will invoke this callback. -/// @see mediacodec_foreach_supported_codec() -typedef mediacodec_supported_codec_cb - = ffi.Pointer>; -typedef mediacodec_supported_codec_cbFunction = ffi.Bool Function( - ffi.Int32 codec_type, ffi.Pointer user_data); -typedef Dartmediacodec_supported_codec_cbFunction = bool Function( - int codec_type, ffi.Pointer user_data); - -/// @brief Enumeration for the media controller error. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class mc_error_e { - /// < Successful - static const int MEDIA_CONTROLLER_ERROR_NONE = 0; - - /// < Invalid parameter - static const int MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid Operation - static const int MEDIA_CONTROLLER_ERROR_INVALID_OPERATION = -38; - - /// < No space left on device - static const int MEDIA_CONTROLLER_ERROR_FILE_NO_SPACE_ON_DEVICE = -28; - - /// < Permission denied - static const int MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED = -13; -} - -/// @brief Enumeration for the media controller server state. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class mc_server_state_e { - /// < None state - static const int MC_SERVER_STATE_NONE = 0; - - /// < Activate state - static const int MC_SERVER_STATE_ACTIVATE = 1; - - /// < Deactivate state - static const int MC_SERVER_STATE_DEACTIVATE = 2; -} - -/// @brief Enumeration for the media meta info. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class mc_meta_e { - /// < Title - static const int MC_META_MEDIA_TITLE = 0; - - /// < Artist - static const int MC_META_MEDIA_ARTIST = 1; - - /// < Album - static const int MC_META_MEDIA_ALBUM = 2; - - /// < Author - static const int MC_META_MEDIA_AUTHOR = 3; - - /// < Genre - static const int MC_META_MEDIA_GENRE = 4; - - /// < Duration - static const int MC_META_MEDIA_DURATION = 5; - - /// < Date - static const int MC_META_MEDIA_DATE = 6; - - /// < Copyright - static const int MC_META_MEDIA_COPYRIGHT = 7; - - /// < Description - static const int MC_META_MEDIA_DESCRIPTION = 8; - - /// < Track Number - static const int MC_META_MEDIA_TRACK_NUM = 9; - - /// < Picture. Album Art - static const int MC_META_MEDIA_PICTURE = 10; -} - -/// @brief Enumeration for the media playback state. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class mc_playback_states_e { - /// < None - static const int MC_PLAYBACK_STATE_NONE = 0; - - /// < Playing - static const int MC_PLAYBACK_STATE_PLAYING = 1; - - /// < Paused - static const int MC_PLAYBACK_STATE_PAUSED = 2; - - /// < Stopped - static const int MC_PLAYBACK_STATE_STOPPED = 3; - - /// < Next file (Deprecated since 4.0) - static const int MC_PLAYBACK_STATE_NEXT_FILE = 4; - - /// < Previous file (Deprecated since 4.0) - static const int MC_PLAYBACK_STATE_PREV_FILE = 5; - - /// < Fast forward (Deprecated since 4.0) - static const int MC_PLAYBACK_STATE_FAST_FORWARD = 6; - - /// < Rewind (Deprecated since 4.0) - static const int MC_PLAYBACK_STATE_REWIND = 7; - - /// < Moving to the next item (Since @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif) - static const int MC_PLAYBACK_STATE_MOVING_TO_NEXT = 8; - - /// < Moving to the previous item (Since @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif) - static const int MC_PLAYBACK_STATE_MOVING_TO_PREVIOUS = 9; - - /// < Fast forwarding (Since @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif) - static const int MC_PLAYBACK_STATE_FAST_FORWARDING = 10; - - /// < Rewinding (Since @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif) - static const int MC_PLAYBACK_STATE_REWINDING = 11; -} - -/// @brief Enumeration for the media playback action. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -abstract class mc_playback_action_e { - /// < Play - static const int MC_PLAYBACK_ACTION_PLAY = 0; - - /// < Pause - static const int MC_PLAYBACK_ACTION_PAUSE = 1; - - /// < Stop - static const int MC_PLAYBACK_ACTION_STOP = 2; - - /// < Next item - static const int MC_PLAYBACK_ACTION_NEXT = 3; - - /// < Previous item - static const int MC_PLAYBACK_ACTION_PREV = 4; - - /// < Fast forward - static const int MC_PLAYBACK_ACTION_FAST_FORWARD = 5; - - /// < Rewind - static const int MC_PLAYBACK_ACTION_REWIND = 6; - - /// < Play/Pause toggle - static const int MC_PLAYBACK_ACTION_TOGGLE_PLAY_PAUSE = 7; -} - -/// @brief Enumeration for the shuffle mode. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class mc_shuffle_mode_e { - /// < Shuffle mode on - static const int MC_SHUFFLE_MODE_ON = 0; - - /// < Shuffle mode off - static const int MC_SHUFFLE_MODE_OFF = 1; -} - -/// @brief Enumeration for the repeat mode. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class mc_repeat_mode_e { - /// < Repeat mode on for all media - static const int MC_REPEAT_MODE_ON = 0; - - /// < Repeat mode off - static const int MC_REPEAT_MODE_OFF = 1; - - /// < Repeat mode on for one media (Since @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif) - static const int MC_REPEAT_MODE_ONE_MEDIA = 2; -} - -/// @brief Enumeration for the subscription type. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class mc_subscription_type_e { - /// < Server state - static const int MC_SUBSCRIPTION_TYPE_SERVER_STATE = 0; - - /// < Playback - static const int MC_SUBSCRIPTION_TYPE_PLAYBACK = 1; - - /// < Metadata - static const int MC_SUBSCRIPTION_TYPE_METADATA = 2; - - /// < Shuffle mode - static const int MC_SUBSCRIPTION_TYPE_SHUFFLE_MODE = 3; - - /// < Repeat mode - static const int MC_SUBSCRIPTION_TYPE_REPEAT_MODE = 4; - - /// < Playlist (Since @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif) - static const int MC_SUBSCRIPTION_TYPE_PLAYLIST = 5; - - /// < Playback ability (Since 5.0) - static const int MC_SUBSCRIPTION_TYPE_PLAYBACK_ABILITY = 6; - - /// < Shuffle ability (Since 5.0) - static const int MC_SUBSCRIPTION_TYPE_SHUFFLE_ABILITY = 7; - - /// < Repeat ability (Since 5.0) - static const int MC_SUBSCRIPTION_TYPE_REPEAT_ABILITY = 8; -} - -/// @brief Enumeration for the playlist update mode. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -abstract class mc_playlist_update_mode_e { - /// < Create or Update playlist - static const int MC_PLAYLIST_UPDATED = 0; - - /// < Remove playlist - static const int MC_PLAYLIST_REMOVED = 1; -} - -/// @brief Enumeration for the content type of the content. -/// @since_tizen 5.0 -abstract class mc_content_type_e { - /// < Image content type - static const int MC_CONTENT_TYPE_IMAGE = 0; - - /// < Video content type - static const int MC_CONTENT_TYPE_VIDEO = 1; - - /// < Music content type - static const int MC_CONTENT_TYPE_MUSIC = 2; - - /// < Other content type - static const int MC_CONTENT_TYPE_OTHER = 3; - - /// < Not decided - static const int MC_CONTENT_TYPE_UNDECIDED = 4; -} - -/// @brief Enumeration for the content age rating of the content. -/// @since_tizen 5.0 -abstract class mc_content_age_rating_e { - /// < Suitable for all ages - static const int MC_CONTENT_RATING_ALL = 0; - - /// < Suitable for ages 1 and up - static const int MC_CONTENT_RATING_1_PLUS = 1; - - /// < Suitable for ages 2 and up - static const int MC_CONTENT_RATING_2_PLUS = 2; - - /// < Suitable for ages 3 and up - static const int MC_CONTENT_RATING_3_PLUS = 3; - - /// < Suitable for ages 4 and up - static const int MC_CONTENT_RATING_4_PLUS = 4; - - /// < Suitable for ages 5 and up - static const int MC_CONTENT_RATING_5_PLUS = 5; - - /// < Suitable for ages 6 and up - static const int MC_CONTENT_RATING_6_PLUS = 6; - - /// < Suitable for ages 7 and up - static const int MC_CONTENT_RATING_7_PLUS = 7; - - /// < Suitable for ages 8 and up - static const int MC_CONTENT_RATING_8_PLUS = 8; - - /// < Suitable for ages 9 and up - static const int MC_CONTENT_RATING_9_PLUS = 9; - - /// < Suitable for ages 10 and up - static const int MC_CONTENT_RATING_10_PLUS = 10; - - /// < Suitable for ages 11 and up - static const int MC_CONTENT_RATING_11_PLUS = 11; - - /// < Suitable for ages 12 and up - static const int MC_CONTENT_RATING_12_PLUS = 12; - - /// < Suitable for ages 13 and up - static const int MC_CONTENT_RATING_13_PLUS = 13; - - /// < Suitable for ages 14 and up - static const int MC_CONTENT_RATING_14_PLUS = 14; - - /// < Suitable for ages 15 and up - static const int MC_CONTENT_RATING_15_PLUS = 15; - - /// < Suitable for ages 16 and up - static const int MC_CONTENT_RATING_16_PLUS = 16; - - /// < Suitable for ages 17 and up - static const int MC_CONTENT_RATING_17_PLUS = 17; - - /// < Suitable for ages 18 and up - static const int MC_CONTENT_RATING_18_PLUS = 18; - - /// < Suitable for ages 19 and up - static const int MC_CONTENT_RATING_19_PLUS = 19; -} - -/// @brief Enumeration for the support of the ability. -/// @since_tizen 5.0 -abstract class mc_ability_support_e { - /// < Supported - static const int MC_ABILITY_SUPPORTED_YES = 0; - - /// < Not supported - static const int MC_ABILITY_SUPPORTED_NO = 1; - - /// < Not decided - static const int MC_ABILITY_SUPPORTED_UNDECIDED = 2; -} - -/// @brief Enumeration for the search category. -/// @since_tizen 5.0 -abstract class mc_search_category_e { - /// < No search category - static const int MC_SEARCH_NO_CATEGORY = 0; - - /// < Search by content title - static const int MC_SEARCH_TITLE = 1; - - /// < Search by content artist - static const int MC_SEARCH_ARTIST = 2; - - /// < Search by content album - static const int MC_SEARCH_ALBUM = 3; - - /// < Search by content genre - static const int MC_SEARCH_GENRE = 4; - - /// < Search by Time Place Occasion - static const int MC_SEARCH_TPO = 5; -} - -/// @brief The structure type for the media controller playlist handle. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -typedef mc_playlist_h = ffi.Pointer; - -/// @brief Called for every playlist item in the playlist. -/// -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// -/// @remarks The @a index and @a metadata should not be released by the application. \n -/// The @a index can be used only in the callback. To use outside, make a copy. -/// And @a metadata also can be used only in the callback. To use outside, make a copy with the mc_metadata_clone() function. \n -/// The callback is called in the main loop. -/// -/// @param[in] index The ID of the playlist member. -/// @param[in] metadata The handle to metadata of the playlist item. -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre mc_playlist_foreach_item() will invoke this function. -/// -/// @see mc_playlist_foreach_item() -/// @see mc_metadata_clone() -/// @see mc_metadata_get() -typedef mc_playlist_item_cb - = ffi.Pointer>; -typedef mc_playlist_item_cbFunction = ffi.Bool Function( - ffi.Pointer index, - mc_metadata_h metadata, - ffi.Pointer user_data); -typedef Dartmc_playlist_item_cbFunction = bool Function( - ffi.Pointer index, - mc_metadata_h metadata, - ffi.Pointer user_data); - -/// @brief The structure type for the media controller metadata handle. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -typedef mc_metadata_h = ffi.Pointer; - -/// @brief The structure type for the media controller ability handle. -/// @since_tizen 5.0 -typedef mc_playback_ability_h = ffi.Pointer; - -/// @brief The structure type for the media controller search handle. -/// @since_tizen 5.0 -typedef mc_search_h = ffi.Pointer; - -/// @brief Called for every search condition information in the obtained list of search. -/// @details Iterates over a search list. -/// -/// @since_tizen 5.0 -/// -/// @remarks The callback is called in the main loop. -/// The @a search_keyword and @a data should not be released by the application. \n -/// The @a search_keyword and @a data can be used only in the callback. To use outside, make a copy. -/// -/// @param[in] content_type The content type to search -/// @param[in] category The category to search -/// @param[in] search_keyword The key word to search -/// @param[in] data The extra data -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre mc_search_foreach_condition() will invoke this function. -/// @see mc_search_foreach_condition() -typedef mc_search_condition_cb - = ffi.Pointer>; -typedef mc_search_condition_cbFunction = ffi.Bool Function( - ffi.Int32 content_type, - ffi.Int32 category, - ffi.Pointer search_keyword, - ffi.Pointer data, - ffi.Pointer user_data); -typedef Dartmc_search_condition_cbFunction = bool Function( - int content_type, - int category, - ffi.Pointer search_keyword, - ffi.Pointer data, - ffi.Pointer user_data); - -/// @brief The structure type for the media server handle. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -typedef mc_server_h = ffi.Pointer; - -/// @deprecated Deprecated since 4.0. Use mc_server_playback_action_cmd_received_cb() instead. -/// @brief Called when the server receives the playback state from the client. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// -/// @remarks The callback is called in the dbus event loop. -/// The @a client_name should not be released by the application. \n -/// The @a client_name can be used only in the callback. To use outside, make a copy. -/// -/// @param[in] client_name The app_id of the media controller client. -/// @param[in] state The received playback state -/// @param[in] user_data The user data passed from the mc_server_set_playback_state_command_received_cb() function -/// -/// @pre mc_server_set_playback_state_command_received_cb() -/// -/// @see mc_server_set_playback_state_command_received_cb() -typedef mc_server_playback_state_command_received_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef mc_server_playback_state_command_received_cbFunction - = ffi.Void Function(ffi.Pointer client_name, ffi.Int32 state, - ffi.Pointer user_data); -typedef Dartmc_server_playback_state_command_received_cbFunction - = void Function(ffi.Pointer client_name, int state, - ffi.Pointer user_data); - -/// @brief Called when the server receives the playback action command from the client. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// -/// @remarks The callback is called in the dbus event loop.\n -/// If @a request_id is not null, the server should send the reply to the client with the @a request_id. -/// The @a client_name and @ request_id should not be released by the application. \n -/// The @a client_name and @ request_id can be used only in the callback. To use outside, make a copy. -/// -/// @param[in] client_name The app_id of the media controller client. -/// @param[in] request_id The request_id of the media controller client. -/// @param[in] action The received playback action -/// @param[in] user_data The user data passed from the mc_server_set_playback_action_cmd_received_cb() function -/// -/// @pre mc_server_set_playback_action_cmd_received_cb() -/// -/// @see mc_server_set_playback_action_cmd_received_cb() -/// @see mc_server_send_cmd_reply() -typedef mc_server_playback_action_cmd_received_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef mc_server_playback_action_cmd_received_cbFunction = ffi.Void Function( - ffi.Pointer client_name, - ffi.Pointer request_id, - ffi.Int32 action, - ffi.Pointer user_data); -typedef Dartmc_server_playback_action_cmd_received_cbFunction = void Function( - ffi.Pointer client_name, - ffi.Pointer request_id, - int action, - ffi.Pointer user_data); - -/// @brief Called when the server receives the playback position from the client. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// -/// @remarks The callback is called in the dbus event loop.\n -/// If @a request_id is not null, the server should send the reply to the client with the @a request_id. -/// The @a client_name and @ request_id should not be released by the application. \n -/// The @a client_name and @ request_id can be used only in the callback. To use outside, make a copy. -/// -/// @param[in] client_name The app_id of the media controller client. -/// @param[in] request_id The request_id of the media controller client. -/// @param[in] position The received playback position (milliseconds) -/// @param[in] user_data The user data passed from the mc_server_set_playback_position_cmd_received_cb() function -/// -/// @pre mc_server_set_playback_position_cmd_received_cb() -/// -/// @see mc_server_set_playback_position_cmd_received_cb() -/// @see mc_server_send_cmd_reply() -typedef mc_server_playback_position_cmd_received_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef mc_server_playback_position_cmd_received_cbFunction = ffi.Void Function( - ffi.Pointer client_name, - ffi.Pointer request_id, - ffi.UnsignedLongLong position, - ffi.Pointer user_data); -typedef Dartmc_server_playback_position_cmd_received_cbFunction = void Function( - ffi.Pointer client_name, - ffi.Pointer request_id, - int position, - ffi.Pointer user_data); - -/// @brief Called when the server receives the shuffle mode from the client. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// -/// @remarks The callback is called in the dbus event loop.\n -/// If @a request_id is not null, the server should send the reply to the client with the @a request_id. -/// The @a client_name and @ request_id should not be released by the application. \n -/// The @a client_name and @ request_id can be used only in the callback. To use outside, make a copy. -/// -/// @param[in] client_name The app_id of the media controller client. -/// @param[in] request_id The request_id of the media controller client. -/// @param[in] shuffle_mode The received shuffle_mode -/// @param[in] user_data The user data passed from the mc_server_set_shuffle_mode_cmd_received_cb() function -/// -/// @pre mc_server_set_shuffle_mode_cmd_received_cb() -/// -/// @see mc_server_set_shuffle_mode_cmd_received_cb() -/// @see mc_server_send_cmd_reply() -typedef mc_server_shuffle_mode_cmd_received_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef mc_server_shuffle_mode_cmd_received_cbFunction = ffi.Void Function( - ffi.Pointer client_name, - ffi.Pointer request_id, - ffi.Int32 shuffle_mode, - ffi.Pointer user_data); -typedef Dartmc_server_shuffle_mode_cmd_received_cbFunction = void Function( - ffi.Pointer client_name, - ffi.Pointer request_id, - int shuffle_mode, - ffi.Pointer user_data); - -/// @brief Called when the server receives the repeat mode from the client. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// -/// @remarks The callback is called in the dbus event loop.\n -/// If @a request_id is not null, the server should send the reply to the client with the @a request_id. -/// The @a client_name and @ request_id should not be released by the application. \n -/// The @a client_name and @ request_id can be used only in the callback. To use outside, make a copy. -/// -/// @param[in] client_name The app_id of the media controller client. -/// @param[in] request_id The request_id of the media controller client. -/// @param[in] repeat_mode The received repeat mode -/// @param[in] user_data The user data passed from the mc_server_set_repeat_mode_cmd_received_cb() function -/// -/// @pre mc_server_set_repeat_mode_cmd_received_cb() -/// -/// @see mc_server_set_repeat_mode_cmd_received_cb() -/// @see mc_server_send_cmd_reply() -typedef mc_server_repeat_mode_cmd_received_cb = ffi - .Pointer>; -typedef mc_server_repeat_mode_cmd_received_cbFunction = ffi.Void Function( - ffi.Pointer client_name, - ffi.Pointer request_id, - ffi.Int32 repeat_mode, - ffi.Pointer user_data); -typedef Dartmc_server_repeat_mode_cmd_received_cbFunction = void Function( - ffi.Pointer client_name, - ffi.Pointer request_id, - int repeat_mode, - ffi.Pointer user_data); - -/// @deprecated Deprecated since 4.0. Use mc_server_custom_cmd_received_cb() instead. -/// @brief Called when the Server receives custom command from the client. -/// @details This callback is called when server receives custom command from client. -/// If there is reply for command, call mc_server_send_command_reply() function. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// -/// @remarks The callback is called in the dbus event loop. @a data should be released using bundle_free().\n -/// The @a client_name and @ request_id should not be released by the application. \n -/// The @a client_name and @ command can be used only in the callback. To use outside, make a copy. -/// -/// @param[in] client_name The app_id of the media controller client. -/// @param[in] command The received command. -/// @param[in] data The extra data -/// @param[in] user_data The user data passed from the mc_server_set_custom_command_received_cb() function -/// -/// @pre mc_server_set_custom_command_received_cb() -/// -/// @see mc_server_set_custom_command_received_cb() -typedef mc_server_custom_command_received_cb = ffi - .Pointer>; -typedef mc_server_custom_command_received_cbFunction = ffi.Void Function( - ffi.Pointer client_name, - ffi.Pointer command, - ffi.Pointer data, - ffi.Pointer user_data); -typedef Dartmc_server_custom_command_received_cbFunction = void Function( - ffi.Pointer client_name, - ffi.Pointer command, - ffi.Pointer data, - ffi.Pointer user_data); - -/// @brief Called when the Server receives playlist command from the client. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// -/// @remarks The callback is called in the dbus event loop. \n -/// If @a request_id is not null, the server should send the reply to the client with the @a request_id. -/// The @a client_name, @ request_id, @ playlist_name and @ index should not be released by the application. \n -/// The @a client_name, @ request_id, @ playlist_name and @ index can be used only in the callback. To use outside, make a copy. -/// -/// @param[in] client_name The app_id of the media controller client. -/// @param[in] request_id The request_id of the media controller client. -/// @param[in] playlist_name The name of the server playlist. -/// @param[in] index The index of the media in playlist. -/// @param[in] action The received playback action -/// @param[in] position The received playback position (milliseconds) -/// @param[in] user_data The user data passed from the mc_server_set_playlist_cmd_received_cb() function -/// -/// @pre mc_server_set_playlist_cmd_received_cb() -/// -/// @see mc_server_set_playlist_cmd_received_cb() -/// @see mc_server_send_cmd_reply() -typedef mc_server_playlist_cmd_received_cb = ffi - .Pointer>; -typedef mc_server_playlist_cmd_received_cbFunction = ffi.Void Function( - ffi.Pointer client_name, - ffi.Pointer request_id, - ffi.Pointer playlist_name, - ffi.Pointer index, - ffi.Int32 action, - ffi.UnsignedLongLong position, - ffi.Pointer user_data); -typedef Dartmc_server_playlist_cmd_received_cbFunction = void Function( - ffi.Pointer client_name, - ffi.Pointer request_id, - ffi.Pointer playlist_name, - ffi.Pointer index, - int action, - int position, - ffi.Pointer user_data); - -/// @brief Called when the Server receives custom command from the client. -/// @details This callback is called when server receives custom command from client. -/// If you want to reply to the command, call mc_server_send_cmd_reply() function. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// -/// @remarks The callback is called in the dbus event loop. @a data should be released using bundle_free().\n -/// If @a request_id is not null, the server should send the reply to the client with the @a request_id. -/// The @a client_name, @ request_id and @ command should not be released by the application. \n -/// The @a client_name, @ request_id and @ command can be used only in the callback. To use outside, make a copy. -/// -/// @param[in] client_name The app_id of the media controller client. -/// @param[in] request_id The id of the command request -/// @param[in] command The received command. -/// @param[in] data The extra data -/// @param[in] user_data The user data passed from the mc_server_set_custom_cmd_received_cb() function -/// -/// @pre mc_server_set_custom_cmd_received_cb() -/// -/// @see mc_server_set_custom_cmd_received_cb() -/// @see mc_server_unset_custom_cmd_received_cb() -/// @see mc_server_send_cmd_reply() -typedef mc_server_custom_cmd_received_cb - = ffi.Pointer>; -typedef mc_server_custom_cmd_received_cbFunction = ffi.Void Function( - ffi.Pointer client_name, - ffi.Pointer request_id, - ffi.Pointer command, - ffi.Pointer data, - ffi.Pointer user_data); -typedef Dartmc_server_custom_cmd_received_cbFunction = void Function( - ffi.Pointer client_name, - ffi.Pointer request_id, - ffi.Pointer command, - ffi.Pointer data, - ffi.Pointer user_data); - -/// @brief Called when requesting the list of created clients. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// -/// @remarks The callback is called in the main loop. \n -/// The @a client_name should not be released by the application. \n -/// The @a client_name can be used only in the callback. To use outside, make a copy. -/// -/// @param[in] client_name The app_id of the created media controller client. -/// @param[in] user_data The user data passed from the mc_client_foreach_server() function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre mc_server_foreach_client() -/// -/// @see mc_server_foreach_client() -typedef mc_activated_client_cb - = ffi.Pointer>; -typedef mc_activated_client_cbFunction = ffi.Bool Function( - ffi.Pointer client_name, ffi.Pointer user_data); -typedef Dartmc_activated_client_cbFunction = bool Function( - ffi.Pointer client_name, ffi.Pointer user_data); - -/// @brief Called when the result of the event from the client is received. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// -/// @remarks The callback is called in the dbus event loop. @a data should be released using bundle_free(). \n -/// The @a client_name and @a request_id should not be released by the application. \n -/// The @a client_name and @a request_id can be used only in the callback. To use outside, make a copy. -/// -/// @param[in] client_name The app_id of the media controller client which sent the reply. It can be used only in the callback. To use outside, make a copy. -/// @param[in] request_id The id of the event request -/// @param[in] result_code The result code of the event -/// @param[in] data The extra data -/// @param[in] user_data The user data passed from the mc_server_set_event_reply_received_cb() function -/// -/// @pre mc_server_send_custom_event() -/// @pre mc_server_set_event_reply_received_cb() -/// -/// @see mc_server_send_custom_event() -/// @see mc_server_set_event_reply_received_cb() -/// @see mc_server_unset_event_reply_received_cb() -typedef mc_server_event_reply_received_cb = ffi - .Pointer>; -typedef mc_server_event_reply_received_cbFunction = ffi.Void Function( - ffi.Pointer client_name, - ffi.Pointer request_id, - ffi.Int result_code, - ffi.Pointer data, - ffi.Pointer user_data); -typedef Dartmc_server_event_reply_received_cbFunction = void Function( - ffi.Pointer client_name, - ffi.Pointer request_id, - int result_code, - ffi.Pointer data, - ffi.Pointer user_data); - -/// @brief Called when the Server receives search command from the client. -/// @details This callback is called when server receives search command from client. -/// If you want to reply to the command, call mc_server_send_cmd_reply() function. -/// @since_tizen 5.0 -/// -/// @remarks The callback is called in the dbus event loop.\n -/// If @a request_id is not null, the server should send the reply to the client with the @a request_id. -/// The @a client_name, @a request_id and @a search should not be released by the application. \n -/// The @a client_name and @a request_id can be used only in the callback. To use outside, make a copy. -/// @a search also can be used only in the callback. To use outside, make a copy using mc_search_clone(). \n -/// -/// @param[in] client_name The app_id of the media controller client. -/// @param[in] request_id The id of the command request -/// @param[in] search The handle to search -/// @param[in] user_data The user data passed from the mc_server_set_search_cmd_received_cb() function -/// -/// @pre mc_server_set_search_cmd_received_cb() -/// @see mc_server_set_search_cmd_received_cb() -/// @see mc_server_unset_search_cmd_received_cb() -/// @see mc_server_send_cmd_reply() -/// @see mc_search_foreach_condition() -/// @see mc_search_clone() -typedef mc_server_search_cmd_received_cb - = ffi.Pointer>; -typedef mc_server_search_cmd_received_cbFunction = ffi.Void Function( - ffi.Pointer client_name, - ffi.Pointer request_id, - mc_search_h search, - ffi.Pointer user_data); -typedef Dartmc_server_search_cmd_received_cbFunction = void Function( - ffi.Pointer client_name, - ffi.Pointer request_id, - mc_search_h search, - ffi.Pointer user_data); - -/// @brief Called for every playlist. -/// -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// -/// @remarks The @a playlist should not be released by the application. \n -/// To use the @a playlist outside this function, copy the handle with the mc_playlist_clone() function. \n -/// The callback is called in the main loop. -/// -/// @param[in] playlist The handle to the media controller playlist. -/// @param[in] user_data The user data passed from the foreach function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre mc_server_foreach_playlist() and mc_client_foreach_server_playlist() will invoke this function. -/// -/// @see mc_playlist_clone() -/// @see mc_server_foreach_playlist() -/// @see mc_client_foreach_server_playlist() -/// @see mc_playlist_get_name() -/// @see mc_playlist_foreach_item() -typedef mc_playlist_cb - = ffi.Pointer>; -typedef mc_playlist_cbFunction = ffi.Bool Function( - mc_playlist_h playlist, ffi.Pointer user_data); -typedef Dartmc_playlist_cbFunction = bool Function( - mc_playlist_h playlist, ffi.Pointer user_data); - -/// @brief The structure type for the media client handle. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -typedef mc_client_h = ffi.Pointer; - -/// @brief Called when updating status of the media controller server. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// -/// @remarks The callback is called in the dbus event loop. -/// The @a server_name should not be released by the application. \n -/// The @a server_name can be used only in the callback. To use outside, make a copy. -/// -/// @param[in] server_name The app_id of the media controller server which sent the notification. -/// @param[in] state The state of the updated media controller server -/// @param[in] user_data The user data passed from the mc_client_set_server_updated_cb() function -/// -/// @pre mc_client_set_server_updated_cb() -/// -/// @see mc_client_set_server_updated_cb() -typedef mc_server_state_updated_cb - = ffi.Pointer>; -typedef mc_server_state_updated_cbFunction = ffi.Void Function( - ffi.Pointer server_name, - ffi.Int32 state, - ffi.Pointer user_data); -typedef Dartmc_server_state_updated_cbFunction = void Function( - ffi.Pointer server_name, - int state, - ffi.Pointer user_data); - -/// @brief Called when updating the playback information of the media controller server. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// -/// @remarks The callback is called in the dbus event loop. -/// The @a server_name and @a playback should not be released by the application. \n -/// The @a server_name can be used only in the callback. To use outside, make a copy. -/// And @a playback also can be used only in the callback. \n -/// -/// @param[in] server_name The app_id of the media controller server which sent the notification. -/// @param[in] playback The playback information of the updated media controller server. -/// @param[in] user_data The user data passed from the mc_client_set_playback_updated_cb() function -/// -/// @pre mc_client_set_playback_updated_cb() -/// -/// @see mc_client_set_playback_updated_cb() -/// @see mc_client_get_playback_state() -/// @see mc_client_get_playback_position() -/// @see mc_client_get_playlist_item_info() -typedef mc_playback_updated_cb - = ffi.Pointer>; -typedef mc_playback_updated_cbFunction = ffi.Void Function( - ffi.Pointer server_name, - mc_playback_h playback, - ffi.Pointer user_data); -typedef Dartmc_playback_updated_cbFunction = void Function( - ffi.Pointer server_name, - mc_playback_h playback, - ffi.Pointer user_data); - -/// @brief The structure type for the media controller playback handle. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -typedef mc_playback_h = ffi.Pointer; - -/// @brief Called when updating the metadata of the media controller server. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// -/// @remarks The callback is called in the dbus event loop. -/// The @a server_name and @a metadata should not be released by the application. \n -/// The @a server_name can be used only in the callback. To use outside, make a copy. -/// And @a metadata also can be used only in the callback. To use outside, make a copy using mc_metadata_clone() \n -/// -/// @param[in] server_name The app_id of the media controller server which sent the notification. -/// @param[in] metadata The metadata of the updated media controller server. -/// @param[in] user_data The user data passed from the mc_client_set_metadata_updated_cb() function -/// -/// @pre mc_client_set_metadata_updated_cb() -/// -/// @see mc_client_set_metadata_updated_cb() -/// @see mc_metadata_get() -typedef mc_metadata_updated_cb - = ffi.Pointer>; -typedef mc_metadata_updated_cbFunction = ffi.Void Function( - ffi.Pointer server_name, - mc_metadata_h metadata, - ffi.Pointer user_data); -typedef Dartmc_metadata_updated_cbFunction = void Function( - ffi.Pointer server_name, - mc_metadata_h metadata, - ffi.Pointer user_data); - -/// @deprecated Deprecated since 4.0. Use mc_shuffle_mode_updated_cb() instead. -/// @brief Called when updating the shuffle mode of the media controller server. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// -/// @remarks The callback is called in the dbus event loop. -/// -/// @param[in] server_name The app_id of the media controller server which sent the notification. It can be used only in the callback. To use outside, make a copy. -/// @param[in] mode The shuffle mode of the updated media controller server -/// @param[in] user_data The user data passed from the mc_client_set_shuffle_mode_update_cb() function -/// -/// @pre mc_client_set_shuffle_mode_update_cb() -/// -/// @see mc_client_set_shuffle_mode_update_cb() -typedef mc_shuffle_mode_changed_cb - = ffi.Pointer>; -typedef mc_shuffle_mode_changed_cbFunction = ffi.Void Function( - ffi.Pointer server_name, - ffi.Int32 mode, - ffi.Pointer user_data); -typedef Dartmc_shuffle_mode_changed_cbFunction = void Function( - ffi.Pointer server_name, - int mode, - ffi.Pointer user_data); - -/// @deprecated Deprecated since 4.0. Use mc_repeat_mode_updated_cb() instead. -/// @brief Called when updating the repeat mode of the media controller server. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// -/// @remarks The callback is called in the dbus event loop. -/// -/// @param[in] server_name The app_id of the media controller server which sent the notification. It can be used only in the callback. To use outside, make a copy. -/// @param[in] mode The repeat mode of the updated media controller server -/// @param[in] user_data The user data passed from the mc_client_set_repeat_mode_update_cb() function -/// -/// @pre mc_client_set_repeat_mode_update_cb() -/// -/// @see mc_client_set_repeat_mode_update_cb() -typedef mc_repeat_mode_changed_cb - = ffi.Pointer>; -typedef mc_repeat_mode_changed_cbFunction = ffi.Void Function( - ffi.Pointer server_name, - ffi.Int32 mode, - ffi.Pointer user_data); -typedef Dartmc_repeat_mode_changed_cbFunction = void Function( - ffi.Pointer server_name, - int mode, - ffi.Pointer user_data); - -/// @brief Called when updating the shuffle mode of the media controller server. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// -/// @remarks The callback is called in the dbus event loop. -/// The @a server_name should not be released by the application. \n -/// The @a server_name can be used only in the callback. To use outside, make a copy. -/// -/// @param[in] server_name The app_id of the media controller server which sent the notification. -/// @param[in] mode The shuffle mode of the updated media controller server -/// @param[in] user_data The user data passed from the mc_client_set_shuffle_mode_updated_cb() function -/// -/// @pre mc_client_set_shuffle_mode_updated_cb() -/// -/// @see mc_client_set_shuffle_mode_updated_cb() -typedef mc_shuffle_mode_updated_cb - = ffi.Pointer>; -typedef mc_shuffle_mode_updated_cbFunction = ffi.Void Function( - ffi.Pointer server_name, - ffi.Int32 mode, - ffi.Pointer user_data); -typedef Dartmc_shuffle_mode_updated_cbFunction = void Function( - ffi.Pointer server_name, - int mode, - ffi.Pointer user_data); - -/// @brief Called when updating the repeat mode of the media controller server. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// -/// @remarks The callback is called in the dbus event loop. -/// The @a server_name should not be released by the application. \n -/// The @a server_name can be used only in the callback. To use outside, make a copy. -/// -/// @param[in] server_name The app_id of the media controller server which sent the notification.. -/// @param[in] mode The repeat mode of the updated media controller server -/// @param[in] user_data The user data passed from the mc_client_set_repeat_mode_updated_cb() function -/// -/// @pre mc_client_set_repeat_mode_updated_cb() -/// -/// @see mc_client_set_repeat_mode_updated_cb() -typedef mc_repeat_mode_updated_cb - = ffi.Pointer>; -typedef mc_repeat_mode_updated_cbFunction = ffi.Void Function( - ffi.Pointer server_name, - ffi.Int32 mode, - ffi.Pointer user_data); -typedef Dartmc_repeat_mode_updated_cbFunction = void Function( - ffi.Pointer server_name, - int mode, - ffi.Pointer user_data); - -/// @brief Called when updating the playback ability of the media controller server. -/// @since_tizen 5.0 -/// -/// @remarks The callback is called in the dbus event loop. -/// The @a server_name should not be released by the application. \n -/// The @a server_name can be used only in the callback. To use outside, make a copy. -/// And @a ability also can be used only in the callback. To use outside, make a copy using mc_playback_ability_clone() \n -/// -/// @param[in] server_name The app_id of the media controller server which sent the notification -/// @param[in] ability The ability of the updated media controller server -/// @param[in] user_data The user data passed from the mc_client_set_playback_ability_updated_cb() function -/// -/// @pre mc_client_set_playback_ability_updated_cb() -/// -/// @see mc_client_set_playback_ability_updated_cb() -/// @see mc_playback_action_is_supported() -typedef mc_playback_ability_updated_cb - = ffi.Pointer>; -typedef mc_playback_ability_updated_cbFunction = ffi.Void Function( - ffi.Pointer server_name, - mc_playback_ability_h ability, - ffi.Pointer user_data); -typedef Dartmc_playback_ability_updated_cbFunction = void Function( - ffi.Pointer server_name, - mc_playback_ability_h ability, - ffi.Pointer user_data); - -/// @brief Called when updating the shuffle ability of the media controller server. -/// @since_tizen 5.0 -/// -/// @remarks The callback is called in the dbus event loop. -/// The @a server_name should not be released by the application. \n -/// The @a server_name can be used only in the callback. To use outside, make a copy. -/// -/// @param[in] server_name The app_id of the media controller server which sent the notification -/// @param[in] support The support value of the ability of the updated media controller server -/// @param[in] user_data The user data passed from the mc_client_set_shuffle_ability_updated_cb() function -/// -/// @pre mc_client_set_shuffle_ability_updated_cb() -/// -/// @see mc_client_set_shuffle_ability_updated_cb() -typedef mc_shuffle_ability_updated_cb - = ffi.Pointer>; -typedef mc_shuffle_ability_updated_cbFunction = ffi.Void Function( - ffi.Pointer server_name, - ffi.Int32 support, - ffi.Pointer user_data); -typedef Dartmc_shuffle_ability_updated_cbFunction = void Function( - ffi.Pointer server_name, - int support, - ffi.Pointer user_data); - -/// @brief Called when updating the repeat ability of the media controller server. -/// @since_tizen 5.0 -/// -/// @remarks The callback is called in the dbus event loop. -/// The @a server_name should not be released by the application. \n -/// The @a server_name can be used only in the callback. To use outside, make a copy. -/// -/// @param[in] server_name The app_id of the media controller server which sent the notification -/// @param[in] support The support value of the ability of the updated media controller server -/// @param[in] user_data The user data passed from the mc_client_set_repeat_ability_updated_cb() function -/// -/// @pre mc_client_set_repeat_ability_updated_cb() -/// -/// @see mc_client_set_repeat_ability_updated_cb() -typedef mc_repeat_ability_updated_cb - = ffi.Pointer>; -typedef mc_repeat_ability_updated_cbFunction = ffi.Void Function( - ffi.Pointer server_name, - ffi.Int32 support, - ffi.Pointer user_data); -typedef Dartmc_repeat_ability_updated_cbFunction = void Function( - ffi.Pointer server_name, - int support, - ffi.Pointer user_data); - -/// @brief Called when the result of the command from the server is received. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// -/// @remarks The callback is called in the dbus event loop. @a data should be released using bundle_free(). -/// The @a server_name and @ request_id should not be released by the application. \n -/// The @a server_name and @ request_id can be used only in the callback. To use outside, make a copy. -/// -/// @param[in] server_name The app_id of the media controller server which sent the reply, -/// @param[in] request_id The id of the command request -/// @param[in] result_code The result code of the action -/// @param[in] data The extra data -/// @param[in] user_data The user data passed from the mc_client_set_cmd_reply_received_cb() function -/// -/// @pre mc_client_send_custom_cmd() -/// @pre mc_client_set_cmd_reply_received_cb() -/// -/// @see mc_client_send_custom_cmd() -typedef mc_cmd_reply_received_cb - = ffi.Pointer>; -typedef mc_cmd_reply_received_cbFunction = ffi.Void Function( - ffi.Pointer server_name, - ffi.Pointer request_id, - ffi.Int result_code, - ffi.Pointer data, - ffi.Pointer user_data); -typedef Dartmc_cmd_reply_received_cbFunction = void Function( - ffi.Pointer server_name, - ffi.Pointer request_id, - int result_code, - ffi.Pointer data, - ffi.Pointer user_data); - -/// @brief Called when updating the playlist of the media controller server. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// -/// @remarks The callback is called in the dbus event loop. -/// The @a server_name, @a playlist_name and @a playlist should not be released by the application. \n -/// The @a server_name and @a playlist_name can be used only in the callback. To use outside, make a copy. -/// And @a playlist also can be used only in the callback. To use outside, make a copy using mc_playlist_clone(). \n -/// -/// @param[in] server_name The app_id of the media controller server which sent the notification. -/// @param[in] mode The playlist update mode of the updated media controller server -/// @param[in] playlist_name Updated playlist name. -/// @param[in] playlist The handle to the media controller playlist. -/// @param[in] user_data The user data passed from the mc_client_set_playlist_updated_cb() function -/// -/// @pre mc_client_set_playlist_updated_cb() -/// -/// @see mc_client_set_playlist_updated_cb() -/// @see mc_client_foreach_server_playlist() -typedef mc_playlist_updated_cb - = ffi.Pointer>; -typedef mc_playlist_updated_cbFunction = ffi.Void Function( - ffi.Pointer server_name, - ffi.Int32 mode, - ffi.Pointer playlist_name, - mc_playlist_h playlist, - ffi.Pointer user_data); -typedef Dartmc_playlist_updated_cbFunction = void Function( - ffi.Pointer server_name, - int mode, - ffi.Pointer playlist_name, - mc_playlist_h playlist, - ffi.Pointer user_data); - -/// @brief Called when receiving custom event of media controller servers. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// -/// @remarks The callback is called in the dbus event loop. The @a data should be released using bundle_free(). \n -/// The @a server_name, @a request_id and @a event should not be released by the application. \n -/// The @a server_name, @a request_id and @a event can be used only in the callback. To use outside, make a copy. -/// -/// @param[in] server_name The app_id of the subscribed media controller server. -/// @param[in] request_id The id of the custom event request -/// @param[in] event The name of the custom event -/// @param[in] data The data can include other information associated with the event -/// @param[in] user_data The user data passed from the mc_client_set_custom_event_received_cb() function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre mc_client_set_custom_event_received_cb() -/// -/// @see mc_client_set_custom_event_received_cb() -/// @see mc_client_unset_custom_event_received_cb() -typedef mc_client_custom_event_received_cb = ffi - .Pointer>; -typedef mc_client_custom_event_received_cbFunction = ffi.Void Function( - ffi.Pointer server_name, - ffi.Pointer request_id, - ffi.Pointer event, - ffi.Pointer data, - ffi.Pointer user_data); -typedef Dartmc_client_custom_event_received_cbFunction = void Function( - ffi.Pointer server_name, - ffi.Pointer request_id, - ffi.Pointer event, - ffi.Pointer data, - ffi.Pointer user_data); - -/// @brief Called when requesting the list of subscribed servers. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// -/// @remarks The callback is called in the dbus event loop. -/// The @a server_name should not be released by the application. \n -/// The @a server_name can be used only in the callback. To use outside, make a copy. -/// -/// @param[in] server_name The app_id of the subscribed media controller server.. -/// @param[in] user_data The user data passed from the mc_client_foreach_server_subscribed() function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre mc_client_foreach_server_subscribed() -/// -/// @see mc_client_foreach_server_subscribed() -typedef mc_subscribed_server_cb - = ffi.Pointer>; -typedef mc_subscribed_server_cbFunction = ffi.Bool Function( - ffi.Pointer server_name, ffi.Pointer user_data); -typedef Dartmc_subscribed_server_cbFunction = bool Function( - ffi.Pointer server_name, ffi.Pointer user_data); - -/// @brief Called when requesting the list of created servers. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// -/// @remarks The callback is called in the main loop. -/// The @a server_name should not be released by the application. \n -/// The @a server_name can be used only in the callback. To use outside, make a copy. -/// -/// @param[in] server_name The app_id of the created media controller server. -/// @param[in] user_data The user data passed from the mc_client_foreach_server() function -/// -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// -/// @pre mc_client_foreach_server() -/// -/// @see mc_client_foreach_server() -typedef mc_activated_server_cb - = ffi.Pointer>; -typedef mc_activated_server_cbFunction = ffi.Bool Function( - ffi.Pointer server_name, ffi.Pointer user_data); -typedef Dartmc_activated_server_cbFunction = bool Function( - ffi.Pointer server_name, ffi.Pointer user_data); - -/// @deprecated Deprecated since 4.0. Use mc_cmd_reply_received_cb() instead. -/// @brief Called when receiving the command processing result from the server. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// -/// @remarks The callback is called in the dbus event loop. @a data should be released using bundle_free(). -/// -/// @param[in] server_name The app_id of the media controller server which sent the reply, It can be used only in the callback. To use outside, make a copy. -/// @param[in] result_code The result code of custom command -/// @param[in] data The extra data -/// @param[in] user_data The user data passed from the mc_client_send_custom_command() function -/// -/// @pre mc_client_send_custom_command() -/// -/// @see mc_client_send_custom_command() -typedef mc_command_reply_received_cb - = ffi.Pointer>; -typedef mc_command_reply_received_cbFunction = ffi.Void Function( - ffi.Pointer server_name, - ffi.Int result_code, - ffi.Pointer data, - ffi.Pointer user_data); -typedef Dartmc_command_reply_received_cbFunction = void Function( - ffi.Pointer server_name, - int result_code, - ffi.Pointer data, - ffi.Pointer user_data); - -final class mediademuxer_s extends ffi.Opaque {} - -/// @brief Enumeration for media demuxer state. -/// @since_tizen 3.0 -abstract class mediademuxer_state { - /// < The mediademuxer is not created - static const int MEDIADEMUXER_STATE_NONE = 0; - - /// < The mediademuxer is created, but not prepared - static const int MEDIADEMUXER_STATE_IDLE = 1; - - /// < The mediademuxer is ready to demux media - static const int MEDIADEMUXER_STATE_READY = 2; - - /// < The mediademuxer is demuxing media - static const int MEDIADEMUXER_STATE_DEMUXING = 3; -} - -/// @brief Enumeration for media demuxer error. -/// @since_tizen 3.0 -abstract class mediademuxer_error_e { - /// < Successful - static const int MEDIADEMUXER_ERROR_NONE = 0; - - /// < Out of memory - static const int MEDIADEMUXER_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int MEDIADEMUXER_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid operation - static const int MEDIADEMUXER_ERROR_INVALID_OPERATION = -38; - - /// < Not supported - static const int MEDIADEMUXER_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Permission denied - static const int MEDIADEMUXER_ERROR_PERMISSION_DENIED = -13; - - /// < Invalid state - static const int MEDIADEMUXER_ERROR_INVALID_STATE = -27131903; - - /// < Invalid path - static const int MEDIADEMUXER_ERROR_INVALID_PATH = -27131902; - - /// < Resource limit - static const int MEDIADEMUXER_ERROR_RESOURCE_LIMIT = -27131901; - - /// < Seek operation failure - static const int MEDIADEMUXER_ERROR_SEEK_FAILED = -27131900; - - /// < Not permitted format - static const int MEDIADEMUXER_ERROR_DRM_NOT_PERMITTED = -27131899; -} - -/// @brief Media Demuxer handle type. -/// @since_tizen 3.0 -typedef mediademuxer_h = ffi.Pointer; - -/// @brief Called when error occurs in media demuxer. -/// @details Following error codes can be delivered. -/// #MEDIADEMUXER_ERROR_INVALID_OPERATION, -/// #MEDIADEMUXER_ERROR_NOT_SUPPORTED, -/// #MEDIADEMUXER_ERROR_INVALID_PATH, -/// #MEDIADEMUXER_ERROR_RESOURCE_LIMIT, -/// #MEDIADEMUXER_ERROR_SEEK_FAILED, -/// #MEDIADEMUXER_ERROR_DRM_NOT_PERMITTED -/// @since_tizen 3.0 -/// @param[in] error The error that occurred in media demuxer -/// @param[in] user_data The user data passed from the code where -/// mediademuxer_set_error_cb() was invoked -/// This data will be accessible from mediademuxer_error_cb() -/// @pre Create media demuxer handle by calling mediademuxer_create() function. -/// @see mediademuxer_set_error_cb() -/// @see mediademuxer_unset_error_cb() -typedef mediademuxer_error_cb - = ffi.Pointer>; -typedef mediademuxer_error_cbFunction = ffi.Void Function( - ffi.Int32 error, ffi.Pointer user_data); -typedef Dartmediademuxer_error_cbFunction = void Function( - int error, ffi.Pointer user_data); - -/// @brief Called when end of stream occurs in media demuxer. -/// @since_tizen 3.0 -/// @param[in] track_num The track_num which indicate eos for which track number occured -/// @param[in] user_data The user data passed from the code where -/// mediademuxer_set_eos_cb() was invoked -/// This data will be accessible from mediademuxer_eos_cb() -/// @pre Create media demuxer handle by calling mediademuxer_create() function. -/// @see mediademuxer_set_eos_cb() -/// @see mediademuxer_unset_eos_cb() -typedef mediademuxer_eos_cb - = ffi.Pointer>; -typedef mediademuxer_eos_cbFunction = ffi.Void Function( - ffi.Int track_num, ffi.Pointer user_data); -typedef Dartmediademuxer_eos_cbFunction = void Function( - int track_num, ffi.Pointer user_data); - -final class mediamuxer_s extends ffi.Opaque {} - -/// @brief Enumeration for media muxer state. -/// @since_tizen 3.0 -abstract class mediamuxer_state_e { - /// < The mediamuxer is not created - static const int MEDIAMUXER_STATE_NONE = 0; - - /// < The mediamuxer is created, but not prepared - static const int MEDIAMUXER_STATE_IDLE = 1; - - /// < The mediamuxer is ready to mux media - static const int MEDIAMUXER_STATE_READY = 2; - - /// < The mediamuxer is muxing media - static const int MEDIAMUXER_STATE_MUXING = 3; - - /// < The mediamuxer is paused while muxing media - static const int MEDIAMUXER_STATE_PAUSED = 4; -} - -/// @brief Enumeration for media muxer error. -/// @since_tizen 3.0 -abstract class mediamuxer_error_e { - /// < Successful - static const int MEDIAMUXER_ERROR_NONE = 0; - - /// < Out of memory - static const int MEDIAMUXER_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int MEDIAMUXER_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid operation - static const int MEDIAMUXER_ERROR_INVALID_OPERATION = -38; - - /// < Not supported - static const int MEDIAMUXER_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Permission denied - static const int MEDIAMUXER_ERROR_PERMISSION_DENIED = -13; - - /// < Invalid state - static const int MEDIAMUXER_ERROR_INVALID_STATE = -27197439; - - /// < Invalid path - static const int MEDIAMUXER_ERROR_INVALID_PATH = -27197438; - - /// < Resource limit - static const int MEDIAMUXER_ERROR_RESOURCE_LIMIT = -27197437; -} - -/// @brief Enumeration for media muxer output format. -/// @since_tizen 3.0 -abstract class mediamuxer_output_format_e { - /// < The mediamuxer output format is MP4 container - static const int MEDIAMUXER_CONTAINER_FORMAT_MP4 = 67121168; - - /// < The mediamuxer output format is 3GP container - static const int MEDIAMUXER_CONTAINER_FORMAT_3GP = 67121264; - - /// < The mediamuxer output format is WAV container - static const int MEDIAMUXER_CONTAINER_FORMAT_WAV = 67125264; - - /// < The mediamuxer output format is ARM_NB container - static const int MEDIAMUXER_CONTAINER_FORMAT_AMR_NB = 285216832; - - /// < The mediamuxer output format is AMR_WB container - static const int MEDIAMUXER_CONTAINER_FORMAT_AMR_WB = 285216833; - - /// < The mediamuxer output format is AAC_ADTS container - static const int MEDIAMUXER_CONTAINER_FORMAT_AAC_ADTS = 67125296; -} - -/// @brief Media Muxer handle type. -/// @since_tizen 3.0 -typedef mediamuxer_h = ffi.Pointer; - -/// @brief Called when error occurs in media muxer. -/// @details Following error codes can be delivered. -/// #MEDIAMUXER_ERROR_INVALID_OPERATION, -/// #MEDIAMUXER_ERROR_NOT_SUPPORTED, -/// #MEDIAMUXER_ERROR_INVALID_PATH, -/// #MEDIAMUXER_ERROR_RESOURCE_LIMIT -/// @since_tizen 3.0 -/// @param[in] error The error that occurred in media muxer -/// @param[in] user_data The user data passed from the code where -/// mediamuxer_set_error_cb() was invoked -/// This data will be accessible from @a user_data mediamuxer_error_cb -/// @pre Create media muxer handle by calling mediamuxer_create() function. -/// @see mediamuxer_set_error_cb() -/// @see mediamuxer_unset_error_cb() -typedef mediamuxer_error_cb - = ffi.Pointer>; -typedef mediamuxer_error_cbFunction = ffi.Void Function( - ffi.Int32 error, ffi.Pointer user_data); -typedef Dartmediamuxer_error_cbFunction = void Function( - int error, ffi.Pointer user_data); - -/// @brief Called when end of stream occurs in media muxer. -/// @since_tizen 4.0 -/// @param[in] user_data The user data passed from the code where -/// mediamuxer_set_eos_cb() was invoked;\n -/// this data will be accessible from mediamuxer_eos_cb() -/// @pre Create media muxer handle by calling mediamuxer_create() function. -/// @see mediamuxer_set_eos_cb() -/// @see mediamuxer_unset_eos_cb() -typedef mediamuxer_eos_cb - = ffi.Pointer>; -typedef mediamuxer_eos_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartmediamuxer_eos_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Enumeration for media streamer node type. -/// -/// @since_tizen 3.0 -abstract class media_streamer_node_type_e { - /// < Not defined type - static const int MEDIA_STREAMER_NODE_TYPE_NONE = 0; - - /// < Src node type. Not available for media_streamer_node_create(). Use media_streamer_node_create_src() - static const int MEDIA_STREAMER_NODE_TYPE_SRC = 1; - - /// < Sink node type. Not available for media_streamer_node_create(). Use media_streamer_node_create_sink() - static const int MEDIA_STREAMER_NODE_TYPE_SINK = 2; - - /// < Video encoder node type - static const int MEDIA_STREAMER_NODE_TYPE_VIDEO_ENCODER = 3; - - /// < Video decoder node type - static const int MEDIA_STREAMER_NODE_TYPE_VIDEO_DECODER = 4; - - /// < Audio encoder node type - static const int MEDIA_STREAMER_NODE_TYPE_AUDIO_ENCODER = 5; - - /// < Audio decoder node type - static const int MEDIA_STREAMER_NODE_TYPE_AUDIO_DECODER = 6; - - /// < Video converter node type - static const int MEDIA_STREAMER_NODE_TYPE_VIDEO_CONVERTER = 7; - - /// < Audio converter node type - static const int MEDIA_STREAMER_NODE_TYPE_AUDIO_CONVERTER = 8; - - /// < Audio resample node type - static const int MEDIA_STREAMER_NODE_TYPE_AUDIO_RESAMPLE = 9; - - /// < Rtp video payloader - static const int MEDIA_STREAMER_NODE_TYPE_VIDEO_PAY = 10; - - /// < Rtp audio payloader - static const int MEDIA_STREAMER_NODE_TYPE_AUDIO_PAY = 11; - - /// < Rtp video depayloader - static const int MEDIA_STREAMER_NODE_TYPE_VIDEO_DEPAY = 12; - - /// < Rtp audio depayloader - static const int MEDIA_STREAMER_NODE_TYPE_AUDIO_DEPAY = 13; - - /// < Rate node type - static const int MEDIA_STREAMER_NODE_TYPE_VIDEO_RATE = 14; - - /// < Scale node type - static const int MEDIA_STREAMER_NODE_TYPE_VIDEO_SCALE = 15; - - /// < Overlay node type - static const int MEDIA_STREAMER_NODE_TYPE_TEXT_OVERLAY = 16; - - /// < Parser node type - static const int MEDIA_STREAMER_NODE_TYPE_PARSER = 17; - - /// < Filter node type, to limit formats of data - static const int MEDIA_STREAMER_NODE_TYPE_FILTER = 18; - - /// < Tee node type, splits data to multiple path - static const int MEDIA_STREAMER_NODE_TYPE_TEE = 19; - - /// < Queue node type - static const int MEDIA_STREAMER_NODE_TYPE_QUEUE = 20; - - /// < Multiple data queue node type - static const int MEDIA_STREAMER_NODE_TYPE_MQUEUE = 21; - - /// < Muxer node type - static const int MEDIA_STREAMER_NODE_TYPE_MUXER = 22; - - /// < Demuxer node type - static const int MEDIA_STREAMER_NODE_TYPE_DEMUXER = 23; - - /// < Rtp component to send and receive data - static const int MEDIA_STREAMER_NODE_TYPE_RTP = 24; - - /// < N-to-1 input stream selector - static const int MEDIA_STREAMER_NODE_TYPE_INPUT_SELECTOR = 25; - - /// < 1-to-N output stream selector - static const int MEDIA_STREAMER_NODE_TYPE_OUTPUT_SELECTOR = 26; - - /// < Folds many mono channel into one interleaved audio stream - static const int MEDIA_STREAMER_NODE_TYPE_INTERLEAVE = 27; - - /// < Splits multi channel audio into many mono audio - static const int MEDIA_STREAMER_NODE_TYPE_DEINTERLEAVE = 28; -} - -/// @brief Enumeration for media streamer source node type. -/// -/// @since_tizen 3.0 -abstract class media_streamer_node_src_type_e { - /// < Not defined src type - static const int MEDIA_STREAMER_NODE_SRC_TYPE_NONE = 0; - - /// < Local file src type - static const int MEDIA_STREAMER_NODE_SRC_TYPE_FILE = 1; - - /// < Http src type, Network internet feature is required - static const int MEDIA_STREAMER_NODE_SRC_TYPE_HTTP = 2; - - /// < Rtsp src type, Network internet feature is required - static const int MEDIA_STREAMER_NODE_SRC_TYPE_RTSP = 3; - - /// < Camera src type, Camera feature is required - static const int MEDIA_STREAMER_NODE_SRC_TYPE_CAMERA = 4; - - /// < Audio capture src type, Microphone feature is required - static const int MEDIA_STREAMER_NODE_SRC_TYPE_AUDIO_CAPTURE = 5; - - /// < Video capture src type, Camera feature is required - static const int MEDIA_STREAMER_NODE_SRC_TYPE_VIDEO_CAPTURE = 6; - - /// < Audio test src type - static const int MEDIA_STREAMER_NODE_SRC_TYPE_AUDIO_TEST = 7; - - /// < Video test src type - static const int MEDIA_STREAMER_NODE_SRC_TYPE_VIDEO_TEST = 8; - - /// < Custom src type - static const int MEDIA_STREAMER_NODE_SRC_TYPE_CUSTOM = 9; - - /// < Adaptive src type, Network internet feature is required - static const int MEDIA_STREAMER_NODE_SRC_TYPE_ADAPTIVE = 10; -} - -/// @brief Enumeration for media streamer sink node type. -/// -/// @since_tizen 3.0 -abstract class media_streamer_node_sink_type_e { - /// < Not defined sink type - static const int MEDIA_STREAMER_NODE_SINK_TYPE_NONE = 0; - - /// < Local file sink type - static const int MEDIA_STREAMER_NODE_SINK_TYPE_FILE = 1; - - /// < Rtsp sink type, Network internet feature is required - static const int MEDIA_STREAMER_NODE_SINK_TYPE_RTSP = 2; - - /// < Http sink type, Network internet feature is required - static const int MEDIA_STREAMER_NODE_SINK_TYPE_HTTP = 3; - - /// < Audio sink type - static const int MEDIA_STREAMER_NODE_SINK_TYPE_AUDIO = 4; - - /// < Overlay sink type - static const int MEDIA_STREAMER_NODE_SINK_TYPE_OVERLAY = 5; - - /// < Fake sink type - static const int MEDIA_STREAMER_NODE_SINK_TYPE_FAKE = 6; - - /// < Custom sink type - static const int MEDIA_STREAMER_NODE_SINK_TYPE_CUSTOM = 7; - - /// < Adaptive sink type to generate fragmented files - static const int MEDIA_STREAMER_NODE_SINK_TYPE_ADAPTIVE = 8; -} - -/// @brief Enumeration for media streamer state. -/// -/// @since_tizen 3.0 -abstract class media_streamer_state_e { - /// < Streamer is not created - static const int MEDIA_STREAMER_STATE_NONE = 0; - - /// < Streamer is created but not prepared - static const int MEDIA_STREAMER_STATE_IDLE = 1; - - /// < Streamer is ready to play - static const int MEDIA_STREAMER_STATE_READY = 2; - - /// < Streamer is playing - static const int MEDIA_STREAMER_STATE_PLAYING = 3; - - /// < Streamer is paused - static const int MEDIA_STREAMER_STATE_PAUSED = 4; - - /// < Seek is under operation - static const int MEDIA_STREAMER_STATE_SEEKING = 5; -} - -/// @brief Enumeration for media streamer error. -/// -/// @since_tizen 3.0 -abstract class media_streamer_error_e { - /// < Successful - static const int MEDIA_STREAMER_ERROR_NONE = 0; - - /// < Invalid parameter - static const int MEDIA_STREAMER_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid operation - static const int MEDIA_STREAMER_ERROR_INVALID_OPERATION = -38; - - /// < No space left on the device - static const int MEDIA_STREAMER_ERROR_FILE_NO_SPACE_ON_DEVICE = -28; - - /// < The feature is not supported - static const int MEDIA_STREAMER_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Permission denied - static const int MEDIA_STREAMER_ERROR_PERMISSION_DENIED = -13; - - /// < Invalid state - static const int MEDIA_STREAMER_ERROR_INVALID_STATE = -27262975; - - /// < Connection failed - static const int MEDIA_STREAMER_ERROR_CONNECTION_FAILED = -27262974; - - /// < Resource conflict - static const int MEDIA_STREAMER_ERROR_RESOURCE_CONFLICT = -27262973; - - /// < Seek operation failure - static const int MEDIA_STREAMER_ERROR_SEEK_FAILED = -27262972; -} - -/// @brief Enumeration of media streamer buffer status of custom src. -/// -/// @since_tizen 3.0 -abstract class media_streamer_custom_buffer_status_e { - /// < Buffer underrun of custom src - static const int MEDIA_STREAMER_CUSTOM_BUFFER_UNDERRUN = 0; - - /// < Buffer overflow of custom src - static const int MEDIA_STREAMER_CUSTOM_BUFFER_OVERFLOW = 1; -} - -/// @brief Enumeration for media streamer's interruption type. -/// -/// @since_tizen 3.0 -abstract class media_streamer_interrupted_code_e { - /// < Interrupted by a resource conflict - static const int MEDIA_STREAMER_INTERRUPTED_BY_RESOURCE_CONFLICT = 0; - - /// < Interrupted by a security policy - static const int MEDIA_STREAMER_INTERRUPTED_BY_SECURITY = 1; -} - -/// @brief Media Streamer handle type. -/// -/// @since_tizen 3.0 -typedef media_streamer_h = ffi.Pointer; - -/// @brief Called when error occurs in media streamer. -/// @since_tizen 3.0 -/// @remarks Following error codes can be delivered. -/// #MEDIA_STREAMER_ERROR_INVALID_OPERATION, -/// #MEDIA_STREAMER_ERROR_FILE_NO_SPACE_ON_DEVICE, -/// #MEDIA_STREAMER_ERROR_NOT_SUPPORTED, -/// #MEDIA_STREAMER_ERROR_CONNECTION_FAILED, -/// #MEDIA_STREAMER_ERROR_RESOURCE_CONFLICT -/// @param[in] streamer Media streamer handle -/// @param[in] error The error that occurred in media steamer -/// @param[in] user_data The user data passed from the code where -/// media_streamer_set_error_cb() was invoked -/// This data will be accessible from media_streamer_error_cb -/// @pre Create media streamer handle by calling media_streamer_create() function -/// @see media_streamer_set_error_cb() -/// @see media_streamer_unset_error_cb() -typedef media_streamer_error_cb - = ffi.Pointer>; -typedef media_streamer_error_cbFunction = ffi.Void Function( - media_streamer_h streamer, - ffi.Int32 error, - ffi.Pointer user_data); -typedef Dartmedia_streamer_error_cbFunction = void Function( - media_streamer_h streamer, int error, ffi.Pointer user_data); - -/// @brief Called when media streamer state is changed. -/// @since_tizen 3.0 -/// @param[in] streamer Media streamer handle -/// @param[in] previous_state The previous state of the media streamer -/// @param[in] current_state The current state of media streamer -/// @param[in] user_data The user data passed from the code where -/// media_streamer_set_state_changed_cb() was invoked -/// This data will be accessible from media_streamer_state_changed_cb -/// @pre Create media streamer handle by calling media_streamer_create() function -/// @see media_streamer_set_state_change_cb() -/// @see media_streamer_unset_state_change_cb() -typedef media_streamer_state_changed_cb - = ffi.Pointer>; -typedef media_streamer_state_changed_cbFunction = ffi.Void Function( - media_streamer_h streamer, - ffi.Int32 previous_state, - ffi.Int32 current_state, - ffi.Pointer user_data); -typedef Dartmedia_streamer_state_changed_cbFunction = void Function( - media_streamer_h streamer, - int previous_state, - int current_state, - ffi.Pointer user_data); - -/// @brief Called when the media streamer is interrupted. -/// @since_tizen 3.0 -/// @param[in] code The interrupted error code -/// @param[in] user_data The user data passed from the callback registration function -/// @see media_streamer_set_interrupted_cb() -/// @see media_streamer_unset_interrupted_cb() -typedef media_streamer_interrupted_cb - = ffi.Pointer>; -typedef media_streamer_interrupted_cbFunction = ffi.Void Function( - ffi.Int32 code, ffi.Pointer user_data); -typedef Dartmedia_streamer_interrupted_cbFunction = void Function( - int code, ffi.Pointer user_data); - -/// @brief Media Streamer node handle type. -/// -/// @since_tizen 3.0 -typedef media_streamer_node_h = ffi.Pointer; - -/// @brief Called when the custom source needs more data or has enough data. -/// @details This callback will be invoked when the buffer level drops below the threshold of max size -/// or no free space in custom source buffer. -/// @since_tizen 3.0 -/// @remarks Callback can be applied only for MEDIA_STREAMER_NODE_SRC_TYPE_CUSTOM source type -/// @param[in] node Media streamer source node handle -/// @param[in] status Media streamer custom buffer status -/// @param[in] user_data The user data passed from the callback registration function -/// @see media_streamer_src_set_buffer_status_cb() -/// @see media_streamer_node_get_param() -/// @see media_streamer_node_set_param() -typedef media_streamer_custom_buffer_status_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef media_streamer_custom_buffer_status_cbFunction = ffi.Void Function( - media_streamer_node_h node, - ffi.Int32 status, - ffi.Pointer user_data); -typedef Dartmedia_streamer_custom_buffer_status_cbFunction = void Function( - media_streamer_node_h node, int status, ffi.Pointer user_data); - -/// @brief Called when new data is available from custom sink. -/// @details This callback can be applied only to MEDIA_STREAMER_NODE_SINK_TYPE_CUSTOM sink type -/// @since_tizen 3.0 -/// @param[in] node Media streamer sink node handle -/// @param[in] user_data The user data passed from the code where -/// media_streamer_sink_set_data_ready_cb() was invoked -/// This data will be accessible from media_streamer_sink_data_ready_cb -/// @pre media_streamer_sink_set_data_ready_cb() -/// @see MEDIA_STREAMER_NODE_SINK_TYPE_CUSTOM -/// @see media_streamer_sink_set_data_ready_cb() -/// @see media_streamer_sink_unset_data_ready_cb() -typedef media_streamer_sink_data_ready_cb = ffi - .Pointer>; -typedef media_streamer_sink_data_ready_cbFunction = ffi.Void Function( - media_streamer_node_h node, ffi.Pointer user_data); -typedef Dartmedia_streamer_sink_data_ready_cbFunction = void Function( - media_streamer_node_h node, ffi.Pointer user_data); - -/// @brief Called when the end-of-stream has been reached. -/// @details This callback can be applied only to MEDIA_STREAMER_NODE_SINK_TYPE_CUSTOM sink type -/// @since_tizen 3.0 -/// @param[in] node Media streamer sink node handle -/// @param[in] user_data The user data passed from the code where -/// media_streamer_sink_set_eos_cb() was invoked -/// This data will be accessible from media_streamer_sink_eos_cb -/// @pre media_streamer_sink_set_eos_cb() -/// @see MEDIA_STREAMER_NODE_SINK_TYPE_CUSTOM -/// @see media_streamer_sink_set_eos_cb() -/// @see media_streamer_sink_unset_eos_cb() -typedef media_streamer_sink_eos_cb - = ffi.Pointer>; -typedef media_streamer_sink_eos_cbFunction = ffi.Void Function( - media_streamer_node_h node, ffi.Pointer user_data); -typedef Dartmedia_streamer_sink_eos_cbFunction = void Function( - media_streamer_node_h node, ffi.Pointer user_data); - -/// @brief Called when the seek operation is completed. -/// @since_tizen 3.0 -/// @param[in] user_data The user data passed from the callback registration function -/// @see media_streamer_set_play_position() -typedef media_streamer_position_changed_cb = ffi - .Pointer>; -typedef media_streamer_position_changed_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartmedia_streamer_position_changed_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Point in 2D space. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -final class mv_point_s extends ffi.Struct { - /// < X-axis coordinate of the point in 2D space - @ffi.Int() - external int x; - - /// < Y-axis coordinate of the point in 2D space - @ffi.Int() - external int y; -} - -/// @brief Location of the object bounded by quadrangle defined by four 2D points. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -final class mv_quadrangle_s extends ffi.Struct { - /// < Four points that define object bounding - /// quadrangle - @ffi.Array.multi([4]) - external ffi.Array points; -} - -/// @brief Location of the object bounded by rectangle defined by -/// coordinates of top left corner, width and height. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -final class mv_rectangle_s extends ffi.Struct { - /// < Top left corner of rectangle coordinates - external mv_point_s point; - - /// < Width of the bounding rectangle - @ffi.Int() - external int width; - - /// < Height of the bounding rectangle - @ffi.Int() - external int height; -} - -/// @brief Enumeration for Media Vision error. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -abstract class mv_error_e { - static const int MEDIA_VISION_ERROR_NONE = 0; - static const int MEDIA_VISION_ERROR_NOT_SUPPORTED = -1073741822; - static const int MEDIA_VISION_ERROR_MSG_TOO_LONG = -90; - static const int MEDIA_VISION_ERROR_NO_DATA = -61; - static const int MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE = -126; - static const int MEDIA_VISION_ERROR_OUT_OF_MEMORY = -12; - static const int MEDIA_VISION_ERROR_INVALID_PARAMETER = -22; - static const int MEDIA_VISION_ERROR_INVALID_OPERATION = -38; - static const int MEDIA_VISION_ERROR_PERMISSION_DENIED = -1; - static const int MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT = -27066367; - static const int MEDIA_VISION_ERROR_INTERNAL = -27066366; - static const int MEDIA_VISION_ERROR_INVALID_DATA = -27066365; - static const int MEDIA_VISION_ERROR_INVALID_PATH = -27066364; -} - -/// @brief Enumeration for Media Vision @ref mv_engine_config_h handle attribute -/// type. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -abstract class mv_config_attribute_type_e { - /// < Double attribute type - static const int MV_ENGINE_CONFIG_ATTR_TYPE_DOUBLE = 0; - - /// < Integer attribute type - static const int MV_ENGINE_CONFIG_ATTR_TYPE_INTEGER = 1; - - /// < Boolean attribute type - static const int MV_ENGINE_CONFIG_ATTR_TYPE_BOOLEAN = 2; - - /// < String attribute type - static const int MV_ENGINE_CONFIG_ATTR_TYPE_STRING = 3; -} - -/// @brief Enumeration for Media Vision colorspace. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -abstract class mv_colorspace_e { - /// < The colorspace type is invalid - static const int MEDIA_VISION_COLORSPACE_INVALID = 0; - - /// < The colorspace type is Y800 - static const int MEDIA_VISION_COLORSPACE_Y800 = 1; - - /// < The colorspace type is I420 - static const int MEDIA_VISION_COLORSPACE_I420 = 2; - - /// < The colorspace type is NV12 - static const int MEDIA_VISION_COLORSPACE_NV12 = 3; - - /// < The colorspace type is YV12 - static const int MEDIA_VISION_COLORSPACE_YV12 = 4; - - /// < The colorspace type is NV21 - static const int MEDIA_VISION_COLORSPACE_NV21 = 5; - - /// < The colorspace type is YUYV - static const int MEDIA_VISION_COLORSPACE_YUYV = 6; - - /// < The colorspace type is UYVY - static const int MEDIA_VISION_COLORSPACE_UYVY = 7; - - /// < The colorspace type is 422P - static const int MEDIA_VISION_COLORSPACE_422P = 8; - - /// < The colorspace type is RGB565 - static const int MEDIA_VISION_COLORSPACE_RGB565 = 9; - - /// < The colorspace type is RGB888 - static const int MEDIA_VISION_COLORSPACE_RGB888 = 10; - - /// < The colorspace type is RGBA - static const int MEDIA_VISION_COLORSPACE_RGBA = 11; -} - -/// @brief The handle to the source. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -typedef mv_source_h = ffi.Pointer; - -/// @brief The handle to the Media Vision API engine algorithms configuration. -/// @details Configuration is a dictionary consists of key and value pairs to -/// collect engine-specific settings and allow Media Vision module to -/// access them internally. Engine configuration provides developer by -/// the possibility to make computer vision algorithms work better -/// in particular conditions of API usage. To create engine -/// configuration handle @ref mv_create_engine_config() function has to -/// be used. When configuration is not needed any more, it is required to -/// destroy it and release resources by @ref mv_destroy_engine_config() -/// function. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @see mv_create_engine_config() -/// @see mv_destroy_engine_config() -typedef mv_engine_config_h = ffi.Pointer; - -/// @brief Called to get information (type and name) once for each supported -/// attribute. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// @param [in] attribute_type The supported attribute type -/// @param [in] attribute_name The supported attribute name -/// @param [in] user_data The user data passed from the -/// @ref mv_engine_config_foreach_supported_attribute() -/// function -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// -/// @pre mv_engine_config_foreach_supported_attribute() will invoke this callback -/// @see mv_engine_config_foreach_supported_attribute() -typedef mv_supported_attribute_cb - = ffi.Pointer>; -typedef mv_supported_attribute_cbFunction = ffi.Bool Function( - ffi.Int32 attribute_type, - ffi.Pointer attribute_name, - ffi.Pointer user_data); -typedef Dartmv_supported_attribute_cbFunction = bool Function( - int attribute_type, - ffi.Pointer attribute_name, - ffi.Pointer user_data); - -/// @brief Enumeration for supported barcode types. -/// @details QR codes (versions 1 to 40) and set of 1D barcodes are supported -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -abstract class mv_barcode_type_e { - /// < 2D barcode - Quick Response code - static const int MV_BARCODE_QR = 0; - - /// < 1D barcode - Universal Product Code with 12-digit - static const int MV_BARCODE_UPC_A = 1; - - /// < 1D barcode - Universal Product Code with 6-digit - static const int MV_BARCODE_UPC_E = 2; - - /// < 1D barcode - International Article Number with 8-digit - static const int MV_BARCODE_EAN_8 = 3; - - /// < 1D barcode - International Article Number with 13-digit - static const int MV_BARCODE_EAN_13 = 4; - - /// < 1D barcode - Code 128 - static const int MV_BARCODE_CODE128 = 5; - - /// < 1D barcode - Code 39 - static const int MV_BARCODE_CODE39 = 6; - - /// < 1D barcode - Interleaved Two of Five - static const int MV_BARCODE_I2_5 = 7; - - /// < Undefined - static const int MV_BARCODE_UNDEFINED = 8; -} - -/// @brief Enumeration for supported QR code error correction level. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// @remarks This is unavailable for 1D barcodes -abstract class mv_barcode_qr_ecc_e { - /// < Recovery up to 7% losses - static const int MV_BARCODE_QR_ECC_LOW = 0; - - /// < Recovery up to 15% losses - static const int MV_BARCODE_QR_ECC_MEDIUM = 1; - - /// < Recovery up to 25% losses - static const int MV_BARCODE_QR_ECC_QUARTILE = 2; - - /// < Recovery up to 30% losses - static const int MV_BARCODE_QR_ECC_HIGH = 3; - - /// < Unavailable - static const int MV_BARCODE_QR_ECC_UNAVAILABLE = 4; -} - -/// @brief Enumeration for supported QR code encoding mode. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// @remarks This is unavailable for 1D barcodes -abstract class mv_barcode_qr_mode_e { - /// < Numeric digits - static const int MV_BARCODE_QR_MODE_NUMERIC = 0; - - /// < Alphanumeric characters - static const int MV_BARCODE_QR_MODE_ALPHANUMERIC = 1; - - /// < Raw 8-bit bytes - static const int MV_BARCODE_QR_MODE_BYTE = 2; - - /// < UTF-8 character encoding - static const int MV_BARCODE_QR_MODE_UTF8 = 3; - - /// < Unavailable - static const int MV_BARCODE_QR_MODE_UNAVAILABLE = 4; -} - -/// @brief Enumeration for supported image formats for the barcode generating. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -abstract class mv_barcode_image_format_e { - static const int MV_BARCODE_IMAGE_FORMAT_UNAVAILABLE = -1; - - /// < BMP image format - static const int MV_BARCODE_IMAGE_FORMAT_BMP = 0; - - /// < JPEG image format - static const int MV_BARCODE_IMAGE_FORMAT_JPG = 1; - - /// < PNG image format - static const int MV_BARCODE_IMAGE_FORMAT_PNG = 2; - - /// < The number of supported image format - static const int MV_BARCODE_IMAGE_FORMAT_NUM = 3; -} - -/// @brief Enumeration to target attribute -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -abstract class mv_barcode_detect_attr_target_e { - /// < 1D and 2D - static const int MV_BARCODE_DETECT_ATTR_TARGET_ALL = 0; - - /// < 1D barcode only - static const int MV_BARCODE_DETECT_ATTR_TARGET_1D_BARCODE = 1; - - /// < 2D barcode only - static const int MV_BARCODE_DETECT_ATTR_TARGET_2D_BARCODE = 2; -} - -/// @brief Called when barcode detection is completed. -/// @details If no barcode is detected then the method will be called, barcodes -/// and states will be equal to NULL, and @a number_of_barcodes - 0. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// @param [in] source The handle to the media source -/// @param [in] engine_cfg The handle to the configuration of the engine -/// @param [in] barcode_locations The quadrangle locations of detected barcodes -/// @param [in] messages The decoded messages of barcodes -/// @param [in] types The types of detected barcodes -/// @param [in] number_of_barcodes The number of detected barcodes -/// @param [in] user_data The user data passed from -/// the mv_barcode_detect() function -/// -/// @pre mv_barcode_detect() invokes this callback -/// -/// @see mv_barcode_detect() -typedef mv_barcode_detected_cb - = ffi.Pointer>; -typedef mv_barcode_detected_cbFunction = ffi.Void Function( - mv_source_h source, - mv_engine_config_h engine_cfg, - ffi.Pointer barcode_locations, - ffi.Pointer> messages, - ffi.Pointer types, - ffi.Int number_of_barcodes, - ffi.Pointer user_data); -typedef Dartmv_barcode_detected_cbFunction = void Function( - mv_source_h source, - mv_engine_config_h engine_cfg, - ffi.Pointer barcode_locations, - ffi.Pointer> messages, - ffi.Pointer types, - int number_of_barcodes, - ffi.Pointer user_data); - -/// @brief Enumeration to text attribute -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -abstract class mv_barcode_generate_attr_text_e { - /// < Invisible - static const int MV_BARCODE_GENERATE_ATTR_TEXT_INVISIBLE = 0; - - /// < Visible - static const int MV_BARCODE_GENERATE_ATTR_TEXT_VISIBLE = 1; -} - -/// @brief Enumeration for eyes state type. -/// -/// @since_tizen 3.0 -/// -/// @see mv_face_eye_condition_recognize() -abstract class mv_face_eye_condition_e { - /// < Eyes are open - static const int MV_FACE_EYES_OPEN = 0; - - /// < Eyes are closed - static const int MV_FACE_EYES_CLOSED = 1; - - /// < The eyes condition wasn't determined - static const int MV_FACE_EYES_NOT_FOUND = 2; -} - -/// @brief Enumeration for expression types can be determined for faces. -/// -/// @since_tizen 3.0 -/// -/// @see mv_face_facial_expression_recognize() -abstract class mv_face_facial_expression_e { - /// < Unknown face expression - static const int MV_FACE_UNKNOWN = 0; - - /// < Face expression is neutral - static const int MV_FACE_NEUTRAL = 1; - - /// < Face expression is smiling - static const int MV_FACE_SMILE = 2; - - /// < Face expression is sadness - static const int MV_FACE_SADNESS = 3; - - /// < Face expression is surprise - static const int MV_FACE_SURPRISE = 4; - - /// < Face expression is anger - static const int MV_FACE_ANGER = 5; - - /// < Face expression is fear - static const int MV_FACE_FEAR = 6; - - /// < Face expression is disgust - static const int MV_FACE_DISGUST = 7; -} - -/// @brief Called when faces are detected for the @a source. -/// @details This type callback can be invoked each time when -/// @ref mv_face_detect() is called to process the results of face -/// detecting. -/// -/// @since_tizen 3.0 -/// @remarks If no face is detected then the callback will be invoked, but -/// @a faces_locations array will be NULL, and @a number_of_faces will -/// be equal to 0. -/// @param [in] source The handle to the source of the media where -/// faces were detected -/// @param [in] engine_cfg The handle to the configuration of engine was -/// used for face detecting, or NULL if default -/// settings were applied -/// @param [in] faces_locations Rectangular locations of detected faces -/// @param [in] number_of_faces Number of detected faces -/// @param [in] user_data The user data passed from callback invoking code -/// -/// @pre Call @ref mv_face_detect() function to perform detection of the face for -/// the face image and invoke this callback as a result -/// -/// @see mv_face_detect() -typedef mv_face_detected_cb - = ffi.Pointer>; -typedef mv_face_detected_cbFunction = ffi.Void Function( - mv_source_h source, - mv_engine_config_h engine_cfg, - ffi.Pointer faces_locations, - ffi.Int number_of_faces, - ffi.Pointer user_data); -typedef Dartmv_face_detected_cbFunction = void Function( - mv_source_h source, - mv_engine_config_h engine_cfg, - ffi.Pointer faces_locations, - int number_of_faces, - ffi.Pointer user_data); - -/// @brief The handle to the model aggregating recognition face features. -/// @details This handle can be used for faces recognizing with -/// @ref mv_face_recognize() function. Handle has to be created by -/// @ref mv_face_recognition_model_create() and destroyed by -/// @ref mv_face_recognition_model_destroy() functions. To use -/// recognition models effectively learning process has to be performed -/// before recognition. In other words, appropriate set of the face -/// image examples has to be collected with -/// @ref mv_face_recognition_model_add() function before -/// @ref mv_face_recognition_model_learn() function call, then -/// recognition can be performed with @ref mv_face_recognize(). -/// -/// @since_tizen 3.0 -/// -/// @see mv_face_recognition_model_create() -/// @see mv_face_recognition_model_destroy() -/// @see mv_face_recognition_model_learn() -typedef mv_face_recognition_model_h = ffi.Pointer; - -/// @brief Called each time when face is recognized by @ref mv_face_recognize() -/// function. -/// -/// @since_tizen 3.0 -/// @param [in] source The handle to the image source for which -/// face has been recognized/not recognized -/// @param [in] recognition_model The handle to the recognition model has been -/// used for recognition -/// @param [in] engine_cfg The handle to the configuration of engine was -/// used for recognition, or NULL if default -/// settings were applied -/// @param [in] face_location The pointer to the location of the face -/// recognized on @a source. If face wasn't -/// recognized, then pointer is NULL -/// @param [in] face_label The label that identifies face which was -/// recognized in the @a source. NULL if -/// recognition was performed, but no faces -/// were recognized in the @a source -/// @param [in] confidence The confidence of the @a recognition_model -/// that face has been recognized correctly -/// (value from 0.0 to 1.0). No faces were -/// recognized if @a confidence was 0.0. -/// When model has been learned on large amount -/// of examples, threshold for this value -/// can be high (0.85-0.95). If model -/// was learned for small amount of examples, -/// then threshold can be reduced (0.5-0.85) -/// @param [in] user_data The user data passed from callback invoking -/// code -/// -/// @pre Call @ref mv_face_recognize() function to perform recognition of the -/// face for the face image and invoke this callback as a result -/// -/// @see mv_face_recognize() -typedef mv_face_recognized_cb - = ffi.Pointer>; -typedef mv_face_recognized_cbFunction = ffi.Void Function( - mv_source_h source, - mv_face_recognition_model_h recognition_model, - mv_engine_config_h engine_cfg, - ffi.Pointer face_location, - ffi.Pointer face_label, - ffi.Double confidence, - ffi.Pointer user_data); -typedef Dartmv_face_recognized_cbFunction = void Function( - mv_source_h source, - mv_face_recognition_model_h recognition_model, - mv_engine_config_h engine_cfg, - ffi.Pointer face_location, - ffi.Pointer face_label, - double confidence, - ffi.Pointer user_data); - -/// @brief The handle to the model aggregating tracking face features. -/// @details This model can be used for face tracking with @ref mv_face_track() -/// function. Handle has to be created by -/// @ref mv_face_tracking_model_create() and destroyed by -/// @ref mv_face_tracking_model_destroy() function. Tracking model can -/// be improved during tracking task and allows to track face more -/// accurately. So, you can create several tracking models independently -/// by default, then apply tracking task for each of them. After some -/// tracking these models will be different and each of them will be -/// more efficient for tracking of face for which was created. -/// -/// @since_tizen 3.0 -/// @remarks Create each tracking model for single face. -/// -/// @see mv_face_tracking_model_create() -/// @see mv_face_tracking_model_destroy() -typedef mv_face_tracking_model_h = ffi.Pointer; - -/// @brief Called when face determined by @a tracking_model is tracked. -/// @details This type callback can be invoked each time when -/// @ref mv_face_track() is called to process the results of face -/// tracking. -/// -/// @since_tizen 3.0 -/// @param [in] source The handle to the video frame or image from -/// sequence for which face was tracked -/// @param [in] tracking_model The handle to the model that was used for -/// tracking -/// @param [in] engine_cfg The handle to the configuration of engine was -/// used for tracking, or NULL if default settings -/// were applied. -/// @param [in] location The pointer to the quadrangle-shaped location -/// which determines new position of the tracked -/// face on the @a source. If NULL, then face was -/// lost by tracking algorithm during last iteration -/// @param [in] confidence The confidence of the @a tracking_model -/// that new location of the face was determined -/// correctly (value from 0.0 to 1.0). -/// If no location was determined during last track -/// iteration, then value is 0.0 -/// @param [in] user_data The user data passed from callback invoking code -/// -/// @pre Call @ref mv_face_track() function to perform track iteration for -/// the video frame or the image from sequence and invoke this callback as -/// a result -/// -/// @see mv_face_track() -typedef mv_face_tracked_cb - = ffi.Pointer>; -typedef mv_face_tracked_cbFunction = ffi.Void Function( - mv_source_h source, - mv_face_tracking_model_h tracking_model, - mv_engine_config_h engine_cfg, - ffi.Pointer location, - ffi.Double confidence, - ffi.Pointer user_data); -typedef Dartmv_face_tracked_cbFunction = void Function( - mv_source_h source, - mv_face_tracking_model_h tracking_model, - mv_engine_config_h engine_cfg, - ffi.Pointer location, - double confidence, - ffi.Pointer user_data); - -/// @brief Called when eye blink condition is recognized. -/// @details This type callback can be invoked each time when -/// mv_face_eye_condition_recognize() is called for @a face_location to -/// recognize eye-blink condition for the face at the @a source.\n -/// Usage example for this callback can be found in -/// mv_face_eye_condition_recognize() documentation. -/// -/// @since_tizen 3.0 -/// @param [in] source The handle to the source of the media for which -/// eye-blink condition was recognized -/// @param [in] engine_cfg The handle to the configuration of engine was -/// used for eye-blink condition recognition, or -/// NULL if default settings were applied. -/// @param [in] face_location The location bounding the face at the @a source -/// @param [in] eye_condition The type of eye-blink condition recognized for -/// face bounded by @a face_location -/// @param [in] user_data The user data passed from callback invoking code -/// -/// -/// @pre Call @ref mv_face_eye_condition_recognize() function to perform -/// eye-blink condition recognition and invoke this callback as a result -/// -/// @see mv_face_eye_condition_recognize() -typedef mv_face_eye_condition_recognized_cb = ffi - .Pointer>; -typedef mv_face_eye_condition_recognized_cbFunction = ffi.Void Function( - mv_source_h source, - mv_engine_config_h engine_cfg, - mv_rectangle_s face_location, - ffi.Int32 eye_condition, - ffi.Pointer user_data); -typedef Dartmv_face_eye_condition_recognized_cbFunction = void Function( - mv_source_h source, - mv_engine_config_h engine_cfg, - mv_rectangle_s face_location, - int eye_condition, - ffi.Pointer user_data); - -/// @brief Called when facial expression is recognized -/// @details This type callback can be invoked each time when -/// mv_face_facial_expression_recognize() is called for @a face_location to -/// recognize facial expression for the face at the @a source.\n -/// Usage example for this callback can be found in -/// mv_face_facial_expression_recognize() documentation. -/// -/// @since_tizen 3.0 -/// @param [in] source The handle to the source of the media for -/// which facial expression was recognized -/// @param [in] engine_cfg The handle to the configuration of engine was -/// used for expression recognition -/// @param [in] face_location The location bounding the face at the @a source -/// @param [in] facial_expression The type of facial expression recognized -/// for face bounded by @a face_location -/// @param [in] user_data The user data passed from callback invoking code -/// -/// @pre Create a source handle by calling mv_create_source() -/// @pre Create a face engine configuration handle by calling mv_create_engine_config() -/// -/// @see mv_face_facial_expression_recognize() -typedef mv_face_facial_expression_recognized_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef mv_face_facial_expression_recognized_cbFunction = ffi.Void Function( - mv_source_h source, - mv_engine_config_h engine_cfg, - mv_rectangle_s face_location, - ffi.Int32 facial_expression, - ffi.Pointer user_data); -typedef Dartmv_face_facial_expression_recognized_cbFunction = void Function( - mv_source_h source, - mv_engine_config_h engine_cfg, - mv_rectangle_s face_location, - int facial_expression, - ffi.Pointer user_data); - -/// @brief The image object's type handle. -/// -/// @since_tizen 3.0 -typedef mv_image_object_h = ffi.Pointer; - -/// @brief Called when image recognition results are received from @ref mv_image_recognize() -/// @details This type of callback will be called after @ref mv_image_recognize() -/// in order to process recognition result. -/// -/// @since_tizen 3.0 -/// @remarks Values @a source, @a engine_cfg, @a image_objects, and @a number_of_objects -/// are the same as values of input parameters of @ref mv_image_recognize(). -/// @remarks @a locations are valid only inside callback. -/// @param [in] source The handle to the source image on which the -/// recognition was carried out -/// @param [in] engine_cfg The handle to the configuration of engine -/// that was used for image recognition, or NULL -/// if default settings were applied -/// @param [in] image_objects The set of handles to the image objects which -/// have been processed as targets of recognition -/// @param [in] locations The locations of image objects on the source -/// image. This array corresponding to an array -/// of image objects and each element contains a -/// location of corresponding object on the -/// @a source image or NULL if object is not -/// recognized -/// @param [in] number_of_objects The number of image objects and corresponding -/// locations -/// @param [in] user_data The user data passed from the -/// @ref mv_image_recognize() function -/// -/// @pre Call @ref mv_image_recognize() function to perform recognition of the -/// image objects on the source image and invoke this callback as a result -/// -/// @see mv_image_recognize() -/// @see mv_source_h -/// @see mv_image_object_h -/// @see mv_engine_config_h -/// @see mv_quadrangle_s -typedef mv_image_recognized_cb - = ffi.Pointer>; -typedef mv_image_recognized_cbFunction = ffi.Void Function( - mv_source_h source, - mv_engine_config_h engine_cfg, - ffi.Pointer image_objects, - ffi.Pointer> locations, - ffi.UnsignedInt number_of_objects, - ffi.Pointer user_data); -typedef Dartmv_image_recognized_cbFunction = void Function( - mv_source_h source, - mv_engine_config_h engine_cfg, - ffi.Pointer image_objects, - ffi.Pointer> locations, - int number_of_objects, - ffi.Pointer user_data); - -/// @brief The image tracking model's type handle. -/// -/// @since_tizen 3.0 -typedef mv_image_tracking_model_h = ffi.Pointer; - -/// @brief Called when image tracking result received from @ref mv_image_track() -/// @details Image tracking on a sequence of frames assumes calling -/// @ref mv_image_track() function for each frame in the correct order. -/// This type of callback will be called after each @ref mv_image_track() -/// call for processing result data. -/// -/// @since_tizen 3.0 -/// @remarks If image object is not tracked then the callback will be invoked, -/// but @a location will be NULL. -/// @remarks Handles @a image_tracking_model, @a source and @a engine_cfg the -/// same as input parameters of @ref mv_image_track(). -/// @remarks @a location pointer is valid only inside callback -/// @param [in] source The handle to the source image on which -/// the tracking was carried out -/// @param [in] image_tracking_model The handle to the image tracking model -/// which processed as target of tracking -/// @param [in] engine_cfg The handle to the configuration of engine -/// that was used to image tracking, or -/// NULL if default settings were applied -/// @param [in] location The image object location on the source -/// image or NULL if objects is not tracked -/// @param [in] user_data The user data passed from the -/// @ref mv_image_track() function -/// -/// @pre Call @ref mv_image_track() function to perform tracking of the image -/// object on the current image from the sequence and invoke this callback -/// as a result -/// -/// @see mv_image_track() -/// @see mv_source_h -/// @see image_tracking_model_h -/// @see mv_engine_config_h -/// @see mv_quadrangle_s -typedef mv_image_tracked_cb - = ffi.Pointer>; -typedef mv_image_tracked_cbFunction = ffi.Void Function( - mv_source_h source, - mv_image_tracking_model_h image_tracking_model, - mv_engine_config_h engine_cfg, - ffi.Pointer location, - ffi.Pointer user_data); -typedef Dartmv_image_tracked_cbFunction = void Function( - mv_source_h source, - mv_image_tracking_model_h image_tracking_model, - mv_engine_config_h engine_cfg, - ffi.Pointer location, - ffi.Pointer user_data); - -/// @brief The handle to event trigger. -/// -/// @since_tizen 3.0 -/// @remarks See supported event types and their descriptions in -/// @ref CAPI_MEDIA_VISION_SURVEILLANCE_EVENT_TYPES documentation -/// section. -/// Also the list of supported events can be obtained using -/// @ref mv_surveillance_foreach_supported_event_type() function -typedef mv_surveillance_event_trigger_h = ffi.Pointer; - -/// @brief Called when event trigger activation has been detected. -/// -/// @since_tizen 3.0 -/// @remarks Handle @a event_result is valid only inside callback -/// @param [in] trigger The event trigger handle -/// @param [in] source The handle to the media source -/// @param [in] video_stream_id The identifier of the video source where event -/// has been detected -/// @param [in] event_result The event result passed from the -/// @ref mv_surveillance_subscribe_event_trigger() -/// @param [in] user_data The user data passed from the -/// @ref mv_surveillance_subscribe_event_trigger() -/// function -/// -/// @pre Callback can be invoked only after -/// @ref mv_surveillance_subscribe_event_trigger() -/// was called for particular event trigger. -/// -/// @see mv_surveillance_subscribe_event_trigger() -/// @see mv_surveillance_unsubscribe_event_trigger() -typedef mv_surveillance_event_occurred_cb = ffi - .Pointer>; -typedef mv_surveillance_event_occurred_cbFunction = ffi.Void Function( - mv_surveillance_event_trigger_h trigger, - mv_source_h source, - ffi.Int video_stream_id, - mv_surveillance_result_h event_result, - ffi.Pointer user_data); -typedef Dartmv_surveillance_event_occurred_cbFunction = void Function( - mv_surveillance_event_trigger_h trigger, - mv_source_h source, - int video_stream_id, - mv_surveillance_result_h event_result, - ffi.Pointer user_data); - -/// @brief The handle to event trigger activation result. -/// @details Result is a handle to the output values which are specific for each event. -/// See the output values names in the event types descriptions located -/// in @ref CAPI_MEDIA_VISION_SURVEILLANCE_EVENT_TYPES documentation -/// section. -/// Result values can be gotten by @ref mv_surveillance_get_result_value() -/// function one by one in order specified in the event description ( -/// the same order of event value names is supported by -/// @ref mv_surveillance_foreach_event_result_name() function). -/// This pointer will be destroyed when -/// @ref mv_surveillance_event_occurred_cb passed. -/// -/// @since_tizen 3.0 -typedef mv_surveillance_result_h = ffi.Pointer; - -/// @brief Called to get the information once for each supported event type. -/// -/// @since_tizen 3.0 -/// @remarks Don't release memory of @a event_type -/// @param [in] event_type Character string containing name of the event type -/// @param [in] user_data The user data passed from the -/// @ref mv_surveillance_foreach_supported_event_type() -/// function -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// -/// @pre mv_surveillance_foreach_supported_event_type() will invoke this callback -/// @see mv_surveillance_foreach_supported_event_type() -typedef mv_surveillance_event_type_cb - = ffi.Pointer>; -typedef mv_surveillance_event_type_cbFunction = ffi.Bool Function( - ffi.Pointer event_type, ffi.Pointer user_data); -typedef Dartmv_surveillance_event_type_cbFunction = bool Function( - ffi.Pointer event_type, ffi.Pointer user_data); - -/// @brief Called to get the result name from the triggered event. -/// -/// @since_tizen 3.0 -/// @remarks Don't release memory of @a value_name -/// @param [in] name Character string containing the name of value that -/// can be obtained from @ref mv_surveillance_result_h -/// handle by @ref mv_surveillance_get_result_value() -/// function -/// @param [in] user_data The user data passed from the -/// @ref mv_surveillance_foreach_event_result_name() -/// function -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// -/// @pre mv_surveillance_foreach_event_result_name() will invoke this -/// callback -/// @see mv_surveillance_foreach_event_result_name() -typedef mv_surveillance_event_result_name_cb = ffi - .Pointer>; -typedef mv_surveillance_event_result_name_cbFunction = ffi.Bool Function( - ffi.Pointer name, ffi.Pointer user_data); -typedef Dartmv_surveillance_event_result_name_cbFunction = bool Function( - ffi.Pointer name, ffi.Pointer user_data); - -/// @ingroup CAPI_MEDIA_METADATA_EDITOR_MODULE -/// @brief The enumerations of media metadata error. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class metadata_editor_error_e { - /// < Successful - static const int METADATA_EDITOR_ERROR_NONE = 0; - - /// < Invalid parameter - static const int METADATA_EDITOR_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int METADATA_EDITOR_ERROR_OUT_OF_MEMORY = -12; - - /// < File not exist - static const int METADATA_EDITOR_ERROR_FILE_EXISTS = -17; - - /// < Permission denied - static const int METADATA_EDITOR_ERROR_PERMISSION_DENIED = -13; - - /// < Unsupported type - static const int METADATA_EDITOR_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Invalid internal operation - static const int METADATA_EDITOR_ERROR_OPERATION_FAILED = -27000831; -} - -/// @ingroup CAPI_MEDIA_METADATA_EDITOR_MODULE -/// @brief The enumerations of attribute. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class metadata_editor_attr_e { - /// < Artist - static const int METADATA_EDITOR_ATTR_ARTIST = 0; - - /// < Title - static const int METADATA_EDITOR_ATTR_TITLE = 1; - - /// < Album - static const int METADATA_EDITOR_ATTR_ALBUM = 2; - - /// < Genre - static const int METADATA_EDITOR_ATTR_GENRE = 3; - - /// < Author - static const int METADATA_EDITOR_ATTR_AUTHOR = 4; - - /// < Copyright - static const int METADATA_EDITOR_ATTR_COPYRIGHT = 5; - - /// < Date - static const int METADATA_EDITOR_ATTR_DATE = 6; - - /// < Description - static const int METADATA_EDITOR_ATTR_DESCRIPTION = 7; - - /// < Comment - static const int METADATA_EDITOR_ATTR_COMMENT = 8; - - /// < Track number info - static const int METADATA_EDITOR_ATTR_TRACK_NUM = 9; - - /// < Picture number - static const int METADATA_EDITOR_ATTR_PICTURE_NUM = 10; - - /// < Conductor - static const int METADATA_EDITOR_ATTR_CONDUCTOR = 11; - - /// < Unsynchronized lyric - static const int METADATA_EDITOR_ATTR_UNSYNCLYRICS = 12; -} - -/// @ingroup CAPI_MEDIA_METADATA_EDITOR_MODULE -/// @brief The handle of media metadata. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -typedef metadata_editor_h = ffi.Pointer; - -/// @ingroup CAPI_METADATA_EXTRACTOR_MODULE -/// @brief Enumeration for metadata extractor error. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class metadata_extractor_error_e { - /// < Successful - static const int METADATA_EXTRACTOR_ERROR_NONE = 0; - - /// < Invalid parameter - static const int METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int METADATA_EXTRACTOR_ERROR_OUT_OF_MEMORY = -12; - - /// < File does not exist - static const int METADATA_EXTRACTOR_ERROR_FILE_EXISTS = -17; - - /// < Permission denied - static const int METADATA_EXTRACTOR_ERROR_PERMISSION_DENIED = -13; - - /// < Invalid internal operation - static const int METADATA_EXTRACTOR_ERROR_OPERATION_FAILED = -26411007; -} - -/// @ingroup CAPI_METADATA_EXTRACTOR_MODULE -/// @brief Enumeration for attribute. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class metadata_extractor_attr_e { - /// < Duration - static const int METADATA_DURATION = 0; - - /// < Video Bitrate - static const int METADATA_VIDEO_BITRATE = 1; - - /// < Video FPS - static const int METADATA_VIDEO_FPS = 2; - - /// < Video Width - static const int METADATA_VIDEO_WIDTH = 3; - - /// < Video Height - static const int METADATA_VIDEO_HEIGHT = 4; - - /// < Video stream count - static const int METADATA_HAS_VIDEO = 5; - - /// < Audio Bitrate - static const int METADATA_AUDIO_BITRATE = 6; - - /// < Audio Channels - static const int METADATA_AUDIO_CHANNELS = 7; - - /// < Audio Samplerate - static const int METADATA_AUDIO_SAMPLERATE = 8; - - /// < Audio bit per sample - static const int METADATA_AUDIO_BITPERSAMPLE = 9; - - /// < Audio stream count - static const int METADATA_HAS_AUDIO = 10; - - /// < Artist - static const int METADATA_ARTIST = 11; - - /// < Title - static const int METADATA_TITLE = 12; - - /// < Album - static const int METADATA_ALBUM = 13; - - /// < Album_Artist - static const int METADATA_ALBUM_ARTIST = 14; - - /// < Genre - static const int METADATA_GENRE = 15; - - /// < Author (Deprecated since 4.0. Use METADATA_COMPOSER instead) - static const int METADATA_AUTHOR = 16; - - /// < Composer - static const int METADATA_COMPOSER = 16; - - /// < Copyright - static const int METADATA_COPYRIGHT = 17; - - /// < Date - static const int METADATA_DATE = 18; - - /// < Description - static const int METADATA_DESCRIPTION = 19; - - /// < Comment - static const int METADATA_COMMENT = 20; - - /// < Track number info - static const int METADATA_TRACK_NUM = 21; - - /// < Classification - static const int METADATA_CLASSIFICATION = 22; - - /// < Rating - static const int METADATA_RATING = 23; - - /// < Longitude - static const int METADATA_LONGITUDE = 24; - - /// < Latitude - static const int METADATA_LATITUDE = 25; - - /// < Altitude - static const int METADATA_ALTITUDE = 26; - - /// < Conductor - static const int METADATA_CONDUCTOR = 27; - - /// < Unsynchronized lyric - static const int METADATA_UNSYNCLYRICS = 28; - - /// < Synchronized lyric (time/lyric set) number - static const int METADATA_SYNCLYRICS_NUM = 29; - - /// < Recording date - static const int METADATA_RECDATE = 30; - - /// < Rotate(Orientation) Information - static const int METADATA_ROTATE = 31; - - /// < Video Codec (Since 3.0) - static const int METADATA_VIDEO_CODEC = 32; - - /// < Audio Codec (Since 3.0) - static const int METADATA_AUDIO_CODEC = 33; - - /// < Flag indicating if the video is a spherical video (Since 3.0) - static const int METADATA_360 = 34; -} - -final class metadata_extractor_s extends ffi.Opaque {} - -/// @ingroup CAPI_METADATA_EXTRACTOR_MODULE -/// @brief The metadata extractor handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef metadata_extractor_h = ffi.Pointer; - -final class player_s extends ffi.Opaque {} - -/// @brief Enumeration for media player state. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class player_state_e { - /// < Player is not created - static const int PLAYER_STATE_NONE = 0; - - /// < Player is created, but not prepared - static const int PLAYER_STATE_IDLE = 1; - - /// < Player is ready to play media - static const int PLAYER_STATE_READY = 2; - - /// < Player is playing media - static const int PLAYER_STATE_PLAYING = 3; - - /// < Player is paused while playing media - static const int PLAYER_STATE_PAUSED = 4; -} - -/// @brief Enumeration for media player's error codes. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class player_error_e { - /// < Successful - static const int PLAYER_ERROR_NONE = 0; - - /// < Out of memory - static const int PLAYER_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int PLAYER_ERROR_INVALID_PARAMETER = -22; - - /// < No such file or directory - static const int PLAYER_ERROR_NO_SUCH_FILE = -2; - - /// < Invalid operation - static const int PLAYER_ERROR_INVALID_OPERATION = -38; - - /// < No space left on the device - static const int PLAYER_ERROR_FILE_NO_SPACE_ON_DEVICE = -28; - - /// < Not supported Feature - static const int PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE = -1073741822; - - /// < Seek operation failure - static const int PLAYER_ERROR_SEEK_FAILED = -26476511; - - /// < Invalid state - static const int PLAYER_ERROR_INVALID_STATE = -26476510; - - /// < File format not supported - static const int PLAYER_ERROR_NOT_SUPPORTED_FILE = -26476509; - - /// < Invalid URI - static const int PLAYER_ERROR_INVALID_URI = -26476508; - - /// < Sound policy error - static const int PLAYER_ERROR_SOUND_POLICY = -26476507; - - /// < Streaming connection failed - static const int PLAYER_ERROR_CONNECTION_FAILED = -26476506; - - /// < Video capture failed - static const int PLAYER_ERROR_VIDEO_CAPTURE_FAILED = -26476505; - - /// < Expired license - static const int PLAYER_ERROR_DRM_EXPIRED = -26476504; - - /// < No license - static const int PLAYER_ERROR_DRM_NO_LICENSE = -26476503; - - /// < License for future use - static const int PLAYER_ERROR_DRM_FUTURE_USE = -26476502; - - /// < Format not permitted - static const int PLAYER_ERROR_DRM_NOT_PERMITTED = -26476501; - - /// < Resource limit - static const int PLAYER_ERROR_RESOURCE_LIMIT = -26476500; - - /// < Permission denied - static const int PLAYER_ERROR_PERMISSION_DENIED = -13; - - /// < Socket connection lost (Since 3.0) - static const int PLAYER_ERROR_SERVICE_DISCONNECTED = -26476499; - - /// < No buffer space available (Since 3.0) - static const int PLAYER_ERROR_BUFFER_SPACE = -105; - - /// < Not supported audio codec but video can be played (Since 4.0) - static const int PLAYER_ERROR_NOT_SUPPORTED_AUDIO_CODEC = -26476498; - - /// < Not supported video codec but audio can be played (Since 4.0) - static const int PLAYER_ERROR_NOT_SUPPORTED_VIDEO_CODEC = -26476497; - - /// < Not supported subtitle format (Since 4.0) - static const int PLAYER_ERROR_NOT_SUPPORTED_SUBTITLE = -26476496; -} - -/// @brief Enumeration for media player's interruption type. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class player_interrupted_code_e { - /// < Interrupted by a resource conflict and the player handle will be paused or unprepared - static const int PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT = 4; -} - -/// @brief Enumeration for progressive download message type. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class player_pd_message_type_e { - /// < Progressive download is started - static const int PLAYER_PD_STARTED = 0; - - /// < Progressive download is completed - static const int PLAYER_PD_COMPLETED = 1; -} - -/// @brief Enumeration for display type. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class player_display_type_e { - /// < Overlay surface display - static const int PLAYER_DISPLAY_TYPE_OVERLAY = 0; - static const int PLAYER_DISPLAY_TYPE_OBSOLETE_EVAS_WNONE = 1; - static const int PLAYER_DISPLAY_TYPE_OBSOLETE_NONE_WEVAS = 2; - - /// < Evas image object surface display (Since 4.0) - static const int PLAYER_DISPLAY_TYPE_EVAS = 3; - - /// < This disposes of buffers (Since 4.0) - static const int PLAYER_DISPLAY_TYPE_NONE = 4; -} - -/// @brief Enumeration for audio latency mode. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class audio_latency_mode_e { - /// < Low audio latency mode - static const int AUDIO_LATENCY_MODE_LOW = 0; - - /// < Middle audio latency mode - static const int AUDIO_LATENCY_MODE_MID = 1; - - /// < High audio latency mode - static const int AUDIO_LATENCY_MODE_HIGH = 2; -} - -/// @brief Enumeration for stream type. -/// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif -abstract class player_stream_type_e { - /// < Container type - static const int PLAYER_STREAM_TYPE_DEFAULT = 0; - - /// < Audio element stream type - static const int PLAYER_STREAM_TYPE_AUDIO = 1; - - /// < Video element stream type - static const int PLAYER_STREAM_TYPE_VIDEO = 2; - - /// < Text type - static const int PLAYER_STREAM_TYPE_TEXT = 3; -} - -/// @brief Enumeration of media stream buffer status. -/// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif -/// @see player_set_media_stream_buffer_max_size() -/// @see player_set_media_stream_buffer_min_threshold() -abstract class player_media_stream_buffer_status_e { - /// < The buffer level is lower than the threshold - static const int PLAYER_MEDIA_STREAM_BUFFER_UNDERRUN = 0; - - /// < The buffer level is over than the threshold - static const int PLAYER_MEDIA_STREAM_BUFFER_OVERFLOW = 1; -} - -/// @brief Enumeration for display rotation type. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class player_display_rotation_e { - /// < Display is not rotated - static const int PLAYER_DISPLAY_ROTATION_NONE = 0; - - /// < Display is rotated 90 degrees - static const int PLAYER_DISPLAY_ROTATION_90 = 1; - - /// < Display is rotated 180 degrees - static const int PLAYER_DISPLAY_ROTATION_180 = 2; - - /// < Display is rotated 270 degrees - static const int PLAYER_DISPLAY_ROTATION_270 = 3; -} - -/// @brief Enumeration for display mode. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class player_display_mode_e { - /// < Letter box - static const int PLAYER_DISPLAY_MODE_LETTER_BOX = 0; - - /// < Origin size - static const int PLAYER_DISPLAY_MODE_ORIGIN_SIZE = 1; - - /// < Full-screen - static const int PLAYER_DISPLAY_MODE_FULL_SCREEN = 2; - - /// < Cropped full-screen - static const int PLAYER_DISPLAY_MODE_CROPPED_FULL = 3; - - /// < Origin size (if surface size is larger than video size(width/height)) or Letter box (if video size(width/height) is larger than surface size) - static const int PLAYER_DISPLAY_MODE_ORIGIN_OR_LETTER = 4; - - /// < Dst ROI mode - static const int PLAYER_DISPLAY_MODE_DST_ROI = 5; - static const int PLAYER_DISPLAY_MODE_NUM = 6; -} - -/// @brief Enumeration for media stream content information. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class player_content_info_e { - /// < Album - static const int PLAYER_CONTENT_INFO_ALBUM = 0; - - /// < Artist - static const int PLAYER_CONTENT_INFO_ARTIST = 1; - - /// < Author - static const int PLAYER_CONTENT_INFO_AUTHOR = 2; - - /// < Genre - static const int PLAYER_CONTENT_INFO_GENRE = 3; - - /// < Title - static const int PLAYER_CONTENT_INFO_TITLE = 4; - - /// < Year - static const int PLAYER_CONTENT_INFO_YEAR = 5; -} - -/// @brief The media player's type handle. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -typedef player_h = ffi.Pointer; - -/// @brief Called when the media player is prepared. -/// @details It will be invoked when player has reached the begin of stream. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @param[in] user_data The user data passed from the callback registration function -/// @pre player_prepare_async() will cause this callback. -/// @post The player state will be #PLAYER_STATE_READY. -/// @see player_prepare_async() -typedef player_prepared_cb - = ffi.Pointer>; -typedef player_prepared_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartplayer_prepared_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Called when the seek operation is completed. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @param[in] user_data The user data passed from the callback registration function -/// @see player_set_play_position() -/// @see player_set_play_position_nsec() -typedef player_seek_completed_cb - = ffi.Pointer>; -typedef player_seek_completed_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartplayer_seek_completed_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief The player display handle. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -typedef player_display_h = ffi.Pointer; - -/// @brief Called to register for notifications about delivering media packet when every video frame is decoded. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @remarks The UI update code must not be directly invoked.\n -/// @remarks The @a packet should be released using media_packet_destroy(). \n -/// If not, the decoder will fail due to having insufficient buffer space for the decoded frame. -/// -/// @param[in] packet Reference pointer to the media packet -/// @param[in] user_data The user data passed from the callback registration function -typedef player_media_packet_video_decoded_cb = ffi - .Pointer>; -typedef player_media_packet_video_decoded_cbFunction = ffi.Void Function( - media_packet_h packet, ffi.Pointer user_data); -typedef Dartplayer_media_packet_video_decoded_cbFunction = void Function( - media_packet_h packet, ffi.Pointer user_data); - -/// @brief Called when the buffer level drops below the threshold of max size or no free space in buffer. -/// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif -/// @remarks This function is used for media stream playback only. -/// @param[in] status The buffer status -/// @param[in] user_data The user data passed from the callback registration function -/// @see player_set_media_stream_buffer_status_cb() -/// @see player_set_media_stream_buffer_max_size() -/// @see player_set_media_stream_buffer_min_threshold() -typedef player_media_stream_buffer_status_cb = ffi - .Pointer>; -typedef player_media_stream_buffer_status_cbFunction = ffi.Void Function( - ffi.Int32 status, ffi.Pointer user_data); -typedef Dartplayer_media_stream_buffer_status_cbFunction = void Function( - int status, ffi.Pointer user_data); - -/// @brief Called to notify the next push-buffer offset when seeking is occurred. -/// @details The next push-buffer should produce buffers from the new offset. -/// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif -/// @remarks This function is used for media stream playback only. -/// @param[in] offset The new byte position to seek -/// @param[in] user_data The user data passed from the callback registration function -typedef player_media_stream_seek_cb - = ffi.Pointer>; -typedef player_media_stream_seek_cbFunction = ffi.Void Function( - ffi.UnsignedLongLong offset, ffi.Pointer user_data); -typedef Dartplayer_media_stream_seek_cbFunction = void Function( - int offset, ffi.Pointer user_data); - -/// @brief Called when the video is captured. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @remarks The color space format of the captured image is IMAGE_UTIL_COLORSPACE_RGB888. -/// @remarks The @a captured_data should not be released and it can be used only in the callback. -/// To use outside, make a copy. -/// @param[in] captured_data The captured image buffer -/// @param[in] width The width of the captured image -/// @param[in] height The height of the captured image -/// @param[in] size The size of the captured image -/// @param[in] user_data The user data passed from the callback registration function -/// @see player_capture_video() -typedef player_video_captured_cb - = ffi.Pointer>; -typedef player_video_captured_cbFunction = ffi.Void Function( - ffi.Pointer captured_data, - ffi.Int width, - ffi.Int height, - ffi.UnsignedInt size, - ffi.Pointer user_data); -typedef Dartplayer_video_captured_cbFunction = void Function( - ffi.Pointer captured_data, - int width, - int height, - int size, - ffi.Pointer user_data); - -/// @brief Called when the media player is completed. -/// @details It will be invoked when player has reached the end of the stream. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @param[in] user_data The user data passed from the callback registration function -/// @pre It will be invoked when the playback is completed if you register this callback using player_set_completed_cb(). -/// @see player_set_completed_cb() -/// @see player_unset_completed_cb() -typedef player_completed_cb - = ffi.Pointer>; -typedef player_completed_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartplayer_completed_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Called when the media player is interrupted. -/// @details If the code is #PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT, -/// the player state will be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, or #PLAYER_STATE_PAUSED. -/// Application should get exact state by calling player_get_state(). -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @param[in] code The interrupted error code -/// @param[in] user_data The user data passed from the callback registration function -/// @see player_set_interrupted_cb() -/// @see player_unset_interrupted_cb() -/// @see player_get_state() -typedef player_interrupted_cb - = ffi.Pointer>; -typedef player_interrupted_cbFunction = ffi.Void Function( - ffi.Int32 code, ffi.Pointer user_data); -typedef Dartplayer_interrupted_cbFunction = void Function( - int code, ffi.Pointer user_data); - -/// @brief Called when an error occurs in the media player. -/// @details Following error codes can be delivered. -/// #PLAYER_ERROR_INVALID_OPERATION -/// #PLAYER_ERROR_INVALID_STATE -/// #PLAYER_ERROR_INVALID_URI -/// #PLAYER_ERROR_CONNECTION_FAILED -/// #PLAYER_ERROR_DRM_NOT_PERMITTED -/// #PLAYER_ERROR_FILE_NO_SPACE_ON_DEVICE -/// #PLAYER_ERROR_NOT_SUPPORTED_FILE -/// #PLAYER_ERROR_SEEK_FAILED -/// #PLAYER_ERROR_SERVICE_DISCONNECTED -/// #PLAYER_ERROR_NOT_SUPPORTED_AUDIO_CODEC (Since 4.0) -/// #PLAYER_ERROR_NOT_SUPPORTED_VIDEO_CODEC (Since 4.0) -/// #PLAYER_ERROR_NOT_SUPPORTED_SUBTITLE (Since 4.0) -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @param[in] error_code The error code -/// @param[in] user_data The user data passed from the callback registration function -/// @see player_set_error_cb() -/// @see player_unset_error_cb() -typedef player_error_cb - = ffi.Pointer>; -typedef player_error_cbFunction = ffi.Void Function( - ffi.Int error_code, ffi.Pointer user_data); -typedef Dartplayer_error_cbFunction = void Function( - int error_code, ffi.Pointer user_data); - -/// @brief Called when the buffering percentage of the media playback is updated. -/// @details If the buffer is full, it will return 100%. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @param[in] percent The percentage of buffering completed (0~100) -/// @param[in] user_data The user data passed from the callback registration function -/// @see player_set_buffering_cb() -/// @see player_unset_buffering_cb() -typedef player_buffering_cb - = ffi.Pointer>; -typedef player_buffering_cbFunction = ffi.Void Function( - ffi.Int percent, ffi.Pointer user_data); -typedef Dartplayer_buffering_cbFunction = void Function( - int percent, ffi.Pointer user_data); - -/// @brief Called when progressive download is started or completed. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @param[in] type The message type for progressive download -/// @param[in] user_data The user data passed from the callback registration function -typedef player_pd_message_cb - = ffi.Pointer>; -typedef player_pd_message_cbFunction = ffi.Void Function( - ffi.Int32 type, ffi.Pointer user_data); -typedef Dartplayer_pd_message_cbFunction = void Function( - int type, ffi.Pointer user_data); - -/// @brief Called when the subtitle is updated. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @remarks The @a text should not be released and it can be used only in the callback. -/// To use outside, make a copy. -/// @param[in] duration The duration of the updated subtitle -/// @param[in] text The text of the updated subtitle -/// @param[in] user_data The user data passed from the callback registration function -/// @see player_set_subtitle_updated_cb() -/// @see player_unset_subtitle_updated_cb() -typedef player_subtitle_updated_cb - = ffi.Pointer>; -typedef player_subtitle_updated_cbFunction = ffi.Void Function( - ffi.UnsignedLong duration, - ffi.Pointer text, - ffi.Pointer user_data); -typedef Dartplayer_subtitle_updated_cbFunction = void Function( - int duration, ffi.Pointer text, ffi.Pointer user_data); - -/// @brief Called to notify the video stream changed. -/// @details The video stream changing is detected just before rendering operation. -/// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif -/// @param[in] width The width of the captured image -/// @param[in] height The height of the captured image -/// @param[in] fps The frame per second of the video \n -/// It can be @c 0 if there is no video stream information. -/// @param[in] bit_rate The video bit rate [Hz] \n -/// It can be an invalid value if there is no video stream information. -/// @param[in] user_data The user data passed from the callback registration function -/// @see player_set_video_stream_changed_cb() -typedef player_video_stream_changed_cb - = ffi.Pointer>; -typedef player_video_stream_changed_cbFunction = ffi.Void Function( - ffi.Int width, - ffi.Int height, - ffi.Int fps, - ffi.Int bit_rate, - ffi.Pointer user_data); -typedef Dartplayer_video_stream_changed_cbFunction = void Function(int width, - int height, int fps, int bit_rate, ffi.Pointer user_data); - -/// @brief Called to notify the streaming variant information. -/// @details The adaptive streaming protocol(hls, mpeg dash) can support variant stream condition. -/// All the streaming variant information can be shared by calling player_foreach_adaptive_variant(). -/// @since_tizen 4.0 -/// @param[in] bandwidth The bandwidth of the stream can be supportable, this is mandatory parameter -/// @param[in] width The width of the stream, this is optional parameter -/// @param[in] height The height of the stream, this is optional parameter -/// @param[in] user_data The user data passed from the callback registration function -/// @see player_foreach_adaptive_variant() -typedef player_adaptive_variant_cb - = ffi.Pointer>; -typedef player_adaptive_variant_cbFunction = ffi.Void Function( - ffi.Int bandwidth, - ffi.Int width, - ffi.Int height, - ffi.Pointer user_data); -typedef Dartplayer_adaptive_variant_cbFunction = void Function( - int bandwidth, int width, int height, ffi.Pointer user_data); - -final class radio_s extends ffi.Opaque {} - -/// @brief Enumeration of radio state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class radio_state_e { - /// < Ready to play or scan - static const int RADIO_STATE_READY = 0; - - /// < Playing the audio from the tuner - static const int RADIO_STATE_PLAYING = 1; - - /// < Scanning/Searching for the next station signal that starts from a given starting frequency - static const int RADIO_STATE_SCANNING = 2; -} - -/// @brief Enumeration of error codes for the radio. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class radio_error_e { - /// < Successful - static const int RADIO_ERROR_NONE = 0; - - /// < Out of memory - static const int RADIO_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int RADIO_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid operation - static const int RADIO_ERROR_INVALID_OPERATION = -38; - - /// < Invalid state - static const int RADIO_ERROR_INVALID_STATE = -26869759; - - /// < Sound policy error - static const int RADIO_ERROR_SOUND_POLICY = -26869758; - - /// < No Antenna error (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int RADIO_ERROR_NO_ANTENNA = -26869757; - - /// < Permission denied - static const int RADIO_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int RADIO_ERROR_NOT_SUPPORTED = -1073741822; -} - -/// @brief Enumeration of radio interrupted type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class radio_interrupted_code_e { - /// < Interrupted by a resource conflict - static const int RADIO_INTERRUPTED_BY_RESOURCE_CONFLICT = 4; -} - -/// @brief Radio type handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef radio_h = ffi.Pointer; - -/// @brief Called when the radio seek is completed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] frequency The current frequency [87500 ~ 108000] (kHz) -/// @param[in] user_data The user data passed from the callback registration function -/// @pre It will be invoked when the radio seek is completed by registering this callback using radio_seek_up() or radio_seek_down(). -/// @see radio_seek_up() -/// @see radio_seek_down() -typedef radio_seek_completed_cb - = ffi.Pointer>; -typedef radio_seek_completed_cbFunction = ffi.Void Function( - ffi.Int frequency, ffi.Pointer user_data); -typedef Dartradio_seek_completed_cbFunction = void Function( - int frequency, ffi.Pointer user_data); - -/// @brief Called when the scan information is updated. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] frequency The tuned radio frequency [87500 ~ 108000] (kHz) -/// @param[in] user_data The user data passed from the callback registration function -/// @pre It will be invoked by radio_scan_start(). -/// @see radio_scan_start() -typedef radio_scan_updated_cb - = ffi.Pointer>; -typedef radio_scan_updated_cbFunction = ffi.Void Function( - ffi.Int frequency, ffi.Pointer user_data); -typedef Dartradio_scan_updated_cbFunction = void Function( - int frequency, ffi.Pointer user_data); - -/// @brief Called when the radio scan is stopped. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] user_data The user data passed from the callback registration function -/// @pre It will be invoked when the scan is stopped by radio_scan_stop(). -/// @see radio_scan_stop() -typedef radio_scan_stopped_cb - = ffi.Pointer>; -typedef radio_scan_stopped_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartradio_scan_stopped_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Called when the radio scan is completed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] user_data The user data passed from the callback registration function -/// @pre It will be invoked when the scan is completed by registering this callback using radio_set_scan_completed_cb(). -/// @see radio_scan_start() -/// @see radio_set_scan_completed_cb() -/// @see radio_unset_scan_completed_cb() -typedef radio_scan_completed_cb - = ffi.Pointer>; -typedef radio_scan_completed_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartradio_scan_completed_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Called when the radio is interrupted. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] code The interrupted error code -/// @param[in] user_data The user data passed from the callback registration function -/// @see radio_set_interrupted_cb() -/// @see radio_unset_interrupted_cb() -typedef radio_interrupted_cb - = ffi.Pointer>; -typedef radio_interrupted_cbFunction = ffi.Void Function( - ffi.Int32 code, ffi.Pointer user_data); -typedef Dartradio_interrupted_cbFunction = void Function( - int code, ffi.Pointer user_data); - -final class recorder_s extends ffi.Opaque {} - -/// @brief Enumeration for error code of the media recorder. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class recorder_error_e { - /// < Successful - static const int RECORDER_ERROR_NONE = 0; - - /// < Invalid parameter - static const int RECORDER_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid state - static const int RECORDER_ERROR_INVALID_STATE = -26542062; - - /// < Out of memory - static const int RECORDER_ERROR_OUT_OF_MEMORY = -12; - - /// < Device error - static const int RECORDER_ERROR_DEVICE = -26542060; - - /// < Internal error - static const int RECORDER_ERROR_INVALID_OPERATION = -38; - - /// < Restricted by security system policy - static const int RECORDER_ERROR_SECURITY_RESTRICTED = -26542057; - - /// < ESD situation - static const int RECORDER_ERROR_ESD = -26542054; - - /// < Out of storage - static const int RECORDER_ERROR_OUT_OF_STORAGE = -26542053; - - /// < The access to the resources can not be granted - static const int RECORDER_ERROR_PERMISSION_DENIED = -13; - - /// < The feature is not supported - static const int RECORDER_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Blocked by resource conflict (Since 3.0) - static const int RECORDER_ERROR_RESOURCE_CONFLICT = -26542052; - - /// < Socket connection lost (Since 3.0) - static const int RECORDER_ERROR_SERVICE_DISCONNECTED = -26542051; -} - -/// @brief Enumeration for recorder states. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class recorder_state_e { - /// < Recorder is not created - static const int RECORDER_STATE_NONE = 0; - - /// < Recorder is created, but not prepared - static const int RECORDER_STATE_CREATED = 1; - - /// < Recorder is ready to record \n In case of video recorder, preview display will be shown - static const int RECORDER_STATE_READY = 2; - - /// < Recorder is recording media - static const int RECORDER_STATE_RECORDING = 3; - - /// < Recorder is paused while recording media - static const int RECORDER_STATE_PAUSED = 4; -} - -/// @brief Enumeration for the recording limit. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class recorder_recording_limit_type_e { - /// < Time limit (second) of recording file - static const int RECORDER_RECORDING_LIMIT_TIME = 0; - - /// < Size limit (kilo bytes [KB]) of recording file - static const int RECORDER_RECORDING_LIMIT_SIZE = 1; - - /// < No free space in storage - static const int RECORDER_RECORDING_LIMIT_FREE_SPACE = 2; -} - -/// @brief Enumeration for the file container format. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class recorder_file_format_e { - /// < 3GP file format - static const int RECORDER_FILE_FORMAT_3GP = 0; - - /// < MP4 file format - static const int RECORDER_FILE_FORMAT_MP4 = 1; - - /// < AMR file format - static const int RECORDER_FILE_FORMAT_AMR = 2; - - /// < ADTS file format - static const int RECORDER_FILE_FORMAT_ADTS = 3; - - /// < WAV file format - static const int RECORDER_FILE_FORMAT_WAV = 4; - - /// < OGG file format - static const int RECORDER_FILE_FORMAT_OGG = 5; - - /// < MPEG2-TransportStream file format (Since 3.0) - static const int RECORDER_FILE_FORMAT_M2TS = 6; -} - -/// @brief Enumeration for the audio codec. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class recorder_audio_codec_e { - /// < Disable audio track - static const int RECORDER_AUDIO_CODEC_DISABLE = -1; - - /// < AMR codec - static const int RECORDER_AUDIO_CODEC_AMR = 0; - - /// < AAC codec - static const int RECORDER_AUDIO_CODEC_AAC = 1; - - /// < Vorbis codec - static const int RECORDER_AUDIO_CODEC_VORBIS = 2; - - /// < PCM codec - static const int RECORDER_AUDIO_CODEC_PCM = 3; - - /// < MP3 codec (Since 3.0) - static const int RECORDER_AUDIO_CODEC_MP3 = 4; -} - -/// @brief Enumeration for the video codec. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class recorder_video_codec_e { - /// < H263 codec - static const int RECORDER_VIDEO_CODEC_H263 = 0; - - /// < H264 codec - static const int RECORDER_VIDEO_CODEC_H264 = 1; - - /// < MPEG4 codec - static const int RECORDER_VIDEO_CODEC_MPEG4 = 2; - - /// < Theora codec - static const int RECORDER_VIDEO_CODEC_THEORA = 3; -} - -/// @brief Enumeration for audio capture devices. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class recorder_audio_device_e { - /// < Mic device - static const int RECORDER_AUDIO_DEVICE_MIC = 0; - - /// < Modem - static const int RECORDER_AUDIO_DEVICE_MODEM = 1; -} - -/// @brief Enumeration for the recorder rotation type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class recorder_rotation_e { - /// < No rotation - static const int RECORDER_ROTATION_NONE = 0; - - /// < 90 degree rotation - static const int RECORDER_ROTATION_90 = 1; - - /// < 180 degree rotation - static const int RECORDER_ROTATION_180 = 2; - - /// < 270 degree rotation - static const int RECORDER_ROTATION_270 = 3; -} - -/// @brief Enumeration for the recorder policy. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class recorder_policy_e { - /// < None - static const int RECORDER_POLICY_NONE = 0; - - /// < Security policy - static const int RECORDER_POLICY_SECURITY = 4; - - /// < Resource conflict (Since 3.0) - static const int RECORDER_POLICY_RESOURCE_CONFLICT = 5; -} - -/// @brief Enumeration for the recorder type. -/// @since_tizen 3.0 -abstract class recorder_type_e { - /// < Audio only recorder - static const int RECORDER_TYPE_AUDIO = 0; - - /// < Video recorder (audio is optional) - static const int RECORDER_TYPE_VIDEO = 1; -} - -/// @brief Enumeration for the recorder device state. -/// @since_tizen 3.0 -abstract class recorder_device_state_e { - /// < No recording in progress - static const int RECORDER_DEVICE_STATE_IDLE = 0; - - /// < Now recording - static const int RECORDER_DEVICE_STATE_RECORDING = 1; - - /// < All recordings are paused - static const int RECORDER_DEVICE_STATE_PAUSED = 2; -} - -/// @brief The Media recorder handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef recorder_h = ffi.Pointer; - -/// @brief Called iteratively to notify about the supported file formats. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] format The format of recording files -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre recorder_foreach_supported_file_format() will invoke this callback. -/// @see recorder_foreach_supported_file_format() -typedef recorder_supported_file_format_cb = ffi - .Pointer>; -typedef recorder_supported_file_format_cbFunction = ffi.Bool Function( - ffi.Int32 format, ffi.Pointer user_data); -typedef Dartrecorder_supported_file_format_cbFunction = bool Function( - int format, ffi.Pointer user_data); - -/// @brief Called iteratively to notify about the supported audio encoders. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] codec The codec of audio encoder -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre recorder_foreach_supported_audio_encoder() will invoke this callback. -/// @see recorder_foreach_supported_audio_encoder() -typedef recorder_supported_audio_encoder_cb = ffi - .Pointer>; -typedef recorder_supported_audio_encoder_cbFunction = ffi.Bool Function( - ffi.Int32 codec, ffi.Pointer user_data); -typedef Dartrecorder_supported_audio_encoder_cbFunction = bool Function( - int codec, ffi.Pointer user_data); - -/// @brief Called once for each supported video resolution. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] width The video image width -/// @param[in] height The video image height -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre recorder_foreach_supported_video_resolution() will invoke this callback. -/// @see recorder_foreach_supported_video_resolution() -typedef recorder_supported_video_resolution_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef recorder_supported_video_resolution_cbFunction = ffi.Bool Function( - ffi.Int width, ffi.Int height, ffi.Pointer user_data); -typedef Dartrecorder_supported_video_resolution_cbFunction = bool Function( - int width, int height, ffi.Pointer user_data); - -/// @brief Called iteratively to notify about the supported video encoders. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] codec The codec of video encoder -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre recorder_foreach_supported_video_encoder() will invoke this callback. -/// @see recorder_foreach_supported_video_encoder() -typedef recorder_supported_video_encoder_cb = ffi - .Pointer>; -typedef recorder_supported_video_encoder_cbFunction = ffi.Bool Function( - ffi.Int32 codec, ffi.Pointer user_data); -typedef Dartrecorder_supported_video_encoder_cbFunction = bool Function( - int codec, ffi.Pointer user_data); - -/// @brief Called when the record state is changed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] previous The previous state of the recorder -/// @param[in] current The current state of the recorder -/// @param[in] by_policy @c true if the state is changed by policy, otherwise @c false if the state is not changed -/// @param[in] user_data The user data passed from the callback registration function -/// @pre This function is required to register a callback using recorder_set_state_changed_cb(). -/// @see recorder_set_state_changed_cb() -/// @see recorder_prepare() -/// @see recorder_unprepare() -/// @see recorder_start() -/// @see recorder_pause() -/// @see recorder_commit() -/// @see recorder_cancel() -typedef recorder_state_changed_cb - = ffi.Pointer>; -typedef recorder_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 previous, - ffi.Int32 current, - ffi.Bool by_policy, - ffi.Pointer user_data); -typedef Dartrecorder_state_changed_cbFunction = void Function( - int previous, int current, bool by_policy, ffi.Pointer user_data); - -/// @brief Called when the recorder is interrupted by a policy. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks This callback is called after interrupt handling is completed. -/// @param[in] policy The policy that interrupted the recorder -/// @param[in] previous The previous state of the recorder -/// @param[in] current The current state of the recorder -/// @param[in] user_data The user data passed from the callback registration function -/// @see recorder_set_interrupted_cb() -typedef recorder_interrupted_cb - = ffi.Pointer>; -typedef recorder_interrupted_cbFunction = ffi.Void Function(ffi.Int32 policy, - ffi.Int32 previous, ffi.Int32 current, ffi.Pointer user_data); -typedef Dartrecorder_interrupted_cbFunction = void Function( - int policy, int previous, int current, ffi.Pointer user_data); - -/// @brief Called when the recorder interrupt is started by a policy. -/// @since_tizen 4.0 -/// @remarks This callback is called before interrupt handling is started. -/// @param[in] policy The policy that is interrupting the recorder -/// @param[in] state The current state of the recorder -/// @param[in] user_data The user data passed from the callback registration function -/// @see recorder_set_interrupt_started_cb() -typedef recorder_interrupt_started_cb - = ffi.Pointer>; -typedef recorder_interrupt_started_cbFunction = ffi.Void Function( - ffi.Int32 policy, ffi.Int32 state, ffi.Pointer user_data); -typedef Dartrecorder_interrupt_started_cbFunction = void Function( - int policy, int state, ffi.Pointer user_data); - -/// @brief Called when audio stream data was being delivered just before storing in the recorded file. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks The callback function holds the same buffer that will be recorded. \n -/// So if the user changes the buffer, the result file will contain the buffer. -/// @remarks The callback is called via internal thread of Frameworks, therefore do not invoke UI API, recorder_unprepare(), recorder_commit() and recorder_cancel() in callback. -/// @param[in] stream The audio stream data -/// @param[in] size The size of the stream data -/// @param[in] format The audio format -/// @param[in] channel The number of the channel -/// @param[in] timestamp The timestamp of the stream buffer (in msec) -/// @param[in] user_data The user data passed from the callback registration function -/// @see recorder_set_audio_stream_cb() -typedef recorder_audio_stream_cb - = ffi.Pointer>; -typedef recorder_audio_stream_cbFunction = ffi.Void Function( - ffi.Pointer stream, - ffi.Int size, - ffi.Int32 format, - ffi.Int channel, - ffi.UnsignedInt timestamp, - ffi.Pointer user_data); -typedef Dartrecorder_audio_stream_cbFunction = void Function( - ffi.Pointer stream, - int size, - int format, - int channel, - int timestamp, - ffi.Pointer user_data); - -/// @brief Called when muxed stream data is delivered just before writing to the file. -/// @since_tizen 4.0 -/// @remarks This callback receives the data that will be recorded, \n -/// but any changes to this data will not affect the recorded file. \n -/// The @a stream should not be freed and it's valid only in the callback. To use outside the callback, make a copy. -/// @param[in] stream The muxed stream data -/// @param[in] size The size of the stream data -/// @param[in] offset The offset of the stream data -/// @param[in] user_data The user data passed from the callback registration function -/// @see recorder_set_muxed_stream_cb() -typedef recorder_muxed_stream_cb - = ffi.Pointer>; -typedef recorder_muxed_stream_cbFunction = ffi.Void Function( - ffi.Pointer stream, - ffi.Int size, - ffi.UnsignedLongLong offset, - ffi.Pointer user_data); -typedef Dartrecorder_muxed_stream_cbFunction = void Function( - ffi.Pointer stream, - int size, - int offset, - ffi.Pointer user_data); - -/// @brief Called to indicate the recording status. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks This callback function is repeatedly invoked during the #RECORDER_STATE_RECORDING state. -/// @param[in] elapsed_time The time of the recording (milliseconds) -/// @param[in] file_size The size of the recording file (KB) -/// @param[in] user_data The user data passed from the callback registration function -/// @pre recorder_start() will invoke this callback if you register it using recorder_set_recording_status_cb(). -/// @see recorder_set_recording_status_cb() -/// @see recorder_unset_recording_status_cb() -/// @see recorder_start() -typedef recorder_recording_status_cb - = ffi.Pointer>; -typedef recorder_recording_status_cbFunction = ffi.Void Function( - ffi.UnsignedLongLong elapsed_time, - ffi.UnsignedLongLong file_size, - ffi.Pointer user_data); -typedef Dartrecorder_recording_status_cbFunction = void Function( - int elapsed_time, int file_size, ffi.Pointer user_data); - -/// @brief Called when limitation error occurs while recording. -/// @details The callback function is possible to receive three types of limits: time, size and no-space. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks After being called, recording data is discarded and not written in the recording file. Also the state of recorder is not changed. -/// @param[in] type The imitation type -/// @param[in] user_data The user data passed from the callback registration function -/// @pre You have to register a callback using recorder_set_recording_limit_reached_cb(). -/// @see recorder_set_recording_status_cb() -/// @see recorder_set_recording_limit_reached_cb() -/// @see recorder_unset_recording_limit_reached_cb() -typedef recorder_recording_limit_reached_cb = ffi - .Pointer>; -typedef recorder_recording_limit_reached_cbFunction = ffi.Void Function( - ffi.Int32 type, ffi.Pointer user_data); -typedef Dartrecorder_recording_limit_reached_cbFunction = void Function( - int type, ffi.Pointer user_data); - -/// @brief Called when the error occurred. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks This callback informs about the critical error situation. \n -/// When being invoked, user should release the resource and terminate the application. \n -/// This error code will be reported. -/// #RECORDER_ERROR_DEVICE \n -/// #RECORDER_ERROR_INVALID_OPERATION \n -/// #RECORDER_ERROR_OUT_OF_MEMORY. -/// @param[in] error The error code -/// @param[in] current_state The current state of the recorder -/// @param[in] user_data The user data passed from the callback registration function -/// @pre This callback function is invoked if you register this callback using recorder_set_error_cb(). -/// @see recorder_set_error_cb() -/// @see recorder_unset_error_cb() -typedef recorder_error_cb - = ffi.Pointer>; -typedef recorder_error_cbFunction = ffi.Void Function( - ffi.Int32 error, ffi.Int32 current_state, ffi.Pointer user_data); -typedef Dartrecorder_error_cbFunction = void Function( - int error, int current_state, ffi.Pointer user_data); - -/// @brief Called when the recorder device state is changed. -/// @since_tizen 3.0 -/// @param[in] type The recorder type -/// @param[in] state The state of the recorder device -/// @param[in] user_data The user data passed from the callback registration function -/// @see recorder_add_device_state_changed_cb() -typedef recorder_device_state_changed_cb - = ffi.Pointer>; -typedef recorder_device_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 type, ffi.Int32 state, ffi.Pointer user_data); -typedef Dartrecorder_device_state_changed_cbFunction = void Function( - int type, int state, ffi.Pointer user_data); - -/// @brief Enumeration for screen mirroring error. -/// @since_tizen 2.4 -abstract class scmirroring_error_e { - /// < Successful - static const int SCMIRRORING_ERROR_NONE = 0; - - /// < Invalid parameter - static const int SCMIRRORING_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int SCMIRRORING_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid Operation - static const int SCMIRRORING_ERROR_INVALID_OPERATION = -38; - - /// < Connection timeout - static const int SCMIRRORING_ERROR_CONNECTION_TIME_OUT = -110; - - /// < Permission denied - static const int SCMIRRORING_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int SCMIRRORING_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Unknown error - static const int SCMIRRORING_ERROR_UNKNOWN = -1073741824; -} - -/// @brief Enumeration for screen mirroring sink state. -/// @since_tizen 2.4 -abstract class scmirroring_sink_state_e { - /// < Screen mirroring is not created yet - static const int SCMIRRORING_SINK_STATE_NONE = 0; - - /// < Screen mirroring is created, but not prepared yet - static const int SCMIRRORING_SINK_STATE_NULL = 1; - - /// < Screen mirroring is prepared to play media - static const int SCMIRRORING_SINK_STATE_PREPARED = 2; - - /// < Screen mirroring is connected - static const int SCMIRRORING_SINK_STATE_CONNECTED = 3; - - /// < Screen mirroring is now playing media - static const int SCMIRRORING_SINK_STATE_PLAYING = 4; - - /// < Screen mirroring is paused while playing media - static const int SCMIRRORING_SINK_STATE_PAUSED = 5; - - /// < Screen mirroring is disconnected - static const int SCMIRRORING_SINK_STATE_DISCONNECTED = 6; - static const int SCMIRRORING_SINK_STATE_MAX = 7; -} - -/// @brief Enumeration for screen mirroring resolution. -/// @since_tizen 2.4 -abstract class scmirroring_resolution_e { - static const int SCMIRRORING_RESOLUTION_UNKNOWN = 0; - - /// < W-1920, H-1080, 30 fps - static const int SCMIRRORING_RESOLUTION_1920x1080_P30 = 1; - - /// < W-1280, H-720, 30 fps - static const int SCMIRRORING_RESOLUTION_1280x720_P30 = 2; - - /// < W-960, H-540, 30 fps - static const int SCMIRRORING_RESOLUTION_960x540_P30 = 4; - - /// < W-864, H-480, 30 fps - static const int SCMIRRORING_RESOLUTION_864x480_P30 = 8; - - /// < W-720, H-480, 30 fps - static const int SCMIRRORING_RESOLUTION_720x480_P60 = 16; - - /// < W-640, H-480, 60 fps - static const int SCMIRRORING_RESOLUTION_640x480_P60 = 32; - - /// < W-640, H-360, 30 fps - static const int SCMIRRORING_RESOLUTION_640x360_P30 = 64; - static const int SCMIRRORING_RESOLUTION_MAX = 128; -} - -/// @brief Ability to send to multisink. -/// @since_tizen 3.0 -abstract class scmirroring_multisink_e { - static const int SCMIRRORING_MULTISINK_DISABLE = 0; - static const int SCMIRRORING_MULTISINK_ENABLE = 1; -} - -/// @brief Enumeration for screen mirroring display surface type. -/// @since_tizen 2.4 -abstract class scmirroring_display_type_e { - /// < Use overlay surface to display streaming multimedia data - static const int SCMIRRORING_DISPLAY_TYPE_OVERLAY = 0; - - /// < Use Evas pixmap surface to display streaming multimedia data - static const int SCMIRRORING_DISPLAY_TYPE_EVAS = 1; - static const int SCMIRRORING_DISPLAY_TYPE_MAX = 2; -} - -/// @brief Enumeration for screen mirroring audio codec. -/// @since_tizen 2.4 -abstract class scmirroring_audio_codec_e { - /// < Screen mirroring is not negotiated yet - static const int SCMIRRORING_AUDIO_CODEC_NONE = 0; - - /// < AAC codec for audio - static const int SCMIRRORING_AUDIO_CODEC_AAC = 1; - - /// < AA3 codec for audio - static const int SCMIRRORING_AUDIO_CODEC_AC3 = 2; - - /// < LPCM codec for audio - static const int SCMIRRORING_AUDIO_CODEC_LPCM = 3; -} - -/// @brief Enumeration for screen mirroring video codec. -/// @since_tizen 2.4 -abstract class scmirroring_video_codec_e { - /// < Screen mirroring is not negotiated yet - static const int SCMIRRORING_VIDEO_CODEC_NONE = 0; - - /// < H.264 codec for video - static const int SCMIRRORING_VIDEO_CODEC_H264 = 1; -} - -/// @brief Enumeration for screen mirroring direct streaming mode. -/// @since_tizen 3.0 -abstract class scmirroring_direct_streaming_e { - /// < Disable screen mirroring direct streaming mode - static const int SCMIRRORING_DIRECT_STREAMING_DISABLED = 0; - - /// < Enable direct streaming for files - static const int SCMIRRORING_DIRECT_STREAMING_ENABLED = 1; -} - -/// @brief Enumeration for screen mirroring AV streaming transport. -/// @since_tizen 3.0 -abstract class scmirroring_av_transport_e { - /// < UDP transport for AV streaming data - static const int SCMIRRORING_AV_TRANSPORT_UDP = 0; - - /// < TCP transport for AV streaming data - static const int SCMIRRORING_AV_TRANSPORT_TCP = 1; -} - -/// @brief The handle to the screen mirroring sink. -/// @since_tizen 2.4 -typedef scmirroring_sink_h = ffi.Pointer; - -/// @brief Called when each status is changed. -/// @since_tizen 2.4 -/// -/// @details This callback is called for state and error of screen mirroring sink -/// -/// @param[in] error The error code -/// @param[in] state The screen mirroring sink state -/// @param[in] user_data The user data passed from the scmirroring_sink_set_state_cb() function -/// -/// @pre scmirroring_sink_create() -/// -/// @see scmirroring_sink_create() -typedef scmirroring_sink_state_cb - = ffi.Pointer>; -typedef scmirroring_sink_state_cbFunction = ffi.Void Function( - ffi.Int32 error, ffi.Int32 state, ffi.Pointer user_data); -typedef Dartscmirroring_sink_state_cbFunction = void Function( - int error, int state, ffi.Pointer user_data); - -/// @brief Enumeration for Tizen Sound Pool error. -/// -/// @since_tizen 4.0 -abstract class sound_pool_error_e { - static const int SOUND_POOL_ERROR_NONE = 0; - static const int SOUND_POOL_ERROR_KEY_NOT_AVAILABLE = -126; - static const int SOUND_POOL_ERROR_OUT_OF_MEMORY = -12; - static const int SOUND_POOL_ERROR_INVALID_PARAMETER = -22; - static const int SOUND_POOL_ERROR_INVALID_OPERATION = -38; - static const int SOUND_POOL_ERROR_NOT_PERMITTED = -1; - static const int SOUND_POOL_ERROR_NO_SUCH_FILE = -2; -} - -/// @brief Enumeration of sound pool stream state. -/// -/// @since_tizen 4.0 -abstract class sound_pool_stream_state_e { - /// < Stream state isn't determined - static const int SOUND_POOL_STREAM_STATE_NONE = 0; - - /// < Stream state is playing - static const int SOUND_POOL_STREAM_STATE_PLAYING = 1; - - /// < Stream state is paused - static const int SOUND_POOL_STREAM_STATE_PAUSED = 2; - - /// < Stream state is stopped - static const int SOUND_POOL_STREAM_STATE_STOPPED = 3; - - /// < Stream state is finished - static const int SOUND_POOL_STREAM_STATE_FINISHED = 4; - - /// < Stream state is suspended - static const int SOUND_POOL_STREAM_STATE_SUSPENDED = 5; -} - -/// @brief Enumeration of sound pool stream priority policy. -/// -/// @since_tizen 4.0 -abstract class sound_pool_stream_priority_policy_e { - /// < Stream priority policy is mute - static const int SOUND_POOL_STREAM_PRIORITY_POLICY_MUTE = 0; - - /// < Stream priority policy is suspended - static const int SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED = 1; -} - -/// @brief Enumeration of sound pool state. -/// -/// @since_tizen 4.0 -abstract class sound_pool_state_e { - /// < Sound pool active state: streams can be played - static const int SOUND_POOL_STATE_ACTIVE = 0; - - /// < Sound pool inactive state: streams can't be played - static const int SOUND_POOL_STATE_INACTIVE = 1; -} - -/// @brief Sound pool handle type. -/// -/// @since_tizen 4.0 -typedef sound_pool_h = ffi.Pointer; - -/// @brief Called when the sound pool state is changed. -/// -/// @since_tizen 4.0 -/// @remarks @a pool is the object for which the callback was set. -/// @param[in] pool The sound pool handle -/// @param[in] prev_state Previous pool state -/// @param[in] cur_state Current pool state -/// @param[in] user_data The user data passed from the code where -/// sound_pool_set_state_changed_cb() was -/// called. -/// -/// @pre Create sound pool handle by calling sound_pool_create() -/// @pre Call sound_pool_set_state_changed_cb() -/// -/// @see sound_pool_create() -/// @see sound_pool_set_state_changed_cb() -/// @see sound_pool_state_e -typedef sound_pool_state_changed_cb - = ffi.Pointer>; -typedef sound_pool_state_changed_cbFunction = ffi.Void Function( - sound_pool_h pool, - ffi.Int32 prev_state, - ffi.Int32 cur_state, - ffi.Pointer user_data); -typedef Dartsound_pool_state_changed_cbFunction = void Function( - sound_pool_h pool, - int prev_state, - int cur_state, - ffi.Pointer user_data); - -/// @brief Called when the sound pool stream state is changed. -/// -/// @since_tizen 4.0 -/// @remarks @a pool is the object for which the callback was set. -/// @param[in] pool The sound pool handle -/// @param[in] id Unique stream identifier -/// @param[in] prev_state Previous stream state -/// @param[in] cur_state Current stream state -/// @param[in] user_data The user data passed to the callback -/// -/// @pre Create sound pool handle by calling sound_pool_create() -/// @pre Load source to pool by calling sound_pool_load_source_from_file() -/// @pre Start source playback by calling sound_pool_stream_play() -/// -/// @see sound_pool_create() -/// @see sound_pool_load_source_from_file() -/// @see sound_pool_stream_play() -/// @see sound_pool_stream_state_e -typedef sound_pool_stream_state_changed_cb = ffi - .Pointer>; -typedef sound_pool_stream_state_changed_cbFunction = ffi.Void Function( - sound_pool_h pool, - ffi.UnsignedInt id, - ffi.Int32 prev_state, - ffi.Int32 cur_state, - ffi.Pointer user_data); -typedef Dartsound_pool_stream_state_changed_cbFunction = void Function( - sound_pool_h pool, - int id, - int prev_state, - int cur_state, - ffi.Pointer user_data); - -final class streamrecorder_s extends ffi.Opaque {} - -/// @brief Enumeration for the source type. -/// @since_tizen 3.0 -abstract class streamrecorder_source_e { - /// < Video only - static const int STREAMRECORDER_SOURCE_VIDEO = 0; - - /// < Audio only - static const int STREAMRECORDER_SOURCE_AUDIO = 1; - - /// < Video and Audio - static const int STREAMRECORDER_SOURCE_VIDEO_AUDIO = 2; -} - -/// @brief Enumeration for the pixel format. -/// @since_tizen 3.0 -abstract class streamrecorder_video_source_format_e { - /// < Invalid pixel format - static const int STREAMRECORDER_VIDEO_SOURCE_FORMAT_INVALID = -1; - - /// < NV12 pixel format - static const int STREAMRECORDER_VIDEO_SOURCE_FORMAT_NV12 = 0; - - /// < NV12 pixel format - static const int STREAMRECORDER_VIDEO_SOURCE_FORMAT_NV21 = 1; - - /// < I420 pixel format - static const int STREAMRECORDER_VIDEO_SOURCE_FORMAT_I420 = 2; - - /// < Number of the video source format - static const int STREAMRECORDER_VIDEO_SOURCE_FORMAT_NUM = 3; -} - -/// @brief Enumeration for the file container format. -/// @since_tizen 3.0 -abstract class streamrecorder_file_format_e { - /// < 3GP file format - static const int STREAMRECORDER_FILE_FORMAT_3GP = 0; - - /// < MP4 file format - static const int STREAMRECORDER_FILE_FORMAT_MP4 = 1; - - /// < AMR file format - static const int STREAMRECORDER_FILE_FORMAT_AMR = 2; - - /// < ADTS file format - static const int STREAMRECORDER_FILE_FORMAT_ADTS = 3; - - /// < WAV file format - static const int STREAMRECORDER_FILE_FORMAT_WAV = 4; -} - -/// @brief Enumeration for the audio codec. -/// @since_tizen 3.0 -abstract class streamrecorder_audio_codec_e { - /// < AMR codec - static const int STREAMRECORDER_AUDIO_CODEC_AMR = 0; - - /// < AAC codec - static const int STREAMRECORDER_AUDIO_CODEC_AAC = 1; - - /// < PCM codec - static const int STREAMRECORDER_AUDIO_CODEC_PCM = 2; -} - -/// @brief Enumeration for the video codec. -/// @since_tizen 3.0 -abstract class streamrecorder_video_codec_e { - /// < H263 codec - static const int STREAMRECORDER_VIDEO_CODEC_H263 = 0; - - /// < MPEG4 codec - static const int STREAMRECORDER_VIDEO_CODEC_MPEG4 = 1; -} - -/// @brief Enumeration for the recording limit reached. -/// @since_tizen 3.0 -abstract class streamrecorder_recording_limit_type_e { - /// < Time limit (second) of recording file - static const int STREAMRECORDER_RECORDING_LIMIT_TYPE_TIME = 0; - - /// < Size limit (kilo bytes [KB]) of recording file - static const int STREAMRECORDER_RECORDING_LIMIT_TYPE_SIZE = 1; -} - -/// @brief Enumeration for Streamrecorder error type. -/// @since_tizen 3.0 -abstract class streamrecorder_error_e { - /// < Successful - static const int STREAMRECORDER_ERROR_NONE = 0; - - /// < Invalid parameter - static const int STREAMRECORDER_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid state - static const int STREAMRECORDER_ERROR_INVALID_STATE = -27328511; - - /// < Out of memory - static const int STREAMRECORDER_ERROR_OUT_OF_MEMORY = -12; - - /// < Internal error - static const int STREAMRECORDER_ERROR_INVALID_OPERATION = -38; - - /// < Out of storage - static const int STREAMRECORDER_ERROR_OUT_OF_STORAGE = -27328510; - - /// < The access to the resources can not be granted - static const int STREAMRECORDER_ERROR_PERMISSION_DENIED = -13; - - /// < The feature is not supported - static const int STREAMRECORDER_ERROR_NOT_SUPPORTED = -1073741822; -} - -/// @brief Enumeration for the Streamrecorder notification. -/// @since_tizen 3.0 -abstract class streamrecorder_notify_e { - /// < None - static const int STREAMRECORDER_NOTIFY_NONE = 0; - - /// < The notification of normal state changes - static const int STREAMRECORDER_NOTIFY_STATE_CHANGED = 1; -} - -/// @brief Enumeration for Streamrecorder states. -/// @since_tizen 3.0 -abstract class streamrecorder_state_e { - /// < StreamRecorder is not created - static const int STREAMRECORDER_STATE_NONE = 0; - - /// < StreamRecorder is created, but not prepared - static const int STREAMRECORDER_STATE_CREATED = 1; - - /// < StreamRecorder is prepared to record - static const int STREAMRECORDER_STATE_PREPARED = 2; - - /// < StreamRecorder is recording media - static const int STREAMRECORDER_STATE_RECORDING = 3; - - /// < StreamRecorder is paused while recording media - static const int STREAMRECORDER_STATE_PAUSED = 4; -} - -/// @brief The Streamrecorder handle. -/// @since_tizen 3.0 -typedef streamrecorder_h = ffi.Pointer; - -/// @brief Called iteratively to notify about the supported file formats. -/// @since_tizen 3.0 -/// @param[in] format The format of recording files -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre streamrecorder_foreach_supported_file_format() will invoke this callback. -/// @see streamrecorder_foreach_supported_file_format() -typedef streamrecorder_supported_file_format_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef streamrecorder_supported_file_format_cbFunction = ffi.Bool Function( - ffi.Int32 format, ffi.Pointer user_data); -typedef Dartstreamrecorder_supported_file_format_cbFunction = bool Function( - int format, ffi.Pointer user_data); - -/// @brief Called iteratively to notify about the supported audio encoders. -/// @since_tizen 3.0 -/// @param[in] codec The codec of audio encoder -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre streamrecorder_foreach_supported_audio_encoder() will invoke this callback. -/// @see streamrecorder_foreach_supported_audio_encoder() -typedef streamrecorder_supported_audio_encoder_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef streamrecorder_supported_audio_encoder_cbFunction = ffi.Bool Function( - ffi.Int32 codec, ffi.Pointer user_data); -typedef Dartstreamrecorder_supported_audio_encoder_cbFunction = bool Function( - int codec, ffi.Pointer user_data); - -/// @brief Called iteratively to notify about the supported video encoders. -/// @since_tizen 3.0 -/// @param[in] codec The codec of video encoder -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre streamrecorder_foreach_supported_video_encoder() will invoke this callback. -/// @see streamrecorder_foreach_supported_video_encoder() -typedef streamrecorder_supported_video_encoder_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef streamrecorder_supported_video_encoder_cbFunction = ffi.Bool Function( - ffi.Int32 codec, ffi.Pointer user_data); -typedef Dartstreamrecorder_supported_video_encoder_cbFunction = bool Function( - int codec, ffi.Pointer user_data); - -/// @brief Called once for each supported video resolution. -/// @since_tizen 3.0 -/// @param[in] width The video image width -/// @param[in] height The video image height -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop -/// @pre streamrecorder_foreach_supported_video_resolution() will invoke this callback. -/// @see streamrecorder_foreach_supported_video_resolution() -typedef streamrecorder_supported_video_resolution_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef streamrecorder_supported_video_resolution_cbFunction = ffi.Bool - Function(ffi.Int width, ffi.Int height, ffi.Pointer user_data); -typedef Dartstreamrecorder_supported_video_resolution_cbFunction = bool - Function(int width, int height, ffi.Pointer user_data); - -/// @brief Called when the streamrecorder gets some notifications. -/// @since_tizen 3.0 -/// @param[in] previous The previous state of the streamrecorder -/// @param[in] current The current state of the streamrecorder -/// @param[in] notification The notification type of the streamrecorder -/// @param[in] user_data The user data passed from the callback registration function -/// @pre This function is required to register a callback using streamrecorder_set_notify_cb(). -/// @see streamrecorder_set_notify_cb() -/// @see streamrecorder_prepare() -/// @see streamrecorder_unprepare() -/// @see streamrecorder_start() -/// @see streamrecorder_pause() -/// @see streamrecorder_commit() -/// @see streamrecorder_cancel() -typedef streamrecorder_notify_cb - = ffi.Pointer>; -typedef streamrecorder_notify_cbFunction = ffi.Void Function(ffi.Int32 previous, - ffi.Int32 current, ffi.Int32 notification, ffi.Pointer user_data); -typedef Dartstreamrecorder_notify_cbFunction = void Function(int previous, - int current, int notification, ffi.Pointer user_data); - -/// @brief Called to indicate the recording status. -/// @since_tizen 3.0 -/// @remarks This callback function is repeatedly invoked during the #STREAMRECORDER_STATE_RECORDING state. -/// @param[in] elapsed_time The time of the recording (milliseconds) -/// @param[in] file_size The size of the recording file (KB) -/// @param[in] user_data The user data passed from the callback registration function -/// @pre streamrecorder_start() will invoke this callback if you register it using streamrecorder_set_recording_status_cb(). -/// @see streamrecorder_set_recording_status_cb() -/// @see streamrecorder_unset_recording_status_cb() -/// @see streamrecorder_start() -typedef streamrecorder_recording_status_cb = ffi - .Pointer>; -typedef streamrecorder_recording_status_cbFunction = ffi.Void Function( - ffi.UnsignedLongLong elapsed_time, - ffi.UnsignedLongLong file_size, - ffi.Pointer user_data); -typedef Dartstreamrecorder_recording_status_cbFunction = void Function( - int elapsed_time, int file_size, ffi.Pointer user_data); - -/// @brief Called when limitation error occurs while recording. -/// @details The callback function is possible to receive three types of limits: time and size. -/// @since_tizen 3.0 -/// @remarks After being called, recording data except present recorded data will be discarded and not written in the recording file. Also the state of streamrecorder is not changed. -/// @param[in] type The imitation type -/// @param[in] user_data The user data passed from the callback registration function -/// @pre You have to register a callback using streamrecorder_set_recording_limit_reached_cb(). -/// @see streamrecorder_set_recording_status_cb() -/// @see streamrecorder_set_recording_limit_reached_cb() -/// @see streamrecorder_unset_recording_limit_reached_cb() -typedef streamrecorder_recording_limit_reached_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef streamrecorder_recording_limit_reached_cbFunction = ffi.Void Function( - ffi.Int32 type, ffi.Pointer user_data); -typedef Dartstreamrecorder_recording_limit_reached_cbFunction = void Function( - int type, ffi.Pointer user_data); - -/// @brief Called when the error occurred. -/// @since_tizen 3.0 -/// @remarks This callback informs about the critical error situation. \n -/// When being invoked, user should release the resource and terminate the application. \n -/// This error code will be reported. \n -/// #STREAMRECORDER_ERROR_INVALID_OPERATION \n -/// #STREAMRECORDER_ERROR_OUT_OF_MEMORY -/// @param[in] error The error code -/// @param[in] current_state The current state of the streamrecorder -/// @param[in] user_data The user data passed from the callback registration function -/// @pre This callback function is invoked if you register this callback using streamrecorder_set_error_cb(). -/// @see streamrecorder_set_error_cb() -/// @see streamrecorder_unset_error_cb() -typedef streamrecorder_error_cb - = ffi.Pointer>; -typedef streamrecorder_error_cbFunction = ffi.Void Function( - ffi.Int32 error, ffi.Int32 current_state, ffi.Pointer user_data); -typedef Dartstreamrecorder_error_cbFunction = void Function( - int error, int current_state, ffi.Pointer user_data); - -/// @brief Called iteratively to notify about the buffer has been consumed -/// @since_tizen 3.0 -/// @remarks The user needs to release consumed buffer if buffer is allocated by user including media packet -/// @param[in] buffer The consumed buffer that user pushed -/// @param[in] user_data The user data passed -/// @see streamrecorder_set_buffer_consume_completed_cb() will invoke this callback. -/// @see streamrecorder_unset_buffer_consume_completed_cb() -typedef streamrecorder_consume_completed_cb = ffi - .Pointer>; -typedef streamrecorder_consume_completed_cbFunction = ffi.Void Function( - ffi.Pointer buffer, ffi.Pointer user_data); -typedef Dartstreamrecorder_consume_completed_cbFunction = void Function( - ffi.Pointer buffer, ffi.Pointer user_data); - -/// @ingroup CAPI_MEDIA_THUMBNAIL_UTIL_MODULE -/// @brief Enumeration for a thumbnail util error. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class thumbnail_util_error_e { - /// < Successful - static const int THUMBNAIL_UTIL_ERROR_NONE = 0; - - /// < Invalid parameter - static const int THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int THUMBNAIL_UTIL_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid Operation - static const int THUMBNAIL_UTIL_ERROR_INVALID_OPERATION = -38; - - /// < No space left on device - static const int THUMBNAIL_UTIL_ERROR_FILE_NO_SPACE_ON_DEVICE = -28; - - /// < Permission denied - static const int THUMBNAIL_UTIL_ERROR_PERMISSION_DENIED = -13; - - /// < Unsupported Content (Since 4.0) - static const int THUMBNAIL_UTIL_ERROR_UNSUPPORTED_CONTENT = -49872895; -} - -final class thumbnail_s extends ffi.Opaque {} - -/// @ingroup CAPI_MEDIA_THUMBNAIL_UTIL_MODULE -/// @deprecated Deprecated since 5.0. -/// @brief The structure type for the thumbnail info handle. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -typedef thumbnail_h = ffi.Pointer; - -/// @ingroup CAPI_MEDIA_THUMBNAIL_UTIL_MODULE -/// @deprecated Deprecated since 5.0. -/// @brief Called when creating the thumbnail. -/// @details This callback is called for completion of generating the thumbnail. -/// The following error codes can be received: \n -/// #THUMBNAIL_UTIL_ERROR_NONE : Successful -/// #THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER : Invalid parameter -/// #THUMBNAIL_UTIL_ERROR_PERMISSION_DENIED : Permission denied -/// -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// -/// @remarks Color space of the generated thumbnail is BGRA. \n -/// The callback is called in a separate thread(not in the main loop). \n -/// The @a thumb_data should be released using free(). -/// -/// @param[in] error The error code -/// @param[in] request_id The generated request id by thumbnail extraction request -/// @param[in] thumb_width The width of the thumbnail which is generated -/// @param[in] thumb_height The height of the thumbnail which is generated -/// @param[in] thumb_data The raw data of the thumbnail which is generated -/// @param[in] thumb_size The size of the thumbnail which is generated -/// @param[in] user_data The user data passed from the thumbnail_util_extract() function -/// -/// @pre thumbnail_util_extract() calls this callback. -/// @see thumbnail_util_extract() -typedef thumbnail_extracted_cb - = ffi.Pointer>; -typedef thumbnail_extracted_cbFunction = ffi.Void Function( - ffi.Int32 error, - ffi.Pointer request_id, - ffi.Int thumb_width, - ffi.Int thumb_height, - ffi.Pointer thumb_data, - ffi.Int thumb_size, - ffi.Pointer user_data); -typedef Dartthumbnail_extracted_cbFunction = void Function( - int error, - ffi.Pointer request_id, - int thumb_width, - int thumb_height, - ffi.Pointer thumb_data, - int thumb_size, - ffi.Pointer user_data); - -/// @brief Enumeration of error codes for tone player. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class tone_player_error_e { - /// < Successful - static const int TONE_PLAYER_ERROR_NONE = 0; - - /// < Invalid parameter - static const int TONE_PLAYER_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid operation - static const int TONE_PLAYER_ERROR_INVALID_OPERATION = -38; - - /// < Not supported (Since 3.0) - static const int TONE_PLAYER_ERROR_NOT_SUPPORTED_TYPE = -26673151; -} - -/// @brief Enumeration of tone. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class tone_type_e { - /// < The default tone - static const int TONE_TYPE_DEFAULT = 0; - - /// < Predefined DTMF 0 - static const int TONE_TYPE_DTMF_0 = 0; - - /// < Predefined DTMF 1 - static const int TONE_TYPE_DTMF_1 = 1; - - /// < Predefined DTMF 2 - static const int TONE_TYPE_DTMF_2 = 2; - - /// < Predefined DTMF 3 - static const int TONE_TYPE_DTMF_3 = 3; - - /// < Predefined DTMF 4 - static const int TONE_TYPE_DTMF_4 = 4; - - /// < Predefined DTMF 5 - static const int TONE_TYPE_DTMF_5 = 5; - - /// < Predefined DTMF 6 - static const int TONE_TYPE_DTMF_6 = 6; - - /// < Predefined DTMF 7 - static const int TONE_TYPE_DTMF_7 = 7; - - /// < Predefined DTMF 8 - static const int TONE_TYPE_DTMF_8 = 8; - - /// < Predefined DTMF 9 - static const int TONE_TYPE_DTMF_9 = 9; - - /// < Predefined DTMF Star - Asterisk (*) - static const int TONE_TYPE_DTMF_S = 10; - - /// < Predefined DTMF sharP (#) - static const int TONE_TYPE_DTMF_P = 11; - - /// < Predefined DTMF A (A) - static const int TONE_TYPE_DTMF_A = 12; - - /// < Predefined DTMF B (B) - static const int TONE_TYPE_DTMF_B = 13; - - /// < Predefined DTMF C (C) - static const int TONE_TYPE_DTMF_C = 14; - - /// < Predefined DTMF D (D) - static const int TONE_TYPE_DTMF_D = 15; - - /// < Call supervisory tone, Dial tone: CEPT: 425Hz, continuous - static const int TONE_TYPE_SUP_DIAL = 16; - - /// < Call supervisory tone, Dial tone: ANSI (IS-95): 350Hz+440Hz, continuous - static const int TONE_TYPE_ANSI_DIAL = 17; - - /// < Call supervisory tone, Dial tone: JAPAN: 400Hz, continuous - static const int TONE_TYPE_JAPAN_DIAL = 18; - - /// < Call supervisory tone, Busy: CEPT: 425Hz, 500ms ON, 500ms OFF... - static const int TONE_TYPE_SUP_BUSY = 19; - - /// < Call supervisory tone, Busy: ANSI (IS-95): 480Hz+620Hz, 500ms ON, 500ms OFF... - static const int TONE_TYPE_ANSI_BUSY = 20; - - /// < Call supervisory tone, Busy: JAPAN: 400Hz, 500ms ON, 500ms OFF... - static const int TONE_TYPE_JAPAN_BUSY = 21; - - /// < Call supervisory tone, Congestion: CEPT, JAPAN: 425Hz, 200ms ON, 200ms OFF - static const int TONE_TYPE_SUP_CONGESTION = 22; - - /// < Call supervisory tone, Congestion: ANSI (IS-95): 480Hz+620Hz, 250ms ON, 250ms OFF... - static const int TONE_TYPE_ANSI_CONGESTION = 23; - - /// < Call supervisory tone, Radio path acknowledgment : CEPT, ANSI: 425Hz, 200ms ON - static const int TONE_TYPE_SUP_RADIO_ACK = 24; - - /// < Call supervisory tone, Radio path acknowledgment : JAPAN: 400Hz, 1s ON, 2s OFF... - static const int TONE_TYPE_JAPAN_RADIO_ACK = 25; - - /// < Call supervisory tone, Radio path not available: 425Hz, 200ms ON, 200 OFF 3 bursts - static const int TONE_TYPE_SUP_RADIO_NOTAVAIL = 26; - - /// < Call supervisory tone, Error/Special info: 950Hz+1400Hz+1800Hz, 330ms ON, 1s OFF... - static const int TONE_TYPE_SUP_ERROR = 27; - - /// < Call supervisory tone, Call Waiting: CEPT, JAPAN: 425Hz, 200ms ON, 600ms OFF, 200ms ON, 3s OFF... - static const int TONE_TYPE_SUP_CALL_WAITING = 28; - - /// < Call supervisory tone, Call Waiting: ANSI (IS-95): 440 Hz, 300 ms ON, 9.7 s OFF, (100 ms ON, 100 ms OFF, 100 ms ON, 9.7s OFF ...) - static const int TONE_TYPE_ANSI_CALL_WAITING = 29; - - /// < Call supervisory tone, Ring Tone: CEPT, JAPAN: 425Hz, 1s ON, 4s OFF... - static const int TONE_TYPE_SUP_RINGTONE = 30; - - /// < Call supervisory tone, Ring Tone: ANSI (IS-95): 440Hz + 480Hz, 2s ON, 4s OFF... - static const int TONE_TYPE_ANSI_RINGTONE = 31; - - /// < General beep: 400Hz+1200Hz, 35ms ON - static const int TONE_TYPE_PROP_BEEP = 32; - - /// < Proprietary tone, positive acknowledgment: 1200Hz, 100ms ON, 100ms OFF 2 bursts - static const int TONE_TYPE_PROP_ACK = 33; - - /// < Proprietary tone, negative acknowledgment: 300Hz+400Hz+500Hz, 400ms ON - static const int TONE_TYPE_PROP_NACK = 34; - - /// < Proprietary tone, prompt tone: 400Hz+1200Hz, 200ms ON - static const int TONE_TYPE_PROP_PROMPT = 35; - - /// < Proprietary tone, general double beep: twice 400Hz+1200Hz, 35ms ON, 200ms OFF, 35ms ON - static const int TONE_TYPE_PROP_BEEP2 = 36; - - /// < Call supervisory tone (IS-95), intercept tone: alternating 440 Hz and 620 Hz tones, each on for 250 ms - static const int TONE_TYPE_SUP_INTERCEPT = 37; - - /// < Call supervisory tone (IS-95), abbreviated intercept: intercept tone limited to 4 seconds - static const int TONE_TYPE_SUP_INTERCEPT_ABBREV = 38; - - /// < Call supervisory tone (IS-95), abbreviated congestion: congestion tone limited to 4 seconds - static const int TONE_TYPE_SUP_CONGESTION_ABBREV = 39; - - /// < Call supervisory tone (IS-95), confirm tone: a 350 Hz tone added to a 440 Hz tone repeated 3 times in a 100 ms on, 100 ms off cycle - static const int TONE_TYPE_SUP_CONFIRM = 40; - - /// < Call supervisory tone (IS-95), pip tone: four bursts of 480 Hz tone (0.1 s on, 0.1 s off). - static const int TONE_TYPE_SUP_PIP = 41; - - /// < 425Hz continuous - static const int TONE_TYPE_CDMA_DIAL_TONE_LITE = 42; - - /// < CDMA USA Ringback: 440Hz+480Hz 2s ON, 4000 OFF ... - static const int TONE_TYPE_CDMA_NETWORK_USA_RINGBACK = 43; - - /// < CDMA Intercept tone: 440Hz 250ms ON, 620Hz 250ms ON ... - static const int TONE_TYPE_CDMA_INTERCEPT = 44; - - /// < CDMA Abbr Intercept tone: 440Hz 250ms ON, 620Hz 250ms ON - static const int TONE_TYPE_CDMA_ABBR_INTERCEPT = 45; - - /// < CDMA Reorder tone: 480Hz+620Hz 250ms ON, 250ms OFF... - static const int TONE_TYPE_CDMA_REORDER = 46; - - /// < CDMA Abbr Reorder tone: 480Hz+620Hz 250ms ON, 250ms OFF repeated for 8 times - static const int TONE_TYPE_CDMA_ABBR_REORDER = 47; - - /// < CDMA Network Busy tone: 480Hz+620Hz 500ms ON, 500ms OFF continuous - static const int TONE_TYPE_CDMA_NETWORK_BUSY = 48; - - /// < CDMA Confirm tone: 350Hz+440Hz 100ms ON, 100ms OFF repeated for 3 times - static const int TONE_TYPE_CDMA_CONFIRM = 49; - - /// < CDMA answer tone: silent tone - definition Frequency 0, 0ms ON, 0ms OFF - static const int TONE_TYPE_CDMA_ANSWER = 50; - - /// < CDMA Network Callwaiting tone: 440Hz 300ms ON - static const int TONE_TYPE_CDMA_NETWORK_CALLWAITING = 51; - - /// < CDMA PIP tone: 480Hz 100ms ON, 100ms OFF repeated for 4 times - static const int TONE_TYPE_CDMA_PIP = 52; - - /// < ISDN Call Signal Normal tone: {2091Hz 32ms ON, 2556 64ms ON} 20 times, 2091 32ms ON, 2556 48ms ON, 4s OFF - static const int TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_NORMAL = 53; - - /// < ISDN Call Signal Intergroup tone: {2091Hz 32ms ON, 2556 64ms ON} 8 times, 2091Hz 32ms ON, 400ms OFF, {2091Hz 32ms ON, 2556Hz 64ms ON} 8times, 2091Hz 32ms ON, 4s OFF. - static const int TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_INTERGROUP = 54; - - /// < ISDN Call Signal SP PRI tone:{2091Hz 32ms ON, 2556 64ms ON} 4 times 2091Hz 16ms ON, 200ms OFF, {2091Hz 32ms ON, 2556Hz 64ms ON} 4 times, 2091Hz 16ms ON, 200ms OFF - static const int TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_SP_PRI = 55; - - /// < SDN Call sign PAT3 tone: silent tone - static const int TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_PAT3 = 56; - - /// < ISDN Ping Ring tone: {2091Hz 32ms ON, 2556Hz 64ms ON} 5 times 2091Hz 20ms ON - static const int TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_PING_RING = 57; - - /// < ISDN Pat5 tone: silent tone - static const int TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_PAT5 = 58; - - /// < ISDN Pat6 tone: silent tone - static const int TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_PAT6 = 59; - - /// < ISDN Pat7 tone: silent tone - static const int TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_PAT7 = 60; - - /// < TONE_CDMA_HIGH_L tone: {3700Hz 25ms, 4000Hz 25ms} 40 times 4000ms OFF, Repeat .... - static const int TONE_TYPE_CDMA_HIGH_L = 61; - - /// < TONE_CDMA_MED_L tone: {2600Hz 25ms, 2900Hz 25ms} 40 times 4000ms OFF, Repeat .... - static const int TONE_TYPE_CDMA_MED_L = 62; - - /// < TONE_CDMA_LOW_L tone: {1300Hz 25ms, 1450Hz 25ms} 40 times, 4000ms OFF, Repeat .... - static const int TONE_TYPE_CDMA_LOW_L = 63; - - /// < CDMA HIGH SS tone: {3700Hz 25ms, 4000Hz 25ms} repeat 16 times, 400ms OFF, repeat .... - static const int TONE_TYPE_CDMA_HIGH_SS = 64; - - /// < CDMA MED SS tone: {2600Hz 25ms, 2900Hz 25ms} repeat 16 times, 400ms OFF, repeat .... - static const int TONE_TYPE_CDMA_MED_SS = 65; - - /// < CDMA LOW SS tone: {1300z 25ms, 1450Hz 25ms} repeat 16 times, 400ms OFF, repeat .... - static const int TONE_TYPE_CDMA_LOW_SS = 66; - - /// < CDMA HIGH SSL tone: {3700Hz 25ms, 4000Hz 25ms} 8 times, 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} repeat 8 times, 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} repeat 16 times, 4000ms OFF, repeat ... - static const int TONE_TYPE_CDMA_HIGH_SSL = 67; - - /// < CDMA MED SSL tone: {2600Hz 25ms, 2900Hz 25ms} 8 times, 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} repeat 8 times, 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} repeat 16 times, 4000ms OFF, repeat ... - static const int TONE_TYPE_CDMA_MED_SSL = 68; - - /// < CDMA LOW SSL tone: {1300Hz 25ms, 1450Hz 25ms} 8 times, 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} repeat 8 times, 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} repeat 16 times, 4000ms OFF, repeat ... - static const int TONE_TYPE_CDMA_LOW_SSL = 69; - - /// < CDMA HIGH SS2 tone: {3700Hz 25ms, 4000Hz 25ms} 20 times, 1000ms OFF, {3700Hz 25ms, 4000Hz 25ms} 20 times, 3000ms OFF, repeat .... - static const int TONE_TYPE_CDMA_HIGH_SS_2 = 70; - - /// < CDMA MED SS2 tone: {2600Hz 25ms, 2900Hz 25ms} 20 times, 1000ms OFF, {2600Hz 25ms, 2900Hz 25ms} 20 times, 3000ms OFF, repeat .... - static const int TONE_TYPE_CDMA_MED_SS_2 = 71; - - /// < CDMA LOW SS2 tone: {1300Hz 25ms, 1450Hz 25ms} 20 times, 1000ms OFF, {1300Hz 25ms, 1450Hz 25ms} 20 times, 3000ms OFF, repeat .... - static const int TONE_TYPE_CDMA_LOW_SS_2 = 72; - - /// < CDMA HIGH SLS tone: {3700Hz 25ms, 4000Hz 25ms} 10 times, 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 20 times, 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 10 times, 3000ms OFF, REPEAT - static const int TONE_TYPE_CDMA_HIGH_SLS = 73; - - /// < CDMA MED SLS tone: {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 20 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 3000ms OFF, REPEAT - static const int TONE_TYPE_CDMA_MED_SLS = 74; - - /// < CDMA LOW SLS tone: {1300Hz 25ms, 1450Hz 25ms} 10 times, 500ms OFF, {1300Hz 25ms, 1450Hz 25ms} 20 times, 500ms OFF, {1300Hz 25ms, 1450Hz 25ms} 10 times, 3000ms OFF, REPEAT - static const int TONE_TYPE_CDMA_LOW_SLS = 75; - - /// < CDMA HIGH S X4 tone: {3700Hz 25ms, 4000Hz 25ms} 10 times, 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 10 times, 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 10 times, 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 10 times, 2500ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_HIGH_S_X4 = 76; - - /// < CDMA MED S X4 tone: {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 2500ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_MED_S_X4 = 77; - - /// < CDMA LOW S X4 tone: {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 2500ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_LOW_S_X4 = 78; - - /// < CDMA HIGH PBX L: {3700Hz 25ms, 4000Hz 25ms}20 times, 2000ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_HIGH_PBX_L = 79; - - /// < CDMA MED PBX L: {2600Hz 25ms, 2900Hz 25ms}20 times, 2000ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_MED_PBX_L = 80; - - /// < CDMA LOW PBX L: {1300Hz 25ms,1450Hz 25ms}20 times, 2000ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_LOW_PBX_L = 81; - - /// < CDMA HIGH PBX SS tone: {3700Hz 25ms, 4000Hz 25ms} 8 times 200 ms OFF, {3700Hz 25ms 4000Hz 25ms}8 times, 2000ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_HIGH_PBX_SS = 82; - - /// < CDMA MED PBX SS tone: {2600Hz 25ms, 2900Hz 25ms} 8 times 200 ms OFF, {2600Hz 25ms 2900Hz 25ms}8 times, 2000ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_MED_PBX_SS = 83; - - /// < CDMA LOW PBX SS tone: {1300Hz 25ms, 1450Hz 25ms} 8 times 200 ms OFF, {1300Hz 25ms 1450Hz 25ms}8 times, 2000ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_LOW_PBX_SS = 84; - - /// < CDMA HIGH PBX SSL tone:{3700Hz 25ms, 4000Hz 25ms} 8 times 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} 8 times, 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} 16 times, 1000ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_HIGH_PBX_SSL = 85; - - /// < CDMA MED PBX SSL tone:{2600Hz 25ms, 2900Hz 25ms} 8 times 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} 8 times, 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} 16 times, 1000ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_MED_PBX_SSL = 86; - - /// < CDMA LOW PBX SSL tone:{1300Hz 25ms, 1450Hz 25ms} 8 times 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} 8 times, 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} 16 times, 1000ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_LOW_PBX_SSL = 87; - - /// < CDMA HIGH PBX SLS tone:{3700Hz 25ms, 4000Hz 25ms} 8 times 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} 16 times, 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} 8 times, 1000ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_HIGH_PBX_SLS = 88; - - /// < CDMA MED PBX SLS tone:{2600Hz 25ms, 2900Hz 25ms} 8 times 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} 16 times, 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} 8 times, 1000ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_MED_PBX_SLS = 89; - - /// < CDMA LOW PBX SLS tone:{1300Hz 25ms, 1450Hz 25ms} 8 times 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} 16 times, 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} 8 times, 1000ms OFF, REPEAT.... - static const int TONE_TYPE_CDMA_LOW_PBX_SLS = 90; - - /// < CDMA HIGH PBX X S4 tone: {3700Hz 25ms 4000Hz 25ms} 8 times, 200ms OFF, {3700Hz 25ms 4000Hz 25ms} 8 times, 200ms OFF, {3700Hz 25ms 4000Hz 25ms} 8 times, 200ms OFF, {3700Hz 25ms 4000Hz 25ms} 8 times, 800ms OFF, REPEAT... - static const int TONE_TYPE_CDMA_HIGH_PBX_S_X4 = 91; - - /// < CDMA MED PBX X S4 tone: {2600Hz 25ms 2900Hz 25ms} 8 times, 200ms OFF, {2600Hz 25ms 2900Hz 25ms} 8 times, 200ms OFF, {2600Hz 25ms 2900Hz 25ms} 8 times, 200ms OFF, {2600Hz 25ms 2900Hz 25ms} 8 times, 800ms OFF, REPEAT... - static const int TONE_TYPE_CDMA_MED_PBX_S_X4 = 92; - - /// < CDMA LOW PBX X S4 tone: {1300Hz 25ms 1450Hz 25ms} 8 times, 200ms OFF, {1300Hz 25ms 1450Hz 25ms} 8 times, 200ms OFF, {1300Hz 25ms 1450Hz 25ms} 8 times, 200ms OFF, {1300Hz 25ms 1450Hz 25ms} 8 times, 800ms OFF, REPEAT... - static const int TONE_TYPE_CDMA_LOW_PBX_S_X4 = 93; - - /// < CDMA Alert Network Lite tone: 1109Hz 62ms ON, 784Hz 62ms ON, 740Hz 62ms ON 622Hz 62ms ON, 1109Hz 62ms ON - static const int TONE_TYPE_CDMA_ALERT_NETWORK_LITE = 94; - - /// < CDMA Alert Auto Redial tone: {1245Hz 62ms ON, 659Hz 62ms ON} 3 times, 1245 62ms ON - static const int TONE_TYPE_CDMA_ALERT_AUTOREDIAL_LITE = 95; - - /// < CDMA One Min Beep tone: 1150Hz+770Hz 400ms ON - static const int TONE_TYPE_CDMA_ONE_MIN_BEEP = 96; - - /// < CDMA KEYPAD Volume key lite tone: 941Hz+1477Hz 120ms ON - static const int TONE_TYPE_CDMA_KEYPAD_VOLUME_KEY_LITE = 97; - - /// < CDMA PRESSHOLDKEY LITE tone: 587Hz 375ms ON, 1175Hz 125ms ON - static const int TONE_TYPE_CDMA_PRESSHOLDKEY_LITE = 98; - - /// < CDMA ALERT INCALL LITE tone: 587Hz 62ms, 784 62ms, 831Hz 62ms, 784Hz 62ms, 1109 62ms, 784Hz 62ms, 831Hz 62ms, 784Hz 62ms - static const int TONE_TYPE_CDMA_ALERT_INCALL_LITE = 99; - - /// < CDMA EMERGENCY RINGBACK tone: {941Hz 125ms ON, 10ms OFF} 3times 4990ms OFF, REPEAT... - static const int TONE_TYPE_CDMA_EMERGENCY_RINGBACK = 100; - - /// < CDMA ALERT CALL GUARD tone: {1319Hz 125ms ON, 125ms OFF} 3 times - static const int TONE_TYPE_CDMA_ALERT_CALL_GUARD = 101; - - /// < CDMA SOFT ERROR LITE tone: 1047Hz 125ms ON, 370Hz 125ms - static const int TONE_TYPE_CDMA_SOFT_ERROR_LITE = 102; - - /// < CDMA CALLDROP LITE tone: 1480Hz 125ms, 1397Hz 125ms, 784Hz 125ms - static const int TONE_TYPE_CDMA_CALLDROP_LITE = 103; - - /// < CDMA_NETWORK_BUSY_ONE_SHOT tone: 425Hz 500ms ON, 500ms OFF. - static const int TONE_TYPE_CDMA_NETWORK_BUSY_ONE_SHOT = 104; - - /// < CDMA_ABBR_ALERT tone: 1150Hz+770Hz 400ms ON - static const int TONE_TYPE_CDMA_ABBR_ALERT = 105; - - /// < CDMA_SIGNAL_OFF - silent tone - static const int TONE_TYPE_CDMA_SIGNAL_OFF = 106; - - /// < User Defined Tone: 100Hz continuous - static const int TONE_TYPE_USER_DEFINED_LOW_FRE = 107; - - /// < User Defined Tone: 200Hz continuous - static const int TONE_TYPE_USER_DEFINED_MED_FRE = 108; - - /// < User Defined Tone: 300Hz continuous - static const int TONE_TYPE_USER_DEFINED_HIGH_FRE = 109; -} - -/// @brief Enumeration of error codes for WAV player. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class wav_player_error_e { - /// < Successful - static const int WAV_PLAYER_ERROR_NONE = 0; - - /// < Invalid parameter - static const int WAV_PLAYER_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid operation - static const int WAV_PLAYER_ERROR_INVALID_OPERATION = -38; - - /// < Format not supported - static const int WAV_PLAYER_ERROR_FORMAT_NOT_SUPPORTED = -26804223; - - /// < Not supported (Since 3.0) - static const int WAV_PLAYER_ERROR_NOT_SUPPORTED_TYPE = -26804222; -} - -/// @brief Called when a WAV file has finished playing. -/// @details This callback is not invoked by calling wav_player_stop(). -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] id The completed wav player ID -/// @param[in] user_data The user data passed from the callback registration function -/// @see wav_player_start_new() -typedef wav_player_playback_completed_cb - = ffi.Pointer>; -typedef wav_player_playback_completed_cbFunction = ffi.Void Function( - ffi.Int id, ffi.Pointer user_data); -typedef Dartwav_player_playback_completed_cbFunction = void Function( - int id, ffi.Pointer user_data); - -/// @brief Enumeration for Application Service Platform (ASP) error code. -/// @since_tizen 4.0 -abstract class asp_error_e { - /// < Successful - static const int ASP_ERROR_NONE = 0; - - /// < Operation not permitted(1) - static const int ASP_ERROR_NOT_PERMITTED = -1; - - /// < Out of memory(12) - static const int ASP_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied(13) - static const int ASP_ERROR_PERMISSION_DENIED = -13; - - /// < Device or resource busy(16) - static const int ASP_ERROR_RESOURCE_BUSY = -16; - - /// < Invalid function parameter(22) - static const int ASP_ERROR_INVALID_PARAMETER = -22; - - /// < Connection timed out(110) - static const int ASP_ERROR_CONNECTION_TIME_OUT = -110; - - /// < Not supported - static const int ASP_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Not initialized - static const int ASP_ERROR_NOT_INITIALIZED = -49676287; - - /// < Already initialized - static const int ASP_ERROR_ALREADY_INITIALIZED = -49676286; - - /// < I/O error - static const int ASP_ERROR_COMMUNICATION_FAILED = -49676285; - - /// < Operation failed - static const int ASP_ERROR_OPERATION_FAILED = -49676284; - - /// < In progress - static const int ASP_ERROR_IN_PROGRESS = -49676283; - - /// < Service not found - static const int ASP_ERROR_SERVICE_NOT_FOUND = -49676282; - - /// < Session not found - static const int ASP_ERROR_SESSION_NOT_FOUND = -49676281; - - /// < Requested network role rejected - static const int ASP_ERROR_NETWORK_ROLE_REJECTED = -49676280; -} - -/// @brief Enumeration for Advertise Status event reason. -/// @since_tizen 4.0 -abstract class asp_advert_status_reason_e { - /// < Status reason: Success - static const int ASP_ADVERT_STATUS_REASON_SUCCESS = 0; - - /// < Status reason: Service duplicated - static const int ASP_ADVERT_STATUS_REASON_SERVICE_DUPLICATED = 1; - - /// < Status reason: Other failure - static const int ASP_ADVERT_STATUS_REASON_OTHER_FAILURE = 2; -} - -/// @brief Enumeration for the Wi-Fi P2P role assignment scheme. -/// @since_tizen 4.0 -/// @see asp_advert_set_p2p_role_scheme() -/// @see asp_advert_get_p2p_role_scheme() -/// @see asp_session_set_p2p_role() -/// @see asp_session_get_p2p_role() -abstract class asp_advert_p2p_role_scheme_e { - /// < All roles are acceptable - static const int ASP_ADVERT_P2P_ROLE_SCHEME_ANY = 0; - - /// < The interface should assume the GO role - static const int ASP_ADVERT_P2P_ROLE_SCHEME_GO = 1; - - /// < The interface should assume the GC role - static const int ASP_ADVERT_P2P_ROLE_SCHEME_GC = 2; -} - -/// @brief Enumeration for service discovery mechanism. -/// @since_tizen 4.0 -/// @see asp_advert_set_discovery_tech() -/// @see asp_seek_set_discovery_tech() -abstract class asp_discovery_tech_e { - /// < Use Wi-Fi P2P for discovery mechanism - static const int ASP_DISCOVERY_TECH_P2P = 1; - - /// < Use BLE for discovery mechanism - static const int ASP_DISCOVERY_TECH_BLE = 2; - - /// < Use NFC for discovery mechanism - static const int ASP_DISCOVERY_TECH_NFC = 4; - - /// < Use Wi-Fi Infrastructured for discovery mechanism - static const int ASP_DISCOVERY_TECH_INFRA = 8; - - /// < Use Wi-Fi NAN for discovery mechanism - static const int ASP_DISCOVERY_TECH_NAN = 16; -} - -/// @brief Enumeration for Wi-Fi WPS type. -/// @see asp_advert_set_p2p_config_method() -/// @see asp_advert_get_p2p_config_method() -/// @see asp_session_set_p2p_config_method() -/// @see asp_session_get_p2p_config_method() -/// @since_tizen 4.0 -abstract class asp_wps_type_e { - /// < No WPS type - static const int ASP_WPS_TYPE_NONE = 0; - - /// < Default WPS type both P2PS and PIN - static const int ASP_WPS_TYPE_DEFAULT = 1; - - /// < WPS type PIN code both display and keypad - static const int ASP_WPS_TYPE_PIN_BOTH = 2; - - /// < WPS type display PIN code only - static const int ASP_WPS_TYPE_PIN_DISPLAY = 3; - - /// < WPS type keypad to input the PIN only - static const int ASP_WPS_TYPE_PIN_KEYPAD = 4; -} - -/// @brief Enumeration for Application Service Platform (ASP) Session connect status. -/// @since_tizen 4.0 -abstract class asp_connect_status_e { - /// < Network role rejected - static const int ASP_CONNECT_STATUS_NETWORK_ROLE_REJECTED = 0; - - /// < The device's connection limit has been reached - static const int ASP_CONNECT_STATUS_CONNECTION_LIMIT_REACHED = 1; - - /// < Session request sent - static const int ASP_CONNECT_STATUS_REQUEST_SENT = 2; - - /// < Session request received - static const int ASP_CONNECT_STATUS_REQUEST_RECEIVED = 3; - - /// < Session request deferred - static const int ASP_CONNECT_STATUS_REQUEST_DEFERRED = 4; - - /// < Session request accepted - static const int ASP_CONNECT_STATUS_REQUEST_ACCEPTED = 5; - - /// < Session request failed - static const int ASP_CONNECT_STATUS_REQUEST_FAILED = 6; - - /// < Group formation started - static const int ASP_CONNECT_STATUS_GROUP_FORMATION_STARTED = 7; - - /// < Group formation completed - static const int ASP_CONNECT_STATUS_GROUP_FORMATION_COMPLETED = 8; - - /// < Group formation failed - static const int ASP_CONNECT_STATUS_GROUP_FORMATION_FAILED = 9; -} - -/// @brief Enumeration for Application Service Platform (ASP) general session state. -/// @since_tizen 4.0 -abstract class asp_session_state_e { - /// < Session state error - static const int ASP_SESSION_STATE_ERROR = 0; - - /// < Session state closed - static const int ASP_SESSION_STATE_CLOSED = 1; - - /// < Session state initiated - static const int ASP_SESSION_STATE_INITIATED = 2; - - /// < Session state requested - static const int ASP_SESSION_STATE_REQUESTED = 3; - - /// < Session state open - static const int ASP_SESSION_STATE_OPEN = 4; -} - -/// @brief Enumeration for Application Service Platform (ASP) session close status. -/// @since_tizen 4.0 -abstract class asp_session_close_status_e { - /// < Session closed without error - static const int ASP_SESSION_CLOSE_OK = 0; - - /// < Session closed by disassociation (Wi-Fi Direct connection was broken) - static const int ASP_SESSION_CLOSE_DISASSOCIATED = 1; - - /// < Session closed with local close - static const int ASP_SESSION_CLOSE_LOCAL_CLOSE = 2; - - /// < Session closed with remote close - static const int ASP_SESSION_CLOSE_REMOTE_CLOSE = 3; - - /// < Session closed with system failure - static const int ASP_SESSION_CLOSE_SYSTEM_FAILURE = 4; - - /// < Session closed with no response from remote - static const int ASP_SESSION_CLOSE_NO_RESPONSE = 5; -} - -/// @brief Enumeration for Application Service Platform (ASP) port status. -/// @since_tizen 4.0 -abstract class asp_port_status_e { - /// < Incoming connections are allowed on this local port for this ASP session - static const int ASP_PORT_STATUS_LOCAL_PORT_ALLOWED = 0; - - /// < Incoming connections are no longer allowed in the ASP session for this local port - static const int ASP_PORT_STATUS_LOCAL_PORT_BLOCKED = 1; - - /// < The ASP was unable to set up this local port - static const int ASP_PORT_STATUS_FAILURE = 2; - - /// < The remote service has allowed access to the given remote port for the given protocol - static const int ASP_PORT_STATUS_REMOTE_PORT_ALLOWED = 3; -} - -/// @brief Enumeration for service status. -/// @since_tizen 4.0 -abstract class asp_service_status_e { - /// < Service status not advertised - static const int ASP_SERVICE_STATUS_NOT_ADVERTISED = 0; - - /// < Service status advertised - static const int ASP_SERVICE_STATUS_ADVERTISED = 1; -} - -/// @brief Called when the Application Service Platform (ASP) Service is found. -/// @since_tizen 4.0 -/// @remarks @a service_mac, @a instance_name and @a service_info are valid only in the callback. -/// To use outside the callback, make a copy. -/// @param[in] error_code The error code. \n -/// #ASP_ERROR_NONE Successful\n -/// #ASP_ERROR_OUT_OF_MEMORY Out of memory\n -/// #ASP_ERROR_OPERATION_FAILED Operation failed\n -/// @param[in] seek_service The seek service which found the current result; -/// the handle to the same object for which the search was started -/// @param[in] service_mac The P2P device address of the device which provides the service; -/// NULL if not available -/// @param[in] adv_id The service advertisement ID defined by remote P2P device -/// @param[in] config_method The preferred Wi-Fi Simple Config (WSC) configuration method -/// @param[in] instance_name The advertised service name defined by the remote P2P device; -/// NULL if not available -/// @param[in] service_info The advertised service information defined by the remote P2P device; -/// NULL if not available -/// @param[in] info_size The advertised service information payload size; -/// if the information is not available, this is set to -1 -/// @param[in] status The status of the service -/// @param[in] user_data The user data passed from the callback registration function -/// @pre The callback must be registered using asp_seek_set_search_result_cb().\n -/// asp_seek_start() must be called to invoke this callback. -/// @see asp_seek_set_search_result_cb() -/// @see asp_seek_unset_search_result_cb() -/// @see asp_seek_start() -typedef asp_seek_search_result_cb - = ffi.Pointer>; -typedef asp_seek_search_result_cbFunction = ffi.Void Function( - ffi.Int error_code, - asp_seek_service_h seek_service, - ffi.Pointer service_mac, - ffi.UnsignedInt adv_id, - ffi.Int32 config_method, - ffi.Pointer instance_name, - ffi.Pointer service_info, - ffi.Int info_size, - ffi.UnsignedChar status, - ffi.Pointer user_data); -typedef Dartasp_seek_search_result_cbFunction = void Function( - int error_code, - asp_seek_service_h seek_service, - ffi.Pointer service_mac, - int adv_id, - int config_method, - ffi.Pointer instance_name, - ffi.Pointer service_info, - int info_size, - int status, - ffi.Pointer user_data); - -/// @brief The searching service description. -/// @since_tizen 4.0 -typedef asp_seek_service_h = ffi.Pointer; - -/// @brief Called when the status of an advertisement to a service is changed. -/// @since_tizen 4.0 -/// @param[in] adv_service The service whose status has changed; -/// the handle to the same object for which the callback was set -/// @param[in] status The status of the service -/// @param[in] reason The reason of the state change -/// @param[in] user_data The user data passed from the callback registration function -/// @pre The callback must be registered using asp_advert_set_status_cb().\n -/// asp_advert_start_advertising() and asp_change_service_state() invoke this callback. -/// @see asp_advert_set_status_changed_cb() -/// @see asp_advert_unset_status_changed_cb() -/// @see asp_advert_start_advertising() -typedef asp_advert_status_changed_cb - = ffi.Pointer>; -typedef asp_advert_status_changed_cbFunction = ffi.Void Function( - asp_advert_service_h adv_service, - ffi.Int32 status, - ffi.Int32 reason, - ffi.Pointer user_data); -typedef Dartasp_advert_status_changed_cbFunction = void Function( - asp_advert_service_h adv_service, - int status, - int reason, - ffi.Pointer user_data); - -/// @brief The advertised service description. -/// @since_tizen 4.0 -typedef asp_advert_service_h = ffi.Pointer; - -/// @brief Called when a remote device is attempting to initiate an ASP session. -/// @since_tizen 4.0 -/// @remarks @a network_config_pin, @a device_name and @a info are valid only in the callback. -/// To use outside the callback, make a copy. -/// @param[in] error_code The error code.\n -/// #ASP_ERROR_NONE Successful\n -/// #ASP_ERROR_OUT_OF_MEMORY Out of memory\n -/// #ASP_ERROR_OPERATION_FAILED Operation failed\n -/// @param[in] adv_service Service descriptor handle provided by the asp_advert_create() -/// it is the "original" object not created specifically for the callback -/// @param[in] session The session for which the request is made; -/// the handle to the same object for which the callback was set -/// @param[in] device_name Device name of the remote peer -/// @param[in] info The service-specific data payload (up to 144 bytes); -/// NULL if not available -/// @param[in] info_size The service-specific data payload size (up to 144) -/// @param[in] get_network_config_pin (@c true = requires WSC PIN to be entered by -/// the asp_session_confirm(), -/// @c false = does not require PIN) -/// @param[in] network_config_pin The WSC PIN value to be displayed; NULL if not available -/// @param[in] user_data The user data passed from the callback registration function -/// @pre The callback must be registered using asp_session_set_request_cb(). -/// @see asp_session_set_request_cb() -typedef asp_session_request_cb - = ffi.Pointer>; -typedef asp_session_request_cbFunction = ffi.Void Function( - ffi.Int error_code, - asp_advert_service_h adv_service, - asp_session_h session, - ffi.Pointer device_name, - ffi.Pointer info, - ffi.Int info_size, - ffi.Bool get_network_config_pin, - ffi.Pointer network_config_pin, - ffi.Pointer user_data); -typedef Dartasp_session_request_cbFunction = void Function( - int error_code, - asp_advert_service_h adv_service, - asp_session_h session, - ffi.Pointer device_name, - ffi.Pointer info, - int info_size, - bool get_network_config_pin, - ffi.Pointer network_config_pin, - ffi.Pointer user_data); - -/// @brief The Application Service Platform (ASP) session description. -/// @since_tizen 4.0 -typedef asp_session_h = ffi.Pointer; - -/// @brief Called when the Application Service Platform (ASP) has to provide -/// a PIN value or collect a PIN value. -/// @since_tizen 4.0 -/// @remarks @a config_pin is valid only in the callback. -/// To use outside the callback, make a copy. -/// @param[in] error_code The error code.\n -/// #ASP_ERROR_NONE Successful\n -/// #ASP_ERROR_OUT_OF_MEMORY Out of memory\n -/// #ASP_ERROR_OPERATION_FAILED Operation failed\n -/// @param[in] session The session for which the request is made; -/// the handle to the same object for which the callback was set -/// @param[in] get_pin (@c true = instruct the user to enter the PIN, -/// @c false = display the PIN provided in the @a config_pin parameter) -/// @param[in] config_pin The WSC PIN value used for setting up; ignored if @a get_pin is @c true -/// @param[in] user_data The user data passed from the callback registration function -/// @pre The callback must be registered using asp_session_set_config_request_cb().\n -/// asp_session_connect() must be called to invoke this callback. -/// @see asp_session_set_request_cb() -/// @see asp_session_connect() -typedef asp_session_config_request_cb - = ffi.Pointer>; -typedef asp_session_config_request_cbFunction = ffi.Void Function( - ffi.Int error_code, - asp_session_h session, - ffi.Bool get_pin, - ffi.Pointer config_pin, - ffi.Pointer user_data); -typedef Dartasp_session_config_request_cbFunction = void Function( - int error_code, - asp_session_h session, - bool get_pin, - ffi.Pointer config_pin, - ffi.Pointer user_data); - -/// @brief Called when the Application Service Platform (ASP) reports progress on group formation. -/// @since_tizen 4.0 -/// @remarks @a deferred_resp is valid only in the callback. -/// To use outside the callback, make a copy. -/// @param[in] error_code The error code.\n -/// #ASP_ERROR_NONE Successful\n -/// #ASP_ERROR_OUT_OF_MEMORY Out of memory\n -/// #ASP_ERROR_OPERATION_FAILED Operation failed\n -/// @param[in] session The session for which progress is reported; -/// the handle to the same object for which the callback was set -/// @param[in] status The connection progress status -/// @param[in] deferred_resp The service-specific data payload up to 144 bytes -/// @param[in] resp_size The service-specific data payload size(up to 144) -/// @param[in] user_data The user data passed from the callback registration function -/// @pre The callback must be registered using asp_session_set_connect_status_cb() -/// @see asp_session_set_connect_status_cb() -typedef asp_session_connect_status_cb - = ffi.Pointer>; -typedef asp_session_connect_status_cbFunction = ffi.Void Function( - ffi.Int error_code, - asp_session_h session, - ffi.Int32 status, - ffi.Pointer deferred_resp, - ffi.Int resp_size, - ffi.Pointer user_data); -typedef Dartasp_session_connect_status_cbFunction = void Function( - int error_code, - asp_session_h session, - int status, - ffi.Pointer deferred_resp, - int resp_size, - ffi.Pointer user_data); - -/// @brief Called when the Application Service Platform (ASP) reports the state and status of an ASP session. -/// @since_tizen 4.0 -/// @remarks @a additional_info is valid only in the callback. -/// To use outside the callback, make a copy. -/// @param[in] error_code The error code.\n -/// #ASP_ERROR_NONE Successful\n -/// #ASP_ERROR_OUT_OF_MEMORY Out of memory\n -/// #ASP_ERROR_OPERATION_FAILED Operation failed\n -/// @param[in] session The session for which status is reported; -/// the handle to the same object for which the callback was set -/// @param[in] state The session state -/// @param[in] additional_info Additional information related to the SessionStatus event -/// @param[in] user_data The user data passed from the callback registration function -/// @pre The callback must be registered using asp_session_set_status_cb() -/// @see asp_session_set_status_cb() -typedef asp_session_status_cb - = ffi.Pointer>; -typedef asp_session_status_cbFunction = ffi.Void Function( - ffi.Int error_code, - asp_session_h session, - ffi.Int32 state, - ffi.Pointer additional_info, - ffi.Pointer user_data); -typedef Dartasp_session_status_cbFunction = void Function( - int error_code, - asp_session_h session, - int state, - ffi.Pointer additional_info, - ffi.Pointer user_data); - -/// @brief Called when the Application Service Platform (ASP) reports the status of the network port on the local and remote end of the ASP session. -/// @since_tizen 4.0 -/// @remarks @a ip_address is valid only in the callback. -/// To use outside the callback, make a copy. -/// @param[in] error_code The error code.\n -/// #ASP_ERROR_NONE Successful\n -/// #ASP_ERROR_OUT_OF_MEMORY Out of memory\n -/// #ASP_ERROR_OPERATION_FAILED Operation failed\n -/// @param[in] session Application Service Platform session descriptor handle -/// @param[in] ip_address The IP address for the port, local or remote -/// @param[in] port The port number -/// @param[in] proto The IANA protocol number -/// @param[in] status The port status -/// @param[in] user_data The user data passed from the callback registration function -/// @pre The callback must be registered using asp_session_set_port_status_cb() -/// @see asp_set_session_port_status_cb() -typedef asp_session_port_status_cb - = ffi.Pointer>; -typedef asp_session_port_status_cbFunction = ffi.Void Function( - ffi.Int error_code, - asp_session_h session, - ffi.Pointer ip_address, - ffi.Int port, - ffi.Int proto, - ffi.Int32 status, - ffi.Pointer user_data); -typedef Dartasp_session_port_status_cbFunction = void Function( - int error_code, - asp_session_h session, - ffi.Pointer ip_address, - int port, - int proto, - int status, - ffi.Pointer user_data); - -/// @WEARABLE_ONLY -/// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE -/// @brief Enumeration of PBAP fields. -/// @since_tizen 3.0 -abstract class bt_pbap_field_e { - /// < All field - static const int BT_PBAP_FIELD_ALL = -1; - - /// < vCard Version - static const int BT_PBAP_FIELD_VERSION = 1; - - /// < Formatted Name - static const int BT_PBAP_FIELD_FN = 2; - - /// < Structured Presentation of Name - static const int BT_PBAP_FIELD_N = 4; - - /// < Associated Image or Photo - static const int BT_PBAP_FIELD_PHOTO = 8; - - /// < Birthday - static const int BT_PBAP_FIELD_BDAY = 16; - - /// < Delivery Address - static const int BT_PBAP_FIELD_ADR = 32; - - /// < Delivery - static const int BT_PBAP_FIELD_LABEL = 64; - - /// < Telephone Number - static const int BT_PBAP_FIELD_TEL = 128; - - /// < Electronic Mail Address - static const int BT_PBAP_FIELD_EMAIL = 256; - - /// < Electronic Mail - static const int BT_PBAP_FIELD_MAILER = 512; - - /// < Time Zone - static const int BT_PBAP_FIELD_TZ = 1024; - - /// < Geographic Position - static const int BT_PBAP_FIELD_GEO = 2048; - - /// < Job - static const int BT_PBAP_FIELD_TITLE = 4096; - - /// < Role within the Organization - static const int BT_PBAP_FIELD_ROLE = 8192; - - /// < Organization Logo - static const int BT_PBAP_FIELD_LOGO = 16384; - - /// < vCard of Person Representing - static const int BT_PBAP_FIELD_AGENT = 32768; - - /// < Name of Organization - static const int BT_PBAP_FIELD_ORG = 65536; - - /// < Comments - static const int BT_PBAP_FIELD_NOTE = 131072; - - /// < Revision - static const int BT_PBAP_FIELD_REV = 262144; - - /// < Pronunciation of Name - static const int BT_PBAP_FIELD_SOUND = 524288; - - /// < Uniform Resource Locator - static const int BT_PBAP_FIELD_URL = 1048576; - - /// < Unique ID - static const int BT_PBAP_FIELD_UID = 2097152; - - /// < Public Encryption Key - static const int BT_PBAP_FIELD_KEY = 4194304; - - /// < Nickname - static const int BT_PBAP_FIELD_NICKNAME = 8388608; - - /// < Categories - static const int BT_PBAP_FIELD_CATEGORIES = 16777216; - - /// < Product ID - static const int BT_PBAP_FIELD_PROID = 33554432; - - /// < Class information - static const int BT_PBAP_FIELD_CLASS = 67108864; - - /// < String used for sorting operations - static const int BT_PBAP_FIELD_SORT_STRING = 134217728; - - /// < Time stamp - static const int BT_PBAP_FIELD_X_IRMC_CALL_DATETIME = 268435456; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_MODULE -/// @brief Enumerations of Bluetooth error codes. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_error_e { - /// < Successful - static const int BT_ERROR_NONE = 0; - - /// < Operation cancelled - static const int BT_ERROR_CANCELLED = -125; - - /// < Invalid parameter - static const int BT_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int BT_ERROR_OUT_OF_MEMORY = -12; - - /// < Device or resource busy - static const int BT_ERROR_RESOURCE_BUSY = -16; - - /// < Timeout error - static const int BT_ERROR_TIMED_OUT = -1073741823; - - /// < Operation now in progress - static const int BT_ERROR_NOW_IN_PROGRESS = -115; - - /// < BT is Not Supported - static const int BT_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Permission denied - static const int BT_ERROR_PERMISSION_DENIED = -13; - - /// < Quota exceeded - static const int BT_ERROR_QUOTA_EXCEEDED = -122; - - /// < No data available - static const int BT_ERROR_NO_DATA = -61; - - /// < Device policy restriction (Since 3.0) - static const int BT_ERROR_DEVICE_POLICY_RESTRICTION = -1073741820; - - /// < Local adapter not initialized - static const int BT_ERROR_NOT_INITIALIZED = -29359871; - - /// < Local adapter not enabled - static const int BT_ERROR_NOT_ENABLED = -29359870; - - /// < Operation already done - static const int BT_ERROR_ALREADY_DONE = -29359869; - - /// < Operation failed - static const int BT_ERROR_OPERATION_FAILED = -29359868; - - /// < Operation not in progress - static const int BT_ERROR_NOT_IN_PROGRESS = -29359867; - - /// < Remote device not bonded - static const int BT_ERROR_REMOTE_DEVICE_NOT_BONDED = -29359866; - - /// < Authentication rejected - static const int BT_ERROR_AUTH_REJECTED = -29359865; - - /// < Authentication failed - static const int BT_ERROR_AUTH_FAILED = -29359864; - - /// < Remote device not found - static const int BT_ERROR_REMOTE_DEVICE_NOT_FOUND = -29359863; - - /// < Service search failed - static const int BT_ERROR_SERVICE_SEARCH_FAILED = -29359862; - - /// < Remote device is not connected - static const int BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED = -29359861; - - /// < Resource temporarily unavailable - static const int BT_ERROR_AGAIN = -29359860; - - /// < Service Not Found - static const int BT_ERROR_SERVICE_NOT_FOUND = -29359859; - - /// < Authorization rejected (Since 5.0) - static const int BT_ERROR_AUTHORIZATION_REJECTED = -29359858; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE -/// @brief Enumerations of the Bluetooth adapter state. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_adapter_state_e { - /// < Bluetooth adapter is disabled - static const int BT_ADAPTER_DISABLED = 0; - - /// < Bluetooth adapter is enabled - static const int BT_ADAPTER_ENABLED = 1; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE -/// @brief Enumerations of the Bluetooth visibility mode. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_adapter_visibility_mode_e { - /// < Other devices cannot find your device via discovery - static const int BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE = 0; - - /// < Discoverable mode - static const int BT_ADAPTER_VISIBILITY_MODE_GENERAL_DISCOVERABLE = 1; - - /// < Discoverable mode with time limit. After specific period, - /// it is changed to #BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE. - static const int BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE = 2; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE -/// @brief Enumerations of the discovery state of Bluetooth device. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_adapter_device_discovery_state_e { - /// < Device discovery is started - static const int BT_ADAPTER_DEVICE_DISCOVERY_STARTED = 0; - - /// < Device discovery is finished - static const int BT_ADAPTER_DEVICE_DISCOVERY_FINISHED = 1; - - /// < The remote Bluetooth device is found - static const int BT_ADAPTER_DEVICE_DISCOVERY_FOUND = 2; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief Enumerations of the Bluetooth advertising state. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_adapter_le_advertising_state_e { - /// < Bluetooth advertising is stopped - static const int BT_ADAPTER_LE_ADVERTISING_STOPPED = 0; - - /// < Bluetooth advertising is started - static const int BT_ADAPTER_LE_ADVERTISING_STARTED = 1; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief Enumerations of the Bluetooth advertising mode. -/// @since_tizen 2.3.1 -abstract class bt_adapter_le_advertising_mode_e { - /// < Balanced advertising mode - static const int BT_ADAPTER_LE_ADVERTISING_MODE_BALANCED = 0; - - /// < Low latency advertising mode - static const int BT_ADAPTER_LE_ADVERTISING_MODE_LOW_LATENCY = 1; - - /// < Low energy advertising mode - static const int BT_ADAPTER_LE_ADVERTISING_MODE_LOW_ENERGY = 2; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief Enumerations of the Bluetooth advertising filter policy. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_adapter_le_advertising_filter_policy_e { - /// < White list is not in use - static const int BT_ADAPTER_LE_ADVERTISING_FILTER_DEFAULT = 0; - - /// < Allow the scan - /// request that in the White list - static const int BT_ADAPTER_LE_ADVERTISING_FILTER_ALLOW_SCAN_WL = 1; - - /// < Allow the connection - /// request that in the White list - static const int BT_ADAPTER_LE_ADVERTISING_FILTER_ALLOW_CONN_WL = 2; - - /// < Allow the - /// scan and connection request that in the White list - static const int BT_ADAPTER_LE_ADVERTISING_FILTER_ALLOW_SCAN_CONN_WL = 3; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief Enumerations of the Bluetooth LE packet type. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_adapter_le_packet_type_e { - /// < Advertising packet - static const int BT_ADAPTER_LE_PACKET_ADVERTISING = 0; - - /// < Scan response packet - static const int BT_ADAPTER_LE_PACKET_SCAN_RESPONSE = 1; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief Enumerations of the Bluetooth le scan mode. -/// @since_tizen 3.0 -abstract class bt_adapter_le_scan_mode_e { - /// < Balanced mode of power consumption and connection latency - static const int BT_ADAPTER_LE_SCAN_MODE_BALANCED = 0; - - /// < Low connection latency but high power consumption - static const int BT_ADAPTER_LE_SCAN_MODE_LOW_LATENCY = 1; - - /// < Low power consumption but high connection latency - static const int BT_ADAPTER_LE_SCAN_MODE_LOW_ENERGY = 2; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Enumerations of device disconnect reason. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_device_disconnect_reason_e { - /// < Disconnected by unknown reason - static const int BT_DEVICE_DISCONNECT_REASON_UNKNOWN = 0; - - /// < Disconnected by timeout - static const int BT_DEVICE_DISCONNECT_REASON_TIMEOUT = 1; - - /// < Disconnected by local host - static const int BT_DEVICE_DISCONNECT_REASON_LOCAL_HOST = 2; - - /// < Disconnected by remote - static const int BT_DEVICE_DISCONNECT_REASON_REMOTE = 3; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Enumerations of connection link type. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_device_connection_link_type_e { - /// < BR/EDR link - static const int BT_DEVICE_CONNECTION_LINK_BREDR = 0; - - /// < LE link - static const int BT_DEVICE_CONNECTION_LINK_LE = 1; - - /// < The connection type default - static const int BT_DEVICE_CONNECTION_LINK_DEFAULT = 255; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Enumerations of device authorization state. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_device_authorization_e { - /// < The remote Bluetooth device is authorized - static const int BT_DEVICE_AUTHORIZED = 0; - - /// < The remote Bluetooth device is unauthorized - static const int BT_DEVICE_UNAUTHORIZED = 1; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Enumerations of Bluetooth profile. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_profile_e { - /// < RFCOMM Profile - static const int BT_PROFILE_RFCOMM = 1; - - /// < Advanced Audio Distribution Profile Source role - static const int BT_PROFILE_A2DP = 2; - - /// < Headset Profile - static const int BT_PROFILE_HSP = 4; - - /// < Human Interface Device Profile - static const int BT_PROFILE_HID = 8; - - /// < Network Access Point Profile - static const int BT_PROFILE_NAP = 16; - - /// < Audio Gateway Profile - static const int BT_PROFILE_AG = 32; - - /// < Generic Attribute Profile - static const int BT_PROFILE_GATT = 64; - - /// < NAP server Profile - static const int BT_PROFILE_NAP_SERVER = 128; - - /// < Advanced Audio Distribution Profile Sink role - static const int BT_PROFILE_A2DP_SINK = 256; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Enumerations of device address type. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_device_address_type_e { - /// < Public address - static const int BT_DEVICE_PUBLIC_ADDRESS = 0; - - /// < Random address - static const int BT_DEVICE_RANDOM_ADDRESS = 1; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Enumerations of service class. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_service_class_t { - /// < No service class - static const int BT_SC_NONE = 0; - - /// < RES service class - static const int BT_SC_RES_SERVICE_MASK = 1; - - /// < SPP service class - static const int BT_SC_SPP_SERVICE_MASK = 2; - - /// < DUN service class - static const int BT_SC_DUN_SERVICE_MASK = 4; - - /// < FAX service class - static const int BT_SC_FAX_SERVICE_MASK = 8; - - /// < LAP service class - static const int BT_SC_LAP_SERVICE_MASK = 16; - - /// < HSP service class - static const int BT_SC_HSP_SERVICE_MASK = 32; - - /// < HFP service class - static const int BT_SC_HFP_SERVICE_MASK = 64; - - /// < OPP service class - static const int BT_SC_OPP_SERVICE_MASK = 128; - - /// < FTP service class - static const int BT_SC_FTP_SERVICE_MASK = 256; - - /// < CTP service class - static const int BT_SC_CTP_SERVICE_MASK = 512; - - /// < ICP service class - static const int BT_SC_ICP_SERVICE_MASK = 1024; - - /// < SYNC service class - static const int BT_SC_SYNC_SERVICE_MASK = 2048; - - /// < BPP service class - static const int BT_SC_BPP_SERVICE_MASK = 4096; - - /// < BIP service class - static const int BT_SC_BIP_SERVICE_MASK = 8192; - - /// < PANU service class - static const int BT_SC_PANU_SERVICE_MASK = 16384; - - /// < NAP service class - static const int BT_SC_NAP_SERVICE_MASK = 32768; - - /// < GN service class - static const int BT_SC_GN_SERVICE_MASK = 65536; - - /// < SAP service class - static const int BT_SC_SAP_SERVICE_MASK = 131072; - - /// < A2DP service class - static const int BT_SC_A2DP_SERVICE_MASK = 262144; - - /// < AVRCP service class - static const int BT_SC_AVRCP_SERVICE_MASK = 524288; - - /// < PBAP service class - static const int BT_SC_PBAP_SERVICE_MASK = 1048576; - - /// < HID service class - static const int BT_SC_HID_SERVICE_MASK = 2097152; - - /// < A2DP SOURCE service class - static const int BT_SC_A2DP_SOURCE_SERVICE_MASK = 4194304; - - /// < ALL service class - static const int BT_SC_ALL_SERVICE_MASK = 16777215; - - /// < MAX service class - static const int BT_SC_MAX = 16777216; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Enumerations of major service class. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_major_service_class_e { - /// < Limited discoverable mode - static const int BT_MAJOR_SERVICE_CLASS_LIMITED_DISCOVERABLE_MODE = 8192; - - /// < Positioning class - static const int BT_MAJOR_SERVICE_CLASS_POSITIONING = 65536; - - /// < Networking class - static const int BT_MAJOR_SERVICE_CLASS_NETWORKING = 131072; - - /// < Rendering class - static const int BT_MAJOR_SERVICE_CLASS_RENDERING = 262144; - - /// < Capturing class - static const int BT_MAJOR_SERVICE_CLASS_CAPTURING = 524288; - - /// < Object transferring class - static const int BT_MAJOR_SERVICE_CLASS_OBJECT_TRANSFER = 1048576; - - /// < Audio class - static const int BT_MAJOR_SERVICE_CLASS_AUDIO = 2097152; - - /// < Telephony class - static const int BT_MAJOR_SERVICE_CLASS_TELEPHONY = 4194304; - - /// < Information class - static const int BT_MAJOR_SERVICE_CLASS_INFORMATION = 8388608; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Enumerations of major device class. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_major_device_class_e { - /// < Miscellaneous major device class - static const int BT_MAJOR_DEVICE_CLASS_MISC = 0; - - /// < Computer major device class - static const int BT_MAJOR_DEVICE_CLASS_COMPUTER = 1; - - /// < Phone major device class - static const int BT_MAJOR_DEVICE_CLASS_PHONE = 2; - - /// < LAN/Network access point major device class - static const int BT_MAJOR_DEVICE_CLASS_LAN_NETWORK_ACCESS_POINT = 3; - - /// < Audio/Video major device class - static const int BT_MAJOR_DEVICE_CLASS_AUDIO_VIDEO = 4; - - /// < Peripheral major device class - static const int BT_MAJOR_DEVICE_CLASS_PERIPHERAL = 5; - - /// < Imaging major device class - static const int BT_MAJOR_DEVICE_CLASS_IMAGING = 6; - - /// < Wearable device class - static const int BT_MAJOR_DEVICE_CLASS_WEARABLE = 7; - - /// < Toy device class - static const int BT_MAJOR_DEVICE_CLASS_TOY = 8; - - /// < Health device class - static const int BT_MAJOR_DEVICE_CLASS_HEALTH = 9; - - /// < Uncategorized major device class - static const int BT_MAJOR_DEVICE_CLASS_UNCATEGORIZED = 31; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Enumerations of minor device class. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_minor_device_class_e { - /// < Uncategorized minor device class of computer - static const int BT_MINOR_DEVICE_CLASS_COMPUTER_UNCATEGORIZED = 0; - - /// < Desktop workstation minor device class of computer - static const int BT_MINOR_DEVICE_CLASS_COMPUTER_DESKTOP_WORKSTATION = 4; - - /// < Server minor device class of computer - static const int BT_MINOR_DEVICE_CLASS_COMPUTER_SERVER_CLASS = 8; - - /// < Laptop minor device class of computer - static const int BT_MINOR_DEVICE_CLASS_COMPUTER_LAPTOP = 12; - - /// < Handheld PC/PDA minor device class of computer - static const int BT_MINOR_DEVICE_CLASS_COMPUTER_HANDHELD_PC_OR_PDA = 16; - - /// < Palm sized PC/PDA minor device class of computer - static const int BT_MINOR_DEVICE_CLASS_COMPUTER_PALM_SIZED_PC_OR_PDA = 20; - - /// < Wearable(watch sized) minor device class of computer - static const int BT_MINOR_DEVICE_CLASS_COMPUTER_WEARABLE_COMPUTER = 24; - - /// < Uncategorized minor device class of phone - static const int BT_MINOR_DEVICE_CLASS_PHONE_UNCATEGORIZED = 0; - - /// < Cellular minor device class of phone - static const int BT_MINOR_DEVICE_CLASS_PHONE_CELLULAR = 4; - - /// < Cordless minor device class of phone - static const int BT_MINOR_DEVICE_CLASS_PHONE_CORDLESS = 8; - - /// < Smart phone minor device class of phone - static const int BT_MINOR_DEVICE_CLASS_PHONE_SMART_PHONE = 12; - - /// < Wired modem or voice gateway minor device class of phone - static const int BT_MINOR_DEVICE_CLASS_PHONE_WIRED_MODEM_OR_VOICE_GATEWAY = - 16; - - /// < Common ISDN minor device class of phone - static const int BT_MINOR_DEVICE_CLASS_PHONE_COMMON_ISDN_ACCESS = 20; - - /// < Fully available minor device class of LAN/Network access point - static const int - BT_MINOR_DEVICE_CLASS_LAN_NETWORK_ACCESS_POINT_FULLY_AVAILABLE = 4; - - /// < 1-17% utilized minor device class of LAN/Network access point - static const int - BT_MINOR_DEVICE_CLASS_LAN_NETWORK_ACCESS_POINT_1_TO_17_PERCENT_UTILIZED = - 32; - - /// < 17-33% utilized minor device class of LAN/Network access point - static const int - BT_MINOR_DEVICE_CLASS_LAN_NETWORK_ACCESS_POINT_17_TO_33_PERCENT_UTILIZED = - 64; - - /// < 33-50% utilized minor device class of LAN/Network access point - static const int - BT_MINOR_DEVICE_CLASS_LAN_NETWORK_ACCESS_POINT_33_TO_50_PERCENT_UTILIZED = - 96; - - /// < 50-67% utilized minor device class of LAN/Network access point - static const int - BT_MINOR_DEVICE_CLASS_LAN_NETWORK_ACCESS_POINT_50_to_67_PERCENT_UTILIZED = - 128; - - /// < 67-83% utilized minor device class of LAN/Network access point - static const int - BT_MINOR_DEVICE_CLASS_LAN_NETWORK_ACCESS_POINT_67_TO_83_PERCENT_UTILIZED = - 160; - - /// < 83-99% utilized minor device class of LAN/Network access point - static const int - BT_MINOR_DEVICE_CLASS_LAN_NETWORK_ACCESS_POINT_83_TO_99_PERCENT_UTILIZED = - 192; - - /// < No service available minor device class of LAN/Network access point - static const int - BT_MINOR_DEVICE_CLASS_LAN_NETWORK_ACCESS_POINT_NO_SERVICE_AVAILABLE = 224; - - /// < Uncategorized minor device class of audio/video - static const int BT_MINOR_DEVICE_CLASS_AUDIO_VIDEO_UNCATEGORIZED = 0; - - /// < Wearable headset minor device class of audio/video - static const int BT_MINOR_DEVICE_CLASS_AUDIO_VIDEO_WEARABLE_HEADSET = 4; - - /// < Hands-free minor device class of audio/video - static const int BT_MINOR_DEVICE_CLASS_AUDIO_VIDEO_HANDS_FREE = 8; - - /// < Microphone minor device class of audio/video - static const int BT_MINOR_DEVICE_CLASS_AUDIO_VIDEO_MICROPHONE = 16; - - /// < Loudspeaker minor device class of audio/video - static const int BT_MINOR_DEVICE_CLASS_AUDIO_VIDEO_LOUDSPEAKER = 20; - - /// < Headphones minor device class of audio/video - static const int BT_MINOR_DEVICE_CLASS_AUDIO_VIDEO_HEADPHONES = 24; - - /// < Portable audio minor device class of audio/video - static const int BT_MINOR_DEVICE_CLASS_AUDIO_VIDEO_PORTABLE_AUDIO = 28; - - /// < Car audio minor device class of audio/video - static const int BT_MINOR_DEVICE_CLASS_AUDIO_VIDEO_CAR_AUDIO = 32; - - /// < Set-top box minor device class of audio/video - static const int BT_MINOR_DEVICE_CLASS_AUDIO_VIDEO_SET_TOP_BOX = 36; - - /// < Hifi audio minor device class of audio/video - static const int BT_MINOR_DEVICE_CLASS_AUDIO_VIDEO_HIFI_AUDIO_DEVICE = 40; - - /// < VCR minor device class of audio/video - static const int BT_MINOR_DEVICE_CLASS_AUDIO_VIDEO_VCR = 44; - - /// < Video camera minor device class of audio/video - static const int BT_MINOR_DEVICE_CLASS_AUDIO_VIDEO_VIDEO_CAMERA = 48; - - /// < Camcorder minor device class of audio/video - static const int BT_MINOR_DEVICE_CLASS_AUDIO_VIDEO_CAMCORDER = 52; - - /// < Video monitor minor device class of audio/video - static const int BT_MINOR_DEVICE_CLASS_AUDIO_VIDEO_VIDEO_MONITOR = 56; - - /// < Video display and loudspeaker minor device class of audio/video - static const int BT_MINOR_DEVICE_CLASS_AUDIO_VIDEO_VIDEO_DISPLAY_LOUDSPEAKER = - 60; - - /// < Video conferencing minor device class of audio/video - static const int BT_MINOR_DEVICE_CLASS_AUDIO_VIDEO_VIDEO_CONFERENCING = 64; - - /// < Gaming/toy minor device class of audio/video - static const int BT_MINOR_DEVICE_CLASS_AUDIO_VIDEO_GAMING_TOY = 72; - - /// < Uncategorized minor device class of peripheral - static const int BT_MINOR_DEVICE_CLASS_PERIPHERA_UNCATEGORIZED = 0; - - /// < Key board minor device class of peripheral - static const int BT_MINOR_DEVICE_CLASS_PERIPHERAL_KEY_BOARD = 64; - - /// < Pointing device minor device class of peripheral - static const int BT_MINOR_DEVICE_CLASS_PERIPHERAL_POINTING_DEVICE = 128; - - /// < Combo keyboard or pointing device minor device class of peripheral - static const int - BT_MINOR_DEVICE_CLASS_PERIPHERAL_COMBO_KEYBOARD_POINTING_DEVICE = 192; - - /// < Joystick minor device class of peripheral - static const int BT_MINOR_DEVICE_CLASS_PERIPHERAL_JOYSTICK = 4; - - /// < Game pad minor device class of peripheral - static const int BT_MINOR_DEVICE_CLASS_PERIPHERAL_GAME_PAD = 8; - - /// < Remote control minor device class of peripheral - static const int BT_MINOR_DEVICE_CLASS_PERIPHERAL_REMOTE_CONTROL = 12; - - /// < Sensing device minor device class of peripheral - static const int BT_MINOR_DEVICE_CLASS_PERIPHERAL_SENSING_DEVICE = 16; - - /// < Digitizer minor device class of peripheral - static const int BT_MINOR_DEVICE_CLASS_PERIPHERAL_DIGITIZER_TABLET = 20; - - /// < Card reader minor device class of peripheral - static const int BT_MINOR_DEVICE_CLASS_PERIPHERAL_CARD_READER = 24; - - /// < Digital pen minor device class of peripheral - static const int BT_MINOR_DEVICE_CLASS_PERIPHERAL_DIGITAL_PEN = 28; - - /// < Handheld scanner minor device class of peripheral - static const int BT_MINOR_DEVICE_CLASS_PERIPHERAL_HANDHELD_SCANNER = 32; - - /// < Handheld gestural input device minor device class of peripheral - static const int - BT_MINOR_DEVICE_CLASS_PERIPHERAL_HANDHELD_GESTURAL_INPUT_DEVICE = 36; - - /// < Display minor device class of imaging - static const int BT_MINOR_DEVICE_CLASS_IMAGING_DISPLAY = 16; - - /// < Camera minor device class of imaging - static const int BT_MINOR_DEVICE_CLASS_IMAGING_CAMERA = 32; - - /// < Scanner minor device class of imaging - static const int BT_MINOR_DEVICE_CLASS_IMAGING_SCANNER = 64; - - /// < Printer minor device class of imaging - static const int BT_MINOR_DEVICE_CLASS_IMAGING_PRINTER = 128; - - /// < Wrist watch minor device class of wearable - static const int BT_MINOR_DEVICE_CLASS_WEARABLE_WRIST_WATCH = 4; - - /// < Pager minor device class of wearable - static const int BT_MINOR_DEVICE_CLASS_WEARABLE_PAGER = 8; - - /// < Jacket minor device class of wearable - static const int BT_MINOR_DEVICE_CLASS_WEARABLE_JACKET = 12; - - /// < Helmet minor device class of wearable - static const int BT_MINOR_DEVICE_CLASS_WEARABLE_HELMET = 16; - - /// < Glasses minor device class of wearable - static const int BT_MINOR_DEVICE_CLASS_WEARABLE_GLASSES = 20; - - /// < Robot minor device class of toy - static const int BT_MINOR_DEVICE_CLASS_TOY_ROBOT = 4; - - /// < Vehicle minor device class of toy - static const int BT_MINOR_DEVICE_CLASS_TOY_VEHICLE = 8; - - /// < Doll/Action minor device class of toy - static const int BT_MINOR_DEVICE_CLASS_TOY_DOLL_ACTION = 12; - - /// < Controller minor device class of toy - static const int BT_MINOR_DEVICE_CLASS_TOY_CONTROLLER = 16; - - /// < Game minor device class of toy - static const int BT_MINOR_DEVICE_CLASS_TOY_GAME = 20; - - /// < Uncategorized minor device class of health - static const int BT_MINOR_DEVICE_CLASS_HEALTH_UNCATEGORIZED = 0; - - /// < Blood pressure monitor minor device class of health - static const int BT_MINOR_DEVICE_CLASS_HEALTH_BLOOD_PRESSURE_MONITOR = 4; - - /// < Thermometer minor device class of health - static const int BT_MINOR_DEVICE_CLASS_HEALTH_THERMOMETER = 8; - - /// < Weighing scale minor device class of health - static const int BT_MINOR_DEVICE_CLASS_HEALTH_WEIGHING_SCALE = 12; - - /// < Glucose minor device class of health - static const int BT_MINOR_DEVICE_CLASS_HEALTH_GLUCOSE_METER = 16; - - /// < Pulse oximeter minor device class of health - static const int BT_MINOR_DEVICE_CLASS_HEALTH_PULSE_OXIMETER = 20; - - /// < Heart/Pulse rate monitor minor device class of health - static const int BT_MINOR_DEVICE_CLASS_HEALTH_HEART_PULSE_RATE_MONITOR = 24; - - /// < Health data display minor device class of health - static const int BT_MINOR_DEVICE_CLASS_HEALTH_DATA_DISPLAY = 28; - - /// < Step counter minor device class of health - static const int BT_MINOR_DEVICE_CLASS_HEALTH_STEP_COUNTER = 32; - - /// < Body composition analyzer minor device class of health - static const int BT_MINOR_DEVICE_CLASS_HEALTH_BODY_COMPOSITION_ANALYZER = 36; - - /// < Peak flow monitor minor device class of health - static const int BT_MINOR_DEVICE_CLASS_HEALTH_PEAK_FLOW_MONITOR = 40; - - /// < Medication monitor minor device class of health - static const int BT_MINOR_DEVICE_CLASS_HEALTH_MEDICATION_MONITOR = 44; - - /// < Knee prosthesis minor device class of health - static const int BT_MINOR_DEVICE_CLASS_HEALTH_KNEE_PROSTHESIS = 48; - - /// < Ankle prosthesis minor device class of health - static const int BT_MINOR_DEVICE_CLASS_HEALTH_ANKLE_PROSTHESIS = 52; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Enumerations of gap appearance type. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_appearance_type_e { - /// < Unknown appearance type - static const int BT_APPEARANCE_TYPE_UNKNOWN = 0; - - /// < Generic Phone type - Generic category - static const int BT_APPEARANCE_TYPE_GENERIC_PHONE = 64; - - /// < Generic Computer type - Generic category - static const int BT_APPEARANCE_TYPE_GENERIC_COMPUTER = 128; - - /// < Generic Watch type - Generic category - static const int BT_APPEARANCE_TYPE_GENERIC_WATCH = 192; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Enumerations of the Bluetooth device's LE connection mode. -/// @since_tizen 3.0 -abstract class bt_device_le_connection_mode_e { - /// < Balanced mode of power consumption and connection latency - static const int BT_DEVICE_LE_CONNECTION_MODE_BALANCED = 0; - - /// < Low connection latency but high power consumption - static const int BT_DEVICE_LE_CONNECTION_MODE_LOW_LATENCY = 1; - - /// < Low power consumption but high connection latency - static const int BT_DEVICE_LE_CONNECTION_MODE_LOW_ENERGY = 2; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE -/// @brief Enumerations of connected Bluetooth device event role. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_socket_role_e { - /// < Unknown role - static const int BT_SOCKET_UNKNOWN = 0; - - /// < Server role - static const int BT_SOCKET_SERVER = 1; - - /// < Client role - static const int BT_SOCKET_CLIENT = 2; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE -/// @brief Enumerations of Bluetooth socket connection state. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_socket_connection_state_e { - /// < RFCOMM is connected - static const int BT_SOCKET_CONNECTED = 0; - - /// < RFCOMM is disconnected - static const int BT_SOCKET_DISCONNECTED = 1; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE -/// @brief Enumerations for the types of profiles related with audio. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_audio_profile_type_e { - /// < All supported profiles related with audio - static const int BT_AUDIO_PROFILE_TYPE_ALL = 0; - - /// < HSP(Headset Profile) and HFP(Hands-Free Profile) - static const int BT_AUDIO_PROFILE_TYPE_HSP_HFP = 1; - - /// < A2DP(Advanced Audio Distribution Profile) - static const int BT_AUDIO_PROFILE_TYPE_A2DP = 2; - - /// < AG(Audio Gateway) - static const int BT_AUDIO_PROFILE_TYPE_AG = 3; - - /// < A2DP(Advanced Audio Distribution Profile) Sink role - static const int BT_AUDIO_PROFILE_TYPE_A2DP_SINK = 4; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE -/// @brief Enumerations for the call handling event. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_ag_call_handling_event_e { - /// < Request to answer an incoming call - static const int BT_AG_CALL_HANDLING_EVENT_ANSWER = 0; - - /// < Request to release a call - static const int BT_AG_CALL_HANDLING_EVENT_RELEASE = 1; - - /// < Request to reject an incoming call - static const int BT_AG_CALL_HANDLING_EVENT_REJECT = 2; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE -/// @brief Enumerations for the multi call handling event. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_ag_multi_call_handling_event_e { - /// < Request to release held calls - static const int BT_AG_MULTI_CALL_HANDLING_EVENT_RELEASE_HELD_CALLS = 0; - - /// < Request to release active calls - static const int BT_AG_MULTI_CALL_HANDLING_EVENT_RELEASE_ACTIVE_CALLS = 1; - - /// < Request to put active calls into hold state and activate another (held or waiting) call - static const int BT_AG_MULTI_CALL_HANDLING_EVENT_ACTIVATE_HELD_CALL = 2; - - /// < Request to add a held call to the conversation - static const int BT_AG_MULTI_CALL_HANDLING_EVENT_MERGE_CALLS = 3; - - /// < Request to let a user who has two calls to connect these two calls together and release its connections to both other parties - static const int BT_AG_MULTI_CALL_HANDLING_EVENT_EXPLICIT_CALL_TRANSFER = 4; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE -/// @brief Enumerations for the equalizer state. -/// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif -abstract class bt_avrcp_equalizer_state_e { - /// < Equalizer Off - static const int BT_AVRCP_EQUALIZER_STATE_OFF = 1; - - /// < Equalizer On - static const int BT_AVRCP_EQUALIZER_STATE_ON = 2; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE -/// @brief Enumerations for the repeat mode. -/// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif -abstract class bt_avrcp_repeat_mode_e { - /// < Repeat Off - static const int BT_AVRCP_REPEAT_MODE_OFF = 1; - - /// < Single track repeat - static const int BT_AVRCP_REPEAT_MODE_SINGLE_TRACK = 2; - - /// < All track repeat - static const int BT_AVRCP_REPEAT_MODE_ALL_TRACK = 3; - - /// < Group repeat - static const int BT_AVRCP_REPEAT_MODE_GROUP = 4; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE -/// @brief Enumerations for the shuffle mode. -/// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif -abstract class bt_avrcp_shuffle_mode_e { - /// < Shuffle Off - static const int BT_AVRCP_SHUFFLE_MODE_OFF = 1; - - /// < All tracks shuffle - static const int BT_AVRCP_SHUFFLE_MODE_ALL_TRACK = 2; - - /// < Group shuffle - static const int BT_AVRCP_SHUFFLE_MODE_GROUP = 3; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE -/// @brief Enumerations for the scan mode. -/// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif -abstract class bt_avrcp_scan_mode_e { - /// < Scan Off - static const int BT_AVRCP_SCAN_MODE_OFF = 1; - - /// < All tracks scan - static const int BT_AVRCP_SCAN_MODE_ALL_TRACK = 2; - - /// < Group scan - static const int BT_AVRCP_SCAN_MODE_GROUP = 3; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE -/// @brief Enumerations for the player state. -/// @since_tizen 3.0 -abstract class bt_avrcp_player_state_e { - /// < Stopped - static const int BT_AVRCP_PLAYER_STATE_STOPPED = 0; - - /// < Playing - static const int BT_AVRCP_PLAYER_STATE_PLAYING = 1; - - /// < Paused - static const int BT_AVRCP_PLAYER_STATE_PAUSED = 2; - - /// < Seek Forward - static const int BT_AVRCP_PLAYER_STATE_FORWARD_SEEK = 3; - - /// < Seek Rewind - static const int BT_AVRCP_PLAYER_STATE_REWIND_SEEK = 4; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE -/// @brief Enumeration for the player control commands. -/// @since_tizen 3.0 -abstract class bt_avrcp_player_command_e { - /// < Play - static const int BT_AVRCP_CONTROL_PLAY = 1; - - /// < Pause - static const int BT_AVRCP_CONTROL_PAUSE = 2; - - /// < Stop - static const int BT_AVRCP_CONTROL_STOP = 3; - - /// < Next Track - static const int BT_AVRCP_CONTROL_NEXT = 4; - - /// < Previous track - static const int BT_AVRCP_CONTROL_PREVIOUS = 5; - - /// < Fast Forward - static const int BT_AVRCP_CONTROL_FAST_FORWARD = 6; - - /// < Rewind - static const int BT_AVRCP_CONTROL_REWIND = 7; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE -/// @brief Structure of Track metadata information. -/// @since_tizen 3.0 -/// -/// @see #bt_class_s -final class bt_avrcp_metadata_attributes_info_s extends ffi.Struct { - /// < Title - external ffi.Pointer title; - - /// < Artist - external ffi.Pointer artist; - - /// < Album name - external ffi.Pointer album; - - /// < Album Genre - external ffi.Pointer genre; - - /// < The total number of tracks - @ffi.UnsignedInt() - external int total_tracks; - - /// < Track number - @ffi.UnsignedInt() - external int number; - - /// < Duration - @ffi.UnsignedInt() - external int duration; -} - -/// @deprecated Deprecated since 5.0. -/// @ingroup CAPI_NETWORK_BLUETOOTH_HDP_MODULE -/// @brief Enumerations for the data channel type. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @remarks Deprecated, because of no usecase and supported devices. -abstract class bt_hdp_channel_type_e { - /// < Reliable Data Channel - static const int BT_HDP_CHANNEL_TYPE_RELIABLE = 1; - - /// < Streaming Data Channel - static const int BT_HDP_CHANNEL_TYPE_STREAMING = 2; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE -/// @brief Enumerations of the integer type for GATT handle's value. -/// @since_tizen 2.3.1 -abstract class bt_data_type_int_e { - /// < 8 bit signed int type - static const int BT_DATA_TYPE_SINT8 = 0; - - /// < 16 bit signed int type - static const int BT_DATA_TYPE_SINT16 = 1; - - /// < 32 bit signed int type - static const int BT_DATA_TYPE_SINT32 = 2; - - /// < 8 bit unsigned int type - static const int BT_DATA_TYPE_UINT8 = 3; - - /// < 16 bit unsigned int type - static const int BT_DATA_TYPE_UINT16 = 4; - - /// < 32 bit unsigned int type - static const int BT_DATA_TYPE_UINT32 = 5; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE -/// @brief Enumerations of the float type for GATT handle's value. -/// @since_tizen 2.3.1 -abstract class bt_data_type_float_e { - /// < 32 bit float type - static const int BT_DATA_TYPE_FLOAT = 0; - - /// < 16 bit float type - static const int BT_DATA_TYPE_SFLOAT = 1; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE -/// @brief Enumerations of the write type. -/// @since_tizen 2.3.1 -abstract class bt_gatt_write_type_e { - /// < Write without response type - static const int BT_GATT_WRITE_TYPE_WRITE_NO_RESPONSE = 0; - - /// < Write type - static const int BT_GATT_WRITE_TYPE_WRITE = 1; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE -/// @brief Enumerations of the GATT handle's type. -/// @since_tizen 2.3.1 -abstract class bt_gatt_type_e { - /// < GATT service type - static const int BT_GATT_TYPE_SERVICE = 1; - - /// < GATT characteristic type - static const int BT_GATT_TYPE_CHARACTERISTIC = 2; - - /// < GATT descriptor type - static const int BT_GATT_TYPE_DESCRIPTOR = 3; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE -/// @brief Enumerations of the service type. -/// @since_tizen 2.3.1 -abstract class bt_gatt_service_type_e { - /// < GATT primary service type - static const int BT_GATT_SERVICE_TYPE_PRIMARY = 1; - - /// < GATT secondary service type - static const int BT_GATT_SERVICE_TYPE_SECONDARY = 2; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE -/// @brief Enumerations of the characteristic's property. -/// @since_tizen 2.3.1 -abstract class bt_gatt_property_e { - /// < Broadcast property - static const int BT_GATT_PROPERTY_BROADCAST = 1; - - /// < Read property - static const int BT_GATT_PROPERTY_READ = 2; - - /// < Write without response property - static const int BT_GATT_PROPERTY_WRITE_WITHOUT_RESPONSE = 4; - - /// < Write property - static const int BT_GATT_PROPERTY_WRITE = 8; - - /// < Notify property - static const int BT_GATT_PROPERTY_NOTIFY = 16; - - /// < Indicate property - static const int BT_GATT_PROPERTY_INDICATE = 32; - - /// < Authenticated signed writes property - static const int BT_GATT_PROPERTY_AUTHENTICATED_SIGNED_WRITES = 64; - - /// < Extended properties - static const int BT_GATT_PROPERTY_EXTENDED_PROPERTIES = 128; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE -/// @brief Enumerations of gatt server's service changing mode. -/// @since_tizen 3.0 -abstract class bt_gatt_client_service_change_type_e { - /// < Service added - static const int BT_GATT_CLIENT_SERVICE_ADDED = 0; - - /// < Service removed - static const int BT_GATT_CLIENT_SERVICE_REMOVED = 1; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE -/// @brief Enumerations of the attribute's permission. -/// @since_tizen 3.0 -abstract class bt_gatt_permission_e { - /// < Readable permission - static const int BT_GATT_PERMISSION_READ = 1; - - /// < Writable permission - static const int BT_GATT_PERMISSION_WRITE = 2; - - /// < Readable permission required encryption - static const int BT_GATT_PERMISSION_ENCRYPT_READ = 4; - - /// < Writable permission required encryption - static const int BT_GATT_PERMISSION_ENCRYPT_WRITE = 8; - - /// < Readable permission required encryption and authentication - static const int BT_GATT_PERMISSION_ENCRYPT_AUTHENTICATED_READ = 16; - - /// < Writable permission required encryption and authentication - static const int BT_GATT_PERMISSION_ENCRYPT_AUTHENTICATED_WRITE = 32; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE -/// @brief Enumerations of the remote device request types for attributes. -/// @since_tizen 3.0 -abstract class bt_gatt_att_request_type_e { - /// < Read Requested - static const int BT_GATT_REQUEST_TYPE_READ = 0; - - /// < Write Requested - static const int BT_GATT_REQUEST_TYPE_WRITE = 1; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_PAN_PANU_MODULE -/// @brief Enumerations for the types of PAN (Personal Area Networking) service. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class bt_panu_service_type_e { - /// < Network Access Point - static const int BT_PANU_SERVICE_TYPE_NAP = 0; -} - -/// @WEARABLE_ONLY -/// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE -/// @brief Enumeration of address book location for PBAP. -/// @since_tizen 3.0 -abstract class bt_pbap_address_book_source_e { - /// < Request for Addressbook from remote device - static const int BT_PBAP_SOURCE_DEVICE = 0; - - /// < Request for address book from SIM - static const int BT_PBAP_SOURCE_SIM = 1; -} - -/// @WEARABLE_ONLY -/// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE -/// @brief Enumeration of folder type. -/// @since_tizen 3.0 -abstract class bt_pbap_folder_type_e { - /// < Request for address book - static const int BT_PBAP_FOLDER_PHONE_BOOK = 0; - - /// < Request for incoming calls - static const int BT_PBAP_FOLDER_INCOMING = 1; - - /// < Request for outgoing calls - static const int BT_PBAP_FOLDER_OUTGOING = 2; - - /// < Request for missed calls - static const int BT_PBAP_FOLDER_MISSED = 3; - - /// < Request for combined calls - static const int BT_PBAP_FOLDER_COMBINED = 4; -} - -/// @WEARABLE_ONLY -/// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE -/// @brief Enumeration of phone book search fields. -/// @since_tizen 3.0 -abstract class bt_pbap_search_field_e { - /// < Request for search by name (default) - static const int BT_PBAP_SEARCH_NAME = 0; - - /// < Request for search by phone number - static const int BT_PBAP_SEARCH_NUMBER = 1; - - /// < Request for search by sound - static const int BT_PBAP_SEARCH_SOUND = 2; -} - -/// @WEARABLE_ONLY -/// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE -/// @brief Enumeration of vCard Formats. -/// @since_tizen 3.0 -abstract class bt_pbap_vcard_format_e { - /// < vCard format 2.1 (default) - static const int BT_PBAP_VCARD_FORMAT_VCARD21 = 0; - - /// < vCard format 3.0 - static const int BT_PBAP_VCARD_FORMAT_VCARD30 = 1; -} - -/// @WEARABLE_ONLY -/// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE -/// @brief Enumeration of sorting orders. -/// @since_tizen 3.0 -abstract class bt_pbap_sort_order_e { - /// < Filter order indexed (default) - static const int BT_PBAP_ORDER_INDEXED = 0; - - /// < Filter order alphanumeric - static const int BT_PBAP_ORDER_ALPHANUMERIC = 1; - - /// < Filter order phonetic - static const int BT_PBAP_ORDER_PHONETIC = 2; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Class structure of device and service. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @see #bt_device_info_s -/// @see #bt_adapter_device_discovery_info_s -/// @see bt_device_bond_created_cb() -/// @see bt_adapter_device_discovery_state_changed_cb() -final class bt_class_s extends ffi.Struct { - /// < Major device class. - @ffi.Int32() - external int major_device_class; - - /// < Minor device class. - @ffi.Int32() - external int minor_device_class; - - /// < Major service class mask. - /// This value can be a combination of #bt_major_service_class_e like #BT_MAJOR_SERVICE_CLASS_RENDERING | #BT_MAJOR_SERVICE_CLASS_AUDIO - @ffi.Int() - external int major_service_class_mask; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE -/// @brief Structure of device discovery information. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @see #bt_class_s -/// @see bt_adapter_device_discovery_state_changed_cb() -final class bt_adapter_device_discovery_info_s extends ffi.Struct { - /// < The address of remote device - external ffi.Pointer remote_address; - - /// < The name of remote device - external ffi.Pointer remote_name; - - /// < The Bluetooth classes - external bt_class_s bt_class; - - /// < The strength indicator of received signal - @ffi.Int() - external int rssi; - - /// < The bonding state - @ffi.Bool() - external bool is_bonded; - - /// < The UUID list of service - external ffi.Pointer> service_uuid; - - /// < The number of services - @ffi.Int() - external int service_count; - - /// < The Bluetooth appearance - @ffi.Int32() - external int appearance; - - /// < manufacturer specific data length - @ffi.Int() - external int manufacturer_data_len; - - /// < manufacturer specific data - external ffi.Pointer manufacturer_data; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief Structure of le scan result information. -/// @since_tizen 2.3.1 -/// -/// @see bt_adapter_le_start_scan() -final class bt_adapter_le_device_scan_result_info_s extends ffi.Struct { - /// < The address of remote device - external ffi.Pointer remote_address; - - /// < The address type of remote device - @ffi.Int32() - external int address_type; - - /// < The strength indicator of received signal - @ffi.Int() - external int rssi; - - /// < advertising indication data length - @ffi.Int() - external int adv_data_len; - - /// < advertising indication data - external ffi.Pointer adv_data; - - /// < scan response data length - @ffi.Int() - external int scan_data_len; - - /// < scan response data - external ffi.Pointer scan_data; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief The structure for LE iBeacon scan result information. -/// @since_tizen 4.0 -/// -/// @see bt_adapter_le_start_scan() -final class bt_adapter_le_ibeacon_scan_result_info_s extends ffi.Struct { - /// < Company ID - @ffi.Int() - external int company_id; - - /// < iBeacon type - @ffi.Int() - external int ibeacon_type; - - /// < UUID - external ffi.Pointer uuid; - - /// < Major ID - @ffi.Int() - external int major_id; - - /// < Minor ID - @ffi.Int() - external int minor_id; - - /// < Measured power - @ffi.Int() - external int measured_power; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief LE service data structure. -/// @since_tizen 2.3.1 -/// -/// @see bt_adapter_le_get_scan_result_service_data() -final class bt_adapter_le_service_data_s extends ffi.Struct { - /// < 16 bit UUID of the service data - external ffi.Pointer service_uuid; - - /// < Service data - external ffi.Pointer service_data; - - /// < Service data length - @ffi.Int() - external int service_data_len; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Device information structure used for identifying pear device. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @see #bt_class_s -/// @see bt_device_bond_created_cb() -final class bt_device_info_s extends ffi.Struct { - /// < The address of remote device - external ffi.Pointer remote_address; - - /// < The name of remote device - external ffi.Pointer remote_name; - - /// < The Bluetooth classes - external bt_class_s bt_class; - - /// < The UUID list of service - external ffi.Pointer> service_uuid; - - /// < The number of services - @ffi.Int() - external int service_count; - - /// < The bonding state - @ffi.Bool() - external bool is_bonded; - - /// < The connection state - @ffi.Bool() - external bool is_connected; - - /// < The authorization state - @ffi.Bool() - external bool is_authorized; - - /// < manufacturer specific data length - @ffi.Int() - external int manufacturer_data_len; - - /// < manufacturer specific data - external ffi.Pointer manufacturer_data; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Service Discovery Protocol (SDP) data structure. -/// -/// @details This protocol is used for discovering available services or pear device, -/// and finding one to connect with. -/// -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @see bt_device_service_searched_cb() -final class bt_device_sdp_info_s extends ffi.Struct { - /// < The address of remote device - external ffi.Pointer remote_address; - - /// < The UUID list of service - external ffi.Pointer> service_uuid; - - /// < The number of services. - @ffi.Int() - external int service_count; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Device connection information structure. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @see bt_device_connection_state_changed_cb() -final class bt_device_connection_info_s extends ffi.Struct { - /// < The address of remote device - external ffi.Pointer remote_address; - - /// < Link type - @ffi.Int32() - external int link; - - /// < Disconnection reason - @ffi.Int32() - external int disconn_reason; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE -/// @brief Rfcomm connection data used for exchanging data between Bluetooth devices. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @see bt_socket_connection_state_changed_cb() -final class bt_socket_connection_s extends ffi.Struct { - /// < The file descriptor of connected socket - @ffi.Int() - external int socket_fd; - - /// < The file descriptor of the server socket or -1 for client connection - @ffi.Int() - external int server_fd; - - /// < The local device role in this connection - @ffi.Int32() - external int local_role; - - /// < The remote device address - external ffi.Pointer remote_address; - - /// < The service UUId - external ffi.Pointer service_uuid; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE -/// @brief Structure of RFCOMM received data. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @remarks User can use standard linux functions for reading/writing \n -/// data from/to sockets. -/// -/// @see bt_socket_data_received_cb() -final class bt_socket_received_data_s extends ffi.Struct { - /// < The socket fd - @ffi.Int() - external int socket_fd; - - /// < The length of the received data - @ffi.Int() - external int data_size; - - /// < The received data - external ffi.Pointer data; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE -/// @brief Attribute protocol MTU change information structure. -/// @since_tizen 4.0 -/// -/// @see bt_gatt_client_att_mtu_changed_cb() -final class bt_gatt_client_att_mtu_info_s extends ffi.Struct { - /// < The address of remote device - external ffi.Pointer remote_address; - - /// < MTU value - @ffi.UnsignedInt() - external int mtu; - - /// < Request status - @ffi.UnsignedInt() - external int status; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE -/// @brief Enumerations of the Bluetooth HID mouse's button. -/// @since_tizen @if WEARABLE 3.0 @endif -abstract class bt_hid_mouse_button_e { - /// key; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE -/// @brief Enumerations of the Bluetooth HID header type. -/// @since_tizen @if WEARABLE 3.0 @endif -abstract class bt_hid_header_type_e { - /// < The Bluetooth HID header type: Handshake - static const int BT_HID_HEADER_HANDSHAKE = 0; - - /// < The Bluetooth HID header type: HID control - static const int BT_HID_HEADER_HID_CONTROL = 1; - - /// < The Bluetooth HID header type: Get report - static const int BT_HID_HEADER_GET_REPORT = 2; - - /// < The Bluetooth HID header type: Set report - static const int BT_HID_HEADER_SET_REPORT = 3; - - /// < The Bluetooth HID header type: Get protocol - static const int BT_HID_HEADER_GET_PROTOCOL = 4; - - /// < The Bluetooth HID header type: Set protocol - static const int BT_HID_HEADER_SET_PROTOCOL = 5; - - /// < The Bluetooth HID header type: Data - static const int BT_HID_HEADER_DATA = 6; - - /// < The Bluetooth HID header type: Unknown - static const int BT_HID_HEADER_UNKNOWN = 7; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE -/// @brief Enumerations of the Bluetooth HID parameter type. -/// @since_tizen @if WEARABLE 3.0 @endif -abstract class bt_hid_param_type_e { - /// < Parameter type: Input - static const int BT_HID_PARAM_DATA_RTYPE_INPUT = 0; - - /// < Parameter type: Output - static const int BT_HID_PARAM_DATA_RTYPE_OUTPUT = 1; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE -/// @brief Enumerations of the Bluetooth HID handshake type. -/// @since_tizen @if WEARABLE 3.0 @endif -abstract class bt_hid_handshake_type_e { - /// < Handshake error code none - static const int BT_HID_HANDSHAKE_SUCCESSFUL = 0; - - /// < Handshake error code Not Ready - static const int BT_HID_HANDSHAKE_NOT_READY = 1; - - /// < Handshake error code send invalid report id - static const int BT_HID_HANDSHAKE_ERR_INVALID_REPORT_ID = 2; - - /// < Handshake error code request unsupported request - static const int BT_HID_HANDSHAKE_ERR_UNSUPPORTED_REQUEST = 3; - - /// < Handshake error code received invalid parameter - static const int BT_HID_HANDSHAKE_ERR_INVALID_PARAMETER = 4; - - /// < unknown error - static const int BT_HID_HANDSHAKE_ERR_UNKNOWN = 14; - - /// < Fatal error - static const int BT_HID_HANDSHAKE_ERR_FATAL = 15; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE -/// @brief The structure type containing data received from the HID Host. -/// @since_tizen @if WEARABLE 3.0 @endif -final class bt_hid_device_received_data_s extends ffi.Struct { - /// < The remote device's address - external ffi.Pointer address; - - /// < The header type - @ffi.Int32() - external int header_type; - - /// < The parameter type - @ffi.Int32() - external int param_type; - - /// < The length of the received data - @ffi.Int() - external int data_size; - - /// < The received data - external ffi.Pointer data; -} - -/// @WEARABLE_ONLY -/// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE -/// @brief The structure type containing vCard information. -/// @since_tizen 3.0 -/// -/// @see bt_pbap_client_pull_vcard() -final class bt_pbap_vcard_info_s extends ffi.Struct { - /// < The vcard index, used as a parameter for bt_pbap_client_pull_vcard() - @ffi.Int() - external int index; - - /// < The contact name of the vCard - external ffi.Pointer contact_name; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief Enumeration for the scan filter type. -/// @since_tizen 4.0 -/// @see bt_adapter_le_scan_filter_set_type() -abstract class bt_adapter_le_scan_filter_type_e { - /// < iBeacon filter type - static const int BT_ADAPTER_LE_SCAN_FILTER_TYPE_IBEACON = 0; - - /// < Proximity UUID filter type - static const int BT_ADAPTER_LE_SCAN_FILTER_TYPE_PROXIMITY_UUID = 1; -} - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE -/// @brief Called when you get bonded devices repeatedly. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] device_info The bonded device information -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// \n @c false to break out of the loop. -/// @pre bt_adapter_foreach_bonded_device() will invoke this function. -/// -/// @see bt_adapter_foreach_bonded_device() -typedef bt_adapter_bonded_device_cb - = ffi.Pointer>; -typedef bt_adapter_bonded_device_cbFunction = ffi.Bool Function( - ffi.Pointer device_info, ffi.Pointer user_data); -typedef Dartbt_adapter_bonded_device_cbFunction = bool Function( - ffi.Pointer device_info, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE -/// @brief Called when the Bluetooth adapter state changes. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] result The result of the adapter state changing -/// @param[in] adapter_state The adapter state to be changed -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_adapter_set_state_changed_cb() -/// @see bt_adapter_unset_state_changed_cb() -typedef bt_adapter_state_changed_cb - = ffi.Pointer>; -typedef bt_adapter_state_changed_cbFunction = ffi.Void Function( - ffi.Int result, ffi.Int32 adapter_state, ffi.Pointer user_data); -typedef Dartbt_adapter_state_changed_cbFunction = void Function( - int result, int adapter_state, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE -/// @brief Called when adapter name changes. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] device_name The name of the Bluetooth device to be changed -/// @param[in] user_data The user data passed from the callback registration function -/// @pre This function will be invoked when the name of Bluetooth adapter changes -/// if you register this callback using bt_adapter_set_name_changed_cb(). -/// @see bt_adapter_set_name() -/// @see bt_adapter_set_name_changed_cb() -/// @see bt_adapter_unset_name_changed_cb() -typedef bt_adapter_name_changed_cb - = ffi.Pointer>; -typedef bt_adapter_name_changed_cbFunction = ffi.Void Function( - ffi.Pointer device_name, ffi.Pointer user_data); -typedef Dartbt_adapter_name_changed_cbFunction = void Function( - ffi.Pointer device_name, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE -/// @brief Called when the visibility mode changes. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] result The result of the visibility mode changing -/// @param[in] visibility_mode The visibility mode to be changed -/// @param[in] user_data The user data passed from the callback registration function -/// -/// @pre This function will be invoked when the visibility of Bluetooth adapter changes -/// if you register this callback using bt_adapter_set_visibility_mode_changed_cb(). -/// -/// @see bt_adapter_set_visibility_mode_changed_cb() -/// @see bt_adapter_unset_visibility_mode_changed_cb() -typedef bt_adapter_visibility_mode_changed_cb = ffi - .Pointer>; -typedef bt_adapter_visibility_mode_changed_cbFunction = ffi.Void Function( - ffi.Int result, ffi.Int32 visibility_mode, ffi.Pointer user_data); -typedef Dartbt_adapter_visibility_mode_changed_cbFunction = void Function( - int result, int visibility_mode, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE -/// @brief Called every second until the visibility mode is changed to #BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @remarks This callback function is called only if visibility mode is #BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE. -/// @param[in] duration The duration until the visibility mode is changed to #BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE (in seconds) -/// @param[in] user_data The user data passed from the callback registration function -/// @pre This function will be invoked if you register this callback using bt_adapter_set_visibility_duration_changed_cb(). -/// @see bt_adapter_set_visibility_duration_changed_cb() -/// @see bt_adapter_unset_visibility_duration_changed_cb() -typedef bt_adapter_visibility_duration_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef bt_adapter_visibility_duration_changed_cbFunction = ffi.Void Function( - ffi.Int duration, ffi.Pointer user_data); -typedef Dartbt_adapter_visibility_duration_changed_cbFunction = void Function( - int duration, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE -/// @brief Called when the state of device discovery changes. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @remarks If \a discovery_state is #BT_ADAPTER_DEVICE_DISCOVERY_FOUND, \n -/// then you can get some information, such as remote device address, remote device name, rssi, and bonding state. -/// -/// @param[in] result The result of the device discovery -/// @param[in] discovery_state The discovery state to be changed -/// @param[in] discovery_info The information of the discovered device \n -/// If \a discovery_state is #BT_ADAPTER_DEVICE_DISCOVERY_STARTED or -/// #BT_ADAPTER_DEVICE_DISCOVERY_FINISHED, then \a discovery_info is NULL. -/// @param[in] user_data The user data passed from the callback registration function -/// -/// @pre Either bt_adapter_start_device_discovery() or bt_adapter_stop_device_discovery() will invoke this function -/// if you register this callback using bt_adapter_set_device_discovery_state_changed_cb(). -/// -/// @see bt_adapter_start_device_discovery() -/// @see bt_adapter_stop_device_discovery() -/// @see bt_adapter_set_device_discovery_state_changed_cb() -/// @see bt_adapter_unset_device_discovery_state_changed_cb() -typedef bt_adapter_device_discovery_state_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef bt_adapter_device_discovery_state_changed_cbFunction - = ffi.Void Function( - ffi.Int result, - ffi.Int32 discovery_state, - ffi.Pointer discovery_info, - ffi.Pointer user_data); -typedef Dartbt_adapter_device_discovery_state_changed_cbFunction - = void Function( - int result, - int discovery_state, - ffi.Pointer discovery_info, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief Called when the LE advertisement has been found. -/// @since_tizen 2.3.1 -/// -/// @param[in] result The result of the LE scan -/// @param[in] info The information of the found LE advertisement. -/// @param[in] user_data The user data passed from the start function -/// -/// @see bt_adapter_le_start_scan() -typedef bt_adapter_le_scan_result_cb - = ffi.Pointer>; -typedef bt_adapter_le_scan_result_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Pointer info, - ffi.Pointer user_data); -typedef Dartbt_adapter_le_scan_result_cbFunction = void Function( - int result, - ffi.Pointer info, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief The handle to control Bluetooth LE advertising. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -typedef bt_advertiser_h = ffi.Pointer; - -/// @ingroup CAPI_NETWORK_BLUETOOTH_IPSP_MODULE -/// @brief Called when the IPSP initialization state changes. -/// @since_tizen 4.0 -/// @param[in] result The result of the initialization or deinitialization request -/// @param[in] ipsp_initialized The initialized state: (@c true = initialized, @c false = deinitialized) -/// @param[in] user_data The user data passed from the initialization request function -/// @see bt_ipsp_initialize() -/// @see bt_ipsp_deinitialize() -typedef bt_ipsp_init_state_changed_cb - = ffi.Pointer>; -typedef bt_ipsp_init_state_changed_cbFunction = ffi.Void Function( - ffi.Int result, ffi.Bool ipsp_initialized, ffi.Pointer user_data); -typedef Dartbt_ipsp_init_state_changed_cbFunction = void Function( - int result, bool ipsp_initialized, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_IPSP_MODULE -/// @brief Called when the IPSP connection state changes. -/// @since_tizen 4.0 -/// @param[in] result The result of the connection or disconnection request -/// @param[in] connected The connection status: (@c true = connected, @c false = disconnected) -/// @param[in] remote_address Address of remote device -/// @param[in] iface_name The network interface name for IPv6 network interface -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_ipsp_connect() -/// @see bt_ipsp_disconnect() -typedef bt_ipsp_connection_state_changed_cb = ffi - .Pointer>; -typedef bt_ipsp_connection_state_changed_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Bool connected, - ffi.Pointer remote_address, - ffi.Pointer iface_name, - ffi.Pointer user_data); -typedef Dartbt_ipsp_connection_state_changed_cbFunction = void Function( - int result, - bool connected, - ffi.Pointer remote_address, - ffi.Pointer iface_name, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief Called when the state of advertiser changes. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[out] result The result of the requested state change of advertiser -/// @param[out] advertiser The handle of the state changed advertiser -/// @param[out] adv_state The advertiser state to be changed -/// @param[out] user_data The user data passed from the start function -/// -/// @see bt_adapter_le_start_advertising_new() -/// @see bt_adapter_le_stop_advertising() -typedef bt_adapter_le_advertising_state_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef bt_adapter_le_advertising_state_changed_cbFunction = ffi.Void Function( - ffi.Int result, - bt_advertiser_h advertiser, - ffi.Int32 adv_state, - ffi.Pointer user_data); -typedef Dartbt_adapter_le_advertising_state_changed_cbFunction = void Function( - int result, - bt_advertiser_h advertiser, - int adv_state, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Called when you get connected profiles repeatedly. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] profile The connected Bluetooth profile -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// \n @c false to break out of the loop. -/// @pre bt_device_foreach_connected_profiles() will invoke this function. -/// @see bt_device_foreach_connected_profiles() -typedef bt_device_connected_profile - = ffi.Pointer>; -typedef bt_device_connected_profileFunction = ffi.Bool Function( - ffi.Int32 profile, ffi.Pointer user_data); -typedef Dartbt_device_connected_profileFunction = bool Function( - int profile, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Called when the process of creating bond finishes. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @remarks If the remote user does not respond within 60 seconds, a time out will happen with #BT_ERROR_TIMED_OUT result code. \n -/// If bt_device_cancel_bonding() is called and it returns #BT_ERROR_NONE, then this callback function will be called \n -/// with #BT_ERROR_CANCELLED result. \n -/// If creating a bond succeeds but service search fails, then this callback will be called with #BT_ERROR_SERVICE_SEARCH_FAILED. \n -/// In this case, you should try service search again by bt_device_start_service_search() to get the supported service list. -/// -/// @param[in] result The result of the bonding device -/// @param[in] device_info The device information which you creates bond with -/// @param[in] user_data The user data passed from the callback registration function -/// -/// @pre Either bt_device_create_bond() will invoke this function -/// if you register this callback using bt_device_set_bond_created_cb(). -/// -/// @see bt_device_create_bond() -/// @see bt_device_cancel_bonding() -/// @see bt_device_set_bond_created_cb() -/// @see bt_device_unset_bond_created_cb() -typedef bt_device_bond_created_cb - = ffi.Pointer>; -typedef bt_device_bond_created_cbFunction = ffi.Void Function(ffi.Int result, - ffi.Pointer device_info, ffi.Pointer user_data); -typedef Dartbt_device_bond_created_cbFunction = void Function(int result, - ffi.Pointer device_info, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Called when the bond destroys. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] result The result that a bond is destroyed -/// @param[in] remote_address The address of the remote Bluetooth device to destroy bond with -/// @param[in] user_data The user data passed from the callback registration function -/// @pre bt_device_destroy_bond() will invoke this function -/// if you register this callback using bt_device_set_bond_destroyed_cb(). -/// -/// @see bt_device_destroy_bond() -/// @see bt_device_set_bond_destroyed_cb() -/// @see bt_device_unset_bond_destroyed_cb() -typedef bt_device_bond_destroyed_cb - = ffi.Pointer>; -typedef bt_device_bond_destroyed_cbFunction = ffi.Void Function(ffi.Int result, - ffi.Pointer remote_address, ffi.Pointer user_data); -typedef Dartbt_device_bond_destroyed_cbFunction = void Function(int result, - ffi.Pointer remote_address, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Called when the authorization of device changes. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] authorization The authorization of device -/// @param[in] remote_address The address of the remote Bluetooth device which is (un)authorized -/// @param[in] user_data The user data passed from the callback registration function -/// @pre bt_device_set_authorization() will invoke this function if you register this callback using bt_device_set_authorization_changed_cb(). -/// -/// @see bt_device_set_authorization() -/// @see #bt_device_set_authorization_changed_cb() -/// @see #bt_device_unset_authorization_changed_cb() -typedef bt_device_authorization_changed_cb = ffi - .Pointer>; -typedef bt_device_authorization_changed_cbFunction = ffi.Void Function( - ffi.Int32 authorization, - ffi.Pointer remote_address, - ffi.Pointer user_data); -typedef Dartbt_device_authorization_changed_cbFunction = void Function( - int authorization, - ffi.Pointer remote_address, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Called when the process of service search finishes. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] result The result of the service searching -/// @param[in] sdp_info The structure of service lists found on a device -/// @param[in] user_data The user data passed from the callback registration function -/// @pre Either bt_device_start_service_search() will invoke this function -/// if you register this callback using bt_device_set_service_searched_cb(). -/// -/// @see bt_device_start_service_search() -/// @see bt_device_set_service_searched_cb() -/// @see bt_device_unset_service_searched_cb() -typedef bt_device_service_searched_cb - = ffi.Pointer>; -typedef bt_device_service_searched_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Pointer sdp_info, - ffi.Pointer user_data); -typedef Dartbt_device_service_searched_cbFunction = void Function( - int result, - ffi.Pointer sdp_info, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_DEVICE_MODULE -/// @brief Called when the connection state is changed. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] connected The connection status: (@c true = connected, @c false = disconnected) -/// @param[in] conn_info The connection information -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_device_set_connection_state_changed_cb() -/// @see bt_device_unset_connection_state_changed_cb() -typedef bt_device_connection_state_changed_cb = ffi - .Pointer>; -typedef bt_device_connection_state_changed_cbFunction = ffi.Void Function( - ffi.Bool connected, - ffi.Pointer conn_info, - ffi.Pointer user_data); -typedef Dartbt_device_connection_state_changed_cbFunction = void Function( - bool connected, - ffi.Pointer conn_info, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE -/// @brief Called when you receive data. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] data The received data from the remote device -/// @param[in] user_data The user data passed from the callback registration function -/// -/// @pre When the connected remote Bluetooth device invokes bt_socket_send_data(), -/// this function will be invoked if you register this function using bt_socket_set_data_received_cb(). -/// -/// @see bt_socket_set_data_received_cb() -/// @see bt_socket_unset_data_received_cb() -/// @see bt_socket_send_data() -typedef bt_socket_data_received_cb - = ffi.Pointer>; -typedef bt_socket_data_received_cbFunction = ffi.Void Function( - ffi.Pointer data, - ffi.Pointer user_data); -typedef Dartbt_socket_data_received_cbFunction = void Function( - ffi.Pointer data, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE -/// @brief Called when a RFCOMM connection is requested. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] socket_fd The file descriptor of socket on which a connection is requested -/// @param[in] remote_address The address of remote device -/// @param[in] user_data The user data passed from the callback registration function -/// @pre If you register this callback function by bt_socket_set_connection_requested_cb(), -/// bt_socket_connection_requested_cb() will be invoked. -typedef bt_socket_connection_requested_cb = ffi - .Pointer>; -typedef bt_socket_connection_requested_cbFunction = ffi.Void Function( - ffi.Int socket_fd, - ffi.Pointer remote_address, - ffi.Pointer user_data); -typedef Dartbt_socket_connection_requested_cbFunction = void Function( - int socket_fd, - ffi.Pointer remote_address, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_SOCKET_MODULE -/// @brief Called when the socket connection state changes. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] result The result of connection state changing -/// @param[in] connection_state The connection state -/// @param[in] connection The connection information which is established or disconnected -/// @param[in] user_data The user data passed from the callback registration function -/// @pre Either bt_socket_connect_rfcomm() will invoke this function. -/// In addition, bt_socket_connection_state_changed_cb() will be invoked when the socket connection state is changed. -/// @see bt_socket_listen_and_accept_rfcomm() -/// @see bt_socket_connect_rfcomm() -/// @see bt_socket_set_connection_state_changed_cb() -/// @see bt_socket_unset_connection_state_changed_cb() -typedef bt_socket_connection_state_changed_cb = ffi - .Pointer>; -typedef bt_socket_connection_state_changed_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Int32 connection_state, - ffi.Pointer connection, - ffi.Pointer user_data); -typedef Dartbt_socket_connection_state_changed_cbFunction = void Function( - int result, - int connection_state, - ffi.Pointer connection, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_SERVER_MODULE -/// @brief Called when an OPP connection is requested. -/// -/// @details You must call bt_opp_server_accept_connection() if you want to accept. -/// Otherwise, you must call bt_opp_server_reject_connection(). -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @param[in] remote_address The address of remote device -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_opp_server_accept() -/// @see bt_opp_server_reject() -typedef bt_opp_server_connection_requested_cb = ffi - .Pointer>; -typedef bt_opp_server_connection_requested_cbFunction = ffi.Void Function( - ffi.Pointer remote_address, ffi.Pointer user_data); -typedef Dartbt_opp_server_connection_requested_cbFunction = void Function( - ffi.Pointer remote_address, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_SERVER_MODULE -/// @brief Called when a file is being transferred. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] file The path of file to be pushed -/// @param[in] size The file size (bytes) -/// @param[in] percent The progress in percentage (1 ~ 100) -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_opp_server_accept() -/// @see bt_opp_server_accept_connection() -typedef bt_opp_server_transfer_progress_cb = ffi - .Pointer>; -typedef bt_opp_server_transfer_progress_cbFunction = ffi.Void Function( - ffi.Pointer file, - ffi.LongLong size, - ffi.Int percent, - ffi.Pointer user_data); -typedef Dartbt_opp_server_transfer_progress_cbFunction = void Function( - ffi.Pointer file, - int size, - int percent, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_SERVER_MODULE -/// @brief Called when a transfer is finished. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] result The result of push -/// @param[in] file The path of file to be pushed -/// @param[in] size The file size (bytes) -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_opp_server_accept() -/// @see bt_opp_server_accept_connection() -typedef bt_opp_server_transfer_finished_cb = ffi - .Pointer>; -typedef bt_opp_server_transfer_finished_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Pointer file, - ffi.LongLong size, - ffi.Pointer user_data); -typedef Dartbt_opp_server_transfer_finished_cbFunction = void Function( - int result, - ffi.Pointer file, - int size, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_CLIENT_MODULE -/// @brief Called when OPP server responds to the push request. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] result The result of OPP server response -/// @param[in] remote_address The remote address -/// @param[in] user_data The user data passed from the callback registration function -/// @pre bt_opp_client_push_files() will invoke this function. -/// @see bt_opp_client_push_files() -typedef bt_opp_client_push_responded_cb - = ffi.Pointer>; -typedef bt_opp_client_push_responded_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Pointer remote_address, - ffi.Pointer user_data); -typedef Dartbt_opp_client_push_responded_cbFunction = void Function(int result, - ffi.Pointer remote_address, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_CLIENT_MODULE -/// @brief Called when each file is being transferred. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] file The path of file to be pushed -/// @param[in] size The file size (bytes) -/// @param[in] percent The progress in percentage (1 ~ 100). 100 means that a file is transferred completely. -/// @param[in] user_data The user data passed from the callback registration function -/// @pre bt_opp_client_push_files() will invoke this function. -/// @see bt_opp_client_push_files() -typedef bt_opp_client_push_progress_cb - = ffi.Pointer>; -typedef bt_opp_client_push_progress_cbFunction = ffi.Void Function( - ffi.Pointer file, - ffi.LongLong size, - ffi.Int percent, - ffi.Pointer user_data); -typedef Dartbt_opp_client_push_progress_cbFunction = void Function( - ffi.Pointer file, - int size, - int percent, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_OPP_CLIENT_MODULE -/// @brief Called when the push request is finished. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] result The result of the push request -/// @param[in] remote_address The remote address -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_opp_client_push_files() -typedef bt_opp_client_push_finished_cb - = ffi.Pointer>; -typedef bt_opp_client_push_finished_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Pointer remote_address, - ffi.Pointer user_data); -typedef Dartbt_opp_client_push_finished_cbFunction = void Function(int result, - ffi.Pointer remote_address, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_HID_MODULE -/// @brief Called when the connection state is changed. -/// -/// @details This callback is called when the connection state is changed. -/// When you call bt_hid_host_connect() or bt_hid_host_disconnect(), this callback is also called with error result even though these functions fail. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @param[in] result The result of changing the connection state -/// @param[in] connected The state to be changed. true means connected state, Otherwise, false. -/// @param[in] remote_address The remote address -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_hid_host_connect() -/// @see bt_hid_host_disconnect() -typedef bt_hid_host_connection_state_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef bt_hid_host_connection_state_changed_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Bool connected, - ffi.Pointer remote_address, - ffi.Pointer user_data); -typedef Dartbt_hid_host_connection_state_changed_cbFunction = void Function( - int result, - bool connected, - ffi.Pointer remote_address, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE -/// @brief Called when the Bluetooth HID Device connection state changes. -/// @details The following error codes can be delivered: \n -/// #BT_ERROR_NONE \n -/// #BT_ERROR_OPERATION_FAILED \n -/// @since_tizen @if WEARABLE 3.0 @endif -/// -/// @param[in] result The result of changing the connection state. -/// @param[in] connected The requested state. true means the connection is enabled, false means the connection is disabled. -/// @param[in] remote_address The remote device's address -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_hid_device_activate() -typedef bt_hid_device_connection_state_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef bt_hid_device_connection_state_changed_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Bool connected, - ffi.Pointer remote_address, - ffi.Pointer user_data); -typedef Dartbt_hid_device_connection_state_changed_cbFunction = void Function( - int result, - bool connected, - ffi.Pointer remote_address, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_HID_DEVICE_MODULE -/// @brief Called when the HID Device receives data from the HID Host. -/// @details The following error codes can be delivered: \n -/// #BT_ERROR_NONE \n -/// #BT_ERROR_OPERATION_FAILED \n -/// @since_tizen @if WEARABLE 3.0 @endif -/// -/// @param[in] data The data received from the HID Host. -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_hid_device_set_data_received_cb() -typedef bt_hid_device_data_received_cb - = ffi.Pointer>; -typedef bt_hid_device_data_received_cbFunction = ffi.Void Function( - ffi.Pointer data, - ffi.Pointer user_data); -typedef Dartbt_hid_device_data_received_cbFunction = void Function( - ffi.Pointer data, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_MODULE -/// @brief Called when the connection state is changed. -/// -/// @details This callback is called when the connection state is changed. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// When you call bt_audio_connect() or bt_audio_disconnect(), this callback is also called with error result even though these functions fail. -/// @param[in] result The result of changing the connection state -/// @param[in] connected The state to be changed. true means connected state, Otherwise, false. -/// @param[in] remote_address The remote address -/// @param[in] type The type of audio profile except #BT_AUDIO_PROFILE_TYPE_ALL -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_audio_set_connection_state_changed_cb() -/// @see bt_audio_unset_connection_state_changed_cb() -typedef bt_audio_connection_state_changed_cb = ffi - .Pointer>; -typedef bt_audio_connection_state_changed_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Bool connected, - ffi.Pointer remote_address, - ffi.Int32 type, - ffi.Pointer user_data); -typedef Dartbt_audio_connection_state_changed_cbFunction = void Function( - int result, - bool connected, - ffi.Pointer remote_address, - int type, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE -/// @brief Called when the connection state is changed. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] connected The state to be changed. true means connected state, Otherwise, false. -/// @param[in] remote_address The remote address -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_avrcp_target_initialize() -/// @see bt_avrcp_target_deinitialize() -typedef bt_avrcp_target_connection_state_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef bt_avrcp_target_connection_state_changed_cbFunction = ffi.Void Function( - ffi.Bool connected, - ffi.Pointer remote_address, - ffi.Pointer user_data); -typedef Dartbt_avrcp_target_connection_state_changed_cbFunction = void Function( - bool connected, - ffi.Pointer remote_address, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE -/// @brief Called when the equalizer state is changed by the remote control device. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] equalizer The equalizer state -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_avrcp_set_equalizer_state_changed_cb() -/// @see bt_avrcp_unset_equalizer_state_changed_cb() -typedef bt_avrcp_equalizer_state_changed_cb = ffi - .Pointer>; -typedef bt_avrcp_equalizer_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 equalizer, ffi.Pointer user_data); -typedef Dartbt_avrcp_equalizer_state_changed_cbFunction = void Function( - int equalizer, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE -/// @brief Called when the repeat mode is changed by the remote control device. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] repeat The repeat mode -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_avrcp_set_repeat_mode_changed_cb() -/// @see bt_avrcp_unset_repeat_mode_changed_cb() -typedef bt_avrcp_repeat_mode_changed_cb - = ffi.Pointer>; -typedef bt_avrcp_repeat_mode_changed_cbFunction = ffi.Void Function( - ffi.Int32 repeat, ffi.Pointer user_data); -typedef Dartbt_avrcp_repeat_mode_changed_cbFunction = void Function( - int repeat, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE -/// @brief Called when the shuffle mode is changed by the remote control device. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] shuffle The shuffle mode -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_avrcp_set_shuffle_mode_changed_cb() -/// @see bt_avrcp_unset_shuffle_mode_changed_cb() -typedef bt_avrcp_shuffle_mode_changed_cb - = ffi.Pointer>; -typedef bt_avrcp_shuffle_mode_changed_cbFunction = ffi.Void Function( - ffi.Int32 shuffle, ffi.Pointer user_data); -typedef Dartbt_avrcp_shuffle_mode_changed_cbFunction = void Function( - int shuffle, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE -/// @brief Called when the scan mode is changed by the remote control device. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// -/// @param[in] scan The scan mode -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_avrcp_set_scan_mode_changed_cb() -/// @see bt_avrcp_unset_scan_mode_changed_cb() -typedef bt_avrcp_scan_mode_changed_cb - = ffi.Pointer>; -typedef bt_avrcp_scan_mode_changed_cbFunction = ffi.Void Function( - ffi.Int32 scan, ffi.Pointer user_data); -typedef Dartbt_avrcp_scan_mode_changed_cbFunction = void Function( - int scan, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE -/// @brief Called when the Song position mode is changed by the remote target device. -/// @since_tizen 3.0 -/// @param[in] position Playback position in milliseconds. When position is 0 it means the track is starting and when it's greater than or equal to track's duration the track has ended. -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_avrcp_set_position_changed_cb() -/// @see bt_avrcp_unset_position_changed_cb() -typedef bt_avrcp_position_changed_cb - = ffi.Pointer>; -typedef bt_avrcp_position_changed_cbFunction = ffi.Void Function( - ffi.UnsignedInt position, ffi.Pointer user_data); -typedef Dartbt_avrcp_position_changed_cbFunction = void Function( - int position, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE -/// @brief Called when the Song Play status mode is changed by the remote target device. -/// @since_tizen 3.0 -/// @param[in] play_state The song play status -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_avrcp_set_play_status_changed_cb() -/// @see bt_avrcp_unset_play_status_changed_cb() -typedef bt_avrcp_play_status_changed_cb - = ffi.Pointer>; -typedef bt_avrcp_play_status_changed_cbFunction = ffi.Void Function( - ffi.Int32 play_state, ffi.Pointer user_data); -typedef Dartbt_avrcp_play_status_changed_cbFunction = void Function( - int play_state, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE -/// @brief Called when the Song metadata information is changed by the remote target device. -/// @since_tizen 3.0 -/// @param[in] track The song metadata information -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_avrcp_set_track_info_changed_cb() -/// @see bt_avrcp_unset_track_info_changed_cb() -typedef bt_avrcp_track_info_changed_cb - = ffi.Pointer>; -typedef bt_avrcp_track_info_changed_cbFunction = ffi.Void Function( - ffi.Pointer track, - ffi.Pointer user_data); -typedef Dartbt_avrcp_track_info_changed_cbFunction = void Function( - ffi.Pointer track, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE -/// @brief Called when the connection state is changed. -/// @since_tizen 3.0 -/// @param[in] connected The state to be changed. true means connected state, Otherwise, false. -/// @param[in] remote_address The remote address -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_avrcp_control_initialize() -/// @see bt_avrcp_control_deinitialize() -typedef bt_avrcp_control_connection_state_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef bt_avrcp_control_connection_state_changed_cbFunction - = ffi.Void Function(ffi.Bool connected, - ffi.Pointer remote_address, ffi.Pointer user_data); -typedef Dartbt_avrcp_control_connection_state_changed_cbFunction - = void Function(bool connected, ffi.Pointer remote_address, - ffi.Pointer user_data); - -/// @deprecated Deprecated since 5.0. -/// @ingroup CAPI_NETWORK_BLUETOOTH_HDP_MODULE -/// @brief Called when the connection is established. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @remarks Deprecated, because of no usecase and supported devices. -/// -/// @param[in] result The result of connecting to the remote device -/// @param[in] remote_address The address of connected remote device -/// @param[in] app_id The ID of application -/// @param[in] type The type of HDP (Health Device Profile) channel -/// @param[in] channel The connected data channel -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_hdp_set_connection_state_changed_cb() -/// @see bt_hdp_unset_connection_state_changed_cb() -typedef bt_hdp_connected_cb - = ffi.Pointer>; -typedef bt_hdp_connected_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Pointer remote_address, - ffi.Pointer app_id, - ffi.Int32 type, - ffi.UnsignedInt channel, - ffi.Pointer user_data); -typedef Dartbt_hdp_connected_cbFunction = void Function( - int result, - ffi.Pointer remote_address, - ffi.Pointer app_id, - int type, - int channel, - ffi.Pointer user_data); - -/// @deprecated Deprecated since 5.0. -/// @ingroup CAPI_NETWORK_BLUETOOTH_HDP_MODULE -/// @brief Called when the connection is disconnected. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @remarks Deprecated, because of no usecase and supported devices. -/// -/// @param[in] result The result of disconnecting from the remote device -/// @param[in] remote_address The address of disconnected remote device -/// @param[in] channel The connected data channel -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_hdp_set_connection_state_changed_cb() -/// @see bt_hdp_unset_connection_state_changed_cb() -typedef bt_hdp_disconnected_cb - = ffi.Pointer>; -typedef bt_hdp_disconnected_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Pointer remote_address, - ffi.UnsignedInt channel, - ffi.Pointer user_data); -typedef Dartbt_hdp_disconnected_cbFunction = void Function( - int result, - ffi.Pointer remote_address, - int channel, - ffi.Pointer user_data); - -/// @deprecated Deprecated since 5.0. -/// @ingroup CAPI_NETWORK_BLUETOOTH_HDP_MODULE -/// @brief Called when the you receive the data. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @remarks Deprecated, because of no usecase and supported devices. -/// -/// @param[in] channel The connected data channel -/// @param[in] data The received data -/// @param[in] size The size of received data (byte) -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_hdp_set_data_received_cb() -/// @see bt_hdp_unset_data_received_cb() -typedef bt_hdp_data_received_cb - = ffi.Pointer>; -typedef bt_hdp_data_received_cbFunction = ffi.Void Function( - ffi.UnsignedInt channel, - ffi.Pointer data, - ffi.UnsignedInt size, - ffi.Pointer user_data); -typedef Dartbt_hdp_data_received_cbFunction = void Function(int channel, - ffi.Pointer data, int size, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief The handle of a service, characteristic or descriptor. -/// @since_tizen 2.3.1 -typedef bt_gatt_h = ffi.Pointer; - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE -/// @brief The handle of a GATT client which is associated with a remote device. -/// @since_tizen 2.3.1 -typedef bt_gatt_client_h = ffi.Pointer; - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE -/// @brief Called when you get GATT handles repeatedly. -/// @since_tizen 2.3.1 -/// -/// @param[in] total The total number of GATT handles to be called -/// @param[in] index The index of current GATT handle. It starts from 0. -/// @param[in] gatt_handle The GATT handle -/// @param[in] user_data The user data passed from the foreach function -/// -/// @see bt_gatt_service_foreach_characteristics() -/// @see bt_gatt_service_foreach_included_services() -/// @see bt_gatt_characteristic_foreach_descriptors() -/// @see bt_gatt_client_foreach_services() -typedef bt_gatt_foreach_cb - = ffi.Pointer>; -typedef bt_gatt_foreach_cbFunction = ffi.Bool Function(ffi.Int total, - ffi.Int index, bt_gatt_h gatt_handle, ffi.Pointer user_data); -typedef Dartbt_gatt_foreach_cbFunction = bool Function(int total, int index, - bt_gatt_h gatt_handle, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE -/// @brief Called when the client request(e.g. read / write) has been completed. -/// @since_tizen 2.3.1 -/// -/// @param[in] result The result of a request -/// @param[in] request_handle The requesting GATT handle -/// @param[in] user_data The user data passed from the requesting function -/// -/// @see bt_gatt_client_read_value() -/// @see bt_gatt_client_write_value() -typedef bt_gatt_client_request_completed_cb = ffi - .Pointer>; -typedef bt_gatt_client_request_completed_cbFunction = ffi.Void Function( - ffi.Int result, bt_gatt_h request_handle, ffi.Pointer user_data); -typedef Dartbt_gatt_client_request_completed_cbFunction = void Function( - int result, bt_gatt_h request_handle, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE -/// @brief Called when the ATT MTU value is changed. -/// @since_tizen 4.0 -/// -/// @remarks The @a mtu_info must not be freed by application. \n -/// @a mtu_info can be used only inside the callback. \n -/// If it's needed outside, make a copy. -/// -/// @param[in] client The handle of a GATT client which is associated with a remote device -/// @param[in] mtu_info The MTU information -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_gatt_client_set_connection_state_changed_cb() -/// @see bt_gatt_client_unset_connection_state_changed_cb() -typedef bt_gatt_client_att_mtu_changed_cb = ffi - .Pointer>; -typedef bt_gatt_client_att_mtu_changed_cbFunction = ffi.Void Function( - bt_gatt_client_h client, - ffi.Pointer mtu_info, - ffi.Pointer user_data); -typedef Dartbt_gatt_client_att_mtu_changed_cbFunction = void Function( - bt_gatt_client_h client, - ffi.Pointer mtu_info, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE -/// @brief Called when a value of a watched characteristic's GATT handle has been changed. -/// @since_tizen 2.3.1 -/// -/// @remarks After this function is returned, a changed value is automatically \n -/// applied to @a characteristic. Before that, @a characteristic has an old value. -/// -/// @param[in] characteristic The characteristic's GATT handle of which value change is informed. It has an old value. -/// @param[in] value The new value -/// @param[in] len The length of @a value -/// @param[in] user_data The user data passed from the registering function -/// -/// @see bt_gatt_client_set_characteristic_value_changed_cb() -typedef bt_gatt_client_characteristic_value_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef bt_gatt_client_characteristic_value_changed_cbFunction - = ffi.Void Function(bt_gatt_h characteristic, ffi.Pointer value, - ffi.Int len, ffi.Pointer user_data); -typedef Dartbt_gatt_client_characteristic_value_changed_cbFunction - = void Function(bt_gatt_h characteristic, ffi.Pointer value, - int len, ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE -/// @brief Called when a service of a remote GATT server has been changed. -/// @since_tizen 3.0 -/// -/// @param[in] client The handle of a GATT client which is associated with a remote device. -/// @param[in] change_type The changed type -/// @param[in] service_uuid The changed service uuid -/// @param[in] user_data The user data passed from the registering function -/// -/// @see bt_gatt_client_set_characteristic_value_changed_cb() -typedef bt_gatt_client_service_changed_cb = ffi - .Pointer>; -typedef bt_gatt_client_service_changed_cbFunction = ffi.Void Function( - bt_gatt_client_h client, - ffi.Int32 change_type, - ffi.Pointer service_uuid, - ffi.Pointer user_data); -typedef Dartbt_gatt_client_service_changed_cbFunction = void Function( - bt_gatt_client_h client, - int change_type, - ffi.Pointer service_uuid, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE -/// @brief Called when the connection state is changed. -/// -/// @details This callback is called when the connection state is changed. -/// When you called bt_gatt_connect() or bt_gatt_disconnect(), this callback is also called with error result even though these functions fail. -/// -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -/// @param[in] result The result of changing the connection state. -/// @param[in] connected The state to be changed, true means connected state, Otherwise, false. -/// @param[in] remote_address The remote_address -/// @param[in] user_data The user data passed from the callback registration function. -/// -/// @see bt_gatt_connect() -/// @see bt_gatt_disconnect() -/// @see bt_gatt_set_connection_state_changed_cb() -/// @see bt_gatt_unset_connection_state_changed_cb() -typedef bt_gatt_connection_state_changed_cb = ffi - .Pointer>; -typedef bt_gatt_connection_state_changed_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Bool connected, - ffi.Pointer remote_address, - ffi.Pointer user_data); -typedef Dartbt_gatt_connection_state_changed_cbFunction = void Function( - int result, - bool connected, - ffi.Pointer remote_address, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE -/// @brief The handle of a GATT server. -/// @since_tizen 3.0 -typedef bt_gatt_server_h = ffi.Pointer; - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE -/// @brief Called when the remote device requests to read a value on a GATT server. -/// -/// @details For finishing the request, call the function #bt_gatt_server_send_response in callback. -/// -/// @since_tizen 3.0 -/// @remarks The @a remote_address must not be freed by application. -/// @remarks The @a server must not be freed by application. -/// @remarks The @a gatt_handle must not be freed by application. -/// -/// @param[in] remote_address The address of the requesting remote device -/// @param[in] request_id The identification of this request. It will be used to send a response. -/// @param[in] server The GATT server handle -/// @param[in] gatt_handle The characteristic or descriptor's GATT handle to be read -/// @param[in] offset The requested offset from where the GATT handle's value is read -/// @param[in] user_data The user data passed from the registration function -/// -/// @see bt_gatt_server_set_read_value_requested_cb() -/// @see bt_gatt_server_send_response() -typedef bt_gatt_server_read_value_requested_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef bt_gatt_server_read_value_requested_cbFunction = ffi.Void Function( - ffi.Pointer remote_address, - ffi.Int request_id, - bt_gatt_server_h server, - bt_gatt_h gatt_handle, - ffi.Int offset, - ffi.Pointer user_data); -typedef Dartbt_gatt_server_read_value_requested_cbFunction = void Function( - ffi.Pointer remote_address, - int request_id, - bt_gatt_server_h server, - bt_gatt_h gatt_handle, - int offset, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE -/// @brief Called when the remote device enables or disables the Notification/Indication for particular characteristics. -/// -/// @details By using this callback function, server can know notification state. -/// -/// @since_tizen 3.0 -/// @remarks The @a server must not be freed by application. -/// @remarks The @a gatt_handle must not be freed by application. -/// -/// @param[in] notify Indicates whether the Notification/Indication is enabled or not -/// @param[in] server The GATT server handle -/// @param[in] gatt_handle The characteristic's GATT handle to be read -/// @param[in] user_data The user data passed from the registration function -/// -/// @see bt_gatt_server_set_read_value_requested_cb() -typedef bt_gatt_server_characteristic_notification_state_changed_cb = ffi.Pointer< - ffi.NativeFunction< - bt_gatt_server_characteristic_notification_state_changed_cbFunction>>; -typedef bt_gatt_server_characteristic_notification_state_changed_cbFunction - = ffi.Void Function(ffi.Bool notify, bt_gatt_server_h server, - bt_gatt_h gatt_handle, ffi.Pointer user_data); -typedef Dartbt_gatt_server_characteristic_notification_state_changed_cbFunction - = void Function(bool notify, bt_gatt_server_h server, bt_gatt_h gatt_handle, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE -/// @brief Called when a value of a characteristic or descriptor's GATT handle has been changed. -/// -/// @details For finishing the request, call the function #bt_gatt_server_send_response in callback. -/// -/// @since_tizen 3.0 -/// @remarks After this function is returned, a changed value is automatically \n -/// applied to @a gatt_handle. Before that, @a gatt_handle has an old value. -/// @remarks The @a remote_address must not be freed by application. -/// @remarks The @a server must not be freed by application. -/// @remarks The @a gatt_handle must not be freed by application. -/// @remarks The @a value must not be freed by application. -/// -/// @param[in] remote_address The address of the remote device which requests a change -/// @param[in] request_id The identification of this request. It will be used to send a response. -/// @param[in] server The GATT server handle -/// @param[in] gatt_handle The characteristic or descriptor's GATT handle which has an old value -/// @param[in] response_needed Indicates whether a response is required by the remote device - @c true if required, @c false if not -/// @param[in] offset The requested offset from where the @a gatt_handle value will be updated -/// @param[in] value The new value -/// @param[in] len The length of @a value -/// @param[in] user_data The user data passed from the registration function -/// -/// @see bt_gatt_server_set_write_value_requested_cb() -/// @see bt_gatt_server_send_response() -typedef bt_gatt_server_write_value_requested_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef bt_gatt_server_write_value_requested_cbFunction = ffi.Void Function( - ffi.Pointer remote_address, - ffi.Int request_id, - bt_gatt_server_h server, - bt_gatt_h gatt_handle, - ffi.Bool response_needed, - ffi.Int offset, - ffi.Pointer value, - ffi.Int len, - ffi.Pointer user_data); -typedef Dartbt_gatt_server_write_value_requested_cbFunction = void Function( - ffi.Pointer remote_address, - int request_id, - bt_gatt_server_h server, - bt_gatt_h gatt_handle, - bool response_needed, - int offset, - ffi.Pointer value, - int len, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE -/// @brief Called when the sending notification / indication is done. -/// @since_tizen 3.0 -/// -/// @remarks The @a remote_address must not be freed by application. -/// @remarks The @a server must not be freed by application. -/// @remarks The @a characteristic must not be freed by application. -/// -/// @remarks In case of an indication, once a confirmation is received from the remote device this callback will be called. \n -/// This callback will be called several times if there are two or more remote devices which enable a Client Characteristic Configuration Descriptor(CCCD). \n -/// For the last remote device, @a completed will be set as true. -/// -/// @param[in] result The result of a sending operation -/// @param[in] remote_address The address of the remote device -/// @param[in] server The GATT server handle -/// @param[in] characteristic The characteristic's GATT handle -/// @param[in] completed If this callback is for the last remote device which enables a CCCD, it will be true. Or it will be false. -/// @param[in] user_data The user data passed from the requesting function -/// -/// @see bt_gatt_server_notify_characteristic_changed_value() -typedef bt_gatt_server_notification_sent_cb = ffi - .Pointer>; -typedef bt_gatt_server_notification_sent_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Pointer remote_address, - bt_gatt_server_h server, - bt_gatt_h characteristic, - ffi.Bool completed, - ffi.Pointer user_data); -typedef Dartbt_gatt_server_notification_sent_cbFunction = void Function( - int result, - ffi.Pointer remote_address, - bt_gatt_server_h server, - bt_gatt_h characteristic, - bool completed, - ffi.Pointer user_data); - -/// @WEARABLE_ONLY -/// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE -/// @brief Called when PBAP is Connected or Disconnected. -/// @details The following error codes can be delivered: \n -/// #BT_ERROR_NONE \n -/// #BT_ERROR_AUTH_REJECTED \n -/// #BT_ERROR_AUTHORIZATION_REJECTED \n -/// #BT_ERROR_SERVICE_NOT_FOUND \n -/// #BT_ERROR_TIMED_OUT \n -/// #BT_ERROR_OPERATION_FAILED \n -/// @since_tizen 3.0 -/// -/// @param[in] result The result of connecting to or disconnecting from the remote device -/// @param[in] connected The PBAP connection status (@c true = connected, @c false = disconnected) -/// @param[in] remote_address The remote device address (@a remote_address is valid only inside this function. To use outside the callback, make a copy. @a remote_address should not be freed.) -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_pbap_client_connect() -/// @see bt_pbap_client_disconnect() -typedef bt_pbap_connection_state_changed_cb = ffi - .Pointer>; -typedef bt_pbap_connection_state_changed_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Bool connected, - ffi.Pointer remote_address, - ffi.Pointer user_data); -typedef Dartbt_pbap_connection_state_changed_cbFunction = void Function( - int result, - bool connected, - ffi.Pointer remote_address, - ffi.Pointer user_data); - -/// @WEARABLE_ONLY -/// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE -/// @brief Called when PBAP Phonebook size calculation completes. -/// @details The following error codes can be delivered: \n -/// #BT_ERROR_NONE \n -/// #BT_ERROR_OPERATION_FAILED \n -/// @since_tizen 3.0 -/// -/// @param[in] result The result of getting the phone book size -/// @param[in] remote_address The remote device address (@a remote_address is valid only inside this function. To use outside the callback, make a copy. @a remote_address should not be freed.) -/// @param[in] size Size of Phonebook -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_pbap_client_get_phone_book_size() -/// @see bt_pbap_client_connect() -/// @see bt_pbap_client_disconnect() -typedef bt_pbap_phone_book_size_cb - = ffi.Pointer>; -typedef bt_pbap_phone_book_size_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Pointer remote_address, - ffi.Int size, - ffi.Pointer user_data); -typedef Dartbt_pbap_phone_book_size_cbFunction = void Function( - int result, - ffi.Pointer remote_address, - int size, - ffi.Pointer user_data); - -/// @WEARABLE_ONLY -/// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE -/// @brief Called when PBAP Phonebook Pull completes. -/// @details The received phone book file will be saved in the platform downloads folder. \n -/// The following error codes can be delivered: \n -/// #BT_ERROR_NONE \n -/// #BT_ERROR_OPERATION_FAILED \n -/// @since_tizen 3.0 -/// -/// @param[in] result The result of getting the phone book -/// @param[in] remote_address The remote device address (@a remote_address is valid only inside this function. To use outside the callback, make a copy. @a remote_address should not be freed.) -/// @param[in] vcf_file The absolute path of the file in which the vCards are saved (@a vcf_file is valid only inside this function. To use outside the callback, make a copy. @a vcf_file should not be freed.) -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_pbap_client_get_phone_book() -/// @see bt_pbap_client_connect() -/// @see bt_pbap_client_disconnect() -typedef bt_pbap_phone_book_received_cb - = ffi.Pointer>; -typedef bt_pbap_phone_book_received_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Pointer remote_address, - ffi.Pointer vcf_file, - ffi.Pointer user_data); -typedef Dartbt_pbap_phone_book_received_cbFunction = void Function( - int result, - ffi.Pointer remote_address, - ffi.Pointer vcf_file, - ffi.Pointer user_data); - -/// @WEARABLE_ONLY -/// @ingroup CAPI_NETWORK_BLUETOOTH_PBAP_MODULE -/// @brief Called when PBAP List vCards completes. -/// @details The following error codes can be delivered: \n -/// #BT_ERROR_NONE \n -/// #BT_ERROR_OPERATION_FAILED \n -/// @since_tizen 3.0 -/// -/// @param[in] result The result of getting the vcard list -/// @param[in] remote_address The remote device address (@a remote_address is valid only inside this function. To use outside the callback, make a copy. @a remote_address should not be freed.) -/// @param[in] vcard_info List of vcard information (@a vcard_info is valid only inside this function. To use outside the callback, make a copy. @a vcard_info should not be freed.) -/// @param[in] count Number of contacts in the list -/// @param[in] user_data The user data passed from the callback registration function -/// @see bt_pbap_client_get_list() -/// @see bt_pbap_client_connect() -/// @see bt_pbap_client_disconnect() -typedef bt_pbap_list_vcards_cb - = ffi.Pointer>; -typedef bt_pbap_list_vcards_cbFunction = ffi.Void Function( - ffi.Int result, - ffi.Pointer remote_address, - ffi.Pointer vcard_info, - ffi.Int count, - ffi.Pointer user_data); -typedef Dartbt_pbap_list_vcards_cbFunction = void Function( - int result, - ffi.Pointer remote_address, - ffi.Pointer vcard_info, - int count, - ffi.Pointer user_data); - -/// @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE -/// @brief The handle of a Bluetooth LE scan filter. -/// @since_tizen 4.0 -typedef bt_scan_filter_h = ffi.Pointer; - -/// @brief Enumeration for security type of Wi-Fi. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_wifi_security_type_e { - /// < Security disabled - static const int CONNECTION_WIFI_SECURITY_TYPE_NONE = 0; - - /// < WEP - static const int CONNECTION_WIFI_SECURITY_TYPE_WEP = 1; - - /// < WPA-PSK - static const int CONNECTION_WIFI_SECURITY_TYPE_WPA_PSK = 2; - - /// < WPA2-PSK - static const int CONNECTION_WIFI_SECURITY_TYPE_WPA2_PSK = 3; - - /// < EAP - static const int CONNECTION_WIFI_SECURITY_TYPE_EAP = 4; -} - -/// @brief Enumeration for encryption modes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_wifi_encryption_type_e { - /// < Encryption disabled - static const int CONNECTION_WIFI_ENCRYPTION_TYPE_NONE = 0; - - /// < WEP - static const int CONNECTION_WIFI_ENCRYPTION_TYPE_WEP = 1; - - /// < TKIP - static const int CONNECTION_WIFI_ENCRYPTION_TYPE_TKIP = 2; - - /// < AES - static const int CONNECTION_WIFI_ENCRYPTION_TYPE_AES = 3; - - /// < TKIP and AES are both supported - static const int CONNECTION_WIFI_ENCRYPTION_TYPE_TKIP_AES_MIXED = 4; -} - -/// @brief Enumeration for cellular service type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_cellular_service_type_e { - /// < Unknown - static const int CONNECTION_CELLULAR_SERVICE_TYPE_UNKNOWN = 0; - - /// < Internet - static const int CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET = 1; - - /// < MMS - static const int CONNECTION_CELLULAR_SERVICE_TYPE_MMS = 2; - - /// < Prepaid internet - static const int CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_INTERNET = 3; - - /// < Prepaid MMS - static const int CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_MMS = 4; - - /// < Tethering - static const int CONNECTION_CELLULAR_SERVICE_TYPE_TETHERING = 5; - - /// < Specific application - static const int CONNECTION_CELLULAR_SERVICE_TYPE_APPLICATION = 6; -} - -/// @brief Enumeration for cellular pdn type. -/// @since_tizen 3.0 -/// @remarks Use #CONNECTION_CELLULAR_PDN_TYPE_IPV4_IPV6 instead of -/// CONNECTION_CELLULAR_PDN_TYPE_IPV4_IPv6. -abstract class connection_cellular_pdn_type_e { - /// < Unknown - static const int CONNECTION_CELLULAR_PDN_TYPE_UNKNOWN = 0; - - /// < IPv4 - static const int CONNECTION_CELLULAR_PDN_TYPE_IPV4 = 1; - - /// < IPv6 - static const int CONNECTION_CELLULAR_PDN_TYPE_IPV6 = 2; - - /// < IPv4 and IPv6 (Deprecated since 4.0) - static const int CONNECTION_CELLULAR_PDN_TYPE_IPV4_IPv6 = 3; - - /// < IPv4 and IPv6 (Since 4.0) - static const int CONNECTION_CELLULAR_PDN_TYPE_IPV4_IPV6 = 4; -} - -/// @brief Enumeration for cellular authentication type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_cellular_auth_type_e { - /// < No authentication - static const int CONNECTION_CELLULAR_AUTH_TYPE_NONE = 0; - - /// < PAP authentication - static const int CONNECTION_CELLULAR_AUTH_TYPE_PAP = 1; - - /// < CHAP authentication - static const int CONNECTION_CELLULAR_AUTH_TYPE_CHAP = 2; -} - -/// @brief Enumeration for profile state type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_profile_state_e { - /// < Disconnected state - static const int CONNECTION_PROFILE_STATE_DISCONNECTED = 0; - - /// < Association state - static const int CONNECTION_PROFILE_STATE_ASSOCIATION = 1; - - /// < Configuration state - static const int CONNECTION_PROFILE_STATE_CONFIGURATION = 2; - - /// < Connected state - static const int CONNECTION_PROFILE_STATE_CONNECTED = 3; -} - -/// @brief Enumeration for address family. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_address_family_e { - /// < IPV4 Address type - static const int CONNECTION_ADDRESS_FAMILY_IPV4 = 0; - - /// < IPV6 Address type - static const int CONNECTION_ADDRESS_FAMILY_IPV6 = 1; -} - -/// @brief Enumeration for IP configuration type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_ip_config_type_e { - /// Not defined - static const int CONNECTION_IP_CONFIG_TYPE_NONE = 0; - - /// Manual IP configuration - static const int CONNECTION_IP_CONFIG_TYPE_STATIC = 1; - - /// Config IP using DHCP client (IPv4 Only) - static const int CONNECTION_IP_CONFIG_TYPE_DYNAMIC = 2; - - /// Config IP from Auto IP pool (169.254/16). Later with DHCP client, if available - static const int CONNECTION_IP_CONFIG_TYPE_AUTO = 3; - - /// Indicates an IP address that can not be modified (IPv4 Only) - static const int CONNECTION_IP_CONFIG_TYPE_FIXED = 4; -} - -/// @brief Enumeration for proxy method type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_proxy_type_e { - /// Direct connection - static const int CONNECTION_PROXY_TYPE_DIRECT = 0; - - /// Auto configuration (use PAC file). If URL property is not set, - /// DHCP/WPAD auto-discover will be tried - static const int CONNECTION_PROXY_TYPE_AUTO = 1; - - /// Manual configuration - static const int CONNECTION_PROXY_TYPE_MANUAL = 2; -} - -/// @brief Enumeration for DNS configuration type. -/// @since_tizen 4.0 -abstract class connection_dns_config_type_e { - /// < Not defined - static const int CONNECTION_DNS_CONFIG_TYPE_NONE = 0; - - /// < Manual DNS configuration - static const int CONNECTION_DNS_CONFIG_TYPE_STATIC = 1; - - /// < Config DNS using DHCP client - static const int CONNECTION_DNS_CONFIG_TYPE_DYNAMIC = 2; -} - -/// @brief Enumeration for network connection type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_profile_type_e { - /// < Cellular type - static const int CONNECTION_PROFILE_TYPE_CELLULAR = 0; - - /// < Wi-Fi type - static const int CONNECTION_PROFILE_TYPE_WIFI = 1; - - /// < Ethernet type - static const int CONNECTION_PROFILE_TYPE_ETHERNET = 2; - - /// < Bluetooth type - static const int CONNECTION_PROFILE_TYPE_BT = 3; -} - -/// @brief The profile handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef connection_profile_h = ffi.Pointer; - -/// @brief Called when the state of the profile is changed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] state The state -/// @param[in] user_data The user data passed from the callback registration function -/// @see connection_profile_set_state_changed_cb() -/// @see connection_profile_unset_state_changed_cb() -typedef connection_profile_state_changed_cb = ffi - .Pointer>; -typedef connection_profile_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 state, ffi.Pointer user_data); -typedef Dartconnection_profile_state_changed_cbFunction = void Function( - int state, ffi.Pointer user_data); - -/// @brief Enumeration for connection type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_type_e { - /// < Disconnected - static const int CONNECTION_TYPE_DISCONNECTED = 0; - - /// < Wi-Fi type - static const int CONNECTION_TYPE_WIFI = 1; - - /// < Cellular type - static const int CONNECTION_TYPE_CELLULAR = 2; - - /// < Ethernet type - static const int CONNECTION_TYPE_ETHERNET = 3; - - /// < Bluetooth type - static const int CONNECTION_TYPE_BT = 4; - - /// < Proxy type for internet connection (Since 3.0) - static const int CONNECTION_TYPE_NET_PROXY = 5; -} - -/// @brief Enumeration for cellular network state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_cellular_state_e { - /// < Out of service - static const int CONNECTION_CELLULAR_STATE_OUT_OF_SERVICE = 0; - - /// < Flight mode - static const int CONNECTION_CELLULAR_STATE_FLIGHT_MODE = 1; - - /// < Roaming is turned off - static const int CONNECTION_CELLULAR_STATE_ROAMING_OFF = 2; - - /// < Call is only available - static const int CONNECTION_CELLULAR_STATE_CALL_ONLY_AVAILABLE = 3; - - /// < Available but not connected yet - static const int CONNECTION_CELLULAR_STATE_AVAILABLE = 4; - - /// < Connected - static const int CONNECTION_CELLULAR_STATE_CONNECTED = 5; -} - -/// @brief Enumeration for Wi-Fi state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_wifi_state_e { - /// < Wi-Fi is deactivated - static const int CONNECTION_WIFI_STATE_DEACTIVATED = 0; - - /// < Disconnected - static const int CONNECTION_WIFI_STATE_DISCONNECTED = 1; - - /// < Connected - static const int CONNECTION_WIFI_STATE_CONNECTED = 2; -} - -/// @brief Enumeration for ethernet state. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class connection_ethernet_state_e { - /// < There is no Ethernet profile to open - static const int CONNECTION_ETHERNET_STATE_DEACTIVATED = 0; - - /// < Disconnected - static const int CONNECTION_ETHERNET_STATE_DISCONNECTED = 1; - - /// < Connected - static const int CONNECTION_ETHERNET_STATE_CONNECTED = 2; -} - -/// @brief Enumeration for Bluetooth state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_bt_state_e { - /// < There is no Bluetooth profile to open - static const int CONNECTION_BT_STATE_DEACTIVATED = 0; - - /// < Disconnected - static const int CONNECTION_BT_STATE_DISCONNECTED = 1; - - /// < Connected - static const int CONNECTION_BT_STATE_CONNECTED = 2; -} - -/// @brief Enumeration for connection iterator type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_iterator_type_e { - /// < The iterator of the registered profile - static const int CONNECTION_ITERATOR_TYPE_REGISTERED = 0; - - /// < The iterator of the connected profile - static const int CONNECTION_ITERATOR_TYPE_CONNECTED = 1; - - /// < The iterator of the default profile - static const int CONNECTION_ITERATOR_TYPE_DEFAULT = 2; -} - -/// @brief Enumeration for reset profile type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_reset_option_e { - /// Initialized with the default profile defined by csc - static const int CONNECTION_RESET_DEFAULT_PROFILE = 0; - - /// Remove all profiles - static const int CONNECTION_RESET_CLEAR_PROFILE = 1; -} - -/// @brief Enumeration for the attached or detached state of ethernet cable. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class connection_ethernet_cable_state_e { - /// < Ethernet cable is detached - static const int CONNECTION_ETHERNET_CABLE_DETACHED = 0; - - /// < Ethernet cable is attached - static const int CONNECTION_ETHERNET_CABLE_ATTACHED = 1; -} - -/// @brief Enumeration for connection errors. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_error_e { - /// Successful - static const int CONNECTION_ERROR_NONE = 0; - - /// Invalid parameter - static const int CONNECTION_ERROR_INVALID_PARAMETER = -22; - - /// Out of memory error - static const int CONNECTION_ERROR_OUT_OF_MEMORY = -12; - - /// Invalid operation - static const int CONNECTION_ERROR_INVALID_OPERATION = -38; - - /// Address family not supported - static const int CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED = -97; - - /// Operation failed - static const int CONNECTION_ERROR_OPERATION_FAILED = -29424639; - - /// End of iteration - static const int CONNECTION_ERROR_ITERATOR_END = -29424638; - - /// There is no connection - static const int CONNECTION_ERROR_NO_CONNECTION = -29424637; - - /// Now inprogress - static const int CONNECTION_ERROR_NOW_IN_PROGRESS = -115; - - /// Already exists - static const int CONNECTION_ERROR_ALREADY_EXISTS = -29424636; - - /// Operation is aborted - static const int CONNECTION_ERROR_OPERATION_ABORTED = -29424635; - - /// DHCP failed - static const int CONNECTION_ERROR_DHCP_FAILED = -29424634; - - /// Invalid key - static const int CONNECTION_ERROR_INVALID_KEY = -29424633; - - /// No reply - static const int CONNECTION_ERROR_NO_REPLY = -29424632; - - /// Permission denied - static const int CONNECTION_ERROR_PERMISSION_DENIED = -13; - - /// Not supported - static const int CONNECTION_ERROR_NOT_SUPPORTED = -1073741822; - - /// Already initialized (Since 5.0) - static const int CONNECTION_ERROR_ALREADY_INITIALIZED = -29424631; - - /// Not initialized (Sinece 5.0) - static const int CONNECTION_ERROR_NOT_INITIALIZED = -29424630; -} - -/// @brief Enumeration for statistics type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class connection_statistics_type_e { - /// < Last received data - static const int CONNECTION_STATISTICS_TYPE_LAST_RECEIVED_DATA = 0; - - /// < Last sent data - static const int CONNECTION_STATISTICS_TYPE_LAST_SENT_DATA = 1; - - /// < Total received data - static const int CONNECTION_STATISTICS_TYPE_TOTAL_RECEIVED_DATA = 2; - - /// < Total sent data - static const int CONNECTION_STATISTICS_TYPE_TOTAL_SENT_DATA = 3; -} - -/// @brief The connection handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef connection_h = ffi.Pointer; - -/// @deprecated Deprecated since 4.0. Use connection_ethernet_cable_state_changed_cb() instead. -/// @brief Called when ethernet cable is plugged [in/out]. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] state The state of ethernet cable -/// @param[in] user_data The user data passed to callback registration function -typedef connection_ethernet_cable_state_chaged_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef connection_ethernet_cable_state_chaged_cbFunction = ffi.Void Function( - ffi.Int32 state, ffi.Pointer user_data); -typedef Dartconnection_ethernet_cable_state_chaged_cbFunction = void Function( - int state, ffi.Pointer user_data); - -/// @brief Called when ethernet cable is plugged [in/out]. -/// @since_tizen 4.0 -/// @param[in] state The state of ethernet cable -/// @param[in] user_data The user data passed to callback registration function -typedef connection_ethernet_cable_state_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef connection_ethernet_cable_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 state, ffi.Pointer user_data); -typedef Dartconnection_ethernet_cable_state_changed_cbFunction = void Function( - int state, ffi.Pointer user_data); - -/// @brief Called when the type of a connection is changed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] type The type of the current network connection -/// @param[in] user_data The user data passed from the callback registration function -/// @see connection_set_type_changed_cb() -/// @see connection_unset_type_changed_cb() -typedef connection_type_changed_cb - = ffi.Pointer>; -typedef connection_type_changed_cbFunction = ffi.Void Function( - ffi.Int32 type, ffi.Pointer user_data); -typedef Dartconnection_type_changed_cbFunction = void Function( - int type, ffi.Pointer user_data); - -/// @brief Called when the address is changed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks @a ipv4_address @a ipv6_address should not be freed. -/// @a ipv4_address @a ipv6_address is available only in the callback. -/// To use outside the callback, make a copy. -/// @param[in] ipv4_address The IP address for IPv4 -/// @param[in] ipv6_address The IP address for IPv6 -/// @param[in] user_data The user data passed from the callback registration function -/// @see connection_set_ip_address_changed_cb() -/// @see connection_unset_ip_address_changed_cb() -/// @see connection_set_proxy_address_changed_cb() -/// @see connection_unset_proxy_address_changed_cb() -typedef connection_address_changed_cb - = ffi.Pointer>; -typedef connection_address_changed_cbFunction = ffi.Void Function( - ffi.Pointer ipv4_address, - ffi.Pointer ipv6_address, - ffi.Pointer user_data); -typedef Dartconnection_address_changed_cbFunction = void Function( - ffi.Pointer ipv4_address, - ffi.Pointer ipv6_address, - ffi.Pointer user_data); - -/// @brief The profiles iterator handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef connection_profile_iterator_h = ffi.Pointer; - -/// @brief Called when connection_set_default_cellular_service_profile_async() finishes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] result The result -/// @param[in] user_data The user data passed from connection_open_profile() -/// @pre connection_set_default_cellular_service_profile_async() will invoke this callback function. -/// @see connection_set_default_cellular_service_profile_async() -typedef connection_set_default_cb - = ffi.Pointer>; -typedef connection_set_default_cbFunction = ffi.Void Function( - ffi.Int32 result, ffi.Pointer user_data); -typedef Dartconnection_set_default_cbFunction = void Function( - int result, ffi.Pointer user_data); - -/// @brief Called after connection_open_profile() is finished. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] result The result -/// @param[in] user_data The user data passed from connection_open_profile() -/// @pre connection_open_profile() will invoke this callback function. -/// @see connection_open_profile() -typedef connection_opened_cb - = ffi.Pointer>; -typedef connection_opened_cbFunction = ffi.Void Function( - ffi.Int32 result, ffi.Pointer user_data); -typedef Dartconnection_opened_cbFunction = void Function( - int result, ffi.Pointer user_data); - -/// @brief Called after connection_close_profile() is finished. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] result The result -/// @param[in] user_data The user data passed from connection_close_profile() -/// @pre connection_close_profile() will invoke this callback function. -/// @see connection_close_profile() -typedef connection_closed_cb - = ffi.Pointer>; -typedef connection_closed_cbFunction = ffi.Void Function( - ffi.Int32 result, ffi.Pointer user_data); -typedef Dartconnection_closed_cbFunction = void Function( - int result, ffi.Pointer user_data); - -/// @brief Called after connection_reset_profile() is finished. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] result The result -/// @param[in] user_data The user data passed from connection_reset_profile() -/// @pre connection_reset_profile() will invoke this callback function. -/// @see connection_reset_profile() -typedef connection_reset_cb - = ffi.Pointer>; -typedef connection_reset_cbFunction = ffi.Void Function( - ffi.Int32 result, ffi.Pointer user_data); -typedef Dartconnection_reset_cbFunction = void Function( - int result, ffi.Pointer user_data); - -/// @brief Called with an IPv6 address. -/// @since_tizen 4.0 -/// @remarks If @a ipv6_address is needed outside the callback, a copy should be made. \n -/// @a ipv6_address will be freed automatically after the execution of this callback. -/// @param[in] ipv6_address The IPv6 address -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n -/// @c false to break out of the loop -/// @pre connection_foreach_ipv6_addresses() will invoke this callback. -/// @see connection_foreach_ipv6_addresses() -typedef connection_ipv6_address_cb - = ffi.Pointer>; -typedef connection_ipv6_address_cbFunction = ffi.Bool Function( - ffi.Pointer ipv6_address, ffi.Pointer user_data); -typedef Dartconnection_ipv6_address_cbFunction = bool Function( - ffi.Pointer ipv6_address, ffi.Pointer user_data); - -/// @brief Enumeration for Network Service Discovery DNSSD error code. -/// @since_tizen 3.0 -abstract class dnssd_error_e { - /// < Successful - static const int DNSSD_ERROR_NONE = 0; - - /// < Out of memory - static const int DNSSD_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied - static const int DNSSD_ERROR_PERMISSION_DENIED = -13; - - /// < Invalid operation - static const int DNSSD_ERROR_INVALID_OPERATION = -38; - - /// < Invalid function parameter - static const int DNSSD_ERROR_INVALID_PARAMETER = -22; - - /// < Not supported - static const int DNSSD_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Not Initialized - static const int DNSSD_ERROR_NOT_INITIALIZED = -30015487; - - /// < Already registered - static const int DNSSD_ERROR_ALREADY_REGISTERED = -30015486; - - /// < Name conflict - static const int DNSSD_ERROR_NAME_CONFLICT = -30015485; - - /// < Background daemon not running - static const int DNSSD_ERROR_SERVICE_NOT_RUNNING = -30015484; - - /// < Service not found - static const int DNSSD_ERROR_SERVICE_NOT_FOUND = -30015483; - - /// < Operation failed - static const int DNSSD_ERROR_OPERATION_FAILED = -30015482; -} - -/// @brief Enumeration for Network Service Discovery DNSSD browse state. -/// @since_tizen 3.0 -abstract class dnssd_service_state_e { - /// >; -typedef dnssd_registered_cbFunction = ffi.Void Function(ffi.Int32 result, - dnssd_service_h local_service, ffi.Pointer user_data); -typedef Dartdnssd_registered_cbFunction = void Function(int result, - Dartdnssd_service_h local_service, ffi.Pointer user_data); - -/// @brief The DNSSD Browser handle. -/// @since_tizen 3.0 -typedef dnssd_browser_h = ffi.UnsignedInt; -typedef Dartdnssd_browser_h = int; - -/// @brief Called when a DNSSD service is found. -/// @details remote_service is valid only when service_state is -/// DNSSD_SERVICE_STATE_AVAILABLE or DNSSD_SERVICE_STATE_UNAVAILABLE. -/// In case of service_state DNSSD_SERVICE_STATE_UNAVAILABLE, application -/// can only use dnssd_service_get_type() and dnssd_service_get_name(). -/// Other get functions can only be used when service_state is -/// DNSSD_SERVICE_STATE_AVAILABLE. -/// @since_tizen 3.0 -/// @param[in] service_state The DNSSD service state of remote service -/// @param[in] remote_service The DNSSD remote service handle -/// @param[in] user_data The user data passed from the request function -/// @see dnssd_start_browsing_service() -typedef dnssd_found_cb - = ffi.Pointer>; -typedef dnssd_found_cbFunction = ffi.Void Function(ffi.Int32 service_state, - dnssd_service_h remote_service, ffi.Pointer user_data); -typedef Dartdnssd_found_cbFunction = void Function(int service_state, - Dartdnssd_service_h remote_service, ffi.Pointer user_data); - -/// @brief Enumeration for the HTTP session. -/// @since_tizen 3.0 -abstract class http_session_mode_e { - /// < The Normal Mode - static const int HTTP_SESSION_MODE_NORMAL = 0; - - /// < The Pipelining mode - static const int HTTP_SESSION_MODE_PIPELINING = 1; -} - -/// @brief Enumeration for the HTTP method. -/// @since_tizen 3.0 -abstract class http_method_e { - /// < The HTTP GET Method - static const int HTTP_METHOD_GET = 64; - - /// < The HTTP OPTIONS Method - static const int HTTP_METHOD_OPTIONS = 65; - - /// < The HTTP HEAD Method - static const int HTTP_METHOD_HEAD = 66; - - /// < The HTTP DELETE Method - static const int HTTP_METHOD_DELETE = 67; - - /// < The HTTP TRACE Method - static const int HTTP_METHOD_TRACE = 68; - - /// < The HTTP POST Method - static const int HTTP_METHOD_POST = 96; - - /// < The HTTP PUT Method - static const int HTTP_METHOD_PUT = 97; - - /// < The HTTP CONNECT Method - static const int HTTP_METHOD_CONNECT = 112; -} - -/// @brief Enumeration for the HTTP version. -/// @since_tizen 3.0 -abstract class http_version_e { - /// < HTTP version 1.0 - static const int HTTP_VERSION_1_0 = 0; - - /// < HTTP version 1.1 - static const int HTTP_VERSION_1_1 = 1; -} - -/// @brief Enumeration for transfer pause state. -/// @since_tizen 3.0 -abstract class http_pause_type_e { - /// < Pause receiving data - static const int HTTP_PAUSE_RECV = 1; - - /// < Pause sending data - static const int HTTP_PAUSE_SEND = 4; - - /// < Pause both directions - static const int HTTP_PAUSE_ALL = 5; -} - -/// @brief Enumeration for the HTTP error code. -/// @since_tizen 3.0 -abstract class http_error_code_e { - /// < Successful - static const int HTTP_ERROR_NONE = 0; - - /// < Out of memory - static const int HTTP_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied - static const int HTTP_ERROR_PERMISSION_DENIED = -13; - - /// < Invalid parameter - static const int HTTP_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid operation - static const int HTTP_ERROR_INVALID_OPERATION = -38; - - /// < Operation failed - static const int HTTP_ERROR_OPERATION_FAILED = -30212095; - - /// < Couldn't resolve host - static const int HTTP_ERROR_COULDNT_RESOLVE_HOST = -30212090; - - /// < Couldn't Connect to host - static const int HTTP_ERROR_COULDNT_CONNECT = -30212089; - - /// < Timeout - static const int HTTP_ERROR_OPERATION_TIMEDOUT = -30212056; - - /// < SSL Error - static const int HTTP_ERROR_SSL_CONNECT_ERROR = -30212043; - - /// < Operation Canceled - static const int HTTP_ERROR_CANCELED = -125; - - /// < API is not supported - static const int HTTP_ERROR_NOT_SUPPORTED = -1073741822; -} - -/// @brief Enumeration for the HTTP status code. -/// @since_tizen 3.0 -abstract class http_status_code_e { - /// < The undefined status - static const int HTTP_STATUS_UNDEFINED = 0; - - /// < The status code: 100 Continue - static const int HTTP_STATUS_CONTINUE = 100; - - /// < The status code: 101 Switching Protocols - static const int HTTP_STATUS_SWITCHING_PROTOCOLS = 101; - - /// < The status code: 200 OK - static const int HTTP_STATUS_OK = 200; - - /// < The status code: 201 Created - static const int HTTP_STATUS_CREATED = 201; - - /// < The status code: 202 Accepted - static const int HTTP_STATUS_ACCEPTED = 202; - - /// < The status code: 203 Non-Authoritative Information - static const int HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION = 203; - - /// < The status code: 204 No %Content - static const int HTTP_STATUS_NO_CONTENT = 204; - - /// < The status code: 205 Reset %Content - static const int HTTP_STATUS_RESET_CONTENT = 205; - - /// < The status code: 206 Partial %Content - static const int HTTP_STATUS_PARTIAL_CONTENT = 206; - - /// < The status code: 300 Multiple Choices - static const int HTTP_STATUS_MULTIPLE_CHOICE = 300; - - /// < The status code: 301 Moved Permanently - static const int HTTP_STATUS_MOVED_PERMANENTLY = 301; - - /// < The status code: 302 Found - static const int HTTP_STATUS_MOVED_TEMPORARILY = 302; - - /// < The status code: 303 See Other - static const int HTTP_STATUS_SEE_OTHER = 303; - - /// < The status code: 304 Not Modified - static const int HTTP_STATUS_NOT_MODIFIED = 304; - - /// < The status code: 305 Use Proxy - static const int HTTP_STATUS_USE_PROXY = 305; - - /// < The status code: 400 Bad Request - static const int HTTP_STATUS_BAD_REQUEST = 400; - - /// < The status code: 401 Unauthorized - static const int HTTP_STATUS_UNAUTHORIZED = 401; - - /// < The status code: 402 Payment Required - static const int HTTP_STATUS_PAYMENT_REQUIRED = 402; - - /// < The status code: 403 Forbidden - static const int HTTP_STATUS_FORBIDDEN = 403; - - /// < The status code: 404 Not Found - static const int HTTP_STATUS_NOT_FOUND = 404; - - /// < The status code: 405 Method Not Allowed - static const int HTTP_STATUS_METHOD_NOT_ALLOWED = 405; - - /// < The status code: 406 Not Acceptable - static const int HTTP_STATUS_NOT_ACCEPTABLE = 406; - - /// < The status code: 407 Proxy Authentication Required - static const int HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED = 407; - - /// < The status code: 408 Request Timeout (not used) - static const int HTTP_STATUS_REQUEST_TIME_OUT = 408; - - /// < The status code: 409 Conflict - static const int HTTP_STATUS_CONFLICT = 409; - - /// < The status code: 410 Gone - static const int HTTP_STATUS_GONE = 410; - - /// < The status code: 411 Length Required - static const int HTTP_STATUS_LENGTH_REQUIRED = 411; - - /// < The status code: 412 Precondition Failed - static const int HTTP_STATUS_PRECONDITION_FAILED = 412; - - /// < The status code: 413 Request Entity Too Large (not used) - static const int HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE = 413; - - /// < The status code: 414 Request-URI Too Long (not used) - static const int HTTP_STATUS_REQUEST_URI_TOO_LARGE = 414; - - /// < The status code: 415 Unsupported %Media Type - static const int HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE = 415; - - /// < The status code: 500 Internal Server Error - static const int HTTP_STATUS_INTERNAL_SERVER_ERROR = 500; - - /// < The status code: 501 Not Implemented - static const int HTTP_STATUS_NOT_IMPLEMENTED = 501; - - /// < The status code: 502 Bad Gateway - static const int HTTP_STATUS_BAD_GATEWAY = 502; - - /// < The status code: 503 Service Unavailable - static const int HTTP_STATUS_SERVICE_UNAVAILABLE = 503; - - /// < The status code: 504 Gateway Timeout - static const int HTTP_STATUS_GATEWAY_TIME_OUT = 504; - - /// < The status code: 505 HTTP Version Not Supported - static const int HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED = 505; -} - -/// @brief Enumeration for the HTTP authentication schemes. -/// @since_tizen 3.0 -abstract class http_auth_scheme_e { - /// < No authentication type - static const int HTTP_AUTH_NONE = 0; - - /// < The authentication type is Proxy Basic Authentication - static const int HTTP_AUTH_PROXY_BASIC = 1; - - /// < The authentication type is Proxy Digest Authentication - static const int HTTP_AUTH_PROXY_MD5 = 2; - - /// < The authentication Type is HTTP Basic Authentication - static const int HTTP_AUTH_WWW_BASIC = 3; - - /// < The authentication type is HTTP Digest Authentication - static const int HTTP_AUTH_WWW_MD5 = 4; - - /// < The authentication type is Proxy NTLM Authentication - static const int HTTP_AUTH_PROXY_NTLM = 5; - - /// < The authentication type is NTLM Authentication - static const int HTTP_AUTH_WWW_NTLM = 7; - - /// < The authentication type is Negotiate Authentication - static const int HTTP_AUTH_WWW_NEGOTIATE = 8; -} - -/// @brief The HTTP Session handle. -/// @since_tizen 3.0 -typedef http_session_h = ffi.Pointer; - -/// @brief The HTTP Transaction handle. -/// @since_tizen 3.0 -typedef http_transaction_h = ffi.Pointer; - -/// @brief Called when the HTTP header is received. -/// @since_tizen 3.0 -/// @remarks The @a header should be released using free(). \n -/// The @a header is available until @a http_transaction is released. -/// @param[in] http_transaction The HTTP transaction handle -/// @param[in] header The header information of HTTP Transaction -/// @param[in] header_len The length of the HTTP Transaction header -/// @param[in] user_data The user data -/// @see http_transaction_set_received_header_cb() -typedef http_transaction_header_cb - = ffi.Pointer>; -typedef http_transaction_header_cbFunction = ffi.Void Function( - http_transaction_h http_transaction, - ffi.Pointer header, - ffi.Size header_len, - ffi.Pointer user_data); -typedef Darthttp_transaction_header_cbFunction = void Function( - http_transaction_h http_transaction, - ffi.Pointer header, - int header_len, - ffi.Pointer user_data); - -/// @brief Called when the HTTP response is received. -/// @since_tizen 3.0 -/// @param[in] http_transaction The HTTP transaction handle -/// @param[in] body Response information of HTTP Transaction -/// @param[in] size Size in bytes of each element to be written -/// @param[in] count Number of elements, each one with a size of size bytes -/// @param[in] user_data The user data -/// @see http_transaction_set_received_body_cb() -typedef http_transaction_body_cb - = ffi.Pointer>; -typedef http_transaction_body_cbFunction = ffi.Void Function( - http_transaction_h http_transaction, - ffi.Pointer body, - ffi.Size size, - ffi.Size count, - ffi.Pointer user_data); -typedef Darthttp_transaction_body_cbFunction = void Function( - http_transaction_h http_transaction, - ffi.Pointer body, - int size, - int count, - ffi.Pointer user_data); - -/// @brief Called when the HTTP ready to write event is received. -/// @since_tizen 3.0 -/// @param[in] http_transaction The HTTP transaction handle -/// @param[in] recommended_chunk_size Recommended chunk length(bytes) of the HTTP transaction -/// @param[in] user_data The user data -/// @see http_transaction_set_uploaded_cb() -typedef http_transaction_write_cb - = ffi.Pointer>; -typedef http_transaction_write_cbFunction = ffi.Void Function( - http_transaction_h http_transaction, - ffi.Int recommended_chunk_size, - ffi.Pointer user_data); -typedef Darthttp_transaction_write_cbFunction = void Function( - http_transaction_h http_transaction, - int recommended_chunk_size, - ffi.Pointer user_data); - -/// @brief Called when the HTTP transaction is completed. -/// @since_tizen 3.0 -/// @param[in] http_transaction The HTTP transaction handle -/// @param[in] user_data The user data -/// @see http_transaction_set_completed_cb() -typedef http_transaction_completed_cb - = ffi.Pointer>; -typedef http_transaction_completed_cbFunction = ffi.Void Function( - http_transaction_h http_transaction, ffi.Pointer user_data); -typedef Darthttp_transaction_completed_cbFunction = void Function( - http_transaction_h http_transaction, ffi.Pointer user_data); - -/// @brief Called when the HTTP transaction is aborted. -/// @details Following error codes can be delivered. \n -/// #HTTP_ERROR_OPERATION_FAILED, \n -/// #HTTP_ERROR_COULDNT_RESOLVE_HOST, \n -/// #HTTP_ERROR_COULDNT_CONNECT, \n -/// #HTTP_ERROR_OPERATION_TIMEDOUT, \n -/// #HTTP_ERROR_SSL_CONNECT_ERROR. -/// @since_tizen 3.0 -/// @param[in] http_transaction The HTTP transaction handle -/// @param[in] error The error code about aborted reason -/// @param[in] user_data The user data -/// @see http_transaction_set_aborted_cb() -typedef http_transaction_aborted_cb - = ffi.Pointer>; -typedef http_transaction_aborted_cbFunction = ffi.Void Function( - http_transaction_h http_transaction, - ffi.Int32 error, - ffi.Pointer user_data); -typedef Darthttp_transaction_aborted_cbFunction = void Function( - http_transaction_h http_transaction, - int error, - ffi.Pointer user_data); - -/// @brief Called to notify when the content body of the response message is being downloaded or uploaded. -/// @since_tizen 3.0 -/// @param[in] http_transaction The HTTP transaction handle -/// @param[in] download_total The total length of the data (in bytes) to download -/// @param[in] download_now The current length of the downloaded data (in bytes) -/// @param[in] upload_total The total length of the data (in bytes) to upload -/// @param[in] upload_now The current length of the uploaded data (in bytes) -/// @param[in] user_data The user data -/// @see http_transaction_set_progress_cb() -typedef http_transaction_progress_cb - = ffi.Pointer>; -typedef http_transaction_progress_cbFunction = ffi.Void Function( - http_transaction_h http_transaction, - ffi.Double download_total, - ffi.Double download_now, - ffi.Double upload_total, - ffi.Double upload_now, - ffi.Pointer user_data); -typedef Darthttp_transaction_progress_cbFunction = void Function( - http_transaction_h http_transaction, - double download_total, - double download_now, - double upload_total, - double upload_now, - ffi.Pointer user_data); - -/// @brief Enumeration for type of observation. -/// @since_tizen 3.0 -abstract class iotcon_observe_type_e { - /// < Indicates no option - static const int IOTCON_OBSERVE_NO_TYPE = 0; - - /// < Indicates action of registering observation - static const int IOTCON_OBSERVE_REGISTER = 1; - - /// < Indicates action of unregistering observation - static const int IOTCON_OBSERVE_DEREGISTER = 2; -} - -/// @brief Enumeration for policy of observation. -/// @since_tizen 3.0 -abstract class iotcon_observe_policy_e { - /// < Indicates observation request for most up-to-date notifications only - static const int IOTCON_OBSERVE_IGNORE_OUT_OF_ORDER = 0; - - /// < Indicates observation request for all notifications including state notifications - static const int IOTCON_OBSERVE_ACCEPT_OUT_OF_ORDER = 1; -} - -/// @brief Enumeration for connectivities which can be held in a resource. -/// @remarks IOTCON_CONNECTIVITY_PREFER_UDP and IOTCON_CONNECTIVITY_PREFER_TCP should be mutually exclusive. -/// @remarks IOTCON_CONNECTIVITY_IPV4_ONLY and IOTCON_CONNECTIVITY_IPV6_ONLY should be mutually exclusive. -/// @since_tizen 3.0 -abstract class iotcon_connectivity_type_e { - /// < Indicates all connectivities - static const int IOTCON_CONNECTIVITY_ALL = 0; - - /// < Indicates Internet Protocol connectivity - static const int IOTCON_CONNECTIVITY_IP = 1; - - /// < It is related to IOTCON_CONNECTIVITY_IP, and it indicates UDP is preferred - static const int IOTCON_CONNECTIVITY_PREFER_UDP = 65536; - - /// < It is related to IOTCON_CONNECTIVITY_IP, and it indicates TCP is preferred - static const int IOTCON_CONNECTIVITY_PREFER_TCP = 131072; - - /// < When this bit is set with IOTCON_CONNECTIVITY_IP, resources are discovered for IPv4 - static const int IOTCON_CONNECTIVITY_IPV4_ONLY = 262144; - - /// < When this bit is set with IOTCON_CONNECTIVITY_IP, resources are discovered for IPv6 - static const int IOTCON_CONNECTIVITY_IPV6_ONLY = 524288; -} - -/// @brief Enumeration for policy which can be held in a resource. -/// @since_tizen 3.0 -abstract class iotcon_resource_policy_e { - /// < Indicates resource uninitialized - static const int IOTCON_RESOURCE_NO_POLICY = 0; - - /// < Indicates resource that is allowed to be discovered - static const int IOTCON_RESOURCE_DISCOVERABLE = 1; - - /// < Indicates resource that is allowed to be observed - static const int IOTCON_RESOURCE_OBSERVABLE = 2; - - /// < Indicates resource initialized and activated - static const int IOTCON_RESOURCE_ACTIVE = 4; - - /// < Indicates resource which takes some delay to respond - static const int IOTCON_RESOURCE_SLOW = 8; - - /// < Indicates secure resource - static const int IOTCON_RESOURCE_SECURE = 16; - - /// < When this bit is set, the resource is allowed to be discovered only if discovery request contains an explicit querystring. - static const int IOTCON_RESOURCE_EXPLICIT_DISCOVERABLE = 32; -} - -/// @brief Enumeration for type of request. -/// @since_tizen 3.0 -abstract class iotcon_request_type_e { - /// < Indicates none - static const int IOTCON_REQUEST_UNKNOWN = 0; - - /// < Indicates get method of request - static const int IOTCON_REQUEST_GET = 1; - - /// < Indicates put method of request - static const int IOTCON_REQUEST_PUT = 2; - - /// < Indicates post method of request - static const int IOTCON_REQUEST_POST = 3; - - /// < Indicates delete method of request - static const int IOTCON_REQUEST_DELETE = 4; -} - -/// @brief Enumeration for result of response. -/// @since_tizen 3.0 -abstract class iotcon_response_result_e { - /// < Indicates result of response for success - static const int IOTCON_RESPONSE_OK = 0; - - /// < Indicates result of response for error - static const int IOTCON_RESPONSE_ERROR = 1; - - /// < Indicates result of response for resource creation - static const int IOTCON_RESPONSE_RESOURCE_CREATED = 2; - - /// < Indicates result of response for resource deletion - static const int IOTCON_RESPONSE_RESOURCE_DELETED = 3; - - /// < Indicates result of response for resource change - static const int IOTCON_RESPONSE_RESOURCE_CHANGED = 4; - - /// < Indicates result of response for slow resource - static const int IOTCON_RESPONSE_SLOW = 5; - - /// < Indicates result of response for accessing unauthorized resource - static const int IOTCON_RESPONSE_FORBIDDEN = 6; -} - -/// @brief Enumeration for result of presence. -/// @since_tizen 3.0 -abstract class iotcon_presence_result_e { - /// < Indicates for successful action of presence - static const int IOTCON_PRESENCE_OK = 0; - - /// < Indicates for stopped action of presence - static const int IOTCON_PRESENCE_STOPPED = 1; - - /// < Indicates for no response of presence for some time - static const int IOTCON_PRESENCE_TIMEOUT = 2; -} - -/// @brief Enumeration for operation of presence response. -/// @since_tizen 3.0 -abstract class iotcon_presence_trigger_e { - /// < Indicates for resource creation operation of server - static const int IOTCON_PRESENCE_RESOURCE_CREATED = 0; - - /// < Indicates for resource update operation of server - static const int IOTCON_PRESENCE_RESOURCE_UPDATED = 1; - - /// < Indicates for resource destruction operation of server - static const int IOTCON_PRESENCE_RESOURCE_DESTROYED = 2; -} - -/// @brief Enumeration for types of representation that is possible to have. -/// @since_tizen 3.0 -abstract class iotcon_type_e { - /// < Indicates for representation that have no type - static const int IOTCON_TYPE_NONE = 0; - - /// < Indicates for representation that have int type - static const int IOTCON_TYPE_INT = 1; - - /// < Indicates for representation that have bool type - static const int IOTCON_TYPE_BOOL = 2; - - /// < Indicates for representation that have double type - static const int IOTCON_TYPE_DOUBLE = 3; - - /// < Indicates for representation that have string type - static const int IOTCON_TYPE_STR = 4; - - /// < Indicates for representation that have byte string type - static const int IOTCON_TYPE_BYTE_STR = 5; - - /// < Indicates for representation that have null type - static const int IOTCON_TYPE_NULL = 6; - - /// < Indicates for representation that have list type - static const int IOTCON_TYPE_LIST = 7; - - /// < Indicates for representation that have another representation type - static const int IOTCON_TYPE_ATTRIBUTES = 8; -} - -/// @brief Enumeration for properties of device information. -/// @since_tizen 3.0 -abstract class iotcon_device_info_e { - /// < Indicates human friendly name for device - static const int IOTCON_DEVICE_INFO_NAME = 0; - - /// < Indicates spec version of the core specification - static const int IOTCON_DEVICE_INFO_SPEC_VER = 1; - - /// < Indicates unique identifier for OCF device - static const int IOTCON_DEVICE_INFO_ID = 2; - - /// < Indicates version of the specs this device data model is implemented to - static const int IOTCON_DEVICE_INFO_DATA_MODEL_VER = 3; -} - -/// @brief Enumeration for properties of platform information. -/// @since_tizen 3.0 -abstract class iotcon_platform_info_e { - /// < Indicates platform identifier - static const int IOTCON_PLATFORM_INFO_ID = 0; - - /// < Indicates name of manufacturer - static const int IOTCON_PLATFORM_INFO_MANUF_NAME = 1; - - /// < Indicates URL to manufacturer - static const int IOTCON_PLATFORM_INFO_MANUF_URL = 2; - - /// < Indicates model number as designated by manufacturer - static const int IOTCON_PLATFORM_INFO_MODEL_NUMBER = 3; - - /// < Indicates manufacturing date of device - static const int IOTCON_PLATFORM_INFO_DATE_OF_MANUF = 4; - - /// < Indicates version of platform defined by manufacturer - static const int IOTCON_PLATFORM_INFO_PLATFORM_VER = 5; - - /// < Indicates version of platform resident OS - static const int IOTCON_PLATFORM_INFO_OS_VER = 6; - - /// < Indicates version of platform hardware - static const int IOTCON_PLATFORM_INFO_HARDWARE_VER = 7; - - /// < Indicates version of device firmware - static const int IOTCON_PLATFORM_INFO_FIRMWARE_VER = 8; - - /// < Indicates URL that points to support information from manufacturer - static const int IOTCON_PLATFORM_INFO_SUPPORT_URL = 9; - - /// < Indicates reference time for the device - static const int IOTCON_PLATFORM_INFO_SYSTEM_TIME = 10; -} - -/// @brief Enumeration for states of remote resource. -/// @since_tizen 3.0 -abstract class iotcon_remote_resource_state_e { - /// < Indicates remote resource is alive - static const int IOTCON_REMOTE_RESOURCE_ALIVE = 0; - - /// < Indicates remote resource is lost - static const int IOTCON_REMOTE_RESOURCE_LOST_SIGNAL = 1; -} - -/// @brief Enumeration for quality of service. -/// @since_tizen 3.0 -abstract class iotcon_qos_e { - /// < Indicates low quality of service - static const int IOTCON_QOS_LOW = 0; - - /// < Indicates high quality of service - static const int IOTCON_QOS_HIGH = 1; -} - -final class icl_resource extends ffi.Opaque {} - -final class icl_lite_resource extends ffi.Opaque {} - -final class icl_resource_response extends ffi.Opaque {} - -final class icl_observers extends ffi.Opaque {} - -final class icl_resource_request extends ffi.Opaque {} - -final class icl_remote_resource extends ffi.Opaque {} - -final class icl_presence extends ffi.Opaque {} - -final class icl_presence_response extends ffi.Opaque {} - -final class icl_device_info extends ffi.Opaque {} - -final class icl_platform_info extends ffi.Opaque {} - -final class icl_resource_ifaces extends ffi.Opaque {} - -final class icl_resource_types extends ffi.Opaque {} - -final class icl_options extends ffi.Opaque {} - -final class icl_query extends ffi.Opaque {} - -final class icl_representation_s extends ffi.Opaque {} - -final class icl_list_s extends ffi.Opaque {} - -final class icl_attributes_s extends ffi.Opaque {} - -/// @brief The iotcon_value_h type values list handle. -/// @details @a iotcon_list_h is an opaque data structure. -/// @since_tizen 3.0 -typedef iotcon_list_h = ffi.Pointer; - -/// @brief The attributes handle. -/// @details @a iotcon_attributes_h is an opaque data structure to have attribute value map. -/// Attribute value map consists of a key and a value. -/// Datatype of the key is string and the value should be one of them #IOTCON_TYPE_INT, -/// #IOTCON_TYPE_BOOL, #IOTCON_TYPE_DOUBLE, #IOTCON_TYPE_STR, #IOTCON_TYPE_NULL, -/// #IOTCON_TYPE_LIST and #IOTCON_TYPE_ATTRIBUTES. -/// @since_tizen 3.0 -typedef iotcon_attributes_h = ffi.Pointer; - -/// @brief Specifies the type of function passed to iotcon_list_foreach_int(). -/// @since_tizen 3.0 -/// @param[in] pos The number of the integer value (0 being the first) -/// @param[in] value The integer value -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_list_foreach_int() will invoke this callback function. -/// @see iotcon_list_foreach_int() -typedef iotcon_list_int_cb - = ffi.Pointer>; -typedef iotcon_list_int_cbFunction = ffi.Bool Function( - ffi.Int pos, ffi.Int value, ffi.Pointer user_data); -typedef Dartiotcon_list_int_cbFunction = bool Function( - int pos, int value, ffi.Pointer user_data); - -/// @brief Specifies the type of function passed to iotcon_list_foreach_bool(). -/// @since_tizen 3.0 -/// @param[in] pos The number of the boolean value (0 being the first) -/// @param[in] value The boolean value -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_list_foreach_bool() will invoke this callback function. -/// @see iotcon_list_foreach_bool() -typedef iotcon_list_bool_cb - = ffi.Pointer>; -typedef iotcon_list_bool_cbFunction = ffi.Bool Function( - ffi.Int pos, ffi.Bool value, ffi.Pointer user_data); -typedef Dartiotcon_list_bool_cbFunction = bool Function( - int pos, bool value, ffi.Pointer user_data); - -/// @brief Specifies the type of function passed to iotcon_list_foreach_double(). -/// @since_tizen 3.0 -/// @param[in] pos The number of the double value (0 being the first) -/// @param[in] value The double value -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_list_foreach_double() will invoke this callback function. -/// @see iotcon_list_foreach_double() -typedef iotcon_list_double_cb - = ffi.Pointer>; -typedef iotcon_list_double_cbFunction = ffi.Bool Function( - ffi.Int pos, ffi.Double value, ffi.Pointer user_data); -typedef Dartiotcon_list_double_cbFunction = bool Function( - int pos, double value, ffi.Pointer user_data); - -/// @brief Specifies the type of function passed to iotcon_list_foreach_byte_str(). -/// @since_tizen 3.0 -/// @param[in] pos The number of the string value (0 being the first) -/// @param[in] value The byte string value -/// @param[in] len The length of @a value -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_list_foreach_byte_str() will invoke this callback function. -/// @see iotcon_list_foreach_byte_str() -typedef iotcon_list_byte_str_cb - = ffi.Pointer>; -typedef iotcon_list_byte_str_cbFunction = ffi.Bool Function( - ffi.Int pos, - ffi.Pointer value, - ffi.Int len, - ffi.Pointer user_data); -typedef Dartiotcon_list_byte_str_cbFunction = bool Function( - int pos, - ffi.Pointer value, - int len, - ffi.Pointer user_data); - -/// @brief Specifies the type of function passed to iotcon_list_foreach_str(). -/// @since_tizen 3.0 -/// @param[in] pos The number of the string value (0 being the first) -/// @param[in] value The string value -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_list_foreach_str() will invoke this callback function. -/// @see iotcon_list_foreach_str() -typedef iotcon_list_str_cb - = ffi.Pointer>; -typedef iotcon_list_str_cbFunction = ffi.Bool Function( - ffi.Int pos, ffi.Pointer value, ffi.Pointer user_data); -typedef Dartiotcon_list_str_cbFunction = bool Function( - int pos, ffi.Pointer value, ffi.Pointer user_data); - -/// @brief Specifies the type of function passed to iotcon_list_foreach_list(). -/// @since_tizen 3.0 -/// @param[in] pos The number of the list value (0 being the first) -/// @param[in] value The list value -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_list_foreach_list() will invoke this callback function. -/// @see iotcon_list_foreach_list() -typedef iotcon_list_list_cb - = ffi.Pointer>; -typedef iotcon_list_list_cbFunction = ffi.Bool Function( - ffi.Int pos, iotcon_list_h value, ffi.Pointer user_data); -typedef Dartiotcon_list_list_cbFunction = bool Function( - int pos, iotcon_list_h value, ffi.Pointer user_data); - -/// @brief Specifies the type of function passed to iotcon_list_foreach_attributes(). -/// @since_tizen 3.0 -/// @param[in] pos The number of the attributes value (0 being the first) -/// @param[in] value The attributes value -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_list_foreach_attributes() will invoke this callback function. -/// @see iotcon_list_foreach_attributes() -typedef iotcon_list_attributes_cb - = ffi.Pointer>; -typedef iotcon_list_attributes_cbFunction = ffi.Bool Function( - ffi.Int pos, iotcon_attributes_h value, ffi.Pointer user_data); -typedef Dartiotcon_list_attributes_cbFunction = bool Function( - int pos, iotcon_attributes_h value, ffi.Pointer user_data); - -/// @brief The query handle. -/// @details @a iotcon_query_h is an opaque data structure to have attribute value map which consists of key and value. -/// Datatype of both key and value are string. -/// @a iotcon_query_h also have length. -/// The length is total length of all keys and values of map. -/// The length should be less than or equal to 64. -/// @since_tizen 3.0 -typedef iotcon_query_h = ffi.Pointer; - -/// @brief Specifies the type of function passed to iotcon_query_foreach(). -/// @since_tizen 3.0 -/// @param[in] key The key of the query -/// @param[in] value The value of the query -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_query_foreach() will invoke this callback function. -/// @see iotcon_query_foreach() -typedef iotcon_query_foreach_cb - = ffi.Pointer>; -typedef iotcon_query_foreach_cbFunction = ffi.Bool Function( - ffi.Pointer key, - ffi.Pointer value, - ffi.Pointer user_data); -typedef Dartiotcon_query_foreach_cbFunction = bool Function( - ffi.Pointer key, - ffi.Pointer value, - ffi.Pointer user_data); - -/// @brief Specifies the type of function passed to iotcon_attributes_foreach(). -/// @since_tizen 3.0 -/// @param[in] attributes The attributes handle -/// @param[in] key The key -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_attributes_foreach() will invoke this callback function. -/// @see iotcon_attributes_foreach() -typedef iotcon_attributes_cb - = ffi.Pointer>; -typedef iotcon_attributes_cbFunction = ffi.Bool Function( - iotcon_attributes_h attributes, - ffi.Pointer key, - ffi.Pointer user_data); -typedef Dartiotcon_attributes_cbFunction = bool Function( - iotcon_attributes_h attributes, - ffi.Pointer key, - ffi.Pointer user_data); - -/// @brief The options handle. -/// @details @a iotcon_options_h is an opaque data structure to have attribute value map which consists of a key and a value. -/// Datatype of key is an integer and value is string. -/// @since_tizen 3.0 -typedef iotcon_options_h = ffi.Pointer; - -/// @brief Specifies the type of function passed to iotcon_options_foreach(). -/// @since_tizen 3.0 -/// @param[in] id The information of the option -/// @param[in] data The data of the option -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_options_foreach() will invoke this callback function. -/// @see iotcon_options_foreach() -typedef iotcon_options_foreach_cb - = ffi.Pointer>; -typedef iotcon_options_foreach_cbFunction = ffi.Bool Function( - ffi.UnsignedShort id, - ffi.Pointer data, - ffi.Pointer user_data); -typedef Dartiotcon_options_foreach_cbFunction = bool Function( - int id, ffi.Pointer data, ffi.Pointer user_data); - -/// @brief The representation handle. -/// @details @a iotcon_representation_h is an opaque data structure to have uri_path, list of resource types and interfaces. -/// It could contain other representation as children. -/// @since_tizen 3.0 -typedef iotcon_representation_h = ffi.Pointer; - -/// @brief The resource types handle. -/// @details @a iotcon_resource_types_h is an opaque data structure to have list of resource types. A resource type is datatype of string. -/// @since_tizen 3.0 -typedef iotcon_resource_types_h = ffi.Pointer; - -/// @brief The resource interface handle. -/// @details @a iotcon_resource_interfaces_h is an opaque data structure to have list of resource interfaces. A resource interface is datatype of string. -/// @since_tizen 3.0 -typedef iotcon_resource_interfaces_h = ffi.Pointer; - -/// @brief Specifies the type of function passed to iotcon_representation_foreach_children(). -/// @since_tizen 3.0 -/// @param[in] child The child Representation handle -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_representation_foreach_children() will invoke this callback function. -/// @see iotcon_representation_foreach_children() -typedef iotcon_children_cb - = ffi.Pointer>; -typedef iotcon_children_cbFunction = ffi.Bool Function( - iotcon_representation_h child, ffi.Pointer user_data); -typedef Dartiotcon_children_cbFunction = bool Function( - iotcon_representation_h child, ffi.Pointer user_data); - -/// @brief Specifies the type of function passed to iotcon_resource_types_foreach(). -/// @since_tizen 3.0 -/// @param[in] type The value of the resource types -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_resource_types_foreach() will invoke this callback function. -/// @see iotcon_resource_types_foreach() -typedef iotcon_resource_types_foreach_cb - = ffi.Pointer>; -typedef iotcon_resource_types_foreach_cbFunction = ffi.Bool Function( - ffi.Pointer type, ffi.Pointer user_data); -typedef Dartiotcon_resource_types_foreach_cbFunction = bool Function( - ffi.Pointer type, ffi.Pointer user_data); - -/// @brief Specifies the iface of function passed to iotcon_resource_interfaces_foreach(). -/// @since_tizen 3.0 -/// @remarks @a iface could be a value such as #IOTCON_INTERFACE_DEFAULT. -/// @param[in] iface The value of the resource ifaces -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_resource_interfaces_foreach() will invoke this callback function. -/// @see iotcon_resource_interfaces_foreach() -typedef iotcon_resource_interfaces_foreach_cb = ffi - .Pointer>; -typedef iotcon_resource_interfaces_foreach_cbFunction = ffi.Bool Function( - ffi.Pointer iface, ffi.Pointer user_data); -typedef Dartiotcon_resource_interfaces_foreach_cbFunction = bool Function( - ffi.Pointer iface, ffi.Pointer user_data); - -/// @ingroup CAPI_IOT_CONNECTIVITY_MODULE -/// @brief Enumeration for IoTCon error code. -/// @since_tizen 3.0 -/// @{ -abstract class iotcon_error_e { - /// < Successful - static const int IOTCON_ERROR_NONE = 0; - - /// < I/O error - static const int IOTCON_ERROR_IO_ERROR = -5; - - /// < Out of memory - static const int IOTCON_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied - static const int IOTCON_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int IOTCON_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Invalid parameter - static const int IOTCON_ERROR_INVALID_PARAMETER = -22; - - /// < No data available - static const int IOTCON_ERROR_NO_DATA = -61; - - /// < Time out - static const int IOTCON_ERROR_TIMEOUT = -1073741823; - - /// < IoTivity errors - static const int IOTCON_ERROR_IOTIVITY = -29884415; - - /// < Representation errors - static const int IOTCON_ERROR_REPRESENTATION = -29884414; - - /// < Invalid type - static const int IOTCON_ERROR_INVALID_TYPE = -29884413; - - /// < Already - static const int IOTCON_ERROR_ALREADY = -29884412; - - /// < System errors - static const int IOTCON_ERROR_SYSTEM = -29884410; -} - -/// @brief Specifies the type of function passed to iotcon_resource_create() and iotcon_resource_set_request_handler(). -/// @details Called when server receives request from the client. -/// @since_tizen 3.0 -/// @param[in] resource The resource requested -/// @param[in] request The request from client -/// @param[in] user_data The user data to pass to the function -/// @pre The callback must be registered using iotcon_resource_create() -/// @see iotcon_resource_create() -/// @see iotcon_resource_set_request_handler() -typedef iotcon_request_handler_cb - = ffi.Pointer>; -typedef iotcon_request_handler_cbFunction = ffi.Void Function( - iotcon_resource_h resource, - iotcon_request_h request, - ffi.Pointer user_data); -typedef Dartiotcon_request_handler_cbFunction = void Function( - iotcon_resource_h resource, - iotcon_request_h request, - ffi.Pointer user_data); - -/// @brief The resource handle. -/// @details @a iotcon_resource_h is an opaque data structure to represent registered resource by server. -/// A resource has host_address, uri_path, resource types, interfaces and internal handle. -/// If observable attribute of resource is true, client can observe this resource. -/// When client requests by CRUD functions, handler will be invoked if registered. -/// It could contain other resource as children. -/// @since_tizen 3.0 -typedef iotcon_resource_h = ffi.Pointer; - -/// @brief The request handle. -/// @details @a iotcon_request_h is an opaque data structure to request to a particular resource. -/// @a iotcon_request_h is a data type of client's request which consists of header options, query, representation. -/// @since_tizen 3.0 -typedef iotcon_request_h = ffi.Pointer; - -/// @brief The observers handle. -/// @details The list of observer IDs. -/// @since_tizen 3.0 -typedef iotcon_observers_h = ffi.Pointer; - -/// @brief Specifies the type of function passed to iotcon_lite_resource_create(). -/// @since_tizen 3.0 -/// @param[in] resource The handle of the lite resource -/// @param[in] attributes The attributes of the lite resource -/// @param[in] user_data The user data to pass to the function -/// @return @c true to accept post request, -/// otherwise @c false to reject it -/// @pre The callback must be registered using iotcon_lite_resource_create(). -/// @see iotcon_lite_resource_create() -typedef iotcon_lite_resource_post_request_cb = ffi - .Pointer>; -typedef iotcon_lite_resource_post_request_cbFunction = ffi.Bool Function( - iotcon_lite_resource_h resource, - iotcon_attributes_h attributes, - ffi.Pointer user_data); -typedef Dartiotcon_lite_resource_post_request_cbFunction = bool Function( - iotcon_lite_resource_h resource, - iotcon_attributes_h attributes, - ffi.Pointer user_data); - -/// @brief The lite resource handle. -/// @details @a iotcon_lite_resource_h is an opaque data structure to represent registered resource by server. -/// A resource has host_address, uri_path, resource types, and internal handle. -/// If observable attribute of resource is true, client can observe this resource. -/// @since_tizen 3.0 -typedef iotcon_lite_resource_h = ffi.Pointer; - -/// @brief The response handle. -/// @details @a iotcon_response_h is an opaque data structure to respond to client. -/// @a iotcon_response_h is a data type of server's response which consists of result, header options, query, representation. -/// @since_tizen 3.0 -typedef iotcon_response_h = ffi.Pointer; - -/// @brief The remote resource handle. -/// @details When Client is successful to find out resource from remote server, server's resource information is reorganized as @a iotcon_remote_resource_h by IoTCon. -/// Client can request CRUD to server by using this. -/// @a iotcon_remote_resource_h is an opaque data structure to have host_address, uri_path, resource types, interfaces, options and device id. -/// If observable attribute is true, remote resource is observable. -/// When you observe remote resource, observe_handle will be set. -/// @since_tizen 3.0 -typedef iotcon_remote_resource_h = ffi.Pointer; - -/// @brief Specifies the type of observe callback passed to iotcon_remote_resource_observe_register(). -/// The @a err could be one of #iotcon_error_e. \n -/// The @a response is created by a server. Therefore, you can't get any values that the server didn't set. -/// @since_tizen 3.0 -/// @param[in] resource The handle of the remote resource -/// @param[in] err The error code -/// @param[in] sequence_number The sequence number of observe -/// @param[in] response The handle of the response -/// @param[in] user_data The user data passed from the callback registration function -/// @pre The callback must be registered using iotcon_remote_resource_observe_register() -/// @see iotcon_remote_resource_observe_register() -/// @see iotcon_remote_resource_observe_deregister() -/// @see iotcon_resource_notify() -typedef iotcon_remote_resource_observe_cb = ffi - .Pointer>; -typedef iotcon_remote_resource_observe_cbFunction = ffi.Void Function( - iotcon_remote_resource_h resource, - ffi.Int32 err, - ffi.Int sequence_number, - iotcon_response_h response, - ffi.Pointer user_data); -typedef Dartiotcon_remote_resource_observe_cbFunction = void Function( - iotcon_remote_resource_h resource, - int err, - int sequence_number, - iotcon_response_h response, - ffi.Pointer user_data); - -/// @brief Specifies the type of response function. -/// @details The function passed to iotcon_remote_resource_get(), iotcon_remote_resource_put(), -/// iotcon_remote_resource_post(), iotcon_remote_resource_delete().\n -/// The @a err could be one of #iotcon_error_e.\n -/// The @a request_type could be one of #iotcon_request_type_e.\n -/// The @a response is created by a server. Therefore, you can't get any values that the server didn't set. -/// @since_tizen 3.0 -/// @param[in] resource The handle of the resource -/// @param[in] err The error code -/// @param[in] request_type The request type -/// @param[in] response The handle of the response -/// @param[in] user_data The user data passed from the callback registration function -/// @pre The callback must be registered using iotcon_remote_resource_get(), iotcon_remote_resource_put(), iotcon_remote_resource_post(), iotcon_remote_resource_delete(). -/// @see iotcon_remote_resource_get() -/// @see iotcon_remote_resource_put() -/// @see iotcon_remote_resource_post() -/// @see iotcon_remote_resource_delete() -typedef iotcon_remote_resource_response_cb = ffi - .Pointer>; -typedef iotcon_remote_resource_response_cbFunction = ffi.Void Function( - iotcon_remote_resource_h resource, - ffi.Int32 err, - ffi.Int32 request_type, - iotcon_response_h response, - ffi.Pointer user_data); -typedef Dartiotcon_remote_resource_response_cbFunction = void Function( - iotcon_remote_resource_h resource, - int err, - int request_type, - iotcon_response_h response, - ffi.Pointer user_data); - -/// @brief Specifies the type of function passed to iotcon_remote_resource_start_caching(). -/// @since_tizen 3.0 -/// @param[in] resource The handle of the remote resource -/// @param[in] representation The handle of the representation -/// @param[in] user_data The user data to pass to the function -/// @pre The callback must be registered using iotcon_remote_resource_start_caching() -/// @see iotcon_remote_resource_start_caching() -/// @see iotcon_remote_resource_stop_caching() -typedef iotcon_remote_resource_cached_representation_changed_cb = ffi.Pointer< - ffi.NativeFunction< - iotcon_remote_resource_cached_representation_changed_cbFunction>>; -typedef iotcon_remote_resource_cached_representation_changed_cbFunction - = ffi.Void Function( - iotcon_remote_resource_h resource, - iotcon_representation_h representation, - ffi.Pointer user_data); -typedef Dartiotcon_remote_resource_cached_representation_changed_cbFunction - = void Function( - iotcon_remote_resource_h resource, - iotcon_representation_h representation, - ffi.Pointer user_data); - -/// @brief Specifies the type of function passed to iotcon_remote_resource_start_monitoring(). -/// @since_tizen 3.0 -/// @param[in] resource The handle of the remote resource -/// @param[in] state The state of the remote resource -/// @param[in] user_data The user data to pass to the function -/// @pre The callback must be registered using iotcon_remote_resource_start_monitoring() -/// @see iotcon_remote_resource_start_monitoring() -/// @see iotcon_remote_resource_stop_monitoring() -typedef iotcon_remote_resource_state_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef iotcon_remote_resource_state_changed_cbFunction = ffi.Void Function( - iotcon_remote_resource_h resource, - ffi.Int32 state, - ffi.Pointer user_data); -typedef Dartiotcon_remote_resource_state_changed_cbFunction = void Function( - iotcon_remote_resource_h resource, - int state, - ffi.Pointer user_data); - -/// @brief Specifies the type of function passed to iotcon_add_presence_cb(). -/// @details Called when client receives presence events from the server. -/// The @a response handle contains presence information. -/// @since_tizen 3.0 -/// @param[in] presence The presence handle -/// @param[in] err The error code(@c 0 on success, otherwise a negative error value) -/// @param[in] response The presence response handle -/// @param[in] user_data The user data to pass to the function -/// @pre The callback must be registered using iotcon_add_presence_cb(). -/// @see iotcon_add_presence_cb() -/// @see iotcon_remove_presence_cb() -/// @see iotcon_presence_response_get_connectivity_type() -/// @see iotcon_presence_response_get_host_address() -/// @see iotcon_presence_response_get_resource_type() -/// @see iotcon_presence_response_get_result() -/// @see iotcon_presence_response_get_trigger() -typedef iotcon_presence_cb - = ffi.Pointer>; -typedef iotcon_presence_cbFunction = ffi.Void Function( - iotcon_presence_h presence, - ffi.Int32 err, - iotcon_presence_response_h response, - ffi.Pointer user_data); -typedef Dartiotcon_presence_cbFunction = void Function( - iotcon_presence_h presence, - int err, - iotcon_presence_response_h response, - ffi.Pointer user_data); - -/// @brief The presence handle. -/// @details @a iotcon_presence_h is a handle of presence subscription. -/// It is used to cancel presence. -/// @since_tizen 3.0 -typedef iotcon_presence_h = ffi.Pointer; - -/// @brief The presence response handle. -/// @details @a iotcon_presence_response_h is a handle of presence response subscription. \n -/// It is used to get the information of presence response from server. -/// @since_tizen 3.0 -typedef iotcon_presence_response_h = ffi.Pointer; - -/// @brief Specifies the type of function passed to iotcon_find_resource(). -/// @details Called when a resource is found from the remote server. \n -/// The @a resource completes its life cycle in the function. -/// If you want to send requests(GET, PUT, POST, DELETE, and OBSERVE) on the @a resource, -/// you must clone the @a resource using iotcon_remote_resource_clone(). \n -/// The @a result could be one of #iotcon_error_e. -/// @since_tizen 3.0 -/// @param[in] resource The handle of resource which is found -/// @param[in] result The result code (Lesser than 0 on fail, otherwise a response result value) -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue to find resource, -/// otherwise @c false to stop \n -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre The callback must be registered using iotcon_find_resource() -/// @see iotcon_find_resource() -typedef iotcon_found_resource_cb - = ffi.Pointer>; -typedef iotcon_found_resource_cbFunction = ffi.Bool Function( - iotcon_remote_resource_h resource, - ffi.Int32 result, - ffi.Pointer user_data); -typedef Dartiotcon_found_resource_cbFunction = bool Function( - iotcon_remote_resource_h resource, - int result, - ffi.Pointer user_data); - -/// @brief Specifies the type of function passed to iotcon_find_device_info(). -/// @details The @a result could be one of #iotcon_error_e. -/// @since_tizen 3.0 -/// @param[in] device_info The device information from remote server -/// @param[in] result The result code (@c 0 on success, otherwise a negative error value) -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue to find device information, -/// otherwise @c false to stop \n -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_find_device_info() will invoke this callback function. -/// @see iotcon_find_device_info() -/// @see iotcon_device_info_get_property() -typedef iotcon_device_info_cb - = ffi.Pointer>; -typedef iotcon_device_info_cbFunction = ffi.Bool Function( - iotcon_device_info_h device_info, - ffi.Int32 result, - ffi.Pointer user_data); -typedef Dartiotcon_device_info_cbFunction = bool Function( - iotcon_device_info_h device_info, - int result, - ffi.Pointer user_data); - -/// @brief The device information handle. -/// @details @a iotcon_device_info_h is a handle of device information. -/// @since_tizen 3.0 -typedef iotcon_device_info_h = ffi.Pointer; - -/// @brief Specifies the type of function passed to iotcon_find_platform_info(). -/// @details The @a result could be one of #iotcon_error_e. -/// @since_tizen 3.0 -/// @param[in] platform_info The platform information from remote server -/// @param[in] result The result code (@c 0 on success, otherwise a negative error value) -/// @param[in] user_data The user data to pass to the function -/// @return @c true to continue to find platform information, -/// otherwise @c false to stop \n -/// #IOTCON_FUNC_CONTINUE and #IOTCON_FUNC_STOP are more friendly values for the return -/// @pre iotcon_find_platform_info() will invoke this callback function. -/// @see iotcon_find_platform_info() -/// @see iotcon_platform_info_get_property() -typedef iotcon_platform_info_cb - = ffi.Pointer>; -typedef iotcon_platform_info_cbFunction = ffi.Bool Function( - iotcon_platform_info_h platform_info, - ffi.Int32 result, - ffi.Pointer user_data); -typedef Dartiotcon_platform_info_cbFunction = bool Function( - iotcon_platform_info_h platform_info, - int result, - ffi.Pointer user_data); - -/// @brief The platform information handle. -/// @details @a iotcon_platform_info_h is a handle of platform information. -/// @since_tizen 3.0 -typedef iotcon_platform_info_h = ffi.Pointer; - -/// @brief Specifies the type of function passed to iotcon_add_generated_pin_cb(). -/// @details When a provisioning tool calls the function for registering this device, it is called, immediately. -/// @since_tizen 3.0 -/// @param[in] pin The pin number which is generated automatically -/// @param[in] user_data The user data to pass to the function -/// @pre The callback must be registered using iotcon_add_generated_pin_cb() -/// @see iotcon_add_generated_pin_cb() -/// @see iotcon_remove_generated_pin_cb() -typedef iotcon_generated_pin_cb - = ffi.Pointer>; -typedef iotcon_generated_pin_cbFunction = ffi.Void Function( - ffi.Pointer pin, ffi.Pointer user_data); -typedef Dartiotcon_generated_pin_cbFunction = void Function( - ffi.Pointer pin, ffi.Pointer user_data); - -/// @brief Enumeration for Network Service Discovery SSDP error code. -/// @since_tizen 3.0 -abstract class ssdp_error_e { - /// < Successful - static const int SSDP_ERROR_NONE = 0; - - /// < Out of memory - static const int SSDP_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied - static const int SSDP_ERROR_PERMISSION_DENIED = -13; - - /// < Invalid function parameter - static const int SSDP_ERROR_INVALID_PARAMETER = -22; - - /// < Not supported - static const int SSDP_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Not initialized - static const int SSDP_ERROR_NOT_INITIALIZED = -29949951; - - /// < Operation failed - static const int SSDP_ERROR_OPERATION_FAILED = -29949948; - - /// < Service not found - static const int SSDP_ERROR_SERVICE_NOT_FOUND = -29949947; - - /// < Service already registered - static const int SSDP_ERROR_SERVICE_ALREADY_REGISTERED = -29949946; -} - -/// @brief Enumeration for Network Service Discovery SSDP service browse state. -/// @since_tizen 3.0 -abstract class ssdp_service_state_e { - /// < A new service is available - static const int SSDP_SERVICE_STATE_AVAILABLE = 0; - - /// < A service is not available - static const int SSDP_SERVICE_STATE_UNAVAILABLE = 1; -} - -/// @brief The SSDP service handle. -/// @since_tizen 3.0 -typedef ssdp_service_h = ffi.UnsignedInt; -typedef Dartssdp_service_h = int; - -/// @brief Called when the registration of SSDP service is finished. -/// @since_tizen 3.0 -/// @param[in] result The result of registration -/// @param[in] ssdp_service The SSDP local service handle -/// @param[in] user_data The user data passed from the request function -/// @see ssdp_register_local_service() -typedef ssdp_registered_cb - = ffi.Pointer>; -typedef ssdp_registered_cbFunction = ffi.Void Function(ffi.Int32 result, - ssdp_service_h ssdp_local_service, ffi.Pointer user_data); -typedef Dartssdp_registered_cbFunction = void Function(int result, - Dartssdp_service_h ssdp_local_service, ffi.Pointer user_data); - -/// @brief The SSDP browser handle. -/// @since_tizen 3.0 -typedef ssdp_browser_h = ffi.UnsignedInt; -typedef Dartssdp_browser_h = int; - -/// @brief Called when a service has become available or unavailable. -/// @since_tizen 3.0 -/// @param[in] state The state of found service -/// @param[in] ssdp_service The SSDP remote service handle -/// @param[in] user_data The user data passed from the request function -/// @see ssdp_start_browsing_service() -typedef ssdp_found_cb = ffi.Pointer>; -typedef ssdp_found_cbFunction = ffi.Void Function(ffi.Int32 state, - ssdp_service_h ssdp_remote_service, ffi.Pointer user_data); -typedef Dartssdp_found_cbFunction = void Function(int state, - Dartssdp_service_h ssdp_remote_service, ffi.Pointer user_data); - -/// @brief Enumeration for Smart Traffic Control (STC) error type. -/// @since_tizen 4.0 -abstract class stc_error_e { - /// < Successful - static const int STC_ERROR_NONE = 0; - - /// < Operation not permitted(1) - static const int STC_ERROR_NOT_PERMITTED = -1; - - /// < Out of memory(12) - static const int STC_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied(13) - static const int STC_ERROR_PERMISSION_DENIED = -13; - - /// < Device or resource busy(16) - static const int STC_ERROR_RESOURCE_BUSY = -16; - - /// < Invalid operation(38) - static const int STC_ERROR_INVALID_OPERATION = -38; - - /// < Invalid function parameter(22) - static const int STC_ERROR_INVALID_PARAMETER = -22; - - /// < Not supported - static const int STC_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Operation failed - static const int STC_ERROR_OPERATION_FAILED = -49807359; - - /// < Not initialized - static const int STC_ERROR_NOT_INITIALIZED = -49807358; - - /// < Already initialized - static const int STC_ERROR_ALREADY_INITIALIZED = -49807357; - - /// < In progress - static const int STC_ERROR_IN_PROGRESS = -49807356; -} - -/// @brief Enumeration for time period. -/// @since_tizen 4.0 -abstract class stc_time_period_e { - /// < Unknown - static const int STC_TIME_PERIOD_UNKNOWN = 0; - - /// < Hour - static const int STC_TIME_PERIOD_HOUR = 3600; - - /// < Day - static const int STC_TIME_PERIOD_DAY = 86400; - - /// < Week - static const int STC_TIME_PERIOD_WEEK = 604800; - - /// < Month - static const int STC_TIME_PERIOD_MONTH = 2419200; -} - -/// @brief Enumeration for network interface type. -/// @since_tizen 4.0 -abstract class stc_iface_type_e { - /// < Unknown interface - static const int STC_IFACE_UNKNOWN = 0; - - /// < Mobile data - static const int STC_IFACE_DATACALL = 1; - - /// < Wifi data - static const int STC_IFACE_WIFI = 2; - - /// < Wired interface - static const int STC_IFACE_WIRED = 3; - - /// < Bluetooth interface - static const int STC_IFACE_BLUETOOTH = 4; - - /// < Enumerate all network interface types - static const int STC_IFACE_ALL = 5; -} - -/// @brief Enumeration for network roaming type. -/// @since_tizen 4.0 -abstract class stc_roaming_type_e { - /// < Not in roaming - static const int STC_ROAMING_DISABLED = 0; - - /// < In roaming - static const int STC_ROAMING_ENABLED = 1; -} - -/// @brief Enumeration for hardware network protocol type. -/// @since_tizen 4.0 -abstract class stc_protocol_type_e { - /// < Network unknown - static const int STC_PROTOCOL_UNKNOWN = 0; - - /// < Network no service - static const int STC_PROTOCOL_DATACALL_NOSVC = 1; - - /// < Network emergency - static const int STC_PROTOCOL_DATACALL_EMERGENCY = 2; - - /// < Network search 1900 - static const int STC_PROTOCOL_DATACALL_SEARCH = 3; - - /// < Network 2G - static const int STC_PROTOCOL_DATACALL_2G = 4; - - /// < Network 2.5G - static const int STC_PROTOCOL_DATACALL_2_5G = 5; - - /// < Network EDGE - static const int STC_PROTOCOL_DATACALL_2_5G_EDGE = 6; - - /// < Network UMTS - static const int STC_PROTOCOL_DATACALL_3G = 7; - - /// < Network HSDPA - static const int STC_PROTOCOL_DATACALL_HSDPA = 8; - - /// < Network LTE - static const int STC_PROTOCOL_DATACALL_LTE = 9; -} - -/// @brief Enumeration for monitored process state. -/// @since_tizen 4.0 -abstract class stc_process_state_e { - /// < Unknown state - static const int STC_PROCESS_STATE_UNKNOWN = 0; - - /// < Foreground state - static const int STC_PROCESS_STATE_FOREGROUND = 1; - - /// < Background state - static const int STC_PROCESS_STATE_BACKGROUND = 2; -} - -/// @brief Enumeration for network connection period type. -/// @details Last received/sent mean counting data from the first connection of each interface. -/// @since_tizen 4.0 -abstract class stc_conn_period_e { - /// < Unknown period - static const int STC_CONN_PERIOD_UNKNOWN = 0; - - /// < Last received data - static const int STC_CONN_PERIOD_LAST_RECEIVED_DATA = 1; - - /// < Last sent data - static const int STC_CONN_PERIOD_LAST_SENT_DATA = 2; - - /// < Total received data - static const int STC_CONN_PERIOD_TOTAL_RECEIVED_DATA = 3; - - /// < Total sent data - static const int STC_CONN_PERIOD_TOTAL_SENT_DATA = 4; -} - -/// @brief Enumeration for return type of the callback. -/// @since_tizen 4.0 -abstract class stc_callback_ret_e { - /// < Cancel - static const int STC_CALLBACK_CANCEL = 0; - - /// < Continue - static const int STC_CALLBACK_CONTINUE = 1; -} - -/// @brief The smart traffic control handle. -/// @since_tizen 4.0 -typedef stc_h = ffi.Pointer; - -/// @brief The statistics rule handle. -/// @since_tizen 4.0 -typedef stc_stats_rule_h = ffi.Pointer; - -/// @brief Called for each available statistics information. -/// @since_tizen 4.0 -/// -/// @param[in] result The result, one of:\n -/// #STC_ERROR_INVALID_OPERATION No reply\n -/// #STC_ERROR_OPERATION_FAILED Operation failed\n -/// #STC_ERROR_PERMISSION_DENIED Access or permission denied -/// @param[in] info The statistics information handle -/// @param[in] user_data The user data passed from the statistics provider function -/// @return #STC_CALLBACK_CONTINUE to continue with the next iteration of the loop, -/// otherwise #STC_CALLBACK_CANCEL to break out of the loop -/// -/// @pre stc_get_stats() will invoke this callback. -/// @pre stc_foreach_stats() will invoke this callback. -/// @pre stc_get_total_stats() will invoke this callback. -/// @see stc_stats_info_get_app_id() -/// @see stc_stats_info_get_iface_name() -/// @see stc_stats_info_get_time_interval() -/// @see stc_stats_info_get_iface_type() -/// @see stc_stats_info_get_counter() -/// @see stc_stats_info_get_roaming_type() -/// @see stc_stats_info_get_protocol_type() -/// @see stc_stats_info_get_process_state() -/// @see stc_get_stats() -/// @see stc_foreach_stats() -/// @see stc_get_total_stats() -typedef stc_stats_info_cb - = ffi.Pointer>; -typedef stc_stats_info_cbFunction = ffi.Int32 Function( - ffi.Int32 result, stc_stats_info_h info, ffi.Pointer user_data); -typedef Dartstc_stats_info_cbFunction = int Function( - int result, stc_stats_info_h info, ffi.Pointer user_data); - -/// @brief The statistics information handle. -/// @since_tizen 4.0 -typedef stc_stats_info_h = ffi.Pointer; - -/// @brief Enumeration for the SoftAP. -/// @since_tizen 5.0 -abstract class softap_error_e { - /// < Successful - static const int SOFTAP_ERROR_NONE = 0; - - /// < Operation not permitted - static const int SOFTAP_ERROR_NOT_PERMITTED = -1; - - /// < Invalid parameter - static const int SOFTAP_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int SOFTAP_ERROR_OUT_OF_MEMORY = -12; - - /// < Resource busy - static const int SOFTAP_ERROR_RESOURCE_BUSY = -16; - - /// < Operation failed - static const int SOFTAP_ERROR_OPERATION_FAILED = -50003967; - - /// < Already enabled - static const int SOFTAP_ERROR_ALREADY_ENABLED = -50003966; - - /// < Invalid operation - static const int SOFTAP_ERROR_INVALID_OPERATION = -38; - - /// < API is not supported - static const int SOFTAP_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Permission denied - static const int SOFTAP_ERROR_PERMISSION_DENIED = -13; -} - -/// @brief Enumeration for the cause of disabling the SoftAP. -/// @since_tizen 5.0 -abstract class softap_disabled_cause_e { - /// < Disabled due to flight mode - static const int SOFTAP_DISABLED_BY_FLIGHT_MODE = 0; - - /// < Disabled due to low battery - static const int SOFTAP_DISABLED_BY_LOW_BATTERY = 1; - - /// < Disabled due to pdp network close - static const int SOFTAP_DISABLED_BY_NETWORK_CLOSE = 2; - - /// < Disabled due to timeout - static const int SOFTAP_DISABLED_BY_TIMEOUT = 3; - - /// < Disabled by other apps - static const int SOFTAP_DISABLED_BY_OTHERS = 4; - - /// < Disabled by your request - static const int SOFTAP_DISABLED_BY_REQUEST = 5; - - /// < Disabled due to Wi-Fi on - static const int SOFTAP_DISABLED_BY_WIFI_ON = 6; -} - -/// @brief Enumeration for the SoftAP security. -/// @since_tizen 5.0 -abstract class softap_security_type_e { - /// < No Security type - static const int SOFTAP_SECURITY_TYPE_NONE = 0; - - /// < WPA2_PSK - static const int SOFTAP_SECURITY_TYPE_WPA2_PSK = 1; - - /// < WPS - static const int SOFTAP_SECURITY_TYPE_WPS = 2; -} - -/// @brief Enumeration for the SoftAP HW mode. -/// @since_tizen 5.0 -abstract class softap_wireless_mode_e { - /// < IEEE 802.11b - static const int SOFTAP_WIRELESS_MODE_B = 0; - - /// < IEEE 802.11g - static const int SOFTAP_WIRELESS_MODE_G = 1; - - /// < IEEE 802.11a - static const int SOFTAP_WIRELESS_MODE_A = 2; - - /// < IEEE 802.11ad - static const int SOFTAP_WIRELESS_MODE_AD = 3; -} - -/// @brief Enumeration for address family. -/// @since_tizen 5.0 -abstract class softap_address_family_e { - /// < IPv4 Address type - static const int SOFTAP_ADDRESS_FAMILY_IPV4 = 0; - - /// < IPv6 Address type - static const int SOFTAP_ADDRESS_FAMILY_IPV6 = 1; -} - -/// @brief The SoftAP handle. -/// @since_tizen 5.0 -typedef softap_h = ffi.Pointer; - -/// @brief Called when you get the connected client repeatedly. -/// @since_tizen 5.0 -/// @remarks The @a client should not be released by the application and it is valid only in this function.\n -/// In order to use the client outside this function, a user must copy the client with softap_client_clone(). -/// @param[in] client The connected client -/// @param[in] user_data The user data passed from the request function -/// @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop -/// @pre softap_foreach_connected_clients() will invoke this callback. -/// @see softap_foreach_connected_clients() -typedef softap_connected_client_cb - = ffi.Pointer>; -typedef softap_connected_client_cbFunction = ffi.Bool Function( - softap_client_h client, ffi.Pointer user_data); -typedef Dartsoftap_connected_client_cbFunction = bool Function( - softap_client_h client, ffi.Pointer user_data); - -/// @brief The SoftAP client handle. -/// @since_tizen 5.0 -typedef softap_client_h = ffi.Pointer; - -/// @brief Called when the SoftAP is enabled. -/// @details The following error codes can be received: \n -/// #SOFTAP_ERROR_NONE: Success \n -/// #SOFTAP_ERROR_NOT_PERMITTED: Operation not permitted \n -/// #SOFTAP_ERROR_INVALID_PARAMETER: Invalid parameter \n -/// #SOFTAP_ERROR_OUT_OF_MEMORY: Out of memory \n -/// #SOFTAP_ERROR_OPERATION_FAILED: Operation failed \n -/// #SOFTAP_ERROR_ALREADY_ENABLED: Already enabled \n -/// @since_tizen 5.0 -/// @param[in] result The result of enabling the SoftAP -/// @param[in] is_requested Indicates whether this change is requested -/// @param[in] user_data The user data passed from softap_set_enabled_cb() -/// @pre If you register callback function using softap_set_enabled_cb(), this will be invoked when the SoftAP is enabled. -/// @see softap_enable() -/// @see softap_unset_enabled_cb() -typedef softap_enabled_cb - = ffi.Pointer>; -typedef softap_enabled_cbFunction = ffi.Void Function( - ffi.Int32 result, ffi.Bool is_requested, ffi.Pointer user_data); -typedef Dartsoftap_enabled_cbFunction = void Function( - int result, bool is_requested, ffi.Pointer user_data); - -/// @brief Called when the SoftAP is disabled. -/// @details The following error codes can be received: \n -/// #SOFTAP_ERROR_NONE: Success \n -/// #SOFTAP_ERROR_INVALID_PARAMETER: Invalid parameter \n -/// #SOFTAP_ERROR_OUT_OF_MEMORY: Out of memory \n -/// #SOFTAP_ERROR_OPERATION_FAILED: Operation failed \n -/// @since_tizen 5.0 -/// @param[in] result The result of disabling the SoftAP -/// @param[in] cause The cause of disabling -/// @param[in] user_data The user data passed from softap_set_disabled_cb() -/// @pre If you register callback function using softap_set_disabled_cb(), this will be invoked when the SoftAP is disabled. -/// @see softap_set_disabled_cb() -/// @see softap_unset_disabled_cb() -typedef softap_disabled_cb - = ffi.Pointer>; -typedef softap_disabled_cbFunction = ffi.Void Function( - ffi.Int32 result, ffi.Int32 cause, ffi.Pointer user_data); -typedef Dartsoftap_disabled_cbFunction = void Function( - int result, int cause, ffi.Pointer user_data); - -/// @brief Called when the connection state is changed. -/// @since_tizen 5.0 -/// @remarks The @a client should not be released by the application and it is valid only in this function.\n -/// In order to use it outside this function, a user must copy the client with softap_client_clone(). -/// @param[in] client The client of which connection state is changed -/// @param[in] opened @c true when connection is opened, otherwise false -/// @param[in] user_data The user data passed from softap_set_client_connection_state_changed_cb() -/// @pre If you register callback function using softap_set_client_connection_state_changed_cb(), this will be invoked when the connection state is changed. -/// @see softap_set_client_connection_state_changed_cb() -/// @see softap_unset_client_connection_state_changed_cb() -typedef softap_client_connection_state_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef softap_client_connection_state_changed_cbFunction = ffi.Void Function( - softap_client_h client, ffi.Bool opened, ffi.Pointer user_data); -typedef Dartsoftap_client_connection_state_changed_cbFunction = void Function( - softap_client_h client, bool opened, ffi.Pointer user_data); - -/// @brief Called when the security type of SoftAP is changed. -/// @since_tizen 5.0 -/// @param[in] changed_type The changed security type -/// @param[in] user_data The user data passed from the register function -/// @see softap_set_security_type_changed_cb() -/// @see softap_unset_security_type_changed_cb() -typedef softap_security_type_changed_cb - = ffi.Pointer>; -typedef softap_security_type_changed_cbFunction = ffi.Void Function( - ffi.Int32 changed_type, ffi.Pointer user_data); -typedef Dartsoftap_security_type_changed_cbFunction = void Function( - int changed_type, ffi.Pointer user_data); - -/// @brief Called when the visibility of SSID is changed. -/// @since_tizen 5.0 -/// @param[in] changed_visible The changed visibility of SSID -/// @param[in] user_data The user data passed from the register function -/// @see softap_set_ssid_visibility_changed_cb() -/// @see softap_unset_ssid_visibility_changed_cb() -typedef softap_ssid_visibility_changed_cb = ffi - .Pointer>; -typedef softap_ssid_visibility_changed_cbFunction = ffi.Void Function( - ffi.Bool changed_visible, ffi.Pointer user_data); -typedef Dartsoftap_ssid_visibility_changed_cbFunction = void Function( - bool changed_visible, ffi.Pointer user_data); - -/// @brief Called when the passphrase is changed. -/// @since_tizen 5.0 -/// @param[in] user_data The user data passed from the register function -/// @see softap_set_passphrase_changed_cb() -/// @see softap_unset_passphrase_changed_cb() -typedef softap_passphrase_changed_cb - = ffi.Pointer>; -typedef softap_passphrase_changed_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartsoftap_passphrase_changed_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Called when SoftAP settings are reloaded. -/// @details The following error codes can be received: \n -/// #SOFTAP_ERROR_NONE: Success \n -/// #SOFTAP_ERROR_NOT_PERMITTED: Operation not permitted \n -/// #SOFTAP_ERROR_INVALID_PARAMETER: Invalid parameter \n -/// #SOFTAP_ERROR_OUT_OF_MEMORY: Out of memory \n -/// #SOFTAP_ERROR_OPERATION_FAILED: Operation failed \n -/// @since_tizen 5.0 -/// @param[in] result The result of reloading the settings -/// @param[in] user_data The user data passed from the request function -/// @pre softap_reload_settings() will invoke this callback. -typedef softap_settings_reloaded_cb - = ffi.Pointer>; -typedef softap_settings_reloaded_cbFunction = ffi.Void Function( - ffi.Int32 result, ffi.Pointer user_data); -typedef Dartsoftap_settings_reloaded_cbFunction = void Function( - int result, ffi.Pointer user_data); - -/// @brief Enumeration for VPN service error types. -/// @details Indicate formats of error type field -abstract class vpnsvc_error_e { - /// < Successful - static const int VPNSVC_ERROR_NONE = 0; - - /// < Invalid parameter - static const int VPNSVC_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int VPNSVC_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied - static const int VPNSVC_ERROR_PERMISSION_DENIED = -13; - - /// < No such file or directory - static const int VPNSVC_ERROR_NO_SUCH_FILE = -2; - - /// < IO error - static const int VPNSVC_ERROR_IO_ERROR = -5; - - /// < Time out error or no answer - static const int VPNSVC_ERROR_TIMEOUT = -1073741823; - - /// < Failed to communicate with server - static const int VPNSVC_ERROR_IPC_FAILED = -30081022; - - /// < Not Supported - static const int VPNSVC_ERROR_NOT_SUPPORTED = -1073741822; -} - -/// @brief The VPN interface handle. -/// @details This handle can be obtained by calling vpnsvc_init() and destroyed by calling vpnsvc_deinit(). -/// @since_tizen 3.0 -/// @see vpnsvc_init() -/// @see vpnsvc_deinit() -typedef vpnsvc_h = ffi.Pointer; - -/// @brief Enumeration for the Wi-Fi error type. -/// @since_tizen 3.0 -abstract class wifi_manager_error_e { - /// Successful - static const int WIFI_MANAGER_ERROR_NONE = 0; - - /// Invalid parameter - static const int WIFI_MANAGER_ERROR_INVALID_PARAMETER = -22; - - /// Out of memory error - static const int WIFI_MANAGER_ERROR_OUT_OF_MEMORY = -12; - - /// Invalid operation - static const int WIFI_MANAGER_ERROR_INVALID_OPERATION = -38; - - /// Address family not supported - static const int WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED = -97; - - /// Operation failed - static const int WIFI_MANAGER_ERROR_OPERATION_FAILED = -30277631; - - /// There is no connected AP - static const int WIFI_MANAGER_ERROR_NO_CONNECTION = -30277630; - - /// Now in progress - static const int WIFI_MANAGER_ERROR_NOW_IN_PROGRESS = -115; - - /// Already exists - static const int WIFI_MANAGER_ERROR_ALREADY_EXISTS = -30277629; - - /// Operation is aborted - static const int WIFI_MANAGER_ERROR_OPERATION_ABORTED = -30277628; - - /// DHCP failed - static const int WIFI_MANAGER_ERROR_DHCP_FAILED = -30277627; - - /// Invalid key - static const int WIFI_MANAGER_ERROR_INVALID_KEY = -30277626; - - /// No reply - static const int WIFI_MANAGER_ERROR_NO_REPLY = -30277625; - - /// Restricted by security system policy - static const int WIFI_MANAGER_ERROR_SECURITY_RESTRICTED = -30277624; - - /// Already initialized - static const int WIFI_MANAGER_ERROR_ALREADY_INITIALIZED = -30277623; - - /// Out of range - static const int WIFI_MANAGER_ERROR_OUT_OF_RANGE = -30277622; - - /// Connect failed - static const int WIFI_MANAGER_ERROR_CONNECT_FAILED = -30277621; - - /// Login failed - static const int WIFI_MANAGER_ERROR_LOGIN_FAILED = -30277620; - - /// Authentication failed - static const int WIFI_MANAGER_ERROR_AUTHENTICATION_FAILED = -30277619; - - /// PIN missing - static const int WIFI_MANAGER_ERROR_PIN_MISSING = -30277618; - - /// WPS Overlap (Since 4.0) - static const int WIFI_MANAGER_ERROR_WPS_OVERLAP = -30277617; - - /// WPS Timeout (Since 4.0) - static const int WIFI_MANAGER_ERROR_WPS_TIMEOUT = -30277616; - - /// WPS WEP Prohibited (Since 4.0) - static const int WIFI_MANAGER_ERROR_WPS_WEP_PROHIBITED = -30277615; - - /// Permission Denied - static const int WIFI_MANAGER_ERROR_PERMISSION_DENIED = -13; - - /// Connection Offline (Since 5.0) - static const int WIFI_MANAGER_ERROR_OFFLINE = -30277614; - - /// Invalid Gateway (Since 5.0) - static const int WIFI_MANAGER_ERROR_INVALID_GATEWAY = -30277613; - - /// Not Supported - static const int WIFI_MANAGER_ERROR_NOT_SUPPORTED = -1073741822; - - /// Not initialized (Since 5.0) - static const int WIFI_MANAGER_ERROR_NOT_INITIALIZED = -30277612; -} - -/// @brief Enumeration for the state of the Wi-Fi device. -/// @since_tizen 3.0 -abstract class wifi_manager_device_state_e { - /// < Wi-Fi is Deactivated - static const int WIFI_MANAGER_DEVICE_STATE_DEACTIVATED = 0; - - /// < Wi-Fi is activated - static const int WIFI_MANAGER_DEVICE_STATE_ACTIVATED = 1; -} - -/// @brief Enumeration for the state of the Wi-Fi connection. -/// @since_tizen 3.0 -abstract class wifi_manager_connection_state_e { - /// < Connection failed state - static const int WIFI_MANAGER_CONNECTION_STATE_FAILURE = -1; - - /// < Disconnected state - static const int WIFI_MANAGER_CONNECTION_STATE_DISCONNECTED = 0; - - /// < Association state - static const int WIFI_MANAGER_CONNECTION_STATE_ASSOCIATION = 1; - - /// < Configuration state - static const int WIFI_MANAGER_CONNECTION_STATE_CONFIGURATION = 2; - - /// < Connected state - static const int WIFI_MANAGER_CONNECTION_STATE_CONNECTED = 3; -} - -/// @brief Enumeration for the state of the static IP conflict. -/// @since_tizen 5.0 -abstract class wifi_manager_ip_conflict_state_e { - /// < Unknown state - static const int WIFI_MANAGER_IP_CONFLICT_STATE_UNKNOWN = 0; - - /// < Resolved state - static const int WIFI_MANAGER_IP_CONFLICT_STATE_CONFLICT_NOT_DETECTED = 1; - - /// < Conflict state - static const int WIFI_MANAGER_IP_CONFLICT_STATE_CONFLICT_DETECTED = 2; -} - -/// @brief Enumeration for the RSSI level. -/// @since_tizen 3.0 -abstract class wifi_manager_rssi_level_e { - /// < No signal - static const int WIFI_MANAGER_RSSI_LEVEL_0 = 0; - - /// < Very weak signal ~ -83dBm - static const int WIFI_MANAGER_RSSI_LEVEL_1 = 1; - - /// < Weak signal -82 ~ -75dBm - static const int WIFI_MANAGER_RSSI_LEVEL_2 = 2; - - /// < Strong signal -74 ~ -64dBm - static const int WIFI_MANAGER_RSSI_LEVEL_3 = 3; - - /// < Very strong signal -63dBm ~ - static const int WIFI_MANAGER_RSSI_LEVEL_4 = 4; -} - -/// @brief Enumeration for the wifi scanning state. -/// @since_tizen 4.0 -abstract class wifi_manager_scan_state_e { - /// < Scan is not running - static const int WIFI_MANAGER_SCAN_STATE_NOT_SCANNING = 0; - - /// < Scan is in progress - static const int WIFI_MANAGER_SCAN_STATE_SCANNING = 1; -} - -/// @brief Enumeration for the TDLS Discovery State. -/// @since_tizen 4.0 -abstract class wifi_manager_tdls_discovery_state_e { - /// < Discovery is in progress - static const int WIFI_MANAGER_TDLS_DISCOVERY_STATE_ONGOING = 0; - - /// < Discovery is finished - static const int WIFI_MANAGER_TDLS_DISCOVERY_STATE_FINISHED = 1; -} - -/// @brief Enumeration for the Wi-Fi Module state. -/// @since_tizen 4.0 -abstract class wifi_manager_module_state_e { - /// < Wi-Fi Module is detached - static const int WIFI_MANAGER_MODULE_STATE_DETACHED = 0; - - /// < Wi-Fi Module is attached - static const int WIFI_MANAGER_MODULE_STATE_ATTACHED = 1; -} - -/// @brief Enumeration for the Net IP configuration type. -/// @since_tizen 3.0 -abstract class wifi_manager_ip_config_type_e { - /// Not defined - static const int WIFI_MANAGER_IP_CONFIG_TYPE_NONE = 0; - - /// Manual IP configuration - static const int WIFI_MANAGER_IP_CONFIG_TYPE_STATIC = 1; - - /// Config IP using DHCP client (IPv4 Only) - static const int WIFI_MANAGER_IP_CONFIG_TYPE_DYNAMIC = 2; - - /// Config IP from Auto IP pool (169.254/16). Later with DHCP client, if available - static const int WIFI_MANAGER_IP_CONFIG_TYPE_AUTO = 3; - - /// Indicates an IP address that can not be modified (IPv4 Only) - static const int WIFI_MANAGER_IP_CONFIG_TYPE_FIXED = 4; -} - -/// @brief Enumeration for DNS Configuration type. -/// @since_tizen 4.0 -abstract class wifi_manager_dns_config_type_e { - /// < Not defined - static const int WIFI_MANAGER_DNS_CONFIG_TYPE_NONE = 0; - - /// < Manual DNS configuration - static const int WIFI_MANAGER_DNS_CONFIG_TYPE_STATIC = 1; - - /// < Config DNS using DHCP client - static const int WIFI_MANAGER_DNS_CONFIG_TYPE_DYNAMIC = 2; -} - -/// @brief Enumeration for the address type. -/// @since_tizen 3.0 -abstract class wifi_manager_address_family_e { - /// < IPV4 Address family - static const int WIFI_MANAGER_ADDRESS_FAMILY_IPV4 = 0; - - /// < IPV6 Address family - static const int WIFI_MANAGER_ADDRESS_FAMILY_IPV6 = 1; -} - -/// @brief Enumeration for the proxy method type. -/// @since_tizen 3.0 -abstract class wifi_manager_proxy_type_e { - /// Direct connection - static const int WIFI_MANAGER_PROXY_TYPE_DIRECT = 0; - - /// Auto configuration(Use PAC file). If URL property is not set, - /// DHCP/WPAD auto-discover will be tried - static const int WIFI_MANAGER_PROXY_TYPE_AUTO = 1; - - /// Manual configuration - static const int WIFI_MANAGER_PROXY_TYPE_MANUAL = 2; -} - -/// @brief Enumeration for Wi-Fi security type. -/// @details The following security modes are used in infrastructure and ad-hoc mode. -/// For now all EAP security mechanisms are provided only in infrastructure mode. -/// -/// @since_tizen 3.0 -abstract class wifi_manager_security_type_e { - /// < Security disabled - static const int WIFI_MANAGER_SECURITY_TYPE_NONE = 0; - - /// < WEP - static const int WIFI_MANAGER_SECURITY_TYPE_WEP = 1; - - /// < WPA-PSK - static const int WIFI_MANAGER_SECURITY_TYPE_WPA_PSK = 2; - - /// < WPA2-PSK - static const int WIFI_MANAGER_SECURITY_TYPE_WPA2_PSK = 3; - - /// < EAP - static const int WIFI_MANAGER_SECURITY_TYPE_EAP = 4; - - /// < FT-PSK (Since 5.0) - static const int WIFI_MANAGER_SECURITY_TYPE_WPA_FT_PSK = 5; -} - -/// @brief Enumeration for Wi-Fi encryption type. -/// @details The following encryption modes are used in infrastructure and ad-hoc mode. -/// @since_tizen 3.0 -abstract class wifi_manager_encryption_type_e { - /// < Encryption disabled - static const int WIFI_MANAGER_ENCRYPTION_TYPE_NONE = 0; - - /// < WEP - static const int WIFI_MANAGER_ENCRYPTION_TYPE_WEP = 1; - - /// < TKIP - static const int WIFI_MANAGER_ENCRYPTION_TYPE_TKIP = 2; - - /// < AES - static const int WIFI_MANAGER_ENCRYPTION_TYPE_AES = 3; - - /// < TKIP and AES are both supported - static const int WIFI_MANAGER_ENCRYPTION_TYPE_TKIP_AES_MIXED = 4; -} - -/// @brief Enumeration for EAP type. -/// @since_tizen 3.0 -abstract class wifi_manager_eap_type_e { - /// < EAP PEAP type - static const int WIFI_MANAGER_EAP_TYPE_PEAP = 0; - - /// < EAP TLS type - static const int WIFI_MANAGER_EAP_TYPE_TLS = 1; - - /// < EAP TTLS type - static const int WIFI_MANAGER_EAP_TYPE_TTLS = 2; - - /// < EAP SIM type - static const int WIFI_MANAGER_EAP_TYPE_SIM = 3; - - /// < EAP AKA type - static const int WIFI_MANAGER_EAP_TYPE_AKA = 4; - - /// < EAP AKA Prime type - static const int WIFI_MANAGER_EAP_TYPE_AKA_PRIME = 5; - - /// < EAP FAST type - static const int WIFI_MANAGER_EAP_TYPE_FAST = 6; - - /// < EAP PWD type - static const int WIFI_MANAGER_EAP_TYPE_PWD = 7; -} - -/// @brief Enumeration for EAP phase2 authentication type. -/// @since_tizen 3.0 -abstract class wifi_manager_eap_auth_type_e { - /// < EAP phase2 authentication none - static const int WIFI_MANAGER_EAP_AUTH_TYPE_NONE = 0; - - /// < EAP phase2 authentication PAP - static const int WIFI_MANAGER_EAP_AUTH_TYPE_PAP = 1; - - /// < EAP phase2 authentication MSCHAP - static const int WIFI_MANAGER_EAP_AUTH_TYPE_MSCHAP = 2; - - /// < EAP phase2 authentication MSCHAPv2 - static const int WIFI_MANAGER_EAP_AUTH_TYPE_MSCHAPV2 = 3; - - /// < EAP phase2 authentication GTC - static const int WIFI_MANAGER_EAP_AUTH_TYPE_GTC = 4; - - /// < EAP phase2 authentication MD5 - static const int WIFI_MANAGER_EAP_AUTH_TYPE_MD5 = 5; -} - -/// @brief Enumeration for Wi-Fi disconnect reason, provided by the supplicant. -/// @since_tizen 4.0 -abstract class wifi_manager_disconnect_reason_e { - /// Locally Generate Disconnect from user side (Since 5.0) - static const int WIFI_REASON_LOCAL_GENERATE_FROM_USER = -3; - - /// Unspecified reason - static const int WIFI_REASON_UNSPECIFIED = 1; - - /// Previous authentication no longer valid - static const int WIFI_REASON_PREV_AUTH_NOT_VALID = 2; - - /// Deauthenticated because sending STA is leaving (or has left) IBSS or ESS - static const int WIFI_REASON_DEAUTH_LEAVING = 3; - - /// Disassociated due to inactivity - static const int WIFI_REASON_DISASSOC_DUE_TO_INACTIVITY = 4; - - /// Disassociated because AP is unable to handle all currently associated STAs - static const int WIFI_REASON_DISASSOC_AP_BUSY = 5; - - /// Class 2 frame received from nonauthenticated STA - static const int WIFI_REASON_CLASS2_FRAME_FROM_NONAUTH_STA = 6; - - /// Class 3 frame received from nonassociated STA - static const int WIFI_REASON_CLASS3_FRAME_FROM_NONASSOC_STA = 7; - - /// Disassociated because sending STA is leaving (or has left) BSS - static const int WIFI_REASON_DISASSOC_STA_HAS_LEFT = 8; - - /// STA requesting (re)association is not authenticated with responding STA - static const int WIFI_REASON_STA_REQ_ASSOC_WITHOUT_AUTH = 9; - - /// Disassociated because the information in the Power Capability - /// element is unacceptable - static const int WIFI_REASON_PWR_CAPABILITY_NOT_VALID = 10; - - /// Disassociated because the information in the Supported Channels - /// element is unacceptable - static const int WIFI_REASON_SUPPORTED_CHANNEL_NOT_VALID = 11; - - /// Invalid element i.e., an element defined in this standard for which the - /// content does not meet the specifications in Clause 8 - static const int WIFI_REASON_INVALID_IE = 13; - - /// Message Integrity Code (MIC) failure - static const int WIFI_REASON_MICHAEL_MIC_FAILURE = 14; - - /// 4-Way Handshake timeout - static const int WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT = 15; - - /// Group Key Handshake timeout - static const int WIFI_REASON_GROUP_KEY_UPDATE_TIMEOUT = 16; - - /// Element in 4-Way Handshake different from (Re)Association Request/Probe - /// Response/Beacon frame - static const int WIFI_REASON_IE_IN_4WAY_DIFFERS = 17; - - /// Invalid group cipher - static const int WIFI_REASON_GROUP_CIPHER_NOT_VALID = 18; - - /// Invalid pairwise cipher - static const int WIFI_REASON_PAIRWISE_CIPHER_NOT_VALID = 19; - - /// Invalid AKMP - static const int WIFI_REASON_AKMP_NOT_VALID = 20; - - /// Unsupported RSNE version - static const int WIFI_REASON_UNSUPPORTED_RSN_IE_VERSION = 21; - - /// Invalid RSNE capabilities - static const int WIFI_REASON_INVALID_RSN_IE_CAPAB = 22; - - /// IEEE 802.1X authentication failed - static const int WIFI_REASON_IEEE_802_1X_AUTH_FAILED = 23; - - /// Cipher suite rejected because of the security policy - static const int WIFI_REASON_CIPHER_SUITE_REJECTED = 24; - - /// TDLS direct-link teardown due to TDLS peer STA unreachable via the - /// TDLS direct link - static const int WIFI_REASON_TDLS_TEARDOWN_UNREACHABLE = 25; - - /// TDLS direct-link teardown for unspecified reason - static const int WIFI_REASON_TDLS_TEARDOWN_UNSPECIFIED = 26; - - /// Disassociated because excessive number of frames need to be acknowledged, - /// but are not acknowledged due to AP transmissions and/or poor channel conditions - static const int WIFI_REASON_DISASSOC_LOW_ACK = 34; - - /// SME cancels the mesh peering instance with the reason other than reaching - /// the maximum number of peer mesh STAs - static const int WIFI_REASON_MESH_PEERING_CANCELLED = 52; - - /// The mesh STA has reached the supported maximum number of peer mesh STAs - static const int WIFI_REASON_MESH_MAX_PEERS = 53; - - /// The received information violates the Mesh Configuration policy - /// configured in the mesh STA profile - static const int WIFI_REASON_MESH_CONFIG_POLICY_VIOLATION = 54; - - /// The mesh STA has received a Mesh Peering Close message requesting - /// to close the mesh peering - static const int WIFI_REASON_MESH_CLOSE_RCVD = 55; - - /// The mesh STA has resent dot11MeshMaxRetries Mesh Peering Open messages, - /// without receiving a Mesh Peering Confirm message - static const int WIFI_REASON_MESH_MAX_RETRIES = 56; - - /// The confirmTimer for the mesh peering instance times out - static const int WIFI_REASON_MESH_CONFIRM_TIMEOUT = 57; - - /// The mesh STA fails to unwrap the GTK or the values in the wrapped - /// contents do not match - static const int WIFI_REASON_MESH_INVALID_GTK = 58; - - /// The mesh STA receives inconsistent information about the mesh parameters - /// between Mesh Peering Management frames - static const int WIFI_REASON_MESH_INCONSISTENT_PARAMS = 59; - - /// The mesh STA does not have proxy information for this external destination - static const int WIFI_REASON_MESH_INVALID_SECURITY_CAP = 60; -} - -/// @brief Enumeration for Wi-Fi Association Status code, provided by the supplicant. -/// @details The Wi-Fi Standard Reference : Status codes (IEEE 802.11-2007, 7.3.1.9, Table 7-23). -/// @since_tizen 5.0 -abstract class wifi_manager_assoc_status_code_e { - /// Successful - static const int WLAN_STATUS_SUCCESS = 0; - - /// Unspecified failure - static const int WLAN_STATUS_UNSPECIFIED_FAILURE = 1; - - /// Responding STA does not support the specified authentication - /// algorithm - static const int WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG = 13; - - /// Association denied because AP is unable to handle additional - /// associated STAs - static const int WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA = 17; - - /// Association denied because the requesting STA does not support - /// HT feature - static const int WLAN_STATUS_ASSOC_DENIED_NO_HT = 27; - - /// Association request rejected temporarily - static const int WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY = 30; - - /// Robust management frame policy violation - static const int WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION = 31; - - /// Invalid element - static const int WLAN_STATUS_INVALID_IE = 40; - - /// Invalid group cipher - static const int WLAN_STATUS_GROUP_CIPHER_NOT_VALID = 41; - - /// Invalid pairwise cipher - static const int WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID = 42; - - /// Invalid AKMP - static const int WLAN_STATUS_AKMP_NOT_VALID = 43; - - /// Cipher suite rejected because of security policy - static const int WLAN_STATUS_CIPHER_REJECTED_PER_POLICY = 46; - - /// Association denied because the Listen interval is too large - static const int WLAN_STATUS_ASSOC_DENIED_LISTEN_INT_TOO_LARGE = 51; - - /// Invalid pairwise master key identifier (PKMID) - static const int WLAN_STATUS_INVALID_PMKID = 53; - - /// Invalid MDE - static const int WLAN_STATUS_INVALID_MDIE = 54; - - /// Invalid FTE - static const int WLAN_STATUS_INVALID_FTIE = 55; - - /// Association denied because the requesting STA does not support - /// VHT feature - static const int WLAN_STATUS_ASSOC_DENIED_NO_VHT = 104; -} - -/// @brief Enumeration for the state of the Wi-Fi TDLS. -/// @since_tizen 3.0 -abstract class wifi_manager_tdls_state_e { - /// < Wi-Fi TDLS is Disconnected - static const int WIFI_MANAGER_TDLS_STATE_DISCONNECTED = 0; - - /// < Wi-Fi TDLS is Connected - static const int WIFI_MANAGER_TDLS_STATE_CONNECTED = 1; -} - -/// @brief Enumeration for Wi-Fi Frame type. -/// @since_tizen 5.0 -/// @see wifi_manager_add_vsie() -/// @see wifi_manager_remove_vsie() -/// @see wifi_manager_get_vsie() -abstract class wifi_manager_vsie_frames_e { - /// WiFi probe request frame - static const int WIFI_MANAGER_VSIE_FRAME_PROBE_REQ = 0; - - /// WiFi association request frame - static const int WIFI_MANAGER_VSIE_FRAME_ASSOC_REQ = 1; - - /// WiFi re-association request frame - static const int WIFI_MANAGER_VSIE_FRAME_REASSOC = 2; - - /// WiFi authentication request frame - static const int WIFI_MANAGER_VSIE_FRAME_AUTH_REQ = 3; - - /// WiFi action frame - static const int WIFI_MANAGER_VSIE_FRAME_ACTION = 4; -} - -/// @brief The Wi-Fi manager handle. -/// @since_tizen 3.0 -typedef wifi_manager_h = ffi.Pointer; - -/// @brief Called after wifi_manager_activate() or wifi_manager_activate_with_wifi_picker_tested() is completed. -/// @since_tizen 3.0 -/// @param[in] result The result -/// @param[in] user_data The user data passed from wifi_manager_activate() and wifi_manager_activate_with_wifi_picker_tested() -/// @pre wifi_manager_activate() or wifi_manager_activate_with_wifi_picker_tested() will invoke this callback function. -/// @see wifi_manager_activate() -/// @see wifi_manager_activate_with_wifi_picker_tested() -typedef wifi_manager_activated_cb - = ffi.Pointer>; -typedef wifi_manager_activated_cbFunction = ffi.Void Function( - ffi.Int32 result, ffi.Pointer user_data); -typedef Dartwifi_manager_activated_cbFunction = void Function( - int result, ffi.Pointer user_data); - -/// @brief Called after wifi_manager_deactivate() is completed. -/// @since_tizen 3.0 -/// @param[in] result The result -/// @param[in] user_data The user data passed from wifi_manager_deactivate() -/// @pre wifi_manager_deactivate() will invoke this callback function. -/// @see wifi_manager_deactivate() -typedef wifi_manager_deactivated_cb - = ffi.Pointer>; -typedef wifi_manager_deactivated_cbFunction = ffi.Void Function( - ffi.Int32 result, ffi.Pointer user_data); -typedef Dartwifi_manager_deactivated_cbFunction = void Function( - int result, ffi.Pointer user_data); - -/// @brief Called when the scan is finished. -/// @since_tizen 3.0 -/// @param[in] error_code The error code -/// @param[in] user_data The user data passed from the callback registration function -/// @see wifi_manager_scan() -/// @see wifi_manager_set_background_scan_cb() -/// @see wifi_manager_unset_background_scan_cb() -typedef wifi_manager_scan_finished_cb - = ffi.Pointer>; -typedef wifi_manager_scan_finished_cbFunction = ffi.Void Function( - ffi.Int32 error_code, ffi.Pointer user_data); -typedef Dartwifi_manager_scan_finished_cbFunction = void Function( - int error_code, ffi.Pointer user_data); - -/// @brief The Wi-Fi specific ap scan handle. -/// @since_tizen 4.0 -typedef wifi_manager_specific_scan_h = ffi.Pointer; - -/// @brief Called when the connection process is completed. -/// @details The following functions start the connection process and will -/// result in the callback being called: -/// - wifi_manager_connect() -/// - wifi_manager_connect_by_wps_pbc() -/// - wifi_manager_connect_by_wps_pin() -/// - wifi_manager_connect_by_wps_pbc_without_ssid() -/// - wifi_manager_connect_by_wps_pin_without_ssid() -/// - wifi_manager_connect_hidden_ap() -/// @since_tizen 3.0 -/// @param[in] result The result -/// @param[in] user_data The user data passed from the connection function. -/// @pre Any connection function will invoke this callback. -/// @see wifi_manager_connect() -/// @see wifi_manager_connect_by_wps_pbc() -/// @see wifi_manager_connect_by_wps_pin() -/// @see wifi_manager_connect_by_wps_pbc_without_ssid() -/// @see wifi_manager_connect_by_wps_pin_without_ssid() -/// @see wifi_manager_connect_hidden_ap() -typedef wifi_manager_connected_cb - = ffi.Pointer>; -typedef wifi_manager_connected_cbFunction = ffi.Void Function( - ffi.Int32 result, ffi.Pointer user_data); -typedef Dartwifi_manager_connected_cbFunction = void Function( - int result, ffi.Pointer user_data); - -/// @brief The Wi-Fi access point handle. -/// @since_tizen 3.0 -typedef wifi_manager_ap_h = ffi.Pointer; - -/// @brief Called for each found access point. -/// @since_tizen 3.0 -/// @remarks @a AP is valid only in this function. In order to use @a AP outside this function, you must copy the AP with wifi_manager_ap_clone(). -/// @param[in] ap The access point -/// @param[in] user_data The user data passed from the request function -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// @pre wifi_manager_foreach_found_ap() will invoke this callback. -/// @pre wifi_manager_foreach_found_specific_ap() will invoke this callback. -/// @see wifi_manager_foreach_found_ap() -/// @see wifi_manager_foreach_found_specific_ap() -typedef wifi_manager_found_ap_cb - = ffi.Pointer>; -typedef wifi_manager_found_ap_cbFunction = ffi.Bool Function( - wifi_manager_ap_h ap, ffi.Pointer user_data); -typedef Dartwifi_manager_found_ap_cbFunction = bool Function( - wifi_manager_ap_h ap, ffi.Pointer user_data); - -/// @brief Called after wifi_manager_disconnect() is completed. -/// @since_tizen 3.0 -/// @param[in] result The result -/// @param[in] user_data The user data passed from wifi_manager_disconnect() -/// @pre wifi_manager_disconnect() will invoke this callback function. -/// @see wifi_manager_disconnect() -typedef wifi_manager_disconnected_cb - = ffi.Pointer>; -typedef wifi_manager_disconnected_cbFunction = ffi.Void Function( - ffi.Int32 result, ffi.Pointer user_data); -typedef Dartwifi_manager_disconnected_cbFunction = void Function( - int result, ffi.Pointer user_data); - -/// @brief Called after wifi_manager_forget_ap_async() is completed. -/// @details The following error codes can be received: \n -/// #WIFI_MANAGER_ERROR_NONE Successful \n -/// #WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed -/// @since_tizen 5.0 -/// @param[in] result The result -/// @param[in] user_data The user data passed from wifi_manager_forget_ap_async() -/// @pre wifi_manager_forget_ap_async() will invoke this callback function. -/// @see wifi_manager_forget_ap_async() -typedef wifi_manager_forget_ap_finished_cb = ffi - .Pointer>; -typedef wifi_manager_forget_ap_finished_cbFunction = ffi.Void Function( - ffi.Int32 result, ffi.Pointer user_data); -typedef Dartwifi_manager_forget_ap_finished_cbFunction = void Function( - int result, ffi.Pointer user_data); - -/// @brief Called when the device state is changed. -/// @since_tizen 3.0 -/// @param[in] state The device state -/// @param[in] user_data The user data passed from the callback registration function -/// @see wifi_manager_set_device_state_changed_cb() -/// @see wifi_manager_unset_device_state_changed_cb() -typedef wifi_manager_device_state_changed_cb = ffi - .Pointer>; -typedef wifi_manager_device_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 state, ffi.Pointer user_data); -typedef Dartwifi_manager_device_state_changed_cbFunction = void Function( - int state, ffi.Pointer user_data); - -/// @brief Called when the scanning state is changed. -/// @since_tizen 4.0 -/// @param[in] state The wifi scanning state -/// @param[in] user_data The user data passed from the callback registration function -/// @see wifi_manager_set_scan_state_changed_cb() -/// @see wifi_manager_unset_scan_state_changed_cb() -typedef wifi_manager_scan_state_changed_cb = ffi - .Pointer>; -typedef wifi_manager_scan_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 state, ffi.Pointer user_data); -typedef Dartwifi_manager_scan_state_changed_cbFunction = void Function( - int state, ffi.Pointer user_data); - -/// @brief Called when the connection state is changed. -/// @since_tizen 3.0 -/// @param[in] state The connection state -/// @param[in] ap The access point -/// @param[in] user_data The user data passed from the callback registration function -/// @see wifi_manager_set_connection_state_changed_cb() -/// @see wifi_manager_unset_connection_state_changed_cb() -typedef wifi_manager_connection_state_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef wifi_manager_connection_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 state, wifi_manager_ap_h ap, ffi.Pointer user_data); -typedef Dartwifi_manager_connection_state_changed_cbFunction = void Function( - int state, wifi_manager_ap_h ap, ffi.Pointer user_data); - -/// @brief Called when the RSSI of connected Wi-Fi is changed. -/// @since_tizen 3.0 -/// @param[in] rssi_level The level of RSSI -/// @param[in] user_data The user data passed from the callback registration function -/// @see wifi_manager_set_rssi_level_changed_cb() -/// @see wifi_manager_unset_rssi_level_changed_cb() -typedef wifi_manager_rssi_level_changed_cb = ffi - .Pointer>; -typedef wifi_manager_rssi_level_changed_cbFunction = ffi.Void Function( - ffi.Int32 rssi_level, ffi.Pointer user_data); -typedef Dartwifi_manager_rssi_level_changed_cbFunction = void Function( - int rssi_level, ffi.Pointer user_data); - -/// @brief Called when the Wi-Fi Module state is changed. -/// @since_tizen 4.0 -/// @param[in] wifi_module_state The Wi-Fi Module state -/// @param[in] user_data The user data passed from the callback registration function -/// @see wifi_manager_set_module_state_changed_cb() -/// @see wifi_manager_unset_module_state_changed_cb() -typedef wifi_manager_module_state_changed_cb = ffi - .Pointer>; -typedef wifi_manager_module_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 wifi_module_state, ffi.Pointer user_data); -typedef Dartwifi_manager_module_state_changed_cbFunction = void Function( - int wifi_module_state, ffi.Pointer user_data); - -/// @brief Called when the BSSID scan is finished. -/// @since_tizen 4.0 -/// @param[in] error_code The error code -/// @param[in] user_data The user data passed from the callback registration function -/// @see wifi_manager_scan() -/// @see wifi_manager_bssid_scan() -/// @see wifi_manager_set_background_scan_cb() -/// @see wifi_manager_unset_background_scan_cb() -typedef wifi_manager_bssid_scan_finished_cb = ffi - .Pointer>; -typedef wifi_manager_bssid_scan_finished_cbFunction = ffi.Void Function( - ffi.Int32 error_code, ffi.Pointer user_data); -typedef Dartwifi_manager_bssid_scan_finished_cbFunction = void Function( - int error_code, ffi.Pointer user_data); - -/// @brief Called with an IPv6 address. -/// @since_tizen 4.0 -/// @remarks If @a ipv6_address is needed outside the callback, a copy should be -/// made. @a ipv6_address will be freed automatically after the execution -/// of this callback. -/// @param[in] ipv6_address The IPv6 address -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n -/// @c false to break out of the loop -/// @pre wifi_manager_ap_foreach_ipv6_address() will invoke this callback. -/// @see wifi_manager_ap_foreach_ipv6_address() -typedef wifi_manager_ap_ipv6_address_cb - = ffi.Pointer>; -typedef wifi_manager_ap_ipv6_address_cbFunction = ffi.Bool Function( - ffi.Pointer ipv6_address, ffi.Pointer user_data); -typedef Dartwifi_manager_ap_ipv6_address_cbFunction = bool Function( - ffi.Pointer ipv6_address, ffi.Pointer user_data); - -/// @brief Called with VSIE data and length of VSIE. -/// @since_tizen 5.0 -/// @remarks If @a vsie is needed outside the callback, a copy should be -/// made. @a vsie will be freed automatically after the execution -/// of this callback. -/// @param[in] vsie The vendor specific data -/// @param[in] length The length of vendor specific data -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n -/// @c false to break out of the loop -/// @pre wifi_manager_ap_foreach_vsie() will invoke this callback. -/// @see wifi_manager_ap_foreach_vsie(). -typedef wifi_manager_ap_vsie_cb - = ffi.Pointer>; -typedef wifi_manager_ap_vsie_cbFunction = ffi.Bool Function( - ffi.Pointer vsie, - ffi.Int length, - ffi.Pointer user_data); -typedef Dartwifi_manager_ap_vsie_cbFunction = bool Function( - ffi.Pointer vsie, - int length, - ffi.Pointer user_data); - -/// @brief Called for each found BSSID. -/// @since_tizen 5.0 -/// @remarks The @a bssid can be used only in the callback. To use it outside, make a copy. -/// @a bssid is managed by the platform and will be released after the execution -/// of this callback. -/// @param[in] bssid The BSSID -/// @param[in] rssi The RSSI -/// @param[in] freq The frequency -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, otherwise @c false to break out of the loop -/// @pre wifi_manager_foreach_found_bssid() will invoke this callback. -typedef wifi_manager_found_bssid_cb - = ffi.Pointer>; -typedef wifi_manager_found_bssid_cbFunction = ffi.Bool Function( - ffi.Pointer bssid, - ffi.Int rssi, - ffi.Int freq, - ffi.Pointer user_data); -typedef Dartwifi_manager_found_bssid_cbFunction = bool Function( - ffi.Pointer bssid, - int rssi, - int freq, - ffi.Pointer user_data); - -/// @brief The Wi-Fi access point configuration handle -/// @since_tizen 3.0 -typedef wifi_manager_config_h = ffi.Pointer; - -/// @brief Called for each found access point configuration. -/// @since_tizen 3.0 -/// @remarks @a config is valid only in this function. In order to use @a config outside this function, you must copy the config with wifi_manager_config_clone(). -/// -/// @param[in] config The access point configuration handle -/// @param[in] user_data The user data passed from the request function -/// -/// @return @c true to continue with the next iteration of the loop, otherwise @c false to break out of the loop \n -/// @pre wifi_manager_config_foreach_configuration() will invoke this callback. -/// @see wifi_manager_config_foreach_configuration() -typedef wifi_manager_config_list_cb - = ffi.Pointer>; -typedef wifi_manager_config_list_cbFunction = ffi.Bool Function( - wifi_manager_config_h config, ffi.Pointer user_data); -typedef Dartwifi_manager_config_list_cbFunction = bool Function( - wifi_manager_config_h config, ffi.Pointer user_data); - -/// @brief Called when the Wi-Fi TDLS is discovered. -/// @remarks @a peer_mac_addr is usable only in the callback. To use outside the callback, make a copy. -/// @param[in] state The TDLS state -/// @param[in] peer_mac_addr The MAC address of the TDLS peer -/// @param[in] user_data The user data passed from the callback registration function -/// @see wifi_manager_tdls_set_discovered_cb() -/// @see wifi_manager_tdls_unset_discovered_cb() -typedef wifi_manager_tdls_discovered_cb - = ffi.Pointer>; -typedef wifi_manager_tdls_discovered_cbFunction = ffi.Void Function( - ffi.Int32 state, - ffi.Pointer peer_mac_addr, - ffi.Pointer user_data); -typedef Dartwifi_manager_tdls_discovered_cbFunction = void Function(int state, - ffi.Pointer peer_mac_addr, ffi.Pointer user_data); - -/// @brief Called when the Wi-Fi TDLS state is changed. -/// @since_tizen 3.0 -/// -/// @param[in] state The TDLS state -/// @param[in] peer_mac_addr The MAC address of the TDLS peer -/// @param[in] user_data The user data passed from the callback registration function -/// @see wifi_manager_tdls_set_state_changed_cb() -/// @see wifi_manager_tdls_unset_state_changed_cb() -typedef wifi_manager_tdls_state_changed_cb = ffi - .Pointer>; -typedef wifi_manager_tdls_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 state, - ffi.Pointer peer_mac_addr, - ffi.Pointer user_data); -typedef Dartwifi_manager_tdls_state_changed_cbFunction = void Function( - int state, - ffi.Pointer peer_mac_addr, - ffi.Pointer user_data); - -/// @brief Called when the IP conflict state is changed. -/// @since_tizen 5.0 -/// @remarks @a mac should not be freed. @a mac is available only in the callback. To use -/// outside the callback, make a copy. -/// @param[in] mac The destination MAC address causing conflict -/// @param[in] state The current state -/// @param[in] user_data The user data passed from the callback registration function -/// @see wifi_manager_set_ip_conflict_cb() -/// @see wifi_manager_unset_ip_conflict_cb() -typedef wifi_manager_ip_conflict_cb - = ffi.Pointer>; -typedef wifi_manager_ip_conflict_cbFunction = ffi.Void Function( - ffi.Pointer mac, - ffi.Int32 state, - ffi.Pointer user_data); -typedef Dartwifi_manager_ip_conflict_cbFunction = void Function( - ffi.Pointer mac, int state, ffi.Pointer user_data); - -/// @brief Enumeration for Wi-Fi Direct error code. -/// @since_tizen 2.3 -abstract class wifi_direct_error_e { - /// < Successful - static const int WIFI_DIRECT_ERROR_NONE = 0; - - /// < Operation not permitted(1) - static const int WIFI_DIRECT_ERROR_NOT_PERMITTED = -1; - - /// < Out of memory(12) - static const int WIFI_DIRECT_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied(13) - static const int WIFI_DIRECT_ERROR_PERMISSION_DENIED = -13; - - /// < Device or resource busy(16) - static const int WIFI_DIRECT_ERROR_RESOURCE_BUSY = -16; - - /// < Invalid function parameter(22) - static const int WIFI_DIRECT_ERROR_INVALID_PARAMETER = -22; - - /// < Connection timed out(110) - static const int WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT = -110; - - /// < Not supported - static const int WIFI_DIRECT_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Not initialized - static const int WIFI_DIRECT_ERROR_NOT_INITIALIZED = -29753343; - - /// < I/O error - static const int WIFI_DIRECT_ERROR_COMMUNICATION_FAILED = -29753342; - - /// < WiFi is being used - static const int WIFI_DIRECT_ERROR_WIFI_USED = -29753341; - - /// < Mobile AP is being used - static const int WIFI_DIRECT_ERROR_MOBILE_AP_USED = -29753340; - - /// < Connection failed - static const int WIFI_DIRECT_ERROR_CONNECTION_FAILED = -29753339; - - /// < Authentication failed - static const int WIFI_DIRECT_ERROR_AUTH_FAILED = -29753338; - - /// < Operation failed - static const int WIFI_DIRECT_ERROR_OPERATION_FAILED = -29753337; - - /// < Too many client - static const int WIFI_DIRECT_ERROR_TOO_MANY_CLIENT = -29753336; - - /// < Already initialized client - static const int WIFI_DIRECT_ERROR_ALREADY_INITIALIZED = -29753335; - - /// < Connection canceled by local device - static const int WIFI_DIRECT_ERROR_CONNECTION_CANCELED = -29753328; -} - -/// @brief Enumeration for Wi-Fi Direct link status. -/// @since_tizen 2.3 -/// @see wifi_direct_state_changed_cb() -/// @see wifi_direct_get_state() -abstract class wifi_direct_state_e { - /// < Deactivated - static const int WIFI_DIRECT_STATE_DEACTIVATED = 0; - - /// < Deactivating - static const int WIFI_DIRECT_STATE_DEACTIVATING = 1; - - /// < Activating - static const int WIFI_DIRECT_STATE_ACTIVATING = 2; - - /// < Activated - static const int WIFI_DIRECT_STATE_ACTIVATED = 3; - - /// < Discovering - static const int WIFI_DIRECT_STATE_DISCOVERING = 4; - - /// < Connecting - static const int WIFI_DIRECT_STATE_CONNECTING = 5; - - /// < Disconnecting - static const int WIFI_DIRECT_STATE_DISCONNECTING = 6; - - /// < Connected - static const int WIFI_DIRECT_STATE_CONNECTED = 7; - - /// < Group owner - static const int WIFI_DIRECT_STATE_GROUP_OWNER = 8; -} - -/// @brief Enumeration for Wi-Fi Direct device state. -/// @since_tizen 2.3 -/// @see wifi_direct_device_state_changed_cb() -abstract class wifi_direct_device_state_e { - /// < Activated - static const int WIFI_DIRECT_DEVICE_STATE_ACTIVATED = 0; - - /// < Deactivated - static const int WIFI_DIRECT_DEVICE_STATE_DEACTIVATED = 1; -} - -/// @brief Enumeration for Wi-Fi Direct discovery state. -/// @since_tizen 2.3 -/// @see wifi_direct_discovery_state_chagned_cb() -/// @see wifi_direct_peer_found_cb() -abstract class wifi_direct_discovery_state_e { - /// < Only listen started - static const int WIFI_DIRECT_ONLY_LISTEN_STARTED = 0; - - /// < Discovery started - static const int WIFI_DIRECT_DISCOVERY_STARTED = 1; - - /// < A remote peer is found - static const int WIFI_DIRECT_DISCOVERY_FOUND = 2; - - /// < Discovery finished - static const int WIFI_DIRECT_DISCOVERY_FINISHED = 3; - - /// < A remote peer is lost (Since 3.0) - static const int WIFI_DIRECT_DISCOVERY_LOST = 4; -} - -/// @brief Enumeration for Wi-Fi Direct connection state. -/// @since_tizen 2.3 -/// @see wifi_direct_connection_state_changed_cb() -abstract class wifi_direct_connection_state_e { - /// < Connection is requested - static const int WIFI_DIRECT_CONNECTION_REQ = 0; - - /// < WPS is requested - static const int WIFI_DIRECT_CONNECTION_WPS_REQ = 1; - - /// < Connection in progress - static const int WIFI_DIRECT_CONNECTION_IN_PROGRESS = 2; - - /// < Connection response - static const int WIFI_DIRECT_CONNECTION_RSP = 3; - - /// < Disconnected by remote Group Client - static const int WIFI_DIRECT_DISASSOCIATION_IND = 4; - - /// < Disconnected by local device - static const int WIFI_DIRECT_DISCONNECTION_RSP = 5; - - /// < Disconnected by remote Group Owner - static const int WIFI_DIRECT_DISCONNECTION_IND = 6; - - /// < Group is created - static const int WIFI_DIRECT_GROUP_CREATED = 7; - - /// < Group is destroyed - static const int WIFI_DIRECT_GROUP_DESTROYED = 8; -} - -/// @brief Enumeration for WPS Config Method type. -/// @since_tizen 5.0 -abstract class wifi_direct_config_method_type_e { - /// < Use default config method - static const int WIFI_DIRECT_CONFIG_METHOD_DEFAULT = 0; - - /// < Push Button Configuration - static const int WIFI_DIRECT_CONFIG_METHOD_PBC = 1; - - /// < Display PIN code - static const int WIFI_DIRECT_CONFIG_METHOD_PIN_DISPLAY = 2; - - /// < Provide the keypad to input the PIN - static const int WIFI_DIRECT_CONFIG_METHOD_PIN_KEYPAD = 4; -} - -/// @brief Enumeration for Wi-Fi Direct secondary device type. -/// @since_tizen 2.3 -/// @see wifi_direct_get_secondary_device_type() -abstract class wifi_direct_secondary_device_type_e { - /// < PC - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_COMPUTER_PC = 1; - - /// < Server - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_COMPUTER_SERVER = 2; - - /// < Media Center - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_COMPUTER_MEDIA_CENTER = 3; - - /// < UMPC - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_COMPUTER_UMPC = 4; - - /// < Notebook - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_COMPUTER_NOTEBOOK = 5; - - /// < Desktop - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_COMPUTER_DESKTOP = 6; - - /// < MID - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_COMPUTER_MID = 7; - - /// < Netbook - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_COMPUTER_NETBOOK = 8; - - /// < Keyboard - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_KEYBOARD = 1; - - /// < Mouse - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_MOUSE = 2; - - /// < Joystick - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_JOYSTICK = 3; - - /// < Trackball - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_TRACKBALL = 4; - - /// < Controller - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_CONTROLLER = 5; - - /// < Remote - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_REMOTE = 6; - - /// < Touchscreen - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_TOUCHSCREEN = 7; - - /// < Biometric reader - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_BIOMETRIC_READER = 8; - - /// < Barcode reader - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_BARCODE_READER = 9; - - /// < Printer - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_PRINTER_PRINTER = 1; - - /// < Scanner - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_PRINTER_SCANNER = 2; - - /// < Fax - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_PRINTER_FAX = 3; - - /// < Copier - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_PRINTER_COPIER = 4; - - /// < All-in-one - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_PRINTER_ALL_IN_ONE = 5; - - /// < Digital still camera - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_CAMERA_DIGITAL_STILL = 1; - - /// < Video camera - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_CAMERA_VIDEO = 2; - - /// < Webcam - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_CAMERA_WEBCAM = 3; - - /// < Security camera - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_CAMERA_SECURITY = 4; - - /// < NAS - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_STORAGE_NAS = 1; - - /// < AP - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_NETWORK_INFRA_AP = 1; - - /// < Router - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_NETWORK_INFRA_ROUTER = 2; - - /// < Switch - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_NETWORK_INFRA_SWITCH = 3; - - /// < Gateway - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_NETWORK_INFRA_GATEWAY = 4; - - /// < TV - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_DISPLAY_TV = 1; - - /// < Picture frame - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_DISPLAY_PIC_FRAME = 2; - - /// < Projector - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_DISPLAY_PROJECTOR = 3; - - /// < Monitor - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_DISPLAY_MONITOR = 4; - - /// < DAR - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_DAR = 1; - - /// < PVR - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_PVR = 2; - - /// < MCX - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_MCX = 3; - - /// < Set-top box - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_STB = 4; - - /// < Media Server / Media Adapter / Media Extender - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_MS_MA_ME = 5; - - /// < Portable video player - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_PVP = 6; - - /// < Xbox - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_GAME_XBOX = 1; - - /// < Xbox 360 - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_GAME_XBOX_360 = 2; - - /// < Playstation - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_GAME_PS = 3; - - /// < Console - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_GAME_CONSOLE = 4; - - /// < Portable - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_GAME_PORTABLE = 5; - - /// < Windows Mobile - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_TELEPHONE_WINDOWS_MOBILE = - 1; - - /// < Phone - single mode - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_TELEPHONE_PHONE_SINGLE = 2; - - /// < Phone - dual mode - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_TELEPHONE_PHONE_DUAL = 3; - - /// < Smart Phone - single mode - static const int - WIFI_DIRECT_SECONDARY_DEVICE_TYPE_TELEPHONE_SMARTPHONE_SINGLE = 4; - - /// < Smart Phone - dual mode - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_TELEPHONE_SMARTPHONE_DUAL = - 5; - - /// < Tuner - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_AUDIO_TUNER = 1; - - /// < Speaker - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_AUDIO_SPEAKER = 2; - - /// < Portable Music Player - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_AUDIO_PMP = 3; - - /// < Headset - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_AUDIO_HEADSET = 4; - - /// < Headphone - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_AUDIO_HEADPHONE = 5; - - /// < Microphone - static const int WIFI_DIRECT_SECONDARY_DEVICE_TYPE_AUDIO_MIC = 6; -} - -/// @brief Enumeration for Wi-Fi Direct primary device type. -/// @since_tizen 2.3 -/// @see wifi_direct_get_primary_device_type() -abstract class wifi_direct_primary_device_type_e { - /// < Computer - static const int WIFI_DIRECT_PRIMARY_DEVICE_TYPE_COMPUTER = 1; - - /// < Input device - static const int WIFI_DIRECT_PRIMARY_DEVICE_TYPE_INPUT_DEVICE = 2; - - /// < Printer - static const int WIFI_DIRECT_PRIMARY_DEVICE_TYPE_PRINTER = 3; - - /// < Camera - static const int WIFI_DIRECT_PRIMARY_DEVICE_TYPE_CAMERA = 4; - - /// < Storage - static const int WIFI_DIRECT_PRIMARY_DEVICE_TYPE_STORAGE = 5; - - /// < Network Infrastructure - static const int WIFI_DIRECT_PRIMARY_DEVICE_TYPE_NETWORK_INFRA = 6; - - /// < Display - static const int WIFI_DIRECT_PRIMARY_DEVICE_TYPE_DISPLAY = 7; - - /// < Multimedia device - static const int WIFI_DIRECT_PRIMARY_DEVICE_TYPE_MULTIMEDIA_DEVICE = 8; - - /// < Game device - static const int WIFI_DIRECT_PRIMARY_DEVICE_TYPE_GAME_DEVICE = 9; - - /// < Telephone - static const int WIFI_DIRECT_PRIMARY_DEVICE_TYPE_TELEPHONE = 10; - - /// < Audio - static const int WIFI_DIRECT_PRIMARY_DEVICE_TYPE_AUDIO = 11; - - /// < Others - static const int WIFI_DIRECT_PRIMARY_DEVICE_TYPE_OTHER = 255; -} - -/// @brief Enumeration for Wi-Fi WPS type. -/// @since_tizen 2.3 -/// @see wifi_direct_supported_wps_type_cb() -/// @see wifi_direct_get_local_wps_type() -/// @see wifi_direct_set_req_wps_type() -/// @see wifi_direct_get_req_wps_type() -abstract class wifi_direct_wps_type_e { - /// < No WPS type - static const int WIFI_DIRECT_WPS_TYPE_NONE = 0; - - /// < Push Button Configuration - static const int WIFI_DIRECT_WPS_TYPE_PBC = 1; - - /// < Display PIN code - static const int WIFI_DIRECT_WPS_TYPE_PIN_DISPLAY = 2; - - /// < Provide the keypad to input the PIN - static const int WIFI_DIRECT_WPS_TYPE_PIN_KEYPAD = 4; -} - -/// @deprecated Deprecated since 5.0. Use #wifi_direct_display_type_e instead. -/// @brief Enumeration for Wi-Fi Display device type. -/// @since_tizen 2.3 -abstract class wifi_display_type_e { - /// < Configure as WFD Source - static const int WIFI_DISPLAY_TYPE_NONE = 0; - - /// < Configure as WFD Primary Sink - static const int WIFI_DISPLAY_TYPE_SINK = 1; - - /// < Configure as WFD Secondary Sink - static const int WIFI_DISPLAY_TYPE_SRC = 2; - - /// < Configure as WFD Dual Role - static const int WIFI_DISPLAY_TYPE_DUAL = 3; - - /// < Not configured - static const int WIFI_DISPLAY_TYPE_MAX = 4; -} - -/// @brief Enumeration for Service Discovery type. -/// @since_tizen 2.3 -/// @see wifi_direct_service_state_changed_cb() -/// @see wifi_direct_start_service_discovery() -/// @see wifi_direct_cancel_service_discovery() -/// @see wifi_direct_register_service() -abstract class wifi_direct_service_type_e { - /// < Service discovery type all - static const int WIFI_DIRECT_SERVICE_TYPE_ALL = 0; - - /// < Service discovery type bonjour - static const int WIFI_DIRECT_SERVICE_TYPE_BONJOUR = 1; - - /// < Service discovery type UPNP - static const int WIFI_DIRECT_SERVICE_TYPE_UPNP = 2; - - /// < Service discovery type ws discovery - static const int WIFI_DIRECT_SERVICE_TYPE_WS_DISCOVERY = 3; - - /// < Service discovery type wifi-display - static const int WIFI_DIRECT_SERVICE_TYPE_WIFI_DISPLAY = 4; - - /// < Service discovery type bt address - static const int WIFI_DIRECT_SERVICE_TYPE_BT_ADDR = 5; - - /// < Service discovery type contact info - static const int WIFI_DIRECT_SERVICE_TYPE_CONTACT_INFO = 6; - - /// < Service discovery type vendor-specific - static const int WIFI_DIRECT_SERVICE_TYPE_VENDOR = 255; -} - -/// @brief Enumeration for Wi-Fi Display device type. -/// @since_tizen 2.4 -/// @see wifi_direct_set_display() -/// @see wifi_direct_get_peer_display_type() -abstract class wifi_direct_display_type_e { - /// < Configure as WFD Source - static const int WIFI_DIRECT_DISPLAY_TYPE_SOURCE = 0; - - /// < Configure as WFD Primary Sink - static const int WIFI_DIRECT_DISPLAY_TYPE_PRISINK = 1; - - /// < Configure as WFD Secondary Sink - static const int WIFI_DIRECT_DISPLAY_TYPE_SECSINK = 2; - - /// < Configure as WFD Dual Role - static const int WIFI_DIRECT_DISPLAY_TYPE_DUAL = 3; - - /// < Not configured - static const int WIFI_DIRECT_DISPLAY_TYPE_MAX = 4; -} - -/// @brief Enumeration for Wi-Fi Direct service Discovery state. -/// @since_tizen 2.3 -/// @see wifi_direct_service_state_changed_cb() -abstract class wifi_direct_service_discovery_state_e { - /// < Service discovery started - static const int WIFI_DIRECT_SERVICE_DISCOVERY_STARTED = 0; - - /// < Service discovery found - static const int WIFI_DIRECT_SERVICE_DISCOVERY_FOUND = 1; - - /// < Service discovery finished - static const int WIFI_DIRECT_SERVICE_DISCOVERY_FINISHED = 2; -} - -/// @brief Enumeration for Wi-Fi Direct Discovery Channel. -/// @since_tizen 2.3 -/// @see wifi_direct_start_discovery_specific_channel() -abstract class wifi_direct_discovery_channel_e { - /// < Scan full channel - static const int WIFI_DIRECT_DISCOVERY_FULL_SCAN = 0; - - /// < Scan social channel - static const int WIFI_DIRECT_DISCOVERY_SOCIAL_CHANNEL = 1611; - - /// < Scan channel 1 - static const int WIFI_DIRECT_DISCOVERY_CHANNEL1 = 1; - - /// < Scan channel 6 - static const int WIFI_DIRECT_DISCOVERY_CHANNEL6 = 6; - - /// < Scan channel 11 - static const int WIFI_DIRECT_DISCOVERY_CHANNEL11 = 11; -} - -/// @brief Enumeration for Wi-Fi Frame type. -/// @since_tizen 4.0 -/// @see wifi_direct_add_vsie() -/// @see wifi_direct_remove_vsie() -/// @see wifi_direct_get_vsie() -abstract class wifi_direct_vsie_frames_e { - /// P2P probe request frame - static const int WIFI_DIRECT_VSIE_FRAME_P2P_PROBE_REQ = 0; - - /// P2P probe response frame - static const int WIFI_DIRECT_VSIE_FRAME_P2P_PROBE_RESP = 1; - - /// P2P group owner probe response frame - static const int WIFI_DIRECT_VSIE_FRAME_P2P_GO_PROBE_RESP = 2; - - /// P2P probe request frame - static const int WIFI_DIRECT_VSIE_FRAME_P2P_GO_BEACON = 3; - - /// P2P provision discovery request frame - static const int WIFI_DIRECT_VSIE_FRAME_P2P_PD_REQ = 4; - - /// P2P provision discovery response frame - static const int WIFI_DIRECT_VSIE_FRAME_P2P_PD_RESP = 5; - - /// P2P probe request frame - static const int WIFI_DIRECT_VSIE_FRAME_P2P_GO_NEG_REQ = 6; - - /// P2P group owner negotiation response frame - static const int WIFI_DIRECT_VSIE_FRAME_P2P_GO_NEG_RESP = 7; - - /// P2P group owner negotiation confirmation frame - static const int WIFI_DIRECT_VSIE_FRAME_P2P_GO_NEG_CONF = 8; - - /// P2P invitation request frame - static const int WIFI_DIRECT_VSIE_FRAME_P2P_INV_REQ = 9; - - /// P2P invitation response frame - static const int WIFI_DIRECT_VSIE_FRAME_P2P_INV_RESP = 10; - - /// P2P association request frame - static const int WIFI_DIRECT_VSIE_FRAME_P2P_ASSOC_REQ = 11; - - /// P2P association response frame - static const int WIFI_DIRECT_VSIE_FRAME_P2P_ASSOC_RESP = 12; - - /// Association request frame - static const int WIFI_DIRECT_VSIE_FRAME_ASSOC_REQ = 13; -} - -/// @brief Wi-Fi Direct connection state structure to store result of new connection state callback. -/// @since_tizen 5.0 -final class wifi_direct_connection_state_cb_data_s extends ffi.Struct { - /// < Null-terminated device friendly name. - @ffi.Array.multi([33]) - external ffi.Array device_name; - - /// < Null-terminated Device's P2P Device Address - @ffi.Array.multi([19]) - external ffi.Array mac_address; -} - -/// @brief Wi-Fi Direct buffer structure to store result of peer discovery. -/// @since_tizen 2.3 -/// @remarks You can use APIs for Wi-Fi Direct display function instead of is_miracast_device value -/// which is deprecated since 2.4. -/// @see wifi_direct_discovered_peer_cb() -/// @see wifi_direct_get_peer_info() -/// @see wifi_direct_get_connecting_peer_info() -final class wifi_direct_discovered_peer_info_s extends ffi.Struct { - /// Device's friendly name - external ffi.Pointer device_name; - - /// Device's P2P Device Address - external ffi.Pointer mac_address; - - /// Device's P2P Interface Address, Valid only if device is a P2P GO - external ffi.Pointer interface_address; - - /// Channel the device is listening on - @ffi.Int() - external int channel; - - /// Is peer connected - @ffi.Bool() - external bool is_connected; - - /// Is an active P2P Group Owner - @ffi.Bool() - external bool is_group_owner; - - /// Is a stored Persistent GO - @ffi.Bool() - external bool is_persistent_group_owner; - - /// Primary category of device - @ffi.Int32() - external int primary_device_type; - - /// Sub category of device - @ffi.Int32() - external int secondary_device_type; - - /// The list of supported WPS type. The OR operation on - /// #wifi_direct_wps_type_e can be used like - /// #WIFI_DIRECT_WPS_TYPE_PBC | #WIFI_DIRECT_WPS_TYPE_PIN_DISPLAY - @ffi.Int() - external int supported_wps_types; - - /// Is capable of processing P2P Invitation Procedure signaling - @ffi.Bool() - external bool is_p2p_invitation_procedure_supported; - - /// The number of Registered services - @ffi.UnsignedInt() - external int service_count; - - /// The list of registered services - external ffi.Pointer> service_list; - - /// Is a wifi display device - /// @deprecated Deprecated since 2.4, use wifi direct display APIs instead of - /// is_miracast_device value. - @ffi.Bool() - external bool is_miracast_device; - - /// The information for vendor specific information element - /// @deprecated Deprecated since 5.0, use wifi_direct_get_peer_vsie() API instead of - /// vsie_info value. - external ffi.Pointer vsie_info; -} - -/// @brief Wi-Fi Direct buffer structure to store information of connected peer. -/// @since_tizen 2.3 -/// @remarks You can use APIs for wifi-direct display function instead of is_miracast_device value -/// which is deprecated since 2.4. -/// @see wifi_direct_connected_peer_cb() -final class wifi_direct_connected_peer_info_s extends ffi.Struct { - /// Device's friendly name - external ffi.Pointer device_name; - - /// The IP address - external ffi.Pointer ip_address; - - /// Device's P2P Device Address - external ffi.Pointer mac_address; - - /// Device's P2P Interface Address - external ffi.Pointer interface_address; - - /// Operating channel - @ffi.Int() - external int channel; - - /// Whether peer is a P2P device - @ffi.Bool() - external bool p2p_supported; - - /// Primary category of device - @ffi.Int32() - external int primary_device_type; - - /// Sub category of device - @ffi.Int32() - external int secondary_device_type; - - /// The number of Registered services - @ffi.UnsignedInt() - external int service_count; - - /// The list of registered services - external ffi.Pointer> service_list; - - /// Is a wifi display device - /// @deprecated since tizen 2.4, use wifi direct display APIs instead of - /// is_miracast_device value. - @ffi.Bool() - external bool is_miracast_device; -} - -/// @brief Called when the state of device is changed. -/// @details The following error codes can be delivered -/// #WIFI_DIRECT_ERROR_NONE -/// #WIFI_DIRECT_ERROR_OPERATION_FAILED -/// #WIFI_DIRECT_ERROR_NOT_PERMITTED -/// @since_tizen 2.3 -/// @param[in] error_code The error code -/// @param[in] device_state The device state -/// @param[in] user_data The user data passed from the callback registration function -/// @pre Either wifi_direct_activate() or wifi_direct_deactivate() will invoke -/// this callback in the thread-default main context of the thread from which you -/// registered this callback using wifi_direct_set_device_state_changed_cb(). -/// @see wifi_direct_activate() -/// @see wifi_direct_deactivate() -/// @see wifi_direct_set_device_state_changed_cb() -/// @see wifi_direct_unset_device_state_changed_cb() -typedef wifi_direct_device_state_changed_cb = ffi - .Pointer>; -typedef wifi_direct_device_state_changed_cbFunction = ffi.Void Function( - ffi.Int error_code, - ffi.Int32 device_state, - ffi.Pointer user_data); -typedef Dartwifi_direct_device_state_changed_cbFunction = void Function( - int error_code, int device_state, ffi.Pointer user_data); - -/// @brief Called when the state of discovery is changed. -/// @details The following error codes can be delivered -/// #WIFI_DIRECT_ERROR_NONE -/// #WIFI_DIRECT_ERROR_OPERATION_FAILED -/// #WIFI_DIRECT_ERROR_NOT_PERMITTED -/// @since_tizen 2.3 -/// @param[in] error_code The error code -/// @param[in] discovery_state The discovery state -/// @param[in] user_data The user data passed from the callback registration function -/// @pre Either wifi_direct_start_discovery() or wifi_direct_cancel_discovery() -/// will invoke this callback in the thread-default main context of the thread -/// from which you registered this callback using wifi_direct_set_discovery_state_changed_cb(). -/// @see wifi_direct_start_discovery() -/// @see wifi_direct_cancel_discovery() -/// @see wifi_direct_set_discovery_state_changed_cb() -/// @see wifi_direct_unset_discovery_state_changed_cb() -typedef wifi_direct_discovery_state_chagned_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef wifi_direct_discovery_state_chagned_cbFunction = ffi.Void Function( - ffi.Int error_code, - ffi.Int32 discovery_state, - ffi.Pointer user_data); -typedef Dartwifi_direct_discovery_state_chagned_cbFunction = void Function( - int error_code, int discovery_state, ffi.Pointer user_data); - -/// @brief Called when the peer is found. -/// @details The following error codes can be delivered -/// #WIFI_DIRECT_ERROR_NONE -/// #WIFI_DIRECT_ERROR_OPERATION_FAILED -/// #WIFI_DIRECT_ERROR_NOT_PERMITTED -/// @since_tizen 2.3 -/// @remarks The @a mac_address can be used only in the callback. To use outside, make a copy. -/// @param[in] error_code The error code -/// @param[in] discovery_state The discovery state -/// @param[in] mac_address The MAC address of found peer -/// @param[in] user_data The user data passed from the callback registration function -/// @pre Either wifi_direct_start_discovery() or wifi_direct_cancel_discovery() -/// will invoke this callback in the thread-default main context of the thread -/// from which you registered this callback using wifi_direct_set_peer_found_cb(). -/// @see wifi_direct_start_discovery() -/// @see wifi_direct_cancel_discovery() -/// @see wifi_direct_set_peer_found_cb() -/// @see wifi_direct_unset_peer_found_cb() -typedef wifi_direct_peer_found_cb - = ffi.Pointer>; -typedef wifi_direct_peer_found_cbFunction = ffi.Void Function( - ffi.Int error_code, - ffi.Int32 discovery_state, - ffi.Pointer mac_address, - ffi.Pointer user_data); -typedef Dartwifi_direct_peer_found_cbFunction = void Function( - int error_code, - int discovery_state, - ffi.Pointer mac_address, - ffi.Pointer user_data); - -/// @brief Called when the state of connection is changed. -/// @details The following error codes can be delivered -/// #WIFI_DIRECT_ERROR_NONE -/// #WIFI_DIRECT_ERROR_OPERATION_FAILED -/// #WIFI_DIRECT_ERROR_NOT_PERMITTED -/// #WIFI_DIRECT_ERROR_CONNECTION_FAILED -/// @since_tizen 2.3 -/// @remarks The @a mac_address can be used only in the callback. To use outside, make a copy. -/// @param[in] error_code The error code -/// @param[in] connection_state The connection state -/// @param[in] mac_address The MAC address of the connection peer -/// @param[in] user_data The user data passed from the callback registration function -/// @pre wifi_direct_create_group(), wifi_direct_destroy_group(), -/// wifi_direct_connect(), wifi_direct_disconnect() or -/// wifi_direct_disconnect_all() will invoke this callback in the thread-default -/// main context of the thread from which you registered this callback using -/// using wifi_direct_set_connection_state_changed_cb(). -/// @see wifi_direct_connect() -/// @see wifi_direct_disconnect() -/// @see wifi_direct_disconnect_all() -/// @see wifi_direct_set_connection_state_changed_cb() -/// @see wifi_direct_unset_connection_state_changed_cb() -typedef wifi_direct_connection_state_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef wifi_direct_connection_state_changed_cbFunction = ffi.Void Function( - ffi.Int error_code, - ffi.Int32 connection_state, - ffi.Pointer mac_address, - ffi.Pointer user_data); -typedef Dartwifi_direct_connection_state_changed_cbFunction = void Function( - int error_code, - int connection_state, - ffi.Pointer mac_address, - ffi.Pointer user_data); - -/// @brief Called when the state of connection is changed. -/// @details The following error codes can be delivered:\n -/// #WIFI_DIRECT_ERROR_NONE\n -/// #WIFI_DIRECT_ERROR_OPERATION_FAILED\n -/// #WIFI_DIRECT_ERROR_NOT_PERMITTED -/// @since_tizen 5.0 -/// @param[in] error_code The error code -/// @param[in] connection_state The connection state -/// @param[in] data_s The structure for peer data -/// @param[in] user_data The user data passed from the callback registration function -/// @pre wifi_direct_create_group(), wifi_direct_destroy_group(), wifi_direct_connect(), wifi_direct_disconnect() or wifi_direct_disconnect_all() will invoke this callback -/// if you register this callback using wifi_direct_set_peer_info_connection_state_changed_cb(). -/// @see wifi_direct_connect() -/// @see wifi_direct_disconnect() -/// @see wifi_direct_disconnect_all() -/// @see wifi_direct_set_peer_info_connection_state_changed_cb() -/// @see wifi_direct_unset_peer_info_connection_state_changed_cb() -typedef wifi_direct_peer_info_connection_state_changed_cb = ffi.Pointer< - ffi - .NativeFunction>; -typedef wifi_direct_peer_info_connection_state_changed_cbFunction - = ffi.Void Function( - ffi.Int32 error_code, - ffi.Int32 connection_state, - wifi_direct_connection_state_cb_data_s data_s, - ffi.Pointer user_data); -typedef Dartwifi_direct_peer_info_connection_state_changed_cbFunction - = void Function( - int error_code, - int connection_state, - wifi_direct_connection_state_cb_data_s data_s, - ffi.Pointer user_data); - -/// @brief Called when IP address of client is assigned when your device is the group owner. -/// @details The following error codes can be delivered -/// #WIFI_DIRECT_ERROR_NONE -/// #WIFI_DIRECT_ERROR_OPERATION_FAILED -/// #WIFI_DIRECT_ERROR_NOT_PERMITTED -/// @since_tizen 2.3 -/// @remarks The @a mac_address can be used only in the callback. To use outside, make a copy. -/// The @a ip_address can be used only in the callback. To use outside, make a copy. -/// The @a interface_address can be used only in the callback. To use outside, make a copy. -/// @param[in] mac_address The MAC address of connection peer -/// @param[in] ip_address The IP address of connection peer -/// @param[in] interface_address The interface address of connection peer -/// @param[in] user_data The user data passed from the callback registration function -/// @pre This callback will be invoked in the thread-default main context of the -/// thread from which you registered this callback using wifi_direct_set_client_ip_address_assigned_cb(). -/// @see wifi_direct_set_client_ip_address_assigned_cb() -/// @see wifi_direct_unset_client_ip_address_assigned_cb() -typedef wifi_direct_client_ip_address_assigned_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef wifi_direct_client_ip_address_assigned_cbFunction = ffi.Void Function( - ffi.Pointer mac_address, - ffi.Pointer ip_address, - ffi.Pointer interface_address, - ffi.Pointer user_data); -typedef Dartwifi_direct_client_ip_address_assigned_cbFunction = void Function( - ffi.Pointer mac_address, - ffi.Pointer ip_address, - ffi.Pointer interface_address, - ffi.Pointer user_data); - -/// @brief Called when the state of Service discovery is changed. -/// @details The following error codes can be delivered -/// #WIFI_DIRECT_ERROR_NONE -/// #WIFI_DIRECT_ERROR_OPERATION_FAILED -/// #WIFI_DIRECT_ERROR_NOT_PERMITTED -/// @since_tizen 2.3 -/// @remarks The @a mac_address can be used only in the callback. To use outside, make a copy. -/// @param[in] error_code The error code -/// @param[in] service_state The service discovery state -/// @param[in] service_type Specifies the types of service -/// @param[in] response_data Received response -/// @param[in] mac_address The MAC address of the connection peer -/// @param[in] user_data User can transfer the user specific data in callback -/// @pre Either wifi_direct_start_service_discovery() or -/// wifi_direct_cancel_service_discovery() will invoke this callback in the -/// thread-default main context of thethread from which you registered this -/// callback using wifi_direct_set_service_state_changed_cb(). -/// @see wifi_direct_start_discovery() -/// @see wifi_direct_cancel_discovery() -/// @see wifi_direct_set_discovery_state_changed_cb() -/// @see wifi_direct_unset_discovery_state_changed_cb() -typedef wifi_direct_service_state_changed_cb = ffi - .Pointer>; -typedef wifi_direct_service_state_changed_cbFunction = ffi.Void Function( - ffi.Int error_code, - ffi.Int32 service_state, - ffi.Int32 service_type, - ffi.Pointer response_data, - ffi.Pointer mac_address, - ffi.Pointer user_data); -typedef Dartwifi_direct_service_state_changed_cbFunction = void Function( - int error_code, - int service_state, - int service_type, - ffi.Pointer response_data, - ffi.Pointer mac_address, - ffi.Pointer user_data); - -/// @brief Called when the state of Wi-FI Direct is changed. -/// @since_tizen 3.0 -/// @param[in] state The Wi-Fi Direct state -/// @param[in] user_data The user data passed from the callback registration function -/// @pre Changes in Wi-Fi Direct state will invoke this callback -/// if you register this callback using wifi_direct_set_state_changed_cb(). -/// @see wifi_direct_set_state_changed_cb() -/// @see wifi_direct_unset_state_changed_cb() -typedef wifi_direct_state_changed_cb - = ffi.Pointer>; -typedef wifi_direct_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 state, ffi.Pointer user_data); -typedef Dartwifi_direct_state_changed_cbFunction = void Function( - int state, ffi.Pointer user_data); - -/// @brief Called repeatedly when you get the information of discovered peers. -/// @since_tizen 2.3 -/// @remarks @a peer is valid only in this function. -/// @param[in] peer The information of the discovered peer -/// @param[in] user_data The user data passed from foreach function -/// @return @c true to continue with the next iteration of the loop, -/// @c false to break out of the loop -/// @see wifi_direct_foreach_discovered_peers() -typedef wifi_direct_discovered_peer_cb - = ffi.Pointer>; -typedef wifi_direct_discovered_peer_cbFunction = ffi.Bool Function( - ffi.Pointer peer, - ffi.Pointer user_data); -typedef Dartwifi_direct_discovered_peer_cbFunction = bool Function( - ffi.Pointer peer, - ffi.Pointer user_data); - -/// @brief Called repeatedly when you get the information of connected peers. -/// @since_tizen 2.3 -/// @remarks @a peer is valid only in this function. -/// @param[in] peer The information of discovered peer -/// @param[in] user_data The user data passed from foreach function -/// @return @c true to continue with the next iteration of the loop, -/// @c false to break out of the loop -/// @see wifi_direct_foreach_connected_peers() -typedef wifi_direct_connected_peer_cb - = ffi.Pointer>; -typedef wifi_direct_connected_peer_cbFunction = ffi.Bool Function( - ffi.Pointer peer, - ffi.Pointer user_data); -typedef Dartwifi_direct_connected_peer_cbFunction = bool Function( - ffi.Pointer peer, - ffi.Pointer user_data); - -/// @brief Called when you get the supported WPS (Wi-Fi Protected Setup) type repeatedly. -/// @since_tizen 2.3 -/// @param[in] type The type of WPS -/// @param[in] user_data The user data passed from the request function -/// @return @c true to continue with the next iteration of the loop, \n -/// @c false to break out of the loop -/// @pre wifi_direct_foreach_supported_wps_types() will invoke this callback. -/// @see wifi_direct_foreach_supported_wps_types() -typedef wifi_direct_supported_wps_type_cb = ffi - .Pointer>; -typedef wifi_direct_supported_wps_type_cbFunction = ffi.Bool Function( - ffi.Int32 type, ffi.Pointer user_data); -typedef Dartwifi_direct_supported_wps_type_cbFunction = bool Function( - int type, ffi.Pointer user_data); - -/// @brief Called when you get the persistent groups repeatedly. -/// @since_tizen 2.3 -/// @remarks The @a mac_address can be used only in the callback. To use outside, make a copy. -/// The @a ssid can be used only in the callback. To use outside, make a copy. -/// @param[in] mac_address The MAC address of the persistent group owner -/// @param[in] ssid The SSID (Service Set Identifier) of the persistent group owner -/// @param[in] user_data The user data passed from the request function -/// @return @c true to continue with the next iteration of the loop, \n -/// @c false to break out of the loop -/// @pre wifi_direct_foreach_persistent_groups() will invoke this callback. -/// @see wifi_direct_foreach_persistent_groups() -typedef wifi_direct_persistent_group_cb - = ffi.Pointer>; -typedef wifi_direct_persistent_group_cbFunction = ffi.Bool Function( - ffi.Pointer mac_address, - ffi.Pointer ssid, - ffi.Pointer user_data); -typedef Dartwifi_direct_persistent_group_cbFunction = bool Function( - ffi.Pointer mac_address, - ffi.Pointer ssid, - ffi.Pointer user_data); - -/// @partner -/// @brief Enumeration for CSR Errors. -/// @since_tizen 3.0 -abstract class csr_error_e { - /// < Successful - static const int CSR_ERROR_NONE = 0; - - /// < Invalid function parameter - static const int CSR_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int CSR_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied - static const int CSR_ERROR_PERMISSION_DENIED = -13; - - /// < Device needed to run API is not supported - static const int CSR_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Busy for processing another request - static const int CSR_ERROR_BUSY = -16; - - /// < Socket error between client and server - static const int CSR_ERROR_SOCKET = -31653887; - - /// < The given handle is invalid - static const int CSR_ERROR_INVALID_HANDLE = -31653886; - - /// < Server has been failed for some reason - static const int CSR_ERROR_SERVER = -31653885; - - /// < No Task exists - static const int CSR_ERROR_NO_TASK = -31653884; - - /// < DB transaction error - static const int CSR_ERROR_DB = -31653883; - - /// < Removing file or application is failed - static const int CSR_ERROR_REMOVE_FAILED = -31653882; - - /// < Getting user response is failed - static const int CSR_ERROR_USER_RESPONSE_FAILED = -31653881; - - /// < File not exist - static const int CSR_ERROR_FILE_DO_NOT_EXIST = -31653880; - - /// < File changed after detection - static const int CSR_ERROR_FILE_CHANGED = -31653879; - - /// < File type is invalid - static const int CSR_ERROR_FILE_SYSTEM = -31653872; - - /// < Insufficient permission of engine - static const int CSR_ERROR_ENGINE_PERMISSION = -31653871; - - /// < No engine exists - static const int CSR_ERROR_ENGINE_NOT_EXIST = -31653870; - - /// < Engine is in disabled state - static const int CSR_ERROR_ENGINE_DISABLED = -31653869; - - /// < Engine is not activated - static const int CSR_ERROR_ENGINE_NOT_ACTIVATED = -31653868; - - /// < Engine internal error - static const int CSR_ERROR_ENGINE_INTERNAL = -31653863; - - /// < System error - static const int CSR_ERROR_SYSTEM = -31653633; -} - -final class __csr_engine_h extends ffi.Opaque {} - -/// @platform -/// @brief Enumeration for engine identifier. -/// @since_tizen 3.0 -abstract class csr_engine_id_e { - /// < Content screening engine id - static const int CSR_ENGINE_CS = 1; - - /// < Web protection engine id - static const int CSR_ENGINE_WP = 2; -} - -/// @platform -/// @brief Enumeration for state of engine activation. -/// @since_tizen 3.0 -abstract class csr_activated_e { - /// < Engine is not activated - static const int CSR_NOT_ACTIVATED = 1; - - /// < Engine is activated - static const int CSR_ACTIVATED = 2; -} - -/// @platform -/// @brief Enumeration for state of engine. -/// @since_tizen 3.0 -abstract class csr_state_e { - /// < Enable engine - static const int CSR_STATE_ENABLE = 1; - - /// < Disable engine - static const int CSR_STATE_DISABLE = 2; -} - -/// @platform -/// @brief Engine handle. -/// @since_tizen 3.0 -typedef csr_engine_h = ffi.Pointer<__csr_engine_h>; - -/// @partner -/// @brief Enumeration for severity level of a detected malware. -/// @since_tizen 3.0 -abstract class csr_cs_severity_level_e { - /// < Low Severity. User can choose how to handle between skip, ignore and remove. - static const int CSR_CS_SEVERITY_LOW = 1; - - /// < Medium Severity. User can choose how to handle between skip, ignore and remove. - static const int CSR_CS_SEVERITY_MEDIUM = 2; - - /// < High Severity. User can choose how to handle between skip and remove. - static const int CSR_CS_SEVERITY_HIGH = 3; -} - -/// @partner -/// @brief Enumeration for the option of asking user about handling a detected malware. -/// @since_tizen 3.0 -abstract class csr_cs_ask_user_e { - /// < Do not ask the user even if malicious contents were found. - static const int CSR_CS_ASK_USER_NO = 0; - - /// < Ask the user when malicious contents were found. - static const int CSR_CS_ASK_USER_YES = 1; -} - -/// @partner -/// @brief Enumeration for the user response from popup. -/// @since_tizen 3.0 -abstract class csr_cs_user_response_e { - /// < No response from user. - static const int CSR_CS_USER_RESPONSE_USER_NOT_ASKED = 0; - - /// < A user decided to remove a detected malicious content and it was removed. - static const int CSR_CS_USER_RESPONSE_REMOVE = 1; - - /// < A user decided to process a detected malware. - static const int CSR_CS_USER_RESPONSE_PROCESSING_ALLOWED = 2; - - /// < A user decided not to process a detected malware. - static const int CSR_CS_USER_RESPONSE_PROCESSING_DISALLOWED = 3; -} - -/// @partner -/// @brief Enumeration for the action types for the detected malware files. -/// @since_tizen 3.0 -abstract class csr_cs_action_e { - /// < Remove the detected malware file. - static const int CSR_CS_ACTION_REMOVE = 0; - - /// < Ignore the detected malware file. - static const int CSR_CS_ACTION_IGNORE = 1; - - /// < Unignore the previously ignored file. - static const int CSR_CS_ACTION_UNIGNORE = 2; -} - -/// @partner -/// @brief Enumeration for maximum core usage during scanning. -/// @since_tizen 3.0 -abstract class csr_cs_core_usage_e { - /// < Use default setting value. - static const int CSR_CS_CORE_USAGE_DEFAULT = 0; - - /// < Use all cores during scanning. - static const int CSR_CS_CORE_USAGE_ALL = 1; - - /// < Use half cores during scanning. - static const int CSR_CS_CORE_USAGE_HALF = 2; - - /// < Use a single core during scanning. - static const int CSR_CS_CORE_USAGE_SINGLE = 3; -} - -final class __csr_cs_context_s extends ffi.Opaque {} - -final class __csr_cs_malware_s extends ffi.Opaque {} - -final class __csr_cs_malware_list_s extends ffi.Opaque {} - -final class __csr_cs_engine_s extends ffi.Opaque {} - -/// @partner -/// @brief Content screening APIs context handle. -/// @since_tizen 3.0 -typedef csr_cs_context_h = ffi.Pointer<__csr_cs_context_s>; - -/// @partner -/// @brief Detected malware handle. -/// @since_tizen 3.0 -typedef csr_cs_malware_h = ffi.Pointer<__csr_cs_malware_s>; - -/// @partner -/// @brief Called when each file scanning is done without malware. -/// @since_tizen 3.0 -/// @remarks Only for asynchronous scan functions. -/// @remarks Called for each file or application which is not detected malware. -/// @param[in] file_path A path of the file scanned. It would be package path if it's in application -/// @param[in] user_data A pointer of a user data. It's provided by client when calling asynchronous scanning method -/// @see csr_cs_set_file_scanned_cb() -/// @see csr_cs_scan_files_async() -/// @see csr_cs_scan_dir_async() -/// @see csr_cs_scan_dirs_async() -typedef csr_cs_file_scanned_cb - = ffi.Pointer>; -typedef csr_cs_file_scanned_cbFunction = ffi.Void Function( - ffi.Pointer file_path, ffi.Pointer user_data); -typedef Dartcsr_cs_file_scanned_cbFunction = void Function( - ffi.Pointer file_path, ffi.Pointer user_data); - -/// @partner -/// @brief Called when each file scanning is done with malware. -/// @since_tizen 3.0 -/// @remarks Only for asynchronous scan functions. -/// @remarks Called for each file or application which is detected malware. -/// @remarks @a malware will be released when a context is released using csr_cs_context_destroy(). -/// @param[in] malware The detected malware handle -/// @param[in] user_data A pointer of a user data. It's provided by client when calling asynchronous scanning method -/// @see csr_cs_set_detected_cb() -/// @see csr_cs_scan_files_async() -/// @see csr_cs_scan_dir_async() -/// @see csr_cs_scan_dirs_async() -typedef csr_cs_detected_cb - = ffi.Pointer>; -typedef csr_cs_detected_cbFunction = ffi.Void Function( - csr_cs_malware_h malware, ffi.Pointer user_data); -typedef Dartcsr_cs_detected_cbFunction = void Function( - csr_cs_malware_h malware, ffi.Pointer user_data); - -/// @partner -/// @brief Called when scanning is finished successfully. -/// @since_tizen 3.0 -/// @remarks Only for asynchronous scan functions. -/// @remarks Called only once at the end of scanning when success. -/// @param[in] user_data A pointer of a user data. It's provided by client when calling asynchronous scanning method -/// @see csr_cs_set_completed_cb() -/// @see csr_cs_scan_files_async() -/// @see csr_cs_scan_dir_async() -/// @see csr_cs_scan_dirs_async() -typedef csr_cs_completed_cb - = ffi.Pointer>; -typedef csr_cs_completed_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartcsr_cs_completed_cbFunction = void Function( - ffi.Pointer user_data); - -/// @partner -/// @brief Called when scanning is cancelled by csr_cs_cancel_scanning(). -/// @since_tizen 3.0 -/// @remarks Only for asynchronous scan functions. -/// @remarks Called only once at the end of scanning by being cancelled. -/// @param[in] user_data A pointer of a user data. It's provided by client when calling asynchronous scanning method -/// @see csr_cs_set_cancelled_cb() -/// @see csr_cs_cancel_scanning() -/// @see csr_cs_scan_files_async() -/// @see csr_cs_scan_dir_async() -/// @see csr_cs_scan_dirs_async() -typedef csr_cs_cancelled_cb - = ffi.Pointer>; -typedef csr_cs_cancelled_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartcsr_cs_cancelled_cbFunction = void Function( - ffi.Pointer user_data); - -/// @partner -/// @brief Called when scanning is stopped with an error. -/// @details The following error codes can be delivered.\n -/// #CSR_ERROR_FILE_DO_NOT_EXIST,\n -/// #CSR_ERROR_SOCKET,\n -/// #CSR_ERROR_SERVER,\n -/// #CSR_ERROR_ENGINE_NOT_EXIST,\n -/// #CSR_ERROR_ENGINE_DISABLED,\n -/// #CSR_ERROR_ENGINE_NOT_ACTIVATED,\n -/// #CSR_ERROR_ENGINE_PERMISSION,\n -/// #CSR_ERROR_ENGINE_INTERNAL -/// @since_tizen 3.0 -/// @remarks Only for asynchronous scan functions. -/// @remarks Called only once at the end of scanning when failed with error. -/// @param[in] error_code Error code of #csr_error_e defined in csr-error.h -/// @param[in] user_data A pointer of a user data. It's provided by client when calling asynchronous scanning method -/// @see csr_cs_set_error_cb() -/// @see csr_cs_scan_files_async() -/// @see csr_cs_scan_dir_async() -/// @see csr_cs_scan_dirs_async() -typedef csr_cs_error_cb - = ffi.Pointer>; -typedef csr_cs_error_cbFunction = ffi.Void Function( - ffi.Int error_code, ffi.Pointer user_data); -typedef Dartcsr_cs_error_cbFunction = void Function( - int error_code, ffi.Pointer user_data); - -/// @partner -/// @brief Detected malware list handle. -/// @since_tizen 3.0 -typedef csr_cs_malware_list_h = ffi.Pointer<__csr_cs_malware_list_s>; - -final class __csr_wp_context_s extends ffi.Opaque {} - -final class __csr_wp_check_result_h extends ffi.Opaque {} - -/// @partner -/// @brief Enumeration for the options about prompting a popup to a user. -/// @since_tizen 3.0 -abstract class csr_wp_ask_user_e { - /// < Do not ask the user even if a URL turns out risky. - static const int CSR_WP_ASK_USER_NO = 0; - - /// < Ask the user when a URL turns out risky - static const int CSR_WP_ASK_USER_YES = 1; -} - -/// @partner -/// @brief Enumeration for the user response for a popup. -/// @since_tizen 3.0 -abstract class csr_wp_user_response_e { - /// < There was no popup for asking the user. - static const int CSR_WP_USER_RESPONSE_USER_NOT_ASKED = 0; - - /// < A user allowed to process the url. - static const int CSR_WP_USER_RESPONSE_PROCESSING_ALLOWED = 1; - - /// < A user disallowed to process the url. - static const int CSR_WP_USER_RESPONSE_PROCESSING_DISALLOWED = 2; -} - -/// @partner -/// @brief Enumeration for risk level of a url. -/// @since_tizen 3.0 -abstract class csr_wp_risk_level_e { - /// < Risk Low. - static const int CSR_WP_RISK_LOW = 1; - - /// < Risk Unverified. There is no information about the url. - static const int CSR_WP_RISK_UNVERIFIED = 2; - - /// < Risk Medium. Prompt the user before processing. Ask the user if they want the application to process the url. - static const int CSR_WP_RISK_MEDIUM = 3; - - /// < High Risk.Do not process the url and just notify the user - static const int CSR_WP_RISK_HIGH = 4; -} - -/// @partner -/// @brief CSR WP context handle. -/// @since_tizen 3.0 -typedef csr_wp_context_h = ffi.Pointer<__csr_wp_context_s>; - -/// @partner -/// @brief CSR WP scan result handle. -/// @since_tizen 3.0 -typedef csr_wp_check_result_h = ffi.Pointer<__csr_wp_check_result_h>; - -/// @brief Enumeration for DCM error values. -/// @since_tizen 5.0 -abstract class dcm_error_e { - /// < Successful - static const int DCM_ERROR_NONE = 0; - - /// < Invalid function parameter - static const int DCM_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int DCM_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied - static const int DCM_ERROR_PERMISSION_DENIED = -13; - - /// < Feature needed to run API is not supported - static const int DCM_ERROR_NOT_SUPPORTED = -1073741822; - - /// < No data available - static const int DCM_ERROR_NO_DATA = -61; - - /// < Unknown error - static const int DCM_ERROR_UNKNOWN = -1073741824; - - /// < Socket error between client and server - static const int DCM_ERROR_SOCKET = -50135039; -} - -/// @brief Enumeration for DCM message digest algorithms. -/// @since_tizen 5.0 -abstract class dcm_digest_algorithm_e { - /// < No message digest algorithm - static const int DCM_DIGEST_NONE = 0; - - /// < Message digest algorithm MD2 - static const int DCM_DIGEST_MD2 = 1; - - /// < Message digest algorithm MD4 - static const int DCM_DIGEST_MD4 = 2; - - /// < Message digest algorithm MD5 - static const int DCM_DIGEST_MD5 = 3; - - /// < Message digest algorithm SHA1 - static const int DCM_DIGEST_SHA1 = 4; - - /// < Message digest algorithm SHA224 - static const int DCM_DIGEST_SHA224 = 5; - - /// < Message digest algorithm SHA256 - static const int DCM_DIGEST_SHA256 = 6; - - /// < Message digest algorithm SHA384 - static const int DCM_DIGEST_SHA384 = 7; - - /// < Message digest algorithm SHA512 - static const int DCM_DIGEST_SHA512 = 8; - - /// < Message digest algorithm RIPEMD160 - static const int DCM_DIGEST_RIPEMD160 = 9; -} - -/// @brief Enumeration of device policy API errors -/// @since_tizen 3.0 -abstract class dpm_error_type_e { - /// < The operation was successful - static const int DPM_ERROR_NONE = 0; - - /// < Invalid parameter - static const int DPM_ERROR_INVALID_PARAMETER = -22; - - /// < Connection refused - static const int DPM_ERROR_CONNECTION_REFUSED = -111; - - /// < Time out - static const int DPM_ERROR_TIMED_OUT = -1073741823; - - /// < Access privilege is not sufficient - static const int DPM_ERROR_PERMISSION_DENIED = -13; - - /// < Operation not permitted - static const int DPM_ERROR_NOT_PERMITTED = -1; - - /// < File exists - static const int DPM_ERROR_FILE_EXISTS = -17; - - /// < Out of memory - static const int DPM_ERROR_OUT_OF_MEMORY = -12; - - /// < No Data - static const int DPM_ERROR_NO_DATA = -61; -} - -/// @brief The device policy manager handle -/// @details The device policy manager handle is an abstraction of the -/// logical connection between the device policy manager and -/// it's client. The device policy manager handle must be -/// created by using dpm_manager_create() before attempting to -/// use almost any of the device policy APIs, and it should -/// be freed when interaction with the device policy manager -/// is no longer required. -/// To release the handle, use dpm_manager_destroy(). -/// @since_tizen 3.0 -/// @see dpm_manager_create() -/// @see dpm_manager_destroy() -typedef device_policy_manager_h = ffi.Pointer; - -/// @brief Called when a policy is changed. -/// @since_tizen 3.0 -/// @param[in] name The name of the policy -/// @param[in] state The current state of the policy -/// @param[in] user_data The user data passed from dpm_manager_add_policy_changed_cb -/// @see dpm_manager_add_policy_changed_cb() -/// @see dpm_manager_remove_policy_changed_cb() -typedef dpm_policy_changed_cb - = ffi.Pointer>; -typedef dpm_policy_changed_cbFunction = ffi.Void Function( - ffi.Pointer name, - ffi.Pointer state, - ffi.Pointer user_data); -typedef Dartdpm_policy_changed_cbFunction = void Function( - ffi.Pointer name, - ffi.Pointer state, - ffi.Pointer user_data); - -/// @brief Called when a zone raises a signal. -/// @since_tizen 3.0 -/// @param[in] name The zone name -/// @param[in] object The object name triggered the signal -/// @param[in] user_data The user data passed from dpm_zone_add_signal_cb -/// @see dpm_zone_add_signal_cb() -/// @see dpm_zone_remove_signal_cb() -typedef dpm_signal_cb = ffi.Pointer>; -typedef dpm_signal_cbFunction = ffi.Void Function(ffi.Pointer name, - ffi.Pointer object, ffi.Pointer user_data); -typedef Dartdpm_signal_cbFunction = void Function(ffi.Pointer name, - ffi.Pointer object, ffi.Pointer user_data); - -/// @brief Enumeration for dpm password quality type -/// @since_tizen 3.0 -abstract class dpm_password_quality_e { - /// < No requirements for password. - static const int DPM_PASSWORD_QUALITY_UNSPECIFIED = 0; - - /// < EAS(Exchange ActiveSync) requirement for simple password - static const int DPM_PASSWORD_QUALITY_SIMPLE_PASSWORD = 1; - - /// < Some kind password is required, but doesn't care what it is - static const int DPM_PASSWORD_QUALITY_SOMETHING = 16; - - /// < Containing at least numeric characters - static const int DPM_PASSWORD_QUALITY_NUMERIC = 32; - - /// < Containing at least alphabetic (or other symbol) characters - static const int DPM_PASSWORD_QUALITY_ALPHABETIC = 64; - - /// < Containing at least numeric and alphabetic characters - static const int DPM_PASSWORD_QUALITY_ALPHANUMERIC = 128; -} - -/// @brief Enumeration for dpm password status type -/// @since_tizen 3.0 -abstract class dpm_password_status_e { - /// < Password normal status - static const int DPM_PASSWORD_STATUS_NORMAL = 0; - - /// < Password successfully changed - static const int DPM_PASSWORD_STATUS_CHANGED = 1; - - /// < Password not changed - static const int DPM_PASSWORD_STATUS_NOT_CHANGED = 2; - - /// < Password change required - static const int DPM_PASSWORD_STATUS_CHANGE_REQUIRED = 3; - - /// < Password Max Attempts Exceeded - static const int DPM_PASSWORD_STATUS_MAX_ATTEMPTS_EXCEEDED = 4; - - /// < Password expired - static const int DPM_PASSWORD_STATUS_EXPIRED = 5; - - /// < Device unlock failed by Password Recovery - static const int DPM_PASSWORD_STATUS_RECOVERY_PASSWORD_FAILED = 6; - - /// < Device unlock succeeded by Password Recovery - static const int DPM_PASSWORD_STATUS_RECOVERY_PASSWORD_SUCCEEDED = 7; - - /// < Password quality successfully changed - static const int DPM_PASSWORD_STATUS_QUALITY_CHANGED = 8; - - /// < Password min_length successfully changed - static const int DPM_PASSWORD_STATUS_MIN_LENGTH_CHANGED = 9; - - /// < Password complex_char successfully changed - static const int DPM_PASSWORD_STATUS_COMPLEX_CHAR_CHANGED = 10; - - /// < Password pattern successfully changed - static const int DPM_PASSWORD_STATUS_PATTERN_CHANGED = 11; -} - -/// @brief The password forbidden string list iterator handle -/// @since_tizen 3.0 -/// @see dpm_password_create_iterator() -/// @see dpm_password_iterator_next() -/// @see dpm_password_destroy_iterator() -typedef dpm_password_iterator_h = ffi.Pointer; - -/// @brief Enumeration for device wipe type. -/// @since_tizen 3.0 -abstract class dpm_security_wipe_type_e { - /// < Wipe internal memory - static const int DPM_SECURITY_WIPE_INTERNAL_STORAGE = 1; - - /// < Wipe external memory - static const int DPM_SECURITY_WIPE_EXTERNAL_STORAGE = 2; -} - -/// @brief Enumeration for zone state -/// @since_tizen 3.0 -abstract class dpm_zone_state_e { - /// < Zone has been defined, but it can not start. - static const int DPM_ZONE_STATE_LOCKED = 1; - - /// < Zone has been started. - static const int DPM_ZONE_STATE_RUNNING = 2; - - /// < This presents all of the state - static const int DPM_ZONE_STATE_ALL = 255; -} - -/// @brief Called to get all the name of created zones. -/// @since_tizen 3.0 -/// @param[in] name The zone name -/// @param[in] user_data The user data passed from dpm_zone_foreach_name -/// @return true to continue with the next iteration of the loop, otherwise false to break out out the loop -/// @see dpm_zone_foreach_name() -typedef dpm_zone_foreach_name_cb - = ffi.Pointer>; -typedef dpm_zone_foreach_name_cbFunction = ffi.Bool Function( - ffi.Pointer name, ffi.Pointer user_data); -typedef Dartdpm_zone_foreach_name_cbFunction = bool Function( - ffi.Pointer name, ffi.Pointer user_data); - -/// @brief Enumeration for Key Manager Errors. -/// @since_tizen 2.3 -abstract class key_manager_error_e { - /// < Successful - static const int CKMC_ERROR_NONE = 0; - - /// < Invalid function parameter - static const int CKMC_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int CKMC_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied - static const int CKMC_ERROR_PERMISSION_DENIED = -13; - - /// < Device needed to run API is not supported - static const int CKMC_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Socket error between client and Central Key Manager - static const int CKMC_ERROR_SOCKET = -31522815; - - /// < Invalid request from client - static const int CKMC_ERROR_BAD_REQUEST = -31522814; - - /// < Invalid response from Central Key Manager - static const int CKMC_ERROR_BAD_RESPONSE = -31522813; - - /// < Transmitting request failed - static const int CKMC_ERROR_SEND_FAILED = -31522812; - - /// < Receiving response failed - static const int CKMC_ERROR_RECV_FAILED = -31522811; - - /// < Optional password which used when saving is incorrect - static const int CKMC_ERROR_AUTHENTICATION_FAILED = -31522810; - - /// < The output buffer size which is passed as parameter is too small - static const int CKMC_ERROR_BUFFER_TOO_SMALL = -31522809; - - /// < Central Key Manager has been failed for some reason - static const int CKMC_ERROR_SERVER_ERROR = -31522808; - - /// < The database was not unlocked - user did not login - static const int CKMC_ERROR_DB_LOCKED = -31522807; - - /// < An internal error inside the database - static const int CKMC_ERROR_DB_ERROR = -31522806; - - /// < Provided alias already exists in the database - static const int CKMC_ERROR_DB_ALIAS_EXISTS = -31522805; - - /// < No data for given alias - static const int CKMC_ERROR_DB_ALIAS_UNKNOWN = -31522804; - - /// < CA certificate(s) were unknown and chain could not be created - static const int CKMC_ERROR_VERIFICATION_FAILED = -31522803; - - /// < A provided file or binary has not a valid format - static const int CKMC_ERROR_INVALID_FORMAT = -31522802; - - /// < A provided file doesn't exist or cannot be accessed in the file system - static const int CKMC_ERROR_FILE_ACCESS_DENIED = -31522801; - - /// < The data is saved as unexportable so it cannot be leaked - static const int CKMC_ERROR_NOT_EXPORTABLE = -31522800; - - /// < Save key/certificate/pkcs12 failed because of file system error - static const int CKMC_ERROR_FILE_SYSTEM = -31522799; - - /// < The error with unknown reason - static const int CKMC_ERROR_UNKNOWN = -31522561; -} - -/// @brief Enumeration for key types of key manager. -/// @since_tizen 2.3 -abstract class ckmc_key_type { - /// < Key type not specified - static const int CKMC_KEY_NONE = 0; - - /// < RSA public key - static const int CKMC_KEY_RSA_PUBLIC = 1; - - /// < RSA private key - static const int CKMC_KEY_RSA_PRIVATE = 2; - - /// < ECDSA public key - static const int CKMC_KEY_ECDSA_PUBLIC = 3; - - /// < ECDSA private key - static const int CKMC_KEY_ECDSA_PRIVATE = 4; - - /// < DSA public key - static const int CKMC_KEY_DSA_PUBLIC = 5; - - /// < DSA private key - static const int CKMC_KEY_DSA_PRIVATE = 6; - - /// < AES key - static const int CKMC_KEY_AES = 7; -} - -/// @brief Enumeration for data format. -/// @since_tizen 2.3 -abstract class ckmc_data_format { - /// < DER format base64 encoded data - static const int CKMC_FORM_DER_BASE64 = 0; - - /// < DER encoded data - static const int CKMC_FORM_DER = 1; - - /// < PEM encoded data. It consists of the DER format base64 encoded - /// with additional header and footer lines. - static const int CKMC_FORM_PEM = 2; -} - -/// @brief Enumeration for elliptic curve. -/// @since_tizen 2.3 -abstract class ckmc_ec_type { - /// < Elliptic curve domain "secp192r1" listed in "SEC 2" recommended - /// elliptic curve domain - static const int CKMC_EC_PRIME192V1 = 0; - - /// < "SEC 2" recommended elliptic curve domain - secp256r1 - static const int CKMC_EC_PRIME256V1 = 1; - - /// < NIST curve P-384(covers "secp384r1", the elliptic curve domain - /// listed in See SEC 2 - static const int CKMC_EC_SECP384R1 = 2; -} - -/// @brief Enumeration for hash algorithm. -/// @since_tizen 2.3 -abstract class ckmc_hash_algo { - /// < No Hash Algorithm - static const int CKMC_HASH_NONE = 0; - - /// < Hash Algorithm SHA1 - static const int CKMC_HASH_SHA1 = 1; - - /// < Hash Algorithm SHA256 - static const int CKMC_HASH_SHA256 = 2; - - /// < Hash Algorithm SHA384 - static const int CKMC_HASH_SHA384 = 3; - - /// < Hash Algorithm SHA512 - static const int CKMC_HASH_SHA512 = 4; -} - -/// @brief Enumeration for RSA padding algorithm. -/// @since_tizen 2.3 -abstract class ckmc_rsa_padding_algo { - /// < No Padding - static const int CKMC_NONE_PADDING = 0; - - /// < PKCS#1 Padding - static const int CKMC_PKCS1_PADDING = 1; - - /// < X9.31 padding - static const int CKMC_X931_PADDING = 2; -} - -/// @deprecated Deprecated since @if MOBILE 2.4. @elseif WEARABLE 3.0. @endif [Use ckmc_permission_e() instead] -/// @brief Enumeration for database access rights. -/// @since_tizen 2.3 -abstract class ckmc_access_right { - /// < Access right for read - static const int CKMC_AR_READ = 0; - - /// < Access right for read and remove - static const int CKMC_AR_READ_REMOVE = 1; -} - -/// @brief Enumeration for permissions to access/modify alias. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class ckmc_permission { - /// < Clear permissions - static const int CKMC_PERMISSION_NONE = 0; - - /// < Read allowed - static const int CKMC_PERMISSION_READ = 1; - - /// < Remove allowed - static const int CKMC_PERMISSION_REMOVE = 2; -} - -/// @brief The structure for binary buffer used in key manager CAPI. -/// @since_tizen 2.3 -final class __ckmc_raw_buff extends ffi.Struct { - /// < Byte array containing binary data - external ffi.Pointer data; - - /// < The size of the binary data - @ffi.Size() - external int size; -} - -/// @brief The structure for a policy for storing key/certificate/binary data. -/// @since_tizen 2.3 -final class __ckmc_policy extends ffi.Struct { - /// < Byte array used to encrypt data inside CKM. If it is not null, the data - /// (or key, or certificate) is stored encrypted with this password inside - /// key manager - external ffi.Pointer password; - - /// < If true key may be extracted from storage - @ffi.Bool() - external bool extractable; -} - -/// @brief The structure for key used in key manager CAPI. -/// @since_tizen 2.3 -final class __ckmc_key extends ffi.Struct { - /// < Byte array of key. raw_key may be encrypted with password - external ffi.Pointer raw_key; - - /// < The byte size of raw_key - @ffi.Size() - external int key_size; - - /// < The raw_key's type - @ffi.Int32() - external int key_type; - - /// < Byte array used to decrypt data raw_key inside key manager. - external ffi.Pointer password; -} - -/// @brief The structure for certificate used in key manager CAPI. -/// @since_tizen 2.3 -final class __ckmc_cert extends ffi.Struct { - /// < Byte array of certificate - external ffi.Pointer raw_cert; - - /// < Byte size of raw_cert - @ffi.Size() - external int cert_size; - - /// < Raw_cert's encoding format - @ffi.Int32() - external int data_format; -} - -/// @brief The structure for linked list of alias. -/// @since_tizen 2.3 -final class __ckmc_alias_list extends ffi.Struct { - /// < The name of key, certificate or data stored in key manager - external ffi.Pointer alias; - - /// < The pointer pointing to the next ckmc_alias_list_s - external ffi.Pointer<__ckmc_alias_list> next; -} - -/// @brief The structure for linked list of ckmc_cert_s -/// @since_tizen 2.3 -final class __ckmc_cert_list extends ffi.Struct { - /// < The pointer of ckmc_cert_s - external ffi.Pointer cert; - - /// < The pointer pointing to the next ckmc_cert_list_s - external ffi.Pointer<__ckmc_cert_list> next; -} - -/// @brief The structure for certificate used in key manager CAPI. -/// @since_tizen 2.3 -typedef ckmc_cert_s = __ckmc_cert; - -/// @brief Enumeration for OCSP status. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class ckmc_ocsp_status { - /// < OCSP status is good - static const int CKMC_OCSP_STATUS_GOOD = 0; - - /// < The certificate is revoked - static const int CKMC_OCSP_STATUS_REVOKED = 1; - - /// < Unknown error - static const int CKMC_OCSP_STATUS_UNKNOWN = 2; - - /// < The certificate does not provide OCSP extension - static const int CKMC_OCSP_ERROR_UNSUPPORTED = 3; - - /// < The invalid URL in certificate OCSP extension - static const int CKMC_OCSP_ERROR_INVALID_URL = 4; - - /// < The invalid response from OCSP server - static const int CKMC_OCSP_ERROR_INVALID_RESPONSE = 5; - - /// < OCSP remote server error - static const int CKMC_OCSP_ERROR_REMOTE = 6; - - /// < Network connection error - static const int CKMC_OCSP_ERROR_NET = 7; - - /// < OpenSSL API error - static const int CKMC_OCSP_ERROR_INTERNAL = 8; -} - -/// @brief The structure for PKCS12 used in key manager CAPI. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -final class __ckmc_pkcs12 extends ffi.Struct { - /// < The private key, may be null - external ffi.Pointer priv_key; - - /// < The certificate, may be null - external ffi.Pointer cert; - - /// < The chain certificate list, may be null - external ffi.Pointer ca_chain; -} - -/// @brief The structure for key used in key manager CAPI. -/// @since_tizen 2.3 -typedef ckmc_key_s = __ckmc_key; - -/// @brief The structure for linked list of ckmc_cert_s -/// @since_tizen 2.3 -typedef ckmc_cert_list_s = __ckmc_cert_list; - -/// @brief Enumeration for crypto algorithm parameters. -/// @since_tizen 3.0 -/// @see #ckmc_algo_type_e -abstract class ckmc_param_name { - static const int CKMC_PARAM_ALGO_TYPE = 1; - - /// < 16B buffer (up to 2^64-1 bytes long in case of AES GCM) - static const int CKMC_PARAM_ED_IV = 101; - - /// < integer - ctr length in bits - static const int CKMC_PARAM_ED_CTR_LEN = 102; - - /// < buffer - static const int CKMC_PARAM_ED_AAD = 103; - - /// < integer - tag length in bits - static const int CKMC_PARAM_ED_TAG_LEN = 104; - - /// < buffer - static const int CKMC_PARAM_ED_LABEL = 105; -} - -final class __ckmc_param_list extends ffi.Opaque {} - -/// @brief Enumeration for crypto algorithm types. -/// @since_tizen 3.0 -/// @see #ckmc_param_name_e -abstract class ckmc_algo_type { - /// < AES-CTR algorithm - /// Supported parameters: - /// - CKMC_PARAM_ALGO_TYPE = CKMC_ALGO_AES_CTR(mandatory), - /// - CKMC_PARAM_ED_IV = 16-byte initialization vector(mandatory) - /// - CKMC_PARAM_ED_CTR_LEN = length of counter block in bits - /// (optional, only 128b is supported at the moment) - static const int CKMC_ALGO_AES_CTR = 1; - - /// < AES-CBC algorithm - /// Supported parameters: - /// - CKMC_PARAM_ALGO_TYPE = CKMC_ALGO_AES_CBC(mandatory), - /// - CKMC_PARAM_ED_IV = 16-byte initialization vector(mandatory) - static const int CKMC_ALGO_AES_CBC = 2; - - /// < AES-GCM algorithm - /// Supported parameters: - /// - CKMC_PARAM_ALGO_TYPE = CKMC_ALGO_AES_GCM(mandatory), - /// - CKMC_PARAM_ED_IV = initialization vector(mandatory) - /// - CKMC_PARAM_ED_TAG_LEN = GCM tag length in bits. One of - /// {32, 64, 96, 104, 112, 120, 128} (optional, if not present, the - /// length 128 is used; since Tizen 5.0, if TrustZone backend is used, - /// 32 and 64 lengths are not supported) - /// - CKMC_PARAM_ED_AAD = additional authentication data(optional) - static const int CKMC_ALGO_AES_GCM = 3; - - /// < AES-CFB algorithm - /// Supported parameters: - /// - CKMC_PARAM_ALGO_TYPE = CKMC_ALGO_AES_CFB(mandatory), - /// - CKMC_PARAM_ED_IV = 16-byte initialization vector(mandatory) - static const int CKMC_ALGO_AES_CFB = 4; - - /// < RSA-OAEP algorithm - /// Supported parameters: - /// - CKMC_PARAM_ALGO_TYPE = CKMC_ALGO_RSA_OAEP(required), - /// - CKMC_PARAM_ED_LABEL = label to be associated with the message - /// (optional, not supported at the moment) - static const int CKMC_ALGO_RSA_OAEP = 5; -} - -/// @brief The structure for binary buffer used in key manager CAPI. -/// @since_tizen 2.3 -typedef ckmc_raw_buffer_s = __ckmc_raw_buff; - -/// @brief The structure for PKCS12 used in key manager CAPI. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -typedef ckmc_pkcs12_s = __ckmc_pkcs12; - -/// @brief The structure for linked list of alias. -/// @since_tizen 2.3 -typedef ckmc_alias_list_s = __ckmc_alias_list; - -/// @brief Algorithm parameter list handle. -/// @since_tizen 3.0 -/// @remarks Each parameter list must have at least one CKMC_PARAM_ALGO_TYPE parameter that identifies the algorithm. -/// See #ckmc_algo_type_e for available algorithms and additional parameters they support. -/// @see ckmc_generate_new_params() -/// @see ckmc_param_list_new() -/// @see ckmc_param_list_set_integer() -/// @see ckmc_param_list_set_buffer() -/// @see ckmc_param_list_get_integer() -/// @see ckmc_param_list_get_buffer() -/// @see ckmc_param_list_free() -/// @see #ckmc_algo_type_e -/// @see #ckmc_param_name_e -typedef ckmc_param_list_h = ffi.Pointer<__ckmc_param_list>; - -/// @brief The structure for a policy for storing key/certificate/binary data. -/// @since_tizen 2.3 -typedef ckmc_policy_s = __ckmc_policy; - -/// @brief Enumeration for error codes of Privacy Privilege Manager. -/// @since_tizen 4.0 -abstract class ppm_error_e { - /// Successful - static const int PRIVACY_PRIVILEGE_MANAGER_ERROR_NONE = 0; - - /// I/O error - static const int PRIVACY_PRIVILEGE_MANAGER_ERROR_IO_ERROR = -5; - - /// Invalid parameter - static const int PRIVACY_PRIVILEGE_MANAGER_ERROR_INVALID_PARAMETER = -22; - - /// Operation already in progress - static const int PRIVACY_PRIVILEGE_MANAGER_ERROR_ALREADY_IN_PROGRESS = -114; - - /// Out of memory - static const int PRIVACY_PRIVILEGE_MANAGER_ERROR_OUT_OF_MEMORY = -12; - - /// Permission denied - static const int PRIVACY_PRIVILEGE_MANAGER_ERROR_PERMISSION_DENIED = -13; - - /// Unknown error - static const int PRIVACY_PRIVILEGE_MANAGER_ERROR_UNKNOWN = -1073741824; -} - -/// @brief Enumeration for results of a permission check. -/// @since_tizen 4.0 -abstract class ppm_check_result_e { - /// The application has permission to use a privilege. - static const int PRIVACY_PRIVILEGE_MANAGER_CHECK_RESULT_ALLOW = 0; - - /// The application doesn't have permission to use a privilege. - static const int PRIVACY_PRIVILEGE_MANAGER_CHECK_RESULT_DENY = 1; - - /// The user has to be asked whether to grant permission to use a privilege. - static const int PRIVACY_PRIVILEGE_MANAGER_CHECK_RESULT_ASK = 2; -} - -/// @brief Enumeration for results of a permission request. -/// @since_tizen 4.0 -abstract class ppm_request_result_e { - /// The user granted permission to use a privilege for an indefinite period of time. - static const int PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_ALLOW_FOREVER = 0; - - /// The user denied granting permission to use a privilege for an indefinite period of time. - static const int PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_DENY_FOREVER = 1; - - /// The user denied granting permission to use a privilege once. - static const int PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_DENY_ONCE = 2; -} - -/// @brief Enumeration for status codes of a permission request. -/// @since_tizen 4.0 -abstract class ppm_call_cause_e { - /// Callback was called with a valid answer. - static const int PRIVACY_PRIVILEGE_MANAGER_CALL_CAUSE_ANSWER = 0; - - /// Callback was called because of an error. - static const int PRIVACY_PRIVILEGE_MANAGER_CALL_CAUSE_ERROR = 1; -} - -/// @brief Called when the application receives a response upon calling ppm_request_permission(). -/// -/// @since_tizen 4.0 -/// -/// @param[in] cause The value representing a reason why this callback -/// has been called. -/// @param[in] result The result of a response triggered by calling ppm_request_permission(). -/// This is a valid value only if the @a cause parameter is equal to -/// #PRIVACY_PRIVILEGE_MANAGER_CALL_CAUSE_ANSWER. -/// @param[in] privilege The privilege that has been checked. This pointer is managed by the API and -/// it is valid only in the body of the callback function. -/// @param[in] user_data User specific data, this pointer has been passed -/// to ppm_request_permission(). -/// -/// @see ppm_request_permission() -typedef ppm_request_response_cb - = ffi.Pointer>; -typedef ppm_request_response_cbFunction = ffi.Void Function( - ffi.Int32 cause, - ffi.Int32 result, - ffi.Pointer privilege, - ffi.Pointer user_data); -typedef Dartppm_request_response_cbFunction = void Function( - int cause, - int result, - ffi.Pointer privilege, - ffi.Pointer user_data); - -/// @brief Called when the application receives a response upon calling ppm_request_permissions(). -/// -/// @since_tizen 5.0 -/// -/// @param[in] cause The value representing a reason why this callback -/// has been called. -/// @param[in] results The results of a response triggered by calling ppm_request_permissions(). -/// This is a valid value only if the @a cause parameter is equal to -/// #PRIVACY_PRIVILEGE_MANAGER_CALL_CAUSE_ANSWER. -/// @param[in] privileges The privileges array that has been checked. This pointer is managed -/// by the API and it is valid only in the body of the callback function. -/// @param[in] privileges_count The number of elements in the privileges and results arrays. -/// @param[in] user_data User specific data, this pointer has been passed -/// to ppm_request_permissions(). -/// -/// @see ppm_request_permissions() -typedef ppm_request_multiple_response_cb - = ffi.Pointer>; -typedef ppm_request_multiple_response_cbFunction = ffi.Void Function( - ffi.Int32 cause, - ffi.Pointer results, - ffi.Pointer> privileges, - ffi.Size privileges_count, - ffi.Pointer user_data); -typedef Dartppm_request_multiple_response_cbFunction = void Function( - int cause, - ffi.Pointer results, - ffi.Pointer> privileges, - int privileges_count, - ffi.Pointer user_data); - -/// @brief Enumeration for error code for Privilege Information. -/// @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif -abstract class privilege_info_error_e { - /// < Successful - static const int PRVINFO_ERROR_NONE = 0; - - /// < Invalid function parameter - static const int PRVINFO_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int PRVINFO_ERROR_OUT_OF_MEMORY = -12; - - /// < Unknown error - static const int PRVINFO_ERROR_INTERNAL_ERROR = -1073741824; - - /// < Not supported (Since 5.0) - static const int PRVINFO_ERROR_NOT_SUPPORTED = -1073741822; -} - -final class yaca_context_s extends ffi.Opaque {} - -final class yaca_key_s extends ffi.Opaque {} - -/// @brief Enumeration of YACA key formats. -/// -/// @since_tizen 3.0 -abstract class yaca_key_format_e { - /// Key is either PKCS#1 for RSA or SSLeay for DSA, also use this option for symmetric - static const int YACA_KEY_FORMAT_DEFAULT = 0; - - /// Key is in PKCS#8, can only be used for asymmetric private keys - static const int YACA_KEY_FORMAT_PKCS8 = 1; -} - -/// @brief Enumeration of YACA key file formats. -/// -/// @since_tizen 3.0 -abstract class yaca_key_file_format_e { - /// Key file is in raw binary format, used for symmetric keys - static const int YACA_KEY_FILE_FORMAT_RAW = 0; - - /// Key file is encoded in ASCII-base64, used for symmetric keys - static const int YACA_KEY_FILE_FORMAT_BASE64 = 1; - - /// Key file is in PEM file format, used for asymmetric keys - static const int YACA_KEY_FILE_FORMAT_PEM = 2; - - /// Key file is in DER file format, used for asymmetric keys - static const int YACA_KEY_FILE_FORMAT_DER = 3; -} - -/// @brief Enumeration of YACA key types, Initialization Vector is considered as key. -/// -/// @since_tizen 3.0 -abstract class yaca_key_type_e { - /// Generic symmetric cipher KEY - static const int YACA_KEY_TYPE_SYMMETRIC = 0; - - /// DES* key - must be handled differently because of parity bits - static const int YACA_KEY_TYPE_DES = 1; - - /// Initialization Vector for symmetric algorithms - static const int YACA_KEY_TYPE_IV = 2; - - /// RSA public key - static const int YACA_KEY_TYPE_RSA_PUB = 3; - - /// RSA private key - static const int YACA_KEY_TYPE_RSA_PRIV = 4; - - /// Digital Signature Algorithm public key - static const int YACA_KEY_TYPE_DSA_PUB = 5; - - /// Digital Signature Algorithm private key - static const int YACA_KEY_TYPE_DSA_PRIV = 6; - - /// Diffie-Hellman public key - static const int YACA_KEY_TYPE_DH_PUB = 7; - - /// Diffie-Hellman private key - static const int YACA_KEY_TYPE_DH_PRIV = 8; - - /// Elliptic Curve public key (for DSA and DH) - static const int YACA_KEY_TYPE_EC_PUB = 9; - - /// Elliptic Curve private key (for DSA and DH) - static const int YACA_KEY_TYPE_EC_PRIV = 10; - - /// Digital Signature Algorithm parameters - static const int YACA_KEY_TYPE_DSA_PARAMS = 11; - - /// Diffie-Hellman parameters - static const int YACA_KEY_TYPE_DH_PARAMS = 12; - - /// Elliptic Curve parameters - static const int YACA_KEY_TYPE_EC_PARAMS = 13; -} - -/// @brief Enumeration of YACA key lengths. -/// It is possible to use arbitrary integer instead, -/// this enum values are placed here to avoid magic numbers. -/// -/// @since_tizen 3.0 -abstract class yaca_key_bit_length_e { - /// 64 bits - static const int YACA_KEY_LENGTH_IV_64BIT = 64; - - /// 128 bits - static const int YACA_KEY_LENGTH_IV_128BIT = 128; - - /// 8 bits - static const int YACA_KEY_LENGTH_UNSAFE_8BIT = 8; - - /// 40 bits - static const int YACA_KEY_LENGTH_UNSAFE_40BIT = 40; - - /// 64 bits - static const int YACA_KEY_LENGTH_UNSAFE_64BIT = 64; - - /// 80 bits - static const int YACA_KEY_LENGTH_UNSAFE_80BIT = 80; - - /// 128 bits - static const int YACA_KEY_LENGTH_UNSAFE_128BIT = 128; - - /// 192 bits - static const int YACA_KEY_LENGTH_192BIT = 192; - - /// 256 bits - static const int YACA_KEY_LENGTH_256BIT = 256; - - /// 512 bits - static const int YACA_KEY_LENGTH_512BIT = 512; - - /// 1024 bits - static const int YACA_KEY_LENGTH_1024BIT = 1024; - - /// 2048 bits - static const int YACA_KEY_LENGTH_2048BIT = 2048; - - /// 3072 bits - static const int YACA_KEY_LENGTH_3072BIT = 3072; - - /// 4096 bits - static const int YACA_KEY_LENGTH_4096BIT = 4096; -} - -/// @brief Enumeration of YACA elliptic curve types with their bit lengths. -/// It's meant to be passed or returned as a @a key_bit_len param -/// in appropriate functions when dealing with elliptic curves. -/// -/// @since_tizen 3.0 -abstract class yaca_key_bit_length_ec_e { - /// Elliptic curve prime192v1 - static const int YACA_KEY_LENGTH_EC_PRIME192V1 = 805306560; - - /// Elliptic curve prime256v1 - static const int YACA_KEY_LENGTH_EC_PRIME256V1 = 805306624; - - /// Elliptic curve secp256k1 - static const int YACA_KEY_LENGTH_EC_SECP256K1 = 824180992; - - /// Elliptic curve secp384r1 - static const int YACA_KEY_LENGTH_EC_SECP384R1 = 823132544; - - /// Elliptic curve secp521r1 - static const int YACA_KEY_LENGTH_EC_SECP521R1 = 823132681; -} - -/// @brief Enumeration of YACA DH parameters taken from RFC 5114. -/// It's meant to be passed or returned as a @a key_bit_len param -/// in appropriate functions when dealing with DH and wanting to -/// use RFC 5114 values. -/// -/// @since_tizen 3.0 -abstract class yaca_key_bit_length_dh_rfc_e { - /// RFC 5114 DH parameters 1024_160 - static const int YACA_KEY_LENGTH_DH_RFC_1024_160 = 536871936; - - /// RFC 5114 DH parameters 2048_224 - static const int YACA_KEY_LENGTH_DH_RFC_2048_224 = 553650176; - - /// RFC 5114 DH parameters 2048_256 - static const int YACA_KEY_LENGTH_DH_RFC_2048_256 = 570427392; -} - -/// @brief Enumeration of YACA message digest algorithms. -/// -/// @since_tizen 3.0 -abstract class yaca_digest_algorithm_e { - /// Message digest algorithm MD5 - static const int YACA_DIGEST_MD5 = 0; - - /// Message digest algorithm SHA1 - static const int YACA_DIGEST_SHA1 = 1; - - /// Message digest algorithm SHA2, 224bit - static const int YACA_DIGEST_SHA224 = 2; - - /// Message digest algorithm SHA2, 256bit - static const int YACA_DIGEST_SHA256 = 3; - - /// Message digest algorithm SHA2, 384bit - static const int YACA_DIGEST_SHA384 = 4; - - /// Message digest algorithm SHA2, 512bit - static const int YACA_DIGEST_SHA512 = 5; -} - -/// @brief Enumeration of YACA symmetric encryption algorithms. -/// -/// @since_tizen 3.0 -abstract class yaca_encrypt_algorithm_e { - /// AES encryption. - /// - Supported key lengths: @c 128, @c 192 and @c 256 bits. - /// - Supported block cipher modes:\n - /// #YACA_BCM_CBC,\n - /// #YACA_BCM_OFB,\n - /// #YACA_BCM_CFB,\n - /// #YACA_BCM_CFB1,\n - /// #YACA_BCM_CFB8,\n - /// #YACA_BCM_ECB,\n - /// #YACA_BCM_GCM,\n - /// #YACA_BCM_CCM,\n - /// #YACA_BCM_CTR,\n - /// #YACA_BCM_WRAP - /// - see #yaca_block_cipher_mode_e for details on additional properties (mandatory). - static const int YACA_ENCRYPT_AES = 0; - - /// DES encryption. - /// - Supported key lengths: @c 64 bits. - /// - Supported block cipher modes:\n - /// #YACA_BCM_CBC,\n - /// #YACA_BCM_OFB,\n - /// #YACA_BCM_CFB,\n - /// #YACA_BCM_CFB1,\n - /// #YACA_BCM_CFB8,\n - /// #YACA_BCM_ECB - /// - see #yaca_block_cipher_mode_e for details on additional properties (mandatory). - static const int YACA_ENCRYPT_UNSAFE_DES = 1; - - /// 3DES 2-key encryption. - /// - Supported key lengths: @c 128 bits. - /// - Supported block cipher modes:\n - /// #YACA_BCM_CBC,\n - /// #YACA_BCM_OFB,\n - /// #YACA_BCM_CFB,\n - /// #YACA_BCM_ECB - /// - see #yaca_block_cipher_mode_e for details on additional properties (mandatory). - /// - Use double DES keys to perform corresponding 2-key 3DES encryption. - static const int YACA_ENCRYPT_UNSAFE_3DES_2TDEA = 2; - - /// 3DES 3-key encryption. - /// - Supported key lengths: @c 192 bits. - /// - Supported block cipher modes:\n - /// #YACA_BCM_CBC,\n - /// #YACA_BCM_OFB,\n - /// #YACA_BCM_CFB,\n - /// #YACA_BCM_CFB1,\n - /// #YACA_BCM_CFB8,\n - /// #YACA_BCM_ECB,\n - /// #YACA_BCM_WRAP - /// - see #yaca_block_cipher_mode_e for details on additional properties (mandatory). - /// - Use triple DES keys to perform corresponding 3-key 3DES encryption. - static const int YACA_ENCRYPT_3DES_3TDEA = 3; - - /// RC2 encryption. - /// This is a variable key length cipher. - /// - Supported key lengths: 8-1024 bits in steps of 8 bits. - /// - Effective key bits property by default equals to 128 bits.\n - /// Effective key bits can be set using yaca_context_set_property() and - /// #YACA_PROPERTY_RC2_EFFECTIVE_KEY_BITS.\n - /// It can be set after yaca_encrypt_initialize() / yaca_decrypt_initialize(), and before - /// yaca_encrypt_update() / yaca_decrypt_update() in encryption / decryption operation. - /// - /// - Supported block cipher modes:\n - /// #YACA_BCM_CBC,\n - /// #YACA_BCM_OFB,\n - /// #YACA_BCM_CFB,\n - /// #YACA_BCM_ECB - /// - see #yaca_block_cipher_mode_e for details on additional properties (mandatory). - static const int YACA_ENCRYPT_UNSAFE_RC2 = 4; - - /// RC4 encryption. - /// This is a variable key length cipher. - /// - Supported key lengths: 40–2048 bits in steps of 8 bits. - /// - Initialization Vector is not used. - /// - This cipher doesn't support block cipher modes, use #YACA_BCM_NONE instead. - static const int YACA_ENCRYPT_UNSAFE_RC4 = 5; - - /// CAST5 encryption. - /// This is a variable key length cipher. - /// - Supported key lengths: 40-128 bits in steps of 8 bits. - /// - Supported block cipher modes:\n - /// #YACA_BCM_CBC,\n - /// #YACA_BCM_OFB,\n - /// #YACA_BCM_CFB,\n - /// #YACA_BCM_ECB - /// - see #yaca_block_cipher_mode_e for details on additional properties (mandatory). - static const int YACA_ENCRYPT_CAST5 = 6; -} - -/// @brief Enumeration of YACA chaining modes for block ciphers. -/// -/// @since_tizen 3.0 -abstract class yaca_block_cipher_mode_e { - /// Used when algorithm doesn't support block ciphers modes. - /// Initialization Vector is not used. - static const int YACA_BCM_NONE = 0; - - /// ECB block cipher mode. - /// Initialization Vector is not used. - /// - /// By default the input data is padded using standard block padding (#YACA_PADDING_PKCS7). - /// Padding can be disabled using yaca_context_set_property() and - /// #YACA_PROPERTY_PADDING,#YACA_PADDING_NONE, - /// then the total length of data passed until *_finalize() MUST be a multiple of block size. - /// #YACA_PROPERTY_PADDING can be set at the latest before the *_finalize() call. - static const int YACA_BCM_ECB = 1; - - /// CTR block cipher mode. - /// 128-bit Initialization Vector for AES, - /// 64-bit for other algorithms is mandatory. - static const int YACA_BCM_CTR = 2; - - /// CBC block cipher mode. - /// 128-bit Initialization Vector for AES, - /// 64-bit for other algorithms is mandatory. - /// - /// By default the input data is padded using standard block padding (#YACA_PADDING_PKCS7). - /// Padding can be disabled using yaca_context_set_property() and - /// #YACA_PROPERTY_PADDING, #YACA_PADDING_NONE, - /// then the total length of data passed until *_finalize() MUST be a multiple of block size. - /// #YACA_PROPERTY_PADDING can be set at the latest before the *_finalize() call. - static const int YACA_BCM_CBC = 3; - - /// GCM block cipher mode. - /// This is a variable Initialization Vector length mode (recommended 96-bits). - /// - /// Supported properties: - /// - #YACA_PROPERTY_GCM_TAG_LEN = GCM tag length (optional)\n - /// Supported tag lengths: @c 4, @c 8, @c 12, @c 13, @c 14, @c 15, @c 16 - /// (16 bytes tag by default).\n - /// Set after yaca_encrypt_finalize() / yaca_seal_finalize() and before - /// yaca_context_get_property(#YACA_PROPERTY_GCM_TAG) in encryption / seal operation.\n - /// The @a value should be a size_t variable.\n - /// In decryption / open operation tag length is not set.\n\n - /// - /// - #YACA_PROPERTY_GCM_TAG = GCM tag\n - /// Get after yaca_encrypt_finalize() / yaca_seal_finalize() in encryption / seal operation.\n - /// Set after yaca_decrypt_update() / yaca_open_update() and before - /// yaca_decrypt_finalize() / yaca_open_finalize() in decryption / open operation.\n\n - /// - /// - #YACA_PROPERTY_GCM_AAD = additional authentication data (optional)\n - /// Set after yaca_encrypt_initialize() / yaca_seal_initialize() and before - /// yaca_encrypt_update() / yaca_seal_update() in encryption / seal operation.\n - /// Set after yaca_decrypt_initialize() / yaca_open_initialize() and before - /// yaca_decrypt_update() / yaca_open_update() in decryption / open operation.\n\n - /// - /// @see yaca_context_set_property() - /// @see yaca_context_get_property() - static const int YACA_BCM_GCM = 4; - - /// Default CFB block cipher mode. - /// 128-bit Initialization Vector for AES, - /// 64-bit for other algorithms is mandatory. - static const int YACA_BCM_CFB = 5; - - /// 1 bit CFB block cipher mode. - /// 128-bit Initialization Vector for AES, - /// 64-bit for other algorithms is mandatory. - static const int YACA_BCM_CFB1 = 6; - - /// 8 bits CFB block cipher mode. - /// 128-bit Initialization Vector for AES, - /// 64-bit for other algorithms is mandatory. - static const int YACA_BCM_CFB8 = 7; - - /// OFB block cipher mode. - /// 128-bit Initialization Vector for AES, - /// 64-bit for other algorithms is mandatory. - static const int YACA_BCM_OFB = 8; - - /// CBC-MAC Mode (AES). - /// This is a variable Initialization Vector length mode.\n - /// Supported Initialization Vector lengths: 56-104 bits in steps of 8 bits - /// (recommended 56-bits).\n\n - /// - /// Supported properties: - /// - #YACA_PROPERTY_CCM_TAG_LEN = CCM tag length (optional)\n - /// Supported tag lengths: 4-16 bytes in steps of 2 bytes (12 bytes tag by default).\n - /// Set after yaca_encrypt_initialize() / yaca_seal_initialize() and before - /// yaca_encrypt_update() / yaca_seal_update() in encryption / seal operation.\n - /// The @a value should be a size_t variable.\n - /// In decryption / open operation tag length is not set.\n\n - /// - /// - #YACA_PROPERTY_CCM_TAG = CCM tag\n - /// Get after yaca_encrypt_finalize() / yaca_seal_finalize() in encryption / seal operation.\n - /// Set after yaca_decrypt_initialize() / yaca_open_initialize() and before - /// yaca_decrypt_update() / yaca_open_update() in decryption / open operation.\n\n - /// - /// - #YACA_PROPERTY_CCM_AAD = additional authentication data (optional)\n - /// The total plaintext length must be passed to yaca_encrypt_update() / yaca_seal_update() - /// if AAD is used.\n - /// Set after yaca_encrypt_initialize() / yaca_seal_initialize() and before - /// yaca_encrypt_update() / yaca_seal_update() in encryption / seal operation.\n - /// You can only call yaca_encrypt_update() / yaca_seal_update() once for AAD - /// and once for the plaintext.\n\n - /// - /// The total encrypted text length must be passed to yaca_decrypt_update() / - /// yaca_open_update() if AAD is used.\n - /// Set after yaca_decrypt_initialize() / yaca_open_initialize() and before - /// yaca_decrypt_update() / yaca_open_update() in decryption / open operation.\n - /// You can only call yaca_decrypt_update() / yaca_open_update() once for AAD - /// and once for the encrypted text.\n\n - /// - /// @see yaca_context_set_property() - /// @see yaca_context_get_property() - static const int YACA_BCM_CCM = 9; - - /// Used with #YACA_ENCRYPT_AES or #YACA_ENCRYPT_3DES_3TDEA to perform a key wrapping - /// (key material symmetric encryption). - /// - /// Only a single yaca_encrypt_update() / yaca_decrypt_update() is allowed. - /// - /// Usage in yaca_seal_initialize() / yaca_open_finalize() is forbidden. - /// - /// Key used to do the wrapping with #YACA_ENCRYPT_AES can be a 128-bit key, a 192-bit key, - /// or a 256-bit key.\n - /// 64-bit Initialization Vector is used.\n - /// Wrapped key can be a 128-bit key, a 192-bit key, or a 256-bit key.\n - /// #YACA_ENCRYPT_AES allows wrapping multiple keys together. - /// - /// Key used to do the wrapping with #YACA_ENCRYPT_3DES_3TDEA can be a 192-bit DES key only.\n - /// Initialization Vector is not used.\n - /// Wrapped key can be a 128-bit DES key (two-key), or a 192-bit DES key (three-key).\n - /// #YACA_ENCRYPT_3DES_3TDEA allows wrapping only one key. - static const int YACA_BCM_WRAP = 10; -} - -/// @brief Enumeration of YACA non-standard properties for algorithms. -/// -/// @since_tizen 3.0 -/// -/// @see #yaca_padding_e -abstract class yaca_property_e { - /// Padding for the encrypt/decrypt or sign/verify operation. Property type is #yaca_padding_e. - /// - /// This property can be set at the latest before the *_finalize() call. - static const int YACA_PROPERTY_PADDING = 0; - - /// GCM Additional Authentication Data. Property type is a buffer (e.g. char*) - static const int YACA_PROPERTY_GCM_AAD = 1; - - /// GCM Tag. Property type is a buffer (e.g. char*) - static const int YACA_PROPERTY_GCM_TAG = 2; - - /// GCM Tag length in bytes. Property type is size_t. - static const int YACA_PROPERTY_GCM_TAG_LEN = 3; - - /// CCM Additional Authentication Data. Property type is a buffer (e.g. char*) - static const int YACA_PROPERTY_CCM_AAD = 4; - - /// CCM Tag. Property type is a buffer (e.g. char*) - static const int YACA_PROPERTY_CCM_TAG = 5; - - /// CCM Tag length in bytes. Property type is size_t. - static const int YACA_PROPERTY_CCM_TAG_LEN = 6; - - /// RC2 effective key bits, 1-1024, 1 bit resolution. Property type is size_t. - static const int YACA_PROPERTY_RC2_EFFECTIVE_KEY_BITS = 7; -} - -/// @brief Enumeration of YACA paddings. -/// -/// @since_tizen 3.0 -abstract class yaca_padding_e { - /// No padding at all. This method assumes that the input data already has a proper length for - /// a given cryptographic operation (e.g. it has been padded by the client). Suitable for - /// symmetric encrypt/decrypt operations as well as low-level RSA operations. - static const int YACA_PADDING_NONE = 0; - - /// X9.31 padding. Suitable for RSA sign/verify operation. Not supported in low-level - /// RSA operations. - static const int YACA_PADDING_X931 = 1; - - /// PKCS #1 v1.5 padding. Suitable for RSA sign/verify and low-level RSA operations. - /// For low-level operations the input must be at least 11 bytes shorter than the key length. - static const int YACA_PADDING_PKCS1 = 2; - - /// PKCS #1 PSS padding. Suitable for RSA sign/verify operations. Not supported in low-level - /// RSA operations. - static const int YACA_PADDING_PKCS1_PSS = 3; - - /// EME-OAEP as defined in PKCS #1 v2.0 with SHA-1, MGF1 and an empty encoding parameter. - /// Suitable for low-level RSA public_encrypt/private_decrypt operations. For low-level - /// operations the input must be at least 42 bytes shorter than the key length. - static const int YACA_PADDING_PKCS1_OAEP = 4; - - /// PKCS #1 v1.5 padding with an SSL-specific modification that denotes that the party - /// is SSL3 capable. It is used for rollback attack detection in SSLv3. If during decryption it - /// turns out that both parties are using #YACA_PADDING_PKCS1_SSLV23 (both are communicating - /// using SSL2 and both are SSL3 capable) it is treated as a rollback attack and an error is - /// returned. Suitable for low-level RSA public_encrypt/private_decrypt operations. For - /// low-level operations the input must be at least 11 bytes shorter than the key length. - static const int YACA_PADDING_PKCS1_SSLV23 = 5; - - /// PKCS #7 padding. Suitable for symmetric encrypt/decrypt operation. - static const int YACA_PADDING_PKCS7 = 6; -} - -/// @brief Enumeration of YACA key derivation functions. -/// -/// @since_tizen 3.0 -abstract class yaca_kdf_e { - /// ANSI X9.42 key derivation function, - /// (shared secret derived using Diffie-Helmann key exchange protocol). - static const int YACA_KDF_X942 = 0; - - /// ANSI X9.62 key derivation function, - /// (shared secret derived using EC Diffie-Helmann key exchange protocol). - static const int YACA_KDF_X962 = 1; -} - -/// @brief The context handle. -/// -/// @since_tizen 3.0 -typedef yaca_context_h = ffi.Pointer; - -/// @brief The handle of a key, an Initialization Vector or a key generation parameters. -/// -/// @since_tizen 3.0 -typedef yaca_key_h = ffi.Pointer; - -/// @brief Enumeration of YACA error values. -/// -/// @since_tizen 3.0 -abstract class yaca_error_e { - /// Successful - static const int YACA_ERROR_NONE = 0; - - /// Invalid function parameter - static const int YACA_ERROR_INVALID_PARAMETER = -22; - - /// Out of memory - static const int YACA_ERROR_OUT_OF_MEMORY = -12; - - /// Internal error - static const int YACA_ERROR_INTERNAL = -31653887; - - /// Data mismatch - static const int YACA_ERROR_DATA_MISMATCH = -31653886; - - /// Invalid password - static const int YACA_ERROR_INVALID_PASSWORD = -31653885; -} - -/// @brief Enumeration for calendar errors. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_error_e { - /// < Successful - static const int CALENDAR_ERROR_NONE = 0; - - /// < Out of memory - static const int CALENDAR_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int CALENDAR_ERROR_INVALID_PARAMETER = -22; - - /// < Requested data does not exist - static const int CALENDAR_ERROR_NO_DATA = -61; - - /// < Operation now in progress - static const int CALENDAR_ERROR_NOW_IN_PROGRESS = -115; - - /// < Operation already in progress - static const int CALENDAR_ERROR_ALREADY_IN_PROGRESS = -114; - - /// < Operation not permitted - static const int CALENDAR_ERROR_NOT_PERMITTED = -1; - - /// < FS is full - static const int CALENDAR_ERROR_FILE_NO_SPACE = -28; - - /// < Permission denied - static const int CALENDAR_ERROR_PERMISSION_DENIED = -13; - - /// < No access to the database - static const int CALENDAR_ERROR_DB_FAILED = -33554430; - - /// < Iterator is on the last position - static const int CALENDAR_ERROR_ITERATOR_END = -33554428; - - /// < Database not found - static const int CALENDAR_ERROR_DB_RECORD_NOT_FOUND = -33554427; - - /// < Unknown IPC error - static const int CALENDAR_ERROR_IPC = -33554241; - - /// < Error from another modules - static const int CALENDAR_ERROR_SYSTEM = -33554193; - - /// < Not supported (Since 4.0) - static const int CALENDAR_ERROR_NOT_SUPPORTED = -1073741822; -} - -final class __calendar_record_h extends ffi.Opaque {} - -final class __calendar_filter_h extends ffi.Opaque {} - -final class __calendar_list_h extends ffi.Opaque {} - -final class __calendar_query_h extends ffi.Opaque {} - -final class __calendar_h extends ffi.Opaque {} - -/// @brief Enumeration for the filter match type of a string. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_match_str_flag_e { - /// < Full string, case-sensitive - static const int CALENDAR_MATCH_EXACTLY = 0; - - /// < Full string, case-insensitive - static const int CALENDAR_MATCH_FULLSTRING = 1; - - /// < Sub string, case-insensitive - static const int CALENDAR_MATCH_CONTAINS = 2; - - /// < Start with, case-insensitive - static const int CALENDAR_MATCH_STARTSWITH = 3; - - /// < End with, case-insensitive - static const int CALENDAR_MATCH_ENDSWITH = 4; - - /// < IS NOT NULL - static const int CALENDAR_MATCH_EXISTS = 5; - - /// < Calendar match string flag max enum count - static const int CALENDAR_MATCH_STR_MAX = 6; -} - -/// @brief Enumeration for the filter match type of an integer. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_match_int_flag_e { - /// < '=' - static const int CALENDAR_MATCH_EQUAL = 0; - - /// < '>' - static const int CALENDAR_MATCH_GREATER_THAN = 1; - - /// < '>=' - static const int CALENDAR_MATCH_GREATER_THAN_OR_EQUAL = 2; - - /// < '<' - static const int CALENDAR_MATCH_LESS_THAN = 3; - - /// < '<=' - static const int CALENDAR_MATCH_LESS_THAN_OR_EQUAL = 4; - - /// < '<>', this flag can yield poor performance - static const int CALENDAR_MATCH_NOT_EQUAL = 5; - - /// < IS NULL - static const int CALENDAR_MATCH_NONE = 6; - - /// < Calendar match integer flag max enum count - static const int CALENDAR_MATCH_INT_MAX = 7; -} - -/// @brief Enumeration for a filter operator. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_filter_operator_e { - /// < AND - static const int CALENDAR_FILTER_OPERATOR_AND = 0; - - /// < OR - static const int CALENDAR_FILTER_OPERATOR_OR = 1; - - /// < Calendar filter operator max enum count - static const int CALENDAR_FILTER_OPERATOR_MAX = 2; -} - -/// @brief Enumeration for the calendar book type. -/// @details "OR"ing is supported. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_book_type_e { - /// < Default calendar book type - static const int CALENDAR_BOOK_TYPE_NONE = 0; - - /// < Event calendar book type - static const int CALENDAR_BOOK_TYPE_EVENT = 1; - - /// < To-do calendar book type - static const int CALENDAR_BOOK_TYPE_TODO = 2; -} - -/// @brief Enumeration for the calendar sensitivity type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_sensitivity_e { - /// < Public Sensitivity - static const int CALENDAR_SENSITIVITY_PUBLIC = 0; - - /// < Private Sensitivity - static const int CALENDAR_SENSITIVITY_PRIVATE = 1; - - /// < Confidential Sensitivity - static const int CALENDAR_SENSITIVITY_CONFIDENTIAL = 2; -} - -/// @brief Enumeration for the attendee status. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_attendee_status_e { - /// < Pending status - static const int CALENDAR_ATTENDEE_STATUS_PENDING = 0; - - /// < Accepted status - static const int CALENDAR_ATTENDEE_STATUS_ACCEPTED = 1; - - /// < Declined status - static const int CALENDAR_ATTENDEE_STATUS_DECLINED = 2; - - /// < Tentative status - static const int CALENDAR_ATTENDEE_STATUS_TENTATIVE = 3; - - /// < Delegated status - static const int CALENDAR_ATTENDEE_STATUS_DELEGATED = 4; - - /// < Completed status - static const int CALENDAR_ATTENDEE_STATUS_COMPLETED = 5; - - /// < In process status - static const int CALENDAR_ATTENDEE_STATUS_IN_PROCESS = 6; - - /// < Calendar attendee status max enum count - static const int CALENDAR_ATTENDEE_STATUS_MAX = 7; -} - -/// @brief Enumeration for the attendee role. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_attendee_role_e { - /// < Participation is required - static const int CALENDAR_ATTENDEE_ROLE_REQ_PARTICIPANT = 0; - - /// < Accepted status - static const int CALENDAR_ATTENDEE_ROLE_OPT_PARTICIPANT = 1; - - /// < Non-Participant - static const int CALENDAR_ATTENDEE_ROLE_NON_PARTICIPANT = 2; - - /// < Chairperson - static const int CALENDAR_ATTENDEE_ROLE_CHAIR = 3; - - /// < Calendar attendee role max enum count - static const int CALENDAR_ATTENDEE_ROLE_MAX = 4; -} - -/// @brief Enumeration for the attendee cutype. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_attendee_cutyep_e { - /// < Individual cutype - static const int CALENDAR_ATTENDEE_CUTYPE_INDIVIDUAL = 0; - - /// < Group cutype - static const int CALENDAR_ATTENDEE_CUTYPE_GROUP = 1; - - /// < Resource cutype - static const int CALENDAR_ATTENDEE_CUTYPE_RESOURCE = 2; - - /// < Room cutype - static const int CALENDAR_ATTENDEE_CUTYPE_ROOM = 3; - - /// < Unknown cutype - static const int CALENDAR_ATTENDEE_CUTYPE_UNKNOWN = 4; - - /// < Calendar attendee cutype max enum count - static const int CALENDAR_ATTENDEE_CUTYPE_MAX = 5; -} - -/// @brief Enumeration for the alarm time unit type of an event, such as minutes, hours, days, and so on. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_alarm_time_unit_type_e { - /// < No reminder set - static const int CALENDAR_ALARM_NONE = -1; - - /// < Specific in seconds - static const int CALENDAR_ALARM_TIME_UNIT_SPECIFIC = 1; - - /// < Alarm time unit in minutes - static const int CALENDAR_ALARM_TIME_UNIT_MINUTE = 60; - - /// < Alarm time unit in hours - static const int CALENDAR_ALARM_TIME_UNIT_HOUR = 3600; - - /// < Alarm time unit in days - static const int CALENDAR_ALARM_TIME_UNIT_DAY = 86400; - - /// < Alarm time unit in weeks - static const int CALENDAR_ALARM_TIME_UNIT_WEEK = 604800; -} - -/// @brief Enumeration for the alarm action. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_alarm_action_e { - /// < Audio action - static const int CALENDAR_ALARM_ACTION_AUDIO = 0; - - /// < Display action - static const int CALENDAR_ALARM_ACTION_DISPLAY = 1; - - /// < Email action - static const int CALENDAR_ALARM_ACTION_EMAIL = 2; - - /// < Calendar alarm action max enum count - static const int CALENDAR_ALARM_ACTION_MAX = 3; -} - -/// @brief Enumeration for the frequency of an event's recurrence. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_recurrence_frequency_e { - /// < No recurrence event - static const int CALENDAR_RECURRENCE_NONE = 0; - - /// < An event occurs every day - static const int CALENDAR_RECURRENCE_DAILY = 1; - - /// < An event occurs on the same day of every week. According to the week flag, the event will recur every day of the week - static const int CALENDAR_RECURRENCE_WEEKLY = 2; - - /// < An event occurs on the same day of every month - static const int CALENDAR_RECURRENCE_MONTHLY = 3; - - /// < An event occurs on the same day of every year - static const int CALENDAR_RECURRENCE_YEARLY = 4; -} - -/// @brief Enumeration for the event status. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_event_status_e { - /// < No status - static const int CALENDAR_EVENT_STATUS_NONE = 1; - - /// < The event is tentative - static const int CALENDAR_EVENT_STATUS_TENTATIVE = 2; - - /// < The event is confirmed - static const int CALENDAR_EVENT_STATUS_CONFIRMED = 4; - - /// < The event is canceled - static const int CALENDAR_EVENT_STATUS_CANCELLED = 8; -} - -/// @brief Enumeration for the busy status of an event. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_event_busy_status_e { - /// < The free status - static const int CALENDAR_EVENT_BUSY_STATUS_FREE = 0; - - /// < The busy status - static const int CALENDAR_EVENT_BUSY_STATUS_BUSY = 1; - - /// < The unavailable status - static const int CALENDAR_EVENT_BUSY_STATUS_UNAVAILABLE = 2; - - /// < The tentative status - static const int CALENDAR_EVENT_BUSY_STATUS_TENTATIVE = 3; -} - -/// @brief Enumeration for the calendar event item's priority. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_event_priority_e { - /// < No priority - static const int CALENDAR_EVENT_PRIORITY_NONE = 1; - - /// < Low priority - static const int CALENDAR_EVENT_PRIORITY_LOW = 8; - - /// < Normal priority - static const int CALENDAR_EVENT_PRIORITY_NORMAL = 4; - - /// < High priority - static const int CALENDAR_EVENT_PRIORITY_HIGH = 2; -} - -/// @brief Enumeration for the calendar to-do item's priority. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_todo_priority_e { - /// < No priority - static const int CALENDAR_TODO_PRIORITY_NONE = 1; - - /// < Low priority - static const int CALENDAR_TODO_PRIORITY_LOW = 8; - - /// < Normal priority - static const int CALENDAR_TODO_PRIORITY_NORMAL = 4; - - /// < High priority - static const int CALENDAR_TODO_PRIORITY_HIGH = 2; -} - -/// @brief Enumeration for the status of a to-do. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_todo_status_e { - /// < No status - static const int CALENDAR_TODO_STATUS_NONE = 256; - - /// < Needs action status - static const int CALENDAR_TODO_STATUS_NEEDS_ACTION = 512; - - /// < Completed status - static const int CALENDAR_TODO_STATUS_COMPLETED = 1024; - - /// < Work in process status - static const int CALENDAR_TODO_STATUS_IN_PROCESS = 2048; - - /// < Canceled status - static const int CALENDAR_TODO_STATUS_CANCELED = 4096; -} - -/// @brief Enumeration for the time type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_time_type_e { - /// < Unix time - static const int CALENDAR_TIME_UTIME = 0; - - /// < Local time - static const int CALENDAR_TIME_LOCALTIME = 1; -} - -/// @brief Enumeration for the range type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_range_type_e { - /// < Range until - static const int CALENDAR_RANGE_UNTIL = 0; - - /// < Range count - static const int CALENDAR_RANGE_COUNT = 1; - - /// < No range - static const int CALENDAR_RANGE_NONE = 2; -} - -/// @brief Enumeration for the system type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_system_type_e { - /// < Locale's default calendar - static const int CALENDAR_SYSTEM_NONE = 0; - - /// < Locale's default calendar - static const int CALENDAR_SYSTEM_GREGORIAN = 1; - - /// < East asian lunisolar calendar - static const int CALENDAR_SYSTEM_EAST_ASIAN_LUNISOLAR = 2; -} - -/// @brief Enumeration for the meeting status. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_meeting_status_e { - /// < No meeting - static const int CALENDAR_MEETING_STATUS_NOTMEETING = 0; - - /// < Meeting exists - static const int CALENDAR_MEETING_STATUS_MEETING = 1; - - /// < Meeting received - static const int CALENDAR_MEETING_STATUS_RECEIVED = 2; - - /// < Meeting canceled - static const int CALENDAR_MEETING_STATUS_CANCELED = 3; -} - -/// @brief Enumeration for weekdays. -/// @details Same value as UCalendarDaysOfWeek in ICU. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_days_of_week_e { - /// < Sunday - static const int CALENDAR_SUNDAY = 1; - - /// < Monday - static const int CALENDAR_MONDAY = 2; - - /// < Tuesday - static const int CALENDAR_TUESDAY = 3; - - /// < Wednesday - static const int CALENDAR_WEDNESDAY = 4; - - /// < Thursday - static const int CALENDAR_THURSDAY = 5; - - /// < Friday - static const int CALENDAR_FRIDAY = 6; - - /// < Saturday - static const int CALENDAR_SATURDAY = 7; -} - -/// @brief Enumeration for the modified status of a record. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_record_modified_status_e { - /// < The record is inserted - static const int CALENDAR_RECORD_MODIFIED_STATUS_INSERTED = 0; - - /// < The record is updated - static const int CALENDAR_RECORD_MODIFIED_STATUS_UPDATED = 1; - - /// < The record is deleted - static const int CALENDAR_RECORD_MODIFIED_STATUS_DELETED = 2; -} - -/// @brief The structure of time. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -final class calendar_time_s extends ffi.Struct { - /// < type - @ffi.Int32() - external int type; - - external UnnamedUnion2 time; -} - -final class UnnamedUnion2 extends ffi.Union { - /// < utime - @ffi.LongLong() - external int utime; - - external UnnamedStruct7 date; -} - -final class UnnamedStruct7 extends ffi.Struct { - /// < year - @ffi.Int() - external int year; - - /// < month - @ffi.Int() - external int month; - - /// < mday - @ffi.Int() - external int mday; - - /// < hour - @ffi.Int() - external int hour; - - /// < minute - @ffi.Int() - external int minute; - - /// < second - @ffi.Int() - external int second; - - /// < Deprecated since 2.4:leap month - @ffi.Bool() - external bool is_leap_month; -} - -/// @brief Enumeration for the type of a record. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_record_type_e { - /// < No record type - static const int CALENDAR_RECORD_TYPE_NONE = 0; - - /// < Book type - static const int CALENDAR_RECORD_TYPE_CALENDAR_BOOK = 1; - - /// < Event type - static const int CALENDAR_RECORD_TYPE_EVENT = 2; - - /// < Todo type - static const int CALENDAR_RECORD_TYPE_TODO = 3; -} - -/// @brief Enumeration for the book mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_book_mode_e { - /// < All modules can read and write records of this calendar_book - static const int CALENDAR_BOOK_MODE_NONE = 0; - - /// < All modules can only read records of this calendar book - static const int CALENDAR_BOOK_MODE_RECORD_READONLY = 1; -} - -/// @brief Enumeration for the sync event type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -abstract class calendar_book_sync_event_type_e { - /// < This book would not be synced to others except me - static const int CALENDAR_BOOK_SYNC_EVENT_FOR_ME = 0; - - /// < This book would be synced to everyone and deleted events would be deleted on time - static const int CALENDAR_BOOK_SYNC_EVENT_FOR_EVERY_AND_DELETE = 1; - - /// < This book would be synced to everyone but deleted events would be retained. Deleted events are removed by calendar_db_clean_after_sync() API - static const int CALENDAR_BOOK_SYNC_EVENT_FOR_EVERY_AND_REMAIN = 2; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_book _calendar_book view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// Currently NOT Used -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID Read, Write Description
string _uri read only Identifier of this calendar book view
integer id read only DB record ID of the calendar book
string uid read, write Unique identifier
string name read, write Calendar book name
string description read, write Calendar book description
string color read, write Calendar book color for UX
string location read, write Location of the event
integer visibility read, write Visibility of the calendar book for UX
integer sync_event read, write
integer account_id read, write once Account for this calendar
integer store_type read, write Type of calendar contents(refer to the @ref calendar_book_type_e)
string sync_data1 read, write Generic data for use by syncing
string sync_data2 read, write Generic data for use by syncing
string sync_data3 read, write Generic data for use by syncing
string sync_data4 read, write Generic data for use by syncing
integer mode read, write Calendar book mode (refer to the @ref calendar_book_mode_e)
-final class _calendar_book_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int uid; - - @ffi.UnsignedInt() - external int name; - - @ffi.UnsignedInt() - external int description; - - @ffi.UnsignedInt() - external int color; - - @ffi.UnsignedInt() - external int location; - - @ffi.UnsignedInt() - external int visibility; - - @ffi.UnsignedInt() - external int sync_event; - - @ffi.UnsignedInt() - external int account_id; - - @ffi.UnsignedInt() - external int store_type; - - @ffi.UnsignedInt() - external int sync_data1; - - @ffi.UnsignedInt() - external int sync_data2; - - @ffi.UnsignedInt() - external int sync_data3; - - @ffi.UnsignedInt() - external int sync_data4; - - @ffi.UnsignedInt() - external int mode; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event _calendar_event view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// Refer to the @ref calendar_event_priority_e -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// The timezone of the start_time -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID Read, Write Description
string _uri read only Identifier of this event view
integer id read only DB record ID of the event
integer calendar_book_id read, write ID of the calendar book to which the event belongs
string summary read, write The short description of the event
string description read, write The description of the event
string location read, write The location of the event
string categories read, write The category of the event. For example APPOINTMENT, BIRTHDAY
string exdate read, write The exception list of the event. If this event has a recurrence rule, the instance of the exdate is removed. Format is "YYYYMMDD"(allday event) or "YYYYMMDDTHHMMSS". Multiple exceptions can be included with a comma
integer event_status read, write Refer to the @ref calendar_event_status_e
integer priority read, write
integer timezone read, write The timezone_id of the event if it exists. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_timezone
integer person_id read, write The person_id of the event if the event is a birthday. Refer to the contacts-service
integer busy_status read, write Refer to the @ref calendar_event_busy_status_e
integer sensitivity read, write Refer to the @ref calendar_sensitivity_e
string uid read, write The unique ID of the event
string organizer_name read, write The name of organizer of the event
string organizer_email read, write The email address of the organizer of the event
integer meeting_status read, write Refer to the @ref calendar_meeting_status_e
integer original_event_id read, write The ID of the original event if the event is an exception.
double latitude read, write The latitude of the location of the event
double longitude read, write The longitude of the location of the event
integer email_id read, write ID of the email_id. Refer to the email-service.
long long int created_time read, write The time when the event is created
long long int last_modified_time read only The time when the event is updated
integer is_deleted read only
integer freq read, write The frequent type of event recurrence. Refer to the @ref calendar_recurrence_frequency_e
integer range_type read, write Refer to the @ref calendar_range_type_e
calendar time until_time read, write The end time of the event recurrence. If the range_type is @ref CALENDAR_RANGE_UNTIL
integer count read, write The count of the event recurrence. If the range_type is @ref CALENDAR_RANGE_COUNT
integer interval read, write The interval of the event recurrence
string bysecond read, write The second list of the event recurrence. The value can be from 0 to 59. The list is seperated by commas
string byminute read, write The minute list of the event recurrence. The value can be from 0 to 59. The list is seperated by commas
string byhour read, write The hour list of the event recurrence. The value can be from 0 to 23. The list is seperated by commas
string byday read, write The day list of the event recurrence. The value can be SU, MO, TU, WE, TH, FR, SA. The list is seperated by commas
string bymonthday read, write The month day list of the event recurrence. The value can be from 1 to 31 and from -31 to -1. The list is seperated by commas
string byyearday read, write The year day list of the event recurrence. The value can be from 1 to 366 and from -366 to -1. The list is seperated by commas
string byweekno read, write The week number list of the event recurrence. The value can be from 1 to 53 and from -53 to -1. The list is seperated by commas
string bymonth read, write The month list of the event recurrence. The value can be from 1 to 12. The list is seperated by commas
string bysetpos read, write The position list of the event recurrence. The value can be from 1 to 366 and from -366 to -1. The list is seperated by commas
integer wkst read, write The start day of the week. Refer to the @ref calendar_days_of_week_e
string recurrence_id read, write RECURRENCE-ID of RFC #2445
string rdate read, write RDATE of RFC #2445
integer has_attendee read only Whether or not the event has an attendee list
integer has_alarm read only Whether or not the event has an alarm list
integer calendar_system_type read, write Refer to the @ref calendar_system_type_e
string sync_data1 read, write The sync data of the event. If developer need to save some information related to the event, they can use this property
string sync_data2 read, write The sync data of the event. If developer need to save some information related to the event, they can use this property
string sync_data3 read, write The sync data of the event. If developer need to save some information related to the event, they can use this property
string sync_data4 read, write The sync data of the event. If developer need to save some information related to the event, they can use this property
calendar time start_time read, write The start time of the event
string start_tzid read, write
calendar time end_time read, write The end time of the event
string end_tzid read, write The timezone of the end_time
child list calendar_alarm read, write The alarm list of the event. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_alarm
child list calendar_attendee read, write The attendee list of the event. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_attendee
child list exception read, write The exception mod event list of the event
child list extended read, write The extended property list of the event. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_extended_property
integer is_allday read only The event is an allday event or not
integer link_count read only The event is a linked event (Since 4.0)
integer link_base_id read only The event is a base linked event (Since 4.0)
-final class _calendar_event_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int calendar_book_id; - - @ffi.UnsignedInt() - external int summary; - - @ffi.UnsignedInt() - external int description; - - @ffi.UnsignedInt() - external int location; - - @ffi.UnsignedInt() - external int categories; - - @ffi.UnsignedInt() - external int exdate; - - @ffi.UnsignedInt() - external int event_status; - - @ffi.UnsignedInt() - external int priority; - - @ffi.UnsignedInt() - external int timezone; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int busy_status; - - @ffi.UnsignedInt() - external int sensitivity; - - @ffi.UnsignedInt() - external int uid; - - @ffi.UnsignedInt() - external int organizer_name; - - @ffi.UnsignedInt() - external int organizer_email; - - @ffi.UnsignedInt() - external int meeting_status; - - @ffi.UnsignedInt() - external int original_event_id; - - @ffi.UnsignedInt() - external int latitude; - - @ffi.UnsignedInt() - external int longitude; - - @ffi.UnsignedInt() - external int email_id; - - @ffi.UnsignedInt() - external int created_time; - - @ffi.UnsignedInt() - external int last_modified_time; - - @ffi.UnsignedInt() - external int is_deleted; - - @ffi.UnsignedInt() - external int freq; - - @ffi.UnsignedInt() - external int range_type; - - @ffi.UnsignedInt() - external int until_time; - - @ffi.UnsignedInt() - external int count; - - @ffi.UnsignedInt() - external int interval; - - @ffi.UnsignedInt() - external int bysecond; - - @ffi.UnsignedInt() - external int byminute; - - @ffi.UnsignedInt() - external int byhour; - - @ffi.UnsignedInt() - external int byday; - - @ffi.UnsignedInt() - external int bymonthday; - - @ffi.UnsignedInt() - external int byyearday; - - @ffi.UnsignedInt() - external int byweekno; - - @ffi.UnsignedInt() - external int bymonth; - - @ffi.UnsignedInt() - external int bysetpos; - - @ffi.UnsignedInt() - external int wkst; - - @ffi.UnsignedInt() - external int recurrence_id; - - @ffi.UnsignedInt() - external int rdate; - - @ffi.UnsignedInt() - external int has_attendee; - - @ffi.UnsignedInt() - external int has_alarm; - - @ffi.UnsignedInt() - external int calendar_system_type; - - @ffi.UnsignedInt() - external int sync_data1; - - @ffi.UnsignedInt() - external int sync_data2; - - @ffi.UnsignedInt() - external int sync_data3; - - @ffi.UnsignedInt() - external int sync_data4; - - @ffi.UnsignedInt() - external int start_time; - - @ffi.UnsignedInt() - external int start_tzid; - - @ffi.UnsignedInt() - external int end_time; - - @ffi.UnsignedInt() - external int end_tzid; - - @ffi.UnsignedInt() - external int calendar_alarm; - - @ffi.UnsignedInt() - external int calendar_attendee; - - @ffi.UnsignedInt() - external int exception; - - @ffi.UnsignedInt() - external int extended; - - @ffi.UnsignedInt() - external int is_allday; - - @ffi.UnsignedInt() - external int link_count; - - @ffi.UnsignedInt() - external int link_base_id; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_todo _calendar_todo view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// The timezone of the start_time -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID Read, Write Description
string _uri read only Identifier of this todo view
integer id read only DB record ID of the todo
integer calendar_book_id read, write ID of the calendar book to which the todo belongs
string summary read, write The short description of the todo
string description read, write The description of the todo
string location read, write The location of the todo
string categories read, write The category of the todo. For example APPOINTMENT, BIRTHDAY
integer todo_status read, write Refer to the @ref calendar_todo_status_e
integer priority read, write Refer to the @ref calendar_todo_priority_e
integer sensitivity read, write Refer to the @ref calendar_sensitivity_e
string uid read, write The unique ID of the todo
double latitude read, write The latitude of the location of the todo
double longitude read, write The longitude of the location of the todo
long long int created_time read, write The time when the todo is created
long long int last_modified_time read only The time when the todo is updated
long long int completed_time read, write The time when the todo is completed
integer progress read, write The progression of the todo. The value can be from 0 to 100
integer is_deleted read only
integer freq read, write The frequent type of todo recurrence. Refer to the @ref calendar_recurrence_frequency_e
integer range_type read, write Refer to the @ref calendar_range_type_e
calendar time until_time read, write The end time of the todo recurrence. If the range_type is CALENDAR_RANGE_UNTIL
integer count read, write The count of the todo recurrence. If the range_type is CALENDAR_RANGE_COUNT
integer interval read, write The interval of the todo recurrence
string bysecond read, write The second list of the todo recurrence. The value can be from 0 to 59. The list is seperated by commas
string byminute read, write The minute list of the todo recurrence. The value can be from 0 to 59. The list is seperated by commas
string byhour read, write The hour list of the todo recurrence. The value can be from 0 to 23. The list is seperated by commas
string byday read, write The day list of the todo recurrence. The value can be SU, MO, TU, WE, TH, FR, SA. The list is seperated by commas
string bymonthday read, write The month day list of the todo recurrence. The value can be from 1 to 31 and from -31 to -1. The list is seperated by commas
string byyearday read, write The year day list of the todo recurrence. The value can be from 1 to 366 and from -366 to -1. The list is seperated by commas
string byweekno read, write The week number list of the todo recurrence. The value can be from 1 to 53 and from -53 to -1. The list is seperated by commas
string bymonth read, write The month list of the todo recurrence. The value can be from 1 to 12. The list is seperated by commas
string bysetpos read, write The position list of the todo recurrence. The value can be from 1 to 366 and from -366 to -1. The list is seperated by commas
integer wkst read, write The start day of the week. Refer to the @ref calendar_days_of_week_e
integer has_alarm read only Whether or not the todo has an alarm list
string sync_data1 read, write The sync data of the todo. If developers need to save some information related to the todo, they can use this property
string sync_data2 read, write The sync data of the todo. If developers need to save some information related to the todo, they can use this property
string sync_data3 read, write The sync data of the todo. If developers need to save some information related to the todo, they can use this property
string sync_data4 read, write The sync data of the todo. If developers need to save some information related to the todo, they can use this property
calendar time start_time read, write The start time of the todo
string start_tzid read, write
calendar time due_time read, write The due time of the todo
string due_tzid read, write The timezone of the due_time
child list calendar_alarm read, write The alarm list of the todo. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_alarm
string organizer_name read, write The name of the organizer of the event
string organizer_email read, write The email address of the organizer of the event
integer has_attendee read only Whether or not the todo has an attendee list
child list calendar_attendee read, write The attendee list of the todo. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_attendee
child list extended read, write The extended property list of the todo. Refer to the @ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_extended_property
integer is_allday read only The todo is an allday event or not
-final class _calendar_todo_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int calendar_book_id; - - @ffi.UnsignedInt() - external int summary; - - @ffi.UnsignedInt() - external int description; - - @ffi.UnsignedInt() - external int location; - - @ffi.UnsignedInt() - external int categories; - - @ffi.UnsignedInt() - external int todo_status; - - @ffi.UnsignedInt() - external int priority; - - @ffi.UnsignedInt() - external int sensitivity; - - @ffi.UnsignedInt() - external int uid; - - @ffi.UnsignedInt() - external int latitude; - - @ffi.UnsignedInt() - external int longitude; - - @ffi.UnsignedInt() - external int created_time; - - @ffi.UnsignedInt() - external int last_modified_time; - - @ffi.UnsignedInt() - external int completed_time; - - @ffi.UnsignedInt() - external int progress; - - @ffi.UnsignedInt() - external int is_deleted; - - @ffi.UnsignedInt() - external int freq; - - @ffi.UnsignedInt() - external int range_type; - - @ffi.UnsignedInt() - external int until_time; - - @ffi.UnsignedInt() - external int count; - - @ffi.UnsignedInt() - external int interval; - - @ffi.UnsignedInt() - external int bysecond; - - @ffi.UnsignedInt() - external int byminute; - - @ffi.UnsignedInt() - external int byhour; - - @ffi.UnsignedInt() - external int byday; - - @ffi.UnsignedInt() - external int bymonthday; - - @ffi.UnsignedInt() - external int byyearday; - - @ffi.UnsignedInt() - external int byweekno; - - @ffi.UnsignedInt() - external int bymonth; - - @ffi.UnsignedInt() - external int bysetpos; - - @ffi.UnsignedInt() - external int wkst; - - @ffi.UnsignedInt() - external int has_alarm; - - @ffi.UnsignedInt() - external int sync_data1; - - @ffi.UnsignedInt() - external int sync_data2; - - @ffi.UnsignedInt() - external int sync_data3; - - @ffi.UnsignedInt() - external int sync_data4; - - @ffi.UnsignedInt() - external int start_time; - - @ffi.UnsignedInt() - external int start_tzid; - - @ffi.UnsignedInt() - external int due_time; - - @ffi.UnsignedInt() - external int due_tzid; - - @ffi.UnsignedInt() - external int calendar_alarm; - - @ffi.UnsignedInt() - external int organizer_name; - - @ffi.UnsignedInt() - external int organizer_email; - - @ffi.UnsignedInt() - external int has_attendee; - - @ffi.UnsignedInt() - external int calendar_attendee; - - @ffi.UnsignedInt() - external int extended; - - @ffi.UnsignedInt() - external int is_allday; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_timezone _calendar_timezone view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID Read, Write Description
string _uri read only Identifier of this timezone view
integer id read only DB record ID of the timezone
integer calendar_book_id read, write DB record ID of a related calendar book
integer tz_offset_from_gmt read, write UTC offset which is in use when the onset of this time zone observance begins. Valid values are -720(-12:00) to 840(+14:00)
string standard_name read, write Name of the Standard Time
integer standard_start_month read, write Starting month of the Standard Time. Month is 0-based. eg, 0 for January
integer standard_start_position_of_week read, write Starting day-of-week-in-month of the Standard Time. Day is 1-based
integer standard_start_day read, write Starting day-of-week of the Standard Time. Valid values are 1(SUNDAY) to 7(SATURDAY)
integer standard_start_hour read, write Starting hour of the Standard Time. Valid values are 0 to 23
integer standard_bias read, write The number of minutes added during the Standard Time
string day_light_name read, write Name of Daylight
integer day_light_start_month read, write Starting month of Daylight. Month is 0-based. eg, 0 for January
integer day_light_start_position_of_week read, write Starting day-of-week-in-month of Daylight. Day is 1-based
integer day_light_start_day read, write Starting day-of-week of Daylight. Valid values are 1(SUNDAY) to 7(SATURDAY)
integer day_light_start_hour read, write Starting hour of Daylight. Valid values are 0 to 23
integer day_light_bias read, write The number of minutes added during Daylight Time
-final class _calendar_timezone_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int calendar_book_id; - - @ffi.UnsignedInt() - external int tz_offset_from_gmt; - - @ffi.UnsignedInt() - external int standard_name; - - @ffi.UnsignedInt() - external int standard_start_month; - - @ffi.UnsignedInt() - external int standard_start_position_of_week; - - @ffi.UnsignedInt() - external int standard_start_day; - - @ffi.UnsignedInt() - external int standard_start_hour; - - @ffi.UnsignedInt() - external int standard_bias; - - @ffi.UnsignedInt() - external int day_light_name; - - @ffi.UnsignedInt() - external int day_light_start_month; - - @ffi.UnsignedInt() - external int day_light_start_position_of_week; - - @ffi.UnsignedInt() - external int day_light_start_day; - - @ffi.UnsignedInt() - external int day_light_start_hour; - - @ffi.UnsignedInt() - external int day_light_bias; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_attendee _calendar_attendee view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID Read, Write Description
string _uri read only Identifier of this calendar attendee view
integer event_id read only Event/TODO that the attendee belongs to
string number read, write The number of the attendee
integer cutype read, write The type of attendee (one of CALENDAR_ATTENDEE_CUTYPE_INDIVIDUAL, CALENDAR_ATTENDEE_CUTYPE_GROUP, CALENDAR_ATTENDEE_CUTYPE_RESOURCE, CALENDAR_ATTENDEE_CUTYPE_ROOM, CALENDAR_ATTENDEE_CUTYPE_UNKNOWN)
integer person_id read, write Person ID that the attendee belongs to
string uid read, write Unique identifier
string email read, write The email address of the attendee
integer role read, write Attendee role (one of CALENDAR_ATTENDEE_ROLE_REQ_PARTICIPANT, CALENDAR_ATTENDEE_ROLE_OPT_PARTICIPANT, CALENDAR_ATTENDEE_ROLE_NON_PARTICIPANT, CALENDAR_ATTENDEE_ROLE_CHAIR)
integer status read, write Attendee status (one of CALENDAR_ATTENDEE_STATUS_PENDING, CALENDAR_ATTENDEE_STATUS_ACCEPTED, CALENDAR_ATTENDEE_STATUS_DECLINED, CALENDAR_ATTENDEE_STATUS_TENTATIVE, CALENDAR_ATTENDEE_STATUS_DELEGATED, CALENDAR_ATTENDEE_STATUS_COMPLETED, CALENDAR_ATTENDEE_STATUS_IN_PROCESS)
integer rsvp read, write RSVP invitation reply (one of true, false)
string delegatee_uri read, write Delegatee (DELEGATED-TO)
string delegator_uri read, write Delegator (DELEGATED-FROM)
string name read, write Attendee name
string member read, write Group that the attendee belongs to
-final class _calendar_attendee_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int parent_id; - - @ffi.UnsignedInt() - external int number; - - @ffi.UnsignedInt() - external int cutype; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int uid; - - @ffi.UnsignedInt() - external int group; - - @ffi.UnsignedInt() - external int email; - - @ffi.UnsignedInt() - external int role; - - @ffi.UnsignedInt() - external int status; - - @ffi.UnsignedInt() - external int rsvp; - - @ffi.UnsignedInt() - external int delegatee_uri; - - @ffi.UnsignedInt() - external int delegator_uri; - - @ffi.UnsignedInt() - external int name; - - @ffi.UnsignedInt() - external int member; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_alarm _calendar_alarm view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID Read, Write Description
string _uri read only Identifier of this calendar alarm view
integer parent_id read only Event that the alarm belongs to
integer type read, write Currently NOT used
long long int time read, write The alarm time of the event(This represents the number of seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000(UTC)). This MUST be used with CALENDAR_ALARM_TIME_UNIT_SPECIFIC
integer tick read, write The number of unit before start time. This MUST be used with one of CALENDAR_ALARM_TIME_UNIT_MINUTE, CALENDAR_ALARM_TIME_UNIT_HOUR, CALENDAR_ALARM_TIME_UNIT_DAY, CALENDAR_ALARM_TIME_UNIT_WEEK.
integer tick_unit read, write Reminder tick time unit (one of CALENDAR_ALARM_NONE, CALENDAR_ALARM_TIME_UNIT_SPECIFIC, CALENDAR_ALARM_TIME_UNIT_MINUTE, CALENDAR_ALARM_TIME_UNIT_HOUR, CALENDAR_ALARM_TIME_UNIT_DAY, CALENDAR_ALARM_TIME_UNIT_WEEK)
string attach read, write Alarm tone path
string summary read, write Alarm summary
string description read, write Alarm description
integer action read, write Action of alarm (one of CALENDAR_ALARM_ACTION_AUDIO, CALENDAR_ALARM_ACTION_DISPLAY, CALENDAR_ALARM_ACTION_EMAIL)
calendar time alarm_time read, write The alarm time
-final class _calendar_alarm_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int parent_id; - - @ffi.UnsignedInt() - external int tick; - - @ffi.UnsignedInt() - external int tick_unit; - - @ffi.UnsignedInt() - external int description; - - @ffi.UnsignedInt() - external int summary; - - @ffi.UnsignedInt() - external int action; - - @ffi.UnsignedInt() - external int attach; - - @ffi.UnsignedInt() - external int alarm_time; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_updated_info _calendar_updated_info view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID Description
string _uri Identifier of this updated_info view
integer id Modified event(or todo) record ID
integer calendar_book_id Calendar book ID of the modified event(or todo) record
integer modified_status Enumeration value of the modified status (@ref calendar_record_modified_status_e)
integer version Version after change
-final class _calendar_updated_info_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int calendar_book_id; - - @ffi.UnsignedInt() - external int modified_status; - - @ffi.UnsignedInt() - external int version; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event_calendar_book _calendar_event_calendar_book view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID
string _uri
integer event_id
integer calendar_book_id
string summary
string description
string location
string categories
string exdate
integer event_status
integer priority
integer timezone
integer person_id
integer busy_status
integer sensitivity
string uid
string organizer_name
string organizer_email
integer meeting_status
integer original_event_id
double latitude
double longitude
integer email_id
long long int created_time
long long int last_modified_time
integer freq
integer range_type
calendar time until_time
integer count
integer interval
string bysecond
string byminute
string byhour
string byday
string bymonthday
string byyearday
string byweekno
string bymonth
string bysetpos
integer wkst
string recurrence_id
string rdate
integer has_attendee
integer has_alarm
integer calendar_system_type
string sync_data1
string sync_data2
string sync_data3
string sync_data4
calendar time start_time
string start_tzid
calendar time end_time
string end_tzid
filter integer calendar_book_visibility
filter integer calendar_book_account_id
-final class _calendar_event_calendar_book_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int event_id; - - @ffi.UnsignedInt() - external int calendar_book_id; - - @ffi.UnsignedInt() - external int summary; - - @ffi.UnsignedInt() - external int description; - - @ffi.UnsignedInt() - external int location; - - @ffi.UnsignedInt() - external int categories; - - @ffi.UnsignedInt() - external int exdate; - - @ffi.UnsignedInt() - external int event_status; - - @ffi.UnsignedInt() - external int priority; - - @ffi.UnsignedInt() - external int timezone; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int busy_status; - - @ffi.UnsignedInt() - external int sensitivity; - - @ffi.UnsignedInt() - external int uid; - - @ffi.UnsignedInt() - external int organizer_name; - - @ffi.UnsignedInt() - external int organizer_email; - - @ffi.UnsignedInt() - external int meeting_status; - - @ffi.UnsignedInt() - external int original_event_id; - - @ffi.UnsignedInt() - external int latitude; - - @ffi.UnsignedInt() - external int longitude; - - @ffi.UnsignedInt() - external int email_id; - - @ffi.UnsignedInt() - external int created_time; - - @ffi.UnsignedInt() - external int last_modified_time; - - @ffi.UnsignedInt() - external int freq; - - @ffi.UnsignedInt() - external int range_type; - - @ffi.UnsignedInt() - external int until_time; - - @ffi.UnsignedInt() - external int count; - - @ffi.UnsignedInt() - external int interval; - - @ffi.UnsignedInt() - external int bysecond; - - @ffi.UnsignedInt() - external int byminute; - - @ffi.UnsignedInt() - external int byhour; - - @ffi.UnsignedInt() - external int byday; - - @ffi.UnsignedInt() - external int bymonthday; - - @ffi.UnsignedInt() - external int byyearday; - - @ffi.UnsignedInt() - external int byweekno; - - @ffi.UnsignedInt() - external int bymonth; - - @ffi.UnsignedInt() - external int bysetpos; - - @ffi.UnsignedInt() - external int wkst; - - @ffi.UnsignedInt() - external int recurrence_id; - - @ffi.UnsignedInt() - external int rdate; - - @ffi.UnsignedInt() - external int has_attendee; - - @ffi.UnsignedInt() - external int has_alarm; - - @ffi.UnsignedInt() - external int calendar_system_type; - - @ffi.UnsignedInt() - external int sync_data1; - - @ffi.UnsignedInt() - external int sync_data2; - - @ffi.UnsignedInt() - external int sync_data3; - - @ffi.UnsignedInt() - external int sync_data4; - - @ffi.UnsignedInt() - external int start_time; - - @ffi.UnsignedInt() - external int start_tzid; - - @ffi.UnsignedInt() - external int end_time; - - @ffi.UnsignedInt() - external int end_tzid; - - @ffi.UnsignedInt() - external int is_allday; - - @ffi.UnsignedInt() - external int calendar_book_visibility; - - @ffi.UnsignedInt() - external int calendar_book_account_id; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_todo_calendar_book _calendar_todo_calendar_book view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID
string _uri
integer todo_id
integer calendar_book_id
string summary
string description
string location
string categories
integer todo_status
integer priority
integer sensitivity
string uid
double latitude
double longitude
long long int created_time
long long int last_modified_time
long long int completed_time
integer progress
integer freq
integer range_type
calendar time until_time
integer count
integer interval
string bysecond
string byminute
string byhour
string byday
string bymonthday
string byyearday
string byweekno
string bymonth
string bysetpos
integer wkst
integer has_alarm
string sync_data1
string sync_data2
string sync_data3
string sync_data4
calendar time start_time
string start_tzid
calendar time due_time
string due_tzid
filter integer calendar_book_visibility
filter integer calendar_book_account_id
-final class _calendar_todo_calendar_book_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int todo_id; - - @ffi.UnsignedInt() - external int calendar_book_id; - - @ffi.UnsignedInt() - external int summary; - - @ffi.UnsignedInt() - external int description; - - @ffi.UnsignedInt() - external int location; - - @ffi.UnsignedInt() - external int categories; - - @ffi.UnsignedInt() - external int todo_status; - - @ffi.UnsignedInt() - external int priority; - - @ffi.UnsignedInt() - external int sensitivity; - - @ffi.UnsignedInt() - external int uid; - - @ffi.UnsignedInt() - external int latitude; - - @ffi.UnsignedInt() - external int longitude; - - @ffi.UnsignedInt() - external int created_time; - - @ffi.UnsignedInt() - external int last_modified_time; - - @ffi.UnsignedInt() - external int completed_time; - - @ffi.UnsignedInt() - external int progress; - - @ffi.UnsignedInt() - external int freq; - - @ffi.UnsignedInt() - external int range_type; - - @ffi.UnsignedInt() - external int until_time; - - @ffi.UnsignedInt() - external int count; - - @ffi.UnsignedInt() - external int interval; - - @ffi.UnsignedInt() - external int bysecond; - - @ffi.UnsignedInt() - external int byminute; - - @ffi.UnsignedInt() - external int byhour; - - @ffi.UnsignedInt() - external int byday; - - @ffi.UnsignedInt() - external int bymonthday; - - @ffi.UnsignedInt() - external int byyearday; - - @ffi.UnsignedInt() - external int byweekno; - - @ffi.UnsignedInt() - external int bymonth; - - @ffi.UnsignedInt() - external int bysetpos; - - @ffi.UnsignedInt() - external int wkst; - - @ffi.UnsignedInt() - external int has_alarm; - - @ffi.UnsignedInt() - external int sync_data1; - - @ffi.UnsignedInt() - external int sync_data2; - - @ffi.UnsignedInt() - external int sync_data3; - - @ffi.UnsignedInt() - external int sync_data4; - - @ffi.UnsignedInt() - external int start_time; - - @ffi.UnsignedInt() - external int start_tzid; - - @ffi.UnsignedInt() - external int due_time; - - @ffi.UnsignedInt() - external int due_tzid; - - @ffi.UnsignedInt() - external int organizer_name; - - @ffi.UnsignedInt() - external int organizer_email; - - @ffi.UnsignedInt() - external int has_attendee; - - @ffi.UnsignedInt() - external int is_allday; - - @ffi.UnsignedInt() - external int calendar_book_visibility; - - @ffi.UnsignedInt() - external int calendar_book_account_id; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event_calendar_book_attendee _calendar_event_calendar_book_attendee view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID
string _uri
integer event_id
integer calendar_book_id
string summary
string description
string location
string categories
string exdate
integer event_status
integer priority
integer timezone
integer person_id
integer busy_status
integer sensitivity
string uid
string organizer_name
string organizer_email
integer meeting_status
integer original_event_id
double latitude
double longitude
integer email_id
long long int created_time
long long int last_modified_time
integer freq
integer range_type
calendar time until_time
integer count
integer interval
string bysecond
string byminute
string byhour
string byday
string bymonthday
string byyearday
string byweekno
string bymonth
string bysetpos
integer wkst
string recurrence_id
string rdate
integer has_attendee
integer has_alarm
integer calendar_system_type
string sync_data1
string sync_data2
string sync_data3
string sync_data4
calendar time start_time
string start_tzid
calendar time end_time
string end_tzid
filter integer calendar_book_visibility
filter integer calendar_book_account_id
filter string attendee_email
filter string attendee_name
filter string attendee_member
-final class _calendar_event_calendar_book_attendee_property_ids - extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int event_id; - - @ffi.UnsignedInt() - external int calendar_book_id; - - @ffi.UnsignedInt() - external int summary; - - @ffi.UnsignedInt() - external int description; - - @ffi.UnsignedInt() - external int location; - - @ffi.UnsignedInt() - external int categories; - - @ffi.UnsignedInt() - external int exdate; - - @ffi.UnsignedInt() - external int event_status; - - @ffi.UnsignedInt() - external int priority; - - @ffi.UnsignedInt() - external int timezone; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int busy_status; - - @ffi.UnsignedInt() - external int sensitivity; - - @ffi.UnsignedInt() - external int uid; - - @ffi.UnsignedInt() - external int organizer_name; - - @ffi.UnsignedInt() - external int organizer_email; - - @ffi.UnsignedInt() - external int meeting_status; - - @ffi.UnsignedInt() - external int original_event_id; - - @ffi.UnsignedInt() - external int latitude; - - @ffi.UnsignedInt() - external int longitude; - - @ffi.UnsignedInt() - external int email_id; - - @ffi.UnsignedInt() - external int created_time; - - @ffi.UnsignedInt() - external int last_modified_time; - - @ffi.UnsignedInt() - external int freq; - - @ffi.UnsignedInt() - external int range_type; - - @ffi.UnsignedInt() - external int until_time; - - @ffi.UnsignedInt() - external int count; - - @ffi.UnsignedInt() - external int interval; - - @ffi.UnsignedInt() - external int bysecond; - - @ffi.UnsignedInt() - external int byminute; - - @ffi.UnsignedInt() - external int byhour; - - @ffi.UnsignedInt() - external int byday; - - @ffi.UnsignedInt() - external int bymonthday; - - @ffi.UnsignedInt() - external int byyearday; - - @ffi.UnsignedInt() - external int byweekno; - - @ffi.UnsignedInt() - external int bymonth; - - @ffi.UnsignedInt() - external int bysetpos; - - @ffi.UnsignedInt() - external int wkst; - - @ffi.UnsignedInt() - external int recurrence_id; - - @ffi.UnsignedInt() - external int rdate; - - @ffi.UnsignedInt() - external int has_attendee; - - @ffi.UnsignedInt() - external int has_alarm; - - @ffi.UnsignedInt() - external int calendar_system_type; - - @ffi.UnsignedInt() - external int sync_data1; - - @ffi.UnsignedInt() - external int sync_data2; - - @ffi.UnsignedInt() - external int sync_data3; - - @ffi.UnsignedInt() - external int sync_data4; - - @ffi.UnsignedInt() - external int start_time; - - @ffi.UnsignedInt() - external int start_tzid; - - @ffi.UnsignedInt() - external int end_time; - - @ffi.UnsignedInt() - external int end_tzid; - - @ffi.UnsignedInt() - external int is_allday; - - @ffi.UnsignedInt() - external int calendar_book_visibility; - - @ffi.UnsignedInt() - external int calendar_book_account_id; - - @ffi.UnsignedInt() - external int attendee_email; - - @ffi.UnsignedInt() - external int attendee_name; - - @ffi.UnsignedInt() - external int attendee_member; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_instance_utime_calendar_book _calendar_instance_utime_calendar_book view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID
string _uri
integer event_id
calendar time start_time
calendar time end_time
string summary
string location
integer calendar_book_id
string description
integer busy_status
integer event_status
integer priority
integer sensitivity
integer has_rrule
double latitude
double longitude
integer has_alarm
integer original_event_id
filter integer calendar_book_visibility
filter integer calendar_book_account_id
long long int last_modified_time
string sync_data1
-final class _calendar_instance_utime_calendar_book_property_ids - extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int event_id; - - @ffi.UnsignedInt() - external int start_time; - - @ffi.UnsignedInt() - external int end_time; - - @ffi.UnsignedInt() - external int summary; - - @ffi.UnsignedInt() - external int location; - - @ffi.UnsignedInt() - external int calendar_book_id; - - @ffi.UnsignedInt() - external int description; - - @ffi.UnsignedInt() - external int busy_status; - - @ffi.UnsignedInt() - external int event_status; - - @ffi.UnsignedInt() - external int priority; - - @ffi.UnsignedInt() - external int sensitivity; - - @ffi.UnsignedInt() - external int has_rrule; - - @ffi.UnsignedInt() - external int latitude; - - @ffi.UnsignedInt() - external int longitude; - - @ffi.UnsignedInt() - external int has_alarm; - - @ffi.UnsignedInt() - external int original_event_id; - - @ffi.UnsignedInt() - external int calendar_book_visibility; - - @ffi.UnsignedInt() - external int calendar_book_account_id; - - @ffi.UnsignedInt() - external int last_modified_time; - - @ffi.UnsignedInt() - external int sync_data1; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_instance_localtime_calendar_book _calendar_instance_localtime_calendar_book view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID
string _uri
integer event_id
calendar time start_time
calendar time end_time
string summary
string location
integer calendar_book_id
string description
integer busy_status
integer event_status
integer priority
integer sensitivity
integer has_rrule
double latitude
double longitude
integer has_alarm
integer original_event_id
filter integer calendar_book_visibility
filter integer calendar_book_account_id
long long int last_modified_time
string sync_data1
int is_allday
-final class _calendar_instance_localtime_calendar_book_property_ids - extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int event_id; - - @ffi.UnsignedInt() - external int start_time; - - @ffi.UnsignedInt() - external int end_time; - - @ffi.UnsignedInt() - external int summary; - - @ffi.UnsignedInt() - external int location; - - @ffi.UnsignedInt() - external int calendar_book_id; - - @ffi.UnsignedInt() - external int description; - - @ffi.UnsignedInt() - external int busy_status; - - @ffi.UnsignedInt() - external int event_status; - - @ffi.UnsignedInt() - external int priority; - - @ffi.UnsignedInt() - external int sensitivity; - - @ffi.UnsignedInt() - external int has_rrule; - - @ffi.UnsignedInt() - external int latitude; - - @ffi.UnsignedInt() - external int longitude; - - @ffi.UnsignedInt() - external int has_alarm; - - @ffi.UnsignedInt() - external int original_event_id; - - @ffi.UnsignedInt() - external int calendar_book_visibility; - - @ffi.UnsignedInt() - external int calendar_book_account_id; - - @ffi.UnsignedInt() - external int last_modified_time; - - @ffi.UnsignedInt() - external int sync_data1; - - @ffi.UnsignedInt() - external int is_allday; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_instance_utime_calendar_book_extended _calendar_instance_utime_calendar_book_extended view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID
string _uri
integer event_id
calendar time start_time
calendar time end_time
string summary
string location
integer calendar_book_id
string description
integer busy_status
integer event_status
integer priority
integer sensitivity
integer has_rrule
double latitude
double longitude
integer has_alarm
integer original_event_id
filter integer calendar_book_visibility
filter integer calendar_book_account_id
string organizer_name
string categories
integer has_attendee
string sync_data1
string sync_data2
string sync_data3
string sync_data4
-final class _calendar_instance_utime_calendar_book_extended_property_ids - extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int event_id; - - @ffi.UnsignedInt() - external int start_time; - - @ffi.UnsignedInt() - external int end_time; - - @ffi.UnsignedInt() - external int summary; - - @ffi.UnsignedInt() - external int location; - - @ffi.UnsignedInt() - external int calendar_book_id; - - @ffi.UnsignedInt() - external int description; - - @ffi.UnsignedInt() - external int busy_status; - - @ffi.UnsignedInt() - external int event_status; - - @ffi.UnsignedInt() - external int priority; - - @ffi.UnsignedInt() - external int sensitivity; - - @ffi.UnsignedInt() - external int has_rrule; - - @ffi.UnsignedInt() - external int latitude; - - @ffi.UnsignedInt() - external int longitude; - - @ffi.UnsignedInt() - external int has_alarm; - - @ffi.UnsignedInt() - external int original_event_id; - - @ffi.UnsignedInt() - external int calendar_book_visibility; - - @ffi.UnsignedInt() - external int calendar_book_account_id; - - @ffi.UnsignedInt() - external int last_modified_time; - - @ffi.UnsignedInt() - external int sync_data1; - - @ffi.UnsignedInt() - external int organizer_name; - - @ffi.UnsignedInt() - external int categories; - - @ffi.UnsignedInt() - external int has_attendee; - - @ffi.UnsignedInt() - external int sync_data2; - - @ffi.UnsignedInt() - external int sync_data3; - - @ffi.UnsignedInt() - external int sync_data4; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_instance_localtime_calendar_book_extended _calendar_instance_localtime_calendar_book_extended view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
Type Property ID
string _uri
integer event_id
calendar time start_time
calendar time end_time
string summary
string location
integer calendar_book_id
string description
integer busy_status
integer event_status
integer priority
integer sensitivity
integer has_rrule
double latitude
double longitude
integer has_alarm
integer original_event_id
filter integer calendar_book_visibility
filter integer calendar_book_account_id
string organizer_name
string categories
integer has_attendee
string sync_data1
string sync_data2
string sync_data3
string sync_data4
-final class _calendar_instance_localtime_calendar_book_extended_property_ids - extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int event_id; - - @ffi.UnsignedInt() - external int start_time; - - @ffi.UnsignedInt() - external int end_time; - - @ffi.UnsignedInt() - external int summary; - - @ffi.UnsignedInt() - external int location; - - @ffi.UnsignedInt() - external int calendar_book_id; - - @ffi.UnsignedInt() - external int description; - - @ffi.UnsignedInt() - external int busy_status; - - @ffi.UnsignedInt() - external int event_status; - - @ffi.UnsignedInt() - external int priority; - - @ffi.UnsignedInt() - external int sensitivity; - - @ffi.UnsignedInt() - external int has_rrule; - - @ffi.UnsignedInt() - external int latitude; - - @ffi.UnsignedInt() - external int longitude; - - @ffi.UnsignedInt() - external int has_alarm; - - @ffi.UnsignedInt() - external int original_event_id; - - @ffi.UnsignedInt() - external int calendar_book_visibility; - - @ffi.UnsignedInt() - external int calendar_book_account_id; - - @ffi.UnsignedInt() - external int last_modified_time; - - @ffi.UnsignedInt() - external int sync_data1; - - @ffi.UnsignedInt() - external int organizer_name; - - @ffi.UnsignedInt() - external int categories; - - @ffi.UnsignedInt() - external int has_attendee; - - @ffi.UnsignedInt() - external int is_allday; - - @ffi.UnsignedInt() - external int sync_data2; - - @ffi.UnsignedInt() - external int sync_data3; - - @ffi.UnsignedInt() - external int sync_data4; -} - -/// @ingroup CAPI_SOCIAL_CALENDAR_SVC_MODULE -/// @addtogroup CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_extended_property _calendar_extended_property view (read only) -/// -/// -/// -/// -/// -/// -/// -/// Identifier of this extended_property view -/// -/// -/// -/// -/// -///
Type Property ID Read, Write Description
string _uri read only
integer id read only DB record ID of the extended_property
integer record_id read,write Related record ID
integer record_type read, write Enumeration value of the record type (@ref calendar_record_type_e)
string key read, write The key of the property
string value read, write The value of the property
-final class _calendar_extended_property_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int record_id; - - @ffi.UnsignedInt() - external int record_type; - - @ffi.UnsignedInt() - external int key; - - @ffi.UnsignedInt() - external int value; -} - -typedef calendar_record_h = ffi.Pointer<__calendar_record_h>; -typedef calendar_list_h = ffi.Pointer<__calendar_list_h>; -typedef calendar_query_h = ffi.Pointer<__calendar_query_h>; - -/// @brief Called when a designated view changes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -/// @param[in] view_uri The view URI -/// @param[in] user_data The user data passed from the callback registration function -/// @see calendar_db_add_changed_cb() -typedef calendar_db_changed_cb - = ffi.Pointer>; -typedef calendar_db_changed_cbFunction = ffi.Void Function( - ffi.Pointer view_uri, ffi.Pointer user_data); -typedef Dartcalendar_db_changed_cbFunction = void Function( - ffi.Pointer view_uri, ffi.Pointer user_data); -typedef calendar_filter_h = ffi.Pointer<__calendar_filter_h>; - -/// @brief Called to get a record handle of -/// \ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event or \ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_todo. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -/// @param[in] record The record handle (\ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_event or \ref CAPI_SOCIAL_CALENDAR_SVC_VIEW_MODULE_calendar_todo) -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @pre calendar_vcalendar_parse_to_calendar_foreach() will invoke this callback. -/// @see calendar_vcalendar_parse_to_calendar_foreach() -/// @see calendar_record_get_uri_p() -typedef calendar_vcalendar_parse_cb - = ffi.Pointer>; -typedef calendar_vcalendar_parse_cbFunction = ffi.Bool Function( - calendar_record_h record, ffi.Pointer user_data); -typedef Dartcalendar_vcalendar_parse_cbFunction = bool Function( - calendar_record_h record, ffi.Pointer user_data); - -/// @brief Called when an alarm is alerted. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @elseif TV 4.0 @endif -/// @param[in] param Value string like id=value&time=value&tick=value&unit=value&type=value -/// @param[in] user_data The user data passed from the callback registration function -/// @see calendar_reminder_add_cb() -typedef calendar_reminder_cb - = ffi.Pointer>; -typedef calendar_reminder_cbFunction = ffi.Void Function( - ffi.Pointer param, ffi.Pointer user_data); -typedef Dartcalendar_reminder_cbFunction = void Function( - ffi.Pointer param, ffi.Pointer user_data); - -/// @brief Enumeration for contacts errors. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_error_e { - /// < Successful - static const int CONTACTS_ERROR_NONE = 0; - - /// < Out of memory - static const int CONTACTS_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int CONTACTS_ERROR_INVALID_PARAMETER = -22; - - /// < FS Full - static const int CONTACTS_ERROR_FILE_NO_SPACE = -28; - - /// < Permission denied - static const int CONTACTS_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int CONTACTS_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Requested data does not exist - static const int CONTACTS_ERROR_NO_DATA = -61; - - /// < Database table locked or file locked - static const int CONTACTS_ERROR_DB_LOCKED = -33619839; - - /// < Unknown DB error - static const int CONTACTS_ERROR_DB = -33619809; - - /// < IPC server is not available - static const int CONTACTS_ERROR_IPC_NOT_AVALIABLE = -33619791; - - /// < Unknown IPC error - static const int CONTACTS_ERROR_IPC = -33619777; - - /// < Internal system module error - static const int CONTACTS_ERROR_SYSTEM = -33619729; - - /// < Implementation Error, Temporary Use - static const int CONTACTS_ERROR_INTERNAL = -33619713; -} - -final class __contacts_record_h extends ffi.Opaque {} - -final class __contacts_filter_h extends ffi.Opaque {} - -final class __contacts_list_h extends ffi.Opaque {} - -final class __contacts_query_h extends ffi.Opaque {} - -final class __contacts_h extends ffi.Opaque {} - -/// @brief Enumeration for contacts data type. -/// @since_tizen 3.0 -abstract class contacts_data_type_e { - static const int CONTACTS_DATA_TYPE_NAME = 1; - static const int CONTACTS_DATA_TYPE_POSTAL = 2; - static const int CONTACTS_DATA_TYPE_MESSENGER = 3; - static const int CONTACTS_DATA_TYPE_URL = 4; - static const int CONTACTS_DATA_TYPE_EVENT = 5; - static const int CONTACTS_DATA_TYPE_COMPANY = 6; - static const int CONTACTS_DATA_TYPE_NICKNAME = 7; - static const int CONTACTS_DATA_TYPE_NUMBER = 8; - static const int CONTACTS_DATA_TYPE_EMAIL = 9; - static const int CONTACTS_DATA_TYPE_PROFILE = 10; - static const int CONTACTS_DATA_TYPE_RELATIONSHIP = 11; - static const int CONTACTS_DATA_TYPE_NOTE = 12; - static const int CONTACTS_DATA_TYPE_IMAGE = 13; - static const int CONTACTS_DATA_TYPE_SIP = 14; - static const int CONTACTS_DATA_TYPE_EXTENSION = 100; -} - -/// @brief Enumeration for contacts number type. -/// @details The number can be made with a set of values by specifying one or more values. -/// Example : CTS_NUM_TYPE_HOME|CTS_NUM_TYPE_VOICE -/// Exceptionally, CTS_NUM_TYPE_CUSTOM is exclusive. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_number_type_e { - /// < Other number type - static const int CONTACTS_NUMBER_TYPE_OTHER = 0; - - /// < Custom number type - static const int CONTACTS_NUMBER_TYPE_CUSTOM = 1; - - /// < A telephone number associated with a residence - static const int CONTACTS_NUMBER_TYPE_HOME = 2; - - /// < A telephone number associated with a place of work - static const int CONTACTS_NUMBER_TYPE_WORK = 4; - - /// < A voice telephone number - static const int CONTACTS_NUMBER_TYPE_VOICE = 8; - - /// < A facsimile telephone number - static const int CONTACTS_NUMBER_TYPE_FAX = 16; - - /// < The telephone number has voice messaging support - static const int CONTACTS_NUMBER_TYPE_MSG = 32; - - /// < A cellular telephone number - static const int CONTACTS_NUMBER_TYPE_CELL = 64; - - /// < A paging device telephone number - static const int CONTACTS_NUMBER_TYPE_PAGER = 128; - - /// < A bulletin board system telephone number - static const int CONTACTS_NUMBER_TYPE_BBS = 256; - - /// < A MODEM connected telephone number - static const int CONTACTS_NUMBER_TYPE_MODEM = 512; - - /// < A car-phone telephone number - static const int CONTACTS_NUMBER_TYPE_CAR = 1024; - - /// < An ISDN service telephone number - static const int CONTACTS_NUMBER_TYPE_ISDN = 2048; - - /// < A video conferencing telephone number - static const int CONTACTS_NUMBER_TYPE_VIDEO = 4096; - - /// < A personal communication services telephone number - static const int CONTACTS_NUMBER_TYPE_PCS = 8192; - - /// < A company main number - static const int CONTACTS_NUMBER_TYPE_COMPANY_MAIN = 16384; - - /// < A radio phone number - static const int CONTACTS_NUMBER_TYPE_RADIO = 32768; - - /// < An additional type for main - static const int CONTACTS_NUMBER_TYPE_MAIN = 536870912; - - /// < An additional type for assistant - static const int CONTACTS_NUMBER_TYPE_ASSISTANT = 1073741824; -} - -/// @brief Enumeration for Contact email type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_email_type_e { - /// < Other email type - static const int CONTACTS_EMAIL_TYPE_OTHER = 0; - - /// < Custom email type - static const int CONTACTS_EMAIL_TYPE_CUSTOM = 1; - - /// < An email address associated with a residence - static const int CONTACTS_EMAIL_TYPE_HOME = 2; - - /// < An email address associated with a place of work - static const int CONTACTS_EMAIL_TYPE_WORK = 4; - - /// < A mobile email address - static const int CONTACTS_EMAIL_TYPE_MOBILE = 8; -} - -/// @brief Enumeration for Contact company type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_company_type_e { - /// < Other company type - static const int CONTACTS_COMPANY_TYPE_OTHER = 0; - - /// < Custom company type - static const int CONTACTS_COMPANY_TYPE_CUSTOM = 1; - - /// < Work company type - static const int CONTACTS_COMPANY_TYPE_WORK = 2; -} - -/// @brief Enumeration for Contact address type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_address_type_e { - /// < Other address type - static const int CONTACTS_ADDRESS_TYPE_OTHER = 0; - - /// < A delivery address for a residence - static const int CONTACTS_ADDRESS_TYPE_CUSTOM = 1; - - /// < A delivery address for a residence - static const int CONTACTS_ADDRESS_TYPE_HOME = 2; - - /// < A delivery address for a place of work - static const int CONTACTS_ADDRESS_TYPE_WORK = 4; - - /// < A domestic delivery address - static const int CONTACTS_ADDRESS_TYPE_DOM = 8; - - /// < An international delivery address - static const int CONTACTS_ADDRESS_TYPE_INTL = 16; - - /// < A postal delivery address - static const int CONTACTS_ADDRESS_TYPE_POSTAL = 32; - - /// < A parcel delivery address - static const int CONTACTS_ADDRESS_TYPE_PARCEL = 64; -} - -/// @brief Enumeration for Contact URL type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_url_type_e { - /// < Other URL type - static const int CONTACTS_URL_TYPE_OTHER = 0; - - /// < Custom URL type - static const int CONTACTS_URL_TYPE_CUSTOM = 1; - - /// < Home URL type - static const int CONTACTS_URL_TYPE_HOME = 2; - - /// < Work URL type - static const int CONTACTS_URL_TYPE_WORK = 3; -} - -/// @brief Enumeration for Contact messenger type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_messenger_type_e { - /// < Other messenger type - static const int CONTACTS_MESSENGER_TYPE_OTHER = 0; - - /// < Custom messenger type - static const int CONTACTS_MESSENGER_TYPE_CUSTOM = 1; - - /// < Google messenger type - static const int CONTACTS_MESSENGER_TYPE_GOOGLE = 2; - - /// < Windows live messenger type - static const int CONTACTS_MESSENGER_TYPE_WLM = 3; - - /// < Yahoo messenger type - static const int CONTACTS_MESSENGER_TYPE_YAHOO = 4; - - /// < Facebook messenger type - static const int CONTACTS_MESSENGER_TYPE_FACEBOOK = 5; - - /// < ICQ type - static const int CONTACTS_MESSENGER_TYPE_ICQ = 6; - - /// < AOL instance messenger type - static const int CONTACTS_MESSENGER_TYPE_AIM = 7; - - /// < QQ type - static const int CONTACTS_MESSENGER_TYPE_QQ = 8; - - /// < Jabber type - static const int CONTACTS_MESSENGER_TYPE_JABBER = 9; - - /// < Skype type - static const int CONTACTS_MESSENGER_TYPE_SKYPE = 10; - - /// < IRC type - static const int CONTACTS_MESSENGER_TYPE_IRC = 11; -} - -/// @brief Enumeration for Call history type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_phone_log_type_e { - /// < None - static const int CONTACTS_PLOG_TYPE_NONE = 0; - - /// < Incoming call - static const int CONTACTS_PLOG_TYPE_VOICE_INCOMING = 1; - - /// < Outgoing call - static const int CONTACTS_PLOG_TYPE_VOICE_OUTGOING = 2; - - /// < Incoming video call - static const int CONTACTS_PLOG_TYPE_VIDEO_INCOMING = 3; - - /// < Outgoing video call - static const int CONTACTS_PLOG_TYPE_VIDEO_OUTGOING = 4; - - /// < Not confirmed missed call - static const int CONTACTS_PLOG_TYPE_VOICE_INCOMING_UNSEEN = 5; - - /// < Confirmed missed call - static const int CONTACTS_PLOG_TYPE_VOICE_INCOMING_SEEN = 6; - - /// < Not confirmed missed video call - static const int CONTACTS_PLOG_TYPE_VIDEO_INCOMING_UNSEEN = 7; - - /// < Confirmed missed video call - static const int CONTACTS_PLOG_TYPE_VIDEO_INCOMING_SEEN = 8; - - /// < Rejected call - static const int CONTACTS_PLOG_TYPE_VOICE_REJECT = 9; - - /// < Rejected video call - static const int CONTACTS_PLOG_TYPE_VIDEO_REJECT = 10; - - /// < Blocked call - static const int CONTACTS_PLOG_TYPE_VOICE_BLOCKED = 11; - - /// < Blocked video call - static const int CONTACTS_PLOG_TYPE_VIDEO_BLOCKED = 12; - - /// < Incoming MMS - static const int CONTACTS_PLOG_TYPE_MMS_INCOMING = 101; - - /// < Outgoing MMS - static const int CONTACTS_PLOG_TYPE_MMS_OUTGOING = 102; - - /// < Incoming SMS - static const int CONTACTS_PLOG_TYPE_SMS_INCOMING = 103; - - /// < Outgoing SMS - static const int CONTACTS_PLOG_TYPE_SMS_OUTGOING = 104; - - /// < Blocked SMS - static const int CONTACTS_PLOG_TYPE_SMS_BLOCKED = 105; - - /// < Blocked MMS - static const int CONTACTS_PLOG_TYPE_MMS_BLOCKED = 106; - - /// < Received email - static const int CONTACTS_PLOG_TYPE_EMAIL_RECEIVED = 201; - - /// < Sent email - static const int CONTACTS_PLOG_TYPE_EMAIL_SENT = 202; -} - -/// @brief Enumeration for Contact event type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_event_type_e { - /// < Other event type - static const int CONTACTS_EVENT_TYPE_OTHER = 0; - - /// < Custom event type - static const int CONTACTS_EVENT_TYPE_CUSTOM = 1; - - /// < Birthday event type - static const int CONTACTS_EVENT_TYPE_BIRTH = 2; - - /// < Anniversary event type - static const int CONTACTS_EVENT_TYPE_ANNIVERSARY = 3; -} - -/// @brief Enumeration for Contact event calendar type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_event_calendar_type_e { - /// < Gregorian calendar - static const int CONTACTS_EVENT_CALENDAR_TYPE_GREGORIAN = 0; - - /// < Chinese calendar - static const int CONTACTS_EVENT_CALENDAR_TYPE_CHINESE = 1; -} - -/// @brief Enumeration for Contact image type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_image_type_e { - /// < Other type - static const int CONTACTS_IMAGE_TYPE_OTHER = 0; - - /// < Custom type - static const int CONTACTS_IMAGE_TYPE_CUSTOM = 1; -} - -/// @brief Enumeration for usage type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_usage_type_e { - /// < None - static const int CONTACTS_USAGE_STAT_TYPE_NONE = 0; - - /// < Outgoing call - static const int CONTACTS_USAGE_STAT_TYPE_OUTGOING_CALL = 1; - - /// < Outgoing message - static const int CONTACTS_USAGE_STAT_TYPE_OUTGOING_MSG = 2; - - /// < Outgoing email (Since 3.0) - static const int CONTACTS_USAGE_STAT_TYPE_OUTGOING_EMAIL = 3; - - /// < Incoming call (Since 3.0) - static const int CONTACTS_USAGE_STAT_TYPE_INCOMING_CALL = 4; - - /// < Incoming message (Since 3.0) - static const int CONTACTS_USAGE_STAT_TYPE_INCOMING_MSG = 5; - - /// < Incoming email (Since 3.0) - static const int CONTACTS_USAGE_STAT_TYPE_INCOMING_EMAIL = 6; - - /// < Missed call (Since 3.0) - static const int CONTACTS_USAGE_STAT_TYPE_MISSED_CALL = 7; - - /// < Rejected call (Since 3.0) - static const int CONTACTS_USAGE_STAT_TYPE_REJECTED_CALL = 8; - - /// < Blocked call (Since 3.0) - static const int CONTACTS_USAGE_STAT_TYPE_BLOCKED_CALL = 9; - - /// < Blocked message (Since 3.0) - static const int CONTACTS_USAGE_STAT_TYPE_BLOCKED_MSG = 10; -} - -/// @brief Enumeration for Contact display name source type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_display_name_source_type_e { - /// < Invalid source of display name - static const int CONTACTS_DISPLAY_NAME_SOURCE_TYPE_INVALID = 0; - - /// < Produced display name from email record - static const int CONTACTS_DISPLAY_NAME_SOURCE_TYPE_EMAIL = 1; - - /// < Produced display name from number record - static const int CONTACTS_DISPLAY_NAME_SOURCE_TYPE_NUMBER = 2; - - /// < Produced display name from nickname record - static const int CONTACTS_DISPLAY_NAME_SOURCE_TYPE_NICKNAME = 3; - - /// < Produced display name from company record - static const int CONTACTS_DISPLAY_NAME_SOURCE_TYPE_COMPANY = 4; - - /// < Produced display name from name record - static const int CONTACTS_DISPLAY_NAME_SOURCE_TYPE_NAME = 5; -} - -/// @brief Enumeration for Address book mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_address_book_mode_e { - /// < All module can read and write contacts of this address_book - static const int CONTACTS_ADDRESS_BOOK_MODE_NONE = 0; - - /// < All module can only read contacts of this address_book - static const int CONTACTS_ADDRESS_BOOK_MODE_READONLY = 1; -} - -/// @brief Enumeration for link mode when inserting contact. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_contact_link_mode_e { - /// < Auto link immediately - static const int CONTACTS_CONTACT_LINK_MODE_NONE = 0; - - /// < Do not auto link when the contact is inserted - static const int CONTACTS_CONTACT_LINK_MODE_IGNORE_ONCE = 1; -} - -/// @brief Enumeration for Contact relationship type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_relationship_type_e { - /// < Other relationship type - static const int CONTACTS_RELATIONSHIP_TYPE_OTHER = 0; - - /// < Assistant type - static const int CONTACTS_RELATIONSHIP_TYPE_ASSISTANT = 1; - - /// < Brother type - static const int CONTACTS_RELATIONSHIP_TYPE_BROTHER = 2; - - /// < Child type - static const int CONTACTS_RELATIONSHIP_TYPE_CHILD = 3; - - /// < Domestic Partner type - static const int CONTACTS_RELATIONSHIP_TYPE_DOMESTIC_PARTNER = 4; - - /// < Father type - static const int CONTACTS_RELATIONSHIP_TYPE_FATHER = 5; - - /// < Friend type - static const int CONTACTS_RELATIONSHIP_TYPE_FRIEND = 6; - - /// < Manager type - static const int CONTACTS_RELATIONSHIP_TYPE_MANAGER = 7; - - /// < Mother type - static const int CONTACTS_RELATIONSHIP_TYPE_MOTHER = 8; - - /// < Parent type - static const int CONTACTS_RELATIONSHIP_TYPE_PARENT = 9; - - /// < Partner type - static const int CONTACTS_RELATIONSHIP_TYPE_PARTNER = 10; - - /// < Referred by type - static const int CONTACTS_RELATIONSHIP_TYPE_REFERRED_BY = 11; - - /// < Relative type - static const int CONTACTS_RELATIONSHIP_TYPE_RELATIVE = 12; - - /// < Sister type - static const int CONTACTS_RELATIONSHIP_TYPE_SISTER = 13; - - /// < Spouse type - static const int CONTACTS_RELATIONSHIP_TYPE_SPOUSE = 14; - - /// < Custom type - static const int CONTACTS_RELATIONSHIP_TYPE_CUSTOM = 15; -} - -/// @brief Enumeration for Contact search range. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_search_range_e { - /// < Search record from name - static const int CONTACTS_SEARCH_RANGE_NAME = 1; - - /// < Search record from name and number - static const int CONTACTS_SEARCH_RANGE_NUMBER = 2; - - /// < Search record from name,number and data - static const int CONTACTS_SEARCH_RANGE_DATA = 4; - - /// < Search record from name,number,data and email. Now, support only _contacts_person_email view_uri - static const int CONTACTS_SEARCH_RANGE_EMAIL = 8; -} - -/// @brief Enumeration for SIP(Session Initiation Protocol) type range. -/// @since_tizen 3.0 -abstract class contacts_sip_type_e { - /// < Other sip type - static const int CONTACTS_SIP_TYPE_OTHER = 0; - - /// < Custom sip type - static const int CONTACTS_SIP_TYPE_CUSTOM = 1; - - /// < Home sip type - static const int CONTACTS_SIP_TYPE_HOME = 2; - - /// < Work sip type - static const int CONTACTS_SIP_TYPE_WORK = 3; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address_book _contacts_address_book view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts addressbook view
integer id read only DB record ID of the addressbook
integer account_id read, write once Account ID that the addressbook belongs to
string name read, write It cannot be @c NULL. Duplicate names are not allowed.
integer mode read, write Addressbook mode, refer to the @ref contacts_address_book_mode_e
-final class _contacts_address_book_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int account_id; - - @ffi.UnsignedInt() - external int name; - - @ffi.UnsignedInt() - external int mode; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group _contacts_group view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts group view
integer id read only DB record ID of the group
integer address_book_id read, write once Addressbook ID that the group belongs to
string name read, write Group name
string ringtone_path read, write Ringtone path of the group
string image_path read, write Image path of the group
string vibration read, write Vibration path of the group
string extra_data read, write Extra data for default group name
boolean is_read_only read, write once The group is read only or not
string message_alert read, write Message alert path of the group
-final class _contacts_group_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int name; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_path; - - @ffi.UnsignedInt() - external int vibration; - - @ffi.UnsignedInt() - external int extra_data; - - @ffi.UnsignedInt() - external int is_read_only; - - @ffi.UnsignedInt() - external int message_alert; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person _contacts_person view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts person view
integer id read only DB record ID of the person
string display_name read only Display name of the person
string display_name_index read only The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id read only Display contact ID that the person belongs to
string ringtone_path read, write Ringtone path of the person
string image_thumbnail_path read only Image thumbnail path of the person
string vibration read, write Vibration path of the person
string message_alert read, write Message alert path of the person
string status read only Status of social account
boolean is_favorite read, write The person is favorite or not
double favorite_priority read only The priority of favorite contacts. it can be used as sorting key, see the @ref contacts_query_set_sort
integer link_count read only Link count of contact records (projection)
string addressbook_ids read only Addressbook IDs that the person belongs to (projection)
boolean has_phonenumber read only The person has phone number or not
boolean has_email read only The person has email or not
integer snippet_type read only keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string read only keyword matched data string (Since 3.0)
-final class _contacts_person_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_name_index; - - @ffi.UnsignedInt() - external int display_contact_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int vibration; - - @ffi.UnsignedInt() - external int status; - - @ffi.UnsignedInt() - external int is_favorite; - - @ffi.UnsignedInt() - external int favorite_priority; - - @ffi.UnsignedInt() - external int link_count; - - @ffi.UnsignedInt() - external int addressbook_ids; - - @ffi.UnsignedInt() - external int has_phonenumber; - - @ffi.UnsignedInt() - external int has_email; - - @ffi.UnsignedInt() - external int message_alert; - - @ffi.UnsignedInt() - external int snippet_type; - - @ffi.UnsignedInt() - external int snippet_string; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_simple_contact _contacts_simple_contact view -/// You can only get simple contact using this view. -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this simple contact view
integerid DB record ID of the contact
stringdisplay_name Display name of the contact
integerdisplay_source_id The source type of display name, refer to the @ref contacts_display_name_source_type_e
integeraddress_book_id Addressbook that the contact belongs to
stringringtone_path Ringtone path of the contact
stringimage_thumbnail_path Image thumbnail path of the contact
booleanis_favorite The contact is favorite or not
booleanhas_phonenumber The contact has phone number or not
booleanhas_email The contact has email or not
integerperson_id Person ID that the contact belongs to
stringuid Unique identifier
stringvibration Vibration path of the contact
stringmessage_alert Message alert path of the contact
integerchanged_time Last changed contact time
-final class _contacts_simple_contact_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_source_type; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int is_favorite; - - @ffi.UnsignedInt() - external int has_phonenumber; - - @ffi.UnsignedInt() - external int has_email; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int uid; - - @ffi.UnsignedInt() - external int vibration; - - @ffi.UnsignedInt() - external int changed_time; - - @ffi.UnsignedInt() - external int message_alert; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact _contacts_contact view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contact view
integeridread only DB record ID of the contact
stringdisplay_nameread only Display name of the contact
integerdisplay_source_idread only The source type of display name, refer to the @ref contacts_display_name_source_type_e
integeraddress_book_idread, write once Addressbook ID that the contact belongs to
stringringtone_pathread, write Ringtone path of the contact
stringimage_thumbnail_pathread only Image thumbnail path of the contact
booleanis_favoriteread, write The contact is favorite or not
booleanhas_phonenumberread only The contact has phone number or not
booleanhas_emailread only The contact has email or not
integerperson_idread, write once Person ID that the contact belongs to. If set when inserting, a contact will be linked to person
stringuidread, write Unique identifier
stringvibrationread, write Vibration path of the contact
stringmessage_alertread, write Message alert path of the contact
integerchanged_timeread only Last changed contact time
integerlink_moderead, write once The link mode, refer to the @ref contacts_contact_link_mode_e. If the person_id was set, this value will be ignored
recordnameread, write _contacts_name child record (single)
recordcompanyread, write _contacts_company child record (multiple)
recordnoteread, write _contacts_note child record (multiple)
recordnumberread, write _contacts_number child record (multiple)
recordemailread, write _contacts_email child record (multiple)
recordeventread, write _contacts_event child record (multiple)
recordmessengerread, write _contacts_messenger child record (multiple)
recordaddressread, write _contacts_address child record (multiple)
recordurlread, write _contacts_url child record (multiple)
recordnicknameread, write _contacts_nickname child record (multiple)
recordprofileread, write _contacts_profile child record (multiple)
recordrelationshipread, write _contacts_relationship child record (multiple)
recordimageread, write _contacts_image child record (multiple)
recordgroup_relationread, write _contacts_group_relation child record (multiple)
recordsipread, write _contacts_sip child record (multiple) (Since 3.0)
-final class _contacts_contact_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_source_type; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int is_favorite; - - @ffi.UnsignedInt() - external int has_phonenumber; - - @ffi.UnsignedInt() - external int has_email; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int uid; - - @ffi.UnsignedInt() - external int vibration; - - @ffi.UnsignedInt() - external int changed_time; - - @ffi.UnsignedInt() - external int link_mode; - - @ffi.UnsignedInt() - external int name; - - @ffi.UnsignedInt() - external int image; - - @ffi.UnsignedInt() - external int company; - - @ffi.UnsignedInt() - external int note; - - @ffi.UnsignedInt() - external int number; - - @ffi.UnsignedInt() - external int email; - - @ffi.UnsignedInt() - external int event; - - @ffi.UnsignedInt() - external int messenger; - - @ffi.UnsignedInt() - external int address; - - @ffi.UnsignedInt() - external int url; - - @ffi.UnsignedInt() - external int nickname; - - @ffi.UnsignedInt() - external int profile; - - @ffi.UnsignedInt() - external int relationship; - - @ffi.UnsignedInt() - external int group_relation; - - @ffi.UnsignedInt() - external int extension1; - - @ffi.UnsignedInt() - external int message_alert; - - @ffi.UnsignedInt() - external int sip; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile _contacts_my_profile view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this my profile view
integeridread only DB record ID of the my profile
stringdisplay_nameread only Display name of the profile
integeraddress_book_idread, write once Addressbook ID that the profile belongs to
stringimage_thumbnail_pathread only Image thumbnail path of the profile
stringuidread, write Unique identifier
integerchanged_timeread only Last changed profile time
recordnameread, write _contacts_name child record (single)
recordcompanyread, write _contacts_company child record (multiple)
recordnoteread, write _contacts_note child record (multiple)
recordnumberread, write _contacts_number child record (multiple)
recordemailread, write _contacts_email child record (multiple)
recordeventread, write _contacts_event child record (multiple)
recordmessengerread, write _contacts_messenger child record (multiple)
recordaddressread, write _contacts_address child record (multiple)
recordurlread, write _contacts_url child record (multiple)
recordnicknameread, write _contacts_nickname child record (multiple)
recordprofileread, write _contacts_profile child record (multiple)
recordrelationshipread, write _contacts_relationship child record (multiple)
recordimageread, write _contacts_image child record (multiple)
recordsipread, write _contacts_sip child record (multiple) (Since 3.0)
-final class _contacts_my_profile_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int uid; - - @ffi.UnsignedInt() - external int changed_time; - - @ffi.UnsignedInt() - external int name; - - @ffi.UnsignedInt() - external int image; - - @ffi.UnsignedInt() - external int company; - - @ffi.UnsignedInt() - external int note; - - @ffi.UnsignedInt() - external int number; - - @ffi.UnsignedInt() - external int email; - - @ffi.UnsignedInt() - external int event; - - @ffi.UnsignedInt() - external int messenger; - - @ffi.UnsignedInt() - external int address; - - @ffi.UnsignedInt() - external int url; - - @ffi.UnsignedInt() - external int nickname; - - @ffi.UnsignedInt() - external int profile; - - @ffi.UnsignedInt() - external int relationship; - - @ffi.UnsignedInt() - external int extension1; - - @ffi.UnsignedInt() - external int sip; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_name _contacts_name view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts name view
integer id read only DB record ID of the name
integer contact_id read, write once Contacts ID that the name record belongs to
string first read, write First name
string last read, write Last name
string addition read, write Middle name
string suffix read, write Suffix
string prefix read, write Prefix
string phonetic_first read, write Pronounce the first name
string phonetic_middle read, write Pronounce the middle name
string phonetic_last read, write Pronounce the last name
-final class _contacts_name_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int first; - - @ffi.UnsignedInt() - external int last; - - @ffi.UnsignedInt() - external int addition; - - @ffi.UnsignedInt() - external int suffix; - - @ffi.UnsignedInt() - external int prefix; - - @ffi.UnsignedInt() - external int phonetic_first; - - @ffi.UnsignedInt() - external int phonetic_middle; - - @ffi.UnsignedInt() - external int phonetic_last; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_number _contacts_number view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts number view
integer id read only DB record ID of the number
integer contact_id read, write once Contact ID that the number belongs to
integer type read, write Number type, refer to the @ref contacts_number_type_e
string label read, write Custom number type label, when the number type is #CONTACTS_NUMBER_TYPE_CUSTOM
boolean is_default read, write The number is default number or not
string number read, write Number
string normalized_number filter only You can only use this property for search filter.
string cleaned_number filter only You can only use this property for search filter.
string number_filter filter only You can only use this property for search filter.
-final class _contacts_number_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; - - @ffi.UnsignedInt() - external int is_default; - - @ffi.UnsignedInt() - external int number; - - @ffi.UnsignedInt() - external int normalized_number; - - @ffi.UnsignedInt() - external int cleaned_number; - - @ffi.UnsignedInt() - external int number_filter; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_email _contacts_email view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts email view
integer id read only DB record ID of the email
integer contact_id read, write once Contact ID that the email belongs to
integer type read, write Email type, refer to the @ref contacts_email_type_e
string label read, write Custom mail type label, when the email type is #CONTACTS_EMAIL_TYPE_CUSTOM
boolean is_default read, write The email is default email or not
string email read, write Email address
-final class _contacts_email_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; - - @ffi.UnsignedInt() - external int is_default; - - @ffi.UnsignedInt() - external int email; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_address _contacts_address view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts address view
integer id read only DB record ID of the address
integer contact_id read, write once Contact ID that the address belongs to
integer type read, write Address type, refer to the @ref contacts_address_type_e
string label read, write Address type label, when the address type is #CONTACTS_ADDRESS_TYPE_CUSTOM
string postbox read, write Post office box
string postal_code read, write Postal code
string region read, write Region
string locality read, write Locality
string street read, write Street
string country read, write Country
string extended read, write Extended address
boolean is_default read, write The address is default or not
-final class _contacts_address_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; - - @ffi.UnsignedInt() - external int postbox; - - @ffi.UnsignedInt() - external int extended; - - @ffi.UnsignedInt() - external int street; - - @ffi.UnsignedInt() - external int locality; - - @ffi.UnsignedInt() - external int region; - - @ffi.UnsignedInt() - external int postal_code; - - @ffi.UnsignedInt() - external int country; - - @ffi.UnsignedInt() - external int is_default; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_note _contacts_note view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts note view
integer id read only DB record ID of the note
integer contact_id read, write once Contact ID that the note belongs to
string note read, write Note contents
-final class _contacts_note_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int note; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_url _contacts_url view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts URL view
integer id read only DB record ID of the URL
integer contact_id read, write once Contact ID that the URL belongs to
integer type read, write URL type, refer to the @ref contacts_url_type_e
string label read, write Custom URL type label, when the URL type is #CONTACTS_URL_TYPE_CUSTOM
string url read, write URL
-final class _contacts_url_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; - - @ffi.UnsignedInt() - external int url; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_event _contacts_event view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts event view
integer id read only DB record ID of the event
integer contact_id read, write once Contact ID that the event belongs to
integer type read, write Event type, refer to the @ref contacts_event_type_e
string label read, write Custom event type label, when the event type is #CONTACTS_EVENT_TYPE_CUSTOM
integer date read, write Event date(YYYYMMDD). e.g. 2014/1/1 : 20140101. Even if the calendar_type is set as CONTACTS_EVENT_CALENDAR_TYPE_CHINESE, you SHOULD set Gregorian date
integer calendar_type read, write Calendar type, refer to the @ref contacts_event_calendar_type_e
bool is_leap_month (Deprecated) read, write The month is leap or not (valid on lunisolar calendar only)
-final class _contacts_event_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; - - @ffi.UnsignedInt() - external int date; - - @ffi.UnsignedInt() - external int calendar_type; - - @ffi.UnsignedInt() - external int is_leap_month; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group_relation _contacts_group_relation view -/// Refer @ref contacts_group_add_contact, @ref contacts_group_remove_contact -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this relationship view
integer id read only DB record ID of the group (can not be used as filter)
integer group_id read, write once DB record ID of the group
integer contact_id read, write once DB record ID of the contact
string name read only Group name
-final class _contacts_group_relation_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int group_id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int name; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_relationship _contacts_relationship view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this relationship view
integer id read only DB record ID of the relationship
integer contact_id read, write once Contact ID that the relationship belongs to
integer type read, write Relationship type, refer to the @ref contacts_relationship_type_e
string label read, write Custom relationship type label, when the relationship type is CONTACTS_RELATIONSHIP_TYPE_CUSTOM
string name read, write Selected contact name that the relationship belongs to
-final class _contacts_relationship_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; - - @ffi.UnsignedInt() - external int name; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_image _contacts_image view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts image view
integer id read only DB record ID of the image
integer contact_id read, write once Contact ID that the image belongs to
integer type read, write Image type, refer to the @ref contacts_image_type_e
string label read, write Custom image type label, when the image type is #CONTACTS_IMAGE_TYPE_CUSTOM
string path read, write Image thumbnail path
-final class _contacts_image_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; - - @ffi.UnsignedInt() - external int path; - - @ffi.UnsignedInt() - external int is_default; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_company _contacts_company view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts company view
integer id read only DB record ID of the company
integer contact_id read, write once Contact ID that the company belongs to
integer type read, write Company type, refer to the @ref contacts_company_type_e
string label read, write Custom company type label, when the company type is #CONTACTS_COMPANY_TYPE_CUSTOM
string name read, write Company name
string department read, write Department
string job_title read, write Job title
string assistant_name read, write Assistant name
string role read, write Role
string logo read, write Company logo image file path
string location read, write Company location
string description read, write Description
string phonetic_name read, write Pronounce the company name
-final class _contacts_company_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; - - @ffi.UnsignedInt() - external int name; - - @ffi.UnsignedInt() - external int department; - - @ffi.UnsignedInt() - external int job_title; - - @ffi.UnsignedInt() - external int assistant_name; - - @ffi.UnsignedInt() - external int role; - - @ffi.UnsignedInt() - external int logo; - - @ffi.UnsignedInt() - external int location; - - @ffi.UnsignedInt() - external int description; - - @ffi.UnsignedInt() - external int phonetic_name; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_nickname _contacts_nickname view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts nickname view
integer id read only DB record ID of the nickname
integer contact_id read, write once Contact ID that the nickname belongs to
string name read, write Nickname
-final class _contacts_nickname_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int name; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_messenger _contacts_messenger view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts messenger view
integer id read only DB record ID of the messenger
integer contact_id read, write once Contact ID that the messenger belongs to
integer type read, write Messenger type, refer to the @ref contacts_messenger_type_e
string label read, write Custom messenger type label, when the messenger type is #CONTACTS_MESSENGER_TYPE_CUSTOM
string im_id read, write Messenger ID (email address or email ID...)
-final class _contacts_messenger_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; - - @ffi.UnsignedInt() - external int im_id; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_extension _contacts_extension view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts extension view
integer id read only DB record ID of the contact extension
integer contact_id read, write once Contact ID that the contact extension belongs to
integer data1 read, write The extra child record format for non-provided from contacts-service
string data2 read, write The extra child record format for non-provided from contacts-service
string data3 read, write The extra child record format for non-provided from contacts-service
string data4 read, write The extra child record format for non-provided from contacts-service
string data5 read, write The extra child record format for non-provided from contacts-service
string data6 read, write The extra child record format for non-provided from contacts-service
string data7 read, write The extra child record format for non-provided from contacts-service
string data8 read, write The extra child record format for non-provided from contacts-service
string data9 read, write The extra child record format for non-provided from contacts-service
string data10 read, write The extra child record format for non-provided from contacts-service
string data11 read, write The extra child record format for non-provided from contacts-service
string data12 read, write The extra child record format for non-provided from contacts-service
-final class _contacts_extension_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int data1; - - @ffi.UnsignedInt() - external int data2; - - @ffi.UnsignedInt() - external int data3; - - @ffi.UnsignedInt() - external int data4; - - @ffi.UnsignedInt() - external int data5; - - @ffi.UnsignedInt() - external int data6; - - @ffi.UnsignedInt() - external int data7; - - @ffi.UnsignedInt() - external int data8; - - @ffi.UnsignedInt() - external int data9; - - @ffi.UnsignedInt() - external int data10; - - @ffi.UnsignedInt() - external int data11; - - @ffi.UnsignedInt() - external int data12; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_sdn _contacts_sdn view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts sdn view
integer id read only DB record ID of the sdn
string name read only Provided name of sdn
string number read only Provided number of sdn
integer sim_slot_no read onlyIt is related to the SIM slot number. sim_slot_no 0 means first SIM card, sim_slot_no 1 means second SIM. It is same with handle index of telephony handle list. Refer to the telephony_init()
-final class _contacts_sdn_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int name; - - @ffi.UnsignedInt() - external int number; - - @ffi.UnsignedInt() - external int sim_slot_no; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_profile _contacts_profile view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts profile view
integer id read only DB record ID of profile
integer contact_id read, write once Contacts ID that the profile belongs to
string uid read, write Unique identifier
string text read, write Profile contents
integer order read, write Priority to display the profile
string service_operation read, write Data for app_control_set_operation
string mime read, write Data for app_control_set_mime
string app_id read, write Data for app_control_set_app_id
string uri read, write Data for app_control_set_uri
string category read, write Data for app_control_set_category
string extra_data read, write It includes "key:value,key:value," pairs. You should parse it. And you must base64 encode each key and value
-final class _contacts_profile_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int uid; - - @ffi.UnsignedInt() - external int text; - - @ffi.UnsignedInt() - external int order; - - @ffi.UnsignedInt() - external int service_operation; - - @ffi.UnsignedInt() - external int mime; - - @ffi.UnsignedInt() - external int app_id; - - @ffi.UnsignedInt() - external int uri; - - @ffi.UnsignedInt() - external int category; - - @ffi.UnsignedInt() - external int extra_data; - - @ffi.UnsignedInt() - external int contact_id; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity_photo _contacts_activity_photo view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contact activity photo view
integer id read only DB record ID of activity photo
integer activity_id read, write once Activity ID that the activity photo belongs to
string photo_url read, write Photo URL
integer sort_index read, write Sorted photo index
-final class _contacts_activity_photo_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int activity_id; - - @ffi.UnsignedInt() - external int photo_url; - - @ffi.UnsignedInt() - external int sort_index; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_activity _contacts_activity view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this activity view
integer id read only DB record ID of activity
integer contact_id read, write once Contact ID that the activity belongs to
string source_name read, write Account name that the activity belongs to
int timestamp read, write Published time of activity
string status read, write Activity status
string service_operation read, write Data for app_control_set_operation
string uri read, write Data for app_control_set_uri
record photo read, write _contacts_activity_photo child record (multiple)
-final class _contacts_activity_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int source_name; - - @ffi.UnsignedInt() - external int status; - - @ffi.UnsignedInt() - external int timestamp; - - @ffi.UnsignedInt() - external int service_operation; - - @ffi.UnsignedInt() - external int uri; - - @ffi.UnsignedInt() - external int photo; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_speeddial _contacts_speeddial view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contact speed dial view
integer speeddial_number read, write once Stored speed dial number
integer number_id read, write Number ID that the speed dial belongs to
string number read only Contact number of specified speed dial
string number_label read only Contact number label of specified speed dial, when the number type is CONTACTS_NUMBER_TYPE_CUSTOM
integer number_type read only Contact number type, refer to the @ref contacts_number_type_e
integer person_id read only Person ID that the speed dial belongs to
string display_name read only Display name that the speed dial belongs to
string image_thumbnail_path read only Image thumbnail path that the speed dial belongs to
string normalized_number filter only You can only use this property for search filter
string cleaned_number filter only You can only use this property for search filter
string number_filter filter only If you add filter with this property, the string will be normalized as minmatch length internally and the match rule will be applied CONTACTS_MATCH_EXACTLY
-final class _contacts_speeddial_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int speeddial_number; - - @ffi.UnsignedInt() - external int number_id; - - @ffi.UnsignedInt() - external int number; - - @ffi.UnsignedInt() - external int number_label; - - @ffi.UnsignedInt() - external int number_type; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int normalized_number; - - @ffi.UnsignedInt() - external int cleaned_number; - - @ffi.UnsignedInt() - external int number_filter; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log _contacts_phone_log view -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this phone log view
integer id read only DB record ID of phone log
integer person_id read, write once Person ID that the phone log belongs to
string address read, write once Number or Email that the phone log displays
integer log_time read, write once Call end time. The value means number of seconds since 1970-01-01 00:00:00 (UTC)
integer log_type read, write Log type, refer to the @ref contacts_phone_log_type_e
integer extra_data1 read, write once You can set the related integer data (e.g. message_id, email_id or duration(seconds) of call)
string extra_data2 read, write once You can set the related string data (e.g. short message, subject)
string normalized_address filter only You can only use this property for search filter
string cleaned_address filter only You can only use this property for search filter
string address_filter filter only You can only use this property for search filter
integer sim_slot_no read, write once You can set the related SIM slot number. sim_slot_no 0 means first SIM card, sim_slot_no 1 means second SIM. It is same with handle index of telephony handle list. Refer to the telephony_init()
-final class _contacts_phone_log_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int address; - - @ffi.UnsignedInt() - external int log_time; - - @ffi.UnsignedInt() - external int log_type; - - @ffi.UnsignedInt() - external int extra_data1; - - @ffi.UnsignedInt() - external int extra_data2; - - @ffi.UnsignedInt() - external int normalized_address; - - @ffi.UnsignedInt() - external int cleaned_address; - - @ffi.UnsignedInt() - external int address_filter; - - @ffi.UnsignedInt() - external int sim_slot_no; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact_updated_info _contacts_contact_updated_info view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this contact updated info view
integer contact_id Updated contact ID
integer address_book_id Addressbook ID that the updated contact belongs to
integer type Contact updated type, refer to the @ref contacts_changed_e
integer version Updated version
boolean image_changed Contact image is changed or not
-final class _contacts_contact_updated_info_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int version; - - @ffi.UnsignedInt() - external int image_changed; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_my_profile_updated_info _contacts_my_profile_updated_info view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this my profile updated info view
integer address_book_id Address book ID that the updated my profile belongs to
integer last_changed_type Changed update type, refer to the @ref contacts_changed_e
integer version Updated version
-final class _contacts_my_profile_updated_info_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int last_changed_type; - - @ffi.UnsignedInt() - external int version; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group_updated_info _contacts_group_updated_info view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this group updated info view
integer group_id Updated group ID
integer address_book_id Address book ID that the updated group belongs to
integer type Changed update type, refer to the @ref contacts_changed_e
integer version Updated version
-final class _contacts_group_updated_info_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int group_id; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int version; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_group_member_updated_info _contacts_group_member_updated_info view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this group member updated info view
integer group_id Updated group ID
integer address_book_id Address book ID that the updated group belongs to
integer version Updated version
-final class _contacts_group_member_updated_info_property_ids - extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int group_id; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int version; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_grouprel_updated_info _contacts_grouprel_updated_info view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this group relation updated info view
integer group_id Group ID of group relation
integer contact_id Contact ID of the updated group relation
integer address_book_id Address book ID of contact that the updated group relation
integer type Changed update type, refer to the @ref contacts_changed_e
integer version Updated version
-final class _contacts_grouprel_updated_info_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int group_id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int version; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact _contacts_person_contact view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this person contact view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
string status Status of social account (projection)
boolean is_favorite The person is favorite or not
integer link_count Link count of contact records (projection)
integer contact_id Contact ID that the person belongs to
string addressbook_ids Addressbook IDs that the person belongs to (projection)
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer address_book_id Addressbook ID that the person belongs to
integer address_book_mode Addressbook mode, refer to the @ref contacts_address_book_mode_e
string address_book_name Addressbook name that the person belongs to
integer snippet_type keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string keyword matched data string (Since 3.0)
-final class _contacts_person_contact_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_name_index; - - @ffi.UnsignedInt() - external int display_contact_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int vibration; - - @ffi.UnsignedInt() - external int status; - - @ffi.UnsignedInt() - external int is_favorite; - - @ffi.UnsignedInt() - external int link_count; - - @ffi.UnsignedInt() - external int addressbook_ids; - - @ffi.UnsignedInt() - external int has_phonenumber; - - @ffi.UnsignedInt() - external int has_email; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int address_book_name; - - @ffi.UnsignedInt() - external int address_book_mode; - - @ffi.UnsignedInt() - external int message_alert; - - @ffi.UnsignedInt() - external int snippet_type; - - @ffi.UnsignedInt() - external int snippet_string; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_number _contacts_person_number view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this person number view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
boolean is_favorite The person is favorite or not
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer number_id Number ID that the person belongs to
integer type Number type, refer to the @ref contacts_number_type_e (projection)
string label Custom number type label, when the number type is #CONTACTS_NUMBER_TYPE_CUSTOM (projection)
boolean is_primary_default The number is default number or not
string number Number
string number_filter If you add filter with this property, the string will be normalized as minmatch length internally and the match rule will be applied CONTACTS_MATCH_EXACTLY
string normalized_number You can only use this property for search filter
string cleaned_number You can only use this property for search filter
integer snippet_type keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string keyword matched data string (Since 3.0)
-final class _contacts_person_number_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_name_index; - - @ffi.UnsignedInt() - external int display_contact_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int vibration; - - @ffi.UnsignedInt() - external int is_favorite; - - @ffi.UnsignedInt() - external int has_phonenumber; - - @ffi.UnsignedInt() - external int has_email; - - @ffi.UnsignedInt() - external int number_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; - - @ffi.UnsignedInt() - external int is_primary_default; - - @ffi.UnsignedInt() - external int number; - - @ffi.UnsignedInt() - external int number_filter; - - @ffi.UnsignedInt() - external int normalized_number; - - @ffi.UnsignedInt() - external int message_alert; - - @ffi.UnsignedInt() - external int cleaned_number; - - @ffi.UnsignedInt() - external int snippet_type; - - @ffi.UnsignedInt() - external int snippet_string; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_email _contacts_person_email view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this person email view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
boolean is_favorite The person is favorite or not
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer email_id Email ID that the person belongs to
integer type Email type, refer to the @ref contacts_email_type_e (projection)
string label Custom mail type label, when the email type is #CONTACTS_EMAIL_TYPE_CUSTOM (projection)
boolean is_primary_default The email is default email or not
string email Email address
integer snippet_type keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string keyword matched data string (Since 3.0)
-final class _contacts_person_email_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_name_index; - - @ffi.UnsignedInt() - external int display_contact_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int vibration; - - @ffi.UnsignedInt() - external int is_favorite; - - @ffi.UnsignedInt() - external int has_phonenumber; - - @ffi.UnsignedInt() - external int has_email; - - @ffi.UnsignedInt() - external int email_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; - - @ffi.UnsignedInt() - external int is_primary_default; - - @ffi.UnsignedInt() - external int email; - - @ffi.UnsignedInt() - external int message_alert; - - @ffi.UnsignedInt() - external int snippet_type; - - @ffi.UnsignedInt() - external int snippet_string; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel _contacts_person_grouprel view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this person group relation view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
string status Status of social account (projection)
boolean is_favorite The person is favorite or not
integer link_count Link count of contact records (projection)
string addressbook_ids Addressbook IDs that the person belongs to (projection)
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer address_book_id Addressbook ID that the person belongs to
integer address_book_mode Addressbook mode, refer to the @ref contacts_address_book_mode_e
string address_book_name Addressbook name that the person belongs to
integer group_id Group ID that the person belongs to
integer contact_id Contact ID that the person belongs to (projection)
integer snippet_type keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string keyword matched data string (Since 3.0)
-final class _contacts_person_grouprel_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_name_index; - - @ffi.UnsignedInt() - external int display_contact_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int vibration; - - @ffi.UnsignedInt() - external int status; - - @ffi.UnsignedInt() - external int is_favorite; - - @ffi.UnsignedInt() - external int link_count; - - @ffi.UnsignedInt() - external int addressbook_ids; - - @ffi.UnsignedInt() - external int has_phonenumber; - - @ffi.UnsignedInt() - external int has_email; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int group_id; - - @ffi.UnsignedInt() - external int address_book_name; - - @ffi.UnsignedInt() - external int address_book_mode; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int message_alert; - - @ffi.UnsignedInt() - external int snippet_type; - - @ffi.UnsignedInt() - external int snippet_string; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned _contacts_person_group_assigned view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this person group assigned view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
string status Status of social account (projection)
boolean is_favorite The person is favorite or not
integer link_count Link count of contact records (projection)
string linked_address_book_ids Addressbook IDs that the linked person belongs to (projection)
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer address_book_id Addressbook ID that the person belongs to
integer address_book_mode Addressbook mode, refer to the @ref contacts_address_book_mode_e
integer group_id Group ID that the person belongs to
integer contact_id Contact ID that the person belongs to (projection)
integer snippet_type keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string keyword matched data string (Since 3.0)
-final class _contacts_person_group_assigned_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_name_index; - - @ffi.UnsignedInt() - external int display_contact_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int vibration; - - @ffi.UnsignedInt() - external int status; - - @ffi.UnsignedInt() - external int is_favorite; - - @ffi.UnsignedInt() - external int link_count; - - @ffi.UnsignedInt() - external int linked_address_book_ids; - - @ffi.UnsignedInt() - external int has_phonenumber; - - @ffi.UnsignedInt() - external int has_email; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int group_id; - - @ffi.UnsignedInt() - external int address_book_mode; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int message_alert; - - @ffi.UnsignedInt() - external int snippet_type; - - @ffi.UnsignedInt() - external int snippet_string; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned _contacts_person_group_not_assigned view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this person group not assigned view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
string status Status of social account (projection)
boolean is_favorite The person is favorite or not
integer link_count Link count of contact records (projection)
string linked_address_book_ids Addressbook IDs that the linked person belongs to (projection)
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer address_book_id Addressbook ID that the person belongs to
integer address_book_mode Addressbook mode, refer to the @ref contacts_address_book_mode_e
integer contact_id Contact ID that the person belongs to (projection)
integer snippet_type keyword matched data type, refer to they @ref contacts_data_type_e (Since 3.0)
string snippet_string keyword matched data string (Since 3.0)
-final class _contacts_person_group_not_assigned_property_ids - extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_name_index; - - @ffi.UnsignedInt() - external int display_contact_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int vibration; - - @ffi.UnsignedInt() - external int status; - - @ffi.UnsignedInt() - external int is_favorite; - - @ffi.UnsignedInt() - external int link_count; - - @ffi.UnsignedInt() - external int linked_address_book_ids; - - @ffi.UnsignedInt() - external int has_phonenumber; - - @ffi.UnsignedInt() - external int has_email; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int address_book_mode; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int message_alert; - - @ffi.UnsignedInt() - external int snippet_type; - - @ffi.UnsignedInt() - external int snippet_string; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_phone_log _contacts_person_phone_log view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this phone log view
integer person_id DB record ID of person
string display_name Display name of the person
string image_thumbnail_path Image thumbnail path of the person (projection)
integer log_id DB record ID of phone log
string address Number or Email that the phone log displays
integer address_type Number or Email type (projection)
integer log_time Call end time. The value means number of seconds since 1970-01-01 00:00:00 (UTC)
integer log_type Log type, refer to the @ref contacts_phone_log_type_e
integer extra_data1 You can set the related integer data (e.g. message_id, email_id or duration(seconds) of call) (projection)
string extra_data2 You can set the related string data (e.g. short message, subject) (projection)
string normalized_address You can only use this property for search filter
string cleaned_address You can only use this property for search filter
string address_filter You can only use this property for search filter
integer sim_slot_no It is related to the SIM slot number. sim_slot_no 0 means first SIM card, sim_slot_no 1 means second SIM. It is same with handle index of telephony handle list. Refer to the telephony_init()
-final class _contacts_person_phone_log_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int log_id; - - @ffi.UnsignedInt() - external int address; - - @ffi.UnsignedInt() - external int address_type; - - @ffi.UnsignedInt() - external int log_time; - - @ffi.UnsignedInt() - external int log_type; - - @ffi.UnsignedInt() - external int extra_data1; - - @ffi.UnsignedInt() - external int extra_data2; - - @ffi.UnsignedInt() - external int normalized_address; - - @ffi.UnsignedInt() - external int cleaned_address; - - @ffi.UnsignedInt() - external int address_filter; - - @ffi.UnsignedInt() - external int sim_slot_no; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_usage _contacts_person_usage view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this person usage view
integer person_id DB record ID of the person
string display_name Display name of the person
string display_name_index The first character of first string for grouping. This is normalized using icu (projection)
integer display_contact_id Display contact ID that the person belongs to (projection)
string ringtone_path Ringtone path of the person (projection)
string image_thumbnail_path Image thumbnail path of the person (projection)
string vibration Vibration path of the person (projection)
string message_alert Message alert path of the person (projection)
boolean is_favorite The person is favorite or not
boolean has_phonenumber The person has phone number or not
boolean has_email The person has email or not
integer usage_type Usage type, refer to the @ref contacts_usage_type_e
integer times_used Usage number of person
-final class _contacts_person_usage_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_name_index; - - @ffi.UnsignedInt() - external int display_contact_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int vibration; - - @ffi.UnsignedInt() - external int is_favorite; - - @ffi.UnsignedInt() - external int has_phonenumber; - - @ffi.UnsignedInt() - external int has_email; - - @ffi.UnsignedInt() - external int usage_type; - - @ffi.UnsignedInt() - external int times_used; - - @ffi.UnsignedInt() - external int message_alert; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact_number _contacts_contact_number view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this contacts number view
integercontact_id Contact ID that the number belongs to
stringdisplay_name Display name of contact that the number belongs to
integerdisplay_source_type The source type of display name, refer to the @ref contacts_display_name_source_type_e (projection)
integeraddress_book_id Addressbook ID that the number belongs to
integerperson_id Person ID that the number belongs to
stringringtone_path Ringtone path that the number belongs to (projection)
stringimage_thumbnail_path Image thumbnail path that the number belongs to (projection)
integer number_id DB record ID of the number
integer type Number type, refer to the @ref contacts_number_type_e (projection)
string label Custom number type label, when the number type is #CONTACTS_NUMBER_TYPE_CUSTOM (projection)
boolean is_default The number is default number or not
string number Number
string number_filter If you add filter with this property, the string will be normalized as minmatch length internally and the match rule will be applied CONTACTS_MATCH_EXACTLY
string normalized_number You can only use this property for search filter
string cleaned_number You can only use this property for search filter
-final class _contacts_contact_number_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_source_type; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int number_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; - - @ffi.UnsignedInt() - external int is_default; - - @ffi.UnsignedInt() - external int number; - - @ffi.UnsignedInt() - external int number_filter; - - @ffi.UnsignedInt() - external int normalized_number; - - @ffi.UnsignedInt() - external int cleaned_number; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact_email _contacts_contact_email view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this contacts email view
integercontact_id Contact ID that the email belongs to
stringdisplay_name Display name that the email belongs to
integerdisplay_source_type The source type of display name that the email belongs to (projection)
integeraddress_book_id Addressbook ID that the email belongs to
integerperson_id Person ID that the email belongs to
stringringtone_path Ringtone path that the email belongs to (projection)
stringimage_thumbnail_path Image thumbnail path that the email belongs to (projection)
integer email_id DB record ID of the email
integer type Email type, refer to the @ref contacts_email_type_e (projection)
string label Custom mail type label, when the email type is #CONTACTS_EMAIL_TYPE_CUSTOM (projection)
boolean is_default Email is default email or not
string email Email address
-final class _contacts_contact_email_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_source_type; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int email_id; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; - - @ffi.UnsignedInt() - external int is_default; - - @ffi.UnsignedInt() - external int email; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact_grouprel _contacts_contact_grouprel view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this contact grouprel view
integercontact_id Contact ID that the contact group relation belongs to
stringdisplay_name Display name of the group relation
integerdisplay_source_type The source type of display name (projection)
integeraddress_book_id Addressbook ID that the group relation belongs to
integerperson_id Person ID that the group relation belongs to
stringringtone_path Ringtone path of the group relation (projection)
stringimage_thumbnail_path Image thumbnail path of the group relation (projection)
integer group_id DB record ID of the group relation
string group_name Group name (projection)
-final class _contacts_contact_grouprel_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_source_type; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int group_id; - - @ffi.UnsignedInt() - external int group_name; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact_activity _contacts_contact_activity view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this contact activity view
integercontact_id Contact ID that the activity belongs to
stringdisplay_name Display name of the contact that the activity belongs to
integerdisplay_source_type The source type of display name that the activity belongs to
integeraddress_book_id Addressbook that the activity belongs to
integerperson_id Person ID that the activity belongs to
stringringtone_path Ringtone path of the contact that the activity belongs to (projection)
stringimage_thumbnail_path Image thumbnail path of the contact that the activity belongs to (projection)
integer activity_id DB record ID of the activity
string source_name Account name that the activity belongs to
string status Activity status (projection)
integer timestamp Published time of activity
string service_operation Data for service_set_operation
string uri Data for service_set_uri
-final class _contacts_contact_activity_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int display_name; - - @ffi.UnsignedInt() - external int display_source_type; - - @ffi.UnsignedInt() - external int address_book_id; - - @ffi.UnsignedInt() - external int account_id; - - @ffi.UnsignedInt() - external int person_id; - - @ffi.UnsignedInt() - external int ringtone_path; - - @ffi.UnsignedInt() - external int image_thumbnail_path; - - @ffi.UnsignedInt() - external int activity_id; - - @ffi.UnsignedInt() - external int source_name; - - @ffi.UnsignedInt() - external int status; - - @ffi.UnsignedInt() - external int timestamp; - - @ffi.UnsignedInt() - external int service_operation; - - @ffi.UnsignedInt() - external int uri; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log_stat _contacts_phone_log_stat view (read only) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDDescription
string_uri Identifier of this log stat view
integer log_count Log count (projection)
integer log_type Log type, see the @ref contacts_phone_log_type_e
integer sim_slot_no It is related to the SIM slot number. sim_slot_no 0 means first SIM card, sim_slot_no 1 means second SIM. It is same with handle index of telephony handle list. Refer to the telephony_init() (Since 3.0)
-final class _contacts_phone_log_stat_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int log_count; - - @ffi.UnsignedInt() - external int log_type; - - @ffi.UnsignedInt() - external int sim_slot_no; -} - -/// @addtogroup CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE View/Property -/// @section CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_sip _contacts_sip view (Since 3.0) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -///
TypeProperty IDRead, WriteDescription
string_uriread only Identifier of this contacts sip view
integer id read only DB record ID of the sip
integer contact_id read, write once Contact ID that the sip belongs to
string address read, write SIP address
integer type read, write sip type, refer to the @ref contacts_sip_type_e
string label read, write Custom sip type label, when the sip type is #CONTACTS_SIP_TYPE_CUSTOM
-final class _contacts_sip_property_ids extends ffi.Struct { - external ffi.Pointer _uri; - - @ffi.UnsignedInt() - external int id; - - @ffi.UnsignedInt() - external int contact_id; - - @ffi.UnsignedInt() - external int address; - - @ffi.UnsignedInt() - external int type; - - @ffi.UnsignedInt() - external int label; -} - -typedef contacts_record_h = ffi.Pointer<__contacts_record_h>; -typedef contacts_list_h = ffi.Pointer<__contacts_list_h>; - -/// @brief Enumeration for Contacts match string flags. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_match_str_flag_e { - /// < Full string, case-sensitive - static const int CONTACTS_MATCH_EXACTLY = 0; - - /// < Full string, case-insensitive - static const int CONTACTS_MATCH_FULLSTRING = 1; - - /// < Sub string, case-insensitive - static const int CONTACTS_MATCH_CONTAINS = 2; - - /// < Start with, case-insensitive - static const int CONTACTS_MATCH_STARTSWITH = 3; - - /// < End with, case-insensitive - static const int CONTACTS_MATCH_ENDSWITH = 4; - - /// < IS NOT NULL - static const int CONTACTS_MATCH_EXISTS = 5; -} - -/// @brief Enumeration for Contacts match int flags. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_match_int_flag_e { - /// < '=' - static const int CONTACTS_MATCH_EQUAL = 0; - - /// < '>' - static const int CONTACTS_MATCH_GREATER_THAN = 1; - - /// < '>=' - static const int CONTACTS_MATCH_GREATER_THAN_OR_EQUAL = 2; - - /// < '<' - static const int CONTACTS_MATCH_LESS_THAN = 3; - - /// < '<=' - static const int CONTACTS_MATCH_LESS_THAN_OR_EQUAL = 4; - - /// < '<>', this flag can yield poor performance - static const int CONTACTS_MATCH_NOT_EQUAL = 5; - - /// < IS NULL - static const int CONTACTS_MATCH_NONE = 6; -} - -/// @brief Enumeration for Contacts filter operators. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_filter_operator_e { - /// < AND - static const int CONTACTS_FILTER_OPERATOR_AND = 0; - - /// < OR - static const int CONTACTS_FILTER_OPERATOR_OR = 1; -} - -typedef contacts_filter_h = ffi.Pointer<__contacts_filter_h>; -typedef contacts_query_h = ffi.Pointer<__contacts_query_h>; - -/// @brief Enumeration for contact change state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_changed_e { - /// < Inserted - static const int CONTACTS_CHANGE_INSERTED = 0; - - /// < Updated - static const int CONTACTS_CHANGE_UPDATED = 1; - - /// < Deleted - static const int CONTACTS_CHANGE_DELETED = 2; -} - -/// @brief Called when the designated view changes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -/// @param[in] view_uri The view URI -/// @param[in] user_data The user data passed from the callback registration function -/// @pre The callback must be registered using contacts_db_add_changed_cb. -/// @see contacts_db_add_changed_cb() -typedef contacts_db_changed_cb - = ffi.Pointer>; -typedef contacts_db_changed_cbFunction = ffi.Void Function( - ffi.Pointer view_uri, ffi.Pointer user_data); -typedef Dartcontacts_db_changed_cbFunction = void Function( - ffi.Pointer view_uri, ffi.Pointer user_data); - -/// @brief Enumeration for name display order. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_name_display_order_e { - /// < First name comes at the first - static const int CONTACTS_NAME_DISPLAY_ORDER_FIRSTLAST = 0; - - /// < First name comes at the last - static const int CONTACTS_NAME_DISPLAY_ORDER_LASTFIRST = 1; -} - -/// @brief Enumeration for name sorting order. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_name_sorting_order_e { - /// < Contacts are first sorted based on the first name - static const int CONTACTS_NAME_SORTING_ORDER_FIRSTLAST = 0; - - /// < Contacts are first sorted based on the last name - static const int CONTACTS_NAME_SORTING_ORDER_LASTFIRST = 1; -} - -/// @brief Called when a designated view changes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -/// @param[in] name_display_order The name display order setting value -/// @param[in] user_data The user data passed from the callback registration function -/// @pre The callback must be registered using contacts_setting_add_name_display_order_changed_cb(). -/// contacts_setting_set_name_display_order() must be called to invoke this callback. -/// @see contacts_setting_add_name_display_order_changed_cb() -/// @see contacts_setting_remove_name_display_order_changed_cb() -typedef contacts_setting_name_display_order_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef contacts_setting_name_display_order_changed_cbFunction = ffi.Void - Function(ffi.Int32 name_display_order, ffi.Pointer user_data); -typedef Dartcontacts_setting_name_display_order_changed_cbFunction = void - Function(int name_display_order, ffi.Pointer user_data); - -/// @brief Called when a designated view changes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -/// @param[in] name_sorting_order The name sorting order setting value -/// @param[in] user_data The user data passed from the callback registration function -/// @pre The callback must be registered using contacts_setting_add_name_sorting_order_changed_cb(). -/// contacts_setting_set_name_sorting_order() must be called to invoke this callback. -/// @see contacts_setting_add_name_sorting_order_changed_cb() -/// @see contacts_setting_remove_name_sorting_order_changed_cb() -typedef contacts_setting_name_sorting_order_changed_cb = ffi.Pointer< - ffi.NativeFunction>; -typedef contacts_setting_name_sorting_order_changed_cbFunction = ffi.Void - Function(ffi.Int32 name_sorting_order, ffi.Pointer user_data); -typedef Dartcontacts_setting_name_sorting_order_changed_cbFunction = void - Function(int name_sorting_order, ffi.Pointer user_data); - -/// @brief Enumeration for Contacts person properties. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_person_property_e { - /// < Default contacts record - static const int CONTACTS_PERSON_PROPERTY_NAME_CONTACT = 0; - - /// < Default number record - static const int CONTACTS_PERSON_PROPERTY_NUMBER = 1; - - /// < Default email record - static const int CONTACTS_PERSON_PROPERTY_EMAIL = 2; - - /// < Default image record - static const int CONTACTS_PERSON_PROPERTY_IMAGE = 3; -} - -/// @brief Called whenever a contact is imported. -/// @since_tizen 3.0 -/// @param[in] total The number of contacts that will be imported -/// @param[in] imported_cnt The number of already imported contacts -/// @param[in] user_data The user data passed from the callback registration function -/// @return @c true to continue with the import of contacts -/// otherwise @c false to stop the import of contacts -/// @pre contacts_sim_import_all_contacts_by_sim_slot_no() will invoke this callback. -/// @see contacts_sim_import_all_contacts_by_sim_slot_no() -typedef contacts_sim_import_progress_cb - = ffi.Pointer>; -typedef contacts_sim_import_progress_cbFunction = ffi.Bool Function( - ffi.Int total, ffi.Int imported_cnt, ffi.Pointer user_data); -typedef Dartcontacts_sim_import_progress_cbFunction = bool Function( - int total, int imported_cnt, ffi.Pointer user_data); - -/// @brief Called to get a record handle of @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_contact. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -/// @param[in] record The record handle -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @pre contacts_vcard_parse_to_contact_foreach() will invoke this callback. -/// @see contacts_vcard_parse_to_contact_foreach() -typedef contacts_vcard_parse_cb - = ffi.Pointer>; -typedef contacts_vcard_parse_cbFunction = ffi.Bool Function( - contacts_record_h record, ffi.Pointer user_data); -typedef Dartcontacts_vcard_parse_cbFunction = bool Function( - contacts_record_h record, ffi.Pointer user_data); - -/// @brief Enumeration for contact DB status. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -abstract class contacts_db_status_e { - /// < Normal - static const int CONTACTS_DB_STATUS_NORMAL = 0; - - /// < DB status is Changing collation - static const int CONTACTS_DB_STATUS_CHANGING_COLLATION = 1; -} - -/// @brief Called when contacts-service server status changes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif -/// @param[in] status The current status of server -/// @param[in] user_data The user data passed from the callback registration function -/// @pre This function requires an open connection to contacts service by contacts_connect(). -/// @see contacts_db_add_status_changed_cb() -typedef contacts_db_status_changed_cb - = ffi.Pointer>; -typedef contacts_db_status_changed_cbFunction = ffi.Void Function( - ffi.Int32 status, ffi.Pointer user_data); -typedef Dartcontacts_db_status_changed_cbFunction = void Function( - int status, ffi.Pointer user_data); - -/// @brief Enumeration for language type. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class phone_number_lang_e { - /// < Amharic - static const int PHONE_NUMBER_LANG_AMHARIC = 0; - - /// < Arabic - static const int PHONE_NUMBER_LANG_ARABIC = 1; - - /// < Belarusian - static const int PHONE_NUMBER_LANG_BELARUSIAN = 2; - - /// < Bulgarian - static const int PHONE_NUMBER_LANG_BULGARIAN = 3; - - /// < Chinese - static const int PHONE_NUMBER_LANG_CHINESE = 4; - - /// < Chinese(Traditional) - static const int PHONE_NUMBER_LANG_CHINESE_TRADITIONAL = 5; - - /// < Czech - static const int PHONE_NUMBER_LANG_CZECH = 6; - - /// < Dutch - static const int PHONE_NUMBER_LANG_DUTCH = 7; - - /// < English - static const int PHONE_NUMBER_LANG_ENGLISH = 8; - - /// < Finnish - static const int PHONE_NUMBER_LANG_FINNISH = 9; - - /// < French - static const int PHONE_NUMBER_LANG_FRENCH = 10; - - /// < German - static const int PHONE_NUMBER_LANG_GERMAN = 11; - - /// < Greek - static const int PHONE_NUMBER_LANG_GREEK = 12; - - /// < Hungarian - static const int PHONE_NUMBER_LANG_HUNGARIAN = 13; - - /// < Indonesian - static const int PHONE_NUMBER_LANG_INDONESIAN = 14; - - /// < Italian - static const int PHONE_NUMBER_LANG_ITALIAN = 15; - - /// < Japanese - static const int PHONE_NUMBER_LANG_JAPANESE = 16; - - /// < Korean - static const int PHONE_NUMBER_LANG_KOREAN = 17; - - /// < Northern Sami - static const int PHONE_NUMBER_LANG_NORTHERN_SAMI = 18; - - /// < Persian - static const int PHONE_NUMBER_LANG_PERSIAN = 19; - - /// < Polish - static const int PHONE_NUMBER_LANG_POLISH = 20; - - /// < Portuguese - static const int PHONE_NUMBER_LANG_PORTUGUESE = 21; - - /// < Romanian - static const int PHONE_NUMBER_LANG_ROMANIAN = 22; - - /// < Russian - static const int PHONE_NUMBER_LANG_RUSSIAN = 23; - - /// < Serbian - static const int PHONE_NUMBER_LANG_SERBIAN = 24; - - /// < Spanish - static const int PHONE_NUMBER_LANG_SPANISH = 25; - - /// < Swedish - static const int PHONE_NUMBER_LANG_SWEDISH = 26; - - /// < Thai - static const int PHONE_NUMBER_LANG_THAI = 27; - - /// < Turkish - static const int PHONE_NUMBER_LANG_TURKISH = 28; - - /// < Vietnamese - static const int PHONE_NUMBER_LANG_VIETNAMESE = 29; - - /// < Current System Value (Since 3.0) - static const int PHONE_NUMBER_LANG_SYSTEM = 30; - static const int PHONE_NUMBER_LANG_MAX = 31; -} - -/// @brief Enumeration for region type. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class phone_number_region_e { - /// < Aland Islands - static const int PHONE_NUMBER_REGION_ALAND_ISLANDS = 0; - - /// < Albania - static const int PHONE_NUMBER_REGION_ALBANIA = 1; - - /// < Algeria - static const int PHONE_NUMBER_REGION_ALGERIA = 2; - - /// < American Samoa - static const int PHONE_NUMBER_REGION_AMERICAN_SAMOA = 3; - - /// < Angola - static const int PHONE_NUMBER_REGION_ANGOLA = 4; - - /// < Anguilla - static const int PHONE_NUMBER_REGION_ANGUILLA = 5; - - /// < Argentina - static const int PHONE_NUMBER_REGION_ARGENTINA = 6; - - /// < Armenia - static const int PHONE_NUMBER_REGION_ARMENIA = 7; - - /// < Ascension Island - static const int PHONE_NUMBER_REGION_ASCENSION_ISLAND = 8; - - /// < Atigua and Barbuda - static const int PHONE_NUMBER_REGION_ATIGUA_AND_BARBUDA = 9; - - /// < Austria - static const int PHONE_NUMBER_REGION_AUSTRIA = 10; - - /// < Bahamas - static const int PHONE_NUMBER_REGION_BAHAMAS = 11; - - /// < Barbados - static const int PHONE_NUMBER_REGION_BARBADOS = 12; - - /// < Belarus - static const int PHONE_NUMBER_REGION_BELARUS = 13; - - /// < Belgium - static const int PHONE_NUMBER_REGION_BELGIUM = 14; - - /// < Benin - static const int PHONE_NUMBER_REGION_BENIN = 15; - - /// < Bermuda - static const int PHONE_NUMBER_REGION_BERMUDA = 16; - - /// < Bonaire Sint Eustatius and Saba - static const int PHONE_NUMBER_REGION_BONAIRE_SINT_EUSTATIUS_AND_SABA = 17; - - /// < Botswana - static const int PHONE_NUMBER_REGION_BOTSWANA = 18; - - /// < Brazil - static const int PHONE_NUMBER_REGION_BRAZIL = 19; - - /// < Bulgaria - static const int PHONE_NUMBER_REGION_BULGARIA = 20; - - /// < Burkina Faso - static const int PHONE_NUMBER_REGION_BURKINA_FASO = 21; - - /// < Burundi - static const int PHONE_NUMBER_REGION_BURUNDI = 22; - - /// < Cabo Verde - static const int PHONE_NUMBER_REGION_CABO_VERDE = 23; - - /// < Cameroon - static const int PHONE_NUMBER_REGION_CAMEROON = 24; - - /// < Canada - static const int PHONE_NUMBER_REGION_CANADA = 25; - - /// < Cayman Island - static const int PHONE_NUMBER_REGION_CAYMAN_ISLAND = 26; - - /// < Chile - static const int PHONE_NUMBER_REGION_CHILE = 27; - - /// < China - static const int PHONE_NUMBER_REGION_CHINA = 28; - - /// < Colombia - static const int PHONE_NUMBER_REGION_COLOMBIA = 29; - - /// < Comoros - static const int PHONE_NUMBER_REGION_COMOROS = 30; - - /// < Congo - static const int PHONE_NUMBER_REGION_CONGO = 31; - - /// < Cote d'Ivoire - static const int PHONE_NUMBER_REGION_COTE_D_IVOIRE = 32; - - /// < Cuba - static const int PHONE_NUMBER_REGION_CUBA = 33; - - /// < Curacao - static const int PHONE_NUMBER_REGION_CURACAO = 34; - - /// < Czech Republic - static const int PHONE_NUMBER_REGION_CZECH_REPUBLIC = 35; - - /// < Congo (Democratic Republic of the) - static const int PHONE_NUMBER_REGION_DEMOCRATIC_REPUBLIC_OF_THE_CONGO = 36; - - /// < Dominica - static const int PHONE_NUMBER_REGION_DOMINICA = 37; - - /// < Domoinican Republic - static const int PHONE_NUMBER_REGION_DOMINICAN_REPUBLIC = 38; - - /// < Egypt - static const int PHONE_NUMBER_REGION_EGYPT = 39; - - /// < Estonia - static const int PHONE_NUMBER_REGION_ESTONIA = 40; - - /// < Ethiopia - static const int PHONE_NUMBER_REGION_ETHIOPIA = 41; - - /// < Finland - static const int PHONE_NUMBER_REGION_FINLAND = 42; - - /// < France - static const int PHONE_NUMBER_REGION_FRANCE = 43; - - /// < Gabon - static const int PHONE_NUMBER_REGION_GABON = 44; - - /// < Gambia - static const int PHONE_NUMBER_REGION_GAMBIA = 45; - - /// < Germany - static const int PHONE_NUMBER_REGION_GERMANY = 46; - - /// < Ghana - static const int PHONE_NUMBER_REGION_GHANA = 47; - - /// < Greece - static const int PHONE_NUMBER_REGION_GREECE = 48; - - /// < Greenland - static const int PHONE_NUMBER_REGION_GREENLAND = 49; - - /// < Grenada - static const int PHONE_NUMBER_REGION_GRENADA = 50; - - /// < Guam - static const int PHONE_NUMBER_REGION_GUAM = 51; - - /// < Guernsey - static const int PHONE_NUMBER_REGION_GUERNSEY = 52; - - /// < Guinea - static const int PHONE_NUMBER_REGION_GUINEA = 53; - - /// < Guinea-Bissau - static const int PHONE_NUMBER_REGION_GUINEA_BISSAU = 54; - - /// < Hungary - static const int PHONE_NUMBER_REGION_HUNGARY = 55; - - /// < Iceland - static const int PHONE_NUMBER_REGION_ICELAND = 56; - - /// < India - static const int PHONE_NUMBER_REGION_INDIA = 57; - - /// < Indonesia - static const int PHONE_NUMBER_REGION_INDONESIA = 58; - - /// < Ireland - static const int PHONE_NUMBER_REGION_IRELAND = 59; - - /// < Iran (Islamic Republic of) - static const int PHONE_NUMBER_REGION_ISLAMIC_REPUBLIC_OF_IRAN = 60; - - /// < Isle of Man - static const int PHONE_NUMBER_REGION_ISLE_OF_MAN = 61; - - /// < Italy - static const int PHONE_NUMBER_REGION_ITALY = 62; - - /// < Jamaica - static const int PHONE_NUMBER_REGION_JAMAICA = 63; - - /// < Japan - static const int PHONE_NUMBER_REGION_JAPAN = 64; - - /// < Jersey - static const int PHONE_NUMBER_REGION_JERSEY = 65; - - /// < Jordan - static const int PHONE_NUMBER_REGION_JORDAN = 66; - - /// < Kazakhstan - static const int PHONE_NUMBER_REGION_KAZAKHSTAN = 67; - - /// < Kenya - static const int PHONE_NUMBER_REGION_KENYA = 68; - - /// < Kiribati - static const int PHONE_NUMBER_REGION_KIRIBATI = 69; - - /// < Latvia - static const int PHONE_NUMBER_REGION_LATVIA = 70; - - /// < Lesotho - static const int PHONE_NUMBER_REGION_LESOTHO = 71; - - /// < Lithuania - static const int PHONE_NUMBER_REGION_LITHUANIA = 72; - - /// < Luxembourg - static const int PHONE_NUMBER_REGION_LUXEMBOURG = 73; - - /// < Madagascar - static const int PHONE_NUMBER_REGION_MADAGASCAR = 74; - - /// < Mauritania - static const int PHONE_NUMBER_REGION_MAURITANIA = 75; - - /// < Maritius - static const int PHONE_NUMBER_REGION_MAURITIUS = 76; - - /// < Montserrat - static const int PHONE_NUMBER_REGION_MONTSERRAT = 77; - - /// < Morocco - static const int PHONE_NUMBER_REGION_MOROCCO = 78; - - /// < Mazambique - static const int PHONE_NUMBER_REGION_MOZAMBIQUE = 79; - - /// < Namibia - static const int PHONE_NUMBER_REGION_NAMIBIA = 80; - - /// < Netherlands - static const int PHONE_NUMBER_REGION_NETHERLANDS = 81; - - /// < Nigeria - static const int PHONE_NUMBER_REGION_NIGERIA = 82; - - /// < Northern Mariana Island - static const int PHONE_NUMBER_REGION_NORTHERN_MARIANA_ISLANDS = 83; - - /// < Norway - static const int PHONE_NUMBER_REGION_NORWAY = 84; - - /// < Peru - static const int PHONE_NUMBER_REGION_PERU = 85; - - /// < Poland - static const int PHONE_NUMBER_REGION_POLAND = 86; - - /// < Portugal - static const int PHONE_NUMBER_REGION_PORTUGAL = 87; - - /// < Puerto Rico - static const int PHONE_NUMBER_REGION_PUERTO_RICO = 88; - - /// < Korea (Republic of) - static const int PHONE_NUMBER_REGION_REPUBLIC_OF_KOREA = 89; - - /// < Moldova (Republic of) - static const int PHONE_NUMBER_REGION_REPUBLIC_OF_MOLDOVA = 90; - - /// < Romania - static const int PHONE_NUMBER_REGION_ROMANIA = 91; - - /// < Russian Federation - static const int PHONE_NUMBER_REGION_RUSSIAN_FEDERATION = 92; - - /// < Saint Helena, Ascension and Tristan da Cunha - static const int PHONE_NUMBER_REGION_SAINT_HELENA = 93; - - /// < Saint Kitts and Nevis - static const int PHONE_NUMBER_REGION_SAINT_KITTS_AND_NEVIS = 94; - - /// < Saint Lucia - static const int PHONE_NUMBER_REGION_SAINT_LUCIA = 95; - - /// < Saint Vincent and the Grenadines - static const int PHONE_NUMBER_REGION_SAINT_VINCENT_AND_THE_GRENADINES = 96; - - /// < Sao Tome and Principe - static const int PHONE_NUMBER_REGION_SAO_TOME_AND_PRINCIPE = 97; - - /// < Saudi Arabia - static const int PHONE_NUMBER_REGION_SAUDI_ARABIA = 98; - - /// < Senegal - static const int PHONE_NUMBER_REGION_SENEGAL = 99; - - /// < Serbia - static const int PHONE_NUMBER_REGION_SERBIA = 100; - - /// < Sierra Leone - static const int PHONE_NUMBER_REGION_SIERRA_LEONE = 101; - - /// < Sint maarten (Dutch part) - static const int PHONE_NUMBER_REGION_SINT_MAARTEN = 102; - - /// < Slovakia - static const int PHONE_NUMBER_REGION_SLOVAKIA = 103; - - /// < Somalia - static const int PHONE_NUMBER_REGION_SOMALIA = 104; - - /// < South Africa - static const int PHONE_NUMBER_REGION_SOUTH_AFRICA = 105; - - /// < Spain - static const int PHONE_NUMBER_REGION_SPAIN = 106; - - /// < Sri Lanka - static const int PHONE_NUMBER_REGION_SRI_LANKA = 107; - - /// < Sudan - static const int PHONE_NUMBER_REGION_SUDAN = 108; - - /// < Svalbard and Jan Mayen - static const int PHONE_NUMBER_REGION_SVALBARD_AND_JAN_MAYEN = 109; - - /// < Swaziland - static const int PHONE_NUMBER_REGION_SWAZILAND = 110; - - /// < Sweden - static const int PHONE_NUMBER_REGION_SWEDEN = 111; - - /// < Switzerland - static const int PHONE_NUMBER_REGION_SWITZERLAND = 112; - - /// < Taiwan Province of China - static const int PHONE_NUMBER_REGION_TAIWAN_PROVINCE_OF_CHINA = 113; - - /// < Thailand - static const int PHONE_NUMBER_REGION_THAILAND = 114; - - /// < Macedonia (the Former Yugoslav Republic of) - static const int - PHONE_NUMBER_REGION_THE_FORMER_YUGOSLAV_REPUBLIC_OF_MACEDONIA = 115; - - /// < Togo - static const int PHONE_NUMBER_REGION_TOGO = 116; - - /// < Trinidad and Tobago - static const int PHONE_NUMBER_REGION_TRINIDAD_AND_TOBAGO = 117; - - /// < Tristan da Cunha - static const int PHONE_NUMBER_REGION_TRISTAN_DA_CUNHA = 118; - - /// < Tunisia - static const int PHONE_NUMBER_REGION_TUNISIA = 119; - - /// < Turkey - static const int PHONE_NUMBER_REGION_TURKEY = 120; - - /// < Turks and Caicos Islands - static const int PHONE_NUMBER_REGION_TURKS_AND_CAICOS_ISLANDS = 121; - - /// < Uganda - static const int PHONE_NUMBER_REGION_UGANDA = 122; - - /// < United Kingdom - static const int PHONE_NUMBER_REGION_UNITED_KINGDOM = 123; - - /// < United States of America - static const int PHONE_NUMBER_REGION_UNITED_STATES_OF_AMERICA = 124; - - /// < Venezuela - static const int PHONE_NUMBER_REGION_VENEZUELA = 125; - - /// < Viet Nam - static const int PHONE_NUMBER_REGION_VIET_NAM = 126; - - /// < Virgin Island (British) - static const int PHONE_NUMBER_REGION_VIRGIN_ISLAND_BRITISH = 127; - - /// < Virgin Island (U.S.) - static const int PHONE_NUMBER_REGION_VIRGIN_ISLAND_US = 128; - - /// < Western Sahara - static const int PHONE_NUMBER_REGION_WESTERN_SAHARA = 129; - - /// < Zambia - static const int PHONE_NUMBER_REGION_ZAMBIA = 130; - - /// < Zimbabwe - static const int PHONE_NUMBER_REGION_ZIMBABWE = 131; - - /// < Andorra (Since 3.0) - static const int PHONE_NUMBER_REGION_ANDORRA = 132; - - /// < United Arab Emirates (Since 3.0) - static const int PHONE_NUMBER_REGION_UNITED_ARAB_EMIRATES = 133; - - /// < Afghanistan (Since 3.0) - static const int PHONE_NUMBER_REGION_AFGHANISTAN = 134; - - /// < Australia (Since 3.0) - static const int PHONE_NUMBER_REGION_AUSTRALIA = 135; - - /// < Aruba (Since 3.0) - static const int PHONE_NUMBER_REGION_ARUBA = 136; - - /// < Azerbaijan (Since 3.0) - static const int PHONE_NUMBER_REGION_AZERBAIJAN = 137; - - /// < Bosnia and Herzegovina (Since 3.0) - static const int PHONE_NUMBER_REGION_BOSNIA_AND_HERZEGOVINA = 138; - - /// < Bangladesh (Since 3.0) - static const int PHONE_NUMBER_REGION_BANGLADESH = 139; - - /// < Bahrain (Since 3.0) - static const int PHONE_NUMBER_REGION_BAHRAIN = 140; - - /// < Saint Barthelemy, French Antilles (Since 3.0) - static const int PHONE_NUMBER_REGION_SAINT_BARTHELEMY = 141; - - /// < Brunei Darussalam (Since 3.0) - static const int PHONE_NUMBER_REGION_BRUNEI_DARUSSALAM = 142; - - /// < Bolivia (Since 3.0) - static const int PHONE_NUMBER_REGION_BOLIVIA = 143; - - /// < Bhutan (Since 3.0) - static const int PHONE_NUMBER_REGION_BHUTAN = 144; - - /// < Belize (Since 3.0) - static const int PHONE_NUMBER_REGION_BELIZE = 145; - - /// < Cocos Islands (Since 3.0) - static const int PHONE_NUMBER_REGION_COCOS_ISLANDS = 146; - - /// < Central African Republic (Since 3.0) - static const int PHONE_NUMBER_REGION_CENTRAL_AFRICAN_REPUBLIC = 147; - - /// < Cook Islands (Since 3.0) - static const int PHONE_NUMBER_REGION_COOK_ISLANDS = 148; - - /// < Costa Rica (Since 3.0) - static const int PHONE_NUMBER_REGION_COSTA_RICA = 149; - - /// < Christmas Islands (Since 3.0) - static const int PHONE_NUMBER_REGION_CHRISTMAS_ISLANDS = 150; - - /// < Cyprus (Since 3.0) - static const int PHONE_NUMBER_REGION_CYPRUS = 151; - - /// < Djibouti (Since 3.0) - static const int PHONE_NUMBER_REGION_DJIBOUTI = 152; - - /// < Denmark (Since 3.0) - static const int PHONE_NUMBER_REGION_DENMARK = 153; - - /// < Ecuador (Since 3.0) - static const int PHONE_NUMBER_REGION_ECUADOR = 154; - - /// < Eritrea (Since 3.0) - static const int PHONE_NUMBER_REGION_ERITREA = 155; - - /// < Fiji (Since 3.0) - static const int PHONE_NUMBER_REGION_FIJI = 156; - - /// < Falkland Islands (Since 3.0) - static const int PHONE_NUMBER_REGION_FALKLAND_ISLANDS = 157; - - /// < Micronesia, Federated States of (Since 3.0) - static const int PHONE_NUMBER_REGION_MICRONESIA = 158; - - /// < Faroe Islands (Since 3.0) - static const int PHONE_NUMBER_REGION_FAROE_ISLANDS = 159; - - /// < Georgia (Since 3.0) - static const int PHONE_NUMBER_REGION_GEORGIA = 160; - - /// < French Guiana (Since 3.0) - static const int PHONE_NUMBER_REGION_FRENCH_GUIANA = 161; - - /// < Gibraltar (Since 3.0) - static const int PHONE_NUMBER_REGION_GIBRALTAR = 162; - - /// < Guadeloupe (Since 3.0) - static const int PHONE_NUMBER_REGION_GUADELOUPE = 163; - - /// < Equatorial Guinea (Since 3.0) - static const int PHONE_NUMBER_REGION_EQUATORIAL_GUINEA = 164; - - /// < Guatemala (Since 3.0) - static const int PHONE_NUMBER_REGION_GUATEMALA = 165; - - /// < Guyana (Since 3.0) - static const int PHONE_NUMBER_REGION_GUYANA = 166; - - /// < Hong Kong (Since 3.0) - static const int PHONE_NUMBER_REGION_HONG_KONG = 167; - - /// < Honduras (Since 3.0) - static const int PHONE_NUMBER_REGION_HONDURAS = 168; - - /// < Croatia (Since 3.0) - static const int PHONE_NUMBER_REGION_CROATIA = 169; - - /// < Haiti (Since 3.0) - static const int PHONE_NUMBER_REGION_HAITI = 170; - - /// < Israel (Since 3.0) - static const int PHONE_NUMBER_REGION_ISRAEL = 171; - - /// < British Indian Ocean Territory / Diego Garcia (Since 3.0) - static const int PHONE_NUMBER_REGION_DIEGO_GARCIA = 172; - - /// < Iraq (Since 3.0) - static const int PHONE_NUMBER_REGION_IRAQ = 173; - - /// < Kyrgyzstan (Since 3.0) - static const int PHONE_NUMBER_REGION_KYRGYZSTAN = 174; - - /// < Cambodia (Since 3.0) - static const int PHONE_NUMBER_REGION_CAMBODIA = 175; - - /// < Korea, Dem. People's Rep. of (Since 3.0) - static const int PHONE_NUMBER_REGION_NORTH_KOREA = 176; - - /// < Kuwait (Since 3.0) - static const int PHONE_NUMBER_REGION_KUWAIT = 177; - - /// < Lao People's Dem. Rep. (Since 3.0) - static const int PHONE_NUMBER_REGION_LAOS = 178; - - /// < Lebanon (Since 3.0) - static const int PHONE_NUMBER_REGION_LEBANON = 179; - - /// < Liechtenstein (Since 3.0) - static const int PHONE_NUMBER_REGION_LIECHTENSTEIN = 180; - - /// < Liberia (Since 3.0) - static const int PHONE_NUMBER_REGION_LIBERIA = 181; - - /// < Libya (Soc. People's Libyan Arab Jamahiriya) (Since 3.0) - static const int PHONE_NUMBER_REGION_LIBYA = 182; - - /// < Monaco (Since 3.0) - static const int PHONE_NUMBER_REGION_MONACO = 183; - - /// < Montenegro (Since 3.0) - static const int PHONE_NUMBER_REGION_MONTENEGRO = 184; - - /// < Saint-Martin, French Antilles (Since 3.0) - static const int PHONE_NUMBER_REGION_SAINT_MARTIN = 185; - - /// < Marshall Islands (Since 3.0) - static const int PHONE_NUMBER_REGION_MARSHALL_ISLANDS = 186; - - /// < Mali (Since 3.0) - static const int PHONE_NUMBER_REGION_MALI = 187; - - /// < Myanmar (Since 3.0) - static const int PHONE_NUMBER_REGION_MYANMAR = 188; - - /// < Mongolia (Since 3.0) - static const int PHONE_NUMBER_REGION_MONGOLIA = 189; - - /// < Macao, China (Since 3.0) - static const int PHONE_NUMBER_REGION_MACAO = 190; - - /// < Martinique (French Dept. of) (Since 3.0) - static const int PHONE_NUMBER_REGION_MARTINIQUE = 191; - - /// < Malta (Since 3.0) - static const int PHONE_NUMBER_REGION_MALTA = 192; - - /// < Maldives (Since 3.0) - static const int PHONE_NUMBER_REGION_MALDIVES = 193; - - /// < Malawi (Since 3.0) - static const int PHONE_NUMBER_REGION_MALAWI = 194; - - /// < Mexico (Since 3.0) - static const int PHONE_NUMBER_REGION_MEXICO = 195; - - /// < Malaysia (Since 3.0) - static const int PHONE_NUMBER_REGION_MALAYSIA = 196; - - /// < New Caledonia (Territoire francais d'outre-mer) (Since 3.0) - static const int PHONE_NUMBER_REGION_NEW_CALEDONIA = 197; - - /// < Niger (Since 3.0) - static const int PHONE_NUMBER_REGION_NIGER = 198; - - /// < Norfolk Island (Since 3.0) - static const int PHONE_NUMBER_REGION_NORFOLK_ISLAND = 199; - - /// < Nicaragua (Since 3.0) - static const int PHONE_NUMBER_REGION_NICARAGUA = 200; - - /// < Nepal (Since 3.0) - static const int PHONE_NUMBER_REGION_NEPAL = 201; - - /// < Nauru (Since 3.0) - static const int PHONE_NUMBER_REGION_NAURU = 202; - - /// < Niue (Since 3.0) - static const int PHONE_NUMBER_REGION_NIUE = 203; - - /// < New Zealand (Since 3.0) - static const int PHONE_NUMBER_REGION_NEW_ZEALAND = 204; - - /// < Oman (Since 3.0) - static const int PHONE_NUMBER_REGION_OMAN = 205; - - /// < Panama (Since 3.0) - static const int PHONE_NUMBER_REGION_PANAMA = 206; - - /// < French Polynesia (Tahiti) (Territoire francais d'outre-mer) (Since 3.0) - static const int PHONE_NUMBER_REGION_FRENCH_POLYNESIA = 207; - - /// < Papua New Guinea (Since 3.0) - static const int PHONE_NUMBER_REGION_PAPUA_NEW_GUINEA = 208; - - /// < Philippines (Since 3.0) - static const int PHONE_NUMBER_REGION_PHILIPPINES = 209; - - /// < Pakistan (Since 3.0) - static const int PHONE_NUMBER_REGION_PAKISTAN = 210; - - /// < Saint Pierre and Miquelon (Collectivite territoriale de la Republique francaise) (Since 3.0) - static const int PHONE_NUMBER_REGION_SAINT_PIERRE_AND_MIQUELON = 211; - - /// < Palestinian Authority (Since 3.0) - static const int PHONE_NUMBER_REGION_PALESTINIAN_AUTHORITY = 212; - - /// < Palau (Since 3.0) - static const int PHONE_NUMBER_REGION_PALAU = 213; - - /// < Paraguay (Since 3.0) - static const int PHONE_NUMBER_REGION_PARAGUAY = 214; - - /// < Qatar (Since 3.0) - static const int PHONE_NUMBER_REGION_QATAR = 215; - - /// < Reunion (French Departments and Territories in the Indian Ocean) (Since 3.0) - static const int PHONE_NUMBER_REGION_REUNION = 216; - - /// < Rwanda (Since 3.0) - static const int PHONE_NUMBER_REGION_RWANDA = 217; - - /// < Solomon Islands (Since 3.0) - static const int PHONE_NUMBER_REGION_SOLOMON_ISLANDS = 218; - - /// < Seychelles (Since 3.0) - static const int PHONE_NUMBER_REGION_SEYCHELLES = 219; - - /// < Singapore (Since 3.0) - static const int PHONE_NUMBER_REGION_SINGAPORE = 220; - - /// < Slovenia (Since 3.0) - static const int PHONE_NUMBER_REGION_SLOVENIA = 221; - - /// < San Marino (Since 3.0) - static const int PHONE_NUMBER_REGION_SAN_MARINO = 222; - - /// < Suriname (Since 3.0) - static const int PHONE_NUMBER_REGION_SURINAME = 223; - - /// < South Sudan (Since 3.0) - static const int PHONE_NUMBER_REGION_SOUTH_SUDAN = 224; - - /// < El Salvador (Since 3.0) - static const int PHONE_NUMBER_REGION_EL_SALVADOR = 225; - - /// < Syrian Arab Republic (Since 3.0) - static const int PHONE_NUMBER_REGION_SYRIAN_ARAB_REPUBLIC = 226; - - /// < Chad (Since 3.0) - static const int PHONE_NUMBER_REGION_CHAD = 227; - - /// < Tajikistan (Since 3.0) - static const int PHONE_NUMBER_REGION_TAJIKISTAN = 228; - - /// < Tokelau (Since 3.0) - static const int PHONE_NUMBER_REGION_TOKELAU = 229; - - /// < Timor-Leste (East Timor) (Since 3.0) - static const int PHONE_NUMBER_REGION_TIMOR_LESTE = 230; - - /// < Turkmenistan (Since 3.0) - static const int PHONE_NUMBER_REGION_TURKMENISTAN = 231; - - /// < Tonga (Since 3.0) - static const int PHONE_NUMBER_REGION_TONGA = 232; - - /// < Tuvalu (Since 3.0) - static const int PHONE_NUMBER_REGION_TUVALU = 233; - - /// < Tanzania (Since 3.0) - static const int PHONE_NUMBER_REGION_TANZANIA = 234; - - /// < Ukraine (Since 3.0) - static const int PHONE_NUMBER_REGION_UKRAINE = 235; - - /// < Uruguay (Since 3.0) - static const int PHONE_NUMBER_REGION_URUGUAY = 236; - - /// < Uzbekistan (Since 3.0) - static const int PHONE_NUMBER_REGION_UZBEKISTAN = 237; - - /// < Vatican City (Since 3.0) - static const int PHONE_NUMBER_REGION_VATICAN_CITY = 238; - - /// < Vanuatu (Since 3.0) - static const int PHONE_NUMBER_REGION_VANUATU = 239; - - /// < Wallis and Futuna (Territoire francais d'outre-mer) (Since 3.0) - static const int PHONE_NUMBER_REGION_WALLIS_AND_FUTUNA = 240; - - /// < Samoa (Since 3.0) - static const int PHONE_NUMBER_REGION_SAMOA = 241; - - /// < Yemen (Since 3.0) - static const int PHONE_NUMBER_REGION_YEMEN = 242; - - /// < Mayotte (Since 3.0) - static const int PHONE_NUMBER_REGION_MAYOTTE = 243; - - /// < Current System Value (Since 3.0) - static const int PHONE_NUMBER_REGION_SYSTEM = 244; - static const int PHONE_NUMBER_REGION_MAX = 245; -} - -/// @brief Enumeration for match type. -/// @since_tizen 4.0 -abstract class phone_number_blocking_rule_match_type_e { - /// < Exact match - static const int PHONE_NUMBER_MATCH_TYPE_EXACTLY = 0; - - /// < Includes - static const int PHONE_NUMBER_MATCH_TYPE_INCLUDES = 1; - - /// < Starts with - static const int PHONE_NUMBER_MATCH_TYPE_STARTS_WITH = 2; - - /// < Ends with - static const int PHONE_NUMBER_MATCH_TYPE_ENDS_WITH = 3; -} - -/// @brief Enumeration for phone number errors. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class phone_number_error_e { - /// < Successful - static const int PHONE_NUMBER_ERROR_NONE = 0; - - /// < I/O Error - static const int PHONE_NUMBER_ERROR_IO_ERROR = -5; - - /// < Out of memory - static const int PHONE_NUMBER_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid parameter - static const int PHONE_NUMBER_ERROR_INVALID_PARAMETER = -22; - - /// < FS Full - static const int PHONE_NUMBER_ERROR_FILE_NO_SPACE_ON_DEVICE = -28; - - /// < Permission denied - static const int PHONE_NUMBER_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported - static const int PHONE_NUMBER_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Requested data does not exist - static const int PHONE_NUMBER_ERROR_NO_DATA = -61; - - /// < Internal error (Since 3.0) - static const int PHONE_NUMBER_ERROR_SYSTEM = -33685265; - - /// < No access to the database (Since 4.0) - static const int PHONE_NUMBER_ERROR_DB_FAILED = -33685502; - - /// < Unknown IPC error (Since 4.0) - static const int PHONE_NUMBER_ERROR_IPC = -33685313; -} - -/// @brief The blocking rule handle. -/// @since_tizen 4.0 -typedef phone_number_blocking_rule_h = ffi.Pointer; - -/// @brief Enumeration for device's error code. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class device_error_e { - /// < Successful - static const int DEVICE_ERROR_NONE = 0; - - /// < Operation not permitted - static const int DEVICE_ERROR_OPERATION_FAILED = -1; - - /// < Permission denied - static const int DEVICE_ERROR_PERMISSION_DENIED = -13; - - /// < Invalid parameter - static const int DEVICE_ERROR_INVALID_PARAMETER = -22; - - /// < Operation already in progress - static const int DEVICE_ERROR_ALREADY_IN_PROGRESS = -114; - - /// < Not supported in this device - static const int DEVICE_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Device or resource busy - static const int DEVICE_ERROR_RESOURCE_BUSY = -16; - - /// < Not initialized - static const int DEVICE_ERROR_NOT_INITIALIZED = -37748717; -} - -/// @brief Enumeration for the battery level status. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class device_battery_level_e { - /// < The battery goes empty. Prepare for the safe termination of the application, because the device starts a shutdown process soon after entering this level. - static const int DEVICE_BATTERY_LEVEL_EMPTY = 0; - - /// < The battery charge is at a critical state. You may have to stop using multimedia features, because they are not guaranteed to work correctly at this battery status. - static const int DEVICE_BATTERY_LEVEL_CRITICAL = 1; - - /// < The battery has little charge left. - static const int DEVICE_BATTERY_LEVEL_LOW = 2; - - /// < The battery status is not to be careful. - static const int DEVICE_BATTERY_LEVEL_HIGH = 3; - - /// < The battery status is fully charged. It means no more charge. - static const int DEVICE_BATTERY_LEVEL_FULL = 4; -} - -/// @brief Enumeration for battery health information. -/// @since_tizen 3.0 -abstract class device_battery_health_e { - /// < The battery health is good - static const int DEVICE_BATTERY_HEALTH_GOOD = 0; - - /// < The temperature of the battery is cold - static const int DEVICE_BATTERY_HEALTH_COLD = 1; - - /// < The battery is dead - static const int DEVICE_BATTERY_HEALTH_DEAD = 2; - - /// < The temperature of the battery is high - static const int DEVICE_BATTERY_HEALTH_OVER_HEAT = 3; - - /// < The battery is in over voltage state - static const int DEVICE_BATTERY_HEALTH_OVER_VOLTAGE = 4; -} - -/// @brief Enumeration for power source information. -/// @since_tizen 3.0 -abstract class device_battery_power_source_e { - /// < There is no power source - static const int DEVICE_BATTERY_POWER_SOURCE_NONE = 0; - - /// < AC power cable is connected - static const int DEVICE_BATTERY_POWER_SOURCE_AC = 1; - - /// < USB power cable is connected - static const int DEVICE_BATTERY_POWER_SOURCE_USB = 2; - - /// < Power is provided by a wireless source - static const int DEVICE_BATTERY_POWER_SOURCE_WIRELESS = 3; -} - -/// @brief Enumeration for battery property information. -/// @since_tizen 3.0 -abstract class device_battery_property_e { - /// < The battery capacity (0 ~ 100 %) - static const int DEVICE_BATTERY_PROPERTY_CAPACITY = 0; - - /// < The battery current (uA) - static const int DEVICE_BATTERY_PROPERTY_CURRENT_NOW = 1; - - /// < The average battery current (uA) - static const int DEVICE_BATTERY_PROPERTY_CURRENT_AVERAGE = 2; - - /// < The battery voltage (uV) (Since 5.0) - static const int DEVICE_BATTERY_PROPERTY_VOLTAGE_NOW = 3; - - /// < The average battery voltage (uV) (Since 5.0) - static const int DEVICE_BATTERY_PROPERTY_VOLTAGE_AVERAGE = 4; - - /// < The battery temperature (`C) (Since 5.0) - static const int DEVICE_BATTERY_PROPERTY_TEMPERATURE = 5; -} - -/// @brief Enumeration for battery status information. -/// @since_tizen 3.0 -abstract class device_battery_status_e { - /// < Battery is charging - static const int DEVICE_BATTERY_STATUS_CHARGING = 0; - - /// < Battery is discharging - static const int DEVICE_BATTERY_STATUS_DISCHARGING = 1; - - /// < Battery is fully charged - static const int DEVICE_BATTERY_STATUS_FULL = 2; - - /// < Battery is not charging - static const int DEVICE_BATTERY_STATUS_NOT_CHARGING = 3; -} - -/// @brief Enumeration for the device state callback. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class device_callback_e { - /// < Called when a battery charge percentage is changed - static const int DEVICE_CALLBACK_BATTERY_CAPACITY = 0; - - /// < Called when a battery level is changed - static const int DEVICE_CALLBACK_BATTERY_LEVEL = 1; - - /// < Called when battery charging state is changed - static const int DEVICE_CALLBACK_BATTERY_CHARGING = 2; - - /// < Called when a display state is changed - static const int DEVICE_CALLBACK_DISPLAY_STATE = 3; - - /// < Called when a flash brightness is changed (Since Tizen @if Mobile 2.4 @elseif WEARABLE 3.0 @endif) - static const int DEVICE_CALLBACK_FLASH_BRIGHTNESS = 4; - static const int DEVICE_CALLBACK_MAX = 5; -} - -/// @brief Called when a device status is changed. -/// @details Each device callback has a different output param type. \n -/// So you need to check below output param before using this function. \n -/// callback enum output type \n -/// DEVICE_CALLBACK_BATTERY_CAPACITY int \n -/// DEVICE_CALLBACK_BATTERY_LEVEL int \n -/// DEVICE_CALLBACK_BATTERY_CHARGING bool \n -/// DEVICE_CALLBACK_DISPLAY_STATE int \n -/// DEVICE_CALLBACK_FLASH_BRIGHTNESS int -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks DEVICE_CALLBACK_FLASH_BRIGHTNESS callback invoked when user set flash brightness by using device_flash_set_brightness(). It does not work by camera flash operation. To register DEVICE_CALLBACK_FLASH_BRIGHTNESS callback, you need to declare the LED privilege (%http://tizen.org/privilege/led). -/// @param[out] type The device type to monitor -/// @param[out] value The changed value -/// @param[out] user_data The user data passed from the callback registration function -typedef device_changed_cb - = ffi.Pointer>; -typedef device_changed_cbFunction = ffi.Void Function(ffi.Int32 type, - ffi.Pointer value, ffi.Pointer user_data); -typedef Dartdevice_changed_cbFunction = void Function( - int type, ffi.Pointer value, ffi.Pointer user_data); - -/// @brief Enumeration for the available display states. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class display_state_e { - /// < Normal state - static const int DISPLAY_STATE_NORMAL = 0; - - /// < @if TV @internal @endif Screen dim state - static const int DISPLAY_STATE_SCREEN_DIM = 1; - - /// < Screen off state - static const int DISPLAY_STATE_SCREEN_OFF = 2; -} - -/// @brief The haptic device handle. -typedef haptic_device_h = ffi.Pointer; - -/// @brief The haptic effect handle. -typedef haptic_effect_h = ffi.Pointer; - -/// @brief Enumeration for custom LED flags. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class led_custom_flags { - /// < blink LED - static const int LED_CUSTOM_DUTY_ON = 1; - - /// < Default flag - static const int LED_CUSTOM_DEFAULT = 1; -} - -/// @brief Enumeration for lock type. -/// @details Each enum ensures that the suitable device is on until all the lock requests have been released or after a timeout. -/// -/// -/// -/// -/// -///
Enum TypeCPUBrightness(Display)
POWER_LOCK_CPUONOFF
POWER_LOCK_DISPLAYONON(Normal)
POWER_LOCK_DISPLAY_DIMONON(Dim)
-/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks An application can lock the specific type. -/// @remarks These enums are mutually exclusive. -/// @remarks You cannot combine with an enum below. -abstract class power_lock_e { - /// < CPU lock - static const int POWER_LOCK_CPU = 0; - - /// < Display normal lock - static const int POWER_LOCK_DISPLAY = 1; - - /// < Display dim lock - static const int POWER_LOCK_DISPLAY_DIM = 2; -} - -/// @brief Enumeration for Dlog Error. -/// @if MOBILE @since_tizen 2.3 @elseif WEARABLE @since_tizen 2.3.1 @endif -abstract class dlog_error_e { - /// < Successful - static const int DLOG_ERROR_NONE = 0; - - /// < Invalid parameter - static const int DLOG_ERROR_INVALID_PARAMETER = -22; - - /// < Operation not permitted - static const int DLOG_ERROR_NOT_PERMITTED = -1; -} - -/// @brief Enumeration for log priority values in ascending priority order. -/// @if MOBILE @since_tizen 2.3 @elseif WEARABLE @since_tizen 2.3.1 @endif -abstract class log_priority { - /// < Keep this always at the start - static const int DLOG_UNKNOWN = 0; - - /// < Default - static const int DLOG_DEFAULT = 1; - - /// < Verbose - static const int DLOG_VERBOSE = 2; - - /// < Debug - static const int DLOG_DEBUG = 3; - - /// < Info - static const int DLOG_INFO = 4; - - /// < Warning - static const int DLOG_WARN = 5; - - /// < Error - static const int DLOG_ERROR = 6; - - /// < Fatal - static const int DLOG_FATAL = 7; - - /// < Silent - static const int DLOG_SILENT = 8; - - /// < Keep this always at the end. - static const int DLOG_PRIO_MAX = 9; -} - -typedef va_list = __builtin_va_list; -typedef __builtin_va_list = ffi.Pointer; - -/// @brief Enumeration for feedback interface type. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class feedback_type_e { - /// < Feedback type none - static const int FEEDBACK_TYPE_NONE = 0; - - /// < Feedback type for sound - static const int FEEDBACK_TYPE_SOUND = 1; - - /// < Feedback type for vibration - static const int FEEDBACK_TYPE_VIBRATION = 2; - static const int FEEDBACK_TYPE_END = 3; -} - -/// @brief Enumeration for feedback interface of the system pre-defined patterns. -/// @details Each feedback pattern can have separate media files of each types. -/// But depending on vendor design, pattern may not have any type of file. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class feedback_pattern_e { - static const int FEEDBACK_PATTERN_NONE = -1; - - /// < Feedback pattern when general touch - static const int FEEDBACK_PATTERN_TAP = 0; - - /// < Feedback pattern when touch text key - static const int FEEDBACK_PATTERN_SIP = 1; - - /// < Feedback pattern when touch numeric 0 key - static const int FEEDBACK_PATTERN_KEY0 = 6; - - /// < Feedback pattern when touch numeric 1 key - static const int FEEDBACK_PATTERN_KEY1 = 7; - - /// < Feedback pattern when touch numeric 2 key - static const int FEEDBACK_PATTERN_KEY2 = 8; - - /// < Feedback pattern when touch numeric 3 key - static const int FEEDBACK_PATTERN_KEY3 = 9; - - /// < Feedback pattern when touch numeric 4 key - static const int FEEDBACK_PATTERN_KEY4 = 10; - - /// < Feedback pattern when touch numeric 5 key - static const int FEEDBACK_PATTERN_KEY5 = 11; - - /// < Feedback pattern when touch numeric 6 key - static const int FEEDBACK_PATTERN_KEY6 = 12; - - /// < Feedback pattern when touch numeric 7 key - static const int FEEDBACK_PATTERN_KEY7 = 13; - - /// < Feedback pattern when touch numeric 8 key - static const int FEEDBACK_PATTERN_KEY8 = 14; - - /// < Feedback pattern when touch numeric 9 key - static const int FEEDBACK_PATTERN_KEY9 = 15; - - /// < Feedback pattern when touch star key - static const int FEEDBACK_PATTERN_KEY_STAR = 16; - - /// < Feedback pattern when touch sharp key - static const int FEEDBACK_PATTERN_KEY_SHARP = 17; - - /// < Feedback pattern when touch backspace key - static const int FEEDBACK_PATTERN_KEY_BACK = 18; - - /// < Feedback pattern when touch hold - static const int FEEDBACK_PATTERN_HOLD = 19; - - /// < Feedback pattern when press hardware key - static const int FEEDBACK_PATTERN_HW_TAP = 21; - - /// < Feedback pattern when holding press hardware key - static const int FEEDBACK_PATTERN_HW_HOLD = 22; - - /// < Feedback pattern when incoming a message - static const int FEEDBACK_PATTERN_MESSAGE = 23; - - /// < Feedback pattern when incoming an email - static const int FEEDBACK_PATTERN_EMAIL = 25; - - /// < Feedback pattern when alert wake up call - static const int FEEDBACK_PATTERN_WAKEUP = 27; - - /// < Feedback pattern when alert schedule alarm - static const int FEEDBACK_PATTERN_SCHEDULE = 29; - - /// < Feedback pattern when alert timer - static const int FEEDBACK_PATTERN_TIMER = 31; - - /// < Feedback pattern when alert general event - static const int FEEDBACK_PATTERN_GENERAL = 33; - - /// < Feedback pattern when power on - static const int FEEDBACK_PATTERN_POWERON = 36; - - /// < Feedback pattern when power off - static const int FEEDBACK_PATTERN_POWEROFF = 37; - - /// < Feedback pattern when connecting charger - static const int FEEDBACK_PATTERN_CHARGERCONN = 38; - - /// < Feedback pattern when occuring charging error - static const int FEEDBACK_PATTERN_CHARGING_ERROR = 40; - - /// < Feedback pattern when full charged - static const int FEEDBACK_PATTERN_FULLCHARGED = 42; - - /// < Feedback pattern when low battery - static const int FEEDBACK_PATTERN_LOWBATT = 44; - - /// < Feedback pattern when lock - static const int FEEDBACK_PATTERN_LOCK = 46; - - /// < Feedback pattern when unlock - static const int FEEDBACK_PATTERN_UNLOCK = 47; - - /// < Feedback pattern when turn on vibration mode - static const int FEEDBACK_PATTERN_VIBRATION_ON = 55; - - /// < Feedback pattern when turn off silent mode - static const int FEEDBACK_PATTERN_SILENT_OFF = 56; - - /// < Feedback pattern when connecting with bluetooth - static const int FEEDBACK_PATTERN_BT_CONNECTED = 57; - - /// < Feedback pattern when disconnecting with bluetooth - static const int FEEDBACK_PATTERN_BT_DISCONNECTED = 58; - - /// < Feedback pattern when list reorder - static const int FEEDBACK_PATTERN_LIST_REORDER = 62; - - /// < Feedback pattern when list slider sweep - static const int FEEDBACK_PATTERN_LIST_SLIDER = 63; - - /// < Feedback pattern when pressed volume key - static const int FEEDBACK_PATTERN_VOLUME_KEY = 64; - - /// < Feedback pattern for short feedback (Since 4.0) - static const int FEEDBACK_PATTERN_SYSTEM_SHORT = 107; - - /// < Feedback pattern for error (Since 4.0) - static const int FEEDBACK_PATTERN_SYSTEM_ERROR = 108; - - /// < Feedback pattern for long feedback (Since 4.0) - static const int FEEDBACK_PATTERN_SYSTEM_LONG = 112; - - /// < Feedback pattern for normal feedback (Since 4.0) - static const int FEEDBACK_PATTERN_SYSTEM_MID = 113; - - /// < Feedback pattern for end of effect (Since 4.0) - static const int FEEDBACK_PATTERN_END_EFFECT = 117; - - /// < Feedback pattern for strong buzz (Since 4.0) - static const int FEEDBACK_PATTERN_GENERAL_STRONG_BUZZ = 135; - static const int FEEDBACK_PATTERN_END = 10000; -} - -/// @brief Enumeration for the Feedback API error codes. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class feedback_error_e { - /// < Successful - static const int FEEDBACK_ERROR_NONE = 0; - - /// < Operation failed - static const int FEEDBACK_ERROR_OPERATION_FAILED = -1; - - /// < Invalid parameter - static const int FEEDBACK_ERROR_INVALID_PARAMETER = -22; - - /// < Not supported in this device - static const int FEEDBACK_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Permission denied - static const int FEEDBACK_ERROR_PERMISSION_DENIED = -13; - - /// < Not initialized - static const int FEEDBACK_ERROR_NOT_INITIALIZED = -38404095; -} - -/// @brief Enumeration for error codes of a media key. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class media_key_error_e { - /// < Successful - static const int MEDIA_KEY_ERROR_NONE = 0; - - /// < Invalid parameter - static const int MEDIA_KEY_ERROR_INVALID_PARAMETER = -22; - - /// < Reserve/Release failed - static const int MEDIA_KEY_ERROR_OPERATION_FAILED = -37879807; -} - -/// @brief Enumeration for media keys. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class media_key_e { - /// < Play key - static const int MEDIA_KEY_PLAY = 0; - - /// < Stop key - static const int MEDIA_KEY_STOP = 1; - - /// < Pause key - static const int MEDIA_KEY_PAUSE = 2; - - /// < Previous key - static const int MEDIA_KEY_PREVIOUS = 3; - - /// < Next key - static const int MEDIA_KEY_NEXT = 4; - - /// < Fastforward key - static const int MEDIA_KEY_FASTFORWARD = 5; - - /// < Rewind key - static const int MEDIA_KEY_REWIND = 6; - - /// < Playpause key - static const int MEDIA_KEY_PLAYPAUSE = 7; - - /// < Media key for earjack - static const int MEDIA_KEY_MEDIA = 8; - - /// < Unknown key - static const int MEDIA_KEY_UNKNOWN = 9; -} - -/// @brief Enumeration for event statuses of a media key. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class media_key_event_e { - /// < Pressed status - static const int MEDIA_KEY_STATUS_PRESSED = 0; - - /// < Released status - static const int MEDIA_KEY_STATUS_RELEASED = 1; - - /// < Unknown status - static const int MEDIA_KEY_STATUS_UNKNOWN = 2; -} - -/// @brief Called when the status of the media key is changed. -/// -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @param[in] key The key whose status is changed -/// @param[in] status The status of the key -/// @param[in] user_data The user data passed from the callback registration function -/// @pre media_key_reserve() will invoke this callback function. -/// @see media_key_reserve() -/// @see media_key_release() -typedef media_key_event_cb - = ffi.Pointer>; -typedef media_key_event_cbFunction = ffi.Void Function( - ffi.Int32 key, ffi.Int32 status, ffi.Pointer user_data); -typedef Dartmedia_key_event_cbFunction = void Function( - int key, int status, ffi.Pointer user_data); - -/// @brief Enumeration for peripheral-io error. -/// @since_tizen 4.0 -abstract class peripheral_error_e { - /// < Successful - static const int PERIPHERAL_ERROR_NONE = 0; - - /// < I/O error - static const int PERIPHERAL_ERROR_IO_ERROR = -5; - - /// < No such device - static const int PERIPHERAL_ERROR_NO_DEVICE = -6; - - /// < Try again - static const int PERIPHERAL_ERROR_TRY_AGAIN = -11; - - /// < Out of memory - static const int PERIPHERAL_ERROR_OUT_OF_MEMORY = -12; - - /// < Permission denied - static const int PERIPHERAL_ERROR_PERMISSION_DENIED = -13; - - /// < Device or resource busy - static const int PERIPHERAL_ERROR_RESOURCE_BUSY = -16; - - /// < Invalid parameter - static const int PERIPHERAL_ERROR_INVALID_PARAMETER = -22; - - /// < Not supported - static const int PERIPHERAL_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Unknown error - static const int PERIPHERAL_ERROR_UNKNOWN = -1073741824; -} - -/// @brief Enumeration of GPIO direction options. -/// @since_tizen 4.0 -abstract class peripheral_gpio_direction_e { - /// < Input Mode - static const int PERIPHERAL_GPIO_DIRECTION_IN = 0; - - /// < Output mode with high value - static const int PERIPHERAL_GPIO_DIRECTION_OUT_INITIALLY_HIGH = 1; - - /// < Output mode with low value - static const int PERIPHERAL_GPIO_DIRECTION_OUT_INITIALLY_LOW = 2; -} - -/// @brief Enumeration of edge types for the GPIO interrupt. -/// @since_tizen 4.0 -abstract class peripheral_gpio_edge_e { - /// < No interrupt on GPIO - static const int PERIPHERAL_GPIO_EDGE_NONE = 0; - - /// < Interrupt on rising only - static const int PERIPHERAL_GPIO_EDGE_RISING = 1; - - /// < Interrupt on falling only - static const int PERIPHERAL_GPIO_EDGE_FALLING = 2; - - /// < Interrupt on rising & falling - static const int PERIPHERAL_GPIO_EDGE_BOTH = 3; -} - -final class _peripheral_gpio_s extends ffi.Opaque {} - -/// @brief The handle of a GPIO pin. -/// @since_tizen 4.0 -typedef peripheral_gpio_h = ffi.Pointer<_peripheral_gpio_s>; - -/// @platform -/// @brief The GPIO interrupted callback called when the GPIO interrupt is triggered. -/// @details The following errors can be received: \n -/// #PERIPHERAL_ERROR_NONE Successful \n -/// #PERIPHERAL_ERROR_IO_ERROR I/O operation failed \n -/// #PERIPHERAL_ERROR_NO_DEVICE Device does not exist or is removed \n -/// #PERIPHERAL_ERROR_TRY_AGAIN Try again \n -/// #PERIPHERAL_ERROR_OUT_OF_MEMORY Memory allocation failed \n -/// #PERIPHERAL_ERROR_PERMISSION_DENIED Permission denied \n -/// #PERIPHERAL_ERROR_RESOURCE_BUSY Device is in use \n -/// #PERIPHERAL_ERROR_INVALID_PARAMETER Invalid parameter \n -/// #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported \n -/// #PERIPHERAL_ERROR_UNKNOWN Unknown internal error \n -/// @since_tizen 4.0 -/// -/// @param[in] gpio The GPIO handle -/// @param[in] error The GPIO error -/// @param[in] user_data The user data passed from the callback registration function -/// -/// @see peripheral_gpio_set_interrupted_cb() -typedef peripheral_gpio_interrupted_cb - = ffi.Pointer>; -typedef peripheral_gpio_interrupted_cbFunction = ffi.Void Function( - peripheral_gpio_h gpio, ffi.Int32 error, ffi.Pointer user_data); -typedef Dartperipheral_gpio_interrupted_cbFunction = void Function( - peripheral_gpio_h gpio, int error, ffi.Pointer user_data); - -final class _peripheral_i2c_s extends ffi.Opaque {} - -/// @brief The handle of the I2C slave device. -/// @since_tizen 4.0 -typedef peripheral_i2c_h = ffi.Pointer<_peripheral_i2c_s>; - -final class _peripheral_pwm_s extends ffi.Opaque {} - -/// @brief Enumeration for Polarity. -/// @since_tizen 4.0 -abstract class peripheral_pwm_polarity_e { - /// < PWM signal start in the active high state (Normal) - static const int PERIPHERAL_PWM_POLARITY_ACTIVE_HIGH = 0; - - /// < PWM signal start in the active low state (Inversed) - static const int PERIPHERAL_PWM_POLARITY_ACTIVE_LOW = 1; -} - -/// @brief The handle of the PWM peripherals. -/// @since_tizen 4.0 -typedef peripheral_pwm_h = ffi.Pointer<_peripheral_pwm_s>; - -final class _peripheral_adc_s extends ffi.Opaque {} - -/// @brief The handle of the ADC peripherals. -/// @since_tizen 5.0 -typedef peripheral_adc_h = ffi.Pointer<_peripheral_adc_s>; - -final class _peripheral_uart_s extends ffi.Opaque {} - -/// @brief Enumeration for baud rate. -/// @since_tizen 4.0 -abstract class peripheral_uart_baud_rate_e { - /// < The number of signal in one second is 0 - static const int PERIPHERAL_UART_BAUD_RATE_0 = 0; - - /// < The number of signal in one second is 50 - static const int PERIPHERAL_UART_BAUD_RATE_50 = 1; - - /// < The number of signal in one second is 75 - static const int PERIPHERAL_UART_BAUD_RATE_75 = 2; - - /// < The number of signal in one second is 110 - static const int PERIPHERAL_UART_BAUD_RATE_110 = 3; - - /// < The number of signal in one second is 134 - static const int PERIPHERAL_UART_BAUD_RATE_134 = 4; - - /// < The number of signal in one second is 150 - static const int PERIPHERAL_UART_BAUD_RATE_150 = 5; - - /// < The number of signal in one second is 200 - static const int PERIPHERAL_UART_BAUD_RATE_200 = 6; - - /// < The number of signal in one second is 300 - static const int PERIPHERAL_UART_BAUD_RATE_300 = 7; - - /// < The number of signal in one second is 600 - static const int PERIPHERAL_UART_BAUD_RATE_600 = 8; - - /// < The number of signal in one second is 1200 - static const int PERIPHERAL_UART_BAUD_RATE_1200 = 9; - - /// < The number of signal in one second is 1800 - static const int PERIPHERAL_UART_BAUD_RATE_1800 = 10; - - /// < The number of signal in one second is 2400 - static const int PERIPHERAL_UART_BAUD_RATE_2400 = 11; - - /// < The number of signal in one second is 4800 - static const int PERIPHERAL_UART_BAUD_RATE_4800 = 12; - - /// < The number of signal in one second is 9600 - static const int PERIPHERAL_UART_BAUD_RATE_9600 = 13; - - /// < The number of signal in one second is 19200 - static const int PERIPHERAL_UART_BAUD_RATE_19200 = 14; - - /// < The number of signal in one second is 38400 - static const int PERIPHERAL_UART_BAUD_RATE_38400 = 15; - - /// < The number of signal in one second is 57600 - static const int PERIPHERAL_UART_BAUD_RATE_57600 = 16; - - /// < The number of signal in one second is 115200 - static const int PERIPHERAL_UART_BAUD_RATE_115200 = 17; - - /// < The number of signal in one second is 230400 - static const int PERIPHERAL_UART_BAUD_RATE_230400 = 18; -} - -/// @brief Enumeration for byte size. -/// @since_tizen 4.0 -abstract class peripheral_uart_byte_size_e { - /// < 5 data bits - static const int PERIPHERAL_UART_BYTE_SIZE_5BIT = 0; - - /// < 6 data bits - static const int PERIPHERAL_UART_BYTE_SIZE_6BIT = 1; - - /// < 7 data bits - static const int PERIPHERAL_UART_BYTE_SIZE_7BIT = 2; - - /// < 8 data bits - static const int PERIPHERAL_UART_BYTE_SIZE_8BIT = 3; -} - -/// @brief Enumeration for parity bit. -/// @since_tizen 4.0 -abstract class peripheral_uart_parity_e { - /// < No parity is used - static const int PERIPHERAL_UART_PARITY_NONE = 0; - - /// < Even parity is used - static const int PERIPHERAL_UART_PARITY_EVEN = 1; - - /// < ODD parity is used - static const int PERIPHERAL_UART_PARITY_ODD = 2; -} - -/// @brief Enumeration for stop bits. -/// @since_tizen 4.0 -abstract class peripheral_uart_stop_bits_e { - /// < One stop bit - static const int PERIPHERAL_UART_STOP_BITS_1BIT = 0; - - /// < Two stop bits - static const int PERIPHERAL_UART_STOP_BITS_2BIT = 1; -} - -/// @brief Enumeration for hardware flow control. -/// @since_tizen 4.0 -abstract class peripheral_uart_hardware_flow_control_e { - /// < No hardware flow control - static const int PERIPHERAL_UART_HARDWARE_FLOW_CONTROL_NONE = 0; - - /// < Automatic RTS/CTS hardware flow control - static const int PERIPHERAL_UART_HARDWARE_FLOW_CONTROL_AUTO_RTSCTS = 1; -} - -/// @brief Enumeration for software flow control. -/// @since_tizen 4.0 -abstract class peripheral_uart_software_flow_control_e { - /// < No software flow control - static const int PERIPHERAL_UART_SOFTWARE_FLOW_CONTROL_NONE = 0; - - /// < XON/XOFF software flow control - static const int PERIPHERAL_UART_SOFTWARE_FLOW_CONTROL_XONXOFF = 1; -} - -/// @brief The handle to the UART peripherals. -/// @since_tizen 4.0 -typedef peripheral_uart_h = ffi.Pointer<_peripheral_uart_s>; - -final class _peripheral_spi_s extends ffi.Opaque {} - -/// @brief Enumeration of SPI transfer modes. -/// @since_tizen 4.0 -abstract class peripheral_spi_mode_e { - /// < CPOL = 0, CPHa = 0 Mode - static const int PERIPHERAL_SPI_MODE_0 = 0; - - /// < CPOL = 0, CPHa = 1 Mode - static const int PERIPHERAL_SPI_MODE_1 = 1; - - /// < CPOL = 1, CPHa = 0 Mode - static const int PERIPHERAL_SPI_MODE_2 = 2; - - /// < CPOL = 1, CPHa = 1 Mode - static const int PERIPHERAL_SPI_MODE_3 = 3; -} - -/// @brief Enumeration of bit orders. -/// @since_tizen 4.0 -abstract class peripheral_spi_bit_order_e { - /// < Use most siginificant bit first - static const int PERIPHERAL_SPI_BIT_ORDER_MSB = 0; - - /// < Use least significant bit first - static const int PERIPHERAL_SPI_BIT_ORDER_LSB = 1; -} - -/// @brief The handle of a SPI peripherals. -/// @since_tizen 4.0 -typedef peripheral_spi_h = ffi.Pointer<_peripheral_spi_s>; - -/// @brief Enumeration for error codes for runtime information. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class runtime_info_error_e { - /// < Successful - static const int RUNTIME_INFO_ERROR_NONE = 0; - - /// < Invalid parameter - static const int RUNTIME_INFO_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int RUNTIME_INFO_ERROR_OUT_OF_MEMORY = -12; - - /// < An input/output error occurred when read value from system - static const int RUNTIME_INFO_ERROR_IO_ERROR = -5; - - /// < Remote I/O error occurred - static const int RUNTIME_INFO_ERROR_REMOTE_IO = -121; - - /// < No permission to use the api - static const int RUNTIME_INFO_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported parameter - static const int RUNTIME_INFO_ERROR_NOT_SUPPORTED = -1073741822; - - /// < No data available (Since 3.0) - static const int RUNTIME_INFO_ERROR_NO_DATA = -61; -} - -/// @brief Enumeration for keys for runtime information. -/// @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif -abstract class runtime_info_key_e { - /// >; -typedef runtime_info_changed_cbFunction = ffi.Void Function( - ffi.Int32 key, ffi.Pointer user_data); -typedef Dartruntime_info_changed_cbFunction = void Function( - int key, ffi.Pointer user_data); - -/// @brief Structure for memory information. -/// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif -final class runtime_memory_info_s extends ffi.Struct { - /// < Total memory (KiB) - @ffi.Int() - external int total; - - /// < Used memory (KiB) - @ffi.Int() - external int used; - - /// < Free memory (KiB) - @ffi.Int() - external int free; - - /// < Cache memory (KiB) - @ffi.Int() - external int cache; - - /// < Swap memory (KiB) - @ffi.Int() - external int swap; -} - -/// @brief Structure for memory information per process. -/// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif -final class process_memory_info_s extends ffi.Struct { - /// < Virtual memory size (KiB) - @ffi.Int() - external int vsz; - - /// < Resident set size (KiB) - @ffi.Int() - external int rss; - - /// < Proportional set size (KiB) - @ffi.Int() - external int pss; - - /// < Not modified and mapped by other processes (KiB) - @ffi.Int() - external int shared_clean; - - /// < Modified and mapped by other processes (KiB) - @ffi.Int() - external int shared_dirty; - - /// < Not modified and available only to that process (KiB) - @ffi.Int() - external int private_clean; - - /// < Modified and available only to that process (KiB) - @ffi.Int() - external int private_dirty; -} - -/// @brief Structure for CPU usage. -/// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif -final class runtime_cpu_usage_s extends ffi.Struct { - /// < Time running un-niced user processes (Percent) - @ffi.Double() - external double user; - - /// < Time running kernel processes (Percent) - @ffi.Double() - external double system; - - /// < Time running niced user processes (Percent) - @ffi.Double() - external double nice; - - /// < Time waiting for I/O completion (Percent) - @ffi.Double() - external double iowait; -} - -/// @brief Structure for CPU usage per process. -/// @since_tizen @if WEARABLE 3.0 @else 2.4 @endif -final class process_cpu_usage_s extends ffi.Struct { - /// < Amount of time that this process has been scheduled in user mode (clock ticks) - @ffi.Int() - external int utime; - - /// < Amount of time that this process has been scheduled in kernel mode (clock ticks) - @ffi.Int() - external int stime; -} - -final class app_usages_s extends ffi.Opaque {} - -/// @brief Handle for app usage information. -/// @since_tizen 4.0 -typedef app_usage_h = ffi.Pointer; - -/// @brief Enumeration for errors. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sensor_error_e { - /// < Successful - static const int SENSOR_ERROR_NONE = 0; - - /// < I/O error - static const int SENSOR_ERROR_IO_ERROR = -5; - - /// < Invalid parameter - static const int SENSOR_ERROR_INVALID_PARAMETER = -22; - - /// < Not supported - static const int SENSOR_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Permission denied - static const int SENSOR_ERROR_PERMISSION_DENIED = -13; - - /// < Out of memory - static const int SENSOR_ERROR_OUT_OF_MEMORY = -12; - - /// < No data available - /// @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif - static const int SENSOR_ERROR_NO_DATA = -61; - - /// < Sensor doesn't need calibration - static const int SENSOR_ERROR_NOT_NEED_CALIBRATION = -38010877; - - /// < Operation failed - static const int SENSOR_ERROR_OPERATION_FAILED = -38010874; - - /// < The sensor is supported, but currently not available - /// @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif - static const int SENSOR_ERROR_NOT_AVAILABLE = -38010873; -} - -/// @brief Enumeration for proximity sensor events. -/// @details In its #sensor_event_s, #SENSOR_PROXIMITY reports the existence of -/// nearby objects in front of the sensor as one of the followings. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sensor_proximity_e { - /// < An object is placed near the proximity sensor - static const int SENSOR_PROXIMITY_NEAR = 0; - - /// < No object is placed near the proximity sensor - static const int SENSOR_PROXIMITY_FAR = 5; -} - -/// @brief Enumeration for pedestrian state. -/// @details In its #sensor_event_s, #SENSOR_HUMAN_PEDOMETER reports the user's -/// pedestrian state as one of the followings. -/// @since_tizen 3.0 -abstract class sensor_pedometer_state_e { - /// < Uncertain - static const int SENSOR_PEDOMETER_STATE_UNKNOWN = -1; - - /// < The user is not moving - static const int SENSOR_PEDOMETER_STATE_STOP = 0; - - /// < The user is walking - static const int SENSOR_PEDOMETER_STATE_WALK = 1; - - /// < The user is running - static const int SENSOR_PEDOMETER_STATE_RUN = 2; -} - -/// @brief Enumeration for sleep state. -/// @details In its #sensor_event_s, #SENSOR_HUMAN_SLEEP_MONITOR reports the user's -/// sleep state as one of the followings. -/// @since_tizen 3.0 -abstract class sensor_sleep_state_e { - /// < Uncertain - static const int SENSOR_SLEEP_STATE_UNKNOWN = -1; - - /// < The user is awake - static const int SENSOR_SLEEP_STATE_WAKE = 0; - - /// < The user is asleep - static const int SENSOR_SLEEP_STATE_SLEEP = 1; -} - -/// @brief Enumeration for sensor types. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sensor_type_e { - /// < All sensors. This can be used to retrieve #sensor_h for all available sensors. - static const int SENSOR_ALL = -1; - - /// < Accelerometer - static const int SENSOR_ACCELEROMETER = 0; - - /// < Gravity sensor - static const int SENSOR_GRAVITY = 1; - - /// < Linear acceleration sensor - static const int SENSOR_LINEAR_ACCELERATION = 2; - - /// < Magnetic sensor - static const int SENSOR_MAGNETIC = 3; - - /// < Rotation vector sensor - static const int SENSOR_ROTATION_VECTOR = 4; - - /// < Orientation sensor - static const int SENSOR_ORIENTATION = 5; - - /// < Gyroscope - static const int SENSOR_GYROSCOPE = 6; - - /// < Light sensor - static const int SENSOR_LIGHT = 7; - - /// < Proximity sensor - static const int SENSOR_PROXIMITY = 8; - - /// < Pressure sensor - static const int SENSOR_PRESSURE = 9; - - /// < Ultraviolet sensor - static const int SENSOR_ULTRAVIOLET = 10; - - /// < Temperature sensor - static const int SENSOR_TEMPERATURE = 11; - - /// < Humidity sensor - static const int SENSOR_HUMIDITY = 12; - - /// < Heart-rate monitor @if MOBILE (Since 2.3.1) @endif - /// @n Privilege : http://tizen.org/privilege/healthinfo - static const int SENSOR_HRM = 13; - - /// < Green LED sensor of HRM @if MOBILE (Since 2.3.1) @endif - /// @n Privilege : http://tizen.org/privilege/healthinfo - static const int SENSOR_HRM_LED_GREEN = 14; - - /// < Infra-Red LED sensor of HRM @if MOBILE (Since 2.3.1) @endif - /// @n Privilege : http://tizen.org/privilege/healthinfo - static const int SENSOR_HRM_LED_IR = 15; - - /// < Red LED sensor of HRM @if MOBILE (Since 2.3.1) @endif - /// @n Privilege : http://tizen.org/privilege/healthinfo - static const int SENSOR_HRM_LED_RED = 16; - - /// < Uncalibrated Gyroscope sensor - /// @if MOBILE (Since 2.4) @elseif WEARABLE (Since 2.3.2) @endif - static const int SENSOR_GYROSCOPE_UNCALIBRATED = 17; - - /// < Uncalibrated Geomagnetic sensor - /// @if MOBILE (Since 2.4) @elseif WEARABLE (Since 2.3.2) @endif - static const int SENSOR_GEOMAGNETIC_UNCALIBRATED = 18; - - /// < Gyroscope-based rotation vector sensor - /// @if MOBILE (Since 2.4) @elseif WEARABLE (Since 2.3.2) @endif - static const int SENSOR_GYROSCOPE_ROTATION_VECTOR = 19; - - /// < Geomagnetic-based rotation vector sensor - /// @if MOBILE (Since 2.4) @elseif WEARABLE (Since 2.3.2) @endif - static const int SENSOR_GEOMAGNETIC_ROTATION_VECTOR = 20; - - /// < Significant motion sensor (Since 4.0) - static const int SENSOR_SIGNIFICANT_MOTION = 256; - - /// < Pedometer (Since 3.0) - /// @n Privilege : http://tizen.org/privilege/healthinfo - static const int SENSOR_HUMAN_PEDOMETER = 768; - - /// < Sleep monitor (Since 3.0) - /// @n Privilege : http://tizen.org/privilege/healthinfo - static const int SENSOR_HUMAN_SLEEP_MONITOR = 769; - - /// < Sleep detector (Since 3.0) - /// @n Privilege : http://tizen.org/privilege/healthinfo - static const int SENSOR_HUMAN_SLEEP_DETECTOR = 770; - - /// < Stress monitor (Since 3.0) - /// @n Privilege : http://tizen.org/privilege/healthinfo - static const int SENSOR_HUMAN_STRESS_MONITOR = 771; - - /// < End of sensor enum values (Deprecated since 3.0) - static const int SENSOR_LAST = 772; - - /// < Custom sensor (Deprecated since 3.0) - static const int SENSOR_CUSTOM = 10000; -} - -/// @brief Sensor handle. -/// @details The handle for controlling a specific sensor can be retrieved using sensor_get_default_sensor().@n -/// The function returns the handle of the default sensor of a given type, and usually, -/// a device has one sensor for one type. -/// However, if the device supports multiple sensors of the same type, -/// sensor_get_sensor_list() function can be used to get the list of all the sensors of the type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef sensor_h = ffi.Pointer; - -/// @brief Called when a new sensor is added. -/// @since_tizen 4.0 -/// -/// @remarks @a uri should not be freed and can be used only in the callback. -/// To use outside the callback, make a copy. -/// -/// @param[in] uri The URI of the newly added sensor -/// @param[in] user_data The user data had passed to sensor_add_sensor_added_cb(). -/// -/// @pre A callback function needs to be set using sensor_add_sensor_added_cb(). -/// @see sensor_add_sensor_added_cb() -/// @see sensor_remove_sensor_added_cb() -typedef sensor_added_cb - = ffi.Pointer>; -typedef sensor_added_cbFunction = ffi.Void Function( - ffi.Pointer uri, ffi.Pointer user_data); -typedef Dartsensor_added_cbFunction = void Function( - ffi.Pointer uri, ffi.Pointer user_data); - -/// @brief Called when a sensor is removed. -/// @since_tizen 4.0 -/// -/// @remarks @a uri should not be freed and can be used only in the callback. -/// To use outside the callback, make a copy. -/// -/// @param[in] uri The URI of the removed sensor -/// @param[in] user_data The user data had passed to sensor_add_sensor_removed_cb() -/// -/// @pre A callback function needs to be set using sensor_add_sensor_removed_cb(). -/// @see sensor_add_sensor_removed_cb() -/// @see sensor_remove_sensor_removed_cb() -typedef sensor_removed_cb - = ffi.Pointer>; -typedef sensor_removed_cbFunction = ffi.Void Function( - ffi.Pointer uri, ffi.Pointer user_data); -typedef Dartsensor_removed_cbFunction = void Function( - ffi.Pointer uri, ffi.Pointer user_data); - -final class sensor_listener_s extends ffi.Opaque {} - -/// @brief Sensor data event delivered via sensor_event_cb(). -/// @details A sensor data is delivered as a structure, which contains the accuracy of the data, -/// the time when the data was observed, and the data array. -/// The data array is a fixed size @c float array, and the number of data fields -/// stored in the array varies with the sensor type. -/// For example, #SENSOR_ACCELEROMETER reports 3-dimensional data, -/// #sensor_event_s::value_count is thus set to 3.@n -/// Note that, even if the data values are @c float, in some cases, -/// it may contain one or more categorical data as in #sensor_proximity_e. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @see #sensor_pedometer_state_e -/// @see #sensor_sleep_state_e -final class sensor_event_s extends ffi.Struct { - /// < Accuracy of sensor data - @ffi.Int() - external int accuracy; - - /// < Time when the sensor data was observed - @ffi.UnsignedLongLong() - external int timestamp; - - /// < Number of sensor data values stored in #sensor_event_s::values - @ffi.Int() - external int value_count; - - /// < Sensor data values - @ffi.Array.multi([16]) - external ffi.Array values; -} - -/// @brief Enumeration for sensor data accuracy. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sensor_data_accuracy_e { - /// < Undefined - static const int SENSOR_DATA_ACCURACY_UNDEFINED = -1; - - /// < Not accurate - static const int SENSOR_DATA_ACCURACY_BAD = 0; - - /// < Moderately accurate - static const int SENSOR_DATA_ACCURACY_NORMAL = 1; - - /// < Highly accurate - static const int SENSOR_DATA_ACCURACY_GOOD = 2; - - /// < Very highly accurate - static const int SENSOR_DATA_ACCURACY_VERYGOOD = 3; -} - -/// @brief Enumeration for sensor listener behavior attributes -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -abstract class sensor_attribute_e { - /// < Reference orientation of sensor data to be reported.@n - /// See #sensor_axis_e for available attribute values. - static const int SENSOR_ATTRIBUTE_AXIS_ORIENTATION = 1; - - /// < Pause-and-resume policy of sensors.@n - /// See #sensor_pause_e for available attribute values. - static const int SENSOR_ATTRIBUTE_PAUSE_POLICY = 2; -} - -abstract class sensor_option_e { - /// < Does not receive data when the LCD is off and in the power save mode - static const int SENSOR_OPTION_DEFAULT = 0; - - /// < Receives data when the LCD is off - static const int SENSOR_OPTION_ON_IN_SCREEN_OFF = 1; - - /// < Receives data in the power save mode - static const int SENSOR_OPTION_ON_IN_POWERSAVE_MODE = 2; - - /// < Receives data when the LCD is off and in the power save mode - static const int SENSOR_OPTION_ALWAYS_ON = 3; -} - -/// @brief Enumeration for reference orientations of sensor data -/// @details The sensor's physical orientation may differ from what applications are aware of, -/// in cases that the device has a rotated screen, physically or logically. -/// For example, a watch device may have right hand mode, which logically rotates -/// the display 180 degrees. -/// Applications may not be aware of such situations, thus they may receives -/// sensor data inverted in X and Y directions. -/// With #SENSOR_AXIS_DISPLAY_ORIENTED option, applications can get data that -/// are properly aligned with the orientation of which they are aware.@n -/// By default, #SENSOR_AXIS_DISPLAY_ORIENTED is used. -/// If you need to use the data that are not affected by display orientations, -/// #SENSOR_AXIS_DEVICE_ORIENTED needs to be set. -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -abstract class sensor_axis_e { - /// < Using the device orientation as the reference coordinate system - static const int SENSOR_AXIS_DEVICE_ORIENTED = 1; - - /// < Using the display orientation as the reference coordinate system - static const int SENSOR_AXIS_DISPLAY_ORIENTED = 2; -} - -/// @brief Enumeration for pause policies of sensor listeners -/// @details To be power-efficient, you can set the policy of how to pause and resume -/// a sensor listener regarding the system status. -/// By default, #SENSOR_PAUSE_ALL is used to obtain the maximum power efficiency. -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -abstract class sensor_pause_e { - /// < The sensor will not pause, unless the system goes into sleep mode - static const int SENSOR_PAUSE_NONE = 0; - - /// < The sensor pauses while the display is off - static const int SENSOR_PAUSE_ON_DISPLAY_OFF = 1; - - /// < The sensor pauses while the power-save mode is enabled - static const int SENSOR_PAUSE_ON_POWERSAVE_MODE = 2; - - /// < The sensor pauses in all the above cases - static const int SENSOR_PAUSE_ALL = 3; -} - -/// @brief Sensor listener handle. -/// @details For each #sensor_h, one or more sensor listeners can be created by using sensor_create_listener(). -/// Then the sensor's data can observed asynchronously, can be read synchronously if available, via the listener. -/// Applications are also able to control the behavior of each sensor, for example, -/// update interval of sensor readings. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef sensor_listener_h = ffi.Pointer; - -/// @brief Called when a sensor event occurs. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @param[in] sensor The corresponding sensor handle -/// @param[in] event A sensor event -/// @param[in] data The user data had passed to sensor_listener_set_event_cb() -/// -/// @pre The sensor needs to be started regarding a listener handle, using sensor_listener_start(). -typedef sensor_event_cb - = ffi.Pointer>; -typedef sensor_event_cbFunction = ffi.Void Function(sensor_h sensor, - ffi.Pointer event, ffi.Pointer data); -typedef Dartsensor_event_cbFunction = void Function(sensor_h sensor, - ffi.Pointer event, ffi.Pointer data); - -/// @brief Called when the accuracy of a sensor changes. -/// @details Sensors can be affected by the environment. -/// For example, #SENSOR_MAGNETIC is sensitive to any surrounding objects that can influence -/// electromagnetic fields. This function is called if the accuracy of the corresponding sensor is changed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// -/// @param[in] sensor A sensor handle -/// @param[in] timestamp The time in milliseconds when the accuracy changed -/// @param[in] accuracy The current accuracy of the sensor -/// @param[in] data The user data had passed to sensor_listener_set_accuracy_cb() -typedef sensor_accuracy_changed_cb - = ffi.Pointer>; -typedef sensor_accuracy_changed_cbFunction = ffi.Void Function( - sensor_h sensor, - ffi.UnsignedLongLong timestamp, - ffi.Int32 accuracy, - ffi.Pointer data); -typedef Dartsensor_accuracy_changed_cbFunction = void Function( - sensor_h sensor, int timestamp, int accuracy, ffi.Pointer data); - -final class _sensor_provider_s extends ffi.Opaque {} - -/// @brief Sensor provider handle. -/// @details One or more sensor providers can be created by using sensor_create_provider(). -/// The sensor's data can be published to listeners, via the provider. -/// @since_tizen 4.0 -/// -/// @see sensor_create_provider() -/// @see sensor_destroy_provider() -typedef sensor_provider_h = ffi.Pointer<_sensor_provider_s>; - -/// @brief Called when a sensor listener starts the sensor provider. -/// @since_tizen 4.0 -/// -/// @remarks @a provider is the object created with sensor_create_provider() -/// and is the object for which the callback was triggered. -/// -/// @param[in] provider The sensor provider handle -/// @param[in] user_data The user data to be passed to the callback function -/// -/// @pre A callback function needs to be set using sensor_provider_set_start_cb(). -/// @see sensor_provider_set_start_cb() -typedef sensor_provider_start_cb - = ffi.Pointer>; -typedef sensor_provider_start_cbFunction = ffi.Void Function( - sensor_provider_h provider, ffi.Pointer user_data); -typedef Dartsensor_provider_start_cbFunction = void Function( - sensor_provider_h provider, ffi.Pointer user_data); - -/// @brief Called when a sensor listener stops the sensor provider. -/// @since_tizen 4.0 -/// -/// @remarks @a provider is the object created with sensor_create_provider() -/// and is the object for which the callback was triggered. -/// -/// @param[in] provider The sensor provider handle -/// @param[in] user_data The user data to be passed to the callback function -/// -/// @pre A callback function needs to be set using sensor_provider_set_stop_cb(). -/// @see sensor_provider_set_stop_cb() -typedef sensor_provider_stop_cb - = ffi.Pointer>; -typedef sensor_provider_stop_cbFunction = ffi.Void Function( - sensor_provider_h provider, ffi.Pointer user_data); -typedef Dartsensor_provider_stop_cbFunction = void Function( - sensor_provider_h provider, ffi.Pointer user_data); - -/// @brief Called when the interval of the sensor provider is changed. -/// @since_tizen 4.0 -/// -/// @remarks @a provider is the object created with sensor_create_provider() -/// and is the object for which the callback was triggered. -/// -/// @param[in] provider The sensor provider handle -/// @param[in] interval_ms The interval -/// @param[in] user_data The user data to be passed to the callback function -/// -/// @pre A callback function needs to be set using sensor_provider_set_interval_changed_cb(). -/// @see sensor_provider_set_interval_changed_cb() -typedef sensor_provider_interval_changed_cb = ffi - .Pointer>; -typedef sensor_provider_interval_changed_cbFunction = ffi.Void Function( - sensor_provider_h provider, - ffi.UnsignedInt interval_ms, - ffi.Pointer user_data); -typedef Dartsensor_provider_interval_changed_cbFunction = void Function( - sensor_provider_h provider, - int interval_ms, - ffi.Pointer user_data); - -/// @brief Enumeration for option parameters for sensor recording. -/// @details None, one, or more option parameters can be set to #sensor_recorder_option_h, -/// then applications can request to record a specific sensor with the parameters via -/// sensor_recorder_start(). -/// If a parameter is not supported for the specified sensor type, it will be ignored. -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -abstract class sensor_recorder_option_e { - /// < Desired retention period for the recorded sensor data (hours); int; - static const int SENSOR_RECORDER_OPTION_RETENTION_PERIOD = 0; - - /// < Desired interval between data records (minutes); int; see #sensor_recorder_interval_e - static const int SENSOR_RECORDER_OPTION_INTERVAL = 1; -} - -/// @brief Enumeration for intervals between data records. -/// @details Some sensor types including #SENSOR_HRM may not fit to continuous monitoring and recording. -/// To reduce the battery use for recording such sensors, recording interval between each -/// sensor data is chosen. For example, an application set the interval of 1 hour, -/// the platform tries to retrieve the sensor data only once per hour, thus it will be more -/// battery efficient than to listen the sensor data continuously.@n -/// If the application does not set the interval explicitly, the default value is chosen. -/// The default values are differ from sensor to sensor. -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -/// @remarks If more than one applications set different intervals, the shortest value is chosen. -abstract class sensor_recorder_interval_e { - /// < 10 Minutes - static const int SENSOR_RECORDER_INTERVAL_10_MINUTES = 10; - - /// < 1 Hour - static const int SENSOR_RECORDER_INTERVAL_1_HOUR = 60; - - /// < 3 Hours - static const int SENSOR_RECORDER_INTERVAL_3_HOURS = 180; - - /// < 6 Hours - static const int SENSOR_RECORDER_INTERVAL_6_HOURS = 360; - - /// < 12 Hours - static const int SENSOR_RECORDER_INTERVAL_12_HOURS = 720; - - /// < 1 Day - static const int SENSOR_RECORDER_INTERVAL_1_DAY = 1440; -} - -/// @brief Enumeration for filtering and aggregation parameters for querying sensor records. -/// @details None, one, or more query parameters can be set to #sensor_recorder_query_h, -/// to specify the data to be retrieved via sensor_recorder_read(). -/// If a necessary parameter is not set, the default value is chosen. -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -abstract class sensor_recorder_query_e { - /// < Start time of the data to be queried (Epoch); time_t; If unspecified, 1 day ago - static const int SENSOR_RECORDER_QUERY_START_TIME = 0; - - /// < End time of the data to be queried (Epoch); time_t; If unspecified, the current time - static const int SENSOR_RECORDER_QUERY_END_TIME = 1; - - /// < The anchor time to slice the querying duration of time (Epoch); time_t; - /// It needs to be set with #SENSOR_RECORDER_QUERY_TIME_INTERVAL, otherwise, it is ignored - static const int SENSOR_RECORDER_QUERY_ANCHOR_TIME = 2; - - /// < The interval of each sliced querying duration (minutes); int - static const int SENSOR_RECORDER_QUERY_TIME_INTERVAL = 3; -} - -/// @brief Enumeration for data attributes can be contained in #sensor_recorder_data_h. -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -/// @see sensor_recorder_data_get_int() -/// @see sensor_recorder_data_get_double() -abstract class sensor_recorder_data_e { - /// < Count of both walking and running steps; int - /// @if WEARABLE (Since 3.0) @endif - static const int SENSOR_RECORDER_DATA_STEPS = 0; - - /// < Count of walking steps; int - /// @if WEARABLE (Since 3.0) @endif - static const int SENSOR_RECORDER_DATA_WALK_STEPS = 1; - - /// < Count of running steps; int - /// @if WEARABLE (Since 3.0) @endif - static const int SENSOR_RECORDER_DATA_RUN_STEPS = 2; - - /// < Distance walked or ran (m); double - /// @if WEARABLE (Since 3.0) @endif - static const int SENSOR_RECORDER_DATA_DISTANCE = 3; - - /// < Calorie burned (kcal); double - /// @if WEARABLE (Since 3.0) @endif - static const int SENSOR_RECORDER_DATA_CALORIE = 4; - - /// < Heart Rate (BPM); int - /// @if WEARABLE (Since 3.0) @endif - static const int SENSOR_RECORDER_DATA_HEART_RATE = 16; - - /// < Sleep state; int; One of #sensor_sleep_state_e - /// @if WEARABLE (Since 3.0) @endif - static const int SENSOR_RECORDER_DATA_SLEEP_STATE = 32; - - /// < Pressure; double - static const int SENSOR_RECORDER_DATA_PRESSURE = 48; - - /// < Max pressure; double - static const int SENSOR_RECORDER_DATA_MAX_PRESSURE = 49; - - /// < Min pressure; double - static const int SENSOR_RECORDER_DATA_MIN_PRESSURE = 50; - - /// < Average pressure; double - static const int SENSOR_RECORDER_DATA_AVERAGE_PRESSURE = 51; -} - -/// @brief Option handle to contain recording policies and parameters. -/// @details one or more sensor options can be created by using sensor_recorder_create_option(). -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -typedef sensor_recorder_option_h = ffi.Pointer; - -/// @brief Query handle to contain filtering and aggregation parameters for recorded data. -/// @details one or more sensor options can be created by using sensor_recorder_create_query(). -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -typedef sensor_recorder_query_h = ffi.Pointer; - -/// @brief Called when the query results are retrieved. -/// @details One of the following errors can be delivered.\n -/// #SENSOR_ERROR_NONE, Successful\n -/// #SENSOR_ERROR_OPERATION_FAILED, Operation failed\n -/// #SENSOR_ERROR_NO_DATA, No data retrieved. -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -/// -/// @param[in] type Sensor type -/// @param[in] data Retrieved data record -/// @param[in] remains Number of remaining records to be delivered -/// @param[in] error Error -/// @param[in] user_data The user data passed from sensor_recorder_read() or sensor_recorder_read_sync() -/// -/// @return If @c true, it continues to iterate to the next record; If @c false, the iteration stops -typedef sensor_recorder_data_cb - = ffi.Pointer>; -typedef sensor_recorder_data_cbFunction = ffi.Bool Function( - ffi.Int32 type, - sensor_recorder_data_h data, - ffi.Int remains, - ffi.Int32 error, - ffi.Pointer user_data); -typedef Dartsensor_recorder_data_cbFunction = bool Function( - int type, - sensor_recorder_data_h data, - int remains, - int error, - ffi.Pointer user_data); - -/// @brief Data handle to contain retrieved sensor records. -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -typedef sensor_recorder_data_h = ffi.Pointer; - -/// @brief Enumeration of the axis used in sensor_util_remap_coordinate_system(). -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class sensor_util_axis_e { - /// < -X - static const int SENSOR_UTIL_AXIS_MINUS_X = 0; - - /// < -Y - static const int SENSOR_UTIL_AXIS_MINUS_Y = 1; - - /// < -Z - static const int SENSOR_UTIL_AXIS_MINUS_Z = 2; - - /// < +X - static const int SENSOR_UTIL_AXIS_X = 3; - - /// < +Y - static const int SENSOR_UTIL_AXIS_Y = 4; - - /// < +Z - static const int SENSOR_UTIL_AXIS_Z = 5; - static const int sensor_util_axis_minus_x = 0; - static const int sensor_util_axis_minus_y = 1; - static const int sensor_util_axis_minus_z = 2; - static const int sensor_util_axis_x = 3; - static const int sensor_util_axis_y = 4; - static const int sensor_util_axis_z = 5; -} - -/// @brief Enumeration for Storage of error codes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class storage_error_e { - /// < Successful - static const int STORAGE_ERROR_NONE = 0; - - /// < Invalid parameter - static const int STORAGE_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int STORAGE_ERROR_OUT_OF_MEMORY = -12; - - /// < Storage not supported - static const int STORAGE_ERROR_NOT_SUPPORTED = -6; - - /// < Operation failed - static const int STORAGE_ERROR_OPERATION_FAILED = -131054; -} - -/// @brief Enumeration for the storage types. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class storage_type_e { - /// < Internal device storage (built-in storage in a device, non-removable) - static const int STORAGE_TYPE_INTERNAL = 0; - - /// < External storage - static const int STORAGE_TYPE_EXTERNAL = 1; - - /// < Extended internal storage (External storage used as internal storage) (Since 4.0) - static const int STORAGE_TYPE_EXTENDED_INTERNAL = 2; -} - -/// @brief Enumeration for storage devices state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class storage_state_e { - /// < Storage is present but cannot be mounted. Typically it happens if the file system of the storage is corrupted - static const int STORAGE_STATE_UNMOUNTABLE = -2; - - /// < Storage is not present - static const int STORAGE_STATE_REMOVED = -1; - - /// < Storage is present and mounted with read/write access - static const int STORAGE_STATE_MOUNTED = 0; - - /// < Storage is present and mounted with read only access - static const int STORAGE_STATE_MOUNTED_READ_ONLY = 1; -} - -/// @brief Called to get information once for each supported storage. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] storage_id The unique storage ID -/// @param[in] type The type of the storage -/// @param[in] state The current state of the storage -/// @param[in] path The absolute path to the root directory of the storage -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n -/// otherwise @c false to break out of the loop -/// @pre storage_foreach_device_supported() will invoke this callback function. -/// @see storage_foreach_device_supported() -typedef storage_device_supported_cb - = ffi.Pointer>; -typedef storage_device_supported_cbFunction = ffi.Bool Function( - ffi.Int storage_id, - ffi.Int32 type, - ffi.Int32 state, - ffi.Pointer path, - ffi.Pointer user_data); -typedef Dartstorage_device_supported_cbFunction = bool Function( - int storage_id, - int type, - int state, - ffi.Pointer path, - ffi.Pointer user_data); - -/// @brief Enumeration for the storage directory types. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class storage_directory_e { - /// < Image directory - static const int STORAGE_DIRECTORY_IMAGES = 0; - - /// < Sounds directory - static const int STORAGE_DIRECTORY_SOUNDS = 1; - - /// < Videos directory - static const int STORAGE_DIRECTORY_VIDEOS = 2; - - /// < Camera directory - static const int STORAGE_DIRECTORY_CAMERA = 3; - - /// < Downloads directory - static const int STORAGE_DIRECTORY_DOWNLOADS = 4; - - /// < Music directory - static const int STORAGE_DIRECTORY_MUSIC = 5; - - /// < Documents directory - static const int STORAGE_DIRECTORY_DOCUMENTS = 6; - - /// < Others directory - static const int STORAGE_DIRECTORY_OTHERS = 7; - - /// < System ringtones directory. Only available for internal storage. - static const int STORAGE_DIRECTORY_SYSTEM_RINGTONES = 8; - static const int STORAGE_DIRECTORY_MAX = 9; -} - -/// @brief Called when the state of storage changes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] storage_id The unique storage ID -/// @param[in] state The current state of the storage -/// @param[in] user_data The user data passed from the foreach function -/// @pre storage_set_state_changed_cb() will invoke this callback function. -/// @see storage_set_state_changed_cb() -/// @see storage_unset_state_changed_cb() -typedef storage_state_changed_cb - = ffi.Pointer>; -typedef storage_state_changed_cbFunction = ffi.Void Function( - ffi.Int storage_id, ffi.Int32 state, ffi.Pointer user_data); -typedef Dartstorage_state_changed_cbFunction = void Function( - int storage_id, int state, ffi.Pointer user_data); - -/// @brief Enumeration for storage device types. -/// @since_tizen 3.0 -abstract class storage_dev_e { - /// < SD card device (external storage) - static const int STORAGE_DEV_EXT_SDCARD = 1001; - - /// < USB storage device (external storage) - static const int STORAGE_DEV_EXT_USB_MASS_STORAGE = 1002; - - /// < Extended internal storage device (External storage used as internal storage) (Since 4.0) - static const int STORAGE_DEV_EXTENDED_INTERNAL = 1003; -} - -/// @brief Called when the state of a storage type changes. -/// @since_tizen 3.0 -/// @param[in] storage_id The unique storage ID -/// @param[in] dev The type of the external storage device -/// @param[in] state The state of the storage -/// @param[in] fstype The type of the file system -/// @param[in] fsuuid The uuid of the file system -/// @param[in] mountpath The mount path of the file system -/// @param[in] primary The primary partition -/// @param[in] flags The flags for the storage status -/// @param[in] user_data The user data -/// @pre storage_set_changed_cb() will invoke this callback function. -/// @see storage_set_changed_cb() -/// @see storage_unset_changed_cb() -typedef storage_changed_cb - = ffi.Pointer>; -typedef storage_changed_cbFunction = ffi.Void Function( - ffi.Int storage_id, - ffi.Int32 dev, - ffi.Int32 state, - ffi.Pointer fstype, - ffi.Pointer fsuuid, - ffi.Pointer mountpath, - ffi.Bool primary, - ffi.Int flags, - ffi.Pointer user_data); -typedef Dartstorage_changed_cbFunction = void Function( - int storage_id, - int dev, - int state, - ffi.Pointer fstype, - ffi.Pointer fsuuid, - ffi.Pointer mountpath, - bool primary, - int flags, - ffi.Pointer user_data); - -final class statvfs extends ffi.Struct { - @ffi.UnsignedLong() - external int f_bsize; - - @ffi.UnsignedLong() - external int f_frsize; - - @__fsblkcnt_t() - external int f_blocks; - - @__fsblkcnt_t() - external int f_bfree; - - @__fsblkcnt_t() - external int f_bavail; - - @__fsfilcnt_t() - external int f_files; - - @__fsfilcnt_t() - external int f_ffree; - - @__fsfilcnt_t() - external int f_favail; - - @ffi.UnsignedLong() - external int f_fsid; - - @ffi.Int() - external int __f_unused; - - @ffi.UnsignedLong() - external int f_flag; - - @ffi.UnsignedLong() - external int f_namemax; - - @ffi.Array.multi([6]) - external ffi.Array __f_spare; -} - -typedef __fsblkcnt_t = ffi.UnsignedLong; -typedef Dart__fsblkcnt_t = int; -typedef __fsfilcnt_t = ffi.UnsignedLong; -typedef Dart__fsfilcnt_t = int; - -/// @brief Enumeration for system information error codes. -abstract class system_info_error_e { - /// < Successful - static const int SYSTEM_INFO_ERROR_NONE = 0; - - /// < Invalid parameter - static const int SYSTEM_INFO_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int SYSTEM_INFO_ERROR_OUT_OF_MEMORY = -12; - - /// < An input/output error occurred when reading value from system - static const int SYSTEM_INFO_ERROR_IO_ERROR = -5; - - /// < No permission to use the API - static const int SYSTEM_INFO_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported parameter (Since 3.0) - static const int SYSTEM_INFO_ERROR_NOT_SUPPORTED = -1073741822; -} - -/// @internal -/// @brief It is not decided if it should be opened to public. -abstract class system_info_type_e { - static const int SYSTEM_INFO_BOOL = 0; - static const int SYSTEM_INFO_INT = 1; - static const int SYSTEM_INFO_DOUBLE = 2; - static const int SYSTEM_INFO_STRING = 3; -} - -/// @internal -/// @brief Enumeration for system information key. -abstract class system_info_key_e { - /// < @internal The model of the device - static const int SYSTEM_INFO_KEY_MODEL = 0; - - /// < @internal The version of the Tizen API - static const int SYSTEM_INFO_KEY_TIZEN_VERSION = 1; - - /// < @internal The name of platform - static const int SYSTEM_INFO_KEY_PLATFORM_NAME = 2; - - /// < @internal The name of tizen version - static const int SYSTEM_INFO_KEY_TIZEN_VERSION_NAME = 3; - - /// < @internal The manufacturer of the device - static const int SYSTEM_INFO_KEY_MANUFACTURER = 4; - - /// < @internal The CORE CPU architecture of model - static const int SYSTEM_INFO_KEY_CORE_CPU_ARCH = 5; - - /// < @internal The CORE CPU frequency of model - static const int SYSTEM_INFO_KEY_CORE_CPU_FREQ = 6; - - /// < @internal The build string of platform binary - static const int SYSTEM_INFO_KEY_BUILD_STRING = 7; - - /// < @internal The build date of platform binary - static const int SYSTEM_INFO_KEY_BUILD_DATE = 8; - - /// < @internal The build time of platform binary - static const int SYSTEM_INFO_KEY_BUILD_TIME = 9; - - /// < @internal The height of the screen in pixels - static const int SYSTEM_INFO_KEY_SCREEN_HEIGHT = 10; - - /// < @internal The width of the screen in pixels - static const int SYSTEM_INFO_KEY_SCREEN_WIDTH = 11; - - /// < @internal The physical screen height in millimeters - static const int SYSTEM_INFO_KEY_PHYSICAL_SCREEN_HEIGHT = 12; - - /// < @internal The physical screen width in millimeters - static const int SYSTEM_INFO_KEY_PHYSICAL_SCREEN_WIDTH = 13; - - /// < @internal Indicates whether the device supports tethering - static const int SYSTEM_INFO_KEY_TETHERING_SUPPORTED = 14; -} - -/// @brief Enumeration for system settings error. -/// @since_tizen 2.3 -abstract class system_settings_error_e { - /// < Successful - static const int SYSTEM_SETTINGS_ERROR_NONE = 0; - - /// < Invalid parameter - static const int SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int SYSTEM_SETTINGS_ERROR_OUT_OF_MEMORY = -12; - - /// < Internal I/O error - static const int SYSTEM_SETTINGS_ERROR_IO_ERROR = -5; - - /// < Permission denied - static const int SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported @if MOBILE (Since 2.3.1) @endif - static const int SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Not supported @if MOBILE (Since 2.3.1) @endif - static const int SYSTEM_SETTINGS_ERROR_CALL_UNSUPPORTED_API = -1073741822; - - /// < Current lock screen app set 'password' type - static const int SYSTEM_SETTINGS_ERROR_LOCKSCREEN_APP_PASSWORD_MODE = - -38141951; -} - -/// @brief Enumeration for System Settings Key. -/// @since_tizen 2.3 -abstract class system_settings_key_e { - /// < (string) The file path of the current ringtone - static const int SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE = 0; - - /// < (string) The file path of the current home screen wallpaper - static const int SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN = 1; - - /// < (string) The file path of the current lock screen wallpaper - static const int SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN = 2; - - /// < (int) The current system font size - static const int SYSTEM_SETTINGS_KEY_FONT_SIZE = 3; - - /// < (string) The current system font type - static const int SYSTEM_SETTINGS_KEY_FONT_TYPE = 4; - - /// < (bool) Indicates whether the motion service is activated - static const int SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION = 5; - - /// < (string) The file path of the current email alert ringtone - static const int SYSTEM_SETTINGS_KEY_EMAIL_ALERT_RINGTONE = 6; - - /// < (bool) Indicates whether the USB debugging is enabled (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int SYSTEM_SETTINGS_KEY_USB_DEBUGGING_ENABLED = 7; - - /// < (bool) Indicates whether the 3G data network is enabled (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) - static const int SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED = 8; - - /// < (string) Indicates lockscreen app pkg name - static const int SYSTEM_SETTINGS_KEY_LOCKSCREEN_APP = 10; - - /// < (string) The current system default font type (only support Get) - static const int SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE = 11; - - /// < (string) Indicates the current country setting in the _ syntax. The country setting is in the ISO 639-2 format, and the region setting is in the ISO 3166-1 alpha-2 format - static const int SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY = 12; - - /// < (string) Indicates the current language setting in the _ syntax. The language setting is in the ISO 639-2 format and the region setting is in the ISO 3166-1 alpha-2 format. - static const int SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE = 13; - - /// < (bool) Indicates whether the 24-hour clock is used. If the value is @c false, the 12-hour clock is used. - static const int SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR = 14; - - /// < (string) Indicates the current time zone. - static const int SYSTEM_SETTINGS_KEY_LOCALE_TIMEZONE = 15; - - /// < (int) Once System changes time, this event occurs to notify time change. - static const int SYSTEM_SETTINGS_KEY_TIME_CHANGED = 16; - - /// < GET (bool) Indicates whether the screen lock sound is enabled on the device. ex) LCD on/off sound - static const int SYSTEM_SETTINGS_KEY_SOUND_LOCK = 17; - - /// < GET (bool) Indicates whether the device is in the silent mode. - static const int SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE = 18; - - /// < GET (bool) Indicates whether the screen touch sound is enabled on the device. - static const int SYSTEM_SETTINGS_KEY_SOUND_TOUCH = 19; - - /// < GET (bool) Indicates whether rotation control is automatic. - static const int SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO = 20; - - /// < GET (string) Indicates device name. - static const int SYSTEM_SETTINGS_KEY_DEVICE_NAME = 21; - - /// < GET (bool) Indicates whether the device user has enabled the motion feature. - static const int SYSTEM_SETTINGS_KEY_MOTION_ENABLED = 22; - - /// < GET (bool) Indicates whether Wi-Fi-related notifications are enabled on the device. - static const int SYSTEM_SETTINGS_KEY_NETWORK_WIFI_NOTIFICATION = 23; - - /// < GET (bool) Indicates whether the device is in the flight mode. - static const int SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE = 24; - - /// < (int) Indicates the backlight time (in seconds). @internal The following values can be used: 15, 30, 60, 120, 300, and 600. - static const int SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME = 25; - - /// < (string) Indicates the file path of the current notification tone set by the user. - static const int SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION = 26; - - /// < (int) Indicates the time period for notification repetitions. - static const int SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION_REPETITION_PERIOD = - 27; - - /// < (int) Indicates the current lock state - static const int SYSTEM_SETTINGS_KEY_LOCK_STATE = 28; - - /// < (string) Indicates Ads ID for each device (Since 3.0) - static const int SYSTEM_SETTINGS_KEY_ADS_ID = 29; - - /// < (int) Indicates Ultra Data Save status, one of #system_settings_uds_state_e values (Since 4.0) - static const int SYSTEM_SETTINGS_KEY_ULTRA_DATA_SAVE = 30; - - /// < (string) Indicates Ultra Data Save Package List (Since 4.0), the list is a string containing whitelisted package names separated with semicolons (;) - static const int SYSTEM_SETTINGS_KEY_ULTRA_DATA_SAVE_PKG_LIST = 31; - - /// < GET (bool) Indicates whether the accessibility TTS is enabled on the device. (Since 4.0) - static const int SYSTEM_SETTINGS_KEY_ACCESSIBILITY_TTS = 32; - - /// < (bool) Indicates whether vibration is enabled on the device. (Since 4.0) - static const int SYSTEM_SETTINGS_KEY_VIBRATION = 33; - - /// < (bool) Indicates whether updating time automatically is enabled on the device. (Since 5.0) - static const int SYSTEM_SETTINGS_KEY_AUTOMATIC_TIME_UPDATE = 34; - - /// < (bool) Indicates whether developer option state is enabled on the device. (Since 5.0) - static const int SYSTEM_SETTINGS_KEY_DEVELOPER_OPTION_STATE = 35; - static const int SYSTEM_SETTINGS_KEY_MAX = 36; -} - -/// @brief Enumeration for Idle Lock State. -/// @since_tizen 2.3.1 -abstract class system_settings_idle_lock_state_e { - /// < Device is unlocked - static const int SYSTEM_SETTINGS_LOCK_STATE_UNLOCK = 0; - - /// < Device is locked - static const int SYSTEM_SETTINGS_LOCK_STATE_LOCK = 1; - - /// < Device is being locked - static const int SYSTEM_SETTINGS_LOCK_STATE_LAUNCHING_LOCK = 2; -} - -/// @brief Enumeration for font size. -/// @since_tizen 2.3 -abstract class system_settings_font_size_e { - /// < A small size - static const int SYSTEM_SETTINGS_FONT_SIZE_SMALL = 0; - - /// < A normal size - static const int SYSTEM_SETTINGS_FONT_SIZE_NORMAL = 1; - - /// < A large size - static const int SYSTEM_SETTINGS_FONT_SIZE_LARGE = 2; - - /// < A huge size - static const int SYSTEM_SETTINGS_FONT_SIZE_HUGE = 3; - - /// < A giant size - static const int SYSTEM_SETTINGS_FONT_SIZE_GIANT = 4; -} - -/// @brief Enumeration for Ultra Data Save. -/// @since_tizen 4.0 -abstract class system_settings_uds_state_e { - /// < OFF - static const int SYSTEM_SETTINGS_UDS_OFF = 0; - - /// < ON - static const int SYSTEM_SETTINGS_UDS_ON = 1; - - /// < UDS on and the app is whitelisted - static const int SYSTEM_SETTINGS_UDS_ON_WHITELISTED = 2; -} - -/// @brief Called when the system settings changes. -/// @since_tizen 2.3 -/// @param[in] key The key name of the system settings changed system settings -/// @param[in] user_data The user data passed from the callback registration function -/// @pre system_settings_set_changed_cb() will invoke this callback function. -/// @see system_settings_set_changed_cb() -/// @see system_settings_unset_changed_cb() -typedef system_settings_changed_cb - = ffi.Pointer>; -typedef system_settings_changed_cbFunction = ffi.Void Function( - ffi.Int32 key, ffi.Pointer user_data); -typedef Dartsystem_settings_changed_cbFunction = void Function( - int key, ffi.Pointer user_data); - -/// @platform -/// @brief Called to get each string value from string typed list. -/// @since_tizen 3.0 -/// @param[in] index zero based number indicating index of node in a list -/// @param[in] value value returned from the list -/// @param[in] cb_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, otherwise false to break out of the loop -typedef system_settings_iter_cb - = ffi.Pointer>; -typedef system_settings_iter_cbFunction = ffi.Bool Function( - ffi.Int index, ffi.Pointer value, ffi.Pointer cb_data); -typedef Dartsystem_settings_iter_cbFunction = bool Function( - int index, ffi.Pointer value, ffi.Pointer cb_data); - -/// @brief Enumeration for Trace Error. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif -abstract class trace_error_e { - /// < Successful - static const int TRACE_ERROR_NONE = 0; - - /// < I/O error - static const int TRACE_ERROR_IO_ERROR = -5; -} - -/// @ingroup CAPI_USB_HOST_ENDPOINT_MODULE -/// @brief Enumeration of an endpoint's direction. -/// @since_tizen 3.0 -abstract class usb_host_endpoint_direction_e { - /// < IN direction - static const int USB_HOST_DIRECTION_IN = 0; - - /// < OUT direction - static const int USB_HOST_DIRECTION_OUT = 1; -} - -/// @ingroup CAPI_USB_HOST_ENDPOINT_MODULE -/// @brief Enumeration of transfer type. -/// @since_tizen 3.0 -abstract class usb_host_transfer_type_e { - /// < Control transfer - static const int USB_HOST_TRANSFER_TYPE_CONTROL = 0; - - /// < Isochronous transfer - static const int USB_HOST_TRANSFER_TYPE_ISOCHRONOUS = 1; - - /// < Bulk transfer - static const int USB_HOST_TRANSFER_TYPE_BULK = 2; - - /// < Interrupt transfer - static const int USB_HOST_TRANSFER_TYPE_INTERRUPT = 3; -} - -/// @ingroup CAPI_USB_HOST_ENDPOINT_MODULE -/// @brief Enumeration of isochronous endpoint's synchronization type. -/// @since_tizen 3.0 -abstract class usb_host_iso_sync_type_e { - /// < No synchronization - static const int USB_HOST_ISO_SYNC_TYPE_NONE = 0; - - /// < Asynchronous - static const int USB_HOST_ISO_SYNC_TYPE_ASYNC = 1; - - /// < Adaptive - static const int USB_HOST_ISO_SYNC_TYPE_ADAPTIVE = 2; - - /// < Synchronous - static const int USB_HOST_ISO_SYNC_TYPE_SYNC = 3; -} - -/// @ingroup CAPI_USB_HOST_ENDPOINT_MODULE -/// @brief Enumeration of an endpoint's usage type. -/// @since_tizen 3.0 -abstract class usb_host_usage_type_e { - /// < Data endpoint - static const int USB_HOST_USAGE_TYPE_DATA = 0; - - /// < Feedback endpoint - static const int USB_HOST_USAGE_TYPE_FEEDBACK = 1; - - /// < Implicit feedback Data endpoint - static const int USB_HOST_USAGE_TYPE_IMPLICIT = 2; -} - -/// @ingroup CAPI_USB_HOST_MODULE -/// @brief Enumeration of error codes reported by USB host API. -/// @since_tizen 3.0 -abstract class usb_host_error_e { - /// < Successful - static const int USB_HOST_ERROR_NONE = 0; - - /// < I/O error - static const int USB_HOST_ERROR_IO_ERROR = -5; - - /// < Invalid parameter - static const int USB_HOST_ERROR_INVALID_PARAMETER = -22; - - /// < Permission denied - static const int USB_HOST_ERROR_PERMISSION_DENIED = -13; - - /// < No device - static const int USB_HOST_ERROR_NO_SUCH_DEVICE = -6; - - /// < Entity not found - static const int USB_HOST_ERROR_NOT_FOUND = -38469631; - - /// < Resource busy - static const int USB_HOST_ERROR_RESOURCE_BUSY = -16; - - /// < Operation timed out - static const int USB_HOST_ERROR_TIMED_OUT = -1073741823; - - /// < Overflow - static const int USB_HOST_ERROR_OVERFLOW = -38469630; - - /// < Device is not opened - static const int USB_HOST_ERROR_DEVICE_NOT_OPENED = -38469629; - - /// < Pipe error - static const int USB_HOST_ERROR_BROKEN_PIPE = -32; - - /// < System call interrupted - static const int USB_HOST_ERROR_INTERRUPTED_SYS_CALL = -4; - - /// < Insufficient memory - static const int USB_HOST_ERROR_OUT_OF_MEMORY = -12; - - /// < Operation not supported - static const int USB_HOST_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Other error - static const int USB_HOST_ERROR_UNKNOWN = -1073741824; -} - -/// @ingroup CAPI_USB_HOST_HOTPLUG_MODULE -/// @brief Enumeration of hotplug event types. -/// @since_tizen 4.0 -abstract class usb_host_hotplug_event_e { - /// < Device was connected - static const int USB_HOST_HOTPLUG_EVENT_ATTACH = 0; - - /// < Device was disconnected - static const int USB_HOST_HOTPLUG_EVENT_DETACH = 1; - - /// < Any event - static const int USB_HOST_HOTPLUG_EVENT_ANY = 2; -} - -/// @ingroup CAPI_USB_HOST_ASYNC_MODULE -/// @brief Enumeration of transfer status codes. -/// @since_tizen 5.0 -abstract class usb_host_transfer_status_e { - /// < Transfer completed without error - static const int USB_HOST_TRANSFER_COMPLETED = 0; - - /// < Transfer failed - static const int USB_HOST_TRANSFER_ERROR = 1; - - /// < Transfer timed out - static const int USB_HOST_TRANSFER_TIMED_OUT = 2; - - /// < Transfer cancelled - static const int USB_HOST_TRANSFER_CANCELLED = 3; - - /// < Halt condition detected - static const int USB_HOST_TRANSFER_STALL = 4; - - /// < Device was disconnected - static const int USB_HOST_TRANSFER_NO_DEVICE = 5; - - /// < Device sent more data than requested - static const int USB_HOST_TRANSFER_OVERFLOW = 6; - - /// < Unknown status - static const int USB_HOST_TRANSFER_UNKNOWN = 7; -} - -final class usb_host_context_s extends ffi.Opaque {} - -final class usb_host_device_s extends ffi.Opaque {} - -final class usb_host_config_s extends ffi.Opaque {} - -final class usb_host_interface_s extends ffi.Opaque {} - -final class usb_host_endpoint_s extends ffi.Opaque {} - -final class usb_host_hotplug_s extends ffi.Opaque {} - -final class usb_host_transfer_s extends ffi.Opaque {} - -/// @ingroup CAPI_USB_HOST_MODULE -/// @brief Context handle to USB host. -/// @details This structure represents usb_host session. -/// Using own session allows to use this API independently. -/// For example calling usb_host_destroy() will not destroy resources -/// that are being used by another user of the library. -/// -/// To create session there is need to call usb_host_create(), -/// to destroy call usb_host_destroy(). Each session created by usb_host_create() -/// has to be destroyed using usb_host_destroy() -/// @since_tizen 3.0 -typedef usb_host_context_h = ffi.Pointer; - -/// @ingroup CAPI_USB_HOST_DEV_MODULE -/// @brief Structure representing USB device. -/// @details This structure represents USB device found on USB bus. -/// -/// This can be obtained by usb_host_get_device_list() or usb_host_device_open_with_vid_pidi(). -/// Some basic operations can be performed on closed device obtained by usb_host_device_list(). -/// To perform any I/O operations the device must be opened by calling usb_host_device_open() -/// or usb_host_device_open_with_vid_pid(). -/// -/// @since_tizen 3.0 -typedef usb_host_device_h = ffi.Pointer; - -/// @ingroup CAPI_USB_HOST_CONFIG_MODULE -/// @brief USB config handle. -/// @details This type represents USB device configuration. Device can have multiple configurations, -/// a configuration can have multiple interfaces. This handle can be obtained by -/// usb_host_device_get_config(). -/// @since_tizen 3.0 -typedef usb_host_config_h = ffi.Pointer; - -/// @ingroup CAPI_USB_HOST_INTERFACE_MODULE -/// @brief USB interface handle. -/// @details This type represents USB interface. An interface is a part of configuration and -/// can have multiple endpoints. This handle can be obtained by usb_host_config_get_interface(). -/// @since_tizen 3.0 -typedef usb_host_interface_h = ffi.Pointer; - -/// @ingroup CAPI_USB_HOST_ENDPOINT_MODULE -/// @brief USB endpoint handle. -/// @details This type represents USB endpoint. This handle can be obtained by -/// usb_host_interface_get_endpoint(). -/// @since_tizen 3.0 -typedef usb_host_endpoint_h = ffi.Pointer; - -/// @ingroup CAPI_USB_HOST_HOTPLUG_MODULE -/// @brief Device connected/disconnected event handler. -/// @details The device handle should be unreffed with usb_host_unref_device() -/// when no longer needed. -/// @since_tizen 4.0 -/// @param[in] dev Device which was connected/disconnected -/// @param[in] user_data User data pointer passed on callback registration -typedef usb_host_hotplug_cb - = ffi.Pointer>; -typedef usb_host_hotplug_cbFunction = ffi.Void Function( - usb_host_device_h dev, ffi.Pointer user_data); -typedef Dartusb_host_hotplug_cbFunction = void Function( - usb_host_device_h dev, ffi.Pointer user_data); - -/// @ingroup CAPI_USB_HOST_HOTPLUG_MODULE -/// @brief USB hotplug callback handle. -/// @details This handle is used for managing registered hotplug callbacks. -/// @since_tizen 4.0 -typedef usb_host_hotplug_h = ffi.Pointer; - -/// @ingroup CAPI_USB_HOST_ASYNC_MODULE -/// @brief Called when asynchronous transfers finishes. -/// @since_tizen 5.0 -/// @param[in] transfer Transfer for which this callback was set -/// @param[in] user_data User data pointer passed on callback registration -typedef usb_host_transferred_cb - = ffi.Pointer>; -typedef usb_host_transferred_cbFunction = ffi.Void Function( - usb_host_transfer_h transfer, ffi.Pointer user_data); -typedef Dartusb_host_transferred_cbFunction = void Function( - usb_host_transfer_h transfer, ffi.Pointer user_data); - -/// @ingroup CAPI_USB_HOST_ASYNC_MODULE -/// @brief USB asynchronous transfer handle. -/// @details This type represents an asynchronous USB transfer. -/// @since_tizen 5.0 -typedef usb_host_transfer_h = ffi.Pointer; - -/// @brief Enumeration for the update control error. -/// @since_tizen 5.0 -abstract class update_control_error_e { - /// < Successful - static const int UPDATE_CONTROL_ERROR_NONE = 0; - - /// < Invalid parameter - static const int UPDATE_CONTROL_ERROR_INVALID_PARAMETER = -22; - - /// < Out of memory - static const int UPDATE_CONTROL_ERROR_OUT_OF_MEMORY = -12; - - /// < No space left on device - static const int UPDATE_CONTROL_ERROR_FILE_NO_SPACE_ON_DEVICE = -28; - - /// < Specified key is not found - static const int UPDATE_CONTROL_ERROR_KEY_NOT_FOUND = -126; - - /// < Key is not available - static const int UPDATE_CONTROL_ERROR_KEY_REJECTED = -129; - - /// < Not supported - static const int UPDATE_CONTROL_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Permission denied - static const int UPDATE_CONTROL_ERROR_PERMISSION_DENIED = -13; - - /// < Software caused connection abort - static const int UPDATE_CONTROL_ERROR_CONNECTION_ABORTED = -103; - - /// < Connection refused - static const int UPDATE_CONTROL_ERROR_CONNECTION_REFUSED = -111; - - /// < Protocol not supported - static const int UPDATE_CONTROL_ERROR_PROTOCOL_NOT_SUPPORTED = -93; - - /// < Time out - static const int UPDATE_CONTROL_ERROR_TIMED_OUT = -1073741823; - - /// < Function not implemented - static const int UPDATE_CONTROL_ERROR_INVALID_OPERATION = -38; - - /// < Invalid package - static const int UPDATE_CONTROL_ERROR_INVALID_PACKAGE = -803143679; - - /// < Invalid URI - static const int UPDATE_CONTROL_ERROR_INVALID_URI = -803143678; - - /// < Package type not supported - static const int UPDATE_CONTROL_ERROR_PACKAGE_NOT_SUPPORTED = -803143677; - - /// < System error - static const int UPDATE_CONTROL_ERROR_SYSTEM_ERROR = -803143676; -} - -/// @brief Enumeration for the update control properties. -/// @since_tizen 5.0 -abstract class update_control_property_e { - /// < New version - static const int UPDATE_CONTROL_PROPERTY_NEW_VERSION = 0; - - /// < URI for update package - static const int UPDATE_CONTROL_PROPERTY_PACKAGE_URI = 1; - - /// < Update result - static const int UPDATE_CONTROL_PROPERTY_RESULT = 2; - - /// < Size of update package - static const int UPDATE_CONTROL_PROPERTY_PACKAGE_SIZE = 3; - - /// < Update description - static const int UPDATE_CONTROL_PROPERTY_DESCRIPTION = 4; - - /// < Updatability flag - static const int UPDATE_CONTROL_PROPERTY_UPDATE_AVAILABLE = 5; -} - -/// @brief Enumeration for Clipboard Data Type. -/// @since_tizen 3.0 -abstract class cbhm_sel_type_e { - static const int CBHM_SEL_TYPE_NONE = 0; - - /// Content is from outside of Elementary - static const int CBHM_SEL_TYPE_TEXT = 1; - - /// Plain unformatted text: Used for things that don't want rich markup - static const int CBHM_SEL_TYPE_MARKUP = 2; - - /// Edje textblock markup, including inline images - static const int CBHM_SEL_TYPE_IMAGE = 4; - - /// Images - static const int CBHM_SEL_TYPE_HTML = 8; -} - -/// @brief Enumeration for Clipboard State Type. -/// @since_tizen 3.0 -abstract class cbhm_state_type_e { - static const int CBHM_STATE_NONE = 0; - static const int CBHM_STATE_SHOW = 1; - static const int CBHM_STATE_HIDE = 2; -} - -/// @brief Enumeration for Clipboard Error Codes. -/// @since_tizen 3.0 -abstract class cbhm_error_e { - /// < Successful - static const int CBHM_ERROR_NONE = 0; - - /// < Out of memory - static const int CBHM_ERROR_OUT_OF_MEMORY = -12; - - /// < Not supported - static const int CBHM_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Invalid parameter - static const int CBHM_ERROR_INVALID_PARAMETER = -22; - - /// < No data available - static const int CBHM_ERROR_NO_DATA = -61; - - /// < Connection refused - static const int CBHM_ERROR_CONNECTION_REFUSED = -111; - - /// < Address already in use - static const int CBHM_ERROR_ADDRES_IN_USE = -98; -} - -final class cbhm extends ffi.Opaque {} - -/// @brief Clipboard handle. -/// @since_tizen 3.0 -typedef cbhm_h = ffi.Pointer; - -/// @brief Event callback signature of selecting a clipboard item. -/// @since_tizen 3.0 -/// @param[in] cbhm_handle Clipboard handle -/// @param[in] user_data User data to be passed to the given event callback function -/// @return This is reserved -/// @see cbhm_item_selected_callback_add() -typedef cbhm_selected_cb - = ffi.Pointer>; -typedef cbhm_selected_cbFunction = ffi.Int Function( - cbhm_h cbhm_handle, ffi.Pointer user_data); -typedef Dartcbhm_selected_cbFunction = int Function( - cbhm_h cbhm_handle, ffi.Pointer user_data); - -/// @brief Event callback signature of receiving data from clipboard. -/// @since_tizen 3.0 -/// @param[in] Clipboard handle -/// @param[out] buf Buffer for receiving data -/// @param[in] len The length of buffer -/// @param[in] user_data User data to be passed to the given event callback function -/// @return This is reserved -/// @see cbhm_item_selected_callback_add() -typedef cbhm_selection_data_cb - = ffi.Pointer>; -typedef cbhm_selection_data_cbFunction = ffi.Int Function(cbhm_h cbhm_handle, - ffi.Pointer buf, ffi.Size len, ffi.Pointer user_data); -typedef Dartcbhm_selection_data_cbFunction = int Function(cbhm_h cbhm_handle, - ffi.Pointer buf, int len, ffi.Pointer user_data); - -/// @brief Event callback signature for receiving changed event of clipboard items. -/// @since_tizen 4.0 -/// @param[in] cbhm_handle The clipboard handle -/// @remarks @a cbhm_handle is the same handle as the one used in the cbhm_item_changed_callback_add() call with which the callback was added -/// @param[in] item_count The number of clipboard items -/// @param[in] user_data User data to be passed to the given event callback function -/// @return #CBHM_ERROR_NONE on success, -/// otherwise a negative error value -/// @retval #CBHM_ERROR_NONE Successful -/// @see cbhm_item_selected_callback_add() -typedef cbhm_item_changed_cb - = ffi.Pointer>; -typedef cbhm_item_changed_cbFunction = ffi.Void Function( - cbhm_h cbhm_handle, ffi.Int item_count, ffi.Pointer user_data); -typedef Dartcbhm_item_changed_cbFunction = void Function( - cbhm_h cbhm_handle, int item_count, ffi.Pointer user_data); - -/// @brief Event callback signature of receiving monitored event of clipboard. -/// @since_tizen 4.0 -/// @param[in] cbhm_handle Clipboard handle -/// @param[in] active_state Clipboard is active if @c true, inactive otherwise -/// @param[in] user_data User data to be passed to the given event callback function -/// @see cbhm_monitor_callback_add() -/// @see cbhm_monitor_callback_remove() -typedef cbhm_monitor_cb - = ffi.Pointer>; -typedef cbhm_monitor_cbFunction = ffi.Void Function( - cbhm_h cbhm_handle, ffi.Bool active_state, ffi.Pointer user_data); -typedef Dartcbhm_monitor_cbFunction = void Function( - cbhm_h cbhm_handle, bool active_state, ffi.Pointer user_data); - -/// @brief Enumeration of External Output Manager (EOM) error type -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class eom_error_e { - /// < Success - static const int EOM_ERROR_NONE = 0; - - /// < Memory allocation failure - static const int EOM_ERROR_OUT_OF_MEMORY = -12; - - /// < Invalid input parameter - static const int EOM_ERROR_INVALID_PARAMETER = -22; - - /// < Invalid external output instance - static const int EOM_ERROR_NO_SUCH_DEVICE = -6; - - /// < Connection failure - static const int EOM_ERROR_CONNECTION_FAILURE = -42205183; - - /// < Message sending failure - static const int EOM_ERROR_MESSAGE_SENDING_FAILURE = -42205182; - - /// < Message operation failure - static const int EOM_ERROR_MESSAGE_OPERATION_FAILURE = -42205181; -} - -/// @brief Enumeration of external output type -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class eom_output_type_e { - /// < Unknown output type - static const int EOM_OUTPUT_TYPE_UNKNOWN = 0; - - /// < VGA output - static const int EOM_OUTPUT_TYPE_VGA = 1; - - /// < DVII output type - static const int EOM_OUTPUT_TYPE_DVII = 2; - - /// < DVID output type - static const int EOM_OUTPUT_TYPE_DVID = 3; - - /// < DVIA output type - static const int EOM_OUTPUT_TYPE_DVIA = 4; - - /// < Composite output type - static const int EOM_OUTPUT_TYPE_COMPOSITE = 5; - - /// < SVIDEO output type - static const int EOM_OUTPUT_TYPE_SVIDEO = 6; - - /// < LVDS output type - static const int EOM_OUTPUT_TYPE_LVDS = 7; - - /// < Component output type - static const int EOM_OUTPUT_TYPE_COMPONENT = 8; - - /// < 9PinDIN output type - static const int EOM_OUTPUT_TYPE_9PINDIN = 9; - - /// < DisplayPort output type - static const int EOM_OUTPUT_TYPE_DISPLAYPORT = 10; - - /// < HDMIA output type - static const int EOM_OUTPUT_TYPE_HDMIA = 11; - - /// < HDMIB output type - static const int EOM_OUTPUT_TYPE_HDMIB = 12; - - /// < TV output type - static const int EOM_OUTPUT_TYPE_TV = 13; - - /// < EDP output type - static const int EOM_OUTPUT_TYPE_EDP = 14; - - /// < VIRTUAL output type - static const int EOM_OUTPUT_TYPE_VIRTUAL = 15; - - /// < DSI output type - static const int EOM_OUTPUT_TYPE_DSI = 16; - static const int EOM_OUTPUT_TYPE_MAX = 17; -} - -/// @brief Enumeration of external output mode -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class eom_output_mode_e { - /// < None - static const int EOM_OUTPUT_MODE_NONE = 0; - - /// < Mirror mode - static const int EOM_OUTPUT_MODE_MIRROR = 1; - - /// < Presentation mode - static const int EOM_OUTPUT_MODE_PRESENTATION = 2; - static const int EOM_OUTPUT_MODE_MAX = 3; -} - -/// @brief Enumeration of External Output Manager (EOM) attributes -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class eom_output_attribute_e { - /// < None - static const int EOM_OUTPUT_ATTRIBUTE_NONE = 0; - - /// < Normal presentation mode window showing on external output - static const int EOM_OUTPUT_ATTRIBUTE_NORMAL = 1; - - /// < Exclusive share presentation mode window showing on external output - static const int EOM_OUTPUT_ATTRIBUTE_EXCLUSIVE_SHARE = 2; - - /// < Exclusive presentation mode window showing on external output - static const int EOM_OUTPUT_ATTRIBUTE_EXCLUSIVE = 3; - static const int EOM_OUTPUT_ATTRIBUTE_MAX = 4; -} - -/// @brief Enumeration of External Output Manager (EOM) attribute state -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class eom_output_attribute_state_e { - /// < None - static const int EOM_OUTPUT_ATTRIBUTE_STATE_NONE = 0; - - /// < Output attribute is active - static const int EOM_OUTPUT_ATTRIBUTE_STATE_ACTIVE = 1; - - /// < Output attribute is inactive - static const int EOM_OUTPUT_ATTRIBUTE_STATE_INACTIVE = 2; - - /// < Cannot use external output - static const int EOM_OUTPUT_ATTRIBUTE_STATE_LOST = 3; - static const int EOM_OUTPUT_ATTRIBUTE_STATE_MAX = 4; -} - -/// @brief Called when External Output Manager (EOM) module sends output -/// connection notification. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] output_id The output id which is connected output -/// @param[in] user_data The pointer of user data which is passed to -/// eom_output_added_cb function -/// @see eom_set_output_added_cb() -/// @see eom_unset_output_added_cb() -typedef eom_output_added_cb - = ffi.Pointer>; -typedef eom_output_added_cbFunction = ffi.Void Function( - eom_output_id output_id, ffi.Pointer user_data); -typedef Darteom_output_added_cbFunction = void Function( - Darteom_output_id output_id, ffi.Pointer user_data); - -/// @brief Definition for external output ID -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -typedef eom_output_id = ffi.UnsignedInt; -typedef Darteom_output_id = int; - -/// @brief Called when External Output Manager (EOM) module sends output -/// disconnection notification. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] output_id The output id which is connected output -/// @param[in] user_data The pointer of user data which is passed to -/// eom_output_removed_cb function -/// @see eom_set_output_removed_cb() -/// @see eom_unset_output_removed_cb() -typedef eom_output_removed_cb - = ffi.Pointer>; -typedef eom_output_removed_cbFunction = ffi.Void Function( - eom_output_id output_id, ffi.Pointer user_data); -typedef Darteom_output_removed_cbFunction = void Function( - Darteom_output_id output_id, ffi.Pointer user_data); - -/// @brief Called when External Output Manager (EOM) module sends output -/// mode changing notification. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] output_id The output id which is connected output -/// @param[in] user_data The pointer of user data which is passed to -/// eom_mode_changed_cb function -/// @see eom_set_mode_changed_cb() -/// @see eom_unset_mode_changed_cb() -typedef eom_mode_changed_cb - = ffi.Pointer>; -typedef eom_mode_changed_cbFunction = ffi.Void Function( - eom_output_id output_id, ffi.Pointer user_data); -typedef Darteom_mode_changed_cbFunction = void Function( - Darteom_output_id output_id, ffi.Pointer user_data); - -/// @brief Called when External Output Manager (EOM) module sends output -/// attribute changing notification. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] output_id The output id which is connected output -/// @param[in] user_data The pointer of user data which is passed to -/// eom_attribute_changed_cb function -/// @see eom_set_attribute_changed_cb() -/// @see eom_unset_attribute_changed_cb() -typedef eom_attribute_changed_cb - = ffi.Pointer>; -typedef eom_attribute_changed_cbFunction = ffi.Void Function( - eom_output_id output_id, ffi.Pointer user_data); -typedef Darteom_attribute_changed_cbFunction = void Function( - Darteom_output_id output_id, ffi.Pointer user_data); -typedef Evas_Object = Efl_Canvas_Object; - -/// @typedef Evas_Object -/// An Evas Object handle. -/// @ingroup Evas_Object_Group -typedef Efl_Canvas_Object = Eo; - -/// @typedef Eo -/// The basic Object type. -typedef Eo = _Eo_Opaque; - -final class _Eo_Opaque extends ffi.Opaque {} - -/// @brief Enumeration for input method function error -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -abstract class ime_error_e { - /// < Successful - static const int IME_ERROR_NONE = 0; - - /// < Invalid parameter - static const int IME_ERROR_INVALID_PARAMETER = -22; - - /// < Permission denied - static const int IME_ERROR_PERMISSION_DENIED = -13; - - /// < Necessary callback function is not set - static const int IME_ERROR_NO_CALLBACK_FUNCTION = -49414143; - - /// < IME main loop isn't started yet - static const int IME_ERROR_NOT_RUNNING = -49414142; - - /// < Operation failed - static const int IME_ERROR_OPERATION_FAILED = -49414141; - - /// < out of memory - static const int IME_ERROR_OUT_OF_MEMORY = -12; -} - -/// @brief Enumeration of the option window type -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @see ime_option_window_created_cb() -abstract class ime_option_window_type_e { - /// < Open from Keyboard - static const int IME_OPTION_WINDOW_TYPE_KEYBOARD = 0; - - /// < Open from Setting application - static const int IME_OPTION_WINDOW_TYPE_SETTING_APPLICATION = 1; -} - -/// @brief Enumeration of layout variation -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @see ime_context_get_layout_variation() -abstract class ime_layout_variation_e { - /// < The plain normal layout - static const int IME_LAYOUT_NORMAL_VARIATION_NORMAL = 0; - - /// < Filename layout; symbols such as '/', '*', '\', '|', '<', '>', '?', '"' and ':' should be disabled - static const int IME_LAYOUT_NORMAL_VARIATION_FILENAME = 1; - - /// < The name of a person - static const int IME_LAYOUT_NORMAL_VARIATION_PERSON_NAME = 2; - - /// < The plain normal number layout - static const int IME_LAYOUT_NUMBERONLY_VARIATION_NORMAL = 0; - - /// < The number layout to allow a negative sign - static const int IME_LAYOUT_NUMBERONLY_VARIATION_SIGNED = 1; - - /// < The number layout to allow decimal point to provide fractional value - static const int IME_LAYOUT_NUMBERONLY_VARIATION_DECIMAL = 2; - - /// < The number layout to allow decimal point and negative sign - static const int IME_LAYOUT_NUMBERONLY_VARIATION_SIGNED_AND_DECIMAL = 3; - - /// < The normal password layout - static const int IME_LAYOUT_PASSWORD_VARIATION_NORMAL = 0; - - /// < The password layout to allow only number - static const int IME_LAYOUT_PASSWORD_VARIATION_NUMBERONLY = 1; -} - -/// @brief Enumeration of string attribute type -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @remarks Currently, a font style is available to use. -/// -/// @see ime_preedit_attribute() -/// @see ime_update_preedit_string() -abstract class ime_attribute_type { - /// < No attribute - static const int IME_ATTR_NONE = 0; - - /// < A font style attribute, e.g., underline, etc. - static const int IME_ATTR_FONTSTYLE = 1; -} - -/// @brief The structure type to contain the attributes for preedit string. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @remarks A preedit string may have one or more different attributes. This structure describes each attribute of the string. -/// -/// @see ime_update_preedit_string() -/// @see ime_attribute_type -final class ime_preedit_attribute extends ffi.Struct { - /// < The start position in the string of this attribute - @ffi.UnsignedInt() - external int start; - - /// < The character length of this attribute, the range is [start, start+length] - @ffi.UnsignedInt() - external int length; - - /// < The type of this attribute - @ffi.Int32() - external int type; - - /// < The value of this attribute - @ffi.UnsignedInt() - external int value; -} - -final class _ime_context extends ffi.Opaque {} - -final class _ime_device_info extends ffi.Opaque {} - -/// @brief The structure type to contain the set of the essential callback functions for IME application lifecycle and appearance. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @remarks These four callback functions are mandatory for IME application. -/// -/// @see ime_run() -final class ime_callback_s extends ffi.Struct { - /// < Called when the input panel is created - external ime_create_cb create; - - /// < Called when the input panel is terminated - external ime_terminate_cb terminate; - - /// < Called when the input panel is requested to show itself - external ime_show_cb show1; - - /// < Called when the input panel is requested to hide itself - external ime_hide_cb hide1; -} - -/// @brief Called when the input panel is created. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks This callback function is mandatory and must be registered using ime_run(). The -/// ime_get_main_window() can be used to get the created input panel window. -/// -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The ime_run() function calls this callback function. -/// -/// @see ime_run() -/// @see ime_set_size() -/// @see ime_get_main_window() -typedef ime_create_cb = ffi.Pointer>; -typedef ime_create_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartime_create_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Called when the input panel is terminated. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks This callback function is mandatory and must be registered using ime_run(). The -/// ime_get_main_window() can be used to get the created input panel window. -/// -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @see ime_run() -/// @see ime_get_main_window() -typedef ime_terminate_cb - = ffi.Pointer>; -typedef ime_terminate_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartime_terminate_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Called when an associated text input UI control requests the input panel to show itself. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks This callback function is mandatory and must be registered using ime_run(). -/// IME application should configure its input panel with #ime_context_h structure information. -/// The ime_get_main_window() can be used to get the created input panel window. -/// -/// @param[in] context_id The input context identification value of an associated text input UI control -/// @param[in] context The input context information handle -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @see ime_run() -/// @see ime_get_main_window() -/// @see ime_context_get_layout() -/// @see ime_context_get_layout_variation() -/// @see ime_context_get_cursor_position() -/// @see ime_context_get_autocapital_type() -/// @see ime_context_get_return_key_type() -/// @see ime_context_get_return_key_state() -/// @see ime_context_get_prediction_mode() -/// @see ime_context_get_password_mode() -/// @see ime_context_get_input_hint() -/// @see ime_context_get_bidi_direction() -/// @see ime_context_get_language() -typedef ime_show_cb = ffi.Pointer>; -typedef ime_show_cbFunction = ffi.Void Function( - ffi.Int context_id, ime_context_h context, ffi.Pointer user_data); -typedef Dartime_show_cbFunction = void Function( - int context_id, ime_context_h context, ffi.Pointer user_data); - -/// @brief Handle of an associated text input UI control's input context. -/// -/// @details This is one of parameters of ime_show_cb() callback function. IME application -/// should configure its input panel with this structure information. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @see ime_context_get_layout() -/// @see ime_context_get_layout_variation() -/// @see ime_context_get_cursor_position() -/// @see ime_context_get_autocapital_type() -/// @see ime_context_get_return_key_type() -/// @see ime_context_get_return_key_state() -/// @see ime_context_get_prediction_mode() -/// @see ime_context_get_password_mode() -/// @see ime_context_get_input_hint() -/// @see ime_context_get_bidi_direction() -/// @see ime_context_get_language() -typedef ime_context_h = ffi.Pointer<_ime_context>; - -/// @brief Called when an associated text input UI control requests the input panel to hide itself. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks This callback function is mandatory and must be registered using ime_run(). The -/// ime_get_main_window() can be used to get the created input panel window. -/// -/// @param[in] context_id The input context identification value of an associated text input UI control -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @see ime_run() -/// @see ime_get_main_window() -typedef ime_hide_cb = ffi.Pointer>; -typedef ime_hide_cbFunction = ffi.Void Function( - ffi.Int context_id, ffi.Pointer user_data); -typedef Dartime_hide_cbFunction = void Function( - int context_id, ffi.Pointer user_data); - -/// @brief Called when an associated text input UI control has focus. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @param[in] context_id The input context identification value of an associated text input UI control -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_focus_in_cb() function. -/// -/// @see ime_event_set_focus_in_cb() -typedef ime_focus_in_cb - = ffi.Pointer>; -typedef ime_focus_in_cbFunction = ffi.Void Function( - ffi.Int context_id, ffi.Pointer user_data); -typedef Dartime_focus_in_cbFunction = void Function( - int context_id, ffi.Pointer user_data); - -/// @brief Called when an associated text input UI control loses focus. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @param[in] context_id The input context identification value of an associated text input UI control -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_focus_out_cb() function. -/// -/// @see ime_event_set_focus_out_cb() -typedef ime_focus_out_cb - = ffi.Pointer>; -typedef ime_focus_out_cbFunction = ffi.Void Function( - ffi.Int context_id, ffi.Pointer user_data); -typedef Dartime_focus_out_cbFunction = void Function( - int context_id, ffi.Pointer user_data); - -/// @brief Called when an associated text input UI control responds to a request with the surrounding text. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks The ime_request_surrounding_text() must be called to invoke this callback function, asynchronously. -/// -/// @param[in] context_id The input context identification value of an associated text input UI control -/// @param[in] text The UTF-8 string requested -/// @param[in] cursor_pos The cursor position -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_surrounding_text_updated_cb() function. -/// -/// @see ime_event_set_surrounding_text_updated_cb() -/// @see ime_request_surrounding_text() -typedef ime_surrounding_text_updated_cb - = ffi.Pointer>; -typedef ime_surrounding_text_updated_cbFunction = ffi.Void Function( - ffi.Int context_id, - ffi.Pointer text, - ffi.Int cursor_pos, - ffi.Pointer user_data); -typedef Dartime_surrounding_text_updated_cbFunction = void Function( - int context_id, - ffi.Pointer text, - int cursor_pos, - ffi.Pointer user_data); - -/// @brief Called to reset the input context of an associated text input UI control. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_input_context_reset_cb() function. -/// -/// @see ime_event_set_input_context_reset_cb() -typedef ime_input_context_reset_cb - = ffi.Pointer>; -typedef ime_input_context_reset_cbFunction = ffi.Void Function( - ffi.Pointer user_data); -typedef Dartime_input_context_reset_cbFunction = void Function( - ffi.Pointer user_data); - -/// @brief Called when the position of the cursor in an associated text input UI control changes. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @param[in] cursor_pos The cursor position -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_cursor_position_updated_cb() function. -/// -/// @see ime_event_set_cursor_position_updated_cb() -typedef ime_cursor_position_updated_cb - = ffi.Pointer>; -typedef ime_cursor_position_updated_cbFunction = ffi.Void Function( - ffi.Int cursor_pos, ffi.Pointer user_data); -typedef Dartime_cursor_position_updated_cbFunction = void Function( - int cursor_pos, ffi.Pointer user_data); - -/// @brief Called when an associated text input UI control requests the language from the input panel. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks The allocated @a lang_code will be released internally. -/// -/// @param[in] user_data User data to be passed from the callback registration function -/// @param[out] lang_code Input panel's current input language code (e.g., "en_US") -/// -/// @pre The callback can be registered using ime_event_set_language_requested_cb() function. -/// -/// @see ime_event_set_language_requested_cb() -typedef ime_language_requested_cb - = ffi.Pointer>; -typedef ime_language_requested_cbFunction = ffi.Void Function( - ffi.Pointer user_data, - ffi.Pointer> lang_code); -typedef Dartime_language_requested_cbFunction = void Function( - ffi.Pointer user_data, - ffi.Pointer> lang_code); - -/// @brief Called to set the preferred language to the input panel. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks @a language information is already set to the input panel when it is shown -/// through #ime_context_h. This callback function will be only called when the client -/// application changes the edit field's language attribute after the input panel is shown. -/// -/// @param[in] language The preferred language that the client application wants -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_language_set_cb() function. -/// -/// @see ime_event_set_language_set_cb() -typedef ime_language_set_cb - = ffi.Pointer>; -typedef ime_language_set_cbFunction = ffi.Void Function( - ffi.Int32 language, ffi.Pointer user_data); -typedef Dartime_language_set_cbFunction = void Function( - int language, ffi.Pointer user_data); - -/// @typedef Ecore_IMF_Input_Panel_Lang -/// -/// Input panel (virtual keyboard) language modes. -/// -/// @see ecore_imf_context_input_panel_language_set() -abstract class Ecore_IMF_Input_Panel_Lang { - /// < Automatic @since 1.2 - static const int ECORE_IMF_INPUT_PANEL_LANG_AUTOMATIC = 0; - - /// < Alphabet @since 1.2 - static const int ECORE_IMF_INPUT_PANEL_LANG_ALPHABET = 1; -} - -/// @brief Called to set the application specific data to deliver to the input panel. -/// -/// @details This API is used by the applications to deliver the specific data to the input panel. -/// The data format MUST be negotiated by both application and input panel. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @param[in] data The specific data to be set to the input panel -/// @param[in] data_length The length of data, in bytes, to send to the input panel -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_imdata_set_cb() function. -/// -/// @see ime_event_set_imdata_set_cb() -typedef ime_imdata_set_cb - = ffi.Pointer>; -typedef ime_imdata_set_cbFunction = ffi.Void Function( - ffi.Pointer data, - ffi.UnsignedInt data_length, - ffi.Pointer user_data); -typedef Dartime_imdata_set_cbFunction = void Function( - ffi.Pointer data, - int data_length, - ffi.Pointer user_data); - -/// @brief Called when an associated text input UI control requests the application specific data from the input panel. -/// -/// @details This API is used by the applications to request the specific data from the input panel. -/// The data format MUST be negotiated by both application and input panel. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks The allocated @a data will be released internally. -/// -/// @param[in] user_data User data to be passed from the callback registration function -/// @param[out] data Input panel's data to be set to the application -/// @param[out] data_length The length of data, in bytes, to send to the application -/// -/// @pre The callback can be registered using ime_event_set_imdata_requested_cb() function. -/// -/// @see ime_event_set_imdata_requested_cb() -typedef ime_imdata_requested_cb - = ffi.Pointer>; -typedef ime_imdata_requested_cbFunction = ffi.Void Function( - ffi.Pointer user_data, - ffi.Pointer> data, - ffi.Pointer data_length); -typedef Dartime_imdata_requested_cbFunction = void Function( - ffi.Pointer user_data, - ffi.Pointer> data, - ffi.Pointer data_length); - -/// @brief Called when an associated text input UI control requests the input panel to set its layout. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks @a layout information is already set to the input panel when it is shown -/// through #ime_context_h. This callback function will be only called when the client -/// application changes the edit field's layout attribute after the input panel is shown. -/// -/// @param[in] layout The input panel layout -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_layout_set_cb() function. -/// -/// @see ime_event_set_layout_set_cb() -typedef ime_layout_set_cb - = ffi.Pointer>; -typedef ime_layout_set_cbFunction = ffi.Void Function( - ffi.Int32 layout, ffi.Pointer user_data); -typedef Dartime_layout_set_cbFunction = void Function( - int layout, ffi.Pointer user_data); - -/// @typedef Ecore_IMF_Input_Panel_Layout -/// -/// Input panel (virtual keyboard) layout types. -/// -/// @see ecore_imf_context_input_panel_layout_set() -abstract class Ecore_IMF_Input_Panel_Layout { - /// < Default layout - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL = 0; - - /// < Number layout - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBER = 1; - - /// < Email layout - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_EMAIL = 2; - - /// < URL layout - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_URL = 3; - - /// < Phone Number layout - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_PHONENUMBER = 4; - - /// < IP layout - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_IP = 5; - - /// < Month layout - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_MONTH = 6; - - /// < Number Only layout - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY = 7; - - /// < Never use this - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID = 8; - - /// < Hexadecimal layout @since 1.2 - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_HEX = 9; - - /// < Command-line terminal layout including ESC, Alt, Ctrl key, so on (no auto-correct, no auto-capitalization) @since 1.2 - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_TERMINAL = 10; - - /// < Like normal, but no auto-correct, no auto-capitalization etc. @since 1.2 - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD = 11; - - /// < Date and time layout @since 1.8 - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_DATETIME = 12; - - /// < Emoticon layout @since 1.10 - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_EMOTICON = 13; - - /// < Voice layout, but if the IME does not support voice layout, then normal layout will be shown @since 1.19 - static const int ECORE_IMF_INPUT_PANEL_LAYOUT_VOICE = 14; -} - -/// @brief Called when an associated text input UI control requests the input panel to set the @c Return key label. -/// The input panel can show text or image on the @c Return button according to the @c Return key action. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks @a type information is already set to the input panel when it is shown -/// through #ime_context_h. This callback function will be only called when the client -/// application changes the edit field's @c Return key type attribute after the input panel -/// is shown. -/// -/// @param[in] type The type of @c Return key on the input panel -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_return_key_type_set_cb() function. -/// -/// @see ime_event_set_return_key_type_set_cb() -typedef ime_return_key_type_set_cb - = ffi.Pointer>; -typedef ime_return_key_type_set_cbFunction = ffi.Void Function( - ffi.Int32 type, ffi.Pointer user_data); -typedef Dartime_return_key_type_set_cbFunction = void Function( - int type, ffi.Pointer user_data); - -/// @typedef Ecore_IMF_Input_Panel_Return_Key_Type -/// -/// "Return" Key types on the input panel (virtual keyboard). -/// -/// @see ecore_imf_context_input_panel_return_key_type_set() -abstract class Ecore_IMF_Input_Panel_Return_Key_Type { - /// < Default @since 1.2 - static const int ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT = 0; - - /// < Done @since 1.2 - static const int ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DONE = 1; - - /// < Go @since 1.2 - static const int ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_GO = 2; - - /// < Join @since 1.2 - static const int ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_JOIN = 3; - - /// < Login @since 1.2 - static const int ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN = 4; - - /// < Next @since 1.2 - static const int ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_NEXT = 5; - - /// < Search or magnifier icon @since 1.2 - static const int ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH = 6; - - /// < Send @since 1.2 - static const int ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEND = 7; - - /// < Sign-in @since 1.8 - static const int ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SIGNIN = 8; -} - -/// @brief Called when an associated text input UI control requests the input panel to enable -/// or disable the @c Return key state. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks @a disabled information is already set to the input panel when it is shown -/// through #ime_context_h. This callback function will be only called when the client -/// application changes the edit field's @c Return key disable attribute after the input panel -/// is shown. -/// -/// @param[in] disabled The Boolean state to disable @c Return key. The @c Return key is enabled by default -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_return_key_state_set_cb() function. -/// -/// @see ime_event_set_return_key_state_set_cb() -typedef ime_return_key_state_set_cb - = ffi.Pointer>; -typedef ime_return_key_state_set_cbFunction = ffi.Void Function( - ffi.Bool disabled, ffi.Pointer user_data); -typedef Dartime_return_key_state_set_cbFunction = void Function( - bool disabled, ffi.Pointer user_data); - -/// @brief Called when an associated text input UI control requests the position and size from the input panel. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @param[in] user_data User data to be passed from the callback registration function -/// @param[out] x The x position in screen -/// @param[out] y The y position in screen -/// @param[out] w The window width -/// @param[out] h The window height -/// -/// @pre The callback can be registered using ime_event_set_geometry_requested_cb() function. -/// -/// @see ime_event_set_geometry_requested_cb() -typedef ime_geometry_requested_cb - = ffi.Pointer>; -typedef ime_geometry_requested_cbFunction = ffi.Void Function( - ffi.Pointer user_data, - ffi.Pointer x, - ffi.Pointer y, - ffi.Pointer w, - ffi.Pointer h); -typedef Dartime_geometry_requested_cbFunction = void Function( - ffi.Pointer user_data, - ffi.Pointer x, - ffi.Pointer y, - ffi.Pointer w, - ffi.Pointer h); - -/// @brief Called when the key event is received from the external devices or ime_send_key_event() function. -/// -/// @details This function processes the key event before an associated text input UI control does. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks If the key event is from the external device, @a dev_info will have its name, class and subclass information. -/// -/// @param[in] keycode The key code to be sent -/// @param[in] keymask The modifier key mask -/// @param[in] dev_info The device information handle -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @return @c true if the event is processed, otherwise the event is not processed and is forwarded to the client application. -/// -/// @pre The callback can be registered using ime_event_set_process_key_event_cb() function. -/// -/// @see ime_event_set_process_key_event_cb() -/// @see ime_device_info_get_name() -/// @see ime_device_info_get_class() -/// @see ime_device_info_get_subclass() -/// @see ime_send_key_event() -/// @see ime_commit_string() -/// @see ime_show_preedit_string() -/// @see ime_hide_preedit_string() -/// @see ime_update_preedit_string() -typedef ime_process_key_event_cb - = ffi.Pointer>; -typedef ime_process_key_event_cbFunction = ffi.Bool Function( - ffi.Int32 keycode, - ffi.Int32 keymask, - ime_device_info_h dev_info, - ffi.Pointer user_data); -typedef Dartime_process_key_event_cbFunction = bool Function(int keycode, - int keymask, ime_device_info_h dev_info, ffi.Pointer user_data); - -/// @brief Enumeration for the key codes. -/// If keycode & 0xff000000 == 0x01000000 then this key code is directly encoded 24-bit UCS character. -/// The UCS value is keycode & 0x00ffffff. -/// @details Defines the list of keys supported by the system. -/// Note that certain keys may not be available on all devices. -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -abstract class ime_key_code_e { - /// < The backspace key - static const int IME_KEY_BackSpace = 65288; - - /// < The tab key - static const int IME_KEY_Tab = 65289; - - /// < The linefeed key - static const int IME_KEY_Linefeed = 65290; - - /// < The clear key - static const int IME_KEY_Clear = 65291; - - /// < The return key - static const int IME_KEY_Return = 65293; - - /// < The pause key - static const int IME_KEY_Pause = 65299; - - /// < The scroll lock key - static const int IME_KEY_Scroll_Lock = 65300; - - /// < The sys req key - static const int IME_KEY_Sys_Req = 65301; - - /// < The escape key - static const int IME_KEY_Escape = 65307; - - /// < The delete key - static const int IME_KEY_Delete = 65535; - - /// < The home key - static const int IME_KEY_Home = 65360; - - /// < The left directional key - static const int IME_KEY_Left = 65361; - - /// < The up directional key - static const int IME_KEY_Up = 65362; - - /// < The right directional key - static const int IME_KEY_Right = 65363; - - /// < The down directional key - static const int IME_KEY_Down = 65364; - - /// < The prior, previous key - static const int IME_KEY_Prior = 65365; - - /// < The page up key - static const int IME_KEY_Page_Up = 65365; - - /// < The next key - static const int IME_KEY_Next = 65366; - - /// < The page down key - static const int IME_KEY_Page_Down = 65366; - - /// < The end key - static const int IME_KEY_End = 65367; - - /// < The begin key - static const int IME_KEY_Begin = 65368; - - /// < The select key - static const int IME_KEY_Select = 65376; - - /// < The print key - static const int IME_KEY_Print = 65377; - - /// < The execute, run, do key - static const int IME_KEY_Execute = 65378; - - /// < The insert key - static const int IME_KEY_Insert = 65379; - - /// < The undo key - static const int IME_KEY_Undo = 65381; - - /// < The redo key - static const int IME_KEY_Redo = 65382; - - /// < The menu key - static const int IME_KEY_Menu = 65383; - - /// < The find key - static const int IME_KEY_Find = 65384; - - /// < The cancel, stop, abort, exit key - static const int IME_KEY_Cancel = 65385; - - /// < The help key - static const int IME_KEY_Help = 65386; - - /// < The break key - static const int IME_KEY_Break = 65387; - - /// < The character set switch key - static const int IME_KEY_Mode_switch = 65406; - - /// < The num lock key - static const int IME_KEY_Num_Lock = 65407; - - /// < The Numpad space key - static const int IME_KEY_KP_Space = 65408; - - /// < The Numpad tab key - static const int IME_KEY_KP_Tab = 65417; - - /// < The Numpad enter key - static const int IME_KEY_KP_Enter = 65421; - - /// < The Numpad function 1 key - static const int IME_KEY_KP_F1 = 65425; - - /// < The Numpad function 2 key - static const int IME_KEY_KP_F2 = 65426; - - /// < The Numpad function 3 key - static const int IME_KEY_KP_F3 = 65427; - - /// < The Numpad function 4 key - static const int IME_KEY_KP_F4 = 65428; - - /// < The Numpad home key - static const int IME_KEY_KP_Home = 65429; - - /// < The Numpad left key - static const int IME_KEY_KP_Left = 65430; - - /// < The Numpad up key - static const int IME_KEY_KP_Up = 65431; - - /// < The Numpad right key - static const int IME_KEY_KP_Right = 65432; - - /// < The Numpad down key - static const int IME_KEY_KP_Down = 65433; - - /// < The Numpad prior, previous key - static const int IME_KEY_KP_Prior = 65434; - - /// < The Numpad page up key - static const int IME_KEY_KP_Page_Up = 65434; - - /// < The Numpad next key - static const int IME_KEY_KP_Next = 65435; - - /// < The Numpad page down key - static const int IME_KEY_KP_Page_Down = 65435; - - /// < The Numpad end key - static const int IME_KEY_KP_End = 65436; - - /// < The Numpad begin key - static const int IME_KEY_KP_Begin = 65437; - - /// < The Numpad insert key - static const int IME_KEY_KP_Insert = 65438; - - /// < The Numpad delete key - static const int IME_KEY_KP_Delete = 65439; - - /// < The Numpad equal key - static const int IME_KEY_KP_Equal = 65469; - - /// < The Numpad multiply key - static const int IME_KEY_KP_Multiply = 65450; - - /// < The Numpad add key - static const int IME_KEY_KP_Add = 65451; - - /// < The Numpad separator key - static const int IME_KEY_KP_Separator = 65452; - - /// < The Numpad subtract key - static const int IME_KEY_KP_Subtract = 65453; - - /// < The Numpad decimal key - static const int IME_KEY_KP_Decimal = 65454; - - /// < The Numpad divide key - static const int IME_KEY_KP_Divide = 65455; - - /// < The Numpad 0 key - static const int IME_KEY_KP_0 = 65456; - - /// < The Numpad 1 key - static const int IME_KEY_KP_1 = 65457; - - /// < The Numpad 2 key - static const int IME_KEY_KP_2 = 65458; - - /// < The Numpad 3 key - static const int IME_KEY_KP_3 = 65459; - - /// < The Numpad 4 key - static const int IME_KEY_KP_4 = 65460; - - /// < The Numpad 5 key - static const int IME_KEY_KP_5 = 65461; - - /// < The Numpad 6 key - static const int IME_KEY_KP_6 = 65462; - - /// < The Numpad 7 key - static const int IME_KEY_KP_7 = 65463; - - /// < The Numpad 8 key - static const int IME_KEY_KP_8 = 65464; - - /// < The Numpad 9 key - static const int IME_KEY_KP_9 = 65465; - - /// < The function 1 key - static const int IME_KEY_F1 = 65470; - - /// < The function 2 key - static const int IME_KEY_F2 = 65471; - - /// < The function 3 key - static const int IME_KEY_F3 = 65472; - - /// < The function 4 key - static const int IME_KEY_F4 = 65473; - - /// < The function 5 key - static const int IME_KEY_F5 = 65474; - - /// < The function 6 key - static const int IME_KEY_F6 = 65475; - - /// < The function 7 key - static const int IME_KEY_F7 = 65476; - - /// < The function 8 key - static const int IME_KEY_F8 = 65477; - - /// < The function 9 key - static const int IME_KEY_F9 = 65478; - - /// < The function 10 key - static const int IME_KEY_F10 = 65479; - - /// < The function 11 key - static const int IME_KEY_F11 = 65480; - - /// < The function 12 key - static const int IME_KEY_F12 = 65481; - - /// < The function 13 key - static const int IME_KEY_F13 = 65482; - - /// < The function 14 key - static const int IME_KEY_F14 = 65483; - - /// < The function 15 key - static const int IME_KEY_F15 = 65484; - - /// < The function 16 key - static const int IME_KEY_F16 = 65485; - - /// < The function 17 key - static const int IME_KEY_F17 = 65486; - - /// < The function 18 key - static const int IME_KEY_F18 = 65487; - - /// < The function 19 key - static const int IME_KEY_F19 = 65488; - - /// < The function 20 key - static const int IME_KEY_F20 = 65489; - - /// < The function 21 key - static const int IME_KEY_F21 = 65490; - - /// < The function 22 key - static const int IME_KEY_F22 = 65491; - - /// < The function 23 key - static const int IME_KEY_F23 = 65492; - - /// < The function 24 key - static const int IME_KEY_F24 = 65493; - - /// < The function 25 key - static const int IME_KEY_F25 = 65494; - - /// < The function 26 key - static const int IME_KEY_F26 = 65495; - - /// < The function 27 key - static const int IME_KEY_F27 = 65496; - - /// < The function 28 key - static const int IME_KEY_F28 = 65497; - - /// < The function 29 key - static const int IME_KEY_F29 = 65498; - - /// < The function 30 key - static const int IME_KEY_F30 = 65499; - - /// < The function 31 key - static const int IME_KEY_F31 = 65500; - - /// < The function 32 key - static const int IME_KEY_F32 = 65501; - - /// < The function 33 key - static const int IME_KEY_F33 = 65502; - - /// < The function 34 key - static const int IME_KEY_F34 = 65503; - - /// < The function 35 key - static const int IME_KEY_F35 = 65504; - - /// < The left shift key - static const int IME_KEY_Shift_L = 65505; - - /// < The right shift key - static const int IME_KEY_Shift_R = 65506; - - /// < The left control key - static const int IME_KEY_Control_L = 65507; - - /// < The right control key - static const int IME_KEY_Control_R = 65508; - - /// < The caps lock key - static const int IME_KEY_Caps_Lock = 65509; - - /// < The shift lock key - static const int IME_KEY_Shift_Lock = 65510; - - /// < The left meta key - static const int IME_KEY_Meta_L = 65511; - - /// < The right meta key - static const int IME_KEY_Meta_R = 65512; - - /// < The left alt key - static const int IME_KEY_Alt_L = 65513; - - /// < The right alt key - static const int IME_KEY_Alt_R = 65514; - - /// < The left super key - static const int IME_KEY_Super_L = 65515; - - /// < The right super key - static const int IME_KEY_Super_R = 65516; - - /// < The left hyper key - static const int IME_KEY_Hyper_L = 65517; - - /// < The right hyper key - static const int IME_KEY_Hyper_R = 65518; - - /// < The space key - static const int IME_KEY_space = 32; - - /// < The exclamation key - static const int IME_KEY_exclam = 33; - - /// < The quotedbl key - static const int IME_KEY_quotedbl = 34; - - /// < The number sign key - static const int IME_KEY_numbersign = 35; - - /// < The dollar key - static const int IME_KEY_dollar = 36; - - /// < The percent key - static const int IME_KEY_percent = 37; - - /// < The ampersand key - static const int IME_KEY_ampersand = 38; - - /// < The apostrophe key - static const int IME_KEY_apostrophe = 39; - - /// < The parenleft key - static const int IME_KEY_parenleft = 40; - - /// < The parenright key - static const int IME_KEY_parenright = 41; - - /// < The asterisk key - static const int IME_KEY_asterisk = 42; - - /// < The plus key - static const int IME_KEY_plus = 43; - - /// < The comma key - static const int IME_KEY_comma = 44; - - /// < The minus key - static const int IME_KEY_minus = 45; - - /// < The period key - static const int IME_KEY_period = 46; - - /// < The slash key - static const int IME_KEY_slash = 47; - - /// < The 0 key - static const int IME_KEY_0 = 48; - - /// < The 1 key - static const int IME_KEY_1 = 49; - - /// < The 2 key - static const int IME_KEY_2 = 50; - - /// < The 3 key - static const int IME_KEY_3 = 51; - - /// < The 4 key - static const int IME_KEY_4 = 52; - - /// < The 5 key - static const int IME_KEY_5 = 53; - - /// < The 6 key - static const int IME_KEY_6 = 54; - - /// < The 7 key - static const int IME_KEY_7 = 55; - - /// < The 8 key - static const int IME_KEY_8 = 56; - - /// < The 9 key - static const int IME_KEY_9 = 57; - - /// < The colon key - static const int IME_KEY_colon = 58; - - /// < The semicolon key - static const int IME_KEY_semicolon = 59; - - /// < The less key - static const int IME_KEY_less = 60; - - /// < The equal key - static const int IME_KEY_equal = 61; - - /// < The greater key - static const int IME_KEY_greater = 62; - - /// < The question key - static const int IME_KEY_question = 63; - - /// < The at key - static const int IME_KEY_at = 64; - - /// < The A key - static const int IME_KEY_A = 65; - - /// < The B key - static const int IME_KEY_B = 66; - - /// < The C key - static const int IME_KEY_C = 67; - - /// < The D key - static const int IME_KEY_D = 68; - - /// < The E key - static const int IME_KEY_E = 69; - - /// < The F key - static const int IME_KEY_F = 70; - - /// < The G key - static const int IME_KEY_G = 71; - - /// < The H key - static const int IME_KEY_H = 72; - - /// < The I key - static const int IME_KEY_I = 73; - - /// < The J key - static const int IME_KEY_J = 74; - - /// < The K key - static const int IME_KEY_K = 75; - - /// < The L key - static const int IME_KEY_L = 76; - - /// < The M key - static const int IME_KEY_M = 77; - - /// < The N key - static const int IME_KEY_N = 78; - - /// < The O key - static const int IME_KEY_O = 79; - - /// < The P key - static const int IME_KEY_P = 80; - - /// < The Q key - static const int IME_KEY_Q = 81; - - /// < The R key - static const int IME_KEY_R = 82; - - /// < The S key - static const int IME_KEY_S = 83; - - /// < The T key - static const int IME_KEY_T = 84; - - /// < The U key - static const int IME_KEY_U = 85; - - /// < The V key - static const int IME_KEY_V = 86; - - /// < The W key - static const int IME_KEY_W = 87; - - /// < The X key - static const int IME_KEY_X = 88; - - /// < The Y key - static const int IME_KEY_Y = 89; - - /// < The Z key - static const int IME_KEY_Z = 90; - - /// < The left bracket key - static const int IME_KEY_bracketleft = 91; - - /// < The backslash key - static const int IME_KEY_backslash = 92; - - /// < The right bracket key - static const int IME_KEY_bracketright = 93; - - /// < The circumflex key - static const int IME_KEY_asciicircum = 94; - - /// < The underscore key - static const int IME_KEY_underscore = 95; - - /// < The grave key - static const int IME_KEY_grave = 96; - - /// < The a key - static const int IME_KEY_a = 97; - - /// < The b key - static const int IME_KEY_b = 98; - - /// < The c key - static const int IME_KEY_c = 99; - - /// < The d key - static const int IME_KEY_d = 100; - - /// < The e key - static const int IME_KEY_e = 101; - - /// < The f key - static const int IME_KEY_f = 102; - - /// < The g key - static const int IME_KEY_g = 103; - - /// < The h key - static const int IME_KEY_h = 104; - - /// < The i key - static const int IME_KEY_i = 105; - - /// < The j key - static const int IME_KEY_j = 106; - - /// < The k key - static const int IME_KEY_k = 107; - - /// < The l key - static const int IME_KEY_l = 108; - - /// < The m key - static const int IME_KEY_m = 109; - - /// < The n key - static const int IME_KEY_n = 110; - - /// < The o key - static const int IME_KEY_o = 111; - - /// < The p key - static const int IME_KEY_p = 112; - - /// < The q key - static const int IME_KEY_q = 113; - - /// < The r key - static const int IME_KEY_r = 114; - - /// < The s key - static const int IME_KEY_s = 115; - - /// < The t key - static const int IME_KEY_t = 116; - - /// < The u key - static const int IME_KEY_u = 117; - - /// < The v key - static const int IME_KEY_v = 118; - - /// < The w key - static const int IME_KEY_w = 119; - - /// < The x key - static const int IME_KEY_x = 120; - - /// < The y key - static const int IME_KEY_y = 121; - - /// < The z key - static const int IME_KEY_z = 122; - - /// < The left brace key - static const int IME_KEY_braceleft = 123; - - /// < The bar key - static const int IME_KEY_bar = 124; - - /// < The right brace key - static const int IME_KEY_braceright = 125; - - /// < The tilde key - static const int IME_KEY_asciitilde = 126; -} - -/// @brief Enumeration for the key masks. -/// The key masks indicate which modifier keys is pressed down during the keyboard hit. -/// The special IME_KEY_MASK_RELEASED indicates the key release event. -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -abstract class ime_key_mask_e { - /// < Key press event without modifier key - static const int IME_KEY_MASK_PRESSED = 0; - - /// < The Shift key is pressed down - static const int IME_KEY_MASK_SHIFT = 1; - - /// < The CapsLock key is pressed down - static const int IME_KEY_MASK_CAPSLOCK = 2; - - /// < The Control key is pressed down - static const int IME_KEY_MASK_CONTROL = 4; - - /// < The Alt key is pressed down - static const int IME_KEY_MASK_ALT = 8; - - /// < The Meta key is pressed down - static const int IME_KEY_MASK_META = 16; - - /// < The Win (between Control and Alt) is pressed down - static const int IME_KEY_MASK_WIN = 32; - - /// < The Hyper key is pressed down - static const int IME_KEY_MASK_HYPER = 64; - - /// < The NumLock key is pressed down - static const int IME_KEY_MASK_NUMLOCK = 128; - - /// < Key release event - static const int IME_KEY_MASK_RELEASED = 32768; -} - -/// @brief Handle of the device information of the key event. -/// -/// @details This is one of parameters of ime_process_key_event_cb() callback function. IME application -/// may distinguish the key event by using this if necessary. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @see ime_process_key_event_cb() -/// @see ime_device_info_get_name() -/// @see ime_device_info_get_class() -/// @see ime_device_info_get_subclass() -typedef ime_device_info_h = ffi.Pointer<_ime_device_info>; - -/// @brief Called when the system display language is changed. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @param[in] language The language code -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_display_language_changed_cb() function. -/// -/// @see ime_event_set_display_language_changed_cb() -typedef ime_display_language_changed_cb - = ffi.Pointer>; -typedef ime_display_language_changed_cbFunction = ffi.Void Function( - ffi.Pointer language, ffi.Pointer user_data); -typedef Dartime_display_language_changed_cbFunction = void Function( - ffi.Pointer language, ffi.Pointer user_data); - -/// @brief Called when the device is rotated. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @param[in] degree The rotation degree -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_rotation_degree_changed_cb() function. -/// -/// @see ime_event_set_rotation_degree_changed_cb() -typedef ime_rotation_degree_changed_cb - = ffi.Pointer>; -typedef ime_rotation_degree_changed_cbFunction = ffi.Void Function( - ffi.Int degree, ffi.Pointer user_data); -typedef Dartime_rotation_degree_changed_cbFunction = void Function( - int degree, ffi.Pointer user_data); - -/// @brief Called when Accessibility in Settings application is on or off. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @param[in] state Accessibility option state -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_accessibility_state_changed_cb() function. -/// -/// @see ime_event_set_accessibility_state_changed_cb() -typedef ime_accessibility_state_changed_cb = ffi - .Pointer>; -typedef ime_accessibility_state_changed_cbFunction = ffi.Void Function( - ffi.Bool state, ffi.Pointer user_data); -typedef Dartime_accessibility_state_changed_cbFunction = void Function( - bool state, ffi.Pointer user_data); - -/// @brief Called to create the option window. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks if Input panel requests to open the option window, @a type will be #IME_OPTION_WINDOW_TYPE_KEYBOARD. -/// And if Settings application requests to open it, @a type will be #IME_OPTION_WINDOW_TYPE_SETTING_APPLICATION. -/// -/// @param[in] window The created window object -/// @param[in] type The type of option window -/// @param[in] user_data User data to be passed from the callback registration function -/// -/// @pre The callback can be registered using ime_event_set_option_window_created_cb() function. The -/// ime_create_option_window() calls this callback function or Settings application can call this callback function. -/// -/// @see ime_event_set_option_window_created_cb() -/// @see ime_create_option_window() -typedef ime_option_window_created_cb - = ffi.Pointer>; -typedef ime_option_window_created_cbFunction = ffi.Void Function( - ffi.Pointer window, - ffi.Int32 type, - ffi.Pointer user_data); -typedef Dartime_option_window_created_cbFunction = void Function( - ffi.Pointer window, int type, ffi.Pointer user_data); - -/// @brief Called to destroy the option window. -/// -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @param[in] window The window object to destroy -/// @param[in] user_data User data to be passed to the callback function -/// -/// @pre The callback can be registered using ime_event_set_option_window_destroyed_cb() function. -/// ime_destroy_option_window() calls this callback function. -/// -/// @see ime_event_set_option_window_destroyed_cb() -typedef ime_option_window_destroyed_cb - = ffi.Pointer>; -typedef ime_option_window_destroyed_cbFunction = ffi.Void Function( - ffi.Pointer window, ffi.Pointer user_data); -typedef Dartime_option_window_destroyed_cbFunction = void Function( - ffi.Pointer window, ffi.Pointer user_data); - -/// @typedef Eina_List -/// Type for a generic double linked list. -typedef Eina_List = _Eina_List; - -/// @struct _Eina_List -/// Type for a generic double linked list. -final class _Eina_List extends ffi.Struct { - /// < Pointer to list element payload - external ffi.Pointer data; - - /// < Next member in the list - external ffi.Pointer next; - - /// < Previous member in the list - external ffi.Pointer prev; - - /// < Private list accounting info - don't touch - external ffi.Pointer accounting; - - @Eina_Magic() - external int __magic; -} - -/// @typedef Eina_List -/// Type for a generic double linked list. -typedef Eina_List1 = _Eina_List; - -/// @typedef Eina_List_Accounting -/// Cache used to store the last element of a list and the number of -/// elements, for fast access. -typedef Eina_List_Accounting = _Eina_List_Accounting; - -/// @struct _Eina_List_Accounting -/// Cache used to store the last element of a list and the number of -/// elements, for fast access. It is for private use and must not be -/// touched. -final class _Eina_List_Accounting extends ffi.Struct { - /// < Pointer to the last element of the list - don't touch - external ffi.Pointer last; - - /// < Number of elements of the list - don't touch - @ffi.UnsignedInt() - external int count; - - @Eina_Magic() - external int __magic; -} - -/// @brief An abstract type for a magic number. -typedef Eina_Magic = ffi.UnsignedInt; -typedef DartEina_Magic = int; - -/// @typedef Ecore_IMF_Autocapital_Type -/// -/// Autocapitalization Types. -/// -/// @see ecore_imf_context_autocapital_type_set() -abstract class Ecore_IMF_Autocapital_Type { - /// < No auto-capitalization when typing @since 1.1 - static const int ECORE_IMF_AUTOCAPITAL_TYPE_NONE = 0; - - /// < Autocapitalize each word typed @since 1.1 - static const int ECORE_IMF_AUTOCAPITAL_TYPE_WORD = 1; - - /// < Autocapitalize the start of each sentence @since 1.1 - static const int ECORE_IMF_AUTOCAPITAL_TYPE_SENTENCE = 2; - - /// < Autocapitalize all letters @since 1.1 - static const int ECORE_IMF_AUTOCAPITAL_TYPE_ALLCHARACTER = 3; -} - -/// @typedef Ecore_IMF_Input_Hints -/// @brief Enumeration for defining the types of Ecore_IMF Input Hints. -/// @since 1.12 -abstract class Ecore_IMF_Input_Hints { - /// < No active hints @since 1.12 - static const int ECORE_IMF_INPUT_HINT_NONE = 0; - - /// < Suggest word auto completion @since 1.12 - static const int ECORE_IMF_INPUT_HINT_AUTO_COMPLETE = 1; - - /// < Typed text should not be stored. @since 1.12 - static const int ECORE_IMF_INPUT_HINT_SENSITIVE_DATA = 2; - - /// < Multiline text @since 1.18 - static const int ECORE_IMF_INPUT_HINT_MULTILINE = 4; - - /// < Autofill hint for a credit card expiration date @since 1.21 - static const int ECORE_IMF_INPUT_HINT_AUTOFILL_CREDIT_CARD_EXPIRATION_DATE = - 256; - - /// < Autofill hint for a credit card expiration day @since 1.21 - static const int ECORE_IMF_INPUT_HINT_AUTOFILL_CREDIT_CARD_EXPIRATION_DAY = - 512; - - /// < Autofill hint for a credit card expiration month @since 1.21 - static const int ECORE_IMF_INPUT_HINT_AUTOFILL_CREDIT_CARD_EXPIRATION_MONTH = - 768; - - /// < Autofill hint for a credit card expiration year @since 1.21 - static const int ECORE_IMF_INPUT_HINT_AUTOFILL_CREDIT_CARD_EXPIRATION_YEAR = - 1024; - - /// < Autofill hint for a credit card number @since 1.21 - static const int ECORE_IMF_INPUT_HINT_AUTOFILL_CREDIT_CARD_NUMBER = 1280; - - /// < Autofill hint for an email address @since 1.21 - static const int ECORE_IMF_INPUT_HINT_AUTOFILL_EMAIL_ADDRESS = 1536; - - /// < Autofill hint for a user's real name @since 1.21 - static const int ECORE_IMF_INPUT_HINT_AUTOFILL_NAME = 1792; - - /// < Autofill hint for a phone number @since 1.21 - static const int ECORE_IMF_INPUT_HINT_AUTOFILL_PHONE = 2048; - - /// < Autofill hint for a postal address @since 1.21 - static const int ECORE_IMF_INPUT_HINT_AUTOFILL_POSTAL_ADDRESS = 2304; - - /// < Autofill hint for a postal code @since 1.21 - static const int ECORE_IMF_INPUT_HINT_AUTOFILL_POSTAL_CODE = 2560; - - /// < Autofill hint for a user's ID @since 1.21 - static const int ECORE_IMF_INPUT_HINT_AUTOFILL_ID = 2816; -} - -/// @typedef Ecore_IMF_BiDi_Direction -/// @brief Enumeration for defining the types of Ecore_IMF bidirectionality. -/// @since 1.12 -abstract class Ecore_IMF_BiDi_Direction { - /// < The Neutral mode @since 1.12 - static const int ECORE_IMF_BIDI_DIRECTION_NEUTRAL = 0; - - /// < The Left to Right mode @since 1.12 - static const int ECORE_IMF_BIDI_DIRECTION_LTR = 1; - - /// < The Right to Left mode @since 1.12 - static const int ECORE_IMF_BIDI_DIRECTION_RTL = 2; -} - -/// @enum _Ecore_IMF_Device_Class -/// @brief Enumeration for defining the types of Ecore_IMF_Device_Class -/// @since 1.14 -abstract class Ecore_IMF_Device_Class { - /// < Not a device @since 1.14 - static const int ECORE_IMF_DEVICE_CLASS_NONE = 0; - - /// < The user/seat (the user themselves) @since 1.14 - static const int ECORE_IMF_DEVICE_CLASS_SEAT = 1; - - /// < A regular keyboard, numberpad or attached buttons @since 1.14 - static const int ECORE_IMF_DEVICE_CLASS_KEYBOARD = 2; - - /// < A mouse, trackball or touchpad relative motion device @since 1.14 - static const int ECORE_IMF_DEVICE_CLASS_MOUSE = 3; - - /// < A touchscreen with fingers or stylus @since 1.14 - static const int ECORE_IMF_DEVICE_CLASS_TOUCH = 4; - - /// < A special pen device @since 1.14 - static const int ECORE_IMF_DEVICE_CLASS_PEN = 5; - - /// < A laser pointer, wii-style or "minority report" pointing device @since 1.14 - static const int ECORE_IMF_DEVICE_CLASS_POINTER = 6; - - /// < A gamepad controller or joystick @since 1.14 - static const int ECORE_IMF_DEVICE_CLASS_GAMEPAD = 7; -} - -/// @enum _Ecore_IMF_Device_Subclass -/// @brief Enumeration for defining the types of Ecore_IMF_Device_Subclass -/// @since 1.14 -abstract class Ecore_IMF_Device_Subclass { - /// < Not a device @since 1.14 - static const int ECORE_IMF_DEVICE_SUBCLASS_NONE = 0; - - /// < The normal flat of your finger @since 1.14 - static const int ECORE_IMF_DEVICE_SUBCLASS_FINGER = 1; - - /// < A fingernail @since 1.14 - static const int ECORE_IMF_DEVICE_SUBCLASS_FINGERNAIL = 2; - - /// < A Knuckle @since 1.14 - static const int ECORE_IMF_DEVICE_SUBCLASS_KNUCKLE = 3; - - /// < The palm of a users hand @since 1.14 - static const int ECORE_IMF_DEVICE_SUBCLASS_PALM = 4; - - /// < The side of your hand @since 1.14 - static const int ECORE_IMF_DEVICE_SUBCLASS_HAND_SIZE = 5; - - /// < The flat of your hand @since 1.14 - static const int ECORE_IMF_DEVICE_SUBCLASS_HAND_FLAT = 6; - - /// < The tip of a pen @since 1.14 - static const int ECORE_IMF_DEVICE_SUBCLASS_PEN_TIP = 7; - - /// < A trackpad style mouse @since 1.14 - static const int ECORE_IMF_DEVICE_SUBCLASS_TRACKPAD = 8; - - /// < A trackpoint style mouse @since 1.14 - static const int ECORE_IMF_DEVICE_SUBCLASS_TRACKPOINT = 9; - - /// < A trackball style mouse @since 1.14 - static const int ECORE_IMF_DEVICE_SUBCLASS_TRACKBALL = 10; - - /// < A remote controller @since_tizen 4.0 - static const int ECORE_IMF_DEVICE_SUBCLASS_REMOCON = 11; - - /// < A virtual keyboard @since_tizen 4.0 - static const int ECORE_IMF_DEVICE_SUBCLASS_VIRTUAL_KEYBOARD = 12; -} - -/// @brief Called to set the prediction hint string to deliver to the input panel. -/// -/// @since_tizen 4.0 -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks @a prediction_hint is valid only in the callback. To use outside the callback, make a copy. -/// This function is used by the applications to deliver the prediction hint message to the input panel. -/// -/// @param[in] prediction_hint The prediction hint to be set to the input panel -/// @param[in] user_data User data to be passed to the callback function -/// -/// @pre The callback can be registered using ime_event_set_prediction_hint_set_cb() function. -/// -/// @see ime_event_set_prediction_hint_set_cb() -typedef ime_prediction_hint_set_cb - = ffi.Pointer>; -typedef ime_prediction_hint_set_cbFunction = ffi.Void Function( - ffi.Pointer prediction_hint, ffi.Pointer user_data); -typedef Dartime_prediction_hint_set_cbFunction = void Function( - ffi.Pointer prediction_hint, ffi.Pointer user_data); - -/// @brief Called when an associated text input UI control requests the text entry to set the MIME type. -/// -/// @since_tizen 4.0 -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks @a mime_type is valid only in the callback. To use outside the callback, make a copy. -/// This function is used by the applications to deliver the MIME type to the input panel. -/// -/// @param[in] mime_type The MIME type to be set to the input panel -/// @param[in] user_data User data to be passed to the callback function -/// -/// @pre The callback can be registered using ime_event_set_mime_type_set_request_cb() function. -/// -/// @see ime_event_set_mime_type_set_request_cb() -typedef ime_mime_type_set_request_cb - = ffi.Pointer>; -typedef ime_mime_type_set_request_cbFunction = ffi.Void Function( - ffi.Pointer mime_type, ffi.Pointer user_data); -typedef Dartime_mime_type_set_request_cbFunction = void Function( - ffi.Pointer mime_type, ffi.Pointer user_data); - -/// @brief Called to set the prediction hint key and value to deliver to the input panel. -/// -/// @since_tizen 5.0 -/// -/// @privlevel public -/// -/// @privilege %http://tizen.org/privilege/ime -/// -/// @remarks @a value is valid only in the callback. To use outside the callback, make a copy. -/// This function is used by the applications to deliver the prediction hint data message to the input panel. -/// -/// @param[in] key The prediction hint key to be set to the input panel -/// @param[in] value The prediction hint value to be set to the input panel -/// @param[in] user_data User data to be passed to the callback function -/// -/// @pre The callback can be registered using ime_event_set_prediction_hint_data_set_cb() function. -/// -/// @see ime_event_set_prediction_hint_data_set_cb() -typedef ime_prediction_hint_data_set_cb - = ffi.Pointer>; -typedef ime_prediction_hint_data_set_cbFunction = ffi.Void Function( - ffi.Pointer key, - ffi.Pointer value, - ffi.Pointer user_data); -typedef Dartime_prediction_hint_data_set_cbFunction = void Function( - ffi.Pointer key, - ffi.Pointer value, - ffi.Pointer user_data); - -/// @brief Enumeration for input method manager function error. -/// @since_tizen @if MOBILE 2.4 @else 3.0 @endif -abstract class ime_manager_error_e { - /// < Successful - static const int IME_MANAGER_ERROR_NONE = 0; - - /// < Invalid parameter - static const int IME_MANAGER_ERROR_INVALID_PARAMETER = -22; - - /// < Permission denied - static const int IME_MANAGER_ERROR_PERMISSION_DENIED = -13; - - /// < Operation failed - static const int IME_MANAGER_ERROR_OPERATION_FAILED = -49414128; -} - -/// @brief Enumerations for multi-assistant error codes. -/// @since_tizen 5.0 -abstract class ma_error_e { - /// < Successful - static const int MA_ERROR_NONE = 0; - - /// < Out of Memory - static const int MA_ERROR_OUT_OF_MEMORY = -12; - - /// < I/O error - static const int MA_ERROR_IO_ERROR = -5; - - /// < Invalid parameter - static const int MA_ERROR_INVALID_PARAMETER = -22; - - /// < No answer from service - static const int MA_ERROR_TIMED_OUT = -1073741823; - - /// < Busy recorder - static const int MA_ERROR_RECORDER_BUSY = -16; - - /// < Permission denied - static const int MA_ERROR_PERMISSION_DENIED = -13; - - /// < Multi-assistant NOT supported - static const int MA_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Invalid state - static const int MA_ERROR_INVALID_STATE = -803209199; - - /// < Invalid language - static const int MA_ERROR_INVALID_LANGUAGE = -803209198; - - /// < No available engine - static const int MA_ERROR_ENGINE_NOT_FOUND = -803209197; - - /// < Operation failed - static const int MA_ERROR_OPERATION_FAILED = -803209196; - - /// < Service daemon reset - static const int MA_ERROR_SERVICE_RESET = -803209195; - - /// < Not supported feature of current engine - static const int MA_ERROR_NOT_SUPPORTED_FEATURE = -803209194; -} - -/// @brief Enumerations for multi-assistant client state. -/// @since_tizen 5.0 -abstract class ma_state_e { - /// < 'None' state - static const int MA_STATE_NONE = 0; - - /// < 'Initialized' state - static const int MA_STATE_INITIALIZED = 1; - - /// < 'Ready' state - static const int MA_STATE_READY = 2; -} - -/// @brief Enumerations for multi-assistant audio streaming events. -/// @since_tizen 5.0 -abstract class ma_audio_streaming_event_e { - /// < Failed - static const int MA_AUDIO_STREAMING_EVENT_FAIL = -1; - - /// < Start event - static const int MA_AUDIO_STREAMING_EVENT_START = 1; - - /// < Continue event - static const int MA_AUDIO_STREAMING_EVENT_CONTINUE = 2; - - /// < Finish event - static const int MA_AUDIO_STREAMING_EVENT_FINISH = 3; -} - -/// @brief Enumerations for audio types. -/// @since_tizen 5.0 -abstract class ma_audio_type_e { - /// < Signed 16bit audio type, Little endian - static const int MA_AUDIO_TYPE_PCM_S16_LE = 0; - - /// < Unsigned 8bit audio type - static const int MA_AUDIO_TYPE_PCM_U8 = 1; -} - -/// @brief Enumerations for audio channels. -/// @since_tizen 5.0 -abstract class ma_audio_channel_e { - /// < 1 channel, mono - static const int MA_AUDIO_CHANNEL_MONO = 0; - - /// < 2 channels, stereo - static const int MA_AUDIO_CHANNEL_STEREO = 1; -} - -/// @brief Enumerations for ASR result events. -/// @since_tizen 5.0 -abstract class ma_asr_result_event_e { - /// < ASR result event for partial result - static const int MA_ASR_RESULT_EVENT_PARTIAL_RESULT = 0; - - /// < ASR result event for final result - static const int MA_ASR_RESULT_EVENT_FINAL_RESULT = 1; - - /// < ASR result event for error - static const int MA_ASR_RESULT_EVENT_ERROR = 2; -} - -/// @brief Called when the client state is changed. -/// @since_tizen 5.0 -/// -/// @param[in] previous The previous state -/// @param[in] current The current state -/// @param[in] user_data The user data passed from the callback registration function -typedef ma_state_changed_cb - = ffi.Pointer>; -typedef ma_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 previous, ffi.Int32 current, ffi.Pointer user_data); -typedef Dartma_state_changed_cbFunction = void Function( - int previous, int current, ffi.Pointer user_data); - -/// @brief Called when the error is occurred. -/// @details The following error codes can be received: \n -/// #MA_ERROR_NONE: Success \n -/// #MA_ERROR_OUT_OF_MEMORY: Out of Memory \n -/// #MA_ERROR_IO_ERROR: I/O error \n -/// #MA_ERROR_INVALID_PARAMETER: Invalid parameter \n -/// #MA_ERROR_TIMED_OUT: No answer from service \n -/// #MA_ERROR_RECORDER_BUSY: Busy recorder \n -/// #MA_ERROR_PERMISSION_DENIED: Permission denied \n -/// #MA_ERROR_NOT_SUPPORTED: Multi-assistant NOT supported \n -/// #MA_ERROR_INVALID_STATE: Invalid state \n -/// #MA_ERROR_INVALID_LANGUAGE: Invalid language \n -/// #MA_ERROR_ENGINE_NOT_FOUND: No available engine \n -/// #MA_ERROR_OPERATION_FAILED: Operation failed \n -/// #MA_ERROR_SERVICE_RESET: Service daemon reset \n -/// #MA_ERROR_NOT_SUPPORTED_FEATURE: Not supported feature of current engine \n -/// @since_tizen 5.0 -/// -/// @param[in] reason The error reason -/// @param[in] user_data The user data passed from the callback registration function -typedef ma_error_cb = ffi.Pointer>; -typedef ma_error_cbFunction = ffi.Void Function( - ffi.Int32 reason, ffi.Pointer user_data); -typedef Dartma_error_cbFunction = void Function( - int reason, ffi.Pointer user_data); - -/// @brief Called when the default language is changed. -/// @since_tizen 5.0 -/// @remarks The @a previous can be used only in the callback. To use outside, make a copy. -/// The @a current can be used only in the callback. To use outside, make a copy. -/// -/// @param[in] previous The previous language -/// @param[in] current The current language -/// @param[in] user_data The user data passed from the callback registration function -/// -/// @see ma_set_language_changed_cb() -/// @see ma_unset_language_changed_cb() -typedef ma_language_changed_cb - = ffi.Pointer>; -typedef ma_language_changed_cbFunction = ffi.Void Function( - ffi.Pointer previous, - ffi.Pointer current, - ffi.Pointer user_data); -typedef Dartma_language_changed_cbFunction = void Function( - ffi.Pointer previous, - ffi.Pointer current, - ffi.Pointer user_data); - -/// @brief Called when the multi-assistant service sends audio streaming. -/// @since_tizen 5.0 -/// @remarks The @a buffer should not be released and can be used only in the callback. To use outside, make a copy. -/// -/// @param[in] event The audio streaming event -/// @param[in] buffer The audio streaming data -/// @param[in] len The length of the audio streaming data -/// @param[in] user_data The user data passed from the callback registration function -/// -/// @see ma_set_audio_streaming_cb() -/// @see ma_unset_audio_streaming_cb() -typedef ma_audio_streaming_cb - = ffi.Pointer>; -typedef ma_audio_streaming_cbFunction = ffi.Void Function(ffi.Int32 event, - ffi.Pointer buffer, ffi.Int len, ffi.Pointer user_data); -typedef Dartma_audio_streaming_cbFunction = void Function(int event, - ffi.Pointer buffer, int len, ffi.Pointer user_data); - -/// @brief Enumeration for error codes. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class stt_error_e { - /// < Successful - static const int STT_ERROR_NONE = 0; - - /// < Out of Memory - static const int STT_ERROR_OUT_OF_MEMORY = -12; - - /// < I/O error - static const int STT_ERROR_IO_ERROR = -5; - - /// < Invalid parameter - static const int STT_ERROR_INVALID_PARAMETER = -22; - - /// < No answer from the STT service - static const int STT_ERROR_TIMED_OUT = -1073741823; - - /// < Device or resource busy - static const int STT_ERROR_RECORDER_BUSY = -16; - - /// < Network is down - static const int STT_ERROR_OUT_OF_NETWORK = -100; - - /// < Permission denied - static const int STT_ERROR_PERMISSION_DENIED = -13; - - /// < STT NOT supported - static const int STT_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Invalid state - static const int STT_ERROR_INVALID_STATE = -49283071; - - /// < Invalid language - static const int STT_ERROR_INVALID_LANGUAGE = -49283070; - - /// < No available engine - static const int STT_ERROR_ENGINE_NOT_FOUND = -49283069; - - /// < Operation failed - static const int STT_ERROR_OPERATION_FAILED = -49283068; - - /// < Not supported feature of current engine - static const int STT_ERROR_NOT_SUPPORTED_FEATURE = -49283067; - - /// < Recording timed out @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif - static const int STT_ERROR_RECORDING_TIMED_OUT = -49283066; - - /// < No speech while recording @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif - static const int STT_ERROR_NO_SPEECH = -49283065; - - /// < Progress to ready is not finished @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif - static const int STT_ERROR_IN_PROGRESS_TO_READY = -49283064; - - /// < Progress to recording is not finished @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif - static const int STT_ERROR_IN_PROGRESS_TO_RECORDING = -49283063; - - /// < Progress to processing is not finished @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif - static const int STT_ERROR_IN_PROGRESS_TO_PROCESSING = -49283056; - - /// < Service reset @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif - static const int STT_ERROR_SERVICE_RESET = -49283055; -} - -/// @brief Enumeration for state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class stt_state_e { - /// < 'CREATED' state - static const int STT_STATE_CREATED = 0; - - /// < 'READY' state - static const int STT_STATE_READY = 1; - - /// < 'RECORDING' state - static const int STT_STATE_RECORDING = 2; - - /// < 'PROCESSING' state - static const int STT_STATE_PROCESSING = 3; -} - -/// @brief Enumeration for result event. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class stt_result_event_e { - /// < Event when the recognition full or last result is ready - static const int STT_RESULT_EVENT_FINAL_RESULT = 0; - - /// < Event when the recognition partial result is ready - static const int STT_RESULT_EVENT_PARTIAL_RESULT = 1; - - /// < Event when the recognition has failed - static const int STT_RESULT_EVENT_ERROR = 2; -} - -/// @brief Enumeration for result time callback event. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class stt_result_time_event_e { - /// < Event when the token is beginning type - static const int STT_RESULT_TIME_EVENT_BEGINNING = 0; - - /// < Event when the token is middle type - static const int STT_RESULT_TIME_EVENT_MIDDLE = 1; - - /// < Event when the token is end type - static const int STT_RESULT_TIME_EVENT_END = 2; -} - -/// @brief Enumeration for silence detection type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class stt_option_silence_detection_e { - /// < Silence detection type - False - static const int STT_OPTION_SILENCE_DETECTION_FALSE = 0; - - /// < Silence detection type - True - static const int STT_OPTION_SILENCE_DETECTION_TRUE = 1; - - /// < Silence detection type - Auto - static const int STT_OPTION_SILENCE_DETECTION_AUTO = 2; -} - -final class stt_s extends ffi.Opaque {} - -/// @brief A structure of STT handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef stt_h = ffi.Pointer; - -/// @brief Called to get the engine information. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] engine_id Engine ID -/// @param[in] engine_name Engine name -/// @param[in] user_data User data passed from the stt_setting_foreach_supported_engines() -/// @return @c true to continue with the next iteration of the loop, -/// otherwise @c false to break out of the loop -/// @pre stt_foreach_supported_engines() will invoke this callback. -/// @see stt_foreach_supported_engines() -typedef stt_supported_engine_cb - = ffi.Pointer>; -typedef stt_supported_engine_cbFunction = ffi.Bool Function( - stt_h stt, - ffi.Pointer engine_id, - ffi.Pointer engine_name, - ffi.Pointer user_data); -typedef Dartstt_supported_engine_cbFunction = bool Function( - stt_h stt, - ffi.Pointer engine_id, - ffi.Pointer engine_name, - ffi.Pointer user_data); - -/// @brief Called to retrieve the supported languages. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks The language is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code. For example, "ko_KR" for Korean, "en_US" for American English. -/// @param[in] stt The STT handle -/// @param[in] language The language -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// @c false to break out of the loop -/// @pre stt_foreach_supported_languages() will invoke this callback. -/// @see stt_foreach_supported_languages() -typedef stt_supported_language_cb - = ffi.Pointer>; -typedef stt_supported_language_cbFunction = ffi.Bool Function( - stt_h stt, ffi.Pointer language, ffi.Pointer user_data); -typedef Dartstt_supported_language_cbFunction = bool Function( - stt_h stt, ffi.Pointer language, ffi.Pointer user_data); - -/// @brief Called when STT get the result time stamp in free partial type. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] stt The STT handle -/// @param[in] index The result index -/// @param[in] event The token event -/// @param[in] text The result text -/// @param[in] start_time The start time of result text -/// @param[in] end_time The end time of result text -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop -/// otherwise @c false to break out of the loop -/// @pre stt_recognition_result_cb() should be called. -/// @see stt_recognition_result_cb() -typedef stt_result_time_cb - = ffi.Pointer>; -typedef stt_result_time_cbFunction = ffi.Bool Function( - stt_h stt, - ffi.Int index, - ffi.Int32 event, - ffi.Pointer text, - ffi.Long start_time, - ffi.Long end_time, - ffi.Pointer user_data); -typedef Dartstt_result_time_cbFunction = bool Function( - stt_h stt, - int index, - int event, - ffi.Pointer text, - int start_time, - int end_time, - ffi.Pointer user_data); - -/// @brief Called when STT gets the recognition result from the engine. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @remarks After stt_stop() is called, silence is detected from recording, or partial result is occurred, this function is called. -/// @param[in] stt The STT handle -/// @param[in] event The result event -/// @param[in] data Result texts -/// @param[in] data_count Result text count -/// @param[in] msg Engine message (e.g. #STT_RESULT_MESSAGE_NONE, #STT_RESULT_MESSAGE_ERROR_TOO_SHORT) -/// @param[in] user_data The user data passed from the callback registration function -/// @pre stt_stop() will invoke this callback if you register it using stt_set_result_cb(). -/// @post If this function is called and event is #STT_RESULT_EVENT_FINAL_RESULT, the STT state will be #STT_STATE_READY. -/// @see stt_stop() -/// @see stt_set_recognition_result_cb() -/// @see stt_unset_recognition_result_cb() -typedef stt_recognition_result_cb - = ffi.Pointer>; -typedef stt_recognition_result_cbFunction = ffi.Void Function( - stt_h stt, - ffi.Int32 event, - ffi.Pointer> data, - ffi.Int data_count, - ffi.Pointer msg, - ffi.Pointer user_data); -typedef Dartstt_recognition_result_cbFunction = void Function( - stt_h stt, - int event, - ffi.Pointer> data, - int data_count, - ffi.Pointer msg, - ffi.Pointer user_data); - -/// @brief Called when the state of STT is changed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] stt The STT handle -/// @param[in] previous A previous state -/// @param[in] current A current state -/// @param[in] user_data The user data passed from the callback registration function -/// @pre An application registers this callback using stt_set_state_changed_cb() to detect changing state. -/// @see stt_set_state_changed_cb() -/// @see stt_unset_state_changed_cb() -typedef stt_state_changed_cb - = ffi.Pointer>; -typedef stt_state_changed_cbFunction = ffi.Void Function(stt_h stt, - ffi.Int32 previous, ffi.Int32 current, ffi.Pointer user_data); -typedef Dartstt_state_changed_cbFunction = void Function( - stt_h stt, int previous, int current, ffi.Pointer user_data); - -/// @brief Called when an error occurs. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] stt The STT handle -/// @param[in] reason The error type (e.g. #STT_ERROR_OUT_OF_NETWORK, #STT_ERROR_IO_ERROR) -/// @param[in] user_data The user data passed from the callback registration function -/// @pre An application registers this callback using stt_set_error_cb() to detect error. -/// @see stt_set_error_cb() -/// @see stt_unset_error_cb() -typedef stt_error_cb = ffi.Pointer>; -typedef stt_error_cbFunction = ffi.Void Function( - stt_h stt, ffi.Int32 reason, ffi.Pointer user_data); -typedef Dartstt_error_cbFunction = void Function( - stt_h stt, int reason, ffi.Pointer user_data); - -/// @brief Called when the default language is changed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] stt The STT handle -/// @param[in] previous_language A previous language -/// @param[in] current_language A current language -/// @param[in] user_data The user data passed from the callback registration function -/// @see stt_set_default_language_changed_cb() -typedef stt_default_language_changed_cb - = ffi.Pointer>; -typedef stt_default_language_changed_cbFunction = ffi.Void Function( - stt_h stt, - ffi.Pointer previous_language, - ffi.Pointer current_language, - ffi.Pointer user_data); -typedef Dartstt_default_language_changed_cbFunction = void Function( - stt_h stt, - ffi.Pointer previous_language, - ffi.Pointer current_language, - ffi.Pointer user_data); - -/// @brief Called when the engine is changed. -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -/// @remarks The language is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code. For example, "ko_KR" for Korean, "en_US" for American English. -/// @param[in] stt The STT handle -/// @param[in] engine_id Engine ID -/// @param[in] language The default language -/// @param[in] support_silence Whether the silence detection is supported or not -/// @param[in] need_credential The necessity of credential -/// @param[in] user_data The user data passed from the callback registration function -/// @see stt_set_engine_changed_cb() -typedef stt_engine_changed_cb - = ffi.Pointer>; -typedef stt_engine_changed_cbFunction = ffi.Void Function( - stt_h stt, - ffi.Pointer engine_id, - ffi.Pointer language, - ffi.Bool support_silence, - ffi.Bool need_credential, - ffi.Pointer user_data); -typedef Dartstt_engine_changed_cbFunction = void Function( - stt_h stt, - ffi.Pointer engine_id, - ffi.Pointer language, - bool support_silence, - bool need_credential, - ffi.Pointer user_data); - -/// @brief Enumeration for error codes. -/// @since_tizen 3.0 -abstract class stte_error_e { - /// < Successful - static const int STTE_ERROR_NONE = 0; - - /// < Out of Memory - static const int STTE_ERROR_OUT_OF_MEMORY = -12; - - /// < I/O error - static const int STTE_ERROR_IO_ERROR = -5; - - /// < Invalid parameter - static const int STTE_ERROR_INVALID_PARAMETER = -22; - - /// < Network down(Out of network) - static const int STTE_ERROR_NETWORK_DOWN = -100; - - /// < Invalid state - static const int STTE_ERROR_INVALID_STATE = -49283071; - - /// < Invalid language - static const int STTE_ERROR_INVALID_LANGUAGE = -49283070; - - /// < Operation failed - static const int STTE_ERROR_OPERATION_FAILED = -49283068; - - /// < Not supported feature - static const int STTE_ERROR_NOT_SUPPORTED_FEATURE = -49283067; - - /// < Not supported - static const int STTE_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Permission denied - static const int STTE_ERROR_PERMISSION_DENIED = -13; - - /// < Recording timed out - static const int STTE_ERROR_RECORDING_TIMED_OUT = -49283066; -} - -/// @brief Enumeration for audio type. -/// @since_tizen 3.0 -abstract class stte_audio_type_e { - /// < Signed 16bit audio type, Little endian - static const int STTE_AUDIO_TYPE_PCM_S16_LE = 0; - - /// < Unsigned 8bit audio type - static const int STTE_AUDIO_TYPE_PCM_U8 = 1; -} - -/// @brief Enumeration for callback event. -/// @since_tizen 3.0 -abstract class stte_result_event_e { - /// < Event when either the full matched or the final result is delivered - static const int STTE_RESULT_EVENT_FINAL_RESULT = 0; - - /// < Event when the partial matched result is delivered - static const int STTE_RESULT_EVENT_PARTIAL_RESULT = 1; - - /// < Event when the recognition has failed - static const int STTE_RESULT_EVENT_ERROR = 2; -} - -/// @brief Enumeration for result time callback event. -/// @since_tizen 3.0 -abstract class stte_result_time_event_e { - /// < Event when the token is beginning type - static const int STTE_RESULT_TIME_EVENT_BEGINNING = 0; - - /// < Event when the token is middle type - static const int STTE_RESULT_TIME_EVENT_MIDDLE = 1; - - /// < Event when the token is end type - static const int STTE_RESULT_TIME_EVENT_END = 2; -} - -/// @brief Enumeration for speech status. -/// @since_tizen 3.0 -abstract class stte_speech_status_e { - /// < Beginning point of speech is detected - static const int STTE_SPEECH_STATUS_BEGINNING_POINT_DETECTED = 0; - - /// < End point of speech is detected - static const int STTE_SPEECH_STATUS_END_POINT_DETECTED = 1; -} - -/// @brief A structure for the STT engine functions. -/// @details This structure contains essential callback functions for operating STT engine. -/// @since_tizen 3.0 -/// @remarks These functions are mandatory for operating STT engine. Therefore, all functions MUST be implemented. -final class stte_request_callback_s extends ffi.Struct { - /// < The version of the structure 'stte_request_callback_s' - @ffi.Int() - external int version; - - /// < Called when the engine service user requests the basic information of STT engine - external stte_get_info_cb get_info; - - /// < Called when the engine service user initializes STT engine - external stte_initialize_cb initialize; - - /// < Called when the engine service user deinitializes STT engine - external stte_deinitialize_cb deinitialize; - - /// < Called when the engine service user gets the whole supported language list - external stte_foreach_supported_langs_cb foreach_langs; - - /// < Called when the engine service user checks whether the corresponding language is valid or not - external stte_is_valid_language_cb is_valid_lang; - - /// < Called when the engine service user checks whether STT engine supports silence detection - external stte_support_silence_detection_cb support_silence; - - /// < Called when the engine service user checks whether STT engine supports the corresponding recognition type - external stte_support_recognition_type_cb support_recognition_type; - - /// < Called when the engine service user gets the proper recording format of STT engine - external stte_get_recording_format_cb get_audio_format; - - /// < Called when the engine service user gets the result time information(stamp) - external stte_foreach_result_time_cb foreach_result_time; - - /// < Called when the engine service user sets the silence detection - external stte_set_silence_detection_cb set_silence_detection; - - /// < Called when the engine service user starts to recognize the recording data - external stte_start_cb start; - - /// < Called when the engine service user sets and sends the recording data for speech recognition - external stte_set_recording_data_cb set_recording; - - /// < Called when the engine service user stops to recognize the recording data - external stte_stop_cb stop; - - /// < Called when the engine service user cancels to recognize the recording data - external stte_cancel_cb cancel; - - /// < Called when the engine service user requests for STT engine to check whether the application agreed the usage of STT engine - external stte_check_app_agreed_cb check_app_agreed; - - /// < Called when the engine service user checks whether STT engine needs the application's credential - external stte_need_app_credential_cb need_app_credential; -} - -/// @brief Called when the engine service user requests the basic information of STT engine. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// The allocated @a engine_uuid, @a engine_name, and @a engine_setting will be released internally. -/// In order to upload the engine at Tizen Appstore, both a service app and a ui app are necessary. -/// Therefore, @a engine_setting must be transferred to the engine service user. -/// @param[out] engine_uuid UUID of engine -/// @param[out] engine_name Name of engine -/// @param[out] engine_setting The engine setting application(ui app)'s app ID -/// @param[out] use_network A variable for checking whether the network is used or not -/// @return @c 0 on success, -/// otherwise a negative error code on failure -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #STTE_ERROR_OPERATION_FAILED Operation failure -typedef stte_get_info_cb - = ffi.Pointer>; -typedef stte_get_info_cbFunction = ffi.Int Function( - ffi.Pointer> engine_uuid, - ffi.Pointer> engine_name, - ffi.Pointer> engine_setting, - ffi.Pointer use_network); -typedef Dartstte_get_info_cbFunction = int Function( - ffi.Pointer> engine_uuid, - ffi.Pointer> engine_name, - ffi.Pointer> engine_setting, - ffi.Pointer use_network); - -/// @brief Called when the engine service user initializes STT engine. -/// @details This callback function is called by the engine service user to request for STT engine to be started. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #STTE_ERROR_INVALID_STATE Already initialized -/// @retval #STTE_ERROR_OPERATION_FAILED Operation failure -/// @see stte_deinitialize_cb() -typedef stte_initialize_cb - = ffi.Pointer>; -typedef stte_initialize_cbFunction = ffi.Int Function(); -typedef Dartstte_initialize_cbFunction = int Function(); - -/// @brief Called when the engine service user deinitializes STT engine -/// @details This callback function is called by the engine service user to request for STT engine to be deinitialized. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// NOTE that the engine may be terminated automatically. -/// When this callback function is invoked, the release of resources is necessary. -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_STATE Not initialized -/// @see stte_initialize_cb() -typedef stte_deinitialize_cb - = ffi.Pointer>; -typedef stte_deinitialize_cbFunction = ffi.Int Function(); -typedef Dartstte_deinitialize_cbFunction = int Function(); - -/// @brief Called when the engine service user gets the whole supported language list. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// In this function, the engine service user's callback function 'stte_supported_language_cb()' is invoked repeatedly for getting all supported languages, and @a user_data must be transferred to 'stte_supported_language_cb()'. -/// If 'stte_supported_language_cb()' returns @c false, it should be stopped to call 'stte_supported_language_cb()'. -/// @param[in] callback The callback function -/// @param[in] user_data The user data which must be passed to the callback function 'stte_supported_language_cb()' -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #STTE_ERROR_INVALID_STATE Not initialized -/// @post This callback function invokes stte_supported_language_cb() repeatedly for getting supported languages. -/// @see stte_supported_language_cb() -typedef stte_foreach_supported_langs_cb - = ffi.Pointer>; -typedef stte_foreach_supported_langs_cbFunction = ffi.Int Function( - stte_supported_language_cb callback, ffi.Pointer user_data); -typedef Dartstte_foreach_supported_langs_cbFunction = int Function( - stte_supported_language_cb callback, ffi.Pointer user_data); - -/// @brief Called when STT engine informs the engine service user about whole supported language list. -/// @details This callback function is implemented by the engine service user. Therefore, the engine developer does NOT have to implement this callback function. -/// @since_tizen 3.0 -/// @remarks This callback function is called in stte_foreach_supported_langs_cb() to inform the whole supported language list. -/// @a user_data must be transferred from stte_foreach_supported_langs_cb(). -/// @param[in] language The language is specified as an ISO 3166 alpha-2 two letter country-code -/// followed by ISO 639-1 for the two-letter language code -/// For example, "ko_KR" for Korean, "en_US" for American English -/// @param[in] user_data The user data passed from stte_foreach_supported_langs_cb() -/// @return @c true to continue with the next iteration of the loop -/// @c false to break out of the loop -/// @pre stte_foreach_supported_langs_cb() will invoke this callback function. -/// @see stte_foreach_supported_langs_cb() -typedef stte_supported_language_cb - = ffi.Pointer>; -typedef stte_supported_language_cbFunction = ffi.Bool Function( - ffi.Pointer language, ffi.Pointer user_data); -typedef Dartstte_supported_language_cbFunction = bool Function( - ffi.Pointer language, ffi.Pointer user_data); - -/// @brief Called when the engine service user checks whether the corresponding language is valid or not in STT engine. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// @param[in] language The language is specified as an ISO 3166 alpha-2 two letter country-code -/// followed by ISO 639-1 for the two-letter language code -/// For example, "ko_KR" for Korean, "en_US" for American English -/// @param[out] is_valid A variable for checking whether the corresponding language is valid or not. -/// @c true to be valid, -/// @c false to be invalid -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter -/// @see stte_foreach_supported_languages_cb() -typedef stte_is_valid_language_cb - = ffi.Pointer>; -typedef stte_is_valid_language_cbFunction = ffi.Int Function( - ffi.Pointer language, ffi.Pointer is_valid); -typedef Dartstte_is_valid_language_cbFunction = int Function( - ffi.Pointer language, ffi.Pointer is_valid); - -/// @brief Called when the engine service user checks whether STT engine supports silence detection. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// @return @c true to support silence detection, -/// @c false not to support silence detection -/// @see stte_set_silence_detection_cb() -typedef stte_support_silence_detection_cb = ffi - .Pointer>; -typedef stte_support_silence_detection_cbFunction = ffi.Bool Function(); -typedef Dartstte_support_silence_detection_cbFunction = bool Function(); - -/// @brief Called when the engine service user checks whether STT engine supports the corresponding recognition type. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// @param[in] type The type for recognition (e.g. #STTE_RECOGNITION_TYPE_FREE) -/// @param[out] is_supported A variable for checking whether STT engine supports the corresponding recognition type. -/// @c true to support recognition type, -/// @c false not to support recognition type -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter -typedef stte_support_recognition_type_cb - = ffi.Pointer>; -typedef stte_support_recognition_type_cbFunction = ffi.Int Function( - ffi.Pointer type, ffi.Pointer is_supported); -typedef Dartstte_support_recognition_type_cbFunction = int Function( - ffi.Pointer type, ffi.Pointer is_supported); - -/// @brief Called when the engine service user gets the proper recording format of STT engine. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// The recording format is used for creating the recorder. -/// @param[out] types The format used by the recorder -/// @param[out] rate The sample rate used by the recorder -/// @param[out] channels The number of channels used by the recorder -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_STATE Not initialized -typedef stte_get_recording_format_cb - = ffi.Pointer>; -typedef stte_get_recording_format_cbFunction = ffi.Int Function( - ffi.Pointer types, - ffi.Pointer rate, - ffi.Pointer channels); -typedef Dartstte_get_recording_format_cbFunction = int Function( - ffi.Pointer types, - ffi.Pointer rate, - ffi.Pointer channels); - -/// @brief Called when the engine service user gets the result time information(stamp). -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// In this function, the engine service user's callback function 'stte_result_time_cb()' is invoked repeatedly for sending the time information to the engine service user, and @a user_data must be transferred to 'stte_result_time_cb()'. -/// If 'stte_result_time_cb()' returns @c false, it should be stopped to call 'stte_result_time_cb()'. -/// @a time_info is transferred from stte_send_result(). The type of @a time_info is up to the STT engine developer. -/// @param[in] time_info The time information -/// @param[in] callback The callback function -/// @param[in] user_data The user data which must be passed to the callback function 'stte_result_time_cb()' -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #STTE_ERROR_INVALID_STATE Not initialized -/// @pre stte_send_result() will invoke this function. -/// @post This function invokes stte_result_time_cb() repeatedly for getting result time information. -/// @see stte_result_time_cb() -typedef stte_foreach_result_time_cb - = ffi.Pointer>; -typedef stte_foreach_result_time_cbFunction = ffi.Int Function( - ffi.Pointer time_info, - stte_result_time_cb callback, - ffi.Pointer user_data); -typedef Dartstte_foreach_result_time_cbFunction = int Function( - ffi.Pointer time_info, - stte_result_time_cb callback, - ffi.Pointer user_data); - -/// @brief Called when STT engine provides the time stamp of result to the engine service user. -/// @details This callback function is implemented by the engine service user. Therefore, the engine developer does NOT have to implement this callback function. -/// @since_tizen 3.0 -/// @remarks This callback function is called in stte_foreach_result_time_cb() for adding time information. -/// @a user_data must be transferred from stte_foreach_result_time_cb(). -/// @param[in] index The result index -/// @param[in] event The token event -/// @param[in] text The result text -/// @param[in] start_time The time started speaking the result text -/// @param[in] end_time The time finished speaking the result text -/// @param[in] user_data The user data passed from stte_foreach_result_time_cb() -/// @return @c true to continue with the next iteration of the loop -/// @c false to break out of the loop -/// @pre stte_send_result() should be called. -/// @see stte_send_result() -/// @see stte_foreach_result_time_cb() -typedef stte_result_time_cb - = ffi.Pointer>; -typedef stte_result_time_cbFunction = ffi.Bool Function( - ffi.Int index, - ffi.Int32 event, - ffi.Pointer text, - ffi.Long start_time, - ffi.Long end_time, - ffi.Pointer user_data); -typedef Dartstte_result_time_cbFunction = bool Function( - int index, - int event, - ffi.Pointer text, - int start_time, - int end_time, - ffi.Pointer user_data); - -/// @brief Called when the engine service user sets the silence detection. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// If the engine service user sets this option as 'TRUE', STT engine will detect the silence (EPD) and send the callback event about it. -/// @param[in] is_set A variable for setting the silence detection. -/// @c true to detect the silence, -/// @c false not to detect the silence -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_STATE Not initialized -/// @retval #STTE_ERROR_NOT_SUPPORTED_FEATURE Not supported feature -typedef stte_set_silence_detection_cb - = ffi.Pointer>; -typedef stte_set_silence_detection_cbFunction = ffi.Int Function( - ffi.Bool is_set); -typedef Dartstte_set_silence_detection_cbFunction = int Function(bool is_set); - -/// @brief Called when the engine service user starts to recognize the recording data. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// In this callback function, STT engine must transfer the recognition result and @a user_data to the engine service user using stte_send_result(). -/// Also, if STT engine needs the application's credential, it sets the credential granted to the application. -/// @param[in] language The language is specified as an ISO 3166 alpha-2 two letter country-code -/// followed by ISO 639-1 for the two-letter language code -/// For example, "ko_KR" for Korean, "en_US" for American English -/// @param[in] type The recognition type. (e.g. #STTE_RECOGNITION_TYPE_FREE) -/// @param[in] appid The Application ID -/// @param[in] credential The credential granted to the application -/// @param[in] user_data The user data to be passed to the callback function -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #STTE_ERROR_INVALID_STATE Invalid state -/// @retval #STTE_ERROR_INVALID_LANGUAGE Invalid language -/// @retval #STTE_ERROR_OPERATION_FAILED Operation failure -/// @retval #STTE_ERROR_NETWORK_DOWN Out of network -/// @pre The engine is not in recognition processing. -/// @see stte_set_recording_data_cb() -/// @see stte_stop_cb() -/// @see stte_cancel_cb() -/// @see stte_need_app_credential_cb() -typedef stte_start_cb = ffi.Pointer>; -typedef stte_start_cbFunction = ffi.Int Function( - ffi.Pointer language, - ffi.Pointer type, - ffi.Pointer appid, - ffi.Pointer credential, - ffi.Pointer user_data); -typedef Dartstte_start_cbFunction = int Function( - ffi.Pointer language, - ffi.Pointer type, - ffi.Pointer appid, - ffi.Pointer credential, - ffi.Pointer user_data); - -/// @brief Called when the engine service user sets and sends the recording data for speech recognition. -/// @details This callback function is called by the engine service user to send the recording data to STT engine. -/// The engine receives the recording data and uses for speech recognition. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// Also, this function should be returned immediately after recording data copy. -/// @param[in] data The recording data -/// @param[in] length The length of recording data -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #STTE_ERROR_INVALID_STATE Invalid state -/// @retval #STTE_ERROR_OPERATION_FAILED Operation failure -/// @pre stte_start_cb() should succeed. -/// @post If the engine supports partial result, stte_send_result() should be invoked. -/// @see stte_start_cb() -/// @see stte_cancel_cb() -/// @see stte_stop_cb() -typedef stte_set_recording_data_cb - = ffi.Pointer>; -typedef stte_set_recording_data_cbFunction = ffi.Int Function( - ffi.Pointer data, ffi.UnsignedInt length); -typedef Dartstte_set_recording_data_cbFunction = int Function( - ffi.Pointer data, int length); - -/// @brief Called when the engine service user stops to recognize the recording data. -/// @details This callback function is called by the engine service user to stop recording and to get the recognition result. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_STATE Invalid state -/// @retval #STTE_ERROR_OPERATION_FAILED Operation failure -/// @retval #STTE_ERROR_NETWORK_DOWN Out of network -/// @pre stte_start_cb() should succeed. -/// @post After processing of the engine, stte_send_result() must be called. -/// @see stte_start_cb() -/// @see stte_set_recording_data_cb() -/// @see stte_cancel_cb() -/// @see stte_send_result() -typedef stte_stop_cb = ffi.Pointer>; -typedef stte_stop_cbFunction = ffi.Int Function(); -typedef Dartstte_stop_cbFunction = int Function(); - -/// @brief Called when the engine service user cancels to recognize the recording data. -/// @details This callback function is called by the engine service user to cancel to recognize the recording data. -/// Also, when starting the recorder is failed, this function is called. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful. -/// @retval #STTE_ERROR_INVALID_STATE Invalid state. -/// @pre STT engine is in recognition processing or recording. -/// @see stte_start_cb() -/// @see stte_stop_cb() -typedef stte_cancel_cb - = ffi.Pointer>; -typedef stte_cancel_cbFunction = ffi.Int Function(); -typedef Dartstte_cancel_cbFunction = int Function(); - -/// @brief Called when the engine service user requests for STT engine to check whether the application agreed the usage of STT engine. -/// @details This callback function is called when the engine service user requests for STT engine to check the application's agreement about using the engine. -/// According to the need, the engine developer can provide some user interfaces to check the agreement. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// If the STT engine developer wants not to check the agreement, the developer has need to return proper values as @a is_agreed in accordance with the intention. @c true if the developer regards that every application agreed the usage of the engine, @c false if the developer regards that every application disagreed. -/// NOTE that, however, there may be any legal issue unless the developer checks the agreement. Therefore, we suggest that the engine developers should provide a function to check the agreement. -/// @param[in] appid The Application ID -/// @param[out] is_agreed A variable for checking whether the application agreed to use STT engine or not. -/// @c true to agree, -/// @c false to disagree -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_STATE Not initialized -/// @retval #STTE_ERROR_NOT_SUPPORTED_FEATURE Not supported feature -typedef stte_check_app_agreed_cb - = ffi.Pointer>; -typedef stte_check_app_agreed_cbFunction = ffi.Int Function( - ffi.Pointer appid, ffi.Pointer is_agreed); -typedef Dartstte_check_app_agreed_cbFunction = int Function( - ffi.Pointer appid, ffi.Pointer is_agreed); - -/// @brief Called when the engine service user checks whether STT engine needs the application's credential. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using stte_main(). -/// @return @c true if STT engine needs the application's credential, -/// otherwise @c false -typedef stte_need_app_credential_cb - = ffi.Pointer>; -typedef stte_need_app_credential_cbFunction = ffi.Bool Function(); -typedef Dartstte_need_app_credential_cbFunction = bool Function(); - -/// @brief Called when STT engine receives the private data from the engine service user. -/// @details This callback function is called when the engine service user sends the private data to STT engine. -/// @since_tizen 3.0 -/// @remarks This callback function is optional and is registered using stte_set_private_data_set_cb(). -/// @param[in] key The key field of private data -/// @param[in] data The data field of private data -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #STTE_ERROR_OPERATION_FAILED Operation failure -/// @see stte_private_data_requested_cb() -/// @see stte_set_private_data_set_cb() -typedef stte_private_data_set_cb - = ffi.Pointer>; -typedef stte_private_data_set_cbFunction = ffi.Int Function( - ffi.Pointer key, ffi.Pointer data); -typedef Dartstte_private_data_set_cbFunction = int Function( - ffi.Pointer key, ffi.Pointer data); - -/// @brief Called when STT engine provides the engine service user with the private data. -/// @details This callback function is called when the engine service user gets the private data from STT engine. -/// @since_tizen 3.0 -/// @remarks This callback function is optional and is registered using stte_set_private_data_requested_cb(). -/// @param[out] key The key field of private data -/// @param[out] data The data field of private data -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #STTE_ERROR_NONE Successful -/// @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #STTE_ERROR_OPERATION_FAILED Operation failure -/// @see stte_private_data_set_cb() -/// @see stte_set_private_data_requested_cb() -typedef stte_private_data_requested_cb - = ffi.Pointer>; -typedef stte_private_data_requested_cbFunction = ffi.Int Function( - ffi.Pointer key, ffi.Pointer> data); -typedef Dartstte_private_data_requested_cbFunction = int Function( - ffi.Pointer key, ffi.Pointer> data); - -/// @brief Enumeration for error code. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class tts_error_e { - /// < Successful - static const int TTS_ERROR_NONE = 0; - - /// < Out of Memory - static const int TTS_ERROR_OUT_OF_MEMORY = -12; - - /// < I/O error - static const int TTS_ERROR_IO_ERROR = -5; - - /// < Invalid parameter - static const int TTS_ERROR_INVALID_PARAMETER = -22; - - /// < Network is down - static const int TTS_ERROR_OUT_OF_NETWORK = -100; - - /// < No answer from the daemon - static const int TTS_ERROR_TIMED_OUT = -1073741823; - - /// < Permission denied - static const int TTS_ERROR_PERMISSION_DENIED = -13; - - /// < TTS NOT supported - static const int TTS_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Invalid state - static const int TTS_ERROR_INVALID_STATE = -49348607; - - /// < Invalid voice - static const int TTS_ERROR_INVALID_VOICE = -49348606; - - /// < No available engine - static const int TTS_ERROR_ENGINE_NOT_FOUND = -49348605; - - /// < Operation failed - static const int TTS_ERROR_OPERATION_FAILED = -49348604; - - /// < Audio policy blocked - static const int TTS_ERROR_AUDIO_POLICY_BLOCKED = -49348603; - - /// < Not supported feature of current engine @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif - static const int TTS_ERROR_NOT_SUPPORTED_FEATURE = -49348602; - - /// < Service reset @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif - static const int TTS_ERROR_SERVICE_RESET = -49348601; -} - -/// @brief Enumeration for TTS mode. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class tts_mode_e { - /// < Default mode for normal application - static const int TTS_MODE_DEFAULT = 0; - - /// < Notification mode - static const int TTS_MODE_NOTIFICATION = 1; - - /// < Accessibility mode - static const int TTS_MODE_SCREEN_READER = 2; -} - -/// @brief Enumeration for state. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -abstract class tts_state_e { - /// < 'CREATED' state - static const int TTS_STATE_CREATED = 0; - - /// < 'READY' state - static const int TTS_STATE_READY = 1; - - /// < 'PLAYING' state - static const int TTS_STATE_PLAYING = 2; - - /// < 'PAUSED' state - static const int TTS_STATE_PAUSED = 3; -} - -final class tts_s extends ffi.Opaque {} - -/// @brief The TTS handle. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -typedef tts_h = ffi.Pointer; - -/// @brief Called to retrieve the supported voice. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] tts The TTS handle -/// @param[in] language Language specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code (for example, "ko_KR" for Korean, "en_US" for American English) -/// @param[in] voice_type A voice type (e.g. #TTS_VOICE_TYPE_MALE, #TTS_VOICE_TYPE_FEMALE) -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// @c false to break out of the loop -/// @pre tts_foreach_supported_voices() will invoke this callback function. -/// @see tts_foreach_supported_voices() -typedef tts_supported_voice_cb - = ffi.Pointer>; -typedef tts_supported_voice_cbFunction = ffi.Bool Function( - tts_h tts, - ffi.Pointer language, - ffi.Int voice_type, - ffi.Pointer user_data); -typedef Darttts_supported_voice_cbFunction = bool Function( - tts_h tts, - ffi.Pointer language, - int voice_type, - ffi.Pointer user_data); - -/// @brief Called when the state of TTS is changed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @details If the daemon must stop player because of changing engine and -/// the daemon must pause player because of other requests, this callback function is called. -/// @param[in] tts The TTS handle -/// @param[in] previous The previous state -/// @param[in] current The current state -/// @param[in] user_data The user data passed from the callback registration function -/// @pre An application registers this callback using tts_set_state_changed_cb() to detect changing state. -/// @see tts_set_state_changed_cb() -/// @see tts_unset_state_changed_cb() -typedef tts_state_changed_cb - = ffi.Pointer>; -typedef tts_state_changed_cbFunction = ffi.Void Function(tts_h tts, - ffi.Int32 previous, ffi.Int32 current, ffi.Pointer user_data); -typedef Darttts_state_changed_cbFunction = void Function( - tts_h tts, int previous, int current, ffi.Pointer user_data); - -/// @brief Called when utterance has started. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] tts The TTS handle -/// @param[in] utt_id The utterance ID passed from the add text function -/// @param[in] user_data The user data passed from the callback registration function -/// @pre An application registers this callback using tts_set_utterance_started_cb() to detect utterance started. -/// @see tts_add_text() -/// @see tts_set_utterance_started_cb() -/// @see tts_unset_utterance_started_cb() -typedef tts_utterance_started_cb - = ffi.Pointer>; -typedef tts_utterance_started_cbFunction = ffi.Void Function( - tts_h tts, ffi.Int utt_id, ffi.Pointer user_data); -typedef Darttts_utterance_started_cbFunction = void Function( - tts_h tts, int utt_id, ffi.Pointer user_data); - -/// @brief Called when utterance is finished. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] tts The TTS handle -/// @param[in] utt_id The utterance ID passed from the add text function -/// @param[in] user_data The user data passed from the callback registration function -/// @pre An application registers this callback using tts_set_utterance_completed_cb() to detect utterance completed. -/// @see tts_add_text() -/// @see tts_set_utterance_completed_cb() -/// @see tts_unset_utterance_completed_cb() -typedef tts_utterance_completed_cb - = ffi.Pointer>; -typedef tts_utterance_completed_cbFunction = ffi.Void Function( - tts_h tts, ffi.Int utt_id, ffi.Pointer user_data); -typedef Darttts_utterance_completed_cbFunction = void Function( - tts_h tts, int utt_id, ffi.Pointer user_data); - -/// @brief Called when an error occurs. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] tts The TTS handle -/// @param[in] utt_id The utterance ID passed from the add text function -/// @param[in] reason The error code -/// @param[in] user_data The user data passed from the callback registration function -/// @pre An application registers this callback using tts_set_error_cb() to detect error. -/// @see tts_play() -/// @see tts_pause() -/// @see tts_stop() -/// @see tts_set_error_cb() -/// @see tts_unset_error_cb() -typedef tts_error_cb = ffi.Pointer>; -typedef tts_error_cbFunction = ffi.Void Function(tts_h tts, ffi.Int utt_id, - ffi.Int32 reason, ffi.Pointer user_data); -typedef Darttts_error_cbFunction = void Function( - tts_h tts, int utt_id, int reason, ffi.Pointer user_data); - -/// @brief Called when the default voice is changed. -/// @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif -/// @param[in] tts The TTS handle -/// @param[in] previous_language The previous language -/// @param[in] previous_voice_type The previous voice type -/// @param[in] current_language The current language -/// @param[in] current_voice_type The current voice type -/// @param[in] user_data The user data passed from the callback registration function -/// @see tts_set_default_voice_changed_cb() -typedef tts_default_voice_changed_cb - = ffi.Pointer>; -typedef tts_default_voice_changed_cbFunction = ffi.Void Function( - tts_h tts, - ffi.Pointer previous_language, - ffi.Int previous_voice_type, - ffi.Pointer current_language, - ffi.Int current_voice_type, - ffi.Pointer user_data); -typedef Darttts_default_voice_changed_cbFunction = void Function( - tts_h tts, - ffi.Pointer previous_language, - int previous_voice_type, - ffi.Pointer current_language, - int current_voice_type, - ffi.Pointer user_data); - -/// @brief Called when the engine is changed. -/// @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif -/// @param[in] tts The TTS handle -/// @param[in] engine_id Engine ID -/// @param[in] language The default language specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code (for example, "ko_KR" for Korean, "en_US" for American English) -/// @param[in] voice_type The default voice type -/// @param[in] need_credential The necessity of credential -/// @param[in] user_data The user data passed from the callback registration function -/// @see tts_set_engine_changed_cb() -typedef tts_engine_changed_cb - = ffi.Pointer>; -typedef tts_engine_changed_cbFunction = ffi.Void Function( - tts_h tts, - ffi.Pointer engine_id, - ffi.Pointer language, - ffi.Int voice_type, - ffi.Bool need_credential, - ffi.Pointer user_data); -typedef Darttts_engine_changed_cbFunction = void Function( - tts_h tts, - ffi.Pointer engine_id, - ffi.Pointer language, - int voice_type, - bool need_credential, - ffi.Pointer user_data); - -/// @brief Enumeration for error codes. -/// @since_tizen 3.0 -abstract class ttse_error_e { - /// < Successful - static const int TTSE_ERROR_NONE = 0; - - /// < Out of Memory - static const int TTSE_ERROR_OUT_OF_MEMORY = -12; - - /// < I/O error - static const int TTSE_ERROR_IO_ERROR = -5; - - /// < Invalid parameter - static const int TTSE_ERROR_INVALID_PARAMETER = -22; - - /// < Out of network - static const int TTSE_ERROR_NETWORK_DOWN = -100; - - /// < Permission denied - static const int TTSE_ERROR_PERMISSION_DENIED = -13; - - /// < Invalid state - static const int TTSE_ERROR_INVALID_STATE = -49348607; - - /// < Invalid voice - static const int TTSE_ERROR_INVALID_VOICE = -49348606; - - /// < Operation failed - static const int TTSE_ERROR_OPERATION_FAILED = -49348604; - - /// < Not supported feature - static const int TTSE_ERROR_NOT_SUPPORTED_FEATURE = -49348602; - - /// < Not supported - static const int TTSE_ERROR_NOT_SUPPORTED = -1073741822; -} - -/// @brief Enumeration for audio type. -/// @since_tizen 3.0 -abstract class ttse_audio_type_e { - /// < Signed 16-bit audio type - static const int TTSE_AUDIO_TYPE_RAW_S16 = 0; - - /// < Unsigned 8-bit audio type - static const int TTSE_AUDIO_TYPE_RAW_U8 = 1; - static const int TTSE_AUDIO_TYPE_MAX = 2; -} - -/// @brief Enumeration for result event type. -/// @since_tizen 3.0 -abstract class ttse_result_event_e { - /// < Event when the voice synthesis is failed - static const int TTSE_RESULT_EVENT_FAIL = -1; - - /// < Event when the sound data is first data by callback function - static const int TTSE_RESULT_EVENT_START = 1; - - /// < Event when the next sound data exist, not first and not last - static const int TTSE_RESULT_EVENT_CONTINUE = 2; - - /// < Event when the sound data is last data or sound data is only one result - static const int TTSE_RESULT_EVENT_FINISH = 3; -} - -/// @brief A structure for the TTS engine functions. -/// @details This structure contains essential callback functions for operating TTS engine. -/// @since_tizen 3.0 -/// @remarks These functions are mandatory for operating TTS engine. Therefore, all functions MUST be implemented. -final class ttse_request_callback_s extends ffi.Struct { - /// < The version of the structure 'ttse_request_callback_s' - @ffi.Int() - external int version; - - /// < Called when the engine service user requests the basic information of TTS engine - external ttse_get_info_cb get_info; - - /// < Called when the engine service user initializes TTS engine - external ttse_initialize_cb initialize; - - /// < Called when the engine service user deinitializes TTS engine - external ttse_deinitialize_cb deinitialize; - - /// < Called when the engine service user gets the whole supported voice list - external ttse_foreach_supported_voices_cb foreach_voices; - - /// < Called when the engine service user checks whether the voice is valid or not in TTS engine - external ttse_is_valid_voice_cb is_valid_voice; - - /// < Called when the engine service user sets the default pitch of TTS engine - external ttse_set_pitch_cb set_pitch; - - /// < Called when the engine service user requests to load the corresponding voice type for the first time - external ttse_load_voice_cb load_voice; - - /// < Called when the engine service user requests to unload the corresponding voice type or to stop using voice - external ttse_unload_voice_cb unload_voice; - - /// < Called when the engine service user starts to synthesize a voice, asynchronously - external ttse_start_synthesis_cb start_synth; - - /// < Called when the engine service user cancels to synthesize a voice - external ttse_cancel_synthesis_cb cancel_synth; - - /// < Called when the engine service user requests for TTS engine to check whether the application agreed the usage of TTS engine - external ttse_check_app_agreed_cb check_app_agreed; - - /// < Called when the engine service user checks whether TTS engine needs the application's credential - external ttse_need_app_credential_cb need_app_credential; -} - -/// @brief Called when the engine service user requests the basic information of TTS engine. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using ttse_main(). -/// The allocated @a engine_uuid, @a engine_name, and @a engine_setting will be released internally. -/// In order to upload the engine at Tizen Appstore, both a service app and a ui app are necessary. -/// Therefore, @a engine_setting must be transferred to the engine service user. -/// @param[out] engine_uuid UUID of engine -/// @param[out] engine_name Name of engine -/// @param[out] engine_setting The engine setting application(ui app)'s app ID -/// @param[out] use_network The status for using network -/// @return @c 0 on success, -/// otherwise a negative error code on failure -/// @retval #TTSE_ERROR_NONE Successful -/// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure -typedef ttse_get_info_cb - = ffi.Pointer>; -typedef ttse_get_info_cbFunction = ffi.Int Function( - ffi.Pointer> engine_uuid, - ffi.Pointer> engine_name, - ffi.Pointer> engine_setting, - ffi.Pointer use_network); -typedef Dartttse_get_info_cbFunction = int Function( - ffi.Pointer> engine_uuid, - ffi.Pointer> engine_name, - ffi.Pointer> engine_setting, - ffi.Pointer use_network); - -/// @brief Called when the engine service user initializes TTS engine. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using ttse_main(). -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #TTSE_ERROR_NONE Successful -/// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #TTSE_ERROR_INVALID_STATE Already initialized -/// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure -/// @retval #TTSE_ERROR_PERMISSION_DENIED Permission denied -/// @see ttse_deinitialize_cb() -typedef ttse_initialize_cb - = ffi.Pointer>; -typedef ttse_initialize_cbFunction = ffi.Int Function(); -typedef Dartttse_initialize_cbFunction = int Function(); - -/// @brief Called when the engine service user deinitializes TTS engine. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using ttse_main(). -/// NOTE that the engine may be terminated automatically. -/// When this callback function is invoked, the release of resources is necessary. -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #TTSE_ERROR_NONE Successful -/// @retval #TTSE_ERROR_INVALID_STATE Not initialized -/// @see ttse_initialize_cb() -typedef ttse_deinitialize_cb - = ffi.Pointer>; -typedef ttse_deinitialize_cbFunction = ffi.Int Function(); -typedef Dartttse_deinitialize_cbFunction = int Function(); - -/// @brief Called when the engine service user gets the whole supported voice list. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using ttse_main(). -/// In this function, the engine service user's callback function 'ttse_supported_voice_cb()' is invoked repeatedly for getting all supported voices, and @a user_data must be transferred to 'ttse_supported_voice_cb()'. -/// If 'ttse_supported_voice_cb()' returns @c false, it should be stopped to call 'ttse_supported_voice_cb()'. -/// @param[in] callback The callback function -/// @param[in] user_data The user data which must be passed to ttse_supported_voice_cb() -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #TTSE_ERROR_NONE Successful -/// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #TTSE_ERROR_INVALID_STATE Not initialized -/// @post This callback function invokes ttse_supported_voice_cb() repeatedly for getting all supported voices. -/// @see ttse_supported_voice_cb() -typedef ttse_foreach_supported_voices_cb - = ffi.Pointer>; -typedef ttse_foreach_supported_voices_cbFunction = ffi.Int Function( - ttse_supported_voice_cb callback, ffi.Pointer user_data); -typedef Dartttse_foreach_supported_voices_cbFunction = int Function( - ttse_supported_voice_cb callback, ffi.Pointer user_data); - -/// @brief Called when TTS engine informs the engine service user about whole supported language and voice type list. -/// @details This callback function is implemented by the engine service user. Therefore, the engine developer does NOT have to implement this callback function. -/// @since_tizen 3.0 -/// @remarks This callback function is called by ttse_foreach_supported_voices_cb() to inform the whole supported voice list. -/// @a user_data must be transferred from ttse_foreach_supported_voices_cb(). -/// @param[in] language The language is specified as an ISO 3166 alpha-2 two-letter country code -/// followed by ISO 639-1 for the two-letter language code. -/// For example, "ko_KR" for Korean, "en_US" for American English -/// @param[in] type The voice type -/// @param[in] user_data The user data passed from ttse_foreach_supported_voices_cb() -/// @return @c true to continue with the next iteration of the loop -/// @c false to break out of the loop -/// @pre ttse_foreach_supported_voices_cb() will invoke this callback function. -/// @see ttse_foreach_supported_voices_cb() -typedef ttse_supported_voice_cb - = ffi.Pointer>; -typedef ttse_supported_voice_cbFunction = ffi.Bool Function( - ffi.Pointer language, - ffi.Int type, - ffi.Pointer user_data); -typedef Dartttse_supported_voice_cbFunction = bool Function( - ffi.Pointer language, int type, ffi.Pointer user_data); - -/// @brief Called when the engine service user checks whether the voice is valid or not in TTS engine. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using ttse_main(). -/// @param[in] language The language is specified as an ISO 3166 alpha-2 two-letter country code -/// followed by ISO 639-1 for the two-letter language code. -/// For example, "ko_KR" for Korean, "en_US" for American English -/// @param[in] type The voice type -/// @param[out] is_valid A variable for checking whether the corresponding voice is valid or not. -/// @c true to be valid, -/// @c false to be invalid -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #TTSE_ERROR_NONE Successful -/// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter -/// @see ttse_foreach_supported_voices_cb() -typedef ttse_is_valid_voice_cb - = ffi.Pointer>; -typedef ttse_is_valid_voice_cbFunction = ffi.Int Function( - ffi.Pointer language, - ffi.Int type, - ffi.Pointer is_valid); -typedef Dartttse_is_valid_voice_cbFunction = int Function( - ffi.Pointer language, int type, ffi.Pointer is_valid); - -/// @brief Called when the engine service user sets the default pitch of TTS engine. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using ttse_main(). -/// @param[in] pitch The default pitch -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #TTSE_ERROR_NONE Successful -/// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #TTSE_ERROR_INVALID_STATE Not initialized -/// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure -typedef ttse_set_pitch_cb - = ffi.Pointer>; -typedef ttse_set_pitch_cbFunction = ffi.Int Function(ffi.Int pitch); -typedef Dartttse_set_pitch_cbFunction = int Function(int pitch); - -/// @brief Called when the engine service user requests to load the corresponding voice type for the first time. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using ttse_main(). -/// @param[in] language The language is specified as an ISO 3166 alpha-2 two-letter country code -/// followed by ISO 639-1 for the two-letter language code. -/// For example, "ko_KR" for Korean, "en_US" for American English -/// @param[in] type The voice type -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #TTSE_ERROR_NONE Successful -/// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #TTSE_ERROR_INVALID_STATE Not initialized -/// @retval #TTSE_ERROR_OUT_OF_MEMORY Out of memory -/// @retval #TTSE_ERROR_INVALID_VOICE Invalid voice -/// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure -/// @see ttse_unload_voice_cb() -typedef ttse_load_voice_cb - = ffi.Pointer>; -typedef ttse_load_voice_cbFunction = ffi.Int Function( - ffi.Pointer language, ffi.Int type); -typedef Dartttse_load_voice_cbFunction = int Function( - ffi.Pointer language, int type); - -/// @brief Called when the engine service user requests to unload the corresponding voice type or to stop using voice. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using ttse_main(). -/// @param[in] language The language is specified as an ISO 3166 alpha-2 two-letter country code -/// followed by ISO 639-1 for the two-letter language code. -/// For example, "ko_KR" for Korean, "en_US" for American English -/// @param[in] type The voice type -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #TTSE_ERROR_NONE Successful -/// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #TTSE_ERROR_INVALID_STATE Not initialized -/// @retval #TTSE_ERROR_INVALID_VOICE Invalid voice -/// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure -/// @see ttse_load_voice_cb() -typedef ttse_unload_voice_cb - = ffi.Pointer>; -typedef ttse_unload_voice_cbFunction = ffi.Int Function( - ffi.Pointer language, ffi.Int type); -typedef Dartttse_unload_voice_cbFunction = int Function( - ffi.Pointer language, int type); - -/// @brief Called when the engine service user starts to synthesize a voice, asynchronously. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using ttse_main(). -/// In this callback function, TTS engine must transfer the synthesized result and @a user_data to the engine service user using ttse_send_result(). -/// Also, if TTS engine needs the application's credential, it can set the credential granted to the application. -/// @param[in] language The language is specified as an ISO 3166 alpha-2 two-letter country code -/// followed by ISO 639-1 for the two-letter language code. -/// For example, "ko_KR" for Korean, "en_US" for American English -/// @param[in] type The voice type -/// @param[in] text Texts -/// @param[in] speed The speed of speaking -/// @param[in] appid The Application ID -/// @param[in] credential The credential granted to the application -/// @param[in] user_data The user data which must be passed to ttse_send_result() -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #TTSE_ERROR_NONE Successful -/// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #TTSE_ERROR_INVALID_STATE Not initialized or already started synthesis -/// @retval #TTSE_ERROR_INVALID_VOICE Invalid voice -/// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure -/// @retval #TTSE_ERROR_NETWORK_DOWN Out of network -/// @retval #TTSE_ERROR_PERMISSION_DENIED Permission denied -/// @post This function invokes ttse_send_result(). -/// @see ttse_send_result() -/// @see ttse_cancel_synthesis_cb() -/// @see ttse_need_app_credential_cb() -typedef ttse_start_synthesis_cb - = ffi.Pointer>; -typedef ttse_start_synthesis_cbFunction = ffi.Int Function( - ffi.Pointer language, - ffi.Int type, - ffi.Pointer text, - ffi.Int speed, - ffi.Pointer appid, - ffi.Pointer credential, - ffi.Pointer user_data); -typedef Dartttse_start_synthesis_cbFunction = int Function( - ffi.Pointer language, - int type, - ffi.Pointer text, - int speed, - ffi.Pointer appid, - ffi.Pointer credential, - ffi.Pointer user_data); - -/// @brief Called when the engine service user cancels to synthesize a voice. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using ttse_main(). -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #TTSE_ERROR_NONE Successful -/// @retval #TTSE_ERROR_INVALID_STATE Not initialized or not started synthesis -/// @pre The ttse_start_synthesis_cb() should be performed -/// @see ttse_start_synthesis_cb() -typedef ttse_cancel_synthesis_cb - = ffi.Pointer>; -typedef ttse_cancel_synthesis_cbFunction = ffi.Int Function(); -typedef Dartttse_cancel_synthesis_cbFunction = int Function(); - -/// @brief Called when the engine service user requests for TTS engine to check whether the application agreed the usage of TTS engine. -/// @details This callback function is called when the engine service user requests for TTS engine to check the application's agreement about using the engine. -/// According to the need, the engine developer can provide some user interfaces to check the agreement. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using ttse_main(). -/// If the TTS engine developer wants not to check the agreement, the developer has need to return proper values as @a is_agreed in accordance with the intention. @c true if the developer regards that every application agreed the usage of the engine, @c false if the developer regards that every application disagreed. -/// NOTE that, however, there may be any legal issue unless the developer checks the agreement. Therefore, we suggest that the engine developers should provide a function to check the agreement. -/// @param[in] appid The Application ID -/// @param[out] is_agreed A variable for checking whether the application agreed to use TTS engine or not. -/// @c true to agree, -/// @c false to disagree -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #TTSE_ERROR_NONE Successful -/// @retval #TTSE_ERROR_INVALID_STATE Not initialized -/// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #TTSE_ERROR_NOT_SUPPORTED_FEATURE Not supported feature -typedef ttse_check_app_agreed_cb - = ffi.Pointer>; -typedef ttse_check_app_agreed_cbFunction = ffi.Int Function( - ffi.Pointer appid, ffi.Pointer is_agreed); -typedef Dartttse_check_app_agreed_cbFunction = int Function( - ffi.Pointer appid, ffi.Pointer is_agreed); - -/// @brief Called when the engine service user checks whether TTS engine needs the application's credential. -/// @since_tizen 3.0 -/// @remarks This callback function is mandatory and must be registered using ttse_main(). -/// @return @c true if TTS engine needs the application's credential, -/// otherwise @c false -typedef ttse_need_app_credential_cb - = ffi.Pointer>; -typedef ttse_need_app_credential_cbFunction = ffi.Bool Function(); -typedef Dartttse_need_app_credential_cbFunction = bool Function(); - -/// @brief Called when TTS engine receives the private data from the engine service user. -/// @details This callback function is called when the engine service user sends the private data to TTS engine. -/// @since_tizen 3.0 -/// @remarks This callback function is optional and is registered using ttse_set_private_data_set_cb(). -/// @param[in] key The key field of private data -/// @param[in] data The data field of private data -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #TTSE_ERROR_NONE Successful -/// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure -/// @retval #TTSE_ERROR_NOT_SUPPORTED_FEATURE Not supported feature -/// @see ttse_private_data_requested_cb() -/// @see ttse_set_private_data_set_cb() -typedef ttse_private_data_set_cb - = ffi.Pointer>; -typedef ttse_private_data_set_cbFunction = ffi.Int Function( - ffi.Pointer key, ffi.Pointer data); -typedef Dartttse_private_data_set_cbFunction = int Function( - ffi.Pointer key, ffi.Pointer data); - -/// @brief Called when TTS engine provides the engine service user with the private data. -/// @details This callback function is called when the engine service user gets the private data from TTS engine. -/// @since_tizen 3.0 -/// @remarks This callback function is optional and is registered using ttse_set_private_data_requested_cb(). -/// @param[out] key The key field of private data -/// @param[out] data The data field of private data -/// @return @c 0 on success, -/// otherwise a negative error value -/// @retval #TTSE_ERROR_NONE Successful -/// @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #TTSE_ERROR_OPERATION_FAILED Operation failure -/// @retval #TTSE_ERROR_NOT_SUPPORTED_FEATURE Not supported feature -/// @see ttse_private_data_set_cb() -/// @see ttse_set_private_data_requested_cb() -typedef ttse_private_data_requested_cb - = ffi.Pointer>; -typedef ttse_private_data_requested_cbFunction = ffi.Int Function( - ffi.Pointer key, ffi.Pointer> data); -typedef Dartttse_private_data_requested_cbFunction = int Function( - ffi.Pointer key, ffi.Pointer> data); - -/// @brief Called to retrieve supported language. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] language A language is specified as an ISO 3166 alpha-2 two letter country-code -/// followed by ISO 639-1 for the two-letter language code. -/// For example, "ko_KR" for Korean, "en_US" for American English -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, -/// @c false to break out of the loop -/// @pre The function will invoke this callback. -typedef vc_supported_language_cb - = ffi.Pointer>; -typedef vc_supported_language_cbFunction = ffi.Bool Function( - ffi.Pointer language, ffi.Pointer user_data); -typedef Dartvc_supported_language_cbFunction = bool Function( - ffi.Pointer language, ffi.Pointer user_data); - -/// @brief Enumeration for client state. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class vc_state_e { - /// < 'None' state - static const int VC_STATE_NONE = 0; - - /// < 'Initialized' state - static const int VC_STATE_INITIALIZED = 1; - - /// < 'Ready' state - static const int VC_STATE_READY = 2; -} - -/// @brief Enumeration for service state. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class vc_service_state_e { - /// < 'None' state - static const int VC_SERVICE_STATE_NONE = 0; - - /// < 'Ready' state - static const int VC_SERVICE_STATE_READY = 1; - - /// < 'Recording' state - static const int VC_SERVICE_STATE_RECORDING = 2; - - /// < 'Processing' state - static const int VC_SERVICE_STATE_PROCESSING = 3; -} - -/// @brief The voice command list handle. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -typedef vc_cmd_list_h = ffi.Pointer; - -final class vc_cmd_list_s extends ffi.Opaque {} - -/// @brief Called when client gets the recognition result. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @remarks If the duplicated commands are recognized, the event(e.g. #VC_RESULT_EVENT_REJECTED) of command may be rejected -/// for selecting command as priority. If you set similar or same commands or the recognized results are multi-results, -/// vc_cmd_list has the multi commands. -/// @param[in] event The result event (e.g. #VC_RESULT_EVENT_RESULT_SUCCESS, #VC_RESULT_EVENT_REJECTED) -/// @param[in] vc_cmd_list The recognized command list -/// @param[in] result The spoken text -/// @param[in] user_data The user data passed from the callback registration function -/// @pre An application registers callback function. -/// @see vc_set_result_cb() -typedef vc_result_cb = ffi.Pointer>; -typedef vc_result_cbFunction = ffi.Void Function( - ffi.Int32 event, - vc_cmd_list_h vc_cmd_list, - ffi.Pointer result, - ffi.Pointer user_data); -typedef Dartvc_result_cbFunction = void Function( - int event, - vc_cmd_list_h vc_cmd_list, - ffi.Pointer result, - ffi.Pointer user_data); - -/// @brief Enumeration for result event. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class vc_result_event_e { - /// < Normal result - static const int VC_RESULT_EVENT_RESULT_SUCCESS = 0; - - /// < Rejected result - static const int VC_RESULT_EVENT_REJECTED = 1; -} - -/// @brief Called when the state of voice control service is changed. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] previous A previous state -/// @param[in] current A current state -/// @param[in] user_data The user data passed from the callback registration function -/// @pre An application registers this callback to detect changing service state. -/// @see vc_set_service_state_changed_cb() -typedef vc_service_state_changed_cb - = ffi.Pointer>; -typedef vc_service_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 previous, ffi.Int32 current, ffi.Pointer user_data); -typedef Dartvc_service_state_changed_cbFunction = void Function( - int previous, int current, ffi.Pointer user_data); - -/// @brief Called when the state of voice control client is changed. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] previous A previous state -/// @param[in] current A current state -/// @param[in] user_data The user data passed from the callback registration function -/// @pre An application registers this callback to detect changing state. -/// @see vc_set_state_changed_cb() -typedef vc_state_changed_cb - = ffi.Pointer>; -typedef vc_state_changed_cbFunction = ffi.Void Function( - ffi.Int32 previous, ffi.Int32 current, ffi.Pointer user_data); -typedef Dartvc_state_changed_cbFunction = void Function( - int previous, int current, ffi.Pointer user_data); - -/// @brief Called when default language is changed. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] previous Previous language -/// @param[in] current Current language -/// @param[in] user_data The user data passed from the callback registration function -/// @pre An application registers this callback to detect changing mode. -/// @see vc_set_current_language_changed_cb() -typedef vc_current_language_changed_cb - = ffi.Pointer>; -typedef vc_current_language_changed_cbFunction = ffi.Void Function( - ffi.Pointer previous, - ffi.Pointer current, - ffi.Pointer user_data); -typedef Dartvc_current_language_changed_cbFunction = void Function( - ffi.Pointer previous, - ffi.Pointer current, - ffi.Pointer user_data); - -/// @brief Called when error occurred. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -/// @param[in] reason The error type (e.g. #VC_ERROR_OUT_OF_MEMORY, #VC_ERROR_TIMED_OUT) -/// @param[in] user_data The user data passed from the callback registration function -/// @pre An application registers this callback to detect error. -/// @see vc_set_error_cb() -typedef vc_error_cb = ffi.Pointer>; -typedef vc_error_cbFunction = ffi.Void Function( - ffi.Int32 reason, ffi.Pointer user_data); -typedef Dartvc_error_cbFunction = void Function( - int reason, ffi.Pointer user_data); - -/// @brief Enumeration for error codes. -/// @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif -abstract class vc_error_e { - /// < Successful - static const int VC_ERROR_NONE = 0; - - /// < Out of Memory - static const int VC_ERROR_OUT_OF_MEMORY = -12; - - /// < I/O error - static const int VC_ERROR_IO_ERROR = -5; - - /// < Invalid parameter - static const int VC_ERROR_INVALID_PARAMETER = -22; - - /// < No answer from service - static const int VC_ERROR_TIMED_OUT = -1073741823; - - /// < Busy recorder - static const int VC_ERROR_RECORDER_BUSY = -16; - - /// < Permission denied - static const int VC_ERROR_PERMISSION_DENIED = -13; - - /// < VC NOT supported - static const int VC_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Invalid state - static const int VC_ERROR_INVALID_STATE = -49610735; - - /// < Invalid language - static const int VC_ERROR_INVALID_LANGUAGE = -49610734; - - /// < No available engine - static const int VC_ERROR_ENGINE_NOT_FOUND = -49610733; - - /// < Operation failed - static const int VC_ERROR_OPERATION_FAILED = -49610732; - - /// < Operation rejected - static const int VC_ERROR_OPERATION_REJECTED = -49610731; - - /// < List reached end - static const int VC_ERROR_ITERATION_END = -49610730; - - /// < List empty - static const int VC_ERROR_EMPTY = -49610729; - - /// < Service daemon reset (Since 3.0) - static const int VC_ERROR_SERVICE_RESET = -49610728; - - /// < In progress to ready (Since 3.0) - static const int VC_ERROR_IN_PROGRESS_TO_READY = -49610727; - - /// < In progress to recording (Since 3.0) - static const int VC_ERROR_IN_PROGRESS_TO_RECORDING = -49610720; - - /// < In progress to processing (Since 3.0) - static const int VC_ERROR_IN_PROGRESS_TO_PROCESSING = -49610719; - - /// < Not supported feature of current engine (Since 4.0) - static const int VC_ERROR_NOT_SUPPORTED_FEATURE = -49610718; -} - -/// @brief Enumerations of error codes. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -abstract class vce_error_e { - /// < Successful - static const int VCE_ERROR_NONE = 0; - - /// < Out of Memory - static const int VCE_ERROR_OUT_OF_MEMORY = -12; - - /// < I/O error - static const int VCE_ERROR_IO_ERROR = -5; - - /// < Invalid parameter - static const int VCE_ERROR_INVALID_PARAMETER = -22; - - /// < Out of network - static const int VCE_ERROR_OUT_OF_NETWORK = -100; - - /// < Busy resource - static const int VCE_ERROR_RECORDER_BUSY = -16; - - /// < VC Engine NOT supported - static const int VCE_ERROR_NOT_SUPPORTED = -1073741822; - - /// < Invalid state - static const int VCE_ERROR_INVALID_STATE = -49610735; - - /// < Invalid language - static const int VCE_ERROR_INVALID_LANGUAGE = -49610734; - - /// < Operation failed - static const int VCE_ERROR_OPERATION_FAILED = -49610732; - - /// < Permission denied - static const int VCE_ERROR_PERMISSION_DENIED = -13; - - /// < Not supported feature of current engine - static const int VCE_ERROR_NOT_SUPPORTED_FEATURE = -49610718; -} - -/// @brief Enumerations of audio type. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -abstract class vce_audio_type_e { - /// < Signed 16bit audio type, Little endian - static const int VCE_AUDIO_TYPE_PCM_S16_LE = 0; - - /// < Unsigned 8bit audio type - static const int VCE_AUDIO_TYPE_PCM_U8 = 1; -} - -/// @brief Enumerations of callback event. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -abstract class vce_result_event_e { - /// < Event when the recognition full result is ready - static const int VCE_RESULT_EVENT_SUCCESS = 0; - - /// < Event when the recognition result is rejected - static const int VCE_RESULT_EVENT_REJECTED = 1; - - /// < Event when the recognition has failed - static const int VCE_RESULT_EVENT_ERROR = 2; -} - -/// @brief Enumerations of command type. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -abstract class vce_command_format_e { - /// < Fixed command - static const int VCE_COMMAND_FORMAT_FIXED = 0; - - /// < Fixed command + variable-fixed command - static const int VCE_COMMAND_FORMAT_FIXED_AND_VFIXED = 1; - - /// < variable-fixed command + Fixed command - static const int VCE_COMMAND_FORMAT_VFIXED_AND_FIXED = 2; - - /// < Fixed command + Non-fixed command - static const int VCE_COMMAND_FORMAT_FIXED_AND_NONFIXED = 3; - - /// < Non-fixed command + Fixed command - static const int VCE_COMMAND_FORMAT_NONFIXED_AND_FIXED = 4; - - /// < Action command - static const int VCE_COMMAND_FORMAT_ACTION = 5; - - /// < Partial matched command - static const int VCE_COMMAND_FORMAT_PARTIAL = 6; -} - -/// @brief Enumerations of speech detect. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -abstract class vce_speech_detect_e { - /// < No event - static const int VCE_SPEECH_DETECT_NONE = 0; - - /// < Begin of speech detected - static const int VCE_SPEECH_DETECT_BEGIN = 1; - - /// < End of speech detected - static const int VCE_SPEECH_DETECT_END = 2; -} - -/// @brief Enumerations of ASR result events. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -abstract class vce_asr_result_event_e { - /// < Event when the ASR result is last data or ASR result is only one result - static const int VCE_ASR_RESULT_EVENT_FINAL_RESULT = 0; - - /// < Event when the ASR result exist, not first and not last - static const int VCE_ASR_RESULT_EVENT_PARTIAL_RESULT = 1; - - /// < Event when the ASR result is failed - static const int VCE_ASR_RESULT_EVENT_ERROR = 2; -} - -/// @brief Enumerations of audio channels. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -abstract class vce_audio_channel_e { - /// < 1 channel, mono - static const int VCE_AUDIO_CHANNEL_MONO = 0; - - /// < 2 channels, stereo - static const int VCE_AUDIO_CHANNEL_STEREO = 1; -} - -/// @brief Enumeration for TTS feedback events. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -abstract class vce_feedback_event_e { - /// < Failed - static const int VCE_FEEDBACK_EVENT_FAIL = -1; - - /// < Start event - static const int VCE_FEEDBACK_EVENT_START = 1; - - /// < Continue event - static const int VCE_FEEDBACK_EVENT_CONTINUE = 2; - - /// < Finish event - static const int VCE_FEEDBACK_EVENT_FINISH = 3; -} - -final class vce_cmd_s extends ffi.Opaque {} - -/// @brief A structure for the VC engine functions. -/// @details This structure contains essential callback functions for operating VC engine. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @remarks These functions ar mandatory for operating VC engine. Therefore, all functions MUST be implemented. -final class vce_request_callback_s extends ffi.Struct { - /// < Version - @ffi.Int() - external int version; - - /// < Called when the engine service user requests the basic information of VC engine - external vce_get_info_cb get_info; - - /// < Get recording format - external vce_get_recording_format_cb get_recording_format; - - /// < Foreach language list - external vce_foreach_supported_languages_cb foreach_langs; - - /// < Check language - external vce_is_language_supported_cb is_lang_supported; - - /// < Initialize engine - external vce_initialize_cb initialize; - - /// < Shutdown engine - external vce_deinitialize_cb deinitialize; - - /// < Set language - external vce_set_language_cb set_language; - - /// < Request to set current commands - external vce_set_commands_cb set_commands; - - /// < Request to unset current commands - external vce_unset_commands_cb unset_commands; - - /// < Start recognition - external vce_start_cb start; - - /// < Set recording data - external vce_set_recording_data_cb set_recording; - - /// < Stop recording for getting result - external vce_stop_cb stop; - - /// < Cancel recording and processing - external vce_cancel_cb cancel; - - /// < Set audio type - external vce_set_audio_type_cb set_audio_type; - - /// < Set server dialog - external vce_set_server_dialog_cb set_server_dialog; - - /// < Set domain - external vce_set_domain_cb set_domain; - - /// < Request to process text - external vce_process_text_cb process_text; - - /// < Request to process list event - external vce_process_list_event_cb process_list_event; - - /// < Request to process haptic event - external vce_process_haptic_event_cb process_haptic_event; - - /// < Set private data from the app - external vce_private_data_set_cb private_data_set; - - /// < Send private data to the app - external vce_private_data_requested_cb private_data_request; - - /// < Send essential value from NLU result - external vce_nlu_base_info_requested_cb nlu_base_info_request; - - /// < Get specific engine's request from the engine service user - external vce_specific_engine_request_cb specific_engine_request; -} - -/// @brief Called when the engine service user requests the base information of VC engine. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @remarks This callback function is mandatory and must be registered using vce_main(). -/// The @a engine_uuid is managed by the platform and will be released when this callback function is completed. -/// The @a engine_name is managed by the platform and will be released when this callback function is completed. -/// The @a engine_settings_app_id is managed by the platform and will be released when this callback function is completed. -/// The @a use_network is managed by the platform and will be released when this callback function is completed. -/// In order to upload the engine to Tizen Appstore, both the service app and the UI app (engine settings) are necessary. -/// Therefore, @a engine_settings_app_id should be set to the application ID of the UI application. -/// If there is no UI application, then @a engine_settings_app_id should be set to NULL. -/// @param[out] engine_uuid The engine id -/// @param[out] engine_name The engine name -/// @param[out] engine_settings_app_id The ID of the engine settings application (the UI application) -/// @param[out] use_network @c true to need network @c false not to need network. -/// @return @c 0 on success, otherwise a negative error code on failure -/// @retval #VCE_ERROR_NONE Successful -/// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #VCE_ERROR_OPERATION_FAILED Operation failure -typedef vce_get_info_cb - = ffi.Pointer>; -typedef vce_get_info_cbFunction = ffi.Int Function( - ffi.Pointer> engine_uuid, - ffi.Pointer> engine_name, - ffi.Pointer> engine_settings_app_id, - ffi.Pointer use_network); -typedef Dartvce_get_info_cbFunction = int Function( - ffi.Pointer> engine_uuid, - ffi.Pointer> engine_name, - ffi.Pointer> engine_settings_app_id, - ffi.Pointer use_network); - -/// @brief Called when the engine service user requests the recording format of VC engine. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @remarks This callback function is mandatory and must be registered using vce_main(). -/// The @a audio_id can be used only in the callback. To use outside, make a copy. -/// The @a types is managed by the platform and will be released when this callback function is completed. -/// The @a rate is managed by the platform and will be released when this callback function is completed. -/// The @a channels is managed by the platform and will be released when this callback function is completed. -/// @param[in] audio_id The audio device id. (e.g. #VCE_AUDIO_ID_BLUETOOTH or #VCE_AUDIO_ID_WIFI) -/// @param[out] types The format used by the recorder. -/// @param[out] rate The sample rate used by the recorder. -/// @param[out] channels The number of channels used by the recorder. -/// @return 0 on success, otherwise a negative error value -/// @retval #VCE_ERROR_NONE Successful -/// @retval #VCE_ERROR_INVALID_PARAMETER Not initialized -typedef vce_get_recording_format_cb - = ffi.Pointer>; -typedef vce_get_recording_format_cbFunction = ffi.Int Function( - ffi.Pointer audio_id, - ffi.Pointer types, - ffi.Pointer rate, - ffi.Pointer channels); -typedef Dartvce_get_recording_format_cbFunction = int Function( - ffi.Pointer audio_id, - ffi.Pointer types, - ffi.Pointer rate, - ffi.Pointer channels); - -/// @brief Called when the engine service user retrieves all supported languages of VC engine. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @remarks This callback function is mandatory and must be registered using vce_main(). -/// @param[in] callback a callback function -/// @param[in] user_data The user data to be passed to the callback function -/// @return 0 on success, otherwise a negative error value -/// @retval #VCE_ERROR_NONE Successful -/// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #VCE_ERROR_INVALID_STATE Not initialized -/// @post This function invokes vce_supported_language_cb() repeatedly for getting supported languages. -/// -/// @see vce_supported_language_cb() -typedef vce_foreach_supported_languages_cb = ffi - .Pointer>; -typedef vce_foreach_supported_languages_cbFunction = ffi.Int Function( - vce_supported_language_cb callback, ffi.Pointer user_data); -typedef Dartvce_foreach_supported_languages_cbFunction = int Function( - vce_supported_language_cb callback, ffi.Pointer user_data); - -/// @brief Called when VC engine informs the engine service user about whole supported languages. -/// @details This callback function is implemented by the engine service user. Therefore, the engine developer does NOT have to implement this callback function. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @remarks This callback function is called by vce_foreach_supported_languages_cb() to retrieve the whole supported language list. -/// The @a user_data must be transferred from vce_foreach_supported_languages_cb(). -/// The @a language can be used only in the callback. To use outside, make a copy. -/// @param[in] language A language is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code \n -/// For example, "ko_KR" for Korean, "en_US" for American English. -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop \n @c false to break out of the loop -/// @pre vce_foreach_supported_languages() will invoke this callback. -/// @see vce_foreach_supported_languages() -typedef vce_supported_language_cb - = ffi.Pointer>; -typedef vce_supported_language_cbFunction = ffi.Bool Function( - ffi.Pointer language, ffi.Pointer user_data); -typedef Dartvce_supported_language_cbFunction = bool Function( - ffi.Pointer language, ffi.Pointer user_data); - -/// @brief Called when the engine service user checks whether a language is supported or not. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @remarks This callback function is mandatory and must be registered using vce_main(). -/// The @a language can be used only in the callback. To use outside, make a copy. -/// @param[in] language A language -/// @return @c true = supported, \n @c false = not supported. -typedef vce_is_language_supported_cb - = ffi.Pointer>; -typedef vce_is_language_supported_cbFunction = ffi.Bool Function( - ffi.Pointer language); -typedef Dartvce_is_language_supported_cbFunction = bool Function( - ffi.Pointer language); - -/// @brief Called when the engine service user initializes Voice Control (VC) engine. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @remarks This callback function is mandatory and must be registered using vce_main(). -/// @return 0 on success, otherwise a negative error value -/// @retval #VCE_ERROR_NONE Successful -/// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #VCE_ERROR_INVALID_STATE Already initialized -/// @retval #VCE_ERROR_OPERATION_FAILED Operation failed -/// @see vce_deinitialize_cb() -typedef vce_initialize_cb - = ffi.Pointer>; -typedef vce_initialize_cbFunction = ffi.Int Function(); -typedef Dartvce_initialize_cbFunction = int Function(); - -/// @brief Called when the engine service user deinitializes VC engine. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @remarks This callback function is mandatory and must be registered using vce_main(). -/// @return 0 on success, otherwise a negative error value -/// @retval #VCE_ERROR_NONE Successful -/// @retval #VCE_ERROR_INVALID_STATE Not initialized -/// @see vce_initialize_cb() -typedef vce_deinitialize_cb - = ffi.Pointer>; -typedef vce_deinitialize_cbFunction = ffi.Int Function(); -typedef Dartvce_deinitialize_cbFunction = int Function(); - -/// @brief Called when the engine service user sets language. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @remarks The @a language can be used only in the callback. To use outside, make a copy. -/// @param[in] language A language. -/// @return 0 on success, otherwise a negative error value -/// @retval #VCE_ERROR_NONE Successful -/// @retval #VCE_ERROR_INVALID_LANGUAGE Invalid language -/// @retval #VCE_ERROR_INVALID_STATE Not initialized -/// @retval #VCE_ERROR_NOT_SUPPORTED_FEATURE Not supported feature -typedef vce_set_language_cb - = ffi.Pointer>; -typedef vce_set_language_cbFunction = ffi.Int Function( - ffi.Pointer language); -typedef Dartvce_set_language_cbFunction = int Function( - ffi.Pointer language); - -/// @brief Called when the engine service user sets command list before recognition. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @remarks This function should set commands via vcd_foreach_command(). -/// The @a vc_command should not be released. -/// The @a vc_command can be used only in the callback. To use outside, make a copy. -/// @param[in] vc_command command handle. The @a vc_command can be used only in the callback. To use outside, make a copy. -/// @return 0 on success, otherwise a negative error value -/// @retval #VCE_ERROR_NONE Successful -/// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #VCE_ERROR_INVALID_STATE Invalid state -/// @retval #VCE_ERROR_OPERATION_FAILED Operation failed -/// @retval #VCE_ERROR_NOT_SUPPORTED_FEATURE Not supported command type -/// @post vce_start() is called after this function is successful. -/// @see vce_start() -/// @see vcd_foreach_command() -/// @see vce_unset_commands() -/// @see vce_get_command_count() -typedef vce_set_commands_cb - = ffi.Pointer>; -typedef vce_set_commands_cbFunction = ffi.Int Function(vce_cmd_h vc_command); -typedef Dartvce_set_commands_cbFunction = int Function(vce_cmd_h vc_command); - -/// @brief A structure of handle for VC command. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -typedef vce_cmd_h = ffi.Pointer; - -/// @brief Called when the engine service user unsets command list for reset. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @return 0 on success, otherwise a negative error value -/// @retval #VCE_ERROR_NONE Successful -/// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #VCE_ERROR_INVALID_STATE Invalid state -/// @retval #VCE_ERROR_OPERATION_FAILED Operation failed -/// @retval #VCE_ERROR_NOT_SUPPORTED_FEATURE Not supported feature -/// @see vce_set_commands_cb() -typedef vce_unset_commands_cb - = ffi.Pointer>; -typedef vce_unset_commands_cbFunction = ffi.Int Function(); -typedef Dartvce_unset_commands_cbFunction = int Function(); - -/// @brief Called when the engine service user starts recognition. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @remarks This callback function is mandatory and must be registered using vce_main(). -/// @param[in] stop_by_silence Silence detection option. -/// @c true to detect the silence, -/// @c false not to detect the silence -/// @return 0 on success, otherwise a negative error value -/// @retval #VCE_ERROR_NONE Successful -/// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #VCE_ERROR_INVALID_STATE Invalid state -/// @retval #VCE_ERROR_INVALID_LANGUAGE Invalid language -/// @retval #VCE_ERROR_OUT_OF_NETWORK Out of network -/// @retval #VCE_ERROR_OPERATION_FAILED Operation failed -/// @pre vcd_foreach_command() is successful. -/// @see vce_set_recording_data_cb() -/// @see vce_stop() -/// @see vce_cancel() -typedef vce_start_cb = ffi.Pointer>; -typedef vce_start_cbFunction = ffi.Int Function(ffi.Bool stop_by_silence); -typedef Dartvce_start_cbFunction = int Function(bool stop_by_silence); - -/// @brief Called when the engine service user sets recording data for speech recognition from recorder. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @remarks This function should be returned immediately after recording data copy. -/// The @a data can be used only in the callback. To use outside, make a copy. -/// The @a speech_detected should not be released. This is managed by the platform. -/// @param[in] data A recording data -/// @param[in] length A length of recording data -/// @param[out] speech_detected The status of speech (e.g. #VCE_SPEECH_DETECT_BEGIN or #VCE_SPEECH_DETECT_END). The @a speech_detected can be used only in the callback. To use outside, make a copy. -/// @return 0 on success, otherwise a negative error value -/// @retval #VCE_ERROR_NONE Successful -/// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #VCE_ERROR_INVALID_STATE Invalid state -/// @retval #VCE_ERROR_OPERATION_FAILED Operation failed -/// @pre vce_start() is successful. -/// @see vce_start() -/// @see vce_cancel() -/// @see vce_stop() -typedef vce_set_recording_data_cb - = ffi.Pointer>; -typedef vce_set_recording_data_cbFunction = ffi.Int Function( - ffi.Pointer data, - ffi.UnsignedInt length, - ffi.Pointer speech_detected); -typedef Dartvce_set_recording_data_cbFunction = int Function( - ffi.Pointer data, - int length, - ffi.Pointer speech_detected); - -/// @brief Called when the engine service user stops to get the result of recognition. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @return 0 on success, otherwise a negative error value -/// @retval #VCE_ERROR_NONE Successful -/// @retval #VCE_ERROR_INVALID_STATE Invalid state -/// @retval #VCE_ERROR_OPERATION_FAILED Operation failed -/// @retval #VCE_ERROR_OUT_OF_NETWORK Out of network -/// @pre vce_set_recording_data() is successful. -/// @see vce_start() -/// @see vce_set_recording_data() -/// @see vce_result_cb() -/// @see vce_cancel() -typedef vce_stop_cb = ffi.Pointer>; -typedef vce_stop_cbFunction = ffi.Int Function(); -typedef Dartvce_stop_cbFunction = int Function(); - -/// @brief Called when the engine service user cancels the recognition process. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @return 0 on success, otherwise a negative error value. -/// @retval #VCE_ERROR_NONE Successful. -/// @retval #VCE_ERROR_INVALID_STATE Invalid state. -/// @pre vce_start() is successful. -/// @see vce_start() -/// @see vce_stop() -typedef vce_cancel_cb = ffi.Pointer>; -typedef vce_cancel_cbFunction = ffi.Int Function(); -typedef Dartvce_cancel_cbFunction = int Function(); - -/// @brief Called when the engine service user sets audio recording type. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @remarks The @a audio_type can be used only in the callback. To use outside, make a copy. -/// @param[in] audio_type Current audio type (e.g. #VCE_AUDIO_ID_BLUETOOTH or #VCE_AUDIO_ID_WIFI) -/// @return 0 on success, otherwise a negative error value. -/// @retval #VCE_ERROR_NONE Successful. -/// @retval #VCE_ERROR_NOT_SUPPORTED_FEATURE Not supported feature. -typedef vce_set_audio_type_cb - = ffi.Pointer>; -typedef vce_set_audio_type_cbFunction = ffi.Int Function( - ffi.Pointer audio_type); -typedef Dartvce_set_audio_type_cbFunction = int Function( - ffi.Pointer audio_type); - -/// @brief Called when the engine service user sets app id which is want to ask server dialog. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @remarks The @a app_id and @a credential can be used only in the callback. To use outside, make a copy. -/// @param[in] app_id App id which is to want to ask server dialog. -/// @param[in] credential Credential key. -/// @return 0 on success, otherwise a negative error value. -/// @retval #VCE_ERROR_NONE Successful. -/// @retval #VCE_ERROR_NOT_SUPPORTED_FEATURE Not supported feature. -/// @retval #VCE_ERROR_PERMISSION_DENIED Permission denied. -typedef vce_set_server_dialog_cb - = ffi.Pointer>; -typedef vce_set_server_dialog_cbFunction = ffi.Int Function( - ffi.Pointer app_id, ffi.Pointer credential); -typedef Dartvce_set_server_dialog_cbFunction = int Function( - ffi.Pointer app_id, ffi.Pointer credential); - -/// @brief Called when the engine service user sets domain (agent or device type). -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @remarks The @a domain can be used only in the callback. To use outside, make a copy. -/// @param[in] domain Agent (e.g. "music", "news", etc) or device type (e.g. "tv", "mobile", etc) corresponding to the command -/// @return 0 on success, otherwise a negative error value. -/// @retval #VCE_ERROR_NONE Successful. -/// @retval #VCE_ERROR_NOT_SUPPORTED_FEATURE Not supported feature -typedef vce_set_domain_cb - = ffi.Pointer>; -typedef vce_set_domain_cbFunction = ffi.Int Function( - ffi.Pointer domain); -typedef Dartvce_set_domain_cbFunction = int Function( - ffi.Pointer domain); - -/// @brief Called when the engine service user requests process text. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @remarks The @a text can be used only in the callback. To use outside, make a copy. -/// @param[in] text Requested text -/// @return 0 on success, otherwise a negative error value. -/// @retval #VCE_ERROR_NONE Successful. -/// @retval #VCE_ERROR_NOT_SUPPORTED_FEATURE Not supported feature. -typedef vce_process_text_cb - = ffi.Pointer>; -typedef vce_process_text_cbFunction = ffi.Int Function( - ffi.Pointer text); -typedef Dartvce_process_text_cbFunction = int Function( - ffi.Pointer text); - -/// @brief Called when the engine service user requests list event. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @remarks The @a event can be used only in the callback. To use outside, make a copy. -/// @param[in] event Requested list event -/// @return 0 on success, otherwise a negative error value. -/// @retval #VCE_ERROR_NONE Successful. -/// @retval #VCE_ERROR_NOT_SUPPORTED_FEATURE Not supported feature. -typedef vce_process_list_event_cb - = ffi.Pointer>; -typedef vce_process_list_event_cbFunction = ffi.Int Function( - ffi.Pointer event); -typedef Dartvce_process_list_event_cbFunction = int Function( - ffi.Pointer event); - -/// @brief Called when the engine service user requests haptic event. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @remarks The @a event can be used only in the callback. To use outside, make a copy. -/// @param[in] event Requested haptic event -/// @return 0 on success, otherwise a negative error value. -/// @retval #VCE_ERROR_NONE Successful. -/// @retval #VCE_ERROR_NOT_SUPPORTED_FEATURE Not supported feature. -typedef vce_process_haptic_event_cb - = ffi.Pointer>; -typedef vce_process_haptic_event_cbFunction = ffi.Int Function( - ffi.Pointer event); -typedef Dartvce_process_haptic_event_cbFunction = int Function( - ffi.Pointer event); - -/// @brief Called when the engine service user sets private data between app and engine. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @remarks The @a key, @a data can be used only in the callback. To use outside, make a copy. -/// @param[in] key Private key. -/// @param[in] data Private data. -/// @return 0 on success, otherwise a negative error value. -/// @retval #VCE_ERROR_NONE Successful. -/// @retval #VCE_ERROR_NOT_SUPPORTED_FEATURE Not supported feature. -typedef vce_private_data_set_cb - = ffi.Pointer>; -typedef vce_private_data_set_cbFunction = ffi.Int Function( - ffi.Pointer key, ffi.Pointer data); -typedef Dartvce_private_data_set_cbFunction = int Function( - ffi.Pointer key, ffi.Pointer data); - -/// @brief Called when the engine service user requests private data between app and engine. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @remarks The @a key can be used only in the callback. To use outside, make a copy. -/// The @a data is managed by the platform and will be released when this callback function is completed. -/// @param[in] key Private key. -/// @param[out] data Private data. -/// @return 0 on success, otherwise a negative error value. -/// @retval #VCE_ERROR_NONE Successful. -/// @retval #VCE_ERROR_NOT_SUPPORTED_FEATURE Not supported feature. -typedef vce_private_data_requested_cb - = ffi.Pointer>; -typedef vce_private_data_requested_cbFunction = ffi.Int Function( - ffi.Pointer key, ffi.Pointer> data); -typedef Dartvce_private_data_requested_cbFunction = int Function( - ffi.Pointer key, ffi.Pointer> data); - -/// @brief Called when the engine service user requests essential value from NLU result. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @remarks The @a key can be used only in the callback. To use outside, make a copy. -/// The @a value is managed by the platform and will be released when this callback function is completed. -/// @param[in] key NLU base info key. -/// @param[out] value NLU base info value. -/// @return 0 on success, otherwise a negative error value. -/// @retval #VCE_ERROR_NONE Successful. -/// @retval #VCE_ERROR_NOT_SUPPORTED_FEATURE Not supported feature. -typedef vce_nlu_base_info_requested_cb - = ffi.Pointer>; -typedef vce_nlu_base_info_requested_cbFunction = ffi.Int Function( - ffi.Pointer key, ffi.Pointer> value); -typedef Dartvce_nlu_base_info_requested_cbFunction = int Function( - ffi.Pointer key, ffi.Pointer> value); - -/// @brief Called when client gets the specific engine's request from the engine service user. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @remarks The @a engine_app_id is managed by the platform and will be released when this callback function is completed. -/// The @a event is managed by the platform and will be released when this callback function is completed. -/// The @a request is managed by the platform and will be released when this callback function is completed. -/// -/// @param[in] engine_app_id The specific engine's app id -/// @param[in] event The specific engine event type -/// @param[in] request The specific engine request -/// -/// @return 0 on success, otherwise a negative error value. -/// @retval #VCE_ERROR_NONE Successful -/// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #VCE_ERROR_OPERATION_FAILED Operation failure -/// -/// @pre An application registers callback function using vce_set_specific_engine_request_cb(). -/// -/// @see vce_set_specific_engine_request_cb() -/// @see vce_unset_specific_engine_request_cb() -typedef vce_specific_engine_request_cb - = ffi.Pointer>; -typedef vce_specific_engine_request_cbFunction = ffi.Int Function( - ffi.Pointer engine_app_id, - ffi.Pointer event, - ffi.Pointer request); -typedef Dartvce_specific_engine_request_cbFunction = int Function( - ffi.Pointer engine_app_id, - ffi.Pointer event, - ffi.Pointer request); - -/// @brief Called to retrieve the commands. -/// @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif -/// @remarks The @a command, @a param can be used only in the callback. To use outside, make a copy. -/// @param[in] id command id -/// @param[in] type command type -/// @param[in] format command format -/// @param[in] command command text -/// @param[in] param parameter text -/// @param[in] domain command domain -/// @param[in] user_data The user data passed from the foreach function -/// @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop. -/// @pre vce_get_foreach_command() will invoke this callback. -/// @see vce_get_foreach_command() -typedef vce_command_cb - = ffi.Pointer>; -typedef vce_command_cbFunction = ffi.Bool Function( - ffi.Int id, - ffi.Int type, - ffi.Int format, - ffi.Pointer command, - ffi.Pointer param, - ffi.Int domain, - ffi.Pointer user_data); -typedef Dartvce_command_cbFunction = bool Function( - int id, - int type, - int format, - ffi.Pointer command, - ffi.Pointer param, - int domain, - ffi.Pointer user_data); - -/// @brief Called when the engine service user (voice control client) requests to send TTS feedback. -/// @since_tizen 5.0 -/// @remarks The @a text and @a language can be used only in the callback. To use outside, make a copy. -/// -/// @param[in] pid The process id of the engine service user (voice control client) -/// @param[in] utt_id The utterance id -/// @param[in] text The text for TTS feedback -/// @param[in] language The language -/// @param[in] user_data The user data passed from the callback setter function -/// -/// @return 0 on success, otherwise a negative error value. -/// @retval #VCE_ERROR_NONE Successful -/// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #VCE_ERROR_OPERATION_FAILED Operation failure -/// -/// @pre An application registers callback function using vce_set_request_tts_cb(). -/// -/// @see vce_set_request_tts_cb() -/// @see vce_unset_request_tts_cb() -typedef vce_request_tts_cb - = ffi.Pointer>; -typedef vce_request_tts_cbFunction = ffi.Int Function( - ffi.Int pid, - ffi.Int utt_id, - ffi.Pointer text, - ffi.Pointer language, - ffi.Pointer user_data); -typedef Dartvce_request_tts_cbFunction = int Function( - int pid, - int utt_id, - ffi.Pointer text, - ffi.Pointer language, - ffi.Pointer user_data); - -/// @brief Called when the engine service user cancels TTS feedback. -/// @since_tizen 5.0 -/// -/// @param[in] pid The process id of the engine service user -/// @param[in] utt_id The utterance id corresponding to the text -/// @param[in] user_data The user data passed from the callback setter function -/// -/// @return 0 on success, otherwise a negative error value. -/// @retval #VCE_ERROR_NONE Successful -/// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #VCE_ERROR_OPERATION_FAILED Operation failure -/// -/// @pre An application registers callback function using vce_set_cancel_tts_cb(). -/// -/// @see vce_set_cancel_tts_cb() -/// @see vce_unset_cancel_tts_cb() -typedef vce_cancel_tts_cb - = ffi.Pointer>; -typedef vce_cancel_tts_cbFunction = ffi.Int Function( - ffi.Int pid, ffi.Int utt_id, ffi.Pointer user_data); -typedef Dartvce_cancel_tts_cbFunction = int Function( - int pid, int utt_id, ffi.Pointer user_data); - -/// @brief Called when the engine service user requests TTS audio format. -/// @since_tizen 5.0 -/// @remarks The @a rate, @a channel, and @a audio_type should not be released. -/// The @a rate, @a channel, and @a audio_type are managed by the platform and will be released after the audio format is transferred to the VC client. -/// -/// @param[out] rate The audio sample rate -/// @param[out] channel The audio channel -/// @param[out] audio_type The audio type -/// @param[in] user_data The user data passed from the callback setter function -/// -/// @return 0 on success, otherwise a negative error value. -/// @retval #VCE_ERROR_NONE Successful -/// @retval #VCE_ERROR_INVALID_PARAMETER Invalid parameter -/// @retval #VCE_ERROR_OPERATION_FAILED Operation failure -/// -/// @pre An application registers callback function using vce_set_tts_audio_format_request_cb(). -/// -/// @see vce_set_tts_audio_format_request_cb() -/// @see vce_unset_tts_audio_format_request_cb() -typedef vce_tts_audio_format_request_cb - = ffi.Pointer>; -typedef vce_tts_audio_format_request_cbFunction = ffi.Int Function( - ffi.Pointer rate, - ffi.Pointer channel, - ffi.Pointer audio_type, - ffi.Pointer user_data); -typedef Dartvce_tts_audio_format_request_cbFunction = int Function( - ffi.Pointer rate, - ffi.Pointer channel, - ffi.Pointer audio_type, - ffi.Pointer user_data); - -const int TIZEN_ERROR_MAX_PLATFORM_ERROR = 0; - -const int TIZEN_ERROR_MIN_PLATFORM_ERROR = -1073741824; - -const int TIZEN_ERROR_MIN_MODULE_ERROR = -2147483648; - -const int TIZEN_ERROR_MAX_MODULE_ERROR = -1073741825; - -const int TIZEN_ERROR_APPLICATION_CLASS = -512; - -const int TIZEN_ERROR_BASE_CLASS = -1024; - -const int TIZEN_ERROR_CONTENT_CLASS = -2048; - -const int TIZEN_ERROR_LOCATION_CLASS = -4096; - -const int TIZEN_ERROR_MULTIMEDIA_CLASS = -8192; - -const int TIZEN_ERROR_MESSAGING_CLASS = -16384; - -const int TIZEN_ERROR_NETWORK_CLASS = -32768; - -const int TIZEN_ERROR_SOCIAL_CLASS = -65536; - -const int TIZEN_ERROR_SYSTEM_CLASS = -131072; - -const int TIZEN_ERROR_TELEPHONY_CLASS = -262144; - -const int TIZEN_ERROR_UI_CLASS = -524288; - -const int TIZEN_ERROR_UIX_CLASS = -1048576; - -const int TIZEN_ERROR_AD_CLASS = -2097152; - -const int TIZEN_ERROR_WEB_CLASS = -4194304; - -const int TIZEN_ERROR_DRM_CLASS = -8388608; - -const int TIZEN_ERROR_ACCOUNT_CLASS = -16777216; - -const int TIZEN_ERROR_ACCOUNT = -16777216; - -const int TIZEN_ERROR_ACCOUNT_OAUTH = -16842752; - -const int TIZEN_ERROR_SYNC_MANAGER = -16908288; - -const int TIZEN_ERROR_FIDO = -16973824; - -const int TIZEN_ERROR_APPLICATION = -17825792; - -const int TIZEN_ERROR_APPLICATION_MANAGER = -17891328; - -const int TIZEN_ERROR_BADGE = -17956864; - -const int TIZEN_ERROR_MESSAGE_PORT = -18022400; - -const int TIZEN_ERROR_NOTIFICATION = -18087936; - -const int TIZEN_ERROR_PACKAGE_MANAGER = -18153472; - -const int TIZEN_ERROR_SHORTCUT = -18219008; - -const int TIZEN_ERROR_BUNDLE = -18350080; - -const int TIZEN_ERROR_DATA_CONTROL = -18415616; - -const int TIZEN_ERROR_SERVICE_APPLICATION = -18874368; - -const int TIZEN_ERROR_MINICONTROL = -18939904; - -const int TIZEN_ERROR_UTILITY_ICU = -22020096; - -const int TIZEN_ERROR_MIME_TYPE = -23068672; - -const int TIZEN_ERROR_MEDIA_CONTENT = -23134208; - -const int TIZEN_ERROR_EMAIL_SERVICE = -24117248; - -const int TIZEN_ERROR_MESSAGING_SERVICE = -24182784; - -const int TIZEN_ERROR_PUSH = -24248320; - -const int TIZEN_ERROR_AUDIO_IO = -26214400; - -const int TIZEN_ERROR_CAMERA = -26279936; - -const int TIZEN_ERROR_IMAGE_UTIL = -26345472; - -const int TIZEN_ERROR_METADATA_EXTRACTOR = -26411008; - -const int TIZEN_ERROR_PLAYER = -26476544; - -const int TIZEN_ERROR_RECORDER = -26542080; - -const int TIZEN_ERROR_SOUND_MANAGER = -26607616; - -const int TIZEN_ERROR_TONE_PLAYER = -26673152; - -const int TIZEN_ERROR_VIDEO_UTIL = -26738688; - -const int TIZEN_ERROR_WAV_PLAYER = -26804224; - -const int TIZEN_ERROR_RADIO = -26869760; - -const int TIZEN_ERROR_MEDIACODEC = -26935296; - -const int TIZEN_ERROR_METADATA_EDITOR = -27000832; - -const int TIZEN_ERROR_MEDIA_VISION = -27066368; - -const int TIZEN_ERROR_MEDIA_DEMUXER = -27131904; - -const int TIZEN_ERROR_MEDIA_MUXER = -27197440; - -const int TIZEN_ERROR_MEDIA_STREAMER = -27262976; - -const int TIZEN_ERROR_STREAMRECORDER = -27328512; - -const int TIZEN_ERROR_MEDIA_TOOL = -27394048; - -const int TIZEN_ERROR_BLUETOOTH = -29360128; - -const int TIZEN_ERROR_CONNECTION = -29425664; - -const int TIZEN_ERROR_NFC = -29491200; - -const int TIZEN_ERROR_SERIAL = -29556736; - -const int TIZEN_ERROR_TETHERING = -29622272; - -const int TIZEN_ERROR_WIFI = -29687808; - -const int TIZEN_ERROR_WIFI_DIRECT = -29753344; - -const int TIZEN_ERROR_SMARTCARD = -29818880; - -const int TIZEN_ERROR_IOTCON = -29884416; - -const int TIZEN_ERROR_SSDP = -29949952; - -const int TIZEN_ERROR_DNSSD = -30015488; - -const int TIZEN_ERROR_VPNSVC = -30081024; - -const int TIZEN_ERROR_MTP = -30146560; - -const int TIZEN_ERROR_HTTP = -30212096; - -const int TIZEN_ERROR_WIFI_MANAGER = -30277632; - -const int TIZEN_ERROR_PRIVACY_MANAGER = -31457280; - -const int TIZEN_ERROR_KEY_MANAGER = -31522816; - -const int TIZEN_ERROR_PRIVILEGE_INFORMATION = -31588352; - -const int TIZEN_ERROR_CSR = -31653888; - -const int TIZEN_ERROR_CALENDAR = -33554432; - -const int TIZEN_ERROR_CONTACTS = -33619968; - -const int TIZEN_ERROR_PHONENUMBER_UTILS = -33685504; - -const int TIZEN_ERROR_STORAGE = -35651584; - -const int TIZEN_ERROR_VCONF = -35717120; - -const int TIZEN_ERROR_DEVICE = -37748736; - -const int TIZEN_ERROR_DLOG = -37814272; - -const int TIZEN_ERROR_MEDIA_KEY = -37879808; - -const int TIZEN_ERROR_RUNTIME_INFORMATION = -37945344; - -const int TIZEN_ERROR_SENSOR = -38010880; - -const int TIZEN_ERROR_SYSTEM_INFORMATION = -38076416; - -const int TIZEN_ERROR_SYSTEM_SETTING = -38141952; - -const int TIZEN_ERROR_SYSTEM_RESOURCE = -38207488; - -const int TIZEN_ERROR_CONTEXT = -38273024; - -const int TIZEN_ERROR_HEALTH = -38338560; - -const int TIZEN_ERROR_FEEDBACK = -38404096; - -const int TIZEN_ERROR_USB_HOST = -38469632; - -const int TIZEN_ERROR_TELEPHONY = -39845888; - -const int TIZEN_ERROR_EFL_UTIL = -41943040; - -const int TIZEN_ERROR_UTILX = -42008576; - -const int TIZEN_ERROR_NATIVE_BUFFER = -42074112; - -const int TIZEN_ERROR_TBM = -42139648; - -const int TIZEN_ERROR_EOM = -42205184; - -const int TIZEN_ERROR_PANEL = -42270720; - -const int TIZEN_ERROR_TZSH = -42336256; - -const int TIZEN_ERROR_DOWNLOAD = -44040192; - -const int TIZEN_ERROR_WEBVIEW = -44105728; - -const int TIZEN_ERROR_LOCATION_MANAGER = -46137344; - -const int TIZEN_ERROR_GEOFENCE_MANAGER = -46202880; - -const int TIZEN_ERROR_MAPS_SERVICE = -46268416; - -const int TIZEN_ERROR_STT = -49283072; - -const int TIZEN_ERROR_TTS = -49348608; - -const int TIZEN_ERROR_IME = -49414144; - -const int TIZEN_ERROR_SERVICE_ADAPTOR = -49479680; - -const int TIZEN_ERROR_WIDGET = -49545216; - -const int TIZEN_ERROR_VOICE_CONTROL = -49610752; - -const int TIZEN_ERROR_ASP = -49676288; - -const int TIZEN_ERROR_ZIGBEE = -49741824; - -const int TIZEN_ERROR_STC = -49807360; - -const int TIZEN_ERROR_THUMBNAIL_UTIL = -49872896; - -const int TIZEN_ERROR_JOB_SCHEDULER = -49938432; - -const int TIZEN_ERROR_SOFTAP = -50003968; - -const int TIZEN_ERROR_COMPLICATION = -50069504; - -const int TIZEN_ERROR_DEVICE_CERTIFICATE_MANAGER = -50135040; - -const int TIZEN_ERROR_INM = -803078144; - -const int TIZEN_ERROR_UPDATE_CONTROL = -803143680; - -const int TIZEN_ERROR_MULTI_ASSISTANT = -803209216; - -const String SYNC_SUPPORTS_CAPABILITY_CALENDAR = - 'http://tizen.org/sync/capability/calendar'; - -const String SYNC_SUPPORTS_CAPABILITY_CONTACT = - 'http://tizen.org/sync/capability/contact'; - -const String SYNC_SUPPORTS_CAPABILITY_IMAGE = - 'http://tizen.org/sync/capability/image'; - -const String SYNC_SUPPORTS_CAPABILITY_VIDEO = - 'http://tizen.org/sync/capability/video'; - -const String SYNC_SUPPORTS_CAPABILITY_SOUND = - 'http://tizen.org/sync/capability/sound'; - -const String SYNC_SUPPORTS_CAPABILITY_MUSIC = - 'http://tizen.org/sync/capability/music'; - -const String APP_CONTROL_OPERATION_MAIN = - 'http://tizen.org/appcontrol/operation/main'; - -const String APP_CONTROL_OPERATION_DEFAULT = - 'http://tizen.org/appcontrol/operation/default'; - -const String APP_CONTROL_OPERATION_EDIT = - 'http://tizen.org/appcontrol/operation/edit'; - -const String APP_CONTROL_OPERATION_VIEW = - 'http://tizen.org/appcontrol/operation/view'; - -const String APP_CONTROL_OPERATION_PICK = - 'http://tizen.org/appcontrol/operation/pick'; - -const String APP_CONTROL_OPERATION_CREATE_CONTENT = - 'http://tizen.org/appcontrol/operation/create_content'; - -const String APP_CONTROL_OPERATION_CALL = - 'http://tizen.org/appcontrol/operation/call'; - -const String APP_CONTROL_OPERATION_SEND = - 'http://tizen.org/appcontrol/operation/send'; - -const String APP_CONTROL_OPERATION_SEND_TEXT = - 'http://tizen.org/appcontrol/operation/send_text'; - -const String APP_CONTROL_OPERATION_SHARE = - 'http://tizen.org/appcontrol/operation/share'; - -const String APP_CONTROL_OPERATION_MULTI_SHARE = - 'http://tizen.org/appcontrol/operation/multi_share'; - -const String APP_CONTROL_OPERATION_SHARE_TEXT = - 'http://tizen.org/appcontrol/operation/share_text'; - -const String APP_CONTROL_OPERATION_DIAL = - 'http://tizen.org/appcontrol/operation/dial'; - -const String APP_CONTROL_OPERATION_SEARCH = - 'http://tizen.org/appcontrol/operation/search'; - -const String APP_CONTROL_OPERATION_DOWNLOAD = - 'http://tizen.org/appcontrol/operation/download'; - -const String APP_CONTROL_OPERATION_PRINT = - 'http://tizen.org/appcontrol/operation/print'; - -const String APP_CONTROL_OPERATION_COMPOSE = - 'http://tizen.org/appcontrol/operation/compose'; - -const String APP_CONTROL_OPERATION_LAUNCH_ON_EVENT = - 'http://tizen.org/appcontrol/operation/launch_on_event'; - -const String APP_CONTROL_OPERATION_ADD = - 'http://tizen.org/appcontrol/operation/add'; - -const String APP_CONTROL_OPERATION_IMAGE_CAPTURE = - 'http://tizen.org/appcontrol/operation/image_capture'; - -const String APP_CONTROL_OPERATION_VIDEO_CAPTURE = - 'http://tizen.org/appcontrol/operation/video_capture'; - -const String APP_CONTROL_OPERATION_SETTING_BT_ENABLE = - 'http://tizen.org/appcontrol/operation/setting/bt_enable'; - -const String APP_CONTROL_OPERATION_SETTING_BT_VISIBILITY = - 'http://tizen.org/appcontrol/operation/setting/bt_visibility'; - -const String APP_CONTROL_OPERATION_SETTING_LOCATION = - 'http://tizen.org/appcontrol/operation/setting/location'; - -const String APP_CONTROL_OPERATION_SETTING_NFC = - 'http://tizen.org/appcontrol/operation/setting/nfc'; - -const String APP_CONTROL_OPERATION_SETTING = - 'http://tizen.org/appcontrol/operation/setting'; - -const String APP_CONTROL_OPERATION_SETTING_WIFI = - 'http://tizen.org/appcontrol/operation/setting/wifi'; - -const String APP_CONTROL_OPERATION_SETTING_VPN = - 'http://tizen.org/appcontrol/operation/setting/vpn'; - -const String APP_CONTROL_OPERATION_GET_INPUT = - 'http://tizen.org/appcontrol/operation/get_input'; - -const String APP_CONTROL_OPERATION_MEDIA_CONTROLLER = - 'http://tizen.org/appcontrol/operation/media_control'; - -const String APP_CONTROL_OPERATION_PRIVACY_SETTING_GUIDE = - 'http://tizen.org/appcontrol/operation/guide_privacy_setting'; - -const String APP_CONTROL_DATA_FEATURE = - 'http://tizen.org/appcontrol/data/feature'; - -const String APP_CONTROL_DATA_PRIVILEGES = - 'http://tizen.org/appcontrol/data/privileges'; - -const String APP_CONTROL_DATA_SUBJECT = - 'http://tizen.org/appcontrol/data/subject'; - -const String APP_CONTROL_DATA_TO = 'http://tizen.org/appcontrol/data/to'; - -const String APP_CONTROL_DATA_CC = 'http://tizen.org/appcontrol/data/cc'; - -const String APP_CONTROL_DATA_BCC = 'http://tizen.org/appcontrol/data/bcc'; - -const String APP_CONTROL_DATA_TEXT = 'http://tizen.org/appcontrol/data/text'; - -const String APP_CONTROL_DATA_TITLE = 'http://tizen.org/appcontrol/data/title'; - -const String APP_CONTROL_DATA_SELECTED = - 'http://tizen.org/appcontrol/data/selected'; - -const String APP_CONTROL_DATA_PATH = 'http://tizen.org/appcontrol/data/path'; - -const String APP_CONTROL_DATA_SELECTION_MODE = - 'http://tizen.org/appcontrol/data/selection_mode'; - -const String APP_CONTROL_DATA_CALENDAR_ALL_DAY = - 'http://tizen.org/appcontrol/data/calendar/all_day'; - -const String APP_CONTROL_DATA_CALENDAR_START_TIME = - 'http://tizen.org/appcontrol/data/calendar/start_time'; - -const String APP_CONTROL_DATA_CALENDAR_END_TIME = - 'http://tizen.org/appcontrol/data/calendar/end_time'; - -const String APP_CONTROL_DATA_EMAIL = 'http://tizen.org/appcontrol/data/email'; - -const String APP_CONTROL_DATA_PHONE = 'http://tizen.org/appcontrol/data/phone'; - -const String APP_CONTROL_DATA_URL = 'http://tizen.org/appcontrol/data/url'; - -const String APP_CONTROL_DATA_ID = 'http://tizen.org/appcontrol/data/id'; - -const String APP_CONTROL_DATA_TYPE = 'http://tizen.org/appcontrol/data/type'; - -const String APP_CONTROL_DATA_TOTAL_COUNT = - 'http://tizen.org/appcontrol/data/total_count'; - -const String APP_CONTROL_DATA_TOTAL_SIZE = - 'http://tizen.org/appcontrol/data/total_size'; - -const String APP_CONTROL_DATA_NAME = 'http://tizen.org/appcontrol/data/name'; - -const String APP_CONTROL_DATA_LOCATION = - 'http://tizen.org/appcontrol/data/location'; - -const String APP_CONTROL_DATA_INPUT_TYPE = - 'http://tizen.org/appcontrol/data/input_type'; - -const String APP_CONTROL_DATA_INPUT_DEFAULT_TEXT = - 'http://tizen.org/appcontrol/data/input_default_text'; - -const String APP_CONTROL_DATA_INPUT_GUIDE_TEXT = - 'http://tizen.org/appcontrol/data/input_guide_text'; - -const String APP_CONTROL_DATA_INPUT_PREDICTION_HINT = - 'http://tizen.org/appcontrol/data/input_prediction_hint'; - -const String APP_CONTROL_DATA_INPUT_RETURNKEY_TYPE = - 'http://tizen.org/appcontrol/data/input_returnkey_type'; - -const String APP_CONTROL_DATA_INPUT_MAX_TEXT_LENGTH = - 'http://tizen.org/appcontrol/data/input_max_text_length'; - -const String APP_CONTROL_DATA_INPUT_CURSOR_POSITION_SET = - 'http://tizen.org/appcontrol/data/input_cursor_position_set'; - -const String APP_CONTROL_DATA_INPUT_CURSOR_POSITION_GET = - 'http://tizen.org/appcontrol/data/input_cursor_position_get'; - -const String APP_CONTROL_DATA_INPUT_REPLY_TYPE = - 'http://tizen.org/appcontrol/data/input_reply_type'; - -const String APP_CONTROL_DATA_WIDGET_INSTANCE_ID = - 'http://tizen.org/appcontrol/data/widget_instance_id'; - -const String APP_CONTROL_DATA_WIDGET_CONTENT = - 'http://tizen.org/appcontrol/data/widget_content'; - -const String APP_CONTROL_DATA_WIDGET_APP_ID = - 'http://tizen.org/appcontrol/data/widget_app_id'; - -const int NOTIFICATION_DO_NOT_SHOW_TIME_STAMP = -1; - -const String APP_CONTROL_DATA_ALARM_ID = - 'http://tizen.org/appcontrol/data/alarm_id'; - -const String SYSTEM_EVENT_BATTERY_CHARGER_STATUS = - 'tizen.system.event.battery_charger_status'; - -const String EVENT_KEY_BATTERY_CHARGER_STATUS = 'battery_charger_status'; - -const String EVENT_VAL_BATTERY_CHARGER_DISCONNECTED = 'disconnected'; - -const String EVENT_VAL_BATTERY_CHARGER_CONNECTED = 'connected'; - -const String EVENT_VAL_BATTERY_CHARGER_CHARGING = 'charging'; - -const String EVENT_VAL_BATTERY_CHARGER_DISCHARGING = 'discharging'; - -const String SYSTEM_EVENT_BATTERY_LEVEL_STATUS = - 'tizen.system.event.battery_level_status'; - -const String EVENT_KEY_BATTERY_LEVEL_STATUS = 'battery_level_status'; - -const String EVENT_VAL_BATTERY_LEVEL_EMPTY = 'empty'; - -const String EVENT_VAL_BATTERY_LEVEL_CRITICAL = 'critical'; - -const String EVENT_VAL_BATTERY_LEVEL_LOW = 'low'; - -const String EVENT_VAL_BATTERY_LEVEL_HIGH = 'high'; - -const String EVENT_VAL_BATTERY_LEVEL_FULL = 'full'; - -const String SYSTEM_EVENT_USB_STATUS = 'tizen.system.event.usb_status'; - -const String EVENT_KEY_USB_STATUS = 'usb_status'; - -const String EVENT_VAL_USB_DISCONNECTED = 'disconnected'; - -const String EVENT_VAL_USB_CONNECTED = 'connected'; - -const String EVENT_VAL_USB_AVAILABLE = 'available'; - -const String SYSTEM_EVENT_EARJACK_STATUS = 'tizen.system.event.earjack_status'; - -const String EVENT_KEY_EARJACK_STATUS = 'earjack_status'; - -const String EVENT_VAL_EARJACK_DISCONNECTED = 'disconnected'; - -const String EVENT_VAL_EARJACK_CONNECTED = 'connected'; - -const String SYSTEM_EVENT_DISPLAY_STATE = 'tizen.system.event.display_state'; - -const String EVENT_KEY_DISPLAY_STATE = 'display_state'; - -const String EVENT_VAL_DISPLAY_NORMAL = 'normal'; - -const String EVENT_VAL_DISPLAY_DIM = 'dim'; - -const String EVENT_VAL_DISPLAY_OFF = 'off'; - -const String SYSTEM_EVENT_BOOT_COMPLETED = 'tizen.system.event.boot_completed'; - -const String SYSTEM_EVENT_SYSTEM_SHUTDOWN = - 'tizen.system.event.system_shutdown'; - -const String SYSTEM_EVENT_LOW_MEMORY = 'tizen.system.event.low_memory'; - -const String EVENT_KEY_LOW_MEMORY = 'low_memory'; - -const String EVENT_VAL_MEMORY_NORMAL = 'normal'; - -const String EVENT_VAL_MEMORY_SOFT_WARNING = 'soft_warning'; - -const String EVENT_VAL_MEMORY_HARD_WARNING = 'hard_warning'; - -const String SYSTEM_EVENT_WIFI_STATE = 'tizen.system.event.wifi_state'; - -const String EVENT_KEY_WIFI_STATE = 'wifi_state'; - -const String EVENT_VAL_WIFI_OFF = 'off'; - -const String EVENT_VAL_WIFI_ON = 'on'; - -const String EVENT_VAL_WIFI_CONNECTED = 'connected'; - -const String SYSTEM_EVENT_BT_STATE = 'tizen.system.event.bt_state'; - -const String EVENT_KEY_BT_STATE = 'bt_state'; - -const String EVENT_VAL_BT_OFF = 'off'; - -const String EVENT_VAL_BT_ON = 'on'; - -const String EVENT_KEY_BT_LE_STATE = 'bt_le_state'; - -const String EVENT_VAL_BT_LE_OFF = 'off'; - -const String EVENT_VAL_BT_LE_ON = 'on'; - -const String EVENT_KEY_BT_TRANSFERING_STATE = 'bt_transfering_state'; - -const String EVENT_VAL_BT_NON_TRANSFERING = 'non_transfering'; - -const String EVENT_VAL_BT_TRANSFERING = 'transfering'; - -const String SYSTEM_EVENT_LOCATION_ENABLE_STATE = - 'tizen.system.event.location_enable_state'; - -const String EVENT_KEY_LOCATION_ENABLE_STATE = 'location_enable_state'; - -const String EVENT_VAL_LOCATION_DISABLED = 'disabled'; - -const String EVENT_VAL_LOCATION_ENABLED = 'enabled'; - -const String SYSTEM_EVENT_GPS_ENABLE_STATE = - 'tizen.system.event.gps_enable_state'; - -const String EVENT_KEY_GPS_ENABLE_STATE = 'gps_enable_state'; - -const String EVENT_VAL_GPS_DISABLED = 'disabled'; - -const String EVENT_VAL_GPS_ENABLED = 'enabled'; - -const String SYSTEM_EVENT_NPS_ENABLE_STATE = - 'tizen.system.event.nps_enable_state'; - -const String EVENT_KEY_NPS_ENABLE_STATE = 'nps_enable_state'; - -const String EVENT_VAL_NPS_DISABLED = 'disabled'; - -const String EVENT_VAL_NPS_ENABLED = 'enabled'; - -const String SYSTEM_EVENT_INCOMING_MSG = 'tizen.system.event.incoming_msg'; - -const String EVENT_KEY_MSG_TYPE = 'msg_type'; - -const String EVENT_VAL_SMS = 'sms'; - -const String EVENT_VAL_MMS = 'mms'; - -const String EVENT_VAL_PUSH = 'push'; - -const String EVENT_VAL_CB = 'cb'; - -const String EVENT_KEY_MSG_ID = 'msg_id'; - -const String SYSTEM_EVENT_OUTGOING_MSG = 'tizen.system.event.outgoing_msg'; - -const String EVENT_KEY_OUT_MSG_TYPE = 'msg_type'; - -const String EVENT_KEY_OUT_MSG_ID = 'msg_id'; - -const String SYSTEM_EVENT_TIME_CHANGED = 'tizen.system.event.time_changed'; - -const String SYSTEM_EVENT_TIME_ZONE = 'tizen.system.event.time_zone'; - -const String EVENT_KEY_TIME_ZONE = 'time_zone'; - -const String SYSTEM_EVENT_HOUR_FORMAT = 'tizen.system.event.hour_format'; - -const String EVENT_KEY_HOUR_FORMAT = 'hour_format'; - -const String EVENT_VAL_HOURFORMAT_12 = '12'; - -const String EVENT_VAL_HOURFORMAT_24 = '24'; - -const String SYSTEM_EVENT_LANGUAGE_SET = 'tizen.system.event.language_set'; - -const String EVENT_KEY_LANGUAGE_SET = 'language_set'; - -const String SYSTEM_EVENT_REGION_FORMAT = 'tizen.system.event.region_format'; - -const String EVENT_KEY_REGION_FORMAT = 'region_format'; - -const String SYSTEM_EVENT_SILENT_MODE = 'tizen.system.event.silent_mode'; - -const String EVENT_KEY_SILENT_MODE = 'silent_mode'; - -const String EVENT_VAL_SILENTMODE_ON = 'on'; - -const String EVENT_VAL_SILENTMODE_OFF = 'off'; - -const String SYSTEM_EVENT_VIBRATION_STATE = - 'tizen.system.event.vibration_state'; - -const String EVENT_KEY_VIBRATION_STATE = 'vibration_state'; - -const String EVENT_VAL_VIBRATION_ON = 'on'; - -const String EVENT_VAL_VIBRATION_OFF = 'off'; - -const String SYSTEM_EVENT_SCREEN_AUTOROTATE_STATE = - 'tizen.system.event.screen_autorotate_state'; - -const String EVENT_KEY_SCREEN_AUTOROTATE_STATE = 'screen_autorotate_state'; - -const String EVENT_VAL_SCREEN_AUTOROTATE_ON = 'on'; - -const String EVENT_VAL_SCREEN_AUTOROTATE_OFF = 'off'; - -const String SYSTEM_EVENT_MOBILE_DATA_STATE = - 'tizen.system.event.mobile_data_state'; - -const String EVENT_KEY_MOBILE_DATA_STATE = 'mobile_data_state'; - -const String EVENT_VAL_MOBILE_DATA_OFF = 'off'; - -const String EVENT_VAL_MOBILE_DATA_ON = 'on'; - -const String SYSTEM_EVENT_DATA_ROAMING_STATE = - 'tizen.system.event.data_roaming_state'; - -const String EVENT_KEY_DATA_ROAMING_STATE = 'data_roaming_state'; - -const String EVENT_VAL_DATA_ROAMING_OFF = 'off'; - -const String EVENT_VAL_DATA_ROAMING_ON = 'on'; - -const String SYSTEM_EVENT_FONT_SET = 'tizen.system.event.font_set'; - -const String EVENT_KEY_FONT_SET = 'font_set'; - -const String SYSTEM_EVENT_NETWORK_STATUS = 'tizen.system.event.network_status'; - -const String EVENT_KEY_NETWORK_STATUS = 'network_status'; - -const String EVENT_VAL_NETWORK_DISCONNECTED = 'disconnected'; - -const String EVENT_VAL_NETWORK_WIFI = 'wifi'; - -const String EVENT_VAL_NETWORK_CELLULAR = 'cellular'; - -const String EVENT_VAL_NETWORK_ETHERNET = 'ethernet'; - -const String EVENT_VAL_NETWORK_BT = 'bt'; - -const String EVENT_VAL_NETWORK_NET_PROXY = 'net_proxy'; - -const String PACKAGE_INFO_PROP_APP_ID = 'PACKAGE_INFO_PROP_APP_ID'; - -const String PACKAGE_INFO_PROP_APP_TYPE = 'PACKAGE_INFO_PROP_APP_TYPE'; - -const String PACKAGE_INFO_PROP_APP_CATEGORY = 'PACKAGE_INFO_PROP_APP_CATEGORY'; - -const String PACKAGE_INFO_PROP_APP_INSTALLED_STORAGE = - 'PACKAGE_INFO_PROP_APP_INSTALLED_STORAGE'; - -const String PACKAGE_INFO_PROP_APP_NODISPLAY = - 'PACKAGE_INFO_PROP_APP_NODISPLAY'; - -const String PACKAGE_INFO_PROP_APP_TASKMANAGE = - 'PACKAGE_INFO_PROP_APP_TASKMANAGE'; - -const String PACKAGE_INFO_PROP_APP_DISABLED = 'PACKAGE_INFO_PROP_APP_DISABLED'; - -const String PACKAGE_INFO_PROP_APP_COMPONENT_TYPE = - 'PACKAGE_INFO_PROP_APP_COMPONENT_TYPE'; - -const String PACKAGE_MANAGER_PKGINFO_PROP_REMOVABLE = - 'PMINFO_PKGINFO_PROP_PACKAGE_REMOVABLE'; - -const String PACKAGE_MANAGER_PKGINFO_PROP_READONLY = - 'PMINFO_PKGINFO_PROP_PACKAGE_READONLY'; - -const String PACKAGE_MANAGER_PKGINFO_PROP_SUPPORT_DISABLE = - 'PMINFO_PKGINFO_PROP_PACKAGE_SUPPORT_DISABLE'; - -const String PACKAGE_MANAGER_PKGINFO_PROP_DISABLE = - 'PMINFO_PKGINFO_PROP_PACKAGE_DISABLE'; - -const String PACKAGE_MANAGER_PKGINFO_PROP_PRELOAD = - 'PMINFO_PKGINFO_PROP_PACKAGE_PRELOAD'; - -const int MEDIA_CONTENT_ERROR_CLASS = -23134208; - -const String MEDIA_ID = 'MEDIA_ID'; - -const String MEDIA_PATH = 'MEDIA_PATH'; - -const String MEDIA_DISPLAY_NAME = 'MEDIA_DISPLAY_NAME'; - -const String MEDIA_TYPE = 'MEDIA_TYPE'; - -const String MEDIA_MIME_TYPE = 'MEDIA_MIME_TYPE'; - -const String MEDIA_SIZE = 'MEDIA_SIZE'; - -const String MEDIA_ADDED_TIME = 'MEDIA_ADDED_TIME'; - -const String MEDIA_MODIFIED_TIME = 'MEDIA_MODIFIED_TIME'; - -const String MEDIA_TIMELINE = 'MEDIA_TIMELINE'; - -const String MEDIA_THUMBNAIL_PATH = 'MEDIA_THUMBNAIL_PATH'; - -const String MEDIA_TITLE = 'MEDIA_TITLE'; - -const String MEDIA_ALBUM = 'MEDIA_ALBUM'; - -const String MEDIA_ARTIST = 'MEDIA_ARTIST'; - -const String MEDIA_ALBUM_ARTIST = 'MEDIA_ALBUM_ARTIST'; - -const String MEDIA_GENRE = 'MEDIA_GENRE'; - -const String MEDIA_COMPOSER = 'MEDIA_COMPOSER'; - -const String MEDIA_YEAR = 'MEDIA_YEAR'; - -const String MEDIA_RECORDED_DATE = 'MEDIA_RECORDED_DATE'; - -const String MEDIA_COPYRIGHT = 'MEDIA_COPYRIGHT'; - -const String MEDIA_TRACK_NUM = 'MEDIA_TRACK_NUM'; - -const String MEDIA_DESCRIPTION = 'MEDIA_DESCRIPTION'; - -const String MEDIA_BITRATE = 'MEDIA_BITRATE'; - -const String MEDIA_BITPERSAMPLE = 'MEDIA_BITPERSAMPLE'; - -const String MEDIA_SAMPLERATE = 'MEDIA_SAMPLERATE'; - -const String MEDIA_CHANNEL = 'MEDIA_CHANNEL'; - -const String MEDIA_DURATION = 'MEDIA_DURATION'; - -const String MEDIA_LONGITUDE = 'MEDIA_LONGITUDE'; - -const String MEDIA_LATITUDE = 'MEDIA_LATITUDE'; - -const String MEDIA_ALTITUDE = 'MEDIA_ALTITUDE'; - -const String MEDIA_WIDTH = 'MEDIA_WIDTH'; - -const String MEDIA_HEIGHT = 'MEDIA_HEIGHT'; - -const String MEDIA_DATETAKEN = 'MEDIA_DATETAKEN'; - -const String MEDIA_ORIENTATION = 'MEDIA_ORIENTATION'; - -const String MEDIA_BURST_ID = 'BURST_ID'; - -const String MEDIA_PLAYED_COUNT = 'MEDIA_PLAYED_COUNT'; - -const String MEDIA_LAST_PLAYED_TIME = 'MEDIA_LAST_PLAYED_TIME'; - -const String MEDIA_LAST_PLAYED_POSITION = 'MEDIA_LAST_PLAYED_POSITION'; - -const String MEDIA_RATING = 'MEDIA_RATING'; - -const String MEDIA_FAVOURITE = 'MEDIA_FAVOURITE'; - -const String MEDIA_AUTHOR = 'MEDIA_AUTHOR'; - -const String MEDIA_PROVIDER = 'MEDIA_PROVIDER'; - -const String MEDIA_CONTENT_NAME = 'MEDIA_CONTENT_NAME'; - -const String MEDIA_CATEGORY = 'MEDIA_CATEGORY'; - -const String MEDIA_LOCATION_TAG = 'MEDIA_LOCATION_TAG'; - -const String MEDIA_AGE_RATING = 'MEDIA_AGE_RATING'; - -const String MEDIA_KEYWORD = 'MEDIA_KEYWORD'; - -const String MEDIA_WEATHER = 'MEDIA_WEATHER'; - -const String MEDIA_IS_DRM = 'MEDIA_IS_DRM'; - -const String MEDIA_STORAGE_TYPE = 'MEDIA_STORAGE_TYPE'; - -const String MEDIA_EXPOSURE_TIME = 'MEDIA_EXPOSURE_TIME'; - -const String MEDIA_FNUMBER = 'MEDIA_FNUMBER'; - -const String MEDIA_ISO = 'MEDIA_ISO'; - -const String MEDIA_MODEL = 'MEDIA_MODEL'; - -const String MEDIA_FILE_NAME_PINYIN = 'MEDIA_FILE_NAME_PINYIN'; - -const String MEDIA_TITLE_PINYIN = 'MEDIA_TITLE_PINYIN'; - -const String MEDIA_ALBUM_PINYIN = 'MEDIA_ALBUM_PINYIN'; - -const String MEDIA_ARTIST_PINYIN = 'MEDIA_ARTIST_PINYIN'; - -const String MEDIA_ALBUM_ARTIST_PINYIN = 'MEDIA_ALBUM_ARTIST_PINYIN'; - -const String MEDIA_GENRE_PINYIN = 'MEDIA_GENRE_PINYIN'; - -const String MEDIA_COMPOSER_PINYIN = 'MEDIA_COMPOSER_PINYIN'; - -const String MEDIA_COPYRIGHT_PINYIN = 'MEDIA_COPYRIGHT_PINYIN'; - -const String MEDIA_DESCRIPTION_PINYIN = 'MEDIA_DESCRIPTION_PINYIN'; - -const String MEDIA_AUTHOR_PINYIN = 'MEDIA_AUTHOR_PINYIN'; - -const String MEDIA_PROVIDER_PINYIN = 'MEDIA_PROVIDER_PINYIN'; - -const String MEDIA_CONTENT_NAME_PINYIN = 'MEDIA_CONTENT_NAME_PINYIN'; - -const String MEDIA_CATEGORY_PINYIN = 'MEDIA_CATEGORY_PINYIN'; - -const String MEDIA_LOCATION_TAG_PINYIN = 'MEDIA_LOCATION_TAG_PINYIN'; - -const String MEDIA_AGE_RATING_PINYIN = 'MEDIA_AGE_RATING_PINYIN'; - -const String MEDIA_KEYWORD_PINYIN = 'MEDIA_KEYWORD_PINYIN'; - -const String MEDIA_360 = 'MEDIA_360'; - -const String FOLDER_ID = 'FOLDER_ID'; - -const String FOLDER_PATH = 'FOLDER_PATH'; - -const String FOLDER_NAME = 'FOLDER_NAME'; - -const String FOLDER_MODIFIED_TIME = 'FOLDER_MODIFIED_TIME'; - -const String FOLDER_STORAGE_TYPE = 'FOLDER_STORAGE_TYPE'; - -const String FOLDER_NAME_PINYIN = 'FOLDER_NAME_PINYIN'; - -const String FOLDER_ORDER = 'FOLDER_ORDER'; - -const String FOLDER_PARENT_FOLDER_ID = 'FOLDER_PARENT_FOLDER_ID'; - -const String PLAYLIST_NAME = 'PLAYLIST_NAME'; - -const String MEDIA_PLAYLIST_ID = 'PLAYLIST_ID'; - -const String PLAYLIST_MEMBER_ORDER = 'PLAYLIST_MEMBER_ORDER'; - -const String PLAYLIST_MEDIA_COUNT = 'PLAYLIST_MEDIA_COUNT'; - -const String TAG_NAME = 'TAG_NAME'; - -const String MEDIA_TAG_ID = 'TAG_ID'; - -const String TAG_MEDIA_COUNT = 'TAG_MEDIA_COUNT'; - -const String BOOKMARK_MARKED_TIME = 'BOOKMARK_MARKED_TIME'; - -const String MEDIA_BOOKMARK_ID = 'BOOKMARK_ID'; - -const String BOOKMARK_NAME = 'BOOKMARK_NAME'; - -const String MEDIA_STORAGE_ID = 'STORAGE_ID'; - -const String MEDIA_STORAGE_PATH = 'STORAGE_PATH'; - -const String MEDIA_FACE_TAG = 'MEDIA_FACE_TAG'; - -const String MEDIA_FACE_ID = 'MEDIA_FACE_ID'; - -const String CONTEXT_HISTORY_APP_ID = 'AppId'; - -const String CONTEXT_HISTORY_TOTAL_COUNT = 'TotalCount'; - -const String CONTEXT_HISTORY_TOTAL_AMOUNT = 'TotalAmount'; - -const String CONTEXT_HISTORY_TOTAL_DURATION = 'TotalDuration'; - -const String CONTEXT_HISTORY_LAST_TIME = 'LastTime'; - -const String CONTEXT_HISTORY_HOUR_OF_DAY = 'HourOfDay'; - -const String CONTEXT_HISTORY_AUDIO_JACK = 'AudioJack'; - -const String CONTEXT_HISTORY_SYSTEM_VOLUME = 'SystemVolume'; - -const String CONTEXT_HISTORY_MEDIA_VOLUME = 'MediaVolume'; - -const String CONTEXT_HISTORY_ADDRESS = 'Address'; - -const String CONTEXT_TRIGGER_EQUAL_TO = '=='; - -const String CONTEXT_TRIGGER_NOT_EQUAL_TO = '!='; - -const String CONTEXT_TRIGGER_GREATER_THAN = '>'; - -const String CONTEXT_TRIGGER_GREATER_THAN_OR_EQUAL_TO = '>='; - -const String CONTEXT_TRIGGER_LESS_THAN = '<'; - -const String CONTEXT_TRIGGER_LESS_THAN_OR_EQUAL_TO = '<='; - -const int CONTEXT_TRIGGER_TRUE = 1; - -const int CONTEXT_TRIGGER_FALSE = 0; - -const String CONTEXT_TRIGGER_TIME_OF_DAY = 'TimeOfDay'; - -const String CONTEXT_TRIGGER_DAY_OF_WEEK = 'DayOfWeek'; - -const String CONTEXT_TRIGGER_DAY_OF_MONTH = 'DayOfMonth'; - -const String CONTEXT_TRIGGER_IS_CONNECTED = 'IsConnected'; - -const String CONTEXT_TRIGGER_IS_CHARGING = 'IsCharging'; - -const String CONTEXT_TRIGGER_IS_ENABLED = 'IsEnabled'; - -const String CONTEXT_TRIGGER_LEVEL = 'Level'; - -const String CONTEXT_TRIGGER_STATE = 'State'; - -const String CONTEXT_TRIGGER_BSSID = 'BSSID'; - -const String CONTEXT_TRIGGER_TYPE = 'Type'; - -const String CONTEXT_TRIGGER_EVENT = 'Event'; - -const String CONTEXT_TRIGGER_ACCURACY = 'Accuracy'; - -const String CONTEXT_TRIGGER_MEDIUM = 'Medium'; - -const String CONTEXT_TRIGGER_PLACE_ID = 'PlaceId'; - -const String CONTEXT_TRIGGER_APP_ID = 'AppId'; - -const String CONTEXT_TRIGGER_ADDRESS = 'Address'; - -const String CONTEXT_TRIGGER_RANK = 'Rank'; - -const String CONTEXT_TRIGGER_TOTAL_COUNT = 'TotalCount'; - -const String CONTEXT_TRIGGER_MON = 'Mon'; - -const String CONTEXT_TRIGGER_TUE = 'Tue'; - -const String CONTEXT_TRIGGER_WED = 'Wed'; - -const String CONTEXT_TRIGGER_THU = 'Thu'; - -const String CONTEXT_TRIGGER_FRI = 'Fri'; - -const String CONTEXT_TRIGGER_SAT = 'Sat'; - -const String CONTEXT_TRIGGER_SUN = 'Sun'; - -const String CONTEXT_TRIGGER_WEEKDAY = 'Weekday'; - -const String CONTEXT_TRIGGER_WEEKEND = 'Weekend'; - -const String CONTEXT_TRIGGER_EMPTY = 'Empty'; - -const String CONTEXT_TRIGGER_CRITICAL = 'Critical'; - -const String CONTEXT_TRIGGER_LOW = 'Low'; - -const String CONTEXT_TRIGGER_NORMAL = 'Normal'; - -const String CONTEXT_TRIGGER_HIGH = 'High'; - -const String CONTEXT_TRIGGER_FULL = 'Full'; - -const String CONTEXT_TRIGGER_DISABLED = 'Disabled'; - -const String CONTEXT_TRIGGER_SEARCHING = 'Searching'; - -const String CONTEXT_TRIGGER_CONNECTING = 'Connecting'; - -const String CONTEXT_TRIGGER_CONNECTED = 'Connected'; - -const String CONTEXT_TRIGGER_UNCONNECTED = 'Unconnected'; - -const String CONTEXT_TRIGGER_IDLE = 'Idle'; - -const String CONTEXT_TRIGGER_VOICE = 'Voice'; - -const String CONTEXT_TRIGGER_VIDEO = 'Video'; - -const String CONTEXT_TRIGGER_HEADSET = 'Headset'; - -const String CONTEXT_TRIGGER_BLUETOOTH = 'Bluetooth'; - -const String CONTEXT_TRIGGER_RECEIVED = 'Received'; - -const String CONTEXT_TRIGGER_SENT = 'Sent'; - -const String CONTEXT_TRIGGER_SMS = 'SMS'; - -const String CONTEXT_TRIGGER_MMS = 'MMS'; - -const String CONTEXT_TRIGGER_MY_PROFILE = 'MyProfile'; - -const String CONTEXT_TRIGGER_PERSON = 'Person'; - -const String CONTEXT_TRIGGER_CHANGED = 'Changed'; - -const String CONTEXT_TRIGGER_DETECTED = 'Detected'; - -const String CONTEXT_TRIGGER_IN = 'In'; - -const String CONTEXT_TRIGGER_OUT = 'Out'; - -const int LOCATION_BOUNDS_ERROR_CLASS = -46137312; - -const String APP_CONTROL_DATA_PUSH_LAUNCH_TYPE = - 'http://tizen.org/appcontrol/data/push/launch_type'; - -const int TBM_SURF_PLANE_MAX = 4; - -const int TBM_SURF_OPTION_READ = 1; - -const int TBM_SURF_OPTION_WRITE = 2; - -const int CAMERA_ERROR_CLASS = -26279936; - -const int IMAGE_UTIL_ERROR_CLASS = -26345472; - -const String MEDIA_STREAMER_PARAM_CAMERA_ID = 'camera-id'; - -const String MEDIA_STREAMER_PARAM_CAPTURE_WIDTH = 'capture-width'; - -const String MEDIA_STREAMER_PARAM_CAPTURE_HEIGHT = 'capture-height'; - -const String MEDIA_STREAMER_PARAM_IS_LIVE_STREAM = 'is-live'; - -const String MEDIA_STREAMER_PARAM_URI = 'uri'; - -const String MEDIA_STREAMER_PARAM_USER_AGENT = 'user-agent'; - -const String MEDIA_STREAMER_PARAM_STREAM_TYPE = 'stream-type'; - -const String MEDIA_STREAMER_PARAM_PORT = 'port'; - -const String MEDIA_STREAMER_PARAM_VIDEO_IN_PORT = 'video_in_port'; - -const String MEDIA_STREAMER_PARAM_AUDIO_IN_PORT = 'audio_in_port'; - -const String MEDIA_STREAMER_PARAM_VIDEO_OUT_PORT = 'video_out_port'; - -const String MEDIA_STREAMER_PARAM_AUDIO_OUT_PORT = 'audio_out_port'; - -const String MEDIA_STREAMER_PARAM_IP_ADDRESS = 'address'; - -const String MEDIA_STREAMER_PARAM_AUDIO_DEVICE = 'audio_device'; - -const String MEDIA_STREAMER_PARAM_CLOCK_SYNCHRONIZED = 'sync'; - -const String MEDIA_STREAMER_PARAM_ROTATE = 'rotate'; - -const String MEDIA_STREAMER_PARAM_FLIP = 'flip'; - -const String MEDIA_STREAMER_PARAM_DISPLAY_GEOMETRY_METHOD = - 'display-geometry-method'; - -const String MEDIA_STREAMER_PARAM_DISPLAY = 'display'; - -const String MEDIA_STREAMER_PARAM_VISIBLE = 'visible'; - -const String MEDIA_STREAMER_PARAM_HOST = 'host'; - -const String MEDIA_STREAMER_PARAM_SEGMENT_LOCATION = 'location'; - -const String MEDIA_STREAMER_PARAM_PLAYLIST_LOCATION = 'playlist-location'; - -const String MV_BARCODE_DETECT_ATTR_TARGET = 'MV_BARCODE_DETECT_ATTR_TARGET'; - -const String MV_BARCODE_GENERATE_ATTR_TEXT = 'MV_BARCODE_GENERATE_ATTR_TEXT'; - -const String MV_BARCODE_GENERATE_ATTR_COLOR_FRONT = - 'MV_BARCODE_GENERATE_ATTR_COLOR_FRONT'; - -const String MV_BARCODE_GENERATE_ATTR_COLOR_BACK = - 'MV_BARCODE_GENERATE_ATTR_COLOR_BACK'; - -const String MV_FACE_DETECTION_MODEL_FILE_PATH = - 'MV_FACE_DETECTION_MODEL_FILE_PATH'; - -const String MV_FACE_RECOGNITION_MODEL_TYPE = 'MV_FACE_RECOGNITION_MODEL_TYPE'; - -const String MV_FACE_DETECTION_ROI_X = 'MV_FACE_DETECTION_ROI_X'; - -const String MV_FACE_DETECTION_ROI_Y = 'MV_FACE_DETECTION_ROI_Y'; - -const String MV_FACE_DETECTION_ROI_WIDTH = 'MV_FACE_DETECTION_ROI_WIDTH'; - -const String MV_FACE_DETECTION_ROI_HEIGHT = 'MV_FACE_DETECTION_ROI_HEIGHT'; - -const String MV_FACE_DETECTION_MIN_SIZE_WIDTH = - 'MV_FACE_DETECTION_MIN_SIZE_WIDTH'; - -const String MV_FACE_DETECTION_MIN_SIZE_HEIGHT = - 'MV_FACE_DETECTION_MIN_SIZE_HEIGHT'; - -const String MV_IMAGE_RECOGNITION_OBJECT_SCALE_FACTOR = - 'MV_IMAGE_RECOGNITION_OBJECT_SCALE_FACTOR'; - -const String MV_IMAGE_RECOGNITION_OBJECT_MAX_KEYPOINTS_NUM = - 'MV_IMAGE_RECOGNITION_OBJECT_MAX_KEYPOINTS_NUM'; - -const String MV_IMAGE_RECOGNITION_SCENE_SCALE_FACTOR = - 'MV_IMAGE_RECOGNITION_SCENE_SCALE_FACTOR'; - -const String MV_IMAGE_RECOGNITION_SCENE_MAX_KEYPOINTS_NUM = - 'MV_IMAGE_RECOGNITION_SCENE_MAX_KEYPOINTS_NUM'; - -const String MV_IMAGE_RECOGNITION_MIN_MATCH_NUM = - 'MV_IMAGE_RECOGNITION_MIN_MATCH_NUM'; - -const String MV_IMAGE_RECOGNITION_REQ_MATCH_PART = - 'MV_IMAGE_RECOGNITION_REQ_MATCH_PART'; - -const String MV_IMAGE_RECOGNITION_TOLERANT_MATCH_PART_ERR = - 'MV_IMAGE_RECOGNITION_TOLERANT_MATCH_PART_ERR'; - -const String MV_IMAGE_TRACKING_HISTORY_AMOUNT = - 'MV_IMAGE_TRACKING_HISTORY_AMOUNT'; - -const String MV_IMAGE_TRACKING_EXPECTED_OFFSET = - 'MV_IMAGE_TRACKING_EXPECTED_OFFSET'; - -const String MV_IMAGE_TRACKING_USE_STABLIZATION = - 'MV_IMAGE_TRACKING_USE_STABLIZATION'; - -const String MV_IMAGE_TRACKING_STABLIZATION_TOLERANT_SHIFT = - 'MV_IMAGE_TRACKING_STABLIZATION_TOLERANT_SHIFT'; - -const String MV_IMAGE_TRACKING_STABLIZATION_SPEED = - 'MV_IMAGE_TRACKING_STABLIZATION_SPEED'; - -const String MV_IMAGE_TRACKING_STABLIZATION_ACCELERATION = - 'MV_IMAGE_TRACKING_STABLIZATION_ACCELERATION'; - -const String MV_SURVEILLANCE_EVENT_TYPE_MOVEMENT_DETECTED = - 'MV_SURVEILLANCE_EVENT_MOVEMENT_DETECTED'; - -const String MV_SURVEILLANCE_MOVEMENT_NUMBER_OF_REGIONS = - 'NUMBER_OF_MOVEMENT_REGIONS'; - -const String MV_SURVEILLANCE_MOVEMENT_REGIONS = 'MOVEMENT_REGIONS'; - -const String MV_SURVEILLANCE_EVENT_TYPE_PERSON_APPEARED_DISAPPEARED = - 'MV_SURVEILLANCE_EVENT_PERSON_APPEARED_DISAPEARED'; - -const String MV_SURVEILLANCE_PERSONS_APPEARED_NUMBER = - 'NUMBER_OF_APPEARED_PERSONS'; - -const String MV_SURVEILLANCE_PERSONS_DISAPPEARED_NUMBER = - 'NUMBER_OF_DISAPPEARED_PERSONS'; - -const String MV_SURVEILLANCE_PERSONS_TRACKED_NUMBER = - 'NUMBER_OF_TRACKED_PERSONS'; - -const String MV_SURVEILLANCE_PERSONS_APPEARED_LOCATIONS = - 'APPEARED_PERSONS_LOCATIONS'; - -const String MV_SURVEILLANCE_PERSONS_DISAPPEARED_LOCATIONS = - 'DISAPPEARED_PERSONS_LOCATIONS'; - -const String MV_SURVEILLANCE_PERSONS_TRACKED_LOCATIONS = - 'TRACKED_PERSONS_LOCATIONS'; - -const String MV_SURVEILLANCE_EVENT_TYPE_PERSON_RECOGNIZED = - 'MV_SURVEILLANCE_EVENT_PERSON_RECOGNIZED'; - -const String MV_SURVEILLANCE_PERSONS_RECOGNIZED_NUMBER = 'NUMBER_OF_PERSONS'; - -const String MV_SURVEILLANCE_PERSONS_RECOGNIZED_LOCATIONS = 'PERSONS_LOCATIONS'; - -const String MV_SURVEILLANCE_PERSONS_RECOGNIZED_LABELS = 'PERSONS_LABELS'; - -const String MV_SURVEILLANCE_PERSONS_RECOGNIZED_CONFIDENCES = - 'PERSONS_CONFIDENCES'; - -const String MV_SURVEILLANCE_FACE_RECOGNITION_MODEL_FILE_PATH = - 'MV_SURVEILLANCE_FACE_RECOGNITION_MODEL_FILE_PATH'; - -const String MV_SURVEILLANCE_MOVEMENT_DETECTION_THRESHOLD = - 'MV_SURVEILLANCE_MOVEMENT_DETECTION_THRESHOLD'; - -const String MV_SURVEILLANCE_SKIP_FRAMES_COUNT = - 'MV_SURVEILLANCE_SKIP_FRAMES_COUNT'; - -const int METADATA_EDITOR_ERROR_CLASS = -27000832; - -const int METADATA_EXTRACTOR_ERROR_CLASS = -26411008; - -const int PLAYER_ERROR_CLASS = -26476512; - -const int PLAYER_CUSTOM_ERROR_CLASS = -26472448; - -const int RECORDER_ERROR_CLASS = -26542064; - -const int THUMBNAIL_UTIL_ERROR_CLASS = -49872896; - -const int TONE_PLAYER_ERROR_CLASS = -8096; - -const int WAV_PLAYER_ERROR_CLASS = -8112; - -const int IOTCON_MULTICAST_ADDRESS = 0; - -const int IOTCON_FUNC_STOP = 0; - -const int IOTCON_FUNC_CONTINUE = 1; - -const String IOTCON_INTERFACE_DEFAULT = 'oic.if.baseline'; - -const String IOTCON_INTERFACE_LINK = 'oic.if.ll'; - -const String IOTCON_INTERFACE_BATCH = 'oic.if.b'; - -const String IOTCON_INTERFACE_GROUP = 'oic.mi.grp'; - -const String IOTCON_INTERFACE_READONLY = 'oic.if.r'; - -const int WIFI_DIRECT_MAX_DEVICE_NAME_LEN = 32; - -const int WIFI_DIRECT_MAC_ADDRESS_LEN = 18; - -const int YACA_KEYLEN_COMPONENT_TYPE_MASK = -268435456; - -const int YACA_KEYLEN_COMPONENT_TYPE_BITS = 0; - -const int YACA_KEYLEN_COMPONENT_TYPE_DH = 268435456; - -const int YACA_KEYLEN_COMPONENT_TYPE_DH_RFC = 536870912; - -const int YACA_KEYLEN_COMPONENT_TYPE_EC = 805306368; - -const int YACA_KEYLEN_COMPONENT_DH_GEN_MASK = 251658240; - -const int YACA_KEYLEN_COMPONENT_DH_GEN_2 = 0; - -const int YACA_KEYLEN_COMPONENT_DH_GEN_5 = 16777216; - -const int YACA_KEYLEN_COMPONENT_DH_PRIME_MASK = 65535; - -const int YACA_KEYLEN_COMPONENT_DH_RFC_MASK = 251658240; - -const int YACA_KEYLEN_COMPONENT_DH_RFC_160 = 0; - -const int YACA_KEYLEN_COMPONENT_DH_RFC_224 = 16777216; - -const int YACA_KEYLEN_COMPONENT_DH_RFC_256 = 33554432; - -const int YACA_KEYLEN_COMPONENT_EC_PRIME = 0; - -const int YACA_KEYLEN_COMPONENT_EC_SECP = 16777216; - -const int YACA_KEYLEN_COMPONENT_EC_SECT = 33554432; - -const int YACA_KEYLEN_COMPONENT_EC_BRAINPOOL = 50331648; - -const int YACA_KEYLEN_COMPONENT_EC_V = 0; - -const int YACA_KEYLEN_COMPONENT_EC_R = 1048576; - -const int YACA_KEYLEN_COMPONENT_EC_K = 2097152; - -const int YACA_KEYLEN_COMPONENT_EC_T = 3145728; - -const int YACA_KEYLEN_COMPONENT_EC_1 = 0; - -const int YACA_KEYLEN_COMPONENT_EC_2 = 65536; - -const int YACA_KEYLEN_COMPONENT_EC_3 = 131072; - -const int YACA_KEYLEN_COMPONENT_EC_4 = 196608; - -const int YACA_KEY_LENGTH_DH_GENERATOR_2 = 268435456; - -const int YACA_KEY_LENGTH_DH_GENERATOR_5 = 285212672; - -const int TIZEN_ERROR_YACA = -31653888; - -const int CALENDAR_CONNECT_FLAG_NONE = 0; - -const int CALENDAR_CONNECT_FLAG_RETRY = 1; - -const int DEFAULT_EVENT_CALENDAR_BOOK_ID = 1; - -const int DEFAULT_TODO_CALENDAR_BOOK_ID = 2; - -const int DEFAULT_BIRTHDAY_CALENDAR_BOOK_ID = 3; - -const int CALENDAR_TODO_NO_DUE_DATE = 9223372036854775807; - -const int CALENDAR_TODO_NO_START_DATE = -9223372036854775807; - -const int CALENDAR_RECORD_NO_UNTIL = 9223372036854775807; - -const double CALENDAR_RECORD_NO_COORDINATE = 1000.0; - -const int CALENDAR_BOOK_FILTER_ALL = -1; - -const int CONTACTS_CONNECT_FLAG_RETRY = 1; - -const int CONTACTS_CONNECT_FLAG_NONE = 0; - -const int LOG_TAG = 0; - -const int MAX_VALUE_SIZE = 16; - -const int IME_ATTR_FONTSTYLE_UNDERLINE = 1; - -const int IME_ATTR_FONTSTYLE_HIGHLIGHT = 2; - -const int IME_ATTR_FONTSTYLE_REVERSAL = 4; - -const String STT_RECOGNITION_TYPE_FREE = 'stt.recognition.type.FREE'; - -const String STT_RECOGNITION_TYPE_FREE_PARTIAL = - 'stt.recognition.type.FREE.PARTIAL'; - -const String STT_RECOGNITION_TYPE_SEARCH = 'stt.recognition.type.SEARCH'; - -const String STT_RECOGNITION_TYPE_WEB_SEARCH = - 'stt.recognition.type.WEB_SEARCH'; - -const String STT_RECOGNITION_TYPE_MAP = 'stt.recognition.type.MAP'; - -const String STT_RESULT_MESSAGE_NONE = 'stt.result.message.none'; - -const String STT_RESULT_MESSAGE_ERROR_TOO_SOON = - 'stt.result.message.error.too.soon'; - -const String STT_RESULT_MESSAGE_ERROR_TOO_SHORT = - 'stt.result.message.error.too.short'; - -const String STT_RESULT_MESSAGE_ERROR_TOO_LONG = - 'stt.result.message.error.too.long'; - -const String STT_RESULT_MESSAGE_ERROR_TOO_QUIET = - 'stt.result.message.error.too.quiet'; - -const String STT_RESULT_MESSAGE_ERROR_TOO_LOUD = - 'stt.result.message.error.too.loud'; - -const String STT_RESULT_MESSAGE_ERROR_TOO_FAST = - 'stt.result.message.error.too.fast'; - -const String STTE_RECOGNITION_TYPE_FREE = 'stt.recognition.type.FREE'; - -const String STTE_RECOGNITION_TYPE_FREE_PARTIAL = - 'stt.recognition.type.FREE.PARTIAL'; - -const String STTE_RESULT_MESSAGE_NONE = 'stt.result.message.none'; - -const String STTE_RESULT_MESSAGE_ERROR_TOO_SOON = - 'stt.result.message.error.too.soon'; - -const String STTE_RESULT_MESSAGE_ERROR_TOO_SHORT = - 'stt.result.message.error.too.short'; - -const String STTE_RESULT_MESSAGE_ERROR_TOO_LONG = - 'stt.result.message.error.too.long'; - -const String STTE_RESULT_MESSAGE_ERROR_TOO_QUIET = - 'stt.result.message.error.too.quiet'; - -const String STTE_RESULT_MESSAGE_ERROR_TOO_LOUD = - 'stt.result.message.error.too.loud'; - -const String STTE_RESULT_MESSAGE_ERROR_TOO_FAST = - 'stt.result.message.error.too.fast'; - -const int TTS_SPEED_AUTO = 0; - -const int TTS_VOICE_TYPE_AUTO = 0; - -const int TTS_VOICE_TYPE_MALE = 1; - -const int TTS_VOICE_TYPE_FEMALE = 2; - -const int TTS_VOICE_TYPE_CHILD = 3; - -const int TTSE_VOICE_TYPE_MALE = 1; - -const int TTSE_VOICE_TYPE_FEMALE = 2; - -const int TTSE_VOICE_TYPE_CHILD = 3; - -const int VC_COMMAND_TYPE_FOREGROUND = 1; - -const int VC_COMMAND_TYPE_BACKGROUND = 2; - -const int VC_DIALOG_END = 0; - -const int VC_DIALOG_CONTINUE = 1; - -const int VCE_COMMAND_TYPE_FOREGROUND = 1; - -const int VCE_COMMAND_TYPE_BACKGROUND = 2; - -const int VCE_COMMAND_TYPE_WIDGET = 3; - -const int VCE_COMMAND_TYPE_SYSTEM = 4; - -const int VCE_COMMAND_TYPE_SYSTEM_BACKGROUND = 5; - -const int VCE_COMMAND_TYPE_EXCLUSIVE = 6; - -const String VCE_AUDIO_ID_BLUETOOTH = 'VC_AUDIO_ID_BLUETOOTH'; - -const String VCE_AUDIO_ID_WIFI = 'VC_AUDIO_ID_WIFI'; - -const String VC_RESULT_MESSAGE_NONE = 'vc.result.message.none'; - -const String VC_RESULT_MESSAGE_ERROR_TOO_LOUD = - 'vc.result.message.error.too.loud'; diff --git a/lib/src/bindings/5.0/generated_symbols.dart b/lib/src/bindings/5.0/generated_symbols.dart deleted file mode 100644 index 186378b..0000000 --- a/lib/src/bindings/5.0/generated_symbols.dart +++ /dev/null @@ -1,7714 +0,0 @@ -// Copyright 2021 Samsung Electronics Co., Ltd. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// AUTO GENERATED FILE, DO NOT EDIT. -// -// Generated by `package:symgen`. - -final Map> tizen50Symbols = { - 'libaccounts-svc.so.0': [ - 'account_connect', - 'account_connect_readonly', - 'account_create', - 'account_delete_from_db_by_id', - 'account_delete_from_db_by_package_name', - 'account_delete_from_db_by_package_name_offline', - 'account_delete_from_db_by_user_name', - 'account_destroy', - 'account_disconnect', - 'account_foreach_account_from_db', - 'account_get_access_token', - 'account_get_account_id', - 'account_get_auth_type', - 'account_get_capability', - 'account_get_capability_all', - 'account_get_custom', - 'account_get_custom_all', - 'account_get_display_name', - 'account_get_domain_name', - 'account_get_email_address', - 'account_get_icon_path', - 'account_get_package_name', - 'account_get_secret', - 'account_get_source', - 'account_get_sync_support', - 'account_get_total_count_from_db', - 'account_get_total_count_from_db_ex', - 'account_get_user_int', - 'account_get_user_name', - 'account_get_user_text', - 'account_insert_to_db', - 'account_query_account_by_account_id', - 'account_query_account_by_capability', - 'account_query_account_by_capability_type', - 'account_query_account_by_package_name', - 'account_query_account_by_user_name', - 'account_query_capability_by_account_id', - 'account_set_access_token', - 'account_set_auth_type', - 'account_set_capability', - 'account_set_custom', - 'account_set_display_name', - 'account_set_domain_name', - 'account_set_email_address', - 'account_set_icon_path', - 'account_set_package_name', - 'account_set_secret', - 'account_set_source', - 'account_set_sync_support', - 'account_set_user_int', - 'account_set_user_name', - 'account_set_user_text', - 'account_subscribe_create', - 'account_subscribe_notification', - 'account_subscribe_notification_ex', - 'account_type_create', - 'account_type_delete_by_app_id', - 'account_type_delete_by_app_id_offline', - 'account_type_destroy', - 'account_type_foreach_account_type_from_db', - 'account_type_get_app_id', - 'account_type_get_icon_path', - 'account_type_get_label', - 'account_type_get_label_by_locale', - 'account_type_get_multiple_account_support', - 'account_type_get_provider_feature_all', - 'account_type_get_service_provider_id', - 'account_type_get_small_icon_path', - 'account_type_insert_to_db', - 'account_type_insert_to_db_offline', - 'account_type_query_app_id_exist', - 'account_type_query_by_app_id', - 'account_type_query_by_provider_feature', - 'account_type_query_label_by_app_id', - 'account_type_query_label_by_locale', - 'account_type_query_provider_feature_by_app_id', - 'account_type_query_supported_feature', - 'account_type_set_app_id', - 'account_type_set_icon_path', - 'account_type_set_label', - 'account_type_set_multiple_account_support', - 'account_type_set_provider_feature', - 'account_type_set_service_provider_id', - 'account_type_set_small_icon_path', - 'account_type_update_to_db_by_app_id', - 'account_unsubscribe_notification', - 'account_unsubscribe_notification_ex', - 'account_update_sync_status_by_id', - 'account_update_to_db_by_id', - 'account_update_to_db_by_id_ex', - 'account_update_to_db_by_id_without_permission', - 'account_update_to_db_by_user_name', - ], - 'libfido-client.so.0': [ - 'fido_authenticator_foreach_attestation_type', - 'fido_authenticator_get_aaid', - 'fido_authenticator_get_algorithm', - 'fido_authenticator_get_assertion_scheme', - 'fido_authenticator_get_attachment_hint', - 'fido_authenticator_get_description', - 'fido_authenticator_get_icon', - 'fido_authenticator_get_is_second_factor_only', - 'fido_authenticator_get_key_protection_method', - 'fido_authenticator_get_matcher_protection_method', - 'fido_authenticator_get_tc_discplay', - 'fido_authenticator_get_tc_display_type', - 'fido_authenticator_get_title', - 'fido_authenticator_get_verification_method', - 'fido_foreach_authenticator', - 'fido_get_client_vendor', - 'fido_get_client_version', - 'fido_uaf_get_response_message', - 'fido_uaf_is_supported', - 'fido_uaf_set_server_result', - ], - 'liboauth2.so.0': [ - 'oauth2_error_get_code', - 'oauth2_error_get_custom_data', - 'oauth2_error_get_description', - 'oauth2_error_get_uri', - 'oauth2_manager_clear_cache', - 'oauth2_manager_clear_cookies', - 'oauth2_manager_create', - 'oauth2_manager_destroy', - 'oauth2_manager_is_request_in_progress', - 'oauth2_manager_refresh_access_token', - 'oauth2_manager_request_access_token', - 'oauth2_manager_request_authorization_grant', - 'oauth2_manager_request_token', - 'oauth2_request_add_custom_data', - 'oauth2_request_create', - 'oauth2_request_destroy', - 'oauth2_request_get_auth_end_point_url', - 'oauth2_request_get_authorization_code', - 'oauth2_request_get_client_id', - 'oauth2_request_get_client_secret', - 'oauth2_request_get_custom_data', - 'oauth2_request_get_grant_type', - 'oauth2_request_get_password', - 'oauth2_request_get_redirection_url', - 'oauth2_request_get_refresh_token', - 'oauth2_request_get_refresh_token_url', - 'oauth2_request_get_response_type', - 'oauth2_request_get_scope', - 'oauth2_request_get_state', - 'oauth2_request_get_token_end_point_url', - 'oauth2_request_get_user_name', - 'oauth2_request_set_auth_end_point_url', - 'oauth2_request_set_authorization_code', - 'oauth2_request_set_client_authentication_type', - 'oauth2_request_set_client_id', - 'oauth2_request_set_client_secret', - 'oauth2_request_set_grant_type', - 'oauth2_request_set_password', - 'oauth2_request_set_redirection_url', - 'oauth2_request_set_refresh_token', - 'oauth2_request_set_refresh_token_url', - 'oauth2_request_set_response_type', - 'oauth2_request_set_scope', - 'oauth2_request_set_state', - 'oauth2_request_set_token_end_point_url', - 'oauth2_request_set_user_name', - 'oauth2_response_destroy', - 'oauth2_response_get_access_token', - 'oauth2_response_get_authorization_code', - 'oauth2_response_get_custom_data', - 'oauth2_response_get_error', - 'oauth2_response_get_expires_in', - 'oauth2_response_get_refresh_token', - 'oauth2_response_get_scope', - 'oauth2_response_get_state', - 'oauth2_response_get_token_type', - ], - 'libcore-sync-client.so.1': [ - 'bundle_iterate_cb', - 'get_interval', - 'marshal_bundle', - 'proc_get_cmdline_self', - 'read_proc', - 'sync_adapter_set_callbacks', - 'sync_adapter_unset_callbacks', - 'sync_manager_add_data_change_sync_job', - 'sync_manager_add_periodic_sync_job', - 'sync_manager_foreach_sync_job', - 'sync_manager_on_demand_sync_job', - 'sync_manager_remove_sync_job', - 'tizen_sync_adapter_call_send_result', - 'tizen_sync_adapter_call_send_result_finish', - 'tizen_sync_adapter_call_send_result_sync', - 'tizen_sync_adapter_complete_send_result', - 'tizen_sync_adapter_emit_cancel_sync', - 'tizen_sync_adapter_emit_start_sync', - 'tizen_sync_adapter_get_type', - 'tizen_sync_adapter_interface_info', - 'tizen_sync_adapter_override_properties', - 'tizen_sync_adapter_proxy_get_type', - 'tizen_sync_adapter_proxy_new', - 'tizen_sync_adapter_proxy_new_finish', - 'tizen_sync_adapter_proxy_new_for_bus', - 'tizen_sync_adapter_proxy_new_for_bus_finish', - 'tizen_sync_adapter_proxy_new_for_bus_sync', - 'tizen_sync_adapter_proxy_new_sync', - 'tizen_sync_adapter_skeleton_get_type', - 'tizen_sync_adapter_skeleton_new', - 'tizen_sync_manager_call_add_data_change_job', - 'tizen_sync_manager_call_add_data_change_job_finish', - 'tizen_sync_manager_call_add_data_change_job_sync', - 'tizen_sync_manager_call_add_on_demand_job', - 'tizen_sync_manager_call_add_on_demand_job_finish', - 'tizen_sync_manager_call_add_on_demand_job_sync', - 'tizen_sync_manager_call_add_periodic_job', - 'tizen_sync_manager_call_add_periodic_job_finish', - 'tizen_sync_manager_call_add_periodic_job_sync', - 'tizen_sync_manager_call_add_sync_adapter', - 'tizen_sync_manager_call_add_sync_adapter_finish', - 'tizen_sync_manager_call_add_sync_adapter_sync', - 'tizen_sync_manager_call_get_all_sync_jobs', - 'tizen_sync_manager_call_get_all_sync_jobs_finish', - 'tizen_sync_manager_call_get_all_sync_jobs_sync', - 'tizen_sync_manager_call_remove_job', - 'tizen_sync_manager_call_remove_job_finish', - 'tizen_sync_manager_call_remove_job_sync', - 'tizen_sync_manager_call_remove_sync_adapter', - 'tizen_sync_manager_call_remove_sync_adapter_finish', - 'tizen_sync_manager_call_remove_sync_adapter_sync', - 'tizen_sync_manager_call_set_sync_status', - 'tizen_sync_manager_call_set_sync_status_finish', - 'tizen_sync_manager_call_set_sync_status_sync', - 'tizen_sync_manager_complete_add_data_change_job', - 'tizen_sync_manager_complete_add_on_demand_job', - 'tizen_sync_manager_complete_add_periodic_job', - 'tizen_sync_manager_complete_add_sync_adapter', - 'tizen_sync_manager_complete_get_all_sync_jobs', - 'tizen_sync_manager_complete_remove_job', - 'tizen_sync_manager_complete_remove_sync_adapter', - 'tizen_sync_manager_complete_set_sync_status', - 'tizen_sync_manager_get_type', - 'tizen_sync_manager_interface_info', - 'tizen_sync_manager_override_properties', - 'tizen_sync_manager_proxy_get_type', - 'tizen_sync_manager_proxy_new', - 'tizen_sync_manager_proxy_new_finish', - 'tizen_sync_manager_proxy_new_for_bus', - 'tizen_sync_manager_proxy_new_for_bus_finish', - 'tizen_sync_manager_proxy_new_for_bus_sync', - 'tizen_sync_manager_proxy_new_sync', - 'tizen_sync_manager_skeleton_get_type', - 'tizen_sync_manager_skeleton_new', - 'umarshal_bundle', - 'umarshal_sync_job_list', - ], - 'libcapi-appfw-application.so.0': [ - 'app_efl_exit', - 'app_efl_main', - 'app_exit', - 'app_get_device_orientation', - 'app_get_preinitialized_background', - 'app_get_preinitialized_conformant', - 'app_get_preinitialized_window', - 'app_main', - 'i18n_get_text', - 'ui_app_add_event_handler', - 'ui_app_exit', - 'ui_app_fini', - 'ui_app_init', - 'ui_app_main', - 'ui_app_remove_event_handler', - ], - 'libcapi-appfw-alarm.so.0': [ - 'alarm_cancel', - 'alarm_cancel_all', - 'alarm_foreach_registered_alarm', - 'alarm_get_app_control', - 'alarm_get_current_time', - 'alarm_get_global', - 'alarm_get_notification', - 'alarm_get_scheduled_date', - 'alarm_get_scheduled_period', - 'alarm_get_scheduled_recurrence_week_flag', - 'alarm_schedule_after_delay', - 'alarm_schedule_at_date', - 'alarm_schedule_noti_after_delay', - 'alarm_schedule_noti_once_after_delay', - 'alarm_schedule_noti_once_at_date', - 'alarm_schedule_noti_with_recurrence_week_flag', - 'alarm_schedule_once_after_delay', - 'alarm_schedule_once_at_date', - 'alarm_schedule_service_once_after_delay', - 'alarm_schedule_service_once_at_date', - 'alarm_schedule_with_recurrence_week_flag', - 'alarm_set_global', - 'alarm_set_systime', - 'alarm_set_systime_with_propagation_delay', - 'alarm_set_timezone', - 'alarm_update_date', - 'alarm_update_delay', - 'alarm_update_period', - 'alarm_update_week_flag', - ], - 'libcapi-appfw-app-common.so.0': [ - 'app_convert_appcore_rm', - 'app_error', - 'app_event_get_device_orientation', - 'app_event_get_language', - 'app_event_get_low_battery_status', - 'app_event_get_low_memory_status', - 'app_event_get_region_format', - 'app_event_get_suspended_state', - 'app_finalizer_add', - 'app_finalizer_execute', - 'app_finalizer_remove', - 'app_get_cache_path', - 'app_get_data_path', - 'app_get_external_cache_path', - 'app_get_external_data_path', - 'app_get_external_shared_data_path', - 'app_get_id', - 'app_get_name', - 'app_get_package', - 'app_get_package_app_name', - 'app_get_resource_path', - 'app_get_shared_data_path', - 'app_get_shared_resource_path', - 'app_get_shared_trusted_path', - 'app_get_tep_resource_path', - 'app_get_version', - 'app_resource_manager_get', - 'app_resource_manager_init', - 'app_resource_manager_release', - 'app_watchdog_timer_disable', - 'app_watchdog_timer_enable', - 'app_watchdog_timer_kick', - ], - 'libcapi-appfw-app-control.so.0': [ - 'app_control_add_extra_data', - 'app_control_add_extra_data_array', - 'app_control_cb_broker_foreach_app_matched', - 'app_control_clone', - 'app_control_create', - 'app_control_create_event', - 'app_control_create_request', - 'app_control_destroy', - 'app_control_enable_app_started_result_event', - 'app_control_error', - 'app_control_export_as_bundle', - 'app_control_foreach_app_matched', - 'app_control_foreach_extra_data', - 'app_control_get_app_id', - 'app_control_get_caller', - 'app_control_get_category', - 'app_control_get_extra_data', - 'app_control_get_extra_data_array', - 'app_control_get_instance_id', - 'app_control_get_launch_mode', - 'app_control_get_mime', - 'app_control_get_operation', - 'app_control_get_package', - 'app_control_get_uri', - 'app_control_get_window', - 'app_control_import_from_bundle', - 'app_control_is_extra_data_array', - 'app_control_is_reply_requested', - 'app_control_remove_extra_data', - 'app_control_reply_to_launch_request', - 'app_control_request_transient_app', - 'app_control_send_launch_request', - 'app_control_send_launch_request_async', - 'app_control_send_terminate_request', - 'app_control_set_app_id', - 'app_control_set_category', - 'app_control_set_defapp', - 'app_control_set_instance_id', - 'app_control_set_launch_mode', - 'app_control_set_mime', - 'app_control_set_operation', - 'app_control_set_package', - 'app_control_set_uri', - 'app_control_set_window', - 'app_control_to_bundle', - 'app_control_unset_defapp', - 'app_control_validate_internal_key', - ], - 'libcapi-appfw-event.so.0': [ - 'event_add_event_handler', - 'event_error', - 'event_keep_last_event_data', - 'event_publish_app_event', - 'event_publish_trusted_app_event', - 'event_remove_event_handler', - ], - 'libcapi-appfw-job-scheduler.so.0': [ - 'job_info_add_trigger_event', - 'job_info_clone', - 'job_info_create', - 'job_info_destroy', - 'job_info_get_job_id', - 'job_info_remove_trigger_event', - 'job_info_set_once', - 'job_info_set_periodic', - 'job_info_set_persistent', - 'job_info_set_requirement_timeout', - 'job_info_set_requires_battery_not_low', - 'job_info_set_requires_charging', - 'job_info_set_requires_wifi_connection', - 'job_scheduler_cancel', - 'job_scheduler_cancel_all', - 'job_scheduler_finish', - 'job_scheduler_foreach_job', - 'job_scheduler_init', - 'job_scheduler_notify_job_finished', - 'job_scheduler_schedule', - 'job_scheduler_service_add', - 'job_scheduler_service_remove', - ], - 'libcapi-appfw-preference.so.0': [ - 'preference_foreach_item', - 'preference_get_boolean', - 'preference_get_double', - 'preference_get_int', - 'preference_get_string', - 'preference_is_existing', - 'preference_remove', - 'preference_remove_all', - 'preference_set_boolean', - 'preference_set_changed_cb', - 'preference_set_double', - 'preference_set_int', - 'preference_set_string', - 'preference_unset_changed_cb', - ], - 'libcapi-appfw-app-manager.so.0': [ - 'app_context_clone', - 'app_context_destroy', - 'app_context_get_app_id', - 'app_context_get_app_state', - 'app_context_get_package', - 'app_context_get_package_id', - 'app_context_get_pid', - 'app_context_is_equal', - 'app_context_is_sub_app', - 'app_context_is_terminated', - 'app_info_clone', - 'app_info_create', - 'app_info_destroy', - 'app_info_filter_add_bool', - 'app_info_filter_add_string', - 'app_info_filter_count_appinfo', - 'app_info_filter_create', - 'app_info_filter_destroy', - 'app_info_filter_foreach_appinfo', - 'app_info_foreach_category', - 'app_info_foreach_metadata', - 'app_info_get_app_component_type', - 'app_info_get_app_id', - 'app_info_get_exec', - 'app_info_get_icon', - 'app_info_get_label', - 'app_info_get_localed_label', - 'app_info_get_package', - 'app_info_get_type', - 'app_info_is_enabled', - 'app_info_is_equal', - 'app_info_is_nodisplay', - 'app_info_is_onboot', - 'app_info_is_preload', - 'app_info_metadata_filter_add', - 'app_info_metadata_filter_create', - 'app_info_metadata_filter_destroy', - 'app_info_metadata_filter_foreach', - 'app_manager_attach_window', - 'app_manager_detach_window', - 'app_manager_event_create', - 'app_manager_event_destroy', - 'app_manager_event_set_status', - 'app_manager_foreach_app_context', - 'app_manager_foreach_app_info', - 'app_manager_foreach_running_app_context', - 'app_manager_foreach_visible_app_context', - 'app_manager_get_app_context', - 'app_manager_get_app_context_by_instance_id', - 'app_manager_get_app_id', - 'app_manager_get_app_info', - 'app_manager_get_external_shared_data_path', - 'app_manager_get_focused_app_context', - 'app_manager_get_shared_data_path', - 'app_manager_get_shared_resource_path', - 'app_manager_get_shared_trusted_path', - 'app_manager_is_running', - 'app_manager_request_terminate_bg_app', - 'app_manager_resume_app', - 'app_manager_set_app_context_event_cb', - 'app_manager_set_app_context_status_cb', - 'app_manager_set_app_icon', - 'app_manager_set_event_cb', - 'app_manager_set_splash_screen_display', - 'app_manager_terminate_app', - 'app_manager_unset_app_context_event_cb', - 'app_manager_unset_app_context_status_cb', - 'app_manager_unset_event_cb', - ], - 'libbadge.so.0': [ - 'badge_add', - 'badge_add_deferred_task', - 'badge_add_for_uid', - 'badge_create', - 'badge_create_for_uid', - 'badge_db_delete', - 'badge_db_delete_by_pkgname', - 'badge_db_exec', - 'badge_db_get_allow_to_display_by_appid', - 'badge_db_get_count', - 'badge_db_get_display_option', - 'badge_db_get_list', - 'badge_db_get_setting_by_appid', - 'badge_db_init', - 'badge_db_insert', - 'badge_db_is_existing', - 'badge_db_set_count', - 'badge_db_set_display_option', - 'badge_db_update_app_disabled', - 'badge_db_update_pkg_disabled', - 'badge_db_update_setting', - 'badge_del_deferred_task', - 'badge_error_quark', - 'badge_foreach', - 'badge_foreach_for_uid', - 'badge_get_count', - 'badge_get_count_for_uid', - 'badge_get_display', - 'badge_get_display_for_uid', - 'badge_ipc_make_gvariant_from_setting', - 'badge_ipc_make_setting_from_gvariant', - 'badge_is_existing', - 'badge_is_existing_for_uid', - 'badge_is_service_ready', - 'badge_new', - 'badge_new_for_uid', - 'badge_register_changed_cb', - 'badge_register_changed_cb_for_uid', - 'badge_remove', - 'badge_remove_for_uid', - 'badge_set_count', - 'badge_set_count_for_uid', - 'badge_set_display', - 'badge_set_display_for_uid', - 'badge_setting_arrange_tables', - 'badge_setting_delete_package_for_uid', - 'badge_setting_free_setting', - 'badge_setting_get_allow_to_display', - 'badge_setting_get_appid', - 'badge_setting_get_pkgname', - 'badge_setting_get_setting_by_appid', - 'badge_setting_get_setting_by_appid_for_uid', - 'badge_setting_insert_package_for_uid', - 'badge_setting_is_existed_appid', - 'badge_setting_refresh_setting_table', - 'badge_setting_set_allow_to_display', - 'badge_setting_update_setting', - 'badge_setting_update_setting_for_uid', - 'badge_unregister_changed_cb', - 'badge_unregister_changed_cb_for_uid', - ], - 'libbundle.so.0': [ - 'bundle_add', - 'bundle_add_byte', - 'bundle_add_byte_array', - 'bundle_add_str', - 'bundle_add_str_array', - 'bundle_compare', - 'bundle_create', - 'bundle_decode', - 'bundle_decode_raw', - 'bundle_del', - 'bundle_dup', - 'bundle_encode', - 'bundle_encode_raw', - 'bundle_export_to_argv', - 'bundle_foreach', - 'bundle_free', - 'bundle_free_encoded_rawdata', - 'bundle_free_exported_argv', - 'bundle_from_json', - 'bundle_get_byte', - 'bundle_get_byte_array', - 'bundle_get_count', - 'bundle_get_str', - 'bundle_get_str_array', - 'bundle_get_type', - 'bundle_get_val', - 'bundle_import_from_argv', - 'bundle_iterate', - 'bundle_keyval_get_array_val', - 'bundle_keyval_get_basic_val', - 'bundle_keyval_get_type', - 'bundle_keyval_type_is_array', - 'bundle_keyval_type_is_measurable', - 'bundle_set_byte_array_element', - 'bundle_set_str_array_element', - 'bundle_to_json', - ], - 'libdata-control.so.0': [ - 'data_control_add_data_change_cb', - 'data_control_bulk_data_add', - 'data_control_bulk_data_create', - 'data_control_bulk_data_destroy', - 'data_control_bulk_data_get_count', - 'data_control_bulk_data_get_data', - 'data_control_bulk_result_data_add', - 'data_control_bulk_result_data_create', - 'data_control_bulk_result_data_destroy', - 'data_control_bulk_result_data_get_count', - 'data_control_bulk_result_data_get_result_data', - 'data_control_map_add', - 'data_control_map_add_bulk_data', - 'data_control_map_bind_add_bulk_data_response_cb', - 'data_control_map_bind_response_cb', - 'data_control_map_create', - 'data_control_map_destroy', - 'data_control_map_get', - 'data_control_map_get_data_id', - 'data_control_map_get_handle_id', - 'data_control_map_get_provider_id', - 'data_control_map_get_with_page', - 'data_control_map_register_add_bulk_data_response_cb', - 'data_control_map_register_response_cb', - 'data_control_map_remove', - 'data_control_map_set', - 'data_control_map_set_data_id', - 'data_control_map_set_provider_id', - 'data_control_map_unbind_add_bulk_data_response_cb', - 'data_control_map_unbind_response_cb', - 'data_control_map_unregister_add_bulk_data_response_cb', - 'data_control_map_unregister_response_cb', - 'data_control_provider_add_data_change_consumer_filter_cb', - 'data_control_provider_create_delete_statement', - 'data_control_provider_create_insert_statement', - 'data_control_provider_create_select_statement', - 'data_control_provider_create_update_statement', - 'data_control_provider_foreach_data_change_consumer', - 'data_control_provider_get_client_appid', - 'datacontrol_provider_get_select_page_info', - 'data_control_provider_map_register_add_bulk_data_request_cb', - 'data_control_provider_map_register_cb', - 'data_control_provider_map_unregister_add_bulk_data_request_cb', - 'data_control_provider_map_unregister_cb', - 'data_control_provider_match_data_id', - 'data_control_provider_match_provider_id', - 'data_control_provider_remove_data_change_consumer_filter_cb', - 'data_control_provider_send_bulk_insert_result', - 'data_control_provider_send_data_change_noti', - 'data_control_provider_send_delete_result', - 'data_control_provider_send_error', - 'data_control_provider_send_insert_result', - 'data_control_provider_send_map_bulk_add_result', - 'data_control_provider_send_map_get_value_result', - 'data_control_provider_send_map_result', - 'data_control_provider_send_select_result', - 'datacontrol_provider_send_select_result_without_data', - 'data_control_provider_send_update_result', - 'data_control_provider_sql_register_cb', - 'data_control_provider_sql_register_insert_bulk_data_request_cb', - 'data_control_provider_sql_unregister_cb', - 'data_control_provider_sql_unregister_insert_bulk_data_request_cb', - 'datacontrol_provider_write_socket', - 'data_control_remove_data_change_cb', - 'data_control_sql_bind_insert_bulk_data_response_cb', - 'data_control_sql_bind_response_cb', - 'data_control_sql_create', - 'data_control_sql_delete', - 'data_control_sql_destroy', - 'data_control_sql_get_blob_data', - 'data_control_sql_get_column_count', - 'data_control_sql_get_column_item_size', - 'data_control_sql_get_column_item_type', - 'data_control_sql_get_column_name', - 'data_control_sql_get_data_id', - 'data_control_sql_get_double_data', - 'data_control_sql_get_handle_id', - 'data_control_sql_get_int64_data', - 'data_control_sql_get_int_data', - 'data_control_sql_get_provider_id', - 'data_control_sql_get_text_data', - 'data_control_sql_insert', - 'data_control_sql_insert_bulk_data', - 'data_control_sql_register_insert_bulk_data_response_cb', - 'data_control_sql_register_response_cb', - 'data_control_sql_select', - 'data_control_sql_select_with_page', - 'data_control_sql_set_data_id', - 'data_control_sql_set_provider_id', - 'data_control_sql_step_first', - 'data_control_sql_step_last', - 'data_control_sql_step_next', - 'data_control_sql_step_previous', - 'data_control_sql_unbind_insert_bulk_data_response_cb', - 'data_control_sql_unbind_response_cb', - 'data_control_sql_unregister_insert_bulk_data_response_cb', - 'data_control_sql_unregister_response_cb', - 'data_control_sql_update', - ], - 'libmessage-port.so.1': [ - 'message_port_add_registered_cb', - 'message_port_add_unregistered_cb', - 'message_port_check_remote_port', - 'message_port_check_trusted_remote_port', - 'message_port_register_local_port', - 'message_port_register_trusted_local_port', - 'message_port_remove_registration_event_cb', - 'message_port_send_message', - 'message_port_send_message_with_local_port', - 'message_port_send_trusted_message', - 'message_port_send_trusted_message_with_local_port', - 'message_port_unregister_local_port', - 'message_port_unregister_trusted_local_port', - ], - 'libnotification.so.0': [ - 'notification_add_button', - 'notification_add_deferred_task', - 'notification_add_private_sharing_target_id', - 'notification_calibrate_private_sharing', - 'notification_check_event_receiver_available', - 'notification_clear', - 'notification_clone', - 'notification_create', - 'notification_create_from_package_template', - 'notification_create_from_template', - 'notification_db_init', - 'notification_del_deferred_task', - 'notification_delete', - 'notification_delete_all', - 'notification_delete_all_by_type', - 'notification_delete_all_for_uid', - 'notification_delete_by_priv_id', - 'notification_delete_for_uid', - 'notification_delete_group_by_group_id', - 'notification_delete_group_by_priv_id', - 'notification_error_quark', - 'notification_free', - 'notification_free_list', - 'notification_get_all_count', - 'notification_get_all_count_for_uid', - 'notification_get_app_label', - 'notification_get_application', - 'notification_get_args', - 'notification_get_auto_remove', - 'notification_get_content', - 'notification_get_count', - 'notification_get_default_button', - 'notification_get_default_viewer', - 'notification_get_delete_timeout', - 'notification_get_detail_list', - 'notification_get_detail_list_for_uid', - 'notification_get_display_applist', - 'notification_get_dnd_and_allow_to_notify', - 'notification_get_event_flag', - 'notification_get_event_handler', - 'notification_get_execute_option', - 'notification_get_extension_data', - 'notification_get_extension_event_handler', - 'notification_get_extension_image_size', - 'notification_get_extention_data', - 'notification_get_grouping_list', - 'notification_get_hide_timeout', - 'notification_get_icon', - 'notification_get_id', - 'notification_get_image', - 'notification_get_insert_time', - 'notification_get_launch_option', - 'notification_get_layout', - 'notification_get_led', - 'notification_get_led_time_period', - 'notification_get_list', - 'notification_get_list_by_page', - 'notification_get_list_by_page_for_uid', - 'notification_get_list_for_uid', - 'notification_get_noti_block_state', - 'notification_get_ongoing_flag', - 'notification_get_ongoing_time', - 'notification_get_ongoing_value_type', - 'notification_get_pkgname', - 'notification_get_progress', - 'notification_get_property', - 'notification_get_size', - 'notification_get_sound', - 'notification_get_tag', - 'notification_get_text', - 'notification_get_text_domain', - 'notification_get_text_input_max_length', - 'notification_get_time', - 'notification_get_time_from_text', - 'notification_get_title', - 'notification_get_type', - 'notification_get_uid', - 'notification_get_vibration', - 'notification_insert', - 'notification_insert_for_uid', - 'notification_ipc_make_gvariant_from_dnd_allow_exception', - 'notification_ipc_make_gvariant_from_noti', - 'notification_ipc_make_gvariant_from_setting', - 'notification_ipc_make_gvariant_from_system_setting', - 'notification_ipc_make_noti_from_gvariant', - 'notification_ipc_make_setting_from_gvariant', - 'notification_ipc_make_system_setting_from_gvariant', - 'notification_ipc_socket_get_read_buf_size', - 'notification_ipc_socket_get_write_buf_size', - 'notification_ipc_socket_pair', - 'notification_ipc_socket_read', - 'notification_ipc_socket_write', - 'notification_ipc_socket_write_string', - 'notification_is_service_ready', - 'notification_launch_default_viewer', - 'notification_list_append', - 'notification_list_get_count', - 'notification_list_get_data', - 'notification_list_get_head', - 'notification_list_get_next', - 'notification_list_get_prev', - 'notification_list_get_tail', - 'notification_list_remove', - 'notification_load', - 'notification_load_by_tag', - 'notification_load_by_tag_for_uid', - 'notification_new', - 'notification_noti_add_template', - 'notification_noti_check_count_for_template', - 'notification_noti_check_limit', - 'notification_noti_check_tag', - 'notification_noti_delete_all', - 'notification_noti_delete_by_priv_id', - 'notification_noti_delete_by_priv_id_get_changes', - 'notification_noti_delete_template', - 'notification_noti_get_all_count', - 'notification_noti_get_by_priv_id', - 'notification_noti_get_by_tag', - 'notification_noti_get_count', - 'notification_noti_get_detail_list', - 'notification_noti_get_grouping_list', - 'notification_noti_get_package_template', - 'notification_noti_init_data', - 'notification_noti_insert', - 'notification_noti_update', - 'notification_ongoing_update_cb_set', - 'notification_ongoing_update_cb_unset', - 'notification_op_get_data', - 'notification_post', - 'notification_post_for_uid', - 'notification_post_with_event_cb', - 'notification_post_with_event_cb_for_uid', - 'notification_register_detailed_changed_cb', - 'notification_register_detailed_changed_cb_for_uid', - 'notification_register_system_setting_dnd_changed_cb', - 'notification_register_system_setting_dnd_changed_cb_for_uid', - 'notification_remove_button', - 'notification_remove_private_sharing', - 'notification_remove_private_sharing_target_id', - 'notification_resister_changed_cb', - 'notification_resister_changed_cb_for_uid', - 'notification_save_as_template', - 'notification_send_event', - 'notification_send_event_by_priv_id', - 'notification_set_app_id', - 'notification_set_app_label', - 'notification_set_application', - 'notification_set_args', - 'notification_set_auto_remove', - 'notification_set_content', - 'notification_set_default_button', - 'notification_set_delete_timeout', - 'notification_set_display_applist', - 'notification_set_event_handler', - 'notification_set_execute_option', - 'notification_set_extension_data', - 'notification_set_extension_event_handler', - 'notification_set_extension_image_size', - 'notification_set_extention_data', - 'notification_set_hide_timeout', - 'notification_set_icon', - 'notification_set_image', - 'notification_set_indirect_request', - 'notification_set_launch_option', - 'notification_set_layout', - 'notification_set_led', - 'notification_set_led_time_period', - 'notification_set_ongoing_flag', - 'notification_set_ongoing_time', - 'notification_set_ongoing_value_type', - 'notification_set_pkgname', - 'notification_set_private_sharing', - 'notification_set_priv_id', - 'notification_set_progress', - 'notification_set_property', - 'notification_set_size', - 'notification_set_sound', - 'notification_set_tag', - 'notification_set_text', - 'notification_set_text_domain', - 'notification_set_text_input', - 'notification_set_time', - 'notification_set_time_to_text', - 'notification_setting_db_update', - 'notification_setting_db_update_app_disabled', - 'notification_setting_db_update_do_not_disturb', - 'notification_setting_db_update_pkg_disabled', - 'notification_setting_db_update_system_setting', - 'notification_setting_delete_package_for_uid', - 'notification_setting_free_notification', - 'notification_setting_get_allow_to_notify', - 'notification_setting_get_app_disabled', - 'notification_setting_get_appid', - 'notification_setting_get_do_not_disturb_except', - 'notification_setting_get_lock_screen_content', - 'notification_setting_get_package_name', - 'notification_setting_get_pop_up_notification', - 'notification_setting_get_setting', - 'notification_setting_get_setting_array', - 'notification_setting_get_setting_array_for_uid', - 'notification_setting_get_setting_by_appid_for_uid', - 'notification_setting_get_setting_by_package_name', - 'notification_setting_get_visibility_class', - 'notification_setting_insert_package_for_uid', - 'notification_setting_refresh_setting_table', - 'notification_setting_set_allow_to_notify', - 'notification_setting_set_do_not_disturb_except', - 'notification_setting_set_lock_screen_content', - 'notification_setting_set_pop_up_notification', - 'notification_setting_set_visibility_class', - 'notification_setting_update_setting', - 'notification_setting_update_setting_for_uid', - 'notification_set_title', - 'notification_set_uid', - 'notification_set_vibration', - 'notification_status_message_post', - 'notification_status_monitor_message_cb_set', - 'notification_status_monitor_message_cb_unset', - 'notification_system_setting_dnd_schedule_get_day', - 'notification_system_setting_dnd_schedule_get_enabled', - 'notification_system_setting_dnd_schedule_get_end_time', - 'notification_system_setting_dnd_schedule_get_start_time', - 'notification_system_setting_dnd_schedule_set_day', - 'notification_system_setting_dnd_schedule_set_enabled', - 'notification_system_setting_dnd_schedule_set_end_time', - 'notification_system_setting_dnd_schedule_set_start_time', - 'notification_system_setting_free_system_setting', - 'notification_system_setting_get_dnd_allow_exceptions', - 'notification_system_setting_get_dnd_schedule_enabled_uid', - 'notification_system_setting_get_do_not_disturb', - 'notification_system_setting_get_lock_screen_content', - 'notification_system_setting_get_visibility_class', - 'notification_system_setting_init_system_setting_table', - 'notification_system_setting_load_dnd_allow_exception', - 'notification_system_setting_load_system_setting', - 'notification_system_setting_load_system_setting_for_uid', - 'notification_system_setting_set_dnd_allow_exceptions', - 'notification_system_setting_set_do_not_disturb', - 'notification_system_setting_set_lock_screen_content', - 'notification_system_setting_set_visibility_class', - 'notification_system_setting_update_dnd_allow_exception', - 'notification_system_setting_update_system_setting', - 'notification_system_setting_update_system_setting_for_uid', - 'notification_translate_localized_text', - 'notification_unregister_detailed_changed_cb', - 'notification_unregister_detailed_changed_cb_for_uid', - 'notification_unregister_system_setting_dnd_changed_cb', - 'notification_unregister_system_setting_dnd_changed_cb_for_uid', - 'notification_unresister_changed_cb', - 'notification_unresister_changed_cb_for_uid', - 'notification_update', - 'notification_update_async', - 'notification_update_async_for_uid', - 'notification_update_content', - 'notification_update_for_uid', - 'notification_update_progress', - 'notification_update_size', - 'notification_validate_private_sharing', - 'noti_setting_get_setting_array', - 'noti_setting_service_get_setting_by_app_id', - 'noti_system_setting_get_do_not_disturb', - 'noti_system_setting_load_system_setting', - ], - 'libcapi-appfw-package-manager.so.0': [ - 'package_archive_info_create', - 'package_archive_info_destroy', - 'package_archive_info_get_api_version', - 'package_archive_info_get_author', - 'package_archive_info_get_description', - 'package_archive_info_get_icon', - 'package_archive_info_get_label', - 'package_archive_info_get_package', - 'package_archive_info_get_type', - 'package_archive_info_get_version', - 'package_info_clone', - 'package_info_create', - 'package_info_destroy', - 'package_info_foreach_app_from_package', - 'package_info_foreach_cert_info', - 'package_info_foreach_privilege_info', - 'package_info_get_icon', - 'package_info_get_installed_storage', - 'package_info_get_installed_time', - 'package_info_get_label', - 'package_info_get_main_app_id', - 'package_info_get_package', - 'package_info_get_root_path', - 'package_info_get_tep_name', - 'package_info_get_type', - 'package_info_get_version', - 'package_info_is_accessible', - 'package_info_is_equal', - 'package_info_is_preload_package', - 'package_info_is_removable_package', - 'package_info_is_system_package', - 'package_info_updateinfo_create', - 'package_info_updateinfo_destroy', - 'package_info_updateinfo_foreach_info', - 'package_info_updateinfo_get_pkgid', - 'package_info_updateinfo_get_type', - 'package_info_updateinfo_get_version', - 'package_manager_clear_all_cache_dir', - 'package_manager_clear_cache_dir', - 'package_manager_clear_data_dir', - 'package_manager_compare_app_cert_info', - 'package_manager_compare_package_cert_info', - 'package_manager_create', - 'package_manager_destroy', - 'package_manager_drm_decrypt_package', - 'package_manager_drm_generate_license_request', - 'package_manager_drm_register_license', - 'package_manager_filter_add_bool', - 'package_manager_filter_count', - 'package_manager_filter_create', - 'package_manager_filter_destroy', - 'package_manager_filter_foreach_package_info', - 'package_manager_foreach_package_info', - 'package_manager_get_package_id_by_app_id', - 'package_manager_get_package_info', - 'package_manager_get_package_size_info', - 'package_manager_get_permission_type', - 'package_manager_get_total_package_size_info', - 'package_manager_is_preload_package_by_app_id', - 'package_manager_request_create', - 'package_manager_request_destroy', - 'package_manager_request_install', - 'package_manager_request_install_with_cb', - 'package_manager_request_mount_install', - 'package_manager_request_mount_install_with_cb', - 'package_manager_request_move', - 'package_manager_request_move_with_cb', - 'package_manager_request_set_event_cb', - 'package_manager_request_set_mode', - 'package_manager_request_set_tep', - 'package_manager_request_set_type', - 'package_manager_request_uninstall', - 'package_manager_request_uninstall_with_cb', - 'package_manager_request_unset_event_cb', - 'package_manager_set_event_cb', - 'package_manager_set_event_status', - 'package_manager_unset_event_cb', - 'package_manager_updateinfo_request_create', - 'package_manager_updateinfo_request_destroy', - 'package_manager_updateinfo_request_register', - 'package_manager_updateinfo_request_unregister', - 'package_manager_updateinfo_request_unregister_all', - 'package_manager_updateinfo_set_pkgid', - 'package_manager_updateinfo_set_type', - 'package_manager_updateinfo_set_version', - 'package_size_info_get_app_size', - 'package_size_info_get_cache_size', - 'package_size_info_get_data_size', - 'package_size_info_get_external_app_size', - 'package_size_info_get_external_cache_size', - 'package_size_info_get_external_data_size', - ], - 'librpc-port.so.1': [ - 'rpc_port_parcel_burst_read', - 'rpc_port_parcel_burst_write', - 'rpc_port_parcel_create', - 'rpc_port_parcel_create_from_port', - 'rpc_port_parcel_destroy', - 'rpc_port_parcel_read', - 'rpc_port_parcel_read_array_count', - 'rpc_port_parcel_read_bool', - 'rpc_port_parcel_read_bundle', - 'rpc_port_parcel_read_byte', - 'rpc_port_parcel_read_double', - 'rpc_port_parcel_read_float', - 'rpc_port_parcel_read_int16', - 'rpc_port_parcel_read_int32', - 'rpc_port_parcel_read_int64', - 'rpc_port_parcel_read_string', - 'rpc_port_parcel_send', - 'rpc_port_parcel_write', - 'rpc_port_parcel_write_array_count', - 'rpc_port_parcel_write_bool', - 'rpc_port_parcel_write_bundle', - 'rpc_port_parcel_write_byte', - 'rpc_port_parcel_write_double', - 'rpc_port_parcel_write_float', - 'rpc_port_parcel_write_int16', - 'rpc_port_parcel_write_int32', - 'rpc_port_parcel_write_int64', - 'rpc_port_parcel_write_string', - 'rpc_port_proxy_add_connected_event_cb', - 'rpc_port_proxy_add_disconnected_event_cb', - 'rpc_port_proxy_add_received_event_cb', - 'rpc_port_proxy_add_rejected_event_cb', - 'rpc_port_proxy_connect', - 'rpc_port_proxy_create', - 'rpc_port_proxy_create_mockup', - 'rpc_port_proxy_destroy', - 'rpc_port_proxy_get_port', - 'rpc_port_read', - 'rpc_port_stub_add_connected_event_cb', - 'rpc_port_stub_add_disconnected_event_cb', - 'rpc_port_stub_add_privilege', - 'rpc_port_stub_add_received_event_cb', - 'rpc_port_stub_create', - 'rpc_port_stub_create_mockup', - 'rpc_port_stub_destroy', - 'rpc_port_stub_get_port', - 'rpc_port_stub_listen', - 'rpc_port_stub_set_trusted', - 'rpc_port_write', - ], - 'libappcore-agent.so.1': [ - 'service_app_add_event_handler', - 'service_app_add_job_handler', - 'service_app_exit', - 'service_app_exit_without_restart', - 'service_app_job_finished', - 'service_app_job_raise', - 'service_app_main', - 'service_app_main_ext', - 'service_app_remove_event_handler', - 'service_app_remove_job_handler', - ], - 'libshortcut.so.0': [ - 'add_to_home_dynamicbox', - 'add_to_home_shortcut', - 'shortcut_add_to_home', - 'shortcut_add_to_home_sync', - 'shortcut_add_to_home_widget', - 'shortcut_add_to_home_widget_sync', - 'shortcut_db_get_list', - 'shortcut_db_init', - 'shortcut_error_quark', - 'shortcut_get_list', - 'shortcut_remove_from_home', - 'shortcut_remove_from_home_sync', - 'shortcut_set_remove_cb', - 'shortcut_set_request_cb', - 'shortcut_unset_remove_cb', - 'shortcut_unset_request_cb', - ], - 'libcapi-base-common.so.0': [ - 'get_error_message', - 'get_last_result', - 'set_last_result', - ], - 'libcapi-web-url-download.so.0': [ - 'download_add_http_header_field', - 'download_cancel', - 'download_create', - 'download_destroy', - 'download_get_auto_download', - 'download_get_content_name', - 'download_get_content_size', - 'download_get_destination', - 'download_get_downloaded_file_path', - 'download_get_error', - 'download_get_etag', - 'download_get_file_name', - 'download_get_http_header_field', - 'download_get_http_header_field_list', - 'download_get_http_status', - 'download_get_mime_type', - 'download_get_network_bonding', - 'download_get_network_type', - 'download_get_notification_app_control', - 'download_get_notification_description', - 'download_get_notification_title', - 'download_get_notification_type', - 'download_get_state', - 'download_get_temp_path', - 'download_get_url', - 'download_pause', - 'download_remove_http_header_field', - 'download_set_auto_download', - 'download_set_destination', - 'download_set_file_name', - 'download_set_network_bonding', - 'download_set_network_type', - 'download_set_notification_app_control', - 'download_set_notification_description', - 'download_set_notification_title', - 'download_set_notification_type', - 'download_set_progress_cb', - 'download_set_state_changed_cb', - 'download_set_temp_file_path', - 'download_set_url', - 'download_start', - 'download_unset_progress_cb', - 'download_unset_state_changed_cb', - ], - 'libcapi-content-mime-type.so.0': [ - 'mime_type_get_file_extension', - 'mime_type_get_mime_type', - 'mime_type_get_mime_type_for_data', - 'mime_type_get_mime_type_for_file', - ], - 'libcapi-content-media-content.so.0': [ - 'audio_meta_clone', - 'audio_meta_destroy', - 'audio_meta_get_album', - 'audio_meta_get_album_artist', - 'audio_meta_get_artist', - 'audio_meta_get_bitpersample', - 'audio_meta_get_bit_rate', - 'audio_meta_get_channel', - 'audio_meta_get_composer', - 'audio_meta_get_copyright', - 'audio_meta_get_duration', - 'audio_meta_get_genre', - 'audio_meta_get_media_id', - 'audio_meta_get_recorded_date', - 'audio_meta_get_sample_rate', - 'audio_meta_get_track_num', - 'audio_meta_get_year', - 'audio_meta_update_to_db', - 'image_meta_clone', - 'image_meta_destroy', - 'image_meta_get_burst_id', - 'image_meta_get_date_taken', - 'image_meta_get_exposure_time', - 'image_meta_get_fnumber', - 'image_meta_get_height', - 'image_meta_get_iso', - 'image_meta_get_media_id', - 'image_meta_get_model', - 'image_meta_get_orientation', - 'image_meta_get_width', - 'image_meta_is_burst_shot', - 'image_meta_set_orientation', - 'image_meta_update_to_db', - 'media_album_clone', - 'media_album_destroy', - 'media_album_foreach_album_from_db', - 'media_album_foreach_media_from_db', - 'media_album_get_album_art', - 'media_album_get_album_count_from_db', - 'media_album_get_album_from_db', - 'media_album_get_album_id', - 'media_album_get_artist', - 'media_album_get_media_count_from_db', - 'media_album_get_name', - 'media_bookmark_clone', - 'media_bookmark_create', - 'media_bookmark_delete_from_db', - 'media_bookmark_destroy', - 'media_bookmark_foreach_bookmark_from_db', - 'media_bookmark_get_bookmark_count_from_db', - 'media_bookmark_get_bookmark_id', - 'media_bookmark_get_marked_time', - 'media_bookmark_get_name', - 'media_bookmark_get_thumbnail_path', - 'media_bookmark_insert_to_db', - 'media_bookmark_insert_to_db_v2', - 'media_bookmark_set_name', - 'media_bookmark_set_thumbnail_path', - 'media_bookmark_update_to_db', - 'media_content_add_db_updated_cb', - 'media_content_cancel_scan_folder', - 'media_content_connect', - 'media_content_connect_with_uid', - 'media_content_disconnect', - 'media_content_remove_db_updated_cb', - 'media_content_scan_file', - 'media_content_scan_folder', - 'media_face_clone', - 'media_face_create', - 'media_face_delete_from_db', - 'media_face_destroy', - 'media_face_foreach_face_from_db', - 'media_face_get_face_count_from_db', - 'media_face_get_face_id', - 'media_face_get_face_rect', - 'media_face_get_media_id', - 'media_face_get_orientation', - 'media_face_get_tag', - 'media_face_insert_to_db', - 'media_face_set_face_rect', - 'media_face_set_orientation', - 'media_face_set_tag', - 'media_face_update_to_db', - 'media_filter_create', - 'media_filter_destroy', - 'media_filter_get_condition', - 'media_filter_get_condition_v2', - 'media_filter_get_offset', - 'media_filter_get_order', - 'media_filter_get_order_v2', - 'media_filter_get_storage', - 'media_filter_set_condition', - 'media_filter_set_condition_v2', - 'media_filter_set_offset', - 'media_filter_set_order', - 'media_filter_set_order_v2', - 'media_filter_set_storage', - 'media_folder_clone', - 'media_folder_destroy', - 'media_folder_foreach_folder_from_db', - 'media_folder_foreach_media_from_db', - 'media_folder_get_folder_count_from_db', - 'media_folder_get_folder_from_db', - 'media_folder_get_folder_id', - 'media_folder_get_media_count_from_db', - 'media_folder_get_modified_time', - 'media_folder_get_name', - 'media_folder_get_order', - 'media_folder_get_parent_folder_id', - 'media_folder_get_path', - 'media_folder_get_storage_id', - 'media_folder_get_storage_type', - 'media_folder_set_name', - 'media_folder_set_order', - 'media_folder_update_to_db', - 'media_group_foreach_group_from_db', - 'media_group_foreach_media_from_db', - 'media_group_get_group_count_from_db', - 'media_group_get_media_count_from_db', - 'media_info_cancel_face_detection', - 'media_info_cancel_thumbnail', - 'media_info_clone', - 'media_info_create', - 'media_info_create_thumbnail', - 'media_info_delete_batch_from_db', - 'media_info_delete_from_db', - 'media_info_destroy', - 'media_info_foreach_bookmark_from_db', - 'media_info_foreach_face_from_db', - 'media_info_foreach_media_from_db', - 'media_info_foreach_tag_from_db', - 'media_info_generate_thumbnail', - 'media_info_get_added_time', - 'media_info_get_age_rating', - 'media_info_get_altitude', - 'media_info_get_audio', - 'media_info_get_author', - 'media_info_get_bookmark_count_from_db', - 'media_info_get_category', - 'media_info_get_content_name', - 'media_info_get_description', - 'media_info_get_display_name', - 'media_info_get_face_count_from_db', - 'media_info_get_favorite', - 'media_info_get_file_path', - 'media_info_get_image', - 'media_info_get_keyword', - 'media_info_get_latitude', - 'media_info_get_location_tag', - 'media_info_get_longitude', - 'media_info_get_media_count_from_db', - 'media_info_get_media_from_db', - 'media_info_get_media_id', - 'media_info_get_media_type', - 'media_info_get_mime_type', - 'media_info_get_modified_time', - 'media_info_get_played_count', - 'media_info_get_played_time', - 'media_info_get_provider', - 'media_info_get_rating', - 'media_info_get_size', - 'media_info_get_storage_id', - 'media_info_get_storage_type', - 'media_info_get_tag_count_from_db', - 'media_info_get_thumbnail_path', - 'media_info_get_timeline', - 'media_info_get_title', - 'media_info_get_video', - 'media_info_get_weather', - 'media_info_increase_played_count', - 'media_info_insert_batch_to_db', - 'media_info_insert_burst_shot_to_db', - 'media_info_insert_to_db', - 'media_info_insert_to_db_with_data', - 'media_info_is_360_content', - 'media_info_is_drm', - 'media_info_move_to_db', - 'media_info_refresh_metadata_to_db', - 'media_info_set_added_time', - 'media_info_set_age_rating', - 'media_info_set_album', - 'media_info_set_altitude', - 'media_info_set_artist', - 'media_info_set_author', - 'media_info_set_category', - 'media_info_set_content_name', - 'media_info_set_description', - 'media_info_set_display_name', - 'media_info_set_favorite', - 'media_info_set_genre', - 'media_info_set_keyword', - 'media_info_set_latitude', - 'media_info_set_location_tag', - 'media_info_set_longitude', - 'media_info_set_played_time', - 'media_info_set_provider', - 'media_info_set_rating', - 'media_info_set_recorded_date', - 'media_info_set_title', - 'media_info_set_weather', - 'media_info_start_face_detection', - 'media_info_update_to_db', - 'media_playlist_add_media', - 'media_playlist_clone', - 'media_playlist_create', - 'media_playlist_delete_from_db', - 'media_playlist_destroy', - 'media_playlist_export_to_file', - 'media_playlist_foreach_media_from_db', - 'media_playlist_foreach_playlist_from_db', - 'media_playlist_get_media_count_from_db', - 'media_playlist_get_name', - 'media_playlist_get_playlist_count_from_db', - 'media_playlist_get_playlist_from_db', - 'media_playlist_get_playlist_id', - 'media_playlist_get_play_order', - 'media_playlist_get_play_order_v2', - 'media_playlist_get_thumbnail_path', - 'media_playlist_import_from_file', - 'media_playlist_insert_to_db', - 'media_playlist_insert_to_db_v2', - 'media_playlist_remove_media', - 'media_playlist_set_name', - 'media_playlist_set_play_order', - 'media_playlist_set_thumbnail_path', - 'media_playlist_update_to_db', - 'media_playlist_update_to_db_v2', - 'media_storage_clone', - 'media_storage_destroy', - 'media_storage_foreach_media_from_db', - 'media_storage_foreach_storage_from_db', - 'media_storage_get_id', - 'media_storage_get_media_count_from_db', - 'media_storage_get_name', - 'media_storage_get_path', - 'media_storage_get_storage_count_from_db', - 'media_storage_get_storage_info_from_db', - 'media_storage_get_type', - 'media_tag_add_media', - 'media_tag_clone', - 'media_tag_create', - 'media_tag_delete_from_db', - 'media_tag_destroy', - 'media_tag_foreach_media_from_db', - 'media_tag_foreach_tag_from_db', - 'media_tag_get_media_count_from_db', - 'media_tag_get_name', - 'media_tag_get_tag_count_from_db', - 'media_tag_get_tag_from_db', - 'media_tag_get_tag_id', - 'media_tag_insert_to_db', - 'media_tag_insert_to_db_v2', - 'media_tag_remove_media', - 'media_tag_set_name', - 'media_tag_update_to_db', - 'media_tag_update_to_db_v2', - 'video_meta_clone', - 'video_meta_destroy', - 'video_meta_get_album', - 'video_meta_get_album_artist', - 'video_meta_get_artist', - 'video_meta_get_bit_rate', - 'video_meta_get_composer', - 'video_meta_get_copyright', - 'video_meta_get_duration', - 'video_meta_get_genre', - 'video_meta_get_height', - 'video_meta_get_media_id', - 'video_meta_get_recorded_date', - 'video_meta_get_rotation', - 'video_meta_get_track_num', - 'video_meta_get_width', - 'video_meta_get_year', - 'video_meta_update_to_db', - ], - 'libcapi-context-motion.so.2': [ - 'activity_create', - 'activity_get_accuracy', - 'activity_is_supported', - 'activity_release', - 'activity_start_recognition', - 'activity_stop_recognition', - 'gesture_create', - 'gesture_get_event', - 'gesture_get_tilt', - 'gesture_is_supported', - 'gesture_release', - 'gesture_start_recognition', - 'gesture_stop_recognition', - ], - 'libcapi-context.so.1': [ - 'context_history_create', - 'context_history_destroy', - 'context_history_filter_create', - 'context_history_filter_destroy', - 'context_history_filter_set_int', - 'context_history_filter_set_string', - 'context_history_get_list', - 'context_history_is_supported', - 'context_history_list_destroy', - 'context_history_list_get_count', - 'context_history_list_get_current', - 'context_history_list_move_first', - 'context_history_list_move_next', - 'context_history_record_destroy', - 'context_history_record_get_double', - 'context_history_record_get_int', - 'context_history_record_get_string', - 'context_trigger_add_rule', - 'context_trigger_custom_publish', - 'context_trigger_custom_register', - 'context_trigger_custom_unregister', - 'context_trigger_disable_rule', - 'context_trigger_enable_rule', - 'context_trigger_get_own_rule_ids', - 'context_trigger_get_rule_by_id', - 'context_trigger_remove_rule', - 'context_trigger_rule_add_entry', - 'context_trigger_rule_condition_create', - 'context_trigger_rule_condition_is_supported', - 'context_trigger_rule_create', - 'context_trigger_rule_custom_condition_create', - 'context_trigger_rule_custom_event_create', - 'context_trigger_rule_destroy', - 'context_trigger_rule_entry_add_comparison', - 'context_trigger_rule_entry_add_comparison_int', - 'context_trigger_rule_entry_add_comparison_string', - 'context_trigger_rule_entry_add_key', - 'context_trigger_rule_entry_add_option', - 'context_trigger_rule_entry_add_option_int', - 'context_trigger_rule_entry_add_option_string', - 'context_trigger_rule_entry_destroy', - 'context_trigger_rule_event_create', - 'context_trigger_rule_event_is_supported', - 'context_trigger_rule_get_description', - 'context_trigger_rule_set_action_app_control', - 'context_trigger_rule_set_action_notification', - 'context_trigger_rule_set_description', - ], - 'libcapi-geofence-manager.so.0': [ - 'geofence_create_bluetooth', - 'geofence_create_geopoint', - 'geofence_create_wifi', - 'geofence_destroy', - 'geofence_get_address', - 'geofence_get_bssid', - 'geofence_get_latitude', - 'geofence_get_longitude', - 'geofence_get_place_id', - 'geofence_get_radius', - 'geofence_get_ssid', - 'geofence_get_type', - 'geofence_manager_add_fence', - 'geofence_manager_add_place', - 'geofence_manager_create', - 'geofence_manager_destroy', - 'geofence_manager_foreach_geofence_list', - 'geofence_manager_foreach_place_geofence_list', - 'geofence_manager_foreach_place_list', - 'geofence_manager_get_place_name', - 'geofence_manager_is_supported', - 'geofence_manager_remove_fence', - 'geofence_manager_remove_place', - 'geofence_manager_set_geofence_event_cb', - 'geofence_manager_set_geofence_proximity_state_changed_cb', - 'geofence_manager_set_geofence_state_changed_cb', - 'geofence_manager_start', - 'geofence_manager_stop', - 'geofence_manager_unset_geofence_event_cb', - 'geofence_manager_unset_geofence_proximity_state_changed_cb', - 'geofence_manager_unset_geofence_state_changed_cb', - 'geofence_manager_update_place', - 'geofence_status_create', - 'geofence_status_destroy', - 'geofence_status_get_duration', - 'geofence_status_get_state', - ], - 'libcapi-location-manager.so.0': [ - 'gps_status_foreach_last_satellites_in_view', - 'gps_status_foreach_satellites_in_view', - 'gps_status_get_last_satellite', - 'gps_status_get_nmea', - 'gps_status_get_satellite', - 'gps_status_set_satellite_updated_cb', - 'gps_status_unset_satellite_updated_cb', - 'location_bounds_contains_coordinates', - 'location_bounds_create_circle', - 'location_bounds_create_polygon', - 'location_bounds_create_rect', - 'location_bounds_destroy', - 'location_bounds_foreach_polygon_coords', - 'location_bounds_get_circle_coords', - 'location_bounds_get_rect_coords', - 'location_bounds_get_type', - 'location_bounds_set_state_changed_cb', - 'location_bounds_unset_state_changed_cb', - 'location_manager_add_boundary', - 'location_manager_clear_mock_location', - 'location_manager_create', - 'location_manager_destroy', - 'location_manager_enable_method', - 'location_manager_enable_mock_location', - 'location_manager_enable_restriction', - 'location_manager_foreach_boundary', - 'location_manager_foreach_location_batch', - 'location_manager_get_accessibility_state', - 'location_manager_get_accuracy', - 'location_manager_get_distance', - 'location_manager_get_last_accuracy', - 'location_manager_get_last_location', - 'location_manager_get_last_position', - 'location_manager_get_last_velocity', - 'location_manager_get_location', - 'location_manager_get_method', - 'location_manager_get_position', - 'location_manager_get_velocity', - 'location_manager_is_enabled_method', - 'location_manager_is_enabled_mock_location', - 'location_manager_is_supported_method', - 'location_manager_remove_boundary', - 'location_manager_request_single_location', - 'location_manager_set_distance_based_location_changed_cb', - 'location_manager_set_fused_mode', - 'location_manager_set_location_batch_cb', - 'location_manager_set_location_changed_cb', - 'location_manager_set_mock_location', - 'location_manager_set_position_updated_cb', - 'location_manager_set_service_state_changed_cb', - 'location_manager_set_setting_changed_cb', - 'location_manager_set_velocity_updated_cb', - 'location_manager_set_zone_changed_cb', - 'location_manager_start', - 'location_manager_start_batch', - 'location_manager_stop', - 'location_manager_stop_batch', - 'location_manager_unset_distance_based_location_changed_cb', - 'location_manager_unset_location_batch_cb', - 'location_manager_unset_location_changed_cb', - 'location_manager_unset_position_updated_cb', - 'location_manager_unset_service_state_changed_cb', - 'location_manager_unset_setting_changed_cb', - 'location_manager_unset_velocity_updated_cb', - 'location_manager_unset_zone_changed_cb', - ], - 'libcapi-messaging-email.so.0': [ - 'email_add_attach', - 'email_add_recipient', - 'email_create_message', - 'email_destroy_message', - 'email_remove_all_attachments', - 'email_remove_all_recipients', - 'email_save_message', - 'email_send_message', - 'email_set_body', - 'email_set_message_sent_cb', - 'email_set_subject', - 'email_unset_message_sent_cb', - ], - 'libpush.so.0': [ - 'push_connect', - 'push_deregister', - 'push_deregister_dbus_call_info', - 'push_disconnect', - 'push_free_notification', - 'push_get_notification_data', - 'push_get_notification_message', - 'push_get_notification_request_id', - 'push_get_notification_sender', - 'push_get_notification_session_info', - 'push_get_notification_time', - 'push_get_notification_type', - 'push_get_notification_using_token', - 'push_get_registration_id', - 'push_get_unread_notification', - 'push_register', - 'push_register_dbus_call_info', - 'push_request_unread_notification', - 'push_service_app_control_to_noti_data', - 'push_service_app_control_to_notification', - 'push_service_connect', - 'push_service_deregister', - 'push_service_disconnect', - 'push_service_free_notification', - 'push_service_get_notification_data', - 'push_service_get_notification_message', - 'push_service_get_notification_request_id', - 'push_service_get_notification_sender', - 'push_service_get_notification_session_info', - 'push_service_get_notification_time', - 'push_service_get_notification_type', - 'push_service_get_registration_id', - 'push_service_get_unread_notification', - 'push_service_register', - 'push_service_request_unread_notification', - 'push_tool_ping_change', - 'push_tool_pv_ip_change', - ], - 'libcapi-media-audio-io.so.0': [ - 'audio_in_create', - 'audio_in_destroy', - 'audio_in_drop', - 'audio_in_flush', - 'audio_in_get_buffer_size', - 'audio_in_get_channel', - 'audio_in_get_sample_rate', - 'audio_in_get_sample_type', - 'audio_in_pause', - 'audio_in_peek', - 'audio_in_prepare', - 'audio_in_read', - 'audio_in_resume', - 'audio_in_set_sound_stream_info', - 'audio_in_set_state_changed_cb', - 'audio_in_set_stream_cb', - 'audio_in_unprepare', - 'audio_in_unset_state_changed_cb', - 'audio_in_unset_stream_cb', - 'audio_out_create_new', - 'audio_out_destroy', - 'audio_out_drain', - 'audio_out_flush', - 'audio_out_get_buffer_size', - 'audio_out_get_channel', - 'audio_out_get_sample_rate', - 'audio_out_get_sample_type', - 'audio_out_get_sound_type', - 'audio_out_pause', - 'audio_out_prepare', - 'audio_out_resume', - 'audio_out_set_sound_stream_info', - 'audio_out_set_state_changed_cb', - 'audio_out_set_stream_cb', - 'audio_out_unprepare', - 'audio_out_unset_state_changed_cb', - 'audio_out_unset_stream_cb', - 'audio_out_write', - 'cpp_audio_in_create', - 'cpp_audio_in_destroy', - 'cpp_audio_in_drain', - 'cpp_audio_in_drop', - 'cpp_audio_in_flush', - 'cpp_audio_in_get_buffer_size', - 'cpp_audio_in_get_channel', - 'cpp_audio_in_get_sample_rate', - 'cpp_audio_in_get_sample_type', - 'cpp_audio_in_pause', - 'cpp_audio_in_peek', - 'cpp_audio_in_prepare', - 'cpp_audio_in_read', - 'cpp_audio_in_resume', - 'cpp_audio_in_set_sound_stream_info', - 'cpp_audio_in_set_state_changed_cb', - 'cpp_audio_in_set_stream_cb', - 'cpp_audio_in_unprepare', - 'cpp_audio_in_unset_state_changed_cb', - 'cpp_audio_in_unset_stream_cb', - 'cpp_audio_out_create_new', - 'cpp_audio_out_destroy', - 'cpp_audio_out_drain', - 'cpp_audio_out_flush', - 'cpp_audio_out_get_buffer_size', - 'cpp_audio_out_get_channel', - 'cpp_audio_out_get_sample_rate', - 'cpp_audio_out_get_sample_type', - 'cpp_audio_out_get_sound_type', - 'cpp_audio_out_pause', - 'cpp_audio_out_prepare', - 'cpp_audio_out_resume', - 'cpp_audio_out_set_sound_stream_info', - 'cpp_audio_out_set_state_changed_cb', - 'cpp_audio_out_set_stream_cb', - 'cpp_audio_out_unprepare', - 'cpp_audio_out_unset_state_changed_cb', - 'cpp_audio_out_unset_stream_cb', - 'cpp_audio_out_write', - ], - 'libcapi-media-camera.so.0': [ - 'camera_add_device_state_changed_cb', - 'camera_attr_clear_af_area', - 'camera_attr_disable_shutter_sound', - 'camera_attr_enable_anti_shake', - 'camera_attr_enable_auto_contrast', - 'camera_attr_enable_tag', - 'camera_attr_enable_video_stabilization', - 'camera_attr_foreach_supported_af_mode', - 'camera_attr_foreach_supported_effect', - 'camera_attr_foreach_supported_exposure_mode', - 'camera_attr_foreach_supported_flash_mode', - 'camera_attr_foreach_supported_fps', - 'camera_attr_foreach_supported_fps_by_resolution', - 'camera_attr_foreach_supported_iso', - 'camera_attr_foreach_supported_ptz_type', - 'camera_attr_foreach_supported_scene_mode', - 'camera_attr_foreach_supported_stream_flip', - 'camera_attr_foreach_supported_stream_rotation', - 'camera_attr_foreach_supported_theater_mode', - 'camera_attr_foreach_supported_whitebalance', - 'camera_attr_get_af_mode', - 'camera_attr_get_brightness', - 'camera_attr_get_brightness_range', - 'camera_attr_get_contrast', - 'camera_attr_get_contrast_range', - 'camera_attr_get_display_roi_area', - 'camera_attr_get_effect', - 'camera_attr_get_encoded_preview_bitrate', - 'camera_attr_get_encoded_preview_gop_interval', - 'camera_attr_get_exposure', - 'camera_attr_get_exposure_mode', - 'camera_attr_get_exposure_range', - 'camera_attr_get_flash_mode', - 'camera_attr_get_geotag', - 'camera_attr_get_hdr_mode', - 'camera_attr_get_hue', - 'camera_attr_get_hue_range', - 'camera_attr_get_image_quality', - 'camera_attr_get_iso', - 'camera_attr_get_lens_orientation', - 'camera_attr_get_pan', - 'camera_attr_get_pan_range', - 'camera_attr_get_preview_fps', - 'camera_attr_get_scene_mode', - 'camera_attr_get_stream_flip', - 'camera_attr_get_stream_rotation', - 'camera_attr_get_tag_image_description', - 'camera_attr_get_tag_orientation', - 'camera_attr_get_tag_software', - 'camera_attr_get_theater_mode', - 'camera_attr_get_tilt', - 'camera_attr_get_tilt_range', - 'camera_attr_get_whitebalance', - 'camera_attr_get_zoom', - 'camera_attr_get_zoom_range', - 'camera_attr_is_enabled_anti_shake', - 'camera_attr_is_enabled_auto_contrast', - 'camera_attr_is_enabled_tag', - 'camera_attr_is_enabled_video_stabilization', - 'camera_attr_is_supported_anti_shake', - 'camera_attr_is_supported_auto_contrast', - 'camera_attr_is_supported_hdr_capture', - 'camera_attr_is_supported_video_stabilization', - 'camera_attr_remove_geotag', - 'camera_attr_set_af_area', - 'camera_attr_set_af_mode', - 'camera_attr_set_brightness', - 'camera_attr_set_contrast', - 'camera_attr_set_display_roi_area', - 'camera_attr_set_effect', - 'camera_attr_set_encoded_preview_bitrate', - 'camera_attr_set_encoded_preview_gop_interval', - 'camera_attr_set_exposure', - 'camera_attr_set_exposure_mode', - 'camera_attr_set_flash_mode', - 'camera_attr_set_geotag', - 'camera_attr_set_hdr_capture_progress_cb', - 'camera_attr_set_hdr_mode', - 'camera_attr_set_hue', - 'camera_attr_set_image_quality', - 'camera_attr_set_iso', - 'camera_attr_set_pan', - 'camera_attr_set_preview_fps', - 'camera_attr_set_ptz_type', - 'camera_attr_set_scene_mode', - 'camera_attr_set_stream_flip', - 'camera_attr_set_stream_rotation', - 'camera_attr_set_tag_image_description', - 'camera_attr_set_tag_orientation', - 'camera_attr_set_tag_software', - 'camera_attr_set_theater_mode', - 'camera_attr_set_tilt', - 'camera_attr_set_whitebalance', - 'camera_attr_set_zoom', - 'camera_attr_unset_hdr_capture_progress_cb', - 'camera_cancel_focusing', - 'camera_change_device', - 'camera_create', - 'camera_destroy', - 'camera_foreach_supported_capture_format', - 'camera_foreach_supported_capture_resolution', - 'camera_foreach_supported_preview_format', - 'camera_foreach_supported_preview_resolution', - 'camera_get_capture_format', - 'camera_get_capture_resolution', - 'camera_get_device_count', - 'camera_get_device_state', - 'camera_get_display_flip', - 'camera_get_display_mode', - 'camera_get_display_reuse_hint', - 'camera_get_display_rotation', - 'camera_get_facing_direction', - 'camera_get_flash_state', - 'camera_get_preview_format', - 'camera_get_preview_resolution', - 'camera_get_recommended_preview_resolution', - 'camera_get_state', - 'camera_is_display_visible', - 'camera_is_supported_continuous_capture', - 'camera_is_supported_face_detection', - 'camera_is_supported_media_packet_preview_cb', - 'camera_is_supported_zero_shutter_lag', - 'camera_remove_device_state_changed_cb', - 'camera_set_capture_format', - 'camera_set_capture_resolution', - 'camera_set_display', - 'camera_set_display_flip', - 'camera_set_display_mode', - 'camera_set_display_reuse_hint', - 'camera_set_display_rotation', - 'camera_set_display_visible', - 'camera_set_error_cb', - 'camera_set_focus_changed_cb', - 'camera_set_interrupted_cb', - 'camera_set_interrupt_started_cb', - 'camera_set_media_packet_preview_cb', - 'camera_set_preview_cb', - 'camera_set_preview_format', - 'camera_set_preview_resolution', - 'camera_set_state_changed_cb', - 'camera_start_capture', - 'camera_start_continuous_capture', - 'camera_start_evas_rendering', - 'camera_start_face_detection', - 'camera_start_focusing', - 'camera_start_preview', - 'camera_stop_continuous_capture', - 'camera_stop_evas_rendering', - 'camera_stop_face_detection', - 'camera_stop_preview', - 'camera_unset_error_cb', - 'camera_unset_focus_changed_cb', - 'camera_unset_interrupted_cb', - 'camera_unset_interrupt_started_cb', - 'camera_unset_media_packet_preview_cb', - 'camera_unset_preview_cb', - 'camera_unset_state_changed_cb', - ], - 'libcapi-media-image-util.so.0': [ - 'convert_type_of_colorspace', - 'convert_type_of_colorspace_with_image_type', - 'get_number_of_colorspace', - 'image_util_calculate_buffer_size', - 'image_util_convert_colorspace', - 'image_util_crop', - 'image_util_decode_create', - 'image_util_decode_destroy', - 'image_util_decode_run', - 'image_util_decode_run_async', - 'image_util_decode_set_colorspace', - 'image_util_decode_set_input_buffer', - 'image_util_decode_set_input_path', - 'image_util_decode_set_jpeg_downscale', - 'image_util_decode_set_output_buffer', - 'image_util_encode_add_frame', - 'image_util_encode_create', - 'image_util_encode_destroy', - 'image_util_encode_run', - 'image_util_encode_run_async', - 'image_util_encode_save', - 'image_util_encode_set_colorspace', - 'image_util_encode_set_gif_frame_delay_time', - 'image_util_encode_set_input_buffer', - 'image_util_encode_set_output_buffer', - 'image_util_encode_set_output_path', - 'image_util_encode_set_png_compression', - 'image_util_encode_set_quality', - 'image_util_encode_set_resolution', - 'image_util_extract_color_from_memory', - 'image_util_foreach_supported_colorspace', - 'image_util_frame_create', - 'image_util_frame_destroy', - 'image_util_frame_set_frame', - 'image_util_frame_set_gif_delay', - 'image_util_frame_set_resolution', - 'image_util_resize', - 'image_util_rotate', - 'image_util_transform_create', - 'image_util_transform_destroy', - 'image_util_transform_get_colorspace', - 'image_util_transform_get_crop_area', - 'image_util_transform_get_resolution', - 'image_util_transform_get_rotation', - 'image_util_transform_run', - 'image_util_transform_set_colorspace', - 'image_util_transform_set_crop_area', - 'image_util_transform_set_hardware_acceleration', - 'image_util_transform_set_resolution', - 'image_util_transform_set_rotation', - 'is_supported_colorspace', - 'is_valid_colorspace', - ], - 'libcapi-media-codec.so.0': [ - 'codec_type_to_simple_enumeration', - 'mc_async_queue_disable', - 'mc_async_queue_enable', - 'mc_async_queue_flush', - 'mc_async_queue_free', - 'mc_async_queue_is_empty', - 'mc_async_queue_new', - 'mc_async_queue_pop', - 'mc_async_queue_pop_forced', - 'mc_async_queue_push', - 'mc_byte_align', - 'mc_configure', - 'mc_create', - 'mc_destroy', - 'mc_flush_buffers', - 'mc_get_output', - 'mc_get_packet_pool', - 'mc_get_supported_type', - 'mc_gst_core_free', - 'mc_gst_core_new', - 'mc_gst_flush_buffers', - 'mc_gst_get_output', - 'mc_gst_get_packet_pool', - 'mc_gst_port_free', - 'mc_gst_port_new', - 'mc_gst_prepare', - 'mc_gst_process_input', - 'mc_gst_unprepare', - 'mc_hex_dump', - 'mc_ini_load', - 'mc_init_bits', - 'mc_prepare', - 'mc_process_input', - 'mc_read_bits', - 'mc_sem_down', - 'mc_sem_free', - 'mc_sem_new', - 'mc_sem_up', - 'mc_set_adec_info', - 'mc_set_aenc_info', - 'mc_set_buffer_status_cb', - 'mc_set_codec', - 'mc_set_empty_buffer_cb', - 'mc_set_eos_cb', - 'mc_set_error_cb', - 'mc_set_fill_buffer_cb', - 'mc_set_supported_codec_cb', - 'mc_set_vdec_info', - 'mc_set_venc_info', - 'mc_show_bits', - 'mc_unprepare', - 'mc_unset_buffer_status_cb', - 'mc_unset_empty_buffer_cb', - 'mc_unset_eos_cb', - 'mc_unset_error_cb', - 'mc_unset_fill_buffer_cb', - 'mediacodec_configure_from_media_format', - 'mediacodec_create', - 'mediacodec_destroy', - 'mediacodec_flush_buffers', - 'mediacodec_foreach_supported_codec', - 'mediacodec_foreach_supported_codec_static', - 'mediacodec_get_output', - 'mediacodec_get_packet_pool', - 'mediacodec_get_supported_type', - 'mediacodec_prepare', - 'mediacodec_process_input', - 'mediacodec_set_adec_info', - 'mediacodec_set_aenc_info', - 'mediacodec_set_buffer_status_cb', - 'mediacodec_set_codec', - 'mediacodec_set_eos_cb', - 'mediacodec_set_error_cb', - 'mediacodec_set_input_buffer_used_cb', - 'mediacodec_set_output_buffer_available_cb', - 'mediacodec_set_vdec_info', - 'mediacodec_set_venc_info', - 'mediacodec_unprepare', - 'mediacodec_unset_buffer_status_cb', - 'mediacodec_unset_eos_cb', - 'mediacodec_unset_error_cb', - 'mediacodec_unset_input_buffer_used_cb', - 'mediacodec_unset_output_buffer_available_cb', - 'simple_to_codec_type_enumeration', - ], - 'libcapi-media-controller.so.0': [ - 'mc_client_create', - 'mc_client_destroy', - 'mc_client_destroy_metadata', - 'mc_client_destroy_playback', - 'mc_client_foreach_server', - 'mc_client_foreach_server_playlist', - 'mc_client_foreach_server_subscribed', - 'mc_client_get_age_rating', - 'mc_client_get_latest_server_info', - 'mc_client_get_metadata', - 'mc_client_get_playback_content_type', - 'mc_client_get_playback_position', - 'mc_client_get_playback_state', - 'mc_client_get_playlist_item_index', - 'mc_client_get_playlist_item_info', - 'mc_client_get_server_icon', - 'mc_client_get_server_metadata', - 'mc_client_get_server_playback_ability', - 'mc_client_get_server_playback_info', - 'mc_client_get_server_repeat_ability_support', - 'mc_client_get_server_repeat_mode', - 'mc_client_get_server_shuffle_ability_support', - 'mc_client_get_server_shuffle_mode', - 'mc_client_send_custom_cmd', - 'mc_client_send_custom_command', - 'mc_client_send_event_reply', - 'mc_client_send_playback_action_cmd', - 'mc_client_send_playback_position_cmd', - 'mc_client_send_playback_state_command', - 'mc_client_send_playlist_cmd', - 'mc_client_send_repeat_mode_cmd', - 'mc_client_send_search_cmd', - 'mc_client_send_shuffle_mode_cmd', - 'mc_client_set_cmd_reply_received_cb', - 'mc_client_set_custom_event_received_cb', - 'mc_client_set_metadata_update_cb', - 'mc_client_set_metadata_updated_cb', - 'mc_client_set_playback_ability_updated_cb', - 'mc_client_set_playback_update_cb', - 'mc_client_set_playback_updated_cb', - 'mc_client_set_playlist_updated_cb', - 'mc_client_set_repeat_ability_updated_cb', - 'mc_client_set_repeat_mode_update_cb', - 'mc_client_set_repeat_mode_updated_cb', - 'mc_client_set_server_update_cb', - 'mc_client_set_server_updated_cb', - 'mc_client_set_shuffle_ability_updated_cb', - 'mc_client_set_shuffle_mode_update_cb', - 'mc_client_set_shuffle_mode_updated_cb', - 'mc_client_subscribe', - 'mc_client_unset_cmd_reply_received_cb', - 'mc_client_unset_custom_event_received_cb', - 'mc_client_unset_metadata_update_cb', - 'mc_client_unset_metadata_updated_cb', - 'mc_client_unset_playback_ability_updated_cb', - 'mc_client_unset_playback_update_cb', - 'mc_client_unset_playback_updated_cb', - 'mc_client_unset_playlist_updated_cb', - 'mc_client_unset_repeat_ability_updated_cb', - 'mc_client_unset_repeat_mode_update_cb', - 'mc_client_unset_repeat_mode_updated_cb', - 'mc_client_unset_server_update_cb', - 'mc_client_unset_server_updated_cb', - 'mc_client_unset_shuffle_ability_updated_cb', - 'mc_client_unset_shuffle_mode_update_cb', - 'mc_client_unset_shuffle_mode_updated_cb', - 'mc_client_unsubscribe', - 'mc_db_check_client_table_exist', - 'mc_db_check_server_table_exist', - 'mc_db_connect', - 'mc_db_create_server_table', - 'mc_db_delete_client_address_from_client_list', - 'mc_db_delete_server_address_from_server_list', - 'mc_db_delete_server_table', - 'mc_db_disconnect', - 'mc_db_foreach_client_list', - 'mc_db_foreach_server_list', - 'mc_db_get_ability_supported', - 'mc_db_get_foreach_playlist', - 'mc_db_get_icon_uri', - 'mc_db_get_latest_server_name', - 'mc_db_get_metadata_info', - 'mc_db_get_pb_action_ability', - 'mc_db_get_playback_info', - 'mc_db_get_playlist_by_name', - 'mc_db_get_playlist_item', - 'mc_db_get_repeat_mode', - 'mc_db_get_server_state', - 'mc_db_get_shuffle_mode', - 'mc_db_insert_client_address_into_client_list', - 'mc_db_insert_server_address_into_server_list', - 'mc_db_remove_playlist', - 'mc_db_update_ability_supported', - 'mc_db_update_icon_uri', - 'mc_db_update_latest_server_table', - 'mc_db_update_playback_info', - 'mc_db_update_playlist', - 'mc_db_update_repeat_mode', - 'mc_db_update_server_and_playback_state', - 'mc_db_update_shuffle_mode', - 'mc_db_update_whole_metadata', - 'mc_ipc_get_dbus_connection', - 'mc_ipc_register_listener', - 'mc_ipc_send_message', - 'mc_ipc_send_message_to_server', - 'mc_ipc_send_reply', - 'mc_ipc_service_connect', - 'mc_ipc_unref_dbus_connection', - 'mc_ipc_unregister_all_listener', - 'mc_ipc_unregister_listener', - 'mc_metadata_clone', - 'mc_metadata_destroy', - 'mc_metadata_get', - 'mc_playback_ability_clone', - 'mc_playback_ability_destroy', - 'mc_playback_action_is_supported', - 'mc_playlist_clone', - 'mc_playlist_create', - 'mc_playlist_destroy', - 'mc_playlist_foreach_item', - 'mc_playlist_get_name', - 'mc_playlist_update_item', - 'mc_safe_strtoi', - 'mc_safe_strtoull', - 'mc_search_clone', - 'mc_search_create', - 'mc_search_destroy', - 'mc_search_foreach_condition', - 'mc_search_set_condition', - 'mc_server_add_item_to_playlist', - 'mc_server_create', - 'mc_server_create_playlist', - 'mc_server_delete_playlist', - 'mc_server_destroy', - 'mc_server_foreach_client', - 'mc_server_foreach_playlist', - 'mc_server_get_playlist', - 'mc_server_send_cmd_reply', - 'mc_server_send_command_reply', - 'mc_server_send_custom_event', - 'mc_server_set_content_age_rating', - 'mc_server_set_custom_cmd_received_cb', - 'mc_server_set_custom_command_received_cb', - 'mc_server_set_event_reply_received_cb', - 'mc_server_set_icon', - 'mc_server_set_metadata', - 'mc_server_set_playback_ability', - 'mc_server_set_playback_action_cmd_received_cb', - 'mc_server_set_playback_content_type', - 'mc_server_set_playback_position', - 'mc_server_set_playback_position_cmd_received_cb', - 'mc_server_set_playback_state', - 'mc_server_set_playback_state_command_received_cb', - 'mc_server_set_playlist_cmd_received_cb', - 'mc_server_set_playlist_item_index', - 'mc_server_set_playlist_item_info', - 'mc_server_set_repeat_ability', - 'mc_server_set_repeat_mode_cmd_received_cb', - 'mc_server_set_search_cmd_received_cb', - 'mc_server_set_shuffle_ability', - 'mc_server_set_shuffle_mode_cmd_received_cb', - 'mc_server_unset_custom_cmd_received_cb', - 'mc_server_unset_custom_command_received_cb', - 'mc_server_unset_event_reply_received_cb', - 'mc_server_unset_playback_action_cmd_received_cb', - 'mc_server_unset_playback_position_cmd_received_cb', - 'mc_server_unset_playback_state_command_received_cb', - 'mc_server_unset_playlist_cmd_received_cb', - 'mc_server_unset_repeat_mode_cmd_received_cb', - 'mc_server_unset_search_cmd_received_cb', - 'mc_server_unset_shuffle_mode_cmd_received_cb', - 'mc_server_update_metadata', - 'mc_server_update_playback_ability', - 'mc_server_update_playback_info', - 'mc_server_update_playlist_done', - 'mc_server_update_repeat_mode', - 'mc_server_update_shuffle_mode', - 'mc_util_bundle_to_string', - 'mc_util_generate_uuid', - 'mc_util_get_command_available', - 'mc_util_get_interface_name', - 'mc_util_get_own_name', - 'mc_util_make_filter_interface_name', - 'mc_util_set_command_available', - ], - 'libcapi-mediademuxer.so.0': [ - 'custom_mediademxer_port_register', - 'ffmpeg_mediademxer_port_register', - 'gst_mediademxer_port_register', - 'md_create', - 'md_destroy', - 'md_get_track_count', - 'md_get_track_info', - 'md_ini_load', - 'md_prepare', - 'md_read_sample', - 'md_seek', - 'md_select_track', - 'md_set_data_source', - 'md_set_eos_cb', - 'md_set_error_cb', - 'md_start', - 'md_stop', - 'md_unprepare', - 'md_unselect_track', - 'mediademuxer_create', - 'mediademuxer_destroy', - 'mediademuxer_get_state', - 'mediademuxer_get_track_count', - 'mediademuxer_get_track_info', - 'mediademuxer_prepare', - 'mediademuxer_read_sample', - 'mediademuxer_seek', - 'mediademuxer_select_track', - 'mediademuxer_set_data_source', - 'mediademuxer_set_eos_cb', - 'mediademuxer_set_error_cb', - 'mediademuxer_start', - 'mediademuxer_stop', - 'mediademuxer_unprepare', - 'mediademuxer_unselect_track', - 'mediademuxer_unset_eos_cb', - 'mediademuxer_unset_error_cb', - ], - 'libcapi-mediamuxer.so.0': [ - 'custom_mediamuxer_port_register', - 'ffmpeg_mediamuxer_port_register', - 'gst_mediamuxer_port_register', - 'mediamuxer_add_track', - 'mediamuxer_close_track', - 'mediamuxer_create', - 'mediamuxer_destroy', - 'mediamuxer_get_state', - 'mediamuxer_pause', - 'mediamuxer_prepare', - 'mediamuxer_resume', - 'mediamuxer_set_data_sink', - 'mediamuxer_set_eos_cb', - 'mediamuxer_set_error_cb', - 'mediamuxer_start', - 'mediamuxer_stop', - 'mediamuxer_unprepare', - 'mediamuxer_unset_eos_cb', - 'mediamuxer_unset_error_cb', - 'mediamuxer_write_sample', - 'mx_add_track', - 'mx_close_track', - 'mx_create', - 'mx_destroy', - 'mx_ini_load', - 'mx_pause', - 'mx_prepare', - 'mx_resume', - 'mx_set_data_sink', - 'mx_set_eos_cb', - 'mx_set_error_cb', - 'mx_start', - 'mx_stop', - 'mx_unprepare', - 'mx_write_sample', - ], - 'libcapi-media-streamer.so.0': [ - 'media_streamer_create', - 'media_streamer_destroy', - 'media_streamer_get_duration', - 'media_streamer_get_play_position', - 'media_streamer_get_state', - 'media_streamer_node_add', - 'media_streamer_node_create', - 'media_streamer_node_create_sink', - 'media_streamer_node_create_src', - 'media_streamer_node_destroy', - 'media_streamer_node_get_pad_format', - 'media_streamer_node_get_pad_name', - 'media_streamer_node_get_param', - 'media_streamer_node_get_params', - 'media_streamer_node_link', - 'media_streamer_node_pull_packet', - 'media_streamer_node_push_packet', - 'media_streamer_node_remove', - 'media_streamer_node_set_pad_format', - 'media_streamer_node_set_param', - 'media_streamer_node_set_params', - 'media_streamer_pause', - 'media_streamer_play', - 'media_streamer_prepare', - 'media_streamer_set_error_cb', - 'media_streamer_set_interrupted_cb', - 'media_streamer_set_play_position', - 'media_streamer_set_state_change_cb', - 'media_streamer_sink_set_data_ready_cb', - 'media_streamer_sink_set_eos_cb', - 'media_streamer_sink_unset_data_ready_cb', - 'media_streamer_sink_unset_eos_cb', - 'media_streamer_src_set_buffer_status_cb', - 'media_streamer_src_unset_buffer_status_cb', - 'media_streamer_stop', - 'media_streamer_unprepare', - 'media_streamer_unset_error_cb', - 'media_streamer_unset_interrupted_cb', - 'media_streamer_unset_state_change_cb', - ], - 'libcapi-media-tool.so.0': [ - 'media_format_create', - 'media_format_get_audio_aac_header_type', - 'media_format_get_audio_aac_type', - 'media_format_get_audio_info', - 'media_format_get_container_mime', - 'media_format_get_extra', - 'media_format_get_text_info', - 'media_format_get_type', - 'media_format_get_video_frame_rate', - 'media_format_get_video_info', - 'media_format_is_writable', - 'media_format_make_writable', - 'media_format_ref', - 'media_format_set_audio_aac_header_type', - 'media_format_set_audio_aac_type', - 'media_format_set_audio_avg_bps', - 'media_format_set_audio_bit', - 'media_format_set_audio_channel', - 'media_format_set_audio_mime', - 'media_format_set_audio_samplerate', - 'media_format_set_container_mime', - 'media_format_set_extra', - 'media_format_set_text_mime', - 'media_format_set_text_type', - 'media_format_set_video_avg_bps', - 'media_format_set_video_frame_rate', - 'media_format_set_video_height', - 'media_format_set_video_max_bps', - 'media_format_set_video_mime', - 'media_format_set_video_width', - 'media_format_unref', - 'media_packet_alloc', - 'media_packet_copy', - 'media_packet_create', - 'media_packet_create_alloc', - 'media_packet_create_from_external_memory', - 'media_packet_create_from_tbm_surface', - 'media_packet_destroy', - 'media_packet_get_allocated_buffer_size', - 'media_packet_get_buffer_data_ptr', - 'media_packet_get_buffer_size', - 'media_packet_get_codec_data', - 'media_packet_get_dts', - 'media_packet_get_duration', - 'media_packet_get_extra', - 'media_packet_get_flags', - 'media_packet_get_format', - 'media_packet_get_number_of_video_planes', - 'media_packet_get_pts', - 'media_packet_get_rotate_method', - 'media_packet_get_tbm_surface', - 'media_packet_get_video_plane_data_ptr', - 'media_packet_get_video_stride_height', - 'media_packet_get_video_stride_width', - 'media_packet_has_tbm_surface_buffer', - 'media_packet_is_audio', - 'media_packet_is_codec_config', - 'media_packet_is_encoded', - 'media_packet_is_end_of_stream', - 'media_packet_is_raw', - 'media_packet_is_sync_frame', - 'media_packet_is_text', - 'media_packet_is_video', - 'media_packet_pool_acquire_packet', - 'media_packet_pool_allocate', - 'media_packet_pool_create', - 'media_packet_pool_deallocate', - 'media_packet_pool_destroy', - 'media_packet_pool_get_size', - 'media_packet_pool_release_packet', - 'media_packet_pool_set_media_format', - 'media_packet_pool_set_size', - 'media_packet_reset_flags', - 'media_packet_set_buffer_size', - 'media_packet_set_codec_data', - 'media_packet_set_dts', - 'media_packet_set_duration', - 'media_packet_set_extra', - 'media_packet_set_flags', - 'media_packet_set_format', - 'media_packet_set_pts', - 'media_packet_set_rotate_method', - 'media_packet_unset_flags', - ], - 'libcapi-media-vision.so.0': [ - 'mv_barcode_detect', - 'mv_barcode_generate_image', - 'mv_barcode_generate_source', - 'mv_create_engine_config', - 'mv_create_source', - 'mv_destroy_engine_config', - 'mv_destroy_source', - 'mv_engine_config_foreach_supported_attribute', - 'mv_engine_config_get_bool_attribute', - 'mv_engine_config_get_double_attribute', - 'mv_engine_config_get_int_attribute', - 'mv_engine_config_get_string_attribute', - 'mv_engine_config_set_bool_attribute', - 'mv_engine_config_set_double_attribute', - 'mv_engine_config_set_int_attribute', - 'mv_engine_config_set_string_attribute', - 'mv_face_detect', - 'mv_face_eye_condition_recognize', - 'mv_face_facial_expression_recognize', - 'mv_face_recognition_model_add', - 'mv_face_recognition_model_clone', - 'mv_face_recognition_model_create', - 'mv_face_recognition_model_destroy', - 'mv_face_recognition_model_learn', - 'mv_face_recognition_model_load', - 'mv_face_recognition_model_query_labels', - 'mv_face_recognition_model_reset', - 'mv_face_recognition_model_save', - 'mv_face_recognize', - 'mv_face_track', - 'mv_face_tracking_model_clone', - 'mv_face_tracking_model_create', - 'mv_face_tracking_model_destroy', - 'mv_face_tracking_model_load', - 'mv_face_tracking_model_prepare', - 'mv_face_tracking_model_save', - 'mv_image_object_clone', - 'mv_image_object_create', - 'mv_image_object_destroy', - 'mv_image_object_fill', - 'mv_image_object_get_label', - 'mv_image_object_get_recognition_rate', - 'mv_image_object_load', - 'mv_image_object_save', - 'mv_image_object_set_label', - 'mv_image_recognize', - 'mv_image_track', - 'mv_image_tracking_model_clone', - 'mv_image_tracking_model_create', - 'mv_image_tracking_model_destroy', - 'mv_image_tracking_model_load', - 'mv_image_tracking_model_refresh', - 'mv_image_tracking_model_save', - 'mv_image_tracking_model_set_target', - 'mv_source_clear', - 'mv_source_fill_by_buffer', - 'mv_source_fill_by_media_packet', - 'mv_source_get_buffer', - 'mv_source_get_colorspace', - 'mv_source_get_height', - 'mv_source_get_width', - 'mv_surveillance_event_trigger_create', - 'mv_surveillance_event_trigger_destroy', - 'mv_surveillance_foreach_event_result_name', - 'mv_surveillance_foreach_supported_event_type', - 'mv_surveillance_get_event_trigger_roi', - 'mv_surveillance_get_event_trigger_type', - 'mv_surveillance_get_result_value', - 'mv_surveillance_push_source', - 'mv_surveillance_set_event_trigger_roi', - 'mv_surveillance_subscribe_event_trigger', - 'mv_surveillance_unsubscribe_event_trigger', - ], - 'libcapi-media-metadata-editor.so': [ - 'metadata_editor_append_picture', - 'metadata_editor_create', - 'metadata_editor_destroy', - 'metadata_editor_get_metadata', - 'metadata_editor_get_picture', - 'metadata_editor_remove_picture', - 'metadata_editor_set_metadata', - 'metadata_editor_set_path', - 'metadata_editor_update_metadata', - ], - 'libcapi-media-metadata-extractor.so': [ - 'metadata_extractor_create', - 'metadata_extractor_destroy', - 'metadata_extractor_get_artwork', - 'metadata_extractor_get_frame', - 'metadata_extractor_get_frame_at_time', - 'metadata_extractor_get_metadata', - 'metadata_extractor_get_synclyrics', - 'metadata_extractor_set_buffer', - 'metadata_extractor_set_path', - ], - 'libcapi-media-player.so.0': [ - 'client_get_api_timeout', - 'client_wait_for_cb_return', - 'client_wait_for_server_ack', - 'player_360_get_direction_of_view', - 'player_360_get_field_of_view', - 'player_360_get_zoom', - 'player_360_is_content_spherical', - 'player_360_is_enabled', - 'player_360_set_direction_of_view', - 'player_360_set_enabled', - 'player_360_set_field_of_view', - 'player_360_set_zoom', - 'player_360_set_zoom_with_field_of_view', - 'player_audio_effect_equalizer_clear', - 'player_audio_effect_equalizer_is_available', - 'player_audio_effect_get_equalizer_band_frequency', - 'player_audio_effect_get_equalizer_band_frequency_range', - 'player_audio_effect_get_equalizer_band_level', - 'player_audio_effect_get_equalizer_bands_count', - 'player_audio_effect_get_equalizer_level_range', - 'player_audio_effect_set_equalizer_all_bands', - 'player_audio_effect_set_equalizer_band_level', - 'player_capture_video', - 'player_create', - 'player_destroy', - 'player_enable_media_packet_video_frame_decoded_cb', - 'player_enable_tsurf_pool', - 'player_foreach_adaptive_variant', - 'player_get_album_art', - 'player_get_audio_latency_mode', - 'player_get_audio_stream_info', - 'player_get_codec_info', - 'player_get_codec_type', - 'player_get_content_info', - 'player_get_current_track', - 'player_get_display_mode', - 'player_get_display_rotation', - 'player_get_duration', - 'player_get_duration_nsec', - 'player_get_max_adaptive_variant_limit', - 'player_get_media_packet_video_frame_pool_size', - 'player_get_media_stream_buffer_max_size', - 'player_get_media_stream_buffer_min_threshold', - 'player_get_next_uri', - 'player_get_play_position', - 'player_get_play_position_nsec', - 'player_get_progressive_download_status', - 'player_get_state', - 'player_get_streaming_buffering_time', - 'player_get_streaming_download_progress', - 'player_get_track_count', - 'player_get_track_language_code', - 'player_get_video_roi_area', - 'player_get_video_size', - 'player_get_video_stream_info', - 'player_get_volume', - 'player_is_audio_only', - 'player_is_display_visible', - 'player_is_enabled_tsurf_pool', - 'player_is_gapless', - 'player_is_looping', - 'player_is_muted', - 'player_is_replaygain_enabled', - 'player_pause', - 'player_prepare', - 'player_prepare_async', - 'player_push_media_stream', - 'player_select_track', - 'player_set_audio_latency_mode', - 'player_set_audio_only', - 'player_set_buffering_cb', - 'player_set_codec_type', - 'player_set_completed_cb', - 'player_set_display', - 'player_set_display_mode', - 'player_set_display_roi_area', - 'player_set_display_rotation', - 'player_set_display_visible', - 'player_set_ecore_wl_display', - 'player_set_error_cb', - 'player_set_gapless', - 'player_set_interrupted_cb', - 'player_set_looping', - 'player_set_max_adaptive_variant_limit', - 'player_set_media_packet_video_frame_decoded_cb', - 'player_set_media_stream_buffer_max_size', - 'player_set_media_stream_buffer_min_threshold', - 'player_set_media_stream_buffer_status_cb', - 'player_set_media_stream_buffer_status_cb_ex', - 'player_set_media_stream_dynamic_resolution', - 'player_set_media_stream_info', - 'player_set_media_stream_seek_cb', - 'player_set_memory_buffer', - 'player_set_mute', - 'player_set_next_uri', - 'player_set_pcm_extraction_mode', - 'player_set_pcm_spec', - 'player_set_playback_rate', - 'player_set_play_position', - 'player_set_play_position_nsec', - 'player_set_progressive_download_message_cb', - 'player_set_progressive_download_path', - 'player_set_replaygain_enabled', - 'player_set_sound_stream_info', - 'player_set_streaming_buffering_time', - 'player_set_streaming_cookie', - 'player_set_streaming_playback_rate', - 'player_set_streaming_user_agent', - 'player_set_subtitle_path', - 'player_set_subtitle_position_offset', - 'player_set_subtitle_updated_cb', - 'player_set_uri', - 'player_set_video_roi_area', - 'player_set_video_stream_changed_cb', - 'player_set_volume', - 'player_start', - 'player_stop', - 'player_unprepare', - 'player_unset_buffering_cb', - 'player_unset_completed_cb', - 'player_unset_error_cb', - 'player_unset_interrupted_cb', - 'player_unset_media_packet_video_frame_decoded_cb', - 'player_unset_media_stream_buffer_status_cb', - 'player_unset_media_stream_buffer_status_cb_ex', - 'player_unset_media_stream_seek_cb', - 'player_unset_progressive_download_message_cb', - 'player_unset_subtitle_updated_cb', - 'player_unset_video_stream_changed_cb', - ], - 'libcapi-media-radio.so.0': [ - 'radio_create', - 'radio_destroy', - 'radio_get_channel_spacing', - 'radio_get_frequency', - 'radio_get_frequency_range', - 'radio_get_signal_strength', - 'radio_get_state', - 'radio_get_volume', - 'radio_is_muted', - 'radio_scan_start', - 'radio_scan_stop', - 'radio_seek_down', - 'radio_seek_up', - 'radio_set_frequency', - 'radio_set_interrupted_cb', - 'radio_set_mute', - 'radio_set_scan_completed_cb', - 'radio_set_volume', - 'radio_start', - 'radio_stop', - 'radio_unset_interrupted_cb', - 'radio_unset_scan_completed_cb', - ], - 'libcapi-media-recorder.so.0': [ - 'recorder_add_device_state_changed_cb', - 'recorder_attr_get_audio_channel', - 'recorder_attr_get_audio_device', - 'recorder_attr_get_audio_encoder_bitrate', - 'recorder_attr_get_audio_samplerate', - 'recorder_attr_get_orientation_tag', - 'recorder_attr_get_recording_motion_rate', - 'recorder_attr_get_size_limit', - 'recorder_attr_get_time_limit', - 'recorder_attr_get_video_encoder_bitrate', - 'recorder_attr_is_muted', - 'recorder_attr_set_audio_channel', - 'recorder_attr_set_audio_device', - 'recorder_attr_set_audio_encoder_bitrate', - 'recorder_attr_set_audio_samplerate', - 'recorder_attr_set_mute', - 'recorder_attr_set_orientation_tag', - 'recorder_attr_set_recording_motion_rate', - 'recorder_attr_set_size_limit', - 'recorder_attr_set_time_limit', - 'recorder_attr_set_video_encoder_bitrate', - 'recorder_cancel', - 'recorder_commit', - 'recorder_create_audiorecorder', - 'recorder_create_videorecorder', - 'recorder_destroy', - 'recorder_foreach_supported_audio_encoder', - 'recorder_foreach_supported_file_format', - 'recorder_foreach_supported_video_encoder', - 'recorder_foreach_supported_video_resolution', - 'recorder_get_audio_encoder', - 'recorder_get_audio_level', - 'recorder_get_device_state', - 'recorder_get_file_format', - 'recorder_get_filename', - 'recorder_get_state', - 'recorder_get_video_encoder', - 'recorder_get_video_resolution', - 'recorder_pause', - 'recorder_prepare', - 'recorder_remove_device_state_changed_cb', - 'recorder_set_audio_encoder', - 'recorder_set_audio_stream_cb', - 'recorder_set_error_cb', - 'recorder_set_file_format', - 'recorder_set_filename', - 'recorder_set_interrupted_cb', - 'recorder_set_interrupt_started_cb', - 'recorder_set_muxed_stream_cb', - 'recorder_set_recording_limit_reached_cb', - 'recorder_set_recording_status_cb', - 'recorder_set_sound_stream_info', - 'recorder_set_state_changed_cb', - 'recorder_set_video_encoder', - 'recorder_set_video_resolution', - 'recorder_start', - 'recorder_unprepare', - 'recorder_unset_audio_stream_cb', - 'recorder_unset_error_cb', - 'recorder_unset_interrupted_cb', - 'recorder_unset_interrupt_started_cb', - 'recorder_unset_muxed_stream_cb', - 'recorder_unset_recording_limit_reached_cb', - 'recorder_unset_recording_status_cb', - 'recorder_unset_state_changed_cb', - ], - 'libcapi-media-screen-mirroring.so.0': [ - 'scmirroring_sink_connect', - 'scmirroring_sink_create', - 'scmirroring_sink_destroy', - 'scmirroring_sink_disconnect', - 'scmirroring_sink_get_current_state', - 'scmirroring_sink_get_negotiated_audio_bitwidth', - 'scmirroring_sink_get_negotiated_audio_channel', - 'scmirroring_sink_get_negotiated_audio_codec', - 'scmirroring_sink_get_negotiated_audio_sample_rate', - 'scmirroring_sink_get_negotiated_video_codec', - 'scmirroring_sink_get_negotiated_video_frame_rate', - 'scmirroring_sink_get_negotiated_video_resolution', - 'scmirroring_sink_pause', - 'scmirroring_sink_prepare', - 'scmirroring_sink_resume', - 'scmirroring_sink_set_display', - 'scmirroring_sink_set_ip_and_port', - 'scmirroring_sink_set_resolution', - 'scmirroring_sink_set_state_changed_cb', - 'scmirroring_sink_start', - 'scmirroring_sink_unprepare', - 'scmirroring_sink_unset_state_changed_cb', - 'scmirroring_src_AV_transport_switch', - 'scmirroring_src_connect', - 'scmirroring_src_create', - 'scmirroring_src_destroy', - 'scmirroring_src_disconnect', - 'scmirroring_src_ini_get_structure', - 'scmirroring_src_ini_load', - 'scmirroring_src_pause', - 'scmirroring_src_resume', - 'scmirroring_src_set_connection_mode', - 'scmirroring_src_set_direct_streaming', - 'scmirroring_src_set_ip_and_port', - 'scmirroring_src_set_multisink_ability', - 'scmirroring_src_set_resolution', - 'scmirroring_src_set_server_name', - 'scmirroring_src_set_state_changed_cb', - 'scmirroring_src_start', - 'scmirroring_src_stop', - 'scmirroring_src_unset_state_changed_cb', - ], - 'libcapi-media-sound-manager.so.0': [ - 'sound_manager_acquire_focus', - 'sound_manager_acquire_focus_all', - 'sound_manager_add_device_connection_changed_cb', - 'sound_manager_add_device_for_stream_routing', - 'sound_manager_add_device_id_for_stream_routing', - 'sound_manager_add_device_running_changed_cb', - 'sound_manager_add_device_state_changed_cb', - 'sound_manager_add_focus_state_watch_cb', - 'sound_manager_add_volume_changed_cb', - 'sound_manager_apply_stream_routing', - 'sound_manager_create_stream_information', - 'sound_manager_create_stream_information_internal', - 'sound_manager_create_virtual_stream', - 'sound_manager_deliver_focus', - 'sound_manager_destroy_stream_information', - 'sound_manager_destroy_virtual_stream', - 'sound_manager_free_device_list', - 'sound_manager_get_avoid_resampling', - 'sound_manager_get_avoid_resampling_by_id', - 'sound_manager_get_current_media_playback_device_type', - 'sound_manager_get_current_playback_focus', - 'sound_manager_get_current_recording_focus', - 'sound_manager_get_current_sound_type', - 'sound_manager_get_device_id', - 'sound_manager_get_device_io_direction', - 'sound_manager_get_device_list', - 'sound_manager_get_device_name', - 'sound_manager_get_device_product_id', - 'sound_manager_get_device_state', - 'sound_manager_get_device_state_by_id', - 'sound_manager_get_device_type', - 'sound_manager_get_device_vendor_id', - 'sound_manager_get_focus_reacquisition', - 'sound_manager_get_focus_state', - 'sound_manager_get_index_from_stream_information', - 'sound_manager_get_master_volume', - 'sound_manager_get_max_master_volume', - 'sound_manager_get_max_volume', - 'sound_manager_get_media_stream_only', - 'sound_manager_get_media_stream_only_by_id', - 'sound_manager_get_next_device', - 'sound_manager_get_prev_device', - 'sound_manager_get_sample_format', - 'sound_manager_get_sample_format_by_id', - 'sound_manager_get_sample_rate', - 'sound_manager_get_sample_rate_by_id', - 'sound_manager_get_sound_type', - 'sound_manager_get_supported_sample_formats', - 'sound_manager_get_supported_sample_formats_by_id', - 'sound_manager_get_supported_sample_rates', - 'sound_manager_get_supported_sample_rates_by_id', - 'sound_manager_get_type_from_stream_information', - 'sound_manager_get_volume', - 'sound_manager_is_available_stream_information', - 'sound_manager_is_device_running', - 'sound_manager_is_device_running_by_id', - 'sound_manager_is_stream_on_device', - 'sound_manager_release_focus', - 'sound_manager_release_focus_all', - 'sound_manager_remove_all_devices_for_stream_routing', - 'sound_manager_remove_device_connection_changed_cb', - 'sound_manager_remove_device_for_stream_routing', - 'sound_manager_remove_device_id_for_stream_routing', - 'sound_manager_remove_device_running_changed_cb', - 'sound_manager_remove_device_state_changed_cb', - 'sound_manager_remove_focus_state_watch_cb', - 'sound_manager_remove_volume_changed_cb', - 'sound_manager_set_avoid_resampling', - 'sound_manager_set_avoid_resampling_by_id', - 'sound_manager_set_filter', - 'sound_manager_set_filter_preset', - 'sound_manager_set_focus_reacquisition', - 'sound_manager_set_master_volume', - 'sound_manager_set_media_stream_only', - 'sound_manager_set_media_stream_only_by_id', - 'sound_manager_set_sample_format', - 'sound_manager_set_sample_format_by_id', - 'sound_manager_set_sample_rate', - 'sound_manager_set_sample_rate_by_id', - 'sound_manager_set_stream_routing_option', - 'sound_manager_set_volume', - 'sound_manager_start_virtual_stream', - 'sound_manager_stop_virtual_stream', - 'sound_manager_unset_filter', - ], - 'libcapi-media-sound-pool.so.0': [ - 'sound_pool_activate', - 'sound_pool_create', - 'sound_pool_deactivate', - 'sound_pool_destroy', - 'sound_pool_get_state', - 'sound_pool_get_volume', - 'sound_pool_load_source_from_file', - 'sound_pool_set_state_changed_cb', - 'sound_pool_set_volume', - 'sound_pool_stream_get_priority', - 'sound_pool_stream_get_state', - 'sound_pool_stream_get_volume', - 'sound_pool_stream_pause', - 'sound_pool_stream_play', - 'sound_pool_stream_resume', - 'sound_pool_stream_set_priority', - 'sound_pool_stream_set_volume', - 'sound_pool_stream_stop', - 'sound_pool_unload_source', - 'sound_pool_unset_state_changed_cb', - ], - 'libcapi-media-streamrecorder.so.0': [ - 'streamrecorder_cancel', - 'streamrecorder_commit', - 'streamrecorder_create', - 'streamrecorder_destroy', - 'streamrecorder_enable_source_buffer', - 'streamrecorder_foreach_supported_audio_encoder', - 'streamrecorder_foreach_supported_file_format', - 'streamrecorder_foreach_supported_video_encoder', - 'streamrecorder_foreach_supported_video_resolution', - 'streamrecorder_get_audio_channel', - 'streamrecorder_get_audio_encoder', - 'streamrecorder_get_audio_encoder_bitrate', - 'streamrecorder_get_audio_samplerate', - 'streamrecorder_get_file_format', - 'streamrecorder_get_filename', - 'streamrecorder_get_recording_limit', - 'streamrecorder_get_state', - 'streamrecorder_get_video_encoder', - 'streamrecorder_get_video_encoder_bitrate', - 'streamrecorder_get_video_framerate', - 'streamrecorder_get_video_resolution', - 'streamrecorder_get_video_source_format', - 'streamrecorder_pause', - 'streamrecorder_prepare', - 'streamrecorder_push_stream_buffer', - 'streamrecorder_set_audio_channel', - 'streamrecorder_set_audio_encoder', - 'streamrecorder_set_audio_encoder_bitrate', - 'streamrecorder_set_audio_samplerate', - 'streamrecorder_set_buffer_consume_completed_cb', - 'streamrecorder_set_error_cb', - 'streamrecorder_set_file_format', - 'streamrecorder_set_filename', - 'streamrecorder_set_notify_cb', - 'streamrecorder_set_recording_limit', - 'streamrecorder_set_recording_limit_reached_cb', - 'streamrecorder_set_recording_status_cb', - 'streamrecorder_set_video_encoder', - 'streamrecorder_set_video_encoder_bitrate', - 'streamrecorder_set_video_framerate', - 'streamrecorder_set_video_resolution', - 'streamrecorder_set_video_source_format', - 'streamrecorder_start', - 'streamrecorder_unprepare', - 'streamrecorder_unset_buffer_consume_completed_cb', - 'streamrecorder_unset_error_cb', - 'streamrecorder_unset_notify_cb', - 'streamrecorder_unset_recording_limit_reached_cb', - 'streamrecorder_unset_recording_status_cb', - ], - 'libcapi-media-thumbnail-util.so': [ - 'thumbnail_util_cancel', - 'thumbnail_util_cancel_all', - 'thumbnail_util_create', - 'thumbnail_util_destroy', - 'thumbnail_util_extract', - 'thumbnail_util_extract_to_buffer', - 'thumbnail_util_extract_to_file', - 'thumbnail_util_set_path', - 'thumbnail_util_set_size', - ], - 'libcapi-media-tone-player.so.0': [ - 'tone_player_start_new', - 'tone_player_stop', - ], - 'libcapi-media-wav-player.so.0': [ - 'wav_player_start_loop', - 'wav_player_start_new', - 'wav_player_stop', - ], - 'libasp.so.0': [ - 'asp_advert_add_info', - 'asp_advert_change_service_status', - 'asp_advert_create', - 'asp_advert_destroy', - 'asp_advert_get_info', - 'asp_advert_get_p2p_config_method', - 'asp_advert_get_p2p_role_scheme', - 'asp_advert_remove_info', - 'asp_advert_set_auto_accept', - 'asp_advert_set_discovery_tech', - 'asp_advert_set_p2p_config_method', - 'asp_advert_set_p2p_response', - 'asp_advert_set_p2p_role_scheme', - 'asp_advert_set_preferred_connection', - 'asp_advert_set_service_type', - 'asp_advert_set_status', - 'asp_advert_set_status_changed_cb', - 'asp_advert_start_advertising', - 'asp_advert_stop_advertising', - 'asp_advert_unset_status_changed_cb', - 'asp_dbus_deinit', - 'asp_dbus_init', - 'asp_dbus_method_call_sync_debug', - 'asp_deinitialize', - 'asp_initialize', - 'asp_process_advert_status_changed', - 'asp_process_seek_search_result', - 'asp_process_session_config_request', - 'asp_process_session_connect_status', - 'asp_process_session_port_status', - 'asp_process_session_request', - 'asp_process_session_status', - 'asp_seek_add_info', - 'asp_seek_create', - 'asp_seek_destroy', - 'asp_seek_remove_info', - 'asp_seek_set_discovery_tech', - 'asp_seek_set_preferred_connection', - 'asp_seek_set_search_result_cb', - 'asp_seek_start', - 'asp_seek_stop', - 'asp_seek_unset_search_result_cb', - 'asp_session_bind_port', - 'asp_session_close', - 'asp_session_confirm', - 'asp_session_connect', - 'asp_session_create', - 'asp_session_destroy', - 'asp_session_get_close_status', - 'asp_session_get_handle', - 'asp_session_get_id', - 'asp_session_get_info', - 'asp_session_get_mac', - 'asp_session_get_p2p_config_method', - 'asp_session_get_p2p_role_scheme', - 'asp_session_release_port', - 'asp_session_set_config_request_cb', - 'asp_session_set_connect_status_cb', - 'asp_session_set_info', - 'asp_session_set_p2p_config_method', - 'asp_session_set_p2p_role_scheme', - 'asp_session_set_port_status_cb', - 'asp_session_set_request_cb', - 'asp_session_set_state_ready', - 'asp_session_set_status_cb', - 'asp_session_unset_config_request_cb', - 'asp_session_unset_connect_status_cb', - 'asp_session_unset_port_status_cb', - 'asp_session_unset_request_cb', - 'asp_session_unset_status_cb', - ], - 'libcapi-network-bluetooth.so.0': [ - 'bt_a2dp_set_content_protection', - 'bt_adapter_disable', - 'bt_adapter_enable', - 'bt_adapter_force_hcidump', - 'bt_adapter_foreach_bonded_device', - 'bt_adapter_foreach_profile_connected_devices', - 'bt_adapter_free_device_info', - 'bt_adapter_free_manufacturer_data', - 'bt_adapter_get_address', - 'bt_adapter_get_bonded_device_info', - 'bt_adapter_get_bonded_device_is_alias_set', - 'bt_adapter_get_connectable', - 'bt_adapter_get_local_info', - 'bt_adapter_get_local_oob_data', - 'bt_adapter_get_local_oob_ext_data', - 'bt_adapter_get_name', - 'bt_adapter_get_state', - 'bt_adapter_get_version', - 'bt_adapter_get_visibility', - 'bt_adapter_is_discovering', - 'bt_adapter_is_service_used', - 'bt_adapter_le_add_advertising_manufacturer_data', - 'bt_adapter_le_add_advertising_service_data', - 'bt_adapter_le_add_advertising_service_solicitation_uuid', - 'bt_adapter_le_add_advertising_service_uuid', - 'bt_adapter_le_add_white_list', - 'bt_adapter_le_clear_advertising_data', - 'bt_adapter_le_create_advertiser', - 'bt_adapter_le_destroy_advertiser', - 'bt_adapter_le_disable', - 'bt_adapter_le_enable', - 'bt_adapter_le_enable_privacy', - 'bt_adapter_le_free_ibeacon_report', - 'bt_adapter_le_free_service_data_list', - 'bt_adapter_le_get_scan_result_appearance', - 'bt_adapter_le_get_scan_result_device_name', - 'bt_adapter_le_get_scan_result_ibeacon_report', - 'bt_adapter_le_get_scan_result_manufacturer_data', - 'bt_adapter_le_get_scan_result_service_data_list', - 'bt_adapter_le_get_scan_result_service_solicitation_uuids', - 'bt_adapter_le_get_scan_result_service_uuids', - 'bt_adapter_le_get_scan_result_tx_power_level', - 'bt_adapter_le_get_state', - 'bt_adapter_le_is_2m_phy_supported', - 'bt_adapter_le_is_coded_phy_supported', - 'bt_adapter_le_is_discovering', - 'bt_adapter_le_read_maximum_data_length', - 'bt_adapter_le_read_suggested_default_data_length', - 'bt_adapter_le_remove_white_list', - 'bt_adapter_le_scan_filter_create', - 'bt_adapter_le_scan_filter_destroy', - 'bt_adapter_le_scan_filter_register', - 'bt_adapter_le_scan_filter_set_device_address', - 'bt_adapter_le_scan_filter_set_device_name', - 'bt_adapter_le_scan_filter_set_ibeacon', - 'bt_adapter_le_scan_filter_set_manufacturer_data', - 'bt_adapter_le_scan_filter_set_manufacturer_data_with_mask', - 'bt_adapter_le_scan_filter_set_proximity_uuid', - 'bt_adapter_le_scan_filter_set_service_data', - 'bt_adapter_le_scan_filter_set_service_data_with_mask', - 'bt_adapter_le_scan_filter_set_service_solicitation_uuid', - 'bt_adapter_le_scan_filter_set_service_solicitation_uuid_with_mask', - 'bt_adapter_le_scan_filter_set_service_uuid', - 'bt_adapter_le_scan_filter_set_service_uuid_with_mask', - 'bt_adapter_le_scan_filter_set_type', - 'bt_adapter_le_scan_filter_unregister', - 'bt_adapter_le_scan_filter_unregister_all', - 'bt_adapter_le_scan_filter_unset_proximity_uuid', - 'bt_adapter_le_set_advertising_appearance', - 'bt_adapter_le_set_advertising_connectable', - 'bt_adapter_le_set_advertising_device_name', - 'bt_adapter_le_set_advertising_filter_policy', - 'bt_adapter_le_set_advertising_mode', - 'bt_adapter_le_set_advertising_tx_power_level', - 'bt_adapter_le_set_customized_scan_mode', - 'bt_adapter_le_set_remote_oob_ext_data', - 'bt_adapter_le_set_scan_mode', - 'bt_adapter_le_set_state_changed_cb', - 'bt_adapter_le_set_static_random_address', - 'bt_adapter_le_start_advertising_new', - 'bt_adapter_le_start_scan', - 'bt_adapter_le_stop_advertising', - 'bt_adapter_le_stop_scan', - 'bt_adapter_le_unset_state_changed_cb', - 'bt_adapter_le_write_host_suggested_default_data_length', - 'bt_adapter_parse_manufacturer_data', - 'bt_adapter_passkey_confirmation_reply', - 'bt_adapter_passkey_reply', - 'bt_adapter_recover', - 'bt_adapter_remove_remote_oob_data', - 'bt_adapter_reset', - 'bt_adapter_set_authentication_req_cb', - 'bt_adapter_set_connectable', - 'bt_adapter_set_connectable_changed_cb', - 'bt_adapter_set_device_discovery_state_changed_cb', - 'bt_adapter_set_manufacturer_data', - 'bt_adapter_set_manufacturer_data_changed_cb', - 'bt_adapter_set_name', - 'bt_adapter_set_name_changed_cb', - 'bt_adapter_set_passkey_notification', - 'bt_adapter_set_remote_oob_data', - 'bt_adapter_set_remote_oob_ext_data', - 'bt_adapter_set_state_changed_cb', - 'bt_adapter_set_visibility', - 'bt_adapter_set_visibility_duration_changed_cb', - 'bt_adapter_set_visibility_mode_changed_cb', - 'bt_adapter_start_device_discovery', - 'bt_adapter_stop_device_discovery', - 'bt_adapter_unset_authentication_req_cb', - 'bt_adapter_unset_connectable_changed_cb', - 'bt_adapter_unset_device_discovery_state_changed_cb', - 'bt_adapter_unset_manufacturer_data_changed_cb', - 'bt_adapter_unset_name_changed_cb', - 'bt_adapter_unset_passkey_notification', - 'bt_adapter_unset_state_changed_cb', - 'bt_adapter_unset_visibility_duration_changed_cb', - 'bt_adapter_unset_visibility_mode_changed_cb', - 'bt_ag_close_sco', - 'bt_ag_get_speaker_gain', - 'bt_ag_is_connected', - 'bt_ag_is_nrec_enabled', - 'bt_ag_is_sco_opened', - 'bt_ag_is_wbs_mode', - 'bt_ag_notify_call_event', - 'bt_ag_notify_call_list', - 'bt_ag_notify_speaker_gain', - 'bt_ag_notify_vendor_cmd', - 'bt_ag_notify_voice_recognition_state', - 'bt_ag_open_sco', - 'bt_ag_set_call_handling_event_cb', - 'bt_ag_set_dtmf_transmitted_cb', - 'bt_ag_set_microphone_gain_changed_cb', - 'bt_ag_set_multi_call_handling_event_cb', - 'bt_ag_set_sco_state_changed_cb', - 'bt_ag_set_speaker_gain_changed_cb', - 'bt_ag_set_vendor_cmd_cb', - 'bt_ag_switch_headset', - 'bt_ag_unset_call_handling_event_cb', - 'bt_ag_unset_dtmf_transmitted_cb', - 'bt_ag_unset_microphone_gain_changed_cb', - 'bt_ag_unset_multi_call_handling_event_cb', - 'bt_ag_unset_sco_state_changed_cb', - 'bt_ag_unset_speaker_gain_changed_cb', - 'bt_ag_unset_vendor_cmd_cb', - 'bt_audio_connect', - 'bt_audio_deinitialize', - 'bt_audio_disconnect', - 'bt_audio_initialize', - 'bt_audio_select_role', - 'bt_audio_set_connection_state_changed_cb', - 'bt_audio_unset_connection_state_changed_cb', - 'bt_avrcp_control_connect', - 'bt_avrcp_control_decrease_volume', - 'bt_avrcp_control_deinitialize', - 'bt_avrcp_control_disconnect', - 'bt_avrcp_control_free_track_info', - 'bt_avrcp_control_get_equalizer_state', - 'bt_avrcp_control_get_play_status', - 'bt_avrcp_control_get_position', - 'bt_avrcp_control_get_repeat_mode', - 'bt_avrcp_control_get_scan_mode', - 'bt_avrcp_control_get_shuffle_mode', - 'bt_avrcp_control_get_track_info', - 'bt_avrcp_control_increase_volume', - 'bt_avrcp_control_initialize', - 'bt_avrcp_control_send_delay_report', - 'bt_avrcp_control_send_player_command', - 'bt_avrcp_control_set_absolute_volume', - 'bt_avrcp_control_set_equalizer_state', - 'bt_avrcp_control_set_repeat_mode', - 'bt_avrcp_control_set_scan_mode', - 'bt_avrcp_control_set_shuffle_mode', - 'bt_avrcp_set_delay_changed_cb', - 'bt_avrcp_set_equalizer_state_changed_cb', - 'bt_avrcp_set_play_status_changed_cb', - 'bt_avrcp_set_position_changed_cb', - 'bt_avrcp_set_repeat_mode_changed_cb', - 'bt_avrcp_set_scan_mode_changed_cb', - 'bt_avrcp_set_shuffle_mode_changed_cb', - 'bt_avrcp_set_track_info_changed_cb', - 'bt_avrcp_target_connect', - 'bt_avrcp_target_deinitialize', - 'bt_avrcp_target_disconnect', - 'bt_avrcp_target_initialize', - 'bt_avrcp_target_notify_equalizer_state', - 'bt_avrcp_target_notify_player_state', - 'bt_avrcp_target_notify_position', - 'bt_avrcp_target_notify_repeat_mode', - 'bt_avrcp_target_notify_scan_mode', - 'bt_avrcp_target_notify_shuffle_mode', - 'bt_avrcp_target_notify_track', - 'bt_avrcp_unset_delay_changed_cb', - 'bt_avrcp_unset_equalizer_state_changed_cb', - 'bt_avrcp_unset_play_status_changed_cb', - 'bt_avrcp_unset_position_changed_cb', - 'bt_avrcp_unset_repeat_mode_changed_cb', - 'bt_avrcp_unset_scan_mode_changed_cb', - 'bt_avrcp_unset_shuffle_mode_changed_cb', - 'bt_avrcp_unset_track_info_changed_cb', - 'bt_call_list_add', - 'bt_call_list_create', - 'bt_call_list_destroy', - 'bt_call_list_reset', - 'bt_deinitialize', - 'bt_device_cancel_bonding', - 'bt_device_cancel_service_search', - 'bt_device_create_bond', - 'bt_device_create_bond_by_type', - 'bt_device_destroy_bond', - 'bt_device_disable_rssi_monitor', - 'bt_device_enable_rssi_monitor', - 'bt_device_foreach_connected_profiles', - 'bt_device_get_att_mtu', - 'bt_device_get_connection_state', - 'bt_device_get_id_address', - 'bt_device_get_profile_restricted', - 'bt_device_get_profile_trusted', - 'bt_device_get_rssi_strength', - 'bt_device_get_service_mask_from_uuid_list', - 'bt_device_is_profile_connected', - 'bt_device_le_conn_update', - 'bt_device_le_set_data_length', - 'bt_device_le_set_data_length_change_cb', - 'bt_device_request_att_mtu', - 'bt_device_set_alias', - 'bt_device_set_att_mtu_changed_cb', - 'bt_device_set_authorization', - 'bt_device_set_authorization_changed_cb', - 'bt_device_set_bond_created_cb', - 'bt_device_set_bond_destroyed_cb', - 'bt_device_set_connection_state_changed_cb', - 'bt_device_set_pin_code', - 'bt_device_set_profile_restricted', - 'bt_device_set_profile_trusted', - 'bt_device_set_service_searched_cb', - 'bt_device_set_trusted_profile_cb', - 'bt_device_start_service_search', - 'bt_device_unset_att_mtu_changed_cb', - 'bt_device_unset_authorization_changed_cb', - 'bt_device_unset_bond_created_cb', - 'bt_device_unset_bond_destroyed_cb', - 'bt_device_unset_connection_state_changed_cb', - 'bt_device_unset_pin_code', - 'bt_device_unset_rssi_alert_cb', - 'bt_device_unset_service_searched_cb', - 'bt_device_unset_trusted_profile_cb', - 'bt_device_update_le_connection_mode', - 'bt_dpm_activate_device_restriction', - 'bt_dpm_activate_uuid_restriction', - 'bt_dpm_add_devices_to_blacklist', - 'bt_dpm_add_devices_to_whitelist', - 'bt_dpm_add_uuids_to_blacklist', - 'bt_dpm_add_uuids_to_whitelist', - 'bt_dpm_clear_devices_from_blacklist', - 'bt_dpm_clear_devices_from_whitelist', - 'bt_dpm_clear_uuids_from_blacklist', - 'bt_dpm_clear_uuids_from_whitelist', - 'bt_dpm_get_allow_bluetooth_mode', - 'bt_dpm_get_allow_outgoing_call', - 'bt_dpm_get_data_transfer_state', - 'bt_dpm_get_desktop_connectivity_state', - 'bt_dpm_get_devices_from_blacklist', - 'bt_dpm_get_devices_from_whitelist', - 'bt_dpm_get_discoverable_state', - 'bt_dpm_get_limited_discoverable_state', - 'bt_dpm_get_pairing_state', - 'bt_dpm_get_profile_state', - 'bt_dpm_get_uuids_from_blacklist', - 'bt_dpm_get_uuids_from_whitelist', - 'bt_dpm_is_device_restriction_active', - 'bt_dpm_is_uuid_restriction_active', - 'bt_dpm_remove_device_from_blacklist', - 'bt_dpm_remove_device_from_whitelist', - 'bt_dpm_remove_uuid_from_blacklist', - 'bt_dpm_remove_uuid_from_whitelist', - 'bt_dpm_set_allow_bluetooth_mode', - 'bt_dpm_set_allow_outgoing_call', - 'bt_dpm_set_data_transfer_state', - 'bt_dpm_set_desktop_connectivity_state', - 'bt_dpm_set_discoverable_state', - 'bt_dpm_set_limited_discoverable_state', - 'bt_dpm_set_pairing_state', - 'bt_dpm_set_profile_state', - 'bt_gatt_characteristic_add_descriptor', - 'bt_gatt_characteristic_create', - 'bt_gatt_characteristic_destroy', - 'bt_gatt_characteristic_foreach_descriptors', - 'bt_gatt_characteristic_get_descriptor', - 'bt_gatt_characteristic_get_permissions', - 'bt_gatt_characteristic_get_properties', - 'bt_gatt_characteristic_get_service', - 'bt_gatt_characteristic_get_write_type', - 'bt_gatt_characteristic_set_properties', - 'bt_gatt_characteristic_set_write_type', - 'bt_gatt_client_create', - 'bt_gatt_client_destroy', - 'bt_gatt_client_foreach_services', - 'bt_gatt_client_get_att_mtu', - 'bt_gatt_client_get_remote_address', - 'bt_gatt_client_get_service', - 'bt_gatt_client_read_value', - 'bt_gatt_client_request_att_mtu_change', - 'bt_gatt_client_set_att_mtu_changed_cb', - 'bt_gatt_client_set_characteristic_value_changed_cb', - 'bt_gatt_client_set_service_changed_cb', - 'bt_gatt_client_unset_att_mtu_changed_cb', - 'bt_gatt_client_unset_characteristic_value_changed_cb', - 'bt_gatt_client_unset_service_changed_cb', - 'bt_gatt_client_write_value', - 'bt_gatt_connect', - 'bt_gatt_descriptor_create', - 'bt_gatt_descriptor_destroy', - 'bt_gatt_descriptor_get_characteristic', - 'bt_gatt_descriptor_get_permissions', - 'bt_gatt_destroy', - 'bt_gatt_disconnect', - 'bt_gatt_get_float_value', - 'bt_gatt_get_int_value', - 'bt_gatt_get_type', - 'bt_gatt_get_uuid', - 'bt_gatt_get_value', - 'bt_gatt_server_create', - 'bt_gatt_server_deinitialize', - 'bt_gatt_server_destroy', - 'bt_gatt_server_foreach_services', - 'bt_gatt_server_get_service', - 'bt_gatt_server_initialize', - 'bt_gatt_server_notify_characteristic_changed_value', - 'bt_gatt_server_register_service', - 'bt_gatt_server_send_response', - 'bt_gatt_server_set_characteristic_notification_state_change_cb', - 'bt_gatt_server_set_read_value_requested_cb', - 'bt_gatt_server_set_write_value_requested_cb', - 'bt_gatt_server_start', - 'bt_gatt_server_unregister_all_services', - 'bt_gatt_server_unregister_service', - 'bt_gatt_service_add_characteristic', - 'bt_gatt_service_add_included_service', - 'bt_gatt_service_create', - 'bt_gatt_service_destroy', - 'bt_gatt_service_foreach_characteristics', - 'bt_gatt_service_foreach_included_services', - 'bt_gatt_service_get_characteristic', - 'bt_gatt_service_get_client', - 'bt_gatt_service_get_included_service', - 'bt_gatt_service_get_server', - 'bt_gatt_set_connection_state_changed_cb', - 'bt_gatt_set_float_value', - 'bt_gatt_set_int_value', - 'bt_gatt_set_permissions', - 'bt_gatt_set_value', - 'bt_gatt_unset_connection_state_changed_cb', - 'bt_get_uuid_name', - 'bt_hdp_connect_to_source', - 'bt_hdp_disconnect', - 'bt_hdp_register_sink_app', - 'bt_hdp_send_data', - 'bt_hdp_set_connection_state_changed_cb', - 'bt_hdp_set_data_received_cb', - 'bt_hdp_unregister_sink_app', - 'bt_hdp_unset_connection_state_changed_cb', - 'bt_hdp_unset_data_received_cb', - 'bt_hf_close_sco', - 'bt_hf_deinitialize', - 'bt_hf_free_call_status_info_list', - 'bt_hf_get_call_status_info_list', - 'bt_hf_get_codec_id', - 'bt_hf_initialize', - 'bt_hf_is_connected', - 'bt_hf_is_inband_ringtone_supported', - 'bt_hf_is_sco_opened', - 'bt_hf_notify_call_event', - 'bt_hf_notify_speaker_gain', - 'bt_hf_notify_vendor_cmd', - 'bt_hf_notify_voice_recognition_state', - 'bt_hf_request_call_status_info_list', - 'bt_hf_send_dtmf', - 'bt_hf_set_call_handling_event_cb', - 'bt_hf_set_call_status_updated_event_cb', - 'bt_hf_set_multi_call_handling_event_cb', - 'bt_hf_set_remote_call_event_cb', - 'bt_hf_set_remote_device_state_changed_cb', - 'bt_hf_set_sco_state_changed_cb', - 'bt_hf_set_speaker_gain_changed_cb', - 'bt_hf_set_vendor_dep_cmd_event_cb', - 'bt_hf_unset_call_handling_event_cb', - 'bt_hf_unset_call_status_updated_event_cb', - 'bt_hf_unset_multi_call_handling_event_cb', - 'bt_hf_unset_remote_call_event_cb', - 'bt_hf_unset_remote_device_state_changed_cb', - 'bt_hf_unset_sco_state_changed_cb', - 'bt_hf_unset_speaker_gain_changed_cb', - 'bt_hf_unset_vendor_dep_cmd_event_cb', - 'bt_hid_device_activate', - 'bt_hid_device_connect', - 'bt_hid_device_deactivate', - 'bt_hid_device_disconnect', - 'bt_hid_device_reply_to_report', - 'bt_hid_device_send_custom_event', - 'bt_hid_device_send_key_event', - 'bt_hid_device_send_mouse_event', - 'bt_hid_device_set_data_received_cb', - 'bt_hid_device_unset_data_received_cb', - 'bt_hid_host_connect', - 'bt_hid_host_deinitialize', - 'bt_hid_host_disconnect', - 'bt_hid_host_initialize', - 'bt_hrp_collector_connect', - 'bt_hrp_collector_create', - 'bt_hrp_collector_destory', - 'bt_hrp_collector_disconnect', - 'bt_hrp_collector_get_body_sensor_location', - 'bt_hrp_collector_set_connection_state_changed_cb', - 'bt_hrp_collector_set_notification', - 'bt_hrp_collector_start_scan', - 'bt_hrp_collector_stop_scan', - 'bt_hrp_collector_unset_connection_state_changed_cb', - 'bt_hrp_sensor_create', - 'bt_hrp_sensor_destroy', - 'bt_hrp_sensor_set_contact_value', - 'bt_hrp_sensor_set_device_manufacturer_name', - 'bt_hrp_sensor_set_energy_value', - 'bt_hrp_sensor_set_heartrate_value', - 'bt_hrp_sensor_set_location_value', - 'bt_hrp_sensor_set_rr_interval', - 'bt_initialize', - 'bt_ipsp_connect', - 'bt_ipsp_deinitialize', - 'bt_ipsp_disconnect', - 'bt_ipsp_initialize', - 'bt_ipsp_set_connection_state_changed_cb', - 'bt_ipsp_unset_connection_state_changed_cb', - 'bt_map_client_create_session', - 'bt_map_client_deinitialize', - 'bt_map_client_destroy_session', - 'bt_map_client_get_message', - 'bt_map_client_initialize', - 'bt_map_client_list_filter_fields', - 'bt_map_client_list_folders', - 'bt_map_client_list_folders_filter_create', - 'bt_map_client_list_folders_filter_destroy', - 'bt_map_client_list_messages', - 'bt_map_client_list_messages_filter_create', - 'bt_map_client_list_messages_filter_destroy', - 'bt_map_client_push_message', - 'bt_map_client_push_message_args_create', - 'bt_map_client_push_message_args_destroy', - 'bt_map_client_set_folder', - 'bt_map_client_update_inbox', - 'bt_nap_activate', - 'bt_nap_deactivate', - 'bt_nap_disconnect', - 'bt_nap_disconnect_all', - 'bt_nap_set_connection_state_changed_cb', - 'bt_nap_unset_connection_state_changed_cb', - 'bt_opp_client_add_file', - 'bt_opp_client_cancel_push', - 'bt_opp_client_clear_files', - 'bt_opp_client_deinitialize', - 'bt_opp_client_initialize', - 'bt_opp_client_push_files', - 'bt_opp_get_transfer_progress', - 'bt_opp_server_accept', - 'bt_opp_server_cancel_transfer', - 'bt_opp_server_deinitialize', - 'bt_opp_server_initialize', - 'bt_opp_server_initialize_by_connection_request', - 'bt_opp_server_reject', - 'bt_opp_server_set_destination', - 'bt_otp_client_connect', - 'bt_otp_client_create', - 'bt_otp_client_create_object', - 'bt_otp_client_delete_object', - 'bt_otp_client_destroy', - 'bt_otp_client_disconnect', - 'bt_otp_client_discover_all_objects', - 'bt_otp_client_execute_object', - 'bt_otp_client_read_object_contents', - 'bt_otp_client_select_object', - 'bt_otp_client_set_connection_state_changed_cb', - 'bt_otp_client_unset_connection_state_changed_cb', - 'bt_otp_client_write_object', - 'bt_otp_server_deinitialize', - 'bt_otp_server_initialize', - 'bt_otp_set_server_state_changed_cb', - 'bt_otp_unset_server_state_changed_cb', - 'bt_panu_connect', - 'bt_panu_disconnect', - 'bt_panu_set_connection_state_changed_cb', - 'bt_panu_unset_connection_state_changed_cb', - 'bt_pbap_client_connect', - 'bt_pbap_client_deinitialize', - 'bt_pbap_client_disconnect', - 'bt_pbap_client_get_list', - 'bt_pbap_client_get_phone_book', - 'bt_pbap_client_get_phone_book_size', - 'bt_pbap_client_initialize', - 'bt_pbap_client_is_connected', - 'bt_pbap_client_pull_vcard', - 'bt_pbap_client_search_phone_book', - 'bt_pbap_client_set_connection_state_changed_cb', - 'bt_pbap_client_unset_connection_state_changed_cb', - 'bt_proximity_monitor_connect', - 'bt_proximity_monitor_create', - 'bt_proximity_monitor_destroy', - 'bt_proximity_monitor_disconnect', - 'bt_proximity_monitor_get_immediate_alert', - 'bt_proximity_monitor_get_linkloss_alert', - 'bt_proximity_monitor_get_signal_level', - 'bt_proximity_monitor_set_connection_state_changed_cb', - 'bt_proximity_monitor_set_immediate_alert', - 'bt_proximity_monitor_set_linkloss_alert', - 'bt_proximity_monitor_unset_connection_state_changed_cb', - 'bt_proximity_reporter_create', - 'bt_proximity_reporter_destroy', - 'bt_proximity_reporter_get_immediate_alert', - 'bt_proximity_reporter_get_linkloss_alert', - 'bt_proximity_reporter_set_connection_state_changed_cb', - 'bt_proximity_reporter_set_property_changed_cb', - 'bt_proximity_reporter_unset_connection_state_changed_cb', - 'bt_proximity_reporter_unset_property_changed_cb', - 'bt_socket_accept', - 'bt_socket_connect_rfcomm', - 'bt_socket_create_rfcomm', - 'bt_socket_create_rfcomm_ex', - 'bt_socket_destroy_rfcomm', - 'bt_socket_destroy_rfcomm_ex', - 'bt_socket_disconnect_rfcomm', - 'bt_socket_is_service_used', - 'bt_socket_listen', - 'bt_socket_listen_and_accept_rfcomm', - 'bt_socket_listen_and_accept_rfcomm_ex', - 'bt_socket_reject', - 'bt_socket_send_data', - 'bt_socket_set_connection_requested_cb', - 'bt_socket_set_connection_state_changed_cb', - 'bt_socket_set_data_received_cb', - 'bt_socket_unset_connection_requested_cb', - 'bt_socket_unset_connection_state_changed_cb', - 'bt_socket_unset_data_received_cb', - 'bt_tds_provider_create', - 'bt_tds_provider_destroy', - 'bt_tds_provider_register', - 'bt_tds_provider_send_activation_resp', - 'bt_tds_provider_set_manufacturer_data', - 'bt_tds_provider_set_transport_data', - 'bt_tds_provider_unregister', - 'bt_tds_seeker_activate_control_point', - 'bt_tds_seeker_connect', - 'bt_tds_seeker_create', - 'bt_tds_seeker_destroy', - 'bt_tds_seeker_disconnect', - 'bt_tds_seeker_get_complete_transport_blocks', - 'bt_tds_seeker_set_connection_state_changed_cb', - 'bt_tds_seeker_unset_connection_state_changed_cb', - 'bt_tds_set_transport_activation_requested_cb', - 'bt_tds_start_seeking_providers', - 'bt_tds_stop_seeking_providers', - 'bt_tds_unset_transport_activation_requested_cb', - ], - 'libcapi-network-connection.so.1': [ - 'connection_add_profile', - 'connection_add_route', - 'connection_add_route_entry', - 'connection_add_route_ipv6', - 'connection_close_profile', - 'connection_create', - 'connection_create_cs', - 'connection_destroy', - 'connection_destroy_cs', - 'connection_destroy_profile_iterator', - 'connection_foreach_ipv6_address', - 'connection_get_bt_state', - 'connection_get_cellular_state', - 'connection_get_current_profile', - 'connection_get_default_cellular_service_profile', - 'connection_get_ethernet_cable_state', - 'connection_get_ethernet_state', - 'connection_get_ip_address', - 'connection_get_mac_address', - 'connection_get_profile_iterator', - 'connection_get_proxy', - 'connection_get_statistics', - 'connection_get_type', - 'connection_get_wifi_state', - 'connection_is_metered_network', - 'connection_mptcp_disable', - 'connection_mptcp_enable', - 'connection_mptcp_get_enabled', - 'connection_mptcp_get_path_manager', - 'connection_mptcp_get_scheduler', - 'connection_mptcp_is_supported', - 'connection_mptcp_set_path_manager', - 'connection_mptcp_set_scheduler', - 'connection_open_profile', - 'connection_profile_clone', - 'connection_profile_create', - 'connection_profile_destroy', - 'connection_profile_get_cellular_apn', - 'connection_profile_get_cellular_auth_info', - 'connection_profile_get_cellular_home_url', - 'connection_profile_get_cellular_pdn_type', - 'connection_profile_get_cellular_roam_pdn_type', - 'connection_profile_get_cellular_service_type', - 'connection_profile_get_dhcp_lease_duration', - 'connection_profile_get_dhcp_server_address', - 'connection_profile_get_dns_address', - 'connection_profile_get_dns_config_type', - 'connection_profile_get_gateway_address', - 'connection_profile_get_id', - 'connection_profile_get_ip_address', - 'connection_profile_get_ip_config_type', - 'connection_profile_get_ipv6_state', - 'connection_profile_get_name', - 'connection_profile_get_network_interface_name', - 'connection_profile_get_prefix_length', - 'connection_profile_get_proxy_address', - 'connection_profile_get_proxy_type', - 'connection_profile_get_state', - 'connection_profile_get_subnet_mask', - 'connection_profile_get_tcpdump_state', - 'connection_profile_get_type', - 'connection_profile_get_wifi_bssid', - 'connection_profile_get_wifi_encryption_type', - 'connection_profile_get_wifi_essid', - 'connection_profile_get_wifi_frequency', - 'connection_profile_get_wifi_max_speed', - 'connection_profile_get_wifi_rssi', - 'connection_profile_get_wifi_security_type', - 'connection_profile_is_cellular_default', - 'connection_profile_is_cellular_editable', - 'connection_profile_is_cellular_hidden', - 'connection_profile_is_cellular_roaming', - 'connection_profile_is_wifi_passphrase_required', - 'connection_profile_is_wifi_wps_supported', - 'connection_profile_iterator_has_next', - 'connection_profile_iterator_next', - 'connection_profile_refresh', - 'connection_profile_set_cellular_apn', - 'connection_profile_set_cellular_auth_info', - 'connection_profile_set_cellular_home_url', - 'connection_profile_set_cellular_pdn_type', - 'connection_profile_set_cellular_roam_pdn_type', - 'connection_profile_set_cellular_service_type', - 'connection_profile_set_dns_address', - 'connection_profile_set_dns_config_type', - 'connection_profile_set_gateway_address', - 'connection_profile_set_ip_address', - 'connection_profile_set_ip_config_type', - 'connection_profile_set_prefix_length', - 'connection_profile_set_proxy_address', - 'connection_profile_set_proxy_type', - 'connection_profile_set_state_changed_cb', - 'connection_profile_set_subnet_mask', - 'connection_profile_set_wifi_passphrase', - 'connection_profile_start_tcpdump', - 'connection_profile_stop_tcpdump', - 'connection_profile_unset_state_changed_cb', - 'connection_remove_profile', - 'connection_remove_route', - 'connection_remove_route_entry', - 'connection_remove_route_ipv6', - 'connection_reset_profile', - 'connection_reset_statistics', - 'connection_set_default_cellular_service_profile', - 'connection_set_default_cellular_service_profile_async', - 'connection_set_ethernet_cable_state_chaged_cb', - 'connection_set_ethernet_cable_state_changed_cb', - 'connection_set_ip_address_changed_cb', - 'connection_set_proxy_address_changed_cb', - 'connection_set_type_changed_cb', - 'connection_unset_ethernet_cable_state_chaged_cb', - 'connection_unset_ethernet_cable_state_changed_cb', - 'connection_unset_ip_address_changed_cb', - 'connection_unset_proxy_address_changed_cb', - 'connection_unset_type_changed_cb', - 'connection_update_profile', - ], - 'libnsd-dns-sd.so.0': [ - 'dnssd_create_local_service', - 'dnssd_deinitialize', - 'dnssd_deregister_local_service', - 'dnssd_destroy_local_service', - 'dnssd_initialize', - 'dnssd_register_local_service', - 'dnssd_service_add_txt_record', - 'dnssd_service_get_all_txt_record', - 'dnssd_service_get_ip', - 'dnssd_service_get_name', - 'dnssd_service_get_port', - 'dnssd_service_get_type', - 'dnssd_service_remove_txt_record', - 'dnssd_service_set_interface', - 'dnssd_service_set_name', - 'dnssd_service_set_port', - 'dnssd_service_set_record', - 'dnssd_service_unset_record', - 'dnssd_start_browsing_service', - 'dnssd_start_browsing_service_on_interface', - 'dnssd_stop_browsing_service', - ], - 'libcapi-network-http.so.0.1.0': [ - 'http_deinit', - 'http_init', - 'http_session_create', - 'http_session_destroy', - 'http_session_destroy_all_transactions', - 'http_session_get_active_transaction_count', - 'http_session_get_auto_redirection', - 'http_session_get_max_transaction_count', - 'http_session_open_transaction', - 'http_session_set_auto_redirection', - 'http_transaction_cancel', - 'http_transaction_destroy', - 'http_transaction_get_credentials', - 'http_transaction_get_http_auth_scheme', - 'http_transaction_get_interface_name', - 'http_transaction_get_realm', - 'http_transaction_get_server_certificate_verification', - 'http_transaction_get_tcp_fastopen', - 'http_transaction_get_timeout', - 'http_transaction_header_add_field', - 'http_transaction_header_get_field_value', - 'http_transaction_header_remove_field', - 'http_transaction_open_authentication', - 'http_transaction_pause', - 'http_transaction_request_add_multipart', - 'http_transaction_request_get_accept_encoding', - 'http_transaction_request_get_cookie', - 'http_transaction_request_get_method', - 'http_transaction_request_get_uri', - 'http_transaction_request_get_version', - 'http_transaction_request_set_accept_encoding', - 'http_transaction_request_set_cookie', - 'http_transaction_request_set_method', - 'http_transaction_request_set_upload_file', - 'http_transaction_request_set_uri', - 'http_transaction_request_set_version', - 'http_transaction_request_write_body', - 'http_transaction_response_get_status_code', - 'http_transaction_response_get_status_text', - 'http_transaction_response_get_version', - 'http_transaction_resume', - 'http_transaction_set_aborted_cb', - 'http_transaction_set_completed_cb', - 'http_transaction_set_credentials', - 'http_transaction_set_http_auth_scheme', - 'http_transaction_set_interface_name', - 'http_transaction_set_progress_cb', - 'http_transaction_set_ready_to_write', - 'http_transaction_set_received_body_cb', - 'http_transaction_set_received_header_cb', - 'http_transaction_set_server_certificate_verification', - 'http_transaction_set_tcp_fastopen', - 'http_transaction_set_timeout', - 'http_transaction_set_uploaded_cb', - 'http_transaction_submit', - ], - 'libiotcon.so.0': [ - 'iotcon_add_generated_pin_cb', - 'iotcon_add_presence_cb', - 'iotcon_attributes_add_attributes', - 'iotcon_attributes_add_bool', - 'iotcon_attributes_add_byte_str', - 'iotcon_attributes_add_double', - 'iotcon_attributes_add_int', - 'iotcon_attributes_add_list', - 'iotcon_attributes_add_null', - 'iotcon_attributes_add_str', - 'iotcon_attributes_clone', - 'iotcon_attributes_create', - 'iotcon_attributes_destroy', - 'iotcon_attributes_foreach', - 'iotcon_attributes_get_attributes', - 'iotcon_attributes_get_bool', - 'iotcon_attributes_get_byte_str', - 'iotcon_attributes_get_double', - 'iotcon_attributes_get_int', - 'iotcon_attributes_get_keys_count', - 'iotcon_attributes_get_list', - 'iotcon_attributes_get_str', - 'iotcon_attributes_get_type', - 'iotcon_attributes_is_null', - 'iotcon_attributes_remove', - 'iotcon_deinitialize', - 'iotcon_device_info_get_property', - 'iotcon_find_device_info', - 'iotcon_find_platform_info', - 'iotcon_find_resource', - 'iotcon_get_timeout', - 'iotcon_initialize', - 'iotcon_list_add_attributes', - 'iotcon_list_add_bool', - 'iotcon_list_add_byte_str', - 'iotcon_list_add_double', - 'iotcon_list_add_int', - 'iotcon_list_add_list', - 'iotcon_list_add_str', - 'iotcon_list_create', - 'iotcon_list_destroy', - 'iotcon_list_foreach_attributes', - 'iotcon_list_foreach_bool', - 'iotcon_list_foreach_byte_str', - 'iotcon_list_foreach_double', - 'iotcon_list_foreach_int', - 'iotcon_list_foreach_list', - 'iotcon_list_foreach_str', - 'iotcon_list_get_length', - 'iotcon_list_get_nth_attributes', - 'iotcon_list_get_nth_bool', - 'iotcon_list_get_nth_byte_str', - 'iotcon_list_get_nth_double', - 'iotcon_list_get_nth_int', - 'iotcon_list_get_nth_list', - 'iotcon_list_get_nth_str', - 'iotcon_list_get_type', - 'iotcon_list_remove_nth', - 'iotcon_lite_resource_create', - 'iotcon_lite_resource_destroy', - 'iotcon_lite_resource_get_attributes', - 'iotcon_lite_resource_update_attributes', - 'iotcon_observers_add', - 'iotcon_observers_create', - 'iotcon_observers_destroy', - 'iotcon_observers_remove', - 'iotcon_options_add', - 'iotcon_options_create', - 'iotcon_options_destroy', - 'iotcon_options_foreach', - 'iotcon_options_lookup', - 'iotcon_options_remove', - 'iotcon_platform_info_get_property', - 'iotcon_polling_get_interval', - 'iotcon_polling_invoke', - 'iotcon_polling_set_interval', - 'iotcon_presence_get_connectivity_type', - 'iotcon_presence_get_host_address', - 'iotcon_presence_get_resource_type', - 'iotcon_presence_response_get_connectivity_type', - 'iotcon_presence_response_get_host_address', - 'iotcon_presence_response_get_resource_type', - 'iotcon_presence_response_get_result', - 'iotcon_presence_response_get_trigger', - 'iotcon_provisioning_acl_add_resource', - 'iotcon_provisioning_acl_create', - 'iotcon_provisioning_acl_destroy', - 'iotcon_provisioning_acl_set_all_subject', - 'iotcon_provisioning_acl_set_permission', - 'iotcon_provisioning_acl_set_subject', - 'iotcon_provisioning_device_clone', - 'iotcon_provisioning_device_destroy', - 'iotcon_provisioning_device_get_connectivity_type', - 'iotcon_provisioning_device_get_host_address', - 'iotcon_provisioning_device_get_id', - 'iotcon_provisioning_device_get_oxm', - 'iotcon_provisioning_device_is_owned', - 'iotcon_provisioning_find_device', - 'iotcon_provisioning_initialize', - 'iotcon_provisioning_pairwise_devices', - 'iotcon_provisioning_provision_acl', - 'iotcon_provisioning_provision_cred', - 'iotcon_provisioning_register_unowned_device', - 'iotcon_provisioning_remove_device', - 'iotcon_provisioning_set_randompin_cb', - 'iotcon_provisioning_unlink_pairwise', - 'iotcon_query_add', - 'iotcon_query_create', - 'iotcon_query_destroy', - 'iotcon_query_foreach', - 'iotcon_query_get_interface', - 'iotcon_query_get_resource_type', - 'iotcon_query_lookup', - 'iotcon_query_remove', - 'iotcon_query_set_interface', - 'iotcon_query_set_resource_type', - 'iotcon_remote_resource_clone', - 'iotcon_remote_resource_create', - 'iotcon_remote_resource_delete', - 'iotcon_remote_resource_destroy', - 'iotcon_remote_resource_get', - 'iotcon_remote_resource_get_cached_representation', - 'iotcon_remote_resource_get_checking_interval', - 'iotcon_remote_resource_get_connectivity_type', - 'iotcon_remote_resource_get_device_id', - 'iotcon_remote_resource_get_device_name', - 'iotcon_remote_resource_get_host_address', - 'iotcon_remote_resource_get_interfaces', - 'iotcon_remote_resource_get_options', - 'iotcon_remote_resource_get_policies', - 'iotcon_remote_resource_get_types', - 'iotcon_remote_resource_get_uri_path', - 'iotcon_remote_resource_observe_deregister', - 'iotcon_remote_resource_observe_register', - 'iotcon_remote_resource_post', - 'iotcon_remote_resource_put', - 'iotcon_remote_resource_set_checking_interval', - 'iotcon_remote_resource_set_options', - 'iotcon_remote_resource_start_caching', - 'iotcon_remote_resource_start_monitoring', - 'iotcon_remote_resource_stop_caching', - 'iotcon_remote_resource_stop_monitoring', - 'iotcon_remove_generated_pin_cb', - 'iotcon_remove_presence_cb', - 'iotcon_representation_add_child', - 'iotcon_representation_clone', - 'iotcon_representation_create', - 'iotcon_representation_destroy', - 'iotcon_representation_foreach_children', - 'iotcon_representation_get_attributes', - 'iotcon_representation_get_child_count', - 'iotcon_representation_get_nth_child', - 'iotcon_representation_get_resource_interfaces', - 'iotcon_representation_get_resource_types', - 'iotcon_representation_get_uri_path', - 'iotcon_representation_remove_child', - 'iotcon_representation_set_attributes', - 'iotcon_representation_set_resource_interfaces', - 'iotcon_representation_set_resource_types', - 'iotcon_representation_set_uri_path', - 'iotcon_request_get_connectivity_type', - 'iotcon_request_get_host_address', - 'iotcon_request_get_observe_id', - 'iotcon_request_get_observe_type', - 'iotcon_request_get_options', - 'iotcon_request_get_query', - 'iotcon_request_get_representation', - 'iotcon_request_get_request_type', - 'iotcon_resource_bind_child_resource', - 'iotcon_resource_bind_interface', - 'iotcon_resource_bind_type', - 'iotcon_resource_create', - 'iotcon_resource_destroy', - 'iotcon_resource_get_child_count', - 'iotcon_resource_get_interfaces', - 'iotcon_resource_get_nth_child', - 'iotcon_resource_get_policies', - 'iotcon_resource_get_types', - 'iotcon_resource_get_uri_path', - 'iotcon_resource_interfaces_add', - 'iotcon_resource_interfaces_clone', - 'iotcon_resource_interfaces_create', - 'iotcon_resource_interfaces_destroy', - 'iotcon_resource_interfaces_foreach', - 'iotcon_resource_interfaces_remove', - 'iotcon_resource_notify', - 'iotcon_resource_set_request_handler', - 'iotcon_resource_types_add', - 'iotcon_resource_types_clone', - 'iotcon_resource_types_create', - 'iotcon_resource_types_destroy', - 'iotcon_resource_types_foreach', - 'iotcon_resource_types_remove', - 'iotcon_resource_unbind_child_resource', - 'iotcon_response_create', - 'iotcon_response_destroy', - 'iotcon_response_get_options', - 'iotcon_response_get_representation', - 'iotcon_response_get_result', - 'iotcon_response_send', - 'iotcon_response_set_options', - 'iotcon_response_set_representation', - 'iotcon_response_set_result', - 'iotcon_set_device_name', - 'iotcon_set_timeout', - 'iotcon_start_presence', - 'iotcon_stop_presence', - ], - 'libcapi-network-mtp.so.1': [ - 'mtp_add_mtp_event_cb', - 'mtp_db_deinit', - 'mtp_db_get_object_info', - 'mtp_db_init', - 'mtp_deinitialize', - 'mtp_delete_object', - 'mtp_deviceinfo_get_bus_location', - 'mtp_deviceinfo_get_device_number', - 'mtp_deviceinfo_get_device_version', - 'mtp_deviceinfo_get_manufacturer_name', - 'mtp_deviceinfo_get_model_name', - 'mtp_deviceinfo_get_serial_number', - 'mtp_deviceinfo_get_stitching_engine_version', - 'mtp_gdbus_deviceinfo_get_bus_location', - 'mtp_gdbus_deviceinfo_get_device_number', - 'mtp_gdbus_deviceinfo_get_device_version', - 'mtp_gdbus_deviceinfo_get_manufacturer_name', - 'mtp_gdbus_deviceinfo_get_model_name', - 'mtp_gdbus_deviceinfo_get_serial_number', - 'mtp_gdbus_deviceinfo_get_stitching_engine_version', - 'mtp_gdbus_deviceinfo_proxy_deinit', - 'mtp_gdbus_deviceinfo_proxy_init', - 'mtp_gdbuslib_deviceinfo_call_get_bus_location', - 'mtp_gdbuslib_deviceinfo_call_get_bus_location_finish', - 'mtp_gdbuslib_deviceinfo_call_get_bus_location_sync', - 'mtp_gdbuslib_deviceinfo_call_get_device_number', - 'mtp_gdbuslib_deviceinfo_call_get_device_number_finish', - 'mtp_gdbuslib_deviceinfo_call_get_device_number_sync', - 'mtp_gdbuslib_deviceinfo_call_get_device_version', - 'mtp_gdbuslib_deviceinfo_call_get_device_version_finish', - 'mtp_gdbuslib_deviceinfo_call_get_device_version_sync', - 'mtp_gdbuslib_deviceinfo_call_get_manufacturer_name', - 'mtp_gdbuslib_deviceinfo_call_get_manufacturer_name_finish', - 'mtp_gdbuslib_deviceinfo_call_get_manufacturer_name_sync', - 'mtp_gdbuslib_deviceinfo_call_get_model_name', - 'mtp_gdbuslib_deviceinfo_call_get_model_name_finish', - 'mtp_gdbuslib_deviceinfo_call_get_model_name_sync', - 'mtp_gdbuslib_deviceinfo_call_get_serial_number', - 'mtp_gdbuslib_deviceinfo_call_get_serial_number_finish', - 'mtp_gdbuslib_deviceinfo_call_get_serial_number_sync', - 'mtp_gdbuslib_deviceinfo_call_get_stitching_engine_version', - 'mtp_gdbuslib_deviceinfo_call_get_stitching_engine_version_finish', - 'mtp_gdbuslib_deviceinfo_call_get_stitching_engine_version_sync', - 'mtp_gdbuslib_deviceinfo_complete_get_bus_location', - 'mtp_gdbuslib_deviceinfo_complete_get_device_number', - 'mtp_gdbuslib_deviceinfo_complete_get_device_version', - 'mtp_gdbuslib_deviceinfo_complete_get_manufacturer_name', - 'mtp_gdbuslib_deviceinfo_complete_get_model_name', - 'mtp_gdbuslib_deviceinfo_complete_get_serial_number', - 'mtp_gdbuslib_deviceinfo_complete_get_stitching_engine_version', - 'mtp_gdbuslib_deviceinfo_get_type', - 'mtp_gdbuslib_deviceinfo_interface_info', - 'mtp_gdbuslib_deviceinfo_override_properties', - 'mtp_gdbuslib_deviceinfo_proxy_get_type', - 'mtp_gdbuslib_deviceinfo_proxy_new', - 'mtp_gdbuslib_deviceinfo_proxy_new_finish', - 'mtp_gdbuslib_deviceinfo_proxy_new_for_bus', - 'mtp_gdbuslib_deviceinfo_proxy_new_for_bus_finish', - 'mtp_gdbuslib_deviceinfo_proxy_new_for_bus_sync', - 'mtp_gdbuslib_deviceinfo_proxy_new_sync', - 'mtp_gdbuslib_deviceinfo_skeleton_get_type', - 'mtp_gdbuslib_deviceinfo_skeleton_new', - 'mtp_gdbuslib_manager_call_delete_object', - 'mtp_gdbuslib_manager_call_delete_object_finish', - 'mtp_gdbuslib_manager_call_delete_object_sync', - 'mtp_gdbuslib_manager_call_get_devices', - 'mtp_gdbuslib_manager_call_get_devices_finish', - 'mtp_gdbuslib_manager_call_get_devices_sync', - 'mtp_gdbuslib_manager_call_get_object', - 'mtp_gdbuslib_manager_call_get_object_finish', - 'mtp_gdbuslib_manager_call_get_object_handles', - 'mtp_gdbuslib_manager_call_get_object_handles_finish', - 'mtp_gdbuslib_manager_call_get_object_handles_sync', - 'mtp_gdbuslib_manager_call_get_object_sync', - 'mtp_gdbuslib_manager_call_get_partial_object', - 'mtp_gdbuslib_manager_call_get_partial_object_finish', - 'mtp_gdbuslib_manager_call_get_partial_object_sync', - 'mtp_gdbuslib_manager_call_get_storages', - 'mtp_gdbuslib_manager_call_get_storages_finish', - 'mtp_gdbuslib_manager_call_get_storages_sync', - 'mtp_gdbuslib_manager_call_get_thumbnail', - 'mtp_gdbuslib_manager_call_get_thumbnail_finish', - 'mtp_gdbuslib_manager_call_get_thumbnail_sync', - 'mtp_gdbuslib_manager_complete_delete_object', - 'mtp_gdbuslib_manager_complete_get_devices', - 'mtp_gdbuslib_manager_complete_get_object', - 'mtp_gdbuslib_manager_complete_get_object_handles', - 'mtp_gdbuslib_manager_complete_get_partial_object', - 'mtp_gdbuslib_manager_complete_get_storages', - 'mtp_gdbuslib_manager_complete_get_thumbnail', - 'mtp_gdbuslib_manager_emit_mtp_event', - 'mtp_gdbuslib_manager_get_type', - 'mtp_gdbuslib_manager_interface_info', - 'mtp_gdbuslib_manager_override_properties', - 'mtp_gdbuslib_manager_proxy_get_type', - 'mtp_gdbuslib_manager_proxy_new', - 'mtp_gdbuslib_manager_proxy_new_finish', - 'mtp_gdbuslib_manager_proxy_new_for_bus', - 'mtp_gdbuslib_manager_proxy_new_for_bus_finish', - 'mtp_gdbuslib_manager_proxy_new_for_bus_sync', - 'mtp_gdbuslib_manager_proxy_new_sync', - 'mtp_gdbuslib_manager_skeleton_get_type', - 'mtp_gdbuslib_manager_skeleton_new', - 'mtp_gdbuslib_objectinfo_call_get_property', - 'mtp_gdbuslib_objectinfo_call_get_property_finish', - 'mtp_gdbuslib_objectinfo_call_get_property_string', - 'mtp_gdbuslib_objectinfo_call_get_property_string_finish', - 'mtp_gdbuslib_objectinfo_call_get_property_string_sync', - 'mtp_gdbuslib_objectinfo_call_get_property_sync', - 'mtp_gdbuslib_objectinfo_complete_get_property', - 'mtp_gdbuslib_objectinfo_complete_get_property_string', - 'mtp_gdbuslib_objectinfo_get_type', - 'mtp_gdbuslib_objectinfo_interface_info', - 'mtp_gdbuslib_objectinfo_override_properties', - 'mtp_gdbuslib_objectinfo_proxy_get_type', - 'mtp_gdbuslib_objectinfo_proxy_new', - 'mtp_gdbuslib_objectinfo_proxy_new_finish', - 'mtp_gdbuslib_objectinfo_proxy_new_for_bus', - 'mtp_gdbuslib_objectinfo_proxy_new_for_bus_finish', - 'mtp_gdbuslib_objectinfo_proxy_new_for_bus_sync', - 'mtp_gdbuslib_objectinfo_proxy_new_sync', - 'mtp_gdbuslib_objectinfo_skeleton_get_type', - 'mtp_gdbuslib_objectinfo_skeleton_new', - 'mtp_gdbuslib_storageinfo_call_get_description', - 'mtp_gdbuslib_storageinfo_call_get_description_finish', - 'mtp_gdbuslib_storageinfo_call_get_description_sync', - 'mtp_gdbuslib_storageinfo_call_get_free_space', - 'mtp_gdbuslib_storageinfo_call_get_free_space_finish', - 'mtp_gdbuslib_storageinfo_call_get_free_space_sync', - 'mtp_gdbuslib_storageinfo_call_get_max_capacity', - 'mtp_gdbuslib_storageinfo_call_get_max_capacity_finish', - 'mtp_gdbuslib_storageinfo_call_get_max_capacity_sync', - 'mtp_gdbuslib_storageinfo_call_get_storage_type', - 'mtp_gdbuslib_storageinfo_call_get_storage_type_finish', - 'mtp_gdbuslib_storageinfo_call_get_storage_type_sync', - 'mtp_gdbuslib_storageinfo_call_get_volume_identifier', - 'mtp_gdbuslib_storageinfo_call_get_volume_identifier_finish', - 'mtp_gdbuslib_storageinfo_call_get_volume_identifier_sync', - 'mtp_gdbuslib_storageinfo_complete_get_description', - 'mtp_gdbuslib_storageinfo_complete_get_free_space', - 'mtp_gdbuslib_storageinfo_complete_get_max_capacity', - 'mtp_gdbuslib_storageinfo_complete_get_storage_type', - 'mtp_gdbuslib_storageinfo_complete_get_volume_identifier', - 'mtp_gdbuslib_storageinfo_get_type', - 'mtp_gdbuslib_storageinfo_interface_info', - 'mtp_gdbuslib_storageinfo_override_properties', - 'mtp_gdbuslib_storageinfo_proxy_get_type', - 'mtp_gdbuslib_storageinfo_proxy_new', - 'mtp_gdbuslib_storageinfo_proxy_new_finish', - 'mtp_gdbuslib_storageinfo_proxy_new_for_bus', - 'mtp_gdbuslib_storageinfo_proxy_new_for_bus_finish', - 'mtp_gdbuslib_storageinfo_proxy_new_for_bus_sync', - 'mtp_gdbuslib_storageinfo_proxy_new_sync', - 'mtp_gdbuslib_storageinfo_skeleton_get_type', - 'mtp_gdbuslib_storageinfo_skeleton_new', - 'mtp_gdbus_manager_add_event_cb', - 'mtp_gdbus_manager_deinitialize', - 'mtp_gdbus_manager_delete_object', - 'mtp_gdbus_manager_get_devices', - 'mtp_gdbus_manager_get_object', - 'mtp_gdbus_manager_get_object_handles', - 'mtp_gdbus_manager_get_partial_object', - 'mtp_gdbus_manager_get_storages', - 'mtp_gdbus_manager_get_thumbnail', - 'mtp_gdbus_manager_initialize', - 'mtp_gdbus_manager_remove_all_event_cb', - 'mtp_gdbus_manager_remove_event_cb', - 'mtp_gdbus_objectinfo_get_property', - 'mtp_gdbus_objectinfo_get_property_string', - 'mtp_gdbus_objectinfo_proxy_deinit', - 'mtp_gdbus_objectinfo_proxy_init', - 'mtp_gdbus_storageinfo_get_description', - 'mtp_gdbus_storageinfo_get_free_space', - 'mtp_gdbus_storageinfo_get_max_capacity', - 'mtp_gdbus_storageinfo_get_storage_type', - 'mtp_gdbus_storageinfo_get_volume_identifier', - 'mtp_gdbus_storageinfo_proxy_deinit', - 'mtp_gdbus_storageinfo_proxy_init', - 'mtp_get_devices', - 'mtp_get_object', - 'mtp_get_object_handles', - 'mtp_get_partial_object', - 'mtp_get_storages', - 'mtp_get_thumbnail', - 'mtp_initialize', - 'mtp_objectinfo_get_association_desc', - 'mtp_objectinfo_get_association_type', - 'mtp_objectinfo_get_date_created', - 'mtp_objectinfo_get_date_modified', - 'mtp_objectinfo_get_file_name', - 'mtp_objectinfo_get_file_type', - 'mtp_objectinfo_get_image_bit_depth', - 'mtp_objectinfo_get_image_pix_height', - 'mtp_objectinfo_get_image_pix_width', - 'mtp_objectinfo_get_keywords', - 'mtp_objectinfo_get_object_info', - 'mtp_objectinfo_get_parent_object_handle', - 'mtp_objectinfo_get_size', - 'mtp_objectinfo_get_storage', - 'mtp_objectinfo_get_thumbnail_file_type', - 'mtp_objectinfo_get_thumbnail_pix_height', - 'mtp_objectinfo_get_thumbnail_pix_width', - 'mtp_objectinfo_get_thumbnail_size', - 'mtp_remove_mtp_event_cb', - 'mtp_storageinfo_get_description', - 'mtp_storageinfo_get_free_space', - 'mtp_storageinfo_get_max_capacity', - 'mtp_storageinfo_get_storage_type', - 'mtp_storageinfo_get_volume_identifier', - ], - 'libnsd-ssdp.so.0': [ - 'ssdp_create_local_service', - 'ssdp_deinitialize', - 'ssdp_deregister_local_service', - 'ssdp_destroy_local_service', - 'ssdp_initialize', - 'ssdp_register_local_service', - 'ssdp_service_get_target', - 'ssdp_service_get_url', - 'ssdp_service_get_usn', - 'ssdp_service_set_url', - 'ssdp_service_set_usn', - 'ssdp_start_browsing_service', - 'ssdp_stop_browsing_service', - ], - 'libcapi-network-stc.so.0': [ - 'stc_deinitialize', - 'stc_firewall_chain_add', - 'stc_firewall_chain_clone', - 'stc_firewall_chain_create', - 'stc_firewall_chain_destroy', - 'stc_firewall_chain_flush', - 'stc_firewall_chain_foreach', - 'stc_firewall_chain_get_name', - 'stc_firewall_chain_get_priority', - 'stc_firewall_chain_get_target', - 'stc_firewall_chain_remove', - 'stc_firewall_chain_set', - 'stc_firewall_chain_unset', - 'stc_firewall_get_lock', - 'stc_firewall_lock', - 'stc_firewall_rule_add', - 'stc_firewall_rule_clone', - 'stc_firewall_rule_create', - 'stc_firewall_rule_destroy', - 'stc_firewall_rule_foreach', - 'stc_firewall_rule_get_chain', - 'stc_firewall_rule_get_direction', - 'stc_firewall_rule_get_dst_ip', - 'stc_firewall_rule_get_dst_ip_type', - 'stc_firewall_rule_get_dst_port', - 'stc_firewall_rule_get_dst_port_type', - 'stc_firewall_rule_get_family_type', - 'stc_firewall_rule_get_ifname', - 'stc_firewall_rule_get_log_level', - 'stc_firewall_rule_get_log_prefix', - 'stc_firewall_rule_get_nflog_group', - 'stc_firewall_rule_get_nflog_prefix', - 'stc_firewall_rule_get_nflog_range', - 'stc_firewall_rule_get_nflog_threshold', - 'stc_firewall_rule_get_protocol_type', - 'stc_firewall_rule_get_src_ip', - 'stc_firewall_rule_get_src_ip_type', - 'stc_firewall_rule_get_src_port', - 'stc_firewall_rule_get_src_port_type', - 'stc_firewall_rule_get_target', - 'stc_firewall_rule_remove', - 'stc_firewall_rule_set_chain', - 'stc_firewall_rule_set_direction', - 'stc_firewall_rule_set_dst_ip', - 'stc_firewall_rule_set_dst_ip_type', - 'stc_firewall_rule_set_dst_port', - 'stc_firewall_rule_set_dst_port_type', - 'stc_firewall_rule_set_family_type', - 'stc_firewall_rule_set_ifname', - 'stc_firewall_rule_set_log_level', - 'stc_firewall_rule_set_log_prefix', - 'stc_firewall_rule_set_nflog_group', - 'stc_firewall_rule_set_nflog_prefix', - 'stc_firewall_rule_set_nflog_range', - 'stc_firewall_rule_set_nflog_threshold', - 'stc_firewall_rule_set_protocol_type', - 'stc_firewall_rule_set_src_ip', - 'stc_firewall_rule_set_src_ip_type', - 'stc_firewall_rule_set_src_port', - 'stc_firewall_rule_set_src_port_type', - 'stc_firewall_rule_set_target', - 'stc_firewall_rule_update', - 'stc_firewall_unlock', - 'stc_foreach_restriction', - 'stc_foreach_stats', - 'stc_get_restriction', - 'stc_get_restriction_type', - 'stc_get_stats', - 'stc_get_total_stats', - 'stc_initialize', - 'stc_ip6tables_commit', - 'stc_iptables_commit', - 'stc_reset_rule_create', - 'stc_reset_rule_destroy', - 'stc_reset_rule_get_app_id', - 'stc_reset_rule_get_iface_type', - 'stc_reset_rule_get_subscriber_id', - 'stc_reset_rule_get_time_interval', - 'stc_reset_rule_set_app_id', - 'stc_reset_rule_set_iface_type', - 'stc_reset_rule_set_subscriber_id', - 'stc_reset_rule_set_time_interval', - 'stc_reset_stats', - 'stc_restriction_rule_create', - 'stc_restriction_rule_destroy', - 'stc_restriction_rule_get_app_id', - 'stc_restriction_rule_get_daily_limit', - 'stc_restriction_rule_get_iface_name', - 'stc_restriction_rule_get_iface_type', - 'stc_restriction_rule_get_limit', - 'stc_restriction_rule_get_monthly_limit', - 'stc_restriction_rule_get_month_start_date', - 'stc_restriction_rule_get_roaming_type', - 'stc_restriction_rule_get_subscriber_id', - 'stc_restriction_rule_get_type', - 'stc_restriction_rule_get_warning_limit', - 'stc_restriction_rule_get_weekly_limit', - 'stc_restriction_rule_set_app_id', - 'stc_restriction_rule_set_daily_limit', - 'stc_restriction_rule_set_iface_name', - 'stc_restriction_rule_set_iface_type', - 'stc_restriction_rule_set_limit', - 'stc_restriction_rule_set_monthly_limit', - 'stc_restriction_rule_set_month_start_date', - 'stc_restriction_rule_set_roaming_type', - 'stc_restriction_rule_set_subscriber_id', - 'stc_restriction_rule_set_type', - 'stc_restriction_rule_set_warning_limit', - 'stc_restriction_rule_set_weekly_limit', - 'stc_set_restriction', - 'stc_set_restriction_threshold_crossed_cb', - 'stc_set_warn_threshold_crossed_cb', - 'stc_stats_info_get_app_id', - 'stc_stats_info_get_counter', - 'stc_stats_info_get_iface_name', - 'stc_stats_info_get_iface_type', - 'stc_stats_info_get_process_state', - 'stc_stats_info_get_protocol_type', - 'stc_stats_info_get_roaming_type', - 'stc_stats_info_get_subscriber_id', - 'stc_stats_info_get_time_interval', - 'stc_stats_rule_create', - 'stc_stats_rule_destroy', - 'stc_stats_rule_get_app_id', - 'stc_stats_rule_get_iface_type', - 'stc_stats_rule_get_time_interval', - 'stc_stats_rule_get_time_period', - 'stc_stats_rule_set_app_id', - 'stc_stats_rule_set_iface_type', - 'stc_stats_rule_set_time_interval', - 'stc_stats_rule_set_time_period', - 'stc_unset_restriction', - 'stc_unset_restriction_threshold_crossed_cb', - 'stc_unset_warn_threshold_crossed_cb', - ], - 'libcapi-network-softap.so.0.1.0': [ - 'softap_client_clone', - 'softap_client_destroy', - 'softap_client_get_ip_address', - 'softap_client_get_mac_address', - 'softap_client_get_name', - 'softap_client_get_time', - 'softap_create', - 'softap_destroy', - 'softap_disable', - 'softap_disable_dhcp', - 'softap_enable', - 'softap_enable_dhcp', - 'softap_enable_dhcp_with_range', - 'softap_foreach_connected_clients', - 'softap_get_channel', - 'softap_get_gateway_address', - 'softap_get_ip_address', - 'softap_get_mac_address', - 'softap_get_mode', - 'softap_get_network_interface_name', - 'softap_get_passphrase', - 'softap_get_security_type', - 'softap_get_ssid', - 'softap_get_ssid_visibility', - 'softap_get_subnet_mask', - 'softap_get_vendor_element', - 'softap_is_dhcp_enabled', - 'softap_is_enabled', - 'softap_push_wps_button', - 'softap_reload_settings', - 'softap_set_channel', - 'softap_set_client_connection_state_changed_cb', - 'softap_set_disabled_cb', - 'softap_set_enabled_cb', - 'softap_set_ip_address', - 'softap_set_mode', - 'softap_set_passphrase', - 'softap_set_passphrase_changed_cb', - 'softap_set_security_type', - 'softap_set_security_type_changed_cb', - 'softap_set_ssid', - 'softap_set_ssid_visibility', - 'softap_set_ssid_visibility_changed_cb', - 'softap_set_vendor_element', - 'softap_set_wps_pin', - 'softap_unset_client_connection_state_changed_cb', - 'softap_unset_disabled_cb', - 'softap_unset_enabled_cb', - 'softap_unset_passphrase_changed_cb', - 'softap_unset_security_type_changed_cb', - 'softap_unset_ssid_visibility_changed_cb', - ], - 'libcapi-vpnsvc.so.1': [ - 'vpnsvc_add_dns_server', - 'vpnsvc_add_route', - 'vpnsvc_block_networks', - 'vpnsvc_create', - 'vpnsvc_deinit', - 'vpnsvc_destroy', - 'vpnsvc_down', - 'vpnsvc_get_iface_fd', - 'vpnsvc_get_iface_index', - 'vpnsvc_get_iface_name', - 'vpnsvc_get_session', - 'vpnsvc_init', - 'vpnsvc_protect', - 'vpnsvc_read', - 'vpnsvc_remove_dns_server', - 'vpnsvc_remove_route', - 'vpnsvc_set_blocking', - 'vpnsvc_set_iface_name', - 'vpnsvc_set_local_ip_address', - 'vpnsvc_set_mtu', - 'vpnsvc_set_remote_ip_address', - 'vpnsvc_set_session', - 'vpnsvc_unblock_networks', - 'vpnsvc_up', - 'vpnsvc_update_settings', - 'vpnsvc_write', - ], - 'libcapi-network-wifi-manager.so.1': [ - 'net_wifi_flush_bss', - 'net_wifi_get_ap_auto_connect', - 'net_wifi_get_auto_connect_mode', - 'net_wifi_set_ap_auto_connect', - 'net_wifi_set_auto_connect_mode', - 'wifi_manager_activate', - 'wifi_manager_activate_with_wifi_picker_tested', - 'wifi_manager_add_vsie', - 'wifi_manager_ap_clone', - 'wifi_manager_ap_create', - 'wifi_manager_ap_destroy', - 'wifi_manager_ap_foreach_ipv6_address', - 'wifi_manager_ap_foreach_vsie', - 'wifi_manager_ap_get_assoc_status_code', - 'wifi_manager_ap_get_auto_connect', - 'wifi_manager_ap_get_bssid', - 'wifi_manager_ap_get_connection_state', - 'wifi_manager_ap_get_countrycode', - 'wifi_manager_ap_get_dhcp_lease_duration', - 'wifi_manager_ap_get_dhcp_server_address', - 'wifi_manager_ap_get_disconnect_reason', - 'wifi_manager_ap_get_dns_address', - 'wifi_manager_ap_get_dns_config_type', - 'wifi_manager_ap_get_eap_auth_type', - 'wifi_manager_ap_get_eap_ca_cert_file', - 'wifi_manager_ap_get_eap_client_cert_file', - 'wifi_manager_ap_get_eap_passphrase', - 'wifi_manager_ap_get_eap_private_key_file', - 'wifi_manager_ap_get_eap_type', - 'wifi_manager_ap_get_encryption_type', - 'wifi_manager_ap_get_error_state', - 'wifi_manager_ap_get_essid', - 'wifi_manager_ap_get_frequency', - 'wifi_manager_ap_get_gateway_address', - 'wifi_manager_ap_get_ip_address', - 'wifi_manager_ap_get_ip_config_type', - 'wifi_manager_ap_get_max_speed', - 'wifi_manager_ap_get_prefix_length', - 'wifi_manager_ap_get_proxy_address', - 'wifi_manager_ap_get_proxy_type', - 'wifi_manager_ap_get_raw_ssid', - 'wifi_manager_ap_get_rssi', - 'wifi_manager_ap_get_rssi_level', - 'wifi_manager_ap_get_security_type', - 'wifi_manager_ap_get_subnet_mask', - 'wifi_manager_ap_hidden_create', - 'wifi_manager_ap_is_favorite', - 'wifi_manager_ap_is_passphrase_required', - 'wifi_manager_ap_is_passpoint', - 'wifi_manager_ap_is_wps_supported', - 'wifi_manager_ap_refresh', - 'wifi_manager_ap_set_auto_connect', - 'wifi_manager_ap_set_dns_address', - 'wifi_manager_ap_set_dns_config_type', - 'wifi_manager_ap_set_eap_auth_type', - 'wifi_manager_ap_set_eap_ca_cert_file', - 'wifi_manager_ap_set_eap_client_cert_file', - 'wifi_manager_ap_set_eap_passphrase', - 'wifi_manager_ap_set_eap_private_key_info', - 'wifi_manager_ap_set_eap_type', - 'wifi_manager_ap_set_encryption_type', - 'wifi_manager_ap_set_gateway_address', - 'wifi_manager_ap_set_ip_address', - 'wifi_manager_ap_set_ip_config_type', - 'wifi_manager_ap_set_passphrase', - 'wifi_manager_ap_set_prefix_length', - 'wifi_manager_ap_set_proxy_address', - 'wifi_manager_ap_set_proxy_type', - 'wifi_manager_ap_set_security_type', - 'wifi_manager_ap_set_subnet_mask', - 'wifi_manager_bssid_scan', - 'wifi_manager_cancel_wps', - 'wifi_manager_config_clone', - 'wifi_manager_config_create', - 'wifi_manager_config_destroy', - 'wifi_manager_config_foreach_configuration', - 'wifi_manager_config_get_dns_address', - 'wifi_manager_config_get_dns_config_type', - 'wifi_manager_config_get_eap_anonymous_identity', - 'wifi_manager_config_get_eap_auth_type', - 'wifi_manager_config_get_eap_ca_cert_file', - 'wifi_manager_config_get_eap_client_cert_file', - 'wifi_manager_config_get_eap_identity', - 'wifi_manager_config_get_eap_private_key_file', - 'wifi_manager_config_get_eap_subject_match', - 'wifi_manager_config_get_eap_type', - 'wifi_manager_config_get_gateway_address', - 'wifi_manager_config_get_hidden_ap_property', - 'wifi_manager_config_get_ip_address', - 'wifi_manager_config_get_ip_config_type', - 'wifi_manager_config_get_name', - 'wifi_manager_config_get_prefix_length', - 'wifi_manager_config_get_proxy_address', - 'wifi_manager_config_get_security_type', - 'wifi_manager_config_get_subnet_mask', - 'wifi_manager_config_remove', - 'wifi_manager_config_save', - 'wifi_manager_config_set_dns_address', - 'wifi_manager_config_set_dns_config_type', - 'wifi_manager_config_set_eap_anonymous_identity', - 'wifi_manager_config_set_eap_auth_type', - 'wifi_manager_config_set_eap_ca_cert_file', - 'wifi_manager_config_set_eap_client_cert_file', - 'wifi_manager_config_set_eap_identity', - 'wifi_manager_config_set_eap_private_key_info', - 'wifi_manager_config_set_eap_subject_match', - 'wifi_manager_config_set_eap_type', - 'wifi_manager_config_set_gateway_address', - 'wifi_manager_config_set_hidden_ap_property', - 'wifi_manager_config_set_ip_address', - 'wifi_manager_config_set_ip_config_type', - 'wifi_manager_config_set_prefix_length', - 'wifi_manager_config_set_proxy_address', - 'wifi_manager_config_set_subnet_mask', - 'wifi_manager_connect', - 'wifi_manager_connect_by_wps_pbc', - 'wifi_manager_connect_by_wps_pbc_without_ssid', - 'wifi_manager_connect_by_wps_pin', - 'wifi_manager_connect_by_wps_pin_without_ssid', - 'wifi_manager_connect_hidden_ap', - 'wifi_manager_deactivate', - 'wifi_manager_deinitialize', - 'wifi_manager_deinitialize_cs', - 'wifi_manager_disconnect', - 'wifi_manager_flush_bss', - 'wifi_manager_foreach_found_ap', - 'wifi_manager_foreach_found_bssid', - 'wifi_manager_foreach_found_bssid_ap', - 'wifi_manager_foreach_found_netlink_scan_ap', - 'wifi_manager_foreach_found_specific_ap', - 'wifi_manager_forget_ap', - 'wifi_manager_forget_ap_async', - 'wifi_manager_get_auto_connect', - 'wifi_manager_get_autoscan', - 'wifi_manager_get_autoscan_mode', - 'wifi_manager_get_connected_ap', - 'wifi_manager_get_connection_state', - 'wifi_manager_get_ip_conflict_period', - 'wifi_manager_get_ip_conflict_state', - 'wifi_manager_get_mac_address', - 'wifi_manager_get_module_state', - 'wifi_manager_get_network_interface_name', - 'wifi_manager_get_passpoint', - 'wifi_manager_get_scan_state', - 'wifi_manager_get_vsie', - 'wifi_manager_get_wps_generated_pin', - 'wifi_manager_initialize', - 'wifi_manager_initialize_cs', - 'wifi_manager_ip_conflict_detect_is_enabled', - 'wifi_manager_is_activated', - 'wifi_manager_netlink_scan', - 'wifi_manager_netlink_scan_create', - 'wifi_manager_netlink_scan_destroy', - 'wifi_manager_netlink_scan_set_ssid', - 'wifi_manager_netlink_scan_set_vsie', - 'wifi_manager_remove_vsie', - 'wifi_manager_scan', - 'wifi_manager_scan_specific_ap', - 'wifi_manager_set_auto_connect', - 'wifi_manager_set_autoscan', - 'wifi_manager_set_autoscan_mode', - 'wifi_manager_set_background_scan_cb', - 'wifi_manager_set_bssid', - 'wifi_manager_set_connection_state_changed_cb', - 'wifi_manager_set_device_state_changed_cb', - 'wifi_manager_set_ip_conflict_cb', - 'wifi_manager_set_ip_conflict_detect_enable', - 'wifi_manager_set_ip_conflict_period', - 'wifi_manager_set_module_state_changed_cb', - 'wifi_manager_set_passpoint', - 'wifi_manager_set_rssi_level_changed_cb', - 'wifi_manager_set_scan_state_changed_cb', - 'wifi_manager_specific_ap_start_multi_scan', - 'wifi_manager_specific_scan_create', - 'wifi_manager_specific_scan_destroy', - 'wifi_manager_specific_scan_set_freq', - 'wifi_manager_specific_scan_set_ssid', - 'wifi_manager_tdls_connect', - 'wifi_manager_tdls_disable_channel_switching', - 'wifi_manager_tdls_disconnect', - 'wifi_manager_tdls_enable_channel_switching', - 'wifi_manager_tdls_get_connected_peer', - 'wifi_manager_tdls_set_discovered_cb', - 'wifi_manager_tdls_set_state_changed_cb', - 'wifi_manager_tdls_start_discovery', - 'wifi_manager_tdls_unset_discovered_cb', - 'wifi_manager_tdls_unset_state_changed_cb', - 'wifi_manager_unset_background_scan_cb', - 'wifi_manager_unset_connection_state_changed_cb', - 'wifi_manager_unset_device_state_changed_cb', - 'wifi_manager_unset_ip_conflict_cb', - 'wifi_manager_unset_module_state_changed_cb', - 'wifi_manager_unset_rssi_level_changed_cb', - 'wifi_manager_unset_scan_state_changed_cb', - 'wifi_manager_update_ap', - ], - 'libwifi-direct.so.1': [ - 'wifi_direct_accept_connection', - 'wifi_direct_activate', - 'wifi_direct_activate_pushbutton', - 'wifi_direct_add_vsie', - 'wifi_direct_cancel_connection', - 'wifi_direct_cancel_discovery', - 'wifi_direct_cancel_service_discovery', - 'wifi_direct_connect', - 'wifi_direct_create_group', - 'wifi_direct_create_group_with_ssid', - 'wifi_direct_dbus_deinit', - 'wifi_direct_dbus_init', - 'wifi_direct_dbus_method_call_sync_debug', - 'wifi_direct_dbus_unpack_ay', - 'wifi_direct_deactivate', - 'wifi_direct_deinit_display', - 'wifi_direct_deinitialize', - 'wifi_direct_deregister_service', - 'wifi_direct_destroy_group', - 'wifi_direct_disconnect', - 'wifi_direct_disconnect_all', - 'wifi_direct_foreach_connected_peers', - 'wifi_direct_foreach_discovered_peers', - 'wifi_direct_foreach_persistent_groups', - 'wifi_direct_foreach_supported_wps_types', - 'wifi_direct_get_connecting_peer_info', - 'wifi_direct_get_device_name', - 'wifi_direct_get_display', - 'wifi_direct_get_display_availability', - 'wifi_direct_get_gateway_address', - 'wifi_direct_get_go_intent_per_type', - 'wifi_direct_get_group_owner_intent', - 'wifi_direct_get_ip_address', - 'wifi_direct_get_local_wps_type', - 'wifi_direct_get_mac_address', - 'wifi_direct_get_max_clients', - 'wifi_direct_get_network_interface_name', - 'wifi_direct_get_operating_channel', - 'wifi_direct_get_passphrase', - 'wifi_direct_get_peer_display_availability', - 'wifi_direct_get_peer_display_hdcp', - 'wifi_direct_get_peer_display_port', - 'wifi_direct_get_peer_display_throughput', - 'wifi_direct_get_peer_display_type', - 'wifi_direct_get_peer_info', - 'wifi_direct_get_peer_rssi', - 'wifi_direct_get_peer_vsie', - 'wifi_direct_get_primary_device_type', - 'wifi_direct_get_req_wps_type', - 'wifi_direct_get_secondary_device_type', - 'wifi_direct_get_session_timer', - 'wifi_direct_get_ssid', - 'wifi_direct_get_state', - 'wifi_direct_get_subnet_mask', - 'wifi_direct_get_supported_wps_mode', - 'wifi_direct_get_vsie', - 'wifi_direct_get_wps_config_method', - 'wifi_direct_get_wps_pin', - 'wifi_direct_init_display', - 'wifi_direct_initialize', - 'wifi_direct_init_miracast', - 'wifi_direct_is_autoconnection_mode', - 'wifi_direct_is_autonomous_group', - 'wifi_direct_is_discoverable', - 'wifi_direct_is_group_owner', - 'wifi_direct_is_listening_only', - 'wifi_direct_is_persistent_group_enabled', - 'wifi_direct_process_group_created', - 'wifi_direct_process_group_destroyed', - 'wifi_direct_process_manage_activation', - 'wifi_direct_process_manage_connection', - 'wifi_direct_process_manage_deactivation', - 'wifi_direct_process_manage_disconnection', - 'wifi_direct_process_manage_disconnection_ind', - 'wifi_direct_process_manage_discovery_finished', - 'wifi_direct_process_manage_discovery_started', - 'wifi_direct_process_manage_listen_started', - 'wifi_direct_process_manage_peer_found', - 'wifi_direct_process_manage_peer_ip_assigned', - 'wifi_direct_process_manage_peer_lost', - 'wifi_direct_process_service_discovery_finished', - 'wifi_direct_process_service_discovery_found', - 'wifi_direct_process_service_discovery_started', - 'wifi_direct_register_service', - 'wifi_direct_reject_connection', - 'wifi_direct_remove_all_persistent_devices', - 'wifi_direct_remove_persistent_device', - 'wifi_direct_remove_persistent_group', - 'wifi_direct_remove_vsie', - 'wifi_direct_set_autoconnection_mode', - 'wifi_direct_set_autoconnection_peer', - 'wifi_direct_set_auto_group_removal', - 'wifi_direct_set_client_ip_address_assigned_cb', - 'wifi_direct_set_connection_state_changed_cb', - 'wifi_direct_set_device_name', - 'wifi_direct_set_device_state_changed_cb', - 'wifi_direct_set_discovery_state_changed_cb', - 'wifi_direct_set_display', - 'wifi_direct_set_display_availability', - 'wifi_direct_set_go_intent_per_type', - 'wifi_direct_set_group_owner_intent', - 'wifi_direct_set_max_clients', - 'wifi_direct_set_passphrase', - 'wifi_direct_set_peer_found_cb', - 'wifi_direct_set_peer_info_connection_state_changed_cb', - 'wifi_direct_set_persistent_group_enabled', - 'wifi_direct_set_req_wps_type', - 'wifi_direct_set_service_state_changed_cb', - 'wifi_direct_set_session_timer', - 'wifi_direct_set_state_changed_cb', - 'wifi_direct_set_wps_config_method', - 'wifi_direct_set_wps_pin', - 'wifi_direct_start_discovery', - 'wifi_direct_start_discovery_specific_channel', - 'wifi_direct_start_discovery_specific_freq', - 'wifi_direct_start_service_discovery', - 'wifi_direct_unset_client_ip_address_assigned_cb', - 'wifi_direct_unset_connection_state_changed_cb', - 'wifi_direct_unset_device_state_changed_cb', - 'wifi_direct_unset_discovery_state_changed_cb', - 'wifi_direct_unset_peer_found_cb', - 'wifi_direct_unset_peer_info_connection_state_changed_cb', - 'wifi_direct_unset_service_state_changed_cb', - 'wifi_direct_unset_state_changed_cb', - ], - 'libcsr-client.so.2': [ - 'csr_cs_cancel_scanning', - 'csr_cs_context_create', - 'csr_cs_context_destroy', - 'csr_cs_get_detected_malware', - 'csr_cs_get_detected_malwares', - 'csr_cs_get_ignored_malware', - 'csr_cs_get_ignored_malwares', - 'csr_cs_judge_detected_malware', - 'csr_cs_malware_get_detailed_url', - 'csr_cs_malware_get_file_name', - 'csr_cs_malware_get_name', - 'csr_cs_malware_get_pkg_id', - 'csr_cs_malware_get_severity', - 'csr_cs_malware_get_timestamp', - 'csr_cs_malware_get_user_response', - 'csr_cs_malware_is_app', - 'csr_cs_malware_list_get_malware', - 'csr_cs_scan_data', - 'csr_cs_scan_dir_async', - 'csr_cs_scan_dirs_async', - 'csr_cs_scan_file', - 'csr_cs_scan_files_async', - 'csr_cs_set_ask_user', - 'csr_cs_set_cancelled_cb', - 'csr_cs_set_completed_cb', - 'csr_cs_set_core_usage', - 'csr_cs_set_detected_cb', - 'csr_cs_set_error_cb', - 'csr_cs_set_file_scanned_cb', - 'csr_cs_set_popup_message', - 'csr_cs_set_scan_on_cloud', - 'csr_engine_destroy', - 'csr_engine_get_activated', - 'csr_engine_get_data_version', - 'csr_engine_get_latest_update_time', - 'csr_engine_get_name', - 'csr_engine_get_state', - 'csr_engine_get_vendor', - 'csr_engine_get_version', - 'csr_engine_set_state', - 'csr_get_current_engine', - 'csr_wp_check_url', - 'csr_wp_context_create', - 'csr_wp_context_destroy', - 'csr_wp_result_get_detailed_url', - 'csr_wp_result_get_risk_level', - 'csr_wp_result_get_user_response', - 'csr_wp_set_ask_user', - 'csr_wp_set_popup_message', - ], - 'libdevice-certificate-manager.so.2.0': [ - 'dcm_create_key_context', - 'dcm_create_signature', - 'dcm_free_key_context', - 'dcm_get_certificate_chain', - 'dcm_get_key_bit_length', - 'dcm_get_key_type', - ], - 'libdpm.so.0': [ - 'dpm_add_policy_changed_cb', - 'dpm_add_signal_cb', - 'dpm_admin_deregister_client', - 'dpm_admin_register_client', - 'dpm_application_add_privilege_to_blacklist', - 'dpm_application_check_privilege_is_blacklisted', - 'dpm_application_get_mode_restriction', - 'dpm_application_install_package', - 'dpm_application_remove_privilege_from_blacklist', - 'dpm_application_set_mode_restriction', - 'dpm_application_uninstall_package', - 'dpm_application_unset_mode_restriction', - 'dpm_bluetooth_add_device_to_blacklist', - 'dpm_bluetooth_add_uuid_to_blacklist', - 'dpm_bluetooth_is_device_restricted', - 'dpm_bluetooth_is_uuid_restricted', - 'dpm_bluetooth_remove_device_from_blacklist', - 'dpm_bluetooth_remove_uuid_from_blacklist', - 'dpm_bluetooth_set_device_restriction', - 'dpm_bluetooth_set_uuid_restriction', - 'dpm_manager_create', - 'dpm_manager_destroy', - 'dpm_password_create_iterator', - 'dpm_password_delete_pattern', - 'dpm_password_destroy_iterator', - 'dpm_password_enforce_change', - 'dpm_password_get_expires', - 'dpm_password_get_history', - 'dpm_password_get_maximum_character_occurrences', - 'dpm_password_get_maximum_failed_attempts_for_wipe', - 'dpm_password_get_maximum_numeric_sequence_length', - 'dpm_password_get_max_inactivity_time_device_lock', - 'dpm_password_get_min_complex_chars', - 'dpm_password_get_minimum_length', - 'dpm_password_get_pattern', - 'dpm_password_get_quality', - 'dpm_password_get_recovery', - 'dpm_password_get_status', - 'dpm_password_iterator_next', - 'dpm_password_reset', - 'dpm_password_set_expires', - 'dpm_password_set_forbidden_strings', - 'dpm_password_set_history', - 'dpm_password_set_maximum_character_occurrences', - 'dpm_password_set_maximum_failed_attempts_for_wipe', - 'dpm_password_set_maximum_numeric_sequence_length', - 'dpm_password_set_max_inactivity_time_device_lock', - 'dpm_password_set_min_complex_chars', - 'dpm_password_set_minimum_length', - 'dpm_password_set_pattern', - 'dpm_password_set_quality', - 'dpm_password_set_recovery', - 'dpm_password_set_status', - 'dpm_remove_policy_changed_cb', - 'dpm_remove_signal_cb', - 'dpm_restriction_get_bluetooth_desktop_connectivity_state', - 'dpm_restriction_get_bluetooth_mode_change_state', - 'dpm_restriction_get_bluetooth_pairing_state', - 'dpm_restriction_get_bluetooth_tethering_state', - 'dpm_restriction_get_browser_state', - 'dpm_restriction_get_camera_state', - 'dpm_restriction_get_clipboard_state', - 'dpm_restriction_get_external_storage_state', - 'dpm_restriction_get_location_state', - 'dpm_restriction_get_messaging_state', - 'dpm_restriction_get_microphone_state', - 'dpm_restriction_get_popimap_email_state', - 'dpm_restriction_get_usb_client_state', - 'dpm_restriction_get_usb_debugging_state', - 'dpm_restriction_get_usb_tethering_state', - 'dpm_restriction_get_wifi_hotspot_state', - 'dpm_restriction_get_wifi_state', - 'dpm_restriction_set_bluetooth_desktop_connectivity_state', - 'dpm_restriction_set_bluetooth_mode_change_state', - 'dpm_restriction_set_bluetooth_pairing_state', - 'dpm_restriction_set_bluetooth_tethering_state', - 'dpm_restriction_set_browser_state', - 'dpm_restriction_set_camera_state', - 'dpm_restriction_set_clipboard_state', - 'dpm_restriction_set_external_storage_state', - 'dpm_restriction_set_location_state', - 'dpm_restriction_set_messaging_state', - 'dpm_restriction_set_microphone_state', - 'dpm_restriction_set_popimap_email_state', - 'dpm_restriction_set_usb_client_state', - 'dpm_restriction_set_usb_debugging_state', - 'dpm_restriction_set_usb_tethering_state', - 'dpm_restriction_set_wifi_hotspot_state', - 'dpm_restriction_set_wifi_state', - 'dpm_security_is_external_storage_encrypted', - 'dpm_security_is_internal_storage_encrypted', - 'dpm_security_lockout_screen', - 'dpm_security_set_external_storage_encryption', - 'dpm_security_set_internal_storage_encryption', - 'dpm_security_wipe_data', - 'dpm_wifi_add_ssid_to_blocklist', - 'dpm_wifi_is_network_access_restricted', - 'dpm_wifi_is_profile_change_restricted', - 'dpm_wifi_remove_ssid_from_blocklist', - 'dpm_wifi_set_network_access_restriction', - 'dpm_wifi_set_profile_change_restriction', - 'dpm_zone_create', - 'dpm_zone_destroy', - 'dpm_zone_foreach_name', - 'dpm_zone_get_state', - ], - 'libkey-manager-client.so.1': [ - 'ckmc_alias_list_add', - 'ckmc_alias_list_all_free', - 'ckmc_alias_list_free', - 'ckmc_alias_list_new', - 'ckmc_alias_new', - 'ckmc_allow_access', - 'ckmc_buffer_free', - 'ckmc_buffer_new', - 'ckmc_cert_free', - 'ckmc_cert_list_add', - 'ckmc_cert_list_all_free', - 'ckmc_cert_list_free', - 'ckmc_cert_list_new', - 'ckmc_cert_new', - 'ckmc_create_key_aes', - 'ckmc_create_key_pair_dsa', - 'ckmc_create_key_pair_ecdsa', - 'ckmc_create_key_pair_rsa', - 'ckmc_create_signature', - 'ckmc_decrypt_data', - 'ckmc_deny_access', - 'ckmc_encrypt_data', - 'ckmc_generate_new_params', - 'ckmc_get_cert', - 'ckmc_get_cert_alias_list', - 'ckmc_get_cert_chain', - 'ckmc_get_cert_chain_with_alias', - 'ckmc_get_cert_chain_with_trustedcert', - 'ckmc_get_data', - 'ckmc_get_data_alias_list', - 'ckmc_get_key', - 'ckmc_get_key_alias_list', - 'ckmc_get_pkcs12', - 'ckmc_key_free', - 'ckmc_key_new', - 'ckmc_load_cert_from_file', - 'ckmc_load_from_pkcs12_file', - 'ckmc_ocsp_check', - 'ckmc_param_list_free', - 'ckmc_param_list_get_buffer', - 'ckmc_param_list_get_integer', - 'ckmc_param_list_new', - 'ckmc_param_list_set_buffer', - 'ckmc_param_list_set_integer', - 'ckmc_pkcs12_free', - 'ckmc_pkcs12_load', - 'ckmc_pkcs12_new', - 'ckmc_remove_alias', - 'ckmc_remove_cert', - 'ckmc_remove_data', - 'ckmc_remove_key', - 'ckmc_save_cert', - 'ckmc_save_data', - 'ckmc_save_key', - 'ckmc_save_pkcs12', - 'ckmc_set_permission', - 'ckmc_verify_signature', - ], - 'libcapi-privacy-privilege-manager.so.0': [ - 'ppm_check_app_permission', - 'ppm_check_app_permissions', - 'ppm_check_permission', - 'ppm_check_permissions', - 'ppm_request_permission', - 'ppm_request_permissions', - ], - 'libprivilege-info.so.1': [ - 'privilege_info_get_description', - 'privilege_info_get_description_by_pkgtype', - 'privilege_info_get_display_name', - 'privilege_info_get_display_name_by_pkgtype', - 'privilege_info_get_privacy_display_name', - 'privilege_info_get_privacy_privilege_status', - ], - 'libyaca.so.0': [ - 'yaca_cleanup', - 'yaca_context_destroy', - 'yaca_context_get_output_length', - 'yaca_context_get_property', - 'yaca_context_set_property', - 'yaca_debug_set_error_cb', - 'yaca_debug_translate_error', - 'yaca_decrypt_finalize', - 'yaca_decrypt_initialize', - 'yaca_decrypt_update', - 'yaca_digest_finalize', - 'yaca_digest_initialize', - 'yaca_digest_update', - 'yaca_encrypt_finalize', - 'yaca_encrypt_get_iv_bit_length', - 'yaca_encrypt_initialize', - 'yaca_encrypt_update', - 'yaca_free', - 'yaca_initialize', - 'yaca_key_derive_dh', - 'yaca_key_derive_kdf', - 'yaca_key_derive_pbkdf2', - 'yaca_key_destroy', - 'yaca_key_export', - 'yaca_key_extract_parameters', - 'yaca_key_extract_public', - 'yaca_key_generate', - 'yaca_key_generate_from_parameters', - 'yaca_key_get_bit_length', - 'yaca_key_get_type', - 'yaca_key_import', - 'yaca_malloc', - 'yaca_memcmp', - 'yaca_open_finalize', - 'yaca_open_initialize', - 'yaca_open_update', - 'yaca_randomize_bytes', - 'yaca_realloc', - 'yaca_rsa_private_decrypt', - 'yaca_rsa_private_encrypt', - 'yaca_rsa_public_decrypt', - 'yaca_rsa_public_encrypt', - 'yaca_seal_finalize', - 'yaca_seal_initialize', - 'yaca_seal_update', - 'yaca_sign_finalize', - 'yaca_sign_initialize', - 'yaca_sign_initialize_cmac', - 'yaca_sign_initialize_hmac', - 'yaca_sign_update', - 'yaca_simple_calculate_cmac', - 'yaca_simple_calculate_digest', - 'yaca_simple_calculate_hmac', - 'yaca_simple_calculate_signature', - 'yaca_simple_decrypt', - 'yaca_simple_encrypt', - 'yaca_simple_verify_signature', - 'yaca_verify_finalize', - 'yaca_verify_initialize', - 'yaca_verify_update', - 'yaca_zalloc', - ], - 'libcalendar-service2.so.0': [ - 'cal_caltime_create', - 'cal_caltime_destroy', - 'cal_caltime_get_caltime', - 'cal_caltime_get_local_hour', - 'cal_caltime_get_local_mday', - 'cal_caltime_get_local_minute', - 'cal_caltime_get_local_month', - 'cal_caltime_get_local_second', - 'cal_caltime_get_local_type', - 'cal_caltime_get_local_utime', - 'cal_caltime_get_local_year', - 'cal_caltime_set_caltime', - 'cal_caltime_set_local_hour', - 'cal_caltime_set_local_mday', - 'cal_caltime_set_local_minute', - 'cal_caltime_set_local_month', - 'cal_caltime_set_local_second', - 'cal_caltime_set_local_type', - 'cal_caltime_set_local_utime', - 'cal_caltime_set_local_year', - 'calendar_connect', - 'calendar_connect_on_thread', - 'calendar_connect_with_flags', - 'calendar_db_add_changed_cb', - 'calendar_db_clean_after_sync', - 'calendar_db_delete_record', - 'calendar_db_delete_records', - 'calendar_db_get_all_records', - 'calendar_db_get_changes_by_version', - 'calendar_db_get_changes_exception_by_version', - 'calendar_db_get_count', - 'calendar_db_get_count_with_query', - 'calendar_db_get_current_version', - 'calendar_db_get_last_change_version', - 'calendar_db_get_record', - 'calendar_db_get_records_with_query', - 'calendar_db_insert_record', - 'calendar_db_insert_records', - 'calendar_db_insert_vcalendars', - 'calendar_db_link_record', - 'calendar_db_remove_changed_cb', - 'calendar_db_replace_record', - 'calendar_db_replace_records', - 'calendar_db_replace_vcalendars', - 'calendar_db_unlink_record', - 'calendar_db_update_record', - 'calendar_db_update_records', - 'calendar_disconnect', - 'calendar_disconnect_on_thread', - 'calendar_filter_add_caltime', - 'calendar_filter_add_double', - 'calendar_filter_add_filter', - 'calendar_filter_add_int', - 'calendar_filter_add_lli', - 'calendar_filter_add_operator', - 'calendar_filter_add_str', - 'calendar_filter_create', - 'calendar_filter_destroy', - 'calendar_list_add', - 'calendar_list_create', - 'calendar_list_destroy', - 'calendar_list_first', - 'calendar_list_get_count', - 'calendar_list_get_current_record_p', - 'calendar_list_last', - 'calendar_list_next', - 'calendar_list_prev', - 'calendar_list_remove', - 'calendar_query_create', - 'calendar_query_destroy', - 'calendar_query_set_distinct', - 'calendar_query_set_filter', - 'calendar_query_set_projection', - 'calendar_query_set_sort', - 'calendar_record_add_child_record', - 'calendar_record_clone', - 'calendar_record_clone_child_record_list', - 'calendar_record_create', - 'calendar_record_destroy', - 'calendar_record_get_caltime', - 'calendar_record_get_child_record_at_p', - 'calendar_record_get_child_record_count', - 'calendar_record_get_double', - 'calendar_record_get_int', - 'calendar_record_get_lli', - 'calendar_record_get_str', - 'calendar_record_get_str_p', - 'calendar_record_get_uri_p', - 'calendar_record_remove_child_record', - 'calendar_record_set_caltime', - 'calendar_record_set_double', - 'calendar_record_set_int', - 'calendar_record_set_lli', - 'calendar_record_set_str', - 'calendar_reminder_add_cb', - 'calendar_reminder_remove_cb', - 'calendar_vcalendar_make_from_records', - 'calendar_vcalendar_parse_to_calendar', - 'calendar_vcalendar_parse_to_calendar_foreach', - ], - 'libcontacts-service2.so.0': [ - 'contacts_activity_delete_by_account_id', - 'contacts_activity_delete_by_contact_id', - 'contacts_connect', - 'contacts_connect_on_thread', - 'contacts_connect_with_flags', - 'contacts_db_add_changed_cb', - 'contacts_db_add_changed_cb_with_info', - 'contacts_db_add_status_changed_cb', - 'contacts_db_delete_record', - 'contacts_db_delete_records', - 'contacts_db_get_all_records', - 'contacts_db_get_changes_by_version', - 'contacts_db_get_count', - 'contacts_db_get_count_with_query', - 'contacts_db_get_current_version', - 'contacts_db_get_last_change_version', - 'contacts_db_get_record', - 'contacts_db_get_records_with_query', - 'contacts_db_get_status', - 'contacts_db_insert_record', - 'contacts_db_insert_records', - 'contacts_db_remove_changed_cb', - 'contacts_db_remove_changed_cb_with_info', - 'contacts_db_remove_status_changed_cb', - 'contacts_db_replace_record', - 'contacts_db_replace_records', - 'contacts_db_search_records', - 'contacts_db_search_records_for_snippet', - 'contacts_db_search_records_with_query', - 'contacts_db_search_records_with_query_for_snippet', - 'contacts_db_search_records_with_range', - 'contacts_db_search_records_with_range_for_snippet', - 'contacts_db_update_record', - 'contacts_db_update_records', - 'contacts_disconnect', - 'contacts_disconnect_on_thread', - 'contacts_filter_add_bool', - 'contacts_filter_add_double', - 'contacts_filter_add_filter', - 'contacts_filter_add_int', - 'contacts_filter_add_lli', - 'contacts_filter_add_operator', - 'contacts_filter_add_str', - 'contacts_filter_create', - 'contacts_filter_destroy', - 'contacts_group_add_contact', - 'contacts_group_remove_contact', - 'contacts_group_set_group_order', - 'contacts_list_add', - 'contacts_list_create', - 'contacts_list_destroy', - 'contacts_list_first', - 'contacts_list_get_count', - 'contacts_list_get_current_record_p', - 'contacts_list_last', - 'contacts_list_next', - 'contacts_list_prev', - 'contacts_list_remove', - 'contacts_person_get_aggregation_suggestions', - 'contacts_person_get_default_property', - 'contacts_person_link_person', - 'contacts_person_reset_usage', - 'contacts_person_set_default_property', - 'contacts_person_set_favorite_order', - 'contacts_person_unlink_contact', - 'contacts_phone_log_delete', - 'contacts_phone_log_reset_statistics', - 'contacts_phone_log_reset_statistics_by_sim', - 'contacts_query_create', - 'contacts_query_destroy', - 'contacts_query_set_distinct', - 'contacts_query_set_filter', - 'contacts_query_set_projection', - 'contacts_query_set_sort', - 'contacts_record_add_child_record', - 'contacts_record_clone', - 'contacts_record_clone_child_record_list', - 'contacts_record_create', - 'contacts_record_destroy', - 'contacts_record_get_bool', - 'contacts_record_get_child_record_at_p', - 'contacts_record_get_child_record_count', - 'contacts_record_get_double', - 'contacts_record_get_int', - 'contacts_record_get_lli', - 'contacts_record_get_str', - 'contacts_record_get_str_p', - 'contacts_record_get_uri_p', - 'contacts_record_remove_child_record', - 'contacts_record_set_bool', - 'contacts_record_set_double', - 'contacts_record_set_int', - 'contacts_record_set_lli', - 'contacts_record_set_str', - 'contacts_setting_add_name_display_order_changed_cb', - 'contacts_setting_add_name_sorting_order_changed_cb', - 'contacts_setting_get_name_display_order', - 'contacts_setting_get_name_sorting_order', - 'contacts_setting_remove_name_display_order_changed_cb', - 'contacts_setting_remove_name_sorting_order_changed_cb', - 'contacts_setting_set_name_display_order', - 'contacts_setting_set_name_sorting_order', - 'contacts_sim_get_initialization_status', - 'contacts_sim_get_initialization_status_by_sim_slot_no', - 'contacts_sim_import_all_contacts', - 'contacts_sim_import_all_contacts_by_sim_slot_no', - 'contacts_vcard_get_entity_count', - 'contacts_vcard_get_limit_size_of_photo', - 'contacts_vcard_make_from_contact', - 'contacts_vcard_make_from_my_profile', - 'contacts_vcard_make_from_person', - 'contacts_vcard_parse_to_contact_foreach', - 'contacts_vcard_parse_to_contacts', - 'contacts_vcard_set_limit_size_of_photo', - ], - 'libphonenumber-utils.so.0': [ - 'phone_number_add_blocking_rule', - 'phone_number_blocking_rule_create', - 'phone_number_blocking_rule_destroy', - 'phone_number_blocking_rule_get_match_type', - 'phone_number_blocking_rule_get_number', - 'phone_number_blocking_rule_set_match_type', - 'phone_number_blocking_rule_set_number', - 'phone_number_check_blocking', - 'phone_number_connect', - 'phone_number_disconnect', - 'phone_number_get_blocking_rules', - 'phone_number_get_blocking_rules_related', - 'phone_number_get_formatted_number', - 'phone_number_get_location_from_number', - 'phone_number_get_normalized_number', - 'phone_number_remove_blocking_rule', - ], - 'libcapi-system-device.so.0': [ - 'check_async_call_rate', - 'config_parse', - 'dbus_method_async_with_reply', - 'dbus_method_sync', - 'dbus_method_sync_var', - 'dbus_method_sync_with_reply', - 'device_add_callback', - 'device_battery_get_health', - 'device_battery_get_level_status', - 'device_battery_get_percent', - 'device_battery_get_power_source', - 'device_battery_get_property', - 'device_battery_get_status', - 'device_battery_is_charging', - 'device_display_change_state', - 'device_display_get_brightness', - 'device_display_get_brightness_state', - 'device_display_get_max_brightness', - 'device_display_get_max_brightness_state', - 'device_display_get_numbers', - 'device_display_get_state', - 'device_display_set_brightness', - 'device_display_set_brightness_state', - 'device_flash_get_brightness', - 'device_flash_get_max_brightness', - 'device_flash_set_brightness', - 'device_get_brightness', - 'device_get_display_numbers', - 'device_get_max_brightness', - 'device_haptic_close', - 'device_haptic_get_count', - 'device_haptic_open', - 'device_haptic_stop', - 'device_haptic_vibrate', - 'device_ir_is_available', - 'device_ir_transmit', - 'device_led_play_custom', - 'device_led_stop_custom', - 'device_memory_get_available', - 'device_memory_get_total', - 'device_multi_led_control', - 'device_multi_led_get_number', - 'device_power_reboot', - 'device_power_release_lock', - 'device_power_request_lock', - 'device_power_wakeup', - 'device_remove_callback', - 'device_set_brightness', - 'device_set_brightness_from_settings', - 'device_set_brightness_to_settings', - 'is_display_state_supported', - 'is_emulator', - 'register_signal_handler', - 'restart_callback', - 'unregister_signal_handler', - ], - 'libdlog.so.0': [ - 'add_recv_timestamp', - 'connect_sock', - 'copy_recv_timestamp', - 'create_glued_string', - 'create_pipe_message', - 'dlog_print', - 'dlog_vprint', - 'extract_timestamp', - 'get_order_from_config', - 'get_proper_clock', - 'log_config_foreach', - 'log_config_free', - 'log_config_get', - 'log_config_get_boolean', - 'log_config_get_int', - 'log_config_read', - 'log_config_read_file', - 'log_config_set', - 'log_entry_is_earlier', - 'logger_open_buffer', - 'logger_open_buffer_from_config', - 'logger_open_buffer_from_config_get_path', - 'logger_open_buffer_get_path', - 'log_id_by_name', - 'log_name_by_id', - 'log_priority_from_char', - 'parse', - 'parse_androidlogger_message', - 'parse_const_char', - 'parse_kmsg_message', - 'parse_message', - 'parse_number', - 'parse_optional', - 'parse_pipe_message', - 'parse_syslog_datagram', - 'parse_syslog_date', - 'parse_timestamp', - 'recv_dlog_reply', - 'recv_pipe', - 'send_dlog_reply', - 'send_dlog_request', - 'send_pipe', - 'skip_name', - 'str_ends_with', - 'syslog_critical_failure', - 'translate_syslog_facility', - 'translate_syslog_priority', - ], - 'libfeedback.so.0': [ - 'feedback_deinitialize', - 'feedback_get_resource_path', - 'feedback_initialize', - 'feedback_is_supported_pattern', - 'feedback_play', - 'feedback_play_internal', - 'feedback_play_type', - 'feedback_play_type_by_name', - 'feedback_play_type_internal', - 'feedback_set_resource_path', - 'feedback_stop', - ], - 'libcapi-system-media-key.so.0': [ - 'media_key_release', - 'media_key_reserve', - ], - 'libcapi-system-peripheral-io.so.0': [ - 'peripheral_adc_close', - 'peripheral_adc_open', - 'peripheral_adc_read', - 'peripheral_gdbus_adc_close', - 'peripheral_gdbus_adc_open', - 'peripheral_gdbus_gpio_close', - 'peripheral_gdbus_gpio_open', - 'peripheral_gdbus_i2c_close', - 'peripheral_gdbus_i2c_open', - 'peripheral_gdbus_pwm_close', - 'peripheral_gdbus_pwm_open', - 'peripheral_gdbus_spi_close', - 'peripheral_gdbus_spi_open', - 'peripheral_gdbus_uart_close', - 'peripheral_gdbus_uart_open', - 'peripheral_gpio_close', - 'peripheral_gpio_open', - 'peripheral_gpio_read', - 'peripheral_gpio_set_direction', - 'peripheral_gpio_set_edge_mode', - 'peripheral_gpio_set_interrupted_cb', - 'peripheral_gpio_unset_interrupted_cb', - 'peripheral_gpio_write', - 'peripheral_i2c_close', - 'peripheral_i2c_open', - 'peripheral_i2c_read', - 'peripheral_i2c_read_register_byte', - 'peripheral_i2c_read_register_word', - 'peripheral_i2c_write', - 'peripheral_i2c_write_register_byte', - 'peripheral_i2c_write_register_word', - 'peripheral_interface_adc_close', - 'peripheral_interface_adc_read', - 'peripheral_interface_gpio_close', - 'peripheral_interface_gpio_read', - 'peripheral_interface_gpio_set_direction', - 'peripheral_interface_gpio_set_edge_mode', - 'peripheral_interface_gpio_set_initial_direction_into_handle', - 'peripheral_interface_gpio_set_initial_edge_into_handle', - 'peripheral_interface_gpio_set_interrupted_cb', - 'peripheral_interface_gpio_unset_interrupted_cb', - 'peripheral_interface_gpio_write', - 'peripheral_interface_i2c_close', - 'peripheral_interface_i2c_read', - 'peripheral_interface_i2c_read_register_byte', - 'peripheral_interface_i2c_read_register_word', - 'peripheral_interface_i2c_write', - 'peripheral_interface_i2c_write_register_byte', - 'peripheral_interface_i2c_write_register_word', - 'peripheral_interface_pwm_close', - 'peripheral_interface_pwm_set_duty_cycle', - 'peripheral_interface_pwm_set_enable', - 'peripheral_interface_pwm_set_period', - 'peripheral_interface_pwm_set_polarity', - 'peripheral_interface_spi_close', - 'peripheral_interface_spi_read', - 'peripheral_interface_spi_set_bit_order', - 'peripheral_interface_spi_set_bits_per_word', - 'peripheral_interface_spi_set_frequency', - 'peripheral_interface_spi_set_mode', - 'peripheral_interface_spi_transfer', - 'peripheral_interface_spi_write', - 'peripheral_interface_uart_close', - 'peripheral_interface_uart_flush', - 'peripheral_interface_uart_read', - 'peripheral_interface_uart_set_baud_rate', - 'peripheral_interface_uart_set_byte_size', - 'peripheral_interface_uart_set_flow_control', - 'peripheral_interface_uart_set_parity', - 'peripheral_interface_uart_set_stop_bits', - 'peripheral_interface_uart_write', - 'peripheral_io_gdbus_adc_call_close', - 'peripheral_io_gdbus_adc_call_close_finish', - 'peripheral_io_gdbus_adc_call_close_sync', - 'peripheral_io_gdbus_adc_call_open', - 'peripheral_io_gdbus_adc_call_open_finish', - 'peripheral_io_gdbus_adc_call_open_sync', - 'peripheral_io_gdbus_adc_complete_close', - 'peripheral_io_gdbus_adc_complete_open', - 'peripheral_io_gdbus_adc_get_type', - 'peripheral_io_gdbus_adc_interface_info', - 'peripheral_io_gdbus_adc_override_properties', - 'peripheral_io_gdbus_adc_proxy_get_type', - 'peripheral_io_gdbus_adc_proxy_new', - 'peripheral_io_gdbus_adc_proxy_new_finish', - 'peripheral_io_gdbus_adc_proxy_new_for_bus', - 'peripheral_io_gdbus_adc_proxy_new_for_bus_finish', - 'peripheral_io_gdbus_adc_proxy_new_for_bus_sync', - 'peripheral_io_gdbus_adc_proxy_new_sync', - 'peripheral_io_gdbus_adc_skeleton_get_type', - 'peripheral_io_gdbus_adc_skeleton_new', - 'peripheral_io_gdbus_gpio_call_close', - 'peripheral_io_gdbus_gpio_call_close_finish', - 'peripheral_io_gdbus_gpio_call_close_sync', - 'peripheral_io_gdbus_gpio_call_open', - 'peripheral_io_gdbus_gpio_call_open_finish', - 'peripheral_io_gdbus_gpio_call_open_sync', - 'peripheral_io_gdbus_gpio_complete_close', - 'peripheral_io_gdbus_gpio_complete_open', - 'peripheral_io_gdbus_gpio_get_type', - 'peripheral_io_gdbus_gpio_interface_info', - 'peripheral_io_gdbus_gpio_override_properties', - 'peripheral_io_gdbus_gpio_proxy_get_type', - 'peripheral_io_gdbus_gpio_proxy_new', - 'peripheral_io_gdbus_gpio_proxy_new_finish', - 'peripheral_io_gdbus_gpio_proxy_new_for_bus', - 'peripheral_io_gdbus_gpio_proxy_new_for_bus_finish', - 'peripheral_io_gdbus_gpio_proxy_new_for_bus_sync', - 'peripheral_io_gdbus_gpio_proxy_new_sync', - 'peripheral_io_gdbus_gpio_skeleton_get_type', - 'peripheral_io_gdbus_gpio_skeleton_new', - 'peripheral_io_gdbus_i2c_call_close', - 'peripheral_io_gdbus_i2c_call_close_finish', - 'peripheral_io_gdbus_i2c_call_close_sync', - 'peripheral_io_gdbus_i2c_call_open', - 'peripheral_io_gdbus_i2c_call_open_finish', - 'peripheral_io_gdbus_i2c_call_open_sync', - 'peripheral_io_gdbus_i2c_complete_close', - 'peripheral_io_gdbus_i2c_complete_open', - 'peripheral_io_gdbus_i2c_get_type', - 'peripheral_io_gdbus_i2c_interface_info', - 'peripheral_io_gdbus_i2c_override_properties', - 'peripheral_io_gdbus_i2c_proxy_get_type', - 'peripheral_io_gdbus_i2c_proxy_new', - 'peripheral_io_gdbus_i2c_proxy_new_finish', - 'peripheral_io_gdbus_i2c_proxy_new_for_bus', - 'peripheral_io_gdbus_i2c_proxy_new_for_bus_finish', - 'peripheral_io_gdbus_i2c_proxy_new_for_bus_sync', - 'peripheral_io_gdbus_i2c_proxy_new_sync', - 'peripheral_io_gdbus_i2c_skeleton_get_type', - 'peripheral_io_gdbus_i2c_skeleton_new', - 'peripheral_io_gdbus_pwm_call_close', - 'peripheral_io_gdbus_pwm_call_close_finish', - 'peripheral_io_gdbus_pwm_call_close_sync', - 'peripheral_io_gdbus_pwm_call_open', - 'peripheral_io_gdbus_pwm_call_open_finish', - 'peripheral_io_gdbus_pwm_call_open_sync', - 'peripheral_io_gdbus_pwm_complete_close', - 'peripheral_io_gdbus_pwm_complete_open', - 'peripheral_io_gdbus_pwm_get_type', - 'peripheral_io_gdbus_pwm_interface_info', - 'peripheral_io_gdbus_pwm_override_properties', - 'peripheral_io_gdbus_pwm_proxy_get_type', - 'peripheral_io_gdbus_pwm_proxy_new', - 'peripheral_io_gdbus_pwm_proxy_new_finish', - 'peripheral_io_gdbus_pwm_proxy_new_for_bus', - 'peripheral_io_gdbus_pwm_proxy_new_for_bus_finish', - 'peripheral_io_gdbus_pwm_proxy_new_for_bus_sync', - 'peripheral_io_gdbus_pwm_proxy_new_sync', - 'peripheral_io_gdbus_pwm_skeleton_get_type', - 'peripheral_io_gdbus_pwm_skeleton_new', - 'peripheral_io_gdbus_spi_call_close', - 'peripheral_io_gdbus_spi_call_close_finish', - 'peripheral_io_gdbus_spi_call_close_sync', - 'peripheral_io_gdbus_spi_call_open', - 'peripheral_io_gdbus_spi_call_open_finish', - 'peripheral_io_gdbus_spi_call_open_sync', - 'peripheral_io_gdbus_spi_complete_close', - 'peripheral_io_gdbus_spi_complete_open', - 'peripheral_io_gdbus_spi_get_type', - 'peripheral_io_gdbus_spi_interface_info', - 'peripheral_io_gdbus_spi_override_properties', - 'peripheral_io_gdbus_spi_proxy_get_type', - 'peripheral_io_gdbus_spi_proxy_new', - 'peripheral_io_gdbus_spi_proxy_new_finish', - 'peripheral_io_gdbus_spi_proxy_new_for_bus', - 'peripheral_io_gdbus_spi_proxy_new_for_bus_finish', - 'peripheral_io_gdbus_spi_proxy_new_for_bus_sync', - 'peripheral_io_gdbus_spi_proxy_new_sync', - 'peripheral_io_gdbus_spi_skeleton_get_type', - 'peripheral_io_gdbus_spi_skeleton_new', - 'peripheral_io_gdbus_uart_call_close', - 'peripheral_io_gdbus_uart_call_close_finish', - 'peripheral_io_gdbus_uart_call_close_sync', - 'peripheral_io_gdbus_uart_call_open', - 'peripheral_io_gdbus_uart_call_open_finish', - 'peripheral_io_gdbus_uart_call_open_sync', - 'peripheral_io_gdbus_uart_complete_close', - 'peripheral_io_gdbus_uart_complete_open', - 'peripheral_io_gdbus_uart_get_type', - 'peripheral_io_gdbus_uart_interface_info', - 'peripheral_io_gdbus_uart_override_properties', - 'peripheral_io_gdbus_uart_proxy_get_type', - 'peripheral_io_gdbus_uart_proxy_new', - 'peripheral_io_gdbus_uart_proxy_new_finish', - 'peripheral_io_gdbus_uart_proxy_new_for_bus', - 'peripheral_io_gdbus_uart_proxy_new_for_bus_finish', - 'peripheral_io_gdbus_uart_proxy_new_for_bus_sync', - 'peripheral_io_gdbus_uart_proxy_new_sync', - 'peripheral_io_gdbus_uart_skeleton_get_type', - 'peripheral_io_gdbus_uart_skeleton_new', - 'peripheral_pwm_close', - 'peripheral_pwm_open', - 'peripheral_pwm_set_duty_cycle', - 'peripheral_pwm_set_enabled', - 'peripheral_pwm_set_period', - 'peripheral_pwm_set_polarity', - 'peripheral_spi_close', - 'peripheral_spi_open', - 'peripheral_spi_read', - 'peripheral_spi_set_bit_order', - 'peripheral_spi_set_bits_per_word', - 'peripheral_spi_set_frequency', - 'peripheral_spi_set_mode', - 'peripheral_spi_transfer', - 'peripheral_spi_write', - 'peripheral_uart_close', - 'peripheral_uart_open', - 'peripheral_uart_read', - 'peripheral_uart_set_baud_rate', - 'peripheral_uart_set_byte_size', - 'peripheral_uart_set_flow_control', - 'peripheral_uart_set_parity', - 'peripheral_uart_set_stop_bits', - 'peripheral_uart_write', - ], - 'libcapi-system-runtime-info.so.0': [ - 'runtime_info_app_usage_destroy', - 'runtime_info_app_usage_get_appid', - 'runtime_info_app_usage_get_count', - 'runtime_info_app_usage_get_usage', - 'runtime_info_get_all_apps_cpu_rate', - 'runtime_info_get_all_apps_memory_usage', - 'runtime_info_get_cpu_usage', - 'runtime_info_get_physical_memory_size', - 'runtime_info_get_process_cpu_usage', - 'runtime_info_get_process_memory_info', - 'runtime_info_get_processor_count', - 'runtime_info_get_processor_current_frequency', - 'runtime_info_get_processor_max_frequency', - 'runtime_info_get_system_memory_info', - 'runtime_info_get_value_bool', - 'runtime_info_get_value_double', - 'runtime_info_get_value_int', - 'runtime_info_get_value_string', - 'runtime_info_set_changed_cb', - 'runtime_info_unset_changed_cb', - ], - 'libcapi-system-sensor.so.0': [ - 'clamp', - 'getAngleChange', - 'getDeclination', - 'getInclination', - 'getRotationMatrix', - 'matrixToQuat', - 'quatToMatrix', - 'remapCoordinateSystem', - 'sensor_add_provider', - 'sensor_add_sensor_added_cb', - 'sensor_add_sensor_removed_cb', - 'sensor_create_listener', - 'sensor_create_provider', - 'sensor_destroy_listener', - 'sensor_destroy_provider', - 'sensor_get_default_sensor', - 'sensor_get_default_sensor_by_uri', - 'sensor_get_fifo_count', - 'sensor_get_max_batch_count', - 'sensor_get_max_range', - 'sensor_get_min_interval', - 'sensor_get_min_range', - 'sensor_get_name', - 'sensor_get_resolution', - 'sensor_get_sensor_list', - 'sensor_get_sensor_list_by_uri', - 'sensor_get_type', - 'sensor_get_uri', - 'sensor_get_vendor', - 'sensor_is_supported', - 'sensor_is_supported_by_uri', - 'sensor_is_wake_up', - 'sensor_listener_read_data', - 'sensor_listener_set_accuracy_cb', - 'sensor_listener_set_attribute_int', - 'sensor_listener_set_event_cb', - 'sensor_listener_set_interval', - 'sensor_listener_set_max_batch_latency', - 'sensor_listener_set_option', - 'sensor_listener_start', - 'sensor_listener_stop', - 'sensor_listener_unset_accuracy_cb', - 'sensor_listener_unset_event_cb', - 'sensor_provider_publish', - 'sensor_provider_set_interval_changed_cb', - 'sensor_provider_set_name', - 'sensor_provider_set_range', - 'sensor_provider_set_resolution', - 'sensor_provider_set_start_cb', - 'sensor_provider_set_stop_cb', - 'sensor_provider_set_vendor', - 'sensor_recorder_create_option', - 'sensor_recorder_create_query', - 'sensor_recorder_data_get_double', - 'sensor_recorder_data_get_int', - 'sensor_recorder_data_get_time', - 'sensor_recorder_destroy_option', - 'sensor_recorder_destroy_query', - 'sensor_recorder_is_supported', - 'sensor_recorder_option_set_int', - 'sensor_recorder_query_set_int', - 'sensor_recorder_query_set_time', - 'sensor_recorder_read', - 'sensor_recorder_read_sync', - 'sensor_recorder_start', - 'sensor_recorder_stop', - 'sensor_remove_provider', - 'sensor_remove_sensor_added_cb', - 'sensor_remove_sensor_removed_cb', - 'sensor_util_get_altitude', - 'sensor_util_get_angle_change', - 'sensor_util_get_declination', - 'sensor_util_get_inclination', - 'sensor_util_get_orientation', - 'sensor_util_get_rotation_matrix', - 'sensor_util_get_rotation_matrix_from_vector', - 'sensor_util_remap_coordinate_system', - 'setCoordinate', - ], - 'libstorage.so.0.1': [ - 'storage_foreach_device_supported', - 'storage_format_mmc', - 'storage_get_available_space', - 'storage_get_compat_internal_path', - 'storage_get_directory', - 'storage_get_external_memory_size', - 'storage_get_external_memory_size64', - 'storage_get_internal_memory_size', - 'storage_get_internal_memory_size64', - 'storage_get_origin_internal_path', - 'storage_get_primary_sdcard', - 'storage_get_root_directory', - 'storage_get_state', - 'storage_get_storage_level', - 'storage_get_total_space', - 'storage_get_type', - 'storage_get_type_dev', - 'storage_is_mounted_opt_usr', - 'storage_request_format_mmc', - 'storage_request_mount_mmc', - 'storage_request_unmount_mmc', - 'storage_set_changed_cb', - 'storage_set_state_changed_cb', - 'storage_unset_changed_cb', - 'storage_unset_state_changed_cb', - ], - 'libcapi-system-info.so.0': [ - 'system_info_get_custom_bool', - 'system_info_get_custom_double', - 'system_info_get_custom_int', - 'system_info_get_custom_string', - 'system_info_get_custom_type', - 'system_info_get_platform_bool', - 'system_info_get_platform_double', - 'system_info_get_platform_int', - 'system_info_get_platform_string', - 'system_info_get_platform_type', - 'system_info_get_value_bool', - 'system_info_get_value_double', - 'system_info_get_value_int', - 'system_info_get_value_string', - ], - 'libcapi-system-system-settings.so.0': [ - 'add_multi_callback', - 'alloc_multi_callback_node', - 'clean_node', - 'delete_multi_callback', - 'find_callback_node', - 'font_conf_doc_parse', - 'free_multi_callback_node', - 'get_filelist_from_dir_path', - 'get_filename_from_fullname', - 'get_media_basename', - 'invoke_callback_list', - 'ss_json_ringtone_add', - 'ss_json_ringtone_contain', - 'ss_json_ringtone_list', - 'ss_json_ringtone_load_from_data', - 'ss_json_ringtone_open_file', - 'ss_json_ringtone_print', - 'ss_json_ringtone_remove', - 'system_setting_add_incoming_call_ringtone', - 'system_setting_del_incoming_call_ringtone', - 'system_setting_feature_check_font', - 'system_setting_feature_check_home_screen', - 'system_setting_feature_check_incoming_call', - 'system_setting_feature_check_lock_screen', - 'system_setting_feature_check_notification_email', - 'system_setting_feature_check_telephony', - 'system_setting_feature_check_wifi', - 'system_setting_get_3g_data_network', - 'system_setting_get_accessibility_tts', - 'system_setting_get_ads_id', - 'system_setting_get_automatic_time_update', - 'system_setting_get_auto_rotation_mode', - 'system_setting_get_default_font_type', - 'system_setting_get_developer_option_state', - 'system_setting_get_device_name', - 'system_setting_get_email_alert_ringtone', - 'system_setting_get_font_size', - 'system_setting_get_font_type', - 'system_setting_get_incoming_call_ringtone', - 'system_setting_get_locale_country', - 'system_setting_get_locale_language', - 'system_setting_get_locale_timeformat_24hour', - 'system_setting_get_locale_timezone', - 'system_setting_get_lockscreen_app', - 'system_setting_get_lock_state', - 'system_setting_get_motion_activation', - 'system_setting_get_network_flight_mode', - 'system_setting_get_network_wifi_notification', - 'system_setting_get_notification_repetition_period', - 'system_setting_get_screen_backlight_time', - 'system_setting_get_sound_lock', - 'system_setting_get_sound_notification', - 'system_setting_get_sound_silent_mode', - 'system_setting_get_sound_touch', - 'system_setting_get_time_changed', - 'system_setting_get_uds_state', - 'system_setting_get_usb_debugging_option', - 'system_setting_get_vibration', - 'system_setting_get_wallpaper_home_screen', - 'system_setting_get_wallpaper_lock_screen', - 'system_setting_list_incoming_call_ringtone', - 'system_settings_add_changed_cb', - 'system_settings_add_value', - 'system_settings_add_value_string', - 'system_settings_delete_value_string', - 'system_settings_del_value', - 'system_setting_set_3g_data_network', - 'system_setting_set_ads_id', - 'system_setting_set_automatic_time_update', - 'system_setting_set_auto_rotation_mode', - 'system_setting_set_changed_callback_3g_data_network', - 'system_setting_set_changed_callback_accessibility_tts', - 'system_setting_set_changed_callback_ads_id', - 'system_setting_set_changed_callback_automatic_time_update', - 'system_setting_set_changed_callback_auto_rotation_mode', - 'system_setting_set_changed_callback_developer_option_state', - 'system_setting_set_changed_callback_device_name', - 'system_setting_set_changed_callback_email_alert_ringtone', - 'system_setting_set_changed_callback_font_size', - 'system_setting_set_changed_callback_font_type', - 'system_setting_set_changed_callback_incoming_call_ringtone', - 'system_setting_set_changed_callback_locale_country', - 'system_setting_set_changed_callback_locale_language', - 'system_setting_set_changed_callback_locale_timeformat_24hour', - 'system_setting_set_changed_callback_locale_timezone', - 'system_setting_set_changed_callback_locale_timezone_changed', - 'system_setting_set_changed_callback_lockscreen_app', - 'system_setting_set_changed_callback_lock_state', - 'system_setting_set_changed_callback_motion_activation', - 'system_setting_set_changed_callback_network_flight_mode', - 'system_setting_set_changed_callback_network_wifi_notification', - 'system_setting_set_changed_callback_notification_repetition_period', - 'system_setting_set_changed_callback_screen_backlight_time', - 'system_setting_set_changed_callback_sound_lock', - 'system_setting_set_changed_callback_sound_notification', - 'system_setting_set_changed_callback_sound_silent_mode', - 'system_setting_set_changed_callback_sound_touch', - 'system_setting_set_changed_callback_time_changed', - 'system_setting_set_changed_callback_uds_pkg_list', - 'system_setting_set_changed_callback_uds_state', - 'system_setting_set_changed_callback_usb_debugging_option', - 'system_setting_set_changed_callback_vibration', - 'system_setting_set_changed_callback_wallpaper_home_screen', - 'system_setting_set_changed_callback_wallpaper_lock_screen', - 'system_setting_set_developer_option_state', - 'system_setting_set_device_name', - 'system_setting_set_email_alert_ringtone', - 'system_setting_set_font_size', - 'system_setting_set_font_type', - 'system_setting_set_incoming_call_ringtone', - 'system_setting_set_locale_country', - 'system_setting_set_locale_language', - 'system_setting_set_locale_timeformat_24hour', - 'system_setting_set_locale_timezone', - 'system_setting_set_lockscreen_app', - 'system_setting_set_lock_state', - 'system_setting_set_motion_activation', - 'system_setting_set_notification_repetition_period', - 'system_setting_set_screen_backlight_time', - 'system_setting_set_sound_notification', - 'system_setting_set_sound_silent_mode', - 'system_setting_set_usb_debugging_option', - 'system_setting_set_vibration', - 'system_setting_set_wallpaper_home_screen', - 'system_setting_set_wallpaper_lock_screen', - 'system_settings_feature_check_bool', - 'system_settings_foreach_value_string', - 'system_settings_get_item', - 'system_settings_get_value', - 'system_settings_get_value_bool', - 'system_settings_get_value_int', - 'system_settings_get_value_string', - 'system_settings_list_value', - 'system_settings_remove_changed_cb', - 'system_settings_set_changed_cb', - 'system_settings_set_value', - 'system_settings_set_value_bool', - 'system_settings_set_value_int', - 'system_settings_set_value_string', - 'system_settings_unset_changed_cb', - 'system_settings_vconf_get_key_string', - 'system_setting_unset_changed_callback_3g_data_network', - 'system_setting_unset_changed_callback_accessibility_tts', - 'system_setting_unset_changed_callback_ads_id', - 'system_setting_unset_changed_callback_automatic_time_update', - 'system_setting_unset_changed_callback_auto_rotation_mode', - 'system_setting_unset_changed_callback_developer_option_state', - 'system_setting_unset_changed_callback_device_name', - 'system_setting_unset_changed_callback_email_alert_ringtone', - 'system_setting_unset_changed_callback_font_size', - 'system_setting_unset_changed_callback_font_type', - 'system_setting_unset_changed_callback_incoming_call_ringtone', - 'system_setting_unset_changed_callback_locale_country', - 'system_setting_unset_changed_callback_locale_language', - 'system_setting_unset_changed_callback_locale_timeformat_24hour', - 'system_setting_unset_changed_callback_locale_timezone', - 'system_setting_unset_changed_callback_locale_timezone_changed', - 'system_setting_unset_changed_callback_lockscreen_app', - 'system_setting_unset_changed_callback_lock_state', - 'system_setting_unset_changed_callback_motion_activation', - 'system_setting_unset_changed_callback_network_flight_mode', - 'system_setting_unset_changed_callback_network_wifi_notification', - 'system_setting_unset_changed_callback_notification_repetition_period', - 'system_setting_unset_changed_callback_screen_backlight_time', - 'system_setting_unset_changed_callback_sound_lock', - 'system_setting_unset_changed_callback_sound_notification', - 'system_setting_unset_changed_callback_sound_silent_mode', - 'system_setting_unset_changed_callback_sound_touch', - 'system_setting_unset_changed_callback_time_changed', - 'system_setting_unset_changed_callback_uds_pkg_list', - 'system_setting_unset_changed_callback_uds_state', - 'system_setting_unset_changed_callback_usb_debugging_option', - 'system_setting_unset_changed_callback_vibration', - 'system_setting_unset_changed_callback_wallpaper_home_screen', - 'system_setting_unset_changed_callback_wallpaper_lock_screen', - 'system_setting_vconf_get_value_bool', - 'system_setting_vconf_get_value_int', - 'system_setting_vconf_get_value_string', - 'system_setting_vconf_set_changed_cb', - 'system_setting_vconf_set_changed_multi_cb', - 'system_setting_vconf_set_value_bool', - 'system_setting_vconf_set_value_int', - 'system_setting_vconf_set_value_string', - 'system_setting_vconf_unset_changed_cb', - 'system_setting_vconf_unset_changed_multi_cb', - ], - 'libttrace.so.1': [ - 'check_params', - 'libttrace_fini', - 'libttrace_init', - 'trace_async_begin', - 'traceAsyncBegin', - 'trace_async_end', - 'traceAsyncEnd', - 'trace_begin', - 'traceBegin', - 'traceCounter', - 'trace_end', - 'traceEnd', - 'traceMark', - 'trace_update_counter', - ], - 'libcapi-system-usbhost.so.0': [ - 'usb_host_claim_interface', - 'usb_host_config_destroy', - 'usb_host_config_get_interface', - 'usb_host_config_get_max_power', - 'usb_host_config_get_num_interfaces', - 'usb_host_config_is_self_powered', - 'usb_host_config_support_remote_wakeup', - 'usb_host_control_transfer', - 'usb_host_control_transfer_get_data', - 'usb_host_control_transfer_set_index', - 'usb_host_control_transfer_set_request', - 'usb_host_control_transfer_set_request_type', - 'usb_host_control_transfer_set_value', - 'usb_host_create', - 'usb_host_create_control_transfer', - 'usb_host_create_isochronous_transfer', - 'usb_host_create_transfer', - 'usb_host_destroy', - 'usb_host_device_close', - 'usb_host_device_get_address', - 'usb_host_device_get_bcd_device', - 'usb_host_device_get_bcd_usb', - 'usb_host_device_get_bus_number', - 'usb_host_device_get_class', - 'usb_host_device_get_config', - 'usb_host_device_get_config_str', - 'usb_host_device_get_id_product', - 'usb_host_device_get_id_vendor', - 'usb_host_device_get_manufacturer_str', - 'usb_host_device_get_max_packet_size_0', - 'usb_host_device_get_num_configurations', - 'usb_host_device_get_port_numbers', - 'usb_host_device_get_product_str', - 'usb_host_device_get_protocol', - 'usb_host_device_get_serial_number_str', - 'usb_host_device_get_sub_class', - 'usb_host_device_open', - 'usb_host_device_open_with_vid_pid', - 'usb_host_device_unconfigure', - 'usb_host_endpoint_get_direction', - 'usb_host_endpoint_get_interval', - 'usb_host_endpoint_get_max_packet_size', - 'usb_host_endpoint_get_number', - 'usb_host_endpoint_get_synch_type', - 'usb_host_endpoint_get_transfer_type', - 'usb_host_endpoint_get_usage_type', - 'usb_host_free_device_list', - 'usb_host_get_active_config', - 'usb_host_get_device_list', - 'usb_host_interface_get_altsetting', - 'usb_host_interface_get_endpoint', - 'usb_host_interface_get_number', - 'usb_host_interface_get_num_endpoints', - 'usb_host_interface_get_str', - 'usb_host_interface_set_altsetting', - 'usb_host_is_device_opened', - 'usb_host_ref_device', - 'usb_host_release_interface', - 'usb_host_set_config', - 'usb_host_set_hotplug_cb', - 'usb_host_transfer', - 'usb_host_transfer_cancel', - 'usb_host_transfer_destroy', - 'usb_host_transfer_get_data', - 'usb_host_transfer_get_iso_packet_data', - 'usb_host_transfer_get_iso_packet_length', - 'usb_host_transfer_get_iso_packet_status', - 'usb_host_transfer_get_length', - 'usb_host_transfer_get_num_iso_packets', - 'usb_host_transfer_get_status', - 'usb_host_transfer_get_type', - 'usb_host_transfer_set_callback', - 'usb_host_transfer_set_data', - 'usb_host_transfer_set_ep', - 'usb_host_transfer_set_iso_packet_length', - 'usb_host_transfer_set_num_iso_packets', - 'usb_host_transfer_set_timeout', - 'usb_host_transfer_submit', - 'usb_host_unref_device', - 'usb_host_unset_hotplug_cb', - ], - 'libupdate-control.so.1': [ - 'update_control_cancel_reservation', - 'update_control_check_new_version', - 'update_control_deinitialize', - 'update_control_do_update', - 'update_control_download_package', - 'update_control_get_property', - 'update_control_initialize', - 'update_control_make_reservation', - ], - 'libcbhm.so.1': [ - 'cbhm_close_service', - 'cbhm_hide', - 'cbhm_item_changed_callback_add', - 'cbhm_item_changed_callback_remove', - 'cbhm_item_count_get', - 'cbhm_item_selected_callback_add', - 'cbhm_item_selected_callback_remove', - 'cbhm_latest_item_type_get', - 'cbhml_changed_cb_hash_deinit', - 'cbhml_changed_cb_hash_init', - 'cbhml_changed_cb_table_get', - 'cbhml_monitor_cb_hash_deinit', - 'cbhml_monitor_cb_hash_init', - 'cbhml_monitor_cb_table_get', - 'cbhml_selection_handler_deinit', - 'cbhml_selection_handler_init', - 'cbhml_selection_hash_deinit', - 'cbhml_selection_hash_init', - 'cbhml_selection_obj_table_get', - 'cbhm_monitor_callback_add', - 'cbhm_monitor_callback_remove', - 'cbhm_open_service', - 'cbhm_selection_get', - 'cbhm_selection_set', - 'cbhm_selection_type_get', - 'cbhm_selection_type_set', - 'cbhm_show', - 'cbhm_state_get', - 'cbhm_utils_calloc', - 'cbhm_utils_free', - 'cbhm_utils_malloc', - ], - 'libeom.so.0': [ - 'eom_deinit', - 'eom_get_eom_output_ids', - 'eom_get_output_attribute', - 'eom_get_output_attribute_state', - 'eom_get_output_mode', - 'eom_get_output_physical_size', - 'eom_get_output_resolution', - 'eom_get_output_type', - 'eom_init', - 'eom_set_attribute_changed_cb', - 'eom_set_mode_changed_cb', - 'eom_set_output_added_cb', - 'eom_set_output_attribute', - 'eom_set_output_removed_cb', - 'eom_set_output_window', - 'eom_unset_attribute_changed_cb', - 'eom_unset_mode_changed_cb', - 'eom_unset_output_added_cb', - 'eom_unset_output_removed_cb', - 'eom_wayland_client_deinit', - 'eom_wayland_client_get_output_ids', - 'eom_wayland_client_get_output_info', - 'eom_wayland_client_init', - 'eom_wayland_client_set_attribute', - 'eom_wayland_client_set_window', - ], - 'libtbm.so.1': [ - 'tbm_backend_alloc', - 'tbm_backend_bufmgr_alloc_bo_func', - 'tbm_backend_bufmgr_alloc_bufmgr_func', - 'tbm_backend_bufmgr_free_bo_func', - 'tbm_backend_bufmgr_free_bufmgr_func', - 'tbm_backend_bufmgr_query_display_server', - 'tbm_backend_bufmgr_register_bo_func', - 'tbm_backend_bufmgr_register_bufmgr_func', - 'tbm_backend_free', - 'tbm_backend_get_bo_priv', - 'tbm_backend_get_bufmgr_priv', - 'tbm_backend_get_priv_from_bufmgr', - 'tbm_backend_init', - 'tbm_backend_is_display_server', - 'tbm_backend_set_bo_priv', - 'tbm_bo_add_user_data', - 'tbm_bo_alloc', - 'tbm_bo_delete_user_data', - 'tbm_bo_export', - 'tbm_bo_export_fd', - 'tbm_bo_get_flags', - 'tbm_bo_get_handle', - 'tbm_bo_get_user_data', - 'tbm_bo_import', - 'tbm_bo_import_fd', - 'tbm_bo_locked', - 'tbm_bo_map', - 'tbm_bo_ref', - 'tbm_bo_set_user_data', - 'tbm_bo_size', - 'tbm_bo_swap', - 'tbm_bo_unmap', - 'tbm_bo_unref', - 'tbm_bufmgr_bind_native_display', - 'tbm_bufmgr_debug_dump_all', - 'tbm_bufmgr_debug_dump_set_scale', - 'tbm_bufmgr_debug_get_ref_count', - 'tbm_bufmgr_debug_queue_dump', - 'tbm_bufmgr_debug_set_trace_mask', - 'tbm_bufmgr_debug_show', - 'tbm_bufmgr_debug_tbm_info_get', - 'tbm_bufmgr_debug_trace', - 'tbm_bufmgr_deinit', - 'tbm_bufmgr_get', - 'tbm_bufmgr_get_capability', - 'tbm_bufmgr_get_fd_limit', - 'tbm_bufmgr_init', - 'tbm_bufmgr_server_init', - 'tbm_bufmgr_set_bo_lock_type', - 'tbm_drm_helper_get_auth_info', - 'tbm_drm_helper_get_fd', - 'tbm_drm_helper_get_master_fd', - 'tbm_drm_helper_set_fd', - 'tbm_drm_helper_set_tbm_master_fd', - 'tbm_drm_helper_unset_fd', - 'tbm_drm_helper_unset_tbm_master_fd', - 'tbm_drm_helper_wl_auth_server_deinit', - 'tbm_drm_helper_wl_auth_server_init', - 'tbm_dummy_display_create', - 'tbm_dummy_display_destroy', - 'tbm_dummy_display_is_valid', - 'tbm_get_last_error', - 'tbm_log_enable_color', - 'tbm_log_enable_dlog', - 'tbm_log_print', - 'tbm_log_print_stdout', - 'tbm_log_set_assert_level', - 'tbm_log_set_debug_level', - 'tbm_log_set_path', - 'tbm_surface_create', - 'tbm_surface_destroy', - 'tbm_surface_get_format', - 'tbm_surface_get_height', - 'tbm_surface_get_info', - 'tbm_surface_get_width', - 'tbm_surface_internal_add_user_data', - 'tbm_surface_internal_capture_buffer', - 'tbm_surface_internal_capture_shm_buffer', - 'tbm_surface_internal_create_with_bos', - 'tbm_surface_internal_create_with_flags', - 'tbm_surface_internal_delete_user_data', - 'tbm_surface_internal_destroy', - 'tbm_surface_internal_dump_buffer', - 'tbm_surface_internal_dump_end', - 'tbm_surface_internal_dump_shm_buffer', - 'tbm_surface_internal_dump_start', - 'tbm_surface_internal_dump_with_scale_start', - 'tbm_surface_internal_get_bo', - 'tbm_surface_internal_get_bpp', - 'tbm_surface_internal_get_damage', - 'tbm_surface_internal_get_format', - 'tbm_surface_internal_get_height', - 'tbm_surface_internal_get_info', - 'tbm_surface_internal_get_num_bos', - 'tbm_surface_internal_get_num_planes', - 'tbm_surface_internal_get_plane_bo_idx', - 'tbm_surface_internal_get_plane_data', - 'tbm_surface_internal_get_size', - 'tbm_surface_internal_get_user_data', - 'tbm_surface_internal_get_width', - 'tbm_surface_internal_is_valid', - 'tbm_surface_internal_query_supported_formats', - 'tbm_surface_internal_ref', - 'tbm_surface_internal_set_damage', - 'tbm_surface_internal_set_debug_data', - 'tbm_surface_internal_set_debug_pid', - 'tbm_surface_internal_set_user_data', - 'tbm_surface_internal_unmap', - 'tbm_surface_internal_unref', - 'tbm_surface_map', - 'tbm_surface_query_formats', - 'tbm_surface_queue_acquire', - 'tbm_surface_queue_add_acquirable_cb', - 'tbm_surface_queue_add_can_dequeue_cb', - 'tbm_surface_queue_add_dequeuable_cb', - 'tbm_surface_queue_add_dequeue_cb', - 'tbm_surface_queue_add_destroy_cb', - 'tbm_surface_queue_add_reset_cb', - 'tbm_surface_queue_add_trace_cb', - 'tbm_surface_queue_can_acquire', - 'tbm_surface_queue_cancel_acquire', - 'tbm_surface_queue_cancel_dequeue', - 'tbm_surface_queue_can_dequeue', - 'tbm_surface_queue_create', - 'tbm_surface_queue_dequeue', - 'tbm_surface_queue_destroy', - 'tbm_surface_queue_enqueue', - 'tbm_surface_queue_flush', - 'tbm_surface_queue_free_flush', - 'tbm_surface_queue_get_format', - 'tbm_surface_queue_get_height', - 'tbm_surface_queue_get_size', - 'tbm_surface_queue_get_surfaces', - 'tbm_surface_queue_get_trace_surface_num', - 'tbm_surface_queue_get_width', - 'tbm_surface_queue_notify_dequeuable', - 'tbm_surface_queue_notify_reset', - 'tbm_surface_queue_release', - 'tbm_surface_queue_remove_acquirable_cb', - 'tbm_surface_queue_remove_can_dequeue_cb', - 'tbm_surface_queue_remove_dequeuable_cb', - 'tbm_surface_queue_remove_dequeue_cb', - 'tbm_surface_queue_remove_destroy_cb', - 'tbm_surface_queue_remove_reset_cb', - 'tbm_surface_queue_remove_trace_cb', - 'tbm_surface_queue_reset', - 'tbm_surface_queue_sequence_create', - 'tbm_surface_queue_set_alloc_cb', - 'tbm_surface_queue_set_modes', - 'tbm_surface_queue_set_size', - 'tbm_surface_queue_set_sync_count', - 'tbm_surface_unmap', - 'tbm_sync_fence_create', - 'tbm_sync_fence_merge', - 'tbm_sync_fence_wait', - 'tbm_sync_timeline_create', - 'tbm_sync_timeline_inc', - 'user_data_create', - 'user_data_delete', - 'user_data_lookup', - ], - 'libcapi-ui-inputmethod.so.0': [ - 'ime_commit_content', - 'ime_commit_string', - 'ime_context_get_autocapital_type', - 'ime_context_get_bidi_direction', - 'ime_context_get_caps_mode', - 'ime_context_get_cursor_position', - 'ime_context_get_input_hint', - 'ime_context_get_language', - 'ime_context_get_layout', - 'ime_context_get_layout_variation', - 'ime_context_get_password_mode', - 'ime_context_get_prediction_mode', - 'ime_context_get_return_key_state', - 'ime_context_get_return_key_type', - 'ime_create_option_window', - 'ime_delete_surrounding_text', - 'ime_destroy_option_window', - 'ime_device_info_get_class', - 'ime_device_info_get_name', - 'ime_device_info_get_subclass', - 'ime_event_set_accessibility_state_changed_cb', - 'ime_event_set_candidate_hide_cb', - 'ime_event_set_candidate_show_cb', - 'ime_event_set_caps_mode_changed_cb', - 'ime_event_set_cursor_position_updated_cb', - 'ime_event_set_display_language_changed_cb', - 'ime_event_set_focus_in_cb', - 'ime_event_set_focus_out_cb', - 'ime_event_set_geometry_requested_cb', - 'ime_event_set_imdata_requested_cb', - 'ime_event_set_imdata_set_cb', - 'ime_event_set_input_context_reset_cb', - 'ime_event_set_language_requested_cb', - 'ime_event_set_language_set_cb', - 'ime_event_set_layout_set_cb', - 'ime_event_set_lookup_table_changed_cb', - 'ime_event_set_mime_type_set_request_cb', - 'ime_event_set_optimization_hint_set_cb', - 'ime_event_set_option_window_created_cb', - 'ime_event_set_option_window_destroyed_cb', - 'ime_event_set_prediction_hint_data_set_cb', - 'ime_event_set_prediction_hint_set_cb', - 'ime_event_set_process_input_device_event_cb', - 'ime_event_set_process_key_event_cb', - 'ime_event_set_return_key_state_set_cb', - 'ime_event_set_return_key_type_set_cb', - 'ime_event_set_rotation_degree_changed_cb', - 'ime_event_set_surrounding_text_updated_cb', - 'ime_event_unset_process_input_device_event_cb', - 'ime_finalize', - 'ime_flush_imengine', - 'ime_get_main_window', - 'ime_get_selected_text', - 'ime_get_surrounding_text', - 'ime_hide_preedit_string', - 'ime_initialize', - 'ime_input_device_rotary_get_direction', - 'ime_prepare', - 'ime_request_hide', - 'ime_request_surrounding_text', - 'ime_reset_imengine', - 'ime_run', - 'ime_select_candidate', - 'ime_send_key_event', - 'ime_send_private_command', - 'ime_set_dotnet_flag', - 'ime_set_floating_drag_end', - 'ime_set_floating_drag_start', - 'ime_set_floating_mode', - 'ime_set_imengine', - 'ime_set_selection', - 'ime_set_size', - 'ime_set_window_creation_defer_flag', - 'ime_show_preedit_string', - 'ime_update_input_context', - 'ime_update_preedit_string', - ], - 'libcapi-ui-inputmethod-manager.so.0': [ - 'ime_manager_get_active_ime', - 'ime_manager_get_enabled_ime_count', - 'ime_manager_is_ime_enabled', - 'ime_manager_prelaunch_ime', - 'ime_manager_show_ime_list', - 'ime_manager_show_ime_selector', - ], - 'libma.so': [ - 'ma_client_create', - 'ma_client_destroy', - 'ma_client_get_audio_streaming_cb', - 'ma_client_get_client_state', - 'ma_client_get_count', - 'ma_client_get_error', - 'ma_client_get_error_cb', - 'ma_client_get_lang_changed_cb', - 'ma_client_get_previous_state', - 'ma_client_get_state_changed_cb', - 'ma_client_is_valid', - 'ma_client_not_use_callback', - 'ma_client_set_audio_streaming_cb', - 'ma_client_set_client_state', - 'ma_client_set_error', - 'ma_client_set_error_cb', - 'ma_client_set_lang_changed_cb', - 'ma_client_set_state_changed_cb', - 'ma_client_set_ui_pid', - 'ma_client_use_callback', - 'ma_config_mgr_change_assistant', - 'ma_config_mgr_deinitialize', - 'ma_config_mgr_get_assistant_info', - 'ma_config_mgr_get_default_language', - 'ma_config_mgr_initialize', - 'ma_config_mgr_set_default_assistant', - 'ma_config_mgr_set_lang_cb', - 'ma_config_mgr_unset_lang_cb', - 'ma_dbus_close_connection', - 'ma_dbus_get_recording_audio_format', - 'ma_dbus_open_connection', - 'ma_dbus_reconnect', - 'ma_dbus_request_deinitialize', - 'ma_dbus_request_hello', - 'ma_dbus_request_initialize', - 'ma_dbus_send_asr_result', - 'ma_dbus_send_result', - 'ma_deinitialize', - 'ma_get_current_language', - 'ma_get_recording_audio_format', - 'ma_get_state', - 'ma_initialize', - 'ma_prepare', - 'ma_send_asr_result', - 'ma_send_result', - 'ma_set_audio_streaming_cb', - 'ma_set_error_cb', - 'ma_set_language_changed_cb', - 'ma_set_state_changed_cb', - 'ma_unprepare', - 'ma_unset_audio_streaming_cb', - 'ma_unset_error_cb', - 'ma_unset_language_changed_cb', - 'ma_unset_state_changed_cb', - ], - 'libstt.so': [ - 'stt_cancel', - 'stt_cancel_file', - 'stt_client_destroy', - 'stt_client_get', - 'stt_client_get_by_uid', - 'stt_client_get_client_list', - 'stt_client_get_size', - 'stt_client_get_use_callback', - 'stt_client_new', - 'stt_client_not_use_callback', - 'stt_client_use_callback', - 'stt_config_check_default_engine_is_valid', - 'stt_config_check_default_language_is_valid', - 'stt_config_mgr_add_time_info', - 'stt_config_mgr_finalize', - 'stt_config_mgr_foreach_time_info', - 'stt_config_mgr_get_auto_language', - 'stt_config_mgr_get_default_language', - 'stt_config_mgr_get_engine', - 'stt_config_mgr_get_engine_agreement', - 'stt_config_mgr_get_engine_list', - 'stt_config_mgr_get_language_list', - 'stt_config_mgr_get_silence_detection', - 'stt_config_mgr_initialize', - 'stt_config_mgr_inotify_event_cb', - 'stt_config_mgr_remove_time_info_file', - 'stt_config_mgr_reset_time_info', - 'stt_config_mgr_save_time_info_file', - 'stt_config_mgr_set_auto_language', - 'stt_config_mgr_set_callback', - 'stt_config_mgr_set_default_language', - 'stt_config_mgr_set_engine', - 'stt_config_mgr_set_silence_detection', - 'stt_config_mgr_unset_callback', - 'stt_create', - 'stt_dbus_close_connection', - 'stt_dbus_open_connection', - 'stt_dbus_reconnect', - 'stt_dbus_request_cancel', - 'stt_dbus_request_cancel_file', - 'stt_dbus_request_check_app_agreed', - 'stt_dbus_request_finalize', - 'stt_dbus_request_get_default_lang', - 'stt_dbus_request_get_private_data', - 'stt_dbus_request_get_support_langs', - 'stt_dbus_request_hello', - 'stt_dbus_request_initialize', - 'stt_dbus_request_is_recognition_type_supported', - 'stt_dbus_request_set_current_engine', - 'stt_dbus_request_set_private_data', - 'stt_dbus_request_set_start_sound', - 'stt_dbus_request_set_stop_sound', - 'stt_dbus_request_start', - 'stt_dbus_request_start_file', - 'stt_dbus_request_stop', - 'stt_dbus_request_unset_start_sound', - 'stt_dbus_request_unset_stop_sound', - 'stt_destroy', - 'stt_foreach_detailed_result', - 'stt_foreach_supported_engines', - 'stt_foreach_supported_languages', - 'stt_get_default_language', - 'stt_get_engine', - 'stt_get_error_message', - 'stt_get_private_data', - 'stt_get_recording_volume', - 'stt_get_state', - 'stt_is_recognition_type_supported', - 'stt_parser_clear_time_info', - 'stt_parser_find_config_changed', - 'stt_parser_free_engine_info', - 'stt_parser_get_engine_info', - 'stt_parser_get_time_info', - 'stt_parser_load_config', - 'stt_parser_print_engine_info', - 'stt_parser_set_auto_lang', - 'stt_parser_set_engine', - 'stt_parser_set_language', - 'stt_parser_set_silence_detection', - 'stt_parser_set_time_info', - 'stt_parser_unload_config', - 'stt_prepare', - 'stt_set_credential', - 'stt_set_default_language_changed_cb', - 'stt_set_engine', - 'stt_set_engine_changed_cb', - 'stt_set_error_cb', - 'stt_set_private_data', - 'stt_set_recognition_result_cb', - 'stt_set_server_stt', - 'stt_set_silence_detection', - 'stt_set_speech_status_cb', - 'stt_set_start_sound', - 'stt_set_state_changed_cb', - 'stt_set_stop_sound', - 'stt_start', - 'stt_start_file', - 'stt_stop', - 'stt_tag', - 'stt_unprepare', - 'stt_unset_default_language_changed_cb', - 'stt_unset_engine_changed_cb', - 'stt_unset_error_cb', - 'stt_unset_recognition_result_cb', - 'stt_unset_speech_status_cb', - 'stt_unset_start_sound', - 'stt_unset_state_changed_cb', - 'stt_unset_stop_sound', - ], - 'libstt_engine.so': [ - 'client_show_list', - 'stt_client_get_app_agreed', - 'stt_client_get_current_recognition', - 'stt_client_set_app_agreed', - 'stt_client_set_current_recognition', - 'stt_client_unset_current_recognition', - 'stt_config_check_default_engine_is_valid', - 'stt_config_check_default_language_is_valid', - 'stt_config_mgr_add_time_info', - 'stt_config_mgr_finalize', - 'stt_config_mgr_foreach_time_info', - 'stt_config_mgr_get_auto_language', - 'stt_config_mgr_get_default_language', - 'stt_config_mgr_get_engine', - 'stt_config_mgr_get_engine_agreement', - 'stt_config_mgr_get_engine_list', - 'stt_config_mgr_get_language_list', - 'stt_config_mgr_get_silence_detection', - 'stt_config_mgr_initialize', - 'stt_config_mgr_inotify_event_cb', - 'stt_config_mgr_remove_time_info_file', - 'stt_config_mgr_reset_time_info', - 'stt_config_mgr_save_time_info_file', - 'stt_config_mgr_set_auto_language', - 'stt_config_mgr_set_callback', - 'stt_config_mgr_set_default_language', - 'stt_config_mgr_set_engine', - 'stt_config_mgr_set_silence_detection', - 'stt_config_mgr_unset_callback', - 'sttd_cleanup_client', - 'sttd_client_add', - 'sttd_client_delete', - 'sttd_client_get_list', - 'sttd_client_get_pid', - 'sttd_client_get_ref_count', - 'sttd_client_get_start_sound', - 'sttd_client_get_state', - 'sttd_client_get_stop_sound', - 'sttd_client_set_start_sound', - 'sttd_client_set_state', - 'sttd_client_set_stop_sound', - 'sttd_config_finalize', - 'sttd_config_get_default_engine', - 'sttd_config_get_default_language', - 'sttd_config_get_default_silence_detection', - 'sttd_config_initialize', - 'sttd_config_set_default_engine', - 'sttd_config_time_add', - 'sttd_config_time_reset', - 'sttd_config_time_save', - 'sttdc_send_error_signal', - 'sttdc_send_hello', - 'sttdc_send_result', - 'sttdc_send_set_state', - 'sttdc_send_set_volume', - 'sttdc_send_speech_status', - 'sttd_dbus_close_connection', - 'sttd_dbus_open_connection', - 'sttd_dbus_server_cancel', - 'sttd_dbus_server_cancel_file', - 'sttd_dbus_server_check_app_agreed', - 'sttd_dbus_server_finalize', - 'sttd_dbus_server_get_current_engine', - 'sttd_dbus_server_get_default_lang', - 'sttd_dbus_server_get_private_data', - 'sttd_dbus_server_get_support_engines', - 'sttd_dbus_server_get_support_lang', - 'sttd_dbus_server_hello', - 'sttd_dbus_server_initialize', - 'sttd_dbus_server_is_recognition_type_supported', - 'sttd_dbus_server_set_current_engine', - 'sttd_dbus_server_set_private_data', - 'sttd_dbus_server_set_start_sound', - 'sttd_dbus_server_set_stop_sound', - 'sttd_dbus_server_start', - 'sttd_dbus_server_start_file', - 'sttd_dbus_server_stop', - 'sttd_dbus_server_unset_start_sound', - 'sttd_dbus_server_unset_stop_sound', - 'sttd_engine_agent_check_app_agreed', - 'sttd_engine_agent_get_current_engine', - 'sttd_engine_agent_get_default_lang', - 'sttd_engine_agent_get_engine_list', - 'sttd_engine_agent_get_option_supported', - 'sttd_engine_agent_get_private_data', - 'sttd_engine_agent_init', - 'sttd_engine_agent_is_credential_needed', - 'sttd_engine_agent_is_default_engine', - 'sttd_engine_agent_is_recognition_type_supported', - 'sttd_engine_agent_load_current_engine', - 'sttd_engine_agent_need_network', - 'sttd_engine_agent_recognize_cancel', - 'sttd_engine_agent_recognize_start_engine', - 'sttd_engine_agent_recognize_start_file', - 'sttd_engine_agent_recognize_start_recorder', - 'sttd_engine_agent_recognize_stop_engine', - 'sttd_engine_agent_recognize_stop_file', - 'sttd_engine_agent_recognize_stop_recorder', - 'sttd_engine_agent_release', - 'sttd_engine_agent_send_error', - 'sttd_engine_agent_send_result', - 'sttd_engine_agent_send_speech_status', - 'sttd_engine_agent_set_default_engine', - 'sttd_engine_agent_set_default_language', - 'sttd_engine_agent_set_private_data', - 'sttd_engine_agent_set_recording_data', - 'sttd_engine_agent_set_silence_detection', - 'sttd_engine_agent_supported_langs', - 'sttd_engine_agent_unload_current_engine', - 'sttd_finalize', - 'sttd_initialize', - 'sttd_recorder_clear', - 'sttd_recorder_create', - 'sttd_recorder_deinitialize', - 'sttd_recorder_destroy', - 'sttd_recorder_initialize', - 'sttd_recorder_set_audio_session', - 'sttd_recorder_start', - 'sttd_recorder_start_file', - 'sttd_recorder_stop', - 'sttd_recorder_stop_file', - 'sttd_recorder_unset_audio_session', - 'sttd_server_cancel', - 'sttd_server_cancel_file', - 'sttd_server_check_app_agreed', - 'sttd_server_finalize', - 'sttd_server_get_current_engine', - 'sttd_server_get_current_langauage', - 'sttd_server_get_private_data', - 'sttd_server_get_supported_engines', - 'sttd_server_get_supported_languages', - 'sttd_server_initialize', - 'sttd_server_is_recognition_type_supported', - 'sttd_server_set_current_engine', - 'sttd_server_set_private_data', - 'sttd_server_set_start_sound', - 'sttd_server_set_stop_sound', - 'sttd_server_start', - 'sttd_server_start_file', - 'sttd_server_stop', - 'stte_main', - 'stt_engine_check_app_agreed', - 'stt_engine_deinitialize', - 'stt_engine_foreach_result_time', - 'stt_engine_get_audio_type', - 'stt_engine_get_first_language', - 'stt_engine_get_private_data', - 'stt_engine_get_supported_langs', - 'stt_engine_initialize', - 'stt_engine_is_valid_language', - 'stt_engine_load', - 'stt_engine_need_app_credential', - 'stt_engine_recognize_cancel', - 'stt_engine_recognize_cancel_file', - 'stt_engine_recognize_start', - 'stt_engine_recognize_start_file', - 'stt_engine_recognize_stop', - 'stt_engine_send_error', - 'stt_engine_send_result', - 'stt_engine_send_speech_status', - 'stt_engine_set_private_data', - 'stt_engine_set_private_data_requested_cb', - 'stt_engine_set_private_data_set_cb', - 'stt_engine_set_recognition_result_cb', - 'stt_engine_set_recording_data', - 'stt_engine_set_silence_detection', - 'stt_engine_support_recognition_type', - 'stt_engine_support_silence', - 'stt_engine_unload', - 'stte_send_error', - 'stte_send_result', - 'stte_send_speech_status', - 'stte_set_private_data_requested_cb', - 'stte_set_private_data_set_cb', - 'stt_network_finalize', - 'stt_network_initialize', - 'stt_network_is_connected', - 'stt_parser_clear_time_info', - 'stt_parser_find_config_changed', - 'stt_parser_free_engine_info', - 'stt_parser_get_engine_info', - 'stt_parser_get_time_info', - 'stt_parser_load_config', - 'stt_parser_print_engine_info', - 'stt_parser_set_auto_lang', - 'stt_parser_set_engine', - 'stt_parser_set_language', - 'stt_parser_set_silence_detection', - 'stt_parser_set_time_info', - 'stt_parser_unload_config', - 'stt_tag', - ], - 'libtts.so': [ - 'tts_add_pcm', - 'tts_add_text', - 'tts_client_destroy', - 'tts_client_get', - 'tts_client_get_by_uid', - 'tts_client_get_client_list', - 'tts_client_get_connected_client_count', - 'tts_client_get_mode_client_count', - 'tts_client_get_size', - 'tts_client_get_use_callback', - 'tts_client_new', - 'tts_client_not_use_callback', - 'tts_client_use_callback', - 'tts_config_check_default_engine_is_valid', - 'tts_config_check_default_voice_is_valid', - 'tts_config_mgr_finalize', - 'tts_config_mgr_get_auto_voice', - 'tts_config_mgr_get_engine', - 'tts_config_mgr_get_engine_list', - 'tts_config_mgr_get_max_text_size', - 'tts_config_mgr_get_pitch', - 'tts_config_mgr_get_speech_rate', - 'tts_config_mgr_get_voice', - 'tts_config_mgr_get_voice_list', - 'tts_config_mgr_initialize', - 'tts_config_mgr_inotify_event_cb', - 'tts_config_mgr_set_auto_voice', - 'tts_config_mgr_set_callback', - 'tts_config_mgr_set_engine', - 'tts_config_mgr_set_pitch', - 'tts_config_mgr_set_speech_rate', - 'tts_config_mgr_set_voice', - 'tts_config_mgr_unset_callback', - 'tts_config_set_screen_reader_callback', - 'tts_config_unset_screen_reader_callback', - 'tts_create', - 'tts_dbus_close_connection', - 'tts_dbus_open_connection', - 'tts_dbus_reconnect', - 'tts_dbus_request_add_pcm', - 'tts_dbus_request_add_text', - 'tts_dbus_request_finalize', - 'tts_dbus_request_get_private_data', - 'tts_dbus_request_hello', - 'tts_dbus_request_initialize', - 'tts_dbus_request_pause', - 'tts_dbus_request_play', - 'tts_dbus_request_play_pcm', - 'tts_dbus_request_set_private_data', - 'tts_dbus_request_stop', - 'tts_dbus_request_stop_pcm', - 'tts_destroy', - 'tts_foreach_supported_voices', - 'tts_get_default_voice', - 'tts_get_error_message', - 'tts_get_max_text_size', - 'tts_get_mode', - 'tts_get_private_data', - 'tts_get_speed_range', - 'tts_get_state', - 'tts_parser_copy_xml', - 'tts_parser_find_config_changed', - 'tts_parser_free_engine_info', - 'tts_parser_get_engine_info', - 'tts_parser_load_config', - 'tts_parser_print_engine_info', - 'tts_parser_reset', - 'tts_parser_set_auto_voice', - 'tts_parser_set_engine', - 'tts_parser_set_pitch', - 'tts_parser_set_speech_rate', - 'tts_parser_set_voice', - 'tts_parser_unload_config', - 'tts_pause', - 'tts_pause_async', - 'tts_play', - 'tts_play_async', - 'tts_play_pcm', - 'tts_prepare', - 'tts_prepare_sync', - 'tts_repeat', - 'tts_set_credential', - 'tts_set_default_voice_changed_cb', - 'tts_set_engine_changed_cb', - 'tts_set_error_cb', - 'tts_set_mode', - 'tts_set_private_data', - 'tts_set_server_tts', - 'tts_set_state_changed_cb', - 'tts_set_utterance_completed_cb', - 'tts_set_utterance_started_cb', - 'tts_stop', - 'tts_stop_aync', - 'tts_stop_pcm', - 'tts_tag', - 'tts_unprepare', - 'tts_unset_default_voice_changed_cb', - 'tts_unset_engine_changed_cb', - 'tts_unset_error_cb', - 'tts_unset_state_changed_cb', - 'tts_unset_utterance_completed_cb', - 'tts_unset_utterance_started_cb', - ], - 'libtts_engine.so': [ - 'tts_config_check_default_engine_is_valid', - 'tts_config_check_default_voice_is_valid', - 'tts_config_mgr_finalize', - 'tts_config_mgr_get_auto_voice', - 'tts_config_mgr_get_engine', - 'tts_config_mgr_get_engine_list', - 'tts_config_mgr_get_max_text_size', - 'tts_config_mgr_get_pitch', - 'tts_config_mgr_get_speech_rate', - 'tts_config_mgr_get_voice', - 'tts_config_mgr_get_voice_list', - 'tts_config_mgr_initialize', - 'tts_config_mgr_inotify_event_cb', - 'tts_config_mgr_set_auto_voice', - 'tts_config_mgr_set_callback', - 'tts_config_mgr_set_engine', - 'tts_config_mgr_set_pitch', - 'tts_config_mgr_set_speech_rate', - 'tts_config_mgr_set_voice', - 'tts_config_mgr_unset_callback', - 'tts_config_set_screen_reader_callback', - 'tts_config_unset_screen_reader_callback', - 'ttsd_cleanup_client', - 'ttsd_config_finalize', - 'ttsd_config_get_default_engine', - 'ttsd_config_get_default_pitch', - 'ttsd_config_get_default_speed', - 'ttsd_config_get_default_voice', - 'ttsd_config_initialize', - 'ttsd_config_save_error', - 'ttsd_config_set_default_engine', - 'ttsd_config_set_screen_reader_callback', - 'ttsdc_send_error_message', - 'ttsdc_send_hello', - 'ttsdc_send_message', - 'ttsdc_send_set_state_message', - 'ttsdc_send_utt_finish_message', - 'ttsdc_send_utt_start_message', - 'ttsd_data_add_sound_data', - 'ttsd_data_add_speak_data', - 'ttsd_data_clear_data', - 'ttsd_data_clear_sound_data', - 'ttsd_data_clear_speak_data', - 'ttsd_data_delete_client', - 'ttsd_data_foreach_clients', - 'ttsd_data_get_client_count', - 'ttsd_data_get_client_state', - 'ttsd_data_get_current_playing', - 'ttsd_data_get_pid', - 'ttsd_data_get_same_pid_client_count', - 'ttsd_data_get_sound_data', - 'ttsd_data_get_sound_data_size', - 'ttsd_data_get_speak_data', - 'ttsd_data_get_speak_data_size', - 'ttsd_data_is_client', - 'ttsd_data_is_uttid_valid', - 'ttsd_data_new_client', - 'ttsd_data_reset_used_voice', - 'ttsd_data_save_error_log', - 'ttsd_data_set_client_state', - 'ttsd_data_set_used_voice', - 'ttsd_dbus_close_connection', - 'ttsd_dbus_open_connection', - 'ttsd_dbus_server_add_pcm', - 'ttsd_dbus_server_add_text', - 'ttsd_dbus_server_finalize', - 'ttsd_dbus_server_get_current_voice', - 'ttsd_dbus_server_get_private_data', - 'ttsd_dbus_server_get_support_voices', - 'ttsd_dbus_server_hello', - 'ttsd_dbus_server_initialize', - 'ttsd_dbus_server_pause', - 'ttsd_dbus_server_play', - 'ttsd_dbus_server_play_pcm', - 'ttsd_dbus_server_set_private_data', - 'ttsd_dbus_server_stop', - 'ttsd_dbus_server_stop_pcm', - 'ttsd_engine_agent_init', - 'ttsd_engine_agent_is_credential_needed', - 'ttsd_engine_agent_is_same_engine', - 'ttsd_engine_agent_load_current_engine', - 'ttsd_engine_agent_need_network', - 'ttsd_engine_agent_release', - 'ttsd_engine_agent_set_default_pitch', - 'ttsd_engine_agent_set_default_speed', - 'ttsd_engine_agent_set_default_voice', - 'ttsd_engine_agent_set_private_data_requested_cb', - 'ttsd_engine_agent_set_private_data_set_cb', - 'ttsd_engine_agent_unload_current_engine', - 'ttsd_engine_cancel_synthesis', - 'ttsd_engine_check_app_agreed', - 'ttsd_engine_get_default_voice', - 'ttsd_engine_get_private_data', - 'ttsd_engine_get_voice_list', - 'ttsd_engine_load_voice', - 'ttsd_engine_select_valid_voice', - 'ttsd_engine_set_private_data', - 'ttsd_engine_start_synthesis', - 'ttsd_engine_unload_voice', - 'ttsd_finalize', - 'ttsd_get_mode', - 'ttsd_get_synth_control', - 'ttsd_initialize', - 'ttsd_network_finalize', - 'ttsd_network_initialize', - 'ttsd_network_is_connected', - 'ttsd_player_all_stop', - 'ttsd_player_check_current_playback_focus', - 'ttsd_player_clear', - 'ttsd_player_create_instance', - 'ttsd_player_destroy_instance', - 'ttsd_player_init', - 'ttsd_player_pause', - 'ttsd_player_play', - 'ttsd_player_play_pcm', - 'ttsd_player_release', - 'ttsd_player_resume', - 'ttsd_player_stop', - 'ttsd_send_error', - 'ttsd_send_result', - 'ttsd_server_add_pcm', - 'ttsd_server_add_queue', - 'ttsd_server_finalize', - 'ttsd_server_get_current_voice', - 'ttsd_server_get_private_data', - 'ttsd_server_get_support_voices', - 'ttsd_server_initialize', - 'ttsd_server_pause', - 'ttsd_server_play', - 'ttsd_server_play_pcm', - 'ttsd_server_set_private_data', - 'ttsd_server_stop', - 'ttsd_server_stop_pcm', - 'ttsd_set_mode', - 'ttsd_set_private_data_requested_cb', - 'ttsd_set_private_data_set_cb', - 'ttsd_set_synth_control', - 'ttsd_terminate', - 'ttsd_terminate_daemon', - 'ttse_get_pitch_range', - 'ttse_get_speed_range', - 'ttse_main', - 'ttse_send_error', - 'ttse_send_result', - 'ttse_set_private_data_requested_cb', - 'ttse_set_private_data_set_cb', - 'ttse_terminate', - 'tts_parser_copy_xml', - 'tts_parser_find_config_changed', - 'tts_parser_free_engine_info', - 'tts_parser_get_engine_info', - 'tts_parser_load_config', - 'tts_parser_print_engine_info', - 'tts_parser_reset', - 'tts_parser_set_auto_voice', - 'tts_parser_set_engine', - 'tts_parser_set_pitch', - 'tts_parser_set_speech_rate', - 'tts_parser_set_voice', - 'tts_parser_unload_config', - 'tts_tag', - ], - 'libvc.so': [ - 'vc_auth_cancel', - 'vc_auth_disable', - 'vc_auth_enable', - 'vc_auth_get_state', - 'vc_auth_set_state_changed_cb', - 'vc_auth_start', - 'vc_auth_stop', - 'vc_auth_unset_state_changed_cb', - 'vc_client_create', - 'vc_client_destroy', - 'vc_client_get_auth_state', - 'vc_client_get_auth_state_changed_cb', - 'vc_client_get_before_auth_state', - 'vc_client_get_before_state', - 'vc_client_get_client_state', - 'vc_client_get_client_state_by_uid', - 'vc_client_get_count', - 'vc_client_get_current_lang_changed_cb', - 'vc_client_get_error', - 'vc_client_get_error_cb', - 'vc_client_get_handle', - 'vc_client_get_invocation_name', - 'vc_client_get_is_foreground', - 'vc_client_get_mgr_pid', - 'vc_client_get_result_cb', - 'vc_client_get_service_state', - 'vc_client_get_service_state_changed_cb', - 'vc_client_get_state_changed_cb', - 'vc_client_get_tts_streaming_cb', - 'vc_client_get_tts_utterance_status_cb', - 'vc_client_get_xid', - 'vc_client_is_valid', - 'vc_client_is_valid_by_uid', - 'vc_client_not_use_callback', - 'vc_client_set_auth_state', - 'vc_client_set_auth_state_changed_cb', - 'vc_client_set_client_state', - 'vc_client_set_current_lang_changed_cb', - 'vc_client_set_error', - 'vc_client_set_error_cb', - 'vc_client_set_invocation_name', - 'vc_client_set_is_foreground', - 'vc_client_set_mgr_pid', - 'vc_client_set_result_cb', - 'vc_client_set_service_state', - 'vc_client_set_service_state_changed_cb', - 'vc_client_set_state_changed_cb', - 'vc_client_set_tts_streaming_cb', - 'vc_client_set_tts_utterance_status_cb', - 'vc_client_set_xid', - 'vc_client_unset_auth_state_changed_cb', - 'vc_client_use_callback', - 'vc_cmd_create', - 'vc_cmd_destroy', - 'vc_cmd_get_appid', - 'vc_cmd_get_command', - 'vc_cmd_get_datetime', - 'vc_cmd_get_domain', - 'vc_cmd_get_fixed_command', - 'vc_cmd_get_format', - 'vc_cmd_get_id', - 'vc_cmd_get_invocation_name', - 'vc_cmd_get_nlu_json', - 'vc_cmd_get_partially_matched_cmd_list', - 'vc_cmd_get_pid', - 'vc_cmd_get_result_key', - 'vc_cmd_get_type', - 'vc_cmd_get_unfixed_command', - 'vc_cmd_list_add', - 'vc_cmd_list_create', - 'vc_cmd_list_destroy', - 'vc_cmd_list_filter_by_type', - 'vc_cmd_list_first', - 'vc_cmd_list_foreach_commands', - 'vc_cmd_list_get_count', - 'vc_cmd_list_get_current', - 'vc_cmd_list_last', - 'vc_cmd_list_next', - 'vc_cmd_list_prev', - 'vc_cmd_list_remove', - 'vc_cmd_list_remove_all', - 'vc_cmd_parser_append_commands', - 'vc_cmd_parser_delete_file', - 'vc_cmd_parser_get_commands', - 'vc_cmd_parser_save_file', - 'vc_cmd_print_list', - 'vc_cmd_set_appid', - 'vc_cmd_set_command', - 'vc_cmd_set_domain', - 'vc_cmd_set_fixed_command', - 'vc_cmd_set_format', - 'vc_cmd_set_id', - 'vc_cmd_set_invocation_name', - 'vc_cmd_set_pid', - 'vc_cmd_set_result_key', - 'vc_cmd_set_type', - 'vc_cmd_set_unfixed_command', - 'vc_config_check_default_engine_is_valid', - 'vc_config_check_default_language_is_valid', - 'vc_config_convert_error_code', - 'vc_config_mgr_finalize', - 'vc_config_mgr_get_auto_language', - 'vc_config_mgr_get_default_language', - 'vc_config_mgr_get_enabled', - 'vc_config_mgr_get_foreground', - 'vc_config_mgr_get_language_list', - 'vc_config_mgr_get_nonfixed_support', - 'vc_config_mgr_initialize', - 'vc_config_mgr_inotify_event_cb', - 'vc_config_mgr_set_auto_language', - 'vc_config_mgr_set_default_language', - 'vc_config_mgr_set_enabled', - 'vc_config_mgr_set_enabled_cb', - 'vc_config_mgr_set_foreground', - 'vc_config_mgr_set_lang_cb', - 'vc_config_mgr_unset_enabled_cb', - 'vc_config_mgr_unset_lang_cb', - 'vc_config_tag', - 'vc_data_add_tts_data', - 'vc_data_clear_tts_data', - 'vc_data_clear_tts_data_by_uttid', - 'vc_data_get_tts_data', - 'vc_data_get_tts_data_size', - 'vc_db_append_commands', - 'vc_db_backup_command', - 'vc_db_begin_transaction', - 'vc_db_commit_transaction', - 'vc_db_create_table', - 'vc_db_delete_commands', - 'vc_db_delete_table', - 'vc_db_finalize', - 'vc_db_get_appid_list', - 'vc_db_get_commands', - 'vc_db_get_result', - 'vc_db_get_result_pid_list', - 'vc_db_initialize', - 'vc_db_insert_command', - 'vc_db_insert_commands_list', - 'vc_db_insert_result', - 'vc_db_restore_command', - 'vc_db_rollback_transaction', - 'vc_db_tag', - 'vc_dbus_cancel_tts', - 'vc_dbus_close_connection', - 'vc_dbus_get_tts_audio_format', - 'vc_dbus_open_connection', - 'vc_dbus_reconnect', - 'vc_dbus_request_auth_cancel', - 'vc_dbus_request_auth_disable', - 'vc_dbus_request_auth_enable', - 'vc_dbus_request_auth_start', - 'vc_dbus_request_auth_stop', - 'vc_dbus_request_dialog', - 'vc_dbus_request_finalize', - 'vc_dbus_request_hello', - 'vc_dbus_request_initialize', - 'vc_dbus_request_is_system_command_valid', - 'vc_dbus_request_set_command', - 'vc_dbus_request_set_exclusive_command', - 'vc_dbus_request_tts', - 'vc_dbus_request_unset_command', - 'vc_dbus_set_foreground', - 'vc_dbus_set_server_dialog', - 'vc_deinitialize', - 'vc_foreach_supported_languages', - 'vc_get_current_language', - 'vc_get_result', - 'vc_get_service_state', - 'vc_get_state', - 'vc_get_system_command_list', - 'vc_info_parser_get_client_info', - 'vc_info_parser_get_demandable_clients', - 'vc_info_parser_get_nlu_result', - 'vc_info_parser_get_result', - 'vc_info_parser_get_result_pid_list', - 'vc_info_parser_set_client_info', - 'vc_info_parser_set_demandable_client', - 'vc_info_parser_set_nlu_result', - 'vc_info_parser_set_result', - 'vc_info_parser_unset_result', - 'vc_info_tag', - 'vc_initialize', - 'vc_is_command_format_supported', - 'vc_json_set_all_commands_from_file', - 'vc_json_set_commands_from_file', - 'vc_json_tag', - 'vc_parser_copy_xml', - 'vc_parser_find_config_changed', - 'vc_parser_free_engine_info', - 'vc_parser_get_engine_info', - 'vc_parser_get_foreground', - 'vc_parser_load_config', - 'vc_parser_print_engine_info', - 'vc_parser_set_auto_lang', - 'vc_parser_set_enabled', - 'vc_parser_set_engine', - 'vc_parser_set_foreground', - 'vc_parser_set_language', - 'vc_parser_unload_config', - 'vc_prepare', - 'vc_prepare_sync', - 'vc_request_dialog', - 'vc_search_char', - 'vc_search_pron', - 'vc_search_text', - 'vc_search_word', - 'vc_set_command_list', - 'vc_set_command_list_from_file', - 'vc_set_current_language_changed_cb', - 'vc_set_error_cb', - 'vc_set_invocation_name', - 'vc_set_result_cb', - 'vc_set_server_dialog', - 'vc_set_service_state_changed_cb', - 'vc_set_state_changed_cb', - 'vc_tts_cancel', - 'vc_tts_get_audio_format', - 'vc_tts_request', - 'vc_tts_set_streaming_cb', - 'vc_tts_set_utterance_status_cb', - 'vc_tts_unset_streaming_cb', - 'vc_tts_unset_utterance_status_cb', - 'vc_unprepare', - 'vc_unset_command_list', - 'vc_unset_current_language_changed_cb', - 'vc_unset_error_cb', - 'vc_unset_result_cb', - 'vc_unset_server_dialog', - 'vc_unset_service_state_changed_cb', - 'vc_unset_state_changed_cb', - ], - 'libvc_engine.so': [ - 'vc_cmd_create', - 'vc_cmd_destroy', - 'vc_cmd_get_appid', - 'vc_cmd_get_command', - 'vc_cmd_get_datetime', - 'vc_cmd_get_domain', - 'vc_cmd_get_fixed_command', - 'vc_cmd_get_format', - 'vc_cmd_get_id', - 'vc_cmd_get_invocation_name', - 'vc_cmd_get_nlu_json', - 'vc_cmd_get_partially_matched_cmd_list', - 'vc_cmd_get_pid', - 'vc_cmd_get_result_key', - 'vc_cmd_get_type', - 'vc_cmd_get_unfixed_command', - 'vc_cmd_list_add', - 'vc_cmd_list_create', - 'vc_cmd_list_destroy', - 'vc_cmd_list_filter_by_type', - 'vc_cmd_list_first', - 'vc_cmd_list_foreach_commands', - 'vc_cmd_list_get_count', - 'vc_cmd_list_get_current', - 'vc_cmd_list_last', - 'vc_cmd_list_next', - 'vc_cmd_list_prev', - 'vc_cmd_list_remove', - 'vc_cmd_list_remove_all', - 'vc_cmd_parser_append_commands', - 'vc_cmd_parser_delete_file', - 'vc_cmd_parser_get_commands', - 'vc_cmd_parser_save_file', - 'vc_cmd_print_list', - 'vc_cmd_set_appid', - 'vc_cmd_set_command', - 'vc_cmd_set_domain', - 'vc_cmd_set_fixed_command', - 'vc_cmd_set_format', - 'vc_cmd_set_id', - 'vc_cmd_set_invocation_name', - 'vc_cmd_set_pid', - 'vc_cmd_set_result_key', - 'vc_cmd_set_type', - 'vc_cmd_set_unfixed_command', - 'vc_config_check_default_engine_is_valid', - 'vc_config_check_default_language_is_valid', - 'vc_config_convert_error_code', - 'vc_config_mgr_finalize', - 'vc_config_mgr_get_auto_language', - 'vc_config_mgr_get_default_language', - 'vc_config_mgr_get_enabled', - 'vc_config_mgr_get_foreground', - 'vc_config_mgr_get_language_list', - 'vc_config_mgr_get_nonfixed_support', - 'vc_config_mgr_initialize', - 'vc_config_mgr_inotify_event_cb', - 'vc_config_mgr_set_auto_language', - 'vc_config_mgr_set_default_language', - 'vc_config_mgr_set_enabled', - 'vc_config_mgr_set_enabled_cb', - 'vc_config_mgr_set_foreground', - 'vc_config_mgr_set_lang_cb', - 'vc_config_mgr_unset_enabled_cb', - 'vc_config_mgr_unset_lang_cb', - 'vc_config_tag', - 'vc_db_append_commands', - 'vc_db_backup_command', - 'vc_db_begin_transaction', - 'vc_db_commit_transaction', - 'vc_db_create_table', - 'vc_db_delete_commands', - 'vc_db_delete_table', - 'vc_db_finalize', - 'vc_db_get_appid_list', - 'vc_db_get_commands', - 'vc_db_get_result', - 'vc_db_get_result_pid_list', - 'vc_db_initialize', - 'vc_db_insert_command', - 'vc_db_insert_commands_list', - 'vc_db_insert_result', - 'vc_db_restore_command', - 'vc_db_rollback_transaction', - 'vc_db_tag', - 'vcd_check_dbus_connection', - 'vcd_cleanup_client_all', - 'vcd_client_add', - 'vcd_client_append_cmd_from_type', - 'vcd_client_command_collect_command', - 'vcd_client_delete', - 'vcd_client_foreach_command', - 'vcd_client_get_cmd_from_result_id', - 'vcd_client_get_length', - 'vcd_client_get_list', - 'vcd_client_get_recognition_mode', - 'vcd_client_get_ref_count', - 'vcd_client_get_server_dialog', - 'vcd_client_get_slience_detection', - 'vcd_client_is_available', - 'vcd_client_manager_check_demandable_client', - 'vcd_client_manager_get_appid', - 'vcd_client_manager_get_exclusive', - 'vcd_client_manager_get_pid', - 'vcd_client_manager_get_result_text', - 'vcd_client_manager_is_system_command_valid', - 'vcd_client_manager_is_valid', - 'vcd_client_manager_set', - 'vcd_client_manager_set_command', - 'vcd_client_manager_set_demandable_client', - 'vcd_client_manager_set_exclusive', - 'vcd_client_manager_set_result_text', - 'vcd_client_manager_unset', - 'vcd_client_manager_unset_appid', - 'vcd_client_manager_unset_command', - 'vcd_client_save_client_info', - 'vcd_client_set_command_type', - 'vcd_client_set_exclusive_command', - 'vcd_client_set_recognition_mode', - 'vcd_client_set_server_dialog', - 'vcd_client_set_slience_detection', - 'vcd_client_unset_command_type', - 'vcd_client_unset_exclusive_command', - 'vcd_client_update_foreground_pid', - 'vcd_client_widget_add', - 'vcd_client_widget_delete', - 'vcd_client_widget_get_asr_result_enabled', - 'vcd_client_widget_get_foreground_pid', - 'vcd_client_widget_get_list', - 'vcd_client_widget_get_waiting_for_recording', - 'vcd_client_widget_is_available', - 'vcd_client_widget_set_asr_result_enabled', - 'vcd_client_widget_set_command', - 'vcd_client_widget_set_waiting_for_recording', - 'vcd_client_widget_unset_command', - 'vcd_config_disable_command_type', - 'vcd_config_enable_command_type', - 'vcd_config_finalize', - 'vcd_config_get_audio_streaming_mode', - 'vcd_config_get_command_type_enabled', - 'vcd_config_get_default_language', - 'vcd_config_get_foreground', - 'vcd_config_get_service_state', - 'vcd_config_initialize', - 'vcd_config_set_audio_streaming_mode', - 'vcd_config_set_default_language', - 'vcd_config_set_foreground', - 'vcd_config_set_service_state', - 'vcdc_send_asr_result', - 'vcdc_send_dialog', - 'vcdc_send_error_signal', - 'vcdc_send_error_signal_to_manager', - 'vcdc_send_feedback_audio_format_to_manager', - 'vcdc_send_feedback_streaming', - 'vcdc_send_feedback_streaming_to_manager', - 'vcdc_send_hello', - 'vcdc_send_manager_pid', - 'vcdc_send_pre_result_to_manager', - 'vcdc_send_request_get_private_data', - 'vcdc_send_request_set_private_data', - 'vcdc_send_result', - 'vcdc_send_result_to_manager', - 'vcdc_send_service_state', - 'vcdc_send_set_volume', - 'vcdc_send_show_tooltip', - 'vcdc_send_specific_engine_result_to_manager', - 'vcdc_send_speech_detected', - 'vcd_data_add_tts_text_data', - 'vcd_data_clear_tts_text_data', - 'vcd_data_get_first_tts_text_data', - 'vcd_data_get_tts_text_data', - 'vcd_data_get_tts_text_data_size', - 'vcd_dbus_close_connection', - 'vcd_dbus_open_connection', - 'vcd_dbus_reconnect', - 'vcd_dbus_server_cancel_tts', - 'vcd_dbus_server_dialog', - 'vcd_dbus_server_finalize', - 'vcd_dbus_server_get_tts_audio_format', - 'vcd_dbus_server_hello', - 'vcd_dbus_server_initialize', - 'vcd_dbus_server_is_system_command_valid', - 'vcd_dbus_server_mgr_cancel', - 'vcd_dbus_server_mgr_change_system_volume', - 'vcd_dbus_server_mgr_disable_command_type', - 'vcd_dbus_server_mgr_do_action', - 'vcd_dbus_server_mgr_enable_command_type', - 'vcd_dbus_server_mgr_finalize', - 'vcd_dbus_server_mgr_get_audio_type', - 'vcd_dbus_server_mgr_get_private_data', - 'vcd_dbus_server_mgr_initialize', - 'vcd_dbus_server_mgr_result_selection', - 'vcd_dbus_server_mgr_send_audio_streaming', - 'vcd_dbus_server_mgr_send_specific_engine_request', - 'vcd_dbus_server_mgr_set_audio_type', - 'vcd_dbus_server_mgr_set_client_info', - 'vcd_dbus_server_mgr_set_command', - 'vcd_dbus_server_mgr_set_demandable_client', - 'vcd_dbus_server_mgr_set_domain', - 'vcd_dbus_server_mgr_set_private_data', - 'vcd_dbus_server_mgr_start', - 'vcd_dbus_server_mgr_start_feedback', - 'vcd_dbus_server_mgr_stop', - 'vcd_dbus_server_mgr_stop_feedback', - 'vcd_dbus_server_mgr_unset_command', - 'vcd_dbus_server_request_tts', - 'vcd_dbus_server_set_command', - 'vcd_dbus_server_set_foreground', - 'vcd_dbus_server_set_language', - 'vcd_dbus_server_set_server_dialog', - 'vcd_dbus_server_unset_command', - 'vcd_dbus_server_widget_cancel', - 'vcd_dbus_server_widget_enable_asr_result', - 'vcd_dbus_server_widget_finalize', - 'vcd_dbus_server_widget_initialize', - 'vcd_dbus_server_widget_start', - 'vcd_dbus_server_widget_start_recording', - 'vcd_dbus_server_widget_stop', - 'vcd_engine_agent_get_audio_type', - 'vcd_engine_agent_get_command_count', - 'vcd_engine_agent_get_foreach_command', - 'vcd_engine_agent_get_private_data', - 'vcd_engine_agent_init', - 'vcd_engine_agent_load_current_engine', - 'vcd_engine_agent_release', - 'vcd_engine_agent_set_cancel_tts_cb', - 'vcd_engine_agent_set_get_tts_audio_format_cb', - 'vcd_engine_agent_set_nlu_base_info_requested_cb', - 'vcd_engine_agent_set_private_data', - 'vcd_engine_agent_set_private_data_requested_cb', - 'vcd_engine_agent_set_private_data_set_cb', - 'vcd_engine_agent_set_request_tts_cb', - 'vcd_engine_agent_set_specific_engine_request_cb', - 'vcd_engine_agent_start_recording', - 'vcd_engine_agent_stop_recording', - 'vcd_engine_agent_unload_current_engine', - 'vcd_engine_cancel_tts', - 'vcd_engine_get_audio_format', - 'vcd_engine_get_current_language', - 'vcd_engine_get_nlu_base_info', - 'vcd_engine_get_private_data', - 'vcd_engine_get_tts_audio_format', - 'vcd_engine_is_available_engine', - 'vcd_engine_process_haptic_event', - 'vcd_engine_process_list_event', - 'vcd_engine_process_text', - 'vcd_engine_recognize_audio', - 'vcd_engine_recognize_cancel', - 'vcd_engine_recognize_start', - 'vcd_engine_recognize_stop', - 'vcd_engine_request_tts', - 'vcd_engine_send_specific_engine_request', - 'vcd_engine_set_audio_type', - 'vcd_engine_set_commands', - 'vcd_engine_set_current_language', - 'vcd_engine_set_domain', - 'vcd_engine_set_private_data', - 'vcd_engine_set_server_dialog', - 'vcd_engine_supported_langs', - 'vcd_finalize', - 'vcd_get_audio_type', - 'vcd_get_command_count', - 'vcd_get_foreach_command', - 'vcd_get_private_data', - 'vcd_initialize', - 'vcd_recorder_change_system_volume', - 'vcd_recorder_create', - 'vcd_recorder_destroy', - 'vcd_recorder_get', - 'vcd_recorder_get_state', - 'vcd_recorder_recover_system_volume', - 'vcd_recorder_send_streaming', - 'vcd_recorder_set', - 'vcd_recorder_start', - 'vcd_recorder_start_streaming', - 'vcd_recorder_stop', - 'vcd_recorder_stop_streaming', - 'vcd_send_asr_result', - 'vcd_send_error', - 'vcd_send_feedback_audio_format', - 'vcd_send_feedback_streaming', - 'vcd_send_nlg_result', - 'vcd_send_result', - 'vcd_send_specific_engine_result', - 'vcd_send_update_status', - 'vcd_server_cancel_tts', - 'vcd_server_dialog', - 'vcd_server_finalize', - 'vcd_server_get_foreground', - 'vcd_server_get_service_state', - 'vcd_server_get_tts_audio_format', - 'vcd_server_initialize', - 'vcd_server_is_system_command_valid', - 'vcd_server_mgr_cancel', - 'vcd_server_mgr_change_system_volume', - 'vcd_server_mgr_disable_command_type', - 'vcd_server_mgr_do_action', - 'vcd_server_mgr_enable_command_type', - 'vcd_server_mgr_finalize', - 'vcd_server_mgr_get_audio_type', - 'vcd_server_mgr_get_private_data', - 'vcd_server_mgr_initialize', - 'vcd_server_mgr_result_select', - 'vcd_server_mgr_send_audio_streaming', - 'vcd_server_mgr_send_specific_engine_request', - 'vcd_server_mgr_set_audio_type', - 'vcd_server_mgr_set_client_info', - 'vcd_server_mgr_set_command', - 'vcd_server_mgr_set_demandable_client', - 'vcd_server_mgr_set_domain', - 'vcd_server_mgr_set_private_data', - 'vcd_server_mgr_start', - 'vcd_server_mgr_start_feedback', - 'vcd_server_mgr_stop', - 'vcd_server_mgr_stop_feedback', - 'vcd_server_mgr_unset_command', - 'vcd_server_request_tts', - 'vcd_server_set_command', - 'vcd_server_set_foreground', - 'vcd_server_set_language', - 'vcd_server_set_server_dialog', - 'vcd_server_unset_command', - 'vcd_server_widget_cancel', - 'vcd_server_widget_enable_asr_result', - 'vcd_server_widget_finalize', - 'vcd_server_widget_initialize', - 'vcd_server_widget_start', - 'vcd_server_widget_start_recording', - 'vcd_server_widget_stop', - 'vcd_set_cancel_tts_cb', - 'vcd_set_nlu_base_info_requested_cb', - 'vcd_set_private_data', - 'vcd_set_private_data_requested_cb', - 'vcd_set_private_data_set_cb', - 'vcd_set_request_tts_cb', - 'vcd_set_specific_engine_request_cb', - 'vcd_set_tts_audio_format_request_cb', - 'vcd_start_recording', - 'vcd_stop_recording', - 'vce_get_audio_type', - 'vce_get_command_count', - 'vce_get_foreach_command', - 'vce_get_private_data', - 'vce_main', - 'vce_send_asr_result', - 'vce_send_error', - 'vce_send_feedback_audio_format', - 'vce_send_feedback_streaming', - 'vce_send_nlg_result', - 'vce_send_result', - 'vce_send_specific_engine_result', - 'vce_send_update_status', - 'vce_set_cancel_tts_cb', - 'vce_set_nlu_base_info_requested_cb', - 'vce_set_private_data', - 'vce_set_private_data_requested_cb', - 'vce_set_private_data_set_cb', - 'vce_set_request_tts_cb', - 'vce_set_specific_engine_request_cb', - 'vce_set_tts_audio_format_request_cb', - 'vce_start_recording', - 'vce_stop_recording', - 'vce_unset_cancel_tts_cb', - 'vce_unset_get_tts_audio_format_cb', - 'vce_unset_request_tts_cb', - 'vce_unset_specific_engine_request_cb', - 'vc_info_parser_get_client_info', - 'vc_info_parser_get_demandable_clients', - 'vc_info_parser_get_nlu_result', - 'vc_info_parser_get_result', - 'vc_info_parser_get_result_pid_list', - 'vc_info_parser_set_client_info', - 'vc_info_parser_set_demandable_client', - 'vc_info_parser_set_nlu_result', - 'vc_info_parser_set_result', - 'vc_info_parser_unset_result', - 'vc_info_tag', - 'vc_json_set_all_commands_from_file', - 'vc_json_set_commands_from_file', - 'vc_json_tag', - 'vc_parser_copy_xml', - 'vc_parser_find_config_changed', - 'vc_parser_free_engine_info', - 'vc_parser_get_engine_info', - 'vc_parser_get_foreground', - 'vc_parser_load_config', - 'vc_parser_print_engine_info', - 'vc_parser_set_auto_lang', - 'vc_parser_set_enabled', - 'vc_parser_set_engine', - 'vc_parser_set_foreground', - 'vc_parser_set_language', - 'vc_parser_unload_config', - 'vc_search_char', - 'vc_search_pron', - 'vc_search_text', - 'vc_search_word', - ], -}; diff --git a/packages/tizen_interop_callbacks/CHANGELOG.md b/packages/tizen_interop_callbacks/CHANGELOG.md index 6f88198..537c207 100644 --- a/packages/tizen_interop_callbacks/CHANGELOG.md +++ b/packages/tizen_interop_callbacks/CHANGELOG.md @@ -1,3 +1,7 @@ +## NEXT + +* Remove Tizen 4.0/5.0 callbacks. + ## 0.1.1 * Align Dart and Flutter SDK constraints. diff --git a/packages/tizen_interop_callbacks/README.md b/packages/tizen_interop_callbacks/README.md index 753d2dc..12de2fa 100644 --- a/packages/tizen_interop_callbacks/README.md +++ b/packages/tizen_interop_callbacks/README.md @@ -14,15 +14,15 @@ Similarly to `tizen_interop`, this package has no build time dependency on a spe ```yaml dependencies: ffi: ^2.0.1 - tizen_interop: ^0.2.7 - tizen_interop_callbacks: ^0.1.1 + tizen_interop: ^0.3.0 + tizen_interop_callbacks: ^0.2.0 ``` 2. In your Dart code, import the packages: ```dart import 'dart:ffi'; - import 'package:tizen_interop/4.0/tizen.dart'; + import 'package:tizen_interop/5.5/tizen.dart'; import 'package:tizen_interop_callbacks/tizen_interop_callbacks.dart'; ``` diff --git a/packages/tizen_interop_callbacks/example/README.md b/packages/tizen_interop_callbacks/example/README.md index f6bb47b..e199476 100644 --- a/packages/tizen_interop_callbacks/example/README.md +++ b/packages/tizen_interop_callbacks/example/README.md @@ -11,7 +11,7 @@ This application consists of 2 tabs showing: Here, a typical scenario is shown. We need to receive callbacks, but the Tizen Native API invokes the callback from another thread. Trying to pass a function pointer obtained by [`Pointer.fromFunction()`](https://api.flutter.dev/flutter/dart-ffi/Pointer/fromFunction.html) -to [`device_add_callback()`](https://docs.tizen.org/application/native/api/mobile/4.0/group__CAPI__SYSTEM__DEVICE__CALLBACK__MODULE.html#ga89a756a9c46fb670f603d79b66af6cf0) +to [`device_add_callback()`](https://docs.tizen.org/application/native/api/mobile/5.5/group__CAPI__SYSTEM__DEVICE__CALLBACK__MODULE.html#ga89a756a9c46fb670f603d79b66af6cf0) will cause an error when the callback is called. Therefore, `TizenInteropCallbacks` is used to obtain a native proxy callback that can be run in any thread. @@ -23,7 +23,7 @@ changes to the battery level and status. Here, a workaround for a locking issue is presented. Usually, a foreach API function would call the callback synchronously. Thus, `TizenInteropCallbacks` would not be needed at all. -However, [`camera_foreach_supported_preview_resolution()`](https://docs.tizen.org/application/native/api/mobile/4.0/group__CAPI__MEDIA__CAMERA__CAPABILITY__MODULE.html#gaccca0251a0432ca8752be09b400b9b3b) +However, [`camera_foreach_supported_preview_resolution()`](https://docs.tizen.org/application/native/api/mobile/5.5/group__CAPI__MEDIA__CAMERA__CAPABILITY__MODULE.html#gaccca0251a0432ca8752be09b400b9b3b) locks the calling thread and invokes the given callback in another thread. Therefore, we need to use `TizenInteropCallbacks` and call the API in a different isolate. This isolate will be blocked while our root isolate is processing the callbacks. diff --git a/packages/tizen_interop_callbacks/example/lib/battery.dart b/packages/tizen_interop_callbacks/example/lib/battery.dart index 2e466b5..d105c6f 100644 --- a/packages/tizen_interop_callbacks/example/lib/battery.dart +++ b/packages/tizen_interop_callbacks/example/lib/battery.dart @@ -8,7 +8,7 @@ import 'dart:ffi'; import 'package:ffi/ffi.dart'; import 'package:flutter/material.dart'; -import 'package:tizen_interop/4.0/tizen.dart'; +import 'package:tizen_interop/5.5/tizen.dart'; import 'package:tizen_interop_callbacks/tizen_interop_callbacks.dart'; class BatteryTab extends StatefulWidget { diff --git a/packages/tizen_interop_callbacks/example/lib/preview_resolutions.dart b/packages/tizen_interop_callbacks/example/lib/preview_resolutions.dart index 7d58b3e..fecc36d 100644 --- a/packages/tizen_interop_callbacks/example/lib/preview_resolutions.dart +++ b/packages/tizen_interop_callbacks/example/lib/preview_resolutions.dart @@ -9,7 +9,7 @@ import 'dart:isolate'; import 'package:ffi/ffi.dart'; import 'package:flutter/material.dart'; -import 'package:tizen_interop/4.0/tizen.dart'; +import 'package:tizen_interop/5.5/tizen.dart'; import 'package:tizen_interop_callbacks/tizen_interop_callbacks.dart'; class PreviewResolutionsTab extends StatefulWidget { diff --git a/packages/tizen_interop_callbacks/pubspec.yaml b/packages/tizen_interop_callbacks/pubspec.yaml index 4835c44..46b48b5 100644 --- a/packages/tizen_interop_callbacks/pubspec.yaml +++ b/packages/tizen_interop_callbacks/pubspec.yaml @@ -2,7 +2,7 @@ name: tizen_interop_callbacks description: Cross-thread callbacks for Tizen native APIs. homepage: https://github.com/flutter-tizen/tizen_interop repository: https://github.com/flutter-tizen/tizen_interop/tree/main/packages/tizen_interop_callbacks -version: 0.1.1 +version: 0.2.0 environment: sdk: ">=3.1.0 <4.0.0" diff --git a/packages/tizen_interop_callbacks/tizen/src/generated_callbacks.cc b/packages/tizen_interop_callbacks/tizen/src/generated_callbacks.cc index e5db4c2..26dfc65 100644 --- a/packages/tizen_interop_callbacks/tizen/src/generated_callbacks.cc +++ b/packages/tizen_interop_callbacks/tizen/src/generated_callbacks.cc @@ -8,7 +8,7 @@ #include "types.h" static_assert(kProxyInstanceCount == 5, "Callbacks instances count mismatch"); -static constexpr int32_t kNoUserDataCallbackCount = 54; +static constexpr int32_t kNoUserDataCallbackCount = 53; uint32_t reserved_callback_ids[kProxyInstanceCount * kNoUserDataCallbackCount] = {}; @@ -212,12 +212,6 @@ PROXY_GROUP_NON_BLOCKING(audio_in_stream_cb, void* handle, size_t nbytes, void* PROXY_GROUP_BLOCKING(audio_in_stream_cb, void* handle, size_t nbytes, void* user_data) #undef CB_PARAMS_NAMES -typedef void (*audio_io_interrupted_cb)(some_enum code, void* user_data); -#define CB_PARAMS_NAMES code, user_data -PROXY_GROUP_NON_BLOCKING(audio_io_interrupted_cb, some_enum code, void* user_data) -PROXY_GROUP_BLOCKING(audio_io_interrupted_cb, some_enum code, void* user_data) -#undef CB_PARAMS_NAMES - typedef void (*audio_out_state_changed_cb)(void* handle, some_enum previous, some_enum current, bool by_policy, void* user_data); #define CB_PARAMS_NAMES handle, previous, current, by_policy, user_data PROXY_GROUP_NON_BLOCKING(audio_out_state_changed_cb, void* handle, some_enum previous, some_enum current, bool by_policy, void* user_data) @@ -343,12 +337,6 @@ PROXY_GROUP_NON_BLOCKING(bt_adapter_le_advertising_state_changed_cb, int result, PROXY_GROUP_BLOCKING(bt_adapter_le_advertising_state_changed_cb, int result, void* advertiser, some_enum adv_state, void* user_data) #undef CB_PARAMS_NAMES -typedef void (*bt_adapter_le_device_discovery_state_changed_cb)(int result, some_enum discovery_state, void* discovery_info, void* user_data); -#define CB_PARAMS_NAMES result, discovery_state, discovery_info, user_data -PROXY_GROUP_NON_BLOCKING(bt_adapter_le_device_discovery_state_changed_cb, int result, some_enum discovery_state, void* discovery_info, void* user_data) -PROXY_GROUP_BLOCKING(bt_adapter_le_device_discovery_state_changed_cb, int result, some_enum discovery_state, void* discovery_info, void* user_data) -#undef CB_PARAMS_NAMES - typedef void (*bt_adapter_le_new_scan_result_cb)(int result, void* handle, void* user_data); #define CB_PARAMS_NAMES result, handle, user_data PROXY_GROUP_NON_BLOCKING(bt_adapter_le_new_scan_result_cb, int result, void* handle, void* user_data) @@ -480,35 +468,6 @@ PROXY_GROUP_NON_BLOCKING(bt_device_service_searched_cb, int result, void* sdp_in PROXY_GROUP_BLOCKING(bt_device_service_searched_cb, int result, void* sdp_info, void* user_data) #undef CB_PARAMS_NAMES -typedef void (*bt_gatt_characteristic_changed_cb)(void* characteristic, unsigned char* value, int value_length, void* user_data); -#define CB_PARAMS_NAMES characteristic, value, value_length, user_data -PROXY_GROUP_NON_BLOCKING(bt_gatt_characteristic_changed_cb, void* characteristic, unsigned char* value, int value_length, void* user_data) -PROXY_GROUP_BLOCKING(bt_gatt_characteristic_changed_cb, void* characteristic, unsigned char* value, int value_length, void* user_data) -#undef CB_PARAMS_NAMES - -typedef void (*bt_gatt_characteristic_descriptor_discovered_cb)(int result, unsigned char characteristic_format, int total, void* characteristic_descriptor, void* user_data); -#define CB_PARAMS_NAMES result, characteristic_format, total, characteristic_descriptor, user_data -PROXY_GROUP_NON_BLOCKING(bt_gatt_characteristic_descriptor_discovered_cb, int result, unsigned char characteristic_format, int total, void* characteristic_descriptor, void* user_data) -PROXY_GROUP_BLOCKING(bt_gatt_characteristic_descriptor_discovered_cb, int result, unsigned char characteristic_format, int total, void* characteristic_descriptor, void* user_data) -#undef CB_PARAMS_NAMES - -typedef void (*bt_gatt_characteristic_read_cb)(unsigned char* value, int value_length, void* user_data); -#define CB_PARAMS_NAMES value, value_length, user_data -PROXY_GROUP_NON_BLOCKING(bt_gatt_characteristic_read_cb, unsigned char* value, int value_length, void* user_data) -PROXY_GROUP_BLOCKING(bt_gatt_characteristic_read_cb, unsigned char* value, int value_length, void* user_data) -#undef CB_PARAMS_NAMES - -typedef void (*bt_gatt_characteristic_write_cb)(void* user_data); -#define CB_PARAMS_NAMES user_data -PROXY_GROUP_NON_BLOCKING(bt_gatt_characteristic_write_cb, void* user_data) -PROXY_GROUP_BLOCKING(bt_gatt_characteristic_write_cb, void* user_data) -#undef CB_PARAMS_NAMES - -typedef bool (*bt_gatt_characteristics_discovered_cb)(int result, int index, int total, void* characteristic, void* user_data); -#define CB_PARAMS_NAMES result, index, total, characteristic, user_data -PROXY_GROUP_RETURN(bt_gatt_characteristics_discovered_cb, bool, int result, int index, int total, void* characteristic, void* user_data) -#undef CB_PARAMS_NAMES - typedef void (*bt_gatt_client_att_mtu_changed_cb)(void* client, const void* mtu_info, void* user_data); #define CB_PARAMS_NAMES client, mtu_info, user_data PROXY_GROUP_NON_BLOCKING(bt_gatt_client_att_mtu_changed_cb, void* client, const void* mtu_info, void* user_data) @@ -544,16 +503,6 @@ typedef bool (*bt_gatt_foreach_cb)(int total, int index, void* gatt_handle, void PROXY_GROUP_RETURN(bt_gatt_foreach_cb, bool, int total, int index, void* gatt_handle, void* user_data) #undef CB_PARAMS_NAMES -typedef bool (*bt_gatt_included_service_cb)(void* service, void* user_data); -#define CB_PARAMS_NAMES service, user_data -PROXY_GROUP_RETURN(bt_gatt_included_service_cb, bool, void* service, void* user_data) -#undef CB_PARAMS_NAMES - -typedef bool (*bt_gatt_primary_service_cb)(void* service, void* user_data); -#define CB_PARAMS_NAMES service, user_data -PROXY_GROUP_RETURN(bt_gatt_primary_service_cb, bool, void* service, void* user_data) -#undef CB_PARAMS_NAMES - typedef void (*bt_gatt_server_characteristic_notification_state_changed_cb)(bool notify, void* server, void* gatt_handle, void* user_data); #define CB_PARAMS_NAMES notify, server, gatt_handle, user_data PROXY_GROUP_NON_BLOCKING(bt_gatt_server_characteristic_notification_state_changed_cb, bool notify, void* server, void* gatt_handle, void* user_data) @@ -2124,12 +2073,6 @@ PROXY_GROUP_NON_BLOCKING(mc_cmd_reply_received_cb, const char* server_name, cons PROXY_GROUP_BLOCKING(mc_cmd_reply_received_cb, const char* server_name, const char* request_id, int result_code, void* data, void* user_data) #undef CB_PARAMS_NAMES -typedef void (*mc_command_reply_received_cb)(const char* server_name, int result_code, void* data, void* user_data); -#define CB_PARAMS_NAMES server_name, result_code, data, user_data -PROXY_GROUP_NON_BLOCKING(mc_command_reply_received_cb, const char* server_name, int result_code, void* data, void* user_data) -PROXY_GROUP_BLOCKING(mc_command_reply_received_cb, const char* server_name, int result_code, void* data, void* user_data) -#undef CB_PARAMS_NAMES - typedef void (*mc_display_mode_updated_cb)(const char* server_name, some_enum mode, void* user_data); #define CB_PARAMS_NAMES server_name, mode, user_data PROXY_GROUP_NON_BLOCKING(mc_display_mode_updated_cb, const char* server_name, some_enum mode, void* user_data) @@ -2182,12 +2125,6 @@ PROXY_GROUP_NON_BLOCKING(mc_repeat_ability_updated_cb, const char* server_name, PROXY_GROUP_BLOCKING(mc_repeat_ability_updated_cb, const char* server_name, some_enum support, void* user_data) #undef CB_PARAMS_NAMES -typedef void (*mc_repeat_mode_changed_cb)(const char* server_name, some_enum mode, void* user_data); -#define CB_PARAMS_NAMES server_name, mode, user_data -PROXY_GROUP_NON_BLOCKING(mc_repeat_mode_changed_cb, const char* server_name, some_enum mode, void* user_data) -PROXY_GROUP_BLOCKING(mc_repeat_mode_changed_cb, const char* server_name, some_enum mode, void* user_data) -#undef CB_PARAMS_NAMES - typedef void (*mc_repeat_mode_updated_cb)(const char* server_name, some_enum mode, void* user_data); #define CB_PARAMS_NAMES server_name, mode, user_data PROXY_GROUP_NON_BLOCKING(mc_repeat_mode_updated_cb, const char* server_name, some_enum mode, void* user_data) @@ -2205,12 +2142,6 @@ PROXY_GROUP_NON_BLOCKING(mc_server_custom_cmd_received_cb, const char* client_na PROXY_GROUP_BLOCKING(mc_server_custom_cmd_received_cb, const char* client_name, const char* request_id, const char* command, void* data, void* user_data) #undef CB_PARAMS_NAMES -typedef void (*mc_server_custom_command_received_cb)(const char* client_name, const char* command, void* data, void* user_data); -#define CB_PARAMS_NAMES client_name, command, data, user_data -PROXY_GROUP_NON_BLOCKING(mc_server_custom_command_received_cb, const char* client_name, const char* command, void* data, void* user_data) -PROXY_GROUP_BLOCKING(mc_server_custom_command_received_cb, const char* client_name, const char* command, void* data, void* user_data) -#undef CB_PARAMS_NAMES - typedef void (*mc_server_display_mode_cmd_received_cb)(const char* client_name, const char* request_id, some_enum mode, void* user_data); #define CB_PARAMS_NAMES client_name, request_id, mode, user_data PROXY_GROUP_NON_BLOCKING(mc_server_display_mode_cmd_received_cb, const char* client_name, const char* request_id, some_enum mode, void* user_data) @@ -2247,12 +2178,6 @@ PROXY_GROUP_NON_BLOCKING(mc_server_playback_position_cmd_received_cb, const char PROXY_GROUP_BLOCKING(mc_server_playback_position_cmd_received_cb, const char* client_name, const char* request_id, unsigned long long position, void* user_data) #undef CB_PARAMS_NAMES -typedef void (*mc_server_playback_state_command_received_cb)(const char* client_name, some_enum state, void* user_data); -#define CB_PARAMS_NAMES client_name, state, user_data -PROXY_GROUP_NON_BLOCKING(mc_server_playback_state_command_received_cb, const char* client_name, some_enum state, void* user_data) -PROXY_GROUP_BLOCKING(mc_server_playback_state_command_received_cb, const char* client_name, some_enum state, void* user_data) -#undef CB_PARAMS_NAMES - typedef void (*mc_server_playlist_cmd_received_cb)(const char* client_name, const char* request_id, const char* playlist_name, const char* index, some_enum action, unsigned long long position, void* user_data); #define CB_PARAMS_NAMES client_name, request_id, playlist_name, index, action, position, user_data PROXY_GROUP_NON_BLOCKING(mc_server_playlist_cmd_received_cb, const char* client_name, const char* request_id, const char* playlist_name, const char* index, some_enum action, unsigned long long position, void* user_data) @@ -2289,12 +2214,6 @@ PROXY_GROUP_NON_BLOCKING(mc_shuffle_ability_updated_cb, const char* server_name, PROXY_GROUP_BLOCKING(mc_shuffle_ability_updated_cb, const char* server_name, some_enum support, void* user_data) #undef CB_PARAMS_NAMES -typedef void (*mc_shuffle_mode_changed_cb)(const char* server_name, some_enum mode, void* user_data); -#define CB_PARAMS_NAMES server_name, mode, user_data -PROXY_GROUP_NON_BLOCKING(mc_shuffle_mode_changed_cb, const char* server_name, some_enum mode, void* user_data) -PROXY_GROUP_BLOCKING(mc_shuffle_mode_changed_cb, const char* server_name, some_enum mode, void* user_data) -#undef CB_PARAMS_NAMES - typedef void (*mc_shuffle_mode_updated_cb)(const char* server_name, some_enum mode, void* user_data); #define CB_PARAMS_NAMES server_name, mode, user_data PROXY_GROUP_NON_BLOCKING(mc_shuffle_mode_updated_cb, const char* server_name, some_enum mode, void* user_data) @@ -2348,12 +2267,6 @@ typedef bool (*media_info_cb)(void* media, void* user_data); PROXY_GROUP_RETURN(media_info_cb, bool, void* media, void* user_data) #undef CB_PARAMS_NAMES -typedef void (*media_insert_burst_shot_completed_cb)(some_enum error, void* user_data); -#define CB_PARAMS_NAMES error, user_data -PROXY_GROUP_NON_BLOCKING(media_insert_burst_shot_completed_cb, some_enum error, void* user_data) -PROXY_GROUP_BLOCKING(media_insert_burst_shot_completed_cb, some_enum error, void* user_data) -#undef CB_PARAMS_NAMES - typedef void (*media_insert_completed_cb)(some_enum error, void* user_data); #define CB_PARAMS_NAMES error, user_data PROXY_GROUP_NON_BLOCKING(media_insert_completed_cb, some_enum error, void* user_data) @@ -2565,29 +2478,6 @@ PROXY_GROUP_NON_BLOCKING(message_port_trusted_message_cb, int trusted_local_port PROXY_GROUP_BLOCKING(message_port_trusted_message_cb, int trusted_local_port_id, const char* remote_app_id, const char* remote_port, bool trusted_remote_port, void* message, void* user_data) #undef CB_PARAMS_NAMES -typedef void (*messages_incoming_cb)(void* incoming_msg, void* user_data); -#define CB_PARAMS_NAMES incoming_msg, user_data -PROXY_GROUP_NON_BLOCKING(messages_incoming_cb, void* incoming_msg, void* user_data) -PROXY_GROUP_BLOCKING(messages_incoming_cb, void* incoming_msg, void* user_data) -#undef CB_PARAMS_NAMES - -typedef void (*messages_push_incoming_cb)(const char* header, const char* body, int body_length, void* user_data); -#define CB_PARAMS_NAMES header, body, body_length, user_data -PROXY_GROUP_NON_BLOCKING(messages_push_incoming_cb, const char* header, const char* body, int body_length, void* user_data) -PROXY_GROUP_BLOCKING(messages_push_incoming_cb, const char* header, const char* body, int body_length, void* user_data) -#undef CB_PARAMS_NAMES - -typedef bool (*messages_search_cb)(void* msg, int index, int result_count, int total_count, void* user_data); -#define CB_PARAMS_NAMES msg, index, result_count, total_count, user_data -PROXY_GROUP_RETURN(messages_search_cb, bool, void* msg, int index, int result_count, int total_count, void* user_data) -#undef CB_PARAMS_NAMES - -typedef void (*messages_sent_cb)(some_enum result, void* user_data); -#define CB_PARAMS_NAMES result, user_data -PROXY_GROUP_NON_BLOCKING(messages_sent_cb, some_enum result, void* user_data) -PROXY_GROUP_BLOCKING(messages_sent_cb, some_enum result, void* user_data) -#undef CB_PARAMS_NAMES - typedef int (*ml_custom_easy_invoke_cb)(const void* in, void* out, void* user_data); #define CB_PARAMS_NAMES in, out, user_data PROXY_GROUP_RETURN(ml_custom_easy_invoke_cb, int, const void* in, void* out, void* user_data) @@ -2622,12 +2512,6 @@ typedef int (*ml_train_datagen_cb)(float** input, float** label, bool* last, voi PROXY_GROUP_RETURN(ml_train_datagen_cb, int, float** input, float** label, bool* last, void* user_data) #undef CB_PARAMS_NAMES -typedef void (*mtp_event_cb)(some_enum event, int event_parameter, void* user_data); -#define CB_PARAMS_NAMES event, event_parameter, user_data -PROXY_GROUP_NON_BLOCKING(mtp_event_cb, some_enum event, int event_parameter, void* user_data) -PROXY_GROUP_BLOCKING(mtp_event_cb, some_enum event, int event_parameter, void* user_data) -#undef CB_PARAMS_NAMES - typedef void (*mv_3d_depth_cb)(void* source, void* depth, unsigned int width, unsigned int height, void* user_data); #define CB_PARAMS_NAMES source, depth, width, height, user_data PROXY_GROUP_NON_BLOCKING(mv_3d_depth_cb, void* source, void* depth, unsigned int width, unsigned int height, void* user_data) @@ -2927,12 +2811,6 @@ PROXY_GROUP_NON_BLOCKING(player_media_stream_seek_cb, unsigned long long offset, PROXY_GROUP_BLOCKING(player_media_stream_seek_cb, unsigned long long offset, void* user_data) #undef CB_PARAMS_NAMES -typedef void (*player_pd_message_cb)(some_enum type, void* user_data); -#define CB_PARAMS_NAMES type, user_data -PROXY_GROUP_NON_BLOCKING(player_pd_message_cb, some_enum type, void* user_data) -PROXY_GROUP_BLOCKING(player_pd_message_cb, some_enum type, void* user_data) -#undef CB_PARAMS_NAMES - typedef void (*player_prepared_cb)(void* user_data); #define CB_PARAMS_NAMES user_data PROXY_GROUP_NON_BLOCKING(player_prepared_cb, void* user_data) @@ -3138,12 +3016,6 @@ typedef int (*result_cb)(int ret, void* user_data); PROXY_GROUP_RETURN(result_cb, int, int ret, void* user_data) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_result_cb_t 5 -typedef int (*result_cb_t)(int ret, void* data); -#define CB_PARAMS_NAMES ret, data -PROXY_GROUP_RETURN_NO_USER_DATA(result_cb_t, int, int ret, void* data) -#undef CB_PARAMS_NAMES - typedef void (*rpc_port_proxy_connected_event_cb)(const char* receiver, const char* port_name, void* port, void* user_data); #define CB_PARAMS_NAMES receiver, port_name, port, user_data PROXY_GROUP_NON_BLOCKING(rpc_port_proxy_connected_event_cb, const char* receiver, const char* port_name, void* port, void* user_data) @@ -3282,12 +3154,6 @@ typedef int (*shortcut_request_cb)(const char* package_name, const char* name, i PROXY_GROUP_RETURN(shortcut_request_cb, int, const char* package_name, const char* name, int type, const char* content_info, const char* icon, int pid, double period, int allow_duplicate, void* user_data) #undef CB_PARAMS_NAMES -typedef void (*smartcard_reader_event_cb)(int reader, some_enum event_type, void* user_data); -#define CB_PARAMS_NAMES reader, event_type, user_data -PROXY_GROUP_NON_BLOCKING(smartcard_reader_event_cb, int reader, some_enum event_type, void* user_data) -PROXY_GROUP_BLOCKING(smartcard_reader_event_cb, int reader, some_enum event_type, void* user_data) -#undef CB_PARAMS_NAMES - typedef void (*softap_client_connection_state_changed_cb)(void* client, bool opened, void* user_data); #define CB_PARAMS_NAMES client, opened, user_data PROXY_GROUP_NON_BLOCKING(softap_client_connection_state_changed_cb, void* client, bool opened, void* user_data) @@ -3335,24 +3201,12 @@ PROXY_GROUP_NON_BLOCKING(softap_ssid_visibility_changed_cb, bool changed_visible PROXY_GROUP_BLOCKING(softap_ssid_visibility_changed_cb, bool changed_visible, void* user_data) #undef CB_PARAMS_NAMES -typedef void (*sound_device_connected_cb)(void* device, bool is_connected, void* user_data); -#define CB_PARAMS_NAMES device, is_connected, user_data -PROXY_GROUP_NON_BLOCKING(sound_device_connected_cb, void* device, bool is_connected, void* user_data) -PROXY_GROUP_BLOCKING(sound_device_connected_cb, void* device, bool is_connected, void* user_data) -#undef CB_PARAMS_NAMES - typedef void (*sound_device_connection_changed_cb)(void* device, bool is_connected, void* user_data); #define CB_PARAMS_NAMES device, is_connected, user_data PROXY_GROUP_NON_BLOCKING(sound_device_connection_changed_cb, void* device, bool is_connected, void* user_data) PROXY_GROUP_BLOCKING(sound_device_connection_changed_cb, void* device, bool is_connected, void* user_data) #undef CB_PARAMS_NAMES -typedef void (*sound_device_information_changed_cb)(void* device, some_enum changed_info, void* user_data); -#define CB_PARAMS_NAMES device, changed_info, user_data -PROXY_GROUP_NON_BLOCKING(sound_device_information_changed_cb, void* device, some_enum changed_info, void* user_data) -PROXY_GROUP_BLOCKING(sound_device_information_changed_cb, void* device, some_enum changed_info, void* user_data) -#undef CB_PARAMS_NAMES - typedef void (*sound_device_running_changed_cb)(void* device, bool is_running, void* user_data); #define CB_PARAMS_NAMES device, is_running, user_data PROXY_GROUP_NON_BLOCKING(sound_device_running_changed_cb, void* device, bool is_running, void* user_data) @@ -3383,12 +3237,6 @@ PROXY_GROUP_NON_BLOCKING(sound_pool_stream_state_changed_cb, void* pool, unsigne PROXY_GROUP_BLOCKING(sound_pool_stream_state_changed_cb, void* pool, unsigned id, some_enum prev_state, some_enum cur_state, void* user_data) #undef CB_PARAMS_NAMES -typedef void (*sound_session_interrupted_cb)(some_enum code, void* user_data); -#define CB_PARAMS_NAMES code, user_data -PROXY_GROUP_NON_BLOCKING(sound_session_interrupted_cb, some_enum code, void* user_data) -PROXY_GROUP_BLOCKING(sound_session_interrupted_cb, some_enum code, void* user_data) -#undef CB_PARAMS_NAMES - typedef void (*sound_stream_ducking_state_changed_cb)(void* stream_ducking, bool is_ducked, void* user_data); #define CB_PARAMS_NAMES stream_ducking, is_ducked, user_data PROXY_GROUP_NON_BLOCKING(sound_stream_ducking_state_changed_cb, void* stream_ducking, bool is_ducked, void* user_data) @@ -3553,17 +3401,17 @@ typedef int (*stte_audio_type_cb)(const char* audio_type, void* user_data); PROXY_GROUP_RETURN(stte_audio_type_cb, int, const char* audio_type, void* user_data) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_stte_cancel_cb 10 +#define BASE_CALLBACK_ID_stte_cancel_cb 5 typedef int (*stte_cancel_cb)(); PROXY_GROUP_RETURN_NO_USER_DATA_NO_PARAM(stte_cancel_cb, int) -#define BASE_CALLBACK_ID_stte_check_app_agreed_cb 15 +#define BASE_CALLBACK_ID_stte_check_app_agreed_cb 10 typedef int (*stte_check_app_agreed_cb)(const char* appid, bool* is_agreed); #define CB_PARAMS_NAMES appid, is_agreed PROXY_GROUP_RETURN_NO_USER_DATA(stte_check_app_agreed_cb, int, const char* appid, bool* is_agreed) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_stte_deinitialize_cb 20 +#define BASE_CALLBACK_ID_stte_deinitialize_cb 15 typedef int (*stte_deinitialize_cb)(); PROXY_GROUP_RETURN_NO_USER_DATA_NO_PARAM(stte_deinitialize_cb, int) @@ -3577,39 +3425,39 @@ typedef int (*stte_foreach_supported_langs_cb)(void* callback, void* user_data); PROXY_GROUP_RETURN(stte_foreach_supported_langs_cb, int, void* callback, void* user_data) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_stte_get_info_cb 25 +#define BASE_CALLBACK_ID_stte_get_info_cb 20 typedef int (*stte_get_info_cb)(char** engine_uuid, char** engine_name, char** engine_setting, bool* use_network); #define CB_PARAMS_NAMES engine_uuid, engine_name, engine_setting, use_network PROXY_GROUP_RETURN_NO_USER_DATA(stte_get_info_cb, int, char** engine_uuid, char** engine_name, char** engine_setting, bool* use_network) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_stte_get_recording_format_cb 30 +#define BASE_CALLBACK_ID_stte_get_recording_format_cb 25 typedef int (*stte_get_recording_format_cb)(void* types, int* rate, int* channels); #define CB_PARAMS_NAMES types, rate, channels PROXY_GROUP_RETURN_NO_USER_DATA(stte_get_recording_format_cb, int, void* types, int* rate, int* channels) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_stte_initialize_cb 35 +#define BASE_CALLBACK_ID_stte_initialize_cb 30 typedef int (*stte_initialize_cb)(); PROXY_GROUP_RETURN_NO_USER_DATA_NO_PARAM(stte_initialize_cb, int) -#define BASE_CALLBACK_ID_stte_is_valid_language_cb 40 +#define BASE_CALLBACK_ID_stte_is_valid_language_cb 35 typedef int (*stte_is_valid_language_cb)(const char* language, bool* is_valid); #define CB_PARAMS_NAMES language, is_valid PROXY_GROUP_RETURN_NO_USER_DATA(stte_is_valid_language_cb, int, const char* language, bool* is_valid) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_stte_need_app_credential_cb 45 +#define BASE_CALLBACK_ID_stte_need_app_credential_cb 40 typedef bool (*stte_need_app_credential_cb)(); PROXY_GROUP_RETURN_NO_USER_DATA_NO_PARAM(stte_need_app_credential_cb, bool) -#define BASE_CALLBACK_ID_stte_private_data_requested_cb 50 +#define BASE_CALLBACK_ID_stte_private_data_requested_cb 45 typedef int (*stte_private_data_requested_cb)(const char* key, char** data); #define CB_PARAMS_NAMES key, data PROXY_GROUP_RETURN_NO_USER_DATA(stte_private_data_requested_cb, int, const char* key, char** data) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_stte_private_data_set_cb 55 +#define BASE_CALLBACK_ID_stte_private_data_set_cb 50 typedef int (*stte_private_data_set_cb)(const char* key, const char* data); #define CB_PARAMS_NAMES key, data PROXY_GROUP_RETURN_NO_USER_DATA(stte_private_data_set_cb, int, const char* key, const char* data) @@ -3620,13 +3468,13 @@ typedef bool (*stte_result_time_cb)(int index, some_enum event, const char* text PROXY_GROUP_RETURN(stte_result_time_cb, bool, int index, some_enum event, const char* text, long start_time, long end_time, void* user_data) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_stte_set_recording_data_cb 60 +#define BASE_CALLBACK_ID_stte_set_recording_data_cb 55 typedef int (*stte_set_recording_data_cb)(const void* data, unsigned int length); #define CB_PARAMS_NAMES data, length PROXY_GROUP_RETURN_NO_USER_DATA(stte_set_recording_data_cb, int, const void* data, unsigned int length) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_stte_set_silence_detection_cb 65 +#define BASE_CALLBACK_ID_stte_set_silence_detection_cb 60 typedef int (*stte_set_silence_detection_cb)(bool is_set); #define CB_PARAMS_NAMES is_set PROXY_GROUP_RETURN_NO_USER_DATA(stte_set_silence_detection_cb, int, bool is_set) @@ -3637,17 +3485,17 @@ typedef int (*stte_start_cb)(const char* language, const char* type, const char* PROXY_GROUP_RETURN(stte_start_cb, int, const char* language, const char* type, const char* appid, const char* credential, void* user_data) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_stte_stop_cb 70 +#define BASE_CALLBACK_ID_stte_stop_cb 65 typedef int (*stte_stop_cb)(); PROXY_GROUP_RETURN_NO_USER_DATA_NO_PARAM(stte_stop_cb, int) -#define BASE_CALLBACK_ID_stte_support_recognition_type_cb 75 +#define BASE_CALLBACK_ID_stte_support_recognition_type_cb 70 typedef int (*stte_support_recognition_type_cb)(const char* type, bool* is_supported); #define CB_PARAMS_NAMES type, is_supported PROXY_GROUP_RETURN_NO_USER_DATA(stte_support_recognition_type_cb, int, const char* type, bool* is_supported) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_stte_support_silence_detection_cb 80 +#define BASE_CALLBACK_ID_stte_support_silence_detection_cb 75 typedef bool (*stte_support_silence_detection_cb)(); PROXY_GROUP_RETURN_NO_USER_DATA_NO_PARAM(stte_support_silence_detection_cb, bool) @@ -3656,14 +3504,14 @@ typedef bool (*stte_supported_language_cb)(const char* language, void* user_data PROXY_GROUP_RETURN(stte_supported_language_cb, bool, const char* language, void* user_data) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_sync_adapter_cancel_sync_cb 85 +#define BASE_CALLBACK_ID_sync_adapter_cancel_sync_cb 80 typedef void (*sync_adapter_cancel_sync_cb)(void* account, const char* sync_job_name, const char* sync_capability, void* sync_job_user_data); #define CB_PARAMS_NAMES account, sync_job_name, sync_capability, sync_job_user_data PROXY_GROUP_NON_BLOCKING_NO_USER_DATA(sync_adapter_cancel_sync_cb, void* account, const char* sync_job_name, const char* sync_capability, void* sync_job_user_data) PROXY_GROUP_BLOCKING_NO_USER_DATA(sync_adapter_cancel_sync_cb, void* account, const char* sync_job_name, const char* sync_capability, void* sync_job_user_data) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_sync_adapter_start_sync_cb 90 +#define BASE_CALLBACK_ID_sync_adapter_start_sync_cb 85 typedef bool (*sync_adapter_start_sync_cb)(void* account, const char* sync_job_name, const char* sync_capability, void* sync_job_user_data); #define CB_PARAMS_NAMES account, sync_job_name, sync_capability, sync_job_user_data PROXY_GROUP_RETURN_NO_USER_DATA(sync_adapter_start_sync_cb, bool, void* account, const char* sync_job_name, const char* sync_capability, void* sync_job_user_data) @@ -3685,18 +3533,6 @@ typedef bool (*system_settings_iter_cb)(int index, const char* value, void* user PROXY_GROUP_RETURN(system_settings_iter_cb, bool, int index, const char* value, void* user_data) #undef CB_PARAMS_NAMES -typedef void (*telephony_noti_cb)(void* handle, some_enum noti_id, void* data, void* user_data); -#define CB_PARAMS_NAMES handle, noti_id, data, user_data -PROXY_GROUP_NON_BLOCKING(telephony_noti_cb, void* handle, some_enum noti_id, void* data, void* user_data) -PROXY_GROUP_BLOCKING(telephony_noti_cb, void* handle, some_enum noti_id, void* data, void* user_data) -#undef CB_PARAMS_NAMES - -typedef void (*telephony_state_changed_cb)(some_enum state, void* user_data); -#define CB_PARAMS_NAMES state, user_data -PROXY_GROUP_NON_BLOCKING(telephony_state_changed_cb, some_enum state, void* user_data) -PROXY_GROUP_BLOCKING(telephony_state_changed_cb, some_enum state, void* user_data) -#undef CB_PARAMS_NAMES - typedef void (*thumbnail_extracted_cb)(some_enum error, const char* request_id, int thumb_width, int thumb_height, unsigned char* thumb_data, int thumb_size, void* user_data); #define CB_PARAMS_NAMES error, request_id, thumb_width, thumb_height, thumb_data, thumb_size, user_data PROXY_GROUP_NON_BLOCKING(thumbnail_extracted_cb, some_enum error, const char* request_id, int thumb_width, int thumb_height, unsigned char* thumb_data, int thumb_size, void* user_data) @@ -3762,24 +3598,24 @@ PROXY_GROUP_NON_BLOCKING(tts_utterance_started_cb, void* tts, int utt_id, void* PROXY_GROUP_BLOCKING(tts_utterance_started_cb, void* tts, int utt_id, void* user_data) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_ttse_activated_mode_changed_cb 95 +#define BASE_CALLBACK_ID_ttse_activated_mode_changed_cb 90 typedef void (*ttse_activated_mode_changed_cb)(int activated_mode); #define CB_PARAMS_NAMES activated_mode PROXY_GROUP_NON_BLOCKING_NO_USER_DATA(ttse_activated_mode_changed_cb, int activated_mode) PROXY_GROUP_BLOCKING_NO_USER_DATA(ttse_activated_mode_changed_cb, int activated_mode) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_ttse_cancel_synthesis_cb 100 +#define BASE_CALLBACK_ID_ttse_cancel_synthesis_cb 95 typedef int (*ttse_cancel_synthesis_cb)(); PROXY_GROUP_RETURN_NO_USER_DATA_NO_PARAM(ttse_cancel_synthesis_cb, int) -#define BASE_CALLBACK_ID_ttse_check_app_agreed_cb 105 +#define BASE_CALLBACK_ID_ttse_check_app_agreed_cb 100 typedef int (*ttse_check_app_agreed_cb)(const char* appid, bool* is_agreed); #define CB_PARAMS_NAMES appid, is_agreed PROXY_GROUP_RETURN_NO_USER_DATA(ttse_check_app_agreed_cb, int, const char* appid, bool* is_agreed) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_ttse_deinitialize_cb 110 +#define BASE_CALLBACK_ID_ttse_deinitialize_cb 105 typedef int (*ttse_deinitialize_cb)(); PROXY_GROUP_RETURN_NO_USER_DATA_NO_PARAM(ttse_deinitialize_cb, int) @@ -3788,45 +3624,45 @@ typedef int (*ttse_foreach_supported_voices_cb)(void* callback, void* user_data) PROXY_GROUP_RETURN(ttse_foreach_supported_voices_cb, int, void* callback, void* user_data) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_ttse_get_info_cb 115 +#define BASE_CALLBACK_ID_ttse_get_info_cb 110 typedef int (*ttse_get_info_cb)(char** engine_uuid, char** engine_name, char** engine_setting, bool* use_network); #define CB_PARAMS_NAMES engine_uuid, engine_name, engine_setting, use_network PROXY_GROUP_RETURN_NO_USER_DATA(ttse_get_info_cb, int, char** engine_uuid, char** engine_name, char** engine_setting, bool* use_network) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_ttse_initialize_cb 120 +#define BASE_CALLBACK_ID_ttse_initialize_cb 115 typedef int (*ttse_initialize_cb)(); PROXY_GROUP_RETURN_NO_USER_DATA_NO_PARAM(ttse_initialize_cb, int) -#define BASE_CALLBACK_ID_ttse_is_valid_voice_cb 125 +#define BASE_CALLBACK_ID_ttse_is_valid_voice_cb 120 typedef int (*ttse_is_valid_voice_cb)(const char* language, int type, bool* is_valid); #define CB_PARAMS_NAMES language, type, is_valid PROXY_GROUP_RETURN_NO_USER_DATA(ttse_is_valid_voice_cb, int, const char* language, int type, bool* is_valid) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_ttse_load_voice_cb 130 +#define BASE_CALLBACK_ID_ttse_load_voice_cb 125 typedef int (*ttse_load_voice_cb)(const char* language, int type); #define CB_PARAMS_NAMES language, type PROXY_GROUP_RETURN_NO_USER_DATA(ttse_load_voice_cb, int, const char* language, int type) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_ttse_need_app_credential_cb 135 +#define BASE_CALLBACK_ID_ttse_need_app_credential_cb 130 typedef bool (*ttse_need_app_credential_cb)(); PROXY_GROUP_RETURN_NO_USER_DATA_NO_PARAM(ttse_need_app_credential_cb, bool) -#define BASE_CALLBACK_ID_ttse_private_data_requested_cb 140 +#define BASE_CALLBACK_ID_ttse_private_data_requested_cb 135 typedef int (*ttse_private_data_requested_cb)(const char* key, char** data); #define CB_PARAMS_NAMES key, data PROXY_GROUP_RETURN_NO_USER_DATA(ttse_private_data_requested_cb, int, const char* key, char** data) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_ttse_private_data_set_cb 145 +#define BASE_CALLBACK_ID_ttse_private_data_set_cb 140 typedef int (*ttse_private_data_set_cb)(const char* key, const char* data); #define CB_PARAMS_NAMES key, data PROXY_GROUP_RETURN_NO_USER_DATA(ttse_private_data_set_cb, int, const char* key, const char* data) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_ttse_set_pitch_cb 150 +#define BASE_CALLBACK_ID_ttse_set_pitch_cb 145 typedef int (*ttse_set_pitch_cb)(int pitch); #define CB_PARAMS_NAMES pitch PROXY_GROUP_RETURN_NO_USER_DATA(ttse_set_pitch_cb, int, int pitch) @@ -3842,7 +3678,7 @@ typedef bool (*ttse_supported_voice_cb)(const char* language, int type, void* us PROXY_GROUP_RETURN(ttse_supported_voice_cb, bool, const char* language, int type, void* user_data) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_ttse_unload_voice_cb 155 +#define BASE_CALLBACK_ID_ttse_unload_voice_cb 150 typedef int (*ttse_unload_voice_cb)(const char* language, int type); #define CB_PARAMS_NAMES language, type PROXY_GROUP_RETURN_NO_USER_DATA(ttse_unload_voice_cb, int, const char* language, int type) @@ -3917,7 +3753,7 @@ PROXY_GROUP_NON_BLOCKING(vc_mgr_vc_tts_streaming_cb, int pid, int utt_id, some_e PROXY_GROUP_BLOCKING(vc_mgr_vc_tts_streaming_cb, int pid, int utt_id, some_enum event, char* buffer, int len, void* user_data) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_vce_cancel_cb 160 +#define BASE_CALLBACK_ID_vce_cancel_cb 155 typedef int (*vce_cancel_cb)(); PROXY_GROUP_RETURN_NO_USER_DATA_NO_PARAM(vce_cancel_cb, int) @@ -3931,7 +3767,7 @@ typedef bool (*vce_command_cb)(int id, int type, int format, const char* command PROXY_GROUP_RETURN(vce_command_cb, bool, int id, int type, int format, const char* command, const char* param, int domain, void* user_data) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_vce_deinitialize_cb 165 +#define BASE_CALLBACK_ID_vce_deinitialize_cb 160 typedef int (*vce_deinitialize_cb)(); PROXY_GROUP_RETURN_NO_USER_DATA_NO_PARAM(vce_deinitialize_cb, int) @@ -3940,59 +3776,59 @@ typedef int (*vce_foreach_supported_languages_cb)(void* callback, void* user_dat PROXY_GROUP_RETURN(vce_foreach_supported_languages_cb, int, void* callback, void* user_data) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_vce_get_info_cb 170 +#define BASE_CALLBACK_ID_vce_get_info_cb 165 typedef int (*vce_get_info_cb)(char** engine_uuid, char** engine_name, char** engine_settings_app_id, bool* use_network); #define CB_PARAMS_NAMES engine_uuid, engine_name, engine_settings_app_id, use_network PROXY_GROUP_RETURN_NO_USER_DATA(vce_get_info_cb, int, char** engine_uuid, char** engine_name, char** engine_settings_app_id, bool* use_network) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_vce_get_recording_format_cb 175 +#define BASE_CALLBACK_ID_vce_get_recording_format_cb 170 typedef int (*vce_get_recording_format_cb)(const char* audio_id, void* types, int* rate, int* channels); #define CB_PARAMS_NAMES audio_id, types, rate, channels PROXY_GROUP_RETURN_NO_USER_DATA(vce_get_recording_format_cb, int, const char* audio_id, void* types, int* rate, int* channels) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_vce_initialize_cb 180 +#define BASE_CALLBACK_ID_vce_initialize_cb 175 typedef int (*vce_initialize_cb)(); PROXY_GROUP_RETURN_NO_USER_DATA_NO_PARAM(vce_initialize_cb, int) -#define BASE_CALLBACK_ID_vce_is_language_supported_cb 185 +#define BASE_CALLBACK_ID_vce_is_language_supported_cb 180 typedef bool (*vce_is_language_supported_cb)(const char* language); #define CB_PARAMS_NAMES language PROXY_GROUP_RETURN_NO_USER_DATA(vce_is_language_supported_cb, bool, const char* language) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_vce_nlu_base_info_requested_cb 190 +#define BASE_CALLBACK_ID_vce_nlu_base_info_requested_cb 185 typedef int (*vce_nlu_base_info_requested_cb)(const char* key, char** value); #define CB_PARAMS_NAMES key, value PROXY_GROUP_RETURN_NO_USER_DATA(vce_nlu_base_info_requested_cb, int, const char* key, char** value) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_vce_private_data_requested_cb 195 +#define BASE_CALLBACK_ID_vce_private_data_requested_cb 190 typedef int (*vce_private_data_requested_cb)(const char* key, char** data); #define CB_PARAMS_NAMES key, data PROXY_GROUP_RETURN_NO_USER_DATA(vce_private_data_requested_cb, int, const char* key, char** data) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_vce_private_data_set_cb 200 +#define BASE_CALLBACK_ID_vce_private_data_set_cb 195 typedef int (*vce_private_data_set_cb)(const char* key, const char* data); #define CB_PARAMS_NAMES key, data PROXY_GROUP_RETURN_NO_USER_DATA(vce_private_data_set_cb, int, const char* key, const char* data) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_vce_process_haptic_event_cb 205 +#define BASE_CALLBACK_ID_vce_process_haptic_event_cb 200 typedef int (*vce_process_haptic_event_cb)(const char* event); #define CB_PARAMS_NAMES event PROXY_GROUP_RETURN_NO_USER_DATA(vce_process_haptic_event_cb, int, const char* event) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_vce_process_list_event_cb 210 +#define BASE_CALLBACK_ID_vce_process_list_event_cb 205 typedef int (*vce_process_list_event_cb)(const char* event); #define CB_PARAMS_NAMES event PROXY_GROUP_RETURN_NO_USER_DATA(vce_process_list_event_cb, int, const char* event) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_vce_process_text_cb 215 +#define BASE_CALLBACK_ID_vce_process_text_cb 210 typedef int (*vce_process_text_cb)(const char* text); #define CB_PARAMS_NAMES text PROXY_GROUP_RETURN_NO_USER_DATA(vce_process_text_cb, int, const char* text) @@ -4003,55 +3839,55 @@ typedef int (*vce_request_tts_cb)(int pid, int utt_id, const char* text, const c PROXY_GROUP_RETURN(vce_request_tts_cb, int, int pid, int utt_id, const char* text, const char* language, void* user_data) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_vce_set_audio_type_cb 220 +#define BASE_CALLBACK_ID_vce_set_audio_type_cb 215 typedef int (*vce_set_audio_type_cb)(const char* audio_type); #define CB_PARAMS_NAMES audio_type PROXY_GROUP_RETURN_NO_USER_DATA(vce_set_audio_type_cb, int, const char* audio_type) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_vce_set_commands_cb 225 +#define BASE_CALLBACK_ID_vce_set_commands_cb 220 typedef int (*vce_set_commands_cb)(void* vc_command); #define CB_PARAMS_NAMES vc_command PROXY_GROUP_RETURN_NO_USER_DATA(vce_set_commands_cb, int, void* vc_command) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_vce_set_domain_cb 230 +#define BASE_CALLBACK_ID_vce_set_domain_cb 225 typedef int (*vce_set_domain_cb)(const char* domain); #define CB_PARAMS_NAMES domain PROXY_GROUP_RETURN_NO_USER_DATA(vce_set_domain_cb, int, const char* domain) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_vce_set_language_cb 235 +#define BASE_CALLBACK_ID_vce_set_language_cb 230 typedef int (*vce_set_language_cb)(const char* language); #define CB_PARAMS_NAMES language PROXY_GROUP_RETURN_NO_USER_DATA(vce_set_language_cb, int, const char* language) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_vce_set_recording_data_cb 240 +#define BASE_CALLBACK_ID_vce_set_recording_data_cb 235 typedef int (*vce_set_recording_data_cb)(const void* data, unsigned int length, void* speech_detected); #define CB_PARAMS_NAMES data, length, speech_detected PROXY_GROUP_RETURN_NO_USER_DATA(vce_set_recording_data_cb, int, const void* data, unsigned int length, void* speech_detected) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_vce_set_server_dialog_cb 245 +#define BASE_CALLBACK_ID_vce_set_server_dialog_cb 240 typedef int (*vce_set_server_dialog_cb)(const char* app_id, const char* credential); #define CB_PARAMS_NAMES app_id, credential PROXY_GROUP_RETURN_NO_USER_DATA(vce_set_server_dialog_cb, int, const char* app_id, const char* credential) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_vce_specific_engine_request_cb 250 +#define BASE_CALLBACK_ID_vce_specific_engine_request_cb 245 typedef int (*vce_specific_engine_request_cb)(const char* engine_app_id, const char* event, const char* request); #define CB_PARAMS_NAMES engine_app_id, event, request PROXY_GROUP_RETURN_NO_USER_DATA(vce_specific_engine_request_cb, int, const char* engine_app_id, const char* event, const char* request) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_vce_start_cb 255 +#define BASE_CALLBACK_ID_vce_start_cb 250 typedef int (*vce_start_cb)(bool stop_by_silence); #define CB_PARAMS_NAMES stop_by_silence PROXY_GROUP_RETURN_NO_USER_DATA(vce_start_cb, int, bool stop_by_silence) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_vce_stop_cb 260 +#define BASE_CALLBACK_ID_vce_stop_cb 255 typedef int (*vce_stop_cb)(); PROXY_GROUP_RETURN_NO_USER_DATA_NO_PARAM(vce_stop_cb, int) @@ -4065,37 +3901,10 @@ typedef int (*vce_tts_audio_format_request_cb)(int* rate, int* channel, int* aud PROXY_GROUP_RETURN(vce_tts_audio_format_request_cb, int, int* rate, int* channel, int* audio_type, void* user_data) #undef CB_PARAMS_NAMES -#define BASE_CALLBACK_ID_vce_unset_commands_cb 265 +#define BASE_CALLBACK_ID_vce_unset_commands_cb 260 typedef int (*vce_unset_commands_cb)(); PROXY_GROUP_RETURN_NO_USER_DATA_NO_PARAM(vce_unset_commands_cb, int) -typedef bool (*video_util_supported_audio_encoder_cb)(some_enum codec, void* user_data); -#define CB_PARAMS_NAMES codec, user_data -PROXY_GROUP_RETURN(video_util_supported_audio_encoder_cb, bool, some_enum codec, void* user_data) -#undef CB_PARAMS_NAMES - -typedef bool (*video_util_supported_file_format_cb)(some_enum format, void* user_data); -#define CB_PARAMS_NAMES format, user_data -PROXY_GROUP_RETURN(video_util_supported_file_format_cb, bool, some_enum format, void* user_data) -#undef CB_PARAMS_NAMES - -typedef bool (*video_util_supported_video_encoder_cb)(some_enum codec, void* user_data); -#define CB_PARAMS_NAMES codec, user_data -PROXY_GROUP_RETURN(video_util_supported_video_encoder_cb, bool, some_enum codec, void* user_data) -#undef CB_PARAMS_NAMES - -typedef void (*video_util_transcoding_completed_cb)(some_enum error_code, void* user_data); -#define CB_PARAMS_NAMES error_code, user_data -PROXY_GROUP_NON_BLOCKING(video_util_transcoding_completed_cb, some_enum error_code, void* user_data) -PROXY_GROUP_BLOCKING(video_util_transcoding_completed_cb, some_enum error_code, void* user_data) -#undef CB_PARAMS_NAMES - -typedef void (*video_util_transcoding_progress_cb)(unsigned long current_position, unsigned long duration, void* user_data); -#define CB_PARAMS_NAMES current_position, duration, user_data -PROXY_GROUP_NON_BLOCKING(video_util_transcoding_progress_cb, unsigned long current_position, unsigned long duration, void* user_data) -PROXY_GROUP_BLOCKING(video_util_transcoding_progress_cb, unsigned long current_position, unsigned long duration, void* user_data) -#undef CB_PARAMS_NAMES - typedef void (*wav_player_playback_completed_cb)(int id, void* user_data); #define CB_PARAMS_NAMES id, user_data PROXY_GROUP_NON_BLOCKING(wav_player_playback_completed_cb, int id, void* user_data) @@ -4472,8 +4281,6 @@ std::map multi_proxy_map = { MULTI_PROXY_MAP_ENTRY(platform_non_blocking_audio_in_state_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_audio_in_stream_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_audio_in_stream_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_audio_io_interrupted_cb) - MULTI_PROXY_MAP_ENTRY(platform_non_blocking_audio_io_interrupted_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_audio_out_state_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_audio_out_state_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_audio_out_stream_cb) @@ -4511,8 +4318,6 @@ std::map multi_proxy_map = { MULTI_PROXY_MAP_ENTRY(platform_non_blocking_bt_adapter_device_discovery_state_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_bt_adapter_le_advertising_state_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_bt_adapter_le_advertising_state_changed_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_bt_adapter_le_device_discovery_state_changed_cb) - MULTI_PROXY_MAP_ENTRY(platform_non_blocking_bt_adapter_le_device_discovery_state_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_bt_adapter_le_new_scan_result_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_bt_adapter_le_new_scan_result_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_bt_adapter_le_scan_result_cb) @@ -4556,15 +4361,6 @@ std::map multi_proxy_map = { MULTI_PROXY_MAP_ENTRY(platform_non_blocking_bt_device_connection_state_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_bt_device_service_searched_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_bt_device_service_searched_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_bt_gatt_characteristic_changed_cb) - MULTI_PROXY_MAP_ENTRY(platform_non_blocking_bt_gatt_characteristic_changed_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_bt_gatt_characteristic_descriptor_discovered_cb) - MULTI_PROXY_MAP_ENTRY(platform_non_blocking_bt_gatt_characteristic_descriptor_discovered_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_bt_gatt_characteristic_read_cb) - MULTI_PROXY_MAP_ENTRY(platform_non_blocking_bt_gatt_characteristic_read_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_bt_gatt_characteristic_write_cb) - MULTI_PROXY_MAP_ENTRY(platform_non_blocking_bt_gatt_characteristic_write_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_bt_gatt_characteristics_discovered_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_bt_gatt_client_att_mtu_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_bt_gatt_client_att_mtu_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_bt_gatt_client_characteristic_value_changed_cb) @@ -4576,8 +4372,6 @@ std::map multi_proxy_map = { MULTI_PROXY_MAP_ENTRY(platform_blocking_bt_gatt_connection_state_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_bt_gatt_connection_state_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_bt_gatt_foreach_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_bt_gatt_included_service_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_bt_gatt_primary_service_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_bt_gatt_server_characteristic_notification_state_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_bt_gatt_server_characteristic_notification_state_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_bt_gatt_server_notification_sent_cb) @@ -5060,8 +4854,6 @@ std::map multi_proxy_map = { MULTI_PROXY_MAP_ENTRY(platform_non_blocking_mc_client_custom_event_received_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_mc_cmd_reply_received_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_mc_cmd_reply_received_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_mc_command_reply_received_cb) - MULTI_PROXY_MAP_ENTRY(platform_non_blocking_mc_command_reply_received_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_mc_display_mode_updated_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_mc_display_mode_updated_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_mc_display_rotation_updated_cb) @@ -5078,15 +4870,11 @@ std::map multi_proxy_map = { MULTI_PROXY_MAP_ENTRY(platform_non_blocking_mc_playlist_updated_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_mc_repeat_ability_updated_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_mc_repeat_ability_updated_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_mc_repeat_mode_changed_cb) - MULTI_PROXY_MAP_ENTRY(platform_non_blocking_mc_repeat_mode_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_mc_repeat_mode_updated_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_mc_repeat_mode_updated_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_mc_search_condition_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_mc_server_custom_cmd_received_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_mc_server_custom_cmd_received_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_mc_server_custom_command_received_cb) - MULTI_PROXY_MAP_ENTRY(platform_non_blocking_mc_server_custom_command_received_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_mc_server_display_mode_cmd_received_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_mc_server_display_mode_cmd_received_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_mc_server_display_rotation_cmd_received_cb) @@ -5099,8 +4887,6 @@ std::map multi_proxy_map = { MULTI_PROXY_MAP_ENTRY(platform_non_blocking_mc_server_playback_action_cmd_received_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_mc_server_playback_position_cmd_received_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_mc_server_playback_position_cmd_received_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_mc_server_playback_state_command_received_cb) - MULTI_PROXY_MAP_ENTRY(platform_non_blocking_mc_server_playback_state_command_received_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_mc_server_playlist_cmd_received_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_mc_server_playlist_cmd_received_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_mc_server_repeat_mode_cmd_received_cb) @@ -5113,8 +4899,6 @@ std::map multi_proxy_map = { MULTI_PROXY_MAP_ENTRY(platform_non_blocking_mc_server_state_updated_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_mc_shuffle_ability_updated_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_mc_shuffle_ability_updated_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_mc_shuffle_mode_changed_cb) - MULTI_PROXY_MAP_ENTRY(platform_non_blocking_mc_shuffle_mode_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_mc_shuffle_mode_updated_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_mc_shuffle_mode_updated_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_mc_subscribed_server_cb) @@ -5128,8 +4912,6 @@ std::map multi_proxy_map = { MULTI_PROXY_MAP_ENTRY(platform_blocking_media_folder_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_media_group_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_media_info_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_media_insert_burst_shot_completed_cb) - MULTI_PROXY_MAP_ENTRY(platform_non_blocking_media_insert_burst_shot_completed_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_media_insert_completed_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_media_insert_completed_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_media_key_event_cb) @@ -5197,13 +4979,6 @@ std::map multi_proxy_map = { MULTI_PROXY_MAP_ENTRY(platform_non_blocking_message_port_registration_event_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_message_port_trusted_message_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_message_port_trusted_message_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_messages_incoming_cb) - MULTI_PROXY_MAP_ENTRY(platform_non_blocking_messages_incoming_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_messages_push_incoming_cb) - MULTI_PROXY_MAP_ENTRY(platform_non_blocking_messages_push_incoming_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_messages_search_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_messages_sent_cb) - MULTI_PROXY_MAP_ENTRY(platform_non_blocking_messages_sent_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_ml_custom_easy_invoke_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_ml_data_destroy_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_ml_data_destroy_cb) @@ -5213,8 +4988,6 @@ std::map multi_proxy_map = { MULTI_PROXY_MAP_ENTRY(platform_blocking_ml_pipeline_state_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_ml_pipeline_state_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_ml_train_datagen_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_mtp_event_cb) - MULTI_PROXY_MAP_ENTRY(platform_non_blocking_mtp_event_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_mv_3d_depth_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_mv_3d_depth_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_mv_3d_pointcloud_cb) @@ -5306,8 +5079,6 @@ std::map multi_proxy_map = { MULTI_PROXY_MAP_ENTRY(platform_non_blocking_player_media_stream_buffer_status_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_player_media_stream_seek_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_player_media_stream_seek_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_player_pd_message_cb) - MULTI_PROXY_MAP_ENTRY(platform_non_blocking_player_pd_message_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_player_prepared_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_player_prepared_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_player_seek_completed_cb) @@ -5369,7 +5140,6 @@ std::map multi_proxy_map = { MULTI_PROXY_MAP_ENTRY(platform_blocking_recorder_supported_video_resolution_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_recorder_video_encode_decision_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_result_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_result_cb_t) MULTI_PROXY_MAP_ENTRY(platform_blocking_rpc_port_proxy_connected_event_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_rpc_port_proxy_connected_event_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_rpc_port_proxy_disconnected_event_cb) @@ -5412,8 +5182,6 @@ std::map multi_proxy_map = { MULTI_PROXY_MAP_ENTRY(platform_blocking_shortcut_list_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_shortcut_remove_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_shortcut_request_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_smartcard_reader_event_cb) - MULTI_PROXY_MAP_ENTRY(platform_non_blocking_smartcard_reader_event_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_softap_client_connection_state_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_softap_client_connection_state_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_softap_connected_client_cb) @@ -5429,12 +5197,8 @@ std::map multi_proxy_map = { MULTI_PROXY_MAP_ENTRY(platform_non_blocking_softap_settings_reloaded_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_softap_ssid_visibility_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_softap_ssid_visibility_changed_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_sound_device_connected_cb) - MULTI_PROXY_MAP_ENTRY(platform_non_blocking_sound_device_connected_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_sound_device_connection_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_sound_device_connection_changed_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_sound_device_information_changed_cb) - MULTI_PROXY_MAP_ENTRY(platform_non_blocking_sound_device_information_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_sound_device_running_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_sound_device_running_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_sound_device_state_changed_cb) @@ -5445,8 +5209,6 @@ std::map multi_proxy_map = { MULTI_PROXY_MAP_ENTRY(platform_non_blocking_sound_pool_state_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_sound_pool_stream_state_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_sound_pool_stream_state_changed_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_sound_session_interrupted_cb) - MULTI_PROXY_MAP_ENTRY(platform_non_blocking_sound_session_interrupted_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_sound_stream_ducking_state_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_sound_stream_ducking_state_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_sound_stream_focus_state_changed_cb) @@ -5522,10 +5284,6 @@ std::map multi_proxy_map = { MULTI_PROXY_MAP_ENTRY(platform_blocking_system_settings_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_system_settings_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_system_settings_iter_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_telephony_noti_cb) - MULTI_PROXY_MAP_ENTRY(platform_non_blocking_telephony_noti_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_telephony_state_changed_cb) - MULTI_PROXY_MAP_ENTRY(platform_non_blocking_telephony_state_changed_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_thumbnail_extracted_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_thumbnail_extracted_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_tts_default_voice_changed_cb) @@ -5613,13 +5371,6 @@ std::map multi_proxy_map = { MULTI_PROXY_MAP_ENTRY(platform_blocking_vce_supported_language_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_vce_tts_audio_format_request_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_vce_unset_commands_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_video_util_supported_audio_encoder_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_video_util_supported_file_format_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_video_util_supported_video_encoder_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_video_util_transcoding_completed_cb) - MULTI_PROXY_MAP_ENTRY(platform_non_blocking_video_util_transcoding_completed_cb) - MULTI_PROXY_MAP_ENTRY(platform_blocking_video_util_transcoding_progress_cb) - MULTI_PROXY_MAP_ENTRY(platform_non_blocking_video_util_transcoding_progress_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_wav_player_playback_completed_cb) MULTI_PROXY_MAP_ENTRY(platform_non_blocking_wav_player_playback_completed_cb) MULTI_PROXY_MAP_ENTRY(platform_blocking_webrtc_data_channel_buffered_amount_low_cb) @@ -5722,7 +5473,6 @@ std::map multi_proxy_map = { std::map reserved_base_id_map = { {"ml_data_destroy_cb", BASE_CALLBACK_ID_ml_data_destroy_cb}, - {"result_cb_t", BASE_CALLBACK_ID_result_cb_t}, {"stte_cancel_cb", BASE_CALLBACK_ID_stte_cancel_cb}, {"stte_check_app_agreed_cb", BASE_CALLBACK_ID_stte_check_app_agreed_cb}, {"stte_deinitialize_cb", BASE_CALLBACK_ID_stte_deinitialize_cb}, diff --git a/scripts/README.md b/scripts/README.md index 1c83704..39e547b 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -2,7 +2,7 @@ ## Generating bindings from source -1. Install a rootstrap of your target Tizen version (e.g. `IOT-Headed-4.0-NativeAppDevelopment-CLI`) using Tizen Package Manager. +1. Install a rootstrap of your target Tizen version (e.g. `IOT-Headed-5.5-NativeAppDevelopment-CLI`) using Tizen Package Manager. 2. Run scripts in this directory as follows, passing the version number as an argument.